100 Commits
Author SHA1 Message Date
Huanqi Cao 99151657c0 fix(pty): import resolvePwshPath from the pwsh-local package root 2026-08-15 20:49:15 +08:00
Huanqi Cao c854749c34 fix(pty): ship dsh-pwsh-local in the python runtime closure 2026-08-15 17:05:19 +08:00
Huanqi Cao 06b766711c fix(pty): pin UTF-8 output encodings in the persistent pwsh bootstrap 2026-08-15 11:45:13 +08:00
Huanqi Cao f61e884917 fix(gates): declare the MIT license for tool-pwsh-persistent 2026-08-15 11:25:23 +08:00
Huanqi Cao a4e2e1e6e9 fix(gates): align tool-pwsh-persistent version and publish access with the rc.6 release 2026-08-15 11:17:35 +08:00
Huanqi Cao bc6a775a31 merge: bring master into feat/pwsh-persistent-pty 2026-08-15 11:14:45 +08:00
Huanqi Cao ed463d74bf fix(workflow): use optional syntax for the tsconfig pin parameter 2026-08-13 15:16:12 +08:00
Huanqi Cao 314fedfc14 docs: record the junction-safe fixture teardown decision 2026-08-13 15:16:12 +08:00
Huanqi Cao 29d420f1ee fix(pwsh): accept link-shaped candidates and sync the README contract 2026-08-13 15:16:12 +08:00
Huanqi Cao 7593842ccf fix(workflow): forward the tsconfig pin only in the unbuilt worker 2026-08-13 15:16:12 +08:00
Huanqi Cao 095fde4ffd test(claude-code): isolate ambient Anthropic model env 2026-08-13 15:16:12 +08:00
Huanqi Cao c29246ae31 fix(pwsh): resolve Store app execution aliases 2026-08-13 15:16:12 +08:00
Huanqi Cao a62884a565 docs: add junction-safe unlink rule to defensive patterns 2026-08-13 15:16:12 +08:00
Huanqi Cao 22d30852f7 test(app-boot): unlink hmr alias junctions before removing the target 2026-08-13 15:16:12 +08:00
Huanqi Cao 9e9073da24 fix(boot): unlink stale profile fallback links instead of rmSync 2026-08-13 15:16:11 +08:00
Huanqi Cao 4ed036da1c fix: Windows-native CI findings on latest master
Local run of check:ci:windows-complete (the windows-native gate) on
latest master surfaced five Windows-only failures, all unreachable by
current CI because the native windows job is disabled and the wine gate
only covers build+site.

- install-lefthook/translation-pairing-merge specs junctioned the real
  scripts/ and tsx package into fixtures; Windows recursive deletion
  (Node rmSync and git worktree remove) follows MOUNT_POINT junctions and
  deleted the repository's own directories mid-run. Fixtures now unlink
  their reparse points before any recursive removal (shared helper in
  scripts/test-fixture-cleanup.ts).
- workflow-workerthread spawned its worker with an empty env; on Windows
  os.tmpdir() then degrades to the literal relative path undefined\temp,
  so tsx wrote its transform cache into a cwd-relative undefined/
  directory inside the repo. The worker env now injects the host temp
  path on win32 (workerSpawnEnv, platform-parameterized and unit-tested
  on both arms).
- workspace-context spec did not stub USERPROFILE (win32 homedir) or a
  set DSH_HOME, leaking the developer machine's real ~/.dsh/AGENTS.md
  into discovery.
- ui-trajectory client-bundle spec mounted the built artifact without the
  remote/settingsScope provides the locale plugin needs, so the plugin
  never activated and no view registered.
- subagent temp-fixture cleanup lacked the maxRetries Windows handle
  release needs under load (EPERM); added retries to the three affected
  specs and the fixture-cleanup helper.
