Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ jobs:
TEST_POSTGRES_BOOTSTRAP_SCHEMA=0 go test -v -race -count=1 -timeout 90s \
-run '^TestPostgresClaim' ./internal/botworkspace
TEST_POSTGRES_BOOTSTRAP_SCHEMA=0 go test -v -race -count=1 -timeout 90s \
-run '^TestPostgresDiscuss(RecoveryPreservesBatchAcrossCompactorRestart|BacklogOverBudgetIsAnsweredAndNextRoundContinues|BacklogWithoutCompactionIsAnsweredAndRecordsOmission|OversizedInputFailsOnceThenNextMessageIsAnswered|ImageBacklogKeepsImagesOnTheirMessages|OversizedImageInputFailsOnceThenNextMessageIsAnswered|ImageBacklogYieldsAnsweredHistoryFirst|CompactedImageInputIsRecorded|CompactionKeepsBatchTextOverImages)$' ./cmd/agent
-run '^TestPostgresDiscuss(RecoveryPreservesBatchAcrossCompactorRestart|BacklogOverBudgetIsAnsweredAndNextRoundContinues|OversizedInputFoldsByItsHeadAndTail|ImageBacklogKeepsImagesOnTheirMessages|OversizedImageInputFailsOnceThenNextMessageIsAnswered|ImageBacklogYieldsAnsweredHistoryFirst|CompactedImageInputIsRecorded|CompactionKeepsBatchTextOverImages)$' ./cmd/agent
TEST_POSTGRES_BOOTSTRAP_SCHEMA=0 go test -v -race -count=1 -timeout 90s \
-run '^TestPostgres(SummaryOnlyRollup|CompleteCompactionRollup)' ./internal/chat/message
-run '^TestPostgresCommit' ./internal/chat/checkpoint
TEST_POSTGRES_BOOTSTRAP_SCHEMA=0 go test -v -race -count=1 -timeout 90s \
-run '^TestPostgresHistoryToolResultRef$' ./internal/agent/tool
- name: Verify atomic connector disconnect and tenant isolation
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- "internal/db/team_*_integration_test.go"
- "internal/db/*postgres_integration_test.go"
- "internal/chat/message/*postgres_integration_test.go"
- "internal/chat/checkpoint/**"
- "internal/agent/view/*postgres_integration_test.go"
- "internal/workspacedeps/*integration_test.go"
pull_request:
Expand All @@ -33,6 +34,7 @@ on:
- "internal/db/team_*_integration_test.go"
- "internal/db/*postgres_integration_test.go"
- "internal/chat/message/*postgres_integration_test.go"
- "internal/chat/checkpoint/**"
- "internal/agent/view/*postgres_integration_test.go"
- "internal/workspacedeps/*integration_test.go"

Expand Down Expand Up @@ -113,4 +115,4 @@ jobs:
# web transcript depends on is checked end to end. Nothing else executes
# them: `go test ./...` runs without a DSN and skips, and the fencing job
# filters by test name.
run: go test -tags=integration -count=1 ./internal/db ./internal/chat/message ./internal/chat/thread ./internal/workspacedeps ./internal/agent/view
run: go test -tags=integration -count=1 ./internal/db ./internal/chat/message ./internal/chat/checkpoint ./internal/chat/thread ./internal/workspacedeps ./internal/agent/view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ The `Human QA` section contains only one status checkbox, `- [ ] Human QA passed
- `sdk.ProviderMetadata` is `namespace → name → string`. Memoh-owned annotations on tool-call parts (pending approval, user-input request, execution location) live in the `memoh` namespace through `internal/agent/partmeta`; `internal/messageconv` folds them back into the nested objects `bot_history_messages` has always stored, so the row format did not change with the SDK types.
- **Tool usage lives with the tool, never in the static prompt.** Per-tool usage goes in `toolexec.Tool.Description`; cross-tool workflow guidance goes in an optional `tools.ToolUsage` `Usage()` method that `assembleTools` injects only when that provider registers tools for the session. `internal/agent/runtime/native/prompt_test.go` guards this.
- Prompt templates are embedded from `internal/agent/runtime/native/prompts/`. Partials are prefixed with `_`; system prompting combines `system_common.md` with mode-specific prompts such as `mode_chat.md` and `mode_discuss.md`.
- `internal/chat/` owns internal chat state (`thread`, `message`, `timeline`, `view`) and does not orchestrate Agent execution. Inbound adaptation lives in `internal/channel/inbound/`; discuss-mode driving in `internal/channel/discuss/`.
- `internal/chat/` owns internal chat state (`thread`, `message`, `checkpoint`, `timeline`, `view`) and does not orchestrate Agent execution. Inbound adaptation lives in `internal/channel/inbound/`; discuss-mode driving in `internal/channel/discuss/`.
- Browser Use tools (`browser_action` / `browser_observe` / `browser_remote_session`) drive the headed workspace Chrome over CDP; Computer Use (`computer_observe` / `computer_action`) drives the GUI desktop via AT-SPI + RFB. Screenshots are saved to a workspace path and must be explicitly read. Prefer Browser Use for web pages; Computer Use for native dialogs and non-browser GUI states.
- Runtime internals (Twilight `Stream()`/`Generate()`, compaction, loop detection, tag extraction, full Browser/Computer Use details): `docs/agent-runtime.md`.

Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/abandoned_decision_fold_postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestPostgresInRunFoldTakesAnAbandonedDecisionWithItsCall(t *testing.T) {
t.Fatalf("loop: code=%q effects=%v, want every effect run", code, s.effects)
}
var folded int
if err := f.pool.QueryRow(f.ctx, `SELECT count(*) FROM bot_history_messages h JOIN bot_history_message_compacts c ON c.id=h.compact_id AND c.status='ok' WHERE h.session_id=$1 AND h.role='assistant' AND h.content::text LIKE '%call_001%'`, f.sessionID).Scan(&folded); err != nil {
if err := f.pool.QueryRow(f.ctx, `SELECT count(*) FROM (`+historyRowsSQL+`) h WHERE h.folded AND h.role='assistant' AND h.content::text LIKE '%call_001%'`, f.sessionID).Scan(&folded); err != nil {
t.Fatal(err)
}
if folded != 1 {
Expand Down
Loading
Loading