@codyswann/lisa 4.85.0 → 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 (312) 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/nightly-e2e-guard-behavior-certificate.js +2 -2
  14. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  15. package/dist/core/upstream-evidence-manifest.js +158 -20
  16. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  17. package/package.json +4 -4
  18. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  20. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/SKILL.md +5 -3
  21. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  22. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  23. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +197 -54
  24. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +23 -10
  25. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  26. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  27. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  28. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  29. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  30. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  31. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  32. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  33. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  34. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +39 -11
  35. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  36. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  37. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  38. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  39. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  40. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  41. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  42. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  43. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  44. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  45. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  46. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  47. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  48. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token.mjs +39 -120
  49. package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +82 -19
  50. package/plugins/lisa/commands/session-manager.md +1 -1
  51. package/plugins/lisa/commands/setup/session-manager.md +1 -1
  52. package/plugins/lisa/rules/reference/config-resolution.md +39 -7
  53. package/plugins/lisa/skills/lisa-secrets-access/SKILL.md +5 -3
  54. package/plugins/lisa/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  55. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  56. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +197 -54
  57. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +23 -10
  58. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  59. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  60. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  61. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  62. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  63. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  64. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  65. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  66. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  67. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +39 -11
  68. package/plugins/lisa/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  69. package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  70. package/plugins/lisa/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  71. package/plugins/lisa/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  72. package/plugins/lisa/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  73. package/plugins/lisa/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  74. package/plugins/lisa/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  75. package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  76. package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  77. package/plugins/lisa/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  78. package/plugins/lisa/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  79. package/plugins/lisa/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  80. package/plugins/lisa/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  81. package/plugins/lisa/skills/lisa-session-manager/scripts/token.mjs +39 -120
  82. package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +82 -19
  83. package/plugins/lisa-agy/commands/lisa/session-manager.md +1 -1
  84. package/plugins/lisa-agy/commands/lisa/setup/session-manager.md +1 -1
  85. package/plugins/lisa-agy/plugin.json +1 -1
  86. package/plugins/lisa-agy/skills/lisa-secrets-access/SKILL.md +5 -3
  87. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  88. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  89. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +197 -54
  90. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +23 -10
  91. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  92. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  93. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  94. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  95. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  96. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  97. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  98. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  99. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  100. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +39 -11
  101. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  102. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  103. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  104. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  105. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  106. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  107. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  108. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  109. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  110. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  111. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  112. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  113. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  114. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token.mjs +39 -120
  115. package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +82 -19
  116. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  118. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  119. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  122. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  123. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-copilot/commands/lisa/session-manager.md +1 -1
  125. package/plugins/lisa-copilot/commands/lisa/setup/session-manager.md +1 -1
  126. package/plugins/lisa-copilot/rules/reference/config-resolution.md +39 -7
  127. package/plugins/lisa-copilot/skills/lisa-secrets-access/SKILL.md +5 -3
  128. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  129. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  130. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +197 -54
  131. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +23 -10
  132. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  133. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  134. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  135. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  136. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  137. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  138. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  139. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  140. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  141. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +39 -11
  142. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  143. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  144. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  145. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  146. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  147. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  148. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  149. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  150. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  151. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  152. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  153. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  154. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  155. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token.mjs +39 -120
  156. package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +82 -19
  157. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-cursor/commands/lisa/session-manager.md +1 -1
  159. package/plugins/lisa-cursor/commands/lisa/setup/session-manager.md +1 -1
  160. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +39 -7
  161. package/plugins/lisa-cursor/skills/lisa-secrets-access/SKILL.md +5 -3
  162. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  163. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  164. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +197 -54
  165. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +23 -10
  166. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  167. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  168. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  169. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  170. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  171. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  172. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  173. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  174. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  175. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +39 -11
  176. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  177. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  178. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  179. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  180. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  181. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  182. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  183. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  184. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  185. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  186. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  187. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  188. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  189. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token.mjs +39 -120
  190. package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +82 -19
  191. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  192. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  193. package/plugins/lisa-devin/rules/reference/config-resolution.md +39 -7
  194. package/plugins/lisa-devin/skills/lisa-secrets-access/SKILL.md +5 -3
  195. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  196. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  197. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +197 -54
  198. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +23 -10
  199. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  200. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  201. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  202. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  203. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  204. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  205. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  206. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  207. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  208. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +39 -11
  209. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  210. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  211. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  212. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  213. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  214. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  215. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  216. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  217. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  218. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  219. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  220. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  221. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  222. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token.mjs +39 -120
  223. package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +82 -19
  224. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  225. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  226. package/plugins/lisa-expo-agy/plugin.json +1 -1
  227. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  228. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  229. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  230. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  231. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  232. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  233. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  234. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  235. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  236. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  237. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  238. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  239. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  240. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  241. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  242. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  243. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  244. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  245. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  246. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  247. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  248. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  249. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  250. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  251. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  252. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  253. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  254. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  255. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  257. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  258. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  259. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  260. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  261. package/plugins/lisa-rails-agy/plugin.json +1 -1
  262. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  263. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  264. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  265. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  266. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  267. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  268. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  269. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  270. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  271. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  272. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  273. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  274. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  275. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  276. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  277. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  278. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  279. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  280. package/plugins/src/base/commands/session-manager.md +1 -1
  281. package/plugins/src/base/commands/setup/session-manager.md +1 -1
  282. package/plugins/src/base/rules/reference/config-resolution.md +39 -7
  283. package/plugins/src/base/skills/lisa-secrets-access/SKILL.md +5 -3
  284. package/plugins/src/base/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
  285. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +47 -26
  286. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +197 -54
  287. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +23 -10
  288. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
  289. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
  290. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
  291. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
  292. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
  293. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
  294. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
  295. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
  296. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
  297. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +39 -11
  298. package/plugins/src/base/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
  299. package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
  300. package/plugins/src/base/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
  301. package/plugins/src/base/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
  302. package/plugins/src/base/skills/lisa-session-manager/scripts/launch.mjs +69 -60
  303. package/plugins/src/base/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
  304. package/plugins/src/base/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
  305. package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
  306. package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
  307. package/plugins/src/base/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
  308. package/plugins/src/base/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
  309. package/plugins/src/base/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
  310. package/plugins/src/base/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
  311. package/plugins/src/base/skills/lisa-session-manager/scripts/token.mjs +39 -120
  312. package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +82 -19
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.85.0",
3
+ "version": "4.86.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.85.0",
3
+ "version": "4.86.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.85.0",
3
+ "version": "4.86.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Run the local session manager: one dispatch-and-relay cycle (the /loop prompt), or start, stop or show the tmux-hosted manager. Dispatches Ready work items to fresh background worker sessions and relays their questions over the project's Telegram bot. Claude Code only; configure it with /lisa:setup:session-manager."
2
+ description: "Run the local session manager: one dispatch-and-relay cycle (the /loop prompt), or start, stop or show the tmux-hosted manager. Dispatches Ready work items to fresh background worker sessions and relays their questions over the project's Telegram bot when one is configured (Telegram is optional). Claude Code only; configure it with /lisa:setup:session-manager."
3
3
  allowed-tools: ["Skill"]
