@runweave/server-darwin-arm64 0.1.2 → 0.1.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/manifest.json +161 -156
- package/native.tar.gz +0 -0
- package/package.json +1 -1
- package/payload/app-server/build-info.json +4 -4
- package/payload/app-server/index.cjs +290 -89
- package/payload/app-server/index.cjs.map +1 -1
- package/payload/backend/build-info.json +4 -4
- package/payload/backend/dev-resources/control.cjs +197 -20
- package/payload/backend/evolution-sqlite-worker.cjs +58 -1
- package/payload/backend/index.cjs +3108 -2061
- package/payload/backend/scheduled-tasks-sqlite-worker.cjs +11 -7
- package/payload/frontend/dist/assets/{_baseUniq-B6OtH5JH.js → _baseUniq-2DZJ97aQ.js} +1 -1
- package/payload/frontend/dist/assets/{access-CpH3nCnI.js → access-Jw5gZrYY.js} +1 -1
- package/payload/frontend/dist/assets/{advanced-U5MqNTD5.js → advanced-DRe-Doxo.js} +1 -1
- package/payload/frontend/dist/assets/{appearance-Cb8XjaOT.js → appearance-D1wpkdXT.js} +1 -1
- package/payload/frontend/dist/assets/{arc-CEnFQNMK.js → arc-keTQ5uhA.js} +1 -1
- package/payload/frontend/dist/assets/{architectureDiagram-Q4EWVU46-T438RyEG.js → architectureDiagram-Q4EWVU46-BXbCJ77m.js} +1 -1
- package/payload/frontend/dist/assets/{blockDiagram-DXYQGD6D-B6Mqb9og.js → blockDiagram-DXYQGD6D-De0Ki8tO.js} +1 -1
- package/payload/frontend/dist/assets/{c4Diagram-AHTNJAMY-CO3eA3hw.js → c4Diagram-AHTNJAMY-EfazoSVi.js} +1 -1
- package/payload/frontend/dist/assets/channel-CExZE0tD.js +1 -0
- package/payload/frontend/dist/assets/{chunk-4BX2VUAB-1vjsV_mH.js → chunk-4BX2VUAB-BXCGPL07.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-4TB4RGXK-CtMNFDLV.js → chunk-4TB4RGXK-ByjQ1_yc.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-55IACEB6-DVWWqMjZ.js → chunk-55IACEB6-D-KjMbGJ.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-EDXVE4YY-BBf3C6eJ.js → chunk-EDXVE4YY-tAgLMZ4w.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-FMBD7UC4-BUQfXSvf.js → chunk-FMBD7UC4-D3J3ERtV.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-OYMX7WX6-DM1nFyON.js → chunk-OYMX7WX6-DZHtmvkW.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-QZHKN3VN-Bz3CUNpU.js → chunk-QZHKN3VN-D6IIGd1d.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-YZCP3GAM-Bb6CnKMv.js → chunk-YZCP3GAM-KD19-lMa.js} +1 -1
- package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-DNOAkizi.js +1 -0
- package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-DNOAkizi.js +1 -0
- package/payload/frontend/dist/assets/clone-CzOxlTa8.js +1 -0
- package/payload/frontend/dist/assets/connection-Cm6G1HOW.js +12 -0
- package/payload/frontend/dist/assets/{connections-1OP6Izpn.js → connections-B8tSRWt9.js} +1 -1
- package/payload/frontend/dist/assets/{cose-bilkent-S5V4N54A-DvX1W1oQ.js → cose-bilkent-S5V4N54A-AYXbL8jP.js} +1 -1
- package/payload/frontend/dist/assets/{dagre-KV5264BT-BYV7l80W.js → dagre-KV5264BT-DCunJ-sG.js} +1 -1
- package/payload/frontend/dist/assets/{desktop-DKYPd_Z3.js → desktop-DnY652OH.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-5BDNPKRD-BU_VxMcA.js → diagram-5BDNPKRD-Ch2b63ll.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-G4DWMVQ6-6jnkLcPr.js → diagram-G4DWMVQ6-BAuc_Uar.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-MMDJMWI5-DAjbbS4T.js → diagram-MMDJMWI5-DH8qMuDA.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-TYMM5635-p2T86-Pr.js → diagram-TYMM5635-BflD7Kjb.js} +1 -1
- package/payload/frontend/dist/assets/{erDiagram-SMLLAGMA-DcZPoxkO.js → erDiagram-SMLLAGMA-BGzvzTP9.js} +1 -1
- package/payload/frontend/dist/assets/{flowDiagram-DWJPFMVM-CDB-5IUB.js → flowDiagram-DWJPFMVM-BR4mXArp.js} +1 -1
- package/payload/frontend/dist/assets/{ganttDiagram-T4ZO3ILL-imCnxO5S.js → ganttDiagram-T4ZO3ILL-uXtJoz5O.js} +1 -1
- package/payload/frontend/dist/assets/{gitGraphDiagram-UUTBAWPF-DW7bWVfm.js → gitGraphDiagram-UUTBAWPF-BeLB68OO.js} +1 -1
- package/payload/frontend/dist/assets/{graph-rPoUAwm2.js → graph-DakNuFNs.js} +1 -1
- package/payload/frontend/dist/assets/{image-pt4OUNUX.js → image-BICNaNq8.js} +1 -1
- package/payload/frontend/dist/assets/{index-CpU0rt1e.js → index-Cf9Vl4GJ.js} +92 -89
- package/payload/frontend/dist/assets/{infoDiagram-42DDH7IO-C6DYDEhQ.js → infoDiagram-42DDH7IO-CAGn0b04.js} +1 -1
- package/payload/frontend/dist/assets/{ishikawaDiagram-UXIWVN3A-o3dlbDPW.js → ishikawaDiagram-UXIWVN3A-fbaDUCpd.js} +1 -1
- package/payload/frontend/dist/assets/{journeyDiagram-VCZTEJTY-ukG3M2cI.js → journeyDiagram-VCZTEJTY-ZOmjleqG.js} +1 -1
- package/payload/frontend/dist/assets/{kanban-definition-6JOO6SKY-CzFLztFd.js → kanban-definition-6JOO6SKY-BmODq4tv.js} +1 -1
- package/payload/frontend/dist/assets/{layout-C8SEMYSj.js → layout-CLfuo3Vs.js} +1 -1
- package/payload/frontend/dist/assets/{linear-DY8vPita.js → linear-csTsZ7Al.js} +1 -1
- package/payload/frontend/dist/assets/main-DtzgJZEf.css +33 -0
- package/payload/frontend/dist/assets/{main-B_ifx48h.js → main-DwDuhfcr.js} +154 -151
- package/payload/frontend/dist/assets/{min-9StlgeN8.js → min-B4B7Rr4j.js} +1 -1
- package/payload/frontend/dist/assets/{mindmap-definition-QFDTVHPH-CyJisFtS.js → mindmap-definition-QFDTVHPH-CiV2UasH.js} +1 -1
- package/payload/frontend/dist/assets/{monitoring-Bjm0etKL.js → monitoring-1_Fnxura.js} +1 -1
- package/payload/frontend/dist/assets/{notifications-DhRLCgMU.js → notifications-VJaMbzoX.js} +1 -1
- package/payload/frontend/dist/assets/{pieDiagram-DEJITSTG-DHSht7rk.js → pieDiagram-DEJITSTG-DwazVxKI.js} +1 -1
- package/payload/frontend/dist/assets/{quadrantDiagram-34T5L4WZ-92xIujrE.js → quadrantDiagram-34T5L4WZ-CAn9HHbO.js} +1 -1
- package/payload/frontend/dist/assets/{record-content-Cy_dPSdi.js → record-content-Bewq09_f.js} +1 -1
- package/payload/frontend/dist/assets/{requirementDiagram-MS252O5E-CXuOqrNd.js → requirementDiagram-MS252O5E-CFot9peV.js} +1 -1
- package/payload/frontend/dist/assets/{sankeyDiagram-XADWPNL6-DR-mjY0Y.js → sankeyDiagram-XADWPNL6-CdRX6WuA.js} +1 -1
- package/payload/frontend/dist/assets/{sequenceDiagram-FGHM5R23-DmmUpAoP.js → sequenceDiagram-FGHM5R23-vRc1a5W1.js} +1 -1
- package/payload/frontend/dist/assets/{stateDiagram-FHFEXIEX-CKoqQ0-j.js → stateDiagram-FHFEXIEX-Bxcr7s70.js} +1 -1
- package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-YGvbZNwL.js +1 -0
- package/payload/frontend/dist/assets/{status-B__OyRqS.js → status-9tZZeoV7.js} +1 -1
- package/payload/frontend/dist/assets/suiji-DX2ioZ0I.js +1 -0
- package/payload/frontend/dist/assets/{svg-BpvEgtI3.js → svg-qpyWsADE.js} +1 -1
- package/payload/frontend/dist/assets/{tabs-BjCNEXFA.js → tabs-CwPtRQY0.js} +1 -1
- package/payload/frontend/dist/assets/{timeline-definition-GMOUNBTQ-CHT2sQNz.js → timeline-definition-GMOUNBTQ-2mD2ePS6.js} +1 -1
- package/payload/frontend/dist/assets/{vennDiagram-DHZGUBPP-Bvnh5q4I.js → vennDiagram-DHZGUBPP-w4DbLykx.js} +1 -1
- package/payload/frontend/dist/assets/{wardley-RL74JXVD-DeQXKB6h.js → wardley-RL74JXVD-C3H8SQaZ.js} +1 -1
- package/payload/frontend/dist/assets/{wardleyDiagram-NUSXRM2D-jWo5oC0L.js → wardleyDiagram-NUSXRM2D-DEI0kC2c.js} +1 -1
- package/payload/frontend/dist/assets/{xychartDiagram-5P7HB3ND-Btji0cq9.js → xychartDiagram-5P7HB3ND-DDVlpQ28.js} +1 -1
- package/payload/frontend/dist/build-info.json +4 -4
- package/payload/frontend/dist/companion.html +1 -1
- package/payload/frontend/dist/index.html +3 -3
- package/payload/server/index.cjs +205 -19
- package/payload/frontend/dist/assets/channel-D7VgadXd.js +0 -1
- package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-DHRHkXVC.js +0 -1
- package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-DHRHkXVC.js +0 -1
- package/payload/frontend/dist/assets/clone-BzLTnNJj.js +0 -1
- package/payload/frontend/dist/assets/connection-ChK196PA.js +0 -12
- package/payload/frontend/dist/assets/main-C-ZLrzMh.css +0 -33
- package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-BfZc0BCX.js +0 -1
- package/payload/frontend/dist/assets/suiji-nz2Jwmpc.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
|
-
"buildId": "
|
|
4
|
-
"sourceRevision": "
|
|
3
|
+
"buildId": "20261107T223311713Z-f6afc191",
|
|
4
|
+
"sourceRevision": "f6afc191b5f9be76aa35a6ee494a0d752c21af08",
|
|
5
5
|
"sourceDirty": false,
|
|
6
|
-
"builtAt": "2026-11-
|
|
7
|
-
"contentSha256": "
|
|
6
|
+
"builtAt": "2026-11-07T22:33:11.713Z",
|
|
7
|
+
"contentSha256": "87b9fbd7d5481a672f647962e69a983022f0247ca266b3e376d83869824a342f"
|
|
8
8
|
}
|
|
@@ -8393,6 +8393,7 @@ __export(src_exports, {
|
|
|
8393
8393
|
APP_SERVER_CONFIGURATION_COMPATIBILITY: () => APP_SERVER_CONFIGURATION_COMPATIBILITY,
|
|
8394
8394
|
BACKEND_CORE_CONFIGURATION_DOMAINS: () => BACKEND_CORE_CONFIGURATION_DOMAINS,
|
|
8395
8395
|
CONFIGURATION_COMPATIBILITY: () => CONFIGURATION_COMPATIBILITY,
|
|
8396
|
+
CONFIGURATION_VERSION_MIGRATIONS: () => CONFIGURATION_VERSION_MIGRATIONS,
|
|
8396
8397
|
ConfigurationDomain: () => ConfigurationDomain,
|
|
8397
8398
|
ConfigurationError: () => ConfigurationError,
|
|
8398
8399
|
ConfigurationRuntime: () => ConfigurationRuntime,
|
|
@@ -8416,6 +8417,7 @@ __export(src_exports, {
|
|
|
8416
8417
|
importEnvironment: () => importEnvironment,
|
|
8417
8418
|
initializeConfiguration: () => initializeConfiguration,
|
|
8418
8419
|
isConfigurationContainer: () => isConfigurationContainer,
|
|
8420
|
+
migrateConfigurationDocument: () => migrateConfigurationDocument,
|
|
8419
8421
|
migrationPreview: () => migrationPreview,
|
|
8420
8422
|
parseConfigurationYaml: () => parseConfigurationYaml,
|
|
8421
8423
|
parseEnvironmentFile: () => parseEnvironmentFile,
|
|
@@ -8443,6 +8445,7 @@ __export(src_exports, {
|
|
|
8443
8445
|
validateEnvelope: () => validateEnvelope,
|
|
8444
8446
|
validateLocalRuntimeStatusReport: () => validateLocalRuntimeStatusReport,
|
|
8445
8447
|
withConfigurationArguments: () => withConfigurationArguments,
|
|
8448
|
+
withConfigurationUpgradeOwnership: () => withConfigurationUpgradeOwnership,
|
|
8446
8449
|
writeResearchMcpInstallation: () => writeResearchMcpInstallation
|
|
8447
8450
|
});
|
|
8448
8451
|
|
|
@@ -8610,7 +8613,39 @@ function registerStableConfigurationRoot(context) {
|
|
|
8610
8613
|
(0, import_node_fs5.closeSync)(registryFd);
|
|
8611
8614
|
}
|
|
8612
8615
|
}
|
|
8616
|
+
function withUpgradeGate(context, shared, run) {
|
|
8617
|
+
const directory2 = ownerDirectory(context);
|
|
8618
|
+
const fd = (0, import_node_fs5.openSync)(import_node_path7.default.join(directory2, "configuration-upgrade.lock"), import_node_fs5.constants.O_CREAT | import_node_fs5.constants.O_RDWR | import_node_fs5.constants.O_NOFOLLOW, 384);
|
|
8619
|
+
try {
|
|
8620
|
+
assertPrivateDescriptor(fd);
|
|
8621
|
+
if (!(0, import_fs_native_extensions.tryLock)(fd, 0, 0, { shared })) throw new ConfigurationError("CONFIG_UPGRADE_BUSY");
|
|
8622
|
+
return run();
|
|
8623
|
+
} finally {
|
|
8624
|
+
(0, import_node_fs5.closeSync)(fd);
|
|
8625
|
+
}
|
|
8626
|
+
}
|
|
8627
|
+
function withConfigurationUpgradeOwnership(context, run, ignoredRoles = []) {
|
|
8628
|
+
return withUpgradeGate(context, false, () => {
|
|
8629
|
+
const directory2 = ownerDirectory(context);
|
|
8630
|
+
const held = [];
|
|
8631
|
+
try {
|
|
8632
|
+
for (const file of (0, import_node_fs5.readdirSync)(directory2).filter((name) => name.endsWith(".owner.lock"))) {
|
|
8633
|
+
if (ignoredRoles.includes(file.replace(/\.owner\.lock$/, ""))) continue;
|
|
8634
|
+
const fd = (0, import_node_fs5.openSync)(import_node_path7.default.join(directory2, file), import_node_fs5.constants.O_RDWR | import_node_fs5.constants.O_NOFOLLOW);
|
|
8635
|
+
held.push(fd);
|
|
8636
|
+
assertPrivateDescriptor(fd);
|
|
8637
|
+
if (!(0, import_fs_native_extensions.tryLock)(fd)) throw new ConfigurationError("CONFIG_UPGRADE_CONSUMER_RUNNING", [file.replace(/\.owner\.lock$/, "")]);
|
|
8638
|
+
}
|
|
8639
|
+
return run();
|
|
8640
|
+
} finally {
|
|
8641
|
+
for (const fd of held) (0, import_node_fs5.closeSync)(fd);
|
|
8642
|
+
}
|
|
8643
|
+
});
|
|
8644
|
+
}
|
|
8613
8645
|
function acquireConfigurationOwner(context, role) {
|
|
8646
|
+
return withUpgradeGate(context, true, () => acquireOwner(context, role));
|
|
8647
|
+
}
|
|
8648
|
+
function acquireOwner(context, role) {
|
|
8614
8649
|
const directory2 = ownerDirectory(context);
|
|
8615
8650
|
const fd = (0, import_node_fs5.openSync)(import_node_path7.default.join(directory2, `${role}.owner.lock`), import_node_fs5.constants.O_CREAT | import_node_fs5.constants.O_RDWR | import_node_fs5.constants.O_NOFOLLOW, 384);
|
|
8616
8651
|
let closed = false;
|
|
@@ -8631,13 +8666,6 @@ function acquireConfigurationOwner(context, role) {
|
|
|
8631
8666
|
}
|
|
8632
8667
|
}
|
|
8633
8668
|
|
|
8634
|
-
// packages/config-node/src/store.ts
|
|
8635
|
-
var import_node_fs6 = require("node:fs");
|
|
8636
|
-
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
8637
|
-
var import_node_crypto3 = require("node:crypto");
|
|
8638
|
-
var import_yaml = __toESM(require_dist(), 1);
|
|
8639
|
-
var import_fs_native_extensions2 = require("fs-native-extensions");
|
|
8640
|
-
|
|
8641
8669
|
// packages/shared/src/configuration/fields.ts
|
|
8642
8670
|
var CONFIGURATION_FIELDS = [
|
|
8643
8671
|
{ "path": "screenRecording.analysis.enabled", "type": "boolean", "domain": "screenRecording.analysis", "sensitive": false, "remote": false, "apply": "reload", "description": "\u542F\u7528\u672C\u673A\u5C4F\u5E55\u4E8B\u9879\u5206\u6790\uFF0C\u9ED8\u8BA4\u5173\u95ED", "environmentKeys": [], "owner": "backend/screen-recording-analysis", "scope": "instance", "storage": "settings.yaml", "default": { "value": false }, "migrationSources": ["new-field:no-legacy-source"] },
|
|
@@ -8810,14 +8838,18 @@ var CONFIGURATION_FIELDS = [
|
|
|
8810
8838
|
];
|
|
8811
8839
|
|
|
8812
8840
|
// packages/shared/src/configuration/compatibility.ts
|
|
8841
|
+
var CONFIGURATION_SCHEMA_VERSION = 1;
|
|
8842
|
+
var CONFIGURATION_DOMAIN_VERSIONS = Object.fromEntries(
|
|
8843
|
+
[...new Set(CONFIGURATION_FIELDS.map((field) => field.domain))].map((domain) => [domain, 1])
|
|
8844
|
+
);
|
|
8813
8845
|
var CONFIGURATION_COMPATIBILITY = {
|
|
8814
8846
|
format: "runweave-yaml",
|
|
8815
|
-
schemaVersions: [
|
|
8816
|
-
domainVersions: Object.fromEntries(
|
|
8847
|
+
schemaVersions: [CONFIGURATION_SCHEMA_VERSION],
|
|
8848
|
+
domainVersions: Object.fromEntries(Object.entries(CONFIGURATION_DOMAIN_VERSIONS).map(([domain, version]) => [domain, [version]]))
|
|
8817
8849
|
};
|
|
8818
8850
|
var APP_SERVER_CONFIGURATION_COMPATIBILITY = {
|
|
8819
8851
|
...CONFIGURATION_COMPATIBILITY,
|
|
8820
|
-
domainVersions: Object.fromEntries(["appServer", "agents.codex", "agents.traex"].map((domain) => [domain, [
|
|
8852
|
+
domainVersions: Object.fromEntries(["appServer", "agents.codex", "agents.traex"].map((domain) => [domain, [CONFIGURATION_DOMAIN_VERSIONS[domain]]]))
|
|
8821
8853
|
};
|
|
8822
8854
|
function supportsConfiguration(target, value) {
|
|
8823
8855
|
if (!target || typeof target !== "object") return false;
|
|
@@ -8893,6 +8925,66 @@ function configurationPathSegment(key) {
|
|
|
8893
8925
|
return key.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
|
|
8894
8926
|
}
|
|
8895
8927
|
|
|
8928
|
+
// packages/config-node/src/version-migrations.ts
|
|
8929
|
+
var CONFIGURATION_VERSION_MIGRATIONS = [];
|
|
8930
|
+
function migrateConfigurationDocument(document) {
|
|
8931
|
+
const steps = [];
|
|
8932
|
+
const ids = /* @__PURE__ */ new Set();
|
|
8933
|
+
const edges = /* @__PURE__ */ new Set();
|
|
8934
|
+
for (const step of CONFIGURATION_VERSION_MIGRATIONS) {
|
|
8935
|
+
const edge = `${step.domain ?? "$schema"}:${step.from}`;
|
|
8936
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]+$/.test(step.id) || ids.has(step.id) || edges.has(edge) || !Number.isSafeInteger(step.from) || step.from < 1 || step.to !== step.from + 1 || step.domain !== void 0 && !Object.hasOwn(CONFIGURATION_DOMAIN_VERSIONS, step.domain) || step.to > (step.domain ? CONFIGURATION_DOMAIN_VERSIONS[step.domain] : CONFIGURATION_SCHEMA_VERSION)) {
|
|
8937
|
+
throw new ConfigurationError("CONFIG_UPGRADE_REGISTRY_INVALID");
|
|
8938
|
+
}
|
|
8939
|
+
ids.add(step.id);
|
|
8940
|
+
edges.add(edge);
|
|
8941
|
+
}
|
|
8942
|
+
const advance = (domain, target) => {
|
|
8943
|
+
const versionPath = domain ? ["domainVersions", domain] : ["schemaVersion"];
|
|
8944
|
+
let version = Number(document.getIn(versionPath) ?? 1);
|
|
8945
|
+
if (version > target) throw new ConfigurationError("CONFIG_UPGRADE_FUTURE_VERSION", [domain ?? "schemaVersion"]);
|
|
8946
|
+
while (version < target) {
|
|
8947
|
+
const step = CONFIGURATION_VERSION_MIGRATIONS.find((item) => item.domain === domain && item.from === version);
|
|
8948
|
+
if (!step) throw new ConfigurationError("CONFIG_UPGRADE_PATH_MISSING", [domain ?? "schemaVersion"]);
|
|
8949
|
+
const before = document.toJS();
|
|
8950
|
+
try {
|
|
8951
|
+
step.migrate(document);
|
|
8952
|
+
} catch {
|
|
8953
|
+
throw new ConfigurationError("CONFIG_UPGRADE_STEP_FAILED", [step.id]);
|
|
8954
|
+
}
|
|
8955
|
+
const after = document.toJS();
|
|
8956
|
+
for (const key of ["schemaVersion", "revision", "kind", "instanceId", "domainVersions", "migrations"]) {
|
|
8957
|
+
if (JSON.stringify(before[key]) !== JSON.stringify(after[key])) throw new ConfigurationError("CONFIG_UPGRADE_METADATA_CHANGED", [step.id]);
|
|
8958
|
+
}
|
|
8959
|
+
if (domain) {
|
|
8960
|
+
const strip = (value) => {
|
|
8961
|
+
const copy = structuredClone(value);
|
|
8962
|
+
const parts = domain.split(".");
|
|
8963
|
+
let parent = copy;
|
|
8964
|
+
for (const key of parts.slice(0, -1)) parent = parent[key] ?? {};
|
|
8965
|
+
delete parent[parts.at(-1)];
|
|
8966
|
+
return copy;
|
|
8967
|
+
};
|
|
8968
|
+
if (JSON.stringify(strip(before)) !== JSON.stringify(strip(after))) throw new ConfigurationError("CONFIG_UPGRADE_SCOPE_CHANGED", [step.id]);
|
|
8969
|
+
}
|
|
8970
|
+
document.setIn(versionPath, step.to);
|
|
8971
|
+
document.setIn(["migrations", `version:${step.id}`], { from: step.from, to: step.to, domain: domain ?? "$schema" });
|
|
8972
|
+
steps.push(step.id);
|
|
8973
|
+
version = step.to;
|
|
8974
|
+
}
|
|
8975
|
+
};
|
|
8976
|
+
advance(void 0, CONFIGURATION_SCHEMA_VERSION);
|
|
8977
|
+
for (const [domain, target] of Object.entries(CONFIGURATION_DOMAIN_VERSIONS)) advance(domain, target);
|
|
8978
|
+
return steps;
|
|
8979
|
+
}
|
|
8980
|
+
|
|
8981
|
+
// packages/config-node/src/store.ts
|
|
8982
|
+
var import_node_fs6 = require("node:fs");
|
|
8983
|
+
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
8984
|
+
var import_node_crypto3 = require("node:crypto");
|
|
8985
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
8986
|
+
var import_fs_native_extensions2 = require("fs-native-extensions");
|
|
8987
|
+
|
|
8896
8988
|
// packages/config-node/src/validation.ts
|
|
8897
8989
|
var import_node_path8 = __toESM(require("node:path"), 1);
|
|
8898
8990
|
var patterns = CONFIGURATION_FIELDS.map((field) => ({ field, segments: field.path.replace(/\[\]/g, ".#").split(".") }));
|
|
@@ -8912,12 +9004,14 @@ function isConfigurationContainer(key, array = false) {
|
|
|
8912
9004
|
});
|
|
8913
9005
|
}
|
|
8914
9006
|
function domainForPath(key) {
|
|
9007
|
+
const declared = Object.keys(CONFIGURATION_DOMAIN_VERSIONS).find((domain) => key === domain || key.startsWith(`${domain}.`));
|
|
9008
|
+
if (declared) return declared;
|
|
8915
9009
|
const parts = key.split(".");
|
|
8916
9010
|
return ["backend", "services", "desktop", "agents"].includes(parts[0]) ? parts.slice(0, 2).join(".") : parts[0];
|
|
8917
9011
|
}
|
|
8918
9012
|
function validateEnvelope(value, context) {
|
|
8919
9013
|
if (!isConfigurationObject(value)) throw new ConfigurationError("CONFIG_ROOT_INVALID");
|
|
8920
|
-
if (value.schemaVersion !==
|
|
9014
|
+
if (value.schemaVersion !== CONFIGURATION_SCHEMA_VERSION) throw new ConfigurationError("CONFIG_SCHEMA_UNSUPPORTED");
|
|
8921
9015
|
if (!Number.isSafeInteger(value.revision) || Number(value.revision) < 0) throw new ConfigurationError("CONFIG_REVISION_INVALID");
|
|
8922
9016
|
if (value.kind !== context.kind || value.instanceId !== context.instanceId) throw new ConfigurationError("CONFIG_IDENTITY_MISMATCH");
|
|
8923
9017
|
if (!isConfigurationObject(value.domainVersions) || !isConfigurationObject(value.migrations)) throw new ConfigurationError("CONFIG_METADATA_INVALID");
|
|
@@ -8939,7 +9033,7 @@ function validateDomains(value, context) {
|
|
|
8939
9033
|
if (["schemaVersion", "revision", "kind", "instanceId", "domainVersions", "migrations"].includes(key.split(".")[0])) continue;
|
|
8940
9034
|
const domain = domainForPath(key);
|
|
8941
9035
|
if (domain === "agents.team") continue;
|
|
8942
|
-
if (value.domainVersions[domain] !== void 0 && value.domainVersions[domain] !==
|
|
9036
|
+
if (value.domainVersions[domain] !== void 0 && value.domainVersions[domain] !== CONFIGURATION_DOMAIN_VERSIONS[domain]) {
|
|
8943
9037
|
issue(key, "CONFIG_DOMAIN_VERSION_UNSUPPORTED");
|
|
8944
9038
|
continue;
|
|
8945
9039
|
}
|
|
@@ -9014,7 +9108,7 @@ function validateDomains(value, context) {
|
|
|
9014
9108
|
}
|
|
9015
9109
|
for (const [domain, version] of Object.entries(value.domainVersions)) {
|
|
9016
9110
|
if (domain === "agents.team") continue;
|
|
9017
|
-
if (version !==
|
|
9111
|
+
if (version !== CONFIGURATION_DOMAIN_VERSIONS[domain] && !result[domain]) result[domain] = [{ path: domain, code: "CONFIG_DOMAIN_VERSION_UNSUPPORTED" }];
|
|
9018
9112
|
}
|
|
9019
9113
|
return result;
|
|
9020
9114
|
}
|
|
@@ -9119,7 +9213,7 @@ var ConfigurationStore = class {
|
|
|
9119
9213
|
(0, import_node_fs6.closeSync)(fd);
|
|
9120
9214
|
}
|
|
9121
9215
|
}
|
|
9122
|
-
publish(document, previous) {
|
|
9216
|
+
publish(document, previous, backupId) {
|
|
9123
9217
|
const source = document.toString({ lineWidth: 0 });
|
|
9124
9218
|
const checked = parseConfigurationYaml(source, this.context);
|
|
9125
9219
|
registerStableConfigurationRoot(this.context);
|
|
@@ -9129,7 +9223,7 @@ var ConfigurationStore = class {
|
|
|
9129
9223
|
(0, import_node_fs6.mkdirSync)(backupRoot, { recursive: true, mode: 448 });
|
|
9130
9224
|
const backupStat = (0, import_node_fs6.lstatSync)(backupRoot);
|
|
9131
9225
|
if (!backupStat.isDirectory() || backupStat.isSymbolicLink() || backupStat.mode & 63 || typeof process.getuid === "function" && backupStat.uid !== process.getuid()) throw new ConfigurationError("CONFIG_BACKUP_ROOT_INVALID");
|
|
9132
|
-
const backup = import_node_path9.default.join(backupRoot, `${Date.now()}-${(0, import_node_crypto3.randomUUID)()}.yaml`);
|
|
9226
|
+
const backup = import_node_path9.default.join(backupRoot, backupId ?? `${Date.now()}-${(0, import_node_crypto3.randomUUID)()}.yaml`);
|
|
9133
9227
|
const fd2 = (0, import_node_fs6.openSync)(backup, "wx", 384);
|
|
9134
9228
|
try {
|
|
9135
9229
|
(0, import_node_fs6.writeFileSync)(fd2, previous);
|
|
@@ -9176,7 +9270,7 @@ var ConfigurationStore = class {
|
|
|
9176
9270
|
const segments = configurationPathSegments(key);
|
|
9177
9271
|
if (!segments.length || segments.some((part) => !part || unsafeKeys.has(part))) throw new ConfigurationError("CONFIG_FIELD_INVALID");
|
|
9178
9272
|
const domain = domainForPath(key);
|
|
9179
|
-
if (current.value.domainVersions[domain] !== void 0 && current.value.domainVersions[domain] !==
|
|
9273
|
+
if (current.value.domainVersions[domain] !== void 0 && current.value.domainVersions[domain] !== CONFIGURATION_DOMAIN_VERSIONS[domain]) throw new ConfigurationError("CONFIG_DOMAIN_VERSION_UNSUPPORTED", [domain]);
|
|
9180
9274
|
const field = fieldForPath(key);
|
|
9181
9275
|
if (!field && !(isConfigurationObject(value) && isConfigurationContainer(key)) && !(Array.isArray(value) && isConfigurationContainer(key, true)) && !(value === null && (isConfigurationContainer(key) || isConfigurationContainer(key, true)))) throw new ConfigurationError("CONFIG_FIELD_UNKNOWN", [key]);
|
|
9182
9276
|
if (options.remote && (!field || !field.remote)) throw new ConfigurationError("CONFIG_FIELD_FORBIDDEN", [key]);
|
|
@@ -9186,7 +9280,7 @@ var ConfigurationStore = class {
|
|
|
9186
9280
|
for (const segment of segments) target.push((0, import_yaml.isSeq)(current.document.getIn(target, true)) && /^\d+$/.test(segment) ? Number(segment) : segment);
|
|
9187
9281
|
if (!field && value === null) current.document.deleteIn(target);
|
|
9188
9282
|
else current.document.setIn(target, value);
|
|
9189
|
-
current.document.setIn(["domainVersions", domain],
|
|
9283
|
+
current.document.setIn(["domainVersions", domain], CONFIGURATION_DOMAIN_VERSIONS[domain]);
|
|
9190
9284
|
domains.add(domain);
|
|
9191
9285
|
}
|
|
9192
9286
|
const revision = Math.max(current.value.revision, options.minimumRevision ?? 0) + 1;
|
|
@@ -9224,7 +9318,7 @@ var ConfigurationStore = class {
|
|
|
9224
9318
|
const source = readPrivateFile(this.file);
|
|
9225
9319
|
const { value } = parseYamlDocument(source);
|
|
9226
9320
|
if (!isConfigurationObject(value) || !Number.isSafeInteger(value.schemaVersion) || Number(value.schemaVersion) < 1) throw new ConfigurationError("CONFIG_SCHEMA_INVALID");
|
|
9227
|
-
validateEnvelope({ ...value, schemaVersion:
|
|
9321
|
+
validateEnvelope({ ...value, schemaVersion: CONFIGURATION_SCHEMA_VERSION }, this.context);
|
|
9228
9322
|
const backup = this.readBackup(id);
|
|
9229
9323
|
const before = new Map(flattenConfiguration(value));
|
|
9230
9324
|
const after = new Map(flattenConfiguration(backup.value));
|
|
@@ -9243,6 +9337,89 @@ var ConfigurationStore = class {
|
|
|
9243
9337
|
previewRestore(id) {
|
|
9244
9338
|
return this.prepareRestore(id).preview;
|
|
9245
9339
|
}
|
|
9340
|
+
/** Upgrade control plane only; business readers must use read(). */
|
|
9341
|
+
readUpgradeSource() {
|
|
9342
|
+
assertPrivateDirectory(this.context.configRoot);
|
|
9343
|
+
const source = readPrivateFile(this.file);
|
|
9344
|
+
const { document, value } = parseYamlDocument(source);
|
|
9345
|
+
if (!isConfigurationObject(value) || !Number.isSafeInteger(value.schemaVersion) || Number(value.schemaVersion) < 1) throw new ConfigurationError("CONFIG_SCHEMA_INVALID");
|
|
9346
|
+
validateEnvelope({ ...value, schemaVersion: CONFIGURATION_SCHEMA_VERSION }, this.context);
|
|
9347
|
+
return { source, document, value, digest: (0, import_node_crypto3.createHash)("sha256").update(source).digest("hex") };
|
|
9348
|
+
}
|
|
9349
|
+
prepareUpgrade() {
|
|
9350
|
+
const { source, document, value, digest } = this.readUpgradeSource();
|
|
9351
|
+
const original = value;
|
|
9352
|
+
const expectedDigest = digest;
|
|
9353
|
+
const steps = migrateConfigurationDocument(document);
|
|
9354
|
+
const next = parseConfigurationYaml(document.toString({ lineWidth: 0 }), this.context);
|
|
9355
|
+
const failures = Object.values(next.issues).flat();
|
|
9356
|
+
if (failures.length) throw new ConfigurationError("CONFIG_VALIDATION_FAILED", failures.map((issue) => issue.path));
|
|
9357
|
+
const before = new Map(flattenConfiguration(original));
|
|
9358
|
+
const after = new Map(flattenConfiguration(next.value));
|
|
9359
|
+
const changedFields = [.../* @__PURE__ */ new Set([...before.keys(), ...after.keys()])].filter((key) => JSON.stringify(before.get(key)) !== JSON.stringify(after.get(key))).sort();
|
|
9360
|
+
const preview = {
|
|
9361
|
+
expectedRevision: original.revision,
|
|
9362
|
+
expectedDigest,
|
|
9363
|
+
source: { schemaVersion: original.schemaVersion, domainVersions: original.domainVersions },
|
|
9364
|
+
target: { schemaVersion: next.value.schemaVersion, domainVersions: { ...CONFIGURATION_DOMAIN_VERSIONS, ...next.value.domainVersions } },
|
|
9365
|
+
steps,
|
|
9366
|
+
changedFields,
|
|
9367
|
+
changed: changedFields.length > 0
|
|
9368
|
+
};
|
|
9369
|
+
return { source, document, preview };
|
|
9370
|
+
}
|
|
9371
|
+
previewUpgrade() {
|
|
9372
|
+
return this.prepareUpgrade().preview;
|
|
9373
|
+
}
|
|
9374
|
+
recordUpgrade(value) {
|
|
9375
|
+
const file = import_node_path9.default.join(this.context.configRoot, "config-upgrade.json");
|
|
9376
|
+
const temporary = `${file}.${(0, import_node_crypto3.randomUUID)()}.tmp`;
|
|
9377
|
+
const fd = (0, import_node_fs6.openSync)(temporary, "wx", 384);
|
|
9378
|
+
try {
|
|
9379
|
+
(0, import_node_fs6.writeFileSync)(fd, JSON.stringify(value, null, 2) + "\n");
|
|
9380
|
+
(0, import_node_fs6.fsyncSync)(fd);
|
|
9381
|
+
} finally {
|
|
9382
|
+
(0, import_node_fs6.closeSync)(fd);
|
|
9383
|
+
}
|
|
9384
|
+
try {
|
|
9385
|
+
(0, import_node_fs6.renameSync)(temporary, file);
|
|
9386
|
+
const parent = (0, import_node_fs6.openSync)(this.context.configRoot, "r");
|
|
9387
|
+
try {
|
|
9388
|
+
(0, import_node_fs6.fsyncSync)(parent);
|
|
9389
|
+
} finally {
|
|
9390
|
+
(0, import_node_fs6.closeSync)(parent);
|
|
9391
|
+
}
|
|
9392
|
+
} finally {
|
|
9393
|
+
if ((0, import_node_fs6.existsSync)(temporary)) (0, import_node_fs6.unlinkSync)(temporary);
|
|
9394
|
+
}
|
|
9395
|
+
}
|
|
9396
|
+
upgrade(expected) {
|
|
9397
|
+
return this.locked(() => {
|
|
9398
|
+
const { source, document, preview } = this.prepareUpgrade();
|
|
9399
|
+
if (preview.expectedRevision !== expected.revision || preview.expectedDigest !== expected.digest) throw new ConfigurationError("CONFIG_REVISION_CONFLICT");
|
|
9400
|
+
if (!preview.changed) {
|
|
9401
|
+
const receiptFile = import_node_path9.default.join(this.context.configRoot, "config-upgrade.json");
|
|
9402
|
+
if ((0, import_node_fs6.existsSync)(receiptFile)) {
|
|
9403
|
+
const receipt = JSON.parse(readPrivateFile(receiptFile));
|
|
9404
|
+
if (isConfigurationObject(receipt) && receipt.phase === "prepared" && receipt.plannedDigest === expected.digest)
|
|
9405
|
+
this.recordUpgrade({ ...receipt, phase: "committed", savedRevision: expected.revision, digest: expected.digest });
|
|
9406
|
+
}
|
|
9407
|
+
return { ...preview, savedRevision: expected.revision, digest: expected.digest };
|
|
9408
|
+
}
|
|
9409
|
+
return withConfigurationUpgradeOwnership(this.context, () => {
|
|
9410
|
+
const revision = expected.revision + 1;
|
|
9411
|
+
if (!Number.isSafeInteger(revision)) throw new ConfigurationError("CONFIG_REVISION_INVALID");
|
|
9412
|
+
document.set("revision", revision);
|
|
9413
|
+
const backupId = `${Date.now()}-${(0, import_node_crypto3.randomUUID)()}.yaml`;
|
|
9414
|
+
const plannedDigest = (0, import_node_crypto3.createHash)("sha256").update(document.toString({ lineWidth: 0 })).digest("hex");
|
|
9415
|
+
this.recordUpgrade({ ...preview, backupId, plannedDigest, phase: "prepared" });
|
|
9416
|
+
const next = this.publish(document, source, backupId);
|
|
9417
|
+
const result = { ...preview, savedRevision: next.value.revision, digest: next.digest, backupId };
|
|
9418
|
+
this.recordUpgrade({ ...result, phase: "committed" });
|
|
9419
|
+
return result;
|
|
9420
|
+
});
|
|
9421
|
+
});
|
|
9422
|
+
}
|
|
9246
9423
|
restoreBackup(id, expected) {
|
|
9247
9424
|
return this.locked(() => {
|
|
9248
9425
|
const { source, backup, preview } = this.prepareRestore(id);
|
|
@@ -9287,7 +9464,7 @@ var ConfigurationStore = class {
|
|
|
9287
9464
|
}
|
|
9288
9465
|
};
|
|
9289
9466
|
function emptyConfiguration(context) {
|
|
9290
|
-
return { schemaVersion:
|
|
9467
|
+
return { schemaVersion: CONFIGURATION_SCHEMA_VERSION, revision: 0, kind: context.kind, instanceId: context.instanceId, domainVersions: {}, migrations: {} };
|
|
9291
9468
|
}
|
|
9292
9469
|
function setConfigurationValue(target, key, value) {
|
|
9293
9470
|
const parts = configurationPathSegments(key);
|
|
@@ -9301,7 +9478,7 @@ function setConfigurationValue(target, key, value) {
|
|
|
9301
9478
|
const last = parts.at(-1);
|
|
9302
9479
|
if (unsafeKeys.has(last)) throw new ConfigurationError("CONFIG_FIELD_INVALID");
|
|
9303
9480
|
current[last] = value;
|
|
9304
|
-
target.domainVersions[domainForPath(key)] = 1;
|
|
9481
|
+
target.domainVersions[domainForPath(key)] = CONFIGURATION_DOMAIN_VERSIONS[domainForPath(key)] ?? 1;
|
|
9305
9482
|
}
|
|
9306
9483
|
|
|
9307
9484
|
// packages/config-node/src/runtime.ts
|
|
@@ -179,10 +179,34 @@ function decodeCursor(value, runId, collection) {
|
|
|
179
179
|
throw new Error("evolution_artifact_query_invalid");
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
// backend/src/evolution/repository-store.ts
|
|
183
|
+
var import_node_crypto = require("node:crypto");
|
|
184
|
+
function repositoryRegistrationVersion(repository) {
|
|
185
|
+
return (0, import_node_crypto.createHash)("sha256").update(JSON.stringify(repository)).digest("hex");
|
|
186
|
+
}
|
|
187
|
+
function repositoryRegistrationRemoved(repository) {
|
|
188
|
+
return repository.registrationHistory?.at(-1)?.action === "removed";
|
|
189
|
+
}
|
|
190
|
+
|
|
182
191
|
// backend/src/evolution/storage/repository-database.ts
|
|
183
192
|
function initializeEvolutionRepositories(database2) {
|
|
184
193
|
database2.exec(`
|
|
185
194
|
CREATE TABLE IF NOT EXISTS evolution_repositories(repository_id TEXT PRIMARY KEY, payload_json TEXT NOT NULL);
|
|
195
|
+
CREATE TABLE IF NOT EXISTS evolution_repository_removals(repository_id TEXT PRIMARY KEY, payload_json TEXT NOT NULL);
|
|
196
|
+
CREATE TRIGGER IF NOT EXISTS evolution_repository_removed_insert
|
|
197
|
+
BEFORE INSERT ON evolution_repositories
|
|
198
|
+
WHEN EXISTS(SELECT 1 FROM evolution_repository_removals WHERE repository_id=NEW.repository_id)
|
|
199
|
+
BEGIN SELECT RAISE(ABORT, 'evolution_repository_removed'); END;
|
|
200
|
+
CREATE TRIGGER IF NOT EXISTS evolution_repository_removed_update
|
|
201
|
+
BEFORE UPDATE ON evolution_repositories
|
|
202
|
+
WHEN EXISTS(SELECT 1 FROM evolution_repository_removals WHERE repository_id=NEW.repository_id)
|
|
203
|
+
BEGIN SELECT RAISE(ABORT, 'evolution_repository_removed'); END;
|
|
204
|
+
CREATE TRIGGER IF NOT EXISTS evolution_repository_removal_immutable_update
|
|
205
|
+
BEFORE UPDATE ON evolution_repository_removals
|
|
206
|
+
BEGIN SELECT RAISE(ABORT, 'evolution_repository_removal_immutable'); END;
|
|
207
|
+
CREATE TRIGGER IF NOT EXISTS evolution_repository_removal_immutable_delete
|
|
208
|
+
BEFORE DELETE ON evolution_repository_removals
|
|
209
|
+
BEGIN SELECT RAISE(ABORT, 'evolution_repository_removal_immutable'); END;
|
|
186
210
|
CREATE TABLE IF NOT EXISTS evolution_repository_bindings(
|
|
187
211
|
kind TEXT NOT NULL, id TEXT NOT NULL, payload_json TEXT NOT NULL, PRIMARY KEY(kind,id));
|
|
188
212
|
CREATE TABLE IF NOT EXISTS evolution_topic_lineage(
|
|
@@ -206,7 +230,7 @@ function executeRepositoryCommand(database2, foundation, command) {
|
|
|
206
230
|
switch (command.op) {
|
|
207
231
|
case "list":
|
|
208
232
|
return database2.prepare(
|
|
209
|
-
"SELECT payload_json FROM evolution_repositories ORDER BY repository_id"
|
|
233
|
+
"SELECT repository_id, payload_json FROM evolution_repositories UNION ALL SELECT repository_id, payload_json FROM evolution_repository_removals ORDER BY repository_id"
|
|
210
234
|
).all().map((row) => JSON.parse(row.payload_json));
|
|
211
235
|
case "put": {
|
|
212
236
|
return database2.transaction(() => {
|
|
@@ -216,6 +240,10 @@ function executeRepositoryCommand(database2, foundation, command) {
|
|
|
216
240
|
const previous = row ? JSON.parse(row.payload_json) : null;
|
|
217
241
|
if (previous && previous.commonDirectory !== command.repository.commonDirectory)
|
|
218
242
|
throw new Error("evolution_repository_identity_conflict");
|
|
243
|
+
if (database2.prepare(
|
|
244
|
+
"SELECT 1 FROM evolution_repository_removals WHERE repository_id = ?"
|
|
245
|
+
).get(command.repository.repositoryId))
|
|
246
|
+
throw new Error("evolution_repository_removed");
|
|
219
247
|
const repository = {
|
|
220
248
|
...command.repository,
|
|
221
249
|
paths: [
|
|
@@ -237,6 +265,35 @@ function executeRepositoryCommand(database2, foundation, command) {
|
|
|
237
265
|
return true;
|
|
238
266
|
}).immediate();
|
|
239
267
|
}
|
|
268
|
+
case "remove":
|
|
269
|
+
return database2.transaction(() => {
|
|
270
|
+
const row = database2.prepare(
|
|
271
|
+
"SELECT payload_json FROM evolution_repositories WHERE repository_id = ? UNION ALL SELECT payload_json FROM evolution_repository_removals WHERE repository_id = ?"
|
|
272
|
+
).get(command.repositoryId, command.repositoryId);
|
|
273
|
+
if (!row) throw new Error("evolution_repository_not_found");
|
|
274
|
+
const previous = JSON.parse(row.payload_json);
|
|
275
|
+
if (repositoryRegistrationVersion(previous) !== command.expectedRegistrationVersion)
|
|
276
|
+
throw new Error("evolution_repository_registration_conflict");
|
|
277
|
+
if (repositoryRegistrationRemoved(previous)) return previous;
|
|
278
|
+
const repository = {
|
|
279
|
+
...previous,
|
|
280
|
+
registrationHistory: [
|
|
281
|
+
...previous.registrationHistory ?? [],
|
|
282
|
+
{
|
|
283
|
+
action: "removed",
|
|
284
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
285
|
+
reason: command.reason
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
};
|
|
289
|
+
database2.prepare(
|
|
290
|
+
"INSERT INTO evolution_repository_removals(repository_id, payload_json) VALUES (?, ?)"
|
|
291
|
+
).run(command.repositoryId, JSON.stringify(repository));
|
|
292
|
+
database2.prepare(
|
|
293
|
+
"DELETE FROM evolution_repositories WHERE repository_id = ?"
|
|
294
|
+
).run(command.repositoryId);
|
|
295
|
+
return repository;
|
|
296
|
+
}).immediate();
|
|
240
297
|
case "attribution":
|
|
241
298
|
return readRepositoryAttribution(database2, command.kind, command.id) ?? null;
|
|
242
299
|
case "batch-get": {
|