2026-08-13 15:16:11 +08:00
Huanqi Cao f5c0d7e522 merge: bring master's rc.5 release and cordis tool renames into feat/pwsh-persistent-pty 2026-08-13 11:54:16 +08:00
Huanqi Cao 68ba98c29e docs: mirror the pwsh-persistent graph nodes and source lines into the Chinese counterparts 2026-08-13 11:24:43 +08:00
Huanqi Cao b89808cc2d fix(gates): align package version, module graph, and jscpd ignores for the mirrored pwsh stack 2026-08-13 11:10:59 +08:00
Huanqi Cao 6e2a4fd08a test(terminal-bash): cover the spawn signal forwarded into the pwsh bootstrap send 2026-08-13 10:54:23 +08:00
Huanqi Cao 13d859a619 test(subprocess): measure the pipe-drain settle from before the pid-file handoff 2026-08-13 10:47:44 +08:00
Huanqi Cao 82c53ee209 fix(terminal-bash): fall back to dialect defaults when Schemastery materializes empty shell values 2026-08-13 10:41:33 +08:00
Huanqi Cao 7da062f61b docs: refresh catalogs, links, and pairs for the renamed persistent pwsh stack 2026-08-13 10:15:35 +08:00
Huanqi Cao d6010c2d88 refactor(pty): follow the naming-contract renames across the persistent pwsh stack 2026-08-13 09:52:56 +08:00
Huanqi Cao 1ae9df33eb merge: bring master's naming-contract refactor into feat/pwsh-persistent-pty 2026-08-13 01:52:47 +08:00
Huanqi Cao b1daf0eeaf test(tools): expect both pwsh tool packages in the harvested catalog roster 2026-08-13 01:33:27 +08:00
Huanqi Cao 828532682e merge: bring the #2299 Windows-native CI fix series into feat/pwsh-persistent-pty 2026-08-13 01:33:27 +08:00
Huanqi Cao 7c6735c4cb docs(catalog): refresh config-catalog source lines after the persistent-shell fixes 2026-08-13 01:33:16 +08:00
Huanqi Cao 974c340bb1 fix(pty): close the exit race between send settlement and the next poll in both persistent shell tools 2026-08-13 01:33:16 +08:00
Huanqi Cao db208953b1 fix(subprocess): keep the windows-inspector Linux coverage exemption and align the pwsh note with master's windows test structure 2026-08-13 01:33:16 +08:00
Huanqi Cao bc319d0a3b merge: bring master into feat/pwsh-persistent-pty 2026-08-13 01:33:16 +08:00
Huanqi Cao 2b839f8d7b docs(i18n): sync the catalog Chinese counterparts for the new tool
Mirrors the tool-pwsh-persistent catalog section and the pty-local
shellDialect config into the reviewed Chinese counterparts and
re-records both pairing sidecars.
2026-08-13 01:27:41 +08:00
Huanqi Cao d05351a270 docs(pty): register the persistent pwsh tool in the catalogs
Adds tool-pwsh-persistent to the tool-catalog manifest, regenerates
docs/tool-catalog.md and docs/config-catalog.md (the pty-local
shellDialect config), and fixes the persistent-pty note's cross-link
level to the implemented pwsh note.
2026-08-13 01:27:41 +08:00
Huanqi Cao b9c453a421 merge: bring the rescope allowlist fix from the #2234 base branch 2026-08-13 01:27:41 +08:00
Huanqi Cao d992eb116e fix(workflow): use optional syntax for the tsconfig pin parameter 2026-08-12 16:10:45 +08:00
Huanqi Cao 9592842df6 docs: record the junction-safe fixture teardown decision 2026-08-12 15:11:38 +08:00
Huanqi Cao db05dad2c7 fix(pwsh): accept link-shaped candidates and sync the README contract 2026-08-12 15:11:20 +08:00
Huanqi Cao d58bd91356 fix(workflow): forward the tsconfig pin only in the unbuilt worker 2026-08-12 15:11:05 +08:00
Huanqi Cao e0a83884ac Merge remote-tracking branch 'origin/master' into fix/windows-native-ci-local-validation
# Conflicts:
#	packages/client/ui-trajectory/tests/client-bundle.client.spec.ts
2026-08-12 14:12:41 +08:00
Huanqi Cao 06891c7628 test(claude-code): isolate ambient Anthropic model env 2026-08-12 14:04:57 +08:00
Huanqi Cao 772b5a2ec8 fix(pwsh): resolve Store app execution aliases 2026-08-12 14:04:45 +08:00
Huanqi Cao df599fe22a Merge remote-tracking branch 'origin/master' into fix/windows-native-ci-local-validation 2026-08-12 11:41:15 +08:00
Huanqi Cao 50bedaf03b Merge pull request #2234 from deepseek-harness/feat/loader-entry-disabled-interpolation
feat(loader): interpolate the entry disabled field
2026-08-12 11:40:02 +08:00
Huanqi Cao 874d7c4f78 docs: add junction-safe unlink rule to defensive patterns 2026-08-12 11:32:03 +08:00
Huanqi Cao e37af006c5 test(app-boot): unlink hmr alias junctions before removing the target 2026-08-12 11:19:01 +08:00
Huanqi Cao 709912b788 fix(boot): unlink stale profile fallback links instead of rmSync 2026-08-12 11:18:03 +08:00
Huanqi Cao 67e6d7082e fix: Windows-native CI findings on latest master
Local run of check:ci:windows-complete (the windows-native gate) on
latest master surfaced five Windows-only failures, all unreachable by
current CI because the native windows job is disabled and the wine gate
only covers build+site.

