@cursor/july 0.1.80 → 0.1.83
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 +0 -12
- package/README.md +2 -2
- package/dist/channels/github/cursor-account.d.ts +11 -0
- package/dist/channels/github/cursor-account.d.ts.map +1 -1
- package/dist/channels/github/cursor-account.js +13 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +29 -1
- package/dist/channels/github/types.d.ts +8 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +32 -10
- package/dist/channels/origin/types.d.ts +7 -0
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/cursor-account.d.ts.map +1 -1
- package/dist/channels/slack/cursor-account.js +2 -2
- package/dist/channels/slack/dispatch.d.ts +3 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +18 -18
- package/dist/channels/slack/interactive.d.ts +2 -0
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +4 -16
- package/dist/channels/slack/slack-channel.d.ts +1 -1
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +21 -10
- package/dist/channels/slack/types.d.ts +7 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +4 -0
- package/dist/continuation.d.ts +20 -0
- package/dist/continuation.d.ts.map +1 -0
- package/dist/continuation.js +18 -0
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.e4_wtjUS.js → app.6THHGRH-.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.D9uScPWb.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DbdzyEie.js → VPLocalSearchBox.BpHB9ulP.js} +1 -1
- package/dist/docs/assets/chunks/{theme.D8HpLrLK.js → theme.DBJvJznv.js} +2 -2
- package/dist/docs/assets/{guides_cloud-runtime.md.V5igN4Sq.js → guides_cloud-runtime.md.CbklWfzh.js} +1 -1
- package/dist/docs/assets/{guides_cloud-runtime.md.V5igN4Sq.lean.js → guides_cloud-runtime.md.CbklWfzh.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.BZnEKfEc.js → reference_agent-config.md.CTWp4DnU.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.B_jHN7JL.js → reference_skills.md.BRF2nDv9.js} +2 -2
- package/dist/docs/assets/{reference_skills.md.B_jHN7JL.lean.js → reference_skills.md.BRF2nDv9.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.KgmmaCgw.js +1 -0
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +3 -3
- 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 +5 -5
- 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 +3 -3
- 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 -5
- 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 +3 -3
- 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 +3 -3
- package/dist/docs/reference/skills.html +5 -5
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +3 -3
- 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/files-backends/cursor-hosted.d.ts +6 -0
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +19 -0
- package/dist/files.d.ts +22 -3
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +22 -3
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/internal/continuation-channel.d.ts +29 -0
- package/dist/internal/continuation-channel.d.ts.map +1 -0
- package/dist/internal/continuation-channel.js +88 -0
- package/dist/internal/continuation-identity.d.ts +95 -0
- package/dist/internal/continuation-identity.d.ts.map +1 -0
- package/dist/internal/continuation-identity.js +445 -0
- package/dist/internal/deploy-manifest.d.ts +12 -2
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +15 -7
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +32 -5
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +6 -9
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +18 -8
- 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 +140 -36
- package/dist/internal/session-store.d.ts.map +1 -1
- package/dist/internal/session-store.js +6 -0
- package/dist/internal/skills-sync.d.ts +27 -0
- package/dist/internal/skills-sync.d.ts.map +1 -0
- package/dist/internal/skills-sync.js +98 -0
- package/dist/playground/assets/{index-DJzcIeGt.css → index-ChETdG-_.css} +1 -1
- package/dist/playground/assets/{index-K3Sxyx0I.js → index-Cspgk9jC.js} +45 -45
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +49 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/guides/cloud-runtime.md +6 -1
- package/docs/reference/agent-config.md +6 -5
- package/docs/reference/skills.md +12 -3
- package/docs/troubleshooting.md +1 -1
- package/package.json +1 -1
- package/skills/framework-map/SKILL.md +2 -1
- package/src/channels/github/cursor-account.ts +20 -0
- package/src/channels/github/github-channel.ts +52 -1
- package/src/channels/github/types.ts +8 -0
- package/src/channels/origin/origin-channel.ts +48 -10
- package/src/channels/origin/types.ts +7 -0
- package/src/channels/slack/cursor-account.ts +1 -0
- package/src/channels/slack/dispatch.ts +44 -2
- package/src/channels/slack/interactive.ts +5 -0
- package/src/channels/slack/slack-channel.ts +23 -2
- package/src/channels/slack/types.ts +7 -0
- package/src/channels.ts +7 -0
- package/src/continuation.ts +49 -0
- package/src/files-backends/cursor-hosted.ts +21 -0
- package/src/files.ts +29 -3
- package/src/index.ts +30 -1
- package/src/internal/continuation-channel.ts +129 -0
- package/src/internal/continuation-identity.ts +597 -0
- package/src/internal/deploy-manifest.ts +36 -3
- package/src/internal/discovery.ts +40 -2
- package/src/internal/sdk-runner.ts +10 -11
- package/src/internal/server.ts +23 -9
- package/src/internal/session-engine.ts +178 -37
- package/src/internal/session-store.ts +6 -0
- package/src/internal/skills-sync.ts +110 -0
- package/src/types.ts +60 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.BGiMJpnL.js +0 -1
- package/dist/docs/assets/troubleshooting.md.DQ-hYuZT.js +0 -1
- /package/dist/docs/assets/{reference_agent-config.md.BZnEKfEc.lean.js → reference_agent-config.md.CTWp4DnU.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.DQ-hYuZT.lean.js → troubleshooting.md.KgmmaCgw.lean.js} +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { getGitHubChannelOptions } from "../channels/github/github-channel.js";
|
|
2
|
+
import { getOriginChannelOptions } from "../channels/origin/origin-channel.js";
|
|
3
|
+
import { getSlackChannelOptions } from "../channels/slack/slack-channel.js";
|
|
4
|
+
import type {
|
|
5
|
+
AgentArchitecture,
|
|
6
|
+
ChannelDefinition,
|
|
7
|
+
HttpChannelDefinition,
|
|
8
|
+
} from "../types.js";
|
|
9
|
+
import {
|
|
10
|
+
type ContinuationIdentity,
|
|
11
|
+
type ContinuationProtocolVersion,
|
|
12
|
+
defaultContinuationSelector,
|
|
13
|
+
handshakeContinuation,
|
|
14
|
+
normalizeIdentity,
|
|
15
|
+
} from "./continuation-identity.js";
|
|
16
|
+
|
|
17
|
+
export function channelContinuationIdentity(
|
|
18
|
+
definition: object | undefined
|
|
19
|
+
): ContinuationIdentity {
|
|
20
|
+
if (definition === undefined) {
|
|
21
|
+
return defaultContinuationSelector();
|
|
22
|
+
}
|
|
23
|
+
const github = getGitHubChannelOptions(definition);
|
|
24
|
+
if (github !== undefined) {
|
|
25
|
+
return normalizeIdentity(github.continuation, "github");
|
|
26
|
+
}
|
|
27
|
+
const slack = getSlackChannelOptions(definition);
|
|
28
|
+
if (slack !== undefined) {
|
|
29
|
+
return normalizeIdentity(slack.continuation, "slack");
|
|
30
|
+
}
|
|
31
|
+
const origin = getOriginChannelOptions(definition);
|
|
32
|
+
if (origin !== undefined) {
|
|
33
|
+
return normalizeIdentity(origin.continuation, "origin");
|
|
34
|
+
}
|
|
35
|
+
return defaultContinuationSelector();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function httpContinuationIdentity(
|
|
39
|
+
httpChannel: HttpChannelDefinition | undefined
|
|
40
|
+
): ContinuationIdentity {
|
|
41
|
+
return normalizeIdentity(httpChannel?.continuation, "http");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Stamp `/v2` continuation defaults onto channel constructors that omitted
|
|
46
|
+
* `continuation` when the agent deploys onto v2 architecture. GitHub/Origin
|
|
47
|
+
* type (`pr` / `issue` / `none`) follows declared webhook events. Explicit
|
|
48
|
+
* per-channel selectors are left alone. Idempotent.
|
|
49
|
+
*/
|
|
50
|
+
export function applyAgentContinuationDefaults(project: {
|
|
51
|
+
agent: { architecture?: AgentArchitecture };
|
|
52
|
+
channels: ReadonlyArray<{ definition: object }>;
|
|
53
|
+
httpChannel: HttpChannelDefinition;
|
|
54
|
+
}): void {
|
|
55
|
+
if (project.agent.architecture !== "v2") {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
for (const channel of project.channels) {
|
|
59
|
+
stampOmittedChannelContinuation(channel.definition, "v2");
|
|
60
|
+
}
|
|
61
|
+
if (project.httpChannel.continuation === undefined) {
|
|
62
|
+
project.httpChannel.continuation = defaultContinuationSelector(
|
|
63
|
+
"http",
|
|
64
|
+
"v2"
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function stampOmittedChannelContinuation(
|
|
70
|
+
definition: object,
|
|
71
|
+
version: ContinuationProtocolVersion
|
|
72
|
+
): void {
|
|
73
|
+
const events = declaredChannelEventTypes(definition);
|
|
74
|
+
const github = getGitHubChannelOptions(definition);
|
|
75
|
+
if (github !== undefined) {
|
|
76
|
+
if (github.continuation === undefined) {
|
|
77
|
+
github.continuation = defaultContinuationSelector(
|
|
78
|
+
"github",
|
|
79
|
+
version,
|
|
80
|
+
events
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const slack = getSlackChannelOptions(definition);
|
|
86
|
+
if (slack !== undefined) {
|
|
87
|
+
if (slack.continuation === undefined) {
|
|
88
|
+
slack.continuation = defaultContinuationSelector("slack", version);
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const origin = getOriginChannelOptions(definition);
|
|
93
|
+
if (origin !== undefined) {
|
|
94
|
+
if (origin.continuation === undefined) {
|
|
95
|
+
origin.continuation = defaultContinuationSelector(
|
|
96
|
+
"origin",
|
|
97
|
+
version,
|
|
98
|
+
events
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function declaredChannelEventTypes(
|
|
105
|
+
definition: object
|
|
106
|
+
): readonly string[] | undefined {
|
|
107
|
+
const meta = (definition as ChannelDefinition).meta;
|
|
108
|
+
return meta?.githubWebhookEvents ?? meta?.originWebhookEvents;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function handshakeChannelContinuation(input: {
|
|
112
|
+
id: string;
|
|
113
|
+
definition: ChannelDefinition;
|
|
114
|
+
}): { ok: true } | { ok: false; error: string } {
|
|
115
|
+
const kind = input.definition.meta?.kind;
|
|
116
|
+
const eventTypes = [
|
|
117
|
+
...(input.definition.meta?.githubWebhookEvents ?? []),
|
|
118
|
+
...(input.definition.meta?.originWebhookEvents ?? []),
|
|
119
|
+
];
|
|
120
|
+
const result = handshakeContinuation({
|
|
121
|
+
kind,
|
|
122
|
+
eventTypes,
|
|
123
|
+
identity: channelContinuationIdentity(input.definition),
|
|
124
|
+
});
|
|
125
|
+
if (!result.ok) {
|
|
126
|
+
return { ok: false, error: `channel ${input.id}: ${result.error}` };
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
}
|