@cursor/bdk 0.2.6 → 0.2.7
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 +52 -57
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +34 -8
- package/dist/channels/github/types.d.ts +6 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +37 -29
- package/dist/channels/slack/external-policy.d.ts.map +1 -1
- package/dist/channels/slack/external-policy.js +6 -6
- package/dist/channels/slack/inbound.d.ts +5 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +13 -0
- package/dist/channels/slack/index.d.ts +3 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +3 -0
- package/dist/channels/slack/log.d.ts +1 -1
- package/dist/channels/slack/log.js +1 -1
- package/dist/channels/slack/self-identity.d.ts +15 -0
- package/dist/channels/slack/self-identity.d.ts.map +1 -0
- package/dist/channels/slack/self-identity.js +48 -0
- package/dist/channels/slack/sender-name.d.ts +17 -0
- package/dist/channels/slack/sender-name.d.ts.map +1 -0
- package/dist/channels/slack/sender-name.js +87 -0
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/user-info.d.ts +15 -0
- package/dist/channels/slack/user-info.d.ts.map +1 -0
- package/dist/channels/slack/user-info.js +57 -0
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.CJLKDVza.js → app.oyjtOr3W.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.C25zYVuc.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BW9mrQmq.js → VPLocalSearchBox.D0P6J_UJ.js} +1 -1
- package/dist/docs/assets/chunks/{arc.D8ZOvM1m.js → arc.B0LY1J1h.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CXEKhLW-.js → architectureDiagram-Q4EWVU46.dPduLUxY.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.BJkVKblr.js → baseUniq.B_Ohm21h.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.DQDbHxor.js → blockDiagram-DXYQGD6D.B4zcanaJ.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.ByMD6LYM.js → c4Diagram-AHTNJAMY.D9Iw21nx.js} +1 -1
- package/dist/docs/assets/chunks/channel.CRUyWDV-.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Dtq1aVI9.js → chunk-4BX2VUAB.DDVwRShI.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BL_XrkoQ.js → chunk-4TB4RGXK.DsYcdn1i.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BDPXu94_.js → chunk-55IACEB6.BzzQvcYp.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DhGOQj4k.js → chunk-EDXVE4YY.BMiXZ7FX.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DSF5nr8v.js → chunk-FMBD7UC4.D_mBcLoc.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Day7wayw.js → chunk-OYMX7WX6.CMVjWVMx.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CpBEC0zA.js → chunk-QZHKN3VN.BG-FrPv9.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.X_7rY1rx.js → chunk-YZCP3GAM.CkFE1ap3.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CG_UObcQ.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CG_UObcQ.js +1 -0
- package/dist/docs/assets/chunks/clone.NYSZ9qZN.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BVRmi2ko.js → cose-bilkent-S5V4N54A.BVNnCTvY.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.Dei9oslB.js → dagre-KV5264BT.CDN5PR9l.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD._M-efGt7.js → diagram-5BDNPKRD.DQRUlT-i.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.D1Vmhfsj.js → diagram-G4DWMVQ6.CoeblYQT.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.cE1bmvAC.js → diagram-MMDJMWI5.DW3ymjl0.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.DkXAfznP.js → diagram-TYMM5635.BP0uN4Jw.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.DH_pSwPg.js → erDiagram-SMLLAGMA.DVFUWEn4.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.kAWVN9j1.js → flowDiagram-DWJPFMVM.HU-eHspv.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.8r0w49-p.js → ganttDiagram-T4ZO3ILL.DHNhXijY.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.BDa7Bi1i.js → gitGraphDiagram-UUTBAWPF.DkISXcO3.js} +1 -1
- package/dist/docs/assets/chunks/{graph.BMPXHz_B.js → graph.CCV0fuRR.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BmlcqewS.js → infoDiagram-42DDH7IO.bgILzOoc.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.CVSEQSul.js → ishikawaDiagram-UXIWVN3A.CuryXC0F.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BpeWJ5n-.js → journeyDiagram-VCZTEJTY.BL1Pr-wu.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DHbDXuxB.js → kanban-definition-6JOO6SKY.BbGjvk4l.js} +1 -1
- package/dist/docs/assets/chunks/{layout.CzrCDgkP.js → layout.C4PfdldS.js} +1 -1
- package/dist/docs/assets/chunks/{linear.HwBsflwN.js → linear.C3xD1T6X.js} +1 -1
- package/dist/docs/assets/chunks/{min.DqGHolT3.js → min.CzgRAQ9c.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.ZYGlOawh.js → mindmap-definition-QFDTVHPH.CA9rSWum.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.C2KRXlNR.js → pieDiagram-DEJITSTG.B8MprgJu.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CHj3Qefp.js → quadrantDiagram-34T5L4WZ.DndDwbKT.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.B1L4Tf7k.js → requirementDiagram-MS252O5E.Zhfgwlnn.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.dNR2yi1B.js → sankeyDiagram-XADWPNL6.B6RRm6N5.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BrvQ3C6m.js → sequenceDiagram-FGHM5R23.Bfmz-1PN.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BtehEykA.js → stateDiagram-FHFEXIEX.gbrdNqgj.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DOOmulfQ.js +1 -0
- package/dist/docs/assets/chunks/{theme.BDHBZUkP.js → theme.gpWjytMh.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bn7nhqEN.js → timeline-definition-GMOUNBTQ.Bl1l7M1f.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DKhc38sz.js → vennDiagram-DHZGUBPP.Dfle4U0d.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.DOXQ0w8J.js → wardley-RL74JXVD.BJrCW6xc.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.Bbq5B2Ic.js → wardleyDiagram-NUSXRM2D.CM_4lmvZ.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B77HE1K8.js → xychartDiagram-5P7HB3ND.CHT5X28R.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.BsgDqYPh.js → reference_cli.md.GwugN3n-.js} +5 -5
- package/dist/docs/assets/reference_cli.md.GwugN3n-.lean.js +1 -0
- package/dist/docs/assets/{reference_skills.md.ClkMoQsV.js → reference_skills.md.C0guGcH0.js} +3 -3
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +35 -35
- package/dist/docs/evals.html +35 -35
- 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 +20 -9
- 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 +39 -39
- package/dist/docs/reference/cli.md +20 -9
- 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 +35 -35
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +35 -35
- package/dist/docs/templates/thermo-quality-review.html +35 -35
- package/dist/docs/templates/thermo-review.html +35 -35
- package/dist/docs/templates/triage.html +35 -35
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +14 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.js +5 -0
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +17 -0
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/watch.js +99 -0
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +19 -0
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +71 -0
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +9 -5
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/cancel.js +3 -1
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -2
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/files-backends/cursor-hosted.d.ts +22 -83
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +46 -160
- package/dist/files.d.ts +9 -32
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +7 -32
- package/dist/internal/artifacts-store.d.ts +13 -25
- package/dist/internal/artifacts-store.d.ts.map +1 -1
- package/dist/internal/artifacts-store.js +25 -46
- package/dist/internal/cli-ax.d.ts +10 -17
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +87 -155
- package/dist/internal/cli-bitbucket.js +5 -5
- package/dist/internal/cli-deploy.d.ts +4 -1
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +117 -20
- package/dist/internal/cli-github.js +13 -13
- package/dist/internal/cli-gitlab.js +5 -5
- package/dist/internal/continuation-identity.d.ts +2 -0
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +4 -0
- package/dist/internal/conversation-mirror.d.ts +9 -38
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +62 -68
- package/dist/internal/cursor/account-mcp.d.ts +1 -1
- package/dist/internal/cursor/account-mcp.js +1 -1
- package/dist/internal/cursor/backend-client.js +1 -1
- package/dist/internal/cursor/github-credentials.js +3 -3
- package/dist/internal/cursor/hosted-bound-secrets.d.ts +6 -2
- package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-bound-secrets.js +13 -2
- package/dist/internal/cursor/hosted-store-secrets.d.ts +13 -37
- package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +13 -37
- package/dist/internal/cursor/store-api-client.d.ts +17 -39
- package/dist/internal/cursor/store-api-client.d.ts.map +1 -1
- package/dist/internal/cursor/store-api-client.js +15 -37
- package/dist/internal/cursor-deployment-relay.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/deploy-client.d.ts +55 -63
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +48 -28
- package/dist/internal/discovery/agent.d.ts +1 -1
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +4 -0
- package/dist/internal/discovery/extensions.d.ts +2 -1
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +11 -1
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +1 -0
- package/dist/internal/distribution.d.ts +2 -2
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +2 -2
- package/dist/internal/docs-site.js +3 -3
- package/dist/internal/eval-run-store.js +8 -8
- package/dist/internal/framework-file-storage.d.ts +10 -34
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +12 -39
- package/dist/internal/framework-storage-selection.d.ts +10 -46
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +15 -64
- package/dist/internal/github-fanout.js +2 -2
- package/dist/internal/handleAgentServeTrigger.d.ts +5 -8
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
- package/dist/internal/handleAgentServeTrigger.js +5 -8
- package/dist/internal/host-files.js +6 -9
- package/dist/internal/host-platforms.js +5 -5
- package/dist/internal/hosted-catch.d.ts +3 -2
- package/dist/internal/hosted-catch.d.ts.map +1 -1
- package/dist/internal/hosted-catch.js +27 -9
- package/dist/internal/hosted-delivery-protocol.d.ts +31 -8
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +102 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +32 -12
- package/dist/internal/hosted-execution-diag.d.ts +13 -24
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +11 -20
- package/dist/internal/hosted-execution-flush.d.ts +22 -10
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
- package/dist/internal/hosted-execution-flush.js +45 -9
- package/dist/internal/hosted-managed-automation.js +5 -5
- package/dist/internal/hosting.d.ts +5 -10
- package/dist/internal/hosting.d.ts.map +1 -1
- package/dist/internal/hosting.js +5 -10
- package/dist/internal/legacy-command-guard.d.ts +1 -4
- package/dist/internal/legacy-command-guard.d.ts.map +1 -1
- package/dist/internal/legacy-command-guard.js +2 -11
- package/dist/internal/listen-port.js +1 -1
- package/dist/internal/local-control-plane.js +6 -6
- package/dist/internal/logs-client.d.ts +20 -1
- package/dist/internal/logs-client.d.ts.map +1 -1
- package/dist/internal/logs-client.js +89 -1
- package/dist/internal/mcp-endpoint.js +1 -1
- package/dist/internal/otel/collector.js +1 -1
- package/dist/internal/otel/runtime.js +13 -13
- package/dist/internal/platform-schedule-sync.js +2 -2
- package/dist/internal/playground/toolchain.js +6 -6
- package/dist/internal/process-memory-telemetry.js +2 -2
- package/dist/internal/reminder-runner.d.ts +8 -3
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +51 -52
- package/dist/internal/resolve-prod-target.d.ts +1 -12
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +2 -32
- package/dist/internal/resolved-connections.js +8 -8
- package/dist/internal/run-client.d.ts +4 -3
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +98 -61
- package/dist/internal/runtime-dispatch-runner.d.ts +1 -0
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +7 -1
- package/dist/internal/schedule-runner.js +1 -1
- package/dist/internal/sdk-runner.d.ts +4 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +37 -22
- package/dist/internal/server.d.ts +2 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +39 -38
- package/dist/internal/session-engine.d.ts +31 -44
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +67 -83
- package/dist/internal/session-run-log.d.ts +10 -24
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +13 -27
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +6 -3
- package/dist/internal/skills-sync.d.ts +3 -5
- package/dist/internal/skills-sync.d.ts.map +1 -1
- package/dist/internal/skills-sync.js +3 -5
- package/dist/internal/start-log-store.d.ts +7 -18
- package/dist/internal/start-log-store.d.ts.map +1 -1
- package/dist/internal/start-log-store.js +47 -24
- package/dist/internal/storage-coordinator.d.ts +7 -10
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +18 -20
- package/dist/internal/storage-roles.d.ts +5 -0
- package/dist/internal/storage-roles.d.ts.map +1 -1
- package/dist/internal/store-api-protocol.d.ts +12 -33
- package/dist/internal/store-api-protocol.d.ts.map +1 -1
- package/dist/internal/store-api-protocol.js +6 -22
- package/dist/internal/store-mirror.d.ts +4 -5
- package/dist/internal/store-mirror.d.ts.map +1 -1
- package/dist/internal/store-mirror.js +6 -8
- package/dist/internal/turn-lease-store.d.ts +12 -5
- package/dist/internal/turn-lease-store.d.ts.map +1 -1
- package/dist/internal/turn-lease-store.js +61 -8
- package/dist/internal/v2-hosting.d.ts +4 -7
- package/dist/internal/v2-hosting.d.ts.map +1 -1
- package/dist/internal/v2-hosting.js +4 -7
- package/dist/internal/workspace-sync.d.ts +3 -6
- package/dist/internal/workspace-sync.d.ts.map +1 -1
- package/dist/internal/workspace-sync.js +3 -6
- package/dist/internal/workspace.d.ts +10 -16
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +9 -14
- package/dist/memory.d.ts +17 -43
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +34 -80
- package/dist/playground/assets/index-DPKLl4C_.css +1 -0
- package/dist/playground/assets/index-MijLHTbB.js +71 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted-v2.d.ts +8 -36
- package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted-v2.js +9 -37
- package/dist/storage-backends/cursor-hosted.d.ts +17 -30
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +14 -27
- package/dist/storage-protocol.d.ts +13 -38
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +14 -39
- package/dist/types.d.ts +29 -30
- package/dist/types.d.ts.map +1 -1
- package/docs/reference/cli.md +20 -9
- package/package.json +1 -1
- package/templates/pr-autofixer/bot/instructions.md +3 -3
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bq-pxRXm.js +0 -1
- package/dist/docs/assets/chunks/channel.DCU8W1RP.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DwpXsM06.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DwpXsM06.js +0 -1
- package/dist/docs/assets/chunks/clone.DH6Mx2zB.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.kzD0-U89.js +0 -1
- package/dist/docs/assets/reference_cli.md.BsgDqYPh.lean.js +0 -1
- package/dist/playground/assets/index-6BbTPnaT.css +0 -1
- package/dist/playground/assets/index-CI7FAmOP.js +0 -71
- /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.C0guGcH0.lean.js} +0 -0
|
@@ -37,6 +37,7 @@ export function loadAgent(ctx, agentDir, options) {
|
|
|
37
37
|
hooks: [],
|
|
38
38
|
channels: [],
|
|
39
39
|
schedules: [],
|
|
40
|
+
reminders: [],
|
|
40
41
|
artifacts: undefined,
|
|
41
42
|
},
|
|
42
43
|
};
|
|
@@ -53,6 +54,7 @@ export function loadAgent(ctx, agentDir, options) {
|
|
|
53
54
|
const hooks = [];
|
|
54
55
|
const channels = [];
|
|
55
56
|
const schedules = [];
|
|
57
|
+
const reminders = [];
|
|
56
58
|
const instructionParts = [];
|
|
57
59
|
const contributions = {
|
|
58
60
|
tools,
|
|
@@ -63,6 +65,7 @@ export function loadAgent(ctx, agentDir, options) {
|
|
|
63
65
|
hooks,
|
|
64
66
|
channels,
|
|
65
67
|
schedules,
|
|
68
|
+
reminders,
|
|
66
69
|
instructionParts,
|
|
67
70
|
seedFiles,
|
|
68
71
|
artifacts: undefined,
|
|
@@ -274,6 +277,7 @@ export function loadAgent(ctx, agentDir, options) {
|
|
|
274
277
|
hooks,
|
|
275
278
|
channels,
|
|
276
279
|
schedules,
|
|
280
|
+
reminders,
|
|
277
281
|
artifacts: contributions.artifacts,
|
|
278
282
|
},
|
|
279
283
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `agent/extensions/<ns>.ts` | `agent/extensions/<ns>/extension.ts`:
|
|
3
3
|
* agent-shaped trees and Cursor plugins mounted under a namespace.
|
|
4
4
|
*/
|
|
5
|
-
import type { ArtifactsDefinition, DiscoveredChannel, DiscoveredConnection, DiscoveredExtension, DiscoveredHook, DiscoveredSchedule, DiscoveredSkill, DiscoveredTool, ResolvedAgent, SeedFile } from "../../types.js";
|
|
5
|
+
import type { ArtifactsDefinition, DiscoveredChannel, DiscoveredConnection, DiscoveredExtension, DiscoveredHook, DiscoveredReminder, DiscoveredSchedule, DiscoveredSkill, DiscoveredTool, ResolvedAgent, SeedFile } from "../../types.js";
|
|
6
6
|
import { type DiscoveryContext } from "./context.js";
|
|
7
7
|
/** The agent's authored slot lists that mounted extensions append to. */
|
|
8
8
|
export interface ExtensionContributions {
|
|
@@ -14,6 +14,7 @@ export interface ExtensionContributions {
|
|
|
14
14
|
hooks: DiscoveredHook[];
|
|
15
15
|
channels: DiscoveredChannel[];
|
|
16
16
|
schedules: DiscoveredSchedule[];
|
|
17
|
+
reminders: DiscoveredReminder[];
|
|
17
18
|
instructionParts: string[];
|
|
18
19
|
seedFiles: SeedFile[];
|
|
19
20
|
artifacts: ArtifactsDefinition | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/extensions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,mBAAmB,EAEnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EAGd,aAAa,EACb,QAAQ,EAET,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/extensions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,mBAAmB,EAEnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,cAAc,EAGd,aAAa,EACb,QAAQ,EAET,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAgClE,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAC5C;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA0BhC"}
|
|
@@ -24,6 +24,7 @@ import { loadHooks } from "./hooks.js";
|
|
|
24
24
|
import { loadInstructions } from "./instructions.js";
|
|
25
25
|
import { importDefault, moduleEntries } from "./modules.js";
|
|
26
26
|
import { validateName } from "./names.js";
|
|
27
|
+
import { loadReminders } from "./reminders.js";
|
|
27
28
|
import { loadSchedules } from "./schedules.js";
|
|
28
29
|
import { loadSeedFiles } from "./seed-files.js";
|
|
29
30
|
import { loadArtifacts, mergeArtifacts } from "./services.js";
|
|
@@ -100,6 +101,7 @@ function emptyDiscovered(ns, description) {
|
|
|
100
101
|
hooks: [],
|
|
101
102
|
channels: [],
|
|
102
103
|
schedules: [],
|
|
104
|
+
reminders: [],
|
|
103
105
|
instructions: false,
|
|
104
106
|
seedFiles: [],
|
|
105
107
|
artifactKinds: [],
|
|
@@ -232,6 +234,13 @@ function mountExtension(ctx, site, mount, into) {
|
|
|
232
234
|
into.schedules.push(Object.assign(Object.assign({}, schedule), { name: composed }));
|
|
233
235
|
mounted.schedules.push(composed);
|
|
234
236
|
}
|
|
237
|
+
// Not overlaid: the tree's own tools arm these by definition object, which
|
|
238
|
+
// an overlay's replacement would no longer resolve to.
|
|
239
|
+
for (const reminder of tree.reminders) {
|
|
240
|
+
const composed = `${site.ns}__${reminder.name}`;
|
|
241
|
+
into.reminders.push(Object.assign(Object.assign({}, reminder), { name: composed }));
|
|
242
|
+
mounted.reminders.push(composed);
|
|
243
|
+
}
|
|
235
244
|
if (instructions !== undefined && instructions !== "") {
|
|
236
245
|
into.instructionParts.push(instructions);
|
|
237
246
|
mounted.instructions = true;
|
|
@@ -281,7 +290,7 @@ function readExtensionTree(ctx, site, mount, root) {
|
|
|
281
290
|
if (plugin === undefined) {
|
|
282
291
|
return undefined;
|
|
283
292
|
}
|
|
284
|
-
return Object.assign(Object.assign({}, plugin), { tools: [], hostConnections: [], subagents: [], hooks: [], channels: [], schedules: [], seedFiles: [] });
|
|
293
|
+
return Object.assign(Object.assign({}, plugin), { tools: [], hostConnections: [], subagents: [], hooks: [], channels: [], schedules: [], reminders: [], seedFiles: [] });
|
|
285
294
|
}
|
|
286
295
|
return readNativeTree(ctx, root, mount.contributions);
|
|
287
296
|
});
|
|
@@ -301,6 +310,7 @@ function readNativeTree(ctx, root, contributions) {
|
|
|
301
310
|
hooks: yield loadHooks(ctx, join(root, "hooks")),
|
|
302
311
|
channels: (yield loadChannels(ctx, join(root, "channels"), "extension")).channels,
|
|
303
312
|
schedules: yield loadSchedules(ctx, join(root, "schedules")),
|
|
313
|
+
reminders: yield loadReminders(ctx, join(root, "reminders")),
|
|
304
314
|
instructions: yield loadInstructions(ctx, root, undefined, false),
|
|
305
315
|
seedFiles: yield loadSeedFiles(ctx, root),
|
|
306
316
|
artifacts: yield loadArtifacts(ctx, root),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAuB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASpF,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAetB;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASrE;AAYD,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA2BlF;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CA6BzD;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAAuB,GAAG;IACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtB,GACL,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CAgBzD;AAcD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAuB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASpF,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAetB;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASrE;AAYD,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA2BlF;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CA6BzD;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAAuB,GAAG;IACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtB,GACL,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CAgBzD;AAcD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,YAAY,CAAC,CA+FvB;AA0BD,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAElE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAOnE"}
|
|
@@ -211,6 +211,7 @@ export function loadAgentProject(dir_1) {
|
|
|
211
211
|
const schedules = yield loadSchedules(ctx, join(agentDir, "schedules"));
|
|
212
212
|
schedules.push(...projectSlots.schedules);
|
|
213
213
|
const reminders = yield loadReminders(ctx, join(agentDir, "reminders"));
|
|
214
|
+
reminders.push(...projectSlots.reminders);
|
|
214
215
|
const hooks = yield loadHooks(ctx, join(agentDir, "hooks"));
|
|
215
216
|
hooks.push(...projectSlots.hooks);
|
|
216
217
|
const storage = yield loadStorage(ctx, agentDir, agent.architecture);
|
|
@@ -13,9 +13,9 @@ export declare const PACKAGE_NAME = "@cursor/bdk";
|
|
|
13
13
|
export declare const FORMER_PACKAGE_NAME = "@cursor/july";
|
|
14
14
|
/**
|
|
15
15
|
* Bracketed product tag for stderr / ServeOptions.logger lines
|
|
16
|
-
* (`[
|
|
16
|
+
* (`[bdk] …`, `[bdk/slack] …`).
|
|
17
17
|
*/
|
|
18
|
-
export declare const LOG_PRODUCT = "
|
|
18
|
+
export declare const LOG_PRODUCT = "bdk";
|
|
19
19
|
export declare const LOG_PREFIX: string;
|
|
20
20
|
export declare const SLACK_LOG_PREFIX: string;
|
|
21
21
|
/** The bin name, for help text and copy-pasteable hints. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,kCAAkC;AAClC,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,kCAAkC;AAClC,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAQ,CAAC;AACjC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAYD,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CASlD;AAED,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,cAAc,IAAI,cAAc,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAMrE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUzD"}
|
|
@@ -18,9 +18,9 @@ const HOSTED_WORKTREE_SHA_FILENAME = ".cursor-hosted-worktree-sha";
|
|
|
18
18
|
const GIT_COMMIT_SHA_RE = /^[0-9a-f]{40,64}$/;
|
|
19
19
|
/**
|
|
20
20
|
* Bracketed product tag for stderr / ServeOptions.logger lines
|
|
21
|
-
* (`[
|
|
21
|
+
* (`[bdk] …`, `[bdk/slack] …`).
|
|
22
22
|
*/
|
|
23
|
-
export const LOG_PRODUCT = "
|
|
23
|
+
export const LOG_PRODUCT = "bdk";
|
|
24
24
|
export const LOG_PREFIX = `[${LOG_PRODUCT}]`;
|
|
25
25
|
export const SLACK_LOG_PREFIX = `[${LOG_PRODUCT}/slack]`;
|
|
26
26
|
/** The bin name, for help text and copy-pasteable hints. */
|
|
@@ -162,10 +162,10 @@ export function ensureDocsSiteBundle() {
|
|
|
162
162
|
}
|
|
163
163
|
const toolchain = resolveDocsToolchain();
|
|
164
164
|
if (toolchain === undefined) {
|
|
165
|
-
logger("[
|
|
165
|
+
logger("[bdk] docs site missing and vitepress toolchain unavailable; /docs will show a build hint");
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
logger("[
|
|
168
|
+
logger("[bdk] building docs site (vitepress)...");
|
|
169
169
|
const code = yield new Promise((resolve, reject) => {
|
|
170
170
|
const child = spawn(process.execPath, [toolchain.vitepressCli, "build", "docs"], {
|
|
171
171
|
cwd: toolchain.packageRoot,
|
|
@@ -181,7 +181,7 @@ export function ensureDocsSiteBundle() {
|
|
|
181
181
|
if (!docsSiteExists(DOCS_DIST_DIR)) {
|
|
182
182
|
throw new Error("docs vitepress build finished but dist/docs/index.html is missing");
|
|
183
183
|
}
|
|
184
|
-
logger("[
|
|
184
|
+
logger("[bdk] docs site build complete");
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
/** True when docs sources + a resolvable `vitepress` CLI are present. */
|
|
@@ -118,7 +118,7 @@ export class EvalRunStore {
|
|
|
118
118
|
this.abortByRunId.set(runId, abort);
|
|
119
119
|
this.pruneOldRuns(config);
|
|
120
120
|
this.persist(snapshot);
|
|
121
|
-
this.logger(`[
|
|
121
|
+
this.logger(`[bdk] eval run ${runId}: starting ${cases.length} case(s)`);
|
|
122
122
|
void this.execute(runId, Object.assign(Object.assign(Object.assign({ baseUrl: loopbackUrl, evals: selected, config, signal: abort.signal }, (input.bearerToken === undefined ? {} : { bearerToken: input.bearerToken })), (input.verbose === undefined ? {} : { verbose: input.verbose })), (input.timeoutMs === undefined ? {} : { timeoutMs: input.timeoutMs })));
|
|
123
123
|
return snapshot;
|
|
124
124
|
});
|
|
@@ -147,7 +147,7 @@ export class EvalRunStore {
|
|
|
147
147
|
if (this.activeRunId === runId) {
|
|
148
148
|
this.activeRunId = undefined;
|
|
149
149
|
}
|
|
150
|
-
this.logger(`[
|
|
150
|
+
this.logger(`[bdk] eval run ${runId}: cancelled`);
|
|
151
151
|
return run;
|
|
152
152
|
});
|
|
153
153
|
}
|
|
@@ -201,14 +201,14 @@ export class EvalRunStore {
|
|
|
201
201
|
config = (yield discoverEvals(this.projectRoot)).config;
|
|
202
202
|
}
|
|
203
203
|
catch (error) {
|
|
204
|
-
this.logger(`[
|
|
204
|
+
this.logger(`[bdk] eval discovery failed during hydrate (pruning with defaults): ${error instanceof Error ? error.message : String(error)}`);
|
|
205
205
|
}
|
|
206
206
|
this.pruneOldRuns(config);
|
|
207
|
-
this.logger(`[
|
|
207
|
+
this.logger(`[bdk] hydrated ${this.runs.size} playground eval run(s) from storage`);
|
|
208
208
|
}
|
|
209
209
|
catch (error) {
|
|
210
210
|
const message = error instanceof Error ? error.message : String(error);
|
|
211
|
-
this.logger(`[
|
|
211
|
+
this.logger(`[bdk] failed to hydrate playground eval runs: ${message}`);
|
|
212
212
|
}
|
|
213
213
|
finally {
|
|
214
214
|
this.hydrated = true;
|
|
@@ -319,7 +319,7 @@ export class EvalRunStore {
|
|
|
319
319
|
run.status = "completed";
|
|
320
320
|
run.finishedAt = new Date().toISOString();
|
|
321
321
|
this.persist(run);
|
|
322
|
-
this.logger(`[
|
|
322
|
+
this.logger(`[bdk] eval run ${runId}: done — ${run.summary.passed} passed, ${run.summary.failed} failed`);
|
|
323
323
|
}
|
|
324
324
|
catch (error) {
|
|
325
325
|
const run = this.runs.get(runId);
|
|
@@ -330,14 +330,14 @@ export class EvalRunStore {
|
|
|
330
330
|
if (opts.signal.aborted || message === "cancelled") {
|
|
331
331
|
markCancelledRun(run);
|
|
332
332
|
this.persist(run);
|
|
333
|
-
this.logger(`[
|
|
333
|
+
this.logger(`[bdk] eval run ${runId}: cancelled`);
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
run.status = "failed";
|
|
337
337
|
run.finishedAt = new Date().toISOString();
|
|
338
338
|
run.error = message;
|
|
339
339
|
this.persist(run);
|
|
340
|
-
this.logger(`[
|
|
340
|
+
this.logger(`[bdk] eval run ${runId}: failed — ${run.error}`);
|
|
341
341
|
}
|
|
342
342
|
finally {
|
|
343
343
|
this.abortByRunId.delete(runId);
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework-
|
|
2
|
+
* Framework-owned storage for managed architecture-v2 agents.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* is browsable from the dashboard and mountable on cloud-runtime VMs;
|
|
9
|
-
* - the **framework-level** store (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`)
|
|
10
|
-
* holds engine-owned session state — session records, event transcripts,
|
|
11
|
-
* hosted-execution run logs, the continuation index, and the SDK
|
|
12
|
-
* conversation mirror — and is never mounted into author code or models.
|
|
13
|
-
* The authenticated dashboard may read diagnostic families, but never the
|
|
14
|
-
* continuation index.
|
|
15
|
-
*
|
|
16
|
-
* This module puts framework session state on the framework store. The
|
|
17
|
-
* {@link storageKeys} scheme was designed for exactly this: keys are a
|
|
18
|
-
* stable versioned contract that sinks may route on, so
|
|
19
|
-
* {@link composeFrameworkStorage} splits one {@link StorageConfig} by key
|
|
20
|
-
* kind — `session` / `session-events` / `session-runs` / `logs` /
|
|
21
|
-
* `continuation` go to the framework file store (file-shaped; the store
|
|
22
|
-
* accepts values up to 64 MiB per
|
|
23
|
-
* object without chunking, versus the KV proxy's 1 MiB row cap), while
|
|
24
|
-
* author `kv`, eval runs, and conditional writes stay on the control-plane
|
|
25
|
-
* KV proxy (the dashboard reads them there, and CAS needs a database).
|
|
26
|
-
*
|
|
27
|
-
* v2 only, by construction: the composite is selected in
|
|
28
|
-
* framework-storage-selection.ts, which v1 never reaches with a
|
|
29
|
-
* platform-selected definition.
|
|
4
|
+
* Session records, event transcripts, run logs, continuation state, and SDK
|
|
5
|
+
* conversation checkpoints use a framework-only namespace. Authors cannot
|
|
6
|
+
* access that namespace through `host.kv` or `host.files`. Author KV, evals,
|
|
7
|
+
* and conditional writes remain on the author-facing side of the split.
|
|
30
8
|
*/
|
|
31
9
|
import type { FileSink } from "../files.js";
|
|
32
10
|
import type { StorageConfig } from "../storage.js";
|
|
@@ -38,8 +16,8 @@ import type { StorageConfig } from "../storage.js";
|
|
|
38
16
|
export declare function isFrameworkFileKey(key: string): boolean;
|
|
39
17
|
/**
|
|
40
18
|
* The KV core over a {@link FileSink}: one JSON document per key.
|
|
41
|
-
* `putMany` stays optional
|
|
42
|
-
*
|
|
19
|
+
* `putMany` stays optional, and the composite falls back to sequential puts
|
|
20
|
+
* when a side has no batch write.
|
|
43
21
|
*/
|
|
44
22
|
export type FileSinkStorageCore = Required<Pick<StorageConfig, "put" | "get" | "delete" | "list">> & Pick<StorageConfig, "putMany">;
|
|
45
23
|
/**
|
|
@@ -65,11 +43,9 @@ export declare function composeFrameworkStorage(input: {
|
|
|
65
43
|
/**
|
|
66
44
|
* The KV backend's conditional writes, refusing framework-file keys.
|
|
67
45
|
*
|
|
68
|
-
*
|
|
69
|
-
* framework
|
|
70
|
-
*
|
|
71
|
-
* write a different store than the plain path — silent split-brain. Fail
|
|
72
|
-
* loudly instead; nothing in the package CASes those kinds today.
|
|
46
|
+
* Conditional writes remain on the author-facing KV side. Accepting a
|
|
47
|
+
* framework key here would read and write different stores for the same key,
|
|
48
|
+
* so fail instead of creating split-brain state.
|
|
73
49
|
*/
|
|
74
50
|
export declare function frameworkGuardedCas(cas: NonNullable<StorageConfig["cas"]>): NonNullable<StorageConfig["cas"]>;
|
|
75
51
|
//# sourceMappingURL=framework-file-storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-file-storage.d.ts","sourceRoot":"","sources":["../../src/internal/framework-file-storage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"framework-file-storage.d.ts","sourceRoot":"","sources":["../../src/internal/framework-file-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,eAAe,CAAC;AAiBjE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAavD;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC,GAChG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAgBjC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,mBAAmB,CA2GvE;AA6CD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,EAAE,EAAE,mBAAmB,CAAC;IACxB,KAAK,EAAE,mBAAmB,CAAC;CAC5B,GAAG,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAqD1D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GACrC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CA0BnC"}
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework-
|
|
2
|
+
* Framework-owned storage for managed architecture-v2 agents.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* is browsable from the dashboard and mountable on cloud-runtime VMs;
|
|
9
|
-
* - the **framework-level** store (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`)
|
|
10
|
-
* holds engine-owned session state — session records, event transcripts,
|
|
11
|
-
* hosted-execution run logs, the continuation index, and the SDK
|
|
12
|
-
* conversation mirror — and is never mounted into author code or models.
|
|
13
|
-
* The authenticated dashboard may read diagnostic families, but never the
|
|
14
|
-
* continuation index.
|
|
15
|
-
*
|
|
16
|
-
* This module puts framework session state on the framework store. The
|
|
17
|
-
* {@link storageKeys} scheme was designed for exactly this: keys are a
|
|
18
|
-
* stable versioned contract that sinks may route on, so
|
|
19
|
-
* {@link composeFrameworkStorage} splits one {@link StorageConfig} by key
|
|
20
|
-
* kind — `session` / `session-events` / `session-runs` / `logs` /
|
|
21
|
-
* `continuation` go to the framework file store (file-shaped; the store
|
|
22
|
-
* accepts values up to 64 MiB per
|
|
23
|
-
* object without chunking, versus the KV proxy's 1 MiB row cap), while
|
|
24
|
-
* author `kv`, eval runs, and conditional writes stay on the control-plane
|
|
25
|
-
* KV proxy (the dashboard reads them there, and CAS needs a database).
|
|
26
|
-
*
|
|
27
|
-
* v2 only, by construction: the composite is selected in
|
|
28
|
-
* framework-storage-selection.ts, which v1 never reaches with a
|
|
29
|
-
* platform-selected definition.
|
|
4
|
+
* Session records, event transcripts, run logs, continuation state, and SDK
|
|
5
|
+
* conversation checkpoints use a framework-only namespace. Authors cannot
|
|
6
|
+
* access that namespace through `host.kv` or `host.files`. Author KV, evals,
|
|
7
|
+
* and conditional writes remain on the author-facing side of the split.
|
|
30
8
|
*/
|
|
31
9
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
32
10
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -69,7 +47,7 @@ export function isFrameworkFileKey(key) {
|
|
|
69
47
|
const kind = kindEnd === -1 ? afterAgent : afterAgent.slice(0, kindEnd);
|
|
70
48
|
return FRAMEWORK_FILE_KINDS.has(kind);
|
|
71
49
|
}
|
|
72
|
-
/** Parallel per-key reads backing `list
|
|
50
|
+
/** Parallel per-key reads backing `list`. */
|
|
73
51
|
const LIST_READ_CONCURRENCY = 8;
|
|
74
52
|
/**
|
|
75
53
|
* A storage key whose path the file store cannot represent (an empty, `.`,
|
|
@@ -130,7 +108,7 @@ export function fileSinkStorageCore(sink) {
|
|
|
130
108
|
return results;
|
|
131
109
|
}
|
|
132
110
|
if (sink.putMany !== undefined) {
|
|
133
|
-
//
|
|
111
|
+
// Preserve the sink's batch behavior when it provides one.
|
|
134
112
|
const settled = yield sink.putMany(writable.map(({ key, body }) => ({ key, body })));
|
|
135
113
|
for (let i = 0; i < writable.length; i += 1) {
|
|
136
114
|
const target = writable[i];
|
|
@@ -180,11 +158,8 @@ export function fileSinkStorageCore(sink) {
|
|
|
180
158
|
list(prefix) {
|
|
181
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
182
160
|
const entries = yield sink.list(prefix);
|
|
183
|
-
// FileSink.list returns metadata only, so
|
|
184
|
-
//
|
|
185
|
-
// one control-plane call per 100 keys instead of one per key, which is
|
|
186
|
-
// what keeps a big restore under the store's per-deployment rate
|
|
187
|
-
// budget — and fall back to bounded per-key gets elsewhere.
|
|
161
|
+
// FileSink.list returns metadata only, so values require separate reads.
|
|
162
|
+
// Prefer the sink's batch API and otherwise use bounded parallel reads.
|
|
188
163
|
const bodies = sink.getMany !== undefined
|
|
189
164
|
? yield sink.getMany(entries.map(entry => entry.key))
|
|
190
165
|
: yield mapBounded(entries, LIST_READ_CONCURRENCY, entry => sink.get(entry.key));
|
|
@@ -305,11 +280,9 @@ export function composeFrameworkStorage(input) {
|
|
|
305
280
|
/**
|
|
306
281
|
* The KV backend's conditional writes, refusing framework-file keys.
|
|
307
282
|
*
|
|
308
|
-
*
|
|
309
|
-
* framework
|
|
310
|
-
*
|
|
311
|
-
* write a different store than the plain path — silent split-brain. Fail
|
|
312
|
-
* loudly instead; nothing in the package CASes those kinds today.
|
|
283
|
+
* Conditional writes remain on the author-facing KV side. Accepting a
|
|
284
|
+
* framework key here would read and write different stores for the same key,
|
|
285
|
+
* so fail instead of creating split-brain state.
|
|
313
286
|
*/
|
|
314
287
|
export function frameworkGuardedCas(cas) {
|
|
315
288
|
const refuse = (key) => {
|
|
@@ -1,50 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Selects where framework session state is durably mirrored.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* first-party agents, some choose `cursorHostedStorage()` and some choose
|
|
9
|
-
* `fileKv()` (pod-local disk, lost on pod replacement), and one selects
|
|
10
|
-
* between them at runtime by reading the deployment-id environment variable
|
|
11
|
-
* itself.
|
|
4
|
+
* Architecture v1 honors authored storage. Without it, Cursor-managed
|
|
5
|
+
* hosting selects managed storage, while self-hosted agents use
|
|
6
|
+
* `--state-root`. Architecture v2 rejects authored storage and selects the
|
|
7
|
+
* managed backend only on Cursor-managed hosting.
|
|
12
8
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* platform picks the default. Architecture v1 with no authored file now
|
|
17
|
-
* uses the same hosted-vs-self-hosted split, so deleting `agent/storage.ts`
|
|
18
|
-
* (required to deploy the same tree onto v2) does not drop the Cursor-hosted
|
|
19
|
-
* session mirror on a still-v1 pod.
|
|
20
|
-
*
|
|
21
|
-
* - **Cursor-managed hosting** (the deployment-generation environment
|
|
22
|
-
* variable is set, same signal that registers `GET /v1/manifest`):
|
|
23
|
-
* the deployment's **framework-level file store**
|
|
24
|
-
* (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`, bound at task time) holds
|
|
25
|
-
* session records, event transcripts, and the continuation index —
|
|
26
|
-
* file-shaped state on file storage, apart from the author-facing user
|
|
27
|
-
* store. Author `host.kv`, eval runs, and conditional writes ride the
|
|
28
|
-
* AgentSDK v2 KV proxy (cursor-hosted-v2.ts), which resolves the
|
|
29
|
-
* pod service account to the factorydb deployment row (the v1 Bugbot
|
|
30
|
-
* proxy cannot resolve v2 pods at all). Framework session state never
|
|
31
|
-
* routes to the KV proxy — the composite splits by key kind — so
|
|
32
|
-
* transcripts stay off the author-reachable KV namespace. The API key
|
|
33
|
-
* resolves through the full credential chain on every call because hosted
|
|
34
|
-
* freeze snapshots listen unsigned and the binder drops the key file
|
|
35
|
-
* after restore.
|
|
36
|
-
* - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
|
|
37
|
-
* is correct when the operator owns the disk.
|
|
38
|
-
*
|
|
39
|
-
* v1 still honors an authored `agent/storage.ts` when present. Hosted v1
|
|
40
|
-
* pods with no authored file get the Cursor-hosted lazy mirror (gated on
|
|
41
|
-
* `AGENT_SERVE_DEPLOYMENT_ID`, the same signal the previous authored sinks
|
|
42
|
-
* used). Self-hosted v1 with no authored file stays disk-only.
|
|
43
|
-
*
|
|
44
|
-
* Local disk is not part of this decision. `<stateRoot>/sessions/<id>/`
|
|
45
|
-
* already holds `session.json` and `events.ndjson` unconditionally, through
|
|
46
|
-
* the session store; what this selects is the durable mirror *beyond* the
|
|
47
|
-
* pod's filesystem.
|
|
9
|
+
* When managed storage is selected, framework-owned session records, event
|
|
10
|
+
* transcripts, and continuation state stay separate from author-facing files
|
|
11
|
+
* and KV.
|
|
48
12
|
*/
|
|
49
13
|
import { type StorageDefinition } from "../storage.js";
|
|
50
14
|
import type { AgentArchitecture } from "../types.js";
|
|
@@ -59,8 +23,8 @@ export interface FrameworkStorageSelectionInput {
|
|
|
59
23
|
/**
|
|
60
24
|
* Pick the backend for framework session state.
|
|
61
25
|
*
|
|
62
|
-
* Returns `undefined` when there is no mirror, in which case the
|
|
63
|
-
*
|
|
26
|
+
* Returns `undefined` when there is no mirror, in which case the local state
|
|
27
|
+
* directory is the only copy.
|
|
64
28
|
*/
|
|
65
29
|
export declare function selectFrameworkStorageDefinition(input: FrameworkStorageSelectionInput): StorageDefinition | undefined;
|
|
66
30
|
//# sourceMappingURL=framework-storage-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,MAAM,WAAW,8BAA8B;IAC7C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,6EAA6E;IAC7E,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,8BAA8B,GACpC,iBAAiB,GAAG,SAAS,CA4D/B"}
|
|
@@ -1,50 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Selects where framework session state is durably mirrored.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* first-party agents, some choose `cursorHostedStorage()` and some choose
|
|
9
|
-
* `fileKv()` (pod-local disk, lost on pod replacement), and one selects
|
|
10
|
-
* between them at runtime by reading the deployment-id environment variable
|
|
11
|
-
* itself.
|
|
4
|
+
* Architecture v1 honors authored storage. Without it, Cursor-managed
|
|
5
|
+
* hosting selects managed storage, while self-hosted agents use
|
|
6
|
+
* `--state-root`. Architecture v2 rejects authored storage and selects the
|
|
7
|
+
* managed backend only on Cursor-managed hosting.
|
|
12
8
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* platform picks the default. Architecture v1 with no authored file now
|
|
17
|
-
* uses the same hosted-vs-self-hosted split, so deleting `agent/storage.ts`
|
|
18
|
-
* (required to deploy the same tree onto v2) does not drop the Cursor-hosted
|
|
19
|
-
* session mirror on a still-v1 pod.
|
|
20
|
-
*
|
|
21
|
-
* - **Cursor-managed hosting** (the deployment-generation environment
|
|
22
|
-
* variable is set, same signal that registers `GET /v1/manifest`):
|
|
23
|
-
* the deployment's **framework-level file store**
|
|
24
|
-
* (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`, bound at task time) holds
|
|
25
|
-
* session records, event transcripts, and the continuation index —
|
|
26
|
-
* file-shaped state on file storage, apart from the author-facing user
|
|
27
|
-
* store. Author `host.kv`, eval runs, and conditional writes ride the
|
|
28
|
-
* AgentSDK v2 KV proxy (cursor-hosted-v2.ts), which resolves the
|
|
29
|
-
* pod service account to the factorydb deployment row (the v1 Bugbot
|
|
30
|
-
* proxy cannot resolve v2 pods at all). Framework session state never
|
|
31
|
-
* routes to the KV proxy — the composite splits by key kind — so
|
|
32
|
-
* transcripts stay off the author-reachable KV namespace. The API key
|
|
33
|
-
* resolves through the full credential chain on every call because hosted
|
|
34
|
-
* freeze snapshots listen unsigned and the binder drops the key file
|
|
35
|
-
* after restore.
|
|
36
|
-
* - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
|
|
37
|
-
* is correct when the operator owns the disk.
|
|
38
|
-
*
|
|
39
|
-
* v1 still honors an authored `agent/storage.ts` when present. Hosted v1
|
|
40
|
-
* pods with no authored file get the Cursor-hosted lazy mirror (gated on
|
|
41
|
-
* `AGENT_SERVE_DEPLOYMENT_ID`, the same signal the previous authored sinks
|
|
42
|
-
* used). Self-hosted v1 with no authored file stays disk-only.
|
|
43
|
-
*
|
|
44
|
-
* Local disk is not part of this decision. `<stateRoot>/sessions/<id>/`
|
|
45
|
-
* already holds `session.json` and `events.ndjson` unconditionally, through
|
|
46
|
-
* the session store; what this selects is the durable mirror *beyond* the
|
|
47
|
-
* pod's filesystem.
|
|
9
|
+
* When managed storage is selected, framework-owned session records, event
|
|
10
|
+
* transcripts, and continuation state stay separate from author-facing files
|
|
11
|
+
* and KV.
|
|
48
12
|
*/
|
|
49
13
|
import { cursorHostedFiles } from "../files-backends/cursor-hosted.js";
|
|
50
14
|
import { defineStorage } from "../storage.js";
|
|
@@ -56,8 +20,8 @@ import { resolveAgentV2Hosting } from "./v2-hosting.js";
|
|
|
56
20
|
/**
|
|
57
21
|
* Pick the backend for framework session state.
|
|
58
22
|
*
|
|
59
|
-
* Returns `undefined` when there is no mirror, in which case the
|
|
60
|
-
*
|
|
23
|
+
* Returns `undefined` when there is no mirror, in which case the local state
|
|
24
|
+
* directory is the only copy.
|
|
61
25
|
*/
|
|
62
26
|
export function selectFrameworkStorageDefinition(input) {
|
|
63
27
|
var _a, _b;
|
|
@@ -67,7 +31,7 @@ export function selectFrameworkStorageDefinition(input) {
|
|
|
67
31
|
}
|
|
68
32
|
const env = (_a = input.env) !== null && _a !== void 0 ? _a : process.env;
|
|
69
33
|
if (((_b = env[AGENT_SERVE_DEPLOYMENT_ID_ENV_VAR]) !== null && _b !== void 0 ? _b : "").trim() !== "") {
|
|
70
|
-
//
|
|
34
|
+
// Managed v1 deployment with no authored sink: keep the Cursor-hosted
|
|
71
35
|
// mirror (lazy restore) so agents can delete `agent/storage.ts`
|
|
72
36
|
// without losing durability while they still run architecture v1.
|
|
73
37
|
return defineStorage(Object.assign({ name: "cursor-hosted (lazy restore)", policy: { restore: "off" } }, cursorHostedStorage()));
|
|
@@ -88,27 +52,14 @@ export function selectFrameworkStorageDefinition(input) {
|
|
|
88
52
|
// Self-hosted v2: the state root is the durable copy.
|
|
89
53
|
return undefined;
|
|
90
54
|
}
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
// backend it is per-key HTTP round trips before the listener even
|
|
94
|
-
// comes up). Follow-ups restore lazily by continuation or session id;
|
|
95
|
-
// GET /v1/sessions lists from the sink either way.
|
|
96
|
-
//
|
|
97
|
-
// Events flush at turn end. drainSessionDurability still forces the
|
|
98
|
-
// record onto the sink before the execution reply.
|
|
55
|
+
// Managed v2 hosts restore sessions lazily by continuation or session id.
|
|
56
|
+
// Turn completion still waits for the session record to reach storage.
|
|
99
57
|
const policy = {
|
|
100
58
|
restore: "off",
|
|
101
59
|
};
|
|
102
|
-
// Full chain (env → bind file → stored login): frozen engines listen
|
|
103
|
-
// unsigned and bind store ids + CURSOR_API_KEY at task time, after this
|
|
104
|
-
// definition is constructed.
|
|
105
60
|
const resolveApiKey = () => { var _a; return (_a = resolveApiKeySync()) === null || _a === void 0 ? void 0 : _a.apiKey; };
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
// eval/A-B tables speak the AgentSDK v2 KV proxy instead. It also carries
|
|
109
|
-
// the cursor-hosted marker, so GET /v1/sessions prefers the durable list
|
|
110
|
-
// (session records are on the framework store, which the composed core
|
|
111
|
-
// lists).
|
|
61
|
+
// Author KV, CAS coordination, and evals stay separate from framework-owned
|
|
62
|
+
// session state. Session listing reads the framework side of that split.
|
|
112
63
|
const kv = cursorHostedStorageV2({ resolveApiKey });
|
|
113
64
|
return defineStorage(Object.assign(Object.assign(Object.assign({ name: "cursor-hosted (framework files)", policy }, kv), composeFrameworkStorage({
|
|
114
65
|
kv,
|
|
@@ -103,13 +103,13 @@ export function fanoutDelivery(body_1, headers_1, targets_1) {
|
|
|
103
103
|
body: payload,
|
|
104
104
|
});
|
|
105
105
|
if (!response.ok) {
|
|
106
|
-
log(`[
|
|
106
|
+
log(`[bdk] delivery to ${label} failed: HTTP ${response.status}\n`);
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
delivered.push(label);
|
|
110
110
|
}
|
|
111
111
|
catch (error) {
|
|
112
|
-
log(`[
|
|
112
|
+
log(`[bdk] delivery to ${label} failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
113
113
|
}
|
|
114
114
|
})));
|
|
115
115
|
if (recipients.length > 0 && delivered.length === 0) {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (e.g. the Cursor backend GitHub webhook or Origin cursor-internal tap).
|
|
4
|
-
* Mirrors Automations' `handleAutomationTrigger`.
|
|
2
|
+
* Dispatches authenticated GitHub and Origin events to matching agents.
|
|
5
3
|
*
|
|
6
|
-
* Callers must authenticate the delivery before invoking this
|
|
7
|
-
*
|
|
8
|
-
* cursor-internal app). This fan-out does not re-check signatures — same
|
|
9
|
-
* trust model as Bugbot after `verifyGithubRequest`.
|
|
4
|
+
* Callers must authenticate the delivery before invoking this fan-out. It
|
|
5
|
+
* does not re-check provider signatures.
|
|
10
6
|
*
|
|
11
|
-
* Each agent's `onPullRequest
|
|
7
|
+
* Each agent's `onPullRequest`, `onComment`, and related hooks decide whether
|
|
8
|
+
* to run.
|
|
12
9
|
*/
|
|
13
10
|
import type { GitHubChannelOptions } from "../channels/github/types.js";
|
|
14
11
|
import type { OriginChannelOptions } from "../channels/origin/types.js";
|