Commit Graph
5560 Commits
Author SHA1 Message Date
Tianyi Cui 5cc18ea7db Merge remote-tracking branch 'origin/master' into codex/enforce-tool-cancellation
# Conflicts:
#	packages/core/agent-loop/tests/tool-calls.spec.ts
2026-07-19 18:12:13 +08:00
Tianyi Cui 1cd999b3fe Merge remote-tracking branch 'origin/master' into codex/pr353-retarget-master-20260719 2026-07-19 18:12:09 +08:00
Tianyi Cui 6e790b95f2 fix(compact): complete master retarget integration
Declare the tool-result pruning plugin in the examples workspace so the repl Cordis configuration resolves through plain Node and the Loader metadata gate.

Express the validated single-node surface rewrite without a non-null assertion or an unreachable defensive branch, preserving both the runtime contract and per-file 100% coverage.
2026-07-19 18:11:48 +08:00
Tianyi Cui a278374e8f docs: structure model experience fields 2026-07-19 18:08:42 +08:00
Tianyi Cui 2bc4e05a08 fix(tools): enforce cooperative cancellation 2026-07-19 18:05:54 +08:00
Tianyi Cui f756fcb7d3 Merge pull request #395 from deepseek-harness/codex/code-review-prevention
docs(agents): promote review principles
2026-07-19 18:00:09 +08:00
Tianyi Cui 6500de8402 Merge remote-tracking branch 'origin/master' into codex/pr353-retarget-master-20260719 2026-07-19 17:56:03 +08:00
Tianyi Cui 9c5b86051b Merge master into tool-result pruning
Retarget the pruning feature onto the merged compaction foundation.

Adapt content-only tool-result rewrite validation to the session-owned surface manager, migrate the demo wiring to repl-agent, and refresh generated type, catalog, and website contracts while preserving pressure and overflow pruning behavior.
2026-07-19 17:54:55 +08:00
Tianyi Cui 8733f365a4 Merge remote-tracking branch 'origin/master' into codex/code-review-prevention 2026-07-19 17:54:35 +08:00
Tianyi Cui 38b7275eb1 Merge pull request #393 from deepseek-harness/codex/code-review-human-principles
docs(review): distill human review principles
2026-07-19 17:53:10 +08:00
imccyu 3e9cb70c78 Merge remote-tracking branch 'origin/master' into worktree-windows-runtime
# Conflicts:
#	packages/session-persistence/session-persistence-jsonl/README.md
#	packages/session-persistence/session-persistence-jsonl/src/index.ts
#	packages/session-persistence/session-persistence-jsonl/tests/jsonl.spec.ts
#	packages/support/loader-smoke/tests/loader-smoke.spec.ts
2026-07-19 17:52:36 +08:00
Tianyi Cui 2db4061861 Merge remote-tracking branch 'origin/master' into codex/code-review-human-principles 2026-07-19 17:47:06 +08:00
Tianyi Cui 0893aaa7cb test: rename golden snapshot files to expected 2026-07-19 17:45:49 +08:00
Yichen Jiang b0dc299508 Merge remote-tracking branch 'origin/master' into fix/subagent-depth-budget
# Conflicts:
#	examples/acp-agent/tests/acp.snapshot.ts
2026-07-19 17:42:52 +08:00
Tianyi Cui bcc920369c docs: document package KV cache effects 2026-07-19 17:39:50 +08:00
Tianyi Cui 4ab5a76317 docs(agents): promote review principles 2026-07-19 17:35:43 +08:00
Yichen Jiang 4a26ccb6f5 Merge branch 'fix/subagent-depth-budget' of github.com:deepseek-harness/deepseek-harness into fix/subagent-depth-budget 2026-07-19 17:34:40 +08:00
Yichen Jiang d231f30024 test(acp-snapshot): cover the child-omission branches synthetically
The childToolOmissions comparison arms ran only through the examples
snapshot suites, which the unit coverage gate does not count. Add an
authored child-omission scenario to the synthetic replay suite: one
scripted child omits the declared tool (header pin minus the omission,
prompt pin skipped), one keeps the full set (pin and prompt compared
verbatim), restoring 100% branch coverage on suite.ts.
2026-07-19 17:34:10 +08:00
Tianyi Cui ed50d13845 Merge remote-tracking branch 'origin/master' into rfc/loop 2026-07-19 17:31:15 +08:00
Tianyi Cui b3c4b732d8 Merge pull request #332 from deepseek-harness/compact-post-step-overflow-recovery
feat(agent): add post-step compaction and bounded overflow recovery
2026-07-19 17:26:50 +08:00
Yichen Jiang d614374ac6 Merge branch 'master' into fix/subagent-depth-budget 2026-07-19 17:24:24 +08:00
Yichen Jiang cb74477d42 feat(tool-subagent): default maxDepth 1 with at-cap schema hiding
An omitted maxDepth meant unbounded recursion, and the shipped examples
shipped that default. maxDepth now defaults to 1; a numeric cap requires
the provider's depthLimit capability (the mount fails loud and points to
the explicit 'provider-managed' opt-out for out-of-process providers),
and a child AT the cap loses the delegating tool from its own schema via
the child toolFilter — prompt-face hiding on top of the execution-face
depth check. Examples pin maxDepth explicitly. The ACP snapshot harness
gains Scenario.childToolOmissions so a child session may legitimately
omit declared delegation tools from its pinned header and prompt;
affected subagent/workflow goldens are re-recorded.
2026-07-19 17:20:49 +08:00
Yichen Jiang 0d00106fa8 fix(session): persist the delegation depth in the session header
A subagent child's recursion depth lived only in runtime AgentOptions,
so a persisted child came back from resume counted as top-level and
maxDepth stopped binding after every restart. Add
SessionHeader.delegationDepth, round-trip it through the JSONL and
SQLite backends (SQLite schema v5), restore it on agent-loop resume,
and write it when the in-process backends create a child. The seam now
owns the shared depth vocabulary (delegationDepthOf): the persisted
header is authoritative and monotone — runtime options may deepen it
but never lower it.
2026-07-19 17:20:36 +08:00
Tianyi Cui d5350cd42e docs(review): distill human review principles 2026-07-19 17:08:00 +08:00
Tianyi Cui 20fd7133a0 Merge latest master into post-step recovery
Adopt initiator-derived private loop and session plumbing while preserving post-step recovery and balanced synthetic tool-call results after cancellation.

