@codyswann/lisa 4.80.1 → 4.81.0

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 (335) hide show
  1. package/README.md +6 -3
  2. package/all/copy-contents/gitignore +5 -0
  3. package/cdk/package-lisa/package.lisa.json +0 -2
  4. package/dist/cli/doctor-cdk-preset-adoption.js +2 -2
  5. package/dist/cli/doctor-cdk-preset-adoption.js.map +1 -1
  6. package/dist/cli/doctor-session-manager-trust.d.ts +62 -0
  7. package/dist/cli/doctor-session-manager-trust.d.ts.map +1 -0
  8. package/dist/cli/doctor-session-manager-trust.js +174 -0
  9. package/dist/cli/doctor-session-manager-trust.js.map +1 -0
  10. package/dist/cli/doctor-session-manager.d.ts +35 -0
  11. package/dist/cli/doctor-session-manager.d.ts.map +1 -0
  12. package/dist/cli/doctor-session-manager.js +209 -0
  13. package/dist/cli/doctor-session-manager.js.map +1 -0
  14. package/dist/cli/doctor.d.ts.map +1 -1
  15. package/dist/cli/doctor.js +3 -0
  16. package/dist/cli/doctor.js.map +1 -1
  17. package/dist/cli/lisa-test-run-bootstrap.js +28 -0
  18. package/dist/cli/lisa-test-run-bootstrap.js.map +1 -1
  19. package/dist/cli/session-manager-config-merge.d.ts +25 -0
  20. package/dist/cli/session-manager-config-merge.d.ts.map +1 -0
  21. package/dist/cli/session-manager-config-merge.js +54 -0
  22. package/dist/cli/session-manager-config-merge.js.map +1 -0
  23. package/dist/core/cdk-preset-adoption.d.ts +7 -2
  24. package/dist/core/cdk-preset-adoption.d.ts.map +1 -1
  25. package/dist/core/cdk-preset-adoption.js +10 -2
  26. package/dist/core/cdk-preset-adoption.js.map +1 -1
  27. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  28. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  29. package/dist/core/upstream-evidence-manifest.js +258 -13
  30. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  31. package/package.json +4 -4
  32. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa/.codex-plugin/skills/lisa-automation-status/SKILL.md +10 -0
  35. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +17 -2
  36. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  37. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +287 -0
  38. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/agents/openai.yaml +4 -0
  39. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +66 -0
  40. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  41. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  42. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  43. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  44. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  45. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  46. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  47. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +265 -0
  48. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  49. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  50. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  51. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  52. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  53. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  54. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  55. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token.mjs +191 -0
  56. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  57. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  58. package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +158 -0
  59. package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/agents/openai.yaml +4 -0
  60. package/plugins/lisa/.codex-plugin/skills/lisa-tear-down-automations/SKILL.md +10 -0
  61. package/plugins/lisa/commands/implement.md +2 -2
  62. package/plugins/lisa/commands/session-manager.md +7 -0
  63. package/plugins/lisa/commands/setup/session-manager.md +6 -0
  64. package/plugins/lisa/rules/reference/automation-runbook-contract.md +14 -0
  65. package/plugins/lisa/rules/reference/config-resolution.md +58 -0
  66. package/plugins/lisa/scripts/automation-status-claude-adapter.mjs +4 -1
  67. package/plugins/lisa/scripts/automation-status-codex-adapter.mjs +4 -1
  68. package/plugins/lisa/scripts/automation-status-expected-fleet.mjs +98 -0
  69. package/plugins/lisa/scripts/automation-status-run-history.mjs +29 -7
  70. package/plugins/lisa/scripts/ready-queue-order.mjs +352 -0
  71. package/plugins/lisa/skills/lisa-automation-status/SKILL.md +10 -0
  72. package/plugins/lisa/skills/lisa-implement/SKILL.md +17 -2
  73. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  74. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +285 -0
  75. package/plugins/lisa/skills/lisa-session-manager/agents/openai.yaml +4 -0
  76. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +66 -0
  77. package/plugins/lisa/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  78. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  79. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  80. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  81. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  82. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  83. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  84. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +265 -0
  85. package/plugins/lisa/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  86. package/plugins/lisa/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  87. package/plugins/lisa/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  88. package/plugins/lisa/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  89. package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  90. package/plugins/lisa/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  91. package/plugins/lisa/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  92. package/plugins/lisa/skills/lisa-session-manager/scripts/token.mjs +191 -0
  93. package/plugins/lisa/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  94. package/plugins/lisa/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  95. package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +156 -0
  96. package/plugins/lisa/skills/lisa-setup-session-manager/agents/openai.yaml +4 -0
  97. package/plugins/lisa/skills/lisa-tear-down-automations/SKILL.md +10 -0
  98. package/plugins/lisa-agy/commands/lisa/implement.md +2 -2
  99. package/plugins/lisa-agy/commands/lisa/session-manager.md +7 -0
  100. package/plugins/lisa-agy/commands/lisa/setup/session-manager.md +6 -0
  101. package/plugins/lisa-agy/plugin.json +1 -1
  102. package/plugins/lisa-agy/scripts/automation-status-claude-adapter.mjs +4 -1
  103. package/plugins/lisa-agy/scripts/automation-status-codex-adapter.mjs +4 -1
  104. package/plugins/lisa-agy/scripts/automation-status-expected-fleet.mjs +98 -0
  105. package/plugins/lisa-agy/scripts/automation-status-run-history.mjs +29 -7
  106. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +352 -0
  107. package/plugins/lisa-agy/skills/lisa-automation-status/SKILL.md +10 -0
  108. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +17 -2
  109. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  110. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +285 -0
  111. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +66 -0
  112. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  113. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  114. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  115. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  116. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  117. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  118. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  119. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +265 -0
  120. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  121. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  122. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  123. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  124. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  125. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  126. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  127. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token.mjs +191 -0
  128. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  129. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  130. package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +156 -0
  131. package/plugins/lisa-agy/skills/lisa-tear-down-automations/SKILL.md +10 -0
  132. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  134. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  135. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  136. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  139. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  140. package/plugins/lisa-copilot/commands/lisa/implement.md +2 -2
  141. package/plugins/lisa-copilot/commands/lisa/session-manager.md +7 -0
  142. package/plugins/lisa-copilot/commands/lisa/setup/session-manager.md +6 -0
  143. package/plugins/lisa-copilot/rules/reference/automation-runbook-contract.md +14 -0
  144. package/plugins/lisa-copilot/rules/reference/config-resolution.md +58 -0
  145. package/plugins/lisa-copilot/scripts/automation-status-claude-adapter.mjs +4 -1
  146. package/plugins/lisa-copilot/scripts/automation-status-codex-adapter.mjs +4 -1
  147. package/plugins/lisa-copilot/scripts/automation-status-expected-fleet.mjs +98 -0
  148. package/plugins/lisa-copilot/scripts/automation-status-run-history.mjs +29 -7
  149. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +352 -0
  150. package/plugins/lisa-copilot/skills/lisa-automation-status/SKILL.md +10 -0
  151. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +17 -2
  152. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  153. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +285 -0
  154. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +66 -0
  155. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  156. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  157. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  158. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  159. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  160. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  161. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  162. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +265 -0
  163. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  164. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  165. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  166. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  167. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  168. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  169. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  170. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token.mjs +191 -0
  171. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  172. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  173. package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +156 -0
  174. package/plugins/lisa-copilot/skills/lisa-tear-down-automations/SKILL.md +10 -0
  175. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  176. package/plugins/lisa-cursor/commands/lisa/implement.md +2 -2
  177. package/plugins/lisa-cursor/commands/lisa/session-manager.md +7 -0
  178. package/plugins/lisa-cursor/commands/lisa/setup/session-manager.md +6 -0
  179. package/plugins/lisa-cursor/rules/automation-runbook-contract-reference.mdc +14 -0
  180. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +58 -0
  181. package/plugins/lisa-cursor/scripts/automation-status-claude-adapter.mjs +4 -1
  182. package/plugins/lisa-cursor/scripts/automation-status-codex-adapter.mjs +4 -1
  183. package/plugins/lisa-cursor/scripts/automation-status-expected-fleet.mjs +98 -0
  184. package/plugins/lisa-cursor/scripts/automation-status-run-history.mjs +29 -7
  185. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +352 -0
  186. package/plugins/lisa-cursor/skills/lisa-automation-status/SKILL.md +10 -0
  187. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +17 -2
  188. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  189. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +285 -0
  190. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +66 -0
  191. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  192. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  193. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  194. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  195. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  196. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  197. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  198. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +265 -0
  199. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  200. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  201. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  202. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  203. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  204. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  205. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  206. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token.mjs +191 -0
  207. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  208. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  209. package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +156 -0
  210. package/plugins/lisa-cursor/skills/lisa-tear-down-automations/SKILL.md +10 -0
  211. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  212. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  213. package/plugins/lisa-devin/rules/reference/automation-runbook-contract.md +14 -0
  214. package/plugins/lisa-devin/rules/reference/config-resolution.md +58 -0
  215. package/plugins/lisa-devin/scripts/automation-status-claude-adapter.mjs +4 -1
  216. package/plugins/lisa-devin/scripts/automation-status-codex-adapter.mjs +4 -1
  217. package/plugins/lisa-devin/scripts/automation-status-expected-fleet.mjs +98 -0
  218. package/plugins/lisa-devin/scripts/automation-status-run-history.mjs +29 -7
  219. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +352 -0
  220. package/plugins/lisa-devin/skills/lisa-automation-status/SKILL.md +10 -0
  221. package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +17 -2
  222. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  223. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +285 -0
  224. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +66 -0
  225. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  226. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  227. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  228. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  229. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  230. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  231. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  232. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +265 -0
  233. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  234. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  235. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  236. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  237. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  238. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  239. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  240. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token.mjs +191 -0
  241. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  242. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  243. package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +156 -0
  244. package/plugins/lisa-devin/skills/lisa-tear-down-automations/SKILL.md +10 -0
  245. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  246. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  247. package/plugins/lisa-expo-agy/plugin.json +1 -1
  248. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  249. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  250. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  251. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  252. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  253. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  254. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  255. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  257. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  258. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  259. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  260. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  261. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  262. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  263. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  264. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  265. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  266. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  267. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  268. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  269. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  270. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  271. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  272. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  273. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  274. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  275. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  276. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  277. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  278. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  279. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  280. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  281. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  282. package/plugins/lisa-rails-agy/plugin.json +1 -1
  283. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  284. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  285. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  286. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  287. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  288. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  289. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  290. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  291. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  292. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  293. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  294. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  295. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  296. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  297. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  298. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  299. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  300. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  301. package/plugins/src/base/commands/implement.md +2 -2
  302. package/plugins/src/base/commands/session-manager.md +7 -0
  303. package/plugins/src/base/commands/setup/session-manager.md +6 -0
  304. package/plugins/src/base/rules/reference/automation-runbook-contract.md +14 -0
  305. package/plugins/src/base/rules/reference/config-resolution.md +58 -0
  306. package/plugins/src/base/scripts/automation-status-claude-adapter.mjs +4 -1
  307. package/plugins/src/base/scripts/automation-status-codex-adapter.mjs +4 -1
  308. package/plugins/src/base/scripts/automation-status-expected-fleet.mjs +98 -0
  309. package/plugins/src/base/scripts/automation-status-run-history.mjs +29 -7
  310. package/plugins/src/base/scripts/ready-queue-order.mjs +352 -0
  311. package/plugins/src/base/skills/lisa-automation-status/SKILL.md +10 -0
  312. package/plugins/src/base/skills/lisa-implement/SKILL.md +17 -2
  313. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +377 -5
  314. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +285 -0
  315. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +66 -0
  316. package/plugins/src/base/skills/lisa-session-manager/scripts/capacity.mjs +186 -0
  317. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +262 -0
  318. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager.mjs +308 -0
  319. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +148 -0
  320. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +326 -0
  321. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +114 -0
  322. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-workers.mjs +295 -0
  323. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +265 -0
  324. package/plugins/src/base/skills/lisa-session-manager/scripts/isolation.mjs +130 -0
  325. package/plugins/src/base/skills/lisa-session-manager/scripts/launch.mjs +234 -0
  326. package/plugins/src/base/skills/lisa-session-manager/scripts/ledger.mjs +445 -0
  327. package/plugins/src/base/skills/lisa-session-manager/scripts/reconcile.mjs +134 -0
  328. package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +274 -0
  329. package/plugins/src/base/skills/lisa-session-manager/scripts/state-dir.mjs +112 -0
  330. package/plugins/src/base/skills/lisa-session-manager/scripts/telegram-route.mjs +210 -0
  331. package/plugins/src/base/skills/lisa-session-manager/scripts/token.mjs +191 -0
  332. package/plugins/src/base/skills/lisa-session-manager/scripts/worker-launch.mjs +92 -0
  333. package/plugins/src/base/skills/lisa-session-manager/scripts/workers.mjs +406 -0
  334. package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +156 -0
  335. package/plugins/src/base/skills/lisa-tear-down-automations/SKILL.md +10 -0
