Resolves import conflicts with the brand-export split (#8214): value
brand factories are now brandString<T>() calls, and dsh-workflow's
WorkflowRunId is imported from its types entry. Generated persistence
and config catalogs are regenerated.
A fatal WorkflowError such as AGENT_CAP or ITEM_CAP was rendered to text
inside the PTC guest, so the workflow tool could only report RUN_FAILED.
WorkflowResult and the workflow/end payload now carry errorCode, the
code of the fatal error that ended an error run; the host validates it
at the process boundary and the tool fails with that code. RUN_FAILED
remains only for an error run without one: the script's own exception or
an engine runtime failure. WorkflowError narrows code to
WorkflowErrorCode.
Refs #7869
Move packages/api/session-status (@deepseek-ai/dsh-api-session-status) to
packages/client/ui-session-status (@deepseek-ai/dsh-client-ui-session-status):
the package has no Remote or Host behavior and depends on ui-session, so it
belongs to the Client group. The uiSession.sessionStatus service,
ctx.uiSession.sessionStatus, useSessionStatus, and UiSessionService keep
their names.
Add the package to the Web client's required boot entries, so startup is
rejected when the status table cannot be imported or fails to apply, as it
was when the table lived in the required ui-session entry.
Refs #4076
Move the Client Session status table (running state, the effective
pending interaction, and completion reminders) and the useSessionStatus
root hook out of ui-session into the new @deepseek-ai/dsh-api-session-status
package. The UiSessionStatus service is provided as uiSession.sessionStatus
and read as ctx.uiSession.sessionStatus through the mergeable
UiSessionService type of ctx.uiSession.
Pending-interaction registration, precedence, withdrawal, and teardown
delegation stay in ui-session unchanged; ui-session now exposes the
effective requests read-only as ctx.uiSession.pendingInteractions, which
the status table and the Conversation stop shortcut consume. ui-session no
longer depends on api-remotes.
Refs #4076
With replScoped: true, persistent-in-memory runs each call as a separate
VM Script in one retained context. Each call starts with copies of the
top-level bindings left by earlier calls, so a later call may declare any
earlier name again with any keyword while earlier functions and
still-running code keep their values. Results, top-level await, errors
and asynchronous failures follow the existing REPL evaluator; modules
load only through dynamic import(), resolved from the environment's first
working directory.
The control protocol moves to version 3; the upgrade guide covers
preinstalled bootstraps and the new PtcProgramFormat member. The Agent
Note records the decision and its comparison with node:repl and
vm-script, and the ptc-scoped-repl snapshot pins the model guidance.
Add the forge subsystem's extension API section, README and cookbook
coverage, the generated Cordis, config, slot, and event catalogs, and a
recorded forge-panel e2e case that loads a fixture plugin registering a
lens, annotations, and every new slot.
- ForgeActionFailure gains `unknown` for an answer that does not confirm
the outcome; the GitHub provider passes it on instead of `failed`, the
panel Remote refuses with `forgePanel/action-unknown`, a viewed mark
stays, and the other actions ask the reader to check the browser.
- Reruns skip workflow runs with a pending check, try every finished run,
and report the refused ones together; the card offers a rerun only when
a failed check's run has finished.
- Review requests resolve users and teams to node ids and call
`requestReviews`, which GitHub Enterprise Server 3.19 and 3.20 have;
bots still go through `requestReviewsByLogin`.
- Viewed marks are kept per change request and head, so a reread at the
same head keeps writes in flight and their locks, and paths named after
object properties read only their own entries.
- The reviewer search never chooses from the listing of an earlier query.
- Documentation states the unknown code, the branch update evidence, and
the `canBeRebased` approximation, and drops stray blank lines.
The forge subsystem page gains the overview and viewed mark types and
contracts, and the generated Cordis, configuration, and event catalogs
follow the new service methods and the maxViewedFiles option.
run_code argument checks now throw ToolArgsError (INVALID_ARGS),
including timeoutMs or sandbox_permissions passed to a runtime whose
schema does not expose them; a missing runtime, workingDirectory, or
sandboxPolicy throws ToolContextUnavailableError. CodeRunFailedError
gains CODE_RUN_UNAVAILABLE after executor disposal, keeping
CODE_RUN_FAILED as the default. A runtime
rejection without its own code becomes CODE_RUN_FAILED with the
rejection as cause; caller cancellation keeps the signal's reason.
The PTC runtime Service Definition adds PtcRuntimeError for contract
misuse: PTC_RUNTIME_INVALID_ARGUMENT, PTC_RUNTIME_UNAVAILABLE, and
PTC_RUNTIME_CONFLICT. The Node runtime throws it for invalid specs and
bindings, use after disposal, incomplete retained cleanup, concurrent
runs for one owner, and a retained environment under another sandbox
policy. dsh-ptc-runtime now declares @deepseek-ai/dsh-error.
Refs #7869
plugin_manager argument checks now throw ToolArgsError (INVALID_ARGS).
Failures thrown outside a change result carry PluginManagerError:
PLUGIN_MANAGER_PROFILE_READ_FAILED when listPlugins or listBundles
cannot read the profile manifest, patches, version exemptions, or
installation manifest, and PLUGIN_MANAGER_UNAVAILABLE after disposal.
atomic-write now throws FileLockError (FILE_LOCK_TIMEOUT, naming
lockPath) when another writer holds the lock past the deadline, so
every withFileLock caller, including plugin_manager, reports a
structured lock timeout. Both packages depend on @deepseek-ai/dsh-error
for HarnessError.
Refs #7869
cordis_inspect_query failures now carry InspectError codes for unknown
providers and methods, invalid input or output, a missing Client page or
registry disposal, the Client deadline, and Host provider failures
without their own HarnessError (INSPECT_FAILED, original error as
cause). Cancellation rethrows the signal's reason instead of a plain
cancellation message. tool-cordis reports a missing Agent or Loader as
ToolContextUnavailableError, malformed Config paging as ToolArgsError,
and an unknown entry id as INSPECT_TARGET_NOT_FOUND.
Tools a dynamic plugin defines through harness.defineTool now fail with
PluginToolError: PLUGIN_TOOL_FAILED for a thrown value, keeping its
message and any string code in the message, and
PLUGIN_TOOL_INVALID_RESULT for a non-JSON result. HarnessErrors and
failures after cancellation keep their identity.
Refs #7869
The skill tool now reports invalid names, unknown skills, and skills
excluded from model invocation as SkillError with SKILL_INVALID_NAME,
SKILL_NOT_FOUND, and SKILL_NOT_MODEL_INVOCABLE. Registry validation of
provider catalogs, candidates, loaded definitions, and runtime
registrations throws SKILL_INVALID_DEFINITION, and a host-filesystem
SKILL.md read that fails for a reason other than absence throws
SKILL_READ_FAILED with the system error as cause. Messages are unchanged.
Refs #7869
MCP tool and resource calls now fail with structured identity instead of
plain Error text. An upstream isError result throws McpToolError with
MCP_TOOL_ERROR; task-required tools and invalid results use
MCP_UNSUPPORTED_TASK_EXECUTION and MCP_INVALID_RESULT. SDK and JSON-RPC
request failures map to MCP_CONNECTION_CLOSED, MCP_TIMEOUT,
MCP_SERVER_UNAVAILABLE, MCP_INVALID_RESULT, or MCP_REQUEST_FAILED, with
the JSON-RPC or SDK code in the message. Redaction replaces only the
message and keeps name and code.
The SDK reports an aborted request as REQUEST_TIMEOUT, so the bridge
rethrows caller cancellation and connection-generation closure as their
own reasons before classifying. McpLocalError now extends HarnessError
with closed codes for closure, deadlines, credentials, instruction size,
and registration conflicts. An out-of-scope resource server fails as
ToolArgsError because mcp-resources cannot depend on mcp-client.
Refs #7869