Commit graph

7567 commits

Author SHA1 Message Date
David Brailovsky
4a6a58eb59 fix(ai): keep root $defs in Anthropic non-strict tool schemas
The non-strict input_schema kept only type/properties/required, so
property $refs into root $defs or definitions pointed at nothing. Claude
then produced wrong arguments (a JSON string instead of an object), and
some Anthropic-compatible gateways rejected the request.

Root anyOf/oneOf/allOf are still left out: Anthropic rejects them with a
400. That part of #9557 and #9134 stays open.
2026-11-02 13:12:50 +01:00
David Brailovsky
9ee7586a95 fix(ai): send drop_block for OpenCode Zen and Go Claude models
Enable per-message effort for OpenCode Claude models that support it, which
also sends thinking.block_binding drop_block. OpenCode Go rejected replayed
thinking with a 400 after the tool list or system prompt changed.

closes #10954
2026-11-02 12:37:52 +01:00
Mario Zechner
7b991fd96a docs(chord): slice 11 spec, web and TUI on the app kit 2026-11-02 11:15:21 +00:00
Mario Zechner
8d81a0f49d docs(chord): slice 13 spec, the app kit 2026-11-02 11:14:37 +00:00
Mario Zechner
ebce9debd4 docs(chord): fold the plugin model, app kit and slice 11 decisions into the design; slice 12 spec 2026-11-02 11:13:08 +00:00
Mario Zechner
752019da07 docs(chord): slice 11 terminal component scope 2026-11-02 11:03:04 +00:00
Mario Zechner
e8504dfab5 docs(chord): slice 11 terminal client always sandboxed 2026-11-02 11:00:43 +00:00
Mario Zechner
20f600e58d docs(chord): slice 11 React bindings 2026-11-02 10:59:40 +00:00
Mario Zechner
2f153034b4 docs(chord): slice 11 connection loop 2026-11-02 10:58:40 +00:00
Mario Zechner
9942d5bbcf docs(chord): slice 11 pages learn of new scripts through Chord 2026-11-02 10:57:16 +00:00
Mario Zechner
7f7ec86806 docs(chord): slice 11 applies plugin scripts in place 2026-11-02 10:56:16 +00:00
Mario Zechner
cdd50052f6 docs(chord): slice 11 base bundle and plugin scripts 2026-11-02 10:55:18 +00:00
Mario Zechner
3cec8e2b66 docs(chord): app kit plugins, files and export 2026-11-02 10:50:22 +00:00
Mario Zechner
dbfb5bc105 docs(chord): app kit storage 2026-11-02 10:43:09 +00:00
Mario Zechner
e8c5ac945f docs(chord): app kit command-line clients 2026-11-02 10:42:09 +00:00
Mario Zechner
09f2dac685 docs(chord): app kit authentication 2026-11-02 10:40:04 +00:00
Armin Ronacher
db6c084455 Add [Unreleased] section for next cycle 2026-11-02 11:38:21 +01:00
Armin Ronacher
f9a2636556 Release v1.5.0 2026-11-02 11:38:21 +01:00
Armin Ronacher
513f6f1ce8 fix: keep Chord example dependencies out of releases 2026-11-02 11:38:21 +01:00
Armin Ronacher
7e7c98a0f5 docs(coding-agent): note branch summary context edits 2026-11-02 11:38:20 +01:00
Mario Zechner
87f69dbf3c docs(chord): app kit principals and users 2026-11-02 10:36:42 +00:00
Mario Zechner
2dd44fb1c8 docs(chord): app kit shape 2026-11-02 10:33:06 +00:00
Mario Zechner
7edaa131dd docs(chord): testing a plugin alone 2026-11-02 10:26:25 +00:00
Mario Zechner
95e2015f3b docs(chord): single-file plugins 2026-11-02 10:22:50 +00:00
Mario Zechner
ee7f61f92c docs(chord): the plugin model's points 3, 4, 5 and 8, imports and builds 2026-11-02 10:19:47 +00:00
Armin Ronacher
ddbe02cd20 docs: audit changelogs and add release highlights 2026-11-02 11:03:52 +01:00
robopipi[bot]
d0fe213089
fix(coding-agent): apply context edits to branch summary input (#11680)
When a partial assistant reply fails and automatic retry succeeds, pi
appends a `context_edit` that hides the failed attempt from model
context. Branch summarization (`/tree` with summarize) built its input
from raw session entries through `getMessageFromEntry`, which ignored
`context_edit` entries. As a result, the summarizer received the hidden
attempt again. Content replacements were ignored the same way.

What the change does:
- `prepareBranchEntries` now collects the latest `context_edit` for each
target in the branch.
- It applies those edits to the entries it converts, using the same
`projectContextEntry` logic as the live context and compaction:
  - an omission (`replacement: null`) drops the entry;
  - a replacement swaps its content.
- `projectContextEntry` is now exported from `session-manager.ts` so
both paths share it.
- The existing branch-summary behavior is unchanged: tool results are
still skipped, and compaction or branch-summary entries still become
summary messages.

Testing:
- Added `applies context edits to branch entries` to
`test/branch-summarization.test.ts`. It covers one omitted assistant
entry and one replaced assistant entry. The test fails without the
change and passes with it.
- Ran `branch-summarization`, `branch-summary-extensions`,
`agent-session-branching` and the compaction tests: all pass.
- `npm run check`: biome and the coding-agent checks pass. `tsc` reports
6 errors in `packages/ai` model-catalog tests, and the same 6 errors
occur on unmodified `main`.
- End-to-end reproduction with the faux provider and `AgentSession`: a
failed attempt, a successful retry, then `navigateTree(target, {
summarize: true })`. Before the change, the summary request contained
the failed attempt's text. After the change, it contains only the
successful retry.

Fixes #11602

Requested by @davidbrai

Co-authored-by: triagent <triagent@localhost>
2026-11-02 10:55:30 +01:00
Mario Zechner
6ab6c1e0e4 docs(chord): plugins import only the app's versioned API 2026-11-02 09:41:22 +00:00
Mario Zechner
c9f4c7b9fc docs(chord): fold the cross-plugin import rule into design and slices 2026-11-01 23:11:22 +00:00
Mario Zechner
e1669ee4b8 docs(chord): contracts come from where the plugin's code came from 2026-11-01 23:11:16 +00:00
Mario Zechner
b556cfe5b0 docs(chord): schemas are pi-schema's in the design
Some checks are pending
CI / build-check (push) Waiting to run
CI / test (coding-agent) (push) Waiting to run
CI / test (durable) (push) Waiting to run
CI / test (other) (push) Waiting to run
CI / mcp-conformance (push) Waiting to run
Environments / daemons (push) Waiting to run
Environments / check (push) Blocked by required conditions
Environments / release-daemons (darwin-arm64, macos-latest) (push) Blocked by required conditions
Environments / release-daemons (darwin-x64, macos-latest) (push) Blocked by required conditions
Environments / release-daemons (linux-arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
Environments / release-daemons (linux-x64, ubuntu-latest) (push) Blocked by required conditions
Environments / release-daemons (windows-arm64, windows-11-arm) (push) Blocked by required conditions
Environments / release-daemons (windows-x64, windows-latest) (push) Blocked by required conditions
Environments / tests (macos-latest) (push) Waiting to run
Environments / tests (ubuntu-24.04-arm) (push) Waiting to run
Environments / tests (ubuntu-latest) (push) Waiting to run
Environments / tests (windows-11-arm) (push) Waiting to run
Environments / tests (windows-latest) (push) Waiting to run
2026-11-01 15:20:46 +00:00
Armin Ronacher
c09c98d7d2 fix(chord): admit a routed host even when the relay that spawned it is gone
A relayed hold released (or its principal refused or revoked) while the route resolved made #resolve throw before adding the connection, so the spawned host's link was never read and its own upstream references failed unavailable/ready_timeout after readyTimeout. The connection is now added right after resolve; the checks only fail the relay.
2026-11-01 14:47:36 +01:00
Armin Ronacher
0f21a3319d fix(coding-agent,tui): reuse syntax highlighting and rendered Markdown blocks
Codemode and write rows keep their last highlighting in a CodeHighlighter
that checks theme and grammar changes itself. Markdown reuses the top-level
blocks of its last render, held weakly, and assistant messages reuse their
Markdown instances while streaming. Text.setText() keeps its wrapped lines
for unchanged text.

closes #10971
2026-11-01 14:40:56 +01:00
Mario Zechner
6291b9bcc3 feat(agent): pi-schema's Static types TypeBox-built schemas too, without depending on TypeBox 2026-11-01 11:12:44 +00:00
Mario Zechner
a6bde34bb6 feat(schema): benchmark against ata-validator, Ajv and Zod 2026-11-01 10:22:20 +00:00
Mario Zechner
be039fb316 feat(chord): Chord v1 and v2 on pi-schema, drop TypeBox
Schema helpers are a thin layer over pi-schema's builders with the same JSON,
so fingerprints and stored data are unchanged (proven by schema-switch tests and
a store written by the TypeBox code). Checks through pi-schema; error messages
are pi-schema's; format is an annotation. v1 contracts take any JSON Schema.
map(bytes()) works.
2026-11-01 10:15:02 +00:00
Mario Zechner
6536f80129 feat(ai,agent,coding-agent): validate tool arguments with pi-schema, drop TypeBox
pi-schema: opt-in coercion, compile(schema, { coerce: true }) with coerce() and
parse(), the superset of TypeBox's Value.Convert rules and pi-ai's old coercion;
unresolvedRefs option; url and json-pointer-uri-fragment formats.
pi-ai: Tool takes any JSON Schema; validation through pi-schema; Type, Static
and TSchema are no longer exported (breaking). pi-agent-core and pi-durable:
tools on pi-schema, no TypeBox dependency. Coding agent: extensions keep Type,
Static, TSchema and StringEnum through an extension view of pi-ai; built-in
tools stay on TypeBox.
2026-11-01 10:08:42 +00:00
Mario Zechner
2c8d1feb14 docs(chord): the schema switch decisions 2026-11-01 00:36:33 +00:00
Mario Zechner
8ffea8a1bf feat(schema): faster object checks and compile, less memory
Some checks are pending
CI / build-check (push) Waiting to run
CI / test (coding-agent) (push) Waiting to run
CI / test (durable) (push) Waiting to run
CI / test (other) (push) Waiting to run
CI / mcp-conformance (push) Waiting to run
Environments / daemons (push) Waiting to run
Environments / check (push) Blocked by required conditions
Environments / release-daemons (darwin-arm64, macos-latest) (push) Blocked by required conditions
Environments / release-daemons (darwin-x64, macos-latest) (push) Blocked by required conditions
Environments / release-daemons (linux-arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
Environments / release-daemons (linux-x64, ubuntu-latest) (push) Blocked by required conditions
Environments / release-daemons (windows-arm64, windows-11-arm) (push) Blocked by required conditions
Environments / release-daemons (windows-x64, windows-latest) (push) Blocked by required conditions
Environments / tests (macos-latest) (push) Waiting to run
Environments / tests (ubuntu-24.04-arm) (push) Waiting to run
Environments / tests (ubuntu-latest) (push) Waiting to run
Environments / tests (windows-11-arm) (push) Waiting to run
Environments / tests (windows-latest) (push) Waiting to run
- Declared-object checks walk the value's own keys with for...in, whose
  property reads V8 serves from the enum cache, instead of reading each
  declared name from a list: nested Chord-style arguments 535 -> 409 ns
  (TypeBox 474), recursive $ref schemas 1.1 us -> 753 ns.
- Schemas are indexed for references only on the first $ref; base URIs are
  derived from $id while compiling. Compiling a new schema 43 -> 21 us.
- Drop the keyed cache of leaf checks: on distinct schemas its entries cost
  more than sharing saved. Bare types still share module-level checks and
  patterns share their RegExp. 3,200 distinct schemas 7.9 -> 7.1 MB
  (cfworker 7.6 MB).
2026-10-31 21:59:21 +00:00
Mario Zechner
6d4b744363 docs(chord): the schema package is built 2026-10-31 21:47:22 +00:00
Mario Zechner
fab2c5353e feat(schema): add pi-schema, JSON Schema builders and validation without eval
@earendil-works/pi-schema compiles JSON Schema (drafts 2020-12 and 7) once into
plain closures: no eval or new Function, so it runs under a strict CSP. It
passes 2,222 of the 2,223 core tests of the official JSON-Schema-Test-Suite,
checks Chord-style argument schemas within 1.2x of TypeBox's JIT, and keeps
3,200 compiled schemas in 7.9 MB (TypeBox: 54.7 MB).

- compile(schema, options) returns a Validator: check() is the boolean check
  (a type guard for builder schemas), errors() reports each failure with a
  JSON Pointer path, missing and unknown fields at the field.
- Builders (str, int, obj, opt, union, ...) return plain JSON Schema typed with
  the values it accepts (Static<typeof schema>).
- Formats are an optional entry point (./formats), adapted from TypeBox (MIT).
- Tests run the vendored suite (drafts 2020-12 and 7, with optional and format
  tests); npm run bench compares conformance, speed, setup cost, memory and
  bundle size with TypeBox, @cfworker/json-schema and omptype.
2026-10-31 21:39:34 +00:00
Armin Ronacher
7ef8680abd fix: sync esbuild platform package dev flags in lockfile
esbuild is a non-dev package through chord's optional peer dependency, so its optional @esbuild/* platform packages are non-dev as well. npm install regenerates this; the committed lockfile had stale dev flags.
2026-10-31 22:25:03 +01:00
Mario Zechner
6af92c7950 docs(chord): the plugin model, a primer 2026-10-31 21:02:36 +00:00
Mario Zechner
20362c155e fix(chord): widen the origin-record heap bound for CI noise 2026-10-31 20:52:13 +00:00
Mario Zechner
cc08278a62 fix(chord): slice 10 http builds without DOM types 2026-10-31 20:46:26 +00:00
Mario Zechner
b22c5f6941 docs(chord): slice 10 as built (design 23, spec, explainer) 2026-10-31 20:43:29 +00:00
Mario Zechner
8959ad6e68 feat(chord): Chord v2 slice 10, HTTP and workers
chord/next/http: a Web fetch handler built from the registry Http (routes, wraps,
sockets, hosts, relays, CSP sources) and Authenticators, responses as descriptions,
a security baseline on by default, Chord's own Node listener as a host-lifetime
object, nodeRequest for apps mounting it, links and plugin sockets.
chord/next/workers: a forked worker per address, started on demand, stopped when
idle, never restarted by itself, plugins built by the server and shipped.
Plugins: kinds with platform and host packages, createPluginRuntime, scripts(kind),
rollout results per host, imports of other plugins by name. Kernel: RouteHandle
(retry, suspend), no route backoff, anonymous host.root, origins only from relays.
ws is an optional peer dependency.
2026-10-31 20:40:36 +00:00
Mario Zechner
81f3cd4127 docs(chord): a schema package beneath pi-ai and Chord 2026-10-31 20:06:14 +00:00
Mario Zechner
0baf611f04 docs(chord): API versions in import paths; the plugin model proposal 2026-10-31 19:07:10 +00:00
Mario Zechner
2b06c437ce docs(chord): settings are arguments, extensions are registries 2026-10-31 18:52:54 +00:00