@cursor/july 0.1.103 → 0.1.105
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/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +1 -0
- package/dist/channels/deployments/types.d.ts +2 -0
- package/dist/channels/deployments/types.d.ts.map +1 -1
- 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.BVwaffdK.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CJxMklAy.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CdEIUwDg.js → VPLocalSearchBox.WuWTZ1x8.js} +1 -1
- package/dist/docs/assets/chunks/{theme.YZMHgPgg.js → theme.BYdI_6sF.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/guides_grokbot-agents.md.DVqdhBKb.js +9 -0
- package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.lean.js +1 -0
- package/dist/docs/assets/index.md.BW_6tOgR.js +5 -0
- package/dist/docs/assets/index.md.BW_6tOgR.lean.js +1 -0
- 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/assets/{reference_cli.md.CJNc_xYK.js → reference_cli.md.C6Lo8SEd.js} +2 -1
- package/dist/docs/assets/{reference_extensions.md.DykHW3qL.js → reference_extensions.md.CGmMLblt.js} +1 -1
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +3 -0
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +1 -0
- 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 +5 -5
- 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/grokbot-agents.html +35 -0
- package/dist/docs/guides/grokbot-agents.md +88 -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 +5 -5
- 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 +6 -6
- package/dist/docs/index.md +6 -1
- package/dist/docs/llms-full.txt +562 -2
- package/dist/docs/llms.txt +3 -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 +7 -6
- package/dist/docs/reference/cli.md +2 -1
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/extensions.html +6 -6
- package/dist/docs/reference/extensions.md +2 -0
- 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 +5 -5
- package/dist/docs/templates/demo.html +5 -5
- package/dist/docs/templates/grokbot-agents.html +29 -0
- package/dist/docs/templates/grokbot-agents.md +48 -0
- 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/files.d.ts +7 -2
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +7 -2
- 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/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +1 -0
- 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/framework-file-storage.d.ts +3 -1
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +3 -1
- 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 +7 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +41 -3
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -1
- package/dist/internal/hosted-managed-automation.js +27 -2
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -1
- package/dist/internal/sdk-runner.d.ts +13 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +21 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +11 -3
- package/dist/internal/session-engine.d.ts +30 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +484 -82
- package/dist/internal/store-mirror.d.ts +2 -2
- package/dist/internal/store-mirror.js +2 -2
- package/dist/internal/tenant-slack/relay.d.ts +2 -0
- package/dist/internal/tenant-slack/relay.d.ts.map +1 -1
- package/dist/internal/tenant-slack/relay.js +18 -8
- 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/internal/workspace-sync.d.ts +31 -6
- package/dist/internal/workspace-sync.d.ts.map +1 -1
- package/dist/internal/workspace-sync.js +67 -12
- package/dist/internal/workspace.d.ts +9 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +16 -0
- package/dist/playground/assets/{index-59KvgREd.js → index-BaQzjaNK.js} +40 -40
- package/dist/playground/assets/index-CceqnLTX.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +60 -11
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +6 -1
- package/docs/design/filesystem.md +376 -0
- package/docs/guides/github.md +5 -0
- package/docs/guides/grokbot-agents.md +93 -0
- package/docs/reference/channels.md +20 -0
- package/docs/reference/cli.md +2 -1
- package/docs/reference/extensions.md +2 -0
- package/docs/templates/grokbot-agents.md +53 -0
- package/package.json +25 -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/deployments/deployments-channel.ts +1 -0
- package/src/channels/deployments/types.ts +2 -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/files.ts +9 -2
- 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/cursor-agent-template.ts +1 -0
- 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/framework-file-storage.ts +3 -1
- package/src/internal/guest-network.ts +8 -2
- package/src/internal/hosted-delivery.ts +71 -2
- package/src/internal/hosted-managed-automation.ts +49 -5
- package/src/internal/init-project.ts +4 -1
- package/src/internal/sdk-runner.ts +23 -0
- package/src/internal/server.ts +16 -0
- package/src/internal/session-engine.ts +595 -73
- package/src/internal/store-mirror.ts +2 -2
- package/src/internal/tenant-slack/relay.ts +28 -4
- package/src/internal/testing/factory-resource-fixtures.ts +85 -0
- package/src/internal/workspace-sync.ts +84 -12
- package/src/internal/workspace.ts +20 -0
- package/src/types.ts +58 -11
- package/templates/grokbot-agents/README.md +26 -0
- package/templates/grokbot-agents/agent/agent.ts +6 -0
- package/templates/grokbot-agents/agent/extensions/grokbot.ts +5 -0
- package/templates/grokbot-agents/agent/instructions.md +7 -0
- package/templates/grokbot-agents/evals/evals.config.ts +5 -0
- package/templates/grokbot-agents/evals/grokbot-agents.eval.ts +18 -0
- package/templates/grokbot-agents/init.json +18 -0
- package/templates/grokbot-agents/package.json +17 -0
- package/templates/grokbot-agents/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.nrl1ifBq.js +0 -1
- package/dist/docs/assets/index.md.D75GWhPl.js +0 -5
- package/dist/docs/assets/index.md.D75GWhPl.lean.js +0 -1
- package/dist/playground/assets/index-MbMxXg-y.css +0 -1
- /package/dist/docs/assets/{reference_cli.md.CJNc_xYK.lean.js → reference_cli.md.C6Lo8SEd.lean.js} +0 -0
- /package/dist/docs/assets/{reference_extensions.md.DykHW3qL.lean.js → reference_extensions.md.CGmMLblt.lean.js} +0 -0
package/dist/docs/llms-full.txt
CHANGED
|
@@ -1089,6 +1089,387 @@ Continue with these pages:
|
|
|
1089
1089
|
|
|
1090
1090
|
---
|
|
1091
1091
|
|
|
1092
|
+
Source: /docs/design/filesystem.md
|
|
1093
|
+
|
|
1094
|
+
# One FileSystem for every Agent SDK agent
|
|
1095
|
+
|
|
1096
|
+
> **Status:** first implementation, this PR. `@cursor/july` only.
|
|
1097
|
+
> No Cursor SDK change.
|
|
1098
|
+
> **Audience:** Agent SDK maintainers.
|
|
1099
|
+
|
|
1100
|
+
Every local turn binds a **FileSystem** and synthesizes native file
|
|
1101
|
+
tools from it. There is no "is there an override?" branch on the
|
|
1102
|
+
tool path. Authors pick the tree with `root`. Omit `root` and the
|
|
1103
|
+
tree is the host disk, through internal `localFileSystem`.
|
|
1104
|
+
|
|
1105
|
+
```ts
|
|
1106
|
+
// Host disk. Relative paths resolve against the harness cwd.
|
|
1107
|
+
export default defineAgent({
|
|
1108
|
+
name: "reviewer",
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
// Override. The model sees only this tree. Paths are posix `/`.
|
|
1112
|
+
export default defineAgent({
|
|
1113
|
+
name: "notes",
|
|
1114
|
+
root: tempFs({ "/notes.md": "hello" }),
|
|
1115
|
+
});
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
---
|
|
1119
|
+
|
|
1120
|
+
## Names
|
|
1121
|
+
|
|
1122
|
+
| Name | Kind | Meaning |
|
|
1123
|
+
| --- | --- | --- |
|
|
1124
|
+
| `FileSystem` | Type on `@cursor/july` | Path verbs. Authors provide this. |
|
|
1125
|
+
| `root` | Field on `defineAgent` | The FileSystem the agent runs on. Omit it and the root is the host disk. |
|
|
1126
|
+
|
|
1127
|
+
No `root()` method and no public `Workspace` type.
|
|
1128
|
+
`local.workspaceDir` stays the harness cwd. `workspaceFiles` stays
|
|
1129
|
+
per-send seed files. Those names are not the path namespace.
|
|
1130
|
+
|
|
1131
|
+
Do not pass `local.root` into `Agent.create`. The published SDK
|
|
1132
|
+
does not have that field.
|
|
1133
|
+
|
|
1134
|
+
---
|
|
1135
|
+
|
|
1136
|
+
## FileSystem
|
|
1137
|
+
|
|
1138
|
+
```ts
|
|
1139
|
+
interface FileSystem {
|
|
1140
|
+
list(prefix?: string): AsyncIterable<DirEntry>;
|
|
1141
|
+
stat(path: string): Promise<FileInfo>;
|
|
1142
|
+
glob(pattern: string, dir?: string): AsyncIterable<DirEntry>;
|
|
1143
|
+
read(path: string): Promise<string | Uint8Array>;
|
|
1144
|
+
grep(query: GrepQuery): AsyncIterable<GrepResult>;
|
|
1145
|
+
write(path: string, contents: string): Promise<void>;
|
|
1146
|
+
delete(path: string): Promise<void>;
|
|
1147
|
+
search(query: SearchQuery): AsyncIterable<SearchResult>;
|
|
1148
|
+
}
|
|
1149
|
+
```
|
|
1150
|
+
|
|
1151
|
+
Every method is required. A tree without an index yields nothing
|
|
1152
|
+
from `search`. Methods do not fall back to the host tree.
|
|
1153
|
+
Diagnostics are not a FileSystem verb.
|
|
1154
|
+
|
|
1155
|
+
Path verbs take a path (and contents for `write`). Bags with two
|
|
1156
|
+
or more independent options (`grep`, `search`) take a
|
|
1157
|
+
named query object.
|
|
1158
|
+
|
|
1159
|
+
`read` returns text as a string, or image bytes as a
|
|
1160
|
+
`Uint8Array` (`jpeg` / `png` / `gif` / `webp`). Native Read
|
|
1161
|
+
applies `offset` / `limit` and numbers lines on text. Images
|
|
1162
|
+
become a base64 image content part, the same shape the Cursor
|
|
1163
|
+
harness sends the model.
|
|
1164
|
+
|
|
1165
|
+
FileSystem methods throw; they do not return a status envelope.
|
|
1166
|
+
`@cursor/july` does not export `FileSystemResult`.
|
|
1167
|
+
|
|
1168
|
+
### Paths
|
|
1169
|
+
|
|
1170
|
+
Authored `root` (`tempFs`, `unionFs`, `overlayFs`, `hostFs`, a custom tree) is one posix
|
|
1171
|
+
namespace rooted at `/`. Query paths and yielded paths are
|
|
1172
|
+
absolute (`/src/a.ts`). No trailing slash except `/`. `""`, `"/"`,
|
|
1173
|
+
and an omitted optional scope mean the root. Prefix tests are
|
|
1174
|
+
path-segment: `/agent` matches `/agent/skills`, not
|
|
1175
|
+
`/agent-tools`. `normalizeFsPath` resolves `..`. `/tmp` is
|
|
1176
|
+
reserved for turn-local scratch. See `/tmp` scratch.
|
|
1177
|
+
|
|
1178
|
+
Host-default `localFileSystem` follows Cursor SDK natives:
|
|
1179
|
+
relative paths resolve against the harness cwd; absolute paths
|
|
1180
|
+
are used as-is. Yielded paths are host paths, not rewritten to
|
|
1181
|
+
`/`. `search` is empty (no host index).
|
|
1182
|
+
|
|
1183
|
+
### Iterators
|
|
1184
|
+
|
|
1185
|
+
Async iterators are already sorted. `unionFs` k-way merges them
|
|
1186
|
+
and does not re-sort a source.
|
|
1187
|
+
|
|
1188
|
+
- `list` / `glob`: lexicographic by `path`. Paths are unique.
|
|
1189
|
+
- `grep`: by `path`, then `lineNumber` ascending. Keep every hit.
|
|
1190
|
+
- `search`: by `score` descending, then `path` ascending.
|
|
1191
|
+
|
|
1192
|
+
A file is not under itself, so listing a file path is empty.
|
|
1193
|
+
Empty `list` is not "missing"; `stat` answers that.
|
|
1194
|
+
|
|
1195
|
+
`glob(pattern, dir?)` matches relative to `dir`, not
|
|
1196
|
+
basename-anywhere (`*.ts` under `/src` is `/src/a.ts`, not
|
|
1197
|
+
`/src/nested/c.ts`).
|
|
1198
|
+
|
|
1199
|
+
`grep` has no `output_mode` or `offset`. A slash-free `glob`
|
|
1200
|
+
(`*.ts`) matches the basename at any depth under `path`.
|
|
1201
|
+
`grep` / `search` take optional `maxResults` as predicate
|
|
1202
|
+
pushdown; implementations should stop after that many hits.
|
|
1203
|
+
Composers push the same cap to children and apply it again
|
|
1204
|
+
after the merge.
|
|
1205
|
+
|
|
1206
|
+
Native-tool pagination (`head_limit`, `offset`, `output_mode`,
|
|
1207
|
+
`numResults`) stays on synthesized tools. Native `LS` is built
|
|
1208
|
+
from `list` + `stat`; there is no `ls` method.
|
|
1209
|
+
|
|
1210
|
+
### Errors
|
|
1211
|
+
|
|
1212
|
+
FileSystem methods throw `PathError`. `path` is the absolute
|
|
1213
|
+
posix path the error is about. Messages stay these contract
|
|
1214
|
+
strings so synthesized tools can show them as-is.
|
|
1215
|
+
|
|
1216
|
+
- `list` / `stat` / `glob` must not throw for a missing path.
|
|
1217
|
+
Missing is an empty iterator or `{ kind: "missing" }`.
|
|
1218
|
+
- `read` / `delete` missing file: `FileNotFoundError`
|
|
1219
|
+
(`not found: ${path}`).
|
|
1220
|
+
- `write` has no `not found`. I/O uses the OS message or
|
|
1221
|
+
`WriteFailedError` (`write failed: ${path}`). A read-only
|
|
1222
|
+
mount uses `ReadOnlyMountError` (`read-only mount: ${path}`).
|
|
1223
|
+
- Synthesized StrReplace is `read` + exact replace + `write`.
|
|
1224
|
+
Uniqueness failures throw `EditError` (`oldText is empty`,
|
|
1225
|
+
`oldText and newText are exactly the same`, `The string to
|
|
1226
|
+
replace was not found in the file`, and `The string to replace
|
|
1227
|
+
was found multiple times in the file. Use replace_all to replace
|
|
1228
|
+
all occurrences, or include more context to only edit one
|
|
1229
|
+
occurrence.`). Write-back failures are `WriteFailedError`.
|
|
1230
|
+
- `grep` throws `InvalidGrepPatternError`
|
|
1231
|
+
(`invalid grep pattern: ${pattern}`). A missing host search
|
|
1232
|
+
root throws. A missing virtual path yields nothing.
|
|
1233
|
+
- `search` without an index is empty success.
|
|
1234
|
+
- `unionFs` with no mount throws `NoMountError`
|
|
1235
|
+
(`no mount for path: ${path}`) on `read` / `write` /
|
|
1236
|
+
`delete`. Walk verbs stay empty or missing.
|
|
1237
|
+
- `unionFs` catches `PathError` from a child and rethrows
|
|
1238
|
+
`error.withPath(mountPrefix + childPath)`. Untyped `Error` still
|
|
1239
|
+
gets a best-effort message rewrite.
|
|
1240
|
+
|
|
1241
|
+
Invoke wraps FileSystem throws into the executor success / error
|
|
1242
|
+
envelope.
|
|
1243
|
+
|
|
1244
|
+
### Write and StrReplace
|
|
1245
|
+
|
|
1246
|
+
`write(path, contents)` creates or overwrites a file. Success is
|
|
1247
|
+
empty. Native Write maps `fileText` onto `contents` and prints
|
|
1248
|
+
`Wrote contents to ${path}`.
|
|
1249
|
+
|
|
1250
|
+
StrReplace is not a FileSystem verb. The synthesized tool reads
|
|
1251
|
+
the file, applies an exact non-overlapping replace, and writes
|
|
1252
|
+
the result. It fails when `oldText` is empty, equals `newText`,
|
|
1253
|
+
is missing, or occurs more than once without `replaceAll`.
|
|
1254
|
+
Success is `{ occurrencesModified }`. Splice is literal; do not
|
|
1255
|
+
use `String.prototype.replace`. Native aliases (`old_string`,
|
|
1256
|
+
`new_string`, `replace_all`) map onto those fields at invoke
|
|
1257
|
+
time.
|
|
1258
|
+
|
|
1259
|
+
---
|
|
1260
|
+
|
|
1261
|
+
## Helpers
|
|
1262
|
+
|
|
1263
|
+
| Helper | Role |
|
|
1264
|
+
| --- | --- |
|
|
1265
|
+
| `emptyFs()` | No files. Overlay leaf or missing catalog. Reads miss; writes are read-only. |
|
|
1266
|
+
| `tempFs(files)` | In-memory snapshot. Tests and fixtures. |
|
|
1267
|
+
| `unionFs({ "/repo": a, "/plans": b })` | Longest-prefix compose, path-segment match. Children are FileSystems rooted at `/`; `unionFs` strips the mount prefix on the way in and re-prefixes yields. List and glob use `unique` so an earlier mount shadows a later one. Grep and search keep every hit. Grep and search at `/` fan out to every child. |
|
|
1268
|
+
| `overlayFs([upper, lower])` | Same-root overlay. Earlier layers win. Read-only. A downed layer costs its own files, not the overlay — `stat` / `grep` / `search` only fail when no layer served. |
|
|
1269
|
+
| `hostFs(files, scope)` | `HostFilesApi` as a FileSystem rooted at `/`. Mount with `unionFs({ "/host": hostFs(files, scope) })`. `search` is empty (no index). Write without a cached etag is unconditional; after a successful read or write, write is CAS on that etag. |
|
|
1270
|
+
|
|
1271
|
+
`localFileSystem({ cwd })` is the host-default handle. It is not
|
|
1272
|
+
exported from `@cursor/july`. Name helpers and `mergeSorted`
|
|
1273
|
+
stay private. `emptyFs`, `tempFs`, `unionFs`, `overlayFs`, `hostFs`, and
|
|
1274
|
+
the `PathError` classes (`FileNotFoundError`,
|
|
1275
|
+
`ReadOnlyMountError`, `NoMountError`, `InvalidGrepPatternError`,
|
|
1276
|
+
`WriteFailedError`, `EditError`,
|
|
1277
|
+
`DeleteNotSupportedError`) are the public helpers.
|
|
1278
|
+
|
|
1279
|
+
---
|
|
1280
|
+
|
|
1281
|
+
## Tool synthesis
|
|
1282
|
+
|
|
1283
|
+
Local turns synthesize these natives from the bound FileSystem:
|
|
1284
|
+
`Read`, `LS`, `Grep`, `Glob`, `Write`, `StrReplace`, `Delete`,
|
|
1285
|
+
`SemanticSearch`. `list` + `stat` synthesize `LS`. `search`
|
|
1286
|
+
synthesizes `SemanticSearch`. `StrReplace` is `read` + exact
|
|
1287
|
+
replace + `write`. Other execute bodies call the matching
|
|
1288
|
+
FileSystem method.
|
|
1289
|
+
|
|
1290
|
+
Authored `tools` can filter that set. `tools: ["read", "shell"]`
|
|
1291
|
+
on a host-default agent synthesizes `Read` only.
|
|
1292
|
+
`tools: ["edit"]` synthesizes `Write` and `StrReplace`.
|
|
1293
|
+
`tools: ["semSearch"]` synthesizes `SemanticSearch`.
|
|
1294
|
+
`tools: []` synthesizes nothing.
|
|
1295
|
+
|
|
1296
|
+
Host-default does not synthesize `SemanticSearch`. Native
|
|
1297
|
+
`semSearch` stays on so the host index can run;
|
|
1298
|
+
`localFileSystem.search` is empty. Authored `root` synthesizes
|
|
1299
|
+
`SemanticSearch` from `FileSystem.search` and does not advertise
|
|
1300
|
+
native `semSearch`. `search` is not an allowlist alias, so an
|
|
1301
|
+
authored `search` tool is not treated as SemanticSearch.
|
|
1302
|
+
`ReadLints` is not a FileSystem verb. Authored
|
|
1303
|
+
`tools: ["readLints"]` fails closed so the host language service
|
|
1304
|
+
cannot run.
|
|
1305
|
+
|
|
1306
|
+
Do not also ship `agent/tools/Read.ts` (and the other synthesized
|
|
1307
|
+
names). Discovery fails closed on that clash for host-default and
|
|
1308
|
+
authored `root`.
|
|
1309
|
+
|
|
1310
|
+
A factory root re-resolves the handle before a turn. The session
|
|
1311
|
+
cache is the handle, not a tree snapshot. Unscoped `callTool`
|
|
1312
|
+
uses the invocation id and does not cache, so factories cannot
|
|
1313
|
+
share one tree across callers. A static `root` is the authored
|
|
1314
|
+
object on every session — Write / StrReplace / Delete /
|
|
1315
|
+
`workspaceFiles` are shared. Return a new handle from
|
|
1316
|
+
`(ctx) => …` when a session should have its own tree. A factory
|
|
1317
|
+
that returns the same object still shares.
|
|
1318
|
+
|
|
1319
|
+
Per-send `workspaceFiles` write through the FileSystem.
|
|
1320
|
+
`memory/` is reserved (same as the host-default workspace
|
|
1321
|
+
symlink into durable agent memory) and is refused after
|
|
1322
|
+
normalize, including `./memory/x` and `foo/../memory/x`.
|
|
1323
|
+
Host-default `list` / `glob` / `grep` do not follow directory
|
|
1324
|
+
symlinks, including `memory/` — same as native LS/Glob/Grep.
|
|
1325
|
+
Exact-path `read` / `stat` still follow.
|
|
1326
|
+
|
|
1327
|
+
Authored `root` skips session-directory materialize, git init,
|
|
1328
|
+
and host-cwd checks. First turns prepend `buildAgentsMdContent`
|
|
1329
|
+
and print `Workspace Path: /`. Host-default agents keep today's
|
|
1330
|
+
materialize path.
|
|
1331
|
+
|
|
1332
|
+
---
|
|
1333
|
+
|
|
1334
|
+
## Allowlist
|
|
1335
|
+
|
|
1336
|
+
| `root` | `tools` | Model-facing harness |
|
|
1337
|
+
| --- | --- | --- |
|
|
1338
|
+
| omitted | omitted | The seven host-disk file tools (no synthesized `SemanticSearch`). Host shell / webSearch / sandbox / native `semSearch` stay. Host file natives are hidden with `disallowedTools: ["read","ls","grep","glob","edit","delete"]`. |
|
|
1339
|
+
| omitted | `["read", "shell"]` | Synthesized `Read` + SDK `shell` + `mcp`. |
|
|
1340
|
+
| omitted | `[]` | No synthesized file tools. |
|
|
1341
|
+
| set | omitted | All eight synthesized file tools (including `SemanticSearch`) + webSearch + webFetch + updateTodos + readTodos + `mcp`. Bind `/tmp` scratch. Not the host-default full catalog (no shell / sandbox / task / native semSearch). |
|
|
1342
|
+
| set | `["updateTodos"]` | All eight synthesized file tools + `updateTodos` + `mcp`. |
|
|
1343
|
+
| set | `["semSearch"]` | Synthesized `SemanticSearch` + `mcp`. Native host index stays off. |
|
|
1344
|
+
| set | `[]` | No synthesized file tools. Legal and empty. |
|
|
1345
|
+
| set | `["shell"]` / `["task"]` / `["readLints"]` | Fail closed. |
|
|
1346
|
+
| set | `["webSearch"]` / `["webFetch"]` | All eight synthesized file tools + the listed web tool + `mcp`. Bind `/tmp` scratch. |
|
|
1347
|
+
|
|
1348
|
+
`mcp` is granted when any tools ride that path. File-family
|
|
1349
|
+
allowlist names are omitted from the SDK allowlist; the
|
|
1350
|
+
synthesized tools replace them.
|
|
1351
|
+
|
|
1352
|
+
`local.sandbox` is Cursor's process sandbox around child
|
|
1353
|
+
processes on the host-default path. It is not a FileSystem.
|
|
1354
|
+
|
|
1355
|
+
---
|
|
1356
|
+
|
|
1357
|
+
## Fail closed
|
|
1358
|
+
|
|
1359
|
+
| Combination | Result |
|
|
1360
|
+
| --- | --- |
|
|
1361
|
+
| `root` + `local.cwd` / `workspaceDir` / `sandbox` | Fail closed |
|
|
1362
|
+
| `root` + `runtime: "cloud"` or `"grokbot"` | Fail closed |
|
|
1363
|
+
| `root` + `tools` containing `"shell"` | Fail closed |
|
|
1364
|
+
| `root` + `tools` containing `"task"` | Fail closed. A child keeps the host toolset. Sharing `root` needs a Cursor SDK inherit, not an overridden Task. |
|
|
1365
|
+
| `root` + `tools` containing `"readLints"` | Fail closed. Diagnostics are not a FileSystem verb. |
|
|
1366
|
+
| `agent/tools/Read.ts` (etc.) | Fail closed on host-default and authored `root`. |
|
|
1367
|
+
|
|
1368
|
+
---
|
|
1369
|
+
|
|
1370
|
+
## `/tmp` scratch for webSearch and webFetch
|
|
1371
|
+
|
|
1372
|
+
Native `WebSearch` and `WebFetch` stay native. They still scratch
|
|
1373
|
+
large output to `{harnessCwd}/agent-tools/{uuid}.txt` on the host
|
|
1374
|
+
disk. Under `root`, the turn composes
|
|
1375
|
+
`unionFs({ "/": authored, "/tmp": tempFs() })`, copies only the file
|
|
1376
|
+
the native tool wrote this turn, and drops that composed root at
|
|
1377
|
+
end of turn.
|
|
1378
|
+
|
|
1379
|
+
### Why `/tmp`
|
|
1380
|
+
|
|
1381
|
+
The FileSystem is the model's disk. Host `{cwd}/agent-tools/` is a
|
|
1382
|
+
harness path. Under `root`, the model never sees it.
|
|
1383
|
+
|
|
1384
|
+
`/tmp` is the reserved scratch prefix. An authored `/tmp` is
|
|
1385
|
+
shadowed. Do not put durable files there. `{cwd}/agent-tools/` and
|
|
1386
|
+
`/tmp` are different namespaces.
|
|
1387
|
+
|
|
1388
|
+
`/agent-tools` is not reserved. Prefix `/agent` does not cover
|
|
1389
|
+
`/agent-tools`. Those notes are path-prefix tests, not a mount.
|
|
1390
|
+
|
|
1391
|
+
Process or VM death also loses `/tmp`. Same as POSIX `/tmp`. That
|
|
1392
|
+
is acceptable. Do not persist scratch across turns or process
|
|
1393
|
+
restarts.
|
|
1394
|
+
|
|
1395
|
+
### Overlay
|
|
1396
|
+
|
|
1397
|
+
| Piece | Rule |
|
|
1398
|
+
| --- | --- |
|
|
1399
|
+
| Native tool | Still searches and fetches. |
|
|
1400
|
+
| Bind | Per turn: `unionFs({ "/": authored, "/tmp": tempFs() })`. `/tmp` is a mount, not a FileSystem type. |
|
|
1401
|
+
| Session cache | Authored handle may stay cached. The composed root does not. |
|
|
1402
|
+
| Drop | End of turn. Next turn gets a new empty `/tmp`. |
|
|
1403
|
+
| Small results | Stay inline. No disk, no rewrite. |
|
|
1404
|
+
| Copy | Only a file the native tool wrote this turn under `{cwd}/agent-tools/`. |
|
|
1405
|
+
| Dest | `/tmp/{uuid}.txt`. Same uuid as the host file. |
|
|
1406
|
+
| Host file | Delete after copy. |
|
|
1407
|
+
| Other paths | Ignore. Do not copy from the result text at large. |
|
|
1408
|
+
|
|
1409
|
+
Do not put that composed root on the session handle. A later turn
|
|
1410
|
+
must not read another turn's `/tmp`.
|
|
1411
|
+
|
|
1412
|
+
### Result rewrite
|
|
1413
|
+
|
|
1414
|
+
Keep the native tool descriptions. They do not mention spill.
|
|
1415
|
+
|
|
1416
|
+
This package does not change the Cursor SDK. Native WebSearch /
|
|
1417
|
+
WebFetch results land in the AgentService conversation inside
|
|
1418
|
+
the local executor. That transcript is not rewritten here.
|
|
1419
|
+
|
|
1420
|
+
What this package rewrites:
|
|
1421
|
+
|
|
1422
|
+
| Surface | Overlay (`root` set) |
|
|
1423
|
+
| --- | --- |
|
|
1424
|
+
| `webSearch` / `webFetch` result | Host path and follow-up, in strings or structured fields (`output_location`). Other tools are untouched. |
|
|
1425
|
+
| Synthesized Read / Grep input | `{cwd}/agent-tools/{uuid}.txt` → `/tmp/{uuid}.txt` |
|
|
1426
|
+
|
|
1427
|
+
| Field | Host path (`root` unset) | Overlay (`root` set) |
|
|
1428
|
+
| --- | --- | --- |
|
|
1429
|
+
| Path | `{cwd}/agent-tools/{uuid}.txt` | `/tmp/{uuid}.txt` |
|
|
1430
|
+
| Follow-up | Native text (today: shell / grep / `read_file`) | Read / Grep |
|
|
1431
|
+
|
|
1432
|
+
Two modes, two paths. Do not invent a third.
|
|
1433
|
+
|
|
1434
|
+
WebFetch proto has `output_location`. WebSearch only embeds the
|
|
1435
|
+
path in the chunk string. Rewrite whichever form the native tool
|
|
1436
|
+
used.
|
|
1437
|
+
|
|
1438
|
+
The model follow path is Read / Grep on `/tmp/{uuid}.txt`,
|
|
1439
|
+
including when the model still holds the host path.
|
|
1440
|
+
|
|
1441
|
+
### Out of scope here
|
|
1442
|
+
|
|
1443
|
+
MCP `spillLargeMcpTextOutput` uses the same host `agent-tools`
|
|
1444
|
+
directory. The same overlay can cover it later. This section is
|
|
1445
|
+
webSearch and webFetch only.
|
|
1446
|
+
|
|
1447
|
+
---
|
|
1448
|
+
|
|
1449
|
+
## Live `root`
|
|
1450
|
+
|
|
1451
|
+
When the tree depends on the conversation, pass a factory. The
|
|
1452
|
+
factory returns a handle. Agent SDK may reuse the object for the
|
|
1453
|
+
session. Reuse is not a snapshot of mount contents.
|
|
1454
|
+
|
|
1455
|
+
```ts
|
|
1456
|
+
export default defineAgent({
|
|
1457
|
+
name: "notes",
|
|
1458
|
+
root: (ctx) => notesForSession(ctx.sessionId),
|
|
1459
|
+
});
|
|
1460
|
+
```
|
|
1461
|
+
|
|
1462
|
+
```ts
|
|
1463
|
+
interface RootContext {
|
|
1464
|
+
sessionId: string;
|
|
1465
|
+
agentName?: string;
|
|
1466
|
+
continuationKey?: string;
|
|
1467
|
+
host?: { files: HostFilesApi; reminders?: ReminderHostApi };
|
|
1468
|
+
}
|
|
1469
|
+
```
|
|
1470
|
+
|
|
1471
|
+
---
|
|
1472
|
+
|
|
1092
1473
|
Source: /docs/design/runtime-abstraction.md
|
|
1093
1474
|
|
|
1094
1475
|
# Replacing `runtime: "local" | "cloud"` with a code interface
|
|
@@ -3966,6 +4347,11 @@ behavior. Reactions still default on; set `reactions: false` when the
|
|
|
3966
4347
|
eyes emoji is noise. Descriptions are optional; defaults derive from
|
|
3967
4348
|
`botName` or the check `context`.
|
|
3968
4349
|
|
|
4350
|
+
To match dashboard automations, set `detailsUrl(sessionId)`,
|
|
4351
|
+
`summaryLinkText: "View agent"`, and `outputTitle: "context"` so the
|
|
4352
|
+
check title is the check name, the summary includes `[View agent](…)`,
|
|
4353
|
+
and Details opens the session.
|
|
4354
|
+
|
|
3969
4355
|
A comment-only first wake has no head SHA, so the check waits for a
|
|
3970
4356
|
PR or CI event. The banner still posts. A later turn on the same SHA
|
|
3971
4357
|
creates a new check run; GitHub cannot reopen a completed run.
|
|
@@ -3986,6 +4372,99 @@ key. Handlers you author replace the matching defaults (same as
|
|
|
3986
4372
|
|
|
3987
4373
|
---
|
|
3988
4374
|
|
|
4375
|
+
Source: /docs/guides/grokbot-agents.md
|
|
4376
|
+
|
|
4377
|
+
# Cursor Grok Bot agents
|
|
4378
|
+
|
|
4379
|
+
The `cursor-grokbot-agents` extension lets an agent send a message to
|
|
4380
|
+
one of your Grok Bot agents and read the reply. The Grok Bot keeps its
|
|
4381
|
+
own conversation, memory, and tools. Your agent stays where it is and
|
|
4382
|
+
consults that bot the way you would in the Grok Bot app.
|
|
4383
|
+
|
|
4384
|
+
This is different from moving this agent's turns onto a hosted Grok Bot.
|
|
4385
|
+
The extension keeps the agent where it is and lets it talk to *other*
|
|
4386
|
+
Grok Bot agents.
|
|
4387
|
+
|
|
4388
|
+
## Mount it
|
|
4389
|
+
|
|
4390
|
+
The extension ships with `@cursor/july`. Mount it with one file.
|
|
4391
|
+
|
|
4392
|
+
```ts
|
|
4393
|
+
// agent/extensions/grokbot.ts
|
|
4394
|
+
import cursorGrokBotAgents from "@cursor/july/extensions/cursor-grokbot-agents";
|
|
4395
|
+
|
|
4396
|
+
export default cursorGrokBotAgents({
|
|
4397
|
+
agents: [
|
|
4398
|
+
{ name: "Plan Keeper", description: "Keeps or moves outdoor plans." },
|
|
4399
|
+
{ name: "Chief of Staff", description: "Routes work and tracks priorities." },
|
|
4400
|
+
],
|
|
4401
|
+
});
|
|
4402
|
+
```
|
|
4403
|
+
|
|
4404
|
+
`agents` is the allowlist. List every Grok Bot the model may talk to;
|
|
4405
|
+
a name outside the list is refused. Calls run under the host's
|
|
4406
|
+
signed-in account (`agent-sdk login` or `CURSOR_API_KEY`). Keep
|
|
4407
|
+
approval on when you can't.
|
|
4408
|
+
|
|
4409
|
+
Start from the [Grok Bot agents template](/docs/templates/grokbot-agents.md)
|
|
4410
|
+
when you want a project that already mounts this.
|
|
4411
|
+
|
|
4412
|
+
## What the agent can do
|
|
4413
|
+
|
|
4414
|
+
With the extension mounted, the agent can consult a Grok Bot and stay
|
|
4415
|
+
in its own conversation:
|
|
4416
|
+
|
|
4417
|
+
- **Ask.** Send a self-contained message to a Grok Bot by the name
|
|
4418
|
+
shown in the Grok Bot app. The message lands in your conversation
|
|
4419
|
+
with that bot. The tool waits for the bot's reply.
|
|
4420
|
+
- **Keep waiting.** A long turn returns `status: "running"`. Call check
|
|
4421
|
+
with the same name to read what arrived since the last look.
|
|
4422
|
+
- **Stop a turn.** Interrupt the bot's current work. The conversation
|
|
4423
|
+
stays; a later ask continues it.
|
|
4424
|
+
- **See who you can talk to.** List the configured bots and the ones
|
|
4425
|
+
this caller has already asked. Add a name to `agents` when you want
|
|
4426
|
+
the model to reach another bot.
|
|
4427
|
+
|
|
4428
|
+
A skill teaches the model when to bring a Grok Bot in, how to write a
|
|
4429
|
+
message the bot can act on alone, and how to wait or interrupt. The
|
|
4430
|
+
reply is what the Grok Bot sent to the person. If a turn finishes with
|
|
4431
|
+
no reply, the bot sent nothing; ask again with a clearer request, or
|
|
4432
|
+
open the bot in the Grok Bot app.
|
|
4433
|
+
|
|
4434
|
+
The tools reach Grok Bot agents on the signed-in account. A bot another
|
|
4435
|
+
user owns is out of reach. That separation is only as fine as your
|
|
4436
|
+
host's auth; a shared bearer token or `--allow-anonymous` makes every
|
|
4437
|
+
caller one principal, so use
|
|
4438
|
+
[authored auth](/docs/reference/channels.md#auth-policies) when callers
|
|
4439
|
+
need their own.
|
|
4440
|
+
|
|
4441
|
+
## Configure it
|
|
4442
|
+
|
|
4443
|
+
| Option | What it controls |
|
|
4444
|
+
| --- | --- |
|
|
4445
|
+
| `agents` | The Grok Bot agents the model may talk to, by the name shown in the app. A lone entry is the default when a call names none. Omit `agents` to allow any name; an unknown name creates an empty Grok Bot on the account. |
|
|
4446
|
+
| `needsApproval` | Park asks for a [human decision](/docs/guides/human-in-the-loop.md). Defaults to `true` when no `agents` are configured, `false` otherwise. |
|
|
4447
|
+
| `apiKey` | A Cursor API key to call with instead of the host's own. |
|
|
4448
|
+
|
|
4449
|
+
## Adjust it
|
|
4450
|
+
|
|
4451
|
+
To take a capability away, such as interrupting a turn, mount as a
|
|
4452
|
+
directory and disable that tool; see
|
|
4453
|
+
[overlays](/docs/reference/extensions.md#adjust-a-mounted-extension).
|
|
4454
|
+
|
|
4455
|
+
## What's next
|
|
4456
|
+
|
|
4457
|
+
Continue with these pages:
|
|
4458
|
+
|
|
4459
|
+
- [Grok Bot agents template](/docs/templates/grokbot-agents.md): scaffold
|
|
4460
|
+
an agent that already mounts this
|
|
4461
|
+
- [Extensions](/docs/reference/extensions.md): how mounts, namespaces, and
|
|
4462
|
+
overrides work
|
|
4463
|
+
- [Human-in-the-loop approvals](/docs/guides/human-in-the-loop.md): where parked
|
|
4464
|
+
asks get approved
|
|
4465
|
+
|
|
4466
|
+
---
|
|
4467
|
+
|
|
3989
4468
|
Source: /docs/guides/human-in-the-loop.md
|
|
3990
4469
|
|
|
3991
4470
|
# Human-in-the-loop approvals
|
|
@@ -5399,10 +5878,11 @@ npx @cursor/july docs
|
|
|
5399
5878
|
| Building a new agent with Cursor | [Scaffold an agent with Cursor](/docs/scaffolding-agents.md) |
|
|
5400
5879
|
| Turning a Cursor Automation into a project | [Convert a Cursor Automation](/docs/guides/convert-automation.md) |
|
|
5401
5880
|
| Wiring an agent to Slack | [Slack guide](/docs/guides/slack.md) |
|
|
5402
|
-
| Starting from a packaged template | [Demo](/docs/templates/demo.md), [Code wiki](/docs/templates/code-wiki.md), [Living AGENTS.md](/docs/templates/agents-md.md), [Security reviewer](/docs/templates/security-reviewer.md), [Security help](/docs/templates/security-help.md), [Triage](/docs/templates/triage.md), or [Agentic Owners](/docs/templates/agentic-owners.md) |
|
|
5881
|
+
| Starting from a packaged template | [Demo](/docs/templates/demo.md), [Grok Bot agents](/docs/templates/grokbot-agents.md), [Code wiki](/docs/templates/code-wiki.md), [Living AGENTS.md](/docs/templates/agents-md.md), [Security reviewer](/docs/templates/security-reviewer.md), [Security help](/docs/templates/security-help.md), [Triage](/docs/templates/triage.md), or [Agentic Owners](/docs/templates/agentic-owners.md) |
|
|
5403
5882
|
| Wiring an agent to GitHub webhooks | [GitHub guide](/docs/guides/github.md) |
|
|
5404
5883
|
| Driving PRs from a cloud VM | [PR autofixer template](/docs/templates/pr-autofixer.md) |
|
|
5405
5884
|
| Handing coding work to Cursor cloud agents | [Cursor cloud agents](/docs/guides/cloud-agents.md) |
|
|
5885
|
+
| Talking to your Grok Bot agents | [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md) |
|
|
5406
5886
|
| Driving an agent from Linear (or another tracker) | [Webhooks guide: Linear example](/docs/guides/webhooks.md#example-linear-as-the-control-plane) |
|
|
5407
5887
|
| Making an existing agent measurably better | [Evals](/docs/evals.md), then [Hillclimbing](/docs/hillclimbing.md) |
|
|
5408
5888
|
| Comparing variants on live traffic | [Live A/B metrics](/docs/ab.md) |
|
|
@@ -5426,6 +5906,8 @@ npx @cursor/july docs
|
|
|
5426
5906
|
|
|
5427
5907
|
- [Record a walkthrough from a collected PR](/docs/templates/demo.md): host
|
|
5428
5908
|
collects the PR, the model records, then comments.
|
|
5909
|
+
- [Talk to your Grok Bot agents](/docs/templates/grokbot-agents.md): name
|
|
5910
|
+
the bots, then consult them from this agent's own conversation.
|
|
5429
5911
|
- [Keep a code wiki current after merge](/docs/templates/code-wiki.md):
|
|
5430
5912
|
update in-repo `wiki/` pages when a pull request merges.
|
|
5431
5913
|
- [Keep AGENTS.md current from last week's work](/docs/templates/agents-md.md):
|
|
@@ -5469,6 +5951,8 @@ npx @cursor/july docs
|
|
|
5469
5951
|
server; agents can delegate to each other.
|
|
5470
5952
|
- [Cursor cloud agents](/docs/guides/cloud-agents.md): let the agent launch
|
|
5471
5953
|
and steer cloud agents through the `cursor-cloud-agents` extension.
|
|
5954
|
+
- [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): let the agent
|
|
5955
|
+
talk to Grok Bot agents through the `cursor-grokbot-agents` extension.
|
|
5472
5956
|
- [OpenTelemetry](/docs/guides/opentelemetry.md): push session, turn, and
|
|
5473
5957
|
tool traces to an OTLP collector you run.
|
|
5474
5958
|
|
|
@@ -6496,6 +6980,26 @@ rather than dropping events. An empty `deploySourceUris` list mounts
|
|
|
6496
6980
|
the channel but starts no pull, so an env-configured agent stays inert
|
|
6497
6981
|
until its deploy sources are set.
|
|
6498
6982
|
|
|
6983
|
+
**Change Monitors** (`@cursor/july/channels/change-monitors`): Change
|
|
6984
|
+
Monitor Checkpoint events. The channel publishes Factory
|
|
6985
|
+
`checkpoint.created` for every Checkpoint create. The agent filters the
|
|
6986
|
+
result (for example to the `issues` arm). The payload contains the
|
|
6987
|
+
full Checkpoint resource. This channel is scoped to Change Monitors,
|
|
6988
|
+
not generic Factory Checkpoints. There is no repository filter or
|
|
6989
|
+
resource filter. Author `agent/channels/change-monitors.ts` with
|
|
6990
|
+
`changeMonitorsChannel()`. It uses the host credential. The v1 omitted
|
|
6991
|
+
continuation is `none/v1`. A v2 agent defaults to
|
|
6992
|
+
`change_monitors.checkpoint/v2`, which keys the session as
|
|
6993
|
+
`cont:change_monitors:{checkpointName}`.
|
|
6994
|
+
|
|
6995
|
+
**Issues** (`@cursor/july/channels/issues`): Factory issue events.
|
|
6996
|
+
The channel publishes `issue.created` for every Issue create. The
|
|
6997
|
+
agent filters if it needs a subset. The payload contains the full
|
|
6998
|
+
Issue resource. There is no repository filter or resource filter.
|
|
6999
|
+
Author `agent/channels/issues.ts` with `issuesChannel()`. It uses the
|
|
7000
|
+
host credential. The v1 omitted continuation is `none/v1`. A v2 agent
|
|
7001
|
+
defaults to `issues.issue/v2`, which keys the session by issue name.
|
|
7002
|
+
|
|
6499
7003
|
For other platforms like Discord or Teams, use the authored
|
|
6500
7004
|
`defineChannel` webhook form.
|
|
6501
7005
|
|
|
@@ -6932,6 +7436,7 @@ non-zero when the reconstructed trajectory failed.
|
|
|
6932
7436
|
```bash
|
|
6933
7437
|
agent-sdk init ./my-agent # scaffold package.json, tsconfig.json, agent/ + a demo tool
|
|
6934
7438
|
agent-sdk init ./my-demo --template demo # record a PR walkthrough
|
|
7439
|
+
agent-sdk init ./grokbot --template grokbot-agents # talk to Grok Bot agents
|
|
6935
7440
|
agent-sdk init ./code-wiki --template code-wiki # keep wiki pages current after merge
|
|
6936
7441
|
agent-sdk init ./agents-md --template agents-md # keep AGENTS.md current from last week's PRs and Slack
|
|
6937
7442
|
agent-sdk init ./my-reviewer --template security-reviewer # review PRs for security bugs
|
|
@@ -6953,7 +7458,7 @@ agent-sdk init # no directory: print the setup guide
|
|
|
6953
7458
|
Templates may ship `init.json`. On a TTY, `init` asks those questions
|
|
6954
7459
|
before writing files. `code-wiki`, `pr-autofixer`, `security-help`, and
|
|
6955
7460
|
`agents-md` ask for GitHub repos. `agents-md` also asks for Slack
|
|
6956
|
-
channels. Repeat
|
|
7461
|
+
channels. `grokbot-agents` asks for Grok Bot names. Repeat
|
|
6957
7462
|
`--var id=value` to answer without a prompt.
|
|
6958
7463
|
`--json` and non-TTY hosts skip the interview unless `--var` is set.
|
|
6959
7464
|
|
|
@@ -8058,6 +8563,8 @@ Continue with these pages:
|
|
|
8058
8563
|
|
|
8059
8564
|
- [Cursor cloud agents](/docs/guides/cloud-agents.md): the extension that
|
|
8060
8565
|
lets an agent launch and steer cloud agents
|
|
8566
|
+
- [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): the extension
|
|
8567
|
+
that lets an agent talk to Grok Bot agents
|
|
8061
8568
|
- [Tools](/docs/reference/tools.md): the tool contract extensions contribute to
|
|
8062
8569
|
- [Skills](/docs/reference/skills.md): the skill forms an extension can carry
|
|
8063
8570
|
- [Project layout](/docs/reference/project-layout.md): where `agent/extensions/` sits
|
|
@@ -11543,6 +12050,59 @@ Playground and `/queue/pr` need the alias token. GitHub label and
|
|
|
11543
12050
|
|
|
11544
12051
|
---
|
|
11545
12052
|
|
|
12053
|
+
Source: /docs/templates/grokbot-agents.md
|
|
12054
|
+
|
|
12055
|
+
# Talk to your Grok Bot agents
|
|
12056
|
+
|
|
12057
|
+
This agent sends a message to a Grok Bot you already use and reads the
|
|
12058
|
+
reply. The Grok Bot keeps its conversation. This agent stays where it
|
|
12059
|
+
is.
|
|
12060
|
+
|
|
12061
|
+
## Scaffold
|
|
12062
|
+
|
|
12063
|
+
```bash
|
|
12064
|
+
npx @cursor/july init ./grokbot --template grokbot-agents
|
|
12065
|
+
```
|
|
12066
|
+
|
|
12067
|
+
`init` asks for the names shown in the Grok Bot app. Every name is an
|
|
12068
|
+
allowlist entry. Pass `--var agents="Plan Keeper, Chief of Staff"` to
|
|
12069
|
+
skip the prompt.
|
|
12070
|
+
|
|
12071
|
+
The names land in `agent/extensions/grokbot.ts`. A name outside that
|
|
12072
|
+
list is refused.
|
|
12073
|
+
|
|
12074
|
+
## Log in
|
|
12075
|
+
|
|
12076
|
+
Asks run under the signed-in account.
|
|
12077
|
+
|
|
12078
|
+
```bash
|
|
12079
|
+
cd grokbot
|
|
12080
|
+
agent-sdk login
|
|
12081
|
+
agent-sdk dev
|
|
12082
|
+
```
|
|
12083
|
+
|
|
12084
|
+
In the playground, ask it to talk to one of the names you entered.
|
|
12085
|
+
|
|
12086
|
+
## What to edit
|
|
12087
|
+
|
|
12088
|
+
- `agent/extensions/grokbot.ts`: who it may talk to. Add `needsApproval: true` to park each ask.
|
|
12089
|
+
- `agent/instructions.md`: when to consult them
|
|
12090
|
+
|
|
12091
|
+
See [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md) for the
|
|
12092
|
+
extension, and [Human-in-the-loop approvals](/docs/guides/human-in-the-loop.md)
|
|
12093
|
+
for where a parked ask gets approved.
|
|
12094
|
+
|
|
12095
|
+
## Evals
|
|
12096
|
+
|
|
12097
|
+
```bash
|
|
12098
|
+
agent-sdk eval
|
|
12099
|
+
```
|
|
12100
|
+
|
|
12101
|
+
The smoke case asks who it can talk to. It must list the configured
|
|
12102
|
+
bots and not send a message.
|
|
12103
|
+
|
|
12104
|
+
---
|
|
12105
|
+
|
|
11546
12106
|
Source: /docs/templates/pr-autofixer.md
|
|
11547
12107
|
|
|
11548
12108
|
# Fix pull requests on a Cursor cloud VM
|
package/dist/docs/llms.txt
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
- [Building agents with agents](/docs/building-with-agents.md): Use the built-in skills to have a coding agent create, verify, and improve your agent.
|
|
13
13
|
- [How the Agent SDK works](/docs/concepts.md): Understand projects, sessions, event streams, channels, and runtimes in plain language.
|
|
14
14
|
- [Deployment](/docs/deployment.md): Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control.
|
|
15
|
+
- [One FileSystem for every Agent SDK agent](/docs/design/filesystem.md)
|
|
15
16
|
- [Replacing `runtime: "local" | "cloud"` with a code interface](/docs/design/runtime-abstraction.md)
|
|
16
17
|
- [Evals](/docs/evals.md): Define repeatable checks with defineEval, run them with agent-sdk eval, and use them as regression checks.
|
|
17
18
|
- [Hillclimbing](/docs/hillclimbing.md): Improve an agent one measured round at a time, with the hillclimb skill running the loop with you.
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
- [Keep AGENTS.md current from last week's work](/docs/templates/agents-md.md): Scaffold the agent, pick a repo and Slack channels, dispatch the weekly job, and deploy.
|
|
27
28
|
- [Keep a code wiki current after merge](/docs/templates/code-wiki.md): Scaffold the agent, pick repos, replay a merged PR, and deploy.
|
|
28
29
|
- [Record a walkthrough from a collected PR](/docs/templates/demo.md): Scaffold the agent, seed the PR on the host, record a walkthrough, and comment the result.
|
|
30
|
+
- [Talk to your Grok Bot agents](/docs/templates/grokbot-agents.md): Scaffold the agent, name the Grok Bot agents it may reach, and consult them from its own conversation.
|
|
29
31
|
- [Fix pull requests on a Cursor cloud VM](/docs/templates/pr-autofixer.md): Scaffold the agent, point it at your repos, and opt in to auto-fix a PR.
|
|
30
32
|
- [Answer security questions in Slack](/docs/templates/security-help.md): Scaffold the agent, connect Slack, and answer from your skills. Paste a GitHub pull request for a first look.
|
|
31
33
|
- [Review pull requests for exploitable bugs](/docs/templates/security-reviewer.md): Scaffold the agent, pick repos, replay a PR, and deploy.
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
- [Cursor cloud agents](/docs/guides/cloud-agents.md): Let an agent-sdk agent hand coding work to Cursor cloud agents and steer them: mount the extension, pick the repositories it may touch, and decide what needs approval.
|
|
38
40
|
- [Convert a Cursor Automation](/docs/guides/convert-automation.md): Export a dashboard Automation into a local Agent SDK project, then review, validate, and run it.
|
|
39
41
|
- [GitHub](/docs/guides/github.md): Wake your agent from pull requests, CI, and comments by pulling Cursor SCM events, with fixtures and replay for local tests.
|
|
42
|
+
- [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval.
|
|
40
43
|
- [Human-in-the-loop](/docs/guides/human-in-the-loop.md): Gate a tool call on human approval: park it, resolve it from the playground, HTTP, or Slack, and keep the turn alive throughout.
|
|
41
44
|
- [Host MCP OAuth](/docs/guides/mcp-oauth.md): Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments.
|
|
42
45
|
- [OpenTelemetry](/docs/guides/opentelemetry.md): Push session, turn, and tool traces from the serve process to an OTLP collector you run.
|