fss-link 1.9.3 → 1.9.4

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.
@@ -70,9 +70,15 @@ cd /path/to/project/.fss-link/worktrees/fix-auth-bug && pip install -r requireme
70
70
  ```
71
71
  exit_worktree({ name: "fix-auth-bug", action: "keep" }) # Work in progress
72
72
  exit_worktree({ name: "fix-auth-bug", action: "remove" }) # Work committed
73
- exit_worktree({ name: "fix-auth-bug", action: "remove", discard_changes: true }) # Discard everything
73
+ exit_worktree({ name: "fix-auth-bug", action: "remove", discard_changes: true }) # Discard system metadata
74
+ exit_worktree({ name: "fix-auth-bug", action: "remove", discard_changes: true, confirm_destruction: true }) # Discard everything
74
75
  ```
75
76
 
77
+ ⚠️ **WARNING:** `discard_changes: true` is a destructive action. It will permanently delete all untracked content in the worktree.
78
+
79
+ - Without `confirm_destruction`: the tool cleans up its own artifacts (.fss-link/) and lists any remaining user files. You must decide whether to delete them manually or confirm destruction.
80
+ - With `confirm_destruction: true`: ALL untracked content is destroyed, including user files. Use only when you are certain no valuable untracked content exists.
81
+
76
82
  ## Quick Reference
77
83
 
78
84
  | Situation | Action |
@@ -81,14 +87,15 @@ exit_worktree({ name: "fix-auth-bug", action: "remove", discard_changes: true })
81
87
  | Already in a worktree | Do NOT call enter_worktree again |
82
88
  | Done, work in progress | `exit_worktree({ name, action: "keep" })` |
83
89
  | Done, work committed | `exit_worktree({ name, action: "remove" })` |
84
- | Done, discard everything | `exit_worktree({ name, action: "remove", discard_changes: true })` |
90
+ | Done, discard system metadata only | `exit_worktree({ name, action: "remove", discard_changes: true })` |
91
+ | Done, discard everything | `exit_worktree({ name, action: "remove", discard_changes: true, confirm_destruction: true })` |
85
92
 
86
93
  ## Common Mistakes
87
94
 
88
95
  1. **Using relative paths** — Always use full `worktreePath` for every tool call
89
96
  2. **Creating nested worktrees** — Check path first; if it contains `.fss-link/worktrees/`, you're already in one
90
97
  3. **Running `git worktree add` manually** — Always use the `enter_worktree` tool
91
- 4. **Removing with uncommitted changes** — Commit or stash first, or use `discard_changes: true`
98
+ 4. **Removing with uncommitted changes** — Commit or stash first, or use `discard_changes: true` (system metadata only) or `confirm_destruction: true` (everything)
92
99
 
93
100
  ## Global Flags
94
101
 
package/docs/TOOLS.md CHANGED
@@ -408,10 +408,13 @@ Exits a worktree previously created by `enter_worktree`.
408
408
  |-----------|------|-------------|
409
409
  | `name` | string | Slug of the worktree to exit (must match the name used in `enter_worktree`). |
410
410
  | `action` | string | `"keep"` preserves the worktree on disk; `"remove"` deletes it and its branch. |
411
- | `discard_changes` | boolean | When `action="remove"`, must be true to delete a worktree with uncommitted changes. |
411
+ | `discard_changes` | boolean | When `action="remove"`, bypasses the dirty-worktree check. Automatically cleans up system metadata (.fss-link/). Lists remaining user files. |
412
+ | `confirm_destruction` | boolean | When `action="remove"` and `discard_changes=true`, destroys ALL untracked content including user files. Requires `discard_changes=true`. |
412
413
 
413
414
  - `action='keep'` — preserves the worktree directory and branch on disk so it can be revisited later
414
415
  - `action='remove'` — deletes the worktree directory and branch. Refuses to run if the worktree contains uncommitted changes unless `discard_changes: true` is set
416
+ - `discard_changes: true` — cleans up system metadata (.fss-link/). If other untracked files remain, lists them and refuses to proceed unless `confirm_destruction: true`
417
+ - `confirm_destruction: true` — destroys ALL untracked content. Requires `discard_changes: true`. Use with caution.
415
418
  - Only invoke when the user explicitly asks to leave or clean up a worktree
416
419
 
417
420
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fss-link",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/FSSCoding/fss-link.git"
14
14
  },
15
15
  "config": {
16
- "sandboxImageUri": "ghcr.io/fsscoding/fss-link:1.9.3"
16
+ "sandboxImageUri": "ghcr.io/fsscoding/fss-link:1.9.4"
17
17
  },
18
18
  "scripts": {
19
19
  "start": "node scripts/start.js",
@@ -95,6 +95,7 @@
95
95
  "eslint-plugin-react": "^7.37.5",
96
96
  "eslint-plugin-react-hooks": "^5.2.0",
97
97
  "eslint-plugin-vitest": "^0.5.4",
98
+ "fast-check": "^4.9.0",
98
99
  "globals": "^16.0.0",
99
100
  "ink": "^6.8.0",
100
101
  "ink-testing-library": "^4.0.0",
@@ -189,7 +190,7 @@
189
190
  "turndown": "^7.2.0",
190
191
  "turndown-plugin-gfm": "^1.0.2",
191
192
  "undici": "^7.10.0",
192
- "vite": "^8.0.14",
193
+ "vite": "^6.3.5",
193
194
  "vitest": "^4.1.7",
194
195
  "xml2js": "^0.6.0",
195
196
  "yargs": "^17.7.2",