lua-cli 3.18.0 → 3.21.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 +294 -41
- package/dist/api-exports.js +526 -5
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +2006 -313
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +30 -30
- package/docs/CLI_REFERENCE.md +21 -18
- package/docs/README.md +2 -2
- package/package.json +3 -3
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ declare interface AgentInvocationInput {
|
|
|
27
27
|
systemPrompt?: string;
|
|
28
28
|
/** Additional runtime context attached to the request. */
|
|
29
29
|
runtimeContext?: string;
|
|
30
|
+
/** Client-side context (e.g. the caller's IANA timezone) for this invocation. */
|
|
31
|
+
clientContext?: {
|
|
32
|
+
timezone?: string;
|
|
33
|
+
};
|
|
30
34
|
/**
|
|
31
35
|
* Optional thread ID suffix for conversation scoping. When omitted, the
|
|
32
36
|
* invocation flows into the caller-user's default chat thread with the
|
|
@@ -55,6 +59,9 @@ declare interface AgentInvocationInput {
|
|
|
55
59
|
* the original BAC-107 spec; wired through as part of PRO-186.
|
|
56
60
|
*/
|
|
57
61
|
webhookPayload?: unknown;
|
|
62
|
+
/** Per-call timeout in ms. Absent ⇒ the client default (120s). Set by scheduled agent jobs
|
|
63
|
+
* to 180s so the cloud tier cuts off at the same point the desktop's local runner does. */
|
|
64
|
+
timeoutMs?: number;
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
/**
|
|
@@ -86,11 +93,19 @@ declare interface AgentInvocationOutput {
|
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
/**
|
|
89
|
-
* Per-agent LLM call settings
|
|
96
|
+
* Per-agent LLM call settings PLUS normalized reasoning config. The
|
|
97
|
+
* `CallSettings` leafs (`temperature`, `topP`, …) map directly onto Mastra's
|
|
90
98
|
* `agent.stream({ modelSettings })` / `agent.generate({ modelSettings })`,
|
|
91
|
-
* which in turn maps onto the AI SDK's `CallSettings
|
|
92
|
-
*
|
|
93
|
-
*
|
|
99
|
+
* which in turn maps onto the AI SDK's `CallSettings` — pass-through, we
|
|
100
|
+
* don't validate ranges here; the provider will reject invalid combos (e.g.
|
|
101
|
+
* topP > 1, presencePenalty out of provider range).
|
|
102
|
+
*
|
|
103
|
+
* `reasoning` is NOT a `CallSettings` key — it's the agent-level tier of the
|
|
104
|
+
* `ModelRequestOptions` precedence chain (request > agent `reasoning` >
|
|
105
|
+
* per-model DB `modelOptions` > code defaults). lua-core splits this bag
|
|
106
|
+
* before calling Mastra: `reasoning` is stripped and merged into the
|
|
107
|
+
* provider-options resolution seam instead of being passed through as a
|
|
108
|
+
* `CallSettings` field.
|
|
94
109
|
*
|
|
95
110
|
* Deliberately excludes `abortSignal` (not serializable), `headers`
|
|
96
111
|
* (security — could exfiltrate credentials), and `maxRetries` (platform
|
|
@@ -113,6 +128,17 @@ export declare interface AgentModelSettings {
|
|
|
113
128
|
stopSequences?: string[];
|
|
114
129
|
/** Random seed for deterministic sampling (provider support varies). */
|
|
115
130
|
seed?: number;
|
|
131
|
+
/**
|
|
132
|
+
* Per-agent reasoning default. Lower precedence than a per-request
|
|
133
|
+
* `options.reasoning` override; higher precedence than the per-model DB
|
|
134
|
+
* `modelOptions.reasoning` override. Verbosity is deliberately NOT
|
|
135
|
+
* available here — it stays request-level only (`ModelRequestOptions.verbosity`).
|
|
136
|
+
*/
|
|
137
|
+
reasoning?: {
|
|
138
|
+
effort?: ReasoningEffort;
|
|
139
|
+
/** Whether to surface the reasoning trace to the caller. Default true. */
|
|
140
|
+
show?: boolean;
|
|
141
|
+
};
|
|
116
142
|
}
|
|
117
143
|
|
|
118
144
|
export declare const Agents: AgentsApi;
|
|
@@ -634,6 +660,23 @@ declare interface BatchingConfig {
|
|
|
634
660
|
serializeProcessing?: boolean;
|
|
635
661
|
}
|
|
636
662
|
|
|
663
|
+
/**
|
|
664
|
+
* Browser switch config (LuaBrowser). `browser: true` is the zero-code form —
|
|
665
|
+
* the agent gets browser tools injected, like `searchWeb`, routed to the user's
|
|
666
|
+
* local browser (desktop) or the Browser-Use cloud fallback. The object form
|
|
667
|
+
* adds optional policy.
|
|
668
|
+
*/
|
|
669
|
+
declare interface BrowserSwitchConfig {
|
|
670
|
+
/** Preferred engine; 'auto' lets the platform pick local (desktop) vs cloud. */
|
|
671
|
+
engine?: 'auto' | 'browser-use' | 'agent-browser';
|
|
672
|
+
/** Egress allowlist — domains the browser may navigate/sub-request. */
|
|
673
|
+
allowedDomains?: string[];
|
|
674
|
+
/** Names of vault credential entries the agent may use (never raw secrets). */
|
|
675
|
+
credentials?: string[];
|
|
676
|
+
/** Hard cap on a single browser session's duration (cost control). */
|
|
677
|
+
maxSessionMinutes?: number;
|
|
678
|
+
}
|
|
679
|
+
|
|
637
680
|
/**
|
|
638
681
|
* CDN API
|
|
639
682
|
* Upload and retrieve files from the Lua CDN
|
|
@@ -727,6 +770,13 @@ export declare const Channels: ChannelsApi;
|
|
|
727
770
|
* languageCode: 'en',
|
|
728
771
|
* });
|
|
729
772
|
*
|
|
773
|
+
* // React to a WhatsApp message
|
|
774
|
+
* await Channels.whatsapp.sendReaction({
|
|
775
|
+
* to: { phoneNumber: '+15551234567' },
|
|
776
|
+
* messageId: 'wamid.HBgL...',
|
|
777
|
+
* emoji: '👍',
|
|
778
|
+
* });
|
|
779
|
+
*
|
|
730
780
|
* // Send an email
|
|
731
781
|
* await Channels.email.send({
|
|
732
782
|
* to: { email: 'customer@example.com' },
|
|
@@ -767,6 +817,23 @@ export declare interface ChannelsApi {
|
|
|
767
817
|
* ```
|
|
768
818
|
*/
|
|
769
819
|
sendTemplate(input: WhatsAppTemplateSendInput): Promise<ChannelSendOutput>;
|
|
820
|
+
/**
|
|
821
|
+
* React to a WhatsApp message with a single emoji.
|
|
822
|
+
*
|
|
823
|
+
* `messageId` is the vendor message id (`wamid...`) — e.g. read it off an
|
|
824
|
+
* inbound message from the channel webhook/history — and must be ≤30 days
|
|
825
|
+
* old (Meta limit). Pass `emoji: ''` to remove an existing reaction.
|
|
826
|
+
*
|
|
827
|
+
* @example
|
|
828
|
+
* ```typescript
|
|
829
|
+
* await Channels.whatsapp.sendReaction({
|
|
830
|
+
* to: { phoneNumber: '+447551166594' },
|
|
831
|
+
* messageId: 'wamid.HBgL...',
|
|
832
|
+
* emoji: '👍',
|
|
833
|
+
* });
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
sendReaction(input: WhatsAppReactionSendInput): Promise<ChannelSendOutput>;
|
|
770
837
|
};
|
|
771
838
|
/** Email-specific send operations. */
|
|
772
839
|
email: {
|
|
@@ -859,12 +926,27 @@ export declare interface ChannelSendTarget {
|
|
|
859
926
|
/**
|
|
860
927
|
* One content part of a chat-history message.
|
|
861
928
|
*
|
|
862
|
-
* `text` parts carry plain text.
|
|
863
|
-
*
|
|
864
|
-
*
|
|
929
|
+
* `text` parts carry plain text. `reasoning` parts carry the model's
|
|
930
|
+
* chain-of-thought in the `text` field so a history reload can re-render the
|
|
931
|
+
* reasoning component (PRO-391). `tool` parts carry a persisted tool
|
|
932
|
+
* invocation (`toolName`, `toolCallId`, `input` args, and — on a terminal
|
|
933
|
+
* turn — the `output` result and `toolState`) so a reloaded turn can
|
|
934
|
+
* re-render its tool-call cards. `source` parts carry a web-search citation
|
|
935
|
+
* (`url` + optional `title`/`sourceId`) so a reloaded turn keeps its sources
|
|
936
|
+
* footer — the persisted twin of the live stream's `source-url` parts.
|
|
937
|
+
* Media parts (`image` / `video` / `audio` / `file`) carry a URL or base64
|
|
938
|
+
* payload in `data` (or `image` / `video` for legacy reasons) plus a
|
|
939
|
+
* `mediaType` MIME string.
|
|
940
|
+
* `source-url` / `source-document` parts carry a persisted citation
|
|
941
|
+
* (web-search grounding / document citation, PRO-430): `url` + `title` for
|
|
942
|
+
* URLs; `mediaType` + `title` + `filename` (+ citation offsets inside
|
|
943
|
+
* `providerMetadata`) for documents; both keyed by `sourceId`.
|
|
944
|
+
* `data-lua-*` parts carry a persisted enriched stream part (e.g. a
|
|
945
|
+
* sub-agent delegation card) with its original data object in `payload`
|
|
946
|
+
* (`data` is reserved for media payload strings).
|
|
865
947
|
*/
|
|
866
948
|
export declare interface ChatHistoryContent {
|
|
867
|
-
type: 'text' | 'image' | 'video' | 'audio' | 'file'
|
|
949
|
+
type: 'text' | 'reasoning' | 'tool' | 'image' | 'video' | 'audio' | 'file' | 'source-url' | 'source-document' | `data-lua-${string}`;
|
|
868
950
|
text?: string;
|
|
869
951
|
image?: string;
|
|
870
952
|
video?: string;
|
|
@@ -872,6 +954,17 @@ export declare interface ChatHistoryContent {
|
|
|
872
954
|
mediaType?: string;
|
|
873
955
|
latitude?: number;
|
|
874
956
|
longitude?: number;
|
|
957
|
+
toolName?: string;
|
|
958
|
+
toolCallId?: string;
|
|
959
|
+
input?: unknown;
|
|
960
|
+
output?: unknown;
|
|
961
|
+
toolState?: string;
|
|
962
|
+
sourceId?: string;
|
|
963
|
+
url?: string;
|
|
964
|
+
title?: string;
|
|
965
|
+
filename?: string;
|
|
966
|
+
providerMetadata?: Record<string, unknown>;
|
|
967
|
+
payload?: unknown;
|
|
875
968
|
}
|
|
876
969
|
|
|
877
970
|
/**
|
|
@@ -886,6 +979,24 @@ export declare interface ChatHistoryMessage {
|
|
|
886
979
|
/** ISO-8601 timestamp string. */
|
|
887
980
|
createdAt: string;
|
|
888
981
|
content: ChatHistoryContent[];
|
|
982
|
+
/**
|
|
983
|
+
* Origin of the message, derived from the `mastra_messages.type` column:
|
|
984
|
+
* `'voice'` for turns mirrored from a finished LiveKit voice call, `'chat'`
|
|
985
|
+
* for everything else. Additive/optional — absent on rows written before this
|
|
986
|
+
* landed and on call sites that don't select the `type` column. Clients use it
|
|
987
|
+
* to render a "Voice call" divider in the thread.
|
|
988
|
+
*/
|
|
989
|
+
source?: 'voice' | 'chat';
|
|
990
|
+
/**
|
|
991
|
+
* Permanent recording for a voice-note turn (Lua Desktop). Populated by the
|
|
992
|
+
* admin threads history endpoint from the row's `content.metadata.audio` — a
|
|
993
|
+
* sibling of the model content, so the url is NEVER part of the LLM prompt.
|
|
994
|
+
* Present only on desktop voice-note user turns; clients render an audio
|
|
995
|
+
* player / voice bubble off `audio.url`. Absent on all other messages.
|
|
996
|
+
*/
|
|
997
|
+
audio?: {
|
|
998
|
+
url: string;
|
|
999
|
+
};
|
|
889
1000
|
}
|
|
890
1001
|
|
|
891
1002
|
/**
|
|
@@ -1268,6 +1379,37 @@ export declare interface DeviceTriggerConfig {
|
|
|
1268
1379
|
}) => Promise<any>;
|
|
1269
1380
|
}
|
|
1270
1381
|
|
|
1382
|
+
/** A matched org member and their shareable channel targets (empty when none shared). */
|
|
1383
|
+
export declare interface DirectoryMatch {
|
|
1384
|
+
userId: string;
|
|
1385
|
+
fullName?: string;
|
|
1386
|
+
primaryEmail?: string;
|
|
1387
|
+
targets: DirectoryTarget[];
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/** Result of POST /developer/agents/:agentId/directory/resolve. */
|
|
1391
|
+
export declare interface DirectoryResolveResult {
|
|
1392
|
+
query: string;
|
|
1393
|
+
matches: DirectoryMatch[];
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Wire contracts for the workspace directory resolve endpoint.
|
|
1398
|
+
*
|
|
1399
|
+
* lua-cli `Team.findMember(name)` ↔ lua-api `POST /developer/agents/:agentId/directory/resolve`.
|
|
1400
|
+
* Resolves a teammate by name within the AGENT's organization (the org is derived
|
|
1401
|
+
* server-side from the agent), returning only the channel handles each member opted
|
|
1402
|
+
* to share. Returns a list — the caller disambiguates when more than one matches.
|
|
1403
|
+
*/
|
|
1404
|
+
/** A channel the teammate opted to be reachable on within the workspace. */
|
|
1405
|
+
export declare interface DirectoryTarget {
|
|
1406
|
+
channel: 'whatsapp' | 'sms' | 'email';
|
|
1407
|
+
/** E.164 for whatsapp/sms; address for email. */
|
|
1408
|
+
value: string;
|
|
1409
|
+
label?: string;
|
|
1410
|
+
validated: boolean;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1271
1413
|
/** A single email attachment, referenced by URL — lua-email fetches the bytes
|
|
1272
1414
|
* server-side and attaches them, keeping large files off the SDK→API hops. */
|
|
1273
1415
|
declare interface EmailAttachmentInput {
|
|
@@ -1278,16 +1420,38 @@ declare interface EmailAttachmentInput {
|
|
|
1278
1420
|
|
|
1279
1421
|
/** Body of POST /developer/agents/:agentId/channels/email/send */
|
|
1280
1422
|
export declare interface EmailSendInput {
|
|
1423
|
+
/** Recipient — `email` (cold) or `userId` (resolved to the user's email
|
|
1424
|
+
* address from their channel history). At least one must be set. */
|
|
1281
1425
|
to: {
|
|
1282
1426
|
userId?: string;
|
|
1283
1427
|
email?: string;
|
|
1284
1428
|
};
|
|
1285
1429
|
subject?: string;
|
|
1430
|
+
/** Plain-text body, sent as-is (the MIME text/plain part). */
|
|
1286
1431
|
text?: string;
|
|
1432
|
+
/** Exact HTML body, sent as-is (the MIME text/html part) — no template wrap. */
|
|
1287
1433
|
html?: string;
|
|
1434
|
+
/**
|
|
1435
|
+
* Rich body — markdown and `:::` component markers, rendered server-side into
|
|
1436
|
+
* the branded email template (the same rendering the agent's own replies use).
|
|
1437
|
+
* Use this for "send this message as a nice email"; use `html` instead when you
|
|
1438
|
+
* want to control the exact markup. Mutually exclusive with `html`/`text`.
|
|
1439
|
+
*/
|
|
1440
|
+
richBody?: string;
|
|
1288
1441
|
cc?: string[];
|
|
1289
1442
|
bcc?: string[];
|
|
1290
1443
|
attachments?: EmailAttachmentInput[];
|
|
1444
|
+
/**
|
|
1445
|
+
* RFC 5322 threading: the `Message-ID` of the email this one replies to. Set
|
|
1446
|
+
* `In-Reply-To` (and append to `References`) so mail clients thread the reply
|
|
1447
|
+
* into the right conversation — e.g. a per-ticket thread. The value is the
|
|
1448
|
+
* inbound email's Message-ID, surfaced to agent code as `webhookPayload.messageId`.
|
|
1449
|
+
* Angle brackets are optional; lua-email wraps bare ids. Honoured on the SES
|
|
1450
|
+
* (branded/`existing`) email channel.
|
|
1451
|
+
*/
|
|
1452
|
+
inReplyTo?: string;
|
|
1453
|
+
/** RFC 5322 `References` chain — the accumulated Message-IDs of the thread. */
|
|
1454
|
+
references?: string[];
|
|
1291
1455
|
options?: ChannelSendOptions;
|
|
1292
1456
|
}
|
|
1293
1457
|
|
|
@@ -1361,9 +1525,20 @@ declare interface GovernanceConfig {
|
|
|
1361
1525
|
* `rules`/`injection` on top. `'security'` = block dangerous tools + requireLevel(2).
|
|
1362
1526
|
*/
|
|
1363
1527
|
preset?: 'security';
|
|
1364
|
-
/**
|
|
1528
|
+
/**
|
|
1529
|
+
* SDK mode — prompt-injection scan on inputs (maps to the SDK's `createInjectionGuard`).
|
|
1530
|
+
* `ml: true` additionally runs the Governance Cloud ML ensemble (regex+DeBERTa) per
|
|
1531
|
+
* message and adds the SDK's `mlInjectionGuard` rule — a hybrid that blocks when EITHER
|
|
1532
|
+
* the regex score crosses `threshold` OR the ML score crosses `mlThreshold`. The two are
|
|
1533
|
+
* scored independently: `threshold` (~0.8) suits the regex weights, while the ML score is
|
|
1534
|
+
* a calibrated model confidence with its own tuned operating point (`mlThreshold`, default
|
|
1535
|
+
* 0.95 — the ensemble's confirmation gate). Requires GOVERNANCE_ML_URL / GOVERNANCE_ML_API_KEY
|
|
1536
|
+
* on the platform; falls back to regex-only when unset or on error.
|
|
1537
|
+
*/
|
|
1365
1538
|
injection?: {
|
|
1366
1539
|
threshold: number;
|
|
1540
|
+
ml?: boolean;
|
|
1541
|
+
mlThreshold?: number;
|
|
1367
1542
|
};
|
|
1368
1543
|
/** SDK mode — local in-memory policy rules layered on top of any `preset`. */
|
|
1369
1544
|
rules?: {
|
|
@@ -1633,7 +1808,7 @@ declare class JobApi extends HttpClient {
|
|
|
1633
1808
|
* @returns Promise resolving to an ApiResponse containing the full updated job
|
|
1634
1809
|
* @throws Error if the job or version is not found or the publish operation fails
|
|
1635
1810
|
*/
|
|
1636
|
-
publishJobVersion(jobId: string, version: string): Promise<ApiResponse<Job>>;
|
|
1811
|
+
publishJobVersion(jobId: string, version: string): Promise<ApiResponse<Job & ScopedPromoteFields>>;
|
|
1637
1812
|
/**
|
|
1638
1813
|
* Deletes a job and all its versions, or deactivates it if it has versions
|
|
1639
1814
|
* @param jobId - The unique identifier of the job to delete
|
|
@@ -2055,6 +2230,7 @@ export declare class LuaAgent {
|
|
|
2055
2230
|
private readonly voices?;
|
|
2056
2231
|
private readonly batching?;
|
|
2057
2232
|
private readonly governance?;
|
|
2233
|
+
private readonly browser?;
|
|
2058
2234
|
/**
|
|
2059
2235
|
* Creates a new LuaAgent instance.
|
|
2060
2236
|
*
|
|
@@ -2073,6 +2249,8 @@ export declare class LuaAgent {
|
|
|
2073
2249
|
*/
|
|
2074
2250
|
constructor(config: LuaAgentConfig);
|
|
2075
2251
|
getName(): string;
|
|
2252
|
+
/** Browser switch (LuaBrowser) — `true`/config when the agent can browse. */
|
|
2253
|
+
getBrowser(): LuaAgentConfig['browser'];
|
|
2076
2254
|
getPersona(): PersonaText;
|
|
2077
2255
|
getModel(): LuaAgentModel | undefined;
|
|
2078
2256
|
getModelSettings(): AgentModelSettings | undefined;
|
|
@@ -2100,8 +2278,12 @@ export declare interface LuaAgentConfig {
|
|
|
2100
2278
|
* Passed straight through to Mastra / AI SDK on every `chat/stream` and
|
|
2101
2279
|
* `chat/generate`. Undefined leaves provider defaults in place.
|
|
2102
2280
|
*
|
|
2281
|
+
* `reasoning` is the exception — it's not a sampling setting. It sets this
|
|
2282
|
+
* agent's default reasoning effort/visibility across providers (Claude,
|
|
2283
|
+
* GPT, Gemini, …); a per-request `options.reasoning` override always wins.
|
|
2284
|
+
*
|
|
2103
2285
|
* @example
|
|
2104
|
-
* modelSettings: { temperature: 0.2, maxOutputTokens: 4096 }
|
|
2286
|
+
* modelSettings: { temperature: 0.2, maxOutputTokens: 4096, reasoning: { effort: 'low' } }
|
|
2105
2287
|
*/
|
|
2106
2288
|
modelSettings?: AgentModelSettings;
|
|
2107
2289
|
/** Array of skills (each with tools) */
|
|
@@ -2133,6 +2315,13 @@ export declare interface LuaAgentConfig {
|
|
|
2133
2315
|
batching?: BatchingConfig;
|
|
2134
2316
|
/** Governance policy configuration. When set, tool calls, preprocessors, and postprocessors are governed. */
|
|
2135
2317
|
governance?: GovernanceConfig;
|
|
2318
|
+
/**
|
|
2319
|
+
* Browser switch (LuaBrowser). `true` turns on browser tools with platform
|
|
2320
|
+
* defaults; an object adds policy (engine, allowedDomains, credentials,
|
|
2321
|
+
* maxSessionMinutes). Off by default — a browser session costs money and
|
|
2322
|
+
* carries risk, so it's opt-in (unlike always-on searchWeb).
|
|
2323
|
+
*/
|
|
2324
|
+
browser?: boolean | BrowserSwitchConfig;
|
|
2136
2325
|
}
|
|
2137
2326
|
|
|
2138
2327
|
/**
|
|
@@ -2863,11 +3052,11 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2863
3052
|
}, "strip", z.ZodTypeAny, {
|
|
2864
3053
|
options?: Record<string, unknown>;
|
|
2865
3054
|
kind?: "realtime";
|
|
2866
|
-
provider?: "
|
|
3055
|
+
provider?: "google" | "xai" | "openai";
|
|
2867
3056
|
}, {
|
|
2868
3057
|
options?: Record<string, unknown>;
|
|
2869
3058
|
kind?: "realtime";
|
|
2870
|
-
provider?: "
|
|
3059
|
+
provider?: "google" | "xai" | "openai";
|
|
2871
3060
|
}>]>;
|
|
2872
3061
|
stt: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
2873
3062
|
kind: z.ZodLiteral<"inference">;
|
|
@@ -2929,11 +3118,11 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2929
3118
|
}, "strip", z.ZodTypeAny, {
|
|
2930
3119
|
options?: Record<string, unknown>;
|
|
2931
3120
|
kind?: "realtime";
|
|
2932
|
-
provider?: "
|
|
3121
|
+
provider?: "google" | "xai" | "openai";
|
|
2933
3122
|
}, {
|
|
2934
3123
|
options?: Record<string, unknown>;
|
|
2935
3124
|
kind?: "realtime";
|
|
2936
|
-
provider?: "
|
|
3125
|
+
provider?: "google" | "xai" | "openai";
|
|
2937
3126
|
}>]>>;
|
|
2938
3127
|
tts: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
2939
3128
|
kind: z.ZodLiteral<"inference">;
|
|
@@ -2995,11 +3184,11 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2995
3184
|
}, "strip", z.ZodTypeAny, {
|
|
2996
3185
|
options?: Record<string, unknown>;
|
|
2997
3186
|
kind?: "realtime";
|
|
2998
|
-
provider?: "
|
|
3187
|
+
provider?: "google" | "xai" | "openai";
|
|
2999
3188
|
}, {
|
|
3000
3189
|
options?: Record<string, unknown>;
|
|
3001
3190
|
kind?: "realtime";
|
|
3002
|
-
provider?: "
|
|
3191
|
+
provider?: "google" | "xai" | "openai";
|
|
3003
3192
|
}>]>>;
|
|
3004
3193
|
vad: z.ZodOptional<z.ZodString>;
|
|
3005
3194
|
vadOptions: z.ZodOptional<z.ZodObject<{
|
|
@@ -3032,28 +3221,28 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3032
3221
|
maxDelay: z.ZodOptional<z.ZodNumber>;
|
|
3033
3222
|
}, "strip", z.ZodTypeAny, {
|
|
3034
3223
|
enabled?: boolean;
|
|
3035
|
-
mode?: "
|
|
3224
|
+
mode?: "adaptive" | "vad";
|
|
3036
3225
|
falseInterruptionTimeout?: number;
|
|
3037
3226
|
resumeFalseInterruption?: boolean;
|
|
3038
3227
|
minDelay?: number;
|
|
3039
3228
|
maxDelay?: number;
|
|
3040
3229
|
}, {
|
|
3041
3230
|
enabled?: boolean;
|
|
3042
|
-
mode?: "
|
|
3231
|
+
mode?: "adaptive" | "vad";
|
|
3043
3232
|
falseInterruptionTimeout?: number;
|
|
3044
3233
|
resumeFalseInterruption?: boolean;
|
|
3045
3234
|
minDelay?: number;
|
|
3046
3235
|
maxDelay?: number;
|
|
3047
3236
|
}>, {
|
|
3048
3237
|
enabled?: boolean;
|
|
3049
|
-
mode?: "
|
|
3238
|
+
mode?: "adaptive" | "vad";
|
|
3050
3239
|
falseInterruptionTimeout?: number;
|
|
3051
3240
|
resumeFalseInterruption?: boolean;
|
|
3052
3241
|
minDelay?: number;
|
|
3053
3242
|
maxDelay?: number;
|
|
3054
3243
|
}, {
|
|
3055
3244
|
enabled?: boolean;
|
|
3056
|
-
mode?: "
|
|
3245
|
+
mode?: "adaptive" | "vad";
|
|
3057
3246
|
falseInterruptionTimeout?: number;
|
|
3058
3247
|
resumeFalseInterruption?: boolean;
|
|
3059
3248
|
minDelay?: number;
|
|
@@ -3157,6 +3346,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3157
3346
|
onToolFailureSay: z.ZodOptional<z.ZodString>;
|
|
3158
3347
|
excludeTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3159
3348
|
}, "strip", z.ZodTypeAny, {
|
|
3349
|
+
name?: string;
|
|
3160
3350
|
vad?: string;
|
|
3161
3351
|
stt?: {
|
|
3162
3352
|
voice?: string;
|
|
@@ -3171,10 +3361,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3171
3361
|
} | {
|
|
3172
3362
|
options?: Record<string, unknown>;
|
|
3173
3363
|
kind?: "realtime";
|
|
3174
|
-
provider?: "
|
|
3364
|
+
provider?: "google" | "xai" | "openai";
|
|
3175
3365
|
};
|
|
3176
3366
|
volume?: number;
|
|
3177
|
-
name?: string;
|
|
3178
3367
|
llm?: {
|
|
3179
3368
|
voice?: string;
|
|
3180
3369
|
options?: Record<string, unknown>;
|
|
@@ -3188,7 +3377,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3188
3377
|
} | {
|
|
3189
3378
|
options?: Record<string, unknown>;
|
|
3190
3379
|
kind?: "realtime";
|
|
3191
|
-
provider?: "
|
|
3380
|
+
provider?: "google" | "xai" | "openai";
|
|
3192
3381
|
};
|
|
3193
3382
|
tts?: {
|
|
3194
3383
|
voice?: string;
|
|
@@ -3203,7 +3392,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3203
3392
|
} | {
|
|
3204
3393
|
options?: Record<string, unknown>;
|
|
3205
3394
|
kind?: "realtime";
|
|
3206
|
-
provider?: "
|
|
3395
|
+
provider?: "google" | "xai" | "openai";
|
|
3207
3396
|
};
|
|
3208
3397
|
vadOptions?: {
|
|
3209
3398
|
minSpeechDuration?: number;
|
|
@@ -3218,7 +3407,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3218
3407
|
preemptiveGeneration?: boolean;
|
|
3219
3408
|
interruption?: {
|
|
3220
3409
|
enabled?: boolean;
|
|
3221
|
-
mode?: "
|
|
3410
|
+
mode?: "adaptive" | "vad";
|
|
3222
3411
|
falseInterruptionTimeout?: number;
|
|
3223
3412
|
resumeFalseInterruption?: boolean;
|
|
3224
3413
|
minDelay?: number;
|
|
@@ -3251,6 +3440,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3251
3440
|
onToolFailureSay?: string;
|
|
3252
3441
|
excludeTools?: string[];
|
|
3253
3442
|
}, {
|
|
3443
|
+
name?: string;
|
|
3254
3444
|
vad?: string;
|
|
3255
3445
|
stt?: {
|
|
3256
3446
|
voice?: string;
|
|
@@ -3265,10 +3455,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3265
3455
|
} | {
|
|
3266
3456
|
options?: Record<string, unknown>;
|
|
3267
3457
|
kind?: "realtime";
|
|
3268
|
-
provider?: "
|
|
3458
|
+
provider?: "google" | "xai" | "openai";
|
|
3269
3459
|
};
|
|
3270
3460
|
volume?: number;
|
|
3271
|
-
name?: string;
|
|
3272
3461
|
llm?: {
|
|
3273
3462
|
voice?: string;
|
|
3274
3463
|
options?: Record<string, unknown>;
|
|
@@ -3282,7 +3471,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3282
3471
|
} | {
|
|
3283
3472
|
options?: Record<string, unknown>;
|
|
3284
3473
|
kind?: "realtime";
|
|
3285
|
-
provider?: "
|
|
3474
|
+
provider?: "google" | "xai" | "openai";
|
|
3286
3475
|
};
|
|
3287
3476
|
tts?: {
|
|
3288
3477
|
voice?: string;
|
|
@@ -3297,7 +3486,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3297
3486
|
} | {
|
|
3298
3487
|
options?: Record<string, unknown>;
|
|
3299
3488
|
kind?: "realtime";
|
|
3300
|
-
provider?: "
|
|
3489
|
+
provider?: "google" | "xai" | "openai";
|
|
3301
3490
|
};
|
|
3302
3491
|
vadOptions?: {
|
|
3303
3492
|
minSpeechDuration?: number;
|
|
@@ -3312,7 +3501,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3312
3501
|
preemptiveGeneration?: boolean;
|
|
3313
3502
|
interruption?: {
|
|
3314
3503
|
enabled?: boolean;
|
|
3315
|
-
mode?: "
|
|
3504
|
+
mode?: "adaptive" | "vad";
|
|
3316
3505
|
falseInterruptionTimeout?: number;
|
|
3317
3506
|
resumeFalseInterruption?: boolean;
|
|
3318
3507
|
minDelay?: number;
|
|
@@ -3345,6 +3534,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3345
3534
|
onToolFailureSay?: string;
|
|
3346
3535
|
excludeTools?: string[];
|
|
3347
3536
|
}>, {
|
|
3537
|
+
name?: string;
|
|
3348
3538
|
vad?: string;
|
|
3349
3539
|
stt?: {
|
|
3350
3540
|
voice?: string;
|
|
@@ -3359,10 +3549,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3359
3549
|
} | {
|
|
3360
3550
|
options?: Record<string, unknown>;
|
|
3361
3551
|
kind?: "realtime";
|
|
3362
|
-
provider?: "
|
|
3552
|
+
provider?: "google" | "xai" | "openai";
|
|
3363
3553
|
};
|
|
3364
3554
|
volume?: number;
|
|
3365
|
-
name?: string;
|
|
3366
3555
|
llm?: {
|
|
3367
3556
|
voice?: string;
|
|
3368
3557
|
options?: Record<string, unknown>;
|
|
@@ -3376,7 +3565,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3376
3565
|
} | {
|
|
3377
3566
|
options?: Record<string, unknown>;
|
|
3378
3567
|
kind?: "realtime";
|
|
3379
|
-
provider?: "
|
|
3568
|
+
provider?: "google" | "xai" | "openai";
|
|
3380
3569
|
};
|
|
3381
3570
|
tts?: {
|
|
3382
3571
|
voice?: string;
|
|
@@ -3391,7 +3580,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3391
3580
|
} | {
|
|
3392
3581
|
options?: Record<string, unknown>;
|
|
3393
3582
|
kind?: "realtime";
|
|
3394
|
-
provider?: "
|
|
3583
|
+
provider?: "google" | "xai" | "openai";
|
|
3395
3584
|
};
|
|
3396
3585
|
vadOptions?: {
|
|
3397
3586
|
minSpeechDuration?: number;
|
|
@@ -3406,7 +3595,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3406
3595
|
preemptiveGeneration?: boolean;
|
|
3407
3596
|
interruption?: {
|
|
3408
3597
|
enabled?: boolean;
|
|
3409
|
-
mode?: "
|
|
3598
|
+
mode?: "adaptive" | "vad";
|
|
3410
3599
|
falseInterruptionTimeout?: number;
|
|
3411
3600
|
resumeFalseInterruption?: boolean;
|
|
3412
3601
|
minDelay?: number;
|
|
@@ -3439,6 +3628,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3439
3628
|
onToolFailureSay?: string;
|
|
3440
3629
|
excludeTools?: string[];
|
|
3441
3630
|
}, {
|
|
3631
|
+
name?: string;
|
|
3442
3632
|
vad?: string;
|
|
3443
3633
|
stt?: {
|
|
3444
3634
|
voice?: string;
|
|
@@ -3453,10 +3643,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3453
3643
|
} | {
|
|
3454
3644
|
options?: Record<string, unknown>;
|
|
3455
3645
|
kind?: "realtime";
|
|
3456
|
-
provider?: "
|
|
3646
|
+
provider?: "google" | "xai" | "openai";
|
|
3457
3647
|
};
|
|
3458
3648
|
volume?: number;
|
|
3459
|
-
name?: string;
|
|
3460
3649
|
llm?: {
|
|
3461
3650
|
voice?: string;
|
|
3462
3651
|
options?: Record<string, unknown>;
|
|
@@ -3470,7 +3659,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3470
3659
|
} | {
|
|
3471
3660
|
options?: Record<string, unknown>;
|
|
3472
3661
|
kind?: "realtime";
|
|
3473
|
-
provider?: "
|
|
3662
|
+
provider?: "google" | "xai" | "openai";
|
|
3474
3663
|
};
|
|
3475
3664
|
tts?: {
|
|
3476
3665
|
voice?: string;
|
|
@@ -3485,7 +3674,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3485
3674
|
} | {
|
|
3486
3675
|
options?: Record<string, unknown>;
|
|
3487
3676
|
kind?: "realtime";
|
|
3488
|
-
provider?: "
|
|
3677
|
+
provider?: "google" | "xai" | "openai";
|
|
3489
3678
|
};
|
|
3490
3679
|
vadOptions?: {
|
|
3491
3680
|
minSpeechDuration?: number;
|
|
@@ -3500,7 +3689,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3500
3689
|
preemptiveGeneration?: boolean;
|
|
3501
3690
|
interruption?: {
|
|
3502
3691
|
enabled?: boolean;
|
|
3503
|
-
mode?: "
|
|
3692
|
+
mode?: "adaptive" | "vad";
|
|
3504
3693
|
falseInterruptionTimeout?: number;
|
|
3505
3694
|
resumeFalseInterruption?: boolean;
|
|
3506
3695
|
minDelay?: number;
|
|
@@ -4793,6 +4982,29 @@ declare interface PushJobVersionDTO {
|
|
|
4793
4982
|
metadata?: Record<string, any>;
|
|
4794
4983
|
}
|
|
4795
4984
|
|
|
4985
|
+
/**
|
|
4986
|
+
* Normalized, provider-agnostic model request options.
|
|
4987
|
+
*
|
|
4988
|
+
* This is the shape clients (Lua Desktop, lua-cli, admin overrides) use to
|
|
4989
|
+
* ask for a reasoning effort / output verbosity without knowing which
|
|
4990
|
+
* provider dialect (Anthropic `thinking`, OpenAI `reasoningEffort`, Google
|
|
4991
|
+
* `thinkingConfig`, …) the resolved model actually speaks. lua-core's
|
|
4992
|
+
* `buildProviderOptions` translates this into the wire-level
|
|
4993
|
+
* `providerOptions` shape per model.
|
|
4994
|
+
*/
|
|
4995
|
+
declare const REASONING_EFFORT_VALUES: readonly ["off", "minimal", "low", "medium", "high", "max"];
|
|
4996
|
+
|
|
4997
|
+
declare type ReasoningEffort = (typeof REASONING_EFFORT_VALUES)[number];
|
|
4998
|
+
|
|
4999
|
+
/**
|
|
5000
|
+
* Additive field on primitive publish responses. When the agent is under
|
|
5001
|
+
* versioning the server performs a scoped promote and returns the newly
|
|
5002
|
+
* minted + promoted agent version here; absent when the agent has no versions.
|
|
5003
|
+
*/
|
|
5004
|
+
declare interface ScopedPromoteFields {
|
|
5005
|
+
agentVersion?: number;
|
|
5006
|
+
}
|
|
5007
|
+
|
|
4796
5008
|
/**
|
|
4797
5009
|
* Response from product search.
|
|
4798
5010
|
*/
|
|
@@ -4843,6 +5055,33 @@ declare type SkillContextText = string | {
|
|
|
4843
5055
|
text?: string;
|
|
4844
5056
|
};
|
|
4845
5057
|
|
|
5058
|
+
export declare const Team: TeamApi;
|
|
5059
|
+
|
|
5060
|
+
/**
|
|
5061
|
+
* Team API — resolve a teammate by name within the agent's organization and get
|
|
5062
|
+
* the channel handles they opted to share. Pair with `Channels.send` to message a
|
|
5063
|
+
* colleague without typing their number.
|
|
5064
|
+
*
|
|
5065
|
+
* The org is derived server-side from the agent; you can only resolve members of
|
|
5066
|
+
* your own org. Returns a list — disambiguate when more than one member matches.
|
|
5067
|
+
*
|
|
5068
|
+
* @example
|
|
5069
|
+
* ```typescript
|
|
5070
|
+
* const { matches } = await Team.findMember('Stefan');
|
|
5071
|
+
* const wa = matches[0]?.targets.find((t) => t.channel === 'whatsapp');
|
|
5072
|
+
* if (wa) {
|
|
5073
|
+
* await Channels.send({ channel: 'whatsapp', to: { phoneNumber: wa.value }, text: 'Hi Stefan!' });
|
|
5074
|
+
* }
|
|
5075
|
+
* ```
|
|
5076
|
+
*/
|
|
5077
|
+
export declare interface TeamApi {
|
|
5078
|
+
/**
|
|
5079
|
+
* Resolve teammates whose name matches, each with their shareable channel
|
|
5080
|
+
* targets (empty `targets[]` when the member shared nothing).
|
|
5081
|
+
*/
|
|
5082
|
+
findMember(name: string): Promise<DirectoryResolveResult>;
|
|
5083
|
+
}
|
|
5084
|
+
|
|
4846
5085
|
/**
|
|
4847
5086
|
* Templates API
|
|
4848
5087
|
*
|
|
@@ -5403,6 +5642,20 @@ export declare interface WebhookRequest {
|
|
|
5403
5642
|
payload: any;
|
|
5404
5643
|
}
|
|
5405
5644
|
|
|
5645
|
+
/** Body of POST /developer/agents/:agentId/channels/whatsapp/reaction */
|
|
5646
|
+
export declare interface WhatsAppReactionSendInput {
|
|
5647
|
+
to: {
|
|
5648
|
+
userId?: string;
|
|
5649
|
+
phoneNumber?: string;
|
|
5650
|
+
};
|
|
5651
|
+
/** Vendor id (`wamid...`) of the message to react to — e.g. an inbound
|
|
5652
|
+
* message's id from the conversation history, ≤30 days old per Meta. */
|
|
5653
|
+
messageId: string;
|
|
5654
|
+
/** A single emoji. An empty string removes the agent's existing reaction. */
|
|
5655
|
+
emoji: string;
|
|
5656
|
+
options?: ChannelSendOptions;
|
|
5657
|
+
}
|
|
5658
|
+
|
|
5406
5659
|
export declare interface WhatsAppTemplate {
|
|
5407
5660
|
id: string;
|
|
5408
5661
|
name: string;
|