Files
gstack/hosts/factory.ts
T
Garry Tan 9612b1c82e refactor: gen-skill-docs.ts consumes typed host configs
Replace hardcoded EXTERNAL_HOST_CONFIG, transformFrontmatter host
branches, path/tool rewrite if-chains, and ALL_HOSTS array with
config-driven lookups from hosts/*.ts.

- Host detection uses resolveHostArg() (handles aliases like agents/droid)
- transformFrontmatter uses config's allowlist/denylist mode, extraFields,
  conditionalFields, renameFields, and descriptionLimitBehavior
- Path rewrites use config's pathRewrites array (replaceAll, order matters)
- Tool rewrites use config's toolRewrites object
- Skill skipping uses config's generation.skipSkills
- ALL_HOSTS derived from ALL_HOST_NAMES
- Token budget display regex derived from host configs

Golden-file comparison: all 3 hosts produce IDENTICAL output to baselines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:55:43 -07:00

63 lines
1.7 KiB
TypeScript

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: ['codex'], // Codex skill is a Claude wrapper around codex exec
},
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;