@iowarp/clio-coder 0.3.2 → 0.3.3

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 (115) hide show
  1. package/CHANGELOG.md +229 -457
  2. package/README.md +2 -2
  3. package/dist/{acp-BIYHVZIM.js → acp-P2AQILE2.js} +2 -2
  4. package/dist/{agents-YT6SSRIT.js → agents-72W3BI7I.js} +8 -8
  5. package/dist/assets/codewiki.json +1 -1
  6. package/dist/{chunk-WMSVI4G2.js → chunk-2DJ2KNFG.js} +3 -3
  7. package/dist/{chunk-2EHAIA3X.js → chunk-2TLUCQVG.js} +2 -2
  8. package/dist/{chunk-WVO7V2QY.js → chunk-4XUGQOHA.js} +2 -2
  9. package/dist/{chunk-IGLFWIYI.js → chunk-5UFT4SUX.js} +2 -2
  10. package/dist/{chunk-AO4RKG4M.js → chunk-6SGHMWE3.js} +3 -3
  11. package/dist/{chunk-X75S7HFS.js → chunk-COU2UHX6.js} +45 -19
  12. package/dist/{chunk-KJ5LWLOE.js → chunk-DSELYM6W.js} +2 -2
  13. package/dist/{chunk-G2DE3C7R.js → chunk-DUYJ5IO6.js} +2 -2
  14. package/dist/{chunk-EPVUXGXG.js → chunk-FNTMWMX5.js} +9 -9
  15. package/dist/{chunk-MNA4JGU4.js → chunk-J7CWMCQD.js} +2 -2
  16. package/dist/{chunk-MBS4V7ZP.js → chunk-KZWTDYJF.js} +4 -4
  17. package/dist/{chunk-LBNRH5WM.js → chunk-LM5TQCJZ.js} +3 -3
  18. package/dist/{chunk-OHHN2SO4.js → chunk-LW6DSM3M.js} +7 -7
  19. package/dist/{chunk-MQSRRFWA.js → chunk-LWLEKMDQ.js} +56 -2
  20. package/dist/{chunk-V4RXGQ5Q.js → chunk-OC7FIQPC.js} +2 -2
  21. package/dist/{chunk-3ZXDFGR5.js → chunk-PAJK6MAQ.js} +2 -2
  22. package/dist/{chunk-7EYHLWU7.js → chunk-PIWWS5BL.js} +3 -3
  23. package/dist/{chunk-6EJV5X2W.js → chunk-SRDMMSEP.js} +3 -3
  24. package/dist/{chunk-ARBGF5F7.js → chunk-TZK7PACC.js} +2 -2
  25. package/dist/{chunk-QTYWRVRA.js → chunk-UFIIWP2H.js} +2 -2
  26. package/dist/{chunk-J5HN4RYU.js → chunk-V6RTAOC2.js} +2 -2
  27. package/dist/{chunk-SRF2PJNW.js → chunk-VPAYEGVX.js} +2 -2
  28. package/dist/{chunk-77VKQEHF.js → chunk-X6IAEBZR.js} +2 -2
  29. package/dist/{chunk-4KLWL3UC.js → chunk-XBXAASKX.js} +2 -2
  30. package/dist/{chunk-MAW544W2.js → chunk-ZWMF7253.js} +4 -4
  31. package/dist/cli/index.js +17 -17
  32. package/dist/{clio-4LY5K2AC.js → clio-JOU4FXVA.js} +2 -2
  33. package/dist/{config-GTLUW2PR.js → config-XCDVKR23.js} +7 -7
  34. package/dist/{configure-R6A64DHX.js → configure-4GAP54ZW.js} +5 -5
  35. package/dist/{context-RW5HC47S.js → context-4UOGGLQ5.js} +6 -6
  36. package/dist/{context-JFZEJ7W5.js → context-77FM5DV5.js} +9 -9
  37. package/dist/{context-clear-6ZHBAZZT.js → context-clear-XXJRLCJJ.js} +6 -6
  38. package/dist/{dispatch-runner-VKBRCWQC.js → dispatch-runner-QPRDDBDX.js} +7 -7
  39. package/dist/{doctor-KI767GSN.js → doctor-HR46URBJ.js} +5 -5
  40. package/dist/{evidence-UA6AWDQQ.js → evidence-6HG2PY2B.js} +4 -4
  41. package/dist/{evolve-QNTFGV6Z.js → evolve-K7YU3NCY.js} +4 -4
  42. package/dist/{fleet-Q7UOMUSG.js → fleet-VY3HHKN6.js} +15 -15
  43. package/dist/{init-WBB65ZHQ.js → init-JYGXI3FK.js} +12 -12
  44. package/dist/{memory-MD3O64RI.js → memory-WFZMGYHX.js} +5 -5
  45. package/dist/{models-BZU34YWD.js → models-I5QWSEOM.js} +7 -7
  46. package/dist/{monitor-MEQA5C3I.js → monitor-GE4ID3IA.js} +5 -5
  47. package/dist/{orchestrator-CGFKEP27.js → orchestrator-EM5MC3HM.js} +1482 -1055
  48. package/dist/{run-IV4Q6RLN.js → run-ZU3QMZPZ.js} +18 -18
  49. package/dist/{skills-LQEKRDTN.js → skills-X5VXCRNQ.js} +2 -2
  50. package/dist/{skills-eval-3DC4HEWS.js → skills-eval-WKIHWTHR.js} +5 -5
  51. package/dist/{targets-C4SSGQOB.js → targets-SNCPI2NR.js} +8 -8
  52. package/dist/{terminal-lease-IT5JW2NR.js → terminal-lease-BNAHVHBS.js} +2 -2
  53. package/dist/{upgrade-7TT7SQ3G.js → upgrade-JQHHPQ4K.js} +7 -7
  54. package/dist/{usage-GV4PKT3M.js → usage-OR4O5SMZ.js} +5 -5
  55. package/dist/{verify-G6V4D2G7.js → verify-375KUB3Y.js} +4 -4
  56. package/dist/{wiki-generate-DQF6Z66B.js → wiki-generate-UEXP2ARI.js} +11 -11
  57. package/dist/worker/entry.js +8 -8
  58. package/docs/README.md +3 -3
  59. package/docs/acp.md +1 -1
  60. package/docs/alcf-provider.md +1 -1
  61. package/docs/architecture.md +2 -2
  62. package/docs/artifact-versions.md +1 -1
  63. package/docs/built-in-agents.md +1 -1
  64. package/docs/capacity-and-scheduling.md +1 -1
  65. package/docs/commands-and-modes.md +1 -1
  66. package/docs/configuration-and-targets.md +1 -1
  67. package/docs/context-engine.md +1 -1
  68. package/docs/development-pipeline.md +1 -1
  69. package/docs/documentation-coverage.md +2 -2
  70. package/docs/documentation-guide.md +1 -1
  71. package/docs/eval-runner.md +1 -1
  72. package/docs/evals-internal.md +1 -1
  73. package/docs/evidence-and-memory.md +2 -2
  74. package/docs/evolution.md +1 -1
  75. package/docs/exit-codes-and-output.md +1 -1
  76. package/docs/extensions-and-sharing.md +2 -2
  77. package/docs/fleet-dispatch.md +1 -1
  78. package/docs/installation-and-lifecycle.md +6 -6
  79. package/docs/middleware-and-components.md +1 -1
  80. package/docs/model-catalog.md +1 -1
  81. package/docs/observability.md +3 -3
  82. package/docs/performance-methodology.md +2 -2
  83. package/docs/proactive-memory.md +1 -1
  84. package/docs/prompt-envelope-and-tools.md +1 -1
  85. package/docs/provider-adapter-cookbook.md +1 -1
  86. package/docs/release-cut-checklist.md +30 -30
  87. package/docs/safety-model.md +2 -2
  88. package/docs/scientific-validation.md +3 -3
  89. package/docs/session-lifecycle.md +2 -2
  90. package/docs/skills-marketplace.md +1 -1
  91. package/docs/tool-usage.md +2 -2
  92. package/docs/trace-store.md +1 -1
  93. package/docs/troubleshooting.md +1 -1
  94. package/docs/tui-design.md +2 -2
  95. package/docs/worker-dispatch-mechanics.md +1 -1
  96. package/package.json +1 -1
  97. package/src/core/git-commit-attribution.ts +46 -21
  98. package/src/domains/config/keybindings.ts +3 -3
  99. package/src/interactive/chat-panel.ts +555 -244
  100. package/src/interactive/chat-renderer.ts +50 -19
  101. package/src/interactive/editor-submit.ts +26 -1
  102. package/src/interactive/footer/widgets.ts +22 -20
  103. package/src/interactive/footer-panel.ts +6 -1
  104. package/src/interactive/interactive-application.ts +2 -0
  105. package/src/interactive/interactive-event-projection.ts +12 -0
  106. package/src/interactive/interactive-slash-runtime.ts +12 -7
  107. package/src/interactive/overlays/ask-user.ts +146 -24
  108. package/src/interactive/renderers/tool-execution.ts +151 -56
  109. package/src/interactive/status/index.ts +12 -1
  110. package/src/interactive/status/reasoning.ts +87 -0
  111. package/src/interactive/status/summary.ts +13 -2
  112. package/src/interactive/transcript-detail.ts +120 -0
  113. package/src/tools/builtin-tool-catalog.ts +7 -1
  114. package/src/tools/presentation.ts +107 -0
  115. package/src/tools/registry.ts +6 -0