- install-lefthook/translation-pairing-merge specs junctioned the real
  scripts/ and tsx package into fixtures; Windows recursive deletion
  (Node rmSync and git worktree remove) follows MOUNT_POINT junctions and
  deleted the repository's own directories mid-run. Fixtures now unlink
  their reparse points before any recursive removal (shared helper in
  scripts/test-fixture-cleanup.ts).
- workflow-workerthread spawned its worker with an empty env; on Windows
  os.tmpdir() then degrades to the literal relative path undefined\temp,
  so tsx wrote its transform cache into a cwd-relative undefined/
  directory inside the repo. The worker env now injects the host temp
  path on win32 (workerSpawnEnv, platform-parameterized and unit-tested
  on both arms).
- workspace-context spec did not stub USERPROFILE (win32 homedir) or a
  set DSH_HOME, leaking the developer machine's real ~/.dsh/AGENTS.md
  into discovery.
- ui-trajectory client-bundle spec mounted the built artifact without the
  remote/settingsScope provides the locale plugin needs, so the plugin
  never activated and no view registered.
- subagent temp-fixture cleanup lacked the maxRetries Windows handle
  release needs under load (EPERM); added retries to the three affected
  specs and the fixture-cleanup helper.
2026-08-12 01:12:01 +08:00
Huanqi Cao 0c0a2a2b65 fix(gate): allowlist the cordis preset id in the rescope check
The preset-roster loop added by this PR names the \cordis\ preset id in
apps/cli/tests/windows-shell.spec.ts; the bare token is product data like
the existing agent-preset allowlist entries, not a package reference, so
the rescope-vendor hygiene check must not rewrite it.
2026-08-12 01:02:31 +08:00
Huanqi Cao 13152903c7 fix(subprocess): satisfy the oxlint gates in the Windows inspector
Routes koffi allocations through a branded NativePtr helper (koffi's TS
types are any), binds the creationTime callback instead of passing the
unbound method, and braces the no-op signal assertions.
2026-08-12 00:42:40 +08:00
Huanqi Cao da4701d28b docs(pty): persistent pwsh READMEs, dialect docs, and the implemented note
Adds the tool-pwsh-persistent README trio, documents the pty-local
shellDialect and the subprocess-local Windows inspector (console-wide
signalling, pseudo foreground groups, taskkill teardown) in both
languages, updates the tool-pwsh and persistent-pty notes in place, and
moves the pwsh-persistent-pty design note to implemented with the
shipped Decision and Consequences.
2026-08-12 00:28:29 +08:00
Huanqi Cao 0441312768 feat(pty): persistent pwsh tool and the minimal-preset Windows stack
Adds @deepseek-ai/dsh-tool-pwsh-persistent, the mirror of
tool-bash-persistent for PowerShell: one owner-scoped persistent pwsh
per agent, an Invoke-Expression wrapper with backtick-escaped bodies and
exact native exit codes ( reset, \True fallback, catch to 1),
PSReadLine-echo tolerance (the echoed wrapper is stripped from captured
output and can never fabricate completion), and the same
timeout/cancel/exit reset semantics with pwsh-flavored diagnostics.

