@kodax-ai/kodax 0.7.96-alpha.2 → 0.7.96-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +260 -0
  2. package/README.md +116 -77
  3. package/README_CN.md +73 -57
  4. package/config-templates/config.example.jsonc +8 -16
  5. package/config-templates/integrations/a2a.example.jsonc +2 -0
  6. package/dist/chunks/{agent-4FABF6WK.js → agent-GP3D2GIO.js} +1 -1
  7. package/dist/chunks/argument-completer-EV3ZTYFX.js +2 -0
  8. package/dist/chunks/chunk-4ZAZ4SH5.js +384 -0
  9. package/dist/chunks/{chunk-RIQSS56Y.js → chunk-5FOWMS7M.js} +6 -6
  10. package/dist/chunks/chunk-7CPZTMYD.js +92 -0
  11. package/dist/chunks/{chunk-4OIQZWA5.js → chunk-BHWBUZBD.js} +221 -220
  12. package/dist/chunks/chunk-FNMPDPVC.js +319 -0
  13. package/dist/chunks/chunk-HU4D77XX.js +471 -0
  14. package/dist/chunks/{chunk-C4KYZAFU.js → chunk-HX4OOCAU.js} +2 -2
  15. package/dist/chunks/{chunk-NVRWCSA5.js → chunk-LNPTCPLR.js} +1 -1
  16. package/dist/chunks/{chunk-AC7Z2OIY.js → chunk-MXJFGVTT.js} +1 -1
  17. package/dist/chunks/{chunk-HAX55GOQ.js → chunk-O3SCJ4HT.js} +1 -1
  18. package/dist/chunks/chunk-QJDMUT2B.js +2 -0
  19. package/dist/chunks/{chunk-ORXU6OWZ.js → chunk-RTRW6PV5.js} +1 -1
  20. package/dist/chunks/{chunk-6BVF3HZ7.js → chunk-S5USXWS2.js} +132 -132
  21. package/dist/chunks/{chunk-GYUU7XLH.js → chunk-SQ2WYU4S.js} +14 -20
  22. package/dist/chunks/chunk-TD2PU67Z.js +124 -0
  23. package/dist/chunks/chunk-UR4J2NED.js +351 -0
  24. package/dist/chunks/chunk-WMQJXU64.js +2 -0
  25. package/dist/chunks/{chunk-CHUPIWIF.js → chunk-XLGV3VYH.js} +56 -9
  26. package/dist/chunks/chunk-YBWUVOMB.js +429 -0
  27. package/dist/chunks/{chunk-XUX6OUCA.js → chunk-YDY5LRJO.js} +265 -271
  28. package/dist/chunks/{chunk-LTUZTQ6W.js → chunk-ZD5NDQ53.js} +1 -1
  29. package/dist/chunks/client-452BLUKG.js +2 -0
  30. package/dist/chunks/compaction-config-LTWENSAR.js +2 -0
  31. package/dist/chunks/{construction-bootstrap-AHN7EDGG.js → construction-bootstrap-SG5L6OCS.js} +1 -1
  32. package/dist/chunks/dist-PYEKR2S3.js +2 -0
  33. package/dist/chunks/dist-WQ6ONBGT.js +2 -0
  34. package/dist/chunks/host-GRKFTUKW.js +2 -0
  35. package/dist/chunks/run-manager-X45YHVKB.js +2 -0
  36. package/dist/chunks/utils-I2YFOHMD.js +2 -0
  37. package/dist/index.d.ts +45 -58
  38. package/dist/index.js +6 -6
  39. package/dist/kodax_bootstrap.js +1 -1
  40. package/dist/kodax_cli.js +1670 -1706
  41. package/dist/kodax_resume.js +33 -33
  42. package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
  43. package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
  44. package/dist/native/win32-x64/manifest.json +3 -3
  45. package/dist/runtime-worker.js +1569 -1608
  46. package/dist/sandbox-network-broker.js +143 -168
  47. package/dist/sdk-a2a.d.ts +11 -11
  48. package/dist/sdk-a2a.js +1 -1
  49. package/dist/sdk-agent.d.ts +12 -12
  50. package/dist/sdk-agent.js +1 -1
  51. package/dist/sdk-coding.d.ts +42 -115
  52. package/dist/sdk-coding.js +1 -1
  53. package/dist/sdk-experimental-memory.d.ts +3 -3
  54. package/dist/sdk-experimental-memory.js +1 -1
  55. package/dist/sdk-llm.d.ts +4 -11
  56. package/dist/sdk-llm.js +1 -1
  57. package/dist/sdk-mcp.js +1 -1
  58. package/dist/sdk-media.js +1 -1
  59. package/dist/sdk-repl.d.ts +35 -57
  60. package/dist/sdk-repl.js +2 -2
  61. package/dist/sdk-runtime.d.ts +157 -36
  62. package/dist/sdk-runtime.js +1 -1
  63. package/dist/sdk-sandbox.d.ts +9 -5
  64. package/dist/sdk-sandbox.js +1 -1
  65. package/dist/sdk-session.d.ts +6 -6
  66. package/dist/sdk-session.js +1 -1
  67. package/dist/sdk-skills.js +1 -1
  68. package/dist/semantic-worker.js +74 -82
  69. package/dist/types-chunks/{bash-prefix-extractor.d-DQOlA8cy.d.ts → bash-prefix-extractor.d-BTtOwURv.d.ts} +69 -27
  70. package/dist/types-chunks/{capsule.d-0zxsgXg_.d.ts → capsule.d-DxNgcs9n.d.ts} +2 -2
  71. package/dist/types-chunks/{controller.d-C7tXUcXo.d.ts → controller.d-BGNtJc05.d.ts} +17 -3
  72. package/dist/types-chunks/{controller.d-BTtyIIC1.d.ts → controller.d-ClFvfenm.d.ts} +1 -1
  73. package/dist/types-chunks/{cost-tracker.d-BeaenODW.d.ts → cost-tracker.d-BWI4lFWn.d.ts} +47 -2
  74. package/dist/types-chunks/{guardrail.d-DKTyEHJa.d.ts → exec-policy.d-BmCh781R.d.ts} +225 -267
  75. package/dist/types-chunks/{history-retrieval.d-CHnL99S7.d.ts → history-retrieval.d-hJix1cJV.d.ts} +1 -1
  76. package/dist/types-chunks/{public-api.d-Dx3L3W4Z.d.ts → public-api.d-CDi5pl3J.d.ts} +33 -28
  77. package/dist/types-chunks/{resolver.d-DlXPjeyx.d.ts → resolver.d-BAHV5zRk.d.ts} +1 -1
  78. package/dist/types-chunks/{review-inbox.d-WDSe1nze.d.ts → review-inbox.d-DZavlaKF.d.ts} +1 -1
  79. package/dist/types-chunks/{run-manager.d-DENbbzgR.d.ts → run-manager.d-T6uxxiWl.d.ts} +1 -1
  80. package/dist/types-chunks/{sdk-session-DYHGXXH4.d.ts → sdk-session-81v92FoH.d.ts} +2 -2
  81. package/dist/types-chunks/{shell-command-sets.d-CjFqS4dp.d.ts → shell-command-sets.d-BhDcCxHV.d.ts} +8 -8
  82. package/dist/types-chunks/{side-query.d-j8A3sFv_.d.ts → side-query.d-DPzDnl3k.d.ts} +3 -1
  83. package/dist/types-chunks/{repl.d-mO01olIa.d.ts → trusted-repl-entry-emywa-G-.d.ts} +20 -16
  84. package/dist/types-chunks/{types.d-BbZjR0Wr.d.ts → types.d-D1wEkn4h.d.ts} +2 -0
  85. package/dist/types-chunks/{types.d-DncLrpu_.d.ts → types.d-DWdhYXli.d.ts} +2 -2
  86. package/dist/types-chunks/{types.d-BkTIKdH6.d.ts → types.d-DXS_I8Yw.d.ts} +1 -1
  87. package/dist/types-chunks/{utils.d-CnxefMos.d.ts → utils.d-i32RW7bL.d.ts} +26 -48
  88. package/package.json +6 -2
  89. package/public_docs/README.md +16 -6
  90. package/public_docs/configuration/config-files.md +127 -0
  91. package/public_docs/configuration/custom-providers.md +161 -0
  92. package/public_docs/configuration/permissions.md +73 -0
  93. package/public_docs/configuration/providers.md +117 -0
  94. package/public_docs/configuration/sandbox.md +92 -72
  95. package/public_docs/getting-started/installation.md +61 -0
  96. package/public_docs/getting-started/overview.md +69 -0
  97. package/public_docs/getting-started/quickstart.md +57 -0
  98. package/public_docs/sdk/embedder-guide.md +392 -365
  99. package/dist/chunks/argument-completer-72VHB2VL.js +0 -2
  100. package/dist/chunks/chunk-7JZZIFZH.js +0 -501
  101. package/dist/chunks/chunk-JKTJCGO2.js +0 -418
  102. package/dist/chunks/chunk-LQYETRFK.js +0 -319
  103. package/dist/chunks/chunk-LYWDUSKO.js +0 -2
  104. package/dist/chunks/chunk-NGH6T4FD.js +0 -92
  105. package/dist/chunks/chunk-O4DS7RIQ.js +0 -384
  106. package/dist/chunks/chunk-POTW3O65.js +0 -124
  107. package/dist/chunks/chunk-U27XKEN5.js +0 -407
  108. package/dist/chunks/client-4C456K4O.js +0 -2
  109. package/dist/chunks/compaction-config-3VQRDFF4.js +0 -2
  110. package/dist/chunks/dist-BCBQXAGI.js +0 -2
  111. package/dist/chunks/dist-QK2YDWU6.js +0 -2
  112. package/dist/chunks/host-VIHV7ADG.js +0 -2
  113. package/dist/chunks/run-manager-NBVMU3KV.js +0 -2
  114. package/dist/chunks/utils-MEJZ2IGI.js +0 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,266 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  > Full history for versions prior to v0.7.0: [CHANGELOG_ARCHIVE.md](docs/CHANGELOG_ARCHIVE.md)
