@swarmvaultai/engine 3.16.0 → 3.16.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.
Files changed (123) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.js +36 -12
  3. package/package.json +3 -3
  4. package/dist/chunk-2CH2WWS4.js +0 -1359
  5. package/dist/chunk-2PN46RDI.js +0 -26846
  6. package/dist/chunk-333AMRSV.js +0 -1056
  7. package/dist/chunk-3GVEUYQZ.js +0 -1641
  8. package/dist/chunk-4MSSM2GH.js +0 -1476
  9. package/dist/chunk-563TZ4TZ.js +0 -26573
  10. package/dist/chunk-5GEPTIZE.js +0 -26010
  11. package/dist/chunk-5HNZ2WQI.js +0 -1341
  12. package/dist/chunk-5Q4IV4O3.js +0 -1336
  13. package/dist/chunk-6MO57J5C.js +0 -988
  14. package/dist/chunk-6UPHDGEB.js +0 -1073
  15. package/dist/chunk-75BU5TQ6.js +0 -1690
  16. package/dist/chunk-7O2HJSWQ.js +0 -1686
  17. package/dist/chunk-7QHDATCQ.js +0 -1673
  18. package/dist/chunk-B3FC4J3P.js +0 -1214
  19. package/dist/chunk-BTWPJEP2.js +0 -1421
  20. package/dist/chunk-CG67P2HB.js +0 -1420
  21. package/dist/chunk-CSPDMCON.js +0 -26846
  22. package/dist/chunk-CVFY54CF.js +0 -24893
  23. package/dist/chunk-CWLDFLH2.js +0 -1163
  24. package/dist/chunk-DAJAZPPO.js +0 -26865
  25. package/dist/chunk-EEWB4WGH.js +0 -1056
  26. package/dist/chunk-EXD4RWT3.js +0 -1131
  27. package/dist/chunk-F7HZZ3VM.js +0 -931
  28. package/dist/chunk-FD3LJQ4T.js +0 -1216
  29. package/dist/chunk-G2TH6ZTA.js +0 -1468
  30. package/dist/chunk-H3CDZYRE.js +0 -1701
  31. package/dist/chunk-HFU5S5NO.js +0 -838
  32. package/dist/chunk-HKU2T5JX.js +0 -25213
  33. package/dist/chunk-HOJ7NSYC.js +0 -937
  34. package/dist/chunk-HRRPWXRZ.js +0 -1335
  35. package/dist/chunk-HW72C7O2.js +0 -1690
  36. package/dist/chunk-IAEYFTUS.js +0 -1159
  37. package/dist/chunk-IHMJCCXR.js +0 -1146
  38. package/dist/chunk-JJDJF2P3.js +0 -27012
  39. package/dist/chunk-JTRE7C7P.js +0 -26062
  40. package/dist/chunk-L7DKPPV4.js +0 -27339
  41. package/dist/chunk-LEUV6TWJ.js +0 -1131
  42. package/dist/chunk-MB7HPUTR.js +0 -1364
  43. package/dist/chunk-MZSUYTSL.js +0 -998
  44. package/dist/chunk-N56FAH4N.js +0 -1404
  45. package/dist/chunk-NCSZ4AKP.js +0 -1057
  46. package/dist/chunk-NECZ4MUE.js +0 -1416
  47. package/dist/chunk-NHGS4LOI.js +0 -1346
  48. package/dist/chunk-NUWZUYE7.js +0 -1701
  49. package/dist/chunk-OK5752AP.js +0 -1325
  50. package/dist/chunk-QMW7OISM.js +0 -1063
  51. package/dist/chunk-RN56HUXA.js +0 -26972
  52. package/dist/chunk-RSQRF4FV.js +0 -1424
  53. package/dist/chunk-S2E65WRI.js +0 -26062
  54. package/dist/chunk-SRHM3HP4.js +0 -944
  55. package/dist/chunk-U7JO257M.js +0 -25017
  56. package/dist/chunk-UQCF65BN.js +0 -1623
  57. package/dist/chunk-USSP4GVB.js +0 -25064
  58. package/dist/chunk-V7KX3AQD.js +0 -26010
  59. package/dist/chunk-WOA5LSNB.js +0 -26559
  60. package/dist/chunk-WWP3VPEJ.js +0 -26080
  61. package/dist/chunk-YFKWMXJ6.js +0 -26066
  62. package/dist/chunk-Z552HHPV.js +0 -26846
  63. package/dist/chunk-ZQ5T64AR.js +0 -1365
  64. package/dist/memory-A4VPLUBA.js +0 -32
  65. package/dist/memory-DNSQCDHC.js +0 -32
  66. package/dist/memory-ECS3TSGC.js +0 -32
  67. package/dist/memory-FVIBFROA.js +0 -32
  68. package/dist/memory-G6I3DBW4.js +0 -32
  69. package/dist/memory-HE6VWUPV.js +0 -32
  70. package/dist/memory-HEA7XNKB.js +0 -32
  71. package/dist/memory-JRYTVHNH.js +0 -32
  72. package/dist/memory-K3NL5E3K.js +0 -32
  73. package/dist/memory-KANI73CX.js +0 -32
  74. package/dist/memory-KI5G2A4C.js +0 -32
  75. package/dist/memory-PK55JUKG.js +0 -32
  76. package/dist/memory-PK5JJNAG.js +0 -32
  77. package/dist/memory-QCVKS3H4.js +0 -32
  78. package/dist/memory-SAQPBIB4.js +0 -32
  79. package/dist/memory-SVGRP5KS.js +0 -32
  80. package/dist/memory-TQ46BGCI.js +0 -32
  81. package/dist/memory-YKQWWIVY.js +0 -32
  82. package/dist/memory-Z7BP5OSC.js +0 -32
  83. package/dist/registry-2QC3VN7M.js +0 -12
  84. package/dist/registry-2REAPKPO.js +0 -12
  85. package/dist/registry-2XHXZDGH.js +0 -12
  86. package/dist/registry-4C55ZCPL.js +0 -12
  87. package/dist/registry-4QRMVAHX.js +0 -12
  88. package/dist/registry-5SYH3Y3U.js +0 -12
  89. package/dist/registry-6KZMA3XM.js +0 -12
  90. package/dist/registry-7QACDJQQ.js +0 -12
  91. package/dist/registry-B7UXRBW3.js +0 -12
  92. package/dist/registry-FKEREVDO.js +0 -12
  93. package/dist/registry-FLSGGY2R.js +0 -12
  94. package/dist/registry-G7NSRYCO.js +0 -12
  95. package/dist/registry-GH4O3A7H.js +0 -12
  96. package/dist/registry-IBH6K2KK.js +0 -12
  97. package/dist/registry-ILDEBNCW.js +0 -12
  98. package/dist/registry-JFEW5RUP.js +0 -12
  99. package/dist/registry-JQYQOZYN.js +0 -12
  100. package/dist/registry-JR5WY22P.js +0 -12
  101. package/dist/registry-KLO5YIHP.js +0 -12
  102. package/dist/registry-KVJAO5DF.js +0 -12
  103. package/dist/registry-MYJX6AEE.js +0 -12
  104. package/dist/registry-NBLIJHZT.js +0 -12
  105. package/dist/registry-NLRWSN5J.js +0 -12
  106. package/dist/registry-NMXDBYIZ.js +0 -12
  107. package/dist/registry-OUB6W3LM.js +0 -12
  108. package/dist/registry-P5KRT66L.js +0 -12
  109. package/dist/registry-PGZWRXMD.js +0 -12
  110. package/dist/registry-QAG2ZYH3.js +0 -12
  111. package/dist/registry-SUXWCWB4.js +0 -12
  112. package/dist/registry-SYCRRA65.js +0 -12
  113. package/dist/registry-TYROWPR5.js +0 -12
  114. package/dist/registry-U23ML76I.js +0 -12
  115. package/dist/registry-U76DBOV3.js +0 -12
  116. package/dist/registry-UA42LQUQ.js +0 -12
  117. package/dist/registry-W6ZFRI73.js +0 -12
  118. package/dist/registry-X5PMZTZY.js +0 -12
  119. package/dist/registry-XIL5F33J.js +0 -12
  120. package/dist/registry-XOPLQNZY.js +0 -12
  121. package/dist/registry-YDXVCE4Q.js +0 -12
  122. package/dist/registry-YGVTLIZH.js +0 -12
  123. package/dist/registry-ZNW3FDED.js +0 -12
