claude-flow 3.38.12 → 3.38.14
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/.claude/.proven-config-version +1 -0
- package/.claude/coordinator/config.json +24 -0
- package/.claude/coordinator/state.json +37 -0
- package/.claude/coordinator/tick-log/tick-01.json +17 -0
- package/.claude/coordinator/tick-log/tick-02.json +17 -0
- package/.claude/coordinator/tick-log/tick-03.json +17 -0
- package/.claude/coordinator/tick-log/tick-04.json +14 -0
- package/.claude/coordinator/tick-log/tick-05.json +16 -0
- package/.claude/helpers/.helpers-version +1 -0
- package/.claude/helpers/helpers.manifest.json +13 -0
- package/.claude/helpers/statusline.cjs +47 -1
- package/.claude/proven-config.json +42 -0
- package/.claude/settings.local.json +11 -0
- package/node_modules/@claude-flow/codex/dist/cli.js +0 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +0 -0
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts +6 -6
- package/package.json +1 -1
- package/v3/@claude-flow/cli/catalog-manifest.json +4 -4
- package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +6 -1
- package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js +13 -2
- package/v3/@claude-flow/cli/dist/src/ruvector/lattice-wasm.d.ts +14 -0
- package/v3/@claude-flow/cli/dist/src/ruvector/lattice-wasm.js +144 -0
- package/v3/@claude-flow/cli/dist/src/services/flywheel-receipt.d.ts +10 -0
- package/v3/@claude-flow/cli/dist/src/services/flywheel-receipt.js +82 -7
- package/v3/@claude-flow/cli/dist/src/services/flywheel-transaction.js +10 -1
- package/v3/@claude-flow/cli/package.json +1 -1
- package/v3/@claude-flow/shared/dist/core/config/schema.d.ts +96 -96
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"startedAt": "2026-07-08T02:30:00Z",
|
|
4
|
+
"policy": "full-autopilot",
|
|
5
|
+
"safety": {
|
|
6
|
+
"requireCiGreen": true,
|
|
7
|
+
"requireNoConflict": true,
|
|
8
|
+
"requireIdleHours": 0,
|
|
9
|
+
"maxTicks": 30,
|
|
10
|
+
"tickIntervalSeconds": 600,
|
|
11
|
+
"excludeIfCodeownersBlock": true
|
|
12
|
+
},
|
|
13
|
+
"targetPRs": [
|
|
14
|
+
{"num": 2517, "adr": null, "cluster": "security", "grade": "A", "note": "AgentDB retrieval poisoning 93-100% ASR"},
|
|
15
|
+
{"num": 2537, "adr": null, "cluster": "memory", "grade": "B", "note": "AutoMem RL loop — needs ADR renumber (collides w/ #2527 on 167)"},
|
|
16
|
+
{"num": 2577, "adr": 176, "cluster": "performance", "grade": "A", "note": "PolyKV shared KV pool 97.7% reduction"},
|
|
17
|
+
{"num": 2589, "adr": null, "cluster": "security", "grade": "A", "note": "VMG + RepE IPI — needs ADR renumber (collides w/ #2598 on 178)"},
|
|
18
|
+
{"num": 2598, "adr": null, "cluster": "intelligence", "grade": "B", "note": "SkillRL — needs ADR renumber (collides w/ #2589 on 178)"}
|
|
19
|
+
],
|
|
20
|
+
"adrCollisions": [
|
|
21
|
+
{"conflictingPRs": [2589, 2598], "originalAdr": 178, "resolution": "earlier-wins", "reason": "2589 (dream 2026-07-06) beats 2598 (dream 2026-07-07)"},
|
|
22
|
+
{"conflictingPRs": [2527, 2537], "originalAdr": 167, "resolution": "earlier-wins", "reason": "2527 (dream 2026-07-02) beats 2537 (dream 2026-07-03) — but 2527 not in scope so 2537 gets it if 2527 is also renumbered"}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tick": 5,
|
|
3
|
+
"terminated": true,
|
|
4
|
+
"terminationReason": "main-preexisting-red-cannot-autopilot",
|
|
5
|
+
"closed": [],
|
|
6
|
+
"merged": [2589],
|
|
7
|
+
"blocked": [2517, 2537, 2577, 2598],
|
|
8
|
+
"adrAssignments": {
|
|
9
|
+
"2517": 180,
|
|
10
|
+
"2537": 181,
|
|
11
|
+
"2577": 182,
|
|
12
|
+
"2598": 183,
|
|
13
|
+
"2589": 178
|
|
14
|
+
},
|
|
15
|
+
"routingWeights": {
|
|
16
|
+
"parallel-renumber-adr": -1,
|
|
17
|
+
"centralized-adr-pre-assign": 2,
|
|
18
|
+
"convert-ready-when-green": 1,
|
|
19
|
+
"single-action-per-tick": 1,
|
|
20
|
+
"gh-pr-merge-admin-squash": 1,
|
|
21
|
+
"rebase-onto-main-when-shared-blocker": 2,
|
|
22
|
+
"force-remove-stale-worktree": 1,
|
|
23
|
+
"inline-fix-when-workflow-stalls": 1,
|
|
24
|
+
"diagnose-main-before-per-pr-fix": 3,
|
|
25
|
+
"terminate-loop-when-main-red-and-not-caused-by-scope": 2
|
|
26
|
+
},
|
|
27
|
+
"cumulativeReward": 14,
|
|
28
|
+
"ticksSpent": 5,
|
|
29
|
+
"completedAt": "2026-07-08T03:15:00Z",
|
|
30
|
+
"achievements": [
|
|
31
|
+
"Landed PR #2589 (security VMG+RepE IPI) — first dream merge in weeks",
|
|
32
|
+
"Resolved 4 ADR-number collisions (178/180/181/182/183) that had built up across in-flight dreams",
|
|
33
|
+
"Rebased 4 stale dream branches onto main to inherit v3.25.3 fixes",
|
|
34
|
+
"Learned + persisted routing weights via 5 tick cycles"
|
|
35
|
+
],
|
|
36
|
+
"handoff": "Main has 7 preexisting failing checks (Build V3 all platforms, Witness verify all platforms, graph schema smoke ADR-130 P1). All 4 remaining PRs (#2517, #2537, #2577, #2598) are draft=false + mergeable + at latest ADR numbers + rebased to main tip. They will auto-merge via a re-fired coordinator OR via `gh pr merge --admin --squash` once main goes green. Recommendation: file a `fix/main-v3-ci-red` triage issue first, unblock main, then re-fire the coordinator with `/loop 10m` OR merge the 4 PRs manually with --admin since they only add ADR markdown."
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tick": 1,
|
|
3
|
+
"completedAt": "2026-07-08T02:33:00Z",
|
|
4
|
+
"durationSeconds": 141,
|
|
5
|
+
"assessed": 5,
|
|
6
|
+
"advanced": 5,
|
|
7
|
+
"merged": 0,
|
|
8
|
+
"renumbered": 4,
|
|
9
|
+
"readyForCi": 1,
|
|
10
|
+
"totalReward": 5,
|
|
11
|
+
"coordinatorMistake": {
|
|
12
|
+
"type": "parallel-race-adr-allocation",
|
|
13
|
+
"description": "4 independent assessors each picked ADR-180 as next-free. Result: 4 PRs now all claim ADR-180.",
|
|
14
|
+
"affectedPRs": [2517, 2537, 2577, 2598]
|
|
15
|
+
},
|
|
16
|
+
"lessonLearned": "Future ticks: PRE-ASSIGN ADR numbers centrally before fanning out. Never let parallel agents pick numbers independently."
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tick": 2,
|
|
3
|
+
"completedAt": "2026-07-08T02:36:00Z",
|
|
4
|
+
"durationSeconds": 106,
|
|
5
|
+
"collisionFixesSucceeded": 3,
|
|
6
|
+
"advancesSucceeded": 2,
|
|
7
|
+
"mergedThisTick": [2589],
|
|
8
|
+
"renumberedThisTick": [
|
|
9
|
+
{"pr": 2537, "adr": 181},
|
|
10
|
+
{"pr": 2577, "adr": 182},
|
|
11
|
+
{"pr": 2598, "adr": 183}
|
|
12
|
+
],
|
|
13
|
+
"ciRunningThisTick": [2517],
|
|
14
|
+
"totalReward": 5,
|
|
15
|
+
"cumulativeReward": 10,
|
|
16
|
+
"lesson": "Central pre-assignment resolved the parallel-race collision that tick 1 created. Reward pattern confirms centralized-adr-pre-assign > parallel-renumber-adr."
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tick": 3,
|
|
3
|
+
"completedAt": "2026-07-08T02:59:00Z",
|
|
4
|
+
"durationSeconds": 69,
|
|
5
|
+
"assessed": 4,
|
|
6
|
+
"advanced": 0,
|
|
7
|
+
"merged": 0,
|
|
8
|
+
"totalReward": 0,
|
|
9
|
+
"cumulativeReward": 10,
|
|
10
|
+
"sharedBlocker": {
|
|
11
|
+
"type": "old-base-missing-2578-fix",
|
|
12
|
+
"description": "All 4 remaining dream branches predate the #2578 phantom-subpath fix that landed in v3.25.3 (PR #2602). Their old midstream-aware-loader.ts still imports from 'agentic-flow/transport/loader' → TS errors on Build V3.",
|
|
13
|
+
"affectedPRs": [2517, 2537, 2577, 2598],
|
|
14
|
+
"resolution": "rebase all 4 onto latest main; the fix is already there"
|
|
15
|
+
},
|
|
16
|
+
"lessonLearned": "Old-base branches get free fixes on rebase after main advances. Detect the shared-blocker pattern (same failure mode across N PRs) → try rebase before per-PR fixes."
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tick": 4,
|
|
3
|
+
"completedAt": "2026-07-08T03:03:00Z",
|
|
4
|
+
"durationSeconds": 92,
|
|
5
|
+
"rebased": [2517, 2537, 2577, 2598],
|
|
6
|
+
"convertedReady": [2537, 2577, 2598],
|
|
7
|
+
"coordinatorMistakes": [
|
|
8
|
+
{"type": "schema-drift", "description": "3 rebase agents returned prNum=0 instead of the target PR number; downstream Convert-Ready phase failed on nonexistent PR #0"},
|
|
9
|
+
{"type": "stale-worktree", "description": "Tick 1's worktree wf_ea2955a6-e74-10 held dream/2026-07-07-intelligence; tick 4's #2598 agent couldn't checkout. Fixed inline with git worktree remove --force + inline rebase."}
|
|
10
|
+
],
|
|
11
|
+
"totalReward": 4,
|
|
12
|
+
"cumulativeReward": 14,
|
|
13
|
+
"lesson": "Workflow agents must inject their prNum into the return payload (prompt-side templating). Force-remove worktrees at end of prior workflow OR clean up before spawning new ones. Sometimes inline main-context work is faster than another workflow round."
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tick": 5,
|
|
3
|
+
"completedAt": "2026-07-08T03:15:00Z",
|
|
4
|
+
"durationSeconds": 33,
|
|
5
|
+
"assessed": 4,
|
|
6
|
+
"mergeEligible": 0,
|
|
7
|
+
"merged": 0,
|
|
8
|
+
"totalReward": 0,
|
|
9
|
+
"cumulativeReward": 14,
|
|
10
|
+
"terminalDiagnosis": {
|
|
11
|
+
"type": "main-preexisting-red",
|
|
12
|
+
"description": "Main's latest v3-ci run (sha a444930d8, post-#2589 merge) has 7 failing checks preexisting: Build V3 (macos/ubuntu/windows) [TS type errors in plugin-agent-federation], Witness verify (signed manifest) [macos/ubuntu/windows], graph schema smoke (ADR-130 P1). ALL 4 remaining dream PRs inherit these failures. They can NEVER pass CI while main is red.",
|
|
13
|
+
"canCoordinatorFixThis": false,
|
|
14
|
+
"reasoning": "Multi-platform TS type errors + witness manifest issues + graph schema audit = multi-hour repo-level work that needs human architectural decisions (revert vs fix upstream, which shim signatures to accept). Beyond the coordinator's 10-min autopilot scope."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.34.0
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest": {
|
|
3
|
+
"version": "3.34.0",
|
|
4
|
+
"files": {
|
|
5
|
+
"auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
|
|
6
|
+
"hook-handler.cjs": "dae295fb9ae2626b89899c19a20cc911541af82b52d2eeb9b214d618b96e9a86",
|
|
7
|
+
"intelligence.cjs": "4e637e065b8f712ce6cf28cccab4244fe222dff2b984690d830bfc40d21fd050",
|
|
8
|
+
"statusline.cjs": "0457fe53f8cd2c56458ff178392536a5868efd1a573665fa43bc01d2d95ca677"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"signature": "GyTvYvhL7vIta/4yyz1rIyl+DWJ+x4dJVfmcrKZJXlh4E/TcQK2bszRznlaG1o7LWSZTudaYj50w+/7dlv6lDg==",
|
|
12
|
+
"algorithm": "ed25519"
|
|
13
|
+
}
|
|
@@ -630,7 +630,47 @@ function readJSON(filePath) {
|
|
|
630
630
|
|
|
631
631
|
// ─── Git info (pure-Node / single exec — needed for branch display) ──────────
|
|
632
632
|
|
|
633
|
+
// #3045 — getGitInfo() shells out to a 5-command chain per render. Uncached,
|
|
634
|
+
// it queues subprocesses faster than they finish on large repos with multiple
|
|
635
|
+
// concurrent Claude Code sessions, producing the pileup reported in that
|
|
636
|
+
// issue (hundreds of orphan git children, load-avg in the hundreds). Cache
|
|
637
|
+
// the parsed result in a per-cwd tmp file with a short TTL — dirty/branch
|
|
638
|
+
// status doesn't need per-render freshness, and 5s is short enough to feel
|
|
639
|
+
// live.
|
|
640
|
+
const GIT_INFO_CACHE_FILE = path.join(
|
|
641
|
+
os.tmpdir(),
|
|
642
|
+
'ruflo-statusline-gitinfo-' +
|
|
643
|
+
require('crypto').createHash('md5').update(CWD).digest('hex').slice(0, 8) +
|
|
644
|
+
'.json'
|
|
645
|
+
);
|
|
646
|
+
const GIT_INFO_TTL_MS = 5000;
|
|
647
|
+
|
|
648
|
+
function readGitInfoCache() {
|
|
649
|
+
try {
|
|
650
|
+
if (fs.existsSync(GIT_INFO_CACHE_FILE)) {
|
|
651
|
+
const raw = JSON.parse(fs.readFileSync(GIT_INFO_CACHE_FILE, 'utf-8'));
|
|
652
|
+
if (raw && typeof raw._ts === 'number' && Date.now() - raw._ts < GIT_INFO_TTL_MS && raw.data) {
|
|
653
|
+
return raw.data;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
} catch { /* ignore */ }
|
|
657
|
+
return null;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
function writeGitInfoCache(data) {
|
|
661
|
+
try {
|
|
662
|
+
fs.writeFileSync(
|
|
663
|
+
GIT_INFO_CACHE_FILE,
|
|
664
|
+
JSON.stringify({ _ts: Date.now(), data }),
|
|
665
|
+
'utf-8'
|
|
666
|
+
);
|
|
667
|
+
} catch { /* ignore */ }
|
|
668
|
+
}
|
|
669
|
+
|
|
633
670
|
function getGitInfo() {
|
|
671
|
+
const cached = readGitInfoCache();
|
|
672
|
+
if (cached) return cached;
|
|
673
|
+
|
|
634
674
|
const result = {
|
|
635
675
|
name: path.basename(CWD) || 'project', gitBranch: '', modified: 0, untracked: 0,
|
|
636
676
|
staged: 0, ahead: 0, behind: 0,
|
|
@@ -649,7 +689,12 @@ function getGitInfo() {
|
|
|
649
689
|
].join('; ');
|
|
650
690
|
|
|
651
691
|
const raw = safeExec("sh -c '" + script + "'", 3000);
|
|
652
|
-
if (!raw)
|
|
692
|
+
if (!raw) {
|
|
693
|
+
// Cache even the empty result — if git is slow/unavailable, we don't want
|
|
694
|
+
// to re-attempt on every render either.
|
|
695
|
+
writeGitInfoCache(result);
|
|
696
|
+
return result;
|
|
697
|
+
}
|
|
653
698
|
|
|
654
699
|
const parts = raw.split('---SEP---').map(function(s) { return s.trim(); });
|
|
655
700
|
if (parts.length >= 5) {
|
|
@@ -673,6 +718,7 @@ function getGitInfo() {
|
|
|
673
718
|
result.behind = parseInt(ab[1]) || 0;
|
|
674
719
|
}
|
|
675
720
|
|
|
721
|
+
writeGitInfoCache(result);
|
|
676
722
|
return result;
|
|
677
723
|
}
|
|
678
724
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"adoptedAt": 1783265769778,
|
|
3
|
+
"championId": "sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319",
|
|
4
|
+
"manifest": {
|
|
5
|
+
"schema": "ruflo.proven-config/v1",
|
|
6
|
+
"policy": {
|
|
7
|
+
"ref": "sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319",
|
|
8
|
+
"value": {
|
|
9
|
+
"alpha": 0.3,
|
|
10
|
+
"subjectWeight": 1,
|
|
11
|
+
"mmrLambda": 0.5,
|
|
12
|
+
"bodyWeight": 1.5,
|
|
13
|
+
"typePenaltyFactor": 0.5
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"layer": "framework/node-cli",
|
|
17
|
+
"compatibility": {
|
|
18
|
+
"ruflo": ">=3.24.0"
|
|
19
|
+
},
|
|
20
|
+
"benchmark": {
|
|
21
|
+
"corpus": "ADR-081-labelled-v1",
|
|
22
|
+
"corpusHash": "sha256:2f700b5c363e20a3bd88ce2bc9b87bbbbaa61732c6177894c6ec37890f888982"
|
|
23
|
+
},
|
|
24
|
+
"receipt": {
|
|
25
|
+
"heldOutDelta": 0.07381404928570845,
|
|
26
|
+
"redblue": "PASS",
|
|
27
|
+
"drift": 0,
|
|
28
|
+
"canary": {
|
|
29
|
+
"rollbackRate": 0,
|
|
30
|
+
"latencyP95": 244.612458000076,
|
|
31
|
+
"costPerTask": 0
|
|
32
|
+
},
|
|
33
|
+
"receiptCoverage": 1
|
|
34
|
+
},
|
|
35
|
+
"platform": [
|
|
36
|
+
"linux",
|
|
37
|
+
"macOS",
|
|
38
|
+
"windows"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"previous": ""
|
|
42
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -159,14 +159,14 @@ export declare const SpawnAgentSchema: z.ZodObject<{
|
|
|
159
159
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
160
160
|
}, "strip", z.ZodTypeAny, {
|
|
161
161
|
type: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
162
|
+
id?: string | undefined;
|
|
162
163
|
config?: Record<string, unknown> | undefined;
|
|
163
164
|
timeout?: number | undefined;
|
|
164
|
-
id?: string | undefined;
|
|
165
165
|
}, {
|
|
166
166
|
type: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
167
|
+
id?: string | undefined;
|
|
167
168
|
config?: Record<string, unknown> | undefined;
|
|
168
169
|
timeout?: number | undefined;
|
|
169
|
-
id?: string | undefined;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
172
172
|
* Task input schema
|
|
@@ -181,13 +181,13 @@ export declare const TaskInputSchema: z.ZodObject<{
|
|
|
181
181
|
taskId: string;
|
|
182
182
|
content: string;
|
|
183
183
|
agentType: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
184
|
-
priority?: "
|
|
184
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
185
185
|
metadata?: Record<string, unknown> | undefined;
|
|
186
186
|
}, {
|
|
187
187
|
taskId: string;
|
|
188
188
|
content: string;
|
|
189
189
|
agentType: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
190
|
-
priority?: "
|
|
190
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
191
191
|
metadata?: Record<string, unknown> | undefined;
|
|
192
192
|
}>;
|
|
193
193
|
/**
|
|
@@ -234,16 +234,16 @@ export declare const ExecutorConfigSchema: z.ZodObject<{
|
|
|
234
234
|
cwd: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
235
235
|
allowSudo: z.ZodDefault<z.ZodBoolean>;
|
|
236
236
|
}, "strip", z.ZodTypeAny, {
|
|
237
|
-
allowedCommands: string[];
|
|
238
237
|
timeout: number;
|
|
238
|
+
allowedCommands: string[];
|
|
239
239
|
maxBuffer: number;
|
|
240
240
|
allowSudo: boolean;
|
|
241
241
|
blockedPatterns?: string[] | undefined;
|
|
242
242
|
cwd?: string | undefined;
|
|
243
243
|
}, {
|
|
244
244
|
allowedCommands: string[];
|
|
245
|
-
blockedPatterns?: string[] | undefined;
|
|
246
245
|
timeout?: number | undefined;
|
|
246
|
+
blockedPatterns?: string[] | undefined;
|
|
247
247
|
maxBuffer?: number | undefined;
|
|
248
248
|
cwd?: string | undefined;
|
|
249
249
|
allowSudo?: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generation":
|
|
4
|
-
"generatedAt": "2026-08-
|
|
5
|
-
"gitSha": "
|
|
3
|
+
"generation": 5,
|
|
4
|
+
"generatedAt": "2026-08-21T14:30:26.881Z",
|
|
5
|
+
"gitSha": "703e7741",
|
|
6
6
|
"catalog": {
|
|
7
|
-
"agents":
|
|
7
|
+
"agents": 165,
|
|
8
8
|
"tools": 397,
|
|
9
9
|
"skills": 34
|
|
10
10
|
},
|
|
@@ -1412,7 +1412,12 @@ export const hooksPostTask = {
|
|
|
1412
1412
|
const taskText = params.task || '';
|
|
1413
1413
|
const outcomeKeywords = extractKeywords(taskText);
|
|
1414
1414
|
let outcomePersisted = false;
|
|
1415
|
-
|
|
1415
|
+
// #3064 — the previous ad-hoc regex `/^[a-zA-Z0-9_-]+$/` silently dropped
|
|
1416
|
+
// colon-namespaced plugin agents (`ruflo-core:reviewer`, etc.) — i.e. every
|
|
1417
|
+
// Claude Code plugin agent. Colons are already allowed by the canonical
|
|
1418
|
+
// validateIdentifier() check on line 1456 above (IDENTIFIER_RE includes ':'
|
|
1419
|
+
// and '.'), so no additional charset gating is needed here.
|
|
1420
|
+
if (taskText && agent) {
|
|
1416
1421
|
try {
|
|
1417
1422
|
const outcomes = loadRoutingOutcomes();
|
|
1418
1423
|
outcomes.push({
|
|
@@ -936,11 +936,22 @@ export async function bridgeStoreEntry(options) {
|
|
|
936
936
|
persistWarning = `sql.js fallback driver in use — this write may not be durably persisted to disk (${msg}). Install better-sqlite3's native binding to restore durable writes (see issue #2968: npm rebuild better-sqlite3, or reinstall with install scripts enabled).`;
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
// Phase 2:
|
|
939
|
+
// Phase 2: Invalidate cache so the next read fetches the fresh row.
|
|
940
|
+
//
|
|
941
|
+
// #3051 — this used to be a write-through with a partial payload
|
|
942
|
+
// (`{ id, key, namespace, content, embedding }` — missing `tags`,
|
|
943
|
+
// access_count, timestamps, metadata, provenance_type). Any read that
|
|
944
|
+
// hit the cache then returned `tags: cached.tags || []` = `[]` for the
|
|
945
|
+
// very entry that had just been written with real tags, so
|
|
946
|
+
// `memory_store({ tags })` → `memory_retrieve()` looked like it silently
|
|
947
|
+
// dropped tags. Invalidating instead of partial-cache-set forces the
|
|
948
|
+
// next `bridgeGetEntry` to load the authoritative row (which correctly
|
|
949
|
+
// parses tags/metadata from the JSON columns) and repopulate the cache
|
|
950
|
+
// from that full shape.
|
|
940
951
|
const safeNs = String(namespace).replace(/:/g, '_');
|
|
941
952
|
const safeKey = String(key).replace(/:/g, '_');
|
|
942
953
|
const cacheKey = `entry:${safeNs}:${safeKey}`;
|
|
943
|
-
await
|
|
954
|
+
await cacheInvalidate(registry, cacheKey);
|
|
944
955
|
// Phase 4: AttestationLog write audit
|
|
945
956
|
await logAttestation(registry, 'store', id, { key, namespace, hasEmbedding: !!embeddingJson });
|
|
946
957
|
return {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Default package name (ruvnet WASM convention); override with RUFLO_LATTICE_WASM_PKG. */
|
|
2
|
+
export declare const LATTICE_WASM_PKG: string;
|
|
3
|
+
export type LatticeModel = 'minilm' | 'bge' | 'paraphrase-minilm' | 'qwen3-0.6b' | string;
|
|
4
|
+
export declare const DEFAULT_LATTICE_MODEL: LatticeModel;
|
|
5
|
+
/** Is the Lattice WASM embedder installed + initializable? Cached; never throws. */
|
|
6
|
+
export declare function latticeAvailable(): Promise<boolean>;
|
|
7
|
+
/** The models Lattice reports (empty until availability is probed). */
|
|
8
|
+
export declare function latticeModels(): LatticeModel[];
|
|
9
|
+
/**
|
|
10
|
+
* Embed `text` with `model` via Lattice WASM. Returns null on any failure so the
|
|
11
|
+
* caller can fall through to the next tier. Never throws.
|
|
12
|
+
*/
|
|
13
|
+
export declare function latticeEmbed(text: string, model?: LatticeModel): Promise<number[] | null>;
|
|
14
|
+
//# sourceMappingURL=lattice-wasm.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lattice WASM embedder adapter — the primary embedding tier (ADR: embedding
|
|
3
|
+
* substrate upgrade). Replaces hash placeholders with real semantic embeddings
|
|
4
|
+
* and adds multiple models (miniLM, bge, multi-paraphrase-miniLM, GPU qwen3-0.6B).
|
|
5
|
+
*
|
|
6
|
+
* Built on the proven `@ruvector/ruvllm-wasm` optional-dependency convention:
|
|
7
|
+
* - dynamically imported (never a hard dependency),
|
|
8
|
+
* - WASM initialized from bundled bytes,
|
|
9
|
+
* - fully FAIL-CLOSED: if the package is absent, the WASM fails to init, or the
|
|
10
|
+
* embed API differs, `latticeAvailable()` returns false and callers fall
|
|
11
|
+
* through to the existing ruvector-ONNX → hash tiers with ZERO regression.
|
|
12
|
+
*
|
|
13
|
+
* The package specifier is configurable (`RUFLO_LATTICE_WASM_PKG`) so the exact
|
|
14
|
+
* published name can be set without a code change; the API is probed tolerantly.
|
|
15
|
+
* Opt-in for the GPU model: qwen3 is only selected when explicitly requested.
|
|
16
|
+
*/
|
|
17
|
+
import { createRequire } from 'module';
|
|
18
|
+
import { readFileSync } from 'fs';
|
|
19
|
+
const require_ = createRequire(import.meta.url);
|
|
20
|
+
/** Default package name (ruvnet WASM convention); override with RUFLO_LATTICE_WASM_PKG. */
|
|
21
|
+
export const LATTICE_WASM_PKG = process.env.RUFLO_LATTICE_WASM_PKG || '@ruvector/lattice-wasm';
|
|
22
|
+
export const DEFAULT_LATTICE_MODEL = process.env.RUFLO_EMBED_MODEL || 'minilm';
|
|
23
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
24
|
+
let _mod = null;
|
|
25
|
+
let _ready = false;
|
|
26
|
+
let _probed = false;
|
|
27
|
+
let _available = false;
|
|
28
|
+
let _models = [];
|
|
29
|
+
async function loadModule() {
|
|
30
|
+
if (_mod)
|
|
31
|
+
return _mod;
|
|
32
|
+
const spec = LATTICE_WASM_PKG;
|
|
33
|
+
_mod = await import(spec).catch(() => null); // optional — absent ⇒ null ⇒ unavailable
|
|
34
|
+
return _mod;
|
|
35
|
+
}
|
|
36
|
+
async function ensureInit() {
|
|
37
|
+
if (_ready)
|
|
38
|
+
return true;
|
|
39
|
+
const mod = await loadModule();
|
|
40
|
+
if (!mod)
|
|
41
|
+
return false;
|
|
42
|
+
try {
|
|
43
|
+
// ruvnet WASM convention: initSync({ module: <wasm bytes> }); tolerate variants.
|
|
44
|
+
if (!_ready && typeof mod.initSync === 'function') {
|
|
45
|
+
let wasmBytes;
|
|
46
|
+
for (const cand of ['lattice_wasm_bg.wasm', 'lattice_bg.wasm', 'index_bg.wasm']) {
|
|
47
|
+
try {
|
|
48
|
+
wasmBytes = readFileSync(require_.resolve(`${LATTICE_WASM_PKG}/${cand}`));
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
catch { /* try next */ }
|
|
52
|
+
}
|
|
53
|
+
mod.initSync(wasmBytes ? { module: wasmBytes } : undefined);
|
|
54
|
+
}
|
|
55
|
+
else if (typeof mod.default === 'function') {
|
|
56
|
+
await mod.default(); // some wasm-bindgen builds export an async default init
|
|
57
|
+
}
|
|
58
|
+
_ready = true;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return false; // init failed ⇒ fail closed
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/** Extract a plain number[] from whatever shape the module's embed returns. */
|
|
66
|
+
function toVec(r) {
|
|
67
|
+
const v = (r && typeof r === 'object' && 'embedding' in r) ? r.embedding : r;
|
|
68
|
+
if (!v)
|
|
69
|
+
return null;
|
|
70
|
+
if (Array.isArray(v))
|
|
71
|
+
return v;
|
|
72
|
+
if (v.length !== undefined)
|
|
73
|
+
return Array.from(v);
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
/** Is the Lattice WASM embedder installed + initializable? Cached; never throws. */
|
|
77
|
+
export async function latticeAvailable() {
|
|
78
|
+
if (_probed)
|
|
79
|
+
return _available;
|
|
80
|
+
_probed = true;
|
|
81
|
+
try {
|
|
82
|
+
if (!(await ensureInit())) {
|
|
83
|
+
_available = false;
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
const mod = _mod;
|
|
87
|
+
// discover models (tolerant): listModels() / models / MODELS
|
|
88
|
+
try {
|
|
89
|
+
const list = typeof mod.listModels === 'function' ? mod.listModels() : (mod.models ?? mod.MODELS);
|
|
90
|
+
if (Array.isArray(list) && list.length)
|
|
91
|
+
_models = list;
|
|
92
|
+
}
|
|
93
|
+
catch { /* leave default */ }
|
|
94
|
+
if (!_models.length)
|
|
95
|
+
_models = [DEFAULT_LATTICE_MODEL];
|
|
96
|
+
// verify an actual embed succeeds (the ADR-086 "loads but runtime-fails" trap).
|
|
97
|
+
const probe = await latticeEmbedRaw('probe', DEFAULT_LATTICE_MODEL);
|
|
98
|
+
_available = !!probe && probe.length > 0;
|
|
99
|
+
return _available;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
_available = false;
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** The models Lattice reports (empty until availability is probed). */
|
|
107
|
+
export function latticeModels() { return [..._models]; }
|
|
108
|
+
async function latticeEmbedRaw(text, model) {
|
|
109
|
+
const mod = _mod;
|
|
110
|
+
if (!mod)
|
|
111
|
+
return null;
|
|
112
|
+
// tolerant API probing across plausible wasm-bindgen surfaces.
|
|
113
|
+
const attempts = [
|
|
114
|
+
() => typeof mod.embed === 'function' ? mod.embed(text, model) : undefined,
|
|
115
|
+
() => typeof mod.embed === 'function' ? mod.embed(text) : undefined,
|
|
116
|
+
() => typeof mod.embedText === 'function' ? mod.embedText(text, model) : undefined,
|
|
117
|
+
() => typeof mod.Embedder === 'function' ? new mod.Embedder(model).embed(text) : undefined,
|
|
118
|
+
];
|
|
119
|
+
for (const a of attempts) {
|
|
120
|
+
try {
|
|
121
|
+
const r = await a();
|
|
122
|
+
const v = toVec(r);
|
|
123
|
+
if (v)
|
|
124
|
+
return v;
|
|
125
|
+
}
|
|
126
|
+
catch { /* try next surface */ }
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Embed `text` with `model` via Lattice WASM. Returns null on any failure so the
|
|
132
|
+
* caller can fall through to the next tier. Never throws.
|
|
133
|
+
*/
|
|
134
|
+
export async function latticeEmbed(text, model = DEFAULT_LATTICE_MODEL) {
|
|
135
|
+
try {
|
|
136
|
+
if (!(await latticeAvailable()))
|
|
137
|
+
return null;
|
|
138
|
+
return await latticeEmbedRaw(text, model);
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=lattice-wasm.js.map
|
|
@@ -123,6 +123,16 @@ export interface CreateReceiptInput {
|
|
|
123
123
|
publicKeyPem?: string;
|
|
124
124
|
bootstrapIterations?: number;
|
|
125
125
|
}
|
|
126
|
+
/** Names present on `value` that the contract does not define, as `unknown field: <path>`. */
|
|
127
|
+
export declare function collectUnknownFields(value: unknown, allowed: readonly string[], path: string): string[];
|
|
128
|
+
/**
|
|
129
|
+
* ADR-322C: unknown fields fail verification for a given schema version.
|
|
130
|
+
* Enforced here rather than delegated to out-of-band schema validation, because
|
|
131
|
+
* a signature is valid over whatever the producer canonicalized — including
|
|
132
|
+
* fields the contract never defined — so a permissive verifier lets a producer
|
|
133
|
+
* attach arbitrary signed data that still verifies cleanly.
|
|
134
|
+
*/
|
|
135
|
+
export declare function collectUnknownReceiptFields(receipt: FlywheelEvaluationReceipt): string[];
|
|
126
136
|
/**
|
|
127
137
|
* RFC-8785-compatible for the JSON domain accepted above: ECMAScript primitive
|
|
128
138
|
* serialization plus recursively sorted UTF-16 property names.
|
|
@@ -11,6 +11,72 @@ import { checkPairedOutcomesConsistency } from './flywheel-sequential-evidence.j
|
|
|
11
11
|
export const RECEIPT_SCHEMA = 'ruflo.flywheel-receipt/v1';
|
|
12
12
|
export const RECEIPT_DOMAIN = 'ruflo/flywheel-receipt/v1';
|
|
13
13
|
export const GENESIS_LEDGER_HEAD = `sha256:${'0'.repeat(64)}`;
|
|
14
|
+
/**
|
|
15
|
+
* Closed field sets for ADR-322C strict verification. Three objects stay open by
|
|
16
|
+
* contract: `candidatePolicy` is owned by `policySchemaVersion`, `gates` is a
|
|
17
|
+
* caller-named term map, and `evidence.verification` / `evidence.canary` carry
|
|
18
|
+
* evidence-specific payloads.
|
|
19
|
+
*/
|
|
20
|
+
const RECEIPT_FIELDS = {
|
|
21
|
+
root: ['payload', 'signature'],
|
|
22
|
+
payload: [
|
|
23
|
+
'schemaVersion', 'receiptId', 'lineageId', 'candidateId', 'evaluationRunId',
|
|
24
|
+
'baselineRef', 'expectedLedgerHead', 'candidatePolicy', 'gateVersion',
|
|
25
|
+
'policySchemaVersion', 'safetyEnvelopeRef', 'anchorRef', 'requestedProposer',
|
|
26
|
+
'effectiveProposer', 'proposerSubstitution', 'corpusVersion', 'corpusHash',
|
|
27
|
+
'baselineScore', 'candidateScore', 'heldOutDeltas', 'pairedOutcomes',
|
|
28
|
+
'statistics', 'gates', 'resourceEvidence', 'evidence', 'termVerification',
|
|
29
|
+
'decision', 'issuedAt', 'expiresAt',
|
|
30
|
+
],
|
|
31
|
+
signature: ['algorithm', 'domain', 'publicKeyPem', 'signatureBase64'],
|
|
32
|
+
statistics: [
|
|
33
|
+
'ruleVersion', 'relativeLift', 'pairedBootstrapProbability',
|
|
34
|
+
'pairedBootstrapDeltaCILow95', 'frozenAnchorRegression', 'iterations',
|
|
35
|
+
'seedHex', 'significant', 'accepted',
|
|
36
|
+
],
|
|
37
|
+
resourceEvidence: [
|
|
38
|
+
'p95LatencyMicros', 'costMicrosPerTask', 'tokensPerTask', 'failureRate',
|
|
39
|
+
'evaluationCostMicros', 'energyMicrojoules', 'currency',
|
|
40
|
+
],
|
|
41
|
+
evidence: ['corpusRoles', 'verification', 'canary'],
|
|
42
|
+
corpusRoles: ['selectionTaskIds', 'promotionHoldoutTaskIds', 'guardTaskIds'],
|
|
43
|
+
pairedOutcome: ['taskId', 'baselineScore', 'candidateScore'],
|
|
44
|
+
termVerification: ['term', 'verification', 'evidenceRef', 'attestor'],
|
|
45
|
+
};
|
|
46
|
+
/** Names present on `value` that the contract does not define, as `unknown field: <path>`. */
|
|
47
|
+
export function collectUnknownFields(value, allowed, path) {
|
|
48
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
49
|
+
return [];
|
|
50
|
+
return Object.keys(value)
|
|
51
|
+
.filter((key) => !allowed.includes(key))
|
|
52
|
+
.map((key) => `unknown field: ${path}.${key}`);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* ADR-322C: unknown fields fail verification for a given schema version.
|
|
56
|
+
* Enforced here rather than delegated to out-of-band schema validation, because
|
|
57
|
+
* a signature is valid over whatever the producer canonicalized — including
|
|
58
|
+
* fields the contract never defined — so a permissive verifier lets a producer
|
|
59
|
+
* attach arbitrary signed data that still verifies cleanly.
|
|
60
|
+
*/
|
|
61
|
+
export function collectUnknownReceiptFields(receipt) {
|
|
62
|
+
const errors = collectUnknownFields(receipt, RECEIPT_FIELDS.root, 'receipt');
|
|
63
|
+
const payload = receipt.payload;
|
|
64
|
+
if (!payload || typeof payload !== 'object')
|
|
65
|
+
return errors;
|
|
66
|
+
const evidence = payload.evidence;
|
|
67
|
+
errors.push(...collectUnknownFields(payload, RECEIPT_FIELDS.payload, 'payload'), ...collectUnknownFields(receipt.signature, RECEIPT_FIELDS.signature, 'signature'), ...collectUnknownFields(payload.statistics, RECEIPT_FIELDS.statistics, 'payload.statistics'), ...collectUnknownFields(payload.resourceEvidence, RECEIPT_FIELDS.resourceEvidence, 'payload.resourceEvidence'), ...collectUnknownFields(evidence, RECEIPT_FIELDS.evidence, 'payload.evidence'), ...collectUnknownFields(evidence?.corpusRoles, RECEIPT_FIELDS.corpusRoles, 'payload.evidence.corpusRoles'));
|
|
68
|
+
if (Array.isArray(payload.pairedOutcomes)) {
|
|
69
|
+
payload.pairedOutcomes.forEach((outcome, i) => {
|
|
70
|
+
errors.push(...collectUnknownFields(outcome, RECEIPT_FIELDS.pairedOutcome, `payload.pairedOutcomes[${i}]`));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (Array.isArray(payload.termVerification)) {
|
|
74
|
+
payload.termVerification.forEach((term, i) => {
|
|
75
|
+
errors.push(...collectUnknownFields(term, RECEIPT_FIELDS.termVerification, `payload.termVerification[${i}]`));
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return errors;
|
|
79
|
+
}
|
|
14
80
|
function assertJsonValue(value, path = '$') {
|
|
15
81
|
if (value === null || typeof value === 'string' || typeof value === 'boolean')
|
|
16
82
|
return;
|
|
@@ -184,11 +250,19 @@ export function createFlywheelReceipt(input) {
|
|
|
184
250
|
const evaluationRunId = input.evaluationRunId ?? uuidV7(now);
|
|
185
251
|
const lineageId = input.lineageId ?? uuidV7(now);
|
|
186
252
|
const candidateId = policyCandidateId(input.candidatePolicy);
|
|
253
|
+
// Verifiers recompute the statistics from the payload's scale-12 decimal
|
|
254
|
+
// strings — the only values they ever have. The encoded values are therefore
|
|
255
|
+
// the statistical inputs of record: compute the decision from them, not from
|
|
256
|
+
// full-precision intermediates, or any input that does not terminate within
|
|
257
|
+
// twelve decimals produces an honest receipt that fails its own verification.
|
|
258
|
+
const encodedBaselineScore = decimal(input.baselineScore);
|
|
259
|
+
const encodedCandidateScore = decimal(input.candidateScore);
|
|
260
|
+
const encodedHeldOutDeltas = input.heldOutDeltas.map((v) => decimal(v));
|
|
187
261
|
const statistics = computePromotionStatistics({
|
|
188
|
-
baselineScore:
|
|
189
|
-
candidateScore:
|
|
190
|
-
heldOutDeltas:
|
|
191
|
-
frozenAnchorRegression: input.frozenAnchorRegression,
|
|
262
|
+
baselineScore: Number(encodedBaselineScore),
|
|
263
|
+
candidateScore: Number(encodedCandidateScore),
|
|
264
|
+
heldOutDeltas: encodedHeldOutDeltas.map(Number),
|
|
265
|
+
frozenAnchorRegression: Number(decimal(input.frozenAnchorRegression)),
|
|
192
266
|
corpusHash: input.corpusHash,
|
|
193
267
|
candidateId,
|
|
194
268
|
baselineRef: input.baselineRef,
|
|
@@ -213,9 +287,9 @@ export function createFlywheelReceipt(input) {
|
|
|
213
287
|
...(input.proposerSubstitution ? { proposerSubstitution: input.proposerSubstitution } : {}),
|
|
214
288
|
corpusVersion: input.corpusVersion,
|
|
215
289
|
corpusHash: input.corpusHash,
|
|
216
|
-
baselineScore:
|
|
217
|
-
candidateScore:
|
|
218
|
-
heldOutDeltas:
|
|
290
|
+
baselineScore: encodedBaselineScore,
|
|
291
|
+
candidateScore: encodedCandidateScore,
|
|
292
|
+
heldOutDeltas: encodedHeldOutDeltas,
|
|
219
293
|
...(input.pairedOutcomes
|
|
220
294
|
? {
|
|
221
295
|
pairedOutcomes: input.pairedOutcomes.map((o) => ({
|
|
@@ -272,6 +346,7 @@ export function verifyFlywheelReceipt(receipt, trustedPublicKeys) {
|
|
|
272
346
|
try {
|
|
273
347
|
if (receipt.payload.schemaVersion !== RECEIPT_SCHEMA)
|
|
274
348
|
errors.push('unsupported receipt schema');
|
|
349
|
+
errors.push(...collectUnknownReceiptFields(receipt));
|
|
275
350
|
const { receiptId: _receiptId, ...base } = receipt.payload;
|
|
276
351
|
const expectedId = sha256Ref(canonicalizeJcs(receiptIdentityPayload(base)));
|
|
277
352
|
if (expectedId !== receipt.payload.receiptId)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import * as fs from 'node:fs';
|
|
10
10
|
import * as path from 'node:path';
|
|
11
11
|
import { applyChampionParams } from '../config/harness-feedback-applier.js';
|
|
12
|
-
import { GENESIS_LEDGER_HEAD, canonicalizeJcs, sha256Ref, uuidV7, verifyFlywheelReceipt, } from './flywheel-receipt.js';
|
|
12
|
+
import { GENESIS_LEDGER_HEAD, canonicalizeJcs, collectUnknownFields, sha256Ref, uuidV7, verifyFlywheelReceipt, } from './flywheel-receipt.js';
|
|
13
13
|
import { DEFAULT_ALPHA_TOTAL, DEFAULT_LAMBDA, minInformativePairsToClear, sequentialEvidenceVerdict, } from './flywheel-sequential-evidence.js';
|
|
14
14
|
const STATE_VERSION = 1;
|
|
15
15
|
const STATE_DIR = ['.claude-flow', 'flywheel-v1'];
|
|
@@ -18,6 +18,11 @@ const LOCK_FILE = 'transaction-state.lock';
|
|
|
18
18
|
const RECEIPTS_DIR = 'receipts';
|
|
19
19
|
const LOCK_TIMEOUT_MS = 10_000;
|
|
20
20
|
const LOCK_STALE_MS = 60_000;
|
|
21
|
+
const COMMIT_FIELDS = [
|
|
22
|
+
'commitId', 'transactionId', 'receiptId', 'lineageId', 'sequence',
|
|
23
|
+
'previousLedgerHead', 'baselineRef', 'candidateId', 'servingEpoch',
|
|
24
|
+
'proposer', 'proposerSubstitution', 'promotedAt',
|
|
25
|
+
];
|
|
21
26
|
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
22
27
|
function stateDir(root) {
|
|
23
28
|
return path.join(root, ...STATE_DIR);
|
|
@@ -481,6 +486,10 @@ export function verifyFlywheelLedger(root) {
|
|
|
481
486
|
for (let i = 0; i < state.commits.length; i++) {
|
|
482
487
|
const commit = state.commits[i];
|
|
483
488
|
const { commitId, ...core } = commit;
|
|
489
|
+
// Same ADR-322C strictness as the receipt path: a commit hashes consistently
|
|
490
|
+
// over whatever fields it carries, so an undefined field would otherwise
|
|
491
|
+
// chain cleanly (ruflo#3068).
|
|
492
|
+
errors.push(...collectUnknownFields(commit, COMMIT_FIELDS, `commits[${i}]`));
|
|
484
493
|
if (commit.sequence !== i + 1)
|
|
485
494
|
errors.push(`sequence mismatch at ${i + 1}`);
|
|
486
495
|
if (commit.previousLedgerHead !== head)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -39,41 +39,41 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
39
39
|
}>>;
|
|
40
40
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
|
|
43
|
-
priority: number;
|
|
42
|
+
id: string;
|
|
44
43
|
name: string;
|
|
45
44
|
type: string;
|
|
46
|
-
|
|
45
|
+
capabilities: string[];
|
|
47
46
|
maxConcurrentTasks: number;
|
|
48
|
-
|
|
49
|
-
resources?: {
|
|
50
|
-
maxMemoryMb?: number | undefined;
|
|
51
|
-
maxCpuPercent?: number | undefined;
|
|
52
|
-
} | undefined;
|
|
47
|
+
priority: number;
|
|
53
48
|
timeout?: number | undefined;
|
|
54
49
|
retryPolicy?: {
|
|
55
50
|
maxRetries: number;
|
|
56
51
|
backoffMs: number;
|
|
57
52
|
backoffMultiplier: number;
|
|
58
53
|
} | undefined;
|
|
54
|
+
resources?: {
|
|
55
|
+
maxMemoryMb?: number | undefined;
|
|
56
|
+
maxCpuPercent?: number | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
metadata?: Record<string, unknown> | undefined;
|
|
59
59
|
}, {
|
|
60
|
+
id: string;
|
|
60
61
|
name: string;
|
|
61
62
|
type: string;
|
|
62
|
-
id: string;
|
|
63
63
|
capabilities?: string[] | undefined;
|
|
64
|
+
maxConcurrentTasks?: number | undefined;
|
|
64
65
|
priority?: number | undefined;
|
|
65
|
-
metadata?: Record<string, unknown> | undefined;
|
|
66
|
-
resources?: {
|
|
67
|
-
maxMemoryMb?: number | undefined;
|
|
68
|
-
maxCpuPercent?: number | undefined;
|
|
69
|
-
} | undefined;
|
|
70
66
|
timeout?: number | undefined;
|
|
71
|
-
maxConcurrentTasks?: number | undefined;
|
|
72
67
|
retryPolicy?: {
|
|
73
68
|
maxRetries?: number | undefined;
|
|
74
69
|
backoffMs?: number | undefined;
|
|
75
70
|
backoffMultiplier?: number | undefined;
|
|
76
71
|
} | undefined;
|
|
72
|
+
resources?: {
|
|
73
|
+
maxMemoryMb?: number | undefined;
|
|
74
|
+
maxCpuPercent?: number | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
metadata?: Record<string, unknown> | undefined;
|
|
77
77
|
}>;
|
|
78
78
|
/**
|
|
79
79
|
* Task configuration schema
|
|
@@ -94,53 +94,53 @@ export declare const TaskConfigSchema: z.ZodObject<{
|
|
|
94
94
|
childTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
95
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
96
96
|
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
critical?: boolean | undefined;
|
|
98
|
-
retryCount?: number | undefined;
|
|
99
|
-
requiredCapabilities?: string[] | undefined;
|
|
100
97
|
maxRetries?: number | undefined;
|
|
98
|
+
requiredCapabilities?: string[] | undefined;
|
|
99
|
+
retryCount?: number | undefined;
|
|
100
|
+
critical?: boolean | undefined;
|
|
101
101
|
parentTaskId?: string | undefined;
|
|
102
102
|
childTaskIds?: string[] | undefined;
|
|
103
103
|
tags?: string[] | undefined;
|
|
104
104
|
}, {
|
|
105
|
-
critical?: boolean | undefined;
|
|
106
|
-
retryCount?: number | undefined;
|
|
107
|
-
requiredCapabilities?: string[] | undefined;
|
|
108
105
|
maxRetries?: number | undefined;
|
|
106
|
+
requiredCapabilities?: string[] | undefined;
|
|
107
|
+
retryCount?: number | undefined;
|
|
108
|
+
critical?: boolean | undefined;
|
|
109
109
|
parentTaskId?: string | undefined;
|
|
110
110
|
childTaskIds?: string[] | undefined;
|
|
111
111
|
tags?: string[] | undefined;
|
|
112
112
|
}>>;
|
|
113
113
|
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
description: string;
|
|
115
|
-
priority: number;
|
|
116
114
|
type: string;
|
|
115
|
+
priority: number;
|
|
116
|
+
description: string;
|
|
117
|
+
timeout?: number | undefined;
|
|
117
118
|
metadata?: {
|
|
118
|
-
critical?: boolean | undefined;
|
|
119
|
-
retryCount?: number | undefined;
|
|
120
|
-
requiredCapabilities?: string[] | undefined;
|
|
121
119
|
maxRetries?: number | undefined;
|
|
120
|
+
requiredCapabilities?: string[] | undefined;
|
|
121
|
+
retryCount?: number | undefined;
|
|
122
|
+
critical?: boolean | undefined;
|
|
122
123
|
parentTaskId?: string | undefined;
|
|
123
124
|
childTaskIds?: string[] | undefined;
|
|
124
125
|
tags?: string[] | undefined;
|
|
125
126
|
} | undefined;
|
|
126
127
|
assignedAgent?: string | undefined;
|
|
127
|
-
timeout?: number | undefined;
|
|
128
128
|
input?: Record<string, unknown> | undefined;
|
|
129
129
|
}, {
|
|
130
|
-
description: string;
|
|
131
130
|
type: string;
|
|
131
|
+
description: string;
|
|
132
132
|
priority?: number | undefined;
|
|
133
|
+
timeout?: number | undefined;
|
|
133
134
|
metadata?: {
|
|
134
|
-
critical?: boolean | undefined;
|
|
135
|
-
retryCount?: number | undefined;
|
|
136
|
-
requiredCapabilities?: string[] | undefined;
|
|
137
135
|
maxRetries?: number | undefined;
|
|
136
|
+
requiredCapabilities?: string[] | undefined;
|
|
137
|
+
retryCount?: number | undefined;
|
|
138
|
+
critical?: boolean | undefined;
|
|
138
139
|
parentTaskId?: string | undefined;
|
|
139
140
|
childTaskIds?: string[] | undefined;
|
|
140
141
|
tags?: string[] | undefined;
|
|
141
142
|
} | undefined;
|
|
142
143
|
assignedAgent?: string | undefined;
|
|
143
|
-
timeout?: number | undefined;
|
|
144
144
|
input?: Record<string, unknown> | undefined;
|
|
145
145
|
}>;
|
|
146
146
|
/**
|
|
@@ -211,7 +211,7 @@ export declare const SwarmConfigSchema: z.ZodObject<{
|
|
|
211
211
|
}>>;
|
|
212
212
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
213
213
|
}, "strip", z.ZodTypeAny, {
|
|
214
|
-
topology: "hierarchical
|
|
214
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
215
215
|
maxAgents: number;
|
|
216
216
|
metadata?: Record<string, unknown> | undefined;
|
|
217
217
|
autoScale?: {
|
|
@@ -235,9 +235,9 @@ export declare const SwarmConfigSchema: z.ZodObject<{
|
|
|
235
235
|
flushIntervalMs: number;
|
|
236
236
|
} | undefined;
|
|
237
237
|
}, {
|
|
238
|
-
topology: "hierarchical
|
|
239
|
-
maxAgents?: number | undefined;
|
|
238
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
240
239
|
metadata?: Record<string, unknown> | undefined;
|
|
240
|
+
maxAgents?: number | undefined;
|
|
241
241
|
autoScale?: {
|
|
242
242
|
maxAgents?: number | undefined;
|
|
243
243
|
enabled?: boolean | undefined;
|
|
@@ -326,7 +326,7 @@ export declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
326
326
|
vectorThreshold?: number | undefined;
|
|
327
327
|
}>>;
|
|
328
328
|
}, "strip", z.ZodTypeAny, {
|
|
329
|
-
type: "
|
|
329
|
+
type: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory";
|
|
330
330
|
path?: string | undefined;
|
|
331
331
|
sqlite?: {
|
|
332
332
|
inMemory: boolean;
|
|
@@ -353,7 +353,7 @@ export declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
353
353
|
maxSize?: number | undefined;
|
|
354
354
|
ttlMs?: number | undefined;
|
|
355
355
|
}, {
|
|
356
|
-
type?: "
|
|
356
|
+
type?: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory" | undefined;
|
|
357
357
|
path?: string | undefined;
|
|
358
358
|
sqlite?: {
|
|
359
359
|
filename?: string | undefined;
|
|
@@ -444,6 +444,7 @@ export declare const MCPServerConfigSchema: z.ZodObject<{
|
|
|
444
444
|
host?: string | undefined;
|
|
445
445
|
port?: number | undefined;
|
|
446
446
|
};
|
|
447
|
+
name?: string | undefined;
|
|
447
448
|
capabilities?: {
|
|
448
449
|
resources?: boolean | undefined;
|
|
449
450
|
tools?: boolean | undefined;
|
|
@@ -451,7 +452,6 @@ export declare const MCPServerConfigSchema: z.ZodObject<{
|
|
|
451
452
|
logging?: boolean | undefined;
|
|
452
453
|
experimental?: Record<string, boolean> | undefined;
|
|
453
454
|
} | undefined;
|
|
454
|
-
name?: string | undefined;
|
|
455
455
|
version?: string | undefined;
|
|
456
456
|
}>;
|
|
457
457
|
/**
|
|
@@ -504,17 +504,17 @@ export declare const OrchestratorConfigSchema: z.ZodObject<{
|
|
|
504
504
|
maxSpawnRetries?: number | undefined;
|
|
505
505
|
}>;
|
|
506
506
|
}, "strip", z.ZodTypeAny, {
|
|
507
|
+
session: {
|
|
508
|
+
persistSessions: boolean;
|
|
509
|
+
dataDir: string;
|
|
510
|
+
sessionRetentionMs: number;
|
|
511
|
+
};
|
|
507
512
|
health: {
|
|
508
513
|
checkInterval: number;
|
|
509
514
|
historyLimit: number;
|
|
510
515
|
degradedThreshold: number;
|
|
511
516
|
unhealthyThreshold: number;
|
|
512
517
|
};
|
|
513
|
-
session: {
|
|
514
|
-
persistSessions: boolean;
|
|
515
|
-
dataDir: string;
|
|
516
|
-
sessionRetentionMs: number;
|
|
517
|
-
};
|
|
518
518
|
lifecycle: {
|
|
519
519
|
maxConcurrentAgents: number;
|
|
520
520
|
spawnTimeout: number;
|
|
@@ -522,17 +522,17 @@ export declare const OrchestratorConfigSchema: z.ZodObject<{
|
|
|
522
522
|
maxSpawnRetries: number;
|
|
523
523
|
};
|
|
524
524
|
}, {
|
|
525
|
+
session: {
|
|
526
|
+
persistSessions?: boolean | undefined;
|
|
527
|
+
dataDir?: string | undefined;
|
|
528
|
+
sessionRetentionMs?: number | undefined;
|
|
529
|
+
};
|
|
525
530
|
health: {
|
|
526
531
|
checkInterval?: number | undefined;
|
|
527
532
|
historyLimit?: number | undefined;
|
|
528
533
|
degradedThreshold?: number | undefined;
|
|
529
534
|
unhealthyThreshold?: number | undefined;
|
|
530
535
|
};
|
|
531
|
-
session: {
|
|
532
|
-
persistSessions?: boolean | undefined;
|
|
533
|
-
dataDir?: string | undefined;
|
|
534
|
-
sessionRetentionMs?: number | undefined;
|
|
535
|
-
};
|
|
536
536
|
lifecycle: {
|
|
537
537
|
maxConcurrentAgents?: number | undefined;
|
|
538
538
|
spawnTimeout?: number | undefined;
|
|
@@ -593,17 +593,17 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
593
593
|
maxSpawnRetries?: number | undefined;
|
|
594
594
|
}>;
|
|
595
595
|
}, "strip", z.ZodTypeAny, {
|
|
596
|
+
session: {
|
|
597
|
+
persistSessions: boolean;
|
|
598
|
+
dataDir: string;
|
|
599
|
+
sessionRetentionMs: number;
|
|
600
|
+
};
|
|
596
601
|
health: {
|
|
597
602
|
checkInterval: number;
|
|
598
603
|
historyLimit: number;
|
|
599
604
|
degradedThreshold: number;
|
|
600
605
|
unhealthyThreshold: number;
|
|
601
606
|
};
|
|
602
|
-
session: {
|
|
603
|
-
persistSessions: boolean;
|
|
604
|
-
dataDir: string;
|
|
605
|
-
sessionRetentionMs: number;
|
|
606
|
-
};
|
|
607
607
|
lifecycle: {
|
|
608
608
|
maxConcurrentAgents: number;
|
|
609
609
|
spawnTimeout: number;
|
|
@@ -611,17 +611,17 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
611
611
|
maxSpawnRetries: number;
|
|
612
612
|
};
|
|
613
613
|
}, {
|
|
614
|
+
session: {
|
|
615
|
+
persistSessions?: boolean | undefined;
|
|
616
|
+
dataDir?: string | undefined;
|
|
617
|
+
sessionRetentionMs?: number | undefined;
|
|
618
|
+
};
|
|
614
619
|
health: {
|
|
615
620
|
checkInterval?: number | undefined;
|
|
616
621
|
historyLimit?: number | undefined;
|
|
617
622
|
degradedThreshold?: number | undefined;
|
|
618
623
|
unhealthyThreshold?: number | undefined;
|
|
619
624
|
};
|
|
620
|
-
session: {
|
|
621
|
-
persistSessions?: boolean | undefined;
|
|
622
|
-
dataDir?: string | undefined;
|
|
623
|
-
sessionRetentionMs?: number | undefined;
|
|
624
|
-
};
|
|
625
625
|
lifecycle: {
|
|
626
626
|
maxConcurrentAgents?: number | undefined;
|
|
627
627
|
spawnTimeout?: number | undefined;
|
|
@@ -693,7 +693,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
693
693
|
vectorThreshold?: number | undefined;
|
|
694
694
|
}>>;
|
|
695
695
|
}, "strip", z.ZodTypeAny, {
|
|
696
|
-
type: "
|
|
696
|
+
type: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory";
|
|
697
697
|
path?: string | undefined;
|
|
698
698
|
sqlite?: {
|
|
699
699
|
inMemory: boolean;
|
|
@@ -720,7 +720,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
720
720
|
maxSize?: number | undefined;
|
|
721
721
|
ttlMs?: number | undefined;
|
|
722
722
|
}, {
|
|
723
|
-
type?: "
|
|
723
|
+
type?: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory" | undefined;
|
|
724
724
|
path?: string | undefined;
|
|
725
725
|
sqlite?: {
|
|
726
726
|
filename?: string | undefined;
|
|
@@ -808,6 +808,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
808
808
|
host?: string | undefined;
|
|
809
809
|
port?: number | undefined;
|
|
810
810
|
};
|
|
811
|
+
name?: string | undefined;
|
|
811
812
|
capabilities?: {
|
|
812
813
|
resources?: boolean | undefined;
|
|
813
814
|
tools?: boolean | undefined;
|
|
@@ -815,7 +816,6 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
815
816
|
logging?: boolean | undefined;
|
|
816
817
|
experimental?: Record<string, boolean> | undefined;
|
|
817
818
|
} | undefined;
|
|
818
|
-
name?: string | undefined;
|
|
819
819
|
version?: string | undefined;
|
|
820
820
|
}>>;
|
|
821
821
|
swarm: z.ZodOptional<z.ZodObject<{
|
|
@@ -883,7 +883,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
883
883
|
}>>;
|
|
884
884
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
885
885
|
}, "strip", z.ZodTypeAny, {
|
|
886
|
-
topology: "hierarchical
|
|
886
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
887
887
|
maxAgents: number;
|
|
888
888
|
metadata?: Record<string, unknown> | undefined;
|
|
889
889
|
autoScale?: {
|
|
@@ -907,9 +907,9 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
907
907
|
flushIntervalMs: number;
|
|
908
908
|
} | undefined;
|
|
909
909
|
}, {
|
|
910
|
-
topology: "hierarchical
|
|
911
|
-
maxAgents?: number | undefined;
|
|
910
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
912
911
|
metadata?: Record<string, unknown> | undefined;
|
|
912
|
+
maxAgents?: number | undefined;
|
|
913
913
|
autoScale?: {
|
|
914
914
|
maxAgents?: number | undefined;
|
|
915
915
|
enabled?: boolean | undefined;
|
|
@@ -979,17 +979,17 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
979
979
|
maxSpawnRetries?: number | undefined;
|
|
980
980
|
}>;
|
|
981
981
|
}, "strip", z.ZodTypeAny, {
|
|
982
|
+
session: {
|
|
983
|
+
persistSessions: boolean;
|
|
984
|
+
dataDir: string;
|
|
985
|
+
sessionRetentionMs: number;
|
|
986
|
+
};
|
|
982
987
|
health: {
|
|
983
988
|
checkInterval: number;
|
|
984
989
|
historyLimit: number;
|
|
985
990
|
degradedThreshold: number;
|
|
986
991
|
unhealthyThreshold: number;
|
|
987
992
|
};
|
|
988
|
-
session: {
|
|
989
|
-
persistSessions: boolean;
|
|
990
|
-
dataDir: string;
|
|
991
|
-
sessionRetentionMs: number;
|
|
992
|
-
};
|
|
993
993
|
lifecycle: {
|
|
994
994
|
maxConcurrentAgents: number;
|
|
995
995
|
spawnTimeout: number;
|
|
@@ -997,17 +997,17 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
997
997
|
maxSpawnRetries: number;
|
|
998
998
|
};
|
|
999
999
|
}, {
|
|
1000
|
+
session: {
|
|
1001
|
+
persistSessions?: boolean | undefined;
|
|
1002
|
+
dataDir?: string | undefined;
|
|
1003
|
+
sessionRetentionMs?: number | undefined;
|
|
1004
|
+
};
|
|
1000
1005
|
health: {
|
|
1001
1006
|
checkInterval?: number | undefined;
|
|
1002
1007
|
historyLimit?: number | undefined;
|
|
1003
1008
|
degradedThreshold?: number | undefined;
|
|
1004
1009
|
unhealthyThreshold?: number | undefined;
|
|
1005
1010
|
};
|
|
1006
|
-
session: {
|
|
1007
|
-
persistSessions?: boolean | undefined;
|
|
1008
|
-
dataDir?: string | undefined;
|
|
1009
|
-
sessionRetentionMs?: number | undefined;
|
|
1010
|
-
};
|
|
1011
1011
|
lifecycle: {
|
|
1012
1012
|
maxConcurrentAgents?: number | undefined;
|
|
1013
1013
|
spawnTimeout?: number | undefined;
|
|
@@ -1079,7 +1079,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1079
1079
|
vectorThreshold?: number | undefined;
|
|
1080
1080
|
}>>;
|
|
1081
1081
|
}, "strip", z.ZodTypeAny, {
|
|
1082
|
-
type: "
|
|
1082
|
+
type: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory";
|
|
1083
1083
|
path?: string | undefined;
|
|
1084
1084
|
sqlite?: {
|
|
1085
1085
|
inMemory: boolean;
|
|
@@ -1106,7 +1106,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1106
1106
|
maxSize?: number | undefined;
|
|
1107
1107
|
ttlMs?: number | undefined;
|
|
1108
1108
|
}, {
|
|
1109
|
-
type?: "
|
|
1109
|
+
type?: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory" | undefined;
|
|
1110
1110
|
path?: string | undefined;
|
|
1111
1111
|
sqlite?: {
|
|
1112
1112
|
filename?: string | undefined;
|
|
@@ -1194,6 +1194,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1194
1194
|
host?: string | undefined;
|
|
1195
1195
|
port?: number | undefined;
|
|
1196
1196
|
};
|
|
1197
|
+
name?: string | undefined;
|
|
1197
1198
|
capabilities?: {
|
|
1198
1199
|
resources?: boolean | undefined;
|
|
1199
1200
|
tools?: boolean | undefined;
|
|
@@ -1201,7 +1202,6 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1201
1202
|
logging?: boolean | undefined;
|
|
1202
1203
|
experimental?: Record<string, boolean> | undefined;
|
|
1203
1204
|
} | undefined;
|
|
1204
|
-
name?: string | undefined;
|
|
1205
1205
|
version?: string | undefined;
|
|
1206
1206
|
}>>;
|
|
1207
1207
|
swarm: z.ZodOptional<z.ZodObject<{
|
|
@@ -1269,7 +1269,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1269
1269
|
}>>;
|
|
1270
1270
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1271
1271
|
}, "strip", z.ZodTypeAny, {
|
|
1272
|
-
topology: "hierarchical
|
|
1272
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
1273
1273
|
maxAgents: number;
|
|
1274
1274
|
metadata?: Record<string, unknown> | undefined;
|
|
1275
1275
|
autoScale?: {
|
|
@@ -1293,9 +1293,9 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1293
1293
|
flushIntervalMs: number;
|
|
1294
1294
|
} | undefined;
|
|
1295
1295
|
}, {
|
|
1296
|
-
topology: "hierarchical
|
|
1297
|
-
maxAgents?: number | undefined;
|
|
1296
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
1298
1297
|
metadata?: Record<string, unknown> | undefined;
|
|
1298
|
+
maxAgents?: number | undefined;
|
|
1299
1299
|
autoScale?: {
|
|
1300
1300
|
maxAgents?: number | undefined;
|
|
1301
1301
|
enabled?: boolean | undefined;
|
|
@@ -1365,17 +1365,17 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1365
1365
|
maxSpawnRetries?: number | undefined;
|
|
1366
1366
|
}>;
|
|
1367
1367
|
}, "strip", z.ZodTypeAny, {
|
|
1368
|
+
session: {
|
|
1369
|
+
persistSessions: boolean;
|
|
1370
|
+
dataDir: string;
|
|
1371
|
+
sessionRetentionMs: number;
|
|
1372
|
+
};
|
|
1368
1373
|
health: {
|
|
1369
1374
|
checkInterval: number;
|
|
1370
1375
|
historyLimit: number;
|
|
1371
1376
|
degradedThreshold: number;
|
|
1372
1377
|
unhealthyThreshold: number;
|
|
1373
1378
|
};
|
|
1374
|
-
session: {
|
|
1375
|
-
persistSessions: boolean;
|
|
1376
|
-
dataDir: string;
|
|
1377
|
-
sessionRetentionMs: number;
|
|
1378
|
-
};
|
|
1379
1379
|
lifecycle: {
|
|
1380
1380
|
maxConcurrentAgents: number;
|
|
1381
1381
|
spawnTimeout: number;
|
|
@@ -1383,17 +1383,17 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1383
1383
|
maxSpawnRetries: number;
|
|
1384
1384
|
};
|
|
1385
1385
|
}, {
|
|
1386
|
+
session: {
|
|
1387
|
+
persistSessions?: boolean | undefined;
|
|
1388
|
+
dataDir?: string | undefined;
|
|
1389
|
+
sessionRetentionMs?: number | undefined;
|
|
1390
|
+
};
|
|
1386
1391
|
health: {
|
|
1387
1392
|
checkInterval?: number | undefined;
|
|
1388
1393
|
historyLimit?: number | undefined;
|
|
1389
1394
|
degradedThreshold?: number | undefined;
|
|
1390
1395
|
unhealthyThreshold?: number | undefined;
|
|
1391
1396
|
};
|
|
1392
|
-
session: {
|
|
1393
|
-
persistSessions?: boolean | undefined;
|
|
1394
|
-
dataDir?: string | undefined;
|
|
1395
|
-
sessionRetentionMs?: number | undefined;
|
|
1396
|
-
};
|
|
1397
1397
|
lifecycle: {
|
|
1398
1398
|
maxConcurrentAgents?: number | undefined;
|
|
1399
1399
|
spawnTimeout?: number | undefined;
|
|
@@ -1465,7 +1465,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1465
1465
|
vectorThreshold?: number | undefined;
|
|
1466
1466
|
}>>;
|
|
1467
1467
|
}, "strip", z.ZodTypeAny, {
|
|
1468
|
-
type: "
|
|
1468
|
+
type: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory";
|
|
1469
1469
|
path?: string | undefined;
|
|
1470
1470
|
sqlite?: {
|
|
1471
1471
|
inMemory: boolean;
|
|
@@ -1492,7 +1492,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1492
1492
|
maxSize?: number | undefined;
|
|
1493
1493
|
ttlMs?: number | undefined;
|
|
1494
1494
|
}, {
|
|
1495
|
-
type?: "
|
|
1495
|
+
type?: "sqlite" | "agentdb" | "hybrid" | "redis" | "memory" | undefined;
|
|
1496
1496
|
path?: string | undefined;
|
|
1497
1497
|
sqlite?: {
|
|
1498
1498
|
filename?: string | undefined;
|
|
@@ -1580,6 +1580,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1580
1580
|
host?: string | undefined;
|
|
1581
1581
|
port?: number | undefined;
|
|
1582
1582
|
};
|
|
1583
|
+
name?: string | undefined;
|
|
1583
1584
|
capabilities?: {
|
|
1584
1585
|
resources?: boolean | undefined;
|
|
1585
1586
|
tools?: boolean | undefined;
|
|
@@ -1587,7 +1588,6 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1587
1588
|
logging?: boolean | undefined;
|
|
1588
1589
|
experimental?: Record<string, boolean> | undefined;
|
|
1589
1590
|
} | undefined;
|
|
1590
|
-
name?: string | undefined;
|
|
1591
1591
|
version?: string | undefined;
|
|
1592
1592
|
}>>;
|
|
1593
1593
|
swarm: z.ZodOptional<z.ZodObject<{
|
|
@@ -1655,7 +1655,7 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1655
1655
|
}>>;
|
|
1656
1656
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1657
1657
|
}, "strip", z.ZodTypeAny, {
|
|
1658
|
-
topology: "hierarchical
|
|
1658
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
1659
1659
|
maxAgents: number;
|
|
1660
1660
|
metadata?: Record<string, unknown> | undefined;
|
|
1661
1661
|
autoScale?: {
|
|
@@ -1679,9 +1679,9 @@ export declare const SystemConfigSchema: z.ZodObject<{
|
|
|
1679
1679
|
flushIntervalMs: number;
|
|
1680
1680
|
} | undefined;
|
|
1681
1681
|
}, {
|
|
1682
|
-
topology: "hierarchical
|
|
1683
|
-
maxAgents?: number | undefined;
|
|
1682
|
+
topology: "hierarchical" | "mesh" | "ring" | "star" | "adaptive" | "pheromone-adaptive" | "hierarchical-mesh";
|
|
1684
1683
|
metadata?: Record<string, unknown> | undefined;
|
|
1684
|
+
maxAgents?: number | undefined;
|
|
1685
1685
|
autoScale?: {
|
|
1686
1686
|
maxAgents?: number | undefined;
|
|
1687
1687
|
enabled?: boolean | undefined;
|