Skip to content

fix: comprehensive cleanup — config paths, Hermes consumer, agents, CLI#20

Merged
htafolla merged 9 commits intomasterfrom
fix/minor-issues-v1.15.27
Mar 30, 2026
Merged

fix: comprehensive cleanup — config paths, Hermes consumer, agents, CLI#20
htafolla merged 9 commits intomasterfrom
fix/minor-issues-v1.15.27

Conversation

@htafolla
Copy link
Copy Markdown
Owner

@htafolla htafolla commented Mar 30, 2026

Comprehensive cleanup for v1.15.27: config path centralization, Hermes consumer support, agent registration, CLI fixes.

Active bug fixes: stale version display, missing report flags, broken --output, bridge.mjs state dir.
Config: 27 files centralized on config-paths.ts resolver (STRRAY_CONFIG_DIR > .strray/ > .opencode/strray/).
Hermes: postinstall detects ~/.hermes, skips all .opencode/ setup — .opencode/ was stale dead weight.
Agents: 14 missing agents added to opencode.json (11 → 26 active subagents).
Infra: all 4 git hooks installed, 3 orphaned scripts deleted, OpenCode.json refs cleaned.

9 commits, 58 files, +1250/-703.

- init.sh: use FRAMEWORK_ROOT/package.json for version (was prioritizing
  stale node_modules/strray-ai/package.json in dev mode, showing 1.15.19
  instead of actual source version)
- cli report: add --daily, --performance, --compliance, --session, --ci
  convenience flags matching AGENTS.md documentation
- cli report: fix --output to actually write to file instead of just
  logging the path
…, pre-push, post-push)

Previously only pre-commit was ever installed (manually). The postinstaller
now installs all hooks with smart handling:
- Detects existing StringRay hooks and updates if source is newer
- Backs up non-StringRay hooks before overwriting
- Only installs if .git directory and hook runner exist
- Sets executable permissions (755)
…routing-mappings.json

- strray-codex-injection.ts: added .opencode/strray/agents_template.md as
  a codex file location (was only checking .strray/ which may not exist
  in consumer installs where .opencode/strray/ is the active config dir)
- Added routing-mappings.json to .opencode/strray/ in source so the
  postinstaller copies it to consumers (was only in .strray/ which relies
  on a symlink that may break)
…oughout

Files that hardcoded .opencode/strray/ or .strray/ and missed the alternate
path in consumer installs:

- codex-loader.ts: was hardcoded to .opencode/strray/codex.json, now uses
  resolveCodexPath() which checks both .strray/ and .opencode/strray/
- PostProcessor.ts: was hardcoded to .opencode/strray/features.json, now uses
  resolveConfigPath() with fallback
- agent-delegator.ts: routing-mappings candidates now includes .strray/
- inference-tuner.ts: routing-mappings candidates now includes .strray/
- validate-codex.mjs: now also checks .opencode/strray/ for codex.json
…s resolver

Every config file reference now goes through the canonical resolver which
checks STRRAY_CONFIG_DIR > .strray/ > .opencode/strray/ in priority order.

Source files (use config-paths.ts directly):
- config-loader.ts, features-config.ts, consent-manager.ts: fallback now
  uses getConfigDir() instead of hardcoded .strray/
- universal-registry-bridge.ts: cache dir uses getConfigDir() instead of
  hardcoded .opencode/strray/ relative to __dirname
- universal-librarian-consultation.ts: codex version tracking uses
  resolveConfigPath() instead of hardcoded .opencode/strray/codex.json
- autonomous-report-generator.ts, system-prompt-generator.ts,
  strray-codex-injection.ts: user-facing strings updated
- cli/index.ts: status command shows actual config dir path
- profiling-demo.ts: uses resolveProfilesDir()

Scripts (use new shared helpers):
- Added scripts/helpers/resolve-config-path.mjs and .cjs — mirrors
  src/core/config-paths.ts logic for non-TS scripts
- boot-check.mjs, pre-publish-guard.js, validate-codex.mjs,
  universal-version-manager.js, generate-autonomous-report.cjs,
  test-mcp-registration.mjs, validate-postinstall-config.mjs:
  all now use the shared resolver instead of hardcoded paths

This ensures StringRay works correctly in all three environments:
- Hermes Agent (uses STRRAY_CONFIG_DIR or .strray/)
- OpenCode (uses .opencode/strray/)
- OpenClaw (uses STRRAY_CONFIG_DIR)
The file was removed long ago but 29 scripts still referenced it:

Deleted (orphaned test scripts built entirely around OpenCode.json):
- scripts/hook-consolidation-tests.sh (193 lines)
- scripts/config-integration-tests.sh (159 lines)
- scripts/bash/validate-multi-agent-orchestration.backup.sh (195 lines)

Fixed functional references:
- model-validator.sh: CONFIG_FILE now points to opencode.json
- config-loader.sh: CONFIG_FILE now points to opencode.json
- setup.cjs: removed dead OpenCode.json fallback lookup
- framework-compliance-audit.sh: removed from audit file list
- extract-framework.sh: removed dead framework customization block (25 lines)

Cleaned up stale comments across 15+ scripts:
- Removed all "(.opencode/OpenCode.json deprecated)" parentheticals
- Replaced with simple "use opencode.json at root" where needed
Agents that had src/agents/*.ts + .opencode/agents/*.yml but were not
registered in opencode.json as subagents:

- strategist, backend-engineer, frontend-engineer
- frontend-ui-ux-engineer, database-engineer, devops-engineer
- mobile-developer, performance-engineer, content-creator
- growth-strategist, seo-consultant, tech-writer
- librarian-agents-updater, multimodal-looker

All added with mode=subagent and descriptions from their .yml definitions.
Active agent count: 11 -> 26. Disabled/legacy agents unchanged (48).
- postinstall: detect Hermes via ~/.hermes, skip all .opencode/ setup
  (.opencode dir copy, skills, plugin, opencode.json, MCP path conversion)
  Hermes reads .strray/ directly — .opencode/ was dead weight that goes stale
- bridge.mjs: state dir .opencode/state → .strray/state (active bug —
  hardcoded .opencode path meant Hermes processors never found state)
- opencode.json removed from configFiles — Hermes never reads it
@htafolla htafolla changed the title fix: stale version display in validate + missing report CLI flags fix: comprehensive cleanup — config paths, Hermes consumer, agents, CLI Mar 30, 2026
@htafolla htafolla merged commit 6ec4d8b into master Mar 30, 2026
9 of 10 checks passed
@htafolla htafolla deleted the fix/minor-issues-v1.15.27 branch March 30, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant