@skastr0/prism-linux-x64 0.4.4 → 0.5.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/types/index.d.ts CHANGED
@@ -3,9 +3,7 @@
3
3
  *
4
4
  * The canonical structured source model is TypeScript-first:
5
5
  * - agents/*.agent.ts
6
- * - traits/*.trait.ts
7
- * - orbits/*.orbit.ts
8
- * - toolspaces/*.toolspace.ts
6
+ * - sops/*.sop.ts
9
7
  * - modelspaces/*.modelspace.ts
10
8
  * - skillspaces/*.skillspace.ts
11
9
  * - hooks/*.hook.ts
@@ -22,27 +20,9 @@ export interface NamedRefDefinition {
22
20
  readonly plugin?: string;
23
21
  readonly name: string;
24
22
  }
25
- export interface TraitRefDefinition extends NamedRefDefinition {
26
- readonly kind: "trait-ref";
27
- }
28
23
  export interface AgentRefDefinition extends NamedRefDefinition {
29
24
  readonly kind: "agent-ref";
30
25
  }
31
- export interface OrbitRefDefinition extends NamedRefDefinition {
32
- readonly kind: "orbit-ref";
33
- }
34
- export interface ToolRefDefinition {
35
- readonly kind: "tool-ref";
36
- readonly plugin?: string;
37
- readonly toolspace: string;
38
- readonly name: string;
39
- }
40
- export interface ToolGroupRefDefinition {
41
- readonly kind: "tool-group-ref";
42
- readonly plugin?: string;
43
- readonly toolspace: string;
44
- readonly name: string;
45
- }
46
26
  export interface ModelProfileRefDefinition {
47
27
  readonly kind: "model-profile-ref";
48
28
  readonly plugin?: string;
@@ -60,27 +40,16 @@ export interface SkillspaceRefDefinition {
60
40
  readonly skillspace: string;
61
41
  readonly name: string;
62
42
  }
63
- export type TraitRefInput = string | TraitRefDefinition;
64
43
  export type AgentRefInput = string | AgentRefDefinition;
65
- export type OrbitRefInput = string | OrbitRefDefinition;
66
- export type ToolRefInput = string | ToolRefDefinition;
67
- export type ToolGroupRefInput = string | ToolGroupRefDefinition;
68
44
  export type ModelProfileRefInput = string | ModelProfileRefDefinition;
69
45
  export type SkillRefInput = SkillRefDefinition | SkillspaceRefDefinition;
70
46
  export type EffectSchemaValue = import("effect").Schema.Schema.AnyNoContext;
71
- export interface AccessDefinition {
72
- readonly tools?: ReadonlyArray<ToolRefInput>;
73
- readonly toolGroups?: ReadonlyArray<ToolGroupRefInput>;
74
- readonly skills?: ReadonlyArray<SkillRefInput>;
75
- }
76
47
  export interface AgentDefinition {
77
48
  readonly name: string;
78
49
  readonly description: string;
79
50
  readonly identity: string;
80
51
  readonly personality?: string;
81
52
  readonly model?: ModelProfileRefInput;
82
- readonly traits?: ReadonlyArray<TraitRefInput | TraitBindingSource>;
83
- readonly access?: AccessDefinition;
84
53
  readonly skills?: ReadonlyArray<SkillRefInput>;
85
54
  readonly color?: string;
86
55
  readonly targets?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
@@ -95,192 +64,37 @@ export interface CanonicalToolDefinition {
95
64
  readonly handle: (input: unknown, context: import("./compile/runtime/schema-bridge").ToolRuntimeContext) => Promise<unknown>;
96
65
  }
97
66
  export type ToolSource = CanonicalToolDefinition;
98
- export interface TraitDefinition {
99
- readonly name: string;
100
- readonly description?: string;
101
- readonly instructions?: string | ReadonlyArray<string>;
102
- readonly access?: AccessDefinition;
103
- readonly tools?: Readonly<Record<string, TraitToolAttachmentDefinition>>;
104
- readonly inject?: {
105
- readonly skills?: ReadonlyArray<SkillRefInput>;
106
- };
107
- readonly require?: {
108
- readonly tools?: ReadonlyArray<string>;
109
- readonly skills?: ReadonlyArray<SkillRefInput>;
110
- };
111
- }
112
- export type TraitSource = TraitDefinition;
113
- export interface TraitBindingDefinition {
114
- readonly kind: "trait-binding";
115
- readonly trait: TraitRefInput;
116
- readonly tools?: Readonly<Record<string, TraitBindingToolDefinition>>;
117
- }
118
- export interface PlainTraitBindingDefinition {
119
- readonly trait: TraitRefInput;
120
- readonly tools?: Readonly<Record<string, TraitBindingToolDefinition>>;
121
- }
122
- export type TraitBindingSource = TraitBindingDefinition | PlainTraitBindingDefinition;
123
67
  export interface ToolSchemaSlotDefinition {
124
68
  readonly kind: "schema";
125
69
  readonly description?: string;
126
70
  }
127
71
  export type ToolSlotDefinition = ToolSchemaSlotDefinition;
128
- export interface TraitBindingToolDefinition {
129
- readonly slots?: Readonly<Record<string, EffectSchemaValue>>;
130
- }
131
- export interface TraitToolAttachmentDefinition {
132
- readonly ref: string;
133
- }
134
- export interface OrbitParameterDefinition {
135
- readonly name: string;
136
- readonly description?: string;
137
- readonly required?: boolean;
138
- }
139
- export interface OrbitBindingDefinition {
140
- readonly orbit: OrbitRefInput;
141
- readonly bindings?: Readonly<Record<string, string>>;
142
- }
143
- export interface OrbitTraitRequirementDefinition {
144
- readonly all: ReadonlyArray<TraitRefInput>;
145
- readonly min?: number;
146
- }
147
- export type OrbitToolPermissionToolDefinition = string | {
148
- readonly ref: string;
149
- readonly as?: string;
150
- };
151
- export interface OrbitOrchestratorDefinition {
152
- readonly agent: AgentRefInput;
153
- readonly tools: ReadonlyArray<OrbitToolPermissionToolDefinition>;
154
- }
155
- export interface OrbitPhaseWorkflowDefinition {
156
- readonly when?: string;
157
- readonly inputs?: ReadonlyArray<string>;
158
- readonly outputs?: ReadonlyArray<string>;
159
- readonly sequence?: ReadonlyArray<string>;
160
- readonly coordination?: string;
161
- readonly finish_criteria?: ReadonlyArray<string>;
162
- readonly escalation?: string;
163
- }
164
- export interface OrbitPhaseDefinition {
72
+ export interface SopPhaseDefinition {
165
73
  readonly name: string;
166
- readonly orbit?: OrbitRefInput;
167
- readonly orbit_binding?: OrbitBindingDefinition;
168
- readonly agents?: ReadonlyArray<AgentRefInput>;
169
- readonly agent?: AgentRefInput;
170
- readonly requires?: ReadonlyArray<OrbitTraitRequirementDefinition>;
171
- readonly notes?: Readonly<Record<string, string>>;
172
- /**
173
- * Short structured fields rendered into the root orbit SKILL.md per-phase
174
- * block. Use these to describe the phase at a glance; deep content belongs
175
- * in `body` (which lowers to `references/<phase>.md`).
176
- */
177
- readonly telos?: string;
178
- readonly real_world_change?: string;
179
- readonly cold_pickup_test?: string;
180
- /**
181
- * Generic workflow-authoring guidance for this phase. Prism renders this
182
- * into generated orbit skills, but does not attach runtime semantics to it.
183
- */
184
- readonly workflow?: OrbitPhaseWorkflowDefinition;
185
- /**
186
- * Typed workflow I/O contract for this phase. Serialized to JSON Schema in
187
- * the compile manifest for workflow runtimes; unsupported schema constructs
188
- * fail the compile.
189
- */
190
- readonly contract?: {
191
- readonly input?: import("effect/Schema").Schema.AnyNoContext;
192
- readonly output?: import("effect/Schema").Schema.AnyNoContext;
193
- };
194
- /**
195
- * Long-form markdown for this phase. When present, lowerers write it to
196
- * `references/<phase-name>.md` next to the orbit SKILL.md. Treat this as
197
- * the full phase download — telos, procrastination shapes, per-agent
198
- * focus, links to deeper modules.
199
- */
200
- readonly body?: string;
201
- }
202
- export interface OrbitPulsarCheckpointDefinition {
203
- readonly after?: string;
204
- readonly before?: string;
205
- readonly note?: string;
206
- }
207
- export type OrbitSignalEmitterPriority = "low" | "normal" | "high" | "urgent";
208
- export interface OrbitSignalEmitterDestinationDefinition {
209
- readonly project_key: string;
210
- readonly orbit: string;
211
- readonly default_priority?: OrbitSignalEmitterPriority;
212
- readonly note?: string;
213
- }
214
- export interface OrbitSignalEmitterDefinition {
215
- /**
216
- * Known destinations this orbit may emit signals to. Each entry is a
217
- * `project_key`/`orbit` pair, optionally with a default priority and a
218
- * note describing what the destination handles. Used as structural
219
- * documentation, as input for delegation-map validation, and as the
220
- * basis for tighter bound trait surfaces (e.g., per-destination
221
- * delegate wrappers) when wanted.
222
- *
223
- * Leaving this empty marks the orbit as an emitter without constraining
224
- * destinations — appropriate when the routing table is fluid or
225
- * authored entirely in agent doctrine. Filled destinations make the
226
- * permission surface explicit and reviewable.
227
- */
228
- readonly destinations?: ReadonlyArray<OrbitSignalEmitterDestinationDefinition>;
229
- }
230
- export interface OrbitDefinitionEntryDefinition {
231
74
  readonly purpose: string;
232
- readonly contains?: ReadonlyArray<string>;
233
- readonly boundaries?: ReadonlyArray<string>;
234
- readonly avoid?: ReadonlyArray<string>;
235
- }
236
- export interface OrbitDefinitionsDefinition {
237
- readonly glyphs?: OrbitDefinitionEntryDefinition;
238
- readonly dispatches?: OrbitDefinitionEntryDefinition;
239
- readonly chatter?: OrbitDefinitionEntryDefinition;
240
- readonly signals?: OrbitDefinitionEntryDefinition;
75
+ /** Optional typed phase input contract (Effect Schema). */
76
+ readonly input?: EffectSchemaValue;
77
+ /** Optional typed phase output contract (Effect Schema). */
78
+ readonly output?: EffectSchemaValue;
79
+ /** Judge-level bars a schema cannot express. */
80
+ readonly acceptance_criteria?: ReadonlyArray<string>;
81
+ /** When to stop and ask a human. */
82
+ readonly escalation?: string;
83
+ /** Full procedure prose for this phase — steps, failure modes, examples. */
84
+ readonly body: string;
241
85
  }
