@cursor/july 0.1.27 → 0.1.29

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 (180) hide show
  1. package/dist/bin/agent-serve.js +32 -5
  2. package/dist/channels/slack/auth.d.ts +13 -13
  3. package/dist/channels/slack/auth.d.ts.map +1 -1
  4. package/dist/channels/slack/auth.js +19 -10
  5. package/dist/channels/slack/cursor-account.d.ts.map +1 -1
  6. package/dist/channels/slack/cursor-account.js +3 -1
  7. package/dist/channels/slack/defaults.d.ts +7 -4
  8. package/dist/channels/slack/defaults.d.ts.map +1 -1
  9. package/dist/channels/slack/defaults.js +14 -4
  10. package/dist/channels/slack/dispatch.d.ts +6 -0
  11. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  12. package/dist/channels/slack/dispatch.js +59 -21
  13. package/dist/channels/slack/external-policy.d.ts +27 -0
  14. package/dist/channels/slack/external-policy.d.ts.map +1 -0
  15. package/dist/channels/slack/external-policy.js +53 -0
  16. package/dist/channels/slack/index.d.ts +1 -0
  17. package/dist/channels/slack/index.d.ts.map +1 -1
  18. package/dist/channels/slack/index.js +1 -0
  19. package/dist/channels/slack/interactive.d.ts +6 -0
  20. package/dist/channels/slack/interactive.d.ts.map +1 -1
  21. package/dist/channels/slack/interactive.js +42 -15
  22. package/dist/channels/slack/slack-channel.d.ts +19 -1
  23. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  24. package/dist/channels/slack/slack-channel.js +48 -6
  25. package/dist/channels/slack/types.d.ts +10 -0
  26. package/dist/channels/slack/types.d.ts.map +1 -1
  27. package/dist/docs/404.html +2 -2
  28. package/dist/docs/ab.html +3 -3
  29. package/dist/docs/assets/{app.BICLoJYF.js → app.QdunVQKg.js} +1 -1
  30. package/dist/docs/assets/chunks/@localSearchIndexroot.DGe61XHA.js +1 -0
  31. package/dist/docs/assets/chunks/{VPLocalSearchBox.wN4Ko9dT.js → VPLocalSearchBox.B6EpUXYf.js} +1 -1
  32. package/dist/docs/assets/chunks/{theme.dnnTE-Co.js → theme.BOTJVqh7.js} +2 -2
  33. package/dist/docs/assets/{guides_slack.md.D_xFKlnF.js → guides_slack.md.CjmJSvZS.js} +8 -4
  34. package/dist/docs/assets/guides_slack.md.CjmJSvZS.lean.js +1 -0
  35. package/dist/docs/assets/guides_webhooks.md.wSOYas3X.js +183 -0
  36. package/dist/docs/assets/{guides_webhooks.md.B1EswtUu.lean.js → guides_webhooks.md.wSOYas3X.lean.js} +1 -1
  37. package/dist/docs/assets/{index.md.Dfv5ic9t.js → index.md.CH_s5uZe.js} +1 -1
  38. package/dist/docs/assets/{reference_channels.md.DdmiKgqf.js → reference_channels.md.CDhTRfUz.js} +2 -2
  39. package/dist/docs/assets/{reference_channels.md.DdmiKgqf.lean.js → reference_channels.md.CDhTRfUz.lean.js} +1 -1
  40. package/dist/docs/building-with-agents.html +3 -3
  41. package/dist/docs/concepts.html +3 -3
  42. package/dist/docs/deployment.html +3 -3
  43. package/dist/docs/evals.html +3 -3
  44. package/dist/docs/example-agents/approval-buddy.html +3 -3
  45. package/dist/docs/example-agents/benny.html +3 -3
  46. package/dist/docs/example-agents/bugbot.html +3 -3
  47. package/dist/docs/example-agents/codebase-wiki.html +3 -3
  48. package/dist/docs/example-agents/codeowners-review.html +3 -3
  49. package/dist/docs/example-agents/concierge.html +3 -3
  50. package/dist/docs/example-agents/fsd.html +3 -3
  51. package/dist/docs/example-agents/index.html +3 -3
  52. package/dist/docs/example-agents/knowledge-base.html +3 -3
  53. package/dist/docs/example-agents/oncall.html +3 -3
  54. package/dist/docs/example-agents/security-reviewer.html +3 -3
  55. package/dist/docs/example-agents/slack-agent.html +3 -3
  56. package/dist/docs/example-agents/weather-agent.html +3 -3
  57. package/dist/docs/guides/agent-to-agent.html +3 -3
  58. package/dist/docs/guides/cloud-runtime.html +3 -3
  59. package/dist/docs/guides/github.html +3 -3
  60. package/dist/docs/guides/human-in-the-loop.html +3 -3
  61. package/dist/docs/guides/mcp-oauth.html +3 -3
  62. package/dist/docs/guides/slack.html +11 -7
  63. package/dist/docs/guides/webhooks.html +138 -5
  64. package/dist/docs/hashmap.json +1 -1
  65. package/dist/docs/hillclimbing.html +3 -3
  66. package/dist/docs/index.html +5 -5
  67. package/dist/docs/quickstart.html +3 -3
  68. package/dist/docs/reference/agent-config.html +3 -3
  69. package/dist/docs/reference/channels.html +5 -5
  70. package/dist/docs/reference/cli.html +3 -3
  71. package/dist/docs/reference/connections.html +3 -3
  72. package/dist/docs/reference/hooks.html +3 -3
  73. package/dist/docs/reference/http-api.html +3 -3
  74. package/dist/docs/reference/instructions.html +3 -3
  75. package/dist/docs/reference/playground.html +3 -3
  76. package/dist/docs/reference/project-layout.html +3 -3
  77. package/dist/docs/reference/prompt.html +3 -3
  78. package/dist/docs/reference/schedules.html +3 -3
  79. package/dist/docs/reference/sessions.html +3 -3
  80. package/dist/docs/reference/skills.html +3 -3
  81. package/dist/docs/reference/subagents.html +3 -3
  82. package/dist/docs/reference/tools.html +3 -3
  83. package/dist/docs/scaffolding-agents.html +3 -3
  84. package/dist/docs/storage.html +3 -3
  85. package/dist/docs/troubleshooting.html +3 -3
  86. package/dist/internal/cli-ax.d.ts +8 -0
  87. package/dist/internal/cli-ax.d.ts.map +1 -1
  88. package/dist/internal/cli-ax.js +116 -57
  89. package/dist/internal/cloud-turn-cost.d.ts +34 -0
  90. package/dist/internal/cloud-turn-cost.d.ts.map +1 -0
  91. package/dist/internal/cloud-turn-cost.js +106 -0
  92. package/dist/internal/cursor-slack-relay.d.ts +2 -0
  93. package/dist/internal/cursor-slack-relay.d.ts.map +1 -1
  94. package/dist/internal/cursor-slack-relay.js +1 -0
  95. package/dist/internal/deploy-client.d.ts +2 -0
  96. package/dist/internal/deploy-client.d.ts.map +1 -1
  97. package/dist/internal/deploy-client.js +1 -0
  98. package/dist/internal/discovery.d.ts.map +1 -1
  99. package/dist/internal/discovery.js +9 -2
  100. package/dist/internal/event-log.d.ts +6 -0
  101. package/dist/internal/event-log.d.ts.map +1 -1
  102. package/dist/internal/event-log.js +16 -0
  103. package/dist/internal/host-platforms.d.ts +13 -0
  104. package/dist/internal/host-platforms.d.ts.map +1 -1
  105. package/dist/internal/host-platforms.js +25 -16
  106. package/dist/internal/http-channel.d.ts.map +1 -1
  107. package/dist/internal/http-channel.js +3 -1
  108. package/dist/internal/local-control-plane.d.ts +25 -0
  109. package/dist/internal/local-control-plane.d.ts.map +1 -0
  110. package/dist/internal/local-control-plane.js +172 -0
  111. package/dist/internal/platform-schedule-sync.d.ts +17 -0
  112. package/dist/internal/platform-schedule-sync.d.ts.map +1 -0
  113. package/dist/internal/platform-schedule-sync.js +72 -0
  114. package/dist/internal/platform-timers.d.ts +28 -0
  115. package/dist/internal/platform-timers.d.ts.map +1 -0
  116. package/dist/internal/platform-timers.js +120 -0
  117. package/dist/internal/reminder-runner.d.ts +16 -12
  118. package/dist/internal/reminder-runner.d.ts.map +1 -1
  119. package/dist/internal/reminder-runner.js +112 -61
  120. package/dist/internal/reminder-store.d.ts +5 -4
  121. package/dist/internal/reminder-store.d.ts.map +1 -1
  122. package/dist/internal/reminder-store.js +5 -4
  123. package/dist/internal/sdk-runner.d.ts.map +1 -1
  124. package/dist/internal/sdk-runner.js +44 -1
  125. package/dist/internal/server.d.ts.map +1 -1
  126. package/dist/internal/server.js +115 -16
  127. package/dist/internal/session-engine.d.ts +22 -1
  128. package/dist/internal/session-engine.d.ts.map +1 -1
  129. package/dist/internal/session-engine.js +110 -4
  130. package/dist/internal/storage-coordinator.d.ts +4 -15
  131. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  132. package/dist/internal/storage-coordinator.js +4 -30
  133. package/dist/playground/assets/index-CquRB-l0.js +85 -0
  134. package/dist/playground/assets/{index-Bul1WfrB.css → index-Dj0bWpkn.css} +1 -1
  135. package/dist/playground/index.html +2 -2
  136. package/dist/storage.d.ts +0 -3
  137. package/dist/storage.d.ts.map +1 -1
  138. package/dist/storage.js +0 -3
  139. package/dist/types.d.ts +11 -2
  140. package/dist/types.d.ts.map +1 -1
  141. package/docs/README.md +1 -0
  142. package/docs/guides/slack.md +32 -7
  143. package/docs/guides/webhooks.md +183 -0
  144. package/docs/reference/channels.md +2 -1
  145. package/package.json +1 -1
  146. package/skills/setup-slack/SKILL.md +3 -0
  147. package/src/bin/agent-serve.ts +33 -5
  148. package/src/channels/slack/auth.ts +29 -22
  149. package/src/channels/slack/cursor-account.ts +2 -0
  150. package/src/channels/slack/defaults.ts +24 -4
  151. package/src/channels/slack/dispatch.ts +42 -1
  152. package/src/channels/slack/external-policy.ts +62 -0
  153. package/src/channels/slack/index.ts +1 -0
  154. package/src/channels/slack/interactive.ts +42 -10
  155. package/src/channels/slack/slack-channel.ts +66 -3
  156. package/src/channels/slack/types.ts +12 -0
  157. package/src/internal/cli-ax.ts +110 -34
  158. package/src/internal/cloud-turn-cost.ts +158 -0
  159. package/src/internal/cursor-slack-relay.ts +3 -0
  160. package/src/internal/deploy-client.ts +3 -0
  161. package/src/internal/discovery.ts +9 -1
  162. package/src/internal/event-log.ts +17 -0
  163. package/src/internal/host-platforms.ts +40 -18
  164. package/src/internal/http-channel.ts +3 -1
  165. package/src/internal/local-control-plane.ts +188 -0
  166. package/src/internal/platform-schedule-sync.ts +81 -0
  167. package/src/internal/platform-timers.ts +173 -0
  168. package/src/internal/reminder-runner.ts +131 -67
  169. package/src/internal/reminder-store.ts +5 -4
  170. package/src/internal/sdk-runner.ts +49 -1
  171. package/src/internal/server.ts +130 -11
  172. package/src/internal/session-engine.ts +138 -3
  173. package/src/internal/storage-coordinator.ts +4 -41
  174. package/src/storage.ts +0 -5
  175. package/src/types.ts +11 -2
  176. package/dist/docs/assets/chunks/@localSearchIndexroot.CQJytDwU.js +0 -1
  177. package/dist/docs/assets/guides_slack.md.D_xFKlnF.lean.js +0 -1
  178. package/dist/docs/assets/guides_webhooks.md.B1EswtUu.js +0 -50
  179. package/dist/playground/assets/index-BDCeW4uc.js +0 -86
  180. /package/dist/docs/assets/{index.md.Dfv5ic9t.lean.js → index.md.CH_s5uZe.lean.js} +0 -0