The minimal preset now gates its persistent shell stack by platform with
the #2234 disabled interpolation: the bash rows mount on POSIX and the
pwsh rows (pty-local shellDialect pwsh + the new tool) on win32, keeping
exactly one persistent shell per host. windows-shell.spec pins the
per-platform roster; the real Loader composition proves cwd/env
persistence, multiline and here-string commands, large-output clipping,
and exit/reset over a real ConPTY pwsh.
2026-08-12 00:15:27 +08:00
Huanqi Cao 557c21cd6c feat(pty-local): shell dialect for Windows pwsh sessions
Adds shellDialect ('bash' | 'pwsh') to the local PTY backend. The
effective shellPath/shellArgs resolve per dialect (pwsh through the
shared dsh-pwsh-local resolver, bash defaults unchanged), the child
environment drops bash-only PS1/PROMPT_COMMAND markers and adds
NO_COLOR for pwsh, and pwsh startup bootstraps the prompt function that
emits the shared OSC 133;D + BEL marker, waiting (across follow-up
sends) until the controlled prompt is actually visible so the
banner-to-prompt gap cannot settle startup early. Bash behavior is
byte-identical; the real-pwsh suite exercises persistent state and
secret scrubbing on Windows.
2026-08-12 00:06:42 +08:00
Huanqi Cao da403d6086 feat(subprocess): Windows terminal inspection and signalling
createProcessInspector now returns a WindowsProcessInspector on win32
instead of throwing: Toolhelp32 tree enumeration with GetProcessTimes
start identities, the shell pid as a pseudo foreground group, taskkill
tree signalling, and inspector-verified Windows teardown (node-pty
signal kills throw on Windows, and externally taskkilled shells may
never fire its exit notification, so the handle settles \done\ from the
verified absence). subprocess-local and pty-local suites now run on
Windows with platform gates; the koffi-backed inspector joins the
windows-only coverage exclusions on Linux and is fully covered by the
windows-native lane.

