120 Commits
Author SHA1 Message Date
Dudu-0223 e103591fd5 fix(subagent): address model selection review feedback 2026-10-14 13:40:25 +08:00
Dudu-0223 11bfb04081 Merge master and reconcile subagent preset and model selection 2026-10-14 13:09:34 +08:00
Dudu-0223 8fa8e9167d refactor(subagent): separate model discovery and session authorization 2026-10-13 11:42:31 +08:00
Dudu-0223 648ab5167e refactor(subagent): compose new children through presets 2026-10-09 12:12:02 +08:00
Dudu-0223 a9afe76200 feat(subagent): select and restore presets for spawned agents 2026-10-09 00:13:17 +08:00
Dudu-0223 e3c0599a47 Merge master into refactor/agent-team-direct-steer 2026-10-08 14:54:48 +08:00
Tianyi Cui a3cb678875 Merge master current-directory support into subagent activations
Integrate the observed master checkpoint 7ab215e23e5d977aae7eb5d4fb91782d39969dbb without rewriting the earlier published checkpoints. Master adds current-directory events, directory-aware consumers, and retained Git worktrees; its old subagent startup paths overlapped the unified activation implementation.

Resolve directory selection within managed startup after acquiring parent ownership. Preserve the original Session origin while setting each new local child directory, retain persisted directory state on cold resume, and pass a required absolute cwd to external providers. Keep unified local/external ownership, full completion notices, parked-input host completion, SDK wait/error/shutdown behavior, and ACP cancellation semantics. Retain removal of the old in-process driver and continuation managers.

Combine SDK wait with the new directory requests, preserve the new master directory/worktree fixtures, regenerate derived catalogs from the combined sources, and refresh only the four stale prompt/schema sidecars. Preserve every protected historical schema, archived note, catalog-v2 acknowledgement, and recorded predecessor input.

Validation: full build; 59 CI static gates; 855 subagent tests with 100% coverage on changed core/external sources; affected consumer suites including 119 repaired-fixture tests; SDK 11 and headless 16 recorded scenarios; two local headless expected cases; six built nested SDK/ACP cases; lint, strict cast inventory, workspace constraints, and whitespace checks. Native Windows worker diagnostics remain additive and require the next CI run to classify the original crash.
2026-10-06 10:52:35 +08:00
Tianyi Cui b730d6c0c9 fix(subagent): let parked inboxes stop delaying host completion
Interrupting a local child can preserve unclaimed steering while leaving the Agent idle. Activation residency intentionally continues in that state, but completion barriers joined its result forever. The real SDK server reproduced the hang for both direct children and a nested parked leaf.

Join progressing work and cleanup while retaining parked inboxes and their activation results. Observe local activity and maintenance, external execution, unpublished ownership holds, and materialization; rescan after changes. Recheck resumed Agents after concurrent idle observations. Inbox insertion and ownership publication wake pending observations, so late non-waking injection cannot strand a result wait. Existing descendants remain responsible for their own work; no second state store or polling timer is introduced.

Document that persistent SDK/ACP hosts keep these children available for later wake-up, while headless shutdown discards unclaimed input. Simplify the final settlement recheck to retry changed readiness uniformly. Update generated API and event references from their sources.

Validation: real SDK negative controls fail at both depths on the prior manager with clean teardown; 545 tests pass across 27 files. Manager, local activation, and headless runner each reach 100% statements/branches/functions/lines. Six deterministic races cover revival, preparation publication/rollback, flush-time injection, and late children. doc-sync 42/42, targeted build, lint, and whitespace checks pass.
2026-10-06 03:07:24 +08:00
Tianyi Cui 1595e34656 docs(subagent): distinguish execution results from cleanup failure signals
The subsystem result paragraph still said that a parent log records the
final cleanup-failure status and that the result had already been returned.
The manager instead captures the execution result, performs cleanup, sends
that preserved result in the parent notice, and then resolves the public
result. Cleanup failure separately rejects dispose and marks the live
subagent/end event as error.

Correct the bilingual paragraph to name those actual recipients and timing.
Do not imply that the successful execution notice becomes a failed notice,
or change the runtime's independent execution/cleanup outcomes.

Validation: the updated bilingual pair passes. The statement is checked
against finishDisposal/notifySettlement and the existing cleanup-failure
regressions; final documentation gates run before publication.
2026-10-06 02:06:05 +08:00
Tianyi Cui 79bd3d8da7 feat(session): centralize working directories and directory context 2026-10-06 01:27:54 +08:00
Tianyi Cui b49deaa8ee docs(subagent): require runtime-wide external run identities
SubagentRun.id previously promised uniqueness only within one parent,
but the unified manager indexes every external activation by that id in
one runtime-wide resident map. Publication also checks the live Agent and
Session registries. Two compliant-looking provider results could therefore
collide even when they belonged to different parents.

