lua-cli 3.39.3 → 3.40.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 +434 -23
- package/dist/api-exports.js +1727 -525
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1538 -158
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +16 -5
- package/dist/workflow-builder.d.ts +52 -1
- package/dist/workflow-builder.js +1069 -259
- package/dist/workflow-builder.js.map +1 -1
- package/docs/API_REFERENCE.md +115 -45
- package/docs/api/Agents.md +111 -0
- package/docs/workflows/schedule-health.md +77 -0
- package/docs/workflows/schedules.md +6 -2
- package/package.json +6 -4
- package/template/package.json +1 -1
|
@@ -146,8 +146,8 @@ declare class LuaVoice {
|
|
|
146
146
|
readonly name: string;
|
|
147
147
|
readonly description?: string;
|
|
148
148
|
readonly llm: LuaVoiceModelInput;
|
|
149
|
-
readonly stt
|
|
150
|
-
readonly tts
|
|
149
|
+
readonly stt?: LuaVoiceModelInput;
|
|
150
|
+
readonly tts?: LuaVoiceModelInput;
|
|
151
151
|
readonly vad: LuaVoiceConfig['vad'];
|
|
152
152
|
readonly vadOptions: LuaVoiceConfig['vadOptions'];
|
|
153
153
|
readonly turnDetection: LuaVoiceConfig['turnDetection'];
|
|
@@ -176,11 +176,22 @@ declare type LuaVoiceConfig = z.infer<typeof LuaVoiceConfigSchema>;
|
|
|
176
176
|
* pass either a string descriptor or a plugin class instance. The wire schema
|
|
177
177
|
* (validated server-side) is the discriminated union in `@lua/shared-types`;
|
|
178
178
|
* the compiler is what bridges the two.
|
|
179
|
+
*
|
|
180
|
+
* `stt`/`tts` are unconditionally optional here at the type level — a
|
|
181
|
+
* realtime `llm` legitimately omits both. The realtime-vs-cascaded
|
|
182
|
+
* requirement (cascaded needs both) is enforced by the compiler's zod
|
|
183
|
+
* `superRefine` in `@lua/shared-types`, not by this type. `name` is
|
|
184
|
+
* deliberately required here (unlike `@lua/shared-types`'s wire schema,
|
|
185
|
+
* which leaves it optional for its own unrelated server-side
|
|
186
|
+
* placeholder-name use case) since the `LuaVoice` constructor throws
|
|
187
|
+
* without it and a nameless voice is otherwise silently dropped from the
|
|
188
|
+
* compiled manifest.
|
|
179
189
|
*/
|
|
180
|
-
declare interface LuaVoiceConfig_2 extends Omit<LuaVoiceConfig, 'llm' | 'stt' | 'tts'> {
|
|
190
|
+
declare interface LuaVoiceConfig_2 extends Omit<LuaVoiceConfig, 'llm' | 'stt' | 'tts' | 'name'> {
|
|
191
|
+
name: string;
|
|
181
192
|
llm: LuaVoiceModelInput;
|
|
182
|
-
stt
|
|
183
|
-
tts
|
|
193
|
+
stt?: LuaVoiceModelInput;
|
|
194
|
+
tts?: LuaVoiceModelInput;
|
|
184
195
|
/** Optional human-readable description (surfaced in manifest + admin listings). */
|
|
185
196
|
description?: string;
|
|
186
197
|
/** Voice-only tools, in addition to skills attached to the owning agent. */
|
|
@@ -48,6 +48,22 @@ export declare interface AgentStepOptions {
|
|
|
48
48
|
*/
|
|
49
49
|
maxMessages?: number;
|
|
50
50
|
maxInputTokens?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Claude Code plugins a tier:'job' coding turn loads (EM-WS3). Platform allowlist only — today
|
|
53
|
+
* `'lua-agent-builder'` (the lua-cli playbooks). Needs the claude-code harness (an Anthropic model) and the `shell`
|
|
54
|
+
* job tool; the turn then reaches the Lua API through a platform proxy pinned to THIS workflow's agent that allows
|
|
55
|
+
* staging only (compile, push of skills/jobs/webhooks/triggers/processors/backup, `version create`, status, logs)
|
|
56
|
+
* and refuses every deploy, promote, publish, activate, env, chat and runtime call.
|
|
57
|
+
*/
|
|
58
|
+
plugins?: WorkflowJobPluginId[];
|
|
59
|
+
/**
|
|
60
|
+
* EM-WS3: pin a plugin step's Lua-API proxy (and its key) to ANOTHER agent instead of this workflow's own. Legal only
|
|
61
|
+
* beside `plugins`. Refused at run time (`target_not_granted`) unless the platform's plugin-target switch is on AND
|
|
62
|
+
* this workflow's agent holds a `supervision:act` or `supervision:release` grant on the target.
|
|
63
|
+
*/
|
|
64
|
+
target?: {
|
|
65
|
+
agentId: string;
|
|
66
|
+
};
|
|
51
67
|
/**
|
|
52
68
|
* What this step DOES: `classify` | `extract` | `transform` | `draft` | `research` | `reason` | `code` |
|
|
53
69
|
* `judge`. On a PUSHED definition it must come with a `model` — a static `taskClass` with none is refused
|
|
@@ -321,7 +337,9 @@ export declare type LuaWorkflowBuildCode = 'duplicate-step-id' | 'unknown-step-r
|
|
|
321
337
|
* verdict (deferred for an inherit child, 03 §3.1 table). Kept for one minor so a consumer switching on the union still
|
|
322
338
|
* compiles; removed in the next.
|
|
323
339
|
*/
|
|
324
|
-
| 'workspace-not-declared' | 'workspace-inherit-without-parent-workspace' | 'workspace-inherit-conflict' | 'harness-requires-job-tier' | 'max-turns-requires-job-tier' | 'max-turns-invalid'
|
|
340
|
+
| 'workspace-not-declared' | 'workspace-inherit-without-parent-workspace' | 'workspace-inherit-conflict' | 'harness-requires-job-tier' | 'max-turns-requires-job-tier' | 'max-turns-invalid'
|
|
341
|
+
/** EM-WS3: a step's `plugins` outside the allowlist, repeated, or off the Job tier. */
|
|
342
|
+
| 'plugins-invalid' | 'cap-exceeded' | 'chunk-size-invalid' | 'rate-limit-invalid' | 'backoff-invalid' | 'loop-interval-out-of-range' | 'mapping-placement' | 'container-arm-empty'
|
|
325
343
|
/**
|
|
326
344
|
* @deprecated LUA-684 — the builder no longer throws it: an `approval` / `waitForSignal` IS a container arm
|
|
327
345
|
* (`parallel(['approve', …])`). Where the engine cannot run one — a `loop` body, the step of a `[map, step]`
|
|
@@ -427,6 +445,18 @@ export declare interface LuaWorkflowConfig {
|
|
|
427
445
|
backfillOnEnable?: {
|
|
428
446
|
maxOccurrences?: number;
|
|
429
447
|
};
|
|
448
|
+
/**
|
|
449
|
+
* Schedule health — a dead-man for this schedule, watched by the platform (no heartbeat service to wire up).
|
|
450
|
+
* The agent's owner (the schedule's creator, else the org admins) gets ONE notice per incident — inbox card plus
|
|
451
|
+
* `notify` ('app' push, 'email', or 'emailApp', the default) — when, while the schedule is active:
|
|
452
|
+
* - `maxSilenceMinutes` (5..43200): no scheduled run has COMPLETED successfully for that long;
|
|
453
|
+
* - `alertAfterConsecutiveFailures` (1..3): that many scheduled runs failed in a row (the platform turns a
|
|
454
|
+
* schedule off after 3, which always alerts);
|
|
455
|
+
* and the notice resolves in place when the schedule is healthy again. Every transition is also an agent log
|
|
456
|
+
* line (`lua logs`), so a log drain routes it to Better Stack / Datadog. Needs `schedule`; silence needs a
|
|
457
|
+
* recurring one. See docs/workflows/schedule-health.md.
|
|
458
|
+
*/
|
|
459
|
+
health?: ScheduleHealthConfig;
|
|
430
460
|
/** Literal JSON passed as run input on every scheduled fire; must validate against `inputSchema` (P0-5e). */
|
|
431
461
|
scheduleInput?: Record<string, unknown>;
|
|
432
462
|
goal?: WorkflowGoalEnvelope;
|
|
@@ -512,6 +542,24 @@ export declare const rows: (s: LuaWorkflowStep<any, any, any> | string, path: st
|
|
|
512
542
|
limit: number;
|
|
513
543
|
}) => MapDescriptor;
|
|
514
544
|
|
|
545
|
+
/** Where an incident notice goes beyond the inbox card (which always lands). */
|
|
546
|
+
declare const SCHEDULE_HEALTH_NOTIFY_CHANNELS: readonly ["app", "email", "emailApp"];
|
|
547
|
+
|
|
548
|
+
/** The declaration an author writes. At least one threshold is required. */
|
|
549
|
+
declare interface ScheduleHealthConfig {
|
|
550
|
+
/** Alert when no scheduled run has completed successfully for this many minutes (5..43200). */
|
|
551
|
+
maxSilenceMinutes?: number;
|
|
552
|
+
/**
|
|
553
|
+
* Alert when this many scheduled runs in a row failed. Workflows and agent tasks are parked by the
|
|
554
|
+
* platform after 3 consecutive failures, so for them the value is 1..3; code jobs accept 1..50.
|
|
555
|
+
*/
|
|
556
|
+
alertAfterConsecutiveFailures?: number;
|
|
557
|
+
/** Out-of-inbox routing for the notice: 'app' (push), 'email', or 'emailApp' (both). Default 'emailApp'. */
|
|
558
|
+
notify?: ScheduleHealthNotify;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
declare type ScheduleHealthNotify = (typeof SCHEDULE_HEALTH_NOTIFY_CHANNELS)[number];
|
|
562
|
+
|
|
515
563
|
export { SerializedWorkflowGraph }
|
|
516
564
|
|
|
517
565
|
export declare interface SpecialistStepOptions {
|
|
@@ -784,6 +832,9 @@ export declare type WorkflowJobHarness = WorkflowJobHarness_2;
|
|
|
784
832
|
|
|
785
833
|
declare type WorkflowJobHarness_2 = (typeof WORKFLOW_JOB_HARNESSES)[number];
|
|
786
834
|
|
|
835
|
+
/** EM-WS3: the Job-tier plugin allowlist — a structural twin of the registry's id, parity-checked below. */
|
|
836
|
+
declare type WorkflowJobPluginId = 'lua-agent-builder';
|
|
837
|
+
|
|
787
838
|
declare type WorkflowJobResources = (typeof WORKFLOW_JOB_RESOURCES)[number];
|
|
788
839
|
|
|
789
840
|
export declare type WorkflowJobToolId = 'shell' | 'read' | 'write' | 'edit' | 'glob' | 'grep' | 'git' | 'gh' | 'fetch' | 'ripwire';
|