lua-cli 3.35.0 → 3.37.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.
- package/dist/api-exports.d.ts +304 -31
- package/dist/api-exports.js +511 -196
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1536 -239
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +18 -18
- package/dist/workflow-builder.d.ts +47 -0
- package/dist/workflow-builder.js +448 -195
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +2 -2
- package/docs/api/Workflows.md +1 -1
- package/package.json +4 -3
- package/scripts/compat-matrix-previous-cli.mjs +266 -0
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -130,6 +130,35 @@ declare interface AgentInvocationInput {
|
|
|
130
130
|
/** Per-request model override ("provider/model" code). Unknown codes fall back per
|
|
131
131
|
* approved-models policy server-side. */
|
|
132
132
|
model?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Workflow model classes (plan 6.4 "Caller-supplied legs", C.7) — the ordered,
|
|
135
|
+
* concrete `'provider/model'` codes THIS turn may run, primary first. The worker
|
|
136
|
+
* computes them (the resolved class row plus the other eligible rows of the same
|
|
137
|
+
* class, filtered to the run's consented estimate); the chat plane uses them
|
|
138
|
+
* VERBATIM as the fallback-leg list instead of the registry chain, which is the
|
|
139
|
+
* only way a workflow step can hop a leg at all — the worker sees the terminal
|
|
140
|
+
* turn and cannot hop mid-turn because tool side effects happen inside it.
|
|
141
|
+
*
|
|
142
|
+
* A pin passes exactly one leg, which is how "never substitute a model inside a
|
|
143
|
+
* workflow" becomes true: no registry chain, no last-resort platform default.
|
|
144
|
+
*
|
|
145
|
+
* Honoured server-side ONLY on internally-authenticated turns and ONLY for
|
|
146
|
+
* `channel: 'workflow'` — same posture as `toolScope`: `buildChatRequest` drops a
|
|
147
|
+
* Bearer client's value, so no client of `/chat/generate` can steer which models
|
|
148
|
+
* its turn may run.
|
|
149
|
+
*/
|
|
150
|
+
legs?: string[];
|
|
151
|
+
/**
|
|
152
|
+
* Workflow model classes (plan 6.4, the `effort` row) — the reasoning effort for
|
|
153
|
+
* THIS turn. Deliberately the narrow three-value ladder the composer writes, not
|
|
154
|
+
* the six-value `ReasoningEffort` scale: the worker can never push `off`,
|
|
155
|
+
* `minimal` or `max` through the invocation. Mapped identity-wise onto
|
|
156
|
+
* `ChatRequest.options.reasoning.effort` (low → low, medium → medium, high →
|
|
157
|
+
* high), clamped to the served row's own `efforts` ladder and translated into the
|
|
158
|
+
* provider's dialect at the model-resolution seam. Inert on toggle-only rows.
|
|
159
|
+
* The applied value comes back on `AgentInvocationMeter.effortApplied`.
|
|
160
|
+
*/
|
|
161
|
+
effort?: 'low' | 'medium' | 'high';
|
|
133
162
|
/**
|
|
134
163
|
* LUA-655 (review M2) — a platform re-ask the customer must not pay for: the workflow executor's
|
|
135
164
|
* output-repair turns. Honoured server-side ONLY on internally-authenticated turns
|
|
@@ -189,19 +218,6 @@ declare interface AgentInvocationInput {
|
|
|
189
218
|
};
|
|
190
219
|
}
|
|
191
220
|
|
|
192
|
-
/**
|
|
193
|
-
* LUA-724 (PR 7) — the billed turn's pricing inputs, exactly as chat's settlement event carries
|
|
194
|
-
* them (`chat.service.trackLlmInferenceUsage`): the model that ACTUALLY served the turn (the
|
|
195
|
-
* resolver's code, not the caller's pin), the de-paged `contextInputTokens` (largest single
|
|
196
|
-
* step's prompt — never the whole-turn sum), the tool-call COUNT, and whether the turn ran on
|
|
197
|
-
* the org's own key. `chargedCredits` echoes the gate's answer (true ⇒ the legacy pool deducted
|
|
198
|
-
* in real time; false ⇒ seat org / free turn — settlement meters it).
|
|
199
|
-
*
|
|
200
|
-
* Stamped by the serving pod ONLY on internal-auth turns that carry a billing `operationId`
|
|
201
|
-
* (the workflow agent-step loopback), as the enumerable `luaMeter` top-level field of the
|
|
202
|
-
* generate envelope — never on a Bearer turn, so the public wire is byte-identical. The
|
|
203
|
-
* workflow executor prices the step's `run.budget.spent` from it with `priceModelCall`.
|
|
204
|
-
*/
|
|
205
221
|
declare interface AgentInvocationMeter {
|
|
206
222
|
model?: string;
|
|
207
223
|
contextInputTokens?: number;
|
|
@@ -215,6 +231,16 @@ declare interface AgentInvocationMeter {
|
|
|
215
231
|
toolNames?: string[];
|
|
216
232
|
byok?: boolean;
|
|
217
233
|
chargedCredits?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Workflow model classes (plan 6.4, the `effort` row; round-2 architect finding 7) — the
|
|
236
|
+
* effort that was ACTUALLY applied to the turn: the request/agent/tier merge clamped to the
|
|
237
|
+
* SERVED model's `efforts` ladder, which is not always what was asked for (a row whose ladder
|
|
238
|
+
* omits `medium` serves `low`). Server-owned and stamped beside `model` on the same
|
|
239
|
+
* `operationId`-bearing loopback turns, so the worker can record it on the step row without a
|
|
240
|
+
* seventh hop of its own. Absent when no effort was in play (no requested effort, or a model
|
|
241
|
+
* that advertises no reasoning) — a non-effort turn's meter is byte-identical to today's.
|
|
242
|
+
*/
|
|
243
|
+
effortApplied?: ReasoningEffort;
|
|
218
244
|
}
|
|
219
245
|
|
|
220
246
|
declare interface AgentInvocationOutput {
|
|
@@ -370,6 +396,30 @@ export declare interface AgentStepOptions {
|
|
|
370
396
|
*/
|
|
371
397
|
maxMessages?: number;
|
|
372
398
|
maxInputTokens?: number;
|
|
399
|
+
/**
|
|
400
|
+
* What this step DOES: `classify` | `extract` | `transform` | `draft` | `research` | `reason` | `code` |
|
|
401
|
+
* `judge`. On a PUSHED definition it must come with a `model` — a static `taskClass` with none is refused
|
|
402
|
+
* `task-class-without-model`, because nothing maps a task class to a model at dispatch.
|
|
403
|
+
*/
|
|
404
|
+
taskClass?: WorkflowTaskClass;
|
|
405
|
+
/**
|
|
406
|
+
* Traits the chosen model must have: `vision` | `structured` | `largeContext` | `codeExecution`. Write these
|
|
407
|
+
* rather than pinning a code that may retire. A step with an `outputSchema` needs `structured`; one reading
|
|
408
|
+
* images needs `vision`.
|
|
409
|
+
*/
|
|
410
|
+
requires?: WorkflowModelTrait[];
|
|
411
|
+
/** One line on why this class or pin was chosen — at most 160 characters, plain text, never parsed. */
|
|
412
|
+
modelReason?: string;
|
|
413
|
+
/**
|
|
414
|
+
* Reasoning effort for this step: `low` for fast work and tool-heavy orchestration, `high` for `reason` and
|
|
415
|
+
* `code`, `medium` otherwise. Inert on rows whose ladder is toggle-only.
|
|
416
|
+
*
|
|
417
|
+
* COMPATIBILITY: writing it changes nothing on its own. A plain `lua push` keeps the envelope at
|
|
418
|
+
* `luaWorkflow: 1`, and the executor forwards effort only when the run's frozen snapshot says 2 — opted into
|
|
419
|
+
* by `lua push --apply-effort` or by a new compose while assignment is on (plan 6.4, "The effort marker").
|
|
420
|
+
* Until then the value is carried and estimated, never applied.
|
|
421
|
+
*/
|
|
422
|
+
effort?: WorkflowAgentEffort;
|
|
373
423
|
}
|
|
374
424
|
|
|
375
425
|
export declare interface AgentToolScope {
|
|
@@ -1394,6 +1444,52 @@ export declare type ChatMessage = TextMessage | ImageMessage | FileMessage;
|
|
|
1394
1444
|
*/
|
|
1395
1445
|
export declare type ContainerArm = StepRef | [LuaMapConfig, StepRef];
|
|
1396
1446
|
|
|
1447
|
+
/**
|
|
1448
|
+
* Who is in the conversation this turn runs in.
|
|
1449
|
+
*/
|
|
1450
|
+
export declare type ConversationKind = 'direct' | 'group';
|
|
1451
|
+
|
|
1452
|
+
export declare interface ConversationParticipant {
|
|
1453
|
+
/** Lua user id. For a Teams participant this is the user Lua minted for them. */
|
|
1454
|
+
userId: string;
|
|
1455
|
+
/** Server-resolved display name. */
|
|
1456
|
+
displayName: string;
|
|
1457
|
+
/** True for the room owner (desktop rooms); absent on channel rooms, which have no human owner. */
|
|
1458
|
+
isOwner?: boolean;
|
|
1459
|
+
/** True for the person who sent this turn. */
|
|
1460
|
+
isCurrentSpeaker?: boolean;
|
|
1461
|
+
/** How this person is known on the external channel (Teams group chats). */
|
|
1462
|
+
channelIdentity?: {
|
|
1463
|
+
provider: 'teams' | 'slack' | 'whatsapp';
|
|
1464
|
+
externalId: string;
|
|
1465
|
+
email?: string;
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* The conversation a turn runs in. Present on group turns (a desktop room or a
|
|
1471
|
+
* Teams group chat); undefined on 1:1 chats, jobs, webhooks, triggers and
|
|
1472
|
+
* workflow steps.
|
|
1473
|
+
*/
|
|
1474
|
+
export declare interface ConversationRef {
|
|
1475
|
+
/** The room conversation id (`room:<id>`). */
|
|
1476
|
+
id: string;
|
|
1477
|
+
kind: ConversationKind;
|
|
1478
|
+
channel: Channel;
|
|
1479
|
+
/** The provider's conversation id; pass it to `Channels.send({ to: { conversationId } })` to reply proactively. */
|
|
1480
|
+
externalId?: string;
|
|
1481
|
+
currentSpeakerId?: string;
|
|
1482
|
+
/** Capped at 50 entries, current speaker first; see `participantCount` and `truncated`. */
|
|
1483
|
+
participants: ConversationParticipant[];
|
|
1484
|
+
participantCount: number;
|
|
1485
|
+
truncated: boolean;
|
|
1486
|
+
/** The agents seated in the conversation. */
|
|
1487
|
+
agents?: Array<{
|
|
1488
|
+
agentId: string;
|
|
1489
|
+
name?: string;
|
|
1490
|
+
}>;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1397
1493
|
/**
|
|
1398
1494
|
* Options for creating a custom data entry.
|
|
1399
1495
|
*/
|
|
@@ -3056,6 +3152,13 @@ export declare const lte: (l: TypedRef<number> | number, r: TypedRef<number> | L
|
|
|
3056
3152
|
* if (Lua.request.webhook) {
|
|
3057
3153
|
* const payload = Lua.request.webhook.payload;
|
|
3058
3154
|
* }
|
|
3155
|
+
*
|
|
3156
|
+
* // In a group conversation (a desktop room or a Teams group chat), see who is in it
|
|
3157
|
+
* const conversation = Lua.request.conversation;
|
|
3158
|
+
* if (conversation?.kind === 'group') {
|
|
3159
|
+
* const speaker = conversation.participants.find((p) => p.isCurrentSpeaker);
|
|
3160
|
+
* const others = conversation.participants.filter((p) => !p.isCurrentSpeaker).map((p) => p.displayName);
|
|
3161
|
+
* }
|
|
3059
3162
|
* ```
|
|
3060
3163
|
*/
|
|
3061
3164
|
export declare const Lua: LuaRuntime;
|
|
@@ -3618,6 +3721,11 @@ export declare interface LuaRequest {
|
|
|
3618
3721
|
userId?: string;
|
|
3619
3722
|
/** The id of the agent handling this turn. */
|
|
3620
3723
|
agentId?: string;
|
|
3724
|
+
/**
|
|
3725
|
+
* The group conversation this turn belongs to, with its participants and the
|
|
3726
|
+
* current speaker. Undefined on 1:1 turns and on non-chat executions.
|
|
3727
|
+
*/
|
|
3728
|
+
conversation?: ConversationRef;
|
|
3621
3729
|
}
|
|
3622
3730
|
|
|
3623
3731
|
/**
|
|
@@ -4017,13 +4125,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4017
4125
|
}, "strip", z.ZodTypeAny, {
|
|
4018
4126
|
provider?: "deepgram" | "elevenlabs";
|
|
4019
4127
|
kind?: "plugin";
|
|
4020
|
-
options?: Record<string, unknown>;
|
|
4021
4128
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4129
|
+
options?: Record<string, unknown>;
|
|
4022
4130
|
}, {
|
|
4023
4131
|
provider?: "deepgram" | "elevenlabs";
|
|
4024
4132
|
kind?: "plugin";
|
|
4025
|
-
options?: Record<string, unknown>;
|
|
4026
4133
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4134
|
+
options?: Record<string, unknown>;
|
|
4027
4135
|
}>, z.ZodObject<{
|
|
4028
4136
|
kind: z.ZodLiteral<"realtime">;
|
|
4029
4137
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -4083,13 +4191,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4083
4191
|
}, "strip", z.ZodTypeAny, {
|
|
4084
4192
|
provider?: "deepgram" | "elevenlabs";
|
|
4085
4193
|
kind?: "plugin";
|
|
4086
|
-
options?: Record<string, unknown>;
|
|
4087
4194
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4195
|
+
options?: Record<string, unknown>;
|
|
4088
4196
|
}, {
|
|
4089
4197
|
provider?: "deepgram" | "elevenlabs";
|
|
4090
4198
|
kind?: "plugin";
|
|
4091
|
-
options?: Record<string, unknown>;
|
|
4092
4199
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4200
|
+
options?: Record<string, unknown>;
|
|
4093
4201
|
}>, z.ZodObject<{
|
|
4094
4202
|
kind: z.ZodLiteral<"realtime">;
|
|
4095
4203
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -4149,13 +4257,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4149
4257
|
}, "strip", z.ZodTypeAny, {
|
|
4150
4258
|
provider?: "deepgram" | "elevenlabs";
|
|
4151
4259
|
kind?: "plugin";
|
|
4152
|
-
options?: Record<string, unknown>;
|
|
4153
4260
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4261
|
+
options?: Record<string, unknown>;
|
|
4154
4262
|
}, {
|
|
4155
4263
|
provider?: "deepgram" | "elevenlabs";
|
|
4156
4264
|
kind?: "plugin";
|
|
4157
|
-
options?: Record<string, unknown>;
|
|
4158
4265
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4266
|
+
options?: Record<string, unknown>;
|
|
4159
4267
|
}>, z.ZodObject<{
|
|
4160
4268
|
kind: z.ZodLiteral<"realtime">;
|
|
4161
4269
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -4341,8 +4449,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4341
4449
|
} | {
|
|
4342
4450
|
provider?: "deepgram" | "elevenlabs";
|
|
4343
4451
|
kind?: "plugin";
|
|
4344
|
-
options?: Record<string, unknown>;
|
|
4345
4452
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4453
|
+
options?: Record<string, unknown>;
|
|
4346
4454
|
} | {
|
|
4347
4455
|
provider?: "google" | "xai" | "openai";
|
|
4348
4456
|
kind?: "realtime";
|
|
@@ -4357,8 +4465,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4357
4465
|
} | {
|
|
4358
4466
|
provider?: "deepgram" | "elevenlabs";
|
|
4359
4467
|
kind?: "plugin";
|
|
4360
|
-
options?: Record<string, unknown>;
|
|
4361
4468
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4469
|
+
options?: Record<string, unknown>;
|
|
4362
4470
|
} | {
|
|
4363
4471
|
provider?: "google" | "xai" | "openai";
|
|
4364
4472
|
kind?: "realtime";
|
|
@@ -4372,8 +4480,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4372
4480
|
} | {
|
|
4373
4481
|
provider?: "deepgram" | "elevenlabs";
|
|
4374
4482
|
kind?: "plugin";
|
|
4375
|
-
options?: Record<string, unknown>;
|
|
4376
4483
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4484
|
+
options?: Record<string, unknown>;
|
|
4377
4485
|
} | {
|
|
4378
4486
|
provider?: "google" | "xai" | "openai";
|
|
4379
4487
|
kind?: "realtime";
|
|
@@ -4435,8 +4543,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4435
4543
|
} | {
|
|
4436
4544
|
provider?: "deepgram" | "elevenlabs";
|
|
4437
4545
|
kind?: "plugin";
|
|
4438
|
-
options?: Record<string, unknown>;
|
|
4439
4546
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4547
|
+
options?: Record<string, unknown>;
|
|
4440
4548
|
} | {
|
|
4441
4549
|
provider?: "google" | "xai" | "openai";
|
|
4442
4550
|
kind?: "realtime";
|
|
@@ -4451,8 +4559,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4451
4559
|
} | {
|
|
4452
4560
|
provider?: "deepgram" | "elevenlabs";
|
|
4453
4561
|
kind?: "plugin";
|
|
4454
|
-
options?: Record<string, unknown>;
|
|
4455
4562
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4563
|
+
options?: Record<string, unknown>;
|
|
4456
4564
|
} | {
|
|
4457
4565
|
provider?: "google" | "xai" | "openai";
|
|
4458
4566
|
kind?: "realtime";
|
|
@@ -4466,8 +4574,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4466
4574
|
} | {
|
|
4467
4575
|
provider?: "deepgram" | "elevenlabs";
|
|
4468
4576
|
kind?: "plugin";
|
|
4469
|
-
options?: Record<string, unknown>;
|
|
4470
4577
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4578
|
+
options?: Record<string, unknown>;
|
|
4471
4579
|
} | {
|
|
4472
4580
|
provider?: "google" | "xai" | "openai";
|
|
4473
4581
|
kind?: "realtime";
|
|
@@ -4529,8 +4637,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4529
4637
|
} | {
|
|
4530
4638
|
provider?: "deepgram" | "elevenlabs";
|
|
4531
4639
|
kind?: "plugin";
|
|
4532
|
-
options?: Record<string, unknown>;
|
|
4533
4640
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4641
|
+
options?: Record<string, unknown>;
|
|
4534
4642
|
} | {
|
|
4535
4643
|
provider?: "google" | "xai" | "openai";
|
|
4536
4644
|
kind?: "realtime";
|
|
@@ -4545,8 +4653,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4545
4653
|
} | {
|
|
4546
4654
|
provider?: "deepgram" | "elevenlabs";
|
|
4547
4655
|
kind?: "plugin";
|
|
4548
|
-
options?: Record<string, unknown>;
|
|
4549
4656
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4657
|
+
options?: Record<string, unknown>;
|
|
4550
4658
|
} | {
|
|
4551
4659
|
provider?: "google" | "xai" | "openai";
|
|
4552
4660
|
kind?: "realtime";
|
|
@@ -4560,8 +4668,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4560
4668
|
} | {
|
|
4561
4669
|
provider?: "deepgram" | "elevenlabs";
|
|
4562
4670
|
kind?: "plugin";
|
|
4563
|
-
options?: Record<string, unknown>;
|
|
4564
4671
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4672
|
+
options?: Record<string, unknown>;
|
|
4565
4673
|
} | {
|
|
4566
4674
|
provider?: "google" | "xai" | "openai";
|
|
4567
4675
|
kind?: "realtime";
|
|
@@ -4623,8 +4731,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4623
4731
|
} | {
|
|
4624
4732
|
provider?: "deepgram" | "elevenlabs";
|
|
4625
4733
|
kind?: "plugin";
|
|
4626
|
-
options?: Record<string, unknown>;
|
|
4627
4734
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4735
|
+
options?: Record<string, unknown>;
|
|
4628
4736
|
} | {
|
|
4629
4737
|
provider?: "google" | "xai" | "openai";
|
|
4630
4738
|
kind?: "realtime";
|
|
@@ -4639,8 +4747,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4639
4747
|
} | {
|
|
4640
4748
|
provider?: "deepgram" | "elevenlabs";
|
|
4641
4749
|
kind?: "plugin";
|
|
4642
|
-
options?: Record<string, unknown>;
|
|
4643
4750
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4751
|
+
options?: Record<string, unknown>;
|
|
4644
4752
|
} | {
|
|
4645
4753
|
provider?: "google" | "xai" | "openai";
|
|
4646
4754
|
kind?: "realtime";
|
|
@@ -4654,8 +4762,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4654
4762
|
} | {
|
|
4655
4763
|
provider?: "deepgram" | "elevenlabs";
|
|
4656
4764
|
kind?: "plugin";
|
|
4657
|
-
options?: Record<string, unknown>;
|
|
4658
4765
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4766
|
+
options?: Record<string, unknown>;
|
|
4659
4767
|
} | {
|
|
4660
4768
|
provider?: "google" | "xai" | "openai";
|
|
4661
4769
|
kind?: "realtime";
|
|
@@ -6379,6 +6487,12 @@ declare interface StartWorkflowRunResult {
|
|
|
6379
6487
|
/** ISO — the existing run's creation time. */
|
|
6380
6488
|
startedAt?: string;
|
|
6381
6489
|
output?: unknown;
|
|
6490
|
+
/**
|
|
6491
|
+
* [WMC-E7] §6.4 — the run's `modelConsent`, the SAME object the run detail carries, served with a `gated`
|
|
6492
|
+
* start so the person deciding sees the plan and the cost line at the moment they are asked. Absent on a
|
|
6493
|
+
* run that assigned no model and on every server that does not serve it.
|
|
6494
|
+
*/
|
|
6495
|
+
modelConsent?: WorkflowModelConsentView;
|
|
6382
6496
|
}
|
|
6383
6497
|
|
|
6384
6498
|
export declare const state: <T = unknown>(path: string) => TypedRef<T>;
|
|
@@ -7230,6 +7344,9 @@ declare interface WhatsAppTemplateUrlButton {
|
|
|
7230
7344
|
example?: string | string[];
|
|
7231
7345
|
}
|
|
7232
7346
|
|
|
7347
|
+
/** `agent.effort` — the reasoning-effort hint a graph agent node may carry (lua-core's envelope member). */
|
|
7348
|
+
declare const WORKFLOW_AGENT_EFFORTS: readonly ["low", "medium", "high"];
|
|
7349
|
+
|
|
7233
7350
|
/** `approval.onDeny` (§6.4.11 deny-as-data): `'fail'` fails the step on a denial; default `'continue'`. */
|
|
7234
7351
|
declare const WORKFLOW_APPROVAL_ON_DENY: readonly ["fail", "continue"];
|
|
7235
7352
|
|
|
@@ -7239,6 +7356,13 @@ declare const WORKFLOW_JOB_HARNESSES: readonly ["claude-code", "generic"];
|
|
|
7239
7356
|
/** `jobResources` (05 §5.17): the Job-tier pod size class. Default `'small'` at spawn. */
|
|
7240
7357
|
declare const WORKFLOW_JOB_RESOURCES: readonly ["small", "medium", "large"];
|
|
7241
7358
|
|
|
7359
|
+
/**
|
|
7360
|
+
* Required traits — capabilities the chosen model MUST have (`AgentNode.requires`), so a composed step can
|
|
7361
|
+
* say "needs vision" without pinning a code that may retire. Derived from the catalog row's `media`,
|
|
7362
|
+
* `structuredOutput`, `contextWindow` and `tools.codeExecution` (plan 6.2).
|
|
7363
|
+
*/
|
|
7364
|
+
declare const WORKFLOW_MODEL_TRAITS: readonly ["vision", "structured", "largeContext", "codeExecution"];
|
|
7365
|
+
|
|
7242
7366
|
/** What the FINAL failure of a step does to the run: `'park'` → the §06 §6.3.5 exception gate. Default `'fail'`. */
|
|
7243
7367
|
declare const WORKFLOW_ON_ERROR: readonly ["fail", "continue", "park"];
|
|
7244
7368
|
|
|
@@ -7251,9 +7375,18 @@ declare const WORKFLOW_SIDE_EFFECTS: readonly ["none", "external"];
|
|
|
7251
7375
|
/** `waitForSignal.onTimeout`: default `'fail'`; `'continue'` ⇒ output `{received:false, timedOut:true}`. */
|
|
7252
7376
|
declare const WORKFLOW_SIGNAL_ON_TIMEOUT: readonly ["fail", "continue"];
|
|
7253
7377
|
|
|
7378
|
+
/**
|
|
7379
|
+
* Task class — what a step DOES, the composer's primary output for model choice (`AgentNode.taskClass`).
|
|
7380
|
+
* The platform maps a task class to a model class (plan 6.3's default `classMap`; an org may override it),
|
|
7381
|
+
* so a composer never has to reason about concrete models. Eight values to start.
|
|
7382
|
+
*/
|
|
7383
|
+
declare const WORKFLOW_TASK_CLASSES: readonly ["classify", "extract", "transform", "draft", "research", "reason", "code", "judge"];
|
|
7384
|
+
|
|
7254
7385
|
/** The only tier a node may DECLARE (`tier:'job'`, implied by `workspace`); the worker tier is the absence. */
|
|
7255
7386
|
declare const WORKFLOW_TIERS: readonly ["job"];
|
|
7256
7387
|
|
|
7388
|
+
declare type WorkflowAgentEffort = (typeof WORKFLOW_AGENT_EFFORTS)[number];
|
|
7389
|
+
|
|
7257
7390
|
declare type WorkflowApprovalOnDeny = (typeof WORKFLOW_APPROVAL_ON_DENY)[number];
|
|
7258
7391
|
|
|
7259
7392
|
export declare type WorkflowApproverSpec = 'creator' | 'org-admins' | {
|
|
@@ -7289,6 +7422,33 @@ export declare interface WorkflowArtefactMeta {
|
|
|
7289
7422
|
};
|
|
7290
7423
|
}
|
|
7291
7424
|
|
|
7425
|
+
/**
|
|
7426
|
+
* [WMC-A6] research §H2 — the organization's `autonomy` block: the pre-consented ENVELOPE inside which a
|
|
7427
|
+
* start that would have asked a person starts on its own instead (`ask → auto`).
|
|
7428
|
+
*
|
|
7429
|
+
* Every member is optional and absent means "the platform default applies". The CLI never fills one in and
|
|
7430
|
+
* never computes one: what a run is actually admitted under is `effectiveWorkflowAutonomy(policy, agent)`'s
|
|
7431
|
+
* answer, served back by `GET ?effective=true`, and the two are rendered side by side rather than merged
|
|
7432
|
+
* here — a CLI that guessed at the resolution would be a second source of truth for a price nobody consents
|
|
7433
|
+
* to twice.
|
|
7434
|
+
*
|
|
7435
|
+
* `enabled` is the one member whose absence is a VALUE rather than a platform default: absent ⇒ false. That
|
|
7436
|
+
* is deliberate (research §H2 — autonomy is the file's single opt-in default), so `get` words it as such.
|
|
7437
|
+
*/
|
|
7438
|
+
declare interface WorkflowAutonomyEnvelopeDto {
|
|
7439
|
+
/** Absent ⇒ FALSE. The org opt-in; `enabled: false` on the agent or the platform switch still wins above it. */
|
|
7440
|
+
enabled?: boolean;
|
|
7441
|
+
maxCredits?: number;
|
|
7442
|
+
maxSteps?: number;
|
|
7443
|
+
/** Sized against the ladder's duration BOUND, not a wall (research §H2) — which is why the default is a day. */
|
|
7444
|
+
maxDurationSeconds?: number;
|
|
7445
|
+
/** The model overlay's estimated actions — the fourth ladder dimension (research §B4). */
|
|
7446
|
+
maxActions?: number;
|
|
7447
|
+
maxRunsPerHour?: number;
|
|
7448
|
+
/** The composition forms the envelope admits; `script` opts in. */
|
|
7449
|
+
forms?: string[];
|
|
7450
|
+
}
|
|
7451
|
+
|
|
7292
7452
|
export declare interface WorkflowBusinessHours {
|
|
7293
7453
|
tz: string;
|
|
7294
7454
|
calendar?: 'mon-fri' | {
|
|
@@ -7376,6 +7536,43 @@ export declare interface WorkflowMergePolicy {
|
|
|
7376
7536
|
onConflict: 'fail' | 'agent';
|
|
7377
7537
|
}
|
|
7378
7538
|
|
|
7539
|
+
/**
|
|
7540
|
+
* [WMC-E7] §6.4 — the consent card, as the SERVER builds it.
|
|
7541
|
+
*
|
|
7542
|
+
* The twin of E6's `WorkflowRunDetail.modelConsent`, narrowed to what the CLI reads. `card` is the
|
|
7543
|
+
* already-rendered card and is printed verbatim; `plan` rides along for `--json` consumers and is never
|
|
7544
|
+
* re-rendered here. There is deliberately no CLI-side card shape and no CLI-side renderer: the number a
|
|
7545
|
+
* person consents to is worded once, by the projection, so the CLI, REST and the desktop cannot disagree.
|
|
7546
|
+
*
|
|
7547
|
+
* Absent on every run that assigned no model, which includes every run written before the change.
|
|
7548
|
+
*/
|
|
7549
|
+
declare interface WorkflowModelConsentView {
|
|
7550
|
+
/** The structured plan behind the card. Passed through to `--json`; the CLI never renders from it. */
|
|
7551
|
+
plan?: {
|
|
7552
|
+
runName?: string;
|
|
7553
|
+
stepCount?: number;
|
|
7554
|
+
steps?: Array<{
|
|
7555
|
+
index?: number;
|
|
7556
|
+
stepId?: string;
|
|
7557
|
+
kind?: string;
|
|
7558
|
+
modelClass?: string;
|
|
7559
|
+
pin?: string;
|
|
7560
|
+
likelyModel?: string;
|
|
7561
|
+
effort?: string;
|
|
7562
|
+
reason?: string;
|
|
7563
|
+
}>;
|
|
7564
|
+
cost?: {
|
|
7565
|
+
actionsLowerBound?: number;
|
|
7566
|
+
agentModelActions?: number;
|
|
7567
|
+
unit?: 'actions' | 'credits';
|
|
7568
|
+
};
|
|
7569
|
+
};
|
|
7570
|
+
/** The rendered card, line by line. What `lua workflows start` prints, unchanged. */
|
|
7571
|
+
card?: string[];
|
|
7572
|
+
}
|
|
7573
|
+
|
|
7574
|
+
declare type WorkflowModelTrait = (typeof WORKFLOW_MODEL_TRAITS)[number];
|
|
7575
|
+
|
|
7379
7576
|
declare type WorkflowOnError = (typeof WORKFLOW_ON_ERROR)[number];
|
|
7380
7577
|
|
|
7381
7578
|
/**
|
|
@@ -7446,6 +7643,28 @@ declare interface WorkflowRun {
|
|
|
7446
7643
|
* else `none`. Absent on an older server.
|
|
7447
7644
|
*/
|
|
7448
7645
|
nextAction?: 'cancel_again' | 'force' | 'none' | 'raise_budget' | 'top_up';
|
|
7646
|
+
/**
|
|
7647
|
+
* [WMC-A6] The START's consent stamp, as A5 projects it (research §H2 "the consent stamp").
|
|
7648
|
+
*
|
|
7649
|
+
* `via` is the discriminator and it is what the CLI renders on: `'human'` is a person who cleared the
|
|
7650
|
+
* consent gate, `'autonomy'` is A3's pre-consented envelope (`approvedBy: 'system:policy'`). Absent on
|
|
7651
|
+
* every run started before the stamp existed, and on every server that does not project it — which is why
|
|
7652
|
+
* `via` is optional beside a `consent` that may be present with nothing else the CLI reads (D28: a run
|
|
7653
|
+
* with a stamp but no `via` prints no consent line rather than guessing at one).
|
|
7654
|
+
*
|
|
7655
|
+
* The union is left open (`| string`) on purpose, §6.9: a NEWER server may stamp a `via` this CLI has
|
|
7656
|
+
* never heard of, and an unknown member must fall through to "print nothing", never to a crash or to a
|
|
7657
|
+
* line worded as if it were one of the two known ones.
|
|
7658
|
+
*/
|
|
7659
|
+
consent?: {
|
|
7660
|
+
approvedBy?: string;
|
|
7661
|
+
at?: number;
|
|
7662
|
+
/** The HITL approval link a human decision was recorded against. Optional since A2 — an autonomous start has none. */
|
|
7663
|
+
approvalLinkId?: string;
|
|
7664
|
+
via?: 'human' | 'autonomy' | string;
|
|
7665
|
+
/** The resolved envelope an `autonomy` start was admitted under — the numbers the line quotes. */
|
|
7666
|
+
envelope?: WorkflowAutonomyEnvelopeDto;
|
|
7667
|
+
};
|
|
7449
7668
|
/**
|
|
7450
7669
|
* The pending / audited cancel request (`runCancelView`): who asked and when; `wall` when it was the run wall's
|
|
7451
7670
|
* own (LUA-686); LUA-704: `forcedBy` / `forcedAt` / `forceReason` on a forced terminal (`abandoned`, or
|
|
@@ -7502,6 +7721,20 @@ declare interface WorkflowRun {
|
|
|
7502
7721
|
steps?: number;
|
|
7503
7722
|
inputTokens?: number;
|
|
7504
7723
|
outputTokens?: number;
|
|
7724
|
+
/**
|
|
7725
|
+
* [WMC-E7] §6.6 — the run's spend split by the model that actually served each call, present only once
|
|
7726
|
+
* the server projects it (a run that never reached an agent step, and every older server, omit it).
|
|
7727
|
+
* `lua workflows status` prints the roll-up when it is there and says nothing when it is not.
|
|
7728
|
+
*/
|
|
7729
|
+
byModel?: WorkflowRunModelUsageRow[];
|
|
7730
|
+
/**
|
|
7731
|
+
* [WJB-B5] (BAC-671) — the run's token components, summed by the server from the usage rows its charges
|
|
7732
|
+
* were written from (per-call `workflow:job` rows on the Job tier, `llm:inference` rows off it).
|
|
7733
|
+
* `inputTokens` is the UNCACHED prompt; the two cache figures are read and write. Present only once the
|
|
7734
|
+
* server projects it (a metered run on a server that has this change) — the CLI prints nothing otherwise,
|
|
7735
|
+
* and never adds the members together: cache reads are a SUBSET of input on OpenAI-compatible providers.
|
|
7736
|
+
*/
|
|
7737
|
+
tokens?: WorkflowRunTokensDto;
|
|
7505
7738
|
};
|
|
7506
7739
|
/**
|
|
7507
7740
|
* R4: the run's caps and settled spend. `maxCredits` and `remaining` are both absent on an uncapped run (`0` = unset);
|
|
@@ -7519,6 +7752,12 @@ declare interface WorkflowRun {
|
|
|
7519
7752
|
};
|
|
7520
7753
|
reserved?: number;
|
|
7521
7754
|
remaining?: number;
|
|
7755
|
+
/**
|
|
7756
|
+
* [WJB-B5] (BAC-677): the run went PAST its cap and finished anyway — the crossing step was terminal for
|
|
7757
|
+
* the run, so it completed rather than parking for a raise nobody could act on. `true` or ABSENT on the
|
|
7758
|
+
* wire, never `false`; the CLI prints it and never derives it from `spent > maxCredits`.
|
|
7759
|
+
*/
|
|
7760
|
+
exceeded?: boolean;
|
|
7522
7761
|
};
|
|
7523
7762
|
createdAt: string;
|
|
7524
7763
|
startedAt?: string;
|
|
@@ -7526,9 +7765,41 @@ declare interface WorkflowRun {
|
|
|
7526
7765
|
updatedAt: string;
|
|
7527
7766
|
}
|
|
7528
7767
|
|
|
7768
|
+
/**
|
|
7769
|
+
* [WMC-E7] §6.6 — one row of `usage.byModel`: what a model was actually asked to do on this run and what it
|
|
7770
|
+
* cost. `model` is the SERVED code (canonicalised from the meter), which is not necessarily what the step
|
|
7771
|
+
* requested — a same-class hop is recorded here under the model that answered.
|
|
7772
|
+
*/
|
|
7773
|
+
declare interface WorkflowRunModelUsageRow {
|
|
7774
|
+
/** The served model code, `provider/model`. */
|
|
7775
|
+
model: string;
|
|
7776
|
+
/** The model class it served for, when the step asked for one. */
|
|
7777
|
+
class?: string;
|
|
7778
|
+
/** Model calls served by this model on this run. */
|
|
7779
|
+
calls?: number;
|
|
7780
|
+
/** Priced actions on a seat plan. */
|
|
7781
|
+
actions?: number;
|
|
7782
|
+
/** Credits on the legacy plan. */
|
|
7783
|
+
credits?: number;
|
|
7784
|
+
/** Steps whose request this model answered because an earlier leg failed. */
|
|
7785
|
+
fallbacks?: number;
|
|
7786
|
+
}
|
|
7787
|
+
|
|
7529
7788
|
/** §02 §2.4 run statuses (one union across every section). */
|
|
7530
7789
|
declare type WorkflowRunStatus = 'queued' | 'running' | 'cancellation_requested' | 'gated' | 'suspended' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'abandoned' | 'timed_out';
|
|
7531
7790
|
|
|
7791
|
+
/**
|
|
7792
|
+
* [WJB-B5] (BAC-671) — the four token figures the server sums per run and per step (`WorkflowRunTokens` in
|
|
7793
|
+
* `@lua/shared-types`). Every member optional: the CLI is a reader of whatever the server sends, and a figure
|
|
7794
|
+
* a server does not project must print as nothing rather than as a zero the run never reported.
|
|
7795
|
+
*/
|
|
7796
|
+
declare interface WorkflowRunTokensDto {
|
|
7797
|
+
inputTokens?: number;
|
|
7798
|
+
cacheReadTokens?: number;
|
|
7799
|
+
cacheCreationTokens?: number;
|
|
7800
|
+
outputTokens?: number;
|
|
7801
|
+
}
|
|
7802
|
+
|
|
7532
7803
|
export declare type WorkflowRunTrigger = 'chat' | 'sdk' | 'api' | 'schedule' | 'webhook' | 'template' | 'workflow' | 'device';
|
|
7533
7804
|
|
|
7534
7805
|
/**
|
|
@@ -7868,6 +8139,8 @@ export declare type WorkflowSuspendTimeoutChainMember = 'deny' | 'cancel-run' |
|
|
|
7868
8139
|
timeoutHours: number;
|
|
7869
8140
|
};
|
|
7870
8141
|
|
|
8142
|
+
declare type WorkflowTaskClass = (typeof WORKFLOW_TASK_CLASSES)[number];
|
|
8143
|
+
|
|
7871
8144
|
declare type WorkflowTier = (typeof WORKFLOW_TIERS)[number];
|
|
7872
8145
|
|
|
7873
8146
|
export declare type WorkflowWorkspaceBackend = 'ebs' | 'efs' | 's3';
|