Commit graph

62 commits

Author SHA1 Message Date
Mario Zechner
37c9d0d200 fix(durable): harden the persistent subagent example
The subagent tool no longer offers wait, is not rerun after a crash (a repeated stop could stop newer work), reports each answer once even when several messages end in it, checks registry names as own properties, and its scenes cannot hang polling.
2026-09-30 14:01:47 +02:00
Mario Zechner
03180653c6 feat(durable): structured concurrency: task ownership, waiting, completing holds, bottom-up abort (Package 19)
Tasks name their owner (conversation or task); a task waits on other tasks with a waiting state (failFast or allSettled) and runtime.outcomes(); a task that finishes while owned work is live holds completing until it drains; abort handlers run bottom-up; only live owners cascade. The generation owns its tool tasks and waits for them in a tools phase, replacing pi.post-tools and after. Adds Conversation.abort({ background: true }), example 24 (checkout with payments), and reworks example 23 into persistent subagents.
2026-09-30 13:50:29 +02:00
Mario Zechner
96377f5c2a docs(durable): specify structured concurrency (Package 19) 2026-09-30 13:50:29 +02:00
Mario Zechner
1b347794e2 fix(durable): cover ownership cancellation races (Package 18) 2026-09-29 22:47:17 +02:00
Mario Zechner
2532a0bef7 feat(durable): conversation abort, ownership cascades, and subagent handles (Package 18) 2026-09-29 22:30:50 +02:00
Mario Zechner
9f1013506f docs(durable): specify ownership and subagents (Package 18) 2026-09-29 22:30:50 +02:00
Mario Zechner
c4f5ef9451 docs(durable): rename collapse to compaction 2026-09-29 21:38:50 +02:00
Mario Zechner
e5960c483f docs(durable): rewrite README as an experimental usage guide 2026-09-29 21:31:16 +02:00
Mario Zechner
dc58677e6b docs(durable): move unreleased changelog entries out of the 0.99.0 section 2026-09-29 21:25:24 +02:00
Mario Zechner
47f65f1a3a feat(durable): inbox, reset, usage, conversation view, and experimental events (Package 17) 2026-09-29 21:24:32 +02:00
Mario Zechner
749e45ae69 docs(durable): specify live UI and product state (Package 17) 2026-09-29 21:24:32 +02:00
Mario Zechner
445770e032 feat(durable): first coding-agent tool turn (Package 16)
Generation offers active registered tools through positional system entries and
hands a tool-calling answer to parallel or sequential pi.tool tasks and a
pi.post-tools task that applies addTools/terminate and continues the run. Tool
tasks validate, run beforeTool/afterTool, record intent with the replay policy,
publish bounded, sanitized, adaptively throttled progress in pi.live.tools, and
write results with a rendered diagnostics block. Hook dispatch with conversation
and subtree scopes, prepareArguments, HarnessOptions.env, and read/bash/edit/write
tools in pi-durable/tools. The env shell now streams raw output and spills past
thresholds; its bounded capture and publisher are removed.
2026-09-29 21:24:32 +02:00
Mario Zechner
ba7d5fbedb feat(ai,durable): add lightweight pi-ai/models entry and avoid TypeBox in durable
Durable generation imports retry helpers from pi-ai/utils/retry; examples use
pi-ai/models and pi-ai/providers/faux. Entry graph budgets and an import
footprint test guard the models entry.
2026-09-29 21:24:17 +02:00
Mario Zechner
0a7a4eca68 docs(durable): specify first tool turn (Package 16) 2026-09-29 21:24:04 +02:00
Armin Ronacher
6a4af07d61 Add [Unreleased] section for next cycle 2026-09-29 20:07:07 +02:00
Armin Ronacher
d86654abb8 Release v0.99.1 2026-09-29 20:06:55 +02:00
Armin Ronacher
312184edb6 Add [Unreleased] section for next cycle 2026-09-29 19:04:43 +02:00
Armin Ronacher
4b060d3a98 Release v0.99.0 2026-09-29 19:04:28 +02:00
Armin Ronacher
f81cf5520d docs: audit changelogs for 0.99.0 2026-09-29 19:01:43 +02:00
Armin Ronacher
8eb2bccf26 fix: bump vitest to 4.1.11 and gondolin's undici to 6.29.0
Addresses GHSA-82fw-gwwq-j7x9 (vitest mocker path traversal) and
GHSA-3wwx-pv8p-q78v (undici 6.x permessage-deflate DoS). Both are
dev/example-only; the shipped coding-agent shrinkwrap is unchanged.
2026-09-29 18:38:07 +02:00
Mario Zechner
837d8a16bd feat(durable): first runnable chat turn (Package 15)
Submissions with request-ID deduplication and handles, the pi.live run
control and presentation document, the built-in pi.generation task
(system prompt preparation, streamed durable partials, retries, deferred
polling, abort), typed entry tokens, stream options and retry policy,
TaskRuntime reads, Tx.settleSubmission, registry conversation setups,
Storage.scanSubmissions, Harness.inspect, and byTaskId attribution.
Waiting calls enable scheduling. The scratch tour is split into
test/examples.
2026-09-29 14:08:28 +02:00
Mario Zechner
034be02d21 docs(durable): specify first chat turn (Package 15)
pi.live turn control and generation presentation, built-in entry kinds,
pi.generation checkpoint and phases, typed entry tokens, built-in tasks in
the registry, TaskRuntime reads, stream options and retry policy config,
Harness hook for scheduler-written outcomes, and createConversation without
input.
2026-09-29 10:05:44 +02:00
Mario Zechner
cb7969d212 feat(durable): add durable task runtime
Adds defineTask, registry-resolved phase handlers, and a scheduler that
decides every task transition in one callback on the Session line:
reservation with migration, dependencies, precedence rules in a step
before each phase, handover to replaced definitions, direct-task abort
(mark, signal, join, fresh abort invocation), orphaning of blocked tasks,
open reconciliation, and close that joins invocations without writing
outcomes. runtime.commit() callbacks return the typed next state; Tx no
longer exposes setTask. Adds Harness.resume, getTask, waitForTask,
abortTask, and task-aware waitForIdle; RegistryReader.subscribe wakes
the scheduler.
2026-09-28 23:55:24 +02:00
Mario Zechner
3883fcb1f3 feat(durable): add openable Harness with registry and conversation config
Implements Pico5 Package 13: Harness.open over a Session with an application-owned
registry (tools, tool wrappers, hooks, tasks, system prompt sections; batched
publication, stable keyed order), lazy root creation with init, atomic
create/fork with init, conversation-bound commits, fork-aware entries, model
context derivation, and the built-in ConversationConfig document.

