pi-extensible-workflows 2.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -11
- package/dist/src/agent-execution.d.ts +4 -94
- package/dist/src/agent-execution.js +34 -208
- package/dist/src/budget.d.ts +38 -0
- package/dist/src/budget.js +160 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +60 -8
- package/dist/src/doctor-cleanup.d.ts +41 -0
- package/dist/src/doctor-cleanup.js +597 -0
- package/dist/src/doctor.d.ts +7 -2
- package/dist/src/doctor.js +127 -22
- package/dist/src/execution.d.ts +17 -0
- package/dist/src/execution.js +630 -0
- package/dist/src/host.d.ts +101 -0
- package/dist/src/host.js +3084 -0
- package/dist/src/index.d.ts +13 -634
- package/dist/src/index.js +10 -4432
- package/dist/src/persistence.d.ts +9 -19
- package/dist/src/persistence.js +175 -61
- package/dist/src/registry.d.ts +43 -0
- package/dist/src/registry.js +279 -0
- package/dist/src/session-inspector.js +5 -3
- package/dist/src/types.d.ts +692 -0
- package/dist/src/types.js +27 -0
- package/dist/src/utils.d.ts +32 -0
- package/dist/src/utils.js +168 -0
- package/dist/src/validation.d.ts +28 -0
- package/dist/src/validation.js +832 -0
- package/package.json +3 -2
- package/skills/pi-extensible-workflows/SKILL.md +69 -34
- package/src/agent-execution.ts +37 -189
- package/src/budget.ts +75 -0
- package/src/cli.ts +47 -7
- package/src/doctor-cleanup.ts +337 -0
- package/src/doctor.ts +117 -24
- package/src/execution.ts +540 -0
- package/src/host.ts +2598 -0
- package/src/index.ts +14 -3856
- package/src/persistence.ts +122 -37
- package/src/registry.ts +240 -0
- package/src/session-inspector.ts +5 -3
- package/src/types.ts +158 -0
- package/src/utils.ts +142 -0
- package/src/validation.ts +688 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const RUN_STATES = ["queued", "running", "pausing", "paused", "awaiting_input", "completed", "failed", "stopped", "interrupted", "budget_exhausted"];
|
|
2
|
+
export const AGENT_STATES = ["queued", "running", "waiting_for_child", "paused", "retrying", "completed", "failed", "cancelled"];
|
|
3
|
+
export const WORKFLOW_CALL_KINDS = ["agent", "parallel", "pipeline", "checkpoint", "phase", "withWorktree", "shell"];
|
|
4
|
+
export const WORKFLOW_RUN_STARTED_EVENT = "workflow:run-started";
|
|
5
|
+
export const WORKFLOW_RUN_RESUMED_EVENT = "workflow:run-resumed";
|
|
6
|
+
export const WORKFLOW_RUN_STATE_CHANGED_EVENT = "workflow:run-state-changed";
|
|
7
|
+
export const WORKFLOW_RUN_COMPLETED_EVENT = "workflow:run-completed";
|
|
8
|
+
export const WORKFLOW_RUN_FAILED_EVENT = "workflow:run-failed";
|
|
9
|
+
export const WORKFLOW_AGENT_STATE_CHANGED_EVENT = "workflow:agent-state-changed";
|
|
10
|
+
export const WORKFLOW_PHASE_CHANGED_EVENT = "workflow:phase-changed";
|
|
11
|
+
export const WORKFLOW_CHECKPOINT_STATE_CHANGED_EVENT = "workflow:checkpoint-state-changed";
|
|
12
|
+
export const WORKFLOW_BUDGET_EVENT = "workflow:budget-event";
|
|
13
|
+
export const WORKFLOW_WORKTREE_CREATED_EVENT = "workflow:worktree-created";
|
|
14
|
+
export const ERROR_CODES = [
|
|
15
|
+
"CONFIG_ERROR", "INVALID_SETTINGS", "INVALID_SYNTAX", "INVALID_METADATA", "DUPLICATE_NAME", "INVALID_SCHEMA", "UNKNOWN_MODEL", "UNKNOWN_TOOL", "UNKNOWN_AGENT_TYPE",
|
|
16
|
+
"RUN_OWNED", "REGISTRY_FROZEN", "GLOBAL_COLLISION", "MISSING_WORKFLOW", "RPC_LIMIT_EXCEEDED", "SHELL_FAILED", "AGENT_TIMEOUT", "AGENT_FAILED", "RESULT_INVALID",
|
|
17
|
+
"CANCELLED", "WORKER_UNRESPONSIVE", "WORKTREE_FAILED", "RESUME_INCOMPATIBLE", "BUDGET_EXHAUSTED", "INTERNAL_ERROR",
|
|
18
|
+
];
|
|
19
|
+
export const LAUNCH_SNAPSHOT_IDENTITY_VERSION = 5;
|
|
20
|
+
export class WorkflowError extends Error {
|
|
21
|
+
code;
|
|
22
|
+
constructor(code, message) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.code = code;
|
|
25
|
+
this.name = "WorkflowError";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { WorkflowError, type AgentResourceExclusions, type JsonValue, type ModelSpec, type WorkflowErrorCode } from "./types.js";
|
|
2
|
+
export declare function object(value: unknown): value is Record<string, unknown>;
|
|
3
|
+
export { object as isObject };
|
|
4
|
+
export declare function jsonValue(value: unknown, seen?: Set<object>): value is JsonValue;
|
|
5
|
+
export declare function jsonObject(value: unknown): value is Record<string, JsonValue>;
|
|
6
|
+
export declare function positiveInteger(value: unknown): value is number;
|
|
7
|
+
export declare function deepFreeze<T>(value: T): T;
|
|
8
|
+
export declare function errorText(error: unknown): string;
|
|
9
|
+
export declare function errorCode(error: unknown): WorkflowErrorCode | undefined;
|
|
10
|
+
export declare function markWorkflowAuthored(error: WorkflowError, authored?: boolean): WorkflowError;
|
|
11
|
+
export declare function isWorkflowAuthored(error: unknown): boolean;
|
|
12
|
+
export declare function asWorkflowError(error: unknown): WorkflowError;
|
|
13
|
+
export declare function fail(code: WorkflowErrorCode, message: string): never;
|
|
14
|
+
export declare function parseThinking(value: unknown): ModelSpec["thinking"] | undefined;
|
|
15
|
+
export declare function parseModelReference(value: string): ModelSpec;
|
|
16
|
+
export declare function annotateModelAliasError(error: unknown, name: string): unknown;
|
|
17
|
+
export declare function modelAliasErrorName(error: unknown): string | undefined;
|
|
18
|
+
export declare function modelAliasName(value: string, aliases: Readonly<Record<string, string>>): string | undefined;
|
|
19
|
+
export declare function validateModelAliases(value: unknown, settingsPath?: string): Readonly<Record<string, string>>;
|
|
20
|
+
export declare function unknownModel(value: string, target: string | undefined, settingsPath?: string): never;
|
|
21
|
+
export declare function resolveModelReference(value: string, aliases?: Readonly<Record<string, string>>, knownModels?: ReadonlySet<string>, settingsPath?: string): ModelSpec;
|
|
22
|
+
export declare function modelCapability(value: string | ModelSpec, aliases?: Readonly<Record<string, string>>, knownModels?: ReadonlySet<string>, settingsPath?: string): string;
|
|
23
|
+
export declare function aliasDrift(previous: Readonly<Record<string, string>>, current: Readonly<Record<string, string>>): string[];
|
|
24
|
+
export declare function validateResourcePattern(pattern: string): void;
|
|
25
|
+
export declare function resourcePatternMatches(resource: string, pattern: string): boolean;
|
|
26
|
+
export declare function disabledResources(patterns: readonly string[], resources: readonly string[]): string[];
|
|
27
|
+
export declare function unmatchedResourcePatterns(patterns: readonly string[], resources: readonly string[]): string[];
|
|
28
|
+
export declare function mergeAgentResourceExclusions(...values: (AgentResourceExclusions | undefined)[]): AgentResourceExclusions;
|
|
29
|
+
export declare function createLaunchSnapshot(input: Omit<import("./types.js").LaunchSnapshot, "identityVersion"> & {
|
|
30
|
+
identityVersion?: number;
|
|
31
|
+
}): Readonly<import("./types.js").LaunchSnapshot>;
|
|
32
|
+
export declare function loadLaunchSnapshot(input: import("./types.js").LaunchSnapshot): Readonly<import("./types.js").LaunchSnapshot>;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { ERROR_CODES, LAUNCH_SNAPSHOT_IDENTITY_VERSION, WorkflowError } from "./types.js";
|
|
2
|
+
import { Minimatch } from "minimatch";
|
|
3
|
+
export function object(value) { return typeof value === "object" && value !== null && !Array.isArray(value); }
|
|
4
|
+
export { object as isObject };
|
|
5
|
+
export function jsonValue(value, seen = new Set()) {
|
|
6
|
+
if (value === null || typeof value === "boolean" || typeof value === "string")
|
|
7
|
+
return true;
|
|
8
|
+
if (typeof value === "number")
|
|
9
|
+
return Number.isFinite(value);
|
|
10
|
+
if (typeof value !== "object" || seen.has(value))
|
|
11
|
+
return false;
|
|
12
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null)
|
|
13
|
+
return false;
|
|
14
|
+
const keys = Reflect.ownKeys(value);
|
|
15
|
+
if (keys.some((key) => typeof key !== "string"))
|
|
16
|
+
return false;
|
|
17
|
+
seen.add(value);
|
|
18
|
+
const valid = (Array.isArray(value) ? Array.from(value) : keys.map((key) => value[key])).every((item) => jsonValue(item, seen));
|
|
19
|
+
seen.delete(value);
|
|
20
|
+
return valid;
|
|
21
|
+
}
|
|
22
|
+
export function jsonObject(value) { return jsonValue(value) && object(value); }
|
|
23
|
+
export function positiveInteger(value) { return Number.isInteger(value) && value > 0; }
|
|
24
|
+
export function deepFreeze(value) {
|
|
25
|
+
if (typeof value === "object" && value !== null && !Object.isFrozen(value)) {
|
|
26
|
+
Object.freeze(value);
|
|
27
|
+
for (const child of Object.values(value))
|
|
28
|
+
deepFreeze(child);
|
|
29
|
+
}
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
export function errorText(error) { return error && typeof error === "object" && typeof error.message === "string" ? error.message : error instanceof Error ? error.message : String(error); }
|
|
33
|
+
export function errorCode(error) {
|
|
34
|
+
if (error instanceof WorkflowError)
|
|
35
|
+
return ERROR_CODES.includes(error.code) ? error.code : undefined;
|
|
36
|
+
if (!error || typeof error !== "object")
|
|
37
|
+
return undefined;
|
|
38
|
+
const code = error.code;
|
|
39
|
+
return typeof code === "string" && ERROR_CODES.includes(code) ? code : undefined;
|
|
40
|
+
}
|
|
41
|
+
const WORKFLOW_AUTHORED_ERROR = Symbol("workflowAuthoredError");
|
|
42
|
+
export function markWorkflowAuthored(error, authored = false) {
|
|
43
|
+
if (authored)
|
|
44
|
+
Object.defineProperty(error, WORKFLOW_AUTHORED_ERROR, { value: true });
|
|
45
|
+
return error;
|
|
46
|
+
}
|
|
47
|
+
export function isWorkflowAuthored(error) { return Boolean(error && typeof error === "object" && WORKFLOW_AUTHORED_ERROR in error); }
|
|
48
|
+
export function asWorkflowError(error) {
|
|
49
|
+
const code = errorCode(error);
|
|
50
|
+
return markWorkflowAuthored(error instanceof WorkflowError && code ? error : new WorkflowError(code ?? "INTERNAL_ERROR", errorText(error)), isWorkflowAuthored(error) || !code);
|
|
51
|
+
}
|
|
52
|
+
export function fail(code, message) { throw new WorkflowError(code, message); }
|
|
53
|
+
const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
54
|
+
const MODEL_ALIAS_NAME = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
55
|
+
export function parseThinking(value) { return typeof value === "string" && THINKING_LEVELS.includes(value) ? value : undefined; }
|
|
56
|
+
export function parseModelReference(value) {
|
|
57
|
+
const match = /^([^/:\s]+)\/([^:\s]+)(?::([^:\s]+))?$/.exec(value);
|
|
58
|
+
if (!match?.[1] || !match[2])
|
|
59
|
+
fail("UNKNOWN_MODEL", `Invalid model spec: ${value}`);
|
|
60
|
+
const thinking = match[3];
|
|
61
|
+
if (thinking && !THINKING_LEVELS.includes(thinking))
|
|
62
|
+
fail("UNKNOWN_MODEL", `Invalid thinking level: ${thinking}`);
|
|
63
|
+
return { provider: match[1], model: match[2], ...(thinking ? { thinking: thinking } : {}) };
|
|
64
|
+
}
|
|
65
|
+
const MODEL_ALIAS_ERROR_NAME = Symbol("modelAliasErrorName");
|
|
66
|
+
function aliasError(message, settingsPath, name) {
|
|
67
|
+
const error = new WorkflowError("CONFIG_ERROR", `${message} (settings: ${settingsPath})`);
|
|
68
|
+
if (name)
|
|
69
|
+
Object.defineProperty(error, MODEL_ALIAS_ERROR_NAME, { value: name, configurable: true });
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
export function annotateModelAliasError(error, name) {
|
|
73
|
+
if (error instanceof WorkflowError)
|
|
74
|
+
Object.defineProperty(error, MODEL_ALIAS_ERROR_NAME, { value: name, configurable: true });
|
|
75
|
+
return error;
|
|
76
|
+
}
|
|
77
|
+
export function modelAliasErrorName(error) {
|
|
78
|
+
return error instanceof WorkflowError ? error[MODEL_ALIAS_ERROR_NAME] : undefined;
|
|
79
|
+
}
|
|
80
|
+
export function modelAliasName(value, aliases) {
|
|
81
|
+
const name = /^([^/:\s]+)(?::[^:\s]+)?$/.exec(value)?.[1];
|
|
82
|
+
return name && Object.prototype.hasOwnProperty.call(aliases, name) ? name : undefined;
|
|
83
|
+
}
|
|
84
|
+
export function validateModelAliases(value, settingsPath = "workflow settings") {
|
|
85
|
+
if (!object(value))
|
|
86
|
+
aliasError("modelAliases must be an object", settingsPath);
|
|
87
|
+
const aliases = {};
|
|
88
|
+
for (const [name, target] of Object.entries(value)) {
|
|
89
|
+
if (!MODEL_ALIAS_NAME.test(name))
|
|
90
|
+
aliasError(`Invalid model alias name: ${name}`, settingsPath, name);
|
|
91
|
+
if (typeof target !== "string" || !target.trim())
|
|
92
|
+
aliasError(`Invalid model alias target for ${name}`, settingsPath, name);
|
|
93
|
+
aliases[name] = target;
|
|
94
|
+
}
|
|
95
|
+
for (const name of Object.keys(aliases)) {
|
|
96
|
+
try {
|
|
97
|
+
resolveModelReference(name, aliases);
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
aliasError(`Invalid model alias target for ${name}: ${errorText(error)}`, settingsPath, name);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return Object.freeze(aliases);
|
|
104
|
+
}
|
|
105
|
+
export function unknownModel(value, target, settingsPath) {
|
|
106
|
+
const resolved = target ? ` resolved to ${target}` : "";
|
|
107
|
+
const path = settingsPath ? ` (settings: ${settingsPath})` : "";
|
|
108
|
+
fail("UNKNOWN_MODEL", `Unknown model${target ? " alias" : ""} ${value}${resolved}${path}`);
|
|
109
|
+
}
|
|
110
|
+
export function resolveModelReference(value, aliases = {}, knownModels, settingsPath) {
|
|
111
|
+
const resolveReference = (reference, chain) => {
|
|
112
|
+
if (reference.includes("/"))
|
|
113
|
+
return parseModelReference(reference);
|
|
114
|
+
const match = /^([^:\s]+)(?::([^:\s]+))?$/.exec(reference);
|
|
115
|
+
const thinking = match?.[2];
|
|
116
|
+
if (!match?.[1] || thinking && !THINKING_LEVELS.includes(thinking))
|
|
117
|
+
unknownModel(reference, undefined, settingsPath);
|
|
118
|
+
const alias = modelAliasName(reference, aliases);
|
|
119
|
+
if (alias) {
|
|
120
|
+
if (chain.includes(alias))
|
|
121
|
+
fail("UNKNOWN_MODEL", `Circular model alias: ${[...chain, alias].join(" -> ")}${settingsPath ? ` (settings: ${settingsPath})` : ""}`);
|
|
122
|
+
const parsed = resolveReference(aliases[alias], [...chain, alias]);
|
|
123
|
+
return thinking ? { ...parsed, thinking: thinking } : parsed;
|
|
124
|
+
}
|
|
125
|
+
const candidates = [...(knownModels ?? [])].filter((model) => model.slice(model.indexOf("/") + 1) === match[1]);
|
|
126
|
+
if (candidates.length === 1) {
|
|
127
|
+
const parsed = parseModelReference(candidates[0]);
|
|
128
|
+
return thinking ? { ...parsed, thinking: thinking } : parsed;
|
|
129
|
+
}
|
|
130
|
+
unknownModel(reference, undefined, settingsPath);
|
|
131
|
+
};
|
|
132
|
+
return resolveReference(value, []);
|
|
133
|
+
}
|
|
134
|
+
export function modelCapability(value, aliases, knownModels, settingsPath) {
|
|
135
|
+
const parsed = typeof value === "string" ? resolveModelReference(value, aliases, knownModels, settingsPath) : value;
|
|
136
|
+
return `${parsed.provider}/${parsed.model}`;
|
|
137
|
+
}
|
|
138
|
+
export function aliasDrift(previous, current) {
|
|
139
|
+
return [...new Set([...Object.keys(previous), ...Object.keys(current)])].sort().flatMap((name) => previous[name] === current[name] ? [] : [`${name}: ${previous[name] ?? "(missing)"} -> ${current[name] ?? "(missing)"}`]);
|
|
140
|
+
}
|
|
141
|
+
const RESOURCE_PATTERN_OPTIONS = { dot: true, nonegate: true, nocomment: true };
|
|
142
|
+
function resourcePatternBody(pattern) { return pattern.startsWith("!") ? pattern.slice(1) : pattern; }
|
|
143
|
+
function resourcePatternPath(value) { return value.replaceAll("\\", "/"); }
|
|
144
|
+
export function validateResourcePattern(pattern) {
|
|
145
|
+
const body = resourcePatternBody(pattern);
|
|
146
|
+
if (!body)
|
|
147
|
+
throw new Error(`Empty minimatch pattern ${JSON.stringify(pattern)}`);
|
|
148
|
+
const matcher = new Minimatch(resourcePatternPath(body), RESOURCE_PATTERN_OPTIONS);
|
|
149
|
+
if (matcher.makeRe() === false)
|
|
150
|
+
throw new Error(`Invalid minimatch pattern ${JSON.stringify(pattern)}`);
|
|
151
|
+
}
|
|
152
|
+
export function resourcePatternMatches(resource, pattern) { return new Minimatch(resourcePatternPath(resourcePatternBody(pattern)), RESOURCE_PATTERN_OPTIONS).match(resourcePatternPath(resource)); }
|
|
153
|
+
export function disabledResources(patterns, resources) {
|
|
154
|
+
const disabled = new Set();
|
|
155
|
+
for (const resource of resources) {
|
|
156
|
+
let excluded = false;
|
|
157
|
+
for (const pattern of patterns)
|
|
158
|
+
if (resourcePatternMatches(resource, pattern))
|
|
159
|
+
excluded = !pattern.startsWith("!");
|
|
160
|
+
if (excluded)
|
|
161
|
+
disabled.add(resource);
|
|
162
|
+
}
|
|
163
|
+
return [...disabled];
|
|
164
|
+
}
|
|
165
|
+
export function unmatchedResourcePatterns(patterns, resources) { return patterns.filter((pattern) => !resources.some((resource) => resourcePatternMatches(resource, pattern))); }
|
|
166
|
+
export function mergeAgentResourceExclusions(...values) { return { skills: values.flatMap((value) => value?.skills ?? []), extensions: values.flatMap((value) => value?.extensions ?? []) }; }
|
|
167
|
+
export function createLaunchSnapshot(input) { return deepFreeze(structuredClone({ ...input, launchKind: input.launchKind ?? (input.functionName ? "function" : "inline"), identityVersion: input.identityVersion ?? LAUNCH_SNAPSHOT_IDENTITY_VERSION })); }
|
|
168
|
+
export function loadLaunchSnapshot(input) { return deepFreeze(structuredClone(input)); }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AgentDefinition, AgentResourcePolicy, CheckpointInput, JsonSchema, JsonValue, LaunchSnapshot, PreflightCapabilities, PreflightResult, ShellOptions, StaticWorkflowCall, ValidatedWorkflowLaunch, WorkflowMetadata, WorkflowRoleDirectoryRegistration, WorkflowSettings, WorkflowSettingsOverrides, WorkflowSettingsResolution, WorkflowValidationContext, WorkflowValidationParameters } from "./types.js";
|
|
2
|
+
import type { WorkflowRegistryApi } from "./registry.js";
|
|
3
|
+
export declare const DEFAULT_SETTINGS: Readonly<WorkflowSettings>;
|
|
4
|
+
export declare function validateCheckpoint(value: unknown): CheckpointInput;
|
|
5
|
+
export declare function workflowSettingsPath(agentDir?: string): string;
|
|
6
|
+
export declare function workflowProjectSettingsPath(cwd: string): string;
|
|
7
|
+
export declare function loadSettings(path?: string): Readonly<WorkflowSettings>;
|
|
8
|
+
export declare function loadSettingsOverrides(path: string): Readonly<WorkflowSettingsOverrides>;
|
|
9
|
+
export declare function resolveWorkflowSettings(cwd: string, projectTrusted: boolean, globalSettingsPath?: string): WorkflowSettingsResolution;
|
|
10
|
+
export declare function validateModelAliasAvailability(aliases: Readonly<Record<string, string>>, names: readonly string[], availableModels: ReadonlySet<string>, knownModels: ReadonlySet<string>, settingsPath?: string): void;
|
|
11
|
+
export declare function resolveAgentResourcePolicy(cwd: string, projectTrusted: boolean, globalSettingsPath?: string): AgentResourcePolicy;
|
|
12
|
+
export declare function saveModelAliases(path?: string, aliases?: Readonly<Record<string, string>>): void;
|
|
13
|
+
export declare function parseRoleMarkdown(content: string, strict?: boolean, rolePath?: string): AgentDefinition;
|
|
14
|
+
export declare function workflowRoleDirectories(agentDir?: string): readonly string[];
|
|
15
|
+
export type WorkflowRoleDirectoryInput = string | WorkflowRoleDirectoryRegistration;
|
|
16
|
+
export declare function loadAgentDefinitions(cwd: string, agentDir?: string, projectTrusted?: boolean, extensionRoleDirectories?: readonly WorkflowRoleDirectoryInput[]): Readonly<Record<string, AgentDefinition>>;
|
|
17
|
+
export declare function instrumentWorkflow(script: string): string;
|
|
18
|
+
export declare function workflowPrompt(template: string, values: Readonly<Record<string, JsonValue>>): string;
|
|
19
|
+
export declare function validateSchema(schema: unknown, at?: string): asserts schema is JsonSchema;
|
|
20
|
+
export declare function validateAgentOptions(value: unknown): Readonly<Record<string, JsonValue>>;
|
|
21
|
+
export declare function validateShellOptions(value: unknown): ShellOptions;
|
|
22
|
+
export declare function validateShellCommand(value: unknown): string;
|
|
23
|
+
export declare function inspectWorkflowScript(script: string): StaticWorkflowCall[];
|
|
24
|
+
export declare function preflight(script: string, capabilities: PreflightCapabilities, schemas?: readonly unknown[], metadata?: WorkflowMetadata, compatibility?: boolean): PreflightResult;
|
|
25
|
+
export declare function validateWorkflowLaunch(params: WorkflowValidationParameters, context: WorkflowValidationContext, registry?: WorkflowRegistryApi): ValidatedWorkflowLaunch;
|
|
26
|
+
export declare function validateWorkflowLaunchWithRegistry(params: WorkflowValidationParameters, context: WorkflowValidationContext, registry?: WorkflowRegistryApi): ValidatedWorkflowLaunch;
|
|
27
|
+
export declare function launchScriptForSnapshot(snapshot: Readonly<LaunchSnapshot>, registry: WorkflowRegistryApi): string;
|
|
28
|
+
export { createLaunchSnapshot, loadLaunchSnapshot } from "./utils.js";
|