mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-13 00:19:03 +02:00
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>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2b27d89ae3
commit
9124559810
+1
-2
@@ -14,14 +14,13 @@ const claude = defineHost({
|
||||
|
||||
generation: {
|
||||
generateMetadata: false,
|
||||
skipSkills: ['claude'], // Claude outside-voice skill is for non-Claude hosts
|
||||
skipSkills: [], // overrides the default ['codex'] — the /codex skill IS a Claude skill (wrapper around codex exec)
|
||||
},
|
||||
|
||||
pathRewrites: [], // Claude is the primary host — no rewrites needed
|
||||
toolRewrites: {},
|
||||
|
||||
install: {
|
||||
prefixable: true,
|
||||
linkingStrategy: 'real-dir-symlink',
|
||||
},
|
||||
|
||||
|
||||
+4
-6
@@ -15,9 +15,12 @@ const codex = defineHost({
|
||||
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,
|
||||
metadataFormat: 'openai.yaml',
|
||||
skipSkills: ['codex'], // Codex skill is a Claude wrapper around codex exec
|
||||
},
|
||||
|
||||
@@ -34,11 +37,6 @@ const codex = defineHost({
|
||||
// The cross-model resolvers all shell out to Codex — Codex can't invoke itself.
|
||||
suppressedResolvers: [...CROSS_MODEL_RESOLVERS, ...GBRAIN_RESOLVERS],
|
||||
|
||||
sidecar: {
|
||||
path: '.agents/skills/gstack',
|
||||
symlinks: ['bin', 'browse', 'review', 'qa', 'ETHOS.md'],
|
||||
},
|
||||
|
||||
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.',
|
||||
});
|
||||
|
||||
+8
-17
@@ -9,11 +9,9 @@
|
||||
* paths, the shared runtimeRoot asset list, and symlink-generated install.
|
||||
*
|
||||
* Defaults are constructed fresh per call, so no two host configs ever share
|
||||
* a mutable array/object. Fields that are absent today (staticFiles, adapter,
|
||||
* sidecar, toolRewrites, coAuthorTrailer, boundaryInstruction) stay absent
|
||||
* unless a host explicitly sets them — the factory never default-populates
|
||||
* optional fields (test/host-config.test.ts pins e.g. openclaw.adapter as
|
||||
* undefined).
|
||||
* a mutable array/object. Optional fields that are absent today (toolRewrites,
|
||||
* coAuthorTrailer, boundaryInstruction) stay absent unless a host explicitly
|
||||
* sets them — the factory never default-populates optional fields.
|
||||
*/
|
||||
|
||||
import type { HostConfig } from '../scripts/host-config';
|
||||
@@ -27,11 +25,11 @@ type PathRewrite = { from: string; to: string };
|
||||
* non-Claude agent runtimes (OpenClaw, Hermes, GBrain).
|
||||
*/
|
||||
export const CROSS_MODEL_RESOLVERS: string[] = [
|
||||
'DESIGN_OUTSIDE_VOICES', // design.ts:485 — invokes Codex for outside voices
|
||||
'ADVERSARIAL_STEP', // review.ts:408 — invokes Codex adversarially
|
||||
'CODEX_SECOND_OPINION', // review.ts:257 — invokes Codex
|
||||
'CODEX_PLAN_REVIEW', // review.ts:541 — invokes Codex
|
||||
'REVIEW_ARMY', // review-army.ts:180 — multi-model orchestration
|
||||
'DESIGN_OUTSIDE_VOICES', // design.ts — invokes Codex for outside voices
|
||||
'ADVERSARIAL_STEP', // review.ts — invokes Codex adversarially
|
||||
'CODEX_SECOND_OPINION', // review.ts — invokes Codex
|
||||
'CODEX_PLAN_REVIEW', // review.ts — invokes Codex
|
||||
'REVIEW_ARMY', // review-army.ts — multi-model orchestration
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -111,16 +109,12 @@ export function defineHost<const N extends string>(overrides: HostOverrides<N>):
|
||||
'review': ['checklist.md', 'TODOS-format.md'],
|
||||
},
|
||||
},
|
||||
sidecar,
|
||||
install = {
|
||||
prefixable: false,
|
||||
linkingStrategy: 'symlink-generated',
|
||||
},
|
||||
coAuthorTrailer,
|
||||
learningsMode = 'basic',
|
||||
boundaryInstruction,
|
||||
staticFiles,
|
||||
adapter,
|
||||
} = overrides;
|
||||
|
||||
if (pathRewrites && extraPathRewrites) {
|
||||
@@ -156,12 +150,9 @@ export function defineHost<const N extends string>(overrides: HostOverrides<N>):
|
||||
...(toolRewrites !== undefined ? { toolRewrites } : {}),
|
||||
suppressedResolvers,
|
||||
runtimeRoot,
|
||||
...(sidecar !== undefined ? { sidecar } : {}),
|
||||
install,
|
||||
...(coAuthorTrailer !== undefined ? { coAuthorTrailer } : {}),
|
||||
learningsMode,
|
||||
...(boundaryInstruction !== undefined ? { boundaryInstruction } : {}),
|
||||
...(staticFiles !== undefined ? { staticFiles } : {}),
|
||||
...(adapter !== undefined ? { adapter } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user