Fixes cached documents skipping migration when accessed with another definition
version. Rewrites the Pico5 spec and handoff to the registry/system-prompt
design and removes the superseded live-registries proposal.
2026-09-28 21:57:41 +02:00
Mario Zechner
11894012dd feat(durable): expose deltas since base to checkpoint predicates
Storage reports replayed deltas after the selected base; Session tracks the
count across adopted writes so checkpoint predicates can bound replay.
Also adds internal reserved-root creation and conversation-bound commit
defaults for the upcoming Harness.
2026-09-28 17:21:20 +02:00
Mario Zechner
cd5ff11259 docs: reorder durable harness milestones 2026-09-28 16:47:23 +02:00
Mario Zechner
35180b9df8 feat(durable): add document states and buffered watches 2026-09-28 16:36:31 +02:00
Mario Zechner
d6af72e185 docs(durable): clarify scratch examples 2026-09-25 18:05:22 +02:00
Mario Zechner
04b5bad666 feat(durable): add typed IDs and explicit ownership 2026-09-25 17:58:29 +02:00
Mario Zechner
507d7649e9 feat(durable): add conversation document forks 2026-09-25 16:17:53 +02:00
Armin Ronacher
ca7460d16b feat: build with TypeScript 7 and run sources with plain node
Replace the tsgo native preview with typescript@7.0.2 and port the check scripts to the TS 7 API. Target ES2024, drop useDefineForClassFields: false and unused decorator options, and enable verbatimModuleSyntax. Replace tsx with node plus the source resolver hook, passed to --import as a file URL.

