lua-cli 3.55.0 → 3.56.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 +70 -20
- package/dist/api-exports.js +5 -1
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +24 -5
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +18 -18
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +3 -3
- package/docs/api/PreProcessor.md +66 -56
- package/docs/api/Threads.md +14 -0
- package/package.json +1 -1
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -3114,6 +3114,23 @@ export declare interface ConnectionRequestStatus {
|
|
|
3114
3114
|
*/
|
|
3115
3115
|
export declare type ContainerArm = StepRef | [LuaMapConfig, StepRef];
|
|
3116
3116
|
|
|
3117
|
+
/** Why a `Threads.resetContext()` call changed nothing. Never an error: a reset is advisory. */
|
|
3118
|
+
export declare type ContextResetSkipReason =
|
|
3119
|
+
/** The agent's `contextReset` feature is off, or the platform kill switch is on. */
|
|
3120
|
+
'disabled'
|
|
3121
|
+
/** Not called from a tool or processor of a 1:1 chat turn (a job, webhook, trigger, room or workflow step). */
|
|
3122
|
+
| 'not_chat_turn'
|
|
3123
|
+
/** The turn's thread is not the calling user's own thread with this agent. */
|
|
3124
|
+
| 'not_own_thread'
|
|
3125
|
+
/** The agent is not on thread-scoped observational memory. */
|
|
3126
|
+
| 'memory_off'
|
|
3127
|
+
/** Nothing older than the current turn is left to drop (first turn, or already reset this turn). */
|
|
3128
|
+
| 'nothing_to_reset'
|
|
3129
|
+
/** The thread's memory was being updated and the reset could not take its lock in time; the next one will. */
|
|
3130
|
+
| 'busy'
|
|
3131
|
+
/** No platform runtime (`lua test`, `lua dev`, an unwired runtime). */
|
|
3132
|
+
| 'unavailable';
|
|
3133
|
+
|
|
3117
3134
|
/** Teams: resource-specific permissions are granted per chat by whoever adds the app; file access is a tenant-wide grant. */
|
|
3118
3135
|
declare interface ConversationAccess {
|
|
3119
3136
|
/** False when only messages that mention the agent are delivered. */
|
|
@@ -6958,15 +6975,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6958
6975
|
*/
|
|
6959
6976
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6960
6977
|
}, "strip", z.ZodTypeAny, {
|
|
6961
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6962
6978
|
options: Record<string, unknown>;
|
|
6963
6979
|
kind: "plugin";
|
|
6964
6980
|
provider: "deepgram" | "elevenlabs";
|
|
6965
|
-
}, {
|
|
6966
6981
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6982
|
+
}, {
|
|
6967
6983
|
options: Record<string, unknown>;
|
|
6968
6984
|
kind: "plugin";
|
|
6969
6985
|
provider: "deepgram" | "elevenlabs";
|
|
6986
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6970
6987
|
}>, z.ZodObject<{
|
|
6971
6988
|
kind: z.ZodLiteral<"realtime">;
|
|
6972
6989
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -7024,15 +7041,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7024
7041
|
*/
|
|
7025
7042
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
7026
7043
|
}, "strip", z.ZodTypeAny, {
|
|
7027
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7028
7044
|
options: Record<string, unknown>;
|
|
7029
7045
|
kind: "plugin";
|
|
7030
7046
|
provider: "deepgram" | "elevenlabs";
|
|
7031
|
-
}, {
|
|
7032
7047
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7048
|
+
}, {
|
|
7033
7049
|
options: Record<string, unknown>;
|
|
7034
7050
|
kind: "plugin";
|
|
7035
7051
|
provider: "deepgram" | "elevenlabs";
|
|
7052
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7036
7053
|
}>, z.ZodObject<{
|
|
7037
7054
|
kind: z.ZodLiteral<"realtime">;
|
|
7038
7055
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -7090,15 +7107,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7090
7107
|
*/
|
|
7091
7108
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
7092
7109
|
}, "strip", z.ZodTypeAny, {
|
|
7093
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7094
7110
|
options: Record<string, unknown>;
|
|
7095
7111
|
kind: "plugin";
|
|
7096
7112
|
provider: "deepgram" | "elevenlabs";
|
|
7097
|
-
}, {
|
|
7098
7113
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7114
|
+
}, {
|
|
7099
7115
|
options: Record<string, unknown>;
|
|
7100
7116
|
kind: "plugin";
|
|
7101
7117
|
provider: "deepgram" | "elevenlabs";
|
|
7118
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7102
7119
|
}>, z.ZodObject<{
|
|
7103
7120
|
kind: z.ZodLiteral<"realtime">;
|
|
7104
7121
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -7280,10 +7297,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7280
7297
|
options?: Record<string, unknown> | undefined;
|
|
7281
7298
|
voice?: string | undefined;
|
|
7282
7299
|
} | {
|
|
7283
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7284
7300
|
options: Record<string, unknown>;
|
|
7285
7301
|
kind: "plugin";
|
|
7286
7302
|
provider: "deepgram" | "elevenlabs";
|
|
7303
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7287
7304
|
} | {
|
|
7288
7305
|
options: Record<string, unknown>;
|
|
7289
7306
|
kind: "realtime";
|
|
@@ -7297,10 +7314,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7297
7314
|
options?: Record<string, unknown> | undefined;
|
|
7298
7315
|
voice?: string | undefined;
|
|
7299
7316
|
} | {
|
|
7300
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7301
7317
|
options: Record<string, unknown>;
|
|
7302
7318
|
kind: "plugin";
|
|
7303
7319
|
provider: "deepgram" | "elevenlabs";
|
|
7320
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7304
7321
|
} | {
|
|
7305
7322
|
options: Record<string, unknown>;
|
|
7306
7323
|
kind: "realtime";
|
|
@@ -7313,10 +7330,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7313
7330
|
options?: Record<string, unknown> | undefined;
|
|
7314
7331
|
voice?: string | undefined;
|
|
7315
7332
|
} | {
|
|
7316
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7317
7333
|
options: Record<string, unknown>;
|
|
7318
7334
|
kind: "plugin";
|
|
7319
7335
|
provider: "deepgram" | "elevenlabs";
|
|
7336
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7320
7337
|
} | {
|
|
7321
7338
|
options: Record<string, unknown>;
|
|
7322
7339
|
kind: "realtime";
|
|
@@ -7374,10 +7391,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7374
7391
|
options?: Record<string, unknown> | undefined;
|
|
7375
7392
|
voice?: string | undefined;
|
|
7376
7393
|
} | {
|
|
7377
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7378
7394
|
options: Record<string, unknown>;
|
|
7379
7395
|
kind: "plugin";
|
|
7380
7396
|
provider: "deepgram" | "elevenlabs";
|
|
7397
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7381
7398
|
} | {
|
|
7382
7399
|
options: Record<string, unknown>;
|
|
7383
7400
|
kind: "realtime";
|
|
@@ -7391,10 +7408,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7391
7408
|
options?: Record<string, unknown> | undefined;
|
|
7392
7409
|
voice?: string | undefined;
|
|
7393
7410
|
} | {
|
|
7394
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7395
7411
|
options: Record<string, unknown>;
|
|
7396
7412
|
kind: "plugin";
|
|
7397
7413
|
provider: "deepgram" | "elevenlabs";
|
|
7414
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7398
7415
|
} | {
|
|
7399
7416
|
options: Record<string, unknown>;
|
|
7400
7417
|
kind: "realtime";
|
|
@@ -7407,10 +7424,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7407
7424
|
options?: Record<string, unknown> | undefined;
|
|
7408
7425
|
voice?: string | undefined;
|
|
7409
7426
|
} | {
|
|
7410
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7411
7427
|
options: Record<string, unknown>;
|
|
7412
7428
|
kind: "plugin";
|
|
7413
7429
|
provider: "deepgram" | "elevenlabs";
|
|
7430
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7414
7431
|
} | {
|
|
7415
7432
|
options: Record<string, unknown>;
|
|
7416
7433
|
kind: "realtime";
|
|
@@ -7468,10 +7485,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7468
7485
|
options?: Record<string, unknown> | undefined;
|
|
7469
7486
|
voice?: string | undefined;
|
|
7470
7487
|
} | {
|
|
7471
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7472
7488
|
options: Record<string, unknown>;
|
|
7473
7489
|
kind: "plugin";
|
|
7474
7490
|
provider: "deepgram" | "elevenlabs";
|
|
7491
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7475
7492
|
} | {
|
|
7476
7493
|
options: Record<string, unknown>;
|
|
7477
7494
|
kind: "realtime";
|
|
@@ -7485,10 +7502,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7485
7502
|
options?: Record<string, unknown> | undefined;
|
|
7486
7503
|
voice?: string | undefined;
|
|
7487
7504
|
} | {
|
|
7488
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7489
7505
|
options: Record<string, unknown>;
|
|
7490
7506
|
kind: "plugin";
|
|
7491
7507
|
provider: "deepgram" | "elevenlabs";
|
|
7508
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7492
7509
|
} | {
|
|
7493
7510
|
options: Record<string, unknown>;
|
|
7494
7511
|
kind: "realtime";
|
|
@@ -7501,10 +7518,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7501
7518
|
options?: Record<string, unknown> | undefined;
|
|
7502
7519
|
voice?: string | undefined;
|
|
7503
7520
|
} | {
|
|
7504
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7505
7521
|
options: Record<string, unknown>;
|
|
7506
7522
|
kind: "plugin";
|
|
7507
7523
|
provider: "deepgram" | "elevenlabs";
|
|
7524
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7508
7525
|
} | {
|
|
7509
7526
|
options: Record<string, unknown>;
|
|
7510
7527
|
kind: "realtime";
|
|
@@ -7562,10 +7579,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7562
7579
|
options?: Record<string, unknown> | undefined;
|
|
7563
7580
|
voice?: string | undefined;
|
|
7564
7581
|
} | {
|
|
7565
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7566
7582
|
options: Record<string, unknown>;
|
|
7567
7583
|
kind: "plugin";
|
|
7568
7584
|
provider: "deepgram" | "elevenlabs";
|
|
7585
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7569
7586
|
} | {
|
|
7570
7587
|
options: Record<string, unknown>;
|
|
7571
7588
|
kind: "realtime";
|
|
@@ -7579,10 +7596,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7579
7596
|
options?: Record<string, unknown> | undefined;
|
|
7580
7597
|
voice?: string | undefined;
|
|
7581
7598
|
} | {
|
|
7582
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7583
7599
|
options: Record<string, unknown>;
|
|
7584
7600
|
kind: "plugin";
|
|
7585
7601
|
provider: "deepgram" | "elevenlabs";
|
|
7602
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7586
7603
|
} | {
|
|
7587
7604
|
options: Record<string, unknown>;
|
|
7588
7605
|
kind: "realtime";
|
|
@@ -7595,10 +7612,10 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7595
7612
|
options?: Record<string, unknown> | undefined;
|
|
7596
7613
|
voice?: string | undefined;
|
|
7597
7614
|
} | {
|
|
7598
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7599
7615
|
options: Record<string, unknown>;
|
|
7600
7616
|
kind: "plugin";
|
|
7601
7617
|
provider: "deepgram" | "elevenlabs";
|
|
7618
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
7602
7619
|
} | {
|
|
7603
7620
|
options: Record<string, unknown>;
|
|
7604
7621
|
kind: "realtime";
|
|
@@ -8926,13 +8943,28 @@ export declare interface PreProcessorOverride {
|
|
|
8926
8943
|
sandboxId: string;
|
|
8927
8944
|
}
|
|
8928
8945
|
|
|
8946
|
+
/** Metadata a proceeding preprocessor may return. */
|
|
8947
|
+
export declare type PreProcessorProceedMetadata = Record<string, any> & {
|
|
8948
|
+
/**
|
|
8949
|
+
* A short note for the model on THIS turn only, e.g. state read from your own data. It is
|
|
8950
|
+
* added after the conversation as context labelled system-provided (the user did not write
|
|
8951
|
+
* it), and is never stored, never in chat history and never shown to the user. Notes from
|
|
8952
|
+
* several preprocessors are joined in run order and capped at 2,000 characters in total
|
|
8953
|
+
* (longer text is truncated). Strings only; anything else is ignored.
|
|
8954
|
+
*
|
|
8955
|
+
* The model is told the note is data, not instructions: it may quote text users wrote, so do
|
|
8956
|
+
* not rely on it to steer the agent's behaviour. Put rules in the persona or a skill instead.
|
|
8957
|
+
*/
|
|
8958
|
+
turnContext?: string;
|
|
8959
|
+
};
|
|
8960
|
+
|
|
8929
8961
|
export declare type PreProcessorProceedResponse = {
|
|
8930
8962
|
/** Proceed to next preprocessor or agent */
|
|
8931
8963
|
action: 'proceed';
|
|
8932
8964
|
/** Optional modified message (if not provided, uses original/current message) */
|
|
8933
8965
|
modifiedMessage?: ChatMessage[];
|
|
8934
8966
|
/** Optional metadata to pass along */
|
|
8935
|
-
metadata?:
|
|
8967
|
+
metadata?: PreProcessorProceedMetadata;
|
|
8936
8968
|
};
|
|
8937
8969
|
|
|
8938
8970
|
/**
|
|
@@ -10509,7 +10541,7 @@ export declare const Templates: {
|
|
|
10509
10541
|
};
|
|
10510
10542
|
|
|
10511
10543
|
/** Recorded effect kinds (DOC2 §7 seam table; `fetch` is sandbox egress record mode, §9.1). */
|
|
10512
|
-
declare const TEST_EFFECT_KINDS: readonly ["channel.send", "whatsapp.template", "whatsapp.reaction", "whatsapp.phone_request", "email.send", "inbox.push", "voice.call", "passthrough", "mcp.tool", "supervision.write", "user.update_name", "browser.action", "jobs.create", "fetch", "refused", "metrics.record", "threads.open", "threads.follow_up", "secrets.request", "connection_request.create", "connection_request.reconnect", "connection_request.cancel", "ai.generate", "decisions.ask"];
|
|
10544
|
+
declare const TEST_EFFECT_KINDS: readonly ["channel.send", "whatsapp.template", "whatsapp.reaction", "whatsapp.phone_request", "email.send", "inbox.push", "voice.call", "passthrough", "mcp.tool", "supervision.write", "user.update_name", "browser.action", "jobs.create", "fetch", "refused", "metrics.record", "threads.open", "threads.follow_up", "threads.reset_context", "secrets.request", "connection_request.create", "connection_request.reconnect", "connection_request.cancel", "ai.generate", "decisions.ask"];
|
|
10513
10545
|
|
|
10514
10546
|
declare type TestEffectKind = (typeof TEST_EFFECT_KINDS)[number];
|
|
10515
10547
|
|
|
@@ -10602,6 +10634,13 @@ declare type TextMessage_2 = {
|
|
|
10602
10634
|
text: string;
|
|
10603
10635
|
};
|
|
10604
10636
|
|
|
10637
|
+
export declare type ThreadContextResetReceipt = {
|
|
10638
|
+
status: 'reset';
|
|
10639
|
+
} | {
|
|
10640
|
+
status: 'skipped';
|
|
10641
|
+
reason: ContextResetSkipReason;
|
|
10642
|
+
};
|
|
10643
|
+
|
|
10605
10644
|
/**
|
|
10606
10645
|
* `Threads.followUp(threadId, input)`: exactly one of `prompt` (a BACKGROUND agent turn on the thread,
|
|
10607
10646
|
* like the workflow callback loopback) or `message` (post the text as the agent, no model turn).
|
|
@@ -10682,6 +10721,17 @@ export declare interface ThreadsApi {
|
|
|
10682
10721
|
* fails mid-delivery. Without a key every call delivers.
|
|
10683
10722
|
*/
|
|
10684
10723
|
followUp(threadId: string, input: ThreadFollowUpInput): Promise<ThreadFollowUpReceipt>;
|
|
10724
|
+
/**
|
|
10725
|
+
* Start the agent's context afresh from the current turn (LUA-1538). Call it from a tool at a natural break — a
|
|
10726
|
+
* checklist section recorded, a task started. From the NEXT turn on, the agent reads this turn and what follows,
|
|
10727
|
+
* not the earlier messages or the observation log built from them. The person still sees the whole conversation;
|
|
10728
|
+
* nothing is deleted. Give the agent what it still needs (where the person is in a task) from your own data, for
|
|
10729
|
+
* example in a preprocessor.
|
|
10730
|
+
*
|
|
10731
|
+
* Never throws. Answers `{ status: 'reset' }`, or `{ status: 'skipped', reason }` when the agent's `contextReset`
|
|
10732
|
+
* feature is off, outside a 1:1 chat turn, with observational memory off, when nothing older is left, or offline.
|
|
10733
|
+
*/
|
|
10734
|
+
resetContext(): Promise<ThreadContextResetReceipt>;
|
|
10685
10735
|
}
|
|
10686
10736
|
|
|
10687
10737
|
/**
|
package/dist/api-exports.js
CHANGED
|
@@ -30213,7 +30213,11 @@ function createOfflineThreadsApi() {
|
|
|
30213
30213
|
}, "open"),
|
|
30214
30214
|
followUp: /* @__PURE__ */ __name(async () => {
|
|
30215
30215
|
throw unavailable("followUp");
|
|
30216
|
-
}, "followUp")
|
|
30216
|
+
}, "followUp"),
|
|
30217
|
+
resetContext: /* @__PURE__ */ __name(async () => ({
|
|
30218
|
+
status: "skipped",
|
|
30219
|
+
reason: "unavailable"
|
|
30220
|
+
}), "resetContext")
|
|
30217
30221
|
};
|
|
30218
30222
|
}
|
|
30219
30223
|
__name(createOfflineThreadsApi, "createOfflineThreadsApi");
|