@cursor/bdk 0.2.6 → 0.2.8
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 +32 -8
- 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/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 +35 -35
- 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 +40 -44
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +108 -97
- 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-cost.d.ts.map +1 -1
- package/dist/internal/turn-cost.js +31 -18
- 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
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* `POST /internal/agentsdk/store/api/<call>` carrying a versioned JSON
|
|
4
|
-
* envelope `{ v, call, payload }`. This is the lane where the **server** owns
|
|
5
|
-
* the storage pattern (journal sharding, rotation, compaction), so a
|
|
6
|
-
* pathological pattern is fixable in a backend deploy instead of a July
|
|
7
|
-
* release plus a rebake of every deployment. The verb lane (`/flush`,
|
|
8
|
-
* `/read`, `/list`) keeps carrying bulk presigned file IO.
|
|
9
|
-
*
|
|
10
|
-
* Deliberately duplicated on the backend
|
|
11
|
-
* (`backend/server/src/factory/agent-sdk/agentsdkStoreApiProtocol.ts`): this
|
|
12
|
-
* package is published to npm, so the backend cannot depend on it and it
|
|
13
|
-
* cannot depend on backend packages. A backend drift test compares the two
|
|
14
|
-
* sources — same shape as the hosted-delivery protocol twins — which is why
|
|
15
|
-
* every exported constant here stays a single `export const NAME = <literal>;`
|
|
16
|
-
* line and every schema field stays on its own line.
|
|
2
|
+
* Versioned wire contract for Cursor-managed store operations.
|
|
17
3
|
*
|
|
18
4
|
* Evolution rules (the compat contract): additive optional fields only; no
|
|
19
5
|
* renames, no retypes, no semantic reuse of an old field; unknown fields are
|
|
@@ -23,26 +9,23 @@
|
|
|
23
9
|
*/
|
|
24
10
|
import { z } from "zod";
|
|
25
11
|
export declare const STORE_API_PROTOCOL_VERSION = 1;
|
|
26
|
-
/**
|
|
12
|
+
/** Managed storage endpoint, with one trailing segment per call. */
|
|
27
13
|
export declare const STORE_API_PATH = "/internal/agentsdk/store/api";
|
|
28
14
|
export declare const STORE_API_MEMORY_APPEND_CALL = "memory.append";
|
|
29
15
|
/**
|
|
30
16
|
* Semantic cap on one serialized memory record. Text fields are truncated
|
|
31
17
|
* client-side (`memoryHook` default 2000 chars per field), so a well-formed
|
|
32
18
|
* record is a few KiB; 16 KiB is generous headroom, not a target. The cap is
|
|
33
|
-
* part of the wire contract but
|
|
34
|
-
*
|
|
35
|
-
* client (`cursor/store-api-client.ts`) pre-checks it before spending a
|
|
36
|
-
* doomed request.
|
|
19
|
+
* part of the wire contract but not the schema. The service enforces it as a
|
|
20
|
+
* typed 4xx, and the client checks it before sending a request.
|
|
37
21
|
*/
|
|
38
22
|
export declare const MEMORY_APPEND_MAX_RECORD_BYTES: number;
|
|
39
23
|
/** Serialized size of a record, as counted against the byte cap. */
|
|
40
24
|
export declare function serializedRecordBytes(record: unknown): number;
|
|
41
25
|
/**
|
|
42
|
-
* One turn's memory record as it crosses the wire
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* verbatim rather than stripped by an older server.
|
|
26
|
+
* One turn's memory record as it crosses the wire. The extra-key record
|
|
27
|
+
* mirrors the schema's `.passthrough()`: a newer client's additive optional
|
|
28
|
+
* fields are journaled verbatim rather than stripped by an older server.
|
|
46
29
|
*/
|
|
47
30
|
export type TurnMemoryRecordWire = {
|
|
48
31
|
at: string;
|
|
@@ -69,8 +52,8 @@ export type MemoryAppendPayload = {
|
|
|
69
52
|
/**
|
|
70
53
|
* `memory.append` payload shape. The agent name becomes a store key segment
|
|
71
54
|
* on the server, so it must be exactly one segment. Unknown payload fields
|
|
72
|
-
* are stripped (= ignored), per the evolution rules. The
|
|
73
|
-
*
|
|
55
|
+
* are stripped (= ignored), per the evolution rules. The service owns the
|
|
56
|
+
* byte cap because it is a semantic limit rather than part of the shape.
|
|
74
57
|
*/
|
|
75
58
|
export declare const memoryAppendPayloadSchema: z.ZodType<MemoryAppendPayload>;
|
|
76
59
|
/** The versioned request body for the `memory.append` call. */
|
|
@@ -110,13 +93,9 @@ export type MemoryReadEnvelope = {
|
|
|
110
93
|
/** The whole request body. Unknown envelope fields are stripped (= ignored). */
|
|
111
94
|
export declare const memoryReadEnvelopeSchema: z.ZodType<MemoryReadEnvelope>;
|
|
112
95
|
/**
|
|
113
|
-
* `memory.read` success body. The
|
|
114
|
-
*
|
|
115
|
-
* the
|
|
116
|
-
* read; a busy flush lock, a buffer outage, or an oversized backlog
|
|
117
|
-
* degrades to the already-flushed state (callers must not regress their
|
|
118
|
-
* local view on a shorter download). `journal` is null while the agent has
|
|
119
|
-
* no journal at all.
|
|
96
|
+
* `memory.read` success body. The snapshot is best-effort and may lag
|
|
97
|
+
* accepted appends, so callers retain a longer local view. `journal` is null
|
|
98
|
+
* while the agent has no journal.
|
|
120
99
|
*/
|
|
121
100
|
export type MemoryReadResponse = {
|
|
122
101
|
v: typeof STORE_API_PROTOCOL_VERSION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-api-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/store-api-protocol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"store-api-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/store-api-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,oEAAoE;AACpE,eAAO,MAAM,cAAc,iCAAiC,CAAC;AAE7D,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAkB,CAAC;AAEhE,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAYvD,CAAC;AAEjB,yCAAyC;AACzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CASnE,CAAC;AAEH,+DAA+D;AAC/D,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrC,IAAI,EAAE,OAAO,4BAA4B,CAAC;IAC1C,OAAO,EAAE,mBAAmB,CAAC;CAC9B,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAIrE,CAAC;AAEH,oCAAoC;AACpC,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrC,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAGrE,CAAC;AAEH,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD,uCAAuC;AACvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAQ/D,CAAC;AAEH,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrC,IAAI,EAAE,OAAO,0BAA0B,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAIjE,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrC,EAAE,EAAE,IAAI,CAAC;IACT,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CASjE,CAAC"}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* `POST /internal/agentsdk/store/api/<call>` carrying a versioned JSON
|
|
4
|
-
* envelope `{ v, call, payload }`. This is the lane where the **server** owns
|
|
5
|
-
* the storage pattern (journal sharding, rotation, compaction), so a
|
|
6
|
-
* pathological pattern is fixable in a backend deploy instead of a July
|
|
7
|
-
* release plus a rebake of every deployment. The verb lane (`/flush`,
|
|
8
|
-
* `/read`, `/list`) keeps carrying bulk presigned file IO.
|
|
9
|
-
*
|
|
10
|
-
* Deliberately duplicated on the backend
|
|
11
|
-
* (`backend/server/src/factory/agent-sdk/agentsdkStoreApiProtocol.ts`): this
|
|
12
|
-
* package is published to npm, so the backend cannot depend on it and it
|
|
13
|
-
* cannot depend on backend packages. A backend drift test compares the two
|
|
14
|
-
* sources — same shape as the hosted-delivery protocol twins — which is why
|
|
15
|
-
* every exported constant here stays a single `export const NAME = <literal>;`
|
|
16
|
-
* line and every schema field stays on its own line.
|
|
2
|
+
* Versioned wire contract for Cursor-managed store operations.
|
|
17
3
|
*
|
|
18
4
|
* Evolution rules (the compat contract): additive optional fields only; no
|
|
19
5
|
* renames, no retypes, no semantic reuse of an old field; unknown fields are
|
|
@@ -23,17 +9,15 @@
|
|
|
23
9
|
*/
|
|
24
10
|
import { z } from "zod";
|
|
25
11
|
export const STORE_API_PROTOCOL_VERSION = 1;
|
|
26
|
-
/**
|
|
12
|
+
/** Managed storage endpoint, with one trailing segment per call. */
|
|
27
13
|
export const STORE_API_PATH = "/internal/agentsdk/store/api";
|
|
28
14
|
export const STORE_API_MEMORY_APPEND_CALL = "memory.append";
|
|
29
15
|
/**
|
|
30
16
|
* Semantic cap on one serialized memory record. Text fields are truncated
|
|
31
17
|
* client-side (`memoryHook` default 2000 chars per field), so a well-formed
|
|
32
18
|
* record is a few KiB; 16 KiB is generous headroom, not a target. The cap is
|
|
33
|
-
* part of the wire contract but
|
|
34
|
-
*
|
|
35
|
-
* client (`cursor/store-api-client.ts`) pre-checks it before spending a
|
|
36
|
-
* doomed request.
|
|
19
|
+
* part of the wire contract but not the schema. The service enforces it as a
|
|
20
|
+
* typed 4xx, and the client checks it before sending a request.
|
|
37
21
|
*/
|
|
38
22
|
export const MEMORY_APPEND_MAX_RECORD_BYTES = 16 * 1024;
|
|
39
23
|
/** Serialized size of a record, as counted against the byte cap. */
|
|
@@ -61,8 +45,8 @@ export const turnMemoryRecordWireSchema = z
|
|
|
61
45
|
/**
|
|
62
46
|
* `memory.append` payload shape. The agent name becomes a store key segment
|
|
63
47
|
* on the server, so it must be exactly one segment. Unknown payload fields
|
|
64
|
-
* are stripped (= ignored), per the evolution rules. The
|
|
65
|
-
*
|
|
48
|
+
* are stripped (= ignored), per the evolution rules. The service owns the
|
|
49
|
+
* byte cap because it is a semantic limit rather than part of the shape.
|
|
66
50
|
*/
|
|
67
51
|
export const memoryAppendPayloadSchema = z.object({
|
|
68
52
|
agent: z
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Mirror an authored file tree onto
|
|
2
|
+
* Mirror an authored file tree onto a durable storage prefix. Shared by the
|
|
3
3
|
* skills, workspace seed, and session workspaceFile syncs so they keep the
|
|
4
4
|
* same write-then-sweep discipline and the same path refusals.
|
|
5
5
|
*/
|
|
@@ -19,11 +19,10 @@ export declare function mirrorToStore(args: {
|
|
|
19
19
|
}): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Same refusals as local materialization's `resolveInside`: a rel that
|
|
22
|
-
* escapes its directory or
|
|
22
|
+
* escapes its directory or cannot round-trip through managed storage
|
|
23
23
|
* (`..`, `.`, `//`, absolute) fails the sync, exactly as it fails a local
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* desired one and the stale pass would delete the file it just wrote.
|
|
24
|
+
* workspace write. Backslashes are refused because storage normalizes path
|
|
25
|
+
* separators, which would change the desired key.
|
|
27
26
|
*/
|
|
28
27
|
export declare function storeRelPath(relPath: string, what: "skill file" | "workspace file"): string;
|
|
29
28
|
//# sourceMappingURL=store-mirror.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-mirror.d.ts","sourceRoot":"","sources":["../../src/internal/store-mirror.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,gHAAgH;IAChH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,IAAI,CAAC,CAahB;AAED
|
|
1
|
+
{"version":3,"file":"store-mirror.d.ts","sourceRoot":"","sources":["../../src/internal/store-mirror.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,gHAAgH;IAChH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,IAAI,CAAC,CAahB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB,GAAG,MAAM,CAY3F"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Mirror an authored file tree onto
|
|
2
|
+
* Mirror an authored file tree onto a durable storage prefix. Shared by the
|
|
3
3
|
* skills, workspace seed, and session workspaceFile syncs so they keep the
|
|
4
4
|
* same write-then-sweep discipline and the same path refusals.
|
|
5
5
|
*/
|
|
@@ -33,11 +33,10 @@ export function mirrorToStore(args) {
|
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Same refusals as local materialization's `resolveInside`: a rel that
|
|
36
|
-
* escapes its directory or
|
|
36
|
+
* escapes its directory or cannot round-trip through managed storage
|
|
37
37
|
* (`..`, `.`, `//`, absolute) fails the sync, exactly as it fails a local
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* desired one and the stale pass would delete the file it just wrote.
|
|
38
|
+
* workspace write. Backslashes are refused because storage normalizes path
|
|
39
|
+
* separators, which would change the desired key.
|
|
41
40
|
*/
|
|
42
41
|
export function storeRelPath(relPath, what) {
|
|
43
42
|
if (relPath.includes("\0") ||
|
|
@@ -51,9 +50,8 @@ export function storeRelPath(relPath, what) {
|
|
|
51
50
|
return relPath;
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
54
|
-
* Last writer wins. A raced conditional put
|
|
55
|
-
*
|
|
56
|
-
* the current version and lands.
|
|
53
|
+
* Last writer wins. A raced conditional put clears the sink's cached etag,
|
|
54
|
+
* so one retry re-learns the current version and lands.
|
|
57
55
|
*/
|
|
58
56
|
function putLastWriterWins(sink, key, body) {
|
|
59
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-cost.d.ts","sourceRoot":"","sources":["../../src/internal/turn-cost.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGrE,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,qBAAqB,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;AAEjG,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAK1E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAYxF;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAC5B,GAAG,QAAQ,CAcX;
|
|
1
|
+
{"version":3,"file":"turn-cost.d.ts","sourceRoot":"","sources":["../../src/internal/turn-cost.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGrE,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,qBAAqB,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;AAEjG,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAK1E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAYxF;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAC5B,GAAG,QAAQ,CAcX;AAeD,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAgD/B"}
|
|
@@ -60,6 +60,12 @@ export function turnCostFromCents(args) {
|
|
|
60
60
|
chargedCents: args.cost.chargedCents,
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A session holds its delivery lease until `turn.completed`, and this request
|
|
65
|
+
* is the last thing in front of that event, so an unbounded wait here queues
|
|
66
|
+
* the next message behind the endpoint's billed-usage lookup.
|
|
67
|
+
*/
|
|
68
|
+
const ESTIMATE_COST_TIMEOUT_MS = 5000;
|
|
63
69
|
export function estimateTurnCostFromApi(input) {
|
|
64
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
71
|
var _a;
|
|
@@ -70,23 +76,30 @@ export function estimateTurnCostFromApi(input) {
|
|
|
70
76
|
}
|
|
71
77
|
const model = modelSettingId(input.model);
|
|
72
78
|
const catalogUsage = input.usage === undefined ? undefined : toCatalogDisjointUsage(input.usage, input.model);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
let response;
|
|
80
|
+
try {
|
|
81
|
+
response = yield fetch(`${cursorExternalApiUrl()}/v1/models/estimate-cost`, {
|
|
82
|
+
method: "POST",
|
|
83
|
+
headers: {
|
|
84
|
+
authorization: `Bearer ${resolved.apiKey}`,
|
|
85
|
+
"content-type": "application/json",
|
|
86
|
+
},
|
|
87
|
+
body: JSON.stringify({
|
|
88
|
+
model,
|
|
89
|
+
inputTokens: catalogUsage === null || catalogUsage === void 0 ? void 0 : catalogUsage.inputTokens,
|
|
90
|
+
outputTokens: catalogUsage === null || catalogUsage === void 0 ? void 0 : catalogUsage.outputTokens,
|
|
91
|
+
cacheReadTokens: catalogUsage === null || catalogUsage === void 0 ? void 0 : catalogUsage.cacheReadTokens,
|
|
92
|
+
cacheWriteTokens: catalogUsage === null || catalogUsage === void 0 ? void 0 : catalogUsage.cacheWriteTokens,
|
|
93
|
+
agentId: input.agentId,
|
|
94
|
+
conversationId: input.conversationId,
|
|
95
|
+
runId: input.runId,
|
|
96
|
+
}),
|
|
97
|
+
signal: AbortSignal.timeout(ESTIMATE_COST_TIMEOUT_MS),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
catch (_c) {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
90
103
|
if (!response.ok) {
|
|
91
104
|
return undefined;
|
|
92
105
|
}
|
|
@@ -94,7 +107,7 @@ export function estimateTurnCostFromApi(input) {
|
|
|
94
107
|
try {
|
|
95
108
|
body = (yield response.json());
|
|
96
109
|
}
|
|
97
|
-
catch (
|
|
110
|
+
catch (_d) {
|
|
98
111
|
return undefined;
|
|
99
112
|
}
|
|
100
113
|
if (typeof ((_a = body.cost) === null || _a === void 0 ? void 0 : _a.rawCostCents) !== "number" || typeof body.cost.chargedCents !== "number") {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Durable per-session turn ownership: `activeTurns` is in-memory, so servers
|
|
3
3
|
* sharing a state root would otherwise both run the same session.
|
|
4
4
|
*
|
|
5
|
-
* Exclusion
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Exclusion and liveness refresh come from `proper-lockfile`, which the
|
|
6
|
+
* monorepo already uses for the git cache. Taking an abandoned lock over is
|
|
7
|
+
* handled here, because the library does it by removing the stale lock and
|
|
8
|
+
* then creating its own, and contenders that interleave those two steps each
|
|
9
|
+
* come away holding the session.
|
|
10
10
|
*
|
|
11
11
|
* Liveness is lock age, not pid: containers have separate PID namespaces.
|
|
12
12
|
*/
|
|
@@ -32,6 +32,13 @@ export declare class TurnLeaseStore {
|
|
|
32
32
|
* of answering alongside its successor.
|
|
33
33
|
*/
|
|
34
34
|
acquire(sessionId: string, onCompromised?: () => void): Promise<TurnLease | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* Clear an abandoned lock, leaving a claim itself a single atomic `mkdir`.
|
|
37
|
+
* Only the contender holding the takeover removes anything, and no claim can
|
|
38
|
+
* land on an occupied path meanwhile, so the rest just race that `mkdir`.
|
|
39
|
+
*/
|
|
40
|
+
private evictStaleLock;
|
|
41
|
+
private isStale;
|
|
35
42
|
private handle;
|
|
36
43
|
/** Graceful shutdown: drop every claim so a successor need not wait it out. */
|
|
37
44
|
releaseAll(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-lease-store.d.ts","sourceRoot":"","sources":["../../src/internal/turn-lease-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"turn-lease-store.d.ts","sourceRoot":"","sources":["../../src/internal/turn-lease-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,kDAAkD;AAClD,MAAM,WAAW,SAAS;IACxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAmBD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IAEpD,YAAY,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,EAIxD;IAED,OAAO,CAAC,IAAI;IAIZ;;;;;;;OAOG;IACG,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA+B3F;IAED;;;;OAIG;YACW,cAAc;YAmCd,OAAO;IAKrB,OAAO,CAAC,MAAM;IAwBd,+EAA+E;IACzE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAKhC;IAED;;;OAGG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAY1D;CACF"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Durable per-session turn ownership: `activeTurns` is in-memory, so servers
|
|
3
3
|
* sharing a state root would otherwise both run the same session.
|
|
4
4
|
*
|
|
5
|
-
* Exclusion
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Exclusion and liveness refresh come from `proper-lockfile`, which the
|
|
6
|
+
* monorepo already uses for the git cache. Taking an abandoned lock over is
|
|
7
|
+
* handled here, because the library does it by removing the stale lock and
|
|
8
|
+
* then creating its own, and contenders that interleave those two steps each
|
|
9
|
+
* come away holding the session.
|
|
10
10
|
*
|
|
11
11
|
* Liveness is lock age, not pid: containers have separate PID namespaces.
|
|
12
12
|
*/
|
|
@@ -19,9 +19,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
import {
|
|
22
|
+
import { randomUUID } from "node:crypto";
|
|
23
|
+
import { mkdir, rename, rm, stat } from "node:fs/promises";
|
|
23
24
|
import { join } from "node:path";
|
|
24
25
|
import * as lockfile from "proper-lockfile";
|
|
26
|
+
/** Long enough that the library never runs its own takeover. */
|
|
27
|
+
const NEVER_STALE_MS = 365 * 24 * 60 * 60000;
|
|
25
28
|
/** Reject path traversal; session ids are opaque strings from the caller. */
|
|
26
29
|
function safeKey(sessionId) {
|
|
27
30
|
const sanitized = sessionId
|
|
@@ -60,12 +63,14 @@ export class TurnLeaseStore {
|
|
|
60
63
|
return this.handle(sessionId);
|
|
61
64
|
}
|
|
62
65
|
yield mkdir(this.dir, { recursive: true });
|
|
66
|
+
const path = this.path(sessionId);
|
|
67
|
+
yield this.evictStaleLock(path);
|
|
63
68
|
let release;
|
|
64
69
|
try {
|
|
65
|
-
release = yield lockfile.lock(
|
|
70
|
+
release = yield lockfile.lock(path, {
|
|
66
71
|
realpath: false,
|
|
67
72
|
retries: 0,
|
|
68
|
-
stale:
|
|
73
|
+
stale: NEVER_STALE_MS,
|
|
69
74
|
// How often the library refreshes the lock's mtime while we hold it.
|
|
70
75
|
update: 5000,
|
|
71
76
|
onCompromised: () => {
|
|
@@ -84,6 +89,54 @@ export class TurnLeaseStore {
|
|
|
84
89
|
return this.handle(sessionId);
|
|
85
90
|
});
|
|
86
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Clear an abandoned lock, leaving a claim itself a single atomic `mkdir`.
|
|
94
|
+
* Only the contender holding the takeover removes anything, and no claim can
|
|
95
|
+
* land on an occupied path meanwhile, so the rest just race that `mkdir`.
|
|
96
|
+
*/
|
|
97
|
+
evictStaleLock(path) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
// proper-lockfile's own naming for the lock it creates.
|
|
100
|
+
const lockPath = `${path}.lock`;
|
|
101
|
+
if (!(yield this.isStale(lockPath))) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const takeoverPath = `${path}.takeover`;
|
|
105
|
+
if (yield this.isStale(takeoverPath)) {
|
|
106
|
+
// Left by a process that died mid-takeover. Grabbing it by rename admits
|
|
107
|
+
// one clearer, where checking and then removing would admit several.
|
|
108
|
+
const abandoned = `${takeoverPath}.${randomUUID()}`;
|
|
109
|
+
try {
|
|
110
|
+
yield rename(takeoverPath, abandoned);
|
|
111
|
+
}
|
|
112
|
+
catch (_a) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
yield rm(abandoned, { recursive: true, force: true });
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
yield mkdir(takeoverPath);
|
|
119
|
+
}
|
|
120
|
+
catch (_b) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
// A successor may have claimed the session while this contender queued.
|
|
125
|
+
if (yield this.isStale(lockPath)) {
|
|
126
|
+
yield rm(lockPath, { recursive: true, force: true });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
finally {
|
|
130
|
+
yield rm(takeoverPath, { recursive: true, force: true });
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
isStale(lockPath) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const entry = yield stat(lockPath).catch(() => undefined);
|
|
137
|
+
return entry !== undefined && entry.mtimeMs < Date.now() - this.staleMs;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
87
140
|
handle(sessionId) {
|
|
88
141
|
let released = false;
|
|
89
142
|
return {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { AgentArchitecture } from "../types.js";
|
|
2
2
|
import { type CursorManagedV2StoreIds } from "./cursor/hosted-store-secrets.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `persistent` flag, is what tells the runtime it owns a durable state
|
|
7
|
-
* directory.
|
|
4
|
+
* Platform-managed marker for persistent hosting. Its presence tells the
|
|
5
|
+
* runtime the host provides a durable state directory.
|
|
8
6
|
*/
|
|
9
7
|
export declare const AGENT_SERVE_PERSISTENT_ENV_VAR = "AGENT_SERVE_PERSISTENT";
|
|
10
8
|
export type AgentV2Hosting = {
|
|
@@ -20,9 +18,8 @@ export type AgentV2Hosting = {
|
|
|
20
18
|
/**
|
|
21
19
|
* Close the architecture/hosting inputs into a compiler-owned union.
|
|
22
20
|
*
|
|
23
|
-
* Managed
|
|
24
|
-
*
|
|
25
|
-
* receive a resolver whose successful result always contains both ids.
|
|
21
|
+
* Managed storage resolution stays lazy. Consumers branch once on `kind`,
|
|
22
|
+
* and a successful managed resolver always returns both storage identities.
|
|
26
23
|
*/
|
|
27
24
|
export declare function resolveAgentV2Hosting(input: {
|
|
28
25
|
architecture: AgentArchitecture | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-hosting.d.ts","sourceRoot":"","sources":["../../src/internal/v2-hosting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,kCAAkC,CAAC;AAG1C
|
|
1
|
+
{"version":3,"file":"v2-hosting.d.ts","sourceRoot":"","sources":["../../src/internal/v2-hosting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,kCAAkC,CAAC;AAG1C;;;GAGG;AACH,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AAEvE,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,MAAM,uBAAuB,CAAC;CAChD,GACD;IACE,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEN;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,GAAG,cAAc,CAejB"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { requireCursorManagedV2StoreIdsSync, } from "./cursor/hosted-store-secrets.js";
|
|
2
2
|
import { AGENT_SERVE_GENERATION_ENV_VAR } from "./cursor-relay-core.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `persistent` flag, is what tells the runtime it owns a durable state
|
|
7
|
-
* directory.
|
|
4
|
+
* Platform-managed marker for persistent hosting. Its presence tells the
|
|
5
|
+
* runtime the host provides a durable state directory.
|
|
8
6
|
*/
|
|
9
7
|
export const AGENT_SERVE_PERSISTENT_ENV_VAR = "AGENT_SERVE_PERSISTENT";
|
|
10
8
|
/**
|
|
11
9
|
* Close the architecture/hosting inputs into a compiler-owned union.
|
|
12
10
|
*
|
|
13
|
-
* Managed
|
|
14
|
-
*
|
|
15
|
-
* receive a resolver whose successful result always contains both ids.
|
|
11
|
+
* Managed storage resolution stays lazy. Consumers branch once on `kind`,
|
|
12
|
+
* and a successful managed resolver always returns both storage identities.
|
|
16
13
|
*/
|
|
17
14
|
export function resolveAgentV2Hosting(input) {
|
|
18
15
|
var _a;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sync workspace trees
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Per-turn `workspaceFiles` land at `sessions/<sessionId>/workspace/<path>`
|
|
6
|
-
* (see `buildCloudSessionWorkspaceSection`). Personal-key local+cloud
|
|
7
|
-
* nests both under `agent-serve/<agent>/`.
|
|
2
|
+
* Sync authored workspace trees to cloud-turn storage. Project seeds and
|
|
3
|
+
* per-turn `workspaceFiles` use separate deployment and session scopes.
|
|
4
|
+
* User-scoped storage also namespaces both by agent.
|
|
8
5
|
*/
|
|
9
6
|
import { type FileSink } from "../files.js";
|
|
10
7
|
import type { SeedFile } from "../types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-sync.d.ts","sourceRoot":"","sources":["../../src/internal/workspace-sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"workspace-sync.d.ts","sourceRoot":"","sources":["../../src/internal/workspace-sync.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,0EAA0E;AAC1E,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,SAAkB,IAAI,0BAA0B;CACjD;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC/B,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBpB;AAED,2DAA2D;AAC3D,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sync workspace trees
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Per-turn `workspaceFiles` land at `sessions/<sessionId>/workspace/<path>`
|
|
6
|
-
* (see `buildCloudSessionWorkspaceSection`). Personal-key local+cloud
|
|
7
|
-
* nests both under `agent-serve/<agent>/`.
|
|
2
|
+
* Sync authored workspace trees to cloud-turn storage. Project seeds and
|
|
3
|
+
* per-turn `workspaceFiles` use separate deployment and session scopes.
|
|
4
|
+
* User-scoped storage also namespaces both by agent.
|
|
8
5
|
*/
|
|
9
6
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10
7
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Session workspace materialization. Each session gets its own working
|
|
3
3
|
* directory that the Cursor harness treats as the project: skills land in
|
|
4
4
|
* `.cursor/skills/<name>/SKILL.md`, agent-side tools land in
|
|
5
|
-
* `.agent-serve/tools/<name>.sh`, and `
|
|
5
|
+
* `.agent-serve/tools/<name>.sh`, and `bot/sandbox/workspace/**` seed files
|
|
6
6
|
* are mirrored in. The harness picks all of this up natively through its
|
|
7
7
|
* project setting source. Instructions are not written here: local turns
|
|
8
8
|
* deliver them as the harness system prompt ({@link buildAgentsMdContent}),
|
|
@@ -19,33 +19,27 @@ export interface MaterializeWorkspaceOptions {
|
|
|
19
19
|
seed: boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Agent state root. `<stateRoot>/memory/` (the durable cross-session
|
|
22
|
-
* directory the memory hook journals into
|
|
23
|
-
* the
|
|
24
|
-
*
|
|
25
|
-
* materialized workspace; they read the store mount directly (see
|
|
22
|
+
* directory the memory hook journals into) is created and symlinked into
|
|
23
|
+
* the workspace as `memory` so the agent reads it with plain file tools.
|
|
24
|
+
* Cloud turns read the managed storage path directly (see
|
|
26
25
|
* {@link buildCloudMemorySection}).
|
|
27
26
|
*/
|
|
28
27
|
stateRoot: string;
|
|
29
28
|
}
|
|
30
29
|
/**
|
|
31
|
-
* First-turn preamble
|
|
32
|
-
* deployments: cloud VMs read the memory journal from the store mount.
|
|
30
|
+
* First-turn preamble for cloud sessions that read managed memory.
|
|
33
31
|
*/
|
|
34
32
|
export declare function buildCloudMemorySection(agentName: string): string;
|
|
35
33
|
/**
|
|
36
34
|
* First-turn preamble section for cloud-runtime sessions with authored
|
|
37
|
-
* `
|
|
38
|
-
*
|
|
39
|
-
* `syncWorkspaceToStore`), so the model has to be told where they are.
|
|
35
|
+
* `bot/sandbox/workspace/**` seeds. The prompt names their managed storage
|
|
36
|
+
* path because cloud turns have no local materialized workspace.
|
|
40
37
|
*/
|
|
41
38
|
export declare function buildCloudWorkspaceSection(dir: string): string;
|
|
42
39
|
/**
|
|
43
|
-
* Per-turn preamble for cloud `workspaceFiles` after they
|
|
44
|
-
* session
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* Same shared Agent Store mount as authored seeds — the session path is
|
|
48
|
-
* replace-per-send / task-end wipe lifetime, not a separate mount ACL.
|
|
40
|
+
* Per-turn preamble for cloud `workspaceFiles` after they reach
|
|
41
|
+
* session-scoped storage. Omitted when the sync did not land. The session
|
|
42
|
+
* path is replaced on each send and removed when a task session ends.
|
|
49
43
|
*/
|
|
50
44
|
export declare function buildCloudSessionWorkspaceSection(dir: string, relPaths: readonly string[]): string;
|
|
51
45
|
/** Relative path of an agent-side tool script inside the session workspace. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/internal/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMlF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/internal/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMlF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAOjE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,MAAM,CAOR;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,MAAM,GAAG,SAAS,CAapB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,cAAc,EAAE,EACvB,OAAO,GAAE;IAAE,cAAc,EAAE,OAAO,CAAA;CAA8B,GAC/D,MAAM,CA8CR;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,cAAc,EAAE,EACvB,OAAO,EAAE;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GACjC,MAAM,CA6BR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,GAChE,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAcrE;AAED,6DAA6D;AAC7D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUpE;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9F;AAyFD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAO3D;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACtF,OAAO,CAAC,IAAI,CAAC,CAYf"}
|