@pennixrv/trellis 0.6.17
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/LICENSE +235 -0
- package/README.md +168 -0
- package/bin/trellis.js +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +299 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/ablate.d.ts +14 -0
- package/dist/commands/ablate.d.ts.map +1 -0
- package/dist/commands/ablate.js +307 -0
- package/dist/commands/ablate.js.map +1 -0
- package/dist/commands/channel/adapters/claude.d.ts +53 -0
- package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
- package/dist/commands/channel/adapters/claude.js +225 -0
- package/dist/commands/channel/adapters/claude.js.map +1 -0
- package/dist/commands/channel/adapters/codex.d.ts +93 -0
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
- package/dist/commands/channel/adapters/codex.js +573 -0
- package/dist/commands/channel/adapters/codex.js.map +1 -0
- package/dist/commands/channel/adapters/index.d.ts +94 -0
- package/dist/commands/channel/adapters/index.d.ts.map +1 -0
- package/dist/commands/channel/adapters/index.js +116 -0
- package/dist/commands/channel/adapters/index.js.map +1 -0
- package/dist/commands/channel/adapters/types.d.ts +33 -0
- package/dist/commands/channel/adapters/types.d.ts.map +1 -0
- package/dist/commands/channel/adapters/types.js +2 -0
- package/dist/commands/channel/adapters/types.js.map +1 -0
- package/dist/commands/channel/agent-loader.d.ts +32 -0
- package/dist/commands/channel/agent-loader.d.ts.map +1 -0
- package/dist/commands/channel/agent-loader.js +158 -0
- package/dist/commands/channel/agent-loader.js.map +1 -0
- package/dist/commands/channel/context-loader.d.ts +26 -0
- package/dist/commands/channel/context-loader.d.ts.map +1 -0
- package/dist/commands/channel/context-loader.js +311 -0
- package/dist/commands/channel/context-loader.js.map +1 -0
- package/dist/commands/channel/context-trust.d.ts +31 -0
- package/dist/commands/channel/context-trust.d.ts.map +1 -0
- package/dist/commands/channel/context-trust.js +139 -0
- package/dist/commands/channel/context-trust.js.map +1 -0
- package/dist/commands/channel/context.d.ts +16 -0
- package/dist/commands/channel/context.d.ts.map +1 -0
- package/dist/commands/channel/context.js +83 -0
- package/dist/commands/channel/context.js.map +1 -0
- package/dist/commands/channel/create.d.ts +27 -0
- package/dist/commands/channel/create.d.ts.map +1 -0
- package/dist/commands/channel/create.js +39 -0
- package/dist/commands/channel/create.js.map +1 -0
- package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
- package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
- package/dist/commands/channel/dev-parse-trace.js +70 -0
- package/dist/commands/channel/dev-parse-trace.js.map +1 -0
- package/dist/commands/channel/guard.d.ts +150 -0
- package/dist/commands/channel/guard.d.ts.map +1 -0
- package/dist/commands/channel/guard.js +479 -0
- package/dist/commands/channel/guard.js.map +1 -0
- package/dist/commands/channel/index.d.ts +3 -0
- package/dist/commands/channel/index.d.ts.map +1 -0
- package/dist/commands/channel/index.js +535 -0
- package/dist/commands/channel/index.js.map +1 -0
- package/dist/commands/channel/interrupt.d.ts +10 -0
- package/dist/commands/channel/interrupt.d.ts.map +1 -0
- package/dist/commands/channel/interrupt.js +22 -0
- package/dist/commands/channel/interrupt.js.map +1 -0
- package/dist/commands/channel/kill.d.ts +7 -0
- package/dist/commands/channel/kill.d.ts.map +1 -0
- package/dist/commands/channel/kill.js +130 -0
- package/dist/commands/channel/kill.js.map +1 -0
- package/dist/commands/channel/list.d.ts +17 -0
- package/dist/commands/channel/list.d.ts.map +1 -0
- package/dist/commands/channel/list.js +233 -0
- package/dist/commands/channel/list.js.map +1 -0
- package/dist/commands/channel/messages.d.ts +15 -0
- package/dist/commands/channel/messages.d.ts.map +1 -0
- package/dist/commands/channel/messages.js +245 -0
- package/dist/commands/channel/messages.js.map +1 -0
- package/dist/commands/channel/rm.d.ts +27 -0
- package/dist/commands/channel/rm.d.ts.map +1 -0
- package/dist/commands/channel/rm.js +216 -0
- package/dist/commands/channel/rm.js.map +1 -0
- package/dist/commands/channel/run.d.ts +30 -0
- package/dist/commands/channel/run.d.ts.map +1 -0
- package/dist/commands/channel/run.js +134 -0
- package/dist/commands/channel/run.js.map +1 -0
- package/dist/commands/channel/send.d.ts +11 -0
- package/dist/commands/channel/send.d.ts.map +1 -0
- package/dist/commands/channel/send.js +24 -0
- package/dist/commands/channel/send.js.map +1 -0
- package/dist/commands/channel/spawn.d.ts +43 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -0
- package/dist/commands/channel/spawn.js +247 -0
- package/dist/commands/channel/spawn.js.map +1 -0
- package/dist/commands/channel/store/events.d.ts +22 -0
- package/dist/commands/channel/store/events.d.ts.map +1 -0
- package/dist/commands/channel/store/events.js +43 -0
- package/dist/commands/channel/store/events.js.map +1 -0
- package/dist/commands/channel/store/filter.d.ts +3 -0
- package/dist/commands/channel/store/filter.d.ts.map +1 -0
- package/dist/commands/channel/store/filter.js +2 -0
- package/dist/commands/channel/store/filter.js.map +1 -0
- package/dist/commands/channel/store/lock.d.ts +23 -0
- package/dist/commands/channel/store/lock.d.ts.map +1 -0
- package/dist/commands/channel/store/lock.js +99 -0
- package/dist/commands/channel/store/lock.js.map +1 -0
- package/dist/commands/channel/store/paths.d.ts +77 -0
- package/dist/commands/channel/store/paths.d.ts.map +1 -0
- package/dist/commands/channel/store/paths.js +272 -0
- package/dist/commands/channel/store/paths.js.map +1 -0
- package/dist/commands/channel/store/schema.d.ts +27 -0
- package/dist/commands/channel/store/schema.d.ts.map +1 -0
- package/dist/commands/channel/store/schema.js +34 -0
- package/dist/commands/channel/store/schema.js.map +1 -0
- package/dist/commands/channel/store/thread-state.d.ts +5 -0
- package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
- package/dist/commands/channel/store/thread-state.js +16 -0
- package/dist/commands/channel/store/thread-state.js.map +1 -0
- package/dist/commands/channel/store/watch.d.ts +19 -0
- package/dist/commands/channel/store/watch.d.ts.map +1 -0
- package/dist/commands/channel/store/watch.js +153 -0
- package/dist/commands/channel/store/watch.js.map +1 -0
- package/dist/commands/channel/supervisor/idle.d.ts +45 -0
- package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/idle.js +70 -0
- package/dist/commands/channel/supervisor/idle.js.map +1 -0
- package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
- package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/inbox.js +160 -0
- package/dist/commands/channel/supervisor/inbox.js.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.js +146 -0
- package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
- package/dist/commands/channel/supervisor/stdout.d.ts +71 -0
- package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/stdout.js +229 -0
- package/dist/commands/channel/supervisor/stdout.js.map +1 -0
- package/dist/commands/channel/supervisor/turns.d.ts +31 -0
- package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/turns.js +45 -0
- package/dist/commands/channel/supervisor/turns.js.map +1 -0
- package/dist/commands/channel/supervisor/warning.d.ts +48 -0
- package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/warning.js +77 -0
- package/dist/commands/channel/supervisor/warning.js.map +1 -0
- package/dist/commands/channel/supervisor.d.ts +91 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -0
- package/dist/commands/channel/supervisor.js +463 -0
- package/dist/commands/channel/supervisor.js.map +1 -0
- package/dist/commands/channel/text-body.d.ts +13 -0
- package/dist/commands/channel/text-body.d.ts.map +1 -0
- package/dist/commands/channel/text-body.js +47 -0
- package/dist/commands/channel/text-body.js.map +1 -0
- package/dist/commands/channel/threads.d.ts +39 -0
- package/dist/commands/channel/threads.d.ts.map +1 -0
- package/dist/commands/channel/threads.js +106 -0
- package/dist/commands/channel/threads.js.map +1 -0
- package/dist/commands/channel/title.d.ts +12 -0
- package/dist/commands/channel/title.d.ts.map +1 -0
- package/dist/commands/channel/title.js +24 -0
- package/dist/commands/channel/title.js.map +1 -0
- package/dist/commands/channel/wait.d.ts +17 -0
- package/dist/commands/channel/wait.d.ts.map +1 -0
- package/dist/commands/channel/wait.js +81 -0
- package/dist/commands/channel/wait.js.map +1 -0
- package/dist/commands/init.d.ts +71 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1603 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mem.d.ts +30 -0
- package/dist/commands/mem.d.ts.map +1 -0
- package/dist/commands/mem.js +423 -0
- package/dist/commands/mem.js.map +1 -0
- package/dist/commands/uninstall.d.ts +36 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +205 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +104 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +2163 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/upgrade.d.ts +28 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +84 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/workflow.d.ts +35 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +232 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/configurators/antigravity.d.ts +7 -0
- package/dist/configurators/antigravity.d.ts.map +1 -0
- package/dist/configurators/antigravity.js +11 -0
- package/dist/configurators/antigravity.js.map +1 -0
- package/dist/configurators/claude.d.ts +23 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +123 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/codebuddy.d.ts +10 -0
- package/dist/configurators/codebuddy.d.ts.map +1 -0
- package/dist/configurators/codebuddy.js +24 -0
- package/dist/configurators/codebuddy.js.map +1 -0
- package/dist/configurators/codex.d.ts +57 -0
- package/dist/configurators/codex.d.ts.map +1 -0
- package/dist/configurators/codex.js +170 -0
- package/dist/configurators/codex.js.map +1 -0
- package/dist/configurators/copilot.d.ts +14 -0
- package/dist/configurators/copilot.d.ts.map +1 -0
- package/dist/configurators/copilot.js +46 -0
- package/dist/configurators/copilot.js.map +1 -0
- package/dist/configurators/cursor.d.ts +10 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +23 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/devin.d.ts +8 -0
- package/dist/configurators/devin.d.ts.map +1 -0
- package/dist/configurators/devin.js +12 -0
- package/dist/configurators/devin.js.map +1 -0
- package/dist/configurators/droid.d.ts +10 -0
- package/dist/configurators/droid.d.ts.map +1 -0
- package/dist/configurators/droid.js +24 -0
- package/dist/configurators/droid.js.map +1 -0
- package/dist/configurators/dsh.d.ts +29 -0
- package/dist/configurators/dsh.d.ts.map +1 -0
- package/dist/configurators/dsh.js +64 -0
- package/dist/configurators/dsh.js.map +1 -0
- package/dist/configurators/gemini.d.ts +18 -0
- package/dist/configurators/gemini.d.ts.map +1 -0
- package/dist/configurators/gemini.js +39 -0
- package/dist/configurators/gemini.js.map +1 -0
- package/dist/configurators/grok.d.ts +17 -0
- package/dist/configurators/grok.d.ts.map +1 -0
- package/dist/configurators/grok.js +38 -0
- package/dist/configurators/grok.js.map +1 -0
- package/dist/configurators/index.d.ts +68 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +191 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/kilo.d.ts +7 -0
- package/dist/configurators/kilo.d.ts.map +1 -0
- package/dist/configurators/kilo.js +11 -0
- package/dist/configurators/kilo.js.map +1 -0
- package/dist/configurators/kimi.d.ts +26 -0
- package/dist/configurators/kimi.d.ts.map +1 -0
- package/dist/configurators/kimi.js +74 -0
- package/dist/configurators/kimi.js.map +1 -0
- package/dist/configurators/kiro.d.ts +11 -0
- package/dist/configurators/kiro.d.ts.map +1 -0
- package/dist/configurators/kiro.js +30 -0
- package/dist/configurators/kiro.js.map +1 -0
- package/dist/configurators/omp.d.ts +6 -0
- package/dist/configurators/omp.d.ts.map +1 -0
- package/dist/configurators/omp.js +28 -0
- package/dist/configurators/omp.js.map +1 -0
- package/dist/configurators/opencode.d.ts +5 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +80 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/configurators/pi.d.ts +5 -0
- package/dist/configurators/pi.d.ts.map +1 -0
- package/dist/configurators/pi.js +39 -0
- package/dist/configurators/pi.js.map +1 -0
- package/dist/configurators/qoder.d.ts +12 -0
- package/dist/configurators/qoder.d.ts.map +1 -0
- package/dist/configurators/qoder.js +30 -0
- package/dist/configurators/qoder.js.map +1 -0
- package/dist/configurators/reasonix.d.ts +17 -0
- package/dist/configurators/reasonix.d.ts.map +1 -0
- package/dist/configurators/reasonix.js +37 -0
- package/dist/configurators/reasonix.js.map +1 -0
- package/dist/configurators/shared.d.ts +187 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +589 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/snow.d.ts +25 -0
- package/dist/configurators/snow.d.ts.map +1 -0
- package/dist/configurators/snow.js +69 -0
- package/dist/configurators/snow.js.map +1 -0
- package/dist/configurators/trae.d.ts +16 -0
- package/dist/configurators/trae.d.ts.map +1 -0
- package/dist/configurators/trae.js +34 -0
- package/dist/configurators/trae.js.map +1 -0
- package/dist/configurators/workflow.d.ts +51 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +210 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/configurators/zcode.d.ts +25 -0
- package/dist/configurators/zcode.d.ts.map +1 -0
- package/dist/configurators/zcode.js +67 -0
- package/dist/configurators/zcode.js.map +1 -0
- package/dist/constants/paths.d.ts +74 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +83 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +62 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +187 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.9.json +30 -0
- package/dist/migrations/manifests/0.2.0.json +49 -0
- package/dist/migrations/manifests/0.2.12.json +9 -0
- package/dist/migrations/manifests/0.2.13.json +9 -0
- package/dist/migrations/manifests/0.2.14.json +175 -0
- package/dist/migrations/manifests/0.2.15.json +33 -0
- package/dist/migrations/manifests/0.3.0-beta.0.json +297 -0
- package/dist/migrations/manifests/0.3.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.7.json +11 -0
- package/dist/migrations/manifests/0.3.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.6.json +9 -0
- package/dist/migrations/manifests/0.3.0.json +11 -0
- package/dist/migrations/manifests/0.3.1.json +9 -0
- package/dist/migrations/manifests/0.3.10.json +9 -0
- package/dist/migrations/manifests/0.3.2.json +9 -0
- package/dist/migrations/manifests/0.3.3.json +9 -0
- package/dist/migrations/manifests/0.3.4.json +21 -0
- package/dist/migrations/manifests/0.3.5.json +9 -0
- package/dist/migrations/manifests/0.3.6.json +9 -0
- package/dist/migrations/manifests/0.3.7.json +9 -0
- package/dist/migrations/manifests/0.3.8.json +9 -0
- package/dist/migrations/manifests/0.3.9.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.1.json +228 -0
- package/dist/migrations/manifests/0.4.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.8.json +34 -0
- package/dist/migrations/manifests/0.4.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.4.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.4.0-rc.1.json +9 -0
- package/dist/migrations/manifests/0.4.0.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.0.json +1646 -0
- package/dist/migrations/manifests/0.5.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.15.json +116 -0
- package/dist/migrations/manifests/0.5.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.18.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.5.json +222 -0
- package/dist/migrations/manifests/0.5.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.9.json +48 -0
- package/dist/migrations/manifests/0.5.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.1.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.2.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.3.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.4.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.5.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.6.json +9 -0
- package/dist/migrations/manifests/0.5.0-rc.7.json +9 -0
- package/dist/migrations/manifests/0.5.0.json +9 -0
- package/dist/migrations/manifests/0.5.1.json +9 -0
- package/dist/migrations/manifests/0.5.10.json +9 -0
- package/dist/migrations/manifests/0.5.11.json +16 -0
- package/dist/migrations/manifests/0.5.12.json +9 -0
- package/dist/migrations/manifests/0.5.13.json +9 -0
- package/dist/migrations/manifests/0.5.14.json +9 -0
- package/dist/migrations/manifests/0.5.15.json +9 -0
- package/dist/migrations/manifests/0.5.16.json +9 -0
- package/dist/migrations/manifests/0.5.17.json +9 -0
- package/dist/migrations/manifests/0.5.18.json +9 -0
- package/dist/migrations/manifests/0.5.19.json +9 -0
- package/dist/migrations/manifests/0.5.2.json +9 -0
- package/dist/migrations/manifests/0.5.3.json +9 -0
- package/dist/migrations/manifests/0.5.4.json +9 -0
- package/dist/migrations/manifests/0.5.5.json +9 -0
- package/dist/migrations/manifests/0.5.6.json +9 -0
- package/dist/migrations/manifests/0.5.7.json +16 -0
- package/dist/migrations/manifests/0.5.8.json +9 -0
- package/dist/migrations/manifests/0.5.9.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.0.json +16 -0
- package/dist/migrations/manifests/0.6.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.18.json +16 -0
- package/dist/migrations/manifests/0.6.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.20.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.21.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.22.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.23.json +88 -0
- package/dist/migrations/manifests/0.6.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.6.json +16 -0
- package/dist/migrations/manifests/0.6.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.6.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.6.0.json +1 -0
- package/dist/migrations/manifests/0.6.1.json +9 -0
- package/dist/migrations/manifests/0.6.10.json +9 -0
- package/dist/migrations/manifests/0.6.11.json +9 -0
- package/dist/migrations/manifests/0.6.12.json +9 -0
- package/dist/migrations/manifests/0.6.13.json +9 -0
- package/dist/migrations/manifests/0.6.14.json +9 -0
- package/dist/migrations/manifests/0.6.15.json +9 -0
- package/dist/migrations/manifests/0.6.16.json +9 -0
- package/dist/migrations/manifests/0.6.17.json +9 -0
- package/dist/migrations/manifests/0.6.2.json +9 -0
- package/dist/migrations/manifests/0.6.3.json +24 -0
- package/dist/migrations/manifests/0.6.4.json +9 -0
- package/dist/migrations/manifests/0.6.5.json +9 -0
- package/dist/migrations/manifests/0.6.6.json +17 -0
- package/dist/migrations/manifests/0.6.7.json +9 -0
- package/dist/migrations/manifests/0.6.8.json +17 -0
- package/dist/migrations/manifests/0.6.9.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.0.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.3.json +9 -0
- package/dist/templates/claude/agents/trellis-check.md +115 -0
- package/dist/templates/claude/agents/trellis-implement.md +110 -0
- package/dist/templates/claude/agents/trellis-research.md +137 -0
- package/dist/templates/claude/hooks/statusline.py +332 -0
- package/dist/templates/claude/index.d.ts +31 -0
- package/dist/templates/claude/index.d.ts.map +1 -0
- package/dist/templates/claude/index.js +57 -0
- package/dist/templates/claude/index.js.map +1 -0
- package/dist/templates/claude/settings.json +73 -0
- package/dist/templates/codebuddy/agents/trellis-check.md +115 -0
- package/dist/templates/codebuddy/agents/trellis-implement.md +110 -0
- package/dist/templates/codebuddy/agents/trellis-research.md +137 -0
- package/dist/templates/codebuddy/index.d.ts +15 -0
- package/dist/templates/codebuddy/index.d.ts.map +1 -0
- package/dist/templates/codebuddy/index.js +15 -0
- package/dist/templates/codebuddy/index.js.map +1 -0
- package/dist/templates/codebuddy/settings.json +69 -0
- package/dist/templates/codex/agents/trellis-check.toml +56 -0
- package/dist/templates/codex/agents/trellis-implement.toml +37 -0
- package/dist/templates/codex/agents/trellis-research.toml +78 -0
- package/dist/templates/codex/config.toml +39 -0
- package/dist/templates/codex/hooks/session-start.py +552 -0
- package/dist/templates/codex/hooks.json +27 -0
- package/dist/templates/codex/index.d.ts +35 -0
- package/dist/templates/codex/index.d.ts.map +1 -0
- package/dist/templates/codex/index.js +67 -0
- package/dist/templates/codex/index.js.map +1 -0
- package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +67 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +480 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +233 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +226 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +276 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +128 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +85 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +56 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +84 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +57 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +123 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +90 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +65 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +55 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +159 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +68 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +80 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +69 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +51 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +102 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +130 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +75 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workspace-memory.md +71 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +72 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +59 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +112 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +86 -0
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +81 -0
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +65 -0
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +93 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/SKILL.md +41 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/mcp-setup.md +90 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/repository-analysis.md +59 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +61 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-writing.md +70 -0
- package/dist/templates/common/commands/continue.md +56 -0
- package/dist/templates/common/commands/finish-work.md +66 -0
- package/dist/templates/common/commands/start.md +59 -0
- package/dist/templates/common/index.d.ts +48 -0
- package/dist/templates/common/index.d.ts.map +1 -0
- package/dist/templates/common/index.js +104 -0
- package/dist/templates/common/index.js.map +1 -0
- package/dist/templates/common/skills/before-dev.md +46 -0
- package/dist/templates/common/skills/brainstorm.md +195 -0
- package/dist/templates/common/skills/break-loop.md +184 -0
- package/dist/templates/common/skills/check.md +106 -0
- package/dist/templates/common/skills/update-spec.md +351 -0
- package/dist/templates/copilot/copilot-instructions.md +11 -0
- package/dist/templates/copilot/hooks/session-start.py +548 -0
- package/dist/templates/copilot/hooks.json +19 -0
- package/dist/templates/copilot/index.d.ts +28 -0
- package/dist/templates/copilot/index.d.ts.map +1 -0
- package/dist/templates/copilot/index.js +61 -0
- package/dist/templates/copilot/index.js.map +1 -0
- package/dist/templates/copilot/prompts/before-dev.prompt.md +39 -0
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +156 -0
- package/dist/templates/copilot/prompts/break-loop.prompt.md +129 -0
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +170 -0
- package/dist/templates/copilot/prompts/check.prompt.md +110 -0
- package/dist/templates/copilot/prompts/create-command.prompt.md +116 -0
- package/dist/templates/copilot/prompts/finish-work.prompt.md +99 -0
- package/dist/templates/copilot/prompts/integrate-skill.prompt.md +223 -0
- package/dist/templates/copilot/prompts/onboard.prompt.md +362 -0
- package/dist/templates/copilot/prompts/parallel.prompt.md +204 -0
- package/dist/templates/copilot/prompts/record-session.prompt.md +66 -0
- package/dist/templates/copilot/prompts/start.prompt.md +63 -0
- package/dist/templates/copilot/prompts/update-spec.prompt.md +358 -0
- package/dist/templates/cursor/agents/trellis-check.md +114 -0
- package/dist/templates/cursor/agents/trellis-implement.md +109 -0
- package/dist/templates/cursor/agents/trellis-research.md +136 -0
- package/dist/templates/cursor/hooks.json +24 -0
- package/dist/templates/cursor/index.d.ts +13 -0
- package/dist/templates/cursor/index.d.ts.map +1 -0
- package/dist/templates/cursor/index.js +13 -0
- package/dist/templates/cursor/index.js.map +1 -0
- package/dist/templates/droid/droids/trellis-check.md +107 -0
- package/dist/templates/droid/droids/trellis-implement.md +102 -0
- package/dist/templates/droid/droids/trellis-research.md +137 -0
- package/dist/templates/droid/index.d.ts +15 -0
- package/dist/templates/droid/index.d.ts.map +1 -0
- package/dist/templates/droid/index.js +15 -0
- package/dist/templates/droid/index.js.map +1 -0
- package/dist/templates/droid/settings.json +69 -0
- package/dist/templates/dsh/DSH.md +56 -0
- package/dist/templates/dsh/index.d.ts +21 -0
- package/dist/templates/dsh/index.d.ts.map +1 -0
- package/dist/templates/dsh/index.js +25 -0
- package/dist/templates/dsh/index.js.map +1 -0
- package/dist/templates/extract.d.ts +40 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +106 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/gemini/agents/trellis-check.md +107 -0
- package/dist/templates/gemini/agents/trellis-implement.md +102 -0
- package/dist/templates/gemini/agents/trellis-research.md +136 -0
- package/dist/templates/gemini/index.d.ts +13 -0
- package/dist/templates/gemini/index.d.ts.map +1 -0
- package/dist/templates/gemini/index.js +13 -0
- package/dist/templates/gemini/index.js.map +1 -0
- package/dist/templates/gemini/settings.json +40 -0
- package/dist/templates/grok/agents/trellis-check.md +105 -0
- package/dist/templates/grok/agents/trellis-implement.md +116 -0
- package/dist/templates/grok/agents/trellis-research.md +146 -0
- package/dist/templates/grok/index.d.ts +16 -0
- package/dist/templates/grok/index.d.ts.map +1 -0
- package/dist/templates/grok/index.js +19 -0
- package/dist/templates/grok/index.js.map +1 -0
- package/dist/templates/kimi/agents/trellis-check.md +103 -0
- package/dist/templates/kimi/agents/trellis-implement.md +115 -0
- package/dist/templates/kimi/agents/trellis-research.md +144 -0
- package/dist/templates/kimi/index.d.ts +20 -0
- package/dist/templates/kimi/index.d.ts.map +1 -0
- package/dist/templates/kimi/index.js +23 -0
- package/dist/templates/kimi/index.js.map +1 -0
- package/dist/templates/kiro/agents/trellis-check.json +26 -0
- package/dist/templates/kiro/agents/trellis-implement.json +26 -0
- package/dist/templates/kiro/agents/trellis-research.json +30 -0
- package/dist/templates/kiro/agents/trellis.json +34 -0
- package/dist/templates/kiro/hooks/trellis-workflow-state.kiro.hook +14 -0
- package/dist/templates/kiro/index.d.ts +32 -0
- package/dist/templates/kiro/index.d.ts.map +1 -0
- package/dist/templates/kiro/index.js +28 -0
- package/dist/templates/kiro/index.js.map +1 -0
- package/dist/templates/markdown/agents.md +21 -0
- package/dist/templates/markdown/gitignore.txt +15 -0
- package/dist/templates/markdown/index.d.ts +27 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +52 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +223 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +327 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +633 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +97 -0
- package/dist/templates/markdown/workspace-index.md +125 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/omp/agents/trellis-check.md +41 -0
- package/dist/templates/omp/agents/trellis-implement.md +45 -0
- package/dist/templates/omp/agents/trellis-research.md +30 -0
- package/dist/templates/omp/extensions/trellis/index.ts.txt +1105 -0
- package/dist/templates/omp/index.d.ts +4 -0
- package/dist/templates/omp/index.d.ts.map +1 -0
- package/dist/templates/omp/index.js +9 -0
- package/dist/templates/omp/index.js.map +1 -0
- package/dist/templates/opencode/agents/trellis-check.md +122 -0
- package/dist/templates/opencode/agents/trellis-implement.md +118 -0
- package/dist/templates/opencode/agents/trellis-research.md +145 -0
- package/dist/templates/opencode/lib/context-visibility.js +148 -0
- package/dist/templates/opencode/lib/session-utils.js +527 -0
- package/dist/templates/opencode/lib/trellis-context.js +627 -0
- package/dist/templates/opencode/package.json +5 -0
- package/dist/templates/opencode/plugins/inject-subagent-context.js +569 -0
- package/dist/templates/opencode/plugins/inject-workflow-state.js +240 -0
- package/dist/templates/opencode/plugins/session-start.js +65 -0
- package/dist/templates/pi/agents/trellis-check.md +37 -0
- package/dist/templates/pi/agents/trellis-implement.md +42 -0
- package/dist/templates/pi/agents/trellis-research.md +25 -0
- package/dist/templates/pi/extensions/trellis/index.ts.txt +2027 -0
- package/dist/templates/pi/index.d.ts +5 -0
- package/dist/templates/pi/index.d.ts.map +1 -0
- package/dist/templates/pi/index.js +12 -0
- package/dist/templates/pi/index.js.map +1 -0
- package/dist/templates/pi/settings.json +9 -0
- package/dist/templates/qoder/agents/trellis-check.md +108 -0
- package/dist/templates/qoder/agents/trellis-implement.md +103 -0
- package/dist/templates/qoder/agents/trellis-research.md +137 -0
- package/dist/templates/qoder/index.d.ts +15 -0
- package/dist/templates/qoder/index.d.ts.map +1 -0
- package/dist/templates/qoder/index.js +15 -0
- package/dist/templates/qoder/index.js.map +1 -0
- package/dist/templates/qoder/settings.json +59 -0
- package/dist/templates/reasonix/agents/trellis-check.md +36 -0
- package/dist/templates/reasonix/agents/trellis-implement.md +41 -0
- package/dist/templates/reasonix/index.d.ts +13 -0
- package/dist/templates/reasonix/index.d.ts.map +1 -0
- package/dist/templates/reasonix/index.js +16 -0
- package/dist/templates/reasonix/index.js.map +1 -0
- package/dist/templates/shared-hooks/index.d.ts +77 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -0
- package/dist/templates/shared-hooks/index.js +140 -0
- package/dist/templates/shared-hooks/index.js.map +1 -0
- package/dist/templates/shared-hooks/inject-shell-session-context.py +292 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +1212 -0
- package/dist/templates/shared-hooks/inject-workflow-state.py +488 -0
- package/dist/templates/shared-hooks/session-start.py +949 -0
- package/dist/templates/snow/SNOW.md +86 -0
- package/dist/templates/snow/agents/trellis-check.md +135 -0
- package/dist/templates/snow/agents/trellis-implement.md +153 -0
- package/dist/templates/snow/agents/trellis-research.md +114 -0
- package/dist/templates/snow/hooks/beforeSubAgentStart.json +15 -0
- package/dist/templates/snow/hooks/onSessionStart.json +15 -0
- package/dist/templates/snow/hooks/onUserMessage.json +15 -0
- package/dist/templates/snow/hooks/write-trellis-context.py +644 -0
- package/dist/templates/snow/index.d.ts +26 -0
- package/dist/templates/snow/index.d.ts.map +1 -0
- package/dist/templates/snow/index.js +36 -0
- package/dist/templates/snow/index.js.map +1 -0
- package/dist/templates/template-utils.d.ts +26 -0
- package/dist/templates/template-utils.d.ts.map +1 -0
- package/dist/templates/template-utils.js +64 -0
- package/dist/templates/template-utils.js.map +1 -0
- package/dist/templates/trae/agents/trellis-check.md +108 -0
- package/dist/templates/trae/agents/trellis-implement.md +103 -0
- package/dist/templates/trae/agents/trellis-research.md +137 -0
- package/dist/templates/trae/hooks.json +39 -0
- package/dist/templates/trae/index.d.ts +15 -0
- package/dist/templates/trae/index.d.ts.map +1 -0
- package/dist/templates/trae/index.js +15 -0
- package/dist/templates/trae/index.js.map +1 -0
- package/dist/templates/trellis/agents/check.md +70 -0
- package/dist/templates/trellis/agents/implement.md +71 -0
- package/dist/templates/trellis/config.yaml +158 -0
- package/dist/templates/trellis/gitattributes.txt +9 -0
- package/dist/templates/trellis/gitignore.txt +32 -0
- package/dist/templates/trellis/index.d.ts +67 -0
- package/dist/templates/trellis/index.d.ts.map +1 -0
- package/dist/templates/trellis/index.js +121 -0
- package/dist/templates/trellis/index.js.map +1 -0
- package/dist/templates/trellis/scripts/__init__.py +5 -0
- package/dist/templates/trellis/scripts/add_session.py +1545 -0
- package/dist/templates/trellis/scripts/common/__init__.py +94 -0
- package/dist/templates/trellis/scripts/common/active_task.py +857 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +950 -0
- package/dist/templates/trellis/scripts/common/config.py +482 -0
- package/dist/templates/trellis/scripts/common/developer.py +192 -0
- package/dist/templates/trellis/scripts/common/git.py +203 -0
- package/dist/templates/trellis/scripts/common/git_context.py +106 -0
- package/dist/templates/trellis/scripts/common/io.py +160 -0
- package/dist/templates/trellis/scripts/common/log.py +45 -0
- package/dist/templates/trellis/scripts/common/packages_context.py +238 -0
- package/dist/templates/trellis/scripts/common/paths.py +543 -0
- package/dist/templates/trellis/scripts/common/safe_commit.py +322 -0
- package/dist/templates/trellis/scripts/common/session_context.py +892 -0
- package/dist/templates/trellis/scripts/common/task_context.py +470 -0
- package/dist/templates/trellis/scripts/common/task_queue.py +188 -0
- package/dist/templates/trellis/scripts/common/task_store.py +1874 -0
- package/dist/templates/trellis/scripts/common/task_utils.py +498 -0
- package/dist/templates/trellis/scripts/common/tasks.py +122 -0
- package/dist/templates/trellis/scripts/common/trellis_config.py +239 -0
- package/dist/templates/trellis/scripts/common/types.py +110 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +242 -0
- package/dist/templates/trellis/scripts/get_context.py +16 -0
- package/dist/templates/trellis/scripts/get_developer.py +26 -0
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +243 -0
- package/dist/templates/trellis/scripts/init_developer.py +51 -0
- package/dist/templates/trellis/scripts/task.py +801 -0
- package/dist/templates/trellis/tasks/.gitkeep +0 -0
- package/dist/templates/trellis/workflow.md +721 -0
- package/dist/templates/zcode/agents/trellis-check.md +109 -0
- package/dist/templates/zcode/agents/trellis-implement.md +111 -0
- package/dist/templates/zcode/agents/trellis-research.md +133 -0
- package/dist/templates/zcode/config.json +52 -0
- package/dist/templates/zcode/index.d.ts +25 -0
- package/dist/templates/zcode/index.d.ts.map +1 -0
- package/dist/templates/zcode/index.js +29 -0
- package/dist/templates/zcode/index.js.map +1 -0
- package/dist/types/ai-tools.d.ts +105 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +502 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +125 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/ablation-store.d.ts +123 -0
- package/dist/utils/ablation-store.d.ts.map +1 -0
- package/dist/utils/ablation-store.js +749 -0
- package/dist/utils/ablation-store.js.map +1 -0
- package/dist/utils/agent-refs.d.ts +31 -0
- package/dist/utils/agent-refs.d.ts.map +1 -0
- package/dist/utils/agent-refs.js +63 -0
- package/dist/utils/agent-refs.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/atomic-write.js +30 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +86 -0
- package/dist/utils/compare-versions.js.map +1 -0
- package/dist/utils/cwd-guard.d.ts +38 -0
- package/dist/utils/cwd-guard.d.ts.map +1 -0
- package/dist/utils/cwd-guard.js +62 -0
- package/dist/utils/cwd-guard.js.map +1 -0
- package/dist/utils/file-writer.d.ts +36 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +204 -0
- package/dist/utils/file-writer.js.map +1 -0
- package/dist/utils/managed-paths.d.ts +5 -0
- package/dist/utils/managed-paths.d.ts.map +1 -0
- package/dist/utils/managed-paths.js +51 -0
- package/dist/utils/managed-paths.js.map +1 -0
- package/dist/utils/managed-removal.d.ts +74 -0
- package/dist/utils/managed-removal.d.ts.map +1 -0
- package/dist/utils/managed-removal.js +270 -0
- package/dist/utils/managed-removal.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts +61 -0
- package/dist/utils/manifest-prune.d.ts.map +1 -0
- package/dist/utils/manifest-prune.js +135 -0
- package/dist/utils/manifest-prune.js.map +1 -0
- package/dist/utils/posix.d.ts +13 -0
- package/dist/utils/posix.d.ts.map +1 -0
- package/dist/utils/posix.js +15 -0
- package/dist/utils/posix.js.map +1 -0
- package/dist/utils/project-detector.d.ts +46 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +666 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/proxy.d.ts +25 -0
- package/dist/utils/proxy.d.ts.map +1 -0
- package/dist/utils/proxy.js +60 -0
- package/dist/utils/proxy.js.map +1 -0
- package/dist/utils/registry-config.d.ts +7 -0
- package/dist/utils/registry-config.d.ts.map +1 -0
- package/dist/utils/registry-config.js +172 -0
- package/dist/utils/registry-config.js.map +1 -0
- package/dist/utils/task-json.d.ts +13 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +12 -0
- package/dist/utils/task-json.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +161 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +994 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +127 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +335 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts +66 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -0
- package/dist/utils/uninstall-scrubbers.js +417 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +86 -0
- package/dist/utils/workflow-resolver.d.ts.map +1 -0
- package/dist/utils/workflow-resolver.js +265 -0
- package/dist/utils/workflow-resolver.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Trellis configuration reader.
|
|
4
|
+
|
|
5
|
+
Reads settings from .trellis/config.yaml with sensible defaults.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
from .paths import DIR_WORKFLOW, get_repo_root
|
|
14
|
+
from .trellis_config import parse_simple_yaml
|
|
15
|
+
|
|
16
|
+
# The YAML subset parser lives in trellis_config.py — it imports nothing from
|
|
17
|
+
# this package, so hooks can load it as a single standalone file. Two byte-
|
|
18
|
+
# equivalent copies is a drift hazard, not a feature.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# Defaults
|
|
22
|
+
DEFAULT_SESSION_COMMIT_MESSAGE = "chore: record journal"
|
|
23
|
+
DEFAULT_MAX_JOURNAL_LINES = 2000
|
|
24
|
+
DEFAULT_SESSION_AUTO_COMMIT = True
|
|
25
|
+
DEFAULT_CODEX_DISPATCH_MODE = "auto"
|
|
26
|
+
|
|
27
|
+
CONFIG_FILE = "config.yaml"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
TRUE_CONFIG_VALUES = ("true", "yes", "1", "on")
|
|
31
|
+
FALSE_CONFIG_VALUES = ("false", "no", "0", "off")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def coerce_config_bool(
|
|
35
|
+
value: object,
|
|
36
|
+
default: bool,
|
|
37
|
+
label: str,
|
|
38
|
+
) -> bool:
|
|
39
|
+
"""Coerce a config value to a bool, warning on anything unrecognized.
|
|
40
|
+
|
|
41
|
+
The parser stores every value as a string, so ``git: yes`` arrives as
|
|
42
|
+
``"yes"``. Every boolean config key goes through this one helper: an
|
|
43
|
+
accepted-here/rejected-there split means a user writing a perfectly
|
|
44
|
+
reasonable YAML boolean silently gets the opposite branch.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
value: Raw value from the parsed config.
|
|
48
|
+
default: Returned when the value is unrecognized.
|
|
49
|
+
label: Config key name, used in the warning.
|
|
50
|
+
"""
|
|
51
|
+
if isinstance(value, bool):
|
|
52
|
+
return value
|
|
53
|
+
s = str(value).strip().lower()
|
|
54
|
+
if s in TRUE_CONFIG_VALUES:
|
|
55
|
+
return True
|
|
56
|
+
if s in FALSE_CONFIG_VALUES:
|
|
57
|
+
return False
|
|
58
|
+
print(
|
|
59
|
+
f"[WARN] invalid {label} value: {value!r}; using {str(default).lower()} (default)",
|
|
60
|
+
file=sys.stderr,
|
|
61
|
+
)
|
|
62
|
+
return default
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _is_true_config_value(value: object, label: str = "config flag") -> bool:
|
|
66
|
+
"""Return True when a config value represents an enabled flag."""
|
|
67
|
+
if value is None:
|
|
68
|
+
return False
|
|
69
|
+
return coerce_config_bool(value, False, label)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _get_config_path(repo_root: Path | None = None) -> Path:
|
|
73
|
+
"""Get path to config.yaml."""
|
|
74
|
+
root = repo_root or get_repo_root()
|
|
75
|
+
return root / DIR_WORKFLOW / CONFIG_FILE
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _load_config(repo_root: Path | None = None) -> dict:
|
|
79
|
+
"""Load and parse config.yaml. Returns empty dict on any error.
|
|
80
|
+
|
|
81
|
+
Fail-open, matching ``trellis_config.read_trellis_config``: a malformed
|
|
82
|
+
config must not take down ``task.py create``. A parse failure is reported
|
|
83
|
+
once on stderr so it is not invisible.
|
|
84
|
+
"""
|
|
85
|
+
config_file = _get_config_path(repo_root)
|
|
86
|
+
try:
|
|
87
|
+
content = config_file.read_text(encoding="utf-8")
|
|
88
|
+
except (OSError, IOError):
|
|
89
|
+
return {}
|
|
90
|
+
try:
|
|
91
|
+
parsed = parse_simple_yaml(content, source=str(config_file))
|
|
92
|
+
except Exception as e:
|
|
93
|
+
print(
|
|
94
|
+
f"[WARN] could not parse {config_file}: {type(e).__name__}: {e}; "
|
|
95
|
+
"using defaults",
|
|
96
|
+
file=sys.stderr,
|
|
97
|
+
)
|
|
98
|
+
return {}
|
|
99
|
+
return parsed if isinstance(parsed, dict) else {}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def get_session_commit_message(repo_root: Path | None = None) -> str:
|
|
103
|
+
"""Get the commit message for auto-committing session records."""
|
|
104
|
+
config = _load_config(repo_root)
|
|
105
|
+
return config.get("session_commit_message", DEFAULT_SESSION_COMMIT_MESSAGE)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def get_max_journal_lines(repo_root: Path | None = None) -> int:
|
|
109
|
+
"""Get the maximum lines per journal file."""
|
|
110
|
+
config = _load_config(repo_root)
|
|
111
|
+
value = config.get("max_journal_lines", DEFAULT_MAX_JOURNAL_LINES)
|
|
112
|
+
try:
|
|
113
|
+
return int(value)
|
|
114
|
+
except (ValueError, TypeError):
|
|
115
|
+
return DEFAULT_MAX_JOURNAL_LINES
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def get_session_auto_commit(repo_root: Path | None = None) -> bool:
|
|
119
|
+
"""Whether scripts should auto-stage + auto-commit session/task changes.
|
|
120
|
+
|
|
121
|
+
Governs both ``add_session.py:_auto_commit_workspace`` and
|
|
122
|
+
``task_store.py:_auto_commit_archive``.
|
|
123
|
+
|
|
124
|
+
Default: ``True`` (existing behavior — auto-stage + auto-commit).
|
|
125
|
+
Set ``session_auto_commit: false`` in ``.trellis/config.yaml`` to skip
|
|
126
|
+
auto-staging entirely; the journal/archive files are still written to
|
|
127
|
+
disk, but the user manages ``git add`` / ``git commit`` themselves.
|
|
128
|
+
|
|
129
|
+
Accepts native YAML booleans (``true`` / ``false``) and the string
|
|
130
|
+
aliases ``true / false / yes / no / 1 / 0 / on / off`` (case-insensitive).
|
|
131
|
+
Invalid values fall back to ``True`` with a stderr warning.
|
|
132
|
+
"""
|
|
133
|
+
config = _load_config(repo_root)
|
|
134
|
+
raw = config.get("session_auto_commit", DEFAULT_SESSION_AUTO_COMMIT)
|
|
135
|
+
return coerce_config_bool(
|
|
136
|
+
raw, DEFAULT_SESSION_AUTO_COMMIT, "session_auto_commit"
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def get_codex_dispatch_mode(repo_root: Path | None = None) -> str:
|
|
141
|
+
"""Return Codex dispatch mode.
|
|
142
|
+
|
|
143
|
+
Default is ``auto``, which dispatches Trellis sub-agents and uses native
|
|
144
|
+
context injection with a child-side fallback. ``inline`` is an explicit
|
|
145
|
+
opt-out. ``sub-agent`` remains a backwards-compatible alias for ``auto``.
|
|
146
|
+
|
|
147
|
+
Invalid explicit configuration falls back to ``inline`` rather than
|
|
148
|
+
unexpectedly dispatching a sub-agent. This CLI-facing parser is the only
|
|
149
|
+
place that emits a warning for invalid values; hook readers fail safely
|
|
150
|
+
without producing per-turn warning noise.
|
|
151
|
+
"""
|
|
152
|
+
config = _load_config(repo_root)
|
|
153
|
+
codex = config.get("codex")
|
|
154
|
+
if codex is None:
|
|
155
|
+
return DEFAULT_CODEX_DISPATCH_MODE
|
|
156
|
+
if not isinstance(codex, dict):
|
|
157
|
+
print(
|
|
158
|
+
f"[WARN] invalid codex config: {codex!r}; using inline",
|
|
159
|
+
file=sys.stderr,
|
|
160
|
+
)
|
|
161
|
+
return "inline"
|
|
162
|
+
|
|
163
|
+
raw = codex.get("dispatch_mode", DEFAULT_CODEX_DISPATCH_MODE)
|
|
164
|
+
mode = str(raw).strip().lower()
|
|
165
|
+
if mode in ("auto", "inline"):
|
|
166
|
+
return mode
|
|
167
|
+
if mode == "sub-agent":
|
|
168
|
+
return "auto"
|
|
169
|
+
print(
|
|
170
|
+
f"[WARN] invalid codex.dispatch_mode value: {raw!r}; using inline",
|
|
171
|
+
file=sys.stderr,
|
|
172
|
+
)
|
|
173
|
+
return "inline"
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
DEFAULT_CONTEXT_INJECTION_MAX_FILE_BYTES = 32768
|
|
177
|
+
DEFAULT_CONTEXT_INJECTION_MAX_ARTIFACT_BYTES = 65536
|
|
178
|
+
DEFAULT_CONTEXT_INJECTION_MAX_TOTAL_BYTES = 131072
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def get_context_injection_limits(repo_root: Path | None = None) -> dict[str, int]:
|
|
182
|
+
"""Return sub-agent context injection byte limits.
|
|
183
|
+
|
|
184
|
+
Reads the ``context_injection:`` section of ``.trellis/config.yaml``:
|
|
185
|
+
|
|
186
|
+
context_injection:
|
|
187
|
+
max_file_bytes: 32768
|
|
188
|
+
max_artifact_bytes: 65536
|
|
189
|
+
max_total_bytes: 131072
|
|
190
|
+
|
|
191
|
+
``0`` disables the corresponding limit. Missing keys use their default;
|
|
192
|
+
invalid (non-int or negative) values fall back to the default for that
|
|
193
|
+
key with a stderr warning.
|
|
194
|
+
"""
|
|
195
|
+
defaults = {
|
|
196
|
+
"max_file_bytes": DEFAULT_CONTEXT_INJECTION_MAX_FILE_BYTES,
|
|
197
|
+
"max_artifact_bytes": DEFAULT_CONTEXT_INJECTION_MAX_ARTIFACT_BYTES,
|
|
198
|
+
"max_total_bytes": DEFAULT_CONTEXT_INJECTION_MAX_TOTAL_BYTES,
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
config = _load_config(repo_root)
|
|
202
|
+
section = config.get("context_injection")
|
|
203
|
+
if not isinstance(section, dict):
|
|
204
|
+
return defaults
|
|
205
|
+
|
|
206
|
+
result = dict(defaults)
|
|
207
|
+
for key, default_value in defaults.items():
|
|
208
|
+
if key not in section:
|
|
209
|
+
continue
|
|
210
|
+
raw = section[key]
|
|
211
|
+
try:
|
|
212
|
+
value = int(raw)
|
|
213
|
+
except (TypeError, ValueError):
|
|
214
|
+
print(
|
|
215
|
+
f"[WARN] invalid context_injection.{key} value: {raw!r}; "
|
|
216
|
+
f"using default {default_value}",
|
|
217
|
+
file=sys.stderr,
|
|
218
|
+
)
|
|
219
|
+
continue
|
|
220
|
+
if value < 0:
|
|
221
|
+
print(
|
|
222
|
+
f"[WARN] invalid context_injection.{key} value: {raw!r}; "
|
|
223
|
+
f"using default {default_value}",
|
|
224
|
+
file=sys.stderr,
|
|
225
|
+
)
|
|
226
|
+
continue
|
|
227
|
+
result[key] = value
|
|
228
|
+
|
|
229
|
+
return result
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
DEFAULT_PROMPT_INJECTION_SKIP_KEYWORD = "no-trellis"
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def get_prompt_injection_config(repo_root: Path | None = None) -> dict[str, str]:
|
|
236
|
+
"""Return per-turn prompt injection config.
|
|
237
|
+
|
|
238
|
+
Reads the ``prompt_injection:`` section of ``.trellis/config.yaml``:
|
|
239
|
+
|
|
240
|
+
prompt_injection:
|
|
241
|
+
skip_keyword: "no-trellis" # "" disables the escape hatch entirely
|
|
242
|
+
|
|
243
|
+
``skip_keyword`` is the word-boundary, case-insensitive keyword that, when
|
|
244
|
+
present in the user's prompt, makes the per-turn workflow-state injection
|
|
245
|
+
emit nothing for that turn. Defaults to ``"no-trellis"``. A non-string
|
|
246
|
+
value falls back to the default.
|
|
247
|
+
"""
|
|
248
|
+
defaults = {"skip_keyword": DEFAULT_PROMPT_INJECTION_SKIP_KEYWORD}
|
|
249
|
+
|
|
250
|
+
config = _load_config(repo_root)
|
|
251
|
+
section = config.get("prompt_injection")
|
|
252
|
+
if not isinstance(section, dict):
|
|
253
|
+
return defaults
|
|
254
|
+
|
|
255
|
+
result = dict(defaults)
|
|
256
|
+
raw = section.get("skip_keyword", DEFAULT_PROMPT_INJECTION_SKIP_KEYWORD)
|
|
257
|
+
if isinstance(raw, str):
|
|
258
|
+
result["skip_keyword"] = raw
|
|
259
|
+
return result
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def get_hooks(event: str, repo_root: Path | None = None) -> list[str]:
|
|
263
|
+
"""Get hook commands for a lifecycle event.
|
|
264
|
+
|
|
265
|
+
Args:
|
|
266
|
+
event: Event name (e.g. "after_create", "after_archive").
|
|
267
|
+
repo_root: Repository root path.
|
|
268
|
+
|
|
269
|
+
A hook the user believes is installed and which silently never runs is the
|
|
270
|
+
worst outcome for this feature, so a declared-but-unusable shape warns
|
|
271
|
+
instead of returning an empty list quietly.
|
|
272
|
+
|
|
273
|
+
Returns:
|
|
274
|
+
List of shell commands to execute, empty if none configured.
|
|
275
|
+
"""
|
|
276
|
+
config = _load_config(repo_root)
|
|
277
|
+
hooks = config.get("hooks")
|
|
278
|
+
if hooks is None:
|
|
279
|
+
return []
|
|
280
|
+
if not isinstance(hooks, dict):
|
|
281
|
+
print(
|
|
282
|
+
f"[WARN] ignoring `hooks` in config.yaml: expected a mapping of "
|
|
283
|
+
f"event -> list of commands, got {hooks!r}",
|
|
284
|
+
file=sys.stderr,
|
|
285
|
+
)
|
|
286
|
+
return []
|
|
287
|
+
commands = hooks.get(event)
|
|
288
|
+
if commands is None:
|
|
289
|
+
return []
|
|
290
|
+
if isinstance(commands, list):
|
|
291
|
+
return [str(c) for c in commands]
|
|
292
|
+
# `after_create: echo hi` instead of a `- ` list — parses fine, registers
|
|
293
|
+
# nothing.
|
|
294
|
+
print(
|
|
295
|
+
f"[WARN] ignoring hook `{event}` in config.yaml: expected a list of "
|
|
296
|
+
f"commands, got {commands!r}. Write it as:\n"
|
|
297
|
+
f" hooks:\n {event}:\n - {commands}",
|
|
298
|
+
file=sys.stderr,
|
|
299
|
+
)
|
|
300
|
+
return []
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
# =============================================================================
|
|
304
|
+
# Monorepo / Packages
|
|
305
|
+
# =============================================================================
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def get_packages(repo_root: Path | None = None) -> dict[str, dict] | None:
|
|
309
|
+
"""Get monorepo package declarations.
|
|
310
|
+
|
|
311
|
+
Returns:
|
|
312
|
+
Dict mapping package name to its config (path, type, etc.),
|
|
313
|
+
or None if not configured (single-repo mode).
|
|
314
|
+
|
|
315
|
+
Example return:
|
|
316
|
+
{"cli": {"path": "packages/cli"}, "docs-site": {"path": "docs-site", "type": "submodule"}}
|
|
317
|
+
"""
|
|
318
|
+
config = _load_config(repo_root)
|
|
319
|
+
packages = config.get("packages")
|
|
320
|
+
if not isinstance(packages, dict):
|
|
321
|
+
return None
|
|
322
|
+
# Ensure each value is a dict (filter out scalar entries)
|
|
323
|
+
filtered = {k: v for k, v in packages.items() if isinstance(v, dict)}
|
|
324
|
+
if not filtered:
|
|
325
|
+
return None
|
|
326
|
+
return filtered
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def get_default_package(repo_root: Path | None = None) -> str | None:
|
|
330
|
+
"""Get the default package name from config.
|
|
331
|
+
|
|
332
|
+
Returns:
|
|
333
|
+
Package name string, or None if not configured.
|
|
334
|
+
"""
|
|
335
|
+
config = _load_config(repo_root)
|
|
336
|
+
value = config.get("default_package")
|
|
337
|
+
return str(value) if value else None
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def get_submodule_packages(repo_root: Path | None = None) -> dict[str, str]:
|
|
341
|
+
"""Get packages that are git submodules.
|
|
342
|
+
|
|
343
|
+
Returns:
|
|
344
|
+
Dict mapping package name to its path for submodule-type packages.
|
|
345
|
+
Empty dict if none configured.
|
|
346
|
+
|
|
347
|
+
Example return:
|
|
348
|
+
{"docs-site": "docs-site"}
|
|
349
|
+
"""
|
|
350
|
+
packages = get_packages(repo_root)
|
|
351
|
+
if packages is None:
|
|
352
|
+
return {}
|
|
353
|
+
return {
|
|
354
|
+
name: cfg.get("path", name)
|
|
355
|
+
for name, cfg in packages.items()
|
|
356
|
+
if cfg.get("type") == "submodule"
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
def get_git_packages(repo_root: Path | None = None) -> dict[str, str]:
|
|
361
|
+
"""Get packages that have their own independent git repository.
|
|
362
|
+
|
|
363
|
+
These are sub-directories with their own .git (not submodules),
|
|
364
|
+
marked with ``git: true`` in config.yaml.
|
|
365
|
+
|
|
366
|
+
Returns:
|
|
367
|
+
Dict mapping package name to its path for git-repo packages.
|
|
368
|
+
Empty dict if none configured.
|
|
369
|
+
|
|
370
|
+
Example config::
|
|
371
|
+
|
|
372
|
+
packages:
|
|
373
|
+
backend:
|
|
374
|
+
path: iqs
|
|
375
|
+
git: true
|
|
376
|
+
|
|
377
|
+
Example return::
|
|
378
|
+
|
|
379
|
+
{"backend": "iqs"}
|
|
380
|
+
"""
|
|
381
|
+
packages = get_packages(repo_root)
|
|
382
|
+
if packages is None:
|
|
383
|
+
return {}
|
|
384
|
+
return {
|
|
385
|
+
name: cfg.get("path", name)
|
|
386
|
+
for name, cfg in packages.items()
|
|
387
|
+
if _is_true_config_value(cfg.get("git"), f"packages.{name}.git")
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
def is_monorepo(repo_root: Path | None = None) -> bool:
|
|
392
|
+
"""Check if the project is configured as a monorepo (has packages in config)."""
|
|
393
|
+
return get_packages(repo_root) is not None
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
def get_spec_base(package: str | None = None, repo_root: Path | None = None) -> str:
|
|
397
|
+
"""Get the spec directory base path relative to .trellis/.
|
|
398
|
+
|
|
399
|
+
Single-repo: returns "spec"
|
|
400
|
+
Monorepo with package: returns "spec/<package>"
|
|
401
|
+
Monorepo without package: returns "spec" (caller should specify package)
|
|
402
|
+
"""
|
|
403
|
+
if package and is_monorepo(repo_root):
|
|
404
|
+
return f"spec/{package}"
|
|
405
|
+
return "spec"
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
def validate_package(package: str, repo_root: Path | None = None) -> bool:
|
|
409
|
+
"""Check if a package name is valid in this project.
|
|
410
|
+
|
|
411
|
+
Single-repo (no packages configured): always returns True.
|
|
412
|
+
Monorepo: returns True only if package exists in config.yaml packages.
|
|
413
|
+
"""
|
|
414
|
+
packages = get_packages(repo_root)
|
|
415
|
+
if packages is None:
|
|
416
|
+
return True # Single-repo, no validation needed
|
|
417
|
+
return package in packages
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
def resolve_package(
|
|
421
|
+
task_package: str | None = None,
|
|
422
|
+
repo_root: Path | None = None,
|
|
423
|
+
) -> str | None:
|
|
424
|
+
"""Resolve package from inferred sources with validation.
|
|
425
|
+
|
|
426
|
+
Checks in order: task_package → default_package.
|
|
427
|
+
Invalid inferred values print a warning to stderr and are skipped.
|
|
428
|
+
|
|
429
|
+
Returns:
|
|
430
|
+
Resolved package name, or None if no valid package found.
|
|
431
|
+
|
|
432
|
+
Note:
|
|
433
|
+
CLI --package should be validated separately by the caller
|
|
434
|
+
(fail-fast with available packages list on error).
|
|
435
|
+
"""
|
|
436
|
+
packages = get_packages(repo_root)
|
|
437
|
+
if packages is None:
|
|
438
|
+
return None # Single-repo, no package needed
|
|
439
|
+
|
|
440
|
+
# Try task_package (guard against non-string values from malformed JSON)
|
|
441
|
+
if task_package and isinstance(task_package, str):
|
|
442
|
+
if task_package in packages:
|
|
443
|
+
return task_package
|
|
444
|
+
print(
|
|
445
|
+
f"Warning: task.json package '{task_package}' not found in config, skipping",
|
|
446
|
+
file=sys.stderr,
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
# Try default_package
|
|
450
|
+
default = get_default_package(repo_root)
|
|
451
|
+
if default:
|
|
452
|
+
if default in packages:
|
|
453
|
+
return default
|
|
454
|
+
print(
|
|
455
|
+
f"Warning: default_package '{default}' not found in config, skipping",
|
|
456
|
+
file=sys.stderr,
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
return None
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
def get_spec_scope(repo_root: Path | None = None) -> list[str] | str | None:
|
|
463
|
+
"""Get session.spec_scope configuration.
|
|
464
|
+
|
|
465
|
+
Returns:
|
|
466
|
+
list[str]: Package names to include in spec scanning.
|
|
467
|
+
str: "active_task" to use current task's package.
|
|
468
|
+
None: No scope configured (scan all packages).
|
|
469
|
+
"""
|
|
470
|
+
config = _load_config(repo_root)
|
|
471
|
+
session = config.get("session")
|
|
472
|
+
if not isinstance(session, dict):
|
|
473
|
+
return None
|
|
474
|
+
|
|
475
|
+
scope = session.get("spec_scope")
|
|
476
|
+
if scope is None:
|
|
477
|
+
return None
|
|
478
|
+
if isinstance(scope, str):
|
|
479
|
+
return scope # e.g. "active_task"
|
|
480
|
+
if isinstance(scope, list):
|
|
481
|
+
return [str(s) for s in scope]
|
|
482
|
+
return None
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Developer management utilities.
|
|
4
|
+
|
|
5
|
+
Provides:
|
|
6
|
+
init_developer - Initialize developer
|
|
7
|
+
ensure_developer - Ensure developer is initialized (exit if not)
|
|
8
|
+
show_developer_info - Show developer information
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import sys
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
from .paths import (
|
|
18
|
+
DEVELOPER_HINT,
|
|
19
|
+
DIR_WORKFLOW,
|
|
20
|
+
DIR_WORKSPACE,
|
|
21
|
+
DIR_TASKS,
|
|
22
|
+
FILE_DEVELOPER,
|
|
23
|
+
FILE_JOURNAL_PREFIX,
|
|
24
|
+
get_repo_root,
|
|
25
|
+
get_developer,
|
|
26
|
+
check_developer,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# =============================================================================
|
|
31
|
+
# Developer Initialization
|
|
32
|
+
# =============================================================================
|
|
33
|
+
|
|
34
|
+
def init_developer(name: str, repo_root: Path | None = None) -> bool:
|
|
35
|
+
"""Initialize developer.
|
|
36
|
+
|
|
37
|
+
Creates:
|
|
38
|
+
- .trellis/.developer file with developer info
|
|
39
|
+
- .trellis/workspace/<name>/ directory structure
|
|
40
|
+
- Initial journal file and index.md
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
name: Developer name.
|
|
44
|
+
repo_root: Repository root path. Defaults to auto-detected.
|
|
45
|
+
|
|
46
|
+
Returns:
|
|
47
|
+
True on success, False on error.
|
|
48
|
+
"""
|
|
49
|
+
if not name:
|
|
50
|
+
print("Error: developer name is required", file=sys.stderr)
|
|
51
|
+
return False
|
|
52
|
+
|
|
53
|
+
if repo_root is None:
|
|
54
|
+
repo_root = get_repo_root()
|
|
55
|
+
|
|
56
|
+
dev_file = repo_root / DIR_WORKFLOW / FILE_DEVELOPER
|
|
57
|
+
workspace_dir = repo_root / DIR_WORKFLOW / DIR_WORKSPACE / name
|
|
58
|
+
|
|
59
|
+
# Create .developer file
|
|
60
|
+
initialized_at = datetime.now().isoformat()
|
|
61
|
+
try:
|
|
62
|
+
dev_file.write_text(
|
|
63
|
+
f"name={name}\ninitialized_at={initialized_at}\n",
|
|
64
|
+
encoding="utf-8"
|
|
65
|
+
)
|
|
66
|
+
except (OSError, IOError) as e:
|
|
67
|
+
print(f"Error: Failed to create .developer file: {e}", file=sys.stderr)
|
|
68
|
+
return False
|
|
69
|
+
|
|
70
|
+
# Create workspace directory structure
|
|
71
|
+
try:
|
|
72
|
+
workspace_dir.mkdir(parents=True, exist_ok=True)
|
|
73
|
+
except (OSError, IOError) as e:
|
|
74
|
+
print(f"Error: Failed to create workspace directory: {e}", file=sys.stderr)
|
|
75
|
+
return False
|
|
76
|
+
|
|
77
|
+
# Create initial journal file
|
|
78
|
+
journal_file = workspace_dir / f"{FILE_JOURNAL_PREFIX}1.md"
|
|
79
|
+
if not journal_file.exists():
|
|
80
|
+
today = datetime.now().strftime("%Y-%m-%d")
|
|
81
|
+
journal_content = f"""# Journal - {name} (Part 1)
|
|
82
|
+
|
|
83
|
+
> AI development session journal
|
|
84
|
+
> Started: {today}
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
try:
|
|
90
|
+
journal_file.write_text(journal_content, encoding="utf-8")
|
|
91
|
+
except (OSError, IOError) as e:
|
|
92
|
+
print(f"Error: Failed to create journal file: {e}", file=sys.stderr)
|
|
93
|
+
return False
|
|
94
|
+
|
|
95
|
+
# Create index.md with markers for auto-update
|
|
96
|
+
index_file = workspace_dir / "index.md"
|
|
97
|
+
if not index_file.exists():
|
|
98
|
+
index_content = f"""# Workspace Index - {name}
|
|
99
|
+
|
|
100
|
+
> Journal tracking for AI development sessions.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Current Status
|
|
105
|
+
|
|
106
|
+
<!-- @@@auto:current-status -->
|
|
107
|
+
- **Active File**: `journal-1.md`
|
|
108
|
+
- **Total Sessions**: 0
|
|
109
|
+
- **Last Active**: -
|
|
110
|
+
<!-- @@@/auto:current-status -->
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Active Documents
|
|
115
|
+
|
|
116
|
+
<!-- @@@auto:active-documents -->
|
|
117
|
+
| File | Lines | Status |
|
|
118
|
+
|------|-------|--------|
|
|
119
|
+
| `journal-1.md` | ~0 | Active |
|
|
120
|
+
<!-- @@@/auto:active-documents -->
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Session History
|
|
125
|
+
|
|
126
|
+
<!-- @@@auto:session-history -->
|
|
127
|
+
| # | Date | Title | Commits | Branch |
|
|
128
|
+
|---|------|-------|---------|--------|
|
|
129
|
+
<!-- @@@/auto:session-history -->
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Notes
|
|
134
|
+
|
|
135
|
+
- Sessions are appended to journal files
|
|
136
|
+
- New journal file created when current exceeds 2000 lines
|
|
137
|
+
- Use `add_session.py` to record sessions
|
|
138
|
+
"""
|
|
139
|
+
try:
|
|
140
|
+
index_file.write_text(index_content, encoding="utf-8")
|
|
141
|
+
except (OSError, IOError) as e:
|
|
142
|
+
print(f"Error: Failed to create index.md: {e}", file=sys.stderr)
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
print(f"Developer initialized: {name}")
|
|
146
|
+
print(f" .developer file: {dev_file}")
|
|
147
|
+
print(f" Workspace dir: {workspace_dir}")
|
|
148
|
+
|
|
149
|
+
return True
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def ensure_developer(repo_root: Path | None = None) -> None:
|
|
153
|
+
"""Ensure developer is initialized, exit if not.
|
|
154
|
+
|
|
155
|
+
Args:
|
|
156
|
+
repo_root: Repository root path. Defaults to auto-detected.
|
|
157
|
+
"""
|
|
158
|
+
if repo_root is None:
|
|
159
|
+
repo_root = get_repo_root()
|
|
160
|
+
|
|
161
|
+
if not check_developer(repo_root):
|
|
162
|
+
print("Error: Developer not initialized.", file=sys.stderr)
|
|
163
|
+
print(f"Run: python3 ./{DIR_WORKFLOW}/scripts/init_developer.py <your-name>", file=sys.stderr)
|
|
164
|
+
print(DEVELOPER_HINT, file=sys.stderr)
|
|
165
|
+
sys.exit(1)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def show_developer_info(repo_root: Path | None = None) -> None:
|
|
169
|
+
"""Show developer information.
|
|
170
|
+
|
|
171
|
+
Args:
|
|
172
|
+
repo_root: Repository root path. Defaults to auto-detected.
|
|
173
|
+
"""
|
|
174
|
+
if repo_root is None:
|
|
175
|
+
repo_root = get_repo_root()
|
|
176
|
+
|
|
177
|
+
developer = get_developer(repo_root)
|
|
178
|
+
|
|
179
|
+
if not developer:
|
|
180
|
+
print("Developer: (not initialized)")
|
|
181
|
+
else:
|
|
182
|
+
print(f"Developer: {developer}")
|
|
183
|
+
print(f"Workspace: {DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/")
|
|
184
|
+
print(f"Tasks: {DIR_WORKFLOW}/{DIR_TASKS}/")
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
# =============================================================================
|
|
188
|
+
# Main Entry (for testing)
|
|
189
|
+
# =============================================================================
|
|
190
|
+
|
|
191
|
+
if __name__ == "__main__":
|
|
192
|
+
show_developer_info()
|