@codyswann/lisa 4.34.18 → 4.34.20
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/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +4 -0
- package/all/copy-overwrite/scripts/lib/kill-marks.mjs +6 -6
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +22 -1
- package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +58 -0
- package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +37 -2
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +6 -2
- package/all/copy-overwrite/scripts/lisa-work-item.mjs +1 -5
- package/dist/cli/doctor-worktree-work-at-risk.d.ts.map +1 -1
- package/dist/cli/doctor-worktree-work-at-risk.js +5 -2
- package/dist/cli/doctor-worktree-work-at-risk.js.map +1 -1
- package/dist/cli/worktree-prune-policy.d.ts.map +1 -1
- package/dist/cli/worktree-prune-policy.js +2 -1
- package/dist/cli/worktree-prune-policy.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +18 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +14 -11
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/parity-safety-net.sh +37 -2
- package/dist/strategies/package-lisa.js +2 -2
- package/package.json +9 -9
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/block-direct-issue-create.sh +22 -1
- package/plugins/lisa/hooks/block-managed-file-edits.sh +58 -0
- package/plugins/lisa/hooks/parity-safety-net.sh +37 -2
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +22 -1
- package/plugins/lisa-agy/hooks/parity-safety-net.sh +37 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +22 -1
- package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +58 -0
- package/plugins/lisa-copilot/hooks/parity-safety-net.sh +37 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +22 -1
- package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +58 -0
- package/plugins/lisa-cursor/hooks/parity-safety-net.sh +37 -2
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-direct-issue-create.sh +22 -1
- package/plugins/src/base/hooks/block-managed-file-edits.sh +58 -0
- package/plugins/src/base/hooks/parity-safety-net.sh +37 -2
- package/scripts/check-plugins-sync.sh +6 -2
|
@@ -162,6 +162,37 @@ describes yours:
|
|
|
162
162
|
EOF
|
|
163
163
|
)"
|
|
164
164
|
|
|
165
|
+
# How to preserve uncommitted work before an operation that would discard it.
|
|
166
|
+
#
|
|
167
|
+
# This is appended to the reasons that refuse a discarding operation, and its
|
|
168
|
+
# whole point is what it does NOT say (issue #3722). The obvious advice is
|
|
169
|
+
# "stash it first", and on a single-checkout repository that is fine. Here it
|
|
170
|
+
# is the most dangerous thing an agent can be told: the stash is ONE STACK PER
|
|
171
|
+
# CLONE, shared by every worktree, so with concurrent agents a sibling's push
|
|
172
|
+
# can shift your entry and a sibling's pop can consume it. `lint-staged` pushes
|
|
173
|
+
# one on every commit too, so agent and tooling entries interleave.
|
|
174
|
+
#
|
|
175
|
+
# A remedy fires at the exact moment an agent is holding the work most worth
|
|
176
|
+
# protecting, and a guard's own output reads as authoritative — so pointing it
|
|
177
|
+
# at shared mutable state there is worse than the refusal it accompanies.
|
|
178
|
+
#
|
|
179
|
+
# The patch file is per-worktree: `mktemp` names it, so nothing has to invent a
|
|
180
|
+
# filename, and it lives in this agent's own TMPDIR where no sibling can reach
|
|
181
|
+
# it. Untracked files are unaffected by both refused operations, so `git diff`
|
|
182
|
+
# captures everything at risk.
|
|
183
|
+
PRESERVE_GUIDANCE="$(
|
|
184
|
+
cat <<'EOF'
|
|
185
|
+
Preserve the work first, per-worktree:
|
|
186
|
+
|
|
187
|
+
git diff [-- <path>] > "$(mktemp "${TMPDIR:-/tmp}/lisa-preserve-XXXXXX.patch")"
|
|
188
|
+
|
|
189
|
+
and restore it later with `git apply <that file>`.
|
|
190
|
+
|
|
191
|
+
Do NOT reach for `git stash`. One stash stack is shared by every worktree of a
|
|
192
|
+
clone, so a concurrently running agent can consume the entry you just pushed.
|
|
193
|
+
EOF
|
|
194
|
+
)"
|
|
195
|
+
|
|
165
196
|
# block() prints the reason to stderr (surfaced to the model) and exits 2 so the
|
|
166
197
|
# Bash tool call is denied. $1 = human-readable reason for the block.
|
|
167
198
|
#
|
|
@@ -1574,7 +1605,9 @@ done <<<"$push_segments"
|
|
|
1574
1605
|
if matches "${GIT_CMD}"'reset\b.*--(hard|merge)\b'; then
|
|
1575
1606
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1 \
|
|
1576
1607
|
&& [ -n "$(git status --porcelain 2>/dev/null)" ]; then
|
|
1577
|
-
block "git reset --hard/--merge on a dirty working tree would discard uncommitted changes (
|
|
1608
|
+
block "git reset --hard/--merge on a dirty working tree would discard uncommitted changes (commit first, or preserve as below)" "$PRESERVE_GUIDANCE
|
|
1609
|
+
|
|
1610
|
+
$DESTRUCTIVE_GUIDANCE"
|
|
1578
1611
|
fi
|
|
1579
1612
|
fi
|
|
1580
1613
|
|
|
@@ -1624,7 +1657,9 @@ if matches "${GIT_CHECKOUT}${GIT_TOKENS}"'--([[:space:]]|$)' \
|
|
|
1624
1657
|
|| matches "${GIT_CHECKOUT}${GIT_TOKENS}"'(-[[:alnum:]]*f[[:alnum:]]*|--force)([[:space:]]|=|$)' \
|
|
1625
1658
|
|| matches "${GIT_CHECKOUT}"'[[:space:]][^;&|]*--pathspec-from-file' \
|
|
1626
1659
|
|| matches "${GIT_CHECKOUT}"'[[:space:]]+\.(/)?([[:space:]]|$)'; then
|
|
1627
|
-
block "git checkout discarding local changes (--, -f/--force, --pathspec-from-file, or bare .)
|
|
1660
|
+
block "git checkout discarding local changes (--, -f/--force, --pathspec-from-file, or bare .)" "$PRESERVE_GUIDANCE
|
|
1661
|
+
|
|
1662
|
+
$DESTRUCTIVE_GUIDANCE"
|
|
1628
1663
|
fi
|
|
1629
1664
|
|
|
1630
1665
|
# 5. `git switch` discards: `--discard-changes` and its `-f/--force` aliases.
|
|
@@ -24,7 +24,9 @@ cd "$ROOT_DIR"
|
|
|
24
24
|
|
|
25
25
|
if [ -n "$(git status --porcelain -- plugins/ 2>/dev/null)" ]; then
|
|
26
26
|
echo "✗ plugins/ has uncommitted changes before the sync check could run." >&2
|
|
27
|
-
echo " Commit
|
|
27
|
+
echo " Commit them, then re-run: bun run check:plugins" >&2
|
|
28
|
+
echo " (To set them aside instead, save a patch under your own TMPDIR — not" >&2
|
|
29
|
+
echo " the stash, which is one stack shared by every worktree of a clone.)" >&2
|
|
28
30
|
exit 1
|
|
29
31
|
fi
|
|
30
32
|
|
|
@@ -57,7 +59,9 @@ if [ -f "$MATERIALIZED_MANIFEST" ]; then
|
|
|
57
59
|
echo " These are generated by 'bun run build:plugins'. Rebuilding would" >&2
|
|
58
60
|
echo " overwrite them, so the check refuses rather than discarding an edit" >&2
|
|
59
61
|
echo " and reporting a clean tree. Edit the canonical source instead, or" >&2
|
|
60
|
-
echo " stash,
|
|
62
|
+
echo " save a patch under your own TMPDIR — not the stash, which is one" >&2
|
|
63
|
+
echo " stack shared by every worktree of a clone — then re-run:" >&2
|
|
64
|
+
echo " bun run check:plugins" >&2
|
|
61
65
|
exit 1
|
|
62
66
|
fi
|
|
63
67
|
fi
|