Commit Graph
248 Commits
Author SHA1 Message Date
weichen e59b25c816 Merge pull request 'Split usage accounting end to end, retry by default, and take the WP6 pins (N3 WP6)' (#96) from feature/n3-usage-retry-wp6 into main
ci / vet-and-test (push) Successful in 41s
Split usage accounting end to end, retry by default, and take the WP6 pins (N3 WP6)
2026-10-07 17:19:27 +00:00
weichen 8c5612a0a3 Split usage accounting end to end, retry by default, and take the WP6 pins (N3 WP6)
ci / vet-and-test (pull_request) Successful in 44s
Why: subagent runs recorded zero tokens, cache hits were invisible in
run records, the usage event skipped terminal paths, and stream retry
existed only on the direct-chat path (audit N20 residual).
Evidence: go test -count=1 ./... green; TestRetryAttemptsMapping
(setting 0=off→-1, N→N), TestDirectRunUsageSplitOnRecord (Last* and
cache land in the run usage), TestSubRunAccountsTokens (subagent
accounting), TestAddUsageAccumulatesSplitFields (handle chain); pins
carry Agent-Native#35/#37/#38/#39, Agent-Squad#41, Core Usage fields.
Impact: run.Usage carries Last*/cache on every path; subagent runs are
accounted; runtime.llmRetries maps onto the library default (setting 0
disables via -1); the verifier wraps retry+fallback explicitly; retry
events surface as process parts.
Refs: Agent-Native#35-#39, Agent-Squad#41, N3 plan WP6
2026-10-07 17:17:56 +00:00
weichen e5034e177d Merge pull request 'Wire the memory port: store-backed adapter, loop injection, migration parity (N3 WP5)' (#95) from feature/n3-memory-wp5 into main
ci / vet-and-test (push) Successful in 41s
Wire the memory port: store-backed adapter, loop injection, migration parity (N3 WP5)
2026-10-07 16:24:58 +00:00
weichen 766a96e817 Wire the memory port: store-backed adapter, loop injection, migration parity (N3 WP5)
ci / vet-and-test (pull_request) Successful in 41s
Why: memory recall lived as a product-side interface assertion with no
library port, AgentSpec.MemoryScope had no consumer, and the model had
no write-back path. The port (Agent-Native#34) now exists; the product
adapts it over memory_entries.
Evidence: go test -count=1 ./... green; TestStoreMemoryRecallScopeAndLimit
(scope filters and limit), TestStoreMemoryAppendRoundtrip (project
context inheritance), TestRunCtxStoreMemory (runCtx outlet),
TestDirectRunInjectsMemoryBlock (the [记忆] block reaches the request
with the pre-migration text shape and deterministic order).
Impact: assembly-side injection removed (the loop injects per request
— same text, no duplication); memory_write available on the kernel
path; recall defaults to all scopes (pre-migration semantics), with
AgentSpec.MemoryScope narrowing where hosts pass it.
Refs: Agent-Native#34, Agent-Squad#38, N3 plan WP5
2026-10-07 16:23:24 +00:00
weichen 80a7468523 Merge pull request 'Take the checkpoint closure: retention on rewind, HTTP tests, eligibility pin (N3 WP3)' (#94) from feature/n3-checkpoint-wp3 into main
ci / vet-and-test (push) Successful in 42s
Take the checkpoint closure: retention on rewind, HTTP tests, eligibility pin (N3 WP3)
2026-10-07 16:00:33 +00:00
weichen f862892544 Take the checkpoint closure: retention on rewind, HTTP tests, eligibility pin (N3 WP3)
ci / vet-and-test (pull_request) Successful in 42s
Why: the library now pins eligibility, guards symlinks, reports partial
restores, and bounds the log (Agent-Native#33); the product wires
retention after successful rewinds and needed the HTTP-layer and
eligibility evidence.
Evidence: go test -count=1 ./... green; TestRewindFilesHTTPHappy and
TestRewindFilesHTTPBusy409 (HTTP happy + conflict),
TestBackendCheckpointEligibilityIsWriteFileOnly (the product surface
checkpoints exactly {fs_write_file}).
Impact: checkpoints.jsonl is compacted to the latest 200 anchors after
each successful rewind.
Refs: Agent-Native#33, Agent-Squad#37, N3 plan WP3
2026-10-07 15:59:14 +00:00
weichen c392ed81ee Merge pull request 'Wire GenAI telemetry: settings surface, service name, and agent names (N3 WP4)' (#93) from feature/n3-otel-wp4 into main
ci / vet-and-test (push) Successful in 44s
Wire GenAI telemetry: settings surface, service name, and agent names (N3 WP4)
2026-10-07 15:42:21 +00:00
weichen 904742ca4b Wire GenAI telemetry: settings surface, service name, and agent names (N3 WP4)
ci / vet-and-test (pull_request) Successful in 40s
Why: spans now follow the OTel GenAI convention (Agent-Native#32); the
product needs the settings surface for the exporter, a meaningful
service.name, and per-profile agent names.
Evidence: go test -count=1 ./... green; TestTelemetryFlagsDefaults
(otlpEndpoint registered default empty = no export, serviceName
default agent-system-backend); nested pins carry the convention work.
Impact: nothing is exported unless telemetry.otlpEndpoint (or the env
var) is set; agent spans are named by profile id.
Refs: Agent-Native#32, Agent-Squad#36, N3 plan WP4
2026-10-07 15:41:01 +00:00
weichen dcd7c9a444 Merge pull request 'Give conversation runs the intent journal via JournalOnly sessions (N3 WP2)' (#92) from feature/n3-session-wp2 into main
ci / vet-and-test (push) Successful in 40s
Give conversation runs the intent journal via JournalOnly sessions (N3 WP2)
2026-10-07 15:27:47 +00:00
weichen 9f3fdb26e2 Give conversation runs the intent journal via JournalOnly sessions (N3 WP2)
ci / vet-and-test (pull_request) Successful in 42s
Why: the product conversation path had zero mid-turn durability
(llm_direct ran without Session — intents, recovery pairing, and
side-effect replay semantics never applied). Transcript-as-authority
would have frozen the assembled prefix, so the journal is wired in
JournalOnly mode: recovery runs against the transcript, the context
stays on the ctxasm pipeline, and recovered outcomes inject as a
system note.
Evidence: go test -count=1 ./... green;
TestDirectRunPairsAfterKillSeed (crash-window transcript gets the
crashInterrupted pair, run proceeds) and
TestDirectRunSeedsStoreHistoryOnce (history appears exactly once in
every request, never enters the journal); the forged-marker and
harness suites pass unchanged.
Impact: conversation runs now journal tool intents and recover them on
the next run; no transparent resume (sealed interrupted stays; the
user keeps chatting). Opening the transcript fails soft (falls back to
the old no-session behavior).
Refs: Agent-Native#31, Agent-Squad#35, N3 plan WP2
2026-10-07 15:26:27 +00:00
weichen 7a6a6075c2 Merge pull request 'Resume gracefully-interrupted subagents and take the RunState repair pins (N3 WP1)' (#91) from feature/n3-runstate-wp1 into main
ci / vet-and-test (push) Successful in 41s
Resume gracefully-interrupted subagents and take the RunState repair pins (N3 WP1)
2026-10-07 15:08:58 +00:00
weichen 1770fac51f Align the forged-marker guard test with the N6 semantics
ci / vet-and-test (pull_request) Successful in 50s
Why: Stop.Replacement no longer rewrites the in-memory assistant; the
correction reaches the model as a user note. The guard's protective
intent is unchanged (forged body never replays as assistant speech).
Evidence: go test -count=1 ./... green.
Impact: test only.
Refs: Agent-Native#30, N3 plan WP1
2026-10-07 15:06:58 +00:00
weichen 97bc5093bd Resume gracefully-interrupted subagents and take the RunState repair pins (N3 WP1)
Why: InterruptRunning wrote done.json{status:interrupted} for every
child, and ResumeInterruptedChildren skipped anything with done.json —
graceful shutdowns never resumed (only SIGKILL-style deaths did). done
markers now split by status: terminal states block resume, interrupted
does not. Nested pins carry repairOrphanTail and the N6 fix.
Evidence: go test -count=1 ./... green; TestResumeAfterGracefulInterruptMarker
(resumed once and only once), TestResumeSkipsCompletedMarker (terminal
states still block).
Impact: after any restart, interrupted children with a stored request
re-spawn exactly once regardless of how the process stopped.
Refs: Agent-Native#30, Agent-Squad#34, N3 plan WP1
2026-10-07 15:05:57 +00:00
weichen 7980a8a219 Merge pull request 'Give subagents per-run transcripts, resume, persisted notices, and the Background request field (N2 WP5)' (#90) from feature/n2-subagent-wp5 into main
ci / vet-and-test (push) Successful in 45s
Give subagents per-run transcripts, resume, persisted notices (N2 WP5)
2026-10-07 14:25:04 +00:00
weichen 358cfe017c Give subagents per-run transcripts, resume, persisted notices, and the Background request field (N2 WP5)
ci / vet-and-test (pull_request) Successful in 54s
Why: child runs had no independent transcript, no resume path (sealed
interrupted only), in-memory completion notices lost on restart, and
the subagent Background declaration had no consumer.
Evidence: go test -count=1 ./... green; TestSubagentTranscriptFilesWritten
(request/transcript/done files), TestResumeInterruptedChildrenRespawns
(re-spawn with original task + transcript-path hint, resumed.json
idempotent), TestNoticesPersistAndRedeliverAfterRestart (persist →
reload → deliver → delete), migration v17 pending_notices with up/down
on both dialects.
Impact: per-run transcript dirs under the workspace root (auxiliary,
write failures never abort spawns); interrupted children with a stored
request re-spawn as background runs at startup (pre-WP5 runs stay
sealed); notices survive restart; delegate factory honors
Request.Background with a sync fallback when the host lacks background
support.
Refs: Agent-Native#29, Agent-Squad#33, N2 plan WP5
2026-10-07 14:23:39 +00:00
weichen b44f78b09a Merge pull request 'Validate plugin and bundled skills against the open spec (N2 WP4)' (#89) from feature/n2-skills-wp4 into main
ci / vet-and-test (push) Successful in 51s
Validate plugin and bundled skills against the open spec (N2 WP4)
2026-10-07 13:58:47 +00:00
weichen df6745e820 Point the nested native and squad pins at the skills spec validation
ci / vet-and-test (pull_request) Successful in 41s
Why: internal/skills/validate.go calls ValidateSkillDocument, which
only exists on agent-native main after #28; the pin must move for CI
to build the new code.
Evidence: nested pins at 7425b32b / 9d3faefb (merged mains).
Impact: none beyond the pins.
Refs: Agent-Native#28, Agent-Squad#32
2026-10-07 13:57:52 +00:00
weichen 48c5202de2 Validate plugin and bundled skills against the open spec (N2 WP4)
Why: plugin skills were written to the skill root unvalidated and the
bundled recipes carried no name — both now go through the library's
spec validator (name required + kebab-case + equals dir, description
required, known-keys whitelist).
Evidence: go test -count=1 ./... green; TestV2InvalidSkillRejected pins
the fail-closed path with plugin context + field location; Seed
validates each SKILL.md before write (recipes dogfood-compliant);
nested pins carry agent-native#28 (the validator).
Impact: invalid plugin skills now abort the plugin load with a located
error instead of landing silently; the architecture baseline gains
backend/plugins→backend/skills.
Refs: Agent-Native#28, Agent-Squad#32, N2 plan WP4
2026-10-07 13:57:17 +00:00
weichen 1291b378c0 Merge pull request 'Point the nested native and squad pins at the MCP 2026-07-28 work' (#88) from feature/n2-wp3-cascade into main
ci / vet-and-test (push) Failing after 45s
Point the nested native and squad pins at the MCP 2026-07-28 work
2026-10-07 13:43:33 +00:00
weichen 7365b4c471 Point the nested native and squad pins at the MCP 2026-07-28 work
ci / vet-and-test (pull_request) Successful in 46s
Why: native 77e7f978 (Agent-Native#27, N2 WP3) and the squad cascade
carry the MCP 2026-07-28 alignment; the nested pins follow for the Dev
combination check.
Evidence: go build + go test -count=1 ./... green on this combination.
Impact: none beyond the pins.
Refs: Agent-Native#27, Agent-Squad#31
2026-10-07 13:42:14 +00:00
weichen 5dfe70d68d Merge pull request 'Point the nested native and squad pins at the Anthropic client work' (#87) from feature/n2-wp2-cascade into main
ci / vet-and-test (push) Successful in 54s
Point the nested native and squad pins at the Anthropic client work
2026-10-07 13:26:33 +00:00
weichen 7aa3bc447d Point the nested native and squad pins at the Anthropic client work
ci / vet-and-test (pull_request) Successful in 44s
Why: native d6053baf (Agent-Native#26, N2 WP2) and squad 41ea2766
(Agent-Squad#30) carry the native Anthropic client; the nested pins
follow for the Dev combination check.
Evidence: go build + go test -count=1 ./... green on this combination.
Impact: none beyond the pins.
Refs: Agent-Native#26, Agent-Squad#30
2026-10-07 13:24:45 +00:00
weichen 8858ca9b8a Merge pull request 'Align context trimming to tool groups and take the N2 WP1 pins' (#86) from feature/n2-context-wp1 into main
ci / vet-and-test (push) Successful in 42s
Align context trimming to tool groups and take the N2 WP1 pins
2026-10-07 13:13:09 +00:00
weichen 7acbefd60d Align context trimming to tool groups and take the N2 WP1 pins
ci / vet-and-test (pull_request) Successful in 44s
Why: trimOldest dropped single messages without tool-pair awareness —
after leading users were evicted it could orphan tool results or leave
dangling calls (acceptance clause 2's product-side gap).
Evidence: go test -count=1 ./... green; TestTrimOldestKeepsToolPairs
(pairing holds across repeated trims), TestTrimOldestDropsLeadingOrphanToolRun,
TestTrimOldestStopsWhenGroupCrossesCurrentTurn, TestPrefixHashStableForIdenticalInput;
native pins carry the spill and cache-contract work (Agent-Native#25).
Impact: trimming now evicts whole tool groups; the window may be
slightly exceeded when a group would cross the current turn — pairing
is never broken. Report.Truncations still records the count.
Refs: Agent-Native#25, Agent-Squad#29, N2 plan WP1
2026-10-07 13:11:47 +00:00
weichen 68addfda05 Merge pull request 'Point the nested squad and native pins at the CWD-clean fix' (#85) from feature/native-cascade-follow into main
ci / vet-and-test (push) Successful in 42s
Point the nested squad and native pins at the CWD-clean fix
2026-10-07 11:52:29 +00:00
weichen fcf2c73589 Point the nested squad and native pins at the CWD-clean fix
ci / vet-and-test (pull_request) Successful in 43s
Why: native ead690be keeps workspace-less requests out of the process
CWD (the Dev CI build step requires a clean tree after make test);
squad 029edc08 carries it.
Evidence: go build + go test ./... green on this combination.
Impact: none beyond the pins.
Refs: Agent-Native#24, Agent-Squad#28, Agent-System-Dev#242
2026-10-07 11:51:11 +00:00
weichen 33e261b224 Merge pull request 'Point the nested squad and native pins at the I2 cascade' (#84) from feature/agent-stack-i2-cascade into main
ci / vet-and-test (push) Successful in 46s
Point the nested squad and native pins at the I2 cascade
2026-10-07 11:34:20 +00:00
weichen fb90e6239a Point the nested squad and native pins at the I2 cascade
ci / vet-and-test (pull_request) Successful in 44s
Why: squad main (551e11ec) and native main (3a1ad5a) now carry the
nested agent-intent 343b1e6 pins the Dev combination check requires;
the backend nested copies follow.
Evidence: go build ./... green on this combination; trees identical
to the merged library mains.
Impact: none beyond the pins.
Refs: Agent-Squad#27, Agent-Native#23, I2 increment 3 cascade
2026-10-07 11:33:14 +00:00
weichen 9d2937115c Merge pull request 'Wire the intent slow lane behind settings flags (I2 WP3)' (#83) from feature/agent-stack-i2 into main
ci / vet-and-test (push) Successful in 40s
Wire the intent slow lane behind settings flags (I2 WP3)
2026-10-07 11:23:57 +00:00
weichen 3f5c0f60e4 Point the nested agent-intent pin at the I2 port work
ci / vet-and-test (pull_request) Successful in 43s
Why: the slow-lane wiring references SemanticScorer/CommandGenerator,
which only exist on agent-intent main after #9/#10; the pin must move
for CI to build the new packages.
Evidence: deps/agent-intent now at 343b1e6 (merged main).
Impact: none by itself.
Refs: Agent-System-Backend#83, I2 increment 3
2026-10-07 11:22:58 +00:00
weichen 45b011af9f Wire the intent slow lane behind settings flags (I2 WP3)
ci / vet-and-test (pull_request) Failing after 34s
Why: I2 increments 1-2 shipped the agent-intent ports (SemanticScorer,
CommandGenerator); the backend still had no implementation, so the slow
lane could not be enabled in the product.
Evidence: go test ./... green; lint-boundaries ok; the two new
runtime.intentSemantic / runtime.intentGenerator flags are registered
with default false and the gate defaults to the I1 recognizer when both
are off (TestIntentSlowLaneFlagsDefaultOff, TestGate*).
Impact: no behavior change by default; enabling runtime.intentSemantic
routes ambiguous rule matches through embedding cosine scoring, and
runtime.intentGenerator lets the lightweight model propose commands on
fallback with library-side fail-closed validation. Nested agent-intent
pin moves to 343b1e6 (I2 increments 1-2).
Refs: I2 increment 3
2026-10-07 11:20:41 +00:00
weichen 3261135126 Merge pull request 'Point the nested agent-squad pin at the SQLite convergence' (#82) from feature/agent-stack-q1 into main
ci / vet-and-test (push) Successful in 40s
2026-10-07 10:33:02 +00:00
weichen 3de400b740 Point the nested agent-squad pin at the SQLite convergence
ci / vet-and-test (pull_request) Successful in 40s
Why: Agent-Squad PR #26 landed the SQLite Store, single-DB mounting
and the Executor-port fix; backend must carry the same head or Dev
check-pins fails.

Evidence: backend suite 30 packages ok at this combination.

Impact: Nested squad pin only.
2026-10-07 10:32:16 +00:00
weichen 5883d10889 Merge pull request 'Point the nested agent-squad pin at the Store and termination work' (#81) from feature/agent-stack-q1 into main
ci / vet-and-test (push) Successful in 41s
2026-10-07 10:03:14 +00:00
weichen 58d9a17b8a Point the nested agent-squad pin at the Store and termination work
ci / vet-and-test (pull_request) Successful in 42s
Why: Agent-Squad PR #25 landed the Store port, tiered checkpoints
and the termination registry; backend must carry the same head or
Dev check-pins fails.

Evidence: backend suite 30 packages ok at this combination.

Impact: Nested squad pin only.
2026-10-07 10:02:28 +00:00
weichen 7ea21c3ca2 Merge pull request 'Point the nested agent-squad pin at the attempt-id recovery' (#80) from feature/agent-stack-q1 into main
ci / vet-and-test (push) Successful in 42s
2026-10-07 09:20:29 +00:00
weichen 15fb79e30e Point the nested agent-squad pin at the attempt-id recovery
ci / vet-and-test (pull_request) Successful in 41s
Why: Agent-Squad PR #24 landed attempt ids and product-checked
interrupted recovery; backend must carry the same head or Dev
check-pins fails.

Evidence: backend suite 30 packages ok at this combination.

Impact: Nested squad pin only.
2026-10-07 09:19:43 +00:00
weichen a59980898f Merge pull request 'Point the nested agent-squad pin at the superstep engine' (#79) from feature/agent-stack-q1 into main
ci / vet-and-test (push) Successful in 40s
2026-10-07 09:09:54 +00:00
weichen 617a4566be Point the nested agent-squad pin at the superstep engine
ci / vet-and-test (pull_request) Successful in 41s
Why: Agent-Squad PR #23 landed the superstep engine; backend must
carry the same squad head or Dev check-pins fails.

Evidence: backend suite 30 packages ok at this combination.

Impact: Nested squad pin only.
2026-10-07 09:09:08 +00:00
weichen 6f27567acd Merge pull request 'Point the nested agent-squad pin at the native-archive cascade head' (#78) from feature/agent-stack-i1 into main
ci / vet-and-test (push) Successful in 41s
2026-10-07 08:34:58 +00:00
weichen 64e80c9bb6 Merge origin/main into the I1 backend branch
ci / vet-and-test (pull_request) Successful in 42s
2026-10-07 08:31:44 +00:00
weichen 40ebca7f07 Point the nested agent-squad pin at the native-archive cascade
ci / vet-and-test (pull_request) Successful in 41s
Why: Squad PR #22 landed the nested native bump; backend must
carry the same squad head or Dev check-pins fails.

Evidence: squad main head is the #22 merge.

Impact: Nested squad pin only.
2026-10-07 08:28:45 +00:00
weichen 12f50ef2dc Merge pull request 'Point the nested pins at the eval-v2 combination' (#77) from feature/agent-stack-i1 into main
ci / vet-and-test (push) Successful in 42s
2026-10-07 08:26:13 +00:00
weichen 0a26fb598b Point the nested pins at the eval-v2 combination
ci / vet-and-test (pull_request) Successful in 41s
Why: Agent-Intent PR #8 and its cascades (Squad #21, Native #22)
landed; backend's nested pins must carry those heads or Dev
check-pins fails.

Evidence: backend suite 30 packages ok at this combination.

Impact: Three nested gitlinks.
2026-10-07 08:25:27 +00:00
weichen 07250a221a Merge pull request 'Project the command types through the intent gate surface' (#76) from feature/agent-stack-i1 into main
ci / vet-and-test (push) Successful in 40s
2026-10-07 07:59:08 +00:00
weichen 517ae236b3 Project the command types through the intent gate surface
ci / vet-and-test (pull_request) Successful in 42s
Why: The boundary linter allows agent-intent imports only in the
adapter layer; route and runmgr consume aliases from intentgate
instead of importing the ecosystem library directly.

Evidence: lint-boundaries passes below; backend suite green.

Impact: intentgate re-exports Command/ActionRef and the kind
constants; route drops the agent-intent import.
2026-10-07 07:58:05 +00:00
weichen a70b5a2f6a Merge pull request 'Point the nested pins at the I1 router combination' (#75) from feature/agent-stack-i1 into main
ci / vet-and-test (push) Successful in 42s
2026-10-07 07:51:22 +00:00
weichen 6c7563bd15 Point the nested pins at the I1 router combination
ci / vet-and-test (pull_request) Successful in 41s
Why: Squad PR #20 and Agent-Native PR #21 completed the intent
cascade; backend's nested pins must carry those heads or Dev
check-pins fails.

Evidence: squad and native heads are direct merges on their mains;
backend suite green before the pin bump.

Impact: Two nested gitlinks.
2026-10-07 07:50:04 +00:00
weichen 4da3cfc787 Merge pull request 'Unify intent routing behind the route package and enable NFKC (I1 WP3/WP4)' (#74) from feature/agent-stack-i1 into main
ci / vet-and-test (push) Successful in 42s
2026-10-07 07:46:07 +00:00
weichen ff43c7c9aa Unify intent routing behind the route package and enable NFKC
ci / vet-and-test (pull_request) Successful in 41s
Why: I1 WP3 - chat routing and the HITL free-text pivot now share one
router consuming the library's command list, and both intent hosts
fold compatibility-equivalent input.

Evidence: go vet clean; go test ./... 30 packages ok, including the
existing workflow-route and server e2e suites unchanged (behavior
parity) and the new route package tests.

Impact: new internal/route package (unique router with explicit
priority rules); intentgate carries Commands and folds NFKC;
server.go and runmgr.go route through it; nested pins at intent
2554b50 and squad 6b7a991. Blueprint actions resolve to a squad
decision at the router level; per-run squad entry stays a recorded
follow-up (no silent misrouting).

Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md I1 WP3/WP4
2026-10-07 07:44:31 +00:00