@cursor/bdk 0.2.5 → 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 +55 -54
- package/dist/channels/github/github-channel.d.ts +4 -4
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +39 -13
- 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/eval-directive.js +1 -1
- 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.94Iu5dyD.js → app.oyjtOr3W.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.C25zYVuc.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DTKFDlBr.js → VPLocalSearchBox.D0P6J_UJ.js} +1 -1
- package/dist/docs/assets/chunks/{arc.DuzwHEeg.js → arc.B0LY1J1h.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C6lyhLs0.js → architectureDiagram-Q4EWVU46.dPduLUxY.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.DUNEWlY8.js → baseUniq.B_Ohm21h.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CXOQGI0O.js → blockDiagram-DXYQGD6D.B4zcanaJ.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BYdPE-Oe.js → c4Diagram-AHTNJAMY.D9Iw21nx.js} +1 -1
- package/dist/docs/assets/chunks/channel.CRUyWDV-.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.YIV9HeX0.js → chunk-4BX2VUAB.DDVwRShI.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BG80DEOc.js → chunk-4TB4RGXK.DsYcdn1i.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BDKJSZQc.js → chunk-55IACEB6.BzzQvcYp.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CtYnQqts.js → chunk-EDXVE4YY.BMiXZ7FX.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CityOth-.js → chunk-FMBD7UC4.D_mBcLoc.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CMD22CQX.js → chunk-OYMX7WX6.CMVjWVMx.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.WWpc3ND0.js → chunk-QZHKN3VN.BG-FrPv9.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BMg-yhj3.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.Buu_LC5q.js → cose-bilkent-S5V4N54A.BVNnCTvY.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.DW7onj6E.js → dagre-KV5264BT.CDN5PR9l.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.B3NxIbEV.js → diagram-5BDNPKRD.DQRUlT-i.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BJvN6Vkv.js → diagram-G4DWMVQ6.CoeblYQT.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.wfRWrexs.js → diagram-MMDJMWI5.DW3ymjl0.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.7QtjSYio.js → diagram-TYMM5635.BP0uN4Jw.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.jxPgDH1t.js → erDiagram-SMLLAGMA.DVFUWEn4.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BhDWA-TO.js → flowDiagram-DWJPFMVM.HU-eHspv.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.Ijq8iYKv.js → ganttDiagram-T4ZO3ILL.DHNhXijY.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DXpfW4YG.js → gitGraphDiagram-UUTBAWPF.DkISXcO3.js} +1 -1
- package/dist/docs/assets/chunks/{graph.CoPlssRl.js → graph.CCV0fuRR.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.eJuv_EOz.js → infoDiagram-42DDH7IO.bgILzOoc.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A._OEzenCR.js → ishikawaDiagram-UXIWVN3A.CuryXC0F.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CwlTjirB.js → journeyDiagram-VCZTEJTY.BL1Pr-wu.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DSp_C8cZ.js → kanban-definition-6JOO6SKY.BbGjvk4l.js} +1 -1
- package/dist/docs/assets/chunks/{layout.Bms9s7uB.js → layout.C4PfdldS.js} +1 -1
- package/dist/docs/assets/chunks/{linear.BjnmB4je.js → linear.C3xD1T6X.js} +1 -1
- package/dist/docs/assets/chunks/{min.CKkYlMsn.js → min.CzgRAQ9c.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.T2d0vJ7X.js → mindmap-definition-QFDTVHPH.CA9rSWum.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.DU0RoCvx.js → pieDiagram-DEJITSTG.B8MprgJu.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.9QZjM-x0.js → quadrantDiagram-34T5L4WZ.DndDwbKT.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CZpylJMd.js → requirementDiagram-MS252O5E.Zhfgwlnn.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CnFdfW95.js → sankeyDiagram-XADWPNL6.B6RRm6N5.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.-jC0PP1t.js → sequenceDiagram-FGHM5R23.Bfmz-1PN.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DG7yBRUU.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.B3O9koXV.js → theme.gpWjytMh.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bf9u4Ebb.js → timeline-definition-GMOUNBTQ.Bl1l7M1f.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.BjhbbYE6.js → vennDiagram-DHZGUBPP.Dfle4U0d.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.BJrCW6xc.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.8fRb4Nb5.js → wardleyDiagram-NUSXRM2D.CM_4lmvZ.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DoOP3zZM.js → xychartDiagram-5P7HB3ND.CHT5X28R.js} +1 -1
- package/dist/docs/assets/{evals.md.LRCSn6Ik.js → evals.md.C851kViu.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/{templates_agentic-owners.md.vtjfwxbf.js → templates_agentic-owners.md.CvmABtia.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.vtjfwxbf.lean.js → templates_agentic-owners.md.CvmABtia.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.CX9l9bcg.js → templates_security-reviewer.md.Gh6EF9Us.js} +3 -2
- package/dist/docs/assets/{templates_security-reviewer.md.CX9l9bcg.lean.js → templates_security-reviewer.md.Gh6EF9Us.lean.js} +1 -1
- package/dist/docs/assets/{templates_thermo-quality-review.md.95qmTmr1.js → templates_thermo-quality-review.md.B77UyTrX.js} +1 -1
- package/dist/docs/assets/{templates_thermo-review.md.DQh6Q0C-.js → templates_thermo-review.md.DRJ7mC5U.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.BFlQhWXf.js → templates_triage.md.CNN6b0JZ.js} +3 -3
- package/dist/docs/assets/{templates_triage.md.BFlQhWXf.lean.js → templates_triage.md.CNN6b0JZ.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +35 -35
- package/dist/docs/evals.html +37 -37
- package/dist/docs/evals.md +2 -2
- package/dist/docs/guides/agent-to-agent.html +35 -35
- package/dist/docs/guides/bitbucket.html +35 -35
- package/dist/docs/guides/cloud-agents.html +35 -35
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +35 -35
- package/dist/docs/guides/hooks.html +35 -35
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +35 -35
- package/dist/docs/guides/mcp-oauth.html +35 -35
- package/dist/docs/guides/opentelemetry.html +35 -35
- package/dist/docs/guides/slack.html +35 -35
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +35 -35
- package/dist/docs/llms-full.txt +41 -24
- 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 +37 -37
- package/dist/docs/templates/agentic-owners.md +2 -0
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +38 -37
- package/dist/docs/templates/security-reviewer.md +7 -8
- package/dist/docs/templates/thermo-quality-review.html +37 -37
- package/dist/docs/templates/thermo-quality-review.md +2 -2
- package/dist/docs/templates/thermo-review.html +37 -37
- package/dist/docs/templates/thermo-review.md +2 -2
- package/dist/docs/templates/triage.html +38 -38
- package/dist/docs/templates/triage.md +6 -1
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/evals.d.ts +2 -2
- package/dist/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 +92 -153
- 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/eval-runner.js +7 -4
- 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/init-interview.d.ts +0 -1
- package/dist/internal/init-interview.d.ts.map +1 -1
- package/dist/internal/init-interview.js +15 -24
- package/dist/internal/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/platform-timers.d.ts +8 -1
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +10 -2
- package/dist/internal/playground/toolchain.js +6 -6
- package/dist/internal/process-memory-telemetry.js +2 -2
- package/dist/internal/reminder-control-plane-protocol.d.ts +8 -1
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-runner.d.ts +13 -3
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +78 -53
- package/dist/internal/resolve-prod-target.d.ts +1 -9
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +1 -30
- package/dist/internal/resolved-connections.js +8 -8
- package/dist/internal/run-client.d.ts +11 -1
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +197 -59
- 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 +8 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +58 -45
- 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-links.d.ts.map +1 -1
- package/dist/internal/session-links.js +8 -7
- 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 +1 -0
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +8 -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/evals.md +2 -2
- package/docs/reference/cli.md +20 -9
- package/docs/templates/agentic-owners.md +2 -0
- package/docs/templates/security-reviewer.md +7 -8
- package/docs/templates/thermo-quality-review.md +2 -2
- package/docs/templates/thermo-review.md +2 -2
- package/docs/templates/triage.md +6 -1
- package/package.json +1 -1
- package/templates/agents-md/evals/agents.eval.ts +1 -0
- package/templates/code-wiki/bot/instructions.md +4 -4
- package/templates/pr-autofixer/bot/instructions.md +3 -3
- package/templates/security-reviewer/README.md +5 -3
- package/templates/security-reviewer/bot/tools/post_findings.ts +8 -8
- package/templates/thermo-quality-review/bot/tools/post_findings.ts +8 -8
- package/templates/thermo-review/bot/tools/post_findings.ts +8 -8
- package/dist/docs/assets/chunks/@localSearchIndexroot.BITLoOQa.js +0 -1
- package/dist/docs/assets/chunks/channel.B46uXH41.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.0cmCFsSf.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.0cmCFsSf.js +0 -1
- package/dist/docs/assets/chunks/clone.1vTOFZT1.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CbsZcOOu.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.DEA21akR.js +0 -162
- package/dist/docs/assets/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/{evals.md.LRCSn6Ik.lean.js → evals.md.C851kViu.lean.js} +0 -0
- /package/dist/docs/assets/{templates_thermo-quality-review.md.95qmTmr1.lean.js → templates_thermo-quality-review.md.B77UyTrX.lean.js} +0 -0
- /package/dist/docs/assets/{templates_thermo-review.md.DQh6Q0C-.lean.js → templates_thermo-review.md.DRJ7mC5U.lean.js} +0 -0
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* `hosted-execution-flush.ts`.
|
|
2
|
+
* Local diagnostic record for one hosted execution. Flushed with durable
|
|
3
|
+
* execution history and process output.
|
|
5
4
|
*/
|
|
6
5
|
import { type HostedFailureClassification } from "./hosted-delivery-protocol.js";
|
|
7
6
|
export declare const HOSTED_EXECUTION_DIAG_VERSION = 1;
|
|
8
7
|
/** Cap so a runaway message cannot fill the guest disk or the host log. */
|
|
9
8
|
export declare const HOSTED_EXECUTION_DIAG_MAX_BYTES = 4096;
|
|
10
9
|
/**
|
|
11
|
-
* Correlate the
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* delivery's terminal record whenever July never reaches its own write —
|
|
15
|
-
* the 9-minute host POST timeout, a 409 on an expired admission token, or a
|
|
16
|
-
* replayed token that short-circuits on the memoized reply.
|
|
10
|
+
* Correlate the fixed-path record with the execution that produced it. An
|
|
11
|
+
* interrupted attempt can otherwise leave the previous execution's terminal
|
|
12
|
+
* record behind.
|
|
17
13
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* reaches the guest disk or the host logs.
|
|
14
|
+
* Derive the id from the admission token. The one-way digest prevents the
|
|
15
|
+
* token itself from reaching disk or logs.
|
|
21
16
|
*/
|
|
22
17
|
export declare function hostedExecutionDiagId(admissionToken: string): string;
|
|
23
18
|
export type HostedExecutionDiagAbortReason = "signal_abort" | "runner_cancelled" | "runner_error" | "execute_throw";
|
|
24
19
|
/**
|
|
25
|
-
* Bounded
|
|
26
|
-
*
|
|
27
|
-
* activity span for Datadog. `errorCode` and `message` are logged ungated;
|
|
28
|
-
* `stack` stays behind the internal-diag gate.
|
|
20
|
+
* Bounded record of one hosted execution. It omits prompts, tool content, and
|
|
21
|
+
* credentials. Stack details remain behind the diagnostic gate.
|
|
29
22
|
*/
|
|
30
23
|
export type HostedExecutionDiag = {
|
|
31
24
|
v: typeof HOSTED_EXECUTION_DIAG_VERSION;
|
|
@@ -50,19 +43,15 @@ export type HostedExecutionDiag = {
|
|
|
50
43
|
};
|
|
51
44
|
/** Written before the turn starts so a stalled execution still has a record. */
|
|
52
45
|
export declare const HOSTED_EXECUTION_DIAG_RUNNING_STATUS = "running";
|
|
53
|
-
/**
|
|
46
|
+
/** Bounds for a short error stack summary. */
|
|
54
47
|
export declare const HOSTED_ERROR_STACK_LINE_COUNT = 5;
|
|
55
48
|
export declare const HOSTED_ERROR_SNIPPET_MAX_CHARS = 700;
|
|
56
49
|
/**
|
|
57
|
-
* Bounded throw text for
|
|
58
|
-
*
|
|
59
|
-
* uses {@link hostedErrorMessageOnly} so customer Datadog stays frame-free.
|
|
50
|
+
* Bounded throw text for diagnostics and non-hosted 500 bodies. Prefers
|
|
51
|
+
* `Error.stack` with its message and first frames.
|
|
60
52
|
*/
|
|
61
53
|
export declare function hostedErrorStackSnippet(error: unknown): string;
|
|
62
|
-
/**
|
|
63
|
-
* Guest throw text without `at` frames. Hosted 500 `message` is ungated on
|
|
64
|
-
* TAS (`hostedGuestMessage` / `last_error`); stack frames stay on `stack`.
|
|
65
|
-
*/
|
|
54
|
+
/** Hosted response text without stack frames. */
|
|
66
55
|
export declare function hostedErrorMessageOnly(error: unknown): string;
|
|
67
56
|
export declare function hostedExecutionDiagPath(stateRoot: string): string;
|
|
68
57
|
export declare function abortReasonFromTurnStatus(status: string, cancellationReason: "signal" | "runner" | undefined): HostedExecutionDiagAbortReason | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-execution-diag.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-execution-diag.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hosted-execution-diag.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-execution-diag.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAEL,KAAK,2BAA2B,EAEjC,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,2EAA2E;AAC3E,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,MAAM,MAAM,8BAA8B,GACtC,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,EAAE,OAAO,6BAA6B,CAAC;IACxC,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,8BAA8B,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,oCAAoC,YAAY,CAAC;AAmC9D,8CAA8C;AAC9C,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAyB9D;AAED,iDAAiD;AACjD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAgB7D;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAClD,8BAA8B,GAAG,SAAS,CAQ5C;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAiFrF;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* `hosted-execution-flush.ts`.
|
|
2
|
+
* Local diagnostic record for one hosted execution. Flushed with durable
|
|
3
|
+
* execution history and process output.
|
|
5
4
|
*/
|
|
6
5
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7
6
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -20,16 +19,12 @@ export const HOSTED_EXECUTION_DIAG_VERSION = 1;
|
|
|
20
19
|
/** Cap so a runaway message cannot fill the guest disk or the host log. */
|
|
21
20
|
export const HOSTED_EXECUTION_DIAG_MAX_BYTES = 4096;
|
|
22
21
|
/**
|
|
23
|
-
* Correlate the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* delivery's terminal record whenever July never reaches its own write —
|
|
27
|
-
* the 9-minute host POST timeout, a 409 on an expired admission token, or a
|
|
28
|
-
* replayed token that short-circuits on the memoized reply.
|
|
22
|
+
* Correlate the fixed-path record with the execution that produced it. An
|
|
23
|
+
* interrupted attempt can otherwise leave the previous execution's terminal
|
|
24
|
+
* record behind.
|
|
29
25
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* reaches the guest disk or the host logs.
|
|
26
|
+
* Derive the id from the admission token. The one-way digest prevents the
|
|
27
|
+
* token itself from reaching disk or logs.
|
|
33
28
|
*/
|
|
34
29
|
export function hostedExecutionDiagId(admissionToken) {
|
|
35
30
|
return createHash("sha256").update(admissionToken).digest("hex").slice(0, 16);
|
|
@@ -66,13 +61,12 @@ function boundedOptionalString(value, max) {
|
|
|
66
61
|
: value
|
|
67
62
|
: undefined;
|
|
68
63
|
}
|
|
69
|
-
/**
|
|
64
|
+
/** Bounds for a short error stack summary. */
|
|
70
65
|
export const HOSTED_ERROR_STACK_LINE_COUNT = 5;
|
|
71
66
|
export const HOSTED_ERROR_SNIPPET_MAX_CHARS = 700;
|
|
72
67
|
/**
|
|
73
|
-
* Bounded throw text for
|
|
74
|
-
*
|
|
75
|
-
* uses {@link hostedErrorMessageOnly} so customer Datadog stays frame-free.
|
|
68
|
+
* Bounded throw text for diagnostics and non-hosted 500 bodies. Prefers
|
|
69
|
+
* `Error.stack` with its message and first frames.
|
|
76
70
|
*/
|
|
77
71
|
export function hostedErrorStackSnippet(error) {
|
|
78
72
|
var _a;
|
|
@@ -101,10 +95,7 @@ export function hostedErrorStackSnippet(error) {
|
|
|
101
95
|
? `${text.slice(0, HOSTED_ERROR_SNIPPET_MAX_CHARS)}…`
|
|
102
96
|
: text;
|
|
103
97
|
}
|
|
104
|
-
/**
|
|
105
|
-
* Guest throw text without `at` frames. Hosted 500 `message` is ungated on
|
|
106
|
-
* TAS (`hostedGuestMessage` / `last_error`); stack frames stay on `stack`.
|
|
107
|
-
*/
|
|
98
|
+
/** Hosted response text without stack frames. */
|
|
108
99
|
export function hostedErrorMessageOnly(error) {
|
|
109
100
|
const text = error instanceof Error && error.message.trim().length > 0
|
|
110
101
|
? error.message.trim()
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Flush local diagnostics, durable execution history, and process output at
|
|
3
|
+
* the same boundaries.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* so TAS does not treat a previous delivery's terminal record as this one.
|
|
5
|
+
* The lifecycle is running, terminal, then process death when applicable.
|
|
6
|
+
* Process death updates durable state and output while the local diagnostic
|
|
7
|
+
* stays running, preventing a stale terminal record from being reused.
|
|
8
|
+
* Between running and terminal, {@link refreshStartLogWhile} refreshes only
|
|
9
|
+
* process output.
|
|
10
10
|
*/
|
|
11
11
|
import type { HostedFailureClassification } from "./hosted-delivery-protocol.js";
|
|
12
12
|
import { type HostedExecutionDiagAbortReason } from "./hosted-execution-diag.js";
|
|
13
13
|
import type { LogRingEntry } from "./log-ring.js";
|
|
14
14
|
import { type SessionRunAbortReason, type SessionRunExecutionWrite } from "./session-run-log.js";
|
|
15
15
|
export type HostedExecutionFlushSinks = {
|
|
16
|
-
/**
|
|
16
|
+
/** Local diagnostic state directory. Omit to skip the local record. */
|
|
17
17
|
stateRoot?: string;
|
|
18
18
|
persistSessionRun?(write: SessionRunExecutionWrite): Promise<void>;
|
|
19
19
|
flushStartLog?(startLogId: string): Promise<void>;
|
|
@@ -33,10 +33,22 @@ export type HostedExecutionFlushFields = {
|
|
|
33
33
|
error?: unknown;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* Write
|
|
37
|
-
*
|
|
36
|
+
* Write local diagnostics and durable output together. Soft-fail per sink so
|
|
37
|
+
* a storage outage does not change the hosted response.
|
|
38
38
|
*/
|
|
39
39
|
export declare function flushHostedExecutionRecord(sinks: HostedExecutionFlushSinks, fields: HostedExecutionFlushFields): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Each refresh is a store write on the deployment's shared write budget, so
|
|
42
|
+
* keep it coarse. An unchanged tee costs nothing (the store skips the put).
|
|
43
|
+
*/
|
|
44
|
+
export declare const HOSTED_START_LOG_REFRESH_INTERVAL_MS = 30000;
|
|
45
|
+
/**
|
|
46
|
+
* Refresh the tee while `run` (the turn) settles: v2 has no engine to tail,
|
|
47
|
+
* so this snapshot is the only view of a running turn. A tick is skipped
|
|
48
|
+
* while a refresh is still in flight, and the last one settles before this
|
|
49
|
+
* returns so it cannot land after the terminal flush.
|
|
50
|
+
*/
|
|
51
|
+
export declare function refreshStartLogWhile<T>(sinks: HostedExecutionFlushSinks, startLogId: string, run: () => Promise<T>): Promise<T>;
|
|
40
52
|
/**
|
|
41
53
|
* Durable-only crash flush. Leaves `hosted-execution.json` at `running`.
|
|
42
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-execution-flush.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-execution-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAG9B,MAAM,sBAAsB,CAAC;AAU9B,MAAM,MAAM,yBAAyB,GAAG;IACtC,
|
|
1
|
+
{"version":3,"file":"hosted-execution-flush.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-execution-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EA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C,CAAC,IAAI,EAAE;IAC3D,iBAAiB,EAAE,CACjB,MAAM,EAAE,OAAO,CACb,qBAAqB,EACrB,cAAc,GAAG,oBAAoB,GAAG,qBAAqB,CAC9D,EACD,KAAK,CAAC,EAAE,OAAO,KACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CACb,qBAAqB,EACrB,cAAc,GAAG,oBAAoB,GAAG,qBAAqB,CAC9D,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Flush local diagnostics, durable execution history, and process output at
|
|
3
|
+
* the same boundaries.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* so TAS does not treat a previous delivery's terminal record as this one.
|
|
5
|
+
* The lifecycle is running, terminal, then process death when applicable.
|
|
6
|
+
* Process death updates durable state and output while the local diagnostic
|
|
7
|
+
* stays running, preventing a stale terminal record from being reused.
|
|
8
|
+
* Between running and terminal, {@link refreshStartLogWhile} refreshes only
|
|
9
|
+
* process output.
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -26,8 +26,8 @@ function boundedMessage(text) {
|
|
|
26
26
|
: text;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Write
|
|
30
|
-
*
|
|
29
|
+
* Write local diagnostics and durable output together. Soft-fail per sink so
|
|
30
|
+
* a storage outage does not change the hosted response.
|
|
31
31
|
*/
|
|
32
32
|
export function flushHostedExecutionRecord(sinks, fields) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,6 +58,42 @@ export function flushHostedExecutionRecord(sinks, fields) {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Each refresh is a store write on the deployment's shared write budget, so
|
|
63
|
+
* keep it coarse. An unchanged tee costs nothing (the store skips the put).
|
|
64
|
+
*/
|
|
65
|
+
export const HOSTED_START_LOG_REFRESH_INTERVAL_MS = 30000;
|
|
66
|
+
/**
|
|
67
|
+
* Refresh the tee while `run` (the turn) settles: v2 has no engine to tail,
|
|
68
|
+
* so this snapshot is the only view of a running turn. A tick is skipped
|
|
69
|
+
* while a refresh is still in flight, and the last one settles before this
|
|
70
|
+
* returns so it cannot land after the terminal flush.
|
|
71
|
+
*/
|
|
72
|
+
export function refreshStartLogWhile(sinks, startLogId, run) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const flush = sinks.flushStartLog;
|
|
75
|
+
if (flush === undefined) {
|
|
76
|
+
return yield run();
|
|
77
|
+
}
|
|
78
|
+
let refresh;
|
|
79
|
+
const timer = setInterval(() => {
|
|
80
|
+
// Soft-fail like the other flushes. A rejection left unhandled here would
|
|
81
|
+
// trip the process-death flush.
|
|
82
|
+
refresh !== null && refresh !== void 0 ? refresh : (refresh = flush(startLogId)
|
|
83
|
+
.catch(() => undefined)
|
|
84
|
+
.finally(() => {
|
|
85
|
+
refresh = undefined;
|
|
86
|
+
}));
|
|
87
|
+
}, HOSTED_START_LOG_REFRESH_INTERVAL_MS);
|
|
88
|
+
try {
|
|
89
|
+
return yield run();
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
clearInterval(timer);
|
|
93
|
+
yield refresh;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
61
97
|
/**
|
|
62
98
|
* Durable-only crash flush. Leaves `hosted-execution.json` at `running`.
|
|
63
99
|
*/
|
|
@@ -37,7 +37,7 @@ const MANAGED_AUTOMATION_TTL_MS = 60 * 60000;
|
|
|
37
37
|
const MANAGED_AUTOMATION_MAX_ENTRIES = 10000;
|
|
38
38
|
export function recordHostedManagedAutomation(delivery) {
|
|
39
39
|
if (delivery.managedAutomation === undefined) {
|
|
40
|
-
console.info(`[
|
|
40
|
+
console.info(`[bdk] hosted managedAutomation not recorded deliveryId=${delivery.deliveryId}: admission envelope carried no managedAutomation slice (non-managed delivery, or the control plane resolved no MCP servers and no Slack channels)`);
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
const managedAutomationByDelivery = managedAutomationTable();
|
|
@@ -48,7 +48,7 @@ export function recordHostedManagedAutomation(delivery) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
if (managedAutomationByDelivery.size >= MANAGED_AUTOMATION_MAX_ENTRIES) {
|
|
51
|
-
console.info(`[
|
|
51
|
+
console.info(`[bdk] hosted managedAutomation table full (${String(managedAutomationByDelivery.size)} entries); clearing before recording deliveryId=${delivery.deliveryId}`);
|
|
52
52
|
managedAutomationByDelivery.clear();
|
|
53
53
|
}
|
|
54
54
|
managedAutomationByDelivery.set(delivery.deliveryId, {
|
|
@@ -56,7 +56,7 @@ export function recordHostedManagedAutomation(delivery) {
|
|
|
56
56
|
expiresAt: now + MANAGED_AUTOMATION_TTL_MS,
|
|
57
57
|
});
|
|
58
58
|
const slackChannels = delivery.managedAutomation.slackChannels;
|
|
59
|
-
console.info(`[
|
|
59
|
+
console.info(`[bdk] hosted managedAutomation recorded deliveryId=${delivery.deliveryId} automationUuid=${delivery.managedAutomation.automationUuid} mcpServerNames=${String(delivery.managedAutomation.mcpServerNames.length)} slackChannels=${slackChannels === undefined ? "<absent>" : JSON.stringify(slackChannels)} ttlMs=${String(MANAGED_AUTOMATION_TTL_MS)} tableSize=${String(managedAutomationByDelivery.size)}`);
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* The managed automation the control plane attributed to a hosted delivery,
|
|
@@ -67,11 +67,11 @@ export function getHostedManagedAutomation(deliveryId) {
|
|
|
67
67
|
const managedAutomationByDelivery = managedAutomationTable();
|
|
68
68
|
const entry = managedAutomationByDelivery.get(deliveryId);
|
|
69
69
|
if (entry === undefined) {
|
|
70
|
-
console.info(`[
|
|
70
|
+
console.info(`[bdk] hosted managedAutomation lookup miss deliveryId=${deliveryId}: no entry (never recorded in this process, or evicted) tableSize=${String(managedAutomationByDelivery.size)} knownDeliveryIds=${JSON.stringify([...managedAutomationByDelivery.keys()].slice(0, 10))}`);
|
|
71
71
|
return undefined;
|
|
72
72
|
}
|
|
73
73
|
if (entry.expiresAt <= Date.now()) {
|
|
74
|
-
console.info(`[
|
|
74
|
+
console.info(`[bdk] hosted managedAutomation lookup expired deliveryId=${deliveryId} automationUuid=${entry.managedAutomation.automationUuid} expiredMsAgo=${String(Date.now() - entry.expiresAt)}`);
|
|
75
75
|
managedAutomationByDelivery.delete(deliveryId);
|
|
76
76
|
return undefined;
|
|
77
77
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Client-side
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* secrets CLI verbs (actionable errors before any network call). The
|
|
6
|
-
* backend stays authoritative — these exist so mistakes fail fast and
|
|
7
|
-
* locally with the same grammar the server enforces.
|
|
2
|
+
* Client-side validation for hosting configuration and secret commands.
|
|
3
|
+
* These checks catch stable syntax and reserved-name errors before a network
|
|
4
|
+
* request. The server remains authoritative.
|
|
8
5
|
*/
|
|
9
6
|
/** `hosting.egressDomains` cap (the manifest schema and deploy body agree). */
|
|
10
7
|
export declare const MAX_EGRESS_DOMAINS = 64;
|
|
@@ -23,10 +20,8 @@ export declare const MAX_CONTAINER_IMAGE_BYTES: number;
|
|
|
23
20
|
/** Returns a human error message, or undefined when the image name is valid. */
|
|
24
21
|
export declare function validateContainerImageName(name: string): string | undefined;
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* sync without importing the storage backend into the CLI graph.
|
|
29
|
-
* Hosted storage is HTTP-proxied; engines never see a database URL.
|
|
23
|
+
* Additional environment names managed by Cursor. Do not include these in
|
|
24
|
+
* `hosting.secretNames` or pass them to secret commands.
|
|
30
25
|
*/
|
|
31
26
|
export declare const PLATFORM_HOSTED_STORAGE_SECRET_NAMES: readonly ["AGENT_SERVE_DEPLOYMENT_ID"];
|
|
32
27
|
/** Returns a human error message, or undefined when the domain is valid. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosting.d.ts","sourceRoot":"","sources":["../../src/internal/hosting.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hosting.d.ts","sourceRoot":"","sources":["../../src/internal/hosting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,kCAAkC;AAClC,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,8BAA8B;AAC9B,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,sDAAsD;AACtD,eAAO,MAAM,yBAAyB,EAAE,MAA+B,CAAC;AAIxE,gFAAgF;AAChF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK3E;AAED;;;GAGG;AACH,eAAO,MAAM,oCAAoC,YAAI,2BAA2B,CAAU,CAAC;AAW3F,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASvE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQnE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQ1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE;IAC3C,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC,GAAG,MAAM,EAAE,CAmBX;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS3E;AAID,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D"}
|
package/dist/internal/hosting.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Client-side
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* secrets CLI verbs (actionable errors before any network call). The
|
|
6
|
-
* backend stays authoritative — these exist so mistakes fail fast and
|
|
7
|
-
* locally with the same grammar the server enforces.
|
|
2
|
+
* Client-side validation for hosting configuration and secret commands.
|
|
3
|
+
* These checks catch stable syntax and reserved-name errors before a network
|
|
4
|
+
* request. The server remains authoritative.
|
|
8
5
|
*/
|
|
9
6
|
/** `hosting.egressDomains` cap (the manifest schema and deploy body agree). */
|
|
10
7
|
export const MAX_EGRESS_DOMAINS = 64;
|
|
@@ -29,10 +26,8 @@ export function validateContainerImageName(name) {
|
|
|
29
26
|
return `Invalid image name "${name}": use 2–64 lowercase letters, digits, ".", "_" or "-", starting and ending with a letter or digit.`;
|
|
30
27
|
}
|
|
31
28
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* sync without importing the storage backend into the CLI graph.
|
|
35
|
-
* Hosted storage is HTTP-proxied; engines never see a database URL.
|
|
29
|
+
* Additional environment names managed by Cursor. Do not include these in
|
|
30
|
+
* `hosting.secretNames` or pass them to secret commands.
|
|
36
31
|
*/
|
|
37
32
|
export const PLATFORM_HOSTED_STORAGE_SECRET_NAMES = ["AGENT_SERVE_DEPLOYMENT_ID"];
|
|
38
33
|
const SECRET_NAME_PATTERN = /^[A-Z][A-Z0-9_]*$/;
|
|
@@ -50,7 +50,6 @@ export declare function runTemplateInit(input: {
|
|
|
50
50
|
vars?: readonly string[];
|
|
51
51
|
interactive: boolean;
|
|
52
52
|
}): Promise<RunTemplateInitResult>;
|
|
53
|
-
export declare function parseTemplateAnswers(spec: TemplateInitSpec, raw: Record<string, string>): ParseAnswersResult;
|
|
54
53
|
export interface CollectAnswersInput {
|
|
55
54
|
spec: TemplateInitSpec;
|
|
56
55
|
vars?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-interview.d.ts","sourceRoot":"","sources":["../../src/internal/init-interview.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;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C,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CAC3B,GACL,OAAO,CAAC,MAAM,CAAC,CAejB"}
|
|
@@ -94,40 +94,31 @@ export function runTemplateInit(input) {
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
export function parseTemplateAnswers(spec, raw) {
|
|
98
|
-
var _a;
|
|
99
|
-
const answers = {};
|
|
100
|
-
for (const question of spec.questions) {
|
|
101
|
-
if (!(question.id in raw)) {
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
const parsed = parseQuestionValue(question, (_a = raw[question.id]) !== null && _a !== void 0 ? _a : "");
|
|
105
|
-
if (!parsed.ok) {
|
|
106
|
-
return parsed;
|
|
107
|
-
}
|
|
108
|
-
answers[question.id] = parsed.value;
|
|
109
|
-
}
|
|
110
|
-
return { ok: true, answers };
|
|
111
|
-
}
|
|
112
97
|
export function collectTemplateAnswers(input) {
|
|
113
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
var _a
|
|
115
|
-
|
|
99
|
+
var _a;
|
|
100
|
+
var _b, _c, _d;
|
|
101
|
+
const vars = (_b = input.vars) !== null && _b !== void 0 ? _b : {};
|
|
116
102
|
const answers = {};
|
|
117
|
-
const ask = (
|
|
118
|
-
const out = (
|
|
103
|
+
const ask = (_c = input.ask) !== null && _c !== void 0 ? _c : promptTemplateQuestion;
|
|
104
|
+
const out = (_d = input.out) !== null && _d !== void 0 ? _d : (text => process.stdout.write(text));
|
|
119
105
|
for (const question of input.spec.questions) {
|
|
120
|
-
if (question.id in vars) {
|
|
121
|
-
const
|
|
106
|
+
if (question.id in vars || !input.interactive) {
|
|
107
|
+
const raw = ((_a = vars[question.id]) === null || _a === void 0 ? void 0 : _a.trim()) || question.default;
|
|
108
|
+
if (raw === undefined) {
|
|
109
|
+
// Skipping would scaffold the template's sample answer (e.g. owner/repo).
|
|
110
|
+
return {
|
|
111
|
+
ok: false,
|
|
112
|
+
error: `${question.id} is required: pass --var ${question.id}=... (${question.prompt})`,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
const parsed = parseQuestionValue(question, raw);
|
|
122
116
|
if (!parsed.ok) {
|
|
123
117
|
return parsed;
|
|
124
118
|
}
|
|
125
119
|
answers[question.id] = parsed.value;
|
|
126
120
|
continue;
|
|
127
121
|
}
|
|
128
|
-
if (!input.interactive) {
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
122
|
for (;;) {
|
|
132
123
|
const line = yield ask(question);
|
|
133
124
|
const value = line.trim() === "" && question.default !== undefined ? question.default : line;
|
|
@@ -59,7 +59,7 @@ export function listenHttpServer(args) {
|
|
|
59
59
|
server.listen(port, host);
|
|
60
60
|
yield once(server, "listening");
|
|
61
61
|
if (port !== startPort) {
|
|
62
|
-
logger(`[
|
|
62
|
+
logger(`[bdk] port ${startPort} in use; listening on ${port} instead (pass --port to pick)`);
|
|
63
63
|
}
|
|
64
64
|
return port;
|
|
65
65
|
}
|
|
@@ -83,7 +83,7 @@ export function createLocalControlPlane(opts) {
|
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
85
|
void opts.fireSchedule(name).catch(error => {
|
|
86
|
-
logger(`[
|
|
86
|
+
logger(`[bdk] schedule "${name}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -106,7 +106,7 @@ export function createLocalControlPlane(opts) {
|
|
|
106
106
|
const timer = setTimeout(() => {
|
|
107
107
|
reminderTimers.delete(record.id);
|
|
108
108
|
void onReminderDue(record.id).catch(error => {
|
|
109
|
-
logger(`[
|
|
109
|
+
logger(`[bdk] reminder "${record.id}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
110
110
|
});
|
|
111
111
|
}, delay);
|
|
112
112
|
(_a = timer.unref) === null || _a === void 0 ? void 0 : _a.call(timer);
|
|
@@ -174,7 +174,7 @@ export function createLocalControlPlane(opts) {
|
|
|
174
174
|
outcome = yield opts.executeReminder(descriptor);
|
|
175
175
|
}
|
|
176
176
|
catch (error) {
|
|
177
|
-
logger(`[
|
|
177
|
+
logger(`[bdk] reminder "${id}" guest execution failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
178
178
|
outcome = {
|
|
179
179
|
kind: "retry",
|
|
180
180
|
delayMs: 1000,
|
|
@@ -183,7 +183,7 @@ export function createLocalControlPlane(opts) {
|
|
|
183
183
|
}
|
|
184
184
|
const result = yield applyReminderOutcome(claimFromDescriptor(descriptor), outcome);
|
|
185
185
|
if (!result.applied) {
|
|
186
|
-
logger(`[
|
|
186
|
+
logger(`[bdk] reminder "${id}" outcome not applied: ${result.reason}`);
|
|
187
187
|
}
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
@@ -200,7 +200,7 @@ export function createLocalControlPlane(opts) {
|
|
|
200
200
|
yield opts.fireReminder(current.id, current.fireCount);
|
|
201
201
|
}
|
|
202
202
|
catch (error) {
|
|
203
|
-
logger(`[
|
|
203
|
+
logger(`[bdk] reminder "${id}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
}
|
|
@@ -210,7 +210,7 @@ export function createLocalControlPlane(opts) {
|
|
|
210
210
|
attachScmEvents(relay) {
|
|
211
211
|
scmRelay = relay;
|
|
212
212
|
relay.start();
|
|
213
|
-
logger("[
|
|
213
|
+
logger("[bdk] cursor-events: control-plane ingest started");
|
|
214
214
|
},
|
|
215
215
|
upsertSchedule(input) {
|
|
216
216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Customer-facing output never includes hosting URLs, tokens, or infra jargon.
|
|
5
5
|
*/
|
|
6
|
-
import { type DeploymentDetail, type DeploymentProgress } from "./deploy-client.js";
|
|
6
|
+
import { type AgentkitSessionLog, type DeploymentDetail, type DeploymentProgress } from "./deploy-client.js";
|
|
7
7
|
import { type RequestAuth } from "./request-headers.js";
|
|
8
8
|
export interface LogRingEntry {
|
|
9
9
|
index: number;
|
|
@@ -76,4 +76,23 @@ export interface RunLogsTailOptions {
|
|
|
76
76
|
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
77
77
|
}
|
|
78
78
|
export declare function runLogsTail(options: RunLogsTailOptions): Promise<void>;
|
|
79
|
+
export interface FollowHostedLogsOptions {
|
|
80
|
+
slug: string;
|
|
81
|
+
read: (signal?: AbortSignal) => Promise<AgentkitSessionLog[]>;
|
|
82
|
+
/** One session: print its lines without `==> ses_… <==` headers. */
|
|
83
|
+
scoped: boolean;
|
|
84
|
+
once: boolean;
|
|
85
|
+
json: boolean;
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
intervalMs?: number;
|
|
88
|
+
write?: (text: string) => void;
|
|
89
|
+
err?: (text: string) => void;
|
|
90
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* `logs --prod` on architecture v2: poll the recent sessions' output and print
|
|
94
|
+
* lines not seen yet. Like `tail -f` over several files, a `==> ses_… <==`
|
|
95
|
+
* header marks each switch to another session.
|
|
96
|
+
*/
|
|
97
|
+
export declare function followHostedLogs(options: FollowHostedLogsOptions): Promise<void>;
|
|
79
98
|
//# sourceMappingURL=logs-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs-client.d.ts","sourceRoot":"","sources":["../../src/internal/logs-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"logs-client.d.ts","sourceRoot":"","sources":["../../src/internal/logs-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EACrB,KA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