Keep the architecture map within its existing budget while documenting ambient Agent ownership and explicit cross-boundary identities.
2026-07-19 17:02:55 +08:00
Tianyi Cui 8f540797b8 Merge latest master into rfc/loop 2026-07-19 17:02:00 +08:00
Tianyi Cui b6858a5ce1 Merge pull request #384 from deepseek-harness/codex/simplify-agent-identity-plumbing
refactor(core): simplify AgentLoop identity plumbing with ctx.agents
2026-07-19 16:58:10 +08:00
Tianyi Cui a1de4d0071 docs: codify initiator-owned identity plumbing 2026-07-19 16:52:40 +08:00
Tianyi Cui f0d6637972 Merge latest origin/master into codex/simplify-agent-identity-plumbing 2026-07-19 16:52:40 +08:00
Tianyi Cui fd54b5c848 Merge latest master into post-step recovery
Combine agent initiator scoping and exact Cordis JSDoc inspection with post-step compaction and bounded request recovery.

Regenerate the Cordis and website API catalogs, and classify the recovery and compaction types required by the current catalog link-coverage gate.
2026-07-19 16:46:01 +08:00
Yichen Jiang 5f9fe14156 docs(bash-local): clarify spill cleanup semantics 2026-07-19 16:39:58 +08:00
Tianyi Cui bebbbbb7f0 Merge pull request #387 from deepseek-harness/codex/cordis-inspect-jsdoc
feat: inspect exact Cordis API JSDoc
2026-07-19 16:39:16 +08:00
Yichen Jiang e1bf278266 Merge branch 'master' into worktree/dsbench-patch 2026-07-19 16:36:01 +08:00
ZiyaZhang 88bd4ac244 fix(desktop): stability batch — LCS bound / barge-in flush / refresh throttle / history bucket / fusion seed dedupe
P0-2 artifacts-board.js: guard against LCS OOM on large blob diffs; fall back to note-based render when either side exceeds bound.
P1-2 chat-side-drawer.js: flush pending turn on barge-in (user sends before assistant frame flushes), so drawer stays in sync with graph.
P1-3 chat-refresh-throttle.js (new) + renderer.js: coalesce chat + graph refreshes into per-frame flush to prevent visual jitter under high-frequency intervention/refresh events.
P1-4 artifacts.js: history entries bucket by sessionId; cross-session artifacts no longer bleed into the currently-open session's history rail.
P1-5 rubric-fusion-model.js: seedOnce idempotency guard — repeated seed calls no longer duplicate rubric fixture rows (was surfacing as double-counted evolution nodes).
test/code-bugs-batch.test.js (new, 9 assertions) covers all 5 fixes; test/artifact-evolution-board.test.js updated to align with bySession bucket shape.

