@blxzer/cursor-trellis 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -5
- package/README.zh-CN.md +170 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -33
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +0 -13
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -14
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +3 -32
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +7 -84
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/index.d.ts +7 -8
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +11 -236
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +5 -1
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.1.1.json +9 -0
- package/dist/migrations/manifests/0.1.2.json +9 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +3 -3
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +4 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +8 -15
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +7 -7
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +18 -21
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +2 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +10 -7
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +4 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +20 -31
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +20 -31
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +24 -40
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +28 -59
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +12 -28
- package/dist/templates/common/bundled-skills/trellis-skill-creator/references/trellis-skill-locations.md +2 -2
- package/dist/templates/cursor/hooks.json +6 -0
- package/dist/templates/cursor/rules/retrieval-routing.mdc +57 -0
- package/dist/templates/extract.d.ts +0 -14
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +0 -34
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/agents.md +2 -6
- package/dist/templates/markdown/index.d.ts +1 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +1 -0
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +41 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +14 -14
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +8 -20
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +15 -14
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +4 -2
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +49 -0
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +18 -5
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +68 -20
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +1 -0
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +163 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +31 -567
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +2 -11
- package/dist/templates/trellis/index.d.ts +12 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +24 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/aggregate_retrieval_telemetry.py +342 -0
- package/dist/templates/trellis/scripts/batch_plan_envelope.py +105 -0
- package/dist/templates/trellis/scripts/codegraph_session_smoke.py +76 -0
- package/dist/templates/trellis/scripts/common/active_task.py +116 -147
- package/dist/templates/trellis/scripts/common/cli_adapter.py +34 -710
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +49 -106
- package/dist/templates/trellis/scripts/common/git_context.py +17 -2
- package/dist/templates/trellis/scripts/common/project_file_stats.py +91 -0
- package/dist/templates/trellis/scripts/common/retrieval_adapter_metadata.py +9 -11
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +313 -0
- package/dist/templates/trellis/scripts/common/retrieval_pack.py +0 -6
- package/dist/templates/trellis/scripts/common/retrieval_pack_context.py +0 -4
- package/dist/templates/trellis/scripts/common/retrieval_plan_gate.py +76 -0
- package/dist/templates/trellis/scripts/common/retrieval_result_ranking.py +253 -0
- package/dist/templates/trellis/scripts/common/retrieval_tool_classification.py +157 -0
- package/dist/templates/trellis/scripts/common/semantic_plan_gate.py +52 -0
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +527 -0
- package/dist/templates/trellis/scripts/common/task_store.py +32 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -24
- package/dist/templates/trellis/scripts/rank_retrieval_candidates.py +80 -0
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +38 -11
- package/dist/templates/trellis/scripts/score_evidence.py +112 -0
- package/dist/templates/trellis/scripts/task.py +26 -0
- package/dist/templates/trellis/workflow.md +844 -960
- package/dist/types/ai-tools.d.ts +13 -16
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +5 -238
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/codebase-retrieval-router.d.ts +1 -8
- package/dist/utils/codebase-retrieval-router.d.ts.map +1 -1
- package/dist/utils/codebase-retrieval-router.js +39 -180
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +10 -24
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/retrieval-agent-instructions.d.ts +14 -0
- package/dist/utils/retrieval-agent-instructions.d.ts.map +1 -0
- package/dist/utils/retrieval-agent-instructions.js +221 -0
- package/dist/utils/retrieval-agent-instructions.js.map +1 -0
- package/dist/utils/retrieval-execution-telemetry.d.ts +43 -85
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +289 -22
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/retrieval-result-ranking.js +1 -1
- package/dist/utils/retrieval-result-ranking.js.map +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts +32 -0
- package/dist/utils/retrieval-tool-classification.d.ts.map +1 -0
- package/dist/utils/retrieval-tool-classification.js +113 -0
- package/dist/utils/retrieval-tool-classification.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts +0 -36
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +0 -184
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +4 -2
- package/dist/commands/mem.d.ts +0 -30
- package/dist/commands/mem.d.ts.map +0 -1
- package/dist/commands/mem.js +0 -424
- package/dist/commands/mem.js.map +0 -1
- package/dist/configurators/antigravity.d.ts +0 -7
- package/dist/configurators/antigravity.d.ts.map +0 -1
- package/dist/configurators/antigravity.js +0 -19
- package/dist/configurators/antigravity.js.map +0 -1
- package/dist/configurators/claude.d.ts +0 -9
- package/dist/configurators/claude.d.ts.map +0 -1
- package/dist/configurators/claude.js +0 -72
- package/dist/configurators/claude.js.map +0 -1
- package/dist/configurators/codebuddy.d.ts +0 -10
- package/dist/configurators/codebuddy.d.ts.map +0 -1
- package/dist/configurators/codebuddy.js +0 -30
- package/dist/configurators/codebuddy.js.map +0 -1
- package/dist/configurators/codex.d.ts +0 -8
- package/dist/configurators/codex.d.ts.map +0 -1
- package/dist/configurators/codex.js +0 -87
- package/dist/configurators/codex.js.map +0 -1
- package/dist/configurators/copilot.d.ts +0 -10
- package/dist/configurators/copilot.d.ts.map +0 -1
- package/dist/configurators/copilot.js +0 -51
- package/dist/configurators/copilot.js.map +0 -1
- package/dist/configurators/droid.d.ts +0 -10
- package/dist/configurators/droid.d.ts.map +0 -1
- package/dist/configurators/droid.js +0 -30
- package/dist/configurators/droid.js.map +0 -1
- package/dist/configurators/gemini.d.ts +0 -16
- package/dist/configurators/gemini.d.ts.map +0 -1
- package/dist/configurators/gemini.js +0 -38
- package/dist/configurators/gemini.js.map +0 -1
- package/dist/configurators/kilo.d.ts +0 -7
- package/dist/configurators/kilo.d.ts.map +0 -1
- package/dist/configurators/kilo.js +0 -19
- package/dist/configurators/kilo.js.map +0 -1
- package/dist/configurators/kiro.d.ts +0 -8
- package/dist/configurators/kiro.d.ts.map +0 -1
- package/dist/configurators/kiro.js +0 -24
- package/dist/configurators/kiro.js.map +0 -1
- package/dist/configurators/opencode.d.ts +0 -14
- package/dist/configurators/opencode.d.ts.map +0 -1
- package/dist/configurators/opencode.js +0 -96
- package/dist/configurators/opencode.js.map +0 -1
- package/dist/configurators/pi.d.ts +0 -3
- package/dist/configurators/pi.d.ts.map +0 -1
- package/dist/configurators/pi.js +0 -45
- package/dist/configurators/pi.js.map +0 -1
- package/dist/configurators/qoder.d.ts +0 -11
- package/dist/configurators/qoder.d.ts.map +0 -1
- package/dist/configurators/qoder.js +0 -31
- package/dist/configurators/qoder.js.map +0 -1
- package/dist/configurators/windsurf.d.ts +0 -7
- package/dist/configurators/windsurf.d.ts.map +0 -1
- package/dist/configurators/windsurf.js +0 -19
- package/dist/configurators/windsurf.js.map +0 -1
- package/dist/templates/claude/agents/trellis-check.md +0 -124
- package/dist/templates/claude/agents/trellis-implement.md +0 -110
- package/dist/templates/claude/agents/trellis-research.md +0 -137
- package/dist/templates/claude/index.d.ts +0 -22
- package/dist/templates/claude/index.d.ts.map +0 -1
- package/dist/templates/claude/index.js +0 -46
- package/dist/templates/claude/index.js.map +0 -1
- package/dist/templates/claude/settings.json +0 -84
- package/dist/templates/codebuddy/agents/trellis-check.md +0 -115
- package/dist/templates/codebuddy/agents/trellis-implement.md +0 -110
- package/dist/templates/codebuddy/agents/trellis-research.md +0 -137
- package/dist/templates/codebuddy/index.d.ts +0 -15
- package/dist/templates/codebuddy/index.d.ts.map +0 -1
- package/dist/templates/codebuddy/index.js +0 -15
- package/dist/templates/codebuddy/index.js.map +0 -1
- package/dist/templates/codebuddy/settings.json +0 -70
- package/dist/templates/codex/agents/trellis-check.toml +0 -67
- package/dist/templates/codex/agents/trellis-implement.toml +0 -40
- package/dist/templates/codex/agents/trellis-research.toml +0 -73
- package/dist/templates/codex/config.toml +0 -28
- package/dist/templates/codex/hooks/session-start.py +0 -575
- package/dist/templates/codex/hooks.json +0 -15
- package/dist/templates/codex/index.d.ts +0 -39
- package/dist/templates/codex/index.d.ts.map +0 -1
- package/dist/templates/codex/index.js +0 -85
- package/dist/templates/codex/index.js.map +0 -1
- package/dist/templates/codex/skills/before-dev/SKILL.md +0 -40
- package/dist/templates/codex/skills/brainstorm/SKILL.md +0 -112
- package/dist/templates/codex/skills/break-loop/SKILL.md +0 -130
- package/dist/templates/codex/skills/check/SKILL.md +0 -98
- package/dist/templates/codex/skills/check-cross-layer/SKILL.md +0 -158
- package/dist/templates/codex/skills/create-command/SKILL.md +0 -101
- package/dist/templates/codex/skills/finish-work/SKILL.md +0 -90
- package/dist/templates/codex/skills/improve-ut/SKILL.md +0 -69
- package/dist/templates/codex/skills/integrate-skill/SKILL.md +0 -221
- package/dist/templates/codex/skills/onboard/SKILL.md +0 -363
- package/dist/templates/codex/skills/record-session/SKILL.md +0 -67
- package/dist/templates/codex/skills/start/SKILL.md +0 -66
- package/dist/templates/codex/skills/update-spec/SKILL.md +0 -335
- package/dist/templates/copilot/hooks/session-start.py +0 -557
- package/dist/templates/copilot/hooks.json +0 -19
- package/dist/templates/copilot/index.d.ts +0 -23
- package/dist/templates/copilot/index.d.ts.map +0 -1
- package/dist/templates/copilot/index.js +0 -54
- package/dist/templates/copilot/index.js.map +0 -1
- package/dist/templates/copilot/prompts/before-dev.prompt.md +0 -39
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +0 -111
- package/dist/templates/copilot/prompts/break-loop.prompt.md +0 -129
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +0 -157
- package/dist/templates/copilot/prompts/check.prompt.md +0 -97
- package/dist/templates/copilot/prompts/create-command.prompt.md +0 -116
- package/dist/templates/copilot/prompts/finish-work.prompt.md +0 -99
- package/dist/templates/copilot/prompts/integrate-skill.prompt.md +0 -223
- package/dist/templates/copilot/prompts/onboard.prompt.md +0 -362
- package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
- package/dist/templates/copilot/prompts/record-session.prompt.md +0 -66
- package/dist/templates/copilot/prompts/start.prompt.md +0 -63
- package/dist/templates/copilot/prompts/update-spec.prompt.md +0 -358
- package/dist/templates/droid/droids/trellis-check.md +0 -107
- package/dist/templates/droid/droids/trellis-implement.md +0 -102
- package/dist/templates/droid/droids/trellis-research.md +0 -137
- package/dist/templates/droid/index.d.ts +0 -15
- package/dist/templates/droid/index.d.ts.map +0 -1
- package/dist/templates/droid/index.js +0 -15
- package/dist/templates/droid/index.js.map +0 -1
- package/dist/templates/droid/settings.json +0 -70
- package/dist/templates/gemini/agents/trellis-check.md +0 -107
- package/dist/templates/gemini/agents/trellis-implement.md +0 -102
- package/dist/templates/gemini/agents/trellis-research.md +0 -136
- package/dist/templates/gemini/index.d.ts +0 -13
- package/dist/templates/gemini/index.d.ts.map +0 -1
- package/dist/templates/gemini/index.js +0 -13
- package/dist/templates/gemini/index.js.map +0 -1
- package/dist/templates/gemini/settings.json +0 -28
- package/dist/templates/kiro/agents/trellis-check.json +0 -26
- package/dist/templates/kiro/agents/trellis-implement.json +0 -26
- package/dist/templates/kiro/agents/trellis-research.json +0 -30
- package/dist/templates/kiro/index.d.ts +0 -18
- package/dist/templates/kiro/index.d.ts.map +0 -1
- package/dist/templates/kiro/index.js +0 -18
- package/dist/templates/kiro/index.js.map +0 -1
- package/dist/templates/opencode/agents/trellis-check.md +0 -122
- package/dist/templates/opencode/agents/trellis-implement.md +0 -118
- package/dist/templates/opencode/agents/trellis-research.md +0 -145
- package/dist/templates/opencode/lib/session-utils.js +0 -667
- package/dist/templates/opencode/lib/trellis-context.js +0 -336
- package/dist/templates/opencode/package.json +0 -5
- package/dist/templates/opencode/plugins/inject-subagent-context.js +0 -495
- package/dist/templates/opencode/plugins/inject-workflow-state.js +0 -159
- package/dist/templates/opencode/plugins/session-start.js +0 -101
- package/dist/templates/pi/agents/trellis-check.md +0 -37
- package/dist/templates/pi/agents/trellis-implement.md +0 -42
- package/dist/templates/pi/agents/trellis-research.md +0 -25
- package/dist/templates/pi/extensions/trellis/index.ts.txt +0 -1600
- package/dist/templates/pi/index.d.ts +0 -5
- package/dist/templates/pi/index.d.ts.map +0 -1
- package/dist/templates/pi/index.js +0 -12
- package/dist/templates/pi/index.js.map +0 -1
- package/dist/templates/pi/settings.json +0 -12
- package/dist/templates/qoder/agents/trellis-check.md +0 -108
- package/dist/templates/qoder/agents/trellis-implement.md +0 -103
- package/dist/templates/qoder/agents/trellis-research.md +0 -137
- package/dist/templates/qoder/index.d.ts +0 -15
- package/dist/templates/qoder/index.d.ts.map +0 -1
- package/dist/templates/qoder/index.js +0 -15
- package/dist/templates/qoder/index.js.map +0 -1
- package/dist/templates/qoder/settings.json +0 -47
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { getAllAgents, getAllCodexSkills, getAllHooks, getConfigTemplate, getHooksConfig, } from "../templates/codex/index.js";
|
|
4
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
5
|
-
import { resolvePlaceholders, resolveAllAsSkillsNeutral, resolveBundledSkills, resolveCodexTrellisStartSkill, applyPullBasedPreludeToml, writeSkills, writeSharedHooks, replacePythonCommandLiterals, } from "./shared.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configure Codex by writing:
|
|
8
|
-
* - .agents/skills/ — shared skills from common source
|
|
9
|
-
* - .codex/skills/ — Codex-specific skills (platform-specific templates)
|
|
10
|
-
* - .codex/agents/, hooks/, hooks.json, config.toml — platform-specific
|
|
11
|
-
*/
|
|
12
|
-
export async function configureCodex(cwd) {
|
|
13
|
-
// Shared skills from common source → .agents/skills/
|
|
14
|
-
// Uses the neutral placeholder resolver so the 5 shared workflow skills
|
|
15
|
-
// (brainstorm, before-dev, check, break-loop, update-spec) render to the
|
|
16
|
-
// same bytes regardless of which platform writes them — required because
|
|
17
|
-
// Gemini CLI 0.40+ also targets `.agents/skills/` (last-writer-wins is
|
|
18
|
-
// safe when both writers produce identical output).
|
|
19
|
-
const sharedSkillsRoot = path.join(cwd, ".agents", "skills");
|
|
20
|
-
await writeSkills(sharedSkillsRoot, resolveAllAsSkillsNeutral(AI_TOOLS.codex.templateContext), resolveBundledSkills(AI_TOOLS.codex.templateContext));
|
|
21
|
-
// Additionally write `trellis-start` to .agents/skills/ — Codex-specific.
|
|
22
|
-
// The SessionStart hook was removed in 0.5.5 (de-recursion); inject-workflow-state.py
|
|
23
|
-
// injects a `<trellis-bootstrap>` block on no_task turns instructing the AI to
|
|
24
|
-
// invoke `$trellis-start` to load workflow context. Without this skill, that
|
|
25
|
-
// invocation has nothing to resolve. Other agent-capable platforms keep their
|
|
26
|
-
// working SessionStart hooks and don't need this.
|
|
27
|
-
// Must stay in sync with `collectPlatformTemplates.codex.collectTemplates`
|
|
28
|
-
// (configurators/index.ts) — both share `resolveCodexTrellisStartSkill`.
|
|
29
|
-
const trellisStart = resolveCodexTrellisStartSkill(AI_TOOLS.codex.templateContext);
|
|
30
|
-
if (trellisStart) {
|
|
31
|
-
const trellisStartDir = path.join(sharedSkillsRoot, trellisStart.name);
|
|
32
|
-
ensureDir(trellisStartDir);
|
|
33
|
-
await writeFile(path.join(trellisStartDir, "SKILL.md"), trellisStart.content);
|
|
34
|
-
}
|
|
35
|
-
const codexRoot = path.join(cwd, ".codex");
|
|
36
|
-
// Codex-specific skills (platform-specific) → .codex/skills/
|
|
37
|
-
const codexSkillsRoot = path.join(codexRoot, "skills");
|
|
38
|
-
ensureDir(codexSkillsRoot);
|
|
39
|
-
for (const skill of getAllCodexSkills()) {
|
|
40
|
-
const skillDir = path.join(codexSkillsRoot, skill.name);
|
|
41
|
-
ensureDir(skillDir);
|
|
42
|
-
await writeFile(path.join(skillDir, "SKILL.md"), replacePythonCommandLiterals(skill.content));
|
|
43
|
-
}
|
|
44
|
-
// Custom agents → .codex/agents/
|
|
45
|
-
const codexAgentsRoot = path.join(codexRoot, "agents");
|
|
46
|
-
ensureDir(codexAgentsRoot);
|
|
47
|
-
// Codex is a class-2 (pull-based) platform: PreToolUse only fires for Bash
|
|
48
|
-
// and CollabAgentSpawn hook is not implemented (#15486). Sub-agents must
|
|
49
|
-
// load Trellis context themselves via the prelude injected here.
|
|
50
|
-
for (const agent of applyPullBasedPreludeToml(getAllAgents())) {
|
|
51
|
-
await writeFile(path.join(codexAgentsRoot, `${agent.name}.toml`), replacePythonCommandLiterals(agent.content));
|
|
52
|
-
}
|
|
53
|
-
// Hooks → .codex/hooks/
|
|
54
|
-
const hooksDir = path.join(codexRoot, "hooks");
|
|
55
|
-
ensureDir(hooksDir);
|
|
56
|
-
// Codex-specific hook files. hooks.json currently registers only
|
|
57
|
-
// UserPromptSubmit; session-start.py is retained as a compact compatibility
|
|
58
|
-
// template and regression surface.
|
|
59
|
-
for (const hook of getAllHooks()) {
|
|
60
|
-
await writeFile(path.join(hooksDir, hook.name), replacePythonCommandLiterals(hook.content));
|
|
61
|
-
}
|
|
62
|
-
// Shared hooks (inject-workflow-state.py only). Sub-agent context is
|
|
63
|
-
// pull-based (class-2).
|
|
64
|
-
await writeSharedHooks(hooksDir, "codex");
|
|
65
|
-
// Hooks config → .codex/hooks.json
|
|
66
|
-
await writeFile(path.join(codexRoot, "hooks.json"), resolvePlaceholders(getHooksConfig()));
|
|
67
|
-
// NOTE: Codex hooks require `features.hooks = true` in the user's
|
|
68
|
-
// ~/.codex/config.toml (Codex 0.129+). The legacy `features.codex_hooks = true`
|
|
69
|
-
// still works on 0.129+ but emits a deprecation warning; pre-0.129 only
|
|
70
|
-
// accepts `codex_hooks`. Without this flag the hooks.json is ignored and
|
|
71
|
-
// inject-workflow-state.py will never fire. Codex 0.129+ also gates each
|
|
72
|
-
// installed hook behind a one-time `/hooks` review — until the user approves
|
|
73
|
-
// it the workflow breadcrumb won't auto-inject (the trellis-bootstrap
|
|
74
|
-
// fallback in inject-workflow-state.py covers this case). Documented in
|
|
75
|
-
// spec/cli/backend/platform-integration.md.
|
|
76
|
-
if (!process.env.VITEST && !process.env.TRELLIS_QUIET) {
|
|
77
|
-
process.stderr.write("⚠️ Codex hooks require `features.hooks = true` in your " +
|
|
78
|
-
"~/.codex/config.toml (Codex 0.129+; older versions: `codex_hooks = true`). " +
|
|
79
|
-
"On Codex 0.129+ also run `/hooks` once to approve the Trellis " +
|
|
80
|
-
"UserPromptSubmit hook. Without these the Trellis workflow breadcrumb " +
|
|
81
|
-
"won't auto-inject. See Trellis docs for details.\n");
|
|
82
|
-
}
|
|
83
|
-
// Config → .codex/config.toml
|
|
84
|
-
const config = getConfigTemplate();
|
|
85
|
-
await writeFile(path.join(codexRoot, config.targetPath), replacePythonCommandLiterals(config.content));
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=codex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/configurators/codex.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CA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b,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAC9B,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAC3C,CAAC;IACJ,CAAC;IAED,qEAAqE;IACrE,wBAAwB;IACxB,MAAM,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAE1C,mCAAmC;IACnC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAClC,mBAAmB,CAAC,cAAc,EAAE,CAAC,CACtC,CAAC;IAEF,kEAAkE;IAClE,gFAAgF;IAChF,wEAAwE;IACxE,yEAAyE;IACzE,yEAAyE;IACzE,6EAA6E;IAC7E,sEAAsE;IACtE,wEAAwE;IACxE,4CAA4C;IAC5C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0DAA0D;YACxD,6EAA6E;YAC7E,gEAAgE;YAChE,uEAAuE;YACvE,oDAAoD,CACvD,CAAC;IACJ,CAAC;IAED,8BAA8B;IAC9B,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,EACvC,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configure GitHub Copilot:
|
|
3
|
-
* - prompts/ — start + finish-work as prompt files
|
|
4
|
-
* - skills/trellis-{name}/SKILL.md — other 5 as auto-triggered skills
|
|
5
|
-
* - agents/{name}.agent.md — sub-agent definitions (note .agent.md suffix)
|
|
6
|
-
* - copilot/hooks/ — platform-specific + shared hook scripts
|
|
7
|
-
* - hooks config — hooks.json
|
|
8
|
-
*/
|
|
9
|
-
export declare function configureCopilot(cwd: string): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=copilot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/configurators/copilot.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DjE"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { getAllHooks, getHooksConfig } from "../templates/copilot/index.js";
|
|
4
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
5
|
-
import { resolvePlaceholders, resolveCommands, resolveSkills, resolveBundledSkills, applyPullBasedPreludeMarkdown, normalizeCopilotMarkdownAgents, writeSkills, writeSharedHooks, replacePythonCommandLiterals, } from "./shared.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configure GitHub Copilot:
|
|
8
|
-
* - prompts/ — start + finish-work as prompt files
|
|
9
|
-
* - skills/trellis-{name}/SKILL.md — other 5 as auto-triggered skills
|
|
10
|
-
* - agents/{name}.agent.md — sub-agent definitions (note .agent.md suffix)
|
|
11
|
-
* - copilot/hooks/ — platform-specific + shared hook scripts
|
|
12
|
-
* - hooks config — hooks.json
|
|
13
|
-
*/
|
|
14
|
-
export async function configureCopilot(cwd) {
|
|
15
|
-
const config = AI_TOOLS.copilot;
|
|
16
|
-
const ctx = config.templateContext;
|
|
17
|
-
const copilotRoot = path.join(cwd, ".github", "copilot");
|
|
18
|
-
const promptsDir = path.join(cwd, ".github", "prompts");
|
|
19
|
-
ensureDir(promptsDir);
|
|
20
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
21
|
-
await writeFile(path.join(promptsDir, `${cmd.name}.prompt.md`), cmd.content);
|
|
22
|
-
}
|
|
23
|
-
await writeSkills(path.join(cwd, ".github", "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
|
|
24
|
-
const agentsDir = path.join(cwd, ".github", "agents");
|
|
25
|
-
ensureDir(agentsDir);
|
|
26
|
-
// Copilot is a class-2 (pull-based) platform: hook events don't reliably
|
|
27
|
-
// fire for sub-agents (#2392/#2540). Reuse Cursor's agent content and
|
|
28
|
-
// prepend the pull-based prelude so sub-agents Read Trellis context themselves.
|
|
29
|
-
// Cursor uses Claude-style comma-separated tools frontmatter; normalize that
|
|
30
|
-
// to Copilot's YAML tool list format before writing into .github/agents.
|
|
31
|
-
const { getAllAgents: getCursorAgents } = await import("../templates/cursor/index.js");
|
|
32
|
-
for (const agent of applyPullBasedPreludeMarkdown(normalizeCopilotMarkdownAgents(getCursorAgents()))) {
|
|
33
|
-
await writeFile(path.join(agentsDir, `${agent.name}.agent.md`), replacePythonCommandLiterals(agent.content));
|
|
34
|
-
}
|
|
35
|
-
// Platform-specific hook scripts (Copilot's own session-start.py)
|
|
36
|
-
const hooksDir = path.join(copilotRoot, "hooks");
|
|
37
|
-
ensureDir(hooksDir);
|
|
38
|
-
for (const hook of getAllHooks()) {
|
|
39
|
-
await writeFile(path.join(hooksDir, hook.name), replacePythonCommandLiterals(hook.content));
|
|
40
|
-
}
|
|
41
|
-
// Shared hook scripts (inject-workflow-state.py only). Copilot bundles its
|
|
42
|
-
// own session-start.py above; sub-agent context is pull-based (class-2).
|
|
43
|
-
await writeSharedHooks(hooksDir, "copilot");
|
|
44
|
-
// Hooks config
|
|
45
|
-
const resolvedConfig = resolvePlaceholders(getHooksConfig());
|
|
46
|
-
await writeFile(path.join(copilotRoot, "hooks.json"), resolvedConfig);
|
|
47
|
-
const githubHooksDir = path.join(cwd, ".github", "hooks");
|
|
48
|
-
ensureDir(githubHooksDir);
|
|
49
|
-
await writeFile(path.join(githubHooksDir, "trellis.json"), resolvedConfig);
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=copilot.js.map
|
|
@@ -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D,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1B,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configure Factory Droid:
|
|
3
|
-
* - commands/trellis/ — start + finish-work as slash commands
|
|
4
|
-
* - skills/trellis-{name}/SKILL.md — other 5 as auto-triggered skills
|
|
5
|
-
* - droids/{name}.md — sub-agent definitions (Droid calls them "droids")
|
|
6
|
-
* - hooks/*.py — shared hook scripts
|
|
7
|
-
* - settings.json — hook configuration
|
|
8
|
-
*/
|
|
9
|
-
export declare function configureDroid(cwd: string): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=droid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"droid.d.ts","sourceRoot":"","sources":["../../src/configurators/droid.ts"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB/D"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
-
import { resolvePlaceholders, resolveCommands, resolveSkills, resolveBundledSkills, writeSkills, writeAgents, writeSharedHooks, } from "./shared.js";
|
|
5
|
-
import { getAllDroids, getSettingsTemplate } from "../templates/droid/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configure Factory Droid:
|
|
8
|
-
* - commands/trellis/ — start + finish-work as slash commands
|
|
9
|
-
* - skills/trellis-{name}/SKILL.md — other 5 as auto-triggered skills
|
|
10
|
-
* - droids/{name}.md — sub-agent definitions (Droid calls them "droids")
|
|
11
|
-
* - hooks/*.py — shared hook scripts
|
|
12
|
-
* - settings.json — hook configuration
|
|
13
|
-
*/
|
|
14
|
-
export async function configureDroid(cwd) {
|
|
15
|
-
const config = AI_TOOLS.droid;
|
|
16
|
-
const ctx = config.templateContext;
|
|
17
|
-
const configRoot = path.join(cwd, config.configDir);
|
|
18
|
-
// Commands
|
|
19
|
-
const commandsDir = path.join(configRoot, "commands", "trellis");
|
|
20
|
-
ensureDir(commandsDir);
|
|
21
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
22
|
-
await writeFile(path.join(commandsDir, `${cmd.name}.md`), cmd.content);
|
|
23
|
-
}
|
|
24
|
-
await writeSkills(path.join(configRoot, "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
|
|
25
|
-
await writeAgents(path.join(configRoot, "droids"), getAllDroids());
|
|
26
|
-
await writeSharedHooks(path.join(configRoot, "hooks"), "droid");
|
|
27
|
-
const settings = getSettingsTemplate();
|
|
28
|
-
await writeFile(path.join(configRoot, settings.targetPath), resolvePlaceholders(settings.content));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=droid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"droid.js","sourceRoot":"","sources":["../../src/configurators/droid.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEhF;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAW;IAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;IAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAEpD,WAAW;IACX,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IACjE,SAAS,CAAC,WAAW,CAAC,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAC/B,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,CAAC;IACF,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IACnE,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,mBAAmB,EAAE,CAAC;IACvC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1C,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configure Gemini CLI (pull-based class-2 platform):
|
|
3
|
-
* - commands/trellis/ — start + finish-work as TOML slash commands
|
|
4
|
-
* - .agents/skills/trellis-{name}/SKILL.md — 5 auto-triggered shared skills
|
|
5
|
-
* written to the cross-platform `.agents/skills/` workspace alias (Gemini
|
|
6
|
-
* CLI 0.40+ reads it natively; previously `.gemini/skills/` was used,
|
|
7
|
-
* which collided with Codex's identical write target and caused
|
|
8
|
-
* duplicate-skill warnings — issue #224).
|
|
9
|
-
* - agents/{name}.md — sub-agent definitions, with pull-based prelude
|
|
10
|
-
* - hooks/*.py — session-start only (no inject-subagent-context.py — Gemini
|
|
11
|
-
* BeforeTool can fire but #18128 limits chain-of-thought visibility; sub-agents
|
|
12
|
-
* Read jsonl/prd themselves)
|
|
13
|
-
* - settings.json — hook configuration (SessionStart + BeforeAgent)
|
|
14
|
-
*/
|
|
15
|
-
export declare function configureGemini(cwd: string): Promise<void>;
|
|
16
|
-
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/configurators/gemini.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BhE"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
-
import { resolvePlaceholders, resolveCommands, resolveSkillsNeutral, resolveBundledSkills, writeSkills, writeAgents, writeSharedHooks, applyPullBasedPreludeMarkdown, } from "./shared.js";
|
|
5
|
-
import { getAllAgents, getSettingsTemplate, } from "../templates/gemini/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configure Gemini CLI (pull-based class-2 platform):
|
|
8
|
-
* - commands/trellis/ — start + finish-work as TOML slash commands
|
|
9
|
-
* - .agents/skills/trellis-{name}/SKILL.md — 5 auto-triggered shared skills
|
|
10
|
-
* written to the cross-platform `.agents/skills/` workspace alias (Gemini
|
|
11
|
-
* CLI 0.40+ reads it natively; previously `.gemini/skills/` was used,
|
|
12
|
-
* which collided with Codex's identical write target and caused
|
|
13
|
-
* duplicate-skill warnings — issue #224).
|
|
14
|
-
* - agents/{name}.md — sub-agent definitions, with pull-based prelude
|
|
15
|
-
* - hooks/*.py — session-start only (no inject-subagent-context.py — Gemini
|
|
16
|
-
* BeforeTool can fire but #18128 limits chain-of-thought visibility; sub-agents
|
|
17
|
-
* Read jsonl/prd themselves)
|
|
18
|
-
* - settings.json — hook configuration (SessionStart + BeforeAgent)
|
|
19
|
-
*/
|
|
20
|
-
export async function configureGemini(cwd) {
|
|
21
|
-
const config = AI_TOOLS.gemini;
|
|
22
|
-
const ctx = config.templateContext;
|
|
23
|
-
const configRoot = path.join(cwd, config.configDir);
|
|
24
|
-
const commandsDir = path.join(configRoot, "commands", "trellis");
|
|
25
|
-
ensureDir(commandsDir);
|
|
26
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
27
|
-
const toml = `description = "Trellis: ${cmd.name}"\n\nprompt = """\n${cmd.content}\n"""\n`;
|
|
28
|
-
await writeFile(path.join(commandsDir, `${cmd.name}.toml`), toml);
|
|
29
|
-
}
|
|
30
|
-
// Shared skills go to `.agents/skills/` (read by Gemini CLI 0.40+ as a
|
|
31
|
-
// workspace alias), using the neutral placeholder resolver so the rendered
|
|
32
|
-
// SKILL.md files are byte-identical to Codex's writes for the same skills.
|
|
33
|
-
await writeSkills(path.join(cwd, ".agents", "skills"), resolveSkillsNeutral(ctx), resolveBundledSkills(ctx));
|
|
34
|
-
await writeAgents(path.join(configRoot, "agents"), applyPullBasedPreludeMarkdown(getAllAgents()));
|
|
35
|
-
await writeSharedHooks(path.join(configRoot, "hooks"), "gemini");
|
|
36
|
-
await writeFile(path.join(configRoot, "settings.json"), resolvePlaceholders(getSettingsTemplate()));
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=gemini.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/configurators/gemini.ts"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C,GAAG,CAAC,CAC1B,CAAC;IACF,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAC/B,6BAA6B,CAAC,YAAY,EAAE,CAAC,CAC9C,CAAC;IACF,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;IAEjE,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,EACtC,mBAAmB,CAAC,mBAAmB,EAAE,CAAC,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kilo.d.ts","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc9D"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
-
import { resolveBundledSkills, resolveCommands, resolveSkills, writeSkills, } from "./shared.js";
|
|
5
|
-
/**
|
|
6
|
-
* Configure Kilo CLI:
|
|
7
|
-
* - workflows/ — start + finish-work as slash commands
|
|
8
|
-
* - skills/trellis-{name}/SKILL.md — other 5 as auto-triggered skills
|
|
9
|
-
*/
|
|
10
|
-
export async function configureKilo(cwd) {
|
|
11
|
-
const ctx = AI_TOOLS.kilo.templateContext;
|
|
12
|
-
const workflowsDir = path.join(cwd, ".kilocode", "workflows");
|
|
13
|
-
ensureDir(workflowsDir);
|
|
14
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
15
|
-
await writeFile(path.join(workflowsDir, `${cmd.name}.md`), cmd.content);
|
|
16
|
-
}
|
|
17
|
-
await writeSkills(path.join(cwd, ".kilocode", "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=kilo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kilo.js","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;IAE1C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC9D,SAAS,CAAC,YAAY,CAAC,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,CAAC,EACrC,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configure Kiro Code:
|
|
3
|
-
* - skills/trellis-{name}/SKILL.md — all templates as auto-triggered skills
|
|
4
|
-
* - agents/{name}.json — sub-agent definitions (JSON, with hooks embedded)
|
|
5
|
-
* - hooks/*.py — shared hook scripts (referenced by agent JSON hooks)
|
|
6
|
-
*/
|
|
7
|
-
export declare function configureKiro(cwd: string): Promise<void>;
|
|
8
|
-
//# sourceMappingURL=kiro.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kiro.d.ts","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB9D"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { resolvePlaceholders, resolveAllAsSkills, resolveBundledSkills, writeSkills, writeAgents, writeSharedHooks, } from "./shared.js";
|
|
4
|
-
import { getAllAgents } from "../templates/kiro/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Configure Kiro Code:
|
|
7
|
-
* - skills/trellis-{name}/SKILL.md — all templates as auto-triggered skills
|
|
8
|
-
* - agents/{name}.json — sub-agent definitions (JSON, with hooks embedded)
|
|
9
|
-
* - hooks/*.py — shared hook scripts (referenced by agent JSON hooks)
|
|
10
|
-
*/
|
|
11
|
-
export async function configureKiro(cwd) {
|
|
12
|
-
const config = AI_TOOLS.kiro;
|
|
13
|
-
// Kiro configDir is ".kiro/skills" — agents and hooks go under ".kiro/"
|
|
14
|
-
const kiroRoot = path.join(cwd, ".kiro");
|
|
15
|
-
await writeSkills(path.join(kiroRoot, "skills"), resolveAllAsSkills(config.templateContext), resolveBundledSkills(config.templateContext));
|
|
16
|
-
// Agents (JSON format, with {{PYTHON_CMD}} resolved)
|
|
17
|
-
const agents = getAllAgents().map((a) => ({
|
|
18
|
-
...a,
|
|
19
|
-
content: resolvePlaceholders(a.content),
|
|
20
|
-
}));
|
|
21
|
-
await writeAgents(path.join(kiroRoot, "agents"), agents, ".json");
|
|
22
|
-
await writeSharedHooks(path.join(kiroRoot, "hooks"), "kiro");
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=kiro.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC7B,wEAAwE;IACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAEzC,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC7B,kBAAkB,CAAC,MAAM,CAAC,eAAe,CAAC,EAC1C,oBAAoB,CAAC,MAAM,CAAC,eAAe,CAAC,CAC7C,CAAC;IAEF,qDAAqD;IACrD,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxC,GAAG,CAAC;QACJ,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC;KACxC,CAAC,CAAC,CAAC;IACJ,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAElE,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Collect all opencode template files that `trellis update` should track.
|
|
3
|
-
*
|
|
4
|
-
* Must stay in sync with `configureOpenCode`: both paths produce the same
|
|
5
|
-
* `Map<relPath, content>`. If they drift, update will spuriously flag newly
|
|
6
|
-
* init'd files as modifications on the next run.
|
|
7
|
-
*/
|
|
8
|
-
export declare function collectOpenCodeTemplates(): Map<string, string>;
|
|
9
|
-
/**
|
|
10
|
-
* Configure OpenCode at init time by writing the same file set enumerated
|
|
11
|
-
* by `collectOpenCodeTemplates`.
|
|
12
|
-
*/
|
|
13
|
-
export declare function configureOpenCode(cwd: string): Promise<void>;
|
|
14
|
-
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AA8EA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAc9D;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlE"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
4
|
-
import { getOpenCodeTemplatePath } from "../templates/extract.js";
|
|
5
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
6
|
-
import { toPosix } from "../utils/posix.js";
|
|
7
|
-
import { collectSkillTemplates, replacePythonCommandLiterals, resolveBundledSkills, resolveCommands, resolveSkills, } from "./shared.js";
|
|
8
|
-
/**
|
|
9
|
-
* Files under packages/cli/src/templates/opencode/ that are NOT user-facing
|
|
10
|
-
* assets (build artifacts, runtime caches, etc.). The template dir has a
|
|
11
|
-
* real package.json that declares the @opencode-ai/plugin dep — that one
|
|
12
|
-
* IS user-facing and must be shipped.
|
|
13
|
-
*/
|
|
14
|
-
const EXCLUDE_PATTERNS = [
|
|
15
|
-
".d.ts",
|
|
16
|
-
".d.ts.map",
|
|
17
|
-
".js.map",
|
|
18
|
-
"__pycache__",
|
|
19
|
-
"node_modules",
|
|
20
|
-
"bun.lock",
|
|
21
|
-
".gitignore",
|
|
22
|
-
];
|
|
23
|
-
function shouldExclude(filename) {
|
|
24
|
-
for (const pattern of EXCLUDE_PATTERNS) {
|
|
25
|
-
if (filename.endsWith(pattern) || filename === pattern) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Walk the opencode template directory and produce a `Map<relPath, content>`
|
|
33
|
-
* rooted at `.opencode/`. Shared by both `configureOpenCode` (init-time write)
|
|
34
|
-
* and `collectOpenCodeTemplates` (update-time hash tracking) so the two paths
|
|
35
|
-
* always agree on the exact file set. `commands/` is handled separately (sourced
|
|
36
|
-
* from common template context, not from this directory tree).
|
|
37
|
-
*/
|
|
38
|
-
function walkOpenCodeTemplateDir() {
|
|
39
|
-
const files = new Map();
|
|
40
|
-
const sourcePath = getOpenCodeTemplatePath();
|
|
41
|
-
function walk(relDir) {
|
|
42
|
-
const absDir = path.join(sourcePath, relDir);
|
|
43
|
-
for (const entry of readdirSync(absDir)) {
|
|
44
|
-
if (shouldExclude(entry))
|
|
45
|
-
continue;
|
|
46
|
-
const absEntry = path.join(absDir, entry);
|
|
47
|
-
const relEntry = relDir ? path.join(relDir, entry) : entry;
|
|
48
|
-
const stat = statSync(absEntry);
|
|
49
|
-
if (stat.isDirectory()) {
|
|
50
|
-
// Skip commands/ — that's sourced from common/ templates, not the
|
|
51
|
-
// opencode/ dir. Including both paths would double-write.
|
|
52
|
-
if (relEntry === "commands")
|
|
53
|
-
continue;
|
|
54
|
-
walk(relEntry);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
const content = readFileSync(absEntry, "utf-8");
|
|
58
|
-
// Map keys are logical paths used as cross-platform hash keys / lookup
|
|
59
|
-
// keys downstream. Always POSIX, regardless of host OS.
|
|
60
|
-
files.set(toPosix(path.join(".opencode", relEntry)), replacePythonCommandLiterals(content));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
walk("");
|
|
65
|
-
return files;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Collect all opencode template files that `trellis update` should track.
|
|
69
|
-
*
|
|
70
|
-
* Must stay in sync with `configureOpenCode`: both paths produce the same
|
|
71
|
-
* `Map<relPath, content>`. If they drift, update will spuriously flag newly
|
|
72
|
-
* init'd files as modifications on the next run.
|
|
73
|
-
*/
|
|
74
|
-
export function collectOpenCodeTemplates() {
|
|
75
|
-
const files = walkOpenCodeTemplateDir();
|
|
76
|
-
const ctx = AI_TOOLS.opencode.templateContext;
|
|
77
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
78
|
-
files.set(`.opencode/commands/trellis/${cmd.name}.md`, cmd.content);
|
|
79
|
-
}
|
|
80
|
-
for (const [filePath, content] of collectSkillTemplates(".opencode/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
|
|
81
|
-
files.set(filePath, content);
|
|
82
|
-
}
|
|
83
|
-
return files;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Configure OpenCode at init time by writing the same file set enumerated
|
|
87
|
-
* by `collectOpenCodeTemplates`.
|
|
88
|
-
*/
|
|
89
|
-
export async function configureOpenCode(cwd) {
|
|
90
|
-
for (const [relPath, content] of collectOpenCodeTemplates()) {
|
|
91
|
-
const absPath = path.join(cwd, relPath);
|
|
92
|
-
ensureDir(path.dirname(absPath));
|
|
93
|
-
await writeFile(absPath, content);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=op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BAAqB,CACrD,kBAAkB,EAClB,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW;IACjD,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,wBAAwB,EAAE,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACxC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QACjC,MAAM,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pi.d.ts","sourceRoot":"","sources":["../../src/configurators/pi.ts"],"names":[],"mappings":"AAoBA,wBAAgB,kBAAkB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCxD;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC5D"}
|
package/dist/configurators/pi.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
-
import { applyPullBasedPreludeMarkdown, collectSkillTemplates, replacePythonCommandLiterals, resolveCommands, resolveBundledSkills, resolvePlaceholders, resolveSkills, writeAgents, writeSkills, } from "./shared.js";
|
|
5
|
-
import { getAllAgents, getExtensionTemplate, getSettingsTemplate, } from "../templates/pi/index.js";
|
|
6
|
-
export function collectPiTemplates() {
|
|
7
|
-
const config = AI_TOOLS.pi;
|
|
8
|
-
const ctx = config.templateContext;
|
|
9
|
-
const files = new Map();
|
|
10
|
-
for (const command of resolveCommands(ctx)) {
|
|
11
|
-
files.set(`.pi/prompts/trellis-${command.name}.md`, command.content);
|
|
12
|
-
}
|
|
13
|
-
// Skills written under `.pi/skills/` (Pi-owned skill root). Pi can also
|
|
14
|
-
// discover `.agents/skills/` shared with Codex/Gemini; switching is
|
|
15
|
-
// intentionally deferred to a follow-up because Pi has its own skill
|
|
16
|
-
// discovery semantics that aren't covered by this task.
|
|
17
|
-
for (const [filePath, content] of collectSkillTemplates(".pi/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
|
|
18
|
-
files.set(filePath, content);
|
|
19
|
-
}
|
|
20
|
-
for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
|
|
21
|
-
files.set(`.pi/agents/${agent.name}.md`, agent.content);
|
|
22
|
-
}
|
|
23
|
-
files.set(".pi/extensions/trellis/index.ts", getExtensionTemplate());
|
|
24
|
-
const settings = getSettingsTemplate();
|
|
25
|
-
files.set(`.pi/${settings.targetPath}`, resolvePlaceholders(settings.content));
|
|
26
|
-
return files;
|
|
27
|
-
}
|
|
28
|
-
export async function configurePi(cwd) {
|
|
29
|
-
const config = AI_TOOLS.pi;
|
|
30
|
-
const ctx = config.templateContext;
|
|
31
|
-
const configRoot = path.join(cwd, config.configDir);
|
|
32
|
-
ensureDir(path.join(configRoot, "prompts"));
|
|
33
|
-
for (const command of resolveCommands(ctx)) {
|
|
34
|
-
await writeFile(path.join(configRoot, "prompts", `trellis-${command.name}.md`), command.content);
|
|
35
|
-
}
|
|
36
|
-
// See collectPiTemplates(): Pi keeps a private `.pi/skills/` root for now.
|
|
37
|
-
// Cross-platform `.agents/skills/` adoption is a separate decision.
|
|
38
|
-
await writeSkills(path.join(configRoot, "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
|
|
39
|
-
await writeAgents(path.join(configRoot, "agents"), applyPullBasedPreludeMarkdown(getAllAgents()));
|
|
40
|
-
ensureDir(path.join(configRoot, "extensions", "trellis"));
|
|
41
|
-
await writeFile(path.join(configRoot, "extensions", "trellis", "index.ts"), replacePythonCommandLiterals(getExtensionTemplate()));
|
|
42
|
-
const settings = getSettingsTemplate();
|
|
43
|
-
await writeFile(path.join(configRoot, settings.targetPath), resolvePlaceholders(settings.content));
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=pi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pi.js","sourceRoot":"","sources":["../../src/configurators/pi.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,KAAK,MAAM,OAAO,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3C,KAAK,CAAC,GAAG,CAAC,uBAAuB,OAAO,CAAC,IAAI,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE,CAAC;IAED,wEAAwE;IACxE,oEAAoE;IACpE,qEAAqE;IACrE,wDAAwD;IACxD,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAA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I,CAAC,UAAU,EAAE,QAAQ,CAAC,EAC/B,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,CAAC;IACF,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAC/B,6BAA6B,CAAC,YAAY,EAAE,CAAC,CAC9C,CAAC;IAEF,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,CAAC,EAC1D,4BAA4B,CAAC,oBAAoB,EAAE,CAAC,CACrD,CAAC;IAEF,MAAM,QAAQ,GAAG,mBAAmB,EAAE,CAAC;IACvC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1C,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configure Qoder (pull-based class-2 platform).
|
|
3
|
-
*
|
|
4
|
-
* Qoder Custom Commands require YAML frontmatter with `name` + `description`
|
|
5
|
-
* and use a flat layout, so session-boundary commands get wrapped via
|
|
6
|
-
* `wrapWithCommandFrontmatter`; auto-trigger workflows stay as plain skills.
|
|
7
|
-
* `inject-subagent-context.py` is excluded because Qoder's hook can't inject
|
|
8
|
-
* sub-agent prompts — sub-agents pull task context themselves.
|
|
9
|
-
*/
|
|
10
|
-
export declare function configureQoder(cwd: string): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=qoder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"qoder.d.ts","sourceRoot":"","sources":["../../src/configurators/qoder.ts"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B/D"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
|
-
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
-
import { resolvePlaceholders, resolveCommands, resolveSkills, resolveBundledSkills, wrapWithCommandFrontmatter, writeSkills, writeAgents, writeSharedHooks, applyPullBasedPreludeMarkdown, } from "./shared.js";
|
|
5
|
-
import { getAllAgents, getSettingsTemplate } from "../templates/qoder/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configure Qoder (pull-based class-2 platform).
|
|
8
|
-
*
|
|
9
|
-
* Qoder Custom Commands require YAML frontmatter with `name` + `description`
|
|
10
|
-
* and use a flat layout, so session-boundary commands get wrapped via
|
|
11
|
-
* `wrapWithCommandFrontmatter`; auto-trigger workflows stay as plain skills.
|
|
12
|
-
* `inject-subagent-context.py` is excluded because Qoder's hook can't inject
|
|
13
|
-
* sub-agent prompts — sub-agents pull task context themselves.
|
|
14
|
-
*/
|
|
15
|
-
export async function configureQoder(cwd) {
|
|
16
|
-
const config = AI_TOOLS.qoder;
|
|
17
|
-
const ctx = config.templateContext;
|
|
18
|
-
const configRoot = path.join(cwd, config.configDir);
|
|
19
|
-
const commandsDir = path.join(configRoot, "commands");
|
|
20
|
-
ensureDir(commandsDir);
|
|
21
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
22
|
-
const name = `trellis-${cmd.name}`;
|
|
23
|
-
await writeFile(path.join(commandsDir, `${name}.md`), wrapWithCommandFrontmatter(name, cmd.content));
|
|
24
|
-
}
|
|
25
|
-
await writeSkills(path.join(configRoot, "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
|
|
26
|
-
await writeAgents(path.join(configRoot, "agents"), applyPullBasedPreludeMarkdown(getAllAgents()));
|
|
27
|
-
await writeSharedHooks(path.join(configRoot, "hooks"), "qoder");
|
|
28
|
-
const settings = getSettingsTemplate();
|
|
29
|
-
await writeFile(path.join(configRoot, settings.targetPath), resolvePlaceholders(settings.content));
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=qoder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"qoder.js","sourceRoot":"","sources":["../../src/configurators/qoder.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAW;IAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;IAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAEpD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACtD,SAAS,CAAC,WAAW,CAAC,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,WAAW,GAAG,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,KAAK,CAAC,EACpC,0BAA0B,CAA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