@blulotus/trellis 0.7.0 → 0.7.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 +2 -2
- package/dist/cli/index.js +2 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +0 -22
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +5 -12
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mem.d.ts +2 -2
- package/dist/commands/mem.d.ts.map +1 -1
- package/dist/commands/mem.js +7 -40
- package/dist/commands/mem.js.map +1 -1
- package/dist/commands/uninstall.d.ts +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +4 -34
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +2 -28
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +7 -73
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +18 -70
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +20 -299
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +0 -14
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +1 -37
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.1.9.json +0 -12
- package/dist/migrations/manifests/0.2.14.json +0 -84
- package/dist/migrations/manifests/0.3.0-beta.0.json +0 -87
- package/dist/migrations/manifests/0.3.4.json +1 -13
- package/dist/migrations/manifests/0.4.0-beta.1.json +24 -176
- package/dist/migrations/manifests/0.5.0-beta.0.json +67 -1203
- package/dist/migrations/manifests/0.5.0-beta.15.json +0 -96
- package/dist/migrations/manifests/0.5.0-beta.5.json +0 -168
- package/dist/migrations/manifests/0.5.0-beta.9.json +0 -20
- package/dist/migrations/manifests/0.6.0-beta.23.json +0 -66
- package/dist/migrations/manifests/0.6.3.json +1 -16
- package/dist/migrations/manifests/0.6.6.json +1 -9
- package/dist/migrations/manifests/0.7.0.json +9 -0
- package/dist/migrations/manifests/0.7.1.json +9 -0
- package/dist/migrations/manifests/0.7.2.json +9 -0
- package/dist/migrations/manifests/0.8.0.json +9 -0
- package/dist/templates/codex/hooks/session-start.py +37 -13
- package/dist/templates/codex/hooks.json +5 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +5 -5
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +0 -10
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +1 -13
- 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/bundled-skills.md +9 -28
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +5 -5
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +1 -17
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +4 -12
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +6 -6
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +5 -75
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +0 -16
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +2 -3
- package/dist/templates/common/commands/continue.md +24 -4
- package/dist/templates/common/commands/finish-work.md +19 -9
- package/dist/templates/common/commands/start.md +38 -29
- package/dist/templates/extract.d.ts +0 -10
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +0 -24
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +7 -9
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +4 -8
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +5 -5
- package/dist/templates/shared-hooks/index.d.ts +11 -43
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +9 -86
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-spec-context.py +1 -1
- package/dist/templates/shared-hooks/inject-subagent-context.py +23 -85
- package/dist/templates/shared-hooks/inject-workflow-state.py +56 -86
- package/dist/templates/shared-hooks/session-start.py +76 -98
- package/dist/templates/trellis/config.yaml +8 -8
- package/dist/templates/trellis/index.d.ts +1 -4
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +1 -5
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +12 -11
- package/dist/templates/trellis/scripts/common/__init__.py +2 -0
- package/dist/templates/trellis/scripts/common/active_task.py +80 -152
- package/dist/templates/trellis/scripts/common/config.py +7 -7
- package/dist/templates/trellis/scripts/common/git_context.py +1 -1
- package/dist/templates/trellis/scripts/common/session_context.py +2 -2
- package/dist/templates/trellis/scripts/common/spec_inject.py +2 -2
- package/dist/templates/trellis/scripts/common/task_store.py +8 -28
- package/dist/templates/trellis/scripts/common/workflow_phase.py +4 -8
- package/dist/templates/trellis/scripts/get_context.py +2 -2
- package/dist/templates/trellis/scripts/init_developer.py +1 -1
- package/dist/templates/trellis/scripts/task.py +90 -57
- package/dist/templates/trellis/workflow.md +44 -66
- package/dist/types/ai-tools.d.ts +10 -10
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +3 -434
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts +3 -18
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +24 -154
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +2 -2
- package/dist/configurators/antigravity.d.ts +0 -7
- package/dist/configurators/antigravity.d.ts.map +0 -1
- package/dist/configurators/antigravity.js +0 -11
- package/dist/configurators/antigravity.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 -24
- package/dist/configurators/codebuddy.js.map +0 -1
- package/dist/configurators/copilot.d.ts +0 -14
- package/dist/configurators/copilot.d.ts.map +0 -1
- package/dist/configurators/copilot.js +0 -46
- package/dist/configurators/copilot.js.map +0 -1
- package/dist/configurators/cursor.d.ts +0 -10
- package/dist/configurators/cursor.d.ts.map +0 -1
- package/dist/configurators/cursor.js +0 -23
- package/dist/configurators/cursor.js.map +0 -1
- package/dist/configurators/devin.d.ts +0 -8
- package/dist/configurators/devin.d.ts.map +0 -1
- package/dist/configurators/devin.js +0 -12
- package/dist/configurators/devin.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 -24
- package/dist/configurators/droid.js.map +0 -1
- package/dist/configurators/dsh.d.ts +0 -26
- package/dist/configurators/dsh.d.ts.map +0 -1
- package/dist/configurators/dsh.js +0 -76
- package/dist/configurators/dsh.js.map +0 -1
- package/dist/configurators/gemini.d.ts +0 -18
- package/dist/configurators/gemini.d.ts.map +0 -1
- package/dist/configurators/gemini.js +0 -39
- package/dist/configurators/gemini.js.map +0 -1
- package/dist/configurators/grok.d.ts +0 -17
- package/dist/configurators/grok.d.ts.map +0 -1
- package/dist/configurators/grok.js +0 -38
- package/dist/configurators/grok.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 -11
- package/dist/configurators/kilo.js.map +0 -1
- package/dist/configurators/kimi.d.ts +0 -26
- package/dist/configurators/kimi.d.ts.map +0 -1
- package/dist/configurators/kimi.js +0 -74
- package/dist/configurators/kimi.js.map +0 -1
- package/dist/configurators/kiro.d.ts +0 -11
- package/dist/configurators/kiro.d.ts.map +0 -1
- package/dist/configurators/kiro.js +0 -30
- package/dist/configurators/kiro.js.map +0 -1
- package/dist/configurators/omp.d.ts +0 -6
- package/dist/configurators/omp.d.ts.map +0 -1
- package/dist/configurators/omp.js +0 -28
- package/dist/configurators/omp.js.map +0 -1
- package/dist/configurators/opencode.d.ts +0 -5
- package/dist/configurators/opencode.d.ts.map +0 -1
- package/dist/configurators/opencode.js +0 -84
- package/dist/configurators/opencode.js.map +0 -1
- package/dist/configurators/pi.d.ts +0 -5
- package/dist/configurators/pi.d.ts.map +0 -1
- package/dist/configurators/pi.js +0 -39
- package/dist/configurators/pi.js.map +0 -1
- package/dist/configurators/qoder.d.ts +0 -12
- package/dist/configurators/qoder.d.ts.map +0 -1
- package/dist/configurators/qoder.js +0 -30
- package/dist/configurators/qoder.js.map +0 -1
- package/dist/configurators/reasonix.d.ts +0 -17
- package/dist/configurators/reasonix.d.ts.map +0 -1
- package/dist/configurators/reasonix.js +0 -37
- package/dist/configurators/reasonix.js.map +0 -1
- package/dist/configurators/snow.d.ts +0 -25
- package/dist/configurators/snow.d.ts.map +0 -1
- package/dist/configurators/snow.js +0 -69
- package/dist/configurators/snow.js.map +0 -1
- package/dist/configurators/trae.d.ts +0 -16
- package/dist/configurators/trae.d.ts.map +0 -1
- package/dist/configurators/trae.js +0 -34
- package/dist/configurators/trae.js.map +0 -1
- package/dist/configurators/zcode.d.ts +0 -23
- package/dist/configurators/zcode.d.ts.map +0 -1
- package/dist/configurators/zcode.js +0 -63
- package/dist/configurators/zcode.js.map +0 -1
- package/dist/templates/codebuddy/agents/trellis-check.md +0 -115
- package/dist/templates/codebuddy/agents/trellis-implement.md +0 -115
- 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 -69
- package/dist/templates/copilot/copilot-instructions.md +0 -11
- package/dist/templates/copilot/hooks/session-start.py +0 -564
- package/dist/templates/copilot/hooks.json +0 -19
- package/dist/templates/copilot/index.d.ts +0 -28
- package/dist/templates/copilot/index.d.ts.map +0 -1
- package/dist/templates/copilot/index.js +0 -61
- 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 -173
- package/dist/templates/copilot/prompts/break-loop.prompt.md +0 -129
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +0 -170
- package/dist/templates/copilot/prompts/check.prompt.md +0 -110
- 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/cursor/agents/trellis-check.md +0 -114
- package/dist/templates/cursor/agents/trellis-implement.md +0 -114
- package/dist/templates/cursor/agents/trellis-research.md +0 -136
- package/dist/templates/cursor/hooks.json +0 -24
- package/dist/templates/cursor/index.d.ts +0 -13
- package/dist/templates/cursor/index.d.ts.map +0 -1
- package/dist/templates/cursor/index.js +0 -13
- package/dist/templates/cursor/index.js.map +0 -1
- package/dist/templates/droid/droids/trellis-check.md +0 -107
- package/dist/templates/droid/droids/trellis-implement.md +0 -107
- 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 -69
- package/dist/templates/dsh/DSH.md +0 -80
- package/dist/templates/dsh/agents/trellis-check.md +0 -99
- package/dist/templates/dsh/agents/trellis-implement.md +0 -106
- package/dist/templates/dsh/agents/trellis-research.md +0 -134
- package/dist/templates/dsh/index.d.ts +0 -22
- package/dist/templates/dsh/index.d.ts.map +0 -1
- package/dist/templates/dsh/index.js +0 -27
- package/dist/templates/dsh/index.js.map +0 -1
- package/dist/templates/gemini/agents/trellis-check.md +0 -107
- package/dist/templates/gemini/agents/trellis-implement.md +0 -107
- 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 -40
- package/dist/templates/grok/agents/trellis-check.md +0 -106
- package/dist/templates/grok/agents/trellis-implement.md +0 -121
- package/dist/templates/grok/agents/trellis-research.md +0 -146
- package/dist/templates/grok/index.d.ts +0 -16
- package/dist/templates/grok/index.d.ts.map +0 -1
- package/dist/templates/grok/index.js +0 -19
- package/dist/templates/grok/index.js.map +0 -1
- package/dist/templates/kimi/agents/trellis-check.md +0 -104
- package/dist/templates/kimi/agents/trellis-implement.md +0 -120
- package/dist/templates/kimi/agents/trellis-research.md +0 -144
- package/dist/templates/kimi/index.d.ts +0 -20
- package/dist/templates/kimi/index.d.ts.map +0 -1
- package/dist/templates/kimi/index.js +0 -23
- package/dist/templates/kimi/index.js.map +0 -1
- 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/agents/trellis.json +0 -34
- package/dist/templates/kiro/hooks/trellis-workflow-state.kiro.hook +0 -14
- package/dist/templates/kiro/index.d.ts +0 -32
- package/dist/templates/kiro/index.d.ts.map +0 -1
- package/dist/templates/kiro/index.js +0 -28
- package/dist/templates/kiro/index.js.map +0 -1
- package/dist/templates/omp/agents/trellis-check.md +0 -41
- package/dist/templates/omp/agents/trellis-implement.md +0 -55
- package/dist/templates/omp/agents/trellis-research.md +0 -30
- package/dist/templates/omp/extensions/trellis/index.ts.txt +0 -592
- package/dist/templates/omp/index.d.ts +0 -4
- package/dist/templates/omp/index.d.ts.map +0 -1
- package/dist/templates/omp/index.js +0 -9
- package/dist/templates/omp/index.js.map +0 -1
- package/dist/templates/opencode/agents/trellis-check.md +0 -122
- package/dist/templates/opencode/agents/trellis-implement.md +0 -123
- package/dist/templates/opencode/agents/trellis-research.md +0 -145
- package/dist/templates/opencode/lib/context-visibility.js +0 -86
- package/dist/templates/opencode/lib/session-utils.js +0 -526
- package/dist/templates/opencode/lib/trellis-context.js +0 -627
- package/dist/templates/opencode/package.json +0 -5
- package/dist/templates/opencode/plugins/inject-spec-context.js +0 -121
- package/dist/templates/opencode/plugins/inject-subagent-context.js +0 -569
- package/dist/templates/opencode/plugins/inject-workflow-state.js +0 -340
- package/dist/templates/opencode/plugins/session-start.js +0 -74
- package/dist/templates/pi/agents/trellis-check.md +0 -37
- package/dist/templates/pi/agents/trellis-implement.md +0 -52
- package/dist/templates/pi/agents/trellis-research.md +0 -25
- package/dist/templates/pi/extensions/trellis/index.ts.txt +0 -2033
- 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 -9
- package/dist/templates/qoder/agents/trellis-check.md +0 -108
- package/dist/templates/qoder/agents/trellis-implement.md +0 -108
- 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 -59
- package/dist/templates/reasonix/agents/trellis-check.md +0 -36
- package/dist/templates/reasonix/agents/trellis-implement.md +0 -51
- package/dist/templates/reasonix/index.d.ts +0 -13
- package/dist/templates/reasonix/index.d.ts.map +0 -1
- package/dist/templates/reasonix/index.js +0 -16
- package/dist/templates/reasonix/index.js.map +0 -1
- package/dist/templates/shared-hooks/inject-shell-session-context.py +0 -292
- package/dist/templates/snow/SNOW.md +0 -86
- package/dist/templates/snow/agents/trellis-check.md +0 -136
- package/dist/templates/snow/agents/trellis-implement.md +0 -158
- package/dist/templates/snow/agents/trellis-research.md +0 -114
- package/dist/templates/snow/hooks/beforeSubAgentStart.json +0 -15
- package/dist/templates/snow/hooks/onSessionStart.json +0 -15
- package/dist/templates/snow/hooks/onUserMessage.json +0 -15
- package/dist/templates/snow/hooks/write-trellis-context.py +0 -644
- package/dist/templates/snow/index.d.ts +0 -26
- package/dist/templates/snow/index.d.ts.map +0 -1
- package/dist/templates/snow/index.js +0 -36
- package/dist/templates/snow/index.js.map +0 -1
- package/dist/templates/trae/agents/trellis-check.md +0 -108
- package/dist/templates/trae/agents/trellis-implement.md +0 -108
- package/dist/templates/trae/agents/trellis-research.md +0 -137
- package/dist/templates/trae/hooks.json +0 -39
- package/dist/templates/trae/index.d.ts +0 -15
- package/dist/templates/trae/index.d.ts.map +0 -1
- package/dist/templates/trae/index.js +0 -15
- package/dist/templates/trae/index.js.map +0 -1
- package/dist/templates/trellis/gitattributes.txt +0 -9
- package/dist/templates/trellis/scripts/common/cli_adapter.py +0 -982
- package/dist/templates/zcode/agents/trellis-check.md +0 -110
- package/dist/templates/zcode/agents/trellis-implement.md +0 -116
- package/dist/templates/zcode/agents/trellis-research.md +0 -133
- package/dist/templates/zcode/config.json +0 -52
- package/dist/templates/zcode/index.d.ts +0 -25
- package/dist/templates/zcode/index.d.ts.map +0 -1
- package/dist/templates/zcode/index.js +0 -29
- package/dist/templates/zcode/index.js.map +0 -1
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DeepSeek Harness (dsh) configurator.
|
|
3
|
-
*
|
|
4
|
-
* dsh is a class-2 pull-based platform (agentCapable via the `subagent` tool,
|
|
5
|
-
* no shipped session-start hook, no project-level hooks/settings Trellis may
|
|
6
|
-
* write). Three output paths:
|
|
7
|
-
* - `.agents/skills/` — workflow + bundled skills, written via the NEUTRAL
|
|
8
|
-
* resolver so the files stay byte-identical to Codex/Gemini/Pi/Kimi writes
|
|
9
|
-
* into the same shared root (dsh discovers `.agents/skills/` natively).
|
|
10
|
-
* - `.dsh/skills/` — dsh-private entry skills (trellis-start /
|
|
11
|
-
* trellis-continue / trellis-finish-work) plus collision-free Trellis role
|
|
12
|
-
* skills (trellis-agent-implement / trellis-agent-check /
|
|
13
|
-
* trellis-agent-research) with the pull-based prelude on implement/check.
|
|
14
|
-
* - `.dsh/DSH.md` — operator guide and a configDir-owned tracked file for
|
|
15
|
-
* platform detection and uninstall scoping.
|
|
16
|
-
*
|
|
17
|
-
* dsh has no project-level hooks/settings file Trellis may write and no
|
|
18
|
-
* declarative custom sub-agent definitions (dispatch goes through the
|
|
19
|
-
* `subagent` tool), so no hooks, settings, or extension files are written and
|
|
20
|
-
* the agent prompts ship as skills.
|
|
21
|
-
*/
|
|
22
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
23
|
-
import { getAllAgents, getDshGuide } from "../templates/dsh/index.js";
|
|
24
|
-
import { applyPullBasedPreludeMarkdown, collectSkillTemplates, replacePythonCommandLiterals, resolveAllAsSkills, resolveBundledSkills, resolveSkillsNeutral, } from "./shared.js";
|
|
25
|
-
/**
|
|
26
|
-
* Command templates that become user-invocable dsh skills
|
|
27
|
-
* (loaded by their `trellis-<name>` skill names). The session-boundary
|
|
28
|
-
* commands are delivered as SKILL.md files in DSH's private project root.
|
|
29
|
-
*/
|
|
30
|
-
const DSH_COMMAND_SKILL_NAMES = new Set([
|
|
31
|
-
"trellis-start",
|
|
32
|
-
"trellis-continue",
|
|
33
|
-
"trellis-finish-work",
|
|
34
|
-
]);
|
|
35
|
-
/** Session-boundary commands resolved as dsh skills (dsh-private root, so
|
|
36
|
-
* platform-specific `{{CLI_FLAG}}` / `{{CMD_REF}}` resolution is correct). */
|
|
37
|
-
function resolveDshCommandSkills() {
|
|
38
|
-
const ctx = AI_TOOLS.dsh.templateContext;
|
|
39
|
-
return resolveAllAsSkills(ctx).filter((skill) => DSH_COMMAND_SKILL_NAMES.has(skill.name));
|
|
40
|
-
}
|
|
41
|
-
/** Trellis agent prompts as DSH-private skills. The `trellis-agent-*` names
|
|
42
|
-
* intentionally do not collide with shared main-session workflow skills such
|
|
43
|
-
* as `.agents/skills/trellis-check`. */
|
|
44
|
-
function resolveDshAgentSkills() {
|
|
45
|
-
return applyPullBasedPreludeMarkdown(getAllAgents()).map((agent) => {
|
|
46
|
-
const name = agent.name.replace(/^trellis-/, "trellis-agent-");
|
|
47
|
-
return {
|
|
48
|
-
...agent,
|
|
49
|
-
name,
|
|
50
|
-
content: replacePythonCommandLiterals(agent.content).replace(/^name:\s*trellis-[^\r\n]+$/m, `name: ${name}`),
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The DeepSeek Harness file set — written at init and diffed by `trellis update`.
|
|
56
|
-
*/
|
|
57
|
-
export function collectDshTemplates() {
|
|
58
|
-
const ctx = AI_TOOLS.dsh.templateContext;
|
|
59
|
-
const files = new Map();
|
|
60
|
-
// 1. Workflow + bundled skills → shared `.agents/skills/` (neutral
|
|
61
|
-
// rendering, byte-identical to Codex/Gemini/Pi/Kimi writes).
|
|
62
|
-
for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
|
|
63
|
-
files.set(filePath, content);
|
|
64
|
-
}
|
|
65
|
-
// 2. Commands-as-skills + Trellis agent prompts → `.dsh/skills/`.
|
|
66
|
-
for (const [filePath, content] of collectSkillTemplates(".dsh/skills", [
|
|
67
|
-
...resolveDshCommandSkills(),
|
|
68
|
-
...resolveDshAgentSkills(),
|
|
69
|
-
])) {
|
|
70
|
-
files.set(filePath, content);
|
|
71
|
-
}
|
|
72
|
-
// 3. Operator guide → `.dsh/DSH.md`.
|
|
73
|
-
files.set(".dsh/DSH.md", getDshGuide());
|
|
74
|
-
return files;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=dsh.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dsh.js","sourceRoot":"","sources":["../../src/configurators/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,eAAe;IACf,kBAAkB;IAClB,qBAAqB;CACtB,CAAC,CAAC;AAEH;+EAC+E;AAC/E,SAAS,uBAAuB;IAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC;IACzC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAC9C,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CACxC,CAAC;AACJ,CAAC;AAED;;yCAEyC;AACzC,SAAS,qBAAqB;IAC5B,OAAO,6BAA6B,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACjE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAC/D,OAAO;YACL,GAAG,KAAK;YACR,IAAI;YACJ,OAAO,EAAE,4BAA4B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAC1D,6BAA6B,EAC7B,SAAS,IAAI,EAAE,CAChB;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC;IACzC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,mEAAmE;IACnE,gEAAgE;IAChE,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,gBAAgB,EAChB,oBAAoB,CAAC,GAAG,CAAC,EACzB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,kEAAkE;IAClE,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CAAC,aAAa,EAAE;QACrE,GAAG,uBAAuB,EAAE;QAC5B,GAAG,qBAAqB,EAAE;KAC3B,CAAC,EAAE,CAAC;QACH,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,qCAAqC;IACrC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,CAAC,CAAC;IAExC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Gemini CLI file set — written at init and diffed by `trellis update`.
|
|
3
|
-
* Gemini is a pull-based class-2 platform.
|
|
4
|
-
* - commands/trellis/ — start + finish-work as TOML slash commands
|
|
5
|
-
* - .agents/skills/trellis-{name}/SKILL.md — auto-triggered shared skills
|
|
6
|
-
* written to the cross-platform `.agents/skills/` workspace alias (Gemini
|
|
7
|
-
* CLI 0.40+ reads it natively; previously `.gemini/skills/` was used,
|
|
8
|
-
* which collided with Codex's identical write target and caused
|
|
9
|
-
* duplicate-skill warnings — issue #224). The neutral resolver keeps content
|
|
10
|
-
* byte-identical to Codex's writes for the same skill names.
|
|
11
|
-
* - agents/{name}.md — sub-agent definitions, with pull-based prelude
|
|
12
|
-
* - hooks/*.py — session-start only (no inject-subagent-context.py — Gemini
|
|
13
|
-
* BeforeTool can fire but #18128 limits chain-of-thought visibility; sub-agents
|
|
14
|
-
* Read jsonl/prd themselves)
|
|
15
|
-
* - settings.json — hook configuration (SessionStart + BeforeAgent)
|
|
16
|
-
*/
|
|
17
|
-
export declare function collectGeminiTemplates(): Map<string, string>;
|
|
18
|
-
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/configurators/gemini.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAyB5D"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
2
|
-
import { resolvePlaceholders, resolveCommands, resolveSkillsNeutral, resolveBundledSkills, collectSkillTemplates, collectSharedHooks, applyPullBasedPreludeMarkdown, } from "./shared.js";
|
|
3
|
-
import { getAllAgents, getSettingsTemplate, } from "../templates/gemini/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* The Gemini CLI file set — written at init and diffed by `trellis update`.
|
|
6
|
-
* Gemini is a pull-based class-2 platform.
|
|
7
|
-
* - commands/trellis/ — start + finish-work as TOML slash commands
|
|
8
|
-
* - .agents/skills/trellis-{name}/SKILL.md — auto-triggered shared skills
|
|
9
|
-
* written to the cross-platform `.agents/skills/` workspace alias (Gemini
|
|
10
|
-
* CLI 0.40+ reads it natively; previously `.gemini/skills/` was used,
|
|
11
|
-
* which collided with Codex's identical write target and caused
|
|
12
|
-
* duplicate-skill warnings — issue #224). The neutral resolver keeps content
|
|
13
|
-
* byte-identical to Codex's writes for the same skill names.
|
|
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 function collectGeminiTemplates() {
|
|
21
|
-
const ctx = AI_TOOLS.gemini.templateContext;
|
|
22
|
-
const files = new Map();
|
|
23
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
24
|
-
const toml = `description = "Trellis: ${cmd.name}"\n\nprompt = """\n${cmd.content}\n"""\n`;
|
|
25
|
-
files.set(`.gemini/commands/trellis/${cmd.name}.toml`, toml);
|
|
26
|
-
}
|
|
27
|
-
for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
|
|
28
|
-
files.set(filePath, content);
|
|
29
|
-
}
|
|
30
|
-
for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
|
|
31
|
-
files.set(`.gemini/agents/${agent.name}.md`, agent.content);
|
|
32
|
-
}
|
|
33
|
-
for (const [k, v] of collectSharedHooks(".gemini/hooks", "gemini")) {
|
|
34
|
-
files.set(k, v);
|
|
35
|
-
}
|
|
36
|
-
files.set(".gemini/settings.json", resolvePlaceholders(getSettingsTemplate()));
|
|
37
|
-
return files;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=gemini.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/configurators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,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,KAAK,CAAC,GAAG,CACP,uBAAuB,EACvB,mBAAmB,CAAC,mBAAmB,EAAE,CAAC,CAC3C,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Grok Build configurator.
|
|
3
|
-
*
|
|
4
|
-
* Grok Build (xAI) is a pull-based class-2 platform (agentCapable, no hooks).
|
|
5
|
-
* Three output paths:
|
|
6
|
-
* - `.grok/skills/` — workflow and bundled skills
|
|
7
|
-
* - `.grok/commands/trellis-*.md` — flat slash commands (Grok layout)
|
|
8
|
-
* - `.grok/agents/` — sub-agent definitions with pull-based prelude
|
|
9
|
-
*
|
|
10
|
-
* Do not install SessionStart/UserPromptSubmit injection hooks here until Grok
|
|
11
|
-
* consumes hook stdout additionalContext (verified absent on 0.2.x).
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* The Grok Build file set — written at init and diffed by `trellis update`.
|
|
15
|
-
*/
|
|
16
|
-
export declare function collectGrokTemplates(): Map<string, string>;
|
|
17
|
-
//# sourceMappingURL=grok.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grok.d.ts","sourceRoot":"","sources":["../../src/configurators/grok.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA0B1D"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Grok Build configurator.
|
|
3
|
-
*
|
|
4
|
-
* Grok Build (xAI) is a pull-based class-2 platform (agentCapable, no hooks).
|
|
5
|
-
* Three output paths:
|
|
6
|
-
* - `.grok/skills/` — workflow and bundled skills
|
|
7
|
-
* - `.grok/commands/trellis-*.md` — flat slash commands (Grok layout)
|
|
8
|
-
* - `.grok/agents/` — sub-agent definitions with pull-based prelude
|
|
9
|
-
*
|
|
10
|
-
* Do not install SessionStart/UserPromptSubmit injection hooks here until Grok
|
|
11
|
-
* consumes hook stdout additionalContext (verified absent on 0.2.x).
|
|
12
|
-
*/
|
|
13
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
14
|
-
import { getAllAgents } from "../templates/grok/index.js";
|
|
15
|
-
import { collectSkillTemplates, resolveBundledSkills, resolveCommands, resolveSkills, applyPullBasedPreludeMarkdown, } from "./shared.js";
|
|
16
|
-
/**
|
|
17
|
-
* The Grok Build file set — written at init and diffed by `trellis update`.
|
|
18
|
-
*/
|
|
19
|
-
export function collectGrokTemplates() {
|
|
20
|
-
const config = AI_TOOLS.grok;
|
|
21
|
-
const ctx = config.templateContext;
|
|
22
|
-
const files = new Map();
|
|
23
|
-
// 1. Workflow + bundled skills → .grok/skills/
|
|
24
|
-
for (const [filePath, content] of collectSkillTemplates(".grok/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
|
|
25
|
-
files.set(filePath, content);
|
|
26
|
-
}
|
|
27
|
-
// 2. Commands → flat .grok/commands/trellis-<name>.md
|
|
28
|
-
// Grok discovers slash commands as flat *.md under commands/ (stem = name).
|
|
29
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
30
|
-
files.set(`.grok/commands/trellis-${cmd.name}.md`, cmd.content);
|
|
31
|
-
}
|
|
32
|
-
// 3. Sub-agents → .grok/agents/ (with pull-based prelude on implement/check)
|
|
33
|
-
for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
|
|
34
|
-
files.set(`.grok/agents/${agent.name}.md`, agent.content);
|
|
35
|
-
}
|
|
36
|
-
return files;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=grok.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grok.js","sourceRoot":"","sources":["../../src/configurators/grok.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,+CAA+C;IAC/C,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,cAAc,EACd,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;IAED,sDAAsD;IACtD,+EAA+E;IAC/E,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,KAAK,CAAC,GAAG,CAAC,0BAA0B,GAAG,CAAC,IAAI,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,6EAA6E;IAC7E,KAAK,MAAM,KAAK,IAAI,6BAA6B,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC;QAClE,KAAK,CAAC,GAAG,CAAC,gBAAgB,KAAK,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Kilo CLI file set — written at init and diffed by `trellis update`.
|
|
3
|
-
* - workflows/ — start + finish-work as slash commands
|
|
4
|
-
* - skills/trellis-{name}/SKILL.md — auto-triggered skills from `common/skills/`
|
|
5
|
-
*/
|
|
6
|
-
export declare function collectKiloTemplates(): Map<string, string>;
|
|
7
|
-
//# sourceMappingURL=kilo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kilo.d.ts","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1D"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
2
|
-
import { collectBothTemplates } from "./shared.js";
|
|
3
|
-
/**
|
|
4
|
-
* The Kilo CLI file set — written at init and diffed by `trellis update`.
|
|
5
|
-
* - workflows/ — start + finish-work as slash commands
|
|
6
|
-
* - skills/trellis-{name}/SKILL.md — auto-triggered skills from `common/skills/`
|
|
7
|
-
*/
|
|
8
|
-
export function collectKiloTemplates() {
|
|
9
|
-
return collectBothTemplates(AI_TOOLS.kilo.templateContext, (n) => `.kilocode/workflows/${n}.md`, ".kilocode/skills");
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=kilo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kilo.js","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,oBAAoB,CACzB,QAAQ,CAAC,IAAI,CAAC,eAAe,EAC7B,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EACpC,kBAAkB,CACnB,CAAC;AACJ,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kimi Code configurator.
|
|
3
|
-
*
|
|
4
|
-
* Kimi Code is a class-2 pull-based platform (agentCapable, no hooks, no
|
|
5
|
-
* project-level settings/extensions). Two output paths:
|
|
6
|
-
* - `.agents/skills/` — workflow + bundled skills, written via the NEUTRAL
|
|
7
|
-
* resolver so the files stay byte-identical to Codex/Gemini/Pi writes into
|
|
8
|
-
* the same shared root (Kimi discovers `.agents/skills/` natively).
|
|
9
|
-
* - `.kimi-code/skills/` — Kimi-private entry points: the user-invocable
|
|
10
|
-
* commands as skills (`/skill:trellis-start`, `/skill:trellis-continue`,
|
|
11
|
-
* `/skill:trellis-finish-work`) plus the Trellis agent prompts
|
|
12
|
-
* (trellis-implement / trellis-check / trellis-research) with the
|
|
13
|
-
* pull-based prelude on implement/check.
|
|
14
|
-
* - `.kimi-code/agents/` — the same Trellis agent prompts as project-level
|
|
15
|
-
* custom sub-agent definitions (Claude Code-compatible frontmatter), so
|
|
16
|
-
* the main session can dispatch `trellis-<name>` sub-agents directly.
|
|
17
|
-
*
|
|
18
|
-
* Trellis does not generate project-local Kimi settings or hooks.
|
|
19
|
-
* Project-local Kimi settings go in `.kimi-code/local.toml`; hooks are
|
|
20
|
-
* configured in `$KIMI_CODE_HOME/config.toml`.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* The Kimi Code file set — written at init and diffed by `trellis update`.
|
|
24
|
-
*/
|
|
25
|
-
export declare function collectKimiTemplates(): Map<string, string>;
|
|
26
|
-
//# sourceMappingURL=kimi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kimi.d.ts","sourceRoot":"","sources":["../../src/configurators/kimi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAuCH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAgC1D"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kimi Code configurator.
|
|
3
|
-
*
|
|
4
|
-
* Kimi Code is a class-2 pull-based platform (agentCapable, no hooks, no
|
|
5
|
-
* project-level settings/extensions). Two output paths:
|
|
6
|
-
* - `.agents/skills/` — workflow + bundled skills, written via the NEUTRAL
|
|
7
|
-
* resolver so the files stay byte-identical to Codex/Gemini/Pi writes into
|
|
8
|
-
* the same shared root (Kimi discovers `.agents/skills/` natively).
|
|
9
|
-
* - `.kimi-code/skills/` — Kimi-private entry points: the user-invocable
|
|
10
|
-
* commands as skills (`/skill:trellis-start`, `/skill:trellis-continue`,
|
|
11
|
-
* `/skill:trellis-finish-work`) plus the Trellis agent prompts
|
|
12
|
-
* (trellis-implement / trellis-check / trellis-research) with the
|
|
13
|
-
* pull-based prelude on implement/check.
|
|
14
|
-
* - `.kimi-code/agents/` — the same Trellis agent prompts as project-level
|
|
15
|
-
* custom sub-agent definitions (Claude Code-compatible frontmatter), so
|
|
16
|
-
* the main session can dispatch `trellis-<name>` sub-agents directly.
|
|
17
|
-
*
|
|
18
|
-
* Trellis does not generate project-local Kimi settings or hooks.
|
|
19
|
-
* Project-local Kimi settings go in `.kimi-code/local.toml`; hooks are
|
|
20
|
-
* configured in `$KIMI_CODE_HOME/config.toml`.
|
|
21
|
-
*/
|
|
22
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
23
|
-
import { getAllAgents } from "../templates/kimi/index.js";
|
|
24
|
-
import { applyPullBasedPreludeMarkdown, collectSkillTemplates, resolveAllAsSkills, resolveBundledSkills, resolveSkillsNeutral, } from "./shared.js";
|
|
25
|
-
/**
|
|
26
|
-
* Command templates that become user-invocable Kimi skills
|
|
27
|
-
* (`/skill:trellis-<name>`). Kimi has no slash-command mechanism besides
|
|
28
|
-
* skills, so the session-boundary commands are delivered as SKILL.md files.
|
|
29
|
-
*/
|
|
30
|
-
const KIMI_COMMAND_SKILL_NAMES = new Set([
|
|
31
|
-
"trellis-start",
|
|
32
|
-
"trellis-continue",
|
|
33
|
-
"trellis-finish-work",
|
|
34
|
-
]);
|
|
35
|
-
/** Session-boundary commands resolved as Kimi skills (Kimi-private root, so
|
|
36
|
-
* platform-specific `{{CLI_FLAG}}` / `{{CMD_REF}}` resolution is correct). */
|
|
37
|
-
function resolveKimiCommandSkills() {
|
|
38
|
-
const ctx = AI_TOOLS.kimi.templateContext;
|
|
39
|
-
return resolveAllAsSkills(ctx).filter((skill) => KIMI_COMMAND_SKILL_NAMES.has(skill.name));
|
|
40
|
-
}
|
|
41
|
-
/** Trellis agent prompts as Kimi skills (and `.kimi-code/agents/` sub-agent
|
|
42
|
-
* definitions), with the pull-based prelude on implement/check. */
|
|
43
|
-
function resolveKimiAgentSkills() {
|
|
44
|
-
return applyPullBasedPreludeMarkdown(getAllAgents());
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The Kimi Code file set — written at init and diffed by `trellis update`.
|
|
48
|
-
*/
|
|
49
|
-
export function collectKimiTemplates() {
|
|
50
|
-
const ctx = AI_TOOLS.kimi.templateContext;
|
|
51
|
-
const files = new Map();
|
|
52
|
-
// 1. Workflow + bundled skills → shared `.agents/skills/` (neutral
|
|
53
|
-
// rendering, byte-identical to Codex/Gemini/Pi writes).
|
|
54
|
-
for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
|
|
55
|
-
files.set(filePath, content);
|
|
56
|
-
}
|
|
57
|
-
// 2. Commands-as-skills + Trellis agent prompts → `.kimi-code/skills/`.
|
|
58
|
-
const agentPrompts = resolveKimiAgentSkills();
|
|
59
|
-
for (const [filePath, content] of collectSkillTemplates(".kimi-code/skills", [
|
|
60
|
-
...resolveKimiCommandSkills(),
|
|
61
|
-
...agentPrompts,
|
|
62
|
-
])) {
|
|
63
|
-
files.set(filePath, content);
|
|
64
|
-
}
|
|
65
|
-
// 3. Custom sub-agent definitions → `.kimi-code/agents/`. Kimi Code
|
|
66
|
-
// discovers project-level agents there (Claude Code-compatible
|
|
67
|
-
// frontmatter); content mirrors the skill copies, pull-based prelude
|
|
68
|
-
// included, so dispatching `trellis-<name>` directly behaves the same.
|
|
69
|
-
for (const agent of agentPrompts) {
|
|
70
|
-
files.set(`.kimi-code/agents/${agent.name}.md`, agent.content);
|
|
71
|
-
}
|
|
72
|
-
return files;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=kimi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kimi.js","sourceRoot":"","sources":["../../src/configurators/kimi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,eAAe;IACf,kBAAkB;IAClB,qBAAqB;CACtB,CAAC,CAAC;AAEH;+EAC+E;AAC/E,SAAS,wBAAwB;IAC/B,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;IAC1C,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAC9C,wBAAwB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CACzC,CAAC;AACJ,CAAC;AAED;oEACoE;AACpE,SAAS,sBAAsB;IAC7B,OAAO,6BAA6B,CAAC,YAAY,EAAE,CAAC,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,mEAAmE;IACnE,2DAA2D;IAC3D,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,gBAAgB,EAChB,oBAAoB,CAAC,GAAG,CAAC,EACzB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,wEAAwE;IACxE,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAC9C,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CAAC,mBAAmB,EAAE;QAC3E,GAAG,wBAAwB,EAAE;QAC7B,GAAG,YAAY;KAChB,CAAC,EAAE,CAAC;QACH,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,oEAAoE;IACpE,kEAAkE;IAClE,wEAAwE;IACxE,0EAA0E;IAC1E,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACjC,KAAK,CAAC,GAAG,CAAC,qBAAqB,KAAK,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Kiro Code file set — written at init and diffed by `trellis update`.
|
|
3
|
-
* Kiro's configDir is ".kiro/skills"; agents and hooks go under ".kiro/".
|
|
4
|
-
* - skills/trellis-{name}/SKILL.md — all templates as auto-triggered skills
|
|
5
|
-
* - agents/{name}.json — main `trellis` agent (per-turn workflow-state +
|
|
6
|
-
* session-start hooks) plus 3 sub-agents (agentSpawn → inject-subagent-context)
|
|
7
|
-
* - hooks/*.py — shared hook scripts (referenced by agent JSON / .kiro.hook)
|
|
8
|
-
* - hooks/*.kiro.hook — IDE hook definitions (promptSubmit → inject-workflow-state)
|
|
9
|
-
*/
|
|
10
|
-
export declare function collectKiroTemplates(): Map<string, string>;
|
|
11
|
-
//# sourceMappingURL=kiro.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kiro.d.ts","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAuB1D"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
2
|
-
import { resolvePlaceholders, resolveAllAsSkills, resolveBundledSkills, collectSkillTemplates, collectSharedHooks, } from "./shared.js";
|
|
3
|
-
import { getAllAgents, getIdeHooks } from "../templates/kiro/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* The Kiro Code file set — written at init and diffed by `trellis update`.
|
|
6
|
-
* Kiro's configDir is ".kiro/skills"; agents and hooks go under ".kiro/".
|
|
7
|
-
* - skills/trellis-{name}/SKILL.md — all templates as auto-triggered skills
|
|
8
|
-
* - agents/{name}.json — main `trellis` agent (per-turn workflow-state +
|
|
9
|
-
* session-start hooks) plus 3 sub-agents (agentSpawn → inject-subagent-context)
|
|
10
|
-
* - hooks/*.py — shared hook scripts (referenced by agent JSON / .kiro.hook)
|
|
11
|
-
* - hooks/*.kiro.hook — IDE hook definitions (promptSubmit → inject-workflow-state)
|
|
12
|
-
*/
|
|
13
|
-
export function collectKiroTemplates() {
|
|
14
|
-
const files = new Map();
|
|
15
|
-
const ctx = AI_TOOLS.kiro.templateContext;
|
|
16
|
-
for (const [filePath, content] of collectSkillTemplates(".kiro/skills", resolveAllAsSkills(ctx), resolveBundledSkills(ctx))) {
|
|
17
|
-
files.set(filePath, content);
|
|
18
|
-
}
|
|
19
|
-
for (const agent of getAllAgents()) {
|
|
20
|
-
files.set(`.kiro/agents/${agent.name}.json`, resolvePlaceholders(agent.content));
|
|
21
|
-
}
|
|
22
|
-
for (const [k, v] of collectSharedHooks(".kiro/hooks", "kiro")) {
|
|
23
|
-
files.set(k, v);
|
|
24
|
-
}
|
|
25
|
-
for (const hook of getIdeHooks()) {
|
|
26
|
-
files.set(`.kiro/hooks/${hook.name}`, resolvePlaceholders(hook.content));
|
|
27
|
-
}
|
|
28
|
-
return files;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=kiro.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;IAC1C,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,cAAc,EACd,kBAAkB,CAAC,GAAG,CAAC,EACvB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,EAAE,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,CACP,gBAAgB,KAAK,CAAC,IAAI,OAAO,EACjC,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CACnC,CAAC;IACJ,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,kBAAkB,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE,CAAC;QAC/D,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,EAAE,CAAC;QACjC,KAAK,CAAC,GAAG,CAAC,eAAe,IAAI,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"omp.d.ts","sourceRoot":"","sources":["../../src/configurators/omp.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCzD"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
2
|
-
import { collectSkillTemplates, replacePythonCommandLiterals, resolveCommands, resolveBundledSkills, resolveSkills, wrapWithOmpFrontmatter, } from "./shared.js";
|
|
3
|
-
import { getAllAgents, getExtensionTemplate } from "../templates/omp/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* The OMP file set — written at init and diffed by `trellis update`.
|
|
6
|
-
* OMP has no settings.json — the native provider auto-discovers all capabilities.
|
|
7
|
-
*/
|
|
8
|
-
export function collectOmpTemplates() {
|
|
9
|
-
const config = AI_TOOLS.omp;
|
|
10
|
-
const ctx = config.templateContext;
|
|
11
|
-
const files = new Map();
|
|
12
|
-
// Commands → .omp/commands/
|
|
13
|
-
for (const command of resolveCommands(ctx)) {
|
|
14
|
-
files.set(`.omp/commands/trellis-${command.name}.md`, wrapWithOmpFrontmatter(command.name, command.content));
|
|
15
|
-
}
|
|
16
|
-
// Skills → .omp/skills/
|
|
17
|
-
for (const [filePath, content] of collectSkillTemplates(".omp/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
|
|
18
|
-
files.set(filePath, content);
|
|
19
|
-
}
|
|
20
|
-
// Agents (class-1: no pull-based prelude)
|
|
21
|
-
for (const agent of getAllAgents()) {
|
|
22
|
-
files.set(`.omp/agents/${agent.name}.md`, agent.content);
|
|
23
|
-
}
|
|
24
|
-
// Extension
|
|
25
|
-
files.set(".omp/extensions/trellis/index.ts", replacePythonCommandLiterals(getExtensionTemplate()));
|
|
26
|
-
return files;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=omp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"omp.js","sourceRoot":"","sources":["../../src/configurators/omp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE/E;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC;IAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,4BAA4B;IAC5B,KAAK,MAAM,OAAO,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3C,KAAK,CAAC,GAAG,CACP,yBAAyB,OAAO,CAAC,IAAI,KAAK,EAC1C,sBAAsB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CACtD,CAAC;IACJ,CAAC;IAED,wBAAwB;IACxB,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,qBAAqB,CACrD,aAAa,EACb,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;IAED,0CAA0C;IAC1C,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,YAAY;IACZ,KAAK,CAAC,GAAG,CACP,kCAAkC,EAClC,4BAA4B,CAAC,oBAAoB,EAAE,CAAC,CACrD,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AA8EA;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAoB9D"}
|
|
@@ -1,84 +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 { getSharedHookScriptsForPlatform } from "../templates/shared-hooks/index.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
|
-
* The opencode file set — written at init and diffed by `trellis update`.
|
|
69
|
-
*/
|
|
70
|
-
export function collectOpenCodeTemplates() {
|
|
71
|
-
const files = walkOpenCodeTemplateDir();
|
|
72
|
-
for (const hook of getSharedHookScriptsForPlatform("opencode")) {
|
|
73
|
-
files.set(`.opencode/hooks/${hook.name}`, replacePythonCommandLiterals(hook.content));
|
|
74
|
-
}
|
|
75
|
-
const ctx = AI_TOOLS.opencode.templateContext;
|
|
76
|
-
for (const cmd of resolveCommands(ctx)) {
|
|
77
|
-
files.set(`.opencode/commands/trellis/${cmd.name}.md`, cmd.content);
|
|
78
|
-
}
|
|
79
|
-
for (const [filePath, content] of collectSkillTemplates(".opencode/skills", resolveSkills(ctx), resolveBundledSkills(ctx))) {
|
|
80
|
-
files.set(filePath, content);
|
|
81
|
-
}
|
|
82
|
-
return files;
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=opencode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,eAAe,EACf,aAAa,GACd,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,gBAAgB,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AAM,CAAC,CAiCxD"}
|
package/dist/configurators/pi.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
2
|
-
import { applyPullBasedPreludeMarkdown, collectSkillTemplates, resolveCommands, resolveBundledSkills, resolvePlaceholders, resolveSkillsNeutral, } from "./shared.js";
|
|
3
|
-
import { getAllAgents, getExtensionTemplate, getSettingsTemplate, } from "../templates/pi/index.js";
|
|
4
|
-
function resolvePiCommands() {
|
|
5
|
-
const ctx = AI_TOOLS.pi.templateContext;
|
|
6
|
-
const commands = resolveCommands(ctx);
|
|
7
|
-
if (commands.some((command) => command.name === "start"))
|
|
8
|
-
return commands;
|
|
9
|
-
// Pi has extension hooks, so the shared command resolver filters `start`.
|
|
10
|
-
// Keep a manual fallback because Pi's `session_start` event cannot mutate
|
|
11
|
-
// model context; the strong startup injection happens later at agent start.
|
|
12
|
-
const start = resolveCommands({ ...ctx, hasHooks: false }).find((command) => command.name === "start");
|
|
13
|
-
return start ? [start, ...commands] : commands;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The Pi file set — written at init and diffed by `trellis update`.
|
|
17
|
-
*/
|
|
18
|
-
export function collectPiTemplates() {
|
|
19
|
-
const files = new Map();
|
|
20
|
-
const ctx = AI_TOOLS.pi.templateContext;
|
|
21
|
-
for (const command of resolvePiCommands()) {
|
|
22
|
-
files.set(`.pi/prompts/trellis-${command.name}.md`, command.content);
|
|
23
|
-
}
|
|
24
|
-
// Shared skills go to `.agents/skills/` (Pi discovers this cross-platform
|
|
25
|
-
// workspace alias natively). Neutral resolver keeps content byte-identical
|
|
26
|
-
// to Codex's/Gemini's writes for the same skill names, avoiding the
|
|
27
|
-
// duplicate/conflicting-skill installs reported in #447.
|
|
28
|
-
for (const [filePath, content] of collectSkillTemplates(".agents/skills", resolveSkillsNeutral(ctx), resolveBundledSkills(ctx))) {
|
|
29
|
-
files.set(filePath, content);
|
|
30
|
-
}
|
|
31
|
-
for (const agent of applyPullBasedPreludeMarkdown(getAllAgents())) {
|
|
32
|
-
files.set(`.pi/agents/${agent.name}.md`, agent.content);
|
|
33
|
-
}
|
|
34
|
-
files.set(".pi/extensions/trellis/index.ts", getExtensionTemplate());
|
|
35
|
-
const settings = getSettingsTemplate();
|
|
36
|
-
files.set(`.pi/${settings.targetPath}`, resolvePlaceholders(settings.content));
|
|
37
|
-
return files;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=pi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pi.js","sourceRoot":"","sources":["../../src/configurators/pi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,SAAS,iBAAiB;IACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAC,eAAe,CAAC;IACxC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC;QAAE,OAAO,QAAQ,CAAC;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,4EAA4E;IAC5E,MAAM,KAAK,GAAG,eAAe,CAAC,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAC7D,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,CACtC,CAAC;IACF,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC,CA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