@skastr0/prism-linux-x64 0.5.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.
Files changed (48) hide show
  1. package/bin/prism +2 -2
  2. package/package.json +3 -3
  3. package/types/amp-projects.d.ts +39 -0
  4. package/types/amp-runners.d.ts +71 -0
  5. package/types/ast-to-json-schema.d.ts +46 -0
  6. package/types/compile/errors.d.ts +57 -79
  7. package/types/compile/runtime/schema-bridge.d.ts +15 -12
  8. package/types/errors.d.ts +24 -34
  9. package/types/fs.d.ts +2 -2
  10. package/types/harness-types-discover.d.ts +34 -0
  11. package/types/harness-types.d.ts +12 -0
  12. package/types/index.d.ts +21 -2
  13. package/types/jev.d.ts +254 -0
  14. package/types/lowerer-capabilities.d.ts +104 -118
  15. package/types/prism-home.d.ts +3 -4
  16. package/types/services/jev.d.ts +131 -0
  17. package/types/types.d.ts +3 -13
  18. package/types/workflow-amp-remote-worker.d.ts +69 -0
  19. package/types/workflow-amp-worker.d.ts +89 -0
  20. package/types/workflow-antigravity-pty.d.ts +22 -0
  21. package/types/workflow-antigravity-worker.d.ts +84 -0
  22. package/types/workflow-bun-runtime.d.ts +2 -0
  23. package/types/workflow-claude-worker.d.ts +36 -0
  24. package/types/workflow-cli-command.d.ts +1 -0
  25. package/types/workflow-codex-worker.d.ts +36 -0
  26. package/types/workflow-cursor-worker.d.ts +24 -0
  27. package/types/workflow-devin-worker.d.ts +25 -0
  28. package/types/workflow-effort.d.ts +18 -0
  29. package/types/workflow-grok-worker.d.ts +32 -0
  30. package/types/workflow-harness-detection.d.ts +5 -8
  31. package/types/workflow-hermes-worker.d.ts +28 -0
  32. package/types/workflow-identity.d.ts +35 -6
  33. package/types/workflow-kimi-effort.d.ts +17 -0
  34. package/types/workflow-kimi-worker.d.ts +27 -0
  35. package/types/workflow-omp-worker.d.ts +49 -0
  36. package/types/workflow-opencode-worker.d.ts +26 -0
  37. package/types/workflow-output-schema.d.ts +6 -0
  38. package/types/workflow-permissions.d.ts +10 -0
  39. package/types/workflow-process-guard.d.ts +28 -0
  40. package/types/workflow-runner.d.ts +15 -1
  41. package/types/workflow-scheduler/cron.d.ts +60 -0
  42. package/types/workflow-scheduler/errors.d.ts +71 -0
  43. package/types/workflow-scheduler/schedule.d.ts +61 -0
  44. package/types/workflow-session.d.ts +46 -29
  45. package/types/workflow-store.d.ts +142 -7
  46. package/types/workflow-worker-process.d.ts +40 -0
  47. package/types/workflow-workers.d.ts +50 -0
  48. package/types/workflows.d.ts +204 -23
