Commit Graph
134 Commits
Author SHA1 Message Date
_Kerman 2be80e3619 fix(sdk): select tool executors through profile overlays 2026-10-21 12:13:58 +08:00
_Kerman 38b9a095f3 Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/web/tool-web/tests/integration.spec.ts
#	pnpm-lock.yaml
#	scripts/check-workspace-constraints.spec.ts
#	scripts/check-workspace-constraints.ts
2026-10-21 11:22:06 +08:00
Turtleandturtle1999 2f01ad549c fix(web)!: let web_fetch reach non-public destinations
The HTTP fetch provider resolved each hostname, rejected any non-public
answer, and pinned the connection. That refused every page behind
TUN-mode proxies with fake-IP DNS and did not confine a model that has
shell network access. Requests now go through the installed proxy
dispatcher and the system resolver with no address restriction.

HttpFetchResolver and the HttpFetchProvider resolver parameter are
removed; the upgrade guide covers the migration.

Co-authored-by: turtle1999 <301751225+turtle1999@users.noreply.github.com>
2026-10-20 12:44:14 +08:00
_Kerman 78b577faa4 refactor(profiles): select PTC execution through overlays 2026-10-19 17:34:49 +08:00
ZiyaandZiyaZhang 114da79e42 fix(agent-instructions): budget the user-global and project chains separately (#6400)
* fix(agent-instructions): budget the user-global and project chains separately

The user-global and project instruction files shared one maxBytes and the user-global files were the broadest, so a large project chain omitted them first. Each chain now renders under maxBytes on its own and the results share one system-reminder frame: unchanged output when everything fits or one chain is empty, at most twice maxBytes otherwise. The project chain keeps its omit-broadest-first, truncate-last rule; reconciliation batches follow the same split; the maxBytes key and the baseline identity are unchanged.

Tests cover the fast paths, both chains fitting only separately, each chain over its own budget, the 2 × maxBytes boundary at exact and tiny limits, multibyte content, reconciliation batches, and a resumed single-budget baseline receiving the user-global file as one transition. The agent-instructions-budget snapshot is refreshed and agent-instructions-budget-chains is added. README, Config.maxBytes JSDoc, the configuration catalog, a new Agent Note, and an upgrade guide state the per-chain bound.

* fix(agent-instructions): keep loaded order in merged frames and note the unshared chain budget

A merged frame now lists sections, omissions and truncations in the loaded order, so a reconciliation batch renders its items in one order whether or not it fits a single budget. The guard comment states only the invariant and points to the Agent Note; the intro selection states its rule. The README names the unshared budget between chains.

---------

Co-authored-by: ZiyaZhang <199893125+ZiyaZhang@users.noreply.github.com>
2026-10-18 00:45:39 -07:00
Turtle 6bf5668e79 Harden profile replacement against case aliases and Windows rename errors
Reject case variants of shipped profile names, detect a concurrent winner by
the target's state instead of errno, warn instead of failing when staging
cleanup fails after a successful replacement, and cover the restore paths with
deterministic tests. Update the profile Agent Note, reference recovery path,
and upgrade-guide migration steps.
2026-10-14 12:12:52 +08:00
Turtle 8843c37e37 Make --from-default-profile replace an existing custom profile
Repeated rescue runs such as `dsh rescue --from-default-profile web` failed
because the target profile already existed. The option now assembles a fresh
template copy in a staging directory, moves it over the target, and deletes the
previous profile; a failed move restores it.
2026-10-14 11:56:17 +08:00
LogosVeritas b560423995 fix(minimal): configure tools and complete image offload recovery 2026-10-13 11:25:18 +08:00
Yichen Yan ac080346f0 Support native HTTPS Web listeners 2026-10-08 19:49:01 +08:00
Yichen Yanandliukx0205 cb9a590c86 Support concrete Web listener bind addresses
Co-authored-by: liukx0205 <harusoda@berkeley.edu>
2026-10-08 18:25:43 +08:00
Tianyi Cui 4359d3ee17 refactor(tools): remove mixed tool presentation 2026-10-07 01:57:57 +08:00
Tianyi Cui 231d5a311e fix(cli): bound CLI help alias discovery and document plugin option placement
`collectCliHelp` stops propagating an alias when it reaches a page
already on the current path, so a `help [command]` row that prints its
parent's help no longer recurses until the stack overflows. `serve|s`
command rows are split into separately collected names.

The CLI reference and upgrade guide describe the forwarded-argument
boundary that Commander applies, including a leading pnpm option, and
args.spec.ts pins that `--profile` placed after a leading pnpm option is
forwarded. Generated pages use the repository's two-line generated
header, and docs/AGENTS.md lists the CLI help among the generated
references.

Refs #4114
2026-10-05 17:45:17 +08:00
Tianyi Cui 75935af1d0 feat(cli): generate the CLI help reference and add dsh plugin help
`scripts/gen-cli-help.ts` runs the source `dsh` launcher with temporary
Harness and Agents homes and captures the launcher, `dsh plugin`, and every
shipped profile's text help (profile names come from `PROFILE_TEMPLATES`).
It recursively discovers subcommands from each page's `Commands:` section,
shows identical alias help once with every invocation, and writes
`docs/cli-help.md`, its Chinese page, and their pairing record. The record
resolves links between the two pages as written, so a first run already
matches `verify-translation-pairing`. `verify-cli-help` checks all three
files and runs as the `cli-help` doc-sync leaf, which the static CI lane
also runs on an unbuilt tree.

`dsh plugin` now owns `-h`/`--help` and reads its own options only before
the forwarded pnpm arguments: `dsh plugin --help` prints its help instead of
failing on the missing `--profile`, while everything after the pnpm command
(including `-h`, `--help`, and `--profile`) reaches pnpm verbatim. A
`--profile` placed after the pnpm command is no longer accepted; the
v0.2.1-alpha.1 upgrade guide covers the migration.

Refs #4114
2026-10-05 17:45:17 +08:00
Yichen Yanandliukx0205 a7c3ad99bc feat(web): advertise a configured public application URL (#3972)
* feat(web): advertise a configured public application URL

* test(session): restore migration verifier prefix coverage

* test(llm): synchronize idle timeout with provider request

* Remove unrelated migration Worker lifecycle changes

---------

Co-authored-by: liukx0205 <harusoda@berkeley.edu>
2026-09-30 17:46:52 +08:00
turtle1999 7ded036fdb feat(web): add Session Log upload preference in General settings (#5337) 2026-09-28 17:55:03 +08:00
Turtle e7def469e1 feat(i18n): key translation pairing records by heading section (#5036)
* feat(i18n): key translation pairing records by heading section

Replace the whole-file blob hashes in *.i18n.yaml with one entry per
heading section that still holds language-specific content, keyed by the
English heading-slug path. Blocks identical across the pair (generated
table rows, code blocks, shared regions) stay out of the hash, so edits to
different sections and identical regenerations merge with Git's default
text merge, including on GitHub.

Remove the dsh-translation-pairing merge driver, its resolver command and
installer wiring; gen-translation-brief recovers last-confirmed text from
commit history. Migrate all active records, archive the superseded Agent
Note, and record the replayed conflict reduction in the new one.

* test(i18n): refresh translation prompt snapshot for the terminology note

* feat(i18n): exclude only code blocks and generated regions from pairing records

Replace byte-equality masking with an explicit rule: a record hash skips
fenced code blocks and BEGIN/END GENERATED regions, the two kinds of
content the pairing gate already requires to be identical on both sides.

Move generated data into regions written into both pages:
gen-config-catalog renders both languages and the record with per-package
regions labelled by code identifiers; gen-module-graph keeps its table in a
region; gen-doc-graphs splices the event matrix regions into the Chinese
page. Add a generic region splice beside the region grammar.
2026-09-23 22:32:06 +08:00
Turtle 4eb26f0e71 feat(cli): export JSON Schema for Cordis configuration (#4705)
* feat(cli): dump native Cordis config schemas

* test(cli): include schema dump in launcher help snapshot

* feat(cli): export JSON Schema for Cordis configuration

* fix(cli): preserve config schema discovery and annotations

* fix(cli): conservatively project effectful config validation

* refactor(boot): encapsulate profile config schema generation

* fix(cli): follow Loader disabling and native writeback in config schema

- Dormant group/include rows (disabled without group: true) may omit
  config and are recorded as childless trees; the entry schema skips
  their child declarations, matching the Loader, which never creates them.
- Lazy builders run once per document, and a wrapped null-only projection
  keeps a deduplicated type list so the document stays compilable.
- Union widening applies only when an earlier branch can write adapted
  values back through a container; +Infinity max and -Infinity min
  without a step are treated as the native no-ops they are.
- Projection limitations repeat at every entry sharing a Config, and the
  entry schema documents the boolean/expression domain of disabled.
- Record the schema-dump validation policy as an Agent Note.
2026-09-21 09:19:24 +00:00
Yichen Jiang 78dcbc8587 feat(infra): unify Web and Desktop launch commands
Web and Desktop now share one command pair: start:* launches the artifacts
of a prior complete build and dev:* builds first, then launches. start:web
is new and spells out the same source launch vector as `pnpm dsh web`;
dev:web runs `pnpm run build`, the three rebuild watchers, and `dsh web` in
one terminal, with --skip-build and --no-serve for the previous two-terminal
flow. The launcher gate pins both scripts to the dsh CLI, and a root
Makefile names the same commands as make web|dev-web|desktop|dev-desktop|build.

The dev-web stage supervisor waits for stages the terminal already
interrupted, escalates only survivors, forwards SIGTERM once, and reports a
stage that exits on its own. Signal listeners are persistent because the
tsdown watchers bundle signal-exit, which re-raises a signal when it finds
no other listener.
2026-09-20 15:50:41 +08:00
Tianyi Cui 8b0b2dc1d8 Merge master b86916de into release/session-log-v4
Integrate the master tip observed for the final V4 landing preparation on
top of the already merged migration stack. Preserve the V4 writer, flat
message migration, extension policy, catalog validation and historical
recordings while bringing in upstream profile resolution and desktop/UI
changes.

Resolve four generated translation-pairing records from the combined
English/Chinese text. Keep this master checkpoint separate from any
integration fixes and retain all reviewed parent history. Follow-up
validation covers the affected launch/UI paths and migration replay.
2026-09-19 18:00:36 +08:00
imccyu cf3505b88e docs: call the package table the runtime resolution everywhere it is named
The generation note keeps generation for succession only and names the table, the interception, and the routes with the code's words; the CLI reference, Desktop, plugin-package-inventory, and loader-smoke READMEs, the bundled-runtime, agent-teams, plugin-bundles, and source-launch notes, and the client AGENTS guide follow. Pairing records re-recorded.
2026-09-19 17:06:35 +08:00
imccyu fcc6cc8c12 docs(boot): align runtime-only resolution contracts 2026-09-19 13:29:13 +08:00
Tianyi Cui 335c5cbe26 fix(cli): keep source profile imports in one module graph
The runtime profile default is correct for installed applications, but the
supported TypeScript CLI also runs tsx workspace aliases. In that launch,
profile resolution loaded both packages/core/tools/src/index.ts and
packages/core/tools/lib/index.js. The ToolRuntime instance and agent-loop
consumer therefore held different private TOOL_RUNTIME_SCHEDULER symbols;
the first tool call failed while reading scheduler.prepare.

The source bin now explicitly selects linked profile resolution using its
own .ts module identity. Built and packaged launches keep runtime resolution,
and explicit runProfile overrides remain unchanged. No service or symbol
identity is widened to conceal duplicate module instances.

Forward the existing sourceImport option through runLoaderSmoke and select
tsx/esm for headless source snapshots. This exercises the actual supported
source-launch vector while retaining the same recorded Session and expected
outputs. The loader-smoke subprocess test covers forwarding that hook.

Evidence: the official tsx/esm compaction replay failed before the fix while
loading both Tools module URLs. After the fix it loads only src/index.ts and
prints COMPACTION RECOVERED. The same focused replay passes under both
DSH_EXAMPLE_MODE=src and lib after rebuilding Host artifacts. The 43 CLI and
loader tests passed, including runtime defaults and explicit link/dual/runtime
overrides. Loader-smoke coverage passed 25 tests with 100% statements,
branches, functions, and lines. Host build, full lint, and all 41 doc-sync
gates passed. Recorded JSONL generations and snapshot normalization are
unchanged; temporary diagnostics were removed from built artifacts.
2026-09-18 00:06:26 +08:00
imccyu 0ea890044f test(cli): cover runtime profile defaults and sync docs 2026-09-17 20:23:14 +08:00
turtle1999 053cad9442 fix(cli): complete startup diagnostics before exiting 2026-09-16 21:40:54 +08:00
turtle1999 18260e3b0c fix(cli): save full startup diagnostics under DSH_HOME logs 2026-09-16 20:11:15 +08:00
Turtle 7d4188b450 fix(cli): address profile shorthand review feedback 2026-09-15 16:49:03 +08:00
Turtle 1d6534a810 feat(cli): support profile command shorthand 2026-09-15 16:49:02 +08:00
Turtle abd765a600 refactor(hmr): own profile reload lifecycle through YAML 2026-09-15 13:01:06 +08:00
imccyu 6aa2e4633c feat(boot): add profile resolution modes 2026-09-14 22:30:48 +08:00
creatixchu 31ec6bc7e3 fix(session): keep upload defaults independent of test runners 2026-09-14 21:15:42 +08:00
j-xiang 89743f33b2 docs(i18n): polish reviewed README terminology 2026-09-10 01:42:58 +08:00
j-xiang 8e8fb2fc62 docs(i18n): proofread bilingual README corpus 2026-09-10 00:21:32 +08:00
fz 61cd1a3f91 Merge origin/master into feat/remove-str-replace-editor-from-minimal 2026-09-08 13:51:47 +08:00
Turtle 7a7b7d5a53 fix(cli): make profile template creation exclusive 2026-09-07 20:46:40 +08:00
Turtle dd25e1e6b3 feat(cli): create profiles from shipped templates 2026-09-07 19:58:41 +08:00
fz 40539e9002 Merge origin/master into feat/remove-str-replace-editor-from-minimal 2026-09-06 00:58:49 +08:00
Tianyi Cui 9ffe85a512 OTel uploads explicit feedback for all users by default 2026-09-05 23:21:23 +08:00
ChinesezjcandTianyi Cui 02a029e679 Feedback is recorded in the session log and delivered through DeepSeek
Co-authored-by: Tianyi Cui <53024+tianyicui@users.noreply.github.com>
2026-09-05 23:21:22 +08:00
fz 63795eaa5c feat(minimal): remove str_replace_editor from minimal profiles 2026-09-03 16:03:59 +08:00
Yichen Jiang bdd294dc47 Merge remote-tracking branch 'origin/master' into worktree/deepseek-harness-proxy-config-2f5b4a 2026-09-01 21:21:22 +08:00
fz 0a0f9e59ff feat(base): expose web fetch by default 2026-09-01 15:18:18 +08:00
Yichen Jiang 545e2ad914 feat(net): route every outbound request through the configured proxy
Node's built-in fetch ignores HTTP_PROXY, so every harness request connected
directly regardless of what the user exported. Resolve one policy from the
launch environment and install it as undici's global dispatcher, then wire the
four surfaces a global dispatcher cannot reach: web_fetch's pinned transport,
the OTLP exporter's node:http agent, the E2B SDK's own proxy option, and the
environment a child process or worker thread is given.

Each outbound call site carries an egress test that drives its real code path
through a fake proxy; that measurement is what found the OTLP and E2B gaps.
2026-08-29 13:17:11 +08:00
Tianyi Cui cf12723ba8 docs: re-record pairing hashes after the master rebase merge
The rebase merged master's SDK-example and telemetry prose with the
ptc renames in the tools and CLI reference READMEs and the executor
collapse note; re-record their pair hashes.
2026-08-27 23:14:33 +08:00
imccyu e57e7c3f25 docs(api): describe Connection-owned transport 2026-08-27 22:26:30 +08:00
creatixchu 9c37f7a553 Merge remote-tracking branch 'origin/master' into worktree/feedback-otel-enable
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
#	apps/cli/reference/README.md
#	apps/cli/reference/README.zh.md
#	packages/bundle/base/cordis.patch.yml
2026-08-26 10:06:55 +08:00
creatixchu ac4a2f9792 fix(feedback): address review — accurate release wording, current-state notes, default-mode snapshot lane 2026-08-26 10:05:31 +08:00
fengsy 1477d5b9ef fix(profile): preserve current fallback architecture after rebase 2026-08-26 00:15:18 +08:00
Magolor 0b5eba0c8d docs: rebuild the documentation skill and standards (#2983) 2026-08-25 23:47:20 +08:00
lsdsjy 937d2b3513 feat(headless): stream reasoning progress to stderr 2026-08-25 18:51:37 +08:00
Dudu-0223 aaf0924b48 Merge origin/master into fix/web-fetch-ssrf 2026-08-25 14:40:51 +08:00