sync/upstream-v0.4.22 #25

Merged
clawdie merged 59 commits from sync/upstream-v0.4.22 into main 2026-10-09 14:32:07 +02:00
Owner
No description provided.
Fix mangled extended color sequences in syntax highlighting
filepath.WalkDir does not descend into symlinked directories, so a
skills directory whose entries link into a shared checkout discovered
nothing at all. Discovery now follows directory links, walks each
resolved directory once so a link cycle terminates, and skips a link
that points at nothing. A skill reached through a link reports the
link path, so the location shown by /skills is the installed one.
The body view passed the skill description, the source line, and every
line of the markdown body through unwrapped. The renderer truncates any
row wider than the terminal so the frame never soft-wraps, so skill
prose lost everything past the right edge, mid-word.

The dialog now folds what it owns: wrapDialogMutedRows wraps the
description and the source line, the body renders through the shared
renderDialogMarkdownRows helper, and the picker's hint lines fold the
same way. The body scroll window counts the folded rows, so the
remaining-lines hint stays accurate.
Follow symlinked directories during skill discovery
Wrap long lines in the /skills body view
Adds the 39 phrases requested in #215.

The five craftsman-style aphorisms go away in the same change. They read
differently from the action phrases around them, and the maintainer
agreed in that thread that removing them beats shipping the wider list
with the two styles mixed. Rephrasing and reintroducing them later is
still open.
fix(provider): support keyless custom OpenAI endpoints
Add more fun spinner messages
Live discovery returns model IDs only. IDs without an exact catalog
entry, such as apac. or us-gov. inference profiles, were merged with
MaxOutput 0, so the Bedrock client fell back to maxTokens 4096 and long
responses stopped with max_tokens.

Discovered profile IDs now inherit limits, reasoning flags, and pricing
from their base model's catalog entry. Claude 4+ models absent from the
catalog get a 64k output / 200k context default (Haiku 4.5's limits,
the smallest among current Claude models). Legacy Claude and other
unknown models keep the existing fallback. Also recognize the jp. geo
prefix, which the catalog already uses.
A same-provider model switch reused the running agent and changed only
its model ID, so MaxTokens kept the previous model's output budget.
Switching from a model with a small or missing limit to a larger one,
e.g. onto Bedrock Claude Opus 5.5, kept truncating responses with
max_tokens.

Adopt the new model's MaxOutput in the interactive model swap, RPC
set_model, SDK Runtime.SetModel, and the bot's runtime reload.
Context-window checks already look up the current model on each use.
cleaner comment
Give discovered Bedrock models real output limits
Update output token limit when switching models
Introduce packages/continuous, a provider-neutral durable runtime on top of
the core agent loop. Every model request and tool call is committed before
and after it runs, so a crash leaves a recoverable run rather than a lost
transcript; interrupted tools are reported to the model, never silently
repeated, unless they declare a replay policy.

Runtime: conversations, queued and steered submissions with request-ID
deduplication, runs with attempt and tool-intent state, recovery policies,
approvals, budgets, usage ledger, tasks with dependencies, timers, retries
and cleanup, documents, forks, resets and handoff, subagents as owned
conversations, memos, prompt records, notification outbox, retention,
historical search with an optional trigram index, background compaction
published at request boundaries, and integrity checking.

Storage: a backend-neutral contract with memory, journal, and SQLite
implementations. The journal uses checksummed frames in rotated segments
with a rebuildable offset index and record-index checkpoints for bounded
recovery and memory, plus backup, restore, verify, format, and migrate
tooling. The SQLite backend is pure Go (github.com/ncruces/go-sqlite3 on the
wazero runtime zot already ships).

Host and clients: a newline-JSON protocol with token roles over Unix
sockets, Windows named pipes, or TCP with TLS; `zot continuous run`,
`serve`, `attach`, store management commands, `zot --continuous` for the
interactive TUI, a remote worker reference implementation, and swarm agents
that run as owned host conversations when attached.

Core and extensions gain tool replay policies, operation keys, unknown
outcomes, and reconciliation. Docs, examples, and tests cover crash matrices
at every commit boundary for both backends.
The display command action appended its note but never called invalidate(), so the text stayed invisible until the next keypress triggered an unrelated repaint. The notify hook and the insert action share the same note-rendering path and both invalidate.

Extract the action switch into applyExtensionCommandResponse so it can be tested without a running extension manager, and add a regression test asserting the display action both appends the note and pokes the render loop.
Model generations, tool calls, compactions, and subagents are durable
tasks driven by one scheduler. The run-driving loop is removed.

- Task-scoped commits: StartEffect records effect intent before the
  effect, fenced on invocation identity and abort state; Next.Commit
  builds the final commit against a fresh snapshot; JoinOnAbort, approval
  waits, linked tasks, and Join for shutdown.
- Built-in zot.generation, zot.tool, and zot.compaction tasks with
  versioned checkpoints. Admission creates the chain and its generation
  task in one commit. Approvals, compaction, handoff, subagents, bounded
  partial output and tool progress, steering, retries, and abort run on
  tasks without holding workers while waiting.
- Lost remote outcomes stay marked and are reconciled with backoff.
- Unfinished runs from earlier builds are converted on open, one
  conversation per commit; unconvertible runs block their conversation
  until aborted. The runtime record format is versioned separately.