6
6
 
7
+ ## [0.7.96-alpha.5] - 2026-09-01
8
+
9
+ ### Fixed
10
+
11
+ - Completed the Windows sandbox concurrency correction without adding a
12
+ machine-global command lock or queue. Every command owns its runner pipes,
13
+ exact process handle, creation-time kill-on-close Job, cancellation state,
14
+ and terminal evidence; cancellation is observed before synchronous launch
15
+ preparation and all abort paths finish Job drainage before host exit.
16
+ - Removed the remaining startup/termination race: a command that has not
17
+ published a nonce-bound Resume record may use the one-second pre-start
18
+ cleanup path, while a Resume discovered during that window extends the wait
19
+ to the normal terminal-attestation budget instead of being killed early.
20
+ - Restored fail-closed admission ordering in the Windows native host: policy
21
+ boundary validation (protected control-state overlap, restricted-account,
22
+ and terminal-record checks) runs before the host consumes controller
23
+ bootstrap input, so a forged or policy-opaque request is rejected with its
24
+ structured error instead of stalling until the operation deadline. Valid
25
+ commands still observe termination control before setup and launch.
26
+ - Treated the Runtime daemon `0.0.0` development sentinel as having no
27
+ provable SemVer ordering. Such an owner attaches in place instead of being
28
+ classified as an older daemon for the version boundary, so SDK test and
29
+ development harnesses reconnect without a forced replacement, while every
30
+ documented versioned-capability boundary, the never-downgrade guard, and
31
+ the non-SemVer fail-closed path are unchanged.
32
+ - Restored the portable shell adapter's protected-read gate that the
33
+ sandbox-first routing restructure dropped: on POSIX, a model Bash read
34
+ carve-back that targets the trusted text native state roots fails
35
+ preparation with the structured protected-state error before any broker
36
+ spawn, matching the SDK executor and Windows control-state gates.
37
+ - Made content-addressed Windows native artifacts self-healing on execution.
38
+ A missing new-version artifact is published atomically, concurrent publishers
39
+ converge without a global mutex, and ordinary commands verify stable file
40
+ identity, physical cache containment, and content hash without launching a
41
+ PowerShell verifier. Owner/DACL construction remains part of atomic
42
+ publication; `sandbox doctor` remains verify-only.
43
+ - Made Runtime daemon upgrades version-safe. An alpha.5 execution client
44
+ replaces an idle older daemon on first connection, leaves a busy older daemon
45
+ running with a recoverable error, never downgrades a newer daemon, and never
46
+ mutates an owner whose version is not comparable SemVer.
47
+ - Completed sandbox self-healing at the process facts that own it. Failed
48
+ target-start/controller generations roll out of reuse without stopping live
49
+ holders; an unconfirmed process remains in fixed-port capacity accounting
50
+ until `close`, while spawn failure without an OS process cannot leak capacity.
51
+ Native-host bootstrap delivery failure does not blame or retire a healthy
52
+ shared broker. No command lock, queue, or new permission restriction was
53
+ introduced.
54
+ - Made simultaneous and staggered npm-linked/`kodax -r` upgrade clients
55
+ converge on one idle incompatible-daemon replacement, including a peer that
56
+ attaches between preflight and settlement or after the durable prepared
57
+ ticket but before its revision CAS. One authenticated follower resumes that
58
+ exact durable ticket after detaching while the first client and any other
59
+ followers only observe the owner change; active or untrusted work remains untouched.
60
+
61
+ ## [0.7.96-alpha.4] - 2026-08-30
62
+
63
+ ### Changed
64
+
65
+ - Replaced the legacy Plan/Edits/Auto[RULES]/Auto[LLM] permission shape with
66
+ four canonical profiles: Plan, Edits, Auto[LLM], and Full Access. Legacy
67
+ `auto-in-project` and Rules selections migrate to Auto[LLM]; `/auto-engine`
68
+ and auto-rules loading are removed.
69
+ - Made shell containment sandbox-first. Successful sandbox execution is silent;
70
+ only a proven pre-start denial or unavailable backend reaches Exec Policy and
71
+ the Edits user boundary or Auto reviewer. Started or uncertain commands are
72
+ never replayed, and an approved boundary has at most one host attempt.
73
+ - Added JSONC Exec Policy (`~/.kodax/exec-policy.jsonc`, plus explicitly trusted
74
+ repository policy) with deterministic `allow`/`prompt`/`forbidden` prefix
75
+ rules, strictest-match evaluation, administrator forbids, narrow critical
76
+ fallbacks, and the non-executing `kodax execpolicy check` command.
77
+ - Auto review now runs only at an exact host boundary, uses fixed 90-second and
78
+ one 180-second retry deadlines, fails closed on reviewer infrastructure
79
+ errors, stops a turn after the bounded denial thresholds, and never opens an
80
+ automatic approval prompt. A later informed natural-language instruction is
81
+ reviewed again.
82
+ - Aligned the workspace sandbox with normal development use: inherit the host
83
+ environment except fixed KodaX/Electron execution controls, allow external
84
+ network and system temporary writes, permit broad reads including Agent Home,
85
+ credentials, and global Git configuration, and stop disabling global Git.
86
+ The obsolete `sandbox.envPass` input is inert.
87
+ - Advanced the public Runtime contract to `runtimeAutoModeGuardrail:5` and
88
+ `sharedSessionSettings:2`, with exact canonical/input permission types,
89
+ host-owned Exec Policy/Auto-review options, ACP mode exports, and safe daemon
90
+ replacement so an alpha.4 client cannot silently attach to alpha.3 routing.
91
+ An idle older daemon is replaced automatically; a busy older daemon is left
92
+ intact and reported as a recoverable upgrade boundary, while a newer daemon
93
+ is never downgraded by an older client. A non-SemVer/unknown daemon version is
94
+ likewise left untouched because its ordering cannot be proven.
95
+ - Synchronized README, PRD/HLD/DD/ADR, feature and release records, public
96
+ configuration/SDK guides, config templates, package contents, test guide,
97
+ and `kodax_manual` with the same sandbox-first contract.
98
+
99
+ ### Fixed
100
+
101
+ - Removed the shell-tool fallback that could execute unsandboxed after native
102
+ sandbox bootstrap and termination both failed. The boundary is now explicit,
103
+ policy-reviewed, and single-attempt.
104
+ - Closed administrator Exec Policy bypasses through nested Windows shells.
105
+ `cmd /C` and `/K`, PowerShell command selectors/abbreviations, and strict
106
+ UTF-16LE `EncodedCommand` payloads are recursively evaluated; invalid or
107
+ policy-opaque nested execution fails closed where an administrator forbid
108
+ must remain absolute.
109
+ - Corrected the Windows shell concurrency regression at its setup/admission
110
+ boundary. Protocol 9/setup generation 9 removes every machine-global ACL
111
+ mutex from ordinary admission. Each canonical root receives one
112
+ policy-independent stable ACE set for `AllowRead`, `AllowWrite`, and
113
+ `DenyWrite`; the command token activates only its exact capabilities. Missing
114
+ ACEs converge additively with `SET_ACCESS` plus DACL readback, without
115
+ revocation, a cross-process target mutex, or a serialized command lifetime.
116
+ This removes both the observed 240-second global-mutex stall and the
117
+ deterministic 75-second failure caused by applying a separate five-second
118
+ mutex wait to each of 15 roots. Generation 8 remains the proof boundary for
119
+ the one-time legacy ACL removal; generation 9 upgrades a healthy account in
120
+ place, preserving its SID/group and filesystem nonce without replaying that
121
+ cleanup. Setup first publishes a protected non-ready `installing` marker; the
122
+ elevated parent validates that exact digest-bound marker and synchronously
123
+ converges NUL compatibility plus profile read capabilities. The caller
124
+ publishes the ready marker only after the parent succeeds. No helper or
125
+ migration overlaps ordinary admission, system TMP is not prewarmed, and
126
+ `sandboxRuntime` advances to `9`,
127
+ so a newly linked CLI replaces an idle daemon that still carries the setup-8
128
+ ACL behavior and refuses a busy one instead of mixing generations.
129
+ - Fixed first-launch policy construction when a custom `KODAX_HOME` is below the
130
+ system temporary write root. KodaX now creates only its fixed protected
131
+ `sandbox-runtime`, `native-text-state-v1`, `runtime`, `processes`, and `learned`
132
+ directories before passing them as Windows deny-write roots, so native
133
+ validation never rejects a missing host-owned root. This adds no lock, queue,
134
+ ACL mutation, or command-lifetime coordination.
135
+ - Preserved failed managed-turn history across `kodax -r`. The run-end failure
136
+ path now commits the already-rendered Assistant summary, Sidecar Verifier
137
+ verdict, and terminal error in their original order. The JSON load guard also
138
+ accepts the typed `sidecar` item, including a save/load/save/load round trip;
139
+ a first failed turn containing only this presentation history remains
140
+ resumable and visible in the session index. If its first durable write fails,
141
+ the retry reuses the already-staged snapshot instead of appending the
142
+ Assistant/Sidecar/error batch a second time.
143
+ Sessions already overwritten by an older build cannot reconstruct text that
144
+ was never committed to their session file.
145
+ - Moved control-directory provisioning and legacy ACL recovery out of the
146
+ command hot path. Setup owns those machine changes. Native executable images
147
+ use a content-addressed self-healing boundary instead: ordinary admission
148
+ verifies stable file identity, physical cache containment, and the protected
149
+ hash locally, without a PowerShell subprocess. A newly installed or
150
+ `npm link`ed hash is atomically published once if and only if its destination
151
+ is missing; publication constructs and verifies owner/DACL state. Concurrent
152
+ publishers share the immutable winner without a global mutex, and corrupted
153
+ content remains fail-closed rather than being silently repaired. Protocol 9
154
+ requires a hash-bound protected
155
+ setup marker, and the native host holds its non-delete-sharing handle until
156
+ the target's `Started` record is durable. Setup therefore cannot rotate a
157
+ generation across an admitted target-start window. Protocol-8 and older marker
158
+ retirement is setup-only and does not impose the former 301-second admission
159
+ drain; a healthy fixed account is reused so existing sessions keep their
160
+ identity while the new protected marker is published.
161
+ - Closed the remaining native-host termination gaps. The host consumes its
162
+ bootstrap and begins cancellation observation before synchronous ACL/desktop
163
+ preparation, binds the runner process handle before protocol decoding, and
164
+ waits for the winning abort path to durably publish Job-drain evidence before
165
+ exiting. Before the nonce-bound Resume record exists, confirmed host-tree
166
+ termination proves that no target ran and avoids an extra 12-second terminal
167
+ attestation wait.
168
+ - Removed the cross-process command-lifetime filesystem-effect coordinator from
169
+ Bash, trusted text tools, and worktree lifecycle. Same-file text mutations
170
+ retain their narrow kernel/CAS ordering; same-path worktree calls retain a
171
+ process-local queue, while different worktrees and Runtime processes use
172
+ Git's own locks. Deprecated lease exports remain inert for source/ABI
173
+ migration and old coordinator files are ignored, so stale alpha state cannot
174
+ block a new KodaX process.
175
+ - Made each native shell independently own its request, pipes, restricted
176
+ token, Job, resume/started records, and terminal proof. Windows per-command
177
+ `denyRead` now fails closed as structured `unsupported_policy` before doctor,
178
+ setup, DACL mutation, or target start: `WRITE_RESTRICTED` does not enforce a
179
+ restricting capability SID for reads, so claiming containment was incorrect.
180
+ Consequently, isolated Skill Script execution on current native protocol 9
181
+ is POSIX-only; `createAsrtSkillScriptRunner` rejects Windows as unavailable
182
+ instead of weakening its required per-command `denyRead` policy.
183
+ The field remains wire/API compatible, and setup alone can retire legacy
184
+ execution receipts and ACEs.
185
+ Terminal/termination proof failures now propagate through cleanup instead of
186
+ being reported as a successful command. Crash-left atomic-publication staging
187
+ files are removed only after an exact dead-PID and age proof. Network brokers
188
+ are reused by exact authority, retire failed readiness attempts, and use the
189
+ bounded five-broker pool without a one-second idle teardown race. A broker
190
+ remains referenced while starting or leased and detaches from the Node event
191
+ loop only when idle, preventing independent Runtime processes from exiting
192
+ with an unsettled top-level command.
193
+ - Closed the controller-loss reuse race without waiting for unrelated commands.
194
+ Any broker generation implicated by target-start or terminal-proof failure is
195
+ removed from the reusable map immediately; existing leases finish on that old
196
+ generation, while the next same-authority command creates a fresh generation.
197
+ Detached generations remain in live-capacity accounting until their process
198
+ exits, so rolling replacement cannot overrun ASRT's fixed proxy ports. No
199
+ holder is stopped and no lock or queue is added. A caller-local timeout or
200
+ abort still leaves a healthy shared startup intact.
201
+ - Capped each Windows native startup/control phase at 15 seconds without
202
+ replacing the caller's command deadline, matching Codex's phase-local runner
203
+ startup bound. If termination then proves that the nonce-bound Resume record never
204
+ existed, Bash reports pre-start unavailability through the existing permission
205
+ boundary; started or uncertain commands remain non-replayable.
206
+ - Made simultaneous npm-linked clients self-heal one idle incompatible daemon.
207
+ Token-authenticated temporary upgrade identities elect one inventory leader;
208
+ followers detach and reconnect after the existing fenced replacement. This
209
+ adds no ordinary command lock, queue, permission restriction, or daemon kill
210
+ of active work.
211
+ - Closed prepared-invocation leaks in foreground Bash and the public sandbox
212
+ SDK. Generation validation now runs immediately before native host spawn;
213
+ synchronous spawn failure and other proven pre-start exits remove the native
214
+ request and release the broker lease exactly once. Git Job-binding failure
215
+ keeps durable child tracking until process-tree drain is proved by background
216
+ recovery instead of unregistering an unknown tree.
217
+ - Preserved an already wrapped Windows `cmd /S /C` command tail across the
218
+ native runner boundary. The runner no longer adds a third quote layer that
219
+ made a successfully attested background shell immediately exit with “path
220
+ not found” before running its requested program, including when a quoted
221
+ executable is followed by an unquoted final argument.
222
+ - Legacy execution-scoped denyRead receipts are read only by explicit setup for
223
+ one-time migration. Ordinary admission never scans or repairs them.
224
+ - Native requests also stop adding the protected artifact cache as a redundant
225
+ `denyWrite` root; setup generation 8 removes only provable obsolete
226
+ sandbox-account guards and preserves ambiguous administrator ACLs. Real
227
+ Windows coverage holds one command active for up to 120 seconds while a
228
+ second Runtime must start and complete in under 15 seconds, and exercises
229
+ stale control staging, broker pressure, timeout/Job drain, and parallel
230
+ workspace writes.
231
+
232
+ ### Removed
233
+
234
+ - Removed the public `/repl` export `allowsAcceptEditsClassifierFallback` with
235
+ no replacement. The Runtime now owns the only shell-boundary route;
236
+ embedders must not install a second Accept Edits classifier fallback.
237
+ - Removed the stale public `createAgentHomeShellBoundaryGuardrail` helper and
238
+ its options type. It imposed a second Agent Home/opaque-shell block outside
239
+ the Runtime-owned sandbox-first route and has no replacement.
240
+
241
+ ## [0.7.96-alpha.3] - 2026-08-29
242
+
243
+ ### Added
244
+
245
+ - Added the v2 scoped Provider credential broker for keychain-only manual
246
+ compaction, lazy multi-Provider routing, internal Agent turns, detached
247
+ Workflows, and secret-safe effective-config provenance. Added bounded daemon
248
+ client inventory for shared-daemon diagnostics.
249
+
250
+ ### Changed
251
+
252
+ - `0.7.96-alpha.3` ships this change. Shared-daemon native, constructed, and
253
+ workflow Agent turns now require an explicit scoped
254
+ credential binding; External Agents remain on their independent
255
+ `credentialRef` plane. Restart an older daemon before using v2 bindings.
256
+ - Agent authority wire records are closed and reject unknown fields. Existing
257
+ host extension data must remain under `metadata`.
258
+
259
+ ### Fixed
260
+
261
+ - Internal side queries (auto-mode classifier, fallback verification) now
262
+ resolve the lowest enabled reasoning effort for models that cannot disable
263
+ thinking, instead of requesting a disabled `none` effort through its alias;
264
+ a profile with no fully usable enabled effort keeps the side query enabled
265
+ through an explicit `auto` effort.
266
+
7
267
  ## [0.7.96-alpha.2] - 2026-08-28
