smithers-orchestrator 0.25.4 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +23 -23
- package/src/index.d.ts +3 -2
- package/src/index.js +2 -1
- package/src/migrateSmithersStore.js +37 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smithers-orchestrator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Public Smithers facade for durable coding-agent workflows and Gateway operation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://smithers.sh",
|
|
@@ -92,28 +92,28 @@
|
|
|
92
92
|
"incur": "^0.4.1",
|
|
93
93
|
"react": "^19.2.5",
|
|
94
94
|
"zod": "^4.3.6",
|
|
95
|
-
"@smithers-orchestrator/agents": "0.
|
|
96
|
-
"@smithers-orchestrator/
|
|
97
|
-
"@smithers-orchestrator/
|
|
98
|
-
"@smithers-orchestrator/control-plane": "0.
|
|
99
|
-
"@smithers-orchestrator/db": "0.
|
|
100
|
-
"@smithers-orchestrator/driver": "0.
|
|
101
|
-
"@smithers-orchestrator/
|
|
102
|
-
"@smithers-orchestrator/
|
|
103
|
-
"@smithers-orchestrator/gateway-client": "0.
|
|
104
|
-
"@smithers-orchestrator/gateway-react": "0.
|
|
105
|
-
"@smithers-orchestrator/graph": "0.
|
|
106
|
-
"@smithers-orchestrator/memory": "0.
|
|
107
|
-
"@smithers-orchestrator/observability": "0.
|
|
108
|
-
"@smithers-orchestrator/
|
|
109
|
-
"@smithers-orchestrator/openapi": "0.
|
|
110
|
-
"@smithers-orchestrator/
|
|
111
|
-
"@smithers-orchestrator/
|
|
112
|
-
"@smithers-orchestrator/scorers": "0.
|
|
113
|
-
"@smithers-orchestrator/
|
|
114
|
-
"@smithers-orchestrator/time-travel": "0.
|
|
115
|
-
"@smithers-orchestrator/tool-context": "0.
|
|
116
|
-
"@smithers-orchestrator/vcs": "0.
|
|
95
|
+
"@smithers-orchestrator/agents": "0.26.1",
|
|
96
|
+
"@smithers-orchestrator/components": "0.26.1",
|
|
97
|
+
"@smithers-orchestrator/cli": "0.26.1",
|
|
98
|
+
"@smithers-orchestrator/control-plane": "0.26.1",
|
|
99
|
+
"@smithers-orchestrator/db": "0.26.1",
|
|
100
|
+
"@smithers-orchestrator/driver": "0.26.1",
|
|
101
|
+
"@smithers-orchestrator/engine": "0.26.1",
|
|
102
|
+
"@smithers-orchestrator/errors": "0.26.1",
|
|
103
|
+
"@smithers-orchestrator/gateway-client": "0.26.1",
|
|
104
|
+
"@smithers-orchestrator/gateway-react": "0.26.1",
|
|
105
|
+
"@smithers-orchestrator/graph": "0.26.1",
|
|
106
|
+
"@smithers-orchestrator/memory": "0.26.1",
|
|
107
|
+
"@smithers-orchestrator/observability": "0.26.1",
|
|
108
|
+
"@smithers-orchestrator/react-reconciler": "0.26.1",
|
|
109
|
+
"@smithers-orchestrator/openapi": "0.26.1",
|
|
110
|
+
"@smithers-orchestrator/sandbox": "0.26.1",
|
|
111
|
+
"@smithers-orchestrator/scheduler": "0.26.1",
|
|
112
|
+
"@smithers-orchestrator/scorers": "0.26.1",
|
|
113
|
+
"@smithers-orchestrator/server": "0.26.1",
|
|
114
|
+
"@smithers-orchestrator/time-travel": "0.26.1",
|
|
115
|
+
"@smithers-orchestrator/tool-context": "0.26.1",
|
|
116
|
+
"@smithers-orchestrator/vcs": "0.26.1"
|
|
117
117
|
},
|
|
118
118
|
"optionalDependencies": {
|
|
119
119
|
"@electric-sql/pglite": "0.5.1",
|
package/src/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ import { WorkflowProps } from '@smithers-orchestrator/components/components/Work
|
|
|
58
58
|
import * as _smithers_server_gateway from '@smithers-orchestrator/server/gateway';
|
|
59
59
|
export { Gateway } from '@smithers-orchestrator/server/gateway';
|
|
60
60
|
import * as _smithers_agents from '@smithers-orchestrator/agents';
|
|
61
|
-
export { AmpAgent, AnthropicAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, ForgeAgent, GeminiAgent, HermesAgent, KimiAgent, OpenAIAgent, OpenCodeAgent, PiAgent, VibeAgent, createHttpTool } from '@smithers-orchestrator/agents';
|
|
61
|
+
export { AmpAgent, AnthropicAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, ForgeAgent, GeminiAgent, HermesAgent, HermesCliAgent, KimiAgent, OpenAIAgent, OpenCodeAgent, PiAgent, VibeAgent, createHttpTool } from '@smithers-orchestrator/agents';
|
|
62
62
|
import * as _smithers_scorers from '@smithers-orchestrator/scorers';
|
|
63
63
|
export { aggregateScores, createScorer, faithfulnessScorer, latencyScorer, llmJudge, relevancyScorer, runScorersAsync, runScorersBatch, schemaAdherenceScorer, smithersScorers, toxicityScorer } from '@smithers-orchestrator/scorers';
|
|
64
64
|
import * as _smithers_agents_capability_registry from '@smithers-orchestrator/agents/capability-registry';
|
|
@@ -428,6 +428,7 @@ type SmithersMigrationResult = SmithersMigrationResult$1;
|
|
|
428
428
|
type OpenAIAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = _smithers_agents.OpenAIAgentOptions<CALL_OPTIONS, TOOLS>;
|
|
429
429
|
type OpenSmithersBackendOptions = OpenSmithersBackendOptions$1;
|
|
430
430
|
type HermesAgentOptions<CALL_OPTIONS = never, TOOLS = ai.ToolSet> = _smithers_agents.HermesAgentOptions<CALL_OPTIONS, TOOLS>;
|
|
431
|
+
type HermesCliAgentOptions = _smithers_agents.HermesCliAgentOptions;
|
|
431
432
|
type HttpToolAuth = _smithers_agents.HttpToolAuth;
|
|
432
433
|
type HttpToolInput = _smithers_agents.HttpToolInput;
|
|
433
434
|
type HttpToolOutput = _smithers_agents.HttpToolOutput;
|
|
@@ -508,4 +509,4 @@ type XmlElement = _smithers_graph_XmlNode.XmlElement;
|
|
|
508
509
|
type XmlNode = _smithers_graph_XmlNode.XmlNode;
|
|
509
510
|
type XmlText = _smithers_graph_XmlNode.XmlText;
|
|
510
511
|
|
|
511
|
-
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 CreateHttpToolOptions, 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 HttpToolAuth, type HttpToolInput, type HttpToolOutput, 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 MigrateSmithersStoreOptions, type OpenAIAgentOptions, type OpenApiAuth, type OpenApiSpec, type OpenApiToolsOptions, type OpenCodeAgentOptions, type OpenSmithersBackendOptions, 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 SmithersMigrationResult, 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, migrateSmithersStore, openSmithersBackend, read, tools, write };
|
|
512
|
+
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 CreateHttpToolOptions, 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 HermesCliAgentOptions, type HostContainer, type HostNodeJson, type HttpToolAuth, type HttpToolInput, type HttpToolOutput, 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 MigrateSmithersStoreOptions, type OpenAIAgentOptions, type OpenApiAuth, type OpenApiSpec, type OpenApiToolsOptions, type OpenCodeAgentOptions, type OpenSmithersBackendOptions, 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 SmithersMigrationResult, 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, migrateSmithersStore, openSmithersBackend, read, tools, write };
|
package/src/index.js
CHANGED
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
* @template [TOOLS=import("ai").ToolSet]
|
|
84
84
|
* @typedef {import("@smithers-orchestrator/agents").HermesAgentOptions<CALL_OPTIONS, TOOLS>} HermesAgentOptions
|
|
85
85
|
*/
|
|
86
|
+
/** @typedef {import("@smithers-orchestrator/agents").HermesCliAgentOptions} HermesCliAgentOptions */
|
|
86
87
|
/** @typedef {import("@smithers-orchestrator/openapi").OpenApiAuth} OpenApiAuth */
|
|
87
88
|
/** @typedef {import("@smithers-orchestrator/openapi").OpenApiSpec} OpenApiSpec */
|
|
88
89
|
/** @typedef {import("@smithers-orchestrator/openapi").OpenApiToolsOptions} OpenApiToolsOptions */
|
|
@@ -182,7 +183,7 @@ export { knownSmithersErrorCodes } from "@smithers-orchestrator/errors/knownSmit
|
|
|
182
183
|
// Components
|
|
183
184
|
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, SagaStep, Sandbox, ScanFixVerify, Sequence, Sidecar, Signal, Subflow, SuperSmithers, Supervisor, Task, Timer, TryCatchFinally, WaitForEvent, Workflow, Worktree, approvalDecisionSchema, approvalRankingSchema, approvalSelectionSchema, computeSidecarDelta, continueAsNew, } from "@smithers-orchestrator/components";
|
|
184
185
|
// Agents
|
|
185
|
-
export { AnthropicAgent, OpenAIAgent, HermesAgent, AmpAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, GeminiAgent, PiAgent, KimiAgent, ForgeAgent, VibeAgent, OpenCodeAgent, createHttpTool, } from "@smithers-orchestrator/agents";
|
|
186
|
+
export { AnthropicAgent, OpenAIAgent, HermesAgent, HermesCliAgent, AmpAgent, AntigravityAgent, ClaudeCodeAgent, CodexAgent, GeminiAgent, PiAgent, KimiAgent, ForgeAgent, VibeAgent, OpenCodeAgent, createHttpTool, } from "@smithers-orchestrator/agents";
|
|
186
187
|
// VCS
|
|
187
188
|
export { runJj, getJjPointer, revertToJjPointer, isJjRepo, workspaceAdd, workspaceList, workspaceClose, } from "@smithers-orchestrator/vcs/jj";
|
|
188
189
|
// Core API
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Database } from "bun:sqlite";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { drizzle } from "drizzle-orm/bun-sqlite";
|
|
4
|
-
import { existsSync, mkdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
6
6
|
import { ensureSmithersTables } from "@smithers-orchestrator/db/ensure";
|
|
7
7
|
import { POSTGRES, quoteIdentifier, translateDdl } from "@smithers-orchestrator/db/dialect";
|
|
@@ -875,8 +875,44 @@ async function pgliteRunCountAt(cwd, workspaceRoot, opts) {
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
+
/**
|
|
879
|
+
* Read the migration receipt (migrated.json) at the workspace root and return
|
|
880
|
+
* the CURRENT backend it records. After a prior migration this receipt is the
|
|
881
|
+
* AUTHORITY on which backend now holds the run store: earlier-backend stores
|
|
882
|
+
* (e.g. a leftover smithers.db after sqlite->pglite) can still sit on disk, so
|
|
883
|
+
* a run-count heuristic alone would misread the source. Returns undefined when
|
|
884
|
+
* there is no usable receipt so callers can fall back to the heuristic.
|
|
885
|
+
* @param {string} workspaceRoot
|
|
886
|
+
* @returns {MigrateSmithersBackend | undefined}
|
|
887
|
+
*/
|
|
888
|
+
function readReceiptCurrentBackend(workspaceRoot) {
|
|
889
|
+
const receiptPath = join(workspaceRoot, ".smithers", MIGRATION_MARKER_NAME);
|
|
890
|
+
if (!existsSync(receiptPath)) return undefined;
|
|
891
|
+
try {
|
|
892
|
+
const receipt = JSON.parse(readFileSync(receiptPath, "utf8"));
|
|
893
|
+
// migrated.json records the destination of the last migration under
|
|
894
|
+
// `target.backend`; a top-level `backend` (backend.json shape) is also
|
|
895
|
+
// honored defensively. Either is the current authoritative backend.
|
|
896
|
+
const current = receipt?.target?.backend ?? receipt?.backend;
|
|
897
|
+
if (current === undefined || current === null || current === "") {
|
|
898
|
+
return undefined;
|
|
899
|
+
}
|
|
900
|
+
return normalizeBackend(current);
|
|
901
|
+
}
|
|
902
|
+
catch {
|
|
903
|
+
return undefined;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
878
907
|
async function inferSourceBackend(opts, cwd, workspaceRoot, dbPath, target) {
|
|
879
908
|
if (opts.from) return normalizeBackend(opts.from);
|
|
909
|
+
// The migration receipt is authoritative after a prior migration: trust the
|
|
910
|
+
// backend it records over any leftover stores on disk. When the receipt's
|
|
911
|
+
// current backend equals the requested target, the caller's clear
|
|
912
|
+
// "source and target are both X" guard fires; only fall back to the
|
|
913
|
+
// run-count heuristic (and SMITHERS_BACKEND_CONFLICT) when no receipt exists.
|
|
914
|
+
const receiptBackend = readReceiptCurrentBackend(workspaceRoot);
|
|
915
|
+
if (receiptBackend) return receiptBackend;
|
|
880
916
|
const counts = [
|
|
881
917
|
{ backend: "sqlite", runCount: sqliteRunCountAt(inferSqliteSourceDbPath(dbPath, workspaceRoot, Boolean(opts.dbPath))) },
|
|
882
918
|
{ backend: "pglite", runCount: await pgliteRunCountAt(cwd, workspaceRoot, opts) },
|