mirror of
https://github.com/earendil-works/pi.git
synced 2026-10-02 08:44:38 +08:00
6.6 KiB
6.6 KiB
Changelog
[0.99.1] - 2026-09-29
[0.99.0] - 2026-09-29
Breaking Changes
- Reordered Storage scan arguments so the limit precedes the cursor.
- Added the required conversation-visible
Storage.entry(conversationId, id, context)overload. - Split
Tx.createConversation()fromTx.forkConversation(), replaced raw conversation-record input, and require explicit ownerless or task ownership. - Replaced untyped numeric record IDs and the
TaskRefwrapper with erased branded numeric ID types, including result-typedTaskId<R>, separately branded commit sequences, and genericStorage.mintId(). - Made task conversation membership immutable after task creation.
- Added
ConversationQueryto Storage and transaction conversation scans. - Added required
StoredDocument.deltasSinceBaseto Storage document reads. - Task definitions now require an exhaustive
phasesmap and anaborthandler; define them withdefineTask(). RegistryReadernow requiressubscribe().- Removed
Tx.setTask(); a task changes its own state by returning the next state from itsruntime.commit()callback. Session.subscribeClose()listeners now run synchronously when close begins, after admission is sealed.defineEntry<D>()now takes the entry'sdatatype instead of a record type;Entry<D>.is()narrows toTypedEntry<D>.- Added the required
Storage.scanSubmissions()scan of submissions by conversation and status. createRegistry()now pre-registers the built-inpi.generationtask andpiconversation setup, which cannot be disposed or replaced, andHarness.open()rejects a registry whose snapshot lacks either.RegistrySnapshotnow requiresconversationSetups().Txnow requiressettleSubmission().
Added
- Added transactional Sessions with typed durable documents, task creation, snapshots, retirement, and commit publications.
- Added document checkpoint selection, lazy version migration, and
Session.snapshotAsOf()for rewindable conversation documents. - Added policy-driven backend-side conversation document copying when creating forks.
- Added indexed conversation ownership queries and guaranteed no-effect Storage rejection handling.
- Added the JSONL storage backend (
@earendil-works/pi-durable/storage/jsonl, andopenNodeJsonlStorage()from@earendil-works/pi-durable/storage/jsonl/node), including sidecar reclamation. - Added the execution environment (
@earendil-works/pi-durable/env, andNodeExecutionEnvfrom@earendil-works/pi-durable/env/node) for file access and shell execution with bounded output capture and truncation. - Added the
@earendil-works/pi-durable/testingexport with the scoped storage conformance suite (createStorageConformance(),registerStorageConformance()) and storage benchmark workloads (#9977 by @christianklotz). - Added incarnation-bound read-only Chord document states and serialized asynchronous document watches with bounded exact-frame buffering.
- Added
deltasSinceBasecheckpoint predicate information so definitions can bound replay without value counters. - Added
Harness.open()with lazy root creation, atomic conversation creation and forks withinit, conversation-bound commits, fork-aware entry pagination, model context derivation, and the built-inConversationConfigdocument with model, thinking level, and active tool accessors. - Added
createRegistry()for tools, tool wrappers, hooks, tasks, and system prompt sections with batched publication and stable keyed ordering. - Added
defineEntry()typed entry kinds. - Added the durable task runtime:
defineTask(), registry-resolved phase handlers with checkpoint progress rules decided on the Session line, migration at reservation, typed runtime commits, memos,sleep(), and invocation-owned watches, plusHarness.resume(),getTask(),waitForTask(),abortTask(), and task-awarewaitForIdle()on the Harness and conversations. Open reconciles running tasks to pending; tasks without a fitting definition stay blocked until registration, and aborting them settles them asorphaned. - Added the first runnable chat turn:
Conversation.submit()with request-ID deduplication,Submissionhandles (status(),wait(),abort()),Harness.submission(),Harness.abortSubmission(), andConversationBusyfor submissions to a busy conversation. - Added the built-in
pi.generationtask: positional system prompt preparation from registered sections (tags, wrappers, failures, minimal patches, order rewrites, and head-cut rebaselines), model requests throughModels, durable throttled partials in thepi.livedocument (LiveDoc), retries with backoff, deferred-response polling and cancellation, and aborted-partial conversion. - Added
Tx.settleSubmission(), which run tasks use to settle the inputs they answer. - Added built-in entry tokens
UserEntry,AssistantEntry,SystemEntry, andToolResultEntry, and token-firsttx.entry()andtx.appendEntry()overloads. - Added
streamOptionsandretrytoConversationConfigwithget/setStreamOptions()andget/setRetryPolicy()on conversations. - Added
snapshot(),snapshotAsOf(),context(),now(), andreport()toTaskRuntime. - Added
Harness.inspect(): live tasks with their derived scheduler state (running, ready, waiting, or blocked with its reason), queued and placed submissions, and registry wrapper failures. - Entries appended by a task's runtime commits now record the task as
byTaskId. - Added
registry.conversations.setup(): setups run in every Harness commit that creates or forks a conversation, including rawTx.createConversation()andTx.forkConversation(), before hostinit. The built-inpisetup runs first and stages the default configuration with every registered tool active (forks keep their copied configuration) and an emptypi.live. Conversation.submit(),Submission.wait(),waitForTask(), andwaitForIdle()now enable task scheduling, so they never wait on a Harness whoseresume()was not called.- Scheduler-written
faultedandorphanedoutcomes of a run task now settle the run's input submissionsunansweredand clear its run control in the same commit.
Fixed
- Fixed cached documents skipping migration when accessed with a newer definition version, and older definitions reading values migrated only in memory. Document states and watches hydrated under another definition version receive the new value as a root replacement.
[0.87.1] - 2026-09-22
[0.87.0] - 2026-09-21
[0.86.1] - 2026-09-20
[0.86.0] - 2026-09-19
Added
- Added the initial Pico durable record contracts and detached in-memory storage implementation.