- Service.Step and run-shaped responses are projections of chains.
- CLI: migrate-runs replaces the opt-in flags; protocol adds task.view.
- Docs, examples, and tests updated, including crash matrices on journal
  and SQLite, migration, and race fixes.
- Publish engine events only after the commit that records them; a
  crashed or fenced invocation publishes nothing.
- Abort withdraws queued prompts; a failed chain holds its queue until
  the next prompt submission, which places held inputs first. Queued
  inputs are no longer model context before they are placed.
- Persist a provider session identity per conversation; forks and owned
  conversations get their own.
- Add a typed conversation view with operation-level watches and a
  commit-derived agent event stream with bounded lag (watch modes view
  and events, error code event_lag).
- Add a named extension registry (tools, prompt sections, hooks, tool
  wrappers, task kinds) resolved at each use and replaced in place, with
  hooks before request, after response, on yield, before and after tool,
  and after tools.
- Record system prompt and tool changes as positional context entries;
  prompt records derive from them.
- Add parallel tool execution, write submissions, one/all placement
  modes, and tool-requested termination.
- Settle a chain as failed when a generation phase errors.
* fix: wrap long text in extension panels

Extension panels render extension-supplied lines through the shared dialog frame, but extPanelDialog.Render emitted each line whole. The renderer hard-truncates every row to the terminal width (tui.truncateToWidth) and never soft-wraps, so any panel line wider than the terminal was silently cut off.

Wrap panel body lines and the footer with tui.WrapANSILine, already used by the changelog, skills, btw, and swarm dialogs. Selected rows keep their highlight across continuation rows and the selection marker is drawn only on the first row.

* fix: preserve styles and content in wrapped extension panels

---------

Co-authored-by: patriceckhart <mail@patriceckhart.com>
fix: repaint the TUI after an extension display action
Keep following a submission when its watch drops: reopen it after the
last applied revision, or reload from a fresh snapshot when that history
is no longer retained. The prompt is never resubmitted.

Release client registrations of cancelled calls and watches, and send
best-effort watch cancellation without registering a response.

Show why attached work is waiting (queued, awaiting approval, recovery
blocked) in the status bar, render committed tool progress in the running
tool's panel, and note when only the newest page of history is loaded.

Wake the partial flusher only when text arrives and pace commits by
record size, bounding write volume for long streamed answers.
* Add Claude Sonnet 5.5 and Haiku 5.5 to Bedrock catalog

Add in-region and us/eu/au/jp/global inference-profile entries for
Sonnet 5.5 and Haiku 5.5, update Bedrock Opus 5.5 cache pricing, and
treat Bedrock Sonnet/Opus 5.5 IDs as always-on adaptive thinking.

* fix: correct Bedrock Claude 5.5 caching prices and routing

Use the 5-minute cache-write rates matching default Converse checkpoints.
Resolve Haiku 5.5 to AU and JP profiles in their supported source regions.
Remove unsupported Sonnet 5.5 AU and JP catalog entries and require an
explicit profile where regional routing is unavailable. Do not silently
fall back to worldwide routing.

Add regional request regressions and synchronize the README.

---------

Co-authored-by: patriceckhart <mail@patriceckhart.com>
Publish completion results atomically with active invocation removal and
collect pending results before declaring scheduler, host, or step idle.
Reserve result capacity before dispatch to avoid blocking completion under
its mutex. Add deterministic quiescence and capacity regressions.

Serialize attached prompt admission with watch refresh and replay missed
settlement events before reporting completion. Add recovery regressions.

Close journal handles after injected initialization failures and adapt
permission, durability, and writer-lock tests to supported Windows behavior.
Document watch recovery and scheduler completion guarantees.
Pin overlapped operation state and buffers until named-pipe I/O completes.
Read final completion byte counts and join cancelled operations before
releasing handles and events.

Make abort pairing coverage deterministic and validate results by call ID,
including model-facing call order. Add Windows transport regression tests.
Merge upstream v0.4.22 into downstream main
All checks were successful
leak-guard / guard (pull_request) Successful in 2s
e22c66573b
Sync the Clawdie fork with upstream v0.4.22, the release that is 58
commits past the v0.4.0 fork point. Brings in the continuous and
attachments packages, upstream codemode, and upstream docs/examples.

Conflict resolutions:
- .gitignore: keep both downstream and upstream entries
- .github/workflows/ci.yml: keep the downstream Go version pin
- go.mod/go.sum: keep downstream colibri + newer goja, take upstream
  x/sys and sourcemap bumps; regenerate with go mod tidy
- packages/agent/skills: take upstream's symlink-aware discovery,
  which supersedes the duplicated downstream implementation

Codemode (Option A): upstream packages/agent/codemode is the only
implementation. Remove the downstream pure-compute
packages/agent/tools/codemode.go and its tests; codemode remains
opt-in via --codemode, --codemode-only, --tools read,codemode, and
config.json codemode.enabled=true.

Validation: go test ./... pass; go vet ./... clean; packaging suite
93/93; git diff --check clean; check-origin-leak clean.
clawdie deleted branch sync/upstream-v0.4.22 2026-10-09 14:32:07 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawdie/zot!25
No description provided.