@cursor/july 0.1.109 → 0.1.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/README.md +0 -15
- package/dist/bin/agent-serve.js +99 -67
- package/dist/channels/bitbucket/api.js +8 -8
- package/dist/channels/bitbucket/binding.js +4 -4
- package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
- package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
- package/dist/channels/bitbucket/checks.d.ts.map +1 -1
- package/dist/channels/bitbucket/checks.js +1 -1
- package/dist/channels/bitbucket/cursor-account.js +1 -1
- package/dist/channels/bitbucket/events.js +1 -1
- package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
- package/dist/channels/checks.d.ts.map +1 -1
- package/dist/channels/checks.js +2 -2
- package/dist/channels/deployments/deployments-channel.js +1 -1
- package/dist/channels/github/cursor-account.js +3 -3
- package/dist/channels/github/defaults.d.ts.map +1 -1
- package/dist/channels/github/defaults.js +5 -3
- package/dist/channels/github/events.js +1 -1
- package/dist/channels/github/forward.js +8 -8
- package/dist/channels/github/github-channel.d.ts +29 -19
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +46 -32
- package/dist/channels/github/progress.d.ts.map +1 -1
- package/dist/channels/github/progress.js +7 -2
- package/dist/channels/github/state.d.ts +6 -0
- package/dist/channels/github/state.d.ts.map +1 -1
- package/dist/channels/github/types.d.ts +6 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/binding.js +4 -4
- package/dist/channels/gitlab/checks.d.ts.map +1 -1
- package/dist/channels/gitlab/checks.js +1 -1
- package/dist/channels/gitlab/cursor-account.js +1 -1
- package/dist/channels/gitlab/events.js +1 -1
- package/dist/channels/gitlab/gitlab-channel.js +1 -1
- package/dist/channels/gitlab/gitlab-webhook.js +1 -1
- package/dist/channels/gitlab/replay.js +2 -2
- package/dist/channels/origin/binding.d.ts +2 -0
- package/dist/channels/origin/binding.d.ts.map +1 -1
- package/dist/channels/origin/binding.js +3 -3
- package/dist/channels/origin/checks.d.ts +19 -7
- package/dist/channels/origin/checks.d.ts.map +1 -1
- package/dist/channels/origin/checks.js +13 -9
- package/dist/channels/origin/cursor-account.js +1 -1
- package/dist/channels/origin/defaults.d.ts.map +1 -1
- package/dist/channels/origin/defaults.js +3 -1
- package/dist/channels/origin/events.js +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +2 -1
- package/dist/channels/origin/origin-webhook.js +2 -2
- package/dist/channels/slack/agentic-delivery.d.ts +23 -0
- package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
- package/dist/channels/slack/agentic-delivery.js +560 -0
- package/dist/channels/slack/agentic-posted.d.ts +30 -0
- package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
- package/dist/channels/slack/agentic-posted.js +102 -0
- package/dist/channels/slack/agentic-signals.d.ts +48 -0
- package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
- package/dist/channels/slack/agentic-signals.js +204 -0
- package/dist/channels/slack/api.d.ts +20 -1
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +43 -11
- package/dist/channels/slack/approvals.js +1 -1
- package/dist/channels/slack/auth.d.ts.map +1 -1
- package/dist/channels/slack/auth.js +3 -1
- package/dist/channels/slack/blocks.js +3 -3
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
- package/dist/channels/slack/bot-mentions.js +5 -5
- package/dist/channels/slack/channel-watch.js +1 -1
- package/dist/channels/slack/cli-project.js +3 -3
- package/dist/channels/slack/defaults.d.ts +3 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +90 -29
- package/dist/channels/slack/dispatch.d.ts +44 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +323 -107
- package/dist/channels/slack/doctor.js +1 -1
- package/dist/channels/slack/eval-directive.js +1 -1
- package/dist/channels/slack/external-policy.d.ts +2 -1
- package/dist/channels/slack/external-policy.d.ts.map +1 -1
- package/dist/channels/slack/external-policy.js +13 -2
- package/dist/channels/slack/footer.d.ts +30 -0
- package/dist/channels/slack/footer.d.ts.map +1 -0
- package/dist/channels/slack/footer.js +88 -0
- package/dist/channels/slack/index.d.ts +2 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +2 -0
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +5 -3
- package/dist/channels/slack/live-delivery.d.ts +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +20 -6
- package/dist/channels/slack/log.d.ts.map +1 -1
- package/dist/channels/slack/log.js +1 -1
- package/dist/channels/slack/manifest.js +1 -1
- package/dist/channels/slack/nudge-carrier.js +1 -1
- package/dist/channels/slack/nudge-store.js +2 -2
- package/dist/channels/slack/paint-start.d.ts +22 -0
- package/dist/channels/slack/paint-start.d.ts.map +1 -0
- package/dist/channels/slack/paint-start.js +91 -0
- package/dist/channels/slack/placeholder.d.ts +62 -0
- package/dist/channels/slack/placeholder.d.ts.map +1 -0
- package/dist/channels/slack/placeholder.js +268 -0
- package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
- package/dist/channels/slack/progress-delivery.js +13 -4
- package/dist/channels/slack/reasoning-chip.d.ts +8 -0
- package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
- package/dist/channels/slack/reasoning-chip.js +30 -0
- package/dist/channels/slack/recording-sink.d.ts +29 -0
- package/dist/channels/slack/recording-sink.d.ts.map +1 -0
- package/dist/channels/slack/recording-sink.js +142 -0
- package/dist/channels/slack/reply-options.d.ts +8 -1
- package/dist/channels/slack/reply-options.d.ts.map +1 -1
- package/dist/channels/slack/reply-options.js +59 -14
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/slack-channel.d.ts +2 -2
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +58 -30
- package/dist/channels/slack/socket-mode.js +2 -2
- package/dist/channels/slack/thread-context.js +5 -5
- package/dist/channels/slack/tool-approval-events.d.ts +5 -0
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
- package/dist/channels/slack/tool-approval-events.js +50 -38
- package/dist/channels/slack/tool-cards.js +1 -1
- package/dist/channels/slack/tool-chip.d.ts +9 -0
- package/dist/channels/slack/tool-chip.d.ts.map +1 -0
- package/dist/channels/slack/tool-chip.js +25 -0
- package/dist/channels/slack/types.d.ts +49 -7
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels/slack/upload.d.ts +13 -0
- package/dist/channels/slack/upload.d.ts.map +1 -0
- package/dist/channels/slack/upload.js +135 -0
- package/dist/channels.d.ts +10 -14
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +9 -21
- package/dist/dashboard-session-url.d.ts +15 -0
- package/dist/dashboard-session-url.d.ts.map +1 -0
- package/dist/dashboard-session-url.js +25 -0
- package/dist/docs/404.html +3 -3
- package/dist/docs/architecture.svg +59 -0
- package/dist/docs/assets/app.DxTdhphC.js +309 -0
- package/dist/docs/assets/building-with-agents.md.BBCx0AUo.js +9 -0
- package/dist/docs/assets/building-with-agents.md.BBCx0AUo.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.QmjDU6Jh.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CR3KTF0X.js} +2 -2
- package/dist/docs/assets/chunks/arc.CVVqBOdS.js +1 -0
- package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CJHGP4ki.js +36 -0
- package/dist/docs/assets/chunks/baseUniq.r7UVVRBP.js +1 -0
- package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.DKmMaTre.js +132 -0
- package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.DDJsntUO.js +10 -0
- package/dist/docs/assets/chunks/channel.BjpoSbz_.js +1 -0
- package/dist/docs/assets/chunks/chunk-4BX2VUAB.BK2rKt6W.js +1 -0
- package/dist/docs/assets/chunks/chunk-4TB4RGXK.DRLV8RnF.js +206 -0
- package/dist/docs/assets/chunks/chunk-55IACEB6.DaKjxtb7.js +1 -0
- package/dist/docs/assets/chunks/chunk-EDXVE4YY.C5sPCIT1.js +1 -0
- package/dist/docs/assets/chunks/chunk-FMBD7UC4.CSGWyNTB.js +15 -0
- package/dist/docs/assets/chunks/chunk-OYMX7WX6.D5tK9XEr.js +231 -0
- package/dist/docs/assets/chunks/chunk-QZHKN3VN.BeZGd1UZ.js +1 -0
- package/dist/docs/assets/chunks/chunk-YZCP3GAM.U_tfWwQR.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +1 -0
- package/dist/docs/assets/chunks/clone.DRuGBKZC.js +1 -0
- package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.DVeRXIb6.js +1 -0
- package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
- package/dist/docs/assets/chunks/dagre-KV5264BT.BpKJAeRZ.js +4 -0
- package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
- package/dist/docs/assets/chunks/diagram-5BDNPKRD.BQOtrd1Z.js +10 -0
- package/dist/docs/assets/chunks/diagram-G4DWMVQ6.CSDAhjPI.js +24 -0
- package/dist/docs/assets/chunks/diagram-MMDJMWI5.Dpztst2S.js +43 -0
- package/dist/docs/assets/chunks/diagram-TYMM5635.qJHRizHR.js +24 -0
- package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.vbDotH3l.js +85 -0
- package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.CqS_ZQr4.js +162 -0
- package/dist/docs/assets/chunks/{framework.BCISBCiQ.js → framework.BNw1pucY.js} +6 -6
- package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.DTLdR4pN.js +292 -0
- package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.D04lnbnr.js +106 -0
- package/dist/docs/assets/chunks/graph.BlfqLJsM.js +1 -0
- package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.tAooImWA.js +2 -0
- package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
- package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js +70 -0
- package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.C3tUgyCg.js +139 -0
- package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.CtD9-QCe.js +89 -0
- package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
- package/dist/docs/assets/chunks/layout.D38U-LnT.js +1 -0
- package/dist/docs/assets/chunks/linear.BJmssyhN.js +1 -0
- package/dist/docs/assets/chunks/min.DNgXoouU.js +1 -0
- package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.Dcp6cxeu.js +96 -0
- package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
- package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CLDw6zIs.js +30 -0
- package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.CYaeeY4c.js +7 -0
- package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.gMYuRpq2.js +84 -0
- package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.CZqyHFbc.js +10 -0
- package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.BTsCjUDN.js +157 -0
- package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.CftT9mLJ.js +1 -0
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +1 -0
- package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.B_7J9ZsV.js} +2 -2
- package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.DbU3WUNw.js +120 -0
- package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.ixsq-q2u.js +34 -0
- package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
- package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +162 -0
- package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.C0ewvgbp.js +20 -0
- package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.nAEhF4bO.js +7 -0
- package/dist/docs/assets/deployment.md.D2jQZuFx.js +32 -0
- package/dist/docs/assets/deployment.md.D2jQZuFx.lean.js +1 -0
- package/dist/docs/assets/evals.md.BYvfZ-PO.js +72 -0
- package/dist/docs/assets/evals.md.BYvfZ-PO.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +30 -0
- package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
- package/dist/docs/assets/index.md.C-t81M5J.js +17 -0
- package/dist/docs/assets/index.md.C-t81M5J.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.DAvVhuuU.js} +30 -38
- package/dist/docs/assets/quickstart.md.DAvVhuuU.lean.js +1 -0
- package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.nFWbzAic.js} +2 -12
- package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.DLWDz9ij.js} +5 -3
- package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.CmyrlXfY.js} +4 -4
- package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.CmyrlXfY.lean.js} +1 -1
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
- package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.js +58 -0
- package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.lean.js +1 -0
- package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.B7uzNENk.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.CduHavZ2.js} +3 -3
- package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.CU1My5My.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.BGhgpy9V.js} +3 -3
- package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.Ccp0R53H.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.DjQkRefx.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.BHsSMMyO.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.BHsSMMyO.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BYzUTeVA.js} +4 -4
- package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BYzUTeVA.lean.js} +1 -1
- package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.KEFYXzfK.lean.js} +1 -1
- package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.js +3 -0
- package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.lean.js +1 -0
- package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.js +3 -0
- package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.lean.js +1 -0
- package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.CVGe_FG6.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.CVGe_FG6.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +1 -0
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.lean.js +1 -0
- package/dist/docs/building-with-agents.html +47 -18
- package/dist/docs/building-with-agents.md +94 -84
- package/dist/docs/deployment.html +62 -48
- package/dist/docs/deployment.md +117 -364
- package/dist/docs/evals.html +88 -194
- package/dist/docs/evals.md +146 -673
- package/dist/docs/guides/agent-to-agent.html +65 -12
- package/dist/docs/guides/agent-to-agent.md +125 -91
- package/dist/docs/guides/bitbucket.html +182 -14
- package/dist/docs/guides/bitbucket.md +249 -48
- package/dist/docs/guides/cloud-agents.html +49 -10
- package/dist/docs/guides/cloud-agents.md +123 -66
- package/dist/docs/guides/convert-automation.html +83 -19
- package/dist/docs/guides/convert-automation.md +156 -147
- package/dist/docs/guides/github.html +187 -62
- package/dist/docs/guides/github.md +260 -245
- package/dist/docs/guides/gitlab.html +187 -15
- package/dist/docs/guides/gitlab.md +249 -50
- package/dist/docs/guides/grokbot-agents.html +51 -11
- package/dist/docs/guides/grokbot-agents.md +116 -63
- package/dist/docs/guides/improve.html +51 -10
- package/dist/docs/guides/improve.md +111 -58
- package/dist/docs/guides/mcp-oauth.html +77 -22
- package/dist/docs/guides/mcp-oauth.md +111 -121
- package/dist/docs/guides/opentelemetry.html +72 -30
- package/dist/docs/guides/opentelemetry.md +105 -187
- package/dist/docs/guides/slack.html +89 -24
- package/dist/docs/guides/slack.md +170 -191
- package/dist/docs/guides/webhooks.html +100 -200
- package/dist/docs/guides/webhooks.md +154 -386
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +47 -11
- package/dist/docs/hillclimbing.md +101 -55
- package/dist/docs/index.html +57 -12
- package/dist/docs/index.md +83 -150
- package/dist/docs/llms-full.txt +6244 -10784
- package/dist/docs/llms.txt +23 -46
- package/dist/docs/quickstart.html +70 -45
- package/dist/docs/quickstart.md +44 -105
- package/dist/docs/reference/agent-config.html +41 -8
- package/dist/docs/reference/artifacts.html +41 -8
- package/dist/docs/reference/channels.html +41 -18
- package/dist/docs/reference/channels.md +0 -16
- package/dist/docs/reference/cli.html +44 -9
- package/dist/docs/reference/cli.md +2 -16
- package/dist/docs/reference/connections.html +43 -10
- package/dist/docs/reference/connections.md +3 -5
- package/dist/docs/reference/evals.html +116 -0
- package/dist/docs/reference/evals.md +293 -0
- package/dist/docs/reference/extensions.html +83 -54
- package/dist/docs/reference/extensions.md +127 -199
- package/dist/docs/reference/hooks.html +42 -9
- package/dist/docs/reference/hooks.md +34 -36
- package/dist/docs/reference/http-api.html +42 -9
- package/dist/docs/reference/http-api.md +5 -5
- package/dist/docs/reference/instructions.html +41 -8
- package/dist/docs/reference/playground.html +40 -7
- package/dist/docs/reference/playground.md +2 -2
- package/dist/docs/reference/project-layout.html +42 -9
- package/dist/docs/reference/project-layout.md +3 -4
- package/dist/docs/reference/prompt.html +41 -8
- package/dist/docs/reference/schedules.html +41 -8
- package/dist/docs/reference/sessions.html +40 -7
- package/dist/docs/reference/sessions.md +5 -4
- package/dist/docs/reference/skills.html +41 -8
- package/dist/docs/reference/subagents.html +41 -8
- package/dist/docs/reference/subagents.md +2 -4
- package/dist/docs/reference/tools.html +43 -10
- package/dist/docs/reference/tools.md +2 -5
- package/dist/docs/templates/agentic-owners.html +41 -8
- package/dist/docs/templates/pr-autofixer.html +41 -8
- package/dist/docs/templates/security-reviewer.html +41 -8
- package/dist/docs/templates/thermo-quality-review.html +62 -0
- package/dist/docs/templates/thermo-quality-review.md +75 -0
- package/dist/docs/templates/thermo-review.html +62 -0
- package/dist/docs/templates/thermo-review.md +74 -0
- package/dist/docs/templates/triage.html +41 -8
- package/dist/docs/troubleshooting.html +41 -8
- package/dist/docs/troubleshooting.md +97 -67
- package/dist/evals/assertions.js +19 -19
- package/dist/evals/expect.js +1 -1
- package/dist/evals/judge.js +1 -1
- package/dist/evals/reporters.d.ts.map +1 -1
- package/dist/evals/reporters.js +8 -8
- package/dist/evals/run-facts.js +2 -2
- package/dist/evals.d.ts +1 -1
- package/dist/evals.d.ts.map +1 -1
- package/dist/evals.js +7 -7
- package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
- package/dist/extensions/improve/extension.d.ts +3 -1
- package/dist/extensions/improve/extension.d.ts.map +1 -1
- package/dist/extensions/improve/extension.js +4 -2
- package/dist/extensions/improve/skills/yourself.js +2 -2
- package/dist/extensions/slack-communication/extension.d.ts +28 -0
- package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
- package/dist/extensions/slack-communication/extension.js +32 -0
- package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
- package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
- package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
- package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
- package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
- package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-card.js +25 -0
- package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-file.js +76 -0
- package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-update.js +36 -0
- package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/react.js +27 -0
- package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/set-status.js +18 -0
- package/dist/files-backends/cursor-hosted.d.ts +18 -6
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +357 -74
- package/dist/files-backends/local-fs.js +1 -1
- package/dist/files.d.ts +15 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/filesystem.d.ts +46 -2
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +160 -113
- package/dist/index.d.ts +7 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/internal/advertise-tools.js +6 -6
- package/dist/internal/approval-gate.js +1 -1
- package/dist/internal/artifacts-store.js +3 -3
- package/dist/internal/as-of.js +2 -2
- package/dist/internal/authored-alias-hooks.js +1 -1
- package/dist/internal/builtin-tools/reminders.js +2 -2
- package/dist/internal/chat-client.js +5 -5
- package/dist/internal/cli-ax.d.ts +7 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +140 -27
- package/dist/internal/cli-bitbucket.js +10 -10
- package/dist/internal/cli-convert-automation.js +2 -2
- package/dist/internal/cli-cursor.d.ts +3 -11
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +5 -10
- package/dist/internal/cli-deploy.d.ts +12 -2
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +328 -96
- package/dist/internal/cli-docs.js +5 -5
- package/dist/internal/cli-github.js +15 -16
- package/dist/internal/cli-gitlab.js +10 -10
- package/dist/internal/cli-manifest.js +1 -1
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +5 -5
- package/dist/internal/cli-mcp.js +3 -3
- package/dist/internal/cli-skills.js +2 -2
- package/dist/internal/cli-slack.js +5 -5
- package/dist/internal/cloud-turn-cost.js +1 -1
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +15 -9
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +33 -2
- package/dist/internal/convert-automation/convert-workflow.js +25 -24
- package/dist/internal/convert-automation/types.d.ts +8 -0
- package/dist/internal/convert-automation/types.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.d.ts +2 -2
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +32 -27
- package/dist/internal/cursor/backend-client.d.ts +15 -10
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +17 -11
- package/dist/internal/cursor/credentials.js +1 -1
- package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +25 -0
- package/dist/internal/cursor-account-mcp-auth.js +9 -9
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +2 -0
- package/dist/internal/cursor-deployment-relay.js +9 -9
- package/dist/internal/cursor-event-relay.js +10 -10
- package/dist/internal/cursor-relay-core.js +2 -2
- package/dist/internal/deploy-client.d.ts +106 -9
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +171 -23
- package/dist/internal/deploy-manifest.d.ts +13 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +32 -16
- package/dist/internal/discovery/agent-config.d.ts +5 -0
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +27 -0
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +10 -8
- package/dist/internal/discovery/channels.js +4 -4
- package/dist/internal/discovery/connections.js +4 -4
- package/dist/internal/discovery/cursor-plugin.js +12 -12
- package/dist/internal/discovery/extension-overlay.js +3 -3
- package/dist/internal/discovery/extensions.js +6 -6
- package/dist/internal/discovery/info.js +9 -9
- package/dist/internal/discovery/instructions.js +1 -1
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +4 -4
- package/dist/internal/discovery/services.js +1 -1
- package/dist/internal/discovery/tools.js +1 -1
- package/dist/internal/docs-site.js +2 -2
- package/dist/internal/env-file.js +1 -1
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +7 -7
- package/dist/internal/eval-runner.js +14 -14
- package/dist/internal/evals-client.js +4 -4
- package/dist/internal/event-log.js +8 -8
- package/dist/internal/event-mapper.d.ts +18 -0
- package/dist/internal/event-mapper.d.ts.map +1 -1
- package/dist/internal/event-mapper.js +34 -2
- package/dist/internal/filesystem/format.d.ts.map +1 -1
- package/dist/internal/filesystem/format.js +6 -3
- package/dist/internal/filesystem/scratch.js +3 -3
- package/dist/internal/filesystem/tools.d.ts.map +1 -1
- package/dist/internal/filesystem/tools.js +7 -7
- package/dist/internal/filesystem/walk.d.ts +7 -4
- package/dist/internal/filesystem/walk.d.ts.map +1 -1
- package/dist/internal/filesystem/walk.js +35 -12
- package/dist/internal/framework-file-storage.d.ts +6 -2
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +91 -2
- package/dist/internal/framework-storage-selection.d.ts +0 -6
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +2 -11
- package/dist/internal/github-fanout.js +3 -3
- package/dist/internal/guest-network.js +4 -4
- package/dist/internal/host-files.js +1 -1
- package/dist/internal/host-kv.js +2 -2
- package/dist/internal/hosted-admission-adapter.d.ts +5 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.js +2 -4
- package/dist/internal/hosted-catch.js +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +46 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +126 -9
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +209 -64
- package/dist/internal/hosted-execution-diag.js +3 -3
- package/dist/internal/hosted-execution-latency.d.ts +80 -0
- package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
- package/dist/internal/hosted-execution-latency.js +220 -0
- package/dist/internal/hosting.d.ts +5 -5
- package/dist/internal/hosting.d.ts.map +1 -1
- package/dist/internal/hosting.js +5 -6
- package/dist/internal/http-channel-define.d.ts +11 -0
- package/dist/internal/http-channel-define.d.ts.map +1 -0
- package/dist/internal/http-channel-define.js +18 -0
- package/dist/internal/http-channel.d.ts +2 -3
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +3 -4
- package/dist/internal/http-control-plane-session.d.ts +7 -3
- package/dist/internal/http-control-plane-session.d.ts.map +1 -1
- package/dist/internal/http-control-plane-session.js +22 -10
- package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
- package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
- package/dist/internal/incoming-headers-to-fetch.js +41 -0
- package/dist/internal/init-interview.js +7 -7
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +18 -14
- package/dist/internal/init-scaffold.js +1 -1
- package/dist/internal/inline-stdio-mcp.js +2 -2
- package/dist/internal/install-cursor-skills.js +10 -10
- package/dist/internal/json-schema.js +1 -1
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +3 -3
- package/dist/internal/local-env.js +3 -3
- package/dist/internal/log-ring.js +1 -1
- package/dist/internal/logs-client.js +1 -1
- package/dist/internal/mcp-endpoint.js +8 -8
- package/dist/internal/mcp-host.js +4 -4
- package/dist/internal/mcp-oauth-on-demand.js +3 -3
- package/dist/internal/mcp-oauth.js +5 -5
- package/dist/internal/net.js +2 -2
- package/dist/internal/otel/config.js +3 -3
- package/dist/internal/otel/runtime.js +13 -13
- package/dist/internal/peer-connections.js +2 -2
- package/dist/internal/platform-schedule-sync.js +1 -1
- package/dist/internal/platform-timers.js +1 -1
- package/dist/internal/playground/static.js +2 -2
- package/dist/internal/playground/toolchain.js +2 -2
- package/dist/internal/playground-proxy.js +3 -3
- package/dist/internal/process-memory-telemetry.js +1 -1
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +7 -7
- package/dist/internal/reminder-store.js +1 -1
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +9 -0
- package/dist/internal/resolved-connections.js +8 -8
- package/dist/internal/result-output.d.ts +14 -2
- package/dist/internal/result-output.d.ts.map +1 -1
- package/dist/internal/result-output.js +45 -2
- package/dist/internal/router.js +4 -4
- package/dist/internal/run-client.js +2 -2
- package/dist/internal/schedule-runner.js +6 -6
- package/dist/internal/scm/pr-url.d.ts +3 -1
- package/dist/internal/scm/pr-url.d.ts.map +1 -1
- package/dist/internal/scm/pr-url.js +10 -2
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +14 -15
- package/dist/internal/serve-restart.js +1 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +175 -126
- package/dist/internal/session-cost.js +3 -3
- package/dist/internal/session-engine.d.ts +34 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +386 -184
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +4 -4
- package/dist/internal/session-store.d.ts +47 -3
- package/dist/internal/session-store.d.ts.map +1 -1
- package/dist/internal/session-store.js +198 -33
- package/dist/internal/sessions-client.js +3 -3
- package/dist/internal/skill-catalog.d.ts +28 -0
- package/dist/internal/skill-catalog.d.ts.map +1 -0
- package/dist/internal/skill-catalog.js +44 -0
- package/dist/internal/slack-thread-key.d.ts +7 -0
- package/dist/internal/slack-thread-key.d.ts.map +1 -0
- package/dist/internal/slack-thread-key.js +10 -0
- package/dist/internal/sleep.js +1 -1
- package/dist/internal/storage-coordinator.d.ts +17 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +111 -11
- package/dist/internal/storage.d.ts +2 -0
- package/dist/internal/storage.d.ts.map +1 -0
- package/dist/internal/storage.js +1 -0
- package/dist/internal/store-mirror.js +4 -4
- package/dist/internal/terminal-style.js +2 -2
- package/dist/internal/tool-result.js +3 -3
- package/dist/internal/trajectory.js +7 -7
- package/dist/internal/turn-governor.js +2 -2
- package/dist/internal/turn-outbox.js +1 -1
- package/dist/internal/update-check.js +2 -2
- package/dist/internal/v2-hosting.d.ts +9 -0
- package/dist/internal/v2-hosting.d.ts.map +1 -1
- package/dist/internal/v2-hosting.js +10 -0
- package/dist/internal/workspace.d.ts +13 -10
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +17 -16
- package/dist/kv/memory-kv.d.ts +6 -4
- package/dist/kv/memory-kv.d.ts.map +1 -1
- package/dist/kv/memory-kv.js +9 -7
- package/dist/kv.d.ts +4 -7
- package/dist/kv.d.ts.map +1 -1
- package/dist/kv.js +4 -7
- package/dist/otel-public.d.ts +7 -0
- package/dist/otel-public.d.ts.map +1 -0
- package/dist/otel-public.js +5 -0
- package/dist/otel.d.ts +7 -2
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +7 -2
- package/dist/playground/assets/index-B1c1LeIf.js +67 -0
- package/dist/playground/assets/index-CK2LX3iD.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/prompt.js +1 -1
- package/dist/result.d.ts +10 -4
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +9 -3
- package/dist/storage-backends/cursor-hosted-v2.js +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +5 -17
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +6 -20
- package/dist/storage-backends/file-kv.js +7 -7
- package/dist/storage.d.ts +20 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +7 -6
- package/dist/types.d.ts +76 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -4
- package/docs/README.md +85 -152
- package/docs/building-with-agents.md +96 -86
- package/docs/deployment.md +118 -365
- package/docs/evals.md +147 -674
- package/docs/guides/agent-to-agent.md +126 -92
- package/docs/guides/bitbucket.md +250 -49
- package/docs/guides/cloud-agents.md +124 -67
- package/docs/guides/convert-automation.md +157 -148
- package/docs/guides/github.md +261 -246
- package/docs/guides/gitlab.md +250 -51
- package/docs/guides/grokbot-agents.md +117 -64
- package/docs/guides/improve.md +112 -59
- package/docs/guides/mcp-oauth.md +112 -122
- package/docs/guides/opentelemetry.md +106 -188
- package/docs/guides/slack.md +171 -192
- package/docs/guides/webhooks.md +155 -387
- package/docs/hillclimbing.md +102 -56
- package/docs/quickstart.md +45 -106
- package/docs/reference/channels.md +0 -16
- package/docs/reference/cli.md +2 -16
- package/docs/reference/connections.md +3 -5
- package/docs/reference/evals.md +298 -0
- package/docs/reference/extensions.md +128 -200
- package/docs/reference/hooks.md +34 -36
- package/docs/reference/http-api.md +5 -5
- package/docs/reference/playground.md +2 -2
- package/docs/reference/project-layout.md +3 -4
- package/docs/reference/sessions.md +5 -4
- package/docs/reference/subagents.md +2 -4
- package/docs/reference/tools.md +2 -5
- package/docs/templates/thermo-quality-review.md +80 -0
- package/docs/templates/thermo-review.md +79 -0
- package/docs/troubleshooting.md +98 -68
- package/package.json +55 -37
- package/skills/framework-map/SKILL.md +2 -2
- package/skills/github/SKILL.md +21 -13
- package/skills/otel/SKILL.md +8 -18
- package/src/bin/agent-serve.ts +115 -72
- package/src/channels/bitbucket/api.ts +8 -8
- package/src/channels/bitbucket/binding.ts +4 -4
- package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
- package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
- package/src/channels/bitbucket/checks.ts +3 -4
- package/src/channels/bitbucket/cursor-account.ts +1 -1
- package/src/channels/bitbucket/events.ts +1 -1
- package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
- package/src/channels/checks.ts +5 -4
- package/src/channels/deployments/deployments-channel.ts +1 -1
- package/src/channels/github/api.ts +1 -1
- package/src/channels/github/checks.ts +1 -1
- package/src/channels/github/cursor-account.ts +3 -3
- package/src/channels/github/defaults.ts +8 -4
- package/src/channels/github/events.ts +1 -1
- package/src/channels/github/forward.ts +8 -8
- package/src/channels/github/github-channel.ts +48 -21
- package/src/channels/github/progress.ts +7 -2
- package/src/channels/github/state.ts +6 -0
- package/src/channels/github/types.ts +6 -0
- package/src/channels/gitlab/binding.ts +4 -4
- package/src/channels/gitlab/checks.ts +3 -4
- package/src/channels/gitlab/cursor-account.ts +1 -1
- package/src/channels/gitlab/events.ts +1 -1
- package/src/channels/gitlab/gitlab-channel.ts +1 -1
- package/src/channels/gitlab/gitlab-webhook.ts +1 -1
- package/src/channels/gitlab/replay.ts +2 -2
- package/src/channels/origin/binding.ts +6 -3
- package/src/channels/origin/checks.ts +27 -17
- package/src/channels/origin/cursor-account.ts +1 -1
- package/src/channels/origin/defaults.ts +5 -1
- package/src/channels/origin/events.ts +1 -1
- package/src/channels/origin/origin-channel.ts +2 -1
- package/src/channels/origin/origin-webhook.ts +2 -2
- package/src/channels/slack/agentic-delivery.ts +661 -0
- package/src/channels/slack/agentic-posted.ts +148 -0
- package/src/channels/slack/agentic-signals.ts +248 -0
- package/src/channels/slack/api.ts +51 -11
- package/src/channels/slack/approvals.ts +1 -1
- package/src/channels/slack/attachments.ts +1 -1
- package/src/channels/slack/auth.ts +3 -1
- package/src/channels/slack/blocks.ts +3 -3
- package/src/channels/slack/bot-mentions.ts +5 -7
- package/src/channels/slack/channel-watch.ts +1 -1
- package/src/channels/slack/cli-project.ts +3 -3
- package/src/channels/slack/defaults.ts +109 -37
- package/src/channels/slack/dispatch.ts +419 -168
- package/src/channels/slack/doctor.ts +1 -1
- package/src/channels/slack/eval-directive.ts +1 -1
- package/src/channels/slack/external-policy.ts +15 -2
- package/src/channels/slack/footer.ts +108 -0
- package/src/channels/slack/index.ts +2 -0
- package/src/channels/slack/interactive.ts +4 -2
- package/src/channels/slack/live-delivery.ts +23 -7
- package/src/channels/slack/log.ts +1 -1
- package/src/channels/slack/manifest.ts +1 -1
- package/src/channels/slack/nudge-carrier.ts +1 -1
- package/src/channels/slack/nudge-store.ts +2 -2
- package/src/channels/slack/paint-start.ts +93 -0
- package/src/channels/slack/placeholder.ts +366 -0
- package/src/channels/slack/progress-delivery.ts +14 -1
- package/src/channels/slack/reasoning-chip.ts +48 -0
- package/src/channels/slack/recording-sink.ts +176 -0
- package/src/channels/slack/reply-options.ts +71 -15
- package/src/channels/slack/setup.ts +1 -1
- package/src/channels/slack/slack-channel.ts +81 -14
- package/src/channels/slack/socket-mode.ts +2 -2
- package/src/channels/slack/thread-context.ts +5 -5
- package/src/channels/slack/tool-approval-events.ts +54 -38
- package/src/channels/slack/tool-cards.ts +1 -1
- package/src/channels/slack/tool-chip.ts +36 -0
- package/src/channels/slack/types.ts +47 -7
- package/src/channels/slack/upload.ts +142 -0
- package/src/channels.ts +12 -30
- package/src/dashboard-session-url.ts +32 -0
- package/src/evals/assertions.ts +19 -19
- package/src/evals/expect.ts +1 -1
- package/src/evals/judge.ts +1 -1
- package/src/evals/reporters.ts +8 -9
- package/src/evals/run-facts.ts +2 -2
- package/src/evals.ts +7 -10
- package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
- package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
- package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
- package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
- package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
- package/src/extensions/improve/extension.ts +4 -2
- package/src/extensions/improve/skills/yourself.ts +2 -2
- package/src/extensions/slack-communication/evals/harness.ts +728 -0
- package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
- package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
- package/src/extensions/slack-communication/extension.ts +45 -0
- package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
- package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
- package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
- package/src/extensions/slack-communication/tools/post-card.ts +28 -0
- package/src/extensions/slack-communication/tools/post-file.ts +85 -0
- package/src/extensions/slack-communication/tools/post-update.ts +41 -0
- package/src/extensions/slack-communication/tools/react.ts +33 -0
- package/src/extensions/slack-communication/tools/set-status.ts +21 -0
- package/src/files-backends/cursor-hosted.ts +502 -98
- package/src/files-backends/local-fs.ts +1 -1
- package/src/files.ts +15 -0
- package/src/filesystem.ts +182 -81
- package/src/index.ts +7 -36
- package/src/internal/advertise-tools.ts +6 -6
- package/src/internal/approval-gate.ts +1 -1
- package/src/internal/artifacts-store.ts +3 -3
- package/src/internal/as-of.ts +2 -2
- package/src/internal/authored-alias-hooks.ts +1 -1
- package/src/internal/authored-loaders.ts +2 -3
- package/src/internal/builtin-tools/reminders.ts +2 -2
- package/src/internal/chat-client.ts +5 -5
- package/src/internal/cli-ax.ts +172 -29
- package/src/internal/cli-bitbucket.ts +11 -11
- package/src/internal/cli-convert-automation.ts +2 -2
- package/src/internal/cli-cursor.ts +5 -16
- package/src/internal/cli-deploy.ts +389 -104
- package/src/internal/cli-docs.ts +5 -5
- package/src/internal/cli-github.ts +16 -19
- package/src/internal/cli-gitlab.ts +11 -11
- package/src/internal/cli-manifest.ts +1 -1
- package/src/internal/cli-mcp-oauth.ts +5 -7
- package/src/internal/cli-mcp.ts +3 -3
- package/src/internal/cli-skills.ts +2 -2
- package/src/internal/cli-slack.ts +5 -5
- package/src/internal/cloud-turn-cost.ts +1 -1
- package/src/internal/continuation-identity.ts +14 -9
- package/src/internal/conversation-mirror.ts +36 -3
- package/src/internal/convert-automation/convert-workflow.ts +27 -27
- package/src/internal/convert-automation/types.ts +9 -0
- package/src/internal/cursor/account-mcp.ts +48 -31
- package/src/internal/cursor/backend-client.ts +28 -17
- package/src/internal/cursor/credentials.ts +1 -1
- package/src/internal/cursor/hosted-store-secrets.ts +34 -0
- package/src/internal/cursor-account-mcp-auth.ts +9 -9
- package/src/internal/cursor-agent-template.ts +2 -0
- package/src/internal/cursor-deployment-relay.ts +10 -10
- package/src/internal/cursor-event-relay.ts +10 -10
- package/src/internal/cursor-relay-core.ts +2 -2
- package/src/internal/deploy-client.ts +266 -24
- package/src/internal/deploy-manifest.ts +46 -8
- package/src/internal/discovery/agent-config.ts +34 -0
- package/src/internal/discovery/agent.ts +14 -6
- package/src/internal/discovery/channels.ts +4 -4
- package/src/internal/discovery/connections.ts +4 -4
- package/src/internal/discovery/cursor-plugin.ts +12 -12
- package/src/internal/discovery/extension-overlay.ts +3 -3
- package/src/internal/discovery/extensions.ts +6 -6
- package/src/internal/discovery/info.ts +9 -9
- package/src/internal/discovery/instructions.ts +1 -1
- package/src/internal/discovery/project.ts +4 -4
- package/src/internal/discovery/services.ts +1 -1
- package/src/internal/discovery/tools.ts +1 -1
- package/src/internal/docs-site.ts +2 -2
- package/src/internal/env-file.ts +2 -2
- package/src/internal/eval-run-store.ts +7 -9
- package/src/internal/eval-runner.ts +20 -20
- package/src/internal/evals-client.ts +6 -6
- package/src/internal/event-log.ts +10 -10
- package/src/internal/event-mapper.ts +37 -2
- package/src/internal/filesystem/format.ts +11 -12
- package/src/internal/filesystem/scratch.ts +3 -3
- package/src/internal/filesystem/tools.ts +8 -8
- package/src/internal/filesystem/walk.ts +61 -16
- package/src/internal/framework-file-storage.ts +104 -4
- package/src/internal/framework-storage-selection.ts +2 -12
- package/src/internal/github-fanout.ts +4 -4
- package/src/internal/guest-network.ts +4 -4
- package/src/internal/host-files.ts +1 -1
- package/src/internal/host-kv.ts +2 -2
- package/src/internal/hosted-admission-adapter.ts +5 -0
- package/src/internal/hosted-catch-protocol.ts +3 -5
- package/src/internal/hosted-catch.ts +1 -1
- package/src/internal/hosted-delivery-protocol.ts +189 -14
- package/src/internal/hosted-delivery.ts +294 -81
- package/src/internal/hosted-execution-diag.ts +3 -3
- package/src/internal/hosted-execution-latency.ts +334 -0
- package/src/internal/hosting.ts +5 -6
- package/src/internal/http-channel-define.ts +27 -0
- package/src/internal/http-channel.ts +3 -4
- package/src/internal/http-control-plane-session.ts +24 -11
- package/src/internal/incoming-headers-to-fetch.ts +54 -0
- package/src/internal/init-interview.ts +7 -7
- package/src/internal/init-project.ts +18 -16
- package/src/internal/init-scaffold.ts +1 -1
- package/src/internal/inline-stdio-mcp.ts +2 -2
- package/src/internal/install-cursor-skills.ts +11 -11
- package/src/internal/json-schema.ts +1 -1
- package/src/internal/local-control-plane.ts +4 -5
- package/src/internal/local-env.ts +3 -3
- package/src/internal/log-ring.ts +1 -1
- package/src/internal/logs-client.ts +1 -1
- package/src/internal/mcp-endpoint.ts +10 -10
- package/src/internal/mcp-host.ts +9 -9
- package/src/internal/mcp-oauth-on-demand.ts +3 -3
- package/src/internal/mcp-oauth.ts +5 -5
- package/src/internal/net.ts +2 -2
- package/src/internal/otel/config.ts +3 -3
- package/src/internal/otel/runtime.ts +14 -14
- package/src/internal/peer-connections.ts +2 -2
- package/src/internal/platform-schedule-sync.ts +1 -1
- package/src/internal/platform-timers.ts +1 -1
- package/src/internal/playground/static.ts +2 -2
- package/src/internal/playground/toolchain.ts +2 -2
- package/src/internal/playground-proxy.ts +3 -3
- package/src/internal/process-memory-telemetry.ts +1 -1
- package/src/internal/reminder-runner.ts +8 -10
- package/src/internal/reminder-store.ts +1 -1
- package/src/internal/request-error-status.ts +9 -0
- package/src/internal/resolved-connections.ts +8 -8
- package/src/internal/result-output.ts +62 -5
- package/src/internal/router.ts +4 -4
- package/src/internal/run-client.ts +2 -2
- package/src/internal/schedule-runner.ts +6 -6
- package/src/internal/scm/pr-url.ts +11 -2
- package/src/internal/sdk-runner.ts +14 -28
- package/src/internal/serve-restart.ts +1 -1
- package/src/internal/server.ts +201 -140
- package/src/internal/session-cost.ts +3 -3
- package/src/internal/session-engine.ts +516 -244
- package/src/internal/session-run-log.ts +4 -6
- package/src/internal/session-store.ts +213 -39
- package/src/internal/sessions-client.ts +3 -3
- package/src/internal/skill-catalog.ts +69 -0
- package/src/internal/slack-thread-key.ts +11 -0
- package/src/internal/sleep.ts +1 -1
- package/src/internal/storage-coordinator.ts +118 -21
- package/src/internal/storage.ts +1 -0
- package/src/internal/store-mirror.ts +4 -4
- package/src/internal/terminal-style.ts +2 -2
- package/src/internal/tool-result.ts +3 -3
- package/src/internal/trajectory.ts +7 -7
- package/src/internal/turn-governor.ts +2 -2
- package/src/internal/turn-outbox.ts +1 -1
- package/src/internal/update-check.ts +2 -2
- package/src/internal/v2-hosting.ts +14 -0
- package/src/internal/workspace.ts +17 -17
- package/src/kv/memory-kv.ts +9 -7
- package/src/kv.ts +4 -7
- package/src/otel-public.ts +24 -0
- package/src/otel.ts +7 -2
- package/src/prompt.ts +1 -1
- package/src/result.ts +10 -8
- package/src/storage-backends/cursor-hosted-v2.ts +2 -2
- package/src/storage-backends/cursor-hosted.ts +6 -23
- package/src/storage-backends/file-kv.ts +7 -7
- package/src/storage.ts +22 -7
- package/src/types.ts +91 -17
- package/templates/agentic-owners/agent/channels/github.ts +3 -6
- package/templates/agentic-owners/agent/lib/github.ts +5 -5
- package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
- package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
- package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
- package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
- package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
- package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
- package/templates/agentic-owners/agent/lib/review.ts +37 -30
- package/templates/agentic-owners/evals/owners.eval.ts +2 -2
- package/templates/agentic-owners/package.json +1 -1
- package/templates/agents-md/agent/lib/collect.ts +16 -10
- package/templates/agents-md/agent/lib/config.ts +1 -1
- package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
- package/templates/agents-md/package.json +1 -1
- package/templates/code-wiki/agent/channels/github.ts +4 -7
- package/templates/code-wiki/agent/lib/repos.ts +1 -1
- package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
- package/templates/code-wiki/package.json +1 -1
- package/templates/demo/agent/lib/collect.ts +6 -2
- package/templates/demo/agent/lib/repos.ts +1 -1
- package/templates/demo/agent/tools/record_demo.ts +1 -1
- package/templates/demo/evals/demo.eval.ts +1 -5
- package/templates/demo/package.json +1 -1
- package/templates/grokbot-agents/package.json +1 -1
- package/templates/pr-autofixer/agent/channels/github.ts +16 -13
- package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
- package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
- package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
- package/templates/pr-autofixer/package.json +1 -1
- package/templates/security-help/agent/lib/repos.ts +1 -1
- package/templates/security-help/package.json +1 -1
- package/templates/security-reviewer/agent/lib/repos.ts +1 -1
- package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
- package/templates/security-reviewer/package.json +1 -1
- package/templates/thermo-quality-review/README.md +35 -0
- package/templates/thermo-quality-review/agent/agent.ts +8 -0
- package/templates/thermo-quality-review/agent/channels/github.ts +42 -0
- package/templates/thermo-quality-review/agent/instructions.md +43 -0
- package/templates/thermo-quality-review/agent/tools/post_findings.ts +70 -0
- package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
- package/templates/thermo-quality-review/evals/review.eval.ts +62 -0
- package/templates/thermo-quality-review/package.json +18 -0
- package/templates/thermo-quality-review/tsconfig.json +12 -0
- package/templates/thermo-review/README.md +35 -0
- package/templates/thermo-review/agent/agent.ts +8 -0
- package/templates/thermo-review/agent/channels/github.ts +42 -0
- package/templates/thermo-review/agent/instructions.md +40 -0
- package/templates/thermo-review/agent/tools/post_findings.ts +70 -0
- package/templates/thermo-review/evals/evals.config.ts +5 -0
- package/templates/thermo-review/evals/review.eval.ts +53 -0
- package/templates/thermo-review/package.json +18 -0
- package/templates/thermo-review/tsconfig.json +12 -0
- package/templates/triage/agent/lib/actuate.ts +26 -41
- package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
- package/templates/triage/agent/lib/verify-webhook.ts +10 -5
- package/templates/triage/agent/tools/record_triage.ts +1 -4
- package/templates/triage/package.json +1 -1
- package/dist/client.d.ts +0 -14
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -12
- package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
- package/dist/docs/assets/building-with-agents.md.D0KbSkJn.js +0 -13
- package/dist/docs/assets/building-with-agents.md.D0KbSkJn.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
- package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
- package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
- package/dist/docs/assets/deployment.md.JenwuCCB.js +0 -51
- package/dist/docs/assets/deployment.md.JenwuCCB.lean.js +0 -1
- package/dist/docs/assets/evals.md.C7JLjoEP.js +0 -211
- package/dist/docs/assets/evals.md.C7JLjoEP.lean.js +0 -1
- package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
- package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.js +0 -10
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +0 -9
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.lean.js +0 -1
- package/dist/docs/assets/guides_convert-automation.md.B4sjlodG.js +0 -12
- package/dist/docs/assets/guides_convert-automation.md.B4sjlodG.lean.js +0 -1
- package/dist/docs/assets/guides_github.md.TZaTZlfz.js +0 -64
- package/dist/docs/assets/guides_github.md.TZaTZlfz.lean.js +0 -1
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.js +0 -14
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.lean.js +0 -1
- package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
- package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.lean.js +0 -1
- package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
- package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
- package/dist/docs/assets/guides_improve.md.BGVk32bK.js +0 -14
- package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +0 -1
- package/dist/docs/assets/guides_mcp-oauth.md.Dp6cDP7f.js +0 -28
- package/dist/docs/assets/guides_mcp-oauth.md.Dp6cDP7f.lean.js +0 -1
- package/dist/docs/assets/guides_opentelemetry.md.SCRMskno.js +0 -26
- package/dist/docs/assets/guides_opentelemetry.md.SCRMskno.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.D4RVMM4G.js +0 -38
- package/dist/docs/assets/guides_slack.md.D4RVMM4G.lean.js +0 -1
- package/dist/docs/assets/guides_webhooks.md.CJK484ex.js +0 -225
- package/dist/docs/assets/guides_webhooks.md.CJK484ex.lean.js +0 -1
- package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
- package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
- package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
- package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
- package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
- package/dist/docs/assets/reference_extensions.md.ZAVUyuEX.js +0 -62
- package/dist/docs/assets/reference_extensions.md.ZAVUyuEX.lean.js +0 -1
- package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
- package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
- package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
- package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
- package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
- package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
- package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
- package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
- package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
- package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
- package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
- package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
- package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
- package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
- package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
- package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
- package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
- package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
- package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
- package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
- package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
- package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
- package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
- package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
- package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
- package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.lean.js +0 -1
- package/dist/docs/concepts.html +0 -27
- package/dist/docs/concepts.md +0 -166
- package/dist/docs/design/filesystem.md +0 -376
- package/dist/docs/design/runtime-abstraction.md +0 -1756
- package/dist/docs/guides/human-in-the-loop.html +0 -54
- package/dist/docs/guides/human-in-the-loop.md +0 -126
- package/dist/docs/reference/result.html +0 -45
- package/dist/docs/reference/result.md +0 -89
- package/dist/docs/scaffolding-agents.html +0 -27
- package/dist/docs/scaffolding-agents.md +0 -130
- package/dist/docs/skills/create-agent.html +0 -34
- package/dist/docs/skills/create-agent.md +0 -160
- package/dist/docs/skills/debug.html +0 -27
- package/dist/docs/skills/debug.md +0 -36
- package/dist/docs/skills/deploy.html +0 -61
- package/dist/docs/skills/deploy.md +0 -161
- package/dist/docs/skills/evals.html +0 -51
- package/dist/docs/skills/evals.md +0 -137
- package/dist/docs/skills/framework-map.html +0 -27
- package/dist/docs/skills/framework-map.md +0 -99
- package/dist/docs/skills/github.html +0 -42
- package/dist/docs/skills/github.md +0 -93
- package/dist/docs/skills/hillclimb.html +0 -33
- package/dist/docs/skills/hillclimb.md +0 -55
- package/dist/docs/skills/index.html +0 -27
- package/dist/docs/skills/index.md +0 -21
- package/dist/docs/skills/mcp-auth.html +0 -44
- package/dist/docs/skills/mcp-auth.md +0 -76
- package/dist/docs/skills/otel.html +0 -34
- package/dist/docs/skills/otel.md +0 -53
- package/dist/docs/skills/setup-slack.html +0 -46
- package/dist/docs/skills/setup-slack.md +0 -141
- package/dist/docs/storage.html +0 -56
- package/dist/docs/storage.md +0 -167
- package/dist/docs/templates/agents-md.html +0 -28
- package/dist/docs/templates/agents-md.md +0 -105
- package/dist/docs/templates/code-wiki.html +0 -28
- package/dist/docs/templates/code-wiki.md +0 -91
- package/dist/docs/templates/demo.html +0 -30
- package/dist/docs/templates/demo.md +0 -80
- package/dist/docs/templates/grokbot-agents.html +0 -29
- package/dist/docs/templates/grokbot-agents.md +0 -48
- package/dist/docs/templates/security-help.html +0 -30
- package/dist/docs/templates/security-help.md +0 -65
- package/dist/internal/tenant-slack/relay.d.ts +0 -75
- package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
- package/dist/internal/tenant-slack/relay.js +0 -148
- package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
- package/dist/playground/assets/index-CqLX5uF3.js +0 -67
- package/docs/concepts.md +0 -171
- package/docs/design/filesystem.md +0 -376
- package/docs/design/runtime-abstraction.md +0 -1756
- package/docs/guides/human-in-the-loop.md +0 -131
- package/docs/reference/result.md +0 -94
- package/docs/scaffolding-agents.md +0 -135
- package/docs/skills/index.md +0 -26
- package/docs/storage.md +0 -172
- package/docs/templates/agents-md.md +0 -110
- package/docs/templates/code-wiki.md +0 -96
- package/docs/templates/demo.md +0 -85
- package/docs/templates/grokbot-agents.md +0 -53
- package/docs/templates/security-help.md +0 -70
- package/src/client.ts +0 -23
- package/src/internal/tenant-slack/relay.ts +0 -203
- package/templates/pr-autofixer/agent/storage.ts +0 -7
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{_ as y,s as Nt,g as zt,t as At,q as Xt,a as Ct,b as Et,l as et,L as Tt,e as Yt,A as Bt,c as H,i as Rt}from"../app.DxTdhphC.js";import{p as Ft}from"./chunk-4BX2VUAB.BK2rKt6W.js";import{p as Ot}from"./wardley-RL74JXVD.WRXz-Dux.js";import"./framework.BNw1pucY.js";import"./theme.B_7J9ZsV.js";import"./min.DNgXoouU.js";import"./baseUniq.r7UVVRBP.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),It=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,X=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,X,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=It(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await Ot("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},R,Dt=(R=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(R,"WardleyBuilder"),R),P=new Dt;function L(a){const r=H();return Rt(a.trim(),r)}y(L,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:L(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?L(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:L(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:L(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:L(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=L(a.xLabel)),a.yLabel&&(r.yLabel=L(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>L(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:Xt,getDiagramTitle:At,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,X,M,b,N;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((X=a.wardley)==null?void 0:X.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
|
|
2
|
+
`+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),X=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,N=Tt(r);N.selectAll("*").remove(),Yt(N,b,M,o.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${b}`);const S=N.append("g").attr("class","wardley-map"),j=N.append("defs");j.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const F=M-o.padding*2,O=b-o.padding*2;X&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(X);const C=y(t=>o.padding+t/100*F,"projectX"),E=y(t=>b-o.padding-t/100*O,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+F/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+O/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+O/2})`).text(bt);const I=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(I.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===I.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/I.length;I.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}I.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*F,f=o.padding+l.end*F,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-O*s).attr("y2",b-o.padding-O*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const A=(p+l)/2;$.x=A,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,A=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${A} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const z=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));z.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=z.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),z.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),z.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const A=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(A)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Lt=G.getBBox();$=Math.max($,Lt.height)});const A=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-A,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",A).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
|
|
3
|
+
M ${s} ${i-l/2}
|
|
4
|
+
L ${s+p-x} ${i-l/2}
|
|
5
|
+
L ${s+p-x} ${i-l/2-8}
|
|
6
|
+
L ${s+p} ${i}
|
|
7
|
+
L ${s+p-x} ${i+l/2+8}
|
|
8
|
+
L ${s+p-x} ${i+l/2}
|
|
9
|
+
L ${s} ${i+l/2}
|
|
10
|
+
Z
|
|
11
|
+
`;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}if(g.deaccelerators.length>0){const t=S.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
|
|
12
|
+
M ${s+p} ${i-l/2}
|
|
13
|
+
L ${s+x} ${i-l/2}
|
|
14
|
+
L ${s+x} ${i-l/2-8}
|
|
15
|
+
L ${s} ${i}
|
|
16
|
+
L ${s+x} ${i+l/2+8}
|
|
17
|
+
L ${s+x} ${i+l/2}
|
|
18
|
+
L ${s+p} ${i+l/2}
|
|
19
|
+
Z
|
|
20
|
+
`;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}},"draw"),Vt={draw:_t},re={parser:at,db:Gt,renderer:Vt,styles:y(()=>"","styles")};export{re as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{_ as a,s as gi,g as xi,t as Xt,q as di,a as fi,b as pi,l as Yt,L as mi,e as yi,A as bi,F as _t,H as Nt,I as Ai,a1 as wi,i as Ci,aC as Si,a9 as Wt}from"../app.DxTdhphC.js";import{i as _i}from"./init.Gi6I4Gst.js";import{o as ki}from"./ordinal.DBvzRdQf.js";import{l as zt}from"./linear.BJmssyhN.js";import"./framework.BNw1pucY.js";import"./theme.B_7J9ZsV.js";import"./defaultLocale.C4B-KCzX.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
|
+
`+D.showPosition()+`
|
|
3
|
+
Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in C)this[r]=C[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),r=0;r<C.length;r++)if(g=this._input.match(this.rules[C[r]]),g&&(!c||g[0].length>c[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,C[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,C[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,C){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F}();V.lexer=k;function H(){this.yy={}}return a(H,"Parser"),H.prototype=V,V.Parser=H,new H}();At.parser=At;var Ti=At;function wt(e){return e.type==="bar"}a(wt,"isBarPlot");function kt(e){return e.type==="band"}a(kt,"isBandAxisData");function j(e){return e.type==="linear"}a(j,"isLinearAxisData");var Q,Ht=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=Si(n,1,o),p=u?u.width:o.length*i,f=u?u.height:i;s.width=Math.max(s.width,p),s.height=Math.max(s.height,f)}return n.remove(),s}},a(Q,"TextDimensionCalculatorWithFont"),Q),Ot=.7,Ft=.2,K,Ut=(K=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(K,"BaseAxis"),K),Z,Di=(Z=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=bt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Yt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Z,"BandAxis"),Z),J,vi=(J=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(J,"LinearAxis"),J);function Ct(e,t,i,s){const n=new Ht(s);return kt(e)?new Di(t,i,e.categories,e.title,n):new vi(t,i,[e.min,e.max],e.title,n)}a(Ct,"getAxis");var tt,Pi=(tt=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(tt,"ChartTitle"),tt);function $t(e,t,i,s){const n=new Ht(s);return new Pi(n,e,t,i)}a($t,"getChartTitleComponent");var it,Li=(it=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Wt().y(s=>s[0]).x(s=>s[1])(t):i=Wt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(it,"LinePlot"),it),et,Ei=(et=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(et,"BarPlot"),et),st,Ii=(st=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Li(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(st,"BasePlot"),st);function qt(e,t,i){return new Ii(e,t,i)}a(qt,"getPlotComponent");var nt,Mi=(nt=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:qt(t,i,s),xAxis:Ct(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Ct(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:o,height:u});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=p.width,t-=p.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(f=>wt(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:u,height:p});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=f.height,o=s+f.height,t>0&&(u+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:p}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>wt(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(nt,"Orchestrator"),nt),at,Vi=(at=class{static build(t,i,s,n){return new Mi(t,i,s,n).getDrawableElement()}},a(at,"XYChartBuilder"),at),ot=0,Gt,ht=Dt(),lt=Tt(),A=vt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1;function Tt(){const e=wi(),t=_t();return Nt(e.xyChart,t.themeVariables.xyChart)}a(Tt,"getChartDefaultThemeConfig");function Dt(){const e=_t();return Nt(Ai.xyChart,e.xyChart)}a(Dt,"getChartDefaultConfig");function vt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(vt,"getChartDefaultData");function dt(e){const t=_t();return Ci(e.trim(),t)}a(dt,"textSanitizer");function jt(e){Gt=e}a(jt,"setTmpSVGG");function Qt(e){e==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}a(Qt,"setOrientation");function Kt(e){A.xAxis.title=dt(e.text)}a(Kt,"setXAxisTitle");function Pt(e,t){A.xAxis={type:"linear",title:A.xAxis.title,min:e,max:t},xt=!0}a(Pt,"setXAxisRangeData");function Zt(e){A.xAxis={type:"band",title:A.xAxis.title,categories:e.map(t=>dt(t.text))},xt=!0}a(Zt,"setXAxisBand");function Jt(e){A.yAxis.title=dt(e.text)}a(Jt,"setYAxisTitle");function ti(e,t){A.yAxis={type:"linear",title:A.yAxis.title,min:e,max:t},Rt=!0}a(ti,"setYAxisRangeData");function ii(e){const t=Math.min(...e),i=Math.max(...e),s=j(A.yAxis)?A.yAxis.min:1/0,n=j(A.yAxis)?A.yAxis.max:-1/0;A.yAxis={type:"linear",title:A.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ii,"setYAxisRangeFromPlotData");function Lt(e){let t=[];if(e.length===0)return t;if(!xt){const i=j(A.xAxis)?A.xAxis.min:1/0,s=j(A.xAxis)?A.xAxis.max:-1/0;Pt(Math.min(i,1),Math.max(s,e.length))}if(Rt||ii(e),kt(A.xAxis)&&(t=A.xAxis.categories.map((i,s)=>[i,e[s]])),j(A.xAxis)){const i=A.xAxis.min,s=A.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,p)=>[u,e[p]])}return t}a(Lt,"transformDataWithoutCategory");function Et(e){return St[e===0?0:e%St.length]}a(Et,"getPlotColorFromPalette");function ei(e,t){const i=Lt(t);A.plots.push({type:"line",strokeFill:Et(ot),strokeWidth:2,data:i}),ot++}a(ei,"setLineData");function si(e,t){const i=Lt(t);A.plots.push({type:"bar",fill:Et(ot),data:i}),ot++}a(si,"setBarData");function ni(){if(A.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return A.title=Xt(),Vi.build(ht,A,lt,Gt)}a(ni,"getDrawableElem");function ai(){return lt}a(ai,"getChartThemeConfig");function ri(){return ht}a(ri,"getChartConfig");function oi(){return A}a(oi,"getXYChartData");var Bi=a(function(){bi(),ot=0,ht=Dt(),A=vt(),lt=Tt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1},"clear"),Wi={getDrawableElem:ni,clear:Bi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:di,getDiagramTitle:Xt,getAccDescription:xi,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:Pt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:jt,getChartThemeConfig:ai,getChartConfig:ri,getXYChartData:oi},zi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig(),p=n.getXYChartData().plots[0].data.map(m=>m[1]);function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function T(m){return m==="left"?"start":m==="right"?"end":"middle"}a(T,"getTextAnchor");function P(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(P,"getTextTransformation"),Yt.debug(`Rendering xychart chart
|
|
7
|
+
`+e);const _=mi(t),y=_.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(_,u.height,u.width,!0),_.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));const v=n.getDrawableElem(),L={};function I(m){let R=y,l="";for(const[W]of m.entries()){let O=y;W>0&&L[l]&&(O=L[l]),l+=m[W],R=L[l],R||(R=L[l]=O.append("g").attr("class",m[W]))}return R}a(I,"getGroup");for(const m of v){if(m.data.length===0)continue;const R=I(m.groupTexts);switch(m.type){case"rect":if(R.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(w,V){const{data:k,label:H}=w;return V*H.length*O<=k.width-X};a(W,"fitsHorizontally");const O=.7,X=10,Y=m.data.map((w,V)=>({data:w,label:p[V].toString()})).filter(w=>w.data.width>0&&w.data.height>0),S=Y.map(w=>{const{data:V}=w;let k=V.height*.7;for(;!W(w,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...S)),b=a(w=>l?w.data.x+w.data.width+X:w.data.x+w.data.width-X,"determineLabelXPosition");R.selectAll("text").data(Y).enter().append("text").attr("x",b).attr("y",w=>w.data.y+w.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(w=>w.label)}else{let W=function(b,w,V){const{data:k,label:H}=b,h=w*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,C=g>=k.x&&x<=k.x+k.width,r=k.y+V+w<=k.y+k.height;return C&&r};a(W,"fitsInBar");const O=10,X=m.data.map((b,w)=>({data:b,label:p[w].toString()})).filter(b=>b.data.width>0&&b.data.height>0),Y=X.map(b=>{const{data:w,label:V}=b;let k=w.width/(V.length*.7);for(;!W(b,k,O)&&k>0;)k-=1;return k}),S=Math.floor(Math.min(...Y)),U=a(b=>l?b.data.y-O:b.data.y+O,"determineLabelYPosition");R.selectAll("text").data(X).enter().append("text").attr("x",b=>b.data.x+b.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${S}px`).text(b=>b.label)}}break;case"text":R.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>T(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":R.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:zi},qi={parser:Ti,db:Wi,renderer:Oi};export{qi as diagram};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Deployment","description":"Deploy an Agent SDK project from Git with Cursor-managed hosting, or run one secure process on your own infrastructure.","frontmatter":{"title":"Deployment","description":"Deploy an Agent SDK project from Git with Cursor-managed hosting, or run one secure process on your own infrastructure."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),n={name:"deployment.md"};function h(l,s,p,r,o,d){return i(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="deploy-the-agent-sdk" tabindex="-1">Deploy the Agent SDK <a class="header-anchor" href="#deploy-the-agent-sdk" aria-label="Permalink to "Deploy the Agent SDK""></a></h1><p>Deployment turns a pushed Agent SDK project into a stable service. Cursor-managed hosting builds the selected Git ref and operates the runtime; self-hosting gives you control of the network, process, and filesystem.</p><h2 id="choose-managed-hosting-or-self-hosting" tabindex="-1">Choose managed hosting or self-hosting <a class="header-anchor" href="#choose-managed-hosting-or-self-hosting" aria-label="Permalink to "Choose managed hosting or self-hosting""></a></h2><table tabindex="0"><thead><tr><th>Option</th><th>Use it when</th><th>You manage</th></tr></thead><tbody><tr><td>Cursor-managed hosting</td><td>You want the shortest path from Git to a running agent</td><td>Source, declared egress, secrets, and agent behavior</td></tr><tr><td>Self-hosting</td><td>You need your own network, proxy, filesystem, or process controls</td><td>The Node process, TLS, auth, secrets, state, monitoring, and upgrades</td></tr></tbody></table><p>The rest of this guide starts with managed hosting. The <a href="#self-host-securely">self-host recipe</a> uses the same project and HTTP API.</p><h2 id="deploy-from-git" tabindex="-1">Deploy from Git <a class="header-anchor" href="#deploy-from-git" aria-label="Permalink to "Deploy from Git""></a></h2><p>Commit and push the exact ref you want to run, then sign in, validate, and deploy. The command waits until the engine is running and prints the stable deployment URL.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-agent</span></span>
|
|
2
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> login</span></span>
|
|
3
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> whoami</span></span>
|
|
4
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> validate</span></span>
|
|
5
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</span></span></code></pre></div><p><code>deploy</code> reads from Git; it does not upload your working tree. Inside a checkout, it infers the HTTPS origin, current ref, agent path, and slug. Pass them explicitly when the checkout is not the source you want:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
6
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --repo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/acme/agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
7
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --ref</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
8
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --path</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> agents/weather</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
9
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p>The source repository must be available through the team's repository integration, and a nested <code>--path</code> must contain an installable Agent SDK project.</p><h2 id="add-egress-and-secrets" tabindex="-1">Add egress and secrets <a class="header-anchor" href="#add-egress-and-secrets" aria-label="Permalink to "Add egress and secrets""></a></h2><p>Declare the external hosts and secret names the agent needs. After the deployment exists, set each value at the hidden prompt and follow the CLI or dashboard instruction to redeploy.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/agent.ts</span></span>
|
|
10
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineAgent } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
11
|
+
<span class="line"></span>
|
|
12
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAgent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
13
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> hosting: {</span></span>
|
|
14
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> egressDomains: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"api.weather.example.com"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
15
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> secretNames: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"WEATHER_API_KEY"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
16
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
17
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> WEATHER_API_KEY</span></span>
|
|
18
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
|
|
19
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p>Commit secret names, never values. <code>secrets set</code> accepts names and reads values without echoing them; <code>secrets list</code> returns names and creation times only. Do not pass <code>NAME=VALUE</code>, print a secret to verify it, or put names beginning with reserved <code>CURSOR_</code> in <code>secretNames</code>.</p><p>Enter egress hosts without schemes, ports, or paths. The <a href="./guides/mcp-oauth.html">Host MCP OAuth guide</a> owns the extra secret and egress steps for OAuth-backed MCP servers.</p><h2 id="use-the-hosted-agent" tabindex="-1">Use the hosted agent <a class="header-anchor" href="#use-the-hosted-agent" aria-label="Permalink to "Use the hosted agent""></a></h2><p>The <code>--prod</code> commands authenticate through your Cursor credential and connect to the deployment directly. Open the playground, run a turn, then inspect the same session in logs.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> playground</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
|
|
20
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
21
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Forecast for Paris"</span></span>
|
|
22
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> logs</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
|
|
23
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deployment</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p>External HTTP clients use the stable alias URL and send the alias token on every request:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$AGENT_ALIAS_URL</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/v1/health"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
24
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "X-Agent-Alias-Token: </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$AGENT_ALIAS_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span></span></code></pre></div><p>The first deploy prints this token once. Store it outside terminal transcripts; it cannot be retrieved later. If it is lost or exposed, <code>agent-sdk rotate-token weather-agent</code> replaces it and invalidates the old value.</p><p><code>deployment --json</code> can include short-lived access headers, so treat that output as a credential too.</p><p>For a custom webhook whose provider cannot send the alias token, use <code>publicEndpoint()</code> only when the channel verifies the provider signature. That opens the custom channel path, not the built-in session or tool APIs. See <a href="./guides/webhooks.html">Webhooks</a>.</p><h2 id="update-the-deployment" tabindex="-1">Update the deployment <a class="header-anchor" href="#update-the-deployment" aria-label="Permalink to "Update the deployment""></a></h2><p>Push the new ref and deploy the same slug. The stable URL remains while the new generation replaces the previous one.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p>A redeploy replaces its source, Cursor-event repository list, and any egress domains supplied through CLI flags. Repass <code>--cursor-events-repo</code> and other CLI-only settings each time. Keep source-controlled egress in the <code>hosting</code> block when possible.</p><p>Use <code>agent-sdk deployment weather-agent</code> and <code>agent-sdk logs --prod --slug weather-agent</code> to inspect a rollout. The <a href="./reference/cli.html#deploy">CLI reference</a> owns <code>--no-wait</code>, multi-agent deployment, stop, and delete behavior.</p><h2 id="keep-state-across-replacements" tabindex="-1">Keep state across replacements <a class="header-anchor" href="#keep-state-across-replacements" aria-label="Permalink to "Keep state across replacements""></a></h2><p>Managed hosting persists framework-owned session, KV, and file state across normal runtime replacements. Files written elsewhere on the engine's local filesystem are disposable; use <code>ctx.host.kv</code> or <code>ctx.host.files</code> for durable application state.</p><p>Parked approvals and in-memory reminder handlers do not survive a restart. Run the turn again or recreate the reminder after a replacement.</p><h2 id="self-host-securely" tabindex="-1">Self-host securely <a class="header-anchor" href="#self-host-securely" aria-label="Permalink to "Self-host securely""></a></h2><p>Run Agent SDK under Node 22.13 or newer, never Bun. One supervised process can serve every agent under a directory while a persistent state root keeps sessions across restarts.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CURSOR_API_KEY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"<cursor-api-key>"</span></span>
|
|
25
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AGENT_SDK_BEARER_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">openssl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rand </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-hex</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 32</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)"</span></span>
|
|
26
|
+
<span class="line"></span>
|
|
27
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
28
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /srv/agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
29
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --host</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 127.0.0.1</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
30
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --port</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 3000</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
31
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --state-root</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /var/lib/agent-sdk</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
32
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bearer-token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$AGENT_SDK_BEARER_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span></span></code></pre></div><p>Before exposing the host:</p><ul><li><p>Put TLS or an authenticating proxy in front of the loopback server.</p></li><li><p>Keep <code>--bearer-token</code> on shared hosts. Use <code>--allow-anonymous</code> only behind a proxy that authenticates every caller.</p></li><li><p>Mount <code>--state-root</code> on a persistent volume outside the agent repository and back it up.</p></li><li><p>Inject credentials at startup instead of baking them into an image.</p></li><li><p>Run the process under a supervisor and enable schedules on exactly one serving process per project.</p></li></ul><p>Containers use the same command with <code>--host 0.0.0.0</code>, a mounted state volume, and an authenticating network boundary. The <a href="./reference/channels.html#auth-policies">Channels reference</a> covers per-caller and channel-specific auth.</p><h2 id="observability" tabindex="-1">Observability <a class="header-anchor" href="#observability" aria-label="Permalink to "Observability""></a></h2><p>Use <code>agent-sdk logs --prod</code> for runtime output, <a href="./guides/opentelemetry.html">OpenTelemetry</a> for traces and metrics, and <a href="./reference/sessions.html#how-do-i-inspect-a-saved-event-stream">session traces</a> for one conversation.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./reference/cli.html#deploy">CLI reference</a>: inspect, update, stop, delete, and rotate deployments</li><li><a href="./guides/github.html">GitHub</a>: Cursor-event repositories and direct webhook delivery</li><li><a href="./guides/slack.html">Slack</a>: provision a dedicated hosted Slack app</li><li><a href="./guides/mcp-oauth.html">Host MCP OAuth</a>: persist OAuth credentials across hosted replacements</li><li><a href="./troubleshooting.html">Troubleshooting</a>: diagnose failed or stale deployments</li></ul>`,43)])])}const g=e(n,[["render",h]]);export{c as __pageData,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Deployment","description":"Deploy an Agent SDK project from Git with Cursor-managed hosting, or run one secure process on your own infrastructure.","frontmatter":{"title":"Deployment","description":"Deploy an Agent SDK project from Git with Cursor-managed hosting, or run one secure process on your own infrastructure."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),n={name:"deployment.md"};function h(l,s,p,r,o,d){return i(),a("div",null,[...s[0]||(s[0]=[t("",43)])])}const g=e(n,[["render",h]]);export{c as __pageData,g as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Evals","description":"Protect agent decisions with fixed inputs, trajectory assertions, and regression checks that run locally or in CI.","frontmatter":{"title":"Evals","description":"Protect agent decisions with fixed inputs, trajectory assertions, and regression checks that run locally or in CI."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}'),t={name:"evals.md"};function l(h,s,p,k,r,d){return e(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to "Evals""></a></h1><p>An eval sends a fixed input to the real agent and checks the resulting trajectory: whether the turn succeeded, which tools ran, and what shape the answer took. Use evals to protect behavior you already understand, not to discover what the prompt should do.</p><p>Evals run real model turns and real tools. Guard external writes before running a suite against an agent that can post, merge, or deploy.</p><h2 id="protect-a-tool-decision" tabindex="-1">Protect a tool decision <a class="header-anchor" href="#protect-a-tool-decision" aria-label="Permalink to "Protect a tool decision""></a></h2><p>This smoke case asks for a PR verdict, requires the read-only inspection tool, and fails if the agent tries to approve. The CLI reports all three decisions together instead of stopping at the first miss.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// evals/readiness.eval.ts</span></span>
|
|
2
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/evals"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
3
|
+
<span class="line"></span>
|
|
4
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
5
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"smoke"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
6
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
|
7
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
8
|
+
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Is https://github.com/acme/checkout/pull/42 ready to approve?"</span></span>
|
|
9
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> );</span></span>
|
|
10
|
+
<span class="line"></span>
|
|
11
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
|
12
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"inspect_pr"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
13
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">notCalledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"approve_pr"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
14
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t.reply, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">includes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;">ready</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;">blocked</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;">approve</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>
|
|
15
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
16
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Evals live in the project-root <code>evals/</code> directory, beside <code>agent/</code>. Add the required concurrency config once:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// evals/evals.config.ts</span></span>
|
|
17
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEvalConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/evals"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
18
|
+
<span class="line"></span>
|
|
19
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEvalConfig</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
20
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maxConcurrency: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
21
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --list</span></span>
|
|
22
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --tag</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> smoke</span></span></code></pre></div><h2 id="check-answer-shape-or-quality" tabindex="-1">Check answer shape or quality <a class="header-anchor" href="#check-answer-shape-or-quality" aria-label="Permalink to "Check answer shape or quality""></a></h2><p>Prefer a deterministic shape check when the output has a contract. The failure tells you which field was wrong, and the case remains stable when the model changes its wording.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { matches } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/evals"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
23
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { z } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "zod"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
24
|
+
<span class="line"></span>
|
|
25
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> verdict</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> JSON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">parse</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t.reply </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">??</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "{}"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
26
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
27
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> verdict,</span></span>
|
|
28
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> matches</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
29
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
30
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ready: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(),</span></span>
|
|
31
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> blockers: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">array</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()),</span></span>
|
|
32
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span></span>
|
|
33
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
|
34
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Use a judge when correctness depends on meaning that a schema, regex, or known value cannot capture:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge</span></span>
|
|
35
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">factuality</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"The lint step failed on src/sidebar.ts."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
|
36
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Judge checks are tracked scores until you give them a hard gate. Configure the judge model in <code>evals.config.ts</code>. The <a href="./reference/evals.html#judges">Evals reference</a> owns grader options and severity rules.</p><h2 id="test-a-conversation-or-approval" tabindex="-1">Test a conversation or approval <a class="header-anchor" href="#test-a-conversation-or-approval" aria-label="Permalink to "Test a conversation or approval""></a></h2><p>Several <code>t.send</code> calls in one case share a session. Assertions on a returned turn inspect only that turn, while assertions on <code>t</code> inspect the whole conversation.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> first</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Inspect PR 42."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
37
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">first.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"inspect_pr"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
38
|
+
<span class="line"></span>
|
|
39
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> followUp</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Now summarize only the blockers."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
40
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">followUp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">usedNoTools</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
|
41
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(followUp.message, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">includes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;">blocker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>
|
|
42
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><p>For a tool that requires approval, the expected result is a parked turn instead of a completed one:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Apply the approved policy update."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
43
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">parked</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
|
44
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"apply_policy"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
|
|
45
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> input: { verdict: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"update"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
46
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Pair an approval case with a safe branch that calls <code>t.notCalledTool("apply_policy")</code>, so both sides of the decision stay protected.</p><h2 id="pin-realistic-inputs" tabindex="-1">Pin realistic inputs <a class="header-anchor" href="#pin-realistic-inputs" aria-label="Permalink to "Pin realistic inputs""></a></h2><p>A useful eval changes only when the agent changes. Freeze canonical chat prompts, seed workspace evidence directly, and save webhook payloads instead of depending on a developer's checkout or live external state.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Review pr/diff.patch and report blockers."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
|
|
47
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> workspaceFiles: {</span></span>
|
|
48
|
+
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "pr/diff.patch"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
|
49
|
+
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "diff --git a/app/routes/search.ts b/app/routes/search.ts"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
50
|
+
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "+res.send(\`<h1>Results for \${req.query.q}</h1>\`);"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
51
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ].</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">join</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">),</span></span>
|
|
52
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
53
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>For GitHub agents, snapshot a PR into committed fixtures:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> github</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> acme/checkout#42</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
54
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --events</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '*'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
55
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dry-run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
56
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --out</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> fixtures/github</span></span></code></pre></div><p>Keep a small, fast <code>smoke</code> set for every change. Put larger datasets and drift-prone live cases behind an explicit selection. See <a href="./reference/evals.html#datasets-and-fixtures">Datasets and fixtures</a> for loaders and case expansion.</p><h2 id="run-and-debug-a-regression-suite" tabindex="-1">Run and debug a regression suite <a class="header-anchor" href="#run-and-debug-a-regression-suite" aria-label="Permalink to "Run and debug a regression suite""></a></h2><p>Run one case while iterating, then the smoke suite before review. A failure artifact records the input, assertions, tool calls, and final text, making it the first place to look before changing the prompt.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> readiness</span></span>
|
|
57
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --tag</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> smoke</span></span>
|
|
58
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span></span></code></pre></div><p>By default, results land under <code>evals/<stamp>/</code> in the project state directory. Open <code>evals/<case-id>.json</code> inside that run directory for the failed case. This artifact location is independent of <code>--state-root</code>; pass <code>--artifacts <dir></code> to choose another destination.</p><p>Model turns need a credential. Resolution checks <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then a saved <code>agent-sdk login</code>. <code>eval --list</code> only discovers cases and needs none.</p><h2 id="run-evals-in-ci" tabindex="-1">Run evals in CI <a class="header-anchor" href="#run-evals-in-ci" aria-label="Permalink to "Run evals in CI""></a></h2><p>Write machine-readable output and JUnit annotations, then let a failed gate fail the job:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># CURSOR_API_KEY comes from the CI secret store.</span></span>
|
|
59
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-stream</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
60
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --junit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reports/evals.xml</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
61
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --artifacts</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reports/evals</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
62
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reports/evals.json</span></span></code></pre></div><p>Run <code>--tag smoke</code> on pull requests and the full suite on a schedule when cost or latency makes every-push coverage impractical. Use soft scores for a new probabilistic benchmark until its threshold is trustworthy.</p><p>The <a href="./reference/cli.html#eval">CLI reference</a> covers selectors, hosted runs, exit codes, and JSON output.</p><h2 id="keep-side-effects-out-of-eval-sessions" tabindex="-1">Keep side effects out of eval sessions <a class="header-anchor" href="#keep-side-effects-out-of-eval-sessions" aria-label="Permalink to "Keep side effects out of eval sessions""></a></h2><p>Eval sessions carry <code>purpose: "eval"</code>. Check it at the deterministic write boundary and return the decision without performing the external action:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">async </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ findings }, ctx) {</span></span>
|
|
63
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (ctx.session.purpose </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "eval"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
|
64
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
65
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> posted: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
66
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> reason: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"eval"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
67
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> count: findings.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">length</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
68
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> };</span></span>
|
|
69
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
70
|
+
<span class="line"></span>
|
|
71
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> postFindings</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(findings);</span></span>
|
|
72
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>This preserves the tool call in the trajectory, so the eval can still assert that the agent chose to post.</p><h2 id="evals-hooks-or-hillclimbing" tabindex="-1">Evals, hooks, or hillclimbing? <a class="header-anchor" href="#evals-hooks-or-hillclimbing" aria-label="Permalink to "Evals, hooks, or hillclimbing?""></a></h2><p>Use an eval to gate one fixed input. Use a <a href="./reference/hooks.html">hook</a> to observe every live session for metrics, auditing, or alerts. Use <a href="./hillclimbing.html">hillclimbing</a> to decide which source change improves a fixed set of inputs; every kept hillclimb change should add an eval.</p><h2 id="gates-and-scores" tabindex="-1">Gates and scores <a class="header-anchor" href="#gates-and-scores" aria-label="Permalink to "Gates and scores""></a></h2><p><code>t.succeeded()</code>, tool assertions, and deterministic checks are hard gates by default. A failed gate fails the case. <code>.soft()</code> records a measurement without blocking, while <code>.atLeast(threshold)</code> records a score and marks a miss as <code>scored</code>.</p><p>Start with decisions and output shape: the intended tool, the tempting wrong tool, and one structural check. Exact prose is rarely a stable contract.</p><h2 id="keep-improvements-with-regression-evals" tabindex="-1">Keep improvements with regression evals <a class="header-anchor" href="#keep-improvements-with-regression-evals" aria-label="Permalink to "Keep improvements with regression evals""></a></h2><p>Every kept improvement needs an eval that would have failed before the change. A tool-choice gate, bounded <code>maxToolCalls</code>, or output-shape check turns the improvement into a durable contract.</p><p>Never weaken an existing gate to make a new implementation pass. That moves the freeze line instead of proving the change.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./reference/evals.html">Evals reference</a>: complete authoring and runner contracts</li><li><a href="./../skills/evals/SKILL.html"><code>skills/evals/SKILL.md</code></a>: author and seed cases with a coding agent</li><li><a href="./hillclimbing.html">Hillclimbing</a>: measure a change and lock the win</li><li><a href="./reference/sessions.html">Sessions</a>: events available to trajectory assertions</li></ul>`,51)])])}const E=i(t,[["render",l]]);export{c as __pageData,E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Evals","description":"Protect agent decisions with fixed inputs, trajectory assertions, and regression checks that run locally or in CI.","frontmatter":{"title":"Evals","description":"Protect agent decisions with fixed inputs, trajectory assertions, and regression checks that run locally or in CI."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}'),t={name:"evals.md"};function l(h,s,p,k,r,d){return e(),a("div",null,[...s[0]||(s[0]=[n("",51)])])}const E=i(t,[["render",l]]);export{c as __pageData,E as default};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{_ as e,c as a,o as t,a3 as i}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools.","frontmatter":{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),n={name:"guides/agent-to-agent.md"};function l(o,s,h,p,r,d){return t(),a("div",null,[...s[0]||(s[0]=[i(`<h1 id="agent-to-agent" tabindex="-1">Agent-to-agent <a class="header-anchor" href="#agent-to-agent" aria-label="Permalink to "Agent-to-agent""></a></h1><p>A peer connection lets one agent ask another agent on the same host for help. The specialist keeps its own instructions, tools, and session, while the caller decides when to delegate and returns the answer to the user.</p><h2 id="how-do-i-wire-two-agents" tabindex="-1">How do I wire two agents? <a class="header-anchor" href="#how-do-i-wire-two-agents" aria-label="Permalink to "How do I wire two agents?""></a></h2><p>Put both projects under one directory, then point the concierge at the specialist's mount slug. When a user asks about weather, the concierge calls the peer's <code>ask</code> tool, the weather agent runs in its own context, and the concierge returns that answer.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agents/</span></span>
|
|
2
|
+
<span class="line"><span> concierge/</span></span>
|
|
3
|
+
<span class="line"><span> agent/instructions.md</span></span>
|
|
4
|
+
<span class="line"><span> agent/mcp-connections/weather.ts</span></span>
|
|
5
|
+
<span class="line"><span> weather-agent/</span></span>
|
|
6
|
+
<span class="line"><span> agent/agent.ts</span></span>
|
|
7
|
+
<span class="line"><span> agent/instructions.md</span></span></code></pre></div><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agents/concierge/agent/mcp-connections/weather.ts</span></span>
|
|
8
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/connections"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
9
|
+
<span class="line"></span>
|
|
10
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
11
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agent: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"weather-agent"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
12
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Delegate weather questions to the weather specialist."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
13
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Give the concierge a narrow routing rule:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">When a request needs current weather, ask the </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\`weather\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> peer. Return its</span></span>
|
|
14
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">answer without delegating the same request again.</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./agents</span></span>
|
|
15
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chat</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/concierge</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
16
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "What's the weather in Paris right now?"</span></span></code></pre></div><p>The connection filename becomes the MCP server name. The <code>agent</code> value is the specialist's mount slug, normally its directory name.</p><h2 id="continue-the-specialist-s-conversation" tabindex="-1">Continue the specialist's conversation <a class="header-anchor" href="#continue-the-specialist-s-conversation" aria-label="Permalink to "Continue the specialist's conversation""></a></h2><p>The first <code>ask</code> returns a peer <code>sessionId</code>. Pass that ID into the next <code>ask</code> when the specialist should remember its earlier work instead of starting with fresh context.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
|
17
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "message"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"How does that compare with tomorrow?"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
18
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "sessionId"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"<session-id>"</span></span>
|
|
19
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The peer owns this session. Follow-ups resume its instructions and tool history without merging them into the concierge's conversation.</p><h2 id="wait-for-long-running-specialist-work" tabindex="-1">Wait for long-running specialist work <a class="header-anchor" href="#wait-for-long-running-specialist-work" aria-label="Permalink to "Wait for long-running specialist work""></a></h2><p><code>ask</code> waits for a bounded time. If the specialist is still working, it returns <code>status: "running"</code> with the session ID, allowing the caller to do other work and check again later.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
|
20
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "sessionId"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"<session-id>"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
21
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "waitSeconds"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span></span>
|
|
22
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Call the peer's <code>check</code> tool with that input. It returns the final reply when the turn settles, or another running status when more time is needed.</p><h2 id="call-a-deterministic-peer-tool" tabindex="-1">Call a deterministic peer tool <a class="header-anchor" href="#call-a-deterministic-peer-tool" aria-label="Permalink to "Call a deterministic peer tool""></a></h2><p>When the specialist has a server tool and no second model turn should make a decision, call its <code>call_tool</code> endpoint through the peer connection. This example runs <code>get_forecast</code> in the weather agent's workspace and returns its structured result to the concierge tool.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> result</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"weather"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"call_tool"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
|
|
23
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> toolName: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"get_forecast"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
24
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> input: { city: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Paris"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
25
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span>
|
|
26
|
+
<span class="line"></span>
|
|
27
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
28
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ok: result.isError </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
29
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> forecast: result.structuredContent </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">??</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
30
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span></code></pre></div><p><code>call_tool</code> appears only when the peer declares at least one deterministic server tool.</p><h2 id="peer-or-subagent" tabindex="-1">Peer or subagent? <a class="header-anchor" href="#peer-or-subagent" aria-label="Permalink to "Peer or subagent?""></a></h2><p>Use a <a href="./../reference/subagents.html">subagent</a> to split one agent's job into roles that share its project. Use a peer when the specialist is a complete agent you would also run, inspect, or expose on its own.</p><table tabindex="0"><thead><tr><th></th><th>Subagent</th><th>Peer</th></tr></thead><tbody><tr><td>Context</td><td>Child role inside one agent</td><td>Independent agent and session</td></tr><tr><td>Tools and connections</td><td>Inherits the parent project</td><td>Owns its project surface</td></tr><tr><td>Reachability</td><td>Parent only</td><td>Other co-hosted agents and MCP clients</td></tr></tbody></table><h2 id="peer-sessions" tabindex="-1">Peer sessions <a class="header-anchor" href="#peer-sessions" aria-label="Permalink to "Peer sessions""></a></h2><p>Calls through <code>ask</code> create sessions on the peer's <code>mcp</code> channel. They use the caller's authenticated principal and appear in the peer's playground, so the same authorization boundary applies to starts, follow-ups, and checks.</p><p>There is no automatic recursion guard between peers. Give each caller a one-way routing rule so agent A cannot delegate the same work to B and receive it back from B.</p><h2 id="run-peers-on-one-host" tabindex="-1">Run peers on one host <a class="header-anchor" href="#run-peers-on-one-host" aria-label="Permalink to "Run peers on one host""></a></h2><p>Peers require the default multi-agent layout and one shared <code>serve</code> process. Unknown slugs and self-references fail at startup. Cursor-managed hosting deploys one agent per slug, so use subagents there instead of peer connections.</p><p>For a self-hosted cloud-runtime caller, expose the shared process with <code>--public-url</code> and protect it with <code>--bearer-token</code>. The <a href="./../deployment.html">Deployment guide</a> owns that hosting setup.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../reference/connections.html#peer-mcp-connection">MCP connections</a>: peer configuration and connection naming</li><li><a href="./../reference/http-api.html#mcp-endpoint">MCP endpoint</a>: exact <code>ask</code>, <code>check</code>, and <code>call_tool</code> schemas</li><li><a href="./../reference/subagents.html">Subagents</a>: specialists inside one agent</li><li><a href="./../deployment.html">Deployment</a>: secure shared-host setup</li></ul>`,33)])])}const g=e(n,[["render",l]]);export{k as __pageData,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,c as a,o as t,a3 as i}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools.","frontmatter":{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),n={name:"guides/agent-to-agent.md"};function l(o,s,h,p,r,d){return t(),a("div",null,[...s[0]||(s[0]=[i("",33)])])}const g=e(n,[["render",l]]);export{k as __pageData,g as default};
|