Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
04ca84a
Port core file and search tools
akougkas May 16, 2026
105124e
upgrade pi sdk to 0.74
akougkas May 16, 2026
e2b2ed6
fix: preserve pi response metadata
akougkas May 16, 2026
5c7c7b0
Port ls parity and capture bash failures
akougkas May 16, 2026
f8a26ac
Simplify damage control rule loading
akougkas May 16, 2026
be3e1bf
Centralize selfdev reload policy
akougkas May 16, 2026
5da8f2e
Support damage control confirmation rules
akougkas May 16, 2026
d6ef207
Split extension manager responsibilities
akougkas May 16, 2026
ff21a34
Share resource loader mechanics
akougkas May 16, 2026
d3a4862
Separate dynamic config value resolution
akougkas May 16, 2026
b5eb04c
Add safety path policy helpers
akougkas May 16, 2026
d1ce8b6
Wire project path policies into safety engine
akougkas May 16, 2026
e68e1d7
Make header config resolution static by default
akougkas May 16, 2026
cfc5124
Resolve bash cwd relative to safety workspace
akougkas May 16, 2026
de01f9c
Version worker spec runtime boundary
akougkas May 16, 2026
4337d0e
Route command secrets through provider auth
akougkas May 16, 2026
37a2dec
Quarantine selfdev harness state contract
akougkas May 16, 2026
1eb6db4
Preserve extension installs on failed force copy
akougkas May 16, 2026
e937d42
Align glob path handling and limits
akougkas May 16, 2026
9c7e368
Move selfdev worker contract into core
akougkas May 16, 2026
5deefe0
Keep local output budgets finite
akougkas May 16, 2026
5aa9883
Preserve bash timeout output
akougkas May 16, 2026
aa11512
Make sibling context globals explicit
akougkas May 16, 2026
917549d
Expose dev harness handle through core
akougkas May 16, 2026
4da9cbd
Guard stable code from selfdev imports
akougkas May 16, 2026
11fb8cb
Avoid false find limit notices
akougkas May 16, 2026
ffc00af
Normalize find search roots like reads
akougkas May 16, 2026
9c9b37b
Advertise file path aliases in file tools
akougkas May 16, 2026
532959d
Normalize grep search roots like reads
akougkas May 16, 2026
efa08a4
Cap web fetch reads while streaming
akougkas May 16, 2026
544d2f7
Clamp local output budgets to known context
akougkas May 16, 2026
b58fee1
Require paths for file tool aliases
akougkas May 16, 2026
1df0313
Cover ls path normalization
akougkas May 16, 2026
c65ef60
Simplify Clio harness self-awareness
akougkas May 17, 2026
1f5c081
Require allowedTools and refactor dispatch
akougkas May 17, 2026
74e97cc
Centralize local model runtime capabilities
akougkas May 17, 2026
9d400a7
removed planning files
akougkas May 17, 2026
151e393
Fix Harmony constrained JSON handling
akougkas May 17, 2026
9762105
Fix advise worker dispatch receipts
akougkas May 17, 2026
1fd4e16
Polish TUI runtime status surfaces
akougkas May 17, 2026
1c83b15
Fix Codex file tool schemas
akougkas May 17, 2026
e2931de
Make dispatch a fleet-agent primitive
akougkas May 17, 2026
21c97d3
Refresh audit-clean transitive locks
akougkas May 17, 2026
51140c7
Harden frontend validation and TUI cancel flow
akougkas May 17, 2026
d885e3e
Refresh public docs for v0.1.9 hardening
akougkas May 17, 2026
b3b1821
Stabilize CI release checks
akougkas May 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

The boundary checker enforces these. Confirm none are violated:

- [ ] **Engine boundary.** Only `src/engine/**` value-imports `@mariozechner/pi-*`.
- [ ] **Engine boundary.** Only `src/engine/**` value-imports `@earendil-works/pi-*`.
- [ ] **Worker isolation.** `src/worker/**` does not import `src/domains/**` except `src/domains/providers`.
- [ ] **Domain independence.** No `src/domains/<x>/**` imports another domain's `extension.ts`. Cross-domain traffic flows through `SafeEventBus`.

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
with:
node-version: 24
cache: npm
- name: Install fd-find
- name: Install fd-find and ripgrep
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends fd-find
sudo apt-get install -y --no-install-recommends fd-find ripgrep
- run: npm ci --prefer-offline --no-audit --no-fund
- run: npm run ci
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ scripts/orch/
NEXT-SESSION.md
CODEX.md
CLAUDE.md
CLIO-dev.md

# Dev-time scratch area: planning files, debugging notes, sprint plans, reports. Never shipped.
docs/.superpowers/
Expand Down
150 changes: 101 additions & 49 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,92 @@
All notable changes to Clio Coder are tracked here. Format loosely follows
Keep a Changelog.

## Unreleased
## 0.1.9 - 2026-05-17

Clio Coder 0.1.9 is a broad hardening release on top of the v0.1.6
non-interactive CLI baseline and the v0.1.7/v0.1.8 safety and approval work.
It makes fleet dispatch a first-class agent primitive, removes the retired
internal dev harness, tightens local OpenAI-compatible model handling,
adds frontend validation without shell access, and hardens the interactive TUI
around active-run follow-ups and cancellation.

### Added

- Added `dispatch` as a first-class tool for bounded fleet-agent handoffs. The
orchestrator prompt now includes the Agent Fleet catalog, unnamed dispatches
default to `implementer`, and duplicate dispatch requests are guarded before
they can loop.
- Added `validate_frontend`, a typed execution tool for frontend artifacts. It
validates `.html`, `.htm`, `.css`, `.js`, `.mjs`, and `.cjs` files under the
workspace root; checks HTML tag structure, local script/style references,
JavaScript syntax, CSS balance, and optional headless browser loading.
- Added a local model runtime-capabilities resolver that classifies real mini
model families, thinking mechanisms, supported levels, effective coercion,
request payload fields, and response parsers from one shared source.
- Added GPT-OSS/Harmony response parsing for raw llama.cpp chat-template frames
and request synthesis for Harmony `reasoning_effort`.
- Added finish-contract evidence for successful typed validation tools,
including `run_tests`, `run_lint`, `run_build`, standard `package_script`
validation scripts, `validate_frontend`, dispatch receipts, and protected
artifact records.
- Added active-run TUI coverage for plain follow-up queuing and `Esc`
cancellation.
- Added tests for local model capability resolution, UI thinking surfaces,
footer/dashboard effective thinking display, Harmony payload construction,
streamed reasoning accounting, constrained Harmony JSON responses, dispatch
tool behavior, frontend validation, finish-contract evidence, and active-run
TUI control.

### Changed

- `/thinking`, `/settings`, the welcome dashboard, footer, hot model switching,
prompt runtime block, and fleet-agent selection now display/use the
effective thinking level after model-specific coercion instead of raw
configured settings.
- Local OpenAI-compatible targets now preserve server-owned sampler defaults;
Clio records and passes only the model-family fields it owns.
- Fleet dispatch now requires explicit allowed tool profiles and carries the
resolved effective thinking state through the internal worker spec.
- Built-in implementer-style agents are prompted to inspect changed frontend
artifacts and run `validate_frontend` before claiming HTML/CSS/JS work is
complete.
- `clio run`, `clio targets`, prompt text, receipts, and README-facing copy now
use fleet/agent terminology. The legacy `workers` settings key remains for
compatibility with existing config files.
- Print mode now preserves the last valid assistant answer when a later
diagnostic assistant message is emitted, instead of replacing the answer with
advisory text.
- Eval harness metrics now count validation evidence only for successful,
non-timed-out verifier commands.
- Public component inventory now includes the frontend validator as a
hot-reloadable enforcing tool implementation.

### Fixed

- Fixed GPT-OSS/Harmony constrained JSON frames such as
`<|channel|>final <|constrain|>json<|message|>{...}` being routed as hidden
thinking or surfaced as parser errors instead of visible assistant text.
- Fixed stale GPT-OSS/Harmony marker leakage from local OpenAI-compatible
streamed output.
- Fixed prior assistant thinking blocks being replayed upstream on later
OpenAI-compatible turns.
- Fixed OpenAI Codex file-tool schema aliases so file/path arguments serialize
through the expected schema shape.
- Fixed active-run TUI behavior where follow-up text and cancellation could
leave the operator without a clear queued-turn or cancelled-run signal.
- Fixed frontend completion claims being able to pass the advisory finish
contract without a meaningful artifact validation path.
- Fixed duplicate local-model capability and thinking coercion paths that could
make UI display, prompt runtime text, and payload construction disagree.

### Removed

- Removed the retired internal dev harness and associated prompt fragments,
tests, and diagnostic scaffolding.
- Removed user-facing `--dev` mode and internal dev prompt surfaces from
the CLI/TUI runtime.
- Removed stale local-model helper paths that duplicated provider capability
resolution.

## 0.1.8 - 2026-05-11

Expand Down Expand Up @@ -376,9 +461,8 @@ receipts, and audit JSONL written by v0.1.3 remain readable.

### Added — middleware

