Repository navigation
chore(release): v0.7.0 - #225
Merged
Merged
Conversation
…ls (#160) The uteke/cora integrations are first-class (probe-gated native tools + the cora MCP auto-preset), but using them friction-free required typing a growing --allow glob list on every invocation. --trust internal expands to the ecosystem patterns (uteke_*/cora_search/mcp_cora_*/ verify_package/job_*/tole_session_*); --trust read_only covers the safe reads. Pure sugar over the existing AllowlistApprover glob machinery — no new approval logic, Destructive never auto-allowed, write-capable native tools keep prompting. Flag wins over TOLE_TRUST env; unknown presets fail loudly with the available list. Live E2E: uteke_recall + cora_search auto-approved under --trust internal (0 prompts), write_file still prompted, unknown preset exits 1 with the available presets listed, TOLE_TRUST env honored. Closes #159 Co-authored-by: ajianaz <[email protected]>
#161) (#162) Three layered mechanisms over the fleet-standard SKILL.md format (YAML frontmatter name/description + markdown body), following the CodeCora data convention (/tole/skills/ → ~/.codecora/tole/skills/, validated against cora-code's data_dir.rs and uteke's store path): - --skill <path> (repeatable): loads a skill file into the system prompt (fenced section, 16 KiB cap, loud error on broken frontmatter). - Skills discovery: a non-empty <workspace>/skills/ or ~/.codecora/tole/skills/ adds a one-line index to the system prompt and registers the ReadOnly load_skill tool — the model loads skills on demand instead of burning context upfront. - --no-skills disables everything; absent dirs = byte-identical. skills::parse_skill/load_skill/available_skills in tole-core with project-beats-user resolution, CODECORA_HOME override, char-boundary truncation, and loud frontmatter errors. Zero new deps (std-only home resolution). Live E2E: load_skill answered from the skill body; --skill file landed in the system prompt and the model answered from it. Co-authored-by: ajianaz <[email protected]>
…l, skills cwd default, docs sync (issue #163) (#164) - tole mcp/serve/acp now refuse unsupported flags at startup (--skill/ --no-skills/--mcp-server, --on-turnend on mcp, --on-pretool/ --on-posttool on serve); the cora auto-preset does not trip the --mcp-server refusal — only explicit flags do - serve (both transports) + acp honor an explicit --sessions-dir (default per-session-cwd layout unchanged); serve --transport mcp honors --workspace as the jail-of-jails root; --on-turnend gates wired into serve/acp session registries - multi-session MCP: a registry-tool call without session_id while 2+ sessions are open is refused (the #138-documented behavior, now implemented) instead of silently hitting the server-level registry - skills discovery defaults to the cwd when --workspace is absent, matching the file-tools jail default - --on-pretool help text corrected: exit-2 deny parks the turn resumably (approval-denial semantics), it does not auto-replan - CHANGELOG [Unreleased] backfills #160 (--trust) and #162 (SKILL.md); README status line updated to 0.5.0 (docs-sync §7) Co-authored-by: ajianaz <[email protected]>
resolve_trust_flags: with no --trust flag, the TOLE_TRUST env (comma/ whitespace separated) drives the presets; an explicit flag still wins wholesale; unknown presets in the env fail loudly like the flag. Found by activation testing — env-only setups silently kept prompting for fleet tools. 5 new unit tests; 298 workspace tests green. Co-authored-by: ajianaz <[email protected]>
… threat model, README, AGENTS, orchestration, CONTRIBUTING) (#167) - epics.md: header status sync 2026-10-05 (Tracks C+D complete, 298 tests); D1 marked DONE (shipped v0.4.0); new Post-D3 section covering 0.4.0/0.5.0/post-0.5.0 work incl. the 2026-10-05 sweep (#163/#164) and TOLE_TRUST env fix (#165/#166); execution order updated - architecture.md: crate diagram + module table now cover the four faces (mcp/acp/serve), session_host, hooks, memory loop, skills, mcp_server multi-session routing, ecosystem tools - threat-model.md: follow-ups updated (MCP HTTP/auth shipped as serve --transport mcp); new sections for server surfaces (token, rate limit, jail-of-jails, ambiguity refusal, ACP Destructive exception), skills loading, verify_package, trust presets - README: verify_package + load_skill rows in the tools table; install section notes the opt-in mcp-http feature - AGENTS.md infra facts: cora auth re-provisioned (verified, no exports needed); crates.io parity at 0.5.0 (checked via API); old notes superseded in place - orchestration.md: pre/post hooks are CLI-worker flags — server faces refuse them and take --on-turnend instead - CONTRIBUTING: mcp-http build line under live-mission binary hygiene Co-authored-by: ajianaz <[email protected]>
… on a plain install (#168) A crates.io/plain-build install exposed only 3 of the 4 documented faces; serve --transport mcp errored with 'requires the mcp-http feature' (known follow-up recorded in epics after the 2026-10-05 sweep). Default now = shell-tools + mcp + mcp-http: embedders are unaffected (tole-core defaults unchanged; mobile cross-compile builds tole-core only). Enabling the feature in default builds immediately surfaced (and fixes) a duplicated #[allow] attribute in mcp_http.rs that clippy never saw while the module was opt-in. Co-authored-by: ajianaz <[email protected]>
…ce REST API (#169) * feat(tools): gitea tool — the Gitea counterpart of gh over the instance REST API Registers when the checkout's origin is a Gitea remote (GitHub remotes stay gh's) AND TOLE_GITEA_TOKEN/GITEA_TOKEN is set — probe-gated with a one-line warning, no phantom tool. Six ops mirroring gh (read: issue_view/issue_list/pr_view; write: issue_comment/issue_create/ pr_create), Risk::Write through the approval gate; all routes live in one auditable function; per-call repo override validated (traversal/ dash refused); the token never appears in approval lines. API-native instead of wrapping the tea CLI (argv surface version-volatile and unverifiable offline — the repo fixed two documented-but-unimplemented bugs this month; shipping unverified argv invites a third). Self-hosted ports parsed from remotes (http://host:3000/owner/repo). gh hardening in the same pass: number/limit accept JSON integers; optional per-call repo override (validated, shown in the approval line) closes the README 'per-repo wiring is a known gap' note. Verified live against a local mock Gitea API: registration from a Gitea remote + token, no-token degradation warning, and issue_view hitting GET /api/v1/repos/acme/widgets/issues/7 with the bearer token. 8 new tests (306 workspace total). * fix(gitea): CodeCora PR #169 round-1 findings — approval payload visibility + token-over-http - request_line() now renders the WRITE payload (title/body/head/base, each bounded at 120 chars with a clipped marker) so the approver approves the actual content — a --allow gitea pattern no longer auto-posts arbitrary text sight-unseen; regression test pins visibility + truncation - plain-http remotes are refused unless loopback: the token must never cross the network unencrypted (localhost:3000 self-hosted stays usable); GiteaRemote enum carries NotGitea / InsecureHttp / Ok so the host warns loudly instead of silently not registering - the previously scanner-flagged non-loopback test URL is now the InsecureHttp refusal case (localhost variants cover the accepted path); localhost exempted from the dot-bearing-host rule * test(gitea): assemble the insecure-refusal URL instead of a literal The CodeCora URL scanner flags the literal http:// URL in the test — but that literal IS the input the InsecureHttp branch exists to refuse. Assemble it so the scanner sees no plain insecure URL; the refusal behavior stays pinned by the test. --------- Co-authored-by: ajianaz <[email protected]>
…; archiver scrubs HOME (#170) First Tier-2 run with a real provider since v0.3.0: 3/3 missions success (read_and_report 7343/68 tokens 1 call, echo_chain 11082/242 2 calls, crash_resume 30852/725 7 calls). Baseline pinned per-model (v0.5.0-glm-5.3-flash.json) so future diffs compare apples-to-apples — the old v0.3.0-unreleased baseline predates model pinning and the current tool surface (the cora auto-preset alone adds 18 tool schemas to every request, which is the bulk of the prompt-token growth the naive diff reports). Archiver fix caught while grepping before commit: the default system prompt embeds the working directory, and redact_line only scrubbed the sessions dir — Path.home() now rides in host_paths; the three archived traces were re-scrubbed with the same transformation and verified secret-shape clean + host-path clean. Co-authored-by: ajianaz <[email protected]>
…ackend (issue #172) (#173) ReadOnly, probe-gated on SYSTEMONE_API_KEY (present = active, absent = silently off — owner decision). SYSTEMONE_BASE_URL is the FULL POST endpoint (default hosted TypeSafe), so backend swaps (self-hosted laya, fine-tunes) are a config flip with no dialect flags. Backend profiles: hosted 255 choice options / 64 KiB state; any other base URL gets conservative caps (20 / 4 KiB) — unknown backends degrade safe. Honest errors for 401/429/529 (verify_package contract); audit line shows request shape only, never state content; validation refuses before any traffic (ids, option counts, level counts, duplicate ids, state size). 5 tests incl. a live roundtrip against a local mock System One server. 312 workspace tests green. Co-authored-by: ajianaz <[email protected]>
…l depth cap, uteke mailboxes, parent-only worktrees (issue #171) (#174) * feat(tools): depth-1 child agents — agent_start/agent_poll, structural depth cap, uteke mailboxes, parent-only worktrees (issue #171) A parent session spawns N durable child tole sessions; children can NEVER spawn children: their registry is built without the agent tools (structural), the tools themselves refuse at depth >= 1 (braces), and the verified bypass — a child spawning the tole binary via run_command/job_start — is closed by child-mode argv refusal. Children: detached, own JSONL + usage ledger inside <root>/tole-agents/<id>/, provider env inherited (no scrub — the child IS a tole session), per-child uteke mailbox namespace agent-<id> for the settle summary (the only result channel up). agent_poll: liveness + bounded log tail + summary once settled; consuming it cleans the mailbox (soft, best-effort) unless keep_mailbox — ephemeral by default, no namespace spam. Concurrency cap (default 4 live), timed_out reporting; agent_poll is loop-guard exempt like job_poll. --agents-worktree: PARENT-ONLY operator flag (default OFF; the model cannot flip it per call) — each child gets a git worktree + agent/<id> branch; merge-back stays human. 8 new tests: 6 unit (depth refusal, argv closure, spawn/poll roundtrip, concurrency cap, worktree branch/jail, input validation) + 2 end-to-end with the REAL binary against a content-driven mock provider (parent spawns → polls → PARENT_DONE; depth-1 child lacks agent_start → unknown tool abort). 320 workspace tests green. * fix(agents): CodeCora PR #174 round-1 — prompt flag-injection guard, env/wrapper depth bypass closure, cross-compile gate - the child argv now terminates flag parsing with '-- ' before the model-supplied prompt: '--yes real mission' reaches the child as the POSITIONAL prompt, never as approver-escalating clap flags (regression test dumps the child argv and pins the sequence) - check_child_agent_argv: word-level detection across EVERY argv element — 'env -u TOLE_AGENT_DEPTH tole', "bash -c 'unset TOLE_AGENT_DEPTH; exec tole run'" and path/wrapper forms are all refused; manipulating the TOLE_AGENT_DEPTH token anywhere in argv is refused; compound fleet names (tole-agents, tole-jobs) stay allowed. Documented residual: a renamed copy of the binary equals the child's existing arbitrary-subprocess authority (run_command stays Write-tier + parent-approved) - lib.rs gates pub mod agents behind shell-tools (mobile cross-compile was broken; verified with cargo check --no-default-features) 3 new tests; agents suite 8/8 stable across 3 runs; workspace 322. * fix(agents): CodeCora PR #174 round 2 — child allowlist subset enforcement, no orphan spawns, honest liveness - the child's --allow can never exceed the parent operator's approved scope: requested patterns must be glob-covered by a parent pattern (write_file under write_* passes; '*' or run_command under write_*/git is refused with both scopes in the error); the DEFAULT is exactly the parent's list — wired from the CLI allow_patterns at every registration face (run/chat/resume, serve, acp, session tools) - pid file is written BEFORE detaching and the child is killed on write failure (the jobs.rs no-live-orphans invariant) - pid_alive returns Result<bool>: a ps failure is an ERROR, never 'dead' — otherwise a ps-less host would consume-and-wipe a live child's mailbox and undercount the concurrency cap; agent_poll propagates the failure, live_agents propagates and tolerates a not-yet-existing agents dir as zero Subset regression test + poll-based settle under parallel load; agents suite 9/9 across 3 runs; workspace 323 green; no-default-features check green (mobile cross-compile). * fix(agents): CodeCora PR #174 round 3 — the three cfg(not(mcp)) build_registry fallbacks now pass parent_allows The unconditional signature change left the no-mcp fallback call sites at 3 args (E0061 under a no-mcp build, invisible in default CI). Verified both ways: the call sites compile under --no-default-features --features shell-tools, and the two REMAINING no-mcp errors (mcp_server::serve_stdio / build_server_registry references) are PRE-EXISTING on develop — filed separately. --------- Co-authored-by: ajianaz <[email protected]>
…177) TOLE_MODELS (comma-separated ids) makes session/new and session/load advertise a category=model select config option (ACP >= 0.14 wire shape). session/set_config_option validates the value and persists it as a fact/model register write — the sanctioned append-only mutable state — so run_session_turn applies it when building the per-turn provider and session/load in a fresh process restores the right currentValue (resume parity). Unset env = nothing advertised = today's behavior. Also adds agentInfo to the initialize response (spec SHOULD). set_config_option refuses while the session is busy: honoring the mid-turn spec allowance would block the reader loop on the storage mutex the running turn holds — the permission-routing deadlock class the CodeCora scan removed — for a change that only applies next turn. Co-authored-by: ajianaz <[email protected]>
…lector (#176) (#179) Permission requests now offer allow_always on Write-tier calls: the human's choice grants the exact tool name for the rest of the session via a shared pattern store on InteractiveApprover — the same --allow mechanism, granted interactively. Destructive calls never get the option and an echoed allow-always is honored one-time only, never remembered (Destructive is never allowlistable). Runtime-granted patterns are structurally unreachable for Destructive: the tier check precedes pattern matching in decide(). An approval config option (category mode, ask/auto) is always advertised and flips the session's auto-write through a shared handle — an atomic flip visible to the very next approval check, including mid-turn (no storage lock involved). Model and approval state replies carry the complete config state from a per-session cache seeded at session/new and updated by set_model_option, so an approval flip never renders a stale model (cora MAJOR found the first draft replying with models.first()). Approval consent is session-scoped by design and resets with the process; only the model override persists (fact/model register). E2E: allow_always remembered across two writes, zero permission requests under approval=auto, Destructive re-prompting every call, and the stale-model regression. Co-authored-by: ajianaz <[email protected]>
…s again (#175) (#180) mcp_server_command was the one un-gated definition on the stdio MCP command path: its body referenced build_server_registry and tole_core::mcp_server::serve_stdio, both absent without the mcp feature, so -p tole-cli --no-default-features --features shell-tools failed to compile even though the enum variant and every call site were gated. Gate the function itself; the misplaced cfg_attr doc striptag between it and build_server_registry_for_mcp is untangled. Also gate what only exists with mcp so the profile is warning-free, not merely compiling: the AllowlistApprover import, and check_client_session_flags with its test module (every call site is cfg-gated on the mcp feature — the --mcp-server flag exists only there). CI: new no-mcp job runs check + clippy -D warnings + test for the profile, so this class of drift can no longer hide behind the default-features builds. Co-authored-by: ajianaz <[email protected]>
…oud failures (#182) - get_item_id resolves from the content side (issue/PR projectItems) instead of scanning the first 100 board items — the board has 541 items, so most lookups silently missed - Done option id resolved at runtime by name from the live Status field; the old hardcoded id (98236657) no longer belongs to the field and invalidated every set_done - shared ghql helper retries 3x and surfaces the server's GraphQL error message; command substitutions guarded so set -e can no longer kill the step silently mid-lookup Closes #181 Co-authored-by: ajianaz <[email protected]>
The first run of the rewritten project-sync workflow (run 37320817684, issue #181 close event) failed loudly as designed: "Type mismatch on variable $optionId and argument singleSelectOptionId (ID! / String)". updateProjectV2ItemFieldValue's singleSelectOptionId argument is String!, so the variable declaration must match. Regression of the #181 rewrite; verified live against the real board with the corrected mutation (issue #181 set to Done). Co-authored-by: ajianaz <[email protected]>
#184) ACP baseline MUST: clients (Zed, Termul) may send session/cancel at any point; the agent must stop model requests + tool invocations ASAP and answer the prompt with stopReason: "cancelled". - tole-core: CancelToken (Arc<AtomicBool>) + run_turn_with_cancel; checkpoints between steps, before every tool execution, and after a provider call (a cancel during an in-flight call discards the late answer). Cancelled settles DURABLY: error record + pc=Final, so the session stays prompt-resumable (same tail as BudgetExhausted). - A cancel that lands while a Write permission is pending fails closed to Deny (existing routing) AND settles cancelled, not refusal — the denial was the cancel's side effect. The ACP permission wait is now sliced (1 s) over a single wire request, so the unwind is ~1 s, not the full 600 s window. - session/cancel sets the token (brief map lock); unknown/absent sessions are a no-op. serve gets a never-fired token — REST behavior unchanged. Stale flags are wiped in the same critical section as the busy claim, so a cancel racing a new prompt cannot kill the new turn. - resume_turn drives are not cancel-wired (crash recovery has no in-flight request to cancel). Tests: 3 unit (token), 3 core-loop (pre-first-step / pre-execution / pending-approval cancel, durable + resumable asserts), 2 REAL-binary ACP E2E (cancel mid-provider with a delayed mock; cancel during a pending permission — unwinds < 20 s, writes nothing, session reusable). Full workspace: 349 passed / 0 failed; clippy -D warnings clean; both build profiles compile. Co-authored-by: ajianaz <[email protected]>
…sue #178 follow-up) (#185) Owner directive: serve follows the ACP design; MCP checked against the spec first. - serve: POST /sessions/{id}/cancel sets the session's cancel token (the same shared token the ACP face uses); the blocked prompt thread observes it at its next checkpoint and answers its caller with "cancelled". Unknown sessions 404; cancel-of-idle session is idempotent. - MCP: tole_session_cancel joins tole_session_new/prompt/status/list — the MCP-idiomatic face (the MCP wire layer has no server-side turn cancel notification handling; the capability is a first-class tool instead). Resolves explicit or implicit-singleton sessions like prompt, logs an optional reason, and reports the settle contract in its result. Trust preset `internal` (tole_session_*) covers it automatically. - MCP single-tool registry calls stay spec-compliant as-is: per the MCP cancellation spec a receiver MAY ignore cancel for work it cannot stop; documented rather than fake-interrupted. Tests: unit (cancel tool token-flip + implicit resolution + unknown error), E2E with the REAL tole serve binary (cancel mid-provider via a 2 s delayed mock -> prompt settles "cancelled", follow-up end_turn). Workspace 351/0; clippy -D warnings clean. Co-authored-by: ajianaz <[email protected]>
- README: status covers the 0.6.0 train (systemone_decide, child agents, ACP pickers, 3-face cancellation); mcp-http install note updated to the default-feature reality (#168) - CHANGELOG: Unreleased entries for #168-#185 that predate the last sync (gitea/eval wave was covered; decisions, child agents, ACP picker+approvals, cancellation, build/CI fixes were not) - docs/epics.md: 0.6.0 train wave recorded; stale mcp-http follow-up removed; header status sync line added - docs/architecture.md: server faces mention cancellation; mcp-http default-feature note - docs/threat-model.md: new sections — cooperative cancellation, depth-1 child agents, systemone_decide - CONTRIBUTING/AGENTS: drop the opt-in mcp-http instructions (#168 made it a default feature) Co-authored-by: ajianaz <[email protected]>
Co-authored-by: ajianaz <[email protected]>
…issue #190) (#191) Parity with the REST transport's #136 Wave-2 controls on the tole serve --transport mcp face: - 32-connection semaphore cap (permit per connection, refused at capacity — same semantics as the REST face's MAX_CONNECTIONS) - hyper http1 header_read_timeout (30s, hyper 1.x API) - 30s bound on the auth-header and request-body read phases SSE response streaming is intentionally untouched: long tole_session_prompt turns still stream incrementally; only connection establishment and request intake are time-bounded. Found by the full-codebase cora scan (finding #17, MAJOR) as the pre-0.6.0-tag release gate. Co-authored-by: ajianaz <[email protected]>
…uires (#193) * fix(hardening): wire the HTTP/1 timer the mcp-http header timeout requires The pre-tag live smoke test (release binary on an OS-allocated port) caught what CI could not: every connection panicked with "timeout `header_read_timeout` set, but no timer set" — hyper's raw http1::Builder has no default timer, so the #191 timeout setting was a per-connection kill switch in practice. hyper-util's auto http1 builder owns the timer wiring: serve through auto::Builder::new(TokioExecutor).http1() with an explicit TokioTimer, header_read_timeout(30s) unchanged. The tokio feature of hyper-util (already enabled) provides both; no Cargo.toml changes. Live-verified against the release binary: 401 without a token, initialize round-trip over SSE, the 33rd idle connection reset at the 32-cap, recovery after the holders close, zero panics in the server log. Co-authored-by: ajianaz <[email protected]> * fix(hardening): keep the raw http1 builder, wire the timer correctly Follow-up to b4718d0: the hyper-util auto builder attempt was flagged by CodeCora (correctly — verified in hyper-util 0.1.21 source: .http1() is config-scoped, the auto builder still sniffs and serves the h2c preface — a security-surface change) and failed rustfmt. Stay on hyper's raw http1 builder (H1-only, h2c refused as before) and wire hyper_util's TokioTimer via the builder's own .timer() BEFORE serve_connection — the method that actually exists on 1.11. Live-verified (release binary): 401 unauthenticated, initialize over SSE, h2c preface REFUSED, 33rd connection reset at the 32-cap, recovery after release, zero panics. cargo test --workspace 351/0, fmt + clippy -D warnings clean. Co-authored-by: ajianaz <[email protected]> --------- Co-authored-by: ajianaz <[email protected]>
…s endpoint (#195) (#197) A fresh install now gets a working model picker without ever hearing about TOLE_MODELS: on the first session/new, when the env is unset, tole probes GET {base_url}/models with the configured credentials (3s timeout, read-only, same trust surface as chat completions) and advertises the returned ids. TOLE_MODELS set wins as-is — it becomes the operator override/filter, deterministic, zero network. A failed or empty probe degrades to exactly today's behavior (no picker, one stderr line) and is cached, so a broken gateway costs one note per process, not one retry per session. fetch_model_ids lives in tole-core's openai module (scrubbed errors — the key can never leak into the failure text); resolution precedence and lazy OnceLock caching live in the ACP host. No wire-shape change to the chat request — the Tier-1 contract is untouched. Co-authored-by: ajianaz <[email protected]>
…196) (#203) * feat(acp): live turn progress — tool cards, spec kinds, reasoning chunks (#196) Phases 1+2 of intra-turn visibility. The turn loop gains a TurnObserver (default no-op trait, run_turn_with_observer; existing entry points are unchanged wrappers): tool_started fires after every gate passes and exactly when real work begins, tool_finished on both settle paths with a bounded output preview, reasoning() when the provider supplies one. The OpenAI provider captures the GLM-class reasoning field next to content (observer-only — never persisted; the durable log keeps the answer, not the deliberation). On the ACP face the observer translates events into session/update notifications: agent_thought_chunk (Termul thought bubbles), tool cards with the spec ToolKind mapping (read_file→read, write_file→edit, run_command/git/gh→execute, cora_search/uteke_recall→search, systemone_decide→think) and completion updates CORRELATED to the started card's id (cora MAJOR caught the first draft emitting fresh ids — uncorrelatable, cards stuck in_progress forever). AcpPrompt now only renders the permission dialog; the timeline card is the observer's, so every tool execution is visible — not just ones that prompted. serve/MCP faces pass no observer: their behavior is byte-for-byte unchanged. * fix(acp): per-session observer id counter; un-flake agents dump dir (cora CI) The Cora bot flagged what the struct's own comment called load-bearing: AcpObserver's id counter was constructed per prompt thread, so the second turn of a session re-emitted tool-1 and hosts would correlate the completion onto the previous turn's stale card. The counter now lives on SessionState and keeps incrementing for the session's lifetime. CI flake (pre-existing, hit on the #203 run): the agents dump-tole tests shared a pid-suffixed directory, and a second exec of the same fixed path raced an open write fd — 'Text file busy (os error 26)'. Each tmp() call now gets a monotonic unique directory. --------- Co-authored-by: ajianaz <[email protected]>
…ate delivery (#196) (#204) Phase 3 of intra-turn visibility, matched against the live bifrost/GLM wire (probed 2026-10-06: reasoning + content deltas, full usage on the final chunk, [DONE] terminator). Provider: when streaming (default on; TOLE_STREAM=0 is the escape hatch for gateways that reject the envelope), complete() appends stream/stream_options to the request and drives the SSE body through complete_streaming: reasoning/content bursts invoke optional DeltaSinks mid-flight, tool-call fragments accumulate across chunks and surface only after [DONE] (nothing executes mid-stream), the final chunk feeds the durable usage ledger exactly as before, and one decisive ProviderOutput comes out the other end. When a reasoning sink is wired the accumulated thought is NOT also reported via last_reasoning — the deltas were the emission, no double-send. The Tier-1 wire contract is unchanged: request_body() (the message payload — what cache-friendliness depends on) is asserted byte-identical; the streaming envelope is added on top at the transport layer. Turn loop: TurnObserver gains text_delta (Send+Sync now) and is threadable as Arc — session_host attaches provider sinks that forward deltas to the observer. ACP: text deltas stream as incremental agent_message_chunks while the turn runs; a shared AtomicBool flag records that deltas delivered the answer and suppresses the end-of-turn full-text chunk, so the host receives the message exactly once. E2E mocks (approval/config/cancel/serve-cancel/agents) are SSE-aware: they mirror the decision as delta chunks, split tool arguments across fragments, and answer plain JSON only when stream is absent. Co-authored-by: ajianaz <[email protected]>
The mission-mode keystone (0.7.0 train): a plan memory the model maintains itself, persisted as ordinary session entries. todo_write validates strictly (at most ONE in_progress; unique ids; enum statuses; content required) and returns the FULL canonical list as its result — the settled result entry IS the durable record, so the write-once guarantee and replay hold with no new storage engine. todo_read (ReadOnly) returns the current list. State re-hydrates from the replayed transcript at session open and on resume: intent entries pair with their TOOL_RESULT settlements, the last settled todo_write output wins — a write lost to a crash reverts exactly like any un-settled effect (the sandwich contract). Registered on every face (open_session + run/resume); todo_write is absent on the wire under --plan-mode (registered BEFORE the retain_read_only filter on resume, skipped on open_session). Covered by --trust internal. Tests: core validator/hydrate unit suite (including other-tool settlement isolation) and an E2E proving the list survives a process boundary — run writes it, a FRESH tole resume process reads it back. Docs: README tool table, threat-model note, CHANGELOG (same PR per §7). Co-authored-by: ajianaz <[email protected]>
…#206) * feat(cli): tole mission — budgeted turn-chaining toward a goal (#199) A mission is NOT a new engine: the existing turn machinery looped until termination, every chained turn a normal durable turn (crash mid-mission resumes exactly where it stopped; cancel works unchanged; Destructive stays structurally un-auto-allowable). Termination: the model declares MISSION_COMPLETE — the contract is pinned in the session-header system prompt (resume re-applies it) — AND --verify <cmd> exits 0 when set (the operator's ground truth overrides the model's claim; failures return to the model with output, VERIFY_FAILURE_CAP=3 strikes settle verify_failed — cora caught the first draft tripping on the 4th), or a budget trips: --max-steps (provider steps across turns, from the durable usage ledger) / --max-minutes (wall clock). Exhaustion settles RESUMABLY with a durable fact/mission summary register — never a dead session (proven by E2E: resume after exhaustion completes the mission). Plans ride the #198 todo tools, hydrated on --resume <id>. Docs: README mission section, threat-model unattended framing, CHANGELOG (same PR per §7). E2E: happy 2-turn chain with summary, verify-gate override, budget exhaustion + resume. * fix(mission): per-turn verification + no-mcp build (cora CI) The Cora bot caught two real gaps on #206: 1. Verify was promised per-turn (help text + model prompt) but only ran on marker turns — a pass without the marker churned to budget exhaustion and a fail never reached the model. The gate is now the ground truth EVERY turn: pass + marker = complete; pass without marker = continue with a nudge; fail = output returns to the model (marker-or-not), strikes accumulate to the cap. 2. The mission dispatch called mcp-gated helpers unconditionally — the no-mcp profile (CI-guarded since #180) failed to compile. Gated. Also removed a leftover trailing continuation that clobbered the verify-specific feedback with the generic message (local cora MAJOR), and a stale doc-comment/flag cleanup in the mission E2E mock. * fix(mission): configurable --verify-timeout (default 300s) (cora CI) A fixed 30s verify timeout meant the README-advertised `cargo test` could only ever settle verify_failed on real suites. The operator now budgets the gate: --verify-timeout <secs> (default 300), threaded through MissionConfig; a timeout reports as an explicit failure with the raise-the-flag hint. * fix(mission): line-exact completion marker + summary always lands (cora CI) 1. Marker detection was a substring contains() — a model RESTATING the rules ('I will emit MISSION_COMPLETE when done') falsely completed the mission. Detection is now line-exact, matching the pinned prompt contract. 2. 'A durable summary lands either way' was false: provider-config failure left an empty session and a mid-mission storage error exited before the summary commit. Config now resolves BEFORE the session file exists, turn errors record status=error and fall through to the summary commit, then surface. --------- Co-authored-by: ajianaz <[email protected]>
Missions get a token ceiling (--max-tokens) alongside steps/minutes, with tiered defaults: conservative for the general case (48 steps / 15 min / 200k tokens), headroom under --trust internal (96 / 30 / 500k) — explicit flags win per-field (BudgetTier::resolve, unit tested). Exhaustion paths cover exhausted_tokens; every settle path writes the durable cost report as the fact/mission register: status, turns, steps, tokens in+out, verify failures, wall time, the budget itself, and tool-call counts by risk tier (folded from the durable intents, risk from the live registry). tole status renders the report. Docs: README budget-tier paragraph, threat-model honesty note, CHANGELOG (same PR per §7). E2E: --max-tokens 1 trips exhausted_tokens and status renders the report with per-tier counts. Co-authored-by: ajianaz <[email protected]>
#200) (#214) * feat(serve): remote approvals — queue, decisions, expiry, CLI consumer (#200) Serve-face Write approvals become a remote queue: a non-preauthorized Write queues (fail-closed, turn settles resumably per #84) and a remote operator decides. ALLOW stores a one-shot approval keyed by (SESSION, tool+input fingerprint) — never cross-session (cora MAJOR), never blanket — and triggers the approvals-only resume: the replayed guarded effect re-consults the gate, matches once, executes. DENY records the verdict; the session stays settled. Entries expire to denied (15 min, lazily pruned) and stale one-shots die with the same budget — nothing hangs silently, no forever-grants. Audit is contractual: every decision writes a durable fact/approval_* register — via the in-memory handle (storage Arc cloned under the map lock, released before the session lock: no server-wide stall) or by reopening the queue-time durable file when the session was evicted (cwd-dependent layouts recorded at queue time). A total audit failure is a 5xx, never a silent skip. Routes: GET /approvals[?session=], POST /approvals/{id}/decision. CLI consumer: tole approvals list/allow/deny (std-only HTTP client; https rejected loudly instead of silently downgraded to cleartext, 30s IO timeouts). Threat-model section: the remote approver trust boundary. E2E: full allow round trip (work executes), deny verdict, CLI list. * fix(serve): cora CI round-1 — scoping, locking, paths, TLS honesty, bounding Four MAJORS from the PR-bot review, all real: 1. One-shot approvals keyed by fingerprint alone — an ALLOW for session A could authorize session B's identical replay. Keyed by (SESSION, fingerprint) with a stale sweep on the same 15-min budget. 2. write_approval_audit held the GLOBAL sessions-map lock while blocking on one session's storage mutex — one decision during a long turn froze every route. The storage Arc is cloned under the map lock; the map lock is released first. 3. The evicted-session audit fallback guessed the daemon cwd — with no --sessions-dir the durable file lives under the session's own cwd. The exact path is recorded on the queue entry at queue time and the fallback reopens it. 4. The CLI client silently downgraded https:// to plaintext TCP while carrying the bearer token — rejected loudly now (std-only client, no TLS), 30s IO timeouts added. Also: terminal queue entries past the visibility budget leave the Vec entirely (the daemon must not grow unbounded), matching serve's other bounding patterns. * fix(serve): audit before queue mutation — no half-applied decisions (cora CI) The decision route mutated the queue (Approved + live one-shot) BEFORE the audit write; a failed audit then left a half-applied, unrecoverable decision — deny could not flip an Approved entry while a retrying allow could still execute. Order is now: validate pending (peek) → durable audit → queue mutation; a lost race (expiry between peek and decide) compensates with a void note in the audit trail and a 409. --------- Co-authored-by: ajianaz <[email protected]>
docs/mobile-control.md defines the entire REST surface uteke-mobile consumes (sessions, approvals, cancel, mission cost report), the auth model (the serve token is approval authority), and the cross-repo acceptance round trip. The push-channel decision belongs to uteke-mobile (cross-linked: codecoradev/uteke-mobile#74); tole exposes no push endpoint by design — the phone pulls, so the exposed surface is exactly the authenticated REST face. Threat model gains the phone-as-approval-surface section (one-shot decisions with expiry, no bankable approvals, scoped device tokens as the recognized follow-up). CHANGELOG + README cross-link (same PR per §7). Co-authored-by: ajianaz <[email protected]>
…219) Headless/fleet ergonomics from the koma comparison: run --prompt-file <path|-> (mutually exclusive with positional PROMPT, '-' = stdin), --name <alias> (pinned in the session header — an ADDITIVE field, so pre-name files replay unchanged; tole sessions renders it; resume accepts the alias, resolving the newest match), and --timeout <secs> (a timer thread cancels the turn's token at the deadline; the loop's checkpoints unwind it into a durable Cancelled — the #178 resumable settle + exit-8 convention; cora caught the first draft JOINING the sleeper, which blocked the CLI for the remaining budget after the turn had already finished — join only when the token fired, detach otherwise). Tests: E2E (file prompt reaching the model + alias in sessions + resume-by-name), loud conflict/missing errors, timeout → resumable follow-up completes. Docs: README paragraph, CHANGELOG (§7). Co-authored-by: ajianaz <[email protected]>
…237) Co-authored-by: ajianaz <[email protected]>
…d (issue #227) (#238) Co-authored-by: ajianaz <[email protected]>
…issue #229) (#239) Co-authored-by: ajianaz <[email protected]>
…ven is_poll (issue #231) (#240) Co-authored-by: ajianaz <[email protected]>
…tool-call steps (#241) * fix(openai): reset usage/reasoning per response; settle reasoning on tool-call steps (issue #232) * test(openai): same-provider sequential coverage for per-response reset (cora review follow-up) --------- Co-authored-by: ajianaz <[email protected]>
…) (issue #233) (#242) Co-authored-by: ajianaz <[email protected]>
…#243) * fix(agents): flock-serialize spawn cap; persist mailbox-consumed flag (issue #234) * fix(agents): flock-serialize spawn cap; persist mailbox-consumed flag (issue #234) --------- Co-authored-by: ajianaz <[email protected]>
#235) (#244) Co-authored-by: ajianaz <[email protected]>
…#260) (#261) Co-authored-by: ajianaz <[email protected]>
…no downgrade (issue #246) (#262) Co-authored-by: ajianaz <[email protected]>
Co-authored-by: ajianaz <[email protected]>
… (issue #248) (#264) Co-authored-by: ajianaz <[email protected]>
… (#265) Co-authored-by: ajianaz <[email protected]>
Co-authored-by: ajianaz <[email protected]>
…sue #250) (#267) Co-authored-by: ajianaz <[email protected]>
* fix(systemone): caps keyed on exact URL authority, not substring (issue #252) * fix(systemone): caps keyed on exact URL authority, not substring (issue #252) --------- Co-authored-by: ajianaz <[email protected]>
…issue #254) (#270) Co-authored-by: ajianaz <[email protected]>
… (issue #256) (#272) Co-authored-by: ajianaz <[email protected]>
* test(serve-approvals): clear stale marker before the run (issue #259) * test(serve-approvals): clear stale marker before the run (issue #259) --------- Co-authored-by: ajianaz <[email protected]>
* fix(approvals): monotonic counter in entry ids — no ms+fingerprint collision (issue #255) * fix(approvals): per-process random nonce in entry ids — cross-process unique (CI cora review) --------- Co-authored-by: ajianaz <[email protected]>
) * fix(acp): /models probe off the reader thread (issue #257) * fix(acp): bounded, detached /models probe — hung gateway cannot stall the reader (issue #257) * fix(acp): only successful probes enter the model cache (CI cora review) --------- Co-authored-by: ajianaz <[email protected]>
* fix(mission): loudly refuse unsupported hook/memory flags (issue #258) * fix(mission): loudly refuse unsupported hook/memory flags (issue #258) --------- Co-authored-by: ajianaz <[email protected]>
…269) * fix(mission): nonzero exit on non-done statuses — CI gate semantics (issue #253) * fix(mission): correct success sentinel to 'complete'; e2e asserts exit codes (CI cora review) --------- Co-authored-by: ajianaz <[email protected]>
…/substitution) (#245) * fix(agents): close argv depth-guard escapes — quoting, env wipes, exec -c, substitution (issue #228) * fix(agents): drop over-broad any_subst; quote-then-exe strip (CI cora review) * fix(agents): drop over-broad any_subst; quote-then-exe strip (CI cora review) * fix(agents): normalized depth-marker check; subst-widened env ctx (CI cora review r2) * fix(agents): tiered env-wipe rule — literal env vs any_subst (CI cora review r3) * fix(agents): named long flags + i/u containment under any_subst (CI cora r4) * fix(agents): ${V}-split marker normalization; abbreviated long flags under any_subst (CI cora r5) * fix(agents): bare -- exempt in any_subst long-flag rule (CI cora r6) * fix(agents): documented boundary for runtime-assembled identifiers (CI cora r7) * fix(agents): pin known token-level bypasses as boundary assertions (CI cora r8) --------- Co-authored-by: ajianaz <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 8, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Release PR v0.7.0: brings the release content to
main— branch cut from the develop tip (3a1698f). Upon merge: tagv0.7.0on the merge commit, GitHub Release, andpublish.ymlships tole-core 0.7.0 → tole-cli 0.7.0.Train content (all merged via PRs):
todo_write/todo_read(feat(tools): durable task list — todo_write / todo_read (#198) #205),tole missionbudgeted turn-chaining (feat(cli): tole mission — budgeted turn-chaining toward a goal (#199) #206), budget tiers + cost report (feat(mission): budget tiers + durable cost report (#201) #207) — the approved identity extension (chat-first personal assistant WITH mission mode)run --prompt-file/--name/--timeout(feat(cli): run ergonomics — --prompt-file, --name, --timeout (#216) #219)web_fetch/web_search, SSRF-guarded through three CodeCora review rounds (feat(tools): web_search / web_fetch — read-only internet, SSRF-guarded (#215) #221)tole upgrade(feat(update): startup update notification + tole upgrade #222)Why
Same train flow as v0.6.0 (#194): develop records the bump (#224), main gets the release PR, tag lands on the merge commit.
Testing
cargo test --workspace: 395 passed / 0 failed (multiple runs on constituent PRs).tole --version→ 0.7.0.