Also flips vitest.config so subprocess-local and pty-local sources are
coverage-required on win32, and adapts the spawn/terminal suites to run
natively there (node-translated shell commands, injected POSIX group
paths, taskkill signal semantics).
2026-08-11 23:58:38 +08:00
Huanqi Cao 05a8846c6e refactor(preset): trim the shell-row comments
Drop the filler and factually loose comments added with the tool-pwsh rows:
the platform expressions self-explain, the web-app overlay comment repeats
the file header, and the spec comments now state only the platform-scoped
evaluation fact.
2026-08-11 21:38:51 +08:00
Huanqi Cao ccb3e4aaac Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation
# Conflicts:
#	scripts/verify-cordis-config.ts
2026-08-11 21:04:49 +08:00
Huanqi Cao 32744c2b5c refactor(preset): gate tool-pwsh by platform alongside tool-bash
The web-app overlay now disables the host tool-pwsh row too, and the shipped
presets (standard/code/cordis) declare both shell tool rows with inverted
platform gates — tool-bash on POSIX, tool-pwsh on win32 — so the preset layer
exposes exactly one shell tool per host and a preset can drop or replace the
shell tool on either platform. windows-shell.spec pins both preset gates and
both host tool rows disabled in the web composition; the loader and Windows
pwsh notes are updated in place.
2026-08-11 20:21:57 +08:00
Huanqi Cao 3f2490a7c4 Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation 2026-08-11 20:00:54 +08:00
Huanqi Cao 234a1b37c1 fix(gate): use the oxlint disable form for the compile-only check 2026-08-11 19:07:56 +08:00
Huanqi Cao e56b1ccab2 refactor(loader): tighten the disabled gate and rehome the note
Address review: the gate module docstring now states the actual evaluation
contexts (config after injections against the plugin context, disabled at
every mount decision against the loader context); metadataExpressionErrors
rejects expressions nested below disabled and syntax-checks the disabled
expression itself so an unparseable gate fails at the gate instead of the
boot. The tutorial's !!js claims follow, and the loader note moves to
implemented/architecture with its inbound links retargeted.
2026-08-11 18:52:52 +08:00
Huanqi Cao 25329fcb79 Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation
# Conflicts:
#	vendor/README.md
#	vendor/loader/src/config/entry.ts
2026-08-11 18:43:40 +08:00
Huanqi Cao ad1d690dd4 fix(bundle): record base README pairing and drop the deleted patch path from the note 2026-08-11 15:54:37 +08:00
Huanqi Cao 2a6658252c Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation
# Conflicts:
#	.agents/notes/implemented/feature/2026-08-01-windows-pwsh-default.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-01-windows-pwsh-default.md
#	.agents/notes/implemented/feature/2026-08-01-windows-pwsh-default.zh.md
2026-08-11 15:33:09 +08:00
Huanqi Cao 1b2a5c55dd chore: retrigger CI after a lost synchronize dispatch 2026-08-11 15:23:54 +08:00
Huanqi Cao 4308f91e88 refactor(bundle): fold the Windows shell platform layer into the base rows
Entry \disabled\ interpolation makes the launcher's separate platform layer
unnecessary: the base bundle's cordis.patch.yml now gates both shell stacks
on its own rows — bash-sandbox/tool-bash disable on win32, and their twins
pwsh-sandbox/tool-pwsh mount only there with the inverted expression — so
exactly one shell stack mounts per host from one shared patch file.

windows.cordis.patch.yml and the launcher's windows-shell.ts injection (boot,
live recomposition, config dumps) are deleted, with the workspace-constraints
entry and the dsh-base exports/files entries following. The windows-shell spec
pins the effective per-platform roster through the real bundle layers, and
base.spec pins the four symmetric gates. The superseded active notes are
updated and cross-linked; the loader note records the fold itself.
2026-08-11 15:11:45 +08:00
Huanqi Cao f00a29111b Merge remote-tracking branch 'origin/master' into feat/loader-entry-disabled-interpolation 2026-08-11 13:40:24 +08:00
Huanqi Cao 6fb226ea24 feat(loader): interpolate the entry disabled field
The Windows platform layer disables tool-bash and inserts the pwsh stack, but the shipped presets each mount a tool-bash row that re-enabled the tool on win32 — the session had both a PowerShell-backed bash tool and tool-pwsh, silently, because no spec pinned the composed preset layer.

The Loader now evaluates a disabled: !!js expression against the loader context at every mount decision; disabled is the only interpolated metadata field, and the raw node stays in the options so write-back keeps the !!js form. The standard/code/cordis presets gate tool-bash with process.platform === 'win32', verify-cordis-config allows expressions in disabled only, and the windows-shell spec pins the preset-level invariant.
2026-08-11 11:33:53 +08:00
Huanqi Cao cd226191a8 Merge pull request #2182 from deepseek-harness/fix/windows-native-acl-coverage
fix(ci): restore the native Windows coverage denominator to green
2026-08-10 21:21:53 +08:00
Huanqi Cao 539d116d57 Merge remote-tracking branch 'origin/master' into fix/windows-native-acl-coverage 2026-08-10 21:05:38 +08:00
Huanqi Cao 84964ba661 Merge remote-tracking branch 'origin/master' into fix/windows-native-acl-coverage
# Conflicts:
#	packages/preset/agent-presets/src/authoring.ts
#	vitest.config.ts
2026-08-10 21:04:44 +08:00
Huanqi Cao 0a17575040 fix(sandbox): address review: leak FIXME, legal ACL fixture, stronger offset test, prose 2026-08-10 19:34:01 +08:00
Huanqi Cao 59a2e4d825 fix(ci): restore the native Windows coverage denominator to green
The windows-native job has been red since #1990 put the sandbox-windows-acl sources into the Windows 100%-per-file denominator without tests carrying them, and #1543 dropped the authoring.ts V8 ignore for the POSIX-only owner-execute branch. Non-blocking at merge time, the red state has propagated to every later pull request.

