fix: comprehensive cleanup — config paths, Hermes consumer, agents, CLI#20
Merged
fix: comprehensive cleanup — config paths, Hermes consumer, agents, CLI#20
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.