@cursor/july 0.1.61 → 0.1.62

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 (85) hide show
  1. package/dist/channels/github/github-channel.d.ts +1 -1
  2. package/dist/channels/github/github-channel.d.ts.map +1 -1
  3. package/dist/channels/github/github-channel.js +14 -1
  4. package/dist/channels/github/types.d.ts +2 -0
  5. package/dist/channels/github/types.d.ts.map +1 -1
  6. package/dist/docs/404.html +1 -1
  7. package/dist/docs/ab.html +2 -2
  8. package/dist/docs/assets/{app.CW3KJh72.js → app.B-biogkN.js} +1 -1
  9. package/dist/docs/assets/chunks/@localSearchIndexroot.5ozYNf74.js +1 -0
  10. package/dist/docs/assets/chunks/{VPLocalSearchBox.Bk6EWpPj.js → VPLocalSearchBox.DZqKtFZS.js} +1 -1
  11. package/dist/docs/assets/chunks/{theme.Bz9AodBA.js → theme.BwC5zP2r.js} +2 -2
  12. package/dist/docs/building-with-agents.html +2 -2
  13. package/dist/docs/concepts.html +2 -2
  14. package/dist/docs/deployment.html +2 -2
  15. package/dist/docs/evals.html +2 -2
  16. package/dist/docs/example-agents/approval-buddy.html +2 -2
  17. package/dist/docs/example-agents/benny.html +2 -2
  18. package/dist/docs/example-agents/bugbot.html +2 -2
  19. package/dist/docs/example-agents/codebase-wiki.html +2 -2
  20. package/dist/docs/example-agents/codeowners-review.html +2 -2
  21. package/dist/docs/example-agents/concierge.html +2 -2
  22. package/dist/docs/example-agents/fsd.html +2 -2
  23. package/dist/docs/example-agents/index.html +2 -2
  24. package/dist/docs/example-agents/knowledge-base.html +2 -2
  25. package/dist/docs/example-agents/oncall.html +2 -2
  26. package/dist/docs/example-agents/security-reviewer.html +2 -2
  27. package/dist/docs/example-agents/slack-agent.html +2 -2
  28. package/dist/docs/example-agents/weather-agent.html +2 -2
  29. package/dist/docs/guides/agent-to-agent.html +2 -2
  30. package/dist/docs/guides/cloud-runtime.html +2 -2
  31. package/dist/docs/guides/convert-automation.html +2 -2
  32. package/dist/docs/guides/github.html +2 -2
  33. package/dist/docs/guides/human-in-the-loop.html +2 -2
  34. package/dist/docs/guides/mcp-oauth.html +2 -2
  35. package/dist/docs/guides/opentelemetry.html +2 -2
  36. package/dist/docs/guides/slack.html +2 -2
  37. package/dist/docs/guides/webhooks.html +2 -2
  38. package/dist/docs/hillclimbing.html +2 -2
  39. package/dist/docs/index.html +2 -2
  40. package/dist/docs/quickstart.html +2 -2
  41. package/dist/docs/reference/agent-config.html +2 -2
  42. package/dist/docs/reference/artifacts.html +2 -2
  43. package/dist/docs/reference/channels.html +2 -2
  44. package/dist/docs/reference/cli.html +2 -2
  45. package/dist/docs/reference/connections.html +2 -2
  46. package/dist/docs/reference/hooks.html +2 -2
  47. package/dist/docs/reference/http-api.html +2 -2
  48. package/dist/docs/reference/instructions.html +2 -2
  49. package/dist/docs/reference/playground.html +2 -2
  50. package/dist/docs/reference/project-layout.html +2 -2
  51. package/dist/docs/reference/prompt.html +2 -2
  52. package/dist/docs/reference/schedules.html +2 -2
  53. package/dist/docs/reference/sessions.html +2 -2
  54. package/dist/docs/reference/skills.html +2 -2
  55. package/dist/docs/reference/subagents.html +2 -2
  56. package/dist/docs/reference/tools.html +2 -2
  57. package/dist/docs/scaffolding-agents.html +2 -2
  58. package/dist/docs/storage.html +2 -2
  59. package/dist/docs/templates/agentic-owners.html +2 -2
  60. package/dist/docs/templates/demo.html +2 -2
  61. package/dist/docs/templates/pr-autofixer.html +2 -2
  62. package/dist/docs/templates/security-reviewer.html +2 -2
  63. package/dist/docs/templates/triage.html +2 -2
  64. package/dist/docs/troubleshooting.html +2 -2
  65. package/dist/internal/cursor-event-relay.d.ts +5 -1
  66. package/dist/internal/cursor-event-relay.d.ts.map +1 -1
  67. package/dist/internal/cursor-event-relay.js +5 -0
  68. package/dist/internal/mcp-oauth.d.ts +0 -4
  69. package/dist/internal/mcp-oauth.d.ts.map +1 -1
  70. package/dist/internal/mcp-oauth.js +0 -4
  71. package/dist/internal/server.js +2 -2
  72. package/dist/playground/assets/index-B4rcOgeP.css +1 -0
  73. package/dist/playground/assets/{index-SqkR13k_.js → index-DXcY42Jv.js} +43 -43
  74. package/dist/playground/index.html +2 -2
  75. package/dist/types.d.ts +1 -1
  76. package/package.json +1 -1
  77. package/skills/github/SKILL.md +2 -1
  78. package/src/channels/github/github-channel.ts +18 -2
  79. package/src/channels/github/types.ts +2 -0
  80. package/src/internal/cursor-event-relay.ts +8 -1
  81. package/src/internal/mcp-oauth.ts +0 -4
  82. package/src/internal/server.ts +2 -2
  83. package/src/types.ts +1 -1
  84. package/dist/docs/assets/chunks/@localSearchIndexroot.BuymfBAo.js +0 -1
  85. package/dist/playground/assets/index-ClbuaLpm.css +0 -1