Document the existing shared Session id namespace across all parents,
providers, and local Sessions. Update the package reference, bilingual
type-equivalent declaration, and the current upgrade guide so custom
providers know to replace parent-local counters with fresh execution ids.
The shipped ACP, DSH SDK, Codex, and Claude Code providers already mint
UUIDs; no runtime mapping or additional retained identity state is needed.

Add a cross-parent collision test through startActivation. It proves that
publication rejects the duplicate, disposes only the new external handle,
leaves the second parent catalog empty, and preserves the first catalog
entry and execution result through normal cleanup.

Validation: all seven external-lifecycle tests pass, as do scoped bilingual
pairing, verify-upgrade-guides, doc-sync, and full lint. Cordis catalog and
inspection-catalog regeneration produces no tracked artifact changes.
2026-10-06 00:25:47 +08:00
Tianyi Cui 51f4f1c49e docs(subagent): align residency documentation with activation receipts
The retained continuation decision still claims a public followup method,
a bare MessageId start result, no activation result/cancellation ownership,
and no human Queue/Steer operations. Those statements contradict the current
startActivation receipt and adjacent-Agent/host message operations already
documented in the same record. The subsystem introduction also says the
activation result can settle before cleanup, despite the manager resolving
that result after teardown and notification.

Correct the current realization in the English/Chinese active documents.
Keep the original single-inbox and residency rationale, distinguish accepted
message identity from the activation receipt, and state the actual result
and disposal timing. Do not change implementation, archived decisions,
provider-level result timing, or runtime APIs.

Validation: doc-sync passed 41 gates on the first run. Its remaining pairing
gate found one Chinese README target using the English locale; correct that
target, re-record the pair, and verify both changed pairs successfully.
2026-10-06 00:24:59 +08:00
Tianyi Cui 9dcc8fa985 Merge master into unified subagent activations
Integrate master 78ae4fc2d4d8ecaebb4b674028f781a358b92cc9 after the four
independent review fixes. Keep this base update separate from those fixes
and from subsequent review changes so the integration is independently
reviewable and the observed-master checkpoint remains preserved.

Retain activation-owned execution, caller-independent local discovery,
and unconditional parent final-answer delivery. Preserve master's preset
scoped scheduling tools and all delegated-child schedule deny rules. Move
the new scheduling regression from the removed driver package into the
surviving subagent package and run it through a real Spawn activation.

Preserve master's removal of runtime invariant plugins, dependencies,
exports, and test mounts. Keep context disposal before fixture directory
cleanup. Combine Python workflow ordering with activation/catalog events
without inventing unsupported source-plane import paths.

Keep all frozen Agent Note archives byte-for-byte identical to master;
do not accept Git's automatic edits to renamed archived notes. Retain
current lifecycle and delivery facts in active documentation, repair its
links, and regenerate catalogs/persistence schemas from merged source.
All 62 master persistence roots remain; only subagent/catalog gains the
PR's external membership extension. Keep master's third-party lock graph
and update only workspace dependency changes.

Validation before this checkpoint: 683 focused tests passed, seven
Windows-only cases skipped; 2,772 archived artifacts verified. Generated
catalog and active-pair checks passed. Fresh artifact build and remaining
build-dependent documentation checks continue before publication.
2026-10-05 23:49:47 +08:00
Tianyi Cui f52167746c fix(subagent): always return closing text in parent notices
A local child can have send_message available and still finish with a plain
text answer or use the tool only for progress. Selecting completion content
from tool availability drops that captured answer and leaves the parent
with a status-only notice. The recorded spawn case already demonstrates
this: its child returns CHILD_OK without calling the available tool.

Remove the includeClosingText policy and pass every captured final text
through the existing text-only notice renderer. Preserve structured
results, safe diagnostics, external continuation wording, and caller-only
result delivery. No delivery ledger or additional lifecycle state is
needed. A child that sends its final answer explicitly may repeat it in the
completion notice; that cost is preferable to making result delivery
depend on model compliance.

Extend the real-loop parent-result regression with an available-but-unused
messaging tool, restore the unconditional lifecycle expectation, and pin
text alongside structured results and diagnostics. The new regression
fails on the prior implementation because CHILD_RESULT_42 is missing.
Update the owning bilingual descriptions and the exact parent notice
content in headless and TypeScript SDK recordings. Keep replay streams,
released generations, and unrelated recorded clocks unchanged.

