@skastr0/prism-linux-x64 0.1.1 → 0.1.2
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 -1
- package/types/compile/bundle-utils.d.ts +16 -0
- package/types/compile/cache.d.ts +49 -0
- package/types/compile/compile-manifest.d.ts +48 -0
- package/types/compile/compose.d.ts +35 -0
- package/types/compile/errors.d.ts +124 -0
- package/types/compile/generated-plugin.d.ts +8 -0
- package/types/compile/load.d.ts +23 -0
- package/types/compile/paths.d.ts +2 -0
- package/types/compile/protocol-tools.d.ts +47 -0
- package/types/compile/refs.d.ts +7 -0
- package/types/compile/registry.d.ts +32 -0
- package/types/compile/resolve.d.ts +63 -0
- package/types/compile/runtime/schema-bridge.d.ts +61 -0
- package/types/compile/runtime-deps.d.ts +6 -0
- package/types/compile/sources.d.ts +2782 -0
- package/types/content-hash.d.ts +1 -0
- package/types/errors.d.ts +107 -0
- package/types/fs.d.ts +60 -0
- package/types/harnesses.d.ts +10 -0
- package/types/index.d.ts +493 -0
- package/types/lowerer-capabilities.d.ts +559 -0
- package/types/manifest.d.ts +106 -0
- package/types/prism-home.d.ts +26 -0
- package/types/project-key.d.ts +48 -0
- package/types/source-selection.d.ts +38 -0
- package/types/state/lock.d.ts +14 -0
- package/types/types.d.ts +193 -0
- package/types/workflow-amp-worker.d.ts +12 -0
- package/types/workflow-antigravity-worker.d.ts +14 -0
- package/types/workflow-claude-worker.d.ts +13 -0
- package/types/workflow-codex-worker.d.ts +12 -0
- package/types/workflow-grok-worker.d.ts +14 -0
- package/types/workflow-hermes-worker.d.ts +14 -0
- package/types/workflow-kimi-worker.d.ts +13 -0
- package/types/workflow-loader.d.ts +64 -0
- package/types/workflow-opencode-worker.d.ts +12 -0
- package/types/workflow-runner.d.ts +69 -0
- package/types/workflow-store.d.ts +214 -0
- package/types/workflow-tsconfig.d.ts +90 -0
- package/types/workflow-worker-contract.d.ts +10 -0
- package/types/workflow-worker-metadata.d.ts +8 -0
- package/types/workflow-worker-process.d.ts +18 -0
- package/types/workflow-workers.d.ts +27 -0
- package/types/workflows.d.ts +145 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const computeContentHash: (content: string | Uint8Array) => string;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PrismError — the single tagged-error vocabulary that survives the
|
|
3
|
+
* one-writer overhaul (docs/overhaul-one-writer-plan.md, WS2).
|
|
4
|
+
*
|
|
5
|
+
* Every failure Prism shows a human goes through this module:
|
|
6
|
+
* - one `PrismError` union the CLI edge can exhaustively match,
|
|
7
|
+
* - `renderPrismError` / `renderPrismCause` as the only renderers
|
|
8
|
+
* (one-line headline, optional indented detail, a `hint:` line),
|
|
9
|
+
* - never a stack trace.
|
|
10
|
+
*
|
|
11
|
+
* Compile-language errors keep living in `src/compile/errors.ts` (they are
|
|
12
|
+
* constructed throughout the compile pipeline); this module absorbs them into
|
|
13
|
+
* the union instead of duplicating them. New error families added by later
|
|
14
|
+
* workstreams (SnapshotDecodeError, RegionPatchError, BlockedTargetError,
|
|
15
|
+
* McpSupervisorError, TokenStoreError, …) join the union here.
|
|
16
|
+
*/
|
|
17
|
+
import { Schema } from "effect";
|
|
18
|
+
import { type CompileError } from "./compile/errors.js";
|
|
19
|
+
declare const PluginManifestError_base: Schema.TaggedErrorClass<PluginManifestError, "PluginManifestError", {
|
|
20
|
+
readonly _tag: Schema.tag<"PluginManifestError">;
|
|
21
|
+
} & {
|
|
22
|
+
pluginPath: typeof Schema.String;
|
|
23
|
+
manifestPath: typeof Schema.String;
|
|
24
|
+
pluginLabel: typeof Schema.String;
|
|
25
|
+
summary: typeof Schema.String;
|
|
26
|
+
details: Schema.Array$<typeof Schema.String>;
|
|
27
|
+
}>;
|
|
28
|
+
export declare class PluginManifestError extends PluginManifestError_base {
|
|
29
|
+
/**
|
|
30
|
+
* Build a manifest error from just a plugin path + summary, deriving the
|
|
31
|
+
* manifest path and plugin label.
|
|
32
|
+
*/
|
|
33
|
+
static forPlugin(pluginPath: string, summary: string, details?: ReadonlyArray<string>, options?: {
|
|
34
|
+
readonly pluginName?: string;
|
|
35
|
+
}): PluginManifestError;
|
|
36
|
+
get message(): string;
|
|
37
|
+
}
|
|
38
|
+
declare const PrismConfigError_base: Schema.TaggedErrorClass<PrismConfigError, "PrismConfigError", {
|
|
39
|
+
readonly _tag: Schema.tag<"PrismConfigError">;
|
|
40
|
+
} & {
|
|
41
|
+
message: typeof Schema.String;
|
|
42
|
+
}>;
|
|
43
|
+
export declare class PrismConfigError extends PrismConfigError_base {
|
|
44
|
+
}
|
|
45
|
+
declare const BundleBuildError_base: Schema.TaggedErrorClass<BundleBuildError, "BundleBuildError", {
|
|
46
|
+
readonly _tag: Schema.tag<"BundleBuildError">;
|
|
47
|
+
} & {
|
|
48
|
+
bundleKind: typeof Schema.String;
|
|
49
|
+
diagnostics: typeof Schema.String;
|
|
50
|
+
}>;
|
|
51
|
+
export declare class BundleBuildError extends BundleBuildError_base {
|
|
52
|
+
get message(): string;
|
|
53
|
+
}
|
|
54
|
+
declare const McpBundleMissingError_base: Schema.TaggedErrorClass<McpBundleMissingError, "McpBundleMissingError", {
|
|
55
|
+
readonly _tag: Schema.tag<"McpBundleMissingError">;
|
|
56
|
+
} & {
|
|
57
|
+
pluginName: typeof Schema.String;
|
|
58
|
+
bundlePath: typeof Schema.String;
|
|
59
|
+
}>;
|
|
60
|
+
export declare class McpBundleMissingError extends McpBundleMissingError_base {
|
|
61
|
+
get hint(): string;
|
|
62
|
+
get message(): string;
|
|
63
|
+
}
|
|
64
|
+
declare const BlockedTargetError_base: Schema.TaggedErrorClass<BlockedTargetError, "BlockedTargetError", {
|
|
65
|
+
readonly _tag: Schema.tag<"BlockedTargetError">;
|
|
66
|
+
} & {
|
|
67
|
+
targetPath: typeof Schema.String;
|
|
68
|
+
plugin: typeof Schema.String;
|
|
69
|
+
hint: typeof Schema.String;
|
|
70
|
+
}>;
|
|
71
|
+
export declare class BlockedTargetError extends BlockedTargetError_base {
|
|
72
|
+
get message(): string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Every typed error Prism may surface to a human. `CompileError` (which
|
|
76
|
+
* includes `PluginManifestError`) is defined in src/compile/errors.ts.
|
|
77
|
+
*/
|
|
78
|
+
export type PrismError = CompileError | PrismConfigError | BundleBuildError | McpBundleMissingError | BlockedTargetError;
|
|
79
|
+
export declare const PRISM_ERROR_TAGS: ReadonlySet<string>;
|
|
80
|
+
export declare const isPrismError: (value: unknown) => value is PrismError;
|
|
81
|
+
export interface PrismErrorRender {
|
|
82
|
+
/** One line; never multi-line, never a stack frame. */
|
|
83
|
+
readonly headline: string;
|
|
84
|
+
/** Optional extra lines, rendered indented under the headline. */
|
|
85
|
+
readonly detail?: ReadonlyArray<string>;
|
|
86
|
+
/** Remediation; rendered as a trailing `hint: …` line. */
|
|
87
|
+
readonly hint: string;
|
|
88
|
+
/** Filesystem path the error is about, when it has one. */
|
|
89
|
+
readonly path?: string;
|
|
90
|
+
}
|
|
91
|
+
export declare const describePrismError: (error: PrismError) => PrismErrorRender;
|
|
92
|
+
/** Render a PrismError for humans: headline, indented detail, hint line. */
|
|
93
|
+
export declare const renderPrismError: (error: PrismError) => string;
|
|
94
|
+
export interface PrismCauseDescription {
|
|
95
|
+
readonly headline: string;
|
|
96
|
+
readonly detail?: ReadonlyArray<string>;
|
|
97
|
+
readonly hint?: string;
|
|
98
|
+
readonly path?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Walk an Effect Cause (or any thrown value) and describe the first Prism
|
|
102
|
+
* error found. Unknown defects render name + message only — never `.stack`.
|
|
103
|
+
*/
|
|
104
|
+
export declare const describePrismCause: (cause: unknown) => PrismCauseDescription;
|
|
105
|
+
/** Render a whole Cause for humans. The single edge renderer. */
|
|
106
|
+
export declare const renderPrismCause: (cause: unknown) => string;
|
|
107
|
+
export {};
|
package/types/fs.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filesystem utilities using Bun APIs
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Expand ~ to home directory
|
|
6
|
+
*/
|
|
7
|
+
export declare function expandPath(path: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Check if a path exists (file or directory)
|
|
10
|
+
*/
|
|
11
|
+
export declare function exists(path: string): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Check if path is a directory
|
|
14
|
+
*/
|
|
15
|
+
export declare function isDirectory(path: string): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Read file contents as string
|
|
18
|
+
*/
|
|
19
|
+
export declare function readFile(path: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Read and parse JSON file
|
|
22
|
+
*/
|
|
23
|
+
export declare function readJson<T>(path: string): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Write string content to file
|
|
26
|
+
*/
|
|
27
|
+
export declare function writeFile(path: string, content: string, options?: {
|
|
28
|
+
readonly mode?: number;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
export declare function chmodFile(path: string, mode: number): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Copy a file from source to target
|
|
33
|
+
*/
|
|
34
|
+
export declare function copyFile(source: string, target: string): Promise<void>;
|
|
35
|
+
export declare function pathContains(parentPath: string, childPath: string): boolean;
|
|
36
|
+
export declare function realPathContainedBy(rootPath: string, candidatePath: string): Promise<string | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Append content to a file (creates if doesn't exist)
|
|
39
|
+
*/
|
|
40
|
+
export declare function appendFile(path: string, content: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Ensure directory exists (recursive mkdir)
|
|
43
|
+
*/
|
|
44
|
+
export declare function ensureDir(path: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* List files in a directory (non-recursive)
|
|
47
|
+
*/
|
|
48
|
+
export declare function listDir(path: string): Promise<string[]>;
|
|
49
|
+
/**
|
|
50
|
+
* List files in a directory recursively
|
|
51
|
+
*/
|
|
52
|
+
export declare function listDirRecursive(path: string): Promise<string[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Remove a file
|
|
55
|
+
*/
|
|
56
|
+
export declare function removeFile(path: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Remove a directory recursively
|
|
59
|
+
*/
|
|
60
|
+
export declare function removeDir(path: string): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Harness registry - configurations for all supported AI coding harnesses
|
|
3
|
+
*/
|
|
4
|
+
import type { HarnessConfig, HarnessId, HarnessScope } from "./types.js";
|
|
5
|
+
export declare const HARNESSES: Record<HarnessId, HarnessConfig>;
|
|
6
|
+
export declare function getHarness(id: HarnessId): HarnessConfig;
|
|
7
|
+
export declare function getAllHarnessIds(): HarnessId[];
|
|
8
|
+
export declare function isValidHarnessId(id: string): id is HarnessId;
|
|
9
|
+
export declare function resolveHarnessRoot(harness: HarnessConfig, scope: HarnessScope, projectPath?: string): string | null;
|
|
10
|
+
export declare function harnessSupportsProjectScope(harness: HarnessConfig): boolean;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public authoring API for structured compile-language artifacts.
|
|
3
|
+
*
|
|
4
|
+
* The canonical structured source model is TypeScript-first:
|
|
5
|
+
* - agents/*.agent.ts
|
|
6
|
+
* - traits/*.trait.ts
|
|
7
|
+
* - orbits/*.orbit.ts
|
|
8
|
+
* - toolspaces/*.toolspace.ts
|
|
9
|
+
* - modelspaces/*.modelspace.ts
|
|
10
|
+
* - skillspaces/*.skillspace.ts
|
|
11
|
+
* - hooks/*.hook.ts
|
|
12
|
+
*
|
|
13
|
+
* These helpers are identity constructors for authoring ergonomics.
|
|
14
|
+
*/
|
|
15
|
+
export * from "./workflows.js";
|
|
16
|
+
export * from "./workflow-tsconfig.js";
|
|
17
|
+
export * from "./workflow-antigravity-worker.js";
|
|
18
|
+
export * from "./workflow-amp-worker.js";
|
|
19
|
+
export * from "./workflow-claude-worker.js";
|
|
20
|
+
export * from "./workflow-codex-worker.js";
|
|
21
|
+
export * from "./workflow-loader.js";
|
|
22
|
+
export * from "./workflow-opencode-worker.js";
|
|
23
|
+
export * from "./workflow-runner.js";
|
|
24
|
+
export * from "./workflow-store.js";
|
|
25
|
+
export * from "./workflow-worker-contract.js";
|
|
26
|
+
export * from "./workflow-worker-metadata.js";
|
|
27
|
+
export * from "./workflow-workers.js";
|
|
28
|
+
export interface NamedRefDefinition {
|
|
29
|
+
readonly plugin?: string;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
}
|
|
32
|
+
export interface TraitRefDefinition extends NamedRefDefinition {
|
|
33
|
+
readonly kind: "trait-ref";
|
|
34
|
+
}
|
|
35
|
+
export interface AgentRefDefinition extends NamedRefDefinition {
|
|
36
|
+
readonly kind: "agent-ref";
|
|
37
|
+
}
|
|
38
|
+
export interface OrbitRefDefinition extends NamedRefDefinition {
|
|
39
|
+
readonly kind: "orbit-ref";
|
|
40
|
+
}
|
|
41
|
+
export interface ToolRefDefinition {
|
|
42
|
+
readonly kind: "tool-ref";
|
|
43
|
+
readonly plugin?: string;
|
|
44
|
+
readonly toolspace: string;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ToolGroupRefDefinition {
|
|
48
|
+
readonly kind: "tool-group-ref";
|
|
49
|
+
readonly plugin?: string;
|
|
50
|
+
readonly toolspace: string;
|
|
51
|
+
readonly name: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ModelProfileRefDefinition {
|
|
54
|
+
readonly kind: "model-profile-ref";
|
|
55
|
+
readonly plugin?: string;
|
|
56
|
+
readonly modelspace: string;
|
|
57
|
+
readonly name: string;
|
|
58
|
+
}
|
|
59
|
+
export interface SkillRefDefinition {
|
|
60
|
+
readonly kind: "skill-ref";
|
|
61
|
+
readonly plugin?: string;
|
|
62
|
+
readonly name: string;
|
|
63
|
+
}
|
|
64
|
+
export interface SkillspaceRefDefinition {
|
|
65
|
+
readonly kind: "skillspace-ref";
|
|
66
|
+
readonly plugin?: string;
|
|
67
|
+
readonly skillspace: string;
|
|
68
|
+
readonly name: string;
|
|
69
|
+
}
|
|
70
|
+
export type TraitRefInput = string | TraitRefDefinition;
|
|
71
|
+
export type AgentRefInput = string | AgentRefDefinition;
|
|
72
|
+
export type OrbitRefInput = string | OrbitRefDefinition;
|
|
73
|
+
export type ToolRefInput = string | ToolRefDefinition;
|
|
74
|
+
export type ToolGroupRefInput = string | ToolGroupRefDefinition;
|
|
75
|
+
export type ModelProfileRefInput = string | ModelProfileRefDefinition;
|
|
76
|
+
export type SkillRefInput = SkillRefDefinition | SkillspaceRefDefinition;
|
|
77
|
+
export type EffectSchemaValue = import("effect").Schema.Schema.AnyNoContext;
|
|
78
|
+
export interface AccessDefinition {
|
|
79
|
+
readonly tools?: ReadonlyArray<ToolRefInput>;
|
|
80
|
+
readonly toolGroups?: ReadonlyArray<ToolGroupRefInput>;
|
|
81
|
+
readonly skills?: ReadonlyArray<SkillRefInput>;
|
|
82
|
+
}
|
|
83
|
+
export interface AgentDefinition {
|
|
84
|
+
readonly name: string;
|
|
85
|
+
readonly description: string;
|
|
86
|
+
readonly identity: string;
|
|
87
|
+
readonly personality?: string;
|
|
88
|
+
readonly model?: ModelProfileRefInput;
|
|
89
|
+
readonly traits?: ReadonlyArray<TraitRefInput | TraitBindingSource>;
|
|
90
|
+
readonly access?: AccessDefinition;
|
|
91
|
+
readonly skills?: ReadonlyArray<SkillRefInput>;
|
|
92
|
+
readonly color?: string;
|
|
93
|
+
readonly targets?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
94
|
+
}
|
|
95
|
+
export type AgentSource = AgentDefinition;
|
|
96
|
+
export interface CanonicalToolDefinition {
|
|
97
|
+
readonly name: string;
|
|
98
|
+
readonly description: string;
|
|
99
|
+
readonly input: EffectSchemaValue;
|
|
100
|
+
readonly output: EffectSchemaValue;
|
|
101
|
+
readonly slots?: Readonly<Record<string, ToolSlotDefinition>>;
|
|
102
|
+
readonly handle: (input: unknown, context: import("./compile/runtime/schema-bridge").ToolRuntimeContext) => Promise<unknown>;
|
|
103
|
+
}
|
|
104
|
+
export type ToolSource = CanonicalToolDefinition;
|
|
105
|
+
export interface TraitDefinition {
|
|
106
|
+
readonly name: string;
|
|
107
|
+
readonly description?: string;
|
|
108
|
+
readonly instructions?: string | ReadonlyArray<string>;
|
|
109
|
+
readonly access?: AccessDefinition;
|
|
110
|
+
readonly tools?: Readonly<Record<string, TraitToolAttachmentDefinition>>;
|
|
111
|
+
readonly inject?: {
|
|
112
|
+
readonly skills?: ReadonlyArray<SkillRefInput>;
|
|
113
|
+
};
|
|
114
|
+
readonly require?: {
|
|
115
|
+
readonly tools?: ReadonlyArray<string>;
|
|
116
|
+
readonly skills?: ReadonlyArray<SkillRefInput>;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export type TraitSource = TraitDefinition;
|
|
120
|
+
export interface TraitBindingDefinition {
|
|
121
|
+
readonly kind: "trait-binding";
|
|
122
|
+
readonly trait: TraitRefInput;
|
|
123
|
+
readonly tools?: Readonly<Record<string, TraitBindingToolDefinition>>;
|
|
124
|
+
}
|
|
125
|
+
export interface PlainTraitBindingDefinition {
|
|
126
|
+
readonly trait: TraitRefInput;
|
|
127
|
+
readonly tools?: Readonly<Record<string, TraitBindingToolDefinition>>;
|
|
128
|
+
}
|
|
129
|
+
export type TraitBindingSource = TraitBindingDefinition | PlainTraitBindingDefinition;
|
|
130
|
+
export interface ToolSchemaSlotDefinition {
|
|
131
|
+
readonly kind: "schema";
|
|
132
|
+
readonly description?: string;
|
|
133
|
+
}
|
|
134
|
+
export type ToolSlotDefinition = ToolSchemaSlotDefinition;
|
|
135
|
+
export interface TraitBindingToolDefinition {
|
|
136
|
+
readonly slots?: Readonly<Record<string, EffectSchemaValue>>;
|
|
137
|
+
}
|
|
138
|
+
export interface TraitToolAttachmentDefinition {
|
|
139
|
+
readonly ref: string;
|
|
140
|
+
}
|
|
141
|
+
export interface OrbitParameterDefinition {
|
|
142
|
+
readonly name: string;
|
|
143
|
+
readonly description?: string;
|
|
144
|
+
readonly required?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface OrbitBindingDefinition {
|
|
147
|
+
readonly orbit: OrbitRefInput;
|
|
148
|
+
readonly bindings?: Readonly<Record<string, string>>;
|
|
149
|
+
}
|
|
150
|
+
export interface OrbitTraitRequirementDefinition {
|
|
151
|
+
readonly all: ReadonlyArray<TraitRefInput>;
|
|
152
|
+
readonly min?: number;
|
|
153
|
+
}
|
|
154
|
+
export type OrbitToolPermissionToolDefinition = string | {
|
|
155
|
+
readonly ref: string;
|
|
156
|
+
readonly as?: string;
|
|
157
|
+
};
|
|
158
|
+
export interface OrbitOrchestratorDefinition {
|
|
159
|
+
readonly agent: AgentRefInput;
|
|
160
|
+
readonly tools: ReadonlyArray<OrbitToolPermissionToolDefinition>;
|
|
161
|
+
}
|
|
162
|
+
export interface OrbitPhaseWorkflowDefinition {
|
|
163
|
+
readonly when?: string;
|
|
164
|
+
readonly inputs?: ReadonlyArray<string>;
|
|
165
|
+
readonly outputs?: ReadonlyArray<string>;
|
|
166
|
+
readonly sequence?: ReadonlyArray<string>;
|
|
167
|
+
readonly coordination?: string;
|
|
168
|
+
readonly finish_criteria?: ReadonlyArray<string>;
|
|
169
|
+
readonly escalation?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface OrbitPhaseDefinition {
|
|
172
|
+
readonly name: string;
|
|
173
|
+
readonly orbit?: OrbitRefInput;
|
|
174
|
+
readonly orbit_binding?: OrbitBindingDefinition;
|
|
175
|
+
readonly agents?: ReadonlyArray<AgentRefInput>;
|
|
176
|
+
readonly agent?: AgentRefInput;
|
|
177
|
+
readonly requires?: ReadonlyArray<OrbitTraitRequirementDefinition>;
|
|
178
|
+
readonly notes?: Readonly<Record<string, string>>;
|
|
179
|
+
/**
|
|
180
|
+
* Short structured fields rendered into the root orbit SKILL.md per-phase
|
|
181
|
+
* block. Use these to describe the phase at a glance; deep content belongs
|
|
182
|
+
* in `body` (which lowers to `references/<phase>.md`).
|
|
183
|
+
*/
|
|
184
|
+
readonly telos?: string;
|
|
185
|
+
readonly real_world_change?: string;
|
|
186
|
+
readonly cold_pickup_test?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Generic workflow-authoring guidance for this phase. Prism renders this
|
|
189
|
+
* into generated orbit skills, but does not attach runtime semantics to it.
|
|
190
|
+
*/
|
|
191
|
+
readonly workflow?: OrbitPhaseWorkflowDefinition;
|
|
192
|
+
/**
|
|
193
|
+
* Long-form markdown for this phase. When present, lowerers write it to
|
|
194
|
+
* `references/<phase-name>.md` next to the orbit SKILL.md. Treat this as
|
|
195
|
+
* the full phase download — telos, procrastination shapes, per-agent
|
|
196
|
+
* focus, links to deeper modules.
|
|
197
|
+
*/
|
|
198
|
+
readonly body?: string;
|
|
199
|
+
}
|
|
200
|
+
export interface OrbitPulsarCheckpointDefinition {
|
|
201
|
+
readonly after?: string;
|
|
202
|
+
readonly before?: string;
|
|
203
|
+
readonly note?: string;
|
|
204
|
+
}
|
|
205
|
+
export type OrbitSignalEmitterPriority = "low" | "normal" | "high" | "urgent";
|
|
206
|
+
export interface OrbitSignalEmitterDestinationDefinition {
|
|
207
|
+
readonly project_key: string;
|
|
208
|
+
readonly orbit: string;
|
|
209
|
+
readonly default_priority?: OrbitSignalEmitterPriority;
|
|
210
|
+
readonly note?: string;
|
|
211
|
+
}
|
|
212
|
+
export interface OrbitSignalEmitterDefinition {
|
|
213
|
+
/**
|
|
214
|
+
* Known destinations this orbit may emit signals to. Each entry is a
|
|
215
|
+
* `project_key`/`orbit` pair, optionally with a default priority and a
|
|
216
|
+
* note describing what the destination handles. Used as structural
|
|
217
|
+
* documentation, as input for delegation-map validation, and as the
|
|
218
|
+
* basis for tighter bound trait surfaces (e.g., per-destination
|
|
219
|
+
* delegate wrappers) when wanted.
|
|
220
|
+
*
|
|
221
|
+
* Leaving this empty marks the orbit as an emitter without constraining
|
|
222
|
+
* destinations — appropriate when the routing table is fluid or
|
|
223
|
+
* authored entirely in agent doctrine. Filled destinations make the
|
|
224
|
+
* permission surface explicit and reviewable.
|
|
225
|
+
*/
|
|
226
|
+
readonly destinations?: ReadonlyArray<OrbitSignalEmitterDestinationDefinition>;
|
|
227
|
+
}
|
|
228
|
+
export interface OrbitDefinitionEntryDefinition {
|
|
229
|
+
readonly purpose: string;
|
|
230
|
+
readonly contains?: ReadonlyArray<string>;
|
|
231
|
+
readonly boundaries?: ReadonlyArray<string>;
|
|
232
|
+
readonly avoid?: ReadonlyArray<string>;
|
|
233
|
+
}
|
|
234
|
+
export interface OrbitDefinitionsDefinition {
|
|
235
|
+
readonly glyphs?: OrbitDefinitionEntryDefinition;
|
|
236
|
+
readonly dispatches?: OrbitDefinitionEntryDefinition;
|
|
237
|
+
readonly chatter?: OrbitDefinitionEntryDefinition;
|
|
238
|
+
readonly signals?: OrbitDefinitionEntryDefinition;
|
|
239
|
+
}
|
|
240
|
+
export interface OrbitDefinition {
|
|
241
|
+
readonly name: string;
|
|
242
|
+
readonly description: string;
|
|
243
|
+
readonly produces?: string;
|
|
244
|
+
readonly definitions?: OrbitDefinitionsDefinition;
|
|
245
|
+
readonly parameters?: ReadonlyArray<OrbitParameterDefinition>;
|
|
246
|
+
readonly phases: ReadonlyArray<OrbitPhaseDefinition>;
|
|
247
|
+
readonly orchestrator?: OrbitOrchestratorDefinition;
|
|
248
|
+
readonly tool_permissions?: ReadonlyArray<OrbitToolPermissionToolDefinition>;
|
|
249
|
+
readonly pulsar_checkpoints?: ReadonlyArray<OrbitPulsarCheckpointDefinition>;
|
|
250
|
+
readonly evolution?: string;
|
|
251
|
+
readonly body?: string;
|
|
252
|
+
/**
|
|
253
|
+
* When present, declares this orbit emits signals to other orbits — the
|
|
254
|
+
* routing/delegation surface that is privileged separately from the
|
|
255
|
+
* receive-side signal tools. Authors should attach the `signal-emitter`
|
|
256
|
+
* trait (from the `oracle` plugin) to the orchestrator agent (and to
|
|
257
|
+
* any other phase agent that authentically owns inter-orbit
|
|
258
|
+
* delegation). Declared `destinations` make the routing surface
|
|
259
|
+
* explicit and auditable.
|
|
260
|
+
*/
|
|
261
|
+
readonly signal_emitter?: OrbitSignalEmitterDefinition;
|
|
262
|
+
}
|
|
263
|
+
export type OrbitSource = OrbitDefinition;
|
|
264
|
+
export interface ToolTargetBindingDefinition {
|
|
265
|
+
readonly name: string;
|
|
266
|
+
}
|
|
267
|
+
export interface ToolDefinition {
|
|
268
|
+
readonly description?: string;
|
|
269
|
+
readonly targets: Readonly<Record<string, ToolTargetBindingDefinition>>;
|
|
270
|
+
}
|
|
271
|
+
export interface ToolGroupDefinition {
|
|
272
|
+
readonly description?: string;
|
|
273
|
+
readonly tools: ReadonlyArray<ToolRefInput>;
|
|
274
|
+
}
|
|
275
|
+
export interface ToolspaceDefinition {
|
|
276
|
+
readonly name: string;
|
|
277
|
+
readonly description?: string;
|
|
278
|
+
readonly tools: Readonly<Record<string, ToolDefinition>>;
|
|
279
|
+
readonly groups?: Readonly<Record<string, ToolGroupDefinition>>;
|
|
280
|
+
}
|
|
281
|
+
export type ToolspaceSource = ToolspaceDefinition;
|
|
282
|
+
export interface ModelTargetDefinition {
|
|
283
|
+
readonly model: string;
|
|
284
|
+
readonly variant?: string;
|
|
285
|
+
readonly temperature?: number;
|
|
286
|
+
readonly top_p?: number;
|
|
287
|
+
}
|
|
288
|
+
export interface ModelPoolTargetDefinition {
|
|
289
|
+
readonly strategy: "any-of" | "round-robin" | "ordered";
|
|
290
|
+
readonly models: readonly ModelTargetDefinition[];
|
|
291
|
+
}
|
|
292
|
+
export type ModelTargetBlockDefinition = ModelTargetDefinition | ModelPoolTargetDefinition | Readonly<Record<string, unknown>>;
|
|
293
|
+
export interface ModelProfileDefinition {
|
|
294
|
+
readonly description?: string;
|
|
295
|
+
readonly targets: Readonly<Record<string, ModelTargetBlockDefinition>>;
|
|
296
|
+
}
|
|
297
|
+
export interface ModelspaceDefinition {
|
|
298
|
+
readonly name: string;
|
|
299
|
+
readonly description?: string;
|
|
300
|
+
readonly profiles: Readonly<Record<string, ModelProfileDefinition>>;
|
|
301
|
+
}
|
|
302
|
+
export type ModelspaceSource = ModelspaceDefinition;
|
|
303
|
+
export interface SkillTargetBindingDefinition {
|
|
304
|
+
readonly name: string;
|
|
305
|
+
}
|
|
306
|
+
export interface SkillDefinition {
|
|
307
|
+
readonly description?: string;
|
|
308
|
+
readonly targets: Readonly<Record<string, SkillTargetBindingDefinition>>;
|
|
309
|
+
}
|
|
310
|
+
export interface SkillspaceDefinition {
|
|
311
|
+
readonly name: string;
|
|
312
|
+
readonly description?: string;
|
|
313
|
+
readonly skills: Readonly<Record<string, SkillDefinition>>;
|
|
314
|
+
}
|
|
315
|
+
export type SkillspaceSource = SkillspaceDefinition;
|
|
316
|
+
export declare const hookEvent: {
|
|
317
|
+
readonly toolBefore: "tool.before";
|
|
318
|
+
readonly toolAfter: "tool.after";
|
|
319
|
+
readonly promptSubmit: "prompt.submit";
|
|
320
|
+
readonly permissionRequest: "permission.request";
|
|
321
|
+
readonly sessionStart: "session.start";
|
|
322
|
+
readonly sessionEnd: "session.end";
|
|
323
|
+
};
|
|
324
|
+
export type HookEvent = (typeof hookEvent)[keyof typeof hookEvent];
|
|
325
|
+
export interface HookTargetContextDefinition {
|
|
326
|
+
readonly harness: string;
|
|
327
|
+
readonly nativeEvent: string;
|
|
328
|
+
}
|
|
329
|
+
export interface HookSessionContextDefinition {
|
|
330
|
+
readonly id?: string;
|
|
331
|
+
readonly transcriptPath?: string;
|
|
332
|
+
}
|
|
333
|
+
export interface HookToolContextDefinition {
|
|
334
|
+
readonly logical?: string;
|
|
335
|
+
readonly nativeName: string;
|
|
336
|
+
readonly input: unknown;
|
|
337
|
+
}
|
|
338
|
+
export interface ToolBeforeHookEventDefinition {
|
|
339
|
+
readonly event: typeof hookEvent.toolBefore;
|
|
340
|
+
readonly target: HookTargetContextDefinition;
|
|
341
|
+
readonly tool: HookToolContextDefinition;
|
|
342
|
+
readonly cwd?: string;
|
|
343
|
+
readonly session?: HookSessionContextDefinition;
|
|
344
|
+
readonly native?: Record<string, unknown>;
|
|
345
|
+
}
|
|
346
|
+
export interface ToolAfterHookEventDefinition {
|
|
347
|
+
readonly event: typeof hookEvent.toolAfter;
|
|
348
|
+
readonly target: HookTargetContextDefinition;
|
|
349
|
+
readonly tool: HookToolContextDefinition & {
|
|
350
|
+
readonly output: unknown;
|
|
351
|
+
readonly success?: boolean;
|
|
352
|
+
};
|
|
353
|
+
readonly cwd?: string;
|
|
354
|
+
readonly session?: HookSessionContextDefinition;
|
|
355
|
+
readonly native?: Record<string, unknown>;
|
|
356
|
+
}
|
|
357
|
+
export interface SessionStartHookEventDefinition {
|
|
358
|
+
readonly event: typeof hookEvent.sessionStart;
|
|
359
|
+
readonly target: HookTargetContextDefinition;
|
|
360
|
+
readonly cwd?: string;
|
|
361
|
+
readonly session: HookSessionContextDefinition;
|
|
362
|
+
readonly native?: Record<string, unknown>;
|
|
363
|
+
}
|
|
364
|
+
export interface PromptSubmitHookEventDefinition {
|
|
365
|
+
readonly event: typeof hookEvent.promptSubmit;
|
|
366
|
+
readonly target: HookTargetContextDefinition;
|
|
367
|
+
readonly cwd?: string;
|
|
368
|
+
readonly session?: HookSessionContextDefinition;
|
|
369
|
+
readonly prompt: string;
|
|
370
|
+
readonly native?: Record<string, unknown>;
|
|
371
|
+
}
|
|
372
|
+
export interface PermissionRequestHookEventDefinition {
|
|
373
|
+
readonly event: typeof hookEvent.permissionRequest;
|
|
374
|
+
readonly target: HookTargetContextDefinition;
|
|
375
|
+
readonly cwd?: string;
|
|
376
|
+
readonly session?: HookSessionContextDefinition;
|
|
377
|
+
readonly tool?: HookToolContextDefinition;
|
|
378
|
+
readonly native?: Record<string, unknown>;
|
|
379
|
+
}
|
|
380
|
+
export interface SessionEndHookEventDefinition {
|
|
381
|
+
readonly event: typeof hookEvent.sessionEnd;
|
|
382
|
+
readonly target: HookTargetContextDefinition;
|
|
383
|
+
readonly cwd?: string;
|
|
384
|
+
readonly session: HookSessionContextDefinition;
|
|
385
|
+
readonly reason?: string;
|
|
386
|
+
readonly native?: Record<string, unknown>;
|
|
387
|
+
}
|
|
388
|
+
export type HookEventPayloadDefinition = ToolBeforeHookEventDefinition | ToolAfterHookEventDefinition | PromptSubmitHookEventDefinition | PermissionRequestHookEventDefinition | SessionStartHookEventDefinition | SessionEndHookEventDefinition;
|
|
389
|
+
export type HookEventPayloadFor<E extends HookEvent> = Extract<HookEventPayloadDefinition, {
|
|
390
|
+
readonly event: E;
|
|
391
|
+
}>;
|
|
392
|
+
export interface ContinueHookResultDefinition {
|
|
393
|
+
readonly decision: "continue";
|
|
394
|
+
readonly systemMessage?: string;
|
|
395
|
+
readonly additionalContext?: string;
|
|
396
|
+
}
|
|
397
|
+
export interface BlockHookResultDefinition {
|
|
398
|
+
readonly decision: "block";
|
|
399
|
+
readonly message: string;
|
|
400
|
+
}
|
|
401
|
+
export interface AllowHookResultDefinition {
|
|
402
|
+
readonly decision: "allow";
|
|
403
|
+
readonly systemMessage?: string;
|
|
404
|
+
}
|
|
405
|
+
export type ToolBeforeHookResultDefinition = ContinueHookResultDefinition | BlockHookResultDefinition;
|
|
406
|
+
export type PermissionRequestHookResultDefinition = ContinueHookResultDefinition | AllowHookResultDefinition | BlockHookResultDefinition;
|
|
407
|
+
export type HookResultFor<E extends HookEvent> = E extends typeof hookEvent.toolBefore ? ToolBeforeHookResultDefinition : E extends typeof hookEvent.permissionRequest ? PermissionRequestHookResultDefinition : ContinueHookResultDefinition;
|
|
408
|
+
export type HookHandlerDefinition<E extends HookEvent> = (event: HookEventPayloadFor<E>) => import("effect").Effect.Effect<HookResultFor<E>, unknown, never>;
|
|
409
|
+
export interface HookAnyToolMatcherDefinition {
|
|
410
|
+
readonly kind: "hook-any-tool";
|
|
411
|
+
}
|
|
412
|
+
export interface HookToolspaceToolMatcherDefinition {
|
|
413
|
+
readonly kind: "hook-toolspace-tool";
|
|
414
|
+
readonly tool: ToolRefInput;
|
|
415
|
+
}
|
|
416
|
+
export interface HookToolspaceGroupMatcherDefinition {
|
|
417
|
+
readonly kind: "hook-toolspace-group";
|
|
418
|
+
readonly group: ToolGroupRefInput;
|
|
419
|
+
}
|
|
420
|
+
export interface HookCanonicalToolMatcherDefinition {
|
|
421
|
+
readonly kind: "hook-canonical-tool";
|
|
422
|
+
readonly ref: string;
|
|
423
|
+
}
|
|
424
|
+
export type HookToolMatcherDefinition = HookAnyToolMatcherDefinition | HookToolspaceToolMatcherDefinition | HookToolspaceGroupMatcherDefinition | HookCanonicalToolMatcherDefinition;
|
|
425
|
+
export interface ToolHookMatchDefinition {
|
|
426
|
+
readonly tool?: HookToolMatcherDefinition;
|
|
427
|
+
}
|
|
428
|
+
export type HookMatchDefinition<E extends HookEvent> = E extends typeof hookEvent.toolBefore | typeof hookEvent.toolAfter | typeof hookEvent.permissionRequest ? ToolHookMatchDefinition : never;
|
|
429
|
+
export interface HookDefinition<E extends HookEvent = HookEvent> {
|
|
430
|
+
readonly name: string;
|
|
431
|
+
readonly description?: string;
|
|
432
|
+
readonly event: E;
|
|
433
|
+
readonly targets?: readonly string[];
|
|
434
|
+
readonly match?: HookMatchDefinition<E>;
|
|
435
|
+
readonly handle: HookHandlerDefinition<E>;
|
|
436
|
+
}
|
|
437
|
+
export type HookSource<E extends HookEvent = HookEvent> = HookDefinition<E>;
|
|
438
|
+
export declare const withNamedRef: <TKind extends string>(kind: TKind, first: string, second?: string) => {
|
|
439
|
+
readonly kind: TKind;
|
|
440
|
+
readonly plugin?: string;
|
|
441
|
+
readonly name: string;
|
|
442
|
+
};
|
|
443
|
+
export declare function traitRef(name: string): TraitRefDefinition;
|
|
444
|
+
export declare function traitRef(plugin: string, name: string): TraitRefDefinition;
|
|
445
|
+
export declare function agentRef(name: string): AgentRefDefinition;
|
|
446
|
+
export declare function agentRef(plugin: string, name: string): AgentRefDefinition;
|
|
447
|
+
export declare function orbitRef(name: string): OrbitRefDefinition;
|
|
448
|
+
export declare function orbitRef(plugin: string, name: string): OrbitRefDefinition;
|
|
449
|
+
export declare function toolRef(toolspace: string, name: string): ToolRefDefinition;
|
|
450
|
+
export declare function toolRef(plugin: string, toolspace: string, name: string): ToolRefDefinition;
|
|
451
|
+
export declare function toolGroupRef(toolspace: string, name: string): ToolGroupRefDefinition;
|
|
452
|
+
export declare function toolGroupRef(plugin: string, toolspace: string, name: string): ToolGroupRefDefinition;
|
|
453
|
+
export declare function modelProfileRef(modelspace: string, name: string): ModelProfileRefDefinition;
|
|
454
|
+
export declare function modelProfileRef(plugin: string, modelspace: string, name: string): ModelProfileRefDefinition;
|
|
455
|
+
export declare function skillRef(name: string): SkillRefDefinition;
|
|
456
|
+
export declare function skillRef(plugin: string, name: string): SkillRefDefinition;
|
|
457
|
+
export declare function skillspaceRef(skillspace: string, name: string): SkillspaceRefDefinition;
|
|
458
|
+
export declare function skillspaceRef(plugin: string, skillspace: string, name: string): SkillspaceRefDefinition;
|
|
459
|
+
export declare const schemaSlot: (options?: Omit<ToolSchemaSlotDefinition, "kind">) => ToolSchemaSlotDefinition;
|
|
460
|
+
export declare const bindTrait: (trait: TraitRefInput, options?: {
|
|
461
|
+
readonly tools?: Readonly<Record<string, TraitBindingToolDefinition>>;
|
|
462
|
+
}) => TraitBindingDefinition;
|
|
463
|
+
export declare const hookTool: {
|
|
464
|
+
readonly any: () => HookAnyToolMatcherDefinition;
|
|
465
|
+
readonly tool: (tool: ToolRefInput) => HookToolspaceToolMatcherDefinition;
|
|
466
|
+
readonly group: (group: ToolGroupRefInput) => HookToolspaceGroupMatcherDefinition;
|
|
467
|
+
readonly canonical: (ref: string) => HookCanonicalToolMatcherDefinition;
|
|
468
|
+
};
|
|
469
|
+
export declare const hookMatcher: {
|
|
470
|
+
readonly tool: {
|
|
471
|
+
readonly any: () => HookAnyToolMatcherDefinition;
|
|
472
|
+
readonly tool: (tool: ToolRefInput) => HookToolspaceToolMatcherDefinition;
|
|
473
|
+
readonly group: (group: ToolGroupRefInput) => HookToolspaceGroupMatcherDefinition;
|
|
474
|
+
readonly canonical: (ref: string) => HookCanonicalToolMatcherDefinition;
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
/** Transitional identity wrapper. The canonical public source type is `AgentSource`. */
|
|
478
|
+
export declare const defineAgent: <T extends AgentSource>(agent: T) => T;
|
|
479
|
+
/** Transitional identity wrapper. The canonical public source type is `TraitSource`. */
|
|
480
|
+
export declare const defineTrait: <T extends TraitSource>(trait: T) => T;
|
|
481
|
+
/** Transitional identity wrapper. The canonical public source type is `OrbitSource`. */
|
|
482
|
+
export declare const defineOrbit: <T extends OrbitSource>(orbit: T) => T;
|
|
483
|
+
/** Transitional identity wrapper. The canonical public source type is `ToolSource`. */
|
|
484
|
+
export declare const defineTool: <T extends ToolSource>(tool: T) => T;
|
|
485
|
+
/** Transitional identity wrapper. The canonical public source type is `ToolspaceSource`. */
|
|
486
|
+
export declare const defineToolspace: <T extends ToolspaceSource>(toolspace: T) => T;
|
|
487
|
+
/** Transitional identity wrapper. The canonical public source type is `ModelspaceSource`. */
|
|
488
|
+
export declare const defineModelspace: <T extends ModelspaceSource>(modelspace: T) => T;
|
|
489
|
+
/** Transitional identity wrapper. The canonical public source type is `SkillspaceSource`. */
|
|
490
|
+
export declare const defineSkillspace: <T extends SkillspaceSource>(skillspace: T) => T;
|
|
491
|
+
/** Transitional identity wrapper. The canonical public source type is `HookSource`. */
|
|
492
|
+
export declare const defineHook: <E extends HookEvent, T extends HookSource<E>>(hook: T) => T;
|
|
493
|
+
export type { ToolRuntimeContext, ToolRuntimeCost } from "./compile/runtime/schema-bridge";
|