@cursor/july 0.1.37 → 0.1.39
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 +3 -1
- package/dist/bin/agent-serve.js +0 -0
- package/dist/channels/slack/api.d.ts +5 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +57 -18
- package/dist/channels/slack/constants.d.ts +2 -0
- package/dist/channels/slack/constants.d.ts.map +1 -1
- package/dist/channels/slack/constants.js +2 -0
- package/dist/channels/slack/post-update-delivery.d.ts +85 -0
- package/dist/channels/slack/post-update-delivery.d.ts.map +1 -0
- package/dist/connections.d.ts +14 -2
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +13 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/ab.html +6 -6
- package/dist/docs/assets/{app.Bu9SRvZ9.js → app.BQ8Hihdf.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.B-VTH4As.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.D9u9czHO.js → VPLocalSearchBox.BBCr8Yuy.js} +2 -2
- package/dist/docs/assets/chunks/theme.CK_NiGC-.js +2 -0
- package/dist/docs/assets/{example-agents_weather-agent.md.CrGZ0SqR.js → example-agents_weather-agent.md.DC3lINjo.js} +5 -6
- package/dist/docs/assets/{reference_connections.md.DGqAsFXb.js → reference_connections.md.CSQiNzre.js} +11 -2
- package/dist/docs/assets/{reference_connections.md.DGqAsFXb.lean.js → reference_connections.md.CSQiNzre.lean.js} +1 -1
- package/dist/docs/assets/{style.Bj-IXa5W.css → style.CK3hwt6q.css} +1 -1
- package/dist/docs/building-with-agents.html +6 -6
- package/dist/docs/concepts.html +6 -6
- package/dist/docs/deployment.html +6 -6
- package/dist/docs/evals.html +6 -6
- package/dist/docs/example-agents/approval-buddy.html +6 -6
- package/dist/docs/example-agents/benny.html +6 -6
- package/dist/docs/example-agents/bugbot.html +6 -6
- package/dist/docs/example-agents/codebase-wiki.html +6 -6
- package/dist/docs/example-agents/codeowners-review.html +6 -6
- package/dist/docs/example-agents/concierge.html +6 -6
- package/dist/docs/example-agents/fsd.html +6 -6
- package/dist/docs/example-agents/index.html +6 -6
- package/dist/docs/example-agents/knowledge-base.html +6 -6
- package/dist/docs/example-agents/oncall.html +6 -6
- package/dist/docs/example-agents/security-reviewer.html +6 -6
- package/dist/docs/example-agents/slack-agent.html +6 -6
- package/dist/docs/example-agents/weather-agent.html +10 -11
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/cloud-runtime.html +6 -6
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/human-in-the-loop.html +6 -6
- package/dist/docs/guides/mcp-oauth.html +6 -6
- package/dist/docs/guides/slack.html +6 -6
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/index.html +6 -6
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/artifacts.html +6 -6
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/cli.html +6 -6
- package/dist/docs/reference/connections.html +17 -8
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/instructions.html +6 -6
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/prompt.html +6 -6
- package/dist/docs/reference/schedules.html +6 -6
- package/dist/docs/reference/sessions.html +6 -6
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/storage.html +6 -6
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +13 -2
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +95 -2
- package/dist/internal/framework-storage-selection.d.ts +37 -0
- package/dist/internal/framework-storage-selection.d.ts.map +1 -0
- package/dist/internal/framework-storage-selection.js +35 -0
- package/dist/internal/inline-stdio-define-stub.d.ts +3 -0
- package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -0
- package/dist/internal/inline-stdio-define-stub.js +4 -0
- package/dist/internal/inline-stdio-mcp.d.ts +32 -0
- package/dist/internal/inline-stdio-mcp.d.ts.map +1 -0
- package/dist/internal/inline-stdio-mcp.js +180 -0
- package/dist/internal/json-dir-store.d.ts +32 -0
- package/dist/internal/json-dir-store.d.ts.map +1 -0
- package/dist/internal/package-inline-stdio.d.ts +12 -0
- package/dist/internal/package-inline-stdio.d.ts.map +1 -0
- package/dist/internal/package-inline-stdio.js +109 -0
- package/dist/internal/persistence-coordinator.d.ts +127 -0
- package/dist/internal/persistence-coordinator.d.ts.map +1 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +9 -2
- package/dist/multi-tenant.d.ts +80 -0
- package/dist/multi-tenant.d.ts.map +1 -0
- package/dist/multi-tenant.js +69 -0
- package/dist/persistence.d.ts +184 -0
- package/dist/persistence.d.ts.map +1 -0
- package/dist/playground/assets/index-BRhBbnd4.css +1 -0
- package/dist/playground/assets/{index-DRtusTV1.js → index-_2WKw9a-.js} +43 -43
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +20 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/docs/example-agents/weather-agent.md +25 -22
- package/docs/reference/connections.md +17 -0
- package/package.json +3 -1
- package/skills/framework-map/SKILL.md +1 -1
- package/src/channels/slack/api.ts +72 -20
- package/src/channels/slack/constants.ts +2 -0
- package/src/connections.ts +18 -1
- package/src/files-backends/cursor-hosted.ts +13 -2
- package/src/internal/discovery.ts +111 -1
- package/src/internal/framework-storage-selection.ts +45 -0
- package/src/internal/inline-stdio-define-stub.ts +4 -0
- package/src/internal/inline-stdio-mcp.ts +229 -0
- package/src/internal/package-inline-stdio.ts +121 -0
- package/src/internal/session-engine.ts +9 -2
- package/src/types.ts +27 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.pVFW7oJd.js +0 -1
- package/dist/docs/assets/chunks/theme.Bc61GzOf.js +0 -2
- package/dist/playground/assets/index-DZp6n4bv.css +0 -1
- /package/dist/docs/assets/{example-agents_weather-agent.md.CrGZ0SqR.lean.js → example-agents_weather-agent.md.DC3lINjo.lean.js} +0 -0
package/README.md
CHANGED
|
@@ -685,7 +685,9 @@ export default defineConnection({
|
|
|
685
685
|
```
|
|
686
686
|
|
|
687
687
|
The filename becomes the MCP server name. `{ command, args, env, cwd }`
|
|
688
|
-
declares a local stdio server instead
|
|
688
|
+
declares a local stdio server instead. `{ tools }` authors TypeScript
|
|
689
|
+
handlers that the Agent SDK packages as stdio MCP for the agent
|
|
690
|
+
environment, including a repo-less cloud VM. `{ agent: "<slug>" }` declares a
|
|
689
691
|
**peer MCP connection** to another agent mounted on the same serve host (see
|
|
690
692
|
"Agent-to-agent: every agent is an MCP server").
|
|
691
693
|
|
package/dist/bin/agent-serve.js
CHANGED
|
File without changes
|
|
@@ -34,6 +34,11 @@ export declare function callSlackApiSoft(args: {
|
|
|
34
34
|
body: Record<string, unknown>;
|
|
35
35
|
}): Promise<SoftSlackResult>;
|
|
36
36
|
export declare function truncateTypingStatus(status: string, max?: number): string;
|
|
37
|
+
/**
|
|
38
|
+
* Slack caps `loading_messages` at 5. When the cleaned list is longer,
|
|
39
|
+
* send a wrapping time-based window of 5 so later strings still appear.
|
|
40
|
+
*/
|
|
41
|
+
export declare function truncateLoadingMessages(messages: string[], nowMs?: number): string[];
|
|
37
42
|
export declare function truncateTitle(title: string, max?: number): string;
|
|
38
43
|
export declare function setThreadStatus(args: {
|
|
39
44
|
botToken: SlackBotToken | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/channels/sl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A8E;AAC9E,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,eAAe,CAAC,CAgD3B;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,eAAe,CAAC,CAY3B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB,GAAG,YAAY,CAuGf"}
|
|
@@ -11,7 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
import { ErrorCode, WebClient } from "@slack/web-api";
|
|
14
|
-
import {
|
|
14
|
+
import { slackifyMarkdown } from "slackify-markdown";
|
|
15
|
+
import { SLACK_DEFAULT_LOADING_MESSAGES, SLACK_LOADING_MESSAGE_MAX_LEN, SLACK_LOADING_MESSAGES_MAX, SLACK_STATUS_MAX_LEN, SLACK_TITLE_MAX_LEN, SLACK_TYPING_MIN_INTERVAL_MS, SLACK_UNSUPPORTED_ERRORS, } from "./constants.js";
|
|
15
16
|
import { tryResolveAppToken, tryResolveBotToken } from "./credentials.js";
|
|
16
17
|
import { defaultSlackLog } from "./log.js";
|
|
17
18
|
/** Whether a bot token slot holds an API transport instead of a token. */
|
|
@@ -110,11 +111,27 @@ export function truncateTypingStatus(status, max) {
|
|
|
110
111
|
}
|
|
111
112
|
return `${trimmed.slice(0, limit - 1)}…`;
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Slack caps `loading_messages` at 5. When the cleaned list is longer,
|
|
116
|
+
* send a wrapping time-based window of 5 so later strings still appear.
|
|
117
|
+
*/
|
|
118
|
+
export function truncateLoadingMessages(messages, nowMs = Date.now()) {
|
|
119
|
+
const cleaned = messages
|
|
115
120
|
.map((message) => truncateTypingStatus(message, SLACK_LOADING_MESSAGE_MAX_LEN))
|
|
116
|
-
.filter((message) => message.length > 0)
|
|
117
|
-
|
|
121
|
+
.filter((message) => message.length > 0);
|
|
122
|
+
if (cleaned.length <= SLACK_LOADING_MESSAGES_MAX) {
|
|
123
|
+
return cleaned;
|
|
124
|
+
}
|
|
125
|
+
const start = Math.floor(nowMs / SLACK_TYPING_MIN_INTERVAL_MS) % cleaned.length;
|
|
126
|
+
const window = [];
|
|
127
|
+
for (let i = 0; i < SLACK_LOADING_MESSAGES_MAX; i++) {
|
|
128
|
+
const message = cleaned[(start + i) % cleaned.length];
|
|
129
|
+
if (message === undefined) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
window.push(message);
|
|
133
|
+
}
|
|
134
|
+
return window;
|
|
118
135
|
}
|
|
119
136
|
export function truncateTitle(title, max) {
|
|
120
137
|
const limit = max !== null && max !== void 0 ? max : SLACK_TITLE_MAX_LEN;
|
|
@@ -247,6 +264,31 @@ export function stopChatStream(args) {
|
|
|
247
264
|
});
|
|
248
265
|
});
|
|
249
266
|
}
|
|
267
|
+
const SLACK_MRKDWN_LITERAL_PATTERN = /<(?:[@#!][^>\r\n]+|(?:https?|ftp|mailto|tel):[^>\r\n]+)>/gi;
|
|
268
|
+
const SLACK_MRKDWN_LINK_PATTERN = /<https?:\/\/[^|>]+\|/;
|
|
269
|
+
/**
|
|
270
|
+
* Convert CommonMark accepted by `markdown_text` to Slack's legacy mrkdwn
|
|
271
|
+
* without letting the CommonMark parser reinterpret Slack-native syntax.
|
|
272
|
+
*/
|
|
273
|
+
function markdownToSlackMrkdwn(markdown) {
|
|
274
|
+
const literals = [];
|
|
275
|
+
const placeholder = (index) => `\ue000SLACK_LITERAL_${index}\ue001`;
|
|
276
|
+
const protectedMarkdown = markdown.replace(SLACK_MRKDWN_LITERAL_PATTERN, (literal) => {
|
|
277
|
+
const index = literals.push(literal) - 1;
|
|
278
|
+
return placeholder(index);
|
|
279
|
+
});
|
|
280
|
+
let converted = slackifyMarkdown(protectedMarkdown);
|
|
281
|
+
if (!markdown.endsWith("\n") && converted.endsWith("\n")) {
|
|
282
|
+
converted = converted.slice(0, -1);
|
|
283
|
+
}
|
|
284
|
+
for (const [index, literal] of literals.entries()) {
|
|
285
|
+
converted = converted.replaceAll(placeholder(index), literal);
|
|
286
|
+
}
|
|
287
|
+
return converted;
|
|
288
|
+
}
|
|
289
|
+
function requiresMrkdwnText(text) {
|
|
290
|
+
return text.includes("<!subteam^") || SLACK_MRKDWN_LINK_PATTERN.test(text);
|
|
291
|
+
}
|
|
250
292
|
export function postMessage(args) {
|
|
251
293
|
return __awaiter(this, void 0, void 0, function* () {
|
|
252
294
|
var _a, _b;
|
|
@@ -265,19 +307,17 @@ export function postMessage(args) {
|
|
|
265
307
|
base.metadata = args.metadata;
|
|
266
308
|
}
|
|
267
309
|
const hasBlocks = args.blocks !== undefined && args.blocks.length > 0;
|
|
310
|
+
const convertToMrkdwn = args.plainText !== true && !hasBlocks && requiresMrkdwnText(args.text);
|
|
268
311
|
// User-group mentions (`<!subteam^…>`) and Slack mrkdwn links
|
|
269
312
|
// (`<https://…|label>`) only render correctly via mrkdwn `text`,
|
|
270
313
|
// not `markdown_text`.
|
|
271
|
-
const
|
|
272
|
-
hasBlocks ||
|
|
273
|
-
args.text.includes("<!subteam^") ||
|
|
274
|
-
/<https?:\/\/[^|>]+\|/.test(args.text);
|
|
314
|
+
const useText = args.plainText === true || hasBlocks || convertToMrkdwn;
|
|
275
315
|
let response;
|
|
276
|
-
if (
|
|
316
|
+
if (useText) {
|
|
277
317
|
response = yield callSlackApi({
|
|
278
318
|
botToken: args.botToken,
|
|
279
319
|
operation: "chat.postMessage",
|
|
280
|
-
body: Object.assign(Object.assign(Object.assign({}, base), { text: args.text }), (hasBlocks ? { blocks: args.blocks } : {})),
|
|
320
|
+
body: Object.assign(Object.assign(Object.assign({}, base), { text: convertToMrkdwn ? markdownToSlackMrkdwn(args.text) : args.text }), (hasBlocks ? { blocks: args.blocks } : {})),
|
|
281
321
|
});
|
|
282
322
|
}
|
|
283
323
|
else {
|
|
@@ -298,7 +338,7 @@ export function postMessage(args) {
|
|
|
298
338
|
response = yield callSlackApi({
|
|
299
339
|
botToken: args.botToken,
|
|
300
340
|
operation: "chat.postMessage",
|
|
301
|
-
body: Object.assign(Object.assign({}, base), { text: args.text }),
|
|
341
|
+
body: Object.assign(Object.assign({}, base), { text: markdownToSlackMrkdwn(args.text) }),
|
|
302
342
|
});
|
|
303
343
|
}
|
|
304
344
|
}
|
|
@@ -344,16 +384,15 @@ export function updateMessage(args) {
|
|
|
344
384
|
channel: args.channel,
|
|
345
385
|
ts: args.ts,
|
|
346
386
|
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
/<https?:\/\/[^|>]+\|/.test(args.text)) {
|
|
387
|
+
const useRawText = args.blocks !== undefined || args.plainText === true;
|
|
388
|
+
const convertToMrkdwn = !useRawText && requiresMrkdwnText(args.text);
|
|
389
|
+
if (useRawText || convertToMrkdwn) {
|
|
351
390
|
// Blocks / plainText / user-group mentions / mrkdwn links force the
|
|
352
391
|
// legacy text path (same as postMessage).
|
|
353
392
|
return callSlackApiSoft({
|
|
354
393
|
botToken: args.botToken,
|
|
355
394
|
operation: "chat.update",
|
|
356
|
-
body: Object.assign(Object.assign(Object.assign({}, base), { text: args.text }), (args.blocks !== undefined ? { blocks: args.blocks } : {})),
|
|
395
|
+
body: Object.assign(Object.assign(Object.assign({}, base), { text: convertToMrkdwn ? markdownToSlackMrkdwn(args.text) : args.text }), (args.blocks !== undefined ? { blocks: args.blocks } : {})),
|
|
357
396
|
});
|
|
358
397
|
}
|
|
359
398
|
let result = yield callSlackApiSoft({
|
|
@@ -372,7 +411,7 @@ export function updateMessage(args) {
|
|
|
372
411
|
result = yield callSlackApiSoft({
|
|
373
412
|
botToken: args.botToken,
|
|
374
413
|
operation: "chat.update",
|
|
375
|
-
body: Object.assign(Object.assign({}, base), { text: args.text }),
|
|
414
|
+
body: Object.assign(Object.assign({}, base), { text: markdownToSlackMrkdwn(args.text) }),
|
|
376
415
|
});
|
|
377
416
|
}
|
|
378
417
|
return result;
|
|
@@ -9,6 +9,8 @@ export declare const SLACK_TYPING_MIN_INTERVAL_MS = 5000;
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const SLACK_STATUS_MAX_LEN = 50;
|
|
11
11
|
export declare const SLACK_LOADING_MESSAGE_MAX_LEN = 50;
|
|
12
|
+
/** Slack `assistant.threads.setStatus` accepts at most 5 `loading_messages`. */
|
|
13
|
+
export declare const SLACK_LOADING_MESSAGES_MAX = 5;
|
|
12
14
|
export declare const SLACK_TITLE_MAX_LEN = 80;
|
|
13
15
|
/** Rotating assistant status lines (Slack `loading_messages`). */
|
|
14
16
|
export declare const SLACK_DEFAULT_LOADING_MESSAGES: readonly ["Thinking…", "Working on it…", "Almost there…"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/constants.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AAClD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,YACzC,WAAW,EACX,gBAAgB,EAChB,eAAe,CACP,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,EAAE,GAAG,CAAC,MAAM,CAO/C,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/constants.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AAClD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,YACzC,WAAW,EACX,gBAAgB,EAChB,eAAe,CACP,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,EAAE,GAAG,CAAC,MAAM,CAO/C,CAAC"}
|
|
@@ -9,6 +9,8 @@ export const SLACK_TYPING_MIN_INTERVAL_MS = 5000;
|
|
|
9
9
|
*/
|
|
10
10
|
export const SLACK_STATUS_MAX_LEN = 50;
|
|
11
11
|
export const SLACK_LOADING_MESSAGE_MAX_LEN = 50;
|
|
12
|
+
/** Slack `assistant.threads.setStatus` accepts at most 5 `loading_messages`. */
|
|
13
|
+
export const SLACK_LOADING_MESSAGES_MAX = 5;
|
|
12
14
|
export const SLACK_TITLE_MAX_LEN = 80;
|
|
13
15
|
/** Rotating assistant status lines (Slack `loading_messages`). */
|
|
14
16
|
export const SLACK_DEFAULT_LOADING_MESSAGES = [
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live-reply delivery strategies for the Slack default handlers.
|
|
3
|
+
*
|
|
4
|
+
* A single strategy owns how an in-progress reply is opened, updated,
|
|
5
|
+
* finalized, and cleaned up so the handlers in `defaults.ts` don't fork on the
|
|
6
|
+
* delivery mode at every event:
|
|
7
|
+
*
|
|
8
|
+
* - `stream`: Slack chat.startStream / appendStream / stopStream.
|
|
9
|
+
* - `post-update`: a chat.postMessage skeleton edited with chat.update. This is
|
|
10
|
+
* the only path that preserves Cursor-account identity pinning (which only
|
|
11
|
+
* covers postMessage).
|
|
12
|
+
*
|
|
13
|
+
* `buildDefaultEvents` selects one via {@link selectLiveDeliveryStrategy} up
|
|
14
|
+
* front and calls into it. All calls keep the same soft-fail / log behavior as
|
|
15
|
+
* the inlined logic they replaced.
|
|
16
|
+
*/
|
|
17
|
+
import type { ChannelEventContext } from "../../types.js";
|
|
18
|
+
import type { SlackLog } from "./log.js";
|
|
19
|
+
import type { SlackBotToken, SlackChannelState } from "./types.js";
|
|
20
|
+
type SlackChannel = ChannelEventContext<SlackChannelState>;
|
|
21
|
+
export interface LiveDeliveryDeps {
|
|
22
|
+
botToken: SlackBotToken | undefined;
|
|
23
|
+
getLog: () => SlackLog;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* How the default handlers deliver an in-progress reply. Methods write live
|
|
27
|
+
* delivery state (`streamTs`, `streamChannelId`, `lastPostedText`,
|
|
28
|
+
* `lastPostUpdateAtMs`, `streamingUnavailable`) on `channel.state` directly.
|
|
29
|
+
*/
|
|
30
|
+
export interface LiveDeliveryStrategy {
|
|
31
|
+
/** True when tool-call thinking steps can be appended to the live message. */
|
|
32
|
+
readonly inlineToolSteps: boolean;
|
|
33
|
+
/** Open the live message (skeleton post / stream start). */
|
|
34
|
+
start(args: {
|
|
35
|
+
channel: SlackChannel;
|
|
36
|
+
channelId: string;
|
|
37
|
+
threadTs: string;
|
|
38
|
+
sessionId: string;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
/** Push the latest cumulative text to the live message (throttled). */
|
|
41
|
+
append(args: {
|
|
42
|
+
channel: SlackChannel;
|
|
43
|
+
channelId: string;
|
|
44
|
+
streamTs: string;
|
|
45
|
+
text: string;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
}): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Flush the final reply text. `delivered` is false only when the caller must
|
|
50
|
+
* post the full reply as a fresh message (finalize failed on partial text).
|
|
51
|
+
*/
|
|
52
|
+
finalize(args: {
|
|
53
|
+
channel: SlackChannel;
|
|
54
|
+
channelId: string;
|
|
55
|
+
streamTs: string;
|
|
56
|
+
text: string;
|
|
57
|
+
sessionId: string;
|
|
58
|
+
}): Promise<{
|
|
59
|
+
delivered: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
/** Close the live message when the turn produced no final text. */
|
|
62
|
+
finalizeEmpty(args: {
|
|
63
|
+
channel: SlackChannel;
|
|
64
|
+
channelId: string;
|
|
65
|
+
streamTs: string;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
/** Best-effort remove a live message left open after the turn ended. */
|
|
68
|
+
cleanupOrphan(args: {
|
|
69
|
+
channel: SlackChannel;
|
|
70
|
+
}): Promise<void>;
|
|
71
|
+
/** Deliver the error text into the live message; `delivered` gates a fallback post. */
|
|
72
|
+
fail(args: {
|
|
73
|
+
channel: SlackChannel;
|
|
74
|
+
channelId: string;
|
|
75
|
+
streamTs: string;
|
|
76
|
+
errorText: string;
|
|
77
|
+
sessionId: string;
|
|
78
|
+
}): Promise<{
|
|
79
|
+
delivered: boolean;
|
|
80
|
+
}>;
|
|
81
|
+
}
|
|
82
|
+
/** Pick the live-reply delivery strategy for a `buildDefaultEvents` instance. */
|
|
83
|
+
export declare function selectLiveDeliveryStrategy(deps: LiveDeliveryDeps, usePostUpdate: boolean): LiveDeliveryStrategy;
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=post-update-delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-update-delivery.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/post-update-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAW1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE,KAAK,YAAY,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE,MAAM,QAAQ,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,4DAA4D;IAC5D,KAAK,CAAC,IAAI,EAAE;QACV,OAAO,EAAE,YAAY,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClB,uEAAuE;IACvE,MAAM,CAAC,IAAI,EAAE;QACX,OAAO,EAAE,YAAY,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE;QACb,OAAO,EAAE,YAAY,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACpC,mEAAmE;IACnE,aAAa,CAAC,IAAI,EAAE;QAClB,OAAO,EAAE,YAAY,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClB,wEAAwE;IACxE,aAAa,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,uFAAuF;IACvF,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,YAAY,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACrC;AA6RD,iFAAiF;AACjF,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,gBAAgB,EACtB,aAAa,EAAE,OAAO,GACrB,oBAAoB,CAItB"}
|
package/dist/connections.d.ts
CHANGED
|
@@ -14,6 +14,18 @@
|
|
|
14
14
|
* headers: { authorization: `Bearer ${process.env.LINEAR_TOKEN}` },
|
|
15
15
|
* });
|
|
16
16
|
*
|
|
17
|
+
* // TypeScript tools, packaged as stdio MCP for the agent environment:
|
|
18
|
+
* export default defineConnection({
|
|
19
|
+
* tools: {
|
|
20
|
+
* probe_cloud_tool: {
|
|
21
|
+
* description: "Prove the tool ran in the agent environment.",
|
|
22
|
+
* async execute({ label }) {
|
|
23
|
+
* return { ok: true, label };
|
|
24
|
+
* },
|
|
25
|
+
* },
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
17
29
|
* // privileged connector, model cannot call directly:
|
|
18
30
|
* export default defineConnection({
|
|
19
31
|
* cursorAccount: true,
|
|
@@ -77,7 +89,7 @@
|
|
|
77
89
|
* ```
|
|
78
90
|
*/
|
|
79
91
|
import type { ConnectionConfig, ConnectionDefinition } from "./types.js";
|
|
80
|
-
export type { ConnectionConfig, ConnectionDefinition, ConnectionTransport, HostMcpCallResult, HostMcpRegistry, HostMcpToolInfo, } from "./types.js";
|
|
81
|
-
export { normalizeCursorAccountServers } from "./types.js";
|
|
92
|
+
export type { ConnectionConfig, ConnectionDefinition, ConnectionTransport, HostMcpCallResult, HostMcpRegistry, HostMcpToolInfo, InlineStdioConnectionConfig, InlineStdioToolConfig, } from "./types.js";
|
|
93
|
+
export { isInlineStdioConnection, normalizeCursorAccountServers, } from "./types.js";
|
|
82
94
|
export declare function defineConnection(config: ConnectionConfig): ConnectionDefinition;
|
|
83
95
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;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,EACf,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AAEpB,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,gBAAgB,GACvB,oBAAoB,CAEtB"}
|
package/dist/connections.js
CHANGED
|
@@ -14,6 +14,18 @@
|
|
|
14
14
|
* headers: { authorization: `Bearer ${process.env.LINEAR_TOKEN}` },
|
|
15
15
|
* });
|
|
16
16
|
*
|
|
17
|
+
* // TypeScript tools, packaged as stdio MCP for the agent environment:
|
|
18
|
+
* export default defineConnection({
|
|
19
|
+
* tools: {
|
|
20
|
+
* probe_cloud_tool: {
|
|
21
|
+
* description: "Prove the tool ran in the agent environment.",
|
|
22
|
+
* async execute({ label }) {
|
|
23
|
+
* return { ok: true, label };
|
|
24
|
+
* },
|
|
25
|
+
* },
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
17
29
|
* // privileged connector, model cannot call directly:
|
|
18
30
|
* export default defineConnection({
|
|
19
31
|
* cursorAccount: true,
|
|
@@ -77,7 +89,7 @@
|
|
|
77
89
|
* ```
|
|
78
90
|
*/
|
|
79
91
|
import { brandDefinition } from "./internal/brand.js";
|
|
80
|
-
export { normalizeCursorAccountServers } from "./types.js";
|
|
92
|
+
export { isInlineStdioConnection, normalizeCursorAccountServers, } from "./types.js";
|
|
81
93
|
export function defineConnection(config) {
|
|
82
94
|
return brandDefinition("connection", config);
|
|
83
95
|
}
|
package/dist/docs/404.html
CHANGED
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
<title>404 | Agent SDK</title>
|
|
7
7
|
<meta name="description" content="Not Found">
|
|
8
8
|
<meta name="generator" content="VitePress v1.6.4">
|
|
9
|
-
<link rel="preload stylesheet" href="/docs/assets/style.
|
|
9
|
+
<link rel="preload stylesheet" href="/docs/assets/style.CK3hwt6q.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.BQ8Hihdf.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\":\"6cLOW7--\",\"building-with-agents.md\":\"txrcGU2B\",\"concepts.md\":\"CqOsxbMU\",\"deployment.md\":\"CuK5SNjN\",\"evals.md\":\"BQXI3rXy\",\"example-agents_approval-buddy.md\":\"CIiZ9coo\",\"example-agents_benny.md\":\"l7JTmm8X\",\"example-agents_bugbot.md\":\"Dp5JqHSQ\",\"example-agents_codebase-wiki.md\":\"D-lteFf0\",\"example-agents_codeowners-review.md\":\"BU2ZXLf-\",\"example-agents_concierge.md\":\"DA2al_NK\",\"example-agents_fsd.md\":\"DPz9ezO4\",\"example-agents_index.md\":\"DgGBwckv\",\"example-agents_knowledge-base.md\":\"IneynQSR\",\"example-agents_oncall.md\":\"ZE0n6ZFN\",\"example-agents_security-reviewer.md\":\"Dkf1gyo6\",\"example-agents_slack-agent.md\":\"06jQXTAI\",\"example-agents_weather-agent.md\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"6cLOW7--\",\"building-with-agents.md\":\"txrcGU2B\",\"concepts.md\":\"CqOsxbMU\",\"deployment.md\":\"CuK5SNjN\",\"evals.md\":\"BQXI3rXy\",\"example-agents_approval-buddy.md\":\"CIiZ9coo\",\"example-agents_benny.md\":\"l7JTmm8X\",\"example-agents_bugbot.md\":\"Dp5JqHSQ\",\"example-agents_codebase-wiki.md\":\"D-lteFf0\",\"example-agents_codeowners-review.md\":\"BU2ZXLf-\",\"example-agents_concierge.md\":\"DA2al_NK\",\"example-agents_fsd.md\":\"DPz9ezO4\",\"example-agents_index.md\":\"DgGBwckv\",\"example-agents_knowledge-base.md\":\"IneynQSR\",\"example-agents_oncall.md\":\"ZE0n6ZFN\",\"example-agents_security-reviewer.md\":\"Dkf1gyo6\",\"example-agents_slack-agent.md\":\"06jQXTAI\",\"example-agents_weather-agent.md\":\"DC3lINjo\",\"guides_agent-to-agent.md\":\"Bmbxy-FA\",\"guides_cloud-runtime.md\":\"V5igN4Sq\",\"guides_github.md\":\"R2QlpR75\",\"guides_human-in-the-loop.md\":\"BWvT7UqY\",\"guides_mcp-oauth.md\":\"C7G7IykG\",\"guides_slack.md\":\"zriQpU_9\",\"guides_webhooks.md\":\"BERuBSJW\",\"hillclimbing.md\":\"yXqdlv2R\",\"index.md\":\"CmhptOmN\",\"quickstart.md\":\"C_b6ESpD\",\"reference_agent-config.md\":\"CRmkoxd6\",\"reference_artifacts.md\":\"BGG4bZo-\",\"reference_channels.md\":\"BIabFUAI\",\"reference_cli.md\":\"Byvrg8eu\",\"reference_connections.md\":\"CSQiNzre\",\"reference_hooks.md\":\"BGDw4VLm\",\"reference_http-api.md\":\"DGrw_wOu\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"_XdeMahr\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"gmfYzf_I\",\"reference_sessions.md\":\"DBVFi2Sx\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"DSrGLIuB\",\"reference_tools.md\":\"lSrsTxYJ\",\"scaffolding-agents.md\":\"mkc3B_ZW\",\"storage.md\":\"mQDtIULc\",\"troubleshooting.md\":\"B5RVX_tL\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Agent SDK\",\"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\":\"Host MCP OAuth\",\"link\":\"/guides/mcp-oauth\"},{\"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\":\"Artifacts\",\"link\":\"/reference/artifacts\"},{\"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>
|