@cursor/july 0.1.2 → 0.1.4
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 +16 -5
- package/README.md +8 -9
- package/dist/bin/agent-serve.d.ts +3 -1
- package/dist/bin/agent-serve.d.ts.map +1 -1
- package/dist/bin/agent-serve.js +416 -155
- package/dist/channels/slack/log.d.ts +1 -1
- package/dist/channels/slack/log.d.ts.map +1 -1
- package/dist/channels/slack/log.js +4 -5
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/socket-mode.d.ts.map +1 -1
- package/dist/channels/slack/socket-mode.js +10 -9
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.Oje4vhlk.js → app.DF-Yx4OP.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.0XrheBv2.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.H5XZ2zCB.js → VPLocalSearchBox.DSeJSudL.js} +1 -1
- package/dist/docs/assets/chunks/{theme.CTR_TuaE.js → theme.DZVLTXOC.js} +2 -2
- package/dist/docs/assets/{index.md.m81y7TY7.js → index.md.Cylk70gg.js} +1 -1
- package/dist/docs/assets/{quickstart.md.CfU8_uTC.js → quickstart.md.BU6Iwi_9.js} +18 -6
- package/dist/docs/assets/{reference_cli.md.DA730zCu.js → reference_cli.md.Bv6pOxcF.js} +11 -6
- package/dist/docs/assets/{reference_cli.md.DA730zCu.lean.js → reference_cli.md.Bv6pOxcF.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/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/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 +5 -5
- package/dist/docs/quickstart.html +22 -10
- package/dist/docs/reference/agent-config.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +14 -9
- 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/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/internal/ab-collector.js +3 -3
- package/dist/internal/ab-fold.js +1 -1
- package/dist/internal/chat-client.d.ts +29 -3
- package/dist/internal/chat-client.d.ts.map +1 -1
- package/dist/internal/chat-client.js +180 -27
- package/dist/internal/cli-ax.d.ts +83 -2
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +626 -52
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +8 -36
- package/dist/internal/cli-deploy.d.ts +59 -3
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +316 -38
- package/dist/internal/cli-github.js +13 -13
- package/dist/internal/cursor/account-mcp.js +3 -3
- package/dist/internal/cursor/backend-client.js +1 -1
- package/dist/internal/cursor/credentials.d.ts +14 -3
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +21 -6
- package/dist/internal/cursor/github-credentials.js +3 -3
- package/dist/internal/cursor-event-relay.js +1 -1
- package/dist/internal/cursor-relay-core.d.ts +1 -1
- package/dist/internal/cursor-relay-core.d.ts.map +1 -1
- package/dist/internal/cursor-relay-core.js +2 -1
- package/dist/internal/cursor-slack-relay.js +1 -1
- package/dist/internal/deploy-client.d.ts +9 -1
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +23 -3
- package/dist/internal/deploy-source.d.ts +35 -0
- package/dist/internal/deploy-source.d.ts.map +1 -0
- package/dist/internal/deploy-source.js +118 -0
- package/dist/internal/discovery.d.ts +11 -0
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +43 -14
- package/dist/internal/distribution.d.ts +7 -0
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +7 -0
- package/dist/internal/docs-site.js +3 -3
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +10 -9
- package/dist/internal/eval-runner.d.ts +2 -0
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +2 -0
- package/dist/internal/event-mapper.d.ts +54 -1
- package/dist/internal/event-mapper.d.ts.map +1 -1
- package/dist/internal/event-mapper.js +151 -41
- package/dist/internal/github-fanout.js +2 -2
- package/dist/internal/host-platforms.js +5 -5
- package/dist/internal/init-project.d.ts +88 -1
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +221 -31
- package/dist/internal/install-cursor-skills.d.ts +64 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -0
- package/dist/internal/install-cursor-skills.js +274 -0
- package/dist/internal/logs-client.d.ts +60 -0
- package/dist/internal/logs-client.d.ts.map +1 -0
- package/dist/internal/logs-client.js +311 -0
- package/dist/internal/mcp-endpoint.d.ts.map +1 -1
- package/dist/internal/mcp-endpoint.js +1 -1
- package/dist/internal/open-browser.d.ts +5 -0
- package/dist/internal/open-browser.d.ts.map +1 -0
- package/dist/internal/open-browser.js +34 -0
- package/dist/internal/playground/toolchain.d.ts.map +1 -1
- package/dist/internal/playground/toolchain.js +19 -14
- package/dist/internal/playground-proxy.d.ts +69 -0
- package/dist/internal/playground-proxy.d.ts.map +1 -0
- package/dist/internal/playground-proxy.js +468 -0
- package/dist/internal/prompt-context.d.ts +35 -0
- package/dist/internal/prompt-context.d.ts.map +1 -0
- package/dist/internal/prompt-context.js +71 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +11 -11
- package/dist/internal/request-headers.d.ts +11 -0
- package/dist/internal/request-headers.d.ts.map +1 -0
- package/dist/internal/request-headers.js +14 -0
- package/dist/internal/resolve-prod-target.d.ts +44 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -0
- package/dist/internal/resolve-prod-target.js +134 -0
- package/dist/internal/resolved-connections.js +5 -5
- package/dist/internal/run-client.d.ts +2 -2
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +38 -23
- package/dist/internal/schedule-runner.js +1 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +23 -17
- package/dist/internal/session-engine.d.ts +1 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +34 -19
- package/dist/internal/sessions-client.d.ts +34 -0
- package/dist/internal/sessions-client.d.ts.map +1 -0
- package/dist/internal/sessions-client.js +193 -0
- package/dist/internal/storage-coordinator.js +6 -6
- package/dist/internal/stream-progress.d.ts.map +1 -1
- package/dist/internal/stream-progress.js +31 -3
- package/dist/internal/terminal-style.d.ts +22 -0
- package/dist/internal/terminal-style.d.ts.map +1 -0
- package/dist/internal/terminal-style.js +49 -0
- package/dist/internal/trajectory.d.ts +10 -5
- package/dist/internal/trajectory.d.ts.map +1 -1
- package/dist/internal/trajectory.js +82 -10
- package/dist/internal/update-check.d.ts +93 -0
- package/dist/internal/update-check.d.ts.map +1 -0
- package/dist/internal/update-check.js +431 -0
- package/dist/internal/workspace.d.ts +11 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +38 -4
- package/dist/playground/assets/index-Ct_Usdm8.css +1 -0
- package/dist/playground/assets/index-Dsyb-Vaj.js +319 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +29 -2
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +0 -1
- package/docs/quickstart.md +22 -7
- package/docs/reference/cli.md +51 -3
- package/package.json +4 -1
- package/skills/ab/SKILL.md +8 -8
- package/skills/create-agent/SKILL.md +28 -22
- package/skills/debug/SKILL.md +11 -11
- package/skills/evals/SKILL.md +16 -16
- package/skills/framework-map/SKILL.md +6 -6
- package/skills/github/SKILL.md +13 -13
- package/skills/hillclimb/SKILL.md +10 -10
- package/skills/setup-slack/SKILL.md +14 -14
- package/src/bin/agent-serve.ts +451 -191
- package/src/channels/slack/log.ts +5 -5
- package/src/channels/slack/setup.ts +1 -1
- package/src/channels/slack/socket-mode.ts +11 -9
- package/src/internal/ab-collector.ts +3 -3
- package/src/internal/ab-fold.ts +1 -1
- package/src/internal/chat-client.ts +252 -37
- package/src/internal/cli-ax.ts +761 -72
- package/src/internal/cli-cursor.ts +14 -42
- package/src/internal/cli-deploy.ts +428 -49
- package/src/internal/cli-github.ts +13 -15
- package/src/internal/cursor/account-mcp.ts +3 -3
- package/src/internal/cursor/backend-client.ts +1 -1
- package/src/internal/cursor/credentials.ts +26 -7
- package/src/internal/cursor/github-credentials.ts +3 -3
- package/src/internal/cursor-event-relay.ts +1 -1
- package/src/internal/cursor-relay-core.ts +4 -2
- package/src/internal/cursor-slack-relay.ts +1 -1
- package/src/internal/deploy-client.ts +45 -4
- package/src/internal/deploy-source.ts +133 -0
- package/src/internal/discovery.ts +53 -16
- package/src/internal/distribution.ts +8 -0
- package/src/internal/docs-site.ts +3 -3
- package/src/internal/eval-run-store.ts +10 -11
- package/src/internal/eval-runner.ts +5 -0
- package/src/internal/event-mapper.ts +222 -42
- package/src/internal/github-fanout.ts +2 -2
- package/src/internal/host-platforms.ts +5 -5
- package/src/internal/init-project.ts +333 -51
- package/src/internal/install-cursor-skills.ts +327 -0
- package/src/internal/logs-client.ts +442 -0
- package/src/internal/mcp-endpoint.ts +1 -3
- package/src/internal/open-browser.ts +41 -0
- package/src/internal/playground/toolchain.ts +18 -16
- package/src/internal/playground-proxy.ts +576 -0
- package/src/internal/prompt-context.ts +95 -0
- package/src/internal/reminder-runner.ts +11 -17
- package/src/internal/request-headers.ts +23 -0
- package/src/internal/resolve-prod-target.ts +182 -0
- package/src/internal/resolved-connections.ts +5 -5
- package/src/internal/run-client.ts +39 -36
- package/src/internal/schedule-runner.ts +1 -1
- package/src/internal/server.ts +25 -16
- package/src/internal/session-engine.ts +35 -18
- package/src/internal/sessions-client.ts +216 -0
- package/src/internal/storage-coordinator.ts +6 -6
- package/src/internal/stream-progress.ts +36 -2
- package/src/internal/terminal-style.ts +74 -0
- package/src/internal/trajectory.ts +91 -13
- package/src/internal/update-check.ts +552 -0
- package/src/internal/workspace.ts +42 -4
- package/src/types.ts +45 -7
- package/dist/docs/assets/chunks/@localSearchIndexroot.zwQ9RCQ7.js +0 -1
- package/dist/playground/assets/index-B1Qc9h2u.css +0 -1
- package/dist/playground/assets/index-CpDYCj8W.js +0 -79
- /package/dist/docs/assets/{index.md.m81y7TY7.lean.js → index.md.Cylk70gg.lean.js} +0 -0
- /package/dist/docs/assets/{quickstart.md.CfU8_uTC.lean.js → quickstart.md.BU6Iwi_9.lean.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared logging for the Slack channel pack.
|
|
3
3
|
*
|
|
4
4
|
* Uses the same `(line: string) => void` contract as ServeOptions.logger.
|
|
5
|
-
* Lines always start with `[
|
|
5
|
+
* Lines always start with `[agentkit/slack]` so Socket Mode docs and greps
|
|
6
6
|
* keep working. Optional key=value fields carry correlation ids.
|
|
7
7
|
*/
|
|
8
8
|
export type SlackLogWrite = (line: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/log.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/log.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG,MAAM,CACjC,MAAM,EACN,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAC7C,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1D,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACzD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACzD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CAC3D;AAED,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,MAAM,CAgBpE;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,cAAc,GACtB,MAAM,CAGR;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,GAAE,aAA2C,GACjD,QAAQ,CAqBV;AAED,sDAAsD;AACtD,eAAO,MAAM,eAAe,EAAE,QAA8B,CAAC"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Shared logging for the Slack channel pack.
|
|
3
3
|
*
|
|
4
4
|
* Uses the same `(line: string) => void` contract as ServeOptions.logger.
|
|
5
|
-
* Lines always start with `[
|
|
5
|
+
* Lines always start with `[agentkit/slack]` so Socket Mode docs and greps
|
|
6
6
|
* keep working. Optional key=value fields carry correlation ids.
|
|
7
7
|
*/
|
|
8
|
+
import { SLACK_LOG_PREFIX } from "../../internal/distribution.js";
|
|
8
9
|
/** Format `key=value` pairs; omit null/undefined. */
|
|
9
10
|
export function formatSlackLogFields(fields) {
|
|
10
11
|
if (fields === undefined) {
|
|
@@ -24,7 +25,7 @@ export function formatSlackLogFields(fields) {
|
|
|
24
25
|
}
|
|
25
26
|
export function formatSlackLogLine(level, message, fields) {
|
|
26
27
|
const levelTag = level === "info" ? "" : `${level} `;
|
|
27
|
-
return
|
|
28
|
+
return `${SLACK_LOG_PREFIX} ${levelTag}${message}${formatSlackLogFields(fields)}`;
|
|
28
29
|
}
|
|
29
30
|
export function createSlackLogger(write = (line) => console.log(line)) {
|
|
30
31
|
const emit = (level, message, fields) => {
|
|
@@ -33,9 +34,7 @@ export function createSlackLogger(write = (line) => console.log(line)) {
|
|
|
33
34
|
return {
|
|
34
35
|
write(line) {
|
|
35
36
|
// Preserve Socket Mode messages that already include the prefix.
|
|
36
|
-
write(line.startsWith(
|
|
37
|
-
? line
|
|
38
|
-
: `[agent-serve/slack] ${line}`);
|
|
37
|
+
write(line.startsWith(SLACK_LOG_PREFIX) ? line : `${SLACK_LOG_PREFIX} ${line}`);
|
|
39
38
|
},
|
|
40
39
|
debug: (message, fields) => emit("debug", message, fields),
|
|
41
40
|
info: (message, fields) => emit("info", message, fields),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-mode.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/socket-mode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"socket-mode.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/socket-mode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AA+DD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CA6DhC"}
|
|
@@ -14,6 +14,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
import { LogLevel, SocketModeClient } from "@slack/socket-mode";
|
|
17
|
+
import { SLACK_LOG_PREFIX } from "../../internal/distribution.js";
|
|
17
18
|
function createBridgeLogger(write) {
|
|
18
19
|
let level = LogLevel.INFO;
|
|
19
20
|
const rank = {
|
|
@@ -29,7 +30,7 @@ function createBridgeLogger(write) {
|
|
|
29
30
|
const text = msgs
|
|
30
31
|
.map((m) => (typeof m === "string" ? m : JSON.stringify(m)))
|
|
31
32
|
.join(" ");
|
|
32
|
-
write(
|
|
33
|
+
write(`${SLACK_LOG_PREFIX} Socket Mode ${text}`);
|
|
33
34
|
};
|
|
34
35
|
return {
|
|
35
36
|
debug: (...msgs) => emit(LogLevel.DEBUG, msgs),
|
|
@@ -41,7 +42,7 @@ function createBridgeLogger(write) {
|
|
|
41
42
|
},
|
|
42
43
|
getLevel: () => level,
|
|
43
44
|
setName() {
|
|
44
|
-
// Name is unused;
|
|
45
|
+
// Name is unused; agentkit prefixes lines itself.
|
|
45
46
|
},
|
|
46
47
|
};
|
|
47
48
|
}
|
|
@@ -51,12 +52,12 @@ function invokeHandler(log, label, handler, payload) {
|
|
|
51
52
|
if (result !== undefined &&
|
|
52
53
|
typeof result.then === "function") {
|
|
53
54
|
void Promise.resolve(result).catch((error) => {
|
|
54
|
-
log(
|
|
55
|
+
log(`${SLACK_LOG_PREFIX} Socket Mode ${label} failed: ${errorMessage(error)}`);
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
catch (error) {
|
|
59
|
-
log(
|
|
60
|
+
log(`${SLACK_LOG_PREFIX} Socket Mode ${label} failed: ${errorMessage(error)}`);
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
function errorMessage(error) {
|
|
@@ -77,18 +78,18 @@ export function startSlackSocketMode(options) {
|
|
|
77
78
|
autoReconnectEnabled: true,
|
|
78
79
|
});
|
|
79
80
|
client.on("connected", () => {
|
|
80
|
-
write(
|
|
81
|
+
write(`${SLACK_LOG_PREFIX} Socket Mode connected`);
|
|
81
82
|
});
|
|
82
83
|
client.on("reconnecting", () => {
|
|
83
|
-
write(
|
|
84
|
+
write(`${SLACK_LOG_PREFIX} Socket Mode reconnecting`);
|
|
84
85
|
});
|
|
85
86
|
client.on("disconnected", () => {
|
|
86
|
-
write(
|
|
87
|
+
write(`${SLACK_LOG_PREFIX} Socket Mode disconnected`);
|
|
87
88
|
});
|
|
88
89
|
client.on("slack_event", (evt) => {
|
|
89
90
|
// ACK immediately (3s envelope budget); then dispatch off-path.
|
|
90
91
|
void Promise.resolve(evt.ack()).catch((error) => {
|
|
91
|
-
write(
|
|
92
|
+
write(`${SLACK_LOG_PREFIX} Socket Mode ACK failed: ${errorMessage(error)}`);
|
|
92
93
|
});
|
|
93
94
|
if (evt.type === "events_api") {
|
|
94
95
|
if (evt.body !== undefined) {
|
|
@@ -108,7 +109,7 @@ export function startSlackSocketMode(options) {
|
|
|
108
109
|
stop() {
|
|
109
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
111
|
yield client.disconnect();
|
|
111
|
-
write(
|
|
112
|
+
write(`${SLACK_LOG_PREFIX} Socket Mode stopped`);
|
|
112
113
|
});
|
|
113
114
|
},
|
|
114
115
|
};
|
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.DF-Yx4OP.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\":\"DTKwE15Z\",\"evals.md\":\"DAgEc_hL\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_slack.md\":\"CCwqHvSV\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"DTKwE15Z\",\"evals.md\":\"DAgEc_hL\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_slack.md\":\"CCwqHvSV\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"Cylk70gg\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"Bv6pOxcF\",\"reference_connections.md\":\"zaEYCLHT\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"Dx_nmDG6\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DdjWabnN\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"CqgJroI0\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"CVnInNiN\",\"troubleshooting.md\":\"DkovjS7h\"}");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\":\"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\":\"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\":\"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>
|
package/dist/docs/ab.html
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
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.DF-Yx4OP.js"></script>
|
|
13
13
|
<link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/docs/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.DZVLTXOC.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
16
|
<link rel="modulepreload" href="/docs/assets/ab.md.BMCZ6Hd7.lean.js">
|
|
17
17
|
<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>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Save aggregate snapshots whenever GET /v1/abs runs</span></span>
|
|
82
82
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> persistSnapshots: </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">persistABSnapshotsToDir</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">".agent-serve/ab-snapshots"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">),</span></span>
|
|
83
83
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code>maxPlaygroundSessions</code></td><td><code>200</code></td><td>Max newest sessions folded into the playground / <code>GET /v1/abs</code> (not session logs or <code>persistSamples</code>)</td></tr><tr><td><code>persistSamples</code></td><td>unset</td><td>Durable sink for metric samples (<code>save(sample, ctx)</code>)</td></tr><tr><td><code>persistSnapshots</code></td><td>unset</td><td>Durable store for aggregate snapshots (<code>load</code> / <code>save</code> / optional <code>delete</code>)</td></tr><tr><td><code>retainSnapshots</code></td><td><code>20</code> when snapshots persist</td><td>Snapshot files kept after prune (<code>persistABSnapshotsToDir</code> honors this)</td></tr></tbody></table><p>Implement your own <code>{ save }</code> / <code>{ load, save, delete? }</code> for S3, a DB, or your metrics vendor. Without <code>persistSamples</code> / <code>persistSnapshots</code>, samples only go where each experiment's <code>onSample</code> sends them, and aggregates exist only as a live fold over session logs.</p><h2 id="keep-assignments-durable" tabindex="-1">Keep assignments durable <a class="header-anchor" href="#keep-assignments-durable" aria-label="Permalink to "Keep assignments durable""></a></h2><p>The append-only <code>events.ndjson</code> stream is the source of truth. Each <code>ab.assigned</code> event persists a variant key or null skip. Built-in metrics come from the turn and tool events that follow it.</p><p>After a server restart or a parked session resumes, the live collector replays the stream to rebuild cumulative counters. Replay does not call <code>onSample</code> (or <code>persistSamples</code>) for historical turns. Only a new completed or failed turn emits another sample.</p><p>The snapshot API also replays <code>derive</code> across the full stream, so custom totals match the current extractor. Changing a derive function can change historical snapshot totals. Treat metric definitions as versioned experiment code.</p><h2 id="keep-eval-traffic-separate" tabindex="-1">Keep eval traffic separate <a class="header-anchor" href="#keep-eval-traffic-separate" aria-label="Permalink to "Keep eval traffic separate""></a></h2><p>Sessions created by <code>agentkit eval</code> and the playground Evals runner use <code>purpose: "eval"</code>. They skip A/B enrollment entirely:</p><ul><li>No split function runs.</li><li>No <code>ab.assigned</code> event is recorded.</li><li>No <code>onSample</code> callback fires.</li><li>The session is omitted from <code>GET /v1/abs</code>.</li></ul><p>Ordinary chat, <code>agentkit run</code>, Slack, GitHub, and other channel sessions use the live purpose. You do not need <code>splitIf</code> to exclude eval traffic.</p><h2 id="know-the-boundaries" tabindex="-1">Know the boundaries <a class="header-anchor" href="#know-the-boundaries" aria-label="Permalink to "Know the boundaries""></a></h2><p><code>defineAB</code> provides sticky assignment, variant instructions, <code>session.abs</code> for tools, cumulative metrics, and local inspection. It does not provide:</p><ul><li>A test command, assertion API, or pass/fail result</li><li>Statistical significance calculations</li><li>An experiment rollout or lifecycle service</li><li>Per-variant model or runtime configuration</li><li>A built-in analytics warehouse (bring your own via <code>persistSamples</code> / <code>persistSnapshots</code> / <code>onSample</code>)</li></ul><p>Use <a href="./evals.html">evals</a> to protect known behavior. Configure <code>agent/ab.config.ts</code> (or <code>onSample</code>) when you need sample/snapshot exports beyond the session event log.</p><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./evals.html">Evals</a>: pass/fail regression checks on fixed inputs</li><li><a href="./hillclimbing.html">Hillclimbing</a>: improve an agent against fixed fixtures</li><li><a href="./reference/hooks.html">Hooks</a>: other event-stream consumers</li><li><a href="./reference/sessions.html">Sessions and streaming</a>: the <code>ab.assigned</code> event and durable log</li><li><a href="./reference/playground.html">Playground</a>: the A/Bs tab</li><li><a href="./reference/http-api.html">HTTP API</a>: <code>GET /v1/abs</code></li><li><a href="./../skills/ab/SKILL.html">Live A/B metrics skill</a>: have a coding agent wire an experiment</li></ul></div></div></main><footer class="VPDocFooter" data-v-53b9fda6 data-v-3958cc3f><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-3958cc3f><span class="visually-hidden" id="doc-footer-aria-label" data-v-3958cc3f>Pager</span><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link prev" href="/docs/evals.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Previous page</span><span class="title" data-v-3958cc3f>Evals</span><!--]--></a></div><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link next" href="/docs/storage.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Next page</span><span class="title" data-v-3958cc3f>Storage</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
84
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"DTKwE15Z\",\"evals.md\":\"DAgEc_hL\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_slack.md\":\"CCwqHvSV\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"
|
|
84
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"DTKwE15Z\",\"evals.md\":\"DAgEc_hL\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_slack.md\":\"CCwqHvSV\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"Cylk70gg\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"Bv6pOxcF\",\"reference_connections.md\":\"zaEYCLHT\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"Dx_nmDG6\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DdjWabnN\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"CqgJroI0\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"CVnInNiN\",\"troubleshooting.md\":\"DkovjS7h\"}");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\":\"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\":\"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\":\"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>
|
|
85
85
|
|
|
86
86
|
</body>
|
|
87
87
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as p}from"./chunks/theme.
|
|
1
|
+
import{t as p}from"./chunks/theme.DZVLTXOC.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.CAZyNGu9.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
|