opencode-swarm 7.181.2 → 7.181.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.
Files changed (89) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/cli/{coder-settlement-993vdsd2.js → coder-settlement-vbs5rj3z.js} +10 -10
  4. package/dist/cli/{config-doctor-nr27vfv6.js → config-doctor-3cb51z08.js} +2 -2
  5. package/dist/cli/{core-t3tg4397.js → core-0h7y8z0s.js} +2 -2
  6. package/dist/cli/{curation-policy-m3x9mkj9.js → curation-policy-r4dkajw9.js} +4 -4
  7. package/dist/cli/{curator-gk392717.js → curator-9sn55eyk.js} +34 -34
  8. package/dist/cli/curator-drift-d4jkgrba.js +37 -0
  9. package/dist/cli/{curator-llm-factory-n01we8pa.js → curator-llm-factory-zwc2gpe7.js} +34 -34
  10. package/dist/cli/{evidence-summary-service-fkvj8ct1.js → evidence-summary-service-sb5seqs3.js} +14 -14
  11. package/dist/cli/{gate-evidence-1n6zffzb.js → gate-evidence-emq2y7kz.js} +5 -5
  12. package/dist/cli/{guardrail-explain-81jvm99e.js → guardrail-explain-a3hcrpwv.js} +35 -35
  13. package/dist/cli/{guardrail-log-mw9x5j8g.js → guardrail-log-ftv03v4x.js} +6 -6
  14. package/dist/cli/{guardrail-reset-6thsn6ad.js → guardrail-reset-d6qmnvff.js} +34 -34
  15. package/dist/cli/{hive-promoter-pym6se37.js → hive-promoter-pktjn46n.js} +34 -34
  16. package/dist/cli/{index-m65tnv4j.js → index-01r2wrwa.js} +1 -1
  17. package/dist/cli/{index-txx2mrsk.js → index-0ea0c676.js} +25 -11
  18. package/dist/cli/{index-gmqf6bjj.js → index-12fxtcce.js} +36 -36
  19. package/dist/cli/{index-cr61qv27.js → index-1epynxc4.js} +2 -2
  20. package/dist/cli/{index-1wpnt86a.js → index-1msszzg2.js} +5 -5
  21. package/dist/cli/{index-12ewkms0.js → index-23mdeh2a.js} +1 -1
  22. package/dist/cli/{index-5hxv1er2.js → index-3ga3ts3h.js} +56 -3
  23. package/dist/cli/{index-38cfx8g8.js → index-427x3j6p.js} +2 -2
  24. package/dist/cli/{index-wph45kyb.js → index-4qpz7mpn.js} +4 -4
  25. package/dist/cli/{index-7nr9p5bd.js → index-54sd9bbn.js} +5 -5
  26. package/dist/cli/{index-fmhd3zc8.js → index-68ben2q8.js} +2 -2
  27. package/dist/cli/{index-n5a9dq5s.js → index-6jrn46zy.js} +1 -1
  28. package/dist/cli/{index-ernt0wrg.js → index-9eg8f4zm.js} +4306 -1504
  29. package/dist/cli/{index-hbe56wtn.js → index-9s2rp2j5.js} +2 -2
  30. package/dist/cli/{index-gc6h1fmf.js → index-a2hvmc3a.js} +1 -1
  31. package/dist/cli/{index-ea9fk6v0.js → index-ap6hs8fj.js} +1 -1
  32. package/dist/cli/{index-92m05mew.js → index-by9wfeja.js} +1 -1
  33. package/dist/cli/{index-et28q7cp.js → index-dkprb20b.js} +1 -1
  34. package/dist/cli/{index-qw9aqays.js → index-dwc1wztn.js} +6 -6
  35. package/dist/cli/{index-0h39trak.js → index-enmvd9ap.js} +1 -1
  36. package/dist/cli/{index-kzmd4gs7.js → index-epq8am78.js} +1 -1
  37. package/dist/cli/{index-pqtmzee6.js → index-fsye9ygy.js} +4 -4
  38. package/dist/cli/{index-5q3xsqwm.js → index-gtpq64q7.js} +3 -3
  39. package/dist/cli/{index-5v8zws0s.js → index-hqa71xfm.js} +140 -9
  40. package/dist/cli/{index-5zy5k5w0.js → index-j97nc02q.js} +4 -4
  41. package/dist/cli/{index-bdpgfep1.js → index-jrxrjz89.js} +1 -1
  42. package/dist/cli/{index-516j9vsk.js → index-kkrbybgt.js} +27 -2
  43. package/dist/cli/{index-6mwha20t.js → index-mkpdcbye.js} +3 -3
  44. package/dist/cli/{index-6x36hhd3.js → index-myacmqmf.js} +34 -34
  45. package/dist/cli/{index-t93cp2tz.js → index-nw3z614g.js} +4 -4
  46. package/dist/cli/{index-ehvkz2zv.js → index-r4vve32m.js} +7 -7
  47. package/dist/cli/{index-m779twtf.js → index-rgfz80gt.js} +1 -1
  48. package/dist/cli/{index-6gcxgx84.js → index-s34y6gbh.js} +1 -1
  49. package/dist/cli/{index-s0zgz4p1.js → index-sf51gh68.js} +1 -1
  50. package/dist/cli/{index-2sqfrvxj.js → index-v4h99xhr.js} +2 -2
  51. package/dist/cli/{index-vmwmwahh.js → index-x4am0jxt.js} +3 -3
  52. package/dist/cli/{index-et7tg13p.js → index-y03jadcy.js} +269 -9
  53. package/dist/cli/{index-dpxg347z.js → index-y28np6j9.js} +3 -3
  54. package/dist/cli/{index-xz4q5vcg.js → index-zp6fss8c.js} +3 -3
  55. package/dist/cli/index.js +35 -35
  56. package/dist/cli/{knowledge-escalator-jmqbmfbf.js → knowledge-escalator-5q4y97e4.js} +11 -11
  57. package/dist/cli/{knowledge-events-5ksqpf4g.js → knowledge-events-x7q8yepd.js} +9 -9
  58. package/dist/cli/{knowledge-link-s2qs178z.js → knowledge-link-655xa3db.js} +3 -3
  59. package/dist/cli/{knowledge-store-q3yy56sc.js → knowledge-store-r7ng2nf8.js} +4 -4
  60. package/dist/cli/{knowledge-validator-r5kaz53f.js → knowledge-validator-e78m6cqe.js} +6 -6
  61. package/dist/cli/{mcp-h82hxnxr.js → mcp-208jwxps.js} +1 -1
  62. package/dist/cli/model-preflight-xakn1356.js +359 -0
  63. package/dist/cli/{pending-delegations-e4h6vjeb.js → pending-delegations-w4a5tg11.js} +7 -7
  64. package/dist/cli/{pr-subscriptions-j7hw3k6x.js → pr-subscriptions-8289esc9.js} +7 -7
  65. package/dist/cli/{pr-workflow-gate-js8dcry2.js → pr-workflow-gate-b7yx0x21.js} +34 -34
  66. package/dist/cli/{runner-tzgwvvn1.js → runner-b5vt1any.js} +4 -4
  67. package/dist/cli/{scan-cursor-yhf58mq2.js → scan-cursor-edpbzp72.js} +5 -5
  68. package/dist/cli/{schema-0k4st1qt.js → schema-dnsxhyr3.js} +1 -1
  69. package/dist/cli/{scope-persistence-bpptmh1e.js → scope-persistence-z1f7d4tw.js} +10 -10
  70. package/dist/cli/{server-axnran6h.js → server-t2edntv4.js} +69 -599
  71. package/dist/cli/{skill-generator-n2w032d1.js → skill-generator-5n7vf0s3.js} +13 -13
  72. package/dist/cli/{snapshot-coordination-init-kyf50x12.js → snapshot-coordination-init-t14dk9je.js} +34 -34
  73. package/dist/cli/{speckit-checkoff-m4184e1x.js → speckit-checkoff-4ws84g13.js} +3 -3
  74. package/dist/cli/{telemetry-zhcgfe70.js → telemetry-6k8t2mrw.js} +1 -1
  75. package/dist/cli/{workspace-snapshot-4m2ex1ey.js → workspace-snapshot-hsssm50w.js} +2 -2
  76. package/dist/cli/{worktree-collision-ownership-1g2414pf.js → worktree-collision-ownership-wj6337ec.js} +8 -8
  77. package/dist/cli/{worktree-isolation-x07f7cfp.js → worktree-isolation-9fyj85tc.js} +34 -34
  78. package/dist/commands/registry.d.ts +1 -1
  79. package/dist/config/agent-model.d.ts +14 -0
  80. package/dist/config/bundled-skill-dispositions.d.ts +29 -0
  81. package/dist/hooks/delegation-gate.d.ts +10 -8
  82. package/dist/hooks/task-id-resolver.d.ts +7 -0
  83. package/dist/index.js +285 -269
  84. package/dist/memory/index.d.ts +1 -0
  85. package/dist/memory/instruction-pairing.d.ts +112 -0
  86. package/dist/services/model-preflight.d.ts +103 -21
  87. package/package.json +1 -1
  88. package/dist/cli/curator-drift-hz3j3fad.js +0 -297
  89. package/dist/cli/model-preflight-5b81adsj.js +0 -170
