@cursor/july 0.1.102 → 0.1.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +34 -32
- package/README.md +10 -12
- package/dist/ab.d.ts +1 -1
- package/dist/ab.js +1 -1
- package/dist/bin/agent-serve.d.ts +12 -12
- package/dist/bin/agent-serve.js +114 -36
- package/dist/channels/bitbucket/api.d.ts +176 -0
- package/dist/channels/bitbucket/api.d.ts.map +1 -0
- package/dist/channels/bitbucket/api.js +419 -0
- package/dist/channels/bitbucket/binding.d.ts +71 -0
- package/dist/channels/bitbucket/binding.d.ts.map +1 -0
- package/dist/channels/bitbucket/binding.js +269 -0
- package/dist/channels/bitbucket/bitbucket-channel.d.ts +33 -0
- package/dist/channels/bitbucket/bitbucket-channel.d.ts.map +1 -0
- package/dist/channels/bitbucket/bitbucket-channel.js +120 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts +61 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -0
- package/dist/channels/bitbucket/bitbucket-webhook.js +394 -0
- package/dist/channels/bitbucket/checks.d.ts +67 -0
- package/dist/channels/bitbucket/checks.d.ts.map +1 -0
- package/dist/channels/bitbucket/checks.js +102 -0
- package/dist/channels/bitbucket/cursor-account.d.ts +37 -0
- package/dist/channels/bitbucket/cursor-account.d.ts.map +1 -0
- package/dist/channels/bitbucket/cursor-account.js +65 -0
- package/dist/channels/bitbucket/defaults.d.ts +26 -0
- package/dist/channels/bitbucket/defaults.d.ts.map +1 -0
- package/dist/channels/bitbucket/defaults.js +73 -0
- package/dist/channels/bitbucket/events.d.ts +22 -0
- package/dist/channels/bitbucket/events.d.ts.map +1 -0
- package/dist/channels/bitbucket/events.js +64 -0
- package/dist/channels/bitbucket/index.d.ts +34 -0
- package/dist/channels/bitbucket/index.d.ts.map +1 -0
- package/dist/channels/bitbucket/index.js +33 -0
- package/dist/channels/bitbucket/replay.d.ts +63 -0
- package/dist/channels/bitbucket/replay.d.ts.map +1 -0
- package/dist/channels/bitbucket/replay.js +304 -0
- package/dist/channels/bitbucket/state.d.ts +35 -0
- package/dist/channels/bitbucket/state.d.ts.map +1 -0
- package/dist/channels/bitbucket/state.js +21 -0
- package/dist/channels/bitbucket/types.d.ts +229 -0
- package/dist/channels/bitbucket/types.d.ts.map +1 -0
- package/dist/channels/bitbucket/types.js +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts +5 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.js +41 -0
- package/dist/channels/change-monitors/index.d.ts +4 -0
- package/dist/channels/change-monitors/index.d.ts.map +1 -0
- package/dist/channels/change-monitors/index.js +2 -0
- package/dist/channels/change-monitors/types.d.ts +39 -0
- package/dist/channels/change-monitors/types.d.ts.map +1 -0
- package/dist/channels/change-monitors/types.js +1 -0
- package/dist/channels/deployments/deployments-channel.d.ts +22 -14
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +25 -27
- package/dist/channels/deployments/types.d.ts +12 -6
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/binding.d.ts +6 -0
- package/dist/channels/github/binding.d.ts.map +1 -1
- package/dist/channels/github/binding.js +3 -3
- package/dist/channels/github/cursor-account.d.ts +7 -3
- package/dist/channels/github/cursor-account.d.ts.map +1 -1
- package/dist/channels/github/cursor-account.js +10 -6
- package/dist/channels/github/defaults.d.ts.map +1 -1
- package/dist/channels/github/defaults.js +4 -0
- package/dist/channels/github/events.d.ts +1 -1
- package/dist/channels/github/events.js +1 -1
- package/dist/channels/github/forward.d.ts +1 -1
- package/dist/channels/github/forward.d.ts.map +1 -1
- package/dist/channels/github/forward.js +3 -2
- package/dist/channels/github/github-channel.d.ts +29 -39
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +68 -101
- package/dist/channels/github/progress.d.ts +22 -0
- package/dist/channels/github/progress.d.ts.map +1 -1
- package/dist/channels/github/progress.js +32 -5
- package/dist/channels/github/replay.d.ts +1 -1
- package/dist/channels/github/replay.js +1 -1
- package/dist/channels/github/state.d.ts +2 -0
- package/dist/channels/github/state.d.ts.map +1 -1
- package/dist/channels/github/state.js +14 -11
- package/dist/channels/github/types.d.ts +2 -4
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/api.d.ts +91 -0
- package/dist/channels/gitlab/api.d.ts.map +1 -0
- package/dist/channels/gitlab/api.js +150 -0
- package/dist/channels/gitlab/binding.d.ts +58 -0
- package/dist/channels/gitlab/binding.d.ts.map +1 -0
- package/dist/channels/gitlab/binding.js +139 -0
- package/dist/channels/gitlab/checks.d.ts +110 -0
- package/dist/channels/gitlab/checks.d.ts.map +1 -0
- package/dist/channels/gitlab/checks.js +126 -0
- package/dist/channels/gitlab/cursor-account.d.ts +36 -0
- package/dist/channels/gitlab/cursor-account.d.ts.map +1 -0
- package/dist/channels/gitlab/cursor-account.js +65 -0
- package/dist/channels/gitlab/defaults.d.ts +25 -0
- package/dist/channels/gitlab/defaults.d.ts.map +1 -0
- package/dist/channels/gitlab/defaults.js +60 -0
- package/dist/channels/gitlab/events.d.ts +12 -0
- package/dist/channels/gitlab/events.d.ts.map +1 -0
- package/dist/channels/gitlab/events.js +28 -0
- package/dist/channels/gitlab/gitlab-channel.d.ts +33 -0
- package/dist/channels/gitlab/gitlab-channel.d.ts.map +1 -0
- package/dist/channels/gitlab/gitlab-channel.js +120 -0
- package/dist/channels/gitlab/gitlab-webhook.d.ts +45 -0
- package/dist/channels/gitlab/gitlab-webhook.d.ts.map +1 -0
- package/dist/channels/gitlab/gitlab-webhook.js +397 -0
- package/dist/channels/gitlab/index.d.ts +31 -0
- package/dist/channels/gitlab/index.d.ts.map +1 -0
- package/dist/channels/gitlab/index.js +30 -0
- package/dist/channels/gitlab/replay.d.ts +105 -0
- package/dist/channels/gitlab/replay.d.ts.map +1 -0
- package/dist/channels/gitlab/replay.js +206 -0
- package/dist/channels/gitlab/state.d.ts +33 -0
- package/dist/channels/gitlab/state.d.ts.map +1 -0
- package/dist/channels/gitlab/state.js +23 -0
- package/dist/channels/gitlab/types.d.ts +214 -0
- package/dist/channels/gitlab/types.d.ts.map +1 -0
- package/dist/channels/gitlab/types.js +1 -0
- package/dist/channels/issues/index.d.ts +4 -0
- package/dist/channels/issues/index.d.ts.map +1 -0
- package/dist/channels/issues/index.js +2 -0
- package/dist/channels/issues/issues-channel.d.ts +5 -0
- package/dist/channels/issues/issues-channel.d.ts.map +1 -0
- package/dist/channels/issues/issues-channel.js +37 -0
- package/dist/channels/issues/types.d.ts +33 -0
- package/dist/channels/issues/types.d.ts.map +1 -0
- package/dist/channels/issues/types.js +1 -0
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +4 -2
- package/dist/channels/origin/origin-channel.d.ts +4 -9
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +8 -48
- package/dist/channels/origin/types.d.ts +20 -2
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.js +1 -7
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +3 -3
- package/dist/channels/slack/setup.d.ts +1 -1
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +6 -13
- package/dist/channels/slack/types.d.ts +1 -1
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels.d.ts +1 -1
- package/dist/channels.d.ts.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/connections.d.ts +1 -1
- package/dist/connections.js +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.CLA03RCz.js → app.DbMWUyGb.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.ifxv-cJV.js → VPLocalSearchBox.DcNeTh9o.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DWCwM6p-.js → theme.DMjhY3gl.js} +2 -2
- package/dist/docs/assets/concepts.md.DgEcZOfT.js +1 -0
- package/dist/docs/assets/{concepts.md.rPzW2HZN.lean.js → concepts.md.DgEcZOfT.lean.js} +1 -1
- package/dist/docs/assets/{evals.md.CPzDAwoH.js → evals.md.CbMoebP1.js} +1 -1
- package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +9 -0
- package/dist/docs/assets/{guides_github.md.BtPr9GaP.js → guides_github.md.c0gdGJ-D.js} +1 -1
- package/dist/docs/assets/{guides_github.md.BtPr9GaP.lean.js → guides_github.md.c0gdGJ-D.lean.js} +1 -1
- package/dist/docs/assets/{guides_opentelemetry.md.BVTXDCRg.js → guides_opentelemetry.md.COh9jFVg.js} +7 -8
- package/dist/docs/assets/{guides_opentelemetry.md.BVTXDCRg.lean.js → guides_opentelemetry.md.COh9jFVg.lean.js} +1 -1
- package/dist/docs/assets/{index.md.Kiht7ell.js → index.md.D75GWhPl.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.BHeYMgme.js → reference_agent-config.md.CHNpiyp4.js} +3 -3
- package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.js → reference_channels.md.DBGcaB7m.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.lean.js → reference_channels.md.DBGcaB7m.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DfoeyvL0.js → reference_cli.md.CJNc_xYK.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.9WQMZe1l.js → reference_extensions.md.DykHW3qL.js} +11 -5
- package/dist/docs/assets/reference_extensions.md.DykHW3qL.lean.js +1 -0
- package/dist/docs/assets/reference_hooks.md.Ddt5DdgJ.js +73 -0
- package/dist/docs/assets/{reference_hooks.md.a8BJxMR5.lean.js → reference_hooks.md.Ddt5DdgJ.lean.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.DnX5nL-B.js → reference_playground.md.4myJPxrf.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.CA6QP6Lw.js → reference_project-layout.md.DuBu9a96.js} +2 -2
- package/dist/docs/assets/reference_result.md.BK5SxDrf.js +19 -0
- package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +1 -0
- package/dist/docs/assets/{reference_sessions.md.NxFP_CAC.js → reference_sessions.md.CueyOHSL.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.NxFP_CAC.lean.js → reference_sessions.md.CueyOHSL.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.B1up2r9W.js → reference_tools.md.aGrn99hP.js} +1 -1
- package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +1 -0
- package/dist/docs/assets/{skills_otel.md.CgiZryR3.js → skills_otel.md.CqhobH3B.js} +3 -3
- package/dist/docs/assets/{skills_otel.md.CgiZryR3.lean.js → skills_otel.md.CqhobH3B.lean.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.x5zl6-GT.js → templates_pr-autofixer.md.Bds_XWcV.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.x5zl6-GT.lean.js → templates_pr-autofixer.md.Bds_XWcV.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/concepts.md +2 -4
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/design/filesystem.md +376 -0
- package/dist/docs/design/runtime-abstraction.md +2 -3
- package/dist/docs/evals.html +6 -6
- package/dist/docs/evals.md +9 -7
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-agents.html +6 -6
- package/dist/docs/guides/cloud-agents.md +4 -6
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/github.md +5 -1
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +5 -5
- package/dist/docs/guides/opentelemetry.html +10 -11
- package/dist/docs/guides/opentelemetry.md +41 -17
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +2 -2
- package/dist/docs/llms-full.txt +907 -262
- package/dist/docs/llms.txt +3 -2
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +8 -8
- package/dist/docs/reference/agent-config.md +6 -10
- package/dist/docs/reference/artifacts.html +5 -5
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/channels.md +38 -8
- package/dist/docs/reference/cli.html +5 -5
- package/dist/docs/reference/cli.md +3 -4
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/extensions.html +16 -10
- package/dist/docs/reference/extensions.md +86 -22
- package/dist/docs/reference/hooks.html +69 -10
- package/dist/docs/reference/hooks.md +215 -46
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/playground.md +3 -0
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/project-layout.md +2 -1
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/result.html +45 -0
- package/dist/docs/reference/result.md +89 -0
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/sessions.md +3 -1
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +5 -5
- package/dist/docs/reference/tools.md +1 -2
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/skills/ab.html +4 -4
- package/dist/docs/skills/create-agent.html +4 -4
- package/dist/docs/skills/debug.html +4 -4
- package/dist/docs/skills/evals.html +4 -4
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/framework-map.md +3 -1
- package/dist/docs/skills/github.html +4 -4
- package/dist/docs/skills/hillclimb.html +4 -4
- package/dist/docs/skills/index.html +4 -4
- package/dist/docs/skills/mcp-auth.html +4 -4
- package/dist/docs/skills/otel.html +7 -7
- package/dist/docs/skills/otel.md +8 -3
- package/dist/docs/skills/setup-slack.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +4 -4
- package/dist/docs/templates/code-wiki.html +4 -4
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/pr-autofixer.md +0 -3
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +4 -4
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/evals.d.ts +1 -1
- package/dist/evals.d.ts.map +1 -1
- package/dist/extensions.d.ts +20 -7
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +36 -5
- package/dist/files.d.ts +16 -3
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +16 -3
- package/dist/filesystem.d.ts +440 -0
- package/dist/filesystem.d.ts.map +1 -0
- package/dist/filesystem.js +1694 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/internal/ab-snapshot.d.ts.map +1 -1
- package/dist/internal/ab-snapshot.js +0 -1
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +1 -3
- package/dist/internal/authored-alias-hooks.d.ts +4 -13
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +4 -20
- package/dist/internal/authored-loaders.d.ts +2 -3
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +6 -20
- package/dist/internal/channel-dispatch.d.ts +43 -0
- package/dist/internal/channel-dispatch.d.ts.map +1 -0
- package/dist/internal/channel-dispatch.js +77 -0
- package/dist/internal/chat-client.d.ts +1 -1
- package/dist/internal/chat-client.js +1 -1
- package/dist/internal/cli-ax.d.ts +5 -5
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +5 -5
- package/dist/internal/cli-bitbucket.d.ts +33 -0
- package/dist/internal/cli-bitbucket.d.ts.map +1 -0
- package/dist/internal/cli-bitbucket.js +359 -0
- package/dist/internal/cli-convert-automation.d.ts +1 -1
- package/dist/internal/cli-convert-automation.js +2 -2
- package/dist/internal/cli-cursor.d.ts +1 -1
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +2 -4
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +2 -6
- package/dist/internal/cli-github.d.ts +1 -1
- package/dist/internal/cli-github.js +3 -3
- package/dist/internal/cli-gitlab.d.ts +37 -0
- package/dist/internal/cli-gitlab.d.ts.map +1 -0
- package/dist/internal/cli-gitlab.js +380 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +2 -6
- package/dist/internal/cli-slack.d.ts +1 -1
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +2 -4
- package/dist/internal/continuation-channel.d.ts +18 -2
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +67 -5
- package/dist/internal/continuation-identity.d.ts +24 -17
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +246 -32
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +4 -3
- package/dist/internal/convert-automation/types.d.ts +1 -1
- package/dist/internal/convert-automation/types.js +1 -1
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +1 -3
- package/dist/internal/cursor/backend-client.d.ts +5 -4
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +5 -6
- package/dist/internal/cursor/bound-secret-file.d.ts +56 -0
- package/dist/internal/cursor/bound-secret-file.d.ts.map +1 -0
- package/dist/internal/cursor/bound-secret-file.js +88 -0
- package/dist/internal/cursor/credentials.d.ts +39 -5
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +58 -8
- package/dist/internal/cursor/hosted-bound-secrets.d.ts +41 -0
- package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-bound-secrets.js +54 -0
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts +19 -5
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-deployment-secrets.js +29 -9
- package/dist/internal/cursor/hosted-store-secrets.d.ts +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +1 -1
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +2 -4
- package/dist/internal/cursor-deployment-relay.d.ts +6 -2
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +13 -9
- package/dist/internal/deploy-manifest.d.ts +1 -1
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +1 -1
- package/dist/internal/discovery/ab.d.ts +1 -1
- package/dist/internal/discovery/ab.d.ts.map +1 -1
- package/dist/internal/discovery/ab.js +21 -9
- package/dist/internal/discovery/agent.d.ts +6 -1
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +141 -120
- package/dist/internal/discovery/channels.d.ts +1 -1
- package/dist/internal/discovery/channels.d.ts.map +1 -1
- package/dist/internal/discovery/channels.js +14 -14
- package/dist/internal/discovery/connections.d.ts +1 -5
- package/dist/internal/discovery/connections.d.ts.map +1 -1
- package/dist/internal/discovery/connections.js +30 -44
- package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -1
- package/dist/internal/discovery/cursor-plugin.js +1 -3
- package/dist/internal/discovery/extension-overlay.d.ts +32 -0
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -0
- package/dist/internal/discovery/extension-overlay.js +191 -0
- package/dist/internal/discovery/extensions.d.ts +11 -2
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +211 -74
- package/dist/internal/discovery/hooks.d.ts +1 -1
- package/dist/internal/discovery/hooks.d.ts.map +1 -1
- package/dist/internal/discovery/hooks.js +15 -2
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +10 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +8 -2
- package/dist/internal/discovery/names.d.ts +1 -1
- package/dist/internal/discovery/names.d.ts.map +1 -1
- package/dist/internal/discovery/names.js +1 -0
- package/dist/internal/discovery/project.d.ts +0 -2
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +64 -10
- package/dist/internal/discovery/runtime.d.ts.map +1 -1
- package/dist/internal/discovery/runtime.js +1 -2
- package/dist/internal/discovery/schedules.d.ts +1 -1
- package/dist/internal/discovery/schedules.d.ts.map +1 -1
- package/dist/internal/discovery/schedules.js +23 -2
- package/dist/internal/discovery/services.d.ts +6 -2
- package/dist/internal/discovery/services.d.ts.map +1 -1
- package/dist/internal/discovery/services.js +31 -1
- package/dist/internal/discovery/skills.d.ts +1 -6
- package/dist/internal/discovery/skills.d.ts.map +1 -1
- package/dist/internal/discovery/skills.js +8 -3
- package/dist/internal/discovery/subagent.d.ts +3 -0
- package/dist/internal/discovery/subagent.d.ts.map +1 -1
- package/dist/internal/discovery/subagent.js +109 -0
- package/dist/internal/discovery.d.ts +1 -2
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +1 -2
- package/dist/internal/distribution.d.ts +10 -27
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +25 -73
- package/dist/internal/docs-site.js +1 -1
- package/dist/internal/eval-run-store.d.ts +0 -1
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/factory-resource-channel.d.ts +33 -0
- package/dist/internal/factory-resource-channel.d.ts.map +1 -0
- package/dist/internal/factory-resource-channel.js +77 -0
- package/dist/internal/filesystem/errors.d.ts +64 -0
- package/dist/internal/filesystem/errors.d.ts.map +1 -0
- package/dist/internal/filesystem/errors.js +175 -0
- package/dist/internal/filesystem/format.d.ts +28 -0
- package/dist/internal/filesystem/format.d.ts.map +1 -0
- package/dist/internal/filesystem/format.js +213 -0
- package/dist/internal/filesystem/merge.d.ts +34 -0
- package/dist/internal/filesystem/merge.d.ts.map +1 -0
- package/dist/internal/filesystem/merge.js +196 -0
- package/dist/internal/filesystem/scratch.d.ts +59 -0
- package/dist/internal/filesystem/scratch.d.ts.map +1 -0
- package/dist/internal/filesystem/scratch.js +212 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts +29 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -0
- package/dist/internal/filesystem/sdk-schemas.js +153 -0
- package/dist/internal/filesystem/tools.d.ts +42 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -0
- package/dist/internal/filesystem/tools.js +618 -0
- package/dist/internal/filesystem/walk.d.ts +74 -0
- package/dist/internal/filesystem/walk.d.ts.map +1 -0
- package/dist/internal/filesystem/walk.js +339 -0
- package/dist/internal/framework-file-storage.d.ts +8 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +8 -8
- package/dist/internal/github-fanout.d.ts +1 -1
- package/dist/internal/github-fanout.js +1 -1
- package/dist/internal/guest-network.d.ts +104 -0
- package/dist/internal/guest-network.d.ts.map +1 -0
- package/dist/internal/guest-network.js +309 -0
- package/dist/internal/host-otel.d.ts +3 -3
- package/dist/internal/host-otel.d.ts.map +1 -1
- package/dist/internal/host-otel.js +8 -4
- package/dist/internal/hosted-admission-adapter.d.ts +8 -7
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +6 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +18 -5
- package/dist/internal/hosted-delivery.d.ts +18 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +258 -118
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +1 -3
- package/dist/internal/init-interview.d.ts.map +1 -1
- package/dist/internal/init-interview.js +1 -3
- package/dist/internal/init-project.d.ts +2 -2
- package/dist/internal/init-project.js +2 -2
- package/dist/internal/inline-stdio-define-stub.d.ts +1 -1
- package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -1
- package/dist/internal/inline-stdio-define-stub.js +1 -1
- package/dist/internal/is-record.d.ts +2 -0
- package/dist/internal/is-record.d.ts.map +1 -0
- package/dist/internal/is-record.js +3 -0
- package/dist/internal/json-schema.d.ts.map +1 -1
- package/dist/internal/json-schema.js +18 -10
- package/dist/internal/local-control-plane.d.ts +1 -2
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +3 -20
- package/dist/internal/mcp-endpoint.d.ts.map +1 -1
- package/dist/internal/mcp-endpoint.js +1 -3
- package/dist/internal/otel/collector.d.ts +12 -3
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +77 -125
- package/dist/internal/otel/config.d.ts +0 -2
- package/dist/internal/otel/config.d.ts.map +1 -1
- package/dist/internal/otel/config.js +17 -20
- package/dist/internal/otel/http.d.ts +2 -0
- package/dist/internal/otel/http.d.ts.map +1 -1
- package/dist/internal/otel/http.js +7 -1
- package/dist/internal/otel/mcp.d.ts.map +1 -1
- package/dist/internal/otel/mcp.js +3 -16
- package/dist/internal/otel/runtime.d.ts +26 -1
- package/dist/internal/otel/runtime.d.ts.map +1 -1
- package/dist/internal/otel/runtime.js +164 -15
- package/dist/internal/package-inline-stdio.d.ts.map +1 -1
- package/dist/internal/package-inline-stdio.js +3 -11
- package/dist/internal/playground/toolchain.d.ts +1 -1
- package/dist/internal/playground/toolchain.d.ts.map +1 -1
- package/dist/internal/playground/toolchain.js +1 -1
- package/dist/internal/request-error-status.d.ts +12 -0
- package/dist/internal/request-error-status.d.ts.map +1 -0
- package/dist/internal/request-error-status.js +52 -0
- package/dist/internal/resolve-prod-target.d.ts +1 -1
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +3 -7
- package/dist/internal/result-output.d.ts +18 -0
- package/dist/internal/result-output.d.ts.map +1 -0
- package/dist/internal/result-output.js +33 -0
- package/dist/internal/run-client.d.ts +2 -2
- package/dist/internal/run-client.js +2 -2
- package/dist/internal/runtime-dispatch-runner.d.ts +1 -11
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +2 -15
- package/dist/internal/sdk-runner.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +6 -7
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +110 -35
- package/dist/internal/session-cost.d.ts +3 -3
- package/dist/internal/session-cost.d.ts.map +1 -1
- package/dist/internal/session-cost.js +3 -3
- package/dist/internal/session-engine.d.ts +48 -11
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +507 -115
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +1 -3
- package/dist/internal/skills-sync.d.ts +1 -4
- package/dist/internal/skills-sync.d.ts.map +1 -1
- package/dist/internal/skills-sync.js +10 -50
- package/dist/internal/sleep.d.ts +2 -0
- package/dist/internal/sleep.d.ts.map +1 -0
- package/dist/internal/sleep.js +3 -0
- package/dist/internal/store-mirror.d.ts +29 -0
- package/dist/internal/store-mirror.d.ts.map +1 -0
- package/dist/internal/store-mirror.js +70 -0
- package/dist/internal/tenant-slack/relay.d.ts +73 -0
- package/dist/internal/tenant-slack/relay.d.ts.map +1 -0
- package/dist/internal/tenant-slack/relay.js +138 -0
- package/dist/internal/testing/factory-resource-fixtures.d.ts +48 -0
- package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/factory-resource-fixtures.js +41 -0
- package/dist/internal/testing/scm-continuation-fixtures.d.ts +33 -0
- package/dist/internal/testing/scm-continuation-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/scm-continuation-fixtures.js +253 -0
- package/dist/internal/workspace-sync.d.ts +22 -0
- package/dist/internal/workspace-sync.d.ts.map +1 -0
- package/dist/internal/workspace-sync.js +49 -0
- package/dist/internal/workspace.d.ts +7 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +13 -0
- package/dist/otel.d.ts +23 -1
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +93 -2
- package/dist/playground/assets/index-8YiozU89.js +67 -0
- package/dist/playground/assets/index-MbMxXg-y.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/result.d.ts +24 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +27 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +7 -4
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +1 -3
- package/dist/types.d.ts +141 -26
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +2 -2
- package/docs/concepts.md +2 -4
- package/docs/design/filesystem.md +376 -0
- package/docs/design/runtime-abstraction.md +2 -3
- package/docs/evals.md +9 -7
- package/docs/guides/cloud-agents.md +4 -6
- package/docs/guides/github.md +5 -1
- package/docs/guides/opentelemetry.md +41 -17
- package/docs/reference/agent-config.md +6 -10
- package/docs/reference/channels.md +38 -8
- package/docs/reference/cli.md +3 -4
- package/docs/reference/extensions.md +87 -23
- package/docs/reference/hooks.md +215 -46
- package/docs/reference/playground.md +3 -0
- package/docs/reference/project-layout.md +2 -1
- package/docs/reference/result.md +94 -0
- package/docs/reference/sessions.md +3 -1
- package/docs/reference/tools.md +1 -2
- package/docs/templates/pr-autofixer.md +0 -3
- package/package.json +42 -9
- package/skills/framework-map/SKILL.md +3 -1
- package/skills/otel/SKILL.md +8 -3
- package/src/ab.ts +1 -1
- package/src/bin/agent-serve.ts +121 -21
- package/src/channels/bitbucket/api.ts +623 -0
- package/src/channels/bitbucket/binding.ts +414 -0
- package/src/channels/bitbucket/bitbucket-channel.ts +182 -0
- package/src/channels/bitbucket/bitbucket-webhook.ts +576 -0
- package/src/channels/bitbucket/checks.ts +154 -0
- package/src/channels/bitbucket/cursor-account.ts +117 -0
- package/src/channels/bitbucket/defaults.ts +110 -0
- package/src/channels/bitbucket/events.ts +84 -0
- package/src/channels/bitbucket/index.ts +49 -0
- package/src/channels/bitbucket/replay.ts +439 -0
- package/src/channels/bitbucket/state.ts +59 -0
- package/src/channels/bitbucket/types.ts +266 -0
- package/src/channels/change-monitors/change-monitors-channel.ts +62 -0
- package/src/channels/change-monitors/index.ts +8 -0
- package/src/channels/change-monitors/types.ts +44 -0
- package/src/channels/deployments/deployments-channel.ts +25 -43
- package/src/channels/deployments/types.ts +12 -6
- package/src/channels/github/binding.ts +8 -1
- package/src/channels/github/cursor-account.ts +17 -6
- package/src/channels/github/defaults.ts +4 -0
- package/src/channels/github/events.ts +1 -1
- package/src/channels/github/forward.ts +3 -2
- package/src/channels/github/github-channel.ts +74 -221
- package/src/channels/github/progress.ts +76 -10
- package/src/channels/github/replay.ts +1 -1
- package/src/channels/github/state.ts +6 -0
- package/src/channels/github/types.ts +2 -5
- package/src/channels/gitlab/api.ts +228 -0
- package/src/channels/gitlab/binding.ts +233 -0
- package/src/channels/gitlab/checks.ts +243 -0
- package/src/channels/gitlab/cursor-account.ts +114 -0
- package/src/channels/gitlab/defaults.ts +93 -0
- package/src/channels/gitlab/events.ts +44 -0
- package/src/channels/gitlab/gitlab-channel.ts +176 -0
- package/src/channels/gitlab/gitlab-webhook.ts +555 -0
- package/src/channels/gitlab/index.ts +43 -0
- package/src/channels/gitlab/replay.ts +347 -0
- package/src/channels/gitlab/state.ts +55 -0
- package/src/channels/gitlab/types.ts +263 -0
- package/src/channels/issues/index.ts +9 -0
- package/src/channels/issues/issues-channel.ts +51 -0
- package/src/channels/issues/types.ts +41 -0
- package/src/channels/origin/api.ts +4 -2
- package/src/channels/origin/origin-channel.ts +19 -94
- package/src/channels/origin/types.ts +23 -2
- package/src/channels/slack/eval-directive.ts +1 -6
- package/src/channels/slack/init.ts +6 -3
- package/src/channels/slack/setup.ts +7 -6
- package/src/channels/slack/types.ts +1 -1
- package/src/channels.ts +0 -1
- package/src/client.ts +1 -1
- package/src/connections.ts +1 -1
- package/src/evals.ts +1 -1
- package/src/extensions.ts +47 -5
- package/src/files.ts +21 -3
- package/src/filesystem.ts +2074 -0
- package/src/index.ts +48 -28
- package/src/internal/ab-snapshot.ts +0 -3
- package/src/internal/advertise-tools.ts +1 -4
- package/src/internal/authored-alias-hooks.ts +4 -21
- package/src/internal/authored-loaders.ts +6 -23
- package/src/internal/channel-dispatch.ts +160 -0
- package/src/internal/chat-client.ts +1 -1
- package/src/internal/cli-ax.ts +5 -5
- package/src/internal/cli-bitbucket.ts +477 -0
- package/src/internal/cli-convert-automation.ts +7 -7
- package/src/internal/cli-cursor.ts +2 -5
- package/src/internal/cli-deploy.ts +2 -8
- package/src/internal/cli-github.ts +3 -3
- package/src/internal/cli-gitlab.ts +485 -0
- package/src/internal/cli-mcp.ts +2 -7
- package/src/internal/cli-slack.ts +2 -5
- package/src/internal/continuation-channel.ts +102 -4
- package/src/internal/continuation-identity.ts +338 -35
- package/src/internal/conversation-mirror.ts +4 -3
- package/src/internal/convert-automation/types.ts +1 -1
- package/src/internal/cursor/account-mcp.ts +1 -4
- package/src/internal/cursor/backend-client.ts +9 -10
- package/src/internal/cursor/bound-secret-file.ts +108 -0
- package/src/internal/cursor/credentials.ts +75 -10
- package/src/internal/cursor/hosted-bound-secrets.ts +75 -0
- package/src/internal/cursor/hosted-deployment-secrets.ts +42 -11
- package/src/internal/cursor/hosted-store-secrets.ts +1 -1
- package/src/internal/cursor-account-mcp-auth.ts +2 -5
- package/src/internal/cursor-deployment-relay.ts +11 -7
- package/src/internal/deploy-manifest.ts +4 -2
- package/src/internal/discovery/ab.ts +29 -9
- package/src/internal/discovery/agent.ts +181 -136
- package/src/internal/discovery/channels.ts +15 -13
- package/src/internal/discovery/connections.ts +55 -50
- package/src/internal/discovery/cursor-plugin.ts +1 -4
- package/src/internal/discovery/extension-overlay.ts +274 -0
- package/src/internal/discovery/extensions.ts +330 -105
- package/src/internal/discovery/hooks.ts +20 -2
- package/src/internal/discovery/info.ts +10 -0
- package/src/internal/discovery/modules.ts +8 -2
- package/src/internal/discovery/names.ts +2 -1
- package/src/internal/discovery/project.ts +80 -9
- package/src/internal/discovery/runtime.ts +1 -2
- package/src/internal/discovery/schedules.ts +28 -2
- package/src/internal/discovery/services.ts +37 -1
- package/src/internal/discovery/skills.ts +13 -3
- package/src/internal/discovery/subagent.ts +107 -0
- package/src/internal/discovery.ts +0 -2
- package/src/internal/distribution.ts +35 -83
- package/src/internal/docs-site.ts +1 -1
- package/src/internal/eval-run-store.ts +0 -7
- package/src/internal/eval-runner.ts +0 -1
- package/src/internal/factory-resource-channel.ts +122 -0
- package/src/internal/filesystem/errors.ts +220 -0
- package/src/internal/filesystem/format.ts +276 -0
- package/src/internal/filesystem/merge.ts +195 -0
- package/src/internal/filesystem/scratch.ts +255 -0
- package/src/internal/filesystem/sdk-schemas.ts +204 -0
- package/src/internal/filesystem/tools.ts +821 -0
- package/src/internal/filesystem/walk.ts +369 -0
- package/src/internal/framework-file-storage.ts +8 -8
- package/src/internal/github-fanout.ts +1 -1
- package/src/internal/guest-network.ts +389 -0
- package/src/internal/host-otel.ts +8 -4
- package/src/internal/hosted-admission-adapter.ts +8 -8
- package/src/internal/hosted-delivery-protocol.ts +26 -1
- package/src/internal/hosted-delivery.ts +393 -192
- package/src/internal/http-channel.ts +1 -4
- package/src/internal/init-interview.ts +1 -4
- package/src/internal/init-project.ts +2 -2
- package/src/internal/inline-stdio-define-stub.ts +1 -1
- package/src/internal/is-record.ts +3 -0
- package/src/internal/json-schema.ts +19 -10
- package/src/internal/local-control-plane.ts +5 -24
- package/src/internal/mcp-endpoint.ts +1 -4
- package/src/internal/otel/collector.ts +94 -159
- package/src/internal/otel/config.ts +10 -14
- package/src/internal/otel/http.ts +14 -1
- package/src/internal/otel/mcp.ts +3 -16
- package/src/internal/otel/runtime.ts +240 -25
- package/src/internal/package-inline-stdio.ts +3 -12
- package/src/internal/playground/toolchain.ts +1 -1
- package/src/internal/request-error-status.ts +72 -0
- package/src/internal/resolve-prod-target.ts +3 -8
- package/src/internal/result-output.ts +34 -0
- package/src/internal/run-client.ts +2 -2
- package/src/internal/runtime-dispatch-runner.ts +3 -21
- package/src/internal/sdk-runner.ts +7 -7
- package/src/internal/server.ts +153 -44
- package/src/internal/session-cost.ts +3 -3
- package/src/internal/session-engine.ts +621 -103
- package/src/internal/session-run-log.ts +1 -4
- package/src/internal/skills-sync.ts +13 -63
- package/src/internal/sleep.ts +3 -0
- package/src/internal/store-mirror.ts +86 -0
- package/src/internal/tenant-slack/relay.ts +179 -0
- package/src/internal/testing/factory-resource-fixtures.ts +85 -0
- package/src/internal/testing/scm-continuation-fixtures.ts +286 -0
- package/src/internal/workspace-sync.ts +55 -0
- package/src/internal/workspace.ts +14 -0
- package/src/otel.ts +143 -3
- package/src/result.ts +36 -0
- package/src/storage-backends/cursor-hosted.ts +7 -4
- package/src/storage-protocol.ts +1 -4
- package/src/types.ts +154 -37
- package/templates/triage/agent/lib/types.ts +0 -2
- package/dist/continuation.d.ts +0 -20
- package/dist/continuation.d.ts.map +0 -1
- package/dist/continuation.js +0 -18
- package/dist/docs/assets/chunks/@localSearchIndexroot.FAqdWIXo.js +0 -1
- package/dist/docs/assets/concepts.md.rPzW2HZN.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.BRirbRAN.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.BRirbRAN.lean.js +0 -1
- package/dist/docs/assets/reference_extensions.md.9WQMZe1l.lean.js +0 -1
- package/dist/docs/assets/reference_hooks.md.a8BJxMR5.js +0 -14
- package/dist/docs/assets/skills_framework-map.md.DDa4MeEW.js +0 -1
- package/dist/docs/guides/cloud-runtime.html +0 -35
- package/dist/docs/guides/cloud-runtime.md +0 -117
- package/dist/internal/convert-automation/index.d.ts +0 -3
- package/dist/internal/convert-automation/index.d.ts.map +0 -1
- package/dist/internal/convert-automation/index.js +0 -1
- package/dist/internal/grokbot/runner.d.ts +0 -64
- package/dist/internal/grokbot/runner.d.ts.map +0 -1
- package/dist/internal/grokbot/runner.js +0 -282
- package/dist/internal/managed-delivery.d.ts +0 -80
- package/dist/internal/managed-delivery.d.ts.map +0 -1
- package/dist/internal/managed-delivery.js +0 -86
- package/dist/internal/review-comments.d.ts +0 -370
- package/dist/internal/review-comments.d.ts.map +0 -1
- package/dist/internal/review-comments.js +0 -921
- package/dist/internal/shallow-clone.d.ts +0 -176
- package/dist/internal/shallow-clone.d.ts.map +0 -1
- package/dist/internal/shallow-clone.js +0 -419
- package/dist/playground/assets/index-B6C9S9nG.css +0 -1
- package/dist/playground/assets/index-ZqNoT8Ie.js +0 -69
- package/docs/guides/cloud-runtime.md +0 -122
- package/src/continuation.ts +0 -49
- package/src/internal/convert-automation/index.ts +0 -10
- package/src/internal/grokbot/runner.ts +0 -370
- package/src/internal/managed-delivery.ts +0 -125
- package/src/internal/review-comments.ts +0 -1363
- package/src/internal/shallow-clone.ts +0 -609
- /package/dist/docs/assets/{evals.md.CPzDAwoH.lean.js → evals.md.CbMoebP1.lean.js} +0 -0
- /package/dist/docs/assets/{guides_cloud-agents.md.DumwWXba.lean.js → guides_cloud-agents.md.DS8RIjwx.lean.js} +0 -0
- /package/dist/docs/assets/{index.md.Kiht7ell.lean.js → index.md.D75GWhPl.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.BHeYMgme.lean.js → reference_agent-config.md.CHNpiyp4.lean.js} +0 -0
- /package/dist/docs/assets/{reference_cli.md.DfoeyvL0.lean.js → reference_cli.md.CJNc_xYK.lean.js} +0 -0
- /package/dist/docs/assets/{reference_playground.md.DnX5nL-B.lean.js → reference_playground.md.4myJPxrf.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.CA6QP6Lw.lean.js → reference_project-layout.md.DuBu9a96.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.B1up2r9W.lean.js → reference_tools.md.aGrn99hP.lean.js} +0 -0
- /package/dist/docs/assets/{skills_framework-map.md.DDa4MeEW.lean.js → skills_framework-map.md.haibFyoB.lean.js} +0 -0
|
@@ -7,11 +7,19 @@ import {
|
|
|
7
7
|
loopbackGitHubDev,
|
|
8
8
|
POST,
|
|
9
9
|
} from "../../channels.js";
|
|
10
|
+
import {
|
|
11
|
+
acknowledgeTask,
|
|
12
|
+
acknowledgeTurn,
|
|
13
|
+
isTaskDispatch,
|
|
14
|
+
scheduleAfterAck,
|
|
15
|
+
skipped,
|
|
16
|
+
turnStarted,
|
|
17
|
+
withPropagatingBackgroundErrors,
|
|
18
|
+
} from "../../internal/channel-dispatch.js";
|
|
10
19
|
import {
|
|
11
20
|
continuationSource,
|
|
12
21
|
normalizeIdentity,
|
|
13
22
|
} from "../../internal/continuation-identity.js";
|
|
14
|
-
import { isDeferredChannelSession } from "../../internal/deferred-channel-session.js";
|
|
15
23
|
import { isDevMode } from "../../internal/dev-mode.js";
|
|
16
24
|
import { attachHostedAdmissionAdapter } from "../../internal/hosted-admission-adapter.js";
|
|
17
25
|
import { bindLocalIngressSend } from "../../internal/local-ingress.js";
|
|
@@ -55,7 +63,6 @@ import type {
|
|
|
55
63
|
GitHubComment,
|
|
56
64
|
GitHubConversationKind,
|
|
57
65
|
GitHubCredentialValue,
|
|
58
|
-
GitHubDispatch,
|
|
59
66
|
GitHubEventContext,
|
|
60
67
|
GitHubIssueEvent,
|
|
61
68
|
GitHubPullRequestAction,
|
|
@@ -64,7 +71,6 @@ import type {
|
|
|
64
71
|
GitHubRawEvent,
|
|
65
72
|
GitHubRepositoryRef,
|
|
66
73
|
GitHubStatusEvent,
|
|
67
|
-
GitHubTaskDispatch,
|
|
68
74
|
GitHubTurnDispatch,
|
|
69
75
|
GitHubUser,
|
|
70
76
|
GitHubWorkflowRunEvent,
|
|
@@ -227,24 +233,10 @@ export function parseGitHubPrContinuationKey(
|
|
|
227
233
|
};
|
|
228
234
|
}
|
|
229
235
|
|
|
230
|
-
/** @deprecated Prefer {@link githubContinuationKey}. */
|
|
231
|
-
export function githubPullRequestContinuationKey(
|
|
232
|
-
ctx: GitHubParsedContext
|
|
233
|
-
): string {
|
|
234
|
-
return githubContinuationKey(ctx);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
236
|
export function defaultGitHubTitle(ctx: GitHubParsedContext): string {
|
|
238
237
|
return `GitHub ${ctx.repository.fullName}#${ctx.conversation.number}`;
|
|
239
238
|
}
|
|
240
239
|
|
|
241
|
-
/** @deprecated Prefer {@link defaultGitHubTitle}. */
|
|
242
|
-
export function defaultGitHubPullRequestTitle(
|
|
243
|
-
ctx: GitHubParsedContext
|
|
244
|
-
): string {
|
|
245
|
-
return defaultGitHubTitle(ctx);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
240
|
export function defaultGitHubPullRequestMessage(
|
|
249
241
|
ctx: GitHubParsedContext,
|
|
250
242
|
pullRequest: GitHubPullRequestEvent
|
|
@@ -303,12 +295,6 @@ export function defaultOnComment(
|
|
|
303
295
|
return { auth: defaultGitHubAuth(ctx) };
|
|
304
296
|
}
|
|
305
297
|
|
|
306
|
-
function isTaskDispatch(
|
|
307
|
-
dispatch: GitHubDispatch
|
|
308
|
-
): dispatch is GitHubTaskDispatch {
|
|
309
|
-
return "task" in dispatch;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
298
|
export function shouldDispatchGitHubComment(args: {
|
|
313
299
|
body: string;
|
|
314
300
|
author?: GitHubUser;
|
|
@@ -439,98 +425,17 @@ function verifyWebhookSha256Signature(args: {
|
|
|
439
425
|
}
|
|
440
426
|
|
|
441
427
|
/**
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* ```ts
|
|
447
|
-
* import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
448
|
-
*
|
|
449
|
-
* export default githubChannel({
|
|
450
|
-
* botName: "my-agent",
|
|
451
|
-
* credentials: { webhookSecret: () => process.env.GITHUB_WEBHOOK_SECRET },
|
|
452
|
-
* // Replaces the @mention gate. Prefer typed Octokit via getOctokit().
|
|
453
|
-
* onComment: (ctx, comment) => ({ auth: defaultGitHubAuth(ctx) }),
|
|
454
|
-
* onPullRequest: (ctx, pr) =>
|
|
455
|
-
* pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
456
|
-
* onStatus: (ctx, status) =>
|
|
457
|
-
* status.state === "failure"
|
|
458
|
-
* ? {
|
|
459
|
-
* task: async () => {
|
|
460
|
-
* const octokit = await ctx.github.getOctokit();
|
|
461
|
-
* await octokit.rest.repos.createCommitStatus({
|
|
462
|
-
* owner: ctx.repository.owner,
|
|
463
|
-
* repo: ctx.repository.name,
|
|
464
|
-
* sha: status.sha,
|
|
465
|
-
* state: "pending",
|
|
466
|
-
* context: "agent/triage",
|
|
467
|
-
* });
|
|
468
|
-
* },
|
|
469
|
-
* }
|
|
470
|
-
* : null,
|
|
471
|
-
* onEvent: (ctx, event) =>
|
|
472
|
-
* event.eventName === "label" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
473
|
-
* });
|
|
474
|
-
* ```
|
|
475
|
-
*/
|
|
476
|
-
/**
|
|
477
|
-
* Core GitHub webhook dispatch used by {@link githubChannel} routes and by
|
|
478
|
-
* {@link handleAgentServeTrigger} fan-out. Signature verification is the
|
|
479
|
-
* caller's responsibility (HTTP route verifies; internal fan-out skips).
|
|
480
|
-
*/
|
|
481
|
-
/**
|
|
482
|
-
* Run authored GitHub hooks and `send()`. Does not extract a v2 mailbox —
|
|
483
|
-
* the local CP (or hosted verified ingress) stamps before this runs.
|
|
428
|
+
* Run the authored hooks for one GitHub delivery and `send()` the turn.
|
|
429
|
+
* Callers own delivery auth: the HTTP route verifies the HMAC; trigger
|
|
430
|
+
* fan-out and hosted admission arrive verified. The v2 mailbox is stamped
|
|
431
|
+
* upstream (local CP or hosted ingress), never here.
|
|
484
432
|
*/
|
|
485
|
-
export type GitHubDispatchOutcome = "skip" | "send" | "task";
|
|
486
|
-
|
|
487
|
-
const dispatchOutcomeByResponse = new WeakMap<
|
|
488
|
-
Response,
|
|
489
|
-
GitHubDispatchOutcome
|
|
490
|
-
>();
|
|
491
|
-
|
|
492
|
-
function withDispatchOutcome(
|
|
493
|
-
response: Response,
|
|
494
|
-
outcome: GitHubDispatchOutcome
|
|
495
|
-
): Response {
|
|
496
|
-
dispatchOutcomeByResponse.set(response, outcome);
|
|
497
|
-
return response;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
export function getGitHubDispatchOutcome(
|
|
501
|
-
response: Response
|
|
502
|
-
): GitHubDispatchOutcome | undefined {
|
|
503
|
-
return dispatchOutcomeByResponse.get(response);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
const PROPAGATE_BACKGROUND_ERRORS = Symbol("propagateBackgroundErrors");
|
|
507
|
-
|
|
508
|
-
type GitHubHandlerArgs = ChannelHandlerArgs & {
|
|
509
|
-
[PROPAGATE_BACKGROUND_ERRORS]?: true;
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
export function withPropagatingGitHubBackgroundErrors(
|
|
513
|
-
args: ChannelHandlerArgs
|
|
514
|
-
): ChannelHandlerArgs {
|
|
515
|
-
return Object.assign(args, { [PROPAGATE_BACKGROUND_ERRORS]: true as const });
|
|
516
|
-
}
|
|
517
|
-
|
|
518
433
|
export async function dispatchGitHubWebhook(input: {
|
|
519
434
|
options: GitHubChannelOptions;
|
|
520
435
|
eventName: string | null;
|
|
521
436
|
payload: unknown;
|
|
522
437
|
deliveryId?: string;
|
|
523
438
|
args: ChannelHandlerArgs;
|
|
524
|
-
}): Promise<Response> {
|
|
525
|
-
return dispatchGitHubWebhookInner(input);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
async function dispatchGitHubWebhookInner(input: {
|
|
529
|
-
options: GitHubChannelOptions;
|
|
530
|
-
eventName: string | null;
|
|
531
|
-
payload: unknown;
|
|
532
|
-
deliveryId?: string;
|
|
533
|
-
args: ChannelHandlerArgs;
|
|
534
439
|
}): Promise<Response> {
|
|
535
440
|
const { options, eventName, payload, deliveryId, args } = input;
|
|
536
441
|
const botName = options.botName ?? process.env.GITHUB_APP_SLUG;
|
|
@@ -621,12 +526,7 @@ async function dispatchGitHubWebhookInner(input: {
|
|
|
621
526
|
args,
|
|
622
527
|
});
|
|
623
528
|
}
|
|
624
|
-
return
|
|
625
|
-
ok: true,
|
|
626
|
-
skipped: true,
|
|
627
|
-
reason: "unsupported_event",
|
|
628
|
-
event: eventName,
|
|
629
|
-
});
|
|
529
|
+
return skipped("unsupported_event", { event: eventName });
|
|
630
530
|
}
|
|
631
531
|
}
|
|
632
532
|
|
|
@@ -701,6 +601,41 @@ export function getGitHubChannelOptions(
|
|
|
701
601
|
return githubChannelOptionsByDefinition.get(definition);
|
|
702
602
|
}
|
|
703
603
|
|
|
604
|
+
/**
|
|
605
|
+
* GitHub webhook channel (Eve-compatible dispatch surface). Point a GitHub App
|
|
606
|
+
* or repository webhook at `/<agent>/v1/channels/github` and declare inbound
|
|
607
|
+
* hooks:
|
|
608
|
+
*
|
|
609
|
+
* ```ts
|
|
610
|
+
* import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
611
|
+
*
|
|
612
|
+
* export default githubChannel({
|
|
613
|
+
* botName: "my-agent",
|
|
614
|
+
* credentials: { webhookSecret: () => process.env.GITHUB_WEBHOOK_SECRET },
|
|
615
|
+
* // Replaces the @mention gate. Prefer typed Octokit via getOctokit().
|
|
616
|
+
* onComment: (ctx, comment) => ({ auth: defaultGitHubAuth(ctx) }),
|
|
617
|
+
* onPullRequest: (ctx, pr) =>
|
|
618
|
+
* pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
619
|
+
* onStatus: (ctx, status) =>
|
|
620
|
+
* status.state === "failure"
|
|
621
|
+
* ? {
|
|
622
|
+
* task: async () => {
|
|
623
|
+
* const octokit = await ctx.github.getOctokit();
|
|
624
|
+
* await octokit.rest.repos.createCommitStatus({
|
|
625
|
+
* owner: ctx.repository.owner,
|
|
626
|
+
* repo: ctx.repository.name,
|
|
627
|
+
* sha: status.sha,
|
|
628
|
+
* state: "pending",
|
|
629
|
+
* context: "agent/triage",
|
|
630
|
+
* });
|
|
631
|
+
* },
|
|
632
|
+
* }
|
|
633
|
+
* : null,
|
|
634
|
+
* onEvent: (ctx, event) =>
|
|
635
|
+
* event.eventName === "label" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
636
|
+
* });
|
|
637
|
+
* ```
|
|
638
|
+
*/
|
|
704
639
|
export function githubChannel(
|
|
705
640
|
options: GitHubChannelOptions = {}
|
|
706
641
|
): ChannelDefinition<GitHubChannelState> {
|
|
@@ -807,7 +742,7 @@ export function githubChannel(
|
|
|
807
742
|
githubChannelOptionsByDefinition.set(definition, channelOptions);
|
|
808
743
|
attachHostedAdmissionAdapter(definition, {
|
|
809
744
|
kind: GITHUB_CHANNEL_KIND,
|
|
810
|
-
prepareArgs:
|
|
745
|
+
prepareArgs: withPropagatingBackgroundErrors,
|
|
811
746
|
dispatch: ({ eventType, payload, deliveryId, args }) =>
|
|
812
747
|
dispatchGitHubWebhook({
|
|
813
748
|
options: channelOptions,
|
|
@@ -816,10 +751,6 @@ export function githubChannel(
|
|
|
816
751
|
deliveryId,
|
|
817
752
|
args,
|
|
818
753
|
}),
|
|
819
|
-
getOutcome: (response) => {
|
|
820
|
-
const outcome = getGitHubDispatchOutcome(response);
|
|
821
|
-
return outcome === "skip" || outcome === "task" ? outcome : undefined;
|
|
822
|
-
},
|
|
823
754
|
});
|
|
824
755
|
if (cursorCredentials !== undefined) {
|
|
825
756
|
registerGithubCursorAccountRuntime(definition, {
|
|
@@ -868,6 +799,7 @@ async function handlePullRequest(input: {
|
|
|
868
799
|
repo: parsed.ctx.repository.name,
|
|
869
800
|
number: parsed.ctx.conversation.number,
|
|
870
801
|
repositoryId: parsed.ctx.repository.id,
|
|
802
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
871
803
|
installationId,
|
|
872
804
|
});
|
|
873
805
|
const ctx = enrichEventContext({
|
|
@@ -888,7 +820,7 @@ async function handlePullRequest(input: {
|
|
|
888
820
|
}
|
|
889
821
|
|
|
890
822
|
if (isTaskDispatch(dispatch)) {
|
|
891
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
823
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
892
824
|
action: pullRequest.action,
|
|
893
825
|
prUrl: pullRequest.url,
|
|
894
826
|
headSha: pullRequest.headSha,
|
|
@@ -961,6 +893,7 @@ async function handleIssueComment(input: {
|
|
|
961
893
|
repo: parsed.ctx.repository.name,
|
|
962
894
|
number: parsed.ctx.conversation.number,
|
|
963
895
|
repositoryId: parsed.ctx.repository.id,
|
|
896
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
964
897
|
installationId,
|
|
965
898
|
triggeringCommentId: parsed.comment.id,
|
|
966
899
|
});
|
|
@@ -984,7 +917,7 @@ async function handleIssueComment(input: {
|
|
|
984
917
|
return skipped("not_dispatched");
|
|
985
918
|
}
|
|
986
919
|
if (isTaskDispatch(dispatch)) {
|
|
987
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
920
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
988
921
|
event: "issue_comment",
|
|
989
922
|
action: parsed.action,
|
|
990
923
|
});
|
|
@@ -1052,6 +985,7 @@ async function handleReviewComment(input: {
|
|
|
1052
985
|
repo: parsed.ctx.repository.name,
|
|
1053
986
|
number: parsed.ctx.conversation.number,
|
|
1054
987
|
repositoryId: parsed.ctx.repository.id,
|
|
988
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1055
989
|
installationId,
|
|
1056
990
|
triggeringCommentId: parsed.comment.id,
|
|
1057
991
|
reviewCommentId: parsed.comment.id,
|
|
@@ -1077,7 +1011,7 @@ async function handleReviewComment(input: {
|
|
|
1077
1011
|
return skipped("not_dispatched");
|
|
1078
1012
|
}
|
|
1079
1013
|
if (isTaskDispatch(dispatch)) {
|
|
1080
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1014
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1081
1015
|
event: "pull_request_review_comment",
|
|
1082
1016
|
action: parsed.action,
|
|
1083
1017
|
});
|
|
@@ -1137,6 +1071,7 @@ async function handleIssue(input: {
|
|
|
1137
1071
|
repo: parsed.ctx.repository.name,
|
|
1138
1072
|
number: parsed.ctx.conversation.number,
|
|
1139
1073
|
repositoryId: parsed.ctx.repository.id,
|
|
1074
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1140
1075
|
installationId,
|
|
1141
1076
|
});
|
|
1142
1077
|
const ctx = enrichEventContext({
|
|
@@ -1153,7 +1088,7 @@ async function handleIssue(input: {
|
|
|
1153
1088
|
return skipped("not_dispatched", { action: parsed.issue.action });
|
|
1154
1089
|
}
|
|
1155
1090
|
if (isTaskDispatch(dispatch)) {
|
|
1156
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1091
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1157
1092
|
event: "issues",
|
|
1158
1093
|
action: parsed.issue.action,
|
|
1159
1094
|
issueNumber: parsed.issue.number,
|
|
@@ -1213,7 +1148,7 @@ async function handleCheckSuite(input: {
|
|
|
1213
1148
|
parsed.checkSuite
|
|
1214
1149
|
);
|
|
1215
1150
|
if (dispatch !== null && isTaskDispatch(dispatch)) {
|
|
1216
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1151
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1217
1152
|
event: "check_suite",
|
|
1218
1153
|
action: parsed.checkSuite.action,
|
|
1219
1154
|
checkSuiteId: parsed.checkSuite.checkSuiteId,
|
|
@@ -1227,6 +1162,7 @@ async function handleCheckSuite(input: {
|
|
|
1227
1162
|
repo: parsed.ctx.repository.name,
|
|
1228
1163
|
number: parsed.ctx.conversation.number,
|
|
1229
1164
|
repositoryId: parsed.ctx.repository.id,
|
|
1165
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1230
1166
|
installationId,
|
|
1231
1167
|
});
|
|
1232
1168
|
const ctx = enrichEventContext({
|
|
@@ -1243,7 +1179,7 @@ async function handleCheckSuite(input: {
|
|
|
1243
1179
|
return skipped("not_dispatched", { action: parsed.checkSuite.action });
|
|
1244
1180
|
}
|
|
1245
1181
|
if (isTaskDispatch(dispatch)) {
|
|
1246
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1182
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1247
1183
|
event: "check_suite",
|
|
1248
1184
|
action: parsed.checkSuite.action,
|
|
1249
1185
|
checkSuiteId: parsed.checkSuite.checkSuiteId,
|
|
@@ -1308,7 +1244,7 @@ async function handleCheckRun(input: {
|
|
|
1308
1244
|
parsed.checkRun
|
|
1309
1245
|
);
|
|
1310
1246
|
if (dispatch !== null && isTaskDispatch(dispatch)) {
|
|
1311
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1247
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1312
1248
|
event: "check_run",
|
|
1313
1249
|
action: parsed.checkRun.action,
|
|
1314
1250
|
checkRunId: parsed.checkRun.checkRunId,
|
|
@@ -1322,6 +1258,7 @@ async function handleCheckRun(input: {
|
|
|
1322
1258
|
repo: parsed.ctx.repository.name,
|
|
1323
1259
|
number: parsed.ctx.conversation.number,
|
|
1324
1260
|
repositoryId: parsed.ctx.repository.id,
|
|
1261
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1325
1262
|
installationId,
|
|
1326
1263
|
});
|
|
1327
1264
|
const ctx = enrichEventContext({
|
|
@@ -1338,7 +1275,7 @@ async function handleCheckRun(input: {
|
|
|
1338
1275
|
return skipped("not_dispatched", { action: parsed.checkRun.action });
|
|
1339
1276
|
}
|
|
1340
1277
|
if (isTaskDispatch(dispatch)) {
|
|
1341
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1278
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1342
1279
|
event: "check_run",
|
|
1343
1280
|
action: parsed.checkRun.action,
|
|
1344
1281
|
checkRunId: parsed.checkRun.checkRunId,
|
|
@@ -1399,7 +1336,7 @@ async function handleWorkflowRun(input: {
|
|
|
1399
1336
|
parsed.workflowRun
|
|
1400
1337
|
);
|
|
1401
1338
|
if (dispatch !== null && isTaskDispatch(dispatch)) {
|
|
1402
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1339
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1403
1340
|
event: "workflow_run",
|
|
1404
1341
|
action: parsed.workflowRun.action,
|
|
1405
1342
|
workflowRunId: parsed.workflowRun.workflowRunId,
|
|
@@ -1413,6 +1350,7 @@ async function handleWorkflowRun(input: {
|
|
|
1413
1350
|
repo: parsed.ctx.repository.name,
|
|
1414
1351
|
number: parsed.ctx.conversation.number,
|
|
1415
1352
|
repositoryId: parsed.ctx.repository.id,
|
|
1353
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1416
1354
|
installationId,
|
|
1417
1355
|
});
|
|
1418
1356
|
const ctx = enrichEventContext({
|
|
@@ -1429,7 +1367,7 @@ async function handleWorkflowRun(input: {
|
|
|
1429
1367
|
return skipped("not_dispatched", { action: parsed.workflowRun.action });
|
|
1430
1368
|
}
|
|
1431
1369
|
if (isTaskDispatch(dispatch)) {
|
|
1432
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1370
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1433
1371
|
event: "workflow_run",
|
|
1434
1372
|
action: parsed.workflowRun.action,
|
|
1435
1373
|
workflowRunId: parsed.workflowRun.workflowRunId,
|
|
@@ -1487,6 +1425,7 @@ async function handleStatus(input: {
|
|
|
1487
1425
|
repo: parsed.ctx.repository.name,
|
|
1488
1426
|
number: parsed.ctx.conversation.number,
|
|
1489
1427
|
repositoryId: parsed.ctx.repository.id,
|
|
1428
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1490
1429
|
installationId,
|
|
1491
1430
|
});
|
|
1492
1431
|
const ctx = enrichEventContext({
|
|
@@ -1506,7 +1445,7 @@ async function handleStatus(input: {
|
|
|
1506
1445
|
});
|
|
1507
1446
|
}
|
|
1508
1447
|
if (isTaskDispatch(dispatch)) {
|
|
1509
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1448
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1510
1449
|
event: "status",
|
|
1511
1450
|
state: parsed.status.state,
|
|
1512
1451
|
sha: parsed.status.sha,
|
|
@@ -1563,6 +1502,7 @@ async function handleGenericEvent(input: {
|
|
|
1563
1502
|
repo: parsed.ctx.repository.name,
|
|
1564
1503
|
number: parsed.ctx.conversation.number,
|
|
1565
1504
|
repositoryId: parsed.ctx.repository.id,
|
|
1505
|
+
repositoryUrl: parsed.ctx.repository.url,
|
|
1566
1506
|
installationId,
|
|
1567
1507
|
});
|
|
1568
1508
|
const ctx = enrichEventContext({
|
|
@@ -1579,7 +1519,7 @@ async function handleGenericEvent(input: {
|
|
|
1579
1519
|
return skipped("not_dispatched", { event: input.eventName });
|
|
1580
1520
|
}
|
|
1581
1521
|
if (isTaskDispatch(dispatch)) {
|
|
1582
|
-
return acknowledgeTask(input.args, dispatch, {
|
|
1522
|
+
return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
|
|
1583
1523
|
event: input.eventName,
|
|
1584
1524
|
...(parsed.event.action === undefined
|
|
1585
1525
|
? {}
|
|
@@ -1637,101 +1577,13 @@ async function startTurn(input: {
|
|
|
1637
1577
|
};
|
|
1638
1578
|
|
|
1639
1579
|
if (lazy) {
|
|
1640
|
-
scheduleAfterAck(input.args, async () => {
|
|
1580
|
+
scheduleAfterAck(input.args, GITHUB_CHANNEL_KIND, async () => {
|
|
1641
1581
|
await sendTurn();
|
|
1642
1582
|
});
|
|
1643
1583
|
return acknowledgeTurn();
|
|
1644
1584
|
}
|
|
1645
1585
|
|
|
1646
|
-
|
|
1647
|
-
if (isDeferredChannelSession(session)) {
|
|
1648
|
-
// Hosted admission captured the send; the control plane allocates the
|
|
1649
|
-
// session after acknowledgement, so there is nothing to report yet.
|
|
1650
|
-
return acknowledgeTurn();
|
|
1651
|
-
}
|
|
1652
|
-
return withDispatchOutcome(
|
|
1653
|
-
Response.json({
|
|
1654
|
-
ok: true,
|
|
1655
|
-
sessionId: session.id,
|
|
1656
|
-
isNew: session.isNew,
|
|
1657
|
-
continuationToken: session.continuationToken,
|
|
1658
|
-
}),
|
|
1659
|
-
"send"
|
|
1660
|
-
);
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
function scheduleAfterAck(
|
|
1664
|
-
args: ChannelHandlerArgs,
|
|
1665
|
-
work: () => void | Promise<void>
|
|
1666
|
-
): void {
|
|
1667
|
-
// Defer past the current turn so the 202 can flush before work starts
|
|
1668
|
-
// (and so tests can assert scheduling without racing microtasks).
|
|
1669
|
-
args.waitUntil(
|
|
1670
|
-
new Promise<void>((resolve, reject) => {
|
|
1671
|
-
setImmediate(() => {
|
|
1672
|
-
Promise.resolve()
|
|
1673
|
-
.then(work)
|
|
1674
|
-
.then(
|
|
1675
|
-
() => resolve(),
|
|
1676
|
-
(error: unknown) => {
|
|
1677
|
-
if (
|
|
1678
|
-
(args as GitHubHandlerArgs)[PROPAGATE_BACKGROUND_ERRORS] ===
|
|
1679
|
-
true
|
|
1680
|
-
) {
|
|
1681
|
-
reject(error);
|
|
1682
|
-
return;
|
|
1683
|
-
}
|
|
1684
|
-
const detail =
|
|
1685
|
-
error instanceof Error
|
|
1686
|
-
? (error.stack ?? error.message)
|
|
1687
|
-
: String(error);
|
|
1688
|
-
console.error(`[github] background dispatch failed: ${detail}`);
|
|
1689
|
-
resolve();
|
|
1690
|
-
}
|
|
1691
|
-
);
|
|
1692
|
-
});
|
|
1693
|
-
})
|
|
1694
|
-
);
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
/** 202 ack for a turn whose send completes after the response flushes. */
|
|
1698
|
-
function acknowledgeTurn(): Response {
|
|
1699
|
-
return withDispatchOutcome(
|
|
1700
|
-
Response.json(
|
|
1701
|
-
{ ok: true, dispatched: true, mode: "turn" },
|
|
1702
|
-
{ status: 202 }
|
|
1703
|
-
),
|
|
1704
|
-
"send"
|
|
1705
|
-
);
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
function acknowledgeTask(
|
|
1709
|
-
args: ChannelHandlerArgs,
|
|
1710
|
-
dispatch: GitHubTaskDispatch,
|
|
1711
|
-
extra: Record<string, unknown>
|
|
1712
|
-
): Response {
|
|
1713
|
-
// Hand the task the per-delivery send/waitUntil so hosted admission can
|
|
1714
|
-
// capture task-initiated sends; startup-captured sends bypass capture.
|
|
1715
|
-
scheduleAfterAck(args, () =>
|
|
1716
|
-
dispatch.task({ send: args.send, waitUntil: args.waitUntil })
|
|
1717
|
-
);
|
|
1718
|
-
return withDispatchOutcome(
|
|
1719
|
-
Response.json(
|
|
1720
|
-
{ ok: true, dispatched: true, mode: "task", ...extra },
|
|
1721
|
-
{ status: 202 }
|
|
1722
|
-
),
|
|
1723
|
-
"task"
|
|
1724
|
-
);
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
function skipped(
|
|
1728
|
-
reason: string,
|
|
1729
|
-
extra: Record<string, unknown> = {}
|
|
1730
|
-
): Response {
|
|
1731
|
-
return withDispatchOutcome(
|
|
1732
|
-
Response.json({ ok: true, skipped: true, reason, ...extra }),
|
|
1733
|
-
"skip"
|
|
1734
|
-
);
|
|
1586
|
+
return turnStarted(await sendTurn());
|
|
1735
1587
|
}
|
|
1736
1588
|
|
|
1737
1589
|
function formatCiMessage(
|
|
@@ -2538,6 +2390,7 @@ function enrichCiContext(input: {
|
|
|
2538
2390
|
repo: input.ctx.repository.name,
|
|
2539
2391
|
number: input.ctx.conversation.number,
|
|
2540
2392
|
repositoryId: input.ctx.repository.id,
|
|
2393
|
+
repositoryUrl: input.ctx.repository.url,
|
|
2541
2394
|
installationId: input.installationId,
|
|
2542
2395
|
});
|
|
2543
2396
|
return enrichEventContext({
|
|
@@ -28,6 +28,27 @@ export interface GitHubProgressPhaseCopy {
|
|
|
28
28
|
export interface GitHubCommitStatusProgress extends GitHubProgressPhaseCopy {
|
|
29
29
|
/** Check run name (unique per check in the merge box). */
|
|
30
30
|
context: string;
|
|
31
|
+
/**
|
|
32
|
+
* Check Details URL for this session. When it resolves, it is written as
|
|
33
|
+
* `details_url` and (with {@link summaryLinkText}) appended to the summary.
|
|
34
|
+
*/
|
|
35
|
+
detailsUrl?: (sessionId: string) => string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* `output.title` source. `"phase"` (default) uses the pending/success/
|
|
38
|
+
* failure copy. `"context"` uses the check name — the dashboard automation
|
|
39
|
+
* shape (`Cursor Security Agent: …`).
|
|
40
|
+
*/
|
|
41
|
+
outputTitle?: "phase" | "context";
|
|
42
|
+
/**
|
|
43
|
+
* Markdown link label appended to the summary when {@link detailsUrl}
|
|
44
|
+
* resolves, e.g. `"View agent"`.
|
|
45
|
+
*/
|
|
46
|
+
summaryLinkText?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Conclusion for the failure phase. Default `"failure"`. Use `"neutral"`
|
|
49
|
+
* when a red merge-box check must not gate merge (findings live on the PR).
|
|
50
|
+
*/
|
|
51
|
+
failureConclusion?: "failure" | "neutral";
|
|
31
52
|
}
|
|
32
53
|
|
|
33
54
|
export type GitHubBannerProgress = GitHubProgressPhaseCopy;
|
|
@@ -125,6 +146,7 @@ function progressLabel(
|
|
|
125
146
|
*/
|
|
126
147
|
export async function applyGitHubProgress(input: {
|
|
127
148
|
phase: GitHubProgressPhase;
|
|
149
|
+
sessionId?: string;
|
|
128
150
|
channel: { state: GitHubChannelState };
|
|
129
151
|
options: GitHubProgressOptions;
|
|
130
152
|
}): Promise<void> {
|
|
@@ -139,6 +161,7 @@ export async function applyGitHubProgress(input: {
|
|
|
139
161
|
tasks.push(
|
|
140
162
|
postProgressCheckRun({
|
|
141
163
|
phase: input.phase,
|
|
164
|
+
sessionId: input.sessionId,
|
|
142
165
|
channel: input.channel,
|
|
143
166
|
options: input.options,
|
|
144
167
|
commitStatus,
|
|
@@ -159,8 +182,35 @@ export async function applyGitHubProgress(input: {
|
|
|
159
182
|
await Promise.all(tasks);
|
|
160
183
|
}
|
|
161
184
|
|
|
185
|
+
function resolveProgressDetailsUrl(input: {
|
|
186
|
+
sessionId: string | undefined;
|
|
187
|
+
commitStatus: GitHubCommitStatusProgress;
|
|
188
|
+
}): string | undefined {
|
|
189
|
+
if (
|
|
190
|
+
input.sessionId === undefined ||
|
|
191
|
+
input.commitStatus.detailsUrl === undefined
|
|
192
|
+
) {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
const url = input.commitStatus.detailsUrl(input.sessionId)?.trim();
|
|
196
|
+
return url === "" ? undefined : url;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function appendSummaryLink(
|
|
200
|
+
summary: string,
|
|
201
|
+
detailsUrl?: string,
|
|
202
|
+
linkText?: string
|
|
203
|
+
): string {
|
|
204
|
+
const label = linkText?.trim();
|
|
205
|
+
if (detailsUrl === undefined || label === undefined || label === "") {
|
|
206
|
+
return summary;
|
|
207
|
+
}
|
|
208
|
+
return `${summary}\n\n[${label}](${detailsUrl})`;
|
|
209
|
+
}
|
|
210
|
+
|
|
162
211
|
async function postProgressCheckRun(input: {
|
|
163
212
|
phase: GitHubProgressPhase;
|
|
213
|
+
sessionId?: string;
|
|
164
214
|
channel: { state: GitHubChannelState };
|
|
165
215
|
options: GitHubProgressOptions;
|
|
166
216
|
commitStatus: GitHubCommitStatusProgress;
|
|
@@ -175,17 +225,32 @@ async function postProgressCheckRun(input: {
|
|
|
175
225
|
return;
|
|
176
226
|
}
|
|
177
227
|
const sha = state.headSha;
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
228
|
+
const phaseCopy = progressPhaseCopy({
|
|
229
|
+
copy: input.commitStatus,
|
|
230
|
+
phase: input.phase,
|
|
231
|
+
label: progressLabel(input.options, input.commitStatus.context),
|
|
232
|
+
});
|
|
233
|
+
const title = clipStatusDescription(
|
|
234
|
+
input.commitStatus.outputTitle === "context"
|
|
235
|
+
? input.commitStatus.context
|
|
236
|
+
: phaseCopy
|
|
184
237
|
);
|
|
238
|
+
const detailsUrl = resolveProgressDetailsUrl({
|
|
239
|
+
sessionId: input.sessionId,
|
|
240
|
+
commitStatus: input.commitStatus,
|
|
241
|
+
});
|
|
185
242
|
const write: GitHubCheckRunWriteInput = {
|
|
186
243
|
name: input.commitStatus.context,
|
|
187
|
-
...checkRunPhaseFields(input.phase),
|
|
188
|
-
|
|
244
|
+
...checkRunPhaseFields(input.phase, input.commitStatus.failureConclusion),
|
|
245
|
+
...(detailsUrl === undefined ? {} : { detailsUrl }),
|
|
246
|
+
output: {
|
|
247
|
+
title,
|
|
248
|
+
summary: appendSummaryLink(
|
|
249
|
+
phaseCopy,
|
|
250
|
+
detailsUrl,
|
|
251
|
+
input.commitStatus.summaryLinkText
|
|
252
|
+
),
|
|
253
|
+
},
|
|
189
254
|
};
|
|
190
255
|
const resource = {
|
|
191
256
|
api: input.options.api,
|
|
@@ -249,14 +314,15 @@ function shouldRecreateCheckRun(
|
|
|
249
314
|
}
|
|
250
315
|
|
|
251
316
|
function checkRunPhaseFields(
|
|
252
|
-
phase: GitHubProgressPhase
|
|
317
|
+
phase: GitHubProgressPhase,
|
|
318
|
+
failureConclusion: "failure" | "neutral" = "failure"
|
|
253
319
|
): Pick<GitHubCheckRunWriteInput, "conclusion" | "status"> {
|
|
254
320
|
if (phase === "pending") {
|
|
255
321
|
return { status: "in_progress" };
|
|
256
322
|
}
|
|
257
323
|
return {
|
|
258
324
|
status: "completed",
|
|
259
|
-
conclusion: phase === "success" ? "success" :
|
|
325
|
+
conclusion: phase === "success" ? "success" : failureConclusion,
|
|
260
326
|
};
|
|
261
327
|
}
|
|
262
328
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Synthesize GitHub webhook payloads from data you can *read* about a PR, so
|
|
3
|
-
* `agent-
|
|
3
|
+
* `agent-sdk github replay` can exercise a `githubChannel()` without repo
|
|
4
4
|
* admin, without the `gh webhook forward` relay, and deterministically (great
|
|
5
5
|
* for hillclimbing).
|
|
6
6
|
*
|