Validation: 317 focused lifecycle/workflow tests; full build; 26 focused
headless/SDK replays; Python SDK advanced/recovery smoke (unchanged
fixtures); test:docs (20 gates); doc-sync (42 gates); full lint;
git diff --check.
2026-10-05 23:33:51 +08:00
Tianyi Cui 63c1ea3491 fix(subagent): preserve caller-owned local child discovery
Caller delivery previously suppressed both settlement messages and local
catalog membership. Workflows therefore stopped publishing the durable
parent-child edge that the parent header and recursive discovery require.
The workflow panel only opens running members, and the ordinary sidebar
hides subagent Sessions, so completed workflow transcripts had no normal
navigation path even though their logs still existed.

Record every successfully admitted local child in its parent's catalog,
independently of the result recipient. Membership answers which local
Sessions belong to the parent; delivery answers who consumes this activation's
result. Keeping those decisions separate restores completed-child and
descendant discovery without duplicating workflow completion messages or
adding return guidance to caller-owned work. Publication failures retain
the existing rollback transaction for both delivery modes.

These local children intentionally retain the unified continuable mode:
list_agents includes them, the parent catalog opens their transcripts after
reload, and the existing direct-parent controls can cold-resume them. No
one-shot execution path or additional lifecycle state is introduced.
Caller-owned external executions still use their consumer's membership
records because they have no local Session to open.

Update the existing bilingual service/workflow documentation and decision
records, refresh the owning workflow/Ralph/advanced Session recordings and
Python SDK event expectations, and preserve unrelated recorded stream times.

Validation:
- Full repository build passed.
- 443 subagent, workflow-host, and Ralph tests; 14 list_agents tests passed.
- Four focused headless workflow/advanced snapshot refreshes and replays passed.
- Three shipped-Web workflow tests passed, including completed-child catalog
  navigation after reload and the continuable composer.
- Python SDK advanced and scheduler-recovery snapshots refreshed and replayed
  through the built dsh CLI with Python 3.12.
- Three discovery regressions fail with the original catalog exclusion and
  pass after restoring this fix.
- test:docs (20 gates), doc-sync (42 gates), lint:contracts-ready, Host and
  Client TypeScript builds, and git diff --check passed.
2026-10-05 23:32:33 +08:00
Turtle 819eb8078e Merge origin/master into turtle/remove-invariants-ccf1396aaf61 2026-10-01 16:33:09 +08:00
Tianyi Cui c7f66d13a6 docs(notes): prune redundant active decision records 2026-09-30 23:20:22 +08:00
Turtle f028f25667 refactor: remove runtime invariant plugins
Delete @deepseek-ai/dsh-invariants, every package's ./invariant companion
and its tests, the invariant gates and Vitest setup, the scoped-event
resolver generator, and the INVARIANT-coded listener rethrow paths.
Update docs, READMEs, Agent Notes, and add an upgrade guide.
2026-09-30 12:52:18 +08:00
Dudu-0223 3254ed611d Merge master and preserve catalog-recursive subagent discovery 2026-09-27 15:23:31 +08:00
Dudu-0223 c772c85c17 refactor(agent-team): send directly through Agent inbox steering 2026-09-26 16:52:54 +08:00
Dudu-0223 88500a0f3a fix(subagent): align catalog discovery docs and regression coverage 2026-09-24 16:30:58 +08:00
Dudu-0223 a4ddc28ed5 refactor(subagent): traverse descendant catalogs recursively 2026-09-24 15:49:55 +08:00
Dudu-0223 8b43d44cc6 refactor(subagent): limit discovery to parent-delivery children 2026-09-23 17:59:35 +08:00
Dudu-0223 4a569396c5 fix(subagent): validate providers and consolidate catalog writes 2026-09-23 17:39:34 +08:00
Dudu-0223 c17a1fa189 refactor(subagent): represent external catalog entries by mode 2026-09-21 15:03:34 +08:00
Dudu-0223 390fbe8852 refactor(subagent): merge orchestration and activation ownership 2026-09-21 11:58:14 +08:00
Dudu-0223 5ca7f533e1 refactor(subagent): own external runs without activation drivers 2026-09-21 11:09:41 +08:00
Dudu-0223 bb16d7d989 refactor(subagent): return listing promises directly 2026-09-21 10:49:20 +08:00
Dudu-0223 ef88d6a277 refactor(subagent): deliver activation results after teardown 2026-09-21 10:37:26 +08:00
Dudu-0223 1e00ab89a7 refactor(subagent): keep catalog entries as creation facts 2026-09-20 17:43:31 +08:00
Dudu-0223 307332baee Merge master and preserve compatible subagent catalog evolution 2026-09-20 17:35:18 +08:00
Dudu-0223 f3a69dff00 refactor(subagent): remove redundant state and settle local results after descendants 2026-09-20 17:27:05 +08:00
Dudu-0223 17a52a8fe3 fix(subagent): retain unreadable children in migrated catalogs 2026-09-20 14:30:02 +08:00
Dudu-0223 f44b78a622 fix(session): complete parent catalogs while isolating child failures 2026-09-20 12:09:57 +08:00
Dudu-0223 a9985b49ae fix(session): migrate historical subagents only when opened 2026-09-19 22:47:01 +08:00
Dudu-0223 d5a0f7dd68 fix(subagent): list only continuable children 2026-09-19 22:41:38 +08:00
Dudu-0223 955c9d255a fix(subagent): align catalog consumers and integration coverage 2026-09-19 21:04:01 +08:00
Dudu-0223 7e8591de1c refactor(subagent): rebuild activations on master with shared catalog 2026-09-19 20:39:43 +08:00
_KermanandTianyi Cui f4a32dbd0a refactor(llm): flatten tool results and validate native V4 sessions
Represent tool results as tool-role messages and migrate released wrappers
without losing outer own JSON fields, call identity, error state, or writer
field order. Refuse nested or wrapper-only information that has no lossless
current representation before successor publication.

