claude-flow 3.38.23 → 3.39.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319
@@ -0,0 +1 @@
1
+ 3.32.24
@@ -0,0 +1,13 @@
1
+ {
2
+ "manifest": {
3
+ "version": "3.32.24",
4
+ "files": {
5
+ "auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
6
+ "hook-handler.cjs": "50ea92a72651bdc95634f7588d56a5870963168eef5226f66ed14af3b47c8d9a",
7
+ "intelligence.cjs": "bd1f8e4b034944aee1df0391dc47ac2e8cc4b3aa542c65407a59d49620bbf76b",
8
+ "statusline.cjs": "d2a0eac56d1267d8dbed2d70b09feb592299469196ec4b215909f2b052144882"
9
+ }
10
+ },
11
+ "signature": "Vi6dza9CfZgo25+eTMJ81fUjsNtQQfUZUZS61MxpBTlilSBTo88cNCCy4ZNC7OfH2r2JOYS7HqqYotf0/AJ9DA==",
12
+ "algorithm": "ed25519"
13
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "adoptedAt": 1783689629580,
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
+ }
package/README.md CHANGED
@@ -21,6 +21,11 @@
21
21
 
22
22
  **An agent meta-harness for Claude Code and Codex.**
23
23
 
24
+ [![RuFlo Explained — build an AI team that plans, remembers, tests, and improves](docs/assets/ruflo-explained/ch14.jpg)](docs/ruflo-explained.md)
25
+
26
+ **[📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves](docs/ruflo-explained.md)**
27
+ A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification.
28
+
24
29
  </div>
25
30
 
26
31
  > **Agent = Model + Harness.** The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work. **Ruflo is the harness** — the execution layer around Claude Code and Codex that adds 100+ specialized agents, coordinated swarms, self-learning memory, federated comms across machines, and enterprise security guardrails. So agents don't just run, they collaborate.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.38.23",
