smithers-orchestrator 0.23.0 → 0.24.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/package.json +33 -28
- package/src/create.js +13 -3
- package/src/findSmithersAnchorDir.js +38 -0
- package/src/index.d.ts +31 -5
- package/src/index.js +16 -2
- package/src/jsx-runtime.d.ts +25 -0
- package/src/tools/bash.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smithers-orchestrator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Public Smithers facade for durable coding-agent workflows and Gateway operation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,15 +35,20 @@
|
|
|
35
35
|
"import": "./src/control-plane.js",
|
|
36
36
|
"default": "./src/control-plane.js"
|
|
37
37
|
},
|
|
38
|
-
"
|
|
39
|
-
"types": "./src/
|
|
40
|
-
"import": "./src
|
|
41
|
-
"default": "./src
|
|
38
|
+
"./jsx-runtime": {
|
|
39
|
+
"types": "./src/jsx-runtime.d.ts",
|
|
40
|
+
"import": "./src/jsx-runtime.js",
|
|
41
|
+
"default": "./src/jsx-runtime.js"
|
|
42
42
|
},
|
|
43
43
|
"./jsx-dev-runtime": {
|
|
44
|
-
"types": "./src/
|
|
44
|
+
"types": "./src/jsx-runtime.d.ts",
|
|
45
45
|
"import": "./src/jsx-runtime.js",
|
|
46
46
|
"default": "./src/jsx-runtime.js"
|
|
47
|
+
},
|
|
48
|
+
"./*": {
|
|
49
|
+
"types": "./src/index.d.ts",
|
|
50
|
+
"import": "./src/*.js",
|
|
51
|
+
"default": "./src/*.js"
|
|
47
52
|
}
|
|
48
53
|
},
|
|
49
54
|
"files": [
|
|
@@ -61,28 +66,28 @@
|
|
|
61
66
|
"incur": "^0.4.1",
|
|
62
67
|
"react": "^19.2.5",
|
|
63
68
|
"zod": "^4.3.6",
|
|
64
|
-
"@smithers-orchestrator/
|
|
65
|
-
"@smithers-orchestrator/
|
|
66
|
-
"@smithers-orchestrator/
|
|
67
|
-
"@smithers-orchestrator/
|
|
68
|
-
"@smithers-orchestrator/
|
|
69
|
-
"@smithers-orchestrator/engine": "0.
|
|
70
|
-
"@smithers-orchestrator/errors": "0.
|
|
71
|
-
"@smithers-orchestrator/gateway-
|
|
72
|
-
"@smithers-orchestrator/
|
|
73
|
-
"@smithers-orchestrator/graph": "0.
|
|
74
|
-
"@smithers-orchestrator/
|
|
75
|
-
"@smithers-orchestrator/observability": "0.
|
|
76
|
-
"@smithers-orchestrator/
|
|
77
|
-
"@smithers-orchestrator/
|
|
78
|
-
"@smithers-orchestrator/
|
|
79
|
-
"@smithers-orchestrator/
|
|
80
|
-
"@smithers-orchestrator/
|
|
81
|
-
"@smithers-orchestrator/
|
|
82
|
-
"@smithers-orchestrator/
|
|
83
|
-
"@smithers-orchestrator/
|
|
84
|
-
"@smithers-orchestrator/
|
|
85
|
-
"@smithers-orchestrator/
|
|
69
|
+
"@smithers-orchestrator/agents": "0.24.0",
|
|
70
|
+
"@smithers-orchestrator/components": "0.24.0",
|
|
71
|
+
"@smithers-orchestrator/control-plane": "0.24.0",
|
|
72
|
+
"@smithers-orchestrator/driver": "0.24.0",
|
|
73
|
+
"@smithers-orchestrator/db": "0.24.0",
|
|
74
|
+
"@smithers-orchestrator/engine": "0.24.0",
|
|
75
|
+
"@smithers-orchestrator/errors": "0.24.0",
|
|
76
|
+
"@smithers-orchestrator/gateway-client": "0.24.0",
|
|
77
|
+
"@smithers-orchestrator/gateway-react": "0.24.0",
|
|
78
|
+
"@smithers-orchestrator/graph": "0.24.0",
|
|
79
|
+
"@smithers-orchestrator/memory": "0.24.0",
|
|
80
|
+
"@smithers-orchestrator/observability": "0.24.0",
|
|
81
|
+
"@smithers-orchestrator/openapi": "0.24.0",
|
|
82
|
+
"@smithers-orchestrator/react-reconciler": "0.24.0",
|
|
83
|
+
"@smithers-orchestrator/sandbox": "0.24.0",
|
|
84
|
+
"@smithers-orchestrator/scheduler": "0.24.0",
|
|
85
|
+
"@smithers-orchestrator/scorers": "0.24.0",
|
|
86
|
+
"@smithers-orchestrator/server": "0.24.0",
|
|
87
|
+
"@smithers-orchestrator/time-travel": "0.24.0",
|
|
88
|
+
"@smithers-orchestrator/vcs": "0.24.0",
|
|
89
|
+
"@smithers-orchestrator/tool-context": "0.24.0",
|
|
90
|
+
"@smithers-orchestrator/cli": "0.24.0"
|
|
86
91
|
},
|
|
87
92
|
"optionalDependencies": {
|
|
88
93
|
"@electric-sql/pglite": "0.5.1",
|
package/src/create.js
CHANGED
|
@@ -16,8 +16,9 @@ import { zodToCreateTableSQL, syncZodTableSchema } from "@smithers-orchestrator/
|
|
|
16
16
|
import { camelToSnake } from "@smithers-orchestrator/db/utils/camelToSnake";
|
|
17
17
|
import { SmithersDb } from "@smithers-orchestrator/db/adapter";
|
|
18
18
|
import { POSTGRES } from "@smithers-orchestrator/db/dialect";
|
|
19
|
-
import { resolve } from "node:path";
|
|
19
|
+
import { resolve, join } from "node:path";
|
|
20
20
|
import { SmithersError } from "@smithers-orchestrator/errors/SmithersError";
|
|
21
|
+
import { findSmithersAnchorDir } from "./findSmithersAnchorDir.js";
|
|
21
22
|
/** @typedef {import("@smithers-orchestrator/components").ApprovalProps<any, any>} ApprovalProps */
|
|
22
23
|
/** @typedef {import("@smithers-orchestrator/components").SandboxProps} SandboxProps */
|
|
23
24
|
/** @typedef {import("@smithers-orchestrator/components").SignalProps<any>} SignalProps */
|
|
@@ -223,10 +224,11 @@ function prepareSmithersTables(schemas) {
|
|
|
223
224
|
* zodToKeyName: Map<unknown, string>;
|
|
224
225
|
* ambiguousZodSchemas: Set<unknown>;
|
|
225
226
|
* opts?: CreateSmithersOptions;
|
|
227
|
+
* inputSchema?: unknown;
|
|
226
228
|
* }} config
|
|
227
229
|
*/
|
|
228
230
|
function buildSmithersApi(config) {
|
|
229
|
-
const { db, tables, schemaRegistry, outputs, zodToKeyName, ambiguousZodSchemas, opts } = config;
|
|
231
|
+
const { db, tables, schemaRegistry, outputs, zodToKeyName, ambiguousZodSchemas, opts, inputSchema } = config;
|
|
230
232
|
const { SmithersContext: RuntimeSmithersContext, useCtx } = createSmithersContext();
|
|
231
233
|
const ctxRef = { current: null };
|
|
232
234
|
let moduleAlertPolicy = opts?.alertPolicy;
|
|
@@ -305,6 +307,7 @@ function buildSmithersApi(config) {
|
|
|
305
307
|
return React.createElement(RuntimeSmithersContext.Provider, { value: ctxRef.current }, React.createElement(GlobalSmithersContext.Provider, { value: ctxRef.current }, build(ctx)));
|
|
306
308
|
},
|
|
307
309
|
opts: workflowOpts,
|
|
310
|
+
inputSchema,
|
|
308
311
|
schemaRegistry,
|
|
309
312
|
zodToKeyName,
|
|
310
313
|
ambiguousZodSchemas,
|
|
@@ -363,7 +366,12 @@ function buildSmithersApi(config) {
|
|
|
363
366
|
* ```
|
|
364
367
|
*/
|
|
365
368
|
export function createSmithers(schemas, opts) {
|
|
366
|
-
|
|
369
|
+
// Resolve the DB path from the nearest .smithers/ anchor so that running a
|
|
370
|
+
// workflow from a subdirectory always creates/uses the project-root DB, not
|
|
371
|
+
// a new one at CWD. An explicit opts.dbPath overrides this entirely.
|
|
372
|
+
const anchorDir = findSmithersAnchorDir(process.cwd());
|
|
373
|
+
const defaultDbPath = anchorDir ? join(anchorDir, "smithers.db") : "./smithers.db";
|
|
374
|
+
const dbPath = opts?.dbPath ?? defaultDbPath;
|
|
367
375
|
const absDbPath = resolve(process.cwd(), dbPath);
|
|
368
376
|
if (process.env.SMITHERS_HOT === "1") {
|
|
369
377
|
const sig = computeSchemaSig(schemas, absDbPath);
|
|
@@ -444,6 +452,7 @@ export function createSmithers(schemas, opts) {
|
|
|
444
452
|
zodToKeyName,
|
|
445
453
|
ambiguousZodSchemas,
|
|
446
454
|
opts,
|
|
455
|
+
inputSchema: schemas.input,
|
|
447
456
|
});
|
|
448
457
|
if (process.env.SMITHERS_HOT === "1") {
|
|
449
458
|
const sig = computeSchemaSig(schemas, absDbPath);
|
|
@@ -532,6 +541,7 @@ export async function createSmithersPostgres(schemas, opts) {
|
|
|
532
541
|
zodToKeyName,
|
|
533
542
|
ambiguousZodSchemas,
|
|
534
543
|
opts,
|
|
544
|
+
inputSchema: schemas.input,
|
|
535
545
|
});
|
|
536
546
|
}
|
|
537
547
|
catch (e) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { resolve, dirname, join } from "node:path";
|
|
2
|
+
import { existsSync, statSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Walk upward from `from` and return the nearest directory that contains a
|
|
6
|
+
* `.smithers/` subdirectory, or `undefined` if none is found before the
|
|
7
|
+
* filesystem root.
|
|
8
|
+
*
|
|
9
|
+
* Directories at or above $HOME are excluded: a `~/.smithers` global pack
|
|
10
|
+
* must not be treated as a project anchor, so the DB would incorrectly land
|
|
11
|
+
* in the user's home directory.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} from
|
|
14
|
+
* @returns {string | undefined}
|
|
15
|
+
*/
|
|
16
|
+
export function findSmithersAnchorDir(from) {
|
|
17
|
+
let dir = resolve(from);
|
|
18
|
+
const fsRoot = resolve("/");
|
|
19
|
+
const home = process.env.HOME ? resolve(process.env.HOME) : undefined;
|
|
20
|
+
while (true) {
|
|
21
|
+
// Stop at or above HOME — anchors must be proper project directories
|
|
22
|
+
// strictly below the user's home directory.
|
|
23
|
+
// Use startsWith rather than length comparison so that symlinks and
|
|
24
|
+
// unusual mount points (e.g. /home2) don't produce false positives.
|
|
25
|
+
if (home && (dir === home || !dir.startsWith(home + "/"))) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
// Guard: never scan the filesystem root itself.
|
|
29
|
+
if (dir === fsRoot) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const candidate = join(dir, ".smithers");
|
|
33
|
+
if (existsSync(candidate) && statSync(candidate).isDirectory()) {
|
|
34
|
+
return dir;
|
|
35
|
+
}
|
|
36
|
+
dir = dirname(dir);
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as ai from 'ai';
|
|
|
2
2
|
import { Tool } from 'ai';
|
|
3
3
|
import * as _smithers_graph_XmlNode from '@smithers-orchestrator/graph/XmlNode';
|
|
4
4
|
import * as _smithers_time_travel_timetravel from '@smithers-orchestrator/time-travel/timetravel';
|
|
5
|
+
export { timeTravel } from '@smithers-orchestrator/time-travel/timetravel';
|
|
5
6
|
import * as _smithers_graph_TaskDescriptor from '@smithers-orchestrator/graph/TaskDescriptor';
|
|
6
7
|
import * as _smithers_components_SmithersWorkflow from '@smithers-orchestrator/components/SmithersWorkflow';
|
|
7
8
|
import { SmithersWorkflow as SmithersWorkflow$1 } from '@smithers-orchestrator/components/SmithersWorkflow';
|
|
@@ -24,6 +25,7 @@ import * as _smithers_driver_RunStatus from '@smithers-orchestrator/driver/RunSt
|
|
|
24
25
|
import * as _smithers_driver_RunResult from '@smithers-orchestrator/driver/RunResult';
|
|
25
26
|
import * as _smithers_driver_RunOptions from '@smithers-orchestrator/driver/RunOptions';
|
|
26
27
|
import * as _smithers_time_travel_revert from '@smithers-orchestrator/time-travel/revert';
|
|
28
|
+
export { revertToAttempt } from '@smithers-orchestrator/time-travel/revert';
|
|
27
29
|
import * as _smithers_observability from '@smithers-orchestrator/observability';
|
|
28
30
|
export { SmithersObservability, activeNodes, activeRuns, approvalsDenied, approvalsGranted, approvalsRequested, attemptDuration, cacheHits, cacheMisses, createSmithersObservabilityLayer, createSmithersOtelLayer, createSmithersRuntimeLayer, dbQueryDuration, dbRetries, dbTransactionDuration, dbTransactionRetries, dbTransactionRollbacks, externalWaitAsyncPending, hotReloadDuration, hotReloadFailures, hotReloads, httpRequestDuration, httpRequests, nodeDuration, nodesFailed, nodesFinished, nodesStarted, prometheusContentType, renderPrometheusMetrics, resolveSmithersObservabilityOptions, runsTotal, sandboxActive, sandboxBundleSizeBytes, sandboxCompletedTotal, sandboxCreatedTotal, sandboxDurationMs, sandboxPatchCount, sandboxTransportDurationMs, schedulerQueueDepth, smithersMetrics, timerDelayDuration, timersCancelled, timersCreated, timersFired, timersPending, toolCallsTotal, toolDuration, trackSmithersEvent, vcsDuration } from '@smithers-orchestrator/observability';
|
|
29
31
|
import * as _smithers_driver_OutputKey from '@smithers-orchestrator/driver/OutputKey';
|
|
@@ -56,7 +58,7 @@ import { WorkflowProps } from '@smithers-orchestrator/components/components/Work
|
|
|
56
58
|
import * as _smithers_server_gateway from '@smithers-orchestrator/server/gateway';
|
|
57
59
|
export { Gateway } from '@smithers-orchestrator/server/gateway';
|
|
58
60
|
import * as _smithers_agents from '@smithers-orchestrator/agents';
|
|
59
|
-
export { AmpAgent, AnthropicAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, ForgeAgent, GeminiAgent, HermesAgent, KimiAgent, OpenAIAgent, OpenCodeAgent, PiAgent } from '@smithers-orchestrator/agents';
|
|
61
|
+
export { AmpAgent, AnthropicAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, ForgeAgent, GeminiAgent, HermesAgent, KimiAgent, OpenAIAgent, OpenCodeAgent, PiAgent, VibeAgent } from '@smithers-orchestrator/agents';
|
|
60
62
|
import * as _smithers_scorers from '@smithers-orchestrator/scorers';
|
|
61
63
|
export { aggregateScores, createScorer, faithfulnessScorer, latencyScorer, llmJudge, relevancyScorer, runScorersAsync, runScorersBatch, schemaAdherenceScorer, smithersScorers, toxicityScorer } from '@smithers-orchestrator/scorers';
|
|
62
64
|
import * as _smithers_agents_capability_registry from '@smithers-orchestrator/agents/capability-registry';
|
|
@@ -70,6 +72,9 @@ export { isSmithersError } from '@smithers-orchestrator/errors/isSmithersError';
|
|
|
70
72
|
export { knownSmithersErrorCodes } from '@smithers-orchestrator/errors/knownSmithersErrorCodes';
|
|
71
73
|
export { signalRun } from '@smithers-orchestrator/engine/signals';
|
|
72
74
|
export { usePatched } from '@smithers-orchestrator/engine/effect/versioning';
|
|
75
|
+
import { SmithersDb } from '@smithers-orchestrator/db/adapter';
|
|
76
|
+
export { SmithersDb } from '@smithers-orchestrator/db/adapter';
|
|
77
|
+
export { loadOutputs, loadOutputsEffect } from '@smithers-orchestrator/db';
|
|
73
78
|
export { ensureSmithersTables } from '@smithers-orchestrator/db/ensure';
|
|
74
79
|
export { markdownComponents } from '@smithers-orchestrator/components/markdownComponents';
|
|
75
80
|
export { renderMdx } from '@smithers-orchestrator/components/renderMdx';
|
|
@@ -78,8 +83,8 @@ export { syncZodTableSchema, zodSchemaColumns, zodToCreateTableSQL } from '@smit
|
|
|
78
83
|
export { camelToSnake } from '@smithers-orchestrator/db/utils/camelToSnake';
|
|
79
84
|
export { unwrapZodType } from '@smithers-orchestrator/db/unwrapZodType';
|
|
80
85
|
export { zodSchemaToJsonExample } from '@smithers-orchestrator/components/zod-to-example';
|
|
81
|
-
export { BuilderApi, BuiltSmithersWorkflow, Smithers, StepOptions, fragment, renderFrame, runWorkflow, workflow } from '@smithers-orchestrator/engine';
|
|
82
|
-
|
|
86
|
+
export { BuilderApi, BuiltSmithersWorkflow, Smithers, StepOptions, approveNode, denyNode, fragment, getRun, listRuns, renderFrame, runWorkflow, workflow } from '@smithers-orchestrator/engine';
|
|
87
|
+
export { resolveWorktreePath } from '@smithers-orchestrator/graph';
|
|
83
88
|
|
|
84
89
|
type SerializedCtx$1 = {
|
|
85
90
|
runId: string;
|
|
@@ -173,7 +178,20 @@ type CreateSmithersOptions$1 = {
|
|
|
173
178
|
* ```
|
|
174
179
|
*/
|
|
175
180
|
declare function createSmithers<Schemas extends Record<string, zod.ZodObject<any>>>(schemas: Schemas, opts?: CreateSmithersOptions): CreateSmithersApi$1<Schemas>;
|
|
176
|
-
type
|
|
181
|
+
type CreateSmithersPostgresOptions = CreateSmithersOptions & ({
|
|
182
|
+
provider?: "postgres";
|
|
183
|
+
connectionString?: string;
|
|
184
|
+
connection?: object;
|
|
185
|
+
} | {
|
|
186
|
+
provider: "pglite";
|
|
187
|
+
dataDir?: string;
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* PostgreSQL/PGlite-backed equivalent of createSmithers.
|
|
191
|
+
*/
|
|
192
|
+
declare function createSmithersPostgres<Schemas extends Record<string, zod.ZodObject<any>>>(schemas: Schemas, opts?: CreateSmithersPostgresOptions): Promise<CreateSmithersApi$1<Schemas> & {
|
|
193
|
+
close: () => Promise<void>;
|
|
194
|
+
}>;
|
|
177
195
|
|
|
178
196
|
/**
|
|
179
197
|
* Create a SmithersWorkflow from an external build function.
|
|
@@ -301,13 +319,20 @@ type ConnectRequest = _smithers_server_gateway.ConnectRequest;
|
|
|
301
319
|
type ContinueAsNewProps = _smithers_components.ContinueAsNewProps;
|
|
302
320
|
type CreateScorerConfig = _smithers_scorers.CreateScorerConfig;
|
|
303
321
|
type CreateSmithersApi<Schema> = CreateSmithersApi$1<Schema>;
|
|
322
|
+
type CreateSmithersOptions = CreateSmithersOptions$1;
|
|
304
323
|
type DepsSpec = _smithers_components.DepsSpec;
|
|
305
324
|
type EventFrame = _smithers_server_gateway.EventFrame;
|
|
306
325
|
type ExternalSmithersConfig<S> = ExternalSmithersConfig$2<S>;
|
|
307
326
|
type GatewayAuthConfig = _smithers_server_gateway.GatewayAuthConfig;
|
|
308
327
|
type GatewayDefaults = _smithers_server_gateway.GatewayDefaults;
|
|
328
|
+
type GatewayOperatorUiConfig = _smithers_server_gateway.GatewayOperatorUiConfig;
|
|
309
329
|
type GatewayOptions = _smithers_server_gateway.GatewayOptions;
|
|
330
|
+
type GatewayRegisterOptions = _smithers_server_gateway.GatewayRegisterOptions;
|
|
310
331
|
type GatewayTokenGrant = _smithers_server_gateway.GatewayTokenGrant;
|
|
332
|
+
type GatewayUiConfig = _smithers_server_gateway.GatewayUiConfig;
|
|
333
|
+
type GatewayWebhookConfig = _smithers_server_gateway.GatewayWebhookConfig;
|
|
334
|
+
type GatewayWebhookRunConfig = _smithers_server_gateway.GatewayWebhookRunConfig;
|
|
335
|
+
type GatewayWebhookSignalConfig = _smithers_server_gateway.GatewayWebhookSignalConfig;
|
|
311
336
|
type GraphSnapshot = _smithers_graph_GraphSnapshot.GraphSnapshot;
|
|
312
337
|
type HelloResponse = _smithers_server_gateway.HelloResponse;
|
|
313
338
|
type HostContainer = _smithers_react_reconciler_dom_renderer.HostContainer;
|
|
@@ -333,6 +358,7 @@ type MessageHistoryConfig = _smithers_memory.MessageHistoryConfig;
|
|
|
333
358
|
type OpenAIAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = _smithers_agents.OpenAIAgentOptions<CALL_OPTIONS, TOOLS>;
|
|
334
359
|
type HermesAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = _smithers_agents.HermesAgentOptions<CALL_OPTIONS, TOOLS>;
|
|
335
360
|
type OpenCodeAgentOptions = _smithers_agents.OpenCodeAgentOptions;
|
|
361
|
+
type VibeAgentOptions = _smithers_agents.VibeAgentOptions;
|
|
336
362
|
type OpenApiAuth = _smithers_openapi.OpenApiAuth;
|
|
337
363
|
type OpenApiSpec = _smithers_openapi.OpenApiSpec;
|
|
338
364
|
type OpenApiToolsOptions = _smithers_openapi.OpenApiToolsOptions;
|
|
@@ -408,4 +434,4 @@ type XmlElement = _smithers_graph_XmlNode.XmlElement;
|
|
|
408
434
|
type XmlNode = _smithers_graph_XmlNode.XmlNode;
|
|
409
435
|
type XmlText = _smithers_graph_XmlNode.XmlText;
|
|
410
436
|
|
|
411
|
-
export { type AgentCapabilityRegistry, type AgentLike, type AgentToolDescriptor, type AggregateOptions, type AggregateScore, type AnthropicAgentOptions, type ApprovalAutoApprove, type ApprovalDecision, type ApprovalMode, type ApprovalOption, type ApprovalProps, type ApprovalRanking, type ApprovalRequest, type ApprovalSelection, type ColumnDef, type ConnectRequest, type ContinueAsNewProps, type CreateScorerConfig, type CreateSmithersApi, type DepsSpec, type EventFrame, type ExternalSmithersConfig, type GatewayAuthConfig, type GatewayDefaults, type GatewayOptions, type GatewayTokenGrant, type GraphSnapshot, type HelloResponse, type HermesAgentOptions, type HostContainer, type HostNodeJson, type InferDeps, type InferOutputEntry, type InferRow, type JjRevertResult, type KanbanProps, type KnownSmithersErrorCode, type LlmJudgeConfig, type MemoryFact, type MemoryLayerConfig, type MemoryMessage, type MemoryNamespace, type MemoryNamespaceKind, type MemoryProcessor, type MemoryProcessorConfig, type MemoryServiceApi, type MemoryStore, type MemoryThread, type MessageHistoryConfig, type OpenAIAgentOptions, type OpenApiAuth, type OpenApiSpec, type OpenApiToolsOptions, type OpenCodeAgentOptions, type OutputAccessor, type OutputKey, type OutputTarget, type PiAgentOptions, type PiExtensionUiRequest, type PiExtensionUiResponse, type PollerProps, type RequestFrame, type ResolvedSmithersObservabilityOptions, type ResponseFrame, type RevertOptions, type RevertResult, type RunJjOptions, type RunJjResult, type RunOptions, type RunResult, type RunStatus, type SagaProps, type SagaStepDef, type SagaStepProps, type SamplingConfig, type SandboxProps, type SandboxRuntime, type SandboxVolumeMount, type SandboxWorkspaceSpec, type SchemaRegistryEntry, type ScoreResult, type ScoreRow, type Scorer, type ScorerBinding, type ScorerContext, type ScorerFn, type ScorerInput, type ScorersMap, type SemanticRecallConfig, type SerializedCtx, type ServeOptions, type ServerOptions, type SignalProps, type SmithersAlertLabels, type SmithersAlertPolicy, type SmithersAlertPolicyDefaults, type SmithersAlertPolicyRule, type SmithersAlertReaction, type SmithersAlertReactionKind, type SmithersAlertReactionRef, type SmithersAlertSeverity, type SmithersCtx, type SmithersError, type SmithersErrorCode, type SmithersEvent, type SmithersLogFormat, type SmithersObservabilityOptions, type SmithersObservabilityService, type SmithersWorkflow, type SmithersWorkflowOptions, type TaskDescriptor, type TaskMemoryConfig, type TaskProps, type TimeTravelOptions, type TimeTravelResult, type TimerProps, type TryCatchFinallyProps, type WaitForEventProps, type WorkingMemoryConfig, type WorkspaceAddOptions, type WorkspaceInfo, type WorkspaceResult, type XmlElement, type XmlNode, type XmlText, bash, createExternalSmithers, createSmithers, defineTool, edit, getDefinedToolMetadata, grep, mdxPlugin, read, tools, write };
|
|
437
|
+
export { type AgentCapabilityRegistry, type AgentLike, type AgentToolDescriptor, type AggregateOptions, type AggregateScore, type AnthropicAgentOptions, type ApprovalAutoApprove, type ApprovalDecision, type ApprovalMode, type ApprovalOption, type ApprovalProps, type ApprovalRanking, type ApprovalRequest, type ApprovalSelection, type ColumnDef, type ConnectRequest, type ContinueAsNewProps, type CreateScorerConfig, type CreateSmithersApi, type CreateSmithersOptions, type DepsSpec, type EventFrame, type ExternalSmithersConfig, type GatewayAuthConfig, type GatewayDefaults, type GatewayOperatorUiConfig, type GatewayOptions, type GatewayRegisterOptions, type GatewayTokenGrant, type GatewayUiConfig, type GatewayWebhookConfig, type GatewayWebhookRunConfig, type GatewayWebhookSignalConfig, type GraphSnapshot, type HelloResponse, type HermesAgentOptions, type HostContainer, type HostNodeJson, type InferDeps, type InferOutputEntry, type InferRow, type JjRevertResult, type KanbanProps, type KnownSmithersErrorCode, type LlmJudgeConfig, type MemoryFact, type MemoryLayerConfig, type MemoryMessage, type MemoryNamespace, type MemoryNamespaceKind, type MemoryProcessor, type MemoryProcessorConfig, type MemoryServiceApi, type MemoryStore, type MemoryThread, type MessageHistoryConfig, type OpenAIAgentOptions, type OpenApiAuth, type OpenApiSpec, type OpenApiToolsOptions, type OpenCodeAgentOptions, type OutputAccessor, type OutputKey, type OutputTarget, type PiAgentOptions, type PiExtensionUiRequest, type PiExtensionUiResponse, type PollerProps, type RequestFrame, type ResolvedSmithersObservabilityOptions, type ResponseFrame, type RevertOptions, type RevertResult, type RunJjOptions, type RunJjResult, type RunOptions, type RunResult, type RunStatus, type SagaProps, type SagaStepDef, type SagaStepProps, type SamplingConfig, type SandboxProps, type SandboxRuntime, type SandboxVolumeMount, type SandboxWorkspaceSpec, type SchemaRegistryEntry, type ScoreResult, type ScoreRow, type Scorer, type ScorerBinding, type ScorerContext, type ScorerFn, type ScorerInput, type ScorersMap, type SemanticRecallConfig, type SerializedCtx, type ServeOptions, type ServerOptions, type SignalProps, type SmithersAlertLabels, type SmithersAlertPolicy, type SmithersAlertPolicyDefaults, type SmithersAlertPolicyRule, type SmithersAlertReaction, type SmithersAlertReactionKind, type SmithersAlertReactionRef, type SmithersAlertSeverity, type SmithersCtx, type SmithersError, type SmithersErrorCode, type SmithersEvent, type SmithersLogFormat, type SmithersObservabilityOptions, type SmithersObservabilityService, type SmithersWorkflow, type SmithersWorkflowOptions, type TaskDescriptor, type TaskMemoryConfig, type TaskProps, type TimeTravelOptions, type TimeTravelResult, type TimerProps, type TryCatchFinallyProps, type VibeAgentOptions, type WaitForEventProps, type WorkingMemoryConfig, type WorkspaceAddOptions, type WorkspaceInfo, type WorkspaceResult, type XmlElement, type XmlNode, type XmlText, bash, createExternalSmithers, createSmithers, createSmithersPostgres, defineTool, edit, getDefinedToolMetadata, grep, mdxPlugin, read, tools, write };
|
package/src/index.js
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* @template Schema
|
|
26
26
|
* @typedef {import("./CreateSmithersApi.ts").CreateSmithersApi<Schema>} CreateSmithersApi
|
|
27
27
|
*/
|
|
28
|
+
/** @typedef {import("./CreateSmithersOptions.ts").CreateSmithersOptions} CreateSmithersOptions */
|
|
28
29
|
/** @typedef {import("@smithers-orchestrator/components").DepsSpec} DepsSpec */
|
|
29
30
|
/** @typedef {import("@smithers-orchestrator/server/gateway").EventFrame} EventFrame */
|
|
30
31
|
/**
|
|
@@ -33,8 +34,14 @@
|
|
|
33
34
|
*/
|
|
34
35
|
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayAuthConfig} GatewayAuthConfig */
|
|
35
36
|
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayDefaults} GatewayDefaults */
|
|
37
|
+
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayOperatorUiConfig} GatewayOperatorUiConfig */
|
|
36
38
|
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayOptions} GatewayOptions */
|
|
39
|
+
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayRegisterOptions} GatewayRegisterOptions */
|
|
37
40
|
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayTokenGrant} GatewayTokenGrant */
|
|
41
|
+
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayUiConfig} GatewayUiConfig */
|
|
42
|
+
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayWebhookConfig} GatewayWebhookConfig */
|
|
43
|
+
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayWebhookRunConfig} GatewayWebhookRunConfig */
|
|
44
|
+
/** @typedef {import("@smithers-orchestrator/server/gateway").GatewayWebhookSignalConfig} GatewayWebhookSignalConfig */
|
|
38
45
|
/** @typedef {import("@smithers-orchestrator/graph/GraphSnapshot").GraphSnapshot} GraphSnapshot */
|
|
39
46
|
/** @typedef {import("@smithers-orchestrator/server/gateway").HelloResponse} HelloResponse */
|
|
40
47
|
/** @typedef {import("@smithers-orchestrator/react-reconciler/dom/renderer").HostContainer} HostContainer */
|
|
@@ -86,6 +93,7 @@
|
|
|
86
93
|
/** @typedef {import("@smithers-orchestrator/agents").PiExtensionUiRequest} PiExtensionUiRequest */
|
|
87
94
|
/** @typedef {import("@smithers-orchestrator/agents").PiExtensionUiResponse} PiExtensionUiResponse */
|
|
88
95
|
/** @typedef {import("@smithers-orchestrator/agents").OpenCodeAgentOptions} OpenCodeAgentOptions */
|
|
96
|
+
/** @typedef {import("@smithers-orchestrator/agents").VibeAgentOptions} VibeAgentOptions */
|
|
89
97
|
/** @typedef {import("@smithers-orchestrator/components").PollerProps} PollerProps */
|
|
90
98
|
/** @typedef {import("@smithers-orchestrator/server/gateway").RequestFrame} RequestFrame */
|
|
91
99
|
/** @typedef {import("@smithers-orchestrator/observability").ResolvedSmithersObservabilityOptions} ResolvedSmithersObservabilityOptions */
|
|
@@ -171,18 +179,23 @@ export { knownSmithersErrorCodes } from "@smithers-orchestrator/errors/knownSmit
|
|
|
171
179
|
// Components
|
|
172
180
|
export { Approval, ApprovalGate, Aspects, Branch, CheckSuite, ClassifyAndRoute, ContentPipeline, ContinueAsNew, Debate, DecisionTable, DriftDetector, EscalationChain, GatherAndSynthesize, HumanTask, Kanban, Loop, MergeQueue, Optimizer, Panel, Parallel, Poller, Ralph, ReviewLoop, Runbook, Saga, Sandbox, ScanFixVerify, Sequence, Signal, Subflow, SuperSmithers, Supervisor, Task, Timer, TryCatchFinally, WaitForEvent, Workflow, Worktree, approvalDecisionSchema, approvalRankingSchema, approvalSelectionSchema, continueAsNew, } from "@smithers-orchestrator/components";
|
|
173
181
|
// Agents
|
|
174
|
-
export { AnthropicAgent, OpenAIAgent, HermesAgent, AmpAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, GeminiAgent, PiAgent, KimiAgent, ForgeAgent, OpenCodeAgent, } from "@smithers-orchestrator/agents";
|
|
182
|
+
export { AnthropicAgent, OpenAIAgent, HermesAgent, AmpAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, GeminiAgent, PiAgent, KimiAgent, ForgeAgent, VibeAgent, OpenCodeAgent, } from "@smithers-orchestrator/agents";
|
|
175
183
|
// VCS
|
|
176
184
|
export { runJj, getJjPointer, revertToJjPointer, isJjRepo, workspaceAdd, workspaceList, workspaceClose, } from "@smithers-orchestrator/vcs/jj";
|
|
177
185
|
// Core API
|
|
178
186
|
export { createSmithers, createSmithersPostgres } from "./create.js";
|
|
179
187
|
export {
|
|
188
|
+
approveNode,
|
|
189
|
+
denyNode,
|
|
180
190
|
fragment,
|
|
191
|
+
getRun,
|
|
192
|
+
listRuns,
|
|
181
193
|
renderFrame,
|
|
182
194
|
runWorkflow,
|
|
183
195
|
Smithers,
|
|
184
196
|
workflow,
|
|
185
197
|
} from "@smithers-orchestrator/engine";
|
|
198
|
+
export { resolveWorktreePath } from "@smithers-orchestrator/graph";
|
|
186
199
|
export { signalRun } from "@smithers-orchestrator/engine/signals";
|
|
187
200
|
export { usePatched } from "@smithers-orchestrator/engine/effect/versioning";
|
|
188
201
|
// Tools
|
|
@@ -204,7 +217,8 @@ export { createServeApp } from "@smithers-orchestrator/server/serve";
|
|
|
204
217
|
// Observability
|
|
205
218
|
export { SmithersObservability, createSmithersObservabilityLayer, createSmithersOtelLayer, createSmithersRuntimeLayer, smithersMetrics, trackSmithersEvent, activeNodes, activeRuns, externalWaitAsyncPending, approvalsDenied, approvalsGranted, approvalsRequested, timerDelayDuration, timersCancelled, timersCreated, timersFired, timersPending, attemptDuration, cacheHits, cacheMisses, dbQueryDuration, dbRetries, dbTransactionDuration, dbTransactionRetries, dbTransactionRollbacks, hotReloadDuration, hotReloadFailures, hotReloads, httpRequestDuration, httpRequests, nodeDuration, nodesFailed, nodesFinished, nodesStarted, prometheusContentType, renderPrometheusMetrics, resolveSmithersObservabilityOptions, runsTotal, sandboxActive, sandboxBundleSizeBytes, sandboxCompletedTotal, sandboxCreatedTotal, sandboxDurationMs, sandboxPatchCount, sandboxTransportDurationMs, schedulerQueueDepth, toolCallsTotal, toolDuration, vcsDuration, } from "@smithers-orchestrator/observability";
|
|
206
219
|
// DB
|
|
207
|
-
export { SmithersDb } from "@smithers-orchestrator/db
|
|
220
|
+
export { SmithersDb } from "@smithers-orchestrator/db";
|
|
221
|
+
export { loadOutputs, loadOutputsEffect } from "@smithers-orchestrator/db";
|
|
208
222
|
export { ensureSmithersTables } from "@smithers-orchestrator/db/ensure";
|
|
209
223
|
// Renderer
|
|
210
224
|
export { SmithersRenderer } from "@smithers-orchestrator/react-reconciler/dom/renderer";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
|
|
3
|
+
/** Element key accepted by the JSX runtime factories. */
|
|
4
|
+
export type JsxRuntimeKey = string | number | undefined;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Smithers JSX runtime factories — the target of
|
|
8
|
+
* `jsxImportSource: "smithers-orchestrator"` and what `<Workflow/>`, `<Task/>`,
|
|
9
|
+
* etc. compile to. They are deliberately typed wide (`type`/`props` as
|
|
10
|
+
* `unknown`): components validate their own props, and keeping these signatures
|
|
11
|
+
* loose avoids expanding Smithers' deep workflow types during type-checking,
|
|
12
|
+
* which is otherwise expensive. Callers that build trees programmatically can
|
|
13
|
+
* use these directly, e.g. `jsx(Task, { id, output, agent, children }, key)`.
|
|
14
|
+
*/
|
|
15
|
+
export function jsx(type: unknown, props: unknown, key?: JsxRuntimeKey): ReactElement;
|
|
16
|
+
export function jsxs(type: unknown, props: unknown, key?: JsxRuntimeKey): ReactElement;
|
|
17
|
+
export function jsxDEV(
|
|
18
|
+
type: unknown,
|
|
19
|
+
props: unknown,
|
|
20
|
+
key?: JsxRuntimeKey,
|
|
21
|
+
isStaticChildren?: boolean,
|
|
22
|
+
source?: unknown,
|
|
23
|
+
self?: unknown,
|
|
24
|
+
): ReactElement;
|
|
25
|
+
export const Fragment: unknown;
|
package/src/tools/bash.js
CHANGED
|
@@ -175,7 +175,7 @@ export async function bashTool(cmd, args = [], opts = undefined) {
|
|
|
175
175
|
|
|
176
176
|
export const bash = defineTool({
|
|
177
177
|
name: "bash",
|
|
178
|
-
description: "
|
|
178
|
+
description: "Run an executable with arguments",
|
|
179
179
|
schema: z.object({
|
|
180
180
|
cmd: z.string(),
|
|
181
181
|
args: z.array(z.string()).optional(),
|