@cursor/bdk 0.2.5 → 0.2.6
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/dist/bin/agent-serve.js +17 -11
- package/dist/channels/github/github-channel.d.ts +4 -4
- package/dist/channels/github/github-channel.js +5 -5
- package/dist/channels/slack/eval-directive.js +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.94Iu5dyD.js → app.CJLKDVza.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bq-pxRXm.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DTKFDlBr.js → VPLocalSearchBox.BW9mrQmq.js} +1 -1
- package/dist/docs/assets/chunks/{arc.DuzwHEeg.js → arc.D8ZOvM1m.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C6lyhLs0.js → architectureDiagram-Q4EWVU46.CXEKhLW-.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.DUNEWlY8.js → baseUniq.BJkVKblr.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CXOQGI0O.js → blockDiagram-DXYQGD6D.DQDbHxor.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BYdPE-Oe.js → c4Diagram-AHTNJAMY.ByMD6LYM.js} +1 -1
- package/dist/docs/assets/chunks/channel.DCU8W1RP.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.YIV9HeX0.js → chunk-4BX2VUAB.Dtq1aVI9.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BG80DEOc.js → chunk-4TB4RGXK.BL_XrkoQ.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BDKJSZQc.js → chunk-55IACEB6.BDPXu94_.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CtYnQqts.js → chunk-EDXVE4YY.DhGOQj4k.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CityOth-.js → chunk-FMBD7UC4.DSF5nr8v.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CMD22CQX.js → chunk-OYMX7WX6.Day7wayw.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.WWpc3ND0.js → chunk-QZHKN3VN.CpBEC0zA.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BMg-yhj3.js → chunk-YZCP3GAM.X_7rY1rx.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DwpXsM06.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DwpXsM06.js +1 -0
- package/dist/docs/assets/chunks/clone.DH6Mx2zB.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.Buu_LC5q.js → cose-bilkent-S5V4N54A.BVRmi2ko.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.DW7onj6E.js → dagre-KV5264BT.Dei9oslB.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.B3NxIbEV.js → diagram-5BDNPKRD._M-efGt7.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BJvN6Vkv.js → diagram-G4DWMVQ6.D1Vmhfsj.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.wfRWrexs.js → diagram-MMDJMWI5.cE1bmvAC.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.7QtjSYio.js → diagram-TYMM5635.DkXAfznP.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.jxPgDH1t.js → erDiagram-SMLLAGMA.DH_pSwPg.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BhDWA-TO.js → flowDiagram-DWJPFMVM.kAWVN9j1.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.Ijq8iYKv.js → ganttDiagram-T4ZO3ILL.8r0w49-p.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DXpfW4YG.js → gitGraphDiagram-UUTBAWPF.BDa7Bi1i.js} +1 -1
- package/dist/docs/assets/chunks/{graph.CoPlssRl.js → graph.BMPXHz_B.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.eJuv_EOz.js → infoDiagram-42DDH7IO.BmlcqewS.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A._OEzenCR.js → ishikawaDiagram-UXIWVN3A.CVSEQSul.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CwlTjirB.js → journeyDiagram-VCZTEJTY.BpeWJ5n-.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DSp_C8cZ.js → kanban-definition-6JOO6SKY.DHbDXuxB.js} +1 -1
- package/dist/docs/assets/chunks/{layout.Bms9s7uB.js → layout.CzrCDgkP.js} +1 -1
- package/dist/docs/assets/chunks/{linear.BjnmB4je.js → linear.HwBsflwN.js} +1 -1
- package/dist/docs/assets/chunks/{min.CKkYlMsn.js → min.DqGHolT3.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.T2d0vJ7X.js → mindmap-definition-QFDTVHPH.ZYGlOawh.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.DU0RoCvx.js → pieDiagram-DEJITSTG.C2KRXlNR.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.9QZjM-x0.js → quadrantDiagram-34T5L4WZ.CHj3Qefp.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CZpylJMd.js → requirementDiagram-MS252O5E.B1L4Tf7k.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CnFdfW95.js → sankeyDiagram-XADWPNL6.dNR2yi1B.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.-jC0PP1t.js → sequenceDiagram-FGHM5R23.BrvQ3C6m.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DG7yBRUU.js → stateDiagram-FHFEXIEX.BtehEykA.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.kzD0-U89.js +1 -0
- package/dist/docs/assets/chunks/{theme.B3O9koXV.js → theme.BDHBZUkP.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bf9u4Ebb.js → timeline-definition-GMOUNBTQ.Bn7nhqEN.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.BjhbbYE6.js → vennDiagram-DHZGUBPP.DKhc38sz.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.DOXQ0w8J.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.8fRb4Nb5.js → wardleyDiagram-NUSXRM2D.Bbq5B2Ic.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DoOP3zZM.js → xychartDiagram-5P7HB3ND.B77HE1K8.js} +1 -1
- package/dist/docs/assets/{evals.md.LRCSn6Ik.js → evals.md.C851kViu.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.C0guGcH0.js → reference_skills.md.ClkMoQsV.js} +3 -3
- package/dist/docs/assets/{templates_agentic-owners.md.vtjfwxbf.js → templates_agentic-owners.md.CvmABtia.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.vtjfwxbf.lean.js → templates_agentic-owners.md.CvmABtia.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.CX9l9bcg.js → templates_security-reviewer.md.Gh6EF9Us.js} +3 -2
- package/dist/docs/assets/{templates_security-reviewer.md.CX9l9bcg.lean.js → templates_security-reviewer.md.Gh6EF9Us.lean.js} +1 -1
- package/dist/docs/assets/{templates_thermo-quality-review.md.95qmTmr1.js → templates_thermo-quality-review.md.B77UyTrX.js} +1 -1
- package/dist/docs/assets/{templates_thermo-review.md.DQh6Q0C-.js → templates_thermo-review.md.DRJ7mC5U.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.BFlQhWXf.js → templates_triage.md.CNN6b0JZ.js} +3 -3
- package/dist/docs/assets/{templates_triage.md.BFlQhWXf.lean.js → templates_triage.md.CNN6b0JZ.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +35 -35
- package/dist/docs/evals.html +37 -37
- package/dist/docs/evals.md +2 -2
- package/dist/docs/guides/agent-to-agent.html +35 -35
- package/dist/docs/guides/bitbucket.html +35 -35
- package/dist/docs/guides/cloud-agents.html +35 -35
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +35 -35
- package/dist/docs/guides/hooks.html +35 -35
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +35 -35
- package/dist/docs/guides/mcp-oauth.html +35 -35
- package/dist/docs/guides/opentelemetry.html +35 -35
- package/dist/docs/guides/slack.html +35 -35
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +35 -35
- package/dist/docs/llms-full.txt +21 -15
- package/dist/docs/quickstart.html +35 -35
- package/dist/docs/reference/agent-config.html +35 -35
- package/dist/docs/reference/artifacts.html +35 -35
- package/dist/docs/reference/channels.html +35 -35
- package/dist/docs/reference/cli.html +35 -35
- package/dist/docs/reference/connections.html +35 -35
- package/dist/docs/reference/evals.html +35 -35
- package/dist/docs/reference/extensions.html +35 -35
- package/dist/docs/reference/hooks.html +35 -35
- package/dist/docs/reference/http-api.html +35 -35
- package/dist/docs/reference/instructions.html +35 -35
- package/dist/docs/reference/playground.html +35 -35
- package/dist/docs/reference/project-layout.html +35 -35
- package/dist/docs/reference/prompt.html +35 -35
- package/dist/docs/reference/schedules.html +35 -35
- package/dist/docs/reference/sessions.html +35 -35
- package/dist/docs/reference/skills.html +38 -38
- package/dist/docs/reference/subagents.html +35 -35
- package/dist/docs/reference/tools.html +35 -35
- package/dist/docs/templates/agentic-owners.html +37 -37
- package/dist/docs/templates/agentic-owners.md +2 -0
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +38 -37
- package/dist/docs/templates/security-reviewer.md +7 -8
- package/dist/docs/templates/thermo-quality-review.html +37 -37
- package/dist/docs/templates/thermo-quality-review.md +2 -2
- package/dist/docs/templates/thermo-review.html +37 -37
- package/dist/docs/templates/thermo-review.md +2 -2
- package/dist/docs/templates/triage.html +38 -38
- package/dist/docs/templates/triage.md +6 -1
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/evals.d.ts +2 -2
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +14 -7
- package/dist/internal/eval-runner.js +7 -4
- package/dist/internal/init-interview.d.ts +0 -1
- package/dist/internal/init-interview.d.ts.map +1 -1
- package/dist/internal/init-interview.js +15 -24
- package/dist/internal/legacy-command-guard.d.ts +4 -1
- package/dist/internal/legacy-command-guard.d.ts.map +1 -1
- package/dist/internal/legacy-command-guard.js +11 -2
- package/dist/internal/platform-timers.d.ts +8 -1
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +10 -2
- package/dist/internal/reminder-control-plane-protocol.d.ts +8 -1
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-runner.d.ts +5 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +27 -1
- package/dist/internal/resolve-prod-target.d.ts +3 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +2 -1
- package/dist/internal/run-client.d.ts +10 -1
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +152 -51
- package/dist/internal/server.d.ts +6 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +20 -8
- package/dist/internal/session-links.d.ts.map +1 -1
- package/dist/internal/session-links.js +8 -7
- package/dist/internal/sessions-client.d.ts +1 -0
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +2 -0
- package/docs/evals.md +2 -2
- package/docs/templates/agentic-owners.md +2 -0
- package/docs/templates/security-reviewer.md +7 -8
- package/docs/templates/thermo-quality-review.md +2 -2
- package/docs/templates/thermo-review.md +2 -2
- package/docs/templates/triage.md +6 -1
- package/package.json +1 -1
- package/templates/agents-md/evals/agents.eval.ts +1 -0
- package/templates/code-wiki/bot/instructions.md +4 -4
- package/templates/security-reviewer/README.md +5 -3
- package/templates/security-reviewer/bot/tools/post_findings.ts +8 -8
- package/templates/thermo-quality-review/bot/tools/post_findings.ts +8 -8
- package/templates/thermo-review/bot/tools/post_findings.ts +8 -8
- package/dist/docs/assets/chunks/@localSearchIndexroot.BITLoOQa.js +0 -1
- package/dist/docs/assets/chunks/channel.B46uXH41.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.0cmCFsSf.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.0cmCFsSf.js +0 -1
- package/dist/docs/assets/chunks/clone.1vTOFZT1.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CbsZcOOu.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.DEA21akR.js +0 -162
- /package/dist/docs/assets/{evals.md.LRCSn6Ik.lean.js → evals.md.C851kViu.lean.js} +0 -0
- /package/dist/docs/assets/{reference_skills.md.C0guGcH0.lean.js → reference_skills.md.ClkMoQsV.lean.js} +0 -0
- /package/dist/docs/assets/{templates_thermo-quality-review.md.95qmTmr1.lean.js → templates_thermo-quality-review.md.B77UyTrX.lean.js} +0 -0
- /package/dist/docs/assets/{templates_thermo-review.md.DQh6Q0C-.lean.js → templates_thermo-review.md.DRJ7mC5U.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/internal/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiDH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAQhB,YAAY,EACb,MAAM,aAAa,CAAC;AA2FrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAgDpE,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAUpE,OAAO,EAEL,wBAAwB,EAEzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAsB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAW/E,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;CACvB;AAuCD,6EAA6E;AAC7E,MAAM,WAAW,0BAA0B;IACzC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,yEAAyE;IACzE,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;IAC5D,wEAAwE;IACxE,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/internal/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiDH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAQhB,YAAY,EACb,MAAM,aAAa,CAAC;AA2FrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAgDpE,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAUpE,OAAO,EAEL,wBAAwB,EAEzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAsB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAW/E,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;CACvB;AAuCD,6EAA6E;AAC7E,MAAM,WAAW,0BAA0B;IACzC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,yEAAyE;IACzE,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;IAC5D,wEAAwE;IACxE,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE,YAAY,GAAG,0BAA+B,GACtD,OAAO,CAAC,gBAAgB,CAAC,CAwmC3B"}
|
package/dist/internal/server.js
CHANGED
|
@@ -177,7 +177,9 @@ export function startServer(mounts_1) {
|
|
|
177
177
|
explicitRepos: (_o = (_b = options.cursorEvents) === null || _b === void 0 ? void 0 : _b.repos) !== null && _o !== void 0 ? _o : [],
|
|
178
178
|
targets: cursorOriginTargets,
|
|
179
179
|
});
|
|
180
|
-
const effectiveCursorEvents =
|
|
180
|
+
const effectiveCursorEvents = options.evals === true
|
|
181
|
+
? undefined
|
|
182
|
+
: ((_p = cursorGithubConfig.cursorEvents) !== null && _p !== void 0 ? _p : (cursorOriginScope === undefined ? undefined : { repos: [...cursorOriginScope.repos] }));
|
|
181
183
|
// One resolution for every Cursor credential consumer (SDK runner, account
|
|
182
184
|
// MCP bridge, SCM event relay, GitHub credentials): explicit option →
|
|
183
185
|
// CURSOR_API_KEY → CURSOR_API_KEY_FILE (or the hosted default path) →
|
|
@@ -788,7 +790,15 @@ export function startServer(mounts_1) {
|
|
|
788
790
|
validateMountConnectionsConfig(Object.assign(Object.assign({ slug,
|
|
789
791
|
project, accountRefs: accountRefsBySlug.get(slug) }, (options.publicUrl === undefined ? {} : { publicUrl: options.publicUrl })), { cloudToolsBridge: options.cloudToolsUrl !== undefined }));
|
|
790
792
|
}
|
|
791
|
-
|
|
793
|
+
try {
|
|
794
|
+
yield cursorGithubCredentials === null || cursorGithubCredentials === void 0 ? void 0 : cursorGithubCredentials.start();
|
|
795
|
+
}
|
|
796
|
+
catch (error) {
|
|
797
|
+
if (options.evals !== true) {
|
|
798
|
+
throw error;
|
|
799
|
+
}
|
|
800
|
+
logger(`[agent-sdk] GitHub auth: no Cursor account credential (${error instanceof Error ? error.message : String(error)}); GitHub calls from eval sessions will fail`);
|
|
801
|
+
}
|
|
792
802
|
// Cursor SCM events: v1 stays on the engine poll. v2 ingest is local-CP
|
|
793
803
|
// only — hosted `--no-control-plane` skips the July poll (hosted CP wakes).
|
|
794
804
|
const routeContinuation = localControlPlaneRoute(runtimes);
|
|
@@ -820,12 +830,14 @@ export function startServer(mounts_1) {
|
|
|
820
830
|
}
|
|
821
831
|
// Cursor deployment-events relay: automatic when a mounted agent authored
|
|
822
832
|
// `deploymentsChannel({ ... })`.
|
|
823
|
-
const cursorDeploymentRelay =
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
833
|
+
const cursorDeploymentRelay = options.evals === true
|
|
834
|
+
? undefined
|
|
835
|
+
: startCursorDeploymentRelay({
|
|
836
|
+
options,
|
|
837
|
+
runtimes,
|
|
838
|
+
accountKey,
|
|
839
|
+
logger,
|
|
840
|
+
});
|
|
829
841
|
// Trust --public-url's host when a reverse proxy rewrites Host.
|
|
830
842
|
const browserOriginGuard = browserOriginGuardOptionsForPublicUrl(options.publicUrl);
|
|
831
843
|
const server = createServer((req, res) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-links.d.ts","sourceRoot":"","sources":["../../src/internal/session-links.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session-links.d.ts","sourceRoot":"","sources":["../../src/internal/session-links.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC,CAAC;AAKF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,CAKpF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseGitHubPrContinuationKey } from "../channels/github/github-channel.js";
|
|
1
2
|
import { parseGitHubPrRef } from "../channels/github/replay.js";
|
|
2
3
|
import { slackThreadPermalink } from "../channels/slack/links.js";
|
|
3
4
|
import { extractGithubPrRef } from "../channels/slack/pr-ref.js";
|
|
@@ -40,17 +41,17 @@ function slackUrl(record) {
|
|
|
40
41
|
})) !== null && _j !== void 0 ? _j : undefined);
|
|
41
42
|
}
|
|
42
43
|
function githubUrl(record) {
|
|
43
|
-
var _a
|
|
44
|
-
var
|
|
45
|
-
const fromTitle = extractGithubPrRef((
|
|
44
|
+
var _a;
|
|
45
|
+
var _b, _c;
|
|
46
|
+
const fromTitle = extractGithubPrRef((_b = record.title) !== null && _b !== void 0 ? _b : "");
|
|
46
47
|
if (fromTitle !== undefined) {
|
|
47
48
|
return fromTitle.url;
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return
|
|
50
|
+
const fromKey = parseGitHubPrContinuationKey((_c = record.continuationKey) !== null && _c !== void 0 ? _c : "");
|
|
51
|
+
if (fromKey !== undefined) {
|
|
52
|
+
return `https://github.com/${fromKey.owner}/${fromKey.repo}/pull/${fromKey.number}`;
|
|
52
53
|
}
|
|
53
|
-
const repos = (
|
|
54
|
+
const repos = (_a = record.cloudOverride) === null || _a === void 0 ? void 0 : _a.repos;
|
|
54
55
|
if (repos === undefined) {
|
|
55
56
|
return undefined;
|
|
56
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions-client.d.ts","sourceRoot":"","sources":["../../src/internal/sessions-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnF,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAEpF;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CA8B5F;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"sessions-client.d.ts","sourceRoot":"","sources":["../../src/internal/sessions-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnF,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAEpF;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CA8B5F;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAmE1B;AAkCD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAClC,cAAc,GAAG,SAAS,CAQ5B;AAED,+DAA+D;AAC/D,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO9B;AAED,+DAA+D;AAC/D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAIzE;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,cAAc,EAAE,EAC1B,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAAE,GACvC,MAAM,CAgBR"}
|
|
@@ -60,6 +60,7 @@ export function fetchSessionEvents(args) {
|
|
|
60
60
|
try {
|
|
61
61
|
const jsonResp = yield fetchImpl(`${baseUrl}${path}?format=json`, {
|
|
62
62
|
headers: mergeRequestHeaders(args.auth),
|
|
63
|
+
signal: args.signal,
|
|
63
64
|
});
|
|
64
65
|
if (jsonResp.ok) {
|
|
65
66
|
const body = (yield jsonResp.json());
|
|
@@ -83,6 +84,7 @@ export function fetchSessionEvents(args) {
|
|
|
83
84
|
try {
|
|
84
85
|
const resp = yield fetchImpl(`${baseUrl}${path}`, {
|
|
85
86
|
headers: mergeRequestHeaders(args.auth),
|
|
87
|
+
signal: args.signal,
|
|
86
88
|
});
|
|
87
89
|
if (resp.status === 404) {
|
|
88
90
|
throw new Error(`Session ${args.sessionId} not found.`);
|
package/docs/evals.md
CHANGED
|
@@ -194,8 +194,8 @@ Run `--tag smoke` on pull requests and the full suite on a schedule when
|
|
|
194
194
|
cost or latency makes every-push coverage impractical. Use soft scores
|
|
195
195
|
for a new probabilistic benchmark until its threshold is trustworthy.
|
|
196
196
|
|
|
197
|
-
The [CLI reference](./reference/cli.md#eval) covers selectors,
|
|
198
|
-
|
|
197
|
+
The [CLI reference](./reference/cli.md#eval) covers selectors,
|
|
198
|
+
server-side batches, exit codes, and JSON output.
|
|
199
199
|
|
|
200
200
|
## Keep side effects out of eval sessions
|
|
201
201
|
|
|
@@ -14,15 +14,13 @@ This template is one model turn: read the diff, then post one comment.
|
|
|
14
14
|
## Scaffold
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
|
-
bdk init ./security-reviewer --template security-reviewer
|
|
17
|
+
bdk init ./security-reviewer --template security-reviewer \
|
|
18
|
+
--var repos=acme/api
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
`
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
The list lands in `bot/lib/repos.ts`. The GitHub channel reads it for
|
|
24
|
-
`cursorAccount` and for the wake filter. Edit that file when the set
|
|
25
|
-
changes.
|
|
21
|
+
`--var repos` must name a repository already connected in Cursor for
|
|
22
|
+
your account. Separate multiple repositories with commas; they must
|
|
23
|
+
share one owner. `init` writes the list to `bot/lib/repos.ts`.
|
|
26
24
|
|
|
27
25
|
## Connect GitHub through Cursor
|
|
28
26
|
|
|
@@ -68,7 +66,8 @@ comment.
|
|
|
68
66
|
|
|
69
67
|
## Evals
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
Use the two smoke cases, one XSS fixture and one docs-only change, as a
|
|
70
|
+
local exercise:
|
|
72
71
|
|
|
73
72
|
```text
|
|
74
73
|
bdk eval
|
|
@@ -64,8 +64,8 @@ API calls use your account. See the [GitHub guide](../guides/github.md).
|
|
|
64
64
|
|
|
65
65
|
## Evals
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
need no GitHub access.
|
|
67
|
+
Use the two smoke cases, one spaghetti-branch fixture and one clean fix,
|
|
68
|
+
as a local exercise. They need no GitHub access.
|
|
69
69
|
|
|
70
70
|
```text
|
|
71
71
|
bdk eval
|
|
@@ -64,8 +64,8 @@ API calls use your account. See the [GitHub guide](../guides/github.md).
|
|
|
64
64
|
|
|
65
65
|
## Evals
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
need no GitHub access.
|
|
67
|
+
Use the two smoke cases, one auth-bypass fixture and one docs-only
|
|
68
|
+
change, as a local exercise. They need no GitHub access.
|
|
69
69
|
|
|
70
70
|
```text
|
|
71
71
|
bdk eval
|
package/docs/templates/triage.md
CHANGED
|
@@ -45,6 +45,10 @@ In the Cursor dashboard, open MCP and connect Linear or Jira.
|
|
|
45
45
|
The connection stays on the host. The model calls `record_triage`.
|
|
46
46
|
Linear and Jira tools stay off the model's tool list.
|
|
47
47
|
|
|
48
|
+
Linear or Jira MCP must be connected for comments, priority changes,
|
|
49
|
+
and duplicate links; queueing an issue can still classify it through
|
|
50
|
+
`record_triage` without that connection.
|
|
51
|
+
|
|
48
52
|
## First verdict
|
|
49
53
|
|
|
50
54
|
```text
|
|
@@ -82,7 +86,8 @@ details, when to call `record_triage`, how to reply.
|
|
|
82
86
|
|
|
83
87
|
## Evals
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
Use the three smoke cases, one per kind, as a local exercise after you
|
|
90
|
+
change the rubric.
|
|
86
91
|
|
|
87
92
|
```text
|
|
88
93
|
bdk eval
|
package/package.json
CHANGED
|
@@ -18,10 +18,10 @@ or ownership change, a removed feature.
|
|
|
18
18
|
An empty wiki is not a license to document the whole repo. Create a
|
|
19
19
|
page only for a durable contract in this merge.
|
|
20
20
|
|
|
21
|
-
Skip lint, format, lockfiles, dependency pins, tests-only,
|
|
22
|
-
backports, telemetry-only changes, one-off bug fixes that
|
|
23
|
-
described behavior the same, knobs the wiki never mentioned,
|
|
24
|
-
the matching page already states.
|
|
21
|
+
Skip lint, format, lockfiles, dependency pins, tests-only, docs-only,
|
|
22
|
+
cherry-picks, backports, telemetry-only changes, one-off bug fixes that
|
|
23
|
+
leave the described behavior the same, knobs the wiki never mentioned,
|
|
24
|
+
and facts the matching page already states.
|
|
25
25
|
|
|
26
26
|
Do not write a changelog or a PR list.
|
|
27
27
|
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
Reviews pull requests for exploitable bugs. Posts one review comment.
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
npx @cursor/bdk init ./security-reviewer --template security-reviewer
|
|
6
|
+
npx @cursor/bdk init ./security-reviewer --template security-reviewer \
|
|
7
|
+
--var repos=owner/repo
|
|
7
8
|
```
|
|
8
9
|
|
|
9
|
-
`
|
|
10
|
-
|
|
10
|
+
`--var repos` must name a repository already connected in Cursor for
|
|
11
|
+
your account. Separate multiple repositories with commas; they must
|
|
12
|
+
share one owner.
|
|
11
13
|
|
|
12
14
|
## Run
|
|
13
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { parseGitHubPrContinuationKey } from "@cursor/bdk/channels/github";
|
|
4
4
|
import { defineTool } from "@cursor/bdk/tools";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -26,13 +26,9 @@ export default defineTool({
|
|
|
26
26
|
if (ctx.session.purpose === "eval") {
|
|
27
27
|
return { posted: false, reason: "eval" };
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
if (!key.startsWith("github-pr:")) {
|
|
31
|
-
throw new Error("post_findings requires a GitHub pull request session");
|
|
32
|
-
}
|
|
33
|
-
const ref = parseGitHubPrRef(key.slice("github-pr:".length));
|
|
29
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
34
30
|
if (ref === undefined) {
|
|
35
|
-
throw new Error(
|
|
31
|
+
throw new Error("post_findings requires a GitHub pull request session");
|
|
36
32
|
}
|
|
37
33
|
const headSha = (await readFile(join(ctx.workspaceDir, "pr/head.sha"), "utf8")).trim();
|
|
38
34
|
if (!SHA.test(headSha)) {
|
|
@@ -47,7 +43,11 @@ export default defineTool({
|
|
|
47
43
|
body: reviewBody(findings),
|
|
48
44
|
event: "COMMENT",
|
|
49
45
|
});
|
|
50
|
-
return {
|
|
46
|
+
return {
|
|
47
|
+
posted: true,
|
|
48
|
+
pr: `${ref.owner}/${ref.repo}#${ref.number}`,
|
|
49
|
+
url: response.data.html_url,
|
|
50
|
+
};
|
|
51
51
|
},
|
|
52
52
|
});
|
|
53
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { parseGitHubPrContinuationKey } from "@cursor/bdk/channels/github";
|
|
4
4
|
import { defineTool } from "@cursor/bdk/tools";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -25,13 +25,9 @@ export default defineTool({
|
|
|
25
25
|
if (ctx.session.purpose === "eval") {
|
|
26
26
|
return { posted: false, reason: "eval" };
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
if (!key.startsWith("github-pr:")) {
|
|
30
|
-
throw new Error("post_findings requires a GitHub pull request session");
|
|
31
|
-
}
|
|
32
|
-
const ref = parseGitHubPrRef(key.slice("github-pr:".length));
|
|
28
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
33
29
|
if (ref === undefined) {
|
|
34
|
-
throw new Error(
|
|
30
|
+
throw new Error("post_findings requires a GitHub pull request session");
|
|
35
31
|
}
|
|
36
32
|
const headSha = (await readFile(join(ctx.workspaceDir, "pr/head.sha"), "utf8")).trim();
|
|
37
33
|
if (!SHA.test(headSha)) {
|
|
@@ -46,7 +42,11 @@ export default defineTool({
|
|
|
46
42
|
body: reviewBody(findings),
|
|
47
43
|
event: "COMMENT",
|
|
48
44
|
});
|
|
49
|
-
return {
|
|
45
|
+
return {
|
|
46
|
+
posted: true,
|
|
47
|
+
pr: `${ref.owner}/${ref.repo}#${ref.number}`,
|
|
48
|
+
url: response.data.html_url,
|
|
49
|
+
};
|
|
50
50
|
},
|
|
51
51
|
});
|
|
52
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { parseGitHubPrContinuationKey } from "@cursor/bdk/channels/github";
|
|
4
4
|
import { defineTool } from "@cursor/bdk/tools";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -25,13 +25,9 @@ export default defineTool({
|
|
|
25
25
|
if (ctx.session.purpose === "eval") {
|
|
26
26
|
return { posted: false, reason: "eval" };
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
if (!key.startsWith("github-pr:")) {
|
|
30
|
-
throw new Error("post_findings requires a GitHub pull request session");
|
|
31
|
-
}
|
|
32
|
-
const ref = parseGitHubPrRef(key.slice("github-pr:".length));
|
|
28
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
33
29
|
if (ref === undefined) {
|
|
34
|
-
throw new Error(
|
|
30
|
+
throw new Error("post_findings requires a GitHub pull request session");
|
|
35
31
|
}
|
|
36
32
|
const headSha = (await readFile(join(ctx.workspaceDir, "pr/head.sha"), "utf8")).trim();
|
|
37
33
|
if (!SHA.test(headSha)) {
|
|
@@ -46,7 +42,11 @@ export default defineTool({
|
|
|
46
42
|
body: reviewBody(findings),
|
|
47
43
|
event: "COMMENT",
|
|
48
44
|
});
|
|
49
|
-
return {
|
|
45
|
+
return {
|
|
46
|
+
posted: true,
|
|
47
|
+
pr: `${ref.owner}/${ref.repo}#${ref.number}`,
|
|
48
|
+
url: response.data.html_url,
|
|
49
|
+
};
|
|
50
50
|
},
|
|
51
51
|
});
|
|
52
52
|
|