Commit Graph

457 Commits

Author SHA1 Message Date
Hypatia May
06e0450b8d fix(token-meter): keep pressure anchors conservative 2026-07-16 15:26:30 +08:00
Dudu-0223
3bed1a644f Merge origin/master into parallel-tool-call 2026-07-16 14:56:02 +08:00
Hypatia May
6d96b3e4a8 refactor(token-meter): merge measurement snapshots (round 1) 2026-07-16 14:38:24 +08:00
Dudu-0223
91da66e715 refactor(agent-loop): simplify parallel tool-call cap config 2026-07-16 14:36:16 +08:00
Hypatia May
5c243e8a8d refactor(token-meter): simplify singleton service (round 1) 2026-07-16 12:58:07 +08:00
Hypatia May
2793325df0 refactor(compact): store tool-pairing balance once per surface cut
toolPairingBalancedAfter previously answered by resolving a cached
positional successor and reading its before-balance, with a null-successor
depth fallback. Both queries are the same prefix property sampled at
adjacent cuts, so the cache now holds one per-cut balance sequence
(N nodes -> N+1 cuts) plus a seq->position index; before/after differ
only by a cut offset. The successor map, the duplicate rebuild/extend
fold loops, and the non-null assertion are gone, and the running counter
is named inProgressToolCalls. Docs describing the successor mechanism
are updated in place.
2026-07-16 11:42:17 +08:00
Dudu-0223
3b1d1bfa12 refactor(agent-loop): unify tool-call scheduling on one rolling pool + factory cap default
Run every ordered group through the same rolling pool: an exclusive call is a
pool of one (a barrier), dropping the separate runExclusive path and the
redundant post-grouping executionMode re-query. Behavior is unchanged — the
parallel-tool-calls snapshot and the full scheduler unit suite (barriers, cap,
abort, model-order results) stay green.

Add AgentLoop.Config.maxParallelToolCalls as a factory-wide default applied to
every agent create/createAgent/resume mints (per-agent option overrides it),
forwarded through agent-core so it reaches front doors that expose no cap field
of their own. Trim the isConcurrencySafe JSDoc to the local contract and link
the parallel-tool-call RFC for the full rationale; document the field on the
canonical core-data-structures page.
2026-07-16 11:36:16 +08:00
Hypatia May
da48435e8c Merge remote-tracking branch 'origin/token-meter-service' into compact-post-step-overflow-recovery
# Conflicts:
#	docs/architecture.md
2026-07-16 10:14:33 +08:00
Hypatia May
8d0d9bdd1d Merge remote-tracking branch 'origin/compact-tool-pairing' into token-meter-service
# Conflicts:
#	docs/capability-seams.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
2026-07-16 10:04:17 +08:00
Hypatia May
3cccecee0a Merge remote-tracking branch 'origin/master' into compact-tool-pairing
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-16 09:55:02 +08:00
Hypatia May
8184332918 Merge remote-tracking branch 'origin/master' into session-query-trace
# Conflicts:
#	packages/README.md
#	packages/support/invariants/src/index.ts
2026-07-16 09:55:02 +08:00
hypatiamay
5dd37a4f99 Merge branch 'master' into debug-pangwenjie 2026-07-16 09:49:28 +08:00
Tianyi Cui
c3c4197040 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop
# Conflicts:
#	packages/bash/tool-bash/src/index.ts
#	packages/bash/tool-bash/tests/integration.spec.ts
#	packages/ui/acp/README.md
2026-07-15 23:34:17 +08:00
Tianyi Cui
694e323403 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	examples/acp-agent/tests/snapshots/escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-rejected/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/session.jsonl
#	packages/ui/acp/README.md
2026-07-15 23:32:16 +08:00
Tianyi Cui
6143537d4e Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/bash.md
#	docs/core-data-structures/core.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/bash/bash/src/types.ts
#	packages/bash/tool-bash/README.md
#	packages/bash/tool-bash/src/index.ts
#	packages/bash/tool-bash/tests/tools.spec.ts
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/tests/agent-core.spec.ts
#	packages/subagent/tool-subagent/tests/tool-subagent.spec.ts
#	packages/util/brand/README.md
#	packages/util/brand/src/index.ts
2026-07-15 23:29:47 +08:00
Tianyi Cui
8d0787fbb7 Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-15 23:21:00 +08:00
Tianyi Cui
08dbb74ce1 Merge remote-tracking branch 'origin/master' into codex/simp-session-log-representation
# Conflicts:
#	docs/tool-catalog.md
#	examples/acp-agent/tests/snapshots/escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-rejected/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/session.jsonl
#	examples/acp-agent/tests/snapshots/permission-switching/session.jsonl
#	examples/acp-agent/tests/snapshots/permission-switching/system-prompt.golden.md
2026-07-15 23:18:26 +08:00
Tianyi Cui
6c846531e7 Merge current master into PR #106 2026-07-15 22:44:47 +08:00
Tianyi Cui
b06ae91fa8 fix(tasks): address task API review feedback
The public kill result used the awkward phrase already-terminal. Rename it to already-finished and keep the model-facing response aligned; not-alive would be inaccurate because a force-failed registry record can still correspond to orphaned producer work.