3
+ "version": "3.39.1",
4
4
  "workspaces": [
5
5
  "v3/@claude-flow/codex",
6
6
  "v3/@claude-flow/mcp",
@@ -84,7 +84,7 @@
84
84
  "fs-extra": "^11.2.0",
85
85
  "express": ">=4.22.2",
86
86
  "express-rate-limit": ">=8.4.1",
87
- "fast-uri": "3.1.5",
87
+ "fast-uri": "^3.1.6",
88
88
  "helmet": "^7.2.0",
89
89
  "inquirer": "^9.2.0",
90
90
  "semver": "7.7.3",
@@ -21,6 +21,11 @@
21
21
 
22
22
  **An agent meta-harness for Claude Code and Codex.**
23
23
 
24
+ [![RuFlo Explained — build an AI team that plans, remembers, tests, and improves](docs/assets/ruflo-explained/ch14.jpg)](docs/ruflo-explained.md)
25
+
26
+ **[📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves](docs/ruflo-explained.md)**
27
+ A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification.
28
+
24
29
  </div>
25
30
 
26
31
  > **Agent = Model + Harness.** The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work. **Ruflo is the harness** — the execution layer around Claude Code and Codex that adds 100+ specialized agents, coordinated swarms, self-learning memory, federated comms across machines, and enterprise security guardrails. So agents don't just run, they collaborate.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 6,
4
- "generatedAt": "2026-09-07T17:34:20.768Z",
5
- "gitSha": "6acc6891",
4
+ "generatedAt": "2026-09-09T12:55:40.451Z",
5
+ "gitSha": "d55b1bfe",
6
6
  "catalog": {
7
7
  "agents": 167,
8
8
  "tools": 397,
@@ -40,7 +40,7 @@ declare const STDERR_REDIRECT_PREFIXES: string[];
40
40
  declare const AGENTDB_MOCK_FALLBACK_DROP_PREFIXES: string[];
41
41
  declare const shouldRedirectToStderr: (msg: unknown) => boolean;
42
42
  declare const isAgentdbMockFallbackNoise: (msg: unknown) => boolean;
43
- declare const origWarn: (message?: any, ...optionalParams: any[]) => void;
44
- declare const origLog: (message?: any, ...optionalParams: any[]) => void;
45
- declare const origError: (message?: any, ...optionalParams: any[]) => void;
43
+ declare const origWarn: (...data: any[]) => void;
44
+ declare const origLog: (...data: any[]) => void;
45
+ declare const origError: (...data: any[]) => void;
46
46
  //# sourceMappingURL=log-filters.d.ts.map
@@ -214,7 +214,25 @@ async function describeBackend() {
214
214
  try {
215
215
  const { getHNSWStatus } = await import('../memory/memory-initializer.js');
216
216
  const status = getHNSWStatus();
217
- return status.algorithm === 'hnsw' ? 'sql.js + HNSW' : 'sqlite (bridge, brute-force cosine)';
217
+ if (status.algorithm !== 'hnsw')
218
+ return 'sqlite (bridge, brute-force cosine)';
219
+ // #3228: with the native bridge gated off (the Windows default since
220
+ // 3.38.12), memory tools silently fall back to the sql.js store rather
221
+ // than the AgentDB corpus the bridge would have opened. A bare
222
+ // "sql.js + HNSW" hides that substitution — an upgrade can change which
223
+ // file receives writes while store/retrieve smoke tests still pass,
224
+ // because both operations use the same unintended file. Name the gate.
225
+ try {
226
+ const { shouldDisableNativeBridge, getBridgeFailureReason } = await import('../memory/memory-bridge.js');
227
+ if (shouldDisableNativeBridge()) {
228
+ const reason = getBridgeFailureReason();
229
+ return `sql.js + HNSW (native bridge disabled${reason ? `: ${reason}` : ''})`;
230
+ }
231
+ }
232
+ catch {
233
+ // bridge module unavailable — the plain sql.js label is already accurate
234
+ }
235
+ return 'sql.js + HNSW';
218
236
  }
219
237
  catch {
220
238
  return 'sqlite';
@@ -836,7 +836,17 @@ export function getHNSWStatus() {
836
836
  // name promises — that's false while the bridge is the active path, so
837
837
  // this no longer claims otherwise. Vector search itself still works via
838
838
  // the bridge; `algorithm` tells callers it's brute-force, not HNSW.
839
- if (_bridge && _bridge !== null) {
839
+ //
840
+ // #3228: this branch previously tested only that the bridge MODULE was
841
+ // loaded. On Windows the module imports fine but `getRegistry()` returns
842
+ // null behind the #3024 kill-switch, so every read/write actually goes to
843
+ // the sql.js store while this function still reported the bridge as the
844
+ // active path — `describeBackend()` then printed "sqlite (bridge, ...)"
845
+ // for a store the bridge never touched. Gate on whether the bridge is
846
+ // *permitted to be* the active path, not on whether the module resolved.
847
+ // `shouldDisableNativeBridge()` is sync and a pure function of platform +
848
+ // env, so it is a faithful discriminator here and needs no warm registry.
849
+ if (_bridge && _bridge !== null && !_bridge.shouldDisableNativeBridge()) {
840
850
  return {
841
851
  available: false,
842
852
  initialized: false,
@@ -139,9 +139,44 @@ export declare function collectUnknownReceiptFields(receipt: FlywheelEvaluationR
139
139
  */
140
140
  export declare function canonicalizeJcs(value: unknown): string;
141
141
  export declare function sha256Ref(value: string | Buffer): string;
142
+ /**
143
+ * Enforce ADR-322C rule 2 / conformance-checklist A3 over a receipt payload:
144
+ * "Every fractional value is a canonical decimal string, not a binary float."
145
+ *
146
+ * This lives at the RECEIPT boundary rather than inside `canonicalizeJcs`,
147
+ * which is shared with the proposer envelope (`flywheel-proposer.ts`) and the
148
+ * promotion ledger (`flywheel-transaction.ts`) — structures the contract does
149
+ * not govern. A first attempt put the check in the canonicalizer and broke
150
+ * those callers, which is the reason the scope is spelled out here.
151
+ *
152
+ * Integers and scaled integers stay JSON numbers (currency micros, durations,
153
+ * iteration counts). A fractional JSON number anywhere in the payload is a
154
+ * contract violation, and the error names the path — the original bug
155
+ * (ruvnet/ruflo#3229) needed a live fixture to find precisely because neither
156
+ * verifier said which field was wrong.
157
+ */
158
+ export declare function assertReceiptNumberDomain(value: unknown, path?: string): void;
142
159
  export declare function policyCandidateId(policy: Record<string, unknown>): string;
143
160
  /** UUIDv7 with a 48-bit millisecond timestamp and RFC-4122 variant bits. */
144
161
  export declare function uuidV7(now?: number): string;
162
+ /**
163
+ * Encode an opaque policy object so every fractional value is a scale-12
164
+ * decimal string, per ADR-322C rule 2 and conformance-checklist A3.
165
+ *
166
+ * `candidatePolicy` is declared "Opaque to this contract; its shape is owned by
167
+ * policySchemaVersion. Must still satisfy the ADR-322C number rules" — a rule
168
+ * the JSON Schema cannot express for an opaque object, so nothing enforced it
169
+ * and the producer wrote binary floats (`{"alpha": 0.3, "mmrLambda": 0.5}`).
170
+ * Ruflo's own verifier accepted them because `assertJsonValue` only checked
171
+ * finite-and-not-negative-zero; autogenous's stricter verifier correctly
172
+ * rejected the receipt (ruvnet/ruflo#3229, ruvnet/autogenous#15).
173
+ *
174
+ * Integers stay JSON numbers and only non-integers are encoded, which is what
175
+ * the contract's own example shows: `{"hnswEf": 128, "hybridWeight": "0.65"}`.
176
+ * Recurses through nested objects and arrays, because "every fractional value"
177
+ * is not limited to the top level.
178
+ */
179
+ export declare function encodePolicyFractions(value: unknown): unknown;
145
180
  export declare function computePromotionStatistics(input: {
146
181
  baselineScore: number;
147
182
  candidateScore: number;
@@ -123,8 +123,47 @@ export function canonicalizeJcs(value) {
123
123
  export function sha256Ref(value) {
124
124
  return `sha256:${createHash('sha256').update(value).digest('hex')}`;
125
125
  }
126
+ /**
127
+ * Enforce ADR-322C rule 2 / conformance-checklist A3 over a receipt payload:
128
+ * "Every fractional value is a canonical decimal string, not a binary float."
129
+ *
130
+ * This lives at the RECEIPT boundary rather than inside `canonicalizeJcs`,
131
+ * which is shared with the proposer envelope (`flywheel-proposer.ts`) and the
132
+ * promotion ledger (`flywheel-transaction.ts`) — structures the contract does
133
+ * not govern. A first attempt put the check in the canonicalizer and broke
134
+ * those callers, which is the reason the scope is spelled out here.
135
+ *
136
+ * Integers and scaled integers stay JSON numbers (currency micros, durations,
137
+ * iteration counts). A fractional JSON number anywhere in the payload is a
138
+ * contract violation, and the error names the path — the original bug
139
+ * (ruvnet/ruflo#3229) needed a live fixture to find precisely because neither
140
+ * verifier said which field was wrong.
141
+ */
142
+ export function assertReceiptNumberDomain(value, path = '$') {
143
+ if (typeof value === 'number') {
144
+ if (!Number.isInteger(value)) {
145
+ throw new Error(`fractional number at ${path} must be a scale-12 decimal string (ADR-322C rule 2)`);
146
+ }
147
+ return;
148
+ }
149
+ if (Array.isArray(value)) {
150
+ value.forEach((v, i) => assertReceiptNumberDomain(v, `${path}[${i}]`));
151
+ return;
152
+ }
153
+ if (value && typeof value === 'object') {
154
+ for (const [k, v] of Object.entries(value)) {
155
+ assertReceiptNumberDomain(v, `${path}.${k}`);
156
+ }
157
+ }
158
+ }
126
159
  export function policyCandidateId(policy) {
127
- return sha256Ref(canonicalizeJcs(policy));
160
+ // Encode at the hashing boundary so the content ID is always over the
161
+ // CANONICAL form, whether the caller passed a raw config or an
162
+ // already-encoded policy. `encodePolicyFractions` is idempotent — an
163
+ // encoded value is a string and passes through untouched — so
164
+ // policyCandidateId(raw) === policyCandidateId(encoded), which is what lets
165
+ // `verify` recompute the ID from the payload and still match.
166
+ return sha256Ref(canonicalizeJcs(encodePolicyFractions(policy)));
128
167
  }
129
168
  /** UUIDv7 with a 48-bit millisecond timestamp and RFC-4122 variant bits. */
130
169
  export function uuidV7(now = Date.now()) {
@@ -143,6 +182,38 @@ const decimal = (value, scale = 12) => {
143
182
  const normalized = value.toFixed(scale).replace(/\.?0+$/, '');
144
183
  return normalized === '-0' || normalized === '' ? '0' : normalized;
145
184
  };
185
+ /**
186
+ * Encode an opaque policy object so every fractional value is a scale-12
187
+ * decimal string, per ADR-322C rule 2 and conformance-checklist A3.
188
+ *
189
+ * `candidatePolicy` is declared "Opaque to this contract; its shape is owned by
190
+ * policySchemaVersion. Must still satisfy the ADR-322C number rules" — a rule
191
+ * the JSON Schema cannot express for an opaque object, so nothing enforced it
192
+ * and the producer wrote binary floats (`{"alpha": 0.3, "mmrLambda": 0.5}`).
193
+ * Ruflo's own verifier accepted them because `assertJsonValue` only checked
194
+ * finite-and-not-negative-zero; autogenous's stricter verifier correctly
195
+ * rejected the receipt (ruvnet/ruflo#3229, ruvnet/autogenous#15).
196
+ *
197
+ * Integers stay JSON numbers and only non-integers are encoded, which is what
198
+ * the contract's own example shows: `{"hnswEf": 128, "hybridWeight": "0.65"}`.
199
+ * Recurses through nested objects and arrays, because "every fractional value"
200
+ * is not limited to the top level.
201
+ */
202
+ export function encodePolicyFractions(value) {
203
+ if (typeof value === 'number') {
204
+ if (!Number.isFinite(value))
205
+ throw new Error('policy value must be finite');
206
+ // Integers are exact in JSON and the contract permits scaled integers, so
207
+ // they are left alone; -0 is normalized away by `decimal`.
208
+ return Number.isInteger(value) && !Object.is(value, -0) ? value : decimal(value);
209
+ }
210
+ if (Array.isArray(value))
211
+ return value.map(encodePolicyFractions);
212
+ if (value && typeof value === 'object') {
213
+ return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, encodePolicyFractions(v)]));
214
+ }
215
+ return value;
216
+ }
146
217
  function seedFrom(parts) {
147
218
  const digest = createHash('sha256').update(parts.join('')).digest();
148
219
  return { seed: digest.readUInt32BE(0), hex: digest.toString('hex') };
@@ -239,6 +310,10 @@ function receiptIdentityPayload(payload) {
239
310
  return payload;
240
311
  }
241
312
  function signedBytes(payload) {
313
+ // Assert at the signing boundary: a receipt must never be SIGNED unless it
314
+ // satisfies the number domain it claims. Covers both produce and verify,
315
+ // since both paths sign or re-derive these bytes.
316
+ assertReceiptNumberDomain(payload);
242
317
  return Buffer.concat([
243
318
  Buffer.from(RECEIPT_DOMAIN, 'utf8'),
244
319
  Buffer.from([0]),
@@ -249,7 +324,12 @@ export function createFlywheelReceipt(input) {
249
324
  const now = input.now ?? Date.now();
250
325
  const evaluationRunId = input.evaluationRunId ?? uuidV7(now);
251
326
  const lineageId = input.lineageId ?? uuidV7(now);
252
- const candidateId = policyCandidateId(input.candidatePolicy);
327
+ // Encode ONCE and use the encoded object for both the candidate content ID
328
+ // and the payload, so `verify`'s recomputation of policyCandidateId still
329
+ // matches. Encoding after the ID were computed would make every receipt fail
330
+ // its own 'candidate content ID mismatch' check.
331
+ const candidatePolicy = encodePolicyFractions(input.candidatePolicy);
332
+ const candidateId = policyCandidateId(candidatePolicy);
253
333
  // Verifiers recompute the statistics from the payload's scale-12 decimal
254
334
  // strings — the only values they ever have. The encoded values are therefore
255
335
  // the statistical inputs of record: compute the decision from them, not from
@@ -277,9 +357,23 @@ export function createFlywheelReceipt(input) {
277
357
  evaluationRunId,
278
358
  baselineRef: input.baselineRef,
279
359
  expectedLedgerHead: input.expectedLedgerHead ?? GENESIS_LEDGER_HEAD,
280
- candidatePolicy: input.candidatePolicy,
360
+ candidatePolicy,
281
361
  gateVersion: input.gateVersion ?? statistics.ruleVersion,
282
- policySchemaVersion: input.policySchemaVersion ?? 'ruflo.retrieval-policy/v1',
362
+ // v1 -> v2: the encoding of `candidatePolicy` changed (#3229). Fixing it
363
+ // changes the candidate content ID, so a pre-fix receipt can never match a
364
+ // post-fix champion reference. Bumping the schema version makes the
365
+ // promotion gate refuse those receipts with an ACCURATE reason —
366
+ // 'policy schema changed' (flywheel-transaction.ts:468) — instead of a
367
+ // confusing 'stale baseline' hash mismatch.
368
+ //
369
+ // Signed receipts are deliberately NOT migrated: re-encoding changes the
370
+ // content, which changes the ID, which invalidates the signature. A
371
+ // migration would mean re-signing, i.e. minting new receipts that claim to
372
+ // be old ones, which is what the receipt design exists to prevent. Existing
373
+ // receipts stay valid as history and unpromotable; the champion is
374
+ // re-established through the explicit reset path, which already requires
375
+ // confirmation and a recorded reason.
376
+ policySchemaVersion: input.policySchemaVersion ?? 'ruflo.retrieval-policy/v2',
283
377
  safetyEnvelopeRef: input.safetyEnvelopeRef,
284
378
  ...(input.anchorRef ? { anchorRef: input.anchorRef } : {}),
285
379
  requestedProposer: input.requestedProposer ?? 'local',
@@ -342,6 +436,17 @@ export function createFlywheelReceipt(input) {
342
436
  return receipt;
343
437
  }
344
438
  export function verifyFlywheelReceipt(receipt, trustedPublicKeys) {
439
+ // The enforcement half of #3229. Before this, ruflo verified its own
440
+ // non-conforming receipts because the only number rule was
441
+ // finite-and-not-negative-zero, while autogenous's stricter verifier
442
+ // correctly rejected them. Reported as an error rather than thrown so the
443
+ // caller gets it alongside every other finding.
444
+ try {
445
+ assertReceiptNumberDomain(receipt.payload);
446
+ }
447
+ catch (err) {
448
+ return { valid: false, signed: !!receipt.signature, errors: [err.message] };
449
+ }
345
450
  const errors = [];
346
451
  try {
347
452
  if (receipt.payload.schemaVersion !== RECEIPT_SCHEMA)
@@ -216,7 +216,12 @@ export async function evaluateFlywheelCandidate(projectRoot, deps) {
216
216
  evaluationRunId: deps.evaluationRunId,
217
217
  baselineRef: refOf(baseline),
218
218
  expectedLedgerHead: txState.ledgerHead,
219
- candidatePolicy: candidate,
219
+ // `as unknown as` erased RetrievalConfig's `number` fields and laundered
220
+ // binary floats into a receipt claiming ADR-322C conformance (#3229).
221
+ // createFlywheelReceipt now encodes fractional values to scale-12
222
+ // decimal strings, so a single structural cast is enough and the
223
+ // type-erasing double cast is gone.
224
+ candidatePolicy: { ...candidate },
220
225
  safetyEnvelopeRef,
221
226
  anchorRef: deps.anchorRef,
222
227
  requestedProposer: deps.requestedProposer ?? 'local',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.38.23",
3
+ "version": "3.39.1",
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
- capabilities: string[];
43
- priority: number;
42
+ id: string;
44
43
  name: string;
45
44
  type: string;
46
- id: string;
45
+ capabilities: string[];
47
46
  maxConcurrentTasks: number;
48
- metadata?: Record<string, unknown> | undefined;
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis";
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?: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis" | undefined;
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: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis";
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?: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis" | undefined;
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis";
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?: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis" | undefined;
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis";
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?: "memory" | "sqlite" | "agentdb" | "hybrid" | "redis" | undefined;
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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-mesh" | "mesh" | "hierarchical" | "ring" | "star" | "adaptive" | "pheromone-adaptive";
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;