Cover every in-process ACL-sandbox failure branch with stub-based failure-path suites (ffi/acl/token/spawn/index), following the package's existing failure-paths pattern; the package now measures 100% per file under the Windows denominator. Exclude only the runner entry from the win32 denominator: it executes exclusively as a spawned child outside the instrumented run, and its behavior is pinned end-to-end by the runner suite. Restore the authoring.ts narrow V8 ignore and add one for the dispose token guard whose absent-token arm is lifecycle-unreachable. Update the dual-lane Agent Note with the denominator composition.
2026-08-10 19:07:35 +08:00
Huanqi Cao 4cedc69966 Merge pull request #1990 from deepseek-harness/feat/windows-acl-sandbox
feat(sandbox): Windows ACL write-restriction sandbox (restricted-token runner)
2026-08-10 12:51:31 +08:00
Huanqi Cao beefa3c43b Merge pull request #1829 from deepseek-harness/feat/windows-pwsh-default
feat(bundle): default Windows hosts to the pwsh shell stack
2026-08-10 12:51:00 +08:00
Huanqi Cao c9285753de Merge branch 'merge/1829-master' into merge/1990-1829
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
2026-08-10 12:35:32 +08:00
Huanqi Cao 2a6aba0f48 Merge remote-tracking branch 'origin/master' into merge/1829-master
# Conflicts:
#	apps/cli/package.json
#	pnpm-lock.yaml
2026-08-10 12:32:14 +08:00
Huanqi Cao 0b9f4844c2 fix(config): drop the obsolete lsp-local coverage exclusions
Master's native Windows coverage lane now covers the LSP sources, and its
ci-workflow spec asserts the exclusion paths are absent from vitest.config.ts;
keeping them (as carried over in the merge) fails both the coverage and the
native Windows lanes. The sandbox-windows-acl exclusion stays: that package
is win32-only and the Linux lane cannot cover it.
2026-08-10 12:30:46 +08:00
Huanqi Cao ad54135d43 fix(sandbox-local): block-body the default rmTempDir fallback
The arrow shorthand implicitly returns rmSync's void, which the
no-confusing-void-expression rule forbids; the block body keeps the
fallback without the violation.
2026-08-10 12:30:39 +08:00
Huanqi Cao a3a91aa654 Merge branch 'merge/1829-master' into merge/1990-1829
# Conflicts:
#	vitest.config.ts
2026-08-10 11:24:58 +08:00
Huanqi Cao a7b973757b Merge remote-tracking branch 'origin/master' into merge/1829-master 2026-08-10 11:23:08 +08:00
Huanqi Cao ee38c2540b Merge branch 'merge/1829-master' into merge/1990-1829 2026-08-10 11:12:52 +08:00
Huanqi Cao 2474b6e638 Merge remote-tracking branch 'origin/master' into merge/1829-master
# Conflicts:
#	scripts/project-doc-site.spec.ts
2026-08-10 11:12:39 +08:00
Huanqi Cao 976020f2bb refactor(sandbox): derive the private temp dir; drop the acl-session record
The durable sandbox/acl-session event carried a workspace binding that
always equals the session cwd and a random temp path that only needed
to be stable per session. Both are now derived: the temp subdirectory
is sha256(session id + workspace), created exclusively and removed on
provider dispose, so fork/resume semantics fall out of the derivation
and the record, its fold/provision/tamper validation, the immediate
flush kick, and the session-store dependency all disappear.
2026-08-10 01:03:29 +08:00
Huanqi Cao a29966b71f Merge branch 'feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	.agents/notes/implemented/feature/2026-08-02-pwsh-tool-bash-parity.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-02-pwsh-tool-bash-parity.md
#	.agents/notes/implemented/feature/2026-08-02-pwsh-tool-bash-parity.zh.md
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/bash/tool-pwsh/README.i18n.yaml
#	packages/bash/tool-pwsh/README.md
#	packages/bash/tool-pwsh/README.zh.md
2026-08-09 23:19:14 +08:00
Huanqi Cao 2720091429 Merge remote-tracking branch 'origin/master' into feat/windows-pwsh-default
# Conflicts:
#	.agents/notes/proposed/feature/2026-08-01-windows-pwsh-default.i18n.yaml
#	.agents/notes/proposed/feature/2026-08-01-windows-pwsh-default.md
#	.agents/notes/proposed/feature/2026-08-01-windows-pwsh-default.zh.md
2026-08-09 22:59:34 +08:00
Huanqi Cao 4cfe4366d7 docs(note): drop the stage-numbering residual from the windows-default note
The roadmap stage reference dated the decision record; the purge
standard removes change-history narration and stage numbering from
implemented notes.
2026-08-09 22:58:10 +08:00
Huanqi Cao 63ad5d6d98 refactor(cli): drop the redundant existence pre-check in resolveWindowsShellLayer
loadOverlayPatches already throws on a missing file (the caller named
it, so absence is a misconfiguration) — the existsSync guard was a
second fail-loud mechanism for the same miss with a prettier message.
The loader's throw keeps the fail-loud contract the Windows-default
note records.
2026-08-09 18:53:38 +08:00
Huanqi Cao f5caadc808 Merge branch 'feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	packages/bash/pwsh-local/src/index.ts
#	packages/sandbox/sandbox-local/src/index.ts
2026-08-09 17:50:55 +08:00
Huanqi Cao 8af10a54b9 Merge remote-tracking branch 'origin/master' into feat/windows-pwsh-default 2026-08-09 17:45:36 +08:00
Huanqi Cao 428f84f710 test(docs): split placed-image paths on either separator
The placer tests receive absolute paths; on Windows the POSIX-only
split kept the whole path as the basename. The windows-acl branch
already carries this fix from an earlier merge-forward.
2026-08-09 17:11:18 +08:00
Huanqi Cao d7e19a0977 docs(sandbox): pin the translated confinement-runner heading anchor
The upgraded md-links gate resolves same-file fragments against the
zh file's own heading slugs; the translated heading needs the explicit
a-id anchor the corpus convention uses for cross-language fragments.
2026-08-09 17:06:36 +08:00
Huanqi Cao 165ad7e969 Merge branch 'feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	.agents/notes/implemented/feature/2026-08-01-pwsh-tool-and-executor.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-01-pwsh-tool-and-executor.zh.md
#	packages/bash/tool-pwsh/README.i18n.yaml
#	packages/bash/tool-pwsh/README.zh.md
2026-08-09 16:59:52 +08:00
Huanqi Cao 018009338b Merge remote-tracking branch 'origin/master' into feat/windows-pwsh-default
# Conflicts:
#	.agents/notes/proposed/feature/2026-08-01-windows-pwsh-default.i18n.yaml
#	.agents/notes/proposed/feature/2026-08-01-windows-pwsh-default.zh.md
#	packages/bundle/base/README.i18n.yaml
#	packages/bundle/base/README.md
#	packages/bundle/base/README.zh.md
2026-08-09 16:37:48 +08:00
Huanqi Cao 33e4c6580f feat(tool-pwsh): teach the confined named-pipe capture boundary to the model
Under read-only and workspace-write the Windows ACL sandbox leaves
programs unable to open named pipes, so a piped-stdio spawn fails with
EPERM. State that boundary in the pwsh tool description next to the
ConstrainedLanguage contract, pin it in the tool tests, and bring the
package README and both implemented Agent Notes current with it.
2026-08-09 16:34:25 +08:00
Huanqi Cao 8f2c7c5047 docs(sandbox): attribute the named-pipe default SD to the Win32-layer user-mode template
CreateNamedPipeW with NULL security attributes does not install a kernel
template: KernelBase builds the documented 5-ACE default SD in user mode
and passes it down; the kernel itself (a raw SD-null create) applies the
token default DACL. Correct the claim in both README sides and the
runner.spec pin comment, and link the MS template documentation.
2026-08-09 16:34:09 +08:00
Huanqi Cao 01a3b454f6 fix(sandbox): extend the restricted token's default DACL with a write-SID ACE
New objects created without an explicit security descriptor take
their DACL from the token's default DACL, which CreateRestrictedToken
builds from the user's ambient SIDs — none of them a restricting SID.
Confined children therefore failed the write pass-2 check when
creating anonymous pipes (CreatePipe: ERROR_ACCESS_DENIED, surfaced
as Node EPERM), breaking PowerShell pipelines and other CreatePipe
consumers. Merge a full-access write-SID ACE (Everyone under
read-only) into the token default DACL at init via
SetTokenInformation(TokenDefaultDacl).

