smithers-orchestrator 0.25.2 → 0.25.4
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/resolveSmithersBackendChoice.js +24 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smithers-orchestrator",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.4",
|
|
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.25.
|
|
96
|
-
"@smithers-orchestrator/
|
|
97
|
-
"@smithers-orchestrator/
|
|
98
|
-
"@smithers-orchestrator/
|
|
99
|
-
"@smithers-orchestrator/
|
|
100
|
-
"@smithers-orchestrator/driver": "0.25.
|
|
101
|
-
"@smithers-orchestrator/
|
|
102
|
-
"@smithers-orchestrator/engine": "0.25.
|
|
103
|
-
"@smithers-orchestrator/
|
|
104
|
-
"@smithers-orchestrator/
|
|
105
|
-
"@smithers-orchestrator/
|
|
106
|
-
"@smithers-orchestrator/memory": "0.25.
|
|
107
|
-
"@smithers-orchestrator/
|
|
108
|
-
"@smithers-orchestrator/
|
|
109
|
-
"@smithers-orchestrator/
|
|
110
|
-
"@smithers-orchestrator/
|
|
111
|
-
"@smithers-orchestrator/
|
|
112
|
-
"@smithers-orchestrator/
|
|
113
|
-
"@smithers-orchestrator/scheduler": "0.25.
|
|
114
|
-
"@smithers-orchestrator/time-travel": "0.25.
|
|
115
|
-
"@smithers-orchestrator/tool-context": "0.25.
|
|
116
|
-
"@smithers-orchestrator/vcs": "0.25.
|
|
95
|
+
"@smithers-orchestrator/agents": "0.25.4",
|
|
96
|
+
"@smithers-orchestrator/cli": "0.25.4",
|
|
97
|
+
"@smithers-orchestrator/components": "0.25.4",
|
|
98
|
+
"@smithers-orchestrator/control-plane": "0.25.4",
|
|
99
|
+
"@smithers-orchestrator/db": "0.25.4",
|
|
100
|
+
"@smithers-orchestrator/driver": "0.25.4",
|
|
101
|
+
"@smithers-orchestrator/errors": "0.25.4",
|
|
102
|
+
"@smithers-orchestrator/engine": "0.25.4",
|
|
103
|
+
"@smithers-orchestrator/gateway-client": "0.25.4",
|
|
104
|
+
"@smithers-orchestrator/gateway-react": "0.25.4",
|
|
105
|
+
"@smithers-orchestrator/graph": "0.25.4",
|
|
106
|
+
"@smithers-orchestrator/memory": "0.25.4",
|
|
107
|
+
"@smithers-orchestrator/observability": "0.25.4",
|
|
108
|
+
"@smithers-orchestrator/sandbox": "0.25.4",
|
|
109
|
+
"@smithers-orchestrator/openapi": "0.25.4",
|
|
110
|
+
"@smithers-orchestrator/react-reconciler": "0.25.4",
|
|
111
|
+
"@smithers-orchestrator/server": "0.25.4",
|
|
112
|
+
"@smithers-orchestrator/scorers": "0.25.4",
|
|
113
|
+
"@smithers-orchestrator/scheduler": "0.25.4",
|
|
114
|
+
"@smithers-orchestrator/time-travel": "0.25.4",
|
|
115
|
+
"@smithers-orchestrator/tool-context": "0.25.4",
|
|
116
|
+
"@smithers-orchestrator/vcs": "0.25.4"
|
|
117
117
|
},
|
|
118
118
|
"optionalDependencies": {
|
|
119
119
|
"@electric-sql/pglite": "0.5.1",
|
|
@@ -153,6 +153,10 @@ function readMigratedMarker(workspaceRoot) {
|
|
|
153
153
|
return {
|
|
154
154
|
exists: true,
|
|
155
155
|
backend: normalizeBackend(parsed?.target?.backend ?? parsed?.target ?? parsed?.backend, markerPath),
|
|
156
|
+
// The migration SOURCE backend, recorded by `migrate` for every
|
|
157
|
+
// direction. A reverse (target sqlite) receipt uses it to tolerate the
|
|
158
|
+
// kept source store (pglite/postgres) without hiding an unrelated one.
|
|
159
|
+
sourceBackend: normalizeBackend(parsed?.source?.backend ?? (typeof parsed?.source === "string" ? parsed.source : undefined), markerPath),
|
|
156
160
|
};
|
|
157
161
|
}
|
|
158
162
|
catch {
|
|
@@ -376,14 +380,32 @@ export async function resolveSmithersBackendChoice(opts = {}) {
|
|
|
376
380
|
// otherwise an explicit pglite/postgres open beside a populated SQLite store
|
|
377
381
|
// would hide the SQLite history.
|
|
378
382
|
const marker = migratedMarker.exists && (migratedMarker.backend === "pglite" || migratedMarker.backend === "postgres");
|
|
383
|
+
// A REVERSE migration receipt (target sqlite) is authoritative the same way a
|
|
384
|
+
// forward one is — but the only leftover store it authorizes keeping is the
|
|
385
|
+
// recorded migration SOURCE (pglite/postgres). It must NOT silently hide an
|
|
386
|
+
// unrelated populated store, so it requires a recorded source backend (a bare
|
|
387
|
+
// or sourceless receipt does not suppress) and resolves only when we actually
|
|
388
|
+
// land on sqlite. Symmetric to the forward path's sqlite-source tolerance.
|
|
389
|
+
const reverseMarker = migratedMarker.exists
|
|
390
|
+
&& migratedMarker.backend === "sqlite"
|
|
391
|
+
&& backend === "sqlite"
|
|
392
|
+
&& (migratedMarker.sourceBackend === "pglite" || migratedMarker.sourceBackend === "postgres");
|
|
379
393
|
const populated = [
|
|
380
394
|
...(sqliteStore.runCount > 0 ? [{ backend: /** @type {"sqlite"} */ ("sqlite"), location: sqliteStore.dbPath, runCount: sqliteStore.runCount, schemaVersion: sqliteStore.schemaVersion }] : []),
|
|
381
395
|
...(pgliteStore.runCount > 0 ? [{ backend: /** @type {"pglite"} */ ("pglite"), location: pgliteStore.dataDir, runCount: pgliteStore.runCount, schemaVersion: pgliteStore.schemaVersion }] : []),
|
|
382
396
|
...(postgresStore.runCount > 0 ? [{ backend: /** @type {"postgres"} */ ("postgres"), location: postgresStore.connectionString === "set" ? "postgres connection" : "postgres", runCount: postgresStore.runCount, schemaVersion: postgresStore.schemaVersion }] : []),
|
|
383
397
|
];
|
|
384
|
-
if (!marker && populated.length > 1) {
|
|
398
|
+
if (!marker && !reverseMarker && populated.length > 1) {
|
|
385
399
|
throw backendConflictError({ populated });
|
|
386
400
|
}
|
|
401
|
+
if (reverseMarker) {
|
|
402
|
+
// Tolerate sqlite (the migration target) and the recorded source only;
|
|
403
|
+
// any other populated store would be hidden, so refuse to choose.
|
|
404
|
+
const unexpectedPopulated = populated.filter((store) => store.backend !== "sqlite" && store.backend !== migratedMarker.sourceBackend);
|
|
405
|
+
if (unexpectedPopulated.length > 0) {
|
|
406
|
+
throw backendConflictError({ populated });
|
|
407
|
+
}
|
|
408
|
+
}
|
|
387
409
|
const migratedTargetBackend = marker && (migratedMarker.backend ?? markerBackend) !== "sqlite"
|
|
388
410
|
? /** @type {"pglite" | "postgres" | undefined} */ (migratedMarker.backend ?? markerBackend)
|
|
389
411
|
: undefined;
|
|
@@ -452,6 +474,6 @@ export async function resolveSmithersBackendChoice(opts = {}) {
|
|
|
452
474
|
sqlite: sqliteStore,
|
|
453
475
|
pglite: pgliteStore,
|
|
454
476
|
postgres: postgresStore,
|
|
455
|
-
migratedMarker: marker,
|
|
477
|
+
migratedMarker: marker || reverseMarker,
|
|
456
478
|
};
|
|
457
479
|
}
|