package/types/jev.d.ts ADDED
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Jev (TypeSafe System One) vocabulary for Prism: question constructors,
3
+ * request validation/normalization, and request-correlated result codecs.
4
+ *
5
+ * This module is pure: no services, no environment access, no network. The
6
+ * wire contract is verified against `@typesafe-ai/sdk` v0.6.0 (`src/types.ts`)
7
+ * — these types are readonly mirrors of that contract, not a second
8
+ * interpretation of System One.
9
+ *
10
+ * Terminology follows the SDK and docs.typesafe.ai verbatim:
11
+ * - A *state* is the content evaluated (`EntryType`): string, JSON object,
12
+ * JSON array, or null — never a bare boolean/number at the top level.
13
+ * - *Questions* are named, independent judgments over one shared state:
14
+ * `choice` (which option), `score` (which rubric level), `noul`
15
+ * (probability of yes). All questions in one request see the same state and
16
+ * are evaluated independently — batching many questions per request is the
17
+ * platform idiom (docs: 13 questions in one call = 12.2x cheaper, 10x
18
+ * faster, byte-identical answers).
19
+ * - Answers are typed per question and constrained to the supplied criteria:
20
+ * choice `{choice, confidence, probabilities}`, score `{score, confidence,
21
+ * legend, probabilities}`, noul `{noul}`. Noul has no separate confidence.
22
+ *
23
+ * The request's token budget (~32k tokens, state and questions share it) is
24
+ * enforced pre-flight by the service layer in `src/services/jev.ts`; this
25
+ * module owns the estimator so tool handlers and workflows share one oracle.
26
+ */
27
+ import { Schema } from "effect";
28
+ /** Any JSON value. Readonly because decoded workflow data is readonly. */
29
+ export type JevJson = null | boolean | number | string | readonly JevJson[] | {
30
+ readonly [key: string]: JevJson;
31
+ };
32
+ /**
33
+ * A System One entry: text, a JSON object or array, or null. Bare booleans
34
+ * and numbers are excluded at the top level, matching the SDK's `EntryType`.
35
+ */
36
+ export type JevEntry = null | string | readonly JevJson[] | {
37
+ readonly [key: string]: JevJson;
38
+ };
39
+ /** Choice labels mapped to descriptions (`null` leaves a label undescribed). */
40
+ export type JevChoiceCriteria = Readonly<Record<string, JevEntry>>;
41
+ /** An ordered rubric with at least two levels. */
42
+ export type JevScoreCriteria = readonly [JevEntry, JevEntry, ...JevEntry[]];
43
+ /** A question that selects between named alternatives. */
44
+ export interface JevChoiceQuestion<Criteria extends JevChoiceCriteria = JevChoiceCriteria> {
45
+ readonly type: "choice";
46
+ readonly instructions?: JevEntry;
47
+ readonly criteria: Criteria;
48
+ }
49
+ /** A question that assigns an ordered-rubric score. */
50
+ export interface JevScoreQuestion<Criteria extends JevScoreCriteria = JevScoreCriteria> {
51
+ readonly type: "score";
52
+ readonly instructions?: JevEntry;
53
+ readonly criteria: Criteria;
54
+ }
55
+ /** A yes/no question answered as a probability of yes. */
56
+ export interface JevNoulQuestion {
57
+ readonly type: "noul";
58
+ readonly instructions?: JevEntry;
59
+ readonly criteria?: {
60
+ readonly true?: JevEntry;
61
+ readonly false?: JevEntry;
62
+ } | null;
63
+ }
64
+ export type JevQuestion = JevChoiceQuestion | JevScoreQuestion | JevNoulQuestion;
65
+ /** Questions keyed by the author-chosen IDs identifying their answers. */
66
+ export type JevQuestions = Readonly<Record<string, JevQuestion>>;
67
+ /** Rubric index keys for a concrete score criteria tuple. */
68
+ export type JevScoreKey<C extends JevScoreCriteria> = number extends C["length"] ? number : Extract<keyof C, `${number}`>;
69
+ /** The answer type for a question, preserving its criteria keys. */
70
+ export type JevResultFor<Q extends JevQuestion> = Q extends JevChoiceQuestion<infer C> ? {
71
+ readonly type: "choice";
72
+ readonly choice: `${keyof C & (string | number)}`;
73
+ readonly confidence: number;
74
+ readonly probabilities: {
75
+ readonly [K in keyof C]: number;
76
+ };
77
+ } : Q extends JevScoreQuestion<infer C> ? {
78
+ readonly type: "score";
79
+ readonly score: number;
80
+ readonly confidence: number;
81
+ readonly legend: {
82
+ readonly [K in JevScoreKey<C>]: C[K];
83
+ };
84
+ readonly probabilities: {
85
+ readonly [K in JevScoreKey<C>]: number;
86
+ };
87
+ } : Q extends JevNoulQuestion ? {
88
+ readonly type: "noul";
89
+ readonly noul: number;
90
+ } : never;
91
+ /** Answers keyed by question ID, typed per question. */
92
+ export type JevAnswers<Q extends JevQuestions> = {
93
+ readonly [K in keyof Q]: JevResultFor<Q[K]>;
94
+ };
95
+ /** Token usage for a request. */
96
+ export interface JevUsage {
97
+ readonly input_tokens: number;
98
+ readonly output_tokens: number;
99
+ }
100
+ /** The full System One result: answers with model and usage metadata. */
101
+ export interface JevResult<Q extends JevQuestions> {
102
+ readonly model: string;
103
+ readonly answers: JevAnswers<Q>;
104
+ readonly usage: JevUsage;
105
+ }
106
+ /** State and named questions for one System One call. */
107
+ export interface JevRequest<Q extends JevQuestions = JevQuestions> {
108
+ readonly state: JevEntry;
109
+ readonly questions: Q;
110
+ readonly model?: string;
111
+ }
112
+ export declare class JevRequestValidationError extends Error {
113
+ readonly reason: string;
114
+ readonly path?: string | undefined;
115
+ readonly name = "JevRequestValidationError";
116
+ constructor(reason: string, path?: string | undefined);
117
+ }
118
+ /**
119
+ * Validate a System One entry (state, instructions, criterion description),
120
+ * returning a deep-frozen deep copy. Mirrors the SDK's `EntryType`: string,
121
+ * plain JSON object/array, or null.
122
+ */
123
+ export declare const normalizeJevEntry: (value: unknown, path?: string) => JevEntry;
124
+ /**
125
+ * Validate a questions map and return a deep-frozen deep copy with the same
126
+ * static type. At least one question is required.
127
+ */
128
+ export declare const normalizeJevQuestions: <const Q extends JevQuestions>(questions: Q) => Q;
129
+ /**
130
+ * Validate and freeze a full request (state + questions + optional model).
131
+ * Unexpected top-level fields are rejected rather than silently dropped so
132
+ * worker-task fields (prompt/worker/finish) can never leak into a Jev call.
133
+ */
134
+ export declare const normalizeJevRequest: <const Q extends JevQuestions>(request: JevRequest<Q>) => JevRequest<Q>;
135
+ /** Decode an unknown value (e.g. tool CLI input) into a normalized request. */
136
+ export declare const parseJevRequest: (input: unknown) => JevRequest<JevQuestions>;
137
+ /**
138
+ * Documented per-request token budget shared by state and questions
139
+ * (docs.typesafe.ai: "around 32,000 tokens").
140
+ */
141
+ export declare const JEV_TOKEN_BUDGET = 32000;
142
+ /**
143
+ * Soft target Prism enforces pre-flight. Below the hard budget so a request
144
+ * that passes locally still fits after SDK serialization differences.
145
+ */
146
+ export declare const JEV_TOKEN_REQUEST_TARGET = 28000;
147
+ /**
148
+ * Rough request token estimate: JSON payload characters / 4, the standard
149
+ * heuristic. Used only for pre-flight guidance, never as billing data.
150
+ */
151
+ export declare const estimateJevRequestTokens: (request: JevRequest<JevQuestions>) => number;
152
+ export declare function choice<const C extends JevChoiceCriteria>(definition: Omit<JevChoiceQuestion<C>, "type">): JevChoiceQuestion<C>;
153
+ export declare function score<const C extends JevScoreCriteria>(definition: Omit<JevScoreQuestion<C>, "type">): JevScoreQuestion<C>;
154
+ export declare function noul(definition?: Omit<JevNoulQuestion, "type">): JevNoulQuestion;
155
+ /**
156
+ * Result contract version, folded into workflow identity hashing so a change
157
+ * in these codecs invalidates cached outputs deliberately rather than
158
+ * silently.
159
+ */
160
+ export declare const JEV_RESULT_CONTRACT_VERSION: 1;
161
+ /** A service-free codec for the full request-correlated System One result. */
162
+ export type JevResultCodec<Q extends JevQuestions> = Schema.Codec<JevResult<Q>, JevResult<Q>, never, never>;
163
+ /**
164
+ * Derive the result codec for a questions map. Answer keys, choice labels,
165
+ * probability keys, and score legends all come from the request, so a
166
+ * response disagreeing with its own questions fails decode.
167
+ *
168
+ * Localized assertion: the struct is built from runtime key maps whose key
169
+ * sets provably equal `keyof Q` / the criteria keys (same construction loop
170
+ * as `normalizeJevQuestions`), but TypeScript cannot see through
171
+ * `Object.fromEntries`; the cast maps the runtime struct onto
172
+ * `JevResultCodec<Q>`. Covered by runtime decode tests and dsl-type tests.
173
+ */
174
+ export declare const jevResultSchema: <const Q extends JevQuestions>(questions: Q) => JevResultCodec<Q>;
175
+ export declare const JEV_PROBE_MODEL = "jev-probe";
176
+ /**
177
+ * A deterministic, schema-valid System One result used by workflow validation
178
+ * probes, where no live API call is made: every answer selects the first
179
+ * declared criterion (score index 0, noul 0) with a concentrated probability
180
+ * distribution, so branch-sensitive `run:` graphs walk the same stable path on
181
+ * every probe. Always decodes against `jevResultSchema(questions)`. This is a
182
+ * witness, not a simulation of what System One would answer.
183
+ */
184
+ export declare const jevProbeResult: <const Q extends JevQuestions>(questions: Q) => JevResult<Q>;
185
+ export declare const JevQuestionPresentation: Schema.Union<readonly [Schema.Struct<{
186
+ readonly type: Schema.Literal<"choice">;
187
+ readonly instructions: Schema.optionalKey<Schema.Unknown>;
188
+ readonly criteria: Schema.$Record<Schema.String, Schema.Unknown>;
189
+ }>, Schema.Struct<{
190
+ readonly type: Schema.Literal<"score">;
191
+ readonly instructions: Schema.optionalKey<Schema.Unknown>;
192
+ readonly criteria: Schema.$Array<Schema.Unknown>;
193
+ }>, Schema.Struct<{
194
+ readonly type: Schema.Literal<"noul">;
195
+ readonly instructions: Schema.optionalKey<Schema.Unknown>;
196
+ readonly criteria: Schema.optionalKey<Schema.NullOr<Schema.Struct<{
197
+ readonly true: Schema.optionalKey<Schema.Unknown>;
198
+ readonly false: Schema.optionalKey<Schema.Unknown>;
199
+ }>>>;
200
+ }>]>;
201
+ export declare const JevSystemOneInputSchema: Schema.Struct<{
202
+ readonly state: Schema.Unknown;
203
+ readonly questions: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
204
+ readonly type: Schema.Literal<"choice">;
205
+ readonly instructions: Schema.optionalKey<Schema.Unknown>;
206
+ readonly criteria: Schema.$Record<Schema.String, Schema.Unknown>;
207
+ }>, Schema.Struct<{
208
+ readonly type: Schema.Literal<"score">;
209
+ readonly instructions: Schema.optionalKey<Schema.Unknown>;
210
+ readonly criteria: Schema.$Array<Schema.Unknown>;
211
+ }>, Schema.Struct<{
212
+ readonly type: Schema.Literal<"noul">;
213
+ readonly instructions: Schema.optionalKey<Schema.Unknown>;
214
+ readonly criteria: Schema.optionalKey<Schema.NullOr<Schema.Struct<{
215
+ readonly true: Schema.optionalKey<Schema.Unknown>;
216
+ readonly false: Schema.optionalKey<Schema.Unknown>;
217
+ }>>>;
218
+ }>]>>;
219
+ readonly model: Schema.optionalKey<Schema.String>;
220
+ }>;
221
+ /**
222
+ * Jev decode boundaries fail on excess properties rather than stripping
223
+ * them: a misspelled question field (`instruction` vs `instructions`) must
224
+ * not silently vanish from the request, and an answer with extra IDs or
225
+ * probability labels is not a response to the request that was sent. The
226
+ * presentation/result schemas below describe Records partly (probability
227
+ * maps are `Record(String, Number)`), so only struct-level strictness takes
228
+ * effect — the request-correlated literal keys do the rest.
229
+ */
230
+ export declare const JEV_STRICT_PARSE_OPTIONS: {
231
+ onExcessProperty: "error";
232
+ };
233
+ export declare const JevSystemOneResultSchema: Schema.Struct<{
234
+ readonly model: Schema.String;
235
+ readonly answers: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
236
+ readonly type: Schema.Literal<"choice">;
237
+ readonly choice: Schema.String;
238
+ readonly confidence: Schema.Number;
239
+ readonly probabilities: Schema.$Record<Schema.String, Schema.Number>;
240
+ }>, Schema.Struct<{
241
+ readonly type: Schema.Literal<"score">;
242
+ readonly score: Schema.Number;
243
+ readonly confidence: Schema.Number;
244
+ readonly legend: Schema.$Record<Schema.String, Schema.Unknown>;
245
+ readonly probabilities: Schema.$Record<Schema.String, Schema.Number>;
246
+ }>, Schema.Struct<{
247
+ readonly type: Schema.Literal<"noul">;
248
+ readonly noul: Schema.Number;
249
+ }>]>>;
250
+ readonly usage: Schema.Struct<{
251
+ readonly input_tokens: Schema.Number;
252
+ readonly output_tokens: Schema.Number;
253
+ }>;
254
+ }>;
@@ -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: {
@@ -363,10 +328,54 @@ export declare const LOWERER_CAPABILITIES: {
363
328
  };
364
329
  readonly notes: readonly ["The active Kimi Code target uses ~/.kimi-code exclusively.", "Kimi Code plugins are user-scoped in official docs; Prism keeps project scope unsupported for this lowerer.", "Current Moonshot-hosted Kimi Code CLI docs also document project-local .kimi-code/skills and .kimi-code/mcp.json, but Prism does not mix those direct project surfaces with generated user-scoped plugin bundles yet.", "Kimi Code subagents are runtime dispatches, so Prism compiled agents lower as role skills rather than native subagent definitions."];
365
330
  };
