@codyswann/lisa 4.66.1 → 4.66.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.
Files changed (76) hide show
  1. package/all/copy-overwrite/scripts/lisa-commit-msg-gates.mjs +1 -1
  2. package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +3 -1
  3. package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +128 -50
  4. package/cdk/create-only/.github/workflows/deploy.yml +10 -0
  5. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  6. package/dist/core/lisa-owned-hash-ledger.js +12 -0
  7. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  8. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  9. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  10. package/dist/core/upstream-evidence-manifest.js +10 -9
  11. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  12. package/dist/opencode/plugin-templates/lisa-block-direct-issue-create.ts +19 -4
  13. package/dist/opencode/plugin-templates/parity-safety-net.sh +3 -1
  14. package/expo/create-only/.github/workflows/deploy.yml +10 -0
  15. package/nestjs/create-only/.github/workflows/deploy.yml +10 -0
  16. package/package.json +4 -4
  17. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa/hooks/parity-safety-net.sh +3 -1
  20. package/plugins/lisa/hooks/worktree-binding-guard.mjs +128 -50
  21. package/plugins/lisa-agy/hooks/parity-safety-net.sh +3 -1
  22. package/plugins/lisa-agy/plugin.json +1 -1
  23. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  26. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +3 -1
  30. package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +128 -50
  31. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +3 -1
  33. package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +128 -50
  34. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-agy/plugin.json +1 -1
  37. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  47. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  52. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  57. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails-agy/plugin.json +1 -1
  62. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  67. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  72. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/src/base/hooks/parity-safety-net.sh +3 -1
  75. package/plugins/src/base/hooks/worktree-binding-guard.mjs +128 -50
  76. package/typescript/copy-contents/.husky/commit-msg +117 -5
@@ -143,20 +143,132 @@ fi
143
143
 
144
144
  echo "🤖 Checking for AI co-authorship..."
145
145
 
