lua-cli 3.40.0 → 3.41.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 +41 -21
- package/dist/api-exports.js +161 -16
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1006 -419
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +18 -18
- package/dist/workflow-builder.d.ts +19 -3
- package/dist/workflow-builder.js +151 -6
- package/dist/workflow-builder.js.map +1 -1
- package/docs/workflows/workspaces-and-long-steps.md +1 -1
- package/package.json +3 -3
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -476,10 +476,11 @@ export declare interface AgentStepOptions {
|
|
|
476
476
|
/**
|
|
477
477
|
* EM-WS3: pin a plugin step's Lua-API proxy (and its key) to ANOTHER agent instead of this workflow's own. Legal only
|
|
478
478
|
* beside `plugins`. Refused at run time (`target_not_granted`) unless the platform's plugin-target switch is on AND
|
|
479
|
-
* this workflow's agent holds a `supervision:act` or `supervision:release` grant on the target.
|
|
479
|
+
* this workflow's agent holds a `supervision:act` or `supervision:release` grant on the target. EM-WS3 × EM-WS2: the
|
|
480
|
+
* id may be `template('${initData.<path>}')`, rendered from the run input at dispatch (a per-run target).
|
|
480
481
|
*/
|
|
481
482
|
target?: {
|
|
482
|
-
agentId: string;
|
|
483
|
+
agentId: string | TemplateBinding;
|
|
483
484
|
};
|
|
484
485
|
/**
|
|
485
486
|
* What this step DOES: `classify` | `extract` | `transform` | `draft` | `research` | `reason` | `code` |
|
|
@@ -3402,6 +3403,7 @@ export declare class LuaAgent {
|
|
|
3402
3403
|
private readonly triggers;
|
|
3403
3404
|
private readonly jobs;
|
|
3404
3405
|
private readonly workflows;
|
|
3406
|
+
private readonly webApps;
|
|
3405
3407
|
private readonly preProcessors;
|
|
3406
3408
|
private readonly postProcessors;
|
|
3407
3409
|
private readonly mcpServers;
|
|
@@ -3441,6 +3443,7 @@ export declare class LuaAgent {
|
|
|
3441
3443
|
getTriggers(): LuaTrigger[];
|
|
3442
3444
|
getJobs(): LuaJob[];
|
|
3443
3445
|
getWorkflows(): LuaWorkflow[];
|
|
3446
|
+
getWebApps(): LuaWebApp[];
|
|
3444
3447
|
getPreProcessors(): PreProcessor[];
|
|
3445
3448
|
getPostProcessors(): PostProcessor[];
|
|
3446
3449
|
getMCPServers(): LuaMCPServer[];
|
|
@@ -3485,6 +3488,8 @@ export declare interface LuaAgentConfig {
|
|
|
3485
3488
|
jobs?: LuaJob[];
|
|
3486
3489
|
/** Array of workflows (createWorkflow / defineWorkflow) — 03 §3.1; resolved by the compiler traverser, dropped from the agent bundle */
|
|
3487
3490
|
workflows?: LuaWorkflow[];
|
|
3491
|
+
/** Web apps (defineWebApp) opened from Lua Workspace and the admin console; pushed with `lua push webapp` */
|
|
3492
|
+
webApps?: LuaWebApp[];
|
|
3488
3493
|
/** Array of preprocessors (run before messages reach the agent) */
|
|
3489
3494
|
preProcessors?: PreProcessor[];
|
|
3490
3495
|
/** Array of postprocessors (run after agent generates responses) */
|
|
@@ -4402,14 +4407,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4402
4407
|
*/
|
|
4403
4408
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
4404
4409
|
}, "strip", z.ZodTypeAny, {
|
|
4405
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4406
4410
|
provider?: "deepgram" | "elevenlabs";
|
|
4407
4411
|
kind?: "plugin";
|
|
4412
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4408
4413
|
options?: Record<string, unknown>;
|
|
4409
4414
|
}, {
|
|
4410
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4411
4415
|
provider?: "deepgram" | "elevenlabs";
|
|
4412
4416
|
kind?: "plugin";
|
|
4417
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4413
4418
|
options?: Record<string, unknown>;
|
|
4414
4419
|
}>, z.ZodObject<{
|
|
4415
4420
|
kind: z.ZodLiteral<"realtime">;
|
|
@@ -4468,14 +4473,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4468
4473
|
*/
|
|
4469
4474
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
4470
4475
|
}, "strip", z.ZodTypeAny, {
|
|
4471
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4472
4476
|
provider?: "deepgram" | "elevenlabs";
|
|
4473
4477
|
kind?: "plugin";
|
|
4478
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4474
4479
|
options?: Record<string, unknown>;
|
|
4475
4480
|
}, {
|
|
4476
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4477
4481
|
provider?: "deepgram" | "elevenlabs";
|
|
4478
4482
|
kind?: "plugin";
|
|
4483
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4479
4484
|
options?: Record<string, unknown>;
|
|
4480
4485
|
}>, z.ZodObject<{
|
|
4481
4486
|
kind: z.ZodLiteral<"realtime">;
|
|
@@ -4534,14 +4539,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4534
4539
|
*/
|
|
4535
4540
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
4536
4541
|
}, "strip", z.ZodTypeAny, {
|
|
4537
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4538
4542
|
provider?: "deepgram" | "elevenlabs";
|
|
4539
4543
|
kind?: "plugin";
|
|
4544
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4540
4545
|
options?: Record<string, unknown>;
|
|
4541
4546
|
}, {
|
|
4542
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4543
4547
|
provider?: "deepgram" | "elevenlabs";
|
|
4544
4548
|
kind?: "plugin";
|
|
4549
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4545
4550
|
options?: Record<string, unknown>;
|
|
4546
4551
|
}>, z.ZodObject<{
|
|
4547
4552
|
kind: z.ZodLiteral<"realtime">;
|
|
@@ -4726,9 +4731,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4726
4731
|
options?: Record<string, unknown>;
|
|
4727
4732
|
model?: string;
|
|
4728
4733
|
} | {
|
|
4729
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4730
4734
|
provider?: "deepgram" | "elevenlabs";
|
|
4731
4735
|
kind?: "plugin";
|
|
4736
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4732
4737
|
options?: Record<string, unknown>;
|
|
4733
4738
|
} | {
|
|
4734
4739
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4742,9 +4747,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4742
4747
|
options?: Record<string, unknown>;
|
|
4743
4748
|
model?: string;
|
|
4744
4749
|
} | {
|
|
4745
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4746
4750
|
provider?: "deepgram" | "elevenlabs";
|
|
4747
4751
|
kind?: "plugin";
|
|
4752
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4748
4753
|
options?: Record<string, unknown>;
|
|
4749
4754
|
} | {
|
|
4750
4755
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4757,9 +4762,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4757
4762
|
options?: Record<string, unknown>;
|
|
4758
4763
|
model?: string;
|
|
4759
4764
|
} | {
|
|
4760
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4761
4765
|
provider?: "deepgram" | "elevenlabs";
|
|
4762
4766
|
kind?: "plugin";
|
|
4767
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4763
4768
|
options?: Record<string, unknown>;
|
|
4764
4769
|
} | {
|
|
4765
4770
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4820,9 +4825,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4820
4825
|
options?: Record<string, unknown>;
|
|
4821
4826
|
model?: string;
|
|
4822
4827
|
} | {
|
|
4823
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4824
4828
|
provider?: "deepgram" | "elevenlabs";
|
|
4825
4829
|
kind?: "plugin";
|
|
4830
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4826
4831
|
options?: Record<string, unknown>;
|
|
4827
4832
|
} | {
|
|
4828
4833
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4836,9 +4841,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4836
4841
|
options?: Record<string, unknown>;
|
|
4837
4842
|
model?: string;
|
|
4838
4843
|
} | {
|
|
4839
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4840
4844
|
provider?: "deepgram" | "elevenlabs";
|
|
4841
4845
|
kind?: "plugin";
|
|
4846
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4842
4847
|
options?: Record<string, unknown>;
|
|
4843
4848
|
} | {
|
|
4844
4849
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4851,9 +4856,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4851
4856
|
options?: Record<string, unknown>;
|
|
4852
4857
|
model?: string;
|
|
4853
4858
|
} | {
|
|
4854
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4855
4859
|
provider?: "deepgram" | "elevenlabs";
|
|
4856
4860
|
kind?: "plugin";
|
|
4861
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4857
4862
|
options?: Record<string, unknown>;
|
|
4858
4863
|
} | {
|
|
4859
4864
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4914,9 +4919,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4914
4919
|
options?: Record<string, unknown>;
|
|
4915
4920
|
model?: string;
|
|
4916
4921
|
} | {
|
|
4917
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4918
4922
|
provider?: "deepgram" | "elevenlabs";
|
|
4919
4923
|
kind?: "plugin";
|
|
4924
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4920
4925
|
options?: Record<string, unknown>;
|
|
4921
4926
|
} | {
|
|
4922
4927
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4930,9 +4935,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4930
4935
|
options?: Record<string, unknown>;
|
|
4931
4936
|
model?: string;
|
|
4932
4937
|
} | {
|
|
4933
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4934
4938
|
provider?: "deepgram" | "elevenlabs";
|
|
4935
4939
|
kind?: "plugin";
|
|
4940
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4936
4941
|
options?: Record<string, unknown>;
|
|
4937
4942
|
} | {
|
|
4938
4943
|
provider?: "google" | "xai" | "openai";
|
|
@@ -4945,9 +4950,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4945
4950
|
options?: Record<string, unknown>;
|
|
4946
4951
|
model?: string;
|
|
4947
4952
|
} | {
|
|
4948
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4949
4953
|
provider?: "deepgram" | "elevenlabs";
|
|
4950
4954
|
kind?: "plugin";
|
|
4955
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4951
4956
|
options?: Record<string, unknown>;
|
|
4952
4957
|
} | {
|
|
4953
4958
|
provider?: "google" | "xai" | "openai";
|
|
@@ -5008,9 +5013,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5008
5013
|
options?: Record<string, unknown>;
|
|
5009
5014
|
model?: string;
|
|
5010
5015
|
} | {
|
|
5011
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5012
5016
|
provider?: "deepgram" | "elevenlabs";
|
|
5013
5017
|
kind?: "plugin";
|
|
5018
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5014
5019
|
options?: Record<string, unknown>;
|
|
5015
5020
|
} | {
|
|
5016
5021
|
provider?: "google" | "xai" | "openai";
|
|
@@ -5024,9 +5029,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5024
5029
|
options?: Record<string, unknown>;
|
|
5025
5030
|
model?: string;
|
|
5026
5031
|
} | {
|
|
5027
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5028
5032
|
provider?: "deepgram" | "elevenlabs";
|
|
5029
5033
|
kind?: "plugin";
|
|
5034
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5030
5035
|
options?: Record<string, unknown>;
|
|
5031
5036
|
} | {
|
|
5032
5037
|
provider?: "google" | "xai" | "openai";
|
|
@@ -5039,9 +5044,9 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5039
5044
|
options?: Record<string, unknown>;
|
|
5040
5045
|
model?: string;
|
|
5041
5046
|
} | {
|
|
5042
|
-
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5043
5047
|
provider?: "deepgram" | "elevenlabs";
|
|
5044
5048
|
kind?: "plugin";
|
|
5049
|
+
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5045
5050
|
options?: Record<string, unknown>;
|
|
5046
5051
|
} | {
|
|
5047
5052
|
provider?: "google" | "xai" | "openai";
|
|
@@ -5468,7 +5473,7 @@ export declare type LuaWorkflowBuildCode = 'duplicate-step-id' | 'unknown-step-r
|
|
|
5468
5473
|
*/
|
|
5469
5474
|
| 'workspace-not-declared' | 'workspace-inherit-without-parent-workspace' | 'workspace-inherit-conflict' | 'harness-requires-job-tier' | 'max-turns-requires-job-tier' | 'max-turns-invalid'
|
|
5470
5475
|
/** EM-WS3: a step's `plugins` outside the allowlist, repeated, or off the Job tier. */
|
|
5471
|
-
| 'plugins-invalid' | 'cap-exceeded' | 'chunk-size-invalid' | 'rate-limit-invalid' | 'backoff-invalid' | 'loop-interval-out-of-range' | 'mapping-placement' | 'container-arm-empty'
|
|
5476
|
+
| 'plugins-invalid' | 'target-invalid' | 'lua-api-invalid' | 'cap-exceeded' | 'chunk-size-invalid' | 'rate-limit-invalid' | 'backoff-invalid' | 'loop-interval-out-of-range' | 'mapping-placement' | 'container-arm-empty'
|
|
5472
5477
|
/**
|
|
5473
5478
|
* @deprecated LUA-684 — the builder no longer throws it: an `approval` / `waitForSignal` IS a container arm
|
|
5474
5479
|
* (`parallel(['approve', …])`). Where the engine cannot run one — a `loop` body, the step of a `[map, step]`
|
|
@@ -5617,6 +5622,21 @@ export declare interface LuaWorkflowStep<TIn extends ZodType = ZodType, TOut ext
|
|
|
5617
5622
|
workspace?: WorkflowStepWorkspace;
|
|
5618
5623
|
jobResources?: WorkflowJobResources;
|
|
5619
5624
|
jobTools?: WorkflowJobToolId[];
|
|
5625
|
+
/**
|
|
5626
|
+
* EM-WS3 × EM-WS2: let this `tier:'job'` step run `lua` (`ctx.exec('lua', [...])`, `` ctx.$`lua push …` ``) against the
|
|
5627
|
+
* Lua API through the platform's staging-only proxy, with a short-lived key for ONE agent: this workflow's agent, or
|
|
5628
|
+
* `target`. It is the same proxy and the same deny rules as a plugin agent step: deploy, promote, publish,
|
|
5629
|
+
* activate, env, chat and runtime calls are refused.
|
|
5630
|
+
*/
|
|
5631
|
+
luaApi?: true;
|
|
5632
|
+
/**
|
|
5633
|
+
* EM-WS3: pin the `luaApi` proxy (and its key) to ANOTHER agent. The id may be static or
|
|
5634
|
+
* `template('${initData.<path>}')`, rendered from the run input at dispatch. The same flag and supervision-grant
|
|
5635
|
+
* rules apply as on a plugin agent step.
|
|
5636
|
+
*/
|
|
5637
|
+
target?: {
|
|
5638
|
+
agentId: string | TemplateBinding;
|
|
5639
|
+
};
|
|
5620
5640
|
/** default { maxAttempts: 1 } */
|
|
5621
5641
|
retry?: RetryPolicy;
|
|
5622
5642
|
/** default 'none'; 'external' ⇒ park on platform-fault reclaim. */
|
package/dist/api-exports.js
CHANGED
|
@@ -2513,7 +2513,15 @@ function sortVerdictReasons(reasons) {
|
|
|
2513
2513
|
...reasons
|
|
2514
2514
|
].sort((a, b) => REVIEW_VERDICT_REASON_ORDER.indexOf(a.kind) - REVIEW_VERDICT_REASON_ORDER.indexOf(b.kind));
|
|
2515
2515
|
}
|
|
2516
|
-
|
|
2516
|
+
function envTemplatePlaceholder(key) {
|
|
2517
|
+
if (ENV_TEMPLATE_SECRET_KEY_RE.test(key)) {
|
|
2518
|
+
throw new Error(`env-template-secret-key: \`${key}\` looks like a secret \u2014 read it with env('${key}') inside execute instead`);
|
|
2519
|
+
}
|
|
2520
|
+
return {
|
|
2521
|
+
__envRef: key
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2524
|
+
var __defProp3, __name3, PLUMBING_THREAD_CHANNELS, CHANNEL_CONVERSATION_CHANNELS, HIDDEN_THREAD_CHANNELS, PLATFORM_INVOCATION_CALLERS, SUPERVISION_OPS, CHANNEL_SEND_CHANNELS, REVIEWABLE_ACTION_EXECUTE_TOOL_ALLOWLIST, REVIEWABLE_STANDING_START_TOOLS, REVIEWABLE_MCP_SEND_TOOL_SUFFIX, MCP_TOOL_READ_VERB_RE, MCP_DRAFT_CREATE_VERBS, NON_INTERACTIVE_CHANNELS, RICH_PARTS_MESSAGE_ID_PREFIX, SCREENSHOT_MESSAGE_ID_PREFIX, BROWSER_COMMANDS, BROWSER_COMMAND_NAMES, LOG_FIELDS_MAX_KEYS, LOG_FIELD_MAX_VALUE_BYTES, LOG_FIELDS_MAX_BYTES, LOG_FIELD_KEY_PATTERN, LOG_FIELD_SECRET_SHAPED_KEY_PATTERNS, LOG_FIELDS_CLAMPED_KEY, LOG_FIELD_ARRAY_COUNT_SUFFIX, LuaLogFieldsError, DESKTOP_FILE_COMMANDS, DESKTOP_FILE_COMMAND_SET, WORKFLOW_RETRY_BACKOFFS, WORKFLOW_RETRY_MIN_ATTEMPTS, WORKFLOW_RETRY_POLICY_KEYS, WORKFLOW_RETRY_MAX_ATTEMPTS, WORKFLOW_RETRY_ENGINE_KEYS, WORKFLOW_JOB_RESOURCES, WORKFLOW_SIDE_EFFECTS, WORKFLOW_MODEL_CLASSES, WORKFLOW_DEFAULT_TASK_CLASS_MAP, WORKFLOW_MODELS_MAX_CLASS_DEFAULT, WORKFLOW_AUTONOMY_NUMERIC_KEYS, WORKFLOW_AUTONOMY_ENVELOPE_KEYS, WORKFLOW_AUTONOMY_DEFAULTS, WORKFLOW_AUTONOMY_CEILINGS, WORKFLOW_AUTONOMY_MAX_RUNS_PER_HOUR_ENV, WORKFLOW_AUTONOMY_MAX_RUNS_PER_HOUR_CEILING, WORKFLOW_AUTONOMY_FORMS_DEFAULT, WORKFLOW_AUTONOMY_MIN_VALUE, WORKFLOW_JOB_RANGES, WORKFLOW_JOB_RANGE_MEMBERS, WORKFLOW_SINGLE_STEP_TYPES, WORKFLOW_HITL_ENTRY_TYPES, WORKFLOW_ARM_ENTRY_TYPES, WORKFLOW_HITL_ARM_CONTAINERS, WORKFLOW_GRAPH_ENTRY_STEP_KINDS, WORKFLOW_ARM_ENTRY_STEP_KINDS, WORKFLOW_BUDGET_MAX_DURATION_SECONDS, MODEL_ID_BYOK_PROVIDERS, MODEL_CLASS_REF_PREFIX, MODEL_SNAPSHOT_SUFFIX, REASONING_EFFORT_VALUES, IMPLICIT_MODEL_SELECTION_SOURCES, PLATFORM_FALLBACK_MODEL_SOURCE, AGENT_NAME_TOKEN, DEFAULT_PERSONA_GUIDE, PERSONAL_SPACE_STARTING_PERSONA, AGENT_LOG_SOURCES, AGENT_LOG_FIELDS_MAX_WIRE_KEYS, LOG_DRAIN_TYPES_PHASE1, LOG_DRAIN_TYPES_PHASE2, LOG_DRAIN_TYPES_IMPLEMENTED, LOG_DRAIN_SOURCES, LOG_DRAIN_MAX_PER_ORG, LOG_DRAIN_MAX_PER_ORG_ENTERPRISE, LOG_DRAIN_DATADOG_SITES, LOG_DRAIN_NEWRELIC_SITES, LOG_DRAIN_ENDPOINT_TEMPLATES, LOG_DRAIN_PRESET_SITES, LOG_DRAIN_BUCKET_NAME_PATTERN, LOG_DRAIN_BUCKET_HOST_PATTERNS, LOG_DRAIN_PRESET_HOST_SUFFIXES, DRAIN_CONTENT_ACK_ERROR_CODE, DRAIN_CONTENT_ACK_FIELD, DrainContentAckRequiredError, LOG_DRAIN_PRESET_PATHS, PRESET_SEGMENT_RE, LOG_DRAIN_QUOTAS, LOG_DRAIN_QUOTA_WARN_RATIO, LOG_DRAIN_QUOTA_DROP_DEBUG_RATIO, LOG_DRAIN_QUOTA_DROP_INFO_RATIO, LOG_DRAIN_QUOTA_PAUSE_RATIO, LOG_EXPORT_SOURCES, LOG_EXPORT_MAX_WINDOW_DAYS, LOG_EXPORT_MAX_WINDOW_MS, LOG_EXPORT_URL_TTL_SECONDS, LOG_EXPORT_FILE_RETENTION_DAYS, LOG_EXPORT_FILE_RETENTION_MS, LOG_EXPORT_PART_MAX_BYTES, LOG_DRAIN_NOTICE_RATE_LIMIT_MS, LOG_DRAIN_VERIFICATION_STALE_MS, LOG_DRAIN_DIGEST_INTERVAL_MS, LOG_DRAIN_DIGEST_MAX_ENTRIES, LOG_DRAIN_NOTICE_ERROR_MAX_CHARS, LOG_DRAIN_USAGE_LINE_ITEM, LOG_DRAIN_BYTES_PER_GIB, DEFAULT_LOG_DRAIN_PLAN_CONFIG, TIERS, LOG_CURSOR_MAX_LENGTH, LOG_CURSOR_MAX_ID_LENGTH, LOG_RELATIVE_TIME_PATTERN, LOG_ISO_TIME_PATTERN, RELATIVE_UNIT_MS, CORE_DRAINING_CODE, CORE_DRAINING_DEFAULT_RETRY_MS, CORE_DRAINING_MAX_RETRY_MS, VoiceNameSchema, PluginProviderSchema, RealtimeProviderSchema, PluginClassSchema, ModelDescriptorSchema, InferenceModelSchema, PluginModelSchema, RealtimeModelSchema, LuaVoiceModelSchema, TurnDetectionSchema, InterruptionSchema, BuiltinAudioClipSchema, AudioConfigSchema, BackgroundAudioEntrySchema, BackgroundAudioSchema, LuaVoiceConfigInnerSchema, LuaVoiceConfigSchema, LuaVoiceRefSchema, LUA_JOB_DEFAULT_TIMEOUT_SECONDS, LUA_JOB_MIN_TIMEOUT_SECONDS, LUA_JOB_MAX_TIMEOUT_SECONDS, KEYS, MAX_BODY_BYTES, MAX_ID_LENGTH, UTC_ISO, TEMPLATE_TRIGGER_URL_ENV_PREFIX, TEMPLATE_INSTALL_POLICY_PER_WORKSPACE_VALUES, SUBJECT_TYPES, SubjectTypeSchema, CREDENTIAL_TYPES, CredentialTypeSchema, DEVICE_OPERATIONS, DeviceOperationSchema, DEVICE_SCOPE_BY_OPERATION, DeviceBindingSchema, IdSchema, SESSION_AUTH_TIME_MAX_S, PrincipalDescriptorSchema, ActorDescriptorSchema, PrincipalOwnerSchema, CredentialLifecycleSchema, GeneralCredentialDescriptorSchema, DeviceCredentialDescriptorSchema, GeneralPrincipalContextSchema, DeviceCredentialPrincipalContextSchema, RawPrincipalContextSchema, PrincipalContextSchema, DeviceCredentialClaimSchema, LUA_CLIENT_HEADER, LUA_CLIENT_APPS, SEMVER_PATTERN, WEB_RELEASE_PATTERN, CLIENT_HEADER_PATTERN, LUA_SESSION_ID_CLAIM, SESSION_REVOKED_CODE, AUTHZ_PROJECTION_VERSION, ProjectedScopeSchema, DisplayRoleSchema, AuthorizationPrincipalSchema, CredentialContextSchema, ProjectionAnomalySchema, ProjectedOrgSchema, ProjectedResourceSchema, CapabilityProfilesSchema, RoleCatalogSchema, EffectiveAuthorizationSchema, ResourcePageSchema, SYSTEM_USER_PREFIX, WORKFLOW_RUN_IN_FLIGHT, WORKFLOW_RUN_IDLE, WORKFLOW_RUN_TERMINAL, WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_GATE_KINDS, WORKFLOW_STEP_STATUSES, WORKFLOW_STEP_IN_FLIGHT, WORKFLOW_SIGNAL_EVENT_SITES, ARCHIVE_WINDOW_MARGIN_DAYS, WORKFLOW_ORG_PURGING_TTL_S, WORKFLOW_ORG_PURGE_FORCE_AFTER_MS, IDEMPOTENCY_HOLDING_STATUSES, WORKFLOW_SCHEDULED_RUN_ID_PREFIX, CLOUD_TASK_RUN_ID_PREFIX, WORKFLOW_SCHEDULE_KEY_MAX, WORKFLOW_SCHEDULE_IDEMPOTENCY_KEY_PREFIX, WORKFLOW_OPERATION_ID_PREFIX, WORKFLOW_CONNECTION_KEY_RE, WORKFLOW_JOB_MODEL_SOURCE_LABELS, WORKFLOW_SUSPEND_KINDS, WORKFLOW_RUN_NOTIFICATION_SUSPENDED_KINDS, WORKFLOW_SIGNAL_PAYLOAD_MAX_BYTES, WORKFLOW_RESOLVE_OUTPUT_MAX_BYTES, SCHEDULE_HEALTH_NOTIFY_CHANNELS, SCHEDULE_HEALTH_DEFAULT_NOTIFY, SCHEDULE_HEALTH_LIMITS, KNOWN_KEYS, WORKFLOW_GOAL_JUDGE_SELF, REDACTED_PLACEHOLDER, PROVIDER_MESSAGE_MAX_CHARS, ERROR_MESSAGE_MAX_CHARS, SECRET_LITERAL_PATTERNS, SECRET_NAME, SECRET_PAIR_PATTERNS, GROUP_COUNT, WORKFLOW_SECRET_KEY_RE, WORKFLOW_RESERVED_SECRET_KEYS, SCRUB_INPUT_MAX_CHARS, SCRUB_CUT_BACKOFF_CHARS, WORKFLOW_AUDIT_EVENTS, WORKFLOW_AUDIT_METADATA_MAX_BYTES, INDENT, WRAP_WIDTH, NOUNS, GET_TOOL_NAMES, PREAMBLE, WORKFLOW_APPROVAL_OUTPUT_DECISIONS, WORKFLOW_APPROVAL_OUTPUT_SCHEMA, JSON_FENCE_RE, DEFAULT_ON_AGENT_FEATURES, SUBAGENT_PER_KEY_FLAG_ENV, PER_KEY_FLAG_VALUES, ONBOARDING_FLOW_KEY, ONBOARDING_SCHEMA_VERSION, id, copy, onboardingHeadingSchema, onboardingRichTextInlineSchema, onboardingRichTextSchema, onboardingDestinationSchema, onboardingArtworkSchema, onboardingAnswerSchema, onboardingQuestionSchema, onboardingTemplateSectionSchema, onboardingTemplateContentSchema, onboardingUnavailableOutcomeSchema, onboardingFlowSchema, onboardingActorSchema, onboardingEditorSchema, onboardingPublicationSummarySchema, onboardingValidationIssueSchema, onboardingValidationResponseSchema, onboardingAssetSchema, onboardingPublicAssetSchema, getOnboardingConfigResponseSchema, saveOnboardingDraftRequestSchema, validateOnboardingRequestSchema, publishOnboardingRequestSchema, rollbackOnboardingRequestSchema, onboardingTemplateCatalogItemSchema, getPublishedOnboardingResponseSchema, WEB_ROUTE_PROTOCOL_VERSION, WEB_ROUTE_METHODS, WEB_ROUTE_REQUEST_HEADER_ALLOWLIST, WEB_ROUTE_RESPONSE_HEADER_ALLOWLIST, WEB_ROUTE_MAX_REQUEST_BODY_BYTES, WEB_ROUTE_MAX_RESPONSE_BYTES, EVIDENCE_SESSION_IDLE_MS, EVIDENCE_MIN_CONVERSATIONS, EVIDENCE_LOW_CONFIDENCE_N, EVIDENCE_SNIPPET_MAX_CHARS, EVIDENCE_EXAMPLES_PER_ITEM, EVIDENCE_SHOWN_ITEMS, EVIDENCE_LATENCY_BOUNDS_MS, EVIDENCE_WORD_BOUNDS, BAD_CONVERSATION_REASONS, ATTACHMENT_LINES, REVIEW_VERDICT_REASON_ORDER, ENV_TEMPLATE_SECRET_KEY_RE;
|
|
2517
2525
|
var init_dist = __esm({
|
|
2518
2526
|
"../shared-types/dist/index.mjs"() {
|
|
2519
2527
|
"use strict";
|
|
@@ -5116,6 +5124,9 @@ listed here; never invent a target.`;
|
|
|
5116
5124
|
];
|
|
5117
5125
|
__name(sortVerdictReasons, "sortVerdictReasons");
|
|
5118
5126
|
__name3(sortVerdictReasons, "sortVerdictReasons");
|
|
5127
|
+
ENV_TEMPLATE_SECRET_KEY_RE = /(SECRET|TOKEN|KEY|PASSWORD)$/;
|
|
5128
|
+
__name(envTemplatePlaceholder, "envTemplatePlaceholder");
|
|
5129
|
+
__name3(envTemplatePlaceholder, "envTemplatePlaceholder");
|
|
5119
5130
|
}
|
|
5120
5131
|
});
|
|
5121
5132
|
|
|
@@ -5144,16 +5155,110 @@ function workflowJobPluginsProblem(plugins) {
|
|
|
5144
5155
|
if (new Set(plugins).size !== plugins.length) return "plugins must not repeat";
|
|
5145
5156
|
return null;
|
|
5146
5157
|
}
|
|
5147
|
-
function
|
|
5158
|
+
function workflowJobTargetTemplatePath(binding) {
|
|
5159
|
+
if (!binding || typeof binding !== "object" || Array.isArray(binding)) return null;
|
|
5160
|
+
const keys = Object.keys(binding);
|
|
5161
|
+
const tpl = binding.template;
|
|
5162
|
+
if (keys.length !== 1 || typeof tpl !== "string" || tpl.length > 512) return null;
|
|
5163
|
+
const m = WORKFLOW_JOB_TARGET_TEMPLATE_RE.exec(tpl.trim());
|
|
5164
|
+
if (!m) return null;
|
|
5165
|
+
const names = m[1].split(".").map((seg) => seg.replace(/\[(?:0|[1-9]\d*)\]/g, ""));
|
|
5166
|
+
if (names.some((n2) => n2 === "__proto__" || n2 === "prototype" || n2 === "constructor")) return null;
|
|
5167
|
+
return m[1].split(".").every((seg) => TARGET_PATH_SEGMENT_RE.test(seg)) ? m[1] : null;
|
|
5168
|
+
}
|
|
5169
|
+
function isWorkflowJobTargetTemplate(target) {
|
|
5170
|
+
const agentId = target?.agentId;
|
|
5171
|
+
return !!agentId && typeof agentId === "object";
|
|
5172
|
+
}
|
|
5173
|
+
function workflowJobLuaApiProblem(luaApi, nodeType, tier) {
|
|
5174
|
+
if (luaApi === void 0) return null;
|
|
5175
|
+
if (luaApi !== true) return "`luaApi` must be exactly true";
|
|
5176
|
+
if (nodeType !== "code") return "`luaApi` is legal on code steps only (an agent step uses `plugins`)";
|
|
5177
|
+
if (tier !== "job") return "`luaApi` requires tier:'job'";
|
|
5178
|
+
return null;
|
|
5179
|
+
}
|
|
5180
|
+
function workflowJobUsesLuaApi(step3) {
|
|
5181
|
+
return Array.isArray(step3.plugins) && step3.plugins.length > 0 || step3.kind === "code" && step3.luaApi === true;
|
|
5182
|
+
}
|
|
5183
|
+
function workflowJobTargetProblem(target, plugins, luaApi) {
|
|
5148
5184
|
if (target === void 0) return null;
|
|
5149
5185
|
if (!target || typeof target !== "object" || Array.isArray(target)) return "target must be { agentId }";
|
|
5150
5186
|
const keys = Object.keys(target);
|
|
5151
5187
|
const agentId = target.agentId;
|
|
5152
|
-
if (keys.length !== 1 ||
|
|
5153
|
-
if (
|
|
5188
|
+
if (keys.length !== 1 || !("agentId" in target)) return "target must be exactly { agentId }";
|
|
5189
|
+
if (typeof agentId === "string") {
|
|
5190
|
+
if (!agentId.trim() || agentId.length > 256) return "target must be exactly { agentId: <non-empty string> }";
|
|
5191
|
+
if (agentId.includes("${")) return "a run-input target is written template('${initData.<path>}'), never a string with ${\u2026}";
|
|
5192
|
+
} else if (workflowJobTargetTemplatePath(agentId) === null) {
|
|
5193
|
+
return "target.agentId must be a static id or template('${initData.<path>}') \u2014 exactly one initData placeholder, no default";
|
|
5194
|
+
}
|
|
5195
|
+
const hasPlugins = Array.isArray(plugins) && plugins.length > 0;
|
|
5196
|
+
if (!hasPlugins && luaApi !== true) return "`target` is legal only beside `plugins` or `luaApi: true`";
|
|
5154
5197
|
return null;
|
|
5155
5198
|
}
|
|
5156
|
-
|
|
5199
|
+
function readInitDataPath(root, path3) {
|
|
5200
|
+
let cur = root;
|
|
5201
|
+
for (const seg of path3.split(".")) {
|
|
5202
|
+
const name = seg.replace(/\[(?:0|[1-9]\d*)\]/g, "");
|
|
5203
|
+
const indexes = [
|
|
5204
|
+
...seg.matchAll(/\[(0|[1-9]\d*)\]/g)
|
|
5205
|
+
].map((x) => Number(x[1]));
|
|
5206
|
+
if (cur === null || typeof cur !== "object" || !Object.prototype.hasOwnProperty.call(cur, name)) return void 0;
|
|
5207
|
+
cur = cur[name];
|
|
5208
|
+
for (const i of indexes) {
|
|
5209
|
+
if (!Array.isArray(cur) || i >= cur.length) return void 0;
|
|
5210
|
+
cur = cur[i];
|
|
5211
|
+
}
|
|
5212
|
+
}
|
|
5213
|
+
return cur;
|
|
5214
|
+
}
|
|
5215
|
+
function renderWorkflowJobTarget(target, initData) {
|
|
5216
|
+
const agentId = target?.agentId;
|
|
5217
|
+
if (target === void 0 || target === null || agentId === void 0) return {
|
|
5218
|
+
ok: true,
|
|
5219
|
+
agentId: void 0,
|
|
5220
|
+
templated: false
|
|
5221
|
+
};
|
|
5222
|
+
if (typeof agentId === "string") {
|
|
5223
|
+
if (!agentId.trim() || agentId.includes("${")) return {
|
|
5224
|
+
ok: false,
|
|
5225
|
+
reason: "invalid",
|
|
5226
|
+
message: "target.agentId is invalid"
|
|
5227
|
+
};
|
|
5228
|
+
return {
|
|
5229
|
+
ok: true,
|
|
5230
|
+
agentId,
|
|
5231
|
+
templated: false
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
const path3 = workflowJobTargetTemplatePath(agentId);
|
|
5235
|
+
if (path3 === null) return {
|
|
5236
|
+
ok: false,
|
|
5237
|
+
reason: "invalid",
|
|
5238
|
+
message: "target.agentId is not a valid initData template"
|
|
5239
|
+
};
|
|
5240
|
+
const value3 = readInitDataPath(initData, path3);
|
|
5241
|
+
if (value3 === void 0 || value3 === null) {
|
|
5242
|
+
return {
|
|
5243
|
+
ok: false,
|
|
5244
|
+
reason: "unbound",
|
|
5245
|
+
message: `target_unresolved: the run input has no initData.${path3}`
|
|
5246
|
+
};
|
|
5247
|
+
}
|
|
5248
|
+
if (typeof value3 !== "string" || !value3.trim() || value3.length > 256 || /\s/.test(value3.trim())) {
|
|
5249
|
+
return {
|
|
5250
|
+
ok: false,
|
|
5251
|
+
reason: "empty",
|
|
5252
|
+
message: `target_unresolved: initData.${path3} is not a non-empty agent id`
|
|
5253
|
+
};
|
|
5254
|
+
}
|
|
5255
|
+
return {
|
|
5256
|
+
ok: true,
|
|
5257
|
+
agentId: value3.trim(),
|
|
5258
|
+
templated: true
|
|
5259
|
+
};
|
|
5260
|
+
}
|
|
5261
|
+
var __defProp4, __name4, WORKFLOW_JOB_TOOLS, WORKFLOW_JOB_READ_ONLY_DROPPED, WORKFLOW_JOB_DEFAULT_TOOLS, WORKFLOW_JOB_PLUGINS, WORKFLOW_JOB_PLUGIN_ROOT, WORKFLOW_JOB_PLUGINS_MAX, WORKFLOW_JOB_TARGET_TEMPLATE_RE, TARGET_PATH_SEGMENT_RE;
|
|
5157
5262
|
var init_workflow_job_tools = __esm({
|
|
5158
5263
|
"../shared-types/dist/workflow-job-tools.mjs"() {
|
|
5159
5264
|
"use strict";
|
|
@@ -5199,8 +5304,22 @@ var init_workflow_job_tools = __esm({
|
|
|
5199
5304
|
__name4(workflowJobPluginDir, "workflowJobPluginDir");
|
|
5200
5305
|
__name(workflowJobPluginsProblem, "workflowJobPluginsProblem");
|
|
5201
5306
|
__name4(workflowJobPluginsProblem, "workflowJobPluginsProblem");
|
|
5307
|
+
WORKFLOW_JOB_TARGET_TEMPLATE_RE = /^\$\{\s*initData\.([A-Za-z0-9_.\-[\]]+)\s*\}$/;
|
|
5308
|
+
TARGET_PATH_SEGMENT_RE = /^[A-Za-z0-9_-]+(?:\[(?:0|[1-9]\d*)\])*$/;
|
|
5309
|
+
__name(workflowJobTargetTemplatePath, "workflowJobTargetTemplatePath");
|
|
5310
|
+
__name4(workflowJobTargetTemplatePath, "workflowJobTargetTemplatePath");
|
|
5311
|
+
__name(isWorkflowJobTargetTemplate, "isWorkflowJobTargetTemplate");
|
|
5312
|
+
__name4(isWorkflowJobTargetTemplate, "isWorkflowJobTargetTemplate");
|
|
5313
|
+
__name(workflowJobLuaApiProblem, "workflowJobLuaApiProblem");
|
|
5314
|
+
__name4(workflowJobLuaApiProblem, "workflowJobLuaApiProblem");
|
|
5315
|
+
__name(workflowJobUsesLuaApi, "workflowJobUsesLuaApi");
|
|
5316
|
+
__name4(workflowJobUsesLuaApi, "workflowJobUsesLuaApi");
|
|
5202
5317
|
__name(workflowJobTargetProblem, "workflowJobTargetProblem");
|
|
5203
5318
|
__name4(workflowJobTargetProblem, "workflowJobTargetProblem");
|
|
5319
|
+
__name(readInitDataPath, "readInitDataPath");
|
|
5320
|
+
__name4(readInitDataPath, "readInitDataPath");
|
|
5321
|
+
__name(renderWorkflowJobTarget, "renderWorkflowJobTarget");
|
|
5322
|
+
__name4(renderWorkflowJobTarget, "renderWorkflowJobTarget");
|
|
5204
5323
|
}
|
|
5205
5324
|
});
|
|
5206
5325
|
|
|
@@ -5676,6 +5795,15 @@ function liftRenderedApprover(row, rendered) {
|
|
|
5676
5795
|
group: text
|
|
5677
5796
|
};
|
|
5678
5797
|
}
|
|
5798
|
+
function approverUsersOf(users) {
|
|
5799
|
+
if (Array.isArray(users)) {
|
|
5800
|
+
if (users.length === 0 || users.length > APPROVER_SPEC_MAX_USERS) return null;
|
|
5801
|
+
return users.every((m) => typeof m === "string" && m.length > 0 && m.length <= 128) ? users : null;
|
|
5802
|
+
}
|
|
5803
|
+
if (typeof users !== "string") return null;
|
|
5804
|
+
const lifted = liftRenderedApprover("users", users);
|
|
5805
|
+
return lifted && "users" in lifted ? lifted.users : null;
|
|
5806
|
+
}
|
|
5679
5807
|
function workspaceTemplatePath(template22) {
|
|
5680
5808
|
const key = template22.trim();
|
|
5681
5809
|
const expr = WORKSPACE_TEMPLATE_EXPR_RE.exec(key);
|
|
@@ -6153,8 +6281,13 @@ function validateLuaExtensions(g, caps = WORKFLOW_CAPS_DEFAULT, opts = {
|
|
|
6153
6281
|
}
|
|
6154
6282
|
const plugins = node.plugins;
|
|
6155
6283
|
const target = node.target;
|
|
6284
|
+
const luaApi = node.luaApi;
|
|
6285
|
+
if (luaApi !== void 0) {
|
|
6286
|
+
const problem = workflowJobLuaApiProblem(luaApi, node.type === "step" ? "code" : node.type, isJobTier(node) ? "job" : node.tier);
|
|
6287
|
+
if (problem) err("lua-api-invalid", problem, `${path3}.luaApi`, id2);
|
|
6288
|
+
}
|
|
6156
6289
|
if (target !== void 0) {
|
|
6157
|
-
const problem = workflowJobTargetProblem(target, plugins);
|
|
6290
|
+
const problem = workflowJobTargetProblem(target, plugins, luaApi);
|
|
6158
6291
|
if (problem) err("target-invalid", problem, `${path3}.target`, id2);
|
|
6159
6292
|
}
|
|
6160
6293
|
if (plugins !== void 0) {
|
|
@@ -8918,6 +9051,8 @@ var init_dist2 = __esm({
|
|
|
8918
9051
|
__name5(validateApproverBlock, "validateApproverBlock");
|
|
8919
9052
|
__name(liftRenderedApprover, "liftRenderedApprover");
|
|
8920
9053
|
__name5(liftRenderedApprover, "liftRenderedApprover");
|
|
9054
|
+
__name(approverUsersOf, "approverUsersOf");
|
|
9055
|
+
__name5(approverUsersOf, "approverUsersOf");
|
|
8921
9056
|
WORKSPACE_TEMPLATE_EXPR_RE = /^\$\{\s*(?:initData|input)\.([^}]+?)\s*\}$/;
|
|
8922
9057
|
__name(workspaceTemplatePath, "workspaceTemplatePath");
|
|
8923
9058
|
__name5(workspaceTemplatePath, "workspaceTemplatePath");
|
|
@@ -9574,7 +9709,9 @@ function stepNodeOf(s) {
|
|
|
9574
9709
|
tier,
|
|
9575
9710
|
workspace: s.workspace,
|
|
9576
9711
|
jobResources: s.jobResources,
|
|
9577
|
-
jobTools: s.jobTools
|
|
9712
|
+
jobTools: s.jobTools,
|
|
9713
|
+
luaApi: s.luaApi,
|
|
9714
|
+
target: s.target
|
|
9578
9715
|
});
|
|
9579
9716
|
}
|
|
9580
9717
|
function materializeEntry(entry, steps) {
|
|
@@ -9919,6 +10056,14 @@ var init_workflow = __esm({
|
|
|
9919
10056
|
const tier = s.tier ?? (s.workspace ? "job" : void 0);
|
|
9920
10057
|
if (s.workspace && s.tier !== void 0 && s.tier !== "job") throw new LuaWorkflowBuildError("workspace-requires-job-tier", `"${s.id}": a step mounting a workspace must be tier:'job'`);
|
|
9921
10058
|
if (s.jobTools && tier !== "job") throw new LuaWorkflowBuildError("cap-exceeded", `"${s.id}": jobTools require tier:'job' (job-tools-require-job-tier)`);
|
|
10059
|
+
if (s.luaApi !== void 0) {
|
|
10060
|
+
const problem = workflowJobLuaApiProblem(s.luaApi, "code", tier);
|
|
10061
|
+
if (problem) throw new LuaWorkflowBuildError("lua-api-invalid", `"${s.id}": ${problem}`);
|
|
10062
|
+
}
|
|
10063
|
+
if (s.target !== void 0) {
|
|
10064
|
+
const problem = workflowJobTargetProblem(s.target, void 0, s.luaApi);
|
|
10065
|
+
if (problem) throw new LuaWorkflowBuildError("target-invalid", `"${s.id}": ${problem}`);
|
|
10066
|
+
}
|
|
9922
10067
|
assertTimeout({
|
|
9923
10068
|
id: s.id,
|
|
9924
10069
|
timeoutSeconds: s.timeoutSeconds,
|
|
@@ -10175,7 +10320,7 @@ var init_workflow = __esm({
|
|
|
10175
10320
|
}
|
|
10176
10321
|
if (opts.target !== void 0) {
|
|
10177
10322
|
const problem = workflowJobTargetProblem(opts.target, opts.plugins);
|
|
10178
|
-
if (problem) throw new LuaWorkflowBuildError("
|
|
10323
|
+
if (problem) throw new LuaWorkflowBuildError("target-invalid", `"${id2}": ${problem}`);
|
|
10179
10324
|
}
|
|
10180
10325
|
assertTimeout({
|
|
10181
10326
|
id: id2,
|
|
@@ -11994,6 +12139,7 @@ var init_types = __esm({
|
|
|
11994
12139
|
PrimitiveKind2["DEVICE_TRIGGER"] = "device-trigger";
|
|
11995
12140
|
PrimitiveKind2["VOICE"] = "voice";
|
|
11996
12141
|
PrimitiveKind2["WORKFLOW"] = "workflow";
|
|
12142
|
+
PrimitiveKind2["WEB_APP"] = "web-app";
|
|
11997
12143
|
return PrimitiveKind2;
|
|
11998
12144
|
})({});
|
|
11999
12145
|
}
|
|
@@ -18078,14 +18224,8 @@ var readEnv = /* @__PURE__ */ __name((key) => {
|
|
|
18078
18224
|
return void 0;
|
|
18079
18225
|
}, "readEnv");
|
|
18080
18226
|
var env = Object.assign((key, _opts) => readEnv(key), {
|
|
18081
|
-
|
|
18082
|
-
|
|
18083
|
-
throw new Error(`env-template-secret-key: \`${key}\` looks like a secret \u2014 read it with env('${key}') inside execute instead`);
|
|
18084
|
-
}
|
|
18085
|
-
return {
|
|
18086
|
-
__envRef: key
|
|
18087
|
-
};
|
|
18088
|
-
}, "template")
|
|
18227
|
+
// The ONE factory (`@lua/shared-types`) — the deployed step runtime's `env.template` is the same function.
|
|
18228
|
+
template: /* @__PURE__ */ __name((key) => envTemplatePlaceholder(key), "template")
|
|
18089
18229
|
});
|
|
18090
18230
|
var log = Object.freeze({
|
|
18091
18231
|
debug: /* @__PURE__ */ __name((message, fields) => emitLocalLog("debug", message, fields), "debug"),
|
|
@@ -18609,6 +18749,7 @@ var LuaAgent = class {
|
|
|
18609
18749
|
triggers;
|
|
18610
18750
|
jobs;
|
|
18611
18751
|
workflows;
|
|
18752
|
+
webApps;
|
|
18612
18753
|
preProcessors;
|
|
18613
18754
|
postProcessors;
|
|
18614
18755
|
mcpServers;
|
|
@@ -18653,6 +18794,7 @@ var LuaAgent = class {
|
|
|
18653
18794
|
this.triggers = config.triggers || [];
|
|
18654
18795
|
this.jobs = config.jobs || [];
|
|
18655
18796
|
this.workflows = config.workflows || [];
|
|
18797
|
+
this.webApps = config.webApps || [];
|
|
18656
18798
|
this.preProcessors = config.preProcessors || [];
|
|
18657
18799
|
this.postProcessors = config.postProcessors || [];
|
|
18658
18800
|
this.mcpServers = config.mcpServers || [];
|
|
@@ -18698,6 +18840,9 @@ var LuaAgent = class {
|
|
|
18698
18840
|
getWorkflows() {
|
|
18699
18841
|
return this.workflows;
|
|
18700
18842
|
}
|
|
18843
|
+
getWebApps() {
|
|
18844
|
+
return this.webApps;
|
|
18845
|
+
}
|
|
18701
18846
|
getPreProcessors() {
|
|
18702
18847
|
return this.preProcessors;
|
|
18703
18848
|
}
|