agent-neckbeard 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ The v1 adapter embeds Pi through `@earendil-works/pi-coding-agent`'s structured
7
7
  ## Runtime and bootstrap requirements
8
8
 
9
9
  - Node.js 22.19.0 or newer inside the Daytona snapshot. The artifact preflights this exact minimum before dependency mutation and uses Node's built-in WebSocket client.
10
- - The exact Pi SDK module and version reported by `artifact.requiredRuntimeModules`. The defaults are `@earendil-works/pi-coding-agent` and `0.83.0`, matching Tupelo's SBA financing agent runtime.
10
+ - The exact Pi SDK module and version reported by `artifact.requiredRuntimeModules`. The defaults are `@earendil-works/pi-coding-agent` and `1.3.0`. The checked-in supervisor package lock freezes the complete dependency graph for this version.
11
11
  - A persistent sandbox directory for the supervisor journal and Pi session file.
12
12
  - A `wss://` gateway. Plain `ws://` is allowed only when `allowInsecureGateway` is explicitly enabled for local development.
13
13
  - One attempt-scoped gateway credential containing exactly 32 bytes from a cryptographically secure random generator, encoded as canonical unpadded base64url (43 characters), in the configured environment variable, plus the model credentials Pi needs. It is an opaque token, not a password or arbitrary application string.
@@ -26,6 +26,14 @@ The locked bootstrap serializes concurrent callers, verifies graph-addressed sta
26
26
 
27
27
  Publication order is `npm ci` and graph checks, fsync of every regular file and every installed-tree directory bottom-up, fsync of `installDir`, atomic replacement plus file/directory fsync of the owner-only `0600` installed-tree manifest outside `node_modules`, exact manifest re-verification, final-artifact re-verification, and only then atomic publication and directory fsync of the graph marker. A crash after the manifest but before the marker leaves the pending graph in place, so retry reinstalls and republishes before marking complete. A retry with the same durable marker reopens the canonical manifest leaf through the retained install-directory descriptor and skips `npm ci` only when the final files, dependency graph, manifest shape and bounds, and freshly recomputed installed-tree contents all match. An absent, malformed, unsafe, oversized, or mismatched manifest is repair-needed rather than trusted; the locked `npm ci` path replaces it only after the repaired tree is fully synced. Another graph fails closed so reconciliation cannot replace `node_modules` beneath a live supervisor. The runtime also verifies the SDK's exported `VERSION` before creating a session and fails closed on drift.
28
28
 
29
+ ## Pi 1.3.0 compatibility validation
30
+
31
+ The 1.3.0 upgrade was checked against the published SDK declarations and session-manager implementation, plus the [upstream SDK guide](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/sdk.md). `ModelRuntime`, resource loading, session creation, subscription, abort, and disposal remain compatible. Prompt preflight now reports `started`, `queued`, or `handled`, rather than a boolean; steering returns `queued` or `handled`. The adapter's declarations and test fixture reflect these dispositions. Its existing acceptance handling and persistence guard require no behavioral workaround: an explicitly precreated empty session still opens with `flushed === true`, `_persist(entry)` remains the append hook, and the current session format is version 3.
32
+
33
+ Validation on 2026-10-18 included two actual Anthropic turns with Pi 1.3.0, disposal/reopen, and conversation recall. A live Daytona run exercised the generated exact-lock artifact, structured credential handoff, a sandbox-local WebSocket fixture gateway, three acknowledged/applied prompt commands and three completed Anthropic turns across two supervisor starts. All three assistant records contained the expected recall marker in version-3 history. Exact stop, artifact disposal, and sandbox deletion completed. The existing five Daytona provider smoke tests also passed. This is a sandbox-local gateway acceptance test, not validation of a downstream production gateway or worker.
34
+
35
+ An initial connection-refused attempt exposed a pre-existing transport limitation on the snapshot's Node.js 25.9.0: passing an abnormal close code back to the native WebSocket `close()` throws `InvalidAccessError`. The successful run started with the fixture gateway listening; outage recovery is not claimed by this acceptance result. The unrelated transport behavior was not changed by this SDK upgrade.
36
+
29
37
  ## Launch contract
30
38
 
31
39
  Create the artifact in a Hatchet launch task after the sandbox, repository, and runtime dependency are ready:
@@ -151,7 +159,7 @@ A normal live `event_ack` cannot exceed the highest event sequence actually sent
151
159
 
152
160
  Commands use a stable `commandId` and a positive monotonic `commandSequence`:
153
161
 
154
- - `prompt` calls the Pi SDK's `session.prompt()`. The adapter returns after `preflightResult(true)` and retains the independent run Promise, so later `steer` and `stop` commands are not blocked and a gateway disconnect cannot cancel the turn.
162
+ - `prompt` calls the Pi SDK's `session.prompt()`. The adapter returns after an accepted `preflightResult` disposition (`started`, `queued`, or `handled`) and retains the independent run Promise, so later `steer` and `stop` commands are not blocked and a gateway disconnect cannot cancel the turn.
155
163
  - `steer` calls `session.steer()` while the Promise is active. Pi applies steering at its supported turn boundary.
