@codyswann/lisa 2.322.8 → 2.323.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 (56) hide show
  1. package/all/copy-overwrite/scripts/lisa-work-item.mjs +78 -11
  2. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  3. package/dist/core/upstream-evidence-manifest.js +4 -2
  4. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  5. package/package.json +1 -1
  6. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  7. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  8. package/plugins/lisa-agy/plugin.json +1 -1
  9. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  11. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  12. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  14. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  18. package/plugins/lisa-expo-agy/plugin.json +1 -1
  19. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  24. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  29. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  33. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  34. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  38. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  39. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  43. package/plugins/lisa-rails-agy/plugin.json +1 -1
  44. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  49. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  53. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  54. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  56. package/scripts/lisa-work-item.mjs +8 -1
@@ -15,6 +15,7 @@ import {
15
15
  writeFileSync,
16
16
  } from "node:fs";
17
17
  import { dirname, join, resolve } from "node:path";
18
+ import { pathToFileURL } from "node:url";
18
19
 
19
20
  const RELEASE_SUBJECT =
20
21
  /^chore\(release\): \d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)? \[skip ci\]$/;
@@ -27,6 +28,46 @@ const GUIDANCE = [
27
28
 
28
29
  class TrackingError extends Error {}
29
30
 
31
+ /**
32
+ * Say which of three different failures a `gh` invocation actually hit.
33
+ *
34
+ * The three are indistinguishable from an exit status alone, and they send the
35
+ * reader to three different places: a missing binary is an environment to
36
+ * provision, a refused credential is an access grant to obtain, and only the
37
+ * third is anything to do with the ticket.
38
+ *
39
+ * Collapsing them cost a real round trip. On Claude Code web, where `gh` is not
40
+ * pre-installed, every commit was refused with "issue #2202 does not exist or
41
+ * is inaccessible" — about an issue that was open and correct. The message
42
+ * accused the ticket, so that is where the reader went.
43
+ * @param {{status: number|null, error?: Error, stderr?: string}} result Spawn result.
44
+ * @param {string} ref Work item reference, for the message.
45
+ * @param {string} noun What the reference names.
46
+ * @returns {string} A message naming the actual fault.
47
+ */
48
+ export function githubFailureReason(result, ref, noun) {
49
+ if (result.error?.code === "ENOENT") {
50
+ return (
51
+ `the GitHub CLI (gh) is not installed, so ${noun} ${ref} could not be ` +
52
+ `checked.\nThis is an environment gap, not a problem with the work item. ` +
53
+ `Pin gh in remoteEnv.tools.install for surfaces that lack it.`
54
+ );
55
+ }
56
+ const stderr = String(result.stderr ?? "");
57
+ if (
58
+ /not enabled for this session|gh auth login|HTTP 40[13]|Bad credentials|authentication/i.test(
59
+ stderr
60
+ )
61
+ ) {
62
+ return (
63
+ `the GitHub CLI cannot authenticate, so ${noun} ${ref} could not be ` +
64
+ `checked.\nThis is a credential gap, not a problem with the work item.` +
65
+ `\n${stderr.trim().slice(0, 300)}`
66
+ );
67
+ }
68
+ return `${noun} ${ref} does not exist or is inaccessible`;
69
+ }
70
+
30
71
  function run(command, args, options = {}) {
31
72
  const result = spawnSync(command, args, {
32
73
  cwd: options.cwd ?? process.cwd(),
@@ -537,9 +578,7 @@ function githubIssue(ref, contract) {
537
578
  }
538
579
  );
539
580
  if (result.status !== 0)
540
- throw new TrackingError(
541
- `GitHub issue ${ref} does not exist or is inaccessible`
542
- );
581
+ throw new TrackingError(githubFailureReason(result, ref, "GitHub issue"));
543
582
  const issue = safeJson(result.stdout, `GitHub issue ${ref}`);
544
583
  if (String(issue.number) !== number)
545
584
  throw new TrackingError(`GitHub returned the wrong issue for ${ref}`);
@@ -1165,12 +1204,40 @@ function main() {
1165
1204
  );
1166
1205
  }
1167
1206
 
1168
- try {
1169
- main();
1170
- } catch (error) {
1171
- const detail = error instanceof Error ? error.message : String(error);
1172
- console.error(
1173
- `\n❌ Work-item tracking blocked this operation: ${detail}\n\n${GUIDANCE}\n`
1174
- );
1175
- process.exitCode = 1;
1207
+ /**
1208
+ * Run the CLI, reporting any refusal the way the Git hooks expect.
1209
+ *
1210
+ * Exported so the thin entrypoint at `scripts/lisa-work-item.mjs` can invoke it
1211
+ * explicitly. That entrypoint re-exports this module rather than duplicating
1212
+ * it, so inside here `import.meta.url` names THIS file while `argv[1]` names
1213
+ * the entrypoint — the two never match, and a guard comparing them would leave
1214
+ * Lisa's own hooks doing nothing at all, silently and with exit 0. An exported
1215
+ * call is unambiguous where a path comparison is a guess.
1216
+ */
1217
+ export function runCli() {
1218
+ try {
1219
+ main();
1220
+ } catch (error) {
1221
+ const detail = error instanceof Error ? error.message : String(error);
1222
+ console.error(
1223
+ `\n❌ Work-item tracking blocked this operation: ${detail}\n\n${GUIDANCE}\n`
1224
+ );
1225
+ process.exitCode = 1;
1226
+ }
1227
+ }
1228
+
1229
+ // Only when invoked as a program. Running on import made every function here
1230
+ // unreachable from a test: importing the module executed the CLI, so the only
1231
+ // way to exercise any of it was to spawn a process and drive it through the
1232
+ // filesystem and PATH. That is why a bug in the message above shipped — the
1233
+ // branch that produced it had no way to be asserted on.
1234
+ //
1235
+ // This branch covers a host project, where the file is copied to
1236
+ // `scripts/lisa-work-item.mjs` and invoked directly. Lisa's own checkout keeps
1237
+ // a re-exporting entrypoint instead, which calls runCli() itself.
1238
+ if (
1239
+ process.argv[1] &&
1240
+ import.meta.url === pathToFileURL(process.argv[1]).href
1241
+ ) {
1242
+ runCli();
1176
1243
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgnEpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAsjNjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
1
+ {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgnEpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAwjNjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
@@ -3,7 +3,7 @@
3
3
  export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
4
4
  "all/copy-contents/.gitattributes": "9d3831007e681186a3673e1037ef3fc82980cab2fc04e27c0868e562912c9e9f",
5
5
  "all/copy-contents/gitignore": "2dbf7fd2f2020fc7824c432342002d9ca3ebb57b2872e761b14e942b23479a11",
6
- "all/copy-overwrite/scripts/lisa-work-item.mjs": "5eb31c284e820a51312d4484f0669128007326af55ee515923fec33700d003a1",
6
+ "all/copy-overwrite/scripts/lisa-work-item.mjs": "96a87c131606b3edd43e52485e68f8ffbf5c528cb4beb7a1185263519a9632ce",
7
7
  "all/create-only/.claude/rules/PROJECT_RULES.md": "6e1c7923ad2a15356babc60c97e7f97be728d790af285b6a7cd7d1b4d39cd97f",
8
8
  "all/create-only/.lisaignore": "3c9827e7e98daa46510b5357cd6dd9406da1821e64cc46d2eea9f311cd6d06b9",
9
9
  "all/create-only/scripts/remote-agent-aws-setup.sh": "7677908a345891810d2104ba8b2fd1a8318bb29c408fb5ce0110d57beef9b556",
@@ -992,7 +992,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
992
992
  "scripts/lisa-remote-env/session-start.sh": "6e3871ec2f8d56b8ebb85376ebdd3956f3ed8fa4f7b278c2ed90ca9b8845897c",
993
993
  "scripts/lisa-remote-env/setup.sh": "c04afb1cf8e14a2713645228e679fa7772559488330a240ec0297cae6afd03e2",
994
994
  "scripts/lisa-update-local.sh": "c811f9e10dbcb38499a9791c1ae9051460b347051d04a1d2046925bab9a53c96",
995
- "scripts/lisa-work-item.mjs": "acb359ed7a39150fd5e1e68f4c95144045e75d9d53b735da4a7a9271f063044e",
995
+ "scripts/lisa-work-item.mjs": "51081847e980f314a764c2e50a7a121b1ced9ef4b980f33898057de4c7b852e6",
996
996
  "scripts/migrate-deploy-order.sh": "77d909b4cbbfc05169a79168d7868600ea7f56f846feefb7d5121618c54800c3",
997
997
  "scripts/plugin-parity-drift.mjs": "34235c4c75c8735aaca96e3e0a52073ba1dee8bad54c85af01c3cf9912d0ea57",
998
998
  "scripts/plugin-routing-validate.mjs": "eb38cf139eb04a27dd6493ff6f766945060d5bf73a35856bd3da4c8e4110e2ba",
@@ -1181,6 +1181,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
1181
1181
  ".github/workflows/deploy.yml": true,
1182
1182
  ".github/workflows/duplicate-versions.yml": true,
1183
1183
  ".github/workflows/lighthouse.yml": true,
1184
+ ".github/workflows/lisa-build-intake.yml": true,
1184
1185
  ".github/workflows/load-test.yml": true,
1185
1186
  ".github/workflows/maestro-native-e2e.yml": true,
1186
1187
  ".github/workflows/plugins-sync.yml": true,
@@ -7251,6 +7252,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
7251
7252
  "tests/unit/scripts/threshold-ratchet.test.ts": true,
7252
7253
  "tests/unit/scripts/upstream-evidence-manifest.test.ts": true,
7253
7254
  "tests/unit/scripts/verification-coverage.test.ts": true,
7255
+ "tests/unit/scripts/work-item-github-failure-diagnosis.test.ts": true,
7254
7256
  "tests/unit/secrets/automation-workflow.test.ts": true,
7255
7257
  "tests/unit/secrets/bootstrap-key-naming.test.ts": true,
7256
7258
  "tests/unit/secrets/doctor-secrets.test.ts": true,