@skastr0/prism-linux-x64 0.4.3 → 0.4.6
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/bin/prism
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skastr0/prism-linux-x64",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Prism standalone CLI binary for Linux x64.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@opencode-ai/plugin": "^1.15.13",
|
|
21
|
-
"@skastr0/prism-sdk": "0.4.
|
|
21
|
+
"@skastr0/prism-sdk": "0.4.6",
|
|
22
22
|
"effect": "^3.21.1",
|
|
23
23
|
"typescript": "^5.8.3",
|
|
24
24
|
"zod": "4.4.3"
|
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
export declare class WorkflowRunTimeoutError extends Error {
|
|
2
|
-
readonly limitMs: number;
|
|
3
|
-
readonly name = "WorkflowRunTimeoutError";
|
|
4
|
-
constructor(limitMs: number);
|
|
5
|
-
}
|
|
6
|
-
export declare class WorkflowTaskNoProgressError extends Error {
|
|
7
|
-
readonly taskId: string;
|
|
8
|
-
readonly limitMs: number;
|
|
9
|
-
readonly name = "WorkflowTaskNoProgressError";
|
|
10
|
-
constructor(taskId: string, limitMs: number);
|
|
11
|
-
}
|
|
12
|
-
export declare class WorkflowFanoutExceededError extends Error {
|
|
13
|
-
readonly limit: number;
|
|
14
|
-
readonly observed: number;
|
|
15
|
-
readonly name = "WorkflowFanoutExceededError";
|
|
16
|
-
constructor(limit: number, observed: number);
|
|
17
|
-
}
|
|
18
|
-
export declare class WorkflowCostExceededError extends Error {
|
|
19
|
-
readonly limitUsd: number;
|
|
20
|
-
readonly observedUsd: number;
|
|
21
|
-
readonly name = "WorkflowCostExceededError";
|
|
22
|
-
constructor(limitUsd: number, observedUsd: number);
|
|
23
|
-
}
|
|
24
|
-
export declare class WorkflowCostUnavailableError extends Error {
|
|
25
|
-
readonly limitUsd: number;
|
|
26
|
-
readonly name = "WorkflowCostUnavailableError";
|
|
27
|
-
constructor(limitUsd: number);
|
|
28
|
-
}
|
|
29
|
-
export declare class WorkflowPromptLimitError extends Error {
|
|
30
|
-
readonly taskId: string;
|
|
31
|
-
readonly limitBytes: number;
|
|
32
|
-
readonly observedBytes: number;
|
|
33
|
-
readonly name = "WorkflowPromptLimitError";
|
|
34
|
-
constructor(taskId: string, limitBytes: number, observedBytes: number);
|
|
35
|
-
}
|
|
36
1
|
/** Errors surfaced by {@link WorkflowRuntime.runTask} and dynamic workflow runs. */
|
|
37
2
|
export declare class WorkflowTaskDecodeError extends Error {
|
|
38
3
|
readonly taskId: string;
|
|
@@ -60,4 +25,4 @@ export declare class WorkflowUnsupportedHarnessError extends Error {
|
|
|
60
25
|
readonly name = "WorkflowUnsupportedHarnessError";
|
|
61
26
|
constructor(harness: string, validHarnesses: ReadonlyArray<string>);
|
|
62
27
|
}
|
|
63
|
-
export type WorkflowRuntimeError = WorkflowBunRuntimeUnavailableError | WorkflowUnsupportedHarnessError | WorkflowTaskDecodeError | WorkflowTaskEscalatedError | WorkflowRunStoppedError |
|
|
28
|
+
export type WorkflowRuntimeError = WorkflowBunRuntimeUnavailableError | WorkflowUnsupportedHarnessError | WorkflowTaskDecodeError | WorkflowTaskEscalatedError | WorkflowRunStoppedError | Error;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnyWorkflowTask, type WorkflowRuntimeOptions } from "./workflows.js";
|
|
1
|
+
import { type AnyWorkflowTask, type WorkflowSessionPersistence, type WorkflowRuntimeOptions } from "./workflows.js";
|
|
2
2
|
/**
|
|
3
3
|
* `cacheKey` and `promptHash` AND together in the cache primary key
|
|
4
4
|
* (workflow-store.ts) — `cacheKey` never substitutes for `promptHash`, and
|
|
@@ -45,6 +45,7 @@ export interface WorkflowRunTaskSnapshot {
|
|
|
45
45
|
readonly worker?: string;
|
|
46
46
|
readonly model?: string;
|
|
47
47
|
readonly profile?: string;
|
|
48
|
+
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
48
49
|
};
|
|
49
50
|
readonly outputSchema?: unknown;
|
|
50
51
|
readonly finishCriteria: ReadonlyArray<string>;
|
|
@@ -24,11 +24,11 @@ export interface WorkflowRunResult {
|
|
|
24
24
|
readonly tasks: ReadonlyArray<WorkflowRunTaskResult>;
|
|
25
25
|
readonly output?: unknown;
|
|
26
26
|
}
|
|
27
|
-
export { WorkflowRunStoppedError, WorkflowTaskDecodeError, WorkflowTaskEscalatedError,
|
|
27
|
+
export { WorkflowRunStoppedError, WorkflowTaskDecodeError, WorkflowTaskEscalatedError, type WorkflowRuntimeError, } from "./workflow-errors.js";
|
|
28
28
|
export type WorkflowTaskRepairMode = "native-continuation" | "fresh-executor-invocation" | "none";
|
|
29
29
|
export type WorkflowTaskProgressSource = "executor" | "worker-stdout" | "worker-stderr";
|
|
30
30
|
export type WorkflowTaskProgressReporter = (source?: WorkflowTaskProgressSource) => void;
|
|
31
|
-
export type WorkflowTaskRepairFallbackReason = "adapter-does-not-support-continuation" | "executor-does-not-advertise-continuation" | "missing-session-id";
|
|
31
|
+
export type WorkflowTaskRepairFallbackReason = "adapter-does-not-support-continuation" | "ephemeral-session" | "executor-does-not-advertise-continuation" | "missing-session-id";
|
|
32
32
|
interface WorkflowTaskRepairContextBase {
|
|
33
33
|
readonly attempt: number;
|
|
34
34
|
readonly criterion: string;
|
|
@@ -59,18 +59,17 @@ export type WorkflowTaskRepairLoopOption<Worker extends string> = Worker extends
|
|
|
59
59
|
readonly repair?: never;
|
|
60
60
|
};
|
|
61
61
|
export type WorkflowTaskExecutor = (task: AnyWorkflowTask, context?: WorkflowTaskExecutionContext) => Promise<unknown | WorkflowTaskExecution>;
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Internal scheduler pacing, not a budget: excess live tasks queue and run as
|
|
64
|
+
* slots free, so this never fails a task. Sized to the machine because each
|
|
65
|
+
* live task is a full harness process. Deliberately not an option — nothing
|
|
66
|
+
* about a workflow's intent belongs in this number.
|
|
67
|
+
*/
|
|
68
|
+
export declare const WORKFLOW_TASK_CONCURRENCY: number;
|
|
64
69
|
export declare const runWorkflow: (workflow: AnyWorkflowDefinition, options: {
|
|
65
70
|
readonly executeTask: WorkflowTaskExecutor;
|
|
66
71
|
readonly store?: WorkflowStore;
|
|
67
72
|
readonly mockOutput?: boolean;
|
|
68
|
-
readonly maxConcurrentTasks?: number;
|
|
69
|
-
readonly maxWallMs?: number;
|
|
70
|
-
readonly taskNoProgressMs?: number;
|
|
71
|
-
readonly maxTasks?: number;
|
|
72
|
-
readonly maxCostUsd?: number;
|
|
73
|
-
readonly maxPromptBytes?: number;
|
|
74
73
|
readonly runId?: string;
|
|
75
74
|
readonly runtimeOptions?: WorkflowRuntimeOptions;
|
|
76
75
|
readonly abortSignal?: AbortSignal;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkflowSessionPersistence } from "./workflows.js";
|
|
1
2
|
export declare const DEFAULT_WORKFLOW_WORKER_STDERR_EXCERPT_BYTES = 4096;
|
|
2
3
|
export interface WorkflowWorkerStderrMetadata {
|
|
3
4
|
readonly stderrBytes?: number;
|
|
@@ -6,6 +7,7 @@ export interface WorkflowWorkerStderrMetadata {
|
|
|
6
7
|
readonly stderrTruncated?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const summarizeWorkflowWorkerStderr: (stderr: string, maxExcerptBytes?: number) => WorkflowWorkerStderrMetadata;
|
|
10
|
+
export declare const summarizeWorkflowWorkerStderrForSession: (stderr: string, sessionPersistence: WorkflowSessionPersistence, maxExcerptBytes?: number) => WorkflowWorkerStderrMetadata;
|
|
9
11
|
/**
|
|
10
12
|
* Forensics attached to a worker adapter's thrown error on the failure path (OBS-006).
|
|
11
13
|
* On success, every adapter already returns `{ adapter, ..., sessionId, ...stderr summary }`
|
|
@@ -20,5 +22,6 @@ export declare const workflowWorkerFailureMetadata: (input: {
|
|
|
20
22
|
readonly adapter: string;
|
|
21
23
|
readonly stderr: string;
|
|
22
24
|
readonly sessionId?: string;
|
|
25
|
+
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
23
26
|
readonly maxExcerptBytes?: number;
|
|
24
27
|
}) => Record<string, unknown>;
|
package/types/workflows.d.ts
CHANGED
|
@@ -61,6 +61,12 @@ export type WorkflowFinishCriterionError = Error;
|
|
|
61
61
|
export type WorkflowWorkerId = "amp-code" | "antigravity-cli" | "claude-code" | "codex-cli" | "devin" | "grok" | "hermes" | "kimi-code" | "opencode" | "omp";
|
|
62
62
|
export type WorkflowPermissionMode = "legacy" | "permissive" | "restricted" | "interactive" | "sandbox-read-only" | "sandbox-workspace-write" | "full-access";
|
|
63
63
|
export type AntigravityWorkflowPermissionMode = Extract<WorkflowPermissionMode, "legacy" | "permissive" | "full-access">;
|
|
64
|
+
export declare const WORKFLOW_SESSION_PERSISTENCE_WORKERS: readonly ["claude-code", "codex-cli", "omp"];
|
|
65
|
+
export type WorkflowSessionPersistenceWorkerId = typeof WORKFLOW_SESSION_PERSISTENCE_WORKERS[number];
|
|
66
|
+
export type WorkflowSessionPersistence = "persistent" | "ephemeral";
|
|
67
|
+
/** @deprecated Use WorkflowSessionPersistence. */
|
|
68
|
+
export type CodexWorkflowSessionPersistence = WorkflowSessionPersistence;
|
|
69
|
+
export declare const workflowWorkerSupportsSessionPersistence: (worker: unknown) => worker is WorkflowSessionPersistenceWorkerId;
|
|
64
70
|
/**
|
|
65
71
|
* Per-task override for the executor-level transient-failure retry (WFE-009). Only
|
|
66
72
|
* classified-transient executor failures (process/idle timeout, unclassified non-zero
|
|
@@ -77,15 +83,20 @@ type WorkflowTaskWorkerOptionsBase = {
|
|
|
77
83
|
readonly modelResolver?: (models: WorkflowResolvedModelTarget) => string;
|
|
78
84
|
readonly profile?: string;
|
|
79
85
|
readonly restrictedTools?: ReadonlyArray<string>;
|
|
80
|
-
readonly processTimeoutMs?: number;
|
|
81
86
|
readonly retry?: WorkflowTaskWorkerRetryOptions;
|
|
82
87
|
};
|
|
83
88
|
export type WorkflowTaskWorkerOptions = (WorkflowTaskWorkerOptionsBase & {
|
|
84
|
-
readonly worker?: Exclude<WorkflowWorkerId, "antigravity-cli">;
|
|
89
|
+
readonly worker?: Exclude<WorkflowWorkerId, "antigravity-cli" | WorkflowSessionPersistenceWorkerId>;
|
|
85
90
|
readonly permission?: WorkflowPermissionMode;
|
|
91
|
+
readonly sessionPersistence?: never;
|
|
92
|
+
}) | (WorkflowTaskWorkerOptionsBase & {
|
|
93
|
+
readonly worker: WorkflowSessionPersistenceWorkerId;
|
|
94
|
+
readonly permission?: WorkflowPermissionMode;
|
|
95
|
+
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
86
96
|
}) | (WorkflowTaskWorkerOptionsBase & {
|
|
87
97
|
readonly worker: "antigravity-cli";
|
|
88
98
|
readonly permission?: AntigravityWorkflowPermissionMode;
|
|
99
|
+
readonly sessionPersistence?: never;
|
|
89
100
|
});
|
|
90
101
|
export type WorkflowResolvedModelEntry = Readonly<{
|
|
91
102
|
readonly model: string;
|
|
@@ -191,6 +202,8 @@ export interface WorkflowTask<Id extends string = string, Agent extends Workflow
|
|
|
191
202
|
}
|
|
192
203
|
export type AnyWorkflowTask = WorkflowTask<string, WorkflowAgentRef, WorkflowOutputSchema>;
|
|
193
204
|
export type WorkflowTaskOutput<Task extends AnyWorkflowTask> = Schema.Schema.Type<Task["output"]>;
|
|
205
|
+
export declare const resolveWorkflowTaskSessionPersistence: (task: Pick<AnyWorkflowTask, "worker">, effectiveWorker?: string | undefined) => WorkflowSessionPersistence | undefined;
|
|
206
|
+
export declare const assertWorkflowTaskSessionPersistence: (task: AnyWorkflowTask) => void;
|
|
194
207
|
export declare const isWorkflowAgentRef: (value: unknown) => value is WorkflowAgentRef;
|
|
195
208
|
export declare const isWorkflowTask: (value: unknown) => value is AnyWorkflowTask;
|
|
196
209
|
export interface WorkflowDefinition<Name extends string, Tasks extends ReadonlyArray<AnyWorkflowTask>> {
|