@ouispec/agent-worker 0.28.0 → 0.29.0

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.
Files changed (50) hide show
  1. package/README.md +29 -4
  2. package/dist/authz/tool-policy.d.ts +2 -1
  3. package/dist/authz/tool-policy.d.ts.map +1 -1
  4. package/dist/authz/tool-policy.js.map +1 -1
  5. package/dist/capture/capture-tools.d.ts +51 -0
  6. package/dist/capture/capture-tools.d.ts.map +1 -0
  7. package/dist/capture/capture-tools.js +242 -0
  8. package/dist/capture/capture-tools.js.map +1 -0
  9. package/dist/index.d.ts +5 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +4 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/live-call/handler.d.ts +13 -4
  14. package/dist/live-call/handler.d.ts.map +1 -1
  15. package/dist/live-call/handler.js +29 -5
  16. package/dist/live-call/handler.js.map +1 -1
  17. package/dist/live-call/protocol.d.ts +47 -5
  18. package/dist/live-call/protocol.d.ts.map +1 -1
  19. package/dist/live-call/protocol.js +52 -5
  20. package/dist/live-call/protocol.js.map +1 -1
  21. package/dist/orchestrator.d.ts.map +1 -1
  22. package/dist/orchestrator.js +9 -1
  23. package/dist/orchestrator.js.map +1 -1
  24. package/dist/prompt/bearer-route.d.ts +33 -0
  25. package/dist/prompt/bearer-route.d.ts.map +1 -0
  26. package/dist/prompt/bearer-route.js +57 -0
  27. package/dist/prompt/bearer-route.js.map +1 -0
  28. package/dist/prompt/capture.d.ts +132 -0
  29. package/dist/prompt/capture.d.ts.map +1 -0
  30. package/dist/prompt/capture.js +230 -0
  31. package/dist/prompt/capture.js.map +1 -0
  32. package/dist/prompt/escape.d.ts +7 -0
  33. package/dist/prompt/escape.d.ts.map +1 -0
  34. package/dist/prompt/escape.js +9 -0
  35. package/dist/prompt/escape.js.map +1 -0
  36. package/dist/prompt/vision.d.ts +2 -1
  37. package/dist/prompt/vision.d.ts.map +1 -1
  38. package/dist/prompt/vision.js +9 -38
  39. package/dist/prompt/vision.js.map +1 -1
  40. package/dist/runtime/turn-runner.d.ts.map +1 -1
  41. package/dist/runtime/turn-runner.js +13 -0
  42. package/dist/runtime/turn-runner.js.map +1 -1
  43. package/dist/runtime/types.d.ts +10 -0
  44. package/dist/runtime/types.d.ts.map +1 -1
  45. package/dist/tools/types.d.ts +8 -3
  46. package/dist/tools/types.d.ts.map +1 -1
  47. package/dist/tools/types.js.map +1 -1
  48. package/dist/types.d.ts +9 -0
  49. package/dist/types.d.ts.map +1 -1
  50. package/package.json +4 -4
