opencode-swarm 7.135.5 → 7.136.0
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/dist/cli/{config-doctor-exj26ryt.js → config-doctor-q0krbxwv.js} +2 -2
- package/dist/cli/{curation-policy-mbv3b27c.js → curation-policy-v6ywe8qd.js} +2 -2
- package/dist/cli/{curator-llm-factory-4d5pzh47.js → curator-llm-factory-mhwje8rf.js} +12 -12
- package/dist/cli/{curator-7ycd6x29.js → curator-tqedvpy1.js} +12 -12
- package/dist/cli/{guardrail-explain-2jrqv2zf.js → guardrail-explain-m0m74hvr.js} +13 -13
- package/dist/cli/{guardrail-log-c843gxnm.js → guardrail-log-5g8x6qc6.js} +3 -3
- package/dist/cli/{hive-promoter-epnj14q8.js → hive-promoter-s804newd.js} +12 -12
- package/dist/cli/{index-0csbx1wc.js → index-1kjg590p.js} +1 -1
- package/dist/cli/{index-qyn0b2jj.js → index-2cv1j3rf.js} +1 -1
- package/dist/cli/{index-09w3ezq2.js → index-2w4tsmva.js} +1 -1
- package/dist/cli/{index-9s5b8wrs.js → index-81dkzncr.js} +35 -35
- package/dist/cli/{index-bx10dq60.js → index-9bk16zkv.js} +1 -1
- package/dist/cli/{index-kjg6vgqs.js → index-bbejqagj.js} +1 -1
- package/dist/cli/{index-8et4bx6j.js → index-bwfzq91q.js} +3 -3
- package/dist/cli/{index-db52969t.js → index-cfz5750k.js} +1 -1
- package/dist/cli/{index-kq9zb1cv.js → index-cxq1t7j1.js} +14 -14
- package/dist/cli/{index-ym516a9a.js → index-j08trvny.js} +5 -5
- package/dist/cli/{index-k8arazbb.js → index-m1hew17b.js} +7 -2
- package/dist/cli/{index-hw6yt4rs.js → index-n8j0cnp1.js} +4 -4
- package/dist/cli/{index-6yk6ezvj.js → index-nw9cn84t.js} +1 -1
- package/dist/cli/{index-gvfw2y6v.js → index-qh9466j3.js} +2 -2
- package/dist/cli/{index-jnemjn16.js → index-w58bmwyq.js} +2 -2
- package/dist/cli/{index-t1gszcwg.js → index-wpqypdge.js} +2 -2
- package/dist/cli/index.js +12 -12
- package/dist/cli/{knowledge-escalator-3tjhpwjf.js → knowledge-escalator-f1m2xp5x.js} +3 -3
- package/dist/cli/{knowledge-events-0akk3p15.js → knowledge-events-rksgem6f.js} +1 -1
- package/dist/cli/{knowledge-store-7nvfh2n3.js → knowledge-store-t6d6fr8b.js} +1 -1
- package/dist/cli/{knowledge-validator-z618vhda.js → knowledge-validator-5ggzb3j1.js} +4 -4
- package/dist/cli/{scan-cursor-5zqr3afj.js → scan-cursor-18fnwr58.js} +2 -2
- package/dist/cli/{schema-n1cj94m0.js → schema-jw15d8bt.js} +1 -1
- package/dist/cli/{skill-generator-560ksca8.js → skill-generator-3n5y902z.js} +5 -5
- package/dist/config/schema.d.ts +11 -1
- package/dist/hooks/repo-graph-builder.d.ts +17 -11
- package/dist/hooks/repo-graph-injection.d.ts +20 -9
- package/dist/hooks/semantic-diff-injection.d.ts +2 -2
- package/dist/index.js +138 -137
- package/dist/tools/repo-graph/builder.d.ts +55 -1
- package/dist/tools/repo-graph/cache.d.ts +12 -36
- package/dist/tools/repo-graph/freshness.d.ts +54 -0
- package/dist/tools/repo-graph/incremental.d.ts +17 -8
- package/dist/tools/repo-graph/query.d.ts +7 -1
- package/dist/tools/repo-graph/storage.d.ts +3 -1
- package/dist/tools/repo-graph/types.d.ts +31 -1
- package/dist/tools/repo-graph.d.ts +5 -3
- package/dist/tools/repo-map.d.ts +8 -0
- package/dist/utils/path-security.d.ts +22 -0
- package/package.json +1 -1
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-n8j0cnp1.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-9bk16zkv.js";
|
|
16
16
|
import {
|
|
17
17
|
init_knowledge_types,
|
|
18
18
|
isActiveStatus
|
|
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
190
190
|
alreadyInactive: true
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
193
|
+
const { quarantineEntry } = await import("./knowledge-validator-5ggzb3j1.js");
|
|
194
194
|
let policyConfig;
|
|
195
195
|
try {
|
|
196
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
197
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
196
|
+
const { KnowledgeConfigSchema } = await import("./schema-jw15d8bt.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-w58bmwyq.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -21,7 +21,7 @@ var package_default;
|
|
|
21
21
|
var init_package = __esm(() => {
|
|
22
22
|
package_default = {
|
|
23
23
|
name: "opencode-swarm",
|
|
24
|
-
version: "7.
|
|
24
|
+
version: "7.136.0",
|
|
25
25
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
26
26
|
main: "dist/index.js",
|
|
27
27
|
types: "dist/index.d.ts",
|
|
@@ -777,6 +777,11 @@ var init_schema = __esm(() => {
|
|
|
777
777
|
agent_profiles: exports_external.record(exports_external.string(), exports_external.string()).default({})
|
|
778
778
|
});
|
|
779
779
|
RepoGraphConfigSchema = exports_external.object({
|
|
780
|
+
enabled: exports_external.boolean().default(true),
|
|
781
|
+
init_refresh: exports_external.boolean().default(true),
|
|
782
|
+
refresh_cap: exports_external.number().int().min(0).max(500).default(50),
|
|
783
|
+
walk_budget_ms: exports_external.number().int().min(1000).max(60000).default(5000),
|
|
784
|
+
max_files: exports_external.number().int().min(100).max(1e5).default(1e4),
|
|
780
785
|
exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([])
|
|
781
786
|
});
|
|
782
787
|
FORBIDDEN_CHECKPOINT_CONFIG_KEYS = new Set([
|
|
@@ -1534,7 +1539,7 @@ var init_schema = __esm(() => {
|
|
|
1534
1539
|
authority: AuthorityConfigSchema.optional(),
|
|
1535
1540
|
plan_cursor: PlanCursorConfigSchema.optional(),
|
|
1536
1541
|
context_map: ContextMapConfigSchema.optional(),
|
|
1537
|
-
repo_graph: RepoGraphConfigSchema.
|
|
1542
|
+
repo_graph: RepoGraphConfigSchema.prefault({}),
|
|
1538
1543
|
evidence: EvidenceConfigSchema.optional(),
|
|
1539
1544
|
summaries: SummaryConfigSchema.optional(),
|
|
1540
1545
|
review_passes: ReviewPassesConfigSchema.optional(),
|
|
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
702
702
|
const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
|
|
703
703
|
if (atFloor.length === 0 && recovered.length === 0)
|
|
704
704
|
return;
|
|
705
|
-
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-
|
|
705
|
+
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-rksgem6f.js");
|
|
706
706
|
const rollups = await readKnowledgeCounterRollups(directory);
|
|
707
707
|
const flagIds = new Set;
|
|
708
708
|
for (const e of atFloor) {
|
|
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
771
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
772
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
773
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
772
|
+
const { quarantineEntry } = await import("./knowledge-validator-5ggzb3j1.js");
|
|
773
|
+
const { KnowledgeConfigSchema } = await import("./schema-jw15d8bt.js");
|
|
774
774
|
let config;
|
|
775
775
|
try {
|
|
776
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
776
|
+
const { loadPluginConfigWithMeta } = await import("./index-w58bmwyq.js");
|
|
777
777
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
778
778
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
779
779
|
} catch {
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-81dkzncr.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-nw9cn84t.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPluginConfigWithMeta,
|
|
8
8
|
loadPluginConfigWithMetaAsync,
|
|
9
9
|
resolveWorktreeIsolationConfig
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-bbejqagj.js";
|
|
11
11
|
import {
|
|
12
12
|
ApprovalEvidenceSchema,
|
|
13
13
|
BaseEvidenceSchema,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
TurboConfigSchema,
|
|
55
55
|
WorktreeIsolationConfigSchema,
|
|
56
56
|
resolveAutoReviewConfig
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-m1hew17b.js";
|
|
58
58
|
import"./index-bk5tah7q.js";
|
|
59
59
|
import {
|
|
60
60
|
MigrationStatusSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-2w4tsmva.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-n8j0cnp1.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-dzyjb33e.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -6,36 +6,36 @@ import {
|
|
|
6
6
|
getPluginConfigDir,
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
resolveCommand
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-81dkzncr.js";
|
|
10
10
|
import"./index-vm4xw9z3.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
import"./index-nw9cn84t.js";
|
|
12
|
+
import"./index-cfz5750k.js";
|
|
13
13
|
import"./index-cggqh2dz.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
16
|
+
import"./index-bwfzq91q.js";
|
|
17
|
+
import"./index-j08trvny.js";
|
|
18
|
+
import"./index-1kjg590p.js";
|
|
19
19
|
import"./index-6mjf4vr1.js";
|
|
20
20
|
import"./index-c8s9a3zh.js";
|
|
21
21
|
import"./index-9ss2m4rs.js";
|
|
22
22
|
import"./index-y6a7gjtj.js";
|
|
23
23
|
import"./index-mrtms113.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-wpqypdge.js";
|
|
25
|
+
import"./index-2w4tsmva.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-n8j0cnp1.js";
|
|
28
|
+
import"./index-9bk16zkv.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-dzyjb33e.js";
|
|
31
31
|
import"./index-ey29aap6.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-bbejqagj.js";
|
|
33
33
|
import"./index-k5jrywpr.js";
|
|
34
34
|
import"./index-n832052r.js";
|
|
35
35
|
import {
|
|
36
36
|
init_package,
|
|
37
37
|
package_default
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-m1hew17b.js";
|
|
39
39
|
import"./index-bk5tah7q.js";
|
|
40
40
|
import"./index-8fwhhayc.js";
|
|
41
41
|
import"./index-q1exe2b3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-j08trvny.js";
|
|
12
|
+
import"./index-n8j0cnp1.js";
|
|
13
|
+
import"./index-9bk16zkv.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-dzyjb33e.js";
|
|
16
16
|
import"./index-ey29aap6.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveKnowledgeCounterBaselinePath,
|
|
29
29
|
resolveKnowledgeEventsPath,
|
|
30
30
|
resolveLegacyApplicationLogPath
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-9bk16zkv.js";
|
|
32
32
|
import"./index-ae75rja9.js";
|
|
33
33
|
import"./index-dzyjb33e.js";
|
|
34
34
|
import"./index-ey29aap6.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-wpqypdge.js";
|
|
27
|
+
import"./index-2w4tsmva.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-n8j0cnp1.js";
|
|
30
|
+
import"./index-9bk16zkv.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-dzyjb33e.js";
|
|
33
33
|
import"./index-ey29aap6.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-1kjg590p.js";
|
|
8
|
+
import"./index-n8j0cnp1.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-dzyjb33e.js";
|
|
11
11
|
import"./index-ey29aap6.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-bwfzq91q.js";
|
|
37
|
+
import"./index-wpqypdge.js";
|
|
38
|
+
import"./index-2w4tsmva.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-n8j0cnp1.js";
|
|
41
|
+
import"./index-9bk16zkv.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-dzyjb33e.js";
|
|
44
44
|
import"./index-ey29aap6.js";
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -582,6 +582,11 @@ export declare const ContextMapConfigSchema: z.ZodObject<{
|
|
|
582
582
|
}, z.core.$strip>;
|
|
583
583
|
export type ContextMapConfig = z.infer<typeof ContextMapConfigSchema>;
|
|
584
584
|
export declare const RepoGraphConfigSchema: z.ZodObject<{
|
|
585
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
586
|
+
init_refresh: z.ZodDefault<z.ZodBoolean>;
|
|
587
|
+
refresh_cap: z.ZodDefault<z.ZodNumber>;
|
|
588
|
+
walk_budget_ms: z.ZodDefault<z.ZodNumber>;
|
|
589
|
+
max_files: z.ZodDefault<z.ZodNumber>;
|
|
585
590
|
exclude_dirs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
586
591
|
}, z.core.$strip>;
|
|
587
592
|
export type RepoGraphConfig = z.infer<typeof RepoGraphConfigSchema>;
|
|
@@ -1928,7 +1933,12 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1928
1933
|
invalidate_on_hash_change: z.ZodDefault<z.ZodBoolean>;
|
|
1929
1934
|
agent_profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1930
1935
|
}, z.core.$strip>>;
|
|
1931
|
-
repo_graph: z.
|
|
1936
|
+
repo_graph: z.ZodPrefault<z.ZodObject<{
|
|
1937
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1938
|
+
init_refresh: z.ZodDefault<z.ZodBoolean>;
|
|
1939
|
+
refresh_cap: z.ZodDefault<z.ZodNumber>;
|
|
1940
|
+
walk_budget_ms: z.ZodDefault<z.ZodNumber>;
|
|
1941
|
+
max_files: z.ZodDefault<z.ZodNumber>;
|
|
1932
1942
|
exclude_dirs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1933
1943
|
}, z.core.$strip>>;
|
|
1934
1944
|
evidence: z.ZodOptional<z.ZodObject<{
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* exposes the init promise so `toolAfter` can serialize incremental
|
|
16
16
|
* updates after the initial scan completes.
|
|
17
17
|
*/
|
|
18
|
-
import { type RepoGraph } from '../tools/repo-graph';
|
|
18
|
+
import { type BuildWorkspaceGraphOptions, type RepoGraph } from '../tools/repo-graph';
|
|
19
|
+
import { type FreshnessOptions, type FreshnessProbe } from '../tools/repo-graph/freshness';
|
|
19
20
|
import { safeRealpathSync } from '../tools/repo-graph/safe-realpath';
|
|
20
21
|
export interface RepoGraphBuilderHook {
|
|
21
22
|
init(): Promise<void>;
|
|
@@ -29,21 +30,28 @@ export interface RepoGraphBuilderHook {
|
|
|
29
30
|
}): Promise<void>;
|
|
30
31
|
}
|
|
31
32
|
export interface RepoGraphDeps {
|
|
32
|
-
buildWorkspaceGraph: (workspace: string, options?:
|
|
33
|
-
maxFileSizeBytes?: number;
|
|
34
|
-
maxFiles?: number;
|
|
35
|
-
walkBudgetMs?: number;
|
|
36
|
-
followSymlinks?: boolean;
|
|
37
|
-
excludeDirs?: readonly string[];
|
|
38
|
-
}) => Promise<RepoGraph>;
|
|
33
|
+
buildWorkspaceGraph: (workspace: string, options?: BuildWorkspaceGraphOptions) => Promise<RepoGraph>;
|
|
39
34
|
saveGraph: (workspace: string, graph: RepoGraph, options?: {
|
|
40
35
|
createAtomic?: boolean;
|
|
41
36
|
}) => Promise<void>;
|
|
42
37
|
updateGraphForFiles: (workspace: string, files: string[], options?: {
|
|
43
38
|
forceRebuild?: boolean;
|
|
39
|
+
buildOptions?: BuildWorkspaceGraphOptions;
|
|
44
40
|
}) => Promise<RepoGraph>;
|
|
41
|
+
loadGraph: (workspace: string) => Promise<RepoGraph | null>;
|
|
42
|
+
probeFreshness: (workspace: string, options?: FreshnessOptions) => Promise<FreshnessProbe>;
|
|
43
|
+
writeFingerprint: (workspace: string, graph: RepoGraph, options?: FreshnessOptions) => Promise<boolean>;
|
|
44
|
+
isGraphWideInputPath: (filePath: string) => boolean;
|
|
45
45
|
safeRealpathSync?: typeof safeRealpathSync;
|
|
46
46
|
}
|
|
47
|
+
export interface RepoGraphBuilderOptions {
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
initRefresh?: boolean;
|
|
50
|
+
refreshCap?: number;
|
|
51
|
+
maxFiles?: number;
|
|
52
|
+
walkBudgetMs?: number;
|
|
53
|
+
excludeDirs?: readonly string[];
|
|
54
|
+
}
|
|
47
55
|
/**
|
|
48
56
|
* Rebase a realpath'd file onto the lexical workspace root so the incremental
|
|
49
57
|
* update keys the same node the walk produced (issue #1985, defect A5). Exported
|
|
@@ -62,6 +70,4 @@ export interface RepoGraphDeps {
|
|
|
62
70
|
* the realpath is preserved.
|
|
63
71
|
*/
|
|
64
72
|
export declare function rebaseOntoWorkspace(realFilePath: string, realWorkspace: string, workspaceRoot: string): string;
|
|
65
|
-
export declare function createRepoGraphBuilderHook(workspaceRoot: string, deps?: Partial<RepoGraphDeps>, options?:
|
|
66
|
-
excludeDirs?: readonly string[];
|
|
67
|
-
}): RepoGraphBuilderHook;
|
|
73
|
+
export declare function createRepoGraphBuilderHook(workspaceRoot: string, deps?: Partial<RepoGraphDeps>, options?: RepoGraphBuilderOptions): RepoGraphBuilderHook;
|
|
@@ -11,18 +11,29 @@
|
|
|
11
11
|
* the agent simply doesn't get the extra context. The graph is built
|
|
12
12
|
* on-demand by the agent calling `repo_map` with action="build".
|
|
13
13
|
*
|
|
14
|
-
* Caching: the loaded graph is cached per-directory
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* Caching: the loaded graph is cached in a bounded per-directory LRU and
|
|
15
|
+
* invalidated when the graph artifact changes. Before returning it, the shared
|
|
16
|
+
* bounded workspace probe gates use of the graph. Uncertified graphs and
|
|
17
|
+
* complete drift above the configured refresh cap are suppressed;
|
|
18
|
+
* inconclusive probes remain usable as freshness-unknown, without mutation.
|
|
17
19
|
*/
|
|
18
|
-
import { type RepoGraph } from '../tools/repo-graph';
|
|
20
|
+
import { type FreshnessOptions, probeFreshness, type RepoGraph } from '../tools/repo-graph';
|
|
21
|
+
export interface RepoGraphInjectionOptions extends FreshnessOptions {
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
refreshCap?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const _internals: {
|
|
26
|
+
probeFreshness: typeof probeFreshness;
|
|
27
|
+
cacheSize: () => number;
|
|
28
|
+
};
|
|
19
29
|
/**
|
|
20
|
-
* Load the repo graph for `directory`, using a per-directory cache that
|
|
21
|
-
* invalidates on file mtime change
|
|
30
|
+
* Load the repo graph for `directory`, using a bounded per-directory cache that
|
|
31
|
+
* invalidates on file mtime/size change and a shared content-freshness gate.
|
|
32
|
+
* Returns null if no graph exists or its workspace alignment is unsafe.
|
|
22
33
|
*
|
|
23
34
|
* Exported only for tests; production callers use the buildXxxBlock helpers below.
|
|
24
35
|
*/
|
|
25
|
-
export declare function getCachedGraph(directory: string): RepoGraph | null
|
|
36
|
+
export declare function getCachedGraph(directory: string, options?: RepoGraphInjectionOptions): Promise<RepoGraph | null>;
|
|
26
37
|
/** Test-only: clear the per-directory cache. */
|
|
27
38
|
export declare function resetGraphInjectionCache(): void;
|
|
28
39
|
/**
|
|
@@ -33,7 +44,7 @@ export declare function resetGraphInjectionCache(): void;
|
|
|
33
44
|
* - No graph exists.
|
|
34
45
|
* - The target isn't tracked in the graph (file too new, language unsupported).
|
|
35
46
|
*/
|
|
36
|
-
export declare function buildCoderLocalizationBlock(directory: string, targetFile: string): string | null
|
|
47
|
+
export declare function buildCoderLocalizationBlock(directory: string, targetFile: string, options?: RepoGraphInjectionOptions): Promise<string | null>;
|
|
37
48
|
/**
|
|
38
49
|
* Build a blast-radius block for a list of changed files. Used by the
|
|
39
50
|
* reviewer agent to spot-check whether unseen consumers might break.
|
|
@@ -42,4 +53,4 @@ export declare function buildCoderLocalizationBlock(directory: string, targetFil
|
|
|
42
53
|
* graph. The result is bounded to the top 8 dependents to stay within
|
|
43
54
|
* the per-block context budget.
|
|
44
55
|
*/
|
|
45
|
-
export declare function buildReviewerBlastRadiusBlock(directory: string, changedFiles: string[]): string | null
|
|
56
|
+
export declare function buildReviewerBlastRadiusBlock(directory: string, changedFiles: string[], options?: RepoGraphInjectionOptions): Promise<string | null>;
|
|
@@ -13,7 +13,7 @@ import { computeASTDiff } from '../diff/ast-diff.js';
|
|
|
13
13
|
import { classifyChanges } from '../diff/semantic-classifier.js';
|
|
14
14
|
import { generateSummary, generateSummaryMarkdown } from '../diff/summary-generator.js';
|
|
15
15
|
import { getImporters, normalizeGraphPath } from '../tools/repo-graph.js';
|
|
16
|
-
import { getCachedGraph } from './repo-graph-injection.js';
|
|
16
|
+
import { getCachedGraph, type RepoGraphInjectionOptions } from './repo-graph-injection.js';
|
|
17
17
|
export declare const _internals: {
|
|
18
18
|
execFile: typeof child_process.execFile;
|
|
19
19
|
realpathSync: typeof fs.realpathSync;
|
|
@@ -40,4 +40,4 @@ export declare const _internals: {
|
|
|
40
40
|
*
|
|
41
41
|
* Returns null if no changes are detected or on failure.
|
|
42
42
|
*/
|
|
43
|
-
export declare function buildSemanticDiffBlock(directory: string, changedFiles: string[], maxFiles?: number): Promise<string | null>;
|
|
43
|
+
export declare function buildSemanticDiffBlock(directory: string, changedFiles: string[], maxFiles?: number, repoGraphOptions?: RepoGraphInjectionOptions): Promise<string | null>;
|