Commit Graph

2893 Commits

Author SHA1 Message Date
imccyu
3f7a8c6f8e feat(client): add the dsh-client-test-runtime package
A jsdom slot test runtime for feature specs: a real Cordis Context, the
production SlotsService and web-react renderer, and typed session/workspace
doubles (TestSessions implements ISessions with FixtureSession sessions;
TestWorkspaces implements IWorkspaces), so the compiler flags fixture drift
when a production face changes. Fixtures feed plain data: list rows,
conversation snapshots, and ISession-typed behavior stubs; provide-bundle
materialization runs the shared SessionProvideChannel.

DOM snapshot support: declare()/renderSlot() mount a single slot inside a
data-slot wrapper for local .snap capture, and a snapshot serializer folds
CSS-module class hashes to their semantic locals and collapses svg internals
to a content fingerprint. The typed provide() constrains declared-service
fakes to Partial of the service's outward face.
2026-07-28 23:54:13 +08:00
imccyu
b4bc4f382e refactor(session-projection): compact checkpoint row fields to ver/seq/val
The persisted row (sessionId, key, stateVersion, observedSeq, state)
becomes (sessionId, key, ver, seq, val) — the cache medium repeats these
three names for every unit of every session, so the long forms dominated
the JSON payload. ProjectionCheckpointRow and the checkpointRow zod spec
rename together; the domain spec bumps to v3 (cache semantics: the old
medium is discarded, not migrated). The unit-facing declaration keeps
stateVersion — only the persisted/checkpoint row shape changes.
2026-07-28 22:45:35 +08:00
imccyu
019dd7d894 test,chore: clear the static and coverage lanes for the cache stack
Static: the cache package.json files array matches the workspace
constraint shape, the unused dsh-storage-json devDependency is dropped
(tests run on the memory backend), and docs/module-graph.md is
regenerated for the new package edge.

Coverage: two unreachable branches deleted rather than tested —
coldSnapshot's floor-0 tail reuse (a baseSeq-0 restore never throws and
an unrelated record still carries a usable watermark) and flushSoft's
non-mandatory clean-skip (throttle triggers only fire dirty). New tests
close the real gaps: write() on a never-dirty session and the non-JSON
unit-state rejection, plugin disposal clearing armed interval timers,
cachedSnapshot's all-version-mismatched and cwd-identity arms, the
zero-units empty-log cut, the coordinator seek-hook ladder (suffix /
not-found / plain failure / abort-reason relay), and the superseded-
retirement race proving forget()'s exact-entry guard.
2026-07-28 22:26:12 +08:00
imccyu
ee79b7a73a docs: regenerate the cordis catalogs for the reshaped cache read faces
cachedSnapshot/coldSnapshot signature and JSDoc changes from the review
fixes flow into the generated service catalog and model-facing api-catalog.
2026-07-28 22:26:11 +08:00
imccyu
9ae3e1a9ad docs: regenerate catalogs and graphs for the projection-cache seam; classify its types
gen-cordis-catalog/api, config and persistence catalogs, and doc graphs
regenerated over the new sessionProjectionCache service and the registry's
checkpoint faces. Classifications: ProjectionCheckpoint joins the type-link
exemptions (owned by the projection package source), Partial joins the
foundation names, the cache service gets its capability-seam role row, and
the package takes the one-sentence Model Experience contract (host-side
read-model accelerator, no model surface).
2026-07-28 22:26:09 +08:00
_Kerman
b10dad0fcb fix(persistence): restore pre-identity sessions 2026-07-28 22:16:43 +08:00
Tianyi Cui
291676f704 Merge branch 'master' into xtr/identified-immutable-messages 2026-07-28 18:55:50 +08:00
_Kerman
bc988ca4a9 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/core/agent-loop/README.i18n.yaml
#	packages/core/agent/README.i18n.yaml
2026-07-28 18:49:23 +08:00
Chinesezjc
7840a04724 Merge remote-tracking branch 'origin/master' into feat/scrollbar-tokens 2026-07-28 18:32:34 +08:00
Yichen Jiang
e8e40d7dd3 Merge branch 'master' into worktree/python-sdk-max-output-tokens 2026-07-28 18:17:45 +08:00
Chinesezjc
60248e99d1 Merge remote-tracking branch 'origin/master' into feat/scrollbar-tokens 2026-07-28 18:15:00 +08:00
_Kerman
3438025890 docs(core): sync agent send contract 2026-07-28 18:15:00 +08:00
Chinesezjc
f035797755 build(web): rebuild plugin bundles before the browser lane
test:web ran build:web alone, which does not rebuild UI plugin client
bundles. Plugin CSS reaches the browser through packages/client/*/lib/
client.js, not apps/web/dist, so a changed *.module.css served its
previous bundle: the run exercised stale CSS and a removed declaration
still passed. That is how I first mistook a valid gutter test for a
vacuous one.

Root build already covers packages/*/*, so running it first is enough;
check-all already ordered build before build:web, so CI was never
exposed. Only the local script was, which is where a stale-bundle pass is
most likely to be believed.

