claude-flow 3.14.4 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/package.json +1 -1
  3. package/v3/@claude-flow/cli/dist/src/business-pods/bbs-budget-tracker.d.ts +139 -0
  4. package/v3/@claude-flow/cli/dist/src/business-pods/bbs-budget-tracker.js +358 -0
  5. package/v3/@claude-flow/cli/dist/src/business-pods/domain-affinity-policy.d.ts +47 -0
  6. package/v3/@claude-flow/cli/dist/src/business-pods/domain-affinity-policy.js +65 -0
  7. package/v3/@claude-flow/cli/dist/src/business-pods/pod-schema.d.ts +96 -0
  8. package/v3/@claude-flow/cli/dist/src/business-pods/pod-schema.js +225 -0
  9. package/v3/@claude-flow/cli/dist/src/commands/metaharness.js +20 -5
  10. package/v3/@claude-flow/cli/dist/src/mcp-client.js +21 -0
  11. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentbbs-tools.d.ts +28 -0
  12. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentbbs-tools.js +394 -0
  13. package/v3/@claude-flow/cli/dist/src/mcp-tools/agenticow-tools.d.ts +36 -0
  14. package/v3/@claude-flow/cli/dist/src/mcp-tools/agenticow-tools.js +253 -0
  15. package/v3/@claude-flow/cli/dist/src/mcp-tools/business-pod-tools.d.ts +20 -0
  16. package/v3/@claude-flow/cli/dist/src/mcp-tools/business-pod-tools.js +169 -0
  17. package/v3/@claude-flow/cli/dist/src/mcp-tools/http-fetch-tools.d.ts +55 -0
  18. package/v3/@claude-flow/cli/dist/src/mcp-tools/http-fetch-tools.js +329 -0
  19. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.d.ts +4 -0
  20. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.js +8 -0
  21. package/v3/@claude-flow/cli/dist/src/mcp-tools/metaharness-tools.d.ts +6 -0
  22. package/v3/@claude-flow/cli/dist/src/mcp-tools/metaharness-tools.js +83 -4
  23. package/v3/@claude-flow/cli/package.json +4 -1
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Pod template schema validator (ADR-164 §3.3 + ADR-164.1 §3.2).
3
+ *
4
+ * Defines the `PodTemplate` type that every business-pod JSON file under
5
+ * `plugins/ruflo-business-pods/templates/` MUST conform to, and a hand-rolled
6
+ * validator that throws structured errors on invalid templates. No external
7
+ * deps (no AJV, no zod) — the schema is small enough to validate by hand and
8
+ * doing so keeps the cli's optional-dep surface unchanged.
9
+ *
10
+ * @module @claude-flow/cli/business-pods/pod-schema
11
+ */
12
+ export type PiiPolicy = 'soc2' | 'gdpr' | 'hipaa' | 'permissive';
13
+ export interface PodAgent {
14
+ /** Role label inside the pod, e.g. "lead-gen-agent". */
15
+ role: string;
16
+ /** Must resolve to a known ruflo agent type (researcher / coder / ...). */
17
+ agentType: string;
18
+ /** Human-readable description of what the agent does in this pod. */
19
+ description: string;
20
+ /** Routing hint — true = prefer local stdio execution. */
21
+ preferLocal: boolean;
22
+ }
23
+ export interface PodBench {
24
+ /** Bench identifier, e.g. "sales-pipeline-bench". */
25
+ name: string;
26
+ /** What the bench measures. */
27
+ description: string;
28
+ /** Acceptance criteria — non-empty list of human-readable bullets. */
29
+ successCriteria: string[];
30
+ /** Cadence between bench evaluations (hours, ≥1). */
31
+ scheduleHours: number;
32
+ }
33
+ export interface PodAuditReadView {
34
+ /** Event types surfaced to the business-owner read view. */
35
+ includedEventTypes: string[];
36
+ /** Retention window for the read view (days, ≥1). */
37
+ retentionDays: number;
38
+ }
39
+ export interface PodTemplate {
40
+ /** Canonical pod name (matches BBS roomId). */
41
+ name: string;
42
+ /** Display name for the cockpit. */
43
+ displayName: string;
44
+ /** BBS room this pod serves, e.g. "sales". */
45
+ roomId: string;
46
+ /** Ordered list of pod agent compositions. */
47
+ agents: PodAgent[];
48
+ /** Allow-list of MCP tools the pod's agents may invoke. */
49
+ allowedMcpTools: string[];
50
+ /** Bench definition for periodic Darwin /loop scoring. */
51
+ bench: PodBench;
52
+ /** PII compliance mode applied to every envelope in/out of this room. */
53
+ piiPolicy: PiiPolicy;
54
+ /** Monthly USD hard cap (0 = unlimited; not recommended). */
55
+ budgetUsdMonthly: number;
56
+ /** Estimated USD per pod tick — drives reservation amount. */
57
+ budgetUsdPerRun: number;
58
+ /** If true, @metaharness/router routes to local first. */
59
+ preferLocalExecution: boolean;
60
+ /** POSIX cron expression for the perpetual /loop scheduler. */
61
+ cronSchedule: string;
62
+ /** Compliance audit-log projection. */
63
+ auditReadView: PodAuditReadView;
64
+ /**
65
+ * Reservation expiry for the atomic budget tracker — ADR-164.1 §3.2.
66
+ * Bounded to [5000, 300000] ms (5 s – 5 min). Default 60_000 if omitted.
67
+ */
68
+ reservationExpiryMs?: number;
69
+ }
70
+ /**
71
+ * Structured validation error — carries the JSON pointer that caused it so
72
+ * callers can render a precise message.
73
+ */
74
+ export declare class PodTemplateValidationError extends Error {
75
+ path: string;
76
+ constructor(message: string, path: string);
77
+ }
78
+ /**
79
+ * Validate `json` and return a typed `PodTemplate`. Throws
80
+ * `PodTemplateValidationError` with a JSON-pointer-style path on failure.
81
+ *
82
+ * Used by:
83
+ * - `business_pod_validate` MCP tool — returns the error verbatim
84
+ * - `pod-tick.mjs` — pre-flight check before any pod execution
85
+ * - any external schema-loader that wants typed templates
86
+ */
87
+ export declare function validatePodTemplate(json: unknown): PodTemplate;
88
+ /**
89
+ * Known ruflo agent types — kept in sync with src/commands/agent.ts AGENT_TYPES.
90
+ * The list is duplicated here intentionally so pod-tick.mjs can run without
91
+ * importing the entire commands module.
92
+ *
93
+ * If a new agent type is added to AGENT_TYPES, mirror it here.
94
+ */
95
+ export declare const KNOWN_AGENT_TYPES: readonly ["coder", "researcher", "tester", "reviewer", "architect", "system-architect", "coordinator", "analyst", "optimizer", "security-architect", "security-auditor", "memory-specialist", "swarm-specialist", "performance-engineer", "core-architect", "test-architect", "planner", "task-orchestrator", "perf-analyzer", "backend-dev", "api-docs", "cicd-engineer", "code-analyzer", "database-specialist", "base-template-generator"];
96
+ //# sourceMappingURL=pod-schema.d.ts.map
@@ -0,0 +1,225 @@
1
+ /**
2
+ * Pod template schema validator (ADR-164 §3.3 + ADR-164.1 §3.2).
3
+ *
4
+ * Defines the `PodTemplate` type that every business-pod JSON file under
5
+ * `plugins/ruflo-business-pods/templates/` MUST conform to, and a hand-rolled
6
+ * validator that throws structured errors on invalid templates. No external
7
+ * deps (no AJV, no zod) — the schema is small enough to validate by hand and
8
+ * doing so keeps the cli's optional-dep surface unchanged.
9
+ *
10
+ * @module @claude-flow/cli/business-pods/pod-schema
11
+ */
12
+ /**
13
+ * Structured validation error — carries the JSON pointer that caused it so
14
+ * callers can render a precise message.
15
+ */
16
+ export class PodTemplateValidationError extends Error {
17
+ path;
18
+ constructor(message, path) {
19
+ super(`pod-template at ${path}: ${message}`);
20
+ this.path = path;
21
+ this.name = 'PodTemplateValidationError';
22
+ }
23
+ }
24
+ const PII_POLICIES = ['soc2', 'gdpr', 'hipaa', 'permissive'];
25
+ function isObject(v) {
26
+ return typeof v === 'object' && v !== null && !Array.isArray(v);
27
+ }
28
+ function requireString(parent, key, path) {
29
+ const v = parent[key];
30
+ if (typeof v !== 'string' || v.length === 0) {
31
+ throw new PodTemplateValidationError(`field "${key}" must be a non-empty string`, path);
32
+ }
33
+ return v;
34
+ }
35
+ function requireNumber(parent, key, path) {
36
+ const v = parent[key];
37
+ if (typeof v !== 'number' || !Number.isFinite(v)) {
38
+ throw new PodTemplateValidationError(`field "${key}" must be a finite number`, path);
39
+ }
40
+ return v;
41
+ }
42
+ function requireBoolean(parent, key, path) {
43
+ const v = parent[key];
44
+ if (typeof v !== 'boolean') {
45
+ throw new PodTemplateValidationError(`field "${key}" must be a boolean`, path);
46
+ }
47
+ return v;
48
+ }
49
+ function requireArray(parent, key, path, itemValidator) {
50
+ const v = parent[key];
51
+ if (!Array.isArray(v)) {
52
+ throw new PodTemplateValidationError(`field "${key}" must be an array`, path);
53
+ }
54
+ return v.map((item, idx) => itemValidator(item, `${path}/${key}[${idx}]`));
55
+ }
56
+ function validatePodAgent(item, path) {
57
+ if (!isObject(item))
58
+ throw new PodTemplateValidationError('agent must be an object', path);
59
+ return {
60
+ role: requireString(item, 'role', path),
61
+ agentType: requireString(item, 'agentType', path),
62
+ description: requireString(item, 'description', path),
63
+ preferLocal: requireBoolean(item, 'preferLocal', path),
64
+ };
65
+ }
66
+ function validatePodBench(item, path) {
67
+ if (!isObject(item))
68
+ throw new PodTemplateValidationError('bench must be an object', path);
69
+ const name = requireString(item, 'name', path);
70
+ const description = requireString(item, 'description', path);
71
+ const successCriteria = requireArray(item, 'successCriteria', path, (s, sp) => {
72
+ if (typeof s !== 'string' || s.length === 0) {
73
+ throw new PodTemplateValidationError('successCriteria entries must be non-empty strings', sp);
74
+ }
75
+ return s;
76
+ });
77
+ if (successCriteria.length === 0) {
78
+ throw new PodTemplateValidationError('bench.successCriteria must have ≥1 entry', path);
79
+ }
80
+ const scheduleHours = requireNumber(item, 'scheduleHours', path);
81
+ if (scheduleHours < 1) {
82
+ throw new PodTemplateValidationError('bench.scheduleHours must be ≥1', path);
83
+ }
84
+ return { name, description, successCriteria, scheduleHours };
85
+ }
86
+ function validateAuditReadView(item, path) {
87
+ if (!isObject(item)) {
88
+ throw new PodTemplateValidationError('auditReadView must be an object', path);
89
+ }
90
+ const includedEventTypes = requireArray(item, 'includedEventTypes', path, (s, sp) => {
91
+ if (typeof s !== 'string' || s.length === 0) {
92
+ throw new PodTemplateValidationError('includedEventTypes entries must be non-empty strings', sp);
93
+ }
94
+ return s;
95
+ });
96
+ const retentionDays = requireNumber(item, 'retentionDays', path);
97
+ if (retentionDays < 1) {
98
+ throw new PodTemplateValidationError('auditReadView.retentionDays must be ≥1', path);
99
+ }
100
+ return { includedEventTypes, retentionDays };
101
+ }
102
+ // POSIX cron — five or six space-separated fields. Permissive on field
103
+ // contents (digits, *, -, /, ,) — actual cron evaluation happens at schedule
104
+ // time. We only catch obviously malformed values here.
105
+ const CRON_RE = /^([\d*/,\-]+\s+){4,5}[\d*/,\-]+$/;
106
+ /**
107
+ * Validate `json` and return a typed `PodTemplate`. Throws
108
+ * `PodTemplateValidationError` with a JSON-pointer-style path on failure.
109
+ *
110
+ * Used by:
111
+ * - `business_pod_validate` MCP tool — returns the error verbatim
112
+ * - `pod-tick.mjs` — pre-flight check before any pod execution
113
+ * - any external schema-loader that wants typed templates
114
+ */
115
+ export function validatePodTemplate(json) {
116
+ if (!isObject(json)) {
117
+ throw new PodTemplateValidationError('pod-template must be a JSON object', '/');
118
+ }
119
+ const name = requireString(json, 'name', '/');
120
+ if (!/^[a-z][a-z0-9-]*$/.test(name)) {
121
+ throw new PodTemplateValidationError('name must be lowercase-kebab (e.g. "sales")', '/');
122
+ }
123
+ const displayName = requireString(json, 'displayName', '/');
124
+ const roomId = requireString(json, 'roomId', '/');
125
+ if (!/^[A-Za-z0-9_.\-:/@#]+$/.test(roomId)) {
126
+ throw new PodTemplateValidationError('roomId may only contain [A-Za-z0-9_.\\-:/@#]', '/');
127
+ }
128
+ const agents = requireArray(json, 'agents', '/', validatePodAgent);
129
+ if (agents.length === 0) {
130
+ throw new PodTemplateValidationError('agents must have ≥1 entry', '/');
131
+ }
132
+ const allowedMcpTools = requireArray(json, 'allowedMcpTools', '/', (t, tp) => {
133
+ if (typeof t !== 'string' || t.length === 0) {
134
+ throw new PodTemplateValidationError('allowedMcpTools entries must be non-empty strings', tp);
135
+ }
136
+ return t;
137
+ });
138
+ if (allowedMcpTools.length === 0) {
139
+ throw new PodTemplateValidationError('allowedMcpTools must have ≥1 entry', '/');
140
+ }
141
+ const bench = validatePodBench(json.bench, '/bench');
142
+ const piiPolicy = requireString(json, 'piiPolicy', '/');
143
+ if (!PII_POLICIES.includes(piiPolicy)) {
144
+ throw new PodTemplateValidationError(`piiPolicy must be one of: ${PII_POLICIES.join(', ')}`, '/');
145
+ }
146
+ const budgetUsdMonthly = requireNumber(json, 'budgetUsdMonthly', '/');
147
+ if (budgetUsdMonthly < 0) {
148
+ throw new PodTemplateValidationError('budgetUsdMonthly must be ≥0', '/');
149
+ }
150
+ const budgetUsdPerRun = requireNumber(json, 'budgetUsdPerRun', '/');
151
+ if (budgetUsdPerRun < 0) {
152
+ throw new PodTemplateValidationError('budgetUsdPerRun must be ≥0', '/');
153
+ }
154
+ if (budgetUsdMonthly > 0 && budgetUsdPerRun > budgetUsdMonthly) {
155
+ throw new PodTemplateValidationError('budgetUsdPerRun must not exceed budgetUsdMonthly', '/');
156
+ }
157
+ const preferLocalExecution = requireBoolean(json, 'preferLocalExecution', '/');
158
+ const cronSchedule = requireString(json, 'cronSchedule', '/');
159
+ if (!CRON_RE.test(cronSchedule)) {
160
+ throw new PodTemplateValidationError('cronSchedule must be a POSIX cron expression (5 or 6 fields)', '/');
161
+ }
162
+ const auditReadView = validateAuditReadView(json.auditReadView, '/auditReadView');
163
+ let reservationExpiryMs;
164
+ if (json.reservationExpiryMs !== undefined) {
165
+ const v = requireNumber(json, 'reservationExpiryMs', '/');
166
+ // ADR-164.1 §3.2 — bounded to [5_000, 300_000] ms.
167
+ if (v < 5_000 || v > 300_000) {
168
+ throw new PodTemplateValidationError('reservationExpiryMs must be within [5000, 300000] ms (ADR-164.1 §3.2)', '/');
169
+ }
170
+ reservationExpiryMs = v;
171
+ }
172
+ return {
173
+ name,
174
+ displayName,
175
+ roomId,
176
+ agents,
177
+ allowedMcpTools,
178
+ bench,
179
+ piiPolicy: piiPolicy,
180
+ budgetUsdMonthly,
181
+ budgetUsdPerRun,
182
+ preferLocalExecution,
183
+ cronSchedule,
184
+ auditReadView,
185
+ reservationExpiryMs,
186
+ };
187
+ }
188
+ /**
189
+ * Known ruflo agent types — kept in sync with src/commands/agent.ts AGENT_TYPES.
190
+ * The list is duplicated here intentionally so pod-tick.mjs can run without
191
+ * importing the entire commands module.
192
+ *
193
+ * If a new agent type is added to AGENT_TYPES, mirror it here.
194
+ */
195
+ export const KNOWN_AGENT_TYPES = [
196
+ 'coder',
197
+ 'researcher',
198
+ 'tester',
199
+ 'reviewer',
200
+ 'architect',
201
+ 'system-architect',
202
+ 'coordinator',
203
+ 'analyst',
204
+ 'optimizer',
205
+ 'security-architect',
206
+ 'security-auditor',
207
+ 'memory-specialist',
208
+ 'swarm-specialist',
209
+ 'performance-engineer',
210
+ 'core-architect',
211
+ 'test-architect',
212
+ 'planner',
213
+ 'task-orchestrator',
214
+ 'perf-analyzer',
215
+ 'backend-dev',
216
+ 'api-docs',
217
+ 'cicd-engineer',
218
+ 'code-analyzer',
219
+ 'database-specialist',
220
+ // ADR-164 Phase 3 — added for the marketing/hr pods (content drafting +
221
+ // onboarding-template generation). Mirror this addition in the JS copy
222
+ // inside plugins/ruflo-business-pods/scripts/pod-tick.mjs.
223
+ 'base-template-generator',
224
+ ];
225
+ //# sourceMappingURL=pod-schema.js.map
@@ -56,6 +56,9 @@ const SUBCOMMANDS = {
56
56
  // iter 53 — one-command drift detection (compose audit-list + oia-audit + audit-trend)
57
57
  'drift-from-history': 'drift-from-history.mjs',
58
58
  mint: 'mint.mjs',
59
+ // @metaharness/redblue@~0.1.1 — adversarial red/blue LLM testing
60
+ // (init|run|patch|attack|report sub-subcommands handled by redblue.mjs)
61
+ redblue: 'redblue.mjs',
59
62
  };
60
63
  /**
61
64
  * Walk up from the current dirname to find the ruflo repo root that
@@ -63,8 +66,16 @@ const SUBCOMMANDS = {
63
66
  * 1. ruflo dev tree (cwd / ../plugins/...)
64
67
  * 2. ruflo wrapper (ruflo/node_modules/@claude-flow/cli/...)
65
68
  * 3. npx (npm-cache/__npx/... — fall back to cwd-scan)
69
+ *
70
+ * `requiredScript`, if provided, narrows the match: the returned dir must
71
+ * contain BOTH `_harness.mjs` (proves it's a plugin-scripts dir) AND the
72
+ * named script. This guards against the publish-artifact mirror at
73
+ * `v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/` getting picked
74
+ * over the source `plugins/ruflo-metaharness/scripts/` when the mirror
75
+ * lags the source (the mirror is regenerated only at publish time by
76
+ * `prepublishOnly`).
66
77
  */
67
- function locatePluginScripts() {
78
+ function locatePluginScripts(requiredScript) {
68
79
  const candidates = [];
69
80
  // Up from the cli dist dir
70
81
  let p = resolve(__dirname);
@@ -80,8 +91,11 @@ function locatePluginScripts() {
80
91
  candidates.push(join(cwd, 'plugins', 'ruflo-metaharness', 'scripts'));
81
92
  candidates.push(join(cwd, 'node_modules', '@claude-flow', 'cli', 'plugins', 'ruflo-metaharness', 'scripts'));
82
93
  for (const c of candidates) {
83
- if (existsSync(join(c, '_harness.mjs')))
84
- return c;
94
+ if (!existsSync(join(c, '_harness.mjs')))
95
+ continue;
96
+ if (requiredScript && !existsSync(join(c, requiredScript)))
97
+ continue;
98
+ return c;
85
99
  }
86
100
  return null;
87
101
  }
@@ -107,7 +121,7 @@ export const metaharnessCommand = {
107
121
  // iter 73 — list reflects all 10 dispatchable subcommands (was
108
122
  // stale at the iter-3 list of 5). Keep this synced with the
109
123
  // SUBCOMMANDS map above.
110
- description: 'One of: score | genome | mcp-scan | threat-model | oia-audit | audit-list | audit-trend | similarity | drift-from-history | mint',
124
+ description: 'One of: score | genome | mcp-scan | threat-model | oia-audit | audit-list | audit-trend | similarity | drift-from-history | mint | redblue',
111
125
  type: 'string',
112
126
  },
113
127
  ],
@@ -169,6 +183,7 @@ export const metaharnessCommand = {
169
183
  output.writeln(' similarity ADR-152 — weighted similarity between two harness fingerprints');
170
184
  output.writeln(' drift-from-history iter 53 — diff current state against most recent audit (1-command drift)');
171
185
  output.writeln(' mint scaffold a custom harness (dry-run by default)');
186
+ output.writeln(' redblue adversarial red/blue LLM testing (init|run|patch|attack|report)');
172
187
  output.writeln('');
173
188
  output.writeln('Each subcommand accepts --format json|table and --help.');
174
189
  output.writeln('');
@@ -180,7 +195,7 @@ export const metaharnessCommand = {
180
195
  output.writeln(`Valid: ${Object.keys(SUBCOMMANDS).join(', ')}`);
181
196
  return { success: false, exitCode: 2, data: { subcommand } };
182
197
  }
183
- const scriptDir = locatePluginScripts();
198
+ const scriptDir = locatePluginScripts(SUBCOMMANDS[subcommand]);
184
199
  if (!scriptDir) {
185
200
  output.writeln(output.warning('metaharness: plugins/ruflo-metaharness/scripts/ not found. Install ruflo with `npm i ruflo` or run from the ruflo repo.'));
186
201
  output.writeln(output.dim('(ADR-150 graceful degradation: this command is a thin delegator over the plugin; the plugin must be present.)'));
@@ -47,6 +47,18 @@ import { guidanceTools } from './mcp-tools/guidance-tools.js';
47
47
  import { autopilotTools } from './mcp-tools/autopilot-tools.js';
48
48
  // ADR-150 — MetaHarness MCP tools (score / genome / mcp-scan / threat-model / oia-audit)
49
49
  import { metaharnessTools } from './mcp-tools/metaharness-tools.js';
50
+ // agenticow@~0.2.3 — Copy-On-Write memory branching tools (162-byte branches);
51
+ // optional runtime dep, every handler returns `{degraded: true}` when missing.
52
+ import { agenticowTools } from './mcp-tools/agenticow-tools.js';
53
+ // ADR-164 — AgentBBS federated business-domain BBS rooms (Phase 1).
54
+ // Optional runtime dep, every handler returns `{degraded: true}` when missing.
55
+ import { agentbbsTools } from './mcp-tools/agentbbs-tools.js';
56
+ // ADR-164 Phase 2 — Business-pod template validation (pure local, no optional deps).
57
+ import { businessPodTools } from './mcp-tools/business-pod-tools.js';
58
+ // ADR-164 Phase 4 §5.1.8 — http_fetch MCP tool (secure-by-default HTTP probe
59
+ // for ops-pod synthetic-endpoint benches). Default-rejects private addresses
60
+ // + auth headers; opt-in via CLAUDE_FLOW_HTTP_FETCH_ALLOW_PRIVATE / _AUTH=1.
61
+ import { httpFetchTools } from './mcp-tools/http-fetch-tools.js';
50
62
  // #1916: coverage-aware routing tools — defined in ruvector/coverage-tools.ts
51
63
  // but were never registered, so the `ruflo hooks coverage-*` CLI subcommands
52
64
  // failed with `Tool not found: hooks_coverage-route`.
@@ -127,6 +139,15 @@ registerTools([
127
139
  ...coverageRouterTools,
128
140
  // ADR-150 — MetaHarness static-analysis tools (5)
129
141
  ...metaharnessTools,
142
+ // agenticow@~0.2.3 — COW memory branching (4 tools, graceful-degraded when missing)
143
+ ...agenticowTools,
144
+ // ADR-164 — AgentBBS federated business-domain BBS rooms (4 tools, Phase 1, graceful-degraded)
145
+ ...agentbbsTools,
146
+ // ADR-164 Phase 2 + Phase 3 — business_pod_validate + business_pod_route_backend
147
+ // (2 tools, no optional dep — schema validator + §3.4 domain-affinity router)
148
+ ...businessPodTools,
149
+ // ADR-164 Phase 4 §5.1.8 — http_fetch (1 tool, secure-by-default HTTP probe)
150
+ ...httpFetchTools,
130
151
  ]);
131
152
  /**
132
153
  * MCP Client Error
@@ -0,0 +1,28 @@
1
+ /**
2
+ * AgentBBS MCP Tools — Federated business-domain BBS room surface (ADR-164 Phase 1).
3
+ *
4
+ * Exposes the `agentbbs@~0.1.0` (a sibling BBS-style federation peer by the same
5
+ * author as ruflo) as MCP tools so ruflo agents can register business rooms
6
+ * (#sales, #finance, #marketing, ...), publish/watch typed envelopes, and
7
+ * mint single-use human-join tokens for SSH/web cockpit access.
8
+ *
9
+ * Motivation:
10
+ * ADR-164 wires the "business autopilot" cockpit on top of the existing
11
+ * ruflo federation primitives (FederationEnvelope, PII pipeline, budget
12
+ * circuit breaker). The 4 tools here are the ruflo-side handles into the
13
+ * agentbbs Rust workspace (`crates/agentbbs-federation/` and
14
+ * `crates/agentbbs-mcp/`) that already implement Ed25519-signed envelopes
15
+ * and an MCP transport. Phase 1 ships the surface; Phases 2-5 wire deeper.
16
+ *
17
+ * Architectural constraint (mirrors metaharness-tools.ts / agenticow-tools.ts):
18
+ * - `agentbbs` lives in `optionalDependencies` — must NOT be a hard runtime dep
19
+ * - When the package is missing, every tool returns
20
+ * `{success: true, degraded: true, reason: 'agentbbs-not-found'}`
21
+ * so callers see one contract regardless of install state
22
+ * - Phase 1: polling-based watch (streaming subscriptions are Phase 4)
23
+ *
24
+ * @module @claude-flow/cli/mcp-tools/agentbbs
25
+ */
26
+ import type { MCPTool } from './types.js';
27
+ export declare const agentbbsTools: MCPTool[];
28
+ //# sourceMappingURL=agentbbs-tools.d.ts.map