@skastr0/prism-linux-x64 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/prism +0 -0
- package/package.json +2 -1
- package/types/content-hash.d.ts +14 -0
- package/types/index.d.ts +1 -9
- package/types/lowerer-capabilities.d.ts +34 -0
- package/types/workflow-bun-runtime.d.ts +21 -0
- package/types/workflow-errors.d.ts +9 -2
- package/types/workflow-harness-detection.d.ts +85 -0
- package/types/workflow-identity.d.ts +48 -0
- package/types/workflow-runner.d.ts +4 -1
- package/types/workflow-runtime.d.ts +24 -0
- package/types/workflow-session.d.ts +0 -1
- package/types/workflow-store.d.ts +7 -51
- package/types/workflow-worker-contract.d.ts +2 -1
- package/types/workflows.d.ts +27 -0
- package/types/compile/authoring-runtime.d.ts +0 -27
- package/types/compile/bundle-utils.d.ts +0 -16
- package/types/compile/cache.d.ts +0 -49
- package/types/compile/compile-manifest.d.ts +0 -48
- package/types/compile/compose.d.ts +0 -35
- package/types/compile/errors.d.ts +0 -124
- package/types/compile/generated-plugin.d.ts +0 -10
- package/types/compile/load.d.ts +0 -52
- package/types/compile/paths.d.ts +0 -2
- package/types/compile/protocol-tools.d.ts +0 -47
- package/types/compile/refs.d.ts +0 -7
- package/types/compile/registry.d.ts +0 -32
- package/types/compile/resolve.d.ts +0 -63
- package/types/compile/runtime-deps.d.ts +0 -6
- package/types/compile/sources.d.ts +0 -2782
- package/types/errors.d.ts +0 -116
- package/types/harnesses.d.ts +0 -18
- package/types/manifest.d.ts +0 -106
- package/types/prism-home.d.ts +0 -26
- package/types/services/prism-env.d.ts +0 -45
- package/types/source-selection.d.ts +0 -38
- package/types/state/lock.d.ts +0 -14
- package/types/workflow-amp-worker.d.ts +0 -28
- package/types/workflow-antigravity-pty.d.ts +0 -22
- package/types/workflow-antigravity-worker.d.ts +0 -75
- package/types/workflow-claude-worker.d.ts +0 -32
- package/types/workflow-codex-worker.d.ts +0 -24
- package/types/workflow-grok-worker.d.ts +0 -27
- package/types/workflow-hermes-worker.d.ts +0 -22
- package/types/workflow-kimi-worker.d.ts +0 -24
- package/types/workflow-loader.d.ts +0 -64
- package/types/workflow-opencode-worker.d.ts +0 -22
- package/types/workflow-output-schema.d.ts +0 -7
- package/types/workflow-permissions.d.ts +0 -10
- package/types/workflow-tsconfig.d.ts +0 -98
- package/types/workflow-worker-process.d.ts +0 -24
- package/types/workflow-workers.d.ts +0 -43
package/types/errors.d.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
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 McpPortConflictError_base: Schema.TaggedErrorClass<McpPortConflictError, "McpPortConflictError", {
|
|
65
|
-
readonly _tag: Schema.tag<"McpPortConflictError">;
|
|
66
|
-
} & {
|
|
67
|
-
host: typeof Schema.String;
|
|
68
|
-
port: typeof Schema.Number;
|
|
69
|
-
}>;
|
|
70
|
-
export declare class McpPortConflictError extends McpPortConflictError_base {
|
|
71
|
-
get message(): string;
|
|
72
|
-
}
|
|
73
|
-
declare const BlockedTargetError_base: Schema.TaggedErrorClass<BlockedTargetError, "BlockedTargetError", {
|
|
74
|
-
readonly _tag: Schema.tag<"BlockedTargetError">;
|
|
75
|
-
} & {
|
|
76
|
-
targetPath: typeof Schema.String;
|
|
77
|
-
plugin: typeof Schema.String;
|
|
78
|
-
hint: typeof Schema.String;
|
|
79
|
-
}>;
|
|
80
|
-
export declare class BlockedTargetError extends BlockedTargetError_base {
|
|
81
|
-
get message(): string;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Every typed error Prism may surface to a human. `CompileError` (which
|
|
85
|
-
* includes `PluginManifestError`) is defined in src/compile/errors.ts.
|
|
86
|
-
*/
|
|
87
|
-
export type PrismError = CompileError | PrismConfigError | BundleBuildError | McpBundleMissingError | McpPortConflictError | BlockedTargetError;
|
|
88
|
-
export declare const PRISM_ERROR_TAGS: ReadonlySet<string>;
|
|
89
|
-
export declare const isPrismError: (value: unknown) => value is PrismError;
|
|
90
|
-
export interface PrismErrorRender {
|
|
91
|
-
/** One line; never multi-line, never a stack frame. */
|
|
92
|
-
readonly headline: string;
|
|
93
|
-
/** Optional extra lines, rendered indented under the headline. */
|
|
94
|
-
readonly detail?: ReadonlyArray<string>;
|
|
95
|
-
/** Remediation; rendered as a trailing `hint: …` line. */
|
|
96
|
-
readonly hint: string;
|
|
97
|
-
/** Filesystem path the error is about, when it has one. */
|
|
98
|
-
readonly path?: string;
|
|
99
|
-
}
|
|
100
|
-
export declare const describePrismError: (error: PrismError) => PrismErrorRender;
|
|
101
|
-
/** Render a PrismError for humans: headline, indented detail, hint line. */
|
|
102
|
-
export declare const renderPrismError: (error: PrismError) => string;
|
|
103
|
-
export interface PrismCauseDescription {
|
|
104
|
-
readonly headline: string;
|
|
105
|
-
readonly detail?: ReadonlyArray<string>;
|
|
106
|
-
readonly hint?: string;
|
|
107
|
-
readonly path?: string;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Walk an Effect Cause (or any thrown value) and describe the first Prism
|
|
111
|
-
* error found. Unknown defects render name + message only — never `.stack`.
|
|
112
|
-
*/
|
|
113
|
-
export declare const describePrismCause: (cause: unknown) => PrismCauseDescription;
|
|
114
|
-
/** Render a whole Cause for humans. The single edge renderer. */
|
|
115
|
-
export declare const renderPrismCause: (cause: unknown) => string;
|
|
116
|
-
export {};
|
package/types/harnesses.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Harness registry - configurations for all supported AI coding harnesses
|
|
3
|
-
*/
|
|
4
|
-
import { Layer } from "effect";
|
|
5
|
-
import { HarnessRoots, type HarnessRootsEnv } from "./services/prism-env.js";
|
|
6
|
-
import type { HarnessConfig, HarnessId, HarnessScope } from "./types.js";
|
|
7
|
-
export declare const HARNESSES: Record<HarnessId, HarnessConfig>;
|
|
8
|
-
export declare function getHarness(id: HarnessId): HarnessConfig;
|
|
9
|
-
export declare function getAllHarnessIds(): HarnessId[];
|
|
10
|
-
export declare function isValidHarnessId(id: string): id is HarnessId;
|
|
11
|
-
/**
|
|
12
|
-
* Live layer mapping each harness to its registry globalConfigPath, expanded
|
|
13
|
-
* through the current HOME. This belongs with the registry because it is the
|
|
14
|
-
* only module that owns the harness definitions.
|
|
15
|
-
*/
|
|
16
|
-
export declare const HarnessRootsLive: Layer.Layer<HarnessRoots>;
|
|
17
|
-
export declare function resolveHarnessRoot(harness: HarnessConfig, scope: HarnessScope, projectPath?: string, roots?: HarnessRootsEnv): string | null;
|
|
18
|
-
export declare function harnessSupportsProjectScope(harness: HarnessConfig): boolean;
|
package/types/manifest.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin manifest parsing and validation
|
|
3
|
-
*/
|
|
4
|
-
import type { HarnessId, AgentValidationResult, PluginArtifactType, PluginManifest, PluginTargetId, SkillFrontmatter, SkillValidationResult, UnifiedFrontmatter } from "./types.js";
|
|
5
|
-
export interface ArtifactSourceFile {
|
|
6
|
-
relativePath: string;
|
|
7
|
-
sourcePath: string;
|
|
8
|
-
scope: "shared" | "harness";
|
|
9
|
-
}
|
|
10
|
-
export declare function collectArtifactSourceFiles(pluginPath: string, artifact: PluginArtifactType, harnessId?: HarnessId): Promise<ArtifactSourceFile[]>;
|
|
11
|
-
/**
|
|
12
|
-
* Read and validate plugin manifest
|
|
13
|
-
*/
|
|
14
|
-
export declare function readManifest(pluginPath: string): Promise<PluginManifest>;
|
|
15
|
-
export declare function resolveManifestTargets(targets: readonly PluginTargetId[]): HarnessId[];
|
|
16
|
-
export declare function resolveManifestTargetsForArtifact(targets: readonly PluginTargetId[], artifact: PluginArtifactType): HarnessId[];
|
|
17
|
-
export declare function getManifestArtifactTargets(manifest: PluginManifest, artifact: PluginArtifactType): HarnessId[];
|
|
18
|
-
/**
|
|
19
|
-
* Check if manifest targets a specific harness for any artifact
|
|
20
|
-
*/
|
|
21
|
-
export declare function manifestTargetsHarness(manifest: PluginManifest, harnessId: HarnessId): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Check if manifest targets a specific harness for one artifact type
|
|
24
|
-
*/
|
|
25
|
-
export declare function manifestTargetsArtifact(manifest: PluginManifest, artifact: PluginArtifactType, harnessId: HarnessId): boolean;
|
|
26
|
-
export declare function manifestHasCompileTargets(manifest: PluginManifest, harnessId?: HarnessId): boolean;
|
|
27
|
-
export declare function formatManifestTargets(manifest: PluginManifest): string;
|
|
28
|
-
/**
|
|
29
|
-
* Parse markdown file with frontmatter
|
|
30
|
-
*/
|
|
31
|
-
export declare function parseMarkdownFile(filePath: string): Promise<{
|
|
32
|
-
frontmatter: UnifiedFrontmatter;
|
|
33
|
-
content: string;
|
|
34
|
-
}>;
|
|
35
|
-
/**
|
|
36
|
-
* Extract harness-specific frontmatter, merging with base frontmatter
|
|
37
|
-
*/
|
|
38
|
-
export declare function getHarnessFrontmatter(frontmatter: UnifiedFrontmatter, harnessId: HarnessId): Record<string, unknown>;
|
|
39
|
-
/**
|
|
40
|
-
* Serialize frontmatter back to YAML format
|
|
41
|
-
*/
|
|
42
|
-
export declare function serializeFrontmatter(frontmatter: Record<string, unknown>): string;
|
|
43
|
-
/**
|
|
44
|
-
* Reconstruct markdown file with new frontmatter
|
|
45
|
-
*/
|
|
46
|
-
export declare function reconstructMarkdown(frontmatter: Record<string, unknown>, content: string): string;
|
|
47
|
-
/**
|
|
48
|
-
* Validate a skill name according to Anthropic's spec
|
|
49
|
-
*/
|
|
50
|
-
export declare function validateSkillName(name: unknown): {
|
|
51
|
-
valid: boolean;
|
|
52
|
-
error?: string;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Validate a skill description according to Anthropic's spec
|
|
56
|
-
*/
|
|
57
|
-
export declare function validateSkillDescription(description: unknown): {
|
|
58
|
-
valid: boolean;
|
|
59
|
-
error?: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Validate skill frontmatter keys (whitelist check)
|
|
63
|
-
*/
|
|
64
|
-
export declare function validateSkillFrontmatterKeys(frontmatter: Record<string, unknown>): {
|
|
65
|
-
valid: boolean;
|
|
66
|
-
error?: string;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Validate optional skill fields (allowed-tools, metadata, license, compatibility)
|
|
70
|
-
*/
|
|
71
|
-
export declare function validateSkillOptionalFields(frontmatter: Record<string, unknown>): {
|
|
72
|
-
valid: boolean;
|
|
73
|
-
errors: string[];
|
|
74
|
-
warnings: string[];
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Parse and validate a SKILL.md file
|
|
78
|
-
*/
|
|
79
|
-
export declare function parseSkillFile(filePath: string): Promise<{
|
|
80
|
-
frontmatter: SkillFrontmatter;
|
|
81
|
-
content: string;
|
|
82
|
-
lineCount: number;
|
|
83
|
-
}>;
|
|
84
|
-
/**
|
|
85
|
-
* Comprehensive skill validation
|
|
86
|
-
*/
|
|
87
|
-
export declare function validateSkill(skillPath: string, skillDirName?: string): Promise<SkillValidationResult>;
|
|
88
|
-
/**
|
|
89
|
-
* Validate all skills in a plugin
|
|
90
|
-
*/
|
|
91
|
-
export declare function validatePluginSkills(pluginPath: string): Promise<SkillValidationResult[]>;
|
|
92
|
-
/**
|
|
93
|
-
* Validate an agent description
|
|
94
|
-
*/
|
|
95
|
-
export declare function validateAgentDescription(description: unknown): {
|
|
96
|
-
valid: boolean;
|
|
97
|
-
error?: string;
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Validate an agent definition file
|
|
101
|
-
*/
|
|
102
|
-
export declare function validateAgent(agentPath: string): Promise<AgentValidationResult>;
|
|
103
|
-
/**
|
|
104
|
-
* Validate all agents in a plugin
|
|
105
|
-
*/
|
|
106
|
-
export declare function validatePluginAgents(pluginPath: string): Promise<AgentValidationResult[]>;
|
package/types/prism-home.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
export declare const defaultPrismConfig: () => PrismConfig;
|
|
26
|
-
export declare const readPrismConfig: (prismHome?: string) => Promise<PrismConfig>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PrismHome — the Effect service carrying the resolved Prism home directory
|
|
3
|
-
* (docs/overhaul-one-writer-plan.md, WS2).
|
|
4
|
-
*
|
|
5
|
-
* The env read (`PRISM_HOME`, falling back to ~/.prism) happens exactly once,
|
|
6
|
-
* at the CLI edge, when `PrismHomeLive` is built into the runtime. Library
|
|
7
|
-
* code never falls back to the environment: new code (WS3+ snapshot store,
|
|
8
|
-
* sync engine, MCP supervisor) consumes the `PrismHome` tag, so tests are
|
|
9
|
-
* structurally unable to touch real state — they provide `PrismHomeTest`.
|
|
10
|
-
*
|
|
11
|
-
* Do not add `resolvePrismHome()` default-argument fallbacks to new modules;
|
|
12
|
-
* thread this service instead.
|
|
13
|
-
*/
|
|
14
|
-
import { Context, Layer } from "effect";
|
|
15
|
-
import type { HarnessId } from "../types.js";
|
|
16
|
-
export interface PrismEnv {
|
|
17
|
-
/** Absolute path of the Prism home directory. */
|
|
18
|
-
readonly home: string;
|
|
19
|
-
}
|
|
20
|
-
declare const PrismHome_base: Context.TagClass<PrismHome, "prism/PrismHome", PrismEnv>;
|
|
21
|
-
export declare class PrismHome extends PrismHome_base {
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Live layer for the CLI edge. Reads the environment once when the layer is
|
|
25
|
-
* built; everything downstream sees one immutable value.
|
|
26
|
-
*/
|
|
27
|
-
export declare const PrismHomeLive: Layer.Layer<PrismHome>;
|
|
28
|
-
/** In-memory layer for tests — no env read, no disk. */
|
|
29
|
-
export declare const PrismHomeTest: (home: string) => Layer.Layer<PrismHome>;
|
|
30
|
-
/**
|
|
31
|
-
* HarnessRoots — the Effect service carrying the resolved base directory for
|
|
32
|
-
* each harness global root. Production resolves via the harness registry's
|
|
33
|
-
* globalConfigPath; tests provide a map of harness IDs to temp directories so
|
|
34
|
-
* refresh/compile/doctor never touch real harness configs.
|
|
35
|
-
*/
|
|
36
|
-
export interface HarnessRootsEnv {
|
|
37
|
-
/** Resolve the global root directory for a harness. */
|
|
38
|
-
readonly resolve: (harnessId: HarnessId) => string;
|
|
39
|
-
}
|
|
40
|
-
declare const HarnessRoots_base: Context.TagClass<HarnessRoots, "prism/HarnessRoots", HarnessRootsEnv>;
|
|
41
|
-
export declare class HarnessRoots extends HarnessRoots_base {
|
|
42
|
-
}
|
|
43
|
-
/** In-memory layer for tests — maps harnesses to caller-supplied roots. */
|
|
44
|
-
export declare const HarnessRootsTest: (roots: Partial<Record<HarnessId, string>>) => Layer.Layer<HarnessRoots>;
|
|
45
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type HarnessId, type HarnessScope, type PluginArtifactType, type PluginManifestTargets, type PluginRuntimeConfig, type PluginTargetId, type TargetPresetId } from "./types.js";
|
|
2
|
-
export declare const SOURCE_NOUNS: readonly ["rules", "commands", "agents", "skills", "orbits", "tools", "toolspaces", "modelspaces", "skillspaces", "hooks"];
|
|
3
|
-
export type SourceNoun = (typeof SOURCE_NOUNS)[number];
|
|
4
|
-
export interface SourceRuntimeRequirements {
|
|
5
|
-
readonly mcpConfigured: boolean;
|
|
6
|
-
readonly streamableHttpMcp: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface SourceSelectionEntry {
|
|
9
|
-
readonly noun: SourceNoun;
|
|
10
|
-
readonly declaredTargets: readonly PluginTargetId[];
|
|
11
|
-
readonly harnesses: readonly HarnessId[];
|
|
12
|
-
}
|
|
13
|
-
export interface SourceSelection {
|
|
14
|
-
readonly entries: readonly SourceSelectionEntry[];
|
|
15
|
-
readonly runtime: PluginRuntimeConfig;
|
|
16
|
-
}
|
|
17
|
-
export interface TargetSourceSelection {
|
|
18
|
-
readonly target: HarnessId;
|
|
19
|
-
readonly scope?: HarnessScope;
|
|
20
|
-
readonly nouns: Readonly<Record<SourceNoun, boolean>>;
|
|
21
|
-
readonly runtime: SourceRuntimeRequirements;
|
|
22
|
-
readonly hasLowerableSources: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const getCompileManagedPluginArtifactTargets: (artifact: PluginArtifactType) => readonly HarnessId[];
|
|
25
|
-
export declare function isTargetPresetId(value: string): value is TargetPresetId;
|
|
26
|
-
export declare function isPluginTargetId(value: unknown): value is PluginTargetId;
|
|
27
|
-
export declare const targetSupportsSourceNoun: (harnessId: HarnessId, noun: SourceNoun) => boolean;
|
|
28
|
-
export declare function resolveManifestTargets(targets: readonly PluginTargetId[]): HarnessId[];
|
|
29
|
-
export declare function resolveManifestTargetsForSourceNoun(targets: readonly PluginTargetId[], noun: SourceNoun): HarnessId[];
|
|
30
|
-
export declare function unsupportedDirectTargetsForSourceNoun(targets: readonly PluginTargetId[], noun: SourceNoun): HarnessId[];
|
|
31
|
-
export declare function presetsWithNoSupportedTargetsForSourceNoun(targets: readonly PluginTargetId[], noun: SourceNoun): TargetPresetId[];
|
|
32
|
-
export declare function validateSourceTargetSupport(noun: SourceNoun, declaredTargets: readonly unknown[]): string[];
|
|
33
|
-
export declare const sourceSelectionFromManifestTargets: (targets: PluginManifestTargets, options?: {
|
|
34
|
-
readonly runtime?: PluginRuntimeConfig;
|
|
35
|
-
}) => SourceSelection;
|
|
36
|
-
export declare const selectSourcesForTarget: (selection: SourceSelection, target: HarnessId, options?: {
|
|
37
|
-
readonly scope?: HarnessScope;
|
|
38
|
-
}) => TargetSourceSelection;
|
package/types/state/lock.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Advisory run lock — one concurrent plan→apply→commit per PRISM_HOME.
|
|
3
|
-
*
|
|
4
|
-
* O_EXCL create of `<PRISM_HOME>/state/lock` holding {pid}; a lock whose pid
|
|
5
|
-
* is dead is stale and taken over. Ledger files were bare read-modify-write
|
|
6
|
-
* JSON with no concurrency story; the snapshot store inherits a real one.
|
|
7
|
-
*/
|
|
8
|
-
export declare const lockPath: (prismHome: string) => string;
|
|
9
|
-
export declare class SnapshotLockHeldError extends Error {
|
|
10
|
-
readonly path: string;
|
|
11
|
-
readonly pid: number | undefined;
|
|
12
|
-
constructor(path: string, pid: number | undefined);
|
|
13
|
-
}
|
|
14
|
-
export declare const withSnapshotLock: <T>(prismHome: string, run: () => Promise<T>) => Promise<T>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
export type AmpWorkflowWorkerOptions = {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly bin?: string;
|
|
6
|
-
readonly model?: string;
|
|
7
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
8
|
-
readonly processTimeoutMs?: number;
|
|
9
|
-
readonly abortSignal?: AbortSignal;
|
|
10
|
-
} & WorkflowTaskRepairLoopOption<"amp-code">;
|
|
11
|
-
export declare class AmpWorkflowWorkerError extends Error {
|
|
12
|
-
readonly name = "AmpWorkflowWorkerError";
|
|
13
|
-
}
|
|
14
|
-
export type AmpWorkflowMode = "deep" | "rush";
|
|
15
|
-
export declare const assertAmpWorkflowMode: (mode: string | undefined) => AmpWorkflowMode | undefined;
|
|
16
|
-
export declare const buildAmpArgs: (input: {
|
|
17
|
-
readonly mode?: string;
|
|
18
|
-
readonly prompt: string;
|
|
19
|
-
readonly sessionId?: string;
|
|
20
|
-
readonly permission?: WorkflowPermissionMode;
|
|
21
|
-
/**
|
|
22
|
-
* Required for permissive/full-access. runAmpWorkflowTask supplies a temp
|
|
23
|
-
* settings file with amp.dangerouslyAllowAll enabled before invoking this.
|
|
24
|
-
*/
|
|
25
|
-
readonly settingsFile?: string;
|
|
26
|
-
}) => ReadonlyArray<string>;
|
|
27
|
-
export declare const ampSessionId: (stdout: string, stderr: string) => string | undefined;
|
|
28
|
-
export declare const runAmpWorkflowTask: (task: AnyWorkflowTask, options: AmpWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { WorkflowWorkerProcessOptions, WorkflowWorkerProcessResult } from "./workflow-worker-process.js";
|
|
2
|
-
/**
|
|
3
|
-
* Embedded Python PTY wrapper for spawning the Antigravity CLI (`agy`) with a
|
|
4
|
-
* controlling terminal. The upstream `agy --print` mode is known to drop or
|
|
5
|
-
* stall stdout when stdin is not a TTY; allocating a PTY works around the
|
|
6
|
-
* issue and also lets us reliably terminate the whole process group.
|
|
7
|
-
*
|
|
8
|
-
* The wrapper runs on Python 3, uses only stdlib modules, and is written to
|
|
9
|
-
* be compatible with both macOS and Linux.
|
|
10
|
-
*/
|
|
11
|
-
export declare const antigravityPtyWrapperScript: () => string;
|
|
12
|
-
export interface AntigravityPtyProcessOptions extends WorkflowWorkerProcessOptions {
|
|
13
|
-
/** Go-style duration string passed to `agy --print-timeout`. */
|
|
14
|
-
readonly printTimeout: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Run a command through the Python PTY wrapper with process-group cleanup.
|
|
18
|
-
*
|
|
19
|
-
* This is intentionally lower-level than `runWorkflowWorkerProcess` so the
|
|
20
|
-
* Antigravity worker can decide when the extra weight is justified.
|
|
21
|
-
*/
|
|
22
|
-
export declare const runAntigravityPtyProcess: (options: AntigravityPtyProcessOptions) => Promise<WorkflowWorkerProcessResult>;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { AntigravityWorkflowPermissionMode, AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
/**
|
|
4
|
-
* Environment-variable overrides for the Antigravity workflow worker:
|
|
5
|
-
*
|
|
6
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_BIN: path to the `agy` executable.
|
|
7
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_PRINT_TIMEOUT: value passed to `agy --print-timeout`.
|
|
8
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_PROCESS_TIMEOUT_MS: outer watchdog before Prism kills `agy`.
|
|
9
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_PTY: set to "1" or "true" to force a Python PTY wrapper.
|
|
10
|
-
* Useful when `agy --print` drops stdout because stdin is not a TTY.
|
|
11
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_PTY_PYTHON: path to a Python 3 interpreter (default: `python3` on PATH).
|
|
12
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_RETRY_MAX_ATTEMPTS: retries on sentinel/empty output (default: 3).
|
|
13
|
-
* - PRISM_WORKFLOW_ANTIGRAVITY_RETRY_BACKOFF_MS: delay between retries (default: 2000).
|
|
14
|
-
*/
|
|
15
|
-
export type AntigravityWorkflowWorkerOptions = {
|
|
16
|
-
readonly cwd: string;
|
|
17
|
-
readonly bin?: string;
|
|
18
|
-
readonly model?: string;
|
|
19
|
-
readonly resolvedPermission: AntigravityWorkflowPermissionMode;
|
|
20
|
-
readonly printTimeout?: string;
|
|
21
|
-
readonly processTimeoutMs?: number;
|
|
22
|
-
readonly abortSignal?: AbortSignal;
|
|
23
|
-
/** Override the default retry budget. Mostly useful in tests. */
|
|
24
|
-
readonly maxAttempts?: number;
|
|
25
|
-
/** Override the default retry backoff. Mostly useful in tests. */
|
|
26
|
-
readonly backoffMs?: number;
|
|
27
|
-
} & WorkflowTaskRepairLoopOption<"antigravity-cli">;
|
|
28
|
-
export declare class AntigravityWorkflowWorkerError extends Error {
|
|
29
|
-
readonly name = "AntigravityWorkflowWorkerError";
|
|
30
|
-
}
|
|
31
|
-
export declare const DEFAULT_ANTIGRAVITY_MODEL = "Gemini 3.5 Flash (Medium)";
|
|
32
|
-
export type AgyConversationId = string & {
|
|
33
|
-
readonly __brand: "AgyConversationId";
|
|
34
|
-
};
|
|
35
|
-
type AgyValue<Kind extends string> = string & {
|
|
36
|
-
readonly __agyValue: Kind;
|
|
37
|
-
};
|
|
38
|
-
type AgyLogFile = AgyValue<"log-file">;
|
|
39
|
-
type AgyPrintTimeout = AgyValue<"print-timeout">;
|
|
40
|
-
type AgyWorkspaceDir = AgyValue<"workspace-dir">;
|
|
41
|
-
type AgyModel = AgyValue<"model">;
|
|
42
|
-
type AgyPrompt = AgyValue<"prompt">;
|
|
43
|
-
type AgyLogFileArgs = readonly ["--log-file", AgyLogFile];
|
|
44
|
-
type AgyConversationArgs = readonly ["--conversation", AgyConversationId];
|
|
45
|
-
type AgyPermissionArgs = readonly ["--dangerously-skip-permissions", "--sandbox"];
|
|
46
|
-
type AgyTimeoutArgs = readonly ["--print-timeout", AgyPrintTimeout];
|
|
47
|
-
type AgyWorkspaceArgs = readonly ["--add-dir", AgyWorkspaceDir];
|
|
48
|
-
type AgyModelArgs = readonly ["--model", AgyModel];
|
|
49
|
-
type AgyRequiredPrintArgs = readonly [
|
|
50
|
-
...AgyPermissionArgs,
|
|
51
|
-
...AgyTimeoutArgs,
|
|
52
|
-
...AgyWorkspaceArgs,
|
|
53
|
-
...AgyModelArgs,
|
|
54
|
-
"--print",
|
|
55
|
-
AgyPrompt
|
|
56
|
-
];
|
|
57
|
-
export type AgyForbiddenWorkflowFlag = "--continue" | "-c";
|
|
58
|
-
export type AgyPrintArgs = AgyRequiredPrintArgs | readonly [...AgyLogFileArgs, ...AgyRequiredPrintArgs] | readonly [...AgyConversationArgs, ...AgyRequiredPrintArgs] | readonly [...AgyLogFileArgs, ...AgyConversationArgs, ...AgyRequiredPrintArgs];
|
|
59
|
-
export declare const AGY_FORBIDDEN_WORKFLOW_FLAGS: Set<AgyForbiddenWorkflowFlag>;
|
|
60
|
-
export declare const assertAgyPrintArgsWorkflowSafe: (args: readonly string[]) => void;
|
|
61
|
-
export declare const detectAgyPrintTimeout: (stdout: string, stderr: string) => boolean;
|
|
62
|
-
export declare const resolveAntigravityPermission: (mode: WorkflowPermissionMode) => AntigravityWorkflowPermissionMode;
|
|
63
|
-
export declare const buildAgyArgs: (input: {
|
|
64
|
-
readonly cwd: string;
|
|
65
|
-
readonly model: string;
|
|
66
|
-
readonly permission?: AntigravityWorkflowPermissionMode;
|
|
67
|
-
readonly printTimeout: string;
|
|
68
|
-
readonly prompt: string;
|
|
69
|
-
readonly conversationId?: AgyConversationId;
|
|
70
|
-
readonly logFile?: string;
|
|
71
|
-
}) => AgyPrintArgs;
|
|
72
|
-
export declare const parseAgyConversationId: (value: string | undefined) => AgyConversationId | undefined;
|
|
73
|
-
export declare const extractAgyConversationId: (logText: string) => AgyConversationId | undefined;
|
|
74
|
-
export declare const runAntigravityWorkflowTask: (task: AnyWorkflowTask, options: AntigravityWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
75
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import { type WorkflowJsonSchema } from "./workflow-output-schema.js";
|
|
3
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
4
|
-
export type ClaudeWorkflowWorkerOptions = {
|
|
5
|
-
readonly cwd: string;
|
|
6
|
-
readonly bin?: string;
|
|
7
|
-
readonly model?: string;
|
|
8
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
9
|
-
readonly restrictedTools?: readonly string[];
|
|
10
|
-
readonly processTimeoutMs?: number;
|
|
11
|
-
readonly abortSignal?: AbortSignal;
|
|
12
|
-
} & WorkflowTaskRepairLoopOption<"claude-code">;
|
|
13
|
-
export declare class ClaudeWorkflowWorkerError extends Error {
|
|
14
|
-
readonly name = "ClaudeWorkflowWorkerError";
|
|
15
|
-
}
|
|
16
|
-
export interface ClaudeGeneratedPluginDiscovery {
|
|
17
|
-
readonly pluginDir?: string;
|
|
18
|
-
readonly mcpConfig?: string;
|
|
19
|
-
readonly allowedTools?: readonly string[];
|
|
20
|
-
}
|
|
21
|
-
export declare const discoverClaudeGeneratedPlugin: (task: AnyWorkflowTask) => ClaudeGeneratedPluginDiscovery;
|
|
22
|
-
export declare const buildClaudeArgs: (input: {
|
|
23
|
-
readonly agent: string;
|
|
24
|
-
readonly model?: string;
|
|
25
|
-
readonly prompt: string;
|
|
26
|
-
readonly resumeSessionId?: string;
|
|
27
|
-
readonly generatedPlugin?: ClaudeGeneratedPluginDiscovery;
|
|
28
|
-
readonly outputSchema?: WorkflowJsonSchema;
|
|
29
|
-
readonly permission?: WorkflowPermissionMode;
|
|
30
|
-
readonly restrictedTools?: readonly string[];
|
|
31
|
-
}) => ReadonlyArray<string>;
|
|
32
|
-
export declare const runClaudeWorkflowTask: (task: AnyWorkflowTask, options: ClaudeWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
export type CodexWorkflowWorkerOptions = {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly bin?: string;
|
|
6
|
-
readonly model?: string;
|
|
7
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
8
|
-
readonly processTimeoutMs?: number;
|
|
9
|
-
readonly abortSignal?: AbortSignal;
|
|
10
|
-
} & WorkflowTaskRepairLoopOption<"codex-cli">;
|
|
11
|
-
export declare class CodexWorkflowWorkerError extends Error {
|
|
12
|
-
readonly name = "CodexWorkflowWorkerError";
|
|
13
|
-
}
|
|
14
|
-
export declare const buildCodexArgs: (input: {
|
|
15
|
-
readonly cwd: string;
|
|
16
|
-
readonly model?: string;
|
|
17
|
-
readonly outputSchemaPath?: string;
|
|
18
|
-
readonly outputPath: string;
|
|
19
|
-
readonly prompt: string;
|
|
20
|
-
readonly resumeSessionId?: string;
|
|
21
|
-
readonly permission?: WorkflowPermissionMode;
|
|
22
|
-
}) => ReadonlyArray<string>;
|
|
23
|
-
export declare const codexSessionId: (stdout: string, stderr: string) => string | undefined;
|
|
24
|
-
export declare const runCodexWorkflowTask: (task: AnyWorkflowTask, options: CodexWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
export type GrokWorkflowWorkerOptions = {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly bin?: string;
|
|
6
|
-
readonly model?: string;
|
|
7
|
-
readonly effort?: string;
|
|
8
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
9
|
-
readonly processTimeoutMs?: number;
|
|
10
|
-
readonly abortSignal?: AbortSignal;
|
|
11
|
-
} & WorkflowTaskRepairLoopOption<"grok">;
|
|
12
|
-
export declare class WorkflowWorkerError extends Error {
|
|
13
|
-
readonly name = "WorkflowWorkerError";
|
|
14
|
-
}
|
|
15
|
-
export declare const isGrokAuthOutput: (output: string) => boolean;
|
|
16
|
-
export declare const buildGrokArgs: (input: {
|
|
17
|
-
readonly cwd: string;
|
|
18
|
-
readonly agent: string;
|
|
19
|
-
readonly model?: string;
|
|
20
|
-
readonly effort?: string;
|
|
21
|
-
readonly prompt: string;
|
|
22
|
-
readonly sessionId?: string;
|
|
23
|
-
readonly permission?: WorkflowPermissionMode;
|
|
24
|
-
}) => ReadonlyArray<string>;
|
|
25
|
-
export declare const grokSessionId: (stdout: string, stderr: string) => string | undefined;
|
|
26
|
-
export declare const runGrokWorkflowTask: (task: AnyWorkflowTask, options: GrokWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
27
|
-
export { parseWorkflowWorkerJsonOutput, WorkflowOutputParseError } from "./workflow-worker-contract.js";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
export type HermesWorkflowWorkerOptions = {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly bin?: string;
|
|
6
|
-
readonly model?: string;
|
|
7
|
-
readonly profile?: string;
|
|
8
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
9
|
-
readonly processTimeoutMs?: number;
|
|
10
|
-
readonly abortSignal?: AbortSignal;
|
|
11
|
-
} & WorkflowTaskRepairLoopOption<"hermes">;
|
|
12
|
-
export declare class HermesWorkflowWorkerError extends Error {
|
|
13
|
-
readonly name = "HermesWorkflowWorkerError";
|
|
14
|
-
}
|
|
15
|
-
export declare const buildHermesArgs: (input: {
|
|
16
|
-
readonly profile?: string;
|
|
17
|
-
readonly model?: string;
|
|
18
|
-
readonly prompt: string;
|
|
19
|
-
readonly resumeSessionId?: string;
|
|
20
|
-
readonly permission?: WorkflowPermissionMode;
|
|
21
|
-
}) => ReadonlyArray<string>;
|
|
22
|
-
export declare const runHermesWorkflowTask: (task: AnyWorkflowTask, options: HermesWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { AnyWorkflowTask, WorkflowPermissionMode } from "./workflows.js";
|
|
2
|
-
import type { WorkflowTaskExecution, WorkflowTaskRepairLoopOption } from "./workflow-runner.js";
|
|
3
|
-
export type KimiWorkflowWorkerOptions = {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly bin?: string;
|
|
6
|
-
readonly model?: string;
|
|
7
|
-
readonly kimiHome?: string;
|
|
8
|
-
readonly resolvedPermission: WorkflowPermissionMode;
|
|
9
|
-
readonly processTimeoutMs?: number;
|
|
10
|
-
readonly abortSignal?: AbortSignal;
|
|
11
|
-
} & WorkflowTaskRepairLoopOption<"kimi-code">;
|
|
12
|
-
export declare class KimiWorkflowWorkerError extends Error {
|
|
13
|
-
readonly name = "KimiWorkflowWorkerError";
|
|
14
|
-
}
|
|
15
|
-
export declare const isKimiAuthOutput: (output: string) => boolean;
|
|
16
|
-
export declare const kimiSessionIdFromStream: (stdout: string) => string | undefined;
|
|
17
|
-
export declare const buildKimiArgs: (input: {
|
|
18
|
-
readonly model?: string;
|
|
19
|
-
readonly prompt: string;
|
|
20
|
-
readonly skillsDir: string;
|
|
21
|
-
readonly sessionId?: string;
|
|
22
|
-
readonly permission?: WorkflowPermissionMode;
|
|
23
|
-
}) => ReadonlyArray<string>;
|
|
24
|
-
export declare const runKimiWorkflowTask: (task: AnyWorkflowTask, options: KimiWorkflowWorkerOptions) => Promise<WorkflowTaskExecution>;
|