lua-cli 3.33.0 → 3.35.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 +29 -4
- package/dist/api-exports.js +331 -16
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +360 -27
- package/dist/index.js.map +1 -1
- package/dist/workflow-builder.js +324 -12
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +2 -2
- package/docs/api/LuaWorkflow.md +1 -1
- package/docs/workflows/migrating-runs.md +1 -1
- package/docs/workflows/recovery.md +4 -4
- package/docs/workflows/testing-offline.md +1 -1
- package/package.json +3 -3
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -3603,6 +3603,21 @@ export declare interface LuaRequest {
|
|
|
3603
3603
|
channel: Channel;
|
|
3604
3604
|
/** Webhook data from channel integrations (only present for webhook-based channels) */
|
|
3605
3605
|
webhook?: WebhookRequest;
|
|
3606
|
+
/**
|
|
3607
|
+
* Free-text context passed by the calling surface for this turn (e.g. LuaPop's
|
|
3608
|
+
* `LuaPop.init({ runtimeContext })`, or the `runtimeContext` field on the chat
|
|
3609
|
+
* request body). Also injected into the model's system prompt. Present only when
|
|
3610
|
+
* the caller supplied it.
|
|
3611
|
+
*/
|
|
3612
|
+
runtimeContext?: string;
|
|
3613
|
+
/** The chat thread id for this turn. */
|
|
3614
|
+
threadId?: string;
|
|
3615
|
+
/** The resolved IANA timezone for this turn (e.g. "Africa/Nairobi"). */
|
|
3616
|
+
timezone?: string;
|
|
3617
|
+
/** The id of the user this turn is acting for, when a user is resolved. */
|
|
3618
|
+
userId?: string;
|
|
3619
|
+
/** The id of the agent handling this turn. */
|
|
3620
|
+
agentId?: string;
|
|
3606
3621
|
}
|
|
3607
3622
|
|
|
3608
3623
|
/**
|
|
@@ -5704,8 +5719,15 @@ export declare type PreProcessorAction = 'proceed' | 'block';
|
|
|
5704
5719
|
export declare type PreProcessorBlockResponse = {
|
|
5705
5720
|
/** Stop processing immediately */
|
|
5706
5721
|
action: 'block';
|
|
5707
|
-
/**
|
|
5708
|
-
|
|
5722
|
+
/**
|
|
5723
|
+
* Message to show to the user.
|
|
5724
|
+
*
|
|
5725
|
+
* Omit it (or leave it empty) to end the turn SILENTLY — nothing is sent on
|
|
5726
|
+
* any channel. That is the supported way to stay quiet, e.g. while a human
|
|
5727
|
+
* agent is handling the conversation. The user's message is still recorded in
|
|
5728
|
+
* the agent's history; only the reply is suppressed.
|
|
5729
|
+
*/
|
|
5730
|
+
response?: string;
|
|
5709
5731
|
/** Optional metadata */
|
|
5710
5732
|
metadata?: Record<string, any>;
|
|
5711
5733
|
};
|
|
@@ -6749,8 +6771,11 @@ export declare const User: {
|
|
|
6749
6771
|
getChatHistory(): Promise<ChatHistoryMessage[]>;
|
|
6750
6772
|
/**
|
|
6751
6773
|
* PRO-1208 (B7) — push an approve/redirect/fix card to YOUR OWN inbox.
|
|
6752
|
-
* Capped
|
|
6753
|
-
*
|
|
6774
|
+
* Capped per kind at 500/day per agent per end-user by default
|
|
6775
|
+
* (`LUA_INBOX_AGENT_DEPOSIT_DAILY_CAP`); `priority: 'urgent'` is limited to
|
|
6776
|
+
* 5/day by default (`LUA_INBOX_URGENT_PUSH_DAILY_CAP`) and lands demoted to
|
|
6777
|
+
* `high` when over budget — never dropped. Same-`key` pushes revise in place.
|
|
6778
|
+
* Cap-hit resolves to `{outcome: 'capped'}` — never throws.
|
|
6754
6779
|
*
|
|
6755
6780
|
* @example
|
|
6756
6781
|
* const receipt = await User.Inbox.push({
|
package/dist/api-exports.js
CHANGED
|
@@ -83,6 +83,9 @@ function aiGenerateInputFromSimplified(prompt, content) {
|
|
|
83
83
|
function isAllowedReviewableExecuteTool(tool) {
|
|
84
84
|
return REVIEWABLE_ACTION_EXECUTE_TOOL_ALLOWLIST.includes(tool);
|
|
85
85
|
}
|
|
86
|
+
function isReviewableStandingStartTool(tool) {
|
|
87
|
+
return REVIEWABLE_STANDING_START_TOOLS.includes(tool);
|
|
88
|
+
}
|
|
86
89
|
function isReviewableMcpSendTool(tool) {
|
|
87
90
|
return tool.length > REVIEWABLE_MCP_SEND_TOOL_SUFFIX.length && tool.endsWith(REVIEWABLE_MCP_SEND_TOOL_SUFFIX);
|
|
88
91
|
}
|
|
@@ -112,7 +115,7 @@ function mcpSendSiblingForDraftTool(tool, availableToolIds) {
|
|
|
112
115
|
return candidates[0]?.id;
|
|
113
116
|
}
|
|
114
117
|
function isReviewableExecuteTool(tool) {
|
|
115
|
-
return isAllowedReviewableExecuteTool(tool) || isReviewableMcpSendTool(tool);
|
|
118
|
+
return isAllowedReviewableExecuteTool(tool) || isReviewableMcpSendTool(tool) || isReviewableStandingStartTool(tool);
|
|
116
119
|
}
|
|
117
120
|
function isInteractiveChannel(channel) {
|
|
118
121
|
if (!channel) return true;
|
|
@@ -258,7 +261,10 @@ function transformChatHistoryContentParts(parts) {
|
|
|
258
261
|
content.push({
|
|
259
262
|
type: "file",
|
|
260
263
|
data: part.data,
|
|
261
|
-
mediaType
|
|
264
|
+
mediaType,
|
|
265
|
+
...part.filename && {
|
|
266
|
+
filename: part.filename
|
|
267
|
+
}
|
|
262
268
|
});
|
|
263
269
|
}
|
|
264
270
|
}
|
|
@@ -537,6 +543,55 @@ function normalizeLuaJobExecutionTimeoutSeconds(timeout) {
|
|
|
537
543
|
}
|
|
538
544
|
return Math.min(Math.max(timeout, LUA_JOB_MIN_TIMEOUT_SECONDS), LUA_JOB_MAX_TIMEOUT_SECONDS);
|
|
539
545
|
}
|
|
546
|
+
function isId(value3) {
|
|
547
|
+
return typeof value3 === "string" && value3.length > 0 && value3.length <= MAX_ID_LENGTH;
|
|
548
|
+
}
|
|
549
|
+
function parseScheduledJobFire(raw) {
|
|
550
|
+
if (new TextEncoder().encode(raw).byteLength > MAX_BODY_BYTES) {
|
|
551
|
+
throw new Error("Invalid scheduled job fire: body is too large");
|
|
552
|
+
}
|
|
553
|
+
let value3;
|
|
554
|
+
try {
|
|
555
|
+
value3 = JSON.parse(raw);
|
|
556
|
+
} catch {
|
|
557
|
+
throw new Error("Invalid scheduled job fire: body is not JSON");
|
|
558
|
+
}
|
|
559
|
+
if (!value3 || typeof value3 !== "object" || Array.isArray(value3)) {
|
|
560
|
+
throw new Error("Invalid scheduled job fire: body must be an object");
|
|
561
|
+
}
|
|
562
|
+
const record = value3;
|
|
563
|
+
if (Object.keys(record).some((key) => !KEYS.has(key))) {
|
|
564
|
+
throw new Error("Invalid scheduled job fire: unknown field");
|
|
565
|
+
}
|
|
566
|
+
if (record.v !== 1 || record.kind !== "scheduled-job-fire") {
|
|
567
|
+
throw new Error("Invalid scheduled job fire: unsupported contract");
|
|
568
|
+
}
|
|
569
|
+
if (!isId(record.agentId)) {
|
|
570
|
+
throw new Error("Invalid scheduled job fire: agentId is required");
|
|
571
|
+
}
|
|
572
|
+
if (!isId(record.jobId)) {
|
|
573
|
+
throw new Error("Invalid scheduled job fire: jobId is required");
|
|
574
|
+
}
|
|
575
|
+
if (typeof record.scheduledTime !== "string" || !UTC_ISO.test(record.scheduledTime) || !Number.isFinite(Date.parse(record.scheduledTime)) || ![
|
|
576
|
+
new Date(record.scheduledTime).toISOString(),
|
|
577
|
+
new Date(record.scheduledTime).toISOString().replace(".000Z", "Z")
|
|
578
|
+
].includes(record.scheduledTime)) {
|
|
579
|
+
throw new Error("Invalid scheduled job fire: scheduledTime must be ISO 8601");
|
|
580
|
+
}
|
|
581
|
+
if (record.triggerId !== void 0 && !isId(record.triggerId)) {
|
|
582
|
+
throw new Error("Invalid scheduled job fire: triggerId must be a non-empty string");
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
v: 1,
|
|
586
|
+
kind: "scheduled-job-fire",
|
|
587
|
+
agentId: record.agentId,
|
|
588
|
+
jobId: record.jobId,
|
|
589
|
+
scheduledTime: record.scheduledTime,
|
|
590
|
+
...typeof record.triggerId === "string" ? {
|
|
591
|
+
triggerId: record.triggerId
|
|
592
|
+
} : {}
|
|
593
|
+
};
|
|
594
|
+
}
|
|
540
595
|
function triggerUrlEnvKey(triggerKey) {
|
|
541
596
|
const upper = triggerKey.trim().replace(/[^A-Za-z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
|
|
542
597
|
return `${TEMPLATE_TRIGGER_URL_ENV_PREFIX}${upper}`;
|
|
@@ -1157,7 +1212,7 @@ function effectiveAgentFeatures(base, override, rule) {
|
|
|
1157
1212
|
if (rule === "wholesale") return override || base || void 0;
|
|
1158
1213
|
return effectiveAgentFeatureRows(base, override).rows;
|
|
1159
1214
|
}
|
|
1160
|
-
var __defProp2, __name2, CHANNEL_SEND_CHANNELS, REVIEWABLE_ACTION_EXECUTE_TOOL_ALLOWLIST, 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, DESKTOP_FILE_COMMANDS, DESKTOP_FILE_COMMAND_SET, MODEL_ID_BYOK_PROVIDERS, MODEL_SNAPSHOT_SUFFIX, REASONING_EFFORT_VALUES, IMPLICIT_MODEL_SELECTION_SOURCES, PLATFORM_FALLBACK_MODEL_SOURCE, AGENT_NAME_TOKEN, DEFAULT_PERSONA_GUIDE, PERSONAL_SPACE_STARTING_PERSONA, 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, 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_SUSPEND_KINDS, WORKFLOW_RUN_NOTIFICATION_SUSPENDED_KINDS, WORKFLOW_SIGNAL_PAYLOAD_MAX_BYTES, WORKFLOW_RESOLVE_OUTPUT_MAX_BYTES, 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_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, 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;
|
|
1215
|
+
var __defProp2, __name2, 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, DESKTOP_FILE_COMMANDS, DESKTOP_FILE_COMMAND_SET, MODEL_ID_BYOK_PROVIDERS, MODEL_SNAPSHOT_SUFFIX, REASONING_EFFORT_VALUES, IMPLICIT_MODEL_SELECTION_SOURCES, PLATFORM_FALLBACK_MODEL_SOURCE, AGENT_NAME_TOKEN, DEFAULT_PERSONA_GUIDE, PERSONAL_SPACE_STARTING_PERSONA, 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_SUSPEND_KINDS, WORKFLOW_RUN_NOTIFICATION_SUSPENDED_KINDS, WORKFLOW_SIGNAL_PAYLOAD_MAX_BYTES, WORKFLOW_RESOLVE_OUTPUT_MAX_BYTES, 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_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, 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;
|
|
1161
1216
|
var init_dist = __esm({
|
|
1162
1217
|
"../shared-types/dist/index.mjs"() {
|
|
1163
1218
|
"use strict";
|
|
@@ -1197,6 +1252,11 @@ var init_dist = __esm({
|
|
|
1197
1252
|
];
|
|
1198
1253
|
__name(isAllowedReviewableExecuteTool, "isAllowedReviewableExecuteTool");
|
|
1199
1254
|
__name2(isAllowedReviewableExecuteTool, "isAllowedReviewableExecuteTool");
|
|
1255
|
+
REVIEWABLE_STANDING_START_TOOLS = [
|
|
1256
|
+
"scheduleWorkflow"
|
|
1257
|
+
];
|
|
1258
|
+
__name(isReviewableStandingStartTool, "isReviewableStandingStartTool");
|
|
1259
|
+
__name2(isReviewableStandingStartTool, "isReviewableStandingStartTool");
|
|
1200
1260
|
REVIEWABLE_MCP_SEND_TOOL_SUFFIX = "_create_messaging_message";
|
|
1201
1261
|
__name(isReviewableMcpSendTool, "isReviewableMcpSendTool");
|
|
1202
1262
|
__name2(isReviewableMcpSendTool, "isReviewableMcpSendTool");
|
|
@@ -1857,6 +1917,21 @@ This text is who you are for this person. As you learn them, their name, their w
|
|
|
1857
1917
|
__name2(resolveLuaJobTimeoutSeconds, "resolveLuaJobTimeoutSeconds");
|
|
1858
1918
|
__name(normalizeLuaJobExecutionTimeoutSeconds, "normalizeLuaJobExecutionTimeoutSeconds");
|
|
1859
1919
|
__name2(normalizeLuaJobExecutionTimeoutSeconds, "normalizeLuaJobExecutionTimeoutSeconds");
|
|
1920
|
+
KEYS = /* @__PURE__ */ new Set([
|
|
1921
|
+
"v",
|
|
1922
|
+
"kind",
|
|
1923
|
+
"agentId",
|
|
1924
|
+
"jobId",
|
|
1925
|
+
"scheduledTime",
|
|
1926
|
+
"triggerId"
|
|
1927
|
+
]);
|
|
1928
|
+
MAX_BODY_BYTES = 4096;
|
|
1929
|
+
MAX_ID_LENGTH = 512;
|
|
1930
|
+
UTC_ISO = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;
|
|
1931
|
+
__name(isId, "isId");
|
|
1932
|
+
__name2(isId, "isId");
|
|
1933
|
+
__name(parseScheduledJobFire, "parseScheduledJobFire");
|
|
1934
|
+
__name2(parseScheduledJobFire, "parseScheduledJobFire");
|
|
1860
1935
|
TEMPLATE_TRIGGER_URL_ENV_PREFIX = "LUA_TRIGGER_URL__";
|
|
1861
1936
|
__name(triggerUrlEnvKey, "triggerUrlEnvKey");
|
|
1862
1937
|
__name2(triggerUrlEnvKey, "triggerUrlEnvKey");
|
|
@@ -2126,7 +2201,20 @@ This text is who you are for this person. As you learn them, their name, their w
|
|
|
2126
2201
|
"platform-allowlist"
|
|
2127
2202
|
]),
|
|
2128
2203
|
/** Product data only. A roster row confers nothing. */
|
|
2129
|
-
rostered: z3.boolean()
|
|
2204
|
+
rostered: z3.boolean(),
|
|
2205
|
+
/**
|
|
2206
|
+
* Ownership, product data only (PRO-1754). `createdBy` is the creating
|
|
2207
|
+
* user's id straight off the sub-agent document; `owner` is that id
|
|
2208
|
+
* resolved to a display identity after the list is decided. Both are
|
|
2209
|
+
* absent when the document records no creator or the lookup fails —
|
|
2210
|
+
* they never influence which resources are listed.
|
|
2211
|
+
*/
|
|
2212
|
+
createdBy: z3.string().min(1).max(256).optional(),
|
|
2213
|
+
owner: z3.object({
|
|
2214
|
+
id: z3.string().min(1).max(256),
|
|
2215
|
+
name: z3.string().optional(),
|
|
2216
|
+
email: z3.string().optional()
|
|
2217
|
+
}).optional()
|
|
2130
2218
|
}).passthrough();
|
|
2131
2219
|
CapabilityProfilesSchema = z3.record(z3.string().min(1).max(64), z3.array(ProjectedScopeSchema));
|
|
2132
2220
|
RoleCatalogSchema = z3.record(z3.string().min(1).max(128), z3.object({
|
|
@@ -3026,6 +3114,148 @@ function resolveMapping(cfg, ctx) {
|
|
|
3026
3114
|
value: result
|
|
3027
3115
|
};
|
|
3028
3116
|
}
|
|
3117
|
+
function looksLikeModelTemplate(model) {
|
|
3118
|
+
return typeof model === "string" && model.includes("${");
|
|
3119
|
+
}
|
|
3120
|
+
function parseModelTemplate(model) {
|
|
3121
|
+
if (!looksLikeModelTemplate(model)) return {
|
|
3122
|
+
kind: "static"
|
|
3123
|
+
};
|
|
3124
|
+
const trimmed = model.trim();
|
|
3125
|
+
const m = WORKFLOW_MODEL_TEMPLATE_RE.exec(trimmed);
|
|
3126
|
+
if (!m) {
|
|
3127
|
+
const inner = /^\$\{([^}]*)\}$/.exec(trimmed)?.[1];
|
|
3128
|
+
const root = inner?.split(/[.|]/, 1)[0];
|
|
3129
|
+
const why = inner !== void 0 && root !== void 0 && root !== WORKFLOW_MODEL_TEMPLATE_ROOT ? `only the \`${WORKFLOW_MODEL_TEMPLATE_ROOT}\` root is allowed (got \`${root || "(empty)"}\`)` : inner !== void 0 && (inner === WORKFLOW_MODEL_TEMPLATE_ROOT || inner.startsWith(`${WORKFLOW_MODEL_TEMPLATE_ROOT}.`)) ? "the path after `initData.` is empty" : "the whole value must be exactly one placeholder \u2014 no prefix, suffix or second placeholder";
|
|
3130
|
+
return {
|
|
3131
|
+
kind: "invalid",
|
|
3132
|
+
message: modelTemplateInvalidMessage(model, why)
|
|
3133
|
+
};
|
|
3134
|
+
}
|
|
3135
|
+
const path3 = m[1];
|
|
3136
|
+
if (!path3.split(".").every((seg) => PATH_SEGMENT_RE.test(seg))) {
|
|
3137
|
+
return {
|
|
3138
|
+
kind: "invalid",
|
|
3139
|
+
message: modelTemplateInvalidMessage(model, `the path \`${path3}\` is not a dotted path of names and canonical [n] indexes`)
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
3142
|
+
if (m[2] !== void 0) {
|
|
3143
|
+
const dflt = m[2].trim();
|
|
3144
|
+
if (!dflt) return {
|
|
3145
|
+
kind: "invalid",
|
|
3146
|
+
message: modelTemplateInvalidMessage(model, "the default after `|` is empty")
|
|
3147
|
+
};
|
|
3148
|
+
if (dflt.includes("|")) {
|
|
3149
|
+
return {
|
|
3150
|
+
kind: "invalid",
|
|
3151
|
+
message: modelTemplateInvalidMessage(model, "a placeholder names ONE default \u2014 a second `|` is not a fallback chain")
|
|
3152
|
+
};
|
|
3153
|
+
}
|
|
3154
|
+
return {
|
|
3155
|
+
kind: "template",
|
|
3156
|
+
template: {
|
|
3157
|
+
placeholder: trimmed,
|
|
3158
|
+
path: path3,
|
|
3159
|
+
default: dflt
|
|
3160
|
+
}
|
|
3161
|
+
};
|
|
3162
|
+
}
|
|
3163
|
+
return {
|
|
3164
|
+
kind: "template",
|
|
3165
|
+
template: {
|
|
3166
|
+
placeholder: trimmed,
|
|
3167
|
+
path: path3
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
}
|
|
3171
|
+
function modelTemplateInvalidMessage(model, why) {
|
|
3172
|
+
return `model "${model.trim()}" is not a valid run-input-bound model placeholder \u2014 ${why}; the forms are \${initData.<path>} and \${initData.<path>|<provider/model default>}`;
|
|
3173
|
+
}
|
|
3174
|
+
function modelTemplateDefaultRequiredMessage(model) {
|
|
3175
|
+
return `model "${model}" runs on the Job tier, so its placeholder needs a default \u2014 the harness / provider gates (harness:'claude-code' needs an Anthropic model) classify it at push; write ${model.replace(/\}$/, "|<provider/model>}")}`;
|
|
3176
|
+
}
|
|
3177
|
+
function staticModelPin(model) {
|
|
3178
|
+
if (typeof model !== "string") return void 0;
|
|
3179
|
+
const parsed = parseModelTemplate(model);
|
|
3180
|
+
if (parsed.kind === "static") return model;
|
|
3181
|
+
if (parsed.kind === "template") return parsed.template.default;
|
|
3182
|
+
return void 0;
|
|
3183
|
+
}
|
|
3184
|
+
function readPath(root, path3) {
|
|
3185
|
+
let cur = root;
|
|
3186
|
+
for (const seg of path3.split(".")) {
|
|
3187
|
+
const name = seg.replace(/\[(?:0|[1-9]\d*)\]/g, "");
|
|
3188
|
+
const indexes = [
|
|
3189
|
+
...seg.matchAll(/\[(0|[1-9]\d*)\]/g)
|
|
3190
|
+
].map((x) => Number(x[1]));
|
|
3191
|
+
if (cur === null || typeof cur !== "object") return void 0;
|
|
3192
|
+
cur = cur[name];
|
|
3193
|
+
for (const i of indexes) {
|
|
3194
|
+
if (!Array.isArray(cur)) return void 0;
|
|
3195
|
+
cur = cur[i];
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
return cur;
|
|
3199
|
+
}
|
|
3200
|
+
function renderModelTemplate(model, initData) {
|
|
3201
|
+
if (model === void 0 || !looksLikeModelTemplate(model)) return {
|
|
3202
|
+
ok: true,
|
|
3203
|
+
model,
|
|
3204
|
+
source: "static"
|
|
3205
|
+
};
|
|
3206
|
+
const parsed = parseModelTemplate(model);
|
|
3207
|
+
if (parsed.kind === "invalid") {
|
|
3208
|
+
return {
|
|
3209
|
+
ok: false,
|
|
3210
|
+
placeholder: model.trim(),
|
|
3211
|
+
path: "",
|
|
3212
|
+
reason: "invalid",
|
|
3213
|
+
message: parsed.message
|
|
3214
|
+
};
|
|
3215
|
+
}
|
|
3216
|
+
if (parsed.kind === "static") return {
|
|
3217
|
+
ok: true,
|
|
3218
|
+
model,
|
|
3219
|
+
source: "static"
|
|
3220
|
+
};
|
|
3221
|
+
const { placeholder, path: path3 } = parsed.template;
|
|
3222
|
+
if (initData !== void 0 && initData !== null && (typeof initData !== "object" || Array.isArray(initData))) {
|
|
3223
|
+
return {
|
|
3224
|
+
ok: false,
|
|
3225
|
+
placeholder,
|
|
3226
|
+
path: path3,
|
|
3227
|
+
reason: "input-not-object",
|
|
3228
|
+
message: modelTemplateInputNotObjectMessage(placeholder, initData)
|
|
3229
|
+
};
|
|
3230
|
+
}
|
|
3231
|
+
const value22 = readPath(initData, path3);
|
|
3232
|
+
const reason = value22 === void 0 || value22 === null ? "unbound" : typeof value22 !== "string" ? "not-a-string" : value22.trim() ? null : "empty";
|
|
3233
|
+
if (reason === null) return {
|
|
3234
|
+
ok: true,
|
|
3235
|
+
model: value22.trim(),
|
|
3236
|
+
source: "initData"
|
|
3237
|
+
};
|
|
3238
|
+
if (parsed.template.default !== void 0) return {
|
|
3239
|
+
ok: true,
|
|
3240
|
+
model: parsed.template.default,
|
|
3241
|
+
source: "default"
|
|
3242
|
+
};
|
|
3243
|
+
return {
|
|
3244
|
+
ok: false,
|
|
3245
|
+
placeholder,
|
|
3246
|
+
path: path3,
|
|
3247
|
+
reason,
|
|
3248
|
+
message: modelTemplateUnboundMessage(placeholder, path3, reason)
|
|
3249
|
+
};
|
|
3250
|
+
}
|
|
3251
|
+
function modelTemplateUnboundMessage(placeholder, path3, reason) {
|
|
3252
|
+
const what = reason === "unbound" ? `the run input has no ${WORKFLOW_MODEL_TEMPLATE_ROOT}.${path3}` : reason === "empty" ? `${WORKFLOW_MODEL_TEMPLATE_ROOT}.${path3} is empty on the run input` : `${WORKFLOW_MODEL_TEMPLATE_ROOT}.${path3} on the run input is not a string`;
|
|
3253
|
+
return `model placeholder "${placeholder}" is unbound \u2014 ${what} and the placeholder declares no default; pass one in the run input or write \${${WORKFLOW_MODEL_TEMPLATE_ROOT}.${path3}|<provider/model>}`;
|
|
3254
|
+
}
|
|
3255
|
+
function modelTemplateInputNotObjectMessage(placeholder, initData) {
|
|
3256
|
+
const type = Array.isArray(initData) ? "an array" : `a ${typeof initData}`;
|
|
3257
|
+
return `model placeholder "${placeholder}" cannot be rendered \u2014 the run input is ${type}, not an object; start the run with an object input (a JSON string must be parsed before it is passed)`;
|
|
3258
|
+
}
|
|
3029
3259
|
function describeApproverSpecRefusal(spec) {
|
|
3030
3260
|
const raw = spec === void 0 ? "undefined" : JSON.stringify(spec) ?? String(spec);
|
|
3031
3261
|
const written = raw.length > APPROVER_WRITTEN_MAX ? `${raw.slice(0, APPROVER_WRITTEN_MAX - 1)}\u2026` : raw;
|
|
@@ -3395,6 +3625,7 @@ function validateLuaExtensions(g, caps = WORKFLOW_CAPS_DEFAULT, opts = {
|
|
|
3395
3625
|
}
|
|
3396
3626
|
}
|
|
3397
3627
|
const declaredKeys = new Set(opts.connectionKeys ?? []);
|
|
3628
|
+
const ownKeys = /* @__PURE__ */ new Set();
|
|
3398
3629
|
if (g.connections !== void 0 && !Array.isArray(g.connections)) {
|
|
3399
3630
|
err("connection-declaration-invalid", "`connections` must be an array of { key, integrationType }", "connections");
|
|
3400
3631
|
}
|
|
@@ -3406,7 +3637,7 @@ function validateLuaExtensions(g, caps = WORKFLOW_CAPS_DEFAULT, opts = {
|
|
|
3406
3637
|
err("connection-declaration-invalid", `connections[${i}].key must match ${WORKFLOW_CONNECTION_KEY_RE}`, `${path3}.key`);
|
|
3407
3638
|
return;
|
|
3408
3639
|
}
|
|
3409
|
-
if (
|
|
3640
|
+
if (ownKeys.has(key)) {
|
|
3410
3641
|
err("connection-declaration-invalid", `connections[${i}].key "${key}" is declared twice`, `${path3}.key`);
|
|
3411
3642
|
return;
|
|
3412
3643
|
}
|
|
@@ -3414,6 +3645,7 @@ function validateLuaExtensions(g, caps = WORKFLOW_CAPS_DEFAULT, opts = {
|
|
|
3414
3645
|
err("connection-declaration-invalid", `connections[${i}] ("${key}") needs an integrationType (the catalog slug, e.g. 'github')`, `${path3}.integrationType`);
|
|
3415
3646
|
return;
|
|
3416
3647
|
}
|
|
3648
|
+
ownKeys.add(key);
|
|
3417
3649
|
declaredKeys.add(key);
|
|
3418
3650
|
});
|
|
3419
3651
|
const undeclaredKey = /* @__PURE__ */ __name4((ref) => typeof ref === "string" && !declaredKeys.has(ref) && isConnectionKeyShaped(ref) && opts.connectionIds?.has(ref) !== true, "undeclaredKey");
|
|
@@ -3540,7 +3772,7 @@ function validateLuaExtensions(g, caps = WORKFLOW_CAPS_DEFAULT, opts = {
|
|
|
3540
3772
|
if (node.harness !== void 0 && node.tier !== "job") {
|
|
3541
3773
|
err("harness-requires-job-tier", "`harness` is only legal on a tier:'job' agent step", `${path3}.harness`, id);
|
|
3542
3774
|
}
|
|
3543
|
-
const provider = node.type === "agent" ? classifyModelProvider(node.model) : null;
|
|
3775
|
+
const provider = node.type === "agent" ? classifyModelProvider(staticModelPin(node.model)) : null;
|
|
3544
3776
|
if (node.harness === "claude-code" && provider !== null && provider !== "anthropic") {
|
|
3545
3777
|
err("harness-provider-mismatch", `harness:'claude-code' needs an Anthropic model (model "${node.type === "agent" ? node.model : ""}" is ${provider})`, `${path3}.harness`, id);
|
|
3546
3778
|
}
|
|
@@ -3550,18 +3782,32 @@ function validateLuaExtensions(g, caps = WORKFLOW_CAPS_DEFAULT, opts = {
|
|
|
3550
3782
|
}, "checkTier");
|
|
3551
3783
|
const checkModel = /* @__PURE__ */ __name4((node, path3) => {
|
|
3552
3784
|
if (node.type !== "agent" || typeof node.model !== "string") return;
|
|
3785
|
+
const id = singleId(node);
|
|
3786
|
+
const parsed = parseModelTemplate(node.model);
|
|
3787
|
+
if (parsed.kind === "invalid") {
|
|
3788
|
+
err("model-template-invalid", parsed.message, `${path3}.model`, id);
|
|
3789
|
+
return;
|
|
3790
|
+
}
|
|
3791
|
+
if (parsed.kind === "template" && parsed.template.default === void 0) {
|
|
3792
|
+
if (isJobTier(node)) {
|
|
3793
|
+
err("model-template-default-required", modelTemplateDefaultRequiredMessage(node.model), `${path3}.model`, id);
|
|
3794
|
+
}
|
|
3795
|
+
return;
|
|
3796
|
+
}
|
|
3797
|
+
const pin = parsed.kind === "template" ? parsed.template.default : node.model;
|
|
3798
|
+
if (pin === void 0) return;
|
|
3799
|
+
const inContext = /* @__PURE__ */ __name4((message) => parsed.kind === "template" ? `${message} (the default of ${parsed.template.placeholder})` : message, "inContext");
|
|
3553
3800
|
const registry = opts.approvedModels;
|
|
3554
3801
|
if (registry === void 0) return;
|
|
3555
|
-
const id = singleId(node);
|
|
3556
3802
|
if (registry === "unavailable") {
|
|
3557
|
-
const
|
|
3558
|
-
if (
|
|
3559
|
-
warn("model-unresolved", `model "${
|
|
3803
|
+
const trimmed = pin.trim();
|
|
3804
|
+
if (trimmed && !normalizeModelId(trimmed, []).ok) {
|
|
3805
|
+
warn("model-unresolved", inContext(`model "${trimmed}" could not be checked against the approved-model registry (unavailable at push) \u2014 it dispatches only if it resolves there (a provider/model registry code, or a bare id exactly one approved model carries)`), `${path3}.model`, id);
|
|
3560
3806
|
}
|
|
3561
3807
|
return;
|
|
3562
3808
|
}
|
|
3563
|
-
const resolved = normalizeModelId(
|
|
3564
|
-
if (!resolved.ok) err("model-unresolved", modelUnresolvedMessage(resolved), `${path3}.model`, id);
|
|
3809
|
+
const resolved = normalizeModelId(pin, registry);
|
|
3810
|
+
if (!resolved.ok) err("model-unresolved", inContext(modelUnresolvedMessage(resolved)), `${path3}.model`, id);
|
|
3565
3811
|
}, "checkModel");
|
|
3566
3812
|
const checkWorkspace = /* @__PURE__ */ __name4((node, path3) => {
|
|
3567
3813
|
const id = singleId(node);
|
|
@@ -6051,7 +6297,37 @@ function needsInheritedWorkspace(graph) {
|
|
|
6051
6297
|
}
|
|
6052
6298
|
return false;
|
|
6053
6299
|
}
|
|
6054
|
-
|
|
6300
|
+
function armEntry2(arm) {
|
|
6301
|
+
return Array.isArray(arm) ? arm[arm.length - 1] : arm;
|
|
6302
|
+
}
|
|
6303
|
+
function entryHasJobTier(entry) {
|
|
6304
|
+
const n2 = armEntry2(entry);
|
|
6305
|
+
if (!n2 || typeof n2 !== "object") return false;
|
|
6306
|
+
const node = n2;
|
|
6307
|
+
if (node.tier === "job") return true;
|
|
6308
|
+
const ws = node.workspace;
|
|
6309
|
+
if (ws !== void 0 && ws !== "inherit") return true;
|
|
6310
|
+
switch (node.type) {
|
|
6311
|
+
case "parallel":
|
|
6312
|
+
return Array.isArray(node.steps) && node.steps.some(entryHasJobTier);
|
|
6313
|
+
case "conditional":
|
|
6314
|
+
return Array.isArray(node.steps) && node.steps.some(entryHasJobTier) || node.otherwise !== void 0 && entryHasJobTier(node.otherwise);
|
|
6315
|
+
case "foreach":
|
|
6316
|
+
case "loop":
|
|
6317
|
+
return entryHasJobTier(node.step);
|
|
6318
|
+
default:
|
|
6319
|
+
return false;
|
|
6320
|
+
}
|
|
6321
|
+
}
|
|
6322
|
+
function graphHasJobTierStep(envelopeOrGraph) {
|
|
6323
|
+
if (!envelopeOrGraph || typeof envelopeOrGraph !== "object") return false;
|
|
6324
|
+
const env2 = envelopeOrGraph;
|
|
6325
|
+
const envWorkspace = env2.workspace;
|
|
6326
|
+
if (envWorkspace !== void 0 && envWorkspace !== "inherit") return true;
|
|
6327
|
+
const graph = Array.isArray(envelopeOrGraph) ? envelopeOrGraph : env2.definition?.graph ?? [];
|
|
6328
|
+
return Array.isArray(graph) && graph.some(entryHasJobTier);
|
|
6329
|
+
}
|
|
6330
|
+
var __defProp4, __name4, WorkflowTemplateError, TEMPLATE_PLACEHOLDER, TEMPLATE_NAMESPACES, MAP_DESCRIPTOR_KEYS, MAP_MEMBER_MALFORMED_CODE, fromInit, fromStep, value, template, fromRequest, rows, fromKnowledge, SideEffectsSchema, JobResourcesSchema, WORKFLOW_MODEL_TEMPLATE_ROOT, WORKFLOW_MODEL_TEMPLATE_RE, PATH_SEGMENT_RE, APPROVER_SPEC_MAX_USERS, ESCALATION_MAX_HOPS, TemplateBindingSchema, ApproverSpecSchema, FourEyesSchema, EscalationHopSchema, TerminalOutcomeSchema, ApprovalOnTimeoutSchema, APPROVER_SPEC_SHAPES, APPROVER_WRITTEN_MAX, USER_ID_SHAPED_RE, BINDING_ROOTS, WORKSPACE_TEMPLATE_EXPR_RE, SLEEP_UNTIL_REPLACEMENT, WORKFLOW_CAPS_DEFAULT, WORKFLOW_STEP_DEFAULT_TIMEOUT_SECONDS, WORKFLOW_AGENT_DEFAULT_TIMEOUT_SECONDS, WORKFLOW_JOB_DEFAULT_TIMEOUT_SECONDS, WORKFLOW_FOREACH_DEFAULT_CONCURRENCY, WORKFLOW_FOREACH_DEFAULT_MAX_ITEMS, WORKFLOW_LOOP_DEFAULT_MAX_ITERATIONS, WORKFLOW_SUSPEND_DEFAULT_TIMEOUT_HOURS, WORKFLOW_SIGNAL_DEFAULT_SOURCES, clone, CONNECTION_ID_HEX_RE, WORKFLOW_JOB_MAX_WORKTREE_ARMS, workspaceOf, mountsWorkspace, isJobTier, jobToolsOf, schemaIsArray, isHitlNode, isSingleStep, singleId, armId, TEMPLATE_STEP_REF, EDITABLE_PATH_RE, PREDICATE_OPS, isPredicateScalar, GRAPH_HASH_PREFIX, WorkflowPlanError, isArmStep, armStepId, armStepKind, joinIdOf, containerIdOf, PATH_PLACEHOLDER, MISSING, stepIdOf, cmp, eq, ne, gt, gte, lt, lte, inSet, notIn, exists, notExists, truthy, falsy, and, or, not, CONTINUED_FAILURE_TAG, CONTINUED_FAILURE_DEFAULT_CODE, CONTINUED_FAILURE_OUTPUT_SCHEMA, CONTINUED_FAILURE_LEAF_PATHS, isHitlNode2, nodeIdOf, GOAL_JUDGE_STEP_ID, NON_LEAF_KINDS, CONDITIONAL_JOIN_ID, branchArmId, canonical, sortKeys, JOIN, entryOfJoin, FORCE_CANCEL_STALE_MS, TERMINAL, WORKFLOW_INLINE_RUN_TAG, RUN_ERROR_ISSUES_MAX, IN_FLIGHT, n, STEP_ERROR_DETAIL_KEYS, STEP_ERROR_DETAIL_MAX_BYTES, DETAIL_MAX_DEPTH, DETAIL_MAX_ITEMS, MAX_HOLIDAYS, MAX_WALK_DAYS, HHMM, YMD, MS_PER_MIN, MS_PER_DAY, MON_FRI, supportedTz, fmtCache, WEEKDAYS, JSON_PATCH_OPS, JSON_PATCH_MAX_OPS, JSON_PATCH_MAX_VALUE_BYTES, JSON_PATCH_MAX_TOTAL_BYTES, SEGMENT_RE, WORKFLOW_SCHEDULE_TYPES, WORKFLOW_SCHEDULE_SHAPE_ISSUE, WORKFLOW_SCHEDULE_SHAPES_HINT, WORKFLOW_SCHEDULE_RUN_AS, isObject, WORKFLOW_ENV_OVERLAY_MAX_KEYS, WORKFLOW_ENV_OVERLAY_MAX_VALUE_BYTES, WORKFLOW_ENV_TEMPLATE_SECRET_KEY_RE, isEnvRef, looksLikeEmbeddedJson, ZERO, isRecord2;
|
|
6055
6331
|
var init_dist2 = __esm({
|
|
6056
6332
|
"../workflow-graph/dist/index.mjs"() {
|
|
6057
6333
|
"use strict";
|
|
@@ -6156,6 +6432,27 @@ var init_dist2 = __esm({
|
|
|
6156
6432
|
}), "fromKnowledge");
|
|
6157
6433
|
SideEffectsSchema = z4.enum(WORKFLOW_SIDE_EFFECTS);
|
|
6158
6434
|
JobResourcesSchema = z4.enum(WORKFLOW_JOB_RESOURCES);
|
|
6435
|
+
WORKFLOW_MODEL_TEMPLATE_ROOT = "initData";
|
|
6436
|
+
WORKFLOW_MODEL_TEMPLATE_RE = /^\$\{\s*initData\.([A-Za-z0-9_.\-[\]]+)\s*(?:\|([^}]*))?\}$/;
|
|
6437
|
+
PATH_SEGMENT_RE = /^[A-Za-z0-9_-]+(?:\[(?:0|[1-9]\d*)\])*$/;
|
|
6438
|
+
__name(looksLikeModelTemplate, "looksLikeModelTemplate");
|
|
6439
|
+
__name4(looksLikeModelTemplate, "looksLikeModelTemplate");
|
|
6440
|
+
__name(parseModelTemplate, "parseModelTemplate");
|
|
6441
|
+
__name4(parseModelTemplate, "parseModelTemplate");
|
|
6442
|
+
__name(modelTemplateInvalidMessage, "modelTemplateInvalidMessage");
|
|
6443
|
+
__name4(modelTemplateInvalidMessage, "modelTemplateInvalidMessage");
|
|
6444
|
+
__name(modelTemplateDefaultRequiredMessage, "modelTemplateDefaultRequiredMessage");
|
|
6445
|
+
__name4(modelTemplateDefaultRequiredMessage, "modelTemplateDefaultRequiredMessage");
|
|
6446
|
+
__name(staticModelPin, "staticModelPin");
|
|
6447
|
+
__name4(staticModelPin, "staticModelPin");
|
|
6448
|
+
__name(readPath, "readPath");
|
|
6449
|
+
__name4(readPath, "readPath");
|
|
6450
|
+
__name(renderModelTemplate, "renderModelTemplate");
|
|
6451
|
+
__name4(renderModelTemplate, "renderModelTemplate");
|
|
6452
|
+
__name(modelTemplateUnboundMessage, "modelTemplateUnboundMessage");
|
|
6453
|
+
__name4(modelTemplateUnboundMessage, "modelTemplateUnboundMessage");
|
|
6454
|
+
__name(modelTemplateInputNotObjectMessage, "modelTemplateInputNotObjectMessage");
|
|
6455
|
+
__name4(modelTemplateInputNotObjectMessage, "modelTemplateInputNotObjectMessage");
|
|
6159
6456
|
APPROVER_SPEC_MAX_USERS = 20;
|
|
6160
6457
|
ESCALATION_MAX_HOPS = 3;
|
|
6161
6458
|
TemplateBindingSchema = z22.object({
|
|
@@ -6662,7 +6959,16 @@ var init_dist2 = __esm({
|
|
|
6662
6959
|
"secretName",
|
|
6663
6960
|
"executionId",
|
|
6664
6961
|
"credentialsExecutionId",
|
|
6665
|
-
"expired"
|
|
6962
|
+
"expired",
|
|
6963
|
+
// Run-input-bound model pins (the Principal Engineer stage models): the Job tier's `MODEL_ERROR` refusals name the
|
|
6964
|
+
// pin they judged (`requested`), the declared harness, the provider the classifier read and the precedence leg the
|
|
6965
|
+
// pin came from (`source`: initData / default / node / env / org / stamp), and `provider_unsupported`'s fleet
|
|
6966
|
+
// (`allowed`, the LUA_WF_JOB_PROVIDERS list) — the members the PR body promises.
|
|
6967
|
+
"requested",
|
|
6968
|
+
"harness",
|
|
6969
|
+
"provider",
|
|
6970
|
+
"source",
|
|
6971
|
+
"allowed"
|
|
6666
6972
|
];
|
|
6667
6973
|
STEP_ERROR_DETAIL_MAX_BYTES = 8 * 1024;
|
|
6668
6974
|
DETAIL_MAX_DEPTH = 4;
|
|
@@ -6819,6 +7125,12 @@ var init_dist2 = __esm({
|
|
|
6819
7125
|
__name4(inheritTargets, "inheritTargets");
|
|
6820
7126
|
__name(needsInheritedWorkspace, "needsInheritedWorkspace");
|
|
6821
7127
|
__name4(needsInheritedWorkspace, "needsInheritedWorkspace");
|
|
7128
|
+
__name(armEntry2, "armEntry2");
|
|
7129
|
+
__name4(armEntry2, "armEntry");
|
|
7130
|
+
__name(entryHasJobTier, "entryHasJobTier");
|
|
7131
|
+
__name4(entryHasJobTier, "entryHasJobTier");
|
|
7132
|
+
__name(graphHasJobTierStep, "graphHasJobTierStep");
|
|
7133
|
+
__name4(graphHasJobTierStep, "graphHasJobTierStep");
|
|
6822
7134
|
}
|
|
6823
7135
|
});
|
|
6824
7136
|
|
|
@@ -15794,8 +16106,11 @@ var User = {
|
|
|
15794
16106
|
},
|
|
15795
16107
|
/**
|
|
15796
16108
|
* PRO-1208 (B7) — push an approve/redirect/fix card to YOUR OWN inbox.
|
|
15797
|
-
* Capped
|
|
15798
|
-
*
|
|
16109
|
+
* Capped per kind at 500/day per agent per end-user by default
|
|
16110
|
+
* (`LUA_INBOX_AGENT_DEPOSIT_DAILY_CAP`); `priority: 'urgent'` is limited to
|
|
16111
|
+
* 5/day by default (`LUA_INBOX_URGENT_PUSH_DAILY_CAP`) and lands demoted to
|
|
16112
|
+
* `high` when over budget — never dropped. Same-`key` pushes revise in place.
|
|
16113
|
+
* Cap-hit resolves to `{outcome: 'capped'}` — never throws.
|
|
15799
16114
|
*
|
|
15800
16115
|
* @example
|
|
15801
16116
|
* const receipt = await User.Inbox.push({
|