Task kinds were open strings even though producer namespaces are an extension point. Add the merge-extensible TaskKindMap and derived TaskKind, cover consumer declarations in task and bundle tests, and retain the runtime non-empty check for untyped callers.

With exactOptionalPropertyTypes, owner?: Agent | undefined allowed an explicit undefined value that no caller needs. Tighten the property to owner?: Agent so unowned work is expressed by omitting it.

Record the requested task-service/backend split as a follow-up, using a systemd-backed runtime as a concrete candidate without guessing its durability and ownership contract in this PR. Regenerate the type and Cordis catalogs so public docs match the declarations.
2026-07-15 21:45:30 +08:00
Tianyi Cui
8bb8ac8b3c docs(tasks): condense background task prose
The background-task change repeated its lifecycle design across implemented RFCs, package READMEs, JSDoc, test commentary, and model-visible schemas. That repetition obscured the contracts that maintainers must preserve and added avoidable prompt tokens.

Rewrite the implemented RFCs around the current design, keep authorization, exact-owner cleanup, wait/abort ordering, producer quiescence, and teardown-failure guarantees at their owning surfaces, and remove peer surveys, review history, control-flow narration, and emphatic restatement.

Shorten the task and subagent schema wording, synchronize the bilingual tool cookbook, and regenerate the config, service, RFC, tool, and replay snapshot derivatives. Runtime behavior is unchanged; test edits update prose-only assertions and descriptions.
2026-07-15 21:08:58 +08:00
Yichen Jiang
f47a87fcf5 Merge remote-tracking branch 'origin/master' into worktree/provider-routed-llm-adapters
# Conflicts:
#	docs/config-catalog.md
#	packages/examples/acp-demo/tests/acp-agent.spec.ts
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/src/index.ts
#	packages/examples/stdio-demo/tests/stdio-agent.spec.ts
2026-07-15 20:14:09 +08:00
Tianyi Cui
3460f9c10b Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-15 17:26:29 +08:00
Tianyi Cui
6ee2655cab Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-15 17:26:29 +08:00
Tianyi Cui
9035ef1f98 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-15 17:26:29 +08:00
Tianyi Cui
8eccd5416e Document restored compaction result fields 2026-07-15 17:26:28 +08:00
Tianyi Cui
92bf506fb0 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop
# Conflicts:
#	docs/config-catalog.md
#	packages/core/README.md
2026-07-15 17:06:39 +08:00
Tianyi Cui
3d26e83930 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue
# Conflicts:
#	AGENTS.md
#	knip.json
#	packages/ui/jsonrpc/README.md
#	scripts/run-gates.ts
2026-07-15 17:06:13 +08:00
Yichen Jiang
ff3d893f74 Merge remote-tracking branch 'origin/master' into codex/project-instruction-files
# Conflicts:
#	AGENTS.md
#	docs/config-catalog.md
#	docs/module-graph.md
#	examples/echo-agent/composition.md
#	packages/README.md
#	packages/core/README.md
#	packages/examples/acp-demo/package.json
#	packages/examples/acp-demo/src/index.ts
#	packages/examples/acp-demo/tests/acp-agent.spec.ts
#	packages/examples/acp-demo/tests/built-bin.e2e.ts
#	packages/examples/acp-demo/tsconfig.json
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/package.json
#	packages/examples/agent-spine-demo/tests/agent-core.spec.ts
#	packages/examples/stdio-demo/package.json
#	packages/examples/stdio-demo/src/index.ts
#	packages/examples/stdio-demo/tests/built-bin.e2e.ts
#	packages/examples/stdio-demo/tests/stdio-agent.spec.ts
#	packages/examples/stdio-demo/tsconfig.json
#	pnpm-lock.yaml
#	python/sdk-runtime/README.i18n.yaml
#	python/sdk-runtime/src/deepseek_harness_runtime/runtime/cordis.yml
#	python/sdk/tests/test_bundled_runtime.py
2026-07-15 17:04:16 +08:00
Hypatia May
dffe51dbf0 Merge token-meter-service into compact-post-step-overflow-recovery
# Conflicts:
#	docs/cookbook/extension-cookbook.i18n.yaml
2026-07-15 17:03:46 +08:00
Tianyi Cui
5ef3dd979f Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/config-catalog.md
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/module-graph.md
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/src/index.ts
#	pnpm-lock.yaml
2026-07-15 17:01:59 +08:00
Hypatia May
9d8f81c8e0 Merge compact-tool-pairing into token-meter-service
# Conflicts:
#	examples/coding-agent/composition.md
#	pnpm-lock.yaml
2026-07-15 16:57:53 +08:00
Tianyi Cui
3ce477123c Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-15 16:57:39 +08:00
Yichen Jiang
306b79fa2c Merge remote-tracking branch 'origin/master' into codex/rfc-subagent-background-tasks
# Conflicts:
#	docs/config-catalog.md
#	docs/module-graph.md
#	examples/coding-agent/README.md
#	examples/coding-agent/cordis.yml
#	packages/README.md
#	packages/examples/acp-demo/README.md
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/package.json
#	packages/examples/agent-spine-demo/src/index.ts
#	packages/examples/stdio-demo/README.md
#	pnpm-lock.yaml
#	scripts/doc-budgets.manifest.json
#	scripts/verify-package-readme-model-experience.ts
2026-07-15 16:57:03 +08:00
Tianyi Cui
7d4fd14a1c Merge remote-tracking branch 'origin/master' into codex/simp-session-log-representation
# Conflicts:
#	docs/rfc/implemented/feature/2026-07-14-time-context-plugin.i18n.yaml
2026-07-15 16:56:04 +08:00
Yichen Jiang
20572f8468 Merge remote-tracking branch 'origin/master' into codex/agent-session-jsonl-location
# Conflicts:
#	docs/config-catalog.md
#	docs/module-graph.md
#	packages/README.md
#	packages/examples/acp-demo/README.md
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/stdio-demo/README.md
#	pnpm-lock.yaml
2026-07-15 16:53:56 +08:00
Hypatia May
94346513ec Merge origin/master into compact-tool-pairing 2026-07-15 16:52:50 +08:00
Hypatia May
12484104c8 feat(compact): recover context overflow (PR3 phase 2) 2026-07-15 16:50:44 +08:00
imccyu
6f77da4c8c refactor: relocate demo app bundles to packages/examples/*-demo
Move the agent-spine bundle and the stdio/ACP/JSON-RPC app packages out of
core/ and ui/ into a new packages/examples/ group, renamed with a -demo
suffix so the npm name marks them as non-product surface:

  core/agent-core   -> examples/agent-spine-demo  (dsh-agent-spine-demo)
  ui/stdio-agent    -> examples/stdio-demo        (dsh-stdio-demo)
  ui/acp-agent      -> examples/acp-demo          (dsh-acp-demo)
  ui/jsonrpc-agent  -> examples/jsonrpc-demo      (dsh-jsonrpc-demo)

Update every code/config/test reference and reference-only doc mentions, and
regenerate module-graph, config-catalog, and doc-graphs. The jsonrpc bin
(dsh-jsonrpc-agent) and single-file exe (dsh-jsonrpc-agent-pkg) keep their
names; the SDK runtime-startup surface is reconciled separately.
2026-07-15 16:46:05 +08:00
Tianyi Cui
9082cebc56 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-15 16:27:37 +08:00
Tianyi Cui
debd4ae5c8 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/module-graph.md
2026-07-15 16:26:12 +08:00
Tianyi Cui
6d1870c8c1 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/bash/tool-bash/src/index.ts
#	packages/ui/stdio-agent/README.md
#	packages/ui/stdio-agent/src/index.ts
#	packages/ui/stdio/src/index.ts
#	packages/workflow/workflow-workerthread/tests/workflow-workerthread.spec.ts
#	packages/workflow/workflow/package.json
#	scripts/gen-doc-graphs.ts
2026-07-15 16:24:43 +08:00
Tianyi Cui
551b665d0f Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-15 16:05:02 +08:00
Hypatia May
e8d066f750 feat(core): add post-step request recovery (PR3 phase 1) 2026-07-15 16:03:52 +08:00
Tianyi Cui
281eed3e57 Merge remote-tracking branch 'origin/master' into codex/simp-session-log-representation
# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/rfc/INDEX.md
#	docs/rfc/implemented/testing/2026-07-06-pin-request-header-content-in-one-scenario.md
#	docs/rfc/proposed/simplification/2026-07-12-simplify-session-log-representation.md
#	packages/support/acp-snapshot/README.md
#	packages/support/acp-snapshot/src/normalize.ts
#	packages/support/acp-snapshot/src/suite.ts
#	packages/support/acp-snapshot/tests/fixtures/suite/pin-turn/session.jsonl
#	packages/support/acp-snapshot/tests/suite.spec.ts
2026-07-15 15:53:56 +08:00
Yichen Jiang
162da52082 Merge branch 'master' into worktree/provider-routed-llm-adapters 2026-07-15 15:42:19 +08:00
Hypatia May
a2adaf8087 Merge remote-tracking branch 'origin/master' into debug-pangwenjie 2026-07-15 15:38:20 +08:00
Yichen Jiang
17511ea0d8 Merge branch 'master' into codex/rfc-subagent-background-tasks 2026-07-15 15:33:53 +08:00
Hypatia May
9cddfe7fd7 Merge remote-tracking branch 'origin/master' into debug-pangwenjie
# Conflicts:
#	docs/event-producer-consumer.md
#	packages/core/agent-loop/src/loop.ts
2026-07-15 15:31:27 +08:00
Hypatia May
e55e96eec6 Merge compact-tool-pairing into token-meter-service
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-15 15:27:10 +08:00
Hypatia May
63330ac638 Merge origin/master into compact-tool-pairing
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-15 15:24:59 +08:00