@cursor/july 0.1.103 → 0.1.104
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/channels/change-monitors/change-monitors-channel.d.ts +5 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.js +41 -0
- package/dist/channels/change-monitors/index.d.ts +4 -0
- package/dist/channels/change-monitors/index.d.ts.map +1 -0
- package/dist/channels/change-monitors/index.js +2 -0
- package/dist/channels/change-monitors/types.d.ts +39 -0
- package/dist/channels/change-monitors/types.d.ts.map +1 -0
- package/dist/channels/change-monitors/types.js +1 -0
- package/dist/channels/github/defaults.d.ts.map +1 -1
- package/dist/channels/github/defaults.js +4 -0
- package/dist/channels/github/progress.d.ts +22 -0
- package/dist/channels/github/progress.d.ts.map +1 -1
- package/dist/channels/github/progress.js +32 -5
- package/dist/channels/issues/index.d.ts +4 -0
- package/dist/channels/issues/index.d.ts.map +1 -0
- package/dist/channels/issues/index.js +2 -0
- package/dist/channels/issues/issues-channel.d.ts +5 -0
- package/dist/channels/issues/issues-channel.d.ts.map +1 -0
- package/dist/channels/issues/issues-channel.js +37 -0
- package/dist/channels/issues/types.d.ts +33 -0
- package/dist/channels/issues/types.d.ts.map +1 -0
- package/dist/channels/issues/types.js +1 -0
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.DW9pXkpL.js → app.DbMWUyGb.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CdEIUwDg.js → VPLocalSearchBox.DcNeTh9o.js} +1 -1
- package/dist/docs/assets/chunks/{theme.YZMHgPgg.js → theme.DMjhY3gl.js} +2 -2
- package/dist/docs/assets/{guides_github.md.DKYiT9do.js → guides_github.md.c0gdGJ-D.js} +1 -1
- package/dist/docs/assets/{guides_github.md.DKYiT9do.lean.js → guides_github.md.c0gdGJ-D.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.Dz8Cnudp.js → reference_channels.md.DBGcaB7m.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.Dz8Cnudp.lean.js → reference_channels.md.DBGcaB7m.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/design/filesystem.md +376 -0
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-agents.html +4 -4
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/github.md +5 -0
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +4 -4
- package/dist/docs/guides/opentelemetry.html +4 -4
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +4 -4
- package/dist/docs/llms-full.txt +406 -0
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/channels.md +20 -0
- package/dist/docs/reference/cli.html +4 -4
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/extensions.html +4 -4
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/result.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/skills/ab.html +4 -4
- package/dist/docs/skills/create-agent.html +4 -4
- package/dist/docs/skills/debug.html +4 -4
- package/dist/docs/skills/evals.html +4 -4
- package/dist/docs/skills/framework-map.html +4 -4
- package/dist/docs/skills/github.html +4 -4
- package/dist/docs/skills/hillclimb.html +4 -4
- package/dist/docs/skills/index.html +4 -4
- package/dist/docs/skills/mcp-auth.html +4 -4
- package/dist/docs/skills/otel.html +4 -4
- package/dist/docs/skills/setup-slack.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +4 -4
- package/dist/docs/templates/code-wiki.html +4 -4
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +4 -4
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +4 -4
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/filesystem.d.ts +440 -0
- package/dist/filesystem.d.ts.map +1 -0
- package/dist/filesystem.js +1694 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal/continuation-channel.d.ts +4 -2
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +21 -12
- package/dist/internal/continuation-identity.d.ts +13 -5
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +74 -35
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +80 -8
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +3 -0
- package/dist/internal/factory-resource-channel.d.ts +33 -0
- package/dist/internal/factory-resource-channel.d.ts.map +1 -0
- package/dist/internal/factory-resource-channel.js +77 -0
- package/dist/internal/filesystem/errors.d.ts +64 -0
- package/dist/internal/filesystem/errors.d.ts.map +1 -0
- package/dist/internal/filesystem/errors.js +175 -0
- package/dist/internal/filesystem/format.d.ts +28 -0
- package/dist/internal/filesystem/format.d.ts.map +1 -0
- package/dist/internal/filesystem/format.js +213 -0
- package/dist/internal/filesystem/merge.d.ts +34 -0
- package/dist/internal/filesystem/merge.d.ts.map +1 -0
- package/dist/internal/filesystem/merge.js +196 -0
- package/dist/internal/filesystem/scratch.d.ts +59 -0
- package/dist/internal/filesystem/scratch.d.ts.map +1 -0
- package/dist/internal/filesystem/scratch.js +212 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts +29 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -0
- package/dist/internal/filesystem/sdk-schemas.js +153 -0
- package/dist/internal/filesystem/tools.d.ts +42 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -0
- package/dist/internal/filesystem/tools.js +618 -0
- package/dist/internal/filesystem/walk.d.ts +74 -0
- package/dist/internal/filesystem/walk.d.ts.map +1 -0
- package/dist/internal/filesystem/walk.js +339 -0
- package/dist/internal/guest-network.d.ts +5 -2
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +7 -2
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +12 -2
- package/dist/internal/sdk-runner.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +3 -1
- package/dist/internal/session-engine.d.ts +22 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +362 -40
- package/dist/internal/testing/factory-resource-fixtures.d.ts +48 -0
- package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/factory-resource-fixtures.js +41 -0
- package/dist/playground/assets/{index-59KvgREd.js → index-8YiozU89.js} +38 -38
- package/dist/playground/index.html +1 -1
- package/dist/types.d.ts +51 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/design/filesystem.md +376 -0
- package/docs/guides/github.md +5 -0
- package/docs/reference/channels.md +20 -0
- package/package.json +16 -2
- package/src/channels/change-monitors/change-monitors-channel.ts +62 -0
- package/src/channels/change-monitors/index.ts +8 -0
- package/src/channels/change-monitors/types.ts +44 -0
- package/src/channels/github/defaults.ts +4 -0
- package/src/channels/github/progress.ts +76 -10
- package/src/channels/issues/index.ts +9 -0
- package/src/channels/issues/issues-channel.ts +51 -0
- package/src/channels/issues/types.ts +41 -0
- package/src/filesystem.ts +2074 -0
- package/src/index.ts +28 -0
- package/src/internal/continuation-channel.ts +29 -12
- package/src/internal/continuation-identity.ts +122 -37
- package/src/internal/discovery/agent.ts +87 -1
- package/src/internal/discovery/info.ts +3 -0
- package/src/internal/factory-resource-channel.ts +122 -0
- package/src/internal/filesystem/errors.ts +220 -0
- package/src/internal/filesystem/format.ts +276 -0
- package/src/internal/filesystem/merge.ts +195 -0
- package/src/internal/filesystem/scratch.ts +255 -0
- package/src/internal/filesystem/sdk-schemas.ts +204 -0
- package/src/internal/filesystem/tools.ts +821 -0
- package/src/internal/filesystem/walk.ts +369 -0
- package/src/internal/guest-network.ts +8 -2
- package/src/internal/hosted-delivery.ts +18 -1
- package/src/internal/sdk-runner.ts +4 -0
- package/src/internal/session-engine.ts +439 -29
- package/src/internal/testing/factory-resource-fixtures.ts +85 -0
- package/src/types.ts +49 -3
- package/dist/docs/assets/chunks/@localSearchIndexroot.nrl1ifBq.js +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory resource continuation fixtures shared by July and the control
|
|
3
|
+
* plane identity suite. Pure data: no imports, so server-shared can load
|
|
4
|
+
* this file by relative path without pulling `@cursor/july`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const FACTORY_CHECKPOINT_NAME: string =
|
|
8
|
+
"changeMonitors/cm-1/checkpoints/cp-1";
|
|
9
|
+
export const FACTORY_ISSUE_NAME: string = "issues/iss-1";
|
|
10
|
+
|
|
11
|
+
export interface FactoryCheckpointResourceFixture {
|
|
12
|
+
name: string;
|
|
13
|
+
deployment: string;
|
|
14
|
+
runKey: string;
|
|
15
|
+
issues: { title: string };
|
|
16
|
+
evidenceSummary: string;
|
|
17
|
+
planRevision: string;
|
|
18
|
+
createTime: string;
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface FactoryIssueResourceFixture {
|
|
23
|
+
name: string;
|
|
24
|
+
title: string;
|
|
25
|
+
body: string;
|
|
26
|
+
state: "STATE_OPEN";
|
|
27
|
+
createTime: string;
|
|
28
|
+
updateTime: string;
|
|
29
|
+
path: string;
|
|
30
|
+
etag: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CheckpointCreatedPayloadFixture {
|
|
34
|
+
eventId: string;
|
|
35
|
+
eventType: "checkpoint.created";
|
|
36
|
+
teamId: string;
|
|
37
|
+
occurredAtMs: number;
|
|
38
|
+
checkpoint: FactoryCheckpointResourceFixture;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface IssueCreatedPayloadFixture {
|
|
42
|
+
eventId: string;
|
|
43
|
+
eventType: "issue.created";
|
|
44
|
+
teamId: string;
|
|
45
|
+
occurredAtMs: number;
|
|
46
|
+
issue: FactoryIssueResourceFixture;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const FACTORY_CHECKPOINT_RESOURCE: FactoryCheckpointResourceFixture = {
|
|
50
|
+
name: FACTORY_CHECKPOINT_NAME,
|
|
51
|
+
deployment: "deployments/11111111-1111-4111-8111-111111111111",
|
|
52
|
+
runKey: "t+1h",
|
|
53
|
+
issues: { title: "POST /checkout 500 rate elevated" },
|
|
54
|
+
evidenceSummary: "5xx rate rose after the deploy.",
|
|
55
|
+
planRevision: "changeMonitors/cm-1/planRevisions/3",
|
|
56
|
+
createTime: "2026-09-08T21:00:00Z",
|
|
57
|
+
description: "Checkout 500s are elevated.",
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const FACTORY_ISSUE_RESOURCE: FactoryIssueResourceFixture = {
|
|
61
|
+
name: FACTORY_ISSUE_NAME,
|
|
62
|
+
title: "Checkout 500s",
|
|
63
|
+
body: "5xx rate rose after the deploy.",
|
|
64
|
+
state: "STATE_OPEN",
|
|
65
|
+
createTime: "2026-09-08T21:00:00Z",
|
|
66
|
+
updateTime: "2026-09-08T21:00:00Z",
|
|
67
|
+
path: "checkout/500s",
|
|
68
|
+
etag: 'W/"1"',
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const CHECKPOINT_CREATED_PAYLOAD: CheckpointCreatedPayloadFixture = {
|
|
72
|
+
eventId: "evt-cp-1",
|
|
73
|
+
eventType: "checkpoint.created",
|
|
74
|
+
teamId: "team-1",
|
|
75
|
+
occurredAtMs: 1,
|
|
76
|
+
checkpoint: FACTORY_CHECKPOINT_RESOURCE,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const ISSUE_CREATED_PAYLOAD: IssueCreatedPayloadFixture = {
|
|
80
|
+
eventId: "evt-iss-1",
|
|
81
|
+
eventType: "issue.created",
|
|
82
|
+
teamId: "team-1",
|
|
83
|
+
occurredAtMs: 1,
|
|
84
|
+
issue: FACTORY_ISSUE_RESOURCE,
|
|
85
|
+
};
|
package/src/types.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type { InteractionUpdate, SDKCustomTool, ToolName } from "@cursor/sdk";
|
|
12
12
|
import type { z } from "zod";
|
|
13
13
|
import type { ABConfigFile } from "./ab.js";
|
|
14
|
+
import type { FileSystem } from "./filesystem.js";
|
|
14
15
|
import type {
|
|
15
16
|
ContinuationClaim,
|
|
16
17
|
ContinuationIdentity,
|
|
@@ -169,6 +170,18 @@ export function toPublicCloudInfo(
|
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Session-scoped facts a `root` factory needs and does not otherwise
|
|
175
|
+
* have at `defineAgent` time. The factory returns a handle: each
|
|
176
|
+
* method must observe the current binding. Do not snapshot the tree.
|
|
177
|
+
*/
|
|
178
|
+
export interface RootContext {
|
|
179
|
+
sessionId: string;
|
|
180
|
+
agentName?: string;
|
|
181
|
+
continuationKey?: string;
|
|
182
|
+
host?: { files: HostFilesApi; reminders?: ReminderHostApi };
|
|
183
|
+
}
|
|
184
|
+
|
|
172
185
|
/** Input to `defineAgent` (authored at `agent/agent.ts`). */
|
|
173
186
|
export interface AgentConfig {
|
|
174
187
|
/**
|
|
@@ -190,10 +203,21 @@ export interface AgentConfig {
|
|
|
190
203
|
*/
|
|
191
204
|
instructions?: string;
|
|
192
205
|
/**
|
|
193
|
-
* Execution runtime. Defaults to `"local"`.
|
|
194
|
-
*
|
|
206
|
+
* Execution runtime. Defaults to `"local"`. Compatibility strings
|
|
207
|
+
* `"cloud"` and `"grokbot"` remain for agents that already ship; they
|
|
208
|
+
* are not a product surface. New agents omit this field.
|
|
195
209
|
*/
|
|
196
210
|
runtime?: AgentRuntime;
|
|
211
|
+
/**
|
|
212
|
+
* The FileSystem the model can see. Omit it and the root is the host
|
|
213
|
+
* disk. A static handle (`tempFs`, `unionFs`, ...) is that object on
|
|
214
|
+
* every session — writes are shared. Pass `(ctx) => …` and return a
|
|
215
|
+
* new handle per session when you want isolation. A factory that
|
|
216
|
+
* returns the same object still shares. Incompatible with
|
|
217
|
+
* {@link local} `cwd` / `workspaceDir` / `sandbox` and with
|
|
218
|
+
* {@link runtime} `"cloud"`.
|
|
219
|
+
*/
|
|
220
|
+
root?: FileSystem | ((ctx: RootContext) => FileSystem | Promise<FileSystem>);
|
|
197
221
|
/**
|
|
198
222
|
* Cloud agent defaults. Used when {@link runtime} is `"cloud"`, and as
|
|
199
223
|
* the base merged under per-session {@link SendMessageOptions.cloud}
|
|
@@ -262,7 +286,8 @@ export interface AgentConfig {
|
|
|
262
286
|
* deploys onto the v2 control plane (v2 APIs and schemas). Omitted
|
|
263
287
|
* channel `continuation` then inherits from declared events (`github.pr/v2`,
|
|
264
288
|
* `github.issue/v2`, `github.none/v2`, `slack.thread/v2`, `origin.pr/v2`,
|
|
265
|
-
* `deployments.deployment/v2`, `
|
|
289
|
+
* `deployments.deployment/v2`, `change_monitors.checkpoint/v2`,
|
|
290
|
+
* `issues.issue/v2`, `none/v2`). An explicit per-channel selector
|
|
266
291
|
* still overrides.
|
|
267
292
|
*
|
|
268
293
|
* ```ts
|
|
@@ -2520,6 +2545,13 @@ export interface ChannelMeta {
|
|
|
2520
2545
|
* to dispatch on. Extracted into the deploy manifest as `eventTypes`.
|
|
2521
2546
|
*/
|
|
2522
2547
|
deploymentEventTypes?: readonly string[];
|
|
2548
|
+
/**
|
|
2549
|
+
* For Change Monitor checkpoint and Factory issue packs: the factory
|
|
2550
|
+
* event types this channel is wired to dispatch on. Extracted into the
|
|
2551
|
+
* deploy manifest as `eventTypes`. Kept separate from
|
|
2552
|
+
* `deploymentEventTypes`.
|
|
2553
|
+
*/
|
|
2554
|
+
factoryEventTypes?: readonly string[];
|
|
2523
2555
|
/**
|
|
2524
2556
|
* For Slack packs with the opt-in channel watch: the allowlisted channels
|
|
2525
2557
|
* (ids or `#names`) this channel dispatches on without a mention. Surfaced
|
|
@@ -3122,6 +3154,11 @@ export interface ResolvedAgent {
|
|
|
3122
3154
|
instructions?: string;
|
|
3123
3155
|
/** Execution runtime. Root agents default to `"local"`. */
|
|
3124
3156
|
runtime: AgentRuntime;
|
|
3157
|
+
/**
|
|
3158
|
+
* Authored {@link AgentConfig.root}. The factory is persisted, not a
|
|
3159
|
+
* serialized tree. A resumed session calls it again (or reuses the handle).
|
|
3160
|
+
*/
|
|
3161
|
+
root?: FileSystem | ((ctx: RootContext) => FileSystem | Promise<FileSystem>);
|
|
3125
3162
|
/** Cloud options when {@link runtime} is `"cloud"`. */
|
|
3126
3163
|
cloud?: AgentCloudOptions;
|
|
3127
3164
|
/**
|
|
@@ -3274,6 +3311,8 @@ export interface AgentProjectInfo {
|
|
|
3274
3311
|
bitbucketWebhookEvents?: readonly string[];
|
|
3275
3312
|
/** Factory deployment event types the channel dispatches on, when declared. */
|
|
3276
3313
|
deploymentEventTypes?: readonly string[];
|
|
3314
|
+
/** Change Monitor checkpoint or Factory issue event types the channel dispatches on, when declared. */
|
|
3315
|
+
factoryEventTypes?: readonly string[];
|
|
3277
3316
|
/** Slack channels watched for posts (opt-in channel watch), when declared. */
|
|
3278
3317
|
slackChannelPosts?: readonly string[];
|
|
3279
3318
|
}>;
|
|
@@ -3324,10 +3363,17 @@ export interface RunnerTurnRequest {
|
|
|
3324
3363
|
sdkAgentId?: string;
|
|
3325
3364
|
/** Absolute path of the session's materialized workspace. */
|
|
3326
3365
|
workspaceDir: string;
|
|
3366
|
+
/** Resolved FileSystem handle when {@link AgentConfig.root} is set. */
|
|
3367
|
+
root?: FileSystem;
|
|
3327
3368
|
/** Run the local harness sandboxed ({@link AgentLocalOptions.sandbox}). */
|
|
3328
3369
|
sandbox?: boolean;
|
|
3329
3370
|
/** Built-in tool allowlist ({@link AgentConfig.tools}, resolved). */
|
|
3330
3371
|
tools?: ToolName[];
|
|
3372
|
+
/**
|
|
3373
|
+
* Native tools hidden on the Cursor SDK agent because synthesized
|
|
3374
|
+
* FileSystem tools own those names. Host-default omitted `tools` only.
|
|
3375
|
+
*/
|
|
3376
|
+
disallowedTools?: ToolName[];
|
|
3331
3377
|
/** Absolute path for runner-owned durable state (conversation store). */
|
|
3332
3378
|
runnerStateDir: string;
|
|
3333
3379
|
prompt: string;
|