@cursor/july 0.1.68 → 0.1.73
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 +4 -5
- package/README.md +23 -11
- package/dist/bin/agent-serve.js +3 -2
- package/dist/channels/github/api.d.ts +2 -0
- package/dist/channels/github/api.d.ts.map +1 -1
- package/dist/channels/github/api.js +2 -1
- package/dist/channels/github/binding.d.ts +7 -0
- package/dist/channels/github/binding.d.ts.map +1 -1
- package/dist/channels/github/binding.js +4 -0
- package/dist/channels/github/checks.d.ts +99 -0
- package/dist/channels/github/checks.d.ts.map +1 -0
- package/dist/channels/github/checks.js +108 -0
- package/dist/channels/github/cursor-account.d.ts +4 -4
- package/dist/channels/github/cursor-account.d.ts.map +1 -1
- package/dist/channels/github/cursor-account.js +7 -5
- package/dist/channels/github/index.d.ts +1 -0
- package/dist/channels/github/index.d.ts.map +1 -1
- package/dist/channels/github/index.js +1 -0
- package/dist/channels/github/types.d.ts +8 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/slack/manifest.d.ts +2 -2
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +13 -11
- package/dist/channels/slack/types.d.ts +2 -2
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/connections.d.ts +17 -5
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +17 -5
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.C5XUTCw9.js → app.CdbcFD8T.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DQad--_z.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CGDTAYHY.js → VPLocalSearchBox.D_NKImM7.js} +1 -1
- package/dist/docs/assets/chunks/{theme.lPixh250.js → theme.CMvz7cu9.js} +2 -2
- package/dist/docs/assets/{concepts.md.CqOsxbMU.js → concepts.md.BXAm6G-C.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.C7G7IykG.js → guides_mcp-oauth.md.CzEB6RaG.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.DHkkvcEZ.js → reference_agent-config.md.BZnEKfEc.js} +3 -4
- package/dist/docs/assets/{reference_agent-config.md.DHkkvcEZ.lean.js → reference_agent-config.md.BZnEKfEc.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Bwswbm6H.js → reference_connections.md.Cu3N-S3Q.js} +18 -11
- package/dist/docs/assets/{reference_connections.md.Bwswbm6H.lean.js → reference_connections.md.Cu3N-S3Q.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.DBVFi2Sx.js → reference_sessions.md.B0DdlM-K.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.Wmvb7Lob.js → reference_tools.md.DTg_kEsx.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.DQ-hYuZT.js +1 -0
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +3 -3
- package/dist/docs/evals.html +3 -3
- package/dist/docs/example-agents/approval-buddy.html +3 -3
- package/dist/docs/example-agents/benny.html +3 -3
- package/dist/docs/example-agents/bugbot.html +3 -3
- package/dist/docs/example-agents/codebase-wiki.html +3 -3
- package/dist/docs/example-agents/codeowners-review.html +3 -3
- package/dist/docs/example-agents/concierge.html +3 -3
- package/dist/docs/example-agents/fsd.html +3 -3
- package/dist/docs/example-agents/index.html +3 -3
- package/dist/docs/example-agents/knowledge-base.html +3 -3
- package/dist/docs/example-agents/oncall.html +3 -3
- package/dist/docs/example-agents/security-reviewer.html +3 -3
- package/dist/docs/example-agents/slack-agent.html +3 -3
- package/dist/docs/example-agents/weather-agent.html +3 -3
- package/dist/docs/guides/agent-to-agent.html +3 -3
- package/dist/docs/guides/cloud-runtime.html +3 -3
- package/dist/docs/guides/convert-automation.html +3 -3
- package/dist/docs/guides/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +3 -3
- package/dist/docs/guides/mcp-oauth.html +5 -5
- package/dist/docs/guides/opentelemetry.html +3 -3
- package/dist/docs/guides/slack.html +3 -3
- package/dist/docs/guides/webhooks.html +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +3 -3
- package/dist/docs/quickstart.html +3 -3
- package/dist/docs/reference/agent-config.html +5 -6
- package/dist/docs/reference/artifacts.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +3 -3
- package/dist/docs/reference/connections.html +20 -13
- package/dist/docs/reference/hooks.html +3 -3
- package/dist/docs/reference/http-api.html +3 -3
- package/dist/docs/reference/instructions.html +3 -3
- package/dist/docs/reference/playground.html +3 -3
- package/dist/docs/reference/project-layout.html +3 -3
- package/dist/docs/reference/prompt.html +3 -3
- package/dist/docs/reference/schedules.html +3 -3
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/skills.html +3 -3
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +5 -5
- package/dist/docs/scaffolding-agents.html +3 -3
- package/dist/docs/storage.html +3 -3
- package/dist/docs/templates/agentic-owners.html +3 -3
- package/dist/docs/templates/demo.html +3 -3
- package/dist/docs/templates/pr-autofixer.html +3 -3
- package/dist/docs/templates/security-reviewer.html +3 -3
- package/dist/docs/templates/triage.html +3 -3
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/internal/advertise-tools.d.ts +11 -6
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +63 -30
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +2 -4
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
- package/dist/internal/convert-automation/convert-workflow.js +2 -10
- package/dist/internal/cursor/account-mcp.d.ts +29 -3
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +147 -67
- package/dist/internal/cursor/backend-client.d.ts +11 -6
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +32 -10
- package/dist/internal/cursor-account-mcp-auth.d.ts +11 -0
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +69 -0
- package/dist/internal/deploy-client.d.ts +0 -7
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +2 -4
- package/dist/internal/deploy-manifest.d.ts +15 -24
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +38 -27
- package/dist/internal/deployment-scm-event-stream.d.ts +4 -1
- package/dist/internal/deployment-scm-event-stream.d.ts.map +1 -1
- package/dist/internal/deployment-scm-event-stream.js +15 -1
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +42 -10
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +7 -106
- package/dist/internal/init-scaffold.d.ts +8 -0
- package/dist/internal/init-scaffold.d.ts.map +1 -0
- package/dist/internal/init-scaffold.js +168 -0
- package/dist/internal/inline-stdio-mcp.d.ts +2 -0
- package/dist/internal/inline-stdio-mcp.d.ts.map +1 -1
- package/dist/internal/inline-stdio-mcp.js +10 -8
- package/dist/internal/json-schema.d.ts +7 -0
- package/dist/internal/json-schema.d.ts.map +1 -1
- package/dist/internal/json-schema.js +18 -3
- package/dist/internal/mcp-endpoint.js +7 -7
- package/dist/internal/mcp-host.js +4 -2
- package/dist/internal/mcp-oauth.d.ts +22 -0
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +40 -1
- package/dist/internal/package-inline-stdio.d.ts.map +1 -1
- package/dist/internal/package-inline-stdio.js +5 -5
- package/dist/internal/review-comments.d.ts +97 -0
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +151 -0
- package/dist/internal/sanitize-mcp-tool-name.d.ts +20 -0
- package/dist/internal/sanitize-mcp-tool-name.d.ts.map +1 -0
- package/dist/internal/sanitize-mcp-tool-name.js +30 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +4 -6
- package/dist/internal/shallow-clone.d.ts +94 -39
- package/dist/internal/shallow-clone.d.ts.map +1 -1
- package/dist/internal/shallow-clone.js +188 -68
- package/dist/internal/terminal-style.d.ts +18 -0
- package/dist/internal/terminal-style.d.ts.map +1 -1
- package/dist/internal/terminal-style.js +46 -1
- package/dist/internal/workspace.d.ts +2 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +5 -0
- package/dist/playground/assets/index-77uhu5Kr.css +1 -0
- package/dist/playground/assets/{index-yxs1heea.js → index-D4buox4m.js} +42 -42
- package/dist/playground/index.html +2 -2
- package/dist/tools.d.ts +7 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +28 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/concepts.md +4 -4
- package/docs/guides/mcp-oauth.md +3 -1
- package/docs/reference/agent-config.md +11 -12
- package/docs/reference/connections.md +44 -26
- package/docs/reference/sessions.md +2 -2
- package/docs/reference/tools.md +1 -1
- package/docs/troubleshooting.md +3 -2
- package/package.json +4 -1
- package/skills/create-agent/SKILL.md +12 -9
- package/skills/debug/SKILL.md +2 -1
- package/skills/framework-map/SKILL.md +6 -6
- package/skills/mcp-auth/SKILL.md +8 -6
- package/src/bin/agent-serve.ts +3 -2
- package/src/channels/github/api.ts +6 -1
- package/src/channels/github/binding.ts +21 -0
- package/src/channels/github/checks.ts +179 -0
- package/src/channels/github/cursor-account.ts +9 -6
- package/src/channels/github/index.ts +1 -0
- package/src/channels/github/types.ts +8 -0
- package/src/channels/slack/manifest.ts +8 -10
- package/src/channels/slack/types.ts +2 -2
- package/src/connections.ts +17 -5
- package/src/internal/advertise-tools.ts +72 -23
- package/src/internal/cli-deploy.ts +4 -15
- package/src/internal/convert-automation/convert-workflow.ts +2 -11
- package/src/internal/cursor/account-mcp.ts +208 -73
- package/src/internal/cursor/backend-client.ts +45 -11
- package/src/internal/cursor-account-mcp-auth.ts +83 -0
- package/src/internal/deploy-client.ts +0 -10
- package/src/internal/deploy-manifest.ts +33 -39
- package/src/internal/deployment-scm-event-stream.ts +17 -1
- package/src/internal/discovery.ts +47 -3
- package/src/internal/init-project.ts +7 -133
- package/src/internal/init-scaffold.ts +176 -0
- package/src/internal/inline-stdio-mcp.ts +13 -0
- package/src/internal/json-schema.ts +24 -3
- package/src/internal/mcp-endpoint.ts +6 -0
- package/src/internal/mcp-host.ts +4 -0
- package/src/internal/mcp-oauth.ts +55 -1
- package/src/internal/package-inline-stdio.ts +5 -1
- package/src/internal/review-comments.ts +245 -0
- package/src/internal/sanitize-mcp-tool-name.ts +33 -0
- package/src/internal/session-engine.ts +7 -0
- package/src/internal/shallow-clone.ts +293 -105
- package/src/internal/terminal-style.ts +67 -1
- package/src/internal/workspace.ts +6 -0
- package/src/tools.ts +7 -0
- package/src/types.ts +32 -4
- package/templates/agentic-owners/agent/agent.ts +3 -0
- package/templates/demo/agent/agent.ts +3 -0
- package/templates/security-reviewer/agent/agent.ts +3 -0
- package/templates/triage/agent/agent.ts +3 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.DvUR3lv9.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CuVztCKs.js +0 -1
- package/dist/playground/assets/index-CoL7xCJl.css +0 -1
- /package/dist/docs/assets/{concepts.md.CqOsxbMU.lean.js → concepts.md.BXAm6G-C.lean.js} +0 -0
- /package/dist/docs/assets/{guides_mcp-oauth.md.C7G7IykG.lean.js → guides_mcp-oauth.md.CzEB6RaG.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.DBVFi2Sx.lean.js → reference_sessions.md.B0DdlM-K.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.Wmvb7Lob.lean.js → reference_tools.md.DTg_kEsx.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.CuVztCKs.lean.js → troubleshooting.md.DQ-hYuZT.lean.js} +0 -0
|
@@ -16,6 +16,14 @@ export interface TerminalPalette {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const IDENTITY = (s: string): string => s;
|
|
19
|
+
const ESC = "\u001b";
|
|
20
|
+
const BEL = "\u0007";
|
|
21
|
+
const ANSI_CSI = new RegExp(`${ESC}\\[[0-9;]*m`, "g");
|
|
22
|
+
/** OSC 8 hyperlinks: `ESC ] 8 ; params ; uri BEL` (or ST). */
|
|
23
|
+
const OSC_8 = new RegExp(
|
|
24
|
+
`${ESC}\\]8;[^${BEL}${ESC}]*(?:${BEL}|${ESC}\\\\)`,
|
|
25
|
+
"g"
|
|
26
|
+
);
|
|
19
27
|
|
|
20
28
|
const PLAIN: TerminalPalette = {
|
|
21
29
|
dim: IDENTITY,
|
|
@@ -42,7 +50,7 @@ export function makePalette(enabled: boolean): TerminalPalette {
|
|
|
42
50
|
(s: string): string =>
|
|
43
51
|
`\u001b[${code}m${s}\u001b[0m`;
|
|
44
52
|
return {
|
|
45
|
-
dim: wrap("2"),
|
|
53
|
+
dim: (s: string) => (hasAnsiStyling(s) ? s : wrap("2")(s)),
|
|
46
54
|
bold: wrap("1"),
|
|
47
55
|
cyan: wrap("36"),
|
|
48
56
|
green: wrap("32"),
|
|
@@ -62,6 +70,64 @@ export function stderrPalette(): TerminalPalette {
|
|
|
62
70
|
return makePalette(colorEnabledFor(process.stderr));
|
|
63
71
|
}
|
|
64
72
|
|
|
73
|
+
/** Visible column count, ignoring CSI color/style and OSC 8 hyperlinks. */
|
|
74
|
+
export function visibleWidth(text: string): number {
|
|
75
|
+
return text.replace(OSC_8, "").replace(ANSI_CSI, "").length;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** True when `text` already carries CSI styling or OSC 8 (do not wrap again). */
|
|
79
|
+
export function hasAnsiStyling(text: string): boolean {
|
|
80
|
+
return text.includes("\u001b[") || text.includes("\u001b]");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Clickable terminal hyperlink (OSC 8). The URI is the click target; `label`
|
|
85
|
+
* is what the user sees. `visibleWidth` ignores the OSC wrapper.
|
|
86
|
+
*/
|
|
87
|
+
export function terminalHyperlink(
|
|
88
|
+
url: string,
|
|
89
|
+
label: string,
|
|
90
|
+
enabled: boolean = colorEnabledFor()
|
|
91
|
+
): string {
|
|
92
|
+
if (!enabled) {
|
|
93
|
+
return label;
|
|
94
|
+
}
|
|
95
|
+
return `\u001b]8;;${url}\u0007\u001b[4m${label}\u001b[24m\u001b]8;;\u0007`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Unicode box around `lines`. `color` wraps the whole box (borders + body)
|
|
100
|
+
* so a warning panel can be yellow without per-line prefixes.
|
|
101
|
+
*/
|
|
102
|
+
export function formatTerminalBox(
|
|
103
|
+
lines: readonly string[],
|
|
104
|
+
options?: {
|
|
105
|
+
color?: (s: string) => string;
|
|
106
|
+
minWidth?: number;
|
|
107
|
+
padding?: number;
|
|
108
|
+
}
|
|
109
|
+
): string {
|
|
110
|
+
const color = options?.color ?? IDENTITY;
|
|
111
|
+
const padding = options?.padding ?? 1;
|
|
112
|
+
const contentWidth = Math.max(
|
|
113
|
+
options?.minWidth ?? 0,
|
|
114
|
+
...lines.map((line) => visibleWidth(line)),
|
|
115
|
+
1
|
|
116
|
+
);
|
|
117
|
+
const inner = contentWidth + padding * 2;
|
|
118
|
+
const padLine = (line: string): string => {
|
|
119
|
+
const extra = contentWidth - visibleWidth(line);
|
|
120
|
+
return `│${" ".repeat(padding)}${line}${" ".repeat(padding + extra)}│`;
|
|
121
|
+
};
|
|
122
|
+
const paint = (line: string): string => color(line);
|
|
123
|
+
const box = [
|
|
124
|
+
paint(`╭${"─".repeat(inner)}╮`),
|
|
125
|
+
...lines.map((line) => paint(padLine(line))),
|
|
126
|
+
paint(`╰${"─".repeat(inner)}╯`),
|
|
127
|
+
].join("\n");
|
|
128
|
+
return box;
|
|
129
|
+
}
|
|
130
|
+
|
|
65
131
|
/** Wipe the terminal before a `dev` Enter-to-restart cycle. */
|
|
66
132
|
export function clearTerminal(
|
|
67
133
|
stream: NodeJS.WriteStream = process.stdout
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
symlink,
|
|
20
20
|
writeFile,
|
|
21
21
|
} from "node:fs/promises";
|
|
22
|
+
import { homedir } from "node:os";
|
|
22
23
|
import { dirname, join, parse, relative, resolve, sep } from "node:path";
|
|
23
24
|
import { promisify } from "node:util";
|
|
24
25
|
import { agentStoreKeys, DEPLOYMENT_STORE_MOUNT_PATH } from "../files.js";
|
|
@@ -272,6 +273,11 @@ export async function isNestedInGitRepo(dir: string): Promise<boolean> {
|
|
|
272
273
|
return false;
|
|
273
274
|
}
|
|
274
275
|
|
|
276
|
+
/** Default harness parent for a nested-git agent project. */
|
|
277
|
+
export function defaultLocalHarnessCwd(dirName: string): string {
|
|
278
|
+
return join(homedir(), ".cache", "agent-serve", dirName);
|
|
279
|
+
}
|
|
280
|
+
|
|
275
281
|
/**
|
|
276
282
|
* Give a session workspace its own git root so the harness roots *there*
|
|
277
283
|
* rather than at the enclosing repo (see {@link isNestedInGitRepo}). Without
|
package/src/tools.ts
CHANGED
|
@@ -85,6 +85,11 @@ type ServerToolConfig<TSchema> = {
|
|
|
85
85
|
description: string;
|
|
86
86
|
execution?: "server";
|
|
87
87
|
inputSchema?: TSchema;
|
|
88
|
+
/**
|
|
89
|
+
* JSON Schema for the tool's structured output (zod converted at
|
|
90
|
+
* discovery, never validated against). Advertised when declared.
|
|
91
|
+
*/
|
|
92
|
+
outputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
88
93
|
needsApproval?: ToolNeedsApproval<ToolInput<TSchema>>;
|
|
89
94
|
execute: (
|
|
90
95
|
input: ToolInput<TSchema>,
|
|
@@ -97,6 +102,8 @@ type AgentToolConfig<TSchema> = {
|
|
|
97
102
|
description: string;
|
|
98
103
|
execution: "agent";
|
|
99
104
|
inputSchema?: TSchema;
|
|
105
|
+
/** Output JSON Schema; advertised when declared, never validated against. */
|
|
106
|
+
outputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
100
107
|
/**
|
|
101
108
|
* Shell script written into the session workspace. Receives a JSON
|
|
102
109
|
* object on stdin and should print the result on stdout.
|
package/src/types.ts
CHANGED
|
@@ -347,9 +347,13 @@ export interface AgentLocalOptions {
|
|
|
347
347
|
/**
|
|
348
348
|
* Default local harness cwd parent. Absolute, or relative to the agent
|
|
349
349
|
* project root. Each session uses `<cwd>/<sessionId>` unless a per-send
|
|
350
|
-
* {@link SendMessageOptions.workspaceDir} overrides it.
|
|
351
|
-
*
|
|
352
|
-
*
|
|
350
|
+
* {@link SendMessageOptions.workspaceDir} overrides it.
|
|
351
|
+
*
|
|
352
|
+
* When omitted, a project nested in another git repo (a monorepo package)
|
|
353
|
+
* defaults to `~/.cache/agent-serve/<dir>` so Cursor does not load the
|
|
354
|
+
* enclosing checkout's AGENTS.md, rules, skills, or MCP servers. A
|
|
355
|
+
* standalone git root keeps the in-project session workspace. Point this
|
|
356
|
+
* at a checkout when the agent must inherit that tree.
|
|
353
357
|
*/
|
|
354
358
|
cwd?: string;
|
|
355
359
|
/**
|
|
@@ -428,7 +432,17 @@ export type ToolResultValue =
|
|
|
428
432
|
*/
|
|
429
433
|
export type ToolExecuteResult =
|
|
430
434
|
| ToolResultValue
|
|
431
|
-
| {
|
|
435
|
+
| {
|
|
436
|
+
content: ToolResultContent[];
|
|
437
|
+
isError?: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Structured result for tools that declare an `outputSchema`: MCP
|
|
440
|
+
* clients require `structuredContent` on calls to schema-declaring
|
|
441
|
+
* tools. Plain-object returns get it filled in automatically; the
|
|
442
|
+
* envelope form (needed for images or `isError`) sets it here.
|
|
443
|
+
*/
|
|
444
|
+
structuredContent?: JsonObject;
|
|
445
|
+
};
|
|
432
446
|
|
|
433
447
|
/** Repo-agnostic GitHub client on the agent-serve host. */
|
|
434
448
|
export interface HostGitHubClient {
|
|
@@ -456,6 +470,7 @@ export interface HostMcpToolInfo {
|
|
|
456
470
|
name: string;
|
|
457
471
|
description?: string;
|
|
458
472
|
inputSchema?: JsonObject;
|
|
473
|
+
outputSchema?: JsonObject;
|
|
459
474
|
}
|
|
460
475
|
|
|
461
476
|
export interface HostMcpCallResult {
|
|
@@ -861,6 +876,13 @@ export interface ToolConfig<TInput> {
|
|
|
861
876
|
* JSON object.
|
|
862
877
|
*/
|
|
863
878
|
inputSchema?: z.ZodType<TInput> | JsonSchemaObject;
|
|
879
|
+
/**
|
|
880
|
+
* JSON Schema for the tool's structured output (`Tool.outputSchema` from
|
|
881
|
+
* the MCP spec), as a zod schema (converted, never validated against) or a
|
|
882
|
+
* plain JSON Schema object. Advertised when declared and omitted
|
|
883
|
+
* otherwise — results are not validated against it.
|
|
884
|
+
*/
|
|
885
|
+
outputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
864
886
|
/**
|
|
865
887
|
* When true (or when the predicate returns true), the host parks the
|
|
866
888
|
* in-flight tool call until a human approves or denies via
|
|
@@ -889,6 +911,7 @@ export interface ToolDefinition extends BrandedDefinition<"tool"> {
|
|
|
889
911
|
readonly description: string;
|
|
890
912
|
readonly execution?: ToolExecution;
|
|
891
913
|
readonly inputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
914
|
+
readonly outputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
892
915
|
readonly needsApproval?: ToolNeedsApproval<never>;
|
|
893
916
|
readonly execute?: (
|
|
894
917
|
input: never,
|
|
@@ -1036,6 +1059,8 @@ export function isSymbolicConnectionTransport(
|
|
|
1036
1059
|
export type InlineStdioToolConfig = {
|
|
1037
1060
|
description: string;
|
|
1038
1061
|
inputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
1062
|
+
/** Output JSON Schema (zod converted, never validated); advertised when declared. */
|
|
1063
|
+
outputSchema?: z.ZodTypeAny | JsonSchemaObject;
|
|
1039
1064
|
execute: (input: JsonObject) => unknown | Promise<unknown>;
|
|
1040
1065
|
};
|
|
1041
1066
|
|
|
@@ -2448,6 +2473,8 @@ export interface DiscoveredTool {
|
|
|
2448
2473
|
description: string;
|
|
2449
2474
|
/** JSON Schema advertised to the model. */
|
|
2450
2475
|
inputSchema: JsonSchemaObject;
|
|
2476
|
+
/** Output JSON Schema, advertised only when the tool declares one. */
|
|
2477
|
+
outputSchema?: JsonSchemaObject;
|
|
2451
2478
|
/** Where the tool body runs. Defaults to `"server"`. */
|
|
2452
2479
|
execution: ToolExecution;
|
|
2453
2480
|
/**
|
|
@@ -2629,6 +2656,7 @@ export interface AgentProjectInfo {
|
|
|
2629
2656
|
name: string;
|
|
2630
2657
|
transport: string;
|
|
2631
2658
|
hostOnly?: boolean;
|
|
2659
|
+
advertiseTools?: boolean;
|
|
2632
2660
|
/**
|
|
2633
2661
|
* Present only for `cursorAccount` connections: the connector-name
|
|
2634
2662
|
* allowlist, or `"*"` for every connected server. Structured twin of the
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
1
3
|
import { defineAgent } from "@cursor/july";
|
|
2
4
|
|
|
3
5
|
export default defineAgent({
|
|
@@ -11,5 +13,6 @@ export default defineAgent({
|
|
|
11
13
|
tools: ["read", "grep", "glob", "ls"],
|
|
12
14
|
local: {
|
|
13
15
|
sandbox: true,
|
|
16
|
+
cwd: join(homedir(), ".cache", "agent-serve", "agentic-owners"),
|
|
14
17
|
},
|
|
15
18
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
1
3
|
import { defineAgent } from "@cursor/july";
|
|
2
4
|
|
|
3
5
|
export default defineAgent({
|
|
@@ -11,5 +13,6 @@ export default defineAgent({
|
|
|
11
13
|
tools: ["read", "grep"],
|
|
12
14
|
local: {
|
|
13
15
|
sandbox: true,
|
|
16
|
+
cwd: join(homedir(), ".cache", "agent-serve", "demo"),
|
|
14
17
|
},
|
|
15
18
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
1
3
|
import { defineAgent } from "@cursor/july";
|
|
2
4
|
|
|
3
5
|
export default defineAgent({
|
|
@@ -11,5 +13,6 @@ export default defineAgent({
|
|
|
11
13
|
tools: ["read", "grep"],
|
|
12
14
|
local: {
|
|
13
15
|
sandbox: true,
|
|
16
|
+
cwd: join(homedir(), ".cache", "agent-serve", "security-reviewer"),
|
|
14
17
|
},
|
|
15
18
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
1
3
|
import { defineAgent } from "@cursor/july";
|
|
2
4
|
|
|
3
5
|
export default defineAgent({
|
|
@@ -11,5 +13,6 @@ export default defineAgent({
|
|
|
11
13
|
tools: ["read", "grep", "glob", "ls"],
|
|
12
14
|
local: {
|
|
13
15
|
sandbox: true,
|
|
16
|
+
cwd: join(homedir(), ".cache", "agent-serve", "triage"),
|
|
14
17
|
},
|
|
15
18
|
});
|