@codyswann/lisa 2.289.1 → 2.289.2

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.
Files changed (67) hide show
  1. package/dist/core/lisa.d.ts +15 -2
  2. package/dist/core/lisa.d.ts.map +1 -1
  3. package/dist/core/lisa.js +41 -5
  4. package/dist/core/lisa.js.map +1 -1
  5. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  6. package/dist/core/upstream-evidence-manifest.js +3 -1
  7. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  8. package/dist/utils/index.d.ts +1 -0
  9. package/dist/utils/index.d.ts.map +1 -1
  10. package/dist/utils/index.js +1 -0
  11. package/dist/utils/index.js.map +1 -1
  12. package/dist/utils/linked-worktree.d.ts +18 -0
  13. package/dist/utils/linked-worktree.d.ts.map +1 -0
  14. package/dist/utils/linked-worktree.js +42 -0
  15. package/dist/utils/linked-worktree.js.map +1 -0
  16. package/package.json +1 -1
  17. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-agy/plugin.json +1 -1
  20. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  23. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-expo-agy/plugin.json +1 -1
  30. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  40. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  45. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  50. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-rails-agy/plugin.json +1 -1
  55. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  59. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  60. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  65. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  67. package/scripts/install-claude-plugins.sh +61 -2
@@ -300,11 +300,66 @@ if ! command -v claude &>/dev/null; then exit 0; fi
300
300
  # (a removed plugin comes back on the next install) survives at the cost of a
301
301
  # single `claude plugin list` call.
302
302
  LISA_VERSION="$(node -e "console.log(require('$LISA_DIR/package.json').version || '')" 2>/dev/null || true)"
303
+
304
+ # Linked worktrees inherit the primary checkout's sync state. The marker is
305
+ # gitignored on purpose (it records THIS machine's ~/.claude plugin state, so
306
+ # it must not travel to other machines via git) — but that means every fresh
307
+ # agent worktree (.claude/worktrees/<ticket>, ~/.codex/worktrees/<ticket>)
308
+ # starts marker-less and paid the full sync: marketplace pulls plus a dozen
309
+ # Claude CLI spawns per ticket. Derive the primary checkout from
310
+ # --git-common-dir (the same defended pattern install-pkgs.sh uses to link
311
+ # node_modules, add08b409) and read its marker instead. Worktrees never WRITE
312
+ # the primary marker: a full sync run from a worktree reinstalls plugins for
313
+ # the worktree's own projectPath only, so recording it as the primary's synced
314
+ # state would let the primary skip the forced reinstall it still needs after a
315
+ # version bump.
316
+ IS_LINKED_WORKTREE=false
317
+ PRIMARY_ROOT=""
318
+ GIT_COMMON_DIR="$(git -C "$PROJECT_ROOT" rev-parse --path-format=absolute --git-common-dir 2>/dev/null || true)"
319
+ if [ -n "$GIT_COMMON_DIR" ]; then
320
+ PRIMARY_ROOT="$(dirname "$GIT_COMMON_DIR")"
321
+ if [ "$PRIMARY_ROOT" != "$PROJECT_ROOT" ] && [ -d "$PRIMARY_ROOT/.claude" ]; then
322
+ IS_LINKED_WORKTREE=true
323
+ else
324
+ PRIMARY_ROOT=""
325
+ fi
326
+ fi
327
+
303
328
  PLUGIN_SYNC_MARKER="$PROJECT_ROOT/.claude/.lisa-plugins-synced"
329
+
330
+ marker_current() {
331
+ [ -n "$LISA_VERSION" ] && [ -f "$1" ] \
332
+ && [ "$(cat "$1" 2>/dev/null)" = "$LISA_VERSION" ]
333
+ }
334
+
304
335
  FORCE_PLUGIN_SYNC=true
305
- if [ -n "$LISA_VERSION" ] && [ -f "$PLUGIN_SYNC_MARKER" ] \
306
- && [ "$(cat "$PLUGIN_SYNC_MARKER" 2>/dev/null)" = "$LISA_VERSION" ]; then
336
+ if marker_current "$PLUGIN_SYNC_MARKER"; then
307
337
  FORCE_PLUGIN_SYNC=false
338
+ elif [ "$IS_LINKED_WORKTREE" = "true" ] \
339
+ && marker_current "$PRIMARY_ROOT/.claude/.lisa-plugins-synced"; then
340
+ FORCE_PLUGIN_SYNC=false
341
+ fi
342
+
343
+ # In a linked worktree whose sync state is already settled (its own marker or
344
+ # the primary checkout's marker is current for this Lisa version) there is
345
+ # nothing left for this script to do: the marketplace cache is machine-global
346
+ # (already refreshed when the primary synced), the heal migrations are gated
347
+ # behind the same synced state, and per-worktree plugin registration is
348
+ # handled by the coding agent's own startup — Claude Code auto-installs the
349
+ # committed .claude/settings.json enabledPlugins for a new projectPath, and
350
+ # Codex consumes the project-local .codex-plugin pointer, not Claude
351
+ # project-scope registrations. Skipping here removes every Claude CLI spawn
352
+ # from the fresh-worktree postinstall path. The #320 defense (refresh
353
+ # marketplace whenever installs happened) is preserved: this path performs no
354
+ # installs. Self-heal for the primary checkout is untouched. The worktree's
355
+ # own marker is recorded so repeat installs (and health's root-confined
356
+ # marker probe) see the settled state without reaching outside the project.
357
+ if [ "$IS_LINKED_WORKTREE" = "true" ] && [ "$FORCE_PLUGIN_SYNC" != "true" ]; then
358
+ mkdir -p "$PROJECT_ROOT/.claude" 2>/dev/null \
359
+ && printf '%s' "$LISA_VERSION" > "$PLUGIN_SYNC_MARKER" 2>/dev/null \
360
+ || true
361
+ echo "Lisa plugins already in sync for ${LISA_VERSION} (primary checkout: ${PRIMARY_ROOT}); deferring worktree plugin registration to the coding agent's startup."
362
+ exit 0
308
363
  fi
309
364
 
310
365
  INSTALLED_PLUGINS_FOR_PROJECT=""
@@ -489,6 +544,10 @@ fi
489
544
  # Record the fully-synced Lisa version so same-version installs skip the
490
545
  # marketplace pulls and forced reinstalls above. Written last so any earlier
491
546
  # failure exits (set -e) without recording a sync that did not finish.
547
+ # Always the project's OWN marker: a full sync run from a linked worktree only
548
+ # reinstalled plugins for the worktree's projectPath, so recording it against
549
+ # the primary checkout would let the primary skip the forced reinstall it
550
+ # still needs after a version bump.
492
551
  if [ -n "$LISA_VERSION" ]; then
493
552
  mkdir -p "$PROJECT_ROOT/.claude" 2>/dev/null \
494
553
  && printf '%s' "$LISA_VERSION" > "$PLUGIN_SYNC_MARKER" 2>/dev/null \