@cursor/july 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/agent-serve.js +20 -2
- package/dist/channels/slack/slack-channel.d.ts +19 -1
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +29 -0
- package/dist/docs/404.html +1 -1
- package/dist/docs/ab.html +2 -2
- package/dist/docs/assets/{app.CqjrYaT2.js → app.Cm4lsMc4.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CbQshWFK.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.ag-MwUel.js → VPLocalSearchBox.CYUFXspH.js} +1 -1
- package/dist/docs/assets/chunks/{theme.BS-DJWat.js → theme.CTjkX9vc.js} +2 -2
- package/dist/docs/building-with-agents.html +2 -2
- package/dist/docs/concepts.html +2 -2
- package/dist/docs/deployment.html +2 -2
- package/dist/docs/evals.html +2 -2
- package/dist/docs/example-agents/approval-buddy.html +2 -2
- package/dist/docs/example-agents/benny.html +2 -2
- package/dist/docs/example-agents/bugbot.html +2 -2
- package/dist/docs/example-agents/codebase-wiki.html +2 -2
- package/dist/docs/example-agents/codeowners-review.html +2 -2
- package/dist/docs/example-agents/concierge.html +2 -2
- package/dist/docs/example-agents/fsd.html +2 -2
- package/dist/docs/example-agents/index.html +2 -2
- package/dist/docs/example-agents/knowledge-base.html +2 -2
- package/dist/docs/example-agents/oncall.html +2 -2
- package/dist/docs/example-agents/security-reviewer.html +2 -2
- package/dist/docs/example-agents/slack-agent.html +2 -2
- package/dist/docs/example-agents/weather-agent.html +2 -2
- package/dist/docs/guides/agent-to-agent.html +2 -2
- package/dist/docs/guides/cloud-runtime.html +2 -2
- package/dist/docs/guides/github.html +2 -2
- package/dist/docs/guides/human-in-the-loop.html +2 -2
- package/dist/docs/guides/mcp-oauth.html +2 -2
- package/dist/docs/guides/slack.html +2 -2
- package/dist/docs/guides/webhooks.html +2 -2
- package/dist/docs/hillclimbing.html +2 -2
- package/dist/docs/index.html +2 -2
- package/dist/docs/quickstart.html +2 -2
- package/dist/docs/reference/agent-config.html +2 -2
- package/dist/docs/reference/channels.html +2 -2
- package/dist/docs/reference/cli.html +2 -2
- package/dist/docs/reference/connections.html +2 -2
- package/dist/docs/reference/hooks.html +2 -2
- package/dist/docs/reference/http-api.html +2 -2
- package/dist/docs/reference/instructions.html +2 -2
- package/dist/docs/reference/playground.html +2 -2
- package/dist/docs/reference/project-layout.html +2 -2
- package/dist/docs/reference/prompt.html +2 -2
- package/dist/docs/reference/schedules.html +2 -2
- package/dist/docs/reference/sessions.html +2 -2
- package/dist/docs/reference/skills.html +2 -2
- package/dist/docs/reference/subagents.html +2 -2
- package/dist/docs/reference/tools.html +2 -2
- package/dist/docs/scaffolding-agents.html +2 -2
- package/dist/docs/storage.html +2 -2
- package/dist/docs/troubleshooting.html +2 -2
- package/dist/internal/cloud-turn-cost.d.ts +34 -0
- package/dist/internal/cloud-turn-cost.d.ts.map +1 -0
- package/dist/internal/cloud-turn-cost.js +106 -0
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +1 -1
- package/dist/internal/event-log.d.ts +6 -0
- package/dist/internal/event-log.d.ts.map +1 -1
- package/dist/internal/event-log.js +16 -0
- package/dist/internal/host-platforms.d.ts +13 -0
- package/dist/internal/host-platforms.d.ts.map +1 -1
- package/dist/internal/host-platforms.js +25 -16
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +3 -1
- package/dist/internal/local-control-plane.d.ts +25 -0
- package/dist/internal/local-control-plane.d.ts.map +1 -0
- package/dist/internal/local-control-plane.js +172 -0
- package/dist/internal/platform-schedule-sync.d.ts +17 -0
- package/dist/internal/platform-schedule-sync.d.ts.map +1 -0
- package/dist/internal/platform-schedule-sync.js +72 -0
- package/dist/internal/platform-timers.d.ts +28 -0
- package/dist/internal/platform-timers.d.ts.map +1 -0
- package/dist/internal/platform-timers.js +120 -0
- package/dist/internal/reminder-runner.d.ts +16 -12
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +112 -61
- package/dist/internal/reminder-store.d.ts +5 -4
- package/dist/internal/reminder-store.d.ts.map +1 -1
- package/dist/internal/reminder-store.js +5 -4
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +44 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +105 -11
- package/dist/internal/session-engine.d.ts +22 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +110 -4
- package/dist/internal/storage-coordinator.d.ts +4 -15
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +4 -30
- package/dist/playground/assets/index-CquRB-l0.js +85 -0
- package/dist/playground/assets/{index-Bul1WfrB.css → index-Dj0bWpkn.css} +1 -1
- package/dist/playground/index.html +2 -2
- package/dist/storage.d.ts +0 -3
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +0 -3
- package/dist/types.d.ts +11 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/bin/agent-serve.ts +21 -2
- package/src/channels/slack/slack-channel.ts +46 -0
- package/src/internal/cloud-turn-cost.ts +158 -0
- package/src/internal/discovery.ts +1 -0
- package/src/internal/event-log.ts +17 -0
- package/src/internal/host-platforms.ts +40 -18
- package/src/internal/http-channel.ts +3 -1
- package/src/internal/local-control-plane.ts +188 -0
- package/src/internal/platform-schedule-sync.ts +81 -0
- package/src/internal/platform-timers.ts +173 -0
- package/src/internal/reminder-runner.ts +131 -67
- package/src/internal/reminder-store.ts +5 -4
- package/src/internal/sdk-runner.ts +49 -1
- package/src/internal/server.ts +121 -6
- package/src/internal/session-engine.ts +138 -3
- package/src/internal/storage-coordinator.ts +4 -41
- package/src/storage.ts +0 -5
- package/src/types.ts +11 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.VWQoPFJ1.js +0 -1
- package/dist/playground/assets/index-CkN74U_L.js +0 -87
|
@@ -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 {
|
|
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
|
-
|
|
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(
|
|
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
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
|
2255
|
-
* fire them via `POST /v1/dev/reminders/:id`
|
|
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
|