Named pipes are EXEMPT: their default security descriptor is the
kernel's PUBLIC template (owner/SYSTEM/Admins full, Everyone
read-only), which no token change influences, so libuv's piped stdio
capture stays denied for confined grandchildren — the POC-documented
boundary, now pinned by the runner suite (inherit/ignore OK, pipe
DENIED) and documented in the README pair. The NUL paragraph is
corrected to the measured matrix (Everyone has 0x1201BF on the
device: cmd/node writes land; Set-Content fails at the PS layer).
2026-08-09 12:34:48 +08:00
Huanqi Cao bb50783002 test(sandbox): cover the temp-grant cleanup-failure AggregateError path 2026-08-09 10:57:01 +08:00
Huanqi Cao 8119bc3401 test(sandbox): fix grant-count and dispose-warning assertions
The reparse case reuses the standing workspace grant of the preceding
case (same workspace -> map hit), so the failed temp grant is the third
grant, not the fourth; the dispose-warning text carries 'failure(s)'.
2026-08-09 10:51:02 +08:00
Huanqi Cao 5fea4b7c4b feat(sandbox): derive the windows-acl write SID per workspace, not per session
The per-session random write SID forced a full tree propagation per
session per server lifetime (minutes on large workspaces). The write
SID is now the per-workspace identity derived from the canonical
workspace path (workspaceWriteSid: sha256 -> S-1-4-x-y), stored
nowhere: the workspace-root ACE materializes once per workspace per
machine and every later provision hits the exact-ACE skip.

