lua-cli 3.10.5 → 3.12.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/README.md +12 -0
- package/dist/api/agents.api.service.d.ts +21 -0
- package/dist/api/agents.api.service.d.ts.map +1 -0
- package/dist/api/agents.api.service.js +49 -0
- package/dist/api/agents.api.service.js.map +1 -0
- package/dist/api/device-trigger.api.service.d.ts +136 -0
- package/dist/api/device-trigger.api.service.d.ts.map +1 -0
- package/dist/api/device-trigger.api.service.js +120 -0
- package/dist/api/device-trigger.api.service.js.map +1 -0
- package/dist/api/lazy-instances.d.ts +8 -0
- package/dist/api/lazy-instances.d.ts.map +1 -1
- package/dist/api/lazy-instances.js +16 -0
- package/dist/api/lazy-instances.js.map +1 -1
- package/dist/api/unifiedto.api.service.d.ts +18 -1
- package/dist/api/unifiedto.api.service.d.ts.map +1 -1
- package/dist/api/unifiedto.api.service.js +26 -0
- package/dist/api/unifiedto.api.service.js.map +1 -1
- package/dist/api-exports.d.ts +57 -2
- package/dist/api-exports.d.ts.map +1 -1
- package/dist/api-exports.js +36 -2
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.d.ts.map +1 -1
- package/dist/cli/command-definitions.js +57 -3
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/governance.d.ts +7 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +256 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/integrations.d.ts.map +1 -1
- package/dist/commands/integrations.js +456 -80
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +25 -27
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +67 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/compiler/agent-traverser.d.ts.map +1 -1
- package/dist/compiler/agent-traverser.js +1 -0
- package/dist/compiler/agent-traverser.js.map +1 -1
- package/dist/compiler/compiler.d.ts.map +1 -1
- package/dist/compiler/compiler.js +13 -0
- package/dist/compiler/compiler.js.map +1 -1
- package/dist/compiler/plugins/agent.plugin.d.ts +5 -0
- package/dist/compiler/plugins/agent.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/agent.plugin.js +13 -0
- package/dist/compiler/plugins/agent.plugin.js.map +1 -1
- package/dist/compiler/plugins/base.d.ts +28 -0
- package/dist/compiler/plugins/base.d.ts.map +1 -1
- package/dist/compiler/plugins/base.js.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts +38 -0
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +1 -0
- package/dist/compiler/plugins/device-trigger.plugin.js +103 -0
- package/dist/compiler/plugins/device-trigger.plugin.js.map +1 -0
- package/dist/compiler/plugins/device.plugin.d.ts +2 -9
- package/dist/compiler/plugins/device.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device.plugin.js +2 -204
- package/dist/compiler/plugins/device.plugin.js.map +1 -1
- package/dist/compiler/plugins/registry.d.ts.map +1 -1
- package/dist/compiler/plugins/registry.js +2 -0
- package/dist/compiler/plugins/registry.js.map +1 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +7 -3
- package/dist/compiler/plugins/skill.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/skill.plugin.js +22 -4
- package/dist/compiler/plugins/skill.plugin.js.map +1 -1
- package/dist/compiler/types.d.ts +21 -35
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/compiler/types.js +1 -0
- package/dist/compiler/types.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/agent.d.ts +3 -1
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/interfaces/device-triggers.d.ts +82 -0
- package/dist/interfaces/device-triggers.d.ts.map +1 -0
- package/dist/interfaces/device-triggers.js +6 -0
- package/dist/interfaces/device-triggers.js.map +1 -0
- package/dist/interfaces/unifiedto.d.ts +19 -0
- package/dist/interfaces/unifiedto.d.ts.map +1 -1
- package/dist/primitives/agent.handler.d.ts +7 -2
- package/dist/primitives/agent.handler.d.ts.map +1 -1
- package/dist/primitives/agent.handler.js +43 -6
- package/dist/primitives/agent.handler.js.map +1 -1
- package/dist/primitives/base.handler.d.ts +76 -3
- package/dist/primitives/base.handler.d.ts.map +1 -1
- package/dist/primitives/base.handler.js +99 -8
- package/dist/primitives/base.handler.js.map +1 -1
- package/dist/primitives/device-trigger.handler.d.ts +56 -0
- package/dist/primitives/device-trigger.handler.d.ts.map +1 -0
- package/dist/primitives/device-trigger.handler.js +100 -0
- package/dist/primitives/device-trigger.handler.js.map +1 -0
- package/dist/primitives/device.handler.d.ts.map +1 -1
- package/dist/primitives/device.handler.js +0 -2
- package/dist/primitives/device.handler.js.map +1 -1
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +4 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/mcp-server.handler.d.ts +46 -22
- package/dist/primitives/mcp-server.handler.d.ts.map +1 -1
- package/dist/primitives/mcp-server.handler.js +52 -21
- package/dist/primitives/mcp-server.handler.js.map +1 -1
- package/dist/types/skill.d.ts +65 -8
- package/dist/types/skill.d.ts.map +1 -1
- package/dist/types/skill.js +18 -0
- package/dist/types/skill.js.map +1 -1
- package/dist/types/yaml.types.d.ts +7 -0
- package/dist/types/yaml.types.d.ts.map +1 -1
- package/dist/utils/artifact-loader.d.ts +2 -1
- package/dist/utils/artifact-loader.d.ts.map +1 -1
- package/dist/utils/artifact-loader.js +3 -0
- package/dist/utils/artifact-loader.js.map +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/sandbox.js +10 -0
- package/dist/utils/sandbox.js.map +1 -1
- package/dist/utils/sync-display.d.ts +1 -0
- package/dist/utils/sync-display.d.ts.map +1 -1
- package/dist/utils/sync-display.js +8 -0
- package/dist/utils/sync-display.js.map +1 -1
- package/dist/utils/sync-fetch.d.ts +9 -2
- package/dist/utils/sync-fetch.d.ts.map +1 -1
- package/dist/utils/sync-fetch.js +21 -7
- package/dist/utils/sync-fetch.js.map +1 -1
- package/dist/utils/sync-helpers.d.ts +2 -2
- package/dist/utils/sync-helpers.d.ts.map +1 -1
- package/dist/utils/sync-helpers.js +2 -2
- package/dist/utils/sync-helpers.js.map +1 -1
- package/docs/README.md +1 -1
- package/node_modules/@lua/shared-types/dist/index.d.mts +122 -1
- package/node_modules/@lua/shared-types/dist/index.d.ts +122 -1
- package/node_modules/@lua/shared-types/src/agent-config.types.ts +31 -0
- package/node_modules/@lua/shared-types/src/agent-invocation.types.ts +73 -0
- package/node_modules/@lua/shared-types/src/device.types.ts +18 -0
- package/node_modules/@lua/shared-types/src/index.ts +2 -0
- package/package.json +2 -1
- package/template/package.json +1 -1
|
@@ -89,6 +89,77 @@ interface AiGenerateOutput {
|
|
|
89
89
|
*/
|
|
90
90
|
declare function aiGenerateInputFromSimplified(prompt: string, content?: UserContent): AiGenerateInput;
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Wire-format input for sandbox `Agents.invoke` / `POST /chat/generate/:agentId`
|
|
94
|
+
* when triggered programmatically by another agent/skill/tool.
|
|
95
|
+
*
|
|
96
|
+
* Intentionally a narrow, safe subset of the public `ChatMessageDto` — omits
|
|
97
|
+
* sandbox-only overrides (`skillOverride`, `preprocessorOverride`, etc.),
|
|
98
|
+
* webhook payloads, navigation hints, and persona override.
|
|
99
|
+
*
|
|
100
|
+
* Either `prompt` or `messages` must be provided. When `prompt` is given, it is
|
|
101
|
+
* converted into a single `{ role: 'user', content: [{ type: 'text', text: prompt }] }`
|
|
102
|
+
* message downstream.
|
|
103
|
+
*/
|
|
104
|
+
interface AgentInvocationInput {
|
|
105
|
+
/** Shortcut: plain-text prompt. Mutually exclusive with `messages`. */
|
|
106
|
+
prompt?: string;
|
|
107
|
+
/** AI SDK `UserContent` (text/image/file parts). Mutually exclusive with `prompt`. */
|
|
108
|
+
messages?: UserContent;
|
|
109
|
+
/** Override the target agent's system prompt for this invocation. */
|
|
110
|
+
systemPrompt?: string;
|
|
111
|
+
/** Additional runtime context attached to the request. */
|
|
112
|
+
runtimeContext?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Optional thread ID suffix for conversation scoping. When omitted, the
|
|
115
|
+
* invocation flows into the caller-user's default chat thread with the
|
|
116
|
+
* target agent (same behavior as a direct `POST /chat/generate/:agentId`
|
|
117
|
+
* call with no `threadId`). Pass a custom value to isolate invocations.
|
|
118
|
+
*/
|
|
119
|
+
threadId?: string;
|
|
120
|
+
/** Channel identifier, defaults to `'agent-invocation'`. */
|
|
121
|
+
channel?: string;
|
|
122
|
+
/** Free-form request tag persisted on the stored Message record (e.g. a UUID
|
|
123
|
+
* or external trace id for correlation). Not a user identifier. Omitted
|
|
124
|
+
* by default. */
|
|
125
|
+
identifier?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Explicit user to invoke as. Use from context-less triggers (webhooks,
|
|
128
|
+
* pre-defined jobs) where there is no ambient user — mirrors the `User.get(userId)`
|
|
129
|
+
* contract. When omitted from a webhook/pre-defined job, the invocation runs in
|
|
130
|
+
* system scope (no per-user identity, no conversation history). Ignored during
|
|
131
|
+
* a user-authenticated turn — the turn's user is always used, no impersonation.
|
|
132
|
+
*/
|
|
133
|
+
userId?: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Narrowed, wire-safe output for `Agents.invoke`. A slice of the internal
|
|
137
|
+
* `FullOutput` shape — raw Mastra steps / tripwire payloads are intentionally
|
|
138
|
+
* not exposed to skill code.
|
|
139
|
+
*/
|
|
140
|
+
interface AgentInvocationOutput {
|
|
141
|
+
/** Final response text (post-processor-modified, if applicable). */
|
|
142
|
+
text: string;
|
|
143
|
+
/** AI SDK `FinishReason` (or `'preprocessor_blocked'` / `'governance_blocked'`). */
|
|
144
|
+
finishReason?: string;
|
|
145
|
+
/** Token usage summary. */
|
|
146
|
+
usage?: {
|
|
147
|
+
inputTokens?: number;
|
|
148
|
+
outputTokens?: number;
|
|
149
|
+
totalTokens?: number;
|
|
150
|
+
reasoningTokens?: number;
|
|
151
|
+
cachedInputTokens?: number;
|
|
152
|
+
};
|
|
153
|
+
/** Names of tools invoked during generation. */
|
|
154
|
+
toolsUsed?: string[];
|
|
155
|
+
/**
|
|
156
|
+
* Echoes back the `threadId` suffix the caller passed in (if any). When the
|
|
157
|
+
* caller omitted `threadId`, this is undefined — the invocation ran in the
|
|
158
|
+
* user's default chat thread with the target agent.
|
|
159
|
+
*/
|
|
160
|
+
threadId?: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
92
163
|
/**
|
|
93
164
|
* Sandbox contract: defines what every sandbox MUST expose.
|
|
94
165
|
* Both lua-cli and lua-core test against this contract.
|
|
@@ -246,6 +317,25 @@ interface CachedDeviceTrigger {
|
|
|
246
317
|
payloadSchema?: Record<string, any>;
|
|
247
318
|
hasExecute: boolean;
|
|
248
319
|
}
|
|
320
|
+
/** Command definition sent by a device at connect time (self-describing) */
|
|
321
|
+
interface DeviceCommandDefinition {
|
|
322
|
+
name: string;
|
|
323
|
+
description: string;
|
|
324
|
+
inputSchema?: Record<string, any>;
|
|
325
|
+
timeoutMs?: number;
|
|
326
|
+
retry?: {
|
|
327
|
+
maxAttempts: number;
|
|
328
|
+
backoffMs: number;
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
/** Standalone device trigger definition (compiled agent-side primitive) */
|
|
332
|
+
interface CachedDeviceTriggerDefinition {
|
|
333
|
+
name: string;
|
|
334
|
+
description: string;
|
|
335
|
+
payloadSchema?: Record<string, any>;
|
|
336
|
+
artifact: string;
|
|
337
|
+
env: Record<string, string>;
|
|
338
|
+
}
|
|
249
339
|
|
|
250
340
|
/**
|
|
251
341
|
* Shared type definitions for the model registry.
|
|
@@ -270,9 +360,40 @@ interface ApprovedModelDef {
|
|
|
270
360
|
};
|
|
271
361
|
}
|
|
272
362
|
|
|
363
|
+
/**
|
|
364
|
+
* Per-agent message batching/debounce configuration.
|
|
365
|
+
* Overrides platform-wide env var defaults for this specific agent.
|
|
366
|
+
*/
|
|
367
|
+
interface BatchingConfig {
|
|
368
|
+
/** Hold first message N ms before processing, to allow rapid follow-ups to batch together. 0 = disabled. */
|
|
369
|
+
firstMessageDelayMs?: number;
|
|
370
|
+
/** Window to collect subsequent messages while one is in-flight (ms). 0 = batching disabled. */
|
|
371
|
+
debounceWindowMs?: number;
|
|
372
|
+
/** Maximum messages collected in a single batch. */
|
|
373
|
+
maxBatchMessages?: number;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Governance SDK configuration persisted on the SubAgent document.
|
|
377
|
+
*
|
|
378
|
+
* The API-mode bearer token is NEVER stored here. At runtime the
|
|
379
|
+
* platform resolves it from the `GOVERNANCE_API_KEY` env var. This
|
|
380
|
+
* keeps secrets out of MongoDB, support logs, and backups.
|
|
381
|
+
*/
|
|
382
|
+
interface GovernanceConfig {
|
|
383
|
+
mode: 'sdk' | 'api';
|
|
384
|
+
/** SDK mode — local in-memory policy rules */
|
|
385
|
+
rules?: {
|
|
386
|
+
blockTools?: string[];
|
|
387
|
+
requireApproval?: string[];
|
|
388
|
+
tokenBudget?: number;
|
|
389
|
+
};
|
|
390
|
+
/** API mode — remote enforcement server URL */
|
|
391
|
+
serverUrl?: string;
|
|
392
|
+
}
|
|
393
|
+
|
|
273
394
|
/**
|
|
274
395
|
* Build a default persona guide with the agent name filled in.
|
|
275
396
|
*/
|
|
276
397
|
declare function buildDefaultPersona(agentName: string): string;
|
|
277
398
|
|
|
278
|
-
export { type AiGenerateInput, type AiGenerateOutput, type AiGenerateSource, type AiGenerateToolCall, type AiGenerateToolResult, type ApprovedModelDef, type CachedDeviceCommand, type CachedDeviceDefinition, type CachedDeviceTrigger, type Channel, type CommandHashData, type CommandState, type CommandStreamEntry, type DeviceCommandMessage, type DeviceInfo, type DeviceResponseMessage, type DeviceStatus, type DeviceTriggerAckMessage, type DeviceTriggerMessage, REQUIRED_ENUMS, REQUIRED_NESTED_APIS, REQUIRED_PLATFORM_APIS, REQUIRED_PRIMITIVE_SHIMS, REQUIRED_UTILITIES, type ResponseStreamEntry, type TriggerStreamEntry, UNSTRUCTURED_SUPPORTED_MEDIA_TYPES, aiGenerateInputFromSimplified, buildDefaultPersona };
|
|
399
|
+
export { type AgentInvocationInput, type AgentInvocationOutput, type AiGenerateInput, type AiGenerateOutput, type AiGenerateSource, type AiGenerateToolCall, type AiGenerateToolResult, type ApprovedModelDef, type BatchingConfig, type CachedDeviceCommand, type CachedDeviceDefinition, type CachedDeviceTrigger, type CachedDeviceTriggerDefinition, type Channel, type CommandHashData, type CommandState, type CommandStreamEntry, type DeviceCommandDefinition, type DeviceCommandMessage, type DeviceInfo, type DeviceResponseMessage, type DeviceStatus, type DeviceTriggerAckMessage, type DeviceTriggerMessage, type GovernanceConfig, REQUIRED_ENUMS, REQUIRED_NESTED_APIS, REQUIRED_PLATFORM_APIS, REQUIRED_PRIMITIVE_SHIMS, REQUIRED_UTILITIES, type ResponseStreamEntry, type TriggerStreamEntry, UNSTRUCTURED_SUPPORTED_MEDIA_TYPES, aiGenerateInputFromSimplified, buildDefaultPersona };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-agent message batching/debounce configuration.
|
|
3
|
+
* Overrides platform-wide env var defaults for this specific agent.
|
|
4
|
+
*/
|
|
5
|
+
export interface BatchingConfig {
|
|
6
|
+
/** Hold first message N ms before processing, to allow rapid follow-ups to batch together. 0 = disabled. */
|
|
7
|
+
firstMessageDelayMs?: number;
|
|
8
|
+
/** Window to collect subsequent messages while one is in-flight (ms). 0 = batching disabled. */
|
|
9
|
+
debounceWindowMs?: number;
|
|
10
|
+
/** Maximum messages collected in a single batch. */
|
|
11
|
+
maxBatchMessages?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Governance SDK configuration persisted on the SubAgent document.
|
|
16
|
+
*
|
|
17
|
+
* The API-mode bearer token is NEVER stored here. At runtime the
|
|
18
|
+
* platform resolves it from the `GOVERNANCE_API_KEY` env var. This
|
|
19
|
+
* keeps secrets out of MongoDB, support logs, and backups.
|
|
20
|
+
*/
|
|
21
|
+
export interface GovernanceConfig {
|
|
22
|
+
mode: 'sdk' | 'api';
|
|
23
|
+
/** SDK mode — local in-memory policy rules */
|
|
24
|
+
rules?: {
|
|
25
|
+
blockTools?: string[];
|
|
26
|
+
requireApproval?: string[];
|
|
27
|
+
tokenBudget?: number;
|
|
28
|
+
};
|
|
29
|
+
/** API mode — remote enforcement server URL */
|
|
30
|
+
serverUrl?: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { UserContent } from 'ai';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wire-format input for sandbox `Agents.invoke` / `POST /chat/generate/:agentId`
|
|
5
|
+
* when triggered programmatically by another agent/skill/tool.
|
|
6
|
+
*
|
|
7
|
+
* Intentionally a narrow, safe subset of the public `ChatMessageDto` — omits
|
|
8
|
+
* sandbox-only overrides (`skillOverride`, `preprocessorOverride`, etc.),
|
|
9
|
+
* webhook payloads, navigation hints, and persona override.
|
|
10
|
+
*
|
|
11
|
+
* Either `prompt` or `messages` must be provided. When `prompt` is given, it is
|
|
12
|
+
* converted into a single `{ role: 'user', content: [{ type: 'text', text: prompt }] }`
|
|
13
|
+
* message downstream.
|
|
14
|
+
*/
|
|
15
|
+
export interface AgentInvocationInput {
|
|
16
|
+
/** Shortcut: plain-text prompt. Mutually exclusive with `messages`. */
|
|
17
|
+
prompt?: string;
|
|
18
|
+
/** AI SDK `UserContent` (text/image/file parts). Mutually exclusive with `prompt`. */
|
|
19
|
+
messages?: UserContent;
|
|
20
|
+
/** Override the target agent's system prompt for this invocation. */
|
|
21
|
+
systemPrompt?: string;
|
|
22
|
+
/** Additional runtime context attached to the request. */
|
|
23
|
+
runtimeContext?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional thread ID suffix for conversation scoping. When omitted, the
|
|
26
|
+
* invocation flows into the caller-user's default chat thread with the
|
|
27
|
+
* target agent (same behavior as a direct `POST /chat/generate/:agentId`
|
|
28
|
+
* call with no `threadId`). Pass a custom value to isolate invocations.
|
|
29
|
+
*/
|
|
30
|
+
threadId?: string;
|
|
31
|
+
/** Channel identifier, defaults to `'agent-invocation'`. */
|
|
32
|
+
channel?: string;
|
|
33
|
+
/** Free-form request tag persisted on the stored Message record (e.g. a UUID
|
|
34
|
+
* or external trace id for correlation). Not a user identifier. Omitted
|
|
35
|
+
* by default. */
|
|
36
|
+
identifier?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Explicit user to invoke as. Use from context-less triggers (webhooks,
|
|
39
|
+
* pre-defined jobs) where there is no ambient user — mirrors the `User.get(userId)`
|
|
40
|
+
* contract. When omitted from a webhook/pre-defined job, the invocation runs in
|
|
41
|
+
* system scope (no per-user identity, no conversation history). Ignored during
|
|
42
|
+
* a user-authenticated turn — the turn's user is always used, no impersonation.
|
|
43
|
+
*/
|
|
44
|
+
userId?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Narrowed, wire-safe output for `Agents.invoke`. A slice of the internal
|
|
49
|
+
* `FullOutput` shape — raw Mastra steps / tripwire payloads are intentionally
|
|
50
|
+
* not exposed to skill code.
|
|
51
|
+
*/
|
|
52
|
+
export interface AgentInvocationOutput {
|
|
53
|
+
/** Final response text (post-processor-modified, if applicable). */
|
|
54
|
+
text: string;
|
|
55
|
+
/** AI SDK `FinishReason` (or `'preprocessor_blocked'` / `'governance_blocked'`). */
|
|
56
|
+
finishReason?: string;
|
|
57
|
+
/** Token usage summary. */
|
|
58
|
+
usage?: {
|
|
59
|
+
inputTokens?: number;
|
|
60
|
+
outputTokens?: number;
|
|
61
|
+
totalTokens?: number;
|
|
62
|
+
reasoningTokens?: number;
|
|
63
|
+
cachedInputTokens?: number;
|
|
64
|
+
};
|
|
65
|
+
/** Names of tools invoked during generation. */
|
|
66
|
+
toolsUsed?: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Echoes back the `threadId` suffix the caller passed in (if any). When the
|
|
69
|
+
* caller omitted `threadId`, this is undefined — the invocation ran in the
|
|
70
|
+
* user's default chat thread with the target agent.
|
|
71
|
+
*/
|
|
72
|
+
threadId?: string;
|
|
73
|
+
}
|
|
@@ -170,3 +170,21 @@ export interface CachedDeviceTrigger {
|
|
|
170
170
|
payloadSchema?: Record<string, any>; // JSON Schema
|
|
171
171
|
hasExecute: boolean;
|
|
172
172
|
}
|
|
173
|
+
|
|
174
|
+
/** Command definition sent by a device at connect time (self-describing) */
|
|
175
|
+
export interface DeviceCommandDefinition {
|
|
176
|
+
name: string;
|
|
177
|
+
description: string;
|
|
178
|
+
inputSchema?: Record<string, any>;
|
|
179
|
+
timeoutMs?: number;
|
|
180
|
+
retry?: { maxAttempts: number; backoffMs: number };
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** Standalone device trigger definition (compiled agent-side primitive) */
|
|
184
|
+
export interface CachedDeviceTriggerDefinition {
|
|
185
|
+
name: string;
|
|
186
|
+
description: string;
|
|
187
|
+
payloadSchema?: Record<string, any>;
|
|
188
|
+
artifact: string; // Compressed execute handler
|
|
189
|
+
env: Record<string, string>;
|
|
190
|
+
}
|
|
@@ -2,7 +2,9 @@ export * from './channel.type';
|
|
|
2
2
|
export * from './unstructured-types';
|
|
3
3
|
export * from './ai-generate.types';
|
|
4
4
|
export * from './ai-generate.utils';
|
|
5
|
+
export * from './agent-invocation.types';
|
|
5
6
|
export * from './sandbox-contract';
|
|
6
7
|
export * from './device.types';
|
|
7
8
|
export * from './model-registry';
|
|
9
|
+
export * from './agent-config.types';
|
|
8
10
|
export * from './persona-defaults';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "dist/api-exports.js",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"@lua/shared-types": "workspace:*",
|
|
65
65
|
"@tailwindcss/postcss": "^4.1.14",
|
|
66
66
|
"@tanstack/react-query": "^5.90.11",
|
|
67
|
+
"@truestamp/canonify": "^2.1.0",
|
|
67
68
|
"ai": "^5.0.76",
|
|
68
69
|
"autoprefixer": "^10.4.21",
|
|
69
70
|
"chalk": "^5.3.0",
|