- A pure middleware domain ships with declarative built-in rule
metadata and a deterministic no-op hook runner for future policy
wiring. Eleven hooks (`before_model`, `after_model`, `before_tool`,
- A pure middleware domain ships with a deterministic hook runner for
future policy wiring. Eleven hooks (`before_model`, `after_model`, `before_tool`,
`after_tool`, `before_finish`, `after_finish`, `on_blocked_tool`,
`on_retry`, `on_compaction`, `on_dispatch_start`,
`on_dispatch_end`) and six effect kinds (`inject_reminder`,
Expand Down Expand Up @@ -450,15 +534,8 @@ receipts, and audit JSONL written by v0.1.3 remain readable.
### Added — scientific-validation

- A scientific-validation pack ships as a docs/spec at
`docs/specs/scientific-validation.md` plus three declarative
middleware rules in `src/domains/middleware/rules.ts`:
`science.no-existence-only-validation` reminds agents that file
existence does not validate scientific artifacts;
`science.preserve-checkpoints` marks validated checkpoint and
restart artifacts as protected against destructive cleanup; and
`science.unit-vs-scheduler-validation` distinguishes local unit
validation from scheduler-backed validation (`sbatch`, `srun`,
`qsub`, `flux run`).
`docs/specs/scientific-validation.md` plus the
`scientific-validator` agent recipe.
- The spec covers the YAML validation contract format, supported
artifact families (HDF5, NetCDF, Zarr, FITS, CSV, Parquet, VTK,
ParaView output, Slurm output, MPI rank-sensitive tests, checkpoint
Expand Down Expand Up @@ -559,8 +636,8 @@ receipts, and audit JSONL written by v0.1.3 remain readable.
- Tool registry middleware hooks enforce generic tool-surface
effects: `block_tool` stops an admitted call before execution, and
`annotate_tool_result` appends deterministic middleware
annotations to tool results. Built-in middleware remains no-op
until future policy domains produce effects.
annotations to tool results. The built-in middleware registry is
empty until rules have enforced behavior and tests.
- Tool registry middleware hooks honor `protect_path` effects in
in-memory protected-artifact state, pass validation command
metadata to middleware, and block protected artifact writes or
Expand Down Expand Up @@ -602,7 +679,7 @@ receipts, and audit JSONL written by v0.1.3 remain readable.

### Notes

- Pi SDK pin remains at `0.70.x` (current lock: `0.70.2`). Engine
- Pi SDK pin remained on the previous package line. Engine
boundary, worker isolation, and domain independence invariants
unchanged.
- Default safety mode remains `default`; `advise` and `super` modes
Expand All @@ -626,8 +703,8 @@ Polish release on top of v0.1.2. Four user-visible TUI improvements
(live tool output, bash echo, Ctrl+T thinking, footer git branch),
local-runtime hardening for LM Studio and Ollama, CLIO.md as the
canonical project instruction file, identity alignment with IOWarp's
CLIO ecosystem of agentic science, self-development mode hardening,
two CI substrate fixes, and a clean-clone smoke job to catch
CLIO ecosystem of agentic science, two CI substrate fixes, and a
clean-clone smoke job to catch
dev-env-only test passes before the next tag. No breaking changes.
No settings migration required. Sessions, receipts, and audit JSONL
written by v0.1.2 remain readable.
Expand Down Expand Up @@ -681,20 +758,6 @@ written by v0.1.2 remain readable.
detected local targets, replacing the prior generic openai-compat
path.

### Added — self-development mode

- `clio --dev` requires a project-level `CLIO-dev.md` rule pack to
activate. Resolution checks `<repoRoot>/CLIO-dev.md` first, then
`<clioConfigDir>/CLIO-dev.md` (the XDG fallback respects
`CLIO_HOME` and `CLIO_CONFIG_DIR` for dev sandboxing). Missing
files fail boot with an explanatory stderr message naming the
expected paths.
- On activation against a protected branch (`main`, `master`,
`trunk`, or detached HEAD), `clio --dev` prompts for a slug and
runs `git switch -c selfdev/YYYY-MM-DD-<slug>` before any engine
write. Cancellation or git failure surfaces as exit 1 instead of
silently editing the protected branch.

### Changed — local runtimes

- `lmstudio-native` evicts non-target loaded models before each
Expand Down Expand Up @@ -733,11 +796,9 @@ written by v0.1.2 remain readable.
### Changed — safety rule packs

- `damage-control-rules.yaml` is restructured under schema v2 as a
named `packs[]` list (`base`, `dev`, `super`). Historic kill-
switches stay under `base` (always-on); the dev pack carries every
regex previously inlined in the bash guard. The bash guard reads
the dev pack only when self-dev mode is active, so the base pack
is the sole source of truth in normal operation.
named `packs[]` list. Historic kill-switches stay under `base`
and elevated rules stay under `super`, keeping normal operation on
the base pack alone.

### Changed — CI

Expand All @@ -753,10 +814,6 @@ written by v0.1.2 remain readable.
from PATH instead of hardcoding `fd`. Fixes the autocomplete on CI
and on Debian/Ubuntu users who installed the `fd-find` apt
package.
- `clio --dev` accepts `CLIO_DEV_ALLOW_PROTECTED_BRANCH=1` as a
boot-time opt-out for the protected-branch guard. Mirrors the
existing `CLIO_DEV_ALLOW_ENGINE_WRITES=1` pattern; the per-write
guard remains in force.
- `clio doctor --json` returns `{ok, fix, findings}`; `clio targets
--json` returns `{targets: [...]}`. Both are now stable JSON
envelopes with room for forward-compatible top-level fields.
Expand All @@ -768,7 +825,7 @@ written by v0.1.2 remain readable.

### Notes

- Pi SDK pin remains at `0.70.x` (current lock: `0.70.2`). Engine
- Pi SDK pin remained on the previous package line. Engine
boundary, worker isolation, and domain independence invariants
unchanged.
- Default safety mode remains `default`; `advise` and `super` modes
Expand Down Expand Up @@ -826,8 +883,8 @@ written by v0.1.2 remain readable.
- Slash-command help and autocomplete present only canonical commands:
`/model`, `/quit`, and `/receipts [verify <runId>]` replace duplicate
spellings such as `/models`, `/exit`, and `/receipt verify <runId>`.
- Provider catalog and cloud defaults realign with `pi-ai` 0.70.2; the
`@mariozechner/pi-*` line is pinned to 0.70.x with a current lock at 0.70.2.
- Provider catalog and cloud defaults realign with the then-current `pi-ai`
package line.
- Worker tool-call path validates once and threads telemetry hooks so the
agent loop, dispatch board, and receipts share one source of truth.
- Mode fragments must now enumerate the matrix tool set; a new regression
Expand Down Expand Up @@ -935,9 +992,6 @@ you need a stable target.
- **Dispatch and workers.** `clio run` spawns OS-isolated worker
subprocesses with NDJSON IPC and heartbeats. Named worker profiles
let the interactive session fan out across multiple runtimes.
- **Self-development mode.** Hot-reload and restart-required signals for
developers editing Clio from inside Clio, with shell environment isolation
and tool guards.
- **Receipts and audit.** Every run writes a receipt under
`<dataDir>/receipts/<runId>.json` with token counts and USD cost.
- **Safety model.** Three modes (`default`, `advise`, `super`) gate tool
Expand All @@ -949,8 +1003,6 @@ you need a stable target.
### Known limits

- Windows is best-effort until a later release.
- The self-dev harness is a developer convenience, not a polished public
surface.
- Some runtime slots (remote fan-out, broader MCP) are scaffolded but not
admitted by dispatch yet.

Expand Down
10 changes: 5 additions & 5 deletions CLIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ Clio Coder is IOWarp's orchestrator coding agent. The pi SDK is a vendored engin

## Hard invariants

1. Engine boundary. Only `src/engine/**` may value-import `@mariozechner/pi-*`.
1. Engine boundary. Only `src/engine/**` may value-import `@earendil-works/pi-*`.
2. Worker isolation. `src/worker/**` never imports `src/domains/**` except `src/domains/providers`.
3. Domain independence. `src/domains/<x>/**` never imports `src/domains/<y>/extension.ts` for `y != x`.

<!-- clio:fingerprint v1
{
"initAt": "2026-05-04T01:57:19.822Z",
"initAt": "2026-05-17T02:27:46.835Z",
"model": "local-bootstrap",
"gitHead": "57ef01b1a6d8b4bc829154ce19c862d555e92b52",
"treeHash": "29828ed99631e3334bf9f3c4e4947faa294a9ce6e45f5513c758d73b3d9557f2",
"loc": 83717
"gitHead": "c65ef60821cd24eb0c00804e8f933b1b1f8d36f7",
"treeHash": "8526cd22906b29678a31aad2a3fcd445c3d0fa0cb2fccbb61782b732e6d89c75",
"loc": 95310
}
-->
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ npm run hooks:install

The boundary checker enforces these:

- Engine boundary: only `src/engine/**` value-imports pi SDK packages (`@mariozechner/pi-*`, currently pinned to the 0.70.x package line).
- Engine boundary: only `src/engine/**` value-imports pi SDK packages (`@earendil-works/pi-*`, currently pinned to 0.74.0).
- Worker isolation: `src/worker/**` value-imports only the worker-safe
provider runtime rehydration modules under `src/domains/providers/**`;
all other worker domain imports must be type-only.
Expand Down
Loading