Commit Graph

6 Commits

Author SHA1 Message Date
rUv fabcc9261a fix(hooks): Codex hooks.json schema + PreToolUse verdict compat (#2857)
Codex's plugin hook-manifest loader accepts only `description` and
`hooks` at the top level and hard-rejects the rest of the manifest on
anything else. plugins/ruflo-core/hooks/hooks.json and
plugins/ruflo-cost-tracker/hooks/hooks.json carried `_note` /
`_platform_note` documentation fields, so a fresh Codex install of
ruflo-core@ruflo (still true as of the currently-published 3.32.38 /
ruflo-core 0.2.5) fails to load the plugin at all with:

  failed to parse plugin hooks config .../hooks.json:
  unknown field `_note`, expected `description` or `hooks`

Fold the doc content into `description` (content preserved, no hook
commands changed) for both marketplace-listed manifests, and add a
strict top-level-key check to
scripts/audit-plugin-hooks-cross-platform.mjs so this class of
regression fails CI going forward. `.claude-plugin/hooks/hooks.json`
is POSIX-only and not marketplace-distributed (not what Codex fetches
for ruflo-core@ruflo); its doc fields are folded too but its
audit-script flags (`_platform`, `_legacy_unaudited_shim`) are kept.

Second, deeper bug once the manifest loads at all: `modify-bash`/
`modify-file` PreToolUse hooks always echo Cursor's
`{"permission":"allow"}` verdict. Codex's own strict output schema
(additionalProperties: false) rejects that shape outright and reports
"hook returned invalid pre-tool-use JSON output" on every single tool
call — verified directly against the real parser
(codex-rs/hooks/src/engine/output_parser.rs,
codex-rs/hooks/src/events/pre_tool_use.rs) and its generated JSON
schema. Empty stdout is the one input Codex's parser treats as
no-opinion/implicit-allow with no error. `isCodexPluginHost()` (added
for #2816, ruflo-core 0.2.5) already detects Codex via its
PLUGIN_ROOT/PLUGIN_DATA env vars and correctly suppresses the verdict
in that case — harden it with a `turn_id`-based fallback (a documented
Codex-only field always present in Codex's PreToolUse input JSON, per
codex-rs/hooks/schema/generated/pre-tool-use.command.input.schema.json)
so detection doesn't depend solely on those env vars being set.

Bump ruflo-core 0.2.5 -> 0.2.6 and ruflo-cost-tracker 0.26.2 -> 0.26.3
so Codex's per-version plugin cache invalidates and re-fetches the
fixed manifest instead of serving a stale cached copy indefinitely.

Fixes #2855, #2856.
2026-07-29 21:36:20 -04:00
rUv 67ff9898c0 fix: resolve current runtime and verification defects for v3.32.36 (#2850)
* fix(cli): make runtime status and learning signals truthful

* fix(metaharness): accept padded scan severities

* fix(codex): make core hooks and status skill native

* fix(security): make witness verification hermetic

* fix(metrics): expose grounded learning outcomes

* fix(hooks): deduplicate project and plugin events

* fix(verification): preserve security audit payloads

* fix(runtime): stabilize dual memory skills and MCP schemas

* fix(cli): harden helper signing and reflexion health

* test(release): align helper and container invariants

* chore(release): prepare v3.32.36

* test(funnel): align gates with cold-start seed pool

* fix(ci): document MCP environment precedence
2026-07-29 15:08:51 -04:00
ruvnet e332689b8c fix(release): harden hooks, statusline, security, and plugin MCP integration 2026-07-16 23:06:29 -04:00
ruvnet d20f1323b1 fix(codex): ship stable Windows-safe Ruflo integration 2026-07-16 18:48:10 -04:00
ruv 6198abfab7 fix(plugins): reconcile stale smoke contract assertions across 23 plugins
full-system-test surfaced 23/32 plugin smoke contracts failing on a
single drifted assertion: the smoke gate greps ADR-0001 for
`status: Proposed`, but those ADRs were long since promoted to
`Accepted` without updating the gate. Flip the assertion (label, grep,
message) Proposed -> Accepted only where the ADR is genuinely Accepted.

ruflo-core additionally had a stale version assertion (0.2.0 -> 0.2.2).

Left untouched: ruflo-adr, ruflo-browser, ruflo-intelligence — their
ADR-0001 is genuinely Proposed, so their smokes correctly assert it.
No plugin source or ADR changed — only the drifted test assertions.

All 32 plugin smoke contracts now pass; full-system-test is 4/4 green.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-29 15:00:34 -04:00
Reuven bd384ad5e6 feat(ruflo-core): v0.2.0 — adopt foundation plugin contract (ADR-0001, MCP server contract, sibling ADR cross-references)
The foundation plugin now documents its own contract since 30+ plugins
depend on the MCP server it registers and the orchestration patterns it
documents.

- ADR-0001 (Proposed) at docs/adrs/0001-core-contract.md
- README adds Compatibility (pin @claude-flow/cli v3.6 — .mcp.json uses
  @latest dynamic resolver, smoke verifies the resolved CLI), MCP server
  contract (300+ tools across 11 families with per-plugin attribution
  table), Sibling contracts cross-reference table (7 ADRs covering
  namespace convention, session-as-skill, 4-step pipeline, 3-gate
  AIDefence, 270s cache-aware /loop, ADR token-optimization)
- plugin.json bumps 0.1.0 → 0.2.0; description enumerates registered
  family prefixes; keywords add foundation, mcp-server, plugin-catalog,
  discovery
- scripts/smoke.sh — 10 structural checks: version + keywords, .mcp.json
  registers ruflo server, 3 agents + 3 skills present with frontmatter,
  discover-plugins catalog has ≥25 sibling references, v3.6 pin, sibling
  ADR cross-references (namespace + 3-gate + 4-step), ADR Proposed,
  /ruflo-status invokes doctor+status, no wildcard tools

Verification: bash plugins/ruflo-core/scripts/smoke.sh → 10/10

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-04 19:52:46 -04:00