@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.
- package/dist/bin/agent-serve.js +1 -8
- package/dist/channels/bitbucket/types.d.ts +2 -4
- package/dist/channels/bitbucket/types.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +1 -0
- package/dist/channels/deployments/types.d.ts +7 -8
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/types.d.ts +2 -4
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/types.d.ts +2 -5
- package/dist/channels/gitlab/types.d.ts.map +1 -1
- package/dist/channels/origin/types.d.ts +2 -3
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +3 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +48 -11
- package/dist/channels/slack/types.d.ts +4 -3
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/ab.html +6 -6
- package/dist/docs/assets/{app.DbMWUyGb.js → app.CtuckIiL.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DXXZxiMv.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DcNeTh9o.js → VPLocalSearchBox.Bkkhnu8K.js} +2 -2
- package/dist/docs/assets/chunks/{theme.DMjhY3gl.js → theme.DhpIe0Pa.js} +2 -2
- package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.js +9 -0
- package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.lean.js +1 -0
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.js → guides_opentelemetry.md.SCRMskno.js} +3 -3
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.lean.js → guides_opentelemetry.md.SCRMskno.lean.js} +1 -1
- package/dist/docs/assets/index.md.BW_6tOgR.js +5 -0
- package/dist/docs/assets/index.md.BW_6tOgR.lean.js +1 -0
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.js → reference_channels.md.D-qTqwcq.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.lean.js → reference_channels.md.D-qTqwcq.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.CJNc_xYK.js → reference_cli.md.Dm67hd2D.js} +3 -2
- package/dist/docs/assets/{reference_extensions.md.DykHW3qL.js → reference_extensions.md.CGmMLblt.js} +1 -1
- package/dist/docs/assets/{skills_otel.md.CqhobH3B.js → skills_otel.md.B5Ddv1xH.js} +1 -1
- package/dist/docs/assets/{style.BRuM8477.css → style.DCD_zyg3.css} +1 -1
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +3 -0
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +1 -0
- package/dist/docs/building-with-agents.html +6 -6
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +6 -6
- package/dist/docs/evals.html +6 -6
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/cloud-agents.html +6 -6
- package/dist/docs/guides/convert-automation.html +6 -6
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/grokbot-agents.html +35 -0
- package/dist/docs/guides/grokbot-agents.md +88 -0
- package/dist/docs/guides/human-in-the-loop.html +6 -6
- package/dist/docs/guides/mcp-oauth.html +6 -6
- package/dist/docs/guides/opentelemetry.html +8 -8
- package/dist/docs/guides/opentelemetry.md +3 -4
- package/dist/docs/guides/slack.html +6 -6
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/index.html +8 -8
- package/dist/docs/index.md +6 -1
- package/dist/docs/llms-full.txt +178 -30
- package/dist/docs/llms.txt +2 -0
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/artifacts.html +6 -6
- package/dist/docs/reference/channels.html +7 -7
- package/dist/docs/reference/channels.md +11 -19
- package/dist/docs/reference/cli.html +10 -9
- package/dist/docs/reference/cli.md +7 -3
- package/dist/docs/reference/connections.html +6 -6
- package/dist/docs/reference/extensions.html +7 -7
- package/dist/docs/reference/extensions.md +2 -0
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/instructions.html +6 -6
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/prompt.html +6 -6
- package/dist/docs/reference/result.html +6 -6
- package/dist/docs/reference/schedules.html +6 -6
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/skills/ab.html +6 -6
- package/dist/docs/skills/create-agent.html +6 -6
- package/dist/docs/skills/debug.html +5 -5
- package/dist/docs/skills/evals.html +6 -6
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/github.html +6 -6
- package/dist/docs/skills/hillclimb.html +6 -6
- package/dist/docs/skills/index.html +5 -5
- package/dist/docs/skills/mcp-auth.html +6 -6
- package/dist/docs/skills/otel.html +8 -8
- package/dist/docs/skills/otel.md +3 -3
- package/dist/docs/skills/setup-slack.html +6 -6
- package/dist/docs/storage.html +6 -6
- package/dist/docs/templates/agentic-owners.html +6 -6
- package/dist/docs/templates/agents-md.html +6 -6
- package/dist/docs/templates/code-wiki.html +6 -6
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/grokbot-agents.html +29 -0
- package/dist/docs/templates/grokbot-agents.md +48 -0
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/security-help.html +6 -6
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/triage.html +6 -6
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/files.d.ts +7 -2
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +7 -2
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +23 -11
- package/dist/internal/cursor/backend-client.d.ts +25 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +57 -2
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +1 -0
- package/dist/internal/deploy-client.d.ts +8 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +14 -0
- package/dist/internal/deploy-manifest.d.ts +3 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +15 -12
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +1 -0
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +7 -3
- package/dist/internal/discovery/modules.d.ts +1 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +1 -0
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +3 -0
- package/dist/internal/discovery/reminders.d.ts +7 -0
- package/dist/internal/discovery/reminders.d.ts.map +1 -0
- package/dist/internal/discovery/reminders.js +65 -0
- package/dist/internal/discovery/subagent.js +1 -0
- package/dist/internal/distribution.d.ts +5 -0
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +17 -0
- package/dist/internal/framework-file-storage.d.ts +3 -1
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +3 -1
- package/dist/internal/framework-storage-selection.d.ts +14 -3
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +36 -6
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +2 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +48 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +60 -0
- package/dist/internal/hosted-delivery.d.ts +17 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +112 -19
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -1
- package/dist/internal/hosted-managed-automation.js +27 -2
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -1
- package/dist/internal/local-control-plane.d.ts +18 -2
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +199 -17
- package/dist/internal/reminder-control-plane-protocol.d.ts +187 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
- package/dist/internal/reminder-control-plane-protocol.js +244 -0
- package/dist/internal/reminder-runner.d.ts +48 -6
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +336 -48
- package/dist/internal/reminder-schedule.d.ts +5 -2
- package/dist/internal/reminder-schedule.d.ts.map +1 -1
- package/dist/internal/reminder-schedule.js +8 -6
- package/dist/internal/reminder-store.d.ts +24 -7
- package/dist/internal/reminder-store.d.ts.map +1 -1
- package/dist/internal/reminder-store.js +6 -5
- package/dist/internal/request-error-status.d.ts +2 -0
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +22 -3
- package/dist/internal/scm/pr-url.d.ts +40 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -1
- package/dist/internal/scm/pr-url.js +93 -14
- package/dist/internal/sdk-runner.d.ts +12 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +18 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +78 -30
- package/dist/internal/session-engine.d.ts +12 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +137 -52
- package/dist/internal/store-mirror.d.ts +2 -2
- package/dist/internal/store-mirror.js +2 -2
- package/dist/internal/tenant-slack/relay.d.ts +2 -0
- package/dist/internal/tenant-slack/relay.d.ts.map +1 -1
- package/dist/internal/tenant-slack/relay.js +18 -8
- package/dist/internal/workspace-sync.d.ts +31 -6
- package/dist/internal/workspace-sync.d.ts.map +1 -1
- package/dist/internal/workspace-sync.js +67 -12
- package/dist/internal/workspace.d.ts +9 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +16 -0
- package/dist/playground/assets/index-Bq2HpEQB.js +67 -0
- package/dist/playground/assets/index-CZKKNlmb.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/reminders.d.ts +24 -5
- package/dist/reminders.d.ts.map +1 -1
- package/dist/reminders.js +28 -5
- package/dist/types.d.ts +98 -28
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +6 -1
- package/docs/guides/grokbot-agents.md +93 -0
- package/docs/guides/opentelemetry.md +3 -4
- package/docs/reference/channels.md +11 -19
- package/docs/reference/cli.md +7 -3
- package/docs/reference/extensions.md +2 -0
- package/docs/templates/grokbot-agents.md +53 -0
- package/package.json +12 -3
- package/skills/otel/SKILL.md +3 -3
- package/src/bin/agent-serve.ts +1 -9
- package/src/channels/bitbucket/types.ts +2 -4
- package/src/channels/deployments/deployments-channel.ts +1 -0
- package/src/channels/deployments/types.ts +7 -8
- package/src/channels/github/types.ts +2 -4
- package/src/channels/gitlab/types.ts +2 -5
- package/src/channels/origin/types.ts +2 -3
- package/src/channels/slack/defaults.ts +3 -0
- package/src/channels/slack/dispatch.ts +1 -0
- package/src/channels/slack/live-delivery.ts +53 -12
- package/src/channels/slack/types.ts +4 -3
- package/src/files.ts +9 -2
- package/src/index.ts +6 -3
- package/src/internal/cli-deploy.ts +30 -12
- package/src/internal/cursor/backend-client.ts +90 -2
- package/src/internal/cursor-agent-template.ts +1 -0
- package/src/internal/deploy-client.ts +16 -0
- package/src/internal/deploy-manifest.ts +16 -11
- package/src/internal/discovery/agent.ts +1 -0
- package/src/internal/discovery/info.ts +6 -0
- package/src/internal/discovery/modules.ts +2 -4
- package/src/internal/discovery/project.ts +3 -0
- package/src/internal/discovery/reminders.ts +65 -0
- package/src/internal/discovery/subagent.ts +1 -0
- package/src/internal/distribution.ts +20 -0
- package/src/internal/framework-file-storage.ts +3 -1
- package/src/internal/framework-storage-selection.ts +43 -6
- package/src/internal/guest-network.ts +3 -0
- package/src/internal/hosted-delivery-protocol.ts +96 -0
- package/src/internal/hosted-delivery.ts +207 -28
- package/src/internal/hosted-managed-automation.ts +49 -5
- package/src/internal/init-project.ts +4 -1
- package/src/internal/local-control-plane.ts +281 -22
- package/src/internal/reminder-control-plane-protocol.ts +499 -0
- package/src/internal/reminder-runner.ts +421 -48
- package/src/internal/reminder-schedule.ts +11 -6
- package/src/internal/reminder-store.ts +27 -7
- package/src/internal/request-error-status.ts +27 -3
- package/src/internal/scm/pr-url.ts +167 -20
- package/src/internal/sdk-runner.ts +19 -0
- package/src/internal/server.ts +85 -16
- package/src/internal/session-engine.ts +173 -56
- package/src/internal/store-mirror.ts +2 -2
- package/src/internal/tenant-slack/relay.ts +28 -4
- package/src/internal/workspace-sync.ts +84 -12
- package/src/internal/workspace.ts +20 -0
- package/src/reminders.ts +35 -4
- package/src/types.ts +104 -28
- package/templates/grokbot-agents/README.md +26 -0
- package/templates/grokbot-agents/agent/agent.ts +6 -0
- package/templates/grokbot-agents/agent/extensions/grokbot.ts +5 -0
- package/templates/grokbot-agents/agent/instructions.md +7 -0
- package/templates/grokbot-agents/evals/evals.config.ts +5 -0
- package/templates/grokbot-agents/evals/grokbot-agents.eval.ts +18 -0
- package/templates/grokbot-agents/init.json +18 -0
- package/templates/grokbot-agents/package.json +17 -0
- package/templates/grokbot-agents/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +0 -1
- package/dist/docs/assets/index.md.D75GWhPl.js +0 -5
- package/dist/docs/assets/index.md.D75GWhPl.lean.js +0 -1
- package/dist/playground/assets/index-8YiozU89.js +0 -67
- package/dist/playground/assets/index-MbMxXg-y.css +0 -1
- /package/dist/docs/assets/{reference_cli.md.CJNc_xYK.lean.js → reference_cli.md.Dm67hd2D.lean.js} +0 -0
- /package/dist/docs/assets/{reference_extensions.md.DykHW3qL.lean.js → reference_extensions.md.CGmMLblt.lean.js} +0 -0
- /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
|
|
285
|
-
*
|
|
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
|
|
1930
|
-
*
|
|
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
|
|
2116
|
-
*
|
|
2117
|
-
* the
|
|
2118
|
-
*
|
|
2119
|
-
*
|
|
2120
|
-
*
|
|
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.
|
|
2610
|
-
*
|
|
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,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,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
|
+
}
|