@claude-flow/cli 3.65.1 → 3.66.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.
Files changed (59) hide show
  1. package/.claude/helpers/helpers.manifest.json +5 -4
  2. package/.claude/helpers/hook-handler.cjs +66 -0
  3. package/.claude/helpers/learning-loop.cjs +594 -0
  4. package/catalog-manifest.json +2 -2
  5. package/dist/src/commands/hooks.js +4 -1
  6. package/dist/src/init/executor.js +1 -1
  7. package/dist/src/init/helper-refresh.js +4 -0
  8. package/dist/src/mcp-tools/memory-tools.js +14 -0
  9. package/dist/src/memory/memory-bridge.js +21 -1
  10. package/dist/src/memory/sona-optimizer.d.ts +7 -0
  11. package/dist/src/memory/sona-optimizer.js +36 -6
  12. package/dist/src/memory/verified-lessons.d.ts +80 -0
  13. package/dist/src/memory/verified-lessons.js +113 -0
  14. package/dist/src/memory/verified-outcomes.d.ts +9 -47
  15. package/dist/src/memory/verified-outcomes.js +11 -46
  16. package/dist/src/mods/command-registry/schema.d.ts +6 -6
  17. package/dist/src/update/rate-limiter.d.ts +6 -0
  18. package/dist/src/update/rate-limiter.js +12 -1
  19. package/node_modules/@claude-flow/codex/dist/cli.js +0 -0
  20. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -1
  21. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +31 -0
  22. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -1
  23. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +0 -0
  24. package/node_modules/@claude-flow/plugin-agent-federation/package.json +1 -1
  25. package/node_modules/@claude-flow/security/dist/input-validator.d.ts +6 -6
  26. package/package.json +4 -4
  27. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts +0 -130
  28. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts +0 -34
  29. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/planner-descriptor.d.ts +0 -40
  30. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts +0 -46
  31. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts +0 -27
  32. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts +0 -192
  33. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts +0 -211
  34. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts +0 -113
  35. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts +0 -41
  36. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts +0 -150
  37. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts +0 -74
  38. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts +0 -13
  39. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts +0 -7
  40. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts +0 -45
  41. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts +0 -104
  42. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts +0 -55
  43. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts +0 -17
  44. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts +0 -69
  45. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts +0 -76
  46. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts +0 -62
  47. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts +0 -65
  48. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts +0 -54
  49. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts +0 -71
  50. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts +0 -156
  51. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts +0 -98
  52. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts +0 -89
  53. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts +0 -92
  54. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts +0 -70
  55. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts +0 -24
  56. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts +0 -10
  57. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts +0 -19
  58. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts +0 -72
  59. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts +0 -3
@@ -388,6 +388,7 @@ export declare const catalogEntrySchema: z.ZodObject<{
388
388
  }>, "many">;
389
389
  notes: z.ZodArray<z.ZodString, "many">;
