@codyswann/lisa 8.10.1 → 8.10.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 (103) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.json +13 -6
  3. package/dist/opencode/plugin-templates/task-readiness-guard.mjs +1 -1
  4. package/package.json +4 -4
  5. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  6. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  7. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  8. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  9. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
  10. package/plugins/lisa/hooks/task-readiness-guard.mjs +1 -1
  11. package/plugins/lisa/rules/reference/tool-access-gate.md +7 -2
  12. package/plugins/lisa/rules/reference/tracked-work.md +2 -0
  13. package/plugins/lisa/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  14. package/plugins/lisa/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  15. package/plugins/lisa/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
  16. package/plugins/lisa-agy/plugin.json +1 -1
  17. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  18. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  19. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
  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-cdk-devin/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-copilot/hooks/task-readiness-guard.mjs +1 -1
  29. package/plugins/lisa-copilot/rules/reference/tool-access-gate.md +7 -2
  30. package/plugins/lisa-copilot/rules/reference/tracked-work.md +2 -0
  31. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  32. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  33. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
  34. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-cursor/hooks/task-readiness-guard.mjs +1 -1
  36. package/plugins/lisa-cursor/rules/tool-access-gate-reference.mdc +7 -2
  37. package/plugins/lisa-cursor/rules/tracked-work-reference.mdc +2 -0
  38. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  39. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  40. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
  41. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  43. package/plugins/lisa-devin/hooks/task-readiness-guard.mjs +1 -1
  44. package/plugins/lisa-devin/rules/reference/tool-access-gate.md +7 -2
  45. package/plugins/lisa-devin/rules/reference/tracked-work.md +2 -0
  46. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  47. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  48. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
  49. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-expo-agy/plugin.json +1 -1
  52. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  56. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  59. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  63. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  65. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  66. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  70. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  72. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  73. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  77. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  79. package/plugins/lisa-rails-agy/plugin.json +1 -1
  80. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  84. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  86. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  87. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  91. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  93. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  94. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  98. package/plugins/src/base/hooks/task-readiness-guard.mjs +1 -1
  99. package/plugins/src/base/rules/reference/tool-access-gate.md +7 -2
  100. package/plugins/src/base/rules/reference/tracked-work.md +2 -0
  101. package/plugins/src/base/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +8 -1
  102. package/plugins/src/base/skills/lisa-secrets-access/scripts/task-action.mjs +28 -6
  103. package/plugins/src/base/skills/lisa-secrets-access/scripts/task-unbound.mjs +45 -6
@@ -27,9 +27,9 @@ export const NIGHTLY_E2E_GUARD_BEHAVIOR_CERTIFICATES = Object.freeze({
27
27
  }),
28
28
  "4679c1e7cc92f960bad81854b9ce68a14aa0e404f2264cca0c2d6186008a17eb": Object.freeze({
29
29
  contractVersion: "1.9.0",
30
- packageVersions: Object.freeze(["8.10.1"]),
30
+ packageVersions: Object.freeze(["8.10.3"]),
31
31
  provenances: Object.freeze([
32
- "workspace package @codyswann/lisa@8.10.1 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
32
+ "workspace package @codyswann/lisa@8.10.3 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
33
33
  ]),
34
34
  }),