Validate current event relationships directly instead of projecting V4 data
back into V3. Keep lifecycle, PTC, title/command, compaction, system-field and
retired-syntax checks on catalog restoration and ordinary JSONL opens. The
Worker JSON equality helper must inspect own keys so it cannot admit PTC
arguments that Node rejects.

Keep the source role change, required native admission and consumer fixture
updates in one complete review layer. Explain shared-type changes in the
persistence record and the native reader rationale in its existing note.
Use checked branded fixture identities and discriminant narrowing instead
of unknown double casts; fixture values and assertions remain intact.

This recomposes the original tool-role work by _Kerman with the independently
validated migration and admission repairs by Tianyi Cui. Frozen generations
and snapshot input version selection are retained.

Co-authored-by: Tianyi Cui <53024+tianyicui@users.noreply.github.com>
2026-09-18 19:05:32 +08:00
Tianyi Cui c3cfe83d2e merge: update the session-log-v4 integration base from master
Merge a2acc7d3eb620bb52f09f7ea3b5a3a1c23353e18 after preserving the earlier
master checkpoint and its successful CI. Carry current provider input-history
handling, UI controls, agent targeting, and runner-concurrency changes into
the integration base without changing the Session migration feature layers.

Keep durable direct-child catalog semantics alongside the upstream running /
inactive vocabulary. Resolve the snapshot description conflicts by retaining
that upstream status text and the existing descendants-only diagnostic rule;
the source and all 53 JSON tool descriptions agree. Preserve parent-session
availability handling with the upstream stale-blank and batched-history fixes.

The merged application builds, all 41 documentation gates pass, and focused
provider, tool-control, and Session Controller tests pass (98, 29, and 125).
Recorded input changes come from master: one refreshed v3 list-agents sample
and three new v3 scenarios; no migration bumps an existing snapshot generation.
2026-09-18 15:52:56 +08:00
Dudu-0223 507e0e6dfe fix: expose Team targets and simplify model agent statuses 2026-09-18 14:29:35 +08:00
Dudu-0223 3d852a1cea refactor(subagent): unify local and external activation lifecycles 2026-09-17 14:54:10 +08:00
Tianyi Cui 2d94201ef1 merge: integrate subagent capacity settings into session-log-v4 2026-09-17 01:14:07 +08:00
Dudu-0223 e55093b47d feat(subagent): migrate direct catalog consumers to parent projections 2026-09-16 22:05:17 +08:00
Dudu-0223 0eed02d447 fix(subagent): map capacity refusal and clarify one-shot scope 2026-09-16 13:11:47 +08:00
Dudu-0223 a69bcf3636 feat(subagent): own editable delegation limits in the backend 2026-09-16 12:51:50 +08:00
Tianyi Cui b86b89da94 docs(subagent): align settlement notice descriptions 2026-09-14 15:27:38 +08:00
Tianyi Cui 2d9e3a175f docs(auto-review): name delegation records explicitly 2026-09-12 14:21:58 +08:00
Tianyi Cui 647e2aefbf Merge master into Auto review and reconcile recorded API types 2026-09-12 14:17:13 +08:00
Turtle 71d50b4a84 refactor: ban ambiguous origin label 2026-09-11 17:45:28 +08:00