9 files, +520/-43. Behavioral fixes only, no API surface change.
2026-07-19 01:31:39 -07:00
Tianyi Cui 5e2607df8c refactor(core): capture session inside loop operations 2026-07-19 16:28:31 +08:00
ZiyaZhang 6c4d0ae805 chore(desktop): trivial quality sweep — dedup classList.add / strip lane codenames from CSS + file headers
T-01 chat-session-graph.js: remove redundant classList.add (setAttribute
    below already sets 'active'; leftover from lane-chat-triple merge).
T-02 style.css: rewrite two section headers to describe *what* the section
    is, not which internal lane produced it (Rubric-driven views / Artifact
    panel tabbed views + version evolution).
T-04-partial chat-session-graph.js / chat-side-drawer.js / growth-v2.js:
    drop 'feat/chat-triple-view', 'lane-chat-triple', 'task #140' codenames
    from file header docblocks — user-facing source hygiene.

4 files, +5/-7, no behavior change.
2026-07-19 01:26:58 -07:00
Tianyi Cui a72b86f82c Merge pull request #391 from deepseek-harness/codex/pr332-adapter-failure-provenance
fix(llm): scope adapter failures to model calls
2026-07-19 16:26:28 +08:00
ZiyaZhang fc558c2db8 feat(desktop): context page deepening — window bar + compact Config + intervention marker + subagent drilldown
Four Context-page enhancements (lane-ctx-deep, F1-F4):

- F1 context window breakdown: replace percentage-only card header with
  a stacked-bar breakdown of input / cached / output token buckets,
  plus a right-side gauge showing the live window occupancy ratio.
- F2 compact Config tab: fold the sprawling profile Config editor into
  a Config tab on the Context page card, with the same yml-leaf
  ordering as the top-of-window profile picker.
- F3 intervention marker: on the intervention timeline, emit a marker
  glyph at each user-intervention row (turn-flow-glyph-style) so the
  card scans as a single stream instead of a header + separate list.
- F4 subagent drilldown: when a turn's tool trace hits a subagent, the
  Trace panel's Config + Output tabs get a second row of Subagent
  Config / Subagent Output tabs immediately below, driven by the same
  fold-in-place shape the parent panel already uses.

4 new renderer modules (compact-config-model / context-window-breakdown /
intervention-timeline / subagent-drilldown), 6 new test files (41 tests,
all node --test style), 4 QA shoot scripts for CDP-driven regression
screenshots.
2026-07-19 01:22:28 -07:00
Tianyi Cui 36dbe68631 test(cordis): snapshot targeted JSDoc inspection 2026-07-19 16:22:09 +08:00
Tianyi Cui 3cd73ec4b8 Merge latest origin/master into codex/simplify-agent-identity-plumbing 2026-07-19 16:19:19 +08:00
Tianyi Cui ee6b9d081a fix(llm): scope adapter failures to model calls
Replace the process-wide adapter-failure WeakSet with a per-call scope bound to the exact AsyncIterable returned by LlmService.stream(). Give every call a unique wrapper so waterfall middleware can reuse an iterable without sharing provenance.

Move agent-loop recovery classification to the model-stream boundary. Only the final adapter behind that exact call can become an agent/request-error; nested llm/stream calls remain ordinary outer middleware failures while preserving the original Error.

