feat(metaharness): harness type in ruflo plugin registry (iter 6, Phase 2)

ADR-150 Phase 2 lights up the third major surface: the ruflo plugin
registry now accepts `type: 'harness'` entries. Community-built or
internally-minted MetaHarness harnesses surface alongside plugins in:

  npx ruflo plugins list --type harness     # filter to harnesses only
  npx ruflo plugins list                    # see both plugins + harnesses
  npx ruflo plugins search <query>          # cross-cuts both

The schemas were designed to be compatible by the upstream
`buildRegistryEntry()` doc comment: "Mirrors the ruflo plugin registry
shape so the same UI can browse it." This change makes that contract
real on the consumer side.

CHANGES
- v3/@claude-flow/cli/src/plugins/store/types.ts: added 'harness' to
  the PluginType union with an ADR-150 anchor comment. search.ts's
  type filter (`plugins.filter(p => p.type === options.type)`)
  automatically supports the new value with no code change required.
- v3/@claude-flow/cli/src/plugins/store/discovery.ts: added 'harness'
  to the demoPluginRegistry's `categories[]` block. pluginCount: 0
  initially — populated by the IPFS-pinned registry when MetaHarness
  publishes harness entries upstream.

ADR-150 ARCHITECTURAL CONSTRAINT
This is purely a schema extension — no runtime import, no
dependency. The plugin store continues to work identically when
`@metaharness/*` is absent; `--type harness` filter just returns zero
results. Rule #3 (graceful degradation) satisfied by construction.

SMOKE STEP 17b
- Asserts 'harness' is in the PluginType union
- Asserts ADR-150 anchor comment present (drift guard)
- Asserts 'harness' category present in demoPluginRegistry

Smoke: 17 → 18. Fleet: 33/33. tsc clean.

Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
ruv committed 2026-06-16 13:47:45 -04:00
1 parent 42bda4874a
commit d941846e78
3 files changed
+20 -1

No files matched your search

@@ -170,6 +170,16 @@ if (!od.metaharness) { console.error('missing metaharness in optionalDependencie
if (j.dependencies && j.dependencies.metaharness) { console.error('metaharness leaked into dependencies'); process.exit(1); }
" 2>/dev/null && ok || bad "ruflo wrapper missing metaharness optionalDep"
step "17b. harness type in plugin registry (Phase 2 — iter 6)"
F="$ROOT/../../v3/@claude-flow/cli/src/plugins/store/types.ts"
miss=""
[[ -f "$F" ]] || miss="$miss types-file-missing"
grep -q "'harness'" "$F" 2>/dev/null || miss="$miss no-harness-type"
grep -q "ADR-150" "$F" 2>/dev/null || miss="$miss no-adr-anchor"
D="$ROOT/../../v3/@claude-flow/cli/src/plugins/store/discovery.ts"
grep -q "id: 'harness'" "$D" 2>/dev/null || miss="$miss no-harness-category"
[[ -z "$miss" ]] && ok || bad "$miss"
step "17. eject command — Phase 2 differentiator (iter 4)"
F="$ROOT/../../v3/@claude-flow/cli/src/commands/eject.ts"
miss=""
@@ -236,6 +236,9 @@ export class PluginDiscoveryService {
{ id: 'integrations', name: 'Integrations', description: 'Third-party integrations', pluginCount: 2 },
{ id: 'agents', name: 'Agents', description: 'Custom agent types', pluginCount: 1 },
{ id: 'iot', name: 'IoT', description: 'IoT device management and fleet orchestration', pluginCount: 1 },
// ADR-150 — MetaHarness-generated standalone harnesses
// surface alongside plugins. Filter via `--type harness`.
{ id: 'harness', name: 'Harness', description: 'MetaHarness-generated standalone agent harnesses (ADR-150)', pluginCount: 0 },
],
authors: [
{
@@ -62,6 +62,11 @@ export interface PluginEntry {
/**
* Plugin types
*
* ADR-150 added 'harness' — a MetaHarness-generated standalone agent
* harness. Harnesses share the ruflo plugin registry shape (per
* `buildRegistryEntry()` from metaharness) so `npx ruflo plugins list
* --type harness` surfaces community harnesses alongside plugins.
*/
export type PluginType =
| 'agent' // Adds new agent types
@@ -71,7 +76,8 @@ export type PluginType =
| 'integration'// External integrations
| 'theme' // UI themes
| 'core' // Core functionality extensions
| 'hybrid'; // Multiple types
| 'hybrid' // Multiple types
| 'harness'; // ADR-150 — MetaHarness-generated standalone harness
/**
* Plugin dependency