closes #9965
2026-09-25 13:14:33 +02:00
Mario Zechner
5fd446ca18 feat(durable): optimize document replay 2026-09-25 00:09:50 +02:00
Mario Zechner
5d4de953ce feat(durable): add checkpoints and document migrations 2026-09-24 23:09:15 +02:00
Mario Zechner
19a0361be8 feat(durable): add transactional sessions and documents
Add typed document definitions, atomic Session transactions, complete commit publication, task/document lifecycle handling, and paginated Tx scans. Share Chord's strict JSON copier across draft placements and durable ownership boundaries.
2026-09-24 22:24:04 +02:00
Mario Zechner
d5cba1d97c feat(chord): make immutable delta tracker canonical
Replace the alternate tracker implementations with the optimized immutable overlay, validate draft placements as strict JSON, and document the ownership contract. Consolidate tracker tests and benchmarks around the canonical implementation.
2026-09-24 15:07:12 +02:00
Christian Klotz
3f0573877e
feat(durable): export storage benchmark workloads 2026-09-24 14:26:22 +02:00
Mario Zechner
cbe7cf00be docs(durable): move Pico5 strict-JSON checks to roots and Chord placements 2026-09-24 14:11:10 +02:00
Mario Zechner
481c7232f1 docs(durable): align Pico5 with canonical immutable tracker
Name the Astra-immutable-optimized Chord Delta tracker as the Packages 6-7
prerequisite, include the minimal generic Tx table surface in that
milestone, and revoke drafts at callback settlement. Drop the Chord
prerequisite from Package 11 because the existing replicated-state source
contract already matches. Specify that tool stream() never spills; tools
spill through their execution environment.
2026-09-24 13:50:10 +02:00
Mario Zechner
601437d5a7 fix(durable): test execution environment and fix output truncation metadata
Port and extend the agent environment tests for NodeExecutionEnv, output
capture, adaptive publishing, and truncation, including exact-byte
truncation, flushing, line-reader cancellation, spill backpressure, and
Buffer-free UTF-8 counting.

Fix truncation reporting when bytes and lines are both exceeded, when only
bytes are exceeded at the line cap, and when small limits trim multi-byte
edge characters. Report the full size of oversized newline-terminated tail
lines. Resolve durable test imports from source so tests run unbuilt.

Set Pico tool output defaults to 50 KiB and 2,000 lines.
2026-09-24 13:34:46 +02:00
Mario Zechner
7c696c00f3 docs: revise Pico5 immutable revision design 2026-09-24 11:33:45 +02:00
Christian Klotz
b45597504e
feat(durable): export scoped storage conformance suite (#9977)
* feat(durable): export scoped storage conformance suite

* docs(durable): clarify storage conformance example
2026-09-23 23:21:15 +02:00
Mario Zechner
b313731b80 feat: add JSONL sidecar reclamation 2026-09-23 09:54:05 +02:00
Mario Zechner
898ab80405 feat: add durable JSONL storage backend 2026-09-23 01:33:31 +02:00
Mario Zechner
9672462143 docs: refine Pico5 JSONL publication design 2026-09-23 00:26:05 +02:00
Mario Zechner
a32782520f docs: propose Pico5 live extension registries 2026-09-22 23:46:19 +02:00
Armin Ronacher
a8ed497713 Add [Unreleased] section for next cycle 2026-09-22 21:28:09 +02:00
Armin Ronacher
f07218c4d4 Release v0.87.1 2026-09-22 21:28:02 +02:00
Mario Zechner
5901c9b9e5 feat: add durable SQLite storage backend
Add the portable SQLite storage core, Node adapter, versioned migrations, conformance coverage, and storage benchmarks.
2026-09-22 17:46:42 +02:00
Mario Zechner
d201760ffe Merge remote-tracking branch 'origin/main' 2026-09-22 13:56:53 +02:00
Mario Zechner
8158b03213 feat(durable): add versioned document storage
Replace persisted inputs with strict input and passive-write submissions. Add atomic document bases, deltas, historical reads, reincarnation, reclamation, and indexed memory queries.
2026-09-22 13:54:50 +02:00