@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
|
@@ -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
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -27,6 +25,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
25
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
26
|
});
|
|
29
27
|
};
|
|
28
|
+
import { HOSTED_GUEST_RETRY_TRANSIENT } from "./hosted-delivery-protocol.js";
|
|
30
29
|
export const GUEST_NETWORK_UNAVAILABLE = "guest_network_unavailable";
|
|
31
30
|
export const GUEST_CONNECT_STALLED = "guest_connect_stalled";
|
|
32
31
|
/** Control-plane readiness probe. Auth none, same as `/v1/health`. */
|
|
@@ -66,11 +65,15 @@ export class GuestNetworkUnavailableError extends Error {
|
|
|
66
65
|
this.probeAttempts = (_b = extras.probeAttempts) !== null && _b !== void 0 ? _b : 0;
|
|
67
66
|
}
|
|
68
67
|
}
|
|
68
|
+
class GuestNetworkProbeFailedError extends Error {
|
|
69
|
+
constructor(cause) {
|
|
70
|
+
super("Guest network probe failed", { cause });
|
|
71
|
+
this.name = "GuestNetworkProbeFailedError";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
69
74
|
/**
|
|
70
75
|
* True when the error (or anything on its `cause` chain, or inside an
|
|
71
|
-
* `AggregateError`)
|
|
72
|
-
* undici's `TypeError: fetch failed` as `ConnectError` and keeps the
|
|
73
|
-
* original on `cause`.
|
|
76
|
+
* `AggregateError`) carries a known network-level code.
|
|
74
77
|
*/
|
|
75
78
|
export function isTransientGuestNetworkError(error) {
|
|
76
79
|
return isTransientAtDepth(error, 0);
|
|
@@ -85,7 +88,8 @@ const QUIET_CONNECT_ERROR_CODES = new Set([
|
|
|
85
88
|
"UND_ERR_BODY_TIMEOUT",
|
|
86
89
|
"UND_ERR_HEADERS_TIMEOUT",
|
|
87
90
|
]);
|
|
88
|
-
|
|
91
|
+
// gRPC Canceled, Unknown, and Unavailable.
|
|
92
|
+
const QUIET_CONNECT_CODES = new Set([1, 2, 14]);
|
|
89
93
|
export function hasGuestNetworkErrno(error) {
|
|
90
94
|
return hasCodeAtDepth(error, 0, TRANSIENT_NETWORK_ERROR_CODES);
|
|
91
95
|
}
|
|
@@ -104,14 +108,14 @@ export function isQuietGuestConnectStall(error) {
|
|
|
104
108
|
}
|
|
105
109
|
return isQuietSignatureAtDepth(error, 0);
|
|
106
110
|
}
|
|
107
|
-
/** Message-only form for `waitForCompletion` outcomes that do not throw. */
|
|
108
|
-
export function isQuietGuestConnectStallMessage(message) {
|
|
109
|
-
return QUIET_CONNECT_MESSAGE.test(message);
|
|
110
|
-
}
|
|
111
111
|
function errorCode(error) {
|
|
112
112
|
const code = error.code;
|
|
113
113
|
return typeof code === "string" && code.length > 0 ? code : undefined;
|
|
114
114
|
}
|
|
115
|
+
function numericErrorCode(error) {
|
|
116
|
+
const code = error.code;
|
|
117
|
+
return typeof code === "number" ? code : undefined;
|
|
118
|
+
}
|
|
115
119
|
function hasCodeAtDepth(error, depth, codes) {
|
|
116
120
|
if (depth >= MAX_CAUSE_DEPTH || !(error instanceof Error)) {
|
|
117
121
|
return false;
|
|
@@ -130,14 +134,15 @@ function isQuietSignatureAtDepth(error, depth) {
|
|
|
130
134
|
if (depth >= MAX_CAUSE_DEPTH || !(error instanceof Error)) {
|
|
131
135
|
return false;
|
|
132
136
|
}
|
|
133
|
-
if (error
|
|
137
|
+
if (error.name === "AbortError") {
|
|
134
138
|
return true;
|
|
135
139
|
}
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
140
|
+
const numericCode = numericErrorCode(error);
|
|
141
|
+
if (numericCode !== undefined && QUIET_CONNECT_CODES.has(numericCode)) {
|
|
138
142
|
return true;
|
|
139
143
|
}
|
|
140
|
-
|
|
144
|
+
const code = errorCode(error);
|
|
145
|
+
if (code !== undefined && QUIET_CONNECT_ERROR_CODES.has(code)) {
|
|
141
146
|
return true;
|
|
142
147
|
}
|
|
143
148
|
if (error instanceof AggregateError &&
|
|
@@ -150,10 +155,17 @@ function isTransientAtDepth(error, depth) {
|
|
|
150
155
|
if (depth >= MAX_CAUSE_DEPTH || !(error instanceof Error)) {
|
|
151
156
|
return false;
|
|
152
157
|
}
|
|
153
|
-
if (error instanceof
|
|
158
|
+
if (error instanceof GuestNetworkUnavailableError) {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
if (error instanceof GuestNetworkProbeFailedError) {
|
|
154
162
|
return true;
|
|
155
163
|
}
|
|
156
|
-
if (error
|
|
164
|
+
if (error.name === "AbortError") {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
const numericCode = numericErrorCode(error);
|
|
168
|
+
if (numericCode !== undefined && QUIET_CONNECT_CODES.has(numericCode)) {
|
|
157
169
|
return true;
|
|
158
170
|
}
|
|
159
171
|
const code = errorCode(error);
|
|
@@ -198,13 +210,18 @@ function waitEnabled(options) {
|
|
|
198
210
|
function defaultProbe(probeUrl, probeTimeoutMs) {
|
|
199
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
212
|
var _a;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
213
|
+
try {
|
|
214
|
+
// Any HTTP response means egress and DNS work. 401/404 are ready.
|
|
215
|
+
const response = yield fetch(probeUrl, {
|
|
216
|
+
method: "GET",
|
|
217
|
+
redirect: "manual",
|
|
218
|
+
signal: AbortSignal.timeout(probeTimeoutMs),
|
|
219
|
+
});
|
|
220
|
+
void ((_a = response.body) === null || _a === void 0 ? void 0 : _a.cancel());
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
throw new GuestNetworkProbeFailedError(error);
|
|
224
|
+
}
|
|
208
225
|
});
|
|
209
226
|
}
|
|
210
227
|
/**
|
|
@@ -290,6 +307,7 @@ export function guestNetworkReadinessResponse() {
|
|
|
290
307
|
return new Response(JSON.stringify({
|
|
291
308
|
ok: false,
|
|
292
309
|
error: GUEST_NETWORK_UNAVAILABLE,
|
|
310
|
+
retry: HOSTED_GUEST_RETRY_TRANSIENT,
|
|
293
311
|
message: error.message,
|
|
294
312
|
waitMs: error.waitMs,
|
|
295
313
|
probeAttempts: error.probeAttempts,
|
|
@@ -18,6 +18,8 @@ export type HostedAdmissionAdapter = {
|
|
|
18
18
|
*/
|
|
19
19
|
prepareArgs?(args: ChannelHandlerArgs): ChannelHandlerArgs;
|
|
20
20
|
dispatch(input: {
|
|
21
|
+
/** Mounted channel id the delivery addressed (always set by hosted delivery). */
|
|
22
|
+
channelId?: string;
|
|
21
23
|
eventType: string;
|
|
22
24
|
payload: unknown;
|
|
23
25
|
deliveryId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-admission-adapter.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-admission-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,kBAAkB,CAAC;KAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACvB,CAAC;AAIF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,sBAAsB,GAC9B,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,sBAAsB,GAAG,SAAS,CAEpC"}
|
|
1
|
+
{"version":3,"file":"hosted-admission-adapter.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-admission-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE;QACd,iFAAiF;QACjF,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,kBAAkB,CAAC;KAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACvB,CAAC;AAIF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,sBAAsB,GAC9B,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,sBAAsB,GAAG,SAAS,CAEpC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
export declare const AGENT_SDK_CATCH_ENVELOPE_VERSION = 1;
|
|
16
|
+
export declare const AGENT_SDK_CATCH_EVENT_TYPE = "http.request";
|
|
17
|
+
export declare const AGENT_SDK_CUSTOM_CHANNEL_KIND = "custom";
|
|
18
|
+
export declare const AGENT_SDK_SESSION_EVENT_TYPE = "agentsdk.session";
|
|
19
|
+
export declare const AGENT_SDK_HTTP_CHANNEL_ID = "http";
|
|
20
|
+
export declare const AGENT_SDK_HTTP_CHANNEL_KIND = "http";
|
|
21
|
+
export declare const AGENT_SDK_SESSION_RESUME_KEY_PREFIX = "cont:session:";
|
|
22
|
+
export declare const AGENT_SDK_CATCH_MAX_BODY_BYTES: number;
|
|
23
|
+
export declare const AGENT_SDK_CATCH_ROUTE_METHODS: readonly ["GET", "POST", "PUT", "PATCH", "DELETE"];
|
|
24
|
+
export type CatchRouteMethod = (typeof AGENT_SDK_CATCH_ROUTE_METHODS)[number];
|
|
25
|
+
export type CatchRequestEnvelope = {
|
|
26
|
+
v: 1;
|
|
27
|
+
method: CatchRouteMethod;
|
|
28
|
+
/** Channel-relative path, e.g. `/webhook`. */
|
|
29
|
+
path: string;
|
|
30
|
+
/** Raw query string without the leading `?`; empty when absent. */
|
|
31
|
+
query: string;
|
|
32
|
+
/** Lowercased header names. */
|
|
33
|
+
headers: Record<string, string>;
|
|
34
|
+
body: {
|
|
35
|
+
encoding: "utf8" | "base64";
|
|
36
|
+
data: string;
|
|
37
|
+
} | null;
|
|
38
|
+
receivedAt: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Mailbox key the control plane stamps on an explicit `ses_…` resume. The
|
|
42
|
+
* suffix is the CP session id the hosted execution also names, so the
|
|
43
|
+
* engine can recognise the key as "this existing session" rather than a
|
|
44
|
+
* new continuation identity.
|
|
45
|
+
*/
|
|
46
|
+
export declare function hostedSessionResumeKey(sessionPublicId: string): string;
|
|
47
|
+
/** Strict parse of a claim-checked catch envelope; anything else is undefined. */
|
|
48
|
+
export declare function parseCatchRequestEnvelope(value: unknown): CatchRequestEnvelope | undefined;
|
|
49
|
+
/** Raw request bytes from an envelope body; empty for a null body. */
|
|
50
|
+
export declare function decodeCatchBody(body: CatchRequestEnvelope["body"]): Buffer;
|
|
51
|
+
//# sourceMappingURL=hosted-catch-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-catch-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-catch-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AACzD,eAAO,MAAM,6BAA6B,WAAW,CAAC;AACtD,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAC/D,eAAO,MAAM,yBAAyB,SAAS,CAAC;AAChD,eAAO,MAAM,2BAA2B,SAAS,CAAC;AAClD,eAAO,MAAM,mCAAmC,kBAAkB,CAAC;AACnE,eAAO,MAAM,8BAA8B,EAAE,MAAmB,CAAC;AAEjE,eAAO,MAAM,6BAA6B,YACxC,KAAK,EACL,MAAM,EACN,KAAK,EACL,OAAO,EACP,QAAQ,CACA,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,EAAE,CAAC,CAAC;IACL,MAAM,EAAE,gBAAgB,CAAC;IACzB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3D,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAEtE;AAqBD,kFAAkF;AAClF,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,GACb,oBAAoB,GAAG,SAAS,CA2ClC;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,MAAM,CAK1E"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
export const AGENT_SDK_CATCH_ENVELOPE_VERSION = 1;
|
|
16
|
+
export const AGENT_SDK_CATCH_EVENT_TYPE = "http.request";
|
|
17
|
+
export const AGENT_SDK_CUSTOM_CHANNEL_KIND = "custom";
|
|
18
|
+
export const AGENT_SDK_SESSION_EVENT_TYPE = "agentsdk.session";
|
|
19
|
+
export const AGENT_SDK_HTTP_CHANNEL_ID = "http";
|
|
20
|
+
export const AGENT_SDK_HTTP_CHANNEL_KIND = "http";
|
|
21
|
+
export const AGENT_SDK_SESSION_RESUME_KEY_PREFIX = "cont:session:";
|
|
22
|
+
export const AGENT_SDK_CATCH_MAX_BODY_BYTES = 256 * 1024;
|
|
23
|
+
export const AGENT_SDK_CATCH_ROUTE_METHODS = [
|
|
24
|
+
"GET",
|
|
25
|
+
"POST",
|
|
26
|
+
"PUT",
|
|
27
|
+
"PATCH",
|
|
28
|
+
"DELETE",
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Mailbox key the control plane stamps on an explicit `ses_…` resume. The
|
|
32
|
+
* suffix is the CP session id the hosted execution also names, so the
|
|
33
|
+
* engine can recognise the key as "this existing session" rather than a
|
|
34
|
+
* new continuation identity.
|
|
35
|
+
*/
|
|
36
|
+
export function hostedSessionResumeKey(sessionPublicId) {
|
|
37
|
+
return `${AGENT_SDK_SESSION_RESUME_KEY_PREFIX}${sessionPublicId}`;
|
|
38
|
+
}
|
|
39
|
+
const ENVELOPE_KEYS = new Set([
|
|
40
|
+
"v",
|
|
41
|
+
"method",
|
|
42
|
+
"path",
|
|
43
|
+
"query",
|
|
44
|
+
"headers",
|
|
45
|
+
"body",
|
|
46
|
+
"receivedAt",
|
|
47
|
+
]);
|
|
48
|
+
const METHODS = new Set(AGENT_SDK_CATCH_ROUTE_METHODS);
|
|
49
|
+
const MAX_PATH_CHARS = 1024;
|
|
50
|
+
const MAX_QUERY_CHARS = 4096;
|
|
51
|
+
const MAX_HEADER_COUNT = 64;
|
|
52
|
+
const MAX_HEADER_BYTES = 16 * 1024;
|
|
53
|
+
function isRecord(value) {
|
|
54
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
55
|
+
}
|
|
56
|
+
/** Strict parse of a claim-checked catch envelope; anything else is undefined. */
|
|
57
|
+
export function parseCatchRequestEnvelope(value) {
|
|
58
|
+
if (!isRecord(value)) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
if (Object.keys(value).some((key) => !ENVELOPE_KEYS.has(key)) ||
|
|
62
|
+
value.v !== AGENT_SDK_CATCH_ENVELOPE_VERSION ||
|
|
63
|
+
typeof value.method !== "string" ||
|
|
64
|
+
!METHODS.has(value.method) ||
|
|
65
|
+
typeof value.path !== "string" ||
|
|
66
|
+
!value.path.startsWith("/") ||
|
|
67
|
+
value.path.length > MAX_PATH_CHARS ||
|
|
68
|
+
typeof value.query !== "string" ||
|
|
69
|
+
value.query.length > MAX_QUERY_CHARS ||
|
|
70
|
+
typeof value.receivedAt !== "string" ||
|
|
71
|
+
!isRecord(value.headers)) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
const entries = Object.entries(value.headers);
|
|
75
|
+
if (entries.length > MAX_HEADER_COUNT) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
let headerBytes = 0;
|
|
79
|
+
for (const [name, headerValue] of entries) {
|
|
80
|
+
if (typeof headerValue !== "string" || name !== name.toLowerCase()) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
headerBytes += name.length + headerValue.length;
|
|
84
|
+
}
|
|
85
|
+
if (headerBytes > MAX_HEADER_BYTES) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
if (value.body !== null) {
|
|
89
|
+
if (!isRecord(value.body) ||
|
|
90
|
+
(value.body.encoding !== "utf8" && value.body.encoding !== "base64") ||
|
|
91
|
+
typeof value.body.data !== "string") {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
/** Raw request bytes from an envelope body; empty for a null body. */
|
|
98
|
+
export function decodeCatchBody(body) {
|
|
99
|
+
if (body === null) {
|
|
100
|
+
return Buffer.alloc(0);
|
|
101
|
+
}
|
|
102
|
+
return Buffer.from(body.data, body.encoding);
|
|
103
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hosted admission for caught HTTP requests.
|
|
3
|
+
*
|
|
4
|
+
* The control plane accepted a request on one of this channel's declared
|
|
5
|
+
* routes, verified the deployment's secret, and claim-checked the request
|
|
6
|
+
* as a {@link CatchRequestEnvelope}. Admission replays that request into
|
|
7
|
+
* the authored route handler exactly as the local router would have
|
|
8
|
+
* (same route table, same Zod schema gate), with the control plane as the
|
|
9
|
+
* authenticated principal. A captured `send()` becomes the pending send;
|
|
10
|
+
* a handler that answers without sending is a `skip`.
|
|
11
|
+
*/
|
|
12
|
+
import type { AuthContext, ChannelDefinition, ChannelHandlerArgs, ChannelRoute } from "../types.js";
|
|
13
|
+
import { type CatchRequestEnvelope } from "./hosted-catch-protocol.js";
|
|
14
|
+
/** Header a replayed request carries so handlers can dedupe on delivery. */
|
|
15
|
+
export declare const CATCH_DELIVERY_ID_HEADER = "x-agent-sdk-delivery-id";
|
|
16
|
+
/**
|
|
17
|
+
* Principal for a replayed request. The deployment secret was checked by
|
|
18
|
+
* the control plane before compute existed; the channel's own auth chain
|
|
19
|
+
* does not run again in the VM.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CATCH_AUTH_CONTEXT: AuthContext;
|
|
22
|
+
export declare function catchRequestFromEnvelope(input: {
|
|
23
|
+
channelId: string;
|
|
24
|
+
deliveryId: string;
|
|
25
|
+
envelope: CatchRequestEnvelope;
|
|
26
|
+
}): Request;
|
|
27
|
+
export declare function replayCatchRequest(input: {
|
|
28
|
+
channelId: string;
|
|
29
|
+
deliveryId: string;
|
|
30
|
+
routes: readonly ChannelRoute[];
|
|
31
|
+
payload: unknown;
|
|
32
|
+
args: ChannelHandlerArgs;
|
|
33
|
+
}): Promise<Response>;
|
|
34
|
+
/**
|
|
35
|
+
* Attach catch admission to an authored channel. Provider packs attach
|
|
36
|
+
* their own adapter afterwards and replace this one; the control plane
|
|
37
|
+
* never sends `http.request` to a pack kind in any case.
|
|
38
|
+
*/
|
|
39
|
+
export declare function attachCatchAdmission(definition: ChannelDefinition<unknown>, routes: readonly ChannelRoute[]): void;
|
|
40
|
+
//# sourceMappingURL=hosted-catch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-catch.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-catch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACb,MAAM,aAAa,CAAC;AAUrB,OAAO,EAGL,KAAK,oBAAoB,EAG1B,MAAM,4BAA4B,CAAC;AAIpC,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,4BAA4B,CAAC;AAIlE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAIhC,CAAC;AAIF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,oBAAoB,CAAC;CAChC,GAAG,OAAO,CAgBV;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkFpB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACtC,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,IAAI,CAgBN"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hosted admission for caught HTTP requests.
|
|
3
|
+
*
|
|
4
|
+
* The control plane accepted a request on one of this channel's declared
|
|
5
|
+
* routes, verified the deployment's secret, and claim-checked the request
|
|
6
|
+
* as a {@link CatchRequestEnvelope}. Admission replays that request into
|
|
7
|
+
* the authored route handler exactly as the local router would have
|
|
8
|
+
* (same route table, same Zod schema gate), with the control plane as the
|
|
9
|
+
* authenticated principal. A captured `send()` becomes the pending send;
|
|
10
|
+
* a handler that answers without sending is a `skip`.
|
|
11
|
+
*/
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { acknowledgeTurn, dispatchOutcome, skipped, tagOutcome, } from "./channel-dispatch.js";
|
|
22
|
+
import { invokeChannelRoute } from "./channel-route-dispatch.js";
|
|
23
|
+
import { DeferredChannelSessionError } from "./deferred-channel-session.js";
|
|
24
|
+
import { attachHostedAdmissionAdapter } from "./hosted-admission-adapter.js";
|
|
25
|
+
import { AGENT_SDK_CATCH_EVENT_TYPE, AGENT_SDK_CUSTOM_CHANNEL_KIND, decodeCatchBody, parseCatchRequestEnvelope, } from "./hosted-catch-protocol.js";
|
|
26
|
+
import { errorResponse } from "./http-channel.js";
|
|
27
|
+
import { Router } from "./router.js";
|
|
28
|
+
/** Header a replayed request carries so handlers can dedupe on delivery. */
|
|
29
|
+
export const CATCH_DELIVERY_ID_HEADER = "x-agent-sdk-delivery-id";
|
|
30
|
+
/** Placeholder origin for replayed requests; handlers see a well-formed URL. */
|
|
31
|
+
const CATCH_REQUEST_ORIGIN = "http://agent-sdk.hosted";
|
|
32
|
+
/**
|
|
33
|
+
* Principal for a replayed request. The deployment secret was checked by
|
|
34
|
+
* the control plane before compute existed; the channel's own auth chain
|
|
35
|
+
* does not run again in the VM.
|
|
36
|
+
*/
|
|
37
|
+
export const CATCH_AUTH_CONTEXT = {
|
|
38
|
+
authenticator: "control-plane-catch",
|
|
39
|
+
principalId: "agent-sdk:catch",
|
|
40
|
+
principalType: "runtime",
|
|
41
|
+
};
|
|
42
|
+
const BODYLESS_METHODS = new Set(["GET", "HEAD"]);
|
|
43
|
+
export function catchRequestFromEnvelope(input) {
|
|
44
|
+
const { envelope } = input;
|
|
45
|
+
const url = `${CATCH_REQUEST_ORIGIN}/v1/channels/${input.channelId}${envelope.path}${envelope.query === "" ? "" : `?${envelope.query}`}`;
|
|
46
|
+
const headers = new Headers(envelope.headers);
|
|
47
|
+
headers.set(CATCH_DELIVERY_ID_HEADER, input.deliveryId);
|
|
48
|
+
const body = decodeCatchBody(envelope.body);
|
|
49
|
+
return new Request(url, {
|
|
50
|
+
method: envelope.method,
|
|
51
|
+
headers,
|
|
52
|
+
body: body.length === 0 || BODYLESS_METHODS.has(envelope.method)
|
|
53
|
+
? undefined
|
|
54
|
+
: new Uint8Array(body),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function replayCatchRequest(input) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const envelope = parseCatchRequestEnvelope(input.payload);
|
|
60
|
+
if (envelope === undefined) {
|
|
61
|
+
return errorResponse(400, "invalid_catch_envelope", "Expected a supported Agent SDK catch request envelope.");
|
|
62
|
+
}
|
|
63
|
+
const router = new Router();
|
|
64
|
+
for (const route of input.routes) {
|
|
65
|
+
router.add({
|
|
66
|
+
method: route.method,
|
|
67
|
+
pattern: route.path,
|
|
68
|
+
auth: "none",
|
|
69
|
+
handler: () => errorResponse(500, "unreachable", "unreachable"),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
const matched = router.match(envelope.method, envelope.path);
|
|
73
|
+
const route = input.routes.find((candidate) => candidate.method === (matched === null || matched === void 0 ? void 0 : matched.route.method) &&
|
|
74
|
+
candidate.path === matched.route.pattern);
|
|
75
|
+
if (matched === undefined || route === undefined) {
|
|
76
|
+
// The control plane routes from the same pinned manifest this VM was
|
|
77
|
+
// frozen from; a miss here is drift, not a caller error.
|
|
78
|
+
return errorResponse(404, "route_not_declared", `No ${envelope.method} ${envelope.path} route is mounted on channel "${input.channelId}".`);
|
|
79
|
+
}
|
|
80
|
+
const request = catchRequestFromEnvelope({
|
|
81
|
+
channelId: input.channelId,
|
|
82
|
+
deliveryId: input.deliveryId,
|
|
83
|
+
envelope,
|
|
84
|
+
});
|
|
85
|
+
let response;
|
|
86
|
+
try {
|
|
87
|
+
response = yield invokeChannelRoute({
|
|
88
|
+
route,
|
|
89
|
+
request,
|
|
90
|
+
handlerArgs: Object.assign(Object.assign({}, input.args), { params: matched.params, auth: CATCH_AUTH_CONTEXT }),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
// `return Response.json({ sessionId: session.id })` after `send()` is
|
|
95
|
+
// the ordinary local webhook shape. Hosted, `send()` is captured and the
|
|
96
|
+
// handle is deferred, so reading `.id` throws — but nobody reads this
|
|
97
|
+
// handler's HTTP reply hosted; the captured send is the outcome.
|
|
98
|
+
if (error instanceof DeferredChannelSessionError) {
|
|
99
|
+
return acknowledgeTurn();
|
|
100
|
+
}
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
// A 2xx the handler did not tag and in which nothing was captured means
|
|
104
|
+
// it handled the request itself (acknowledged, ignored, replied). There is
|
|
105
|
+
// nothing to execute: report skip instead of failing the delivery.
|
|
106
|
+
if (response.ok && dispatchOutcome(response) === undefined) {
|
|
107
|
+
return tagOutcome(response, "skip");
|
|
108
|
+
}
|
|
109
|
+
// A 4xx is the handler rejecting the sender (bad signature on a
|
|
110
|
+
// handler-verified `publicEndpoint()` route, schema mismatch, unknown
|
|
111
|
+
// event). The sender already has its 202; retrying the delivery cannot
|
|
112
|
+
// change the verdict, so report a cheap skip that lets the control plane
|
|
113
|
+
// discard the compute instead of failing and retrying the activity.
|
|
114
|
+
if (response.status >= 400 && response.status < 500) {
|
|
115
|
+
// Logged so a probed public route or a misconfigured provider secret is
|
|
116
|
+
// distinguishable from a benign "nothing to do" skip in the guest logs;
|
|
117
|
+
// the wire outcome to the control plane is still `skip`.
|
|
118
|
+
console.info(`[agent-sdk] catch replay rejected by handler deliveryId=${input.deliveryId} channelId=${input.channelId} route=${envelope.method} ${route.path} status=${String(response.status)}`);
|
|
119
|
+
return skipped(`handler rejected the request (${response.status})`, {
|
|
120
|
+
status: response.status,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return response;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Attach catch admission to an authored channel. Provider packs attach
|
|
128
|
+
* their own adapter afterwards and replace this one; the control plane
|
|
129
|
+
* never sends `http.request` to a pack kind in any case.
|
|
130
|
+
*/
|
|
131
|
+
export function attachCatchAdmission(definition, routes) {
|
|
132
|
+
var _a;
|
|
133
|
+
var _b;
|
|
134
|
+
attachHostedAdmissionAdapter(definition, {
|
|
135
|
+
kind: (_b = (_a = definition.meta) === null || _a === void 0 ? void 0 : _a.kind) !== null && _b !== void 0 ? _b : AGENT_SDK_CUSTOM_CHANNEL_KIND,
|
|
136
|
+
dispatch: ({ channelId, eventType, payload, deliveryId, args }) => {
|
|
137
|
+
if (eventType !== AGENT_SDK_CATCH_EVENT_TYPE) {
|
|
138
|
+
return Promise.resolve(skipped("not a caught http request"));
|
|
139
|
+
}
|
|
140
|
+
return replayCatchRequest({
|
|
141
|
+
channelId: channelId !== null && channelId !== void 0 ? channelId : "channel",
|
|
142
|
+
deliveryId,
|
|
143
|
+
routes,
|
|
144
|
+
payload,
|
|
145
|
+
args,
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
}
|
|
@@ -2,6 +2,41 @@ export declare const HOSTED_DELIVERY_PROTOCOL_VERSION = 2;
|
|
|
2
2
|
export declare const HOSTED_DELIVERY_HEADER = "x-agent-sdk-hosted-delivery";
|
|
3
3
|
export declare const HOSTED_ADMISSION_PATH = "/v1/internal/hosted-admission";
|
|
4
4
|
export declare const HOSTED_EXECUTION_PATH = "/v1/internal/hosted-execution";
|
|
5
|
+
export declare const HOSTED_GUEST_RETRY_TRANSIENT = "transient";
|
|
6
|
+
export declare const HOSTED_GUEST_RETRY_TERMINAL = "terminal";
|
|
7
|
+
export type HostedGuestRetryDisposition = typeof HOSTED_GUEST_RETRY_TRANSIENT | typeof HOSTED_GUEST_RETRY_TERMINAL;
|
|
8
|
+
export declare const HOSTED_FAILURE_CLASSIFICATION_VERSION = 1;
|
|
9
|
+
export type HostedFailureDomain = "configuration" | "protocol" | "platform" | "agent" | "dependency" | "cancellation" | "unknown";
|
|
10
|
+
export type HostedFailureSource = "tas" | "factory" | "anyrun" | "engine" | "agent";
|
|
11
|
+
export type HostedFailureClassification = {
|
|
12
|
+
v: typeof HOSTED_FAILURE_CLASSIFICATION_VERSION;
|
|
13
|
+
domain: HostedFailureDomain;
|
|
14
|
+
source: HostedFailureSource;
|
|
15
|
+
};
|
|
16
|
+
export type HostedFailureCode = "agent_admission_threw" | "agent_dependency_failed" | "background_dispatch_failed" | "bound_secrets_not_consumed" | "channel_dispatch_failed" | "channel_kind_mismatch" | "channel_not_found" | "channel_outcome_missing" | "forbidden" | "guest_connect_stalled" | "guest_network_unavailable" | "hosted_admission_session_mismatch" | "hosted_admission_unavailable" | "hosted_deferred_session_unusable" | "hosted_local_send_rejected" | "hosted_send_limit_exceeded" | "internal_error" | "invalid_hosted_admission" | "invalid_hosted_execution" | "invalid_request" | "method_not_allowed" | "not_found" | "session_busy" | "turn_cancelled" | "turn_failed" | "unauthorized" | "v2_identity_conflict";
|
|
17
|
+
export declare const HOSTED_FAILURE_CLASSIFICATIONS: Record<HostedFailureCode, Omit<HostedFailureClassification, "v">>;
|
|
18
|
+
export declare function hostedFailureClassification(code: string): HostedFailureClassification;
|
|
19
|
+
export declare function parseHostedFailureClassification(value: unknown): HostedFailureClassification | undefined;
|
|
20
|
+
export type HostedGuestError = {
|
|
21
|
+
ok: false;
|
|
22
|
+
error: string;
|
|
23
|
+
retry: HostedGuestRetryDisposition;
|
|
24
|
+
classification: HostedFailureClassification;
|
|
25
|
+
message?: string;
|
|
26
|
+
turnStatus?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Hosted delivery is the only HTTP surface whose failures drive Temporal
|
|
30
|
+
* retries. Keep its retry disposition explicit instead of making the shared
|
|
31
|
+
* HTTP error helper guess from a status code.
|
|
32
|
+
*/
|
|
33
|
+
export declare function hostedGuestErrorResponse(input: {
|
|
34
|
+
status: number;
|
|
35
|
+
error: string;
|
|
36
|
+
retry: HostedGuestRetryDisposition;
|
|
37
|
+
message?: string;
|
|
38
|
+
turnStatus?: string;
|
|
39
|
+
}): Response;
|
|
5
40
|
/**
|
|
6
41
|
* Filename under the serve `--state-root` (not the per-slug SessionEngine
|
|
7
42
|
* dir). Hosted freeze uses `/workspace/.agent-serve`; the Temporal host
|
|
@@ -9,6 +44,45 @@ export declare const HOSTED_EXECUTION_PATH = "/v1/internal/hosted-execution";
|
|
|
9
44
|
* Must match `AGENT_SERVE_ENGINE_HOSTED_EXECUTION_DIAG_PATH` basename.
|
|
10
45
|
*/
|
|
11
46
|
export declare const HOSTED_EXECUTION_DIAG_FILENAME = "hosted-execution.json";
|
|
47
|
+
/**
|
|
48
|
+
* Reserved hosted-admission `channelKind` for durable reminder fires.
|
|
49
|
+
* Bypasses authored channel admission and invokes ReminderRunner.dispatch.
|
|
50
|
+
* Backend builds envelopes with this constant + {@link HOSTED_REMINDER_EVENT_TYPE}.
|
|
51
|
+
*/
|
|
52
|
+
export declare const HOSTED_REMINDER_CHANNEL_KIND = "agent-sdk:reminder";
|
|
53
|
+
/**
|
|
54
|
+
* Reserved hosted-admission `eventType` for durable reminder fires.
|
|
55
|
+
* Payload is {@link HostedReminderFirePayload}.
|
|
56
|
+
*/
|
|
57
|
+
export declare const HOSTED_REMINDER_EVENT_TYPE = "agent-sdk.reminder/fire";
|
|
58
|
+
/** Compact reminder-fire payload on the reserved hosted-admission path. */
|
|
59
|
+
export type HostedReminderFirePayload = {
|
|
60
|
+
reminderId: string;
|
|
61
|
+
fireCount: number;
|
|
62
|
+
};
|
|
63
|
+
/** Protocol v1 immutable fire descriptor (architecture v2 CP path). */
|
|
64
|
+
export type HostedReminderFireDescriptorPayload = {
|
|
65
|
+
protocolVersion: 1;
|
|
66
|
+
id: string;
|
|
67
|
+
fireCount: number;
|
|
68
|
+
generation: number;
|
|
69
|
+
purpose: string;
|
|
70
|
+
channelId: string;
|
|
71
|
+
continuationToken: string;
|
|
72
|
+
target?: Record<string, unknown>;
|
|
73
|
+
scheduleKind: "every" | "cron" | "delay" | "at";
|
|
74
|
+
scheduleValue: string;
|
|
75
|
+
intervalMs?: number;
|
|
76
|
+
prompt?: string;
|
|
77
|
+
handler?: string;
|
|
78
|
+
args?: Record<string, unknown>;
|
|
79
|
+
hasRunHandler: boolean;
|
|
80
|
+
hasUntilFn: boolean;
|
|
81
|
+
untilPrompt?: string;
|
|
82
|
+
busyPolicy: "skipIfBusy" | "queueBehindTurn";
|
|
83
|
+
nextFireAtMs: number;
|
|
84
|
+
claimedAtMs: number;
|
|
85
|
+
};
|
|
12
86
|
export type HostedAdmissionManagedAutomation = {
|
|
13
87
|
automationUuid: string;
|
|
14
88
|
mcpServerNames: string[];
|
|
@@ -57,5 +131,20 @@ export type HostedExecutionOutcome = {
|
|
|
57
131
|
};
|
|
58
132
|
export declare function parseHostedAdmission(value: unknown): HostedAdmission | undefined;
|
|
59
133
|
export declare function parseHostedExecution(value: unknown): HostedExecution | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* True when the admission envelope is the reserved internal reminder fire
|
|
136
|
+
* path (not an authored channel event).
|
|
137
|
+
*/
|
|
138
|
+
export declare function isHostedReminderAdmission(delivery: HostedAdmission): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Parse `{ reminderId, fireCount }` from a reserved reminder admission
|
|
141
|
+
* payload. Rejects unknown keys and non-integer fireCount.
|
|
142
|
+
*/
|
|
143
|
+
export declare function parseHostedReminderFirePayload(value: unknown): HostedReminderFirePayload | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Parse the immutable CP fire descriptor. Rejects unknown keys, non-enum
|
|
146
|
+
* schedule/busy values, and non-JSON-safe optional object fields.
|
|
147
|
+
*/
|
|
148
|
+
export declare function parseHostedReminderFireDescriptorPayload(value: unknown): HostedReminderFireDescriptorPayload | undefined;
|
|
60
149
|
export declare function parseHostedAdmissionOutcome(value: unknown): HostedAdmissionOutcome | undefined;
|
|
61
150
|
//# sourceMappingURL=hosted-delivery-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-delivery-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-delivery-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AACpE,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AACrE,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AACrE;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,0BAA0B,CAAC;AAEtE,MAAM,MAAM,gCAAgC,GAAG;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CA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