156
164
  - `stop` calls `session.abort()` without disposing the reusable Pi session. A successful user stop produces `turn_stopped`, not `turn_completed` or `turn_failed`.
157
165
 
@@ -161,7 +169,7 @@ After a side effect, the supervisor fsyncs `command_applied` or `command_failed`
161
169
 
162
170
  Pi reports prompt preflight before it appends the user entry, and `steer()` accepts into an in-memory turn queue. Therefore `command_applied` means the SDK side effect was accepted under the at-most-once command contract; it does not claim that a corresponding Pi JSONL entry already exists. The adapter securely creates and parent-fsyncs the private session file before opening Pi, fsyncs Pi's header after open, and fsyncs the regular non-symlink session file before any normalized `turn_completed`, `turn_failed`, or `turn_stopped` event. Completed/stopped transcript history therefore precedes the durable terminal event. A crash during an accepted but unfinished prompt or queued steer is recovered through the supervisor marker/ledger semantics rather than by replaying an assumed Pi entry.
163
171
 
164
- Pi JSONL growth is finite per attempt. The hard ceiling is 64 MiB, aligned with the ordinary command-ledger and resource-snapshot budgets. New prompts and steers are rejected at or above 56 MiB, leaving 8 MiB of logical headroom for an already admitted turn; after asynchronous canonical validation, a final synchronous retained-descriptor size check sits immediately before each Pi side effect. Use a replacement attempt for more work. The pinned Pi 0.83 `SessionManager.open()` path initializes the explicit session file into `flushed === true`. The adapter requires that exact append-only state and retained-descriptor path before every `_persist`, serializes the pending JSONL line exactly once, rejects it before disk I/O if the resulting file would exceed 64 MiB, writes the same bytes positionally through the retained descriptor, and rechecks the state, path, hard bound, and exact size delta. It never estimates Pi's private `fileEntries`: an unexpected `flushed === false` full-rewrite state fails before writing. Empty-file initialization is the only supported full rewrite. Non-empty history must begin with a bounded UTF-8 Pi version-3 header, so legacy migration is refused before `SessionManager.open()` can rewrite the canonical file. Because Pi advances its in-memory tree before `_persist`, any serialization, capacity, write, or postcondition error latches `harness_failed`; even an extension that catches the immediate error cannot admit more work or publish normalized terminal success. The 8 MiB margin is budgeting headroom rather than a filesystem reservation or a guarantee that every pending record fits, while failure and restart facts remain governed by the outbox's separate recovery reserve.
172
+ Pi JSONL growth is finite per attempt. The hard ceiling is 64 MiB, aligned with the ordinary command-ledger and resource-snapshot budgets. New prompts and steers are rejected at or above 56 MiB, leaving 8 MiB of logical headroom for an already admitted turn; after asynchronous canonical validation, a final synchronous retained-descriptor size check sits immediately before each Pi side effect. Use a replacement attempt for more work. The pinned Pi 1.3.0 `SessionManager.open()` path initializes the explicit session file into `flushed === true`. The adapter requires that exact append-only state and retained-descriptor path before every `_persist`, serializes the pending JSONL line exactly once, rejects it before disk I/O if the resulting file would exceed 64 MiB, writes the same bytes positionally through the retained descriptor, and rechecks the state, path, hard bound, and exact size delta. It never estimates Pi's private `fileEntries`: an unexpected `flushed === false` full-rewrite state fails before writing. Empty-file initialization is the only supported full rewrite. Non-empty history must begin with a bounded UTF-8 Pi version-3 header, so legacy migration is refused before `SessionManager.open()` can rewrite the canonical file. Because Pi advances its in-memory tree before `_persist`, any serialization, capacity, write, or postcondition error latches `harness_failed`; even an extension that catches the immediate error cannot admit more work or publish normalized terminal success. The 8 MiB margin is budgeting headroom rather than a filesystem reservation or a guarantee that every pending record fits, while failure and restart facts remain governed by the outbox's separate recovery reserve.
165
173
 
166
174
  Every durability sync reopens the canonical private leaf through the retained parent and compares it with the retained session descriptor both before and after the retained-file fsync plus descriptor-bound parent fsync. A leaf rename, replacement, privacy change, or hard-link change observed at either boundary fails the harness before normalized terminal lifecycle publication. Pi continues to read and write only through its retained descriptor path.
167
175
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-neckbeard",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "description": "Deploy AI agents to E2B, Daytona, and Modal sandboxes, or local Docker containers",
5
5
  "type": "module",
6
6
  "exports": {