Commit Graph
117 Commits
Author SHA1 Message Date
Tianyi Cui 582c9ab7b7 fix(experimental): retain published names and centralize identity policy 2026-10-06 16:42:25 +08:00
Tianyi Cui b48384223a refactor(experimental)!: classify optional packages and move prototypes 2026-10-06 16:41:04 +08:00
Tianyi Cui c954a07535 docs(session): separate experimental persistence catalogue 2026-10-05 18:09:01 +08:00
Tianyi Cui dd302f718b feat(session): catalogue experimental plugin records 2026-10-05 17:20:26 +08:00
Tianyi Cui 1678f0f5f5 fix(session): address review of plugin records
- Make the record commit an ES private method, so appendPluginRecord()
  is its only runtime entry.
- Document PluginRecordType and PluginRecord on the session subsystem
  page, and state in the README and JSDoc that the V3-to-V4 edge renames
  unknown ignorable V3 events into the plugin: namespace and that plugins
  outside this repository must not call the writer.
- The caller gate parses only files that contain the name or a \u
  escape, documents that wildcard re-exports are not reported, and its
  spec reads a temporary repository instead of this checkout.
- Cover Session.fromRestore in the record test and name SessionEventMap
  in the catalog generator's diagnostic.
2026-10-05 08:57:58 +08:00
Turtle 819eb8078e Merge origin/master into turtle/remove-invariants-ccf1396aaf61 2026-10-01 16:33:09 +08:00
turtle1999 ecc01b54a4 perf(api): yield between Session list summaries 2026-09-30 15:50:40 +08:00
Turtle f1f0dc54ff docs: drop remaining references to removed invariant checks 2026-09-30 13:43:01 +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
Yichen Jiang 86331673d9 fix(session): save default model settings in the background 2026-09-24 19:48:49 +08:00
Yixiang Tu 43048098f6 test(llm): cover dynamic tool updates and clarify documented limits 2026-09-23 22:40:38 +08:00
Yixiang Tu bc8c0dbf40 feat(llm): emit dynamic tool updates and project them per route
Log tool changes as developer messages independently of model capability,
fold committed headers and updates into Session.toolHistory(), and let the
LLM runtime construct deferred and retained declarations for routes that
declare a toolUpdate mode. DeepSeek serializes updates as system-role
tool_addition/tool_removal blocks with defer_loading and the tool-changes
beta header. An unchanged restored tool continues the series and is
re-offered through its recorded blocks instead of rewriting declarations.

Replace the obsolete rejection tests with wire assertions and add coverage
for the session fold, loop emission, route projection, config validation,
and the beta header. Chat and Trajectory changes land separately.
2026-09-23 22:39:26 +08:00
lsdsjy 9e19ca3e45 fix(account): limit automatic model selection to account login 2026-09-23 15:06:00 +08:00
lsdsjy 40da69ff75 refactor(account): isolate provider authentication and preserve model selections 2026-09-23 14:43:47 +08:00
lsdsjy 6ef32577a3 fix(account,models): reconcile provider lifecycle with master 2026-09-22 15:06:16 +08:00
lsdsjy cc478ac70a feat(client,session-controller,llm): track available models and expose account settings 2026-09-21 14:54:51 +08:00
creatixchu 6e260998c9 fix: refine shared file controls and native query errors 2026-09-20 13:39:11 +08:00
creatixchu 0ae1b2f91c docs: describe native file application selection and platform scope 2026-09-20 10:39:42 +08:00
Yixiang TuandTianyi Cui e0bd7e1960 feat(session): add developer changes using historical tool schemas
Session V4 reserves developer-role messages for incremental model-visible
session changes. The role, tool addition/removal blocks, and deferred-loading
marker need a durable representation before independent provider and UI
integrations can emit or consume them. Known developer events must match an
open turn and step; unsupported providers and UI consumers fail explicitly.

Request headers already capture full tool definitions. Persisting another
ToolSchema in each addition would duplicate Session information and create
two definitions that could drift. Additions therefore store toolName, and
the containing developer event uses headerSeq to select one earlier known
request/header for all its additions. A same-name replacement keeps its
historical definition identity through restart, fork and surface changes.
Removals require no definition copy, and ordinary developer messages omit
headerSeq. Generic sourceEventSeqs remains independent derivation metadata.

The rejected inline tool field is optional never with @persistenceReserved.
The schema extractor retains that uninhabited slot, so permitting a future
value requires a format bump instead of being mistaken for compatible
optional metadata. Unrelated optional fields remain additive and readable.

Native and Session admission reject missing, forward, non-header, unknown,
ambiguous and incomplete referenced definitions, and reject the retired
inline tool field. Validate complete schema fields only for referenced
definitions, preserving unrelated header behavior and extra JSON metadata.
Unknown ignorable records remain opaque. Empty developer nodes retain their
surface position without producing a message or shadowing the system head.
No automatic emitter, provider activation, UI implementation, or speculative
public resolver is added.