@@ -8,8 +8,8 @@
8
8
  />
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1" />
10
10
  <title>agent-serve playground</title>
11
- <script type="module" crossorigin src="./assets/index-SqkR13k_.js"></script>
12
- <link rel="stylesheet" crossorigin href="./assets/index-ClbuaLpm.css">
11
+ <script type="module" crossorigin src="./assets/index-DXcY42Jv.js"></script>
12
+ <link rel="stylesheet" crossorigin href="./assets/index-B4rcOgeP.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
package/dist/types.d.ts CHANGED
@@ -2429,7 +2429,7 @@ export interface ServeOptions {
2429
2429
  */
2430
2430
  cloudToolsUrl?: string;
2431
2431
  /**
2432
- * Pull SCM webhook metadata from `/v0/scm-events` (Cursor account auth).
2432
+ * Pull SCM webhook events from `/v0/scm-events` (Cursor account auth).
2433
2433
  * GitHub and Origin subscriptions are registered independently.
2434
2434
  * The stream is read as the host's Cursor user, so this requires a signed-in
2435
2435
  * host: `serve` throws when no key resolves from `apiKey` here,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.61",
3
+ "version": "0.1.62",
4
4
  "description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -129,7 +129,8 @@ Reads the stream as the host's Cursor user, so it **requires sign-in**
129
129
  out instead of running a relay that can never receive events. No public URL
130
130
  or repo admin. Registers before consuming; offset + consumer id under
131
131
  `<state-root>/cursor-events/`. `CURSOR_API_BASE_URL` for a non-default
132
- backend. Stream is metadata-only today (payload lookup later).
132
+ backend. Each event includes the verified webhook payload when the API
133
+ stored it.
133
134
 
134
135
  ## Production-shaped channel patterns
135
136
 
@@ -70,7 +70,7 @@ import type {
70
70
  */
71
71
  type GitHubParsedContext = Omit<
72
72
  GitHubEventContext,
73
- "github" | "thread" | "host" | "artifacts"
73
+ "github" | "thread" | "host" | "artifacts" | "payload"
74
74
  >;
75
75
 
76
76
  const DEFAULT_PULL_REQUEST_ACTIONS: ReadonlySet<string> = new Set([
@@ -787,6 +787,7 @@ async function handlePullRequest(input: {
787
787
  const ctx = enrichEventContext({
788
788
  bindingConfig: input.bindingConfig,
789
789
  ctx: parsed.ctx,
790
+ payload: input.payload,
790
791
  bindingState: binding,
791
792
  installationId,
792
793
  host: input.args.host,
@@ -879,6 +880,7 @@ async function handleIssueComment(input: {
879
880
  const ctx = enrichEventContext({
880
881
  bindingConfig: input.bindingConfig,
881
882
  ctx: parsed.ctx,
883
+ payload: input.payload,
882
884
  bindingState: binding,
883
885
  installationId,
884
886
  host: input.args.host,
@@ -970,6 +972,7 @@ async function handleReviewComment(input: {
970
972
  const ctx = enrichEventContext({
971
973
  bindingConfig: input.bindingConfig,
972
974
  ctx: parsed.ctx,
975
+ payload: input.payload,
973
976
  bindingState: binding,
974
977
  installationId,
975
978
  host: input.args.host,
@@ -1050,6 +1053,7 @@ async function handleIssue(input: {
1050
1053
  const ctx = enrichEventContext({
1051
1054
  bindingConfig: input.bindingConfig,
1052
1055
  ctx: parsed.ctx,
1056
+ payload: input.payload,
1053
1057
  bindingState: binding,
1054
1058
  installationId,
1055
1059
  host: input.args.host,
@@ -1111,6 +1115,7 @@ async function handleCheckSuite(input: {
1111
1115
  enrichCiContext({
1112
1116
  bindingConfig: input.bindingConfig,
1113
1117
  ctx: parsed.unanchoredCtx,
1118
+ payload: input.payload,
1114
1119
  installationId,
1115
1120
  host: input.args.host,
1116
1121
  artifacts: input.args.artifacts,
@@ -1137,6 +1142,7 @@ async function handleCheckSuite(input: {
1137
1142
  const ctx = enrichEventContext({
1138
1143
  bindingConfig: input.bindingConfig,
1139
1144
  ctx: parsed.ctx,
1145
+ payload: input.payload,
1140
1146
  bindingState: binding,
1141
1147
  installationId,
1142
1148
  host: input.args.host,
@@ -1203,6 +1209,7 @@ async function handleCheckRun(input: {
1203
1209
  enrichCiContext({
1204
1210
  bindingConfig: input.bindingConfig,
1205
1211
  ctx: parsed.unanchoredCtx,
1212
+ payload: input.payload,
1206
1213
  installationId,
1207
1214
  host: input.args.host,
1208
1215
  artifacts: input.args.artifacts,
@@ -1229,6 +1236,7 @@ async function handleCheckRun(input: {
1229
1236
  const ctx = enrichEventContext({
1230
1237
  bindingConfig: input.bindingConfig,
1231
1238
  ctx: parsed.ctx,
1239
+ payload: input.payload,
1232
1240
  bindingState: binding,
1233
1241
  installationId,
1234
1242
  host: input.args.host,
@@ -1291,6 +1299,7 @@ async function handleWorkflowRun(input: {
1291
1299
  enrichCiContext({
1292
1300
  bindingConfig: input.bindingConfig,
1293
1301
  ctx: parsed.unanchoredCtx,
1302
+ payload: input.payload,
1294
1303
  installationId,
1295
1304
  host: input.args.host,
1296
1305
  artifacts: input.args.artifacts,
@@ -1317,6 +1326,7 @@ async function handleWorkflowRun(input: {
1317
1326
  const ctx = enrichEventContext({
1318
1327
  bindingConfig: input.bindingConfig,
1319
1328
  ctx: parsed.ctx,
1329
+ payload: input.payload,
1320
1330
  bindingState: binding,
1321
1331
  installationId,
1322
1332
  host: input.args.host,
@@ -1389,6 +1399,7 @@ async function handleStatus(input: {
1389
1399
  const ctx = enrichEventContext({
1390
1400
  bindingConfig: input.bindingConfig,
1391
1401
  ctx: parsed.ctx,
1402
+ payload: input.payload,
1392
1403
  bindingState: binding,
1393
1404
  installationId,
1394
1405
  host: input.args.host,
@@ -1463,6 +1474,7 @@ async function handleGenericEvent(input: {
1463
1474
  const ctx = enrichEventContext({
1464
1475
  bindingConfig: input.bindingConfig,
1465
1476
  ctx: parsed.ctx,
1477
+ payload: input.payload,
1466
1478
  bindingState: binding,
1467
1479
  installationId,
1468
1480
  host: input.args.host,
@@ -2353,10 +2365,11 @@ function escapeRegExp(value: string): string {
2353
2365
  */
2354
2366
  function enrichEventContext(input: {
2355
2367
  bindingConfig: GitHubBindingConfig;
2356
- ctx: Omit<GitHubEventContext, "github" | "thread" | "host" | "artifacts"> &
2368
+ ctx: GitHubParsedContext &
2357
2369
  Partial<Pick<GitHubEventContext, "github" | "thread">>;
2358
2370
  bindingState: GitHubBindingState;
2359
2371
  installationId?: number;
2372
+ payload: unknown;
2360
2373
  host: HostContext;
2361
2374
  artifacts: ArtifactsApi;
2362
2375
  }): GitHubEventContext {
@@ -2366,6 +2379,7 @@ function enrichEventContext(input: {
2366
2379
  });
2367
2380
  return {
2368
2381
  ...input.ctx,
2382
+ payload: input.payload,
2369
2383
  ...(input.installationId === undefined
2370
2384
  ? {}
2371
2385
  : { installationId: input.installationId }),
@@ -2384,6 +2398,7 @@ function enrichCiContext(input: {
2384
2398
  bindingConfig: GitHubBindingConfig;
2385
2399
  ctx: GitHubParsedContext;
2386
2400
  installationId?: number;
2401
+ payload: unknown;
2387
2402
  host: HostContext;
2388
2403
  artifacts: ArtifactsApi;
2389
2404
  }): GitHubEventContext {
@@ -2400,6 +2415,7 @@ function enrichCiContext(input: {
2400
2415
  ctx: input.ctx,
2401
2416
  bindingState: binding,
2402
2417
  installationId: input.installationId,
2418
+ payload: input.payload,
2403
2419
  host: input.host,
2404
2420
  artifacts: input.artifacts,
2405
2421
  });
@@ -320,6 +320,8 @@ export interface GitHubEventContext {
320
320
  sender?: GitHubUser;
321
321
  /** Installation id from the webhook payload, when present. */
322
322
  installationId?: number;
323
+ /** Verified webhook body for this delivery. */
324
+ payload: unknown;
323
325
  /** Authenticated GitHub helpers (`getOctokit`, `request`, `createStatus`). */
324
326
  github: GitHubHandle;
325
327
  /** Post / react on the conversation thread. */
@@ -91,7 +91,7 @@ export type CursorScmWorkflowRunMeta = CursorScmCiBaseMeta & {
91
91
  workflowId?: number;
92
92
  };
93
93
 
94
- /** One event delivered by `GET /v0/scm-events` (metadata only). */
94
+ /** One event delivered by `GET /v0/scm-events`. */
95
95
  export interface CursorScmEvent {
96
96
  offset: string;
97
97
  provider: string;
@@ -99,6 +99,8 @@ export interface CursorScmEvent {
99
99
  deliveryId?: string;
100
100
  repo: string;
101
101
  receivedAtMs: number;
102
+ /** Verified webhook body when the API stored it. */
103
+ payload?: unknown;
102
104
  /** Webhook `action` when present. */
103
105
  action?: string;
104
106
  /** PR number when the delivery is PR-scoped. */
@@ -235,6 +237,11 @@ function readDispatchError(body: unknown): string | undefined {
235
237
  return typeof error === "string" && error !== "" ? error : undefined;
236
238
  }
237
239
 
240
+ /** Stored webhook body, or a metadata stub for older stream entries. */
241
+ export function scmEventToGitHubPayload(event: CursorScmEvent): unknown {
242
+ return event.payload ?? scmMetadataToGitHubPayload(event);
243
+ }
244
+
238
245
  /**
239
246
  * Minimal GitHub webhook body from an SCM-events metadata envelope.
240
247
  * When `pullRequest` has title + head/base refs+shas, emits a Zod-valid
@@ -390,10 +390,6 @@ export type OAuthCallbackResult = {
390
390
  * implementation every other Cursor surface shares. `@cursor/july` publishes to
391
391
  * public npm with no private workspace dependencies, and its OAuth state is a
392
392
  * bare UUID rather than the payload that module's validator expects.
393
- *
394
- * Nothing here reads Statsig, so this listener is outside
395
- * `unified_mcp_loopback`: turning that gate off restores the other surfaces'
396
- * original servers but leaves this one, and its state check, in place.
397
393
  */
398
394
  export async function waitForMcpOAuthCallback(args: {
399
395
  authorizationUrl: string;
@@ -67,7 +67,7 @@ import {
67
67
  type CursorScmSubscription,
68
68
  formatCursorScmDispatchOutcome,
69
69
  formatCursorScmEventLog,
70
- scmMetadataToGitHubPayload,
70
+ scmEventToGitHubPayload,
71
71
  scmMetadataToOriginPayload,
72
72
  } from "./cursor-event-relay.js";
73
73
  import {
@@ -1900,7 +1900,7 @@ function startCursorEventRelay(input: {
1900
1900
  });
1901
1901
  const result = await handleAgentServeTrigger({
1902
1902
  type: "github",
1903
- bodyText: JSON.stringify(scmMetadataToGitHubPayload(event)),
1903
+ bodyText: JSON.stringify(scmEventToGitHubPayload(event)),
1904
1904
  eventName: event.eventName,
1905
1905
  deliveryId: event.deliveryId,
1906
1906
  targets,
package/src/types.ts CHANGED
@@ -2752,7 +2752,7 @@ export interface ServeOptions {
2752
2752
  */
2753
2753
  cloudToolsUrl?: string;
2754
2754
  /**
2755
- * Pull SCM webhook metadata from `/v0/scm-events` (Cursor account auth).
2755
+ * Pull SCM webhook events from `/v0/scm-events` (Cursor account auth).
2756
2756
  * GitHub and Origin subscriptions are registered independently.
2757
2757
  * The stream is read as the host's Cursor user, so this requires a signed-in
2758
2758
  * host: `serve` throws when no key resolves from `apiKey` here,