mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
refactor(codex): drop the .codex/agents sidecar; rely on nested skill agents (#173)
Codex auto-discovers subagents bundled inside an installed skill's own agents/ folder, so the separate .codex/agents/*.toml sidecar was redundant. - cli: remove installCodexAgents/isCodexLikely and their install/update calls - context.mjs: remove the CODEX_AGENT_MISSING self-heal directive - build: drop codex agentFormat so no top-level .codex/agents is emitted; the nested in-skill .toml bundling is the whole delivery - remove the tracked .codex/agents/*.toml and the gitignore exception - docs + build.test.js updated for the nested layout - CLI patch version bump; skill version unchanged Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
d6e392311c
commit
83dd99bf9f
@@ -50,9 +50,9 @@ const FIELD_SPECS = {
|
||||
};
|
||||
|
||||
// Provider builds that Codex loads as a skill (it reads skills from .agents/skills,
|
||||
// and the .codex build mirrors it). For these, the Codex subagent .toml also travels
|
||||
// INSIDE the skill dir so context.mjs can point a running Codex agent at a local copy
|
||||
// when the sibling .codex/agents/ definition is missing (see skill/scripts/context.mjs).
|
||||
// and the .codex build mirrors it). For these, the Codex subagent .toml travels
|
||||
// INSIDE the skill's agents/ folder, which Codex auto-discovers once the skill is
|
||||
// installed -- so no separate .codex/agents/ sidecar copy is needed.
|
||||
const CODEX_SKILL_PROVIDERS = new Set(['agents', 'codex']);
|
||||
|
||||
function humanizeSkillName(name) {
|
||||
@@ -266,10 +266,10 @@ export function createTransformer(config) {
|
||||
}
|
||||
}
|
||||
|
||||
// Bundle the Codex subagent .toml inside the skill dir for the variants
|
||||
// Codex actually loads. The sibling .codex/agents/ definition is what Codex
|
||||
// reads at runtime, but installers (notably `npx skills add`) only carry the
|
||||
// skills/ subtree -- so context.mjs uses this in-skill copy to self-heal.
|
||||
// Bundle the Codex subagent .toml inside the skill's agents/ folder for the
|
||||
// variants Codex loads as a skill. Codex auto-discovers agents nested in an
|
||||
// installed skill, so this in-skill copy is the whole delivery -- the
|
||||
// skills/ install carries it and no .codex/agents/ sidecar copy is required.
|
||||
if (CODEX_SKILL_PROVIDERS.has(provider)) {
|
||||
for (const agent of skill.agents || []) {
|
||||
if (agent.providers && !agent.providers.includes('codex')) continue;
|
||||
|
||||
@@ -40,7 +40,9 @@ export const PROVIDERS = {
|
||||
frontmatterFields: [],
|
||||
includeVersion: false,
|
||||
writeOpenAIMetadata: true,
|
||||
agentFormat: 'codex-toml',
|
||||
// No agentFormat: the Codex subagent ships nested inside the skill's own
|
||||
// agents/ folder (see CODEX_SKILL_PROVIDERS in factory.js), which Codex
|
||||
// auto-discovers on install. No top-level .codex/agents/ sidecar is emitted.
|
||||
},
|
||||
agents: {
|
||||
provider: 'agents',
|
||||
|
||||
Reference in New Issue
Block a user