@cursor/july 0.1.35 → 0.1.36
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/AGENTS.md +5 -9
- package/README.md +5 -9
- package/dist/channels/github/github-channel.d.ts +1 -1
- package/dist/channels/github/github-channel.js +1 -1
- package/dist/channels/github/index.d.ts +1 -1
- package/dist/channels/github/index.js +1 -1
- package/dist/channels/slack/index.d.ts +1 -1
- package/dist/channels/slack/index.js +1 -1
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +2 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +8 -17
- package/dist/docs/assets/{ab.md.DAQoJ-up.js → ab.md.6cLOW7--.js} +4 -13
- package/dist/docs/assets/{ab.md.DAQoJ-up.lean.js → ab.md.6cLOW7--.lean.js} +1 -1
- package/dist/docs/assets/{app.D5Mv1T0U.js → app.DEcxy4oz.js} +1 -1
- package/dist/docs/assets/{building-with-agents.md.CnHqvYDd.js → building-with-agents.md.txrcGU2B.js} +2 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.ByFYcFly.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CMq_BQce.js → VPLocalSearchBox.n1VOZcy3.js} +1 -1
- package/dist/docs/assets/chunks/{theme.C6D9UPLK.js → theme.BaF1MQ9c.js} +2 -2
- package/dist/docs/assets/{concepts.md.DFaQEFkA.js → concepts.md.CqOsxbMU.js} +1 -1
- package/dist/docs/assets/{deployment.md.9MYBuKM1.js → deployment.md.CuK5SNjN.js} +1 -1
- package/dist/docs/assets/{evals.md.BIUoVZ6X.js → evals.md.BQXI3rXy.js} +9 -15
- package/dist/docs/assets/{evals.md.BIUoVZ6X.lean.js → evals.md.BQXI3rXy.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_approval-buddy.md.BhEfleVx.js → example-agents_approval-buddy.md.CIiZ9coo.js} +1 -1
- package/dist/docs/assets/{example-agents_benny.md.2Et1qa8f.js → example-agents_benny.md.l7JTmm8X.js} +1 -1
- package/dist/docs/assets/{example-agents_bugbot.md.ByUexi5i.js → example-agents_bugbot.md.Dp5JqHSQ.js} +2 -2
- package/dist/docs/assets/{example-agents_bugbot.md.ByUexi5i.lean.js → example-agents_bugbot.md.Dp5JqHSQ.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_codebase-wiki.md.B4y-7ZVW.js → example-agents_codebase-wiki.md.D-lteFf0.js} +1 -1
- package/dist/docs/assets/{example-agents_codebase-wiki.md.B4y-7ZVW.lean.js → example-agents_codebase-wiki.md.D-lteFf0.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_codeowners-review.md.D6ay4nvf.js → example-agents_codeowners-review.md.BU2ZXLf-.js} +1 -1
- package/dist/docs/assets/{example-agents_codeowners-review.md.D6ay4nvf.lean.js → example-agents_codeowners-review.md.BU2ZXLf-.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_concierge.md.lL8rhYlj.js → example-agents_concierge.md.DA2al_NK.js} +2 -2
- package/dist/docs/assets/{example-agents_concierge.md.lL8rhYlj.lean.js → example-agents_concierge.md.DA2al_NK.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_fsd.md.DfNKQTHz.js → example-agents_fsd.md.DPz9ezO4.js} +1 -1
- package/dist/docs/assets/{example-agents_knowledge-base.md.CzyZ2DCr.js → example-agents_knowledge-base.md.IneynQSR.js} +1 -1
- package/dist/docs/assets/{example-agents_oncall.md.wFFXXEyW.js → example-agents_oncall.md.ZE0n6ZFN.js} +1 -1
- package/dist/docs/assets/{example-agents_slack-agent.md.DvgvT4nn.js → example-agents_slack-agent.md.06jQXTAI.js} +1 -1
- package/dist/docs/assets/{example-agents_weather-agent.md.BADkPqxQ.js → example-agents_weather-agent.md.CrGZ0SqR.js} +3 -3
- package/dist/docs/assets/{example-agents_weather-agent.md.BADkPqxQ.lean.js → example-agents_weather-agent.md.CrGZ0SqR.lean.js} +1 -1
- package/dist/docs/assets/guides_cloud-runtime.md.V5igN4Sq.js +9 -0
- package/dist/docs/assets/guides_cloud-runtime.md.V5igN4Sq.lean.js +1 -0
- package/dist/docs/assets/{guides_webhooks.md.DiAwSR42.js → guides_webhooks.md.BERuBSJW.js} +1 -1
- package/dist/docs/assets/{hillclimbing.md.D9Y1_bYh.js → hillclimbing.md.yXqdlv2R.js} +1 -1
- package/dist/docs/assets/index.md.CmhptOmN.js +24 -0
- package/dist/docs/assets/{index.md.CZqbBJPB.lean.js → index.md.CmhptOmN.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.TnEXYgYW.js → quickstart.md.C_b6ESpD.js} +7 -4
- package/dist/docs/assets/{quickstart.md.TnEXYgYW.lean.js → quickstart.md.C_b6ESpD.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.kuN6-OxK.js → reference_agent-config.md.CRmkoxd6.js} +6 -4
- package/dist/docs/assets/{reference_agent-config.md.kuN6-OxK.lean.js → reference_agent-config.md.CRmkoxd6.lean.js} +1 -1
- package/dist/docs/assets/reference_artifacts.md.BGG4bZo-.js +19 -0
- package/dist/docs/assets/reference_artifacts.md.BGG4bZo-.lean.js +1 -0
- package/dist/docs/assets/{reference_channels.md.CDhTRfUz.js → reference_channels.md.BIabFUAI.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.CDhTRfUz.lean.js → reference_channels.md.BIabFUAI.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.sD-IUWjg.js → reference_cli.md.Byvrg8eu.js} +15 -9
- package/dist/docs/assets/{reference_cli.md.sD-IUWjg.lean.js → reference_cli.md.Byvrg8eu.lean.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.DyLVfE1O.js → reference_hooks.md.BGDw4VLm.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.DyLVfE1O.lean.js → reference_hooks.md.BGDw4VLm.lean.js} +1 -1
- package/dist/docs/assets/reference_http-api.md.DGrw_wOu.js +11 -0
- package/dist/docs/assets/reference_http-api.md.DGrw_wOu.lean.js +1 -0
- package/dist/docs/assets/{reference_project-layout.md.D8E6ZmHJ.js → reference_project-layout.md._XdeMahr.js} +2 -2
- package/dist/docs/assets/{reference_project-layout.md.D8E6ZmHJ.lean.js → reference_project-layout.md._XdeMahr.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.C_ouF_uf.js → reference_sessions.md.DBVFi2Sx.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.zWAMNfi1.js → reference_subagents.md.DSrGLIuB.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.zWAMNfi1.lean.js → reference_subagents.md.DSrGLIuB.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.BswAQM41.js → reference_tools.md.lSrsTxYJ.js} +4 -4
- package/dist/docs/assets/{reference_tools.md.BswAQM41.lean.js → reference_tools.md.lSrsTxYJ.lean.js} +1 -1
- package/dist/docs/assets/scaffolding-agents.md.mkc3B_ZW.js +1 -0
- package/dist/docs/assets/{scaffolding-agents.md.Bsr9Pwzu.lean.js → scaffolding-agents.md.mkc3B_ZW.lean.js} +1 -1
- package/dist/docs/assets/{storage.md.xZoiGM58.js → storage.md.mQDtIULc.js} +3 -3
- package/dist/docs/assets/{storage.md.xZoiGM58.lean.js → storage.md.mQDtIULc.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +6 -6
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +6 -6
- package/dist/docs/evals.html +13 -19
- package/dist/docs/example-agents/approval-buddy.html +5 -5
- package/dist/docs/example-agents/benny.html +5 -5
- package/dist/docs/example-agents/bugbot.html +5 -5
- package/dist/docs/example-agents/codebase-wiki.html +5 -5
- package/dist/docs/example-agents/codeowners-review.html +5 -5
- package/dist/docs/example-agents/concierge.html +6 -6
- package/dist/docs/example-agents/fsd.html +5 -5
- package/dist/docs/example-agents/index.html +4 -4
- package/dist/docs/example-agents/knowledge-base.html +5 -5
- package/dist/docs/example-agents/oncall.html +5 -5
- package/dist/docs/example-agents/security-reviewer.html +4 -4
- package/dist/docs/example-agents/slack-agent.html +5 -5
- package/dist/docs/example-agents/weather-agent.html +6 -6
- package/dist/docs/guides/agent-to-agent.html +5 -5
- package/dist/docs/guides/cloud-runtime.html +6 -6
- package/dist/docs/guides/github.html +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +5 -5
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/index.html +11 -7
- package/dist/docs/quickstart.html +10 -7
- package/dist/docs/reference/agent-config.html +10 -8
- package/dist/docs/reference/artifacts.html +43 -0
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/cli.html +18 -12
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/http-api.html +7 -7
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +7 -7
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/tools.html +7 -7
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/storage.html +6 -6
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/files-backends/agent-store-presigned-url.d.ts.map +1 -1
- package/dist/files-backends/agent-store-presigned-url.js +15 -22
- package/dist/internal/cli-github.d.ts.map +1 -1
- package/dist/internal/cli-github.js +8 -7
- package/dist/internal/cli-slack.js +9 -9
- package/dist/internal/event-mapper.d.ts +3 -3
- package/dist/internal/event-mapper.d.ts.map +1 -1
- package/dist/internal/event-mapper.js +7 -4
- package/dist/internal/session-engine.js +3 -3
- package/dist/internal/workspace.d.ts +8 -6
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +15 -11
- package/dist/playground/assets/{index-D7OV8B_H.js → index-DOnKC85G.js} +18 -18
- package/dist/playground/assets/{index-DOb96C0M.css → index-DoQjqj5w.css} +1 -1
- package/dist/playground/index.html +2 -2
- package/docs/README.md +32 -13
- package/docs/ab.md +23 -36
- package/docs/building-with-agents.md +2 -2
- package/docs/concepts.md +3 -2
- package/docs/deployment.md +1 -1
- package/docs/evals.md +102 -33
- package/docs/example-agents/approval-buddy.md +2 -1
- package/docs/example-agents/benny.md +2 -0
- package/docs/example-agents/bugbot.md +3 -0
- package/docs/example-agents/codebase-wiki.md +2 -0
- package/docs/example-agents/codeowners-review.md +2 -0
- package/docs/example-agents/concierge.md +1 -0
- package/docs/example-agents/fsd.md +1 -0
- package/docs/example-agents/knowledge-base.md +2 -0
- package/docs/example-agents/oncall.md +2 -0
- package/docs/example-agents/slack-agent.md +1 -0
- package/docs/example-agents/weather-agent.md +9 -4
- package/docs/guides/cloud-runtime.md +11 -4
- package/docs/guides/webhooks.md +1 -1
- package/docs/hillclimbing.md +1 -1
- package/docs/quickstart.md +39 -7
- package/docs/reference/agent-config.md +74 -14
- package/docs/reference/artifacts.md +117 -0
- package/docs/reference/channels.md +45 -15
- package/docs/reference/cli.md +141 -20
- package/docs/reference/hooks.md +11 -4
- package/docs/reference/http-api.md +50 -4
- package/docs/reference/project-layout.md +6 -0
- package/docs/reference/sessions.md +5 -4
- package/docs/reference/subagents.md +5 -3
- package/docs/reference/tools.md +23 -7
- package/docs/scaffolding-agents.md +11 -2
- package/docs/storage.md +27 -2
- package/package.json +1 -1
- package/src/channels/github/github-channel.ts +1 -1
- package/src/channels/github/index.ts +1 -1
- package/src/channels/slack/index.ts +1 -1
- package/src/channels/slack/init.ts +2 -1
- package/src/files-backends/agent-store-presigned-url.ts +2 -1
- package/src/internal/cli-github.ts +8 -7
- package/src/internal/cli-slack.ts +9 -9
- package/src/internal/event-mapper.ts +9 -4
- package/src/internal/session-engine.ts +3 -3
- package/src/internal/workspace.ts +15 -11
- package/dist/docs/assets/chunks/@localSearchIndexroot.Cu7b6o1D.js +0 -1
- package/dist/docs/assets/guides_cloud-runtime.md.CDJGvVC4.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.CDJGvVC4.lean.js +0 -1
- package/dist/docs/assets/index.md.CZqbBJPB.js +0 -20
- package/dist/docs/assets/reference_http-api.md.CfVM_ICa.js +0 -11
- package/dist/docs/assets/reference_http-api.md.CfVM_ICa.lean.js +0 -1
- package/dist/docs/assets/scaffolding-agents.md.Bsr9Pwzu.js +0 -1
- /package/dist/docs/assets/{building-with-agents.md.CnHqvYDd.lean.js → building-with-agents.md.txrcGU2B.lean.js} +0 -0
- /package/dist/docs/assets/{concepts.md.DFaQEFkA.lean.js → concepts.md.CqOsxbMU.lean.js} +0 -0
- /package/dist/docs/assets/{deployment.md.9MYBuKM1.lean.js → deployment.md.CuK5SNjN.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_approval-buddy.md.BhEfleVx.lean.js → example-agents_approval-buddy.md.CIiZ9coo.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_benny.md.2Et1qa8f.lean.js → example-agents_benny.md.l7JTmm8X.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_fsd.md.DfNKQTHz.lean.js → example-agents_fsd.md.DPz9ezO4.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_knowledge-base.md.CzyZ2DCr.lean.js → example-agents_knowledge-base.md.IneynQSR.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_oncall.md.wFFXXEyW.lean.js → example-agents_oncall.md.ZE0n6ZFN.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_slack-agent.md.DvgvT4nn.lean.js → example-agents_slack-agent.md.06jQXTAI.lean.js} +0 -0
- /package/dist/docs/assets/{guides_webhooks.md.DiAwSR42.lean.js → guides_webhooks.md.BERuBSJW.lean.js} +0 -0
- /package/dist/docs/assets/{hillclimbing.md.D9Y1_bYh.lean.js → hillclimbing.md.yXqdlv2R.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.C_ouF_uf.lean.js → reference_sessions.md.DBVFi2Sx.lean.js} +0 -0
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* root is a barrel over the whole library, and bundling through it inlines
|
|
6
6
|
* every module the barrel can reach (sync engine, local sqlite index, secure
|
|
7
7
|
* open) into the published tarball. This module has no imports of its own, so
|
|
8
|
-
* the bundle stays limited to the validator.
|
|
8
|
+
* the bundle stays limited to the validator. The bundler resolves that entry
|
|
9
|
+
* via the `anysphere-source` export so it does not need a prebuilt `dist/`.
|
|
9
10
|
*/
|
|
10
11
|
export { createAgentStorePresignedUrlValidatorForBackend } from "@anysphere/agent-store-sync/presigned-url";
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
synthesizeGitHubEvent,
|
|
43
43
|
} from "../channels/github/replay.js";
|
|
44
44
|
import { resolveAgentMounts } from "./discovery.js";
|
|
45
|
+
import { CLI_COMMAND_NAME as CLI } from "./distribution.js";
|
|
45
46
|
import { startFanoutServer } from "./github-fanout.js";
|
|
46
47
|
|
|
47
48
|
const execFileAsync = promisify(execFile);
|
|
@@ -88,21 +89,21 @@ export interface GithubCliOptions {
|
|
|
88
89
|
out?: string;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
const GITHUB_HELP =
|
|
92
|
+
const GITHUB_HELP = `${CLI} github — forward live GitHub webhooks to a local agent
|
|
92
93
|
|
|
93
94
|
Usage:
|
|
94
|
-
|
|
95
|
+
${CLI} github forward [--dir .] [--slug S] [--channel C]
|
|
95
96
|
[--repo owner/repo | --org ORG]
|
|
96
97
|
[--events a,b,c] [--url URL]
|
|
97
98
|
[--host 127.0.0.1] [--port 3000]
|
|
98
99
|
[--secret S] [--install]
|
|
99
|
-
|
|
100
|
+
${CLI} github replay <pr_url|owner/repo#N> [--events a,b,c | *]
|
|
100
101
|
[--action A] [--conclusion C] [--comment "…"]
|
|
101
102
|
[--context CTX] [--dir .] [--slug S] [--channel C]
|
|
102
103
|
[--host H] [--port N] [--url URL] [--secret S]
|
|
103
104
|
[--dry-run] [--out DIR] [--json]
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
${CLI} github events [--dir .] [--host H] [--port N] [--json]
|
|
106
|
+
${CLI} github doctor [--install] [--json]
|
|
106
107
|
|
|
107
108
|
Commands:
|
|
108
109
|
forward Run \`gh webhook forward\` for the discovered githubChannel()s.
|
|
@@ -122,8 +123,8 @@ Commands:
|
|
|
122
123
|
|
|
123
124
|
Prerequisites:
|
|
124
125
|
- gh CLI logged in (\`gh auth login\`).
|
|
125
|
-
- ${GITHUB_WEBHOOK_EXTENSION} extension (
|
|
126
|
-
- The agent already serving (
|
|
126
|
+
- ${GITHUB_WEBHOOK_EXTENSION} extension (\`${CLI} github doctor --install\`).
|
|
127
|
+
- The agent already serving (\`${CLI} serve --dir . --dev\`).
|
|
127
128
|
|
|
128
129
|
Notes:
|
|
129
130
|
- Set GITHUB_WEBHOOK_SECRET (or pass --secret) so the forwarded deliveries
|
|
@@ -71,22 +71,22 @@ export interface SlackCliOptions {
|
|
|
71
71
|
err?: (text: string) => void;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
const SLACK_HELP =
|
|
74
|
+
const SLACK_HELP = `${CLI} slack — Slack channel pack helpers (Socket Mode)
|
|
75
75
|
|
|
76
76
|
Usage:
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
${CLI} slack setup
|
|
78
|
+
${CLI} slack create [--dir .] [--name NAME] [--slack-team T0123ABCD]
|
|
79
79
|
[--prod] [--team <id>] [--icon URL-or-FILE]
|
|
80
80
|
[--force] [--prefix PREFIX | --no-prefix] [--json]
|
|
81
|
-
|
|
81
|
+
${CLI} slack destroy [--dir .] [--slack-team T0123ABCD] [--prod]
|
|
82
82
|
[--team <id>] [--json]
|
|
83
|
-
|
|
83
|
+
${CLI} slack icon <URL-or-FILE> [--dir .] [--slack-team T0123ABCD]
|
|
84
84
|
[--prod] [--team <id>] [--json]
|
|
85
|
-
|
|
85
|
+
${CLI} slack init [--dir .] [--name NAME] [--prefix PREFIX | --no-prefix]
|
|
86
86
|
[--channel-posts]
|
|
87
|
-
|
|
87
|
+
${CLI} slack manifest --env dev|prod|both [--dir .] [--name NAME]
|
|
88
88
|
[--print]
|
|
89
|
-
|
|
89
|
+
${CLI} slack doctor [--dir .] [--prefix PREFIX | --no-prefix] [--json]
|
|
90
90
|
|
|
91
91
|
create/destroy/icon — Cursor "Add to Slack" managed provisioning:
|
|
92
92
|
create One-command Path B setup: connects the Slack workspace (browser
|
|
@@ -94,7 +94,7 @@ create/destroy/icon — Cursor "Add to Slack" managed provisioning:
|
|
|
94
94
|
Socket Mode app from the generated manifest, writes the token
|
|
95
95
|
pair into <dir>/.env.local, then runs doctor (prose mode; --json
|
|
96
96
|
reports without the doctor pass). Requires
|
|
97
|
-
|
|
97
|
+
\`${CLI} login\` (or CURSOR_API_KEY) and the feature gate.
|
|
98
98
|
--prod provisions the prod app (default dev); --slack-team picks
|
|
99
99
|
the workspace when several are connected. --icon sets the app's
|
|
100
100
|
icon (best-effort: a bad icon warns, never fails the create).
|
|
@@ -11,6 +11,8 @@ import type {
|
|
|
11
11
|
import type { SessionEventPayload, TurnUsage } from "../types.js";
|
|
12
12
|
|
|
13
13
|
const CUSTOM_TOOLS_PROVIDER = "custom-user-tools";
|
|
14
|
+
/** Authored server tools on cloud turns; keep in sync with `SERVER_TOOLS_MCP_SERVER_NAME`. */
|
|
15
|
+
const SERVER_TOOLS_PROVIDER = "agentsdk-tools";
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* Nested interaction updates from a task/subagent tool-call-delta.
|
|
@@ -354,16 +356,19 @@ export class TurnEventMapper {
|
|
|
354
356
|
}
|
|
355
357
|
|
|
356
358
|
/**
|
|
357
|
-
* Human-meaningful tool identity for stream events.
|
|
358
|
-
* arrive as MCP calls against
|
|
359
|
-
* surface under the customer's bare tool name.
|
|
359
|
+
* Human-meaningful tool identity for stream events. Authored server tools
|
|
360
|
+
* arrive as MCP calls against `custom-user-tools` (local) or `agentsdk-tools`
|
|
361
|
+
* (cloud); both surface under the customer's bare tool name.
|
|
360
362
|
*/
|
|
361
363
|
export function describeToolCall(toolCall: ToolCall): ToolCallDescription {
|
|
362
364
|
switch (toolCall.type) {
|
|
363
365
|
case "mcp": {
|
|
364
366
|
const providerIdentifier = toolCall.args.providerIdentifier;
|
|
365
367
|
const toolName = toolCall.args.toolName;
|
|
366
|
-
if (
|
|
368
|
+
if (
|
|
369
|
+
providerIdentifier === CUSTOM_TOOLS_PROVIDER ||
|
|
370
|
+
providerIdentifier === SERVER_TOOLS_PROVIDER
|
|
371
|
+
) {
|
|
367
372
|
return {
|
|
368
373
|
toolName: toolName ?? "custom-tool",
|
|
369
374
|
args: toolCall.args.args,
|
|
@@ -1467,9 +1467,9 @@ export class SessionEngine {
|
|
|
1467
1467
|
// including agent tool script bodies. On hosted deployments the
|
|
1468
1468
|
// shared memory journal is on the store mount — say where. When the
|
|
1469
1469
|
// turn carries the session-bound server-tool MCP endpoint, the
|
|
1470
|
-
// preamble
|
|
1471
|
-
//
|
|
1472
|
-
//
|
|
1470
|
+
// preamble catalogs server tools under that MCP server name *before*
|
|
1471
|
+
// the agent-tool "write the script if missing" recipe, so a model
|
|
1472
|
+
// told to "use <server tool>" calls MCP instead of inventing a .sh.
|
|
1473
1473
|
const preamble = buildAgentsMdContent(agent, {
|
|
1474
1474
|
includeScripts: true,
|
|
1475
1475
|
serverToolsMcpName:
|
|
@@ -129,6 +129,7 @@ export function buildAgentToolsCatalog(
|
|
|
129
129
|
"",
|
|
130
130
|
"These tools run in the agent environment (not on the agent-serve host).",
|
|
131
131
|
"Pass a JSON object on stdin matching the input schema; read the result from stdout.",
|
|
132
|
+
"Only the tools in this section are scripts. Do not create, edit, or run a script for any other tool name.",
|
|
132
133
|
"",
|
|
133
134
|
];
|
|
134
135
|
|
|
@@ -170,10 +171,10 @@ export function buildAgentToolsCatalog(
|
|
|
170
171
|
*
|
|
171
172
|
* Server tools execute on the serve host and reach cloud turns only as MCP
|
|
172
173
|
* tools on {@link SERVER_TOOLS_MCP_SERVER_NAME}. Instructions reference them
|
|
173
|
-
* by bare name
|
|
174
|
-
* missing"
|
|
175
|
-
*
|
|
176
|
-
*
|
|
174
|
+
* by bare name. The agent-tool catalog still teaches "write the script if
|
|
175
|
+
* missing" for *agent* tools; this section must come first on cloud and
|
|
176
|
+
* say that server tools are MCP-only, or the model copies that recipe onto
|
|
177
|
+
* a host tool and the host-side marker never appears.
|
|
177
178
|
*/
|
|
178
179
|
export function buildServerToolsCatalog(
|
|
179
180
|
tools: DiscoveredTool[],
|
|
@@ -187,8 +188,9 @@ export function buildServerToolsCatalog(
|
|
|
187
188
|
const parts: string[] = [
|
|
188
189
|
"## Server tools",
|
|
189
190
|
"",
|
|
190
|
-
`These tools execute on the agent-serve host, not in this environment. They are available ONLY as MCP tools on the \`${options.mcpServerName}\` MCP server
|
|
191
|
-
"
|
|
191
|
+
`These tools execute on the agent-serve host, not in this environment. They are available ONLY as MCP tools on the \`${options.mcpServerName}\` MCP server.`,
|
|
192
|
+
"Call them through your MCP tooling: list that server's tools, then invoke the tool by its exact name (GetMcpTools / CallMcpTool, or the equivalent). There is no `.agent-serve/tools/<name>.sh` for any tool in this section.",
|
|
193
|
+
`If the \`${options.mcpServerName}\` server is not in your MCP server list, stop and report that. Do not write, edit, or run a local script or other substitute. A local re-implementation cannot produce the host-side marker, logs, or session events.`,
|
|
192
194
|
"",
|
|
193
195
|
];
|
|
194
196
|
|
|
@@ -217,8 +219,10 @@ export function buildServerToolsCatalog(
|
|
|
217
219
|
*
|
|
218
220
|
* `serverToolsMcpName` is cloud-only: when the turn's MCP config carries the
|
|
219
221
|
* session-bound server-tool endpoint, the catalog names that server so the
|
|
220
|
-
* model calls the real tools instead of inventing local stand-ins.
|
|
221
|
-
*
|
|
222
|
+
* model calls the real tools instead of inventing local stand-ins. It is
|
|
223
|
+
* emitted *before* the agent-tool catalog so "write the script if missing"
|
|
224
|
+
* cannot be read as applying to server-tool names. Local runtimes omit it —
|
|
225
|
+
* there the harness exposes server tools natively.
|
|
222
226
|
*/
|
|
223
227
|
export function buildAgentsMdContent(
|
|
224
228
|
agent: ResolvedAgent,
|
|
@@ -227,14 +231,14 @@ export function buildAgentsMdContent(
|
|
|
227
231
|
return [
|
|
228
232
|
agent.instructions?.trim() ?? "",
|
|
229
233
|
buildIdentitySection(agent),
|
|
230
|
-
buildAgentToolsCatalog(agent.tools, {
|
|
231
|
-
includeScripts: options.includeScripts,
|
|
232
|
-
}),
|
|
233
234
|
options.serverToolsMcpName === undefined
|
|
234
235
|
? ""
|
|
235
236
|
: buildServerToolsCatalog(agent.tools, {
|
|
236
237
|
mcpServerName: options.serverToolsMcpName,
|
|
237
238
|
}),
|
|
239
|
+
buildAgentToolsCatalog(agent.tools, {
|
|
240
|
+
includeScripts: options.includeScripts,
|
|
241
|
+
}),
|
|
238
242
|
]
|
|
239
243
|
.filter((part) => part !== "")
|
|
240
244
|
.join("\n\n");
|