@ouispec/agent-worker 0.12.2 → 0.13.1
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 +11 -10
- package/dist/approvals/client.d.ts +2 -2
- package/dist/approvals/continuation.d.ts +2 -2
- package/dist/approvals/preview.d.ts +1 -1
- package/dist/approvals/preview.js +1 -1
- package/dist/approvals/requirement.js +1 -1
- package/dist/attachments/content.d.ts +2 -2
- package/dist/attachments/guard.js +1 -1
- package/dist/attachments/limits.d.ts +2 -2
- package/dist/attachments/limits.d.ts.map +1 -1
- package/dist/attachments/limits.js +2 -2
- package/dist/attachments/limits.js.map +1 -1
- package/dist/attachments/store.d.ts +3 -3
- package/dist/attachments/store.d.ts.map +1 -1
- package/dist/attachments/tools.js +2 -2
- package/dist/attachments/tools.js.map +1 -1
- package/dist/authz/tool-policy.d.ts +4 -4
- package/dist/authz/tool-policy.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/model.d.ts +1 -1
- package/dist/openapi/executor.d.ts +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +1 -1
- package/dist/openapi/loader.d.ts +4 -4
- package/dist/openapi/loader.js +7 -7
- package/dist/openapi/loader.js.map +1 -1
- package/dist/openapi/x-agent.d.ts +2 -2
- package/dist/openapi/x-agent.js +2 -2
- package/dist/orchestrator.d.ts +1 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +89 -56
- package/dist/orchestrator.js.map +1 -1
- package/dist/prompt/rules/ui-control.d.ts +3 -3
- package/dist/prompt/rules/ui-control.js +3 -3
- package/dist/prompt/spoken-input.d.ts +1 -1
- package/dist/prompt/spoken-input.js +1 -1
- package/dist/runtime/config.js +1 -1
- package/dist/runtime/turn-runner.d.ts +2 -2
- package/dist/runtime/turn-runner.d.ts.map +1 -1
- package/dist/runtime/turn-runner.js +6 -5
- package/dist/runtime/turn-runner.js.map +1 -1
- package/dist/runtime/types.d.ts +21 -15
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/stop/partial.d.ts +1 -1
- package/dist/stop/partial.js +1 -1
- package/dist/stop/results.d.ts +1 -1
- package/dist/stop/turn-stop.d.ts +3 -3
- package/dist/stop/turn-stop.d.ts.map +1 -1
- package/dist/stop/turn-stop.js +1 -1
- package/dist/stop/turn-stop.js.map +1 -1
- package/dist/testing/desk-events.d.ts +1 -1
- package/dist/testing/desk-events.js +1 -1
- package/dist/time-hand-back.d.ts +49 -0
- package/dist/time-hand-back.d.ts.map +1 -0
- package/dist/time-hand-back.js +49 -0
- package/dist/time-hand-back.js.map +1 -0
- package/dist/tools/async-binding.d.ts +1 -1
- package/dist/tools/builtin-tools.d.ts +3 -3
- package/dist/tools/entity-tools.d.ts.map +1 -1
- package/dist/tools/entity-tools.js +0 -1
- package/dist/tools/entity-tools.js.map +1 -1
- package/dist/tools/load-all-tools.d.ts.map +1 -1
- package/dist/tools/load-all-tools.js +0 -1
- package/dist/tools/load-all-tools.js.map +1 -1
- package/dist/tools/schema-loader.d.ts.map +1 -1
- package/dist/tools/schema-loader.js +1 -2
- package/dist/tools/schema-loader.js.map +1 -1
- package/dist/tools/types.d.ts +9 -9
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/turn-ledger.d.ts +1 -1
- package/dist/turn-ledger.js +1 -1
- package/dist/types.d.ts +21 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/answer-image.d.ts +1 -1
- package/dist/ui/answer-image.js +1 -1
- package/dist/ui/channel.d.ts +1 -1
- package/dist/ui/knowledge.d.ts +2 -2
- package/dist/ui/observations.d.ts +2 -2
- package/dist/ui/observations.js +2 -2
- package/dist/ui/outline.d.ts +1 -1
- package/dist/ui/outline.js +1 -1
- package/dist/ui/page-index.d.ts +1 -1
- package/dist/ui/page-index.js +1 -1
- package/dist/ui/snapshot.d.ts +2 -2
- package/dist/ui/snapshot.d.ts.map +1 -1
- package/dist/ui/ui-tools.d.ts +1 -1
- package/dist/ui/ui-tools.js +8 -8
- package/dist/ui/ui-tools.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/openapi/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAqB,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAuB,MAAM,2BAA2B,CAAC;AAElI,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,aAAa,GASd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAsD,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAsB,MAAM,cAAc,CAAC;AA+CrE,uDAAuD;AACvD,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAC1C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC;AAExF,SAAS,iBAAiB,CAAC,MAAkB,EAAE,IAAY,EAAE,WAAoB;IAC/E,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACpF,CAAC;AAED,SAAS,aAAa,CAAC,OAA4C;IACjE,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gDAAgD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChH,CAAC;AAED,iHAAiH;AACjH,SAAS,gBAAgB,CACvB,UAAkE,EAClE,QAAgE,EAChE,QAAkB,EAClB,KA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`x-agent`: how an operation opts in as an agent tool
|
|
2
|
+
* `x-agent`: how an operation opts in as an agent tool.
|
|
3
3
|
*
|
|
4
4
|
* ```yaml
|
|
5
5
|
* x-agent:
|
|
6
6
|
* expose: true # without it, the operation is not a tool
|
|
7
|
-
* effect: mutate #
|
|
7
|
+
* effect: mutate # view | file | mutate | job | transaction, or its object form
|
|
8
8
|
* destructive: true # optional, on a write: removes or replaces something the person made
|
|
9
9
|
* consequence: "..." # optional: what happens, for the tool's description and an approval's preview
|
|
10
10
|
* pa: true # optional: the product's own assistant may call it; only on a read
|
package/dist/openapi/x-agent.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `x-agent`: how an operation opts in as an agent tool
|
|
2
|
+
* `x-agent`: how an operation opts in as an agent tool.
|
|
3
3
|
*
|
|
4
4
|
* ```yaml
|
|
5
5
|
* x-agent:
|
|
6
6
|
* expose: true # without it, the operation is not a tool
|
|
7
|
-
* effect: mutate #
|
|
7
|
+
* effect: mutate # view | file | mutate | job | transaction, or its object form
|
|
8
8
|
* destructive: true # optional, on a write: removes or replaces something the person made
|
|
9
9
|
* consequence: "..." # optional: what happens, for the tool's description and an approval's preview
|
|
10
10
|
* pa: true # optional: the product's own assistant may call it; only on a read
|
package/dist/orchestrator.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { AgentWorkerConfig, AgentTurnInput, AgentTurnResult } from './types
|
|
|
5
5
|
* A turn runs in one or more segments. Each segment is one `streamText` call
|
|
6
6
|
* with a fixed tool set. When a UI action changes what the client's page
|
|
7
7
|
* offers (navigating is the common case), the segment ends and the turn
|
|
8
|
-
* continues in a new one whose tools are the new page's
|
|
8
|
+
* continues in a new one whose tools are the new page's. The
|
|
9
9
|
* round cap counts across segments.
|
|
10
10
|
*/
|
|
11
11
|
export declare function runAgentTurn(config: AgentWorkerConfig, input: AgentTurnInput): Promise<AgentTurnResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAmC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAmC,MAAM,YAAY,CAAC;AAyGtH;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,eAAe,CAAC,CAu4D1B"}
|
package/dist/orchestrator.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Agent Orchestrator — powered by Vercel AI SDK.
|
|
3
3
|
*
|
|
4
4
|
* The model is the host's: any `ai` library model, passed in configuration
|
|
5
|
-
* (
|
|
5
|
+
* ("Model"). The core names no provider. The AI SDK handles:
|
|
6
6
|
* - each provider's wire format (internal, never exposed)
|
|
7
7
|
* - tool_use / tool_result pairing (automatic, no manual repair needed)
|
|
8
8
|
* - Multi-round tool loops (via stopWhen)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - Error categorization and retries
|
|
12
12
|
*
|
|
13
13
|
* Our value-add stays:
|
|
14
|
-
* - UI tools from the client's OUI surfaces, answered by the client
|
|
14
|
+
* - UI tools from the client's OUI surfaces, answered by the client
|
|
15
15
|
* - Schema-based tool loading
|
|
16
16
|
* - Persona/prompt compilation
|
|
17
17
|
* - Emit adapter (realtime socket streaming)
|
|
@@ -24,6 +24,7 @@ import { DEFAULT_STOP_GRACE_MS, TurnStopped, stopOf, watchTurnStop } from './sto
|
|
|
24
24
|
import { stoppedTurnMessages } from './stop/partial.js';
|
|
25
25
|
import { resultText, stoppedNotRun, stoppedWhileRunning } from './stop/results.js';
|
|
26
26
|
import { defaultTurnPolicy } from './turn-policy.js';
|
|
27
|
+
import { createStepClock, timeHandBackNote } from './time-hand-back.js';
|
|
27
28
|
import { evaluateToolPolicySafe } from './authz/tool-policy.js';
|
|
28
29
|
import { createToolInputValidator } from './tools/input-validation.js';
|
|
29
30
|
import { readClientPage, withoutClientUI } from './ui/snapshot.js';
|
|
@@ -92,7 +93,7 @@ const notRun = (payload) => ({ text: JSON.stringify(payload), ran: false });
|
|
|
92
93
|
* A turn runs in one or more segments. Each segment is one `streamText` call
|
|
93
94
|
* with a fixed tool set. When a UI action changes what the client's page
|
|
94
95
|
* offers (navigating is the common case), the segment ends and the turn
|
|
95
|
-
* continues in a new one whose tools are the new page's
|
|
96
|
+
* continues in a new one whose tools are the new page's. The
|
|
96
97
|
* round cap counts across segments.
|
|
97
98
|
*/
|
|
98
99
|
export async function runAgentTurn(config, input) {
|
|
@@ -106,7 +107,7 @@ export async function runAgentTurn(config, input) {
|
|
|
106
107
|
const uiResultTimeoutMs = config.ui?.resultTimeoutMs ?? DEFAULT_UI_RESULT_TIMEOUT_MS;
|
|
107
108
|
const uiJobWaitMs = jobWaitOf({ jobWaitMs: config.ui?.jobWaitMs });
|
|
108
109
|
if (!config.model) {
|
|
109
|
-
throw new Error('[agent-sdk] config.model is required: pass an `ai` library model
|
|
110
|
+
throw new Error('[agent-sdk] config.model is required: pass an `ai` library model');
|
|
110
111
|
}
|
|
111
112
|
const { turnId, socketRoom } = input;
|
|
112
113
|
log('info', 'agent:turn', 'Turn started', {
|
|
@@ -119,7 +120,7 @@ export async function runAgentTurn(config, input) {
|
|
|
119
120
|
maxTokens,
|
|
120
121
|
temperature,
|
|
121
122
|
});
|
|
122
|
-
// ─── The client's UI
|
|
123
|
+
// ─── The client's UI ─────────────────────────────────────────
|
|
123
124
|
// The turn carries the surfaces of the client that sent it. They are the only
|
|
124
125
|
// source of UI tools, so the tools always describe the page the user is on.
|
|
125
126
|
const client = readClientPage(input.context ?? null);
|
|
@@ -127,7 +128,7 @@ export async function runAgentTurn(config, input) {
|
|
|
127
128
|
throw new Error('[agent-sdk] The turn carries UI surfaces but the worker has no UI action channel (config.ui): ' +
|
|
128
129
|
'its UI actions could be sent but never answered.');
|
|
129
130
|
}
|
|
130
|
-
// What the page offers, in index
|
|
131
|
+
// What the page offers, in index: kept current by every answer.
|
|
131
132
|
let currentPage = client?.page ?? [];
|
|
132
133
|
// The turn's UI actions run one at a time, in the order the model called them (ui-sequence.ts).
|
|
133
134
|
const uiSequence = createUISequence();
|
|
@@ -136,14 +137,14 @@ export async function runAgentTurn(config, input) {
|
|
|
136
137
|
uiSequence.record(client.page, client.surfacesHash);
|
|
137
138
|
// The definitions the turn holds: those a client sent, and those fetched since.
|
|
138
139
|
const heldDefinitions = client?.held ?? new Map();
|
|
139
|
-
// Whether the page can be seen
|
|
140
|
+
// Whether the page can be seen: nothing that changes it runs while it cannot.
|
|
140
141
|
const sight = createPageSight();
|
|
141
142
|
const uiCounts = { describes: 0, reads: 0, acts: 0, guides: 0 };
|
|
142
143
|
// Answers whose page state was moved to the end of what the model reads, summed over the turn's steps.
|
|
143
144
|
let pageStatesMoved = 0;
|
|
144
145
|
// The knowledge the client sent for its page goes after the host's prompt.
|
|
145
146
|
const knowledge = readClientKnowledge(input.context ?? null);
|
|
146
|
-
// ─── Files
|
|
147
|
+
// ─── Files ─────────────────────────────────────────
|
|
147
148
|
// With the host's file area, the turn's files go to the model with its
|
|
148
149
|
// message, the attachment tools reach every file of the conversation, and the
|
|
149
150
|
// cost guard caps what the model is given of them.
|
|
@@ -200,7 +201,7 @@ export async function runAgentTurn(config, input) {
|
|
|
200
201
|
const hostPrompt = typeof config.systemPrompt === 'function'
|
|
201
202
|
? config.systemPrompt({ userId: input.userId, accountId: input.accountId, context: withoutClientUI(input.context) })
|
|
202
203
|
: config.systemPrompt;
|
|
203
|
-
// With a file area, the model is told a file's name and content are data, never instructions
|
|
204
|
+
// With a file area, the model is told a file's name and content are data, never instructions.
|
|
204
205
|
const systemPrompt = withClientKnowledge(fileArea ? `${hostPrompt}\n\n${ATTACHMENT_DATA_NOTE}` : hostPrompt, input.context);
|
|
205
206
|
log('debug', 'agent:prompt', 'System prompt built', { turnId, promptLength: systemPrompt.length, hostPromptLength: hostPrompt.length });
|
|
206
207
|
// Wall-clock deadline: abort the entire streamText call if it exceeds turnDeadlineMs.
|
|
@@ -208,14 +209,14 @@ export async function runAgentTurn(config, input) {
|
|
|
208
209
|
// A UI tool waiting on work it started stops in time for the model to answer.
|
|
209
210
|
const uiWaitDeadline = () => turnStartedAt + turnDeadlineMs - UI_ANSWER_MARGIN_MS;
|
|
210
211
|
const abortController = new AbortController();
|
|
211
|
-
// ─── Stopping
|
|
212
|
+
// ─── Stopping ───────────────────────────────────────────────────
|
|
212
213
|
// The person's Stop, or a newer message superseding this turn, is kept by the
|
|
213
214
|
// realtime server; the watch asks for it for as long as the turn runs. A stop
|
|
214
215
|
// aborts the turn's signal with a typed reason, which is what everything that
|
|
215
216
|
// waits (the model stream, a UI action's answer, a job's outcome) already
|
|
216
217
|
// honours. What the turn had produced is then stored and announced (below).
|
|
217
218
|
const stopWatch = input.stopWatch ?? watchTurnStop(config.stops, turnId, input.userId);
|
|
218
|
-
/** Set when the turn begins its own end: a stop that lands after is not one
|
|
219
|
+
/** Set when the turn begins its own end: a stop that lands after is not one. */
|
|
219
220
|
let ending = false;
|
|
220
221
|
/** Kept back from a stopped turn's grace for storing and announcing it. */
|
|
221
222
|
const STOP_STORE_MARGIN_MS = 3_000;
|
|
@@ -250,9 +251,17 @@ export async function runAgentTurn(config, input) {
|
|
|
250
251
|
abortController.abort(stop);
|
|
251
252
|
};
|
|
252
253
|
stopWatch.onStop((record) => stopTurn(new TurnStopped(record.reason, record.at)));
|
|
253
|
-
// The turn's deadline ends it on the same path
|
|
254
|
+
// The turn's deadline ends it on the same path: what it did
|
|
254
255
|
// before it ran out of time is kept, marked, and the next turn is told.
|
|
255
256
|
const deadlineTimer = setTimeout(() => stopTurn(new TurnStopped('deadline', Date.now())), turnDeadlineMs);
|
|
257
|
+
// Before the deadline, the turn hands back with an answer when time is short.
|
|
258
|
+
const stepClock = createStepClock({
|
|
259
|
+
deadlineAt: turnStartedAt + turnDeadlineMs,
|
|
260
|
+
turnDeadlineMs,
|
|
261
|
+
reserveMs: config.handBackReserveMs,
|
|
262
|
+
});
|
|
263
|
+
/** Set at the step that hands the turn back for time: it is the turn's last. */
|
|
264
|
+
let handedBackForTime = false;
|
|
256
265
|
// Build tool execution context
|
|
257
266
|
const toolCtx = {
|
|
258
267
|
userId: input.userId,
|
|
@@ -295,16 +304,16 @@ export async function runAgentTurn(config, input) {
|
|
|
295
304
|
const toolInvocationCounts = new Map();
|
|
296
305
|
const DEFAULT_TOOL_QUOTA = 12;
|
|
297
306
|
const SIDE_EFFECT_TOOL_QUOTA = 2;
|
|
298
|
-
// A UI action is not counted (
|
|
307
|
+
// A UI action is not counted (filling 12 slides of 3 values each
|
|
299
308
|
// ran one action 36 times, and a cap of 12 stopped it). What is refused is a loop:
|
|
300
309
|
// the same call with the same input, made again after it changed nothing three
|
|
301
310
|
// times in a row. Undo five times, or nudge a layer five times, is work: each changes the page.
|
|
302
311
|
const UNCHANGED_REPEATS = 3;
|
|
303
312
|
const uiRepeats = new Map();
|
|
304
313
|
// What each call of the turn did: said back to the model before every step
|
|
305
|
-
// after one did not succeed, so its reply matches it
|
|
314
|
+
// after one did not succeed, so its reply matches it.
|
|
306
315
|
const ledger = createTurnLedger();
|
|
307
|
-
// ─── Approvals
|
|
316
|
+
// ─── Approvals ──────────────────────────────────────────────────
|
|
308
317
|
// The first call in a turn that needs the user's approval stops the turn:
|
|
309
318
|
// it is stored as a pending approval, the card is shown, and nothing else
|
|
310
319
|
// runs until they decide. Each call is approved separately.
|
|
@@ -339,7 +348,7 @@ export async function runAgentTurn(config, input) {
|
|
|
339
348
|
* A call refused before its tool ran: invalid input, over its quota, or
|
|
340
349
|
* denied by policy. The model gets the reason; so does the client, as a
|
|
341
350
|
* call that started and failed, so a session's record holds every call
|
|
342
|
-
* the model made with its arguments
|
|
351
|
+
* the model made with its arguments.
|
|
343
352
|
*/
|
|
344
353
|
const refused = async (payload, given) => {
|
|
345
354
|
ledger.record({ tool: t.name, ok: false, error: payload.error });
|
|
@@ -368,7 +377,7 @@ export async function runAgentTurn(config, input) {
|
|
|
368
377
|
const timeoutMs = isUI
|
|
369
378
|
? Math.max(toolTimeoutMs, uiResultTimeoutMs + 5_000, Math.min(uiJobWaitMs, Math.max(0, uiWaitDeadline() - Date.now())) + uiResultTimeoutMs + 5_000)
|
|
370
379
|
: toolTimeoutMs;
|
|
371
|
-
// ── No changes while blind
|
|
380
|
+
// ── No changes while blind ──
|
|
372
381
|
// After an answer that came without the page's state, or no answer, only
|
|
373
382
|
// reading runs until a read shows the page again. A change called then is
|
|
374
383
|
// refused here, before its definition is fetched or policy is asked; one
|
|
@@ -386,7 +395,7 @@ export async function runAgentTurn(config, input) {
|
|
|
386
395
|
// Before quota and policy: an invalid call consumes no quota and never
|
|
387
396
|
// reaches the host. The model gets the errors so it can correct the call.
|
|
388
397
|
// A UI action's schema is its definition's, fetched from the page when the
|
|
389
|
-
// action is first used
|
|
398
|
+
// action is first used.
|
|
390
399
|
let schema = (t.inputSchema ?? {});
|
|
391
400
|
if (t.resolveInputSchema) {
|
|
392
401
|
try {
|
|
@@ -419,7 +428,7 @@ export async function runAgentTurn(config, input) {
|
|
|
419
428
|
}, rawArgs);
|
|
420
429
|
}
|
|
421
430
|
const args = validation.value;
|
|
422
|
-
// ── Attached files named in the call
|
|
431
|
+
// ── Attached files named in the call ──
|
|
423
432
|
// Each must be a file of this turn's conversation, ready, and of a type the
|
|
424
433
|
// input takes, checked before anything is dispatched; the page then
|
|
425
434
|
// resolves it through its own host. An action declaring a file where none
|
|
@@ -483,13 +492,13 @@ export async function runAgentTurn(config, input) {
|
|
|
483
492
|
// The call as a repeat is judged by: its name and its exact input. Set for a UI action that changes the page.
|
|
484
493
|
let repeatKey = null;
|
|
485
494
|
// ── Quota enforcement ──
|
|
486
|
-
// UI actions run as the user in their own session
|
|
487
|
-
// backend side-effect cap does not apply to them
|
|
495
|
+
// UI actions run as the user in their own session, so the
|
|
496
|
+
// backend side-effect cap does not apply to them. They are
|
|
488
497
|
// bounded by the turn's steps and deadline; only a repeated identical call is refused.
|
|
489
498
|
const currentCount = toolInvocationCounts.get(t.name) ?? 0;
|
|
490
499
|
const isSideEffecting = schema.sideEffects !== false; // fail-closed: undefined = side-effecting
|
|
491
500
|
if (isUI) {
|
|
492
|
-
// A UI action that only reads (a room's inspect and query
|
|
501
|
+
// A UI action that only reads (a room's inspect and query)
|
|
493
502
|
// changes nothing however often it is called.
|
|
494
503
|
if (!reads) {
|
|
495
504
|
let input;
|
|
@@ -521,7 +530,7 @@ export async function runAgentTurn(config, input) {
|
|
|
521
530
|
toolInvocationCounts.set(t.name, currentCount + 1);
|
|
522
531
|
}
|
|
523
532
|
// ── Policy enforcement ──
|
|
524
|
-
// A deny always wins, over an approval too
|
|
533
|
+
// A deny always wins, over an approval too.
|
|
525
534
|
const requirement = approvalRequirement(t);
|
|
526
535
|
let policyRequiresApproval = false;
|
|
527
536
|
if (config.toolPolicy) {
|
|
@@ -542,7 +551,7 @@ export async function runAgentTurn(config, input) {
|
|
|
542
551
|
}
|
|
543
552
|
policyRequiresApproval = decision.action === 'require_approval';
|
|
544
553
|
}
|
|
545
|
-
// ── Approval
|
|
554
|
+
// ── Approval ──
|
|
546
555
|
// Checked and set with no await in between, so of the calls in one
|
|
547
556
|
// response exactly the first that needs approval stops the turn.
|
|
548
557
|
if (approvalHold && !approved) {
|
|
@@ -687,12 +696,12 @@ export async function runAgentTurn(config, input) {
|
|
|
687
696
|
};
|
|
688
697
|
};
|
|
689
698
|
/**
|
|
690
|
-
* Stops the turn at a call that needs the user's approval
|
|
699
|
+
* Stops the turn at a call that needs the user's approval:
|
|
691
700
|
* stores it as a pending approval, shows the card, and tells the model only
|
|
692
701
|
* that it is waiting. The model never sees a token.
|
|
693
702
|
*/
|
|
694
703
|
const requestApproval = async (t, args, toolUseId, requirement, files) => {
|
|
695
|
-
// A file is shown by its name and size; the approval stays bound to its id
|
|
704
|
+
// A file is shown by its name and size; the approval stays bound to its id.
|
|
696
705
|
const preview = buildApprovalPreview(t, args, files);
|
|
697
706
|
approvalHold = { approvalId: toolUseId, title: preview.title };
|
|
698
707
|
const refuse = (why) => {
|
|
@@ -833,7 +842,7 @@ export async function runAgentTurn(config, input) {
|
|
|
833
842
|
return builtUI;
|
|
834
843
|
}
|
|
835
844
|
// The host's tools the model is given. A host tool with a UI tool's name, or
|
|
836
|
-
// with the id of an action of the page, is withheld
|
|
845
|
+
// with the id of an action of the page, is withheld: for a
|
|
837
846
|
// UI-only agent, the page is the authority.
|
|
838
847
|
function hostTools(ui) {
|
|
839
848
|
const sdkOwned = new Set(fileTools.map((t) => t.name));
|
|
@@ -943,7 +952,7 @@ export async function runAgentTurn(config, input) {
|
|
|
943
952
|
return tools;
|
|
944
953
|
}
|
|
945
954
|
/**
|
|
946
|
-
* The turn after the user's decision on an approval card
|
|
955
|
+
* The turn after the user's decision on an approval card:
|
|
947
956
|
* redeem the token and run exactly the stored call, or learn that they
|
|
948
957
|
* declined. What happened goes to the model as an `<approval>` note.
|
|
949
958
|
*
|
|
@@ -1121,7 +1130,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1121
1130
|
const stoppedBeforeStart = stopOf(abortController.signal);
|
|
1122
1131
|
if (stoppedBeforeStart)
|
|
1123
1132
|
return await finishStopped(stoppedBeforeStart, { expired: null, continued: null });
|
|
1124
|
-
// ─── The turn after an approval decision
|
|
1133
|
+
// ─── The turn after an approval decision ────────────────
|
|
1125
1134
|
const continued = input.approval ? await continueApproval(input.approval) : null;
|
|
1126
1135
|
// ─── Calls still stored as waiting, whose approval expired undecided ──────
|
|
1127
1136
|
//
|
|
@@ -1161,7 +1170,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1161
1170
|
continue;
|
|
1162
1171
|
// The user had approved it and it was never run, or nobody decided: the result says which.
|
|
1163
1172
|
const wasApproved = answer.decided === 'approved';
|
|
1164
|
-
// Withdrawn (a new message, or its turn stopped) is said as that, not as time running out
|
|
1173
|
+
// Withdrawn (a new message, or its turn stopped) is said as that, not as time running out.
|
|
1165
1174
|
const content = notRunResult(answer.withdrawn
|
|
1166
1175
|
? withdrawnMarker(answer.withdrawn, wasApproved)
|
|
1167
1176
|
: wasApproved
|
|
@@ -1215,7 +1224,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1215
1224
|
turnFilesGiven && input.history?.at(-1)?.role === 'user' ? input.history.length - 1 : null),
|
|
1216
1225
|
...(continued?.messages ?? []),
|
|
1217
1226
|
];
|
|
1218
|
-
// The turn's files go with its message, after everything said about it
|
|
1227
|
+
// The turn's files go with its message, after everything said about it.
|
|
1219
1228
|
// A file that cannot be had is named with why; the turn goes on with the others.
|
|
1220
1229
|
if (fileArea && turnFilesGiven) {
|
|
1221
1230
|
try {
|
|
@@ -1354,8 +1363,10 @@ export async function runAgentTurn(config, input) {
|
|
|
1354
1363
|
stopWhen: [
|
|
1355
1364
|
isStepCount(maxRounds - allSteps.length),
|
|
1356
1365
|
...USER_INPUT_TOOLS.map((name) => hasToolCall(name)),
|
|
1357
|
-
// A call is waiting for the user's approval: the turn ends here
|
|
1366
|
+
// A call is waiting for the user's approval: the turn ends here.
|
|
1358
1367
|
() => approvalHold !== null,
|
|
1368
|
+
// The step that handed the turn back for time was its last.
|
|
1369
|
+
() => handedBackForTime,
|
|
1359
1370
|
],
|
|
1360
1371
|
...(temperature !== undefined ? { temperature } : {}),
|
|
1361
1372
|
telemetry: {
|
|
@@ -1367,23 +1378,42 @@ export async function runAgentTurn(config, input) {
|
|
|
1367
1378
|
// has: a `ui_act` call is shown to it as the action it ran, and the
|
|
1368
1379
|
// actions are among the tool names it may choose from.
|
|
1369
1380
|
const actionIds = [...(currentUI()?.actions.keys() ?? [])];
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1381
|
+
// Time comes before the host's policy: a step that would not leave time to answer is the last.
|
|
1382
|
+
const timing = stepClock.stepStarting();
|
|
1383
|
+
if (timing.handBack && !handedBackForTime) {
|
|
1384
|
+
log('warn', 'agent:turn', 'Time is short; this step hands the turn back', {
|
|
1385
|
+
turnId,
|
|
1386
|
+
step: previousSteps.length + steps.length + 1,
|
|
1387
|
+
remainingMs: timing.remainingMs,
|
|
1388
|
+
longestStepMs: timing.longestStepMs,
|
|
1389
|
+
reserveMs: timing.reserveMs,
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
handedBackForTime ||= timing.handBack;
|
|
1393
|
+
const canOfferChoices = 'present_options' in aiTools;
|
|
1394
|
+
const stepPolicy = handedBackForTime
|
|
1395
|
+
? {
|
|
1396
|
+
note: timeHandBackNote(canOfferChoices),
|
|
1397
|
+
toolChoice: canOfferChoices ? { type: 'tool', toolName: 'present_options' } : 'none',
|
|
1398
|
+
}
|
|
1399
|
+
: await turnPolicy.prepareStep({
|
|
1400
|
+
// The policy counts steps across the whole turn, not per segment.
|
|
1401
|
+
steps: [...previousSteps, ...steps].map((step) => ({
|
|
1402
|
+
toolCalls: step.toolCalls?.map((tc) => ({
|
|
1403
|
+
toolName: tc.toolName === UI_ACT_TOOL && typeof tc.input?.action === 'string'
|
|
1404
|
+
? tc.input.action
|
|
1405
|
+
: tc.toolName,
|
|
1406
|
+
})),
|
|
1377
1407
|
})),
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
}
|
|
1408
|
+
turnClass,
|
|
1409
|
+
allToolNames: [...Object.keys(aiTools), ...actionIds],
|
|
1410
|
+
// What each tool is, so a policy can choose by class (the attachment tools are `attachment`).
|
|
1411
|
+
allTools: [
|
|
1412
|
+
...Object.keys(aiTools).map((name) => describeStepTool(name)),
|
|
1413
|
+
...actionIds.map((name) => ({ name, kind: 'ui' })),
|
|
1414
|
+
],
|
|
1415
|
+
});
|
|
1416
|
+
const { note, ...policy } = stepPolicy;
|
|
1387
1417
|
// What it constrained, in the model's terms: an action is run through
|
|
1388
1418
|
// `ui_act`, which holds the step to the actions the policy allowed.
|
|
1389
1419
|
const isAction = (name) => actionIds.includes(name);
|
|
@@ -1434,7 +1464,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1434
1464
|
if (trimmed.newest !== undefined)
|
|
1435
1465
|
newestAnswerState = trimmed.newest;
|
|
1436
1466
|
}
|
|
1437
|
-
// The files this step would carry, within the turn's and the conversation's caps
|
|
1467
|
+
// The files this step would carry, within the turn's and the conversation's caps.
|
|
1438
1468
|
const leftOutNow = fileGuard.beforeStep();
|
|
1439
1469
|
if (leftOutNow.length > 0) {
|
|
1440
1470
|
log('info', 'agent:tool', 'Files left out of the next step to keep within the cap', {
|
|
@@ -1550,7 +1580,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1550
1580
|
if (!stopOf(abortController.signal))
|
|
1551
1581
|
throw err;
|
|
1552
1582
|
}
|
|
1553
|
-
// The model's tools no longer change with the page
|
|
1583
|
+
// The model's tools no longer change with the page: what
|
|
1554
1584
|
// the page offers reaches it in each answer, so the turn runs as one segment.
|
|
1555
1585
|
break;
|
|
1556
1586
|
}
|
|
@@ -1582,6 +1612,9 @@ export async function runAgentTurn(config, input) {
|
|
|
1582
1612
|
else if (outputLimited) {
|
|
1583
1613
|
stopReason = 'output_limit';
|
|
1584
1614
|
}
|
|
1615
|
+
else if (handedBackForTime) {
|
|
1616
|
+
stopReason = 'time_limit';
|
|
1617
|
+
}
|
|
1585
1618
|
else if (steps.length >= maxRounds) {
|
|
1586
1619
|
stopReason = 'step_count';
|
|
1587
1620
|
}
|
|
@@ -1622,7 +1655,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1622
1655
|
promptTokens: usage.promptTokens,
|
|
1623
1656
|
cacheReadTokens: usage.cacheReadTokens,
|
|
1624
1657
|
cacheWriteTokens: usage.cacheWriteTokens,
|
|
1625
|
-
// How the page was worked
|
|
1658
|
+
// How the page was worked.
|
|
1626
1659
|
...(client
|
|
1627
1660
|
? {
|
|
1628
1661
|
ui: {
|
|
@@ -1693,7 +1726,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1693
1726
|
stopWatch.close();
|
|
1694
1727
|
}
|
|
1695
1728
|
/**
|
|
1696
|
-
* The end of a stopped turn
|
|
1729
|
+
* The end of a stopped turn: settle what was in flight, store
|
|
1697
1730
|
* what the turn had produced, then say so. Persist first, announce after, as
|
|
1698
1731
|
* a turn that ends by itself does.
|
|
1699
1732
|
*
|
|
@@ -1724,7 +1757,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1724
1757
|
clearTimeout(timer);
|
|
1725
1758
|
}
|
|
1726
1759
|
// A stopped turn leaves no live card: an approval it asked for as the stop came
|
|
1727
|
-
// is withdrawn now, and a later turn records it as that
|
|
1760
|
+
// is withdrawn now, and a later turn records it as that.
|
|
1728
1761
|
const held = approvalHold;
|
|
1729
1762
|
if (held && config.approvals?.withdraw) {
|
|
1730
1763
|
try {
|
|
@@ -1802,7 +1835,7 @@ export async function runAgentTurn(config, input) {
|
|
|
1802
1835
|
return true;
|
|
1803
1836
|
};
|
|
1804
1837
|
// Whether what the turn had produced was stored: a deadline stop that could not store it is
|
|
1805
|
-
// not a stopped turn but one that ran out of time with nothing kept
|
|
1838
|
+
// not a stopped turn but one that ran out of time with nothing kept.
|
|
1806
1839
|
let stored = true;
|
|
1807
1840
|
if (config.beforeTurnComplete) {
|
|
1808
1841
|
try {
|
|
@@ -1903,11 +1936,11 @@ turnMessageAt = null) {
|
|
|
1903
1936
|
for (let idx = 0; idx < history.length; idx++) {
|
|
1904
1937
|
const msg = history[idx];
|
|
1905
1938
|
if (msg.role === 'user') {
|
|
1906
|
-
// A message's files are in history as their reference lines, never their content
|
|
1939
|
+
// A message's files are in history as their reference lines, never their content.
|
|
1907
1940
|
messages.push({ role: 'user', content: idx === turnMessageAt ? msg.content : withReferenceLines(msg.content, msg.attachments ?? undefined) });
|
|
1908
1941
|
}
|
|
1909
1942
|
else if (msg.role === 'assistant') {
|
|
1910
|
-
// A stopped turn's last message says so after its text
|
|
1943
|
+
// A stopped turn's last message says so after its text.
|
|
1911
1944
|
// A message that has only that carries the line as its whole text: an
|
|
1912
1945
|
// empty text block is refused by a model provider.
|
|
1913
1946
|
const stoppedLine = msg.stopped ? turnStoppedNote(msg.stopped) : null;
|