@narumitw/pi-worktree 0.51.7 → 0.51.8

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 CHANGED
@@ -46,34 +46,11 @@ Before each Git mutation, the extension runs its safety checks and shows the exa
46
46
 
47
47
  ## 💬 Commands
48
48
 
49
- Open the manager without arguments:
50
-
51
- ```text
52
- /worktree
53
- ```
54
-
55
- The root menu provides these actions:
56
-
57
- - **Worktree status** — browse a local snapshot for every registered worktree without fetching remotes.
58
- - **Add worktree** — enter a branch, optional start point, and optional path; review exact base provenance, confirm creation, and optionally switch.
59
- - **Switch worktree** — search for another existing worktree by displayed path, branch, or HEAD and continue this Pi conversation there.
60
- - **Remove worktree** — search for a linked worktree by path, branch, or HEAD, then remove it without deleting its branch.
61
- - **Prune stale metadata** — inspect Git's dry-run output, then optionally run the matching prune.
62
- - **Configure worktree root** — set a machine-local default root or submit a blank value to restore `~/.worktrees`.
63
-
64
- The root menu shows the registered count, current path, effective worktree root, its source, and any settings warning.
65
- Escape closes the root menu.
66
- `/worktree` accepts no arguments and provides no argument completions.
67
- Every operation starts through TUI or RPC dialogs, and destructive Git changes require confirmation.
68
- Print and JSON modes reject the command before any Git call.
69
- The extension owns branch and path inputs, searchable worktree selectors, preflight previews, and destructive confirmations.
70
- These flows enforce Git safety and commit-aware revalidation.
71
-
72
- The status browser runs only when selected and uses no watcher, timer, persistent cache, or network fetch.
73
- Each card shows current, main, or detached state; the full snapshot HEAD; aggregate working-tree counts; configured upstream divergence; and the last commit timestamp and subject.
74
- A missing upstream is reported as **not configured**; it is not treated as proof that no commits are unpushed.
75
- Bare, missing, prunable, or individually failing worktrees remain visible with an unavailable reason.
76
- The snapshot is informational and can become stale immediately, so Remove still performs its stricter inventory and identity checks.
49
+ Run `/worktree` to inspect, create, switch, or remove Git worktrees, prune stale metadata, and configure the default root in TUI or RPC mode.
50
+ It accepts no arguments; print and JSON modes reject it before any Git call.
51
+ Git must be installed and Pi must be inside a non-bare worktree.
52
+ Destructive changes require confirmation and never delete branches; review [Safety boundaries](#-safety-boundaries), including ignored-file and recovery-pointer loss.
53
+ See [Add defaults](#-add-defaults) for creation rules and [Pi workspace switching](#-pi-workspace-switching) for conversation transfer and failure recovery.
77
54
 
78
55
  ## 🌿 Add defaults
79
56
 
@@ -185,6 +162,11 @@ Resolve the reported Pi or session issue, then run `/worktree` and choose **Swit
185
162
  - The status browser uses only local Git state and never fetches a remote; its cards never authorize Remove or Prune.
186
163
  - The extension does not commit, push, fetch, rebase, repair, move, lock, or unlock worktrees.
187
164
 
165
+ Status is an on-demand local snapshot of each worktree's state, full HEAD, working-tree counts, upstream divergence, and last commit.
166
+ Unavailable worktrees remain visible with a reason.
167
+ A missing upstream means **not configured**, not proof that no commits are unpushed.
168
+ Snapshots can become stale immediately and never replace the stricter Remove and Prune checks.
169
+
188
170
  Use Git directly for force removal, branch deletion, custom prune expiry, detach or orphan creation, move, repair, lock, unlock, and remote refresh operations.
189
171
 
190
172
  ## 🚧 Limitations
@@ -198,40 +180,20 @@ Use Git directly for force removal, branch deletion, custom prune expiry, detach
198
180
 
199
181
  ```text
200
182
  packages/pi-worktree/
201
- ├── src/
202
- │ ├── index.ts
203
- │ ├── command.ts
204
- │ ├── git.ts
205
- │ ├── session.ts
206
- │ ├── settings.ts
207
- │ ├── status.ts
208
- │ └── worktree.ts
209
- ├── dist/ # Generated source-mapped Jiti runtime
210
- ├── scripts/
211
- │ └── build-runtime.mjs
212
- ├── test/
213
- │ ├── add-command.test.ts
214
- │ ├── command-test-support.ts
215
- │ ├── command.test.ts
216
- │ ├── build-runtime.test.ts
217
- │ ├── git.integration.test.ts
218
- │ ├── git.test.ts
219
- │ ├── remove-ignored-command.test.ts
220
- │ ├── session.test.ts
221
- │ ├── settings-command.test.ts
222
- │ ├── settings.test.ts
223
- │ ├── status-command.test.ts
224
- │ └── status.test.ts
225
- ├── package.json
226
- ├── README.md
227
- ├── LICENSE
228
- └── tsconfig.json
183
+ ├── src/ # Authoritative implementation and helpers
184
+ │ ├── index.ts # Thin Pi entrypoint
185
+ │ └── worktree.ts # Worktree manager and lifecycle
186
+ ├── dist/ # Generated Jiti runtime
187
+ ├── scripts/build-runtime.mjs # Runtime builder
188
+ └── test/ # Behavior and lifecycle coverage
229
189
  ```
230
190
 
191
+ The generated runtime is built from `src/index.ts` and does not import back into `src`.
192
+
231
193
  ## 🔎 Keywords
232
194
 
233
195
  `pi-package`, `pi-extension`, `git`, `worktree`, `workspace`, `session`
234
196
 
235
197
  ## 📄 License
236
198
 
237
- MIT
199
+ [MIT](./LICENSE)