242
- export interface OrbitDefinition {
86
+ /**
87
+ * A SOP is a type-safe procedure. It may say what must be true; it never
88
+ * names who executes it, with what tool, or in what runtime.
89
+ */
90
+ export interface SopDefinition {
243
91
  readonly name: string;
244
92
  readonly description: string;
245
- readonly produces?: string;
246
- readonly definitions?: OrbitDefinitionsDefinition;
247
- readonly parameters?: ReadonlyArray<OrbitParameterDefinition>;
248
- readonly phases: ReadonlyArray<OrbitPhaseDefinition>;
249
- readonly orchestrator?: OrbitOrchestratorDefinition;
250
- readonly tool_permissions?: ReadonlyArray<OrbitToolPermissionToolDefinition>;
251
- readonly pulsar_checkpoints?: ReadonlyArray<OrbitPulsarCheckpointDefinition>;
252
- readonly evolution?: string;
93
+ readonly phases: ReadonlyArray<SopPhaseDefinition>;
94
+ /** Cross-phase frame for the whole procedure. */
253
95
  readonly body?: string;
254
- /**
255
- * When present, declares this orbit emits signals to other orbits — the
256
- * routing/delegation surface that is privileged separately from the
257
- * receive-side signal tools. Authors should attach the `signal-emitter`
258
- * trait (from the `oracle` plugin) to the orchestrator agent (and to
259
- * any other phase agent that authentically owns inter-orbit
260
- * delegation). Declared `destinations` make the routing surface
261
- * explicit and auditable.
262
- */
263
- readonly signal_emitter?: OrbitSignalEmitterDefinition;
264
- }
265
- export type OrbitSource = OrbitDefinition;
266
- export interface ToolTargetBindingDefinition {
267
- readonly name: string;
268
- }
269
- export interface ToolDefinition {
270
- readonly description?: string;
271
- readonly targets: Readonly<Record<string, ToolTargetBindingDefinition>>;
272
- }
273
- export interface ToolGroupDefinition {
274
- readonly description?: string;
275
- readonly tools: ReadonlyArray<ToolRefInput>;
276
96
  }
277
- export interface ToolspaceDefinition {
278
- readonly name: string;
279
- readonly description?: string;
280
- readonly tools: Readonly<Record<string, ToolDefinition>>;
281
- readonly groups?: Readonly<Record<string, ToolGroupDefinition>>;
282
- }
283
- export type ToolspaceSource = ToolspaceDefinition;
97
+ export type SopSource = SopDefinition;
284
98
  export interface ModelTargetDefinition {
285
99
  readonly model: string;
286
100
  readonly variant?: string;
@@ -493,19 +307,15 @@ export type HookHandlerDefinition<E extends HookEvent> = (event: HookEventPayloa
493
307
  export interface HookAnyToolMatcherDefinition {
494
308
  readonly kind: "hook-any-tool";
495
309
  }
496
- export interface HookToolspaceToolMatcherDefinition {
497
- readonly kind: "hook-toolspace-tool";
498
- readonly tool: ToolRefInput;
499
- }
500
- export interface HookToolspaceGroupMatcherDefinition {
501
- readonly kind: "hook-toolspace-group";
502
- readonly group: ToolGroupRefInput;
310
+ export interface HookNativeToolMatcherDefinition {
311
+ readonly kind: "hook-native-tool";
312
+ readonly name: string;
503
313
  }
504
314
  export interface HookCanonicalToolMatcherDefinition {
505
315
  readonly kind: "hook-canonical-tool";
506
316
  readonly ref: string;
507
317
  }
508
- export type HookToolMatcherDefinition = HookAnyToolMatcherDefinition | HookToolspaceToolMatcherDefinition | HookToolspaceGroupMatcherDefinition | HookCanonicalToolMatcherDefinition;
318
+ export type HookToolMatcherDefinition = HookAnyToolMatcherDefinition | HookNativeToolMatcherDefinition | HookCanonicalToolMatcherDefinition;
509
319
  export interface ToolHookMatchDefinition {
510
320
  readonly tool?: HookToolMatcherDefinition;
511
321
  }
@@ -528,16 +338,8 @@ export declare const withNamedRef: <TKind extends string>(kind: TKind, first: st
528
338
  readonly plugin?: string;
529
339
  readonly name: string;
530
340
  };
531
- export declare function traitRef(name: string): TraitRefDefinition;
532
- export declare function traitRef(plugin: string, name: string): TraitRefDefinition;
533
341
  export declare function agentRef(name: string): AgentRefDefinition;
534
342
  export declare function agentRef(plugin: string, name: string): AgentRefDefinition;
535
- export declare function orbitRef(name: string): OrbitRefDefinition;
536
- export declare function orbitRef(plugin: string, name: string): OrbitRefDefinition;
537
- export declare function toolRef(toolspace: string, name: string): ToolRefDefinition;
538
- export declare function toolRef(plugin: string, toolspace: string, name: string): ToolRefDefinition;
539
- export declare function toolGroupRef(toolspace: string, name: string): ToolGroupRefDefinition;
540
- export declare function toolGroupRef(plugin: string, toolspace: string, name: string): ToolGroupRefDefinition;
541
343
  export declare function modelProfileRef(modelspace: string, name: string): ModelProfileRefDefinition;
542
344
  export declare function modelProfileRef(plugin: string, modelspace: string, name: string): ModelProfileRefDefinition;
543
345
  export declare function skillRef(name: string): SkillRefDefinition;
@@ -545,20 +347,15 @@ export declare function skillRef(plugin: string, name: string): SkillRefDefiniti
545
347
  export declare function skillspaceRef(skillspace: string, name: string): SkillspaceRefDefinition;
546
348
  export declare function skillspaceRef(plugin: string, skillspace: string, name: string): SkillspaceRefDefinition;
547
349
  export declare const schemaSlot: (options?: Omit<ToolSchemaSlotDefinition, "kind">) => ToolSchemaSlotDefinition;
548
- export declare const bindTrait: (trait: TraitRefInput, options?: {
549
- readonly tools?: Readonly<Record<string, TraitBindingToolDefinition>>;
550
- }) => TraitBindingDefinition;
551
350
  export declare const hookTool: {
552
351
  readonly any: () => HookAnyToolMatcherDefinition;
553
- readonly tool: (tool: ToolRefInput) => HookToolspaceToolMatcherDefinition;
554
- readonly group: (group: ToolGroupRefInput) => HookToolspaceGroupMatcherDefinition;
352
+ readonly native: (name: string) => HookNativeToolMatcherDefinition;
555
353
  readonly canonical: (ref: string) => HookCanonicalToolMatcherDefinition;
556
354
  };
557
355
  export declare const hookMatcher: {
558
356
  readonly tool: {
559
357
  readonly any: () => HookAnyToolMatcherDefinition;
560
- readonly tool: (tool: ToolRefInput) => HookToolspaceToolMatcherDefinition;
561
- readonly group: (group: ToolGroupRefInput) => HookToolspaceGroupMatcherDefinition;
358
+ readonly native: (name: string) => HookNativeToolMatcherDefinition;
562
359
  readonly canonical: (ref: string) => HookCanonicalToolMatcherDefinition;
563
360
  };
564
361
  };
@@ -65,7 +65,7 @@ export declare const LOWERER_CAPABILITIES: {
65
65
  readonly skills: {
66
66
  readonly kind: "markdown-file";
67
67
  readonly path: "<generated-plugin>/skills/";
68
- readonly summary: "Compile bundles targeted skills and orbit skills as Agent Skills.";
68
+ readonly summary: "Compile bundles targeted skills and concrete sop skills as Agent Skills.";
69
69
  };
70
70
  readonly generatedTools: {
71
71
  readonly kind: "direct-file";
@@ -246,7 +246,7 @@ export declare const LOWERER_CAPABILITIES: {
246
246
  readonly skills: {
247
247
  readonly kind: "native-plugin-bundle";
248
248
  readonly path: "<generated-plugin>/skills/";
249
- readonly summary: "Compile bundles targeted skills and orbit skills.";
249
+ readonly summary: "Compile bundles targeted skills and concrete sop skills.";
250
250
  };
251
251
  readonly generatedTools: {
252
252
  readonly kind: "direct-file";
@@ -294,7 +294,7 @@ export declare const LOWERER_CAPABILITIES: {
294
294
  readonly skills: {
295
295
  readonly kind: "native-plugin-bundle";
296
296
  readonly path: "<generated-plugin>/skills/";
297
- readonly summary: "Compile bundles targeted plugin skills and orbit skills into the generated Kimi plugin.";
297
+ readonly summary: "Compile bundles targeted plugin skills and concrete sop skills into the generated Kimi plugin.";
298
298
  };
299
299
  readonly generatedTools: {
300
300
  readonly kind: "direct-file";
@@ -362,7 +362,7 @@ export declare const LOWERER_CAPABILITIES: {
362
362
  readonly cursor: {
363
363
  readonly harness: "cursor";
364
364
  readonly family: "coding-harness";
365
- readonly workflowWorker: false;
365
+ readonly workflowWorker: true;
366
366
  readonly compile: CompileTargetCapabilities;
367
367
  readonly surfaces: {
368
368
  readonly pluginBundle: {
@@ -380,21 +380,29 @@ export declare const LOWERER_CAPABILITIES: {
380
380
  readonly path: "<generated-plugin>/commands/";
381
381
  readonly summary: "Install writes Cursor commands inside the generated local plugin bundle.";
382
382
  };
383
- readonly agents: LowererSurfaceCapability;
383
+ readonly agents: {
384
+ readonly kind: "native-plugin-bundle";
385
+ readonly path: "<generated-plugin>/agents/";
386
+ readonly summary: "Compiled agents lower as Cursor plugin subagent markdown (name/description/model).";
387
+ };
384
388
  readonly skills: {
385
389
  readonly kind: "direct-file";
386
390
  readonly path: "<cursor-root>/skills/";
387
- readonly summary: "Install writes Agent Skill folders.";
391
+ readonly summary: "Install writes Agent Skill folders; concrete sop skills also bundle into the generated plugin.";
388
392
  };
389
393
  readonly generatedTools: {
390
394
  readonly kind: "direct-file";
391
395
  readonly path: "<prism-home>/runtime/tools/<plugin>/runtime.mjs";
392
396
  readonly summary: "Canonical tools lower to the CLI runtime; agents invoke via `prism tools invoke`.";
393
397
  };
394
- readonly hooks: LowererSurfaceCapability;
398
+ readonly hooks: {
399
+ readonly kind: "native-plugin-bundle";
400
+ readonly path: "<generated-plugin>/hooks/hooks.json";
401
+ readonly summary: "Prism hooks lower to Cursor plugin command hooks (hooks.json + wrappers), not an SDK.";
402
+ };
395
403
  readonly agentConfig: LowererSurfaceCapability;
396
404
  };
397
- readonly notes: readonly ["Cursor compile support is tools-only for now; compiled agents, orbits, hooks, and skill permission visibility remain unsupported.", "Cursor command artifacts install through a local plugin bundle under ~/.cursor/plugins/local so Prism uses Cursor's native command discovery instead of direct command files.", "Cursor Agent Skills are docs-backed under .cursor/skills and ~/.cursor/skills, so Prism keeps install-phase skills direct.", "Cursor canonical tools are CLI-only (`prism tools invoke`); no mcp.json patch is emitted."];
405
+ 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."];
398
406
  };
399
407
  readonly "factory-droid": {
400
408
  readonly harness: "factory-droid";
@@ -473,7 +481,7 @@ export declare const LOWERER_CAPABILITIES: {
473
481
  readonly skills: {
474
482
  readonly kind: "native-plugin-bundle";
475
483
  readonly path: "<generated-package>/skills/";
476
- readonly summary: "Compile bundles targeted skills and concrete orbit skills into the generated Pi package.";
484
+ readonly summary: "Compile bundles targeted skills and concrete sop skills into the generated Pi package.";
477
485
  };
478
486
  readonly generatedTools: {
479
487
  readonly kind: "native-plugin-api";
@@ -567,7 +575,7 @@ export declare const LOWERER_CAPABILITIES: {
567
575
  readonly skills: {
568
576
  readonly kind: "native-plugin-bundle";
569
577
  readonly path: "<generated-plugin>/skills/";
570
- readonly summary: "Compile bundles targeted skills and orbit skills.";
578
+ readonly summary: "Compile bundles targeted skills and concrete sop skills.";
571
579
  };
572
580
  readonly generatedTools: {
573
581
  readonly kind: "direct-file";
@@ -617,11 +625,7 @@ export declare const LOWERER_CAPABILITIES: {
617
625
  readonly path: "project: hooks.v1.json; global: config.json#hooks json-array-member + hooks/*.mjs";
618
626
  readonly summary: "Project scope writes hooks.v1.json; global scope upserts Prism entries into config.json hooks without whole-file adopt. Wrappers under hooks/.";
619
627
  };
620
- readonly agentConfig: {
621
- readonly kind: "direct-file";
622
- readonly path: "ephemeral --agent-config for workflow runs";
623
- readonly summary: "Workflow worker writes temporary agent-config (system_instructions, allowed_tools); not a durable install surface.";
624
- };
628
+ readonly agentConfig: LowererSurfaceCapability;
625
629
  };
626
630
  readonly notes: readonly ["Never whole-file adopt ~/.config/devin/config.json — herdr hooks and user prefs live there.", "Workflow default model is swe-1-7; headless via `devin -p` + ATIF --export session resume via -r."];
627
631
  };
@@ -0,0 +1,35 @@
1
+ import { Schema } from "effect";
2
+ export declare const PRISM_CONFIG_SCHEMA_VERSION = 1;
3
+ export declare const DEFAULT_BACKUP_RETENTION_PER_TARGET = 3;
4
+ export declare const BackupModeSchema: Schema.Literal<["always", "never"]>;
5
+ export type BackupMode = typeof BackupModeSchema.Type;
6
+ export interface PrismBackupConfig {
7
+ readonly mode: BackupMode;
8
+ readonly retentionPerTarget: number;
9
+ }
10
+ export interface PrismConfig {
11
+ readonly version: typeof PRISM_CONFIG_SCHEMA_VERSION;
12
+ readonly backup: PrismBackupConfig;
13
+ }
14
+ /**
15
+ * Resolve the Prism home directory from an override or the environment.
16
+ *
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
19
+ * read happens exactly once at the CLI edge layer.
20
+ */
21
+ export declare const resolvePrismHome: (override?: string) => string;
22
+ export declare const prismConfigPath: (prismHome?: string) => string;
23
+ export declare const prismStateDir: (prismHome?: string) => string;
24
+ export declare const prismBackupDir: (prismHome?: string) => string;
25
+ /**
26
+ * Machine home root for authored workflow sources: `~/.prism/workflows/`.
27
+ * Workflows are ephemeral orchestration instruments that reference their
28
+ * target repos by absolute path, so they belong in the home root, never
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).
32
+ */
33
+ export declare const prismWorkflowsSourceDir: (prismHome?: string) => string;
34
+ export declare const defaultPrismConfig: () => PrismConfig;
35
+ export declare const readPrismConfig: (prismHome?: string) => Promise<PrismConfig>;
@@ -44,5 +44,5 @@ export declare const projectStateDir: (prismHome: string, key: string) => string
44
44
  export declare const projectCompileManifestPath: (prismHome: string, key: string) => string;
45
45
  /** ~/.prism/state/projects/<key>/generated — Prism-owned generated refs dir. */
46
46
  export declare const projectGeneratedRefsDir: (prismHome: string, key: string) => string;
47
- /** ~/.prism/state/projects/<key>/generated/agents.ts — the agents refs file. */
48
- export declare const projectGeneratedAgentsPath: (prismHome: string, key: string) => string;
47
+ /** ~/.prism/state/projects/<key>/generated/sops.ts — the sop refs file (surface sentinel). */
48
+ export declare const projectGeneratedSopsPath: (prismHome: string, key: string) => string;
package/types/types.d.ts CHANGED
@@ -26,7 +26,7 @@ export interface HarnessConfig {
26
26
  }
27
27
  export declare const PLUGIN_ARTIFACT_TYPES: readonly ["rules", "commands", "agents", "skills"];
28
28
  export type PluginArtifactType = (typeof PLUGIN_ARTIFACT_TYPES)[number];
29
- export declare const COMPILE_ARTIFACT_TYPES: readonly ["orbits", "tools", "toolspaces", "modelspaces", "skillspaces", "hooks"];
29
+ export declare const COMPILE_ARTIFACT_TYPES: readonly ["sops", "tools", "modelspaces", "skillspaces", "hooks"];
30
30
  export type CompileArtifactType = (typeof COMPILE_ARTIFACT_TYPES)[number];
31
31
  export declare const TARGET_PRESET_IDS: readonly ["coding-harness", "claw-harness"];
32
32
  export type TargetPresetId = (typeof TARGET_PRESET_IDS)[number];
@@ -44,7 +44,6 @@ export interface PluginManifest {
44
44
  deps?: Record<string, string>;
45
45
  runtime?: PluginRuntimeConfig;
46
46
  projects?: Record<string, ProjectConfig>;
47
- inlineSkills?: string[];
48
47
  }
49
48
  export interface ProjectConfig {
50
49
  pattern?: string;
@@ -1,38 +1,3 @@
1
- export declare class WorkflowRunTimeoutError extends Error {
2
- readonly limitMs: number;
3
- readonly name = "WorkflowRunTimeoutError";
4
- constructor(limitMs: number);
5
- }
6
- export declare class WorkflowTaskNoProgressError extends Error {
7
- readonly taskId: string;
8
- readonly limitMs: number;
9
- readonly name = "WorkflowTaskNoProgressError";
10
- constructor(taskId: string, limitMs: number);
11
- }
12
- export declare class WorkflowFanoutExceededError extends Error {
13
- readonly limit: number;
14
- readonly observed: number;
15
- readonly name = "WorkflowFanoutExceededError";
16
- constructor(limit: number, observed: number);
17
- }
18
- export declare class WorkflowCostExceededError extends Error {
19
- readonly limitUsd: number;
20
- readonly observedUsd: number;
21
- readonly name = "WorkflowCostExceededError";
22
- constructor(limitUsd: number, observedUsd: number);
23
- }
24
- export declare class WorkflowCostUnavailableError extends Error {
25
- readonly limitUsd: number;
26
- readonly name = "WorkflowCostUnavailableError";
27
- constructor(limitUsd: number);
28
- }
29
- export declare class WorkflowPromptLimitError extends Error {
30
- readonly taskId: string;
31
- readonly limitBytes: number;
32
- readonly observedBytes: number;
33
- readonly name = "WorkflowPromptLimitError";
34
- constructor(taskId: string, limitBytes: number, observedBytes: number);
35
- }
36
1
  /** Errors surfaced by {@link WorkflowRuntime.runTask} and dynamic workflow runs. */
37
2
  export declare class WorkflowTaskDecodeError extends Error {
38
3
  readonly taskId: string;
@@ -40,6 +5,13 @@ export declare class WorkflowTaskDecodeError extends Error {
40
5
  readonly name = "WorkflowTaskDecodeError";
41
6
  constructor(taskId: string, cause: unknown);
42
7
  }
8
+ /** A `ctx.task({ input })` value failed the bound SOP phase's input contract. */
9
+ export declare class WorkflowTaskInputError extends Error {
10
+ readonly phase: string;
11
+ readonly cause: unknown;
12
+ readonly name = "WorkflowTaskInputError";
13
+ constructor(phase: string, cause: unknown);
14
+ }
43
15
  export declare class WorkflowRunStoppedError extends Error {
44
16
  readonly runId: string;
45
17
  readonly name = "WorkflowRunStoppedError";
@@ -60,4 +32,4 @@ export declare class WorkflowUnsupportedHarnessError extends Error {
60
32
  readonly name = "WorkflowUnsupportedHarnessError";
61
33
  constructor(harness: string, validHarnesses: ReadonlyArray<string>);
62
34
  }
63
- export type WorkflowRuntimeError = WorkflowBunRuntimeUnavailableError | WorkflowUnsupportedHarnessError | WorkflowTaskDecodeError | WorkflowTaskEscalatedError | WorkflowRunStoppedError | WorkflowRunTimeoutError | WorkflowTaskNoProgressError | WorkflowFanoutExceededError | WorkflowCostExceededError | WorkflowCostUnavailableError | WorkflowPromptLimitError | Error;
35
+ export type WorkflowRuntimeError = WorkflowBunRuntimeUnavailableError | WorkflowUnsupportedHarnessError | WorkflowTaskDecodeError | WorkflowTaskInputError | WorkflowTaskEscalatedError | WorkflowRunStoppedError | Error;
@@ -16,7 +16,6 @@ export interface WorkflowTaskIdentity {
16
16
  readonly taskId: string;
17
17
  readonly cacheKey: string;
18
18
  readonly promptHash: string;
19
- readonly agentManifestHash: string;
20
19
  }
21
20
  export interface WorkflowJudgeIdentity {
22
21
  readonly workflow: string;
@@ -33,14 +32,6 @@ export interface WorkflowRunTaskSnapshot {
33
32
  readonly prompt: string;
34
33
  readonly cacheKey: string;
35
34
  readonly promptHash: string;
36
- readonly agentManifestHash: string;
37
- readonly agent: {
38
- readonly plugin: string;
39
- readonly name: string;
40
- readonly description: string;
41
- readonly sourceHash: string;
42
- readonly manifestHash: string;
43
- };
44
35
  readonly worker?: {
45
36
  readonly worker?: string;
46
37
  readonly model?: string;
@@ -8,10 +8,6 @@ export interface WorkflowTaskExecution {
8
8
  export type WorkflowRunTaskResultStatus = "completed" | "failed" | "escalated";
9
9
  export interface WorkflowRunTaskResult {
10
10
  readonly id: string;
11
- readonly agent: {
12
- readonly plugin: string;
13
- readonly name: string;
14
- };
15
11
  readonly output: unknown;
16
12
  readonly cached: boolean;
17
13
  readonly status: WorkflowRunTaskResultStatus;
@@ -24,7 +20,7 @@ export interface WorkflowRunResult {
24
20
  readonly tasks: ReadonlyArray<WorkflowRunTaskResult>;
25
21
  readonly output?: unknown;
26
22
  }
27
- export { WorkflowRunStoppedError, WorkflowTaskDecodeError, WorkflowTaskEscalatedError, WorkflowRunTimeoutError, WorkflowTaskNoProgressError, WorkflowFanoutExceededError, WorkflowCostExceededError, WorkflowCostUnavailableError, WorkflowPromptLimitError, type WorkflowRuntimeError, } from "./workflow-errors.js";
23
+ export { WorkflowRunStoppedError, WorkflowTaskDecodeError, WorkflowTaskEscalatedError, type WorkflowRuntimeError, } from "./workflow-errors.js";
28
24
  export type WorkflowTaskRepairMode = "native-continuation" | "fresh-executor-invocation" | "none";
29
25
  export type WorkflowTaskProgressSource = "executor" | "worker-stdout" | "worker-stderr";
30
26
  export type WorkflowTaskProgressReporter = (source?: WorkflowTaskProgressSource) => void;
@@ -59,18 +55,17 @@ export type WorkflowTaskRepairLoopOption<Worker extends string> = Worker extends
59
55
  readonly repair?: never;
60
56
  };
61
57
  export type WorkflowTaskExecutor = (task: AnyWorkflowTask, context?: WorkflowTaskExecutionContext) => Promise<unknown | WorkflowTaskExecution>;
62
- export declare const DEFAULT_WORKFLOW_TASK_CONCURRENCY = 8;
63
- export declare const DEFAULT_WORKFLOW_MAX_PROMPT_BYTES: number;
58
+ /**
59
+ * Internal scheduler pacing, not a budget: excess live tasks queue and run as
60
+ * slots free, so this never fails a task. Sized to the machine because each
61
+ * live task is a full harness process. Deliberately not an option — nothing
62
+ * about a workflow's intent belongs in this number.
63
+ */
64
+ export declare const WORKFLOW_TASK_CONCURRENCY: number;
64
65
  export declare const runWorkflow: (workflow: AnyWorkflowDefinition, options: {
65
66
  readonly executeTask: WorkflowTaskExecutor;
66
67
  readonly store?: WorkflowStore;
67
68
  readonly mockOutput?: boolean;
68
- readonly maxConcurrentTasks?: number;
69
- readonly maxWallMs?: number;
70
- readonly taskNoProgressMs?: number;
71
- readonly maxTasks?: number;
72
- readonly maxCostUsd?: number;
73
- readonly maxPromptBytes?: number;
74
69
  readonly runId?: string;
75
70
  readonly runtimeOptions?: WorkflowRuntimeOptions;
76
71
  readonly abortSignal?: AbortSignal;