@tangle-network/agent-app 0.46.54 → 0.46.56

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.
package/README.md CHANGED
@@ -16,7 +16,7 @@ The substrate packages — `@tangle-network/agent-runtime`, `agent-eval`, `agent
16
16
  - **Bounded tool loop** — `runAppToolLoop` / `streamAppToolLoop`: stream a turn → collect tool calls → dispatch → fold results back → re-run, capped. These are 1:1 aliases of `runToolLoop` / `streamToolLoop` from `@tangle-network/agent-runtime/tool-loop` (the engine owns the loop; this package adds no logic on that path). Substrate-free behind a `streamTurn` seam, so it drives a sandboxed agent, a Worker, or an in-browser copilot unchanged.
17
17
  - **Assembled chat vertical** — `createChatTurnRoutes` wires auth → thread/message store → streaming turn with buffered replay → uploads → sidecar question answering into one route factory, over `authorize` / `produce` / `store` / `interactions` seams. No hand-rolled orchestration. See [`examples/chat-app.md`](./examples/chat-app.md).
18
18
  - **Sandbox-optional** — the same tools, billing, eval, and loop work without a container. A `fetch`-only adapter maps any OpenAI-compatible stream (Tangle Router, tcloud) into the loop. See [`examples/browser-copilot.md`](./examples/browser-copilot.md).
19
- - **Resumable turns** — buffer a turn so a dropped tab loses nothing and a reconnecting client replays the tail. Two niches: a browser/edge copilot streaming the Router directly (no sandbox session to attach to), and any DETACHED sandbox run a browser must tail (`dispatchPrompt({ detach: true })` / `driveTurn` execute on a lane the session gateway never sees). **An INTERACTIVE sandbox turn doesn't need it** — drive it on the message lane (`box.session(id).sendMessage()`) and attach the tab with `box.mintScopedToken()` + `SessionGatewayClient`, or let the worker resume with `box.streamPrompt('', { executionId, lastEventId })`. See [`examples/resumable-turns.md`](./examples/resumable-turns.md).
19
+ - **Resumable turns** — buffer a turn so a dropped tab loses nothing and a reconnecting client replays the tail. Two niches: a browser/edge copilot streaming the Router directly (no sandbox session to attach to), and any detached sandbox run driven through `dispatchPrompt({ detach: true })` / `streamPrompt` that a browser must tail. Sandbox 0.37 `driveTurn` uses the message lane and can be tailed through the session gateway. **An INTERACTIVE sandbox turn doesn't need it** — drive it on the message lane (`box.session(id).sendMessage()`) and attach the tab with `box.mintScopedToken()` + `SessionGatewayClient`, or let the worker resume with `box.streamPrompt('', { executionId, lastEventId })`. See [`examples/resumable-turns.md`](./examples/resumable-turns.md).
20
20
  - **Composes the engine, never forks it** — `/eval` re-exports `@tangle-network/agent-eval`'s verifier; `/integrations` wraps the hub; `/tangle` and `/billing` take the tcloud client as a structural contract. Engines are **peer dependencies** — you pin the version, nothing is bundled.
21
21
  - **ESM, typed, zero runtime deps** in the substrate-free modules (`/runtime`, `/web`, `/crypto`, `/redact`, `/stream`). Ships with `.d.ts` and npm [provenance](https://www.npmjs.com/package/@tangle-network/agent-app#provenance).
22
22
 
@@ -36,10 +36,10 @@ pnpm add @tangle-network/agent-eval @tangle-network/agent-integrations
36
36
  | Peer | Required by | Range |
37
37
  |---|---|---|
38
38
  | `@tangle-network/agent-eval` | `/eval`, `/eval-campaign`, `/profile`, `/knowledge` | `>=0.172.1 <0.174.0` |
39
- | `@tangle-network/agent-runtime` | `/runtime`, `/chat-routes` | `>=0.188.1 <0.192.0` |
39
+ | `@tangle-network/agent-runtime` | `/runtime`, `/chat-routes` | `>=0.191.0 <0.193.0` |
40
40
  | `@tangle-network/agent-integrations` | `/integrations` | `>=0.53.55 <0.54.0` |
41
41
  | `@tangle-network/agent-interface` | `/interactions`, `/chat-store`, `/harness` | `^2.2.0` |
42
- | `@tangle-network/sandbox` | `/sandbox` | `>=0.36.3 <0.37.0` |
42
+ | `@tangle-network/sandbox` | `/sandbox` | `>=0.36.4 <0.38.0` |
43
43
  | `@tangle-network/agent-knowledge` | `/knowledge-loop` | `^13.0.0` |
44
44
  | `@tangle-network/agent-profile-materialize` | `/skills-placement` | `>=0.18.1 <0.20.0` |
45
45
  | `@tangle-network/sandbox-ui` | `/brand`, `/work-product-react`, `/workspace-react` | `>=0.111.2 <0.114.0` |
@@ -130,7 +130,7 @@ Each primitive is written `package → symbol`; three packages ship similarly-na
130
130
  | Your turn | Use | Why |
131
131
  |---|---|---|
132
132
  | **Interactive** — a user is watching a chat or copilot | sandbox → `box.streamPrompt()` held open for the turn, wrapped here as `streamSandboxPrompt` (`/sandbox`); for the browser leg, sandbox → `box.mintScopedToken()` + `SessionGatewayClient` (`@tangle-network/sandbox/session-gateway`) attaches the tab directly | Worker lifetime ≈ turn length; a dropped tab replays the buffered tail on reconnect. |
133
- | **Autonomous** — a mission step, queue job, cron, or inbound email, with nobody watching | sandbox → `box.driveTurn()`, wrapped here as `driveSandboxTurn` (`/sandbox`), ticked from a durable driver; drop to raw `box.dispatchPrompt({ detach: true })` + `box.findCompletedTurn(turnId, { sessionId })` only when one pass is too coarse. `runDetachedTurn` (`/chat-routes`) bridges that detached run into the live buffer, so a browser opening the session mid-run still tails it token-by-token | No consumer exists and Workers die in minutes; the platform runs the turn server-side and a crash re-dispatch is a lookup, not a second run. |
133
+ | **Autonomous** — a mission step, queue job, cron, or inbound email, with nobody watching | sandbox → `box.driveTurn()`, wrapped here as `driveSandboxTurn` (`/sandbox`), ticked from a durable driver; drop to raw `box.dispatchPrompt({ detach: true })` + `box.findCompletedTurn(turnId, { sessionId })` only when one pass is too coarse. Sandbox 0.37 `driveTurn` uses the message lane and a browser can attach through the session gateway; `runDetachedTurn` (`/chat-routes`) remains the buffer bridge for stream/dispatch detached runs | Workers die in minutes, so the platform runs the turn server-side and a crash re-dispatch is a lookup, not a second run. |
134
134
  | **Eval / CI** — a long-lived harness process | sandbox → `box.streamPrompt()` for a sandboxed harness; agent-runtime `/tool-loop` → `runToolLoop` / `streamToolLoop` for an in-process model turn — `runAppToolLoop` / `streamAppToolLoop` (`/runtime`) are 1:1 aliases of those, not a second implementation | The process outlives the run; durability adds nothing — a failed run is re-run, not resumed. |
135
135
 
136
136
  **2. Assembled or à la carte?** `createChatTurnRoutes` (`/chat-routes`) wires the whole server chat turn — auth, store, streaming, replay, uploads, interactions — over typed seams. Reach for the individual modules (`/stream`, `/chat-store`, `/interactions`) only to compose something the assembled route doesn't cover.
@@ -112,7 +112,7 @@ import {
112
112
  flattenHistory,
113
113
  readSandboxBinaryBytes,
114
114
  statSandboxFileSize
115
- } from "../chunk-T374KO42.js";
115
+ } from "../chunk-LKZBMDYM.js";
116
116
  import "../chunk-MCYJON3F.js";
117
117
  import "../chunk-LWSJK546.js";
118
118
  import "../chunk-P5PIAQVS.js";
@@ -2674,8 +2674,9 @@ async function driveSandboxTurn(shell, box, message, options) {
2674
2674
  ...options.wallCapMs !== void 0 ? { wallCapMs: options.wallCapMs } : {},
2675
2675
  ...options.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {},
2676
2676
  ...options.signal ? { signal: options.signal } : {},
2677
- // A durable caller with a session-gateway consumer can handle these events;
2678
- // callers without one should omit interactions so the run stays unattended.
2677
+ // Sandbox 0.37 drives through the session message lane, so a gateway
2678
+ // consumer can handle these events. Callers without one should omit
2679
+ // interactions so the run stays unattended.
2679
2680
  backend: {
2680
2681
  type: harness,
2681
2682
  profile,
@@ -2833,4 +2834,4 @@ export {
2833
2834
  isTerminalPromptEvent,
2834
2835
  detectInteractiveQuestion
2835
2836
  };
2836
- //# sourceMappingURL=chunk-T374KO42.js.map
2837
+ //# sourceMappingURL=chunk-LKZBMDYM.js.map