Cover nested calls, reused middleware iterables, and end-to-end agent-loop recovery. Update the package and RFC contracts, bilingual pairing record, and generated API and catalog references.
2026-07-19 16:14:58 +08:00
Tianyi Cui 77ba01b175 Merge remote-tracking branch 'origin/master' into codex/cordis-inspect-jsdoc
# Conflicts:
#	packages/cordis/tool-cordis/src/api-catalog.ts
2026-07-19 16:14:46 +08:00
Tianyi Cui e05e7a0870 Merge pull request #388 from deepseek-harness/codex/cordis-catalog-type-links
docs: verify Cordis signature type links
2026-07-19 16:13:07 +08:00
ZiyaZhang c8f5ca3d5b feat(desktop): artifact evolution chain + Board/Timeline views
Adds a version-evolution capability to the Artifacts pane:
  - Evolution chain: LCS-based diff across successive versions of the
    same logical artifact; when a blob is missing, the chain honestly
    surfaces a placeholder rather than fabricating diff content.
  - Board / Timeline tab switcher on the Artifacts page.
  - Auto-grouping into 5 kinds so the Board reads at a glance.

Files:
  src/renderer/artifacts-board.js       — new Board / Timeline / Evolution views
  src/renderer/artifacts.js             — wire Board tab + evolution rail
  src/renderer/index.html               — script tag + tab markup
  src/renderer/style.css                — tail append (~200 lines)
  test/artifact-evolution-board.test.js — 23 new tests
  docs/artifact-board-fixture.json      — fixture seed
  docs/qa-artifact-evolution/           — 3 QA screenshots + fixture.html
  scripts/qa-cdp-shoot-artifact-v2.mjs  — QA capture harness

Merged as source-repo test-real @ 7279870 (with lane-side conflict
resolution against test-real @ c1d93aa: style.css tail-append union;
independent of Lanes C/A/D CSS sections).

Test suite: 1727/1727 pass (+23 over Lane C+A+D baseline of 1704).

Follow-up L-3 (in upstream ledger): runtime ArtifactServer to grow
a snapshot store so the "missing blob" fallback becomes rare.
2026-07-19 01:10:53 -07:00
ZiyaZhang 4c47ce55e2 feat(desktop): rubric+growth+runtime three-page fusion
Architectural refactor unifying three previously-independent pages
around a single shared event-log model:

  rubric-fusion-model.js — the shared model. One log of scored
    events keyed by (rubric, runtime, timestamp), plus a small set
    of derivations (recent-scores window, per-rubric aggregates,
    per-runtime rubric grid) that all three views subscribe to.
  rubric-fusion-seed.js  — fixture seed used by tests and the
    isolation-machine screenshots below.

The three page views:

  Rubrics — now leads with a hint card (recent pass/fail streaks,
    stalest rubric) and a stats strip (7-run rolling pass rate,
    latest score, delta vs. previous). Rubric list is unchanged.
  Growth  — rewritten. The old compact-window event feed is gone;
    the page is now a pure SVG time-series curve over the event
    log (score-y × time-x), with per-rubric coloring and a
    hover-time tooltip. -420 lines of the old feed → +630 of the
    curve renderer.
  Runtime — adds a "Rubric grid" tab next to the existing Status
    tab. Grid is one row per rubric × one column per runtime;
    cells are pass/fail/unrun, click-through to the raw event.

Wiring is careful about the five hot zones the parallel lanes are
each touching (nav / chat / context / trace / artifact) — Lane D
stays entirely inside rubric/growth/runtime and their shared model,
so this composes with the C/A lanes without stepping on their
finishTurnContainer or chat-triple regions. style.css conflict
against the C+A combined append was tail-append vs tail-append and
resolved by concatenation (brace balance verified).

  rubric-fusion-model.js       419 +
  rubric-fusion-seed.js        624 +
  rubric-fusion-model.test.js  181 +
  rubric-fusion-views.test.js  189 +
  growth-v2.js                 +631/-420   (SVG time-series rewrite)
  rubrics-page.js              +89 -0      (hint + stats strip)
  runtimes-page.js             +198 -0     (rubric-grid tab)
  index.html                   +7          (three mount points)
  style.css                    +252        (new page sections)
  rubric-fusion-fixture.json   +94         (test/screenshot seed)