- workspace ACEs are STANDING (never revoked - the reuse cache); temp
  ACEs stay revocable (disposed with the provider), so an inheritable
  ACE never outlives its session's temp dir on the ambient temp root
- AclSandbox requires the write SID under workspace-write; read-only
  parses/grants nothing; the runner derives the SID itself (the
  --write-sid flag's presence still marks the seam-managed contract)
- the acl-session record drops writeSid (sessionId/workspace/tempDir
  remain): the SID-tamper surface and its validation are gone
- sandbox-local holds two grant maps: standing workspace grants and
  revocable per-session temp grants

Docs (README pair, design note pair, catalogs, type-equiv) and the
acl-session/grant/acl/probe/runner suites updated; workspace-sid.spec
pins the derivation contract.
2026-08-09 10:44:35 +08:00
Huanqi Cao d18dc76b89 chore(docs): regenerate module graph for merged tree
The merge-forward took the parent's module-graph verbatim; the merged
tree adds the sandbox-windows-acl package and dsh-session edges.
verify-module-graph is a ci-static gate, not in local doc-sync.
2026-08-09 03:19:09 +08:00
Huanqi Cao 5e080849aa Merge remote-tracking branch 'origin/feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
#	docs/cordis-catalog/services.md
#	docs/module-graph.md
#	docs/subsystems/sandbox.i18n.yaml
#	packages/sandbox/sandbox/README.i18n.yaml
#	pnpm-lock.yaml
#	scripts/verify-package-readme-model-experience.ts
2026-08-09 02:53:48 +08:00