@cursor/july 0.1.1
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/AGENTS.md +290 -0
- package/LICENSE.md +3 -0
- package/README.md +1233 -0
- package/dist/ab.d.ts +290 -0
- package/dist/ab.d.ts.map +1 -0
- package/dist/ab.js +386 -0
- package/dist/bin/agent-serve.d.ts +15 -0
- package/dist/bin/agent-serve.d.ts.map +1 -0
- package/dist/bin/agent-serve.js +754 -0
- package/dist/channels/github/api.d.ts +101 -0
- package/dist/channels/github/api.d.ts.map +1 -0
- package/dist/channels/github/api.js +229 -0
- package/dist/channels/github/auth.d.ts +67 -0
- package/dist/channels/github/auth.d.ts.map +1 -0
- package/dist/channels/github/auth.js +239 -0
- package/dist/channels/github/binding.d.ts +73 -0
- package/dist/channels/github/binding.d.ts.map +1 -0
- package/dist/channels/github/binding.js +114 -0
- package/dist/channels/github/defaults.d.ts +24 -0
- package/dist/channels/github/defaults.d.ts.map +1 -0
- package/dist/channels/github/defaults.js +100 -0
- package/dist/channels/github/events.d.ts +18 -0
- package/dist/channels/github/events.d.ts.map +1 -0
- package/dist/channels/github/events.js +59 -0
- package/dist/channels/github/forward.d.ts +137 -0
- package/dist/channels/github/forward.d.ts.map +1 -0
- package/dist/channels/github/forward.js +271 -0
- package/dist/channels/github/github-channel.d.ts +127 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -0
- package/dist/channels/github/github-channel.js +1688 -0
- package/dist/channels/github/index.d.ts +52 -0
- package/dist/channels/github/index.d.ts.map +1 -0
- package/dist/channels/github/index.js +51 -0
- package/dist/channels/github/replay.d.ts +115 -0
- package/dist/channels/github/replay.d.ts.map +1 -0
- package/dist/channels/github/replay.js +282 -0
- package/dist/channels/github/state.d.ts +26 -0
- package/dist/channels/github/state.d.ts.map +1 -0
- package/dist/channels/github/state.js +50 -0
- package/dist/channels/github/types.d.ts +385 -0
- package/dist/channels/github/types.d.ts.map +1 -0
- package/dist/channels/github/types.js +1 -0
- package/dist/channels/slack/api.d.ts +117 -0
- package/dist/channels/slack/api.d.ts.map +1 -0
- package/dist/channels/slack/api.js +437 -0
- package/dist/channels/slack/approvals.d.ts +32 -0
- package/dist/channels/slack/approvals.d.ts.map +1 -0
- package/dist/channels/slack/approvals.js +157 -0
- package/dist/channels/slack/assistant.d.ts +23 -0
- package/dist/channels/slack/assistant.d.ts.map +1 -0
- package/dist/channels/slack/assistant.js +67 -0
- package/dist/channels/slack/auth.d.ts +40 -0
- package/dist/channels/slack/auth.d.ts.map +1 -0
- package/dist/channels/slack/auth.js +71 -0
- package/dist/channels/slack/channel-watch.d.ts +46 -0
- package/dist/channels/slack/channel-watch.d.ts.map +1 -0
- package/dist/channels/slack/channel-watch.js +180 -0
- package/dist/channels/slack/constants.d.ts +17 -0
- package/dist/channels/slack/constants.d.ts.map +1 -0
- package/dist/channels/slack/constants.js +27 -0
- package/dist/channels/slack/credentials.d.ts +35 -0
- package/dist/channels/slack/credentials.d.ts.map +1 -0
- package/dist/channels/slack/credentials.js +88 -0
- package/dist/channels/slack/cursor-account.d.ts +76 -0
- package/dist/channels/slack/cursor-account.d.ts.map +1 -0
- package/dist/channels/slack/cursor-account.js +88 -0
- package/dist/channels/slack/defaults.d.ts +32 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -0
- package/dist/channels/slack/defaults.js +380 -0
- package/dist/channels/slack/dispatch.d.ts +43 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -0
- package/dist/channels/slack/dispatch.js +185 -0
- package/dist/channels/slack/doctor.d.ts +24 -0
- package/dist/channels/slack/doctor.d.ts.map +1 -0
- package/dist/channels/slack/doctor.js +115 -0
- package/dist/channels/slack/event-id-dedupe.d.ts +10 -0
- package/dist/channels/slack/event-id-dedupe.d.ts.map +1 -0
- package/dist/channels/slack/event-id-dedupe.js +23 -0
- package/dist/channels/slack/inbound.d.ts +41 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -0
- package/dist/channels/slack/inbound.js +166 -0
- package/dist/channels/slack/index.d.ts +45 -0
- package/dist/channels/slack/index.d.ts.map +1 -0
- package/dist/channels/slack/index.js +44 -0
- package/dist/channels/slack/init.d.ts +32 -0
- package/dist/channels/slack/init.d.ts.map +1 -0
- package/dist/channels/slack/init.js +82 -0
- package/dist/channels/slack/interactive.d.ts +19 -0
- package/dist/channels/slack/interactive.d.ts.map +1 -0
- package/dist/channels/slack/interactive.js +142 -0
- package/dist/channels/slack/links.d.ts +10 -0
- package/dist/channels/slack/links.d.ts.map +1 -0
- package/dist/channels/slack/links.js +19 -0
- package/dist/channels/slack/live-delivery.d.ts +75 -0
- package/dist/channels/slack/live-delivery.d.ts.map +1 -0
- package/dist/channels/slack/live-delivery.js +143 -0
- package/dist/channels/slack/log.d.ts +25 -0
- package/dist/channels/slack/log.d.ts.map +1 -0
- package/dist/channels/slack/log.js +47 -0
- package/dist/channels/slack/manifest.d.ts +57 -0
- package/dist/channels/slack/manifest.d.ts.map +1 -0
- package/dist/channels/slack/manifest.js +110 -0
- package/dist/channels/slack/pr-ref.d.ts +18 -0
- package/dist/channels/slack/pr-ref.d.ts.map +1 -0
- package/dist/channels/slack/pr-ref.js +36 -0
- package/dist/channels/slack/setup.d.ts +14 -0
- package/dist/channels/slack/setup.d.ts.map +1 -0
- package/dist/channels/slack/setup.js +86 -0
- package/dist/channels/slack/slack-channel.d.ts +15 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -0
- package/dist/channels/slack/slack-channel.js +281 -0
- package/dist/channels/slack/socket-mode.d.ts +26 -0
- package/dist/channels/slack/socket-mode.d.ts.map +1 -0
- package/dist/channels/slack/socket-mode.js +116 -0
- package/dist/channels/slack/stream.d.ts +26 -0
- package/dist/channels/slack/stream.d.ts.map +1 -0
- package/dist/channels/slack/stream.js +39 -0
- package/dist/channels/slack/tool-approval-events.d.ts +33 -0
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -0
- package/dist/channels/slack/tool-approval-events.js +129 -0
- package/dist/channels/slack/types.d.ts +326 -0
- package/dist/channels/slack/types.d.ts.map +1 -0
- package/dist/channels/slack/types.js +4 -0
- package/dist/channels.d.ts +116 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +294 -0
- package/dist/connections.d.ts +75 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +75 -0
- package/dist/docs/404.html +22 -0
- package/dist/docs/ab.html +87 -0
- package/dist/docs/assets/ab.md.COdXkces.js +63 -0
- package/dist/docs/assets/ab.md.COdXkces.lean.js +1 -0
- package/dist/docs/assets/app.DqfFEmJd.js +1 -0
- package/dist/docs/assets/building-with-agents.md.CJCtZCyi.js +13 -0
- package/dist/docs/assets/building-with-agents.md.CJCtZCyi.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.CcVk1uKq.js +1 -0
- package/dist/docs/assets/chunks/VPLocalSearchBox.BaLEdS15.js +9 -0
- package/dist/docs/assets/chunks/framework.CAZyNGu9.js +19 -0
- package/dist/docs/assets/chunks/theme.CZRvu_0q.js +2 -0
- package/dist/docs/assets/concepts.md.Cfb9b-k1.js +4 -0
- package/dist/docs/assets/concepts.md.Cfb9b-k1.lean.js +1 -0
- package/dist/docs/assets/deployment.md.Dx1TYNk5.js +14 -0
- package/dist/docs/assets/deployment.md.Dx1TYNk5.lean.js +1 -0
- package/dist/docs/assets/evals.md.DPZ_MAnI.js +85 -0
- package/dist/docs/assets/evals.md.DPZ_MAnI.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CrtrsySy.js +10 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CrtrsySy.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-runtime.md.CYlNMTNp.js +9 -0
- package/dist/docs/assets/guides_cloud-runtime.md.CYlNMTNp.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.DwbKhCeS.js +20 -0
- package/dist/docs/assets/guides_github.md.DwbKhCeS.lean.js +1 -0
- package/dist/docs/assets/guides_human-in-the-loop.md.Dvuctx7s.js +28 -0
- package/dist/docs/assets/guides_human-in-the-loop.md.Dvuctx7s.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.bv41fHfW.js +37 -0
- package/dist/docs/assets/guides_slack.md.bv41fHfW.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.hFTik3lf.js +50 -0
- package/dist/docs/assets/guides_webhooks.md.hFTik3lf.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.DHNast08.js +4 -0
- package/dist/docs/assets/hillclimbing.md.DHNast08.lean.js +1 -0
- package/dist/docs/assets/index.md.BPKcj5AI.js +20 -0
- package/dist/docs/assets/index.md.BPKcj5AI.lean.js +1 -0
- package/dist/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/dist/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/dist/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/dist/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/dist/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/dist/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/dist/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/dist/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/dist/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/dist/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/dist/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/dist/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/dist/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/dist/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/dist/docs/assets/quickstart.md.tVPiGK_L.js +35 -0
- package/dist/docs/assets/quickstart.md.tVPiGK_L.lean.js +1 -0
- package/dist/docs/assets/reference_agent-config.md.Bpd7HQwf.js +34 -0
- package/dist/docs/assets/reference_agent-config.md.Bpd7HQwf.lean.js +1 -0
- package/dist/docs/assets/reference_channels.md.D7JTR03W.js +53 -0
- package/dist/docs/assets/reference_channels.md.D7JTR03W.lean.js +1 -0
- package/dist/docs/assets/reference_cli.md.DA730zCu.js +33 -0
- package/dist/docs/assets/reference_cli.md.DA730zCu.lean.js +1 -0
- package/dist/docs/assets/reference_connections.md.C3vNH_DE.js +26 -0
- package/dist/docs/assets/reference_connections.md.C3vNH_DE.lean.js +1 -0
- package/dist/docs/assets/reference_hooks.md.BCEc3MyM.js +12 -0
- package/dist/docs/assets/reference_hooks.md.BCEc3MyM.lean.js +1 -0
- package/dist/docs/assets/reference_http-api.md.DBAahtdz.js +11 -0
- package/dist/docs/assets/reference_http-api.md.DBAahtdz.lean.js +1 -0
- package/dist/docs/assets/reference_instructions.md.BC05LEQ8.js +12 -0
- package/dist/docs/assets/reference_instructions.md.BC05LEQ8.lean.js +1 -0
- package/dist/docs/assets/reference_playground.md.CPZhfYaO.js +1 -0
- package/dist/docs/assets/reference_playground.md.CPZhfYaO.lean.js +1 -0
- package/dist/docs/assets/reference_project-layout.md.Bd_CKtNS.js +31 -0
- package/dist/docs/assets/reference_project-layout.md.Bd_CKtNS.lean.js +1 -0
- package/dist/docs/assets/reference_schedules.md.D7qijxLk.js +82 -0
- package/dist/docs/assets/reference_schedules.md.D7qijxLk.lean.js +1 -0
- package/dist/docs/assets/reference_sessions.md.DdjWabnN.js +8 -0
- package/dist/docs/assets/reference_sessions.md.DdjWabnN.lean.js +1 -0
- package/dist/docs/assets/reference_skills.md.VQnlBT3Q.js +15 -0
- package/dist/docs/assets/reference_skills.md.VQnlBT3Q.lean.js +1 -0
- package/dist/docs/assets/reference_subagents.md.CIRAVcPK.js +10 -0
- package/dist/docs/assets/reference_subagents.md.CIRAVcPK.lean.js +1 -0
- package/dist/docs/assets/reference_tools.md.DF5kwlt0.js +46 -0
- package/dist/docs/assets/reference_tools.md.DF5kwlt0.lean.js +1 -0
- package/dist/docs/assets/scaffolding-agents.md.CyYfWGdc.js +1 -0
- package/dist/docs/assets/scaffolding-agents.md.CyYfWGdc.lean.js +1 -0
- package/dist/docs/assets/style.Bj-IXa5W.css +1 -0
- package/dist/docs/assets/troubleshooting.md.DkovjS7h.js +1 -0
- package/dist/docs/assets/troubleshooting.md.DkovjS7h.lean.js +1 -0
- package/dist/docs/building-with-agents.html +37 -0
- package/dist/docs/concepts.html +28 -0
- package/dist/docs/deployment.html +38 -0
- package/dist/docs/evals.html +109 -0
- package/dist/docs/guides/agent-to-agent.html +34 -0
- package/dist/docs/guides/cloud-runtime.html +33 -0
- package/dist/docs/guides/github.html +44 -0
- package/dist/docs/guides/human-in-the-loop.html +52 -0
- package/dist/docs/guides/slack.html +61 -0
- package/dist/docs/guides/webhooks.html +74 -0
- package/dist/docs/hashmap.json +1 -0
- package/dist/docs/hillclimbing.html +28 -0
- package/dist/docs/index.html +44 -0
- package/dist/docs/quickstart.html +59 -0
- package/dist/docs/reference/agent-config.html +58 -0
- package/dist/docs/reference/channels.html +77 -0
- package/dist/docs/reference/cli.html +57 -0
- package/dist/docs/reference/connections.html +50 -0
- package/dist/docs/reference/hooks.html +36 -0
- package/dist/docs/reference/http-api.html +35 -0
- package/dist/docs/reference/instructions.html +36 -0
- package/dist/docs/reference/playground.html +25 -0
- package/dist/docs/reference/project-layout.html +55 -0
- package/dist/docs/reference/schedules.html +106 -0
- package/dist/docs/reference/sessions.html +32 -0
- package/dist/docs/reference/skills.html +39 -0
- package/dist/docs/reference/subagents.html +34 -0
- package/dist/docs/reference/tools.html +70 -0
- package/dist/docs/scaffolding-agents.html +25 -0
- package/dist/docs/troubleshooting.html +25 -0
- package/dist/docs/vp-icons.css +0 -0
- package/dist/evals.d.ts +312 -0
- package/dist/evals.d.ts.map +1 -0
- package/dist/evals.js +254 -0
- package/dist/hooks.d.ts +23 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +23 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +101 -0
- package/dist/internal/ab-collector.d.ts +42 -0
- package/dist/internal/ab-collector.d.ts.map +1 -0
- package/dist/internal/ab-collector.js +153 -0
- package/dist/internal/ab-fold.d.ts +36 -0
- package/dist/internal/ab-fold.d.ts.map +1 -0
- package/dist/internal/ab-fold.js +171 -0
- package/dist/internal/ab-snapshot.d.ts +70 -0
- package/dist/internal/ab-snapshot.d.ts.map +1 -0
- package/dist/internal/ab-snapshot.js +208 -0
- package/dist/internal/approval-gate.d.ts +34 -0
- package/dist/internal/approval-gate.d.ts.map +1 -0
- package/dist/internal/approval-gate.js +85 -0
- package/dist/internal/auth.d.ts +8 -0
- package/dist/internal/auth.d.ts.map +1 -0
- package/dist/internal/auth.js +27 -0
- package/dist/internal/authored-alias-hooks.d.ts +31 -0
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -0
- package/dist/internal/authored-alias-hooks.js +43 -0
- package/dist/internal/authored-loaders.d.ts +25 -0
- package/dist/internal/authored-loaders.d.ts.map +1 -0
- package/dist/internal/authored-loaders.js +129 -0
- package/dist/internal/bounded-int.d.ts +11 -0
- package/dist/internal/bounded-int.d.ts.map +1 -0
- package/dist/internal/bounded-int.js +13 -0
- package/dist/internal/brand.d.ts +6 -0
- package/dist/internal/brand.d.ts.map +1 -0
- package/dist/internal/brand.js +17 -0
- package/dist/internal/chat-client.d.ts +19 -0
- package/dist/internal/chat-client.d.ts.map +1 -0
- package/dist/internal/chat-client.js +327 -0
- package/dist/internal/cli-ax.d.ts +58 -0
- package/dist/internal/cli-ax.d.ts.map +1 -0
- package/dist/internal/cli-ax.js +345 -0
- package/dist/internal/cli-cursor.d.ts +20 -0
- package/dist/internal/cli-cursor.d.ts.map +1 -0
- package/dist/internal/cli-cursor.js +227 -0
- package/dist/internal/cli-github.d.ts +47 -0
- package/dist/internal/cli-github.d.ts.map +1 -0
- package/dist/internal/cli-github.js +644 -0
- package/dist/internal/cli-slack.d.ts +18 -0
- package/dist/internal/cli-slack.d.ts.map +1 -0
- package/dist/internal/cli-slack.js +144 -0
- package/dist/internal/cloud-merge.d.ts +23 -0
- package/dist/internal/cloud-merge.d.ts.map +1 -0
- package/dist/internal/cloud-merge.js +28 -0
- package/dist/internal/cron.d.ts +17 -0
- package/dist/internal/cron.d.ts.map +1 -0
- package/dist/internal/cron.js +60 -0
- package/dist/internal/cursor/account-mcp.d.ts +95 -0
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -0
- package/dist/internal/cursor/account-mcp.js +342 -0
- package/dist/internal/cursor/backend-client.d.ts +118 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -0
- package/dist/internal/cursor/backend-client.js +477 -0
- package/dist/internal/cursor/credentials.d.ts +112 -0
- package/dist/internal/cursor/credentials.d.ts.map +1 -0
- package/dist/internal/cursor/credentials.js +329 -0
- package/dist/internal/cursor-event-relay.d.ts +111 -0
- package/dist/internal/cursor-event-relay.d.ts.map +1 -0
- package/dist/internal/cursor-event-relay.js +181 -0
- package/dist/internal/cursor-relay-core.d.ts +113 -0
- package/dist/internal/cursor-relay-core.d.ts.map +1 -0
- package/dist/internal/cursor-relay-core.js +364 -0
- package/dist/internal/cursor-slack-relay.d.ts +94 -0
- package/dist/internal/cursor-slack-relay.d.ts.map +1 -0
- package/dist/internal/cursor-slack-relay.js +171 -0
- package/dist/internal/describe-error.d.ts +3 -0
- package/dist/internal/describe-error.d.ts.map +1 -0
- package/dist/internal/describe-error.js +4 -0
- package/dist/internal/dev-mode.d.ts +13 -0
- package/dist/internal/dev-mode.d.ts.map +1 -0
- package/dist/internal/dev-mode.js +17 -0
- package/dist/internal/discovery.d.ts +55 -0
- package/dist/internal/discovery.d.ts.map +1 -0
- package/dist/internal/discovery.js +1427 -0
- package/dist/internal/distribution.d.ts +47 -0
- package/dist/internal/distribution.d.ts.map +1 -0
- package/dist/internal/distribution.js +82 -0
- package/dist/internal/docs-site.d.ts +28 -0
- package/dist/internal/docs-site.d.ts.map +1 -0
- package/dist/internal/docs-site.js +169 -0
- package/dist/internal/duration.d.ts +8 -0
- package/dist/internal/duration.d.ts.map +1 -0
- package/dist/internal/duration.js +35 -0
- package/dist/internal/eval-run-store.d.ts +81 -0
- package/dist/internal/eval-run-store.d.ts.map +1 -0
- package/dist/internal/eval-run-store.js +396 -0
- package/dist/internal/eval-runner.d.ts +76 -0
- package/dist/internal/eval-runner.d.ts.map +1 -0
- package/dist/internal/eval-runner.js +336 -0
- package/dist/internal/event-log.d.ts +51 -0
- package/dist/internal/event-log.d.ts.map +1 -0
- package/dist/internal/event-log.js +167 -0
- package/dist/internal/event-mapper.d.ts +46 -0
- package/dist/internal/event-mapper.d.ts.map +1 -0
- package/dist/internal/event-mapper.js +226 -0
- package/dist/internal/frontmatter.d.ts +12 -0
- package/dist/internal/frontmatter.d.ts.map +1 -0
- package/dist/internal/frontmatter.js +61 -0
- package/dist/internal/github-fanout.d.ts +32 -0
- package/dist/internal/github-fanout.d.ts.map +1 -0
- package/dist/internal/github-fanout.js +122 -0
- package/dist/internal/handleAgentServeTrigger.d.ts +59 -0
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -0
- package/dist/internal/handleAgentServeTrigger.js +115 -0
- package/dist/internal/host-platforms.d.ts +40 -0
- package/dist/internal/host-platforms.d.ts.map +1 -0
- package/dist/internal/host-platforms.js +113 -0
- package/dist/internal/http-channel.d.ts +54 -0
- package/dist/internal/http-channel.d.ts.map +1 -0
- package/dist/internal/http-channel.js +382 -0
- package/dist/internal/ids.d.ts +19 -0
- package/dist/internal/ids.d.ts.map +1 -0
- package/dist/internal/ids.js +34 -0
- package/dist/internal/init-project.d.ts +22 -0
- package/dist/internal/init-project.d.ts.map +1 -0
- package/dist/internal/init-project.js +125 -0
- package/dist/internal/json-dir-store.d.ts +32 -0
- package/dist/internal/json-dir-store.d.ts.map +1 -0
- package/dist/internal/json-dir-store.js +100 -0
- package/dist/internal/json-schema.d.ts +18 -0
- package/dist/internal/json-schema.d.ts.map +1 -0
- package/dist/internal/json-schema.js +53 -0
- package/dist/internal/log-ring.d.ts +23 -0
- package/dist/internal/log-ring.d.ts.map +1 -0
- package/dist/internal/log-ring.js +42 -0
- package/dist/internal/map-pool.d.ts +6 -0
- package/dist/internal/map-pool.d.ts.map +1 -0
- package/dist/internal/map-pool.js +41 -0
- package/dist/internal/mcp-endpoint.d.ts +59 -0
- package/dist/internal/mcp-endpoint.d.ts.map +1 -0
- package/dist/internal/mcp-endpoint.js +355 -0
- package/dist/internal/mcp-host.d.ts +28 -0
- package/dist/internal/mcp-host.d.ts.map +1 -0
- package/dist/internal/mcp-host.js +162 -0
- package/dist/internal/net.d.ts +5 -0
- package/dist/internal/net.d.ts.map +1 -0
- package/dist/internal/net.js +30 -0
- package/dist/internal/peer-connections.d.ts +44 -0
- package/dist/internal/peer-connections.d.ts.map +1 -0
- package/dist/internal/peer-connections.js +67 -0
- package/dist/internal/playground/static.d.ts +35 -0
- package/dist/internal/playground/static.d.ts.map +1 -0
- package/dist/internal/playground/static.js +162 -0
- package/dist/internal/playground/toolchain.d.ts +57 -0
- package/dist/internal/playground/toolchain.d.ts.map +1 -0
- package/dist/internal/playground/toolchain.js +226 -0
- package/dist/internal/reminder-runner.d.ts +62 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -0
- package/dist/internal/reminder-runner.js +582 -0
- package/dist/internal/reminder-schedule.d.ts +22 -0
- package/dist/internal/reminder-schedule.d.ts.map +1 -0
- package/dist/internal/reminder-schedule.js +82 -0
- package/dist/internal/reminder-store.d.ts +58 -0
- package/dist/internal/reminder-store.d.ts.map +1 -0
- package/dist/internal/reminder-store.js +106 -0
- package/dist/internal/resolved-connections.d.ts +41 -0
- package/dist/internal/resolved-connections.d.ts.map +1 -0
- package/dist/internal/resolved-connections.js +73 -0
- package/dist/internal/review-comments.d.ts +50 -0
- package/dist/internal/review-comments.d.ts.map +1 -0
- package/dist/internal/review-comments.js +194 -0
- package/dist/internal/router.d.ts +33 -0
- package/dist/internal/router.d.ts.map +1 -0
- package/dist/internal/router.js +93 -0
- package/dist/internal/run-client.d.ts +49 -0
- package/dist/internal/run-client.d.ts.map +1 -0
- package/dist/internal/run-client.js +208 -0
- package/dist/internal/schedule-runner.d.ts +31 -0
- package/dist/internal/schedule-runner.d.ts.map +1 -0
- package/dist/internal/schedule-runner.js +126 -0
- package/dist/internal/sdk-runner.d.ts +41 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -0
- package/dist/internal/sdk-runner.js +221 -0
- package/dist/internal/server.d.ts +25 -0
- package/dist/internal/server.d.ts.map +1 -0
- package/dist/internal/server.js +1374 -0
- package/dist/internal/session-engine.d.ts +287 -0
- package/dist/internal/session-engine.d.ts.map +1 -0
- package/dist/internal/session-engine.js +1377 -0
- package/dist/internal/session-store.d.ts +29 -0
- package/dist/internal/session-store.d.ts.map +1 -0
- package/dist/internal/session-store.js +140 -0
- package/dist/internal/session-urls.d.ts +10 -0
- package/dist/internal/session-urls.d.ts.map +1 -0
- package/dist/internal/session-urls.js +25 -0
- package/dist/internal/stream-progress.d.ts +14 -0
- package/dist/internal/stream-progress.d.ts.map +1 -0
- package/dist/internal/stream-progress.js +195 -0
- package/dist/internal/tool-result.d.ts +20 -0
- package/dist/internal/tool-result.d.ts.map +1 -0
- package/dist/internal/tool-result.js +45 -0
- package/dist/internal/trajectory.d.ts +56 -0
- package/dist/internal/trajectory.d.ts.map +1 -0
- package/dist/internal/trajectory.js +248 -0
- package/dist/internal/workspace.d.ts +42 -0
- package/dist/internal/workspace.d.ts.map +1 -0
- package/dist/internal/workspace.js +199 -0
- package/dist/playground/assets/cursor-icons-outline-oY2V_mvK.woff2 +0 -0
- package/dist/playground/assets/index-1K-hG-7p.css +1 -0
- package/dist/playground/assets/index-FlWjhg3x.js +79 -0
- package/dist/playground/index.html +17 -0
- package/dist/reminders.d.ts +23 -0
- package/dist/reminders.d.ts.map +1 -0
- package/dist/reminders.js +22 -0
- package/dist/schedules.d.ts +23 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +26 -0
- package/dist/skills.d.ts +22 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +22 -0
- package/dist/tools.d.ts +92 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +68 -0
- package/dist/types.d.ts +1609 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +80 -0
- package/docs/README.md +174 -0
- package/docs/ab.md +355 -0
- package/docs/building-with-agents.md +129 -0
- package/docs/concepts.md +177 -0
- package/docs/deployment.md +218 -0
- package/docs/evals.md +383 -0
- package/docs/guides/agent-to-agent.md +118 -0
- package/docs/guides/cloud-runtime.md +122 -0
- package/docs/guides/github.md +172 -0
- package/docs/guides/human-in-the-loop.md +131 -0
- package/docs/guides/slack.md +245 -0
- package/docs/guides/webhooks.md +201 -0
- package/docs/hillclimbing.md +93 -0
- package/docs/quickstart.md +183 -0
- package/docs/reference/agent-config.md +154 -0
- package/docs/reference/channels.md +206 -0
- package/docs/reference/cli.md +257 -0
- package/docs/reference/connections.md +137 -0
- package/docs/reference/hooks.md +74 -0
- package/docs/reference/http-api.md +219 -0
- package/docs/reference/instructions.md +77 -0
- package/docs/reference/playground.md +67 -0
- package/docs/reference/project-layout.md +119 -0
- package/docs/reference/schedules.md +220 -0
- package/docs/reference/sessions.md +165 -0
- package/docs/reference/skills.md +79 -0
- package/docs/reference/subagents.md +74 -0
- package/docs/reference/tools.md +203 -0
- package/docs/scaffolding-agents.md +113 -0
- package/docs/troubleshooting.md +95 -0
- package/package.json +185 -0
- package/skills/ab/SKILL.md +139 -0
- package/skills/create-agent/SKILL.md +219 -0
- package/skills/debug/SKILL.md +71 -0
- package/skills/evals/SKILL.md +217 -0
- package/skills/framework-map/SKILL.md +142 -0
- package/skills/github/SKILL.md +144 -0
- package/skills/hillclimb/SKILL.md +162 -0
- package/skills/setup-slack/SKILL.md +180 -0
- package/src/ab.ts +675 -0
- package/src/bin/agent-serve.ts +949 -0
- package/src/channels/github/api.ts +374 -0
- package/src/channels/github/auth.ts +275 -0
- package/src/channels/github/binding.ts +223 -0
- package/src/channels/github/defaults.ts +111 -0
- package/src/channels/github/events.ts +72 -0
- package/src/channels/github/forward.ts +381 -0
- package/src/channels/github/github-channel.ts +2270 -0
- package/src/channels/github/index.ts +52 -0
- package/src/channels/github/replay.ts +387 -0
- package/src/channels/github/state.ts +95 -0
- package/src/channels/github/types.ts +490 -0
- package/src/channels/slack/api.ts +580 -0
- package/src/channels/slack/approvals.ts +198 -0
- package/src/channels/slack/assistant.ts +76 -0
- package/src/channels/slack/auth.ts +112 -0
- package/src/channels/slack/channel-watch.ts +219 -0
- package/src/channels/slack/constants.ts +30 -0
- package/src/channels/slack/credentials.ts +90 -0
- package/src/channels/slack/cursor-account.ts +166 -0
- package/src/channels/slack/defaults.ts +450 -0
- package/src/channels/slack/dispatch.ts +293 -0
- package/src/channels/slack/doctor.ts +135 -0
- package/src/channels/slack/event-id-dedupe.ts +30 -0
- package/src/channels/slack/inbound.ts +219 -0
- package/src/channels/slack/index.ts +45 -0
- package/src/channels/slack/init.ts +133 -0
- package/src/channels/slack/interactive.ts +194 -0
- package/src/channels/slack/links.ts +23 -0
- package/src/channels/slack/live-delivery.ts +201 -0
- package/src/channels/slack/log.ts +83 -0
- package/src/channels/slack/manifest.ts +179 -0
- package/src/channels/slack/pr-ref.ts +50 -0
- package/src/channels/slack/setup.ts +97 -0
- package/src/channels/slack/slack-channel.ts +374 -0
- package/src/channels/slack/socket-mode.ts +154 -0
- package/src/channels/slack/stream.ts +63 -0
- package/src/channels/slack/tool-approval-events.ts +136 -0
- package/src/channels/slack/types.ts +349 -0
- package/src/channels.ts +385 -0
- package/src/connections.ts +89 -0
- package/src/evals.ts +501 -0
- package/src/hooks.ts +33 -0
- package/src/index.ts +184 -0
- package/src/internal/ab-collector.ts +210 -0
- package/src/internal/ab-fold.ts +228 -0
- package/src/internal/ab-snapshot.ts +335 -0
- package/src/internal/approval-gate.ts +115 -0
- package/src/internal/auth.ts +39 -0
- package/src/internal/authored-alias-hooks.ts +69 -0
- package/src/internal/authored-loaders.ts +138 -0
- package/src/internal/bounded-int.ts +27 -0
- package/src/internal/brand.ts +29 -0
- package/src/internal/chat-client.ts +407 -0
- package/src/internal/cli-ax.ts +474 -0
- package/src/internal/cli-cursor.ts +275 -0
- package/src/internal/cli-github.ts +849 -0
- package/src/internal/cli-slack.ts +175 -0
- package/src/internal/cloud-merge.ts +41 -0
- package/src/internal/cron.ts +78 -0
- package/src/internal/cursor/account-mcp.ts +472 -0
- package/src/internal/cursor/backend-client.ts +614 -0
- package/src/internal/cursor/credentials.ts +401 -0
- package/src/internal/cursor-event-relay.ts +281 -0
- package/src/internal/cursor-relay-core.ts +444 -0
- package/src/internal/cursor-slack-relay.ts +242 -0
- package/src/internal/describe-error.ts +4 -0
- package/src/internal/dev-mode.ts +20 -0
- package/src/internal/discovery.ts +1709 -0
- package/src/internal/distribution.ts +97 -0
- package/src/internal/docs-site.ts +191 -0
- package/src/internal/duration.ts +39 -0
- package/src/internal/eval-run-store.ts +519 -0
- package/src/internal/eval-runner.ts +522 -0
- package/src/internal/event-log.ts +175 -0
- package/src/internal/event-mapper.ts +272 -0
- package/src/internal/frontmatter.ts +77 -0
- package/src/internal/github-fanout.ts +159 -0
- package/src/internal/handleAgentServeTrigger.ts +156 -0
- package/src/internal/host-platforms.ts +144 -0
- package/src/internal/http-channel.ts +546 -0
- package/src/internal/ids.ts +44 -0
- package/src/internal/init-project.ts +165 -0
- package/src/internal/json-dir-store.ts +109 -0
- package/src/internal/json-schema.ts +69 -0
- package/src/internal/log-ring.ts +59 -0
- package/src/internal/map-pool.ts +32 -0
- package/src/internal/mcp-endpoint.ts +518 -0
- package/src/internal/mcp-host.ts +211 -0
- package/src/internal/net.ts +31 -0
- package/src/internal/peer-connections.ts +100 -0
- package/src/internal/playground/static.ts +189 -0
- package/src/internal/playground/toolchain.ts +277 -0
- package/src/internal/reminder-runner.ts +756 -0
- package/src/internal/reminder-schedule.ts +106 -0
- package/src/internal/reminder-store.ts +145 -0
- package/src/internal/resolved-connections.ts +145 -0
- package/src/internal/review-comments.ts +268 -0
- package/src/internal/router.ts +145 -0
- package/src/internal/run-client.ts +320 -0
- package/src/internal/schedule-runner.ts +161 -0
- package/src/internal/sdk-runner.ts +315 -0
- package/src/internal/server.ts +1737 -0
- package/src/internal/session-engine.ts +1810 -0
- package/src/internal/session-store.ts +147 -0
- package/src/internal/session-urls.ts +40 -0
- package/src/internal/stream-progress.ts +254 -0
- package/src/internal/tool-result.ts +54 -0
- package/src/internal/trajectory.ts +306 -0
- package/src/internal/workspace.ts +223 -0
- package/src/reminders.ts +35 -0
- package/src/schedules.ts +37 -0
- package/src/skills.ts +27 -0
- package/src/tools.ts +127 -0
- package/src/types.ts +1848 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Schedules & reminders"
|
|
3
|
+
description: "Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Schedules and reminders
|
|
7
|
+
|
|
8
|
+
Two ways an agent acts without an inbound message. A schedule is
|
|
9
|
+
deploy-time cron: "every weekday at 09:00, summarize open incidents." A
|
|
10
|
+
reminder is a runtime wake bound to one conversation: "re-check this
|
|
11
|
+
PR's CI in two hours." Schedules live in the filesystem; reminders are
|
|
12
|
+
created by running code.
|
|
13
|
+
|
|
14
|
+
## Schedules
|
|
15
|
+
|
|
16
|
+
Cron expressions are standard 5-field, evaluated in UTC with minute
|
|
17
|
+
granularity.
|
|
18
|
+
|
|
19
|
+
### Schedules in Markdown
|
|
20
|
+
|
|
21
|
+
A plain markdown file with `cron:` frontmatter is a fire-and-forget
|
|
22
|
+
task:
|
|
23
|
+
|
|
24
|
+
```md
|
|
25
|
+
---
|
|
26
|
+
cron: "0 9 * * 1-5"
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Pull open incidents and post a summary to the metrics endpoint.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Each firing starts a task-mode session: the body is the prompt, the
|
|
33
|
+
session runs to `session.completed` or `session.failed`, and it isn't
|
|
34
|
+
followable.
|
|
35
|
+
|
|
36
|
+
### Schedules as handlers
|
|
37
|
+
|
|
38
|
+
`defineSchedule` with a `run` handler gives you full control, most
|
|
39
|
+
usefully to hand the work into a channel so its delivery events fire:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { defineSchedule } from "@cursor/july/schedules";
|
|
43
|
+
import webhook from "../channels/webhook.js";
|
|
44
|
+
|
|
45
|
+
export default defineSchedule({
|
|
46
|
+
cron: "*/30 * * * *",
|
|
47
|
+
async run({ receive, waitUntil, appAuth, host }) {
|
|
48
|
+
// optional: await host.mcp.callTool("units", "celsius_to_fahrenheit", { value: 0 });
|
|
49
|
+
waitUntil(
|
|
50
|
+
receive(webhook, {
|
|
51
|
+
message:
|
|
52
|
+
"Check for new critical alerts. Report only when there are any.",
|
|
53
|
+
auth: appAuth,
|
|
54
|
+
})
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`defineSchedule` requires exactly one of `markdown` or `run`. The `run`
|
|
61
|
+
handler receives `receive` (hand off into a channel), `callTool`
|
|
62
|
+
(deterministic server-tool calls), `waitUntil`, `appAuth` (a
|
|
63
|
+
schedule-scoped principal for work the agent does on its own behalf),
|
|
64
|
+
and `host` (shared services: `host.mcp`, `host.github`, `host.slack`,
|
|
65
|
+
`host.reminders`).
|
|
66
|
+
|
|
67
|
+
### Dispatch and dev mode
|
|
68
|
+
|
|
69
|
+
In production (`agentkit serve`), schedules fire on their cron
|
|
70
|
+
cadence. Disable them with `--no-schedules`. There's no cross-host
|
|
71
|
+
coordination, so run them in exactly one process per project.
|
|
72
|
+
|
|
73
|
+
In dev (`serve --dev`), schedules never fire automatically. Dispatch one
|
|
74
|
+
by hand, exactly once, through the same path production uses:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
curl -X POST http://127.0.0.1:3000/<slug>/v1/dev/schedules/heartbeat
|
|
78
|
+
# {"scheduleId":"heartbeat","sessionIds":["ses_…"]}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The playground can dispatch schedules in dev mode too, and
|
|
82
|
+
`handle.dispatchSchedule("heartbeat")` does it programmatically.
|
|
83
|
+
|
|
84
|
+
## Reminders
|
|
85
|
+
|
|
86
|
+
A reminder is created at runtime and bound to a channel continuation.
|
|
87
|
+
When it fires, it wakes that conversation. Recurring reminders behave
|
|
88
|
+
like `setInterval`, one-shots like `setTimeout`, and both are durable on
|
|
89
|
+
disk.
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
await handle.createReminder({
|
|
93
|
+
purpose: "ci_recheck",
|
|
94
|
+
channelId: "drive",
|
|
95
|
+
continuationToken: "pr:owner/repo#1",
|
|
96
|
+
delay: "2h", // or a cron / explicit schedule
|
|
97
|
+
prompt: "Re-check CI. Only act if still failing.",
|
|
98
|
+
until: "Cancel once CI is green or the PR is merged.",
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use `run` when host code should decide what happens on each tick:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
await handle.createReminder({
|
|
106
|
+
purpose: "ci_recheck",
|
|
107
|
+
channelId: "drive",
|
|
108
|
+
continuationToken: "pr:owner/repo#1",
|
|
109
|
+
every: "30m",
|
|
110
|
+
async run({ fireCount, followup }) {
|
|
111
|
+
if (fireCount >= 3) {
|
|
112
|
+
return { action: "stop" };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
await followup({
|
|
116
|
+
message: "Re-check CI and report only if the status changed.",
|
|
117
|
+
});
|
|
118
|
+
return { action: "delivered" };
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This reminder wakes the conversation three times, then stops itself.
|
|
124
|
+
|
|
125
|
+
The same API is `host.reminders` on channel handlers, tools, and
|
|
126
|
+
schedule runs. An agent can even be given a tool that creates its own
|
|
127
|
+
reminders.
|
|
128
|
+
|
|
129
|
+
For example, create `agent/tools/remind_me.ts`:
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
import { defineTool } from "@cursor/july/tools";
|
|
133
|
+
import { z } from "zod";
|
|
134
|
+
|
|
135
|
+
export default defineTool({
|
|
136
|
+
description: "Schedule a one-time reminder in this conversation.",
|
|
137
|
+
inputSchema: z.object({
|
|
138
|
+
delay: z
|
|
139
|
+
.string()
|
|
140
|
+
.describe("When to wake the conversation, such as 20m or 2h"),
|
|
141
|
+
prompt: z
|
|
142
|
+
.string()
|
|
143
|
+
.min(1)
|
|
144
|
+
.describe("What the agent should do when it wakes"),
|
|
145
|
+
}),
|
|
146
|
+
async execute({ delay, prompt }, ctx) {
|
|
147
|
+
const reminders = ctx.host.reminders;
|
|
148
|
+
if (reminders === undefined) {
|
|
149
|
+
throw new Error("Reminders are disabled on this host.");
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const continuationToken = ctx.session.continuationKey;
|
|
153
|
+
if (continuationToken == null) {
|
|
154
|
+
throw new Error("This session cannot receive reminder follow-ups.");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const reminder = await reminders.create({
|
|
158
|
+
purpose: "user_follow_up",
|
|
159
|
+
channelId: ctx.session.channelId,
|
|
160
|
+
continuationToken,
|
|
161
|
+
delay,
|
|
162
|
+
prompt,
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
reminderId: reminder.id,
|
|
167
|
+
nextFireAt: reminder.nextFireAt,
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The tool binds the reminder to the current channel conversation. When
|
|
174
|
+
the delay expires, the prompt returns to the same session as a follow-up.
|
|
175
|
+
|
|
176
|
+
Reminders fire in one of two styles. The **prompt form** (above) sends
|
|
177
|
+
`prompt` into the session, with `until` stating the standing
|
|
178
|
+
cancellation condition for the model to honor. The **run form** passes a
|
|
179
|
+
`run` handler instead: it returns `stop`, `skip`, or `delivered` per
|
|
180
|
+
tick. That's silent host-side policy with no model turn. Run handlers are
|
|
181
|
+
in-memory, so after a restart those reminders are disarmed
|
|
182
|
+
(`handler_lost_on_restart`); re-arm them from the code path that created
|
|
183
|
+
them, or prefer the prompt form.
|
|
184
|
+
|
|
185
|
+
Dev mode matches schedules. Auto-timers follow `ServeOptions.reminders`
|
|
186
|
+
(default `!dev`), so in `--dev` fire by hand:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
curl http://127.0.0.1:3000/<slug>/v1/dev/reminders # list
|
|
190
|
+
curl -X POST http://127.0.0.1:3000/<slug>/v1/dev/reminders/<id> # fire one
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`handle.dispatchReminder(id)` is the programmatic equivalent.
|
|
194
|
+
|
|
195
|
+
Two habits worth copying: cancel reminders when their subject
|
|
196
|
+
dies (say, cancel PR-scoped reminders on `pull_request.closed`), and keep
|
|
197
|
+
wake prompts generic. A plain "re-check the PR" works better than
|
|
198
|
+
replaying stale payload details, because the agent re-reads the live
|
|
199
|
+
state when it wakes.
|
|
200
|
+
|
|
201
|
+
## Schedule or reminder?
|
|
202
|
+
|
|
203
|
+
The split comes down to scope and timing.
|
|
204
|
+
|
|
205
|
+
| | Schedule | Reminder |
|
|
206
|
+
| -------- | ---------------------------------------------------------- | ----------------------------------------------- |
|
|
207
|
+
| Defined | at deploy time, `agent/schedules/*` | at runtime, `createReminder` / `host.reminders` |
|
|
208
|
+
| Scope | global to the agent | one channel continuation (one conversation) |
|
|
209
|
+
| Session | starts a new task session (or hands off through `receive`) | wakes an existing conversation |
|
|
210
|
+
| Cadence | cron (UTC) | delay, cron, or explicit schedule |
|
|
211
|
+
| Dev mode | manual dispatch only | manual dispatch only (timers off) |
|
|
212
|
+
|
|
213
|
+
## What's next
|
|
214
|
+
|
|
215
|
+
Continue with these pages:
|
|
216
|
+
|
|
217
|
+
- [Channels](./channels.md): `receive` and the delivery events
|
|
218
|
+
- [GitHub guide](../guides/github.md): reminders in a real webhook loop
|
|
219
|
+
- [HTTP API](./http-api.md#dev-mode-routes): the dev
|
|
220
|
+
dispatch routes
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Sessions, events, and streaming"
|
|
3
|
+
description: "Understand how conversations continue, how events stream, and where session data lives."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sessions, events, and streaming
|
|
7
|
+
|
|
8
|
+
A session keeps one conversation, its workspace, and an append-only
|
|
9
|
+
record of every message and tool call.
|
|
10
|
+
|
|
11
|
+
## What does a session contain?
|
|
12
|
+
|
|
13
|
+
Each session combines:
|
|
14
|
+
|
|
15
|
+
- A channel and authenticated caller
|
|
16
|
+
- A conversation the caller can continue
|
|
17
|
+
- A workspace for local turns
|
|
18
|
+
- An NDJSON event stream
|
|
19
|
+
- Runtime state needed to resume after a server restart
|
|
20
|
+
|
|
21
|
+
Sessions belong to the principal that created them. Follow-up, stream,
|
|
22
|
+
and list routes return `403` when another caller tries to access one.
|
|
23
|
+
|
|
24
|
+
## Which session identifier should I use?
|
|
25
|
+
|
|
26
|
+
Sessions have two identifiers because conversation routing and
|
|
27
|
+
inspection are different jobs.
|
|
28
|
+
|
|
29
|
+
| Identifier | Use it for |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `continuationToken` | Continue a conversation through its channel |
|
|
32
|
+
| `sessionId` | Stream events, inspect state, resolve approvals, or run a session-bound tool call |
|
|
33
|
+
|
|
34
|
+
Channels decide what a continuation token looks like. Slack uses its
|
|
35
|
+
thread identity. A PR channel can use a key such as `pr:owner/repo#1`.
|
|
36
|
+
The built-in HTTP API returns an opaque token and rotates it after each
|
|
37
|
+
accepted follow-up. Reusing a stale HTTP token returns `409`.
|
|
38
|
+
|
|
39
|
+
Use the continuation token to keep talking. Use the session ID to
|
|
40
|
+
observe or manage the stored session.
|
|
41
|
+
|
|
42
|
+
## Which session modes are available?
|
|
43
|
+
|
|
44
|
+
| Mode | Created by | What happens after a turn |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `chat` | HTTP sessions, channel `send`, Slack, or MCP `ask` | Waits in `session.waiting` and accepts follow-ups |
|
|
47
|
+
| `task` | Markdown schedules and fire-and-forget dispatch | Ends in `session.completed` or `session.failed` |
|
|
48
|
+
|
|
49
|
+
Task sessions don't accept follow-ups. Trying one returns `409`.
|
|
50
|
+
|
|
51
|
+
## What happens when I send a follow-up?
|
|
52
|
+
|
|
53
|
+
A follow-up to an idle chat session starts another turn. A follow-up to
|
|
54
|
+
a busy session interrupts the current turn, waits for it to settle, and
|
|
55
|
+
then sends the new message.
|
|
56
|
+
|
|
57
|
+
`POST /v1/session/:id/stop` interrupts a turn without sending a new
|
|
58
|
+
message. Interrupted turns record `turn.failed` with
|
|
59
|
+
`"turn interrupted"`. This means the turn was preempted.
|
|
60
|
+
|
|
61
|
+
Session-bound deterministic tool calls share the same execution lock.
|
|
62
|
+
They return `409 session_busy` while a model turn is running.
|
|
63
|
+
|
|
64
|
+
## Which events can I stream?
|
|
65
|
+
|
|
66
|
+
Each NDJSON line uses this envelope:
|
|
67
|
+
`{ type, index, sessionId, turnId?, at, data }`. The `index` increases
|
|
68
|
+
within one session. The `at` field is an ISO-8601 timestamp.
|
|
69
|
+
|
|
70
|
+
| Phase | Events | What they tell you |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| Session | `session.started`, [`ab.assigned`](../ab.md#assign-sticky-variants), `session.waiting`, `session.completed`, `session.failed` | Session creation, A/B enrollment, readiness, and task completion |
|
|
73
|
+
| Agent | `agent.bound` | Cursor SDK agent ID and cloud conversation URL |
|
|
74
|
+
| Input | `message.received` | A user message was accepted |
|
|
75
|
+
| Turn | `turn.started`, `turn.completed`, `turn.failed` | Turn status, final result, and token usage |
|
|
76
|
+
| Steps | `step.started`, `step.completed` | Model step boundaries and duration |
|
|
77
|
+
| Reasoning | `reasoning.appended`, `reasoning.completed` | Streamed reasoning blocks |
|
|
78
|
+
| Reply | `message.appended`, `message.completed` | Text deltas and finalized assistant messages |
|
|
79
|
+
| Tools | `actions.requested`, `action.result` | Tool names, validated arguments, outputs, and errors |
|
|
80
|
+
| Approvals | `action.approval_requested`, `action.approval_resolved` | A parked tool call and the human decision |
|
|
81
|
+
| Subagents | `subagent.called`, `subagent.completed` | Delegated work |
|
|
82
|
+
|
|
83
|
+
Pair `actions.requested` with `action.result` to reconstruct the tool
|
|
84
|
+
trajectory. Read `turn.completed.data.usage` for input, output, and
|
|
85
|
+
cache token counts.
|
|
86
|
+
|
|
87
|
+
## How do I stream or replay session events?
|
|
88
|
+
|
|
89
|
+
One endpoint handles both live streaming and replay:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
curl -N 'http://127.0.0.1:3000/<slug>/v1/session/ses_…/stream?startIndex=0'
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Pass `startIndex` to continue after the last event you received. Omit it
|
|
96
|
+
or pass `0` to replay the full session before following new events.
|
|
97
|
+
`GET /v1/session/:id/events` returns a one-time dump without staying
|
|
98
|
+
connected.
|
|
99
|
+
|
|
100
|
+
Event streams replay from disk after a server restart. Conversation
|
|
101
|
+
state resumes from the Cursor SDK store.
|
|
102
|
+
|
|
103
|
+
## What goes into a local session workspace?
|
|
104
|
+
|
|
105
|
+
agentkit creates a workspace before the first local turn:
|
|
106
|
+
|
|
107
|
+
| Source path | Lands as |
|
|
108
|
+
| ---------------------------------- | ----------------------------------------------------------------------- |
|
|
109
|
+
| `instructions.*` | `AGENTS.md` |
|
|
110
|
+
| `skills/*` | `.cursor/skills/<name>/SKILL.md` |
|
|
111
|
+
| agent tools (`execution: "agent"`) | scripts under `.agentkit/tools/`, with a catalog in `AGENTS.md` |
|
|
112
|
+
| `sandbox/workspace/**` | copied in as seed files |
|
|
113
|
+
| per-send `workspaceFiles` | written before the turn |
|
|
114
|
+
|
|
115
|
+
The local harness uses this workspace as its working directory. Parent
|
|
116
|
+
directories can contribute `AGENTS.md` and `.cursor` settings. Set
|
|
117
|
+
`local.cwd` when you need a clean parent directory. A channel can also
|
|
118
|
+
provide a different working directory for one session, such as a PR
|
|
119
|
+
worktree.
|
|
120
|
+
|
|
121
|
+
See [Agent config: local cwd](./agent-config.md#local-cwd) for the
|
|
122
|
+
inheritance rules.
|
|
123
|
+
|
|
124
|
+
## Where does agentkit store session data?
|
|
125
|
+
|
|
126
|
+
Local state uses one directory tree:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
<project>/.agentkit/ # or <stateRoot>/<slug>/ under serve
|
|
130
|
+
sessions/<id>/session.json # metadata: channel, mode, principal, tokens
|
|
131
|
+
sessions/<id>/events.ndjson # the durable stream
|
|
132
|
+
sessions/<id>/workspace/ # the harness cwd
|
|
133
|
+
traces/<sessionId>.ndjson # written by `run`
|
|
134
|
+
runner/ # Cursor SDK conversation store
|
|
135
|
+
tool-calls/<callId>/ # ephemeral deterministic-call workspaces
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Deleting a session directory removes the session from the server: it
|
|
139
|
+
disappears from listings and can no longer be streamed or continued.
|
|
140
|
+
The `runner/` store keeps its own conversation copy until you remove it.
|
|
141
|
+
Cloud conversations remain on the Cursor backend.
|
|
142
|
+
|
|
143
|
+
Change the root with `--state-root` or `stateRoot`. Keep it outside
|
|
144
|
+
repositories whose parent rules shouldn't reach the agent. See
|
|
145
|
+
[local session workspaces](../concepts.md#what-files-can-a-local-session-access).
|
|
146
|
+
|
|
147
|
+
## How do I inspect a saved event stream?
|
|
148
|
+
|
|
149
|
+
Use `trajectory` with a trace or session event file:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
agentkit trajectory --events .agentkit/traces/<sessionId>.ndjson
|
|
153
|
+
agentkit trajectory --events <stateRoot>/<slug>/sessions/<id>/events.ndjson
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The command prints tool calls, the reply, and token usage in the same
|
|
157
|
+
JSON shape as `run`. Use **Open trace** in the playground for a visual
|
|
158
|
+
view.
|
|
159
|
+
|
|
160
|
+
## Related
|
|
161
|
+
|
|
162
|
+
- [HTTP API](./http-api.md)
|
|
163
|
+
- [Hooks](./hooks.md)
|
|
164
|
+
- [Live A/B metrics](../ab.md)
|
|
165
|
+
- [How agentkit works](../concepts.md)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Skills"
|
|
3
|
+
description: "On-demand procedures the model loads only when relevant, in three authoring forms."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skills
|
|
7
|
+
|
|
8
|
+
A skill is an on-demand procedure following the `SKILL.md` convention:
|
|
9
|
+
the harness advertises each skill by its description, and the model
|
|
10
|
+
loads the full content only when the task calls for it. Skills are how
|
|
11
|
+
you give an agent a multi-step workflow without carrying it in the
|
|
12
|
+
always-on [instructions](./instructions.md).
|
|
13
|
+
|
|
14
|
+
## Authoring forms
|
|
15
|
+
|
|
16
|
+
Three forms cover every case.
|
|
17
|
+
|
|
18
|
+
| Form | Reach for it when |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `agent/skills/<name>.md` | Flat markdown. Optional `description` frontmatter; the first body line is the fallback. |
|
|
21
|
+
| `agent/skills/<name>/SKILL.md` plus siblings | A packaged directory with reference files (`references/…`). Requires `description` frontmatter. |
|
|
22
|
+
| `agent/skills/<name>.ts` | Generated content, with `defineSkill` from `@cursor/july/skills`. |
|
|
23
|
+
|
|
24
|
+
Flat markdown:
|
|
25
|
+
|
|
26
|
+
```md
|
|
27
|
+
---
|
|
28
|
+
description: Use when a pull request needs a structured approval checklist.
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# PR review checklist
|
|
32
|
+
|
|
33
|
+
1. Call `inspect_pr` and confirm required checks passed.
|
|
34
|
+
2. Summarize the PR title, author, and remaining risks.
|
|
35
|
+
3. Call `approve_pr` only after an explicit request; it requires approval.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
TypeScript, when the content must be generated or carry inline sibling
|
|
39
|
+
files:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { defineSkill } from "@cursor/july/skills";
|
|
43
|
+
|
|
44
|
+
export default defineSkill({
|
|
45
|
+
description: "Research unfamiliar topics before answering.",
|
|
46
|
+
markdown: "Gather evidence first, then answer with the key facts.",
|
|
47
|
+
files: { "references/checklist.md": "# Checklist\n\n- Find sources.\n" },
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## How skills reach the model
|
|
52
|
+
|
|
53
|
+
On the local runtime, skills land in the session workspace at
|
|
54
|
+
`.cursor/skills/<name>/SKILL.md`, and the harness advertises and loads
|
|
55
|
+
them natively. On the cloud runtime, skills aren't materialized. The VM
|
|
56
|
+
only sees skills that exist in the cloud repo itself, and `validate`
|
|
57
|
+
warns about the combination.
|
|
58
|
+
|
|
59
|
+
## Instructions, skills, or tools?
|
|
60
|
+
|
|
61
|
+
Instructions are always in context: identity, tool-choice rules, the
|
|
62
|
+
output contract. Keep them short. Skills load when relevant: procedures,
|
|
63
|
+
checklists, house style. Reach for a skill when the model needs to
|
|
64
|
+
*follow* something but only sometimes needs it loaded. Tools are typed,
|
|
65
|
+
executable behavior: anything that must be correct every time belongs in
|
|
66
|
+
tool code, not in prose the model might paraphrase.
|
|
67
|
+
|
|
68
|
+
A good skill description is a routing rule, not a title. Say *when* to
|
|
69
|
+
use it, like "Use when a pull request needs a structured approval
|
|
70
|
+
checklist," because the description is all the model sees before
|
|
71
|
+
deciding to load it.
|
|
72
|
+
|
|
73
|
+
## What's next
|
|
74
|
+
|
|
75
|
+
Continue with these pages:
|
|
76
|
+
|
|
77
|
+
- [Instructions](./instructions.md): what stays always-on
|
|
78
|
+
- [Tools](./tools.md): when prose needs to become code
|
|
79
|
+
- [Project layout](./project-layout.md): where skills sit in the tree
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Subagents"
|
|
3
|
+
description: "Specialist child agents the model delegates to mid-turn, each its own directory under agent/subagents/."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Subagents
|
|
7
|
+
|
|
8
|
+
A subagent is a specialist child agent the model can delegate to
|
|
9
|
+
mid-turn. Each one is its own directory under `agent/subagents/<id>/`,
|
|
10
|
+
with the same `agent.ts` + `instructions.md` shape as the root. On the
|
|
11
|
+
Cursor harness, subagents run as SDK custom subagents: the parent model
|
|
12
|
+
delegates through the harness `task` tool, and the stream records
|
|
13
|
+
`subagent.called` and `subagent.completed`.
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
agent/subagents/researcher/
|
|
17
|
+
├── agent.ts # description (required), model (optional)
|
|
18
|
+
└── instructions.md # the subagent's own system prompt
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// agent/subagents/researcher/agent.ts
|
|
23
|
+
import { defineAgent } from "@cursor/july";
|
|
24
|
+
|
|
25
|
+
export default defineAgent({
|
|
26
|
+
description:
|
|
27
|
+
"Background research: climate history, records, comparisons across many cities.",
|
|
28
|
+
// model: omit to inherit the parent's model
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Subagent rules
|
|
33
|
+
|
|
34
|
+
`description` is required. It's the only thing the parent model reads
|
|
35
|
+
when deciding whether to delegate, so write it as a routing rule
|
|
36
|
+
("Background research: …"), the same discipline as a
|
|
37
|
+
[skill](./skills.md) description. `model` is optional; omit it to
|
|
38
|
+
inherit the parent's model, or set it to run the specialist on a
|
|
39
|
+
different one.
|
|
40
|
+
|
|
41
|
+
Subagents inherit the parent's execution surface. Per-subagent `tools/`,
|
|
42
|
+
`skills/`, and `mcp-connections/` directories are reported as warnings and
|
|
43
|
+
ignored. Nested subagents aren't supported.
|
|
44
|
+
|
|
45
|
+
Delegation needs both halves: the description makes it possible, and the
|
|
46
|
+
parent's [instructions](./instructions.md) make it happen. "When a
|
|
47
|
+
request needs background research, delegate to the `researcher`
|
|
48
|
+
subagent."
|
|
49
|
+
|
|
50
|
+
## Subagent or peer?
|
|
51
|
+
|
|
52
|
+
Subagents split one job into roles inside a single agent. When the
|
|
53
|
+
specialist is independently useful, with its own tools, sessions, and
|
|
54
|
+
playground, make it a full agent and wire a peer MCP connection instead. The
|
|
55
|
+
comparison table is in the
|
|
56
|
+
[Agent-to-agent guide](../guides/agent-to-agent.md#peer-or-subagent).
|
|
57
|
+
|
|
58
|
+
## Patterns
|
|
59
|
+
|
|
60
|
+
Fan-out reviews: a PR-approval agent can delegate to two review
|
|
61
|
+
subagents that read a host-prepared `pr/` evidence tree and report
|
|
62
|
+
prioritized findings, which the parent embeds in its approval comment.
|
|
63
|
+
|
|
64
|
+
Keep the parent lean: a subagent with focused instructions usually
|
|
65
|
+
works better than a longer parent prompt with conditional sections. The
|
|
66
|
+
parent routes; the specialist executes.
|
|
67
|
+
|
|
68
|
+
## What's next
|
|
69
|
+
|
|
70
|
+
Continue with these pages:
|
|
71
|
+
|
|
72
|
+
- [Agent-to-agent](../guides/agent-to-agent.md): the peer alternative
|
|
73
|
+
- [Skills](./skills.md): when a procedure is enough and a child agent
|
|
74
|
+
is overkill
|