@farmslot/protocol 0.5.0 → 0.6.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 (325) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +43 -45
  3. package/dist/{agent-roles.d.ts → agents/roles.d.ts} +2 -2
  4. package/dist/{agent-roles.d.ts.map → agents/roles.d.ts.map} +1 -1
  5. package/dist/{agent-roles.js → agents/roles.js} +2 -2
  6. package/dist/{agent-roles.js.map → agents/roles.js.map} +1 -1
  7. package/dist/contracts/agents.d.ts.map +1 -0
  8. package/dist/contracts/agents.js.map +1 -0
  9. package/dist/contracts/backlog.d.ts.map +1 -0
  10. package/dist/contracts/backlog.js.map +1 -0
  11. package/dist/contracts/chat.d.ts.map +1 -0
  12. package/dist/contracts/chat.js.map +1 -0
  13. package/dist/contracts/common.d.ts.map +1 -0
  14. package/dist/{types → contracts}/common.js.map +1 -1
  15. package/dist/contracts/config.d.ts.map +1 -0
  16. package/dist/{types → contracts}/config.js.map +1 -1
  17. package/dist/contracts/dispatch.d.ts.map +1 -0
  18. package/dist/{types → contracts}/dispatch.js.map +1 -1
  19. package/dist/contracts/evals.d.ts.map +1 -0
  20. package/dist/contracts/evals.js.map +1 -0
  21. package/dist/contracts/family.d.ts.map +1 -0
  22. package/dist/contracts/family.js.map +1 -0
  23. package/dist/contracts/index.d.ts.map +1 -0
  24. package/dist/contracts/index.js.map +1 -0
  25. package/dist/contracts/recipes.d.ts.map +1 -0
  26. package/dist/contracts/recipes.js.map +1 -0
  27. package/dist/contracts/resources.d.ts.map +1 -0
  28. package/dist/contracts/resources.js.map +1 -0
  29. package/dist/contracts/reviews.d.ts.map +1 -0
  30. package/dist/contracts/reviews.js.map +1 -0
  31. package/dist/{types → contracts}/runs.d.ts +1 -1
  32. package/dist/contracts/runs.d.ts.map +1 -0
  33. package/dist/contracts/runs.js.map +1 -0
  34. package/dist/contracts/slots.d.ts.map +1 -0
  35. package/dist/{types → contracts}/slots.js.map +1 -1
  36. package/dist/contracts/task.d.ts.map +1 -0
  37. package/dist/{methods → contracts}/task.js.map +1 -1
  38. package/dist/{types → contracts}/terminal.d.ts +1 -1
  39. package/dist/contracts/terminal.d.ts.map +1 -0
  40. package/dist/{methods → contracts}/terminal.js.map +1 -1
  41. package/dist/contracts/workspace.d.ts.map +1 -0
  42. package/dist/{methods → contracts}/workspace.js.map +1 -1
  43. package/dist/index.d.ts +12 -12
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +12 -12
  46. package/dist/index.js.map +1 -1
  47. package/dist/{github-ref.d.ts → integrations/github-ref.d.ts} +1 -1
  48. package/dist/integrations/github-ref.d.ts.map +1 -0
  49. package/dist/integrations/github-ref.js.map +1 -0
  50. package/dist/recipe/artifact.d.ts +8 -0
  51. package/dist/recipe/artifact.d.ts.map +1 -0
  52. package/dist/recipe/artifact.js +98 -0
  53. package/dist/recipe/artifact.js.map +1 -0
  54. package/dist/{recipe-compat.d.ts → recipe/common.d.ts} +22 -21
  55. package/dist/recipe/common.d.ts.map +1 -0
  56. package/dist/recipe/common.js +79 -0
  57. package/dist/recipe/common.js.map +1 -0
  58. package/dist/recipe/document.d.ts +4 -0
  59. package/dist/recipe/document.d.ts.map +1 -0
  60. package/dist/recipe/document.js +53 -0
  61. package/dist/recipe/document.js.map +1 -0
  62. package/dist/recipe/index.d.ts +6 -0
  63. package/dist/recipe/index.d.ts.map +1 -0
  64. package/dist/recipe/index.js +6 -0
  65. package/dist/recipe/index.js.map +1 -0
  66. package/dist/recipe/manifest.d.ts +5 -0
  67. package/dist/recipe/manifest.d.ts.map +1 -0
  68. package/dist/recipe/manifest.js +211 -0
  69. package/dist/recipe/manifest.js.map +1 -0
  70. package/dist/recipe/workflow.d.ts +29 -0
  71. package/dist/recipe/workflow.d.ts.map +1 -0
  72. package/dist/{recipe-compat.js → recipe/workflow.js} +9 -455
  73. package/dist/recipe/workflow.js.map +1 -0
  74. package/dist/{step-io.d.ts → recipes/step-io.d.ts} +1 -1
  75. package/dist/recipes/step-io.d.ts.map +1 -0
  76. package/dist/recipes/step-io.js.map +1 -0
  77. package/dist/rpc/auth.d.ts.map +1 -0
  78. package/dist/rpc/auth.js.map +1 -0
  79. package/dist/{methods → rpc}/backlog.d.ts +2 -2
  80. package/dist/rpc/backlog.d.ts.map +1 -0
  81. package/dist/rpc/backlog.js.map +1 -0
  82. package/dist/{methods → rpc}/chat.d.ts +12 -12
  83. package/dist/rpc/chat.d.ts.map +1 -0
  84. package/dist/rpc/chat.js.map +1 -0
  85. package/dist/{methods → rpc}/config.d.ts +1 -1
  86. package/dist/rpc/config.d.ts.map +1 -0
  87. package/dist/rpc/config.js.map +1 -0
  88. package/dist/rpc/copilot.d.ts.map +1 -0
  89. package/dist/rpc/copilot.js.map +1 -0
  90. package/dist/{methods → rpc}/decisions.d.ts +1 -1
  91. package/dist/rpc/decisions.d.ts.map +1 -0
  92. package/dist/{methods → rpc}/decisions.js.map +1 -1
  93. package/dist/{methods → rpc}/diagnostics.d.ts +1 -1
  94. package/dist/rpc/diagnostics.d.ts.map +1 -0
  95. package/dist/{methods → rpc}/diagnostics.js.map +1 -1
  96. package/dist/{methods → rpc}/dispatch.d.ts +12 -12
  97. package/dist/rpc/dispatch.d.ts.map +1 -0
  98. package/dist/rpc/dispatch.js.map +1 -0
  99. package/dist/{methods → rpc}/eval.d.ts +2 -2
  100. package/dist/rpc/eval.d.ts.map +1 -0
  101. package/dist/rpc/eval.js.map +1 -0
  102. package/dist/{methods → rpc}/fleet.d.ts +1 -1
  103. package/dist/rpc/fleet.d.ts.map +1 -0
  104. package/dist/rpc/fleet.js.map +1 -0
  105. package/dist/{methods → rpc}/fs.d.ts +1 -1
  106. package/dist/rpc/fs.d.ts.map +1 -0
  107. package/dist/{methods → rpc}/fs.js.map +1 -1
  108. package/dist/{methods → rpc}/git.d.ts +2 -2
  109. package/dist/rpc/git.d.ts.map +1 -0
  110. package/dist/{methods → rpc}/git.js.map +1 -1
  111. package/dist/rpc/index.d.ts.map +1 -0
  112. package/dist/{methods → rpc}/index.js +1 -1
  113. package/dist/rpc/index.js.map +1 -0
  114. package/dist/{methods → rpc}/intelligence.d.ts +3 -3
  115. package/dist/rpc/intelligence.d.ts.map +1 -0
  116. package/dist/rpc/intelligence.js.map +1 -0
  117. package/dist/rpc/nodes.d.ts.map +1 -0
  118. package/dist/{methods → rpc}/nodes.js.map +1 -1
  119. package/dist/{methods → rpc}/pr.d.ts +2 -2
  120. package/dist/{methods → rpc}/pr.d.ts.map +1 -1
  121. package/dist/{methods → rpc}/pr.js.map +1 -1
  122. package/dist/{methods → rpc}/registry.d.ts.map +1 -1
  123. package/dist/rpc/registry.js.map +1 -0
  124. package/dist/{methods → rpc}/resources.d.ts +5 -5
  125. package/dist/rpc/resources.d.ts.map +1 -0
  126. package/dist/rpc/resources.js.map +1 -0
  127. package/dist/{methods → rpc}/run.d.ts +20 -20
  128. package/dist/rpc/run.d.ts.map +1 -0
  129. package/dist/rpc/run.js.map +1 -0
  130. package/dist/{methods → rpc}/search.d.ts +1 -1
  131. package/dist/rpc/search.d.ts.map +1 -0
  132. package/dist/{methods → rpc}/search.js.map +1 -1
  133. package/dist/{methods → rpc}/slot.d.ts +5 -5
  134. package/dist/rpc/slot.d.ts.map +1 -0
  135. package/dist/rpc/slot.js.map +1 -0
  136. package/dist/{methods → rpc}/task.d.ts +2 -2
  137. package/dist/rpc/task.d.ts.map +1 -0
  138. package/dist/{types → rpc}/task.js.map +1 -1
  139. package/dist/{methods → rpc}/terminal.d.ts +1 -1
  140. package/dist/rpc/terminal.d.ts.map +1 -0
  141. package/dist/{types → rpc}/terminal.js.map +1 -1
  142. package/dist/rpc/tmux.d.ts.map +1 -0
  143. package/dist/{methods → rpc}/tmux.js.map +1 -1
  144. package/dist/{methods → rpc}/workspace.d.ts +1 -1
  145. package/dist/rpc/workspace.d.ts.map +1 -0
  146. package/dist/{types → rpc}/workspace.js.map +1 -1
  147. package/dist/{run-family-readiness.d.ts → runs/family-readiness.d.ts} +3 -3
  148. package/dist/runs/family-readiness.d.ts.map +1 -0
  149. package/dist/{run-family-readiness.js → runs/family-readiness.js} +2 -2
  150. package/dist/runs/family-readiness.js.map +1 -0
  151. package/dist/{surfaces.d.ts → surfaces/command-center.d.ts} +2 -2
  152. package/dist/surfaces/command-center.d.ts.map +1 -0
  153. package/dist/{surfaces.js → surfaces/command-center.js} +1 -1
  154. package/dist/surfaces/command-center.js.map +1 -0
  155. package/dist/{events.d.ts → transport/events.d.ts} +4 -4
  156. package/dist/transport/events.d.ts.map +1 -0
  157. package/dist/transport/events.js.map +1 -0
  158. package/dist/transport/frames.d.ts.map +1 -0
  159. package/dist/transport/frames.js.map +1 -0
  160. package/dist/{signal.d.ts → transport/signal.d.ts} +1 -1
  161. package/dist/transport/signal.d.ts.map +1 -0
  162. package/dist/transport/signal.js.map +1 -0
  163. package/dist/{tmux-worker-watchlist.d.ts → workers/tmux-worker-watchlist.d.ts} +1 -1
  164. package/dist/workers/tmux-worker-watchlist.d.ts.map +1 -0
  165. package/dist/workers/tmux-worker-watchlist.js.map +1 -0
  166. package/package.json +271 -55
  167. package/dist/events.d.ts.map +0 -1
  168. package/dist/events.js.map +0 -1
  169. package/dist/frames.d.ts.map +0 -1
  170. package/dist/frames.js.map +0 -1
  171. package/dist/github-ref.d.ts.map +0 -1
  172. package/dist/github-ref.js.map +0 -1
  173. package/dist/methods/auth.d.ts.map +0 -1
  174. package/dist/methods/auth.js.map +0 -1
  175. package/dist/methods/backlog.d.ts.map +0 -1
  176. package/dist/methods/backlog.js.map +0 -1
  177. package/dist/methods/chat.d.ts.map +0 -1
  178. package/dist/methods/chat.js.map +0 -1
  179. package/dist/methods/config.d.ts.map +0 -1
  180. package/dist/methods/config.js.map +0 -1
  181. package/dist/methods/copilot.d.ts.map +0 -1
  182. package/dist/methods/copilot.js.map +0 -1
  183. package/dist/methods/decisions.d.ts.map +0 -1
  184. package/dist/methods/diagnostics.d.ts.map +0 -1
  185. package/dist/methods/dispatch.d.ts.map +0 -1
  186. package/dist/methods/dispatch.js.map +0 -1
  187. package/dist/methods/eval.d.ts.map +0 -1
  188. package/dist/methods/eval.js.map +0 -1
  189. package/dist/methods/fleet.d.ts.map +0 -1
  190. package/dist/methods/fleet.js.map +0 -1
  191. package/dist/methods/fs.d.ts.map +0 -1
  192. package/dist/methods/git.d.ts.map +0 -1
  193. package/dist/methods/index.d.ts.map +0 -1
  194. package/dist/methods/index.js.map +0 -1
  195. package/dist/methods/intelligence.d.ts.map +0 -1
  196. package/dist/methods/intelligence.js.map +0 -1
  197. package/dist/methods/nodes.d.ts.map +0 -1
  198. package/dist/methods/registry.js.map +0 -1
  199. package/dist/methods/resources.d.ts.map +0 -1
  200. package/dist/methods/resources.js.map +0 -1
  201. package/dist/methods/run.d.ts.map +0 -1
  202. package/dist/methods/run.js.map +0 -1
  203. package/dist/methods/search.d.ts.map +0 -1
  204. package/dist/methods/slot.d.ts.map +0 -1
  205. package/dist/methods/slot.js.map +0 -1
  206. package/dist/methods/task.d.ts.map +0 -1
  207. package/dist/methods/terminal.d.ts.map +0 -1
  208. package/dist/methods/tmux.d.ts.map +0 -1
  209. package/dist/methods/workspace.d.ts.map +0 -1
  210. package/dist/methods.d.ts +0 -2
  211. package/dist/methods.d.ts.map +0 -1
  212. package/dist/methods.js +0 -3
  213. package/dist/methods.js.map +0 -1
  214. package/dist/recipe-compat.d.ts.map +0 -1
  215. package/dist/recipe-compat.js.map +0 -1
  216. package/dist/run-family-readiness.d.ts.map +0 -1
  217. package/dist/run-family-readiness.js.map +0 -1
  218. package/dist/signal.d.ts.map +0 -1
  219. package/dist/signal.js.map +0 -1
  220. package/dist/step-io.d.ts.map +0 -1
  221. package/dist/step-io.js.map +0 -1
  222. package/dist/surfaces.d.ts.map +0 -1
  223. package/dist/surfaces.js.map +0 -1
  224. package/dist/tmux-worker-watchlist.d.ts.map +0 -1
  225. package/dist/tmux-worker-watchlist.js.map +0 -1
  226. package/dist/types/agents.d.ts.map +0 -1
  227. package/dist/types/agents.js.map +0 -1
  228. package/dist/types/backlog.d.ts.map +0 -1
  229. package/dist/types/backlog.js.map +0 -1
  230. package/dist/types/chat.d.ts.map +0 -1
  231. package/dist/types/chat.js.map +0 -1
  232. package/dist/types/common.d.ts.map +0 -1
  233. package/dist/types/config.d.ts.map +0 -1
  234. package/dist/types/dispatch.d.ts.map +0 -1
  235. package/dist/types/evals.d.ts.map +0 -1
  236. package/dist/types/evals.js.map +0 -1
  237. package/dist/types/family.d.ts.map +0 -1
  238. package/dist/types/family.js.map +0 -1
  239. package/dist/types/index.d.ts.map +0 -1
  240. package/dist/types/index.js.map +0 -1
  241. package/dist/types/recipes.d.ts.map +0 -1
  242. package/dist/types/recipes.js.map +0 -1
  243. package/dist/types/resources.d.ts.map +0 -1
  244. package/dist/types/resources.js.map +0 -1
  245. package/dist/types/reviews.d.ts.map +0 -1
  246. package/dist/types/reviews.js.map +0 -1
  247. package/dist/types/runs.d.ts.map +0 -1
  248. package/dist/types/runs.js.map +0 -1
  249. package/dist/types/slots.d.ts.map +0 -1
  250. package/dist/types/task.d.ts.map +0 -1
  251. package/dist/types/terminal.d.ts.map +0 -1
  252. package/dist/types/workspace.d.ts.map +0 -1
  253. package/dist/types.d.ts +0 -2
  254. package/dist/types.d.ts.map +0 -1
  255. package/dist/types.js +0 -3
  256. package/dist/types.js.map +0 -1
  257. /package/dist/{types → contracts}/agents.d.ts +0 -0
  258. /package/dist/{types → contracts}/agents.js +0 -0
  259. /package/dist/{types → contracts}/backlog.d.ts +0 -0
  260. /package/dist/{types → contracts}/backlog.js +0 -0
  261. /package/dist/{types → contracts}/chat.d.ts +0 -0
  262. /package/dist/{types → contracts}/chat.js +0 -0
  263. /package/dist/{types → contracts}/common.d.ts +0 -0
  264. /package/dist/{types → contracts}/common.js +0 -0
  265. /package/dist/{types → contracts}/config.d.ts +0 -0
  266. /package/dist/{types → contracts}/config.js +0 -0
  267. /package/dist/{types → contracts}/dispatch.d.ts +0 -0
  268. /package/dist/{types → contracts}/dispatch.js +0 -0
  269. /package/dist/{types → contracts}/evals.d.ts +0 -0
  270. /package/dist/{types → contracts}/evals.js +0 -0
  271. /package/dist/{types → contracts}/family.d.ts +0 -0
  272. /package/dist/{types → contracts}/family.js +0 -0
  273. /package/dist/{types → contracts}/index.d.ts +0 -0
  274. /package/dist/{types → contracts}/index.js +0 -0
  275. /package/dist/{types → contracts}/recipes.d.ts +0 -0
  276. /package/dist/{types → contracts}/recipes.js +0 -0
  277. /package/dist/{types → contracts}/resources.d.ts +0 -0
  278. /package/dist/{types → contracts}/resources.js +0 -0
  279. /package/dist/{types → contracts}/reviews.d.ts +0 -0
  280. /package/dist/{types → contracts}/reviews.js +0 -0
  281. /package/dist/{types → contracts}/runs.js +0 -0
  282. /package/dist/{types → contracts}/slots.d.ts +0 -0
  283. /package/dist/{types → contracts}/slots.js +0 -0
  284. /package/dist/{types → contracts}/task.d.ts +0 -0
  285. /package/dist/{methods → contracts}/task.js +0 -0
  286. /package/dist/{methods → contracts}/terminal.js +0 -0
  287. /package/dist/{types → contracts}/workspace.d.ts +0 -0
  288. /package/dist/{methods → contracts}/workspace.js +0 -0
  289. /package/dist/{github-ref.js → integrations/github-ref.js} +0 -0
  290. /package/dist/{step-io.js → recipes/step-io.js} +0 -0
  291. /package/dist/{methods → rpc}/auth.d.ts +0 -0
  292. /package/dist/{methods → rpc}/auth.js +0 -0
  293. /package/dist/{methods → rpc}/backlog.js +0 -0
  294. /package/dist/{methods → rpc}/chat.js +0 -0
  295. /package/dist/{methods → rpc}/config.js +0 -0
  296. /package/dist/{methods → rpc}/copilot.d.ts +0 -0
  297. /package/dist/{methods → rpc}/copilot.js +0 -0
  298. /package/dist/{methods → rpc}/decisions.js +0 -0
  299. /package/dist/{methods → rpc}/diagnostics.js +0 -0
  300. /package/dist/{methods → rpc}/dispatch.js +0 -0
  301. /package/dist/{methods → rpc}/eval.js +0 -0
  302. /package/dist/{methods → rpc}/fleet.js +0 -0
  303. /package/dist/{methods → rpc}/fs.js +0 -0
  304. /package/dist/{methods → rpc}/git.js +0 -0
  305. /package/dist/{methods → rpc}/index.d.ts +0 -0
  306. /package/dist/{methods → rpc}/intelligence.js +0 -0
  307. /package/dist/{methods → rpc}/nodes.d.ts +0 -0
  308. /package/dist/{methods → rpc}/nodes.js +0 -0
  309. /package/dist/{methods → rpc}/pr.js +0 -0
  310. /package/dist/{methods → rpc}/registry.d.ts +0 -0
  311. /package/dist/{methods → rpc}/registry.js +0 -0
  312. /package/dist/{methods → rpc}/resources.js +0 -0
  313. /package/dist/{methods → rpc}/run.js +0 -0
  314. /package/dist/{methods → rpc}/search.js +0 -0
  315. /package/dist/{methods → rpc}/slot.js +0 -0
  316. /package/dist/{types → rpc}/task.js +0 -0
  317. /package/dist/{types → rpc}/terminal.js +0 -0
  318. /package/dist/{methods → rpc}/tmux.d.ts +0 -0
  319. /package/dist/{methods → rpc}/tmux.js +0 -0
  320. /package/dist/{types → rpc}/workspace.js +0 -0
  321. /package/dist/{events.js → transport/events.js} +0 -0
  322. /package/dist/{frames.d.ts → transport/frames.d.ts} +0 -0
  323. /package/dist/{frames.js → transport/frames.js} +0 -0
  324. /package/dist/{signal.js → transport/signal.js} +0 -0
  325. /package/dist/{tmux-worker-watchlist.js → workers/tmux-worker-watchlist.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export * from './agent-roles.js';
2
- export * from './events.js';
3
- export * from './frames.js';
4
- export * from './github-ref.js';
5
- export * from './methods.js';
6
- export * from './recipe-compat.js';
7
- export * from './run-family-readiness.js';
8
- export * from './signal.js';
9
- export * from './step-io.js';
10
- export * from './surfaces.js';
11
- export * from './tmux-worker-watchlist.js';
12
- export * from './types.js';
1
+ export * from './agents/roles.js';
2
+ export * from './contracts/index.js';
3
+ export * from './integrations/github-ref.js';
4
+ export * from './recipe/index.js';
5
+ export * from './recipes/step-io.js';
6
+ export * from './rpc/index.js';
7
+ export * from './runs/family-readiness.js';
8
+ export * from './surfaces/command-center.js';
9
+ export * from './transport/events.js';
10
+ export * from './transport/frames.js';
11
+ export * from './transport/signal.js';
13
12
  export { PROTOCOL_VERSION } from './version.js';
13
+ export * from './workers/tmux-worker-watchlist.js';
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,cAAc,oCAAoC,CAAC"}
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- export * from './agent-roles.js';
2
- export * from './events.js';
3
- export * from './frames.js';
4
- export * from './github-ref.js';
5
- export * from './methods.js';
6
- export * from './recipe-compat.js';
7
- export * from './run-family-readiness.js';
8
- export * from './signal.js';
9
- export * from './step-io.js';
10
- export * from './surfaces.js';
11
- export * from './tmux-worker-watchlist.js';
12
- export * from './types.js';
1
+ export * from './agents/roles.js';
2
+ export * from './contracts/index.js';
3
+ export * from './integrations/github-ref.js';
4
+ export * from './recipe/index.js';
5
+ export * from './recipes/step-io.js';
6
+ export * from './rpc/index.js';
7
+ export * from './runs/family-readiness.js';
8
+ export * from './surfaces/command-center.js';
9
+ export * from './transport/events.js';
10
+ export * from './transport/frames.js';
11
+ export * from './transport/signal.js';
13
12
  export { PROTOCOL_VERSION } from './version.js';
13
+ export * from './workers/tmux-worker-watchlist.js';
14
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,cAAc,oCAAoC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { FlowType } from './types.js';
1
+ import type { FlowType } from '../contracts/index.js';
2
2
  export interface GitHubRef {
3
3
  repo: string;
4
4
  number: number;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-ref.d.ts","sourceRoot":"","sources":["../../src/integrations/github-ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAID,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAW/E;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,MAAM,CAE7E;AAED,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,QAAQ,CAIpD,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,IAAI,CACT;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACpE,UAAU,GAAG,YAAY,GAAG,UAAU,CACvC,GACA,MAAM,GAAG,IAAI,CAIf"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-ref.js","sourceRoot":"","sources":["../../src/integrations/github-ref.ts"],"names":[],"mappings":"AAQA,MAAM,kBAAkB,GAAG,4CAA4C,CAAC;AAExE,MAAM,UAAU,cAAc,CAAC,GAA8B;IAC3D,MAAM,KAAK,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI;QACrF,OAAO,IAAI,CAAC;IACd,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;QACd,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;KAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAuC;IACnE,OAAO,sBAAsB,GAAG,CAAC,IAAI,SAAS,GAAG,CAAC,MAAM,EAAE,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAA0B,IAAI,GAAG,CAAC;IAChE,WAAW;IACX,aAAa;IACb,YAAY;CACb,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAClC,KAGC;IAED,IAAI,KAAK,CAAC,QAAQ,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC,QAAQ,CAAC;IAClD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,OAAO,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,IAAI,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type RecipeArtifactPackageInput, type RecipeValidationResult } from './common.js';
2
+ export declare function validateArtifactManifestDocument(manifest: unknown, options?: {
3
+ recipe?: unknown;
4
+ artifactPaths?: readonly string[];
5
+ }): RecipeValidationResult;
6
+ export declare function validateRecipeArtifactPackage(input: RecipeArtifactPackageInput): RecipeValidationResult;
7
+ export declare function mergeRecipeValidationResults(results: readonly RecipeValidationResult[]): RecipeValidationResult;
8
+ //# sourceMappingURL=artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/recipe/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAE5B,MAAM,aAAa,CAAC;AAGrB,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,OAAO,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GACpE,sBAAsB,CAuJxB;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,0BAA0B,GAChC,sBAAsB,CAsCxB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,SAAS,sBAAsB,EAAE,GACzC,sBAAsB,CAMxB"}
@@ -0,0 +1,98 @@
1
+ import { addFinding, ARTIFACT_TYPES, createContext, finishResult, isNonEmptyString, isRecord, isRelativeArtifactPath, TERMINAL_STATUSES, } from './common.js';
2
+ import { getRecipeWorkflowNodeIds } from './workflow.js';
3
+ export function validateArtifactManifestDocument(manifest, options = {}) {
4
+ const ctx = createContext();
5
+ if (!isRecord(manifest)) {
6
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_document', '$', 'artifact-manifest.json must be a JSON object.');
7
+ return finishResult(ctx);
8
+ }
9
+ if (manifest.version !== 1) {
10
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_version', 'version', 'artifact-manifest.json version must equal 1.');
11
+ }
12
+ if (manifest.runStatus != null &&
13
+ (typeof manifest.runStatus !== 'string' || !TERMINAL_STATUSES.has(manifest.runStatus))) {
14
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_run_status', 'runStatus', 'runStatus must be pass, fail, or unknown when present.');
15
+ }
16
+ const artifacts = manifest.artifacts;
17
+ if (!Array.isArray(artifacts)) {
18
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_artifacts', 'artifacts', 'artifact-manifest.json must include an artifacts array.');
19
+ return finishResult(ctx);
20
+ }
21
+ const nodeIds = new Set(getRecipeWorkflowNodeIds(options.recipe));
22
+ const artifactPathSet = options.artifactPaths ? new Set(options.artifactPaths) : null;
23
+ artifacts.forEach((artifact, index) => {
24
+ const path = `artifacts[${index}]`;
25
+ if (!isRecord(artifact)) {
26
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_artifact', path, 'Artifact entries must be objects.');
27
+ return;
28
+ }
29
+ if (!isNonEmptyString(artifact.path)) {
30
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_path', `${path}.path`, 'Artifact path must be a non-empty string.');
31
+ }
32
+ else {
33
+ if (!isRelativeArtifactPath(artifact.path)) {
34
+ addFinding(ctx, 'error', 'artifact_manifest.unsafe_path', `${path}.path`, 'Artifact path must be relative and must not contain .. segments.');
35
+ }
36
+ if (artifactPathSet && !artifactPathSet.has(artifact.path)) {
37
+ addFinding(ctx, 'error', 'artifact_manifest.missing_file', `${path}.path`, `Artifact file ${artifact.path} was not found in the provided artifact path list.`);
38
+ }
39
+ }
40
+ if (!isNonEmptyString(artifact.type)) {
41
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_type', `${path}.type`, 'Artifact type must be a non-empty string.');
42
+ }
43
+ else if (!ARTIFACT_TYPES.has(artifact.type)) {
44
+ addFinding(ctx, 'warning', 'artifact_manifest.unknown_type', `${path}.type`, `Artifact type ${artifact.type} is not in the v1 core type vocabulary.`);
45
+ }
46
+ for (const optionalField of ['label', 'nodeId', 'mimeType', 'category', 'proofTarget']) {
47
+ const value = artifact[optionalField];
48
+ if (value != null && typeof value !== 'string') {
49
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_optional_field', `${path}.${optionalField}`, `${optionalField} must be a string when present.`);
50
+ }
51
+ }
52
+ if (artifact.covers != null) {
53
+ if (!Array.isArray(artifact.covers) ||
54
+ artifact.covers.some((cover) => !isNonEmptyString(cover))) {
55
+ addFinding(ctx, 'error', 'artifact_manifest.invalid_covers', `${path}.covers`, 'covers must be an array of non-empty strings when present.');
56
+ }
57
+ }
58
+ if (typeof artifact.nodeId === 'string' && nodeIds.size > 0 && !nodeIds.has(artifact.nodeId)) {
59
+ addFinding(ctx, 'warning', 'artifact_manifest.unknown_node', `${path}.nodeId`, `Artifact references nodeId ${artifact.nodeId}, which is not present in the recipe graph.`);
60
+ }
61
+ });
62
+ return finishResult(ctx);
63
+ }
64
+ export function validateRecipeArtifactPackage(input) {
65
+ const ctx = createContext();
66
+ const artifactPaths = new Set(input.artifactPaths ?? []);
67
+ if (input.artifactPaths != null) {
68
+ const requiredPaths = ['summary.json', 'trace.json'];
69
+ if (input.manifest != null)
70
+ requiredPaths.push('artifact-manifest.json');
71
+ if (input.recipe != null)
72
+ requiredPaths.push('recipe.json');
73
+ for (const requiredPath of requiredPaths) {
74
+ if (!artifactPaths.has(requiredPath)) {
75
+ addFinding(ctx, 'error', 'artifact_package.missing_required_file', requiredPath, `Recipe artifact package must include ${requiredPath}.`);
76
+ }
77
+ }
78
+ }
79
+ if (input.manifest == null) {
80
+ addFinding(ctx, 'error', 'artifact_package.missing_manifest', 'artifact-manifest.json', 'Recipe artifact package must include artifact-manifest.json.');
81
+ }
82
+ else {
83
+ const manifestResult = validateArtifactManifestDocument(input.manifest, {
84
+ recipe: input.recipe,
85
+ artifactPaths: input.artifactPaths,
86
+ });
87
+ ctx.findings.push(...manifestResult.findings);
88
+ }
89
+ return finishResult(ctx);
90
+ }
91
+ export function mergeRecipeValidationResults(results) {
92
+ const ctx = createContext();
93
+ for (const result of results) {
94
+ ctx.findings.push(...result.findings);
95
+ }
96
+ return finishResult(ctx);
97
+ }
98
+ //# sourceMappingURL=artifact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../src/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,QAAQ,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAA0C;IAE1C,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
@@ -51,21 +51,24 @@ export interface RecipeActionManifestDocument {
51
51
  pre_conditions?: RecipePreconditionDeclaration[];
52
52
  native_bindings?: RecipeNativeBindingDeclaration[];
53
53
  }
54
- export type RecipeCompatibilitySeverity = 'error' | 'warning';
55
- export type RecipeCompatibilityStatus = 'v1-compatible' | 'legacy-compatible' | 'invalid';
56
- export interface RecipeCompatibilityFinding {
57
- severity: RecipeCompatibilitySeverity;
54
+ export declare const PLAYBACK_MODES: Set<string>;
55
+ export declare const TERMINAL_STATUSES: Set<string>;
56
+ export declare const ARTIFACT_TYPES: Set<string>;
57
+ export declare const OFFICIAL_ACTION_SET: Set<string>;
58
+ export type RecipeValidationSeverity = 'error' | 'warning';
59
+ export type RecipeValidationStatus = 'valid' | 'invalid';
60
+ export interface RecipeValidationFinding {
61
+ severity: RecipeValidationSeverity;
58
62
  code: string;
59
63
  path: string;
60
64
  message: string;
61
65
  }
62
- export interface RecipeCompatibilityResult {
63
- status: RecipeCompatibilityStatus;
64
- findings: RecipeCompatibilityFinding[];
66
+ export interface RecipeValidationResult {
67
+ status: RecipeValidationStatus;
68
+ findings: RecipeValidationFinding[];
65
69
  summary: {
66
70
  errors: number;
67
71
  warnings: number;
68
- legacy: boolean;
69
72
  };
70
73
  }
71
74
  export interface RecipeArtifactPackageInput {
@@ -73,17 +76,15 @@ export interface RecipeArtifactPackageInput {
73
76
  artifactPaths?: readonly string[];
74
77
  recipe?: unknown;
75
78
  }
79
+ export interface MutableValidationContext {
80
+ findings: RecipeValidationFinding[];
81
+ }
82
+ export declare function createContext(): MutableValidationContext;
83
+ export declare function addFinding(ctx: MutableValidationContext, severity: RecipeValidationSeverity, code: string, path: string, message: string): void;
76
84
  export declare function isRecord(value: unknown): value is Record<string, unknown>;
77
- export declare function getRecipeWorkflowNodeIds(recipe: unknown): string[];
78
- export declare function getRecipeWorkflowActions(recipe: unknown): string[];
79
- export declare function getRecipeActionManifestActionNames(manifest: unknown): string[];
80
- export declare function validateRecipeActionManifestDocument(manifest: unknown): RecipeCompatibilityResult;
81
- export declare function validateRecipeWithManifest(recipe: unknown, manifest: unknown): RecipeCompatibilityResult;
82
- export declare function validateRecipeDocument(recipe: unknown): RecipeCompatibilityResult;
83
- export declare function validateArtifactManifestDocument(manifest: unknown, options?: {
84
- recipe?: unknown;
85
- artifactPaths?: readonly string[];
86
- }): RecipeCompatibilityResult;
87
- export declare function validateRecipeArtifactPackage(input: RecipeArtifactPackageInput): RecipeCompatibilityResult;
88
- export declare function mergeRecipeCompatibilityResults(results: readonly RecipeCompatibilityResult[]): RecipeCompatibilityResult;
89
- //# sourceMappingURL=recipe-compat.d.ts.map
85
+ export declare function hasOwn(value: Record<string, unknown>, key: string): boolean;
86
+ export declare function isNonEmptyString(value: unknown): value is string;
87
+ export declare function isRelativeArtifactPath(value: string): boolean;
88
+ export declare function finishResult(ctx: MutableValidationContext): RecipeValidationResult;
89
+ export declare function requireStringField(ctx: MutableValidationContext, document: Record<string, unknown>, field: string, path: string): void;
90
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/recipe/common.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,2BAA2B,QAAS,CAAC;AAElD,eAAO,MAAM,u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AAS,MAAM,EAAE,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,uBAAuB,EAAE,CAAC;CACrC;AAED,wBAAgB,aAAa,IAAI,wBAAwB,CAExD;AAED,wBAAgB,UAAU,CACxB,GAAG,EAAE,wBAAwB,EAC7B,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,IAAI,CAEN;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEhE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAI7D;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,wBAAwB,GAAG,sBAAsB,CAKlF;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,wBAAwB,EAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,IAAI,CAON"}
@@ -0,0 +1,79 @@
1
+ import { RECIPE_ARTIFACT_TYPES } from '../recipes/step-io.js';
2
+ export const RECIPE_PROTOCOL_SCHEMA_VERSION = 1;
3
+ export const RECIPE_PLAYBACK_SLOW_MS_MIN = 100;
4
+ export const RECIPE_PLAYBACK_SLOW_MS_MAX = 60_000;
5
+ export const OFFICIAL_RECIPE_ACTIONS = [
6
+ 'command',
7
+ 'wait',
8
+ 'assert_file',
9
+ 'assert_json',
10
+ 'assert_exit_code',
11
+ 'assert_output',
12
+ 'state_read',
13
+ 'watch_logs',
14
+ 'index_artifacts',
15
+ 'call',
16
+ 'switch',
17
+ 'manual',
18
+ 'end',
19
+ 'ui.navigate',
20
+ 'ui.press',
21
+ 'ui.key_press',
22
+ 'ui.set_input',
23
+ 'ui.scroll',
24
+ 'ui.gesture',
25
+ 'ui.wait_for',
26
+ 'ui.screenshot',
27
+ 'app.status',
28
+ 'app.lifecycle',
29
+ 'app.hud',
30
+ 'app.trace',
31
+ 'cdp.target',
32
+ 'cdp.storage',
33
+ 'cdp.network',
34
+ 'cdp.emulation',
35
+ 'cdp.metrics',
36
+ 'cdp.trace',
37
+ ];
38
+ export const PLAYBACK_MODES = new Set(['off', 'auto', 'step']);
39
+ export const TERMINAL_STATUSES = new Set(['pass', 'fail', 'unknown']);
40
+ export const ARTIFACT_TYPES = new Set(RECIPE_ARTIFACT_TYPES);
41
+ export const OFFICIAL_ACTION_SET = new Set(OFFICIAL_RECIPE_ACTIONS);
42
+ export function createContext() {
43
+ return { findings: [] };
44
+ }
45
+ export function addFinding(ctx, severity, code, path, message) {
46
+ ctx.findings.push({ severity, code, path, message });
47
+ }
48
+ export function isRecord(value) {
49
+ return Boolean(value && typeof value === 'object' && !Array.isArray(value));
50
+ }
51
+ export function hasOwn(value, key) {
52
+ return Object.prototype.hasOwnProperty.call(value, key);
53
+ }
54
+ export function isNonEmptyString(value) {
55
+ return typeof value === 'string' && value.trim().length > 0;
56
+ }
57
+ export function isRelativeArtifactPath(value) {
58
+ if (value.startsWith('/') || value.startsWith('\\'))
59
+ return false;
60
+ if (/^[A-Za-z]:/.test(value))
61
+ return false;
62
+ return !value.split(/[\\/]+/).some((segment) => segment === '..');
63
+ }
64
+ export function finishResult(ctx) {
65
+ const errors = ctx.findings.filter((finding) => finding.severity === 'error').length;
66
+ const warnings = ctx.findings.length - errors;
67
+ const status = errors ? 'invalid' : 'valid';
68
+ return { status, findings: ctx.findings, summary: { errors, warnings } };
69
+ }
70
+ export function requireStringField(ctx, document, field, path) {
71
+ if (isNonEmptyString(document[field]))
72
+ return;
73
+ if (!hasOwn(document, field)) {
74
+ addFinding(ctx, 'error', `recipe.missing_${field}`, path, `Recipe requires ${path}.`);
75
+ return;
76
+ }
77
+ addFinding(ctx, 'error', `recipe.invalid_${field}`, path, `${path} must be a non-empty string.`);
78
+ }
79
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/recipe/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAElD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS;IACT,MAAM;IACN,aAAa;IACb,aAAa;IACb,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,aAAa;IACb,UAAU;IACV,cAAc;IACd,cAAc;IACd,WAAW;IACX,YAAY;IACZ,aAAa;IACb,eAAe;IACf,YAAY;IACZ,eAAe;IACf,SAAS;IACT,WAAW;IACX,YAAY;IACZ,aAAa;IACb,aAAa;IACb,eAAe;IACf,aAAa;IACb,WAAW;CACH,CAAC;AA4DX,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AACtE,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAS,qBAAqB,CAA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MAAM,UAAU,YAAY,CAAC,GAA6B;IACxD,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,MAAM,CAAC;IACrF,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9C,MAAM,MAAM,GAA2B,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;IACpE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,GAA6B,EAC7B,QAAiC,EACjC,KAAa,EACb,IAAY;IAEZ,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO;IAC9C,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;QAC7B,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,kBAAkB,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAmB,IAAI,GAAG,CAAC,CAAC;QACtF,OAAO;IACT,CAAC;IACD,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,kBAAkB,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,8BAA8B,CAAC,CAAC;AACnG,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type RecipeValidationResult } from './common.js';
2
+ export declare function validateRecipeWithManifest(recipe: unknown, manifest: unknown): RecipeValidationResult;
3
+ export declare function validateRecipeDocument(recipe: unknown): RecipeValidationResult;
4
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/recipe/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,sBAAsB,EAE5B,MAAM,aAAa,CAAC;AAgBrB,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,OAAO,GAChB,sBAAsB,CAoCxB;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,sBAAsB,CA+C9E"}
@@ -0,0 +1,53 @@
1
+ import { addFinding, createContext, finishResult, hasOwn, isRecord, RECIPE_PROTOCOL_SCHEMA_VERSION, requireStringField, } from './common.js';
2
+ import { getRecipeActionManifestActionNames, getRecipeActionManifestPreconditionIds, validateRecipeActionManifestDocument, } from './manifest.js';
3
+ import { extractWorkflow, getRecipeWorkflowActionEntries, getRecipeWorkflowPreconditionEntries, validateFlowCalls, validateInlineFlows, validateWorkflowGraph, validateWorkflowPreconditions, } from './workflow.js';
4
+ export function validateRecipeWithManifest(recipe, manifest) {
5
+ const ctx = createContext();
6
+ const recipeResult = validateRecipeDocument(recipe);
7
+ const manifestResult = validateRecipeActionManifestDocument(manifest);
8
+ ctx.findings.push(...recipeResult.findings, ...manifestResult.findings);
9
+ const declaredActions = new Set(getRecipeActionManifestActionNames(manifest));
10
+ if (declaredActions.size > 0) {
11
+ const actions = getRecipeWorkflowActionEntries(recipe);
12
+ actions.forEach(({ action, path }) => {
13
+ if (!declaredActions.has(action)) {
14
+ addFinding(ctx, 'error', 'recipe.action_not_declared_by_manifest', path, `Recipe action ${action} is not declared by the runner action manifest.`);
15
+ }
16
+ });
17
+ }
18
+ const declaredPreconditions = new Set(getRecipeActionManifestPreconditionIds(manifest));
19
+ for (const gate of getRecipeWorkflowPreconditionEntries(recipe)) {
20
+ if (!declaredPreconditions.has(gate.id)) {
21
+ addFinding(ctx, 'error', 'recipe.precondition_not_declared_by_manifest', gate.path, `Recipe precondition ${gate.id} is not declared by the runner action manifest.`);
22
+ }
23
+ }
24
+ return finishResult(ctx);
25
+ }
26
+ export function validateRecipeDocument(recipe) {
27
+ const ctx = createContext();
28
+ if (!isRecord(recipe)) {
29
+ addFinding(ctx, 'error', 'recipe.invalid_document', '$', 'Recipe document must be a JSON object.');
30
+ return finishResult(ctx);
31
+ }
32
+ const schemaVersion = recipe.schema_version;
33
+ const schemaVersionIsV1 = schemaVersion === RECIPE_PROTOCOL_SCHEMA_VERSION;
34
+ if (!hasOwn(recipe, 'schema_version')) {
35
+ addFinding(ctx, 'error', 'recipe.missing_schema_version', 'schema_version', `Recipe must set schema_version: ${RECIPE_PROTOCOL_SCHEMA_VERSION}.`);
36
+ }
37
+ else if (!schemaVersionIsV1) {
38
+ addFinding(ctx, 'error', 'recipe.unsupported_schema_version', 'schema_version', `Unsupported schema_version ${JSON.stringify(schemaVersion)}; supported value is ${RECIPE_PROTOCOL_SCHEMA_VERSION}.`);
39
+ }
40
+ requireStringField(ctx, recipe, 'title', 'title');
41
+ requireStringField(ctx, recipe, 'description', 'description');
42
+ const validate = recipe.validate;
43
+ const rawWorkflow = isRecord(validate) && isRecord(validate.workflow) ? validate.workflow : null;
44
+ const workflow = extractWorkflow(ctx, recipe);
45
+ if (workflow && rawWorkflow) {
46
+ validateWorkflowPreconditions(ctx, rawWorkflow);
47
+ validateWorkflowGraph(ctx, workflow, rawWorkflow);
48
+ validateFlowCalls(ctx, recipe, workflow);
49
+ }
50
+ validateInlineFlows(ctx, recipe);
51
+ return finishResult(ctx);
52
+ }
53
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/recipe/document.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,8BAA8B,EAE9B,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kCAAkC,EAClC,sCAAsC,EACtC,oCAAoC,GACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,oCAAoC,EACpC,iBAAiB,EACjB,mBAAmB,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AAE,MAAM,CAAC,CAAC;IAC9C,IAAI,QAAQ,IAAI,WAAW,EAAE,CAAC;QAC5B,6BAA6B,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QAChD,qBAAqB,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;QAClD,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IACD,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAEjC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { mergeRecipeValidationResults, validateArtifactManifestDocument, validateRecipeArtifactPackage, } from './artifact.js';
2
+ export { isRecord, OFFICIAL_RECIPE_ACTIONS, type OfficialActionName, RECIPE_PLAYBACK_SLOW_MS_MAX, RECIPE_PLAYBACK_SLOW_MS_MIN, RECIPE_PROTOCOL_SCHEMA_VERSION, type RecipeActionCatalogEntry, type RecipeActionCatalogExample, type RecipeActionManifestDocument, type RecipeActionName, type RecipeArtifactPackageInput, type RecipeCustomActionDeclaration, type RecipeNamedDeclaration, type RecipeNativeBindingDeclaration, type RecipePreconditionDeclaration, type RecipeStateRefDeclaration, type RecipeValidationFinding, type RecipeValidationResult, type RecipeValidationSeverity, type RecipeValidationStatus, } from './common.js';
3
+ export { validateRecipeDocument, validateRecipeWithManifest } from './document.js';
4
+ export { getRecipeActionManifestActionNames, validateRecipeActionManifestDocument, } from './manifest.js';
5
+ export { getRecipeWorkflowActions, getRecipeWorkflowNodeIds } from './workflow.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipe/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,6BAA6B,GAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EACL,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { mergeRecipeValidationResults, validateArtifactManifestDocument, validateRecipeArtifactPackage, } from './artifact.js';
2
+ export { isRecord, OFFICIAL_RECIPE_ACTIONS, RECIPE_PLAYBACK_SLOW_MS_MAX, RECIPE_PLAYBACK_SLOW_MS_MIN, RECIPE_PROTOCOL_SCHEMA_VERSION, } from './common.js';
3
+ export { validateRecipeDocument, validateRecipeWithManifest } from './document.js';
4
+ export { getRecipeActionManifestActionNames, validateRecipeActionManifestDocument, } from './manifest.js';
5
+ export { getRecipeWorkflowActions, getRecipeWorkflowNodeIds } from './workflow.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipe/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,6BAA6B,GAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,uBAAuB,EAEvB,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,GAe/B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EACL,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type RecipeValidationResult } from './common.js';
2
+ export declare function getRecipeActionManifestActionNames(manifest: unknown): string[];
3
+ export declare function validateRecipeActionManifestDocument(manifest: unknown): RecipeValidationResult;
4
+ export declare function getRecipeActionManifestPreconditionIds(manifest: unknown): string[];
5
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/recipe/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC;AAErB,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,EAAE,CAc9E;AA+GD,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,OAAO,GAAG,sBAAsB,CAsS9F;AAED,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,EAAE,CAKlF"}