@skastr0/prism-linux-x64 0.4.6 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/prism +0 -0
- package/package.json +2 -2
- package/types/compile/errors.d.ts +114 -0
- package/types/errors.d.ts +107 -0
- package/types/harness-types-discover.d.ts +65 -0
- package/types/harness-types.d.ts +45 -0
- package/types/index.d.ts +26 -229
- package/types/lowerer-capabilities.d.ts +68 -15
- package/types/prism-home.d.ts +35 -0
- package/types/project-key.d.ts +2 -2
- package/types/types.d.ts +3 -3
- package/types/workflow-errors.d.ts +8 -1
- package/types/workflow-identity.d.ts +0 -9
- package/types/workflow-runner.d.ts +0 -4
- package/types/workflow-session.d.ts +25 -5
- package/types/workflow-store.d.ts +1 -28
- package/types/workflows.d.ts +85 -59
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
|
-
* -
|
|
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
|
|
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
|
-
|
|
233
|
-
readonly
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
readonly
|
|
238
|
-
|
|
239
|
-
readonly
|
|
240
|
-
|
|
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
|
-
|
|
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
|
|
246
|
-
|
|
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
|
|
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
|
|
497
|
-
readonly kind: "hook-
|
|
498
|
-
readonly
|
|
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 |
|
|
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
|
|
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
|
|
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
|
|
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";
|
|
@@ -128,6 +128,55 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
130
|
};
|
|
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
|
+
};
|
|
131
180
|
readonly openclaw: {
|
|
132
181
|
readonly harness: "openclaw";
|
|
133
182
|
readonly family: "claw-harness";
|
|
@@ -246,7 +295,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
246
295
|
readonly skills: {
|
|
247
296
|
readonly kind: "native-plugin-bundle";
|
|
248
297
|
readonly path: "<generated-plugin>/skills/";
|
|
249
|
-
readonly summary: "Compile bundles targeted skills and
|
|
298
|
+
readonly summary: "Compile bundles targeted skills and concrete sop skills.";
|
|
250
299
|
};
|
|
251
300
|
readonly generatedTools: {
|
|
252
301
|
readonly kind: "direct-file";
|
|
@@ -294,7 +343,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
294
343
|
readonly skills: {
|
|
295
344
|
readonly kind: "native-plugin-bundle";
|
|
296
345
|
readonly path: "<generated-plugin>/skills/";
|
|
297
|
-
readonly summary: "Compile bundles targeted plugin skills and
|
|
346
|
+
readonly summary: "Compile bundles targeted plugin skills and concrete sop skills into the generated Kimi plugin.";
|
|
298
347
|
};
|
|
299
348
|
readonly generatedTools: {
|
|
300
349
|
readonly kind: "direct-file";
|
|
@@ -362,7 +411,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
362
411
|
readonly cursor: {
|
|
363
412
|
readonly harness: "cursor";
|
|
364
413
|
readonly family: "coding-harness";
|
|
365
|
-
readonly workflowWorker:
|
|
414
|
+
readonly workflowWorker: true;
|
|
366
415
|
readonly compile: CompileTargetCapabilities;
|
|
367
416
|
readonly surfaces: {
|
|
368
417
|
readonly pluginBundle: {
|
|
@@ -380,21 +429,29 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
380
429
|
readonly path: "<generated-plugin>/commands/";
|
|
381
430
|
readonly summary: "Install writes Cursor commands inside the generated local plugin bundle.";
|
|
382
431
|
};
|
|
383
|
-
readonly agents:
|
|
432
|
+
readonly agents: {
|
|
433
|
+
readonly kind: "native-plugin-bundle";
|
|
434
|
+
readonly path: "<generated-plugin>/agents/";
|
|
435
|
+
readonly summary: "Compiled agents lower as Cursor plugin subagent markdown (name/description/model).";
|
|
436
|
+
};
|
|
384
437
|
readonly skills: {
|
|
385
438
|
readonly kind: "direct-file";
|
|
386
439
|
readonly path: "<cursor-root>/skills/";
|
|
387
|
-
readonly summary: "Install writes Agent Skill folders.";
|
|
440
|
+
readonly summary: "Install writes Agent Skill folders; concrete sop skills also bundle into the generated plugin.";
|
|
388
441
|
};
|
|
389
442
|
readonly generatedTools: {
|
|
390
443
|
readonly kind: "direct-file";
|
|
391
444
|
readonly path: "<prism-home>/runtime/tools/<plugin>/runtime.mjs";
|
|
392
445
|
readonly summary: "Canonical tools lower to the CLI runtime; agents invoke via `prism tools invoke`.";
|
|
393
446
|
};
|
|
394
|
-
readonly hooks:
|
|
447
|
+
readonly hooks: {
|
|
448
|
+
readonly kind: "native-plugin-bundle";
|
|
449
|
+
readonly path: "<generated-plugin>/hooks/hooks.json";
|
|
450
|
+
readonly summary: "Prism hooks lower to Cursor plugin command hooks (hooks.json + wrappers), not an SDK.";
|
|
451
|
+
};
|
|
395
452
|
readonly agentConfig: LowererSurfaceCapability;
|
|
396
453
|
};
|
|
397
|
-
readonly notes: readonly ["Cursor
|
|
454
|
+
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
455
|
};
|
|
399
456
|
readonly "factory-droid": {
|
|
400
457
|
readonly harness: "factory-droid";
|
|
@@ -473,7 +530,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
473
530
|
readonly skills: {
|
|
474
531
|
readonly kind: "native-plugin-bundle";
|
|
475
532
|
readonly path: "<generated-package>/skills/";
|
|
476
|
-
readonly summary: "Compile bundles targeted skills and concrete
|
|
533
|
+
readonly summary: "Compile bundles targeted skills and concrete sop skills into the generated Pi package.";
|
|
477
534
|
};
|
|
478
535
|
readonly generatedTools: {
|
|
479
536
|
readonly kind: "native-plugin-api";
|
|
@@ -567,7 +624,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
567
624
|
readonly skills: {
|
|
568
625
|
readonly kind: "native-plugin-bundle";
|
|
569
626
|
readonly path: "<generated-plugin>/skills/";
|
|
570
|
-
readonly summary: "Compile bundles targeted skills and
|
|
627
|
+
readonly summary: "Compile bundles targeted skills and concrete sop skills.";
|
|
571
628
|
};
|
|
572
629
|
readonly generatedTools: {
|
|
573
630
|
readonly kind: "direct-file";
|
|
@@ -617,11 +674,7 @@ export declare const LOWERER_CAPABILITIES: {
|
|
|
617
674
|
readonly path: "project: hooks.v1.json; global: config.json#hooks json-array-member + hooks/*.mjs";
|
|
618
675
|
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
676
|
};
|
|
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
|
-
};
|
|
677
|
+
readonly agentConfig: LowererSurfaceCapability;
|
|
625
678
|
};
|
|
626
679
|
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
680
|
};
|
|
@@ -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>;
|
package/types/project-key.d.ts
CHANGED
|
@@ -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/
|
|
48
|
-
export declare const
|
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Core types for prism - the unified plugin distribution system
|
|
3
3
|
*/
|
|
4
|
-
export type HarnessId = "claude-code" | "opencode" | "openclaw" | "hermes" | "codex-cli" | "antigravity-cli" | "kimi-code" | "amp-code" | "cursor" | "factory-droid" | "pi" | "omp" | "grok" | "devin";
|
|
4
|
+
export type HarnessId = "claude-code" | "opencode" | "opencode2" | "openclaw" | "hermes" | "codex-cli" | "antigravity-cli" | "kimi-code" | "amp-code" | "cursor" | "factory-droid" | "pi" | "omp" | "grok" | "devin";
|
|
5
5
|
export declare const HARNESS_SCOPES: readonly ["global", "project"];
|
|
6
6
|
export type HarnessScope = (typeof HARNESS_SCOPES)[number];
|
|
7
7
|
export interface HarnessConfig {
|
|
@@ -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 ["
|
|
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;
|
|
@@ -140,6 +139,7 @@ export interface UnifiedFrontmatter {
|
|
|
140
139
|
description?: string;
|
|
141
140
|
"claude-code"?: ClaudeCodeFrontmatter;
|
|
142
141
|
opencode?: OpenCodeAgentFrontmatter;
|
|
142
|
+
opencode2?: OpenCodeAgentFrontmatter;
|
|
143
143
|
openclaw?: Record<string, unknown>;
|
|
144
144
|
hermes?: Record<string, unknown>;
|
|
145
145
|
"codex-cli"?: CodexCliFrontmatter;
|
|
@@ -5,6 +5,13 @@ export declare class WorkflowTaskDecodeError extends Error {
|
|
|
5
5
|
readonly name = "WorkflowTaskDecodeError";
|
|
6
6
|
constructor(taskId: string, cause: unknown);
|
|
7
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
|
+
}
|
|
8
15
|
export declare class WorkflowRunStoppedError extends Error {
|
|
9
16
|
readonly runId: string;
|
|
10
17
|
readonly name = "WorkflowRunStoppedError";
|
|
@@ -25,4 +32,4 @@ export declare class WorkflowUnsupportedHarnessError extends Error {
|
|
|
25
32
|
readonly name = "WorkflowUnsupportedHarnessError";
|
|
26
33
|
constructor(harness: string, validHarnesses: ReadonlyArray<string>);
|
|
27
34
|
}
|
|
28
|
-
export type WorkflowRuntimeError = WorkflowBunRuntimeUnavailableError | WorkflowUnsupportedHarnessError | WorkflowTaskDecodeError | WorkflowTaskEscalatedError | WorkflowRunStoppedError | 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;
|