package/dist/index.d.ts CHANGED
@@ -1738,7 +1738,10 @@ interface ProviderConfigRemoveResult {
1738
1738
  providerId: string;
1739
1739
  configPath: string;
1740
1740
  removed: boolean;
1741
+ fallbackProviderId: string | null;
1741
1742
  updatedTasks: ProviderTaskKey[];
1743
+ reassignedTasks: ProviderTaskKey[];
1744
+ clearedTasks: ProviderTaskKey[];
1742
1745
  }
1743
1746
  interface ManagedSourceAddOptions {
1744
1747
  compile?: boolean;
package/dist/index.js CHANGED
@@ -5510,7 +5510,7 @@ import path12 from "path";
5510
5510
  import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
5511
5511
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5512
5512
  import { z } from "zod";
5513
- var SERVER_VERSION = "3.16.0";
5513
+ var SERVER_VERSION = "3.16.1";
5514
5514
  var codeLanguageSchema = z.enum([
5515
5515
  "javascript",
5516
5516
  "jsx",
@@ -6438,6 +6438,12 @@ var PROVIDER_TASK_KEYS = [
6438
6438
  "embeddingProvider",
6439
6439
  "audioProvider"
6440
6440
  ];
6441
+ var REQUIRED_PROVIDER_TASK_KEYS = /* @__PURE__ */ new Set([
6442
+ "compileProvider",
6443
+ "queryProvider",
6444
+ "lintProvider",
6445
+ "visionProvider"
6446
+ ]);
6441
6447
  async function loadRawConfig(rootDir) {
6442
6448
  await initWorkspace(rootDir);
6443
6449
  const { paths } = await loadVaultConfig(rootDir);
@@ -6538,24 +6544,42 @@ async function removeProviderConfig(options) {
6538
6544
  const tasks = ensureTasks(raw);
6539
6545
  const removed = Boolean(providers[options.providerId]);
6540
6546
  delete providers[options.providerId];
6547
+ if (options.fallbackProviderId && !providers[options.fallbackProviderId]) {
6548
+ throw new Error(`Provider ${options.fallbackProviderId} is not configured; cannot reassign tasks to it.`);
6549
+ }
6541
6550
  const fallbackProviderId = options.fallbackProviderId ?? (providers.local ? "local" : Object.keys(providers).sort((left, right) => left.localeCompare(right))[0]);
6542
- const updatedTasks = [];
6543
- for (const taskKey of PROVIDER_TASK_KEYS) {
6544
- if (tasks[taskKey] === options.providerId) {
6545
- if (!fallbackProviderId) {
6546
- delete tasks[taskKey];
6547
- } else {
6548
- tasks[taskKey] = fallbackProviderId;
6549
- }
6550
- updatedTasks.push(taskKey);
6551
+ const assignedTaskKeys = PROVIDER_TASK_KEYS.filter((taskKey) => tasks[taskKey] === options.providerId);
6552
+ if (!fallbackProviderId) {
6553
+ const orphanedRequired = assignedTaskKeys.filter((taskKey) => REQUIRED_PROVIDER_TASK_KEYS.has(taskKey));
6554
+ if (orphanedRequired.length) {
6555
+ throw new Error(
6556
+ `Cannot remove provider ${options.providerId}; tasks ${orphanedRequired.join(", ")} would have no provider. Configure another provider first or pass a fallback.`
6557
+ );
6551
6558
  }
6552
6559
  }
6553
- await writeJsonFile(configPath, raw);
6560
+ const reassignedTasks = [];
6561
+ const clearedTasks = [];
6562
+ for (const taskKey of assignedTaskKeys) {
6563
+ if (!fallbackProviderId) {
6564
+ delete tasks[taskKey];
6565
+ clearedTasks.push(taskKey);
6566
+ } else {
6567
+ tasks[taskKey] = fallbackProviderId;
6568
+ reassignedTasks.push(taskKey);
6569
+ }
6570
+ }
6571
+ const updatedTasks = assignedTaskKeys;
6572
+ if (removed || updatedTasks.length) {
6573
+ await writeJsonFile(configPath, raw);
6574
+ }
6554
6575
  return {
6555
6576
  providerId: options.providerId,
6556
6577
  configPath,
6557
6578
  removed,
6558
- updatedTasks
6579
+ fallbackProviderId: fallbackProviderId ?? null,
6580
+ updatedTasks,
6581
+ reassignedTasks,
6582
+ clearedTasks
6559
6583
  };
6560
6584
  }
6561
6585
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/engine",
3
- "version": "3.16.0",
3
+ "version": "3.16.1",
4
4
  "description": "Core engine for SwarmVault: ingest, compile, query, lint, and provider abstractions.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "chokidar": "^4.0.3",
56
56
  "compromise": "^14.14.4",
57
57
  "csv-parse": "^6.2.1",
58
- "fast-xml-parser": "^5.5.11",
58
+ "fast-xml-parser": "^5.8.0",
59
59
  "fflate": "^0.8.2",
60
60
  "graphology": "^0.26.0",
61
61
  "graphology-communities-louvain": "^2.0.2",
@@ -94,9 +94,9 @@
94
94
  "@types/node": "^24.6.0",
95
95
  "@types/turndown": "^5.0.5",
96
96
  "graphology-types": "^0.24.8",
97
- "tsup": "^8.5.0",
98
97
  "tree-sitter-julia": "0.23.1",
99
98
  "tree-sitter-systemverilog": "0.3.1",
99
+ "tsup": "^8.5.0",
100
100
  "vitest": "^3.2.4"
101
101
  }
102
102
  }