opencode-swarm 7.134.2 → 7.135.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/.opencode/skills/swarm-pr-feedback/SKILL.md +10 -3
- package/.opencode/skills/swarm-pr-review/SKILL.md +11 -3
- package/README.md +1 -1
- package/dist/background/pr-event-delivery.d.ts +8 -0
- package/dist/background/pr-event-subscribers.d.ts +5 -0
- package/dist/background/pr-feedback-event-queue.d.ts +37 -0
- package/dist/background/pr-monitor-worker.d.ts +14 -13
- package/dist/background/workspace-snapshot.d.ts +8 -3
- package/dist/cli/{config-doctor-wk7xzrma.js → config-doctor-j1x63x87.js} +2 -2
- package/dist/cli/{core-d6yd2jzv.js → core-fvqp2gnn.js} +1 -1
- package/dist/cli/{curation-policy-npgspa14.js → curation-policy-xg9zw0ep.js} +6 -6
- package/dist/cli/{curator-llm-factory-tpc0qg6x.js → curator-llm-factory-4mat6cq5.js} +24 -24
- package/dist/cli/{curator-njzxdyav.js → curator-yc06cmnz.js} +24 -24
- package/dist/cli/{evidence-summary-service-pay9409b.js → evidence-summary-service-0cczdmjv.js} +6 -6
- package/dist/cli/{gate-evidence-b5v1xvxp.js → gate-evidence-8zrwdj69.js} +4 -4
- package/dist/cli/{guardrail-explain-75pr3e9z.js → guardrail-explain-zmbxwh3s.js} +25 -25
- package/dist/cli/{guardrail-log-783svw0e.js → guardrail-log-7egxrxap.js} +3 -3
- package/dist/cli/{hive-promoter-nrxjatdx.js → hive-promoter-7s3gzajy.js} +24 -24
- package/dist/cli/{index-5nybajn9.js → index-09b9zncg.js} +1 -1
- package/dist/cli/{index-v8m282zt.js → index-337r9pkr.js} +2 -2
- package/dist/cli/{index-h3k62043.js → index-3nasn371.js} +47 -12
- package/dist/cli/{index-2t1n9k7b.js → index-44zgqvqh.js} +1 -1
- package/dist/cli/{index-746ga67b.js → index-4yv2rn8q.js} +1 -1
- package/dist/cli/{index-9299e7d5.js → index-6kmmdtdp.js} +2 -2
- package/dist/cli/{index-q2rrv0cy.js → index-7a2hm51h.js} +57 -2
- package/dist/cli/{index-y3v1404y.js → index-7an2qn0s.js} +1 -1
- package/dist/cli/{index-4cnwvmsm.js → index-86wdrskb.js} +5 -5
- package/dist/cli/{index-225t7m1j.js → index-96b78s7p.js} +26 -26
- package/dist/cli/{index-a0nk83rk.js → index-997d6p42.js} +4 -4
- package/dist/cli/{index-njfcm1tn.js → index-a4972t0f.js} +3 -3
- package/dist/cli/{index-wk1h5ec2.js → index-b7p0mp2q.js} +2 -2
- package/dist/cli/{index-cav39zjt.js → index-crw4n55v.js} +3645 -2336
- package/dist/cli/{index-ss26e2d4.js → index-ctvnb76s.js} +1 -1
- package/dist/cli/{index-n48xwynh.js → index-e8w62fgs.js} +1 -1
- package/dist/cli/{index-8fhg2nt2.js → index-ens0gt38.js} +5 -5
- package/dist/cli/{index-ca44jww3.js → index-g0raqavt.js} +2 -2
- package/dist/cli/{index-0dszfjf3.js → index-grxkbbc5.js} +1 -1
- package/dist/cli/{index-x60gpbt5.js → index-nrvs08pr.js} +6 -6
- package/dist/cli/{index-p8hezdtz.js → index-ny93srnd.js} +1 -1
- package/dist/cli/{index-1bytvz73.js → index-q9mq5tv3.js} +2 -2
- package/dist/cli/{index-y8vqsm2g.js → index-vf6e8ame.js} +2 -2
- package/dist/cli/{index-4p02dp92.js → index-wxyxf0bd.js} +2 -2
- package/dist/cli/{index-asd9n0ms.js → index-x88w0cp5.js} +3 -3
- package/dist/cli/{index-dd7ttx8x.js → index-xg9repnx.js} +1 -1
- package/dist/cli/{index-cfkvc5q9.js → index-yhba8swx.js} +1 -1
- package/dist/cli/{index-1j3682j8.js → index-z085b4ka.js} +1 -1
- package/dist/cli/index.js +24 -24
- package/dist/cli/{knowledge-escalator-b3b91k0t.js → knowledge-escalator-d76a090n.js} +7 -7
- package/dist/cli/{knowledge-events-kyw0s745.js → knowledge-events-3mcg1a0e.js} +5 -5
- package/dist/cli/{knowledge-link-nc4y2zkq.js → knowledge-link-etrfntkd.js} +4 -4
- package/dist/cli/{knowledge-store-5watc2b2.js → knowledge-store-xtt4sede.js} +5 -5
- package/dist/cli/{knowledge-validator-a4wxkgbc.js → knowledge-validator-h1k7ymtd.js} +8 -8
- package/dist/cli/{pending-delegations-v9e40hfk.js → pending-delegations-4z3tkkct.js} +3 -3
- package/dist/cli/{pr-subscriptions-ztq40hrt.js → pr-subscriptions-29j794kd.js} +3 -3
- package/dist/cli/{scan-cursor-gcd771kn.js → scan-cursor-stztfv7d.js} +6 -6
- package/dist/cli/{schema-6eghf6gt.js → schema-tbq2srrh.js} +1 -1
- package/dist/cli/{scope-persistence-hz3zmmsv.js → scope-persistence-7wydjzx8.js} +4 -4
- package/dist/cli/{skill-generator-8dswjh14.js → skill-generator-02q1qdf0.js} +9 -9
- package/dist/cli/{telemetry-qh78ymq4.js → telemetry-859khp82.js} +9 -1
- package/dist/cli/{workspace-snapshot-35qc0y8a.js → workspace-snapshot-9h5za0s6.js} +3 -1
- package/dist/cli/{worktree-collision-ownership-c4bdnjtx.js → worktree-collision-ownership-dtwr0xj4.js} +3 -3
- package/dist/commands/context-map-stats.d.ts +5 -0
- package/dist/commands/pr-feedback.d.ts +15 -2
- package/dist/commands/registry.d.ts +14 -0
- package/dist/git/pr-workflow-state.d.ts +37 -0
- package/dist/hooks/pr-workflow-gate.d.ts +42 -2
- package/dist/hooks/pr-workflow-response-gate.d.ts +3 -0
- package/dist/index.js +512 -496
- package/dist/services/status-service.d.ts +12 -2
- package/dist/telemetry.d.ts +5 -0
- package/dist/tools/pr-workflow-status.d.ts +2 -0
- package/dist/tools/pre-check-batch.d.ts +22 -0
- package/dist/tools/prepare-pr-workflow-checkout.d.ts +2 -0
- package/package.json +1 -1
|
@@ -7,57 +7,57 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-crw4n55v.js";
|
|
11
11
|
import"./index-13xxjfhn.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
12
|
+
import"./index-grxkbbc5.js";
|
|
13
|
+
import"./index-ctvnb76s.js";
|
|
14
|
+
import"./index-ens0gt38.js";
|
|
15
15
|
import"./index-4905hd2m.js";
|
|
16
16
|
import"./index-134d35c1.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-a4972t0f.js";
|
|
18
|
+
import"./index-86wdrskb.js";
|
|
19
|
+
import"./index-vf6e8ame.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
23
|
+
import"./index-b7p0mp2q.js";
|
|
24
|
+
import"./index-z085b4ka.js";
|
|
25
|
+
import"./index-997d6p42.js";
|
|
26
|
+
import"./index-g0raqavt.js";
|
|
27
27
|
import"./index-rtry5xyf.js";
|
|
28
28
|
import {
|
|
29
29
|
resolveHiveKnowledgePath
|
|
30
|
-
} from "./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
} from "./index-nrvs08pr.js";
|
|
31
|
+
import"./index-x88w0cp5.js";
|
|
32
32
|
import"./index-ae75rja9.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-yhba8swx.js";
|
|
34
|
+
import"./index-xg9repnx.js";
|
|
35
|
+
import"./index-e8w62fgs.js";
|
|
36
36
|
import"./index-k5jrywpr.js";
|
|
37
37
|
import"./index-n832052r.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-337r9pkr.js";
|
|
39
39
|
import"./index-bk5tah7q.js";
|
|
40
40
|
import"./index-8fwhhayc.js";
|
|
41
41
|
import"./index-q1exe2b3.js";
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
42
|
+
import"./index-ny93srnd.js";
|
|
43
|
+
import"./index-wxyxf0bd.js";
|
|
44
44
|
import"./index-1kz6da87.js";
|
|
45
45
|
import"./index-b4z7s917.js";
|
|
46
46
|
import"./index-b8zgtz81.js";
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-44zgqvqh.js";
|
|
48
48
|
import"./index-4rhhvd1a.js";
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-7an2qn0s.js";
|
|
50
50
|
import"./index-2ghkk9ve.js";
|
|
51
51
|
import"./index-fsrp8wp3.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-09b9zncg.js";
|
|
53
53
|
import"./index-7g4c7s5r.js";
|
|
54
|
-
import"./index-
|
|
54
|
+
import"./index-7a2hm51h.js";
|
|
55
55
|
import"./index-bpmtbmy9.js";
|
|
56
56
|
import"./index-z6xqpmqg.js";
|
|
57
57
|
import"./index-zjygnfay.js";
|
|
58
58
|
import"./index-qe3v54nb.js";
|
|
59
59
|
import"./index-zgwm4ryv.js";
|
|
60
|
-
import"./index-
|
|
60
|
+
import"./index-3nasn371.js";
|
|
61
61
|
import"./index-a76rekgs.js";
|
|
62
62
|
export {
|
|
63
63
|
resolveHiveKnowledgePath,
|
|
@@ -19,7 +19,7 @@ var package_default;
|
|
|
19
19
|
var init_package = __esm(() => {
|
|
20
20
|
package_default = {
|
|
21
21
|
name: "opencode-swarm",
|
|
22
|
-
version: "7.
|
|
22
|
+
version: "7.135.0",
|
|
23
23
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
24
24
|
main: "dist/index.js",
|
|
25
25
|
types: "dist/index.d.ts",
|
|
@@ -1989,7 +1989,7 @@ var init_schema = __esm(() => {
|
|
|
1989
1989
|
]);
|
|
1990
1990
|
CheckpointConfigSchema = exports_external.preprocess(rejectCheckpointPrototypePollution, exports_external.object({
|
|
1991
1991
|
enabled: exports_external.boolean().default(true),
|
|
1992
|
-
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
|
|
1992
|
+
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3).describe("Maximum number of checkpoints to retain. Oldest checkpoints are evicted when this limit is exceeded."),
|
|
1993
1993
|
max_retention: exports_external.number().int().min(1).max(100).default(20),
|
|
1994
1994
|
allow_empty_commits: exports_external.boolean().default(false)
|
|
1995
1995
|
}).strict());
|
|
@@ -651,41 +651,71 @@ function parsePorcelainV2Snapshot(output) {
|
|
|
651
651
|
`).match(/^# branch\.oid (.+)$/m);
|
|
652
652
|
if (!oidMatch)
|
|
653
653
|
return null;
|
|
654
|
-
|
|
655
|
-
|
|
654
|
+
if (!/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i.test(oidMatch[1]) && oidMatch[1] !== "(initial)") {
|
|
655
|
+
return null;
|
|
656
|
+
}
|
|
657
|
+
const gitHead = oidMatch[1] === "(initial)" ? null : oidMatch[1];
|
|
658
|
+
const dirtyTrackedPaths = [];
|
|
659
|
+
const untrackedPaths = [];
|
|
660
|
+
const unmergedPaths = [];
|
|
661
|
+
const unmergedCodes = [];
|
|
662
|
+
const dirtySubmodulePaths = [];
|
|
663
|
+
let renameOrCopy = false;
|
|
656
664
|
for (let index = 0;index < records.length; index++) {
|
|
657
665
|
const record = records[index];
|
|
658
666
|
if (!record)
|
|
659
667
|
continue;
|
|
660
668
|
if (record.startsWith("? ")) {
|
|
661
|
-
|
|
669
|
+
untrackedPaths.push(record.slice(2));
|
|
662
670
|
continue;
|
|
663
671
|
}
|
|
664
672
|
if (record.startsWith("1 ")) {
|
|
673
|
+
const fields = record.split(" ");
|
|
665
674
|
const changedPath = porcelainV2PathAfterFields(record, 8);
|
|
666
|
-
if (!changedPath)
|
|
675
|
+
if (!changedPath || !fields[2])
|
|
667
676
|
return null;
|
|
668
|
-
|
|
677
|
+
dirtyTrackedPaths.push(changedPath);
|
|
678
|
+
if (fields[2] !== "N...")
|
|
679
|
+
dirtySubmodulePaths.push(changedPath);
|
|
669
680
|
continue;
|
|
670
681
|
}
|
|
671
682
|
if (record.startsWith("2 ")) {
|
|
683
|
+
const fields = record.split(" ");
|
|
672
684
|
const changedPath = porcelainV2PathAfterFields(record, 9);
|
|
673
685
|
const originalPath = records[++index];
|
|
674
|
-
if (!changedPath || !originalPath)
|
|
686
|
+
if (!changedPath || !originalPath || !fields[2])
|
|
675
687
|
return null;
|
|
676
|
-
|
|
688
|
+
renameOrCopy = true;
|
|
689
|
+
dirtyTrackedPaths.push(changedPath, originalPath);
|
|
690
|
+
if (fields[2] !== "N...")
|
|
691
|
+
dirtySubmodulePaths.push(changedPath);
|
|
677
692
|
continue;
|
|
678
693
|
}
|
|
679
694
|
if (record.startsWith("u ")) {
|
|
695
|
+
const fields = record.split(" ");
|
|
680
696
|
const changedPath = porcelainV2PathAfterFields(record, 10);
|
|
681
|
-
|
|
697
|
+
const unmergedCode = fields[1];
|
|
698
|
+
if (!changedPath || !fields[2] || !unmergedCode || !/^(?:DD|AU|UD|UA|DU|AA|UU)$/.test(unmergedCode)) {
|
|
682
699
|
return null;
|
|
683
|
-
|
|
700
|
+
}
|
|
701
|
+
unmergedPaths.push(changedPath);
|
|
702
|
+
unmergedCodes.push(unmergedCode);
|
|
703
|
+
dirtyTrackedPaths.push(changedPath);
|
|
704
|
+
if (fields[2] !== "N...")
|
|
705
|
+
dirtySubmodulePaths.push(changedPath);
|
|
684
706
|
continue;
|
|
685
707
|
}
|
|
686
708
|
return null;
|
|
687
709
|
}
|
|
688
|
-
return {
|
|
710
|
+
return {
|
|
711
|
+
gitHead,
|
|
712
|
+
dirtyTrackedPaths: [...new Set(dirtyTrackedPaths)],
|
|
713
|
+
untrackedPaths: [...new Set(untrackedPaths)],
|
|
714
|
+
renameOrCopy,
|
|
715
|
+
unmergedPaths: [...new Set(unmergedPaths)],
|
|
716
|
+
unmergedCodes: [...new Set(unmergedCodes)],
|
|
717
|
+
dirtySubmodulePaths: [...new Set(dirtySubmodulePaths)]
|
|
718
|
+
};
|
|
689
719
|
}
|
|
690
720
|
function porcelainV2PathAfterFields(record, fields) {
|
|
691
721
|
let offset = 0;
|
|
@@ -722,7 +752,12 @@ function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg
|
|
|
722
752
|
directory: path.resolve(directory),
|
|
723
753
|
gitHead: snapshot?.gitHead ?? null,
|
|
724
754
|
dirtyHash: porcelain === null ? null : digest(porcelain),
|
|
725
|
-
changedFiles: snapshot
|
|
755
|
+
changedFiles: snapshot ? [
|
|
756
|
+
...new Set([
|
|
757
|
+
...snapshot.dirtyTrackedPaths,
|
|
758
|
+
...snapshot.untrackedPaths
|
|
759
|
+
])
|
|
760
|
+
] : null,
|
|
726
761
|
prHeadSha,
|
|
727
762
|
scope
|
|
728
763
|
};
|
|
@@ -790,4 +825,4 @@ var _internals = {
|
|
|
790
825
|
parsePorcelainV2Snapshot
|
|
791
826
|
};
|
|
792
827
|
|
|
793
|
-
export { readGitTextAtRevision, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveExactMergeBase, resolveExactMergeBaseAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveGitControlStateDigest, resolveGitControlStateDigestAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
|
|
828
|
+
export { readGitTextAtRevision, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveExactMergeBase, resolveExactMergeBaseAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveGitControlStateDigest, resolveGitControlStateDigestAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, parsePorcelainV2Snapshot, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
|
|
@@ -39,7 +39,7 @@ var _internals = {
|
|
|
39
39
|
symlinkSync: fs.symlinkSync
|
|
40
40
|
},
|
|
41
41
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
42
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
42
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-7wydjzx8.js");
|
|
43
43
|
return realWrite(directory, taskId, files);
|
|
44
44
|
},
|
|
45
45
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-crw4n55v.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-grxkbbc5.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -8,6 +8,55 @@ var _writeStream = null;
|
|
|
8
8
|
var _projectDirectory = null;
|
|
9
9
|
var _listeners = [];
|
|
10
10
|
var _disabled = false;
|
|
11
|
+
var _heartbeatTrackingActive = false;
|
|
12
|
+
var _heartbeatListener = null;
|
|
13
|
+
var heartbeatTimestamps = new Map;
|
|
14
|
+
function capHeartbeatMap() {
|
|
15
|
+
while (heartbeatTimestamps.size >= 500) {
|
|
16
|
+
const oldestKey = heartbeatTimestamps.keys().next().value;
|
|
17
|
+
if (oldestKey === undefined)
|
|
18
|
+
break;
|
|
19
|
+
heartbeatTimestamps.delete(oldestKey);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function startHeartbeatTracking() {
|
|
23
|
+
if (_heartbeatTrackingActive)
|
|
24
|
+
return;
|
|
25
|
+
_heartbeatTrackingActive = true;
|
|
26
|
+
const listener = (event, data) => {
|
|
27
|
+
if (event !== "heartbeat")
|
|
28
|
+
return;
|
|
29
|
+
const payload = data;
|
|
30
|
+
if (!payload?.sessionId)
|
|
31
|
+
return;
|
|
32
|
+
heartbeatTimestamps.set(payload.sessionId, Date.now());
|
|
33
|
+
capHeartbeatMap();
|
|
34
|
+
};
|
|
35
|
+
_heartbeatListener = listener;
|
|
36
|
+
addTelemetryListener(listener);
|
|
37
|
+
}
|
|
38
|
+
function getLastHeartbeat(sessionId) {
|
|
39
|
+
return heartbeatTimestamps.get(sessionId);
|
|
40
|
+
}
|
|
41
|
+
function stopHeartbeatTracking() {
|
|
42
|
+
_heartbeatTrackingActive = false;
|
|
43
|
+
if (_heartbeatListener !== null) {
|
|
44
|
+
const idx = _listeners.indexOf(_heartbeatListener);
|
|
45
|
+
if (idx >= 0)
|
|
46
|
+
_listeners.splice(idx, 1);
|
|
47
|
+
_heartbeatListener = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function resetHeartbeatTrackingForTesting() {
|
|
51
|
+
_heartbeatTrackingActive = false;
|
|
52
|
+
heartbeatTimestamps.clear();
|
|
53
|
+
if (_heartbeatListener !== null) {
|
|
54
|
+
const idx = _listeners.indexOf(_heartbeatListener);
|
|
55
|
+
if (idx >= 0)
|
|
56
|
+
_listeners.splice(idx, 1);
|
|
57
|
+
_heartbeatListener = null;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
11
60
|
var _emitCount = 0;
|
|
12
61
|
var ROTATION_CHECK_INTERVAL = 50;
|
|
13
62
|
function resetTelemetryForTesting() {
|
|
@@ -15,6 +64,7 @@ function resetTelemetryForTesting() {
|
|
|
15
64
|
_projectDirectory = null;
|
|
16
65
|
_listeners.length = 0;
|
|
17
66
|
_emitCount = 0;
|
|
67
|
+
resetHeartbeatTrackingForTesting();
|
|
18
68
|
if (_writeStream !== null) {
|
|
19
69
|
_writeStream.end();
|
|
20
70
|
_writeStream = null;
|
|
@@ -257,6 +307,11 @@ var telemetry = {
|
|
|
257
307
|
});
|
|
258
308
|
}
|
|
259
309
|
};
|
|
260
|
-
var _internals = {
|
|
310
|
+
var _internals = {
|
|
311
|
+
telemetry,
|
|
312
|
+
emit,
|
|
313
|
+
rotateTelemetryIfNeeded,
|
|
314
|
+
heartbeatListenerCount: () => _heartbeatListener !== null ? 1 : 0
|
|
315
|
+
};
|
|
261
316
|
|
|
262
|
-
export { ROTATION_CHECK_INTERVAL, resetTelemetryForTesting, initTelemetry, emit, addTelemetryListener, rotateTelemetryIfNeeded, telemetry, _internals };
|
|
317
|
+
export { startHeartbeatTracking, getLastHeartbeat, stopHeartbeatTracking, resetHeartbeatTrackingForTesting, ROTATION_CHECK_INTERVAL, resetTelemetryForTesting, initTelemetry, emit, addTelemetryListener, rotateTelemetryIfNeeded, telemetry, _internals };
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-nrvs08pr.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-x88w0cp5.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-h1k7ymtd.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-tbq2srrh.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-q9mq5tv3.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-6kmmdtdp.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-4yv2rn8q.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -84,30 +84,30 @@ import {
|
|
|
84
84
|
handleWriteRetroCommand,
|
|
85
85
|
normalizeSwarmCommandInput,
|
|
86
86
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-crw4n55v.js";
|
|
88
88
|
import"./index-13xxjfhn.js";
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
89
|
+
import"./index-grxkbbc5.js";
|
|
90
|
+
import"./index-ctvnb76s.js";
|
|
91
|
+
import"./index-ens0gt38.js";
|
|
92
92
|
import"./index-4905hd2m.js";
|
|
93
93
|
import"./index-134d35c1.js";
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
94
|
+
import"./index-a4972t0f.js";
|
|
95
|
+
import"./index-86wdrskb.js";
|
|
96
|
+
import"./index-vf6e8ame.js";
|
|
97
97
|
import"./index-vxv732ex.js";
|
|
98
98
|
import"./index-c8s9a3zh.js";
|
|
99
99
|
import"./index-9ss2m4rs.js";
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
100
|
+
import"./index-b7p0mp2q.js";
|
|
101
|
+
import"./index-z085b4ka.js";
|
|
102
|
+
import"./index-997d6p42.js";
|
|
103
|
+
import"./index-g0raqavt.js";
|
|
104
104
|
import"./index-rtry5xyf.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
105
|
+
import"./index-nrvs08pr.js";
|
|
106
|
+
import"./index-x88w0cp5.js";
|
|
107
107
|
import"./index-ae75rja9.js";
|
|
108
|
-
import"./index-
|
|
109
|
-
import"./index-
|
|
110
|
-
import"./index-
|
|
108
|
+
import"./index-yhba8swx.js";
|
|
109
|
+
import"./index-xg9repnx.js";
|
|
110
|
+
import"./index-e8w62fgs.js";
|
|
111
111
|
import"./index-k5jrywpr.js";
|
|
112
112
|
import"./index-n832052r.js";
|
|
113
113
|
import {
|
|
@@ -116,29 +116,29 @@ import {
|
|
|
116
116
|
init_constants,
|
|
117
117
|
init_schema,
|
|
118
118
|
stripKnownSwarmPrefix
|
|
119
|
-
} from "./index-
|
|
119
|
+
} from "./index-337r9pkr.js";
|
|
120
120
|
import"./index-bk5tah7q.js";
|
|
121
121
|
import"./index-8fwhhayc.js";
|
|
122
122
|
import"./index-q1exe2b3.js";
|
|
123
|
-
import"./index-
|
|
124
|
-
import"./index-
|
|
123
|
+
import"./index-ny93srnd.js";
|
|
124
|
+
import"./index-wxyxf0bd.js";
|
|
125
125
|
import"./index-1kz6da87.js";
|
|
126
126
|
import"./index-b4z7s917.js";
|
|
127
127
|
import"./index-b8zgtz81.js";
|
|
128
|
-
import"./index-
|
|
128
|
+
import"./index-44zgqvqh.js";
|
|
129
129
|
import"./index-4rhhvd1a.js";
|
|
130
|
-
import"./index-
|
|
130
|
+
import"./index-7an2qn0s.js";
|
|
131
131
|
import"./index-2ghkk9ve.js";
|
|
132
132
|
import"./index-fsrp8wp3.js";
|
|
133
|
-
import"./index-
|
|
133
|
+
import"./index-09b9zncg.js";
|
|
134
134
|
import"./index-7g4c7s5r.js";
|
|
135
|
-
import"./index-
|
|
135
|
+
import"./index-7a2hm51h.js";
|
|
136
136
|
import"./index-bpmtbmy9.js";
|
|
137
137
|
import"./index-z6xqpmqg.js";
|
|
138
138
|
import"./index-zjygnfay.js";
|
|
139
139
|
import"./index-qe3v54nb.js";
|
|
140
140
|
import"./index-zgwm4ryv.js";
|
|
141
|
-
import"./index-
|
|
141
|
+
import"./index-3nasn371.js";
|
|
142
142
|
import"./index-a76rekgs.js";
|
|
143
143
|
|
|
144
144
|
// src/commands/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-g0raqavt.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-nrvs08pr.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-yhba8swx.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-xg9repnx.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-997d6p42.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-nrvs08pr.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-x88w0cp5.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
atomicWriteFile,
|
|
4
4
|
taskEvidencePath,
|
|
5
5
|
withTaskEvidenceLock
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-xg9repnx.js";
|
|
7
7
|
import {
|
|
8
8
|
telemetry
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-7a2hm51h.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_external,
|
|
12
12
|
init_zod
|