331
+ readonly "amp-orb": {
332
+ readonly harness: "amp-orb";
333
+ readonly family: "coding-harness";
334
+ readonly workflowWorker: true;
335
+ readonly workflowEffort: null;
336
+ readonly compile: CompileTargetCapabilities;
337
+ readonly surfaces: {
338
+ readonly pluginBundle: LowererSurfaceCapability;
339
+ readonly rules: LowererSurfaceCapability;
340
+ readonly commands: LowererSurfaceCapability;
341
+ readonly agents: LowererSurfaceCapability;
342
+ readonly skills: {
343
+ readonly kind: "direct-file";
344
+ readonly path: "<amp-orb-checkout>/<skill>/SKILL.md";
345
+ readonly summary: "Install writes flat text skill directories into an explicit hosted skills checkout.";
346
+ };
347
+ readonly generatedTools: LowererSurfaceCapability;
348
+ readonly hooks: LowererSurfaceCapability;
349
+ readonly agentConfig: LowererSurfaceCapability;
350
+ };
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."];
370
+ };
366
371
  readonly "amp-code": {
367
372
  readonly harness: "amp-code";
368
373
  readonly family: "coding-harness";
369
374
  readonly workflowWorker: true;
375
+ readonly workflowEffort: {
376
+ readonly kind: "catalog";
377
+ readonly control: "plugin-mode.reasoningEffort";
378
+ };
370
379
  readonly compile: CompileTargetCapabilities;
371
380
  readonly surfaces: {
372
381
  readonly pluginBundle: {
@@ -412,6 +421,7 @@ export declare const LOWERER_CAPABILITIES: {
412
421
  readonly harness: "cursor";
413
422
  readonly family: "coding-harness";
414
423
  readonly workflowWorker: true;
424
+ readonly workflowEffort: null;
415
425
  readonly compile: CompileTargetCapabilities;
416
426
  readonly surfaces: {
417
427
  readonly pluginBundle: {
@@ -453,58 +463,11 @@ export declare const LOWERER_CAPABILITIES: {
453
463
  };
454
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."];
455
465
  };
456
- readonly "factory-droid": {
457
- readonly harness: "factory-droid";
458
- readonly family: "coding-harness";
459
- readonly workflowWorker: false;
460
- readonly compile: CompileTargetCapabilities;
461
- readonly surfaces: {
462
- readonly pluginBundle: {
463
- readonly kind: "native-plugin-bundle";
464
- readonly path: "<factory-root>/plugins/prism-generated-<plugin>/";
465
- readonly summary: "Compile emits Factory plugin bundles with .factory-plugin/plugin.json.";
466
- };
467
- readonly rules: {
468
- readonly kind: "direct-file";
469
- readonly path: "<factory-root>/AGENTS.md or rules/";
470
- readonly summary: "Install writes Factory instruction/rule files.";
471
- };
472
- readonly commands: {
473
- readonly kind: "direct-file";
474
- readonly path: "<factory-root>/commands/";
475
- readonly summary: "Install writes Factory command markdown files.";
476
- };
477
- readonly agents: {
478
- readonly kind: "native-plugin-bundle";
479
- readonly path: "<generated-plugin>/droids/";
480
- readonly summary: "Compile writes generated droids inside the Factory plugin bundle.";
481
- };
482
- readonly skills: {
483
- readonly kind: "native-plugin-bundle";
484
- readonly path: "<generated-plugin>/skills/";
485
- readonly summary: "Compiled bundles own targeted skills; skills-only plugins still install direct skills.";
486
- };
487
- readonly generatedTools: {
488
- readonly kind: "direct-file";
489
- readonly path: "<prism-home>/runtime/tools/<plugin>/runtime.mjs";
490
- readonly summary: "Canonical tools lower to the CLI runtime; agents invoke via `prism tools invoke`.";
491
- };
492
- readonly hooks: {
493
- readonly kind: "native-plugin-bundle";
494
- readonly path: "<generated-plugin>/hooks/hooks.json";
495
- readonly summary: "Hooks are bundled in Factory plugin format.";
496
- };
497
- readonly agentConfig: {
498
- readonly kind: "native-plugin-bundle";
499
- readonly path: "<generated-plugin>/droids/";
500
- readonly summary: "Droid settings live in generated frontmatter.";
501
- };
502
- };
503
- };
504
466
  readonly pi: {
505
467
  readonly harness: "pi";
506
468
  readonly family: "coding-harness";
507
469
  readonly workflowWorker: false;
470
+ readonly workflowEffort: null;
508
471
  readonly compile: CompileTargetCapabilities;
509
472
  readonly surfaces: {
510
473
  readonly pluginBundle: {
@@ -554,6 +517,11 @@ export declare const LOWERER_CAPABILITIES: {
554
517
  readonly harness: "omp";
555
518
  readonly family: "coding-harness";
556
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
+ };
557
525
  readonly compile: CompileTargetCapabilities;
558
526
  readonly surfaces: {
559
527
  readonly pluginBundle: {
@@ -603,6 +571,10 @@ export declare const LOWERER_CAPABILITIES: {
603
571
  readonly harness: "grok";
604
572
  readonly family: "coding-harness";
605
573
  readonly workflowWorker: true;
574
+ readonly workflowEffort: {
575
+ readonly kind: "catalog";
576
+ readonly control: "--reasoning-effort";
577
+ };
606
578
  readonly compile: CompileTargetCapabilities;
607
579
  readonly surfaces: {
608
580
  readonly pluginBundle: {
@@ -647,6 +619,7 @@ export declare const LOWERER_CAPABILITIES: {
647
619
  readonly harness: "devin";
648
620
  readonly family: "coding-harness";
649
621
  readonly workflowWorker: true;
622
+ readonly workflowEffort: null;
650
623
  readonly compile: {
651
624
  readonly agents: "unsupported";
652
625
  readonly agentModelBindings: "ignored";
@@ -680,6 +653,12 @@ export declare const LOWERER_CAPABILITIES: {
680
653
  };
681
654
  };
682
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;
683
662
  /**
684
663
  * Harness ids flagged `workflowWorker: true` above — computed at the type
685
664
  * level from the literal `as const` table, so it narrows exactly (no wider
@@ -690,5 +669,12 @@ export declare const getCompileTargetCapabilities: (harness: string) => CompileT
690
669
  export type WorkflowWorkerHarnessId = {
691
670
  [K in HarnessId]: (typeof LOWERER_CAPABILITIES)[K]["workflowWorker"] extends true ? K : never;
692
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"];
693
677
  /** Harness ids that can be dispatched as Prism Workflows workers, derived from the `workflowWorker` bit. */
694
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[];
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  export declare const PRISM_CONFIG_SCHEMA_VERSION = 1;
3
3
  export declare const DEFAULT_BACKUP_RETENTION_PER_TARGET = 3;
4
- export declare const BackupModeSchema: Schema.Literal<["always", "never"]>;
4
+ export declare const BackupModeSchema: Schema.Literals<readonly ["always", "never"]>;
5
5
  export type BackupMode = typeof BackupModeSchema.Type;
6
6
  export interface PrismBackupConfig {
7
7
  readonly mode: BackupMode;
@@ -15,7 +15,7 @@ export interface PrismConfig {
15
15
  * Resolve the Prism home directory from an override or the environment.
16
16
  *
17
17
  * WS2+: new code must NOT call this from library modules — consume the
18
- * `PrismHome` Context.Tag from src/services/prism-env.ts instead; the env
18
+ * `PrismHome` service from src/services/prism-env.ts instead; the env
19
19
  * read happens exactly once at the CLI edge layer.
20
20
  */
21
21
  export declare const resolvePrismHome: (override?: string) => string;
@@ -27,8 +27,7 @@ export declare const prismBackupDir: (prismHome?: string) => string;
27
27
  * Workflows are ephemeral orchestration instruments that reference their
28
28
  * target repos by absolute path, so they belong in the home root, never
29
29
  * inside (or `git add`-ed into) the project they operate on — see the
30
- * "Where workflow files live" section of the prism workflow-authoring skill.
31
- * `prism workflow scaffold` writes here by default (PQ-176).
30
+ * "Author from the goal" section of the prism workflow-authoring skill.
32
31
  */
33
32
  export declare const prismWorkflowsSourceDir: (prismHome?: string) => string;
34
33
  export declare const defaultPrismConfig: () => PrismConfig;