mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 08:23:59 +01:00
Codex, Factory, Kiro, OpenCode, Cursor and Copilot runtime roots linked bin/, lib/ and the compiled tools but not the files the generated skills read on demand: the preamble's jargon list and question registry, the AskUserQuestion split and CJK docs, the DX Hall of Fame, the test-value bar, the review checklists and specialists, design-html's vendored pretext.js, VERSION and plan-design-review/SKILL.md. The reads failed silently on every non-Claude host. _link_runtime_dists now links the shared list for every root, and _copy_runtime_skill_refs copies the host-rendered office-hours and plan-design-review SKILL.md (the #2449 pattern) into each root. The per-root review loops it replaces had drifted (Cursor shipped two of four checklists, only OpenCode had specialists). hosts/define-host.ts mirrors the list in sharedRuntimeRoot(). test/runtime-root-assets.test.ts renders every host, builds each root with setup's own functions and checks every $GSTACK_ROOT literal on disk; it fails on the previous setup for all five roots. scripts/ship-measure.ts stays deferred (it needs the eval harness). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
20 lines
970 B
TypeScript
20 lines
970 B
TypeScript
import { defineHost, preambleToolGlossary, sharedRuntimeRoot } from './define-host';
|
|
|
|
const opencode = defineHost({
|
|
name: 'opencode',
|
|
displayName: 'OpenCode',
|
|
tier: 'experimental',
|
|
capabilities: { toolExecution: true, questions: 'native', planMode: true, delegation: true, browser: true, safetyHooks: 'advisory' },
|
|
|
|
globalRoot: '.config/opencode/skills/gstack', // XDG config dir, not ~/.opencode
|
|
|
|
// #2626: the shared prose names Claude's question tool.
|
|
toolRewrites: preambleToolGlossary('**OpenCode tool names:** `AskUserQuestion` means your `question` tool; there is no `mcp__*__AskUserQuestion` variant. If a step says to call `ExitPlanMode`, tell the user the plan is ready and wait instead.'),
|
|
|
|
// OpenCode links a wider runtime asset set than the shared default
|
|
// (design binary, review specialists, qa templates/references, DX hall of fame).
|
|
runtimeRoot: sharedRuntimeRoot(['qa/templates', 'qa/references']),
|
|
});
|
|
|
|
export default opencode;
|