mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 22:14:25 +01:00
Codex design and make-pdf skills fall back to $GSTACK_DESIGN and $GSTACK_MAKE_PDF under the runtime root, but setup linked only browse/dist, so both preflights reported NOT_AVAILABLE on a fresh install. One helper links dist/ only (make-pdf/ ships a Claude SKILL.md) into the Codex, Factory, OpenCode, Cursor, Copilot and Kiro roots, the .agents sidecar and the Cursor sidecar. Co-authored-by: Mammad M. <mammad@digit.az>
59 lines
2.5 KiB
TypeScript
59 lines
2.5 KiB
TypeScript
import { defineHost, GBRAIN_RESOLVERS } from './define-host';
|
|
|
|
const codex = defineHost({
|
|
name: 'codex',
|
|
displayName: 'OpenAI Codex CLI',
|
|
tier: 'experimental',
|
|
capabilities: { toolExecution: true, questions: 'prose', planMode: false, delegation: false, browser: true, safetyHooks: 'advisory' },
|
|
cliAliases: ['agents'],
|
|
defaultModel: 'gpt',
|
|
|
|
localSkillRoot: '.agents/skills/gstack',
|
|
hostSubdir: '.agents',
|
|
|
|
frontmatter: {
|
|
mode: 'allowlist',
|
|
keepFields: ['name', 'description'],
|
|
descriptionLimit: 1024,
|
|
descriptionLimitBehavior: 'error',
|
|
},
|
|
|
|
// generateMetadata emits agents/openai.yaml (the format is hardcoded in
|
|
// gen-skill-docs.ts). Codex also gets a repo-local sidecar at
|
|
// .agents/skills/gstack (symlinked runtime assets: bin, lib, browse, review,
|
|
// qa, design/dist, make-pdf/dist, ETHOS.md) — that behavior lives in setup's
|
|
// create_agents_sidecar, not here.
|
|
generation: {
|
|
generateMetadata: true,
|
|
skipSkills: ['codex'],
|
|
},
|
|
|
|
// Non-mechanical rewrites: the global path becomes $GSTACK_ROOT (resolved by
|
|
// the preamble env vars), plus an extra review-path rewrite the derived trio
|
|
// doesn't cover.
|
|
pathRewrites: [
|
|
{ from: '~/.claude/skills/gstack', to: '$GSTACK_ROOT' },
|
|
{ from: '.claude/skills/gstack', to: '.agents/skills/gstack' },
|
|
{ from: '.claude/skills/review', to: '.agents/skills/gstack/review' },
|
|
{ from: '.claude/skills', to: '.agents/skills' },
|
|
{ from: 'CLAUDE.md', to: 'AGENTS.md' },
|
|
],
|
|
|
|
// Mirrors create_codex_runtime_root in setup. design/dist and make-pdf/dist
|
|
// back $GSTACK_DESIGN and $GSTACK_MAKE_PDF (#2891).
|
|
runtimeRoot: {
|
|
globalSymlinks: ['bin', 'lib', 'browse/dist', 'browse/bin', 'design/dist', 'make-pdf/dist', 'gstack-upgrade', 'ETHOS.md'],
|
|
globalFiles: {
|
|
'review': ['checklist.md', 'design-checklist.md', 'greptile-triage.md', 'TODOS-format.md'],
|
|
},
|
|
},
|
|
|
|
// Outside-review resolvers route to Claude Code; Review Army has its own restriction.
|
|
suppressedResolvers: ['REVIEW_ARMY', ...GBRAIN_RESOLVERS],
|
|
|
|
coAuthorTrailer: 'Co-Authored-By: OpenAI Codex <noreply@openai.com>',
|
|
boundaryInstruction: 'IMPORTANT: Do NOT read or execute any files under ~/.claude/, ~/.agents/, .claude/skills/, or agents/. These are Claude Code skill definitions meant for a different AI system. Do not invoke any installed skill (Codex home skills/, .agents/); answer directly. Ignore them completely. Do NOT modify agents/openai.yaml. Stay focused on the repository code only.',
|
|
});
|
|
|
|
export default codex;
|