@cursor/july 0.1.104 → 0.1.107

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 (286) hide show
  1. package/dist/bin/agent-serve.js +1 -8
  2. package/dist/channels/bitbucket/types.d.ts +2 -4
  3. package/dist/channels/bitbucket/types.d.ts.map +1 -1
  4. package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
  5. package/dist/channels/deployments/deployments-channel.js +1 -0
  6. package/dist/channels/deployments/types.d.ts +7 -8
  7. package/dist/channels/deployments/types.d.ts.map +1 -1
  8. package/dist/channels/github/types.d.ts +2 -4
  9. package/dist/channels/github/types.d.ts.map +1 -1
  10. package/dist/channels/gitlab/types.d.ts +2 -5
  11. package/dist/channels/gitlab/types.d.ts.map +1 -1
  12. package/dist/channels/origin/types.d.ts +2 -3
  13. package/dist/channels/origin/types.d.ts.map +1 -1
  14. package/dist/channels/slack/defaults.d.ts.map +1 -1
  15. package/dist/channels/slack/defaults.js +3 -0
  16. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  17. package/dist/channels/slack/dispatch.js +1 -1
  18. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  19. package/dist/channels/slack/live-delivery.js +48 -11
  20. package/dist/channels/slack/types.d.ts +4 -3
  21. package/dist/channels/slack/types.d.ts.map +1 -1
  22. package/dist/docs/404.html +3 -3
  23. package/dist/docs/ab.html +6 -6
  24. package/dist/docs/assets/{app.DbMWUyGb.js → app.CtuckIiL.js} +1 -1
  25. package/dist/docs/assets/chunks/@localSearchIndexroot.DXXZxiMv.js +1 -0
  26. package/dist/docs/assets/chunks/{VPLocalSearchBox.DcNeTh9o.js → VPLocalSearchBox.Bkkhnu8K.js} +2 -2
  27. package/dist/docs/assets/chunks/{theme.DMjhY3gl.js → theme.DhpIe0Pa.js} +2 -2
  28. package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.js +9 -0
  29. package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.lean.js +1 -0
  30. package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.js → guides_opentelemetry.md.SCRMskno.js} +3 -3
  31. package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.lean.js → guides_opentelemetry.md.SCRMskno.lean.js} +1 -1
  32. package/dist/docs/assets/index.md.BW_6tOgR.js +5 -0
  33. package/dist/docs/assets/index.md.BW_6tOgR.lean.js +1 -0
  34. package/dist/docs/assets/{reference_channels.md.DBGcaB7m.js → reference_channels.md.D-qTqwcq.js} +2 -2
  35. package/dist/docs/assets/{reference_channels.md.DBGcaB7m.lean.js → reference_channels.md.D-qTqwcq.lean.js} +1 -1
  36. package/dist/docs/assets/{reference_cli.md.CJNc_xYK.js → reference_cli.md.Dm67hd2D.js} +3 -2
  37. package/dist/docs/assets/{reference_extensions.md.DykHW3qL.js → reference_extensions.md.CGmMLblt.js} +1 -1
  38. package/dist/docs/assets/{skills_otel.md.CqhobH3B.js → skills_otel.md.B5Ddv1xH.js} +1 -1
  39. package/dist/docs/assets/{style.BRuM8477.css → style.DCD_zyg3.css} +1 -1
  40. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +3 -0
  41. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +1 -0
  42. package/dist/docs/building-with-agents.html +6 -6
  43. package/dist/docs/concepts.html +5 -5
  44. package/dist/docs/deployment.html +6 -6
  45. package/dist/docs/evals.html +6 -6
  46. package/dist/docs/guides/agent-to-agent.html +6 -6
  47. package/dist/docs/guides/cloud-agents.html +6 -6
  48. package/dist/docs/guides/convert-automation.html +6 -6
  49. package/dist/docs/guides/github.html +6 -6
  50. package/dist/docs/guides/grokbot-agents.html +35 -0
  51. package/dist/docs/guides/grokbot-agents.md +88 -0
  52. package/dist/docs/guides/human-in-the-loop.html +6 -6
  53. package/dist/docs/guides/mcp-oauth.html +6 -6
  54. package/dist/docs/guides/opentelemetry.html +8 -8
  55. package/dist/docs/guides/opentelemetry.md +3 -4
  56. package/dist/docs/guides/slack.html +6 -6
  57. package/dist/docs/guides/webhooks.html +6 -6
  58. package/dist/docs/hashmap.json +1 -1
  59. package/dist/docs/hillclimbing.html +6 -6
  60. package/dist/docs/index.html +8 -8
  61. package/dist/docs/index.md +6 -1
  62. package/dist/docs/llms-full.txt +178 -30
  63. package/dist/docs/llms.txt +2 -0
  64. package/dist/docs/quickstart.html +6 -6
  65. package/dist/docs/reference/agent-config.html +6 -6
  66. package/dist/docs/reference/artifacts.html +6 -6
  67. package/dist/docs/reference/channels.html +7 -7
  68. package/dist/docs/reference/channels.md +11 -19
  69. package/dist/docs/reference/cli.html +10 -9
  70. package/dist/docs/reference/cli.md +7 -3
  71. package/dist/docs/reference/connections.html +6 -6
  72. package/dist/docs/reference/extensions.html +7 -7
  73. package/dist/docs/reference/extensions.md +2 -0
  74. package/dist/docs/reference/hooks.html +6 -6
  75. package/dist/docs/reference/http-api.html +6 -6
  76. package/dist/docs/reference/instructions.html +6 -6
  77. package/dist/docs/reference/playground.html +5 -5
  78. package/dist/docs/reference/project-layout.html +6 -6
  79. package/dist/docs/reference/prompt.html +6 -6
  80. package/dist/docs/reference/result.html +6 -6
  81. package/dist/docs/reference/schedules.html +6 -6
  82. package/dist/docs/reference/sessions.html +5 -5
  83. package/dist/docs/reference/skills.html +6 -6
  84. package/dist/docs/reference/subagents.html +6 -6
  85. package/dist/docs/reference/tools.html +6 -6
  86. package/dist/docs/scaffolding-agents.html +5 -5
  87. package/dist/docs/skills/ab.html +6 -6
  88. package/dist/docs/skills/create-agent.html +6 -6
  89. package/dist/docs/skills/debug.html +5 -5
  90. package/dist/docs/skills/evals.html +6 -6
  91. package/dist/docs/skills/framework-map.html +5 -5
  92. package/dist/docs/skills/github.html +6 -6
  93. package/dist/docs/skills/hillclimb.html +6 -6
  94. package/dist/docs/skills/index.html +5 -5
  95. package/dist/docs/skills/mcp-auth.html +6 -6
  96. package/dist/docs/skills/otel.html +8 -8
  97. package/dist/docs/skills/otel.md +3 -3
  98. package/dist/docs/skills/setup-slack.html +6 -6
  99. package/dist/docs/storage.html +6 -6
  100. package/dist/docs/templates/agentic-owners.html +6 -6
  101. package/dist/docs/templates/agents-md.html +6 -6
  102. package/dist/docs/templates/code-wiki.html +6 -6
  103. package/dist/docs/templates/demo.html +6 -6
  104. package/dist/docs/templates/grokbot-agents.html +29 -0
  105. package/dist/docs/templates/grokbot-agents.md +48 -0
  106. package/dist/docs/templates/pr-autofixer.html +6 -6
  107. package/dist/docs/templates/security-help.html +6 -6
  108. package/dist/docs/templates/security-reviewer.html +6 -6
  109. package/dist/docs/templates/triage.html +6 -6
  110. package/dist/docs/troubleshooting.html +5 -5
  111. package/dist/files.d.ts +7 -2
  112. package/dist/files.d.ts.map +1 -1
  113. package/dist/files.js +7 -2
  114. package/dist/index.d.ts +4 -5
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +3 -4
  117. package/dist/internal/cli-deploy.d.ts.map +1 -1
  118. package/dist/internal/cli-deploy.js +23 -11
  119. package/dist/internal/cursor/backend-client.d.ts +25 -0
  120. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  121. package/dist/internal/cursor/backend-client.js +57 -2
  122. package/dist/internal/cursor-agent-template.d.ts +1 -1
  123. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  124. package/dist/internal/cursor-agent-template.js +1 -0
  125. package/dist/internal/deploy-client.d.ts +8 -0
  126. package/dist/internal/deploy-client.d.ts.map +1 -1
  127. package/dist/internal/deploy-client.js +14 -0
  128. package/dist/internal/deploy-manifest.d.ts +3 -0
  129. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  130. package/dist/internal/deploy-manifest.js +15 -12
  131. package/dist/internal/discovery/agent.d.ts.map +1 -1
  132. package/dist/internal/discovery/agent.js +1 -0
  133. package/dist/internal/discovery/info.d.ts.map +1 -1
  134. package/dist/internal/discovery/info.js +7 -3
  135. package/dist/internal/discovery/modules.d.ts +1 -1
  136. package/dist/internal/discovery/modules.d.ts.map +1 -1
  137. package/dist/internal/discovery/modules.js +1 -0
  138. package/dist/internal/discovery/project.d.ts.map +1 -1
  139. package/dist/internal/discovery/project.js +3 -0
  140. package/dist/internal/discovery/reminders.d.ts +7 -0
  141. package/dist/internal/discovery/reminders.d.ts.map +1 -0
  142. package/dist/internal/discovery/reminders.js +65 -0
  143. package/dist/internal/discovery/subagent.js +1 -0
  144. package/dist/internal/distribution.d.ts +5 -0
  145. package/dist/internal/distribution.d.ts.map +1 -1
  146. package/dist/internal/distribution.js +17 -0
  147. package/dist/internal/framework-file-storage.d.ts +3 -1
  148. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  149. package/dist/internal/framework-file-storage.js +3 -1
  150. package/dist/internal/framework-storage-selection.d.ts +14 -3
  151. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  152. package/dist/internal/framework-storage-selection.js +36 -6
  153. package/dist/internal/guest-network.d.ts.map +1 -1
  154. package/dist/internal/guest-network.js +2 -0
  155. package/dist/internal/hosted-delivery-protocol.d.ts +48 -0
  156. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  157. package/dist/internal/hosted-delivery-protocol.js +60 -0
  158. package/dist/internal/hosted-delivery.d.ts +17 -0
  159. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  160. package/dist/internal/hosted-delivery.js +112 -19
  161. package/dist/internal/hosted-managed-automation.d.ts.map +1 -1
  162. package/dist/internal/hosted-managed-automation.js +27 -2
  163. package/dist/internal/init-project.d.ts.map +1 -1
  164. package/dist/internal/init-project.js +4 -1
  165. package/dist/internal/local-control-plane.d.ts +18 -2
  166. package/dist/internal/local-control-plane.d.ts.map +1 -1
  167. package/dist/internal/local-control-plane.js +199 -17
  168. package/dist/internal/reminder-control-plane-protocol.d.ts +187 -0
  169. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
  170. package/dist/internal/reminder-control-plane-protocol.js +244 -0
  171. package/dist/internal/reminder-runner.d.ts +48 -6
  172. package/dist/internal/reminder-runner.d.ts.map +1 -1
  173. package/dist/internal/reminder-runner.js +336 -48
  174. package/dist/internal/reminder-schedule.d.ts +5 -2
  175. package/dist/internal/reminder-schedule.d.ts.map +1 -1
  176. package/dist/internal/reminder-schedule.js +8 -6
  177. package/dist/internal/reminder-store.d.ts +24 -7
  178. package/dist/internal/reminder-store.d.ts.map +1 -1
  179. package/dist/internal/reminder-store.js +6 -5
  180. package/dist/internal/request-error-status.d.ts +2 -0
  181. package/dist/internal/request-error-status.d.ts.map +1 -1
  182. package/dist/internal/request-error-status.js +22 -3
  183. package/dist/internal/scm/pr-url.d.ts +40 -0
  184. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  185. package/dist/internal/scm/pr-url.js +93 -14
  186. package/dist/internal/sdk-runner.d.ts +12 -0
  187. package/dist/internal/sdk-runner.d.ts.map +1 -1
  188. package/dist/internal/sdk-runner.js +18 -0
  189. package/dist/internal/server.d.ts.map +1 -1
  190. package/dist/internal/server.js +78 -30
  191. package/dist/internal/session-engine.d.ts +12 -0
  192. package/dist/internal/session-engine.d.ts.map +1 -1
  193. package/dist/internal/session-engine.js +137 -52
  194. package/dist/internal/store-mirror.d.ts +2 -2
  195. package/dist/internal/store-mirror.js +2 -2
  196. package/dist/internal/tenant-slack/relay.d.ts +2 -0
  197. package/dist/internal/tenant-slack/relay.d.ts.map +1 -1
  198. package/dist/internal/tenant-slack/relay.js +18 -8
  199. package/dist/internal/workspace-sync.d.ts +31 -6
  200. package/dist/internal/workspace-sync.d.ts.map +1 -1
  201. package/dist/internal/workspace-sync.js +67 -12
  202. package/dist/internal/workspace.d.ts +9 -0
  203. package/dist/internal/workspace.d.ts.map +1 -1
  204. package/dist/internal/workspace.js +16 -0
  205. package/dist/playground/assets/index-Bq2HpEQB.js +67 -0
  206. package/dist/playground/assets/index-CZKKNlmb.css +1 -0
  207. package/dist/playground/index.html +2 -2
  208. package/dist/reminders.d.ts +24 -5
  209. package/dist/reminders.d.ts.map +1 -1
  210. package/dist/reminders.js +28 -5
  211. package/dist/types.d.ts +98 -28
  212. package/dist/types.d.ts.map +1 -1
  213. package/docs/README.md +6 -1
  214. package/docs/guides/grokbot-agents.md +93 -0
  215. package/docs/guides/opentelemetry.md +3 -4
  216. package/docs/reference/channels.md +11 -19
  217. package/docs/reference/cli.md +7 -3
  218. package/docs/reference/extensions.md +2 -0
  219. package/docs/templates/grokbot-agents.md +53 -0
  220. package/package.json +12 -3
  221. package/skills/otel/SKILL.md +3 -3
  222. package/src/bin/agent-serve.ts +1 -9
  223. package/src/channels/bitbucket/types.ts +2 -4
  224. package/src/channels/deployments/deployments-channel.ts +1 -0
  225. package/src/channels/deployments/types.ts +7 -8
  226. package/src/channels/github/types.ts +2 -4
  227. package/src/channels/gitlab/types.ts +2 -5
  228. package/src/channels/origin/types.ts +2 -3
  229. package/src/channels/slack/defaults.ts +3 -0
  230. package/src/channels/slack/dispatch.ts +1 -0
  231. package/src/channels/slack/live-delivery.ts +53 -12
  232. package/src/channels/slack/types.ts +4 -3
  233. package/src/files.ts +9 -2
  234. package/src/index.ts +6 -3
  235. package/src/internal/cli-deploy.ts +30 -12
  236. package/src/internal/cursor/backend-client.ts +90 -2
  237. package/src/internal/cursor-agent-template.ts +1 -0
  238. package/src/internal/deploy-client.ts +16 -0
  239. package/src/internal/deploy-manifest.ts +16 -11
  240. package/src/internal/discovery/agent.ts +1 -0
  241. package/src/internal/discovery/info.ts +6 -0
  242. package/src/internal/discovery/modules.ts +2 -4
  243. package/src/internal/discovery/project.ts +3 -0
  244. package/src/internal/discovery/reminders.ts +65 -0
  245. package/src/internal/discovery/subagent.ts +1 -0
  246. package/src/internal/distribution.ts +20 -0
  247. package/src/internal/framework-file-storage.ts +3 -1
  248. package/src/internal/framework-storage-selection.ts +43 -6
  249. package/src/internal/guest-network.ts +3 -0
  250. package/src/internal/hosted-delivery-protocol.ts +96 -0
  251. package/src/internal/hosted-delivery.ts +207 -28
  252. package/src/internal/hosted-managed-automation.ts +49 -5
  253. package/src/internal/init-project.ts +4 -1
  254. package/src/internal/local-control-plane.ts +281 -22
  255. package/src/internal/reminder-control-plane-protocol.ts +499 -0
  256. package/src/internal/reminder-runner.ts +421 -48
  257. package/src/internal/reminder-schedule.ts +11 -6
  258. package/src/internal/reminder-store.ts +27 -7
  259. package/src/internal/request-error-status.ts +27 -3
  260. package/src/internal/scm/pr-url.ts +167 -20
  261. package/src/internal/sdk-runner.ts +19 -0
  262. package/src/internal/server.ts +85 -16
  263. package/src/internal/session-engine.ts +173 -56
  264. package/src/internal/store-mirror.ts +2 -2
  265. package/src/internal/tenant-slack/relay.ts +28 -4
  266. package/src/internal/workspace-sync.ts +84 -12
  267. package/src/internal/workspace.ts +20 -0
  268. package/src/reminders.ts +35 -4
  269. package/src/types.ts +104 -28
  270. package/templates/grokbot-agents/README.md +26 -0
  271. package/templates/grokbot-agents/agent/agent.ts +6 -0
  272. package/templates/grokbot-agents/agent/extensions/grokbot.ts +5 -0
  273. package/templates/grokbot-agents/agent/instructions.md +7 -0
  274. package/templates/grokbot-agents/evals/evals.config.ts +5 -0
  275. package/templates/grokbot-agents/evals/grokbot-agents.eval.ts +18 -0
  276. package/templates/grokbot-agents/init.json +18 -0
  277. package/templates/grokbot-agents/package.json +17 -0
  278. package/templates/grokbot-agents/tsconfig.json +12 -0
  279. package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +0 -1
  280. package/dist/docs/assets/index.md.D75GWhPl.js +0 -5
  281. package/dist/docs/assets/index.md.D75GWhPl.lean.js +0 -1
  282. package/dist/playground/assets/index-8YiozU89.js +0 -67
  283. package/dist/playground/assets/index-MbMxXg-y.css +0 -1
  284. /package/dist/docs/assets/{reference_cli.md.CJNc_xYK.lean.js → reference_cli.md.Dm67hd2D.lean.js} +0 -0
  285. /package/dist/docs/assets/{reference_extensions.md.DykHW3qL.lean.js → reference_extensions.md.CGmMLblt.lean.js} +0 -0
  286. /package/dist/docs/assets/{skills_otel.md.CqhobH3B.lean.js → skills_otel.md.B5Ddv1xH.lean.js} +0 -0
