openryoko 0.9.4-ryoko.2

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 (514) hide show
  1. package/dist/bin/jimmy.d.ts +3 -0
  2. package/dist/bin/jimmy.d.ts.map +1 -0
  3. package/dist/bin/jimmy.js +149 -0
  4. package/dist/bin/jimmy.js.map +1 -0
  5. package/dist/package.json +54 -0
  6. package/dist/src/cli/__tests__/migrate.test.d.ts +2 -0
  7. package/dist/src/cli/__tests__/migrate.test.d.ts.map +1 -0
  8. package/dist/src/cli/__tests__/migrate.test.js +79 -0
  9. package/dist/src/cli/__tests__/migrate.test.js.map +1 -0
  10. package/dist/src/cli/chrome-allow.d.ts +5 -0
  11. package/dist/src/cli/chrome-allow.d.ts.map +1 -0
  12. package/dist/src/cli/chrome-allow.js +250 -0
  13. package/dist/src/cli/chrome-allow.js.map +1 -0
  14. package/dist/src/cli/create.d.ts +2 -0
  15. package/dist/src/cli/create.d.ts.map +1 -0
  16. package/dist/src/cli/create.js +72 -0
  17. package/dist/src/cli/create.js.map +1 -0
  18. package/dist/src/cli/instances.d.ts +14 -0
  19. package/dist/src/cli/instances.d.ts.map +1 -0
  20. package/dist/src/cli/instances.js +43 -0
  21. package/dist/src/cli/instances.js.map +1 -0
  22. package/dist/src/cli/list.d.ts +2 -0
  23. package/dist/src/cli/list.d.ts.map +1 -0
  24. package/dist/src/cli/list.js +38 -0
  25. package/dist/src/cli/list.js.map +1 -0
  26. package/dist/src/cli/migrate.d.ts +5 -0
  27. package/dist/src/cli/migrate.d.ts.map +1 -0
  28. package/dist/src/cli/migrate.js +222 -0
  29. package/dist/src/cli/migrate.js.map +1 -0
  30. package/dist/src/cli/nuke.d.ts +2 -0
  31. package/dist/src/cli/nuke.d.ts.map +1 -0
  32. package/dist/src/cli/nuke.js +91 -0
  33. package/dist/src/cli/nuke.js.map +1 -0
  34. package/dist/src/cli/remove.d.ts +4 -0
  35. package/dist/src/cli/remove.d.ts.map +1 -0
  36. package/dist/src/cli/remove.js +47 -0
  37. package/dist/src/cli/remove.js.map +1 -0
  38. package/dist/src/cli/setup.d.ts +4 -0
  39. package/dist/src/cli/setup.d.ts.map +1 -0
  40. package/dist/src/cli/setup.js +491 -0
  41. package/dist/src/cli/setup.js.map +1 -0
  42. package/dist/src/cli/skills.d.ts +28 -0
  43. package/dist/src/cli/skills.d.ts.map +1 -0
  44. package/dist/src/cli/skills.js +284 -0
  45. package/dist/src/cli/skills.js.map +1 -0
  46. package/dist/src/cli/start.d.ts +5 -0
  47. package/dist/src/cli/start.d.ts.map +1 -0
  48. package/dist/src/cli/start.js +34 -0
  49. package/dist/src/cli/start.js.map +1 -0
  50. package/dist/src/cli/status.d.ts +2 -0
  51. package/dist/src/cli/status.d.ts.map +1 -0
  52. package/dist/src/cli/status.js +69 -0
  53. package/dist/src/cli/status.js.map +1 -0
  54. package/dist/src/cli/stop.d.ts +2 -0
  55. package/dist/src/cli/stop.d.ts.map +1 -0
  56. package/dist/src/cli/stop.js +11 -0
  57. package/dist/src/cli/stop.js.map +1 -0
  58. package/dist/src/connectors/cron/index.d.ts +21 -0
  59. package/dist/src/connectors/cron/index.d.ts.map +1 -0
  60. package/dist/src/connectors/cron/index.js +75 -0
  61. package/dist/src/connectors/cron/index.js.map +1 -0
  62. package/dist/src/connectors/discord/format.d.ts +3 -0
  63. package/dist/src/connectors/discord/format.d.ts.map +1 -0
  64. package/dist/src/connectors/discord/format.js +33 -0
  65. package/dist/src/connectors/discord/format.js.map +1 -0
  66. package/dist/src/connectors/discord/index.d.ts +47 -0
  67. package/dist/src/connectors/discord/index.d.ts.map +1 -0
  68. package/dist/src/connectors/discord/index.js +308 -0
  69. package/dist/src/connectors/discord/index.js.map +1 -0
  70. package/dist/src/connectors/discord/remote.d.ts +33 -0
  71. package/dist/src/connectors/discord/remote.d.ts.map +1 -0
  72. package/dist/src/connectors/discord/remote.js +89 -0
  73. package/dist/src/connectors/discord/remote.js.map +1 -0
  74. package/dist/src/connectors/discord/threads.d.ts +5 -0
  75. package/dist/src/connectors/discord/threads.d.ts.map +1 -0
  76. package/dist/src/connectors/discord/threads.js +22 -0
  77. package/dist/src/connectors/discord/threads.js.map +1 -0
  78. package/dist/src/connectors/slack/__tests__/active-threads.test.d.ts +2 -0
  79. package/dist/src/connectors/slack/__tests__/active-threads.test.d.ts.map +1 -0
  80. package/dist/src/connectors/slack/__tests__/active-threads.test.js +57 -0
  81. package/dist/src/connectors/slack/__tests__/active-threads.test.js.map +1 -0
  82. package/dist/src/connectors/slack/__tests__/format.test.d.ts +2 -0
  83. package/dist/src/connectors/slack/__tests__/format.test.d.ts.map +1 -0
  84. package/dist/src/connectors/slack/__tests__/format.test.js +115 -0
  85. package/dist/src/connectors/slack/__tests__/format.test.js.map +1 -0
  86. package/dist/src/connectors/slack/__tests__/speaker.test.d.ts +2 -0
  87. package/dist/src/connectors/slack/__tests__/speaker.test.d.ts.map +1 -0
  88. package/dist/src/connectors/slack/__tests__/speaker.test.js +59 -0
  89. package/dist/src/connectors/slack/__tests__/speaker.test.js.map +1 -0
  90. package/dist/src/connectors/slack/__tests__/triage-prompt.test.d.ts +2 -0
  91. package/dist/src/connectors/slack/__tests__/triage-prompt.test.d.ts.map +1 -0
  92. package/dist/src/connectors/slack/__tests__/triage-prompt.test.js +102 -0
  93. package/dist/src/connectors/slack/__tests__/triage-prompt.test.js.map +1 -0
  94. package/dist/src/connectors/slack/__tests__/triage.test.d.ts +2 -0
  95. package/dist/src/connectors/slack/__tests__/triage.test.d.ts.map +1 -0
  96. package/dist/src/connectors/slack/__tests__/triage.test.js +88 -0
  97. package/dist/src/connectors/slack/__tests__/triage.test.js.map +1 -0
  98. package/dist/src/connectors/slack/active-threads.d.ts +39 -0
  99. package/dist/src/connectors/slack/active-threads.d.ts.map +1 -0
  100. package/dist/src/connectors/slack/active-threads.js +71 -0
  101. package/dist/src/connectors/slack/active-threads.js.map +1 -0
  102. package/dist/src/connectors/slack/format.d.ts +17 -0
  103. package/dist/src/connectors/slack/format.d.ts.map +1 -0
  104. package/dist/src/connectors/slack/format.js +85 -0
  105. package/dist/src/connectors/slack/format.js.map +1 -0
  106. package/dist/src/connectors/slack/index.d.ts +51 -0
  107. package/dist/src/connectors/slack/index.d.ts.map +1 -0
  108. package/dist/src/connectors/slack/index.js +562 -0
  109. package/dist/src/connectors/slack/index.js.map +1 -0
  110. package/dist/src/connectors/slack/speaker.d.ts +39 -0
  111. package/dist/src/connectors/slack/speaker.d.ts.map +1 -0
  112. package/dist/src/connectors/slack/speaker.js +30 -0
  113. package/dist/src/connectors/slack/speaker.js.map +1 -0
  114. package/dist/src/connectors/slack/threads.d.ts +12 -0
  115. package/dist/src/connectors/slack/threads.d.ts.map +1 -0
  116. package/dist/src/connectors/slack/threads.js +41 -0
  117. package/dist/src/connectors/slack/threads.js.map +1 -0
  118. package/dist/src/connectors/slack/threads.test.d.ts +2 -0
  119. package/dist/src/connectors/slack/threads.test.d.ts.map +1 -0
  120. package/dist/src/connectors/slack/threads.test.js +79 -0
  121. package/dist/src/connectors/slack/threads.test.js.map +1 -0
  122. package/dist/src/connectors/slack/triage-prompt.d.ts +50 -0
  123. package/dist/src/connectors/slack/triage-prompt.d.ts.map +1 -0
  124. package/dist/src/connectors/slack/triage-prompt.js +127 -0
  125. package/dist/src/connectors/slack/triage-prompt.js.map +1 -0
  126. package/dist/src/connectors/slack/triage.d.ts +41 -0
  127. package/dist/src/connectors/slack/triage.d.ts.map +1 -0
  128. package/dist/src/connectors/slack/triage.js +120 -0
  129. package/dist/src/connectors/slack/triage.js.map +1 -0
  130. package/dist/src/connectors/telegram/__tests__/connector.test.d.ts +2 -0
  131. package/dist/src/connectors/telegram/__tests__/connector.test.d.ts.map +1 -0
  132. package/dist/src/connectors/telegram/__tests__/connector.test.js +257 -0
  133. package/dist/src/connectors/telegram/__tests__/connector.test.js.map +1 -0
  134. package/dist/src/connectors/telegram/__tests__/format.test.d.ts +2 -0
  135. package/dist/src/connectors/telegram/__tests__/format.test.d.ts.map +1 -0
  136. package/dist/src/connectors/telegram/__tests__/format.test.js +79 -0
  137. package/dist/src/connectors/telegram/__tests__/format.test.js.map +1 -0
  138. package/dist/src/connectors/telegram/__tests__/threads.test.d.ts +2 -0
  139. package/dist/src/connectors/telegram/__tests__/threads.test.d.ts.map +1 -0
  140. package/dist/src/connectors/telegram/__tests__/threads.test.js +51 -0
  141. package/dist/src/connectors/telegram/__tests__/threads.test.js.map +1 -0
  142. package/dist/src/connectors/telegram/format.d.ts +12 -0
  143. package/dist/src/connectors/telegram/format.d.ts.map +1 -0
  144. package/dist/src/connectors/telegram/format.js +61 -0
  145. package/dist/src/connectors/telegram/format.js.map +1 -0
  146. package/dist/src/connectors/telegram/index.d.ts +28 -0
  147. package/dist/src/connectors/telegram/index.d.ts.map +1 -0
  148. package/dist/src/connectors/telegram/index.js +213 -0
  149. package/dist/src/connectors/telegram/index.js.map +1 -0
  150. package/dist/src/connectors/telegram/threads.d.ts +29 -0
  151. package/dist/src/connectors/telegram/threads.d.ts.map +1 -0
  152. package/dist/src/connectors/telegram/threads.js +26 -0
  153. package/dist/src/connectors/telegram/threads.js.map +1 -0
  154. package/dist/src/connectors/whatsapp/__tests__/format.test.d.ts +2 -0
  155. package/dist/src/connectors/whatsapp/__tests__/format.test.d.ts.map +1 -0
  156. package/dist/src/connectors/whatsapp/__tests__/format.test.js +70 -0
  157. package/dist/src/connectors/whatsapp/__tests__/format.test.js.map +1 -0
  158. package/dist/src/connectors/whatsapp/format.d.ts +12 -0
  159. package/dist/src/connectors/whatsapp/format.d.ts.map +1 -0
  160. package/dist/src/connectors/whatsapp/format.js +53 -0
  161. package/dist/src/connectors/whatsapp/format.js.map +1 -0
  162. package/dist/src/connectors/whatsapp/index.d.ts +42 -0
  163. package/dist/src/connectors/whatsapp/index.d.ts.map +1 -0
  164. package/dist/src/connectors/whatsapp/index.js +279 -0
  165. package/dist/src/connectors/whatsapp/index.js.map +1 -0
  166. package/dist/src/cron/jobs.d.ts +5 -0
  167. package/dist/src/cron/jobs.d.ts.map +1 -0
  168. package/dist/src/cron/jobs.js +23 -0
  169. package/dist/src/cron/jobs.js.map +1 -0
  170. package/dist/src/cron/runner.d.ts +4 -0
  171. package/dist/src/cron/runner.d.ts.map +1 -0
  172. package/dist/src/cron/runner.js +88 -0
  173. package/dist/src/cron/runner.js.map +1 -0
  174. package/dist/src/cron/scheduler.d.ts +8 -0
  175. package/dist/src/cron/scheduler.d.ts.map +1 -0
  176. package/dist/src/cron/scheduler.js +64 -0
  177. package/dist/src/cron/scheduler.js.map +1 -0
  178. package/dist/src/engines/__tests__/gemini.test.d.ts +2 -0
  179. package/dist/src/engines/__tests__/gemini.test.d.ts.map +1 -0
  180. package/dist/src/engines/__tests__/gemini.test.js +404 -0
  181. package/dist/src/engines/__tests__/gemini.test.js.map +1 -0
  182. package/dist/src/engines/claude.d.ts +20 -0
  183. package/dist/src/engines/claude.d.ts.map +1 -0
  184. package/dist/src/engines/claude.js +520 -0
  185. package/dist/src/engines/claude.js.map +1 -0
  186. package/dist/src/engines/codex.d.ts +15 -0
  187. package/dist/src/engines/codex.d.ts.map +1 -0
  188. package/dist/src/engines/codex.js +351 -0
  189. package/dist/src/engines/codex.js.map +1 -0
  190. package/dist/src/engines/gemini.d.ts +32 -0
  191. package/dist/src/engines/gemini.d.ts.map +1 -0
  192. package/dist/src/engines/gemini.js +328 -0
  193. package/dist/src/engines/gemini.js.map +1 -0
  194. package/dist/src/engines/mock.d.ts +16 -0
  195. package/dist/src/engines/mock.d.ts.map +1 -0
  196. package/dist/src/engines/mock.js +47 -0
  197. package/dist/src/engines/mock.js.map +1 -0
  198. package/dist/src/gateway/__tests__/api-last-n.test.d.ts +2 -0
  199. package/dist/src/gateway/__tests__/api-last-n.test.d.ts.map +1 -0
  200. package/dist/src/gateway/__tests__/api-last-n.test.js +32 -0
  201. package/dist/src/gateway/__tests__/api-last-n.test.js.map +1 -0
  202. package/dist/src/gateway/__tests__/costs.test.d.ts +2 -0
  203. package/dist/src/gateway/__tests__/costs.test.d.ts.map +1 -0
  204. package/dist/src/gateway/__tests__/costs.test.js +32 -0
  205. package/dist/src/gateway/__tests__/costs.test.js.map +1 -0
  206. package/dist/src/gateway/__tests__/org-hierarchy.test.d.ts +2 -0
  207. package/dist/src/gateway/__tests__/org-hierarchy.test.d.ts.map +1 -0
  208. package/dist/src/gateway/__tests__/org-hierarchy.test.js +161 -0
  209. package/dist/src/gateway/__tests__/org-hierarchy.test.js.map +1 -0
  210. package/dist/src/gateway/__tests__/org-update.test.d.ts +2 -0
  211. package/dist/src/gateway/__tests__/org-update.test.d.ts.map +1 -0
  212. package/dist/src/gateway/__tests__/org-update.test.js +99 -0
  213. package/dist/src/gateway/__tests__/org-update.test.js.map +1 -0
  214. package/dist/src/gateway/__tests__/org.test.d.ts +2 -0
  215. package/dist/src/gateway/__tests__/org.test.d.ts.map +1 -0
  216. package/dist/src/gateway/__tests__/org.test.js +77 -0
  217. package/dist/src/gateway/__tests__/org.test.js.map +1 -0
  218. package/dist/src/gateway/__tests__/services.test.d.ts +2 -0
  219. package/dist/src/gateway/__tests__/services.test.d.ts.map +1 -0
  220. package/dist/src/gateway/__tests__/services.test.js +153 -0
  221. package/dist/src/gateway/__tests__/services.test.js.map +1 -0
  222. package/dist/src/gateway/api.d.ts +19 -0
  223. package/dist/src/gateway/api.d.ts.map +1 -0
  224. package/dist/src/gateway/api.js +2261 -0
  225. package/dist/src/gateway/api.js.map +1 -0
  226. package/dist/src/gateway/budgets.d.ts +16 -0
  227. package/dist/src/gateway/budgets.d.ts.map +1 -0
  228. package/dist/src/gateway/budgets.js +39 -0
  229. package/dist/src/gateway/budgets.js.map +1 -0
  230. package/dist/src/gateway/costs.d.ts +19 -0
  231. package/dist/src/gateway/costs.d.ts.map +1 -0
  232. package/dist/src/gateway/costs.js +39 -0
  233. package/dist/src/gateway/costs.js.map +1 -0
  234. package/dist/src/gateway/daemon-entry.d.ts +2 -0
  235. package/dist/src/gateway/daemon-entry.d.ts.map +1 -0
  236. package/dist/src/gateway/daemon-entry.js +12 -0
  237. package/dist/src/gateway/daemon-entry.js.map +1 -0
  238. package/dist/src/gateway/files.d.ts +6 -0
  239. package/dist/src/gateway/files.d.ts.map +1 -0
  240. package/dist/src/gateway/files.js +442 -0
  241. package/dist/src/gateway/files.js.map +1 -0
  242. package/dist/src/gateway/goals.d.ts +11 -0
  243. package/dist/src/gateway/goals.d.ts.map +1 -0
  244. package/dist/src/gateway/goals.js +72 -0
  245. package/dist/src/gateway/goals.js.map +1 -0
  246. package/dist/src/gateway/lifecycle.d.ts +10 -0
  247. package/dist/src/gateway/lifecycle.d.ts.map +1 -0
  248. package/dist/src/gateway/lifecycle.js +152 -0
  249. package/dist/src/gateway/lifecycle.js.map +1 -0
  250. package/dist/src/gateway/org-hierarchy.d.ts +5 -0
  251. package/dist/src/gateway/org-hierarchy.d.ts.map +1 -0
  252. package/dist/src/gateway/org-hierarchy.js +174 -0
  253. package/dist/src/gateway/org-hierarchy.js.map +1 -0
  254. package/dist/src/gateway/org.d.ts +17 -0
  255. package/dist/src/gateway/org.d.ts.map +1 -0
  256. package/dist/src/gateway/org.js +136 -0
  257. package/dist/src/gateway/org.js.map +1 -0
  258. package/dist/src/gateway/server.d.ts +4 -0
  259. package/dist/src/gateway/server.d.ts.map +1 -0
  260. package/dist/src/gateway/server.js +764 -0
  261. package/dist/src/gateway/server.js.map +1 -0
  262. package/dist/src/gateway/services.d.ts +28 -0
  263. package/dist/src/gateway/services.d.ts.map +1 -0
  264. package/dist/src/gateway/services.js +112 -0
  265. package/dist/src/gateway/services.js.map +1 -0
  266. package/dist/src/gateway/watcher.d.ts +14 -0
  267. package/dist/src/gateway/watcher.d.ts.map +1 -0
  268. package/dist/src/gateway/watcher.js +111 -0
  269. package/dist/src/gateway/watcher.js.map +1 -0
  270. package/dist/src/index.d.ts +5 -0
  271. package/dist/src/index.d.ts.map +1 -0
  272. package/dist/src/index.js +4 -0
  273. package/dist/src/index.js.map +1 -0
  274. package/dist/src/mcp/gateway-server.d.ts +13 -0
  275. package/dist/src/mcp/gateway-server.d.ts.map +1 -0
  276. package/dist/src/mcp/gateway-server.js +376 -0
  277. package/dist/src/mcp/gateway-server.js.map +1 -0
  278. package/dist/src/mcp/resolver.d.ts +19 -0
  279. package/dist/src/mcp/resolver.d.ts.map +1 -0
  280. package/dist/src/mcp/resolver.js +159 -0
  281. package/dist/src/mcp/resolver.js.map +1 -0
  282. package/dist/src/sessions/__tests__/callbacks.test.d.ts +2 -0
  283. package/dist/src/sessions/__tests__/callbacks.test.d.ts.map +1 -0
  284. package/dist/src/sessions/__tests__/callbacks.test.js +154 -0
  285. package/dist/src/sessions/__tests__/callbacks.test.js.map +1 -0
  286. package/dist/src/sessions/callbacks.d.ts +31 -0
  287. package/dist/src/sessions/callbacks.d.ts.map +1 -0
  288. package/dist/src/sessions/callbacks.js +112 -0
  289. package/dist/src/sessions/callbacks.js.map +1 -0
  290. package/dist/src/sessions/context.d.ts +36 -0
  291. package/dist/src/sessions/context.d.ts.map +1 -0
  292. package/dist/src/sessions/context.js +741 -0
  293. package/dist/src/sessions/context.js.map +1 -0
  294. package/dist/src/sessions/fork.d.ts +30 -0
  295. package/dist/src/sessions/fork.d.ts.map +1 -0
  296. package/dist/src/sessions/fork.js +178 -0
  297. package/dist/src/sessions/fork.js.map +1 -0
  298. package/dist/src/sessions/manager.d.ts +27 -0
  299. package/dist/src/sessions/manager.d.ts.map +1 -0
  300. package/dist/src/sessions/manager.js +751 -0
  301. package/dist/src/sessions/manager.js.map +1 -0
  302. package/dist/src/sessions/queue.d.ts +36 -0
  303. package/dist/src/sessions/queue.d.ts.map +1 -0
  304. package/dist/src/sessions/queue.js +101 -0
  305. package/dist/src/sessions/queue.js.map +1 -0
  306. package/dist/src/sessions/queue.test.d.ts +2 -0
  307. package/dist/src/sessions/queue.test.d.ts.map +1 -0
  308. package/dist/src/sessions/queue.test.js +28 -0
  309. package/dist/src/sessions/queue.test.js.map +1 -0
  310. package/dist/src/sessions/registry.d.ts +116 -0
  311. package/dist/src/sessions/registry.d.ts.map +1 -0
  312. package/dist/src/sessions/registry.js +480 -0
  313. package/dist/src/sessions/registry.js.map +1 -0
  314. package/dist/src/sessions/registry.test.d.ts +2 -0
  315. package/dist/src/sessions/registry.test.d.ts.map +1 -0
  316. package/dist/src/sessions/registry.test.js +41 -0
  317. package/dist/src/sessions/registry.test.js.map +1 -0
  318. package/dist/src/shared/__tests__/rateLimit.test.d.ts +2 -0
  319. package/dist/src/shared/__tests__/rateLimit.test.d.ts.map +1 -0
  320. package/dist/src/shared/__tests__/rateLimit.test.js +108 -0
  321. package/dist/src/shared/__tests__/rateLimit.test.js.map +1 -0
  322. package/dist/src/shared/__tests__/usageAwareness.test.d.ts +2 -0
  323. package/dist/src/shared/__tests__/usageAwareness.test.d.ts.map +1 -0
  324. package/dist/src/shared/__tests__/usageAwareness.test.js +58 -0
  325. package/dist/src/shared/__tests__/usageAwareness.test.js.map +1 -0
  326. package/dist/src/shared/config.d.ts +3 -0
  327. package/dist/src/shared/config.d.ts.map +1 -0
  328. package/dist/src/shared/config.js +11 -0
  329. package/dist/src/shared/config.js.map +1 -0
  330. package/dist/src/shared/effort.d.ts +17 -0
  331. package/dist/src/shared/effort.d.ts.map +1 -0
  332. package/dist/src/shared/effort.js +44 -0
  333. package/dist/src/shared/effort.js.map +1 -0
  334. package/dist/src/shared/logger.d.ts +12 -0
  335. package/dist/src/shared/logger.d.ts.map +1 -0
  336. package/dist/src/shared/logger.js +35 -0
  337. package/dist/src/shared/logger.js.map +1 -0
  338. package/dist/src/shared/paths.d.ts +31 -0
  339. package/dist/src/shared/paths.d.ts.map +1 -0
  340. package/dist/src/shared/paths.js +92 -0
  341. package/dist/src/shared/paths.js.map +1 -0
  342. package/dist/src/shared/rateLimit.d.ts +20 -0
  343. package/dist/src/shared/rateLimit.d.ts.map +1 -0
  344. package/dist/src/shared/rateLimit.js +61 -0
  345. package/dist/src/shared/rateLimit.js.map +1 -0
  346. package/dist/src/shared/types.d.ts +448 -0
  347. package/dist/src/shared/types.d.ts.map +1 -0
  348. package/dist/src/shared/types.js +4 -0
  349. package/dist/src/shared/types.js.map +1 -0
  350. package/dist/src/shared/usageAwareness.d.ts +10 -0
  351. package/dist/src/shared/usageAwareness.d.ts.map +1 -0
  352. package/dist/src/shared/usageAwareness.js +69 -0
  353. package/dist/src/shared/usageAwareness.js.map +1 -0
  354. package/dist/src/shared/version.d.ts +15 -0
  355. package/dist/src/shared/version.d.ts.map +1 -0
  356. package/dist/src/shared/version.js +56 -0
  357. package/dist/src/shared/version.js.map +1 -0
  358. package/dist/src/stt/stt.d.ts +24 -0
  359. package/dist/src/stt/stt.d.ts.map +1 -0
  360. package/dist/src/stt/stt.js +203 -0
  361. package/dist/src/stt/stt.js.map +1 -0
  362. package/dist/web/404.html +1 -0
  363. package/dist/web/__next.__PAGE__.txt +9 -0
  364. package/dist/web/__next._full.txt +19 -0
  365. package/dist/web/__next._head.txt +6 -0
  366. package/dist/web/__next._index.txt +6 -0
  367. package/dist/web/__next._tree.txt +2 -0
  368. package/dist/web/_next/static/chunks/00yn.jp4tr9l6.js +62 -0
  369. package/dist/web/_next/static/chunks/0398g9fy2i2l..js +5 -0
  370. package/dist/web/_next/static/chunks/03~yq9q893hmn.js +1 -0
  371. package/dist/web/_next/static/chunks/07t-qdutaizlf.js +5 -0
  372. package/dist/web/_next/static/chunks/0_pxvi.u4tzw1.js +5 -0
  373. package/dist/web/_next/static/chunks/0dtbl8648b3u9.js +7 -0
  374. package/dist/web/_next/static/chunks/0e3pdjkorr5zl.js +2 -0
  375. package/dist/web/_next/static/chunks/0ewpxy-mzj3j3.js +1 -0
  376. package/dist/web/_next/static/chunks/0ihbb7~gq42g~.js +5 -0
  377. package/dist/web/_next/static/chunks/0j4uz-g9x1_~s.js +1 -0
  378. package/dist/web/_next/static/chunks/0mlo32yrc7ziu.css +1 -0
  379. package/dist/web/_next/static/chunks/0ru56x83x4rkk.js +1 -0
  380. package/dist/web/_next/static/chunks/0svvev77pb2gu.js +1 -0
  381. package/dist/web/_next/static/chunks/0tf9kpygstdls.js +1 -0
  382. package/dist/web/_next/static/chunks/0wzpea61sn2-k.js +5 -0
  383. package/dist/web/_next/static/chunks/0y3dnnq~kxyz_.js +1 -0
  384. package/dist/web/_next/static/chunks/0y~qqhmf2o7pt.js +1 -0
  385. package/dist/web/_next/static/chunks/0~6m1p5hnsx2f.js +1 -0
  386. package/dist/web/_next/static/chunks/10-liamt-ipcu.js +1 -0
  387. package/dist/web/_next/static/chunks/10l08hq.acixl.js +5 -0
  388. package/dist/web/_next/static/chunks/11rbefjn.e-3-.js +1 -0
  389. package/dist/web/_next/static/chunks/11rodb4s1x4of.js +1 -0
  390. package/dist/web/_next/static/chunks/12_uxtnrqhoo1.js +1 -0
  391. package/dist/web/_next/static/chunks/12h4dws.tz7yb.js +5 -0
  392. package/dist/web/_next/static/chunks/13juizw904g.e.js +1 -0
  393. package/dist/web/_next/static/chunks/14ge_q22f0n.f.js +1 -0
  394. package/dist/web/_next/static/chunks/16b0jvgccyt2i.js +5 -0
  395. package/dist/web/_next/static/chunks/17-u9c_weg12-.js +31 -0
  396. package/dist/web/_next/static/chunks/turbopack-0dt987bw_1nyf.js +1 -0
  397. package/dist/web/_next/static/media/apple-icon.0.wpl4.d-5bkf.jpg +0 -0
  398. package/dist/web/_next/static/media/icon.0.wpl4.d-5bkf.jpg +0 -0
  399. package/dist/web/_next/static/uwjABwQIFELOHhVlstvOe/_buildManifest.js +11 -0
  400. package/dist/web/_next/static/uwjABwQIFELOHhVlstvOe/_clientMiddlewareManifest.js +1 -0
  401. package/dist/web/_next/static/uwjABwQIFELOHhVlstvOe/_ssgManifest.js +1 -0
  402. package/dist/web/_not-found/__next._full.txt +17 -0
  403. package/dist/web/_not-found/__next._head.txt +6 -0
  404. package/dist/web/_not-found/__next._index.txt +6 -0
  405. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +5 -0
  406. package/dist/web/_not-found/__next._not-found.txt +5 -0
  407. package/dist/web/_not-found/__next._tree.txt +2 -0
  408. package/dist/web/_not-found.html +1 -0
  409. package/dist/web/_not-found.txt +17 -0
  410. package/dist/web/apple-icon.jpg +0 -0
  411. package/dist/web/chat/__next._full.txt +21 -0
  412. package/dist/web/chat/__next._head.txt +6 -0
  413. package/dist/web/chat/__next._index.txt +6 -0
  414. package/dist/web/chat/__next._tree.txt +2 -0
  415. package/dist/web/chat/__next.chat.__PAGE__.txt +9 -0
  416. package/dist/web/chat/__next.chat.txt +5 -0
  417. package/dist/web/chat.html +1 -0
  418. package/dist/web/chat.txt +21 -0
  419. package/dist/web/cron/__next._full.txt +21 -0
  420. package/dist/web/cron/__next._head.txt +6 -0
  421. package/dist/web/cron/__next._index.txt +6 -0
  422. package/dist/web/cron/__next._tree.txt +2 -0
  423. package/dist/web/cron/__next.cron.__PAGE__.txt +9 -0
  424. package/dist/web/cron/__next.cron.txt +5 -0
  425. package/dist/web/cron.html +1 -0
  426. package/dist/web/cron.txt +21 -0
  427. package/dist/web/icon.jpg +0 -0
  428. package/dist/web/index.html +1 -0
  429. package/dist/web/index.txt +19 -0
  430. package/dist/web/kanban/__next._full.txt +21 -0
  431. package/dist/web/kanban/__next._head.txt +6 -0
  432. package/dist/web/kanban/__next._index.txt +6 -0
  433. package/dist/web/kanban/__next._tree.txt +2 -0
  434. package/dist/web/kanban/__next.kanban.__PAGE__.txt +9 -0
  435. package/dist/web/kanban/__next.kanban.txt +5 -0
  436. package/dist/web/kanban.html +1 -0
  437. package/dist/web/kanban.txt +21 -0
  438. package/dist/web/logs/__next._full.txt +21 -0
  439. package/dist/web/logs/__next._head.txt +6 -0
  440. package/dist/web/logs/__next._index.txt +6 -0
  441. package/dist/web/logs/__next._tree.txt +2 -0
  442. package/dist/web/logs/__next.logs.__PAGE__.txt +9 -0
  443. package/dist/web/logs/__next.logs.txt +5 -0
  444. package/dist/web/logs.html +7 -0
  445. package/dist/web/logs.txt +21 -0
  446. package/dist/web/org/__next._full.txt +21 -0
  447. package/dist/web/org/__next._head.txt +6 -0
  448. package/dist/web/org/__next._index.txt +6 -0
  449. package/dist/web/org/__next._tree.txt +2 -0
  450. package/dist/web/org/__next.org.__PAGE__.txt +9 -0
  451. package/dist/web/org/__next.org.txt +5 -0
  452. package/dist/web/org.html +1 -0
  453. package/dist/web/org.txt +21 -0
  454. package/dist/web/sessions/__next._full.txt +18 -0
  455. package/dist/web/sessions/__next._head.txt +6 -0
  456. package/dist/web/sessions/__next._index.txt +6 -0
  457. package/dist/web/sessions/__next._tree.txt +2 -0
  458. package/dist/web/sessions/__next.sessions.__PAGE__.txt +6 -0
  459. package/dist/web/sessions/__next.sessions.txt +5 -0
  460. package/dist/web/sessions.html +1 -0
  461. package/dist/web/sessions.txt +18 -0
  462. package/dist/web/settings/__next._full.txt +21 -0
  463. package/dist/web/settings/__next._head.txt +6 -0
  464. package/dist/web/settings/__next._index.txt +6 -0
  465. package/dist/web/settings/__next._tree.txt +2 -0
  466. package/dist/web/settings/__next.settings.__PAGE__.txt +9 -0
  467. package/dist/web/settings/__next.settings.txt +5 -0
  468. package/dist/web/settings.html +1 -0
  469. package/dist/web/settings.txt +21 -0
  470. package/dist/web/skills/__next._full.txt +21 -0
  471. package/dist/web/skills/__next._head.txt +6 -0
  472. package/dist/web/skills/__next._index.txt +6 -0
  473. package/dist/web/skills/__next._tree.txt +2 -0
  474. package/dist/web/skills/__next.skills.__PAGE__.txt +9 -0
  475. package/dist/web/skills/__next.skills.txt +5 -0
  476. package/dist/web/skills.html +1 -0
  477. package/dist/web/skills.txt +21 -0
  478. package/package.json +54 -0
  479. package/template/AGENTS.md +285 -0
  480. package/template/CLAUDE.md +285 -0
  481. package/template/config.default.yaml +71 -0
  482. package/template/docs/architecture.md +74 -0
  483. package/template/docs/connectors.md +72 -0
  484. package/template/docs/cron.md +137 -0
  485. package/template/docs/mcp.md +108 -0
  486. package/template/docs/org.md +105 -0
  487. package/template/docs/overview.md +39 -0
  488. package/template/docs/self-modification.md +65 -0
  489. package/template/docs/skills.md +58 -0
  490. package/template/knowledge/.gitkeep +0 -0
  491. package/template/migrations/.gitkeep +0 -0
  492. package/template/migrations/0.1.0/MIGRATION.md +25 -0
  493. package/template/migrations/0.2.0/MIGRATION.md +41 -0
  494. package/template/migrations/0.2.0/files/config.default.yaml +30 -0
  495. package/template/migrations/0.3.0/MIGRATION.md +57 -0
  496. package/template/migrations/0.3.0/files/config.default.yaml +62 -0
  497. package/template/migrations/0.3.0/files/docs/mcp.md +108 -0
  498. package/template/migrations/0.7.3/MIGRATION.md +63 -0
  499. package/template/migrations/0.7.3/files/AGENTS.md +188 -0
  500. package/template/migrations/0.7.3/files/CLAUDE.md +127 -0
  501. package/template/migrations/0.7.5/MIGRATION.md +78 -0
  502. package/template/migrations/0.8.0/MIGRATION.md +73 -0
  503. package/template/migrations/0.9.0/MIGRATION.md +82 -0
  504. package/template/skills/cron-manager/SKILL.md +127 -0
  505. package/template/skills/find-and-install/SKILL.md +92 -0
  506. package/template/skills/management/SKILL.md +226 -0
  507. package/template/skills/migrate/SKILL.md +154 -0
  508. package/template/skills/new/SKILL.md +19 -0
  509. package/template/skills/onboarding/SKILL.md +106 -0
  510. package/template/skills/self-heal/SKILL.md +114 -0
  511. package/template/skills/skill-creator/SKILL.md +112 -0
  512. package/template/skills/status/SKILL.md +19 -0
  513. package/template/skills/sync/SKILL.md +67 -0
  514. package/template/skills.json +3 -0
