Skip to content

feat: decouple framework from OpenCode — fully headless mode#16

Merged
htafolla merged 2 commits intomasterfrom
fix/opencode-decouple-headless
Mar 30, 2026
Merged

feat: decouple framework from OpenCode — fully headless mode#16
htafolla merged 2 commits intomasterfrom
fix/opencode-decouple-headless

Conversation

@htafolla
Copy link
Copy Markdown
Owner

Summary

Complete resolution ensuring OpenCode, Hermes, and OpenClaw work in fully decoupled environments. The framework now resolves all config, state, and data paths via config-paths.ts with the priority chain:

STRRAY_CONFIG_DIR > .strray/ > .opencode/strray/ > built-in defaults

What changed

35 files changed, 1475 insertions, 92 deletions

Source fixes (15 files)

  • CRITICAL: agent-config-validator.ts readdir guard, integration.ts opencode spawn try/catch
  • Replaced hardcoded .opencode/ defaults in: config-loader, features-config, token-manager, consent-manager, context-loader, state-manager, advanced-profiler
  • CLI commands: validate, status, analytics-status, antigravity-status, skill-install now use getConfigDir()
  • MCP boot-orchestrator uses resolveLogDir/resolveStateDir
  • Server refactoring log path via resolveConfigPath
  • Inference improvement processor dirs via getConfigDir

Package changes

  • .strray/ seed directory with framework defaults (codex, config, features, routing-mappings, agents template, integrations, workflow)
  • package.json: added .strray/ to files, removed .opencode/state/, .opencode/init.sh, .opencode/package.json
  • Removed strray-ai self-dependency (circular dep bug)
  • prepare-consumer.cjs: syncs .strray/ from .opencode/strray/ on publish

Test fixes (6 files)

  • Updated path assertions for config-paths resolver output
  • All 2399 tests passing

Environments supported

Environment Config root How
OpenCode .opencode/strray/ Auto-detected by postinstall
Hermes Agent .strray/ Shipped in npm package
OpenClaw .strray/ Shipped in npm package
Custom STRRAY_CONFIG_DIR Env var override

Complete resolution to ensure OpenCode, Hermes, and OpenClaw work in
fully decoupled environments. The framework now resolves all config,
state, and data paths via config-paths.ts with priority chain:
  STRRAY_CONFIG_DIR > .strray/ > .opencode/strray/ > built-in defaults

Source file fixes (15 files):
- CRITICAL: agent-config-validator.ts readdir guard, integration.ts
  opencode spawn try/catch
- config-loader, features-config, token-manager, consent-manager,
  context-loader, state-manager, advanced-profiler: replaced hardcoded
  .opencode/ defaults with config-paths.ts resolvers
- CLI: validate, status, analytics-status, antigravity-status,
  skill-install: use getConfigDir() instead of hardcoded .opencode/
- MCP: boot-orchestrator uses resolveLogDir/resolveStateDir
- server.ts: refactoring log path via resolveConfigPath
- inference-improvement-processor: reports/inference dirs via getConfigDir

Package changes:
- .strray/ seed directory with framework defaults (codex, config,
  features, routing-mappings, agents template, integrations, workflow)
- package.json: added .strray/ to files, removed .opencode/state/,
  .opencode/init.sh, .opencode/package.json (consumer clutter)
- Removed strray-ai self-dependency (circular dep bug)
- prepare-consumer.cjs: syncs .strray/ from .opencode/strray/ on publish

Test fixes (6 files):
- Updated path assertions for config-paths resolver output
- Mocked config-paths module where needed
- All 2399 tests passing
@htafolla htafolla merged commit f7ba93b into master Mar 30, 2026
@htafolla htafolla deleted the fix/opencode-decouple-headless branch March 30, 2026 00:45
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