4
4
  argument-hint: "[cycle|start|stop|status]"
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Set up the local session manager for this project: write the sessionManager config block, store the project's own Telegram bot token, check the Telegram plugin scope, seed the runbook, start the manager in tmux, walk through pairing, and run doctor's session-manager check."
2
+ description: "Set up the local session manager for this project: write the sessionManager config block, optionally set up Telegram notifications (store the project's own bot token in its secrets provider, migrating any plaintext token file, check the plugin scope, walk through pairing; skipped with no channel, the default), seed the runbook, start the manager in tmux, and run doctor's session-manager check."
3
3
  allowed-tools: ["Skill"]
4
4
  ---
5
5
 
@@ -280,7 +280,7 @@ fi
280
280
  | `health.schedule` | no | `off` | Health cadence contract: `off`, `daily`, or `weekly`. `lisa sync` populates the default with `_lisaSync.populated` provenance and rejects values outside this closed vocabulary. Runtime results live only at the gitignored `.lisa/health/latest.json`, never in either config file. |
281
281
  | `usage` | no | — | Optional token/cost pricing metadata consumed by the `usage-accounting` rule. Missing pricing never blocks a lifecycle flow; Lisa records token counts with `estimated_cost: null` when no trustworthy price source is configured. |
282
282
  | `wiki` | no | — | Wiki location for the `wiki-knowledge-source` rule. Omit for a local in-repo wiki (`wiki/`). See **Wiki source** below. |
