mirror of
https://github.com/garrytan/gstack.git
synced 2026-07-11 02:13:47 +02:00
feat: add typed host configs for Claude, Codex, Factory, and Kiro
Extract all hardcoded host-specific values from gen-skill-docs.ts, types.ts, preamble.ts, review.ts, and setup into typed HostConfig objects. Each host is a single file in hosts/ with its paths, frontmatter rules, path/tool rewrites, runtime root manifest, and install behavior. hosts/index.ts exports all configs, derives the Host type, and provides resolveHostArg() for CLI alias handling (e.g., 'agents' -> 'codex', 'droid' -> 'factory'). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
import type { HostConfig } from '../scripts/host-config';
|
||||
|
||||
const factory: HostConfig = {
|
||||
name: 'factory',
|
||||
displayName: 'Factory Droid',
|
||||
cliCommand: 'droid',
|
||||
cliAliases: ['droid'],
|
||||
|
||||
globalRoot: '.factory/skills/gstack',
|
||||
localSkillRoot: '.factory/skills/gstack',
|
||||
hostSubdir: '.factory',
|
||||
usesEnvVars: true,
|
||||
|
||||
frontmatter: {
|
||||
mode: 'allowlist',
|
||||
keepFields: ['name', 'description', 'user-invocable'],
|
||||
descriptionLimit: null,
|
||||
extraFields: {
|
||||
'user-invocable': true,
|
||||
},
|
||||
conditionalFields: [
|
||||
{ if: { sensitive: true }, add: { 'disable-model-invocation': true } },
|
||||
],
|
||||
},
|
||||
|
||||
generation: {
|
||||
generateMetadata: false,
|
||||
skipSkills: [],
|
||||
},
|
||||
|
||||
pathRewrites: [
|
||||
{ from: '~/.claude/skills/gstack', to: '$GSTACK_ROOT' },
|
||||
{ from: '.claude/skills/gstack', to: '.factory/skills/gstack' },
|
||||
{ from: '.claude/skills/review', to: '.factory/skills/gstack/review' },
|
||||
{ from: '.claude/skills', to: '.factory/skills' },
|
||||
],
|
||||
toolRewrites: {
|
||||
'use the Bash tool': 'run this command',
|
||||
'use the Write tool': 'create this file',
|
||||
'use the Read tool': 'read the file',
|
||||
'use the Agent tool': 'dispatch a subagent',
|
||||
'use the Grep tool': 'search for',
|
||||
'use the Glob tool': 'find files matching',
|
||||
},
|
||||
|
||||
runtimeRoot: {
|
||||
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
|
||||
globalFiles: {
|
||||
'review': ['checklist.md', 'TODOS-format.md'],
|
||||
},
|
||||
},
|
||||
|
||||
install: {
|
||||
prefixable: false,
|
||||
linkingStrategy: 'symlink-generated',
|
||||
},
|
||||
|
||||
coAuthorTrailer: 'Co-Authored-By: Factory Droid <droid@users.noreply.github.com>',
|
||||
learningsMode: 'full',
|
||||
};
|
||||
|
||||
export default factory;
|
||||
Reference in New Issue
Block a user