@cursor/july 0.1.94 → 0.1.96
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 +3 -4
- package/dist/channels/deployments/types.d.ts +1 -1
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/deployments/types.js +1 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +14 -2
- package/dist/channels/github/types.d.ts +18 -3
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/origin/api.d.ts +59 -13
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +168 -27
- package/dist/channels/origin/binding.d.ts +2 -2
- package/dist/channels/origin/checks.d.ts +6 -6
- package/dist/channels/origin/checks.js +6 -6
- package/dist/channels/origin/cursor-account.d.ts +5 -3
- package/dist/channels/origin/cursor-account.d.ts.map +1 -1
- package/dist/channels/origin/cursor-account.js +5 -3
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +11 -3
- package/dist/channels/origin/origin-webhook.d.ts +11 -1
- package/dist/channels/origin/origin-webhook.d.ts.map +1 -1
- package/dist/channels/origin/origin-webhook.js +23 -3
- package/dist/channels/origin/types.d.ts +8 -0
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/api.d.ts +9 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +36 -5
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +17 -46
- package/dist/channels/slack/dispatch.d.ts +7 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +47 -23
- package/dist/channels/slack/inbound.d.ts +8 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +32 -0
- package/dist/channels/slack/live-delivery.d.ts +26 -29
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +172 -73
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +5 -1
- package/dist/channels/slack/nudge-carrier.d.ts +2 -0
- package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
- package/dist/channels/slack/nudge-carrier.js +48 -1
- package/dist/channels/slack/pr-ref.d.ts +7 -1
- package/dist/channels/slack/pr-ref.d.ts.map +1 -1
- package/dist/channels/slack/pr-ref.js +42 -23
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +2 -2
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.CFDEas4I.js → app.jXleCmOc.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.B1IIYpYS.js → VPLocalSearchBox.8LhyglIT.js} +1 -1
- package/dist/docs/assets/chunks/{theme.Ct4NSiLm.js → theme.9ged-pr2.js} +2 -2
- package/dist/docs/assets/index.md.CI93Ltlb.js +5 -0
- package/dist/docs/assets/{index.md.DRakGHFe.lean.js → index.md.CI93Ltlb.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Cw6_ICYG.js → reference_cli.md.CCnG-nJx.js} +4 -2
- package/dist/docs/assets/{reference_cli.md.Cw6_ICYG.lean.js → reference_cli.md.CCnG-nJx.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.8son6Hjm.js → reference_skills.md.BFW9retM.js} +3 -3
- package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.js → templates_agentic-owners.md.BZSH4N9z.js} +1 -1
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +2 -0
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +1 -0
- package/dist/docs/assets/{templates_demo.md.DhFcWN6j.js → templates_demo.md.BeQX9V3H.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.DU7dQpor.js → templates_pr-autofixer.md.x5zl6-GT.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.DU7dQpor.lean.js → templates_pr-autofixer.md.x5zl6-GT.lean.js} +1 -1
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +4 -0
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +1 -0
- package/dist/docs/assets/{templates_security-reviewer.md.CTa7u_l1.js → templates_security-reviewer.md.lshxbCLK.js} +2 -2
- package/dist/docs/assets/{templates_security-reviewer.md.CTa7u_l1.lean.js → templates_security-reviewer.md.lshxbCLK.lean.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.CVlpctKS.js → templates_triage.md.Co4UNzkZ.js} +3 -3
- package/dist/docs/assets/{templates_triage.md.CVlpctKS.lean.js → templates_triage.md.Co4UNzkZ.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +4 -4
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +4 -4
- package/dist/docs/guides/opentelemetry.html +4 -4
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +5 -1
- package/dist/docs/llms-full.txt +189 -26
- package/dist/docs/llms.txt +2 -0
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +8 -6
- package/dist/docs/reference/cli.md +4 -1
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +7 -7
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +7 -7
- package/dist/docs/templates/agentic-owners.md +1 -1
- package/dist/docs/templates/code-wiki.html +28 -0
- package/dist/docs/templates/code-wiki.md +91 -0
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/demo.md +3 -2
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/pr-autofixer.md +7 -13
- package/dist/docs/templates/security-help.html +30 -0
- package/dist/docs/templates/security-help.md +65 -0
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/security-reviewer.md +1 -2
- package/dist/docs/templates/triage.html +7 -7
- package/dist/docs/templates/triage.md +2 -6
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/files-backends/cursor-hosted.d.ts +26 -0
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +32 -4
- package/dist/files.d.ts +2 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +5 -0
- package/dist/internal/advertise-tools.d.ts +2 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +15 -1
- package/dist/internal/bounded.d.ts +7 -0
- package/dist/internal/bounded.d.ts.map +1 -0
- package/dist/internal/bounded.js +32 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +142 -7
- package/dist/internal/conversation-mirror.d.ts +85 -0
- package/dist/internal/conversation-mirror.d.ts.map +1 -0
- package/dist/internal/conversation-mirror.js +312 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +22 -48
- package/dist/internal/cursor/session-token.d.ts +45 -0
- package/dist/internal/cursor/session-token.d.ts.map +1 -0
- package/dist/internal/cursor/session-token.js +99 -0
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +1 -0
- package/dist/internal/deferred-channel-session.d.ts +20 -0
- package/dist/internal/deferred-channel-session.d.ts.map +1 -0
- package/dist/internal/deferred-channel-session.js +62 -0
- package/dist/internal/deploy-client.d.ts +13 -1
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +11 -1
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +11 -5
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +22 -2
- package/dist/internal/framework-file-storage.d.ts +61 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -0
- package/dist/internal/framework-file-storage.js +204 -0
- package/dist/internal/framework-storage-selection.d.ts +38 -16
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +78 -17
- package/dist/internal/hosted-admission-context.d.ts +20 -0
- package/dist/internal/hosted-admission-context.d.ts.map +1 -0
- package/dist/internal/hosted-admission-context.js +31 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +5 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +33 -1
- package/dist/internal/hosted-delivery.d.ts +11 -2
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +79 -35
- package/dist/internal/hosted-managed-automation.d.ts +30 -0
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -0
- package/dist/internal/hosted-managed-automation.js +58 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +2 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +1 -3
- package/dist/internal/managed-delivery.d.ts +80 -0
- package/dist/internal/managed-delivery.d.ts.map +1 -0
- package/dist/internal/managed-delivery.js +86 -0
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +10 -98
- package/dist/internal/runtime-dispatch-runner.d.ts +5 -1
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +7 -0
- package/dist/internal/scm/pr-url.d.ts +14 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -0
- package/dist/internal/scm/pr-url.js +65 -0
- package/dist/internal/sdk-runner.d.ts +25 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +70 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +11 -2
- package/dist/internal/session-engine.d.ts +13 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +71 -3
- package/dist/internal/steering.d.ts +15 -0
- package/dist/internal/steering.d.ts.map +1 -0
- package/dist/internal/steering.js +18 -0
- package/dist/playground/assets/index-B1DDvBeC.css +1 -0
- package/dist/playground/assets/{index-B3JCyigB.js → index-Cx9CclK_.js} +47 -47
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +8 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +4 -3
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +5 -1
- package/docs/reference/cli.md +4 -1
- package/docs/templates/agentic-owners.md +1 -1
- package/docs/templates/code-wiki.md +96 -0
- package/docs/templates/demo.md +3 -2
- package/docs/templates/pr-autofixer.md +7 -13
- package/docs/templates/security-help.md +70 -0
- package/docs/templates/security-reviewer.md +1 -2
- package/docs/templates/triage.md +2 -6
- package/package.json +2 -2
- package/skills/ab/SKILL.md +13 -97
- package/skills/create-agent/SKILL.md +123 -223
- package/skills/debug/SKILL.md +34 -68
- package/skills/evals/SKILL.md +55 -180
- package/skills/framework-map/SKILL.md +83 -145
- package/skills/github/SKILL.md +53 -111
- package/skills/hillclimb/SKILL.md +40 -163
- package/skills/mcp-auth/SKILL.md +48 -107
- package/skills/otel/SKILL.md +22 -68
- package/skills/setup-slack/SKILL.md +77 -208
- package/src/channels/deployments/types.ts +1 -0
- package/src/channels/github/github-channel.ts +23 -8
- package/src/channels/github/types.ts +19 -2
- package/src/channels/origin/api.ts +242 -30
- package/src/channels/origin/binding.ts +2 -2
- package/src/channels/origin/checks.ts +6 -6
- package/src/channels/origin/cursor-account.ts +5 -3
- package/src/channels/origin/origin-channel.ts +13 -1
- package/src/channels/origin/origin-webhook.ts +27 -3
- package/src/channels/origin/types.ts +8 -0
- package/src/channels/slack/api.ts +41 -5
- package/src/channels/slack/defaults.ts +15 -49
- package/src/channels/slack/dispatch.ts +56 -22
- package/src/channels/slack/inbound.ts +43 -0
- package/src/channels/slack/live-delivery.ts +235 -114
- package/src/channels/slack/manifest.ts +5 -1
- package/src/channels/slack/nudge-carrier.ts +48 -1
- package/src/channels/slack/pr-ref.ts +56 -25
- package/src/channels/slack/slack-channel.ts +2 -0
- package/src/files-backends/cursor-hosted.ts +41 -2
- package/src/files.ts +11 -0
- package/src/internal/advertise-tools.ts +18 -2
- package/src/internal/bounded.ts +28 -0
- package/src/internal/cli-deploy.ts +183 -7
- package/src/internal/conversation-mirror.ts +406 -0
- package/src/internal/cursor/backend-client.ts +34 -58
- package/src/internal/cursor/session-token.ts +115 -0
- package/src/internal/cursor-agent-template.ts +1 -0
- package/src/internal/deferred-channel-session.ts +61 -0
- package/src/internal/deploy-client.ts +24 -1
- package/src/internal/deploy-manifest.ts +10 -5
- package/src/internal/discovery.ts +25 -2
- package/src/internal/framework-file-storage.ts +222 -0
- package/src/internal/framework-storage-selection.ts +101 -19
- package/src/internal/hosted-admission-context.ts +37 -0
- package/src/internal/hosted-delivery-protocol.ts +44 -1
- package/src/internal/hosted-delivery.ts +105 -40
- package/src/internal/hosted-managed-automation.ts +72 -0
- package/src/internal/init-project.ts +2 -0
- package/src/internal/install-cursor-skills.ts +1 -4
- package/src/internal/managed-delivery.ts +125 -0
- package/src/internal/review-comments.ts +10 -113
- package/src/internal/runtime-dispatch-runner.ts +10 -0
- package/src/internal/scm/pr-url.ts +95 -0
- package/src/internal/sdk-runner.ts +103 -0
- package/src/internal/server.ts +12 -0
- package/src/internal/session-engine.ts +76 -4
- package/src/internal/steering.ts +17 -0
- package/src/storage-backends/cursor-hosted.ts +10 -1
- package/src/types.ts +2 -1
- package/templates/agentic-owners/README.md +1 -1
- package/templates/agentic-owners/agent/agent.ts +0 -10
- package/templates/agentic-owners/agent/channels/github.ts +5 -14
- package/templates/agentic-owners/agent/lib/config.ts +0 -8
- package/templates/agentic-owners/agent/lib/review.ts +2 -15
- package/templates/agentic-owners/agent/tools/record_review.ts +2 -4
- package/templates/code-wiki/README.md +34 -0
- package/templates/code-wiki/agent/agent.ts +8 -0
- package/templates/code-wiki/agent/channels/github.ts +144 -0
- package/templates/code-wiki/agent/instructions.md +39 -0
- package/templates/code-wiki/agent/lib/repos.ts +5 -0
- package/templates/code-wiki/agent/lib/wiki.ts +22 -0
- package/templates/code-wiki/agent/tools/apply_wiki.ts +219 -0
- package/templates/code-wiki/evals/evals.config.ts +5 -0
- package/templates/code-wiki/evals/wiki.eval.ts +132 -0
- package/templates/code-wiki/init.json +25 -0
- package/templates/code-wiki/package.json +18 -0
- package/templates/code-wiki/tsconfig.json +12 -0
- package/templates/demo/agent/agent.ts +0 -10
- package/templates/pr-autofixer/README.md +0 -2
- package/templates/pr-autofixer/agent/agent.ts +0 -11
- package/templates/pr-autofixer/agent/channels/slack.ts +0 -7
- package/templates/pr-autofixer/agent/lib/pr-state.ts +5 -17
- package/templates/pr-autofixer/agent/lib/repos.ts +0 -1
- package/templates/security-help/README.md +2 -2
- package/templates/security-help/agent/agent.ts +1 -2
- package/templates/security-help/agent/channels/slack.ts +0 -3
- package/templates/security-help/agent/instructions.md +9 -10
- package/templates/security-help/agent/skills/access-request.md +1 -1
- package/templates/security-help/agent/skills/faq.md +31 -0
- package/templates/security-help/agent/skills/security-playbooks.md +1 -1
- package/templates/security-help/package.json +1 -2
- package/templates/security-reviewer/agent/agent.ts +0 -10
- package/templates/triage/agent/agent.ts +0 -10
- package/templates/triage/agent/channels/queue.ts +1 -1
- package/templates/triage/agent/channels/webhook.ts +1 -3
- package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +0 -1
- package/dist/docs/assets/index.md.DRakGHFe.js +0 -5
- package/dist/internal/deployment-scm-event-stream.d.ts +0 -116
- package/dist/internal/deployment-scm-event-stream.d.ts.map +0 -1
- package/dist/internal/deployment-scm-event-stream.js +0 -474
- package/dist/playground/assets/index-D9N7-q97.css +0 -1
- package/src/internal/deployment-scm-event-stream.ts +0 -593
- package/templates/security-help/agent/knowledge/faq/approvals.md +0 -5
- package/templates/security-help/agent/knowledge/faq/channels.md +0 -6
- package/templates/security-help/agent/knowledge/faq/phishing.md +0 -10
- package/templates/security-help/agent/skills/security-first-pass.md +0 -15
- /package/dist/docs/assets/{reference_skills.md.8son6Hjm.lean.js → reference_skills.md.BFW9retM.lean.js} +0 -0
- /package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.lean.js → templates_agentic-owners.md.BZSH4N9z.lean.js} +0 -0
- /package/dist/docs/assets/{templates_demo.md.DhFcWN6j.lean.js → templates_demo.md.BeQX9V3H.lean.js} +0 -0
package/skills/debug/SKILL.md
CHANGED
|
@@ -1,78 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-debug
|
|
3
3
|
description: >-
|
|
4
|
-
Diagnose a misbehaving Agent SDK agent
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
orphaned processes. Use when an Agent SDK project runs but behaves
|
|
8
|
-
wrong locally.
|
|
4
|
+
Diagnose a misbehaving local Agent SDK agent: blank playground,
|
|
5
|
+
missing sessions, failed reads, webhook 401s, 403/409, lost
|
|
6
|
+
approvals. Use when a project runs but behaves wrong locally.
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
# Debugging the Agent SDK locally
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
Local `agent-sdk serve`. Hosted start or health failures:
|
|
12
|
+
`docs/troubleshooting.md` and `docs/deployment.md`.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
1. **Validate.** `agent-sdk validate --dir <project>`
|
|
15
|
+
2. **Info.** `curl -s http://127.0.0.1:3000/<slug>/v1/info | jq .`
|
|
16
|
+
3. **Trace.** Session events under the project state directory.
|
|
17
|
+
Then match the table.
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
project structure or session model. Everything below assumes Node/tsx (`pnpm exec tsx
|
|
22
|
-
src/bin/agent-serve.ts ...` in the everysphere monorepo).
|
|
23
|
-
|
|
24
|
-
## Triage in order
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# 1. Is discovery clean? serve refuses to start on error diagnostics.
|
|
28
|
-
agent-sdk validate --dir <project>
|
|
29
|
-
|
|
30
|
-
# 2. What is actually running, and where?
|
|
31
|
-
lsof -iTCP:3000 -sTCP:LISTEN; lsof -iTCP:5273 -sTCP:LISTEN
|
|
32
|
-
ps aux | rg -i 'agent-serve|vite' | rg -v rg
|
|
33
|
-
|
|
34
|
-
# 3. What does the server think it serves?
|
|
35
|
-
curl -s localhost:3000/v1/agents | jq . # multi-agent index
|
|
36
|
-
curl -s localhost:3000/<slug>/v1/info | jq . # per-agent surface
|
|
37
|
-
|
|
38
|
-
# 4. What did the session actually do? The stream never lies.
|
|
39
|
-
curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
|
|
40
|
-
# or read <stateRoot>/<slug>/sessions/<id>/events.ndjson directly
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Symptom → cause
|
|
44
|
-
|
|
45
|
-
| Symptom | Cause / fix |
|
|
19
|
+
| Symptom | Fix |
|
|
46
20
|
| --- | --- |
|
|
47
|
-
| Playground blank
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| `
|
|
52
|
-
| `Hook already exists`
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
| Port 3000
|
|
56
|
-
|
|
|
57
|
-
| Schedule / reminder
|
|
58
|
-
|
|
|
59
|
-
| `409` on
|
|
60
|
-
| `
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- `actions.requested` / `action.result` pairs are the tool trajectory;
|
|
72
|
-
count them by `toolName` before blaming latency, and split **host** work
|
|
73
|
-
(channel `callTool`, prep) from **model** tools.
|
|
74
|
-
- `turn.failed` with `"turn interrupted"` means a follow-up or `/stop`
|
|
75
|
-
preempted it — that's the designed behavior, not a crash.
|
|
76
|
-
- Escapes outside the session workspace in read/grep paths mean the
|
|
77
|
-
harness is fighting your evidence layout, not that the model is broken.
|
|
78
|
-
- `agent-sdk trajectory --events <file>` renders any saved NDJSON.
|
|
21
|
+
| Playground blank / "no agents" | Start `serve`. A built SPA with no backend serves nothing. |
|
|
22
|
+
| Playground UI edits do not show | Open the URL `serve --dev` prints as `playground`, not `:3000`. |
|
|
23
|
+
| Sessions on disk, empty playground list | List is the calling principal. `--dev` or `--allow-anonymous` shows all. Or `?sessionId=ses_...`. |
|
|
24
|
+
| Built-in read/grep fail; retry loops | Bun. Rerun under Node. The tell is `NGHTTP2_FRAME_SIZE_ERROR`. |
|
|
25
|
+
| `github forward` 401s; hook created | Blank `GITHUB_TOKEN`/`GH_TOKEN`. Relay uses `gh` login. |
|
|
26
|
+
| `Hook already exists` | One forwarder per repo. `forward --dir <parent>`. |
|
|
27
|
+
| Answers cite ancestor `AGENTS.md` | Nested checkout. Default `local.cwd` is a cache directory under `~/.cache`. |
|
|
28
|
+
| Model lists IDE `cursor` tools, never MCP | `advertiseTools: true`. Check `GET /v1/info`. |
|
|
29
|
+
| Port 3000 in use | `lsof -iTCP:3000 -sTCP:LISTEN` and kill that pid. |
|
|
30
|
+
| Approval vanished after restart | Parked calls do not survive restart. Re-run. |
|
|
31
|
+
| Schedule / reminder silent under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>`. |
|
|
32
|
+
| `409` on follow-up | Stale `continuationToken`, busy session, or a task session. |
|
|
33
|
+
| `409 session_busy` on `call --session` | Wait, or drop `--session`. |
|
|
34
|
+
| `403` on stream | Wrong principal. Same auth as create; beyond loopback send `--bearer-token`. |
|
|
35
|
+
| Works on loopback, blocked via tunnel | `localDevStrict()` rejects forwarded headers. Use `--bearer-token`. Never `--allow-anonymous` with account MCP. |
|
|
36
|
+
| Slack `channel idle … missing credentials` | Expected. `slack doctor --prefix <PREFIX>`. |
|
|
37
|
+
| Immediate API-key error | Model turns need `CURSOR_API_KEY`. |
|
|
38
|
+
| Approvals or sandbox seeds missing | `runtime: "cloud"`. Those are local only. `validate` warns. |
|
|
39
|
+
| `validate` clean, CI typecheck fails | tsx skipped types. JSON-shaped returns; `type` not `interface`. |
|
|
40
|
+
|
|
41
|
+
Count `action.result` by `toolName` before blaming latency.
|
|
42
|
+
`turn.failed` + `"turn interrupted"` is a follow-up or stop, not a
|
|
43
|
+
crash. `agent-sdk trajectory --events <file>` renders a saved
|
|
44
|
+
trace.
|
package/skills/evals/SKILL.md
CHANGED
|
@@ -1,129 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-evals
|
|
3
3
|
description: >-
|
|
4
|
-
Author and run
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Author and run defineEval cases. Use when writing, fixing, seeding,
|
|
5
|
+
or hillclimbing evals. Ask whether to generate samples or take
|
|
6
|
+
uploaded data. Materialize API-backed fixtures first. Live A/B is
|
|
7
|
+
defineAB (skills/ab), not defineEval.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Agent SDK evals
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Fixed input, model turn, gates on the trajectory. Files live at
|
|
13
|
+
project-root `evals/**/*.eval.ts`. `agent/evals/` is ignored.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**project root** `evals/**/*.eval.ts` (never `agent/evals/` — that slot is
|
|
18
|
-
ignored).
|
|
19
|
-
|
|
20
|
-
For **live A/B metrics** while the agent serves traffic, use `defineAB`
|
|
21
|
-
under `agent/ab` (`packages/agent-serve/skills/ab/SKILL.md`). That plug-in
|
|
22
|
-
enrolls via sticky `split` and calls `onSample`; it is not a test runner
|
|
23
|
-
and does not replace `defineEval` gates.
|
|
24
|
-
|
|
25
|
-
**Identity**
|
|
26
|
-
|
|
27
|
-
- File id = path under `evals/` without `.eval.ts`
|
|
28
|
-
(`evals/weather.eval.ts` → `weather`).
|
|
29
|
-
- Single datapoint (`test`): case id = file id
|
|
30
|
-
(`evals/weather/nyc.eval.ts` → `weather/nyc`).
|
|
31
|
-
- Multiple datapoints (`cases`): case id = `<fileId>/<case.id>`
|
|
32
|
-
(`evals/weather.eval.ts` + `{ id: "nyc" }` → `weather/nyc`).
|
|
15
|
+
Live traffic variants: `skills/ab/SKILL.md`. That is not a test
|
|
16
|
+
runner.
|
|
33
17
|
|
|
34
18
|
```bash
|
|
35
|
-
agent-sdk eval --dir . --list
|
|
36
|
-
agent-sdk eval --dir . --json
|
|
37
|
-
agent-sdk eval --dir . weather/nyc
|
|
38
|
-
agent-sdk eval --dir . weather # every datapoint in that file
|
|
39
|
-
agent-sdk eval --dir . weather forecast # several files
|
|
19
|
+
agent-sdk eval --dir . --list
|
|
20
|
+
agent-sdk eval --dir . --json
|
|
21
|
+
agent-sdk eval --dir . weather/nyc
|
|
40
22
|
agent-sdk eval --dir . --tag smoke
|
|
41
|
-
agent-sdk eval --dir . --verbose
|
|
42
23
|
```
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Seeding / adding samples (required fork)
|
|
25
|
+
| Form | Case id |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `evals/weather.eval.ts` + `test` | `weather` |
|
|
28
|
+
| `evals/weather/nyc.eval.ts` + `test` | `weather/nyc` |
|
|
29
|
+
| `evals/weather.eval.ts` + `{ id: "nyc" }` | `weather/nyc` |
|
|
50
30
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
assume a source of fixtures.
|
|
31
|
+
`eval` boots an ephemeral server and a temp state root. `--url`
|
|
32
|
+
points at a running agent. Model turns need `CURSOR_API_KEY`.
|
|
54
33
|
|
|
55
|
-
|
|
34
|
+
## Seeding
|
|
56
35
|
|
|
57
|
-
|
|
58
|
-
label it `(recommended)`. Do **not** put code blocks inside the question
|
|
59
|
-
prompt (they render poorly); keep the prompt short plain text.
|
|
36
|
+
Creating or expanding cases: `AskQuestion` first.
|
|
60
37
|
|
|
61
38
|
| Question | Options |
|
|
62
39
|
| --- | --- |
|
|
63
40
|
| **How should we get eval samples?** | Generate test eval samples for me `(recommended)` · I will add / upload the data manually |
|
|
64
41
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
If the uploaded data is **API-backed** (PR URLs, pinned SHAs, gold labels,
|
|
75
|
-
snapshot ids) rather than self-contained prompts/diffs, **materialize
|
|
76
|
-
fixtures first** — see “When eval data needs API calls to render” below.
|
|
77
|
-
|
|
78
|
-
**How to upload:**
|
|
79
|
-
|
|
80
|
-
1. Add or edit `.eval.ts` files under the project’s `evals/` directory.
|
|
81
|
-
2. Ensure `evals/evals.config.ts` exists with `maxConcurrency`.
|
|
82
|
-
3. Optional fixtures beside the case or under `fixtures/`.
|
|
83
|
-
4. Tell the agent once the files are in place — or paste case bodies in chat
|
|
84
|
-
and ask the agent to write the file.
|
|
85
|
-
5. Verify: `agent-sdk eval --dir <project> --list` shows the new ids.
|
|
86
|
-
|
|
87
|
-
### Step 2b — user chose agent-generated samples
|
|
88
|
-
|
|
89
|
-
1. Use `AskQuestion` again for count (single-select), recommended first:
|
|
90
|
-
|
|
91
|
-
| Question | Options |
|
|
92
|
-
| --- | --- |
|
|
93
|
-
| **How many test samples should I create?** | `3` `(recommended)` · `5` · `10` · Other (enter a number) |
|
|
94
|
-
|
|
95
|
-
2. Inspect the agent (tools, instructions, existing `evals/`) and invent
|
|
96
|
-
that many **distinct** datapoints: frozen prompts + decision/shape gates,
|
|
97
|
-
not exact prose. Follow “What good cases assert” below.
|
|
98
|
-
3. **Append** — prefer adding entries to an existing file’s `cases` array
|
|
99
|
-
when the suite fits; otherwise create a new `evals/<suite>.eval.ts` with
|
|
100
|
-
`cases`. Never overwrite or weaken an existing datapoint. Case ids must
|
|
101
|
-
not collide with `agent-sdk eval --dir <project> --list`.
|
|
102
|
-
4. Create `evals/evals.config.ts` if missing (`maxConcurrency: 20` is fine
|
|
103
|
-
for now; hard limit 200 for model provider request limits).
|
|
104
|
-
5. Re-list to confirm, then optionally run `--tag smoke` if you tagged any.
|
|
42
|
+
1. **Manual.** They provide files or paste. Show the shape below.
|
|
43
|
+
Do not invent cases. Then `eval --list` and wire gates.
|
|
44
|
+
API-backed pointers (PR URLs, SHAs, gold labels): materialize
|
|
45
|
+
under `fixtures/` first.
|
|
46
|
+
2. **Generated.** Ask count (`3` recommended). Append to an
|
|
47
|
+
existing `cases` array when it fits. Never overwrite or weaken
|
|
48
|
+
a datapoint. Create `evals/evals.config.ts` if missing
|
|
49
|
+
(`maxConcurrency: 20`; cap 200).
|
|
105
50
|
|
|
106
|
-
##
|
|
51
|
+
## API
|
|
107
52
|
|
|
108
53
|
```ts
|
|
109
|
-
import { defineEval, includes,
|
|
54
|
+
import { defineEval, includes, satisfies } from "@cursor/july/evals";
|
|
110
55
|
|
|
111
|
-
// Single datapoint (case id = file path under evals/)
|
|
112
|
-
export default defineEval({
|
|
113
|
-
description: "Uses get_weather for temperature questions.",
|
|
114
|
-
tags: ["smoke"],
|
|
115
|
-
timeoutMs: 120_000,
|
|
116
|
-
async test(t) {
|
|
117
|
-
await t.send("What's the temperature in NYC?");
|
|
118
|
-
t.succeeded();
|
|
119
|
-
t.calledTool("get_weather");
|
|
120
|
-
t.notCalledTool("save_weather_note");
|
|
121
|
-
t.messageIncludes(/°|[FC]/);
|
|
122
|
-
t.check(t.reply, includes("NYC"));
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
// Multiple datapoints in one file (ids = <fileId>/<case.id>)
|
|
127
56
|
export default defineEval({
|
|
128
57
|
tags: ["smoke", "weather"],
|
|
129
58
|
cases: [
|
|
@@ -134,100 +63,46 @@ export default defineEval({
|
|
|
134
63
|
await t.send("What's the temperature in NYC?");
|
|
135
64
|
t.succeeded();
|
|
136
65
|
t.calledTool("get_weather");
|
|
66
|
+
t.notCalledTool("save_weather_note");
|
|
137
67
|
t.check(t.reply, includes(/°|[FC]/));
|
|
138
68
|
},
|
|
139
69
|
},
|
|
140
|
-
{
|
|
141
|
-
id: "paris",
|
|
142
|
-
async test(t) {
|
|
143
|
-
await t.send("What's the weather in Paris?");
|
|
144
|
-
t.succeeded();
|
|
145
|
-
t.calledTool("get_weather");
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
70
|
],
|
|
149
71
|
});
|
|
150
72
|
```
|
|
151
73
|
|
|
152
|
-
Project-wide defaults in `evals/evals.config.ts` (required once):
|
|
153
|
-
|
|
154
74
|
```ts
|
|
155
|
-
import {
|
|
156
|
-
defineEvalConfig,
|
|
157
|
-
persistEvalRunsToDir,
|
|
158
|
-
} from "@cursor/july/evals";
|
|
75
|
+
import { defineEvalConfig } from "@cursor/july/evals";
|
|
159
76
|
|
|
160
77
|
export default defineEvalConfig({
|
|
161
|
-
maxConcurrency: 20,
|
|
162
|
-
// Playground batches are memory-only unless you set persistRuns:
|
|
163
|
-
// maxPlaygroundRuns: 50, // optional; default 20; playground history only
|
|
164
|
-
// persistRuns: persistEvalRunsToDir(".agent-serve/eval-runs"),
|
|
78
|
+
maxConcurrency: 20,
|
|
165
79
|
});
|
|
166
80
|
```
|
|
167
81
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Options: `workspaceDir`, `workspaceFiles` (`{ path: contents }` seeded
|
|
172
|
-
before the first turn). Multiple `t.send` calls share the session.
|
|
173
|
-
- `t.reply` / `t.events` / `t.sessionId` for assertions and correlation.
|
|
174
|
-
- `t.metric(name, value)` — structured scores on the case snapshot (playground
|
|
175
|
-
badges + CLI). Prefer this over encoding scores only in `t.log`.
|
|
176
|
-
- Builders: `includes(string | RegExp)`, `equals(value)`,
|
|
177
|
-
`satisfies(predicate, label)`.
|
|
178
|
-
|
|
179
|
-
### Playground customization (optional)
|
|
180
|
-
|
|
181
|
-
Drop `agent/playground/evals.tsx` exporting `agentName` (must match
|
|
182
|
-
`defineAgent({ name })`) and
|
|
183
|
-
`default: { RunSummary?, CaseMetrics?, CaseExtras? }`. The playground
|
|
184
|
-
loads these via Vite glob (`factory/*`). Without a
|
|
185
|
-
module, cases still show default `t.metric` badges.
|
|
186
|
-
|
|
187
|
-
## What good cases assert
|
|
188
|
-
|
|
189
|
-
Gate **decisions and shape, not prose**. Model wording varies run to run;
|
|
190
|
-
tool choice, tool avoidance, and output structure shouldn't.
|
|
191
|
-
|
|
192
|
-
1. `t.succeeded()` — always, first.
|
|
193
|
-
2. The tool decision: `calledTool` for the intended path, `notCalledTool`
|
|
194
|
-
for the tempting wrong one (the pair is stronger than either alone).
|
|
195
|
-
3. Output shape: a regex for the contract (`/°|[FC]/`, a JSON marker, a
|
|
196
|
-
findings-block fence) — not exact sentences.
|
|
197
|
-
4. For structured output, parse `t.reply` and `t.check` fields with
|
|
198
|
-
`satisfies` rather than substring-matching JSON.
|
|
199
|
-
5. When a shape gate keeps failing on model formatting, tighten the output
|
|
200
|
-
contract in instructions and re-run — do not move rendering into a host
|
|
201
|
-
tool to make the gate pass. That trades a prompt fix for permanent code.
|
|
202
|
-
|
|
203
|
-
Anti-patterns: asserting exact phrasing; more than ~5 gates in one case
|
|
204
|
-
(split it); cases that depend on live external state that drifts (pin the
|
|
205
|
-
input instead — see fixtures).
|
|
206
|
-
|
|
207
|
-
## Fixture strategy by agent type
|
|
208
|
-
|
|
209
|
-
| Agent surface | Fixture source |
|
|
210
|
-
| --- | --- |
|
|
211
|
-
| Chat / domain assistant | A canonical prompt string, chosen once and frozen |
|
|
212
|
-
| Tool-heavy | `agent-sdk call <tool> --dir . --input '{...}'` first, then the prompt that should trigger it |
|
|
213
|
-
| GitHub webhook | `github replay … --dry-run --out fixtures/github` (see `packages/agent-serve/skills/github/SKILL.md`) |
|
|
214
|
-
| PR reviewer with host prep | A small fixed PR the team controls; assert on findings shape, not counts |
|
|
215
|
-
| Workspace-dependent | `workspaceFiles` in `t.send` — never machine-local paths |
|
|
82
|
+
Either `test(t)` or `cases`, not both. `t.send` waits for park/fail.
|
|
83
|
+
`workspaceFiles` seeds the first turn. Assert with `t.succeeded()`,
|
|
84
|
+
`calledTool` / `notCalledTool`, `t.check(t.reply, …)`, `t.metric`.
|
|
216
85
|
|
|
217
|
-
|
|
86
|
+
## What to gate
|
|
218
87
|
|
|
219
|
-
|
|
220
|
-
self-contained evidence, do **not** wire live `t.send(prUrl)` matrices.
|
|
221
|
-
Materialize once under `fixtures/` at pinned SHAs, point cases at those
|
|
222
|
-
files, gate on decision/shape against gold, and keep a tiny `--tag smoke`
|
|
223
|
-
subset for any full-pipeline runs.
|
|
88
|
+
Decisions and shape, not prose.
|
|
224
89
|
|
|
225
|
-
|
|
90
|
+
1. `t.succeeded()` first
|
|
91
|
+
2. Intended tool + the tempting wrong one
|
|
92
|
+
3. A shape regex or `satisfies` on parsed fields
|
|
93
|
+
4. If formatting keeps failing, tighten instructions. Do not move
|
|
94
|
+
rendering into a host tool.
|
|
226
95
|
|
|
227
|
-
|
|
228
|
-
|
|
96
|
+
Anti-patterns: exact phrasing; more than ~5 gates (split); live
|
|
97
|
+
drifting inputs (pin them).
|
|
229
98
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
99
|
+
| Surface | Fixture |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| Chat | One frozen prompt |
|
|
102
|
+
| Tool-heavy | `agent-sdk call` first, then the prompt |
|
|
103
|
+
| GitHub | `github replay … --dry-run --out fixtures/github` |
|
|
104
|
+
| Host-prep PR review | A team-owned PR; gate findings shape, not counts |
|
|
105
|
+
| Workspace | `workspaceFiles` in `t.send` |
|
|
106
|
+
|
|
107
|
+
Every kept hillclimb change lands an eval that would have failed
|
|
108
|
+
before it. Never weaken a gate to pass a round.
|