@codyswann/lisa 4.84.11 → 4.86.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 (322) hide show
  1. package/dist/cli/doctor-session-manager-pending.d.ts +17 -0
  2. package/dist/cli/doctor-session-manager-pending.d.ts.map +1 -0
  3. package/dist/cli/doctor-session-manager-pending.js +130 -0
  4. package/dist/cli/doctor-session-manager-pending.js.map +1 -0
  5. package/dist/cli/doctor-session-manager-token.d.ts +69 -0
  6. package/dist/cli/doctor-session-manager-token.d.ts.map +1 -0
  7. package/dist/cli/doctor-session-manager-token.js +264 -0
  8. package/dist/cli/doctor-session-manager-token.js.map +1 -0
  9. package/dist/cli/doctor-session-manager.d.ts +3 -1
  10. package/dist/cli/doctor-session-manager.d.ts.map +1 -1
  11. package/dist/cli/doctor-session-manager.js +168 -146
  12. package/dist/cli/doctor-session-manager.js.map +1 -1
  13. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  14. package/dist/core/lisa-owned-hash-ledger.js +34 -0
  15. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  16. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  17. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  18. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  19. package/dist/core/upstream-evidence-manifest.js +172 -23
  20. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  21. package/package.json +4 -4
  22. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/SKILL.md +5 -3
  25. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  26. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  27. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +197 -54
  28. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +23 -10
  29. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  30. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  31. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  32. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  33. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  34. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  35. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  36. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  37. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  38. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +39 -11
  39. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  40. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  41. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  42. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  43. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  44. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  45. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  46. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  47. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  48. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  49. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  50. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  51. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  52. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token.mjs +39 -120
  53. package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +82 -19
  54. package/plugins/lisa/commands/session-manager.md +1 -1
  55. package/plugins/lisa/commands/setup/session-manager.md +1 -1
  56. package/plugins/lisa/rules/reference/config-resolution.md +39 -7
  57. package/plugins/lisa/skills/lisa-secrets-access/SKILL.md +5 -3
  58. package/plugins/lisa/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  59. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  60. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +197 -54
  61. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +23 -10
  62. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  63. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  64. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  65. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  66. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  67. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  68. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  69. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  70. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  71. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +39 -11
  72. package/plugins/lisa/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  73. package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  74. package/plugins/lisa/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  75. package/plugins/lisa/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  76. package/plugins/lisa/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  77. package/plugins/lisa/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  78. package/plugins/lisa/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  79. package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  80. package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  81. package/plugins/lisa/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  82. package/plugins/lisa/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  83. package/plugins/lisa/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  84. package/plugins/lisa/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  85. package/plugins/lisa/skills/lisa-session-manager/scripts/token.mjs +39 -120
  86. package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +82 -19
  87. package/plugins/lisa-agy/commands/lisa/session-manager.md +1 -1
  88. package/plugins/lisa-agy/commands/lisa/setup/session-manager.md +1 -1
  89. package/plugins/lisa-agy/plugin.json +1 -1
  90. package/plugins/lisa-agy/skills/lisa-secrets-access/SKILL.md +5 -3
  91. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  92. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  93. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +197 -54
  94. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +23 -10
  95. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  96. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  97. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  98. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  99. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  100. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  101. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  102. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  103. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  104. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +39 -11
  105. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  106. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  107. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  108. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  109. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  110. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  111. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  112. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  113. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  114. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  115. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  116. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  117. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  118. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token.mjs +39 -120
  119. package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +82 -19
  120. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  122. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  123. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  127. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-copilot/commands/lisa/session-manager.md +1 -1
  129. package/plugins/lisa-copilot/commands/lisa/setup/session-manager.md +1 -1
  130. package/plugins/lisa-copilot/rules/reference/config-resolution.md +39 -7
  131. package/plugins/lisa-copilot/skills/lisa-secrets-access/SKILL.md +5 -3
  132. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  133. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  134. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +197 -54
  135. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +23 -10
  136. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  137. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  138. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  139. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  140. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  141. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  142. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  143. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  144. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  145. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +39 -11
  146. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  147. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  148. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  149. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  150. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  151. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  152. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  153. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  154. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  155. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  156. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  157. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  158. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  159. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token.mjs +39 -120
  160. package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +82 -19
  161. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-cursor/commands/lisa/session-manager.md +1 -1
  163. package/plugins/lisa-cursor/commands/lisa/setup/session-manager.md +1 -1
  164. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +39 -7
  165. package/plugins/lisa-cursor/skills/lisa-secrets-access/SKILL.md +5 -3
  166. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  167. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  168. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +197 -54
  169. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +23 -10
  170. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  171. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  172. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  173. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  174. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  175. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  176. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  177. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  178. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  179. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +39 -11
  180. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  181. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  182. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  183. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  184. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  185. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  186. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  187. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  188. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  189. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  190. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  191. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  192. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  193. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token.mjs +39 -120
  194. package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +82 -19
  195. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  197. package/plugins/lisa-devin/rules/reference/config-resolution.md +39 -7
  198. package/plugins/lisa-devin/skills/lisa-secrets-access/SKILL.md +5 -3
  199. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  200. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  201. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +197 -54
  202. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +23 -10
  203. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  204. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  205. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  206. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  207. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  208. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  209. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  210. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  211. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  212. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +39 -11
  213. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  214. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  215. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  216. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  217. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  218. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  219. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  220. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  221. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  222. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  223. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  224. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  225. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  226. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token.mjs +39 -120
  227. package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +82 -19
  228. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  229. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  230. package/plugins/lisa-expo-agy/plugin.json +1 -1
  231. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  232. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  233. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  234. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  235. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  236. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  237. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  238. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  239. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  240. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  241. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  242. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  243. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  244. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  245. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  246. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  247. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  248. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  249. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  250. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  251. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  252. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  253. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  254. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  255. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  256. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  257. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  258. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  259. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  260. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  261. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  262. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  263. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  264. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  265. package/plugins/lisa-rails-agy/plugin.json +1 -1
  266. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  267. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  268. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  269. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  270. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  271. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  272. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  273. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  274. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  275. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  276. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  277. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  278. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  279. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  280. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  281. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  282. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  283. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  284. package/plugins/src/base/commands/session-manager.md +1 -1
  285. package/plugins/src/base/commands/setup/session-manager.md +1 -1
  286. package/plugins/src/base/rules/reference/config-resolution.md +39 -7
  287. package/plugins/src/base/skills/lisa-secrets-access/SKILL.md +5 -3
  288. package/plugins/src/base/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  289. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  290. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +197 -54
  291. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +23 -10
  292. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  293. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  294. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  295. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  296. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  297. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  298. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  299. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  300. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  301. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +39 -11
  302. package/plugins/src/base/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  303. package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  304. package/plugins/src/base/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  305. package/plugins/src/base/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  306. package/plugins/src/base/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  307. package/plugins/src/base/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  308. package/plugins/src/base/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  309. package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  310. package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  311. package/plugins/src/base/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  312. package/plugins/src/base/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  313. package/plugins/src/base/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  314. package/plugins/src/base/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  315. package/plugins/src/base/skills/lisa-session-manager/scripts/token.mjs +39 -120
  316. package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +82 -19
  317. package/rails/copy-overwrite/scripts/lisa-rspec-shards.mjs +747 -0
  318. package/rails/copy-overwrite/scripts/lisa_rspec_shard_recorder.rb +143 -0
  319. package/rails/copy-overwrite/scripts/lisa_simplecov_collate.rb +51 -0
  320. package/rails/create-only/.github/workflows/ci.yml +4 -0
  321. package/scripts/two-channel-couplings.json +89 -7
  322. package/typescript/copy-overwrite/.prettierignore +1 -0
