@smithers-orchestrator/cli 0.17.0 → 0.18.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.
@@ -0,0 +1,30 @@
1
+ import { S as SemanticToolDefinition$1 } from '../SemanticToolDefinition-C1UT6pZk.js';
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import 'zod';
4
+ import '../find-db.js';
5
+ import '@smithers-orchestrator/db/adapter';
6
+
7
+ type SemanticMcpServerOptions$1 = {
8
+ name?: string;
9
+ version?: string;
10
+ };
11
+
12
+ /** @typedef {import("./SemanticMcpServerOptions.ts").SemanticMcpServerOptions} SemanticMcpServerOptions */
13
+ /** @typedef {import("./SemanticToolDefinition.ts").SemanticToolDefinition} SemanticToolDefinition */
14
+ /**
15
+ * @param {McpServer} server
16
+ * @param {SemanticToolDefinition[]} [toolDefinitions]
17
+ */
18
+ declare function registerSemanticTools(server: McpServer, toolDefinitions?: SemanticToolDefinition[]): McpServer;
19
+ /**
20
+ * @param {SemanticMcpServerOptions} [options]
21
+ */
22
+ declare function createSemanticMcpServer(options?: SemanticMcpServerOptions): McpServer;
23
+ /**
24
+ * @param {SemanticMcpServerOptions} [options]
25
+ */
26
+ declare function serveSemanticMcpServer(options?: SemanticMcpServerOptions): Promise<McpServer>;
27
+ type SemanticMcpServerOptions = SemanticMcpServerOptions$1;
28
+ type SemanticToolDefinition = SemanticToolDefinition$1;
29
+
30
+ export { type SemanticMcpServerOptions, type SemanticToolDefinition, createSemanticMcpServer, registerSemanticTools, serveSemanticMcpServer };
@@ -0,0 +1,4 @@
1
+ export { a as SEMANTIC_TOOL_NAMES, b as SemanticToolCallResult, c as SemanticToolContext, d as SemanticToolDefinition, e as createSemanticToolDefinitions } from '../SemanticToolDefinition-C1UT6pZk.js';
2
+ import 'zod';
3
+ import '../find-db.js';
4
+ import '@smithers-orchestrator/db/adapter';
@@ -0,0 +1,3 @@
1
+ declare function mdxPlugin(): void;
2
+
3
+ export { mdxPlugin };
@@ -0,0 +1,143 @@
1
+ import * as _smithers_orchestrator_db_adapter from '@smithers-orchestrator/db/adapter';
2
+ import { Effect } from 'effect';
3
+ import { SmithersError } from '@smithers-orchestrator/errors';
4
+
5
+ type RenderNodeDetailOptions$1 = {
6
+ expandAttempts: boolean;
7
+ expandTools: boolean;
8
+ };
9
+
10
+ type NodeDetailToolCall$1 = {
11
+ attempt: number;
12
+ seq: number;
13
+ name: string;
14
+ status: string;
15
+ startedAtMs: number;
16
+ finishedAtMs: number | null;
17
+ durationMs: number | null;
18
+ input: unknown | null;
19
+ output: unknown | null;
20
+ error: string | null;
21
+ };
22
+
23
+ type NodeDetailTokenUsage$1 = {
24
+ inputTokens: number;
25
+ outputTokens: number;
26
+ cacheReadTokens: number;
27
+ cacheWriteTokens: number;
28
+ reasoningTokens: number;
29
+ costUsd: number | null;
30
+ eventCount: number;
31
+ models: string[];
32
+ agents: string[];
33
+ };
34
+
35
+ type NodeDetailAttempt$1 = {
36
+ runId: string;
37
+ nodeId: string;
38
+ iteration: number;
39
+ attempt: number;
40
+ state: string;
41
+ startedAtMs: number;
42
+ finishedAtMs: number | null;
43
+ durationMs: number | null;
44
+ error: string | null;
45
+ errorDetail: unknown | null;
46
+ tokenUsage: NodeDetailTokenUsage$1;
47
+ toolCalls: NodeDetailToolCall$1[];
48
+ meta: unknown | null;
49
+ responseText: string | null;
50
+ cached: boolean;
51
+ jjPointer: string | null;
52
+ jjCwd: string | null;
53
+ };
54
+
55
+ type AttemptSummary$1 = {
56
+ total: number;
57
+ failed: number;
58
+ cancelled: number;
59
+ succeeded: number;
60
+ waiting: number;
61
+ };
62
+ type EnrichedNodeDetail$1 = {
63
+ node: {
64
+ runId: string;
65
+ nodeId: string;
66
+ iteration: number;
67
+ state: string;
68
+ lastAttempt: number | null;
69
+ updatedAtMs: number | null;
70
+ outputTable: string | null;
71
+ label: string | null;
72
+ };
73
+ status: string;
74
+ durationMs: number | null;
75
+ attemptsSummary: AttemptSummary$1;
76
+ attempts: NodeDetailAttempt$1[];
77
+ toolCalls: NodeDetailToolCall$1[];
78
+ tokenUsage: NodeDetailTokenUsage$1 & {
79
+ byAttempt: Array<{
80
+ attempt: number;
81
+ usage: NodeDetailTokenUsage$1;
82
+ }>;
83
+ };
84
+ scorers: Array<{
85
+ id: string;
86
+ attempt: number;
87
+ scorerId: string;
88
+ scorerName: string;
89
+ source: string;
90
+ score: number;
91
+ reason: string | null;
92
+ latencyMs: number | null;
93
+ durationMs: number | null;
94
+ scoredAtMs: number;
95
+ meta: unknown | null;
96
+ input: unknown | null;
97
+ output: unknown | null;
98
+ }>;
99
+ output: {
100
+ validated: unknown | null;
101
+ raw: unknown | null;
102
+ source: "cache" | "output-table" | "none";
103
+ cacheKey: string | null;
104
+ };
105
+ limits: {
106
+ toolPayloadBytesHuman: number;
107
+ validatedOutputBytesHuman: number;
108
+ };
109
+ };
110
+
111
+ type AggregateNodeDetailParams$1 = {
112
+ runId: string;
113
+ nodeId: string;
114
+ iteration?: number;
115
+ };
116
+
117
+ /**
118
+ * @param {SmithersDb} adapter
119
+ * @param {AggregateNodeDetailParams} params
120
+ * @returns {Effect.Effect<EnrichedNodeDetail, SmithersError>}
121
+ */
122
+ declare function aggregateNodeDetailEffect(adapter: SmithersDb, params: AggregateNodeDetailParams): Effect.Effect<EnrichedNodeDetail, SmithersError>;
123
+ /**
124
+ * @param {EnrichedNodeDetail} detail
125
+ * @param {RenderNodeDetailOptions} options
126
+ */
127
+ declare function renderNodeDetailHuman(detail: EnrichedNodeDetail, options: RenderNodeDetailOptions): string;
128
+ type AggregateNodeDetailParams = AggregateNodeDetailParams$1;
129
+ type AttemptSummary = {
130
+ total: number;
131
+ failed: number;
132
+ cancelled: number;
133
+ succeeded: number;
134
+ waiting: number;
135
+ };
136
+ type EnrichedNodeDetail = EnrichedNodeDetail$1;
137
+ type NodeDetailAttempt = NodeDetailAttempt$1;
138
+ type NodeDetailTokenUsage = NodeDetailTokenUsage$1;
139
+ type NodeDetailToolCall = NodeDetailToolCall$1;
140
+ type RenderNodeDetailOptions = RenderNodeDetailOptions$1;
141
+ type SmithersDb = _smithers_orchestrator_db_adapter.SmithersDb;
142
+
143
+ export { type AggregateNodeDetailParams, type AttemptSummary, type EnrichedNodeDetail, type NodeDetailAttempt, type NodeDetailTokenUsage, type NodeDetailToolCall, type RenderNodeDetailOptions, type SmithersDb, aggregateNodeDetailEffect, renderNodeDetailHuman };
@@ -0,0 +1,31 @@
1
+ import { SmithersDb } from '@smithers-orchestrator/db/adapter';
2
+
3
+ type RunOutputCommandResult$1 = {
4
+ exitCode: number;
5
+ };
6
+
7
+ type RunOutputCommandInput$1 = {
8
+ adapter: SmithersDb;
9
+ runId: string;
10
+ nodeId: string;
11
+ iteration?: number;
12
+ pretty?: boolean;
13
+ workflow?: unknown;
14
+ stdout: NodeJS.WritableStream;
15
+ stderr: NodeJS.WritableStream;
16
+ };
17
+
18
+ /**
19
+ * @param {any} response
20
+ * @returns {string}
21
+ */
22
+ declare function renderPrettyOutput(response: any): string;
23
+ /**
24
+ * @param {RunOutputCommandInput} input
25
+ * @returns {Promise<RunOutputCommandResult>}
26
+ */
27
+ declare function runOutputOnce(input: RunOutputCommandInput): Promise<RunOutputCommandResult>;
28
+ type RunOutputCommandInput = RunOutputCommandInput$1;
29
+ type RunOutputCommandResult = RunOutputCommandResult$1;
30
+
31
+ export { type RunOutputCommandInput, type RunOutputCommandResult, renderPrettyOutput, runOutputOnce };
@@ -0,0 +1,17 @@
1
+ import { S as SupervisorSpawnClaim$1 } from './SupervisorOptions-DtiPbGFx.js';
2
+ import '@smithers-orchestrator/db/adapter';
3
+
4
+ /** @typedef {import("./SupervisorOptions.ts").SupervisorSpawnClaim} SupervisorSpawnClaim */
5
+ /**
6
+ * Resume an existing run by launching `smithers up ... --resume` as a detached process.
7
+ * Returns the spawned PID when available.
8
+ *
9
+ * @param {string} workflowPath
10
+ * @param {string} runId
11
+ * @param {SupervisorSpawnClaim} [claim]
12
+ * @returns {number | null}
13
+ */
14
+ declare function resumeRunDetached(workflowPath: string, runId: string, claim?: SupervisorSpawnClaim): number | null;
15
+ type SupervisorSpawnClaim = SupervisorSpawnClaim$1;
16
+
17
+ export { type SupervisorSpawnClaim, resumeRunDetached };
@@ -0,0 +1,28 @@
1
+ import { SmithersDb } from '@smithers-orchestrator/db/adapter';
2
+
3
+ type RunRewindCommandResult$1 = {
4
+ exitCode: number;
5
+ };
6
+
7
+ type RunRewindCommandInput$1 = {
8
+ adapter: SmithersDb;
9
+ runId: string;
10
+ frameNo: number;
11
+ yes?: boolean;
12
+ json?: boolean;
13
+ confirm?: () => Promise<boolean>;
14
+ onResult?: (result: unknown) => void;
15
+ stdin: NodeJS.ReadStream;
16
+ stdout: NodeJS.WritableStream;
17
+ stderr: NodeJS.WritableStream;
18
+ };
19
+
20
+ /**
21
+ * @param {RunRewindCommandInput} input
22
+ * @returns {Promise<RunRewindCommandResult>}
23
+ */
24
+ declare function runRewindOnce(input: RunRewindCommandInput): Promise<RunRewindCommandResult>;
25
+ type RunRewindCommandInput = RunRewindCommandInput$1;
26
+ type RunRewindCommandResult = RunRewindCommandResult$1;
27
+
28
+ export { type RunRewindCommandInput, type RunRewindCommandResult, runRewindOnce };
@@ -0,0 +1,3 @@
1
+ declare function runScheduler(pollIntervalMs?: number): Promise<void>;
2
+
3
+ export { runScheduler };
@@ -0,0 +1,23 @@
1
+ import * as effect_Fiber from 'effect/Fiber';
2
+ import { Effect } from 'effect';
3
+
4
+ /**
5
+ * @template A, E, R
6
+ * @param {Effect.Effect<A, E, R>} effect
7
+ * @param {{ signal?: AbortSignal }} [options]
8
+ */
9
+ declare function runPromise<A, E, R>(effect: Effect.Effect<A, E, R>, options?: {
10
+ signal?: AbortSignal;
11
+ }): Promise<A>;
12
+ /**
13
+ * @template A, E, R
14
+ * @param {Effect.Effect<A, E, R>} effect
15
+ */
16
+ declare function runFork<A, E, R>(effect: Effect.Effect<A, E, R>): effect_Fiber.RuntimeFiber<A, E>;
17
+ /**
18
+ * @template A, E, R
19
+ * @param {Effect.Effect<A, E, R>} effect
20
+ */
21
+ declare function runSync<A, E, R>(effect: Effect.Effect<A, E, R>): A;
22
+
23
+ export { runFork, runPromise, runSync };
@@ -0,0 +1,44 @@
1
+ import { a as SupervisorOptions$1 } from './SupervisorOptions-DtiPbGFx.js';
2
+ import * as _smithers_orchestrator_db_adapter from '@smithers-orchestrator/db/adapter';
3
+ import { Effect } from 'effect';
4
+ export { isPidAlive, parseRuntimeOwnerPid } from '@smithers-orchestrator/engine/runtime-owner';
5
+
6
+ type SupervisorPollSummary$1 = {
7
+ staleCount: number;
8
+ resumedCount: number;
9
+ skippedCount: number;
10
+ durationMs: number;
11
+ };
12
+
13
+ type RunAutoResumeSkipReason$1 = "pid-alive" | "missing-workflow" | "rate-limited";
14
+
15
+ /**
16
+ * @param {string} raw
17
+ * @param {string} fieldName
18
+ * @returns {number}
19
+ */
20
+ declare function parseDurationMs(raw: string, fieldName: string): number;
21
+ /**
22
+ * @param {SupervisorOptions} options
23
+ * @returns {Effect.Effect<SupervisorPollSummary, never>}
24
+ */
25
+ declare function supervisorPollEffect(options: SupervisorOptions): Effect.Effect<SupervisorPollSummary, never>;
26
+ /**
27
+ * @param {SupervisorOptions} options
28
+ * @returns {Effect.Effect<void, never>}
29
+ */
30
+ declare function supervisorLoopEffect(options: SupervisorOptions): Effect.Effect<void, never>;
31
+ /** @typedef {import("./RunAutoResumeSkipReason.ts").RunAutoResumeSkipReason} RunAutoResumeSkipReason */
32
+ /** @typedef {import("@smithers-orchestrator/db/adapter").SmithersDb} SmithersDb */
33
+ /** @typedef {import("./SupervisorOptions.ts").SupervisorOptions} SupervisorOptions */
34
+ /** @typedef {import("./SupervisorPollSummary.ts").SupervisorPollSummary} SupervisorPollSummary */
35
+ declare const DEFAULT_SUPERVISOR_INTERVAL_MS: 10000;
36
+ declare const DEFAULT_SUPERVISOR_STALE_THRESHOLD_MS: 30000;
37
+ declare const DEFAULT_SUPERVISOR_MAX_CONCURRENT: 3;
38
+ declare const SUPERVISOR_EVENT_RUN_ID: "__supervisor__";
39
+ type RunAutoResumeSkipReason = RunAutoResumeSkipReason$1;
40
+ type SmithersDb = _smithers_orchestrator_db_adapter.SmithersDb;
41
+ type SupervisorOptions = SupervisorOptions$1;
42
+ type SupervisorPollSummary = SupervisorPollSummary$1;
43
+
44
+ export { DEFAULT_SUPERVISOR_INTERVAL_MS, DEFAULT_SUPERVISOR_MAX_CONCURRENT, DEFAULT_SUPERVISOR_STALE_THRESHOLD_MS, type RunAutoResumeSkipReason, SUPERVISOR_EVENT_RUN_ID, type SmithersDb, type SupervisorOptions, type SupervisorPollSummary, parseDurationMs, supervisorLoopEffect, supervisorPollEffect };
package/dist/tree.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ import { SmithersDb } from '@smithers-orchestrator/db/adapter';
2
+ import * as _smithers_orchestrator_protocol_devtools from '@smithers-orchestrator/protocol/devtools';
3
+
4
+ type RunTreeCommandResult$1 = {
5
+ exitCode: number;
6
+ };
7
+
8
+ type RunTreeCommandInput$1 = {
9
+ adapter: SmithersDb;
10
+ runId: string;
11
+ frameNo?: number;
12
+ depth?: number;
13
+ node?: string;
14
+ color?: boolean;
15
+ json?: boolean;
16
+ abortSignal?: AbortSignal;
17
+ stdout: NodeJS.WritableStream;
18
+ stderr: NodeJS.WritableStream;
19
+ };
20
+
21
+ type TreeRenderOptions$1 = {
22
+ depth?: number;
23
+ nodeId?: string;
24
+ color?: boolean;
25
+ };
26
+
27
+ /**
28
+ * @param {import("@smithers-orchestrator/protocol/devtools").DevToolsNode} root
29
+ * @param {string} nodeId
30
+ * @returns {import("@smithers-orchestrator/protocol/devtools").DevToolsNode | null}
31
+ */
32
+ declare function selectSubtree(root: _smithers_orchestrator_protocol_devtools.DevToolsNode, nodeId: string): _smithers_orchestrator_protocol_devtools.DevToolsNode | null;
33
+ /**
34
+ * @param {import("@smithers-orchestrator/protocol/devtools").DevToolsSnapshot} snapshot
35
+ * @param {TreeRenderOptions} [options]
36
+ * @returns {string}
37
+ */
38
+ declare function renderDevToolsTree(snapshot: _smithers_orchestrator_protocol_devtools.DevToolsSnapshot, options?: TreeRenderOptions): string;
39
+ /**
40
+ * @param {RunTreeCommandInput} input
41
+ * @returns {Promise<RunTreeCommandResult>}
42
+ */
43
+ declare function runTreeOnce(input: RunTreeCommandInput): Promise<RunTreeCommandResult>;
44
+ /** @param {RunTreeCommandInput} input @returns {Promise<RunTreeCommandResult>} */
45
+ declare function runTreeWatch(input: RunTreeCommandInput): Promise<RunTreeCommandResult>;
46
+ declare const TREE_INDENT: " ";
47
+ type TreeRenderOptions = TreeRenderOptions$1;
48
+ type RunTreeCommandInput = RunTreeCommandInput$1;
49
+ type RunTreeCommandResult = RunTreeCommandResult$1;
50
+
51
+ export { type RunTreeCommandInput, type RunTreeCommandResult, TREE_INDENT, type TreeRenderOptions, renderDevToolsTree, runTreeOnce, runTreeWatch, selectSubtree };
@@ -0,0 +1,40 @@
1
+ import { C as CliExitCode } from '../CliExitCode-dlFKbqup.js';
2
+
3
+ type CliErrorMapping$1 = {
4
+ message: string;
5
+ hint: string;
6
+ exitCode: CliExitCode;
7
+ };
8
+
9
+ /**
10
+ * @param {string | undefined | null} code
11
+ * @param {string} [rawMessage]
12
+ * @returns {CliErrorMapping}
13
+ */
14
+ declare function getCliErrorMapping(code: string | undefined | null, rawMessage?: string): CliErrorMapping;
15
+ /**
16
+ * @param {string | undefined | null} code
17
+ * @param {string} [rawMessage]
18
+ * @returns {string}
19
+ */
20
+ declare function formatCliErrorForStderr(code: string | undefined | null, rawMessage?: string): string;
21
+ /**
22
+ * Exhaustive map of every typed error code the four devtools RPCs may
23
+ * return. Each entry yields a user-friendly message plus an actionable
24
+ * hint and the uniform exit code to surface.
25
+ *
26
+ * Codes come from:
27
+ * - getDevToolsSnapshot / streamDevTools (ticket 0010, 0011)
28
+ * - getNodeDiff (ticket 0012)
29
+ * - getNodeOutput (ticket 0012)
30
+ * - jumpToFrame (ticket 0013)
31
+ *
32
+ * Plus two transport-level codes used by the CLI itself when it cannot
33
+ * reach the server or the auth token is missing.
34
+ *
35
+ * @type {Readonly<Record<string, CliErrorMapping>>}
36
+ */
37
+ declare const CLI_ERROR_MESSAGES: Readonly<Record<string, CliErrorMapping>>;
38
+ type CliErrorMapping = CliErrorMapping$1;
39
+
40
+ export { CLI_ERROR_MESSAGES, type CliErrorMapping, formatCliErrorForStderr, getCliErrorMapping };
@@ -0,0 +1,19 @@
1
+ import { C as CliExitCode$1 } from '../CliExitCode-dlFKbqup.js';
2
+
3
+ /** @typedef {import("./CliExitCode.ts").CliExitCode} CliExitCode */
4
+ /** Uniform CLI exit codes for the devtools live-run commands. */
5
+ declare const EXIT_OK: 0;
6
+ declare const EXIT_USER_ERROR: 1;
7
+ declare const EXIT_SERVER_ERROR: 2;
8
+ declare const EXIT_DECLINED: 3;
9
+ declare const EXIT_SIGINT: 130;
10
+ declare const CLI_EXIT_CODES: Readonly<{
11
+ ok: 0;
12
+ userError: 1;
13
+ serverError: 2;
14
+ declined: 3;
15
+ sigint: 130;
16
+ }>;
17
+ type CliExitCode = CliExitCode$1;
18
+
19
+ export { CLI_EXIT_CODES, type CliExitCode, EXIT_DECLINED, EXIT_OK, EXIT_SERVER_ERROR, EXIT_SIGINT, EXIT_USER_ERROR };
@@ -0,0 +1,44 @@
1
+ type WatchLoopResult$1<T> = {
2
+ intervalMs: number;
3
+ tickCount: number;
4
+ stoppedBySignal: boolean;
5
+ reachedTerminal: boolean;
6
+ signal?: NodeJS.Signals;
7
+ lastData: T;
8
+ };
9
+
10
+ type WatchRenderContext$1 = {
11
+ tickCount: number;
12
+ initial: boolean;
13
+ };
14
+
15
+ type WatchLoopOptions$1<T> = {
16
+ intervalSeconds: number;
17
+ clearScreen?: boolean;
18
+ fetch: () => Promise<T>;
19
+ render: (snapshot: T, context: WatchRenderContext$1) => Promise<void> | void;
20
+ isTerminal?: (snapshot: T) => boolean;
21
+ };
22
+
23
+ /**
24
+ * @param {number} requestedMs
25
+ * @returns {number}
26
+ */
27
+ declare function clampWatchIntervalMs(requestedMs: number): number;
28
+ /**
29
+ * @param {number} intervalSeconds
30
+ * @returns {number}
31
+ */
32
+ declare function watchIntervalSecondsToMs(intervalSeconds: number): number;
33
+ /**
34
+ * @template T
35
+ * @param {WatchLoopOptions<T>} options
36
+ * @returns {Promise<WatchLoopResult<T>>}
37
+ */
38
+ declare function runWatchLoop<T>(options: WatchLoopOptions<T>): Promise<WatchLoopResult<T>>;
39
+ declare const WATCH_MIN_INTERVAL_MS: 500;
40
+ type WatchRenderContext = WatchRenderContext$1;
41
+ type WatchLoopOptions<T> = WatchLoopOptions$1<T>;
42
+ type WatchLoopResult<T> = WatchLoopResult$1<T>;
43
+
44
+ export { WATCH_MIN_INTERVAL_MS, type WatchLoopOptions, type WatchLoopResult, type WatchRenderContext, clampWatchIntervalMs, runWatchLoop, watchIntervalSecondsToMs };
@@ -0,0 +1,56 @@
1
+ import * as _smithers_orchestrator_db_adapter from '@smithers-orchestrator/db/adapter';
2
+ import { Effect } from 'effect';
3
+ import { SmithersError } from '@smithers-orchestrator/errors';
4
+
5
+ type WhyBlockerKind$1 = "waiting-approval" | "waiting-event" | "waiting-timer" | "stale-task-heartbeat" | "retry-backoff" | "retries-exhausted" | "stale-heartbeat" | "dependency-failed";
6
+
7
+ type WhyBlocker$1 = {
8
+ kind: WhyBlockerKind$1;
9
+ nodeId: string;
10
+ iteration: number | null;
11
+ reason: string;
12
+ waitingSince: number;
13
+ unblocker: string;
14
+ context?: string;
15
+ signalName?: string | null;
16
+ dependencyNodeId?: string | null;
17
+ firesAtMs?: number | null;
18
+ remainingMs?: number | null;
19
+ attempt?: number | null;
20
+ maxAttempts?: number | null;
21
+ };
22
+
23
+ type WhyDiagnosis$1 = {
24
+ runId: string;
25
+ status: string;
26
+ summary: string;
27
+ generatedAtMs: number;
28
+ blockers: WhyBlocker$1[];
29
+ currentNodeId: string | null;
30
+ };
31
+
32
+ /**
33
+ * @param {SmithersDb} adapter
34
+ * @param {string} runId
35
+ * @returns {Effect.Effect<WhyDiagnosis, SmithersError>}
36
+ */
37
+ declare function diagnoseRunEffect(adapter: SmithersDb, runId: string, nowMs?: number): Effect.Effect<WhyDiagnosis, SmithersError>;
38
+ /**
39
+ * @param {WhyDiagnosis} diagnosis
40
+ * @returns {string}
41
+ */
42
+ declare function renderWhyDiagnosisHuman(diagnosis: WhyDiagnosis): string;
43
+ /**
44
+ * @param {WhyDiagnosis} diagnosis
45
+ * @returns {Array<{ command: string; description: string }>}
46
+ */
47
+ declare function diagnosisCtaCommands(diagnosis: WhyDiagnosis): Array<{
48
+ command: string;
49
+ description: string;
50
+ }>;
51
+ type WhyBlockerKind = WhyBlockerKind$1;
52
+ type SmithersDb = _smithers_orchestrator_db_adapter.SmithersDb;
53
+ type WhyBlocker = WhyBlocker$1;
54
+ type WhyDiagnosis = WhyDiagnosis$1;
55
+
56
+ export { type SmithersDb, type WhyBlocker, type WhyBlockerKind, type WhyDiagnosis, diagnoseRunEffect, diagnosisCtaCommands, renderWhyDiagnosisHuman };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @param {InitOptions} [options]
3
+ * @returns {InitResult}
4
+ */
5
+ declare function initWorkflowPack(options?: InitOptions): InitResult;
6
+ /**
7
+ * @param {string} workflowPath
8
+ * @returns {WorkflowCta[]}
9
+ */
10
+ declare function getWorkflowFollowUpCtas(workflowPath: string): WorkflowCta[];
11
+ type InitOptions = {
12
+ force?: boolean;
13
+ rootDir?: string;
14
+ skipInstall?: boolean;
15
+ agentsOnly?: boolean;
16
+ };
17
+ type InitInstallResult = {
18
+ status: "ok" | "skipped" | "failed";
19
+ reason?: string;
20
+ };
21
+ type InitResult = {
22
+ rootDir: string;
23
+ writtenFiles: string[];
24
+ skippedFiles: string[];
25
+ preservedPaths: string[];
26
+ install: InitInstallResult;
27
+ };
28
+ type WorkflowCta = {
29
+ command: string;
30
+ description: string;
31
+ };
32
+ type TemplateFile = {
33
+ path: string;
34
+ contents: string;
35
+ preserveExisting?: boolean;
36
+ };
37
+
38
+ export { type InitInstallResult, type InitOptions, type InitResult, type TemplateFile, type WorkflowCta, getWorkflowFollowUpCtas, initWorkflowPack };
@@ -0,0 +1,35 @@
1
+ type WorkflowSourceType$1 = "user" | "seeded" | "generated" | (string & {});
2
+
3
+ type DiscoveredWorkflow$1 = {
4
+ id: string;
5
+ displayName: string;
6
+ sourceType: WorkflowSourceType$1;
7
+ entryFile: string;
8
+ path: string;
9
+ };
10
+
11
+ /**
12
+ * @param {string} root
13
+ * @returns {DiscoveredWorkflow[]}
14
+ */
15
+ declare function discoverWorkflows(root: string): DiscoveredWorkflow[];
16
+ /**
17
+ * @param {string} name
18
+ */
19
+ declare function validateWorkflowName(name: string): void;
20
+ /**
21
+ * @param {string} id
22
+ * @param {string} root
23
+ * @returns {DiscoveredWorkflow}
24
+ */
25
+ declare function resolveWorkflow(id: string, root: string): DiscoveredWorkflow;
26
+ /**
27
+ * @param {string} name
28
+ * @param {string} root
29
+ * @returns {DiscoveredWorkflow}
30
+ */
31
+ declare function createWorkflowFile(name: string, root: string): DiscoveredWorkflow;
32
+ type WorkflowSourceType = WorkflowSourceType$1;
33
+ type DiscoveredWorkflow = DiscoveredWorkflow$1;
34
+
35
+ export { type DiscoveredWorkflow, type WorkflowSourceType, createWorkflowFile, discoverWorkflows, resolveWorkflow, validateWorkflowName };