@cursor/july 0.1.107 → 0.1.109
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 +2 -6
- package/README.md +13 -11
- package/dist/bin/agent-serve.js +30 -8
- package/dist/channels/bitbucket/api.d.ts +41 -0
- package/dist/channels/bitbucket/api.d.ts.map +1 -1
- package/dist/channels/bitbucket/api.js +260 -0
- package/dist/channels/bitbucket/binding.d.ts +4 -0
- package/dist/channels/bitbucket/binding.d.ts.map +1 -1
- package/dist/channels/bitbucket/binding.js +16 -0
- package/dist/channels/bitbucket/index.d.ts +1 -1
- package/dist/channels/bitbucket/index.d.ts.map +1 -1
- package/dist/channels/bitbucket/index.js +1 -1
- package/dist/channels/github/github-channel.js +8 -5
- package/dist/channels/github/types.d.ts +5 -1
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/api.d.ts +27 -0
- package/dist/channels/gitlab/api.d.ts.map +1 -1
- package/dist/channels/gitlab/api.js +88 -0
- package/dist/channels/gitlab/binding.d.ts +5 -0
- package/dist/channels/gitlab/binding.d.ts.map +1 -1
- package/dist/channels/gitlab/binding.js +10 -0
- package/dist/channels/gitlab/index.d.ts +1 -1
- package/dist/channels/gitlab/index.d.ts.map +1 -1
- package/dist/channels/gitlab/index.js +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +27 -13
- package/dist/channels/origin/types.d.ts +5 -1
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.d.ts +10 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +20 -3
- package/dist/channels/slack/slack-channel.d.ts +12 -5
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +59 -8
- package/dist/channels.d.ts +45 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +106 -7
- package/dist/connections.d.ts +2 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +2 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.CtuckIiL.js → app.Cr-wVbnB.js} +1 -1
- package/dist/docs/assets/{building-with-agents.md.CUSWxlP_.js → building-with-agents.md.D0KbSkJn.js} +2 -2
- package/dist/docs/assets/{building-with-agents.md.CUSWxlP_.lean.js → building-with-agents.md.D0KbSkJn.lean.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.Bkkhnu8K.js → VPLocalSearchBox.CVQERt56.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DhpIe0Pa.js → theme.Dnsd3XOn.js} +2 -2
- package/dist/docs/assets/concepts.md.B4o63Gul.js +1 -0
- package/dist/docs/assets/{deployment.md.MFPKqsqI.js → deployment.md.JenwuCCB.js} +4 -4
- package/dist/docs/assets/{deployment.md.MFPKqsqI.lean.js → deployment.md.JenwuCCB.lean.js} +1 -1
- package/dist/docs/assets/evals.md.C7JLjoEP.js +211 -0
- package/dist/docs/assets/evals.md.C7JLjoEP.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.js +10 -0
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +9 -0
- package/dist/docs/assets/{guides_cloud-agents.md.DS8RIjwx.lean.js → guides_cloud-agents.md.BsloyHdY.lean.js} +1 -1
- package/dist/docs/assets/{guides_github.md.c0gdGJ-D.js → guides_github.md.TZaTZlfz.js} +13 -3
- package/dist/docs/assets/{guides_github.md.c0gdGJ-D.lean.js → guides_github.md.TZaTZlfz.lean.js} +1 -1
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.js +14 -0
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.lean.js +1 -0
- package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.js → guides_grokbot-agents.md.DyV-WArv.js} +1 -1
- package/dist/docs/assets/guides_improve.md.BGVk32bK.js +14 -0
- package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +1 -0
- package/dist/docs/assets/{guides_slack.md.9oHPye9o.js → guides_slack.md.D4RVMM4G.js} +3 -3
- package/dist/docs/assets/{guides_slack.md.9oHPye9o.lean.js → guides_slack.md.D4RVMM4G.lean.js} +1 -1
- package/dist/docs/assets/{guides_webhooks.md.DKdA43Qm.js → guides_webhooks.md.CJK484ex.js} +2 -2
- package/dist/docs/assets/{hillclimbing.md.CpTGTCle.js → hillclimbing.md.BOiVo1tf.js} +1 -1
- package/dist/docs/assets/index.md.DD9Q2XuJ.js +5 -0
- package/dist/docs/assets/{index.md.BW_6tOgR.lean.js → index.md.DD9Q2XuJ.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.js → reference_agent-config.md.CvoL6pof.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.D-qTqwcq.js → reference_channels.md.CAo-iK4j.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.D-qTqwcq.lean.js → reference_channels.md.CAo-iK4j.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Dm67hd2D.js → reference_cli.md.Deg7849l.js} +7 -7
- package/dist/docs/assets/{reference_cli.md.Dm67hd2D.lean.js → reference_cli.md.Deg7849l.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Di6jJAXF.js → reference_connections.md.BojkC6c5.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.CGmMLblt.js → reference_extensions.md.ZAVUyuEX.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.Ddt5DdgJ.js → reference_hooks.md.BlM_bOg6.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.Ddt5DdgJ.lean.js → reference_hooks.md.BlM_bOg6.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.oySXBO8o.js → reference_http-api.md.BwaCo-VO.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.4myJPxrf.js → reference_playground.md.DLnoaczX.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.4myJPxrf.lean.js → reference_playground.md.DLnoaczX.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.DuBu9a96.js → reference_project-layout.md.BEU8MtQV.js} +3 -3
- package/dist/docs/assets/{reference_project-layout.md.DuBu9a96.lean.js → reference_project-layout.md.BEU8MtQV.lean.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.CyXV1MUw.js +1 -0
- package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.js → scaffolding-agents.md.Kctn3OVb.js} +1 -1
- package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.js → skills_create-agent.md.Q3h6Je-e.js} +1 -1
- package/dist/docs/assets/{skills_debug.md.CDbPhHfg.js → skills_debug.md.CVjCXMFF.js} +1 -1
- package/dist/docs/assets/{skills_debug.md.CDbPhHfg.lean.js → skills_debug.md.CVjCXMFF.lean.js} +1 -1
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +35 -0
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +1 -0
- package/dist/docs/assets/skills_evals.md.DFxYPErF.js +25 -0
- package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +1 -0
- package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +1 -0
- package/dist/docs/assets/{skills_framework-map.md.haibFyoB.lean.js → skills_framework-map.md.BxLSOhSY.lean.js} +1 -1
- package/dist/docs/assets/{skills_github.md.D0JahM8c.js → skills_github.md.hgFX_oKY.js} +1 -1
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +1 -0
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +1 -0
- package/dist/docs/assets/{storage.md.BOHeqk2M.js → storage.md.BUrhJ-Zz.js} +4 -4
- package/dist/docs/assets/{storage.md.BOHeqk2M.lean.js → storage.md.BUrhJ-Zz.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +1 -0
- package/dist/docs/building-with-agents.html +5 -5
- package/dist/docs/building-with-agents.md +3 -2
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/concepts.md +2 -4
- package/dist/docs/deployment.html +7 -7
- package/dist/docs/deployment.md +7 -2
- package/dist/docs/evals.html +161 -35
- package/dist/docs/evals.md +612 -296
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/bitbucket.html +36 -0
- package/dist/docs/guides/bitbucket.md +84 -0
- package/dist/docs/guides/cloud-agents.html +6 -6
- package/dist/docs/guides/cloud-agents.md +4 -3
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +17 -7
- package/dist/docs/guides/github.md +33 -1
- package/dist/docs/guides/gitlab.html +40 -0
- package/dist/docs/guides/gitlab.md +92 -0
- package/dist/docs/guides/grokbot-agents.html +6 -6
- package/dist/docs/guides/grokbot-agents.md +2 -2
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/improve.html +40 -0
- package/dist/docs/guides/improve.md +91 -0
- package/dist/docs/guides/mcp-oauth.html +4 -4
- package/dist/docs/guides/opentelemetry.html +5 -5
- package/dist/docs/guides/slack.html +7 -7
- package/dist/docs/guides/slack.md +2 -1
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/guides/webhooks.md +4 -2
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/hillclimbing.md +2 -2
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +14 -6
- package/dist/docs/llms-full.txt +1274 -814
- package/dist/docs/llms.txt +7 -5
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/agent-config.md +5 -2
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/channels.md +16 -3
- package/dist/docs/reference/cli.html +11 -11
- package/dist/docs/reference/cli.md +24 -15
- package/dist/docs/reference/connections.html +6 -6
- package/dist/docs/reference/connections.md +2 -1
- package/dist/docs/reference/extensions.html +8 -8
- package/dist/docs/reference/extensions.md +2 -3
- package/dist/docs/reference/hooks.html +7 -7
- package/dist/docs/reference/hooks.md +9 -12
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/http-api.md +2 -3
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/playground.md +0 -4
- package/dist/docs/reference/project-layout.html +7 -7
- package/dist/docs/reference/project-layout.md +1 -8
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/result.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/sessions.md +1 -2
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/scaffolding-agents.md +2 -1
- package/dist/docs/skills/create-agent.html +6 -6
- package/dist/docs/skills/create-agent.md +1 -1
- package/dist/docs/skills/debug.html +5 -5
- package/dist/docs/skills/debug.md +1 -1
- package/dist/docs/skills/deploy.html +61 -0
- package/dist/docs/skills/deploy.md +161 -0
- package/dist/docs/skills/evals.html +8 -8
- package/dist/docs/skills/evals.md +44 -6
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/framework-map.md +5 -4
- package/dist/docs/skills/github.html +6 -6
- package/dist/docs/skills/github.md +1 -1
- package/dist/docs/skills/hillclimb.html +4 -4
- package/dist/docs/skills/index.html +6 -6
- package/dist/docs/skills/index.md +1 -1
- package/dist/docs/skills/mcp-auth.html +4 -4
- package/dist/docs/skills/otel.html +4 -4
- package/dist/docs/skills/setup-slack.html +4 -4
- package/dist/docs/storage.html +8 -8
- package/dist/docs/storage.md +15 -24
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +4 -4
- package/dist/docs/templates/code-wiki.html +4 -4
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/grokbot-agents.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +4 -4
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +4 -4
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/docs/troubleshooting.md +1 -1
- package/dist/extensions/improve/extension.d.ts +46 -0
- package/dist/extensions/improve/extension.d.ts.map +1 -0
- package/dist/extensions/improve/extension.js +41 -0
- package/dist/extensions/improve/skills/yourself.d.ts +4 -0
- package/dist/extensions/improve/skills/yourself.d.ts.map +1 -0
- package/dist/extensions/improve/skills/yourself.js +43 -0
- package/dist/extensions.d.ts +2 -3
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +2 -5
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/internal/authored-alias-hooks.d.ts +5 -0
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +17 -0
- package/dist/internal/authored-loaders.d.ts +4 -0
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +21 -2
- package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -1
- package/dist/internal/builtin-tools/artifacts.js +2 -3
- package/dist/internal/channel-route-dispatch.d.ts +13 -0
- package/dist/internal/channel-route-dispatch.d.ts.map +1 -0
- package/dist/internal/channel-route-dispatch.js +62 -0
- package/dist/internal/channel-state.d.ts +17 -0
- package/dist/internal/channel-state.d.ts.map +1 -0
- package/dist/internal/channel-state.js +78 -0
- package/dist/internal/cli-ax.d.ts +8 -2
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +100 -3
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +2 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +38 -14
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +15 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +12 -0
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +8 -2
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +2 -2
- package/dist/internal/continuation-identity.js +8 -3
- package/dist/internal/cursor/credentials.d.ts +8 -2
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +27 -5
- package/dist/internal/deploy-client.d.ts +27 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +32 -0
- package/dist/internal/deploy-manifest.d.ts +23 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +84 -1
- package/dist/internal/describe-error.d.ts +1 -0
- package/dist/internal/describe-error.d.ts.map +1 -1
- package/dist/internal/describe-error.js +25 -0
- package/dist/internal/discovery/agent.d.ts +1 -1
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +0 -5
- package/dist/internal/discovery/extension-overlay.d.ts +1 -2
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -1
- package/dist/internal/discovery/extension-overlay.js +0 -14
- package/dist/internal/discovery/extensions.d.ts +1 -2
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +4 -22
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +42 -24
- package/dist/internal/discovery/modules.js +0 -1
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +0 -16
- package/dist/internal/eval-runner.js +0 -1
- package/dist/internal/framework-file-storage.d.ts +4 -5
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +4 -5
- package/dist/internal/framework-storage-selection.d.ts +2 -2
- package/dist/internal/framework-storage-selection.js +2 -2
- package/dist/internal/guest-network.d.ts +4 -10
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +42 -26
- package/dist/internal/hosted-admission-adapter.d.ts +2 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.d.ts +51 -0
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -0
- package/dist/internal/hosted-catch-protocol.js +103 -0
- package/dist/internal/hosted-catch.d.ts +40 -0
- package/dist/internal/hosted-catch.d.ts.map +1 -0
- package/dist/internal/hosted-catch.js +149 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +41 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +249 -0
- package/dist/internal/hosted-delivery.d.ts +10 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +100 -22
- package/dist/internal/hosted-execution-diag.d.ts +4 -1
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +13 -4
- package/dist/internal/hosted-execution-flush.d.ts +3 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
- package/dist/internal/hosted-execution-flush.js +2 -4
- package/dist/internal/http-control-plane-session.d.ts +30 -0
- package/dist/internal/http-control-plane-session.d.ts.map +1 -0
- package/dist/internal/http-control-plane-session.js +83 -0
- package/dist/internal/init-scaffold.d.ts.map +1 -1
- package/dist/internal/init-scaffold.js +1 -2
- package/dist/internal/install-cursor-skills.d.ts +5 -2
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +25 -5
- package/dist/internal/legacy-command-guard.d.ts +22 -0
- package/dist/internal/legacy-command-guard.d.ts.map +1 -0
- package/dist/internal/legacy-command-guard.js +51 -0
- package/dist/internal/platform-timers.d.ts +7 -0
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +139 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts +2 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-control-plane-protocol.js +9 -2
- package/dist/internal/reminder-runner.d.ts +8 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +36 -9
- package/dist/internal/resolve-prod-target.d.ts +2 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +13 -0
- package/dist/internal/run-client.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +5 -4
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +57 -70
- package/dist/internal/session-engine.d.ts +7 -41
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +110 -227
- package/dist/internal/storage-coordinator.d.ts +5 -19
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +3 -62
- package/dist/internal/storage-roles.d.ts +4 -9
- package/dist/internal/storage-roles.d.ts.map +1 -1
- package/dist/internal/storage-roles.js +2 -2
- package/dist/playground/assets/index-Bhxzrcf6.css +1 -0
- package/dist/playground/assets/index-CqLX5uF3.js +67 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted-v2.d.ts +4 -5
- package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted-v2.js +4 -5
- package/dist/storage-backends/cursor-hosted.d.ts +7 -2
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +29 -31
- package/dist/storage-backends/file-kv.d.ts +9 -12
- package/dist/storage-backends/file-kv.d.ts.map +1 -1
- package/dist/storage-backends/file-kv.js +11 -47
- package/dist/storage-protocol.d.ts +3 -11
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +3 -11
- package/dist/storage.d.ts +8 -36
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +8 -44
- package/dist/types.d.ts +53 -62
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +14 -6
- package/docs/building-with-agents.md +3 -2
- package/docs/concepts.md +2 -4
- package/docs/deployment.md +7 -2
- package/docs/evals.md +613 -297
- package/docs/guides/bitbucket.md +89 -0
- package/docs/guides/cloud-agents.md +4 -3
- package/docs/guides/github.md +33 -1
- package/docs/guides/gitlab.md +97 -0
- package/docs/guides/grokbot-agents.md +2 -2
- package/docs/guides/improve.md +96 -0
- package/docs/guides/slack.md +2 -1
- package/docs/guides/webhooks.md +4 -2
- package/docs/hillclimbing.md +2 -2
- package/docs/reference/agent-config.md +5 -2
- package/docs/reference/channels.md +16 -3
- package/docs/reference/cli.md +24 -15
- package/docs/reference/connections.md +2 -1
- package/docs/reference/extensions.md +2 -3
- package/docs/reference/hooks.md +9 -12
- package/docs/reference/http-api.md +2 -3
- package/docs/reference/playground.md +0 -4
- package/docs/reference/project-layout.md +1 -8
- package/docs/reference/sessions.md +1 -2
- package/docs/scaffolding-agents.md +2 -1
- package/docs/skills/index.md +2 -2
- package/docs/storage.md +15 -24
- package/docs/troubleshooting.md +1 -1
- package/package.json +8 -7
- package/skills/create-agent/SKILL.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/deploy/SKILL.md +169 -0
- package/skills/evals/SKILL.md +45 -8
- package/skills/framework-map/SKILL.md +5 -4
- package/skills/github/SKILL.md +1 -1
- package/src/bin/agent-serve.ts +27 -2
- package/src/channels/bitbucket/api.ts +341 -0
- package/src/channels/bitbucket/binding.ts +25 -0
- package/src/channels/bitbucket/index.ts +2 -0
- package/src/channels/github/github-channel.ts +8 -8
- package/src/channels/github/types.ts +5 -0
- package/src/channels/gitlab/api.ts +123 -0
- package/src/channels/gitlab/binding.ts +12 -0
- package/src/channels/gitlab/index.ts +1 -0
- package/src/channels/origin/origin-channel.ts +29 -13
- package/src/channels/origin/types.ts +5 -0
- package/src/channels/slack/dispatch.ts +30 -0
- package/src/channels/slack/slack-channel.ts +69 -7
- package/src/channels.ts +157 -10
- package/src/connections.ts +2 -1
- package/src/extensions/improve/extension.ts +70 -0
- package/src/extensions/improve/skills/yourself.ts +50 -0
- package/src/extensions.ts +2 -6
- package/src/index.ts +0 -3
- package/src/internal/authored-alias-hooks.ts +32 -0
- package/src/internal/authored-loaders.ts +26 -2
- package/src/internal/builtin-tools/artifacts.ts +2 -3
- package/src/internal/channel-route-dispatch.ts +66 -0
- package/src/internal/channel-state.ts +96 -0
- package/src/internal/cli-ax.ts +111 -3
- package/src/internal/cli-cursor.ts +4 -1
- package/src/internal/cli-deploy.ts +50 -10
- package/src/internal/cli-mcp-oauth.ts +18 -0
- package/src/internal/cli-mcp.ts +11 -0
- package/src/internal/cli-slack.ts +15 -2
- package/src/internal/continuation-channel.ts +2 -1
- package/src/internal/continuation-identity.ts +10 -2
- package/src/internal/cursor/credentials.ts +35 -7
- package/src/internal/deploy-client.ts +54 -0
- package/src/internal/deploy-manifest.ts +115 -1
- package/src/internal/describe-error.ts +28 -0
- package/src/internal/discovery/agent.ts +1 -7
- package/src/internal/discovery/extension-overlay.ts +0 -18
- package/src/internal/discovery/extensions.ts +2 -26
- package/src/internal/discovery/info.ts +3 -13
- package/src/internal/discovery/modules.ts +0 -1
- package/src/internal/discovery/project.ts +0 -16
- package/src/internal/eval-runner.ts +0 -1
- package/src/internal/framework-file-storage.ts +4 -5
- package/src/internal/framework-storage-selection.ts +2 -2
- package/src/internal/guest-network.ts +43 -29
- package/src/internal/hosted-admission-adapter.ts +2 -0
- package/src/internal/hosted-catch-protocol.ts +130 -0
- package/src/internal/hosted-catch.ts +192 -0
- package/src/internal/hosted-delivery-protocol.ts +387 -0
- package/src/internal/hosted-delivery.ts +155 -22
- package/src/internal/hosted-execution-diag.ts +21 -3
- package/src/internal/hosted-execution-flush.ts +6 -3
- package/src/internal/http-control-plane-session.ts +104 -0
- package/src/internal/init-scaffold.ts +1 -2
- package/src/internal/install-cursor-skills.ts +38 -5
- package/src/internal/legacy-command-guard.ts +59 -0
- package/src/internal/platform-timers.ts +191 -0
- package/src/internal/reminder-control-plane-protocol.ts +15 -2
- package/src/internal/reminder-runner.ts +60 -9
- package/src/internal/resolve-prod-target.ts +15 -0
- package/src/internal/run-client.ts +1 -1
- package/src/internal/sdk-runner.ts +3 -2
- package/src/internal/server.ts +89 -95
- package/src/internal/session-engine.ts +155 -285
- package/src/internal/storage-coordinator.ts +5 -76
- package/src/internal/storage-roles.ts +4 -9
- package/src/storage-backends/cursor-hosted-v2.ts +4 -7
- package/src/storage-backends/cursor-hosted.ts +40 -38
- package/src/storage-backends/file-kv.ts +10 -51
- package/src/storage-protocol.ts +3 -17
- package/src/storage.ts +10 -101
- package/src/types.ts +58 -62
- package/templates/demo/README.md +10 -6
- package/templates/demo/agent/channels/github.ts +2 -0
- package/templates/demo/agent/channels/queue.ts +6 -2
- package/templates/demo/agent/lib/repos.ts +5 -0
- package/templates/demo/init.json +25 -0
- package/dist/ab.d.ts +0 -209
- package/dist/ab.d.ts.map +0 -1
- package/dist/ab.js +0 -246
- package/dist/docs/ab.html +0 -80
- package/dist/docs/ab.md +0 -332
- package/dist/docs/assets/ab.md.mlVgqvSk.js +0 -54
- package/dist/docs/assets/ab.md.mlVgqvSk.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DXXZxiMv.js +0 -1
- package/dist/docs/assets/concepts.md.DgEcZOfT.js +0 -1
- package/dist/docs/assets/evals.md.CbMoebP1.js +0 -85
- package/dist/docs/assets/evals.md.CbMoebP1.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +0 -9
- package/dist/docs/assets/index.md.BW_6tOgR.js +0 -5
- package/dist/docs/assets/reference_sessions.md.CueyOHSL.js +0 -1
- package/dist/docs/assets/skills_ab.md.CsFNatVx.js +0 -26
- package/dist/docs/assets/skills_ab.md.CsFNatVx.lean.js +0 -1
- package/dist/docs/assets/skills_evals.md.723kpUmA.js +0 -25
- package/dist/docs/assets/skills_evals.md.723kpUmA.lean.js +0 -1
- package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +0 -1
- package/dist/docs/assets/skills_index.md.DKwIxzGg.js +0 -1
- package/dist/docs/assets/skills_index.md.DKwIxzGg.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.Cus_YZga.js +0 -1
- package/dist/docs/skills/ab.html +0 -52
- package/dist/docs/skills/ab.md +0 -50
- package/dist/internal/ab-collector.d.ts +0 -44
- package/dist/internal/ab-collector.d.ts.map +0 -1
- package/dist/internal/ab-collector.js +0 -142
- package/dist/internal/ab-fold.d.ts +0 -36
- package/dist/internal/ab-fold.d.ts.map +0 -1
- package/dist/internal/ab-fold.js +0 -175
- package/dist/internal/ab-snapshot.d.ts +0 -68
- package/dist/internal/ab-snapshot.d.ts.map +0 -1
- package/dist/internal/ab-snapshot.js +0 -208
- package/dist/internal/discovery/ab.d.ts +0 -9
- package/dist/internal/discovery/ab.d.ts.map +0 -1
- package/dist/internal/discovery/ab.js +0 -113
- package/dist/playground/assets/index-Bq2HpEQB.js +0 -67
- package/dist/playground/assets/index-CZKKNlmb.css +0 -1
- package/docs/ab.md +0 -337
- package/skills/ab/SKILL.md +0 -58
- package/src/ab.ts +0 -430
- package/src/internal/ab-collector.ts +0 -200
- package/src/internal/ab-fold.ts +0 -232
- package/src/internal/ab-snapshot.ts +0 -331
- package/src/internal/discovery/ab.ts +0 -131
- /package/dist/docs/assets/{concepts.md.DgEcZOfT.lean.js → concepts.md.B4o63Gul.lean.js} +0 -0
- /package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.lean.js → guides_grokbot-agents.md.DyV-WArv.lean.js} +0 -0
- /package/dist/docs/assets/{guides_webhooks.md.DKdA43Qm.lean.js → guides_webhooks.md.CJK484ex.lean.js} +0 -0
- /package/dist/docs/assets/{hillclimbing.md.CpTGTCle.lean.js → hillclimbing.md.BOiVo1tf.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.lean.js → reference_agent-config.md.CvoL6pof.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.Di6jJAXF.lean.js → reference_connections.md.BojkC6c5.lean.js} +0 -0
- /package/dist/docs/assets/{reference_extensions.md.CGmMLblt.lean.js → reference_extensions.md.ZAVUyuEX.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.oySXBO8o.lean.js → reference_http-api.md.BwaCo-VO.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.CueyOHSL.lean.js → reference_sessions.md.CyXV1MUw.lean.js} +0 -0
- /package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.lean.js → scaffolding-agents.md.Kctn3OVb.lean.js} +0 -0
- /package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.lean.js → skills_create-agent.md.Q3h6Je-e.lean.js} +0 -0
- /package/dist/docs/assets/{skills_github.md.D0JahM8c.lean.js → skills_github.md.hgFX_oKY.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Cus_YZga.lean.js → troubleshooting.md.CYEAO9bM.lean.js} +0 -0
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import type {
|
|
8
8
|
ArtifactsDefinition,
|
|
9
|
-
DiscoveredAB,
|
|
10
9
|
DiscoveredChannel,
|
|
11
10
|
DiscoveredHook,
|
|
12
11
|
DiscoveredSchedule,
|
|
@@ -14,7 +13,6 @@ import type {
|
|
|
14
13
|
ResolvedAgent,
|
|
15
14
|
} from "../../types.js";
|
|
16
15
|
import { getDefinitionKind } from "../brand.js";
|
|
17
|
-
import { loadABs } from "./ab.js";
|
|
18
16
|
import { loadChannels } from "./channels.js";
|
|
19
17
|
import { type DiscoveryContext, displayPath, errorMessage } from "./context.js";
|
|
20
18
|
import {
|
|
@@ -202,22 +200,6 @@ export async function overlayInstructionsFragment(
|
|
|
202
200
|
return loadInstructions(ctx, overlayDir, undefined, false);
|
|
203
201
|
}
|
|
204
202
|
|
|
205
|
-
export async function overlayAbs(
|
|
206
|
-
ctx: DiscoveryContext,
|
|
207
|
-
site: OverlaySite,
|
|
208
|
-
contributed: Map<string, DiscoveredAB>,
|
|
209
|
-
overlayDir: string
|
|
210
|
-
): Promise<void> {
|
|
211
|
-
const loaded = await loadABs(ctx, overlayDir, (source, path) => {
|
|
212
|
-
if (!contributed.delete(source)) {
|
|
213
|
-
unknownContribution(ctx, path, "disableAB", source, site.ns);
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
for (const experiment of loaded) {
|
|
217
|
-
contributed.set(experiment.source ?? experiment.name, experiment);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
203
|
export async function overlayArtifacts(
|
|
222
204
|
ctx: DiscoveryContext,
|
|
223
205
|
overlayDir: string,
|
|
@@ -8,7 +8,6 @@ import { join, resolve } from "node:path";
|
|
|
8
8
|
import type {
|
|
9
9
|
ArtifactsDefinition,
|
|
10
10
|
ConnectionDefinition,
|
|
11
|
-
DiscoveredAB,
|
|
12
11
|
DiscoveredChannel,
|
|
13
12
|
DiscoveredConnection,
|
|
14
13
|
DiscoveredExtension,
|
|
@@ -22,7 +21,6 @@ import type {
|
|
|
22
21
|
ToolDefinition,
|
|
23
22
|
} from "../../types.js";
|
|
24
23
|
import { buildIdentityPreamble, withIdentityPreamble } from "../workspace.js";
|
|
25
|
-
import { loadABs } from "./ab.js";
|
|
26
24
|
import { loadChannels } from "./channels.js";
|
|
27
25
|
import {
|
|
28
26
|
compileConnection,
|
|
@@ -33,7 +31,6 @@ import {
|
|
|
33
31
|
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
34
32
|
import { type CursorPluginAgent, readCursorPlugin } from "./cursor-plugin.js";
|
|
35
33
|
import {
|
|
36
|
-
overlayAbs,
|
|
37
34
|
overlayArtifacts,
|
|
38
35
|
overlayChannels,
|
|
39
36
|
overlayHooks,
|
|
@@ -74,7 +71,6 @@ export interface ExtensionContributions {
|
|
|
74
71
|
schedules: DiscoveredSchedule[];
|
|
75
72
|
instructionParts: string[];
|
|
76
73
|
seedFiles: SeedFile[];
|
|
77
|
-
abs: DiscoveredAB[];
|
|
78
74
|
artifacts: ArtifactsDefinition | undefined;
|
|
79
75
|
}
|
|
80
76
|
|
|
@@ -171,7 +167,6 @@ interface ExtensionTree {
|
|
|
171
167
|
schedules: DiscoveredSchedule[];
|
|
172
168
|
instructions?: string;
|
|
173
169
|
seedFiles: SeedFile[];
|
|
174
|
-
abs: DiscoveredAB[];
|
|
175
170
|
artifacts?: ArtifactsDefinition;
|
|
176
171
|
}
|
|
177
172
|
|
|
@@ -192,7 +187,6 @@ function emptyDiscovered(
|
|
|
192
187
|
schedules: [],
|
|
193
188
|
instructions: false,
|
|
194
189
|
seedFiles: [],
|
|
195
|
-
abs: [],
|
|
196
190
|
artifactKinds: [],
|
|
197
191
|
};
|
|
198
192
|
}
|
|
@@ -242,7 +236,6 @@ async function mountExtension(
|
|
|
242
236
|
const seedFiles = new Map(
|
|
243
237
|
tree.seedFiles.map((seed) => [seed.relativePath, seed])
|
|
244
238
|
);
|
|
245
|
-
const abs = byAbSource(tree.abs);
|
|
246
239
|
let artifacts = tree.artifacts;
|
|
247
240
|
let instructions = tree.instructions;
|
|
248
241
|
|
|
@@ -333,7 +326,6 @@ async function mountExtension(
|
|
|
333
326
|
for (const seed of await loadSeedFiles(ctx, site.overlayDir)) {
|
|
334
327
|
seedFiles.set(seed.relativePath, seed);
|
|
335
328
|
}
|
|
336
|
-
await overlayAbs(ctx, site, abs, site.overlayDir);
|
|
337
329
|
artifacts = await overlayArtifacts(ctx, site.overlayDir, artifacts);
|
|
338
330
|
}
|
|
339
331
|
|
|
@@ -407,14 +399,6 @@ async function mountExtension(
|
|
|
407
399
|
into.seedFiles.push(seed);
|
|
408
400
|
mounted.seedFiles.push(seed.relativePath);
|
|
409
401
|
}
|
|
410
|
-
for (const experiment of abs.values()) {
|
|
411
|
-
const composed = `${site.ns}__${experiment.name}`;
|
|
412
|
-
into.abs.push({
|
|
413
|
-
name: composed,
|
|
414
|
-
definition: experiment.definition,
|
|
415
|
-
});
|
|
416
|
-
mounted.abs.push(composed);
|
|
417
|
-
}
|
|
418
402
|
if (artifacts !== undefined) {
|
|
419
403
|
const kinds: NonNullable<ArtifactsDefinition["kinds"]> = {};
|
|
420
404
|
for (const [kind, config] of Object.entries(artifacts.kinds ?? {})) {
|
|
@@ -464,7 +448,6 @@ async function readExtensionTree(
|
|
|
464
448
|
channels: [],
|
|
465
449
|
schedules: [],
|
|
466
450
|
seedFiles: [],
|
|
467
|
-
abs: [],
|
|
468
451
|
};
|
|
469
452
|
}
|
|
470
453
|
return readNativeTree(ctx, root);
|
|
@@ -490,7 +473,6 @@ async function readNativeTree(
|
|
|
490
473
|
schedules: await loadSchedules(ctx, join(root, "schedules")),
|
|
491
474
|
instructions: await loadInstructions(ctx, root, undefined, false),
|
|
492
475
|
seedFiles: await loadSeedFiles(ctx, root),
|
|
493
|
-
abs: await loadABs(ctx, root),
|
|
494
476
|
artifacts: await loadArtifacts(ctx, root),
|
|
495
477
|
};
|
|
496
478
|
}
|
|
@@ -519,19 +501,14 @@ function byName<T extends { name: string }>(items: T[]): Map<string, T> {
|
|
|
519
501
|
return new Map(items.map((item) => [item.name, item]));
|
|
520
502
|
}
|
|
521
503
|
|
|
522
|
-
function byAbSource(items: DiscoveredAB[]): Map<string, DiscoveredAB> {
|
|
523
|
-
return new Map(items.map((item) => [item.source ?? item.name, item]));
|
|
524
|
-
}
|
|
525
|
-
|
|
526
504
|
function byId<T extends { id: string }>(items: T[]): Map<string, T> {
|
|
527
505
|
return new Map(items.map((item) => [item.id, item]));
|
|
528
506
|
}
|
|
529
507
|
|
|
530
508
|
/**
|
|
531
509
|
* Agent-singleton slots: one runtime (`agent.ts`), one storage backend,
|
|
532
|
-
* one OTLP exporter
|
|
533
|
-
*
|
|
534
|
-
* `extensions/` are not mounted.
|
|
510
|
+
* one OTLP exporter. Playground chips are a Vite glob of the agent tree,
|
|
511
|
+
* not a discovery walk. Nested `extensions/` are not mounted.
|
|
535
512
|
*/
|
|
536
513
|
async function warnAgentRootOnlySlots(
|
|
537
514
|
ctx: DiscoveryContext,
|
|
@@ -541,7 +518,6 @@ async function warnAgentRootOnlySlots(
|
|
|
541
518
|
["agent.ts", "agent.ts"],
|
|
542
519
|
["storage.ts", "storage"],
|
|
543
520
|
["otel.ts", "otel"],
|
|
544
|
-
["ab.config.ts", "A/B config"],
|
|
545
521
|
] as const;
|
|
546
522
|
for (const [file, label] of files) {
|
|
547
523
|
const path = join(root, file);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* The `info` / `GET /v1/info` projection of an {@link AgentProject}.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { resolveABMaxPlaygroundSessions } from "../../ab.js";
|
|
6
5
|
import { resolveArtifactsMax } from "../../artifacts.js";
|
|
7
6
|
import {
|
|
8
7
|
type AgentProject,
|
|
@@ -140,6 +139,9 @@ export function projectInfo(project: AgentProject): AgentProjectInfo {
|
|
|
140
139
|
if (meta?.factoryEventTypes !== undefined) {
|
|
141
140
|
info.factoryEventTypes = meta.factoryEventTypes;
|
|
142
141
|
}
|
|
142
|
+
if (meta?.slackEventTypes !== undefined) {
|
|
143
|
+
info.slackEventTypes = meta.slackEventTypes;
|
|
144
|
+
}
|
|
143
145
|
if (meta?.slackChannelPosts !== undefined) {
|
|
144
146
|
info.slackChannelPosts = meta.slackChannelPosts;
|
|
145
147
|
}
|
|
@@ -158,18 +160,6 @@ export function projectInfo(project: AgentProject): AgentProjectInfo {
|
|
|
158
160
|
name: reminder.name,
|
|
159
161
|
})),
|
|
160
162
|
hooks: project.hooks.map((hook) => hook.name),
|
|
161
|
-
abs: project.abs.map((experiment) => experiment.name),
|
|
162
|
-
...(project.abConfig === undefined && project.abs.length === 0
|
|
163
|
-
? {}
|
|
164
|
-
: {
|
|
165
|
-
abConfig: {
|
|
166
|
-
maxPlaygroundSessions: resolveABMaxPlaygroundSessions(
|
|
167
|
-
project.abConfig?.maxPlaygroundSessions
|
|
168
|
-
),
|
|
169
|
-
durableSamples: project.storage?.abs !== undefined,
|
|
170
|
-
durableSnapshots: project.storage?.abs?.putSnapshot !== undefined,
|
|
171
|
-
},
|
|
172
|
-
}),
|
|
173
163
|
storage:
|
|
174
164
|
project.storage === undefined
|
|
175
165
|
? undefined
|
|
@@ -103,7 +103,6 @@ const DEFINE_HELPER_NAME: Record<ImportableKind, string> = {
|
|
|
103
103
|
schedule: "defineSchedule",
|
|
104
104
|
reminder: "defineReminder",
|
|
105
105
|
hook: "defineHook",
|
|
106
|
-
ab: "defineAB",
|
|
107
106
|
storage: "defineStorage",
|
|
108
107
|
artifacts: "defineArtifacts",
|
|
109
108
|
otel: "defineOtel",
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
applyAgentContinuationDefaults,
|
|
15
15
|
warnOmittedContinuationDowngrades,
|
|
16
16
|
} from "../continuation-channel.js";
|
|
17
|
-
import { loadABConfig, loadABs } from "./ab.js";
|
|
18
17
|
import { loadAgent, warnUnknownSlots } from "./agent.js";
|
|
19
18
|
import { loadChannels } from "./channels.js";
|
|
20
19
|
import {
|
|
@@ -240,19 +239,6 @@ export async function loadAgentProject(
|
|
|
240
239
|
const reminders = await loadReminders(ctx, join(agentDir, "reminders"));
|
|
241
240
|
const hooks = await loadHooks(ctx, join(agentDir, "hooks"));
|
|
242
241
|
hooks.push(...projectSlots.hooks);
|
|
243
|
-
const abs = await loadABs(ctx, agentDir);
|
|
244
|
-
for (const experiment of projectSlots.abs) {
|
|
245
|
-
if (abs.some((existing) => existing.name === experiment.name)) {
|
|
246
|
-
ctx.diagnostics.push({
|
|
247
|
-
severity: "error",
|
|
248
|
-
path: displayPath(ctx, join(agentDir, "extensions")),
|
|
249
|
-
message: `Extension A/B experiment "${experiment.name}" collides with an agent experiment.`,
|
|
250
|
-
});
|
|
251
|
-
continue;
|
|
252
|
-
}
|
|
253
|
-
abs.push(experiment);
|
|
254
|
-
}
|
|
255
|
-
const abConfig = await loadABConfig(ctx, agentDir);
|
|
256
242
|
const storage = await loadStorage(ctx, agentDir, agent.architecture);
|
|
257
243
|
const artifacts = await mergeProjectArtifacts(
|
|
258
244
|
ctx,
|
|
@@ -295,8 +281,6 @@ export async function loadAgentProject(
|
|
|
295
281
|
schedules,
|
|
296
282
|
reminders,
|
|
297
283
|
hooks,
|
|
298
|
-
abs,
|
|
299
|
-
abConfig,
|
|
300
284
|
storage,
|
|
301
285
|
artifacts,
|
|
302
286
|
result,
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
* `continuation` go to the framework file store (file-shaped; the store
|
|
22
22
|
* accepts values up to 64 MiB per
|
|
23
23
|
* object without chunking, versus the KV proxy's 1 MiB row cap), while
|
|
24
|
-
* author `kv`, eval runs,
|
|
25
|
-
*
|
|
26
|
-
* database).
|
|
24
|
+
* author `kv`, eval runs, and conditional writes stay on the control-plane
|
|
25
|
+
* KV proxy (the dashboard reads them there, and CAS needs a database).
|
|
27
26
|
*
|
|
28
27
|
* v2 only, by construction: the composite is selected in
|
|
29
28
|
* framework-storage-selection.ts, which v1 never reaches with a
|
|
@@ -202,8 +201,8 @@ function decodeDocument(key: string, bytes: Uint8Array): JsonValue {
|
|
|
202
201
|
/**
|
|
203
202
|
* Split one storage core by key kind: framework session state to `files`,
|
|
204
203
|
* everything else to `kv`. Spread over the KV backend when building the
|
|
205
|
-
* full definition so its `evals`
|
|
206
|
-
*
|
|
204
|
+
* full definition so its `evals` group (and the cursor-hosted marker)
|
|
205
|
+
* rides along untouched; wrap the KV `cas` group with
|
|
207
206
|
* {@link frameworkGuardedCas} rather than spreading it as-is.
|
|
208
207
|
*/
|
|
209
208
|
export function composeFrameworkStorage(input: {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`, bound at task time) holds
|
|
25
25
|
* session records, event transcripts, and the continuation index —
|
|
26
26
|
* file-shaped state on file storage, apart from the author-facing user
|
|
27
|
-
* store. Author `host.kv`, eval runs,
|
|
28
|
-
*
|
|
27
|
+
* store. Author `host.kv`, eval runs, and conditional writes ride the
|
|
28
|
+
* AgentSDK v2 KV proxy (cursor-hosted-v2.ts), which resolves the
|
|
29
29
|
* pod service account to the factorydb deployment row (the v1 Bugbot
|
|
30
30
|
* proxy cannot resolve v2 pods at all). Framework session state never
|
|
31
31
|
* routes to the KV proxy — the composite splits by key kind — so
|
|
@@ -12,11 +12,9 @@
|
|
|
12
12
|
* so leftover races still return 503 `guest_network_unavailable` instead of
|
|
13
13
|
* a redacted 500.
|
|
14
14
|
*
|
|
15
|
-
* Quiet guest Connect
|
|
16
|
-
* `
|
|
17
|
-
*
|
|
18
|
-
* retries the same pod — including when `waitForCompletion` resolves
|
|
19
|
-
* with that message instead of throwing.
|
|
15
|
+
* Quiet guest Connect failures with a typed Connect/undici code are stalls,
|
|
16
|
+
* not dead NICs. Those become `guest_connect_stalled` so TAS retries the same
|
|
17
|
+
* pod. Untyped errors stay unknown rather than being classified from prose.
|
|
20
18
|
*/
|
|
21
19
|
|
|
22
20
|
import { HOSTED_GUEST_RETRY_TRANSIENT } from "./hosted-delivery-protocol.js";
|
|
@@ -71,11 +69,16 @@ export class GuestNetworkUnavailableError extends Error {
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
|
|
72
|
+
class GuestNetworkProbeFailedError extends Error {
|
|
73
|
+
constructor(cause: unknown) {
|
|
74
|
+
super("Guest network probe failed", { cause });
|
|
75
|
+
this.name = "GuestNetworkProbeFailedError";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
/**
|
|
75
80
|
* True when the error (or anything on its `cause` chain, or inside an
|
|
76
|
-
* `AggregateError`)
|
|
77
|
-
* undici's `TypeError: fetch failed` as `ConnectError` and keeps the
|
|
78
|
-
* original on `cause`.
|
|
81
|
+
* `AggregateError`) carries a known network-level code.
|
|
79
82
|
*/
|
|
80
83
|
export function isTransientGuestNetworkError(error: unknown): boolean {
|
|
81
84
|
return isTransientAtDepth(error, 0);
|
|
@@ -91,9 +94,8 @@ const QUIET_CONNECT_ERROR_CODES: ReadonlySet<string> = new Set([
|
|
|
91
94
|
"UND_ERR_BODY_TIMEOUT",
|
|
92
95
|
"UND_ERR_HEADERS_TIMEOUT",
|
|
93
96
|
]);
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
/^(?:\[(?:unknown|canceled|unavailable)\])|connection stalled|this operation was aborted/i;
|
|
97
|
+
// gRPC Canceled, Unknown, and Unavailable.
|
|
98
|
+
const QUIET_CONNECT_CODES: ReadonlySet<number> = new Set([1, 2, 14]);
|
|
97
99
|
|
|
98
100
|
export function hasGuestNetworkErrno(error: unknown): boolean {
|
|
99
101
|
return hasCodeAtDepth(error, 0, TRANSIENT_NETWORK_ERROR_CODES);
|
|
@@ -115,16 +117,16 @@ export function isQuietGuestConnectStall(error: unknown): boolean {
|
|
|
115
117
|
return isQuietSignatureAtDepth(error, 0);
|
|
116
118
|
}
|
|
117
119
|
|
|
118
|
-
/** Message-only form for `waitForCompletion` outcomes that do not throw. */
|
|
119
|
-
export function isQuietGuestConnectStallMessage(message: string): boolean {
|
|
120
|
-
return QUIET_CONNECT_MESSAGE.test(message);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
120
|
function errorCode(error: Error): string | undefined {
|
|
124
121
|
const code = (error as NodeJS.ErrnoException).code;
|
|
125
122
|
return typeof code === "string" && code.length > 0 ? code : undefined;
|
|
126
123
|
}
|
|
127
124
|
|
|
125
|
+
function numericErrorCode(error: Error): number | undefined {
|
|
126
|
+
const code = (error as { code?: unknown }).code;
|
|
127
|
+
return typeof code === "number" ? code : undefined;
|
|
128
|
+
}
|
|
129
|
+
|
|
128
130
|
function hasCodeAtDepth(
|
|
129
131
|
error: unknown,
|
|
130
132
|
depth: number,
|
|
@@ -150,14 +152,15 @@ function isQuietSignatureAtDepth(error: unknown, depth: number): boolean {
|
|
|
150
152
|
if (depth >= MAX_CAUSE_DEPTH || !(error instanceof Error)) {
|
|
151
153
|
return false;
|
|
152
154
|
}
|
|
153
|
-
if (error
|
|
155
|
+
if (error.name === "AbortError") {
|
|
154
156
|
return true;
|
|
155
157
|
}
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
+
const numericCode = numericErrorCode(error);
|
|
159
|
+
if (numericCode !== undefined && QUIET_CONNECT_CODES.has(numericCode)) {
|
|
158
160
|
return true;
|
|
159
161
|
}
|
|
160
|
-
|
|
162
|
+
const code = errorCode(error);
|
|
163
|
+
if (code !== undefined && QUIET_CONNECT_ERROR_CODES.has(code)) {
|
|
161
164
|
return true;
|
|
162
165
|
}
|
|
163
166
|
if (
|
|
@@ -173,10 +176,17 @@ function isTransientAtDepth(error: unknown, depth: number): boolean {
|
|
|
173
176
|
if (depth >= MAX_CAUSE_DEPTH || !(error instanceof Error)) {
|
|
174
177
|
return false;
|
|
175
178
|
}
|
|
176
|
-
if (error instanceof
|
|
179
|
+
if (error instanceof GuestNetworkUnavailableError) {
|
|
177
180
|
return true;
|
|
178
181
|
}
|
|
179
|
-
if (error instanceof
|
|
182
|
+
if (error instanceof GuestNetworkProbeFailedError) {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
if (error.name === "AbortError") {
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
const numericCode = numericErrorCode(error);
|
|
189
|
+
if (numericCode !== undefined && QUIET_CONNECT_CODES.has(numericCode)) {
|
|
180
190
|
return true;
|
|
181
191
|
}
|
|
182
192
|
const code = errorCode(error);
|
|
@@ -249,13 +259,17 @@ async function defaultProbe(
|
|
|
249
259
|
probeUrl: string,
|
|
250
260
|
probeTimeoutMs: number
|
|
251
261
|
): Promise<void> {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
try {
|
|
263
|
+
// Any HTTP response means egress and DNS work. 401/404 are ready.
|
|
264
|
+
const response = await fetch(probeUrl, {
|
|
265
|
+
method: "GET",
|
|
266
|
+
redirect: "manual",
|
|
267
|
+
signal: AbortSignal.timeout(probeTimeoutMs),
|
|
268
|
+
});
|
|
269
|
+
void response.body?.cancel();
|
|
270
|
+
} catch (error) {
|
|
271
|
+
throw new GuestNetworkProbeFailedError(error);
|
|
272
|
+
}
|
|
259
273
|
}
|
|
260
274
|
|
|
261
275
|
export type GuestNetworkWaitOutcome = "ready" | "skipped" | "unavailable";
|
|
@@ -19,6 +19,8 @@ export type HostedAdmissionAdapter = {
|
|
|
19
19
|
*/
|
|
20
20
|
prepareArgs?(args: ChannelHandlerArgs): ChannelHandlerArgs;
|
|
21
21
|
dispatch(input: {
|
|
22
|
+
/** Mounted channel id the delivery addressed (always set by hosted delivery). */
|
|
23
|
+
channelId?: string;
|
|
22
24
|
eventType: string;
|
|
23
25
|
payload: unknown;
|
|
24
26
|
deliveryId: string;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catch ingress wire contract, July copy. The control plane keeps a
|
|
3
|
+
* byte-identical copy of these constants in
|
|
4
|
+
* `backend/packages/server-shared/src/agentServe/agentSdkCatch.ts`; a
|
|
5
|
+
* backend drift test compares the two as text. Neither package imports the
|
|
6
|
+
* other.
|
|
7
|
+
*
|
|
8
|
+
* A caught request is one hosted admission whose `eventType` is
|
|
9
|
+
* {@link AGENT_SDK_CATCH_EVENT_TYPE} and whose `payload` is a
|
|
10
|
+
* {@link CatchRequestEnvelope}: the HTTP request the control plane
|
|
11
|
+
* accepted on a manifest-declared route after verifying the deployment's
|
|
12
|
+
* secret. July replays it into the authored route handler; the control
|
|
13
|
+
* plane never runs channel code.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const AGENT_SDK_CATCH_ENVELOPE_VERSION = 1;
|
|
17
|
+
export const AGENT_SDK_CATCH_EVENT_TYPE = "http.request";
|
|
18
|
+
export const AGENT_SDK_CUSTOM_CHANNEL_KIND = "custom";
|
|
19
|
+
export const AGENT_SDK_SESSION_EVENT_TYPE = "agentsdk.session";
|
|
20
|
+
export const AGENT_SDK_HTTP_CHANNEL_ID = "http";
|
|
21
|
+
export const AGENT_SDK_HTTP_CHANNEL_KIND = "http";
|
|
22
|
+
export const AGENT_SDK_SESSION_RESUME_KEY_PREFIX = "cont:session:";
|
|
23
|
+
export const AGENT_SDK_CATCH_MAX_BODY_BYTES: number = 256 * 1024;
|
|
24
|
+
|
|
25
|
+
export const AGENT_SDK_CATCH_ROUTE_METHODS = [
|
|
26
|
+
"GET",
|
|
27
|
+
"POST",
|
|
28
|
+
"PUT",
|
|
29
|
+
"PATCH",
|
|
30
|
+
"DELETE",
|
|
31
|
+
] as const;
|
|
32
|
+
export type CatchRouteMethod = (typeof AGENT_SDK_CATCH_ROUTE_METHODS)[number];
|
|
33
|
+
|
|
34
|
+
export type CatchRequestEnvelope = {
|
|
35
|
+
v: 1;
|
|
36
|
+
method: CatchRouteMethod;
|
|
37
|
+
/** Channel-relative path, e.g. `/webhook`. */
|
|
38
|
+
path: string;
|
|
39
|
+
/** Raw query string without the leading `?`; empty when absent. */
|
|
40
|
+
query: string;
|
|
41
|
+
/** Lowercased header names. */
|
|
42
|
+
headers: Record<string, string>;
|
|
43
|
+
body: { encoding: "utf8" | "base64"; data: string } | null;
|
|
44
|
+
receivedAt: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Mailbox key the control plane stamps on an explicit `ses_…` resume. The
|
|
49
|
+
* suffix is the CP session id the hosted execution also names, so the
|
|
50
|
+
* engine can recognise the key as "this existing session" rather than a
|
|
51
|
+
* new continuation identity.
|
|
52
|
+
*/
|
|
53
|
+
export function hostedSessionResumeKey(sessionPublicId: string): string {
|
|
54
|
+
return `${AGENT_SDK_SESSION_RESUME_KEY_PREFIX}${sessionPublicId}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const ENVELOPE_KEYS = new Set([
|
|
58
|
+
"v",
|
|
59
|
+
"method",
|
|
60
|
+
"path",
|
|
61
|
+
"query",
|
|
62
|
+
"headers",
|
|
63
|
+
"body",
|
|
64
|
+
"receivedAt",
|
|
65
|
+
]);
|
|
66
|
+
const METHODS = new Set<string>(AGENT_SDK_CATCH_ROUTE_METHODS);
|
|
67
|
+
const MAX_PATH_CHARS = 1024;
|
|
68
|
+
const MAX_QUERY_CHARS = 4096;
|
|
69
|
+
const MAX_HEADER_COUNT = 64;
|
|
70
|
+
const MAX_HEADER_BYTES = 16 * 1024;
|
|
71
|
+
|
|
72
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
73
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Strict parse of a claim-checked catch envelope; anything else is undefined. */
|
|
77
|
+
export function parseCatchRequestEnvelope(
|
|
78
|
+
value: unknown
|
|
79
|
+
): CatchRequestEnvelope | undefined {
|
|
80
|
+
if (!isRecord(value)) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (
|
|
84
|
+
Object.keys(value).some((key) => !ENVELOPE_KEYS.has(key)) ||
|
|
85
|
+
value.v !== AGENT_SDK_CATCH_ENVELOPE_VERSION ||
|
|
86
|
+
typeof value.method !== "string" ||
|
|
87
|
+
!METHODS.has(value.method) ||
|
|
88
|
+
typeof value.path !== "string" ||
|
|
89
|
+
!value.path.startsWith("/") ||
|
|
90
|
+
value.path.length > MAX_PATH_CHARS ||
|
|
91
|
+
typeof value.query !== "string" ||
|
|
92
|
+
value.query.length > MAX_QUERY_CHARS ||
|
|
93
|
+
typeof value.receivedAt !== "string" ||
|
|
94
|
+
!isRecord(value.headers)
|
|
95
|
+
) {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const entries = Object.entries(value.headers);
|
|
99
|
+
if (entries.length > MAX_HEADER_COUNT) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
let headerBytes = 0;
|
|
103
|
+
for (const [name, headerValue] of entries) {
|
|
104
|
+
if (typeof headerValue !== "string" || name !== name.toLowerCase()) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
headerBytes += name.length + headerValue.length;
|
|
108
|
+
}
|
|
109
|
+
if (headerBytes > MAX_HEADER_BYTES) {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
if (value.body !== null) {
|
|
113
|
+
if (
|
|
114
|
+
!isRecord(value.body) ||
|
|
115
|
+
(value.body.encoding !== "utf8" && value.body.encoding !== "base64") ||
|
|
116
|
+
typeof value.body.data !== "string"
|
|
117
|
+
) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return value as CatchRequestEnvelope;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Raw request bytes from an envelope body; empty for a null body. */
|
|
125
|
+
export function decodeCatchBody(body: CatchRequestEnvelope["body"]): Buffer {
|
|
126
|
+
if (body === null) {
|
|
127
|
+
return Buffer.alloc(0);
|
|
128
|
+
}
|
|
129
|
+
return Buffer.from(body.data, body.encoding);
|
|
130
|
+
}
|