{"version":"2.1.330","anchor":"new-start-dir-cli-option-and-vcsdetectvcsdiffturncomp","canonical_anchor":"new-start-dir-cli-option-and-vcsdetectvcsdiffturncomp","heading":"Mods gain vcs.* hooks to supply their own version control","tier":"use","area":"Startup","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/new-start-dir-cli-option-and-vcsdetectvcsdiffturncomp","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### Mods gain vcs.* hooks to supply their own version control\n\nNew vcs.detect, vcs.diff, vcs.isolate, vcs.list, vcs.status and vcs.release hooks let a mod provide version control, alongside other new mod calls\n\n**Unclear.** It is not clear which command accepts --start-dir or whether mods can reach the new entries yet.\n\n**What**\n\nA mod is a user-written add-on, and a hook is code a mod runs at a set point. This release adds a set of `vcs.*` hooks and calls. With them, a mod can supply its own version control, the system that tracks changes to files (git is one example).\n\n- `vcs.detect`, `vcs.diff`, `vcs.isolate`, `vcs.list`, `vcs.status` and `vcs.release` are registered in the hook table, the plugin host-call table and the mod operation lists. They cover detecting the version control, showing differences, and isolating, listing, checking and releasing worktrees (separate working copies of a project).\n\n- `vcs.detect` and `vcs.diff` also get handlers, and `vcs.detect` is already connected in many places.\n\n- `EnterWorktree` now checks whether a mod has hooked `vcs.list` when it works out a worktree's path. Worktrees made by a mod are handled separately.\n\n- A new `session.machine` call gives a mod the operating system, package managers and runtimes on the machine.\n\n- The mod capability list gains a `turn.complete` event.\n\n- The hook settings format accepts an optional `on_failure` field.\n\n- Replies to on-screen prompts drawn by a mod can now arrive later, `ui_attach` requests clear any waiting late answers, and the timing of presses is recorded.\n\n- A new `--start-dir` command-line option adds a folder to a `startDirs` list. What reads that list was not traced.\n\nNo built-in handler for the `vcs.*` hooks was found, though none was searched for.\n\n**Why**\n\nNothing changes until a mod registers one of these hooks. Once one does, a project could use version control other than git for worktrees and change tracking, and mod authors have new calls to work with.\n\n- Area: Startup\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 4\/5\n- Scope: individual\n- Heads-up: no"}