@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/bin/prism
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/prism
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 115074528 bytes
|
|
4
|
+
sha256: 00dc6342ae9e2c0fb5d1d11346f145a35c572b36a5e0dc98800e1a0576f82b69
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skastr0/prism-linux-x64",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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.
|
|
21
|
+
"@skastr0/prism-sdk": "0.8.0",
|
|
22
22
|
"effect": "4.0.0-rc.115",
|
|
23
23
|
"typescript": "^5.8.3",
|
|
24
24
|
"zod": "4.4.3"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Amp orb projects, discovered by `prism workflow refresh-harness-types` from
|
|
3
|
+
* `amp projects list --json` and used to type and validate `worker.project`
|
|
4
|
+
* on `amp-orb` tasks and named workers.
|
|
5
|
+
*
|
|
6
|
+
* `amp --project` documents three identifier forms (namespace/name,
|
|
7
|
+
* owner/repo, repository URL); each project contributes every form it has.
|
|
8
|
+
* Project ids and `@namespace/name` also resolve through `amp projects get`,
|
|
9
|
+
* but `--project` does not document them, so they are not admitted.
|
|
10
|
+
*/
|
|
11
|
+
export interface AmpProject {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly namespace: string;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly repositoryURL?: string;
|
|
16
|
+
readonly remoteURLs?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export interface DiscoveredAmpProjects {
|
|
19
|
+
readonly projects: readonly AmpProject[];
|
|
20
|
+
readonly source: "command" | "empty";
|
|
21
|
+
readonly error?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Parse `amp projects list --json`: an array of `{ id, namespace, name, repositoryURL, remoteURLs }`. */
|
|
24
|
+
export declare const parseAmpProjectsList: (stdout: string) => {
|
|
25
|
+
readonly projects: AmpProject[];
|
|
26
|
+
readonly error?: string;
|
|
27
|
+
};
|
|
28
|
+
/** The canonical `--project` form. */
|
|
29
|
+
export declare const ampProjectCanonicalRef: (project: AmpProject) => string;
|
|
30
|
+
/** Every documented `--project` form for one project: namespace/name, owner/repo, and repository URLs. */
|
|
31
|
+
export declare const ampProjectRefs: (project: AmpProject) => readonly string[];
|
|
32
|
+
/** Sorted union of every admitted `worker.project` value. Empty when discovery found none. */
|
|
33
|
+
export declare const ampOrbProjectRefs: (discovered: DiscoveredAmpProjects | undefined) => readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* Fail closed on an `amp-orb` project that the snapshot does not list.
|
|
36
|
+
* No snapshot, or a snapshot without projects, leaves `project` a free string
|
|
37
|
+
* (the same fallback as every other discovered union).
|
|
38
|
+
*/
|
|
39
|
+
export declare const validateAmpOrbProject: (project: string, discovered: DiscoveredAmpProjects | undefined) => string | undefined;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Amp runners, discovered on demand by
|
|
3
|
+
* `prism workflow refresh-harness-types --discover-amp-runners` and used to
|
|
4
|
+
* type and validate `worker.runnerId` / `worker.runnerDir` on `amp-runner`
|
|
5
|
+
* tasks and named workers.
|
|
6
|
+
*
|
|
7
|
+
* Amp exposes no account-wide runner CLI command or REST route; the surface is
|
|
8
|
+
* the `list_runners` platform tool inside an Amp thread (the same data the
|
|
9
|
+
* ampcode.com thread composer's location picker shows). Discovery therefore
|
|
10
|
+
* spends one small `amp -x --stream-json` turn and parses the list_runners
|
|
11
|
+
* TOOL RESULT from the transcript — never the assistant's echoed text, which
|
|
12
|
+
* can reformat or truncate the JSON.
|
|
13
|
+
*
|
|
14
|
+
* An old entry is valid: there are no staleness warnings, and Amp re-validates
|
|
15
|
+
* `--executor runner:<id>` against live runners at spawn time.
|
|
16
|
+
*/
|
|
17
|
+
export declare const AMP_RUNNERS_REFRESH_COMMAND = "prism workflow refresh-harness-types --discover-amp-runners";
|
|
18
|
+
export interface AmpRunnerDirectory {
|
|
19
|
+
readonly path: string;
|
|
20
|
+
readonly repositoryURL?: string;
|
|
21
|
+
readonly canCreateWorktree?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface AmpRunner {
|
|
24
|
+
readonly runnerId: string;
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly hostname?: string;
|
|
27
|
+
readonly workingDirectory?: string;
|
|
28
|
+
readonly repositoryURL?: string;
|
|
29
|
+
/** The runner's own last-seen timestamp from Amp, as reported. */
|
|
30
|
+
readonly lastSeenAt: string;
|
|
31
|
+
readonly capabilities: readonly string[];
|
|
32
|
+
readonly directories: readonly AmpRunnerDirectory[];
|
|
33
|
+
}
|
|
34
|
+
export interface DiscoveredAmpRunners {
|
|
35
|
+
readonly runners: readonly AmpRunner[];
|
|
36
|
+
readonly source: "command" | "empty";
|
|
37
|
+
/** When the one-shot capture ran (distinct from each runner's lastSeenAt). */
|
|
38
|
+
readonly capturedAt?: string;
|
|
39
|
+
readonly error?: string;
|
|
40
|
+
}
|
|
41
|
+
/** `list_runners` prompt: call the tool, then print its raw JSON and nothing else. */
|
|
42
|
+
export declare const AMP_RUNNERS_PROMPT = "Call the list_runners tool with no arguments. Then output exactly the JSON object it returned, with text(JSON.stringify(result)), and nothing else. Do not summarize, reformat, or omit any fields.";
|
|
43
|
+
/**
|
|
44
|
+
* Sentinel the discovery runner emits when the amp turn itself failed, so the
|
|
45
|
+
* reason survives the fail-soft string-only command contract.
|
|
46
|
+
*/
|
|
47
|
+
export declare const AMP_TURN_ERROR_PREFIX = "AMP_TURN_ERROR:";
|
|
48
|
+
/**
|
|
49
|
+
* Parse the `amp -x <prompt> --stream-json` transcript: the list_runners tool
|
|
50
|
+
* result only. Required fields fail closed through the Effect Schema decode;
|
|
51
|
+
* upstream extras are ignored. Returns the discovery thread id so the caller
|
|
52
|
+
* can delete it.
|
|
53
|
+
*/
|
|
54
|
+
export declare const parseAmpRunnersStreamJson: (stdout: string) => {
|
|
55
|
+
readonly runners: AmpRunner[];
|
|
56
|
+
readonly sessionId?: string;
|
|
57
|
+
readonly error?: string;
|
|
58
|
+
};
|
|
59
|
+
/** Sorted runner ids in the snapshot. Empty when discovery found none. */
|
|
60
|
+
export declare const ampRunnerIds: (discovered: DiscoveredAmpRunners | undefined) => readonly string[];
|
|
61
|
+
/** Sorted unique directories one runner serves. */
|
|
62
|
+
export declare const ampRunnerServedDirs: (runner: AmpRunner) => readonly string[];
|
|
63
|
+
/** One runner's directories, normalized and deduped (the snapshot's canonical form). */
|
|
64
|
+
export declare const ampRunnerNormalizedDirs: (runner: AmpRunner) => readonly AmpRunnerDirectory[];
|
|
65
|
+
/**
|
|
66
|
+
* Fail closed on an `amp-runner` target the snapshot does not know: an unknown
|
|
67
|
+
* runnerId, or a runnerDir that runner does not serve. No snapshot, or one
|
|
68
|
+
* without runners, leaves both a free string (the same fallback as every other
|
|
69
|
+
* discovered union). `runnerDir` is optional: the runner's start directory.
|
|
70
|
+
*/
|
|
71
|
+
export declare const validateAmpRunnerTarget: (runnerId: string, runnerDir: string | undefined, discovered: DiscoveredAmpRunners | undefined) => string | undefined;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Schema, SchemaAST } from "effect";
|
|
2
|
+
export type JsonSchema = Record<string, unknown>;
|
|
3
|
+
export type AstToJsonSchemaOptions = {
|
|
4
|
+
readonly errorPrefix?: string;
|
|
5
|
+
/** Kimi and some MCP clients reject JSON Schema `const`; `enum` is the safe default. */
|
|
6
|
+
readonly literalRepresentation?: "enum" | "const";
|
|
7
|
+
readonly unknownKeywordSchema?: JsonSchema;
|
|
8
|
+
/**
|
|
9
|
+
* When true, a node's checks (refinements) are ignored and an encoding
|
|
10
|
+
* (transformation) is followed to its encoded side, so the JSON Schema
|
|
11
|
+
* describes the wire shape. This is the MCP / Zod / OpenCode schema-bridge
|
|
12
|
+
* stance. Workflow output schemas keep the default (reject), because their
|
|
13
|
+
* decoded value must equal its JSON representation.
|
|
14
|
+
*/
|
|
15
|
+
readonly allowChecksAndEncodings?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When true, map Effect `Schema.Record` (index signatures on the object node)
|
|
18
|
+
* to JSON Schema `{ type: "object", additionalProperties: ... }`. Workflow
|
|
19
|
+
* output schemas keep the default (reject).
|
|
20
|
+
*/
|
|
21
|
+
readonly allowIndexSignatures?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* When true, render general (non-literal) unions as `anyOf` member schemas —
|
|
24
|
+
* `oneOf` when the union AST declares that mode — instead of failing closed.
|
|
25
|
+
* Tool/MCP input surfaces enable this; workflow output schemas keep the
|
|
26
|
+
* default (reject) so worker output contracts stay strict.
|
|
27
|
+
*/
|
|
28
|
+
readonly allowGeneralUnions?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare class WorkflowOutputSchemaError extends Error {
|
|
31
|
+
readonly name = "WorkflowOutputSchemaError";
|
|
32
|
+
}
|
|
33
|
+
export declare const astToJsonSchema: (ast: SchemaAST.AST, options?: AstToJsonSchemaOptions, fieldPath?: string) => JsonSchema;
|
|
34
|
+
export declare const jsonSchemaFromEffectSchema: (schema: Schema.Top, options?: AstToJsonSchemaOptions) => JsonSchema;
|
|
35
|
+
export declare const WORKFLOW_AST_TO_JSON_SCHEMA_OPTIONS: {
|
|
36
|
+
readonly errorPrefix: "workflow output schema";
|
|
37
|
+
readonly literalRepresentation: "enum";
|
|
38
|
+
};
|
|
39
|
+
export declare const MCP_AST_TO_JSON_SCHEMA_OPTIONS: {
|
|
40
|
+
readonly errorPrefix: "mcp-schema-bridge";
|
|
41
|
+
readonly literalRepresentation: "enum";
|
|
42
|
+
readonly unknownKeywordSchema: {};
|
|
43
|
+
readonly allowChecksAndEncodings: true;
|
|
44
|
+
readonly allowIndexSignatures: true;
|
|
45
|
+
readonly allowGeneralUnions: true;
|
|
46
|
+
};
|
package/types/fs.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ export declare function readFile(path: string): Promise<string>;
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function readJson<T>(path: string): Promise<T>;
|
|
24
24
|
/**
|
|
25
|
-
* Write
|
|
25
|
+
* Write content to a file atomically, preserving exact bytes for binary assets.
|
|
26
26
|
*/
|
|
27
|
-
export declare function writeFile(path: string, content: string, options?: {
|
|
27
|
+
export declare function writeFile(path: string, content: string | Uint8Array, options?: {
|
|
28
28
|
readonly mode?: number;
|
|
29
29
|
}): Promise<void>;
|
|
30
30
|
export declare function chmodFile(path: string, mode: number): Promise<void>;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Cache reads and CLI lists never throw; empty means "leave this worker as string".
|
|
4
4
|
*/
|
|
5
5
|
import { type DiscoveredHarnessModels, type HarnessModelOption, type RefreshHarnessTypesResult } from "./harness-types.js";
|
|
6
|
+
import { type DiscoveredAmpProjects } from "./amp-projects.js";
|
|
7
|
+
import { type DiscoveredAmpRunners } from "./amp-runners.js";
|
|
6
8
|
export type HarnessTypesReadText = (path: string) => string | undefined;
|
|
7
9
|
export type HarnessTypesCommandRunner = (command: string, args: readonly string[]) => Promise<string>;
|
|
8
10
|
export interface DiscoverHarnessTypesOptions {
|
|
@@ -10,6 +12,14 @@ export interface DiscoverHarnessTypesOptions {
|
|
|
10
12
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
11
13
|
readonly readText?: HarnessTypesReadText;
|
|
12
14
|
readonly runCommand?: HarnessTypesCommandRunner;
|
|
15
|
+
/**
|
|
16
|
+
* Also snapshot the account-wide Amp runners with a one-shot `amp -x` turn
|
|
17
|
+
* whose only job is calling the `list_runners` platform tool. Opt-in: the
|
|
18
|
+
* turn creates a small Amp thread (cheapest mode, deleted afterwards).
|
|
19
|
+
* A plain refresh never runs it and preserves a previously captured
|
|
20
|
+
* runner snapshot.
|
|
21
|
+
*/
|
|
22
|
+
readonly discoverAmpRunners?: boolean;
|
|
13
23
|
}
|
|
14
24
|
export declare const parseClaudeModelCache: (raw: string) => {
|
|
15
25
|
readonly models: HarnessModelOption[];
|
|
@@ -61,5 +71,29 @@ export declare const parseAmpAgentOptions: (raw: string) => {
|
|
|
61
71
|
readonly error?: string;
|
|
62
72
|
};
|
|
63
73
|
export declare const discoverWorkflowHarnessModels: (options?: DiscoverHarnessTypesOptions) => Promise<readonly DiscoveredHarnessModels[]>;
|
|
74
|
+
/** Amp orb projects from `amp projects list --json`. Fail-soft like model discovery. */
|
|
75
|
+
export declare const discoverAmpProjects: (options?: DiscoverHarnessTypesOptions) => Promise<DiscoveredAmpProjects>;
|
|
76
|
+
/**
|
|
77
|
+
* Runner discovery turns can take a couple of minutes (an agent turn, not a
|
|
78
|
+
* CLI list), so they get their own runner with a longer timeout than the
|
|
79
|
+
* 8s `defaultRunCommand`. On failure the reason is surfaced through the
|
|
80
|
+
* `AMP_TURN_ERROR:` sentinel; the untruncated partial stdout is appended on
|
|
81
|
+
* its own line so the init line's session id survives for thread cleanup.
|
|
82
|
+
*/
|
|
83
|
+
export declare const defaultAmpTurnRunner: HarnessTypesCommandRunner;
|
|
84
|
+
/**
|
|
85
|
+
* Snapshot the account-wide Amp runners: one `amp -x --stream-json` turn in
|
|
86
|
+
* the cheapest mode whose only job is calling `list_runners`, parsed from the
|
|
87
|
+
* tool result. Fail-soft: a failed capture records the reason and no runners,
|
|
88
|
+
* but still deletes any thread the turn created (its partial stdout carries
|
|
89
|
+
* the session id even when the turn times out). The reason is also returned
|
|
90
|
+
* so the caller can surface it when the capture was explicitly requested.
|
|
91
|
+
*/
|
|
92
|
+
export declare const discoverAmpRunners: (options?: DiscoverHarnessTypesOptions) => Promise<{
|
|
93
|
+
readonly discovered: DiscoveredAmpRunners;
|
|
94
|
+
readonly failedExplicit?: string;
|
|
95
|
+
}>;
|
|
96
|
+
/** Previously captured runner snapshot, preserved by a plain refresh. */
|
|
97
|
+
export declare const previousAmpRunners: (prismHome: string) => DiscoveredAmpRunners | undefined;
|
|
64
98
|
export declare const refreshHarnessTypes: (prismHome: string, options?: DiscoverHarnessTypesOptions) => Promise<RefreshHarnessTypesResult>;
|
|
65
99
|
export declare const renderHarnessTypesRefreshHuman: (result: RefreshHarnessTypesResult) => string;
|
package/types/harness-types.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* `<PRISM_HOME>/state/harness-types/`. Not project-keyed — harnesses are
|
|
6
6
|
* installed on the machine, not per repo.
|
|
7
7
|
*/
|
|
8
|
+
import { type DiscoveredAmpProjects } from "./amp-projects.js";
|
|
9
|
+
import { type DiscoveredAmpRunners } from "./amp-runners.js";
|
|
8
10
|
import type { WorkflowWorkerId } from "./workflows.js";
|
|
9
11
|
export declare const HARNESS_TYPES_DIRNAME = "harness-types";
|
|
10
12
|
export declare const HARNESS_MODELS_FILENAME = "harness-models.ts";
|
|
@@ -31,11 +33,21 @@ export interface DiscoveredHarnessModels {
|
|
|
31
33
|
export interface HarnessTypesSnapshot {
|
|
32
34
|
readonly generatedAt: string;
|
|
33
35
|
readonly harnesses: readonly DiscoveredHarnessModels[];
|
|
36
|
+
/** `amp projects list --json`: types and validates `amp-orb` `worker.project`. */
|
|
37
|
+
readonly ampProjects?: DiscoveredAmpProjects;
|
|
38
|
+
/** `list_runners` (one-shot Amp turn): types and validates `amp-runner` `worker.runnerId`/`runnerDir`. */
|
|
39
|
+
readonly ampRunners?: DiscoveredAmpRunners;
|
|
34
40
|
}
|
|
35
41
|
export interface RefreshHarnessTypesResult {
|
|
36
42
|
readonly modelsPath: string;
|
|
37
43
|
readonly discoveredPath: string;
|
|
38
44
|
readonly snapshot: HarnessTypesSnapshot;
|
|
45
|
+
/**
|
|
46
|
+
* Set only when the explicit `--discover-amp-runners` capture failed: the
|
|
47
|
+
* reason plus what was kept. The refresh itself still succeeded; the CLI
|
|
48
|
+
* surfaces this as a non-zero exit so the failure is never silent.
|
|
49
|
+
*/
|
|
50
|
+
readonly ampRunnersCaptureError?: string;
|
|
39
51
|
}
|
|
40
52
|
/**
|
|
41
53
|
* Render the generated `prism/harnesses` module. A worker appears only
|
package/types/index.d.ts
CHANGED
|
@@ -99,6 +99,16 @@ export type SopSource = SopDefinition;
|
|
|
99
99
|
export interface ModelTargetDefinition {
|
|
100
100
|
readonly model: string;
|
|
101
101
|
readonly variant?: string;
|
|
102
|
+
readonly effort?: string;
|
|
103
|
+
readonly provider?: string;
|
|
104
|
+
readonly temperature?: number;
|
|
105
|
+
readonly top_p?: number;
|
|
106
|
+
}
|
|
107
|
+
export interface ReasoningEffortModelTargetDefinition {
|
|
108
|
+
readonly model: string;
|
|
109
|
+
readonly effort?: string;
|
|
110
|
+
readonly variant?: never;
|
|
111
|
+
readonly provider?: string;
|
|
102
112
|
readonly temperature?: number;
|
|
103
113
|
readonly top_p?: number;
|
|
104
114
|
}
|
|
@@ -107,9 +117,17 @@ export interface ModelPoolTargetDefinition {
|
|
|
107
117
|
readonly models: readonly ModelTargetDefinition[];
|
|
108
118
|
}
|
|
109
119
|
export type ModelTargetBlockDefinition = ModelTargetDefinition | ModelPoolTargetDefinition | Readonly<Record<string, unknown>>;
|
|
120
|
+
export type ReasoningEffortModelTargetBlockDefinition = ReasoningEffortModelTargetDefinition | {
|
|
121
|
+
readonly strategy: "any-of" | "round-robin" | "ordered";
|
|
122
|
+
readonly models: readonly ReasoningEffortModelTargetDefinition[];
|
|
123
|
+
};
|
|
124
|
+
export type ModelProfileTargets = Readonly<Record<string, ModelTargetBlockDefinition>> & {
|
|
125
|
+
readonly "codex-cli"?: ReasoningEffortModelTargetBlockDefinition;
|
|
126
|
+
readonly omp?: ReasoningEffortModelTargetBlockDefinition;
|
|
127
|
+
};
|
|
110
128
|
export interface ModelProfileDefinition {
|
|
111
129
|
readonly description?: string;
|
|
112
|
-
readonly targets:
|
|
130
|
+
readonly targets: ModelProfileTargets;
|
|
113
131
|
}
|
|
114
132
|
export interface ModelspaceDefinition {
|
|
115
133
|
readonly name: string;
|
|
@@ -3,6 +3,14 @@ export type GeneratedCanonicalToolSupport = "executable" | "unsupported";
|
|
|
3
3
|
export type SkillPermissionSupport = "supported" | "unsupported";
|
|
4
4
|
export type CompileSurfaceSupport = "supported" | "unsupported";
|
|
5
5
|
export type AgentModelBindingSupport = "consumed" | "ignored";
|
|
6
|
+
export type WorkflowEffortCapability = {
|
|
7
|
+
readonly kind: "fixed";
|
|
8
|
+
readonly control: string;
|
|
9
|
+
readonly values: readonly string[];
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "catalog";
|
|
12
|
+
readonly control: string;
|
|
13
|
+
};
|
|
6
14
|
export interface CompileTargetCapabilities {
|
|
7
15
|
readonly agents: CompileSurfaceSupport;
|
|
8
16
|
readonly agentModelBindings: AgentModelBindingSupport;
|
|
@@ -31,6 +39,8 @@ export interface LowererCapabilityProfile {
|
|
|
31
39
|
* ids elsewhere.
|
|
32
40
|
*/
|
|
33
41
|
readonly workflowWorker: boolean;
|
|
42
|
+
/** Per-task reasoning control; null means the worker has no direct effort input. */
|
|
43
|
+
readonly workflowEffort: WorkflowEffortCapability | null;
|
|
34
44
|
readonly compile: CompileTargetCapabilities;
|
|
35
45
|
readonly surfaces: Record<LowererSurfaceId, LowererSurfaceCapability>;
|
|
36
46
|
readonly notes?: readonly string[];
|
|
@@ -40,6 +50,11 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
40
50
|
readonly harness: "claude-code";
|
|
41
51
|
readonly family: "coding-harness";
|
|
42
52
|
readonly workflowWorker: true;
|
|
53
|
+
readonly workflowEffort: {
|
|
54
|
+
readonly kind: "fixed";
|
|
55
|
+
readonly control: "--effort";
|
|
56
|
+
readonly values: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
57
|
+
};
|
|
43
58
|
readonly compile: CompileTargetCapabilities;
|
|
44
59
|
readonly surfaces: {
|
|
45
60
|
readonly pluginBundle: {
|
|
@@ -84,6 +99,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
84
99
|
readonly harness: "opencode";
|
|
85
100
|
readonly family: "coding-harness";
|
|
86
101
|
readonly workflowWorker: true;
|
|
102
|
+
readonly workflowEffort: null;
|
|
87
103
|
readonly compile: CompileTargetCapabilities;
|
|
88
104
|
readonly surfaces: {
|
|
89
105
|
readonly pluginBundle: {
|
|
@@ -128,80 +144,15 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
128
144
|
};
|
|
129
145
|
};
|
|
130
146
|
};
|
|
131
|
-
readonly opencode2: {
|
|
132
|
-
readonly harness: "opencode2";
|
|
133
|
-
readonly family: "coding-harness";
|
|
134
|
-
readonly workflowWorker: true;
|
|
135
|
-
readonly compile: CompileTargetCapabilities;
|
|
136
|
-
readonly surfaces: {
|
|
137
|
-
readonly pluginBundle: {
|
|
138
|
-
readonly kind: "native-plugin-api";
|
|
139
|
-
readonly path: "<opencode-root>/plugins/prism-generated-<plugin>/";
|
|
140
|
-
readonly summary: "Compile emits an OpenCode plugin using @opencode-ai/plugin APIs (shared home with OpenCode 1.x).";
|
|
141
|
-
};
|
|
142
|
-
readonly rules: {
|
|
143
|
-
readonly kind: "direct-file";
|
|
144
|
-
readonly path: "<opencode-root>/AGENTS.md";
|
|
145
|
-
readonly summary: "Install appends managed sections to the native instructions file.";
|
|
146
|
-
};
|
|
147
|
-
readonly commands: {
|
|
148
|
-
readonly kind: "direct-file";
|
|
149
|
-
readonly path: "<opencode-root>/commands/";
|
|
150
|
-
readonly summary: "Install writes markdown command files.";
|
|
151
|
-
};
|
|
152
|
-
readonly agents: {
|
|
153
|
-
readonly kind: "markdown-file";
|
|
154
|
-
readonly path: "<opencode-root>/agents/";
|
|
155
|
-
readonly summary: "Compile writes OpenCode agent markdown files.";
|
|
156
|
-
};
|
|
157
|
-
readonly skills: {
|
|
158
|
-
readonly kind: "markdown-file";
|
|
159
|
-
readonly path: "<opencode-root>/skills/";
|
|
160
|
-
readonly summary: "Install and compile write Agent Skill folders.";
|
|
161
|
-
};
|
|
162
|
-
readonly generatedTools: {
|
|
163
|
-
readonly kind: "native-plugin-api";
|
|
164
|
-
readonly path: "<generated-plugin>/dist/server.mjs";
|
|
165
|
-
readonly summary: "Canonical tools lower to OpenCode plugin tools.";
|
|
166
|
-
};
|
|
167
|
-
readonly hooks: {
|
|
168
|
-
readonly kind: "native-plugin-api";
|
|
169
|
-
readonly path: "<generated-plugin>/dist/server.mjs";
|
|
170
|
-
readonly summary: "Hooks lower through the OpenCode plugin API.";
|
|
171
|
-
};
|
|
172
|
-
readonly agentConfig: {
|
|
173
|
-
readonly kind: "config-patch";
|
|
174
|
-
readonly path: "<opencode-root>/opencode.json#agent.<name>";
|
|
175
|
-
readonly summary: "Compile patches compiler-owned agent keys and plugin entries.";
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
readonly notes: readonly ["OpenCode 2 shares ~/.config/opencode/ with OpenCode 1.x until they consolidate.", "Detected by the `opencode2` binary on PATH, not by the shared config root.", "coding-harness targets opencode2, not opencode. `--harness opencode` remains for V1.", "Workflow worker is `opencode2` only (PRISM_WORKFLOW_OPENCODE2_BIN). Never falls back to `opencode`."];
|
|
179
|
-
};
|
|
180
|
-
readonly openclaw: {
|
|
181
|
-
readonly harness: "openclaw";
|
|
182
|
-
readonly family: "claw-harness";
|
|
183
|
-
readonly workflowWorker: false;
|
|
184
|
-
readonly compile: CompileTargetCapabilities;
|
|
185
|
-
readonly surfaces: {
|
|
186
|
-
readonly pluginBundle: LowererSurfaceCapability;
|
|
187
|
-
readonly rules: LowererSurfaceCapability;
|
|
188
|
-
readonly commands: LowererSurfaceCapability;
|
|
189
|
-
readonly agents: LowererSurfaceCapability;
|
|
190
|
-
readonly skills: {
|
|
191
|
-
readonly kind: "direct-file";
|
|
192
|
-
readonly path: "<openclaw-root>/skills/";
|
|
193
|
-
readonly summary: "Install writes Agent Skill folders only.";
|
|
194
|
-
};
|
|
195
|
-
readonly generatedTools: LowererSurfaceCapability;
|
|
196
|
-
readonly hooks: LowererSurfaceCapability;
|
|
197
|
-
readonly agentConfig: LowererSurfaceCapability;
|
|
198
|
-
};
|
|
199
|
-
readonly notes: readonly ["OpenClaw remains Prism skills-only for now."];
|
|
200
|
-
};
|
|
201
147
|
readonly hermes: {
|
|
202
148
|
readonly harness: "hermes";
|
|
203
149
|
readonly family: "claw-harness";
|
|
204
150
|
readonly workflowWorker: true;
|
|
151
|
+
readonly workflowEffort: {
|
|
152
|
+
readonly kind: "fixed";
|
|
153
|
+
readonly control: "--reasoning";
|
|
154
|
+
readonly values: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
155
|
+
};
|
|
205
156
|
readonly compile: CompileTargetCapabilities;
|
|
206
157
|
readonly surfaces: {
|
|
207
158
|
readonly pluginBundle: LowererSurfaceCapability;
|
|
@@ -230,6 +181,10 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
230
181
|
readonly harness: "codex-cli";
|
|
231
182
|
readonly family: "coding-harness";
|
|
232
183
|
readonly workflowWorker: true;
|
|
184
|
+
readonly workflowEffort: {
|
|
185
|
+
readonly kind: "catalog";
|
|
186
|
+
readonly control: "--config model_reasoning_effort";
|
|
187
|
+
};
|
|
233
188
|
readonly compile: CompileTargetCapabilities;
|
|
234
189
|
readonly surfaces: {
|
|
235
190
|
readonly pluginBundle: LowererSurfaceCapability;
|
|
@@ -274,6 +229,11 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
274
229
|
readonly harness: "antigravity-cli";
|
|
275
230
|
readonly family: "coding-harness";
|
|
276
231
|
readonly workflowWorker: true;
|
|
232
|
+
readonly workflowEffort: {
|
|
233
|
+
readonly kind: "fixed";
|
|
234
|
+
readonly control: "--effort";
|
|
235
|
+
readonly values: readonly ["low", "medium", "high"];
|
|
236
|
+
};
|
|
277
237
|
readonly compile: CompileTargetCapabilities;
|
|
278
238
|
readonly surfaces: {
|
|
279
239
|
readonly pluginBundle: {
|
|
@@ -318,6 +278,11 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
318
278
|
readonly harness: "kimi-code";
|
|
319
279
|
readonly family: "coding-harness";
|
|
320
280
|
readonly workflowWorker: true;
|
|
281
|
+
readonly workflowEffort: {
|
|
282
|
+
readonly kind: "fixed";
|
|
283
|
+
readonly control: "env KIMI_MODEL_THINKING_EFFORT";
|
|
284
|
+
readonly values: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
285
|
+
};
|
|
321
286
|
readonly compile: CompileTargetCapabilities;
|
|
322
287
|
readonly surfaces: {
|
|
323
288
|
readonly pluginBundle: {
|
|
@@ -366,7 +331,8 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
366
331
|
readonly "amp-orb": {
|
|
367
332
|
readonly harness: "amp-orb";
|
|
368
333
|
readonly family: "coding-harness";
|
|
369
|
-
readonly workflowWorker:
|
|
334
|
+
readonly workflowWorker: true;
|
|
335
|
+
readonly workflowEffort: null;
|
|
370
336
|
readonly compile: CompileTargetCapabilities;
|
|
371
337
|
readonly surfaces: {
|
|
372
338
|
readonly pluginBundle: LowererSurfaceCapability;
|
|
@@ -382,12 +348,34 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
382
348
|
readonly hooks: LowererSurfaceCapability;
|
|
383
349
|
readonly agentConfig: LowererSurfaceCapability;
|
|
384
350
|
};
|
|
385
|
-
readonly notes: readonly ["amp-orb
|
|
351
|
+
readonly notes: readonly ["amp-orb names Amp's hosted orb executor. Install surface: hosted skills checkout (skills only, not a second amp-code root).", "Workflow surface: project-bound orb threads via `amp --orb-execute --stream-json`.", "Family is coding-harness so the type fits. It is not a member of the coding-harness preset.", "Publication (clone, commit, push, reload) is outside this target."];
|
|
352
|
+
};
|
|
353
|
+
readonly "amp-runner": {
|
|
354
|
+
readonly harness: "amp-runner";
|
|
355
|
+
readonly family: "coding-harness";
|
|
356
|
+
readonly workflowWorker: true;
|
|
357
|
+
readonly workflowEffort: null;
|
|
358
|
+
readonly compile: CompileTargetCapabilities;
|
|
359
|
+
readonly surfaces: {
|
|
360
|
+
readonly pluginBundle: LowererSurfaceCapability;
|
|
361
|
+
readonly rules: LowererSurfaceCapability;
|
|
362
|
+
readonly commands: LowererSurfaceCapability;
|
|
363
|
+
readonly agents: LowererSurfaceCapability;
|
|
364
|
+
readonly skills: LowererSurfaceCapability;
|
|
365
|
+
readonly generatedTools: LowererSurfaceCapability;
|
|
366
|
+
readonly hooks: LowererSurfaceCapability;
|
|
367
|
+
readonly agentConfig: LowererSurfaceCapability;
|
|
368
|
+
};
|
|
369
|
+
readonly notes: readonly ["amp-runner names Amp executing on an operator-declared `amp --no-tui --runner-id <id>` runner. Workflow-worker only.", "Not a member of the coding-harness preset, --all, or installed-harness auto-detect: it has no install surface."];
|
|
386
370
|
};
|
|
387
371
|
readonly "amp-code": {
|
|
388
372
|
readonly harness: "amp-code";
|
|
389
373
|
readonly family: "coding-harness";
|
|
390
374
|
readonly workflowWorker: true;
|
|
375
|
+
readonly workflowEffort: {
|
|
376
|
+
readonly kind: "catalog";
|
|
377
|
+
readonly control: "plugin-mode.reasoningEffort";
|
|
378
|
+
};
|
|
391
379
|
readonly compile: CompileTargetCapabilities;
|
|
392
380
|
readonly surfaces: {
|
|
393
381
|
readonly pluginBundle: {
|
|
@@ -433,6 +421,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
433
421
|
readonly harness: "cursor";
|
|
434
422
|
readonly family: "coding-harness";
|
|
435
423
|
readonly workflowWorker: true;
|
|
424
|
+
readonly workflowEffort: null;
|
|
436
425
|
readonly compile: CompileTargetCapabilities;
|
|
437
426
|
readonly surfaces: {
|
|
438
427
|
readonly pluginBundle: {
|
|
@@ -474,58 +463,11 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
474
463
|
};
|
|
475
464
|
readonly notes: readonly ["Compiled Cursor agents are plugin subagents under plugins/local/prism-generated-<plugin>/agents/. The Agent CLI has no --agent selector, so the workflow worker still prompt-injects identity.", "Cursor plugin hooks are Claude-shaped command scripts: hooks/hooks.json plus hooks/*.mjs, loaded from the generated plugin and --plugin-dir. Do not whole-file own ~/.cursor/hooks.json.", "Workflow worker dispatches `agent --print --output-format stream-json --trust`; default model composer-2.5-fast; resume via --resume.", "Cursor command artifacts install through the same local plugin bundle so Prism uses Cursor's native command discovery instead of direct command files.", "Cursor Agent Skills stay install-phase direct under .cursor/skills and ~/.cursor/skills. Concrete sop skills bundle into the generated plugin.", "Per-agent skill permission visibility remains unsupported. Canonical tools stay CLI-only (`prism tools invoke`); no mcp.json patch is emitted."];
|
|
476
465
|
};
|
|
477
|
-
readonly "factory-droid": {
|
|
478
|
-
readonly harness: "factory-droid";
|
|
479
|
-
readonly family: "coding-harness";
|
|
480
|
-
readonly workflowWorker: false;
|
|
481
|
-
readonly compile: CompileTargetCapabilities;
|
|
482
|
-
readonly surfaces: {
|
|
483
|
-
readonly pluginBundle: {
|
|
484
|
-
readonly kind: "native-plugin-bundle";
|
|
485
|
-
readonly path: "<factory-root>/plugins/prism-generated-<plugin>/";
|
|
486
|
-
readonly summary: "Compile emits Factory plugin bundles with .factory-plugin/plugin.json.";
|
|
487
|
-
};
|
|
488
|
-
readonly rules: {
|
|
489
|
-
readonly kind: "direct-file";
|
|
490
|
-
readonly path: "<factory-root>/AGENTS.md or rules/";
|
|
491
|
-
readonly summary: "Install writes Factory instruction/rule files.";
|
|
492
|
-
};
|
|
493
|
-
readonly commands: {
|
|
494
|
-
readonly kind: "direct-file";
|
|
495
|
-
readonly path: "<factory-root>/commands/";
|
|
496
|
-
readonly summary: "Install writes Factory command markdown files.";
|
|
497
|
-
};
|
|
498
|
-
readonly agents: {
|
|
499
|
-
readonly kind: "native-plugin-bundle";
|
|
500
|
-
readonly path: "<generated-plugin>/droids/";
|
|
501
|
-
readonly summary: "Compile writes generated droids inside the Factory plugin bundle.";
|
|
502
|
-
};
|
|
503
|
-
readonly skills: {
|
|
504
|
-
readonly kind: "native-plugin-bundle";
|
|
505
|
-
readonly path: "<generated-plugin>/skills/";
|
|
506
|
-
readonly summary: "Compiled bundles own targeted skills; skills-only plugins still install direct skills.";
|
|
507
|
-
};
|
|
508
|
-
readonly generatedTools: {
|
|
509
|
-
readonly kind: "direct-file";
|
|
510
|
-
readonly path: "<prism-home>/runtime/tools/<plugin>/runtime.mjs";
|
|
511
|
-
readonly summary: "Canonical tools lower to the CLI runtime; agents invoke via `prism tools invoke`.";
|
|
512
|
-
};
|
|
513
|
-
readonly hooks: {
|
|
514
|
-
readonly kind: "native-plugin-bundle";
|
|
515
|
-
readonly path: "<generated-plugin>/hooks/hooks.json";
|
|
516
|
-
readonly summary: "Hooks are bundled in Factory plugin format.";
|
|
517
|
-
};
|
|
518
|
-
readonly agentConfig: {
|
|
519
|
-
readonly kind: "native-plugin-bundle";
|
|
520
|
-
readonly path: "<generated-plugin>/droids/";
|
|
521
|
-
readonly summary: "Droid settings live in generated frontmatter.";
|
|
522
|
-
};
|
|
523
|
-
};
|
|
524
|
-
};
|
|
525
466
|
readonly pi: {
|
|
526
467
|
readonly harness: "pi";
|
|
527
468
|
readonly family: "coding-harness";
|
|
528
469
|
readonly workflowWorker: false;
|
|
470
|
+
readonly workflowEffort: null;
|
|
529
471
|
readonly compile: CompileTargetCapabilities;
|
|
530
472
|
readonly surfaces: {
|
|
531
473
|
readonly pluginBundle: {
|
|
@@ -575,6 +517,11 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
575
517
|
readonly harness: "omp";
|
|
576
518
|
readonly family: "coding-harness";
|
|
577
519
|
readonly workflowWorker: true;
|
|
520
|
+
readonly workflowEffort: {
|
|
521
|
+
readonly kind: "fixed";
|
|
522
|
+
readonly control: "--thinking";
|
|
523
|
+
readonly values: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max", "auto"];
|
|
524
|
+
};
|
|
578
525
|
readonly compile: CompileTargetCapabilities;
|
|
579
526
|
readonly surfaces: {
|
|
580
527
|
readonly pluginBundle: {
|
|
@@ -624,6 +571,10 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
624
571
|
readonly harness: "grok";
|
|
625
572
|
readonly family: "coding-harness";
|
|
626
573
|
readonly workflowWorker: true;
|
|
574
|
+
readonly workflowEffort: {
|
|
575
|
+
readonly kind: "catalog";
|
|
576
|
+
readonly control: "--reasoning-effort";
|
|
577
|
+
};
|
|
627
578
|
readonly compile: CompileTargetCapabilities;
|
|
628
579
|
readonly surfaces: {
|
|
629
580
|
readonly pluginBundle: {
|
|
@@ -668,6 +619,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
668
619
|
readonly harness: "devin";
|
|
669
620
|
readonly family: "coding-harness";
|
|
670
621
|
readonly workflowWorker: true;
|
|
622
|
+
readonly workflowEffort: null;
|
|
671
623
|
readonly compile: {
|
|
672
624
|
readonly agents: "unsupported";
|
|
673
625
|
readonly agentModelBindings: "ignored";
|
|
@@ -701,6 +653,12 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
701
653
|
};
|
|
702
654
|
};
|
|
703
655
|
export declare const getCompileTargetCapabilities: (harness: string) => CompileTargetCapabilities;
|
|
656
|
+
/**
|
|
657
|
+
* Whether a harness has any install/compile surface Prism can write. A harness
|
|
658
|
+
* without one (workflow-worker-only, e.g. amp-runner) is never an implicit
|
|
659
|
+
* install target: not in `--all`, not in installed-harness auto-detect.
|
|
660
|
+
*/
|
|
661
|
+
export declare const harnessHasInstallSurface: (harness: HarnessId) => boolean;
|
|
704
662
|
/**
|
|
705
663
|
* Harness ids flagged `workflowWorker: true` above — computed at the type
|
|
706
664
|
* level from the literal `as const` table, so it narrows exactly (no wider
|
|
@@ -711,5 +669,12 @@ export declare const getCompileTargetCapabilities: (harness: string) => CompileT
|
|
|
711
669
|
export type WorkflowWorkerHarnessId = {
|
|
712
670
|
[K in HarnessId]: (typeof LOWERER_CAPABILITIES)[K]["workflowWorker"] extends true ? K : never;
|
|
713
671
|
}[HarnessId];
|
|
672
|
+
/** Workflow effort capability ids, derived from the same harness registry. */
|
|
673
|
+
export type WorkflowEffortWorkerHarnessId = {
|
|
674
|
+
[K in WorkflowWorkerHarnessId]: NonNullable<(typeof LOWERER_CAPABILITIES)[K]["workflowEffort"]> extends never ? never : K;
|
|
675
|
+
}[WorkflowWorkerHarnessId];
|
|
676
|
+
export type WorkflowEffortCapabilityFor<Harness extends HarnessId> = (typeof LOWERER_CAPABILITIES)[Harness]["workflowEffort"];
|
|
714
677
|
/** Harness ids that can be dispatched as Prism Workflows workers, derived from the `workflowWorker` bit. */
|
|
715
678
|
export declare const workflowWorkerHarnessIds: () => readonly WorkflowWorkerHarnessId[];
|
|
679
|
+
/** Harness ids with a verified per-task effort control, derived from the registry. */
|
|
680
|
+
export declare const workflowEffortWorkerHarnessIds: () => readonly WorkflowEffortWorkerHarnessId[];
|