lua-cli 3.34.0 → 3.36.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 +298 -20
- package/dist/api-exports.js +438 -198
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1334 -234
- 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 +370 -195
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +2 -2
- package/docs/api/LuaWorkflow.md +1 -1
- package/docs/api/Workflows.md +1 -1
- package/docs/workflows/migrating-runs.md +1 -1
- package/docs/workflows/recovery.md +4 -4
- package/docs/workflows/testing-offline.md +1 -1
- package/package.json +7 -6
- 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
|
|
@@ -215,6 +244,16 @@ declare interface AgentInvocationMeter {
|
|
|
215
244
|
toolNames?: string[];
|
|
216
245
|
byok?: boolean;
|
|
217
246
|
chargedCredits?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Workflow model classes (plan 6.4, the `effort` row; round-2 architect finding 7) — the
|
|
249
|
+
* effort that was ACTUALLY applied to the turn: the request/agent/tier merge clamped to the
|
|
250
|
+
* SERVED model's `efforts` ladder, which is not always what was asked for (a row whose ladder
|
|
251
|
+
* omits `medium` serves `low`). Server-owned and stamped beside `model` on the same
|
|
252
|
+
* `operationId`-bearing loopback turns, so the worker can record it on the step row without a
|
|
253
|
+
* seventh hop of its own. Absent when no effort was in play (no requested effort, or a model
|
|
254
|
+
* that advertises no reasoning) — a non-effort turn's meter is byte-identical to today's.
|
|
255
|
+
*/
|
|
256
|
+
effortApplied?: ReasoningEffort;
|
|
218
257
|
}
|
|
219
258
|
|
|
220
259
|
declare interface AgentInvocationOutput {
|
|
@@ -370,6 +409,30 @@ export declare interface AgentStepOptions {
|
|
|
370
409
|
*/
|
|
371
410
|
maxMessages?: number;
|
|
372
411
|
maxInputTokens?: number;
|
|
412
|
+
/**
|
|
413
|
+
* What this step DOES: `classify` | `extract` | `transform` | `draft` | `research` | `reason` | `code` |
|
|
414
|
+
* `judge`. On a PUSHED definition it must come with a `model` — a static `taskClass` with none is refused
|
|
415
|
+
* `task-class-without-model`, because nothing maps a task class to a model at dispatch.
|
|
416
|
+
*/
|
|
417
|
+
taskClass?: WorkflowTaskClass;
|
|
418
|
+
/**
|
|
419
|
+
* Traits the chosen model must have: `vision` | `structured` | `largeContext` | `codeExecution`. Write these
|
|
420
|
+
* rather than pinning a code that may retire. A step with an `outputSchema` needs `structured`; one reading
|
|
421
|
+
* images needs `vision`.
|
|
422
|
+
*/
|
|
423
|
+
requires?: WorkflowModelTrait[];
|
|
424
|
+
/** One line on why this class or pin was chosen — at most 160 characters, plain text, never parsed. */
|
|
425
|
+
modelReason?: string;
|
|
426
|
+
/**
|
|
427
|
+
* Reasoning effort for this step: `low` for fast work and tool-heavy orchestration, `high` for `reason` and
|
|
428
|
+
* `code`, `medium` otherwise. Inert on rows whose ladder is toggle-only.
|
|
429
|
+
*
|
|
430
|
+
* COMPATIBILITY: writing it changes nothing on its own. A plain `lua push` keeps the envelope at
|
|
431
|
+
* `luaWorkflow: 1`, and the executor forwards effort only when the run's frozen snapshot says 2 — opted into
|
|
432
|
+
* by `lua push --apply-effort` or by a new compose while assignment is on (plan 6.4, "The effort marker").
|
|
433
|
+
* Until then the value is carried and estimated, never applied.
|
|
434
|
+
*/
|
|
435
|
+
effort?: WorkflowAgentEffort;
|
|
373
436
|
}
|
|
374
437
|
|
|
375
438
|
export declare interface AgentToolScope {
|
|
@@ -1394,6 +1457,52 @@ export declare type ChatMessage = TextMessage | ImageMessage | FileMessage;
|
|
|
1394
1457
|
*/
|
|
1395
1458
|
export declare type ContainerArm = StepRef | [LuaMapConfig, StepRef];
|
|
1396
1459
|
|
|
1460
|
+
/**
|
|
1461
|
+
* Who is in the conversation this turn runs in.
|
|
1462
|
+
*/
|
|
1463
|
+
export declare type ConversationKind = 'direct' | 'group';
|
|
1464
|
+
|
|
1465
|
+
export declare interface ConversationParticipant {
|
|
1466
|
+
/** Lua user id. For a Teams participant this is the user Lua minted for them. */
|
|
1467
|
+
userId: string;
|
|
1468
|
+
/** Server-resolved display name. */
|
|
1469
|
+
displayName: string;
|
|
1470
|
+
/** True for the room owner (desktop rooms); absent on channel rooms, which have no human owner. */
|
|
1471
|
+
isOwner?: boolean;
|
|
1472
|
+
/** True for the person who sent this turn. */
|
|
1473
|
+
isCurrentSpeaker?: boolean;
|
|
1474
|
+
/** How this person is known on the external channel (Teams group chats). */
|
|
1475
|
+
channelIdentity?: {
|
|
1476
|
+
provider: 'teams' | 'slack' | 'whatsapp';
|
|
1477
|
+
externalId: string;
|
|
1478
|
+
email?: string;
|
|
1479
|
+
};
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* The conversation a turn runs in. Present on group turns (a desktop room or a
|
|
1484
|
+
* Teams group chat); undefined on 1:1 chats, jobs, webhooks, triggers and
|
|
1485
|
+
* workflow steps.
|
|
1486
|
+
*/
|
|
1487
|
+
export declare interface ConversationRef {
|
|
1488
|
+
/** The room conversation id (`room:<id>`). */
|
|
1489
|
+
id: string;
|
|
1490
|
+
kind: ConversationKind;
|
|
1491
|
+
channel: Channel;
|
|
1492
|
+
/** The provider's conversation id; pass it to `Channels.send({ to: { conversationId } })` to reply proactively. */
|
|
1493
|
+
externalId?: string;
|
|
1494
|
+
currentSpeakerId?: string;
|
|
1495
|
+
/** Capped at 50 entries, current speaker first; see `participantCount` and `truncated`. */
|
|
1496
|
+
participants: ConversationParticipant[];
|
|
1497
|
+
participantCount: number;
|
|
1498
|
+
truncated: boolean;
|
|
1499
|
+
/** The agents seated in the conversation. */
|
|
1500
|
+
agents?: Array<{
|
|
1501
|
+
agentId: string;
|
|
1502
|
+
name?: string;
|
|
1503
|
+
}>;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1397
1506
|
/**
|
|
1398
1507
|
* Options for creating a custom data entry.
|
|
1399
1508
|
*/
|
|
@@ -3056,6 +3165,13 @@ export declare const lte: (l: TypedRef<number> | number, r: TypedRef<number> | L
|
|
|
3056
3165
|
* if (Lua.request.webhook) {
|
|
3057
3166
|
* const payload = Lua.request.webhook.payload;
|
|
3058
3167
|
* }
|
|
3168
|
+
*
|
|
3169
|
+
* // In a group conversation (a desktop room or a Teams group chat), see who is in it
|
|
3170
|
+
* const conversation = Lua.request.conversation;
|
|
3171
|
+
* if (conversation?.kind === 'group') {
|
|
3172
|
+
* const speaker = conversation.participants.find((p) => p.isCurrentSpeaker);
|
|
3173
|
+
* const others = conversation.participants.filter((p) => !p.isCurrentSpeaker).map((p) => p.displayName);
|
|
3174
|
+
* }
|
|
3059
3175
|
* ```
|
|
3060
3176
|
*/
|
|
3061
3177
|
export declare const Lua: LuaRuntime;
|
|
@@ -3603,6 +3719,26 @@ export declare interface LuaRequest {
|
|
|
3603
3719
|
channel: Channel;
|
|
3604
3720
|
/** Webhook data from channel integrations (only present for webhook-based channels) */
|
|
3605
3721
|
webhook?: WebhookRequest;
|
|
3722
|
+
/**
|
|
3723
|
+
* Free-text context passed by the calling surface for this turn (e.g. LuaPop's
|
|
3724
|
+
* `LuaPop.init({ runtimeContext })`, or the `runtimeContext` field on the chat
|
|
3725
|
+
* request body). Also injected into the model's system prompt. Present only when
|
|
3726
|
+
* the caller supplied it.
|
|
3727
|
+
*/
|
|
3728
|
+
runtimeContext?: string;
|
|
3729
|
+
/** The chat thread id for this turn. */
|
|
3730
|
+
threadId?: string;
|
|
3731
|
+
/** The resolved IANA timezone for this turn (e.g. "Africa/Nairobi"). */
|
|
3732
|
+
timezone?: string;
|
|
3733
|
+
/** The id of the user this turn is acting for, when a user is resolved. */
|
|
3734
|
+
userId?: string;
|
|
3735
|
+
/** The id of the agent handling this turn. */
|
|
3736
|
+
agentId?: string;
|
|
3737
|
+
/**
|
|
3738
|
+
* The group conversation this turn belongs to, with its participants and the
|
|
3739
|
+
* current speaker. Undefined on 1:1 turns and on non-chat executions.
|
|
3740
|
+
*/
|
|
3741
|
+
conversation?: ConversationRef;
|
|
3606
3742
|
}
|
|
3607
3743
|
|
|
3608
3744
|
/**
|
|
@@ -4002,13 +4138,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4002
4138
|
}, "strip", z.ZodTypeAny, {
|
|
4003
4139
|
provider?: "deepgram" | "elevenlabs";
|
|
4004
4140
|
kind?: "plugin";
|
|
4005
|
-
options?: Record<string, unknown>;
|
|
4006
4141
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4142
|
+
options?: Record<string, unknown>;
|
|
4007
4143
|
}, {
|
|
4008
4144
|
provider?: "deepgram" | "elevenlabs";
|
|
4009
4145
|
kind?: "plugin";
|
|
4010
|
-
options?: Record<string, unknown>;
|
|
4011
4146
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4147
|
+
options?: Record<string, unknown>;
|
|
4012
4148
|
}>, z.ZodObject<{
|
|
4013
4149
|
kind: z.ZodLiteral<"realtime">;
|
|
4014
4150
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -4068,13 +4204,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4068
4204
|
}, "strip", z.ZodTypeAny, {
|
|
4069
4205
|
provider?: "deepgram" | "elevenlabs";
|
|
4070
4206
|
kind?: "plugin";
|
|
4071
|
-
options?: Record<string, unknown>;
|
|
4072
4207
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4208
|
+
options?: Record<string, unknown>;
|
|
4073
4209
|
}, {
|
|
4074
4210
|
provider?: "deepgram" | "elevenlabs";
|
|
4075
4211
|
kind?: "plugin";
|
|
4076
|
-
options?: Record<string, unknown>;
|
|
4077
4212
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4213
|
+
options?: Record<string, unknown>;
|
|
4078
4214
|
}>, z.ZodObject<{
|
|
4079
4215
|
kind: z.ZodLiteral<"realtime">;
|
|
4080
4216
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -4134,13 +4270,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4134
4270
|
}, "strip", z.ZodTypeAny, {
|
|
4135
4271
|
provider?: "deepgram" | "elevenlabs";
|
|
4136
4272
|
kind?: "plugin";
|
|
4137
|
-
options?: Record<string, unknown>;
|
|
4138
4273
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4274
|
+
options?: Record<string, unknown>;
|
|
4139
4275
|
}, {
|
|
4140
4276
|
provider?: "deepgram" | "elevenlabs";
|
|
4141
4277
|
kind?: "plugin";
|
|
4142
|
-
options?: Record<string, unknown>;
|
|
4143
4278
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4279
|
+
options?: Record<string, unknown>;
|
|
4144
4280
|
}>, z.ZodObject<{
|
|
4145
4281
|
kind: z.ZodLiteral<"realtime">;
|
|
4146
4282
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -4326,8 +4462,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4326
4462
|
} | {
|
|
4327
4463
|
provider?: "deepgram" | "elevenlabs";
|
|
4328
4464
|
kind?: "plugin";
|
|
4329
|
-
options?: Record<string, unknown>;
|
|
4330
4465
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4466
|
+
options?: Record<string, unknown>;
|
|
4331
4467
|
} | {
|
|
4332
4468
|
provider?: "google" | "xai" | "openai";
|
|
4333
4469
|
kind?: "realtime";
|
|
@@ -4342,8 +4478,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4342
4478
|
} | {
|
|
4343
4479
|
provider?: "deepgram" | "elevenlabs";
|
|
4344
4480
|
kind?: "plugin";
|
|
4345
|
-
options?: Record<string, unknown>;
|
|
4346
4481
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4482
|
+
options?: Record<string, unknown>;
|
|
4347
4483
|
} | {
|
|
4348
4484
|
provider?: "google" | "xai" | "openai";
|
|
4349
4485
|
kind?: "realtime";
|
|
@@ -4357,8 +4493,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4357
4493
|
} | {
|
|
4358
4494
|
provider?: "deepgram" | "elevenlabs";
|
|
4359
4495
|
kind?: "plugin";
|
|
4360
|
-
options?: Record<string, unknown>;
|
|
4361
4496
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4497
|
+
options?: Record<string, unknown>;
|
|
4362
4498
|
} | {
|
|
4363
4499
|
provider?: "google" | "xai" | "openai";
|
|
4364
4500
|
kind?: "realtime";
|
|
@@ -4420,8 +4556,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4420
4556
|
} | {
|
|
4421
4557
|
provider?: "deepgram" | "elevenlabs";
|
|
4422
4558
|
kind?: "plugin";
|
|
4423
|
-
options?: Record<string, unknown>;
|
|
4424
4559
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4560
|
+
options?: Record<string, unknown>;
|
|
4425
4561
|
} | {
|
|
4426
4562
|
provider?: "google" | "xai" | "openai";
|
|
4427
4563
|
kind?: "realtime";
|
|
@@ -4436,8 +4572,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4436
4572
|
} | {
|
|
4437
4573
|
provider?: "deepgram" | "elevenlabs";
|
|
4438
4574
|
kind?: "plugin";
|
|
4439
|
-
options?: Record<string, unknown>;
|
|
4440
4575
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4576
|
+
options?: Record<string, unknown>;
|
|
4441
4577
|
} | {
|
|
4442
4578
|
provider?: "google" | "xai" | "openai";
|
|
4443
4579
|
kind?: "realtime";
|
|
@@ -4451,8 +4587,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4451
4587
|
} | {
|
|
4452
4588
|
provider?: "deepgram" | "elevenlabs";
|
|
4453
4589
|
kind?: "plugin";
|
|
4454
|
-
options?: Record<string, unknown>;
|
|
4455
4590
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4591
|
+
options?: Record<string, unknown>;
|
|
4456
4592
|
} | {
|
|
4457
4593
|
provider?: "google" | "xai" | "openai";
|
|
4458
4594
|
kind?: "realtime";
|
|
@@ -4514,8 +4650,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4514
4650
|
} | {
|
|
4515
4651
|
provider?: "deepgram" | "elevenlabs";
|
|
4516
4652
|
kind?: "plugin";
|
|
4517
|
-
options?: Record<string, unknown>;
|
|
4518
4653
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4654
|
+
options?: Record<string, unknown>;
|
|
4519
4655
|
} | {
|
|
4520
4656
|
provider?: "google" | "xai" | "openai";
|
|
4521
4657
|
kind?: "realtime";
|
|
@@ -4530,8 +4666,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4530
4666
|
} | {
|
|
4531
4667
|
provider?: "deepgram" | "elevenlabs";
|
|
4532
4668
|
kind?: "plugin";
|
|
4533
|
-
options?: Record<string, unknown>;
|
|
4534
4669
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4670
|
+
options?: Record<string, unknown>;
|
|
4535
4671
|
} | {
|
|
4536
4672
|
provider?: "google" | "xai" | "openai";
|
|
4537
4673
|
kind?: "realtime";
|
|
@@ -4545,8 +4681,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4545
4681
|
} | {
|
|
4546
4682
|
provider?: "deepgram" | "elevenlabs";
|
|
4547
4683
|
kind?: "plugin";
|
|
4548
|
-
options?: Record<string, unknown>;
|
|
4549
4684
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4685
|
+
options?: Record<string, unknown>;
|
|
4550
4686
|
} | {
|
|
4551
4687
|
provider?: "google" | "xai" | "openai";
|
|
4552
4688
|
kind?: "realtime";
|
|
@@ -4608,8 +4744,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4608
4744
|
} | {
|
|
4609
4745
|
provider?: "deepgram" | "elevenlabs";
|
|
4610
4746
|
kind?: "plugin";
|
|
4611
|
-
options?: Record<string, unknown>;
|
|
4612
4747
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4748
|
+
options?: Record<string, unknown>;
|
|
4613
4749
|
} | {
|
|
4614
4750
|
provider?: "google" | "xai" | "openai";
|
|
4615
4751
|
kind?: "realtime";
|
|
@@ -4624,8 +4760,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4624
4760
|
} | {
|
|
4625
4761
|
provider?: "deepgram" | "elevenlabs";
|
|
4626
4762
|
kind?: "plugin";
|
|
4627
|
-
options?: Record<string, unknown>;
|
|
4628
4763
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4764
|
+
options?: Record<string, unknown>;
|
|
4629
4765
|
} | {
|
|
4630
4766
|
provider?: "google" | "xai" | "openai";
|
|
4631
4767
|
kind?: "realtime";
|
|
@@ -4639,8 +4775,8 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4639
4775
|
} | {
|
|
4640
4776
|
provider?: "deepgram" | "elevenlabs";
|
|
4641
4777
|
kind?: "plugin";
|
|
4642
|
-
options?: Record<string, unknown>;
|
|
4643
4778
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4779
|
+
options?: Record<string, unknown>;
|
|
4644
4780
|
} | {
|
|
4645
4781
|
provider?: "google" | "xai" | "openai";
|
|
4646
4782
|
kind?: "realtime";
|
|
@@ -6364,6 +6500,12 @@ declare interface StartWorkflowRunResult {
|
|
|
6364
6500
|
/** ISO — the existing run's creation time. */
|
|
6365
6501
|
startedAt?: string;
|
|
6366
6502
|
output?: unknown;
|
|
6503
|
+
/**
|
|
6504
|
+
* [WMC-E7] §6.4 — the run's `modelConsent`, the SAME object the run detail carries, served with a `gated`
|
|
6505
|
+
* start so the person deciding sees the plan and the cost line at the moment they are asked. Absent on a
|
|
6506
|
+
* run that assigned no model and on every server that does not serve it.
|
|
6507
|
+
*/
|
|
6508
|
+
modelConsent?: WorkflowModelConsentView;
|
|
6367
6509
|
}
|
|
6368
6510
|
|
|
6369
6511
|
export declare const state: <T = unknown>(path: string) => TypedRef<T>;
|
|
@@ -6756,8 +6898,11 @@ export declare const User: {
|
|
|
6756
6898
|
getChatHistory(): Promise<ChatHistoryMessage[]>;
|
|
6757
6899
|
/**
|
|
6758
6900
|
* PRO-1208 (B7) — push an approve/redirect/fix card to YOUR OWN inbox.
|
|
6759
|
-
* Capped
|
|
6760
|
-
*
|
|
6901
|
+
* Capped per kind at 500/day per agent per end-user by default
|
|
6902
|
+
* (`LUA_INBOX_AGENT_DEPOSIT_DAILY_CAP`); `priority: 'urgent'` is limited to
|
|
6903
|
+
* 5/day by default (`LUA_INBOX_URGENT_PUSH_DAILY_CAP`) and lands demoted to
|
|
6904
|
+
* `high` when over budget — never dropped. Same-`key` pushes revise in place.
|
|
6905
|
+
* Cap-hit resolves to `{outcome: 'capped'}` — never throws.
|
|
6761
6906
|
*
|
|
6762
6907
|
* @example
|
|
6763
6908
|
* const receipt = await User.Inbox.push({
|
|
@@ -7212,6 +7357,9 @@ declare interface WhatsAppTemplateUrlButton {
|
|
|
7212
7357
|
example?: string | string[];
|
|
7213
7358
|
}
|
|
7214
7359
|
|
|
7360
|
+
/** `agent.effort` — the reasoning-effort hint a graph agent node may carry (lua-core's envelope member). */
|
|
7361
|
+
declare const WORKFLOW_AGENT_EFFORTS: readonly ["low", "medium", "high"];
|
|
7362
|
+
|
|
7215
7363
|
/** `approval.onDeny` (§6.4.11 deny-as-data): `'fail'` fails the step on a denial; default `'continue'`. */
|
|
7216
7364
|
declare const WORKFLOW_APPROVAL_ON_DENY: readonly ["fail", "continue"];
|
|
7217
7365
|
|
|
@@ -7221,6 +7369,13 @@ declare const WORKFLOW_JOB_HARNESSES: readonly ["claude-code", "generic"];
|
|
|
7221
7369
|
/** `jobResources` (05 §5.17): the Job-tier pod size class. Default `'small'` at spawn. */
|
|
7222
7370
|
declare const WORKFLOW_JOB_RESOURCES: readonly ["small", "medium", "large"];
|
|
7223
7371
|
|
|
7372
|
+
/**
|
|
7373
|
+
* Required traits — capabilities the chosen model MUST have (`AgentNode.requires`), so a composed step can
|
|
7374
|
+
* say "needs vision" without pinning a code that may retire. Derived from the catalog row's `media`,
|
|
7375
|
+
* `structuredOutput`, `contextWindow` and `tools.codeExecution` (plan 6.2).
|
|
7376
|
+
*/
|
|
7377
|
+
declare const WORKFLOW_MODEL_TRAITS: readonly ["vision", "structured", "largeContext", "codeExecution"];
|
|
7378
|
+
|
|
7224
7379
|
/** What the FINAL failure of a step does to the run: `'park'` → the §06 §6.3.5 exception gate. Default `'fail'`. */
|
|
7225
7380
|
declare const WORKFLOW_ON_ERROR: readonly ["fail", "continue", "park"];
|
|
7226
7381
|
|
|
@@ -7233,9 +7388,18 @@ declare const WORKFLOW_SIDE_EFFECTS: readonly ["none", "external"];
|
|
|
7233
7388
|
/** `waitForSignal.onTimeout`: default `'fail'`; `'continue'` ⇒ output `{received:false, timedOut:true}`. */
|
|
7234
7389
|
declare const WORKFLOW_SIGNAL_ON_TIMEOUT: readonly ["fail", "continue"];
|
|
7235
7390
|
|
|
7391
|
+
/**
|
|
7392
|
+
* Task class — what a step DOES, the composer's primary output for model choice (`AgentNode.taskClass`).
|
|
7393
|
+
* The platform maps a task class to a model class (plan 6.3's default `classMap`; an org may override it),
|
|
7394
|
+
* so a composer never has to reason about concrete models. Eight values to start.
|
|
7395
|
+
*/
|
|
7396
|
+
declare const WORKFLOW_TASK_CLASSES: readonly ["classify", "extract", "transform", "draft", "research", "reason", "code", "judge"];
|
|
7397
|
+
|
|
7236
7398
|
/** The only tier a node may DECLARE (`tier:'job'`, implied by `workspace`); the worker tier is the absence. */
|
|
7237
7399
|
declare const WORKFLOW_TIERS: readonly ["job"];
|
|
7238
7400
|
|
|
7401
|
+
declare type WorkflowAgentEffort = (typeof WORKFLOW_AGENT_EFFORTS)[number];
|
|
7402
|
+
|
|
7239
7403
|
declare type WorkflowApprovalOnDeny = (typeof WORKFLOW_APPROVAL_ON_DENY)[number];
|
|
7240
7404
|
|
|
7241
7405
|
export declare type WorkflowApproverSpec = 'creator' | 'org-admins' | {
|
|
@@ -7271,6 +7435,33 @@ export declare interface WorkflowArtefactMeta {
|
|
|
7271
7435
|
};
|
|
7272
7436
|
}
|
|
7273
7437
|
|
|
7438
|
+
/**
|
|
7439
|
+
* [WMC-A6] research §H2 — the organization's `autonomy` block: the pre-consented ENVELOPE inside which a
|
|
7440
|
+
* start that would have asked a person starts on its own instead (`ask → auto`).
|
|
7441
|
+
*
|
|
7442
|
+
* Every member is optional and absent means "the platform default applies". The CLI never fills one in and
|
|
7443
|
+
* never computes one: what a run is actually admitted under is `effectiveWorkflowAutonomy(policy, agent)`'s
|
|
7444
|
+
* answer, served back by `GET ?effective=true`, and the two are rendered side by side rather than merged
|
|
7445
|
+
* here — a CLI that guessed at the resolution would be a second source of truth for a price nobody consents
|
|
7446
|
+
* to twice.
|
|
7447
|
+
*
|
|
7448
|
+
* `enabled` is the one member whose absence is a VALUE rather than a platform default: absent ⇒ false. That
|
|
7449
|
+
* is deliberate (research §H2 — autonomy is the file's single opt-in default), so `get` words it as such.
|
|
7450
|
+
*/
|
|
7451
|
+
declare interface WorkflowAutonomyEnvelopeDto {
|
|
7452
|
+
/** Absent ⇒ FALSE. The org opt-in; `enabled: false` on the agent or the platform switch still wins above it. */
|
|
7453
|
+
enabled?: boolean;
|
|
7454
|
+
maxCredits?: number;
|
|
7455
|
+
maxSteps?: number;
|
|
7456
|
+
/** Sized against the ladder's duration BOUND, not a wall (research §H2) — which is why the default is a day. */
|
|
7457
|
+
maxDurationSeconds?: number;
|
|
7458
|
+
/** The model overlay's estimated actions — the fourth ladder dimension (research §B4). */
|
|
7459
|
+
maxActions?: number;
|
|
7460
|
+
maxRunsPerHour?: number;
|
|
7461
|
+
/** The composition forms the envelope admits; `script` opts in. */
|
|
7462
|
+
forms?: string[];
|
|
7463
|
+
}
|
|
7464
|
+
|
|
7274
7465
|
export declare interface WorkflowBusinessHours {
|
|
7275
7466
|
tz: string;
|
|
7276
7467
|
calendar?: 'mon-fri' | {
|
|
@@ -7358,6 +7549,43 @@ export declare interface WorkflowMergePolicy {
|
|
|
7358
7549
|
onConflict: 'fail' | 'agent';
|
|
7359
7550
|
}
|
|
7360
7551
|
|
|
7552
|
+
/**
|
|
7553
|
+
* [WMC-E7] §6.4 — the consent card, as the SERVER builds it.
|
|
7554
|
+
*
|
|
7555
|
+
* The twin of E6's `WorkflowRunDetail.modelConsent`, narrowed to what the CLI reads. `card` is the
|
|
7556
|
+
* already-rendered card and is printed verbatim; `plan` rides along for `--json` consumers and is never
|
|
7557
|
+
* re-rendered here. There is deliberately no CLI-side card shape and no CLI-side renderer: the number a
|
|
7558
|
+
* person consents to is worded once, by the projection, so the CLI, REST and the desktop cannot disagree.
|
|
7559
|
+
*
|
|
7560
|
+
* Absent on every run that assigned no model, which includes every run written before the change.
|
|
7561
|
+
*/
|
|
7562
|
+
declare interface WorkflowModelConsentView {
|
|
7563
|
+
/** The structured plan behind the card. Passed through to `--json`; the CLI never renders from it. */
|
|
7564
|
+
plan?: {
|
|
7565
|
+
runName?: string;
|
|
7566
|
+
stepCount?: number;
|
|
7567
|
+
steps?: Array<{
|
|
7568
|
+
index?: number;
|
|
7569
|
+
stepId?: string;
|
|
7570
|
+
kind?: string;
|
|
7571
|
+
modelClass?: string;
|
|
7572
|
+
pin?: string;
|
|
7573
|
+
likelyModel?: string;
|
|
7574
|
+
effort?: string;
|
|
7575
|
+
reason?: string;
|
|
7576
|
+
}>;
|
|
7577
|
+
cost?: {
|
|
7578
|
+
actionsLowerBound?: number;
|
|
7579
|
+
agentModelActions?: number;
|
|
7580
|
+
unit?: 'actions' | 'credits';
|
|
7581
|
+
};
|
|
7582
|
+
};
|
|
7583
|
+
/** The rendered card, line by line. What `lua workflows start` prints, unchanged. */
|
|
7584
|
+
card?: string[];
|
|
7585
|
+
}
|
|
7586
|
+
|
|
7587
|
+
declare type WorkflowModelTrait = (typeof WORKFLOW_MODEL_TRAITS)[number];
|
|
7588
|
+
|
|
7361
7589
|
declare type WorkflowOnError = (typeof WORKFLOW_ON_ERROR)[number];
|
|
7362
7590
|
|
|
7363
7591
|
/**
|
|
@@ -7428,6 +7656,28 @@ declare interface WorkflowRun {
|
|
|
7428
7656
|
* else `none`. Absent on an older server.
|
|
7429
7657
|
*/
|
|
7430
7658
|
nextAction?: 'cancel_again' | 'force' | 'none' | 'raise_budget' | 'top_up';
|
|
7659
|
+
/**
|
|
7660
|
+
* [WMC-A6] The START's consent stamp, as A5 projects it (research §H2 "the consent stamp").
|
|
7661
|
+
*
|
|
7662
|
+
* `via` is the discriminator and it is what the CLI renders on: `'human'` is a person who cleared the
|
|
7663
|
+
* consent gate, `'autonomy'` is A3's pre-consented envelope (`approvedBy: 'system:policy'`). Absent on
|
|
7664
|
+
* every run started before the stamp existed, and on every server that does not project it — which is why
|
|
7665
|
+
* `via` is optional beside a `consent` that may be present with nothing else the CLI reads (D28: a run
|
|
7666
|
+
* with a stamp but no `via` prints no consent line rather than guessing at one).
|
|
7667
|
+
*
|
|
7668
|
+
* The union is left open (`| string`) on purpose, §6.9: a NEWER server may stamp a `via` this CLI has
|
|
7669
|
+
* never heard of, and an unknown member must fall through to "print nothing", never to a crash or to a
|
|
7670
|
+
* line worded as if it were one of the two known ones.
|
|
7671
|
+
*/
|
|
7672
|
+
consent?: {
|
|
7673
|
+
approvedBy?: string;
|
|
7674
|
+
at?: number;
|
|
7675
|
+
/** The HITL approval link a human decision was recorded against. Optional since A2 — an autonomous start has none. */
|
|
7676
|
+
approvalLinkId?: string;
|
|
7677
|
+
via?: 'human' | 'autonomy' | string;
|
|
7678
|
+
/** The resolved envelope an `autonomy` start was admitted under — the numbers the line quotes. */
|
|
7679
|
+
envelope?: WorkflowAutonomyEnvelopeDto;
|
|
7680
|
+
};
|
|
7431
7681
|
/**
|
|
7432
7682
|
* The pending / audited cancel request (`runCancelView`): who asked and when; `wall` when it was the run wall's
|
|
7433
7683
|
* own (LUA-686); LUA-704: `forcedBy` / `forcedAt` / `forceReason` on a forced terminal (`abandoned`, or
|
|
@@ -7484,6 +7734,12 @@ declare interface WorkflowRun {
|
|
|
7484
7734
|
steps?: number;
|
|
7485
7735
|
inputTokens?: number;
|
|
7486
7736
|
outputTokens?: number;
|
|
7737
|
+
/**
|
|
7738
|
+
* [WMC-E7] §6.6 — the run's spend split by the model that actually served each call, present only once
|
|
7739
|
+
* the server projects it (a run that never reached an agent step, and every older server, omit it).
|
|
7740
|
+
* `lua workflows status` prints the roll-up when it is there and says nothing when it is not.
|
|
7741
|
+
*/
|
|
7742
|
+
byModel?: WorkflowRunModelUsageRow[];
|
|
7487
7743
|
};
|
|
7488
7744
|
/**
|
|
7489
7745
|
* R4: the run's caps and settled spend. `maxCredits` and `remaining` are both absent on an uncapped run (`0` = unset);
|
|
@@ -7508,6 +7764,26 @@ declare interface WorkflowRun {
|
|
|
7508
7764
|
updatedAt: string;
|
|
7509
7765
|
}
|
|
7510
7766
|
|
|
7767
|
+
/**
|
|
7768
|
+
* [WMC-E7] §6.6 — one row of `usage.byModel`: what a model was actually asked to do on this run and what it
|
|
7769
|
+
* cost. `model` is the SERVED code (canonicalised from the meter), which is not necessarily what the step
|
|
7770
|
+
* requested — a same-class hop is recorded here under the model that answered.
|
|
7771
|
+
*/
|
|
7772
|
+
declare interface WorkflowRunModelUsageRow {
|
|
7773
|
+
/** The served model code, `provider/model`. */
|
|
7774
|
+
model: string;
|
|
7775
|
+
/** The model class it served for, when the step asked for one. */
|
|
7776
|
+
class?: string;
|
|
7777
|
+
/** Model calls served by this model on this run. */
|
|
7778
|
+
calls?: number;
|
|
7779
|
+
/** Priced actions on a seat plan. */
|
|
7780
|
+
actions?: number;
|
|
7781
|
+
/** Credits on the legacy plan. */
|
|
7782
|
+
credits?: number;
|
|
7783
|
+
/** Steps whose request this model answered because an earlier leg failed. */
|
|
7784
|
+
fallbacks?: number;
|
|
7785
|
+
}
|
|
7786
|
+
|
|
7511
7787
|
/** §02 §2.4 run statuses (one union across every section). */
|
|
7512
7788
|
declare type WorkflowRunStatus = 'queued' | 'running' | 'cancellation_requested' | 'gated' | 'suspended' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'abandoned' | 'timed_out';
|
|
7513
7789
|
|
|
@@ -7850,6 +8126,8 @@ export declare type WorkflowSuspendTimeoutChainMember = 'deny' | 'cancel-run' |
|
|
|
7850
8126
|
timeoutHours: number;
|
|
7851
8127
|
};
|
|
7852
8128
|
|
|
8129
|
+
declare type WorkflowTaskClass = (typeof WORKFLOW_TASK_CLASSES)[number];
|
|
8130
|
+
|
|
7853
8131
|
declare type WorkflowTier = (typeof WORKFLOW_TIERS)[number];
|
|
7854
8132
|
|
|
7855
8133
|
export declare type WorkflowWorkspaceBackend = 'ebs' | 'efs' | 's3';
|