@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
package/skills/debug/SKILL.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agentkit-debug
|
|
3
3
|
description: >-
|
|
4
|
-
Diagnose a misbehaving
|
|
4
|
+
Diagnose a misbehaving agentkit agent, server, or playground — blank
|
|
5
5
|
playground, sessions missing, HMR not reloading, failing reads/retry
|
|
6
6
|
loops, webhook 401s, 403/409 responses, approvals or reminders lost,
|
|
7
|
-
orphaned processes. Use when an
|
|
7
|
+
orphaned processes. Use when an agentkit project runs but behaves
|
|
8
8
|
wrong locally.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# Debugging
|
|
11
|
+
# Debugging agentkit locally
|
|
12
12
|
|
|
13
13
|
Read `framework-map/SKILL.md` (sibling skill) first if you don't know the
|
|
14
14
|
project structure or session model. Everything below assumes Node/tsx (`pnpm exec tsx
|
|
@@ -18,7 +18,7 @@ src/bin/agent-serve.ts ...` in the everysphere monorepo).
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
# 1. Is discovery clean? serve refuses to start on error diagnostics.
|
|
21
|
-
|
|
21
|
+
agentkit validate --dir <project>
|
|
22
22
|
|
|
23
23
|
# 2. What is actually running, and where?
|
|
24
24
|
lsof -iTCP:3000 -sTCP:LISTEN; lsof -iTCP:5273 -sTCP:LISTEN
|
|
@@ -37,11 +37,11 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
|
|
|
37
37
|
|
|
38
38
|
| Symptom | Cause / fix |
|
|
39
39
|
| --- | --- |
|
|
40
|
-
| Playground blank or "no agents" even though Vite assets are built | The SPA is static; it needs the
|
|
41
|
-
| Edits under `playground/src` don't show up in the browser | You're on the **static** `dist/playground` bundle, not HMR. Only `serve --dev` starts Vite HMR (`:5273`) and prints `playground
|
|
40
|
+
| Playground blank or "no agents" even though Vite assets are built | The SPA is static; it needs the agentkit backend on `:3000`. Start `serve` — building `dist/playground/` alone serves nothing. |
|
|
41
|
+
| Edits under `playground/src` don't show up in the browser | You're on the **static** `dist/playground` bundle, not HMR. Only `serve --dev` / `dev` starts Vite HMR (`:5273`) and prints that as `playground` — open that URL, not `:3000`. In the monorepo, `mise //packages/agent-serve:start` = all examples + multi-agent HMR; pin one slug with `AGENT_SERVE_BASE=/<slug>`. |
|
|
42
42
|
| Webhook / schedule sessions exist on disk but the playground session list is empty | The list shows the calling principal's sessions. `--dev` (loopback) or `--allow-anonymous` (trusted shared host) switches it to `includeAll`. Otherwise deep-link `/<slug>/playground?sessionId=ses_...` or read `sessions/` on disk. |
|
|
43
43
|
| Every built-in read/grep the model makes fails; turns crawl through retry loops | You ran the CLI under **Bun**. Kill it, rerun under Node/tsx. (`NGHTTP2_FRAME_SIZE_ERROR` in SDK logs is the tell.) |
|
|
44
|
-
| `gh webhook forward` / `
|
|
44
|
+
| `gh webhook forward` / `agentkit github forward` deliveries all 401 — but hook creation succeeded | `GITHUB_TOKEN`/`GH_TOKEN` in the env. The relay authenticates with the gh CLI login and rejects env tokens. `GITHUB_TOKEN= GH_TOKEN= agentkit github forward ...` |
|
|
45
45
|
| `Hook already exists` starting a forwarder | GitHub allows one forwarder per repo. Use one `github forward --dir <parent>` (it fans out to every matching channel) instead of N processes; kill stale forwarders. |
|
|
46
46
|
| Agent's answers reference monorepo rules / AGENTS.md it shouldn't know | Session workspace sits inside the monorepo, so the harness loaded ancestor config. `defineAgent({ local: { cwd } })` outside the repo, or `--state-root` under `/tmp`. |
|
|
47
47
|
| Port 3000/5273 in use; stray processes after crashes | `lsof -iTCP:3000 -sTCP:LISTEN`, kill the pids; also check companion processes (e.g. vite). |
|
|
@@ -49,11 +49,11 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
|
|
|
49
49
|
| Schedule / reminder never fires under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>` or `POST /<slug>/v1/dev/reminders/<id>` (list at `GET /v1/dev/reminders`). |
|
|
50
50
|
| Reminder disarmed after restart with `handler_lost_on_restart` | `run`-handler reminders are in-memory; re-arm them from the code path that created them (enroll hook / policy), or use prompt-based reminders. |
|
|
51
51
|
| `409` on a follow-up | Stale `continuationToken` (each accepted follow-up rotates it), busy session, or a task/schedule session (not followable). |
|
|
52
|
-
| `409 session_busy` on `
|
|
52
|
+
| `409 session_busy` on `agentkit call --session` | Session-bound deterministic calls serialize with model turns; wait or use an ephemeral call (drop `--session`). |
|
|
53
53
|
| `403` on stream/follow-up | Caller principal ≠ session owner. In dev, create and inspect with the same auth; beyond loopback pass `--bearer-token` and send it. |
|
|
54
54
|
| Works on localhost, 401/blocked through a tunnel or LAN | Default `localDevStrict()` auth only admits direct loopback, **rejects proxy-forwarding headers** (`X-Forwarded-For`, ...), and requires a loopback `Host`. Use `--bearer-token <secret>` (or authored `bearerAuth`) — `--allow-anonymous` only for trusted-network demos (and never with Cursor account MCP connections). |
|
|
55
55
|
| Channel route won't compile: body/query schema type error | `GET` requires a Zod `querySchema`, `POST`/`PUT`/`PATCH` a Zod `bodySchema` — plain JSON Schema objects don't type-check. Use `z.object({})` / `z.unknown()` for open surfaces. Empty POST bodies are coerced to `{}` before validation. |
|
|
56
|
-
| Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent. Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `
|
|
56
|
+
| Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent. Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agentkit slack doctor --prefix <PREFIX>`. |
|
|
57
57
|
| Turn fails immediately with an API-key error | Model turns need `CURSOR_API_KEY`; everything structural (validate/info/call/serve bring-up) doesn't. |
|
|
58
58
|
| Server tools / skills / sandbox silently absent | Runtime is `cloud` — those are local-only. `validate` prints exactly this warning; read it. |
|
|
59
59
|
| `validate` clean, `run` works, CI typecheck fails | tsx never typechecked it. See invariant 3 in `framework-map/SKILL.md` (JSON-shaped tool returns; `type` not `interface`). |
|
|
@@ -67,5 +67,5 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
|
|
|
67
67
|
preempted it — that's the designed behavior, not a crash.
|
|
68
68
|
- Escapes outside the session workspace in read/grep paths mean the
|
|
69
69
|
harness is fighting your evidence layout, not that the model is broken.
|
|
70
|
-
- `
|
|
70
|
+
- `agentkit trajectory --events <file>` renders any saved NDJSON; the
|
|
71
71
|
playground "Open trace" does the same visually.
|
package/skills/evals/SKILL.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agentkit-evals
|
|
3
3
|
description: >-
|
|
4
|
-
Author and run
|
|
4
|
+
Author and run agentkit defineEval cases (single- or multi-datapoint).
|
|
5
5
|
Use when writing, fixing, seeding, or hillclimbing evals; AskQuestion
|
|
6
6
|
whether to generate samples or upload data. Materialize API-backed
|
|
7
7
|
fixtures first. Live A/B metrics: defineAB (skills/ab), not defineEval.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# agentkit evals
|
|
11
11
|
|
|
12
12
|
Evals are the ratchet that makes iteration trustworthy: a fixed input, a
|
|
13
13
|
model turn, and gates over the recorded trajectory. They live at the
|
|
@@ -29,13 +29,13 @@ and does not replace `defineEval` gates.
|
|
|
29
29
|
(`evals/weather.eval.ts` + `{ id: "nyc" }` → `weather/nyc`).
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
agentkit eval --dir . --list # all datapoints
|
|
33
|
+
agentkit eval --dir . --json # run all
|
|
34
|
+
agentkit eval --dir . weather/nyc # one datapoint
|
|
35
|
+
agentkit eval --dir . weather # every datapoint in that file
|
|
36
|
+
agentkit eval --dir . weather forecast # several files
|
|
37
|
+
agentkit eval --dir . --tag smoke
|
|
38
|
+
agentkit eval --dir . --verbose
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
`eval` (like `run`) boots an ephemeral server on port 0 with a temp state
|
|
@@ -65,7 +65,7 @@ If `AskQuestion` is unavailable, ask the same fork in plain chat and wait.
|
|
|
65
65
|
|
|
66
66
|
Tell the user the **shape** of the data (see “The API” below) and **how to
|
|
67
67
|
upload it**. Do not invent cases until they provide files (or paste content
|
|
68
|
-
to write). After they add data, run `
|
|
68
|
+
to write). After they add data, run `agentkit eval --dir <project>
|
|
69
69
|
--list` to confirm discovery, then wire any missing gates.
|
|
70
70
|
|
|
71
71
|
If the uploaded data is **API-backed** (PR URLs, pinned SHAs, gold labels,
|
|
@@ -79,7 +79,7 @@ fixtures first** — see “When eval data needs API calls to render” below.
|
|
|
79
79
|
3. Optional fixtures beside the case or under `fixtures/`.
|
|
80
80
|
4. Tell the agent once the files are in place — or paste case bodies in chat
|
|
81
81
|
and ask the agent to write the file.
|
|
82
|
-
5. Verify: `
|
|
82
|
+
5. Verify: `agentkit eval --dir <project> --list` shows the new ids.
|
|
83
83
|
|
|
84
84
|
### Step 2b — user chose agent-generated samples
|
|
85
85
|
|
|
@@ -95,7 +95,7 @@ fixtures first** — see “When eval data needs API calls to render” below.
|
|
|
95
95
|
3. **Append** — prefer adding entries to an existing file’s `cases` array
|
|
96
96
|
when the suite fits; otherwise create a new `evals/<suite>.eval.ts` with
|
|
97
97
|
`cases`. Never overwrite or weaken an existing datapoint. Case ids must
|
|
98
|
-
not collide with `
|
|
98
|
+
not collide with `agentkit eval --dir <project> --list`.
|
|
99
99
|
4. Create `evals/evals.config.ts` if missing (`maxConcurrency: 20` is fine
|
|
100
100
|
for now; hard limit 200 for model provider request limits).
|
|
101
101
|
5. Re-list to confirm, then optionally run `--tag smoke` if you tagged any.
|
|
@@ -103,7 +103,7 @@ fixtures first** — see “When eval data needs API calls to render” below.
|
|
|
103
103
|
## The API
|
|
104
104
|
|
|
105
105
|
```ts
|
|
106
|
-
import { defineEval, includes, equals, satisfies } from "@
|
|
106
|
+
import { defineEval, includes, equals, satisfies } from "@cursor/july/evals";
|
|
107
107
|
|
|
108
108
|
// Single datapoint (case id = file path under evals/)
|
|
109
109
|
export default defineEval({
|
|
@@ -152,7 +152,7 @@ Project-wide defaults in `evals/evals.config.ts` (required once):
|
|
|
152
152
|
import {
|
|
153
153
|
defineEvalConfig,
|
|
154
154
|
persistEvalRunsToDir,
|
|
155
|
-
} from "@
|
|
155
|
+
} from "@cursor/july/evals";
|
|
156
156
|
|
|
157
157
|
export default defineEvalConfig({
|
|
158
158
|
maxConcurrency: 20, // required; hard-capped at 200 (model provider limits)
|
|
@@ -193,7 +193,7 @@ input instead — see fixtures).
|
|
|
193
193
|
| Agent surface | Fixture source |
|
|
194
194
|
| --- | --- |
|
|
195
195
|
| Chat / domain assistant | A canonical prompt string, chosen once and frozen |
|
|
196
|
-
| Tool-heavy | `
|
|
196
|
+
| Tool-heavy | `agentkit call <tool> --dir . --input '{...}'` first, then the prompt that should trigger it |
|
|
197
197
|
| GitHub webhook | `github replay … --dry-run --out fixtures/github` (see `packages/agent-serve/skills/github/SKILL.md`) |
|
|
198
198
|
| PR reviewer with host prep | A small fixed PR the team controls; assert on findings shape, not counts |
|
|
199
199
|
| Workspace-dependent | `workspaceFiles` in `t.send` — never machine-local paths |
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agentkit-framework-map
|
|
3
3
|
description: >-
|
|
4
|
-
Orientation for @
|
|
4
|
+
Orientation for @cursor/july — folder structure, local vs cloud
|
|
5
5
|
runtimes, sessions, state layout, and invariants (Node not Bun, root
|
|
6
6
|
evals/, typecheck after tsx). Use when creating, editing, or running
|
|
7
|
-
|
|
7
|
+
agentkit projects with agent/agent.ts and agent/instructions.md.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# agentkit framework map
|
|
11
11
|
|
|
12
|
-
`@
|
|
12
|
+
`@cursor/july` serves agents defined as ordinary files: markdown
|
|
13
13
|
for prose, TypeScript for typed behavior, under an `agent/` directory. The
|
|
14
14
|
framework discovers the files, compiles a manifest, and serves the agent
|
|
15
15
|
over HTTP/Slack/GitHub channels, with the Cursor SDK + harness as the
|
|
16
16
|
execution engine. Ground truth is the package `README.md` (full reference)
|
|
17
17
|
and `AGENTS.md` (coding-agent loop) — this skill is the map, not the spec.
|
|
18
18
|
|
|
19
|
-
Run the CLI as `
|
|
19
|
+
Run the CLI as `agentkit <cmd>`. In the everysphere monorepo there is no
|
|
20
20
|
installed bin — use:
|
|
21
21
|
|
|
22
22
|
```bash
|
package/skills/github/SKILL.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agentkit-github
|
|
3
3
|
description: >-
|
|
4
|
-
Build and test GitHub-webhook-driven
|
|
4
|
+
Build and test GitHub-webhook-driven agentkit agents: githubChannel
|
|
5
5
|
hooks (auth turn vs host task), signature modes, and testing tiers
|
|
6
6
|
(fixtures, github replay, github forward, serve --cursor-events). Use
|
|
7
7
|
when wiring GitHub events, replaying PR webhooks, or debugging delivery.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# GitHub channels in
|
|
10
|
+
# GitHub channels in agentkit
|
|
11
11
|
|
|
12
12
|
Author `agent/channels/github.ts` with `githubChannel()` from
|
|
13
|
-
`@
|
|
13
|
+
`@cursor/july/channels/github`. It mounts
|
|
14
14
|
`POST /<slug>/v1/channels/github` and publishes the events it dispatches on
|
|
15
15
|
(derived from declared hooks, or pinned via `webhookEvents`) so the CLI can
|
|
16
16
|
auto-derive forwarding.
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
|
-
import { defaultGitHubAuth, githubChannel } from "@
|
|
19
|
+
import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
20
20
|
|
|
21
21
|
export default githubChannel({
|
|
22
22
|
botName: "my-agent", // or GITHUB_APP_SLUG; used to ignore self-comments
|
|
@@ -81,9 +81,9 @@ is fine here), synthesizes GitHub-shaped payloads, signs them when a secret
|
|
|
81
81
|
is configured, and POSTs them at the channel. Fully deterministic.
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
agentkit github replay https://github.com/owner/repo/pull/123 --dir <project>
|
|
85
|
+
agentkit github replay owner/repo#123 --dir <project> --events '*' --conclusion failure
|
|
86
|
+
agentkit github replay owner/repo#123 --dir <project> --events '*' --dry-run --out fixtures/github
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
`--events` defaults to `pull_request` (`'*'` = the channel's declared
|
|
@@ -96,9 +96,9 @@ Wraps `gh webhook forward`: registers a real webhook and relays deliveries
|
|
|
96
96
|
to loopback. URL + events auto-derived; repo inferred from the git remote.
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
GITHUB_TOKEN= GH_TOKEN=
|
|
99
|
+
agentkit github doctor --install # one-time: gh + cli/gh-webhook
|
|
100
|
+
agentkit github events --dir <parent> --json # what would be forwarded
|
|
101
|
+
GITHUB_TOKEN= GH_TOKEN= agentkit github forward --dir <project>
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Traps, in order of hours lost:
|
|
@@ -121,11 +121,11 @@ Traps, in order of hours lost:
|
|
|
121
121
|
### 4. `serve --cursor-events` — pull from Cursor (`/v0/scm-events`)
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
|
|
124
|
+
agentkit serve --dir <project> --cursor-events --repo owner/repo
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
Reads the stream as the host's Cursor user, so it **requires sign-in**
|
|
128
|
-
(`
|
|
128
|
+
(`agentkit login` / `CURSOR_API_KEY`) — `serve` refuses to start signed
|
|
129
129
|
out instead of running a relay that can never receive events. No public URL
|
|
130
130
|
or repo admin. Registers before consuming; offset + consumer id under
|
|
131
131
|
`<state-root>/cursor-events/`. `CURSOR_API_BASE_URL` for a non-default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agentkit-hillclimb
|
|
3
3
|
description: >-
|
|
4
|
-
Iterate on a specific
|
|
4
|
+
Iterate on a specific agentkit agent by running the local server,
|
|
5
5
|
sending real requests, measuring correctness/efficiency, and proposing
|
|
6
6
|
the next harness or prompt change. Read this skill when improving an
|
|
7
7
|
existing agent.
|
|
@@ -9,9 +9,9 @@ paths:
|
|
|
9
9
|
- packages/agent-serve/**/*
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# Agentkit hillclimb
|
|
13
13
|
|
|
14
|
-
Optimize one
|
|
14
|
+
Optimize one agentkit agent project
|
|
15
15
|
with a tight measure → change → remeasure loop. Do not redesign the
|
|
16
16
|
whole framework; climb one concrete failure mode at a time. Sibling skills:
|
|
17
17
|
`framework-map` (orientation), `evals` (the ratchet), `ab` (live variant
|
|
@@ -36,15 +36,15 @@ If those are missing, ask before editing.
|
|
|
36
36
|
A climb over a moving input is noise. Before round 1:
|
|
37
37
|
|
|
38
38
|
- **GitHub agents** — replay, don't wait for live events:
|
|
39
|
-
`
|
|
39
|
+
`agentkit github replay <pr> --dir <project>` synthesizes signed,
|
|
40
40
|
GitHub-shaped payloads from read access only, identically every run;
|
|
41
41
|
`--dry-run --out fixtures/github` snapshots them for offline replay.
|
|
42
42
|
- **Tool behavior** — isolate host tools from the model with
|
|
43
|
-
`
|
|
43
|
+
`agentkit call <tool> --dir <project> --input '{...}'` (schema-validated,
|
|
44
44
|
in-process, no turn). If the tool output is wrong, no prompt change fixes it.
|
|
45
|
-
- **Chat agents** — `
|
|
45
|
+
- **Chat agents** — `agentkit run --dir <project> --message "<fixture>"`
|
|
46
46
|
gives a JSON trajectory plus an NDJSON trace under
|
|
47
|
-
`<project>/.agent-serve/traces/`; `
|
|
47
|
+
`<project>/.agent-serve/traces/`; `agentkit trajectory --events <file>`
|
|
48
48
|
re-summarizes any saved trace.
|
|
49
49
|
- **Manual probes** — the playground Try modal on any channel route
|
|
50
50
|
remembers your last body per endpoint and has Copy curl; a successful Try
|
|
@@ -59,7 +59,7 @@ Repeat until the user stops or fixtures meet the criteria.
|
|
|
59
59
|
- Serve with Node (never Bun):
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
|
|
62
|
+
agentkit serve --dir <project> --dev
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
- Hit the agent the way a user would (channel HTTP, playground, Slack in
|
|
@@ -119,7 +119,7 @@ State the hypothesis in one sentence: *“If we X, metric Y should move because
|
|
|
119
119
|
- **Ratchet every kept change**: land an eval that would have failed before
|
|
120
120
|
it (tool-choice gate, `action.result` count bound, output-shape regex —
|
|
121
121
|
see `evals/SKILL.md`), and never weaken an existing gate to make a round
|
|
122
|
-
pass. `
|
|
122
|
+
pass. `agentkit eval --dir <project> --json` is the regression check
|
|
123
123
|
between rounds.
|
|
124
124
|
|
|
125
125
|
Present a short round report to the user before starting the next climb.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agentkit-setup-slack
|
|
3
3
|
description: >-
|
|
4
|
-
Set up a Slack channel for an
|
|
4
|
+
Set up a Slack channel for an agentkit project — Socket Mode,
|
|
5
5
|
manifests, doctor, smoke test, and opt-in Slack tool approvals (HITL).
|
|
6
|
-
Read this skill when wiring Slack for an
|
|
6
|
+
Read this skill when wiring Slack for an agentkit project.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# Setup Slack for
|
|
9
|
+
# Setup Slack for agentkit
|
|
10
10
|
|
|
11
|
-
Use this skill when a human asks to wire Slack to an
|
|
11
|
+
Use this skill when a human asks to wire Slack to an agentkit agent.
|
|
12
12
|
|
|
13
13
|
## Goal
|
|
14
14
|
|
|
@@ -63,7 +63,7 @@ MY_AGENT_SLACK_APP_TOKEN=xapp-…
|
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
|
|
66
|
+
agentkit slack doctor --prefix MY_AGENT
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Stop when `app_token`, `connections_open`, `bot_token`, and `auth_test` are green.
|
|
@@ -71,10 +71,10 @@ Stop when `app_token`, `connections_open`, `bot_token`, and `auth_test` are gree
|
|
|
71
71
|
### Phase 4 — Serve + smoke (agent + human)
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
|
|
74
|
+
agentkit dev .
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Confirm log: `[
|
|
77
|
+
Confirm log: `[agentkit/slack] Socket Mode connected`.
|
|
78
78
|
|
|
79
79
|
When tokens are missing the channel logs
|
|
80
80
|
`channel idle reason=missing credentials need=…` and `serve` continues — useful
|
|
@@ -171,10 +171,10 @@ Requirements and caveats:
|
|
|
171
171
|
## CLI reference
|
|
172
172
|
|
|
173
173
|
```bash
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
agentkit slack setup
|
|
175
|
+
agentkit slack init --dir . --name "My Agent"
|
|
176
|
+
agentkit slack init --dir . --no-prefix
|
|
177
|
+
agentkit slack init --dir . --channel-posts # + message.channels/groups events
|
|
178
|
+
agentkit slack manifest --env both
|
|
179
|
+
agentkit slack doctor --prefix MY_AGENT
|
|
180
180
|
```
|