@cursor/july 0.1.15 → 0.1.17
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/README.md +9 -4
- package/dist/bin/agent-serve.js +60 -2
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +13 -3
- package/dist/channels/slack/auth.d.ts +7 -1
- package/dist/channels/slack/auth.d.ts.map +1 -1
- package/dist/channels/slack/auth.js +14 -0
- package/dist/channels/slack/blocks.d.ts +61 -0
- package/dist/channels/slack/blocks.d.ts.map +1 -0
- package/dist/channels/slack/blocks.js +90 -0
- package/dist/channels/slack/defaults.d.ts +2 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +29 -3
- package/dist/channels/slack/dispatch.d.ts +3 -17
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- 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/interactive.d.ts +39 -3
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +152 -7
- package/dist/channels/slack/manifest.d.ts +3 -0
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +3 -0
- package/dist/channels/slack/setup.d.ts +4 -1
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +16 -2
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +24 -3
- package/dist/channels/slack/types.d.ts +77 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/connections.d.ts +4 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +4 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.DpdGZTLe.js → app.BbEXr2KO.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DCBsrfwP.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.IB-0QqIT.js → VPLocalSearchBox.DBEi4HDp.js} +1 -1
- package/dist/docs/assets/chunks/{theme.-fYBoNtR.js → theme.DGfptcHw.js} +2 -2
- package/dist/docs/assets/{example-agents_index.md.BPXjUtRB.js → example-agents_index.md.D2PEVSXl.js} +2 -2
- package/dist/docs/assets/{example-agents_index.md.BPXjUtRB.lean.js → example-agents_index.md.D2PEVSXl.lean.js} +1 -1
- package/dist/docs/assets/example-agents_security-reviewer.md.BZSNycMf.js +19 -0
- package/dist/docs/assets/{example-agents_security-reviewer.md.CE9v-aKm.lean.js → example-agents_security-reviewer.md.BZSNycMf.lean.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.DqmEOQY1.js → guides_mcp-oauth.md.Dd8EgSem.js} +3 -2
- package/dist/docs/assets/{guides_mcp-oauth.md.DqmEOQY1.lean.js → guides_mcp-oauth.md.Dd8EgSem.lean.js} +1 -1
- package/dist/docs/assets/{guides_slack.md.FWale6Ip.js → guides_slack.md.D_xFKlnF.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.CsSr3rDz.js → reference_connections.md.B9Q3TOve.js} +12 -5
- package/dist/docs/assets/{reference_connections.md.CsSr3rDz.lean.js → reference_connections.md.B9Q3TOve.lean.js} +1 -1
- 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 +5 -5
- 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 +14 -14
- 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/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +3 -3
- package/dist/docs/guides/mcp-oauth.html +6 -5
- package/dist/docs/guides/slack.html +5 -5
- 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 +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +3 -3
- package/dist/docs/reference/connections.html +14 -7
- 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 +3 -3
- 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/troubleshooting.html +3 -3
- package/dist/evals/assertions.d.ts +190 -0
- package/dist/evals/assertions.d.ts.map +1 -0
- package/dist/evals/assertions.js +461 -0
- package/dist/evals/expect.d.ts +95 -0
- package/dist/evals/expect.d.ts.map +1 -0
- package/dist/evals/expect.js +194 -0
- package/dist/evals/judge.d.ts +133 -0
- package/dist/evals/judge.d.ts.map +1 -0
- package/dist/evals/judge.js +228 -0
- package/dist/evals/loaders.d.ts +51 -0
- package/dist/evals/loaders.d.ts.map +1 -0
- package/dist/evals/loaders.js +124 -0
- package/dist/evals/matchers.d.ts +95 -0
- package/dist/evals/matchers.d.ts.map +1 -0
- package/dist/evals/matchers.js +145 -0
- package/dist/evals/reporters.d.ts +70 -0
- package/dist/evals/reporters.d.ts.map +1 -0
- package/dist/evals/reporters.js +221 -0
- package/dist/evals/results.d.ts +103 -0
- package/dist/evals/results.d.ts.map +1 -0
- package/dist/evals/results.js +28 -0
- package/dist/evals/run-facts.d.ts +77 -0
- package/dist/evals/run-facts.d.ts.map +1 -0
- package/dist/evals/run-facts.js +187 -0
- package/dist/evals.d.ts +136 -31
- package/dist/evals.d.ts.map +1 -1
- package/dist/evals.js +76 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/cli-ax.d.ts +27 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +90 -12
- package/dist/internal/cli-mcp.d.ts +8 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +98 -0
- package/dist/internal/cli-slack.d.ts +29 -1
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +777 -12
- package/dist/internal/deploy-client.d.ts +7 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +9 -0
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +29 -9
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +2 -0
- package/dist/internal/eval-judge-model.d.ts +59 -0
- package/dist/internal/eval-judge-model.d.ts.map +1 -0
- package/dist/internal/eval-judge-model.js +131 -0
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +12 -20
- package/dist/internal/eval-runner.d.ts +31 -25
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +332 -128
- package/dist/internal/evals-client.d.ts.map +1 -1
- package/dist/internal/evals-client.js +7 -3
- package/dist/internal/local-env.d.ts +8 -0
- package/dist/internal/local-env.d.ts.map +1 -0
- package/dist/internal/local-env.js +47 -0
- package/dist/internal/playground/static.d.ts +3 -0
- package/dist/internal/playground/static.d.ts.map +1 -1
- package/dist/internal/playground/static.js +3 -0
- package/dist/internal/run-client.d.ts +15 -0
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +3 -2
- package/dist/internal/sdk-runner.d.ts +36 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +65 -25
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +10 -1
- package/dist/internal/session-engine.d.ts +18 -5
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +72 -19
- package/dist/internal/slack-provision-client.d.ts +130 -0
- package/dist/internal/slack-provision-client.d.ts.map +1 -0
- package/dist/internal/slack-provision-client.js +284 -0
- package/dist/playground/assets/cursor-icons-16-f_W_ogc-.woff2 +0 -0
- package/dist/playground/assets/index-CidizGZv.css +1 -0
- package/dist/playground/assets/index-DNqirsrK.js +85 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +70 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +26 -0
- package/docs/example-agents/index.md +1 -1
- package/docs/example-agents/security-reviewer.md +23 -21
- package/docs/guides/mcp-oauth.md +10 -5
- package/docs/guides/slack.md +3 -2
- package/docs/reference/connections.md +28 -18
- package/package.json +20 -2
- package/skills/create-agent/SKILL.md +15 -7
- package/skills/debug/SKILL.md +3 -1
- package/skills/mcp-auth/SKILL.md +1 -1
- package/skills/setup-slack/SKILL.md +173 -11
- package/src/bin/agent-serve.ts +63 -2
- package/src/channels/slack/api.ts +16 -3
- package/src/channels/slack/auth.ts +16 -1
- package/src/channels/slack/blocks.ts +139 -0
- package/src/channels/slack/defaults.ts +32 -4
- package/src/channels/slack/dispatch.ts +3 -18
- package/src/channels/slack/index.ts +1 -0
- package/src/channels/slack/interactive.ts +183 -19
- package/src/channels/slack/manifest.ts +3 -0
- package/src/channels/slack/setup.ts +16 -2
- package/src/channels/slack/slack-channel.ts +37 -6
- package/src/channels/slack/types.ts +89 -0
- package/src/connections.ts +4 -1
- package/src/evals/assertions.ts +704 -0
- package/src/evals/expect.ts +272 -0
- package/src/evals/judge.ts +346 -0
- package/src/evals/loaders.ts +113 -0
- package/src/evals/matchers.ts +246 -0
- package/src/evals/reporters.ts +274 -0
- package/src/evals/results.ts +132 -0
- package/src/evals/run-facts.ts +274 -0
- package/src/evals.ts +249 -42
- package/src/index.ts +2 -0
- package/src/internal/cli-ax.ts +134 -15
- package/src/internal/cli-mcp.ts +118 -5
- package/src/internal/cli-slack.ts +993 -15
- package/src/internal/deploy-client.ts +10 -0
- package/src/internal/discovery.ts +31 -5
- package/src/internal/distribution.ts +2 -0
- package/src/internal/eval-judge-model.ts +148 -0
- package/src/internal/eval-run-store.ts +10 -14
- package/src/internal/eval-runner.ts +466 -215
- package/src/internal/evals-client.ts +14 -2
- package/src/internal/local-env.ts +53 -0
- package/src/internal/playground/static.ts +3 -0
- package/src/internal/run-client.ts +17 -1
- package/src/internal/sdk-runner.ts +103 -22
- package/src/internal/server.ts +10 -0
- package/src/internal/session-engine.ts +89 -21
- package/src/internal/slack-provision-client.ts +438 -0
- package/src/types.ts +92 -4
- package/dist/channels/slack/post-update-delivery.d.ts +0 -85
- package/dist/channels/slack/post-update-delivery.d.ts.map +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.D2d8CfFS.js +0 -1
- package/dist/docs/assets/example-agents_security-reviewer.md.CE9v-aKm.js +0 -19
- package/dist/internal/json-dir-store.d.ts +0 -32
- package/dist/internal/json-dir-store.d.ts.map +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/dist/playground/assets/cursor-icons-16-CQ50JpfO.woff2 +0 -0
- package/dist/playground/assets/index-BVMOoiek.js +0 -86
- package/dist/playground/assets/index-DYmP4b--.css +0 -1
- /package/dist/docs/assets/{guides_slack.md.FWale6Ip.lean.js → guides_slack.md.D_xFKlnF.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/interactive.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/interactive.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,aAAa,EACd,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC1C,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClE,eAAe,EAAE,CACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,WAAW,GAAG,IAAI,KACrB,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC/C,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,4BAA4B,GACjC,OAAO,CAAC,OAAO,CAAC,CAyFlB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,GACf,gBAAgB,GAAG,IAAI,CAuFzB;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,OAAO,CAAC,CAqBnB;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E,OAAO,EAAE,uBAAuB,CAAC;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC1C,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAwBD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,4BAA4B,GACjC,OAAO,CAAC,OAAO,CAAC,CA+ClB"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Socket Mode interactive payloads (Block Kit
|
|
2
|
+
* Socket Mode interactive payloads (Block Kit clicks).
|
|
3
|
+
*
|
|
4
|
+
* Built-in tool-approval Approve/Deny actions resolve parked calls
|
|
5
|
+
* ({@link dispatchInteractiveFromPayload}); everything else can be routed
|
|
6
|
+
* to an author handler ({@link dispatchBlockAction} via
|
|
7
|
+
* `slackChannel({ onBlockAction })`).
|
|
3
8
|
*/
|
|
4
9
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
10
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -10,8 +15,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
15
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
16
|
});
|
|
12
17
|
};
|
|
18
|
+
import { updateMessage } from "./api.js";
|
|
13
19
|
import { decisionFromActionId, parseApprovalActionValue } from "./approvals.js";
|
|
14
20
|
import { buildSlackInteractiveApprovalAuth } from "./auth.js";
|
|
21
|
+
import { dispatchInboundMessage } from "./dispatch.js";
|
|
15
22
|
import { defaultSlackLog } from "./log.js";
|
|
16
23
|
/**
|
|
17
24
|
* Handle a Socket Mode `interactive` body. Returns true when this was
|
|
@@ -22,7 +29,7 @@ export function dispatchInteractiveFromPayload(payload, deps) {
|
|
|
22
29
|
var _a;
|
|
23
30
|
var _b, _c, _d, _e;
|
|
24
31
|
const log = (_b = deps.log) !== null && _b !== void 0 ? _b : defaultSlackLog;
|
|
25
|
-
const parsed =
|
|
32
|
+
const parsed = parseSlackBlockAction(payload);
|
|
26
33
|
if (parsed === null) {
|
|
27
34
|
return false;
|
|
28
35
|
}
|
|
@@ -90,7 +97,12 @@ export function dispatchInteractiveFromPayload(payload, deps) {
|
|
|
90
97
|
return true;
|
|
91
98
|
});
|
|
92
99
|
}
|
|
93
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Parse a Socket Mode `block_actions` payload into a {@link SlackBlockAction}.
|
|
102
|
+
* Returns null for non-`block_actions` payloads (view submissions, shortcuts)
|
|
103
|
+
* and malformed bodies.
|
|
104
|
+
*/
|
|
105
|
+
export function parseSlackBlockAction(payload) {
|
|
94
106
|
if (typeof payload !== "object" || payload === null) {
|
|
95
107
|
return null;
|
|
96
108
|
}
|
|
@@ -107,8 +119,7 @@ function parseBlockActionsPayload(payload) {
|
|
|
107
119
|
return null;
|
|
108
120
|
}
|
|
109
121
|
const action = first;
|
|
110
|
-
if (typeof action.action_id !== "string"
|
|
111
|
-
typeof action.value !== "string") {
|
|
122
|
+
if (typeof action.action_id !== "string") {
|
|
112
123
|
return null;
|
|
113
124
|
}
|
|
114
125
|
const channel = typeof record.channel === "object" && record.channel !== null
|
|
@@ -120,6 +131,9 @@ function parseBlockActionsPayload(payload) {
|
|
|
120
131
|
const user = typeof record.user === "object" && record.user !== null
|
|
121
132
|
? record.user
|
|
122
133
|
: {};
|
|
134
|
+
const team = typeof record.team === "object" && record.team !== null
|
|
135
|
+
? record.team
|
|
136
|
+
: {};
|
|
123
137
|
const channelId = typeof channel.id === "string" ? channel.id : "";
|
|
124
138
|
const messageTs = typeof message.ts === "string" ? message.ts : "";
|
|
125
139
|
const threadTs = typeof message.thread_ts === "string"
|
|
@@ -131,12 +145,143 @@ function parseBlockActionsPayload(payload) {
|
|
|
131
145
|
? record.container.thread_ts
|
|
132
146
|
: messageTs;
|
|
133
147
|
const userId = typeof user.id === "string" ? user.id : "";
|
|
148
|
+
const userName = typeof user.username === "string"
|
|
149
|
+
? user.username
|
|
150
|
+
: typeof user.name === "string"
|
|
151
|
+
? user.name
|
|
152
|
+
: undefined;
|
|
153
|
+
const teamId = typeof team.id === "string"
|
|
154
|
+
? team.id
|
|
155
|
+
: typeof user.team_id === "string"
|
|
156
|
+
? user.team_id
|
|
157
|
+
: undefined;
|
|
158
|
+
const label = typeof action.text === "object" &&
|
|
159
|
+
action.text !== null &&
|
|
160
|
+
typeof action.text.text === "string"
|
|
161
|
+
? action.text.text
|
|
162
|
+
: undefined;
|
|
163
|
+
const actionTs = typeof action.action_ts === "string" ? action.action_ts : "";
|
|
164
|
+
const messageBlocks = Array.isArray(message.blocks)
|
|
165
|
+
? message.blocks
|
|
166
|
+
: undefined;
|
|
134
167
|
return {
|
|
135
168
|
actionId: action.action_id,
|
|
136
|
-
|
|
169
|
+
blockId: typeof action.block_id === "string" ? action.block_id : "",
|
|
170
|
+
value: typeof action.value === "string" ? action.value : "",
|
|
171
|
+
label,
|
|
137
172
|
channelId,
|
|
138
173
|
threadTs,
|
|
139
|
-
userId,
|
|
140
174
|
messageTs,
|
|
175
|
+
messageBlocks,
|
|
176
|
+
userId,
|
|
177
|
+
userName,
|
|
178
|
+
teamId,
|
|
179
|
+
actionTs,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Swap the clicked message's actions row for a context note (`chat.update`).
|
|
184
|
+
* Strips only the row the click came from (`action.blockId`); every other
|
|
185
|
+
* block survives. Soft: false when the payload carried no message blocks or
|
|
186
|
+
* the update failed — callers treat the dispatched turn as the durable
|
|
187
|
+
* record and the card as best-effort UI.
|
|
188
|
+
*/
|
|
189
|
+
export function resolveBlockActionCard(args) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
const { action, note } = args;
|
|
192
|
+
if (action.messageBlocks === undefined) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
const clicked = (block) => typeof block === "object" &&
|
|
196
|
+
block !== null &&
|
|
197
|
+
block.type === "actions" &&
|
|
198
|
+
block.block_id === action.blockId;
|
|
199
|
+
const result = yield updateMessage({
|
|
200
|
+
botToken: args.botToken,
|
|
201
|
+
channel: action.channelId,
|
|
202
|
+
ts: action.messageTs,
|
|
203
|
+
text: note,
|
|
204
|
+
blocks: [
|
|
205
|
+
...action.messageBlocks.filter((block) => !clicked(block)),
|
|
206
|
+
{ type: "context", elements: [{ type: "mrkdwn", text: note }] },
|
|
207
|
+
],
|
|
208
|
+
});
|
|
209
|
+
return result.ok;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The click as an inbound-message stand-in: the synthetic ts is the click's
|
|
214
|
+
* `action_ts` (unique per click, never a real thread message), so ask-dedupe
|
|
215
|
+
* claims and `<slack_thread>` exclusions stay per-click.
|
|
216
|
+
*/
|
|
217
|
+
function blockActionAsMessage(action) {
|
|
218
|
+
var _a;
|
|
219
|
+
const text = `[clicked: ${(_a = action.label) !== null && _a !== void 0 ? _a : action.actionId}]`;
|
|
220
|
+
return {
|
|
221
|
+
text,
|
|
222
|
+
markdown: text,
|
|
223
|
+
ts: action.actionTs,
|
|
224
|
+
threadTs: action.threadTs,
|
|
225
|
+
channelId: action.channelId,
|
|
226
|
+
teamId: action.teamId,
|
|
227
|
+
author: {
|
|
228
|
+
userId: action.userId,
|
|
229
|
+
userName: action.userName,
|
|
230
|
+
isBot: false,
|
|
231
|
+
},
|
|
141
232
|
};
|
|
142
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Route a non-approval `block_actions` payload to the author handler and
|
|
236
|
+
* dispatch its decision as a turn on the click's thread. Returns true when
|
|
237
|
+
* the payload was a block action (dispatched or deliberately skipped).
|
|
238
|
+
*/
|
|
239
|
+
export function dispatchBlockAction(payload, deps) {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
var _a;
|
|
242
|
+
const log = (_a = deps.log) !== null && _a !== void 0 ? _a : defaultSlackLog;
|
|
243
|
+
const action = parseSlackBlockAction(payload);
|
|
244
|
+
if (action === null) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
if (action.channelId === "" || action.threadTs === "") {
|
|
248
|
+
log.warn("block action skipped (no conversation)", {
|
|
249
|
+
action_id: action.actionId,
|
|
250
|
+
user: action.userId,
|
|
251
|
+
});
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
// Slack stamps every real click; without one the synthetic message ts
|
|
255
|
+
// would alias another click's dedupe claim.
|
|
256
|
+
if (action.actionTs === "") {
|
|
257
|
+
log.warn("block action skipped (no action_ts)", {
|
|
258
|
+
action_id: action.actionId,
|
|
259
|
+
user: action.userId,
|
|
260
|
+
});
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
log.info("block action", {
|
|
264
|
+
action_id: action.actionId,
|
|
265
|
+
channel: action.channelId,
|
|
266
|
+
thread_ts: action.threadTs,
|
|
267
|
+
message_ts: action.messageTs,
|
|
268
|
+
user: action.userId,
|
|
269
|
+
});
|
|
270
|
+
yield dispatchInboundMessage({
|
|
271
|
+
kind: "block_action",
|
|
272
|
+
message: blockActionAsMessage(action),
|
|
273
|
+
handler: (ctx) => deps.handler(ctx, action),
|
|
274
|
+
send: deps.send,
|
|
275
|
+
credentials: deps.credentials,
|
|
276
|
+
host: deps.host,
|
|
277
|
+
log,
|
|
278
|
+
// Click text is synthetic — never treat it as a stop/eval directive.
|
|
279
|
+
evalCommandsEnabled: false,
|
|
280
|
+
hasContinuationSession: deps.hasContinuationSession,
|
|
281
|
+
isContinuationBusy: deps.isContinuationBusy,
|
|
282
|
+
getContinuationLastBotMessageTs: deps.getContinuationLastBotMessageTs,
|
|
283
|
+
interruptContinuation: deps.interruptContinuation,
|
|
284
|
+
});
|
|
285
|
+
return true;
|
|
286
|
+
});
|
|
287
|
+
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Import at https://api.slack.com/apps -> Create New App -> From a manifest.
|
|
5
5
|
* Always Socket Mode — no Events Request URL.
|
|
6
|
+
*
|
|
7
|
+
* Mirrored by backend/server/src/agentServe/agentServeSlackManifest.ts (the
|
|
8
|
+
* backend cannot import this published package); keep the twins in lockstep.
|
|
6
9
|
*/
|
|
7
10
|
import type { SlackManifestOptions } from "./types.js";
|
|
8
11
|
export interface SlackAppManifest {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/manifest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB,EAAE;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,YAAY,EAAE,MAAM,CAAC;YACrB,aAAa,EAAE,OAAO,CAAC;SACxB,CAAC;QACF,cAAc,CAAC,EAAE;YACf,qBAAqB,EAAE,MAAM,CAAC;YAC9B,iBAAiB,EAAE,KAAK,CAAC;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;SAC9D,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,gBAAgB,EAAE,OAAO,CAAC;YAC1B,oBAAoB,EAAE,OAAO,CAAC;YAC9B,8BAA8B,EAAE,OAAO,CAAC;SACzC,CAAC;KACH,CAAC;IACF,YAAY,EAAE;QACZ,MAAM,EAAE;YACN,GAAG,EAAE,MAAM,EAAE,CAAC;SACf,CAAC;KACH,CAAC;IACF,QAAQ,EAAE;QACR,mBAAmB,EAAE;YACnB,UAAU,EAAE,MAAM,EAAE,CAAC;SACtB,CAAC;QACF,aAAa,EAAE;YACb,UAAU,EAAE,OAAO,CAAC;SACrB,CAAC;QACF,kBAAkB,EAAE,OAAO,CAAC;QAC5B,mBAAmB,EAAE,OAAO,CAAC;QAC7B,sBAAsB,EAAE,OAAO,CAAC;QAChC,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AA4CD;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,oBAAoB,GAC5B,gBAAgB,CA0ElB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,GACzC;IACD,GAAG,EAAE,gBAAgB,CAAC;IACtB,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAKA"}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Import at https://api.slack.com/apps -> Create New App -> From a manifest.
|
|
5
5
|
* Always Socket Mode — no Events Request URL.
|
|
6
|
+
*
|
|
7
|
+
* Mirrored by backend/server/src/agentServe/agentServeSlackManifest.ts (the
|
|
8
|
+
* backend cannot import this published package); keep the twins in lockstep.
|
|
6
9
|
*/
|
|
7
10
|
const BOT_SCOPES = [
|
|
8
11
|
"app_mentions:read",
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Slack setup guide printed by `agent-serve slack setup`.
|
|
3
3
|
*
|
|
4
|
-
* Mirrors the Cursor skill at skills/setup-slack/SKILL.md
|
|
4
|
+
* Mirrors the Cursor skill at skills/setup-slack/SKILL.md: connection
|
|
5
|
+
* decision first (Cursor-hosted vs dedicated Socket Mode app), then the
|
|
6
|
+
* dedicated-app phases. {@link SLACK_SETUP_PHASES} stays the dedicated-app
|
|
7
|
+
* checklist — its ids key `.agent-serve/slack/setup-status.json`.
|
|
5
8
|
*/
|
|
6
9
|
export interface SlackSetupPhase {
|
|
7
10
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/setup.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,EA4D/C,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,MAAM,CAgC9C"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Slack setup guide printed by `agent-serve slack setup`.
|
|
3
3
|
*
|
|
4
|
-
* Mirrors the Cursor skill at skills/setup-slack/SKILL.md
|
|
4
|
+
* Mirrors the Cursor skill at skills/setup-slack/SKILL.md: connection
|
|
5
|
+
* decision first (Cursor-hosted vs dedicated Socket Mode app), then the
|
|
6
|
+
* dedicated-app phases. {@link SLACK_SETUP_PHASES} stays the dedicated-app
|
|
7
|
+
* checklist — its ids key `.agent-serve/slack/setup-status.json`.
|
|
5
8
|
*/
|
|
6
9
|
export const SLACK_SETUP_PHASES = [
|
|
7
10
|
{
|
|
@@ -66,8 +69,19 @@ export const SLACK_SETUP_PHASES = [
|
|
|
66
69
|
];
|
|
67
70
|
export function formatSlackSetupGuide() {
|
|
68
71
|
const lines = [
|
|
69
|
-
"agent-serve — Slack setup
|
|
72
|
+
"agent-serve — Slack setup",
|
|
70
73
|
"",
|
|
74
|
+
"Two connections exist; decide before running the phases below.",
|
|
75
|
+
"",
|
|
76
|
+
" A) Cursor-hosted connection (recommended default, zero Slack admin):",
|
|
77
|
+
' slackChannel({ cursorAccount: true, agentName: "MyAgent" })',
|
|
78
|
+
" Sign in (agent-serve login / CURSOR_API_KEY), serve, then mention",
|
|
79
|
+
' "@Cursor MyAgent ..." in the linked workspace. No app, no tokens.',
|
|
80
|
+
" B) Dedicated Slack app (Socket Mode) — the phases below. Choose it",
|
|
81
|
+
" when you need your own bot user, channel watching",
|
|
82
|
+
" (engagement.channelPosts), or approval buttons / interactivity.",
|
|
83
|
+
"",
|
|
84
|
+
"Phases 0-5 cover connection B only.",
|
|
71
85
|
"Goal: importable dev + prod Slack apps over Socket Mode (no public URL).",
|
|
72
86
|
"App-Level Token (xapp-...) + Bot Token (xoxb-...) required.",
|
|
73
87
|
"",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/slack-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EACV,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"slack-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/slack-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EACV,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;AAyCxB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,EAC7D,OAAO,GAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,GAAG;IAChD,SAAS,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;CACnC,GACL,iBAAiB,CAAC,iBAAiB,CAAC,CAoatC"}
|
|
@@ -23,7 +23,7 @@ import { createPendingSlackApiTransport, registerSlackCursorAccountRuntime, } fr
|
|
|
23
23
|
import { buildDefaultEvents, createDefaultOnChannelPost, createDefaultOnInbound, } from "./defaults.js";
|
|
24
24
|
import { dispatchInboundFromEventBody, dispatchInboundMessage, emptySlackChannelState, } from "./dispatch.js";
|
|
25
25
|
import { createEventIdDedupe } from "./event-id-dedupe.js";
|
|
26
|
-
import { dispatchInteractiveFromPayload } from "./interactive.js";
|
|
26
|
+
import { dispatchBlockAction, dispatchInteractiveFromPayload, } from "./interactive.js";
|
|
27
27
|
import { createSlackLogger } from "./log.js";
|
|
28
28
|
import { startSlackSocketMode, } from "./socket-mode.js";
|
|
29
29
|
import { buildToolApprovalEvents } from "./tool-approval-events.js";
|
|
@@ -74,6 +74,9 @@ export function slackChannel(options = {}) {
|
|
|
74
74
|
if (options.interactivity === true) {
|
|
75
75
|
throw new Error("slackChannel({ cursorAccount: true }) does not support interactivity — interactive Block Kit clicks are not relayed over the Cursor Slack connection. Interactivity is Socket Mode only.");
|
|
76
76
|
}
|
|
77
|
+
if (options.onBlockAction !== undefined) {
|
|
78
|
+
throw new Error("slackChannel({ cursorAccount: true }) does not support onBlockAction — interactive Block Kit clicks are not relayed over the Cursor Slack connection. Block actions are Socket Mode only.");
|
|
79
|
+
}
|
|
77
80
|
}
|
|
78
81
|
const accountTransport = cursorAccount
|
|
79
82
|
? createPendingSlackApiTransport()
|
|
@@ -101,7 +104,8 @@ export function slackChannel(options = {}) {
|
|
|
101
104
|
const eventIds = createEventIdDedupe();
|
|
102
105
|
const toolApprovals = options.toolApprovals === true;
|
|
103
106
|
const interactivity = options.interactivity === true;
|
|
104
|
-
const
|
|
107
|
+
const onBlockAction = options.onBlockAction;
|
|
108
|
+
const routeInteractive = toolApprovals || interactivity || onBlockAction !== undefined;
|
|
105
109
|
const runtime = {
|
|
106
110
|
log: createSlackLogger(options.logger),
|
|
107
111
|
};
|
|
@@ -283,13 +287,30 @@ export function slackChannel(options = {}) {
|
|
|
283
287
|
};
|
|
284
288
|
if (routeInteractive) {
|
|
285
289
|
socketOptions.onInteractive = (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
|
|
290
|
+
// Framework tool-approval Approve/Deny clicks resolve first;
|
|
291
|
+
// anything else (including approval-shaped clicks whose value
|
|
292
|
+
// fails to parse) falls through to the author's block-action hook.
|
|
293
|
+
const handledAsApproval = yield dispatchInteractiveFromPayload(payload, {
|
|
287
294
|
credentials,
|
|
288
295
|
getSession: args.getSession,
|
|
289
296
|
resolveApproval: args.resolveApproval,
|
|
290
297
|
waitUntil: args.waitUntil,
|
|
291
298
|
log: getLog(),
|
|
292
299
|
});
|
|
300
|
+
if (handledAsApproval || onBlockAction === undefined) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
yield dispatchBlockAction(payload, {
|
|
304
|
+
handler: onBlockAction,
|
|
305
|
+
send: args.send,
|
|
306
|
+
credentials,
|
|
307
|
+
host: args.host,
|
|
308
|
+
log: getLog(),
|
|
309
|
+
hasContinuationSession: args.hasContinuationSession,
|
|
310
|
+
isContinuationBusy: args.isContinuationBusy,
|
|
311
|
+
getContinuationLastBotMessageTs: args.getContinuationLastBotMessageTs,
|
|
312
|
+
interruptContinuation: args.interruptContinuation,
|
|
313
|
+
});
|
|
293
314
|
});
|
|
294
315
|
}
|
|
295
316
|
try {
|
|
@@ -145,6 +145,71 @@ export interface SlackBinding {
|
|
|
145
145
|
host: HostContext;
|
|
146
146
|
}
|
|
147
147
|
export type SlackMessageHandler = (ctx: SlackBinding, message: SlackMessage) => SlackDispatchDecision | null | undefined | Promise<SlackDispatchDecision | null | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* Host probes into a Slack thread's continuation. Optional on dispatch
|
|
150
|
+
* deps; the serve host wires them at channel start.
|
|
151
|
+
*/
|
|
152
|
+
export interface SlackContinuationProbes {
|
|
153
|
+
/**
|
|
154
|
+
* When set, full-thread hydration runs only for cold-start turns (no
|
|
155
|
+
* existing session). Warm turns load a `<slack_thread_delta>` instead.
|
|
156
|
+
*/
|
|
157
|
+
hasContinuationSession?: (continuationToken: string) => Promise<boolean>;
|
|
158
|
+
/** True when a turn is already running for this Slack continuation. */
|
|
159
|
+
isContinuationBusy?: (continuationToken: string) => Promise<boolean>;
|
|
160
|
+
/**
|
|
161
|
+
* Warm-delta watermark from session channel state (`lastBotMessageTs`).
|
|
162
|
+
* When absent, delta falls back to the last matching bot post in-thread.
|
|
163
|
+
*/
|
|
164
|
+
getContinuationLastBotMessageTs?: (continuationToken: string) => Promise<string | undefined>;
|
|
165
|
+
/** Cancel the active turn + clear coalesced nudges for this continuation. */
|
|
166
|
+
interruptContinuation?: (continuationToken: string) => Promise<boolean>;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A Block Kit action click (Socket Mode `block_actions` payload) that the
|
|
170
|
+
* framework does not own — the built-in tool-approval Approve/Deny actions
|
|
171
|
+
* are routed to `resolveApproval` before author handlers see anything.
|
|
172
|
+
*/
|
|
173
|
+
export interface SlackBlockAction {
|
|
174
|
+
/** `action_id` of the clicked element. */
|
|
175
|
+
actionId: string;
|
|
176
|
+
/** `block_id` of the actions row holding the element (Slack always sets one). */
|
|
177
|
+
blockId: string;
|
|
178
|
+
/**
|
|
179
|
+
* Element `value` payload; empty string when absent (button-style
|
|
180
|
+
* elements only — select/overflow `selected_option`s are not read).
|
|
181
|
+
*/
|
|
182
|
+
value: string;
|
|
183
|
+
/** Plain-text label of the clicked element, when present. */
|
|
184
|
+
label?: string;
|
|
185
|
+
channelId: string;
|
|
186
|
+
/**
|
|
187
|
+
* Thread of the message carrying the element (the message's own ts when
|
|
188
|
+
* it is a top-level post — clicks on a thread root stay in its thread).
|
|
189
|
+
*/
|
|
190
|
+
threadTs: string;
|
|
191
|
+
/** The message carrying the clicked element. */
|
|
192
|
+
messageTs: string;
|
|
193
|
+
/** That message's blocks, for `chat.update` resolution cards. */
|
|
194
|
+
messageBlocks?: unknown[];
|
|
195
|
+
/** Slack user who clicked. */
|
|
196
|
+
userId: string;
|
|
197
|
+
userName?: string;
|
|
198
|
+
teamId?: string;
|
|
199
|
+
/**
|
|
200
|
+
* Slack `action_ts` — unique per click; block-action dispatch dedupes on
|
|
201
|
+
* it. Empty when the payload omitted it (malformed; never dispatched).
|
|
202
|
+
*/
|
|
203
|
+
actionTs: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Author handler for {@link SlackBlockAction} clicks. Return a
|
|
207
|
+
* {@link SlackDispatchDecision} to dispatch a turn on the click's thread —
|
|
208
|
+
* the click is dispatched like an inbound message from the clicking user
|
|
209
|
+
* (thread-scoped continuation, `<slack_context>` naming the clicker) — or
|
|
210
|
+
* `null` to ignore the click.
|
|
211
|
+
*/
|
|
212
|
+
export type SlackBlockActionHandler = (ctx: SlackBinding, action: SlackBlockAction) => SlackDispatchDecision | null | undefined | Promise<SlackDispatchDecision | null | undefined>;
|
|
148
213
|
/**
|
|
149
214
|
* Opt-in channel watch: dispatch on posts in explicitly allowlisted
|
|
150
215
|
* channels without requiring an @mention. There is deliberately no
|
|
@@ -321,6 +386,18 @@ export interface SlackChannelOptions {
|
|
|
321
386
|
* only — rejected on `cursorAccount: true`.
|
|
322
387
|
*/
|
|
323
388
|
interactivity?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Handler for Block Kit actions the framework does not own (the built-in
|
|
391
|
+
* tool-approval Approve/Deny clicks are routed to `resolveApproval`
|
|
392
|
+
* first). Return a {@link SlackDispatchDecision} — typically with a
|
|
393
|
+
* thread-scoped auth via `buildSlackAuthContext` so replies in the same
|
|
394
|
+
* thread continue the session — to dispatch a turn on the click's
|
|
395
|
+
* thread, or `null` to ignore the click. Setting this implies
|
|
396
|
+
* interactive routing; the Slack app manifest still needs
|
|
397
|
+
* `interactivity` enabled (`buildSlackManifest({ interactivity: true })`).
|
|
398
|
+
* Socket Mode only — rejected on `cursorAccount: true`.
|
|
399
|
+
*/
|
|
400
|
+
onBlockAction?: SlackBlockActionHandler;
|
|
324
401
|
/**
|
|
325
402
|
* Suggested prompts shown when an assistant thread starts (and optionally
|
|
326
403
|
* after a turn completes).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,oBAAoB,EACpB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CACF,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrC;AAED,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAChC,iBAAiB,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;CACtD;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ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cursor.ts — every connected server
|
|
33
|
+
* // agent/mcp-connections/cursor.ts — every connected server (no allowlist)
|
|
34
34
|
* export default defineConnection({ cursorAccount: true });
|
|
35
|
+
* // equivalent explicit form:
|
|
36
|
+
* export default defineConnection({ cursorAccount: true, servers: "*" });
|
|
35
37
|
*
|
|
36
38
|
* // or restrict to specific connectors by name
|
|
37
39
|
* export default defineConnection({ cursorAccount: true, servers: ["Linear"] });
|
|
@@ -76,5 +78,6 @@
|
|
|
76
78
|
*/
|
|
77
79
|
import type { ConnectionConfig, ConnectionDefinition } from "./types.js";
|
|
78
80
|
export type { ConnectionConfig, ConnectionDefinition, ConnectionTransport, HostMcpCallResult, HostMcpRegistry, HostMcpToolInfo, } from "./types.js";
|
|
81
|
+
export { normalizeCursorAccountServers } from "./types.js";
|
|
79
82
|
export declare function defineConnection(config: ConnectionConfig): ConnectionDefinition;
|
|
80
83
|
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../src/connections.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../src/connections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEzE,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAE3D,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,gBAAgB,GACvB,oBAAoB,CAEtB"}
|
package/dist/connections.js
CHANGED
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
* to be signed in (`agent-serve login` or `CURSOR_API_KEY`):
|
|
31
31
|
*
|
|
32
32
|
* ```ts
|
|
33
|
-
* // agent/mcp-connections/cursor.ts — every connected server
|
|
33
|
+
* // agent/mcp-connections/cursor.ts — every connected server (no allowlist)
|
|
34
34
|
* export default defineConnection({ cursorAccount: true });
|
|
35
|
+
* // equivalent explicit form:
|
|
36
|
+
* export default defineConnection({ cursorAccount: true, servers: "*" });
|
|
35
37
|
*
|
|
36
38
|
* // or restrict to specific connectors by name
|
|
37
39
|
* export default defineConnection({ cursorAccount: true, servers: ["Linear"] });
|
|
@@ -75,6 +77,7 @@
|
|
|
75
77
|
* ```
|
|
76
78
|
*/
|
|
77
79
|
import { brandDefinition } from "./internal/brand.js";
|
|
80
|
+
export { normalizeCursorAccountServers } from "./types.js";
|
|
78
81
|
export function defineConnection(config) {
|
|
79
82
|
return brandDefinition("connection", config);
|
|
80
83
|
}
|
package/dist/docs/404.html
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.Bj-IXa5W.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/docs/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/docs/assets/app.
|
|
12
|
+
<script type="module" src="/docs/assets/app.BbEXr2KO.js"></script>
|
|
13
13
|
<link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
14
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
15
15
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="app"></div>
|
|
19
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"BZSNycMf\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"t0TM2Qzz\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"DnYfr5V2\",\"reference_connections.md\":\"B9Q3TOve\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"BncLd3PZ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DLd6mvbv\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"BRSDnTbN\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"DRTdnFvd\",\"troubleshooting.md\":\"CmQkmnzC\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"agentkit\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Guides\",\"link\":\"/guides/webhooks\"},{\"text\":\"Examples\",\"link\":\"/example-agents/\"},{\"text\":\"Reference\",\"link\":\"/reference/project-layout\"}],\"search\":{\"provider\":\"local\"},\"outline\":{\"level\":[2,3]},\"sidebar\":[{\"text\":\"Getting started\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Scaffold an agent with Cursor\",\"link\":\"/scaffolding-agents\"},{\"text\":\"Concepts\",\"link\":\"/concepts\"}]},{\"text\":\"Improving agents\",\"items\":[{\"text\":\"Building agents with agents\",\"link\":\"/building-with-agents\"},{\"text\":\"Evals\",\"link\":\"/evals\"},{\"text\":\"Live A/B metrics\",\"link\":\"/ab\"},{\"text\":\"Storage\",\"link\":\"/storage\"},{\"text\":\"Hillclimbing\",\"link\":\"/hillclimbing\"}]},{\"text\":\"Guides\",\"items\":[{\"text\":\"Webhooks & custom channels\",\"link\":\"/guides/webhooks\"},{\"text\":\"GitHub\",\"link\":\"/guides/github\"},{\"text\":\"Slack\",\"link\":\"/guides/slack\"},{\"text\":\"Human-in-the-loop approvals\",\"link\":\"/guides/human-in-the-loop\"},{\"text\":\"Agent-to-agent\",\"link\":\"/guides/agent-to-agent\"},{\"text\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"}]},{\"text\":\"Example agents\",\"items\":[{\"text\":\"Choose an example\",\"link\":\"/example-agents/\"},{\"text\":\"Weather agent\",\"link\":\"/example-agents/weather-agent\"},{\"text\":\"Slack agent\",\"link\":\"/example-agents/slack-agent\"},{\"text\":\"Concierge\",\"link\":\"/example-agents/concierge\"},{\"text\":\"Playbook router\",\"link\":\"/example-agents/benny\"},{\"text\":\"Alert investigator\",\"link\":\"/example-agents/oncall\"},{\"text\":\"PR evidence reviewer\",\"link\":\"/example-agents/bugbot\"},{\"text\":\"Approval Buddy\",\"link\":\"/example-agents/approval-buddy\"},{\"text\":\"Security Reviewer\",\"link\":\"/example-agents/security-reviewer\"},{\"text\":\"Remote PR coordinator\",\"link\":\"/example-agents/fsd\"},{\"text\":\"Knowledge base\",\"link\":\"/example-agents/knowledge-base\"},{\"text\":\"Codebase wiki\",\"link\":\"/example-agents/codebase-wiki\"},{\"text\":\"Codeowners review\",\"link\":\"/example-agents/codeowners-review\"}]},{\"text\":\"Operating\",\"items\":[{\"text\":\"Deployment\",\"link\":\"/deployment\"},{\"text\":\"Fix common problems\",\"link\":\"/troubleshooting\"}]},{\"text\":\"Reference\",\"collapsed\":false,\"items\":[{\"text\":\"Project layout\",\"link\":\"/reference/project-layout\"},{\"text\":\"Agent config\",\"link\":\"/reference/agent-config\"},{\"text\":\"Instructions\",\"link\":\"/reference/instructions\"},{\"text\":\"Tools\",\"link\":\"/reference/tools\"},{\"text\":\"prompt\",\"link\":\"/reference/prompt\"},{\"text\":\"Skills\",\"link\":\"/reference/skills\"},{\"text\":\"MCP Connections\",\"link\":\"/reference/connections\"},{\"text\":\"Subagents\",\"link\":\"/reference/subagents\"},{\"text\":\"Channels\",\"link\":\"/reference/channels\"},{\"text\":\"Schedules & reminders\",\"link\":\"/reference/schedules\"},{\"text\":\"Hooks\",\"link\":\"/reference/hooks\"},{\"text\":\"Sessions & streaming\",\"link\":\"/reference/sessions\"},{\"text\":\"Playground\",\"link\":\"/reference/playground\"},{\"text\":\"CLI\",\"link\":\"/reference/cli\"},{\"text\":\"HTTP API\",\"link\":\"/reference/http-api\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
20
20
|
|
|
21
21
|
</body>
|
|
22
22
|
</html>
|