stageflow 0.35.0 → 0.39.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 (320) hide show
  1. package/README.md +18 -8
  2. package/dist/agent/claudeAdapter.js +12 -0
  3. package/dist/agent/piAdapter.d.ts +9 -1
  4. package/dist/agent/piAdapter.js +30 -2
  5. package/dist/agent/piIsolatedMcp.js +14 -2
  6. package/dist/agent/piIsolatedMcpProbe.d.ts +5 -1
  7. package/dist/agent/piIsolatedMcpProbe.js +16 -30
  8. package/dist/agent/port.d.ts +7 -0
  9. package/dist/agents/agentId.d.ts +8 -0
  10. package/dist/agents/agentId.js +27 -0
  11. package/dist/agents/approvalBroker.d.ts +16 -0
  12. package/dist/agents/approvalBroker.js +45 -0
  13. package/dist/agents/authorChat.d.ts +19 -0
  14. package/dist/agents/authorChat.js +63 -0
  15. package/dist/agents/chatTurn.d.ts +23 -0
  16. package/dist/agents/chatTurn.js +77 -0
  17. package/dist/agents/communications/agentmail.d.ts +19 -0
  18. package/dist/agents/communications/agentmail.js +46 -0
  19. package/dist/agents/communications/agentmailListener.d.ts +59 -0
  20. package/dist/agents/communications/agentmailListener.js +183 -0
  21. package/dist/agents/communications/allowlist.d.ts +10 -0
  22. package/dist/agents/communications/allowlist.js +36 -0
  23. package/dist/agents/communications/channelConnections.d.ts +3 -0
  24. package/dist/agents/communications/channelConnections.js +51 -0
  25. package/dist/agents/communications/delivery.d.ts +53 -0
  26. package/dist/agents/communications/delivery.js +142 -0
  27. package/dist/agents/communications/email.d.ts +26 -0
  28. package/dist/agents/communications/email.js +20 -0
  29. package/dist/agents/communications/identity.d.ts +13 -0
  30. package/dist/agents/communications/identity.js +18 -0
  31. package/dist/agents/communications/imessageListener.d.ts +41 -0
  32. package/dist/agents/communications/imessageListener.js +92 -0
  33. package/dist/agents/communications/inbound.d.ts +63 -0
  34. package/dist/agents/communications/inbound.js +143 -0
  35. package/dist/agents/communications/listener.d.ts +36 -0
  36. package/dist/agents/communications/listener.js +38 -0
  37. package/dist/agents/communications/photon.d.ts +19 -0
  38. package/dist/agents/communications/photon.js +38 -0
  39. package/dist/agents/communications/port.d.ts +27 -0
  40. package/dist/agents/communications/port.js +6 -0
  41. package/dist/agents/communications/slack.d.ts +28 -0
  42. package/dist/agents/communications/slack.js +65 -0
  43. package/dist/agents/communications/supervisor.d.ts +36 -0
  44. package/dist/agents/communications/supervisor.js +96 -0
  45. package/dist/agents/communications/telegram.d.ts +19 -0
  46. package/dist/agents/communications/telegram.js +52 -0
  47. package/dist/agents/definitionSummary.d.ts +13 -0
  48. package/dist/agents/definitionSummary.js +91 -0
  49. package/dist/agents/delegate.d.ts +3 -0
  50. package/dist/agents/delegate.js +8 -0
  51. package/dist/agents/errors.d.ts +10 -0
  52. package/dist/agents/errors.js +32 -0
  53. package/dist/agents/guardrails.d.ts +24 -0
  54. package/dist/agents/guardrails.js +39 -0
  55. package/dist/agents/historyFit.d.ts +10 -0
  56. package/dist/agents/historyFit.js +26 -0
  57. package/dist/agents/hostContext.d.ts +54 -0
  58. package/dist/agents/hostContext.js +156 -0
  59. package/dist/agents/ledgers.d.ts +29 -0
  60. package/dist/agents/ledgers.js +31 -0
  61. package/dist/agents/lineDiff.d.ts +12 -0
  62. package/dist/agents/lineDiff.js +46 -0
  63. package/dist/agents/ndjson.d.ts +9 -0
  64. package/dist/agents/ndjson.js +47 -0
  65. package/dist/agents/otlpExport.d.ts +9 -0
  66. package/dist/agents/otlpExport.js +58 -0
  67. package/dist/agents/otlpSink.d.ts +7 -0
  68. package/dist/agents/otlpSink.js +23 -0
  69. package/dist/agents/policy.d.ts +31 -0
  70. package/dist/agents/policy.js +84 -0
  71. package/dist/agents/projectRoot.d.ts +5 -0
  72. package/dist/agents/projectRoot.js +15 -0
  73. package/dist/agents/runtime/piRuntime.d.ts +52 -0
  74. package/dist/agents/runtime/piRuntime.js +474 -0
  75. package/dist/agents/runtime/types.d.ts +77 -0
  76. package/dist/agents/runtime/types.js +26 -0
  77. package/dist/agents/sandbox.d.ts +17 -0
  78. package/dist/agents/sandbox.js +10 -0
  79. package/dist/agents/scheduleSource.d.ts +32 -0
  80. package/dist/agents/scheduleSource.js +100 -0
  81. package/dist/agents/service.d.ts +298 -0
  82. package/dist/agents/service.js +1105 -0
  83. package/dist/agents/sessions.d.ts +38 -0
  84. package/dist/agents/sessions.js +321 -0
  85. package/dist/agents/store.d.ts +277 -0
  86. package/dist/agents/store.js +643 -0
  87. package/dist/agents/trace.d.ts +27 -0
  88. package/dist/agents/trace.js +29 -0
  89. package/dist/agents/turnLifecycle.d.ts +72 -0
  90. package/dist/agents/turnLifecycle.js +157 -0
  91. package/dist/agents/webChat/publicChat.d.ts +36 -0
  92. package/dist/agents/webChat/publicChat.js +290 -0
  93. package/dist/agents/webChat/rateLimit.d.ts +15 -0
  94. package/dist/agents/webChat/rateLimit.js +33 -0
  95. package/dist/agents/webChat/slug.d.ts +2 -0
  96. package/dist/agents/webChat/slug.js +9 -0
  97. package/dist/channels/config.d.ts +11 -0
  98. package/dist/channels/config.js +95 -0
  99. package/dist/channels/configWriter.d.ts +40 -0
  100. package/dist/channels/configWriter.js +148 -0
  101. package/dist/channels/connectionEdits.d.ts +34 -0
  102. package/dist/channels/connectionEdits.js +53 -0
  103. package/dist/channels/errorInfo.d.ts +18 -0
  104. package/dist/channels/errorInfo.js +71 -0
  105. package/dist/channels/errors.d.ts +12 -0
  106. package/dist/channels/errors.js +13 -0
  107. package/dist/channels/health.d.ts +41 -0
  108. package/dist/channels/health.js +99 -0
  109. package/dist/channels/host.d.ts +55 -0
  110. package/dist/channels/host.js +185 -0
  111. package/dist/channels/http.d.ts +31 -0
  112. package/dist/channels/http.js +79 -0
  113. package/dist/channels/index.d.ts +10 -0
  114. package/dist/channels/index.js +9 -0
  115. package/dist/channels/ledger.d.ts +37 -0
  116. package/dist/channels/ledger.js +95 -0
  117. package/dist/channels/providers/agentmail.d.ts +26 -0
  118. package/dist/channels/providers/agentmail.js +94 -0
  119. package/dist/channels/providers/kit.d.ts +40 -0
  120. package/dist/channels/providers/kit.js +78 -0
  121. package/dist/channels/providers/photonImessage.d.ts +45 -0
  122. package/dist/channels/providers/photonImessage.js +188 -0
  123. package/dist/channels/providers/photonWhatsapp.d.ts +49 -0
  124. package/dist/channels/providers/photonWhatsapp.js +146 -0
  125. package/dist/channels/providers/slack.d.ts +25 -0
  126. package/dist/channels/providers/slack.js +102 -0
  127. package/dist/channels/providers/telegram.d.ts +21 -0
  128. package/dist/channels/providers/telegram.js +101 -0
  129. package/dist/channels/providers.d.ts +5 -0
  130. package/dist/channels/providers.js +22 -0
  131. package/dist/channels/registry.d.ts +54 -0
  132. package/dist/channels/registry.js +186 -0
  133. package/dist/channels/secretStore.d.ts +21 -0
  134. package/dist/channels/secretStore.js +75 -0
  135. package/dist/channels/secrets.d.ts +15 -0
  136. package/dist/channels/secrets.js +50 -0
  137. package/dist/channels/service.d.ts +54 -0
  138. package/dist/channels/service.js +307 -0
  139. package/dist/channels/stageChannels.d.ts +45 -0
  140. package/dist/channels/stageChannels.js +110 -0
  141. package/dist/channels/types.d.ts +169 -0
  142. package/dist/channels/types.js +1 -0
  143. package/dist/cli/agentsCommand.d.ts +14 -0
  144. package/dist/cli/agentsCommand.js +291 -0
  145. package/dist/cli/doctorCommand.js +3 -1
  146. package/dist/cli.js +9 -0
  147. package/dist/config/browseCatalog.js +4 -11
  148. package/dist/config/draftPackage.d.ts +2 -0
  149. package/dist/config/draftPackage.js +8 -0
  150. package/dist/config/hostConfig.js +8 -0
  151. package/dist/config/loadAgent.d.ts +266 -0
  152. package/dist/config/loadAgent.js +374 -0
  153. package/dist/config/loadPipeline.js +31 -4
  154. package/dist/config/loadStage.js +15 -0
  155. package/dist/config/mcpHostCatalog.d.ts +50 -0
  156. package/dist/config/mcpHostCatalog.js +405 -0
  157. package/dist/config/mcpOAuth.d.ts +37 -0
  158. package/dist/config/mcpOAuth.js +263 -0
  159. package/dist/config/mcpRedaction.d.ts +42 -0
  160. package/dist/config/mcpRedaction.js +314 -0
  161. package/dist/config/mcpToolCache.d.ts +20 -0
  162. package/dist/config/mcpToolCache.js +43 -0
  163. package/dist/config/mergePipelineIncludes.d.ts +5 -0
  164. package/dist/config/mergePipelineIncludes.js +52 -0
  165. package/dist/config/pipelineStageKeys.js +1 -0
  166. package/dist/config/resolveStageMcpServers.d.ts +35 -3
  167. package/dist/config/resolveStageMcpServers.js +124 -9
  168. package/dist/config/validateCatalog.d.ts +4 -1
  169. package/dist/config/validateCatalog.js +45 -1
  170. package/dist/errors/codes.d.ts +1 -1
  171. package/dist/errors/codes.js +1 -0
  172. package/dist/mcp/agentTools.d.ts +8 -0
  173. package/dist/mcp/agentTools.js +132 -0
  174. package/dist/mcp/catalogTools.js +7 -9
  175. package/dist/mcp/deps.d.ts +6 -0
  176. package/dist/mcp/pipelineAuthorSupport.d.ts +19 -0
  177. package/dist/mcp/pipelineAuthorSupport.js +10 -0
  178. package/dist/mcp/pipelineAuthorTools.d.ts +8 -0
  179. package/dist/mcp/pipelineAuthorTools.js +109 -0
  180. package/dist/mcp/server.js +5 -0
  181. package/dist/mcp/tools.js +4 -0
  182. package/dist/mcp/triggerTools.js +32 -0
  183. package/dist/memory/access.d.ts +36 -0
  184. package/dist/memory/access.js +116 -0
  185. package/dist/memory/agentIssues.d.ts +3 -0
  186. package/dist/memory/agentIssues.js +23 -0
  187. package/dist/memory/bashDeny.d.ts +6 -0
  188. package/dist/memory/bashDeny.js +35 -0
  189. package/dist/memory/host.d.ts +51 -0
  190. package/dist/memory/host.js +394 -0
  191. package/dist/memory/ids.d.ts +15 -0
  192. package/dist/memory/ids.js +31 -0
  193. package/dist/memory/worker.d.ts +1 -0
  194. package/dist/memory/worker.js +84 -0
  195. package/dist/models/catalog.d.ts +113 -0
  196. package/dist/models/catalog.js +238 -0
  197. package/dist/models/response.d.ts +29 -0
  198. package/dist/models/response.js +25 -0
  199. package/dist/operatorAgent/agentAuthorContext.d.ts +17 -0
  200. package/dist/operatorAgent/agentAuthorContext.js +32 -0
  201. package/dist/operatorAgent/fakeHost.js +2 -0
  202. package/dist/operatorAgent/host.js +6 -3
  203. package/dist/operatorAgent/index.d.ts +4 -0
  204. package/dist/operatorAgent/index.js +4 -0
  205. package/dist/operatorAgent/piModel.js +2 -0
  206. package/dist/operatorAgent/profiles/agentAuthor.d.ts +11 -0
  207. package/dist/operatorAgent/profiles/agentAuthor.js +192 -0
  208. package/dist/operatorAgent/profiles/agentAuthorPlaybook.d.ts +1 -0
  209. package/dist/operatorAgent/profiles/agentAuthorPlaybook.js +29 -0
  210. package/dist/operatorAgent/profiles/workshopAuthor.js +2 -2
  211. package/dist/operatorAgent/profiles/workshopAuthorTools.js +3 -3
  212. package/dist/operatorAgent/proposals.d.ts +1 -0
  213. package/dist/operatorAgent/proposals.js +23 -2
  214. package/dist/package-meta.d.ts +1 -1
  215. package/dist/package-meta.js +1 -1
  216. package/dist/preflight/channelChecks.d.ts +17 -0
  217. package/dist/preflight/channelChecks.js +106 -0
  218. package/dist/preflight/pipelinePreflight.d.ts +9 -2
  219. package/dist/preflight/pipelinePreflight.js +10 -1
  220. package/dist/runstore/createStore.d.ts +2 -0
  221. package/dist/runstore/createStore.js +8 -0
  222. package/dist/runstore/overviewSummary.d.ts +56 -0
  223. package/dist/runstore/overviewSummary.js +134 -0
  224. package/dist/runstore/port.d.ts +3 -0
  225. package/dist/runstore/sqlite/SqliteRunStore.d.ts +2 -0
  226. package/dist/runstore/sqlite/SqliteRunStore.js +18 -0
  227. package/dist/runstore/sqlite/migrations/013-agents.d.ts +12 -0
  228. package/dist/runstore/sqlite/migrations/013-agents.js +156 -0
  229. package/dist/runstore/sqlite/migrations/014-agent-deliveries.d.ts +11 -0
  230. package/dist/runstore/sqlite/migrations/014-agent-deliveries.js +32 -0
  231. package/dist/runstore/sqlite/migrations/index.js +4 -0
  232. package/dist/runtime/pipelineRunner.js +3 -1
  233. package/dist/runtime/repositoryMaterialize.d.ts +1 -1
  234. package/dist/runtime/runManager.js +4 -1
  235. package/dist/runtime/stageAttemptBootstrap.js +31 -1
  236. package/dist/runtime/stageEnvironment.d.ts +2 -0
  237. package/dist/runtime/stageEnvironment.js +6 -1
  238. package/dist/runtime/stageProcessLauncher.js +54 -1
  239. package/dist/runtime/stageSecrets.d.ts +6 -1
  240. package/dist/runtime/stageSecrets.js +34 -1
  241. package/dist/server/agentAuthorRoutes.d.ts +5 -0
  242. package/dist/server/agentAuthorRoutes.js +64 -0
  243. package/dist/server/agentRoutes.d.ts +5 -0
  244. package/dist/server/agentRoutes.js +323 -0
  245. package/dist/server/bootstrap.d.ts +11 -0
  246. package/dist/server/bootstrap.js +40 -10
  247. package/dist/server/channelRoutes.d.ts +9 -0
  248. package/dist/server/channelRoutes.js +88 -0
  249. package/dist/server/controlToken.js +8 -0
  250. package/dist/server/http.d.ts +8 -1
  251. package/dist/server/http.js +183 -20
  252. package/dist/server/mcpHost.js +1 -0
  253. package/dist/server/memoryRoutes.d.ts +5 -0
  254. package/dist/server/memoryRoutes.js +146 -0
  255. package/dist/server/projectMcpRoutes.d.ts +1 -0
  256. package/dist/server/projectMcpRoutes.js +241 -3
  257. package/dist/toolkit/guard.d.ts +27 -0
  258. package/dist/toolkit/guard.js +98 -0
  259. package/dist/toolkit/index.d.ts +48 -0
  260. package/dist/toolkit/index.js +82 -0
  261. package/dist/toolkit/meta.d.ts +36 -0
  262. package/dist/toolkit/meta.js +117 -0
  263. package/dist/toolkit/profiles.d.ts +13 -0
  264. package/dist/toolkit/profiles.js +25 -0
  265. package/dist/toolkit/record.d.ts +15 -0
  266. package/dist/toolkit/record.js +17 -0
  267. package/dist/tools/memoryTools.d.ts +95 -0
  268. package/dist/tools/memoryTools.js +179 -0
  269. package/dist/tools/sendMessage.d.ts +21 -0
  270. package/dist/tools/sendMessage.js +25 -0
  271. package/dist/types/pipeline.d.ts +7 -1
  272. package/dist/types/stage.d.ts +15 -0
  273. package/dist/ui/assets/AssistantRuntimeProvider-CsiPFhCT.js +9 -0
  274. package/dist/ui/assets/MarkdownText-D7tYaIFO.js +29 -0
  275. package/dist/ui/assets/ReadonlyStore-BfXqHykm.js +6 -0
  276. package/dist/ui/assets/Tooltip-DrpoRRNi.js +1 -0
  277. package/dist/ui/assets/chat-BbLukq9W.js +5 -0
  278. package/dist/ui/assets/chat-zIZU_bP1.css +2 -0
  279. package/dist/ui/assets/jsx-runtime-iVoFAvQ_.js +1 -0
  280. package/dist/ui/assets/{index-CIPbbBUi.css → main-BFo79krC.css} +1 -1
  281. package/dist/ui/assets/main-CijYMeM0.js +259 -0
  282. package/dist/ui/chat.html +25 -0
  283. package/dist/ui/index.html +6 -2
  284. package/dist/workshop/modelSettings.d.ts +2 -2
  285. package/dist/workshop/modelSettings.js +5 -11
  286. package/examples/README.md +1 -0
  287. package/examples/channels-smoke/README.md +23 -0
  288. package/examples/channels-smoke/channels-smoke.pipeline.yaml +11 -0
  289. package/examples/channels-smoke/channels-smoke.task.yaml +3 -0
  290. package/examples/channels-smoke/send-email.yaml +32 -0
  291. package/examples/channels-smoke/send-text.yaml +31 -0
  292. package/examples/github-release/README.md +1 -1
  293. package/examples/memory/README.md +99 -0
  294. package/examples/memory/desk-outage.task.yaml +15 -0
  295. package/examples/memory/desk-refund.task.yaml +15 -0
  296. package/examples/memory/desk-revisit-outage.task.yaml +11 -0
  297. package/examples/memory/desk-revisit.pipeline.yaml +123 -0
  298. package/examples/memory/desk.pipeline.yaml +192 -0
  299. package/examples/memory/file-card.pipeline.yaml +39 -0
  300. package/examples/memory/file-ledger.task.yaml +22 -0
  301. package/examples/memory/file-release.task.yaml +24 -0
  302. package/examples/memory/file-rich.pipeline.yaml +40 -0
  303. package/examples/memory/file-ticket.task.yaml +7 -0
  304. package/examples/memory/file-timeline.task.yaml +28 -0
  305. package/examples/memory/find-card.pipeline.yaml +46 -0
  306. package/examples/memory/find-ticket.task.yaml +7 -0
  307. package/examples/memory/missing.pipeline.yaml +16 -0
  308. package/examples/memory/recall.pipeline.yaml +24 -0
  309. package/examples/memory/recall.task.yaml +5 -0
  310. package/examples/memory/remember-ada.task.yaml +6 -0
  311. package/examples/memory/remember-grace.task.yaml +6 -0
  312. package/examples/memory/remember.pipeline.yaml +58 -0
  313. package/examples/memory/stageflow.yaml +12 -0
  314. package/examples/memory/update-card.pipeline.yaml +43 -0
  315. package/examples/memory/update-ledger.task.yaml +23 -0
  316. package/examples/memory/update-rich.pipeline.yaml +44 -0
  317. package/examples/memory/update-ticket.task.yaml +7 -0
  318. package/examples/stage-mcp/README.md +1 -1
  319. package/package.json +9 -3
  320. package/dist/ui/assets/index-BoFPkKFg.js +0 -256