35
35
  "898ee0247806c7aa6e98328662d80bcff22ff067999298865462a58daef8bb22": Object.freeze({
@@ -599,7 +599,7 @@
599
599
  "plugins/src/base/hooks/setup-jira-cli.sh": "384bc8d935a2ed5788d7185979b3e74c75c17cd4bc5c230d7d8f086ab2703443",
600
600
  "plugins/src/base/hooks/shell-write-nudge.sh": "69839af423f8792b1e52c71097316c3264425553031627c0a2f9409a9d5becd0",
601
601
  "plugins/src/base/hooks/sonar-secrets.sh": "554fb65766d617c8b57411b0d53906b7358c219dd2031708370ffc91e97f7381",
602
- "plugins/src/base/hooks/task-readiness-guard.mjs": "261bd61b17cdfec25cfb1fcac93509ff514f0e452c2d4a0c69b3c8bd93a57275",
602
+ "plugins/src/base/hooks/task-readiness-guard.mjs": "3ea609b4617532b63807d322a0caae13556ea1f65c3781d6000a32ba188912d9",
603
603
  "plugins/src/base/hooks/task-readiness-guard.sh": "46254d444580947df927293a7b65d49f865022089bb0ff33403dca5189cbd056",
604
604
  "plugins/src/base/hooks/threshold-ratchet-compare.mjs": "335426213e2a0daa37389da12932fbf87b4cab6e2ee2c2318ef624548e370dac",
605
605
  "plugins/src/base/hooks/threshold-ratchet-families.mjs": "e0aae600cc3187e832b5a959f60869c87a95b32ab8ee2ccbf9f959e41deacd3b",
@@ -681,8 +681,8 @@
681
681
  "plugins/src/base/rules/reference/session-status-updates.md": "dc4d782da9428c90fbb419787c937f4a08bdee894eff3acfe3fffa942e2438d0",
682
682
  "plugins/src/base/rules/reference/settled-decisions.md": "53064fc04010e330cce04459bb2e26e39b4868117376319fe303caafffe0f910",
683
683
  "plugins/src/base/rules/reference/stale-state-claims.md": "ea788d884c297ef8c8b573625172cdb123bb80690907cea0efa789b8dd60e466",
684
- "plugins/src/base/rules/reference/tool-access-gate.md": "057743e865bbfaa96f753a69046d3c1b554aba2b9d015790fb6f8c8d6c6b7fa7",
685
- "plugins/src/base/rules/reference/tracked-work.md": "057883675900eb72af52741d0b5ae730383b6d8b78bb85e80cefa0fc5cc29c86",
684
+ "plugins/src/base/rules/reference/tool-access-gate.md": "de4d30265540f843d7766cf0d6a05aadb2fb557d535ba0b235b8d44249bfc387",
685
+ "plugins/src/base/rules/reference/tracked-work.md": "827ca631b863961f9f3fe7e590ec5f30422202620a254b46cae25018e17a0ab8",
686
686
  "plugins/src/base/rules/reference/upstream-to-lisa.md": "6b82577bf182fa1ed05e8dc3e1f68d9f76eb1eb7497de75031595db488c396de",
687
687
  "plugins/src/base/rules/reference/usage-accounting.md": "53dec94f4cba696d4b4f6e990565173c6aa0c9972432b8b127517fc3617ca7cc",
688
688
  "plugins/src/base/rules/reference/verification.md": "cb8d03601dcc4ed4fb8e2bfd0aa9d7879dfa00be3401d6a33864a8c34cde38ef",
@@ -891,7 +891,7 @@
891
891
  "plugins/src/base/skills/lisa-secrets-access/scripts/materialize-secrets.mjs": "91b443b7c54272f7b94fe3a592eeddd9f45b00901301bf769297a87b01cf18f1",
892
892
  "plugins/src/base/skills/lisa-secrets-access/scripts/note-format.mjs": "09bd6904bc84a5a93a32499ac94db5ec7728db68908a661698445ef5e6974f3e",
893
893
  "plugins/src/base/skills/lisa-secrets-access/scripts/owner.mjs": "576b146e3f60306967b15e382105fe8a27644965b9fbb2870f701b042952461a",
894
- "plugins/src/base/skills/lisa-secrets-access/scripts/preflight-secrets.mjs": "698d87f288c0339d2e53e6d12c0a82f7f1b4ecad379ec53d8ed155a569dbad21",
894
+ "plugins/src/base/skills/lisa-secrets-access/scripts/preflight-secrets.mjs": "59100d0ad6977abba87cf2d2e643d2808a06cdb910cd075558957330a571a59e",
895
895
  "plugins/src/base/skills/lisa-secrets-access/scripts/prompt-secret.mjs": "22b28bcdf49b9b0fcd1b15639e031655efacc028b74d48d57e2275f3e1557508",
896
896
  "plugins/src/base/skills/lisa-secrets-access/scripts/providers.mjs": "cff2018a0298b833e51efe8626b51b20409e84f4fb3c6cbe4b4e13da33121a95",
897
897
  "plugins/src/base/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs": "2ab1e70fe8b8f6ccf7b5e589ea80031be755ddce8c30009ead71790542c68e2b",
@@ -903,7 +903,7 @@
903
903
  "plugins/src/base/skills/lisa-secrets-access/scripts/surfaces.mjs": "d9259269fd2d0a8387bef8a13c9d167bd1f9d20dd58e6b51ce02119dfe1d4c87",
904
904
  "plugins/src/base/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs": "8c5b8e5aa775420d0778436666c9b03b67fae443809d9b5fd57ebf0f04d9a4e2",
905
905
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-access.mjs": "ee88c5f1d39e11c2d7233df255bdbb2246be808baa7825173111edaa8517a490",
906
- "plugins/src/base/skills/lisa-secrets-access/scripts/task-action.mjs": "8bbc8f7d8c30823a87574b90bfec6abc877a59b159764d6577132133216a145b",
906
+ "plugins/src/base/skills/lisa-secrets-access/scripts/task-action.mjs": "8281a33d0fdef8399065ac439cb0f3085f6730e114e0faaaddea33e51acf8548",
907
907
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs": "b9231c667bb62d3d30edf1a45d632696fc3c1d81ae8b32652e5e37a9635cb2f4",
908
908
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-context-data.mjs": "14a1a873e92e45cc4e1f50ca6bf93484ad78315249e39c62772c6e4d2d305eed",
909
909
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-context-write.mjs": "db365b7f05eef81eb4505e883eb124e4bbb2a24db7dc8c7848b12215d57d628d",
@@ -918,7 +918,7 @@
918
918
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-readiness.mjs": "dc29611bc57a0cabefe1e7631659bc6d85b487eed19b7483bfb7fc443b175273",
919
919
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-requirements.mjs": "e184ed7fb4eacb448553cca5a1c440707449066ef9edddb81f6eeba8b79e879d",
920
920
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs": "775b202a5611f3f6aeaec15eb7abb1659604fa687d62f41e40e7701dfa137895",
921
- "plugins/src/base/skills/lisa-secrets-access/scripts/task-unbound.mjs": "2b4199a63e09e242af6a5ee5f4efe24bd50bac6f4a62ab978906e866a31bea55",
921
+ "plugins/src/base/skills/lisa-secrets-access/scripts/task-unbound.mjs": "da933678f8d0c225bd6c46b65351c398446fc22175ce5d5d0b883f626c53ffb2",
922
922
  "plugins/src/base/skills/lisa-secrets-access/scripts/tools-from-notes.mjs": "6ab78776157345992224c5f74f1e6b82867d003961499faf2e51f1473c78dbb8",
923
923
  "plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs": "dac2bad3b92355c71fa9ecb5c484b17ad042e7e33dcdbcadf381d4fc13ab15f9",
924
924
  "plugins/src/base/skills/lisa-security-audit-handling/SKILL.md": "cc0fd59927cc13fc3cfa59eb07852b8c8373c9021b42e016229e632b8fbcc916",
@@ -13285,6 +13285,7 @@
13285
13285
  "tests/unit/secrets/task-readiness-postlaunch.test.ts": true,
13286
13286
  "tests/unit/secrets/task-readiness-qualification.test.ts": true,
13287
13287
  "tests/unit/secrets/task-readiness-scope.test.ts": true,
13288
+ "tests/unit/secrets/task-readiness-unbound-prepare.test.ts": true,
13288
13289
  "tests/unit/secrets/task-readiness-unbound.test.ts": true,
13289
13290
  "tests/unit/secrets/task-readiness.test.ts": true,
13290
13291
  "tests/unit/secrets/task-requirements.test.ts": true,
@@ -22313,6 +22314,7 @@
22313
22314
  "7b1d6b949523e039cb787d51d92ccdfa1c039663": true,
22314
22315
  "7b24dfe8b9a4c40185bc4e4acdd2b3808ad53359": true,
22315
22316
  "7b277b65306ddfb9cc50dc0f8eb068bf1bcbfba4": true,
22317
+ "7b2876626225cb520017b3d14cfd5397fba4b488": true,
22316
22318
  "7b2a373becaa3ac698abf998e762076a43a71689": true,
22317
22319
  "7b2e6ab5ac33dee1c4e21b0d55012f3b16f6587d": true,
22318
22320
  "7b2fcb857cfdfaffe9781c261c9f1d3cfcfde7e3": true,
@@ -23183,6 +23185,7 @@
23183
23185
  "88467afd996f3018768a220e58ef501eba90ca3c": true,
23184
23186
  "884d00f083e87434674530c3532beb9bec194840": true,
23185
23187
  "884e330724908f53a553d95148438e08fae54bfc": true,
23188
+ "884edc2384d4ad5b4cc16799839234e41819fd9c": true,
23186
23189
  "884f1b9b44f79f9b71b3be18a7214df8055cd527": true,
23187
23190
  "884fb37539e5f50ee24f8d73411e63cc94c38582": true,
23188
23191
  "8852a177827bd575a468768060ac8c750fd5db3f": true,
@@ -23554,6 +23557,7 @@
23554
23557
  "8ddf05f06fdbd0e0d24ba7ed800789bd02222fc2": true,
23555
23558
  "8de03319af7110136349e6b142185a9ce942a465": true,
23556
23559
  "8de0ca04d22fed9c6412ee7d1fff460b14a37c51": true,
23560
+ "8de2fd67c5f769f11971d61ccfe8af3c367f7dfb": true,
23557
23561
  "8de82040617d16f4e7bab68a21aa1f16375c75f2": true,
23558
23562
  "8de98e478f3241350b6d7833e138fb2bf46db32c": true,
23559
23563
  "8dea21ffe56f58db88dd7bf0e573bb20efe2ea1b": true,
@@ -29300,6 +29304,7 @@
29300
29304
  "e28caa8bf13dc355d7572b5e770c831d30940193": true,
29301
29305
  "e29095b0b3987210ff6880cbea886d462788dcc0": true,
29302
29306
  "e292cbcd025727495ad0ef1c454f9728b4735e26": true,
29307
+ "e29598654e47a9e641a7eeed547e0702c4af8bbe": true,
29303
29308
  "e296960a059218f1d22a331dc20de654b7ba9bcd": true,
29304
29309
  "e29c93db0fb5eed022c0018f52e9f033706c0976": true,
29305
29310
  "e2a4656551a23242d6a8d972fff0e821504db3b0": true,
@@ -29397,6 +29402,7 @@
29397
29402
  "e407fcde40b7a3d28b183f328b047d0ef0c422bd": true,
29398
29403
  "e40866c3972513e6ddbf9e8724a4e8c7f05f3bb5": true,
29399
29404
  "e4095fa90ef60fb8e04635acd18b5111da6c7e69": true,
29405
+ "e40d3f862c559f5c12c8f2c06f494bfb45627df3": true,
29400
29406
  "e4124fb69cc4ba51aba0b2940a88396ae5e7332f": true,
29401
29407
  "e41305e059f577c280822113d461e8af8629fd6a": true,
29402
29408
  "e41390a945bab6fc33e6244c29d4b01f58f0c201": true,
@@ -30076,6 +30082,7 @@
30076
30082
  "eedbd27700718271fe40b1c10f187b1de85771cf": true,
30077
30083
  "eedef5f4a3f9041d824c266539c68db484a2dac3": true,
30078
30084
  "eee0be1cd50e8674ec53cd7668355fd01b24305a": true,
30085
+ "eee12015a2e78c8efdcc2157e20cad8a8686af21": true,
30079
30086
  "eee20730c3f7a424d0a4dfcdc5f3d1acdbb4c5fd": true,
30080
30087
  "eee2cc1ed7bb4b567004afb34ed7726e76e192b2": true,
30081
30088
  "eee5a654486511bed770ae8b2bbb37c8ebde6e82": true,
@@ -79,7 +79,7 @@ try {
79
79
  } else if (result.status !== 0) {
80
80
  // Only the fixed owner result is published. Environment errors never echo.
81
81
  const safe =
82
- /^(?:credential-missing|provider-unreachable|capability-unreachable|bootstrap-missing|tool-missing|config-invalid|config-unreadable|config-undiscovered|config-unknown|identity-mismatch|adapter-unsupported|requirements-stale|requirements-prepared|native-proof-needed|native-response-unrepresented): [^\n]*\n?$/.test(
82
+ /^(?:credential-missing|provider-unreachable|capability-unreachable|bootstrap-missing|tool-missing|config-invalid|config-unreadable|config-undiscovered|config-unknown|identity-mismatch|adapter-unsupported|requirements-stale|work-item-unbound|requirements-prepared|native-proof-needed|native-response-unrepresented): [^\n]*\n?$/.test(
83
83
  result.stderr ?? ""
84
84
  );
85
85
  console.error(
package/package.json CHANGED
@@ -200,7 +200,7 @@
200
200
  "zod": "^4.6.7"
201
201
  },
202
202
  "name": "@codyswann/lisa",
203
- "version": "8.10.1",
203
+ "version": "8.10.3",
204
204
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
205
205
  "main": "dist/index.js",
206
206
  "exports": {
@@ -371,7 +371,7 @@
371
371
  "optional": true
372
372
  }
373
373
  },
374
- "lisaReleaseCommit": "e40d3f862c559f5c12c8f2c06f494bfb45627df3",
375
- "gitHead": "e40d3f862c559f5c12c8f2c06f494bfb45627df3",
376
- "lisaReleaseTag": "v8.10.1"
374
+ "lisaReleaseCommit": "be0cda9fafacc01e2c33ff10dc7f0d60ad469fd3",
375
+ "gitHead": "be0cda9fafacc01e2c33ff10dc7f0d60ad469fd3",
376
+ "lisaReleaseTag": "v8.10.3"
377
377
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.3",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.3",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -42,6 +42,7 @@ import { failure } from "./task-readiness.mjs";
42
42
  import { runTaskAction } from "./task-action.mjs";
43
43
  import { AccessFailure } from "./config-layers.mjs";
44
44
  import { prepareRequirements } from "./task-requirements.mjs";
45
+ import { outsideEveryRepository } from "./task-unbound.mjs";
45
46
  import { runIntakeRead } from "./task-intake-read.mjs";
46
47
  import { runTrackerIntakeRead } from "./task-tracker-intake.mjs";
47
48
  export { taskReadiness, credentialAvailability } from "./task-readiness.mjs";
@@ -367,7 +368,13 @@ function main() {
367
368
  if (process.argv.includes("--prepare")) {
368
369
  const cfg = readTaskConfig();
369
370
  const index = process.argv.indexOf("--ref");
370
- const input = JSON.parse(readFileSync(0, "utf8"));
371
+ const fileIndex = process.argv.indexOf("--input-file");
372
+ // An agent's shell tool has no stdin. It writes the JSON to a file outside
373
+ // every repository (admitted while unbound) and names it here instead.
374
+ const file = fileIndex >= 0 ? process.argv[fileIndex + 1] : undefined;
375
+ if (fileIndex >= 0 && !outsideEveryRepository(file, cfg.projectRoot))
376
+ throw new AccessFailure("requirements-stale");
377
+ const input = JSON.parse(readFileSync(fileIndex >= 0 ? file : 0, "utf8"));
371
378
  console.log(
372
379
  JSON.stringify(
373
380
  prepareRequirements(
@@ -9,7 +9,11 @@ import { readTaskRequirements } from "./task-requirements.mjs";
9
9
  import { lifecycleEvents, resetNativeEvent } from "./task-native-lifecycle.mjs";
10
10
  import { intakeRead } from "./task-intake.mjs";
11
11
  import { nativeContext } from "./task-native-context.mjs";
12
- import { unboundRefusal, unboundWrite } from "./task-unbound.mjs";
12
+ import {
13
+ outsideEveryRepository,
14
+ unboundRefusal,
15
+ unboundWrite,
16
+ } from "./task-unbound.mjs";
13
17
  import {
14
18
  linearIntakeRead,
15
19
  observeLinearIntake,
@@ -26,17 +30,35 @@ const owner = join(
26
30
  const refs = /^(?:[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+#\d+|[A-Z][A-Z0-9]+-\d+)$/;
27
31
  const quote = path => `'${path.replaceAll("'", "'\\''")}'`;
28
32
 
29
- /** Exact canonical recovery command. JSON uses structured child/terminal stdin, not redirects. */
30
- export function readinessOwnerInvocation(command) {
33
+ /** A file path that a shell reads as exactly one plain word. */
34
+ const plainPath = /^\/[A-Za-z0-9_./@+-]+$/;
35
+
36
+ /**
37
+ * Exact canonical recovery command. JSON uses structured child/terminal
38
+ * stdin, or a file outside every repository that an agent's shell tool can
39
+ * name, since it has no stdin to supply.
40
+ * @param {unknown} command Shell command text.
41
+ * @param {string} [root] Project root, for the input file's location check.
42
+ * @returns {boolean} True for an exact recovery command.
43
+ */
44
+ export function readinessOwnerInvocation(command, root = process.cwd()) {
31
45
  if (typeof command !== "string") return false;
32
46
  for (const runtime of ["node", process.execPath, quote(process.execPath)])
33
47
  for (const script of [owner, quote(owner)]) {
34
48
  if (command === `${runtime} ${script} --task`) return true;
35
49
  for (const mode of ["task", "prepare"]) {
36
50
  const prefix = `${runtime} ${script} --${mode} --ref `;
51
+ if (!command.startsWith(prefix)) continue;
52
+ const rest = command.slice(prefix.length);
53
+ if (refs.test(rest)) return true;
54
+ const [ref, flag, file, ...extra] = rest.split(" ");
37
55
  if (
38
- command.startsWith(prefix) &&
39
- refs.test(command.slice(prefix.length))
56
+ mode === "prepare" &&
57
+ refs.test(ref) &&
58
+ flag === "--input-file" &&
59
+ extra.length === 0 &&
60
+ plainPath.test(file ?? "") &&
61
+ outsideEveryRepository(file, root)
40
62
  )
41
63
  return true;
42
64
  }
@@ -52,7 +74,7 @@ function orientation(input) {
52
74
  return true;
53
75
  if (input?.tool_name !== "Bash") return false;
54
76
  return (
55
- readinessOwnerInvocation(input.tool_input?.command) ||
77
+ readinessOwnerInvocation(input.tool_input?.command, input.cwd) ||
56
78
  [
57
79
  "pwd",
58
80
  "ls -la",
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -120,6 +150,16 @@ export function unboundWrite(input, cfg) {
120
150
  );
121
151
  }
122
152
 
153
+ /**
154
+ * This installation's prepare/read owner script as one shell word.
155
+ * @returns {string} The path, quoted only when it needs to be.
156
+ */
157
+ function ownerWord() {
158
+ return /^[\w./@+-]+$/.test(owner)
159
+ ? owner
160
+ : `'${owner.replaceAll("'", "'\\''")}'`;
161
+ }
162
+
123
163
  /**
124
164
  * The exact read command this installation admits with no work item bound.
125
165
  * @param {Record<string, any>} cfg Task configuration.
@@ -127,9 +167,7 @@ export function unboundWrite(input, cfg) {
127
167
  */
128
168
  function readCommand(cfg) {
129
169
  const c = cfg.effective ?? {};
130
- const script = /^[\w./@+-]+$/.test(owner)
131
- ? owner
132
- : `'${owner.replaceAll("'", "'\\''")}'`;
170
+ const script = ownerWord();
133
171
  if (c.tracker === "linear" && c.linear?.teamKey)
134
172
  return `node ${script} --tracker-intake-read --ref ${c.linear.teamKey}-<number> --read issue`;
135
173
  if (c.tracker === "jira" && c.jira?.project)
@@ -162,6 +200,7 @@ export function unboundRefusal(cfg) {
162
200
  : "",
163
201
  "A file written outside every git repository, such as a scratch or memory file, is allowed.",
164
202
  "To change anything in this project, bind its ticket first with lisa-track.",
203
+ `Its prepare step needs no shell input: write the prepare JSON to a file outside every repository, then run exactly: node ${ownerWord()} --prepare --ref <ticket> --input-file <absolute path of that file>.`,
165
204
  ]
166
205
  .filter(Boolean)
167
206
  .join(" "),
@@ -76,7 +76,7 @@ try {
76
76
  } else if (result.status !== 0) {
77
77
  // Only the fixed owner result is published. Environment errors never echo.
78
78
  const safe =
79
- /^(?:credential-missing|provider-unreachable|capability-unreachable|bootstrap-missing|tool-missing|config-invalid|config-unreadable|config-undiscovered|config-unknown|identity-mismatch|adapter-unsupported|requirements-stale|requirements-prepared|native-proof-needed|native-response-unrepresented): [^\n]*\n?$/.test(
79
+ /^(?:credential-missing|provider-unreachable|capability-unreachable|bootstrap-missing|tool-missing|config-invalid|config-unreadable|config-undiscovered|config-unknown|identity-mismatch|adapter-unsupported|requirements-stale|work-item-unbound|requirements-prepared|native-proof-needed|native-response-unrepresented): [^\n]*\n?$/.test(
80
80
  result.stderr ?? ""
81
81
  );
82
82
  console.error(
@@ -23,7 +23,11 @@ the resolver or read its inputs.
23
23
 
24
24
  Supply a complete values-free `required_access` array and
25
25
  `requirements_complete: true` as JSON on stdin to the owner's
26
- `--prepare --ref <canonical-ref>` mode. For the first context, include the complete
26
+ `--prepare --ref <canonical-ref>` mode. An agent's shell tool has no stdin:
27
+ write the same JSON to a file outside every git repository (such a write is
28
+ admitted with no ticket bound) and run exactly
29
+ `node <owner>/preflight-secrets.mjs --prepare --ref <canonical-ref> --input-file <absolute path>`.
30
+ The path is one plain word; nothing may follow it. For the first context, include the complete
27
31
  unedited `context_body` on that same stdin; it creates
28
32
  only the fixed ignored0600 context after Git-ignore and EAS checks. Existing
29
33
  context cannot be replaced through `context_body`. This is the bounded initial
@@ -92,7 +96,8 @@ reflect requirement identifiers/resources/paths, parse errors or provider output
92
96
  Do not block unrelated tasks or require optional integrations universally.
93
97
 
94
98
  The exact readiness owner command (`node <owner>/preflight-secrets.mjs --task
95
- --ref <canonical-ref>`, or `--prepare` with that ref and JSON on terminal stdin)
99
+ --ref <canonical-ref>`, or `--prepare` with that ref and JSON on terminal stdin
100
+ or in an `--input-file` outside every repository)
96
101
  remains available during refusal. It grants no work: task mode still reports its
97
102
  real verdict, and preparation only refreshes the ignored requirements metadata.
98
103
  Only the exact native context Write/Add File forms above carry private metadata.
@@ -14,6 +14,8 @@ In a project with `.lisa.config.json`, the task-readiness guard enforces this. W
14
14
 
15
15
  Answering a question about a ticket needs none of this. Never bind a ticket just to read one.
16
16
 
17
+ To start work on an existing ticket from an unbound session, prepare it first, then bind it. Write the prepare JSON to a file outside every repository, then run the admitted `preflight-secrets.mjs --prepare --ref <ticket> --input-file <absolute path>` (see `tool-access-gate`). Once the ticket is prepared, the guard decides by that ticket's readiness, and `lisa-work-item.mjs link`, the claim and the work run normally.
18
+
17
19
  ## Resolve, claim, bind
18
20
 
19
21
  Use `lisa-track` as the single entry point:
@@ -42,6 +42,7 @@ import { failure } from "./task-readiness.mjs";
42
42
  import { runTaskAction } from "./task-action.mjs";
43
43
  import { AccessFailure } from "./config-layers.mjs";
44
44
  import { prepareRequirements } from "./task-requirements.mjs";
45
+ import { outsideEveryRepository } from "./task-unbound.mjs";
45
46
  import { runIntakeRead } from "./task-intake-read.mjs";
46
47
  import { runTrackerIntakeRead } from "./task-tracker-intake.mjs";
47
48
  export { taskReadiness, credentialAvailability } from "./task-readiness.mjs";
@@ -367,7 +368,13 @@ function main() {
367
368
  if (process.argv.includes("--prepare")) {
368
369
  const cfg = readTaskConfig();
369
370
  const index = process.argv.indexOf("--ref");
370
- const input = JSON.parse(readFileSync(0, "utf8"));
371
+ const fileIndex = process.argv.indexOf("--input-file");
372
+ // An agent's shell tool has no stdin. It writes the JSON to a file outside
373
+ // every repository (admitted while unbound) and names it here instead.
374
+ const file = fileIndex >= 0 ? process.argv[fileIndex + 1] : undefined;
375
+ if (fileIndex >= 0 && !outsideEveryRepository(file, cfg.projectRoot))
376
+ throw new AccessFailure("requirements-stale");
377
+ const input = JSON.parse(readFileSync(fileIndex >= 0 ? file : 0, "utf8"));
371
378
  console.log(
372
379
  JSON.stringify(
373
380
  prepareRequirements(
@@ -9,7 +9,11 @@ import { readTaskRequirements } from "./task-requirements.mjs";
9
9
  import { lifecycleEvents, resetNativeEvent } from "./task-native-lifecycle.mjs";
10
10
  import { intakeRead } from "./task-intake.mjs";
11
11
  import { nativeContext } from "./task-native-context.mjs";
12
- import { unboundRefusal, unboundWrite } from "./task-unbound.mjs";
12
+ import {
13
+ outsideEveryRepository,
14
+ unboundRefusal,
15
+ unboundWrite,
16
+ } from "./task-unbound.mjs";
13
17
  import {
14
18
  linearIntakeRead,
15
19
  observeLinearIntake,
@@ -26,17 +30,35 @@ const owner = join(
26
30
  const refs = /^(?:[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+#\d+|[A-Z][A-Z0-9]+-\d+)$/;
27
31
  const quote = path => `'${path.replaceAll("'", "'\\''")}'`;
28
32
 
29
- /** Exact canonical recovery command. JSON uses structured child/terminal stdin, not redirects. */
30
- export function readinessOwnerInvocation(command) {
33
+ /** A file path that a shell reads as exactly one plain word. */
34
+ const plainPath = /^\/[A-Za-z0-9_./@+-]+$/;
35
+
36
+ /**
37
+ * Exact canonical recovery command. JSON uses structured child/terminal
38
+ * stdin, or a file outside every repository that an agent's shell tool can
39
+ * name, since it has no stdin to supply.
40
+ * @param {unknown} command Shell command text.
41
+ * @param {string} [root] Project root, for the input file's location check.
42
+ * @returns {boolean} True for an exact recovery command.
43
+ */
44
+ export function readinessOwnerInvocation(command, root = process.cwd()) {
31
45
  if (typeof command !== "string") return false;
32
46
  for (const runtime of ["node", process.execPath, quote(process.execPath)])
33
47
  for (const script of [owner, quote(owner)]) {
34
48
  if (command === `${runtime} ${script} --task`) return true;
35
49
  for (const mode of ["task", "prepare"]) {
36
50
  const prefix = `${runtime} ${script} --${mode} --ref `;
51
+ if (!command.startsWith(prefix)) continue;
52
+ const rest = command.slice(prefix.length);
53
+ if (refs.test(rest)) return true;
54
+ const [ref, flag, file, ...extra] = rest.split(" ");
37
55
  if (
38
- command.startsWith(prefix) &&
39
- refs.test(command.slice(prefix.length))
56
+ mode === "prepare" &&
57
+ refs.test(ref) &&
58
+ flag === "--input-file" &&
59
+ extra.length === 0 &&
60
+ plainPath.test(file ?? "") &&
61
+ outsideEveryRepository(file, root)
40
62
  )
41
63
  return true;
42
64
  }
@@ -52,7 +74,7 @@ function orientation(input) {
52
74
  return true;
53
75
  if (input?.tool_name !== "Bash") return false;
54
76
  return (
55
- readinessOwnerInvocation(input.tool_input?.command) ||
77
+ readinessOwnerInvocation(input.tool_input?.command, input.cwd) ||
56
78
  [
57
79
  "pwd",
58
80
  "ls -la",
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -120,6 +150,16 @@ export function unboundWrite(input, cfg) {
120
150
  );
121
151
  }
122
152
 
153
+ /**
154
+ * This installation's prepare/read owner script as one shell word.
155
+ * @returns {string} The path, quoted only when it needs to be.
156
+ */
157
+ function ownerWord() {
158
+ return /^[\w./@+-]+$/.test(owner)
159
+ ? owner
160
+ : `'${owner.replaceAll("'", "'\\''")}'`;
161
+ }
162
+
123
163
  /**
124
164
  * The exact read command this installation admits with no work item bound.
125
165
  * @param {Record<string, any>} cfg Task configuration.
@@ -127,9 +167,7 @@ export function unboundWrite(input, cfg) {
127
167
  */
128
168
  function readCommand(cfg) {
129
169
  const c = cfg.effective ?? {};
130
- const script = /^[\w./@+-]+$/.test(owner)
131
- ? owner
132
- : `'${owner.replaceAll("'", "'\\''")}'`;
170
+ const script = ownerWord();
133
171
  if (c.tracker === "linear" && c.linear?.teamKey)
134
172
  return `node ${script} --tracker-intake-read --ref ${c.linear.teamKey}-<number> --read issue`;
135
173
  if (c.tracker === "jira" && c.jira?.project)
@@ -162,6 +200,7 @@ export function unboundRefusal(cfg) {
162
200
  : "",
163
201
  "A file written outside every git repository, such as a scratch or memory file, is allowed.",
164
202
  "To change anything in this project, bind its ticket first with lisa-track.",
203
+ `Its prepare step needs no shell input: write the prepare JSON to a file outside every repository, then run exactly: node ${ownerWord()} --prepare --ref <ticket> --input-file <absolute path of that file>.`,
165
204
  ]
166
205
  .filter(Boolean)
167
206
  .join(" "),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.3",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -42,6 +42,7 @@ import { failure } from "./task-readiness.mjs";
42
42
  import { runTaskAction } from "./task-action.mjs";
43
43
  import { AccessFailure } from "./config-layers.mjs";
44
44
  import { prepareRequirements } from "./task-requirements.mjs";
45
+ import { outsideEveryRepository } from "./task-unbound.mjs";
45
46
  import { runIntakeRead } from "./task-intake-read.mjs";
46
47
  import { runTrackerIntakeRead } from "./task-tracker-intake.mjs";
47
48
  export { taskReadiness, credentialAvailability } from "./task-readiness.mjs";
@@ -367,7 +368,13 @@ function main() {
367
368
  if (process.argv.includes("--prepare")) {
368
369
  const cfg = readTaskConfig();
369
370
  const index = process.argv.indexOf("--ref");
370
- const input = JSON.parse(readFileSync(0, "utf8"));
371
+ const fileIndex = process.argv.indexOf("--input-file");
372
+ // An agent's shell tool has no stdin. It writes the JSON to a file outside
373
+ // every repository (admitted while unbound) and names it here instead.
374
+ const file = fileIndex >= 0 ? process.argv[fileIndex + 1] : undefined;
375
+ if (fileIndex >= 0 && !outsideEveryRepository(file, cfg.projectRoot))
376
+ throw new AccessFailure("requirements-stale");
377
+ const input = JSON.parse(readFileSync(fileIndex >= 0 ? file : 0, "utf8"));
371
378
  console.log(
372
379
  JSON.stringify(
373
380
  prepareRequirements(