@sentry/junior 0.197.0 → 0.199.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-CM4EKXL4.js → agent-hooks-GLHLHDA6.js} +11 -11
- package/dist/api/schema.d.ts +3157 -22
- package/dist/api/schema.js +1 -1
- package/dist/api.d.ts +27 -8
- package/dist/api.js +26 -25
- package/dist/app.d.ts +456 -15
- package/dist/app.js +3920 -3706
- package/dist/{catalog-runtime-V7WGCXUD.js → catalog-runtime-J2VOYYYV.js} +4 -4
- package/dist/{chunk-V2IX5Q5L.js → chunk-23ITKUM3.js} +8 -8
- package/dist/{chunk-SBCWV4E4.js → chunk-2B2KKIWT.js} +9 -9
- package/dist/{chunk-HDSDOBWN.js → chunk-3ARYTHKB.js} +8 -2
- package/dist/{chunk-5MMQLB2B.js → chunk-46WKZ2SS.js} +1 -1
- package/dist/{chunk-O5RG7SKU.js → chunk-4YIE2TYI.js} +3 -3
- package/dist/{chunk-YC5CFKME.js → chunk-5UMYAEOX.js} +1 -1
- package/dist/{chunk-DBTI74IT.js → chunk-7667XKEG.js} +5 -5
- package/dist/{chunk-C2SOA3KN.js → chunk-B63AKBOM.js} +3 -3
- package/dist/{chunk-6ZQ3CE6X.js → chunk-BO6MPZSQ.js} +1 -1
- package/dist/{chunk-ITP4OR7R.js → chunk-CIFTZ6A7.js} +4 -4
- package/dist/{chunk-5GWV7SXF.js → chunk-CYTCY25C.js} +3 -3
- package/dist/{chunk-EZKISZ3Q.js → chunk-CZFI77CX.js} +1 -1
- package/dist/{chunk-2K26W3FP.js → chunk-FAGRJZ4E.js} +1 -1
- package/dist/{chunk-VAUPAX3O.js → chunk-GNHCHX6P.js} +4 -4
- package/dist/{chunk-DHWYAHAM.js → chunk-HDZEZ7OB.js} +1 -1
- package/dist/{chunk-MJCJ62RZ.js → chunk-I3HP6Z6Z.js} +4 -4
- package/dist/{chunk-XALIC5SY.js → chunk-K3427KVO.js} +2 -2
- package/dist/{chunk-DLXA2ZXJ.js → chunk-MI5SP4SR.js} +2 -2
- package/dist/{chunk-LBN67OZR.js → chunk-MTM5IFCY.js} +1 -0
- package/dist/{chunk-WOJG25QZ.js → chunk-OJBDDF7X.js} +8 -8
- package/dist/{chunk-IGSAXSM7.js → chunk-P22PNLK7.js} +4 -4
- package/dist/{chunk-YZQLXALE.js → chunk-P7QOUKYL.js} +2 -2
- package/dist/{chunk-LIK4T6CF.js → chunk-PB74QQQS.js} +6 -6
- package/dist/{chunk-PM5WSDAD.js → chunk-PQWRTBQJ.js} +2 -2
- package/dist/{chunk-7ENMKNEK.js → chunk-PSFQC35H.js} +1 -1
- package/dist/{chunk-LMTHFU5D.js → chunk-PTT4LXUL.js} +7 -6
- package/dist/{chunk-T5MK3RUT.js → chunk-QF4E3RNM.js} +3 -3
- package/dist/{chunk-4USCVHQZ.js → chunk-RQJ4PBAI.js} +5 -5
- package/dist/{chunk-NANQFFGO.js → chunk-RVM3TBKW.js} +28 -28
- package/dist/{chunk-BR5GNDPS.js → chunk-SHWGNIZJ.js} +55 -3
- package/dist/{chunk-O2H7JUEQ.js → chunk-SWA7F2IQ.js} +25 -24
- package/dist/{chunk-H6QL3FWC.js → chunk-TN3MRLBG.js} +21 -21
- package/dist/{chunk-BQ7UXCUO.js → chunk-TT2FUK6X.js} +1 -1
- package/dist/{chunk-YLBJBBYX.js → chunk-VL4SXCWF.js} +3 -3
- package/dist/{chunk-FCONFDZ4.js → chunk-VXG62JVC.js} +1 -1
- package/dist/{chunk-PF3PEX4Q.js → chunk-WQ7RAWIY.js} +1 -1
- package/dist/{chunk-BGSAFVJO.js → chunk-WR4GQARR.js} +1 -1
- package/dist/{chunk-4UUKQB6I.js → chunk-YTXEKSV6.js} +6 -6
- package/dist/{chunk-S3DRTWPX.js → chunk-ZOUAXRCD.js} +5 -5
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/{db-6BD722UD.js → db-2K4NSLLX.js} +6 -6
- package/dist/instrumentation.d.ts +3 -1
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.d.ts +14 -7
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-P6AIT27Q.js → oauth-callback-server-ECRF67PN.js} +29 -29
- package/dist/{runner-OKPDZOJC.js → runner-WCRHEM6N.js} +21 -21
- package/dist/{skills-CQFX3V2I.js → skills-HGNNRMPX.js} +5 -5
- package/dist/spawn-IZ5SV7OV.js +42 -0
- package/dist/task-runner-GG6KD2PL.js +36 -0
- package/dist/{validation-STB4W433.js → validation-EKFIUZ4Y.js} +5 -5
- package/dist/vercel.d.ts +4 -2
- package/dist/version.d.ts +3 -1
- package/dist/version.js +1 -1
- package/dist/{work-B7N5TEYI.js → work-LFTVZJUQ.js} +21 -21
- package/dist/{worker-W6PBEHCA.js → worker-5GGUQCE3.js} +10 -10
- package/package.json +5 -5
- package/dist/api/acp/auth.d.ts +0 -46
- package/dist/api/acp/authorization-page.d.ts +0 -11
- package/dist/api/acp/conversations.d.ts +0 -70
- package/dist/api/acp/errors.d.ts +0 -6
- package/dist/api/acp/route.d.ts +0 -16
- package/dist/api/acp/schema.d.ts +0 -115
- package/dist/api/acp/sleep.d.ts +0 -2
- package/dist/api/acp/state.d.ts +0 -22
- package/dist/api/acp/transport.d.ts +0 -113
- package/dist/api/activity.d.ts +0 -24
- package/dist/api/code/overview.d.ts +0 -98
- package/dist/api/code/routes.d.ts +0 -4
- package/dist/api/conversations/access.d.ts +0 -10
- package/dist/api/conversations/aggregate.d.ts +0 -31
- package/dist/api/conversations/archive.d.ts +0 -6
- package/dist/api/conversations/attachments.d.ts +0 -32
- package/dist/api/conversations/auxiliary-costs.d.ts +0 -6
- package/dist/api/conversations/cancel-pending-messages.d.ts +0 -4
- package/dist/api/conversations/create.d.ts +0 -6
- package/dist/api/conversations/cursor.d.ts +0 -17
- package/dist/api/conversations/detail.d.ts +0 -7
- package/dist/api/conversations/event-list.d.ts +0 -7
- package/dist/api/conversations/event-page.d.ts +0 -18
- package/dist/api/conversations/events.d.ts +0 -18
- package/dist/api/conversations/list.d.ts +0 -145
- package/dist/api/conversations/membership.d.ts +0 -30
- package/dist/api/conversations/pending-messages.d.ts +0 -15
- package/dist/api/conversations/priority.d.ts +0 -22
- package/dist/api/conversations/projection.d.ts +0 -21
- package/dist/api/conversations/reporting.d.ts +0 -48
- package/dist/api/conversations/routes.d.ts +0 -7
- package/dist/api/conversations/shared.d.ts +0 -5
- package/dist/api/conversations/stats.d.ts +0 -3
- package/dist/api/conversations/stats.query.d.ts +0 -3
- package/dist/api/conversations/usage.d.ts +0 -9
- package/dist/api/conversations/user-message-activity.d.ts +0 -3
- package/dist/api/http.d.ts +0 -8
- package/dist/api/locations/detail.d.ts +0 -134
- package/dist/api/locations/list.d.ts +0 -47
- package/dist/api/locations/query.d.ts +0 -8
- package/dist/api/locations/routes.d.ts +0 -4
- package/dist/api/people/code.d.ts +0 -34
- package/dist/api/people/list.d.ts +0 -3
- package/dist/api/people/list.query.d.ts +0 -3
- package/dist/api/people/plugin-reports.d.ts +0 -7
- package/dist/api/people/profile.d.ts +0 -6
- package/dist/api/people/profile.query.d.ts +0 -6
- package/dist/api/people/routes.d.ts +0 -4
- package/dist/api/people/shared.d.ts +0 -1375
- package/dist/api/people/spend.d.ts +0 -3
- package/dist/api/people/spend.query.d.ts +0 -3
- package/dist/api/personal-tokens/routes.d.ts +0 -4
- package/dist/api/reporting-window.d.ts +0 -78
- package/dist/api/route.d.ts +0 -15
- package/dist/api/schema/code.d.ts +0 -147
- package/dist/api/schema/common.d.ts +0 -6
- package/dist/api/schema/conversation.d.ts +0 -1604
- package/dist/api/schema/location.d.ts +0 -270
- package/dist/api/schema/person.d.ts +0 -362
- package/dist/api/schema/personal-token.d.ts +0 -38
- package/dist/api/schema/stats.d.ts +0 -22
- package/dist/api/schema/task.d.ts +0 -423
- package/dist/api/schema/workspace.d.ts +0 -69
- package/dist/api/stats.d.ts +0 -3
- package/dist/api/tasks/routes.d.ts +0 -4
- package/dist/api/user-pages/routes.d.ts +0 -4
- package/dist/api/validation.d.ts +0 -7
- package/dist/api/viewer.d.ts +0 -3
- package/dist/api/workspaces/routes.d.ts +0 -4
- package/dist/build/copy-build-content.d.ts +0 -6
- package/dist/build/glob-to-regex.d.ts +0 -2
- package/dist/build/rolldown-workarounds.d.ts +0 -14
- package/dist/build/virtual-config.d.ts +0 -25
- package/dist/chat/actor.d.ts +0 -83
- package/dist/chat/agent/action-confirmation-retry.d.ts +0 -6
- package/dist/chat/agent/handoff.d.ts +0 -73
- package/dist/chat/agent/index.d.ts +0 -22
- package/dist/chat/agent/prompt.d.ts +0 -86
- package/dist/chat/agent/repository-context.d.ts +0 -21
- package/dist/chat/agent/resume.d.ts +0 -60
- package/dist/chat/agent/retry-usage.d.ts +0 -8
- package/dist/chat/agent/sandbox.d.ts +0 -55
- package/dist/chat/agent/skills.d.ts +0 -17
- package/dist/chat/agent/tools.d.ts +0 -91
- package/dist/chat/agent/types.d.ts +0 -224
- package/dist/chat/agent-dispatch/context.d.ts +0 -43
- package/dist/chat/agent-dispatch/heartbeat.d.ts +0 -27
- package/dist/chat/agent-dispatch/store.d.ts +0 -42
- package/dist/chat/agent-dispatch/types.d.ts +0 -60
- package/dist/chat/agent-dispatch/validation.d.ts +0 -5
- package/dist/chat/agent-dispatch/work.d.ts +0 -49
- package/dist/chat/agent-invocations/errors.d.ts +0 -8
- package/dist/chat/agent-invocations/spawn.d.ts +0 -12
- package/dist/chat/agent-invocations/store.d.ts +0 -46
- package/dist/chat/agent-invocations/types.d.ts +0 -505
- package/dist/chat/agent-invocations/work.d.ts +0 -29
- package/dist/chat/app/conversation-work.d.ts +0 -37
- package/dist/chat/app/factory.d.ts +0 -23
- package/dist/chat/app/production.d.ts +0 -24
- package/dist/chat/app/services.d.ts +0 -25
- package/dist/chat/artifacts/store.d.ts +0 -42
- package/dist/chat/attachments/storage.d.ts +0 -14
- package/dist/chat/attachments/store.d.ts +0 -68
- package/dist/chat/attachments/vercel.d.ts +0 -3
- package/dist/chat/capabilities/factory.d.ts +0 -11
- package/dist/chat/capabilities/jr-rpc-command.d.ts +0 -26
- package/dist/chat/capabilities/router.d.ts +0 -20
- package/dist/chat/code/publisher.d.ts +0 -3
- package/dist/chat/code/store.d.ts +0 -9
- package/dist/chat/coerce.d.ts +0 -6
- package/dist/chat/config.d.ts +0 -84
- package/dist/chat/configuration/defaults.d.ts +0 -4
- package/dist/chat/configuration/service.d.ts +0 -5
- package/dist/chat/configuration/sql.d.ts +0 -9
- package/dist/chat/configuration/types.d.ts +0 -41
- package/dist/chat/configuration/validation.d.ts +0 -2
- package/dist/chat/conversation-privacy.d.ts +0 -39
- package/dist/chat/conversations/destination-visibility.d.ts +0 -7
- package/dist/chat/conversations/destination.d.ts +0 -12
- package/dist/chat/conversations/history.d.ts +0 -1157
- package/dist/chat/conversations/location.d.ts +0 -5
- package/dist/chat/conversations/message-projection.d.ts +0 -4
- package/dist/chat/conversations/message-search.d.ts +0 -38
- package/dist/chat/conversations/message-summaries.d.ts +0 -9
- package/dist/chat/conversations/messages.d.ts +0 -32
- package/dist/chat/conversations/projection.d.ts +0 -199
- package/dist/chat/conversations/provenance.d.ts +0 -50
- package/dist/chat/conversations/retention.d.ts +0 -40
- package/dist/chat/conversations/sql/actor-identity.d.ts +0 -19
- package/dist/chat/conversations/sql/bindings.d.ts +0 -13
- package/dist/chat/conversations/sql/conversation-row.d.ts +0 -17
- package/dist/chat/conversations/sql/event-actor.d.ts +0 -14
- package/dist/chat/conversations/sql/event-lock.d.ts +0 -3
- package/dist/chat/conversations/sql/history.d.ts +0 -4
- package/dist/chat/conversations/sql/location.d.ts +0 -18
- package/dist/chat/conversations/sql/message-search.d.ts +0 -4
- package/dist/chat/conversations/sql/participants.d.ts +0 -18
- package/dist/chat/conversations/sql/privacy.d.ts +0 -15
- package/dist/chat/conversations/sql/purge.d.ts +0 -45
- package/dist/chat/conversations/sql/store.d.ts +0 -77
- package/dist/chat/conversations/stop.d.ts +0 -12
- package/dist/chat/conversations/store.d.ts +0 -151
- package/dist/chat/conversations/structured-events.d.ts +0 -42
- package/dist/chat/conversations/tool-source.d.ts +0 -5
- package/dist/chat/conversations/turn-lifecycle.d.ts +0 -44
- package/dist/chat/conversations/web-authorization.d.ts +0 -24
- package/dist/chat/conversations/web-input.d.ts +0 -98
- package/dist/chat/conversations/web-mailbox.d.ts +0 -12
- package/dist/chat/credentials/broker.d.ts +0 -23
- package/dist/chat/credentials/context.d.ts +0 -121
- package/dist/chat/credentials/header-transforms.d.ts +0 -3
- package/dist/chat/credentials/oauth-scope.d.ts +0 -4
- package/dist/chat/credentials/state-adapter-token-store.d.ts +0 -11
- package/dist/chat/credentials/subject.d.ts +0 -49
- package/dist/chat/credentials/unlink-provider.d.ts +0 -3
- package/dist/chat/credentials/user-token-store.d.ts +0 -24
- package/dist/chat/current-instruction.d.ts +0 -8
- package/dist/chat/db.d.ts +0 -16
- package/dist/chat/destination.d.ts +0 -14
- package/dist/chat/discovery.d.ts +0 -49
- package/dist/chat/egress/credentialed.d.ts +0 -57
- package/dist/chat/egress/plugin.d.ts +0 -24
- package/dist/chat/event-tasks/ingest.d.ts +0 -9
- package/dist/chat/event-tasks/store.d.ts +0 -41
- package/dist/chat/event-tasks/tool-support.d.ts +0 -158
- package/dist/chat/event-tasks/types.d.ts +0 -51
- package/dist/chat/experimental.d.ts +0 -16
- package/dist/chat/identities/identity.d.ts +0 -18
- package/dist/chat/identities/sql.d.ts +0 -12
- package/dist/chat/ingress/bot-mention.d.ts +0 -13
- package/dist/chat/ingress/junior-chat.d.ts +0 -26
- package/dist/chat/ingress/message-changed.d.ts +0 -52
- package/dist/chat/ingress/message-router.d.ts +0 -12
- package/dist/chat/ingress/slack-webhook.d.ts +0 -21
- package/dist/chat/ingress/slash-command.d.ts +0 -3
- package/dist/chat/ingress/workspace-membership.d.ts +0 -9
- package/dist/chat/interruption-marker.d.ts +0 -2
- package/dist/chat/local/credential-sync.d.ts +0 -5
- package/dist/chat/local/oauth-relay.d.ts +0 -4
- package/dist/chat/log-context.d.ts +0 -40
- package/dist/chat/logging.d.ts +0 -122
- package/dist/chat/mcp/auth-store.d.ts +0 -43
- package/dist/chat/mcp/client.d.ts +0 -40
- package/dist/chat/mcp/errors.d.ts +0 -32
- package/dist/chat/mcp/oauth-provider.d.ts +0 -30
- package/dist/chat/mcp/oauth.d.ts +0 -21
- package/dist/chat/mcp/tool-manager.d.ts +0 -95
- package/dist/chat/mcp/tool-name.d.ts +0 -2
- package/dist/chat/model-profile.d.ts +0 -34
- package/dist/chat/no-reply.d.ts +0 -6
- package/dist/chat/oauth-authorization.d.ts +0 -17
- package/dist/chat/oauth-flow.d.ts +0 -60
- package/dist/chat/oauth-response.d.ts +0 -21
- package/dist/chat/optional-string.d.ts +0 -5
- package/dist/chat/pi/client.d.ts +0 -62
- package/dist/chat/pi/conversation-events.d.ts +0 -38
- package/dist/chat/pi/gateway-auth.d.ts +0 -16
- package/dist/chat/pi/messages.d.ts +0 -19
- package/dist/chat/pi/sdk.d.ts +0 -7
- package/dist/chat/pi/sql-model-usage.d.ts +0 -13
- package/dist/chat/pi/traced-stream.d.ts +0 -13
- package/dist/chat/pi/transcript.d.ts +0 -52
- package/dist/chat/plugins/agent-hooks.d.ts +0 -89
- package/dist/chat/plugins/annotations.d.ts +0 -11
- package/dist/chat/plugins/auth/api-headers-broker.d.ts +0 -6
- package/dist/chat/plugins/auth/auth-token-placeholder.d.ts +0 -3
- package/dist/chat/plugins/auth/oauth-bearer-broker.d.ts +0 -6
- package/dist/chat/plugins/auth/oauth-request.d.ts +0 -26
- package/dist/chat/plugins/catalog-runtime.d.ts +0 -1
- package/dist/chat/plugins/command-env.d.ts +0 -3
- package/dist/chat/plugins/conversation-event-stats.d.ts +0 -3
- package/dist/chat/plugins/conversation-events.d.ts +0 -15
- package/dist/chat/plugins/conversation-sidebar.d.ts +0 -3
- package/dist/chat/plugins/credential-hooks.d.ts +0 -51
- package/dist/chat/plugins/inline-manifest-source.d.ts +0 -5
- package/dist/chat/plugins/logging.d.ts +0 -3
- package/dist/chat/plugins/manifest.d.ts +0 -5
- package/dist/chat/plugins/model.d.ts +0 -9
- package/dist/chat/plugins/package-discovery.d.ts +0 -20
- package/dist/chat/plugins/prompt.d.ts +0 -14
- package/dist/chat/plugins/registry.d.ts +0 -27
- package/dist/chat/plugins/state.d.ts +0 -4
- package/dist/chat/plugins/task-queue.d.ts +0 -42
- package/dist/chat/plugins/task-runner.d.ts +0 -12
- package/dist/chat/plugins/types.d.ts +0 -126
- package/dist/chat/plugins/unfinished-work.d.ts +0 -13
- package/dist/chat/plugins/user-pages.d.ts +0 -16
- package/dist/chat/plugins/validation.d.ts +0 -5
- package/dist/chat/plugins/viewer.d.ts +0 -24
- package/dist/chat/prompt.d.ts +0 -44
- package/dist/chat/providers/slack/input.d.ts +0 -32
- package/dist/chat/providers/slack/processing-reaction.d.ts +0 -21
- package/dist/chat/providers/slack/resume.d.ts +0 -73
- package/dist/chat/providers/slack/runtime.d.ts +0 -114
- package/dist/chat/providers/slack/system-turn.d.ts +0 -13
- package/dist/chat/providers/slack/turn.d.ts +0 -59
- package/dist/chat/queue/callback.d.ts +0 -26
- package/dist/chat/queue/sign.d.ts +0 -30
- package/dist/chat/reasoning-level.d.ts +0 -4
- package/dist/chat/repository-instructions.d.ts +0 -55
- package/dist/chat/resource-events/actor.d.ts +0 -36
- package/dist/chat/resource-events/app-publisher.d.ts +0 -18
- package/dist/chat/resource-events/catalog.d.ts +0 -52
- package/dist/chat/resource-events/ingest.d.ts +0 -10
- package/dist/chat/resource-events/notification.d.ts +0 -54
- package/dist/chat/resource-events/runtime-catalog.d.ts +0 -8
- package/dist/chat/resource-events/store.d.ts +0 -92
- package/dist/chat/resource-events/tool-support.d.ts +0 -9
- package/dist/chat/resource-events/workspace.d.ts +0 -8
- package/dist/chat/runtime/agent-run-outcome.d.ts +0 -29
- package/dist/chat/runtime/agent-runner.d.ts +0 -18
- package/dist/chat/runtime/auth-pause-state.d.ts +0 -11
- package/dist/chat/runtime/conversation-message.d.ts +0 -10
- package/dist/chat/runtime/delivered-turn-state.d.ts +0 -12
- package/dist/chat/runtime/dev-agent-trace.d.ts +0 -1
- package/dist/chat/runtime/report-progress.d.ts +0 -6
- package/dist/chat/runtime/request-deadline.d.ts +0 -8
- package/dist/chat/runtime/thread-context.d.ts +0 -29
- package/dist/chat/runtime/thread-state.d.ts +0 -25
- package/dist/chat/runtime/turn-execution.d.ts +0 -35
- package/dist/chat/runtime/turn-input.d.ts +0 -34
- package/dist/chat/runtime/turn-preparation.d.ts +0 -30
- package/dist/chat/runtime/turn-user-message.d.ts +0 -13
- package/dist/chat/runtime/turn.d.ts +0 -77
- package/dist/chat/sandbox/command-result.d.ts +0 -74
- package/dist/chat/sandbox/credentials.d.ts +0 -11
- package/dist/chat/sandbox/docker.d.ts +0 -17
- package/dist/chat/sandbox/egress/credentials.d.ts +0 -61
- package/dist/chat/sandbox/egress/oidc.d.ts +0 -3
- package/dist/chat/sandbox/egress/policy.d.ts +0 -32
- package/dist/chat/sandbox/egress/proxy.d.ts +0 -35
- package/dist/chat/sandbox/egress/schemas.d.ts +0 -187
- package/dist/chat/sandbox/egress/session.d.ts +0 -59
- package/dist/chat/sandbox/egress/signals.d.ts +0 -9
- package/dist/chat/sandbox/egress/tracing.d.ts +0 -7
- package/dist/chat/sandbox/errors.d.ts +0 -18
- package/dist/chat/sandbox/http-error-details.d.ts +0 -18
- package/dist/chat/sandbox/noninteractive-command.d.ts +0 -21
- package/dist/chat/sandbox/paths.d.ts +0 -8
- package/dist/chat/sandbox/prepare-workspace.d.ts +0 -35
- package/dist/chat/sandbox/ref.d.ts +0 -6
- package/dist/chat/sandbox/resources.d.ts +0 -15
- package/dist/chat/sandbox/runtime-dependencies.d.ts +0 -3
- package/dist/chat/sandbox/sandbox.d.ts +0 -45
- package/dist/chat/sandbox/session.d.ts +0 -50
- package/dist/chat/sandbox/skill-sandbox.d.ts +0 -42
- package/dist/chat/sandbox/skill-sync.d.ts +0 -16
- package/dist/chat/sandbox/snapshot/builder-sandbox.d.ts +0 -5
- package/dist/chat/sandbox/snapshot/events.d.ts +0 -30
- package/dist/chat/sandbox/snapshot/install.d.ts +0 -6
- package/dist/chat/sandbox/snapshot/job-callback.d.ts +0 -5
- package/dist/chat/sandbox/snapshot/job-queue.d.ts +0 -26
- package/dist/chat/sandbox/snapshot/job-runner.d.ts +0 -11
- package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +0 -11
- package/dist/chat/sandbox/snapshot/profile.d.ts +0 -15
- package/dist/chat/sandbox/snapshot/resolve.d.ts +0 -43
- package/dist/chat/sandbox/snapshot/runtime.d.ts +0 -2
- package/dist/chat/sandbox/snapshot/span.d.ts +0 -5
- package/dist/chat/sandbox/snapshot/store.d.ts +0 -31
- package/dist/chat/sandbox/snapshot/workspace.d.ts +0 -23
- package/dist/chat/sandbox/workspace.d.ts +0 -72
- package/dist/chat/scheduled-tasks/cadence.d.ts +0 -27
- package/dist/chat/scheduled-tasks/heartbeat.d.ts +0 -6
- package/dist/chat/scheduled-tasks/identity.d.ts +0 -6
- package/dist/chat/scheduled-tasks/personal.d.ts +0 -23
- package/dist/chat/scheduled-tasks/runs.d.ts +0 -49
- package/dist/chat/scheduled-tasks/schedule-intent.d.ts +0 -61
- package/dist/chat/scheduled-tasks/tasks.d.ts +0 -27
- package/dist/chat/scheduled-tasks/telemetry.d.ts +0 -7
- package/dist/chat/scheduled-tasks/tool-support.d.ts +0 -231
- package/dist/chat/scheduled-tasks/tools/create.d.ts +0 -95
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +0 -70
- package/dist/chat/scheduled-tasks/tools/list.d.ts +0 -71
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +0 -70
- package/dist/chat/scheduled-tasks/tools/update.d.ts +0 -97
- package/dist/chat/scheduled-tasks/tools.d.ts +0 -6
- package/dist/chat/scheduled-tasks/types.d.ts +0 -135
- package/dist/chat/sentry-links.d.ts +0 -6
- package/dist/chat/sentry-payload-filter.d.ts +0 -14
- package/dist/chat/sentry.d.ts +0 -3
- package/dist/chat/services/assistant-reply.d.ts +0 -16
- package/dist/chat/services/auth-pause-response.d.ts +0 -2
- package/dist/chat/services/auth-pause.d.ts +0 -24
- package/dist/chat/services/automated-turn-limit.d.ts +0 -89
- package/dist/chat/services/context-budget.d.ts +0 -19
- package/dist/chat/services/context-compaction-marker.d.ts +0 -8
- package/dist/chat/services/context-compaction.d.ts +0 -78
- package/dist/chat/services/conversation-memory.d.ts +0 -53
- package/dist/chat/services/conversation-title.d.ts +0 -20
- package/dist/chat/services/empty-output-continuation.d.ts +0 -20
- package/dist/chat/services/guardian-action-policy.d.ts +0 -12
- package/dist/chat/services/guardian-action-review.d.ts +0 -9
- package/dist/chat/services/mcp-auth-orchestration.d.ts +0 -42
- package/dist/chat/services/message-actor-identity.d.ts +0 -16
- package/dist/chat/services/pending-auth.d.ts +0 -44
- package/dist/chat/services/persist-retry.d.ts +0 -2
- package/dist/chat/services/plugin-auth-orchestration.d.ts +0 -56
- package/dist/chat/services/provider-default-config.d.ts +0 -9
- package/dist/chat/services/provider-error.d.ts +0 -42
- package/dist/chat/services/provider-retry.d.ts +0 -13
- package/dist/chat/services/short-title.d.ts +0 -25
- package/dist/chat/services/subscribed-decision.d.ts +0 -75
- package/dist/chat/services/subscribed-reply-policy.d.ts +0 -13
- package/dist/chat/services/subscribed-reply-router-policy.d.ts +0 -12
- package/dist/chat/services/turn-failure-response.d.ts +0 -24
- package/dist/chat/services/turn-limit.d.ts +0 -16
- package/dist/chat/services/turn-result.d.ts +0 -42
- package/dist/chat/services/turn-router.d.ts +0 -59
- package/dist/chat/services/turn-session-routing.d.ts +0 -35
- package/dist/chat/skills.d.ts +0 -47
- package/dist/chat/slack/action-token.d.ts +0 -6
- package/dist/chat/slack/adapter-context.d.ts +0 -25
- package/dist/chat/slack/adapter.d.ts +0 -9
- package/dist/chat/slack/app-home.d.ts +0 -11
- package/dist/chat/slack/assistant-thread/lifecycle.d.ts +0 -12
- package/dist/chat/slack/assistant-thread/status-render.d.ts +0 -28
- package/dist/chat/slack/assistant-thread/status-scheduler.d.ts +0 -24
- package/dist/chat/slack/assistant-thread/status-send.d.ts +0 -31
- package/dist/chat/slack/assistant-thread/status.d.ts +0 -36
- package/dist/chat/slack/assistant-thread/title.d.ts +0 -16
- package/dist/chat/slack/attachment-fetchers.d.ts +0 -11
- package/dist/chat/slack/automated-turn-limit-notice.d.ts +0 -16
- package/dist/chat/slack/canvas-references.d.ts +0 -2
- package/dist/chat/slack/channel.d.ts +0 -65
- package/dist/chat/slack/client.d.ts +0 -87
- package/dist/chat/slack/context.d.ts +0 -21
- package/dist/chat/slack/conversation-context.d.ts +0 -40
- package/dist/chat/slack/dashboard-link.d.ts +0 -11
- package/dist/chat/slack/dispatch-turn.d.ts +0 -24
- package/dist/chat/slack/emoji.d.ts +0 -1
- package/dist/chat/slack/errors.d.ts +0 -8
- package/dist/chat/slack/footer.d.ts +0 -46
- package/dist/chat/slack/id-param.d.ts +0 -25
- package/dist/chat/slack/ids.d.ts +0 -24
- package/dist/chat/slack/location-url.d.ts +0 -11
- package/dist/chat/slack/message/attachments.d.ts +0 -2
- package/dist/chat/slack/message/blocks.d.ts +0 -2
- package/dist/chat/slack/message/content.d.ts +0 -18
- package/dist/chat/slack/message/identity.d.ts +0 -7
- package/dist/chat/slack/message-control.d.ts +0 -2
- package/dist/chat/slack/mrkdwn.d.ts +0 -19
- package/dist/chat/slack/oauth-authorization-message.d.ts +0 -3
- package/dist/chat/slack/outbound.d.ts +0 -79
- package/dist/chat/slack/output.d.ts +0 -54
- package/dist/chat/slack/reply.d.ts +0 -19
- package/dist/chat/slack/status-format.d.ts +0 -2
- package/dist/chat/slack/team-domain.d.ts +0 -4
- package/dist/chat/slack/timestamp-param.d.ts +0 -23
- package/dist/chat/slack/timestamp.d.ts +0 -6
- package/dist/chat/slack/tool-support/canvas/api.d.ts +0 -38
- package/dist/chat/slack/tool-support/canvas/context.d.ts +0 -11
- package/dist/chat/slack/tool-support/canvas/markdown.d.ts +0 -9
- package/dist/chat/slack/tool-support/channel-access.d.ts +0 -42
- package/dist/chat/slack/tool-support/channel-capabilities.d.ts +0 -13
- package/dist/chat/slack/tool-support/channel-target.d.ts +0 -28
- package/dist/chat/slack/tool-support/context.d.ts +0 -15
- package/dist/chat/slack/tool-support/list/api.d.ts +0 -50
- package/dist/chat/slack/tool-support/list/params.d.ts +0 -5
- package/dist/chat/slack/tool-support/slack-message-url.d.ts +0 -18
- package/dist/chat/slack/tools/canvas/create.d.ts +0 -30
- package/dist/chat/slack/tools/canvas/edit.d.ts +0 -48
- package/dist/chat/slack/tools/canvas/read.d.ts +0 -51
- package/dist/chat/slack/tools/canvas/write.d.ts +0 -29
- package/dist/chat/slack/tools/channel-join.d.ts +0 -28
- package/dist/chat/slack/tools/channel-list-messages.d.ts +0 -34
- package/dist/chat/slack/tools/conversation-message-search.d.ts +0 -67
- package/dist/chat/slack/tools/list/add-items.d.ts +0 -31
- package/dist/chat/slack/tools/list/create.d.ts +0 -28
- package/dist/chat/slack/tools/list/get-items.d.ts +0 -28
- package/dist/chat/slack/tools/list/update-item.d.ts +0 -36
- package/dist/chat/slack/tools/message-add-reaction.d.ts +0 -29
- package/dist/chat/slack/tools/public-search.d.ts +0 -121
- package/dist/chat/slack/tools/send-files.d.ts +0 -53
- package/dist/chat/slack/tools/thread-read.d.ts +0 -32
- package/dist/chat/slack/user.d.ts +0 -11
- package/dist/chat/slack/users.d.ts +0 -40
- package/dist/chat/slack/vision-cache.d.ts +0 -5
- package/dist/chat/slack/vision-context.d.ts +0 -63
- package/dist/chat/slack/workspace-context.d.ts +0 -4
- package/dist/chat/sleep.d.ts +0 -2
- package/dist/chat/source.d.ts +0 -16
- package/dist/chat/state/adapter.d.ts +0 -10
- package/dist/chat/state/conversation.d.ts +0 -80
- package/dist/chat/state/locks.d.ts +0 -35
- package/dist/chat/state/ttl.d.ts +0 -2
- package/dist/chat/state/turn-id.d.ts +0 -4
- package/dist/chat/task-execution/assistant-message.d.ts +0 -32
- package/dist/chat/task-execution/checkpoint.d.ts +0 -86
- package/dist/chat/task-execution/conversation-turn.d.ts +0 -8
- package/dist/chat/task-execution/heartbeat.d.ts +0 -13
- package/dist/chat/task-execution/mailbox-input.d.ts +0 -3
- package/dist/chat/task-execution/mailbox-turn.d.ts +0 -52
- package/dist/chat/task-execution/paused-turn.d.ts +0 -27
- package/dist/chat/task-execution/queue-signing.d.ts +0 -17
- package/dist/chat/task-execution/queue.d.ts +0 -33
- package/dist/chat/task-execution/slack-work.d.ts +0 -274
- package/dist/chat/task-execution/state.d.ts +0 -410
- package/dist/chat/task-execution/store.d.ts +0 -248
- package/dist/chat/task-execution/turn-cursor-keys.d.ts +0 -6
- package/dist/chat/task-execution/turn-cursor.d.ts +0 -165
- package/dist/chat/task-execution/turn-wake.d.ts +0 -41
- package/dist/chat/task-execution/vercel-callback.d.ts +0 -27
- package/dist/chat/task-execution/vercel-queue.d.ts +0 -19
- package/dist/chat/task-execution/worker.d.ts +0 -42
- package/dist/chat/task-input.d.ts +0 -22
- package/dist/chat/tasks/execution-stats.d.ts +0 -105
- package/dist/chat/tasks/read.d.ts +0 -22
- package/dist/chat/tool-exposure.d.ts +0 -10
- package/dist/chat/tool-support/action-review-evidence.d.ts +0 -4
- package/dist/chat/tool-support/action-review-history.d.ts +0 -117
- package/dist/chat/tool-support/action-review.d.ts +0 -143
- package/dist/chat/tool-support/catalog-tool-call.d.ts +0 -10
- package/dist/chat/tool-support/normalize-result.d.ts +0 -9
- package/dist/chat/tool-support/pi-tool-adapter.d.ts +0 -13
- package/dist/chat/tool-support/private-trace-result.d.ts +0 -4
- package/dist/chat/tool-support/skill/mcp-tool-summary.d.ts +0 -20
- package/dist/chat/tool-support/structured-result.d.ts +0 -44
- package/dist/chat/tool-support/text-range-result.d.ts +0 -37
- package/dist/chat/tool-support/timed-out-tool-result.d.ts +0 -11
- package/dist/chat/tool-support/tool-execution-report.d.ts +0 -8
- package/dist/chat/tool-support/zod-tool.d.ts +0 -46
- package/dist/chat/tools/create-event-task.d.ts +0 -71
- package/dist/chat/tools/definition.d.ts +0 -122
- package/dist/chat/tools/delete-event-task.d.ts +0 -61
- package/dist/chat/tools/event-tasks.d.ts +0 -5
- package/dist/chat/tools/execute-tool.d.ts +0 -11
- package/dist/chat/tools/execution/build-sandbox-input.d.ts +0 -2
- package/dist/chat/tools/execution/tool-error-handler.d.ts +0 -4
- package/dist/chat/tools/execution/tool-input-error.d.ts +0 -6
- package/dist/chat/tools/handoff/tool.d.ts +0 -31
- package/dist/chat/tools/idempotency.d.ts +0 -1
- package/dist/chat/tools/index.d.ts +0 -11
- package/dist/chat/tools/list-event-tasks.d.ts +0 -59
- package/dist/chat/tools/list-resource-event-subscriptions.d.ts +0 -46
- package/dist/chat/tools/publish-image.d.ts +0 -44
- package/dist/chat/tools/resource-events.d.ts +0 -5
- package/dist/chat/tools/runtime/report-progress.d.ts +0 -27
- package/dist/chat/tools/runtime/spawn-agent.d.ts +0 -33
- package/dist/chat/tools/sandbox/bash.d.ts +0 -11
- package/dist/chat/tools/sandbox/edit-file.d.ts +0 -43
- package/dist/chat/tools/sandbox/file-uploads.d.ts +0 -52
- package/dist/chat/tools/sandbox/file-utils.d.ts +0 -64
- package/dist/chat/tools/sandbox/find-files.d.ts +0 -33
- package/dist/chat/tools/sandbox/generated-artifacts.d.ts +0 -16
- package/dist/chat/tools/sandbox/grep.d.ts +0 -51
- package/dist/chat/tools/sandbox/list-dir.d.ts +0 -35
- package/dist/chat/tools/sandbox/read-file.d.ts +0 -12
- package/dist/chat/tools/sandbox/text-edits.d.ts +0 -29
- package/dist/chat/tools/sandbox/view-image.d.ts +0 -11
- package/dist/chat/tools/sandbox/write-file.d.ts +0 -10
- package/dist/chat/tools/scheduled-tasks.d.ts +0 -4
- package/dist/chat/tools/search-conversation-events.d.ts +0 -56
- package/dist/chat/tools/search-resource-event-types.d.ts +0 -56
- package/dist/chat/tools/search-tools.d.ts +0 -71
- package/dist/chat/tools/skill/call-mcp-tool.d.ts +0 -16
- package/dist/chat/tools/skill/load-skill.d.ts +0 -39
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +0 -81
- package/dist/chat/tools/stop-watching-resources.d.ts +0 -30
- package/dist/chat/tools/system-time.d.ts +0 -42
- package/dist/chat/tools/types.d.ts +0 -129
- package/dist/chat/tools/unpublish-image.d.ts +0 -35
- package/dist/chat/tools/update-event-task.d.ts +0 -71
- package/dist/chat/tools/user-lookup.d.ts +0 -29
- package/dist/chat/tools/watch-resource-events.d.ts +0 -64
- package/dist/chat/tools/web/constants.d.ts +0 -6
- package/dist/chat/tools/web/fetch-content.d.ts +0 -28
- package/dist/chat/tools/web/fetch-tool.d.ts +0 -31
- package/dist/chat/tools/web/image-generate.d.ts +0 -51
- package/dist/chat/tools/web/network.d.ts +0 -6
- package/dist/chat/tools/web/search.d.ts +0 -28
- package/dist/chat/turn-context-tag.d.ts +0 -6
- package/dist/chat/usage.d.ts +0 -42
- package/dist/chat/vercel-queue-client.d.ts +0 -3
- package/dist/chat/workspaces/checkout-path.d.ts +0 -4
- package/dist/chat/workspaces/store.d.ts +0 -35
- package/dist/chat/workspaces/tools.d.ts +0 -4
- package/dist/chat/workspaces/types.d.ts +0 -36
- package/dist/chat/workspaces/validation.d.ts +0 -20
- package/dist/chat/xml.d.ts +0 -3
- package/dist/db/db.d.ts +0 -27
- package/dist/db/executor.d.ts +0 -8
- package/dist/db/neon.d.ts +0 -8
- package/dist/db/postgres-json.d.ts +0 -5
- package/dist/db/postgres.d.ts +0 -7
- package/dist/db/schema/agent-invocations.d.ts +0 -592
- package/dist/db/schema/api-tokens.d.ts +0 -160
- package/dist/db/schema/artifacts.d.ts +0 -178
- package/dist/db/schema/attachments.d.ts +0 -178
- package/dist/db/schema/code.d.ts +0 -367
- package/dist/db/schema/conversation-annotations.d.ts +0 -142
- package/dist/db/schema/conversation-bindings.d.ts +0 -110
- package/dist/db/schema/conversation-events.d.ts +0 -170
- package/dist/db/schema/conversation-participants.d.ts +0 -80
- package/dist/db/schema/conversations.d.ts +0 -1341
- package/dist/db/schema/destinations.d.ts +0 -209
- package/dist/db/schema/event-tasks.d.ts +0 -150
- package/dist/db/schema/identities.d.ts +0 -265
- package/dist/db/schema/location-configurations.d.ts +0 -127
- package/dist/db/schema/scheduled-tasks.d.ts +0 -298
- package/dist/db/schema/snapshots.d.ts +0 -271
- package/dist/db/schema/stats.d.ts +0 -97
- package/dist/db/schema/task-executions.d.ts +0 -131
- package/dist/db/schema/timestamps.d.ts +0 -1
- package/dist/db/schema/users.d.ts +0 -109
- package/dist/db/schema/workspaces.d.ts +0 -152
- package/dist/db/schema.d.ts +0 -4436
- package/dist/deployment.d.ts +0 -12
- package/dist/handlers/artifacts.d.ts +0 -8
- package/dist/handlers/health.d.ts +0 -7
- package/dist/handlers/heartbeat.d.ts +0 -7
- package/dist/handlers/mcp-oauth-callback.d.ts +0 -10
- package/dist/handlers/oauth-callback.d.ts +0 -10
- package/dist/handlers/oauth-html.d.ts +0 -4
- package/dist/handlers/retention.d.ts +0 -9
- package/dist/handlers/sandbox-egress-proxy.d.ts +0 -11
- package/dist/handlers/sandbox-egress-route.d.ts +0 -4
- package/dist/handlers/sandbox-egress-signals.d.ts +0 -4
- package/dist/handlers/slack-webhook.d.ts +0 -4
- package/dist/handlers/types.d.ts +0 -2
- package/dist/handlers/webhooks.d.ts +0 -12
- package/dist/package-resolution.d.ts +0 -13
- package/dist/personal-tokens/store.d.ts +0 -27
- package/dist/plugin-module.d.ts +0 -21
- package/dist/plugins.d.ts +0 -26
- package/dist/reporting-schema.d.ts +0 -194
- package/dist/reporting.d.ts +0 -12
- package/dist/spawn-GA5MADGU.js +0 -42
- package/dist/stats.d.ts +0 -18
- package/dist/task-runner-7IIYO44C.js +0 -36
- package/dist/usage-schema.d.ts +0 -25
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { ThreadConversationState } from "@/chat/state/conversation";
|
|
2
|
-
import type { ConversationTurnFailureCode } from "@/chat/conversations/history";
|
|
3
|
-
export { buildDeterministicTurnId } from "@/chat/state/turn-id";
|
|
4
|
-
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
5
|
-
export declare class ConversationTurnBoundaryError extends Error {
|
|
6
|
-
readonly eventId?: string;
|
|
7
|
-
readonly failureCode: ConversationTurnFailureCode;
|
|
8
|
-
constructor(args: {
|
|
9
|
-
cause: unknown;
|
|
10
|
-
eventId?: string;
|
|
11
|
-
failureCode: ConversationTurnFailureCode;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
/** Return a classified Slack boundary failure without erasing its cause. */
|
|
15
|
-
export declare function getConversationTurnBoundaryError(error: unknown): ConversationTurnBoundaryError | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Queue-worker yield routing: respond.ts returns a suspended AgentRunOutcome
|
|
18
|
-
* and the Slack executor raises this at the worker boundary so the lease owner
|
|
19
|
-
* requeues the conversation.
|
|
20
|
-
*/
|
|
21
|
-
export declare class CooperativeTurnYieldError extends Error {
|
|
22
|
-
readonly code = "cooperative_turn_yield";
|
|
23
|
-
constructor(message?: string);
|
|
24
|
-
}
|
|
25
|
-
export declare function isCooperativeTurnYieldError(error: unknown): error is CooperativeTurnYieldError;
|
|
26
|
-
/** Error indicating durable turn input could not be committed by the worker owner. */
|
|
27
|
-
export declare class TurnInputCommitLostError extends Error {
|
|
28
|
-
readonly code = "turn_input_commit_lost";
|
|
29
|
-
constructor(message?: string);
|
|
30
|
-
}
|
|
31
|
-
/** Return whether an error means the durable worker lost input ownership. */
|
|
32
|
-
export declare function isTurnInputCommitLostError(error: unknown): error is TurnInputCommitLostError;
|
|
33
|
-
/** Error indicating durable turn input should stay pending for a later worker. */
|
|
34
|
-
export declare class TurnInputDeferredError extends Error {
|
|
35
|
-
readonly code = "turn_input_deferred";
|
|
36
|
-
constructor(message?: string);
|
|
37
|
-
}
|
|
38
|
-
/** Return whether an error means the durable worker should redeliver input later. */
|
|
39
|
-
export declare function isTurnInputDeferredError(error: unknown): error is TurnInputDeferredError;
|
|
40
|
-
/** Mark a turn as the active turn in conversation state. */
|
|
41
|
-
export declare function startActiveTurn(args: {
|
|
42
|
-
conversation: ThreadConversationState;
|
|
43
|
-
nextTurnId: string;
|
|
44
|
-
}): void;
|
|
45
|
-
/**
|
|
46
|
-
* Close the active turn without marking a Pi session reusable for future
|
|
47
|
-
* history. Use this for auth handoffs and recovery replies that end the live
|
|
48
|
-
* turn but do not produce a completed Pi session.
|
|
49
|
-
*/
|
|
50
|
-
export declare function markTurnClosed(args: {
|
|
51
|
-
conversation: ThreadConversationState;
|
|
52
|
-
nowMs: number;
|
|
53
|
-
sessionId?: string;
|
|
54
|
-
}): void;
|
|
55
|
-
/**
|
|
56
|
-
* Mark a turn as completed after its assistant output has been handled.
|
|
57
|
-
*/
|
|
58
|
-
export declare function markTurnCompleted(args: {
|
|
59
|
-
conversation: ThreadConversationState;
|
|
60
|
-
nowMs: number;
|
|
61
|
-
sessionId: string;
|
|
62
|
-
}): void;
|
|
63
|
-
/**
|
|
64
|
-
* Mark a turn as failed when execution or final user-visible reply delivery
|
|
65
|
-
* cannot be completed. If `sessionId` is provided, `activeTurnId` is only
|
|
66
|
-
* cleared when it still matches the failing turn.
|
|
67
|
-
*/
|
|
68
|
-
export declare function markTurnFailed(args: {
|
|
69
|
-
conversation: ThreadConversationState;
|
|
70
|
-
nowMs: number;
|
|
71
|
-
sessionId?: string;
|
|
72
|
-
userMessageId?: string;
|
|
73
|
-
markConversationMessage: (conversation: ThreadConversationState, messageId: string | undefined, patch: {
|
|
74
|
-
replied?: boolean;
|
|
75
|
-
skippedReason?: string;
|
|
76
|
-
}) => void;
|
|
77
|
-
}): void;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { SandboxEgressAuthRequiredSignal, SandboxEgressPermissionDeniedSignal } from "@/chat/sandbox/egress/session";
|
|
2
|
-
export interface SandboxCommandOutcome {
|
|
3
|
-
ok: boolean;
|
|
4
|
-
command: string;
|
|
5
|
-
cwd: string;
|
|
6
|
-
exit_code: number;
|
|
7
|
-
signal: null;
|
|
8
|
-
timed_out: boolean;
|
|
9
|
-
aborted?: boolean;
|
|
10
|
-
stdout: string;
|
|
11
|
-
stderr: string;
|
|
12
|
-
stdout_truncated: boolean;
|
|
13
|
-
stderr_truncated: boolean;
|
|
14
|
-
auth_required?: SandboxEgressAuthRequiredSignal;
|
|
15
|
-
permission_denied?: SandboxEgressPermissionDeniedSignal;
|
|
16
|
-
}
|
|
17
|
-
/** Format one shell command outcome as Junior's structured tool result. */
|
|
18
|
-
export declare function formatSandboxCommandResult(params: SandboxCommandOutcome): import("@/chat/tool-support/structured-result").JuniorTextToolOutputEnvelope<{
|
|
19
|
-
permission_denied?: {
|
|
20
|
-
grant: {
|
|
21
|
-
access: "read" | "write";
|
|
22
|
-
name: string;
|
|
23
|
-
leaseScope?: string | undefined;
|
|
24
|
-
reason?: string | undefined;
|
|
25
|
-
requirements?: string[] | undefined;
|
|
26
|
-
};
|
|
27
|
-
message: string;
|
|
28
|
-
provider: string;
|
|
29
|
-
source: "upstream";
|
|
30
|
-
status: number;
|
|
31
|
-
upstreamHost: string;
|
|
32
|
-
upstreamPath: string;
|
|
33
|
-
createdAtMs: number;
|
|
34
|
-
account?: {
|
|
35
|
-
id: string;
|
|
36
|
-
displayName?: string | undefined;
|
|
37
|
-
handle?: string | undefined;
|
|
38
|
-
label?: string | undefined;
|
|
39
|
-
url?: string | undefined;
|
|
40
|
-
} | undefined;
|
|
41
|
-
acceptedPermissions?: string | undefined;
|
|
42
|
-
sso?: string | undefined;
|
|
43
|
-
} | undefined;
|
|
44
|
-
auth_required?: {
|
|
45
|
-
grant: {
|
|
46
|
-
access: "read" | "write";
|
|
47
|
-
name: string;
|
|
48
|
-
leaseScope?: string | undefined;
|
|
49
|
-
reason?: string | undefined;
|
|
50
|
-
requirements?: string[] | undefined;
|
|
51
|
-
};
|
|
52
|
-
kind: "unavailable" | "auth_required";
|
|
53
|
-
provider: string;
|
|
54
|
-
createdAtMs: number;
|
|
55
|
-
authorization?: {
|
|
56
|
-
provider: string;
|
|
57
|
-
type: "oauth";
|
|
58
|
-
scope?: string | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
message?: string | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
target: string;
|
|
63
|
-
truncated: boolean;
|
|
64
|
-
command: string;
|
|
65
|
-
cwd: string;
|
|
66
|
-
exit_code: number;
|
|
67
|
-
signal: null;
|
|
68
|
-
timed_out: boolean;
|
|
69
|
-
aborted: boolean;
|
|
70
|
-
stdout: string;
|
|
71
|
-
stderr: string;
|
|
72
|
-
stdout_truncated: boolean;
|
|
73
|
-
stderr_truncated: boolean;
|
|
74
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface VercelSandboxCredentials {
|
|
2
|
-
teamId: string;
|
|
3
|
-
projectId: string;
|
|
4
|
-
token: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Resolve explicit Vercel Sandbox credentials, or return undefined to let
|
|
8
|
-
* the SDK read ambient Vercel auth from its own environment detection.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getVercelSandboxCredentials(): VercelSandboxCredentials | undefined;
|
|
11
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SandboxWorkspace } from "@/chat/sandbox/workspace";
|
|
2
|
-
/** Docker daemon config for Vercel sandbox guests (nested containers). */
|
|
3
|
-
export declare const DOCKER_DAEMON_JSON = "{\n \"storage-driver\": \"overlay2\",\n \"live-restore\": false\n}\n";
|
|
4
|
-
/**
|
|
5
|
-
* Start dockerd when the socket is missing and wait until `docker info` works.
|
|
6
|
-
* Re-execs through sudo so the sandbox user can call it without root.
|
|
7
|
-
*/
|
|
8
|
-
export declare const DOCKER_ENSURE_SCRIPT = "#!/bin/sh\nset -eu\n\nif [ \"$(id -u)\" -ne 0 ]; then\n exec sudo -n \"$0\" \"$@\"\nfi\n\nSOCK=/var/run/docker.sock\nPIDFILE=/var/run/docker.pid\nLOG=/var/log/junior-dockerd.log\n\nis_ready() {\n [ -S \"$SOCK\" ] && /usr/bin/docker info >/dev/null 2>&1\n}\n\nif is_ready; then\n chmod 666 \"$SOCK\" 2>/dev/null || true\n exit 0\nfi\n\nmkdir -p /etc/docker /var/lib/docker /var/run /var/log\nif [ ! -f /etc/docker/daemon.json ]; then\n cat > /etc/docker/daemon.json <<'EOF'\n{\n \"storage-driver\": \"overlay2\",\n \"live-restore\": false\n}\nEOF\nfi\n\nif [ -f \"$PIDFILE\" ]; then\n oldpid=\"$(cat \"$PIDFILE\" 2>/dev/null || true)\"\n if [ -n \"${oldpid:-}\" ] && ! kill -0 \"$oldpid\" 2>/dev/null; then\n rm -f \"$PIDFILE\"\n fi\nfi\n\nif [ ! -f \"$PIDFILE\" ] || ! kill -0 \"$(cat \"$PIDFILE\" 2>/dev/null)\" 2>/dev/null; then\n # dockerd must outlive this helper; nohup + background is intentional.\n nohup dockerd --host=\"unix://$SOCK\" --pidfile=\"$PIDFILE\" >\"$LOG\" 2>&1 &\nfi\n\ni=0\nwhile [ \"$i\" -lt 50 ]; do\n if is_ready; then\n chmod 666 \"$SOCK\" 2>/dev/null || true\n exit 0\n fi\n i=$((i + 1))\n sleep 0.1\ndone\n\necho \"junior-ensure-docker: dockerd failed to become ready\" >&2\nif [ -f \"$LOG\" ]; then\n tail -n 50 \"$LOG\" >&2 || true\nfi\nexit 1\n";
|
|
9
|
-
/** PATH wrapper so plain `docker` starts the daemon on first use. */
|
|
10
|
-
export declare const DOCKER_CLI_WRAPPER_SCRIPT = "#!/bin/sh\nset -eu\nif command -v junior-ensure-docker >/dev/null 2>&1; then\n junior-ensure-docker\nfi\nexec /usr/bin/docker \"$@\"\n";
|
|
11
|
-
/** PATH wrapper so plain `docker-compose` starts the daemon on first use. */
|
|
12
|
-
export declare const DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT = "#!/bin/sh\nset -eu\nif command -v junior-ensure-docker >/dev/null 2>&1; then\n junior-ensure-docker\nfi\nexec /usr/local/libexec/junior-docker-compose \"$@\"\n";
|
|
13
|
-
/**
|
|
14
|
-
* Best-effort dockerd start during sandbox prepare.
|
|
15
|
-
* Missing helper is a no-op so tests and base sandboxes stay green.
|
|
16
|
-
*/
|
|
17
|
-
export declare function ensureDockerDaemon(sandbox: Pick<SandboxWorkspace, "runCommand">, signal?: AbortSignal): Promise<void>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { PluginAuthorization, PluginGrant } from "@sentry/junior-plugin-api";
|
|
2
|
-
import { type SandboxEgressCredentialContext, type SandboxEgressCredentialLease } from "@/chat/sandbox/egress/session";
|
|
3
|
-
/** Describes whether grant selection came from plugin hooks or the broker default. */
|
|
4
|
-
export type SandboxEgressGrantSelection = {
|
|
5
|
-
grant: PluginGrant;
|
|
6
|
-
source: "plugin";
|
|
7
|
-
} | {
|
|
8
|
-
grant: PluginGrant;
|
|
9
|
-
source: "broker";
|
|
10
|
-
};
|
|
11
|
-
export type SandboxEgressCredentialErrorKind = "auth_required" | "unavailable";
|
|
12
|
-
/**
|
|
13
|
-
* Signals that egress selected a grant but could not issue credential headers.
|
|
14
|
-
*
|
|
15
|
-
* Callers convert this into command-level auth-required state so the agent can
|
|
16
|
-
* request authorization without exposing provider-specific lease internals.
|
|
17
|
-
*/
|
|
18
|
-
export declare class SandboxEgressCredentialError extends Error {
|
|
19
|
-
readonly authorization?: PluginAuthorization;
|
|
20
|
-
readonly grant: PluginGrant;
|
|
21
|
-
readonly kind: SandboxEgressCredentialErrorKind;
|
|
22
|
-
readonly provider: string;
|
|
23
|
-
constructor(input: {
|
|
24
|
-
authorization?: PluginAuthorization;
|
|
25
|
-
grant: PluginGrant;
|
|
26
|
-
kind: SandboxEgressCredentialErrorKind;
|
|
27
|
-
message: string;
|
|
28
|
-
provider: string;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Select the grant needed for one outbound request.
|
|
33
|
-
*
|
|
34
|
-
* GitHub GraphQL and other plugin-owned APIs may need body-aware grant choices;
|
|
35
|
-
* providers without hooks use a simple read/write default based on HTTP method.
|
|
36
|
-
*/
|
|
37
|
-
export declare function selectSandboxEgressGrant(input: {
|
|
38
|
-
bodyText?: string;
|
|
39
|
-
method: string;
|
|
40
|
-
operation?: string;
|
|
41
|
-
provider: string;
|
|
42
|
-
upstreamUrl: URL;
|
|
43
|
-
}): Promise<SandboxEgressGrantSelection>;
|
|
44
|
-
/**
|
|
45
|
-
* Resolve the authorization flow attached to a broker-selected egress grant.
|
|
46
|
-
*
|
|
47
|
-
* Plugin-selected grants can return their own authorization metadata when
|
|
48
|
-
* issuing credentials; broker defaults use the provider OAuth config.
|
|
49
|
-
*/
|
|
50
|
-
export declare function authorizationForSandboxEgressGrant(provider: string, selection: SandboxEgressGrantSelection): PluginAuthorization | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* Return credential header transforms for a selected grant.
|
|
53
|
-
*
|
|
54
|
-
* Only shared installation grants are remembered on the host. User and other
|
|
55
|
-
* grants always issue from the live credential source so a saved login change
|
|
56
|
-
* cannot leave stale auth headers in place. The sandbox context only authorizes
|
|
57
|
-
* the request.
|
|
58
|
-
*/
|
|
59
|
-
export declare function sandboxEgressCredentialLease(provider: string, selection: SandboxEgressGrantSelection, context: SandboxEgressCredentialContext): Promise<SandboxEgressCredentialLease>;
|
|
60
|
-
/** Return whether a credential lease can modify requests to the target host. */
|
|
61
|
-
export declare function hasSandboxEgressLeaseTransformForHost(lease: SandboxEgressCredentialLease, host: string): boolean;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { NetworkPolicy } from "@vercel/sandbox";
|
|
2
|
-
import type { TracePropagationHeaders } from "@/chat/logging";
|
|
3
|
-
import { type SandboxEgressTracePropagationConfig } from "@/chat/sandbox/egress/tracing";
|
|
4
|
-
/** Return whether an outbound host is covered by a provider domain rule. */
|
|
5
|
-
export declare function matchesSandboxEgressDomain(host: string, domain: string): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Resolve the plugin provider responsible for an outbound sandbox host.
|
|
8
|
-
*
|
|
9
|
-
* Only plugin-declared provider domains are eligible for credentialed sandbox
|
|
10
|
-
* egress. Hosts without a matching provider are blocked by the proxy even if a
|
|
11
|
-
* malformed or stale network policy tried to forward them.
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolveSandboxEgressProviderForHost(host: string): string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Build the policy that forwards provider domains through the egress proxy.
|
|
16
|
-
*
|
|
17
|
-
* The signed credential token is embedded in the forward URL so the proxy can
|
|
18
|
-
* bind each forwarded request back to the actor and sandbox VM that created the
|
|
19
|
-
* command. The sandbox receives placeholder env vars, not provider credentials.
|
|
20
|
-
*/
|
|
21
|
-
export declare function buildSandboxEgressNetworkPolicy(input?: {
|
|
22
|
-
credentialToken?: string;
|
|
23
|
-
traceConfig?: SandboxEgressTracePropagationConfig;
|
|
24
|
-
traceHeaders?: TracePropagationHeaders;
|
|
25
|
-
}): NetworkPolicy;
|
|
26
|
-
/**
|
|
27
|
-
* Resolve non-secret command environment values for registered sandbox providers.
|
|
28
|
-
*
|
|
29
|
-
* Credential env vars are placeholders that tell tools which auth variable name
|
|
30
|
-
* exists; real credential headers are issued lazily by host egress.
|
|
31
|
-
*/
|
|
32
|
-
export declare function resolveSandboxCommandEnvironment(): Promise<Record<string, string>>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { type CredentialedEgressHttpInterceptor } from "@/chat/egress/credentialed";
|
|
2
|
-
import { type SandboxEgressTracePropagationConfig } from "@/chat/sandbox/egress/tracing";
|
|
3
|
-
import type { JWTPayload } from "jose";
|
|
4
|
-
/**
|
|
5
|
-
* Intercepts a verified sandbox HTTP request before live provider forwarding.
|
|
6
|
-
*
|
|
7
|
-
* The hook runs after OIDC, forwarded URL validation, provider ownership, and
|
|
8
|
-
* credential-context checks have succeeded.
|
|
9
|
-
*/
|
|
10
|
-
export type SandboxEgressHttpInterceptor = CredentialedEgressHttpInterceptor;
|
|
11
|
-
/** Runtime dependencies for the sandbox egress proxy boundary. */
|
|
12
|
-
interface ProxyDeps {
|
|
13
|
-
fetch?: typeof fetch;
|
|
14
|
-
interceptHttp?: SandboxEgressHttpInterceptor;
|
|
15
|
-
tracePropagation?: SandboxEgressTracePropagationConfig;
|
|
16
|
-
verifyOidc?: (token: string) => Promise<JWTPayload>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Return whether a request carries the forwarding headers expected from Vercel.
|
|
20
|
-
*
|
|
21
|
-
* This is only a cheap classifier for routing into the proxy handler. Real
|
|
22
|
-
* authentication happens in `proxySandboxEgressRequest` by verifying the OIDC
|
|
23
|
-
* token and signed Junior credential context.
|
|
24
|
-
*/
|
|
25
|
-
export declare function isSandboxEgressForwardedRequest(request: Request): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Handle one forwarded sandbox egress request.
|
|
28
|
-
*
|
|
29
|
-
* This is the public proxy boundary: it rejects unauthenticated VM requests,
|
|
30
|
-
* rejects forwarded URLs outside plugin-owned provider domains, rejects signed
|
|
31
|
-
* credential contexts that do not match the active VM id, and only then asks
|
|
32
|
-
* `execute.ts` to issue credentials and contact the upstream provider.
|
|
33
|
-
*/
|
|
34
|
-
export declare function proxySandboxEgressRequest(request: Request, deps?: ProxyDeps): Promise<Response>;
|
|
35
|
-
export {};
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const sandboxEgressGrantSchema: z.ZodObject<{
|
|
3
|
-
access: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
|
|
4
|
-
leaseScope: z.ZodOptional<z.ZodString>;
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
7
|
-
requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
}, z.core.$strict>;
|
|
9
|
-
export declare const sandboxEgressCredentialContextSchema: z.ZodObject<{
|
|
10
|
-
credentials: z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
-
actor: z.ZodObject<{
|
|
12
|
-
type: z.ZodLiteral<"user">;
|
|
13
|
-
userId: z.ZodString;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
16
|
-
actor: z.ZodObject<{
|
|
17
|
-
platform: z.ZodLiteral<"system">;
|
|
18
|
-
name: z.ZodString;
|
|
19
|
-
}, z.core.$strict>;
|
|
20
|
-
subject: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
-
type: z.ZodLiteral<"user">;
|
|
22
|
-
userId: z.ZodString;
|
|
23
|
-
allowedWhen: z.ZodLiteral<"private-direct-conversation">;
|
|
24
|
-
binding: z.ZodObject<{
|
|
25
|
-
type: z.ZodLiteral<"slack-direct-conversation">;
|
|
26
|
-
teamId: z.ZodString;
|
|
27
|
-
channelId: z.ZodString;
|
|
28
|
-
signature: z.ZodString;
|
|
29
|
-
}, z.core.$strict>;
|
|
30
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
-
type: z.ZodLiteral<"user">;
|
|
32
|
-
userId: z.ZodString;
|
|
33
|
-
allowedWhen: z.ZodLiteral<"scheduled-task">;
|
|
34
|
-
taskId: z.ZodString;
|
|
35
|
-
binding: z.ZodObject<{
|
|
36
|
-
type: z.ZodLiteral<"scheduled-task">;
|
|
37
|
-
plugin: z.ZodString;
|
|
38
|
-
taskId: z.ZodString;
|
|
39
|
-
signature: z.ZodString;
|
|
40
|
-
}, z.core.$strict>;
|
|
41
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
42
|
-
type: z.ZodLiteral<"user">;
|
|
43
|
-
userId: z.ZodString;
|
|
44
|
-
allowedWhen: z.ZodLiteral<"event-task">;
|
|
45
|
-
taskId: z.ZodString;
|
|
46
|
-
binding: z.ZodObject<{
|
|
47
|
-
type: z.ZodLiteral<"event-task">;
|
|
48
|
-
plugin: z.ZodString;
|
|
49
|
-
taskId: z.ZodString;
|
|
50
|
-
signature: z.ZodString;
|
|
51
|
-
}, z.core.$strict>;
|
|
52
|
-
}, z.core.$strict>], "allowedWhen">>;
|
|
53
|
-
}, z.core.$strict>]>;
|
|
54
|
-
egressId: z.ZodString;
|
|
55
|
-
expiresAtMs: z.ZodNumber;
|
|
56
|
-
contextId: z.ZodString;
|
|
57
|
-
}, z.core.$strict>;
|
|
58
|
-
export declare const sandboxEgressCredentialLeaseSchema: z.ZodObject<{
|
|
59
|
-
account: z.ZodOptional<z.ZodObject<{
|
|
60
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
61
|
-
handle: z.ZodOptional<z.ZodString>;
|
|
62
|
-
id: z.ZodString;
|
|
63
|
-
label: z.ZodOptional<z.ZodString>;
|
|
64
|
-
url: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, z.core.$strict>>;
|
|
66
|
-
authorization: z.ZodOptional<z.ZodObject<{
|
|
67
|
-
provider: z.ZodString;
|
|
68
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
69
|
-
type: z.ZodLiteral<"oauth">;
|
|
70
|
-
}, z.core.$strict>>;
|
|
71
|
-
grant: z.ZodObject<{
|
|
72
|
-
access: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
|
|
73
|
-
leaseScope: z.ZodOptional<z.ZodString>;
|
|
74
|
-
name: z.ZodString;
|
|
75
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
76
|
-
requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
-
}, z.core.$strict>;
|
|
78
|
-
provider: z.ZodString;
|
|
79
|
-
expiresAt: z.ZodString;
|
|
80
|
-
headerTransforms: z.ZodArray<z.ZodObject<{
|
|
81
|
-
domain: z.ZodString;
|
|
82
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
83
|
-
}, z.core.$strict>>;
|
|
84
|
-
}, z.core.$strict>;
|
|
85
|
-
export declare const sandboxEgressAuthRequiredSignalSchema: z.ZodObject<{
|
|
86
|
-
authorization: z.ZodOptional<z.ZodObject<{
|
|
87
|
-
provider: z.ZodString;
|
|
88
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
89
|
-
type: z.ZodLiteral<"oauth">;
|
|
90
|
-
}, z.core.$strict>>;
|
|
91
|
-
grant: z.ZodObject<{
|
|
92
|
-
access: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
|
|
93
|
-
leaseScope: z.ZodOptional<z.ZodString>;
|
|
94
|
-
name: z.ZodString;
|
|
95
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
96
|
-
requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
|
-
}, z.core.$strict>;
|
|
98
|
-
kind: z.ZodDefault<z.ZodEnum<{
|
|
99
|
-
unavailable: "unavailable";
|
|
100
|
-
auth_required: "auth_required";
|
|
101
|
-
}>>;
|
|
102
|
-
provider: z.ZodString;
|
|
103
|
-
message: z.ZodOptional<z.ZodString>;
|
|
104
|
-
createdAtMs: z.ZodNumber;
|
|
105
|
-
}, z.core.$strict>;
|
|
106
|
-
export declare const sandboxEgressPermissionDeniedSignalSchema: z.ZodObject<{
|
|
107
|
-
account: z.ZodOptional<z.ZodObject<{
|
|
108
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
109
|
-
handle: z.ZodOptional<z.ZodString>;
|
|
110
|
-
id: z.ZodString;
|
|
111
|
-
label: z.ZodOptional<z.ZodString>;
|
|
112
|
-
url: z.ZodOptional<z.ZodString>;
|
|
113
|
-
}, z.core.$strict>>;
|
|
114
|
-
acceptedPermissions: z.ZodOptional<z.ZodString>;
|
|
115
|
-
grant: z.ZodObject<{
|
|
116
|
-
access: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
|
|
117
|
-
leaseScope: z.ZodOptional<z.ZodString>;
|
|
118
|
-
name: z.ZodString;
|
|
119
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
120
|
-
requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
-
}, z.core.$strict>;
|
|
122
|
-
message: z.ZodString;
|
|
123
|
-
provider: z.ZodString;
|
|
124
|
-
source: z.ZodLiteral<"upstream">;
|
|
125
|
-
sso: z.ZodOptional<z.ZodString>;
|
|
126
|
-
status: z.ZodNumber;
|
|
127
|
-
upstreamHost: z.ZodString;
|
|
128
|
-
upstreamPath: z.ZodString;
|
|
129
|
-
createdAtMs: z.ZodNumber;
|
|
130
|
-
}, z.core.$strict>;
|
|
131
|
-
export declare const sandboxEgressSignalsResponseSchema: z.ZodObject<{
|
|
132
|
-
auth_required: z.ZodOptional<z.ZodObject<{
|
|
133
|
-
authorization: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
provider: z.ZodString;
|
|
135
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
136
|
-
type: z.ZodLiteral<"oauth">;
|
|
137
|
-
}, z.core.$strict>>;
|
|
138
|
-
grant: z.ZodObject<{
|
|
139
|
-
access: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
|
|
140
|
-
leaseScope: z.ZodOptional<z.ZodString>;
|
|
141
|
-
name: z.ZodString;
|
|
142
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
143
|
-
requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
144
|
-
}, z.core.$strict>;
|
|
145
|
-
kind: z.ZodDefault<z.ZodEnum<{
|
|
146
|
-
unavailable: "unavailable";
|
|
147
|
-
auth_required: "auth_required";
|
|
148
|
-
}>>;
|
|
149
|
-
provider: z.ZodString;
|
|
150
|
-
message: z.ZodOptional<z.ZodString>;
|
|
151
|
-
createdAtMs: z.ZodNumber;
|
|
152
|
-
}, z.core.$strict>>;
|
|
153
|
-
permission_denied: z.ZodOptional<z.ZodObject<{
|
|
154
|
-
account: z.ZodOptional<z.ZodObject<{
|
|
155
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
156
|
-
handle: z.ZodOptional<z.ZodString>;
|
|
157
|
-
id: z.ZodString;
|
|
158
|
-
label: z.ZodOptional<z.ZodString>;
|
|
159
|
-
url: z.ZodOptional<z.ZodString>;
|
|
160
|
-
}, z.core.$strict>>;
|
|
161
|
-
acceptedPermissions: z.ZodOptional<z.ZodString>;
|
|
162
|
-
grant: z.ZodObject<{
|
|
163
|
-
access: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
|
|
164
|
-
leaseScope: z.ZodOptional<z.ZodString>;
|
|
165
|
-
name: z.ZodString;
|
|
166
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
167
|
-
requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
|
-
}, z.core.$strict>;
|
|
169
|
-
message: z.ZodString;
|
|
170
|
-
provider: z.ZodString;
|
|
171
|
-
source: z.ZodLiteral<"upstream">;
|
|
172
|
-
sso: z.ZodOptional<z.ZodString>;
|
|
173
|
-
status: z.ZodNumber;
|
|
174
|
-
upstreamHost: z.ZodString;
|
|
175
|
-
upstreamPath: z.ZodString;
|
|
176
|
-
createdAtMs: z.ZodNumber;
|
|
177
|
-
}, z.core.$strict>>;
|
|
178
|
-
}, z.core.$strict>;
|
|
179
|
-
export type SandboxEgressCredentialContext = z.output<typeof sandboxEgressCredentialContextSchema>;
|
|
180
|
-
export type SandboxEgressGrant = z.output<typeof sandboxEgressGrantSchema>;
|
|
181
|
-
export type SandboxEgressCredentialLease = z.output<typeof sandboxEgressCredentialLeaseSchema>;
|
|
182
|
-
export type SandboxEgressAuthRequiredSignal = z.output<typeof sandboxEgressAuthRequiredSignalSchema>;
|
|
183
|
-
export type SandboxEgressPermissionDeniedSignal = z.output<typeof sandboxEgressPermissionDeniedSignalSchema>;
|
|
184
|
-
/** Parse a host-owned sandbox egress auth signal from state or tool results. */
|
|
185
|
-
export declare function parseSandboxEgressAuthRequiredSignal(value: unknown): SandboxEgressAuthRequiredSignal | undefined;
|
|
186
|
-
/** Parse a host-owned sandbox egress permission-denied signal from state or tool results. */
|
|
187
|
-
export declare function parseSandboxEgressPermissionDeniedSignal(value: unknown): SandboxEgressPermissionDeniedSignal | undefined;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { CredentialContext } from "@/chat/credentials/context";
|
|
2
|
-
import { type SandboxEgressAuthRequiredSignal, type SandboxEgressCredentialContext, type SandboxEgressCredentialLease, type SandboxEgressPermissionDeniedSignal } from "@/chat/sandbox/egress/schemas";
|
|
3
|
-
export declare const SANDBOX_EGRESS_PROXY_PATH = "/api/internal/sandbox-egress";
|
|
4
|
-
export type { SandboxEgressAuthRequiredSignal, SandboxEgressCredentialContext, SandboxEgressCredentialLease, SandboxEgressPermissionDeniedSignal, };
|
|
5
|
-
/**
|
|
6
|
-
* Create the signed Junior credential context embedded in the proxy URL.
|
|
7
|
-
*
|
|
8
|
-
* The token binds actor credentials to a specific sandbox egress id and a
|
|
9
|
-
* short expiry. Vercel OIDC proves which VM sent a request; this token proves
|
|
10
|
-
* which Junior actor and credential context that VM is allowed to use.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createSandboxEgressCredentialToken(input: {
|
|
13
|
-
credentials: CredentialContext;
|
|
14
|
-
egressId: string;
|
|
15
|
-
ttlMs?: number;
|
|
16
|
-
}): string;
|
|
17
|
-
/**
|
|
18
|
-
* Verify the signed Junior credential context from the proxy URL.
|
|
19
|
-
*
|
|
20
|
-
* Returning `undefined` means the token is missing, expired, malformed, or not
|
|
21
|
-
* signed with the current `JUNIOR_SECRET`.
|
|
22
|
-
*/
|
|
23
|
-
export declare function parseSandboxEgressCredentialToken(token: string | undefined): SandboxEgressCredentialContext | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Remember auth headers for a shared installation grant.
|
|
26
|
-
*
|
|
27
|
-
* User and other grants are ignored here. TTL follows the provider expiry.
|
|
28
|
-
* Sandbox context expiry still decides whether a request may use the headers;
|
|
29
|
-
* it does not shorten a shared installation grant for other sandboxes.
|
|
30
|
-
*/
|
|
31
|
-
export declare function setSandboxEgressCredentialLease(_context: SandboxEgressCredentialContext, lease: SandboxEgressCredentialLease): Promise<void>;
|
|
32
|
-
/** Load remembered auth headers for a shared installation grant. */
|
|
33
|
-
export declare function getSandboxEgressCredentialLease(provider: string, grant: SandboxEgressCredentialLease["grant"], _context: SandboxEgressCredentialContext): Promise<SandboxEgressCredentialLease | undefined>;
|
|
34
|
-
/** Drop remembered installation headers after the upstream rejects them. */
|
|
35
|
-
export declare function clearSandboxEgressCredentialLease(provider: string, grant: SandboxEgressCredentialLease["grant"], _context: SandboxEgressCredentialContext): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Record that credential issuance needs user authorization for this command.
|
|
38
|
-
*
|
|
39
|
-
* The command runner consumes this after the sandbox tool finishes so the agent
|
|
40
|
-
* can present a normal authorization-required response instead of a raw proxy
|
|
41
|
-
* failure.
|
|
42
|
-
*/
|
|
43
|
-
export declare function setSandboxEgressAuthRequiredSignal(context: SandboxEgressCredentialContext, signal: Omit<SandboxEgressAuthRequiredSignal, "createdAtMs" | "kind"> & {
|
|
44
|
-
kind?: SandboxEgressAuthRequiredSignal["kind"];
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Record that the provider rejected an issued credential with permission denial.
|
|
48
|
-
*/
|
|
49
|
-
export declare function setSandboxEgressPermissionDeniedSignal(context: SandboxEgressCredentialContext, signal: Omit<SandboxEgressPermissionDeniedSignal, "createdAtMs">): Promise<void>;
|
|
50
|
-
/** Remove pending auth/permission signals before or after a sandbox command. */
|
|
51
|
-
export declare function clearSandboxEgressSignals(egressId: string | undefined): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Consume the auth signal produced during a sandbox command, preferring writes.
|
|
54
|
-
*/
|
|
55
|
-
export declare function consumeSandboxEgressAuthRequiredSignal(egressId: string | undefined): Promise<SandboxEgressAuthRequiredSignal | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* Consume the permission signal produced during a sandbox command, preferring writes.
|
|
58
|
-
*/
|
|
59
|
-
export declare function consumeSandboxEgressPermissionDeniedSignal(egressId: string | undefined): Promise<SandboxEgressPermissionDeniedSignal | undefined>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SandboxEgressAuthRequiredSignal, SandboxEgressPermissionDeniedSignal } from "@/chat/sandbox/egress/schemas";
|
|
2
|
-
/** Authenticated transport for signal state owned by another Junior process. */
|
|
3
|
-
export interface SandboxEgressSignalTransport {
|
|
4
|
-
clear: (credentialToken: string) => Promise<void>;
|
|
5
|
-
consume: (credentialToken: string) => Promise<{
|
|
6
|
-
authRequired?: SandboxEgressAuthRequiredSignal;
|
|
7
|
-
permissionDenied?: SandboxEgressPermissionDeniedSignal;
|
|
8
|
-
}>;
|
|
9
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface SandboxEgressTracePropagationConfig {
|
|
2
|
-
domains?: string[];
|
|
3
|
-
}
|
|
4
|
-
/** Normalize exact and leading-wildcard sandbox egress trace domains. */
|
|
5
|
-
export declare function normalizeSandboxEgressTracePropagationDomains(domains: string[] | undefined): string[];
|
|
6
|
-
/** Return whether a host may carry sandbox egress trace propagation headers. */
|
|
7
|
-
export declare function shouldPropagateSandboxEgressTrace(host: string, config?: SandboxEgressTracePropagationConfig): boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/** Detect sandbox filesystem operations that can safely ignore existing directories. */
|
|
2
|
-
export declare function isAlreadyExistsError(error: unknown): boolean;
|
|
3
|
-
/** Detect when the current sandbox session is unavailable and must be reacquired. */
|
|
4
|
-
export declare function isSandboxUnavailableError(error: unknown): boolean;
|
|
5
|
-
/** Detect a durable sandbox reference that can no longer be restored. */
|
|
6
|
-
export declare function isSandboxMissingError(error: unknown): boolean;
|
|
7
|
-
/** Detect transient snapshot boot races so sandbox creation can retry. */
|
|
8
|
-
export declare function isSnapshottingError(error: unknown): boolean;
|
|
9
|
-
/** Detect cancellation so a durable builder stays available for check-in. */
|
|
10
|
-
export declare function isAbortError(error: unknown): boolean;
|
|
11
|
-
/** Detect transient Vercel Sandbox API failures that keep a job resumable. */
|
|
12
|
-
export declare function isSandboxApiTransientError(error: unknown): boolean;
|
|
13
|
-
/** Detect interrupted command streams where no reliable exit status is available. */
|
|
14
|
-
export declare function isSandboxCommandStreamInterruptedError(error: unknown): boolean;
|
|
15
|
-
/** Wrap setup failures. Keep WorkspaceSnapshotNotReadyError as-is. */
|
|
16
|
-
export declare function wrapSandboxSetupError(error: unknown): Error;
|
|
17
|
-
/** Record span data and throw one stable sandbox operation error. */
|
|
18
|
-
export declare function throwSandboxOperationError(action: string, error: unknown, includeMissingPath?: boolean): never;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface ExtraFieldOption {
|
|
2
|
-
sourceKey: string;
|
|
3
|
-
attributeKey: string;
|
|
4
|
-
summaryKey?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ExtractHttpErrorDetailsOptions {
|
|
7
|
-
attributePrefix?: string;
|
|
8
|
-
previewLimit?: number;
|
|
9
|
-
extraFields?: ExtraFieldOption[];
|
|
10
|
-
}
|
|
11
|
-
export interface ExtractedHttpErrorDetails {
|
|
12
|
-
attributes: Record<string, string | number | boolean | string[]>;
|
|
13
|
-
summary: string;
|
|
14
|
-
searchableText: string;
|
|
15
|
-
}
|
|
16
|
-
/** Extract structured HTTP error metadata (status, headers, body preview) for logging. */
|
|
17
|
-
export declare function extractHttpErrorDetails(error: unknown, options?: ExtractHttpErrorDetailsOptions): ExtractedHttpErrorDetails;
|
|
18
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { SandboxCommandResult, SandboxWorkspace } from "@/chat/sandbox/workspace";
|
|
2
|
-
interface NonInteractiveShellOptions {
|
|
3
|
-
env?: Record<string, string>;
|
|
4
|
-
pathPrefix?: string;
|
|
5
|
-
}
|
|
6
|
-
interface NonInteractiveCommandInput extends NonInteractiveShellOptions {
|
|
7
|
-
args?: string[];
|
|
8
|
-
cmd: string;
|
|
9
|
-
cwd?: string;
|
|
10
|
-
login?: boolean;
|
|
11
|
-
signal?: AbortSignal;
|
|
12
|
-
sudo?: boolean;
|
|
13
|
-
timeoutMs?: number;
|
|
14
|
-
}
|
|
15
|
-
/** Render one argv command as a safely quoted shell script. */
|
|
16
|
-
export declare function buildCommandScript(input: Pick<NonInteractiveCommandInput, "args" | "cmd">): string;
|
|
17
|
-
/** Build one shell entrypoint that never waits on terminal input. */
|
|
18
|
-
export declare function buildNonInteractiveShellScript(script: string, options?: NonInteractiveShellOptions): string;
|
|
19
|
-
/** Run a subprocess through one enforced non-interactive entrypoint. */
|
|
20
|
-
export declare function runNonInteractiveCommand(sandbox: Pick<SandboxWorkspace, "runCommand">, input: NonInteractiveCommandInput): Promise<SandboxCommandResult>;
|
|
21
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const SANDBOX_WORKSPACE_ROOT: string;
|
|
2
|
-
export declare const SANDBOX_REPOS_ROOT: string;
|
|
3
|
-
export declare const SANDBOX_SKILLS_ROOT: string;
|
|
4
|
-
export declare const SANDBOX_DATA_ROOT: string;
|
|
5
|
-
export declare function sandboxSkillDir(skillName: string): string;
|
|
6
|
-
export declare function sandboxSkillFile(skillName: string): string;
|
|
7
|
-
/** Explain how the agent should resolve files and commands owned by a skill. */
|
|
8
|
-
export declare function sandboxSkillPathResolution(skillName: string): string;
|