@cursor/july 0.1.113 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channels/slack/inbound.d.ts +7 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +23 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +83 -4
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.CAeK13eM.js → app.9eAtsjAM.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.DjNBgxTF.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.C9LbPHod.js → VPLocalSearchBox.C9s69nxj.js} +1 -1
- package/dist/docs/assets/chunks/{arc.CmMq2zmS.js → arc.DmWDRaF-.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CCXB8Uj5.js → architectureDiagram-Q4EWVU46.BE1Wj4f3.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.CyQo6eLe.js → baseUniq.pmEZGnWu.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.JYq6w91N.js → blockDiagram-DXYQGD6D.D6mM-5XN.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BRV8GPJJ.js → c4Diagram-AHTNJAMY.ZQYTPC1b.js} +1 -1
- package/dist/docs/assets/chunks/channel.BNF8VK-B.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Bv4ooYQR.js → chunk-4BX2VUAB.CKJ7gaK8.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.t4JtKPcj.js → chunk-4TB4RGXK.CL61HnvB.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.34lCHj9Y.js → chunk-55IACEB6.DsA4XA1m.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BSwrPNrt.js → chunk-EDXVE4YY.BODHCHFW.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.Beeun-R-.js → chunk-FMBD7UC4.D6NBaZTa.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BUUFUcJc.js → chunk-OYMX7WX6.BLPuqFXg.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.B2XjHzN_.js → chunk-QZHKN3VN.BFs_ML8Z.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CLYG8znk.js → chunk-YZCP3GAM.BDjuFyZv.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.iViHzfrK.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.iViHzfrK.js +1 -0
- package/dist/docs/assets/chunks/clone.CJoR2BBM.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DVEa6fZp.js → cose-bilkent-S5V4N54A.D85HNEsi.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.C9PZQK-S.js → dagre-KV5264BT.V463KlSF.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DoN0uv3Y.js → diagram-5BDNPKRD.DhBDu1ab.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Czv3duqx.js → diagram-G4DWMVQ6.v6sC68zl.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BinJ5kWb.js → diagram-MMDJMWI5.DhHsdXYv.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.DW326M4K.js → diagram-TYMM5635.BPWNSFZc.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.U2pR_OA7.js → erDiagram-SMLLAGMA.Cq0wTMPL.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.ByWJXeYK.js → flowDiagram-DWJPFMVM.MveMtucC.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.OquF0Rtg.js → ganttDiagram-T4ZO3ILL.BzKfGUSf.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.Bpn01P7X.js → gitGraphDiagram-UUTBAWPF.OToXTSW_.js} +1 -1
- package/dist/docs/assets/chunks/{graph.CNRB6ETL.js → graph.D82tam-l.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.CqhknMWi.js → infoDiagram-42DDH7IO.DzFlRmcE.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.C6xpR2af.js → ishikawaDiagram-UXIWVN3A.CVPRJiKe.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Cg5f7oB3.js → journeyDiagram-VCZTEJTY.CQvNTfQC.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.Cx9YTwlU.js → kanban-definition-6JOO6SKY.BwywywUl.js} +1 -1
- package/dist/docs/assets/chunks/{layout.ljS-wFtK.js → layout.C4BkPPba.js} +1 -1
- package/dist/docs/assets/chunks/{linear.jSxNrsFC.js → linear.FoSfGKD4.js} +1 -1
- package/dist/docs/assets/chunks/{min.Cum8AlQw.js → min.yLh8jqfl.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BLiysLpe.js → mindmap-definition-QFDTVHPH.C9Dq2_CN.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BoIDyuKF.js → pieDiagram-DEJITSTG.CiGyBcES.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DLkpDytR.js → quadrantDiagram-34T5L4WZ.1FWea9nj.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DqTVqSu2.js → requirementDiagram-MS252O5E.B1q7ntiV.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CG_6FF7j.js → sankeyDiagram-XADWPNL6.Cpr4oU_k.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BIp9602K.js → sequenceDiagram-FGHM5R23.CUK68STn.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.COSXsD9I.js → stateDiagram-FHFEXIEX.zU0yL2m4.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.nV8Nl-td.js +1 -0
- package/dist/docs/assets/chunks/{theme.CXJ7PNwy.js → theme.DhnKd0CD.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CXdVqkLq.js → timeline-definition-GMOUNBTQ.CNYoXo3F.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CZxGuc4r.js → vennDiagram-DHZGUBPP.DFWH3G9s.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.3oVgfqQk.js → wardley-RL74JXVD.Do4PwzeN.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.6_irCgGJ.js → wardleyDiagram-NUSXRM2D.7WLkqM7s.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.TRPe92m3.js → xychartDiagram-5P7HB3ND.-SyUNgWw.js} +1 -1
- package/dist/docs/assets/{deployment.md.D2jQZuFx.js → deployment.md.D2YX7u_I.js} +1 -1
- package/dist/docs/assets/{guides_agent-to-agent.md.CD4T5FIl.js → guides_agent-to-agent.md.C6kPY8nu.js} +2 -2
- package/dist/docs/assets/{guides_cloud-agents.md.Cp1O3u-X.js → guides_cloud-agents.md.BPJqTZjT.js} +1 -1
- package/dist/docs/assets/{guides_grokbot-agents.md.CMhZNdEU.js → guides_grokbot-agents.md.CzV715v8.js} +1 -1
- package/dist/docs/assets/guides_hooks.md.BT9GLwEp.js +50 -0
- package/dist/docs/assets/guides_hooks.md.BT9GLwEp.lean.js +1 -0
- package/dist/docs/assets/{guides_jev.md.F5fAkkfN.js → guides_jev.md.DeSCqMaO.js} +6 -44
- package/dist/docs/assets/guides_jev.md.DeSCqMaO.lean.js +1 -0
- package/dist/docs/assets/{guides_slack.md.Bo96y42E.js → guides_slack.md.DVjNyqq5.js} +3 -3
- package/dist/docs/assets/{guides_slack.md.Bo96y42E.lean.js → guides_slack.md.DVjNyqq5.lean.js} +1 -1
- package/dist/docs/assets/reference_agent-config.md.BRxAlnRy.js +36 -0
- package/dist/docs/assets/{reference_agent-config.md.DGPyw7ms.lean.js → reference_agent-config.md.BRxAlnRy.lean.js} +1 -1
- package/dist/docs/assets/reference_artifacts.md.KRX0sAdt.js +18 -0
- package/dist/docs/assets/reference_artifacts.md.KRX0sAdt.lean.js +1 -0
- package/dist/docs/assets/reference_channels.md.DZr14vm7.js +23 -0
- package/dist/docs/assets/reference_channels.md.DZr14vm7.lean.js +1 -0
- package/dist/docs/assets/reference_cli.md.BvnQM8wd.js +97 -0
- package/dist/docs/assets/reference_cli.md.BvnQM8wd.lean.js +1 -0
- package/dist/docs/assets/{reference_connections.md.Je9dMsdd.js → reference_connections.md.DJGUCxrr.js} +18 -30
- package/dist/docs/assets/{reference_connections.md.Je9dMsdd.lean.js → reference_connections.md.DJGUCxrr.lean.js} +1 -1
- package/dist/docs/assets/{reference_evals.md.DNJzM_yf.js → reference_evals.md.C6umwNC6.js} +6 -7
- package/dist/docs/assets/reference_evals.md.C6umwNC6.lean.js +1 -0
- package/dist/docs/assets/{reference_extensions.md.Cv5aLCz_.js → reference_extensions.md.DbNYu-DP.js} +3 -3
- package/dist/docs/assets/{reference_extensions.md.Cv5aLCz_.lean.js → reference_extensions.md.DbNYu-DP.lean.js} +1 -1
- package/dist/docs/assets/reference_hooks.md.BfOkhTU0.js +45 -0
- package/dist/docs/assets/{reference_hooks.md.B7uzNENk.lean.js → reference_hooks.md.BfOkhTU0.lean.js} +1 -1
- package/dist/docs/assets/reference_http-api.md.DdwtBeCj.js +11 -0
- package/dist/docs/assets/{reference_http-api.md.CduHavZ2.lean.js → reference_http-api.md.DdwtBeCj.lean.js} +1 -1
- package/dist/docs/assets/reference_instructions.md.B2mcIzT6.js +14 -0
- package/dist/docs/assets/reference_instructions.md.B2mcIzT6.lean.js +1 -0
- package/dist/docs/assets/reference_playground.md.CyrQD_n3.js +1 -0
- package/dist/docs/assets/reference_playground.md.CyrQD_n3.lean.js +1 -0
- package/dist/docs/assets/reference_project-layout.md.BEMzxAkq.js +19 -0
- package/dist/docs/assets/{reference_project-layout.md.BGhgpy9V.lean.js → reference_project-layout.md.BEMzxAkq.lean.js} +1 -1
- package/dist/docs/assets/reference_prompt.md.BFrqjHFL.js +9 -0
- package/dist/docs/assets/reference_prompt.md.BFrqjHFL.lean.js +1 -0
- package/dist/docs/assets/reference_schedules.md.BB9N3tRR.js +47 -0
- package/dist/docs/assets/reference_schedules.md.BB9N3tRR.lean.js +1 -0
- package/dist/docs/assets/reference_sessions.md.BBp-GIt-.js +1 -0
- package/dist/docs/assets/{reference_sessions.md.1_6Vyv7x.lean.js → reference_sessions.md.BBp-GIt-.lean.js} +1 -1
- package/dist/docs/assets/reference_skills.md.BVmi3UJ_.js +15 -0
- package/dist/docs/assets/{reference_skills.md.DjQkRefx.lean.js → reference_skills.md.BVmi3UJ_.lean.js} +1 -1
- package/dist/docs/assets/reference_subagents.md.DRoRy2Uj.js +10 -0
- package/dist/docs/assets/{reference_subagents.md.Dl16gcBj.lean.js → reference_subagents.md.DRoRy2Uj.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.B1dH1lpa.js → reference_tools.md.CgocLDX1.js} +9 -6
- package/dist/docs/assets/{reference_tools.md.B1dH1lpa.lean.js → reference_tools.md.CgocLDX1.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.HY95rCCz.js +1 -0
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +37 -37
- package/dist/docs/deployment.md +1 -1
- package/dist/docs/evals.html +35 -35
- package/dist/docs/guides/agent-to-agent.html +38 -38
- package/dist/docs/guides/agent-to-agent.md +11 -12
- package/dist/docs/guides/bitbucket.html +35 -35
- package/dist/docs/guides/cloud-agents.html +36 -36
- package/dist/docs/guides/cloud-agents.md +1 -1
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +37 -37
- package/dist/docs/guides/grokbot-agents.md +1 -1
- package/dist/docs/guides/hooks.html +109 -0
- package/dist/docs/guides/hooks.md +111 -0
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +42 -80
- package/dist/docs/guides/jev.md +22 -79
- package/dist/docs/guides/mcp-oauth.html +36 -36
- package/dist/docs/guides/opentelemetry.html +35 -35
- package/dist/docs/guides/slack.html +37 -37
- package/dist/docs/guides/slack.md +7 -0
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +35 -35
- package/dist/docs/llms-full.txt +1683 -2054
- package/dist/docs/llms.txt +9 -8
- package/dist/docs/quickstart.html +35 -35
- package/dist/docs/reference/agent-config.html +42 -46
- package/dist/docs/reference/agent-config.md +48 -81
- package/dist/docs/reference/artifacts.html +39 -40
- package/dist/docs/reference/artifacts.md +71 -70
- package/dist/docs/reference/channels.html +41 -61
- package/dist/docs/reference/channels.md +134 -201
- package/dist/docs/reference/cli.html +127 -125
- package/dist/docs/reference/cli.md +685 -753
- package/dist/docs/reference/connections.html +54 -66
- package/dist/docs/reference/connections.md +92 -128
- package/dist/docs/reference/evals.html +42 -43
- package/dist/docs/reference/evals.md +42 -50
- package/dist/docs/reference/extensions.html +38 -38
- package/dist/docs/reference/extensions.md +9 -13
- package/dist/docs/reference/hooks.html +39 -67
- package/dist/docs/reference/hooks.md +72 -146
- package/dist/docs/reference/http-api.html +39 -39
- package/dist/docs/reference/http-api.md +137 -161
- package/dist/docs/reference/instructions.html +39 -39
- package/dist/docs/reference/instructions.md +21 -36
- package/dist/docs/reference/playground.html +36 -36
- package/dist/docs/reference/playground.md +26 -43
- package/dist/docs/reference/project-layout.html +38 -38
- package/dist/docs/reference/project-layout.md +12 -17
- package/dist/docs/reference/prompt.html +42 -42
- package/dist/docs/reference/prompt.md +18 -13
- package/dist/docs/reference/schedules.html +56 -91
- package/dist/docs/reference/schedules.md +52 -99
- package/dist/docs/reference/sessions.html +36 -36
- package/dist/docs/reference/sessions.md +36 -40
- package/dist/docs/reference/skills.html +38 -38
- package/dist/docs/reference/skills.md +15 -26
- package/dist/docs/reference/subagents.html +38 -38
- package/dist/docs/reference/subagents.md +20 -30
- package/dist/docs/reference/tools.html +44 -41
- package/dist/docs/reference/tools.md +45 -64
- package/dist/docs/templates/agentic-owners.html +35 -35
- package/dist/docs/templates/pr-autofixer.html +35 -35
- package/dist/docs/templates/security-reviewer.html +35 -35
- package/dist/docs/templates/thermo-quality-review.html +35 -35
- package/dist/docs/templates/thermo-review.html +35 -35
- package/dist/docs/templates/triage.html +35 -35
- package/dist/docs/troubleshooting.html +36 -36
- package/dist/docs/troubleshooting.md +1 -1
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +9 -1
- package/dist/internal/deploy-client.d.ts +6 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +3 -0
- package/dist/internal/discovery/agent-config.d.ts +3 -1
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +7 -4
- package/dist/internal/framework-storage-selection.d.ts +1 -1
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +20 -2
- package/dist/internal/reminder-runner.d.ts +79 -1
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +276 -44
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +7 -0
- package/dist/memory.d.ts +4 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +28 -4
- package/dist/playground/assets/index-DLwnR9ys.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +16 -9
- package/dist/types.d.ts.map +1 -1
- package/docs/deployment.md +1 -1
- package/docs/guides/agent-to-agent.md +11 -12
- package/docs/guides/cloud-agents.md +1 -1
- package/docs/guides/grokbot-agents.md +1 -1
- package/docs/guides/hooks.md +116 -0
- package/docs/guides/jev.md +23 -80
- package/docs/guides/slack.md +7 -0
- package/docs/reference/agent-config.md +48 -81
- package/docs/reference/artifacts.md +72 -71
- package/docs/reference/channels.md +135 -202
- package/docs/reference/cli.md +686 -754
- package/docs/reference/connections.md +93 -129
- package/docs/reference/evals.md +43 -51
- package/docs/reference/extensions.md +9 -13
- package/docs/reference/hooks.md +72 -146
- package/docs/reference/http-api.md +137 -161
- package/docs/reference/instructions.md +22 -37
- package/docs/reference/playground.md +26 -43
- package/docs/reference/project-layout.md +12 -17
- package/docs/reference/prompt.md +20 -15
- package/docs/reference/schedules.md +52 -99
- package/docs/reference/sessions.md +36 -40
- package/docs/reference/skills.md +15 -26
- package/docs/reference/subagents.md +20 -30
- package/docs/reference/tools.md +45 -64
- package/docs/troubleshooting.md +1 -1
- package/package.json +1 -1
- package/src/channels/slack/inbound.ts +24 -0
- package/src/channels/slack/slack-channel.ts +123 -1
- package/src/internal/cli-deploy.ts +12 -1
- package/src/internal/deploy-client.ts +9 -0
- package/src/internal/discovery/agent-config.ts +8 -6
- package/src/internal/framework-storage-selection.ts +1 -1
- package/src/internal/platform-timers.ts +24 -2
- package/src/internal/reminder-runner.ts +426 -63
- package/src/internal/server.ts +8 -0
- package/src/memory.ts +37 -3
- package/src/types.ts +16 -9
- package/dist/docs/assets/chunks/@localSearchIndexroot.Ck9E52Ls.js +0 -1
- package/dist/docs/assets/chunks/channel.BHiYmnZ4.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Degh8l90.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Degh8l90.js +0 -1
- package/dist/docs/assets/chunks/clone.BIywbczV.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.qrxrbFsX.js +0 -1
- package/dist/docs/assets/guides_jev.md.F5fAkkfN.lean.js +0 -1
- package/dist/docs/assets/reference_agent-config.md.DGPyw7ms.js +0 -40
- package/dist/docs/assets/reference_artifacts.md.Bu_4HmsD.js +0 -19
- package/dist/docs/assets/reference_artifacts.md.Bu_4HmsD.lean.js +0 -1
- package/dist/docs/assets/reference_channels.md.nFWbzAic.js +0 -43
- package/dist/docs/assets/reference_channels.md.nFWbzAic.lean.js +0 -1
- package/dist/docs/assets/reference_cli.md.DLWDz9ij.js +0 -95
- package/dist/docs/assets/reference_cli.md.DLWDz9ij.lean.js +0 -1
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +0 -1
- package/dist/docs/assets/reference_hooks.md.B7uzNENk.js +0 -73
- package/dist/docs/assets/reference_http-api.md.CduHavZ2.js +0 -11
- package/dist/docs/assets/reference_instructions.md.CU1My5My.js +0 -14
- package/dist/docs/assets/reference_instructions.md.CU1My5My.lean.js +0 -1
- package/dist/docs/assets/reference_playground.md.Ch2d0Iqi.js +0 -1
- package/dist/docs/assets/reference_playground.md.Ch2d0Iqi.lean.js +0 -1
- package/dist/docs/assets/reference_project-layout.md.BGhgpy9V.js +0 -19
- package/dist/docs/assets/reference_prompt.md.Ccp0R53H.js +0 -1
- package/dist/docs/assets/reference_prompt.md.Ccp0R53H.lean.js +0 -1
- package/dist/docs/assets/reference_schedules.md.B2Nm6FaD.js +0 -82
- package/dist/docs/assets/reference_schedules.md.B2Nm6FaD.lean.js +0 -1
- package/dist/docs/assets/reference_sessions.md.1_6Vyv7x.js +0 -1
- package/dist/docs/assets/reference_skills.md.DjQkRefx.js +0 -15
- package/dist/docs/assets/reference_subagents.md.Dl16gcBj.js +0 -10
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +0 -1
- package/dist/playground/assets/index-DSMAewbx.css +0 -1
- /package/dist/docs/assets/{deployment.md.D2jQZuFx.lean.js → deployment.md.D2YX7u_I.lean.js} +0 -0
- /package/dist/docs/assets/{guides_agent-to-agent.md.CD4T5FIl.lean.js → guides_agent-to-agent.md.C6kPY8nu.lean.js} +0 -0
- /package/dist/docs/assets/{guides_cloud-agents.md.Cp1O3u-X.lean.js → guides_cloud-agents.md.BPJqTZjT.lean.js} +0 -0
- /package/dist/docs/assets/{guides_grokbot-agents.md.CMhZNdEU.lean.js → guides_grokbot-agents.md.CzV715v8.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.mnfFG2Em.lean.js → troubleshooting.md.HY95rCCz.lean.js} +0 -0
- /package/dist/playground/assets/{index-De_lpFxE.js → index-CX6oTKwz.js} +0 -0
|
@@ -6,16 +6,15 @@ description: "Specialist child agents the model delegates to mid-turn, each its
|
|
|
6
6
|
# Subagents
|
|
7
7
|
|
|
8
8
|
A subagent is a specialist child agent the model can delegate to
|
|
9
|
-
mid-turn. Each one
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
`subagent.called` and `subagent.completed`.
|
|
9
|
+
mid-turn. Each one lives under `agent/subagents/<id>/` with a required
|
|
10
|
+
`agent.ts`. Add `instructions.md` or inline `instructions` in `agent.ts`
|
|
11
|
+
for a custom prompt. The parent model delegates through the `task` tool,
|
|
12
|
+
and the stream records `subagent.called` and `subagent.completed`.
|
|
14
13
|
|
|
15
14
|
```text
|
|
16
15
|
agent/subagents/researcher/
|
|
17
16
|
├── agent.ts # description (required), model (optional)
|
|
18
|
-
└── instructions.md #
|
|
17
|
+
└── instructions.md # optional custom system prompt
|
|
19
18
|
```
|
|
20
19
|
|
|
21
20
|
```ts
|
|
@@ -31,44 +30,35 @@ export default defineAgent({
|
|
|
31
30
|
|
|
32
31
|
## Subagent rules
|
|
33
32
|
|
|
34
|
-
`description` is required.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
different one.
|
|
33
|
+
`description` is required. The parent model uses it to decide whether
|
|
34
|
+
to delegate, so write it as a routing rule ("Background research: …"),
|
|
35
|
+
following the same discipline as a [skill](./skills.md) description.
|
|
36
|
+
`model` is optional; omit it to inherit the parent's model, or set it
|
|
37
|
+
to run the specialist on a different model.
|
|
40
38
|
|
|
41
39
|
Subagents inherit the parent's execution surface. Every per-subagent
|
|
42
40
|
capability directory is reported as a warning and ignored: `tools/`,
|
|
43
|
-
`skills/`, `mcp-connections
|
|
44
|
-
`
|
|
45
|
-
|
|
41
|
+
`skills/`, `extensions/`, `mcp-connections/`, `host-connections/`,
|
|
42
|
+
`channels/`, `schedules/`, `reminders/`, `hooks/`, `sandbox/`, and
|
|
43
|
+
nested `subagents/`.
|
|
46
44
|
|
|
47
45
|
Delegation needs both halves: the description makes it possible, and the
|
|
48
46
|
parent's [instructions](./instructions.md) make it happen. "When a
|
|
49
47
|
request needs background research, delegate to the `researcher`
|
|
50
|
-
subagent."
|
|
48
|
+
subagent." The parent routes; the specialist executes.
|
|
51
49
|
|
|
52
|
-
##
|
|
50
|
+
## Subagents and peers
|
|
53
51
|
|
|
54
52
|
Subagents split one job into roles inside a single agent. When the
|
|
55
53
|
specialist is independently useful, with its own tools, sessions, and
|
|
56
54
|
playground, make it a full agent. See
|
|
57
55
|
[Peer agents](../guides/agent-to-agent.md#peer-or-subagent).
|
|
58
56
|
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
Fan-out reviews: a PR-approval agent can delegate to two review
|
|
62
|
-
subagents that read a host-prepared `pr/` evidence tree and report
|
|
63
|
-
prioritized findings, which the parent embeds in its approval comment.
|
|
64
|
-
|
|
65
|
-
Keep the parent lean: a subagent with focused instructions usually
|
|
66
|
-
works better than a longer parent prompt with conditional sections. The
|
|
67
|
-
parent routes; the specialist executes.
|
|
68
|
-
|
|
69
|
-
## What's next
|
|
70
|
-
|
|
71
|
-
Continue with these pages:
|
|
57
|
+
## Related
|
|
72
58
|
|
|
73
59
|
- [Skills](./skills.md): when a procedure is enough and a child agent
|
|
74
60
|
is overkill
|
|
61
|
+
- [Peer agents](../guides/agent-to-agent.md): independently useful
|
|
62
|
+
specialists
|
|
63
|
+
- [Agent config](./agent-config.md#harness-tools): `"task"` on the
|
|
64
|
+
parent's tool allowlist
|
package/docs/reference/tools.md
CHANGED
|
@@ -8,18 +8,16 @@ description: "Define typed actions the model can call, gate the sensitive ones o
|
|
|
8
8
|
A tool is a typed action the model can call: hit an API, run a query,
|
|
9
9
|
write a file. Each file in `agent/tools/` defines one tool, and the
|
|
10
10
|
filename becomes the tool name the model sees. Tools come in two
|
|
11
|
-
execution flavors: server tools run
|
|
11
|
+
execution flavors: server tools run on the serving host, and
|
|
12
12
|
agent tools run as scripts where the agent runs. Every server tool can
|
|
13
13
|
also be called directly, with no model turn.
|
|
14
14
|
|
|
15
15
|
## Define a server tool
|
|
16
16
|
|
|
17
|
-
By default, `execute` runs
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`--cloud-tools-url` is set; without either, the server warns at startup
|
|
22
|
-
and cloud turns omit them.
|
|
17
|
+
By default, `execute` runs on the serving host with full access to
|
|
18
|
+
`process.env` and your `agent/lib/` code. Set `--public-url` or
|
|
19
|
+
`--cloud-tools-url` to make server tools available to cloud turns;
|
|
20
|
+
without either, startup warns and cloud turns omit them.
|
|
23
21
|
|
|
24
22
|
```ts
|
|
25
23
|
// agent/tools/inspect_pr.ts
|
|
@@ -178,7 +176,7 @@ check nothing.
|
|
|
178
176
|
## Define an agent tool
|
|
179
177
|
|
|
180
178
|
Set `execution: "agent"` and the tool materializes as a shell script
|
|
181
|
-
that runs where the Cursor agent runs: the local
|
|
179
|
+
that runs where the Cursor agent runs: the local session workspace or
|
|
182
180
|
the cloud VM. The script receives JSON arguments on stdin and prints its
|
|
183
181
|
result on stdout. Use this flavor when the tool must run next to the
|
|
184
182
|
checkout the agent works in; on cloud, server tools stay available too
|
|
@@ -201,23 +199,16 @@ printf '%s\\n' "$message"
|
|
|
201
199
|
```
|
|
202
200
|
|
|
203
201
|
On the local runtime, scripts land in the session workspace with a
|
|
204
|
-
catalog in `AGENTS.md`.
|
|
205
|
-
on the first prompt.
|
|
202
|
+
catalog in `AGENTS.md`.
|
|
206
203
|
|
|
207
204
|
## Tools from an MCP connection, advertised by name
|
|
208
205
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
local turn. See
|
|
216
|
-
[MCP Connections](connections.md#advertise-tools).
|
|
217
|
-
Advertised tools ride the same execution path as authored server tools,
|
|
218
|
-
and [direct tool calls](#call-a-tool-without-a-model-turn) address them
|
|
219
|
-
by the same model-facing names: the call's session identity resolves the
|
|
220
|
-
advertised listing when the authored lookup misses.
|
|
206
|
+
Set `advertiseTools: true` on a connection to expose its MCP tools by
|
|
207
|
+
name. Add per-session `auth` when credentials depend on the caller.
|
|
208
|
+
Model calls and [direct tool calls](#call-a-tool-without-a-model-turn)
|
|
209
|
+
use the same exposed names. See
|
|
210
|
+
[MCP connections](./connections.md#advertise-tools) for the full
|
|
211
|
+
contract.
|
|
221
212
|
|
|
222
213
|
## Gate a tool on human approval
|
|
223
214
|
|
|
@@ -248,8 +239,8 @@ runtime only, and parked calls don't survive a host restart.
|
|
|
248
239
|
## Call a tool without a model turn
|
|
249
240
|
|
|
250
241
|
Server tools can be called deterministically. You pick the tool and the
|
|
251
|
-
input. Validation and execution
|
|
252
|
-
|
|
242
|
+
input. Validation and execution match a model-initiated call, and no
|
|
243
|
+
Cursor API key is needed.
|
|
253
244
|
|
|
254
245
|
Over HTTP, with the same auth chain as the session API:
|
|
255
246
|
|
|
@@ -275,51 +266,43 @@ agent-sdk call inspect_pr \
|
|
|
275
266
|
Programmatically, `callTool(toolName, input, options?)` is available on
|
|
276
267
|
the serve handle, on channel route handlers and `onStart` args, and on
|
|
277
268
|
schedule `run` handlers, so a channel can mix deterministic calls with
|
|
278
|
-
model turns
|
|
279
|
-
the review prompt:
|
|
269
|
+
model turns:
|
|
280
270
|
|
|
281
271
|
```ts
|
|
282
272
|
const outcome = await handle.callTool("inspect_pr", {
|
|
283
273
|
prUrl: "https://github.com/acme/checkout/pull/42",
|
|
284
274
|
});
|
|
275
|
+
if (outcome.isError) {
|
|
276
|
+
return outcome;
|
|
277
|
+
}
|
|
285
278
|
// { toolName, callId, isError, result, durationMs }
|
|
286
279
|
```
|
|
287
280
|
|
|
288
|
-
|
|
289
|
-
when the call returns. Pass
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
`
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
whose tools resolve state from the continuation key can serve it with
|
|
314
|
-
no live session. Malformed tokens are rejected with
|
|
315
|
-
`400 invalid_continuation_token`.
|
|
316
|
-
|
|
317
|
-
The error semantics match the model path. Unknown tools are rejected
|
|
318
|
-
with the available names, agent-execution tools cannot be called on the
|
|
319
|
-
host (`400`), schema-invalid input is a `400` before the tool body runs
|
|
320
|
-
(Zod validates; plain JSON Schema passes through unvalidated), and a
|
|
321
|
-
tool body that throws reports `isError: true` in the same envelope the
|
|
322
|
-
model would see.
|
|
281
|
+
Omit both identifiers to run against an ephemeral workspace that is
|
|
282
|
+
removed when the call returns. Pass `sessionId` (HTTP body, `--session`,
|
|
283
|
+
or `options.sessionId`) or `continuationToken` (`<channelId>:<key>` as
|
|
284
|
+
`/v1/sessions` lists it) to bind the call. The two are mutually
|
|
285
|
+
exclusive.
|
|
286
|
+
|
|
287
|
+
| Rule | What happens |
|
|
288
|
+
| --- | --- |
|
|
289
|
+
| Existing `sessionId`, or a token that maps to an existing session | Session workspace, owner check, and event recording |
|
|
290
|
+
| Token with no matching session | Scratch workspace; the token's channel id and key are the call identity |
|
|
291
|
+
| Busy session, `effect: "read"` (or an advertised MCP tool marked read-only) | Runs alongside the turn, reading the workspace as the turn left it; recorded under its own `turnId` |
|
|
292
|
+
| Busy session, write or undeclared | `409 session_busy` until the turn finishes |
|
|
293
|
+
| Session workspace cannot be created, read | Scratch workspace; the outcome has `scratchWorkspace: true` |
|
|
294
|
+
| Session workspace cannot be created, write | `500 workspace_unavailable` |
|
|
295
|
+
|
|
296
|
+
| Error | When |
|
|
297
|
+
| --- | --- |
|
|
298
|
+
| `404 unknown_tool` | Name is not a callable server tool; the response lists available names |
|
|
299
|
+
| `400 tool_not_callable` | Agent-execution tools cannot run on the host |
|
|
300
|
+
| `400 invalid_tool_input` | Zod rejected the input before `execute`. Plain JSON Schema is forwarded unvalidated |
|
|
301
|
+
| `400 invalid_continuation_token` | Malformed token, or passed together with `sessionId` |
|
|
302
|
+
| `404 session_not_found` | `sessionId` does not exist |
|
|
303
|
+
| `409 session_busy` | Write-effect call while a model turn is running |
|
|
304
|
+
| `500 workspace_unavailable` | Write-effect call when the session workspace cannot be created |
|
|
305
|
+
| `isError: true` | The tool body threw; same envelope the model would see |
|
|
323
306
|
|
|
324
307
|
## Design habits
|
|
325
308
|
|
|
@@ -337,9 +320,7 @@ wrong, no instruction change fixes it.
|
|
|
337
320
|
Gate side effects with `needsApproval`. Declare each tool's `effect` so
|
|
338
321
|
dry-run sessions can execute reads and stub writes.
|
|
339
322
|
|
|
340
|
-
##
|
|
341
|
-
|
|
342
|
-
Continue with these pages:
|
|
323
|
+
## Related
|
|
343
324
|
|
|
344
325
|
- [MCP connections](./connections.md): tools that come from MCP servers
|
|
345
326
|
instead
|
package/docs/troubleshooting.md
CHANGED
|
@@ -32,7 +32,7 @@ Match the visible symptom below. If `agent-sdk` is not on `PATH`, use
|
|
|
32
32
|
| File reads and greps fail repeatedly with `NGHTTP2_FRAME_SIZE_ERROR` | Run the agent under Node 22.13 or newer, never Bun. |
|
|
33
33
|
| The turn immediately reports a missing API key | Set `CURSOR_API_KEY`, `CURSOR_API_KEY_FILE`, or `CURSOR_SERVICE_ACCOUNT_KEY`, or run `agent-sdk login`. |
|
|
34
34
|
| Login succeeds but the model host rejects the key | Point login and model traffic at the same API host; check `CURSOR_API_BASE_URL` and `CURSOR_BACKEND_URL`. |
|
|
35
|
-
| Cloud turns cannot reach local tools or skills | Give the cloud runtime a reachable `--public-url` and protected tool bridge, or move the required capability into the cloud checkout. See [agent runtime](./reference/agent-config.md#
|
|
35
|
+
| Cloud turns cannot reach local tools or skills | Give the cloud runtime a reachable `--public-url` and protected tool bridge, or move the required capability into the cloud checkout. See [agent runtime](./reference/agent-config.md#runtime). |
|
|
36
36
|
|
|
37
37
|
## A turn behaves unexpectedly
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cursor/july",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -218,6 +218,30 @@ export function parseAssistantThreadStarted(
|
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
/**
|
|
222
|
+
* The receiving app's own bot user id from an Events API envelope. Slack
|
|
223
|
+
* stamps `authorizations[]` on every `event_callback` with the installed
|
|
224
|
+
* bot user the delivery is for, so a hosted guest learns its identity from
|
|
225
|
+
* the verified body without an `auth.test` round trip.
|
|
226
|
+
*/
|
|
227
|
+
export function parseEventBodyBotUserId(body: unknown): string | undefined {
|
|
228
|
+
const root = asRecord(body);
|
|
229
|
+
if (root === null || root.type !== "event_callback") {
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
if (!Array.isArray(root.authorizations)) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
for (const entry of root.authorizations) {
|
|
236
|
+
const authorization = asRecord(entry);
|
|
237
|
+
const userId = asString(authorization?.user_id);
|
|
238
|
+
if (userId !== undefined && userId !== "") {
|
|
239
|
+
return userId;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return undefined;
|
|
243
|
+
}
|
|
244
|
+
|
|
221
245
|
/**
|
|
222
246
|
* Parse DM / IM messages. More generous than a strict channel_type check:
|
|
223
247
|
* accepts `channel_type === "im"` or channel ids starting with `D`, and
|
|
@@ -25,10 +25,12 @@ import {
|
|
|
25
25
|
} from "../../internal/continuation-identity.js";
|
|
26
26
|
import { AGENT_SERVE_GENERATION_ENV_VAR } from "../../internal/cursor-relay-core.js";
|
|
27
27
|
import { attachHostedAdmissionAdapter } from "../../internal/hosted-admission-adapter.js";
|
|
28
|
+
import type { HostedAdmissionPlatformHandoff } from "../../internal/hosted-delivery-protocol.js";
|
|
28
29
|
import type {
|
|
29
30
|
ArtifactsApi,
|
|
30
31
|
ChannelDefinition,
|
|
31
32
|
ChannelEventHandlers,
|
|
33
|
+
ChannelHandlerArgs,
|
|
32
34
|
HostContext,
|
|
33
35
|
JsonValue,
|
|
34
36
|
ReceiveInput,
|
|
@@ -68,6 +70,10 @@ import {
|
|
|
68
70
|
slackWakeChannelState,
|
|
69
71
|
} from "./dispatch.js";
|
|
70
72
|
import { createEventIdDedupe, type EventIdDedupe } from "./event-id-dedupe.js";
|
|
73
|
+
import {
|
|
74
|
+
parseChannelMessageEvent,
|
|
75
|
+
parseEventBodyBotUserId,
|
|
76
|
+
} from "./inbound.js";
|
|
71
77
|
import {
|
|
72
78
|
dispatchBlockAction,
|
|
73
79
|
dispatchInteractiveFromPayload,
|
|
@@ -245,6 +251,113 @@ export function slackChannel(
|
|
|
245
251
|
let channelWatch: ChannelPostWatcher | undefined;
|
|
246
252
|
let botMentionGate: SlackBotMentionGate | undefined;
|
|
247
253
|
|
|
254
|
+
// Hosted admission never runs the Socket Mode branch of `onStart`, so the
|
|
255
|
+
// channel watch is built per delivery there. The allowlist and its `#name`
|
|
256
|
+
// resolution are shared across the pod; the bot's identity comes from the
|
|
257
|
+
// verified envelope.
|
|
258
|
+
let hostedAllowlist: SlackChannelAllowlist | undefined;
|
|
259
|
+
let hostedAllowlistReady: Promise<void> | undefined;
|
|
260
|
+
|
|
261
|
+
async function resolveHostedAllowlistNames(
|
|
262
|
+
allowlist: SlackChannelAllowlist
|
|
263
|
+
): Promise<void> {
|
|
264
|
+
const names = allowlist.unresolvedNames();
|
|
265
|
+
if (names.length === 0) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
try {
|
|
269
|
+
const botToken = await tryResolveBotToken(credentials);
|
|
270
|
+
if (botToken === undefined) {
|
|
271
|
+
getLog().error("channel watch setup degraded", {
|
|
272
|
+
error: "no bot token; #name entries stay unresolved",
|
|
273
|
+
});
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const { WebClient } = await import("@slack/web-api");
|
|
277
|
+
allowlist.applyResolvedNames(
|
|
278
|
+
await resolveChannelNames(new WebClient(botToken), names, getLog())
|
|
279
|
+
);
|
|
280
|
+
} catch (error) {
|
|
281
|
+
getLog().error("channel watch setup degraded", {
|
|
282
|
+
error: error instanceof Error ? error.message : String(error),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Only a channel post needs the watcher, so mentions and DMs never wait on
|
|
289
|
+
* it, and a channel already matched by id never waits on `#name` resolution.
|
|
290
|
+
*/
|
|
291
|
+
async function hostedChannelWatch(
|
|
292
|
+
payload: unknown,
|
|
293
|
+
args: ChannelHandlerArgs,
|
|
294
|
+
platformHandoff: HostedAdmissionPlatformHandoff | undefined
|
|
295
|
+
): Promise<ChannelPostWatcher | undefined> {
|
|
296
|
+
if (channelPosts === undefined) {
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
const channelEvent = parseChannelMessageEvent(payload, {
|
|
300
|
+
includeBotAuthored: true,
|
|
301
|
+
});
|
|
302
|
+
if (channelEvent === null || channelEvent.kind === "deleted") {
|
|
303
|
+
return undefined;
|
|
304
|
+
}
|
|
305
|
+
hostedAllowlist ??= new SlackChannelAllowlist(channelPosts.allow);
|
|
306
|
+
if (
|
|
307
|
+
!hostedAllowlist.matches(channelEvent.message.channelId) &&
|
|
308
|
+
hostedAllowlist.unresolvedNames().length > 0
|
|
309
|
+
) {
|
|
310
|
+
hostedAllowlistReady ??= resolveHostedAllowlistNames(hostedAllowlist);
|
|
311
|
+
await hostedAllowlistReady;
|
|
312
|
+
}
|
|
313
|
+
const botUserId = parseEventBodyBotUserId(payload);
|
|
314
|
+
return createChannelPostWatcher({
|
|
315
|
+
// Admission answers before a debounce timer could fire; edits arrive
|
|
316
|
+
// as their own deliveries and the edge drops them.
|
|
317
|
+
options: { ...channelPosts, debounceMs: 0 },
|
|
318
|
+
allowlist: hostedAllowlist,
|
|
319
|
+
getBotUserId: () => botUserId,
|
|
320
|
+
log: getLog(),
|
|
321
|
+
dispatch: (message, eventId) => {
|
|
322
|
+
args.waitUntil(
|
|
323
|
+
dispatchInboundMessage({
|
|
324
|
+
kind: "channel_post",
|
|
325
|
+
message,
|
|
326
|
+
handler: onChannelPost,
|
|
327
|
+
propagateHandlerErrors: true,
|
|
328
|
+
send: args.send,
|
|
329
|
+
credentials,
|
|
330
|
+
host: args.host,
|
|
331
|
+
artifacts: args.artifacts,
|
|
332
|
+
log: getLog(),
|
|
333
|
+
evalCommandsEnabled,
|
|
334
|
+
followUpStatus,
|
|
335
|
+
ack: reply.ack,
|
|
336
|
+
blockExternals,
|
|
337
|
+
continuation: options.continuation,
|
|
338
|
+
...(args.hasContinuationSession === undefined
|
|
339
|
+
? {}
|
|
340
|
+
: { hasContinuationSession: args.hasContinuationSession }),
|
|
341
|
+
...(args.isContinuationBusy === undefined
|
|
342
|
+
? {}
|
|
343
|
+
: { isContinuationBusy: args.isContinuationBusy }),
|
|
344
|
+
...(args.getContinuationLastBotMessageTs === undefined
|
|
345
|
+
? {}
|
|
346
|
+
: {
|
|
347
|
+
getContinuationLastBotMessageTs:
|
|
348
|
+
args.getContinuationLastBotMessageTs,
|
|
349
|
+
}),
|
|
350
|
+
...(args.interruptContinuation === undefined
|
|
351
|
+
? {}
|
|
352
|
+
: { interruptContinuation: args.interruptContinuation }),
|
|
353
|
+
...(eventId === undefined ? {} : { eventId }),
|
|
354
|
+
...(platformHandoff === undefined ? {} : { platformHandoff }),
|
|
355
|
+
})
|
|
356
|
+
);
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
|
|
248
361
|
function inboundDeps(args: {
|
|
249
362
|
send: SendMessageFn;
|
|
250
363
|
waitUntil: (promise: Promise<unknown>) => void;
|
|
@@ -260,7 +373,10 @@ export function slackChannel(
|
|
|
260
373
|
) => Promise<string | undefined>;
|
|
261
374
|
interruptContinuation?: (continuationToken: string) => Promise<boolean>;
|
|
262
375
|
platformHandoff?: SlackInboundDispatchDeps["platformHandoff"];
|
|
376
|
+
/** Per-delivery watcher (hosted); the Socket Mode watcher otherwise. */
|
|
377
|
+
channelWatch?: ChannelPostWatcher;
|
|
263
378
|
}): SlackInboundDispatchDeps {
|
|
379
|
+
const watch = args.channelWatch ?? channelWatch;
|
|
264
380
|
return {
|
|
265
381
|
send: args.send,
|
|
266
382
|
continuation: options.continuation,
|
|
@@ -299,7 +415,7 @@ export function slackChannel(
|
|
|
299
415
|
...(args.interruptContinuation === undefined
|
|
300
416
|
? {}
|
|
301
417
|
: { interruptContinuation: args.interruptContinuation }),
|
|
302
|
-
...(
|
|
418
|
+
...(watch === undefined ? {} : { channelWatch: watch }),
|
|
303
419
|
...(botMentionGate === undefined ? {} : { botMentionGate }),
|
|
304
420
|
suggestedPrompts: options.suggestedPrompts,
|
|
305
421
|
suggestedPromptsTitle: options.suggestedPromptsTitle,
|
|
@@ -661,6 +777,11 @@ export function slackChannel(
|
|
|
661
777
|
// would otherwise swallow the control plane's own retry of a delivery
|
|
662
778
|
// that failed after the id was marked handled.
|
|
663
779
|
dispatch: async ({ payload, args, platformHandoff }) => {
|
|
780
|
+
const hostedWatch = await hostedChannelWatch(
|
|
781
|
+
payload,
|
|
782
|
+
args,
|
|
783
|
+
platformHandoff
|
|
784
|
+
);
|
|
664
785
|
const dispatched = dispatchInboundFromEventBody(
|
|
665
786
|
payload,
|
|
666
787
|
inboundDeps({
|
|
@@ -675,6 +796,7 @@ export function slackChannel(
|
|
|
675
796
|
getContinuationLastBotMessageTs: args.getContinuationLastBotMessageTs,
|
|
676
797
|
interruptContinuation: args.interruptContinuation,
|
|
677
798
|
...(platformHandoff === undefined ? {} : { platformHandoff }),
|
|
799
|
+
...(hostedWatch === undefined ? {} : { channelWatch: hostedWatch }),
|
|
678
800
|
})
|
|
679
801
|
);
|
|
680
802
|
return skipped(dispatched ? "not_engaged" : "not_dispatchable");
|
|
@@ -1658,11 +1658,18 @@ export async function cmdStop(
|
|
|
1658
1658
|
}
|
|
1659
1659
|
const cancellation =
|
|
1660
1660
|
"cancellation" in accepted ? accepted.cancellation : undefined;
|
|
1661
|
+
// The backend escalates a publisher's stop of a multi-tenant app to the
|
|
1662
|
+
// application-level suspension; say so, and how to undo it.
|
|
1663
|
+
const stoppedGlobally = "scope" in accepted && accepted.scope === "global";
|
|
1661
1664
|
if (ctx.noWait) {
|
|
1662
1665
|
if (ctx.json) {
|
|
1663
1666
|
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
1664
1667
|
} else {
|
|
1665
|
-
ctx.out(
|
|
1668
|
+
ctx.out(
|
|
1669
|
+
stoppedGlobally
|
|
1670
|
+
? `Stop accepted for ${slug} across all tenants (status: ${accepted.status}).\n`
|
|
1671
|
+
: `Stop accepted for ${slug} (status: ${accepted.status}).\n`
|
|
1672
|
+
);
|
|
1666
1673
|
}
|
|
1667
1674
|
return cancellation?.failed === 0 || cancellation === undefined ? 0 : 1;
|
|
1668
1675
|
}
|
|
@@ -1681,6 +1688,10 @@ export async function cmdStop(
|
|
|
1681
1688
|
}
|
|
1682
1689
|
if (ctx.json) {
|
|
1683
1690
|
ctx.out(`${JSON.stringify(detail, null, 2)}\n`);
|
|
1691
|
+
} else if (stoppedGlobally) {
|
|
1692
|
+
ctx.out(
|
|
1693
|
+
`Stopped ${slug} across all tenants (team ${ctx.teamId}); resume with \`${CLI} start ${slug} --global\`.\n`
|
|
1694
|
+
);
|
|
1684
1695
|
} else {
|
|
1685
1696
|
ctx.out(`Stopped ${slug} (team ${ctx.teamId}).\n`);
|
|
1686
1697
|
}
|
|
@@ -295,6 +295,12 @@ export interface AgentkitStopAccepted {
|
|
|
295
295
|
applicationId: string;
|
|
296
296
|
releaseId: string;
|
|
297
297
|
status: string;
|
|
298
|
+
/**
|
|
299
|
+
* `"global"` when the backend escalated the stop to the application-level
|
|
300
|
+
* suspension — the default for a multi-tenant app stopped by its
|
|
301
|
+
* publisher. Resume needs `start <slug> --global`.
|
|
302
|
+
*/
|
|
303
|
+
scope?: "global";
|
|
298
304
|
cancellation?: AgentkitCancelRunsResult;
|
|
299
305
|
}
|
|
300
306
|
|
|
@@ -471,6 +477,9 @@ const agentkitStopAcceptedSchema = z
|
|
|
471
477
|
applicationId: z.string().min(1),
|
|
472
478
|
releaseId: z.string().min(1),
|
|
473
479
|
status: z.string(),
|
|
480
|
+
// Tolerate scope values a newer backend may add: parse only "global",
|
|
481
|
+
// drop anything else rather than failing the stop response.
|
|
482
|
+
scope: z.literal("global").optional().catch(undefined),
|
|
474
483
|
cancellation: agentkitCancelRunsResultSchema.optional(),
|
|
475
484
|
})
|
|
476
485
|
.passthrough();
|
|
@@ -33,16 +33,18 @@ export function runtimeArchitectureCompatibilityError(agent: {
|
|
|
33
33
|
: undefined;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/** Author-facing default when {@link AgentConfig.architecture} is omitted. */
|
|
37
|
+
export const DEFAULT_AGENT_ARCHITECTURE: AgentArchitecture = "v2";
|
|
38
|
+
|
|
36
39
|
export function resolveArchitecture(
|
|
37
40
|
ctx: DiscoveryContext,
|
|
38
41
|
agentDir: string,
|
|
39
42
|
architecture: AgentArchitecture | undefined
|
|
40
43
|
): AgentArchitecture | undefined {
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
) {
|
|
44
|
+
if (architecture === undefined) {
|
|
45
|
+
return DEFAULT_AGENT_ARCHITECTURE;
|
|
46
|
+
}
|
|
47
|
+
if (architecture === "v1" || architecture === "v2") {
|
|
46
48
|
return architecture;
|
|
47
49
|
}
|
|
48
50
|
ctx.diagnostics.push({
|
|
@@ -55,7 +57,7 @@ export function resolveArchitecture(
|
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
59
|
* `persistent: true` selects the long-lived-pod hosting mode of v2. It has
|
|
58
|
-
* no meaning on v1 (resident engine)
|
|
60
|
+
* no meaning on v1 (resident engine).
|
|
59
61
|
*/
|
|
60
62
|
export function resolvePersistent(
|
|
61
63
|
ctx: DiscoveryContext,
|
|
@@ -66,7 +66,7 @@ import { resolveAgentV2Hosting } from "./v2-hosting.js";
|
|
|
66
66
|
export interface FrameworkStorageSelectionInput {
|
|
67
67
|
/** `agent/storage.ts`, when the author wrote one (v1 only: discovery rejects it on v2). */
|
|
68
68
|
readonly authored: StorageDefinition | undefined;
|
|
69
|
-
/** {@link AgentConfig.architecture};
|
|
69
|
+
/** {@link AgentConfig.architecture}; discovery fills `"v2"` when omitted. */
|
|
70
70
|
readonly architecture?: AgentArchitecture | undefined;
|
|
71
71
|
/** Environment override for tests; defaults to `process.env`. */
|
|
72
72
|
readonly env?: Record<string, string | undefined>;
|
|
@@ -236,6 +236,28 @@ async function timedWorkJsonFetch(
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
const CP_ERROR_BODY_LIMIT = 512;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Read failures carry status and a bounded body: the guest logs them once
|
|
243
|
+
* per process, and a 405 body names the route the caller should be on.
|
|
244
|
+
*/
|
|
245
|
+
async function reminderCpReadError(
|
|
246
|
+
what: string,
|
|
247
|
+
response: Response
|
|
248
|
+
): Promise<Error> {
|
|
249
|
+
let body = "";
|
|
250
|
+
try {
|
|
251
|
+
body = (await response.text()).trim();
|
|
252
|
+
} catch {
|
|
253
|
+
// Status-only detail.
|
|
254
|
+
}
|
|
255
|
+
const detail = body === "" ? "" : ` ${body.slice(0, CP_ERROR_BODY_LIMIT)}`;
|
|
256
|
+
return new Error(
|
|
257
|
+
`reminder CP ${what} failed: HTTP ${response.status}${detail}`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
239
261
|
/**
|
|
240
262
|
* Cursor-hosted HTTP ReminderControlPlane for architecture v2.
|
|
241
263
|
* Speaks factory `/internal/agentsdk/reminders` (ELB → factory ECS).
|
|
@@ -275,7 +297,7 @@ export function createCursorHostedReminderControlPlane(
|
|
|
275
297
|
return undefined;
|
|
276
298
|
}
|
|
277
299
|
if (!response.ok) {
|
|
278
|
-
throw
|
|
300
|
+
throw await reminderCpReadError("get", response);
|
|
279
301
|
}
|
|
280
302
|
const parsed: unknown = await response.json();
|
|
281
303
|
return isReminderRecord(parsed) ? parsed : undefined;
|
|
@@ -287,7 +309,7 @@ export function createCursorHostedReminderControlPlane(
|
|
|
287
309
|
`${AGENTSDK_REMINDERS_PREFIX}/reminders`
|
|
288
310
|
);
|
|
289
311
|
if (!response.ok) {
|
|
290
|
-
throw
|
|
312
|
+
throw await reminderCpReadError("list", response);
|
|
291
313
|
}
|
|
292
314
|
const parsed: unknown = await response.json();
|
|
293
315
|
if (
|