@@ -21,6 +21,7 @@ import {
21
21
  SlackAskDedupeStore,
22
22
  SlackNudgeStore,
23
23
  } from "../channels/slack/nudge-store.js";
24
+ import { resolveDedicatedSlackHostBinding } from "../channels/slack/slack-channel.js";
24
25
  import {
25
26
  type AgentProject,
26
27
  type ApprovalDecision,
@@ -68,11 +69,22 @@ import { ApprovalGate } from "./approval-gate.js";
68
69
  import { ArtifactsStore } from "./artifacts-store.js";
69
70
  import { samePrincipal } from "./auth.js";
70
71
  import { mergeCloudOptions, resolveSessionRuntime } from "./cloud-merge.js";
72
+ import {
73
+ applyCloudUsageToEvents,
74
+ type CloudAgentUsage,
75
+ cloudSdkAgentIdFromEvents,
76
+ isUnpricedCompletedTurn,
77
+ mapSdkTokenUsage,
78
+ } from "./cloud-turn-cost.js";
71
79
  import { isDevMode } from "./dev-mode.js";
72
80
  import { EventLogStore } from "./event-log.js";
73
81
  import { TurnEventMapper } from "./event-mapper.js";
74
82
  import { createHostKvApi } from "./host-kv.js";
75
- import { createHostPlatforms, type HostPlatforms } from "./host-platforms.js";
83
+ import {
84
+ createHostPlatforms,
85
+ createHostSlackClient,
86
+ type HostPlatforms,
87
+ } from "./host-platforms.js";
76
88
  import {
77
89
  formatContinuationToken,
78
90
  newContinuationKey,
@@ -182,6 +194,12 @@ export interface SessionEngineOptions {
182
194
  runner: AgentRunner;
183
195
  logger?: (line: string) => void;
184
196
  platforms?: HostPlatforms;
197
+ /**
198
+ * Test seam / override for cloud billed usage (`Agent.getUsage`). Used to
199
+ * backfill `turn.completed` rows that older engines persisted without
200
+ * usage/cost so the playground Trace tab can still show an estimate.
201
+ */
202
+ getCloudUsage?: (sdkAgentId: string) => Promise<CloudAgentUsage | undefined>;
185
203
  }
186
204
 
187
205
  /**
@@ -289,12 +307,20 @@ export class SessionEngine {
289
307
  private readonly artifactsStore: ArtifactsStore;
290
308
  /** Serve-time resolved connections (see {@link setResolvedConnections}). */
291
309
  private resolvedConnections: EngineResolvedConnection[] = [];
310
+ private readonly getCloudUsage: (
311
+ sdkAgentId: string
312
+ ) => Promise<CloudAgentUsage | undefined>;
313
+ /** Sessions whose completed turns are fully priced (no further backfill). */
314
+ private readonly cloudCostBackfillDone = new Set<string>();
315
+ /** Deduped in-flight cloud cost backfills, keyed by session id. */
316
+ private readonly cloudCostBackfill = new Map<string, Promise<void>>();
292
317
 
293
318
  constructor(options: SessionEngineOptions) {
294
319
  this.project = options.project;
295
320
  this.stateRoot = options.stateRoot;
296
321
  this.runner = options.runner;
297
322
  this.logger = options.logger ?? (() => {});
323
+ this.getCloudUsage = options.getCloudUsage ?? defaultGetCloudUsage;
298
324
  this.turnGovernor = new TurnGovernor(options.project.agent.concurrency);
299
325
  this.sessions = new SessionStore(join(options.stateRoot, "sessions"));
300
326
  this.nudgeStore = new SlackNudgeStore(
@@ -344,7 +370,20 @@ export class SessionEngine {
344
370
  (connection) => !isSymbolicConnectionTransport(connection.transport)
345
371
  )
346
372
  );
347
- this.platforms = options.platforms ?? createHostPlatforms();
373
+ const basePlatforms = options.platforms ?? createHostPlatforms();
374
+ const slackBinding = resolveDedicatedSlackHostBinding(
375
+ options.project.channels
376
+ );
377
+ this.platforms =
378
+ slackBinding === undefined
379
+ ? basePlatforms
380
+ : {
381
+ github: basePlatforms.github,
382
+ slack: createHostSlackClient({
383
+ credentials: slackBinding.credentials,
384
+ envPrefix: slackBinding.envPrefix,
385
+ }),
386
+ };
348
387
  for (const channel of options.project.channels) {
349
388
  this.channelsById.set(channel.id, channel.definition);
350
389
  }
@@ -2266,6 +2305,9 @@ export class SessionEngine {
2266
2305
  sessionId: string,
2267
2306
  startIndex = 0
2268
2307
  ): Promise<ReadableStream<Uint8Array>> {
2308
+ // Playground Trace replays this stream; backfill before the snapshot
2309
+ // so historical Sherlock-style cloud turns can show est. cost.
2310
+ await this.backfillCloudTurnCosts(sessionId);
2269
2311
  const log = await this.logs.get(sessionId);
2270
2312
  return log.stream(startIndex);
2271
2313
  }
@@ -2314,11 +2356,86 @@ export class SessionEngine {
2314
2356
  }
2315
2357
 
2316
2358
  /** Snapshot of recorded events (for download / offline trace). */
2317
- async listEvents(sessionId: string, startIndex = 0): Promise<SessionEvent[]> {
2359
+ async listEvents(
2360
+ sessionId: string,
2361
+ startIndex = 0,
2362
+ options?: { backfillCloudCost?: boolean }
2363
+ ): Promise<SessionEvent[]> {
2364
+ if (options?.backfillCloudCost === true) {
2365
+ await this.backfillCloudTurnCosts(sessionId);
2366
+ }
2318
2367
  const log = await this.logs.get(sessionId);
2319
2368
  return log.snapshot(startIndex);
2320
2369
  }
2321
2370
 
2371
+ /**
2372
+ * Historical cloud turns may lack usage/cost on `turn.completed` (pre-0.1.29
2373
+ * engines, or getUsage still zero at turn end). Fill them from billed usage
2374
+ * before the playground replays the stream so Trace can show est. cost.
2375
+ */
2376
+ private backfillCloudTurnCosts(sessionId: string): Promise<void> {
2377
+ if (this.cloudCostBackfillDone.has(sessionId)) {
2378
+ return Promise.resolve();
2379
+ }
2380
+ const pending = this.cloudCostBackfill.get(sessionId);
2381
+ if (pending !== undefined) {
2382
+ return pending;
2383
+ }
2384
+ const work = this.runCloudTurnCostBackfill(sessionId)
2385
+ .catch((error) => {
2386
+ this.logger(
2387
+ `[agentkit] cloud cost backfill failed for ${sessionId}: ${describeError(error)}`
2388
+ );
2389
+ })
2390
+ .finally(() => {
2391
+ this.cloudCostBackfill.delete(sessionId);
2392
+ });
2393
+ this.cloudCostBackfill.set(sessionId, work);
2394
+ return work;
2395
+ }
2396
+
2397
+ private async runCloudTurnCostBackfill(sessionId: string): Promise<void> {
2398
+ const log = await this.logs.get(sessionId);
2399
+ const events = log.snapshot(0);
2400
+ if (!events.some((event) => isUnpricedCompletedTurn(event))) {
2401
+ if (
2402
+ !this.isTurnRunning(sessionId) &&
2403
+ events.some((event) => event.type === "turn.completed")
2404
+ ) {
2405
+ this.cloudCostBackfillDone.add(sessionId);
2406
+ }
2407
+ return;
2408
+ }
2409
+ const record = await this.sessions.get(sessionId);
2410
+ const sdkAgentId =
2411
+ (record?.sdkAgentId !== undefined && record.sdkAgentId.startsWith("bc-")
2412
+ ? record.sdkAgentId
2413
+ : undefined) ?? cloudSdkAgentIdFromEvents(events);
2414
+ if (sdkAgentId === undefined) {
2415
+ return;
2416
+ }
2417
+ const billed = await this.getCloudUsage(sdkAgentId);
2418
+ if (billed === undefined) {
2419
+ return;
2420
+ }
2421
+ const model = this.project.agent.model ?? DEFAULT_MODEL;
2422
+ const patched = applyCloudUsageToEvents(events, billed, model);
2423
+ if (patched === undefined) {
2424
+ return;
2425
+ }
2426
+ for (let i = 0; i < patched.length; i++) {
2427
+ const next = patched[i];
2428
+ const prev = events[i];
2429
+ if (next === undefined || prev === next) {
2430
+ continue;
2431
+ }
2432
+ log.replace(i, next);
2433
+ }
2434
+ if (!log.snapshot(0).some((event) => isUnpricedCompletedTurn(event))) {
2435
+ this.cloudCostBackfillDone.add(sessionId);
2436
+ }
2437
+ }
2438
+
2322
2439
  async setContinuationToken(
2323
2440
  sessionId: string,
2324
2441
  token: string | null
@@ -2770,6 +2887,24 @@ function describeError(error: unknown): string {
2770
2887
  return error instanceof Error ? error.message : String(error);
2771
2888
  }
2772
2889
 
2890
+ async function defaultGetCloudUsage(
2891
+ sdkAgentId: string
2892
+ ): Promise<CloudAgentUsage | undefined> {
2893
+ try {
2894
+ const { Agent } = await import("@cursor/sdk");
2895
+ const billed = await Agent.getUsage(sdkAgentId);
2896
+ return {
2897
+ usage: mapSdkTokenUsage(billed.usage),
2898
+ runs: billed.runs.map((run) => ({
2899
+ runId: run.runId,
2900
+ usage: mapSdkTokenUsage(run.usage),
2901
+ })),
2902
+ };
2903
+ } catch {
2904
+ return undefined;
2905
+ }
2906
+ }
2907
+
2773
2908
  /** Detects the `{ content, isError: true }` rich-result error envelope. */
2774
2909
  function isErrorEnvelope(result: unknown): boolean {
2775
2910
  return (
@@ -10,9 +10,10 @@
10
10
  * failures — a throwing sink is logged and its write dropped; storage
11
11
  * must never stall or fail a turn.
12
12
  *
13
- * Scaling shape: sessions and reminders reduce to keyed puts on the KV
14
- * sink; eval runs and A/B metrics go to their dedicated tables
15
- * (`evals` / `abs`). Everything shares one bounded, serialized queue.
13
+ * Scaling shape: sessions reduce to keyed puts on the KV sink; eval runs
14
+ * and A/B metrics go to their dedicated tables (`evals` / `abs`).
15
+ * Reminder documents live on the control plane. Everything shares one
16
+ * bounded, serialized queue.
16
17
  */
17
18
 
18
19
  import type { ABMetricSample } from "../ab.js";
@@ -29,7 +30,6 @@ import type { JsonValue, SessionEvent, SessionRecord } from "../types.js";
29
30
  import type { ABSnapshot } from "./ab-snapshot.js";
30
31
  import { describeError } from "./describe-error.js";
31
32
  import type { EvalRunStorage } from "./eval-run-store.js";
32
- import { isReminderRecord, type ReminderRecord } from "./reminder-store.js";
33
33
 
34
34
  /** Event types that close a unit of work — flush point for turn-end batching. */
35
35
  const TURN_BOUNDARY_EVENTS: ReadonlySet<SessionEvent["type"]> = new Set([
@@ -417,43 +417,6 @@ export class StorageCoordinator {
417
417
  return record;
418
418
  }
419
419
 
420
- // ==========================================================================
421
- // Reminders
422
- // ==========================================================================
423
-
424
- /**
425
- * Mirror one reminder record (create / fire / cancel / disarm). Local
426
- * disk under `--state-root/reminders` remains the live source of truth;
427
- * this is the durable copy for host replacement.
428
- */
429
- reminder(record: ReminderRecord): void {
430
- if (this.closed) {
431
- return;
432
- }
433
- this.enqueue(
434
- [
435
- this.putOp(
436
- storageKeys.reminder(this.agentName, record.id),
437
- record as unknown as JsonValue
438
- ),
439
- ],
440
- "policy"
441
- );
442
- }
443
-
444
- /**
445
- * Saved reminder records for this agent (startup hydrate into local
446
- * disk). Errors read as empty — same posture as session bulk restore.
447
- */
448
- async listReminders(): Promise<ReminderRecord[]> {
449
- const entries = await this.tryList(
450
- storageKeys.reminderPrefix(this.agentName)
451
- );
452
- return entries.flatMap((entry) =>
453
- isReminderRecord(entry.value) ? [entry.value] : []
454
- );
455
- }
456
-
457
420
  // ==========================================================================
458
421
  // Author KV ({@link HostContext.kv})
459
422
  // ==========================================================================
package/src/storage.ts CHANGED
@@ -275,7 +275,6 @@ export const STORAGE_KEY_ROOT = "agentkit/v1" as const;
275
275
  * | `agentkit/v1/{agent}/session/{sessionId}` | `SessionRecord` |
276
276
  * | `agentkit/v1/{agent}/session-events/{sessionId}/{index}` | `SessionEvent[]` chunk (index = first event's index, zero-padded) |
277
277
  * | `agentkit/v1/{agent}/continuation/{channelId}/{token}` | `{ sessionId }` |
278
- * | `agentkit/v1/{agent}/reminder/{reminderId}` | `ReminderRecord` |
279
278
  * | `agentkit/v1/{agent}/kv/{key}` | Author JSON via {@link HostContext.kv} |
280
279
  * | `agentkit/v1/{agent}/artifacts/{id}` | `ArtifactRecord` via `ctx.artifacts` |
281
280
  *
@@ -301,10 +300,6 @@ export const storageKeys = {
301
300
  continuationKey: string
302
301
  ): string =>
303
302
  `${STORAGE_KEY_ROOT}/${agent}/continuation/${keySegment(channelId)}/${keySegment(continuationKey)}`,
304
- reminder: (agent: string, reminderId: string): string =>
305
- `${STORAGE_KEY_ROOT}/${agent}/reminder/${reminderId}`,
306
- reminderPrefix: (agent: string): string =>
307
- `${STORAGE_KEY_ROOT}/${agent}/reminder/`,
308
303
  /**
309
304
  * Author-facing opaque JSON (see {@link HostContext.kv}). `key` is
310
305
  * URI-encoded / digested like other caller-controlled segments.
package/src/types.ts CHANGED
@@ -2108,6 +2108,8 @@ export interface AgentChannelRouteInfo {
2108
2108
  /** JSON-safe projection of the manifest returned by `GET /v1/info`. */
2109
2109
  export interface AgentProjectInfo {
2110
2110
  name: string;
2111
+ /** Short agent description when authored on `defineAgent`. */
2112
+ description?: string;
2111
2113
  model?: ModelSetting;
2112
2114
  runtime: AgentRuntime;
2113
2115
  cloud?: AgentCloudPublicInfo;
@@ -2251,10 +2253,17 @@ export interface ServeOptions {
2251
2253
  schedules?: boolean;
2252
2254
  /**
2253
2255
  * Arm reminder deadline timers automatically. Defaults to `!dev`
2254
- * (same as schedules). Prompt-form reminders still persist in `--dev`;
2255
- * fire them via `POST /v1/dev/reminders/:id` or `handle.dispatchReminder`.
2256
+ * (same as schedules). Prompt-form reminders still persist on the
2257
+ * control plane in `--dev`; fire them via `POST /v1/dev/reminders/:id`
2258
+ * or `handle.dispatchReminder`.
2256
2259
  */
2257
2260
  reminders?: boolean;
2261
+ /**
2262
+ * Do not start the bundled control plane (schedule/reminder clocks).
2263
+ * Cursor hosting passes this so the kit talks to the Cursor backend
2264
+ * instead. Local `serve` should leave this unset.
2265
+ */
2266
+ noControlPlane?: boolean;
2258
2267
  /**
2259
2268
  * Serve the bundled web playground at `/playground` (chat, streaming,
2260
2269
  * tool calls, sessions, schedule dispatch). Defaults to true; the API