@made-by-moonlight/athene-cli 0.9.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 (315) hide show
  1. package/LICENSE +22 -0
  2. package/dist/assets/plugin-registry.json +67 -0
  3. package/dist/assets/scripts/athene-doctor.ps1 +352 -0
  4. package/dist/assets/scripts/athene-doctor.sh +552 -0
  5. package/dist/assets/scripts/athene-update.ps1 +224 -0
  6. package/dist/assets/scripts/athene-update.sh +252 -0
  7. package/dist/commands/completion.d.ts +3 -0
  8. package/dist/commands/completion.d.ts.map +1 -0
  9. package/dist/commands/completion.js +26 -0
  10. package/dist/commands/completion.js.map +1 -0
  11. package/dist/commands/config.d.ts +11 -0
  12. package/dist/commands/config.d.ts.map +1 -0
  13. package/dist/commands/config.js +89 -0
  14. package/dist/commands/config.js.map +1 -0
  15. package/dist/commands/dashboard.d.ts +3 -0
  16. package/dist/commands/dashboard.d.ts.map +1 -0
  17. package/dist/commands/dashboard.js +103 -0
  18. package/dist/commands/dashboard.js.map +1 -0
  19. package/dist/commands/doctor.d.ts +3 -0
  20. package/dist/commands/doctor.d.ts.map +1 -0
  21. package/dist/commands/doctor.js +329 -0
  22. package/dist/commands/doctor.js.map +1 -0
  23. package/dist/commands/events.d.ts +3 -0
  24. package/dist/commands/events.d.ts.map +1 -0
  25. package/dist/commands/events.js +172 -0
  26. package/dist/commands/events.js.map +1 -0
  27. package/dist/commands/migrate-storage.d.ts +3 -0
  28. package/dist/commands/migrate-storage.d.ts.map +1 -0
  29. package/dist/commands/migrate-storage.js +78 -0
  30. package/dist/commands/migrate-storage.js.map +1 -0
  31. package/dist/commands/notify.d.ts +3 -0
  32. package/dist/commands/notify.d.ts.map +1 -0
  33. package/dist/commands/notify.js +143 -0
  34. package/dist/commands/notify.js.map +1 -0
  35. package/dist/commands/open.d.ts +3 -0
  36. package/dist/commands/open.d.ts.map +1 -0
  37. package/dist/commands/open.js +167 -0
  38. package/dist/commands/open.js.map +1 -0
  39. package/dist/commands/plugin.d.ts +3 -0
  40. package/dist/commands/plugin.d.ts.map +1 -0
  41. package/dist/commands/plugin.js +462 -0
  42. package/dist/commands/plugin.js.map +1 -0
  43. package/dist/commands/project.d.ts +3 -0
  44. package/dist/commands/project.d.ts.map +1 -0
  45. package/dist/commands/project.js +143 -0
  46. package/dist/commands/project.js.map +1 -0
  47. package/dist/commands/report.d.ts +19 -0
  48. package/dist/commands/report.d.ts.map +1 -0
  49. package/dist/commands/report.js +114 -0
  50. package/dist/commands/report.js.map +1 -0
  51. package/dist/commands/review-check.d.ts +3 -0
  52. package/dist/commands/review-check.d.ts.map +1 -0
  53. package/dist/commands/review-check.js +122 -0
  54. package/dist/commands/review-check.js.map +1 -0
  55. package/dist/commands/review.d.ts +3 -0
  56. package/dist/commands/review.d.ts.map +1 -0
  57. package/dist/commands/review.js +215 -0
  58. package/dist/commands/review.js.map +1 -0
  59. package/dist/commands/send.d.ts +3 -0
  60. package/dist/commands/send.d.ts.map +1 -0
  61. package/dist/commands/send.js +187 -0
  62. package/dist/commands/send.js.map +1 -0
  63. package/dist/commands/session.d.ts +3 -0
  64. package/dist/commands/session.d.ts.map +1 -0
  65. package/dist/commands/session.js +439 -0
  66. package/dist/commands/session.js.map +1 -0
  67. package/dist/commands/setup.d.ts +5 -0
  68. package/dist/commands/setup.d.ts.map +1 -0
  69. package/dist/commands/setup.js +297 -0
  70. package/dist/commands/setup.js.map +1 -0
  71. package/dist/commands/spawn.d.ts +4 -0
  72. package/dist/commands/spawn.d.ts.map +1 -0
  73. package/dist/commands/spawn.js +436 -0
  74. package/dist/commands/spawn.js.map +1 -0
  75. package/dist/commands/start.d.ts +21 -0
  76. package/dist/commands/start.d.ts.map +1 -0
  77. package/dist/commands/start.js +1836 -0
  78. package/dist/commands/start.js.map +1 -0
  79. package/dist/commands/status.d.ts +3 -0
  80. package/dist/commands/status.d.ts.map +1 -0
  81. package/dist/commands/status.js +556 -0
  82. package/dist/commands/status.js.map +1 -0
  83. package/dist/commands/update.d.ts +15 -0
  84. package/dist/commands/update.d.ts.map +1 -0
  85. package/dist/commands/update.js +652 -0
  86. package/dist/commands/update.js.map +1 -0
  87. package/dist/commands/verify.d.ts +3 -0
  88. package/dist/commands/verify.d.ts.map +1 -0
  89. package/dist/commands/verify.js +131 -0
  90. package/dist/commands/verify.js.map +1 -0
  91. package/dist/index.d.ts +3 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +24 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/lib/bun-tmp-janitor.d.ts +18 -0
  96. package/dist/lib/bun-tmp-janitor.d.ts.map +1 -0
  97. package/dist/lib/bun-tmp-janitor.js +127 -0
  98. package/dist/lib/bun-tmp-janitor.js.map +1 -0
  99. package/dist/lib/caller-context.d.ts +13 -0
  100. package/dist/lib/caller-context.d.ts.map +1 -0
  101. package/dist/lib/caller-context.js +20 -0
  102. package/dist/lib/caller-context.js.map +1 -0
  103. package/dist/lib/cli-errors.d.ts +8 -0
  104. package/dist/lib/cli-errors.d.ts.map +1 -0
  105. package/dist/lib/cli-errors.js +20 -0
  106. package/dist/lib/cli-errors.js.map +1 -0
  107. package/dist/lib/completion.d.ts +13 -0
  108. package/dist/lib/completion.d.ts.map +1 -0
  109. package/dist/lib/completion.js +428 -0
  110. package/dist/lib/completion.js.map +1 -0
  111. package/dist/lib/composio-setup.d.ts +65 -0
  112. package/dist/lib/composio-setup.d.ts.map +1 -0
  113. package/dist/lib/composio-setup.js +3255 -0
  114. package/dist/lib/composio-setup.js.map +1 -0
  115. package/dist/lib/config-instruction.d.ts +2 -0
  116. package/dist/lib/config-instruction.d.ts.map +1 -0
  117. package/dist/lib/config-instruction.js +193 -0
  118. package/dist/lib/config-instruction.js.map +1 -0
  119. package/dist/lib/constants.d.ts +3 -0
  120. package/dist/lib/constants.d.ts.map +1 -0
  121. package/dist/lib/constants.js +3 -0
  122. package/dist/lib/constants.js.map +1 -0
  123. package/dist/lib/create-session-manager.d.ts +26 -0
  124. package/dist/lib/create-session-manager.d.ts.map +1 -0
  125. package/dist/lib/create-session-manager.js +55 -0
  126. package/dist/lib/create-session-manager.js.map +1 -0
  127. package/dist/lib/credential-resolver.d.ts +37 -0
  128. package/dist/lib/credential-resolver.d.ts.map +1 -0
  129. package/dist/lib/credential-resolver.js +105 -0
  130. package/dist/lib/credential-resolver.js.map +1 -0
  131. package/dist/lib/daemon.d.ts +69 -0
  132. package/dist/lib/daemon.d.ts.map +1 -0
  133. package/dist/lib/daemon.js +77 -0
  134. package/dist/lib/daemon.js.map +1 -0
  135. package/dist/lib/dashboard-rebuild.d.ts +53 -0
  136. package/dist/lib/dashboard-rebuild.d.ts.map +1 -0
  137. package/dist/lib/dashboard-rebuild.js +188 -0
  138. package/dist/lib/dashboard-rebuild.js.map +1 -0
  139. package/dist/lib/dashboard-setup.d.ts +14 -0
  140. package/dist/lib/dashboard-setup.d.ts.map +1 -0
  141. package/dist/lib/dashboard-setup.js +192 -0
  142. package/dist/lib/dashboard-setup.js.map +1 -0
  143. package/dist/lib/dashboard-url.d.ts +19 -0
  144. package/dist/lib/dashboard-url.d.ts.map +1 -0
  145. package/dist/lib/dashboard-url.js +25 -0
  146. package/dist/lib/dashboard-url.js.map +1 -0
  147. package/dist/lib/desktop-setup.d.ts +21 -0
  148. package/dist/lib/desktop-setup.d.ts.map +1 -0
  149. package/dist/lib/desktop-setup.js +556 -0
  150. package/dist/lib/desktop-setup.js.map +1 -0
  151. package/dist/lib/detect-agent.d.ts +24 -0
  152. package/dist/lib/detect-agent.d.ts.map +1 -0
  153. package/dist/lib/detect-agent.js +69 -0
  154. package/dist/lib/detect-agent.js.map +1 -0
  155. package/dist/lib/detect-env.d.ts +14 -0
  156. package/dist/lib/detect-env.d.ts.map +1 -0
  157. package/dist/lib/detect-env.js +46 -0
  158. package/dist/lib/detect-env.js.map +1 -0
  159. package/dist/lib/discord-setup.d.ts +20 -0
  160. package/dist/lib/discord-setup.d.ts.map +1 -0
  161. package/dist/lib/discord-setup.js +584 -0
  162. package/dist/lib/discord-setup.js.map +1 -0
  163. package/dist/lib/format.d.ts +11 -0
  164. package/dist/lib/format.d.ts.map +1 -0
  165. package/dist/lib/format.js +116 -0
  166. package/dist/lib/format.js.map +1 -0
  167. package/dist/lib/git-utils.d.ts +14 -0
  168. package/dist/lib/git-utils.d.ts.map +1 -0
  169. package/dist/lib/git-utils.js +45 -0
  170. package/dist/lib/git-utils.js.map +1 -0
  171. package/dist/lib/install-helpers.d.ts +24 -0
  172. package/dist/lib/install-helpers.d.ts.map +1 -0
  173. package/dist/lib/install-helpers.js +76 -0
  174. package/dist/lib/install-helpers.js.map +1 -0
  175. package/dist/lib/lifecycle-service.d.ts +11 -0
  176. package/dist/lib/lifecycle-service.d.ts.map +1 -0
  177. package/dist/lib/lifecycle-service.js +65 -0
  178. package/dist/lib/lifecycle-service.js.map +1 -0
  179. package/dist/lib/notifier-routing.d.ts +35 -0
  180. package/dist/lib/notifier-routing.d.ts.map +1 -0
  181. package/dist/lib/notifier-routing.js +133 -0
  182. package/dist/lib/notifier-routing.js.map +1 -0
  183. package/dist/lib/notify-test.d.ts +72 -0
  184. package/dist/lib/notify-test.d.ts.map +1 -0
  185. package/dist/lib/notify-test.js +674 -0
  186. package/dist/lib/notify-test.js.map +1 -0
  187. package/dist/lib/openclaw-probe.d.ts +38 -0
  188. package/dist/lib/openclaw-probe.d.ts.map +1 -0
  189. package/dist/lib/openclaw-probe.js +146 -0
  190. package/dist/lib/openclaw-probe.js.map +1 -0
  191. package/dist/lib/openclaw-setup.d.ts +19 -0
  192. package/dist/lib/openclaw-setup.d.ts.map +1 -0
  193. package/dist/lib/openclaw-setup.js +684 -0
  194. package/dist/lib/openclaw-setup.js.map +1 -0
  195. package/dist/lib/path-equality.d.ts +29 -0
  196. package/dist/lib/path-equality.d.ts.map +1 -0
  197. package/dist/lib/path-equality.js +52 -0
  198. package/dist/lib/path-equality.js.map +1 -0
  199. package/dist/lib/plugin-marketplace.d.ts +24 -0
  200. package/dist/lib/plugin-marketplace.d.ts.map +1 -0
  201. package/dist/lib/plugin-marketplace.js +175 -0
  202. package/dist/lib/plugin-marketplace.js.map +1 -0
  203. package/dist/lib/plugin-scaffold.d.ts +14 -0
  204. package/dist/lib/plugin-scaffold.d.ts.map +1 -0
  205. package/dist/lib/plugin-scaffold.js +174 -0
  206. package/dist/lib/plugin-scaffold.js.map +1 -0
  207. package/dist/lib/plugin-store.d.ts +9 -0
  208. package/dist/lib/plugin-store.d.ts.map +1 -0
  209. package/dist/lib/plugin-store.js +121 -0
  210. package/dist/lib/plugin-store.js.map +1 -0
  211. package/dist/lib/plugins.d.ts +17 -0
  212. package/dist/lib/plugins.d.ts.map +1 -0
  213. package/dist/lib/plugins.js +65 -0
  214. package/dist/lib/plugins.js.map +1 -0
  215. package/dist/lib/portfolio-display.d.ts +10 -0
  216. package/dist/lib/portfolio-display.d.ts.map +1 -0
  217. package/dist/lib/portfolio-display.js +17 -0
  218. package/dist/lib/portfolio-display.js.map +1 -0
  219. package/dist/lib/preflight.d.ts +27 -0
  220. package/dist/lib/preflight.d.ts.map +1 -0
  221. package/dist/lib/preflight.js +77 -0
  222. package/dist/lib/preflight.js.map +1 -0
  223. package/dist/lib/prevent-sleep.d.ts +34 -0
  224. package/dist/lib/prevent-sleep.d.ts.map +1 -0
  225. package/dist/lib/prevent-sleep.js +65 -0
  226. package/dist/lib/prevent-sleep.js.map +1 -0
  227. package/dist/lib/project-detection.d.ts +11 -0
  228. package/dist/lib/project-detection.d.ts.map +1 -0
  229. package/dist/lib/project-detection.js +206 -0
  230. package/dist/lib/project-detection.js.map +1 -0
  231. package/dist/lib/project-resolution.d.ts +10 -0
  232. package/dist/lib/project-resolution.d.ts.map +1 -0
  233. package/dist/lib/project-resolution.js +17 -0
  234. package/dist/lib/project-resolution.js.map +1 -0
  235. package/dist/lib/project-supervisor.d.ts +28 -0
  236. package/dist/lib/project-supervisor.d.ts.map +1 -0
  237. package/dist/lib/project-supervisor.js +167 -0
  238. package/dist/lib/project-supervisor.js.map +1 -0
  239. package/dist/lib/prompts.d.ts +7 -0
  240. package/dist/lib/prompts.d.ts.map +1 -0
  241. package/dist/lib/prompts.js +37 -0
  242. package/dist/lib/prompts.js.map +1 -0
  243. package/dist/lib/repo-utils.d.ts +16 -0
  244. package/dist/lib/repo-utils.d.ts.map +1 -0
  245. package/dist/lib/repo-utils.js +26 -0
  246. package/dist/lib/repo-utils.js.map +1 -0
  247. package/dist/lib/resolve-project.d.ts +113 -0
  248. package/dist/lib/resolve-project.d.ts.map +1 -0
  249. package/dist/lib/resolve-project.js +433 -0
  250. package/dist/lib/resolve-project.js.map +1 -0
  251. package/dist/lib/routes.d.ts +2 -0
  252. package/dist/lib/routes.d.ts.map +1 -0
  253. package/dist/lib/routes.js +5 -0
  254. package/dist/lib/routes.js.map +1 -0
  255. package/dist/lib/running-state.d.ts +76 -0
  256. package/dist/lib/running-state.d.ts.map +1 -0
  257. package/dist/lib/running-state.js +338 -0
  258. package/dist/lib/running-state.js.map +1 -0
  259. package/dist/lib/script-runner.d.ts +10 -0
  260. package/dist/lib/script-runner.d.ts.map +1 -0
  261. package/dist/lib/script-runner.js +189 -0
  262. package/dist/lib/script-runner.js.map +1 -0
  263. package/dist/lib/session-utils.d.ts +14 -0
  264. package/dist/lib/session-utils.d.ts.map +1 -0
  265. package/dist/lib/session-utils.js +58 -0
  266. package/dist/lib/session-utils.js.map +1 -0
  267. package/dist/lib/shell.d.ts +17 -0
  268. package/dist/lib/shell.d.ts.map +1 -0
  269. package/dist/lib/shell.js +90 -0
  270. package/dist/lib/shell.js.map +1 -0
  271. package/dist/lib/shutdown.d.ts +30 -0
  272. package/dist/lib/shutdown.d.ts.map +1 -0
  273. package/dist/lib/shutdown.js +177 -0
  274. package/dist/lib/shutdown.js.map +1 -0
  275. package/dist/lib/slack-setup.d.ts +17 -0
  276. package/dist/lib/slack-setup.d.ts.map +1 -0
  277. package/dist/lib/slack-setup.js +485 -0
  278. package/dist/lib/slack-setup.js.map +1 -0
  279. package/dist/lib/startup-preflight.d.ts +36 -0
  280. package/dist/lib/startup-preflight.d.ts.map +1 -0
  281. package/dist/lib/startup-preflight.js +273 -0
  282. package/dist/lib/startup-preflight.js.map +1 -0
  283. package/dist/lib/update-channel-onboarding.d.ts +52 -0
  284. package/dist/lib/update-channel-onboarding.d.ts.map +1 -0
  285. package/dist/lib/update-channel-onboarding.js +107 -0
  286. package/dist/lib/update-channel-onboarding.js.map +1 -0
  287. package/dist/lib/update-check.d.ts +161 -0
  288. package/dist/lib/update-check.d.ts.map +1 -0
  289. package/dist/lib/update-check.js +504 -0
  290. package/dist/lib/update-check.js.map +1 -0
  291. package/dist/lib/web-dir.d.ts +47 -0
  292. package/dist/lib/web-dir.d.ts.map +1 -0
  293. package/dist/lib/web-dir.js +179 -0
  294. package/dist/lib/web-dir.js.map +1 -0
  295. package/dist/lib/webhook-setup.d.ts +16 -0
  296. package/dist/lib/webhook-setup.d.ts.map +1 -0
  297. package/dist/lib/webhook-setup.js +383 -0
  298. package/dist/lib/webhook-setup.js.map +1 -0
  299. package/dist/options/version.d.ts +2 -0
  300. package/dist/options/version.d.ts.map +1 -0
  301. package/dist/options/version.js +7 -0
  302. package/dist/options/version.js.map +1 -0
  303. package/dist/program.d.ts +3 -0
  304. package/dist/program.d.ts.map +1 -0
  305. package/dist/program.js +63 -0
  306. package/dist/program.js.map +1 -0
  307. package/package.json +80 -0
  308. package/templates/rules/base.md +4 -0
  309. package/templates/rules/go.md +8 -0
  310. package/templates/rules/javascript.md +4 -0
  311. package/templates/rules/nextjs.md +7 -0
  312. package/templates/rules/pnpm-workspaces.md +4 -0
  313. package/templates/rules/python.md +8 -0
  314. package/templates/rules/react.md +8 -0
  315. package/templates/rules/typescript.md +6 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notify-test.d.ts","sourceRoot":"","sources":["../../src/lib/notify-test.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,674 @@
