lua-cli 3.49.2 → 3.51.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 +191 -35
- package/dist/api-exports.js +321 -23
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +598 -66
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +18 -18
- package/dist/workflow-builder.js +177 -17
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +3 -3
- package/docs/api/Agents.md +51 -9
- package/docs/api/Data.md +51 -0
- package/docs/api/Workflows.md +1 -0
- package/docs/workflows/schedules.md +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -708,9 +708,16 @@ export declare interface AgentsApi {
|
|
|
708
708
|
}): Promise<unknown>;
|
|
709
709
|
};
|
|
710
710
|
versions(agentId: string): {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
711
|
+
/**
|
|
712
|
+
* The target's agent versions, newest first (`supervision:observe`). `limit` is 1–50 (default 20). Optional:
|
|
713
|
+
* `status` keeps only those statuses (one, or a list); `offset` skips that many rows of the (filtered) list, so
|
|
714
|
+
* `{ limit: 50, offset: 50 }` is the second page. Page until a page is shorter than `limit`.
|
|
715
|
+
*
|
|
716
|
+
* Feature-detect: a platform older than these options ignores them and answers the newest `limit` rows of every
|
|
717
|
+
* status. Check that each row's `status` is one you asked for, and that an `offset` page starts BELOW the
|
|
718
|
+
* previous page's last `version`; if not, the platform does not support them yet.
|
|
719
|
+
*/
|
|
720
|
+
list(opts?: SupervisionVersionsListOptions): Promise<unknown>;
|
|
714
721
|
get(version: number): Promise<unknown>;
|
|
715
722
|
diff(from: number, to: number): Promise<unknown>;
|
|
716
723
|
/** Chat staged `version` (`supervision:preview`). No tools run unless `toolScope.skillIds` allowlists them. */
|
|
@@ -741,9 +748,11 @@ export declare interface AgentsApi {
|
|
|
741
748
|
expectActive: number;
|
|
742
749
|
}): Promise<unknown>;
|
|
743
750
|
/**
|
|
744
|
-
* Soft-delete `version` (`supervision:release`; only from a named workflow step)
|
|
745
|
-
*
|
|
746
|
-
* active version, never the last one.
|
|
751
|
+
* Soft-delete `version` (`supervision:release`; only from a named workflow step): a `superseded`
|
|
752
|
+
* version, or a `staged` one that was never active, is over 24 hours old and is not the newest
|
|
753
|
+
* staged version. Never the active version, never the last one. Refusals (409):
|
|
754
|
+
* `supervision_version_not_superseded` (active, deleted), `supervision_version_staged_was_active`,
|
|
755
|
+
* `supervision_version_staged_too_recent`, `supervision_version_staged_newest`.
|
|
747
756
|
*/
|
|
748
757
|
delete(version: number): Promise<{
|
|
749
758
|
deleted: true;
|
|
@@ -1150,6 +1159,18 @@ export declare interface AgentsApi {
|
|
|
1150
1159
|
*/
|
|
1151
1160
|
secrets(agentId: string): {
|
|
1152
1161
|
attach(requestIds: string[]): Promise<SecretAttachResult>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Write ONE secret row into `agentId`'s own Data, from CODE (a workflow step or a job) so the secret never passes
|
|
1164
|
+
* through a model prompt: the row of `collection` whose `_pk` is `key` is replaced whole by `value` (flat fields:
|
|
1165
|
+
* string, finite number, boolean or null; at most 32 fields, 8 KB a string, 16 KB in all), or created. The agent
|
|
1166
|
+
* reads it with its own `Data.get(collection, { _pk: key })`. Needs `supervision:act` on `agentId` AND the
|
|
1167
|
+
* collection in the grant's `secretWriteCollections` (set only by an org admin; deny by default). The collection is
|
|
1168
|
+
* write-only for you: `Agents.data(agentId)` refuses it. Answers `{ ok, id, fingerprint }` and never the value;
|
|
1169
|
+
* the fingerprint is `sha256:` + the first 16 hex of SHA-256 over the stored row as JSON with sorted keys (`_pk`
|
|
1170
|
+
* included), so a token-free nudge carrying it tells the agent whether it already holds the row. Refused
|
|
1171
|
+
* `supervision_secret_write_not_granted` / `supervision_secret_bad_args`; not available offline.
|
|
1172
|
+
*/
|
|
1173
|
+
put(collection: string, key: string, value: Record<string, string | number | boolean | null>): Promise<SupervisedSecretPutResult>;
|
|
1153
1174
|
};
|
|
1154
1175
|
}
|
|
1155
1176
|
|
|
@@ -2033,7 +2054,7 @@ declare const BROWSER_COMMANDS: readonly [{
|
|
|
2033
2054
|
readonly description: "Upload local file(s) to a file input. Args: selector, files[].";
|
|
2034
2055
|
}, {
|
|
2035
2056
|
readonly name: "find";
|
|
2036
|
-
readonly description: "Act by semantic locator. Args: by(role|text|label|placeholder|alt|title|testid), query, action(click|fill|
|
|
2057
|
+
readonly description: "Act by semantic locator. Args: by(role|text|label|placeholder|alt|title|testid), query, action(click|fill|hover|check|text), value?, name?, exact?.";
|
|
2037
2058
|
}, {
|
|
2038
2059
|
readonly name: "act";
|
|
2039
2060
|
readonly description: "Act on the page: ref+action (deterministic) or natural-language instruction (engine AI). Args: ref?, action?, value?, instruction?.";
|
|
@@ -2042,7 +2063,7 @@ declare const BROWSER_COMMANDS: readonly [{
|
|
|
2042
2063
|
readonly description: "Extract data by natural-language instruction (engine AI). Args: instruction.";
|
|
2043
2064
|
}, {
|
|
2044
2065
|
readonly name: "wait";
|
|
2045
|
-
readonly description: "Wait for a condition. Provide one of: selector(
|
|
2066
|
+
readonly description: "Wait for a condition. Provide one of: selector (waits until it is visible), ms, text, url, load, fn.";
|
|
2046
2067
|
}, {
|
|
2047
2068
|
readonly name: "tab";
|
|
2048
2069
|
readonly description: "Manage tabs. Args: action(list|new|switch|close), target?, url?, label?.";
|
|
@@ -2066,7 +2087,7 @@ declare const BROWSER_COMMANDS: readonly [{
|
|
|
2066
2087
|
readonly description: "Manage web storage. Args: area(local|session), action(get|set|clear), key?, value?.";
|
|
2067
2088
|
}, {
|
|
2068
2089
|
readonly name: "set";
|
|
2069
|
-
readonly description: "Configure the browser. Args: setting(viewport|device|geo|headers|credentials|media), args[].";
|
|
2090
|
+
readonly description: "Configure the browser. Args: setting(viewport|device|geo|headers|credentials|media|offline), args[].";
|
|
2070
2091
|
}, {
|
|
2071
2092
|
readonly name: "download";
|
|
2072
2093
|
readonly description: "Download a file (click a selector to trigger, or wait for one). Args: selector?, path?.";
|
|
@@ -2096,7 +2117,7 @@ declare const BROWSER_COMMANDS: readonly [{
|
|
|
2096
2117
|
readonly description: "Low-level mouse. Args: action(move|down|up|wheel), x?, y?, button?, dy?, dx?.";
|
|
2097
2118
|
}, {
|
|
2098
2119
|
readonly name: "keyboard";
|
|
2099
|
-
readonly description: "Low-level keyboard at focus. Args: action(type|inserttext
|
|
2120
|
+
readonly description: "Low-level keyboard at focus. Args: action(type|inserttext), text. Use press for single keys and chords.";
|
|
2100
2121
|
}, {
|
|
2101
2122
|
readonly name: "state";
|
|
2102
2123
|
readonly description: "Persist/restore storage+auth state to a file. Args: action(save|load|list|clear), path?.";
|
|
@@ -2194,7 +2215,7 @@ export declare interface BrowserCommandInputs {
|
|
|
2194
2215
|
find: BrowserSessionInput & {
|
|
2195
2216
|
by: 'role' | 'text' | 'label' | 'placeholder' | 'alt' | 'title' | 'testid';
|
|
2196
2217
|
query: string;
|
|
2197
|
-
action: 'click' | 'fill' | '
|
|
2218
|
+
action: 'click' | 'fill' | 'hover' | 'check' | 'text';
|
|
2198
2219
|
value?: string;
|
|
2199
2220
|
name?: string;
|
|
2200
2221
|
exact?: boolean;
|
|
@@ -2210,7 +2231,7 @@ export declare interface BrowserCommandInputs {
|
|
|
2210
2231
|
};
|
|
2211
2232
|
wait: BrowserSessionInput & {
|
|
2212
2233
|
selector?: string;
|
|
2213
|
-
state?: 'visible'
|
|
2234
|
+
state?: 'visible';
|
|
2214
2235
|
ms?: number;
|
|
2215
2236
|
text?: string;
|
|
2216
2237
|
url?: string;
|
|
@@ -2288,9 +2309,8 @@ export declare interface BrowserCommandInputs {
|
|
|
2288
2309
|
dx?: number;
|
|
2289
2310
|
};
|
|
2290
2311
|
keyboard: BrowserSessionInput & {
|
|
2291
|
-
action: 'type' | 'inserttext'
|
|
2292
|
-
text
|
|
2293
|
-
key?: string;
|
|
2312
|
+
action: 'type' | 'inserttext';
|
|
2313
|
+
text: string;
|
|
2294
2314
|
};
|
|
2295
2315
|
state: BrowserSessionInput & {
|
|
2296
2316
|
action: 'save' | 'load' | 'list' | 'clear';
|
|
@@ -2927,8 +2947,10 @@ export declare interface ChatHistoryMessage {
|
|
|
2927
2947
|
* to render a "Voice call" divider in the thread.
|
|
2928
2948
|
*/
|
|
2929
2949
|
source?: 'voice' | 'chat';
|
|
2930
|
-
/**
|
|
2950
|
+
/** The model the assistant turn requested (catalog code), persisted in content metadata. */
|
|
2931
2951
|
model?: string;
|
|
2952
|
+
/** The catalog code of the model that served the turn's final step; differs from `model` when a fallback answered. */
|
|
2953
|
+
servedModel?: string;
|
|
2932
2954
|
/** True when the turn reached that model through the Auto selector. */
|
|
2933
2955
|
autoModelRequested?: boolean;
|
|
2934
2956
|
author?: {
|
|
@@ -3281,6 +3303,14 @@ declare interface CustomDataAPI {
|
|
|
3281
3303
|
* @returns Promise resolving to delete response
|
|
3282
3304
|
*/
|
|
3283
3305
|
delete(collectionName: string, entryId: string): Promise<DeleteCustomDataResponse>;
|
|
3306
|
+
/**
|
|
3307
|
+
* An org-shared Data collection (namespace) an org admin created and granted this agent. Returns the same surface
|
|
3308
|
+
* as `Data`, scoped to that namespace: `Data.shared('fleet_map').get('repos', { tier: 1 })`. Readers may call
|
|
3309
|
+
* `collections`, `get`, `getEntry` and `search`; writers may also `create`, `update`, `patch`, `increment` and
|
|
3310
|
+
* `delete`. A call outside the ACL rejects with `code === 'shared_data_forbidden'` (403). Deployed agents only:
|
|
3311
|
+
* local runs reject with `code === 'shared_data_unavailable_offline'`.
|
|
3312
|
+
*/
|
|
3313
|
+
shared(name: string): SharedDataAPI;
|
|
3284
3314
|
}
|
|
3285
3315
|
|
|
3286
3316
|
/** One collection in the agent's Data namespace, from Data.collections(). */
|
|
@@ -3501,6 +3531,29 @@ export declare const Data: {
|
|
|
3501
3531
|
* @returns Promise resolving when deletion is complete
|
|
3502
3532
|
*/
|
|
3503
3533
|
delete(collectionName: string, entryId: string): Promise<DeleteCustomDataResponse>;
|
|
3534
|
+
/**
|
|
3535
|
+
* An org-shared Data collection (namespace). An org admin creates it and names which agents of the org may read
|
|
3536
|
+
* and which may write it (`POST /admin/orgs/:orgId/shared-collections`); agents never create one. The handle has
|
|
3537
|
+
* the same methods as `Data`, scoped to the namespace, so a namespace can hold several collections:
|
|
3538
|
+
*
|
|
3539
|
+
* ```typescript
|
|
3540
|
+
* const map = Data.shared('fleet_map');
|
|
3541
|
+
* await map.create('repos', { repo: 'lua-core-services', tier: 1 }, { searchText: 'backend monorepo' }); // writers
|
|
3542
|
+
* const { data } = await map.get('repos', { tier: 1 }); // readers
|
|
3543
|
+
* const hits = await map.search('edges', 'who calls lua-agents', 10);
|
|
3544
|
+
* ```
|
|
3545
|
+
*
|
|
3546
|
+
* - Readers may `collections`, `get`, `getEntry`, `search`; writers may also `create`, `update`, `patch`,
|
|
3547
|
+
* `increment`, `delete` (a writer can read). Anything else rejects with `code === 'shared_data_forbidden'`
|
|
3548
|
+
* (403) — also when the name does not exist or belongs to another org.
|
|
3549
|
+
* - Same limits, filters, managed indexes, compare-and-swap and vector search as `Data`. Every write is audited
|
|
3550
|
+
* (agent, collection, entry id; never the value).
|
|
3551
|
+
* - A test session may read but not write (`shared_data_test_session_write_refused`, 409).
|
|
3552
|
+
* - Deployed agents only: under `lua test` every call rejects with `code === 'shared_data_unavailable_offline'`.
|
|
3553
|
+
*
|
|
3554
|
+
* @param name - The shared collection name the org admin created (1-128 of `[A-Za-z0-9_.-]`)
|
|
3555
|
+
*/
|
|
3556
|
+
shared(name: string): SharedDataAPI;
|
|
3504
3557
|
};
|
|
3505
3558
|
|
|
3506
3559
|
/**
|
|
@@ -3824,6 +3877,7 @@ export declare function defineVoice(config: LuaVoiceConfig): LuaVoice;
|
|
|
3824
3877
|
*
|
|
3825
3878
|
* export default defineWebApp({
|
|
3826
3879
|
* name: 'ops-dashboard',
|
|
3880
|
+
* title: 'Ops Dashboard',
|
|
3827
3881
|
* description: 'Open tickets per shop',
|
|
3828
3882
|
* pages: { root: './web', nav: [{ path: '/', label: 'Overview' }] },
|
|
3829
3883
|
* routes: {
|
|
@@ -5619,6 +5673,10 @@ declare interface LlmContextStep {
|
|
|
5619
5673
|
reasoningTokens?: number;
|
|
5620
5674
|
/** The model id the provider says served the step (a fallback leg names itself here). Cost only. */
|
|
5621
5675
|
model?: string;
|
|
5676
|
+
/** The catalog code of the leg that served the step. Audit only: settlement never reads it. */
|
|
5677
|
+
servedModel?: string;
|
|
5678
|
+
/** The step was rejected by an output processor and re-run; its reply never reached the user. Audit only. */
|
|
5679
|
+
discarded?: boolean;
|
|
5622
5680
|
}
|
|
5623
5681
|
|
|
5624
5682
|
declare type LoadState = 'load' | 'domcontentloaded' | 'networkidle';
|
|
@@ -6812,15 +6870,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6812
6870
|
*/
|
|
6813
6871
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6814
6872
|
}, "strip", z.ZodTypeAny, {
|
|
6873
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6815
6874
|
options: Record<string, unknown>;
|
|
6816
6875
|
provider: "deepgram" | "elevenlabs";
|
|
6817
6876
|
kind: "plugin";
|
|
6818
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6819
6877
|
}, {
|
|
6878
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6820
6879
|
options: Record<string, unknown>;
|
|
6821
6880
|
provider: "deepgram" | "elevenlabs";
|
|
6822
6881
|
kind: "plugin";
|
|
6823
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6824
6882
|
}>, z.ZodObject<{
|
|
6825
6883
|
kind: z.ZodLiteral<"realtime">;
|
|
6826
6884
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -6878,15 +6936,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6878
6936
|
*/
|
|
6879
6937
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6880
6938
|
}, "strip", z.ZodTypeAny, {
|
|
6939
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6881
6940
|
options: Record<string, unknown>;
|
|
6882
6941
|
provider: "deepgram" | "elevenlabs";
|
|
6883
6942
|
kind: "plugin";
|
|
6884
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6885
6943
|
}, {
|
|
6944
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6886
6945
|
options: Record<string, unknown>;
|
|
6887
6946
|
provider: "deepgram" | "elevenlabs";
|
|
6888
6947
|
kind: "plugin";
|
|
6889
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6890
6948
|
}>, z.ZodObject<{
|
|
6891
6949
|
kind: z.ZodLiteral<"realtime">;
|
|
6892
6950
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -6944,15 +7002,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6944
7002
|
*/
|
|
6945
7003
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6946
7004
|
}, "strip", z.ZodTypeAny, {
|
|
7005
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6947
7006
|
options: Record<string, unknown>;
|
|
6948
7007
|
provider: "deepgram" | "elevenlabs";
|
|
6949
7008
|
kind: "plugin";
|
|
6950
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6951
7009
|
}, {
|
|
7010
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6952
7011
|
options: Record<string, unknown>;
|
|
6953
7012
|
provider: "deepgram" | "elevenlabs";
|
|
6954
7013
|
kind: "plugin";
|
|
6955
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6956
7014
|
}>, z.ZodObject<{
|
|
6957
7015
|
kind: z.ZodLiteral<"realtime">;
|
|
6958
7016
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -7134,10 +7192,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7134
7192
|
voice?: string | undefined;
|
|
7135
7193
|
options?: Record<string, unknown> | undefined;
|
|
7136
7194
|
} | {
|
|
7195
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7137
7196
|
options: Record<string, unknown>;
|
|
7138
7197
|
provider: "deepgram" | "elevenlabs";
|
|
7139
7198
|
kind: "plugin";
|
|
7140
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7141
7199
|
} | {
|
|
7142
7200
|
options: Record<string, unknown>;
|
|
7143
7201
|
provider: "openai" | "google" | "xai";
|
|
@@ -7151,10 +7209,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7151
7209
|
voice?: string | undefined;
|
|
7152
7210
|
options?: Record<string, unknown> | undefined;
|
|
7153
7211
|
} | {
|
|
7212
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7154
7213
|
options: Record<string, unknown>;
|
|
7155
7214
|
provider: "deepgram" | "elevenlabs";
|
|
7156
7215
|
kind: "plugin";
|
|
7157
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7158
7216
|
} | {
|
|
7159
7217
|
options: Record<string, unknown>;
|
|
7160
7218
|
provider: "openai" | "google" | "xai";
|
|
@@ -7167,10 +7225,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7167
7225
|
voice?: string | undefined;
|
|
7168
7226
|
options?: Record<string, unknown> | undefined;
|
|
7169
7227
|
} | {
|
|
7228
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7170
7229
|
options: Record<string, unknown>;
|
|
7171
7230
|
provider: "deepgram" | "elevenlabs";
|
|
7172
7231
|
kind: "plugin";
|
|
7173
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7174
7232
|
} | {
|
|
7175
7233
|
options: Record<string, unknown>;
|
|
7176
7234
|
provider: "openai" | "google" | "xai";
|
|
@@ -7228,10 +7286,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7228
7286
|
voice?: string | undefined;
|
|
7229
7287
|
options?: Record<string, unknown> | undefined;
|
|
7230
7288
|
} | {
|
|
7289
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7231
7290
|
options: Record<string, unknown>;
|
|
7232
7291
|
provider: "deepgram" | "elevenlabs";
|
|
7233
7292
|
kind: "plugin";
|
|
7234
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7235
7293
|
} | {
|
|
7236
7294
|
options: Record<string, unknown>;
|
|
7237
7295
|
provider: "openai" | "google" | "xai";
|
|
@@ -7245,10 +7303,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7245
7303
|
voice?: string | undefined;
|
|
7246
7304
|
options?: Record<string, unknown> | undefined;
|
|
7247
7305
|
} | {
|
|
7306
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7248
7307
|
options: Record<string, unknown>;
|
|
7249
7308
|
provider: "deepgram" | "elevenlabs";
|
|
7250
7309
|
kind: "plugin";
|
|
7251
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7252
7310
|
} | {
|
|
7253
7311
|
options: Record<string, unknown>;
|
|
7254
7312
|
provider: "openai" | "google" | "xai";
|
|
@@ -7261,10 +7319,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7261
7319
|
voice?: string | undefined;
|
|
7262
7320
|
options?: Record<string, unknown> | undefined;
|
|
7263
7321
|
} | {
|
|
7322
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7264
7323
|
options: Record<string, unknown>;
|
|
7265
7324
|
provider: "deepgram" | "elevenlabs";
|
|
7266
7325
|
kind: "plugin";
|
|
7267
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7268
7326
|
} | {
|
|
7269
7327
|
options: Record<string, unknown>;
|
|
7270
7328
|
provider: "openai" | "google" | "xai";
|
|
@@ -7322,10 +7380,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7322
7380
|
voice?: string | undefined;
|
|
7323
7381
|
options?: Record<string, unknown> | undefined;
|
|
7324
7382
|
} | {
|
|
7383
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7325
7384
|
options: Record<string, unknown>;
|
|
7326
7385
|
provider: "deepgram" | "elevenlabs";
|
|
7327
7386
|
kind: "plugin";
|
|
7328
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7329
7387
|
} | {
|
|
7330
7388
|
options: Record<string, unknown>;
|
|
7331
7389
|
provider: "openai" | "google" | "xai";
|
|
@@ -7339,10 +7397,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7339
7397
|
voice?: string | undefined;
|
|
7340
7398
|
options?: Record<string, unknown> | undefined;
|
|
7341
7399
|
} | {
|
|
7400
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7342
7401
|
options: Record<string, unknown>;
|
|
7343
7402
|
provider: "deepgram" | "elevenlabs";
|
|
7344
7403
|
kind: "plugin";
|
|
7345
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7346
7404
|
} | {
|
|
7347
7405
|
options: Record<string, unknown>;
|
|
7348
7406
|
provider: "openai" | "google" | "xai";
|
|
@@ -7355,10 +7413,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7355
7413
|
voice?: string | undefined;
|
|
7356
7414
|
options?: Record<string, unknown> | undefined;
|
|
7357
7415
|
} | {
|
|
7416
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7358
7417
|
options: Record<string, unknown>;
|
|
7359
7418
|
provider: "deepgram" | "elevenlabs";
|
|
7360
7419
|
kind: "plugin";
|
|
7361
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7362
7420
|
} | {
|
|
7363
7421
|
options: Record<string, unknown>;
|
|
7364
7422
|
provider: "openai" | "google" | "xai";
|
|
@@ -7416,10 +7474,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7416
7474
|
voice?: string | undefined;
|
|
7417
7475
|
options?: Record<string, unknown> | undefined;
|
|
7418
7476
|
} | {
|
|
7477
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7419
7478
|
options: Record<string, unknown>;
|
|
7420
7479
|
provider: "deepgram" | "elevenlabs";
|
|
7421
7480
|
kind: "plugin";
|
|
7422
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7423
7481
|
} | {
|
|
7424
7482
|
options: Record<string, unknown>;
|
|
7425
7483
|
provider: "openai" | "google" | "xai";
|
|
@@ -7433,10 +7491,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7433
7491
|
voice?: string | undefined;
|
|
7434
7492
|
options?: Record<string, unknown> | undefined;
|
|
7435
7493
|
} | {
|
|
7494
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7436
7495
|
options: Record<string, unknown>;
|
|
7437
7496
|
provider: "deepgram" | "elevenlabs";
|
|
7438
7497
|
kind: "plugin";
|
|
7439
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7440
7498
|
} | {
|
|
7441
7499
|
options: Record<string, unknown>;
|
|
7442
7500
|
provider: "openai" | "google" | "xai";
|
|
@@ -7449,10 +7507,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7449
7507
|
voice?: string | undefined;
|
|
7450
7508
|
options?: Record<string, unknown> | undefined;
|
|
7451
7509
|
} | {
|
|
7510
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7452
7511
|
options: Record<string, unknown>;
|
|
7453
7512
|
provider: "deepgram" | "elevenlabs";
|
|
7454
7513
|
kind: "plugin";
|
|
7455
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7456
7514
|
} | {
|
|
7457
7515
|
options: Record<string, unknown>;
|
|
7458
7516
|
provider: "openai" | "google" | "xai";
|
|
@@ -7687,6 +7745,8 @@ export declare class LuaWebApp {
|
|
|
7687
7745
|
private readonly config;
|
|
7688
7746
|
constructor(config: LuaWebAppConfig);
|
|
7689
7747
|
getName(): string;
|
|
7748
|
+
/** The display name, or `undefined` (the shells then show `branding.name`, then `name`). */
|
|
7749
|
+
getTitle(): string | undefined;
|
|
7690
7750
|
getDescription(): string | undefined;
|
|
7691
7751
|
getPages(): WebAppPages;
|
|
7692
7752
|
getBranding(): WebAppBranding | undefined;
|
|
@@ -7696,8 +7756,14 @@ export declare class LuaWebApp {
|
|
|
7696
7756
|
}
|
|
7697
7757
|
|
|
7698
7758
|
export declare interface LuaWebAppConfig {
|
|
7699
|
-
/** URL-safe name: `^[a-z][a-z0-9-]*$`. The app's identifier on the agent. */
|
|
7759
|
+
/** URL-safe name: `^[a-z][a-z0-9-]*$`. The app's identifier on the agent (URL, routes, lua.skill.yaml); never changes. */
|
|
7700
7760
|
name: string;
|
|
7761
|
+
/**
|
|
7762
|
+
* Display name the shells show (header, app lists) in place of `name`, e.g. `'Ops Dashboard'`.
|
|
7763
|
+
* Free text, at most 80 characters. Optional: without it the shells show `branding.name`, then `name`.
|
|
7764
|
+
* Changing it never changes the app's identity or URL.
|
|
7765
|
+
*/
|
|
7766
|
+
title?: string;
|
|
7701
7767
|
description?: string;
|
|
7702
7768
|
pages: WebAppPages;
|
|
7703
7769
|
branding?: WebAppBranding;
|
|
@@ -9327,6 +9393,29 @@ declare interface RequestOverrides {
|
|
|
9327
9393
|
signal?: AbortSignal;
|
|
9328
9394
|
}
|
|
9329
9395
|
|
|
9396
|
+
/**
|
|
9397
|
+
* R13 — `ResolveApprovalResult` (§9.5.3; matches shared-types). LUA-759 (#2582 review): the no-op's `decidedBy` is
|
|
9398
|
+
* the spec's `WorkflowActorRef` — lua-api projects lua-core's trimmed `{kind, id, at, via}` record onto it, as it
|
|
9399
|
+
* does R12 / R36 / R37's `recorded.by` — never a string (the old `string` declaration printed `[object Object]`).
|
|
9400
|
+
*/
|
|
9401
|
+
declare type ResolveApprovalResult = {
|
|
9402
|
+
resolved: true;
|
|
9403
|
+
outcome: 'approved' | 'denied';
|
|
9404
|
+
runStatus: WorkflowRunStatus;
|
|
9405
|
+
stepId?: string;
|
|
9406
|
+
} | {
|
|
9407
|
+
resolved: false;
|
|
9408
|
+
outcome: 'noop';
|
|
9409
|
+
reason: 'already_resolved' | 'expired' | 'cancelled' | 'run_gone';
|
|
9410
|
+
decision?: 'approved' | 'denied' | 'expired';
|
|
9411
|
+
/** `approveResultLine` prints it as `<subjectId> via <source>`; an older lua-api's raw lua-core actor falls back to `actorLabel`. */
|
|
9412
|
+
decidedBy?: {
|
|
9413
|
+
subjectType: string;
|
|
9414
|
+
subjectId: string;
|
|
9415
|
+
source: string;
|
|
9416
|
+
};
|
|
9417
|
+
};
|
|
9418
|
+
|
|
9330
9419
|
/**
|
|
9331
9420
|
* R12 — `ResumeStepResult` (§9.5.3): the loser of a resume race gets the recorded outcome, never a 4xx. LUA-738
|
|
9332
9421
|
* (desktop #1018): `recorded.by` is the spec's `WorkflowActorRef` — lua-api projects lua-core's `{ kind, id }` onto
|
|
@@ -9698,6 +9787,16 @@ export declare interface SendTemplateValues {
|
|
|
9698
9787
|
|
|
9699
9788
|
export { SerializedWorkflowGraph }
|
|
9700
9789
|
|
|
9790
|
+
/** `Data.shared(name)`: the `Data` surface on an org-shared namespace (it does not nest). */
|
|
9791
|
+
export declare type SharedDataAPI = Omit<CustomDataAPI, 'shared'>;
|
|
9792
|
+
|
|
9793
|
+
/** Thrown by `Data.shared(name)` outside a deployed agent. `code` is the stable part. */
|
|
9794
|
+
export declare class SharedDataError extends Error {
|
|
9795
|
+
readonly code: string;
|
|
9796
|
+
readonly name = "SharedDataError";
|
|
9797
|
+
constructor(code: string, message: string);
|
|
9798
|
+
}
|
|
9799
|
+
|
|
9701
9800
|
/** R14 — 202 `{ accepted:true, signalId, consumed, stepId? }` · 200 `{ accepted:true, duplicate:true }` · 202 `{ accepted:false, reason }`. */
|
|
9702
9801
|
declare interface SignalRunResult {
|
|
9703
9802
|
accepted: boolean;
|
|
@@ -9812,6 +9911,15 @@ export declare interface SupervisedJobRegisterResult {
|
|
|
9812
9911
|
registered: boolean;
|
|
9813
9912
|
}
|
|
9814
9913
|
|
|
9914
|
+
/** What `secrets.put` answers: never the value. */
|
|
9915
|
+
declare interface SupervisedSecretPutResult {
|
|
9916
|
+
ok: true;
|
|
9917
|
+
/** The Data entry id of the row written (stable across later puts of the same key). */
|
|
9918
|
+
id: string;
|
|
9919
|
+
/** {@link SUPERVISED_SECRET_FINGERPRINT_DOC}. */
|
|
9920
|
+
fingerprint: string;
|
|
9921
|
+
}
|
|
9922
|
+
|
|
9815
9923
|
/** `workflows.get` — metadata only: never the graph, script, code or tools. */
|
|
9816
9924
|
declare interface SupervisedWorkflow {
|
|
9817
9925
|
workflowId: string;
|
|
@@ -10137,6 +10245,19 @@ declare interface SupervisionRunSummary {
|
|
|
10137
10245
|
completedAt?: number;
|
|
10138
10246
|
}
|
|
10139
10247
|
|
|
10248
|
+
/** Options of `Agents.versions(id).list` (supervision `versions.list`). */
|
|
10249
|
+
export declare interface SupervisionVersionsListOptions {
|
|
10250
|
+
/** Page size, 1–50 (default 20; larger values are clamped to 50). */
|
|
10251
|
+
limit?: number;
|
|
10252
|
+
/** Keep only these statuses (one, or a non-empty list). Omitted = every status, soft-deleted included. */
|
|
10253
|
+
status?: SupervisionVersionStatus | SupervisionVersionStatus[];
|
|
10254
|
+
/** Rows of the (filtered) newest-first list to skip, 0–10000 — `limit: 50, offset: 50` is the second page. */
|
|
10255
|
+
offset?: number;
|
|
10256
|
+
}
|
|
10257
|
+
|
|
10258
|
+
/** An agent version's lifecycle status, as a supervision `versions.list` filter. */
|
|
10259
|
+
export declare type SupervisionVersionStatus = 'active' | 'staged' | 'superseded' | 'deleted';
|
|
10260
|
+
|
|
10140
10261
|
/**
|
|
10141
10262
|
* Why an unattended run could not finish, reported by the agent itself instead
|
|
10142
10263
|
* of being guessed from its prose. The platform — not the agent — writes every
|
|
@@ -11982,6 +12103,41 @@ export declare interface WorkflowsApi {
|
|
|
11982
12103
|
note?: string;
|
|
11983
12104
|
}): Promise<Record<string, unknown>>;
|
|
11984
12105
|
};
|
|
12106
|
+
/**
|
|
12107
|
+
* Act as the SIGNED-IN VIEWER of a web-app route, never as the agent: the decision is authorized and audited
|
|
12108
|
+
* exactly as if that person decided it themselves (agent access, approver / four-eyes / step-up rules,
|
|
12109
|
+
* `decidedBy` = the viewer). Available only inside a `defineWebApp` route handler for a POST, PUT, PATCH or
|
|
12110
|
+
* DELETE call; anywhere else it throws `WorkflowsApiError` code `viewer_unavailable`. Under `lua apps dev` /
|
|
12111
|
+
* `lua test webapp` the route runs as you, so the call is made with your own CLI credentials.
|
|
12112
|
+
*
|
|
12113
|
+
* An approval that demands step-up or a specific surface answers `STEP_UP_REQUIRED` / `APPROVAL_SURFACE_DENIED`:
|
|
12114
|
+
* decide those in the Inbox. Other refusals pass through with their own codes (`NOT_AN_APPROVER`,
|
|
12115
|
+
* `FOUR_EYES_REQUIRED`, `APPROVAL_NOT_FOUND`, `PAYLOAD_MISMATCH`, …).
|
|
12116
|
+
*
|
|
12117
|
+
* @example
|
|
12118
|
+
* ```typescript
|
|
12119
|
+
* 'POST /approvals/:runId/:approvalId': route({
|
|
12120
|
+
* handler: async ({ params, body }) =>
|
|
12121
|
+
* json(await Workflows.viewer.decideApproval(params.runId, params.approvalId, { decision: body.decision, note: body.note })),
|
|
12122
|
+
* }),
|
|
12123
|
+
* ```
|
|
12124
|
+
*/
|
|
12125
|
+
viewer: {
|
|
12126
|
+
/**
|
|
12127
|
+
* R13 — approve or deny an approval as the viewer. `agentId` names the agent that owns the run (default: the
|
|
12128
|
+
* app's own agent); the viewer must be able to decide on that agent's runs, as in the Inbox.
|
|
12129
|
+
*/
|
|
12130
|
+
decideApproval(runId: string, approvalId: string, decision: {
|
|
12131
|
+
decision: 'approve' | 'deny';
|
|
12132
|
+
note?: string;
|
|
12133
|
+
expectedFingerprint?: string;
|
|
12134
|
+
agentId?: string;
|
|
12135
|
+
}): Promise<ResolveApprovalResult>;
|
|
12136
|
+
/** R12 — answer a step waiting for input (`suspend` / ask) as the viewer; `opts.agentId` as for decideApproval. */
|
|
12137
|
+
resume(runId: string, stepId: string, resumeData: unknown, opts?: {
|
|
12138
|
+
agentId?: string;
|
|
12139
|
+
}): Promise<ResumeStepResult>;
|
|
12140
|
+
};
|
|
11985
12141
|
}
|
|
11986
12142
|
|
|
11987
12143
|
export { WorkflowShell }
|