@pennixrv/trellis 0.7.2-beta.2 → 0.7.2-beta.21
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 +14 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +105 -107
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/teamwork/adapters/acp.d.ts.map +1 -1
- package/dist/commands/teamwork/adapters/acp.js +3 -0
- package/dist/commands/teamwork/adapters/acp.js.map +1 -1
- package/dist/commands/teamwork/adapters/index.d.ts +1 -1
- package/dist/commands/teamwork/adapters/index.d.ts.map +1 -1
- package/dist/commands/teamwork/artifact.d.ts +2 -0
- package/dist/commands/teamwork/artifact.d.ts.map +1 -1
- package/dist/commands/teamwork/artifact.js +4 -2
- package/dist/commands/teamwork/artifact.js.map +1 -1
- package/dist/commands/teamwork/batch-reservation.d.ts.map +1 -1
- package/dist/commands/teamwork/batch-reservation.js +16 -8
- package/dist/commands/teamwork/batch-reservation.js.map +1 -1
- package/dist/commands/teamwork/batch.d.ts +15 -1
- package/dist/commands/teamwork/batch.d.ts.map +1 -1
- package/dist/commands/teamwork/batch.js +279 -24
- package/dist/commands/teamwork/batch.js.map +1 -1
- package/dist/commands/teamwork/coordinator.d.ts +3 -0
- package/dist/commands/teamwork/coordinator.d.ts.map +1 -1
- package/dist/commands/teamwork/coordinator.js +22 -3
- package/dist/commands/teamwork/coordinator.js.map +1 -1
- package/dist/commands/teamwork/create.d.ts +1 -0
- package/dist/commands/teamwork/create.d.ts.map +1 -1
- package/dist/commands/teamwork/create.js +4 -0
- package/dist/commands/teamwork/create.js.map +1 -1
- package/dist/commands/teamwork/evidence-references.d.ts +19 -0
- package/dist/commands/teamwork/evidence-references.d.ts.map +1 -0
- package/dist/commands/teamwork/evidence-references.js +249 -0
- package/dist/commands/teamwork/evidence-references.js.map +1 -0
- package/dist/commands/teamwork/foreground-wait.d.ts +4 -1
- package/dist/commands/teamwork/foreground-wait.d.ts.map +1 -1
- package/dist/commands/teamwork/foreground-wait.js +15 -1
- package/dist/commands/teamwork/foreground-wait.js.map +1 -1
- package/dist/commands/teamwork/index.d.ts.map +1 -1
- package/dist/commands/teamwork/index.js +47 -5
- package/dist/commands/teamwork/index.js.map +1 -1
- package/dist/commands/teamwork/list.d.ts +1 -0
- package/dist/commands/teamwork/list.d.ts.map +1 -1
- package/dist/commands/teamwork/list.js +4 -1
- package/dist/commands/teamwork/list.js.map +1 -1
- package/dist/commands/teamwork/prompt.js +1 -1
- package/dist/commands/teamwork/prompt.js.map +1 -1
- package/dist/commands/teamwork/rm.d.ts +27 -4
- package/dist/commands/teamwork/rm.d.ts.map +1 -1
- package/dist/commands/teamwork/rm.js +155 -51
- package/dist/commands/teamwork/rm.js.map +1 -1
- package/dist/commands/teamwork/run.d.ts.map +1 -1
- package/dist/commands/teamwork/run.js +10 -1
- package/dist/commands/teamwork/run.js.map +1 -1
- package/dist/commands/teamwork/runtime.d.ts +1 -1
- package/dist/commands/teamwork/runtime.d.ts.map +1 -1
- package/dist/commands/teamwork/runtime.js +14 -4
- package/dist/commands/teamwork/runtime.js.map +1 -1
- package/dist/commands/teamwork/spawn.d.ts.map +1 -1
- package/dist/commands/teamwork/spawn.js +4 -1
- package/dist/commands/teamwork/spawn.js.map +1 -1
- package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -1
- package/dist/commands/teamwork/supervisor/stdout.js +7 -0
- package/dist/commands/teamwork/supervisor/stdout.js.map +1 -1
- package/dist/commands/teamwork/supervisor.d.ts +1 -1
- package/dist/commands/teamwork/supervisor.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-adapters.d.ts +3 -0
- package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-adapters.js +14 -5
- package/dist/commands/teamwork/teammate-adapters.js.map +1 -1
- package/dist/commands/teamwork/teammate-launch.d.ts +3 -1
- package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-launch.js +7 -5
- package/dist/commands/teamwork/teammate-launch.js.map +1 -1
- package/dist/commands/teamwork/workers.d.ts +8 -0
- package/dist/commands/teamwork/workers.d.ts.map +1 -0
- package/dist/commands/teamwork/workers.js +67 -0
- package/dist/commands/teamwork/workers.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +109 -55
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +5 -7
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/codebuddy.d.ts +1 -8
- package/dist/configurators/codebuddy.d.ts.map +1 -1
- package/dist/configurators/codebuddy.js +2 -12
- package/dist/configurators/codebuddy.js.map +1 -1
- package/dist/configurators/codex.d.ts +0 -36
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +2 -99
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/copilot.d.ts +1 -12
- package/dist/configurators/copilot.d.ts.map +1 -1
- package/dist/configurators/copilot.js +2 -20
- package/dist/configurators/copilot.js.map +1 -1
- package/dist/configurators/cursor.d.ts +1 -8
- package/dist/configurators/cursor.d.ts.map +1 -1
- package/dist/configurators/cursor.js +2 -12
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/droid.d.ts +1 -8
- package/dist/configurators/droid.d.ts.map +1 -1
- package/dist/configurators/droid.js +2 -12
- package/dist/configurators/droid.js.map +1 -1
- package/dist/configurators/dsh.d.ts +1 -21
- package/dist/configurators/dsh.d.ts.map +1 -1
- package/dist/configurators/dsh.js +4 -37
- package/dist/configurators/dsh.js.map +1 -1
- package/dist/configurators/gemini.d.ts +1 -16
- package/dist/configurators/gemini.d.ts.map +1 -1
- package/dist/configurators/gemini.js +3 -21
- package/dist/configurators/gemini.js.map +1 -1
- package/dist/configurators/grok.d.ts +1 -12
- package/dist/configurators/grok.d.ts.map +1 -1
- package/dist/configurators/grok.js +2 -18
- package/dist/configurators/grok.js.map +1 -1
- package/dist/configurators/kimi.d.ts +1 -21
- package/dist/configurators/kimi.d.ts.map +1 -1
- package/dist/configurators/kimi.js +2 -38
- package/dist/configurators/kimi.js.map +1 -1
- package/dist/configurators/kiro.d.ts +1 -9
- package/dist/configurators/kiro.d.ts.map +1 -1
- package/dist/configurators/kiro.js +1 -9
- package/dist/configurators/kiro.js.map +1 -1
- package/dist/configurators/omp.d.ts.map +1 -1
- package/dist/configurators/omp.js +1 -5
- package/dist/configurators/omp.js.map +1 -1
- package/dist/configurators/pi.d.ts.map +1 -1
- package/dist/configurators/pi.js +2 -5
- package/dist/configurators/pi.js.map +1 -1
- package/dist/configurators/qoder.d.ts +1 -10
- package/dist/configurators/qoder.d.ts.map +1 -1
- package/dist/configurators/qoder.js +3 -15
- package/dist/configurators/qoder.js.map +1 -1
- package/dist/configurators/reasonix.d.ts +1 -12
- package/dist/configurators/reasonix.d.ts.map +1 -1
- package/dist/configurators/reasonix.js +3 -22
- package/dist/configurators/reasonix.js.map +1 -1
- package/dist/configurators/shared.d.ts +1 -24
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +5 -184
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/snow.d.ts +1 -20
- package/dist/configurators/snow.d.ts.map +1 -1
- package/dist/configurators/snow.js +2 -25
- package/dist/configurators/snow.js.map +1 -1
- package/dist/configurators/trae.d.ts +1 -14
- package/dist/configurators/trae.d.ts.map +1 -1
- package/dist/configurators/trae.js +3 -19
- package/dist/configurators/trae.js.map +1 -1
- package/dist/configurators/workflow.d.ts +2 -0
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +72 -56
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/configurators/zcode.d.ts +1 -13
- package/dist/configurators/zcode.d.ts.map +1 -1
- package/dist/configurators/zcode.js +2 -18
- package/dist/configurators/zcode.js.map +1 -1
- package/dist/migrations/manifests/0.5.0-beta.5.json +1 -212
- package/dist/migrations/manifests/0.7.2-beta.10.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.11.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.12.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.13.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.14.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.15.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.16.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.17.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.18.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.19.json +11 -0
- package/dist/migrations/manifests/0.7.2-beta.20.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.21.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.3.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.4.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.5.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.6.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.7.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.8.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.9.json +9 -0
- package/dist/migrations/retired-native-paths.d.ts +109 -0
- package/dist/migrations/retired-native-paths.d.ts.map +1 -0
- package/dist/migrations/retired-native-paths.js +263 -0
- package/dist/migrations/retired-native-paths.js.map +1 -0
- package/dist/templates/claude/index.d.ts +1 -16
- package/dist/templates/claude/index.d.ts.map +1 -1
- package/dist/templates/claude/index.js +5 -32
- package/dist/templates/claude/index.js.map +1 -1
- package/dist/templates/claude/settings.json +0 -22
- package/dist/templates/codebuddy/index.d.ts +2 -3
- package/dist/templates/codebuddy/index.d.ts.map +1 -1
- package/dist/templates/codebuddy/index.js +2 -3
- package/dist/templates/codebuddy/index.js.map +1 -1
- package/dist/templates/codebuddy/settings.json +0 -10
- package/dist/templates/codex/config.toml +2 -19
- package/dist/templates/codex/hooks/session-start.py +25 -30
- package/dist/templates/codex/hooks.json +0 -12
- package/dist/templates/codex/index.d.ts +0 -5
- package/dist/templates/codex/index.d.ts.map +1 -1
- package/dist/templates/codex/index.js +0 -13
- package/dist/templates/codex/index.js.map +1 -1
- package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +7 -3
- package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +7 -7
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +9 -51
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +3 -15
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +1 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +4 -9
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +2 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +6 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +10 -8
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +9 -79
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +2 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +3 -6
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +24 -103
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +14 -5
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/SKILL.md +6 -4
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +5 -9
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-writing.md +8 -0
- package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +8 -1
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +21 -1
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +13 -2
- package/dist/templates/common/bundled-skills/trellis-worktree-delegation/SKILL.md +14 -0
- package/dist/templates/common/bundled-skills/trellis-worktree-delegation/workflow.md +17 -0
- package/dist/templates/common/commands/continue.md +8 -0
- package/dist/templates/common/commands/start.md +2 -0
- package/dist/templates/common/skills/before-dev.md +3 -1
- package/dist/templates/common/skills/check.md +3 -1
- package/dist/templates/common/skills/request-intake.md +5 -3
- package/dist/templates/copilot/hooks/session-start.py +11 -30
- package/dist/templates/cursor/hooks.json +0 -7
- package/dist/templates/cursor/index.d.ts +1 -11
- package/dist/templates/cursor/index.d.ts.map +1 -1
- package/dist/templates/cursor/index.js +2 -10
- package/dist/templates/cursor/index.js.map +1 -1
- package/dist/templates/droid/index.d.ts +2 -3
- package/dist/templates/droid/index.d.ts.map +1 -1
- package/dist/templates/droid/index.js +2 -3
- package/dist/templates/droid/index.js.map +1 -1
- package/dist/templates/droid/settings.json +0 -10
- package/dist/templates/dsh/DSH.md +2 -33
- package/dist/templates/dsh/index.d.ts +1 -19
- package/dist/templates/dsh/index.d.ts.map +1 -1
- package/dist/templates/dsh/index.js +2 -21
- package/dist/templates/dsh/index.js.map +1 -1
- package/dist/templates/gemini/index.d.ts +1 -11
- package/dist/templates/gemini/index.d.ts.map +1 -1
- package/dist/templates/gemini/index.js +2 -10
- package/dist/templates/gemini/index.js.map +1 -1
- package/dist/templates/kiro/agents/trellis.json +1 -1
- package/dist/templates/kiro/index.d.ts +1 -13
- package/dist/templates/kiro/index.d.ts.map +1 -1
- package/dist/templates/kiro/index.js +1 -13
- package/dist/templates/kiro/index.js.map +1 -1
- package/dist/templates/markdown/agents.md +15 -3
- package/dist/templates/markdown/index.d.ts +1 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +1 -0
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/index.md.txt +20 -0
- package/dist/templates/omp/extensions/trellis/index.ts.txt +11 -51
- package/dist/templates/omp/index.d.ts +0 -2
- package/dist/templates/omp/index.d.ts.map +1 -1
- package/dist/templates/omp/index.js +1 -4
- package/dist/templates/omp/index.js.map +1 -1
- package/dist/templates/opencode/lib/session-utils.js +17 -5
- package/dist/templates/opencode/lib/trellis-context.js +12 -321
- package/dist/templates/opencode/plugins/inject-shell-session-context.js +93 -0
- package/dist/templates/opencode/plugins/inject-workflow-state.js +4 -10
- package/dist/templates/opencode/plugins/session-start.js +2 -6
- package/dist/templates/pi/extensions/trellis/index.ts.txt +8 -1432
- package/dist/templates/pi/index.d.ts +1 -2
- package/dist/templates/pi/index.d.ts.map +1 -1
- package/dist/templates/pi/index.js +2 -5
- package/dist/templates/pi/index.js.map +1 -1
- package/dist/templates/qoder/index.d.ts +2 -3
- package/dist/templates/qoder/index.d.ts.map +1 -1
- package/dist/templates/qoder/index.js +2 -3
- package/dist/templates/qoder/index.js.map +1 -1
- package/dist/templates/shared-hooks/guard-teamwork-wait.py +118 -12
- package/dist/templates/shared-hooks/index.d.ts +2 -56
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +3 -70
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-spec-context.py +6 -35
- package/dist/templates/shared-hooks/inject-workflow-state.py +18 -77
- package/dist/templates/shared-hooks/session-start.py +8 -6
- package/dist/templates/snow/SNOW.md +6 -18
- package/dist/templates/snow/hooks/write-trellis-context.py +51 -133
- package/dist/templates/snow/index.d.ts +2 -21
- package/dist/templates/snow/index.d.ts.map +1 -1
- package/dist/templates/snow/index.js +3 -24
- package/dist/templates/snow/index.js.map +1 -1
- package/dist/templates/template-utils.d.ts +1 -2
- package/dist/templates/template-utils.d.ts.map +1 -1
- package/dist/templates/template-utils.js +1 -11
- package/dist/templates/template-utils.js.map +1 -1
- package/dist/templates/trae/index.d.ts +2 -3
- package/dist/templates/trae/index.d.ts.map +1 -1
- package/dist/templates/trae/index.js +2 -3
- package/dist/templates/trae/index.js.map +1 -1
- package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +20 -22
- package/dist/templates/trellis/agents/teammate.md +6 -2
- package/dist/templates/trellis/agents/worktree-delegation-node.md +24 -0
- package/dist/templates/trellis/config.yaml +7 -36
- package/dist/templates/trellis/gitignore.txt +4 -0
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +3 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/active_task.py +23 -31
- package/dist/templates/trellis/scripts/common/config.py +1 -36
- package/dist/templates/trellis/scripts/common/git_context.py +13 -4
- package/dist/templates/trellis/scripts/common/io.py +2 -2
- package/dist/templates/trellis/scripts/common/packages_context.py +29 -1
- package/dist/templates/trellis/scripts/common/session_context.py +25 -50
- package/dist/templates/trellis/scripts/common/task_context.py +5 -3
- package/dist/templates/trellis/scripts/common/task_continuity.py +42 -9
- package/dist/templates/trellis/scripts/common/task_move.py +2 -2
- package/dist/templates/trellis/scripts/common/task_runtime.py +211 -0
- package/dist/templates/trellis/scripts/common/task_store.py +8 -78
- package/dist/templates/trellis/scripts/common/task_workflow.py +9 -26
- package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -36
- package/dist/templates/trellis/scripts/common/workflow_selection.py +12 -2
- package/dist/templates/trellis/scripts/common/worktree_delegation.py +603 -0
- package/dist/templates/trellis/scripts/task.py +41 -2
- package/dist/templates/trellis/workflow.md +25 -10
- package/dist/templates/zcode/config.json +0 -10
- package/dist/templates/zcode/index.d.ts +3 -22
- package/dist/templates/zcode/index.d.ts.map +1 -1
- package/dist/templates/zcode/index.js +3 -24
- package/dist/templates/zcode/index.js.map +1 -1
- package/dist/types/ai-tools.d.ts +0 -4
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +4 -109
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/ablation-store.d.ts.map +1 -1
- package/dist/utils/ablation-store.js +24 -0
- package/dist/utils/ablation-store.js.map +1 -1
- package/dist/utils/asset-backup.d.ts.map +1 -1
- package/dist/utils/asset-backup.js +25 -20
- package/dist/utils/asset-backup.js.map +1 -1
- package/dist/utils/file-writer.d.ts +2 -0
- package/dist/utils/file-writer.d.ts.map +1 -1
- package/dist/utils/file-writer.js +1 -1
- package/dist/utils/file-writer.js.map +1 -1
- package/dist/utils/managed-markdown.d.ts +5 -0
- package/dist/utils/managed-markdown.d.ts.map +1 -0
- package/dist/utils/managed-markdown.js +64 -0
- package/dist/utils/managed-markdown.js.map +1 -0
- package/dist/utils/managed-removal.d.ts +2 -0
- package/dist/utils/managed-removal.d.ts.map +1 -1
- package/dist/utils/managed-removal.js +26 -2
- package/dist/utils/managed-removal.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +5 -12
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/retired-native-assets.d.ts +17 -0
- package/dist/utils/retired-native-assets.d.ts.map +1 -0
- package/dist/utils/retired-native-assets.js +235 -0
- package/dist/utils/retired-native-assets.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +6 -12
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +2 -2
- package/dist/templates/claude/agents/trellis-check.md +0 -115
- package/dist/templates/claude/agents/trellis-implement.md +0 -110
- package/dist/templates/claude/agents/trellis-research.md +0 -137
- package/dist/templates/codebuddy/agents/trellis-check.md +0 -115
- package/dist/templates/codebuddy/agents/trellis-implement.md +0 -110
- package/dist/templates/codebuddy/agents/trellis-research.md +0 -137
- package/dist/templates/codex/agents/trellis-check.toml +0 -56
- package/dist/templates/codex/agents/trellis-implement.toml +0 -37
- package/dist/templates/codex/agents/trellis-research.toml +0 -78
- package/dist/templates/cursor/agents/trellis-check.md +0 -114
- package/dist/templates/cursor/agents/trellis-implement.md +0 -109
- package/dist/templates/cursor/agents/trellis-research.md +0 -136
- package/dist/templates/droid/droids/trellis-check.md +0 -107
- package/dist/templates/droid/droids/trellis-implement.md +0 -102
- package/dist/templates/droid/droids/trellis-research.md +0 -137
- package/dist/templates/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/gemini/agents/trellis-check.md +0 -107
- package/dist/templates/gemini/agents/trellis-implement.md +0 -102
- package/dist/templates/gemini/agents/trellis-research.md +0 -136
- package/dist/templates/grok/agents/trellis-check.md +0 -105
- package/dist/templates/grok/agents/trellis-implement.md +0 -116
- 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 -103
- package/dist/templates/kimi/agents/trellis-implement.md +0 -115
- 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/omp/agents/trellis-check.md +0 -41
- package/dist/templates/omp/agents/trellis-implement.md +0 -45
- package/dist/templates/omp/agents/trellis-research.md +0 -30
- package/dist/templates/opencode/agents/trellis-check.md +0 -122
- package/dist/templates/opencode/agents/trellis-implement.md +0 -118
- package/dist/templates/opencode/agents/trellis-research.md +0 -145
- package/dist/templates/opencode/plugins/inject-subagent-context.js +0 -569
- package/dist/templates/pi/agents/trellis-check.md +0 -37
- package/dist/templates/pi/agents/trellis-implement.md +0 -42
- package/dist/templates/pi/agents/trellis-research.md +0 -25
- package/dist/templates/qoder/agents/trellis-check.md +0 -108
- package/dist/templates/qoder/agents/trellis-implement.md +0 -103
- package/dist/templates/qoder/agents/trellis-research.md +0 -137
- package/dist/templates/reasonix/agents/trellis-check.md +0 -36
- package/dist/templates/reasonix/agents/trellis-implement.md +0 -41
- 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-subagent-context.py +0 -1217
- package/dist/templates/snow/agents/trellis-check.md +0 -135
- package/dist/templates/snow/agents/trellis-implement.md +0 -153
- package/dist/templates/snow/agents/trellis-research.md +0 -114
- package/dist/templates/snow/hooks/beforeSubAgentStart.json +0 -15
- package/dist/templates/trae/agents/trellis-check.md +0 -108
- package/dist/templates/trae/agents/trellis-implement.md +0 -103
- package/dist/templates/trae/agents/trellis-research.md +0 -137
- package/dist/templates/zcode/agents/trellis-check.md +0 -109
- package/dist/templates/zcode/agents/trellis-implement.md +0 -111
- package/dist/templates/zcode/agents/trellis-research.md +0 -133
package/dist/commands/update.js
CHANGED
|
@@ -3,6 +3,8 @@ import os from "node:os";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import inquirer from "inquirer";
|
|
6
|
+
import { managedBlock, mergeManagedMarkdown, readManagedMarkdown, } from "../utils/managed-markdown.js";
|
|
7
|
+
import { writeFileAtomic } from "../utils/atomic-write.js";
|
|
6
8
|
import { DIR_NAMES, FILE_NAMES, PATHS } from "../constants/paths.js";
|
|
7
9
|
import { VERSION, PACKAGE_NAME } from "../constants/version.js";
|
|
8
10
|
import { getMigrationsForVersion, getAllMigrations, getMigrationMetadata, getConfigSectionsAddedBetween, } from "../migrations/index.js";
|
|
@@ -20,22 +22,26 @@ import { agentsMdContent } from "../templates/markdown/index.js";
|
|
|
20
22
|
import { COPILOT_INSTRUCTIONS_BLOCK_END, COPILOT_INSTRUCTIONS_BLOCK_START, COPILOT_INSTRUCTIONS_PATH, getCopilotInstructions, } from "../templates/copilot/index.js";
|
|
21
23
|
import { getConfiguredPlatforms, collectPlatformTemplates, } from "../configurators/index.js";
|
|
22
24
|
import { replacePythonCommandLiterals } from "../configurators/shared.js";
|
|
23
|
-
import { preserveCodexAgentModelKeys } from "../configurators/codex.js";
|
|
24
25
|
import { printZcodeSetupHint } from "../configurators/zcode.js";
|
|
25
26
|
import { ensureGitattributes } from "../configurators/workflow.js";
|
|
26
27
|
import { pruneOrphanManifestKeys } from "../utils/manifest-prune.js";
|
|
28
|
+
import { planNativeRetirement, executeNativeRetirement, assertCurrentExecutionTree, assertNativeRetirementWrites, mixedNativeAssets, } from "../utils/retired-native-assets.js";
|
|
27
29
|
import { fetchRegistrySpecTemplates, collectDirectoryFiles, removeDirectory, parseRegistrySource, probeRegistryIndex, downloadTemplateById, } from "../utils/template-fetcher.js";
|
|
28
30
|
import { loadSpecRegistryConfig } from "../utils/registry-config.js";
|
|
29
31
|
import { cleanupEmptyDirs, TRELLIS_BLOCK_END, TRELLIS_BLOCK_START, } from "../utils/managed-paths.js";
|
|
30
32
|
export { cleanupEmptyDirs, TRELLIS_BLOCK_END, TRELLIS_BLOCK_START, } from "../utils/managed-paths.js";
|
|
33
|
+
function writeUpdateFile(file) {
|
|
34
|
+
if (file.previousContent === undefined) {
|
|
35
|
+
fs.writeFileSync(file.path, file.newContent);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (file.previousContent !== undefined &&
|
|
39
|
+
readManagedMarkdown(file.path) !== file.previousContent) {
|
|
40
|
+
throw new Error(`Managed Markdown changed before write: ${file.relativePath}`);
|
|
41
|
+
}
|
|
42
|
+
writeFileAtomic(file.path, file.newContent, file.previousContent === null ? undefined : fs.statSync(file.path).mode);
|
|
43
|
+
}
|
|
31
44
|
const CLAUDE_SETTINGS_PATH = ".claude/settings.json";
|
|
32
|
-
const LEGACY_UNTRACKED_AGENTS_MD_BLOCK_HASHES = new Set([
|
|
33
|
-
// v0.5.0-beta.17 and earlier wrote AGENTS.md but did not hash-track it.
|
|
34
|
-
// This hash is the pristine Trellis-managed block before the Subagents
|
|
35
|
-
// section was added, so old untouched projects can be updated without a
|
|
36
|
-
// false "modified by you" conflict.
|
|
37
|
-
"c1f511b1cfc1902f2147da159f09cc51f380b0c9e341cdb3ac5dea5233f3e307",
|
|
38
|
-
]);
|
|
39
45
|
// Paths that should never be touched (true user data)
|
|
40
46
|
// spec/ is user-customized content created during init; update should never modify it
|
|
41
47
|
const PROTECTED_PATHS = [
|
|
@@ -46,28 +52,15 @@ const PROTECTED_PATHS = [
|
|
|
46
52
|
`${DIR_NAMES.WORKFLOW}/.current-task`,
|
|
47
53
|
];
|
|
48
54
|
function getManagedBlock(content, startMarker, endMarker) {
|
|
49
|
-
|
|
50
|
-
if (start === -1) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
const end = content.indexOf(endMarker, start);
|
|
54
|
-
if (end === -1) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
return content.slice(start, end + endMarker.length);
|
|
58
|
-
}
|
|
59
|
-
function getTrellisManagedBlock(content) {
|
|
60
|
-
return getManagedBlock(content, TRELLIS_BLOCK_START, TRELLIS_BLOCK_END);
|
|
55
|
+
return managedBlock(content, startMarker, endMarker);
|
|
61
56
|
}
|
|
62
57
|
function replaceManagedBlock(existingContent, templateContent, startMarker, endMarker) {
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const existingEnd = existingContent.indexOf(endMarker, existingStart);
|
|
68
|
-
if (existingEnd === -1) {
|
|
58
|
+
const previous = managedBlock(existingContent, startMarker, endMarker);
|
|
59
|
+
if (!previous) {
|
|
69
60
|
return null;
|
|
70
61
|
}
|
|
62
|
+
const existingStart = existingContent.indexOf(startMarker);
|
|
63
|
+
const existingEnd = existingStart + previous.length - endMarker.length;
|
|
71
64
|
const templateBlock = getManagedBlock(templateContent, startMarker, endMarker);
|
|
72
65
|
if (!templateBlock) {
|
|
73
66
|
return null;
|
|
@@ -85,15 +78,14 @@ function mergeManagedBlockContent(existingContent, templateContent, startMarker,
|
|
|
85
78
|
if (!templateBlock) {
|
|
86
79
|
return templateContent;
|
|
87
80
|
}
|
|
88
|
-
|
|
89
|
-
return `${trimmed}\n\n${templateBlock}\n`;
|
|
81
|
+
return mergeManagedMarkdown(existingContent, templateContent, startMarker, endMarker);
|
|
90
82
|
}
|
|
91
83
|
function buildManagedBlockTemplate(cwd, relativePath, templateContent, startMarker, endMarker) {
|
|
92
84
|
const fullPath = path.join(cwd, ...relativePath.split("/"));
|
|
93
|
-
|
|
85
|
+
const existingContent = readManagedMarkdown(fullPath);
|
|
86
|
+
if (existingContent === null) {
|
|
94
87
|
return templateContent;
|
|
95
88
|
}
|
|
96
|
-
const existingContent = fs.readFileSync(fullPath, "utf-8");
|
|
97
89
|
return mergeManagedBlockContent(existingContent, templateContent, startMarker, endMarker);
|
|
98
90
|
}
|
|
99
91
|
function buildAgentsMdTemplate(cwd) {
|
|
@@ -102,16 +94,6 @@ function buildAgentsMdTemplate(cwd) {
|
|
|
102
94
|
function buildCopilotInstructionsTemplate(cwd) {
|
|
103
95
|
return buildManagedBlockTemplate(cwd, COPILOT_INSTRUCTIONS_PATH, getCopilotInstructions(), COPILOT_INSTRUCTIONS_BLOCK_START, COPILOT_INSTRUCTIONS_BLOCK_END);
|
|
104
96
|
}
|
|
105
|
-
function isKnownUntrackedTemplate(relativePath, existingContent) {
|
|
106
|
-
if (relativePath !== FILE_NAMES.AGENTS) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
const managedBlock = getTrellisManagedBlock(existingContent);
|
|
110
|
-
if (!managedBlock) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
return LEGACY_UNTRACKED_AGENTS_MD_BLOCK_HASHES.has(computeHash(managedBlock));
|
|
114
|
-
}
|
|
115
97
|
function isSafeUntrackedCopilotInstructionsMerge(relativePath, existingContent, newContent) {
|
|
116
98
|
if (relativePath !== COPILOT_INSTRUCTIONS_PATH) {
|
|
117
99
|
return false;
|
|
@@ -528,6 +510,24 @@ function preserveExistingRegistryConfig(cwd, template) {
|
|
|
528
510
|
` source: ${registry.source}\n` +
|
|
529
511
|
(registry.template ? ` template: ${registry.template}\n` : ""));
|
|
530
512
|
}
|
|
513
|
+
const RUNTIME_IGNORE_RULES = [
|
|
514
|
+
"session-handoffs/",
|
|
515
|
+
"tasks/**/provider-stderr.log",
|
|
516
|
+
];
|
|
517
|
+
function runtimeIgnoreContent(existing) {
|
|
518
|
+
const lines = existing.split(/\r?\n/).map((line) => line.trim());
|
|
519
|
+
const missing = RUNTIME_IGNORE_RULES.filter((rule) => {
|
|
520
|
+
const index = lines.lastIndexOf(rule);
|
|
521
|
+
return (index < 0 || lines.slice(index + 1).some((line) => line.startsWith("!")));
|
|
522
|
+
});
|
|
523
|
+
return missing.length
|
|
524
|
+
? existing +
|
|
525
|
+
(existing.endsWith("\n") ? "\n" : "\n\n") +
|
|
526
|
+
"# Private Trellis handoff and provider diagnostics\n" +
|
|
527
|
+
missing.join("\n") +
|
|
528
|
+
"\n"
|
|
529
|
+
: existing;
|
|
530
|
+
}
|
|
531
531
|
async function collectRegistrySpecTemplates(cwd) {
|
|
532
532
|
const config = loadSpecRegistryConfig(cwd);
|
|
533
533
|
if (!config)
|
|
@@ -606,7 +606,11 @@ bypassUpdateSkip = false) {
|
|
|
606
606
|
// Configuration
|
|
607
607
|
files.set(`${DIR_NAMES.WORKFLOW}/teamwork.json`, teamworkConfigTemplate);
|
|
608
608
|
files.set(`${DIR_NAMES.WORKFLOW}/config.yaml`, preserveExistingRegistryConfig(cwd, configYamlTemplate));
|
|
609
|
-
|
|
609
|
+
const ignorePath = `${DIR_NAMES.WORKFLOW}/.gitignore`;
|
|
610
|
+
const existingIgnore = path.join(cwd, ignorePath);
|
|
611
|
+
files.set(ignorePath, fs.existsSync(existingIgnore)
|
|
612
|
+
? runtimeIgnoreContent(fs.readFileSync(existingIgnore, "utf8"))
|
|
613
|
+
: gitignoreTemplate);
|
|
610
614
|
// workflow.md is included here because it is runtime-parsed by
|
|
611
615
|
// get_context.py and shared hooks. Keep it on the normal template update
|
|
612
616
|
// path: if the installed file still matches the tracked hash, update the
|
|
@@ -630,14 +634,6 @@ bypassUpdateSkip = false) {
|
|
|
630
634
|
}
|
|
631
635
|
}
|
|
632
636
|
}
|
|
633
|
-
// Users configure sub-agent models by editing `model` /
|
|
634
|
-
// `model_reasoning_effort` directly on the generated agent tomls. Preserve
|
|
635
|
-
// those two keys from the on-disk files into the freshly rendered desired
|
|
636
|
-
// content so a project whose only local edit is these keys is not flagged
|
|
637
|
-
// as a modified-file conflict by the hash comparison below.
|
|
638
|
-
if (platforms.has("codex")) {
|
|
639
|
-
preserveCodexAgentModelKeys(cwd, files);
|
|
640
|
-
}
|
|
641
637
|
preserveExistingClaudeStatusLine(cwd, files);
|
|
642
638
|
for (const [filePath, content] of await collectRegistrySpecTemplates(cwd)) {
|
|
643
639
|
files.set(filePath, content);
|
|
@@ -684,6 +680,9 @@ function analyzeChanges(cwd, hashes, templates) {
|
|
|
684
680
|
path: fullPath,
|
|
685
681
|
relativePath,
|
|
686
682
|
newContent,
|
|
683
|
+
previousContent: relativePath === FILE_NAMES.AGENTS
|
|
684
|
+
? readManagedMarkdown(fullPath)
|
|
685
|
+
: undefined,
|
|
687
686
|
status: "new",
|
|
688
687
|
};
|
|
689
688
|
if (!exists) {
|
|
@@ -709,8 +708,9 @@ function analyzeChanges(cwd, hashes, templates) {
|
|
|
709
708
|
const storedHash = hashes[relativePath];
|
|
710
709
|
const currentHash = computeHash(existingContent);
|
|
711
710
|
if ((storedHash && storedHash === currentHash) ||
|
|
712
|
-
(
|
|
713
|
-
|
|
711
|
+
(relativePath === `${DIR_NAMES.WORKFLOW}/.gitignore` &&
|
|
712
|
+
newContent.startsWith(existingContent) &&
|
|
713
|
+
newContent === runtimeIgnoreContent(existingContent)) ||
|
|
714
714
|
(!storedHash &&
|
|
715
715
|
isSafeUntrackedCopilotInstructionsMerge(relativePath, existingContent, newContent))) {
|
|
716
716
|
// Either the tracked hash matches, or this is a known pristine template
|
|
@@ -758,6 +758,8 @@ function collectUnchangedFileHashRepairs(changes, hashes) {
|
|
|
758
758
|
const key = toPosix(file.relativePath);
|
|
759
759
|
const recorded = hashes[key];
|
|
760
760
|
if (recorded === undefined) {
|
|
761
|
+
if (key === FILE_NAMES.AGENTS)
|
|
762
|
+
continue;
|
|
761
763
|
// A missing entry is only an omission for a path the receipt is meant
|
|
762
764
|
// to carry. `EXCLUDE_FROM_HASH` holds paths deliberately left out —
|
|
763
765
|
// `.trellis/.gitignore` among them — and adding those here would put
|
|
@@ -1625,6 +1627,14 @@ export async function update(options) {
|
|
|
1625
1627
|
// Migration metadata is displayed at the end to prevent scrolling off screen
|
|
1626
1628
|
// Load template hashes for modification detection
|
|
1627
1629
|
let hashes = loadHashes(cwd);
|
|
1630
|
+
const retirementHashes = { ...hashes };
|
|
1631
|
+
// Keep ownership evidence before orphan pruning removes retired paths.
|
|
1632
|
+
const nativeRetirement = planNativeRetirement(cwd, hashes, loadUpdateSkipPaths(cwd));
|
|
1633
|
+
if (nativeRetirement.deletions.length > 0) {
|
|
1634
|
+
console.log(chalk.cyan("Retiring native execution assets:"));
|
|
1635
|
+
for (const entry of nativeRetirement.deletions)
|
|
1636
|
+
console.log(` Delete: ${entry.path}`);
|
|
1637
|
+
}
|
|
1628
1638
|
const zcodeConfigured = getConfiguredPlatforms(cwd).has("zcode");
|
|
1629
1639
|
const isFirstHashTracking = Object.keys(hashes).length === 0;
|
|
1630
1640
|
// Handle unknown version - skip regular migrations but safe-file-delete still runs
|
|
@@ -1674,7 +1684,37 @@ export async function update(options) {
|
|
|
1674
1684
|
return md.breaking && md.recommendMigrate;
|
|
1675
1685
|
})();
|
|
1676
1686
|
// Collect templates (used for both migration classification and change analysis)
|
|
1687
|
+
const agentsSnapshot = readManagedMarkdown(path.join(cwd, FILE_NAMES.AGENTS));
|
|
1677
1688
|
const templates = await collectTemplateFiles(cwd, codexUpgradeNeeded ? new Set(["codex"]) : undefined, breakingBypass);
|
|
1689
|
+
const mixedBaselines = new Map();
|
|
1690
|
+
for (const relative of mixedNativeAssets) {
|
|
1691
|
+
const template = templates.get(relative);
|
|
1692
|
+
const absolute = path.join(cwd, relative);
|
|
1693
|
+
if (template === undefined || !fs.existsSync(absolute))
|
|
1694
|
+
continue;
|
|
1695
|
+
const current = fs.readFileSync(absolute, "utf8");
|
|
1696
|
+
if (nativeRetirement.edits.has(relative)) {
|
|
1697
|
+
mixedBaselines.set(relative, template);
|
|
1698
|
+
}
|
|
1699
|
+
else if (current !== template &&
|
|
1700
|
+
hashes[relative] === computeHash(current)) {
|
|
1701
|
+
// A mixed-content receipt cannot authorize replacing user fields.
|
|
1702
|
+
hashes[relative] = computeHash(template);
|
|
1703
|
+
mixedBaselines.set(relative, template);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
for (const [relative, content] of nativeRetirement.edits) {
|
|
1707
|
+
templates.set(relative, content);
|
|
1708
|
+
}
|
|
1709
|
+
for (const [relative, hash] of nativeRetirement.originalHashes) {
|
|
1710
|
+
hashes[relative] = hash;
|
|
1711
|
+
retirementHashes[relative] = hash;
|
|
1712
|
+
}
|
|
1713
|
+
assertNativeRetirementWrites(cwd, templates, retirementHashes, nativeRetirement.edits);
|
|
1714
|
+
if (readManagedMarkdown(path.join(cwd, FILE_NAMES.AGENTS)) !==
|
|
1715
|
+
agentsSnapshot) {
|
|
1716
|
+
throw new Error("AGENTS.md changed during template collection; preview again");
|
|
1717
|
+
}
|
|
1678
1718
|
// Load update.skip paths (used for both safe-file-delete and template collection)
|
|
1679
1719
|
const skipPaths = loadUpdateSkipPaths(cwd);
|
|
1680
1720
|
// Collect safe-file-delete items from ALL manifests (hash match is the safety net)
|
|
@@ -1794,7 +1834,9 @@ export async function update(options) {
|
|
|
1794
1834
|
changes.autoUpdateFiles.length === 0 &&
|
|
1795
1835
|
changes.changedFiles.length === 0 &&
|
|
1796
1836
|
!hasPendingMigrations &&
|
|
1797
|
-
!hasSafeDeletes
|
|
1837
|
+
!hasSafeDeletes &&
|
|
1838
|
+
nativeRetirement.deletions.length === 0) {
|
|
1839
|
+
assertCurrentExecutionTree(cwd);
|
|
1798
1840
|
// The "already up to date" exit still has to repair the receipt: this is
|
|
1799
1841
|
// exactly the clean tree where every file is `unchanged`, so it is the run
|
|
1800
1842
|
// where a wrong entry would otherwise be skipped again.
|
|
@@ -1906,6 +1948,7 @@ export async function update(options) {
|
|
|
1906
1948
|
];
|
|
1907
1949
|
});
|
|
1908
1950
|
const backupDir = createFullBackup(cwd, [
|
|
1951
|
+
...nativeRetirement.deletions.map((entry) => entry.path),
|
|
1909
1952
|
...templates.keys(),
|
|
1910
1953
|
...changes.changedFiles.map((file) => `${file.relativePath}.new`),
|
|
1911
1954
|
...migrationScope,
|
|
@@ -1938,6 +1981,7 @@ export async function update(options) {
|
|
|
1938
1981
|
}
|
|
1939
1982
|
}
|
|
1940
1983
|
// Execute safe-file-delete (after backup, before template writes)
|
|
1984
|
+
executeNativeRetirement(cwd, nativeRetirement);
|
|
1941
1985
|
let safeDeleted = 0;
|
|
1942
1986
|
if (hasSafeDeletes) {
|
|
1943
1987
|
safeDeleted = executeSafeFileDeletes(safeFileDeletes, cwd);
|
|
@@ -1957,7 +2001,7 @@ export async function update(options) {
|
|
|
1957
2001
|
for (const file of changes.newFiles) {
|
|
1958
2002
|
const dir = path.dirname(file.path);
|
|
1959
2003
|
fs.mkdirSync(dir, { recursive: true });
|
|
1960
|
-
|
|
2004
|
+
writeUpdateFile(file);
|
|
1961
2005
|
// Make scripts executable
|
|
1962
2006
|
if (file.relativePath.endsWith(".sh") ||
|
|
1963
2007
|
file.relativePath.endsWith(".py")) {
|
|
@@ -1971,7 +2015,7 @@ export async function update(options) {
|
|
|
1971
2015
|
if (changes.autoUpdateFiles.length > 0) {
|
|
1972
2016
|
console.log(chalk.blue("\nAuto-updating template files..."));
|
|
1973
2017
|
for (const file of changes.autoUpdateFiles) {
|
|
1974
|
-
|
|
2018
|
+
writeUpdateFile(file);
|
|
1975
2019
|
// Make scripts executable
|
|
1976
2020
|
if (file.relativePath.endsWith(".sh") ||
|
|
1977
2021
|
file.relativePath.endsWith(".py")) {
|
|
@@ -1988,7 +2032,7 @@ export async function update(options) {
|
|
|
1988
2032
|
for (const file of changes.changedFiles) {
|
|
1989
2033
|
const action = await promptConflictResolution(file, options, applyToAll);
|
|
1990
2034
|
if (action === "overwrite") {
|
|
1991
|
-
|
|
2035
|
+
writeUpdateFile(file);
|
|
1992
2036
|
if (file.relativePath.endsWith(".sh") ||
|
|
1993
2037
|
file.relativePath.endsWith(".py")) {
|
|
1994
2038
|
fs.chmodSync(file.path, "755");
|
|
@@ -2020,18 +2064,25 @@ export async function update(options) {
|
|
|
2020
2064
|
}
|
|
2021
2065
|
}
|
|
2022
2066
|
// Update version file
|
|
2067
|
+
assertCurrentExecutionTree(cwd);
|
|
2023
2068
|
updateVersionFile(cwd);
|
|
2024
2069
|
// Update template hashes for new, auto-updated, and overwritten files
|
|
2025
2070
|
const filesToHash = new Map(unchangedFileHashRepairs);
|
|
2026
2071
|
for (const file of changes.newFiles) {
|
|
2072
|
+
if (file.relativePath === `${DIR_NAMES.WORKFLOW}/.gitignore`)
|
|
2073
|
+
continue;
|
|
2027
2074
|
filesToHash.set(file.relativePath, file.newContent);
|
|
2028
2075
|
}
|
|
2029
2076
|
// Auto-updated files always get new hash
|
|
2030
2077
|
for (const file of changes.autoUpdateFiles) {
|
|
2078
|
+
if (file.relativePath === `${DIR_NAMES.WORKFLOW}/.gitignore`)
|
|
2079
|
+
continue;
|
|
2031
2080
|
filesToHash.set(file.relativePath, file.newContent);
|
|
2032
2081
|
}
|
|
2033
2082
|
// Only hash overwritten files (not skipped or .new copies)
|
|
2034
2083
|
for (const file of changes.changedFiles) {
|
|
2084
|
+
if (file.relativePath === `${DIR_NAMES.WORKFLOW}/.gitignore`)
|
|
2085
|
+
continue;
|
|
2035
2086
|
const fullPath = path.join(cwd, file.relativePath);
|
|
2036
2087
|
if (fs.existsSync(fullPath)) {
|
|
2037
2088
|
const content = fs.readFileSync(fullPath, "utf-8");
|
|
@@ -2040,6 +2091,9 @@ export async function update(options) {
|
|
|
2040
2091
|
}
|
|
2041
2092
|
}
|
|
2042
2093
|
}
|
|
2094
|
+
for (const [relative, template] of mixedBaselines) {
|
|
2095
|
+
filesToHash.set(relative, template);
|
|
2096
|
+
}
|
|
2043
2097
|
if (filesToHash.size > 0) {
|
|
2044
2098
|
updateHashes(cwd, filesToHash);
|
|
2045
2099
|
}
|