@codyswann/lisa 2.171.0 → 2.171.3
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/dist/codex/scripts/install-pkgs.sh +33 -11
- package/dist/utils/package-manager-detect.d.ts +66 -0
- package/dist/utils/package-manager-detect.d.ts.map +1 -0
- package/dist/utils/package-manager-detect.js +109 -0
- package/dist/utils/package-manager-detect.js.map +1 -0
- package/dist/utils/postinstall-trampoline.d.ts +3 -32
- package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
- package/dist/utils/postinstall-trampoline.js +22 -65
- package/dist/utils/postinstall-trampoline.js.map +1 -1
- package/package.json +9 -3
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/install-pkgs.sh +34 -12
- package/plugins/lisa/skills/generate-claude-remote-build-script/SKILL.md +25 -3
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/generate-claude-remote-build-script/SKILL.md +25 -3
- 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/install-pkgs.sh +34 -12
- package/plugins/lisa-copilot/skills/generate-claude-remote-build-script/SKILL.md +25 -3
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/install-pkgs.sh +34 -12
- package/plugins/lisa-cursor/skills/generate-claude-remote-build-script/SKILL.md +25 -3
- 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/install-pkgs.sh +34 -12
- package/plugins/src/base/skills/generate-claude-remote-build-script/SKILL.md +25 -3
- package/scripts/claude-remote-setup.sh +31 -3
- package/typescript/copy-contents/.husky/pre-push +8 -1
- package/typescript/package-lisa/package.lisa.json +10 -2
|
@@ -8,18 +8,40 @@ if [ -d "node_modules" ]; then
|
|
|
8
8
|
exit 0
|
|
9
9
|
fi
|
|
10
10
|
|
|
11
|
-
# Detect package manager
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
# Detect the package manager this project wants, honoring explicit opt-outs.
|
|
12
|
+
# Precedence: packageManager field > engines "please-use-<pm>" sentinel >
|
|
13
|
+
# lockfile presence (minus any PM the engines forbid) > npm default.
|
|
14
|
+
#
|
|
15
|
+
# This must NOT key on lockfile presence alone. An npm-only project
|
|
16
|
+
# (engines.bun = "please-use-npm", CI runs `npm ci`) that picks up a stray
|
|
17
|
+
# bun.lock would otherwise get `bun install`, re-create the bun.lock, and break
|
|
18
|
+
# — the SE-5221 regression. The engines/packageManager signals are
|
|
19
|
+
# authoritative; lockfiles are only a fallback and never override an opt-out.
|
|
20
|
+
detect_package_manager() {
|
|
21
|
+
_field="" _forced="" _forbidden=""
|
|
22
|
+
if [ -f package.json ] && command -v jq >/dev/null 2>&1; then
|
|
23
|
+
_field=$(jq -r '(.packageManager // "") | sub("@.*$";"")' package.json 2>/dev/null)
|
|
24
|
+
_forced=$(jq -r 'first((.engines // {})[] | strings | capture("please-use-(?<pm>bun|npm|yarn|pnpm)")?.pm) // ""' package.json 2>/dev/null)
|
|
25
|
+
_forbidden=$(jq -r '[(.engines // {}) | to_entries[] | select(((.value|strings) // "") | test("please-use|do-not-use";"i")) | .key] | join(" ")' package.json 2>/dev/null)
|
|
26
|
+
fi
|
|
27
|
+
case "$_field" in bun | npm | yarn | pnpm) printf '%s\n' "$_field"; return 0 ;; esac
|
|
28
|
+
case "$_forced" in bun | npm | yarn | pnpm) printf '%s\n' "$_forced"; return 0 ;; esac
|
|
29
|
+
_pm_allowed() { case " $_forbidden " in *" $1 "*) return 1 ;; *) return 0 ;; esac; }
|
|
30
|
+
if { [ -f bun.lockb ] || [ -f bun.lock ]; } && _pm_allowed bun; then printf 'bun\n'; return 0; fi
|
|
31
|
+
if [ -f pnpm-lock.yaml ] && _pm_allowed pnpm; then printf 'pnpm\n'; return 0; fi
|
|
32
|
+
if [ -f yarn.lock ] && _pm_allowed yarn; then printf 'yarn\n'; return 0; fi
|
|
33
|
+
if [ -f package-lock.json ] && _pm_allowed npm; then printf 'npm\n'; return 0; fi
|
|
34
|
+
printf 'npm\n'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
PACKAGE_MANAGER="$(detect_package_manager)"
|
|
38
|
+
echo "Detected package manager: ${PACKAGE_MANAGER}"
|
|
39
|
+
case "$PACKAGE_MANAGER" in
|
|
40
|
+
bun) bun install ;;
|
|
41
|
+
pnpm) pnpm install ;;
|
|
42
|
+
yarn) yarn install ;;
|
|
43
|
+
*) npm install ;;
|
|
44
|
+
esac
|
|
23
45
|
|
|
24
46
|
# The tools below use Linux-specific binaries and paths — skip on other platforms.
|
|
25
47
|
if [ "$(uname -s)" != "Linux" ]; then
|
|
@@ -101,12 +101,34 @@ need() { command -v "$1" >/dev/null 2>&1; }
|
|
|
101
101
|
require() { need "$1" || { echo "FATAL: required tool '$1' missing and install failed" >&2; exit 1; }; }
|
|
102
102
|
|
|
103
103
|
# --- package manager (REQUIRED) ---
|
|
104
|
-
|
|
104
|
+
# Resolve the PM from packageManager/engines/lockfiles — emit the manager the
|
|
105
|
+
# `packageManager` inventory field reported, NEVER a hardcoded bun. An npm-only
|
|
106
|
+
# project (engines.bun = "please-use-npm") must install with npm; emitting
|
|
107
|
+
# `bun install` would create a stray bun.lock and break it (the SE-5221
|
|
108
|
+
# regression). Only install/PATH-export the manager actually selected below.
|
|
109
|
+
detect_package_manager() {
|
|
110
|
+
_field="" _forced="" _forbidden=""
|
|
111
|
+
if [ -f package.json ] && command -v jq >/dev/null 2>&1; then
|
|
112
|
+
_field=$(jq -r '(.packageManager // "") | sub("@.*$";"")' package.json 2>/dev/null)
|
|
113
|
+
_forced=$(jq -r 'first((.engines // {})[] | strings | capture("please-use-(?<pm>bun|npm|yarn|pnpm)")?.pm) // ""' package.json 2>/dev/null)
|
|
114
|
+
_forbidden=$(jq -r '[(.engines // {}) | to_entries[] | select(((.value|strings) // "") | test("please-use|do-not-use";"i")) | .key] | join(" ")' package.json 2>/dev/null)
|
|
115
|
+
fi
|
|
116
|
+
case "$_field" in bun | npm | yarn | pnpm) printf '%s\n' "$_field"; return 0 ;; esac
|
|
117
|
+
case "$_forced" in bun | npm | yarn | pnpm) printf '%s\n' "$_forced"; return 0 ;; esac
|
|
118
|
+
_pm_allowed() { case " $_forbidden " in *" $1 "*) return 1 ;; *) return 0 ;; esac; }
|
|
119
|
+
{ [ -f bun.lockb ] || [ -f bun.lock ]; } && _pm_allowed bun && { printf 'bun\n'; return 0; }
|
|
120
|
+
[ -f pnpm-lock.yaml ] && _pm_allowed pnpm && { printf 'pnpm\n'; return 0; }
|
|
121
|
+
[ -f yarn.lock ] && _pm_allowed yarn && { printf 'yarn\n'; return 0; }
|
|
122
|
+
[ -f package-lock.json ] && _pm_allowed npm && { printf 'npm\n'; return 0; }
|
|
123
|
+
printf 'npm\n'
|
|
124
|
+
}
|
|
125
|
+
PM="$(detect_package_manager)"
|
|
126
|
+
if [ "$PM" = "bun" ] && ! need bun; then
|
|
105
127
|
curl -fsSL https://bun.sh/install | bash
|
|
128
|
+
export PATH="$HOME/.bun/bin:$PATH"
|
|
106
129
|
fi
|
|
107
|
-
export PATH="$HOME/.bun/bin:$PATH"
|
|
108
130
|
# NOTE: bun has known proxy package-fetch issues in cloud sessions; retry to survive transient proxy errors.
|
|
109
|
-
for i in 1 2 3; do
|
|
131
|
+
for i in 1 2 3; do "$PM" install && break || sleep 5; done
|
|
110
132
|
|
|
111
133
|
# --- required CLIs ---
|
|
112
134
|
need gh || (sudo apt-get update -y && sudo apt-get install -y gh)
|
|
@@ -80,12 +80,40 @@ fi
|
|
|
80
80
|
require gitleaks
|
|
81
81
|
|
|
82
82
|
# --- project dependencies ---
|
|
83
|
+
# Resolve the package manager from packageManager/engines/lockfiles rather than
|
|
84
|
+
# hardcoding bun: an npm-only project (engines.bun = "please-use-npm", CI runs
|
|
85
|
+
# `npm ci`) must install with npm, never `bun install` — which would create a
|
|
86
|
+
# stray bun.lock and break the project (the SE-5221 regression). jq is required
|
|
87
|
+
# above, so the package.json signals are always available here.
|
|
83
88
|
# bun has known proxy package-fetch issues in cloud sessions; retry transient failures.
|
|
89
|
+
detect_package_manager() {
|
|
90
|
+
_field="" _forced="" _forbidden=""
|
|
91
|
+
if [ -f package.json ]; then
|
|
92
|
+
_field=$(jq -r '(.packageManager // "") | sub("@.*$";"")' package.json 2>/dev/null)
|
|
93
|
+
_forced=$(jq -r 'first((.engines // {})[] | strings | capture("please-use-(?<pm>bun|npm|yarn|pnpm)")?.pm) // ""' package.json 2>/dev/null)
|
|
94
|
+
_forbidden=$(jq -r '[(.engines // {}) | to_entries[] | select(((.value|strings) // "") | test("please-use|do-not-use";"i")) | .key] | join(" ")' package.json 2>/dev/null)
|
|
95
|
+
fi
|
|
96
|
+
case "$_field" in bun | npm | yarn | pnpm) printf '%s\n' "$_field"; return 0 ;; esac
|
|
97
|
+
case "$_forced" in bun | npm | yarn | pnpm) printf '%s\n' "$_forced"; return 0 ;; esac
|
|
98
|
+
_pm_allowed() { case " $_forbidden " in *" $1 "*) return 1 ;; *) return 0 ;; esac; }
|
|
99
|
+
if { [ -f bun.lockb ] || [ -f bun.lock ]; } && _pm_allowed bun; then printf 'bun\n'; return 0; fi
|
|
100
|
+
if [ -f pnpm-lock.yaml ] && _pm_allowed pnpm; then printf 'pnpm\n'; return 0; fi
|
|
101
|
+
if [ -f yarn.lock ] && _pm_allowed yarn; then printf 'yarn\n'; return 0; fi
|
|
102
|
+
if [ -f package-lock.json ] && _pm_allowed npm; then printf 'npm\n'; return 0; fi
|
|
103
|
+
printf 'npm\n'
|
|
104
|
+
}
|
|
105
|
+
PM="$(detect_package_manager)"
|
|
106
|
+
case "$PM" in
|
|
107
|
+
bun) PM_INSTALL="bun install" ;;
|
|
108
|
+
pnpm) PM_INSTALL="pnpm install" ;;
|
|
109
|
+
yarn) PM_INSTALL="yarn install" ;;
|
|
110
|
+
*) PM_INSTALL="npm install" ;;
|
|
111
|
+
esac
|
|
84
112
|
if [ ! -d node_modules ]; then
|
|
85
|
-
echo "Installing project dependencies (
|
|
86
|
-
for i in 1 2 3; do
|
|
113
|
+
echo "Installing project dependencies (${PM_INSTALL})..."
|
|
114
|
+
for i in 1 2 3; do $PM_INSTALL && break || { echo "${PM_INSTALL} attempt $i failed; retrying..."; sleep 5; }; done
|
|
87
115
|
fi
|
|
88
|
-
[ -d node_modules ] || { echo "FATAL:
|
|
116
|
+
[ -d node_modules ] || { echo "FATAL: ${PM_INSTALL} failed after retries" >&2; exit 1; }
|
|
89
117
|
|
|
90
118
|
# --- OPTIONAL (only with --include-optional; dormant stacks/integrations) ---
|
|
91
119
|
if [ "$INCLUDE_OPTIONAL" = "1" ]; then
|
|
@@ -150,7 +150,14 @@ else
|
|
|
150
150
|
# `bun audit --audit-level=high --ignore ...`, parse `bun audit --json` and
|
|
151
151
|
# apply the exclusion list ourselves with jq — same approach as the npm/yarn
|
|
152
152
|
# paths above.
|
|
153
|
-
|
|
153
|
+
#
|
|
154
|
+
# `--production` scopes the audit to production dependencies, matching the
|
|
155
|
+
# npm branch (`npm audit --production`) and the yarn branch
|
|
156
|
+
# (`yarn audit --groups dependencies`). Without it, bun audits
|
|
157
|
+
# devDependencies too and the gate fails on dev-only CVEs that never ship —
|
|
158
|
+
# the SE-5221 false positive. bun honours `--production` even though
|
|
159
|
+
# `bun audit --help` omits it from the flag list.
|
|
160
|
+
AUDIT_JSON=$(bun audit --production --json 2>/dev/null || true)
|
|
154
161
|
UNFIXED_HIGH=$(echo "$AUDIT_JSON" | jq -r --arg ids "$AUDIT_EXCLUSIONS" '
|
|
155
162
|
($ids | split(" ") | map(select(length > 0))) as $ex
|
|
156
163
|
| [ .[]? | .[]?
|
|
@@ -28,12 +28,20 @@
|
|
|
28
28
|
"resolutions": {
|
|
29
29
|
"@isaacs/brace-expansion": "^5.0.1",
|
|
30
30
|
"axios": ">=1.15.2",
|
|
31
|
-
"
|
|
31
|
+
"esbuild": ">=0.28.1",
|
|
32
|
+
"handlebars": ">=4.7.9",
|
|
33
|
+
"lodash": ">=4.18.1",
|
|
34
|
+
"vite": ">=8.0.16",
|
|
35
|
+
"ws": ">=8.20.1"
|
|
32
36
|
},
|
|
33
37
|
"overrides": {
|
|
34
38
|
"@isaacs/brace-expansion": "^5.0.1",
|
|
35
39
|
"axios": ">=1.15.2",
|
|
36
|
-
"
|
|
40
|
+
"esbuild": ">=0.28.1",
|
|
41
|
+
"handlebars": ">=4.7.9",
|
|
42
|
+
"lodash": ">=4.18.1",
|
|
43
|
+
"vite": "^8.0.16",
|
|
44
|
+
"ws": ">=8.20.1"
|
|
37
45
|
}
|
|
38
46
|
},
|
|
39
47
|
"defaults": {
|