@cursor/july 0.1.10 → 0.1.11
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 +1 -0
- package/dist/bin/agent-serve.js +17 -3
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +2 -1
- package/dist/channels/github/types.d.ts +4 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/slack/cursor-account.d.ts.map +1 -1
- package/dist/channels/slack/cursor-account.js +1 -1
- package/dist/channels/slack/dispatch.d.ts +13 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +36 -11
- package/dist/channels/slack/eval-directive.d.ts +63 -0
- package/dist/channels/slack/eval-directive.d.ts.map +1 -0
- package/dist/channels/slack/eval-directive.js +283 -0
- package/dist/channels/slack/index.d.ts +1 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +1 -0
- package/dist/channels/slack/post-update-delivery.js +318 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +4 -2
- package/dist/channels/slack/types.d.ts +7 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/connections.d.ts +10 -5
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +10 -5
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.CY2buaEE.js → app.BcXUGca7.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BIbvK8M1.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.Ix954SFJ.js → VPLocalSearchBox.CWur6XGZ.js} +1 -1
- package/dist/docs/assets/chunks/{theme.PDwuJbyi.js → theme.BnvulOX2.js} +2 -2
- package/dist/docs/assets/{deployment.md.DC5-ImcM.js → deployment.md.TecHo0_2.js} +3 -3
- package/dist/docs/assets/{deployment.md.DC5-ImcM.lean.js → deployment.md.TecHo0_2.lean.js} +1 -1
- package/dist/docs/assets/guides_mcp-oauth.md.DqmEOQY1.js +29 -0
- package/dist/docs/assets/guides_mcp-oauth.md.DqmEOQY1.lean.js +1 -0
- package/dist/docs/assets/{index.md.COiu-1jL.js → index.md.t0TM2Qzz.js} +3 -3
- package/dist/docs/assets/{index.md.COiu-1jL.lean.js → index.md.t0TM2Qzz.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.CjfiV2Q-.js → reference_cli.md.B74NrVzb.js} +3 -3
- package/dist/docs/assets/{reference_cli.md.CjfiV2Q-.lean.js → reference_cli.md.B74NrVzb.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.FbWupyzW.js → reference_connections.md.CsSr3rDz.js} +8 -3
- package/dist/docs/assets/{reference_connections.md.FbWupyzW.lean.js → reference_connections.md.CsSr3rDz.lean.js} +1 -1
- package/dist/docs/assets/reference_prompt.md.BaiweQxE.js +1 -0
- package/dist/docs/assets/reference_prompt.md.BaiweQxE.lean.js +1 -0
- package/dist/docs/assets/{reference_tools.md.CqgJroI0.js → reference_tools.md.BRSDnTbN.js} +16 -3
- package/dist/docs/assets/{reference_tools.md.CqgJroI0.lean.js → reference_tools.md.BRSDnTbN.lean.js} +1 -1
- package/dist/docs/assets/{troubleshooting.md.DkovjS7h.js → troubleshooting.md.CmQkmnzC.js} +1 -1
- package/dist/docs/assets/{troubleshooting.md.DkovjS7h.lean.js → troubleshooting.md.CmQkmnzC.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +7 -7
- package/dist/docs/evals.html +4 -4
- package/dist/docs/example-agents/approval-buddy.html +4 -4
- package/dist/docs/example-agents/benny.html +4 -4
- package/dist/docs/example-agents/bugbot.html +4 -4
- package/dist/docs/example-agents/codebase-wiki.html +4 -4
- package/dist/docs/example-agents/codeowners-review.html +4 -4
- package/dist/docs/example-agents/concierge.html +4 -4
- package/dist/docs/example-agents/fsd.html +4 -4
- package/dist/docs/example-agents/index.html +4 -4
- package/dist/docs/example-agents/knowledge-base.html +4 -4
- package/dist/docs/example-agents/oncall.html +4 -4
- package/dist/docs/example-agents/security-reviewer.html +4 -4
- package/dist/docs/example-agents/slack-agent.html +4 -4
- package/dist/docs/example-agents/weather-agent.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +4 -4
- 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 +53 -0
- 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/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +6 -6
- package/dist/docs/reference/connections.html +12 -7
- 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 +33 -0
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +5 -5
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +20 -7
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/evals.d.ts +39 -0
- package/dist/evals.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/internal/cli-mcp-oauth.d.ts +16 -0
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -0
- package/dist/internal/cli-mcp-oauth.js +194 -0
- package/dist/internal/cli-mcp.d.ts +4 -1
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +19 -1
- package/dist/internal/corp-ca.d.ts +9 -0
- package/dist/internal/corp-ca.d.ts.map +1 -0
- package/dist/internal/corp-ca.js +44 -0
- package/dist/internal/cursor/account-mcp.d.ts +17 -4
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +105 -17
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +64 -10
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +1 -0
- package/dist/internal/json-dir-store.js +100 -0
- package/dist/internal/logs-client.js +1 -1
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +49 -26
- package/dist/internal/mcp-oauth.d.ts +88 -0
- package/dist/internal/mcp-oauth.d.ts.map +1 -0
- package/dist/internal/mcp-oauth.js +385 -0
- package/dist/internal/resolved-connections.d.ts.map +1 -1
- package/dist/internal/resolved-connections.js +4 -1
- package/dist/internal/sdk-runner.d.ts +9 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +28 -2
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +13 -5
- package/dist/internal/session-engine.d.ts +7 -9
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +96 -64
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +2 -1
- package/dist/internal/stream-progress.d.ts.map +1 -1
- package/dist/internal/stream-progress.js +8 -4
- package/dist/internal/turn-governor.d.ts +54 -0
- package/dist/internal/turn-governor.d.ts.map +1 -0
- package/dist/internal/turn-governor.js +111 -0
- package/dist/playground/assets/{index-C0-QEG4O.js → index-BIGLubwK.js} +46 -46
- package/dist/playground/assets/{index-z3JY9O2x.css → index-C17ZQKDG.css} +1 -1
- package/dist/playground/index.html +2 -2
- package/dist/prompt.d.ts +39 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +70 -0
- package/dist/types.d.ts +78 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -0
- package/docs/.vitepress/cache/deps/package.json +3 -0
- package/docs/README.md +4 -0
- package/docs/deployment.md +6 -1
- package/docs/guides/mcp-oauth.md +157 -0
- package/docs/reference/cli.md +28 -0
- package/docs/reference/connections.md +28 -0
- package/docs/reference/prompt.md +47 -0
- package/docs/reference/tools.md +21 -0
- package/docs/troubleshooting.md +11 -0
- package/package.json +9 -2
- package/skills/create-agent/SKILL.md +7 -3
- package/skills/framework-map/SKILL.md +1 -0
- package/skills/mcp-auth/SKILL.md +138 -0
- package/src/bin/agent-serve.ts +20 -3
- package/src/channels/github/github-channel.ts +2 -0
- package/src/channels/github/types.ts +4 -0
- package/src/channels/slack/cursor-account.ts +2 -0
- package/src/channels/slack/dispatch.ts +49 -0
- package/src/channels/slack/eval-directive.ts +348 -0
- package/src/channels/slack/index.ts +1 -0
- package/src/channels/slack/slack-channel.ts +3 -0
- package/src/channels/slack/types.ts +7 -0
- package/src/connections.ts +10 -5
- package/src/evals.ts +43 -0
- package/src/index.ts +3 -0
- package/src/internal/cli-mcp-oauth.ts +254 -0
- package/src/internal/cli-mcp.ts +25 -2
- package/src/internal/cursor/account-mcp.ts +153 -41
- package/src/internal/discovery.ts +70 -8
- package/src/internal/distribution.ts +1 -0
- package/src/internal/logs-client.ts +1 -1
- package/src/internal/mcp-host.ts +33 -9
- package/src/internal/mcp-oauth.ts +496 -0
- package/src/internal/resolved-connections.ts +6 -1
- package/src/internal/sdk-runner.ts +37 -1
- package/src/internal/server.ts +13 -5
- package/src/internal/session-engine.ts +115 -74
- package/src/internal/sessions-client.ts +2 -1
- package/src/internal/stream-progress.ts +8 -0
- package/src/internal/turn-governor.ts +145 -0
- package/src/prompt.ts +83 -0
- package/src/types.ts +76 -6
- package/dist/docs/assets/chunks/@localSearchIndexroot.OfDZ5CXg.js +0 -1
- package/dist/internal/persistence-coordinator.d.ts +0 -127
- package/dist/internal/persistence-coordinator.d.ts.map +0 -1
- package/dist/persistence.d.ts +0 -184
- package/dist/persistence.d.ts.map +0 -1
package/src/types.ts
CHANGED
|
@@ -194,8 +194,45 @@ export interface AgentConfig {
|
|
|
194
194
|
* it and sends it with the deployment request. Ignored by local serving.
|
|
195
195
|
*/
|
|
196
196
|
hosting?: AgentHostingOptions;
|
|
197
|
+
/**
|
|
198
|
+
* Engine-wide turn admission limits. See {@link AgentConcurrencyOptions}.
|
|
199
|
+
*/
|
|
200
|
+
concurrency?: AgentConcurrencyOptions;
|
|
197
201
|
}
|
|
198
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Turn admission limits on {@link AgentConfig.concurrency}.
|
|
205
|
+
*
|
|
206
|
+
* ```ts
|
|
207
|
+
* export default defineAgent({
|
|
208
|
+
* // At most 3 sessions run a model turn at once; the rest queue FIFO.
|
|
209
|
+
* concurrency: { maxRunningTurns: 3 },
|
|
210
|
+
* });
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
export interface AgentConcurrencyOptions {
|
|
214
|
+
/**
|
|
215
|
+
* Max model turns running at once across **all** of this agent's
|
|
216
|
+
* sessions. When every slot is busy, newly admitted turns queue FIFO
|
|
217
|
+
* (surfaced as a durable `turn.queued` event and `queued: true` on
|
|
218
|
+
* `GET /v1/sessions`) instead of failing; each queued turn starts as
|
|
219
|
+
* soon as a slot frees. Positive integer, hard-capped at
|
|
220
|
+
* {@link MAX_RUNNING_TURNS_LIMIT}. Omit for unlimited.
|
|
221
|
+
*
|
|
222
|
+
* A queued turn still counts as `running` for busy semantics
|
|
223
|
+
* (follow-ups preempt it; direct tool calls get `SessionBusyError`),
|
|
224
|
+
* and a follow-up that preempts a queued turn re-queues at the back.
|
|
225
|
+
*/
|
|
226
|
+
maxRunningTurns?: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Hard ceiling for {@link AgentConcurrencyOptions.maxRunningTurns}.
|
|
231
|
+
* Matches the eval harness ceiling: each running turn issues model
|
|
232
|
+
* provider requests, so unbounded parallelism is never meaningful.
|
|
233
|
+
*/
|
|
234
|
+
export const MAX_RUNNING_TURNS_LIMIT = 200;
|
|
235
|
+
|
|
199
236
|
/**
|
|
200
237
|
* Managed-hosting block on {@link AgentConfig.hosting}.
|
|
201
238
|
*/
|
|
@@ -367,6 +404,12 @@ export interface HostContext {
|
|
|
367
404
|
* Slack follow-ups coalesce and drain at turn boundaries.
|
|
368
405
|
*/
|
|
369
406
|
slackNudges?: SlackNudgeHostApi;
|
|
407
|
+
/**
|
|
408
|
+
* Playground eval batches (`/v1/dev/evals*`). Present once the serve host
|
|
409
|
+
* has attached an {@link import("./evals.js").HostEvalsApi}. Used by the
|
|
410
|
+
* built-in Slack `eval` directive and available to tools/handlers.
|
|
411
|
+
*/
|
|
412
|
+
evals?: import("./evals.js").HostEvalsApi;
|
|
370
413
|
/**
|
|
371
414
|
* Author-facing durable JSON KV (`agentkit/v1/{agent}/kv/…`). Backed by
|
|
372
415
|
* `agent/storage.ts` (`defineStorage`) when authored; otherwise files
|
|
@@ -531,6 +574,8 @@ export type ConnectionTransport =
|
|
|
531
574
|
type?: "http" | "sse";
|
|
532
575
|
url: string;
|
|
533
576
|
headers?: Record<string, string>;
|
|
577
|
+
/** Host PKCE OAuth; `agentkit mcp oauth <name>`. No Authorization header. */
|
|
578
|
+
oauth?: true;
|
|
534
579
|
}
|
|
535
580
|
| {
|
|
536
581
|
/** Slug of a peer agent mounted on the same serve host. */
|
|
@@ -578,13 +623,18 @@ export function isSymbolicConnectionTransport(
|
|
|
578
623
|
export type ConnectionConfig = ConnectionTransport & {
|
|
579
624
|
/** Documentation only; shown in `info` output. */
|
|
580
625
|
description?: string;
|
|
626
|
+
/**
|
|
627
|
+
* Omit from SDK `mcpServers` (model never sees it). Still available on
|
|
628
|
+
* `host.mcp` for server tools / channel handlers. Does not affect
|
|
629
|
+
* cloud-native account connectors provisioned by the platform.
|
|
630
|
+
*/
|
|
631
|
+
hostOnly?: boolean;
|
|
581
632
|
};
|
|
582
633
|
|
|
583
634
|
/**
|
|
584
|
-
* An MCP connection is
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
* - channel / schedule handlers (`args.host.mcp`)
|
|
635
|
+
* An MCP connection is available to the agent (SDK `mcpServers`), host
|
|
636
|
+
* (`ctx.host.mcp`), and channel/schedule handlers — unless `hostOnly`,
|
|
637
|
+
* which keeps it off the model surface only.
|
|
588
638
|
*/
|
|
589
639
|
export type ConnectionDefinition = ConnectionConfig &
|
|
590
640
|
BrandedDefinition<"connection">;
|
|
@@ -671,6 +721,15 @@ export type SessionEventPayload =
|
|
|
671
721
|
data: { sdkAgentId: string; url?: string };
|
|
672
722
|
}
|
|
673
723
|
| { type: "message.received"; data: { text: string } }
|
|
724
|
+
| {
|
|
725
|
+
/**
|
|
726
|
+
* The turn was admitted while every {@link AgentConcurrencyOptions.maxRunningTurns}
|
|
727
|
+
* slot was busy; it waits FIFO and `turn.started` follows once a slot
|
|
728
|
+
* frees. `position` is 1-based among waiting turns at enqueue time.
|
|
729
|
+
*/
|
|
730
|
+
type: "turn.queued";
|
|
731
|
+
data: { position: number; maxRunningTurns: number };
|
|
732
|
+
}
|
|
674
733
|
| { type: "turn.started"; data: Record<string, never> }
|
|
675
734
|
| { type: "step.started"; data: { stepId: number } }
|
|
676
735
|
| { type: "step.completed"; data: { stepId: number; durationMs: number } }
|
|
@@ -872,8 +931,14 @@ export interface SessionSummary {
|
|
|
872
931
|
mode: SessionMode;
|
|
873
932
|
title?: string;
|
|
874
933
|
turnCount: number;
|
|
875
|
-
/** True while a turn is executing right now. */
|
|
934
|
+
/** True while a turn is executing right now (including queued turns). */
|
|
876
935
|
running: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* True while the session's admitted turn is waiting for a
|
|
938
|
+
* {@link AgentConcurrencyOptions.maxRunningTurns} slot (subset of
|
|
939
|
+
* {@link running}). Omitted when the agent has no turn limit.
|
|
940
|
+
*/
|
|
941
|
+
queued?: boolean;
|
|
877
942
|
createdAt: string;
|
|
878
943
|
updatedAt: string;
|
|
879
944
|
/** `<channelId>:<key>` wire token, or null when not addressable. */
|
|
@@ -1629,6 +1694,7 @@ export interface DiscoveredConnection {
|
|
|
1629
1694
|
name: string;
|
|
1630
1695
|
transport: ConnectionTransport;
|
|
1631
1696
|
description?: string;
|
|
1697
|
+
hostOnly?: boolean;
|
|
1632
1698
|
}
|
|
1633
1699
|
|
|
1634
1700
|
export interface DiscoveredChannel {
|
|
@@ -1683,6 +1749,8 @@ export interface ResolvedAgent {
|
|
|
1683
1749
|
local?: AgentLocalOptions;
|
|
1684
1750
|
/** Managed-hosting declarations from {@link AgentConfig.hosting}. */
|
|
1685
1751
|
hosting?: AgentHostingOptions;
|
|
1752
|
+
/** Validated turn admission limits from {@link AgentConfig.concurrency}. */
|
|
1753
|
+
concurrency?: AgentConcurrencyOptions;
|
|
1686
1754
|
tools: DiscoveredTool[];
|
|
1687
1755
|
skills: DiscoveredSkill[];
|
|
1688
1756
|
connections: DiscoveredConnection[];
|
|
@@ -1734,6 +1802,8 @@ export interface AgentProjectInfo {
|
|
|
1734
1802
|
local?: { cwd?: string };
|
|
1735
1803
|
/** Managed-hosting declarations when authored (egress allowlist, expected secrets). */
|
|
1736
1804
|
hosting?: { egressDomains?: string[]; secretNames?: string[] };
|
|
1805
|
+
/** Turn admission limits when authored (`concurrency` on `agent.ts`). */
|
|
1806
|
+
concurrency?: { maxRunningTurns?: number };
|
|
1737
1807
|
/**
|
|
1738
1808
|
* The agent's own MCP surface (mounted at `<base>/v1/mcp`): other agents
|
|
1739
1809
|
* and MCP clients delegate to this agent through these tools.
|
|
@@ -1748,7 +1818,7 @@ export interface AgentProjectInfo {
|
|
|
1748
1818
|
inputSchema: JsonSchemaObject;
|
|
1749
1819
|
}>;
|
|
1750
1820
|
skills: Array<{ name: string; description: string }>;
|
|
1751
|
-
connections: Array<{ name: string; transport: string }>;
|
|
1821
|
+
connections: Array<{ name: string; transport: string; hostOnly?: boolean }>;
|
|
1752
1822
|
subagents: Array<{
|
|
1753
1823
|
name: string;
|
|
1754
1824
|
description?: string;
|