@skastr0/prism-linux-x64 0.2.2 → 0.3.1
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 +0 -0
- package/package.json +2 -1
- package/types/content-hash.d.ts +14 -0
- package/types/index.d.ts +1 -9
- package/types/lowerer-capabilities.d.ts +34 -0
- package/types/workflow-bun-runtime.d.ts +21 -0
- package/types/workflow-errors.d.ts +9 -2
- package/types/workflow-harness-detection.d.ts +85 -0
- package/types/workflow-identity.d.ts +48 -0
- package/types/workflow-runner.d.ts +4 -1
- package/types/workflow-runtime.d.ts +24 -0
- package/types/workflow-session.d.ts +0 -1
- package/types/workflow-store.d.ts +16 -51
- package/types/workflow-worker-contract.d.ts +2 -1
- package/types/workflows.d.ts +27 -0
- package/types/compile/authoring-runtime.d.ts +0 -27
- package/types/compile/bundle-utils.d.ts +0 -16
- package/types/compile/cache.d.ts +0 -49
- package/types/compile/compile-manifest.d.ts +0 -48
- package/types/compile/compose.d.ts +0 -35
- package/types/compile/errors.d.ts +0 -124
- package/types/compile/generated-plugin.d.ts +0 -10
- package/types/compile/load.d.ts +0 -52
- package/types/compile/paths.d.ts +0 -2
- package/types/compile/protocol-tools.d.ts +0 -47
- package/types/compile/refs.d.ts +0 -7
- package/types/compile/registry.d.ts +0 -32
- package/types/compile/resolve.d.ts +0 -63
- package/types/compile/runtime-deps.d.ts +0 -6
- package/types/compile/sources.d.ts +0 -2782
- package/types/errors.d.ts +0 -116
- package/types/harnesses.d.ts +0 -18
- package/types/manifest.d.ts +0 -106
- package/types/prism-home.d.ts +0 -26
- package/types/services/prism-env.d.ts +0 -45
- package/types/source-selection.d.ts +0 -38
- package/types/state/lock.d.ts +0 -14
- package/types/workflow-amp-worker.d.ts +0 -28
- package/types/workflow-antigravity-pty.d.ts +0 -22
- package/types/workflow-antigravity-worker.d.ts +0 -75
- package/types/workflow-claude-worker.d.ts +0 -32
- package/types/workflow-codex-worker.d.ts +0 -24
- package/types/workflow-grok-worker.d.ts +0 -27
- package/types/workflow-hermes-worker.d.ts +0 -22
- package/types/workflow-kimi-worker.d.ts +0 -24
- package/types/workflow-loader.d.ts +0 -64
- package/types/workflow-opencode-worker.d.ts +0 -22
- package/types/workflow-output-schema.d.ts +0 -7
- package/types/workflow-permissions.d.ts +0 -10
- package/types/workflow-tsconfig.d.ts +0 -98
- package/types/workflow-worker-process.d.ts +0 -24
- package/types/workflow-workers.d.ts +0 -43
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowDefinition } from "./workflows.js";
|
|
2
|
-
export interface WorkflowTaskSummary {
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly agent: {
|
|
5
|
-
readonly plugin: string;
|
|
6
|
-
readonly name: string;
|
|
7
|
-
};
|
|
8
|
-
readonly cacheKey?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface WorkflowValidationSummary {
|
|
11
|
-
readonly path: string;
|
|
12
|
-
readonly name: string;
|
|
13
|
-
readonly tasks: ReadonlyArray<WorkflowTaskSummary>;
|
|
14
|
-
readonly dynamic: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface WorkflowTypecheckDiagnostic {
|
|
17
|
-
readonly file: string;
|
|
18
|
-
readonly line: number | null;
|
|
19
|
-
readonly character: number | null;
|
|
20
|
-
readonly message: string;
|
|
21
|
-
}
|
|
22
|
-
export declare class WorkflowLoadError extends Error {
|
|
23
|
-
readonly name = "WorkflowLoadError";
|
|
24
|
-
}
|
|
25
|
-
export declare class WorkflowTypecheckError extends Error {
|
|
26
|
-
readonly filePath: string;
|
|
27
|
-
readonly diagnostics: ReadonlyArray<WorkflowTypecheckDiagnostic>;
|
|
28
|
-
readonly name = "WorkflowTypecheckError";
|
|
29
|
-
constructor(filePath: string, diagnostics: ReadonlyArray<WorkflowTypecheckDiagnostic>);
|
|
30
|
-
}
|
|
31
|
-
export declare const isWorkflowDefinition: (value: unknown) => value is AnyWorkflowDefinition;
|
|
32
|
-
export declare const workflowSummary: (path: string, workflow: AnyWorkflowDefinition) => WorkflowValidationSummary;
|
|
33
|
-
/**
|
|
34
|
-
* Check whether the generated refs are fresh relative to the current compile
|
|
35
|
-
* manifest. Emits a warning to stderr when drift is detected. The check is
|
|
36
|
-
* best-effort: missing refs or missing manifest produce no warning (the refs
|
|
37
|
-
* file may simply not exist yet).
|
|
38
|
-
*/
|
|
39
|
-
export declare const checkWorkflowRefsFreshness: (options: {
|
|
40
|
-
readonly prismHome?: string;
|
|
41
|
-
}) => Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Run an in-process TypeScript typecheck on a workflow file using the
|
|
44
|
-
* binary-embedded TypeScript and the resolved type environment.
|
|
45
|
-
*
|
|
46
|
-
* Behaviour:
|
|
47
|
-
* - No resolvable type environment at all (never compiled, no shipped types):
|
|
48
|
-
* warn to stderr and proceed — the runtime loader works regardless.
|
|
49
|
-
* - Module-not-found / no-types-configured diagnostics: warn and proceed.
|
|
50
|
-
* - A genuine type error inside the workflow (e.g. an unknown agent ref like
|
|
51
|
-
* `agents.forge.doesNotExist`): throw WorkflowTypecheckError. This is the
|
|
52
|
-
* moat.
|
|
53
|
-
*/
|
|
54
|
-
export declare const typecheckWorkflowFile: (filePath: string, options?: {
|
|
55
|
-
readonly prismHome?: string;
|
|
56
|
-
}) => void;
|
|
57
|
-
export declare const loadWorkflowFile: (filePath: string, options?: {
|
|
58
|
-
readonly prismHome?: string;
|
|
59
|
-
readonly skipTypecheck?: boolean;
|
|
60
|
-
}) => Promise<AnyWorkflowDefinition>;
|
|
61
|
-
export declare const validateWorkflowFile: (filePath: string, options?: {
|
|
62
|
-
readonly prismHome?: string;
|
|
63
|
-
readonly skipTypecheck?: boolean;
|
|
64
|
-
}) => Promise<WorkflowValidationSummary>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
export type OpenCodeWorkflowWorkerOptions = {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly bin?: string;
|
|
6
|
-
readonly model?: string;
|
|
7
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
8
|
-
readonly processTimeoutMs?: number;
|
|
9
|
-
readonly abortSignal?: AbortSignal;
|
|
10
|
-
} & WorkflowTaskRepairLoopOption<"opencode">;
|
|
11
|
-
export declare class OpenCodeWorkflowWorkerError extends Error {
|
|
12
|
-
readonly name = "OpenCodeWorkflowWorkerError";
|
|
13
|
-
}
|
|
14
|
-
export declare const buildOpenCodeArgs: (input: {
|
|
15
|
-
readonly cwd: string;
|
|
16
|
-
readonly agent: string;
|
|
17
|
-
readonly model?: string;
|
|
18
|
-
readonly prompt: string;
|
|
19
|
-
readonly sessionId?: string;
|
|
20
|
-
readonly permission?: WorkflowPermissionMode;
|
|
21
|
-
}) => ReadonlyArray<string>;
|
|
22
|
-
export declare const runOpenCodeWorkflowTask: (task: AnyWorkflowTask, options: OpenCodeWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
export type WorkflowJsonSchema = Record<string, unknown>;
|
|
3
|
-
export declare class WorkflowOutputSchemaError extends Error {
|
|
4
|
-
readonly name = "WorkflowOutputSchemaError";
|
|
5
|
-
}
|
|
6
|
-
export declare const workflowJsonSchemaFromEffectSchema: (schema: Schema.Schema.AnyNoContext) => WorkflowJsonSchema;
|
|
7
|
-
export declare const tryWorkflowJsonSchemaFromEffectSchema: (schema: Schema.Schema.AnyNoContext) => WorkflowJsonSchema | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
export declare const WORKFLOW_PERMISSION_MODES: readonly ["legacy", "permissive", "restricted", "interactive", "sandbox-read-only", "sandbox-workspace-write", "full-access"];
|
|
3
|
-
export declare const isWorkflowPermissionMode: (value: string) => value is WorkflowPermissionMode;
|
|
4
|
-
export declare const assertNeverWorkflowPermissionMode: (worker: string, mode: never) => never;
|
|
5
|
-
export declare class WorkflowPermissionError extends Error {
|
|
6
|
-
readonly worker: string;
|
|
7
|
-
readonly mode: string;
|
|
8
|
-
readonly name = "WorkflowPermissionError";
|
|
9
|
-
constructor(worker: string, mode: string, message: string);
|
|
10
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate the Prism-owned authoring tsconfig for workflow .ts files.
|
|
3
|
-
*
|
|
4
|
-
* The generated tsconfig maps the three virtual specifiers a workflow author
|
|
5
|
-
* uses to their shipped type declarations:
|
|
6
|
-
*
|
|
7
|
-
* "prism" → <platform-package>/types/index.d.ts (the emitted prism.d.ts)
|
|
8
|
-
* "prism/refs" → ~/.prism/state/projects/<key>/generated/agents.ts (per-project refs)
|
|
9
|
-
* "effect" → <platform-package>/node_modules/effect/dist/dts/index.d.ts
|
|
10
|
-
*
|
|
11
|
-
* Resolution strategy:
|
|
12
|
-
*
|
|
13
|
-
* When the Prism binary is installed, the platform package sits beside the
|
|
14
|
-
* binary: `dirname(dirname(process.execPath))`. During development (source
|
|
15
|
-
* checkout) the shipped declarations live inside the matching
|
|
16
|
-
* packages/npm/prism-<platform>/types directory (populated by build:npm), with
|
|
17
|
-
* the repo's node_modules/effect and dist/dts-tmp/ as further fallbacks — so
|
|
18
|
-
* the type surface resolves without an install.
|
|
19
|
-
*
|
|
20
|
-
* The resolved type dirs (resolveWorkflowTypeDirs) and path builder
|
|
21
|
-
* (buildWorkflowPaths) are shared with the in-process typecheck in
|
|
22
|
-
* workflow-loader, which constructs compilerOptions in-memory rather than
|
|
23
|
-
* relying solely on the on-disk tsconfig.
|
|
24
|
-
*
|
|
25
|
-
* The generated tsconfig is written to prismHome/state/tsconfig.workflow.json.
|
|
26
|
-
* This file is Prism-owned and must never be committed to the user's project.
|
|
27
|
-
*/
|
|
28
|
-
export interface WorkflowTypeDirs {
|
|
29
|
-
/** Directory holding the shipped prism declarations (types/index.d.ts). */
|
|
30
|
-
readonly prismTypesDir: string | undefined;
|
|
31
|
-
/** Directory holding the effect declarations (dist/dts/index.d.ts). */
|
|
32
|
-
readonly effectDtsDir: string | undefined;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Resolve the prism and effect declaration directories for the running
|
|
36
|
-
* environment (installed binary or source checkout). Either may be undefined
|
|
37
|
-
* when the corresponding type surface cannot be located.
|
|
38
|
-
*/
|
|
39
|
-
export declare const resolveWorkflowTypeDirs: () => WorkflowTypeDirs;
|
|
40
|
-
/** Generated workflow ref modules under ~/.prism/state/projects/<key>/generated/. */
|
|
41
|
-
export declare const WORKFLOW_REFS_MODULES: readonly ["agents", "models", "skills", "traits", "orbits", "tools"];
|
|
42
|
-
export type WorkflowRefsModule = (typeof WORKFLOW_REFS_MODULES)[number];
|
|
43
|
-
/**
|
|
44
|
-
* Build path mappings for every generated `prism/refs` module. `prism/refs`
|
|
45
|
-
* itself resolves to `agents.ts` because that is the primary import surface.
|
|
46
|
-
*/
|
|
47
|
-
export declare const buildWorkflowRefsPaths: (refsDir: string) => Record<string, string[]>;
|
|
48
|
-
/**
|
|
49
|
-
* Build the `compilerOptions.paths` map for typechecking a workflow file from
|
|
50
|
-
* the resolved type dirs and (optionally) the project-keyed generated refs.
|
|
51
|
-
*
|
|
52
|
-
* Entries are only emitted when the underlying declaration exists, so callers
|
|
53
|
-
* can detect a missing type environment (empty/partial paths) and warn+proceed
|
|
54
|
-
* instead of pointing a specifier at a nonexistent file.
|
|
55
|
-
*/
|
|
56
|
-
export declare const buildWorkflowPaths: (options: {
|
|
57
|
-
readonly typeDirs: WorkflowTypeDirs;
|
|
58
|
-
/** Absolute path to the generated refs directory (~/.../generated/). */
|
|
59
|
-
readonly refsDir?: string;
|
|
60
|
-
}) => Record<string, string[]>;
|
|
61
|
-
export interface WorkflowTsconfigOptions {
|
|
62
|
-
/**
|
|
63
|
-
* Prism home directory. Defaults to ~/.prism via resolvePrismHome().
|
|
64
|
-
* The generated tsconfig is written to prismHome/state/tsconfig.workflow.json.
|
|
65
|
-
*/
|
|
66
|
-
readonly prismHome: string;
|
|
67
|
-
/**
|
|
68
|
-
* Absolute path to the project's generated refs directory
|
|
69
|
-
* (~/.prism/state/projects/<key>/generated/).
|
|
70
|
-
* Used to wire "prism/refs" paths.
|
|
71
|
-
* If omitted, "prism/refs" paths entry is omitted from the tsconfig.
|
|
72
|
-
*/
|
|
73
|
-
readonly refsDir?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Absolute path to the directory containing the user's workflow .ts files.
|
|
76
|
-
* Added to tsconfig `include` so the IDE and tsc pick them up automatically.
|
|
77
|
-
*/
|
|
78
|
-
readonly workflowDir?: string;
|
|
79
|
-
}
|
|
80
|
-
export interface GeneratedWorkflowTsconfig {
|
|
81
|
-
/** Absolute path where the tsconfig was written. */
|
|
82
|
-
readonly path: string;
|
|
83
|
-
/** Absolute path to the prism types directory (types/index.d.ts). */
|
|
84
|
-
readonly prismTypesDir: string | undefined;
|
|
85
|
-
/** Absolute path to the effect dts directory (dist/dts/index.d.ts). */
|
|
86
|
-
readonly effectDtsDir: string | undefined;
|
|
87
|
-
}
|
|
88
|
-
/** The filename for the generated workflow authoring tsconfig. */
|
|
89
|
-
export declare const WORKFLOW_TSCONFIG_FILENAME = "tsconfig.workflow.json";
|
|
90
|
-
/**
|
|
91
|
-
* Generate and write the Prism workflow-authoring tsconfig.
|
|
92
|
-
*
|
|
93
|
-
* Returns the path where the tsconfig was written, plus the resolved type
|
|
94
|
-
* directories for caller inspection or further wiring.
|
|
95
|
-
*/
|
|
96
|
-
export declare const generateWorkflowTsconfig: (options: WorkflowTsconfigOptions) => Promise<GeneratedWorkflowTsconfig>;
|
|
97
|
-
/** Returns the expected tsconfig path given a prismHome directory. */
|
|
98
|
-
export declare const workflowTsconfigPath: (prismHome: string) => string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface WorkflowWorkerProcessOptions {
|
|
2
|
-
readonly command: string;
|
|
3
|
-
readonly args: ReadonlyArray<string>;
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly abortSignal?: AbortSignal;
|
|
6
|
-
readonly processTimeoutMs?: number;
|
|
7
|
-
readonly env?: Record<string, string>;
|
|
8
|
-
readonly earlyExitPatterns?: ReadonlyArray<{
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly pattern: RegExp;
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
export interface WorkflowWorkerProcessResult {
|
|
14
|
-
readonly exitCode: number | null;
|
|
15
|
-
readonly stdout: string;
|
|
16
|
-
readonly stderr: string;
|
|
17
|
-
readonly durationMs: number;
|
|
18
|
-
readonly timedOut: boolean;
|
|
19
|
-
readonly aborted: boolean;
|
|
20
|
-
readonly earlyExit?: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const parsePositiveInteger: (value: string | undefined) => number | undefined;
|
|
23
|
-
export declare const workflowWorkerProcessExcerpt: (stdout: string, stderr: string) => string;
|
|
24
|
-
export declare const runWorkflowWorkerProcess: (options: WorkflowWorkerProcessOptions) => Promise<WorkflowWorkerProcessResult>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type AnyWorkflowTask, type WorkflowPermissionMode, type WorkflowWorkerId } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskExecutionContext, WorkflowTaskExecutionContextWithoutRepair, WorkflowTaskExecutor } from "./workflow-runner.js";
|
|
3
|
-
import { type WorkflowRepairLoopContinuationCapability, type WorkflowRepairLoopContinuationCapabilityForWorker } from "./workflow-session.js";
|
|
4
|
-
export { WorkflowPermissionError } from "./workflow-permissions.js";
|
|
5
|
-
export interface WorkflowWorkerAdapterOptionsBase {
|
|
6
|
-
readonly cwd: string;
|
|
7
|
-
readonly model?: string;
|
|
8
|
-
readonly profile?: string;
|
|
9
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
10
|
-
readonly restrictedTools?: readonly string[];
|
|
11
|
-
readonly processTimeoutMs?: number;
|
|
12
|
-
readonly abortSignal?: AbortSignal;
|
|
13
|
-
}
|
|
14
|
-
export type WorkflowWorkerAdapterOptionsForCapability<Capability extends WorkflowRepairLoopContinuationCapability> = WorkflowWorkerAdapterOptionsBase & (Capability extends "stable-session-repair-loop" ? {
|
|
15
|
-
readonly context?: WorkflowTaskExecutionContext;
|
|
16
|
-
} : {
|
|
17
|
-
readonly context?: WorkflowTaskExecutionContextWithoutRepair;
|
|
18
|
-
});
|
|
19
|
-
export type WorkflowWorkerAdapterOptions<Worker extends WorkflowWorkerId = WorkflowWorkerId> = WorkflowWorkerAdapterOptionsForCapability<WorkflowRepairLoopContinuationCapabilityForWorker<Worker>>;
|
|
20
|
-
export interface WorkflowWorkerAdapter<Worker extends WorkflowWorkerId = WorkflowWorkerId> {
|
|
21
|
-
readonly id: Worker;
|
|
22
|
-
readonly runTask: (task: AnyWorkflowTask, options: WorkflowWorkerAdapterOptions<Worker>) => Promise<WorkflowTaskExecution>;
|
|
23
|
-
}
|
|
24
|
-
export declare class UnsupportedWorkflowWorkerError extends Error {
|
|
25
|
-
readonly worker: string;
|
|
26
|
-
readonly supportedWorkers: ReadonlyArray<string>;
|
|
27
|
-
readonly name = "UnsupportedWorkflowWorkerError";
|
|
28
|
-
constructor(worker: string, supportedWorkers: ReadonlyArray<string>);
|
|
29
|
-
}
|
|
30
|
-
export declare class WorkflowWorkerContinuationError extends Error {
|
|
31
|
-
readonly name = "WorkflowWorkerContinuationError";
|
|
32
|
-
}
|
|
33
|
-
export declare const supportedWorkflowWorkers: () => ReadonlyArray<string>;
|
|
34
|
-
export declare function getWorkflowWorkerAdapter<Worker extends WorkflowWorkerId>(worker: Worker): WorkflowWorkerAdapter<Worker>;
|
|
35
|
-
export declare function getWorkflowWorkerAdapter(worker: string): WorkflowWorkerAdapter;
|
|
36
|
-
export declare const resolveWorkflowTaskPermission: (task: AnyWorkflowTask, fallbackPermission?: WorkflowPermissionMode) => WorkflowPermissionMode;
|
|
37
|
-
export declare const createWorkflowWorkerExecutor: (input: {
|
|
38
|
-
readonly worker?: string;
|
|
39
|
-
readonly cwd: string;
|
|
40
|
-
readonly model?: string;
|
|
41
|
-
readonly fallbackPermission?: WorkflowPermissionMode;
|
|
42
|
-
readonly taskTimeoutMs?: number;
|
|
43
|
-
}) => WorkflowTaskExecutor;
|