Test suite: 1704/1704 pass (+22 over Lane C+A baseline). Isolation-
machine fixture screenshots (rubrics/growth/runtimes,
docs/rubric-fusion-shots/0{1,2,3}-*.png) reproduce from the merged
HEAD.
2026-07-19 01:05:01 -07:00
Yichen Jiang 402128fb51 Merge branch 'master' into fix/acp-subagent-cwd 2026-07-19 16:02:55 +08:00
Tianyi Cui 18d7df1d36 Merge latest origin/master into codex/simplify-agent-identity-plumbing 2026-07-19 16:02:16 +08:00
ZiyaZhang 5e46a54de7 feat(desktop): chat triple view — turn edge colors + side drawer + Session Graph
Adds a three-layer view to the Chat pane:
  - List view    — turn cards get colored left-edge by role/state
                   (user/assistant/tool/error), replacing the flat
                   monochrome stack; readable at a glance for long
                   sessions.
  - Side drawer  — a right-side collapsible panel opened via the
                   Details button on any turn; shows the raw payload,
                   annotations, and jump-links to the trace tri-view
                   without leaving the chat.
  - Session Graph— a top-level SVG view of the whole session's turn
                   graph (user → assistant → tool chain → subagent
                   branch); zooms out from the linear list to the
                   session's structure.

Renderer wiring is additive: the three new modules mount into two
new hook points in index.html; turn/start now emits data-turn-id
so the drawer can round-trip. finishTurnContainer keeps its Lane C
signal-chip pass and picks up drawer wiring at the tail — the two
tails are independent and compose cleanly.

  chat-session-graph.js         198 +
  chat-side-drawer.js           263 +
  qa-cdp-shoot-chat-triple.mjs  204 +
  chat-triple-view.test.js      222 +
  index.html                     43 +
  renderer.js                   111 +   (wiring + data-turn-id)
  style.css                    +273 -1  (three view sections)

Test suite: 1682/1682 pass (+14 over Lane C baseline). Isolation-
machine fixture screenshots (list/drawer/graph, docs/qa-chat-triple/
0{1,2,3}-*.png) reproduce from the merged HEAD.

Known non-blocking niceties, tracked as follow-ups (out of scope
for this commit):
  - Details button and existing Context Rail both target the
    right-side slot; a small drawer-mutex pass unifies them.
  - Session Graph fixture includes an extra subagent turn beyond
    what the list view shows.
2026-07-19 01:02:15 -07:00
Tianyi Cui 5a4ea6c08d Merge latest PR #340 into codex/simplify-agent-identity-plumbing 2026-07-19 15:57:48 +08:00
ZiyaZhang 47949244c8 feat(desktop): trace signal detection + tri-view badges
Adds a small signal-detection layer over trace payloads and surfaces
three kinds of semantic signals inline in the trace tri-view (Timeline
/ Graph / turn footer chips) so a researcher can spot repetitive
tool-call loops, redundant identical calls, and plan-completion beats
without hand-scanning the raw log:

- loop-detected  — three or more repeats of the same tool.method
                   signature inside a window, badge in Timeline gutter
                   + colored ring on the Graph node
- redundant-call — identical (tool, arg-hash) call twice without any
                   state change in between, badge + subdued styling
                   so it stays advisory not alarmist
- plan-* chips   — plan/subplan step-complete beats surfaced above the
                   assistant body in the turn footer, wired through
                   the finishTurnContainer tail

Pure rendering; no wire-format changes needed on the runtime side —
signal detection is fixture-driven off the same payload the tri-view
already consumes. Companion RFC L-2 in docs/upstream-ledger.md asks
the runtime to emit these signals natively rather than deriving them
in the shell, so once L-2 lands the shell will consume upstream signals
and this detector becomes a fallback.

Files:
  src/renderer/trace-signal-detect.js       new  (loop/redundant/plan)
  src/renderer/trace-tri-view.js            +24  (wire detector output)
  src/renderer/trace-timeline.js            +39  (badge in gutter)
  src/renderer/trace-graph.js               +30  (colored ring)
  src/renderer/renderer.js                  +81  (finishTurnContainer chips)
  src/renderer/index.html                    +1  (one script tag)
  src/renderer/style.css                    +58  (badge/ring/chip rules)
  docs/upstream-ledger.md                  +121  (append L-2 RFC)
  scripts/qa-trace-signals-fixture.mjs     new  (headless SVG proof)
  scripts/qa-trace-signals-shoot.mjs       new  (CDP live shoot)
  docs/trace-signals-shoot/*.html          new  (3 fixture-driven shots)
  test/trace-signal-detect.test.js         new  (detector unit tests)
  test/trace-signal-overlay.test.js        new  (renderer overlay tests)

Test suite: 1668/1668 pass (17 new). Fixture-driven signals-01-timeline-
loop.html regenerated byte-identical from the merged HEAD.
2026-07-19 00:57:19 -07:00