@@ -0,0 +1,192 @@
1
+ id: desk
2
+ memories:
3
+ - new-notebook
4
+ stages:
5
+ - id: file-batch
6
+ entry: true
7
+ route:
8
+ - to: decide
9
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
10
+ system_prompt: |
11
+ The task input has "focus", "decision", "query", and "cards". "cards" is a list of objects with "key" and "note".
12
+ Do these steps in order, then stop:
13
+ 1. Call read_memory with memory "new-notebook". Keep that text. Do not call replace_memory.
14
+ 2. For each card, in order, call add_memory_card with memory "new-notebook", that key, and content set to that note. A key may contain "/", spaces, or "@". Pass it through unchanged.
15
+ 3. For each card, call read_memory_card with memory "new-notebook" and that key. The body must equal the note you just wrote.
16
+ 4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"cover":"<the exact read_memory text>","filed":"<a JSON array of {key, note} for every card, in the same order>","focus":"<focus>","decision":"<decision>","query":"<query>"}.
17
+ Do not call update_memory_card. Do not call any memory id other than new-notebook. Do not write files. If any add_memory_card fails, stop and emit status failure. Do not keep filing after a failure.
18
+ io:
19
+ input:
20
+ schema:
21
+ type: object
22
+ required:
23
+ - focus
24
+ - decision
25
+ - query
26
+ - cards
27
+ properties:
28
+ focus:
29
+ type: string
30
+ decision:
31
+ type: string
32
+ query:
33
+ type: string
34
+ cards:
35
+ type: array
36
+ minItems: 2
37
+ items:
38
+ type: object
39
+ required:
40
+ - key
41
+ - note
42
+ properties:
43
+ key:
44
+ type: string
45
+ note:
46
+ type: string
47
+ additionalProperties: false
48
+ additionalProperties: false
49
+ output:
50
+ schema:
51
+ type: object
52
+ required:
53
+ - cover
54
+ - filed
55
+ - focus
56
+ - decision
57
+ - query
58
+ properties:
59
+ cover:
60
+ type: string
61
+ filed:
62
+ type: string
63
+ focus:
64
+ type: string
65
+ decision:
66
+ type: string
67
+ query:
68
+ type: string
69
+ additionalProperties: false
70
+ - id: decide
71
+ route:
72
+ - to: audit
73
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
74
+ system_prompt: |
75
+ The input has "cover", "filed", "focus", "decision", and "query".
76
+ Do these steps in order, then stop:
77
+ 1. Call search_memory_cards with memory "new-notebook" and the query. Do not treat a short hit list as permission to skip a card. There may be more matches than the tool returns.
78
+ 2. Call read_memory_card with memory "new-notebook" and the focus key.
79
+ 3. Call update_memory_card with memory "new-notebook", the focus key, and content set to the decision. This replaces the whole card. Do not update any other key.
80
+ 4. Call read_memory_card again with memory "new-notebook" and the focus key.
81
+ 5. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"cover":"<the cover you were given, unchanged>","filed":"<the filed text you were given, unchanged>","focus":"<focus>","decision":"<decision>","query":"<query>","before":"<the first read of the focus card>","after":"<the second read of the focus card>","hits":"<the search result as JSON text>"}.
82
+ Do not call add_memory_card or replace_memory. Do not call any memory id other than new-notebook. Do not write files. If the focus card is missing, emit status failure.
83
+ io:
84
+ input:
85
+ schema:
86
+ type: object
87
+ required:
88
+ - cover
89
+ - filed
90
+ - focus
91
+ - decision
92
+ - query
93
+ properties:
94
+ cover:
95
+ type: string
96
+ filed:
97
+ type: string
98
+ focus:
99
+ type: string
100
+ decision:
101
+ type: string
102
+ query:
103
+ type: string
104
+ additionalProperties: false
105
+ output:
106
+ schema:
107
+ type: object
108
+ required:
109
+ - cover
110
+ - filed
111
+ - focus
112
+ - decision
113
+ - query
114
+ - before
115
+ - after
116
+ - hits
117
+ properties:
118
+ cover:
119
+ type: string
120
+ filed:
121
+ type: string
122
+ focus:
123
+ type: string
124
+ decision:
125
+ type: string
126
+ query:
127
+ type: string
128
+ before:
129
+ type: string
130
+ after:
131
+ type: string
132
+ hits:
133
+ type: string
134
+ additionalProperties: false
135
+ - id: audit
136
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
137
+ system_prompt: |
138
+ The input has "cover", "filed", "focus", "decision", "before", and "after".
139
+ "filed" is a JSON array of objects with "key" and "note".
140
+ Do these steps in order, then stop:
141
+ 1. Call read_memory with memory "new-notebook".
142
+ 2. Call read_memory_card with memory "new-notebook" and the focus key.
143
+ 3. For every other key in "filed", call read_memory_card with memory "new-notebook" and that key.
144
+ 4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"focus":"<focus>","after":"<the focus card body you just read>","untouched":"<one line per other key, as key then a tab then the body>","page":"<the exact cover you just read>","cover_same":"yes or no"}.
145
+ Set cover_same to yes only when the cover you just read is exactly the "cover" you were given. Set it to no otherwise.
146
+ The focus body should equal "decision". Each other body should equal the note in "filed" for that key. Do not call add_memory_card, update_memory_card, or replace_memory. Do not write files.
147
+ io:
148
+ input:
149
+ schema:
150
+ type: object
151
+ required:
152
+ - cover
153
+ - filed
154
+ - focus
155
+ - decision
156
+ - before
157
+ - after
158
+ properties:
159
+ cover:
160
+ type: string
161
+ filed:
162
+ type: string
163
+ focus:
164
+ type: string
165
+ decision:
166
+ type: string
167
+ before:
168
+ type: string
169
+ after:
170
+ type: string
171
+ additionalProperties: true
172
+ output:
173
+ schema:
174
+ type: object
175
+ required:
176
+ - focus
177
+ - after
178
+ - untouched
179
+ - page
180
+ - cover_same
181
+ properties:
182
+ focus:
183
+ type: string
184
+ after:
185
+ type: string
186
+ untouched:
187
+ type: string
188
+ page:
189
+ type: string
190
+ cover_same:
191
+ type: string
192
+ additionalProperties: false
@@ -0,0 +1,39 @@
1
+ id: file-card
2
+ stages:
3
+ - id: file
4
+ entry: true
5
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
6
+ system_prompt: |
7
+ The task input has "key" and "note".
8
+ Do these steps in order, then stop:
9
+ 1. Call add_memory_card with memory "notebook", that key, and content set to the note.
10
+ 2. Call read_memory_card with memory "notebook" and that key.
11
+ 3. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","note":"<the exact text read_memory_card returned>"}.
12
+ Do not call replace_memory. Do not call update_memory_card. Do not call any memory id other than notebook. Do not write files. If add_memory_card returns MEMORY_CARD_EXISTS, stop and emit status failure with the same payload shape and the error code in the summary.
13
+ io:
14
+ input:
15
+ schema:
16
+ type: object
17
+ required:
18
+ - key
19
+ - note
20
+ properties:
21
+ key:
22
+ type: string
23
+ note:
24
+ type: string
25
+ additionalProperties: false
26
+ output:
27
+ schema:
28
+ type: object
29
+ required:
30
+ - key
31
+ - note
32
+ properties:
33
+ key:
34
+ type: string
35
+ note:
36
+ type: string
37
+ additionalProperties: false
38
+ memories:
39
+ - notebook
@@ -0,0 +1,22 @@
1
+ id: file-ledger
2
+ goal: File the refund ledger as a card, keeping the table
3
+ context: Memory new-notebook already exists. This key does not.
4
+ constraints: The card body is the note exactly. Do not change the cover.
5
+ input:
6
+ key: orders/4412/ledger
7
+ note: |
8
+ # Refund ledger — order 4412
9
+
10
+ Customer asked for store credit. Finance paid the original card instead.
11
+
12
+ | When | Who | Action | Amount |
13
+ | --- | --- | --- | --- |
14
+ | 2026-10-18 09:12 | grace@example.com | Request opened | 86.40 USD |
15
+ | 2026-10-18 11:04 | TICKET-2040 | Store credit declined | — |
16
+ | 2026-10-19 16:22 | payments | Paid to original card | 86.40 USD |
17
+
18
+ Still open:
19
+
20
+ - [ ] Customer confirmed the payout
21
+ - [x] Reviewer recorded the decline
22
+ - [ ] Receipt attached to the ticket
@@ -0,0 +1,24 @@
1
+ id: file-release
2
+ goal: File the release card with a table and the rollback command
3
+ context: Memory new-notebook already exists. This key does not. It is not the older releases/2.4.1 card.
4
+ constraints: The card body is the note exactly. Do not change the cover.
5
+ input:
6
+ key: releases/2.5.0
7
+ note: |
8
+ # Release 2.5.0
9
+
10
+ Held. Do not deploy until the checkout incident on `TICKET-3180` is closed.
11
+
12
+ | Check | State | Owner |
13
+ | --- | --- | --- |
14
+ | Payments migration | reverted on 2.4.1 | payments |
15
+ | EU checkout | recovered 16:40 UTC | ada@example.com |
16
+ | This release | held | release desk |
17
+
18
+ Rollback command that was used for 2.4.1:
19
+
20
+ ```
21
+ sf runs rerun --run <previous> --from payments-migrate
22
+ ```
23
+
24
+ Decision: ship 2.5.0 only after a clean EU checkout hour, with the migration left out.
@@ -0,0 +1,40 @@
1
+ id: file-rich
2
+ memories:
3
+ - new-notebook
4
+ stages:
5
+ - id: file
6
+ entry: true
7
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
8
+ system_prompt: |
9
+ The task input has "key" and "note".
10
+ The note is the full card body. It may contain headings, lists, tables, and fenced blocks. Copy it unchanged.
11
+ Do these steps in order, then stop:
12
+ 1. Call add_memory_card with memory "new-notebook", that key, and content set to the note exactly. Do not summarize, rewrap, or drop a line.
13
+ 2. Call read_memory_card with memory "new-notebook" and that key.
14
+ 3. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","note":"<the exact text read_memory_card returned>"}.
15
+ Do not call replace_memory. Do not call update_memory_card. Do not call any memory id other than new-notebook. Do not write files. If add_memory_card returns MEMORY_CARD_EXISTS, stop and emit status failure.
16
+ io:
17
+ input:
18
+ schema:
19
+ type: object
20
+ required:
21
+ - key
22
+ - note
23
+ properties:
24
+ key:
25
+ type: string
26
+ note:
27
+ type: string
28
+ additionalProperties: false
29
+ output:
30
+ schema:
31
+ type: object
32
+ required:
33
+ - key
34
+ - note
35
+ properties:
36
+ key:
37
+ type: string
38
+ note:
39
+ type: string
40
+ additionalProperties: false
@@ -0,0 +1,7 @@
1
+ id: file-ticket-1842
2
+ goal: File one ticket card in the shared notebook
3
+ context: First card for this ticket. The cover page is separate.
4
+ constraints: One card. Do not change the cover.
5
+ input:
6
+ key: TICKET-1842
7
+ note: Refund approved for order 4412. Customer asked for store credit.
@@ -0,0 +1,28 @@
1
+ id: file-timeline
2
+ goal: File the checkout outage as a structured card
3
+ context: Memory new-notebook already exists. This key does not.
4
+ constraints: The card body is the note exactly. Do not change the cover.
5
+ input:
6
+ key: TICKET-3180
7
+ note: |
8
+ # Checkout 502s — EU
9
+
10
+ ## What broke
11
+
12
+ EU checkout returned 502 from 14:10 UTC. The payments migration in `releases/2.4.1` was the trigger. US traffic stayed up.
13
+
14
+ ## Timeline
15
+
16
+ 1. **14:10** — Error rate crossed 8% on `POST /checkout`.
17
+ 2. **14:22** — On-call paged `ada@example.com`.
18
+ 3. **15:05** — Rollback of `releases/2.4.1` started.
19
+ 4. **16:40** — 502s stopped.
20
+
21
+ ## Not the cause
22
+
23
+ > The storefront cache was flushed at 13:40. That was a separate change and the 502s started later, only in EU.
24
+
25
+ ## Next
26
+
27
+ - Write the rollback note on `releases/2.4.1`
28
+ - Keep this ticket as the incident record
@@ -0,0 +1,46 @@
1
+ id: find-card
2
+ stages:
3
+ - id: find
4
+ entry: true
5
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
6
+ system_prompt: |
7
+ The task input has "key" and "query".
8
+ Do these steps in order, then stop:
9
+ 1. Call read_memory_card with memory "notebook" and that key.
10
+ 2. Call search_memory_cards with memory "notebook" and that query.
11
+ 3. Call read_memory with memory "notebook".
12
+ 4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","note":"<the exact card body>","hits":"<the search result as JSON text>","page":"<the exact cover>"}.
13
+ Do not call add_memory_card, update_memory_card, or replace_memory. Do not call any memory id other than notebook. Do not write files.
14
+ io:
15
+ input:
16
+ schema:
17
+ type: object
18
+ required:
19
+ - key
20
+ - query
21
+ properties:
22
+ key:
23
+ type: string
24
+ query:
25
+ type: string
26
+ additionalProperties: false
27
+ output:
28
+ schema:
29
+ type: object
30
+ required:
31
+ - key
32
+ - note
33
+ - hits
34
+ - page
35
+ properties:
36
+ key:
37
+ type: string
38
+ note:
39
+ type: string
40
+ hits:
41
+ type: string
42
+ page:
43
+ type: string
44
+ additionalProperties: false
45
+ memories:
46
+ - notebook
@@ -0,0 +1,7 @@
1
+ id: find-ticket-1842
2
+ goal: Read the ticket card and search the notebook
3
+ context: A later run. The card should already be filed under TICKET-1842.
4
+ constraints: Do not change the card or the cover.
5
+ input:
6
+ key: TICKET-1842
7
+ query: refund
@@ -0,0 +1,16 @@
1
+ id: missing-memory
2
+ memories:
3
+ - does-not-exist
4
+ stages:
5
+ - id: blocked
6
+ entry: true
7
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
8
+ system_prompt: |
9
+ This pipeline must not start. The memory it names does not exist.
10
+ io:
11
+ input:
12
+ schema:
13
+ type: object
14
+ output:
15
+ schema:
16
+ type: object
@@ -0,0 +1,24 @@
1
+ id: recall
2
+ memories:
3
+ - notebook
4
+ stages:
5
+ - id: read-page
6
+ entry: true
7
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
8
+ system_prompt: |
9
+ Call read_memory with memory "notebook". Do not call replace_memory.
10
+ Then call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"page":"<the exact text read_memory returned>"}.
11
+ Do not change the page. Do not write files.
12
+ io:
13
+ input:
14
+ schema:
15
+ type: object
16
+ output:
17
+ schema:
18
+ type: object
19
+ required:
20
+ - page
21
+ properties:
22
+ page:
23
+ type: string
24
+ additionalProperties: false
@@ -0,0 +1,5 @@
1
+ id: recall-notebook
2
+ goal: Read the shared notebook and report the page exactly
3
+ context: A later pipeline, attached to the same memory
4
+ constraints: Do not change the page
5
+ input: {}
@@ -0,0 +1,6 @@
1
+ id: remember-ada
2
+ goal: Add Ada to the shared notebook
3
+ context: First note in an empty notebook
4
+ constraints: One line only. Do not drop earlier lines.
5
+ input:
6
+ note: Ada was sourced.
@@ -0,0 +1,6 @@
1
+ id: remember-grace
2
+ goal: Add Grace to the shared notebook
3
+ context: The notebook already has earlier lines. Keep them.
4
+ constraints: One new line only. Do not drop earlier lines.
5
+ input:
6
+ note: Grace was shortlisted.
@@ -0,0 +1,58 @@
1
+ id: remember
2
+ stages:
3
+ - id: record
4
+ entry: true
5
+ route:
6
+ - to: confirm
7
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
8
+ system_prompt: |
9
+ The task input has one field, "note".
10
+ Do these steps in order, then stop:
11
+ 1. Call read_memory with memory "notebook".
12
+ 2. Call replace_memory with memory "notebook". Set content to the previous page, unchanged, then a newline if the page was not empty, then one new line "- " followed by the note. Keep every earlier line.
13
+ 3. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"note":"<the note>","page":"<the full new page>"}.
14
+ Do not call any memory id other than notebook. Do not write files.
15
+ io:
16
+ input:
17
+ schema:
18
+ type: object
19
+ required:
20
+ - note
21
+ properties:
22
+ note:
23
+ type: string
24
+ additionalProperties: false
25
+ output:
26
+ schema:
27
+ type: object
28
+ required:
29
+ - note
30
+ - page
31
+ properties:
32
+ note:
33
+ type: string
34
+ page:
35
+ type: string
36
+ additionalProperties: false
37
+ - id: confirm
38
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
39
+ system_prompt: |
40
+ Call read_memory with memory "notebook". Do not call replace_memory.
41
+ Then call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"page":"<the exact text read_memory returned>"}.
42
+ Do not change the page. Do not write files.
43
+ io:
44
+ input:
45
+ schema:
46
+ type: object
47
+ additionalProperties: true
48
+ output:
49
+ schema:
50
+ type: object
51
+ required:
52
+ - page
53
+ properties:
54
+ page:
55
+ type: string
56
+ additionalProperties: false
57
+ memories:
58
+ - notebook
@@ -0,0 +1,12 @@
1
+ version: 1
2
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
3
+ catalog:
4
+ pipelines:
5
+ - .
6
+ tasks:
7
+ - .
8
+ patterns:
9
+ pipeline: "*.pipeline.yaml"
10
+ task: "*.task.yaml"
11
+ exclude:
12
+ - missing.pipeline.yaml
@@ -0,0 +1,43 @@
1
+ id: update-card
2
+ memories:
3
+ - notebook
4
+ stages:
5
+ - id: revise
6
+ entry: true
7
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
8
+ system_prompt: |
9
+ The task input has "key" and "note".
10
+ Do these steps in order, then stop:
11
+ 1. Call read_memory_card with memory "notebook" and that key.
12
+ 2. Call update_memory_card with memory "notebook", that key, and content set to the note.
13
+ 3. Call read_memory_card again with memory "notebook" and that key.
14
+ 4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","before":"<the first read>","note":"<the second read>"}.
15
+ Do not call add_memory_card. Do not call replace_memory. Do not call any memory id other than notebook. Do not write files. If the first read returns MEMORY_CARD_NOT_FOUND, stop and emit status failure.
16
+ io:
17
+ input:
18
+ schema:
19
+ type: object
20
+ required:
21
+ - key
22
+ - note
23
+ properties:
24
+ key:
25
+ type: string
26
+ note:
27
+ type: string
28
+ additionalProperties: false
29
+ output:
30
+ schema:
31
+ type: object
32
+ required:
33
+ - key
34
+ - before
35
+ - note
36
+ properties:
37
+ key:
38
+ type: string
39
+ before:
40
+ type: string
41
+ note:
42
+ type: string
43
+ additionalProperties: false
@@ -0,0 +1,23 @@
1
+ id: update-ledger
2
+ goal: Replace the refund ledger after the customer confirmed the payout
3
+ context: orders/4412/ledger already exists on new-notebook. This replaces that card and leaves the previous copy for the operator.
4
+ constraints: The card body is the note exactly. Do not change the cover. Do not add a second card.
5
+ input:
6
+ key: orders/4412/ledger
7
+ note: |
8
+ # Refund ledger — order 4412
9
+
10
+ Closed. The customer confirmed the payout.
11
+
12
+ | When | Who | Action | Amount |
13
+ | --- | --- | --- | --- |
14
+ | 2026-10-18 09:12 | grace@example.com | Request opened | 86.40 USD |
15
+ | 2026-10-18 11:04 | TICKET-2040 | Store credit declined | — |
16
+ | 2026-10-19 16:22 | payments | Paid to original card | 86.40 USD |
17
+ | 2026-10-20 09:03 | customer | Confirmed payout | 86.40 USD |
18
+
19
+ Still open:
20
+
21
+ - [x] Customer confirmed the payout
22
+ - [x] Reviewer recorded the decline
23
+ - [x] Receipt attached to the ticket
@@ -0,0 +1,44 @@
1
+ id: update-rich
2
+ memories:
3
+ - new-notebook
4
+ stages:
5
+ - id: revise
6
+ entry: true
7
+ model: openrouter/nvidia/nemotron-3.5-lightning:free
8
+ system_prompt: |
9
+ The task input has "key" and "note".
10
+ The note is the full new card body. Copy it unchanged, including tables and lists.
11
+ Do these steps in order, then stop:
12
+ 1. Call read_memory_card with memory "new-notebook" and that key.
13
+ 2. Call update_memory_card with memory "new-notebook", that key, and content set to the note exactly.
14
+ 3. Call read_memory_card again with memory "new-notebook" and that key.
15
+ 4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","before":"<the first read>","note":"<the second read>"}.
16
+ Do not call add_memory_card or replace_memory. Do not call any memory id other than new-notebook. Do not write files. If the card is missing, emit status failure.
17
+ io:
18
+ input:
19
+ schema:
20
+ type: object
21
+ required:
22
+ - key
23
+ - note
24
+ properties:
25
+ key:
26
+ type: string
27
+ note:
28
+ type: string
29
+ additionalProperties: false
30
+ output:
31
+ schema:
32
+ type: object
33
+ required:
34
+ - key
35
+ - before
36
+ - note
37
+ properties:
38
+ key:
39
+ type: string
40
+ before:
41
+ type: string
42
+ note:
43
+ type: string
44
+ additionalProperties: false
@@ -0,0 +1,7 @@
1
+ id: update-ticket-1842
2
+ goal: Replace the ticket card with a later decision
3
+ context: The card TICKET-1842 already exists. This run changes that card only.
4
+ constraints: Do not add a second card. Do not change the cover.
5
+ input:
6
+ key: TICKET-1842
7
+ note: Refund paid out for order 4412. Store credit was declined.