Keep the core-owned developer source binding beside the introduced role,
including the request-only type rejection and attribution round trips. Update
consumer guards, SDK/snapshot handling, bilingual owner documentation, and
the same unreleased V4 acknowledgement. Keep earlier tool/source migration
work and its documentation in the parent. Preserve the existing recorded
Cordis inspection generation from the original developer change.

Integration keeps the final source layer as the sole parent and preserves
master's Messages input filtering, empty-user omission, empty tool results,
and system-update placement. Developer/deferred guards still run before
conversion. Native V4 admission, header references, reservation declarations,
and generic tooling match the validated marker candidate. Parent-owned
fixture and generator fixes remain in the parent.

Earlier feature validation passed full build, full lint, 41 doc-sync gates,
and 16 hygiene gates. The unchanged native implementation retains that evidence.
The focused Session/V4/request-input run passes 884 tests across 38 files with
100% statement, branch, function and line coverage for the V3-to-V4 package
and Session surface. Consumer tests pass 482 with one existing skip; tool,
message and optional-field tests pass 146. Cordis inspection and compaction
replays pass in both source and built modes (two cases per mode). Ten invalid
referenced-definition/unknown-header controls failed before their scoped
guards and pass after them.

Reservation validation: the actual generated developer root records tool as
optional primitive never. Widening it requires a bump, while traceId remains
additive and preserved; all 85 focused reader/classifier tests pass.

Final-parent validation: 205 tests across eight provider, type, catalog,
Session and native-format files pass. The preserved parent fixture verifies
Messages input-history replay; runtime/declaration and parent-owned-file
comparisons show no loss during the final rebase.

Co-authored-by: Tianyi Cui <[email protected]>
2026-09-18 19:08:11 +08:00
Tianyi Cui 29f7e7bdf5 fix(session): reserve retired system text in request-header schemas
Native V4 admission and Session adoption reject every request/header.header.system field because system prompts belong to system/message events. EpochHeader omitted that key, so the generated schema classified adding optional system text as a same-version optional-property addition even though released readers would reject it.

Declare system?: never with the shared persistenceReserved marker so the schema records the existing prohibition. Widening the field to string now changes a forbidden value set and requires a version bump. Keep both runtime guards and all unknown-metadata handling unchanged, and document the reservation alongside the current header type and V4 acknowledgement.

The regression extracts the actual event:request/header schema, checks the optional-never field, widens only that property, and verifies the version-bump diagnostic and native refusal. It fails without marker extraction and passes with the shared tooling support. The focused reservation, retired-syntax, and Session surface suites pass 65 tests; all 436 type-equiv blocks match their source. Generic marker extraction belongs to the foundational tooling change.
2026-09-18 19:05:33 +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 <[email protected]>
2026-09-18 19:05:32 +08:00
Tianyi Cui c95d045fdc docs(session): correct fork seed marker ownership
Arbitrary-sequence forks place the inherited end-seed marker before their
synthetic tool, step and turn closers. The Session constructor receives that
whole prepared seed, so firstLiveSeq can follow the inherited marker and the
constructor is no longer its sole producer. The retained documentation still
claimed both facts and could lead a consumer to use the wrong ownership cut.

Name buildForkSeed and the constructor as the two core producers, distinguish
the inherited cut from ordinary restore markers, and retain the warning about
plugins appending their own markers. Correct the subsystem reference's claim
that interrupted is the only synthetic turn ending: forked is also never
emitted by a live loop. Keep the bilingual reference and type-equivalent
excerpts aligned with the source JSDoc.

Refresh the required persistence catalog after the JSDoc change. Its schema
inventory changes only three source-line locations; all 61 roots, 472 types
and fingerprints remain identical. Parsed TypeScript declarations printed
without comments are also identical, so this changes neither runtime behavior
nor persisted fields, historical generations or recorded Session fixtures.
2026-09-18 18:25:39 +08:00
Tianyi Cui 044cd4fb49 merge: integrate pinned master into session-log-v4 base
Merge master 01d96c168a84227374e3aa741e94ddfbb498e27e, observed when
this integration started, after the published 6de3db41 checkpoint. Keep
master's author history and preserve the release writer, adjacent
migrations, historical Session generations, and parent-owned catalogs.

Combine blank Session writer acquisition and superseded-startup
cancellation with the release branch's projection refresh and panel
preservation. A startup acquisition may finish after a later navigation,
but must not retain a stale main Session or reveal its Conversation.
Update the existing regression's retention expectation while preserving
its panel and active-navigation assertions.