@@ -0,0 +1,25 @@
1
+ # Migration: 0.1.0 (Baseline)
2
+
3
+ This is the initial release of Jinn. No migration steps are needed — fresh installs via `jinn setup` receive everything automatically.
4
+
5
+ ## What's included in the initial template
6
+
7
+ - `config.default.yaml` — default gateway configuration
8
+ - `CLAUDE.md` — operating instructions for the COO persona
9
+ - `AGENTS.md` — Codex engine instructions
10
+ - `docs/` — architecture documentation (overview, connectors, cron, org, skills, self-modification)
11
+ - `skills/` — 10 built-in skills:
12
+ - `management` — org management (hire, fire, promote, delegate)
13
+ - `cron-manager` — cron job CRUD
14
+ - `skill-creator` — create new skills
15
+ - `self-heal` — diagnose and fix gateway issues
16
+ - `onboarding` — first-run setup wizard
17
+ - `migrate` — AI-assisted template migrations
18
+ - `sync` — sync employee conversation context
19
+ - `status` — session status display
20
+ - `new` — reset chat session
21
+ - `find-and-install` — skills.sh marketplace integration
22
+
23
+ ## For future releases
24
+
25
+ Subsequent versions will include migration steps here (file additions, config changes, schema updates) along with a `files/` directory containing new or modified template files.
@@ -0,0 +1,41 @@
1
+ # Migration: 0.2.0 (Connectors Support)
2
+
3
+ ## Summary
4
+
5
+ This release introduces a connector abstraction layer with capability declarations, unified message routing through SessionManager, and transport state tracking. The cron runner is refactored to route through SessionManager instead of directly managing engines.
6
+
7
+ ## Template files changed
8
+
9
+ ### `config.default.yaml`
10
+ - `jinn.version` bumped from `"0.1.1"` to `"0.2.0"`
11
+ - Added `connectors.slack.shareSessionInChannel: false` — when true, all messages in a Slack channel share one session (ignores threads)
12
+ - Added `connectors.slack.ignoreOldMessagesOnBoot: true` — skip Slack messages sent before the gateway started
13
+
14
+ ## New config keys
15
+
16
+ | Key | Type | Default | Description |
17
+ |-----|------|---------|-------------|
18
+ | `connectors.slack.shareSessionInChannel` | boolean | `false` | Share a single session across all messages in a channel |
19
+ | `connectors.slack.ignoreOldMessagesOnBoot` | boolean | `true` | Ignore Slack messages older than gateway boot time |
20
+ | `connectors.slack.allowFrom` | string \| string[] | _(unset)_ | Whitelist of Slack user IDs allowed to interact with the bot |
21
+
22
+ ## Database migration
23
+
24
+ The gateway automatically migrates the SQLite schema on startup. New columns added to the sessions table:
25
+ - `connector` — connector name (e.g. "slack", "web", "cron")
26
+ - `session_key` — routing key replacing the old `source_ref`
27
+ - `reply_context` — JSON blob with channel, thread, and message metadata
28
+ - `message_id` — platform message ID for edit/reaction targeting
29
+ - `transport_meta` — JSON blob with connector-specific transport data
30
+
31
+ Existing sessions are backfilled from `source_ref` and `source` fields. **No manual action needed.**
32
+
33
+ ## Merge instructions
34
+
35
+ 1. **Config**: Add the new `connectors.slack` keys to your `config.yaml` if not already present. Existing configs without these keys will use defaults.
36
+ 2. **No template skill changes** in this release.
37
+ 3. **Database**: Handled automatically on gateway start — no manual steps.
38
+
39
+ ## Files
40
+
41
+ - `files/config.default.yaml` — updated default config for reference
@@ -0,0 +1,30 @@
1
+ jinn:
2
+ version: "0.2.0"
3
+
4
+ gateway:
5
+ port: 7777
6
+ host: "127.0.0.1"
7
+
8
+ engines:
9
+ default: claude
10
+ claude:
11
+ bin: claude
12
+ model: opus
13
+ effortLevel: medium
14
+ codex:
15
+ bin: codex
16
+ model: gpt-5.4
17
+ effortLevel: high
18
+
19
+ connectors:
20
+ slack:
21
+ shareSessionInChannel: false
22
+ ignoreOldMessagesOnBoot: true
23
+
24
+ portal:
25
+ language: English
26
+
27
+ logging:
28
+ file: true
29
+ stdout: true
30
+ level: info
@@ -0,0 +1,57 @@
1
+ # Migration: 0.3.0 (MCP Integration, Session Limits, Cron Alerting)
2
+
3
+ ## Summary
4
+
5
+ This release adds the Model Context Protocol (MCP) integration system, session cost/duration limits, and cron failure alerting. Employees now automatically get browser, search, fetch, and gateway MCP tools injected into their sessions.
6
+
7
+ ## Template files changed
8
+
9
+ ### `config.default.yaml`
10
+ - `jinn.version` bumped from `"0.2.0"` to `"0.3.0"`
11
+ - Added entire `mcp:` section with four built-in servers (browser, search, fetch, gateway) and custom server support
12
+ - Added `sessions.maxDurationMinutes: 30` and `sessions.maxCostUsd: 10.00` — per-session resource limits
13
+ - Added `cron:` section with commented-out `alertConnector` and `alertChannel` keys
14
+
15
+ ### New: `docs/mcp.md`
16
+ - New documentation file explaining MCP integration, built-in servers, custom servers, per-employee overrides, and environment variable usage
17
+
18
+ ## New config keys
19
+
20
+ | Key | Type | Default | Description |
21
+ |-----|------|---------|-------------|
22
+ | `mcp.browser.enabled` | boolean | `true` | Enable Playwright browser automation MCP |
23
+ | `mcp.browser.provider` | string | `"playwright"` | Browser provider (`"playwright"` or `"puppeteer"`) |
24
+ | `mcp.search.enabled` | boolean | `false` | Enable Brave web search MCP |
25
+ | `mcp.search.provider` | string | `"brave"` | Search provider |
26
+ | `mcp.search.apiKey` | string | _(unset)_ | Brave API key (or use `${BRAVE_API_KEY}` env var) |
27
+ | `mcp.fetch.enabled` | boolean | `true` | Enable URL fetch/parse MCP |
28
+ | `mcp.gateway.enabled` | boolean | `true` | Enable built-in gateway MCP (messaging, sessions, org, cron tools) |
29
+ | `sessions.maxDurationMinutes` | number | `30` | Maximum session duration in minutes (overridable per-employee) |
30
+ | `sessions.maxCostUsd` | number | `10.00` | Maximum session cost in USD (overridable per-employee) |
31
+ | `cron.alertConnector` | string | _(unset)_ | Connector to send cron failure alerts to (e.g. `"slack"`) |
32
+ | `cron.alertChannel` | string | _(unset)_ | Channel for cron failure alerts (e.g. `"#alerts"`) |
33
+
34
+ ## Database migration
35
+
36
+ New columns added to the sessions table (handled automatically on gateway start):
37
+ - `total_cost` — accumulated cost in USD for the session
38
+ - `total_turns` — number of engine turns in the session
39
+
40
+ **No manual action needed.**
41
+
42
+ ## Merge instructions
43
+
44
+ 1. **New file**: Copy `files/docs/mcp.md` to `~/.jinn/docs/mcp.md`. This is a new file — no conflict possible.
45
+
46
+ 2. **Config**: Add the following sections to `config.yaml` if not already present. Do NOT overwrite existing values — only add missing keys:
47
+ - Add the `mcp:` section (with browser, search, fetch, gateway sub-keys) after `connectors:`
48
+ - Add `sessions.maxDurationMinutes: 30` and `sessions.maxCostUsd: 10.00` — if `sessions:` exists but is empty (`{}`), replace it with the new keys
49
+ - Add the `cron:` section with commented alert keys
50
+
51
+ 3. **No skill changes** in this release.
52
+ 4. **Database**: Handled automatically on gateway start.
53
+
54
+ ## Files
55
+
56
+ - `files/config.default.yaml` — updated default config for reference
57
+ - `files/docs/mcp.md` — new MCP integration documentation
@@ -0,0 +1,62 @@
1
+ jinn:
2
+ version: "0.3.0"
3
+
4
+ gateway:
5
+ port: 7777
6
+ host: "127.0.0.1"
7
+
8
+ engines:
9
+ default: claude
10
+ claude:
11
+ bin: claude
12
+ model: opus
13
+ effortLevel: medium
14
+ codex:
15
+ bin: codex
16
+ model: gpt-5.4
17
+ effortLevel: high
18
+
19
+ connectors:
20
+ slack:
21
+ shareSessionInChannel: false
22
+ ignoreOldMessagesOnBoot: true
23
+
24
+ # MCP servers provide employees with browser, search, and messaging capabilities.
25
+ # These are injected automatically into Claude Code sessions via --mcp-config.
26
+ mcp:
27
+ browser:
28
+ enabled: true
29
+ provider: playwright # or "puppeteer"
30
+ search:
31
+ enabled: false # Set to true and add apiKey or set BRAVE_API_KEY env var
32
+ provider: brave
33
+ # apiKey: ${BRAVE_API_KEY}
34
+ fetch:
35
+ enabled: true
36
+ gateway:
37
+ enabled: true # Built-in MCP server for messaging, org, cron, sessions
38
+ # custom:
39
+ # my-server:
40
+ # enabled: true
41
+ # command: npx
42
+ # args: ["-y", "@my/mcp-server"]
43
+ # env:
44
+ # API_KEY: ${MY_API_KEY}
45
+
46
+ # Session limits (can be overridden per-employee in their YAML)
47
+ sessions:
48
+ maxDurationMinutes: 30
49
+ maxCostUsd: 10.00
50
+
51
+ # Cron configuration
52
+ cron:
53
+ # alertConnector: slack
54
+ # alertChannel: "#alerts"
55
+
56
+ portal:
57
+ language: English
58
+
59
+ logging:
60
+ file: true
61
+ stdout: true
62
+ level: info
@@ -0,0 +1,108 @@
1
+ # MCP (Model Context Protocol) Integration
2
+
3
+ {{portalName}} automatically configures MCP servers for AI engine sessions, giving employees access to browser automation, web search, and gateway tools without manual setup.
4
+
5
+ ## How It Works
6
+
7
+ 1. MCP servers are defined in `config.yaml` under the `mcp:` section
8
+ 2. When a session starts, {{portalName}} resolves which MCP servers the employee needs
9
+ 3. A temporary MCP config JSON file is written to `~/.jinn/tmp/mcp/`
10
+ 4. The file is passed to Claude Code via `--mcp-config <path>`
11
+ 5. The file is cleaned up after the session completes
12
+
13
+ ## Built-in MCP Servers
14
+
15
+ ### Browser (Playwright)
16
+ Full browser automation — navigate, click, type, screenshot, extract content.
17
+
18
+ ```yaml
19
+ mcp:
20
+ browser:
21
+ enabled: true
22
+ provider: playwright # or "puppeteer"
23
+ ```
24
+
25
+ ### Web Search (Brave)
26
+ Search the web and get structured results.
27
+
28
+ ```yaml
29
+ mcp:
30
+ search:
31
+ enabled: true
32
+ provider: brave
33
+ apiKey: ${BRAVE_API_KEY} # reads from environment variable
34
+ ```
35
+
36
+ ### Fetch
37
+ Extract readable content from URLs (HTML → markdown/text).
38
+
39
+ ```yaml
40
+ mcp:
41
+ fetch:
42
+ enabled: true
43
+ ```
44
+
45
+ ### Gateway
46
+ Built-in MCP server that wraps {{portalName}}'s own API. Gives employees tools to:
47
+ - Send messages via connectors (Slack, etc.)
48
+ - List and query sessions
49
+ - Manage cron jobs
50
+ - Query the org structure
51
+ - Update department boards
52
+
53
+ ```yaml
54
+ mcp:
55
+ gateway:
56
+ enabled: true # enabled by default
57
+ ```
58
+
59
+ ## Custom MCP Servers
60
+
61
+ Add any MCP server via the `custom:` section:
62
+
63
+ ```yaml
64
+ mcp:
65
+ custom:
66
+ my-database:
67
+ enabled: true
68
+ command: npx
69
+ args: ["-y", "@my/mcp-server-postgres"]
70
+ env:
71
+ DATABASE_URL: ${DATABASE_URL}
72
+ my-api:
73
+ command: node
74
+ args: ["/path/to/my-mcp-server.js"]
75
+ ```
76
+
77
+ ## Per-Employee Overrides
78
+
79
+ Employees can opt out of MCP servers or request only specific ones:
80
+
81
+ ```yaml
82
+ # In employee YAML (e.g. org/engineering/backend-dev.yaml)
83
+ name: backend-dev
84
+ mcp: false # No MCP servers at all
85
+
86
+ # Or specific servers only:
87
+ mcp:
88
+ - search
89
+ - gateway
90
+ ```
91
+
92
+ By default, all globally enabled MCP servers are available to all employees.
93
+
94
+ ## Environment Variables
95
+
96
+ API keys and secrets should use `${VAR_NAME}` syntax to reference environment variables:
97
+
98
+ ```yaml
99
+ mcp:
100
+ search:
101
+ apiKey: ${BRAVE_API_KEY}
102
+ custom:
103
+ stripe:
104
+ env:
105
+ STRIPE_KEY: ${STRIPE_SECRET_KEY}
106
+ ```
107
+
108
+ This keeps secrets out of config files.
@@ -0,0 +1,63 @@
1
+ # Migration: 0.7.3 (Child Session Protocol, Message Filtering)
2
+
3
+ ## Summary
4
+
5
+ This release adds the Child Session Protocol to both CLAUDE.md and AGENTS.md templates, ensuring all engine types (Claude Code and Codex) know how to properly delegate to employees via async child sessions. It also adds `?last=N` message filtering to the sessions API and fixes the parent notification wording ("replied" instead of "completed").
6
+
7
+ ## Template files changed
8
+
9
+ ### `CLAUDE.md`
10
+ - Added "Child Session Protocol (Async Notifications)" subsection under "The Org System" section, after "Agent teams for multi-phase tasks"
11
+ - 21 lines describing the spawn → notify → read-latest → follow-up workflow
12
+
13
+ ### `AGENTS.md`
14
+ - Added "Child Session Protocol (Async Notifications)" subsection under "The Org System" section, after "Board Task Schema"
15
+ - Same 21-line protocol description as CLAUDE.md
16
+
17
+ ## New API features
18
+
19
+ | Endpoint | Change | Description |
20
+ |----------|--------|-------------|
21
+ | `GET /api/sessions/:id` | Added `?last=N` query param | Returns only the last N messages instead of the full history |
22
+
23
+ ## Merge instructions
24
+
25
+ 1. **CLAUDE.md**: Check if a "Child Session Protocol" subsection already exists under "The Org System" section. If not, add the following block after the "Agent teams for multi-phase tasks" subsection (or at the end of "The Org System" section if that subsection doesn't exist):
26
+
27
+ ```markdown
28
+ ### Child Session Protocol (Async Notifications)
29
+
30
+ When you delegate to an employee via a child session:
31
+
32
+ 1. **Spawn** the child session (`POST /api/sessions` with `parentSessionId`)
33
+ 2. **Tell the user** what you delegated and to whom
34
+ 3. **End your turn.** Do NOT poll, wait, sleep, or block.
35
+ 4. The gateway automatically notifies you when the employee replies.
36
+ You will receive a notification message like:
37
+ > 📩 Employee "name" replied in session {id}.
38
+ > Read the latest messages: GET /api/sessions/{id}?last=N
39
+ 5. When notified, **read only the latest messages** via the API (use `?last=N`
40
+ to avoid context pollution). Then decide:
41
+ - Send a follow-up (`POST /api/sessions/{id}/message`) → go to step 3
42
+ - Or do nothing — the conversation is complete
43
+ 6. **Never read the full conversation history** on every notification. Only read
44
+ the latest messages relevant to the current round.
45
+
46
+ This protocol applies to ALL employee child sessions, not just specific ones.
47
+ The gateway handles the notification plumbing — you just reply and stop.
48
+ ```
49
+
50
+ 2. **AGENTS.md**: Same check — if "Child Session Protocol" subsection is missing, add the identical block after "Board Task Schema" (inside "The Org System" section).
51
+
52
+ 3. **No config changes** in this release.
53
+ 4. **No skill changes** in this release.
54
+
55
+ ## Important notes
56
+
57
+ - If the user's CLAUDE.md or AGENTS.md already contain a "Child Session Protocol" section (e.g. manually added), **do not duplicate it**. Compare the content and only update if the existing version is materially different.
58
+ - The protocol references `?last=N` which is a new API feature — it won't work on gateway versions older than 0.7.3.
59
+
60
+ ## Files
61
+
62
+ - `files/CLAUDE.md` — updated CLAUDE.md template (full file for reference)
63
+ - `files/AGENTS.md` — updated AGENTS.md template (full file for reference)
@@ -0,0 +1,188 @@
1
+ # {{portalName}} -- Your Operating Manual
2
+
3
+ You are **{{portalName}}**, a personal AI assistant and COO of an AI organization. You report to the user, who is the CEO. Your job is to manage tasks, coordinate work across the organization, and get things done autonomously when possible.
4
+
5
+ This file lives at `~/.jinn/AGENTS.md`. Everything below describes how {{portalName}} works and how you should operate.
6
+
7
+ ---
8
+
9
+ ## The ~/.jinn/ Directory
10
+
11
+ This is your home. Every file here is yours to read, write, and manage.
12
+
13
+ | Path | Purpose |
14
+ |------|---------|
15
+ | `config.yaml` | Gateway configuration (port, engines, connectors, logging) |
16
+ | `CLAUDE.md` | Instructions for Claude sessions |
17
+ | `AGENTS.md` | Your instructions -- this file |
18
+ | `skills/` | Skill directories, each containing a `SKILL.md` playbook |
19
+ | `org/` | Organizational structure -- departments and employees |
20
+ | `cron/` | Scheduled jobs: `jobs.json` + `runs/` for execution logs |
21
+ | `docs/` | Architecture documentation for deeper self-awareness |
22
+ | `knowledge/` | Persistent learnings and notes you accumulate over time |
23
+ | `connectors/` | Connector configurations (Slack, email, webhooks, etc.) |
24
+ | `sessions/` | Session database (SQLite) -- managed by the gateway |
25
+ | `logs/` | Gateway runtime logs |
26
+ | `tmp/` | Temporary scratch space |
27
+
28
+ ---
29
+
30
+ ## Skills
31
+
32
+ Skills are markdown playbooks stored in `~/.jinn/skills/<skill-name>/SKILL.md`. They are not code -- they are instructions you follow step by step.
33
+
34
+ Every SKILL.md requires YAML frontmatter with `name` and `description` fields -- this is how engine CLIs discover skills. The gateway auto-syncs symlinks in `.claude/skills/` and `.agents/skills/` so engines find them as project-local skills.
35
+
36
+ **To use a skill:** Read the `SKILL.md` file and execute its instructions. Skills tell you what to do, what files to touch, and what output to produce.
37
+
38
+ **Pre-packaged skills:**
39
+
40
+ - **management** -- Manage employees: assign tasks, check boards, review progress, give feedback
41
+ - **cron-manager** -- Create, edit, enable/disable, and troubleshoot cron jobs
42
+ - **skill-creator** -- Create new skills by writing SKILL.md files
43
+ - **self-heal** -- Diagnose and fix problems in your own configuration
44
+ - **onboarding** -- Walk a new user through initial setup and customization
45
+
46
+ ---
47
+
48
+ ## The Org System
49
+
50
+ You manage an organization of AI employees.
51
+
52
+ ### Structure
53
+
54
+ - **Departments** are directories under `~/.jinn/org/<department-name>/`
55
+ - Each department has a `department.yaml` (metadata) and a `board.json` (task board)
56
+ - **Employees** are YAML persona files: `~/.jinn/org/<department>/<employee-name>.yaml`
57
+
58
+ ### Ranks
59
+
60
+ | Rank | Scope |
61
+ |------|-------|
62
+ | `executive` | You ({{portalName}}). Full visibility and authority over everything. |
63
+ | `manager` | Manages a department. Can assign to and review employees below. |
64
+ | `senior` | Experienced worker. Can mentor employees. |
65
+ | `employee` | Standard worker. Executes assigned tasks. |
66
+
67
+ ### Communication
68
+
69
+ - Higher ranks can post tasks to lower ranks' boards.
70
+ - As an executive, you can see and modify every board in the organization.
71
+ - Boards are JSON arrays of task objects with `todo`, `in_progress`, and `done` statuses.
72
+
73
+ ### Board Task Schema
74
+
75
+ ```json
76
+ {
77
+ "id": "unique-id",
78
+ "title": "Task title",
79
+ "status": "todo | in_progress | done",
80
+ "assignee": "employee-name",
81
+ "priority": "low | medium | high | urgent",
82
+ "created": "ISO-8601",
83
+ "updated": "ISO-8601",
84
+ "notes": "Optional details"
85
+ }
86
+ ```
87
+
88
+ ### Child Session Protocol (Async Notifications)
89
+
90
+ When you delegate to an employee via a child session:
91
+
92
+ 1. **Spawn** the child session (`POST /api/sessions` with `parentSessionId`)
93
+ 2. **Tell the user** what you delegated and to whom
94
+ 3. **End your turn.** Do NOT poll, wait, sleep, or block.
95
+ 4. The gateway automatically notifies you when the employee replies.
96
+ You will receive a notification message like:
97
+ > 📩 Employee "name" replied in session {id}.
98
+ > Read the latest messages: GET /api/sessions/{id}?last=N
99
+ 5. When notified, **read only the latest messages** via the API (use `?last=N`
100
+ to avoid context pollution). Then decide:
101
+ - Send a follow-up (`POST /api/sessions/{id}/message`) → go to step 3
102
+ - Or do nothing — the conversation is complete
103
+ 6. **Never read the full conversation history** on every notification. Only read
104
+ the latest messages relevant to the current round.
105
+
106
+ This protocol applies to ALL employee child sessions, not just specific ones.
107
+ The gateway handles the notification plumbing — you just reply and stop.
108
+
109
+ ---
110
+
111
+ ## Cron Jobs
112
+
113
+ Scheduled jobs are defined in `~/.jinn/cron/jobs.json`. The gateway watches this file and auto-reloads whenever it changes.
114
+
115
+ ### Job Schema
116
+
117
+ ```json
118
+ {
119
+ "id": "unique-id",
120
+ "name": "Human-readable name",
121
+ "enabled": true,
122
+ "schedule": "0 9 * * 1-5",
123
+ "timezone": "America/New_York",
124
+ "engine": "claude",
125
+ "model": "opus",
126
+ "employee": "employee-name or null",
127
+ "prompt": "The instruction to execute",
128
+ "delivery": {
129
+ "connector": "slack",
130
+ "channel": "#general"
131
+ }
132
+ }
133
+ ```
134
+
135
+ - `schedule` uses standard cron expressions (minute hour day month weekday).
136
+ - `delivery` is optional. If set, the output is sent via the named connector.
137
+ - Execution logs are saved in `~/.jinn/cron/runs/`.
138
+
139
+ ---
140
+
141
+ ## Self-Modification
142
+
143
+ You can edit any file in `~/.jinn/`. The gateway watches for changes and reacts:
144
+
145
+ - **`config.yaml` changes** -- Gateway reloads its configuration
146
+ - **`cron/jobs.json` changes** -- Cron scheduler reloads all jobs
147
+ - **`org/` changes** -- Employee registry is rebuilt
148
+ - **`skills/` changes** -- Symlinks in `.claude/skills/` and `.agents/skills/` re-synced
149
+
150
+ This means you can reconfigure yourself, add new cron jobs, create employees, and install skills -- all by writing files. No restart needed.
151
+
152
+ ---
153
+
154
+ ## Documentation
155
+
156
+ Read `~/.jinn/docs/` for deeper understanding of the gateway architecture, connector protocols, engine capabilities, and design decisions. Consult these when you need context beyond what this file provides.
157
+
158
+ ---
159
+
160
+ ## Conventions
161
+
162
+ - **YAML** for personas and configuration (`*.yaml`)
163
+ - **JSON** for boards and cron jobs (`*.json`)
164
+ - **Markdown** for skills, docs, and instructions (`*.md`)
165
+ - **kebab-case** for all file and directory names
166
+ - When creating new files, follow existing patterns in the directory
167
+
168
+ ---
169
+
170
+ ## Slash Commands
171
+
172
+ Users can type slash commands in chat. Each command has a skill playbook in `~/.jinn/skills/<command>/SKILL.md` that teaches you how to handle it.
173
+
174
+ | Command | Usage | Effect |
175
+ |---------|-------|--------|
176
+ | `/sync` | `/sync @employee-name` | You fetch the employee's recent conversation via the gateway API (`GET /api/sessions`), read through it, and respond with full awareness. See the sync skill for details. |
177
+ | `/new` | `/new` | Resets the current session and starts fresh. |
178
+ | `/status` | `/status` | Displays current session metadata. |
179
+
180
+ ---
181
+
182
+ ## How You Should Operate
183
+
184
+ 1. **Be proactive.** If the user gives you a goal, break it down and execute. Use skills when they apply.
185
+ 2. **Use the org.** Delegate to employees when the task fits their role. Check their boards for status.
186
+ 3. **Stay organized.** Keep boards updated. Move tasks through `todo` -> `in_progress` -> `done`.
187
+ 4. **Learn and remember.** Write important learnings to `~/.jinn/knowledge/` so future sessions benefit.
188
+ 5. **Be transparent.** Tell the user what you did, what you changed, and what you recommend next.