A user-rejected approval now records ApprovalError with
APPROVAL_REJECTED on tool/result, so the Auto review e2e asserts that
identity instead of an absent error.
Refs #7869
JobError and TerminalError only need the error base, so dsh-jobs and
dsh-terminal depend on dsh-error instead of the LLM runtime. The Python
SDK runtime closure includes the new package.
Refs #7869
dsh-llm depends on dsh-attachment and dsh-typert-protocol, so classes in
those packages could not extend a base defined in dsh-llm without a
project-reference cycle. HarnessError now lives in @deepseek-ai/dsh-error,
which has no dependencies; dsh-llm declares it as a peer and re-exports
the same class, so existing imports and instanceof checks keep working.
The Agent Note records why the original leaf-package placement no longer
holds.
Refs #7869
A Gemini API route cannot authenticate without a key, so the create card
and the editor require one. Its models offer only minimal, low, medium,
and high, each sent under its own name, with no Off.
Co-authored-by: LegGasai <[email protected]>
Type the approval denial helper with a closed ApprovalErrorCode, state
that a cancellation is recognized by the signal reason or an Error named
AbortError, note that ApprovalError names a denial rather than a thrown
class, and separate JOB_CONTROLLER_UNAVAILABLE from a missing jobs
service. The jobs README describes JobError as the seam's export rather
than as current caller behavior, and the terminal test asserts one
concurrent send failure.
Refs #7869
The reminder rebuilt a downstream post-execute block from its feedback
and contexts, which would drop the block's new optional info. It now
spreads the downstream decision, so a blocked call keeps its structured
error identity when the reminder fires.
Refs #7869
The plugin entry may export only Loader fields and Service or Error
classes, so the ApprovalError and ToolContextUnavailableError code
constants move to an internal module; the recorded strings are
unchanged.
Refs #7869
Add pi-ai's google-generative-ai protocol to hand-declared routes, read
Gemini's native model listing during discovery, and offer it as "Gemini
API" in the Custom model API form.
Refs #7978
Co-authored-by: LegGasai <[email protected]>
* feat(gates): reject value exports on function plugin entries
A function plugin entry may export only the Loader fields (name, inject,
Config, apply), types, and classes whose instances extend Cordis Service or
Error, as docs/defensive-patterns/package-surface.md requires. The new
verify-plugin-entry-exports gate reads every packages/*/*/src/index.ts that
exports a value apply through the Host and then the Client compiler face,
and rejects any other value export, including a default export beside
apply, values that arrive through export *, and exports that do not resolve.
Exports that predate the gate are listed per package in
scripts/plugin-entry-existing-exports.ts. A listed export passes; a line
fails when its package has no function plugin entry, its list is empty or
repeats a name, or it names an export the entry no longer reports.
* docs(gates): mark new existing-export lines as rule exceptions
A line added to scripts/plugin-entry-existing-exports.ts after the gate's
introduction is an exception under the plugin entry rule in
docs/defensive-patterns/package-surface.md, which requires the domain
owner's confirmation.
* fix(gates): report a default export beside apply even when it is a class
The class allowance also covered the default export, so a function plugin
entry that default-exported a class extending Cordis Service or Error beside
apply passed the gate. The Loader then loads that default export instead of
the module namespace, which is the mixed plugin form the rule forbids. A
default export beside apply is now reported whatever it holds.
* fix(gates): judge plugin entry exports by their run-time export paths
The gate read TypeScript's export table, which differs from what the entry
exports at run time in two forms. An `export type { x }` hid a value that
`export *` brings in under the same name, although the type-only export is
erased and the value stays. A name that a nested `export type *` reaches was
reported as a value, although nothing reaches the entry at run time.
The gate now walks the emitted export forms: type-only exports and declare
declarations emit nothing, a re-export emits only a run-time export of its
target, and `export *` brings in every run-time name of its target except
default and the names the module exports itself. An `export *` whose module
does not resolve is reported as `*`.
* feat(gates): check service plugin entries for value exports
The plugin entry rule in docs/defensive-patterns/package-surface.md covers
both entry forms: a function plugin exports the Loader fields, a service
plugin default-exports its plugin class, and beyond those a Host entry may
export only Service Definition classes and error types. The gate checked
only function plugins, so a value on a service plugin entry, which another
package imports past the Loader row just the same, went unreported, and an
entry could escape the gate by default-exporting a class.
An entry without apply whose default export is a class the Loader can
construct is now a service plugin. Its default class passes under any name,
as do types and classes extending Cordis Service or Error; name, inject,
Config, and every other value are reported. Libraries, a default export
that is not a class, and an abstract default class, which defines a
capability seam, stay unchecked. The corpus guard now requires both forms.
The existing-export list is regenerated to cover the service plugin
entries' current value exports.
* fix(gates): admit the plugin entry export list as a plugin record name
The plugin entry export list now records the session service entry's
existing value exports, appendPluginRecord among them. Like the published
dependency policy, the list names the function without calling it, so the
plugin record caller gate admits it.
* chore(gates): list the plugin entry exports that landed on master
Master gained value exports on the plugin-manager, llm, and subagent
service entries and renamed office-to-pdf to office-kit before the gate
lands. They predate the gate, so the existing-export list records them.
* feat(worktrees): clean up safe UI checkouts when sessions are archived
* refactor(workspace): share archive notice registration
* refactor(session-query): return observation sessions directly
* docs(worktrees): align archive guide and client catalog after merge
* refactor(worktrees): move archive cleanup into the worktree service
The worktree service now records each checkout it creates as a
`plugin:worktree/created` record, folds them in its own `worktree`
projection with fork-aware ownership, and reclaims a clean, unreferenced
checkout when the Session that created it is archived. The Forge panel
reads the service's record and forwards its cleanup state; it no longer
writes a `created` record, owns a retention projection, or gates every
Session's directory access.
Admission registers the attempt inside the Workspace write queue and
returns; inspection runs afterwards, reading cold Sessions through the
projection cache when mounted and from their log otherwise, with subagent
children of an archived ancestor counted as archived. Only a path being
removed holds `working-directory/access`, whose request now carries the
access's `signal`, and listeners withdraw before the drain. Ignored files
no longer retain a checkout, matching Git's non-force removal; processes
and terminals are not consulted.
The Forge bundle mounts one `worktree` service: the `forge-worktree` row
and the `optional-forge-panel` group that isolated a second service are
gone, and `forge-panel` is a top-level row. `canRemove`, `remove`, the
`forgeWorktreeRetention` projection, and `ForgeWorktreeCleanup` are
removed; `WorktreeService.cleanupOf`, `WorktreeCleanup`, and the
`worktree/cleanup` Host event replace them. The upgrade guide moves to
the current version directory and covers the id removals.
* docs(worktrees): move the archive upgrade guide to v0.2.2-rc.1 and wrap a test line
* test(worktrees): satisfy the static and consumer gates
Move the removal step into `removal.ts` as `removeCheckout`, so the specs
drive the real function and intercept it through a module mock instead of
reaching a private method through an assertion to unknown. Classify
`CREATED_RECORD` as a peer-required Host export for the Forge panel, ship
the compiled `lib/types/*.js` that the `./types` subpath names, refresh the
worktree recorded session with the creation record the service now writes,
and regenerate the module graph.
* refactor(worktrees): share the creation record schema with the Forge panel
The worktree package owns `createdWorktreeSchema`, the validator of its
`plugin:worktree/created` payload; the Forge projection imports it instead
of redeclaring the same object.
* test(web): refresh the Forge plugin card golden for the single worktree row
The card lists six components: the isolated `forge-worktree` row is gone.
* build(worktrees): pin zod to the unified 4.6.6
master unified every zod declaration on 4.6.6, so the worktree package's new
dependency follows it and the lockfile resolves again under --frozen-lockfile.
* test(worktrees): cover every reclamation path for the per-file gate
Drop the dead branches CI's coverage lane found: the placeholder trailing
slash in `within`, the aborted-lifetime check in `schedule`, the rejection
arm of a task that never rejects, and the undefined arms of the cold reads.
`cleanupOf` re-reads the attempt after waiting, so a cold Session without
creations settles to null instead of a stale placeholder. Removals of one
path never overlap, so `remove` keeps one entry per path without chaining.
New cases: a cold Session without creations, a borrower that appears
between inspection and the locked recheck, a subagent child with an unknown
parent, a creation record whose payload fails validation, a live fork that
moved out of the checkout, a cached cold Session without a directory, the
Forge projection ignoring a creation without an open request, the Remote
with and without the service, and the client's removed follow-up.
* feat(worktrees): add the retain-on-archive switch
`retainOnArchive`, a volatile field of the worktree service's Config, skips
cleanup admission while it is on; it is read at each archive, so a change
applies to later archives only. The service keeps its instance off the
generated Settings pages, and the Forge client draws the switch as the
`plugins.row.config` page of the bundle's `worktree` row, staged through
the shared Plugins form until one explicit save.
Docs: the worktree, Forge, and bundle READMEs, the archive-worktrees
upgrade guide, the config and client catalogs, and the
explicit-worktree-creation note.
* docs(module-graph): record the worktree service's settings dependency
`gen-module-graph --check` failed on CI after the retain-on-archive switch
declared `@deepseek-ai/dsh-settings`; regenerate the graph.
* test(snapshots): refresh terminal-panel-tools for master's runtime-context reminder
Master's #7321 wrapped the runtime-context snapshot in a `<system-reminder>`
after this fixture was last refreshed, so `test:snapshot` fails on master's
own tree; refresh the one user message so the replay matches.