1
+ import { createServer } from "node:http";
2
+ import { buildCIFailureNotificationData, buildPRStateNotificationData, buildReactionNotificationData, buildSessionTransitionNotificationData, createProjectObserver, recordNotificationDelivery, resolveNotifierTarget, } from "@made-by-moonlight/athene-core";
3
+ export const NOTIFY_TEST_TEMPLATE_NAMES = [
4
+ "basic",
5
+ "agent-stuck",
6
+ "agent-needs-input",
7
+ "agent-exited",
8
+ "ci-failing",
9
+ "review-changes-requested",
10
+ "approved-and-green",
11
+ "merge-ready",
12
+ "all-complete",
13
+ "pr-closed",
14
+ ];
15
+ const VALID_PRIORITIES = ["urgent", "action", "warning", "info"];
16
+ const VALID_EVENT_TYPES = [
17
+ "session.spawn_started",
18
+ "session.spawned",
19
+ "session.working",
20
+ "session.exited",
21
+ "session.killed",
22
+ "session.idle",
23
+ "session.stuck",
24
+ "session.needs_input",
25
+ "session.errored",
26
+ "pr.created",
27
+ "pr.updated",
28
+ "pr.merged",
29
+ "pr.closed",
30
+ "ci.passing",
31
+ "ci.failing",
32
+ "ci.fix_sent",
33
+ "ci.fix_failed",
34
+ "review.pending",
35
+ "review.approved",
36
+ "review.changes_requested",
37
+ "review.comments_sent",
38
+ "review.comments_unresolved",
39
+ "automated_review.found",
40
+ "automated_review.fix_sent",
41
+ "merge.ready",
42
+ "merge.conflicts",
43
+ "merge.completed",
44
+ "reaction.triggered",
45
+ "reaction.escalated",
46
+ "summary.all_complete",
47
+ ];
48
+ const DEMO_PR_URL = "https://github.com/slievr/Athene/pull/1579";
49
+ const DEMO_PR_CONTEXT = {
50
+ pr: {
51
+ number: 1579,
52
+ url: DEMO_PR_URL,
53
+ title: "Normalize AO notifier payloads",
54
+ branch: "ao/demo-notifier-harness",
55
+ baseBranch: "main",
56
+ owner: "slievr",
57
+ repo: "agent-orchestrator",
58
+ isDraft: false,
59
+ },
60
+ prs: [
61
+ {
62
+ number: 1579,
63
+ url: DEMO_PR_URL,
64
+ title: "Normalize AO notifier payloads",
65
+ branch: "ao/demo-notifier-harness",
66
+ baseBranch: "main",
67
+ owner: "slievr",
68
+ repo: "agent-orchestrator",
69
+ isDraft: false,
70
+ },
71
+ ],
72
+ issueId: "AO-1579",
73
+ issueTitle: "Make AO notification payloads API-grade",
74
+ summary: "Normalize AO notifier payloads",
75
+ branch: "ao/demo-notifier-harness",
76
+ };
77
+ const DEMO_SYSTEM_CONTEXT = {
78
+ pr: null,
79
+ prs: [],
80
+ issueId: null,
81
+ issueTitle: null,
82
+ summary: "AO notification delivery smoke test",
83
+ branch: null,
84
+ };
85
+ const DEMO_FAILED_CHECKS = [
86
+ {
87
+ name: "typecheck",
88
+ status: "failed",
89
+ conclusion: "FAILURE",
90
+ url: `${DEMO_PR_URL}/checks?check_run_id=101`,
91
+ },
92
+ {
93
+ name: "unit-tests",
94
+ status: "failed",
95
+ conclusion: "FAILURE",
96
+ url: `${DEMO_PR_URL}/checks?check_run_id=102`,
97
+ },
98
+ ];
99
+ const DEMO_TEMPLATES = {
100
+ basic: {
101
+ type: "summary.all_complete",
102
+ priority: "info",
103
+ sessionId: "notify-demo",
104
+ projectId: "demo",
105
+ message: "Test notification from athene notify test",
106
+ data: buildReactionNotificationData({
107
+ eventType: "reaction.triggered",
108
+ sessionId: "notify-demo",
109
+ projectId: "demo",
110
+ context: DEMO_SYSTEM_CONTEXT,
111
+ reactionKey: "all-complete",
112
+ action: "notify",
113
+ }),
114
+ },
115
+ "agent-stuck": {
116
+ type: "session.stuck",
117
+ priority: "urgent",
118
+ sessionId: "demo-agent-7",
119
+ projectId: "demo",
120
+ message: "Agent demo-agent-7 appears stuck after repeated inactivity probes",
121
+ data: buildSessionTransitionNotificationData({
122
+ eventType: "session.stuck",
123
+ sessionId: "demo-agent-7",
124
+ projectId: "demo",
125
+ context: DEMO_PR_CONTEXT,
126
+ oldStatus: "working",
127
+ newStatus: "stuck",
128
+ }),
129
+ },
130
+ "agent-needs-input": {
131
+ type: "session.needs_input",
132
+ priority: "action",
133
+ sessionId: "demo-agent-12",
134
+ projectId: "demo",
135
+ message: "Agent demo-agent-12 needs input before it can continue",
136
+ data: buildSessionTransitionNotificationData({
137
+ eventType: "session.needs_input",
138
+ sessionId: "demo-agent-12",
139
+ projectId: "demo",
140
+ context: DEMO_PR_CONTEXT,
141
+ oldStatus: "working",
142
+ newStatus: "needs_input",
143
+ }),
144
+ },
145
+ "agent-exited": {
146
+ type: "session.killed",
147
+ priority: "urgent",
148
+ sessionId: "demo-agent-4",
149
+ projectId: "demo",
150
+ message: "Agent demo-agent-4 exited before completing its task",
151
+ data: buildSessionTransitionNotificationData({
152
+ eventType: "session.killed",
153
+ sessionId: "demo-agent-4",
154
+ projectId: "demo",
155
+ context: DEMO_PR_CONTEXT,
156
+ oldStatus: "working",
157
+ newStatus: "killed",
158
+ }),
159
+ },
160
+ "ci-failing": {
161
+ type: "ci.failing",
162
+ priority: "action",
163
+ sessionId: "demo-agent-19",
164
+ projectId: "demo",
165
+ message: "CI is failing on PR #1579",
166
+ data: buildCIFailureNotificationData({
167
+ sessionId: "demo-agent-19",
168
+ projectId: "demo",
169
+ context: DEMO_PR_CONTEXT,
170
+ failedChecks: DEMO_FAILED_CHECKS,
171
+ }),
172
+ },
173
+ "review-changes-requested": {
174
+ type: "review.changes_requested",
175
+ priority: "action",
176
+ sessionId: "demo-agent-21",
177
+ projectId: "demo",
178
+ message: "Review changes were requested on PR #1579",
179
+ data: (() => {
180
+ const data = buildSessionTransitionNotificationData({
181
+ eventType: "review.changes_requested",
182
+ sessionId: "demo-agent-21",
183
+ projectId: "demo",
184
+ context: DEMO_PR_CONTEXT,
185
+ oldStatus: "review_pending",
186
+ newStatus: "changes_requested",
187
+ });
188
+ data.review = {
189
+ ...(data.review ?? {}),
190
+ decision: "changes_requested",
191
+ unresolvedThreads: 3,
192
+ url: `${DEMO_PR_URL}#pullrequestreview-1`,
193
+ };
194
+ return data;
195
+ })(),
196
+ },
197
+ "approved-and-green": {
198
+ type: "reaction.triggered",
199
+ priority: "info",
200
+ sessionId: "demo-agent-23",
201
+ projectId: "demo",
202
+ message: "PR #1579 is approved and CI is green",
203
+ data: buildReactionNotificationData({
204
+ eventType: "reaction.triggered",
205
+ sessionId: "demo-agent-23",
206
+ projectId: "demo",
207
+ context: DEMO_PR_CONTEXT,
208
+ reactionKey: "approved-and-green",
209
+ action: "notify",
210
+ enrichment: {
211
+ state: "open",
212
+ ciStatus: "passing",
213
+ reviewDecision: "approved",
214
+ mergeable: true,
215
+ title: "Normalize AO notifier payloads",
216
+ hasConflicts: false,
217
+ isBehind: false,
218
+ },
219
+ }),
220
+ },
221
+ "merge-ready": {
222
+ type: "merge.ready",
223
+ priority: "action",
224
+ sessionId: "demo-agent-29",
225
+ projectId: "demo",
226
+ message: "PR #1579 is ready to merge",
227
+ data: buildSessionTransitionNotificationData({
228
+ eventType: "merge.ready",
229
+ sessionId: "demo-agent-29",
230
+ projectId: "demo",
231
+ context: DEMO_PR_CONTEXT,
232
+ oldStatus: "approved",
233
+ newStatus: "mergeable",
234
+ enrichment: {
235
+ state: "open",
236
+ ciStatus: "passing",
237
+ reviewDecision: "approved",
238
+ mergeable: true,
239
+ title: "Normalize AO notifier payloads",
240
+ hasConflicts: false,
241
+ isBehind: false,
242
+ },
243
+ }),
244
+ },
245
+ "all-complete": {
246
+ type: "summary.all_complete",
247
+ priority: "info",
248
+ sessionId: "demo-orchestrator",
249
+ projectId: "demo",
250
+ message: "All demo sessions completed successfully",
251
+ data: buildReactionNotificationData({
252
+ eventType: "reaction.triggered",
253
+ sessionId: "demo-orchestrator",
254
+ projectId: "demo",
255
+ context: DEMO_SYSTEM_CONTEXT,
256
+ reactionKey: "all-complete",
257
+ action: "notify",
258
+ }),
259
+ },
260
+ "pr-closed": {
261
+ type: "pr.closed",
262
+ priority: "warning",
263
+ sessionId: "demo-agent-31",
264
+ projectId: "demo",
265
+ message: "PR #1579 was closed without merge",
266
+ data: buildPRStateNotificationData({
267
+ eventType: "pr.closed",
268
+ sessionId: "demo-agent-31",
269
+ projectId: "demo",
270
+ context: DEMO_PR_CONTEXT,
271
+ oldPRState: "open",
272
+ newPRState: "closed",
273
+ }),
274
+ },
275
+ };
276
+ export const NOTIFY_TEST_ACTIONS = [
277
+ {
278
+ label: "Open dashboard",
279
+ url: "http://localhost:3000",
280
+ },
281
+ {
282
+ label: "View PR",
283
+ url: "https://github.com/slievr/Athene/pull/1579",
284
+ },
285
+ {
286
+ label: "Acknowledge",
287
+ callbackEndpoint: "http://localhost:3000/api/notifications/demo/ack",
288
+ },
289
+ ];
290
+ export class NotifyTestError extends Error {
291
+ code;
292
+ constructor(code, message) {
293
+ super(message);
294
+ this.name = "NotifyTestError";
295
+ this.code = code;
296
+ }
297
+ }
298
+ function assertTemplateName(name) {
299
+ const candidate = name ?? "basic";
300
+ if (isTemplateName(candidate))
301
+ return candidate;
302
+ throw new NotifyTestError("invalid_template", `Unknown template "${candidate}". Expected one of: ${NOTIFY_TEST_TEMPLATE_NAMES.join(", ")}`);
303
+ }
304
+ function isTemplateName(value) {
305
+ return NOTIFY_TEST_TEMPLATE_NAMES.includes(value);
306
+ }
307
+ function isRecord(value) {
308
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
309
+ }
310
+ function syncNotificationSubject(data, sessionId, projectId) {
311
+ if (data.schemaVersion !== 3 || !isRecord(data.subject))
312
+ return data;
313
+ return {
314
+ ...data,
315
+ subject: {
316
+ ...data.subject,
317
+ session: { id: sessionId, projectId },
318
+ },
319
+ };
320
+ }
321
+ function assertPriority(priority, source) {
322
+ if (VALID_PRIORITIES.includes(priority)) {
323
+ return priority;
324
+ }
325
+ throw new NotifyTestError("invalid_priority", `Invalid ${source} "${priority}". Expected one of: ${VALID_PRIORITIES.join(", ")}`);
326
+ }
327
+ function assertEventType(type) {
328
+ if (VALID_EVENT_TYPES.includes(type)) {
329
+ return type;
330
+ }
331
+ throw new NotifyTestError("invalid_event_type", `Invalid event type "${type}". Expected one of: ${VALID_EVENT_TYPES.join(", ")}`);
332
+ }
333
+ function uniqueRefs(refs) {
334
+ const seen = new Set();
335
+ const result = [];
336
+ for (const ref of refs) {
337
+ const normalized = ref.trim();
338
+ if (!normalized || seen.has(normalized))
339
+ continue;
340
+ seen.add(normalized);
341
+ result.push(normalized);
342
+ }
343
+ return result;
344
+ }
345
+ function refsFromConfiguredAndDefaults(config) {
346
+ return uniqueRefs([
347
+ ...Object.keys(config.notifiers ?? {}),
348
+ ...(config.defaults?.notifiers ?? []),
349
+ ]);
350
+ }
351
+ function refsFromAllKnownSources(config) {
352
+ return uniqueRefs([
353
+ ...Object.keys(config.notifiers ?? {}),
354
+ ...(config.defaults?.notifiers ?? []),
355
+ ...Object.values(config.notificationRouting ?? {}).flat(),
356
+ ]);
357
+ }
358
+ function refsFromRoute(config, priority) {
359
+ return uniqueRefs(config.notificationRouting?.[priority] ?? config.defaults?.notifiers ?? []);
360
+ }
361
+ export function createNotifyTestEvent(request = {}) {
362
+ const templateName = assertTemplateName(request.templateName);
363
+ const template = DEMO_TEMPLATES[templateName];
364
+ const priority = request.priority
365
+ ? assertPriority(request.priority, "priority")
366
+ : template.priority;
367
+ const type = request.type ? assertEventType(request.type) : template.type;
368
+ const sessionId = request.sessionId ?? template.sessionId;
369
+ const projectId = request.projectId ?? template.projectId;
370
+ const data = syncNotificationSubject({
371
+ ...template.data,
372
+ ...(request.data ?? {}),
373
+ }, sessionId, projectId);
374
+ return {
375
+ templateName,
376
+ event: {
377
+ id: `notify-test-${Date.now()}`,
378
+ type,
379
+ priority,
380
+ sessionId,
381
+ projectId,
382
+ timestamp: new Date(),
383
+ message: request.message ?? template.message,
384
+ data,
385
+ },
386
+ };
387
+ }
388
+ export function resolveNotifyTestTargets(config, eventPriority, request = {}) {
389
+ const refs = (() => {
390
+ if (request.to && request.to.length > 0) {
391
+ return uniqueRefs(request.to);
392
+ }
393
+ if (request.all) {
394
+ return refsFromAllKnownSources(config);
395
+ }
396
+ if (request.route) {
397
+ return refsFromRoute(config, assertPriority(request.route, "route"));
398
+ }
399
+ const routedRefs = refsFromRoute(config, eventPriority);
400
+ return routedRefs.length > 0 ? routedRefs : refsFromConfiguredAndDefaults(config);
401
+ })();
402
+ return refs.map((ref) => {
403
+ const target = resolveNotifierTarget(config, ref);
404
+ return {
405
+ reference: target.reference,
406
+ pluginName: target.pluginName,
407
+ };
408
+ });
409
+ }
410
+ export async function runNotifyTest(config, registry, request = {}) {
411
+ const { templateName, event } = createNotifyTestEvent(request);
412
+ const targets = resolveNotifyTestTargets(config, event.priority, request);
413
+ const actions = request.actions ? [...NOTIFY_TEST_ACTIONS] : [];
414
+ const warnings = [];
415
+ const errors = [];
416
+ const deliveries = [];
417
+ const observer = request.dryRun ? null : createProjectObserver(config, "notify-test");
418
+ if (targets.length === 0) {
419
+ errors.push("No notifier targets resolved. Configure notifiers or pass --to, --all, or --sink.");
420
+ return {
421
+ ok: false,
422
+ dryRun: Boolean(request.dryRun),
423
+ templateName,
424
+ event,
425
+ actions,
426
+ targets,
427
+ deliveries,
428
+ warnings,
429
+ errors,
430
+ };
431
+ }
432
+ for (const target of targets) {
433
+ const notifier = registry.get("notifier", target.reference) ??
434
+ registry.get("notifier", target.pluginName);
435
+ if (!notifier) {
436
+ const error = `${target.reference}: notifier plugin "${target.pluginName}" is not loaded`;
437
+ errors.push(error);
438
+ if (observer) {
439
+ recordNotificationDelivery({
440
+ observer,
441
+ event,
442
+ target,
443
+ outcome: "failure",
444
+ method: "notify",
445
+ reason: "notifier target not found",
446
+ failureKind: "target_missing",
447
+ recordActivityEvent: true,
448
+ });
449
+ }
450
+ deliveries.push({
451
+ reference: target.reference,
452
+ pluginName: target.pluginName,
453
+ status: "unresolved",
454
+ method: null,
455
+ error,
456
+ });
457
+ continue;
458
+ }
459
+ if (request.dryRun) {
460
+ deliveries.push({
461
+ reference: target.reference,
462
+ pluginName: target.pluginName,
463
+ status: "dry_run",
464
+ method: actions.length > 0 && notifier.notifyWithActions ? "notifyWithActions" : "notify",
465
+ });
466
+ continue;
467
+ }
468
+ try {
469
+ const method = actions.length > 0 && notifier.notifyWithActions ? "notifyWithActions" : "notify";
470
+ if (actions.length > 0 && notifier.notifyWithActions) {
471
+ await notifier.notifyWithActions(event, actions);
472
+ deliveries.push({
473
+ reference: target.reference,
474
+ pluginName: target.pluginName,
475
+ status: "sent",
476
+ method: "notifyWithActions",
477
+ });
478
+ }
479
+ else {
480
+ const warning = actions.length > 0
481
+ ? `${target.reference}: notifyWithActions() is unavailable; sent with notify()`
482
+ : undefined;
483
+ if (warning)
484
+ warnings.push(warning);
485
+ await notifier.notify(event);
486
+ deliveries.push({
487
+ reference: target.reference,
488
+ pluginName: target.pluginName,
489
+ status: "sent",
490
+ method: "notify",
491
+ warning,
492
+ });
493
+ }
494
+ if (observer) {
495
+ recordNotificationDelivery({
496
+ observer,
497
+ event,
498
+ target,
499
+ outcome: "success",
500
+ method,
501
+ });
502
+ }
503
+ }
504
+ catch (err) {
505
+ const error = `${target.reference}: ${err instanceof Error ? err.message : String(err)}`;
506
+ const method = actions.length > 0 && notifier.notifyWithActions ? "notifyWithActions" : "notify";
507
+ errors.push(error);
508
+ if (observer) {
509
+ recordNotificationDelivery({
510
+ observer,
511
+ event,
512
+ target,
513
+ outcome: "failure",
514
+ method,
515
+ reason: err instanceof Error ? err.message : String(err),
516
+ failureKind: "delivery_failed",
517
+ recordActivityEvent: true,
518
+ });
519
+ }
520
+ deliveries.push({
521
+ reference: target.reference,
522
+ pluginName: target.pluginName,
523
+ status: "failed",
524
+ method,
525
+ error,
526
+ });
527
+ }
528
+ }
529
+ return {
530
+ ok: errors.length === 0,
531
+ dryRun: Boolean(request.dryRun),
532
+ templateName,
533
+ event,
534
+ actions,
535
+ targets,
536
+ deliveries,
537
+ warnings,
538
+ errors,
539
+ };
540
+ }
541
+ export function parseNotifyDataJson(input) {
542
+ if (!input)
543
+ return undefined;
544
+ let parsed;
545
+ try {
546
+ parsed = JSON.parse(input);
547
+ }
548
+ catch (err) {
549
+ const message = err instanceof Error ? err.message : String(err);
550
+ throw new NotifyTestError("invalid_json", `Invalid --data JSON: ${message}`);
551
+ }
552
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
553
+ throw new NotifyTestError("invalid_json", "--data must be a JSON object");
554
+ }
555
+ return parsed;
556
+ }
557
+ export function parseNotifyRefs(input) {
558
+ if (!input)
559
+ return undefined;
560
+ return uniqueRefs(input.split(","));
561
+ }
562
+ export function parseSinkPort(input) {
563
+ if (input === undefined)
564
+ return undefined;
565
+ if (input === true)
566
+ return 0;
567
+ const port = Number(input);
568
+ if (!Number.isInteger(port) || port < 0 || port > 65535) {
569
+ throw new NotifyTestError("invalid_sink_port", `Invalid --sink port "${input}"`);
570
+ }
571
+ return port;
572
+ }
573
+ export function addSinkNotifierConfig(config, sinkUrl) {
574
+ return {
575
+ ...config,
576
+ defaults: {
577
+ ...config.defaults,
578
+ notifiers: uniqueRefs(["sink", ...(config.defaults?.notifiers ?? [])]),
579
+ },
580
+ notifiers: {
581
+ ...(config.notifiers ?? {}),
582
+ sink: {
583
+ plugin: "webhook",
584
+ url: sinkUrl,
585
+ retries: 0,
586
+ },
587
+ },
588
+ };
589
+ }
590
+ function readRequestBody(req) {
591
+ return new Promise((resolve, reject) => {
592
+ const chunks = [];
593
+ req.on("data", (chunk) => chunks.push(chunk));
594
+ req.on("end", () => resolve(Buffer.concat(chunks).toString("utf-8")));
595
+ req.on("error", reject);
596
+ });
597
+ }
598
+ function respond(res, statusCode, body = "") {
599
+ res.statusCode = statusCode;
600
+ if (body) {
601
+ res.setHeader("Content-Type", "text/plain; charset=utf-8");
602
+ }
603
+ res.end(body);
604
+ }
605
+ export async function startNotifySink(port = 0) {
606
+ const requests = [];
607
+ const waiters = [];
608
+ const server = createServer(async (req, res) => {
609
+ if (req.method !== "POST") {
610
+ respond(res, 405, "method not allowed");
611
+ return;
612
+ }
613
+ const body = await readRequestBody(req);
614
+ const json = (() => {
615
+ try {
616
+ return body ? JSON.parse(body) : null;
617
+ }
618
+ catch {
619
+ return null;
620
+ }
621
+ })();
622
+ const request = {
623
+ method: req.method,
624
+ url: req.url ?? "/",
625
+ headers: req.headers,
626
+ body,
627
+ json,
628
+ };
629
+ requests.push(request);
630
+ const pending = waiters.splice(0);
631
+ for (const waiter of pending)
632
+ waiter(request);
633
+ respond(res, 204);
634
+ });
635
+ await new Promise((resolve, reject) => {
636
+ server.once("error", reject);
637
+ server.listen(port, "127.0.0.1", () => {
638
+ server.off("error", reject);
639
+ resolve();
640
+ });
641
+ });
642
+ const address = server.address();
643
+ return {
644
+ port: address.port,
645
+ url: `http://127.0.0.1:${address.port}`,
646
+ requests,
647
+ waitForRequest(timeoutMs = 1000) {
648
+ if (requests[0])
649
+ return Promise.resolve(requests[0]);
650
+ return new Promise((resolve) => {
651
+ const waiter = (request) => {
652
+ clearTimeout(timer);
653
+ resolve(request);
654
+ };
655
+ const timer = setTimeout(() => {
656
+ const index = waiters.indexOf(waiter);
657
+ if (index >= 0)
658
+ waiters.splice(index, 1);
659
+ resolve(null);
660
+ }, timeoutMs);
661
+ waiters.push(waiter);
662
+ });
663
+ },
664
+ close() {
665
+ return new Promise((resolve, reject) => {
666
+ closeServer(server, (err) => (err ? reject(err) : resolve()));
667
+ });
668
+ },
669
+ };
670
+ }
671
+ function closeServer(server, callback) {
672
+ server.close((err) => callback(err ?? undefined));
673
+ }
674
+ //# sourceMappingURL=notify-test.js.map