283
- | `sessionManager` | no | — (opt-in) | Local session manager: polls the Ready queue, runs each item in a fresh background Claude Code session, and relays questions over a per-project Telegram bot. Absent means the manager is not used; `lisa sync` never populates it. Written by `/lisa:setup:session-manager`. See **Session manager (`sessionManager`)** below. |
283
+ | `sessionManager` | no | — (opt-in) | Local session manager: polls the Ready queue, runs each item in a fresh background Claude Code session, and relays questions over a per-project Telegram bot when one is configured (optional). Absent means the manager is not used; `lisa sync` never populates it. Written by `/lisa:setup:session-manager`. See **Session manager (`sessionManager`)** below. |
284
284
 
285
285
  ### Host rules (`.agents/rules/`)
286
286
 
@@ -716,6 +716,11 @@ have a `.lisa.config.json` and their own `.git` (written as `"root": "."`).
716
716
  }
717
717
  ```
718
718
 
719
+ Telegram is optional. `"notify": { "provider": "none" }`, or no `notify` key at all, runs the
720
+ manager with no notification channel: no bot token, Telegram plugin or pairing, and questions wait
721
+ in the manager's ledger (`status` shows them). Setup writes `{ "provider": "none" }` unless the
722
+ operator chooses Telegram (`init-config --notify telegram`).
723
+
719
724
  | Key | Required | Default | Notes |
720
725
  |-----|----------|---------|-------|
721
726
  | `sessionManager.name` | **yes** | — | Manager session name: lowercase letters, digits, `-` or `_`, at most 64 characters. It names the tmux session and the session workers `SendMessage` to. Setup writes `<project>-manager`. |
@@ -731,20 +736,47 @@ have a `.lisa.config.json` and their own `.git` (written as `"root": "."`).
731
736
  | `sessionManager.stall.noOutputMinutes` | no | `60` | A live worker with no new output for this long counts as stalled (zero or positive). |
732
737
  | `sessionManager.stall.maxAttempts` | no | `3` | Fresh sessions per item before it moves to the configured `blocked` role (a positive integer). |
733
738
  | `sessionManager.stall.requestionHours` | no | `4` | How long an unanswered worker question waits before the manager asks again (zero or positive). |
734
- | `sessionManager.notify.provider` | no | `telegram` | Only `telegram` is implemented. |
735
- | `sessionManager.notify.stateDir` | **yes** | — | This project's own Telegram state dir. Never the shared default `~/.claude/channels/telegram`, because one bot per state dir is how projects stay isolated. Setup writes `~/.claude/channels/telegram-<project>`. |
739
+ | `sessionManager.notify.provider` | no | `none` | `none` (no notification channel) or `telegram`. Absent, like an absent `notify` block, means `none`. Any other value fails validation. |
740
+ | `sessionManager.notify.stateDir` | **yes** with `telegram`; must be absent otherwise | — | This project's own Telegram state dir. A `stateDir` without the `telegram` provider fails validation, because no bot would use it. Never the shared default `~/.claude/channels/telegram`, because one bot per state dir is how projects stay isolated. Setup writes `~/.claude/channels/telegram-<project>`. |
736
741
  | `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a login silently matches no one and excludes every item. When set, the manager takes only items authored by these people. |