@@ -1,170 +0,0 @@
1
- // @bun
2
- import {
3
- DEFAULT_MODELS,
4
- init_constants
5
- } from "./index-2t21pv2v.js";
6
- import"./index-zpsr8rpc.js";
7
- import"./index-a76rekgs.js";
8
-
9
- // src/services/model-preflight.ts
10
- init_constants();
11
- var PROVIDER_LIST_TIMEOUT_MS = 2000;
12
- function splitModelId(model) {
13
- const separator = model.indexOf("/");
14
- if (separator <= 0 || separator === model.length - 1)
15
- return null;
16
- return {
17
- provider: model.slice(0, separator),
18
- model: model.slice(separator + 1)
19
- };
20
- }
21
- function collectConfiguredAgentModels(config) {
22
- const collected = [];
23
- const overriddenAgents = new Set;
24
- const overrides = config?.agents ?? {};
25
- for (const [agent, override] of Object.entries(overrides)) {
26
- if (typeof override?.model === "string" && override.model.trim()) {
27
- collected.push({
28
- agent,
29
- model: override.model.trim(),
30
- source: "override"
31
- });
32
- overriddenAgents.add(agent);
33
- }
34
- for (const fallback of override?.fallback_models ?? []) {
35
- if (typeof fallback === "string" && fallback.trim()) {
36
- collected.push({
37
- agent,
38
- model: fallback.trim(),
39
- source: "fallback"
40
- });
41
- }
42
- }
43
- }
44
- for (const [agent, model] of Object.entries(DEFAULT_MODELS)) {
45
- if (overriddenAgents.has(agent))
46
- continue;
47
- collected.push({ agent, model, source: "default" });
48
- }
49
- return collected;
50
- }
51
- var CATALOG_CACHE_TTL_MS = 30000;
52
- var catalogCacheByClient = new WeakMap;
53
- function invalidateProviderCatalogCache() {
54
- catalogCacheByClient = new WeakMap;
55
- }
56
- async function fetchProviderCatalog(client) {
57
- if (!client)
58
- return null;
59
- const cached = catalogCacheByClient.get(client);
60
- if (cached && Date.now() - cached.fetchedAt < CATALOG_CACHE_TTL_MS) {
61
- return cached.catalog;
62
- }
63
- let response;
64
- try {
65
- response = await _internals.providerList(client);
66
- } catch {
67
- return null;
68
- }
69
- const all = response?.data?.all;
70
- if (!Array.isArray(all))
71
- return null;
72
- const catalog = new Map;
73
- for (const provider of all) {
74
- if (typeof provider?.id !== "string")
75
- continue;
76
- const models = new Set;
77
- if (provider.models && typeof provider.models === "object") {
78
- for (const modelKey of Object.keys(provider.models)) {
79
- models.add(modelKey);
80
- }
81
- }
82
- catalog.set(provider.id, models);
83
- }
84
- catalogCacheByClient.set(client, { fetchedAt: Date.now(), catalog });
85
- return catalog;
86
- }
87
- function resolveAgainstCatalog(models, catalog) {
88
- if (catalog === null) {
89
- return {
90
- catalogAvailable: false,
91
- resolutions: models.map((entry) => ({
92
- ...entry,
93
- status: "unknown",
94
- detail: "provider catalog unavailable; model resolution not checked"
95
- }))
96
- };
97
- }
98
- const resolutions = models.map((entry) => {
99
- const split = splitModelId(entry.model);
100
- if (!split) {
101
- return {
102
- ...entry,
103
- status: "unknown",
104
- detail: "model id has no provider prefix; resolution not checked against the catalog"
105
- };
106
- }
107
- const providerModels = catalog.get(split.provider);
108
- if (providerModels === undefined) {
109
- return {
110
- ...entry,
111
- status: "unresolved",
112
- detail: `provider "${split.provider}" is not present in the provider catalog`
113
- };
114
- }
115
- if (!providerModels.has(split.model)) {
116
- return {
117
- ...entry,
118
- status: "unresolved",
119
- detail: `provider "${split.provider}" does not list model "${split.model}"`
120
- };
121
- }
122
- return { ...entry, status: "ok" };
123
- });
124
- return { catalogAvailable: true, resolutions };
125
- }
126
- async function runModelPreflight(config, client) {
127
- const models = collectConfiguredAgentModels(config);
128
- const catalog = await fetchProviderCatalog(client);
129
- return resolveAgainstCatalog(models, catalog);
130
- }
131
- async function checkSingleModelResolution(model, client) {
132
- const catalog = await fetchProviderCatalog(client);
133
- if (catalog === null)
134
- return "unknown";
135
- const split = splitModelId(model);
136
- if (!split)
137
- return "unknown";
138
- const providerModels = catalog.get(split.provider);
139
- if (providerModels === undefined || !providerModels.has(split.model)) {
140
- return "unresolved";
141
- }
142
- return "ok";
143
- }
144
- var _internals = {
145
- providerList: async (client) => {
146
- let timer;
147
- try {
148
- return await Promise.race([
149
- client.provider.list(),
150
- new Promise((_, reject) => {
151
- timer = setTimeout(() => reject(new Error("provider list timed out")), PROVIDER_LIST_TIMEOUT_MS);
152
- })
153
- ]);
154
- } finally {
155
- if (timer)
156
- clearTimeout(timer);
157
- }
158
- }
159
- };
160
- export {
161
- splitModelId,
162
- runModelPreflight,
163
- resolveAgainstCatalog,
164
- invalidateProviderCatalogCache,
165
- fetchProviderCatalog,
166
- collectConfiguredAgentModels,
167
- checkSingleModelResolution,
168
- _internals,
169
- PROVIDER_LIST_TIMEOUT_MS
170
- };