package/README.md CHANGED
@@ -189,9 +189,12 @@ manifests remain unverified; this diagnostic is not a full lockfile audit.
189
189
  Clean TypeScript and CDK hosts receive the shared Node 24.21.0 LTS baseline,
190
190
  Vitest and coverage-v8 4.1.11 minimums, and a Vite 8.3.2 minimum within Vite 8.
191
191
  Lisa retains the TypeScript 6, ESLint 9, Knip 5, Husky 8 and Vitest 4 families.
192
- New CDK hosts default to `aws-cdk-github-oidc ^5.2.0` with `constructs ^10.7.2`
193
- minimum peers. Existing OIDC dependency choices stay host-owned, including exact
194
- 5.2.0 and legacy v2 pins. Before migrating a v2 host, review the vendor’s
192
+ CDK applies force `constructs ^10.7.2` and default `aws-cdk-lib`, which satisfy
193
+ the peers of `aws-cdk-github-oidc` 5.2.0. Lisa does not add opt-in construct
194
+ libraries such as `aws-cdk-github-oidc` or `@aws-cdk/aws-amplify-alpha`: an app
195
+ that imports one declares it, and a host that removes an unused one keeps it
196
+ removed on the next apply. Existing declarations stay host-owned, including
197
+ exact 5.2.0 and legacy v2 OIDC pins. Before migrating a v2 host, review the vendor’s
195
198
  [versioned API](https://unpkg.com/aws-cdk-github-oidc@5.2.0/API.md)
196
199
  and update its application trust configuration deliberately. Lisa generates no
197
200
  OIDC constructs and does not migrate application IAM policies.
@@ -249,6 +249,11 @@ expo-env.d.ts
249
249
  # /lisa:automation-status. Runbooks are project knowledge; run records are not.
250
250
  .lisa/automations/runs/
251
251
 
252
+ # Session-manager machine state (the ledger of workers this machine spawned,
253
+ # its session log). Per machine by construction; the manager's runbook under
254
+ # .lisa/automations/ stays trackable.
255
+ .lisa/session-manager/
256
+
252
257
  # Proof that `lisa apply` completed in THIS checkout, read by `lisa doctor` to
253
258
  # report a repo that has silently stopped receiving templates. Machine-local by
254
259
  # construction: committing it would churn on every version bump, conflict
@@ -51,8 +51,6 @@
51
51
  },
