Files
deepseek-harness/packages/experimental/tool-subagent-oar
Turtle 38c7a9fbf4 feat(release): publish package source, declaration maps, and documentation (#5884)
* feat(release): publish package source, declaration maps, and documentation

Every release member publishes its TypeScript source and the declaration
maps that resolve into it, and @deepseek-ai/dsh publishes the repository
Markdown documentation staged from docs/ at prepack time.

The ./src/* export most members already declared now resolves for an
installed consumer, and a consumer editor follows a declaration to the
implementation. Bundled JavaScript maps stay unpublished; the vendored
family and the Desktop runtime file policy are unchanged.

Rationale: .agents/notes/implemented/process/2026-10-08-published-source-and-docs.md

* feat(release): publish JavaScript maps and compress bundles

Every emitted JavaScript map ships beside the bundle it describes, and the
workspace build and the client preset compress bundles without mangling
identifiers.

The documentation payload now mirrors the website publication manifest and
is removed again by `postpack`; Desktop and the Python executable exclude
the published source, documentation, and maps; `clean` removes a staged
copy. Typert's publication contract gains the Remote declaration map.

* fix(release): keep node bundles readable for the worker image

The browser worker image lowers `yield*` only as a whole statement and
rewrites `for await` loops by their source layout, so compressed node-side
entries either fail that lowering or lower to unparseable code. Only the
browser bundles keep compression, which removes about a third of their text.

The bundle-purity assertion now matches the module-loader call regardless of
the quote style compression picks, and the release-pack fixture exercises
the installed package's new documentation requirement.

* feat(release): publish the whole documentation tree

`@deepseek-ai/dsh` copies `docs/` in full instead of the website's page
set: the maintainer documents, the generated migration records, the
translation guidelines, and the `*.i18n.yaml` consistency records ship
with the installed package, so the documentation's own links resolve
without a checkout.

* feat(release): publish the upgrade guides with the documentation

The staged documentation keeps the website's page set and adds every
`docs/upgrade-guide/` document, which is what an installed reader consults
when a released change breaks something. The rest of the maintainer tree
stays out.

* test(release): expect source and maps in master's new payload cases

* feat(release): keep installed docs and source readable in Desktop

Desktop keeps the published src/ and docs/ trees inside app.asar, and
every model shell call receives DSH_INSTALL_DIR and DSH_NODE_EXECUTABLE
so an agent can read them through Electron's Node mode. Staging also
generates docs/upgrade-guide/README.md, an index of the upgrade guides
grouped by the release they upgrade from.

Minified client bundles print string literals with backticks: the
worker image packer now recognizes those chunk requests, client license
banners are prepended after minification so their text survives, and
the affected artifact tests accept either quote.

* test(desktop): read archived docs through the Windows PowerShell form

Regenerate the config catalog for the shifted shell-env source line.

* test(desktop): wait for the GUI-subsystem Electron process from PowerShell

* build(release): publish source and maps from the message-quotes package

* build(release): publish source and maps from packages new on master

* build(release): publish source and maps from the tool-office package
2026-11-05 00:22:36 +08:00
..

description, kind
description kind
Expose one external subagent tool that selects a configured runtime for each task. package-reference

@deepseek-ai/dsh-experimental-tool-subagent-oar

English | 中文

Summary

Use one subagent_oar tool to choose a configured external agent for each standalone text task. Configuration fixes the available runtime aliases and their providers; the model selects an alias without changing native arguments or permissions. Each task uses independent context and returns the child's name, with a later completion notice delivered to the parent.

Table of Contents


Use this package

Mount this tool beside configured external providers, such as OAR provider instances. Declare the tool and provider packages as dependencies of your composition.

When to choose it

Choose this tool when one model-facing entry should select among independent, one-shot providers. It rejects providers that inherit the parent conversation or support continuation. Use the shared subagent tool for continuable child agents or broader child configuration.

Minimal configuration

With oar-codex and oar-claude already registered, mount this row in the composition:

- name: '@deepseek-ai/dsh-experimental-tool-subagent-oar'
  config:
    providers:
      codex: oar-codex
      claude: oar-claude
Field Default Meaning
providers required Nonempty map from model-visible runtime aliases to registered provider names
toolName subagent_oar Tool name; every mounted instance needs a distinct name

The configuration catalog owns accepted fields and validation. A call requires runtime, description, and prompt. Optional name names the child, unique among the caller's children and cannot be lead; omission selects agent-1, agent-2, and so on, under the subagent runtime's name rule. Optional cwd selects the child directory, with relative paths resolved from the parent's current directory. The prompt must contain the context the child needs. Native installation, authentication, model settings, and permissions belong to the selected provider.


Understand the implementation

Implementation internals — click to expand

src/index.ts builds the runtime enum from the configured aliases and registers one tool. Each call resolves its provider and starts an activation through the shared subagent service, which owns capacity, parent lifetime, cancellation, terminal recording, and completion delivery. The tool's call card uses the task description and submitted arguments. The result records { kind: 'activation', name } as presentation metadata. Disposing the plugin removes its tool registration; the activation manager retains ownership of accepted children.


Further Exploration


Model Experience

External delegation tool

What the model sees

The tool catalog owns the description and argument schema. The runtime enum contains the configured aliases. After acceptance, the tool returns started subagent <name>, where <name> is the child's full name from the root, such as reviewer. The shared subagent service later supplies the child's answer or failure notice.

Token effect

Each mounted instance adds one tool schema, including the optional name field. The acknowledgement and completion notice append to the parent context; the provider owns the child's independent context and token use.

KV Cache effect

Changing the configured aliases, tool name, or registration changes the tool schema in later requests. Acknowledgements and completion notices append after the reusable parent prefix.

Known Limitations and Deferred Work

The tool's choices and execution capabilities are fixed by its configured providers.

  • One-shot providers only: child context is independent, and the tool exposes no follow-up, resume, structured output, or per-call native permission override.
  • Provider availability: a selected provider that is absent or unloaded fails at call time; its configured alias remains in the schema until this tool's configuration changes.
  • Provider-owned work: runtime setup, startup cancellation, process cleanup, and answer selection follow the selected provider's documented behavior. Removing this tool does not revoke accepted activations.

Dev Note

Working context for maintainers — click to expand

None.