q792602257
18f6c8bd2e
feat(acp): SessionService.Create issues system MCP token in tx
...
- InTx wraps InsertSession + IssueSystemTokenWithTx (spec §6.1 atomic guarantee)
- Tx failure -> releaseOnFailure (worktree rollback)
- Spawn called with extraEnv = ACW_MCP_TOKEN + ACW_MCP_URL
- Spawn failure -> RevokeBySession (idempotent) + releaseOnFailure
- app.go SessionService construction updated with mcpTokens + config
- Unit tests: token issuance happy path + rollback on token failure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-05-08 13:01:16 +08:00
q792602257
702daced7d
feat(acp): Supervisor.onExit revokes system MCP token (spec §6.3)
...
- mcpTokens dep added to Supervisor; nil-safe (test fixtures may skip)
- RevokeBySession called after audit Record in onExit
- app.go wires mcpTokenSvc (was nil placeholder)
- Integration test: fakeSupMCPTokens verifies onExit calls RevokeBySession
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-05-08 12:52:25 +08:00
q792602257
d44ffc851f
feat(acp): Supervisor.Spawn extraEnv parameter
...
- extraEnv overrides agent_kinds.encrypted_env same-name keys (spec §6.1 #11 )
- Prevents admin from hard-coding ACW_MCP_TOKEN in agent_kinds
- SessionService passes nil for now; system token wiring lands in I4
- BuildSpawnEnv exported for testing the override priority
- Fix app.go NewSupervisor call to match updated signature (from I5)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-05-08 12:46:50 +08:00
q792602257
be8d5e3a1b
feat(mcp,acp): Repository.WithTx + acp.Repository.InTx
...
Cross-module transactional support for spec §6.1: ACP CreateSession must
atomically insert acp_sessions row + mcp_tokens row (FK NOT NULL).
- mcp.Repository.WithTx(tx) -> Repository (tx-bound, no pool)
- acp.Repository.InTx(ctx, fn) -> error (pgx.BeginFunc wrapper)
- acp.Repository.WithTx(tx) -> Repository (tx-bound)
- Update fakeRepos in test files to satisfy new interface methods
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-05-08 12:40:54 +08:00
q792602257
980c6fcf0e
models
2026-05-08 08:57:09 +08:00
q792602257
70ffddb76c
test(acp): handler integration e2e (POST session + WS state event + DELETE)
2026-05-07 17:20:33 +08:00
q792602257
f5f048083a
feat(acp): WebSocket session handler (history + live + ping/pong + owner-only prompt/cancel)
2026-05-07 17:08:09 +08:00
q792602257
72cd353757
feat(acp): handler refactor + sessions REST endpoints (list/create/get/delete/events)
2026-05-07 14:34:47 +08:00
q792602257
90f910fcdd
feat(acp): SessionService.Create with worktree acquire + supervisor.Spawn
2026-05-07 14:23:01 +08:00
q792602257
9fc96b0a1a
feat(acp): SessionService skeleton + ResolveBranch (5 paths) + tests
2026-05-07 14:11:47 +08:00
q792602257
ce28b822f9
feat(acp): SessionService interface + CreateSessionInput
2026-05-07 14:09:42 +08:00
q792602257
54a69a46cd
test(acp): supervisor integration with fake-acp-agent (happy/hang/crash)
2026-05-07 14:05:06 +08:00
q792602257
70c86a552b
feat(acp): supervisor spawn / handshake / monitor / kill / onExit
2026-05-07 14:01:04 +08:00
q792602257
85a8bc0df7
test(acp): relay round-trip + fanout + agent request handling + slow subscriber
2026-05-07 13:45:25 +08:00
q792602257
3d5f63b28e
feat(acp): relay reader/writer goroutines + Call + persist with truncation
2026-05-07 12:25:39 +08:00
q792602257
64ff2a8c02
feat(acp/handlers): initialize + session/new param builders
2026-05-07 12:22:31 +08:00
q792602257
6da1dc5a40
feat(acp/handlers): session/request_permission auto-reject
2026-05-07 12:21:18 +08:00
q792602257
b9f38b6e94
feat(acp/handlers): fs/read_text_file + fs/write_text_file with path safety
2026-05-07 12:19:03 +08:00
q792602257
de73ad4935
feat(acp): relay skeleton (subscribe/unsubscribe/fanout/close) + supervisor.GetRelay
2026-05-07 12:16:06 +08:00
q792602257
839e5c9e95
feat(acp/handlers): handlers subpackage with shared types + placeholder handlers
2026-05-07 12:16:03 +08:00
q792602257
bd95fd33d6
feat(acp): supervisor skeleton + AcpConfig wiring
2026-05-07 12:12:05 +08:00
q792602257
dee20bb618
feat(acp): ResolveSafePath helper (3-fold check: abs/prefix/symlink)
2026-05-07 12:06:37 +08:00
q792602257
cf314021e7
feat(acp): JSON-RPC 2.0 codec (number/string id, LF-delimited, concurrent-safe encoder)
2026-05-07 12:04:27 +08:00
q792602257
8202a7a679
test(acp): handler unit tests (admin / user / field redaction / PATCH semantics)
2026-05-07 11:37:33 +08:00
q792602257
e096b1a671
feat(acp): HTTP handler for agent kinds (admin write / user read with field redaction)
2026-05-07 11:34:11 +08:00
q792602257
79480b32f8
feat(acp): AgentKindService + unit tests (fake repo + real encryptor)
2026-05-07 11:28:15 +08:00
q792602257
1ef2e93b72
test(acp): pgRepo integration tests (CRUD + lifecycle + event order)
2026-05-07 11:21:40 +08:00
q792602257
a9a9e6d8ab
feat(acp): repository interface + pgRepo full implementation (agent_kind + session + event)
2026-05-07 10:42:58 +08:00
q792602257
631f957cd9
feat(acp): sqlc queries (agent_kinds + sessions + events) + generated code
2026-05-07 10:37:16 +08:00
q792602257
cb845f2374
feat(acp): domain types + service interfaces (skeleton)
2026-05-07 10:34:31 +08:00