@skastr0/prism-linux-x64 0.7.1 → 0.8.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/bin/prism +2 -2
- package/package.json +2 -2
- package/types/amp-projects.d.ts +39 -0
- package/types/amp-runners.d.ts +71 -0
- package/types/ast-to-json-schema.d.ts +46 -0
- package/types/fs.d.ts +2 -2
- package/types/harness-types-discover.d.ts +34 -0
- package/types/harness-types.d.ts +12 -0
- package/types/index.d.ts +19 -1
- package/types/lowerer-capabilities.d.ts +85 -120
- package/types/types.d.ts +2 -13
- package/types/workflow-amp-remote-worker.d.ts +69 -0
- package/types/workflow-amp-worker.d.ts +89 -0
- package/types/workflow-antigravity-pty.d.ts +22 -0
- package/types/workflow-antigravity-worker.d.ts +84 -0
- package/types/workflow-bun-runtime.d.ts +2 -0
- package/types/workflow-claude-worker.d.ts +36 -0
- package/types/workflow-cli-command.d.ts +1 -0
- package/types/workflow-codex-worker.d.ts +36 -0
- package/types/workflow-cursor-worker.d.ts +24 -0
- package/types/workflow-devin-worker.d.ts +25 -0
- package/types/workflow-effort.d.ts +18 -0
- package/types/workflow-grok-worker.d.ts +32 -0
- package/types/workflow-hermes-worker.d.ts +28 -0
- package/types/workflow-identity.d.ts +1 -0
- package/types/workflow-kimi-effort.d.ts +17 -0
- package/types/workflow-kimi-worker.d.ts +27 -0
- package/types/workflow-omp-worker.d.ts +49 -0
- package/types/workflow-opencode-worker.d.ts +26 -0
- package/types/workflow-output-schema.d.ts +6 -0
- package/types/workflow-permissions.d.ts +10 -0
- package/types/workflow-process-guard.d.ts +28 -0
- package/types/workflow-session.d.ts +24 -14
- package/types/workflow-worker-process.d.ts +40 -0
- package/types/workflow-workers.d.ts +50 -0
- package/types/workflows.d.ts +111 -9
package/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Core types for prism - the unified plugin distribution system
|
|
3
3
|
*/
|
|
4
|
-
export type HarnessId = "claude-code" | "opencode" | "
|
|
4
|
+
export type HarnessId = "claude-code" | "opencode" | "hermes" | "codex-cli" | "antigravity-cli" | "kimi-code" | "amp-code" | "amp-orb" | "amp-runner" | "cursor" | "pi" | "omp" | "grok" | "devin";
|
|
5
5
|
export declare const HARNESS_SCOPES: readonly ["global", "project"];
|
|
6
6
|
export type HarnessScope = (typeof HARNESS_SCOPES)[number];
|
|
7
7
|
export interface HarnessConfig {
|
|
@@ -120,15 +120,6 @@ export interface CursorFrontmatter {
|
|
|
120
120
|
globs?: string[];
|
|
121
121
|
alwaysApply?: boolean;
|
|
122
122
|
}
|
|
123
|
-
export interface FactoryDroidFrontmatter {
|
|
124
|
-
description?: string;
|
|
125
|
-
model?: string | "inherit";
|
|
126
|
-
reasoningEffort?: "low" | "medium" | "high";
|
|
127
|
-
tools?: string | string[];
|
|
128
|
-
"user-invocable"?: boolean;
|
|
129
|
-
"disable-model-invocation"?: boolean;
|
|
130
|
-
"argument-hint"?: string;
|
|
131
|
-
}
|
|
132
123
|
export interface CodexCliFrontmatter {
|
|
133
124
|
description?: string;
|
|
134
125
|
model?: string;
|
|
@@ -139,16 +130,14 @@ export interface UnifiedFrontmatter {
|
|
|
139
130
|
description?: string;
|
|
140
131
|
"claude-code"?: ClaudeCodeFrontmatter;
|
|
141
132
|
opencode?: OpenCodeAgentFrontmatter;
|
|
142
|
-
opencode2?: OpenCodeAgentFrontmatter;
|
|
143
|
-
openclaw?: Record<string, unknown>;
|
|
144
133
|
hermes?: Record<string, unknown>;
|
|
145
134
|
"codex-cli"?: CodexCliFrontmatter;
|
|
146
135
|
"antigravity-cli"?: Record<string, unknown>;
|
|
147
136
|
"kimi-code"?: Record<string, unknown>;
|
|
148
137
|
"amp-code"?: Record<string, unknown>;
|
|
149
138
|
"amp-orb"?: Record<string, unknown>;
|
|
139
|
+
"amp-runner"?: Record<string, unknown>;
|
|
150
140
|
cursor?: CursorFrontmatter;
|
|
151
|
-
"factory-droid"?: FactoryDroidFrontmatter;
|
|
152
141
|
pi?: Record<string, unknown>;
|
|
153
142
|
omp?: Record<string, unknown>;
|
|
154
143
|
grok?: Record<string, unknown>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type AmpOrbSize, type AmpRemoteWorkflowWorkerId, type AmpThreadVisibility, type AnyWorkflowWorkerTask, type WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import { type AmpCatalogPinPlan } from "./workflow-amp-worker.js";
|
|
3
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
4
|
+
export interface AmpOrbTarget {
|
|
5
|
+
readonly worker: "amp-orb";
|
|
6
|
+
readonly project: string;
|
|
7
|
+
readonly size?: AmpOrbSize;
|
|
8
|
+
readonly visibility?: AmpThreadVisibility;
|
|
9
|
+
readonly labels?: ReadonlyArray<string>;
|
|
10
|
+
}
|
|
11
|
+
export interface AmpRunnerTarget {
|
|
12
|
+
readonly worker: "amp-runner";
|
|
13
|
+
readonly runnerId: string;
|
|
14
|
+
readonly runnerDir?: string;
|
|
15
|
+
readonly labels?: ReadonlyArray<string>;
|
|
16
|
+
}
|
|
17
|
+
export type AmpRemoteTarget = AmpOrbTarget | AmpRunnerTarget;
|
|
18
|
+
export type AmpRemoteWorkflowWorkerOptions<W extends AmpRemoteWorkflowWorkerId = AmpRemoteWorkflowWorkerId> = {
|
|
19
|
+
readonly cwd: string;
|
|
20
|
+
readonly bin?: string;
|
|
21
|
+
readonly model?: string;
|
|
22
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
23
|
+
readonly abortSignal?: AbortSignal;
|
|
24
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
25
|
+
} & WorkflowTaskRepairLoopOption<W>;
|
|
26
|
+
/** Remote executors accept only `legacy`: no per-invocation override reaches the remote amp process. */
|
|
27
|
+
export declare const assertAmpRemotePermission: (worker: AmpRemoteWorkflowWorkerId, mode: WorkflowPermissionMode) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Read the remote target from the task's own worker options. The DSL types make
|
|
30
|
+
* these fields required; this check covers untyped workflow files and a
|
|
31
|
+
* CLI-only `--worker amp-orb` fallback, which carries no target.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ampRemoteTargetOf: (worker: AmpRemoteWorkflowWorkerId, task: AnyWorkflowWorkerTask) => AmpRemoteTarget;
|
|
34
|
+
/**
|
|
35
|
+
* The Prism catalog-pin plugin is written under the local cwd. It exists for
|
|
36
|
+
* the remote executor only when a runner serves exactly that directory.
|
|
37
|
+
*/
|
|
38
|
+
export declare const resolveAmpRemotePinPlan: (input: {
|
|
39
|
+
readonly target: AmpRemoteTarget;
|
|
40
|
+
readonly cwd: string;
|
|
41
|
+
readonly mode?: string;
|
|
42
|
+
readonly catalogModel?: string;
|
|
43
|
+
readonly effort?: string;
|
|
44
|
+
}) => AmpCatalogPinPlan;
|
|
45
|
+
/** New orb thread, attached until the turn ends. */
|
|
46
|
+
export declare const buildAmpOrbArgs: (input: {
|
|
47
|
+
readonly target: AmpOrbTarget;
|
|
48
|
+
readonly prompt: string;
|
|
49
|
+
readonly title?: string;
|
|
50
|
+
readonly mode?: string;
|
|
51
|
+
}) => ReadonlyArray<string>;
|
|
52
|
+
/** New runner thread, attached until the turn ends. */
|
|
53
|
+
export declare const buildAmpRunnerArgs: (input: {
|
|
54
|
+
readonly target: AmpRunnerTarget;
|
|
55
|
+
readonly prompt: string;
|
|
56
|
+
readonly title?: string;
|
|
57
|
+
readonly mode?: string;
|
|
58
|
+
readonly pluginReadyTimeout?: boolean;
|
|
59
|
+
}) => ReadonlyArray<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Same-thread repair. `--orb-execute` sends the message to the thread's own
|
|
62
|
+
* remote executor (orb or runner); `--executor`/`--runner-dir` do not apply.
|
|
63
|
+
*/
|
|
64
|
+
export declare const buildAmpRemoteContinueArgs: (input: {
|
|
65
|
+
readonly sessionId: string;
|
|
66
|
+
readonly prompt: string;
|
|
67
|
+
}) => ReadonlyArray<string>;
|
|
68
|
+
export declare const runAmpOrbWorkflowTask: (task: AnyWorkflowWorkerTask, options: AmpRemoteWorkflowWorkerOptions<"amp-orb">) => Promise<WorkflowTaskExecution>;
|
|
69
|
+
export declare const runAmpRunnerWorkflowTask: (task: AnyWorkflowWorkerTask, options: AmpRemoteWorkflowWorkerOptions<"amp-runner">) => Promise<WorkflowTaskExecution>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { HarnessTypesSnapshot } from "./harness-types.js";
|
|
2
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
3
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
4
|
+
export declare const AMP_WORKFLOW_DIAL_MODES: readonly ["low", "medium", "high", "ultra"];
|
|
5
|
+
export type AmpWorkflowDialMode = (typeof AMP_WORKFLOW_DIAL_MODES)[number];
|
|
6
|
+
export declare const AMP_WORKFLOW_CATALOG_PIN_MODE = "prism-pin";
|
|
7
|
+
export declare const AMP_WORKFLOW_CATALOG_PIN_FILENAME = "prism-workflow-catalog-pin.ts";
|
|
8
|
+
export type AmpWorkflowWorkerOptions = {
|
|
9
|
+
readonly cwd: string;
|
|
10
|
+
readonly bin?: string;
|
|
11
|
+
readonly model?: string;
|
|
12
|
+
readonly catalogModel?: string;
|
|
13
|
+
readonly effort?: string;
|
|
14
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
15
|
+
readonly abortSignal?: AbortSignal;
|
|
16
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
17
|
+
} & WorkflowTaskRepairLoopOption<"amp-code">;
|
|
18
|
+
export declare class AmpWorkflowWorkerError extends Error {
|
|
19
|
+
readonly name = "AmpWorkflowWorkerError";
|
|
20
|
+
readonly metadata?: Record<string, unknown>;
|
|
21
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
22
|
+
}
|
|
23
|
+
export declare const assertAmpWorkflowMode: (mode: string | undefined) => string | undefined;
|
|
24
|
+
export declare const isAmpWorkflowDialMode: (mode: string | undefined) => mode is AmpWorkflowDialMode;
|
|
25
|
+
export type AmpCatalogPinPlan = {
|
|
26
|
+
readonly kind: "mode";
|
|
27
|
+
readonly mode?: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "pin";
|
|
30
|
+
readonly mode: typeof AMP_WORKFLOW_CATALOG_PIN_MODE;
|
|
31
|
+
readonly catalogModel?: string;
|
|
32
|
+
readonly effort?: string;
|
|
33
|
+
readonly extendsMode?: AmpWorkflowDialMode;
|
|
34
|
+
};
|
|
35
|
+
export declare const resolveAmpCatalogPinPlan: (input: {
|
|
36
|
+
readonly mode?: string;
|
|
37
|
+
readonly catalogModel?: string;
|
|
38
|
+
readonly effort?: string;
|
|
39
|
+
}) => AmpCatalogPinPlan;
|
|
40
|
+
export declare const ampCatalogPinPluginPath: (cwd: string) => string;
|
|
41
|
+
/** Reuse a project plugin mode that already pins this catalog slug (and effort, if set). */
|
|
42
|
+
export declare const findExistingAmpCatalogMode: (cwd: string, input: {
|
|
43
|
+
readonly catalogModel?: string;
|
|
44
|
+
readonly effort?: string;
|
|
45
|
+
}) => Promise<string | undefined>;
|
|
46
|
+
export declare const ampWorkerPins: (task: AnyWorkflowWorkerTask) => {
|
|
47
|
+
readonly catalogModel?: string;
|
|
48
|
+
readonly effort?: string;
|
|
49
|
+
};
|
|
50
|
+
/** Fail closed when a snapshot lists the catalog row and effort is not on that row. */
|
|
51
|
+
export declare const validateAmpCatalogPins: (task: AnyWorkflowWorkerTask, snapshot: HarnessTypesSnapshot | undefined) => string | undefined;
|
|
52
|
+
/** User-facing Amp pin fields. Never report the transport mode `prism-pin` as the model. */
|
|
53
|
+
export declare const ampWorkflowHonestMetadata: (input: {
|
|
54
|
+
readonly pin: AmpCatalogPinPlan;
|
|
55
|
+
readonly authoredModel?: string;
|
|
56
|
+
readonly catalogModel?: string;
|
|
57
|
+
readonly effort?: string;
|
|
58
|
+
}) => {
|
|
59
|
+
readonly model?: string;
|
|
60
|
+
readonly ampMode?: string;
|
|
61
|
+
readonly catalogModel?: string;
|
|
62
|
+
readonly effort?: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const renderAmpCatalogPinPlugin: (input: {
|
|
65
|
+
readonly catalogModel?: string;
|
|
66
|
+
readonly effort?: string;
|
|
67
|
+
readonly extendsMode?: AmpWorkflowDialMode;
|
|
68
|
+
}) => string;
|
|
69
|
+
export declare const prepareAmpCatalogPin: (cwd: string, plan: AmpCatalogPinPlan) => Promise<{
|
|
70
|
+
readonly cleanup: () => Promise<void>;
|
|
71
|
+
}>;
|
|
72
|
+
export declare const assertAmpPermission: (mode: WorkflowPermissionMode) => void;
|
|
73
|
+
export declare const buildAmpArgs: (input: {
|
|
74
|
+
readonly mode?: string;
|
|
75
|
+
readonly prompt: string;
|
|
76
|
+
readonly sessionId?: string;
|
|
77
|
+
readonly permission?: WorkflowPermissionMode;
|
|
78
|
+
/**
|
|
79
|
+
* Required for permissive/full-access. runAmpWorkflowTask supplies a temp
|
|
80
|
+
* settings file with amp.dangerouslyAllowAll enabled before invoking this.
|
|
81
|
+
*/
|
|
82
|
+
readonly settingsFile?: string;
|
|
83
|
+
/** Wait for the catalog-pin plugin to register before execute starts. */
|
|
84
|
+
readonly pluginReadyTimeout?: boolean;
|
|
85
|
+
}) => ReadonlyArray<string>;
|
|
86
|
+
export declare const parseAmpStreamJsonResult: (stdout: string) => string | undefined;
|
|
87
|
+
export declare const parseAmpStreamJsonError: (stdout: string) => string | undefined;
|
|
88
|
+
export declare const ampSessionId: (stdout: string, stderr: string) => string | undefined;
|
|
89
|
+
export declare const runAmpWorkflowTask: (task: AnyWorkflowWorkerTask, options: AmpWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type WorkflowWorkerProcessOptions, type WorkflowWorkerProcessResult } from "./workflow-worker-process.js";
|
|
2
|
+
/**
|
|
3
|
+
* Embedded Python PTY wrapper for spawning the Antigravity CLI (`agy`) with a
|
|
4
|
+
* controlling terminal. The upstream `agy --print` mode is known to drop or
|
|
5
|
+
* stall stdout when stdin is not a TTY; allocating a PTY works around the
|
|
6
|
+
* issue and also lets us reliably terminate the whole process group.
|
|
7
|
+
*
|
|
8
|
+
* The wrapper runs on Python 3, uses only stdlib modules, and is written to
|
|
9
|
+
* be compatible with both macOS and Linux.
|
|
10
|
+
*/
|
|
11
|
+
export declare const antigravityPtyWrapperScript: () => string;
|
|
12
|
+
export interface AntigravityPtyProcessOptions extends WorkflowWorkerProcessOptions {
|
|
13
|
+
/** Go-style duration string passed to `agy --print-timeout`. */
|
|
14
|
+
readonly printTimeout: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Run a command through the Python PTY wrapper with process-group cleanup.
|
|
18
|
+
*
|
|
19
|
+
* This is intentionally lower-level than `runWorkflowWorkerProcess` so the
|
|
20
|
+
* Antigravity worker can decide when the extra weight is justified.
|
|
21
|
+
*/
|
|
22
|
+
export declare const runAntigravityPtyProcess: (options: AntigravityPtyProcessOptions) => Promise<WorkflowWorkerProcessResult>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AntigravityWorkflowPermissionMode, AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
/**
|
|
4
|
+
* Environment-variable overrides for the Antigravity workflow worker:
|
|
5
|
+
*
|
|
6
|
+
* - PRISM_WORKFLOW_ANTIGRAVITY_BIN: path to the `agy` executable.
|
|
7
|
+
* - PRISM_WORKFLOW_ANTIGRAVITY_PROCESS_TIMEOUT_MS: outer watchdog before Prism kills `agy`.
|
|
8
|
+
* - PRISM_WORKFLOW_ANTIGRAVITY_PTY: set to "1" or "true" to force a Python PTY wrapper.
|
|
9
|
+
* Useful when `agy --print` drops stdout because stdin is not a TTY.
|
|
10
|
+
* - PRISM_WORKFLOW_ANTIGRAVITY_PTY_PYTHON: path to a Python 3 interpreter (default: `python3` on PATH).
|
|
11
|
+
* - PRISM_WORKFLOW_ANTIGRAVITY_RETRY_MAX_ATTEMPTS: retries on sentinel/empty output (default: 3).
|
|
12
|
+
* - PRISM_WORKFLOW_ANTIGRAVITY_RETRY_BACKOFF_MS: delay between retries (default: 2000).
|
|
13
|
+
*/
|
|
14
|
+
export type AntigravityWorkflowWorkerOptions = {
|
|
15
|
+
readonly cwd: string;
|
|
16
|
+
readonly bin?: string;
|
|
17
|
+
readonly model?: string;
|
|
18
|
+
readonly effort?: string;
|
|
19
|
+
readonly resolvedPermission: AntigravityWorkflowPermissionMode;
|
|
20
|
+
readonly abortSignal?: AbortSignal;
|
|
21
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
22
|
+
/** Override the default retry budget. Mostly useful in tests. */
|
|
23
|
+
readonly maxAttempts?: number;
|
|
24
|
+
/** Override the default retry backoff. Mostly useful in tests. */
|
|
25
|
+
readonly backoffMs?: number;
|
|
26
|
+
/** Disable the executable capability probe. Tests with minimal fake binaries only. */
|
|
27
|
+
readonly preflight?: boolean;
|
|
28
|
+
} & WorkflowTaskRepairLoopOption<"antigravity-cli">;
|
|
29
|
+
export declare class AntigravityWorkflowWorkerError extends Error {
|
|
30
|
+
readonly name = "AntigravityWorkflowWorkerError";
|
|
31
|
+
readonly metadata?: Record<string, unknown>;
|
|
32
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
33
|
+
}
|
|
34
|
+
export declare const DEFAULT_ANTIGRAVITY_MODEL = "Gemini 3.5 Flash (Medium)";
|
|
35
|
+
export type AgyConversationId = string & {
|
|
36
|
+
readonly __brand: "AgyConversationId";
|
|
37
|
+
};
|
|
38
|
+
type AgyValue<Kind extends string> = string & {
|
|
39
|
+
readonly __agyValue: Kind;
|
|
40
|
+
};
|
|
41
|
+
type AgyLogFile = AgyValue<"log-file">;
|
|
42
|
+
type AgyPrintTimeout = AgyValue<"print-timeout">;
|
|
43
|
+
type AgyWorkspaceDir = AgyValue<"workspace-dir">;
|
|
44
|
+
type AgyModel = AgyValue<"model">;
|
|
45
|
+
type AgyPrompt = AgyValue<"prompt">;
|
|
46
|
+
type AgyLogFileArgs = readonly ["--log-file", AgyLogFile];
|
|
47
|
+
type AgyConversationArgs = readonly ["--conversation", AgyConversationId];
|
|
48
|
+
type AgyPermissionArgs = readonly ["--dangerously-skip-permissions", "--sandbox"];
|
|
49
|
+
type AgyTimeoutArgs = readonly ["--print-timeout", AgyPrintTimeout];
|
|
50
|
+
type AgyWorkspaceArgs = readonly ["--add-dir", AgyWorkspaceDir];
|
|
51
|
+
type AgyModelArgs = readonly ["--model", AgyModel];
|
|
52
|
+
type AgyEffortArgs = readonly ["--effort", AgyValue<"effort">];
|
|
53
|
+
type AgyOptionalModelArgs = readonly [] | AgyModelArgs;
|
|
54
|
+
type AgyOptionalEffortArgs = readonly [] | AgyEffortArgs;
|
|
55
|
+
type AgyRequiredPrintArgs = readonly [
|
|
56
|
+
...AgyPermissionArgs,
|
|
57
|
+
...AgyTimeoutArgs,
|
|
58
|
+
...AgyWorkspaceArgs,
|
|
59
|
+
...AgyOptionalModelArgs,
|
|
60
|
+
...AgyOptionalEffortArgs,
|
|
61
|
+
"--print",
|
|
62
|
+
AgyPrompt
|
|
63
|
+
];
|
|
64
|
+
export type AgyForbiddenWorkflowFlag = "--continue" | "-c";
|
|
65
|
+
export type AgyPrintArgs = AgyRequiredPrintArgs | readonly [...AgyLogFileArgs, ...AgyRequiredPrintArgs] | readonly [...AgyConversationArgs, ...AgyRequiredPrintArgs] | readonly [...AgyLogFileArgs, ...AgyConversationArgs, ...AgyRequiredPrintArgs];
|
|
66
|
+
export declare const AGY_FORBIDDEN_WORKFLOW_FLAGS: Set<AgyForbiddenWorkflowFlag>;
|
|
67
|
+
export declare const assertAgyPrintArgsWorkflowSafe: (args: readonly string[]) => void;
|
|
68
|
+
export declare const assertAntigravityWorkflowCapabilities: (helpText: string) => void;
|
|
69
|
+
export declare const detectAgyPrintTimeout: (stdout: string, stderr: string) => boolean;
|
|
70
|
+
export declare const resolveAntigravityPermission: (mode: WorkflowPermissionMode) => AntigravityWorkflowPermissionMode;
|
|
71
|
+
export declare const buildAgyArgs: (input: {
|
|
72
|
+
readonly cwd: string;
|
|
73
|
+
readonly model?: string;
|
|
74
|
+
readonly effort?: string;
|
|
75
|
+
readonly permission?: AntigravityWorkflowPermissionMode;
|
|
76
|
+
readonly printTimeout: string;
|
|
77
|
+
readonly prompt: string;
|
|
78
|
+
readonly conversationId?: AgyConversationId;
|
|
79
|
+
readonly logFile?: string;
|
|
80
|
+
}) => AgyPrintArgs;
|
|
81
|
+
export declare const parseAgyConversationId: (value: string | undefined) => AgyConversationId | undefined;
|
|
82
|
+
export declare const extractAgyConversationId: (logText: string) => AgyConversationId | undefined;
|
|
83
|
+
export declare const runAntigravityWorkflowTask: (task: AnyWorkflowWorkerTask, options: AntigravityWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
84
|
+
export {};
|
|
@@ -36,4 +36,6 @@ export interface WorkflowBunRuntime {
|
|
|
36
36
|
spawn(options: WorkflowBunPipedSpawnOptions): WorkflowBunPipedSpawnedProcess;
|
|
37
37
|
}
|
|
38
38
|
export declare const workflowBunRuntime: (capability: string) => WorkflowBunRuntime;
|
|
39
|
+
/** Parse harness-owned TOML from the Bun-only workflow runtime boundary. */
|
|
40
|
+
export declare const parseWorkflowToml: (source: string, capability: string) => unknown;
|
|
39
41
|
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type AnyWorkflowWorkerTask, type WorkflowPermissionMode, type WorkflowSessionPersistence } from "./workflows.js";
|
|
2
|
+
import { type WorkflowJsonSchema } from "./workflow-output-schema.js";
|
|
3
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
4
|
+
export type ClaudeWorkflowWorkerOptions = {
|
|
5
|
+
readonly cwd: string;
|
|
6
|
+
readonly bin?: string;
|
|
7
|
+
readonly model?: string;
|
|
8
|
+
readonly effort?: string;
|
|
9
|
+
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
10
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
11
|
+
readonly restrictedTools?: readonly string[];
|
|
12
|
+
readonly abortSignal?: AbortSignal;
|
|
13
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
14
|
+
} & WorkflowTaskRepairLoopOption<"claude-code">;
|
|
15
|
+
export declare class ClaudeWorkflowWorkerError extends Error {
|
|
16
|
+
readonly name = "ClaudeWorkflowWorkerError";
|
|
17
|
+
readonly metadata?: Record<string, unknown>;
|
|
18
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
19
|
+
}
|
|
20
|
+
type ClaudeWorkflowSessionArgs = {
|
|
21
|
+
readonly sessionPersistence?: "persistent";
|
|
22
|
+
readonly resumeSessionId?: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly sessionPersistence: "ephemeral";
|
|
25
|
+
readonly resumeSessionId?: never;
|
|
26
|
+
};
|
|
27
|
+
export declare const buildClaudeArgs: (input: {
|
|
28
|
+
readonly model?: string;
|
|
29
|
+
readonly effort?: string;
|
|
30
|
+
readonly prompt: string;
|
|
31
|
+
readonly outputSchema?: WorkflowJsonSchema;
|
|
32
|
+
readonly permission?: WorkflowPermissionMode;
|
|
33
|
+
readonly restrictedTools?: readonly string[];
|
|
34
|
+
} & ClaudeWorkflowSessionArgs) => ReadonlyArray<string>;
|
|
35
|
+
export declare const runClaudeWorkflowTask: (task: AnyWorkflowWorkerTask, options: ClaudeWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const currentCliCommand: () => string[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode, WorkflowSessionPersistence } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type CodexWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly effort?: string;
|
|
8
|
+
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
9
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
10
|
+
readonly abortSignal?: AbortSignal;
|
|
11
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
12
|
+
} & WorkflowTaskRepairLoopOption<"codex-cli">;
|
|
13
|
+
export declare class CodexWorkflowWorkerError extends Error {
|
|
14
|
+
readonly name = "CodexWorkflowWorkerError";
|
|
15
|
+
readonly metadata?: Record<string, unknown>;
|
|
16
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
17
|
+
}
|
|
18
|
+
type CodexWorkflowSessionArgs = {
|
|
19
|
+
readonly sessionPersistence?: "persistent";
|
|
20
|
+
readonly resumeSessionId?: string;
|
|
21
|
+
} | {
|
|
22
|
+
readonly sessionPersistence: "ephemeral";
|
|
23
|
+
readonly resumeSessionId?: never;
|
|
24
|
+
};
|
|
25
|
+
export declare const buildCodexArgs: (input: {
|
|
26
|
+
readonly cwd: string;
|
|
27
|
+
readonly model?: string;
|
|
28
|
+
readonly effort?: string;
|
|
29
|
+
readonly outputSchemaPath?: string;
|
|
30
|
+
readonly outputPath: string;
|
|
31
|
+
readonly prompt: string;
|
|
32
|
+
readonly permission?: WorkflowPermissionMode;
|
|
33
|
+
} & CodexWorkflowSessionArgs) => ReadonlyArray<string>;
|
|
34
|
+
export declare const codexSessionId: (stdout: string, stderr: string) => string | undefined;
|
|
35
|
+
export declare const runCodexWorkflowTask: (task: AnyWorkflowWorkerTask, options: CodexWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type CursorWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
8
|
+
readonly abortSignal?: AbortSignal;
|
|
9
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
10
|
+
} & WorkflowTaskRepairLoopOption<"cursor">;
|
|
11
|
+
export declare class CursorWorkflowWorkerError extends Error {
|
|
12
|
+
readonly name = "CursorWorkflowWorkerError";
|
|
13
|
+
readonly metadata?: Record<string, unknown>;
|
|
14
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
15
|
+
}
|
|
16
|
+
export declare const cursorSessionIdFromStream: (stdout: string) => string | undefined;
|
|
17
|
+
export declare const buildCursorArgs: (input: {
|
|
18
|
+
readonly prompt: string;
|
|
19
|
+
readonly cwd: string;
|
|
20
|
+
readonly model?: string;
|
|
21
|
+
readonly resumeSessionId?: string;
|
|
22
|
+
readonly permission?: WorkflowPermissionMode;
|
|
23
|
+
}) => ReadonlyArray<string>;
|
|
24
|
+
export declare const runCursorWorkflowTask: (task: AnyWorkflowWorkerTask, options: CursorWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type DevinWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
8
|
+
readonly abortSignal?: AbortSignal;
|
|
9
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
10
|
+
} & WorkflowTaskRepairLoopOption<"devin">;
|
|
11
|
+
export declare class DevinWorkflowWorkerError extends Error {
|
|
12
|
+
readonly name = "DevinWorkflowWorkerError";
|
|
13
|
+
readonly metadata?: Record<string, unknown>;
|
|
14
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
15
|
+
}
|
|
16
|
+
export declare const isDevinAuthOutput: (output: string) => boolean;
|
|
17
|
+
export declare const mapDevinPermissionMode: (mode: WorkflowPermissionMode) => "auto" | "accept-edits" | "smart" | "dangerous" | undefined;
|
|
18
|
+
export declare const buildDevinArgs: (input: {
|
|
19
|
+
readonly model?: string;
|
|
20
|
+
readonly permission?: WorkflowPermissionMode;
|
|
21
|
+
readonly sessionId?: string;
|
|
22
|
+
readonly promptFilePath: string;
|
|
23
|
+
readonly exportPath: string;
|
|
24
|
+
}) => ReadonlyArray<string>;
|
|
25
|
+
export declare const runDevinWorkflowTask: (task: AnyWorkflowWorkerTask, options: DevinWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HarnessTypesSnapshot } from "./harness-types.js";
|
|
2
|
+
import type { HarnessId } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Values available to the authoring and named-worker contracts. Fixed CLI
|
|
5
|
+
* values come from the capability registry; catalog values come only from the
|
|
6
|
+
* installed per-model discovery snapshot.
|
|
7
|
+
*/
|
|
8
|
+
export declare const workflowEffortValues: (worker: HarnessId, snapshot?: HarnessTypesSnapshot) => readonly string[] | undefined;
|
|
9
|
+
/** Validate one effective task effort against the capability and model cache. */
|
|
10
|
+
export declare const validateWorkflowEffort: (input: {
|
|
11
|
+
readonly worker: HarnessId;
|
|
12
|
+
readonly effort?: string;
|
|
13
|
+
readonly model?: string;
|
|
14
|
+
readonly catalogModel?: string;
|
|
15
|
+
readonly snapshot?: HarnessTypesSnapshot;
|
|
16
|
+
}) => string | undefined;
|
|
17
|
+
/** Exact one-line migration diagnostic for legacy Codex/OMP modelspace entries. */
|
|
18
|
+
export declare const legacyReasoningVariantError: (worker: string, target: unknown, location: string) => string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type GrokWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly effort?: string;
|
|
8
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
9
|
+
readonly abortSignal?: AbortSignal;
|
|
10
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
11
|
+
} & WorkflowTaskRepairLoopOption<"grok">;
|
|
12
|
+
export declare class WorkflowWorkerError extends Error {
|
|
13
|
+
readonly name = "WorkflowWorkerError";
|
|
14
|
+
readonly metadata?: Record<string, unknown>;
|
|
15
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
16
|
+
}
|
|
17
|
+
export declare const isGrokAuthOutput: (output: string) => boolean;
|
|
18
|
+
export declare const buildGrokArgs: (input: {
|
|
19
|
+
readonly cwd: string;
|
|
20
|
+
readonly model?: string;
|
|
21
|
+
readonly effort?: string;
|
|
22
|
+
readonly prompt: string;
|
|
23
|
+
readonly sessionId?: string;
|
|
24
|
+
readonly permission?: WorkflowPermissionMode;
|
|
25
|
+
}) => ReadonlyArray<string>;
|
|
26
|
+
interface GrokJsonRunOutput {
|
|
27
|
+
readonly sessionId?: string;
|
|
28
|
+
readonly text: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const parseGrokJsonRunOutput: (stdout: string) => GrokJsonRunOutput;
|
|
31
|
+
export declare const runGrokWorkflowTask: (task: AnyWorkflowWorkerTask, options: GrokWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
32
|
+
export { parseWorkflowWorkerJsonOutput, WorkflowOutputParseError } from "./workflow-worker-contract.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type HermesWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly provider?: string;
|
|
8
|
+
readonly profile?: string;
|
|
9
|
+
readonly effort?: string;
|
|
10
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
11
|
+
readonly abortSignal?: AbortSignal;
|
|
12
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
13
|
+
} & WorkflowTaskRepairLoopOption<"hermes">;
|
|
14
|
+
export declare class HermesWorkflowWorkerError extends Error {
|
|
15
|
+
readonly name = "HermesWorkflowWorkerError";
|
|
16
|
+
readonly metadata?: Record<string, unknown>;
|
|
17
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
18
|
+
}
|
|
19
|
+
export declare const buildHermesArgs: (input: {
|
|
20
|
+
readonly profile?: string;
|
|
21
|
+
readonly model?: string;
|
|
22
|
+
readonly provider?: string;
|
|
23
|
+
readonly effort?: string;
|
|
24
|
+
readonly prompt: string;
|
|
25
|
+
readonly resumeSessionId?: string;
|
|
26
|
+
readonly permission?: WorkflowPermissionMode;
|
|
27
|
+
}) => ReadonlyArray<string>;
|
|
28
|
+
export declare const runHermesWorkflowTask: (task: AnyWorkflowWorkerTask, options: HermesWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -43,6 +43,7 @@ export interface WorkflowWorkerRunTaskSnapshot extends WorkflowRunTaskSnapshotBa
|
|
|
43
43
|
readonly worker?: string;
|
|
44
44
|
readonly model?: string;
|
|
45
45
|
readonly profile?: string;
|
|
46
|
+
readonly effort?: string;
|
|
46
47
|
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
47
48
|
};
|
|
48
49
|
readonly finishCriteria: ReadonlyArray<string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const kimiCodeHome: (home?: string) => string;
|
|
2
|
+
export type KimiModelEffortSupport = {
|
|
3
|
+
readonly declared: false;
|
|
4
|
+
} | {
|
|
5
|
+
readonly declared: true;
|
|
6
|
+
readonly efforts: readonly string[];
|
|
7
|
+
} | {
|
|
8
|
+
readonly error: string;
|
|
9
|
+
};
|
|
10
|
+
/** Read one model's optional support_efforts entry from Kimi's config TOML. */
|
|
11
|
+
export declare const parseKimiModelEffortSupport: (source: string, model: string, configPath?: string) => KimiModelEffortSupport;
|
|
12
|
+
/** Validate Kimi's optional model-specific ladder after checking the fixed union. */
|
|
13
|
+
export declare const validateKimiWorkflowEffort: (input: {
|
|
14
|
+
readonly model?: string;
|
|
15
|
+
readonly effort?: string;
|
|
16
|
+
readonly kimiHome?: string;
|
|
17
|
+
}) => string | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type KimiWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly effort?: string;
|
|
8
|
+
readonly kimiHome?: string;
|
|
9
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
10
|
+
readonly abortSignal?: AbortSignal;
|
|
11
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
12
|
+
} & WorkflowTaskRepairLoopOption<"kimi-code">;
|
|
13
|
+
export declare class KimiWorkflowWorkerError extends Error {
|
|
14
|
+
readonly name = "KimiWorkflowWorkerError";
|
|
15
|
+
readonly metadata?: Record<string, unknown>;
|
|
16
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
17
|
+
}
|
|
18
|
+
export declare const isKimiAuthOutput: (output: string) => boolean;
|
|
19
|
+
export declare const kimiSessionIdFromStream: (stdout: string) => string | undefined;
|
|
20
|
+
export declare const buildKimiArgs: (input: {
|
|
21
|
+
readonly model?: string;
|
|
22
|
+
readonly prompt: string;
|
|
23
|
+
readonly skillsDir?: string;
|
|
24
|
+
readonly sessionId?: string;
|
|
25
|
+
readonly permission?: WorkflowPermissionMode;
|
|
26
|
+
}) => ReadonlyArray<string>;
|
|
27
|
+
export declare const runKimiWorkflowTask: (task: AnyWorkflowWorkerTask, options: KimiWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { AnyWorkflowWorkerTask, WorkflowPermissionMode, WorkflowSessionPersistence } from "./workflows.js";
|
|
2
|
+
import type { WorkflowTaskExecution, WorkflowTaskProgressReporter, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
+
export type OmpWorkflowWorkerOptions = {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly bin?: string;
|
|
6
|
+
readonly model?: string;
|
|
7
|
+
readonly provider?: string;
|
|
8
|
+
readonly profile?: string;
|
|
9
|
+
readonly effort?: string;
|
|
10
|
+
readonly sessionPersistence?: WorkflowSessionPersistence;
|
|
11
|
+
readonly resolvedPermission: WorkflowPermissionMode;
|
|
12
|
+
readonly restrictedTools?: readonly string[];
|
|
13
|
+
readonly abortSignal?: AbortSignal;
|
|
14
|
+
readonly reportProgress?: WorkflowTaskProgressReporter;
|
|
15
|
+
} & WorkflowTaskRepairLoopOption<"omp">;
|
|
16
|
+
export declare class OmpWorkflowWorkerError extends Error {
|
|
17
|
+
readonly name = "OmpWorkflowWorkerError";
|
|
18
|
+
readonly metadata?: Record<string, unknown>;
|
|
19
|
+
constructor(message: string, metadata?: Record<string, unknown>);
|
|
20
|
+
}
|
|
21
|
+
/** Console Go selectors 400 in workflow `--print` (no `x-opencode-session`). */
|
|
22
|
+
export declare const OMP_CONSOLE_GO_PREFIX = "opencode-go/";
|
|
23
|
+
export declare const ompConsoleGoPinError: (model: string) => string;
|
|
24
|
+
export declare const assertOmpWorkflowModel: (model: string | undefined) => void;
|
|
25
|
+
type OmpWorkflowSessionArgs = {
|
|
26
|
+
readonly sessionPersistence?: "persistent";
|
|
27
|
+
readonly sessionId?: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly sessionPersistence: "ephemeral";
|
|
30
|
+
readonly sessionId?: never;
|
|
31
|
+
};
|
|
32
|
+
export declare const buildOmpArgs: (input: {
|
|
33
|
+
readonly cwd: string;
|
|
34
|
+
readonly model?: string;
|
|
35
|
+
readonly provider?: string;
|
|
36
|
+
readonly profile?: string;
|
|
37
|
+
readonly effort?: string;
|
|
38
|
+
readonly prompt: string;
|
|
39
|
+
readonly permission?: WorkflowPermissionMode;
|
|
40
|
+
readonly restrictedTools?: readonly string[];
|
|
41
|
+
} & OmpWorkflowSessionArgs) => ReadonlyArray<string>;
|
|
42
|
+
export interface OmpJsonStreamResult {
|
|
43
|
+
readonly sessionId?: string;
|
|
44
|
+
readonly text: string;
|
|
45
|
+
readonly error?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare const parseOmpJsonStream: (stdout: string) => OmpJsonStreamResult;
|
|
48
|
+
export declare const runOmpWorkflowTask: (task: AnyWorkflowWorkerTask, options: OmpWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
49
|
+
export {};
|