Keep the release catalog loading, known-leaf, and parent availability
behavior alongside master's completed-turn status and aligned sidebar
icons. Regenerate the config locations and pair the combined README
contracts. Preserve upstream's Linux process-state assertion repair.
2026-09-18 18:21:47 +08:00
creatixchu 04d0235673 Verify local file opening and address sidebar review findings 2026-09-18 15:31:50 +08:00
Tianyi Cui 8696ec6cef feat(session): fork exact event prefixes with synthetic tail results 2026-09-17 00:00:44 +08:00
Dudu-0223 e55093b47d feat(subagent): migrate direct catalog consumers to parent projections 2026-09-16 22:05:17 +08:00
_Kerman 49f601e902 Merge remote-tracking branch 'origin/master' into xtr/durable-inbox-web-recovery
# Conflicts:
#	docs/event-producer-consumer.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/api/session-controller/README.i18n.yaml
#	packages/api/session-controller/README.md
#	packages/api/session-controller/README.zh.md
#	packages/api/session-controller/tests/client-apply.client.spec.ts
#	packages/api/session-controller/tests/fake-api.client.ts
#	packages/api/session-controller/tests/manager.client.spec.ts
#	packages/api/session-controller/tests/projection-store.client.spec.ts
#	packages/api/session-controller/tests/queue-store.client.spec.ts
#	packages/api/session-controller/tests/session-pending-submissions.client.spec.ts
#	packages/client/connection/src/client/fixture.ts
#	packages/client/connection/tests/fixture.client.spec.ts
#	packages/core/agent-loop/README.i18n.yaml
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/README.zh.md
#	packages/extensions/tool-cordis/src/api-catalog.ts
2026-09-14 14:12:25 +08:00
creatixchu a7070008e7 Merge master and integrate image offload with both DeepSeek protocols 2026-09-14 10:19:11 +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
creatixchu 4e7193945d fix: expose the projection registration async disposer 2026-09-11 15:38:04 +08:00
creatixchu 413ac14b16 refactor: move image offload projection into its plugin 2026-09-11 15:24:45 +08:00
Chinesezjc fed65b7cad Merge master into the Auto review branch
Resolve 36 conflicts across source, bilingual READMEs, and generated
documentation: keep master's command-identity and popup APIs, RemoteMock
test infrastructure, and regenerated catalogs; keep the Auto review
catalog, slot, dismissal, and snapshot content.
2026-09-11 14:15:32 +08:00
creatixchu ec3560c42e Merge master 16bf879af2 into image offload branch 2026-09-11 13:40:19 +08:00
creatixchu b5e7fca4a5 feat(compaction): record image offload decisions without message replacement 2026-09-10 16:47:50 +08:00
_Kerman eb0a666415 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-3828
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/subsystems/session.i18n.yaml
#	packages/core/session/README.i18n.yaml
2026-09-10 11:19:25 +08:00
creatixchu 43bf1d3f93 Merge remote-tracking branch 'origin/master' into worktree/pr-3819-release-sync 2026-09-09 17:56:14 +08:00
_Kerman 28548ba1c7 Merge remote-tracking branch 'origin/master' into xtr/durable-inbox-web-recovery 2026-09-09 17:51:55 +08:00
creatixchu f5804826a8 Merge remote-tracking branch 'origin/master' into codex/pr-3819 2026-09-09 17:13:08 +08:00
Tianyi Cui 56c4c3e47c docs(session): centralize format status and timeless guidance 2026-09-09 17:06:03 +08:00
Tianyi Cui 7b6b8a2baa docs(session): correct released V3 compatibility guidance 2026-09-09 15:32:55 +08:00
yudshj 4158a96e14 feat(web): add native file actions to artifact cards 2026-09-09 15:26:28 +08:00
_Kerman 14da43d9ff docs(session): link deprecated readers to the history policy 2026-09-09 14:51:50 +08:00
_Kerman cb999713d1 Merge latest master into xtr/durable-inbox-web-recovery 2026-09-09 14:31:52 +08:00
_Kerman 5cfc765ff6 docs(session): deprecate direct event readers 2026-09-09 12:11:13 +08:00
pku-xht 55e53907ab feat(permission): add experimental Auto review 2026-09-09 04:36:19 +08:00
Tianyi Cui 657e68186a fix(session): canonicalize V3 envelopes through adjacent migration 2026-09-08 16:56:52 +08:00
Tianyi Cui 627747d8fa docs: synchronize prompt admission contracts and repair lifecycle diagram
Copy the current SessionEventMap prompt and route JSDoc into both subsystem references so type-equiv validates the prepared-route and clear-all semantics. Remove the Mermaid statement delimiter from the generated retry note while retaining the same lifecycle meaning; regenerate graph artifacts and confirm both bilingual pairs.

Validation: verify-type-equiv, verify-mermaid, verify-doc-graphs, scoped verify-translation-pairing, and git diff --check.
2026-09-07 11:09:40 +08:00
Tianyi Cui c988a6796f feat(agent-loop): append system prompt changes on capable routes
Consolidate the existing in-history capability, loop, UI and artifacts into one baseline. Preserve the reviewed tree so each independently verified correction has a subsequent rationale-rich commit.
2026-09-07 11:09:39 +08:00
Tianyi Cui ee956c720d refactor(session): represent the system prompt as surface node zero
Consolidate the representation-change PR and its rebase reconciliations into one baseline. Preserve the exact tree and keep the in-history feature in the dependent PR. Follow-up fixes remain separate.
2026-09-06 20:42:43 +08:00