opencode-swarm 7.143.0 → 7.143.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/.opencode/skills/loop/SKILL.md +4 -2
- package/dist/cli/ast-diff-ypptrcan.js +422 -0
- package/dist/cli/{config-doctor-t1r5qwxk.js → config-doctor-ajq3sts3.js} +4 -4
- package/dist/cli/{core-e30p4vz9.js → core-0jn7sk7t.js} +4 -4
- package/dist/cli/curation-policy-pkb2eeb1.js +1 -1
- package/dist/cli/{curator-drift-49p3jnte.js → curator-drift-2jbjv03a.js} +6 -6
- package/dist/cli/{curator-ctasdmmq.js → curator-ff53rwz5.js} +36 -35
- package/dist/cli/{curator-llm-factory-y9xg7k6k.js → curator-llm-factory-2mz7fgd1.js} +36 -35
- package/dist/cli/{dispatch-rd10kdk1.js → dispatch-1y1rnv1h.js} +3 -3
- package/dist/cli/{evidence-summary-service-7bmg5r8y.js → evidence-summary-service-08zcq836.js} +16 -16
- package/dist/cli/{gate-evidence-1v0cj4c6.js → gate-evidence-2r7n4qjv.js} +9 -9
- package/dist/cli/{guardrail-explain-6x9psbwz.js → guardrail-explain-cm5je07b.js} +37 -36
- package/dist/cli/{guardrail-log-pma4m8vr.js → guardrail-log-jf4430p5.js} +6 -6
- package/dist/cli/{hive-promoter-g16grej1.js → hive-promoter-738bf1fj.js} +36 -35
- package/dist/cli/{index-fhxh447f.js → index-0kqs2fbm.js} +15 -15
- package/dist/cli/{index-2n8y67b4.js → index-254xf5y6.js} +2 -2
- package/dist/cli/{index-9v53ez3a.js → index-3fg8kx7n.js} +4 -4
- package/dist/cli/{runtime-ykafcwc6.js → index-5n69863d.js} +2 -10
- package/dist/cli/{index-n96ay8w4.js → index-7317fvce.js} +5 -5
- package/dist/cli/index-7sy3aa9m.js +115 -0
- package/dist/cli/{index-7c4bxgdh.js → index-8aabbfhv.js} +5 -5
- package/dist/cli/{index-x6qq39e9.js → index-91dz0zct.js} +10 -10
- package/dist/cli/{index-s89y08tk.js → index-a5rky7fv.js} +2 -2
- package/dist/cli/{index-fprxtq3q.js → index-awzwmx8p.js} +32 -32
- package/dist/cli/{index-ebwznsfy.js → index-b6e016tv.js} +1 -1
- package/dist/cli/{index-kxpz3ncd.js → index-cfwdm1dx.js} +1 -1
- package/dist/cli/{index-6texwk9p.js → index-crt7xw29.js} +5 -5
- package/dist/cli/{index-15h4dpsn.js → index-cz9tc0h8.js} +5 -5
- package/dist/cli/{index-82m5kwtd.js → index-gdd4jt6b.js} +4 -4
- package/dist/cli/{index-qwm6vdyv.js → index-k3cxyk66.js} +1 -1
- package/dist/cli/{index-q8st0mtw.js → index-mpw32szm.js} +1 -1
- package/dist/cli/{index-96h1v2jw.js → index-n2jk8ajv.js} +1 -1
- package/dist/cli/{index-g0pbvfhw.js → index-n48cwf1a.js} +7 -7
- package/dist/cli/{index-sb16w4wj.js → index-q68a8h37.js} +6 -6
- package/dist/cli/{index-m4v9kab1.js → index-q7jv0c8e.js} +341 -355
- package/dist/cli/{index-28jr28fg.js → index-qmfzfh7m.js} +9 -9
- package/dist/cli/{index-k46me75h.js → index-rn0eq85g.js} +1 -1
- package/dist/cli/{index-keskta0w.js → index-srd87kxc.js} +8 -8
- package/dist/cli/{index-1g473508.js → index-wnj1d1es.js} +43 -42
- package/dist/cli/{index-htmsm37t.js → index-x10a9cz6.js} +5 -5
- package/dist/cli/{index-336ra397.js → index-zgq25ze6.js} +5 -5
- package/dist/cli/{index-r0tn9kpa.js → index-zky3vt90.js} +4 -4
- package/dist/cli/index.js +45 -41
- package/dist/cli/{knowledge-escalator-1b2hmcgn.js → knowledge-escalator-9mdajq4s.js} +15 -15
- package/dist/cli/{knowledge-events-vx4fqjzb.js → knowledge-events-pz58s2r1.js} +13 -13
- package/dist/cli/knowledge-link-fn5j3r4q.js +1 -1
- package/dist/cli/{knowledge-store-t2qyr4yr.js → knowledge-store-sz8vat89.js} +3 -3
- package/dist/cli/{knowledge-validator-c7871bjc.js → knowledge-validator-w5vmvf0a.js} +4 -4
- package/dist/cli/{pending-delegations-0hb97ps1.js → pending-delegations-b3pt3w5w.js} +5 -5
- package/dist/cli/{pr-subscriptions-b63t252j.js → pr-subscriptions-jyav582d.js} +5 -5
- package/dist/cli/{runner-hrg7h2h4.js → runner-pde6b5sx.js} +2 -2
- package/dist/cli/runtime-te94z1zb.js +23 -0
- package/dist/cli/{scan-cursor-pnbpfjjc.js → scan-cursor-p54xsx41.js} +4 -4
- package/dist/cli/{schema-47xpcghn.js → schema-p74hnrfz.js} +1 -1
- package/dist/cli/{scope-persistence-wxx1jpfw.js → scope-persistence-1fc2ncsk.js} +9 -9
- package/dist/cli/semantic-classifier-ygqk0me1.js +147 -0
- package/dist/cli/{skill-generator-s456hfta.js → skill-generator-yv46bt1a.js} +16 -16
- package/dist/cli/{worktree-collision-ownership-ymdxetnn.js → worktree-collision-ownership-bfz3drxm.js} +6 -6
- package/dist/cli/{worktree-isolation-d0xgp705.js → worktree-isolation-qfgc3vma.js} +38 -37
- package/dist/cli/{worktree-provisioning-owner-sjh7te1h.js → worktree-provisioning-owner-g24xd417.js} +4 -4
- package/dist/commands/registry.d.ts +1 -1
- package/dist/config/constants.d.ts +2 -2
- package/dist/hooks/delegation-gate.d.ts +19 -2
- package/dist/index.js +378 -369
- package/dist/parallel/review-router.d.ts +16 -0
- package/dist/parallel/tier3-classifier.d.ts +11 -0
- package/dist/utils/patch-dedent.d.ts +33 -0
- package/dist/workflow/coder-settlement.d.ts +30 -0
- package/dist/workflow/workflow-wal-schema.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cli/{index-y9h2vqf6.js → index-4q9vfav6.js} +3 -3
- package/dist/cli/{index-ee3x66a5.js → index-z6xqpmqg.js} +3 -3
|
@@ -21,8 +21,10 @@ than merely repeating.
|
|
|
21
21
|
|
|
22
22
|
This is a real implementation workflow: it delegates to the coder, declares
|
|
23
23
|
scope, and mutates source code through the normal EXECUTE path. It is distinct
|
|
24
|
-
from full-auto (
|
|
25
|
-
|
|
24
|
+
from full-auto (a critic gate via the `critic_oversight` agent that
|
|
25
|
+
intercepts phase completions and high-risk actions for review — full-auto
|
|
26
|
+
never plans, delegates, or executes; the architect retains ALL delegation
|
|
27
|
+
duty) and turbo (parallel lanes within a single phase). LOOP is a
|
|
26
28
|
user-initiated, gated, sequential, compounding workflow.
|
|
27
29
|
|
|
28
30
|
The two design rules that everything below serves:
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getLanguageForExtension
|
|
4
|
+
} from "./index-7sy3aa9m.js";
|
|
5
|
+
import {
|
|
6
|
+
Query,
|
|
7
|
+
loadGrammar
|
|
8
|
+
} from "./index-5n69863d.js";
|
|
9
|
+
import"./index-4905hd2m.js";
|
|
10
|
+
import {
|
|
11
|
+
init_logger,
|
|
12
|
+
log
|
|
13
|
+
} from "./index-zgwm4ryv.js";
|
|
14
|
+
import"./index-a76rekgs.js";
|
|
15
|
+
|
|
16
|
+
// src/diff/ast-diff.ts
|
|
17
|
+
import { extname } from "path";
|
|
18
|
+
init_logger();
|
|
19
|
+
var QUERIES = {
|
|
20
|
+
javascript: `
|
|
21
|
+
(function_declaration name: (identifier) @func.name) @func.def
|
|
22
|
+
(class_declaration name: (identifier) @class.name) @class.def
|
|
23
|
+
(export_statement) @export
|
|
24
|
+
(import_statement) @import
|
|
25
|
+
(type_alias_declaration name: (type_identifier) @type.name) @type.def
|
|
26
|
+
`,
|
|
27
|
+
typescript: `
|
|
28
|
+
(function_declaration name: (identifier) @func.name) @func.def
|
|
29
|
+
(class_declaration name: (type_identifier) @class.name) @class.def
|
|
30
|
+
(export_statement) @export
|
|
31
|
+
(import_statement) @import
|
|
32
|
+
(type_alias_declaration name: (type_identifier) @type.name) @type.def
|
|
33
|
+
(interface_declaration name: (type_identifier) @interface.name) @interface.def
|
|
34
|
+
`,
|
|
35
|
+
python: `
|
|
36
|
+
(function_definition name: (identifier) @func.name) @func.def
|
|
37
|
+
(class_definition name: (identifier) @class.name) @class.def
|
|
38
|
+
(import_statement) @import
|
|
39
|
+
(expression_statement (assignment left: (identifier) @var.name)) @var.def
|
|
40
|
+
`,
|
|
41
|
+
go: `
|
|
42
|
+
(function_declaration name: (identifier) @func.name) @func.def
|
|
43
|
+
(type_declaration (type_spec name: (type_identifier) @type.name)) @type.def
|
|
44
|
+
(import_declaration) @import
|
|
45
|
+
`,
|
|
46
|
+
rust: `
|
|
47
|
+
(function_item name: (identifier) @func.name) @func.def
|
|
48
|
+
(struct_item name: (type_identifier) @struct.name) @struct.def
|
|
49
|
+
(impl_item type: (type_identifier) @impl.name) @impl.def
|
|
50
|
+
(use_declaration) @import
|
|
51
|
+
`,
|
|
52
|
+
java: `
|
|
53
|
+
(method_declaration name: (identifier) @func.name) @func.def
|
|
54
|
+
(class_declaration name: (identifier) @class.name) @class.def
|
|
55
|
+
(interface_declaration name: (identifier) @interface.name) @interface.def
|
|
56
|
+
(import_declaration) @import
|
|
57
|
+
`,
|
|
58
|
+
c: `
|
|
59
|
+
(function_definition declarator: (function_declarator declarator: (identifier) @func.name)) @func.def
|
|
60
|
+
(struct_specifier name: (type_identifier) @struct.name) @struct.def
|
|
61
|
+
(type_definition declarator: (type_identifier) @type.name) @type.def
|
|
62
|
+
(preproc_include) @import
|
|
63
|
+
`,
|
|
64
|
+
cpp: `
|
|
65
|
+
(function_definition declarator: (function_declarator declarator: (identifier) @func.name)) @func.def
|
|
66
|
+
(class_specifier name: (type_identifier) @class.name) @class.def
|
|
67
|
+
(struct_specifier name: (type_identifier) @struct.name) @struct.def
|
|
68
|
+
(preproc_include) @import
|
|
69
|
+
`,
|
|
70
|
+
csharp: `
|
|
71
|
+
(method_declaration name: (identifier) @func.name) @func.def
|
|
72
|
+
(class_declaration name: (identifier) @class.name) @class.def
|
|
73
|
+
(interface_declaration name: (identifier) @interface.name) @interface.def
|
|
74
|
+
(struct_declaration name: (identifier) @struct.name) @struct.def
|
|
75
|
+
(using_directive) @using
|
|
76
|
+
`,
|
|
77
|
+
ruby: `
|
|
78
|
+
(method name: (identifier) @func.name) @func.def
|
|
79
|
+
(class name: (constant) @class.name) @class.def
|
|
80
|
+
(module name: (constant) @module.name) @module.def
|
|
81
|
+
`,
|
|
82
|
+
php: `
|
|
83
|
+
(function_definition name: (name) @func.name) @func.def
|
|
84
|
+
(class_declaration name: (name) @class.name) @class.def
|
|
85
|
+
(interface_declaration name: (name) @interface.name) @interface.def
|
|
86
|
+
(namespace_use_declaration) @import
|
|
87
|
+
`,
|
|
88
|
+
swift: `
|
|
89
|
+
(function_declaration name: (identifier) @func.name) @func.def
|
|
90
|
+
(class_declaration name: (identifier) @class.name) @class.def
|
|
91
|
+
(struct_declaration name: (identifier) @struct.name) @struct.def
|
|
92
|
+
(protocol_declaration name: (identifier) @protocol.name) @protocol.def
|
|
93
|
+
(import_declaration) @import
|
|
94
|
+
`,
|
|
95
|
+
kotlin: `
|
|
96
|
+
(function_declaration name: (identifier) @func.name) @func.def
|
|
97
|
+
(class_declaration name: (identifier) @class.name) @class.def
|
|
98
|
+
(object_declaration name: (identifier) @object.name) @object.def
|
|
99
|
+
(import_header) @import
|
|
100
|
+
`,
|
|
101
|
+
dart: `
|
|
102
|
+
(function_signature name: (identifier) @func.name) @func.def
|
|
103
|
+
(class_definition name: (identifier) @class.name) @class.def
|
|
104
|
+
(mixin_declaration name: (identifier) @mixin.name) @mixin.def
|
|
105
|
+
(import_directive) @import
|
|
106
|
+
`,
|
|
107
|
+
css: `
|
|
108
|
+
(rule_set (selectors) @rule.selector) @rule.def
|
|
109
|
+
`,
|
|
110
|
+
bash: `
|
|
111
|
+
(function_definition name: (word) @command.name) @command.def
|
|
112
|
+
`,
|
|
113
|
+
powershell: `
|
|
114
|
+
(function_statement (function_name) @func.name) @func.def
|
|
115
|
+
`,
|
|
116
|
+
tsx: `
|
|
117
|
+
(function_declaration name: (identifier) @func.name) @func.def
|
|
118
|
+
(class_declaration name: (identifier) @class.name) @class.def
|
|
119
|
+
(export_statement) @export
|
|
120
|
+
(import_statement) @import
|
|
121
|
+
(type_alias_declaration name: (type_identifier) @type.name) @type.def
|
|
122
|
+
(interface_declaration name: (type_identifier) @interface.name) @interface.def
|
|
123
|
+
`
|
|
124
|
+
};
|
|
125
|
+
var AST_TIMEOUT_MS = 500;
|
|
126
|
+
async function computeASTDiff(filePath, oldContent, newContent) {
|
|
127
|
+
const startTime = Date.now();
|
|
128
|
+
const extension = extname(filePath).toLowerCase();
|
|
129
|
+
const language = getLanguageForExtension(extension);
|
|
130
|
+
if (!language) {
|
|
131
|
+
return {
|
|
132
|
+
filePath,
|
|
133
|
+
language: null,
|
|
134
|
+
changes: [],
|
|
135
|
+
durationMs: Date.now() - startTime,
|
|
136
|
+
usedAST: false
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
let timeoutId;
|
|
141
|
+
const parser = await Promise.race([
|
|
142
|
+
loadGrammar(language.id),
|
|
143
|
+
new Promise((_, reject) => {
|
|
144
|
+
timeoutId = setTimeout(() => reject(new Error("AST_TIMEOUT")), AST_TIMEOUT_MS);
|
|
145
|
+
})
|
|
146
|
+
]).finally(() => {
|
|
147
|
+
if (timeoutId)
|
|
148
|
+
clearTimeout(timeoutId);
|
|
149
|
+
});
|
|
150
|
+
const oldTree = parser.parse(oldContent);
|
|
151
|
+
const newTree = parser.parse(newContent);
|
|
152
|
+
if (!oldTree || !newTree) {
|
|
153
|
+
return {
|
|
154
|
+
filePath,
|
|
155
|
+
language: language.id,
|
|
156
|
+
changes: [],
|
|
157
|
+
durationMs: Date.now() - startTime,
|
|
158
|
+
usedAST: false,
|
|
159
|
+
error: "Failed to parse file"
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const oldSymbols = extractSymbols(oldTree, language);
|
|
163
|
+
const newSymbols = extractSymbols(newTree, language);
|
|
164
|
+
const changes = compareSymbols(oldSymbols, newSymbols);
|
|
165
|
+
oldTree.delete();
|
|
166
|
+
newTree.delete();
|
|
167
|
+
return {
|
|
168
|
+
filePath,
|
|
169
|
+
language: language.id,
|
|
170
|
+
changes,
|
|
171
|
+
durationMs: Date.now() - startTime,
|
|
172
|
+
usedAST: true
|
|
173
|
+
};
|
|
174
|
+
} catch (error) {
|
|
175
|
+
const errorMsg = error instanceof Error ? error.message : "Unknown error";
|
|
176
|
+
if (errorMsg === "AST_TIMEOUT") {
|
|
177
|
+
log(`[ast-diff] Timeout for ${filePath}, falling back to raw diff`);
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
filePath,
|
|
181
|
+
language: language.id,
|
|
182
|
+
changes: [],
|
|
183
|
+
durationMs: Date.now() - startTime,
|
|
184
|
+
usedAST: false,
|
|
185
|
+
error: errorMsg
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
function extractSymbols(tree, language) {
|
|
190
|
+
const symbols = [];
|
|
191
|
+
const queryStr = QUERIES[language.id];
|
|
192
|
+
if (!queryStr) {
|
|
193
|
+
return symbols;
|
|
194
|
+
}
|
|
195
|
+
try {
|
|
196
|
+
const lang = tree.language;
|
|
197
|
+
if (!lang) {
|
|
198
|
+
return symbols;
|
|
199
|
+
}
|
|
200
|
+
const query = new Query(lang, queryStr);
|
|
201
|
+
const matches = query.matches(tree.rootNode);
|
|
202
|
+
for (const match of matches) {
|
|
203
|
+
const symbol = parseMatch(match, language.id);
|
|
204
|
+
if (symbol) {
|
|
205
|
+
symbols.push(symbol);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
const defEntries = symbols.filter((s) => s.category !== "export" && s.category !== "import");
|
|
209
|
+
if (defEntries.length > 0 && defEntries.length < symbols.length) {
|
|
210
|
+
const filtered = symbols.filter((symbol) => {
|
|
211
|
+
if (symbol.category !== "export" && symbol.category !== "import") {
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
const isDuplicate = defEntries.some((def) => symbol.lineStart === def.lineStart && symbol.lineEnd === def.lineEnd);
|
|
215
|
+
return !isDuplicate;
|
|
216
|
+
});
|
|
217
|
+
symbols.length = 0;
|
|
218
|
+
symbols.push(...filtered);
|
|
219
|
+
}
|
|
220
|
+
} catch {}
|
|
221
|
+
return symbols;
|
|
222
|
+
}
|
|
223
|
+
function parseMatch(match, languageId) {
|
|
224
|
+
const captures = match.captures;
|
|
225
|
+
const defCapture = captures.find((c) => c.name.endsWith(".def"));
|
|
226
|
+
const nameCapture = captures.find((c) => c.name.endsWith(".name"));
|
|
227
|
+
if (!defCapture) {
|
|
228
|
+
const exportCapture = captures.find((c) => c.name === "export");
|
|
229
|
+
const importCapture = captures.find((c) => c.name === "import");
|
|
230
|
+
const categoryCapture = exportCapture || importCapture;
|
|
231
|
+
if (!categoryCapture)
|
|
232
|
+
return null;
|
|
233
|
+
const node2 = categoryCapture.node;
|
|
234
|
+
const text = node2.text.trim();
|
|
235
|
+
const name = extractStatementName(text, categoryCapture.name);
|
|
236
|
+
return {
|
|
237
|
+
category: categoryCapture.name === "export" ? "export" : "import",
|
|
238
|
+
name,
|
|
239
|
+
lineStart: node2.startPosition.row + 1,
|
|
240
|
+
lineEnd: node2.endPosition.row + 1
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
const node = defCapture.node;
|
|
244
|
+
const nameNode = nameCapture?.node;
|
|
245
|
+
return {
|
|
246
|
+
category: inferCategory(captures[0]?.name || "other"),
|
|
247
|
+
name: nameNode?.text || "anonymous",
|
|
248
|
+
lineStart: node.startPosition.row + 1,
|
|
249
|
+
lineEnd: node.endPosition.row + 1,
|
|
250
|
+
signature: extractSignature(node, languageId)
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function extractStatementName(text, captureType) {
|
|
254
|
+
if (captureType === "import") {
|
|
255
|
+
const fromMatch = text.match(/from\s+['"]([^'"]+)['"]/);
|
|
256
|
+
if (fromMatch)
|
|
257
|
+
return fromMatch[1];
|
|
258
|
+
const stringMatch = text.match(/['"]([^'"]+)['"]/);
|
|
259
|
+
if (stringMatch)
|
|
260
|
+
return stringMatch[1];
|
|
261
|
+
} else {
|
|
262
|
+
const namedExport = text.match(/export\s+(?:default\s+)?(?:function|class|const|let|var|type|interface)\s+(\w+)/);
|
|
263
|
+
if (namedExport)
|
|
264
|
+
return namedExport[1];
|
|
265
|
+
const anonymousDefault = text.match(/export\s+default\s+(?:function|class)\b/);
|
|
266
|
+
if (anonymousDefault)
|
|
267
|
+
return "default";
|
|
268
|
+
const braceExport = text.match(/export\s+\{([^}]+)\}/);
|
|
269
|
+
if (braceExport)
|
|
270
|
+
return braceExport[1].trim();
|
|
271
|
+
}
|
|
272
|
+
const tokens = text.split(/\s+/);
|
|
273
|
+
return tokens.length > 1 ? tokens.slice(0, 3).join(" ") : text.slice(0, 30);
|
|
274
|
+
}
|
|
275
|
+
function inferCategory(captureName) {
|
|
276
|
+
if (captureName.includes("func"))
|
|
277
|
+
return "function";
|
|
278
|
+
if (captureName.includes("class"))
|
|
279
|
+
return "class";
|
|
280
|
+
if (captureName.includes("type") || captureName.includes("interface") || captureName.includes("struct") || captureName.includes("protocol") || captureName.includes("mixin") || captureName.includes("object") || captureName.includes("module"))
|
|
281
|
+
return "type";
|
|
282
|
+
if (captureName.includes("export"))
|
|
283
|
+
return "export";
|
|
284
|
+
if (captureName.includes("import") || captureName.includes("use") || captureName.includes("using"))
|
|
285
|
+
return "import";
|
|
286
|
+
if (captureName.includes("var"))
|
|
287
|
+
return "variable";
|
|
288
|
+
if (captureName.includes("command"))
|
|
289
|
+
return "function";
|
|
290
|
+
if (captureName.includes("rule"))
|
|
291
|
+
return "type";
|
|
292
|
+
return "other";
|
|
293
|
+
}
|
|
294
|
+
var paramNodeTypes = {
|
|
295
|
+
javascript: ["formal_parameters"],
|
|
296
|
+
typescript: ["formal_parameters"],
|
|
297
|
+
tsx: ["formal_parameters"],
|
|
298
|
+
python: ["parameters"],
|
|
299
|
+
go: ["parameter_list"],
|
|
300
|
+
rust: ["parameters", "function_item"],
|
|
301
|
+
java: ["formal_parameters", "method_declaration"],
|
|
302
|
+
c: ["parameter_list"],
|
|
303
|
+
cpp: ["parameter_list"],
|
|
304
|
+
csharp: ["formal_parameters"],
|
|
305
|
+
ruby: ["parameters"],
|
|
306
|
+
php: ["formal_parameters", "parameter_list"],
|
|
307
|
+
swift: ["parameter_clause"],
|
|
308
|
+
kotlin: ["parameter_list"],
|
|
309
|
+
dart: ["parameter_list", "function_signature"],
|
|
310
|
+
css: [],
|
|
311
|
+
bash: ["command_position"],
|
|
312
|
+
powershell: ["parameter_list"]
|
|
313
|
+
};
|
|
314
|
+
function extractSignature(node, languageId) {
|
|
315
|
+
const nodeTypes = paramNodeTypes[languageId] || [];
|
|
316
|
+
for (const child of node.children) {
|
|
317
|
+
if (child && nodeTypes.includes(child.type)) {
|
|
318
|
+
return child.text;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (languageId === "javascript" || languageId === "typescript" || languageId === "tsx") {
|
|
322
|
+
const paramsNode = node.children.find((c) => c !== null && c.type === "formal_parameters");
|
|
323
|
+
if (paramsNode) {
|
|
324
|
+
return paramsNode.text;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (node.type === "class_declaration" || node.type === "class_definition" || node.type === "class") {
|
|
328
|
+
const classBodyNode = node.children.find((c) => c !== null && (c.type === "class_body" || c.type === "declaration_list"));
|
|
329
|
+
if (classBodyNode) {
|
|
330
|
+
return classBodyNode.text;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
function compareSymbols(oldSymbols, newSymbols) {
|
|
336
|
+
const changes = [];
|
|
337
|
+
const oldMap = new Map(oldSymbols.map((s) => [s.name, s]));
|
|
338
|
+
const newMap = new Map(newSymbols.map((s) => [s.name, s]));
|
|
339
|
+
const matchedOldSymbols = new Set;
|
|
340
|
+
for (const newSymbol of newSymbols) {
|
|
341
|
+
if (!oldMap.has(newSymbol.name)) {
|
|
342
|
+
const matchingOldSymbol = findRenamedSymbol(newSymbol, oldSymbols, matchedOldSymbols);
|
|
343
|
+
if (matchingOldSymbol) {
|
|
344
|
+
changes.push({
|
|
345
|
+
type: "renamed",
|
|
346
|
+
category: newSymbol.category,
|
|
347
|
+
name: newSymbol.name,
|
|
348
|
+
lineStart: newSymbol.lineStart,
|
|
349
|
+
lineEnd: newSymbol.lineEnd,
|
|
350
|
+
signature: newSymbol.signature,
|
|
351
|
+
renamedFrom: matchingOldSymbol.name
|
|
352
|
+
});
|
|
353
|
+
matchedOldSymbols.add(matchingOldSymbol);
|
|
354
|
+
} else {
|
|
355
|
+
changes.push({
|
|
356
|
+
type: "added",
|
|
357
|
+
category: newSymbol.category,
|
|
358
|
+
name: newSymbol.name,
|
|
359
|
+
lineStart: newSymbol.lineStart,
|
|
360
|
+
lineEnd: newSymbol.lineEnd,
|
|
361
|
+
signature: newSymbol.signature
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
} else {
|
|
365
|
+
const oldSymbol = oldMap.get(newSymbol.name);
|
|
366
|
+
matchedOldSymbols.add(oldSymbol);
|
|
367
|
+
if (oldSymbol.lineStart !== newSymbol.lineStart || oldSymbol.lineEnd !== newSymbol.lineEnd || oldSymbol.signature !== newSymbol.signature) {
|
|
368
|
+
changes.push({
|
|
369
|
+
type: "modified",
|
|
370
|
+
category: newSymbol.category,
|
|
371
|
+
name: newSymbol.name,
|
|
372
|
+
lineStart: newSymbol.lineStart,
|
|
373
|
+
lineEnd: newSymbol.lineEnd,
|
|
374
|
+
signature: newSymbol.signature
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
for (const oldSymbol of oldSymbols) {
|
|
380
|
+
if (!newMap.has(oldSymbol.name) && !matchedOldSymbols.has(oldSymbol)) {
|
|
381
|
+
changes.push({
|
|
382
|
+
type: "removed",
|
|
383
|
+
category: oldSymbol.category,
|
|
384
|
+
name: oldSymbol.name,
|
|
385
|
+
lineStart: oldSymbol.lineStart,
|
|
386
|
+
lineEnd: oldSymbol.lineEnd,
|
|
387
|
+
signature: oldSymbol.signature
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return changes;
|
|
392
|
+
}
|
|
393
|
+
function findRenamedSymbol(newSymbol, oldSymbols, matchedOldSymbols) {
|
|
394
|
+
if (newSymbol.category !== "function" && newSymbol.category !== "type" && newSymbol.category !== "class") {
|
|
395
|
+
return null;
|
|
396
|
+
}
|
|
397
|
+
if (!newSymbol.signature) {
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
if (newSymbol.category === "function" && newSymbol.signature.replace(/\s/g, "") === "()") {
|
|
401
|
+
return null;
|
|
402
|
+
}
|
|
403
|
+
const lineCount = newSymbol.lineEnd - newSymbol.lineStart;
|
|
404
|
+
for (const oldSymbol of oldSymbols) {
|
|
405
|
+
if (matchedOldSymbols.has(oldSymbol) || oldSymbol.category !== newSymbol.category) {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
if (oldSymbol.signature !== newSymbol.signature) {
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
const oldLineCount = oldSymbol.lineEnd - oldSymbol.lineStart;
|
|
412
|
+
const maxAllowedLines = Math.ceil(lineCount * 1.2);
|
|
413
|
+
if (oldLineCount > maxAllowedLines) {
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
return oldSymbol;
|
|
417
|
+
}
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
export {
|
|
421
|
+
computeASTDiff
|
|
422
|
+
};
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-zgwm4ryv.js";
|
|
18
|
-
import"./index-q8st0mtw.js";
|
|
15
|
+
} from "./index-zky3vt90.js";
|
|
16
|
+
import"./index-mpw32szm.js";
|
|
19
17
|
import"./index-jqsfsqbx.js";
|
|
18
|
+
import"./index-z6xqpmqg.js";
|
|
20
19
|
import"./index-zjygnfay.js";
|
|
21
20
|
import"./index-bk5tah7q.js";
|
|
22
21
|
import"./index-bpmtbmy9.js";
|
|
22
|
+
import"./index-zgwm4ryv.js";
|
|
23
23
|
import"./index-a76rekgs.js";
|
|
24
24
|
export {
|
|
25
25
|
writeDoctorArtifact,
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
resolveWorktreeBaseDir,
|
|
15
15
|
shortenWorktreePath,
|
|
16
16
|
writeLaneProfileToDiskReal
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-ee3x66a5.js";
|
|
19
|
-
import"./index-4nt52yr9.js";
|
|
17
|
+
} from "./index-n48cwf1a.js";
|
|
20
18
|
import"./index-4rhhvd1a.js";
|
|
21
|
-
import"./index-zgwm4ryv.js";
|
|
22
19
|
import"./index-jqsfsqbx.js";
|
|
20
|
+
import"./index-z6xqpmqg.js";
|
|
23
21
|
import"./index-zjygnfay.js";
|
|
22
|
+
import"./index-4nt52yr9.js";
|
|
23
|
+
import"./index-zgwm4ryv.js";
|
|
24
24
|
import"./index-a76rekgs.js";
|
|
25
25
|
export {
|
|
26
26
|
writeLaneProfileToDiskReal,
|
|
@@ -12,9 +12,9 @@ import"./index-ed5ykebp.js";
|
|
|
12
12
|
import"./index-k31en0ja.js";
|
|
13
13
|
import"./index-7g4c7s5r.js";
|
|
14
14
|
import"./index-s2rcz51a.js";
|
|
15
|
+
import"./index-bpmtbmy9.js";
|
|
15
16
|
import"./index-4nt52yr9.js";
|
|
16
17
|
import"./index-zgwm4ryv.js";
|
|
17
|
-
import"./index-bpmtbmy9.js";
|
|
18
18
|
import"./index-a76rekgs.js";
|
|
19
19
|
export {
|
|
20
20
|
readCohortConfigFingerprint,
|
|
@@ -5,23 +5,23 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
readEffectiveSpecSync
|
|
7
7
|
} from "./index-9ss2m4rs.js";
|
|
8
|
+
import"./index-n832052r.js";
|
|
8
9
|
import {
|
|
9
10
|
readSwarmFileAsync,
|
|
10
11
|
validateSwarmPath
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
12
|
+
} from "./index-rn0eq85g.js";
|
|
13
|
+
import"./index-4rhhvd1a.js";
|
|
14
|
+
import"./index-z6xqpmqg.js";
|
|
15
|
+
import"./index-zjygnfay.js";
|
|
13
16
|
import {
|
|
14
17
|
invalidateCachedArtifact
|
|
15
18
|
} from "./index-ed5ykebp.js";
|
|
16
|
-
import"./index-
|
|
19
|
+
import"./index-bpmtbmy9.js";
|
|
17
20
|
import"./index-4nt52yr9.js";
|
|
18
|
-
import"./index-4rhhvd1a.js";
|
|
19
21
|
import {
|
|
20
22
|
init_logger,
|
|
21
23
|
warn
|
|
22
24
|
} from "./index-zgwm4ryv.js";
|
|
23
|
-
import"./index-zjygnfay.js";
|
|
24
|
-
import"./index-bpmtbmy9.js";
|
|
25
25
|
import"./index-a76rekgs.js";
|
|
26
26
|
|
|
27
27
|
// src/hooks/curator-drift.ts
|
|
@@ -14,60 +14,61 @@ import {
|
|
|
14
14
|
runCuratorInit,
|
|
15
15
|
runCuratorPhase,
|
|
16
16
|
writeCuratorSummary
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-n96ay8w4.js";
|
|
22
|
-
import"./index-c8s9a3zh.js";
|
|
23
|
-
import"./index-r0tn9kpa.js";
|
|
24
|
-
import"./index-fprxtq3q.js";
|
|
17
|
+
} from "./index-q7jv0c8e.js";
|
|
18
|
+
import"./index-7317fvce.js";
|
|
19
|
+
import"./index-zky3vt90.js";
|
|
20
|
+
import"./index-awzwmx8p.js";
|
|
25
21
|
import"./index-134d35c1.js";
|
|
22
|
+
import"./index-b6e016tv.js";
|
|
23
|
+
import"./index-4q9vfav6.js";
|
|
26
24
|
import"./index-k92cagmt.js";
|
|
27
25
|
import"./index-y8552snf.js";
|
|
26
|
+
import"./index-crt7xw29.js";
|
|
27
|
+
import"./index-xmzmeknp.js";
|
|
28
|
+
import"./index-c8s9a3zh.js";
|
|
28
29
|
import"./index-9ss2m4rs.js";
|
|
30
|
+
import"./index-0kqs2fbm.js";
|
|
29
31
|
import"./index-74hpm6sh.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
32
|
+
import"./index-91dz0zct.js";
|
|
33
|
+
import"./index-x10a9cz6.js";
|
|
34
|
+
import"./index-3fg8kx7n.js";
|
|
35
|
+
import"./index-q68a8h37.js";
|
|
36
|
+
import"./index-556ja8an.js";
|
|
37
|
+
import"./index-gdd4jt6b.js";
|
|
35
38
|
import"./index-zsrtt42s.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-7c4bxgdh.js";
|
|
39
|
+
import"./index-k3cxyk66.js";
|
|
40
|
+
import"./index-8aabbfhv.js";
|
|
41
|
+
import"./index-n48cwf1a.js";
|
|
40
42
|
import"./index-8fwhhayc.js";
|
|
41
43
|
import"./index-q1exe2b3.js";
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
44
|
+
import"./index-7sy3aa9m.js";
|
|
45
|
+
import"./index-4905hd2m.js";
|
|
46
|
+
import"./index-qmfzfh7m.js";
|
|
47
|
+
import"./index-254xf5y6.js";
|
|
48
|
+
import"./index-gprxjmm7.js";
|
|
49
|
+
import"./index-n832052r.js";
|
|
50
|
+
import"./index-zgq25ze6.js";
|
|
51
|
+
import"./index-mpw32szm.js";
|
|
52
|
+
import"./index-rn0eq85g.js";
|
|
53
|
+
import"./index-4rhhvd1a.js";
|
|
54
|
+
import"./index-jqsfsqbx.js";
|
|
55
|
+
import"./index-z6xqpmqg.js";
|
|
56
|
+
import"./index-zjygnfay.js";
|
|
57
|
+
import"./index-cfwdm1dx.js";
|
|
46
58
|
import"./index-tq5s07ta.js";
|
|
47
59
|
import"./index-rtry5xyf.js";
|
|
48
|
-
import"./index-
|
|
60
|
+
import"./index-srd87kxc.js";
|
|
49
61
|
import"./index-ae75rja9.js";
|
|
50
62
|
import"./index-w7x7qxz2.js";
|
|
51
63
|
import"./index-erfnw81g.js";
|
|
64
|
+
import"./index-bk5tah7q.js";
|
|
52
65
|
import"./index-ed5ykebp.js";
|
|
53
|
-
import"./index-2n8y67b4.js";
|
|
54
|
-
import"./index-gprxjmm7.js";
|
|
55
|
-
import"./index-n832052r.js";
|
|
56
|
-
import"./index-9v53ez3a.js";
|
|
57
|
-
import"./index-sb16w4wj.js";
|
|
58
|
-
import"./index-556ja8an.js";
|
|
59
66
|
import"./index-k31en0ja.js";
|
|
60
67
|
import"./index-7g4c7s5r.js";
|
|
61
68
|
import"./index-s2rcz51a.js";
|
|
69
|
+
import"./index-bpmtbmy9.js";
|
|
62
70
|
import"./index-4nt52yr9.js";
|
|
63
|
-
import"./index-336ra397.js";
|
|
64
|
-
import"./index-4rhhvd1a.js";
|
|
65
71
|
import"./index-zgwm4ryv.js";
|
|
66
|
-
import"./index-q8st0mtw.js";
|
|
67
|
-
import"./index-jqsfsqbx.js";
|
|
68
|
-
import"./index-zjygnfay.js";
|
|
69
|
-
import"./index-bk5tah7q.js";
|
|
70
|
-
import"./index-bpmtbmy9.js";
|
|
71
72
|
import"./index-a76rekgs.js";
|
|
72
73
|
export {
|
|
73
74
|
writeCuratorSummary,
|