@@ -1,9 +1,9 @@
1
1
  # Evidence Corpus and Long-Term Memory
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive memory lifecycle dashboard and simulator is located at [docs/html/memory_blueprint.html](html/memory_blueprint.html) (Version: 0.3.2). Use it to design, validate, and simulate memory proposals, approval loops, pruning rules, and token budgets.
4
+ > **Interactive Spec Available:** An interactive memory lifecycle dashboard and simulator is located at [docs/html/memory_blueprint.html](html/memory_blueprint.html) (Version: 0.3.3). Use it to design, validate, and simulate memory proposals, approval loops, pruning rules, and token budgets.
5
5
 
6
- Clio Coder treats run claims and agent lessons as structured artifacts to support reproducibility and scientific provenance. In evaluations such as [SWE-bench](https://www.swebench.com), capturing granular execution evidence is essential for validating agent claims. Evidence corpora are deterministic directories built from run ledgers, receipts, sessions, audits, and eval artifacts. In v0.3.2, forensic evidence auto-builds on dispatch run completion: when a run finalizes, the observability domain automatically compiles the evidence bundle under `<dataDir>/evidence/run-<id>/` and updates a compact sidecar index row in `<stateDir>/evidence-index.json`. Long-term memory records are local, evidence-linked, and only injected after explicit approval. Use the TUI [`/view`](observability.md) command for interactive inspection of receipts, dispatch output, durable tool output, compaction summaries, and session accountability before building or citing evidence.
6
+ Clio Coder treats run claims and agent lessons as structured artifacts to support reproducibility and scientific provenance. In evaluations such as [SWE-bench](https://www.swebench.com), capturing granular execution evidence is essential for validating agent claims. Evidence corpora are deterministic directories built from run ledgers, receipts, sessions, audits, and eval artifacts. In v0.3.3, forensic evidence auto-builds on dispatch run completion: when a run finalizes, the observability domain automatically compiles the evidence bundle under `<dataDir>/evidence/run-<id>/` and updates a compact sidecar index row in `<stateDir>/evidence-index.json`. Long-term memory records are local, evidence-linked, and only injected after explicit approval. Use the TUI [`/view`](observability.md) command for interactive inspection of receipts, dispatch output, durable tool output, compaction summaries, and session accountability before building or citing evidence.
7
7
 
8
8
  Source of truth: `src/domains/evidence/**`, `src/domains/memory/**`, `src/cli/evidence.ts`, and `src/cli/memory.ts`.
9
9
 
package/docs/evolution.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Evolution and Change Manifests
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive change manifest editor, authority risk assessor, and checklist workspace is located at [docs/html/evolution_blueprint.html](html/evolution_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive change manifest editor, authority risk assessor, and checklist workspace is located at [docs/html/evolution_blueprint.html](html/evolution_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio Coder uses change manifests to make harness changes reviewable, falsifiable, and rollback-friendly. CLIO stands for Context Layer for Input/Output, named for the Greek muse of history. A manifest is JSON, generated or checked with `clio-coder evolve manifest`, and should describe what changed, why, what evidence supports it, what could regress, how to validate it, and how to roll it back.
7
7
 
@@ -1,6 +1,6 @@
1
1
  # Exit Codes & Machine-Readable Output Contracts
2
2
 
3
- This document specifies the process exit codes, machine-readable JSON streaming formats, standard I/O separation rules, and `--help` conventions across all Clio Coder CLI commands in `v0.3.2`.
3
+ This document specifies the process exit codes, machine-readable JSON streaming formats, standard I/O separation rules, and `--help` conventions across all Clio Coder CLI commands in `v0.3.3`.
4
4
 
5
5
  Source implementations: `src/cli/` and `src/entry/`.
6
6
 
@@ -1,7 +1,7 @@
1
1
  # Extensions, Prompt Templates, Skills, and Share Archives
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/extensions_blueprint.html](html/extensions_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/extensions_blueprint.html](html/extensions_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio Coder has lightweight community-oriented resource packaging. Extensions are filesystem bundles that contribute prompts and skills. Share archives are portable JSON files for moving project/user Clio resources between machines or collaborators. Themes are built into the engine and are no longer loaded from extensions.
7
7
 
@@ -251,7 +251,7 @@ Share archives are single JSON files:
251
251
  "formatVersion": 1,
252
252
  "manifest": {
253
253
  "format": "clio.share.v1",
254
- "clioVersion": "0.3.2",
254
+ "clioVersion": "0.3.3",
255
255
  "createdAt": "...",
256
256
  "files": []
257
257
  },
@@ -1,6 +1,6 @@
1
1
  # Fleet Dispatch
2
2
 
3
- > **Interactive Spec Available:** An interactive fleet node topology planner, scout router, receipt verifier, and failure taxonomy simulator is located at [docs/html/fleet_dispatch_blueprint.html](html/fleet_dispatch_blueprint.html) (Version: 0.3.2).
3
+ > **Interactive Spec Available:** An interactive fleet node topology planner, scout router, receipt verifier, and failure taxonomy simulator is located at [docs/html/fleet_dispatch_blueprint.html](html/fleet_dispatch_blueprint.html) (Version: 0.3.3).
4
4
 
5
5
  Clio Coder dispatches bounded worker agents. With a fleet configured, those
6
6
  workers run on remote machines over SSH while the orchestrator keeps every
@@ -3,7 +3,7 @@
3
3
  Clio Coder is designed to be self-contained and platform-compliant. This document outlines the default directory paths, file purposes, permission levels, and lifecycle commands (`install`, `reset`, `upgrade`, and `uninstall`). Clio Coder installs from npm as `@iowarp/clio-coder` (`npm install -g @iowarp/clio-coder`, published since v0.3.0) or from a source checkout with a deterministic local symlink; the CLI classifies both install kinds and `clio-coder upgrade` handles each.
4
4
 
5
5
  > [!TIP]
6
- > **Interactive Spec Available:** An interactive dashboard with a path simulator and visual flowcharts is located at [docs/html/lifecycle_blueprint.html](html/lifecycle_blueprint.html) (Version: 0.3.2). You can open it directly in any web browser to view details dynamically.
6
+ > **Interactive Spec Available:** An interactive dashboard with a path simulator and visual flowcharts is located at [docs/html/lifecycle_blueprint.html](html/lifecycle_blueprint.html) (Version: 0.3.3). You can open it directly in any web browser to view details dynamically.
7
7
 
8
8
  ---
9
9
 
@@ -221,25 +221,25 @@ next `clio-coder` launch refreshes it. `install.json` then reads
221
221
  `upgradedFrom: "0.3.0"`; doctor's row becomes
222
222
  `0.3.1 (installed ..., upgraded ... from 0.3.0)`.
223
223
 
224
- #### Upgrading to 0.3.2
224
+ #### Upgrading to 0.3.3
225
225
 
226
- Upgrading from 0.3.1 to 0.3.2 is automated:
226
+ Upgrading from 0.3.1 to 0.3.3 is automated:
227
227
 
228
228
  ```bash
229
229
  clio-coder upgrade
230
230
  ```
231
231
 
232
- Key lifecycle and operational updates in v0.3.2:
232
+ Key lifecycle and operational updates in v0.3.3:
233
233
  - Upgraded the underlying engine SDK libraries to 0.84.0 with signal-aware OAuth cancellation.
234
234
  - Hardened migration resilience: damaged `credentials.yaml` files no longer block upgrades when no renames are needed (#121); `--skip-migrations` is available as a recovery override.
235
- - Fullscreen TUI mode (`terminal.tuiMode`, `terminal.fullscreenScrollbar`) is available via Settings → Terminal (restart required). Adaptive presentation pacing is the live `terminal.smoothStreaming` setting; 0.3.2 defaults it to `off`, with conservative `auto` and explicit `on` available from the same section.
235
+ - Fullscreen TUI mode (`terminal.tuiMode`, `terminal.fullscreenScrollbar`) is available via Settings → Terminal (restart required). Adaptive presentation pacing is the live `terminal.smoothStreaming` setting; 0.3.3 defaults it to `off`, with conservative `auto` and explicit `on` available from the same section.
236
236
  - Interactive launch paints a measured Stage 0 shell on the same terminal and editor that Stage 1 hydrates. Typing, queued submits, resize, and Ctrl+C remain live during hydration; set `CLIO_CODER_INSTANT_SHELL=0` for the legacy fully hydrated first-frame path.
237
237
  - Turn settlement is enforced on `/new`, `/resume`, `/tree`, and `/fork` to cleanly commit in-flight streams before session writer replacement (#114).
238
238
  - Resumed and forked session entry replays standardize message prefixes through `src/engine/messages.ts`.
239
239
  - `AI_AGENT=clio-coder` is set on all child processes for system attribution.
240
240
 
241
241
  The first interactive launch after upgrading shows the version notice:
242
- `clio: upgraded 0.3.1 → 0.3.2. What changed at the keyboard: ...`
242
+ `clio: upgraded 0.3.1 → 0.3.3. What changed at the keyboard: ...`
243
243
  Recorded once per version in `install.json` as `noticedVersion`.
244
244
 
245
245
  ### C. System Resets (`clio-coder reset`)
@@ -1,7 +1,7 @@
1
1
  # Middleware and Component Registry
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard with an interactive component scanner and a dynamic hook-and-effect pipeline is located at [docs/html/middleware_blueprint.html](html/middleware_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard with an interactive component scanner and a dynamic hook-and-effect pipeline is located at [docs/html/middleware_blueprint.html](html/middleware_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio Coder has two related but separate surfaces:
7
7
 
@@ -1,7 +1,7 @@
1
1
  # Model Catalog, Runtime Refresh, and Field Notes
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard mapping capabilities, probe discovery, and target resolution is located at [docs/html/models_blueprint.html](html/models_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard mapping capabilities, probe discovery, and target resolution is located at [docs/html/models_blueprint.html](html/models_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio Coder treats a selectable model as the intersection of three sources:
7
7
 
@@ -1,7 +1,7 @@
1
1
  # Observability Viewer
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/observability_blueprint.html](html/observability_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/observability_blueprint.html](html/observability_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  `/view` is the interactive artifact viewer for a Clio session. It keeps the live transcript compact while preserving a full inspection path for durable artifacts, task ledgers, and successful workspace outputs.
7
7
 
@@ -159,8 +159,8 @@ The base provenance sets, steering, routing, quality, worker identity, and resul
159
159
  | `safety.toolTelemetry.ingestionErrors` | `number` | Current dispatch receipts | Malformed or lost frames, event-fold/source errors, and drain timeouts that make otherwise mediated telemetry incomplete | experimental |
160
160
  | `safety.toolTelemetry.unfinished` | `{ tool, count }[]` | Current dispatch receipts | Tool starts that had no matching finish when the receipt sealed | experimental |
161
161
  | `safety.toolTelemetry.workspaceMutationPossible` | `boolean` | Current dispatch receipts | Whether incomplete or unavailable telemetry could conceal a shared-workspace mutation; retry admission fails closed when true | experimental |
162
- | `autonomyEnforcement.grade` | `string` | Always in v0.3.2 | The autonomy grade level enforced for the run | experimental |
163
- | `autonomyEnforcement.autonomy` | `string` | Always in v0.3.2 | The effective autonomy level name (e.g. auto-edit, suggest, read-only, full-auto) | experimental |
162
+ | `autonomyEnforcement.grade` | `string` | Always in v0.3.3 | The autonomy grade level enforced for the run | experimental |
163
+ | `autonomyEnforcement.autonomy` | `string` | Always in v0.3.3 | The effective autonomy level name (e.g. auto-edit, suggest, read-only, full-auto) | experimental |
164
164
  | `autonomyEnforcement.externalMode` | `string` | When running external worker | The execution mode of the external worker runtime | experimental |
165
165
  | `autonomyEnforcement.dangerousBypass` | `boolean` | When running external worker | Whether a safety bypass was explicitly activated | experimental |
166
166
  | `validationGrounding.claimed` | `number` | Validation grounding evaluated | Count of validations claimed by worker | experimental |
@@ -101,7 +101,7 @@ chunk name. Every lazy-graph contract must prove the heavyweight marker absent
101
101
  before first use and present after a real invocation, then repeat from a packed
102
102
  installation in a foreign working directory.
103
103
 
104
- ## Corrected 0.3.2 baseline
104
+ ## Corrected 0.3.3 baseline
105
105
 
106
106
  These observations were recorded on 2026-08-19 in WSL2 Linux
107
107
  `6.18.33.2-microsoft-standard-WSL2`, x86-64, with an 80x24 `xterm-256color`
@@ -384,7 +384,7 @@ and the dispatch reservation, approval, gate, detach, monitor, and steer suites.
384
384
  ## Adaptive stream-pacer observations
385
385
 
386
386
  `terminal.smoothStreaming` is presentation-only. `off` is the exact existing
387
- 16 ms coalescer and remains the 0.3.2 default. `auto` uses the pacer only on a
387
+ 16 ms coalescer and remains the 0.3.3 default. `auto` uses the pacer only on a
388
388
  capable local TTY with no accessibility, remote/multiplexer, CI, or observed
389
389
  backpressure signal. `on` requests pacing, but frame construction still stops
390
390
  behind stdout backpressure. The pacer never republishes slices on the public
@@ -1,6 +1,6 @@
1
1
  # Proactive task memory
2
2
 
3
- > **Interactive Spec Available:** An interactive memory lifecycle dashboard and simulator is located at [docs/html/memory_blueprint.html](html/memory_blueprint.html) (Version: 0.3.2).
3
+ > **Interactive Spec Available:** An interactive memory lifecycle dashboard and simulator is located at [docs/html/memory_blueprint.html](html/memory_blueprint.html) (Version: 0.3.3).
4
4
 
5
5
  Clio's proactive task memory protects long-running work from behavioral state
6
6
  decay: a requirement, environment fact, failed attempt, or diagnosis can still
@@ -1,7 +1,7 @@
1
1
  # Prompt Envelope and Tools
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/tools_blueprint.html](html/tools_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/tools_blueprint.html](html/tools_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio Coder keeps the model-facing envelope stable and moves enforcement into the runtime registry and safety policy.
7
7
 
@@ -1,7 +1,7 @@
1
1
  # Provider Adapter Cookbook
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive runtime adapter descriptor builder and probe sequence capability checklist is located at [docs/html/provider_adapter_blueprint.html](html/provider_adapter_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive runtime adapter descriptor builder and probe sequence capability checklist is located at [docs/html/provider_adapter_blueprint.html](html/provider_adapter_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  This cookbook guides developers through implementing custom model runtimes and inference server integrations within Clio Coder. It explains the runtime descriptor interfaces, probing protocols, model synthesis, and how to configure reasoning and thinking behaviors.
7
7
 
@@ -1,23 +1,23 @@
1
- # v0.3.2 Release-Cut Checklist
1
+ # v0.3.3 Release-Cut Checklist
2
2
 
3
- The ordered steps that turn the prepared `v0.3.2` branch into a published
3
+ The ordered steps that turn the prepared `v0.3.3` branch into a published
4
4
  release. Everything above the line marked **AUTHORIZATION BOUNDARY** is
5
5
  repeatable and reversible and is run locally before the cut. Everything below
6
6
  it is external or irreversible and needs an explicit decision from the
7
- operator. Issue #112 is the release umbrella and carries the live state of
8
- every step; this page is the procedure.
7
+ operator. This page is the procedure and the release report carries the live
8
+ state of every step.
9
9
 
10
10
  ## Status of the prepared tree
11
11
 
12
12
  | Item | State |
13
13
  | --- | --- |
14
- | Branch | `v0.3.2`, local only; no remote `v0.3.2` branch |
15
- | `package.json` version | `0.3.2`; the top `CHANGELOG.md` heading is `## 0.3.2 - 2026-08-20` |
16
- | `main` | fast-forwarded prematurely to `c4c344ba` during Eneko's port integration and pushed. It is an ancestor of `v0.3.2`, must not move backward, and is fast-forwarded again only at Part 4. |
17
- | `origin/main` | `c4c344ba`, the same premature push |
18
- | Tags | none for 0.3.2, local or remote |
19
- | GitHub Release | none for 0.3.2 |
20
- | npm registry | `@iowarp/clio-coder@0.3.2` absent; `latest` is `0.3.1` |
14
+ | Branch | `v0.3.3`, local only; no remote `v0.3.3` branch |
15
+ | `package.json` version | `0.3.3`; the top `CHANGELOG.md` heading is `## 0.3.3 - 2026-08-21` |
16
+ | `main` | `e6c2571e`, the published `v0.3.2` commit; it is an ancestor of `v0.3.3` and moves only at Part 4. |
17
+ | `origin/main` | `e6c2571e`, matching the published `v0.3.2` commit |
18
+ | Tags | none for 0.3.3, local or remote |
19
+ | GitHub Release | none for 0.3.3 |
20
+ | npm registry | `@iowarp/clio-coder@0.3.3` absent; `latest` is `0.3.2` |
21
21
  | Commit provenance identity | Post-release maintainer follow-up, not a gate: verifying `clio-coder@iowarp.ai` on IOWarp-controlled GitHub and GitLab identities (such as `clio-coder-bot` or `iowarp-clio`, with `assets/clio-coder-avatar-512.png` as the avatar) only changes how those platforms render the trailers. |
22
22
 
23
23
  ---
@@ -58,22 +58,22 @@ Run against the exact final candidate with `NO_COLOR` unset and
58
58
  ## Part 2: version and notes (repeatable)
59
59
 
60
60
  13. Files carrying a version reference, to update together if the number
61
- changes: `package.json` and `package-lock.json`, the `## 0.3.2 - <date>`
62
- heading in `CHANGELOG.md`, the `(Version: 0.3.2)` markers in `docs/*.md`,
63
- the `Blueprint (v0.3.2)` titles in `docs/html/*.html`, the `--branch`
61
+ changes: `package.json` and `package-lock.json`, the `## 0.3.3 - <date>`
62
+ heading in `CHANGELOG.md`, the `(Version: 0.3.3)` markers in `docs/*.md`,
63
+ the `Blueprint (v0.3.3)` titles in `docs/html/*.html`, the `--branch`
64
64
  pin in the README install block (the hygiene lint checks it), and the
65
65
  measured-at figures in `scripts/check-release.mjs` if the package size
66
66
  moved materially.
67
- 14. Confirm the `## 0.3.2` section of `CHANGELOG.md` describes every
67
+ 14. Confirm the `## 0.3.3` section of `CHANGELOG.md` describes every
68
68
  user-visible behavior change, including the ones that alter existing
69
69
  behavior, and carries no Workbench release narrative. The release workflow
70
70
  uses this section verbatim as the GitHub Release body.
71
71
  15. Re-run `npm run ci:release` after any version edit and commit as one
72
- commit on `v0.3.2`.
72
+ commit on `v0.3.3`.
73
73
 
74
74
  ## Part 3: present the gate
75
75
 
76
- 16. Report to the operator before touching `main`: the exact final `v0.3.2`
76
+ 16. Report to the operator before touching `main`: the exact final `v0.3.3`
77
77
  SHA and clean status, the commits added since the handoff SHA, the gate
78
78
  commands with pass/fail totals for both Node majors, the package version
79
79
  and changelog heading, the tarball audit, the clean-install results and any
@@ -92,9 +92,9 @@ confirming the exact SHA and the commands.
92
92
  ## Part 4: fast-forward `main`
93
93
 
94
94
  17. `git fetch origin` immediately before integrating; require `origin/main`
95
- to be an ancestor of the reviewed `v0.3.2` tip and confirm no other
95
+ to be an ancestor of the reviewed `v0.3.3` tip and confirm no other
96
96
  worktree has `main` checked out.
97
- 18. `git checkout main && git merge --ff-only v0.3.2`. No merge commit, no
97
+ 18. `git checkout main && git merge --ff-only v0.3.3`. No merge commit, no
98
98
  rebase, no reset. Verify `main` equals the reviewed SHA and is clean.
99
99
  19. `git fetch origin` once more; stop on any unexpected remote movement. Then
100
100
  `git push origin main`. Never `--force` or `--force-with-lease`.
@@ -105,12 +105,12 @@ confirming the exact SHA and the commands.
105
105
  Node 24 jobs must succeed on the exact release SHA. A red or pending run
106
106
  blocks the tag; a flake is rerun only with concrete evidence, never
107
107
  silenced with an unrelated change.
108
- 21. Reconfirm that tag `v0.3.2` and the GitHub Release do not exist, then
109
- `git tag -a v0.3.2 -m "Clio Coder 0.3.2"` on the green SHA and
110
- `git push origin v0.3.2`.
108
+ 21. Reconfirm that tag `v0.3.3` and the GitHub Release do not exist, then
109
+ `git tag -a v0.3.3 -m "Clio Coder 0.3.3"` on the green SHA and
110
+ `git push origin v0.3.3`.
111
111
  22. The tag push triggers `.github/workflows/release.yml`, which requires a
112
112
  successful `ci` run for the tagged SHA, verifies the tag matches
113
- `package.json`, builds and audits the artifact, extracts the `## 0.3.2`
113
+ `package.json`, builds and audits the artifact, extracts the `## 0.3.3`
114
114
  section of `CHANGELOG.md` as the release body, and attaches the tarball.
115
115
  Do not create a release by hand. Verify the run's SHA, the notes, the
116
116
  attached tarball, and the URL.
@@ -118,9 +118,9 @@ confirming the exact SHA and the commands.
118
118
  ## Part 6: npm publication (irreversible)
119
119
 
120
120
  23. `npm whoami` and confirm the registry and account; reconfirm
121
- `@iowarp/clio-coder@0.3.2` is still absent.
121
+ `@iowarp/clio-coder@0.3.3` is still absent.
122
122
  24. Obtain the operator's explicit dist-tag decision. `latest` makes this the
123
- default install for every user; `--tag next` keeps `0.3.1` as the default.
123
+ default install for every user; `--tag next` keeps `0.3.2` as the default.
124
124
  25. Run `npm publish` (or `npm publish --tag next`) once. `prepublishOnly`
125
125
  re-runs `ci:release` as a safety net; it is not a substitute for Part 1.
126
126
  26. A published version cannot be replaced. `npm unpublish` is restricted and
@@ -128,15 +128,15 @@ confirming the exact SHA and the commands.
128
128
 
129
129
  ## Part 7: post-publish verification and follow-ups
130
130
 
131
- 27. `npm view @iowarp/clio-coder@0.3.2` and the selected dist-tag.
131
+ 27. `npm view @iowarp/clio-coder@0.3.3` and the selected dist-tag.
132
132
  28. On a clean machine, `npm install -g @iowarp/clio-coder` from the registry
133
133
  rather than from a local tarball, then repeat step 12 against it, plus
134
134
  `configure` to a real target and one real turn when one is authorized.
135
135
  This is the only step that tests what users actually receive.
136
- 29. From an installation of 0.3.1, verify `clio-coder upgrade` finds and
137
- applies 0.3.2.
138
- 30. Close #112 with the SHA, CI URL, tag, GitHub Release URL, npm version and
139
- dist-tag, tarball evidence, and the post-publish verification.
136
+ 29. From an installation of 0.3.2, verify `clio-coder upgrade` finds and
137
+ applies 0.3.3.
138
+ 30. Record the SHA, CI URL, tag, GitHub Release URL, npm version and dist-tag,
139
+ tarball evidence, and the post-publish verification in the release report.
140
140
  31. Maintainer follow-up, independent of the release: verify the commit
141
141
  provenance email `clio-coder@iowarp.ai` on IOWarp-controlled GitHub and
142
142
  GitLab identities such as `clio-coder-bot` or `iowarp-clio`, and upload
@@ -1,7 +1,7 @@
1
1
  # Clio Coder Safety Model
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/safety_blueprint.html](html/safety_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/safety_blueprint.html](html/safety_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio Coder's safety posture is code-enforced, not prompt-only. As the orchestrator coding agent in the [IOWarp](https://iowarp.ai) ecosystem developed by the [Gnosis Research Center](https://grc.iit.edu) at Illinois Tech under NSF Award [#2411318](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2411318), Clio gates execution by target capabilities, the tool registry, the safety policy engine, project policies, protected-artifact checks, and audit receipts.
7
7
 
@@ -13,7 +13,7 @@ Source of truth: `src/domains/safety/**`, `src/tools/registry.ts`, `src/tools/bo
13
13
 
14
14
  The `autonomy` setting (`read-only` | `suggest` | `auto-edit` | `full-auto`) is an enforced dial. It controls exactly one thing: which action classes run immediately, which park for operator approval, and which are auto-denied. The safety net (damage-control rules, path policy, protected artifacts, loop guard, dispatch scope admission) is independent of the dial and identical at every level. When a `[safety-net]` notice appears at full-auto, that is the always-on net working as designed, not a contradiction of the level.
15
15
 
16
- In Clio Coder v0.3.2, effective autonomy resolution is strictly centralized in `src/entry/orchestrator.ts` through `resolveEffectiveAutonomy` and `resolveBaselineAutonomy`. Every admission surface (tool registry admission, dispatch plan provenance, and ACP session snapshots) delegates to this pair of functions so that fallback paths cannot diverge across execution contexts. `resolveBaselineAutonomy` evaluates dispatch settings overrides, headless CLI options, and configuration settings before applying the default `auto-edit` level. `resolveEffectiveAutonomy` combines any active ACP session autonomy level with the baseline resolution.
16
+ In Clio Coder v0.3.3, effective autonomy resolution is strictly centralized in `src/entry/orchestrator.ts` through `resolveEffectiveAutonomy` and `resolveBaselineAutonomy`. Every admission surface (tool registry admission, dispatch plan provenance, and ACP session snapshots) delegates to this pair of functions so that fallback paths cannot diverge across execution contexts. `resolveBaselineAutonomy` evaluates dispatch settings overrides, headless CLI options, and configuration settings before applying the default `auto-edit` level. `resolveEffectiveAutonomy` combines any active ACP session autonomy level with the baseline resolution.
17
17
 
18
18
  ### Autonomy levels
19
19
 
@@ -1,11 +1,11 @@
1
1
  # Clio Coder Scientific Validation Contracts
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive numerical tolerance calculator and HPC queue execution simulator is located at [docs/html/validation_blueprint.html](html/validation_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive numerical tolerance calculator and HPC queue execution simulator is located at [docs/html/validation_blueprint.html](html/validation_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Scientific software development cannot treat simple file presence as proof of correctness. A simulation script that crashes on rank 48, or writes out NetCDF arrays filled with `NaN`s, may still successfully write a file to the disk.
7
7
 
8
- Clio Coder recognizes **scientific validation contract files** as an opt-in signal for a higher evidence bar. In v0.3.2, core Clio does not parse or enforce a scientific contract schema. The presence of `.clio-coder/validation.yaml`, `.clio-coder/validation.yml`, `validation.yaml`, `validation.yml`, or `VALIDATION.md` at the workspace root raises the default rigor level to `high`; the file contents are advisory material for developers, project agents, and external validators.
8
+ Clio Coder recognizes **scientific validation contract files** as an opt-in signal for a higher evidence bar. In v0.3.3, core Clio does not parse or enforce a scientific contract schema. The presence of `.clio-coder/validation.yaml`, `.clio-coder/validation.yml`, `validation.yaml`, `validation.yml`, or `VALIDATION.md` at the workspace root raises the default rigor level to `high`; the file contents are advisory material for developers, project agents, and external validators.
9
9
 
10
10
  The convention below is a recommended shape for scientific projects that need to document expected dimensions, attributes, numerical tolerances, scheduler context, and verification commands for scientific artifacts. Developed at the [Gnosis Research Center (GRC)](https://grc.iit.edu) at Illinois Tech as part of the NSF-funded scientific-software context (NSF Award [#2411318](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2411318)), this convention links execution metadata with physical output checks without claiming that the current harness executes those checks automatically.
11
11
 
@@ -77,7 +77,7 @@ Comparing floating-point values in scientific computations must accommodate roun
77
77
 
78
78
  ## Common Scientific Artifact Families
79
79
 
80
- The following labels are useful project conventions for validation contracts and reports. They are not a closed, core-enforced enum in v0.3.2:
80
+ The following labels are useful project conventions for validation contracts and reports. They are not a closed, core-enforced enum in v0.3.3:
81
81
 
82
82
  - **`HDF5` / `NetCDF` / `Zarr`:** Multi-dimensional scientific array files.
83
83
  - **`FITS`:** Flexible Image Transport System (used in astrophysics).
@@ -1,6 +1,6 @@
1
1
  # Session Lifecycle
2
2
 
3
- This document is the authoritative specification for Clio Coder interactive and headless session lifecycles, on-disk ledger structures, tree-based conversation branching, checkpoints, and recovery protocols in `v0.3.2`.
3
+ This document is the authoritative specification for Clio Coder interactive and headless session lifecycles, on-disk ledger structures, tree-based conversation branching, checkpoints, and recovery protocols in `v0.3.3`.
4
4
 
5
5
  Source implementations: `src/engine/session.ts` and `src/domains/session/`.
6
6
 
@@ -43,7 +43,7 @@ export interface ClioSessionMeta {
43
43
  }
44
44
  ```
45
45
 
46
- Format version `CURRENT_SESSION_FORMAT_VERSION = 3` (`src/engine/session.ts:66`) is stamped on all sessions created in `v0.3.2`. Sessions with missing or earlier format versions trigger schema migrations in `src/domains/session/migrations/` on `/resume`.
46
+ Format version `CURRENT_SESSION_FORMAT_VERSION = 3` (`src/engine/session.ts:66`) is stamped on all sessions created in `v0.3.3`. Sessions with missing or earlier format versions trigger schema migrations in `src/domains/session/migrations/` on `/resume`.
47
47
 
48
48
  ---
49
49
 
@@ -1,7 +1,7 @@
1
1
  # Skills Marketplace
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/skills_blueprint.html](html/skills_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/skills_blueprint.html](html/skills_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  The Skills Hub (`/skill`) shows project skills, user skills, and the marketplace. Every marketplace row comes from the same local lookup that `clio-coder skills install <name>` and `/skill <name>` resolve through, so the hub lists nothing it cannot install.
7
7
 
@@ -1,11 +1,11 @@
1
1
  # Tool Usage Reference
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive seven-plane tool atlas and observation envelope truncation/offload calculator is located at [docs/html/tool_usage_blueprint.html](html/tool_usage_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive seven-plane tool atlas and observation envelope truncation/offload calculator is located at [docs/html/tool_usage_blueprint.html](html/tool_usage_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  This is the deep usage reference behind the deliberately terse tool descriptions in the prompt envelope. Toolkit v2 keeps rich guidance out of tool descriptions and puts it here, where `context(scope="docs", query=...)` retrieves it section by section. Each tool below has its own self-contained `##` section covering the argument surface, defaults, truncation and continuation behavior, and concrete calls. Source of truth is `src/tools/`.
7
7
 
8
- In Clio Coder v0.3.2, `src/tools/agent-tools.ts` serves as the single agent-tool adapter across both orchestrator and worker runtimes. Both surfaces resolve their executable tools through the exact same `effectiveToolNames` narrowing, ensuring that attested tool schemas never drift from the tools available at runtime. Tools are keyed strictly by the `ToolName` union with no alias table. Argument leniency for weak-model callers is provided exclusively by per-tool `prepareArguments` normalizers declared on `ToolSpec`.
8
+ In Clio Coder v0.3.3, `src/tools/agent-tools.ts` serves as the single agent-tool adapter across both orchestrator and worker runtimes. Both surfaces resolve their executable tools through the exact same `effectiveToolNames` narrowing, ensuring that attested tool schemas never drift from the tools available at runtime. Tools are keyed strictly by the `ToolName` union with no alias table. Argument leniency for weak-model callers is provided exclusively by per-tool `prepareArguments` normalizers declared on `ToolSpec`.
9
9
 
10
10
  ## Observation envelope: truncation notices, offload, next hints, and the turn budget
11
11
 
@@ -1,7 +1,7 @@
1
1
  # Trace store contract
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive trace database viewer, schema inspector, and SQL query validator simulator is located at [docs/html/trace_blueprint.html](html/trace_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive trace database viewer, schema inspector, and SQL query validator simulator is located at [docs/html/trace_blueprint.html](html/trace_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  Clio's trace database is a rebuildable, queryable mirror. Receipts, session
7
7
  ledgers, gate artifacts, and evidence remain the source of truth. Removing
@@ -1,6 +1,6 @@
1
1
  # Troubleshooting & Error Remediation
2
2
 
3
- This guide provides concrete, actionable remediation procedures for operational errors, permission denials, target connection failures, and system diagnostics in Clio Coder `v0.3.2`.
3
+ This guide provides concrete, actionable remediation procedures for operational errors, permission denials, target connection failures, and system diagnostics in Clio Coder `v0.3.3`.
4
4
 
5
5
  ---
6
6
 
@@ -1,7 +1,7 @@
1
1
  # Clio TUI Design System
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive color/glyph token laboratory and terminal transcript preview renderer is located at [docs/html/tui_design_blueprint.html](html/tui_design_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive color/glyph token laboratory and terminal transcript preview renderer is located at [docs/html/tui_design_blueprint.html](html/tui_design_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  This document is the reference specification for the Clio Coder TUI visual layout, styling, and behavior. It describes color semantics, the glyph vocabulary, structural recipes, and state choreography for all surfaces under [src/interactive/](../src/interactive/).
7
7
 
@@ -152,7 +152,7 @@ The Clio screen maintains a responsive, four-zone structure: the launchpad / ses
152
152
 
153
153
  In fullscreen mode, `PageUp` and `PageDown` scroll one viewport, `Home` and `End` jump to its bounds, `Ctrl+Shift+Up` and `Ctrl+Shift+Down` jump between semantic prompts, and the mouse wheel scrolls the transcript. Dragging the scrollbar thumb moves the viewport directly. `terminal.fullscreenScrollbar` is `hidden`, `auto` (visible during interaction), or `always`. Manual scrolling suspends follow-end so new output does not steal the operator's position; returning to the bottom resumes it. Both fullscreen settings are restart-scoped because Clio constructs its terminal renderer and component graph once at startup.
154
154
 
155
- `terminal.smoothStreaming` controls presentation-only pacing of derived assistant text and thinking. `off`, the 0.3.2 release default, is the existing immediate 16 ms coalescer. `auto` paces only on a capable local TTY and bypasses pacing for non-TTY, SSH, multiplexers, CI, screen-reader/reduced-motion markers, or observed stdout backpressure. `on` explicitly requests grapheme-safe pacing, while still stopping frame production behind stdout backpressure. Raw provider wrappers never enter the panel, canonical events and persistence remain synchronous, and tool/message/turn/abort/retry/submit/teardown boundaries drain visible state before they continue. `CLIO_CODER_SMOOTH_STREAM` is the one-process escape hatch and takes precedence over settings; invalid values resolve to `off`.
155
+ `terminal.smoothStreaming` controls presentation-only pacing of derived assistant text and thinking. `off`, the 0.3.3 release default, is the existing immediate 16 ms coalescer. `auto` paces only on a capable local TTY and bypasses pacing for non-TTY, SSH, multiplexers, CI, screen-reader/reduced-motion markers, or observed stdout backpressure. `on` explicitly requests grapheme-safe pacing, while still stopping frame production behind stdout backpressure. Raw provider wrappers never enter the panel, canonical events and persistence remain synchronous, and tool/message/turn/abort/retry/submit/teardown boundaries drain visible state before they continue. `CLIO_CODER_SMOOTH_STREAM` is the one-process escape hatch and takes precedence over settings; invalid values resolve to `off`.
156
156
 
157
157
  Interactive startup uses one terminal lease across both boot stages. Stage 0 owns the terminal, renderer, root host, exact editor instance, input decoder, raw mode, resize subscription, protocol queries, signals, and stop lifecycle, and commits a measured minimal frame while services hydrate. Hydration synchronously swaps the root and input/signal delegates without reconstructing the editor or initializing terminal protocols again. Early Enter submissions become immutable, visibly queued admissions and drain once through the ordinary command pipeline; a later draft and cursor stay in the same editor. Boot failure or an early signal closes the lease exactly once, restores the terminal, and prints recoverable queued input and draft text. `CLIO_CODER_INSTANT_SHELL=0` selects the legacy fully hydrated first frame; ACP, headless, ordinary non-TTY invocation, and subcommand execution never acquire the lease. An explicit `CLIO_CODER_INTERACTIVE=1` retains its established force-interactive behavior on a non-TTY stream.
158
158
 
@@ -1,7 +1,7 @@
1
1
  # Worker Dispatch Mechanics
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive NDJSON protocol timeline stream and heartbeat watchdog simulator is located at [docs/html/worker_dispatch_blueprint.html](html/worker_dispatch_blueprint.html) (Version: 0.3.2).
4
+ > **Interactive Spec Available:** An interactive NDJSON protocol timeline stream and heartbeat watchdog simulator is located at [docs/html/worker_dispatch_blueprint.html](html/worker_dispatch_blueprint.html) (Version: 0.3.3).
5
5
 
6
6
  This document describes the design and lifecycle of Clio Coder dispatched workers, focusing on the spawning sequence, execution isolation, the standard input/output NDJSON communication loop, and permission escalation routing.
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iowarp/clio-coder",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Coding agent for HPC and scientific-software developers, part of IOWarp's CLIO ecosystem of agentic science.",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,5 +1,15 @@
1
1
  import { execFileSync } from "node:child_process";
2
- import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
2
+ import {
3
+ accessSync,
4
+ chmodSync,
5
+ existsSync,
6
+ constants as fsConstants,
7
+ mkdirSync,
8
+ readFileSync,
9
+ renameSync,
10
+ rmSync,
11
+ writeFileSync,
12
+ } from "node:fs";
3
13
  import { join, resolve } from "node:path";
4
14
  import { AI_AGENT_NAME } from "./agent-environment.js";
5
15
  import { CLIO_COMMIT_TRAILERS, type CommitAttributionEvidence } from "./commit-attribution.js";
@@ -30,7 +40,7 @@ const PROBE_CACHE_MAX_ENTRIES = 32;
30
40
  type RepositoryProbe =
31
41
  | { kind: "outside" }
32
42
  | { kind: "custom"; hooksPath: string }
33
- | { kind: "default"; declaredDefault: boolean };
43
+ | { kind: "default"; declaredDefaultHooksPath: string | null };
34
44
 
35
45
  const probeCache = new Map<string, { at: number; probe: RepositoryProbe }>();
36
46
  let installedHooksDirectory: string | null = null;
@@ -171,27 +181,29 @@ case "$base_count" in
171
181
  ;;
172
182
  esac
173
183
 
174
- # A command may have moved into a different repository after Clio prepared the
175
- # environment. A repository with its own core.hooksPath gets its hook run and
176
- # is never attributed; composing an unknown setup is not attempted.
177
- if [ "$${DEFAULT_HOOKS_EQUIVALENT_ENV}" != '1' ] && git config --get core.hooksPath >/dev/null 2>&1; then
178
- custom_hooks=$(git config --path --get core.hooksPath 2>/dev/null || true)
184
+ # Resolve the current repository's default hooks directory before interpreting
185
+ # the environment prepared for the originating repository. A command may have
186
+ # moved into a different repository in between; an explicit default path is
187
+ # composable only while it still names this same repository's default.
188
+ common_dir=$(git rev-parse --git-common-dir 2>/dev/null || true)
189
+ common_dir_absolute=$(cd "$common_dir" 2>/dev/null && pwd -P || true)
190
+ case "$common_dir_absolute" in
191
+ '') default_hooks_directory=; default_hook= ;;
192
+ *) default_hooks_directory=$common_dir_absolute/hooks; default_hook=$default_hooks_directory/$hook_name ;;
193
+ esac
194
+
195
+ if git config --get core.hooksPath >/dev/null 2>&1 &&
196
+ [ "$${DEFAULT_HOOKS_EQUIVALENT_ENV}" != "$default_hooks_directory" ]; then
197
+ custom_hooks=$(git config --path --get core.hooksPath 2>/dev/null || true)
179
198
  case "$custom_hooks" in
180
199
  '') ;;
181
200
  /*) custom_hook=$custom_hooks/$hook_name ;;
182
201
  *) custom_hook=$PWD/$custom_hooks/$hook_name ;;
183
202
  esac
184
203
  if [ -n "$custom_hooks" ] && [ -x "$custom_hook" ]; then exec "$custom_hook" "$@"; fi
185
- exit 0
204
+ exit 0
186
205
  fi
187
206
 
188
- common_dir=$(git rev-parse --git-common-dir 2>/dev/null || true)
189
- case "$common_dir" in
190
- '') default_hook= ;;
191
- /*) default_hook=$common_dir/hooks/$hook_name ;;
192
- *) default_hook=$PWD/$common_dir/hooks/$hook_name ;;
193
- esac
194
-
195
207
  if [ "$hook_name" != 'prepare-commit-msg' ]; then
196
208
  if [ -n "$default_hook" ] && [ -x "$default_hook" ]; then exec "$default_hook" "$@"; fi
197
209
  exit 0
@@ -258,11 +270,22 @@ function installManagedHook(directory: string, name: string): void {
258
270
  }
259
271
  }
260
272
 
273
+ function managedHooksDirectoryIsIntact(directory: string): boolean {
274
+ try {
275
+ for (const name of MANAGED_HOOK_NAMES) {
276
+ const hook = join(directory, name);
277
+ if (readFileSync(hook, "utf8") !== MANAGED_HOOK_SCRIPT) return false;
278
+ accessSync(hook, fsConstants.X_OK);
279
+ }
280
+ return true;
281
+ } catch {
282
+ return false;
283
+ }
284
+ }
285
+
261
286
  function managedHooksDirectory(): string {
262
287
  const directory = join(clioStateDir(), "git-hooks", `v${MANAGED_HOOK_VERSION}`);
263
- // Installed once per process; one stat afterwards confirms the Clio-owned
264
- // directory is still there rather than re-reading all of its wrappers.
265
- if (installedHooksDirectory === directory && existsSync(join(directory, "prepare-commit-msg"))) return directory;
288
+ if (installedHooksDirectory === directory && managedHooksDirectoryIsIntact(directory)) return directory;
266
289
  mkdirSync(directory, { recursive: true, mode: 0o700 });
267
290
  for (const name of MANAGED_HOOK_NAMES) installManagedHook(directory, name);
268
291
  installedHooksDirectory = directory;
@@ -281,13 +304,13 @@ function gitEnvironmentFingerprint(env: NodeJS.ProcessEnv): string {
281
304
  function probeRepositoryUncached(cwd: string, env: NodeJS.ProcessEnv): RepositoryProbe {
282
305
  if (gitOutput(cwd, env, ["rev-parse", "--is-inside-work-tree"]) !== "true") return { kind: "outside" };
283
306
  const customHooksPath = gitOutput(cwd, env, ["config", "--path", "--get", "core.hooksPath"]);
284
- if (customHooksPath === null) return { kind: "default", declaredDefault: false };
307
+ if (customHooksPath === null) return { kind: "default", declaredDefaultHooksPath: null };
285
308
  const commonDirectory = gitOutput(cwd, env, ["rev-parse", "--git-common-dir"]);
286
309
  const defaultHooksPath = commonDirectory === null ? null : resolve(cwd, commonDirectory, "hooks");
287
310
  if (customHooksPath.length === 0 || resolve(cwd, customHooksPath) !== defaultHooksPath) {
288
311
  return { kind: "custom", hooksPath: customHooksPath };
289
312
  }
290
- return { kind: "default", declaredDefault: true };
313
+ return { kind: "default", declaredDefaultHooksPath: defaultHooksPath };
291
314
  }
292
315
 
293
316
  function probeRepository(cwd: string, env: NodeJS.ProcessEnv, now = Date.now()): RepositoryProbe {
@@ -342,7 +365,9 @@ export function withManagedGitCommitAttributionEnvironment(
342
365
  diagnostic: boundedDiagnostic(`core.hooksPath is set to '${probe.hooksPath}'; Clio commit attribution skipped`),
343
366
  };
344
367
  }
345
- if (probe.declaredDefault) env[DEFAULT_HOOKS_EQUIVALENT_ENV] = "1";
368
+ if (probe.declaredDefaultHooksPath !== null) {
369
+ env[DEFAULT_HOOKS_EQUIVALENT_ENV] = probe.declaredDefaultHooksPath;
370
+ }
346
371
 
347
372
  let hooksDirectory: string;
348
373
  try {