@cursor/july 0.1.105 → 0.1.108
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/README.md +10 -5
- package/dist/bin/agent-serve.js +31 -16
- package/dist/channels/bitbucket/types.d.ts +2 -4
- package/dist/channels/bitbucket/types.d.ts.map +1 -1
- package/dist/channels/deployments/types.d.ts +5 -8
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +8 -5
- package/dist/channels/github/types.d.ts +7 -5
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/types.d.ts +2 -5
- package/dist/channels/gitlab/types.d.ts.map +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 +7 -4
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +3 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +48 -11
- package/dist/channels/slack/types.d.ts +4 -3
- package/dist/channels/slack/types.d.ts.map +1 -1
- 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 +3 -3
- package/dist/docs/ab.html +6 -6
- package/dist/docs/assets/{app.BVwaffdK.js → app.BASKM3M4.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BHZYsNVi.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.WuWTZ1x8.js → VPLocalSearchBox.BOKxlYGP.js} +2 -2
- package/dist/docs/assets/chunks/{theme.BYdI_6sF.js → theme.DbDZW-zb.js} +2 -2
- 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.CbMoebP1.js → evals.md.C1ekS3k2.js} +1 -1
- 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.BH33UEBJ.js} +1 -1
- 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_opentelemetry.md.COh9jFVg.js → guides_opentelemetry.md.SCRMskno.js} +3 -3
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.lean.js → guides_opentelemetry.md.SCRMskno.lean.js} +1 -1
- 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/index.md.BjH1w2ZW.js +5 -0
- 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.DBGcaB7m.js → reference_channels.md.D-qTqwcq.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.lean.js → reference_channels.md.D-qTqwcq.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.C6Lo8SEd.js → reference_cli.md.Ca26u0Es.js} +6 -6
- package/dist/docs/assets/{reference_cli.md.C6Lo8SEd.lean.js → reference_cli.md.Ca26u0Es.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.CPWt00ds.js} +1 -1
- 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_evals.md.723kpUmA.js → skills_evals.md.BhovOvrl.js} +1 -1
- package/dist/docs/assets/skills_framework-map.md.D-tFZhFS.js +1 -0
- package/dist/docs/assets/{skills_framework-map.md.haibFyoB.lean.js → skills_framework-map.md.D-tFZhFS.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_otel.md.CqhobH3B.js → skills_otel.md.B5Ddv1xH.js} +1 -1
- package/dist/docs/assets/{style.BRuM8477.css → style.DCD_zyg3.css} +1 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +1 -0
- package/dist/docs/building-with-agents.html +6 -6
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +9 -9
- package/dist/docs/deployment.md +7 -2
- package/dist/docs/evals.html +8 -8
- package/dist/docs/evals.md +3 -2
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/cloud-agents.html +7 -7
- package/dist/docs/guides/cloud-agents.md +4 -3
- package/dist/docs/guides/convert-automation.html +6 -6
- package/dist/docs/guides/github.html +7 -7
- package/dist/docs/guides/github.md +2 -1
- package/dist/docs/guides/grokbot-agents.html +7 -7
- package/dist/docs/guides/grokbot-agents.md +2 -2
- package/dist/docs/guides/human-in-the-loop.html +6 -6
- package/dist/docs/guides/improve.html +40 -0
- package/dist/docs/guides/improve.md +91 -0
- package/dist/docs/guides/mcp-oauth.html +6 -6
- package/dist/docs/guides/opentelemetry.html +8 -8
- package/dist/docs/guides/opentelemetry.md +3 -4
- package/dist/docs/guides/slack.html +8 -8
- package/dist/docs/guides/slack.md +2 -1
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/index.html +8 -8
- package/dist/docs/index.md +4 -0
- package/dist/docs/llms-full.txt +180 -61
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/reference/agent-config.html +7 -7
- package/dist/docs/reference/agent-config.md +5 -2
- package/dist/docs/reference/artifacts.html +6 -6
- package/dist/docs/reference/channels.html +7 -7
- package/dist/docs/reference/channels.md +11 -19
- package/dist/docs/reference/cli.html +11 -11
- package/dist/docs/reference/cli.md +23 -13
- package/dist/docs/reference/connections.html +8 -8
- package/dist/docs/reference/connections.md +2 -1
- package/dist/docs/reference/extensions.html +7 -7
- package/dist/docs/reference/extensions.md +2 -0
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/instructions.html +6 -6
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/prompt.html +6 -6
- package/dist/docs/reference/result.html +6 -6
- package/dist/docs/reference/schedules.html +6 -6
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/scaffolding-agents.html +6 -6
- package/dist/docs/scaffolding-agents.md +2 -1
- package/dist/docs/skills/ab.html +6 -6
- package/dist/docs/skills/create-agent.html +8 -8
- package/dist/docs/skills/create-agent.md +1 -1
- package/dist/docs/skills/debug.html +6 -6
- package/dist/docs/skills/debug.md +1 -1
- package/dist/docs/skills/evals.html +8 -8
- package/dist/docs/skills/evals.md +1 -1
- package/dist/docs/skills/framework-map.html +6 -6
- package/dist/docs/skills/framework-map.md +4 -2
- package/dist/docs/skills/github.html +8 -8
- package/dist/docs/skills/github.md +1 -1
- package/dist/docs/skills/hillclimb.html +6 -6
- package/dist/docs/skills/index.html +5 -5
- package/dist/docs/skills/mcp-auth.html +6 -6
- package/dist/docs/skills/otel.html +8 -8
- package/dist/docs/skills/otel.md +3 -3
- package/dist/docs/skills/setup-slack.html +6 -6
- package/dist/docs/storage.html +6 -6
- package/dist/docs/templates/agentic-owners.html +6 -6
- package/dist/docs/templates/agents-md.html +6 -6
- package/dist/docs/templates/code-wiki.html +6 -6
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/grokbot-agents.html +6 -6
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/security-help.html +6 -6
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/triage.html +6 -6
- package/dist/docs/troubleshooting.html +6 -6
- 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/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- 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 +7 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +99 -1
- 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 +61 -25
- 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/cursor/backend-client.d.ts +25 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +57 -2
- 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 +35 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +46 -0
- package/dist/internal/deploy-manifest.d.ts +26 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +99 -13
- 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.map +1 -1
- package/dist/internal/discovery/agent.js +1 -0
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +7 -3
- package/dist/internal/discovery/modules.d.ts +1 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +1 -0
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +3 -0
- package/dist/internal/discovery/reminders.d.ts +7 -0
- package/dist/internal/discovery/reminders.d.ts.map +1 -0
- package/dist/internal/discovery/reminders.js +65 -0
- package/dist/internal/discovery/subagent.js +1 -0
- package/dist/internal/distribution.d.ts +5 -0
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +17 -0
- package/dist/internal/framework-storage-selection.d.ts +14 -3
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +36 -6
- 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 +44 -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 +89 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +309 -0
- package/dist/internal/hosted-delivery.d.ts +20 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +179 -36
- 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/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/local-control-plane.d.ts +18 -2
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +199 -17
- 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 +189 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
- package/dist/internal/reminder-control-plane-protocol.js +251 -0
- package/dist/internal/reminder-runner.d.ts +56 -6
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +372 -57
- package/dist/internal/reminder-schedule.d.ts +5 -2
- package/dist/internal/reminder-schedule.d.ts.map +1 -1
- package/dist/internal/reminder-schedule.js +8 -6
- package/dist/internal/reminder-store.d.ts +24 -7
- package/dist/internal/reminder-store.d.ts.map +1 -1
- package/dist/internal/reminder-store.js +6 -5
- package/dist/internal/request-error-status.d.ts +2 -0
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +22 -3
- 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/scm/pr-url.d.ts +40 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -1
- package/dist/internal/scm/pr-url.js +93 -14
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +4 -3
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +118 -77
- package/dist/internal/session-engine.d.ts +6 -6
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +100 -67
- package/dist/playground/assets/{index-BaQzjaNK.js → index-BMDqAeXu.js} +34 -34
- package/dist/playground/assets/index-LUgJoWdL.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/reminders.d.ts +24 -5
- package/dist/reminders.d.ts.map +1 -1
- package/dist/reminders.js +28 -5
- package/dist/storage-backends/cursor-hosted.d.ts +6 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +29 -1
- package/dist/types.d.ts +122 -25
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +4 -0
- package/docs/deployment.md +7 -2
- package/docs/evals.md +3 -2
- package/docs/guides/cloud-agents.md +4 -3
- package/docs/guides/github.md +2 -1
- package/docs/guides/grokbot-agents.md +2 -2
- package/docs/guides/improve.md +96 -0
- package/docs/guides/opentelemetry.md +3 -4
- package/docs/guides/slack.md +2 -1
- package/docs/reference/agent-config.md +5 -2
- package/docs/reference/channels.md +11 -19
- package/docs/reference/cli.md +23 -13
- package/docs/reference/connections.md +2 -1
- package/docs/reference/extensions.md +2 -0
- package/docs/scaffolding-agents.md +2 -1
- package/docs/troubleshooting.md +1 -1
- package/package.json +10 -3
- package/skills/create-agent/SKILL.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/evals/SKILL.md +1 -1
- package/skills/framework-map/SKILL.md +4 -2
- package/skills/github/SKILL.md +1 -1
- package/skills/otel/SKILL.md +3 -3
- package/src/bin/agent-serve.ts +28 -11
- package/src/channels/bitbucket/types.ts +2 -4
- package/src/channels/deployments/types.ts +5 -8
- package/src/channels/github/github-channel.ts +8 -8
- package/src/channels/github/types.ts +7 -4
- package/src/channels/gitlab/types.ts +2 -5
- package/src/channels/origin/origin-channel.ts +29 -13
- package/src/channels/origin/types.ts +7 -3
- package/src/channels/slack/defaults.ts +3 -0
- package/src/channels/slack/dispatch.ts +1 -0
- package/src/channels/slack/live-delivery.ts +53 -12
- package/src/channels/slack/types.ts +4 -3
- 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/index.ts +6 -3
- 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 +110 -1
- package/src/internal/cli-cursor.ts +4 -1
- package/src/internal/cli-deploy.ts +80 -22
- 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/cursor/backend-client.ts +90 -2
- package/src/internal/cursor/credentials.ts +35 -7
- package/src/internal/deploy-client.ts +70 -0
- package/src/internal/deploy-manifest.ts +131 -12
- package/src/internal/describe-error.ts +28 -0
- package/src/internal/discovery/agent.ts +1 -0
- package/src/internal/discovery/info.ts +6 -0
- package/src/internal/discovery/modules.ts +2 -4
- package/src/internal/discovery/project.ts +3 -0
- package/src/internal/discovery/reminders.ts +65 -0
- package/src/internal/discovery/subagent.ts +1 -0
- package/src/internal/distribution.ts +20 -0
- package/src/internal/framework-storage-selection.ts +43 -6
- package/src/internal/guest-network.ts +46 -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 +483 -0
- package/src/internal/hosted-delivery.ts +303 -43
- 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/legacy-command-guard.ts +59 -0
- package/src/internal/local-control-plane.ts +281 -22
- package/src/internal/platform-timers.ts +191 -0
- package/src/internal/reminder-control-plane-protocol.ts +512 -0
- package/src/internal/reminder-runner.ts +481 -57
- package/src/internal/reminder-schedule.ts +11 -6
- package/src/internal/reminder-store.ts +27 -7
- package/src/internal/request-error-status.ts +27 -3
- package/src/internal/resolve-prod-target.ts +15 -0
- package/src/internal/scm/pr-url.ts +167 -20
- package/src/internal/sdk-runner.ts +2 -1
- package/src/internal/server.ts +151 -88
- package/src/internal/session-engine.ts +146 -83
- package/src/reminders.ts +35 -4
- package/src/storage-backends/cursor-hosted.ts +40 -1
- package/src/types.ts +134 -26
- package/dist/docs/assets/chunks/@localSearchIndexroot.CJxMklAy.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/skills_framework-map.md.haibFyoB.js +0 -1
- package/dist/docs/assets/troubleshooting.md.Cus_YZga.js +0 -1
- package/dist/playground/assets/index-CceqnLTX.css +0 -1
- /package/dist/docs/assets/{evals.md.CbMoebP1.lean.js → evals.md.C1ekS3k2.lean.js} +0 -0
- /package/dist/docs/assets/{guides_github.md.c0gdGJ-D.lean.js → guides_github.md.BH33UEBJ.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/{index.md.BW_6tOgR.lean.js → index.md.BjH1w2ZW.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.CPWt00ds.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_evals.md.723kpUmA.lean.js → skills_evals.md.BhovOvrl.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/{skills_otel.md.CqhobH3B.lean.js → skills_otel.md.B5Ddv1xH.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Cus_YZga.lean.js → troubleshooting.md.CYEAO9bM.lean.js} +0 -0
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
* union for control-plane consumers.
|
|
30
30
|
*/
|
|
31
31
|
import { z } from "zod";
|
|
32
|
-
import { isPublicEndpointPolicy } from "../channels.js";
|
|
32
|
+
import { catchAuthDeclaration, isPublicEndpointPolicy, } from "../channels.js";
|
|
33
33
|
import { isCursorHostedStorage } from "../storage-backends/cursor-hosted.js";
|
|
34
34
|
import { applyAgentContinuationDefaults, channelContinuationIdentity, channelDeclaredEventTypes, handshakeChannelContinuation, } from "./continuation-channel.js";
|
|
35
35
|
import { CONTINUATION_SELECTORS, } from "./continuation-identity.js";
|
|
36
36
|
import { projectInfo, runtimeArchitectureCompatibilityError, } from "./discovery.js";
|
|
37
|
-
import { packageVersion } from "./distribution.js";
|
|
37
|
+
import { packageGitSha, packageVersion } from "./distribution.js";
|
|
38
38
|
export const DEPLOY_MANIFEST_VERSION = 1;
|
|
39
39
|
/**
|
|
40
40
|
* Versioned wire contract for the CP-consumed declaration fields. Kept
|
|
@@ -42,10 +42,42 @@ export const DEPLOY_MANIFEST_VERSION = 1;
|
|
|
42
42
|
* use {@link parseAgentDeployManifest} and the explicit interfaces below.
|
|
43
43
|
*/
|
|
44
44
|
const continuationIdentitySchema = z.enum(CONTINUATION_SELECTORS);
|
|
45
|
+
const CATCH_MAX_ROUTES = 32;
|
|
46
|
+
const CATCH_MAX_AUTH_POLICIES = 4;
|
|
47
|
+
const catchDeclarationSchema = z.object({
|
|
48
|
+
routes: z
|
|
49
|
+
.array(z.object({
|
|
50
|
+
method: z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]),
|
|
51
|
+
path: z.string().min(1).max(1024),
|
|
52
|
+
}))
|
|
53
|
+
.min(1)
|
|
54
|
+
.max(CATCH_MAX_ROUTES),
|
|
55
|
+
auth: z
|
|
56
|
+
.array(z.discriminatedUnion("kind", [
|
|
57
|
+
z.object({
|
|
58
|
+
kind: z.literal("header"),
|
|
59
|
+
header: z.string().min(1).max(128),
|
|
60
|
+
secret: z.string().min(1).max(64),
|
|
61
|
+
}),
|
|
62
|
+
z.object({
|
|
63
|
+
kind: z.literal("hmac-sha256"),
|
|
64
|
+
header: z.string().min(1).max(128),
|
|
65
|
+
secret: z.string().min(1).max(64),
|
|
66
|
+
prefix: z.string().max(32).optional(),
|
|
67
|
+
}),
|
|
68
|
+
z.object({ kind: z.literal("public") }),
|
|
69
|
+
]))
|
|
70
|
+
.min(1)
|
|
71
|
+
.max(CATCH_MAX_AUTH_POLICIES),
|
|
72
|
+
});
|
|
45
73
|
const agentDeployManifestV1Schema = z.object({
|
|
46
74
|
manifestVersion: z.literal(DEPLOY_MANIFEST_VERSION),
|
|
47
75
|
generatedAtMs: z.number().int().nonnegative(),
|
|
48
76
|
cliVersion: z.string().min(1),
|
|
77
|
+
cliGitSha: z
|
|
78
|
+
.string()
|
|
79
|
+
.regex(/^[0-9a-f]{40,64}$/)
|
|
80
|
+
.optional(),
|
|
49
81
|
declarations: z.object({
|
|
50
82
|
egressDomains: z.array(z.string().min(1)).max(64),
|
|
51
83
|
publicRoutePaths: z.array(z.string().min(1)).max(64),
|
|
@@ -57,6 +89,7 @@ const agentDeployManifestV1Schema = z.object({
|
|
|
57
89
|
kind: z.string().min(1).max(32).optional(),
|
|
58
90
|
eventTypes: z.array(z.string().min(1).max(64)).max(64).optional(),
|
|
59
91
|
continuation: continuationIdentitySchema,
|
|
92
|
+
catch: catchDeclarationSchema.optional(),
|
|
60
93
|
}))
|
|
61
94
|
.max(64),
|
|
62
95
|
}),
|
|
@@ -69,7 +102,7 @@ const agentDeployManifestV1Schema = z.object({
|
|
|
69
102
|
*/
|
|
70
103
|
export function buildAgentDeployManifest(project, options) {
|
|
71
104
|
var _a;
|
|
72
|
-
var _b, _c, _d;
|
|
105
|
+
var _b, _c, _d, _e;
|
|
73
106
|
const runtimeArchitectureError = runtimeArchitectureCompatibilityError(project.agent);
|
|
74
107
|
if (runtimeArchitectureError !== undefined) {
|
|
75
108
|
throw new Error(runtimeArchitectureError);
|
|
@@ -89,6 +122,7 @@ export function buildAgentDeployManifest(project, options) {
|
|
|
89
122
|
kind,
|
|
90
123
|
eventTypes,
|
|
91
124
|
continuation: channelContinuationIdentity(channel.definition),
|
|
125
|
+
catch: channelCatchDeclaration(channel.definition),
|
|
92
126
|
};
|
|
93
127
|
});
|
|
94
128
|
// Same mapping as `july deploy` (cli-deploy.ts): channels declared public
|
|
@@ -100,22 +134,74 @@ export function buildAgentDeployManifest(project, options) {
|
|
|
100
134
|
manifestVersion: DEPLOY_MANIFEST_VERSION,
|
|
101
135
|
generatedAtMs: (_b = options === null || options === void 0 ? void 0 : options.nowMs) !== null && _b !== void 0 ? _b : Date.now(),
|
|
102
136
|
cliVersion: (_c = options === null || options === void 0 ? void 0 : options.cliVersion) !== null && _c !== void 0 ? _c : packageVersion(),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
// Cursor-hosted deployments
|
|
106
|
-
//
|
|
107
|
-
|
|
137
|
+
cliGitSha: (_d = options === null || options === void 0 ? void 0 : options.cliGitSha) !== null && _d !== void 0 ? _d : packageGitSha(),
|
|
138
|
+
declarations: Object.assign(Object.assign({ egressDomains: [...((_e = (_a = project.agent.hosting) === null || _a === void 0 ? void 0 : _a.egressDomains) !== null && _e !== void 0 ? _e : [])], publicRoutePaths,
|
|
139
|
+
// Deploy manifests describe Cursor-hosted deployments. When the agent
|
|
140
|
+
// authors no storage, framework-storage-selection.ts injects the
|
|
141
|
+
// platform Cursor-hosted mirror for both v1 and v2.
|
|
142
|
+
frameworkStorage: project.storage === undefined
|
|
108
143
|
? "cursor-hosted"
|
|
109
|
-
: project.storage
|
|
110
|
-
? "
|
|
111
|
-
:
|
|
112
|
-
? "cursor-hosted"
|
|
113
|
-
: "other" }, (project.agent.architecture === undefined
|
|
144
|
+
: isCursorHostedStorage(project.storage)
|
|
145
|
+
? "cursor-hosted"
|
|
146
|
+
: "other" }, (project.agent.architecture === undefined
|
|
114
147
|
? {}
|
|
115
148
|
: { architecture: project.agent.architecture })), { channels }),
|
|
116
149
|
info: projectInfo(project),
|
|
117
150
|
};
|
|
118
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Catch declaration for one authored channel: its routes, gated by the
|
|
154
|
+
* catch-capable policies in its auth chain (`sharedSecretAuth`,
|
|
155
|
+
* `hmacSignatureAuth`, or `publicEndpoint()` for handler-verified routes).
|
|
156
|
+
* A routed channel with none of those declares nothing and is not reachable
|
|
157
|
+
* through the catch API.
|
|
158
|
+
*/
|
|
159
|
+
export function channelCatchDeclaration(definition) {
|
|
160
|
+
var _a, _b;
|
|
161
|
+
const routes = (_a = definition.routes) !== null && _a !== void 0 ? _a : [];
|
|
162
|
+
if (routes.length === 0) {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
const declared = ((_b = definition.auth) !== null && _b !== void 0 ? _b : [])
|
|
166
|
+
.map(catchAuthDeclaration)
|
|
167
|
+
.filter((declaration) => declaration !== undefined);
|
|
168
|
+
if (declared.length === 0) {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
// An auth chain is any-of, so `publicEndpoint()` beside secret policies
|
|
172
|
+
// admits everything locally and on the control plane alike. Declare one
|
|
173
|
+
// `public` entry (the control plane then decrypts nothing) but keep the
|
|
174
|
+
// shared-secret header policies next to it: they are what the control
|
|
175
|
+
// plane uses to strip those header values before the request is
|
|
176
|
+
// claim-checked, and senders keep sending the secret regardless of
|
|
177
|
+
// whether anything still checks it. HMAC policies carry body digests,
|
|
178
|
+
// not secrets, so nothing is lost by dropping them.
|
|
179
|
+
const isPublic = declared.some((policy) => policy.kind === "public");
|
|
180
|
+
const auth = isPublic
|
|
181
|
+
? [
|
|
182
|
+
{ kind: "public" },
|
|
183
|
+
...declared.filter((policy) => policy.kind === "header"),
|
|
184
|
+
]
|
|
185
|
+
: declared;
|
|
186
|
+
if (routes.length > CATCH_MAX_ROUTES) {
|
|
187
|
+
if (isPublic) {
|
|
188
|
+
// publicEndpoint() channels deployed before catch existed; they stay
|
|
189
|
+
// reachable the way they were (not through catch) rather than
|
|
190
|
+
// failing the deploy.
|
|
191
|
+
return undefined;
|
|
192
|
+
}
|
|
193
|
+
throw new Error(`Catch channels may declare at most ${CATCH_MAX_ROUTES} routes (got ${routes.length}).`);
|
|
194
|
+
}
|
|
195
|
+
if (auth.length > CATCH_MAX_AUTH_POLICIES) {
|
|
196
|
+
throw new Error(isPublic
|
|
197
|
+
? `Catch channels may declare at most ${CATCH_MAX_AUTH_POLICIES} auth policies; publicEndpoint() plus ${String(auth.length - 1)} sharedSecretAuth() policies is ${String(auth.length)}. Drop publicEndpoint() or the shared-secret policies it makes dead.`
|
|
198
|
+
: `Catch channels may declare at most ${CATCH_MAX_AUTH_POLICIES} secret policies (got ${auth.length}).`);
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
routes: routes.map((route) => ({ method: route.method, path: route.path })),
|
|
202
|
+
auth,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
119
205
|
/**
|
|
120
206
|
* Parse an untrusted manifest (round-trip check for the CLI's own output;
|
|
121
207
|
* the CP re-validates server-side with its own copy of the contract).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe-error.d.ts","sourceRoot":"","sources":["../../src/internal/describe-error.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD"}
|
|
1
|
+
{"version":3,"file":"describe-error.d.ts","sourceRoot":"","sources":["../../src/internal/describe-error.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CA0BpE"}
|
|
@@ -2,3 +2,28 @@
|
|
|
2
2
|
export function describeError(error) {
|
|
3
3
|
return error instanceof Error ? error.message : String(error);
|
|
4
4
|
}
|
|
5
|
+
export function describeErrorCode(error) {
|
|
6
|
+
if (typeof error === "object" && error !== null && "code" in error) {
|
|
7
|
+
const numericCode = error.code;
|
|
8
|
+
if (numericCode === 1) {
|
|
9
|
+
return "canceled";
|
|
10
|
+
}
|
|
11
|
+
if (numericCode === 14) {
|
|
12
|
+
return "unavailable";
|
|
13
|
+
}
|
|
14
|
+
if (numericCode === 2) {
|
|
15
|
+
return "unknown";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (typeof error === "object" &&
|
|
19
|
+
error !== null &&
|
|
20
|
+
"name" in error &&
|
|
21
|
+
error.name === "AbortError") {
|
|
22
|
+
return "ABORT_ERR";
|
|
23
|
+
}
|
|
24
|
+
if (typeof error !== "object" || error === null || !("code" in error)) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const code = error.code;
|
|
28
|
+
return typeof code === "string" && code.length <= 64 ? code : undefined;
|
|
29
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/agent.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAcxB,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAc9D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,IAAI,CAChB,sBAAsB,EACtB,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,CACzD,CAAC;CACH;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACzC,OAAO,CAAC,eAAe,CAAC,CAyS1B;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/agent.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAcxB,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAc9D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,IAAI,CAChB,sBAAsB,EACtB,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,CACzD,CAAC;CACH;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACzC,OAAO,CAAC,eAAe,CAAC,CAyS1B;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CA2Cf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/info.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAKxB,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/info.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAKxB,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAmLnE"}
|
|
@@ -9,7 +9,7 @@ import { MCP_ENDPOINT_PATH, mcpEndpointToolNames } from "../mcp-endpoint.js";
|
|
|
9
9
|
import { connectionTransportLabel } from "./connections.js";
|
|
10
10
|
export function projectInfo(project) {
|
|
11
11
|
var _a, _b, _c, _d;
|
|
12
|
-
var _e, _f;
|
|
12
|
+
var _e, _f, _g, _h;
|
|
13
13
|
const agent = project.agent;
|
|
14
14
|
const httpRoutes = [
|
|
15
15
|
{ method: "POST", path: "/v1/session", url: "/v1/session" },
|
|
@@ -125,7 +125,11 @@ export function projectInfo(project) {
|
|
|
125
125
|
name: schedule.name,
|
|
126
126
|
cron: schedule.cron,
|
|
127
127
|
kind: schedule.kind,
|
|
128
|
-
})),
|
|
128
|
+
})), reminders: ((_f = project.reminders) !== null && _f !== void 0 ? _f : []).length === 0
|
|
129
|
+
? undefined
|
|
130
|
+
: ((_g = project.reminders) !== null && _g !== void 0 ? _g : []).map((reminder) => ({
|
|
131
|
+
name: reminder.name,
|
|
132
|
+
})), hooks: project.hooks.map((hook) => hook.name), abs: project.abs.map((experiment) => experiment.name) }, (project.abConfig === undefined && project.abs.length === 0
|
|
129
133
|
? {}
|
|
130
134
|
: {
|
|
131
135
|
abConfig: {
|
|
@@ -138,7 +142,7 @@ export function projectInfo(project) {
|
|
|
138
142
|
: { name: project.storage.name }, artifacts: project.artifacts === undefined
|
|
139
143
|
? undefined
|
|
140
144
|
: {
|
|
141
|
-
kinds: Object.keys((
|
|
145
|
+
kinds: Object.keys((_h = project.artifacts.kinds) !== null && _h !== void 0 ? _h : {}),
|
|
142
146
|
agentTool: project.artifacts.agentTool === true,
|
|
143
147
|
max: resolveArtifactsMax(project.artifacts),
|
|
144
148
|
}, result: project.result === undefined ? undefined : true, otel: project.otel === undefined
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { DefinitionKind } from "../../types.js";
|
|
5
5
|
import { type DiscoveryContext } from "./context.js";
|
|
6
|
-
type ImportableKind = Exclude<DefinitionKind, "instructions" | "eval"
|
|
6
|
+
type ImportableKind = Exclude<DefinitionKind, "instructions" | "eval">;
|
|
7
7
|
/** The module files of a slot directory whose filenames are valid names. */
|
|
8
8
|
export declare function moduleEntries(ctx: DiscoveryContext, dir: string, kind: "tool" | "connection"): Promise<Array<{
|
|
9
9
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/modules.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAIhF,KAAK,cAAc,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/modules.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAIhF,KAAK,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAAC,CAAC;AAEvE,4EAA4E;AAC5E,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GAAG,YAAY,GAC1B,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAwBhD;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,GACnD,OAAO,CAAC,OAAO,CAAC,CA6BlB;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAKvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EACV,YAAY,EAEZ,UAAU,EACX,MAAM,gBAAgB,CAAC;AASxB,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EACV,YAAY,EAEZ,UAAU,EACX,MAAM,gBAAgB,CAAC;AASxB,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAoBtB;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASrE;AAED,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,EAAE,CAAC,CA2B1B;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CA6BzD;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAAuB,GAAG;IACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtB,GACL,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CAgBzD;AAcD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,YAAY,CAAC,CAqHvB;AA0BD,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAElE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAOnE"}
|
|
@@ -32,6 +32,7 @@ import { defaultImportModule, displayPath, } from "./context.js";
|
|
|
32
32
|
import { hasFlatLayoutMarkers, isDirectory, readPackageName, sortedEntries, } from "./fs.js";
|
|
33
33
|
import { loadHooks } from "./hooks.js";
|
|
34
34
|
import { NAME_PATTERN } from "./names.js";
|
|
35
|
+
import { loadReminders } from "./reminders.js";
|
|
35
36
|
import { loadSchedules } from "./schedules.js";
|
|
36
37
|
import { appendArtifactTool, loadArtifacts, loadOtel, loadResult, loadStorage, mergeArtifacts, } from "./services.js";
|
|
37
38
|
/**
|
|
@@ -199,6 +200,7 @@ export function loadAgentProject(dir_1) {
|
|
|
199
200
|
}
|
|
200
201
|
const schedules = yield loadSchedules(ctx, join(agentDir, "schedules"));
|
|
201
202
|
schedules.push(...projectSlots.schedules);
|
|
203
|
+
const reminders = yield loadReminders(ctx, join(agentDir, "reminders"));
|
|
202
204
|
const hooks = yield loadHooks(ctx, join(agentDir, "hooks"));
|
|
203
205
|
hooks.push(...projectSlots.hooks);
|
|
204
206
|
const abs = yield loadABs(ctx, agentDir);
|
|
@@ -247,6 +249,7 @@ export function loadAgentProject(dir_1) {
|
|
|
247
249
|
httpChannel: resolvedHttpChannel,
|
|
248
250
|
channels,
|
|
249
251
|
schedules,
|
|
252
|
+
reminders,
|
|
250
253
|
hooks,
|
|
251
254
|
abs,
|
|
252
255
|
abConfig,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `agent/reminders/*.ts`: named durable reminder fire handlers.
|
|
3
|
+
*/
|
|
4
|
+
import type { DiscoveredReminder } from "../../types.js";
|
|
5
|
+
import { type DiscoveryContext } from "./context.js";
|
|
6
|
+
export declare function loadReminders(ctx: DiscoveryContext, remindersDir: string, onDisable?: (name: string, path: string) => void): Promise<DiscoveredReminder[]>;
|
|
7
|
+
//# sourceMappingURL=reminders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reminders.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/reminders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAKlE,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAC/C,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgD/B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `agent/reminders/*.ts`: named durable reminder fire handlers.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import { basename, extname, relative } from "node:path";
|
|
14
|
+
import { getDefinitionKind } from "../brand.js";
|
|
15
|
+
import { displayPath } from "./context.js";
|
|
16
|
+
import { isDirectory, isModuleFile, toPosix, walkFiles } from "./fs.js";
|
|
17
|
+
import { importDefault } from "./modules.js";
|
|
18
|
+
import { NAME_PATTERN } from "./names.js";
|
|
19
|
+
export function loadReminders(ctx, remindersDir, onDisable) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
if (!(yield isDirectory(remindersDir))) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const reminders = [];
|
|
25
|
+
for (const filePath of yield walkFiles(remindersDir)) {
|
|
26
|
+
const rel = toPosix(relative(remindersDir, filePath));
|
|
27
|
+
if (!isModuleFile(basename(filePath))) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const name = rel.slice(0, -extname(rel).length);
|
|
31
|
+
if (!NAME_PATTERN.test(name) || name.includes("__")) {
|
|
32
|
+
ctx.diagnostics.push({
|
|
33
|
+
severity: "error",
|
|
34
|
+
path: displayPath(ctx, filePath),
|
|
35
|
+
message: name.includes("__")
|
|
36
|
+
? `Reminder name "${name}" may not contain "__"; it is reserved for extension contributions (\`<ns>__<name>\`).`
|
|
37
|
+
: `Reminder name "${name}" must match ${NAME_PATTERN}.`,
|
|
38
|
+
});
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const definition = yield importDefault(ctx, filePath, onDisable === undefined ? "reminder" : ["reminder", "disabled"]);
|
|
42
|
+
if (definition === undefined) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
46
|
+
onDisable === null || onDisable === void 0 ? void 0 : onDisable(name, filePath);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const reminder = definition;
|
|
50
|
+
if (typeof reminder.run !== "function") {
|
|
51
|
+
ctx.diagnostics.push({
|
|
52
|
+
severity: "error",
|
|
53
|
+
path: displayPath(ctx, filePath),
|
|
54
|
+
message: "Reminder handlers require a `run` function.",
|
|
55
|
+
});
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
reminders.push({
|
|
59
|
+
name,
|
|
60
|
+
definition: reminder,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return reminders;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -112,6 +112,7 @@ function warnUnsupportedSubagentSlots(ctx, subagentDir) {
|
|
|
112
112
|
["subagents", "nested subagents"],
|
|
113
113
|
["channels", "channels"],
|
|
114
114
|
["schedules", "schedules"],
|
|
115
|
+
["reminders", "reminders"],
|
|
115
116
|
["hooks", "hooks"],
|
|
116
117
|
["sandbox", "sandbox files"],
|
|
117
118
|
];
|
|
@@ -31,6 +31,11 @@ export declare function isCompiledDistribution(): boolean;
|
|
|
31
31
|
export declare function packageRootDir(): string;
|
|
32
32
|
/** Version of the running package (from its own package.json). */
|
|
33
33
|
export declare function packageVersion(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Git commit of a checkout-built framework distribution. Published npm
|
|
36
|
+
* packages do not carry this marker and return undefined.
|
|
37
|
+
*/
|
|
38
|
+
export declare function packageGitSha(): string | undefined;
|
|
34
39
|
/** Facts `agent-sdk version` / `--version` print. */
|
|
35
40
|
export interface CliVersionInfo {
|
|
36
41
|
/** Published npm name (`@cursor/july`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAI3C;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAYD,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CAYlD;AAED,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,cAAc,IAAI,cAAc,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAMrE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYzD"}
|
|
@@ -11,6 +11,8 @@ import { join } from "node:path";
|
|
|
11
11
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
12
12
|
/** Published npm package name (pre-launch codename for Agent SDK). */
|
|
13
13
|
export const PACKAGE_NAME = "@cursor/july";
|
|
14
|
+
const HOSTED_WORKTREE_SHA_FILENAME = ".cursor-hosted-worktree-sha";
|
|
15
|
+
const GIT_COMMIT_SHA_RE = /^[0-9a-f]{40,64}$/;
|
|
14
16
|
/**
|
|
15
17
|
* Bracketed product tag for stderr / ServeOptions.logger lines
|
|
16
18
|
* (`[agent-sdk] …`, `[agent-sdk/slack] …`).
|
|
@@ -45,6 +47,21 @@ function packageManifest() {
|
|
|
45
47
|
export function packageVersion() {
|
|
46
48
|
return packageManifest().version;
|
|
47
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Git commit of a checkout-built framework distribution. Published npm
|
|
52
|
+
* packages do not carry this marker and return undefined.
|
|
53
|
+
*/
|
|
54
|
+
export function packageGitSha() {
|
|
55
|
+
try {
|
|
56
|
+
const sha = readFileSync(join(packageRootDir(), "dist", HOSTED_WORKTREE_SHA_FILENAME), "utf8")
|
|
57
|
+
.trim()
|
|
58
|
+
.toLowerCase();
|
|
59
|
+
return GIT_COMMIT_SHA_RE.test(sha) ? sha : undefined;
|
|
60
|
+
}
|
|
61
|
+
catch (_a) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
48
65
|
export function cliVersionInfo() {
|
|
49
66
|
return {
|
|
50
67
|
name: PACKAGE_NAME,
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
* That selection is a hosting-mode question, not an authoring question.
|
|
14
14
|
* Architecture v2 moves it here: `agent/storage.ts` is rejected at
|
|
15
15
|
* discovery (error diagnostic, so serve and deploy fail early), and the
|
|
16
|
-
* platform picks the default
|
|
16
|
+
* platform picks the default. Architecture v1 with no authored file now
|
|
17
|
+
* uses the same hosted-vs-self-hosted split, so deleting `agent/storage.ts`
|
|
18
|
+
* (required to deploy the same tree onto v2) does not drop the Cursor-hosted
|
|
19
|
+
* session mirror on a still-v1 pod.
|
|
17
20
|
*
|
|
18
21
|
* - **Cursor-managed hosting** (the deployment-generation environment
|
|
19
22
|
* variable is set, same signal that registers `GET /v1/manifest`):
|
|
@@ -33,8 +36,10 @@
|
|
|
33
36
|
* - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
|
|
34
37
|
* is correct when the operator owns the disk.
|
|
35
38
|
*
|
|
36
|
-
* v1
|
|
37
|
-
*
|
|
39
|
+
* v1 still honors an authored `agent/storage.ts` when present. Hosted v1
|
|
40
|
+
* pods with no authored file get the Cursor-hosted lazy mirror (gated on
|
|
41
|
+
* `AGENT_SERVE_DEPLOYMENT_ID`, the same signal the previous authored sinks
|
|
42
|
+
* used). Self-hosted v1 with no authored file stays disk-only.
|
|
38
43
|
*
|
|
39
44
|
* Local disk is not part of this decision. `<stateRoot>/sessions/<id>/`
|
|
40
45
|
* already holds `session.json` and `events.ndjson` unconditionally, through
|
|
@@ -43,6 +48,12 @@
|
|
|
43
48
|
*/
|
|
44
49
|
import { type StorageDefinition } from "../storage.js";
|
|
45
50
|
import type { AgentArchitecture } from "../types.js";
|
|
51
|
+
/**
|
|
52
|
+
* Hosted v2 event-chunk flush debounce. Matches the session view's live poll
|
|
53
|
+
* cadence; a streaming turn still caps each chunk at the coordinator's batch
|
|
54
|
+
* limit, so a long turn writes a few dozen chunks rather than one per event.
|
|
55
|
+
*/
|
|
56
|
+
export declare const HOSTED_V2_EVENT_FLUSH_DEBOUNCE_MS = 2000;
|
|
46
57
|
export interface FrameworkStorageSelectionInput {
|
|
47
58
|
/** `agent/storage.ts`, when the author wrote one (v1 only: discovery rejects it on v2). */
|
|
48
59
|
readonly authored: StorageDefinition | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAGH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,OAAQ,CAAC;AAEvD,MAAM,WAAW,8BAA8B;IAC7C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,8BAA8B,GACpC,iBAAiB,GAAG,SAAS,CA6E/B"}
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
* That selection is a hosting-mode question, not an authoring question.
|
|
14
14
|
* Architecture v2 moves it here: `agent/storage.ts` is rejected at
|
|
15
15
|
* discovery (error diagnostic, so serve and deploy fail early), and the
|
|
16
|
-
* platform picks the default
|
|
16
|
+
* platform picks the default. Architecture v1 with no authored file now
|
|
17
|
+
* uses the same hosted-vs-self-hosted split, so deleting `agent/storage.ts`
|
|
18
|
+
* (required to deploy the same tree onto v2) does not drop the Cursor-hosted
|
|
19
|
+
* session mirror on a still-v1 pod.
|
|
17
20
|
*
|
|
18
21
|
* - **Cursor-managed hosting** (the deployment-generation environment
|
|
19
22
|
* variable is set, same signal that registers `GET /v1/manifest`):
|
|
@@ -33,8 +36,10 @@
|
|
|
33
36
|
* - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
|
|
34
37
|
* is correct when the operator owns the disk.
|
|
35
38
|
*
|
|
36
|
-
* v1
|
|
37
|
-
*
|
|
39
|
+
* v1 still honors an authored `agent/storage.ts` when present. Hosted v1
|
|
40
|
+
* pods with no authored file get the Cursor-hosted lazy mirror (gated on
|
|
41
|
+
* `AGENT_SERVE_DEPLOYMENT_ID`, the same signal the previous authored sinks
|
|
42
|
+
* used). Self-hosted v1 with no authored file stays disk-only.
|
|
38
43
|
*
|
|
39
44
|
* Local disk is not part of this decision. `<stateRoot>/sessions/<id>/`
|
|
40
45
|
* already holds `session.json` and `events.ndjson` unconditionally, through
|
|
@@ -43,10 +48,17 @@
|
|
|
43
48
|
*/
|
|
44
49
|
import { cursorHostedFiles } from "../files-backends/cursor-hosted.js";
|
|
45
50
|
import { defineStorage } from "../storage.js";
|
|
51
|
+
import { AGENT_SERVE_DEPLOYMENT_ID_ENV_VAR, cursorHostedStorage, } from "../storage-backends/cursor-hosted.js";
|
|
46
52
|
import { cursorHostedStorageV2 } from "../storage-backends/cursor-hosted-v2.js";
|
|
47
53
|
import { resolveApiKeySync } from "./cursor/credentials.js";
|
|
48
54
|
import { composeFrameworkStorage, fileSinkStorageCore, frameworkGuardedCas, } from "./framework-file-storage.js";
|
|
49
55
|
import { resolveAgentV2Hosting } from "./v2-hosting.js";
|
|
56
|
+
/**
|
|
57
|
+
* Hosted v2 event-chunk flush debounce. Matches the session view's live poll
|
|
58
|
+
* cadence; a streaming turn still caps each chunk at the coordinator's batch
|
|
59
|
+
* limit, so a long turn writes a few dozen chunks rather than one per event.
|
|
60
|
+
*/
|
|
61
|
+
export const HOSTED_V2_EVENT_FLUSH_DEBOUNCE_MS = 2000;
|
|
50
62
|
/**
|
|
51
63
|
* Pick the backend for framework session state.
|
|
52
64
|
*
|
|
@@ -54,9 +66,19 @@ import { resolveAgentV2Hosting } from "./v2-hosting.js";
|
|
|
54
66
|
* disk is the only copy.
|
|
55
67
|
*/
|
|
56
68
|
export function selectFrameworkStorageDefinition(input) {
|
|
69
|
+
var _a, _b;
|
|
57
70
|
if (input.architecture !== "v2") {
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
if (input.authored !== undefined) {
|
|
72
|
+
return input.authored;
|
|
73
|
+
}
|
|
74
|
+
const env = (_a = input.env) !== null && _a !== void 0 ? _a : process.env;
|
|
75
|
+
if (((_b = env[AGENT_SERVE_DEPLOYMENT_ID_ENV_VAR]) !== null && _b !== void 0 ? _b : "").trim() !== "") {
|
|
76
|
+
// Hosted v1 pod with no authored sink: keep the Cursor-hosted
|
|
77
|
+
// mirror (lazy restore) so agents can delete `agent/storage.ts`
|
|
78
|
+
// without losing durability while they still run architecture v1.
|
|
79
|
+
return defineStorage(Object.assign({ name: "cursor-hosted (lazy restore)", policy: { restore: "off" } }, cursorHostedStorage()));
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
60
82
|
}
|
|
61
83
|
if (input.authored !== undefined) {
|
|
62
84
|
// Discovery rejects agent/storage.ts on v2 before an engine is built;
|
|
@@ -77,7 +99,15 @@ export function selectFrameworkStorageDefinition(input) {
|
|
|
77
99
|
// backend it is per-key HTTP round trips before the listener even
|
|
78
100
|
// comes up). Follow-ups restore lazily by continuation or session id;
|
|
79
101
|
// GET /v1/sessions lists from the sink either way.
|
|
80
|
-
|
|
102
|
+
//
|
|
103
|
+
// Events flush on a quiet-period debounce rather than only at turn end so
|
|
104
|
+
// the read-only session view and dashboard trace (which have no resident
|
|
105
|
+
// engine to ask) see steps mid-turn. The turn-end record still lands
|
|
106
|
+
// before the execution reply: drainSessionDurability forces the flush.
|
|
107
|
+
const policy = {
|
|
108
|
+
restore: "off",
|
|
109
|
+
debounceMs: HOSTED_V2_EVENT_FLUSH_DEBOUNCE_MS,
|
|
110
|
+
};
|
|
81
111
|
// Full chain (env → bind file → stored login): frozen engines listen
|
|
82
112
|
// unsigned and bind store ids + CURSOR_API_KEY at task time, after this
|
|
83
113
|
// definition is constructed.
|
|
@@ -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
|
export declare const GUEST_NETWORK_UNAVAILABLE = "guest_network_unavailable";
|
|
22
20
|
export declare const GUEST_CONNECT_STALLED = "guest_connect_stalled";
|
|
@@ -39,9 +37,7 @@ export declare class GuestNetworkUnavailableError extends Error {
|
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
39
|
* True when the error (or anything on its `cause` chain, or inside an
|
|
42
|
-
* `AggregateError`)
|
|
43
|
-
* undici's `TypeError: fetch failed` as `ConnectError` and keeps the
|
|
44
|
-
* original on `cause`.
|
|
40
|
+
* `AggregateError`) carries a known network-level code.
|
|
45
41
|
*/
|
|
46
42
|
export declare function isTransientGuestNetworkError(error: unknown): boolean;
|
|
47
43
|
export declare function hasGuestNetworkErrno(error: unknown): boolean;
|
|
@@ -52,8 +48,6 @@ export declare function hasGuestNetworkErrno(error: unknown): boolean;
|
|
|
52
48
|
* mapper can return `guest_connect_stalled` instead of a mystery 503.
|
|
53
49
|
*/
|
|
54
50
|
export declare function isQuietGuestConnectStall(error: unknown): boolean;
|
|
55
|
-
/** Message-only form for `waitForCompletion` outcomes that do not throw. */
|
|
56
|
-
export declare function isQuietGuestConnectStallMessage(message: string): boolean;
|
|
57
51
|
/** Last-line wait inside an already-open hosted POST. */
|
|
58
52
|
export declare const DEFAULT_WAIT_TIMEOUT_MS = 8000;
|
|
59
53
|
export type GuestNetworkWaitOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guest-network.d.ts","sourceRoot":"","sources":["../../src/internal/guest-network.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"guest-network.d.ts","sourceRoot":"","sources":["../../src/internal/guest-network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,QAAS,CAAC;AAuB1D,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,QAAQ,CAAC,IAAI,EAAE,OAAO,yBAAyB,CAA6B;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,YACE,OAAO,SAAsD,EAC7D,MAAM,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAO,EAMzD;CACF;AASD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpE;AAeD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQhE;AA4FD,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAG7C,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC,CAAC;AA+CF,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1E,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,uBAAuB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,qBAAqB,GAC3B,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAkDjC;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,QAAQ,CAAC,CAuCnB"}
|