737
742
  | `sessionManager.operatorIds` | no | — | Optional, non-empty list of the people the manager works for, as tracker user ids matched against the **assignee** the same way "me" is: the GitHub **login**, the Jira `accountId`, or the Linear user id, spelled exactly as the tracker API returns it (matching is case-sensitive, so look the OPERATOR up rather than typing from memory: `gh api users/<operator-login> --jq .login` returns the canonical GitHub spelling. Do not use `gh api user`, which returns whoever the credential belongs to — the agent account, when that is the case this key exists for). Dispatch order is assigned to an operator, then to "me" (the tracker credential's identity), then unassigned; items assigned to anyone else are skipped. Set it whenever the tracker credential is not the operator's own (an agent account), or the operator's Ready items are never dispatched. |
738
743
  | `sessionManager.backlogPickup` | no | `false` | Opt-in lowest dispatch tier. When the Ready queue is exhausted and capacity remains, the manager considers backlog items (open leaves in no lifecycle role) with the Ready exclusions plus any unfinished blocker; each one that passes the tracker validator (all gates, including the stateless-pickup dry-run) is assigned to the first `operatorIds` entry, moved to Ready in one write, read back and dispatched. A failed validation is cached against the item's `updatedAt`, so it is re-judged only after the item changes. Requires `operatorIds`. |
739
744
 
740
- - **Non-secret only.** The bot token lives in `<stateDir>/.env` (directory 0700, file 0600),
741
- written by setup. A credential-named field or a token-shaped value anywhere in this block is a
742
- validation error.
745
+ - **Non-secret only.** A credential-named field or a token-shaped value anywhere in this block is a
746
+ validation error. With Telegram, where the bot token lives follows the project's `secrets` block
747
+ (`lisa-secrets-access`):
748
+ - **A secrets provider is configured** (`secrets.provider` set and not `env`): the token is the
749
+ provider secret `TELEGRAM_BOT_TOKEN_<NAME>`, where `<NAME>` is `sessionManager.name`
750
+ upper-snaked (`lisa-1a2b-manager` → `TELEGRAM_BOT_TOKEN_LISA_1A2B_MANAGER`). There is no config
751
+ key for it. `store-token` writes it (migrating, then deleting, any plaintext `<stateDir>/.env`);
752
+ `start` reads it once and passes it to the manager's tmux session only. When `secrets.require`
753
+ is declared it must list that name. A plaintext `<stateDir>/.env` left beside a provider stops
754
+ `start` (exit 2) with the `store-token` command that migrates it, and doctor warns about it.
755
+ - **No provider**: the token lives in `<stateDir>/.env` (directory 0700, file 0600), written by
756
+ setup, and doctor warns that it is plaintext.
743
757
  - **Local over global, per key.** `.lisa.config.local.json` overrides `.lisa.config.json` key by key
744
758
  (for example, a smaller `capacity.maxWorkers` on one machine); arrays such as `hints` are
745
759
  replaced, not merged. Built-in defaults fill whatever neither file sets.
746
760
  - **Workflow roles are not here.** Ready, claimed and blocked come from the existing tracker
747
- workflow config, through the single role resolver, like every other lifecycle flow.
761
+ workflow config, through the single role resolver, like every other lifecycle flow. When an item
762
+ needs a human, the manager marks it with the tracker's human-needed label
763
+ (`github.labels.build.human_needed`, `jira.labels.human_needed`,
764
+ `linear.labels.build.human_needed`, else the tracker's default), or with the `blocked` role when
765
+ no label resolves, and moves an `exhausted` item to the `blocked` role; `mark-plan` resolves
766
+ both, so neither name is ever hard-coded.
767
+ - **Who may answer on the item.** A reply on a human-needed item is taken as the answer only from
768
+ `sessionManager.operatorIds` or `trustedAuthorIds`, matched on stable ids (GitHub login or
769
+ numeric id, Jira `accountId`, Linear user id; never a display name or email), and never from a
770
+ machine comment, which is excluded first, whoever wrote it: one starting with a Lisa or Claude
771
+ tag such as `[lisa-…]` or `[claude-sync]`, holding `[lisa-` or `<!-- lisa:`, saying "Written by
772
+ Claude", carrying the agent-attribution footer, or whose id the manager recorded as its own
773
+ (`ledger marked --comment-id`). Quoted (`>`) lines are ignored when testing those markers, so a
774
+ quote reply is still an answer. The answer must follow the question comment the manager
775
+ recorded last by id, or, with no recorded id, the latest comment that starts with the question
776
+ marker and is by an allowed answerer. With neither list set, nothing on the item is read
777
+ (`item-answer` reports `no-answerers-configured`): there is no fallback to the tracker
778
+ credential's identity, because the workers and the manager post as it. The operator then answers
779
+ with the `answerCommand` that `status` lists. Set `operatorIds` even in a single-user setup.
748
780
  - **Shape check.** `validateSessionManager` in
749
781
  `lisa-secrets-access/scripts/validate-config.mjs` runs as part of `validateConfig`, so
750
782
  `/lisa:doctor` reports a malformed block.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lisa-secrets-access
3
- description: "Vendor-neutral access layer for secrets. Every skill and script that needs an API key MUST resolve it through this skill rather than reading a keychain, an .env file, or a provider CLI directly. Models two independent axes — the provider a secret lives in (Bitwarden, 1Password, AWS Secrets Manager, Doppler, Vault) and the surface the code runs on (local, GitHub Actions, Codex Cloud) — resolving environment first, then a materialized file where the surface has one, then the provider by exact key name. Enforces one store per secret, fails closed on duplicate names, reads usage metadata from the provider's own note field, and never writes. Rotating credentials route through the separate rotate-secret writer, and copying one into a second store (Bitwarden → GitHub Actions) routes through the separate sync-secret-to-ci propagator."
3
+ description: "Vendor-neutral access layer for secrets. Every skill and script that needs an API key MUST resolve it through this skill rather than reading a keychain, an .env file, or a provider CLI directly. Models two independent axes — the provider a secret lives in (Bitwarden, 1Password, AWS Secrets Manager, Doppler, Vault) and the surface the code runs on (local, GitHub Actions, Codex Cloud) — resolving environment first, then a materialized file where the surface has one, then the provider by exact key name. Enforces one store per secret, fails closed on duplicate names, reads usage metadata from the provider's own note field, and never writes. Rotating credentials route through the separate rotate-secret writer, and copying one into a second store (Bitwarden → GitHub Actions) routes through the separate sync-secret-to-ci propagator; the session manager's Telegram bot token is stored through its own store-token, which uses this skill's provider write path."
4
4
  allowed-tools: ["Bash", "Read", "Skill"]
5
5
  ---
6
6
 
@@ -273,6 +273,8 @@ No create, no update, no rotate. Writing secrets or their notes requires an auth
273
273
 
274
274
  The two writers are siblings, not modes: `rotate-secret.mjs` replaces a value **at its source**, and `sync-secret-to-ci.mjs` copies one **into a second store** without touching the source. Each needs an authority the resolver must not hold, so each is its own program with its own declaration list.
275
275
 
276
+ A third, narrow writer lives outside this skill: the session manager's `store-token` (`lisa-session-manager/scripts/token-store.mjs`) stores the Telegram bot token as `TELEGRAM_BOT_TOKEN_<NAME>` through `providers.mjs` `createSecret` (a new record) or `writeSecret` (`--replace`), then reads it back through the ordinary provider view and compares hashes before deleting the plaintext file it replaces. It writes that one name only, and only when an operator runs it. `createSecret` is Bitwarden-only; on any other provider the operator creates the secret and `store-token` verifies it. Like `bws secret edit`, `bws secret create` (2.1.0) takes the value as a positional argument and its help offers no stdin or file option, so the value is in argv for the life of that one call: the same documented exception, confined the same way (no shell, `--output none`, and a failure message that never repeats the command line).
277
+
276
278
  ## Rotating credentials
277
279
 
278
280
  A **consumable** credential is one where using it can invalidate the stored copy: an OAuth refresh token the issuer replaces on every exchange, a short-lived session, a single-use enrollment token. The defining property is not "OAuth" — it is that a successful use makes the value on record wrong.
@@ -366,9 +368,9 @@ Values never enter that process, so its output cannot leak one even if logged.
366
368
 
367
369
  ## Provider dispatch
368
370
 
369
- | Provider | Read | Write (rotation only) |
371
+ | Provider | Read | Write (rotation, and the session manager's `store-token`) |
370
372
  | --- | --- | --- |
371
- | `bitwarden` | `bws secret list --output json` → index by `key` | `bws secret edit`; temporary `create`/`delete` for AWS publication coordination |
373
+ | `bitwarden` | `bws secret list --output json` → index by `key` | `bws secret edit`; `bws secret create <KEY> <VALUE> <PROJECT_ID> --output none` for `store-token` (`createSecret`); temporary `create`/`delete` for AWS publication coordination |
372
374
  | `doppler` | `doppler secrets download --no-file --format json` | not implemented |
373
375
  | `env` | environment only; the provider is the environment | n/a |
374
376
  | `1password` | `op read "op://<vault>/<name>/credential"` | not implemented |
@@ -701,6 +701,72 @@ export function rawByKey(cfg, key) {
701
701
  return matches[0] ?? null;
702
702
  }
703
703
 
704
+ /** A provider error that names a rate limit (HTTP 429). */
705
+ const RATE_LIMITED = /\b429\b|too many requests|rate.?limit/i;
706
+
707
+ /**
708
+ * Run a provider CLI whose argv carries a secret value, and never let that
709
+ * argv reach an error message.
710
+ *
711
+ * `execFileSync` puts the whole command line in its error (`Command failed:
712
+ * bws secret create KEY <value> ...`), so a failed write would print the very
713
+ * value it was writing. The rethrown error keeps only what a caller needs to
714
+ * act on: the operation, the exit status and whether the provider
715
+ * rate-limited the call. Every other error (a missing binary's
716
+ * `spawnSync bws ENOENT`, a deadline {@link run} already reworded) is
717
+ * rebuilt too, keeping only its message (with the value redacted) and its
718
+ * `code`/`errno`/`syscall`/`status`/`signal`: Node's spawn errors also carry
719
+ * `spawnargs`, the full argv, value included, which a caller that logs or
720
+ * serializes the error would publish.
721
+ * @param {string} bin Executable name.
722
+ * @param {string[]} args Arguments, one of them a secret value.
723
+ * @param {NodeJS.ProcessEnv} env Environment for the child.
724
+ * @param {string} operation What the call was doing, in operator words.
725
+ * @param {string} value The secret value in `args`, redacted from any error.
726
+ * @returns {string} Captured stdout.
727
+ */
728
+ function runWithValue(bin, args, env, operation, value) {
729
+ try {
730
+ return run(bin, args, env, operation);
731
+ } catch (error) {
732
+ // Node's "Command failed: <command line>" error carries argv in its text.
733
+ if (!String(error?.message ?? "").startsWith("Command failed")) {
734
+ throw withoutArgv(error, value);
735
+ }
736
+ const why = RATE_LIMITED.test(String(error.stderr ?? ""))
737
+ ? "the provider rate-limited the request (429 Too Many Requests)"
738
+ : "the provider refused the request or could not be reached";
739
+ throw new Error(
740
+ `${operation} failed (exit ${error.status ?? error.signal}): ${why}. ` +
741
+ `The command's own output is withheld because its arguments carry ` +
742
+ `the secret value.`
743
+ );
744
+ }
745
+ }
746
+
747
+ /** The fields of a spawn error that carry no argv, output or value. */
748
+ const SAFE_ERROR_FIELDS = ["code", "errno", "syscall", "status", "signal"];
749
+
750
+ /**
751
+ * A copy of a child-process error with no argv on it: a fresh Error whose
752
+ * message has `value` redacted, and only {@link SAFE_ERROR_FIELDS}. Drops
753
+ * `spawnargs`, `cmd`, `path`, `stdout`, `stderr` and `output`.
754
+ * @param {unknown} error What the call threw.
755
+ * @param {string} value The secret value to redact.
756
+ * @returns {Error} The rebuilt error.
757
+ */
758
+ function withoutArgv(error, value) {
759
+ const text = String(error?.message ?? error);
760
+ const message = value ? text.split(String(value)).join("<redacted>") : text;
761
+ const safe = Object.fromEntries(
762
+ SAFE_ERROR_FIELDS.filter(key => error?.[key] !== undefined).map(key => [
763
+ key,
764
+ error[key],
765
+ ])
766
+ );
767
+ return Object.assign(new Error(message), safe);
768
+ }
769
+
704
770
  /**
705
771
  * Write a replacement value back to the provider.
706
772
  *
@@ -709,7 +775,8 @@ export function rawByKey(cfg, key) {
709
775
  * Bitwarden CLI exposes no stdin path for an edit, so this is a documented
710
776
  * exception rather than an oversight: it is confined to the one operation that
711
777
  * cannot be expressed otherwise, and `execFileSync` at least keeps the value
712
- * out of a shell and therefore out of shell history.
778
+ * out of a shell and therefore out of shell history. A failure is reported
779
+ * through {@link runWithValue}, so the value never reaches the error either.
713
780
  * @param {object} cfg Resolved configuration.
714
781
  * @param {string} id Provider-side identifier for the secret.
715
782
  * @param {string} value Replacement value.
@@ -718,11 +785,12 @@ export function writeSecret(cfg, id, value) {
718
785
  const env = providerEnv(cfg);
719
786
 
720
787
  if (cfg.provider === "bitwarden") {
721
- run(
788
+ runWithValue(
722
789
  "bws",
723
790
  ["secret", "edit", id, "--value", value],
724
791
  env,
725
- "updating a secret in Bitwarden"
792
+ "updating a secret in Bitwarden",
793
+ value
726
794
  );
727
795
  return;
728
796
  }
@@ -732,6 +800,56 @@ export function writeSecret(cfg, id, value) {
732
800
  );
733
801
  }
734
802
 
803
+ /**
804
+ * Create one new secret in the provider.
805
+ *
806
+ * The one caller is the session manager's `store-token` (#4555), which moves
807
+ * the Telegram bot token out of a plaintext file and into the vault, then
808
+ * reads it back to prove the write before deleting the file. It never
809
+ * replaces an existing record: that is {@link writeSecret}'s job.
810
+ *
811
+ * The value is a positional argument, the same documented exception as
812
+ * {@link writeSecret}: `bws secret create` (2.1.0) takes `<KEY> <VALUE>
813
+ * <PROJECT_ID>` and its help lists no stdin or file option for the value, so
814
+ * there is no way to keep it out of argv. `execFileSync` keeps it out of a
815
+ * shell, `--output none` keeps the created record (value included) off
816
+ * stdout, and {@link runWithValue} keeps it out of any error.
817
+ *
818
+ * Bitwarden only. Other providers fail with a message naming where to add
819
+ * one; until then the operator creates the secret in the vault themselves.
820
+ * @param {object} cfg Resolved configuration.
821
+ * @param {{name: string, value: string, projectId: string, note?: string}}
822
+ * secret Exact key, value, target provider project and usage note.
823
+ */
824
+ export function createSecret(cfg, { name, value, projectId, note }) {
825
+ if (!ENV_KEY.test(name)) {
826
+ throw new Error(`secret name is not an environment variable name: ${name}`);
827
+ }
828
+ if (cfg.provider === "bitwarden") {
829
+ runWithValue(
830
+ "bws",
831
+ [
832
+ "secret",
833
+ "create",
834
+ name,
835
+ value,
836
+ projectId,
837
+ ...(note ? ["--note", note] : []),
838
+ "--output",
839
+ "none",
840
+ ],
841
+ providerEnv(cfg),
842
+ "creating a secret in Bitwarden",
843
+ value
844
+ );
845
+ return;
846
+ }
847
+ throw new Error(
848
+ `provider "${cfg.provider}" has no create implemented.\n` +
849
+ `Create the secret in the provider yourself, or add one in providers.mjs.`
850
+ );
851
+ }
852
+
735
853
  /**
736
854
  * Create one provider-issued publication contender in the target project.
737
855
  *
@@ -664,12 +664,19 @@ const STALL_RULES = {
664
664
  requestionHours: [n => n >= 0, "zero or a positive number"],
665
665
  };
666
666
 
667
+ /** Notification providers `sessionManager.notify.provider` accepts. */
668
+ const NOTIFY_PROVIDERS = ["none", "telegram"];
669
+
667
670
  /**
668
671
  * Validate `sessionManager.notify`.
669
672
  *
670
- * `stateDir` is required rather than defaulted here: the default dir is shared
671
- * by every project, and a shared dir is exactly how one project's bot gets
672
- * taken over by another's session.
673
+ * A notification channel is optional (#4555): an absent block, an absent
674
+ * provider and `"none"` all mean the manager runs with no channel, and then
675
+ * there is no state dir to name. A `stateDir` without the telegram provider is
676
+ * refused rather than ignored, because it means the operator believes a bot is
677
+ * attached when none will be. For telegram, `stateDir` is required rather than
678
+ * defaulted here: the default dir is shared by every project, and a shared dir
679
+ * is exactly how one project's bot gets taken over by another's session.
673
680
  * @param {unknown} notify The declared value.
674
681
  * @returns {string[]} Problems found.
675
682
  */
@@ -677,31 +684,42 @@ function validateNotify(notify) {
677
684
  if (notify !== undefined && !isPlainObject(notify)) {
678
685
  return ["sessionManager.notify must be an object"];
679
686
  }
680
- const provider = notify?.provider;
681
- const stateDir = notify?.stateDir;
682
- return [
683
- ...(provider === undefined || provider === "telegram"
684
- ? []
685
- : [
686
- `sessionManager.notify.provider ${JSON.stringify(provider)} is not ` +
687
- `supported. Only "telegram" is implemented.`,
688
- ]),
689
- ...(typeof stateDir === "string" && stateDir.trim() !== ""
690
- ? []
691
- : [
692
- `sessionManager.notify.stateDir is missing. Each project needs its ` +
693
- `own Telegram state dir, such as ` +
694
- `"~/.claude/channels/telegram-<project>".`,
695
- ]),
696
- ];
687
+ const provider = notify?.provider ?? "none";
688
+ if (!NOTIFY_PROVIDERS.includes(provider)) {
689
+ return [
690
+ `sessionManager.notify.provider ${JSON.stringify(provider)} is not ` +
691
+ `supported. Use "none" (no notification channel) or "telegram".`,
692
+ ];
693
+ }
694
+ const hasStateDir = notify?.stateDir !== undefined;
695
+ const stateDirOk =
696
+ typeof notify?.stateDir === "string" && notify.stateDir.trim() !== "";
697
+ if (provider === "none") {
698
+ return hasStateDir
699
+ ? [
700
+ `sessionManager.notify.stateDir is set, but notify.provider is not ` +
701
+ `"telegram", so no bot would use it. Set notify.provider to ` +
702
+ `"telegram", or remove notify.stateDir.`,
703
+ ]
704
+ : [];
705
+ }
706
+ return stateDirOk
707
+ ? []
708
+ : [
709
+ `sessionManager.notify.stateDir is missing. Each project needs its ` +
710
+ `own Telegram state dir, such as ` +
711
+ `"~/.claude/channels/telegram-<project>".`,
712
+ ];
697
713
  }
698
714
 
699
715
  /**
700
716
  * Walk the block for anything that looks like a credential.
701
717
  *
702
718
  * Config is committed, and this block configures a bot that grants shell
703
- * access over chat. The token belongs in the state dir's dotenv file (mode
704
- * 0600), so a token here is both leaked and unused. The value is never echoed.
719
+ * access over chat. The token belongs in the project's secrets provider
720
+ * (#4555; the state dir's 0600 dotenv file only when no provider is
721
+ * configured), so a token here is both leaked and unused. The value is never
722
+ * echoed.
705
723
  * @param {unknown} value Subtree.
706
724
  * @param {string} path Dotted path so far.
707
725
  * @returns {string[]} Problems found.
@@ -710,8 +728,10 @@ function findCredentials(value, path) {
710
728
  if (typeof value === "string") {
711
729
  return TOKEN_VALUE.test(value.trim())
712
730
  ? [
713
- `${path} looks like a bot token. Tokens never go in config; ` +
714
- `/lisa:setup:session-manager stores it in the state dir.`,
731
+ `${path} looks like a bot token. Tokens never go in config: ` +
732
+ `remove it, and store the token in the project's secrets ` +
733
+ `provider with session-manager.mjs store-token ` +
734
+ `(/lisa:setup:session-manager runs it).`,
715
735
  ]
716
736
  : [];
717
737
  }
@@ -723,8 +743,9 @@ function findCredentials(value, path) {
723
743
  CREDENTIAL_KEY.test(key)
724
744
  ? [
725
745
  `${path}.${key} names a credential. Tokens and secrets never go in ` +
726
- `config; /lisa:setup:session-manager stores the bot token in the ` +
727
- `state dir.`,
746
+ `config: remove it, and keep the bot token in the project's ` +
747
+ `secrets provider (session-manager.mjs store-token, run by ` +
748
+ `/lisa:setup:session-manager).`,
728
749
  ]
729
750
  : findCredentials(child, `${path}.${key}`)
730
751
  );