8
268
 
9
269
  ### Fixed
package/README.md CHANGED
@@ -215,36 +215,22 @@ kodax sandbox setup
215
215
  and security policy must also permit unprivileged user namespaces; KodaX
216
216
  reports a failed backend launch and does not change system policy itself.
217
217
 
218
- KodaX never runs `sudo` or a package manager automatically. If the sandbox is
219
- not active, deterministic safe operations and Auto[LLM] decisions keep the
220
- same permission behavior; only OS-level containment is absent. Ordinary runs
221
- do not repeatedly prompt for setup. In the REPL, `/sandbox` refreshes readiness
218
+ KodaX never runs `sudo` or a package manager automatically. Edits and
219
+ Auto[LLM] try the sandbox first. A command that completes there is silently
220
+ authorized; a proven pre-start denial or unavailable backend reaches the
221
+ profile-specific host boundary. A command that may have started is never
222
+ replayed. In the REPL, `/sandbox` refreshes readiness
222
223
  and diagnostics without activating the backend or requesting elevation.
223
224
  Per-command sandbox routing remains internal and is not shown in normal command
224
225
  history. SDK embedders can use the same capability independently through
225
226
  `@kodax-ai/kodax/sandbox`; see the
226
227
  [SDK sandbox guide](public_docs/sdk/embedder-guide.md#30-standalone-sandbox-sdk-v0778).
227
228
 
228
- Credential-shaped environment variables are filtered from model-issued shell
229
- commands by default. To expose exact host variables to those command targets,
230
- including ASRT, add only their names to the user-level core config:
231
-
232
- ```json
233
- {
234
- "sandbox": {
235
- "envPass": ["GH_TOKEN", "GITHUB_TOKEN", "OPENAI_API_KEY"]
236
- }
237
- }
238
- ```
239
-
240
- The default list is empty. Values remain in the host environment and are never
241
- stored in `config.json`; project configuration cannot extend the list.
242
- Matching is exact (case-insensitive on Windows), and execution-control
243
- variables such as `NODE_OPTIONS` and `BASH_ENV` remain blocked. Restart KodaX
244
- after changing the host variables or this setting; stop/restart a persistent
245
- KodaX daemon so it receives the new environment and configuration.
246
- SDK callers pass the same shape per Run as `KodaXOptions.sandbox`, so concurrent
247
- Runs can use different lists without mutating process-global configuration.
229
+ Sandboxed shell commands inherit the host environment, including ordinary
230
+ development credentials, and retain external network access. A fixed internal
231
+ deny set removes KodaX/Electron execution-control variables. Writes remain
232
+ bounded to the workspace and system temporary directory; broad host reads,
233
+ including Agent Home and global Git configuration, are available.
248
234
 
249
235
  For Qwen Token Plan, select `qwen-token-plan` and use its separate credential;
250
236
  `QWEN_API_KEY` does not authenticate this route:
@@ -564,18 +550,16 @@ Extension authoring remain explicit user actions.
564
550
 
565
551
  First-run setup now creates and validates the split core/MCP/Extensions/A2A
566
552
  files and annotated templates without overwriting existing configuration or
567
- collecting secrets. Auto[LLM] admits precisely modeled ordinary reads and
568
- workspace/temp mutations before classifier latency, retries classifier
569
- infrastructure failure once, then falls back at the Accept-edits boundary
570
- without switching to rules. ASRT is optional execution containment rather
571
- than permission authority; `/sandbox` is the explicit diagnostic surface, and
572
- SDK hosts can use the standalone `/sandbox` subpath without a silent
573
- unsandboxed fallback. KodaX's workspace containment denies reads from common
574
- home credential paths and the complete resolved agent home without turning
575
- ordinary external reads into an allowlist. See the
576
- [v0.7.78 design](docs/features/v0.7.78.md), the
577
- [release checklist](docs/release.md#v0778-release-verification), and
578
- [SDK guide sections 29–30](public_docs/sdk/embedder-guide.md#29-evidence-gated-background-skill-learning-feature_263-v0778).
553
+ collecting secrets. That release introduced the earlier pre-classification
554
+ permission route. FEATURE_297 supersedes it with sandbox-first execution:
555
+ sandbox completion is silent; only a proven pre-start boundary reaches Edits
556
+ or Auto[LLM], and reviewer infrastructure failure blocks with a safer-route
557
+ message after one retry. Workspace containment now permits broad host reads,
558
+ including Agent Home, credential locations, and global Git configuration,
559
+ while retaining workspace/system-TMP-only writes and external network. See the
560
+ [v0.7.96 design](docs/features/v0.7.96.md#feature_297-codex-aligned-permission-profiles-sandbox-escalation-and-exec-policy),
561
+ [ADR-069](docs/ADR.md#adr-069-sandbox-success-is-authority-while-host-escalation-is-a-separate-policy-boundary),
562
+ and the [SDK permission guide](public_docs/sdk/embedder-guide.md#24-runtime-owned-permission-routing-and-plan-bridges-v0796).
579
563
 
580
564
  The release closure also preserves intent across adjacent surfaces: static
581
565
  Skill instructions load in Edit/Plan without granting later side effects,
@@ -583,9 +567,10 @@ dynamic Skill commands require an explicit host-controlled executor, root AMA
583
567
  handles explicit remember/correct/forget requests immediately through the
584
568
  governed `memory_intent` control plane while exceptional or inferred changes
585
569
  remain reviewable, Workflow Actor waits remain
586
- unbounded unless the workflow sets a deadline, and Runtime Auto capability v4
587
- advertises `fallbackPersistsEngine:false` across embedded, Worker, and daemon
588
- hosts. Actor ownership additionally uses Runtime identity rather than PID alone,
570
+ unbounded unless the workflow sets a deadline. Runtime Auto capability v5 and
571
+ shared Session settings v2 advertise the same sandbox-first four-profile
572
+ contract across embedded, Worker, and daemon hosts. Actor ownership additionally
573
+ uses Runtime identity rather than PID alone,
589
574
  so PID reuse cannot pin a crashed owner. The resume Session picker also renders
590
575
  timestamps in the host's local timezone.
591
576
 
@@ -755,6 +740,53 @@ permission UI, and recovers stale prepared Session tails through an
755
740
  authoritative merge. Background persistence failures are surfaced as
756
741
  diagnostics rather than hidden.
757
742
 
743
+ **v0.7.96-alpha.5 release:** Windows shell admission now follows the
744
+ Codex concurrency boundary: versioned setup performs legacy migration once,
745
+ while ordinary admission accepts effective inherited normal-token access and
746
+ only converges a missing exact-root restricted capability using `SET_ACCESS`
747
+ and DACL readback, without waiting on a cross-process target mutex. Stable
748
+ filesystem capability SIDs stay on the object and each command token selects
749
+ its authority. Windows per-command `denyRead` returns structured
750
+ `unsupported_policy` before setup, DACL mutation, or target start because the
751
+ Codex-compatible `WRITE_RESTRICTED` token cannot enforce restricting SIDs for
752
+ reads; the API field remains for cross-platform compatibility.
753
+ No command-lifetime or machine-global filesystem coordinator is shared
754
+ by Bash, trusted text, worktrees, Sessions, or Runtime processes. Every native
755
+ command has an independent request, token, control channel, and Job; matching
756
+ network authorities share a bounded broker pool without serializing command
757
+ lifetime. Protocol 9/setup generation 9 holds the protected setup marker until
758
+ durable target `Started`, reuses a healthy fixed sandbox account across setup
759
+ versions, and upgrades generation-8 installations in place without replaying
760
+ legacy ACL cleanup. Generation 8 remains the proof boundary for the one-time
761
+ legacy migration. Setup first publishes a protected non-ready `installing`
762
+ marker; the elevated parent synchronously installs NUL compatibility and profile
763
+ read capabilities, and only then does the caller atomically publish the ready
764
+ marker. No helper or migration overlaps ordinary admission, and system TMP is
765
+ not prewarmed. This release
766
+ also creates its five fixed protected Agent Home directories before constructing
767
+ a Windows policy when a custom `KODAX_HOME` sits below the system-TMP write
768
+ grant; missing deny roots therefore cannot reject first launch, and no lock or
769
+ ACL transaction is added. This release advertises `sandboxRuntime:9`, so a
770
+ linked CLI cannot silently reuse a daemon that still runs the setup-8 ACL path. See the
771
+ [v0.7.96-alpha.5 release checklist](docs/release.md#v0796-alpha5-release-preparation).
772
+
773
+ **v0.7.96-alpha.3 release:** Provider credentials are lazy, scoped,
774
+ revocable capabilities (ADR-068). The v2 credential broker keeps Provider
775
+ secrets in the OS keychain and resolves them per wire call for one closed
776
+ purpose (primary, fallback, classifier, sidecar, compaction, agent, workflow,
777
+ utility) inside revocable leases; manual compaction runs keychain-only
778
+ through a stable `session.compact` operation, native/constructed child Agents
779
+ derive the intersection of the live parent authorization and their own
780
+ capabilities, and detached Workflows receive closable derived leases.
781
+ Shared-daemon native, constructed, and workflow Agent turns now require an
782
+ explicit scoped binding and fail closed without one; External Agents stay on
783
+ their independent `credentialRef` plane, and a v2 client fails closed against
784
+ an older daemon. Agent authority wire records are closed and reject unknown
785
+ fields (host extension data belongs in `metadata`). Daemons advertising
786
+ `daemonClientInventory:1` expose bounded, display-only connected-client
787
+ diagnostics. See the
788
+ [v0.7.96-alpha.3 release checklist](docs/release.md#v0796-alpha3-release-preparation).
789
+
758
790
  **v0.7.96-alpha.2 release (Windows hotfix):** restored the Windows
759
791
  boot-identity PowerShell resolution helper that the FEATURE_295 cleanup
760
792
  deleted while its last caller stayed. On v0.7.96-alpha.1 every Windows exit
@@ -794,8 +826,8 @@ file to trusted-host ownership and preserves the ordered effective ACE policy.
794
826
  The filesystem may canonicalize DACL protection/inheritance control at the
795
827
  atomic namespace commit; stale inherited authority is not copied from an old
796
828
  parent. The
797
- shell cannot read or write workspace-local `.kodax/runtime` control state even
798
- when the surrounding workspace is writable.
829
+ shell may read workspace-local `.kodax/runtime` like other host state, but
830
+ cannot write it even when the surrounding workspace is writable.
799
831
  Each shared broker owns a verified native liveness controller whose named pipe
800
832
  is created with a protected Host/SYSTEM-only DACL and multiple pending
801
833
  instances. Restricted targets cannot connect or exhaust it; controller or
@@ -816,9 +848,13 @@ revision so a later CAS-checked Undo can resolve it. See
816
848
  This incompatible authority split is fenced by `sandboxRuntime:6`, so a new
817
849
  client never silently reuses a daemon that still implements the v0.7.95 graph.
818
850
  Existing Windows installations run `kodax sandbox setup` once: the cutover
819
- waits for old sandbox processes to exit, recreates the dedicated account with
820
- a new SID, and records the native protocol/SID generation. Missing migration
821
- state blocks native shell admission, not trusted text tools.
851
+ waits for old sandbox processes to exit, removes only exact legacy KodaX
852
+ sensitive-root guards with the previous group SID, recreates the dedicated account with
853
+ a new SID, and records
854
+ setup generation 4 with the native protocol/SID generation. Missing migration
855
+ state blocks native shell admission, not trusted text tools. Ordinary command
856
+ admission never repeats that legacy cleanup or revokes shared ACL state; each
857
+ Runtime command retains an independent request, token, control channel, and Job.
822
858
  On Windows, the embedded release manifest pins text/shell protocols and hashes
823
859
  plus the ASRT release version and hash. Verified executables are staged in a
824
860
  content-addressed protected LocalAppData store independent of `KODAX_HOME`;
@@ -954,10 +990,9 @@ PowerShell, `cmd`, `bash`, `zsh`, or an explicit Git Bash executable; KodaX
954
990
  resolves the shell environment in the effective project cwd and then executes
955
991
  the command through that same interpreter. Resolved environments are isolated
956
992
  by contract and cwd, expire after a bounded TTL, and can be explicitly
957
- refreshed. Provider credentials and execution-control variables are removed
958
- before profile/setup code and again before the command starts. Credential-shaped
959
- variables are also filtered on the legacy platform-shell path; explicit names
960
- in user-level `sandbox.envPass` are restored only for the final command target.
993
+ refreshed. The resolved host environment is inherited by profile/setup and
994
+ command targets; fixed KodaX/Electron execution-control variables are removed
995
+ before execution.
961
996
  When `shellExecution` is absent, the established interpreter path is unchanged. See
962
997
  [SDK Embedder Guide section 28](public_docs/sdk/embedder-guide.md#28-host-configurable-shell-execution-contract-v0777)
963
998
  and the [Issue 214 regression guide](docs/test-guides/ISSUE_214_v0.7.77_REGRESSION_GUIDE.md).
@@ -1014,18 +1049,17 @@ context diagnostics, and daemon protocol schemas, see
1014
1049
  The Space/IDE shared-daemon contract is documented in
1015
1050
  [SDK Embedder Guide section 23](public_docs/sdk/embedder-guide.md#23-shared-coder-daemon-for-space-and-ide-hosts-feature_269-v0769).
1016
1051
 
1017
- **v0.7.72–v0.7.73 Runtime permission contract:** Auto Mode is owned by the Runtime session,
1018
- not by a UI hook. It reuses its LLM/rules guardrail across turns, classifies
1019
- before the shared permission bridge, and persists explicit engine selection.
1020
- The same session settings can select a classifier model and bounded
1021
- timeout; `auto` defaults to LLM classification and fails with a recoverable
1022
- configuration error when no effective classifier model exists, rather than
1023
- silently falling back. In v0.7.78, classifier failures retry once and then use
1024
- the Accept-edits safety boundary; they never change the engine to rules.
1025
- Runtime permission prompts offer opaque, exact
1052
+ **Current Runtime permission contract (v0.7.96):** Auto Mode is owned by the
1053
+ Runtime session, not by a UI hook. Edits and Auto try the sandbox first;
1054
+ sandbox completion is final, while only a proven pre-start host boundary reaches
1055
+ Exec Policy and the Edits user decision or Auto[LLM] reviewer. Auto review has
1056
+ fixed 90/180-second attempt bounds and never falls back to Rules, Edits, or an
1057
+ automatic user prompt. Full Access skips sandbox and review but retains
1058
+ administrator policy and critical-effect denial. Runtime permission prompts
1059
+ offer opaque, exact
1026
1060
  allow-once/session/persistent grant suggestions; persistent grants are
1027
1061
  daemon-owned and revisioned. Host plan exit is exposed only when the host
1028
- supplies an approval callback. See the [Runtime Auto Mode integration guide](public_docs/sdk/embedder-guide.md#24-runtime-owned-auto-mode-and-plan-approval-bridges-v0772v0773).
1062
+ supplies an approval callback. See the [Runtime permission integration guide](public_docs/sdk/embedder-guide.md#24-runtime-owned-permission-routing-and-plan-bridges-v0796).
1029
1063
 
1030
1064
  ## Repo Intelligence
1031
1065
 
@@ -1271,8 +1305,10 @@ Agent, Skill, Extension-tool authority, workspace, tool-policy, or task-store
1271
1305
  changes require an explicit server restart. Managed
1272
1306
  A2A contexts default to `~/kodax_a2a_server_workspace/<runtime-profile>/contexts/`.
1273
1307
  Exact Skill scripts require the opt-in isolated policy and a passing
1274
- `kodax sandbox doctor` (`kodax sandbox setup` performs the explicit Windows
1275
- provisioning or v2 account-SID cutover).
1308
+ `kodax sandbox doctor`. On current native protocol 9 this isolated Skill Script
1309
+ route is POSIX-only. Windows is unavailable because the route requires
1310
+ per-command `denyRead`, which the Windows `WRITE_RESTRICTED` backend rejects as
1311
+ `unsupported_policy`; `kodax sandbox setup` cannot enable it.
1276
1312
 
1277
1313
  ---
1278
1314
 
@@ -1288,7 +1324,7 @@ provisioning or v2 account-SID cutover).
1288
1324
  - **Skills System** - Natural language triggering, extensible, role-projected in AMA
1289
1325
  - **Repo Intelligence** - Built-in full/light repository intelligence with native KodaX auto-injection lane
1290
1326
  - **Rich Tool Surface** - 50+ built-in tools across file ops, shell, search, repo intelligence, MCP capabilities, git worktree, and agent control
1291
- - **Permission Control** - 3 permission modes with pattern-based control
1327
+ - **Permission Control** - 4 profiles with sandbox-first routing and Exec Policy
1292
1328
  - **Standalone Binary** - `bun --compile` releases for Win/macOS/Linux x64+arm64, no Node.js required on target machines
1293
1329
  - **Cross-Platform** - Windows/macOS/Linux
1294
1330
  - **TypeScript Native** - Full type safety and IDE support
@@ -1523,19 +1559,21 @@ kodax Start the interactive REPL
1523
1559
 
1524
1560
  ### Permission Control
1525
1561
 
1526
- KodaX provides 3 permission modes for fine-grained control:
1562
+ KodaX provides 4 permission profiles:
1527
1563
 
1528
1564
  | Mode | Description | Tools Need Confirmation |
1529
1565
  |------|-------------|------------------------|
1530
1566
  | `plan` | Read-only planning mode | All modification tools blocked |
1531
- | `accept-edits` | Auto-accept file edits | bash only |
1532
- | `auto` | Runtime-owned LLM/rules classification within the project boundary | Only explicit classifier escalation |
1567
+ | `accept-edits` | Sandbox-first edits; user decides an exact host boundary | Host-boundary operations |
1568
+ | `auto` | Sandbox-first execution; LLM reviews an exact host boundary | No automatic prompt; denied calls return a safer-route reason |
1569
+ | `full-access` | Direct host execution without sandbox or Auto review | Explicit Exec Policy `prompt` only |
1533
1570
 
1534
1571
  ```bash
1535
1572
  # In REPL, use /mode command
1536
1573
  /mode plan # Switch to plan mode (read-only)
1537
1574
  /mode accept-edits # Switch to accept-edits mode
1538
1575
  /mode auto # Switch to Runtime-owned Auto Mode
1576
+ /mode full-access # Direct host execution, still subject to Exec Policy
1539
1577
  /auto # Alias for auto
1540
1578
 
1541
1579
  # Check current mode
@@ -1545,19 +1583,20 @@ KodaX provides 3 permission modes for fine-grained control:
1545
1583
  **Features:**
1546
1584
  - In `accept-edits` mode, choosing "always" can persist safe Bash allow-patterns
1547
1585
  - Plan mode includes system prompt context for LLM awareness
1548
- - Sensitive/protected or unresolved targets enter Auto[LLM]/approval review;
1549
- ordinary reads outside the project are allowed
1586
+ - Sandboxed broad reads, including Agent Home and credential locations, finish
1587
+ silently; only a proven pre-start host boundary reaches Auto[LLM]/approval
1588
+ review
1550
1589
  - Pattern-based permission: Allow specific Bash commands (e.g., `Bash(npm install)`)
1551
1590
  - Unified diff display for write/edit operations
1552
- - Auto Mode first admits exactly modeled safe reads and workspace/temp
1553
- mutations without classifier latency. Remaining actions are reviewed against
1554
- bounded user intent and exact operation facts; a safe verdict creates no
1555
- pending approval request. Classifier failures retry once, then use the
1556
- Accept-edits safety boundary rather than silently switching to Auto[rules].
1557
- - Shift-Tab cycles `Plan -> Edits -> Auto`; Shift+Enter inserts a newline. Auto
1558
- immediately displays `Auto[LLM]` or `Auto[RULES]`, and rapid mode changes are
1559
- persisted in input order. `Auto[RULES]` remains an explicit/manual engine;
1560
- use `/auto-engine llm` to select LLM classification.
1591
+ - Edits and Auto first attempt the OS sandbox. Sandbox completion is final;
1592
+ only proven pre-start refusal/unavailability reaches Exec Policy and then the
1593
+ user or Auto reviewer. Target-started/uncertain calls are never replayed.
1594
+ - Shift-Tab cycles `Plan -> Edits -> Auto[LLM] -> Full Access`; Shift+Enter
1595
+ inserts a newline. Legacy `auto-in-project` and Auto[RULES] state normalize
1596
+ to Auto[LLM] and are never persisted again.
1597
+ - Full Access skips sandbox and reviewer, but administrator forbids and the
1598
+ narrow critical-effect fallback remain enforced. Use
1599
+ `kodax execpolicy check -- <command>` to inspect host policy without running it.
1561
1600
  - Runtime-backed prompts can offer exact `allow once`, `allow this session`,
1562
1601
  and `always allow` choices. Return the Runtime-issued opaque suggestion;
1563
1602
  never derive or widen a permission rule from the displayed command or path.
@@ -1870,14 +1909,14 @@ import { runInkInteractiveMode } from '@kodax-ai/kodax/repl';
1870
1909
 
1871
1910
  // Usually used via the `kodax` bin command; can be embedded:
1872
1911
  // - Interactive terminal UI (Ink components)
1873
- // - Permission control (auto/plan/accept-edits modes)
1912
+ // - Permission control (plan/accept-edits/auto/full-access profiles)
1874
1913
  // - Command system (/help, /mode, /clear, /status, …)
1875
1914
  // - Skills integration
1876
1915
  // - Theme support
1877
1916
  await runInkInteractiveMode({ provider: 'zhipu-coding', effort: 'auto' });
1878
1917
  ```
1879
1918
 
1880
- **Key Features**: Ink-based React components · 3 permission modes (auto / plan / accept-edits) · built-in commands · real-time streaming display · context-usage indicator.
1919
+ **Key Features**: Ink-based React components · 4 permission profiles · built-in commands · real-time streaming display · context-usage indicator.
1881
1920
 
1882
1921
  ### Package Dependency Graph (workspace internal)
1883
1922