390
390
  }, "strict", z.ZodTypeAny, {
391
+ status: "documentation" | "shipped" | "source-only";
391
392
  sources: {
392
393
  digest: string;
393
394
  sourcePath: string;
@@ -398,7 +399,6 @@ export declare const catalogEntrySchema: z.ZodObject<{
398
399
  shippedIn: string[];
399
400
  initCategory?: string | undefined;
400
401
  }[];
401
- status: "documentation" | "shipped" | "source-only";
402
402
  divergent: boolean;
403
403
  definition: {
404
404
  id: string;
@@ -429,6 +429,7 @@ export declare const catalogEntrySchema: z.ZodObject<{
429
429
  };
430
430
  notes: string[];
431
431
  }, {
432
+ status: "documentation" | "shipped" | "source-only";
432
433
  sources: {
433
434
  digest: string;
434
435
  sourcePath: string;
@@ -439,7 +440,6 @@ export declare const catalogEntrySchema: z.ZodObject<{
439
440
  shippedIn: string[];
440
441
  initCategory?: string | undefined;
441
442
  }[];
442
- status: "documentation" | "shipped" | "source-only";
443
443
  divergent: boolean;
444
444
  definition: {
445
445
  id: string;
@@ -654,6 +654,7 @@ export declare const commandCatalogSchema: z.ZodObject<{
654
654
  }>, "many">;
655
655
  notes: z.ZodArray<z.ZodString, "many">;
656
656
  }, "strict", z.ZodTypeAny, {
657
+ status: "documentation" | "shipped" | "source-only";
657
658
  sources: {
658
659
  digest: string;
659
660
  sourcePath: string;
@@ -664,7 +665,6 @@ export declare const commandCatalogSchema: z.ZodObject<{
664
665
  shippedIn: string[];
665
666
  initCategory?: string | undefined;
666
667
  }[];
667
- status: "documentation" | "shipped" | "source-only";
668
668
  divergent: boolean;
669
669
  definition: {
670
670
  id: string;
@@ -695,6 +695,7 @@ export declare const commandCatalogSchema: z.ZodObject<{
695
695
  };
696
696
  notes: string[];
697
697
  }, {
698
+ status: "documentation" | "shipped" | "source-only";
698
699
  sources: {
699
700
  digest: string;
700
701
  sourcePath: string;
@@ -705,7 +706,6 @@ export declare const commandCatalogSchema: z.ZodObject<{
705
706
  shippedIn: string[];
706
707
  initCategory?: string | undefined;
707
708
  }[];
708
- status: "documentation" | "shipped" | "source-only";
709
709
  divergent: boolean;
710
710
  definition: {
711
711
  id: string;
@@ -738,6 +738,7 @@ export declare const commandCatalogSchema: z.ZodObject<{
738
738
  }>, "many">;
739
739
  }, "strict", z.ZodTypeAny, {
740
740
  entries: {
741
+ status: "documentation" | "shipped" | "source-only";
741
742
  sources: {
742
743
  digest: string;
743
744
  sourcePath: string;
@@ -748,7 +749,6 @@ export declare const commandCatalogSchema: z.ZodObject<{
748
749
  shippedIn: string[];
749
750
  initCategory?: string | undefined;
750
751
  }[];
751
- status: "documentation" | "shipped" | "source-only";
752
752
  divergent: boolean;
753
753
  definition: {
754
754
  id: string;
@@ -784,6 +784,7 @@ export declare const commandCatalogSchema: z.ZodObject<{
784
784
  sourceDigest: string;
785
785
  }, {
786
786
  entries: {
787
+ status: "documentation" | "shipped" | "source-only";
787
788
  sources: {
788
789
  digest: string;
789
790
  sourcePath: string;
@@ -794,7 +795,6 @@ export declare const commandCatalogSchema: z.ZodObject<{
794
795
  shippedIn: string[];
795
796
  initCategory?: string | undefined;
796
797
  }[];
797
- status: "documentation" | "shipped" | "source-only";
798
798
  divergent: boolean;
799
799
  definition: {
800
800
  id: string;
@@ -10,6 +10,12 @@ export interface RateLimitState {
10
10
  }
11
11
  export declare function loadState(): RateLimitState;
12
12
  export declare function saveState(state: RateLimitState): void;
13
+ /**
14
+ * Whether this is a CI run. CI systems set `CI` to `true`, `1` or other values, so any value
15
+ * except empty, `0` or `false` counts (GitHub Actions sets CI=true). Matching only `true` let CI=1 runs check for updates and
16
+ * install one (`npm install @claude-flow/cli@<latest>`) into the working directory mid-run.
17
+ */
18
+ export declare function isCI(env?: NodeJS.ProcessEnv): boolean;
13
19
  export declare function shouldCheckForUpdates(intervalHours?: number): {
14
20
  allowed: boolean;
15
21
  reason?: string;
@@ -45,9 +45,20 @@ export function saveState(state) {
45
45
  ensureDir();
46
46
  fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 2));
47
47
  }
48
+ /**
49
+ * Whether this is a CI run. CI systems set `CI` to `true`, `1` or other values, so any value
50
+ * except empty, `0` or `false` counts (GitHub Actions sets CI=true). Matching only `true` let CI=1 runs check for updates and
51
+ * install one (`npm install @claude-flow/cli@<latest>`) into the working directory mid-run.
52
+ */
53
+ export function isCI(env = process.env) {
54
+ return ['CI', 'CONTINUOUS_INTEGRATION'].some((name) => {
55
+ const value = env[name];
56
+ return value !== undefined && value.trim() !== '' && !/^(0|false)$/i.test(value.trim());
57
+ });
58
+ }
48
59
  export function shouldCheckForUpdates(intervalHours = DEFAULT_INTERVAL_HOURS) {
49
60
  // Skip in CI environments
50
- if (process.env.CI === 'true' || process.env.CONTINUOUS_INTEGRATION === 'true') {
61
+ if (isCI()) {
51
62
  return { allowed: false, reason: 'CI environment detected' };
52
63
  }
53
64
  // Skip if explicitly disabled
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"policy-engine.d.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,GACxB;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,qBAAqB,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAgCvE,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,0BAA0B;CAyBnC"}
@@ -13,6 +13,25 @@ const DEFAULT_SECURITY_POLICY = {
13
13
  minTrustLevelForMemory: TrustLevel.TRUSTED,
14
14
  minTrustLevelForSpawn: TrustLevel.PRIVILEGED,
15
15
  };
16
+ const POLICY_CATEGORY_FOR_MESSAGE_TYPE = {
17
+ 'task-assignment': 'write',
18
+ 'context-share': 'write',
19
+ 'claim-event': 'write',
20
+ 'memory-query': 'memory',
21
+ 'memory-response': 'memory',
22
+ 'agent-spawn': 'spawn',
23
+ 'agent-handoff': 'spawn',
24
+ };
25
+ function policyThresholdForCategory(policy, category) {
26
+ switch (category) {
27
+ case 'write':
28
+ return policy.minTrustLevelForWrite;
29
+ case 'memory':
30
+ return policy.minTrustLevelForMemory;
31
+ case 'spawn':
32
+ return policy.minTrustLevelForSpawn;
33
+ }
34
+ }
16
35
  const CLAIMS_FOR_MESSAGE_TYPE = {
17
36
  'task-assignment': ['federation:write'],
18
37
  'memory-query': ['federation:read', 'federation:memory'],
@@ -100,6 +119,18 @@ export class PolicyEngine {
100
119
  trustLevelSufficient: false,
101
120
  };
102
121
  }
122
+ const policyCategory = POLICY_CATEGORY_FOR_MESSAGE_TYPE[messageType];
123
+ if (policyCategory) {
124
+ const requiredLevel = policyThresholdForCategory(this.securityPolicy, policyCategory);
125
+ if (trustLevel < requiredLevel) {
126
+ return {
127
+ allowed: false,
128
+ reason: `Trust level ${trustLevel} below configured minimum ${requiredLevel} for ${policyCategory} operations`,
129
+ requiredClaims,
130
+ trustLevelSufficient: false,
131
+ };
132
+ }
133
+ }
103
134
  return {
104
135
  allowed: true,
105
136
  reason: 'Policy check passed',
@@ -1 +1 @@
1
- {"version":3,"file":"policy-engine.js","sourceRoot":"","sources":["../../src/application/policy-engine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AI,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACnE,CAAC;IAEO,0BAA0B,CAAC,WAAkC;QACnE,QAAQ,WAAW,EAAE,CAAC;YACpB,KAAK,cAAc,CAAC;YACpB,KAAK,iBAAiB;gBACpB,OAAO,gBAAgB,CAAC;YAC1B,KAAK,eAAe;gBAClB,OAAO,eAAe,CAAC;YACzB,KAAK,iBAAiB;gBACpB,OAAO,MAAM,CAAC;YAChB,KAAK,aAAa;gBAChB,OAAO,cAAc,CAAC;YACxB,KAAK,kBAAkB;gBACrB,OAAO,QAAQ,CAAC;YAClB,KAAK,WAAW,CAAC;YACjB,KAAK,WAAW,CAAC;YACjB,KAAK,oBAAoB,CAAC;YAC1B,KAAK,gBAAgB,CAAC;YACtB,KAAK,kBAAkB,CAAC;YACxB,KAAK,kBAAkB,CAAC;YACxB,KAAK,mBAAmB;gBACtB,OAAO,MAAM,CAAC;YAChB;gBACE,OAAO,MAAM,CAAC;QAClB,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"policy-engine.js","sourceRoot":"","sources":["../../src/application/policy-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAgCnF,MAAM,uBAAuB,GAAmB;IAC9C,mBAAmB,EAAE,SAAS;IAC9B,oBAAoB,EAAE,GAAG;IACzB,mBAAmB,EAAE;QACnB,iBAAiB,EAAE,cAAc,EAAE,iBAAiB;QACpD,eAAe,EAAE,kBAAkB,EAAE,WAAW;QAChD,cAAc,EAAE,iBAAiB,EAAE,aAAa;KACjD;IACD,cAAc,EAAE,IA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KAAK,kBAAkB,CAAC;YACxB,KAAK,kBAAkB,CAAC;YACxB,KAAK,mBAAmB;gBACtB,OAAO,MAAM,CAAC;YAChB;gBACE,OAAO,MAAM,CAAC;QAClB,CAAC;IACH,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/plugin-agent-federation",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Cross-installation agent federation with zero-trust security, PII-gated data flow, and compliance-grade audit trails.",
5
5
  "homepage": "https://github.com/ruvnet/ruflo",
6
6
  "type": "module",
@@ -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?: "critical" | "high" | "medium" | "low" | undefined;
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?: "critical" | "high" | "medium" | "low" | undefined;
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.65.1",
3
+ "version": "3.66.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",
@@ -105,7 +105,7 @@
105
105
  "@claude-flow/codex": "3.0.5",
106
106
  "@claude-flow/mcp": "3.1.4",
107
107
  "@claude-flow/neural": "3.0.1",
108
- "@claude-flow/plugin-agent-federation": "1.0.3",
108
+ "@claude-flow/plugin-agent-federation": "1.0.4",
109
109
  "@claude-flow/security": "3.0.5",
110
110
  "@claude-flow/shared": "3.0.6",
111
111
  "@iarna/toml": "^2.2.5",
@@ -128,12 +128,12 @@
128
128
  "ws": "^8.21.0",
129
129
  "yaml": "^2.8.0",
130
130
  "zod": "^3.22.0",
131
- "@claude-flow/memory": "3.1.0"
131
+ "@claude-flow/memory": "3.2.0"
132
132
  },
133
133
  "optionalDependencies": {
134
134
  "@agntcy/slim-bindings": "2.1.1",
135
135
  "@claude-flow/aidefence": "3.0.2",
136
- "@claude-flow/memory": "3.1.0",
136
+ "@claude-flow/memory": "3.2.0",
137
137
  "@metaharness/darwin": "~0.12.0",
138
138
  "@metaharness/flywheel": "~0.1.10",
139
139
  "@metaharness/radio": "~0.1.0",
@@ -1,130 +0,0 @@
1
- /**
2
- * A2A (Agent2Agent, Linux Foundation) Agent Card adapter — cards only.
3
- *
4
- * Maps ruflo's bespoke federation identity (`FederationManifest` /
5
- * `FederationNode`) to and from a spec-compliant A2A Agent Card so ruflo
6
- * nodes are discoverable by A2A peers and A2A peers appear in federation
7
- * discovery. This is an ADAPTER over the existing federation schema, not a
8
- * rewrite — A2A Tasks/messaging are deliberately out of scope.
9
- *
10
- * Spec: A2A Protocol 1.0.0 — https://a2a-protocol.org/latest/specification/
11
- * (schema source of truth: specification/a2a.proto in a2aproject/A2A).
12
- * Required AgentCard fields per spec §4.4.1: name, description,
13
- * supportedInterfaces, version, capabilities, defaultInputModes,
14
- * defaultOutputModes, skills.
15
- */
16
- import { FederationNode } from '../domain/entities/federation-node.js';
17
- import type { FederationManifest } from '../domain/services/discovery-service.js';
18
- /** A2A protocol version this adapter targets. */
19
- export declare const A2A_PROTOCOL_VERSION = "1.0";
20
- /**
21
- * Well-known URI for Agent Card discovery (A2A 1.0 §8.2 + IANA registration
22
- * §14). NOTE: earlier drafts used `/.well-known/agent.json`; 0.3.0+ settled
23
- * on `agent-card.json`.
24
- */
25
- export declare const A2A_WELL_KNOWN_PATH = "/.well-known/agent-card.json";
26
- /**
27
- * Open-form protocol binding string advertising ruflo's federation wire
28
- * (Ed25519-signed envelopes over WebSocket/QUIC). Spec §4.4.6 explicitly
29
- * allows non-core bindings: "This is an open form string, to be easily
30
- * extended for other protocol bindings."
31
- */
32
- export declare const RUFLO_FEDERATION_BINDING = "RUFLO-FEDERATION";
33
- /**
34
- * Extension URI carrying the bespoke federation identity inside the card
35
- * (spec §4.6 AgentExtension). Enables lossless round-trip in fromAgentCard.
36
- */
37
- export declare const RUFLO_FEDERATION_EXTENSION_URI = "urn:ruflo:federation:manifest:v1";
38
- export interface A2AAgentInterface {
39
- readonly url: string;
40
- readonly protocolBinding: string;
41
- readonly protocolVersion: string;
42
- readonly tenant?: string;
43
- }
44
- export interface A2AAgentSkill {
45
- readonly id: string;
46
- readonly name: string;
47
- readonly description: string;
48
- readonly tags: readonly string[];
49
- readonly examples?: readonly string[];
50
- readonly inputModes?: readonly string[];
51
- readonly outputModes?: readonly string[];
52
- }
53
- export interface A2AAgentExtension {
54
- readonly uri: string;
55
- readonly description?: string;
56
- readonly required?: boolean;
57
- readonly params?: Record<string, unknown>;
58
- }
59
- export interface A2AAgentCapabilities {
60
- readonly streaming?: boolean;
61
- readonly pushNotifications?: boolean;
62
- readonly extensions?: readonly A2AAgentExtension[];
63
- readonly extendedAgentCard?: boolean;
64
- }
65
- export interface A2AAgentProvider {
66
- readonly url: string;
67
- readonly organization: string;
68
- }
69
- export interface A2AAgentCard {
70
- readonly name: string;
71
- readonly description: string;
72
- readonly supportedInterfaces: readonly A2AAgentInterface[];
73
- readonly version: string;
74
- readonly capabilities: A2AAgentCapabilities;
75
- readonly defaultInputModes: readonly string[];
76
- readonly defaultOutputModes: readonly string[];
77
- readonly skills: readonly A2AAgentSkill[];
78
- readonly provider?: A2AAgentProvider;
79
- readonly documentationUrl?: string;
80
- readonly iconUrl?: string;
81
- readonly securitySchemes?: Record<string, unknown>;
82
- readonly securityRequirements?: readonly Record<string, readonly string[]>[];
83
- readonly signatures?: readonly {
84
- protected: string;
85
- signature: string;
86
- }[];
87
- }
88
- export interface ToAgentCardOptions {
89
- /** Human-readable agent name; defaults to `ruflo-federation/<nodeId>`. */
90
- readonly name?: string;
91
- /** Human-readable description override. */
92
- readonly description?: string;
93
- readonly provider?: A2AAgentProvider;
94
- readonly documentationUrl?: string;
95
- /**
96
- * Extra spec-core interfaces to advertise ahead of the federation binding
97
- * (e.g. a JSONRPC endpoint once A2A messaging lands). First entry is the
98
- * preferred interface per spec.
99
- */
100
- readonly additionalInterfaces?: readonly A2AAgentInterface[];
101
- }
102
- /**
103
- * Generate a spec-compliant A2A Agent Card from a ruflo federation manifest.
104
- * Every agent type becomes an AgentSkill; the federation endpoint becomes a
105
- * `RUFLO-FEDERATION` interface; the bespoke identity (nodeId, publicKey,
106
- * complianceModes, manifest signature) rides in a spec §4.6 extension so
107
- * `fromAgentCard` can restore it.
108
- */
109
- export declare function toAgentCard(manifest: FederationManifest, options?: ToAgentCardOptions): A2AAgentCard;
110
- export interface AgentCardValidation {
111
- readonly valid: boolean;
112
- readonly errors: readonly string[];
113
- }
114
- /**
115
- * Structural validation against the A2A 1.0 AgentCard REQUIRED fields.
116
- * Intentionally strict on required shape, lenient on unknown extra fields
117
- * (forward compatibility with future spec minors).
118
- */
119
- export declare function validateAgentCard(value: unknown): AgentCardValidation;
120
- /**
121
- * Map a validated remote A2A Agent Card into the bespoke federation registry
122
- * shape (a `FederationNode`) so A2A peers appear in federation discovery.
123
- *
124
- * Trust posture: A2A cards are self-describing metadata, NOT authenticated
125
- * federation manifests — consumed peers always enter at
126
- * `TrustLevel.UNTRUSTED` regardless of embedded identity claims. Trust is
127
- * earned afterwards through the normal handshake + TrustEvaluator path.
128
- */
129
- export declare function fromAgentCard(card: A2AAgentCard, sourceUrl?: string): FederationNode;
130
- //# sourceMappingURL=agent-card.d.ts.map
@@ -1,34 +0,0 @@
1
- /**
2
- * A2A Agent Card consumption — fetch + validate a remote card and map it
3
- * into the bespoke federation registry so A2A peers appear in federation
4
- * discovery. Cards only (no A2A Tasks/messaging in this iteration).
5
- */
6
- import type { DiscoveryService } from '../domain/services/discovery-service.js';
7
- import type { FederationNode } from '../domain/entities/federation-node.js';
8
- import { type A2AAgentCard } from './agent-card.js';
9
- export interface FetchAgentCardOptions {
10
- /** Injectable fetch for tests / restricted environments. Default: globalThis.fetch. */
11
- readonly fetchImpl?: typeof fetch;
12
- readonly timeoutMs?: number;
13
- /** Response size cap in bytes (defense against decompression floods). Default 256 KiB. */
14
- readonly maxBytes?: number;
15
- }
16
- export interface FetchAgentCardResult {
17
- readonly card: A2AAgentCard;
18
- readonly sourceUrl: string;
19
- }
20
- /**
21
- * Resolve the card URL: a bare base URL (`https://host[:port]` or a path-less
22
- * URL) gets the A2A well-known path appended; anything already pointing at a
23
- * JSON document is used as-is.
24
- */
25
- export declare function resolveAgentCardUrl(baseOrCardUrl: string): string;
26
- /** Fetch and structurally validate a remote A2A Agent Card. */
27
- export declare function fetchAgentCard(baseOrCardUrl: string, options?: FetchAgentCardOptions): Promise<FetchAgentCardResult>;
28
- /**
29
- * Fetch a remote Agent Card and register the peer in federation discovery.
30
- * The peer enters at TrustLevel.UNTRUSTED (see fromAgentCard) — the card is
31
- * self-asserted metadata, and trust is earned through the normal handshake.
32
- */
33
- export declare function consumeAgentCard(discovery: DiscoveryService, baseOrCardUrl: string, options?: FetchAgentCardOptions): Promise<FederationNode>;
34
- //# sourceMappingURL=consume.d.ts.map
@@ -1,40 +0,0 @@
1
- import { type A2AAgentCard } from './agent-card.js';
2
- /**
3
- * Host-owned planner semantics for a registered capability identifier.
4
- * Remote registration metadata may select an identifier, but never supplies
5
- * these planner-visible strings directly.
6
- */
7
- export interface PlannerCapabilityDefinition {
8
- readonly id: string;
9
- readonly functionality: string;
10
- readonly inputSpecification: string;
11
- readonly outputSpecification: string;
12
- readonly usageConstraints: readonly string[];
13
- }
14
- export interface PlannerDescriptorPolicy {
15
- /** Resolve only identifiers the host has explicitly approved for planning. */
16
- readonly resolveCapability: (canonicalSkillId: string) => PlannerCapabilityDefinition | undefined;
17
- readonly maximumCapabilities?: number;
18
- }
19
- export interface PlannerSafeAgentDescriptor {
20
- readonly schema: 'ruflo/planner-safe-agent-descriptor/v1';
21
- readonly source: 'a2a-agent-card';
22
- readonly capabilities: readonly PlannerCapabilityDefinition[];
23
- readonly authority: 'none';
24
- }
25
- export interface PlannerDescriptorProjection {
26
- readonly descriptor: PlannerSafeAgentDescriptor;
27
- readonly rejectedSkillCount: number;
28
- readonly duplicateSkillCount: number;
29
- }
30
- /**
31
- * Project a third-party A2A Agent Card into planner-visible metadata.
32
- *
33
- * Security boundary: card descriptions, skill descriptions, examples, tags,
34
- * provider text, documentation URLs, extension parameters, and all other
35
- * remote prose are deliberately absent from the return type. Only a bounded
36
- * canonical skill identifier may cross the registration boundary, and its
37
- * planner semantics come from a host-controlled resolver.
38
- */
39
- export declare function projectPlannerSafeAgentCard(card: A2AAgentCard, policy: PlannerDescriptorPolicy): PlannerDescriptorProjection;
40
- //# sourceMappingURL=planner-descriptor.d.ts.map
@@ -1,46 +0,0 @@
1
- /**
2
- * A2A well-known Agent Card endpoint (A2A 1.0 §8.2 discovery + §8.6 caching).
3
- *
4
- * Serves `GET /.well-known/agent-card.json` from a minimal `node:http`
5
- * server. Security posture follows ADR-166 (mcp-bridge unauthenticated-RCE
6
- * remediation): binds 127.0.0.1 by default and REFUSES a non-loopback bind
7
- * unless the caller passes `allowNonLoopback: true` explicitly. The endpoint
8
- * is read-only (GET/HEAD on one exact path), exposes only the public card,
9
- * and is entirely opt-in — nothing here weakens the federation transport's
10
- * existing bind or auth behavior.
11
- */
12
- import { type A2AAgentCard } from './agent-card.js';
13
- export interface AgentCardServerOptions {
14
- /** Card supplier — re-invoked per request so a late-published manifest is picked up. */
15
- readonly getCard: () => A2AAgentCard | null;
16
- readonly port: number;
17
- /** Bind host. Default 127.0.0.1 (ADR-166 posture). */
18
- readonly host?: string;
19
- /** Serve path. Default A2A_WELL_KNOWN_PATH. */
20
- readonly path?: string;
21
- /**
22
- * Explicit opt-in required to bind anything other than loopback. Without
23
- * it a non-loopback host is rejected at start (fail-closed).
24
- */
25
- readonly allowNonLoopback?: boolean;
26
- /** Cache-Control max-age seconds (spec §8.6.1). Default 300. */
27
- readonly cacheMaxAgeSeconds?: number;
28
- }
29
- export interface AgentCardServerHandle {
30
- readonly url: string;
31
- readonly host: string;
32
- readonly port: number;
33
- close(): Promise<void>;
34
- }
35
- export declare function isLoopbackHost(host: string): boolean;
36
- /**
37
- * Start the well-known Agent Card HTTP endpoint.
38
- *
39
- * Responses:
40
- * GET/HEAD <path> → 200 application/json (+ Cache-Control, ETag per §8.6)
41
- * or 503 when no card is available yet
42
- * other method → 405
43
- * other path → 404
44
- */
45
- export declare function startAgentCardServer(options: AgentCardServerOptions): Promise<AgentCardServerHandle>;
46
- //# sourceMappingURL=well-known.d.ts.map
@@ -1,27 +0,0 @@
1
- import type { FederationClaimType, PolicyEngineDeps } from './policy-engine.js';
2
- export type FederationAuthorizationMode = 'legacy' | 'observe' | 'enforce';
3
- export interface FederationClaimCheckerConfig {
4
- mode?: FederationAuthorizationMode;
5
- grantedClaims?: readonly string[];
6
- onObservation?: (claim: FederationClaimType, granted: boolean) => void;
7
- }
8
- export interface FederationClaimChecker {
9
- mode: FederationAuthorizationMode;
10
- grantedClaims: ReadonlySet<FederationClaimType>;
11
- checkClaim: PolicyEngineDeps['checkClaim'];
12
- }
13
- /**
14
- * Compatibility bridge for the legacy federation policy engine.
15
- *
16
- * This removes the anonymous `() => true` production stub and makes
17
- * compatibility behavior explicit:
18
- * - legacy: preserve pre-ADR-325 behavior;
19
- * - observe: calculate and report missing grants without blocking;
20
- * - enforce: default deny unless the exact claim is configured.
21
- *
22
- * ADR-324 policy adapters can supply the `grantedClaims` set after evaluating
23
- * the request; ownership-changing federation messages remain disabled in the
24
- * default message policy until the full ingress PEP is composed.
25
- */
26
- export declare function createFederationClaimChecker(config?: FederationClaimCheckerConfig): FederationClaimChecker;
27
- //# sourceMappingURL=claim-checker.d.ts.map