Verified against the situation it fixes: mutate the source, rebuild the
bundle, restore the source, and the artifact is left without the
declaration while the source has it. Under the old script the run tested
that artifact; under the new one the artifact is rebuilt first (grep goes
0 to 1) and the scrollbar spec passes. The nine failing web files are the
pre-existing aria-golden set from f2c004524, unchanged by this.
2026-07-28 18:14:22 +08:00
_Kerman
9220dbd271 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	docs/event-producer-consumer.md
#	packages/client/connection/src/client/fixture.ts
#	packages/goal/command-goal/tests/command-goal.spec.ts
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/api/events.schema.ts
#	packages/host/apiproxy/src/api/events.ts
#	packages/host/apiproxy/tests/api-proxy-view.spec.ts
#	packages/host/apiproxy/tests/rpc-schemas.spec.ts
#	tsconfig.base.json
2026-07-28 18:11:13 +08:00
Yichen Jiang
fd01fef6b7 test(sdk): satisfy max tokens gates 2026-07-28 18:06:58 +08:00
Yichen Jiang
5358168787 feat(sdk): support max output tokens 2026-07-28 17:36:44 +08:00
imccyu
de56936c87 docs: fix test and docs conflicts 2026-07-28 16:50:07 +08:00
imccyu
9ce201e490 Merge remote-tracking branch 'origin/master' into worktree-guifork 2026-07-28 16:12:12 +08:00
_Kerman
019b0abb68 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-24-separate-context-injection-from-turn-execution.i18n.yaml
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/core-data-structures/session.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/persistence-catalog.md
#	packages/core/session/README.i18n.yaml
#	packages/session-title/session-title/tests/persistence.spec.ts
2026-07-28 15:45:53 +08:00
_Kerman
b1af35145b fix: enforce message snapshot invariants 2026-07-28 15:33:00 +08:00
_Kerman
833a58784f docs(session): refresh invariant metadata 2026-07-28 15:22:16 +08:00
_Kerman
f074444cf0 Merge remote-tracking branch 'origin/master' into xtr/remove-append-out-of-band 2026-07-28 15:19:00 +08:00
_Kerman
0a3d38bb08 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-28 14:59:40 +08:00
_Kerman
0225d598e3 fix: preserve message occurrence contracts 2026-07-28 14:44:15 +08:00
_Kerman
cee0666a4d refactor(session): remove synthetic log-only turns 2026-07-28 14:41:51 +08:00
_Kerman
744a821319 docs: refresh Cordis service catalog 2026-07-28 14:15:41 +08:00
_Kerman
f5ec71f5b1 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.i18n.yaml
#	packages/context/session-reference/README.i18n.yaml
#	packages/context/session-reference/README.md
#	packages/context/session-reference/README.zh.md
#	packages/context/session-reference/src/index.ts
2026-07-28 13:58:06 +08:00
_Kerman
fbf87e660c refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
imccyu
bce9910b47 docs: regenerate cordis catalog line anchors 2026-07-28 12:09:48 +08:00
imccyu
91045a467b Merge branch 'master' into worktree-guifork 2026-07-28 11:50:56 +08:00
Yichen Jiang
968e4d5312 Merge remote-tracking branch 'origin/master' into worktree/tui-session-title-search
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.md
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.zh.md
#	packages/context/session-reference/README.i18n.yaml
#	packages/context/session-reference/README.md
#	packages/context/session-reference/README.zh.md
#	packages/context/session-reference/src/index.ts
2026-07-28 11:11:57 +08:00
Yichen Jiang
a43a2032ec fix(tui): search session references by title 2026-07-28 11:05:53 +08:00
imccyu
5cb3b5595a ci: close the post-merge gate debt — runtime closure, dead dep, regenerated artifacts, coverage deferrals
The master merge left the generated catalogs/module graph stale, the
python runtime closure missing dsh-session-projection (now reached
through session-title and tool-todo), and apiproxy holding a dead
session-title dependency (the bespoke title frame is retired). The four
files the merge pushed under the per-file coverage floor (commands
executor + invariant, projection registry drive tails, TUI) join the
existing TODO(gui) deferral block per the GUI-lane policy; the remaining
coverage-run failures reproduce identically on pure origin/master
(environment-bound suites: sdk process exit, TUI PTY timing, workflow
worker timing, title loader slow-boot) and are not this branch's debt.
2026-07-28 10:54:35 +08:00
imccyu
a3bdec4450 Merge remote-tracking branch 'origin/master' into worktree-guifork 2026-07-28 10:23:48 +08:00
Tianyi Cui
9ebd0075e9 Merge master into fix/pty-handoff-grace 2026-07-28 01:19:58 +08:00
Chinesezjc
d0be242138 Merge branch 'master' into fix/worker-timer-clamp 2026-07-28 01:12:16 +08:00
imccyu
c10edbbc85 docs: regenerate catalogs and graphs for the projection seam; classify its types
gen-cordis-catalog type-link rows for the ProjectionDefinition surface and
CommandExecution; a sessionProjections service-role row for gen-doc-graphs;
regenerated module graph, persistence/config/cordis catalogs and api-catalog;
packages/README rows condensed back under the word ceiling; the RFC's sketch
fences marked ignore-check on both language sides (pairing re-recorded).
2026-07-28 01:09:55 +08:00
Chinesezjc
ca676178b5 Merge branch 'master' into fix/worker-timer-clamp 2026-07-28 01:06:22 +08:00
Tianyi Cui
2a562236d0 Merge remote-tracking branch 'origin/master' into worktree/pr784-merge-20260728 2026-07-28 01:02:49 +08:00
imccyu
730657375f Merge branch 'master' into worktree/web-session-model-selector 2026-07-28 00:56:56 +08:00
Tianyi Cui
c0b9734494 Merge remote-tracking branch 'origin/master' into worktree/pr784-merge-20260728 2026-07-28 00:52:23 +08:00
Tianyi Cui
9c6de3644e Merge branch 'master' into archive-agent-notes-sweep-2 2026-07-28 00:49:13 +08:00
imccyu
af70af4020 Merge remote-tracking branch 'origin/master' into worktree/web-session-model-selector 2026-07-28 00:39:24 +08:00
Tianyi Cui
88aa3f8959 Merge remote-tracking branch 'origin/master' into worktree/pr703-ci-fix-20260727 2026-07-28 00:33:36 +08:00
Chinesezjc
30f0ac90f7 Merge remote-tracking branch 'origin/master' into fix/worker-timer-clamp 2026-07-28 00:33:02 +08:00
Tianyi Cui
cc8f6a30c0 Merge remote-tracking branch 'origin/master' into worktree/pr703-ci-fix-20260727
# Conflicts:
#	docs/architecture.i18n.yaml
#	packages/core/agent-loop/src/agent.ts
2026-07-28 00:23:27 +08:00
Chinesezjc
3dc3e59b38 Merge remote-tracking branch 'origin/master' into fix/pty-handoff-grace 2026-07-28 00:17:25 +08:00
Tianyi Cui
cc5201a408 Merge remote-tracking branch 'origin/master' into worktree/worktree-local-lefthook-20260727 2026-07-28 00:08:43 +08:00
Chinesezjc
0982cc4fc0 Merge remote-tracking branch 'origin/master' into fix/worker-timer-clamp 2026-07-28 00:08:32 +08:00
Tianyi Cui
59122b9e85 Merge remote-tracking branch 'origin/master' into worktree/worktree-local-lefthook-20260727 2026-07-28 00:06:16 +08:00