52
52
  "defaults": {
53
53
  "dependencies": {
54
- "aws-cdk-github-oidc": "^5.2.0",
55
- "@aws-cdk/aws-amplify-alpha": "^2.272.0-alpha.0",
56
54
  "aws-cdk-lib": "2.272.0"
57
55
  },
58
56
  "engines": {
@@ -187,8 +187,8 @@ const REMEDY = "Nothing here is removed automatically: the repository may since
187
187
  "to depend on something the preset delivered. Decide per file, then keep " +
188
188
  `the decision by making sure no \`${CDK_APP_MARKER}\` is present — while ` +
189
189
  "one is, every apply re-merges the preset's current forced entries. " +
190
- "OIDC dependency choices and existing bins are host-owned; current applies " +
191
- "do not remove legacy entries";
190
+ "Construct-library dependency choices (OIDC, Amplify alpha) and existing " +
191
+ "bins are host-owned; current applies neither add nor remove them";
192
192
  /**
193
193
  * The consequence worth stating, because it is the one that reports success.
194
194
  */
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-cdk-preset-adoption.js","sourceRoot":"","sources":["../../src/cli/doctor-cdk-preset-adoption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC9B,iBAAiB,EACjB,yBAAyB,GAE1B,MAAM,gCAAgC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mD,CAAC;IAC1D,MAAM,MAAM,GACV,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7E,OAAO,CACL,kEAAkE;QAClE,mBAAmB,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB;QACpE,GAAG,GAAG,IAAI,MAAM,IAAI,iBAAiB,KAAK,MAAM,EAAE,CACnD,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,EAAE,CAAC,MAAc;IACxB,OAAO,EAAE,IAAI,EAAE,8BAA8B,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,CAAC"}
@@ -0,0 +1,62 @@
1
+ /** A parsed JSON object (config or settings file). */
2
+ export type JsonRecord = Record<string, unknown>;
3
+ /** One finding; the check reports the worst status of all of them. */
4
+ export interface Finding {
5
+ readonly status: "warn" | "fail";
6
+ readonly text: string;
7
+ }
8
+ /** Returns a repo's visibility (`PUBLIC`, `PRIVATE`, `INTERNAL`) or throws. */
9
+ export type RepoVisibilityProbe = (repo: string) => Promise<string>;
10
+ /**
11
+ * Ask `gh` for a repository's visibility.
12
+ * @param repo - `owner/name`
13
+ * @returns Visibility as `gh` prints it
14
+ */
15
+ export declare const ghRepoVisibility: RepoVisibilityProbe;
16
+ /**
17
+ * Whether a value is a plain JSON object.
18
+ * @param value - Candidate value
19
+ * @returns True for `{}`-shaped values
20
+ */
21
+ export declare function isRecord(value: unknown): value is JsonRecord;
22
+ /**
23
+ * Whether an error means "file does not exist".
24
+ * @param error - Thrown value
25
+ * @returns True for ENOENT
26
+ */
27
+ export declare function isMissing(error: unknown): boolean;
28
+ /**
29
+ * Read and parse a JSON object file, or undefined when it does not exist.
30
+ * @param read - Text reader
31
+ * @param file - Absolute path
32
+ * @returns The parsed object, or undefined when absent
33
+ */
34
+ export declare function readJson(read: (file: string) => Promise<string>, file: string): Promise<JsonRecord | undefined>;
35
+ /**
36
+ * The file's mode, or undefined when it does not exist. Never reads contents.
37
+ * @param statFile - Mode reader
38
+ * @param file - Absolute path
39
+ * @returns Mode bits, or undefined
40
+ */
41
+ export declare function modeOf(statFile: (file: string) => Promise<{
42
+ readonly mode: number;
43
+ }>, file: string): Promise<number | undefined>;
44
+ /**
45
+ * Fail for a public GitHub repo whose manager would dispatch any author's
46
+ * item; warn when visibility cannot be determined.
47
+ * @param config - Merged top-level config (`tracker`, `github`)
48
+ * @param block - Merged `sessionManager` block
49
+ * @param probe - Visibility probe, or `undefined` in offline mode, where no
50
+ * network call may be made
51
+ * @returns Findings
52
+ */
53
+ export declare function trustFindings(config: JsonRecord, block: JsonRecord, probe: RepoVisibilityProbe | undefined): Promise<readonly Finding[]>;
54
+ /**
55
+ * Warn for every project-scope settings file that enables the plugin.
56
+ * @param root - Project root
57
+ * @param block - Merged `sessionManager` block
58
+ * @param read - Text reader
59
+ * @returns Findings
60
+ */
61
+ export declare function projectPluginFindings(root: string, block: JsonRecord, read: (file: string) => Promise<string>): Promise<readonly Finding[]>;
62
+ //# sourceMappingURL=doctor-session-manager-trust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager-trust.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-trust.ts"],"names":[],"mappings":"AAuBA,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,sEAAsE;AACtE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,+EAA+E;AAC/E,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAWpE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,mBAO9B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEjD;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,EACvC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAQjC;AAED;;;;;GAKG;AACH,wBAAsB,MAAM,CAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC9D,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,mBAAmB,GAAG,SAAS,GACrC,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CA4C7B;AAsBD;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GACtC,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAc7B"}
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Trust findings for the session-manager doctor check (#4448), plus the file
3
+ * and JSON helpers both halves of the check share.
4
+ *
5
+ * The manager dispatches Ready items to workers that run with permissions
6
+ * bypassed, so whoever can write an item effectively runs commands on the
7
+ * operator's machine. On a public GitHub repository that is anyone, unless
8
+ * `sessionManager.trustedAuthorIds` limits dispatch to known authors; that
9
+ * combination is a `fail`, not a warning. Visibility comes from an injected
10
+ * probe (`gh repo view <repo> --json visibility` by default); when it cannot
11
+ * run, the check warns and says why rather than guessing either way. Under
12
+ * `lisa doctor --offline` the probe is never run (it is a network call) and the
13
+ * check warns that visibility was not checked.
14
+ *
15
+ * The Telegram plugin must be enabled only through the manager's own
16
+ * `--settings`. Enabled in a project-scope settings file (at the root or in a
17
+ * routed child repo, where workers start), every session there would start a
18
+ * poller and take the bot away from the manager.
19
+ */
20
+ import { execFile } from "node:child_process";
21
+ import * as path from "node:path";
22
+ import { promisify } from "node:util";
23
+ const PLUGIN_ID = "telegram@claude-plugins-official";
24
+ const SETTINGS_FILES = ["settings.json", "settings.local.json"];
25
+ const DEFAULT_REPOS_ROOT = "projects";
26
+ /** A child-repo key that cannot climb out of the repos root. */
27
+ const SAFE_KEY = /^(?!\.{1,2}$)[A-Za-z0-9._-]+$/;
28
+ const PROBE_TIMEOUT_MS = 15_000;
29
+ const execFileAsync = promisify(execFile);
30
+ /**
31
+ * Ask `gh` for a repository's visibility.
32
+ * @param repo - `owner/name`
33
+ * @returns Visibility as `gh` prints it
34
+ */
35
+ export const ghRepoVisibility = async (repo) => {
36
+ const { stdout } = await execFileAsync("gh", ["repo", "view", repo, "--json", "visibility", "-q", ".visibility"], { timeout: PROBE_TIMEOUT_MS });
37
+ return stdout.trim();
38
+ };
39
+ /**
40
+ * Whether a value is a plain JSON object.
41
+ * @param value - Candidate value
42
+ * @returns True for `{}`-shaped values
43
+ */
44
+ export function isRecord(value) {
45
+ return typeof value === "object" && value !== null && !Array.isArray(value);
46
+ }
47
+ /**
48
+ * Whether an error means "file does not exist".
49
+ * @param error - Thrown value
50
+ * @returns True for ENOENT
51
+ */
52
+ export function isMissing(error) {
53
+ return error?.code === "ENOENT";
54
+ }
55
+ /**
56
+ * Read and parse a JSON object file, or undefined when it does not exist.
57
+ * @param read - Text reader
58
+ * @param file - Absolute path
59
+ * @returns The parsed object, or undefined when absent
60
+ */
61
+ export async function readJson(read, file) {
62
+ try {
63
+ const parsed = JSON.parse(await read(file));
64
+ return isRecord(parsed) ? parsed : {};
65
+ }
66
+ catch (error) {
67
+ if (isMissing(error))
68
+ return undefined;
69
+ throw error;
70
+ }
71
+ }
72
+ /**
73
+ * The file's mode, or undefined when it does not exist. Never reads contents.
74
+ * @param statFile - Mode reader
75
+ * @param file - Absolute path
76
+ * @returns Mode bits, or undefined
77
+ */
78
+ export async function modeOf(statFile, file) {
79
+ try {
80
+ return (await statFile(file)).mode;
81
+ }
82
+ catch (error) {
83
+ if (isMissing(error))
84
+ return undefined;
85
+ throw error;
86
+ }
87
+ }
88
+ /**
89
+ * Fail for a public GitHub repo whose manager would dispatch any author's
90
+ * item; warn when visibility cannot be determined.
91
+ * @param config - Merged top-level config (`tracker`, `github`)
92
+ * @param block - Merged `sessionManager` block
93
+ * @param probe - Visibility probe, or `undefined` in offline mode, where no
94
+ * network call may be made
95
+ * @returns Findings
96
+ */
97
+ export async function trustFindings(config, block, probe) {
98
+ // An empty list filters no author, so it counts as unset here.
99
+ const trusted = block.trustedAuthorIds;
100
+ if (config.tracker !== "github" ||
101
+ (Array.isArray(trusted) && trusted.length > 0)) {
102
+ return [];
103
+ }
104
+ const github = isRecord(config.github) ? config.github : {};
105
+ if (typeof github.org !== "string" || typeof github.repo !== "string") {
106
+ return [];
107
+ }
108
+ const repo = `${github.org}/${github.repo}`;
109
+ if (probe === undefined) {
110
+ return [
111
+ {
112
+ status: "warn",
113
+ text: `${repo} visibility not checked (offline); if it is public, set sessionManager.trustedAuthorIds before starting the manager`,
114
+ },
115
+ ];
116
+ }
117
+ const visibility = await probe(repo).then(value => ({ value: value.toUpperCase(), why: undefined }), (error) => ({
118
+ value: undefined,
119
+ why: error instanceof Error ? error.message : String(error),
120
+ }));
121
+ if (visibility.why !== undefined) {
122
+ return [
123
+ {
124
+ status: "warn",
125
+ text: `could not read the visibility of ${repo} (${visibility.why}); if it is public, set sessionManager.trustedAuthorIds before starting the manager`,
126
+ },
127
+ ];
128
+ }
129
+ if (visibility.value !== "PUBLIC")
130
+ return [];
131
+ return [
132
+ {
133
+ status: "fail",
134
+ text: `${repo} is public and sessionManager.trustedAuthorIds is not set, so anyone can write a Ready item that a bypass-permissions worker runs; set trustedAuthorIds to the tracker user IDs allowed to author dispatched work`,
135
+ },
136
+ ];
137
+ }
138
+ /**
139
+ * Directories whose project-scope settings a manager or worker loads: the
140
+ * root, plus each routed child repo.
141
+ * @param root - Project root
142
+ * @param block - Merged `sessionManager` block
143
+ * @returns Absolute directories
144
+ */
145
+ function settingsDirs(root, block) {
146
+ const repos = isRecord(block.repos) ? block.repos : {};
147
+ const entries = isRecord(repos.entries) ? repos.entries : {};
148
+ const reposRoot = typeof repos.root === "string" ? repos.root : DEFAULT_REPOS_ROOT;
149
+ const base = path.resolve(root);
150
+ const children = Object.keys(entries)
151
+ .filter(key => SAFE_KEY.test(key))
152
+ .map(key => path.resolve(base, reposRoot, key))
153
+ .filter(dir => dir.startsWith(`${base}${path.sep}`));
154
+ return [base, ...children];
155
+ }
156
+ /**
157
+ * Warn for every project-scope settings file that enables the plugin.
158
+ * @param root - Project root
159
+ * @param block - Merged `sessionManager` block
160
+ * @param read - Text reader
161
+ * @returns Findings
162
+ */
163
+ export async function projectPluginFindings(root, block, read) {
164
+ const files = settingsDirs(root, block).flatMap(dir => SETTINGS_FILES.map(name => path.join(dir, ".claude", name)));
165
+ const enabled = await Promise.all(files.map(async (file) => {
166
+ const plugins = (await readJson(read, file))?.enabledPlugins;
167
+ return isRecord(plugins) && plugins[PLUGIN_ID] === true ? [file] : [];
168
+ }));
169
+ return enabled.flat().map(file => ({
170
+ status: "warn",
171
+ text: `${PLUGIN_ID} is enabled in project settings ${file}, so every session there polls the bot; remove it (the manager enables it for itself)`,
172
+ }));
173
+ }
174
+ //# sourceMappingURL=doctor-session-manager-trust.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager-trust.js","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-trust.ts"],"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EAAE,cAAc,CAAC;QAC7D,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,CAAC,CAAC,CACH,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjC,MAAM,EAAE,MAAe;QACvB,IAAI,EAAE,GAAG,SAAS,mCAAmC,IAAI,uFAAuF;KACjJ,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { DoctorCheck } from "./doctor.js";
2
+ import { type RepoVisibilityProbe } from "./doctor-session-manager-trust.js";
3
+ /** Managed settings outrank `--settings`, so they can undo the manager's. */
4
+ export declare const DEFAULT_MANAGED_SETTINGS_PATHS: readonly string[];
5
+ /** Collaborators for the session-manager doctor check. */
6
+ export interface SessionManagerDoctorDependencies {
7
+ /** Environment doctor runs in; also the source of HOME by default. */
8
+ readonly env: NodeJS.ProcessEnv;
9
+ /** Home directory; defaults to `env.HOME`, then `os.homedir()`. */
10
+ readonly home?: string;
11
+ /** Text reader for JSON config and settings files. */
12
+ readonly readFile?: (file: string) => Promise<string>;
13
+ /** Mode reader for token files; never reads their contents. */
14
+ readonly stat?: (file: string) => Promise<{
15
+ readonly mode: number;
16
+ }>;
17
+ /** Managed-settings files to inspect, in precedence order. */
18
+ readonly managedSettingsPaths?: readonly string[];
19
+ /** Repo visibility probe; defaults to `gh repo view --json visibility`. */
20
+ readonly probeRepoVisibility?: RepoVisibilityProbe;
21
+ }
22
+ /** The doctor options this check honours. */
23
+ export interface SessionManagerDoctorOptions {
24
+ /** `lisa doctor --offline`: skip the visibility probe, a network call. */
25
+ readonly offline?: boolean;
26
+ }
27
+ /**
28
+ * Check Telegram isolation for a configured session manager.
29
+ * @param targetPath - Project root
30
+ * @param deps - Injected environment, HOME and file access
31
+ * @param options - Doctor options; `offline` skips the visibility probe
32
+ * @returns Doctor check result
33
+ */
34
+ export declare function checkSessionManagerIsolation(targetPath: string, deps: SessionManagerDoctorDependencies, options?: SessionManagerDoctorOptions): Promise<DoctorCheck>;
35
+ //# sourceMappingURL=doctor-session-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-session-manager.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAEL,KAAK,mBAAmB,EAOzB,MAAM,mCAAmC,CAAC;AAY3C,6EAA6E;AAC7E,eAAO,MAAM,8BAA8B,EAAE,SAAS,MAAM,EAG3D,CAAC;AAEF,0DAA0D;AAC1D,MAAM,WAAW,gCAAgC;IAC/C,sEAAsE;IACtE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,mEAAmE;IACnE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,8DAA8D;IAC9D,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClD,2EAA2E;IAC3E,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CACpD;AAED,6CAA6C;AAC7C,MAAM,WAAW,2BAA2B;IAC1C,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAwID;;;;;;GAMG;AACH,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,gCAAgC,EACtC,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,WAAW,CAAC,CA+DtB"}
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Doctor check for the session manager's Telegram isolation (#4448).
3
+ *
4
+ * The manager is the only Claude session that may poll the project's Telegram
5
+ * bot. Two sessions polling one bot steal each other's messages, and a worker
6
+ * that inherits the token can impersonate the manager. Setup and `start`
7
+ * enforce isolation when they run; this check catches drift afterwards: a
8
+ * plugin later enabled at user scope, a token copied into the shared default
9
+ * dir, a token exported from a shell profile, a loosened file mode, or managed
10
+ * settings that override the manager's `crossSessionInbound: accept`. Trust
11
+ * findings (a public repo without `trustedAuthorIds`, the plugin enabled in
12
+ * project-scope settings) live in `doctor-session-manager-trust`.
13
+ *
14
+ * Gated on a `sessionManager` block in the merged config (the Kane model): a
15
+ * project that never opted in gets `ok` / "not configured" and nothing is read
16
+ * under HOME. Token files are only ever `stat`-ed, never read, so the token
17
+ * value cannot reach the detail text; environment values are reported by name
18
+ * only. HOME, env, file reads and managed-settings paths are injectable so
19
+ * tests never touch the operator's real `~/.claude`.
20
+ */
21
+ import { readFile as fsReadFile, stat as fsStat } from "node:fs/promises";
22
+ import * as os from "node:os";
23
+ import * as path from "node:path";
24
+ import { ghRepoVisibility, isRecord, modeOf, projectPluginFindings, readJson, trustFindings, } from "./doctor-session-manager-trust.js";
25
+ import { mergeSessionManagerBlocks } from "./session-manager-config-merge.js";
26
+ const CHECK_NAME = "Session manager Telegram isolation?";
27
+ const PLUGIN_ID = "telegram@claude-plugins-official";
28
+ const TOKEN_FILE = ".env";
29
+ const ENV_NAMES = ["TELEGRAM_BOT_TOKEN", "TELEGRAM_STATE_DIR"];
30
+ /** Group + other permission bits are the low six bits of a file mode. */
31
+ const GROUP_OTHER_SPAN = 0o100;
32
+ /** All permission bits (owner, group, other) are the low nine. */
33
+ const PERMISSION_SPAN = 0o1000;
34
+ /** Managed settings outrank `--settings`, so they can undo the manager's. */
35
+ export const DEFAULT_MANAGED_SETTINGS_PATHS = [
36
+ "/Library/Application Support/ClaudeCode/managed-settings.json",
37
+ "/etc/claude-code/managed-settings.json",
38
+ ];
39
+ /**
40
+ * Resolve the configured state dir to an absolute path, expanding `~`.
41
+ * @param raw - Configured `notify.stateDir`
42
+ * @param home - Home directory
43
+ * @param projectRoot - Base for a relative path
44
+ * @returns Absolute path, or undefined when unset
45
+ */
46
+ function resolveStateDir(raw, home, projectRoot) {
47
+ if (typeof raw !== "string" || raw.trim() === "")
48
+ return undefined;
49
+ const dir = raw.trim();
50
+ if (dir === "~")
51
+ return home;
52
+ if (dir.startsWith("~/"))
53
+ return path.resolve(home, dir.slice(2));
54
+ return path.resolve(projectRoot, dir);
55
+ }
56
+ /**
57
+ * Findings about the configured per-project state dir and its token file.
58
+ * @param ctx - Resolved inputs
59
+ * @param stateDir - Absolute state dir, or undefined when unset
60
+ * @returns Findings
61
+ */
62
+ async function stateDirFindings(ctx, stateDir) {
63
+ if (stateDir === undefined) {
64
+ return [
65
+ {
66
+ status: "fail",
67
+ text: "sessionManager.notify.stateDir is not set; run /lisa:setup:session-manager to give this project its own Telegram state dir",
68
+ },
69
+ ];
70
+ }
71
+ if (stateDir === ctx.sharedDir) {
72
+ return [
73
+ {
74
+ status: "fail",
75
+ text: `notify.stateDir is the shared default ${ctx.sharedDir}, so every Telegram session on this machine would poll one bot; point it at a per-project dir such as ${ctx.sharedDir}-<project>`,
76
+ },
77
+ ];
78
+ }
79
+ const tokenFile = path.join(stateDir, TOKEN_FILE);
80
+ const mode = await modeOf(ctx.statFile, tokenFile);
81
+ if (mode === undefined) {
82
+ return [
83
+ {
84
+ status: "warn",
85
+ text: `token file ${tokenFile} is missing, so the manager cannot start; store the bot token with /lisa:setup:session-manager`,
86
+ },
87
+ ];
88
+ }
89
+ if (mode % GROUP_OTHER_SPAN === 0)
90
+ return [];
91
+ const octal = (mode % PERMISSION_SPAN).toString(8).padStart(3, "0");
92
+ return [
93
+ {
94
+ status: "warn",
95
+ text: `token file ${tokenFile} has mode 0${octal}, open to other users; run chmod 600 ${tokenFile}`,
96
+ },
97
+ ];
98
+ }
99
+ /**
100
+ * Findings about the user-scope plugin and the shared default token file.
101
+ * @param ctx - Resolved inputs
102
+ * @returns Findings
103
+ */
104
+ async function userScopeFindings(ctx) {
105
+ const settings = await readJson(ctx.read, path.join(ctx.claudeDir, "settings.json"));
106
+ const plugins = settings?.enabledPlugins;
107
+ const sharedToken = path.join(ctx.sharedDir, TOKEN_FILE);
108
+ return [
109
+ ...(isRecord(plugins) && plugins[PLUGIN_ID] === true
110
+ ? [
111
+ {
112
+ status: "warn",
113
+ text: `${PLUGIN_ID} is enabled at user scope, so every Claude session polls the bot; run claude plugin disable ${PLUGIN_ID} -s user (the manager enables it for itself)`,
114
+ },
115
+ ]
116
+ : []),
117
+ ...((await modeOf(ctx.statFile, sharedToken)) === undefined
118
+ ? []
119
+ : [
120
+ {
121
+ status: "warn",
122
+ text: `a token file exists in the shared default dir (${sharedToken}); move it to the per-project state dir and delete it`,
123
+ },
124
+ ]),
125
+ ];
126
+ }
127
+ /**
128
+ * Findings about the shell environment and managed settings.
129
+ * @param ctx - Resolved inputs
130
+ * @returns Findings
131
+ */
132
+ async function environmentFindings(ctx) {
133
+ const exported = ENV_NAMES.filter(name => (ctx.env[name] ?? "") !== "").map(name => ({
134
+ status: "warn",
135
+ text: `${name} is set in this shell's environment, so workers may inherit it; remove the export from your shell profile`,
136
+ }));
137
+ const managed = await Promise.all(ctx.managedPaths.map(async (file) => ({
138
+ file,
139
+ inbound: (await readJson(ctx.read, file))?.crossSessionInbound,
140
+ })));
141
+ const held = managed
142
+ .filter(({ inbound }) => inbound !== undefined && inbound !== "accept")
143
+ .map(({ file, inbound }) => ({
144
+ status: "warn",
145
+ text: `managed settings ${file} set crossSessionInbound to ${JSON.stringify(inbound)}, which outranks the manager's "accept", so worker messages would be held`,
146
+ }));
147
+ return [...exported, ...held];
148
+ }
149
+ /**
150
+ * Check Telegram isolation for a configured session manager.
151
+ * @param targetPath - Project root
152
+ * @param deps - Injected environment, HOME and file access
153
+ * @param options - Doctor options; `offline` skips the visibility probe
154
+ * @returns Doctor check result
155
+ */
156
+ export async function checkSessionManagerIsolation(targetPath, deps, options = {}) {
157
+ const read = deps.readFile ?? (file => fsReadFile(file, "utf8"));
158
+ try {
159
+ const committed = await readJson(read, path.join(targetPath, ".lisa.config.json"));
160
+ const local = await readJson(read, path.join(targetPath, ".lisa.config.local.json"));
161
+ const block = mergeSessionManagerBlocks(committed, local);
162
+ if (block === undefined) {
163
+ return { name: CHECK_NAME, status: "ok", detail: "not configured" };
164
+ }
165
+ const home = deps.home ?? deps.env.HOME ?? os.homedir();
166
+ const claudeDir = deps.env.CLAUDE_CONFIG_DIR
167
+ ? path.resolve(deps.env.CLAUDE_CONFIG_DIR)
168
+ : path.join(home, ".claude");
169
+ const ctx = {
170
+ claudeDir,
171
+ sharedDir: path.join(claudeDir, "channels", "telegram"),
172
+ env: deps.env,
173
+ read,
174
+ statFile: deps.stat ?? fsStat,
175
+ managedPaths: deps.managedSettingsPaths ?? DEFAULT_MANAGED_SETTINGS_PATHS,
176
+ };
177
+ const notify = isRecord(block.notify) ? block.notify : {};
178
+ const stateDir = resolveStateDir(notify.stateDir, home, targetPath);
179
+ const findings = [
180
+ ...(await stateDirFindings(ctx, stateDir)),
181
+ ...(await userScopeFindings(ctx)),
182
+ ...(await environmentFindings(ctx)),
183
+ ...(await projectPluginFindings(targetPath, block, read)),
184
+ ...(await trustFindings({ ...committed, ...local }, block, options.offline === true
185
+ ? undefined
186
+ : (deps.probeRepoVisibility ?? ghRepoVisibility))),
187
+ ];
188
+ if (findings.length === 0) {
189
+ return {
190
+ name: CHECK_NAME,
191
+ status: "ok",
192
+ detail: `isolated: per-project state dir ${String(stateDir)}, token file mode 0600 or tighter, plugin not enabled at user scope`,
193
+ };
194
+ }
195
+ return {
196
+ name: CHECK_NAME,
197
+ status: findings.some(f => f.status === "fail") ? "fail" : "warn",
198
+ detail: findings.map(f => f.text).join("; "),
199
+ };
200
+ }
201
+ catch (error) {
202
+ return {
203
+ name: CHECK_NAME,
204
+ status: "warn",
205
+ detail: `could not evaluate session-manager isolation: ${error instanceof Error ? error.message : String(error)}`,
206
+ };
207
+ }
208
+ }
209
+ //# sourceMappingURL=doctor-session-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager.js","sourceRoot":"","sources":["../../src/cli/doctor-session-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAGL,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,qBAAqB,EACrB,QAAQ,EACR,aAAa,GACd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,SAAS,GAAG,kCAAkC,CAAC;AACrD,MAAM,UAAU,GAAG,MAAM,CAAC;AAC1B,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,oBAAoB,CAAU,CAAC;AACxE,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,kEAAkE;AAClE,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B,6EAA6E;AAC7E,MAAM,CAAC,MAAM,8BAA8B,GAAsB;IAC/D,+DAA+D;IAC/D,wCAAwC;CACzC,CAAC;AAkCF;;;;;;GAMG;AACH,SAAS,eAAe,CACtB,GAAY,EACZ,IAAY,EACZ,WAAmB;IAEnB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,I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B;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,KAAK,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;IAChD,wBAAwB,EAAE,OAAO,wBAAwB,CAAC;CAC3D;AAyBD;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EAChD,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAyBtB;AA8JD;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,aAAa,EACtB,YAAY,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC7C,OAAO,CAAC,YAAY,CAAC,CA4JvB"}
@@ -10,6 +10,7 @@ import { checkApplyFreshness, checkYamlRuntime, } from "./doctor-apply-freshness
10
10
  import { checkEnforcementCoverage } from "./doctor-enforcement-coverage.js";
11
11
  import { checkLockfileReconciliation } from "./doctor-reconciliation.js";
12
12
  import { checkKaneProvider } from "./doctor-kane.js";
13
+ import { checkSessionManagerIsolation } from "./doctor-session-manager.js";
13
14
  import { checkLearningsLedger } from "./doctor-learnings-ledger.js";
14
15
  import { checkMergeDrivers } from "./doctor-merge-drivers.js";
15
16
  import { checkReadinessReportTracking } from "./doctor-readiness-tracking.js";
@@ -277,6 +278,8 @@ export async function runDoctor(targetPath, options, dependencies = {}) {
277
278
  await checkDeclaredContexts(resolvedTarget),
278
279
  await checkCodeRabbitProvider(resolvedTarget, deps),
279
280
  await checkKaneProvider(resolvedTarget, deps),
281
+ // Config-gated like Kane: "not configured" unless sessionManager is set.
282
+ await checkSessionManagerIsolation(resolvedTarget, deps, options),
280
283
  await checkSonarProvider(resolvedTarget, deps),
281
284
  await checkLegacyMonitorThresholds(resolvedTarget),
282
285
  await checkLisaOwnedArtifacts(resolvedTarget),