package/src/types.ts CHANGED
@@ -281,20 +281,8 @@ export interface AgentConfig {
281
281
  */
282
282
  tools?: ToolName[];
283
283
  /**
284
- * Hosted architecture this agent deploys onto. Omit or `"v1"` keeps the
285
- * current control plane and engine-minted conversation keys. `"v2"`
286
- * deploys onto the v2 control plane (v2 APIs and schemas). Omitted
287
- * channel `continuation` then inherits from declared events (`github.pr/v2`,
288
- * `github.issue/v2`, `github.none/v2`, `slack.thread/v2`, `origin.pr/v2`,
289
- * `deployments.deployment/v2`, `change_monitors.checkpoint/v2`,
290
- * `issues.issue/v2`, `none/v2`). An explicit per-channel selector
291
- * still overrides.
292
- *
293
- * ```ts
294
- * export default defineAgent({
295
- * architecture: "v2",
296
- * });
297
- * ```
284
+ * Hosted architecture override. Leave this unset unless Cursor instructs
285
+ * you to select a specific architecture.
298
286
  */
299
287
  architecture?: AgentArchitecture;
300
288
  }
@@ -1926,8 +1914,9 @@ export interface SessionRecord {
1926
1914
  */
1927
1915
  workspaceOverride?: string;
1928
1916
  /**
1929
- * One-shot files to write into the harness cwd before the next turn
1930
- * (see {@link SendMessageOptions.workspaceFiles}). Cleared after apply.
1917
+ * One-shot files for the next turn (see {@link SendMessageOptions.workspaceFiles}).
1918
+ * Local turns write them into the harness cwd. Cloud turns sync them onto
1919
+ * the session Agent Store prefix. Cleared after apply.
1931
1920
  */
1932
1921
  pendingWorkspaceFiles?: Record<
1933
1922
  string,
@@ -2112,12 +2101,12 @@ export interface SendMessageOptions {
2112
2101
  */
2113
2102
  workspaceDir?: string;
2114
2103
  /**
2115
- * Relative path → contents written into the session harness cwd after
2116
- * scaffold materialize and before the next turn. On create, queued for
2117
- * the first turn; on resume, replaces any pending files. Prefer this
2118
- * over {@link workspaceDir} when you only need to inject a few
2119
- * host-prepared files (skills/AGENTS.md still land in the normal
2120
- * session workspace). Values may be utf8 strings or
2104
+ * Relative path → contents for the next turn. Local turns write them into
2105
+ * the harness cwd after scaffold materialize. Cloud turns sync them onto
2106
+ * the session Agent Store prefix instead of the VM working directory. On
2107
+ * create, queued for the first turn; on resume, merged into any pending
2108
+ * files. Prefer this over {@link workspaceDir} when you only need to
2109
+ * inject a few host-prepared files. Values may be utf8 strings or
2121
2110
  * `{ encoding: "base64", data }` blobs (Slack attachments, binary docs).
2122
2111
  */
2123
2112
  workspaceFiles?: Record<
@@ -2436,6 +2425,13 @@ export type ChannelEventHandlers<TState = JsonValue> = {
2436
2425
  /** Bound helpers passed to {@link ChannelConfig.onStart}. */
2437
2426
  export interface ChannelStartArgs {
2438
2427
  send: SendMessageFn;
2428
+ /**
2429
+ * Hosted architecture from {@link AgentConfig.architecture}. Omitted
2430
+ * means v1. Host pipelines that call `send()` themselves (instead of
2431
+ * letting the channel adapter stamp continuation) branch on this so
2432
+ * v1 `continuationToken` and v2 `claim` stay mutually exclusive.
2433
+ */
2434
+ architecture?: AgentArchitecture;
2439
2435
  getSession(sessionId: string): Promise<ChannelSession | null>;
2440
2436
  receive(
2441
2437
  channel: ChannelDefinition | HttpChannelDefinition | string,
@@ -2606,9 +2602,8 @@ export interface HttpChannelConfig {
2606
2602
  /** Route auth chain. Defaults to `[localDevStrict()]`. */
2607
2603
  auth?: AuthPolicy[];
2608
2604
  /**
2609
- * Continuation selector. Omitted inherits {@link AgentConfig.architecture}:
2610
- * `"none/v1"` unless the agent set `architecture: "v2"` (then `"none/v2"`
2611
- * → `evt:`). Override with an explicit `"none/v1"` or `"none/v2"`.
2605
+ * Continuation selector. Omit this to inherit the agent architecture's
2606
+ * default. Set it explicitly only when migrating persisted identities.
2612
2607
  */
2613
2608
  continuation?: ContinuationIdentity;
2614
2609
  /**
@@ -2842,12 +2837,39 @@ export interface ScheduleConfig {
2842
2837
 
2843
2838
  export type ScheduleDefinition = ScheduleConfig & BrandedDefinition<"schedule">;
2844
2839
 
2840
+ // ============================================================================
2841
+ // Reminder handlers (agent/reminders/*) — named durable fire policies
2842
+ // ============================================================================
2843
+
2844
+ /**
2845
+ * Authored at `agent/reminders/<name>.ts`. The registry name is the module
2846
+ * stem. Pass the discovered definition to {@link ReminderCreateInput.handler}
2847
+ * with serializable {@link ReminderCreateInput.args}; the engine persists the
2848
+ * stem, not the function.
2849
+ */
2850
+ export interface ReminderHandlerConfig {
2851
+ /**
2852
+ * Invoked on every fire with {@link ReminderFireContext} (including the
2853
+ * create-time {@link ReminderFireContext.args} blob).
2854
+ */
2855
+ run: (ctx: ReminderFireContext) => Promise<ReminderFireResult>;
2856
+ }
2857
+
2858
+ export type ReminderDefinition = ReminderHandlerConfig &
2859
+ BrandedDefinition<"reminder">;
2860
+
2861
+ export interface DiscoveredReminder {
2862
+ name: string;
2863
+ definition: ReminderDefinition;
2864
+ }
2865
+
2845
2866
  // ============================================================================
2846
2867
  // Reminders (runtime per-session wakes)
2847
2868
  // ============================================================================
2848
2869
 
2849
2870
  export type ReminderBusyPolicy = "skipIfBusy" | "queueBehindTurn";
2850
2871
 
2872
+ /** Public reminder status. Internal claim state (`firing`) is not exposed. */
2851
2873
  export type ReminderStatus = "armed" | "completed" | "cancelled" | "disarmed";
2852
2874
 
2853
2875
  export type ReminderScheduleKind = "every" | "cron" | "delay" | "at";
@@ -2879,6 +2901,11 @@ export interface ReminderUntilContext {
2879
2901
 
2880
2902
  export interface ReminderFireContext extends ReminderUntilContext {
2881
2903
  appAuth: AuthContext;
2904
+ /**
2905
+ * Serializable args from {@link ReminderCreateInput.args} when the fire
2906
+ * uses a named {@link ReminderCreateInput.handler}. Empty object otherwise.
2907
+ */
2908
+ args: JsonObject;
2882
2909
  /** Wake the reminder's already-bound session (target is implicit). */
2883
2910
  followup(args: { message: string }): Promise<ChannelSession>;
2884
2911
  cancel(reason?: string): Promise<void>;
@@ -2893,9 +2920,11 @@ export interface ReminderFireContext extends ReminderUntilContext {
2893
2920
  /**
2894
2921
  * Create a durable wake bound to a channel continuation.
2895
2922
  *
2896
- * Exactly one of `prompt` | `run`, and exactly one of
2923
+ * Exactly one of `prompt` | `handler` | `run`, and exactly one of
2897
2924
  * `every` | `cron` | `delay` | `at`. Prompt fires always follow up into the
2898
- * bound session.
2925
+ * bound session. Named `handler` resolves `agent/reminders/<name>.ts` on
2926
+ * every fire (survives restart). Anonymous `run` stays supported on local
2927
+ * and hosted v1; hosted architecture v2 rejects it at create.
2899
2928
  *
2900
2929
  * @example Recurring (host policy)
2901
2930
  * ```ts
@@ -2913,6 +2942,28 @@ export interface ReminderFireContext extends ReminderUntilContext {
2913
2942
  * });
2914
2943
  * ```
2915
2944
  *
2945
+ * @example Named handler (durable across restart / hosted v2)
2946
+ * ```ts
2947
+ * // agent/reminders/verdict_recheck.ts
2948
+ * export default defineReminder({
2949
+ * async run({ args, followup }) {
2950
+ * // ...
2951
+ * return { action: "delivered" };
2952
+ * },
2953
+ * });
2954
+ *
2955
+ * import verdictRecheck from "./reminders/verdict_recheck.js";
2956
+ *
2957
+ * await host.reminders.create({
2958
+ * purpose: "verdict_recheck",
2959
+ * channelId: "origin",
2960
+ * continuationToken,
2961
+ * delay: "15m",
2962
+ * handler: verdictRecheck,
2963
+ * args: { headSha: "abc" },
2964
+ * });
2965
+ * ```
2966
+ *
2916
2967
  * @example One-shot (agent tool / prompt form)
2917
2968
  * ```ts
2918
2969
  * await host.reminders.create({
@@ -2933,8 +2984,22 @@ export interface ReminderCreateInput {
2933
2984
  continuationToken: string;
2934
2985
  /** Optional opaque metadata (e.g. `{ prUrl }`). */
2935
2986
  target?: Record<string, unknown>;
2936
- /** Exactly one of prompt or run. */
2987
+ /** Exactly one of prompt, handler, or run. */
2937
2988
  prompt?: string;
2989
+ /**
2990
+ * A definition discovered from `agent/reminders/<name>.ts`, or its stem
2991
+ * for compatibility. Mutually exclusive with `prompt` and `run`. The
2992
+ * definition form avoids coupling callers to a filename string; discovery
2993
+ * resolves it to the stable stem persisted by the control plane. Do not
2994
+ * combine with {@link until}; encode stop conditions in {@link args} and
2995
+ * the handler body.
2996
+ */
2997
+ handler?: ReminderDefinition | string;
2998
+ /**
2999
+ * Serializable args for {@link handler} (UTF-8 JSON capped at 32 KiB).
3000
+ * Only valid with `handler`.
3001
+ */
3002
+ args?: JsonObject;
2938
3003
  run?: (ctx: ReminderFireContext) => Promise<ReminderFireResult>;
2939
3004
  /** Exactly one schedule shape. */
2940
3005
  every?: string;
@@ -2944,6 +3009,9 @@ export interface ReminderCreateInput {
2944
3009
  /**
2945
3010
  * Auto-cancel: function (host evaluates, true → cancel) XOR prompt string
2946
3011
  * (agent-facing stop condition; platform does not interpret it).
3012
+ * Valid with `prompt` (string until) and legacy `run` (function until on
3013
+ * local / hosted v1). Not valid with named `handler`. Function until is
3014
+ * rejected on hosted architecture v2.
2947
3015
  */
2948
3016
  until?: string | ((ctx: ReminderUntilContext) => Promise<boolean>);
2949
3017
  /**
@@ -2961,6 +3029,10 @@ export interface ReminderInfo {
2961
3029
  scheduleKind: ReminderScheduleKind;
2962
3030
  scheduleValue: string;
2963
3031
  prompt?: string;
3032
+ /** Named handler stem when create used `handler`. */
3033
+ handler?: string;
3034
+ /** Serializable args when create used `handler`. */
3035
+ args?: JsonObject;
2964
3036
  untilPrompt?: string;
2965
3037
  busyPolicy: ReminderBusyPolicy;
2966
3038
  status: ReminderStatus;
@@ -3212,6 +3284,8 @@ export interface AgentProject {
3212
3284
  httpChannel: HttpChannelDefinition;
3213
3285
  channels: DiscoveredChannel[];
3214
3286
  schedules: DiscoveredSchedule[];
3287
+ /** Named reminder handlers from `agent/reminders/*` (optional / additive). */
3288
+ reminders?: DiscoveredReminder[];
3215
3289
  hooks: DiscoveredHook[];
3216
3290
  /** Live A/B metric experiments (`defineAB`). */
3217
3291
  abs: DiscoveredAB[];
@@ -3317,6 +3391,8 @@ export interface AgentProjectInfo {
3317
3391
  slackChannelPosts?: readonly string[];
3318
3392
  }>;
3319
3393
  schedules: Array<{ name: string; cron: string; kind: "markdown" | "run" }>;
3394
+ /** Named reminder handlers (`agent/reminders/<name>.ts`) when present. */
3395
+ reminders?: Array<{ name: string }>;
3320
3396
  hooks: string[];
3321
3397
  /** Live A/B experiment names (`defineAB` under `agent/ab`). */
3322
3398
  abs: string[];
@@ -0,0 +1,26 @@
1
+ # Grok Bot agents
2
+
3
+ Consults the Grok Bot agents you name. This agent stays in its own
4
+ conversation and reports the reply.
5
+
6
+ ```bash
7
+ npx @cursor/july init ./grokbot --template grokbot-agents
8
+ ```
9
+
10
+ `init` asks for the names shown in the Grok Bot app. Skip the prompt
11
+ with `--var agents="Plan Keeper, Chief of Staff"`.
12
+
13
+ ## Run
14
+
15
+ ```bash
16
+ agent-sdk login
17
+ agent-sdk dev
18
+ ```
19
+
20
+ In the playground, ask it to talk to one of the names you entered. A
21
+ name outside the list is refused.
22
+
23
+ ## Edit
24
+
25
+ - `agent/extensions/grokbot.ts`: who it may talk to
26
+ - `agent/instructions.md`: when to consult them
@@ -0,0 +1,6 @@
1
+ import { defineAgent } from "@cursor/july";
2
+
3
+ export default defineAgent({
4
+ // Empty allowlist: only the mounted Grok Bot tools.
5
+ tools: [],
6
+ });
@@ -0,0 +1,5 @@
1
+ import cursorGrokBotAgents from "@cursor/july/extensions/cursor-grokbot-agents";
2
+
3
+ export default cursorGrokBotAgents({
4
+ agents: ["Plan Keeper"],
5
+ });
@@ -0,0 +1,7 @@
1
+ # Grok Bot agents
2
+
3
+ Consult the Grok Bot agents named in `agent/extensions/grokbot.ts`. Stay in this conversation and report the reply.
4
+
5
+ When someone asks who you can talk to, call `grokbot__list`. Do not send a message.
6
+
7
+ When the question belongs to one of those agents, use the consult skill. A name outside the list is refused.
@@ -0,0 +1,5 @@
1
+ import { defineEvalConfig } from "@cursor/july/evals";
2
+
3
+ export default defineEvalConfig({
4
+ maxConcurrency: 10,
5
+ });
@@ -0,0 +1,18 @@
1
+ import { defineEval } from "@cursor/july/evals";
2
+
3
+ export default defineEval({
4
+ tags: ["smoke"],
5
+ cases: [
6
+ {
7
+ id: "list",
8
+ description: "Asked who it can talk to, it lists and does not send.",
9
+ async test(t) {
10
+ await t.send("Who can you talk to? List them. Do not message anyone.");
11
+ t.succeeded();
12
+ t.calledTool("grokbot__list");
13
+ t.notCalledTool("grokbot__ask");
14
+ t.notCalledTool("grokbot__interrupt");
15
+ },
16
+ },
17
+ ],
18
+ });
@@ -0,0 +1,18 @@
1
+ {
2
+ "questions": [
3
+ {
4
+ "id": "agents",
5
+ "prompt": "Which Grok Bot agents may this agent talk to?",
6
+ "hint": "Comma-separated names, as shown in the Grok Bot app.",
7
+ "placeholder": "Plan Keeper, Chief of Staff"
8
+ }
9
+ ],
10
+ "replace": [
11
+ {
12
+ "file": "agent/extensions/grokbot.ts",
13
+ "find": "[\"Plan Keeper\"]",
14
+ "answer": "agents",
15
+ "as": "json-array"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "grokbot-agents",
3
+ "private": true,
4
+ "type": "module",
5
+ "description": "Consults the Grok Bot agents you name.",
6
+ "scripts": {
7
+ "check": "tsc --noEmit",
8
+ "dev": "agent-sdk dev"
9
+ },
10
+ "dependencies": {
11
+ "@cursor/july": "latest"
12
+ },
13
+ "devDependencies": {
14
+ "@types/node": "^22.14.0",
15
+ "typescript": "^5.8.0"
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "noEmit": true,
8
+ "skipLibCheck": true,
9
+ "types": ["node"]
10
+ },
11
+ "include": ["agent/**/*", "evals/**/*"]
12
+ }