feat(chat): add the chat module to the archie binary (#2018)
Conversations are the chat module's own tables. A turn is stored before it is acknowledged, runs after the turns before it in its session, and records everything it streams, so a reader replays it from a cursor. The agent uses the configured agent model, the same connector tools as a run and the dashboard's own reads; every action is judged, and one judgement holds is put to people through approvals and run once when approved. A restart fails the turns it interrupted visibly and never restarts a started action. Conversation memory is a set of notes in the memory module. The chat prompts are copied from internal/prompts (chat-system.tmpl, soul.md, session-title.md) into internal/platform/prompts while the gateway still reads them; the tool parameter redaction is copied from internal/domain/messaging/tool_parameters.go. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
21 files changed
+2863
-8
No files matched your search
@@ -89,11 +89,13 @@ type ledger interface {
|
||||
type Module struct {
|
||||
orgID string
|
||||
ledger ledger
|
||||
notes noteStore
|
||||
}
|
||||
|
||||
// NewModule returns the memory module for orgID.
|
||||
func NewModule(db *sqlx.DB, orgID string) *Module {
|
||||
return &Module{orgID: orgID, ledger: store.New(db)}
|
||||
s := store.New(db)
|
||||
return &Module{orgID: orgID, ledger: s, notes: s}
|
||||
}
|
||||
|
||||
var unsafeCause = regexp.MustCompile(`[^a-z0-9]+`)
|
||||
|
||||
Reference in new issue
Block a user