146
- # Accept attribution from any supported coding agent (Claude or Codex),
147
- # case-insensitively. Claude Code emits "Co-Authored-By: Claude"; the Codex CLI
148
- # emits "Co-authored-by: Codex <noreply@openai.com>".
149
- if ! printf '%s\n' "$COMMIT_MSG" | grep -Eiq "Co-authored-by:.*(Claude|Codex)"; then
146
+ # Fleet agents — the runtimes Lisa ships plugin distributions for — pass on
147
+ # the trailer alone. Any other co-author — an agent Lisa does not distribute
148
+ # to (e.g. Devin) OR A HUMAN — also requires the AI-Agent/AI-Model/AI-Effort
149
+ # block: the gate enforces attribution, not agent gatekeeping, and a trailer
150
+ # name cannot tell a human from a non-fleet agent, so both are held to the
151
+ # same rule. The AI-* trailers describe the commit's DRIVER, not every
152
+ # co-author — a human pairing alongside an agent is covered by the agent's
153
+ # block, while a commit with ONLY a human co-author is refused by the check
154
+ # below: its AI-Agent trailer must name a listed co-author, and a human-only
155
+ # trailer block has no agent to name. (A human could still write
156
+ # "AI-Agent: <their own name>" to self-attest as the agent — the trailer is
157
+ # the attestation surface, not a proof, so the gate documents rather than
158
+ # polices that.) CodySwannGT/lisa#4282, CodySwannGT/lisa#4294.
159
+ LISA_FLEET_AGENT_RE="Claude|Codex|Cursor|OpenCode|Antigravity|Copilot"
160
+ # Co-authors come from the message's trailer block via git-interpret-trailers —
161
+ # a "Co-authored-by:" string inside prose is not attribution — and every entry
162
+ # is judged on its own, so a fleet trailer can never cover a sibling trailer
163
+ # whose agent owes metadata. The AI-* checks below read the SAME parsed
164
+ # trailer block, so an "AI-Agent:" line in body prose cannot satisfy them.
165
+ ALL_TRAILERS=$(git interpret-trailers --parse "$COMMIT_MSG_FILE" 2>/dev/null || true)
166
+ COAUTHOR_TRAILERS=$(printf '%s\n' "$ALL_TRAILERS" | grep -iE "^Co-authored-by:" || true)
167
+
168
+ if ! printf '%s\n' "$COAUTHOR_TRAILERS" | grep -Eiq "Co-authored-by:"; then
169
+ no_coauthor=1
170
+ else
171
+ no_coauthor=0
172
+ fi
173
+
174
+ nonfleet_coauthor=0
175
+ if [ "$no_coauthor" -eq 0 ]; then
176
+ while IFS= read -r trailer; do
177
+ [ -z "$trailer" ] && continue
178
+ agent_name=$(printf '%s' "${trailer#*:}" | sed -e 's/<[^>]*>//g' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
179
+ if ! printf '%s\n' "$agent_name" | grep -Eiq "^(${LISA_FLEET_AGENT_RE})([[:space:]]|$)"; then
180
+ nonfleet_coauthor=1
181
+ fi
182
+ done <<LISA_COAUTHOR_TRAILERS
183
+ $COAUTHOR_TRAILERS
184
+ LISA_COAUTHOR_TRAILERS
185
+ fi
186
+
187
+ if [ "$nonfleet_coauthor" -eq 1 ]; then
188
+ missing_agent_metadata=0
189
+ for trailer in AI-Agent AI-Model AI-Effort; do
190
+ if ! printf '%s\n' "$ALL_TRAILERS" | grep -Eiq "^${trailer}:[[:space:]]*[^[:space:]]"; then
191
+ missing_agent_metadata=1
192
+ fi
193
+ done
194
+ # The AI-Agent trailer must also NAME one of the listed co-authors —
195
+ # metadata attesting to nobody in the trailer block is not attribution.
196
+ ai_agent=$(printf '%s\n' "$ALL_TRAILERS" | grep -iE "^AI-Agent:" | head -1 | sed -E 's/^[^:]+:[[:space:]]*//;s/[[:space:]]*$//')
197
+ if [ -n "$ai_agent" ] && ! printf '%s\n' "$COAUTHOR_TRAILERS" | grep -Fqi "$ai_agent"; then
198
+ missing_agent_metadata=1
199
+ fi
200
+ if [ "$missing_agent_metadata" -eq 1 ]; then
201
+ echo ""
202
+ echo "❌ Non-fleet agents must include AI metadata trailers!"
203
+ echo ""
204
+ echo "Agents outside the supported fleet (Claude, Codex, Cursor, OpenCode,"
205
+ echo "Antigravity, Copilot) must carry provenance metadata alongside the"
206
+ echo "Co-authored-by trailer — this includes a human co-author, who is"
207
+ echo "covered by the driving agent's AI-Agent/AI-Model/AI-Effort block:"
208
+ echo " AI-Agent: <agent name>"
209
+ echo " AI-Model: <provider/model>"
210
+ echo " AI-Effort: <effort or runtime value>"
211
+ echo ""
212
+ echo "The AI-Agent value must name one of the commit's Co-authored-by"
213
+ echo "entries — it attests to which listed author is the driving agent."
214
+ echo ""
215
+ lisa_commit_gate_families ai-coauthorship
216
+ exit 1
217
+ fi
218
+ elif [ "$no_coauthor" -eq 1 ]; then
150
219
  echo ""
151
220
  echo "❌ Commit message must include AI co-authorship!"
152
221
  echo ""
153
- echo "All commits must include a Co-authored-by line for a coding agent (Claude or Codex)."
222
+ echo "All commits must include a Co-authored-by line for a supported coding agent."
223
+ echo ""
224
+ echo "Expected one of these trailers:"
225
+ echo " Co-authored-by: Claude <noreply@anthropic.com>"
226
+ echo " Co-authored-by: Codex <codex@openai.com>"
227
+ echo " Co-authored-by: Cursor <noreply@cursor.com>"
228
+ echo " Co-authored-by: OpenCode <noreply@opencode.ai>"
229
+ echo " Co-authored-by: Antigravity <noreply@google.com>"
230
+ echo " Co-authored-by: Copilot <noreply@github.com>"
231
+ echo ""
232
+ echo "OpenCode commits must also include:"
233
+ echo " AI-Agent: OpenCode"
234
+ echo " AI-Model: <provider/model>"
235
+ echo " AI-Effort: <effort or runtime value>"
236
+ echo ""
237
+ echo "Agents outside the supported fleet (e.g. Devin) may commit by supplying"
238
+ echo "the same AI-Agent/AI-Model/AI-Effort trailers with their own agent name."
154
239
  echo ""
155
240
  echo "If you're using Claude Code, use the /git:commit command"
156
241
  echo "If you're using Codex, enable commit_attribution in .codex/config.toml"
242
+ echo "If you're using OpenCode, include the OpenCode trailer and AI-* metadata"
157
243
  echo ""
158
244
  lisa_commit_gate_families ai-coauthorship
159
245
  exit 1
160
246
  fi
161
247
 
248
+ if printf '%s\n' "$COAUTHOR_TRAILERS" | grep -Eiq "Co-authored-by:.*OpenCode"; then
249
+ missing_opencode_metadata=0
250
+ if ! printf '%s\n' "$ALL_TRAILERS" | grep -Eiq "^AI-Agent:[[:space:]]*OpenCode[[:space:]]*$"; then
251
+ missing_opencode_metadata=1
252
+ fi
253
+ if ! printf '%s\n' "$ALL_TRAILERS" | grep -Eiq "^AI-Model:[[:space:]]*[^[:space:]].*$"; then
254
+ missing_opencode_metadata=1
255
+ fi
256
+ if ! printf '%s\n' "$ALL_TRAILERS" | grep -Eiq "^AI-Effort:[[:space:]]*[^[:space:]].*$"; then
257
+ missing_opencode_metadata=1
258
+ fi
259
+
260
+ if [ "$missing_opencode_metadata" -eq 1 ]; then
261
+ echo ""
262
+ echo "❌ OpenCode commits must include AI metadata trailers!"
263
+ echo ""
264
+ echo "Expected trailers:"
265
+ echo " AI-Agent: OpenCode"
266
+ echo " AI-Model: <provider/model>"
267
+ echo " AI-Effort: <effort or runtime value>"
268
+ echo ""
269
+ lisa_commit_gate_families ai-coauthorship
270
+ exit 1
271
+ fi
272
+ fi
273
+
162
274
  # END: AI GUARDRAILS