package/README.md CHANGED
@@ -268,7 +268,7 @@ const liveCall = createLiveCallTurnHandler({
268
268
  resolveTurn: async (request, { signal }) => {
269
269
  const conversation = await findConversationByCallRef(request.clientRef);
270
270
  if (!conversation) return null; // answered 404
271
- // What the person said, redacted; for an opening or a glance, the instruction that stands for it.
271
+ // What the person said, redacted; for an opening, a glance or a capture, the instruction that stands for it.
272
272
  const said = request.kind === 'message' ? redactCardNumbers(request.text) : liveCallTurnMessage(request);
273
273
  await storeUserMessage(conversation.id, said, request.input);
274
274
  return {
@@ -310,13 +310,13 @@ process.on('SIGTERM', () => liveCall.close()); // waits for running turns
310
310
  | `sessionId` | The call service's session. |
311
311
  | `clientRef` | Your conversation reference, given to the call service when the call was created. |
312
312
  | `turnId` | Unique per turn; the turn runs under it. |
313
- | `kind` | `message`: the person said `text`. `opening`: the call has just connected, `text` is empty, and the agent greets: the model reads `liveCallOpeningMessage(request)` where the person's words would be (`LIVE_CALL_OPENING_MESSAGE` when no disclosure was sent). `glance`: nobody has spoken for a while and the call service's look noticed something; `text` is empty, `client.vision` carries `remarks` on and the `observation`, and the model reads `LIVE_CALL_GLANCE_MESSAGE` ("Vision"). `liveCallTurnMessage(request)` is what the model reads for any kind. |
313
+ | `kind` | `message`: the person said `text`. `opening`: the call has just connected, `text` is empty, and the agent greets: the model reads `liveCallOpeningMessage(request)` where the person's words would be (`LIVE_CALL_OPENING_MESSAGE` when no disclosure was sent). `glance`: nobody has spoken for a while and the call service's look noticed something; `text` is empty, `client.vision` carries `remarks` on and the `observation`, and the model reads `LIVE_CALL_GLANCE_MESSAGE` ("Vision"). `capture`: something happened in a photo capture; `text` is empty, `client.capture.update` says what, and the model reads `liveCallCaptureMessage(update)` ("Photo captures"). `liveCallTurnMessage(request)` is what the model reads for any kind, and the row to store for it. |
314
314
  | `text` | What the person said, as transcribed; at most 8,000 characters. |
315
315
  | `input` | `{ mode: 'voice', language? }` for what the person said: set as the turn's `context.input`, so the model is told it was transcribed. `{ mode: 'text' }` for a message they typed during the call: read as typed, with no `context.input`. Dropped on an `opening`. |
316
316
  | `output` | `{ mode: 'voice', voiceDirections? }`: set as the turn's `context.output`, so the model writes for the ear, and may use the voice's tags when `voiceDirections: { engine, tags, guidance }` offers them ("What a UI client sends with a turn"). |
317
317
  | `disclosureLine` | On an `opening`: what the call service has just said to the person before the greeting (that they are talking with an AI assistant), as spoken; at most 1,000 characters. The model is told it was said, and greets following on from it without repeating it. Not read on a `message`. |
318
318
  | `supersedes` | Turns this one replaces. Each still running in this process is stopped at once, and the turn's `getHistory` is given them to wait for, as for any superseding message. |
319
- | `client` | `{ ui, vision }`. `ui`: the person's page, when it sent its UI into the call (Closure's `<LiveCall uiContext>`), as its typed turns carry it: `{ buildId?, currentPath?, oui?, uiKnowledge? }`, at most 64 KiB (`LIVE_CALL_LIMITS.clientUiBytes`). Its `oui`, `uiKnowledge` and `currentPath` go on the turn's context under those names, so the turn's UI tools are the page's and its UI actions reach that page through the room, as on a typed turn; a key your target's `context` sets itself is kept. `buildId` stays on `request.client.ui`, for your `resolveTurn` to check against the build you expect. Fields it does not know are read past. Absent, or `ui: null`, for a call with no page (a phone call): the turn has only your context. `vision`: whether and how the character may look at the caller's camera ("Vision"). |
319
+ | `client` | `{ ui, vision, capture }`. `ui`: the person's page, when it sent its UI into the call (Closure's `<LiveCall uiContext>`), as its typed turns carry it: `{ buildId?, currentPath?, oui?, uiKnowledge? }`, at most 64 KiB (`LIVE_CALL_LIMITS.clientUiBytes`). Its `oui`, `uiKnowledge` and `currentPath` go on the turn's context under those names, so the turn's UI tools are the page's and its UI actions reach that page through the room, as on a typed turn; a key your target's `context` sets itself is kept. `buildId` stays on `request.client.ui`, for your `resolveTurn` to check against the build you expect. Fields it does not know are read past. Absent, or `ui: null`, for a call with no page (a phone call): the turn has only your context. `vision`: whether and how the character may look at the caller's camera ("Vision"). `capture`: the session's photo plans, the route the capture tools call, the capture running now and what happened in it ("Photo captures"). |
320
320
 
321
321
  `readLiveCallTurnRequest` reads a body as the handler does, and `LIVE_CALL_LIMITS` holds its limits.
322
322
 
@@ -326,7 +326,7 @@ process.on('SIGTERM', () => liveCall.close()); // waits for running turns
326
326
  |---|---|---|
327
327
  | `text` | `{ text }` | The reply; concatenate the pieces. With `speak: 'all'`, as the model writes it: rounds written between tool calls are separated by a blank line, as in the room. With `final-round`, the holding line and the turn's last round. |
328
328
  | `readback` | `{ approvalId, text, expiresAt }` | The turn stopped at a call that needs approval. `text` is the preview's `spokenReadback` when your `approvals.preview` wrote one, else its `readback`, verbatim; `expiresAt` is ISO 8601. Sent once the turn has ended by itself, after all of its text. A turn that was stopped withdrew its approval, and sends none. |
329
- | `done` | `{ stopReason? }` | The turn is over: `complete`, `awaiting_approval`, `present_options`, `time_limit`, `output_limit` or `step_count` when it ended by itself; `user_stop`, `superseded` or `deadline` when it was stopped. A turn whose reply is nothing (a glance with nothing worth a remark) is `done` alone, with no `text` before it: silence. |
329
+ | `done` | `{ stopReason? }` | The turn is over: `complete`, `awaiting_approval`, `present_options`, `time_limit`, `output_limit` or `step_count` when it ended by itself; `user_stop`, `superseded` or `deadline` when it was stopped. A turn whose reply is nothing (a glance with nothing worth a remark, a capture update not worth a word) is `done` alone, with no `text` before it: silence. |
330
330
  | `error` | `{ code, message }` | The turn failed or did not run: `RATE_LIMIT`, `SERVICE_UNAVAILABLE`, `MODEL_TIMEOUT`, `TURN_TIMEOUT`, `TURN_DEADLINE_EXCEEDED`, `TURN_REFUSED` (your turn record refused it), `TURN_DECLINED` (your `beforeTurn` refused it) or `WORKER_ERROR`. `message` is a fixed line for the code; the cause stays in your logs. |
331
331
 
332
332
  The stream is written from the turn's own events as the room receives them (`TurnHost.observe`): the same text, from the same model call. Before the stream opens, a refusal is a status and `{ error: { code, message } }`: `400 INVALID_REQUEST` naming the field, `401 UNAUTHORIZED`, `404 UNKNOWN_CLIENT_REF`, `405`, `409 TURN_RUNNING`, `413 BODY_TOO_LARGE`, `415`, `500 RESOLVE_FAILED` (your `resolveTurn` threw, or returned a target that is not a turn; nothing ran) and `503 UNAVAILABLE`.
@@ -349,6 +349,31 @@ A **glance** is the call service's look between turns: nobody has spoken for a w
349
349
 
350
350
  The token, a look's question and answer, and the observation are never logged or emitted to the room: the call's events say only that `look` was called, and the turn's log lines carry facts only, `vision: { seeing, remarks, canLook, absent?, observed? }`. Nothing changes for a host: `resolveTurn` sees `request.client.vision` and need not touch it.
351
351
 
352
+ **Photo captures.** A client can define capture plans in the call service: the photos its process needs, such as a trade-in's odometer, VIN and outside, and when its character should offer them. On a call, the character offers a plan when it fits and starts it; Closure's capture agent guides the caller through each photo on their screen, and Closure's checker accepts or rejects every photo. The character never sees a photo and never judges one: everything it learns of a capture is words. The accepted photos and the fields read from them (a VIN, a mileage) reach the client as library assets and the signed `session.capture.ended` webhook, never through this worker.
353
+
354
+ Set `acceptsCapture: true` on your brain endpoint once you run this version: the call service then sends every turn of a session with plans `client.capture`, and sends `capture` turns. A worker before it answers a `capture` turn `400` (`kind must be one of message, opening, glance`), which is why the call service sends neither without the opt-in.
355
+
356
+ ```json
357
+ { "plans": [{ "key": "trade-in-appraisal", "title": "Trade-in photos", "offerWhen": "The caller has a vehicle to trade in and wants a value for it, or asks what their car is worth." }],
358
+ "control": { "url": "https://…/api/v1/sessions/{id}/captures", "token": "lcb1.…", "expiresAt": "2026-11-17T11:16:30.000Z" },
359
+ "active": { "captureId": "5f0c7a1e-…", "plan": "trade-in-appraisal", "status": "active", "step": { "id": "vin", "label": "VIN", "index": 2, "of": 6 } },
360
+ "update": null }
361
+ ```
362
+
363
+ `plans` are the session's, fixed when it started (at most 50; `key` is `^[a-z0-9][a-z0-9-]{0,63}$`, `title` at most 120 characters, `offerWhen` at most 500). `control` is the call service's captures route for the session (`GET {url}/{captureId}` and `POST {url}/{captureId}/stop` are under it) and an `lcb1` token for it, sent only over https (or to this machine), with no query. `active` is the capture running now (`status` `starting`, `awaiting_consent`, `active`, `blocked` or `ending`) or null. `update` is what happened since the brain last heard, in Closure's words; at most 8,000 characters. It is read as strictly as `client.vision`: a wrong field answers `400` naming it, and no refusal repeats the token. The handler sets it as the turn payload's `capture` (`TurnCapture`; `payloadRefusal` checks it), and the worker gives the model:
364
+
365
+ - while there are plans and a `control` route, the **capture tools** (`captureTools`, the SDK's `capture` tool class, `kind: 'backend'`), which call the route with `Authorization: Bearer <token>`:
366
+ - `capture_start({ plan, resumeCaptureId? })` (a `mutate`): `POST {url}` with `{ plan, resumeCaptureId? }`. `plan` is an enum of the session's keys, and the description lists each plan's title and when to offer it, and tells the model to say one short line before it calls ("I’ll send a photo request to your screen now."). `resumeCaptureId` continues an earlier capture of the plan that did not complete;
367
+ - `capture_status({})` (a `view`): `GET {url}/{captureId}`, for the capture running when the turn began or the one it started; with none, it says so without a call;
368
+ - `capture_stop({ reason? })` (a `mutate`): `POST {url}/{captureId}/stop` with `{ reason? }` (at most 200 characters).
369
+
370
+ Each result is `{ captureId, status, outcome?, words }`: the route's `words`, one or two sentences, are what the model says from. A refusal fails with a line chosen by its code, never the route's own words: `CAPTURE_IN_PROGRESS` is "A photo capture is already running; use capture_status.", `RESUME_NOT_ALLOWED` says why by `details.why`, `CAPTURE_AGENT_UNAVAILABLE` gives Closure's `details.words` (its offer included), and `SESSION_NOT_LIVE`, `NO_ROOM_AGENT`, `CAPTURE_PLAN_NOT_FOUND`, `RATE_LIMITED`, `401`/`403`, a timeout (20 s) or an expired token each say what to do instead. No tool returns a picture. A host tool of the same name gives way to them; a tool policy that admits by name should admit the `capture` class;
371
+ - one line after the conversation's cache breakpoint: "You can ask the caller for photos with `capture_start` when a plan below fits. Closure’s checker accepts or rejects every photo; you never judge a photo, and you never use `look` for one. While a capture runs you receive capture updates: turn each into one or two short, natural sentences in the caller’s language, and never read out a code. When a capture ends without completing, offer what its update says to offer." (`CAPTURE_WHEN`, the clause Closure's own brain is given), that a plan is offered only when its "offer it when" applies, that it never sees a photo and never claims to (`CAPTURE_NEVER`), the plans, and where the running capture stands. Without a `control` route the tools are not offered, and the line says photos cannot be started from this turn.
372
+
373
+ A **capture** turn passes on what happened in a capture: consent asked, given or declined, the camera, each step, a hint, a photo accepted or rejected, a step skipped or failed, the end. `text` is empty and `client.capture.update` is the words, for example `Odometer accepted: 48,212 mi.` The model reads `liveCallCaptureMessage(update)` where the person's words would be: the update in a `<capture_update>` tag, as data, and the instruction to say it in one or two short sentences, or to say nothing, and the stream is `done` with no `text` event. Every capture that ends without completing (declined, unanswered, the camera blocked or missing, stopped, out of retries, timed out, the guide or the checker unavailable) ends its words with `Offer: …`, the plan's own offer (a link to finish on the caller's phone, say), and the model is told to say what is missing without pushing and to make that offer. Store `liveCallTurnMessage(request)` for the turn, as for an opening: it is a readable row with what happened, so later turns know which photos were taken. An update can also ride a `message` turn (the caller spoke first): it then reaches the model in the turn's capture line, for that turn only, and the person's message is stored as it is. A capture turn without an update answers `400`.
374
+
375
+ The token is never logged or emitted, and neither are an update's words: the turn's log lines carry facts only, `capture: { plans, canStart, active?, step?, update? }`. Nothing changes for a host but the opt-in and the stored row: `resolveTurn` sees `request.client.capture` and need not touch it.
376
+
352
377
  **Barge-in.** When the person speaks over the reply, the call service closes the connection. The turn is stopped as a superseding message stops it (`stopReason: 'superseded'`): what it had produced is stored with the mark and announced to the room, and the next request names it in `supersedes`. A stop asked for through the realtime server (the person's Stop on a page) is heard too, and that stream ends with `done`.
353
378
 
354
379
  Keep the turn's deadline (`turnDeadlineMs`) and the model to a call's pace: a voice turn waits on its first `text` event, so run it on the container adapter, never behind a queue.
@@ -31,7 +31,8 @@ export interface ToolPolicyContext {
31
31
  toolKind: 'ui' | 'backend';
32
32
  /**
33
33
  * The SDK's class for a tool it owns: `attachment` for the attachment
34
- * tools, `vision` for `look`. A policy that admits by name should admit the
34
+ * tools, `vision` for `look`, `capture` for the capture tools. A policy that
35
+ * admits by name should admit the
35
36
  * class too, so a tool the SDK adds to it later needs no change.
36
37
  */
37
38
  toolClass?: SdkToolClass;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-policy.d.ts","sourceRoot":"","sources":["../../src/authz/tool-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;;;GAOG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,mGAAmG;IACnG,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,kFAAkF;IAClF,WAAW,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GA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AE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAE/B,CAAC;AAEF;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAU7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-policy.js","sourceRoot":"","sources":["../../src/authz/tool-policy.ts"],"names":[],"mappings":"AAiEA;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAe;IAC3C,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,OAAgB,EAAE,CAAC;CACrD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAkB,EAClB,GAAsB;IAEtB,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC;QAChF,OAAO;YACL,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,2CAA2C,OAAO,EAAE;SAC7D,CAAC;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"tool-policy.js","sourceRoot":"","sources":["../../src/authz/tool-policy.ts"],"names":[],"mappings":"AAkEA;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAe;IAC3C,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,OAAgB,EAAE,CAAC;CACrD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAkB,EAClB,GAAsB;IAEtB,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC;QAChF,OAAO;YACL,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,2CAA2C,OAAO,EAAE;SAC7D,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The capture tools: the character asks the caller for the photos a client's
3
+ * plan needs.
4
+ *
5
+ * The turn's `client.capture.control` names studio-api's captures route for
6
+ * the session and an `lcb1` token for it. The tools call it as the look tool
7
+ * calls its route:
8
+ *
9
+ * - `capture_start({ plan, resumeCaptureId? })`: `POST {url}`
10
+ * `{ plan, resumeCaptureId? }`. Closure's capture agent joins the call, the
11
+ * caller's screen asks for consent, and the capture's updates reach the
12
+ * brain later, as words (`capture` turns).
13
+ * - `capture_status({})`: `GET {url}/{captureId}`, for the capture
14
+ * running now or the one this turn started.
15
+ * - `capture_stop({ reason? })`: `POST {url}/{captureId}/stop`.
16
+ *
17
+ * Each result is the route's answer's `words` (one or two sentences) with the
18
+ * capture's id and status. A refusal fails with a line chosen by its code,
19
+ * never the route's own message. No tool returns a picture, and the token is
20
+ * never logged or emitted.
21
+ */
22
+ import type { RegisteredTool } from '../tools/types.js';
23
+ import { type TurnCapture } from '../prompt/capture.js';
24
+ export declare const CAPTURE_START_TOOL = "capture_start";
25
+ export declare const CAPTURE_STATUS_TOOL = "capture_status";
26
+ export declare const CAPTURE_STOP_TOOL = "capture_stop";
27
+ /** The capture tools' names, in the order they are declared. */
28
+ export declare const CAPTURE_TOOLS: readonly ["capture_start", "capture_status", "capture_stop"];
29
+ /** The SDK's class for the capture tools, as a host's tool policy sees it. */
30
+ export declare const CAPTURE_TOOL_CLASS = "capture";
31
+ /** Limits on a capture call. */
32
+ export declare const CAPTURE_TOOL_LIMITS: {
33
+ /** The longest `reason` a stop gives. */
34
+ readonly reasonChars: 200;
35
+ /** The longest `resumeCaptureId`. */
36
+ readonly captureIdChars: 128;
37
+ /** The longest words the tools give the model. */
38
+ readonly wordsChars: 2000;
39
+ /** How long a call may take: a start dispatches Closure's capture agent. */
40
+ readonly timeoutMs: 20000;
41
+ };
42
+ /**
43
+ * Builds the turn's capture tools, bound to its control route and token: none
44
+ * unless the turn has plans and a route (`canCapture`). The three share what
45
+ * the turn knows of the running capture, so a capture started in this turn
46
+ * can be checked and stopped in it.
47
+ */
48
+ export declare function captureTools(capture: TurnCapture | null | undefined, options?: {
49
+ fetch?: typeof fetch;
50
+ }): RegisteredTool[];
51
+ //# sourceMappingURL=capture-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-tools.d.ts","sourceRoot":"","sources":["../../src/capture/capture-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,cAAc,EAA6C,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAmC,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEzF,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAClD,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,gEAAgE;AAChE,eAAO,MAAM,aAAa,8DAAwE,CAAC;AAEnG,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,gCAAgC;AAChC,eAAO,MAAM,mBAAmB;IAC9B,yCAAyC;;IAEzC,qCAAqC;;IAErC,kDAAkD;;IAElD,4EAA4E;;CAEpE,CAAC;AAwGX;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CAAO,GAAG,cAAc,EAAE,CAiJ9H"}
@@ -0,0 +1,242 @@
1
+ import { canCapture } from '../prompt/capture.js';
2
+ export const CAPTURE_START_TOOL = 'capture_start';
3
+ export const CAPTURE_STATUS_TOOL = 'capture_status';
4
+ export const CAPTURE_STOP_TOOL = 'capture_stop';
5
+ /** The capture tools' names, in the order they are declared. */
6
+ export const CAPTURE_TOOLS = [CAPTURE_START_TOOL, CAPTURE_STATUS_TOOL, CAPTURE_STOP_TOOL];
7
+ /** The SDK's class for the capture tools, as a host's tool policy sees it. */
8
+ export const CAPTURE_TOOL_CLASS = 'capture';
9
+ /** Limits on a capture call. */
10
+ export const CAPTURE_TOOL_LIMITS = {
11
+ /** The longest `reason` a stop gives. */
12
+ reasonChars: 200,
13
+ /** The longest `resumeCaptureId`. */
14
+ captureIdChars: 128,
15
+ /** The longest words the tools give the model. */
16
+ wordsChars: 2_000,
17
+ /** How long a call may take: a start dispatches Closure's capture agent. */
18
+ timeoutMs: 20_000,
19
+ };
20
+ const CAPTURE_ID = new RegExp(`^[A-Za-z0-9][A-Za-z0-9._:-]{0,${CAPTURE_TOOL_LIMITS.captureIdChars - 1}}$`);
21
+ const fail = (error) => ({ success: false, error });
22
+ function isPlainObject(value) {
23
+ return !!value && typeof value === 'object' && !Array.isArray(value);
24
+ }
25
+ /** Words the model is given: trimmed and bounded. */
26
+ function wordsOf(value) {
27
+ if (typeof value !== 'string' || !value.trim())
28
+ return null;
29
+ return value.trim().slice(0, CAPTURE_TOOL_LIMITS.wordsChars);
30
+ }
31
+ function readAnswer(body) {
32
+ if (!isPlainObject(body))
33
+ return null;
34
+ const words = wordsOf(body.words);
35
+ if (typeof body.captureId !== 'string' || !CAPTURE_ID.test(body.captureId) || typeof body.status !== 'string' || !words)
36
+ return null;
37
+ return { captureId: body.captureId, status: body.status, outcome: typeof body.outcome === 'string' ? body.outcome : null, words };
38
+ }
39
+ function readRefusal(status, body) {
40
+ const outer = isPlainObject(body) ? body : {};
41
+ const inner = isPlainObject(outer.error) ? outer.error : outer;
42
+ return {
43
+ status,
44
+ code: typeof inner.code === 'string' ? inner.code : null,
45
+ details: isPlainObject(inner.details) ? inner.details : {},
46
+ };
47
+ }
48
+ /** Why a resume was refused (`RESUME_NOT_ALLOWED`'s `details.why`), and what to do. */
49
+ const RESUME_REFUSED = {
50
+ not_found: 'That earlier photo capture cannot be found. Start the plan again without resumeCaptureId if the caller agrees.',
51
+ completed: 'That earlier photo capture already completed: nothing is missing from it.',
52
+ purged: 'That earlier photo capture’s photos have been deleted. Start the plan again without resumeCaptureId if the caller agrees.',
53
+ other_plan: 'That earlier photo capture is of another plan. Start this plan without resumeCaptureId, or resume with the plan it was.',
54
+ other_visitor: 'That earlier photo capture is someone else’s. Start the plan again without resumeCaptureId if the caller agrees.',
55
+ };
56
+ /** What a failed call says to the model, by tool. */
57
+ const FAILED = {
58
+ capture_start: 'Starting the photos failed just now. Go on without them; you may offer them again in a little while.',
59
+ capture_status: 'Checking the photos failed just now. Go on from the latest capture update you have.',
60
+ capture_stop: 'Stopping the photos failed just now. Tell the caller they can tap Stop on their screen.',
61
+ };
62
+ /** What the model is told of a refusal: a line chosen by its code (else its status), never the route's own words. */
63
+ function refusalLine(tool, refusal) {
64
+ switch (refusal.code) {
65
+ case 'SESSION_NOT_LIVE':
66
+ return 'The call is no longer live, so no photos can be taken on it.';
67
+ case 'NO_ROOM_AGENT':
68
+ return 'Photos cannot be taken on this call. Go on without them.';
69
+ case 'CAPTURE_PLAN_NOT_FOUND':
70
+ return 'That photo plan is not offered on this call. Go on without it.';
71
+ case 'CAPTURE_IN_PROGRESS':
72
+ return 'A photo capture is already running; use capture_status.';
73
+ case 'RESUME_NOT_ALLOWED': {
74
+ const why = refusal.details.why;
75
+ return (typeof why === 'string' && RESUME_REFUSED[why]) || RESUME_REFUSED.not_found;
76
+ }
77
+ case 'RATE_LIMITED':
78
+ return 'Photos have been started too often on this call. Do not offer them again for a few minutes.';
79
+ case 'CAPTURE_AGENT_UNAVAILABLE':
80
+ // The capture was recorded and ended `failed`; Closure composed its words, offer included.
81
+ return wordsOf(refusal.details.words) ?? 'The photo guide could not join the call. Go on without photos for now.';
82
+ case 'CAPTURE_TOKEN_WRONG_SESSION':
83
+ return 'Photos are not allowed on this call right now. Go on without them.';
84
+ }
85
+ switch (refusal.status) {
86
+ case 401:
87
+ case 403:
88
+ return 'Photos are not allowed on this call right now. Go on without them.';
89
+ case 404:
90
+ return tool === CAPTURE_START_TOOL ? 'That photo plan is not offered on this call. Go on without it.' : 'That photo capture cannot be found. It may have ended.';
91
+ case 409:
92
+ return tool === CAPTURE_START_TOOL ? 'The call is no longer live, so no photos can be taken on it.' : 'That photo capture has already ended.';
93
+ case 429:
94
+ return 'Photos have been started too often on this call. Do not offer them again for a few minutes.';
95
+ default:
96
+ return FAILED[tool];
97
+ }
98
+ }
99
+ /**
100
+ * Builds the turn's capture tools, bound to its control route and token: none
101
+ * unless the turn has plans and a route (`canCapture`). The three share what
102
+ * the turn knows of the running capture, so a capture started in this turn
103
+ * can be checked and stopped in it.
104
+ */
105
+ export function captureTools(capture, options = {}) {
106
+ if (!canCapture(capture))
107
+ return [];
108
+ const send = options.fetch ?? fetch;
109
+ const control = capture.control;
110
+ const keys = capture.plans.map((p) => p.key);
111
+ /** The capture the turn knows of: the one running when it began, or the one it started. */
112
+ let current = capture.active?.captureId ?? null;
113
+ /** Calls the route; a failure is the model's line, a stop of the turn is the orchestrator's. */
114
+ async function call(tool, ctx, method, path, body) {
115
+ if (Date.parse(control.expiresAt) <= Date.now()) {
116
+ return { ok: false, result: fail('Photos are no longer available on this call right now. Go on without them.') };
117
+ }
118
+ const timeout = AbortSignal.timeout(CAPTURE_TOOL_LIMITS.timeoutMs);
119
+ const signal = ctx.abortSignal ? AbortSignal.any([ctx.abortSignal, timeout]) : timeout;
120
+ let res;
121
+ try {
122
+ res = await send(`${control.url}${path}`, {
123
+ method,
124
+ headers: {
125
+ authorization: `Bearer ${control.token}`,
126
+ accept: 'application/json',
127
+ ...(body ? { 'content-type': 'application/json' } : {}),
128
+ },
129
+ ...(body ? { body: JSON.stringify(body) } : {}),
130
+ signal,
131
+ redirect: 'error',
132
+ });
133
+ }
134
+ catch (err) {
135
+ // The turn's stop is said by the orchestrator; a timeout or a lost connection is said here.
136
+ if (ctx.abortSignal?.aborted)
137
+ throw err;
138
+ return { ok: false, result: fail(FAILED[tool]) };
139
+ }
140
+ // A body that is not JSON reads as no answer: a failure, or a refusal known only by its status.
141
+ const parsed = await res.json().catch(() => null);
142
+ if (!res.ok) {
143
+ const refusal = readRefusal(res.status, parsed);
144
+ // The capture that is already running is the one to check and stop.
145
+ if (refusal.code === 'CAPTURE_IN_PROGRESS' && typeof refusal.details.captureId === 'string' && CAPTURE_ID.test(refusal.details.captureId)) {
146
+ current = refusal.details.captureId;
147
+ }
148
+ return { ok: false, result: fail(refusalLine(tool, refusal)) };
149
+ }
150
+ const answer = readAnswer(parsed);
151
+ if (!answer)
152
+ return { ok: false, result: fail(FAILED[tool]) };
153
+ return { ok: true, answer };
154
+ }
155
+ const resultOf = (answer) => ({
156
+ success: true,
157
+ data: { captureId: answer.captureId, status: answer.status, ...(answer.outcome ? { outcome: answer.outcome } : {}), words: answer.words },
158
+ });
159
+ const plans = capture.plans.map((p) => `- "${p.key}" (${p.title}): offer it when ${p.offerWhen}`).join('\n');
160
+ const start = {
161
+ name: CAPTURE_START_TOOL,
162
+ toolClass: CAPTURE_TOOL_CLASS,
163
+ kind: 'backend',
164
+ effect: 'mutate',
165
+ description: 'Opens a photo capture on the caller’s screen: they are asked to agree, then guided through each photo the plan needs, and Closure’s checker ' +
166
+ 'accepts or rejects every photo. You never see or judge the photos: what happens reaches you later as capture updates, in words. ' +
167
+ 'Offer a plan only when its “offer it when” applies, and call this once the caller agrees to take photos. Before you call it, say one short ' +
168
+ 'line so they know a request is coming to their screen ("I’ll send a photo request to your screen now."). ' +
169
+ '`resumeCaptureId` continues an earlier capture of the same plan that did not complete: only the photos it is missing are asked for.\n' +
170
+ `Plans:\n${plans}`,
171
+ inputSchema: {
172
+ type: 'object',
173
+ properties: {
174
+ plan: { type: 'string', enum: keys, description: 'Which capture plan to open.' },
175
+ resumeCaptureId: {
176
+ type: 'string',
177
+ maxLength: CAPTURE_TOOL_LIMITS.captureIdChars,
178
+ description: 'An earlier capture of the same plan to continue (only steps it is missing are asked).',
179
+ },
180
+ },
181
+ required: ['plan'],
182
+ additionalProperties: false,
183
+ },
184
+ execute: async (input, ctx) => {
185
+ const plan = input.plan;
186
+ if (typeof plan !== 'string' || !keys.includes(plan)) {
187
+ return fail(`"plan" is one of this call’s photo plans: ${keys.map((k) => `"${k}"`).join(', ')}.`);
188
+ }
189
+ const resume = input.resumeCaptureId;
190
+ if (resume !== undefined && !(typeof resume === 'string' && CAPTURE_ID.test(resume))) {
191
+ return fail('"resumeCaptureId" is the captureId of an earlier capture of this plan, as a capture result gave it.');
192
+ }
193
+ const sent = await call(CAPTURE_START_TOOL, ctx, 'POST', '', { plan, ...(resume !== undefined ? { resumeCaptureId: resume } : {}) });
194
+ if (!sent.ok)
195
+ return sent.result;
196
+ current = sent.answer.captureId;
197
+ return resultOf(sent.answer);
198
+ },
199
+ };
200
+ const status = {
201
+ name: CAPTURE_STATUS_TOOL,
202
+ toolClass: CAPTURE_TOOL_CLASS,
203
+ kind: 'backend',
204
+ effect: 'view',
205
+ description: 'Says where the photo capture running on this call stands, in words: its step, what has been accepted, and what is missing. ' +
206
+ 'Use it when the caller asks how the photos are going, or before you start photos again. It never returns a photo.',
207
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false, sideEffects: false },
208
+ execute: async (_input, ctx) => {
209
+ if (!current)
210
+ return { success: true, data: { running: false, words: 'No photo capture is running on this call.' } };
211
+ const read = await call(CAPTURE_STATUS_TOOL, ctx, 'GET', `/${encodeURIComponent(current)}`);
212
+ return read.ok ? resultOf(read.answer) : read.result;
213
+ },
214
+ };
215
+ const stop = {
216
+ name: CAPTURE_STOP_TOOL,
217
+ toolClass: CAPTURE_TOOL_CLASS,
218
+ kind: 'backend',
219
+ effect: 'mutate',
220
+ description: 'Stops the photo capture running on this call. Photos already accepted are kept; the rest are missing, and the capture can be resumed later. ' +
221
+ 'Use it only when the caller wants to stop, or the conversation has moved on for good; the caller can also tap Stop on their screen. ' +
222
+ '`reason`: why, in a few words.',
223
+ inputSchema: {
224
+ type: 'object',
225
+ properties: { reason: { type: 'string', maxLength: CAPTURE_TOOL_LIMITS.reasonChars, description: 'Why the capture is stopped, in a few words.' } },
226
+ additionalProperties: false,
227
+ },
228
+ execute: async (input, ctx) => {
229
+ const reason = input.reason;
230
+ if (reason !== undefined && !(typeof reason === 'string' && reason.trim().length <= CAPTURE_TOOL_LIMITS.reasonChars)) {
231
+ return fail(`"reason" is text of at most ${CAPTURE_TOOL_LIMITS.reasonChars} characters.`);
232
+ }
233
+ if (!current)
234
+ return fail('No photo capture is running on this call, so there is nothing to stop.');
235
+ const said = typeof reason === 'string' && reason.trim() ? { reason: reason.trim() } : {};
236
+ const stopped = await call(CAPTURE_STOP_TOOL, ctx, 'POST', `/${encodeURIComponent(current)}/stop`, said);
237
+ return stopped.ok ? resultOf(stopped.answer) : stopped.result;
238
+ },
239
+ };
240
+ return [start, status, stop];
241
+ }
242
+ //# sourceMappingURL=capture-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-tools.js","sourceRoot":"","sources":["../../src/capture/capture-tools.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAyC,MAAM,sBAAsB,CAAC;AAEzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAClD,MAAM,CAAC,MAAM,mBAA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AAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC5B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,IAAI,mBAAmB,CAAC,WAAW,CAAC,EAAE,CAAC;gBACrH,OAAO,IAAI,CAAC,+BAA+B,mBAAmB,CAAC,WAAW,cAAc,CAAC,CAAC;YAC5F,CAAC;YACD,IAAI,CAAC,OAAO;gBAAE,OAAO,IAAI,CAAC,wEAAwE,CAAC,CAAC;YACpG,MAAM,IAAI,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1F,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzG,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QAChE,CAAC;KACF,CAAC;IAEF,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -82,14 +82,17 @@ export { createLambdaAgentHandler } from './lambda/handler.js';
82
82
  export { startContainerAgentWorker, DEFAULT_LIVE_CALL_PATH } from './container/server.js';
83
83
  export type { ContainerAgentConfig, ContainerAgentWorker, ContainerLiveCallRoute } from './container/server.js';
84
84
  export { createLiveCallTurnHandler, liveCallTurnMessage, LIVE_CALL_SPEECH, LIVE_CALL_CHANNEL, LIVE_CALL_APPROVAL_CHANNELS, LIVE_CALL_MAX_BODY_BYTES, } from './live-call/handler.js';
85
- export type { LiveCallSpeech, LiveCallApprovalChannel, LiveCallTurnHandler, LiveCallTurnHandlerConfig, LiveCallTurnOptions, LiveCallTurnTarget, LiveCallTurnCallContext, } from './live-call/handler.js';
86
- export { readLiveCallTurnRequest, liveCallError, LIVE_CALL_TURN_KINDS, LIVE_CALL_OPENING_MESSAGE, LIVE_CALL_GLANCE_MESSAGE, liveCallOpeningMessage, LIVE_CALL_TYPED_INPUT_MODE, LIVE_CALL_LIMITS, LIVE_CALL_ERROR_MESSAGES, } from './live-call/protocol.js';
85
+ export type { LiveCallSpeech, LiveCallApprovalChannel, LiveCallTurnHandler, LiveCallTurnHandlerConfig, LiveCallTurnOptions, LiveCallTurnTarget, LiveCallTurnCallContext, LiveCallTurnMessageSource, } from './live-call/handler.js';
86
+ export { readLiveCallTurnRequest, liveCallError, LIVE_CALL_TURN_KINDS, LIVE_CALL_OPENING_MESSAGE, LIVE_CALL_GLANCE_MESSAGE, liveCallCaptureMessage, liveCallOpeningMessage, LIVE_CALL_TYPED_INPUT_MODE, LIVE_CALL_LIMITS, LIVE_CALL_ERROR_MESSAGES, } from './live-call/protocol.js';
87
87
  export type { LiveCallTurnKind, LiveCallTurnRequest, LiveCallStreamEvents, LiveCallStreamEventName, LiveCallRequestReading, LiveCallClient, LiveCallClientUi, } from './live-call/protocol.js';
88
88
  export { DEFAULT_KEEP_ALIVE_MS as LIVE_CALL_KEEP_ALIVE_MS } from './live-call/event-stream.js';
89
89
  export { readTurnVision, visionText, visionFacts, VISION_ABSENCES, VISION_LIMITS, LOOK_WHEN } from './prompt/vision.js';
90
90
  export type { TurnVision, VisionLook, VisionAbsence } from './prompt/vision.js';
91
91
  export { lookTool, LOOK_TOOL, LOOK_LIMITS, LOOK_ABSENCES, VISION_TOOL_CLASS } from './vision/look-tool.js';
92
92
  export type { LookAbsence } from './vision/look-tool.js';
93
+ export { readTurnCapture, captureText, captureFacts, canCapture, CAPTURE_LIMITS, CAPTURE_WHEN, CAPTURE_NEVER } from './prompt/capture.js';
94
+ export type { TurnCapture, CapturePlanOffer, CaptureControl, CaptureActive, CaptureActiveStep } from './prompt/capture.js';
95
+ export { captureTools, CAPTURE_START_TOOL, CAPTURE_STATUS_TOOL, CAPTURE_STOP_TOOL, CAPTURE_TOOLS, CAPTURE_TOOL_CLASS, CAPTURE_TOOL_LIMITS, } from './capture/capture-tools.js';
93
96
  export { buildAgentSystemPrompt } from './prompt/index.js';
94
97
  export type { AgentPersonaConfig, AgentKnowledgeEntry, AgentWorkflow, AgentFewShotExample, AgentPersonaOverrides, PromptBuildContext, CommunicationStyle, } from './prompt/index.js';
95
98
  export { getBaseRules, getCommunicationRules, getToolStrategyRules, getUIControlRules } from './prompt/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACxJ,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAClI,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,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,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC3H,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -66,11 +66,14 @@ export { startContainerAgentWorker, DEFAULT_LIVE_CALL_PATH } from './container/s
66
66
  // Live calls: the call service's turns, answered by the product's own agent as
67
67
  // a server-sent event stream, while the turn streams to its room as any turn does.
68
68
  export { createLiveCallTurnHandler, liveCallTurnMessage, LIVE_CALL_SPEECH, LIVE_CALL_CHANNEL, LIVE_CALL_APPROVAL_CHANNELS, LIVE_CALL_MAX_BODY_BYTES, } from './live-call/handler.js';
69
- export { readLiveCallTurnRequest, liveCallError, LIVE_CALL_TURN_KINDS, LIVE_CALL_OPENING_MESSAGE, LIVE_CALL_GLANCE_MESSAGE, liveCallOpeningMessage, LIVE_CALL_TYPED_INPUT_MODE, LIVE_CALL_LIMITS, LIVE_CALL_ERROR_MESSAGES, } from './live-call/protocol.js';
69
+ export { readLiveCallTurnRequest, liveCallError, LIVE_CALL_TURN_KINDS, LIVE_CALL_OPENING_MESSAGE, LIVE_CALL_GLANCE_MESSAGE, liveCallCaptureMessage, liveCallOpeningMessage, LIVE_CALL_TYPED_INPUT_MODE, LIVE_CALL_LIMITS, LIVE_CALL_ERROR_MESSAGES, } from './live-call/protocol.js';
70
70
  export { DEFAULT_KEEP_ALIVE_MS as LIVE_CALL_KEEP_ALIVE_MS } from './live-call/event-stream.js';
71
71
  // Whether the model may look at the person's camera on a turn: read, and told to the model; and the look itself.
72
72
  export { readTurnVision, visionText, visionFacts, VISION_ABSENCES, VISION_LIMITS, LOOK_WHEN } from './prompt/vision.js';
73
73
  export { lookTool, LOOK_TOOL, LOOK_LIMITS, LOOK_ABSENCES, VISION_TOOL_CLASS } from './vision/look-tool.js';
74
+ // A client's photo captures on a call: read, told to the model, and the tools that start, read and stop them.
75
+ export { readTurnCapture, captureText, captureFacts, canCapture, CAPTURE_LIMITS, CAPTURE_WHEN, CAPTURE_NEVER } from './prompt/capture.js';
76
+ export { captureTools, CAPTURE_START_TOOL, CAPTURE_STATUS_TOOL, CAPTURE_STOP_TOOL, CAPTURE_TOOLS, CAPTURE_TOOL_CLASS, CAPTURE_TOOL_LIMITS, } from './capture/capture-tools.js';
74
77
  // Prompt Framework
75
78
  export { buildAgentSystemPrompt } from './prompt/index.js';
76
79
  export { getBaseRules, getCommunicationRules, getToolStrategyRules, getUIControlRules } from './prompt/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,oDAAoD;AACpD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EA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,EAAE,MAAM,6BAA6B,CAAC;AAC/F,iHAAiH;AACjH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE3G,8GAA8G;AAC9G,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE1I,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,mBAAmB;AACnB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAU3D,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -3,6 +3,7 @@ import { type ApprovalContinuation } from '@ouispec/agent-core';
3
3
  import { type AgentTurnRunner, type TurnOutcome } from '../runtime/turn-runner.js';
4
4
  import { type TurnSlots } from '../runtime/turn-slots.js';
5
5
  import { type LiveCallTurnRequest } from './protocol.js';
6
+ import { type TurnCapture } from '../prompt/capture.js';
6
7
  /** Who and where a live-call turn is, in the product: what the host resolves a call's `clientRef` to. */
7
8
  export interface LiveCallTurnTarget {
8
9
  /** The product's conversation: the call is one more way to reach it. */
@@ -171,13 +172,21 @@ export declare function createLiveCallTurnHandler(config: LiveCallTurnHandlerCon
171
172
  * shares that host's runtime and slots.
172
173
  */
173
174
  export declare function liveCallRoute(options: LiveCallTurnOptions, host: LiveCallRouteHost): (req: IncomingMessage, res: ServerResponse) => void;
175
+ /** What of a request its turn's message is made from. */
176
+ export type LiveCallTurnMessageSource = Pick<LiveCallTurnRequest, 'kind' | 'text' | 'disclosureLine'> & {
177
+ /** On a `capture` turn, its `client.capture.update` is the message. */
178
+ client?: {
179
+ capture?: Pick<TurnCapture, 'update'> | null;
180
+ } | null;
181
+ };
174
182
  /**
175
183
  * What the model reads as the person's message, unless the host's target
176
- * gives its own `content`: what they said, or for an `opening` and a `glance`
177
- * the instruction that stands in for it. A host that stores the person's
178
- * messages stores the same.
184
+ * gives its own `content`: what they said, or for an `opening`, a `glance` and
185
+ * a `capture` the instruction that stands in for it (a capture's carries what
186
+ * happened, `liveCallCaptureMessage(update)`). A host that stores the person's
187
+ * messages stores the same, so its history has a readable row for each turn.
179
188
  */
180
- export declare function liveCallTurnMessage(request: Pick<LiveCallTurnRequest, 'kind' | 'text' | 'disclosureLine'>): string;
189
+ export declare function liveCallTurnMessage(request: LiveCallTurnMessageSource): string;
181
190
  /** The channel the live-call handler's turns run on, as the host's hooks are told. */
182
191
  export declare const LIVE_CALL_CHANNEL = "live-call";
183
192
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/live-call/handler.ts"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAKL,KAAK,oBAAoB,EAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAkB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAInG,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAI3E,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAGvB,yGAAyG;AACzG,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,cAAc,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,kHAAkH;IAClH,UAAU,EAAE,MAA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