@@ -0,0 +1,17 @@
1
+ import { type Finding } from "./doctor-session-manager-trust.js";
2
+ /** What the pending-human scan adds to the check. */
3
+ export interface PendingHumanReport {
4
+ /** One line listing the waiting items, or undefined when there are none. */
5
+ readonly note: string | undefined;
6
+ readonly findings: readonly Finding[];
7
+ }
8
+ /**
9
+ * List the items pending a human and warn about unmarked ones.
10
+ * @param targetPath - Project root
11
+ * @param block - Merged `sessionManager` block
12
+ * @param read - Text reader
13
+ * @param now - Clock
14
+ * @returns The note and findings
15
+ */
16
+ export declare function pendingHumanReport(targetPath: string, block: Record<string, unknown>, read: (file: string) => Promise<string>, now: () => Date): Promise<PendingHumanReport>;
17
+ //# sourceMappingURL=doctor-session-manager-pending.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager-pending.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-pending.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,mCAAmC,CAAC;AAgB3C,qDAAqD;AACrD,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC;AA0ED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,EACvC,GAAG,EAAE,MAAM,IAAI,GACd,OAAO,CAAC,kBAAkB,CAAC,CAgC7B"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Items waiting on a human, for the session-manager doctor check
3
+ * (CodySwannGT/lisa#4555, part 3).
4
+ *
5
+ * The manager marks an item that needs a person and keeps dispatching others.
6
+ * Doctor lists what is waiting so an operator sees it without the tracker, and
7
+ * warns about one failure only it can see from outside: a question recorded in
8
+ * the ledger more than one cycle `interval` ago whose tracker mark was never
9
+ * read back (`markedAt: null`). The manager records the question before it
10
+ * writes the mark, so this is a cycle that crashed or was stopped mid-way and
11
+ * has not finished the job since, and nobody on the tracker knows the item is
12
+ * waiting.
13
+ *
14
+ * Only the ref, kind and age are printed, never the question text: it came
15
+ * from a worker or a ticket and could carry anything.
16
+ */
17
+ import * as path from "node:path";
18
+ import { isRecord, readJson, } from "./doctor-session-manager-trust.js";
19
+ /** The cycle interval when `sessionManager.interval` is absent. */
20
+ const DEFAULT_INTERVAL_MS = 5 * 60_000;
21
+ const MINUTE_MS = 60_000;
22
+ const HOUR_MS = 60 * MINUTE_MS;
23
+ const DAY_MS = 24 * HOUR_MS;
24
+ const UNIT_MS = {
25
+ s: 1000,
26
+ m: MINUTE_MS,
27
+ h: HOUR_MS,
28
+ d: DAY_MS,
29
+ };
30
+ /**
31
+ * Parse a cycle interval such as `5m`; anything else is the default.
32
+ * @param value - `sessionManager.interval`
33
+ * @returns Interval in milliseconds
34
+ */
35
+ function intervalMs(value) {
36
+ const match = typeof value === "string" ? /^(\d+)([smhd])$/.exec(value) : null;
37
+ if (!match)
38
+ return DEFAULT_INTERVAL_MS;
39
+ return Number(match[1]) * (UNIT_MS[match[2] ?? "m"] ?? MINUTE_MS);
40
+ }
41
+ /**
42
+ * A short age such as `3h` or `20m`.
43
+ * @param ms - Age in milliseconds
44
+ * @returns Age text
45
+ */
46
+ function age(ms) {
47
+ if (ms >= DAY_MS)
48
+ return `${Math.floor(ms / DAY_MS)}d`;
49
+ if (ms >= HOUR_MS)
50
+ return `${Math.floor(ms / HOUR_MS)}h`;
51
+ return `${Math.max(0, Math.floor(ms / MINUTE_MS))}m`;
52
+ }
53
+ /**
54
+ * The waiting items in a parsed ledger, oldest first.
55
+ * @param ledger - Parsed ledger.json
56
+ * @param now - Current time in ms
57
+ * @returns Waiting items
58
+ */
59
+ function waitingItems(ledger, now) {
60
+ const items = isRecord(ledger.items) ? ledger.items : {};
61
+ const rows = Object.entries(items).flatMap(([ref, item]) => {
62
+ const question = isRecord(item) ? item.pendingQuestion : undefined;
63
+ if (!isRecord(question))
64
+ return [];
65
+ const asked = Date.parse(String(question.askedAt ?? ""));
66
+ return [
67
+ {
68
+ ref,
69
+ kind: typeof question.kind === "string" ? question.kind : "worker-question",
70
+ ageMs: Number.isNaN(asked) ? 0 : now - asked,
71
+ marked: typeof question.markedAt === "string",
72
+ },
73
+ ];
74
+ });
75
+ return [...rows].sort((a, b) => b.ageMs - a.ageMs);
76
+ }
77
+ /**
78
+ * Why the ledger could not be loaded: unparseable JSON, or a read that
79
+ * failed (permissions, a directory in its place), told apart so the
80
+ * operator fixes the right thing. Only the error code is shown.
81
+ * @param error - What reading or parsing threw
82
+ * @returns Phrase completing "<file> …"
83
+ */
84
+ function ledgerProblem(error) {
85
+ if (error instanceof SyntaxError)
86
+ return "is not valid JSON";
87
+ const code = isRecord(error) && typeof error.code === "string" ? error.code : undefined;
88
+ return code === undefined
89
+ ? "could not be read"
90
+ : `could not be read (${code})`;
91
+ }
92
+ /**
93
+ * List the items pending a human and warn about unmarked ones.
94
+ * @param targetPath - Project root
95
+ * @param block - Merged `sessionManager` block
96
+ * @param read - Text reader
97
+ * @param now - Clock
98
+ * @returns The note and findings
99
+ */
100
+ export async function pendingHumanReport(targetPath, block, read, now) {
101
+ const file = path.join(targetPath, ".lisa", "session-manager", "ledger.json");
102
+ const loaded = await readJson(read, file).then(value => ({ ledger: value, problem: undefined }), (error) => ({ ledger: undefined, problem: ledgerProblem(error) }));
103
+ if (loaded.problem !== undefined) {
104
+ return {
105
+ note: undefined,
106
+ findings: [
107
+ {
108
+ status: "warn",
109
+ text: `${file} ${loaded.problem}, so doctor cannot list the items waiting on a human; the manager also refuses it until it is repaired`,
110
+ },
111
+ ],
112
+ };
113
+ }
114
+ const ledger = loaded.ledger;
115
+ const waiting = ledger === undefined ? [] : waitingItems(ledger, now().getTime());
116
+ if (waiting.length === 0)
117
+ return { note: undefined, findings: [] };
118
+ const limit = intervalMs(block.interval);
119
+ const unmarked = waiting.filter(item => !item.marked && item.ageMs > limit);
120
+ return {
121
+ note: `${waiting.length} pending a human: ${waiting
122
+ .map(item => `${item.ref} (${item.kind}, ${age(item.ageMs)})`)
123
+ .join(", ")}`,
124
+ findings: unmarked.map(item => ({
125
+ status: "warn",
126
+ text: `${item.ref} has waited ${age(item.ageMs)} for a human but was never marked human-needed on the tracker, so nobody there knows; check the manager is running (session-manager.mjs status) and let its next cycle mark it`,
127
+ })),
128
+ };
129
+ }
130
+ //# sourceMappingURL=doctor-session-manager-pending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager-pending.js","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-pending.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAEL,QAAQ,EACR,QAAQ,GACT,MAAM,mCAAmC,CAAC;AAE3C,mEAAmE;AACnE,MAAM,mBAAmB,GAAG,CAAC,GAAG,MAAM,CAAC;AAEvC,MAAM,SAAS,GAAG,MAAM,CAAC;AACzB,MAAM,OAAO,GAAG,EAAE,GAAG,SAAS,CAAC;AAC/B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,IAAI,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;IAC5E,OAAO;QACL,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,qBAAqB,OAAO;aAChD,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;aAC7D,IAAI,CAAC,IAAI,CAAC,EAAE;QACf,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC9B,MAAM,EAAE,MAAe;YACvB,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,gLAAgL;SAChO,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { type Finding } from "./doctor-session-manager-trust.js";
2
+ /** Resolved inputs the Telegram findings read. */
3
+ export interface TelegramContext {
4
+ readonly claudeDir: string;
5
+ readonly sharedDir: string;
6
+ readonly env: NodeJS.ProcessEnv;
7
+ readonly read: (file: string) => Promise<string>;
8
+ readonly statFile: (file: string) => Promise<{
9
+ readonly mode: number;
10
+ }>;
11
+ /** The configured secrets provider, or undefined when none (or `env`). */
12
+ readonly secretsProvider: string | undefined;
13
+ /** The provider secret name for this manager. */
14
+ readonly secretName: string;
15
+ }
16
+ /**
17
+ * The provider secret name for a manager: `TELEGRAM_BOT_TOKEN_<NAME>` with
18
+ * the name upper-snaked. Must agree with the session-manager CLI's
19
+ * `telegramSecretName` (token-store.mjs); a test pins the two together.
20
+ * @param managerName - `sessionManager.name`
21
+ * @returns Secret name
22
+ */
23
+ export declare function telegramSecretNameFor(managerName: unknown): string;
24
+ /**
25
+ * The secrets provider the session-manager CLI will use for this project, or
26
+ * undefined when it uses none (`env`, or no provider at all). Decided exactly
27
+ * the way the CLI's `loadTokenSecrets` does through `lisa-secrets-access`'s
28
+ * `readConfig`: only the committed `.lisa.config.json` counts (the local
29
+ * override is never read for `secrets`), its `secrets.provider` defaulting
30
+ * to `env`; with no committed file at all, the environment fallback
31
+ * (`LISA_TENANT` or `LISA_SECRETS_NAMESPACE` names a tenant, and
32
+ * `LISA_PROVIDER` / `LISA_SECRETS_PROVIDER` its provider, default
33
+ * `bitwarden`). A test pins this to the CLI. Known gap: with no config file
34
+ * at the root the CLI also looks under `LISA_PROJECT_DIR` /
35
+ * `CLAUDE_PROJECT_DIR`; doctor only looks at the project it was pointed at.
36
+ * @param targetPath - Project root
37
+ * @param read - Text reader
38
+ * @param env - Doctor's environment
39
+ * @returns Provider name, or undefined for none
40
+ */
41
+ export declare function secretsProviderAt(targetPath: string, read: (file: string) => Promise<string>, env: NodeJS.ProcessEnv): Promise<string | undefined>;
42
+ /**
43
+ * Resolve the configured state dir to an absolute path, expanding `~`.
44
+ * @param raw - Configured `notify.stateDir`
45
+ * @param home - Home directory
46
+ * @param projectRoot - Base for a relative path
47
+ * @returns Absolute path, or undefined when unset
48
+ */
49
+ export declare function resolveStateDir(raw: unknown, home: string, projectRoot: string): string | undefined;
50
+ /**
51
+ * The plaintext-token findings that hold with no notification channel too
52
+ * (the spec's "doctor flags any plaintext token file it finds"): an exported
53
+ * `TELEGRAM_BOT_TOKEN*` variable, by name only, and a token file in the
54
+ * shared Telegram state dir, by existence only (never read). The Telegram
55
+ * requirements themselves (state dir, plugin scope, `TELEGRAM_STATE_DIR`)
56
+ * are skipped, since no bot is configured.
57
+ * @param ctx - The shared dir, environment and mode reader
58
+ * @returns Findings
59
+ */
60
+ export declare function plaintextTokenFindings(ctx: Pick<TelegramContext, "sharedDir" | "env" | "statFile">): Promise<readonly Finding[]>;
61
+ /**
62
+ * Every Telegram finding: the state dir and its token file, the user-scope
63
+ * plugin and shared default dir, and exported Telegram variables.
64
+ * @param ctx - Resolved inputs
65
+ * @param stateDir - Absolute state dir, or undefined when unset
66
+ * @returns Findings
67
+ */
68
+ export declare function telegramFindings(ctx: TelegramContext, stateDir: string | undefined): Promise<readonly Finding[]>;
69
+ //# sourceMappingURL=doctor-session-manager-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager-token.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-token.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,mCAAmC,CAAC;AAY3C,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxE,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAKlE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,EACvC,GAAG,EAAE,MAAM,CAAC,UAAU,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAU7B;AAyBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAMpB;AAuID;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,KAAK,GAAG,UAAU,CAAC,GAC3D,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAa7B;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,eAAe,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAM7B"}
@@ -0,0 +1,264 @@
1
+ /**
2
+ * Telegram findings for the session-manager notifications doctor check
3
+ * (#4448), split out of `doctor-session-manager` when Telegram became optional
4
+ * (#4555). With no notification channel only {@link plaintextTokenFindings}
5
+ * runs: a plaintext token is worth flagging whether or not a bot is set up.
6
+ *
7
+ * The manager is the only Claude session that may poll the project's Telegram
8
+ * bot. Two sessions polling one bot steal each other's messages, and a worker
9
+ * that inherits the token can impersonate the manager. Setup and `start`
10
+ * enforce isolation when they run; these findings catch drift afterwards: a
11
+ * plugin later enabled at user scope, a token copied into the shared default
12
+ * dir, a token exported from a shell profile, or a loosened file mode.
13
+ *
14
+ * Where the token lives (#4555): with a secrets provider configured
15
+ * (`secrets.provider` set and not `env`) it belongs in the provider as
16
+ * `TELEGRAM_BOT_TOKEN_<NAME>`, so a plaintext token file in the state dir is
17
+ * a leftover that `store-token` migrates (and `start` refuses to run while
18
+ * it holds a `TELEGRAM_BOT_TOKEN` line; doctor only stats it, so it says so
19
+ * rather than claiming the file is refused outright). With no provider that file is still how the token is stored, and
20
+ * it is flagged as plaintext. Doctor never reads the vault: it cannot prove
21
+ * the secret exists, only that no plaintext copy is left.
22
+ *
23
+ * Token files are only ever `stat`-ed, never read, so the token value cannot
24
+ * reach the detail text; environment values are reported by name only.
25
+ */
26
+ import * as path from "node:path";
27
+ import { isRecord, modeOf, readJson, } from "./doctor-session-manager-trust.js";
28
+ const PLUGIN_ID = "telegram@claude-plugins-official";
29
+ const TOKEN_FILE = ".env";
30
+ /** The plugin's token variable; any `TELEGRAM_BOT_TOKEN*` name is flagged. */
31
+ const TOKEN_VAR = "TELEGRAM_BOT_TOKEN";
32
+ const STATE_DIR_VAR = "TELEGRAM_STATE_DIR";
33
+ /** Group + other permission bits are the low six bits of a file mode. */
34
+ const GROUP_OTHER_SPAN = 0o100;
35
+ /** All permission bits (owner, group, other) are the low nine. */
36
+ const PERMISSION_SPAN = 0o1000;
37
+ /**
38
+ * The provider secret name for a manager: `TELEGRAM_BOT_TOKEN_<NAME>` with
39
+ * the name upper-snaked. Must agree with the session-manager CLI's
40
+ * `telegramSecretName` (token-store.mjs); a test pins the two together.
41
+ * @param managerName - `sessionManager.name`
42
+ * @returns Secret name
43
+ */
44
+ export function telegramSecretNameFor(managerName) {
45
+ const suffix = String(managerName)
46
+ .toUpperCase()
47
+ .replaceAll(/[^A-Z0-9]+/g, "_");
48
+ return `${TOKEN_VAR}_${suffix}`;
49
+ }
50
+ /**
51
+ * The secrets provider the session-manager CLI will use for this project, or
52
+ * undefined when it uses none (`env`, or no provider at all). Decided exactly
53
+ * the way the CLI's `loadTokenSecrets` does through `lisa-secrets-access`'s
54
+ * `readConfig`: only the committed `.lisa.config.json` counts (the local
55
+ * override is never read for `secrets`), its `secrets.provider` defaulting
56
+ * to `env`; with no committed file at all, the environment fallback
57
+ * (`LISA_TENANT` or `LISA_SECRETS_NAMESPACE` names a tenant, and
58
+ * `LISA_PROVIDER` / `LISA_SECRETS_PROVIDER` its provider, default
59
+ * `bitwarden`). A test pins this to the CLI. Known gap: with no config file
60
+ * at the root the CLI also looks under `LISA_PROJECT_DIR` /
61
+ * `CLAUDE_PROJECT_DIR`; doctor only looks at the project it was pointed at.
62
+ * @param targetPath - Project root
63
+ * @param read - Text reader
64
+ * @param env - Doctor's environment
65
+ * @returns Provider name, or undefined for none
66
+ */
67
+ export async function secretsProviderAt(targetPath, read, env) {
68
+ const committed = await readJson(read, path.join(targetPath, ".lisa.config.json"));
69
+ const provider = committed === undefined
70
+ ? providerFromEnvironment(env)
71
+ : committedProvider(committed);
72
+ return provider === "env" ? undefined : provider;
73
+ }
74
+ /**
75
+ * `secrets.provider` in the committed config, defaulting to `env`.
76
+ * @param committed - Parsed `.lisa.config.json`
77
+ * @returns Provider name
78
+ */
79
+ function committedProvider(committed) {
80
+ const secrets = committed.secrets;
81
+ const provider = isRecord(secrets) ? secrets.provider : undefined;
82
+ return typeof provider === "string" ? provider : "env";
83
+ }
84
+ /**
85
+ * The provider `readConfig` falls back to with no config file.
86
+ * @param env - Environment
87
+ * @returns Provider name (`env` when no tenant is named)
88
+ */
89
+ function providerFromEnvironment(env) {
90
+ const tenant = (env.LISA_TENANT ?? env.LISA_SECRETS_NAMESPACE ?? "").trim();
91
+ if (tenant === "")
92
+ return "env";
93
+ const named = (env.LISA_PROVIDER ?? env.LISA_SECRETS_PROVIDER ?? "").trim();
94
+ return named === "" ? "bitwarden" : named;
95
+ }
96
+ /**
97
+ * Resolve the configured state dir to an absolute path, expanding `~`.
98
+ * @param raw - Configured `notify.stateDir`
99
+ * @param home - Home directory
100
+ * @param projectRoot - Base for a relative path
101
+ * @returns Absolute path, or undefined when unset
102
+ */
103
+ export function resolveStateDir(raw, home, projectRoot) {
104
+ if (typeof raw !== "string" || raw.trim() === "")
105
+ return undefined;
106
+ const dir = raw.trim();
107
+ if (dir === "~")
108
+ return home;
109
+ if (dir.startsWith("~/"))
110
+ return path.resolve(home, dir.slice(2));
111
+ return path.resolve(projectRoot, dir);
112
+ }
113
+ /**
114
+ * Findings about the configured per-project state dir and its token file.
115
+ * @param ctx - Resolved inputs
116
+ * @param stateDir - Absolute state dir, or undefined when unset
117
+ * @returns Findings
118
+ */
119
+ async function stateDirFindings(ctx, stateDir) {
120
+ if (stateDir === undefined) {
121
+ return [
122
+ {
123
+ status: "fail",
124
+ text: "sessionManager.notify.stateDir is not set; run /lisa:setup:session-manager to give this project its own Telegram state dir",
125
+ },
126
+ ];
127
+ }
128
+ if (stateDir === ctx.sharedDir) {
129
+ return [
130
+ {
131
+ status: "fail",
132
+ 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>`,
133
+ },
134
+ ];
135
+ }
136
+ return tokenFileFindings(ctx, path.join(stateDir, TOKEN_FILE));
137
+ }
138
+ /**
139
+ * Findings about the plaintext token file, which means different things with
140
+ * and without a secrets provider.
141
+ * @param ctx - Resolved inputs
142
+ * @param tokenFile - The token file in the state dir
143
+ * @returns Findings
144
+ */
145
+ async function tokenFileFindings(ctx, tokenFile) {
146
+ const mode = await modeOf(ctx.statFile, tokenFile);
147
+ const provider = ctx.secretsProvider;
148
+ if (provider !== undefined) {
149
+ return mode === undefined
150
+ ? []
151
+ : [
152
+ {
153
+ status: "warn",
154
+ text: `a plaintext token file ${tokenFile} is left over, but the token belongs in ${provider} as ${ctx.secretName}; run session-manager.mjs store-token to move it there (it verifies the copy, then deletes the file), because start refuses to run while that file holds a TELEGRAM_BOT_TOKEN line`,
155
+ },
156
+ ];
157
+ }
158
+ if (mode === undefined) {
159
+ return [
160
+ {
161
+ status: "warn",
162
+ text: `token file ${tokenFile} is missing, so the manager cannot start; store the bot token with /lisa:setup:session-manager`,
163
+ },
164
+ ];
165
+ }
166
+ const plaintext = {
167
+ status: "warn",
168
+ text: `token file ${tokenFile} holds the bot token in plaintext because no secrets provider is configured; configure secrets.provider (see lisa-secrets-access), then run session-manager.mjs store-token to move it into the provider`,
169
+ };
170
+ if (mode % GROUP_OTHER_SPAN === 0)
171
+ return [plaintext];
172
+ const octal = (mode % PERMISSION_SPAN).toString(8).padStart(3, "0");
173
+ return [
174
+ plaintext,
175
+ {
176
+ status: "warn",
177
+ text: `token file ${tokenFile} has mode 0${octal}, open to other users; run chmod 600 ${tokenFile}`,
178
+ },
179
+ ];
180
+ }
181
+ /**
182
+ * Findings about the user-scope plugin and the shared default token file.
183
+ * @param ctx - Resolved inputs
184
+ * @returns Findings
185
+ */
186
+ async function userScopeFindings(ctx) {
187
+ const settings = await readJson(ctx.read, path.join(ctx.claudeDir, "settings.json"));
188
+ const plugins = settings?.enabledPlugins;
189
+ const sharedToken = path.join(ctx.sharedDir, TOKEN_FILE);
190
+ return [
191
+ ...(isRecord(plugins) && plugins[PLUGIN_ID] === true
192
+ ? [
193
+ {
194
+ status: "warn",
195
+ 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)`,
196
+ },
197
+ ]
198
+ : []),
199
+ ...((await modeOf(ctx.statFile, sharedToken)) === undefined
200
+ ? []
201
+ : [
202
+ {
203
+ status: "warn",
204
+ text: `a token file exists in the shared default dir (${sharedToken}); move it to the per-project state dir and delete it`,
205
+ },
206
+ ]),
207
+ ];
208
+ }
209
+ /**
210
+ * Findings for Telegram variables exported in doctor's own shell.
211
+ * @param env - Doctor's environment
212
+ * @param includeStateDir - Also flag `TELEGRAM_STATE_DIR` (Telegram only)
213
+ * @returns Findings, naming each variable but never its value
214
+ */
215
+ function exportedFindings(env, includeStateDir = true) {
216
+ return Object.keys(env)
217
+ .filter(name => (includeStateDir && name === STATE_DIR_VAR) ||
218
+ name.startsWith(TOKEN_VAR))
219
+ .filter(name => (env[name] ?? "") !== "")
220
+ .sort((a, b) => a.localeCompare(b))
221
+ .map(name => ({
222
+ status: "warn",
223
+ text: `${name} is set in this shell's environment, so workers may inherit it; remove the export from your shell profile`,
224
+ }));
225
+ }
226
+ /**
227
+ * The plaintext-token findings that hold with no notification channel too
228
+ * (the spec's "doctor flags any plaintext token file it finds"): an exported
229
+ * `TELEGRAM_BOT_TOKEN*` variable, by name only, and a token file in the
230
+ * shared Telegram state dir, by existence only (never read). The Telegram
231
+ * requirements themselves (state dir, plugin scope, `TELEGRAM_STATE_DIR`)
232
+ * are skipped, since no bot is configured.
233
+ * @param ctx - The shared dir, environment and mode reader
234
+ * @returns Findings
235
+ */
236
+ export async function plaintextTokenFindings(ctx) {
237
+ const sharedToken = path.join(ctx.sharedDir, TOKEN_FILE);
238
+ return [
239
+ ...exportedFindings(ctx.env, false),
240
+ ...((await modeOf(ctx.statFile, sharedToken)) === undefined
241
+ ? []
242
+ : [
243
+ {
244
+ status: "warn",
245
+ text: `a plaintext Telegram token file exists in the shared dir (${sharedToken}); no notification channel is configured, so nothing needs it: delete it`,
246
+ },
247
+ ]),
248
+ ];
249
+ }
250
+ /**
251
+ * Every Telegram finding: the state dir and its token file, the user-scope
252
+ * plugin and shared default dir, and exported Telegram variables.
253
+ * @param ctx - Resolved inputs
254
+ * @param stateDir - Absolute state dir, or undefined when unset
255
+ * @returns Findings
256
+ */
257
+ export async function telegramFindings(ctx, stateDir) {
258
+ return [
259
+ ...(await stateDirFindings(ctx, stateDir)),
260
+ ...(await userScopeFindings(ctx)),
261
+ ...exportedFindings(ctx.env),
262
+ ];
263
+ }
264
+ //# sourceMappingURL=doctor-session-manager-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-session-manager-token.js","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-token.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAEL,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,MAAM,mCAAmC,CAAC;AAE3C,MAAM,SAAS,GAAG,kCAAkC,CAAC;AACrD,MAAM,UAAU,GAAG,MAAM,CAAC;AAC1B,8EAA8E;AAC9E,MAAM,SAAS,GAAG,oBAAoB,CAAC;AACvC,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAC3C,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,kEAAkE;AAClE,MAAM,eAAe,GAAG,MAAM,CAAC;AAe/B;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,WAAoB;IACxD,MAAM,MAAM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;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAA4D;IAE5D,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACzD,OAAO;QACL,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC;QACnC,GAAG,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,KAAK,SAAS;YACzD,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE;oBACE,MAAM,EAAE,MAAe;oBACvB,IAAI,EAAE,6DAA6D,WAAW,0EAA0E;iBACzJ;aACF,CAAC;KACP,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,GAAoB,EACpB,QAA4B;IAE5B,OAAO;QACL,GAAG,CAAC,MAAM,gBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC1C,GAAG,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACjC,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;KAC7B,CAAC;AACJ,CAAC"}
@@ -18,6 +18,8 @@ export interface SessionManagerDoctorDependencies {
18
18
  readonly managedSettingsPaths?: readonly string[];
19
19
  /** Repo visibility probe; defaults to `gh repo view --json visibility`. */
20
20
  readonly probeRepoVisibility?: RepoVisibilityProbe;
21
+ /** Clock for the age of items waiting on a human; defaults to now. */
22
+ readonly now?: () => Date;
21
23
  }
22
24
  /** The doctor options this check honours. */
23
25
  export interface SessionManagerDoctorOptions {
@@ -25,7 +27,7 @@ export interface SessionManagerDoctorOptions {
25
27
  readonly offline?: boolean;
26
28
  }
27
29
  /**
28
- * Check Telegram isolation for a configured session manager.
30
+ * Check the notification channel of a configured session manager.
29
31
  * @param targetPath - Project root
30
32
  * @param deps - Injected environment, HOME and file access
31
33
  * @param options - Doctor options; `offline` skips the visibility probe
@@ -1 +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"}
1
+ {"version":3,"file":"doctor-session-manager.d.ts","sourceRo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