Files
gstack/hosts/codex.ts
T
Garry TanandClaude Fable 5 9124559810 fix(hosts): delete five dead HostConfig fields
metadataFormat (generator hardcodes openai.yaml), sidecar (behavior lives in
setup's create_agents_sidecar — knowledge preserved as a comment in codex.ts),
install.prefixable (skill_prefix is implemented entirely in bin/gstack-config),
staticFiles (docstring cited a SOUL.md that never existed anywhere), and
adapter (its only would-be consumer, openclaw-adapter.ts, was fully dead —
with a test asserting the field was undefined). Kept: learningsMode (wired
next), linkingStrategy (validation reads it), coAuthorTrailer (consumed by
resolvers/utility.ts).

Proof: JSON dump diff shows ONLY the deleted keys vanishing; zero-diff regen
across all 10 hosts; host-config + gen-skill-docs suites green. Note: this
commit also carries chunk-23 edits to the shared hosts/claude.ts +
define-host.ts + host-config.test.ts files (skipSkills collapse, stale
line-number comment drops) — pathspec commits, concurrent prep.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 21:12:22 -07:00

45 lines
1.9 KiB
TypeScript

import { defineHost, CROSS_MODEL_RESOLVERS, GBRAIN_RESOLVERS } from './define-host';
const codex = defineHost({
name: 'codex',
displayName: 'OpenAI Codex CLI',
cliAliases: ['agents'],
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, browse, review, qa,
// ETHOS.md) — that behavior lives in setup's create_agents_sidecar, not here.
generation: {
generateMetadata: true,
skipSkills: ['codex'], // Codex skill is a Claude wrapper around codex exec
},
// 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' },
],
// The cross-model resolvers all shell out to Codex — Codex can't invoke itself.
suppressedResolvers: [...CROSS_MODEL_RESOLVERS, ...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. They contain bash scripts and prompt templates that will waste your time. Ignore them completely. Do NOT modify agents/openai.yaml. Stay focused on the repository code only.',
});
export default codex;