@sentry/junior 0.198.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-3E7O7ATZ.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 -16
- package/dist/app.js +3913 -3701
- package/dist/{catalog-runtime-QDUBRXEW.js → catalog-runtime-J2VOYYYV.js} +4 -4
- package/dist/{chunk-X2WFY3TM.js → chunk-23ITKUM3.js} +8 -8
- package/dist/{chunk-IZ4CIFJY.js → chunk-2B2KKIWT.js} +9 -9
- package/dist/{chunk-N3GQY63R.js → chunk-3ARYTHKB.js} +1 -1
- package/dist/{chunk-342FVAX5.js → chunk-46WKZ2SS.js} +1 -1
- package/dist/{chunk-LXPGGSYD.js → chunk-4YIE2TYI.js} +3 -3
- package/dist/{chunk-KVXHBJCH.js → chunk-5UMYAEOX.js} +1 -1
- package/dist/{chunk-OKQMTCHU.js → chunk-7667XKEG.js} +5 -5
- package/dist/{chunk-ZUEUBQWE.js → chunk-B63AKBOM.js} +3 -3
- package/dist/{chunk-2ACXVY6O.js → chunk-BO6MPZSQ.js} +1 -1
- package/dist/{chunk-VYGZPJSM.js → chunk-CIFTZ6A7.js} +4 -4
- package/dist/{chunk-SPEJV3TW.js → chunk-CYTCY25C.js} +3 -3
- package/dist/{chunk-4FHQ6CCO.js → chunk-CZFI77CX.js} +1 -1
- package/dist/{chunk-3J5Y4RWY.js → chunk-FAGRJZ4E.js} +1 -1
- package/dist/{chunk-QYSJWJLJ.js → chunk-GNHCHX6P.js} +4 -4
- package/dist/{chunk-7KXZRRMK.js → chunk-HDZEZ7OB.js} +1 -1
- package/dist/{chunk-G6XSYS3Q.js → chunk-I3HP6Z6Z.js} +4 -4
- package/dist/{chunk-CSGQWJIY.js → chunk-K3427KVO.js} +2 -2
- package/dist/{chunk-D3SLBCD4.js → chunk-MI5SP4SR.js} +2 -2
- package/dist/{chunk-LBN67OZR.js → chunk-MTM5IFCY.js} +1 -0
- package/dist/{chunk-CGNZXN7B.js → chunk-OJBDDF7X.js} +8 -8
- package/dist/{chunk-A6KKPVEA.js → chunk-P22PNLK7.js} +4 -4
- package/dist/{chunk-FU4OWKCL.js → chunk-P7QOUKYL.js} +2 -2
- package/dist/{chunk-CZC6ZEXR.js → chunk-PB74QQQS.js} +6 -6
- package/dist/{chunk-XNZAZ57D.js → chunk-PQWRTBQJ.js} +2 -2
- package/dist/{chunk-3TMKXW4H.js → chunk-PSFQC35H.js} +1 -1
- package/dist/{chunk-U67DBSNZ.js → chunk-PTT4LXUL.js} +7 -6
- package/dist/{chunk-EWPTEQXA.js → chunk-QF4E3RNM.js} +3 -3
- package/dist/{chunk-G2CT2D5U.js → chunk-RQJ4PBAI.js} +5 -5
- package/dist/{chunk-ZORFTPFN.js → chunk-RVM3TBKW.js} +28 -28
- package/dist/{chunk-EATO3SKS.js → chunk-SHWGNIZJ.js} +3 -3
- package/dist/{chunk-SCVIT6K4.js → chunk-SWA7F2IQ.js} +25 -24
- package/dist/{chunk-C3SNQB6B.js → chunk-TN3MRLBG.js} +21 -21
- package/dist/{chunk-CBHQOGFA.js → chunk-TT2FUK6X.js} +1 -1
- package/dist/{chunk-BFIFTKUS.js → chunk-VL4SXCWF.js} +3 -3
- package/dist/{chunk-NVDUM2CM.js → chunk-VXG62JVC.js} +1 -1
- package/dist/{chunk-T5KV6DUY.js → chunk-WQ7RAWIY.js} +1 -1
- package/dist/{chunk-N6LJYW7V.js → chunk-WR4GQARR.js} +1 -1
- package/dist/{chunk-4UW7BEJZ.js → chunk-YTXEKSV6.js} +6 -6
- package/dist/{chunk-F3XUS2T5.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-OSPYS4WA.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-VG736DHZ.js → oauth-callback-server-ECRF67PN.js} +29 -29
- package/dist/{runner-3GKIVG6A.js → runner-WCRHEM6N.js} +21 -21
- package/dist/{skills-FKMV7HTX.js → skills-HGNNRMPX.js} +5 -5
- package/dist/spawn-IZ5SV7OV.js +42 -0
- package/dist/task-runner-GG6KD2PL.js +36 -0
- package/dist/{validation-4XYG33GY.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-TJAL6PV3.js → work-LFTVZJUQ.js} +21 -21
- package/dist/{worker-3OYUEME2.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 -100
- 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-5YR3E42B.js +0 -42
- package/dist/stats.d.ts +0 -18
- package/dist/task-runner-GR2WZNCW.js +0 -36
- package/dist/usage-schema.d.ts +0 -25
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
export type LogAttributeValue = string | number | boolean | string[];
|
|
3
|
-
export type LogAttributes = Record<string, LogAttributeValue>;
|
|
4
|
-
/** Provider-neutral correlation data inherited by logs and spans in an operation. */
|
|
5
|
-
export interface LogContext {
|
|
6
|
-
conversationId?: string;
|
|
7
|
-
platform?: string;
|
|
8
|
-
requestId?: string;
|
|
9
|
-
messageConversationId?: string;
|
|
10
|
-
destinationName?: string;
|
|
11
|
-
userId?: string;
|
|
12
|
-
userName?: string;
|
|
13
|
-
userEmail?: string;
|
|
14
|
-
runId?: string;
|
|
15
|
-
actorType?: string;
|
|
16
|
-
actorId?: string;
|
|
17
|
-
assistantUserName?: string;
|
|
18
|
-
modelId?: string;
|
|
19
|
-
skillName?: string;
|
|
20
|
-
httpMethod?: string;
|
|
21
|
-
httpPath?: string;
|
|
22
|
-
urlFull?: string;
|
|
23
|
-
userAgent?: string;
|
|
24
|
-
}
|
|
25
|
-
/** Async attribute domain consumed directly by LogTape. */
|
|
26
|
-
export declare const logContextStorage: AsyncLocalStorage<LogAttributes>;
|
|
27
|
-
/** Convert provider-neutral domain context to stable telemetry attributes. */
|
|
28
|
-
export declare function logContextToAttributes(context: LogContext): LogAttributes;
|
|
29
|
-
/** Run an operation with merged context, restoring its parent on completion. */
|
|
30
|
-
export declare function runWithLogContext<T>(context: LogContext, attributes: LogAttributes, callback: () => T): T;
|
|
31
|
-
/** Run an operation with raw attributes, restoring its parent on completion. */
|
|
32
|
-
export declare function runWithLogAttributes<T>(attributes: LogAttributes, callback: () => T): T;
|
|
33
|
-
/** Merge raw attributes into the current scoped operation. */
|
|
34
|
-
export declare function updateLogAttributes(attributes: LogAttributes): void;
|
|
35
|
-
/** Merge context and attributes into the current scoped operation. */
|
|
36
|
-
export declare function updateLogContext(context: LogContext, attributes: LogAttributes): void;
|
|
37
|
-
/** Read the typed context bound to the current operation. */
|
|
38
|
-
export declare function getBoundLogContext(): LogContext;
|
|
39
|
-
/** Read the attributes bound to the current operation. */
|
|
40
|
-
export declare function getBoundLogAttributes(): LogAttributes;
|
package/dist/chat/logging.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import type { Logger as ChatSdkLogger } from "chat";
|
|
2
|
-
import { type LogAttributes, type LogContext } from "@/chat/log-context";
|
|
3
|
-
import * as Sentry from "@/chat/sentry";
|
|
4
|
-
import type { AgentTurnUsage } from "@/chat/usage";
|
|
5
|
-
export type { LogAttributes, LogContext } from "@/chat/log-context";
|
|
6
|
-
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
7
|
-
export interface EmittedLogRecord {
|
|
8
|
-
attributes: LogAttributes;
|
|
9
|
-
body: string;
|
|
10
|
-
eventName: string;
|
|
11
|
-
level: LogLevel;
|
|
12
|
-
}
|
|
13
|
-
export type TracePropagationHeaders = Partial<Record<"baggage" | "sentry-trace" | "traceparent", string>>;
|
|
14
|
-
interface SentryUserIdentity {
|
|
15
|
-
id: string | number;
|
|
16
|
-
email?: string;
|
|
17
|
-
username?: string;
|
|
18
|
-
}
|
|
19
|
-
/** Normalize runtime finish reasons to the telemetry spelling we emit. */
|
|
20
|
-
export declare function normalizeGenAiFinishReason(reason: string): string;
|
|
21
|
-
/** Truncate message text for log attributes. */
|
|
22
|
-
export declare function summarizeMessageText(text: string): string;
|
|
23
|
-
/**
|
|
24
|
-
* Low-level adapter logger.
|
|
25
|
-
*
|
|
26
|
-
* Application runtime code should use the severity helpers below. This surface
|
|
27
|
-
* exists for adapters that must preserve an external free-form body.
|
|
28
|
-
*/
|
|
29
|
-
export declare const log: {
|
|
30
|
-
debug(eventName: string, attrs?: Record<string, unknown>, body?: string): void;
|
|
31
|
-
info(eventName: string, attrs?: Record<string, unknown>, body?: string): void;
|
|
32
|
-
warn(eventName: string, attrs?: Record<string, unknown>, body?: string): void;
|
|
33
|
-
error(eventName: string, attrs?: Record<string, unknown>, body?: string): void;
|
|
34
|
-
exception(eventName: string, error: unknown, attrs?: Record<string, unknown>, body?: string): string | undefined;
|
|
35
|
-
};
|
|
36
|
-
/** Create a Chat SDK logger that routes records through Junior's logging backend. */
|
|
37
|
-
export declare function createChatSdkLogger(): ChatSdkLogger;
|
|
38
|
-
/**
|
|
39
|
-
* Run one operation with inherited correlation context.
|
|
40
|
-
*
|
|
41
|
-
* Call this at execution boundaries after reconstructing authoritative
|
|
42
|
-
* context. Nested application logs should not receive the same context again.
|
|
43
|
-
*/
|
|
44
|
-
export declare function withLogContext<T>(context: LogContext, callback: () => T): T;
|
|
45
|
-
export declare function getLogContextAttributes(): LogAttributes;
|
|
46
|
-
/** Return inherited log context filtered to attributes valid for the span operation. */
|
|
47
|
-
export declare function getLogContextAttributesForSpan(op: string): LogAttributes;
|
|
48
|
-
export declare function registerLogRecordSink(sink: (record: EmittedLogRecord) => void): () => void;
|
|
49
|
-
export declare function createLogContextFromRequest(request: Request, context?: Partial<LogContext>): LogContext;
|
|
50
|
-
/** Attach filterable non-user context tags to Sentry. */
|
|
51
|
-
export declare function setSentryTagsFromContext(context: LogContext): void;
|
|
52
|
-
/** Bind actor identity to Sentry's native user fields. */
|
|
53
|
-
export declare function setSentryUser(identity: SentryUserIdentity | undefined): void;
|
|
54
|
-
/** Attach scoped Sentry context for isolated exception capture. */
|
|
55
|
-
export declare function setSentryScopeContext(scope: Sentry.Scope, context: LogContext): void;
|
|
56
|
-
export type SetSpanAttributes = (attributes: Record<string, unknown>) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Capture an error using context already bound to the current operation.
|
|
59
|
-
*/
|
|
60
|
-
export declare function captureException(error: unknown): void;
|
|
61
|
-
/**
|
|
62
|
-
* Emit an informational event with occurrence-specific attributes.
|
|
63
|
-
*
|
|
64
|
-
* Bind correlation context at the owning operation boundary instead of
|
|
65
|
-
* passing it here.
|
|
66
|
-
*/
|
|
67
|
-
export declare function logInfo(eventName: string, attributes?: Record<string, unknown>): void;
|
|
68
|
-
/**
|
|
69
|
-
* Emit a warning event with occurrence-specific attributes.
|
|
70
|
-
*
|
|
71
|
-
* Bind correlation context at the owning operation boundary instead of
|
|
72
|
-
* passing it here.
|
|
73
|
-
*/
|
|
74
|
-
export declare function logWarn(eventName: string, attributes?: Record<string, unknown>): void;
|
|
75
|
-
/**
|
|
76
|
-
* Emit an error event without capturing an exception.
|
|
77
|
-
*
|
|
78
|
-
* Use `logException` when an actual exception instance owns the failure.
|
|
79
|
-
*/
|
|
80
|
-
export declare function logError(eventName: string, attributes?: Record<string, unknown>): void;
|
|
81
|
-
/**
|
|
82
|
-
* Emit an exception event and capture the exception with bound context.
|
|
83
|
-
*
|
|
84
|
-
* Exception event names should end in `.exception` when they describe a
|
|
85
|
-
* generic operation exception. Existing domain failure events may retain a
|
|
86
|
-
* `.failed` outcome when the event also covers non-exception failures.
|
|
87
|
-
*/
|
|
88
|
-
export declare function logException(error: unknown, eventName: string, attributes?: Record<string, unknown>): string | undefined;
|
|
89
|
-
/** Run an optional side effect without changing the successful primary outcome. */
|
|
90
|
-
export declare function runBestEffort(operation: () => Promise<void>, eventName: string, attributes?: Record<string, unknown>): Promise<void>;
|
|
91
|
-
/** Add context to the current operation and Sentry scope. */
|
|
92
|
-
export declare function setTags(context?: LogContext): void;
|
|
93
|
-
/** Create a LogContext from an incoming HTTP request. */
|
|
94
|
-
export declare function createRequestContext(request: Request, context?: Partial<LogContext>): LogContext;
|
|
95
|
-
/** Run a callback within a scoped log context. */
|
|
96
|
-
export declare function withContext<T>(context: LogContext, callback: () => Promise<T>): Promise<T>;
|
|
97
|
-
/** Run a callback within a Sentry span and scoped log context. */
|
|
98
|
-
export declare function withSpan<T>(name: string, op: string, context: LogContext, callback: (setSpanAttributes: SetSpanAttributes) => Promise<T>, attributes?: Record<string, unknown>): Promise<T>;
|
|
99
|
-
/** Return Sentry-standard trace propagation headers for the active span. */
|
|
100
|
-
export declare function getTracePropagationHeaders(): TracePropagationHeaders;
|
|
101
|
-
/** Set attributes on the currently active Sentry span. */
|
|
102
|
-
export declare function setSpanAttributes(attributes: Record<string, unknown>): void;
|
|
103
|
-
/** Set the status of the currently active Sentry span. */
|
|
104
|
-
export declare function setSpanStatus(status: "ok" | "error"): void;
|
|
105
|
-
/** Capture an exception within an isolated Sentry scope. */
|
|
106
|
-
export declare function captureExceptionInScope(error: unknown, context?: LogContext): void;
|
|
107
|
-
/** Return the trace ID from the active Sentry span, if any. */
|
|
108
|
-
export declare function getActiveTraceId(): string | undefined;
|
|
109
|
-
/** Build the static user-facing response for a failed turn. */
|
|
110
|
-
export declare function buildTurnFailureResponse(eventId: string): string;
|
|
111
|
-
/** Serialize a bounded AI value, omitting it when valid JSON cannot fit. */
|
|
112
|
-
export declare function serializeGenAiAttribute(value: unknown, maxChars?: number): string | undefined;
|
|
113
|
-
/**
|
|
114
|
-
* Sum pi-ai `Usage` counters across every source into an `AgentTurnUsage`.
|
|
115
|
-
*
|
|
116
|
-
* Callers pass every assistant message produced during a turn so the result
|
|
117
|
-
* reflects the aggregate usage for the entire turn rather than a single model
|
|
118
|
-
* call. Sources without a recognized usage record contribute nothing.
|
|
119
|
-
*/
|
|
120
|
-
export declare function extractGenAiUsageSummary(...sources: unknown[]): AgentTurnUsage;
|
|
121
|
-
/** Extract GenAI token and estimated USD cost attributes for tracing. */
|
|
122
|
-
export declare function extractGenAiUsageAttributes(...sources: unknown[]): Partial<Record<"gen_ai.usage.input_tokens" | "gen_ai.usage.output_tokens" | "gen_ai.usage.cache_read.input_tokens" | "gen_ai.usage.cache_creation.input_tokens" | "gen_ai.usage.reasoning.output_tokens", number> & Partial<Record<"app.cost.input_usd" | "app.cost.output_usd" | "app.cost.cache_read_usd" | "app.cost.cache_write_usd" | "app.cost.total_usd", number>>>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { OAuthClientInformationMixed, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
|
|
2
|
-
import type { OAuthDiscoveryState } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
3
|
-
import { type Destination, type Source } from "@sentry/junior-plugin-api";
|
|
4
|
-
export interface McpAuthSessionState {
|
|
5
|
-
schemaVersion: 2;
|
|
6
|
-
authSessionId: string;
|
|
7
|
-
provider: string;
|
|
8
|
-
userId: string;
|
|
9
|
-
conversationId: string;
|
|
10
|
-
destination?: Destination;
|
|
11
|
-
source?: Source;
|
|
12
|
-
sessionId: string;
|
|
13
|
-
userMessage: string;
|
|
14
|
-
channelId?: string;
|
|
15
|
-
threadTs?: string;
|
|
16
|
-
toolChannelId?: string;
|
|
17
|
-
configuration?: Record<string, unknown>;
|
|
18
|
-
authorizationUrl?: string;
|
|
19
|
-
codeVerifier?: string;
|
|
20
|
-
createdAtMs: number;
|
|
21
|
-
updatedAtMs: number;
|
|
22
|
-
}
|
|
23
|
-
export interface McpStoredOAuthCredentials {
|
|
24
|
-
clientInformation?: OAuthClientInformationMixed;
|
|
25
|
-
discoveryState?: OAuthDiscoveryState;
|
|
26
|
-
tokens?: OAuthTokens;
|
|
27
|
-
}
|
|
28
|
-
export interface McpServerSessionState {
|
|
29
|
-
sessionId: string;
|
|
30
|
-
updatedAtMs: number;
|
|
31
|
-
}
|
|
32
|
-
export declare function getMcpAuthSession(authSessionId: string): Promise<McpAuthSessionState | undefined>;
|
|
33
|
-
export declare function putMcpAuthSession(session: McpAuthSessionState, ttlMs?: number): Promise<void>;
|
|
34
|
-
export declare function patchMcpAuthSession(authSessionId: string, patch: Partial<McpAuthSessionState>): Promise<McpAuthSessionState>;
|
|
35
|
-
export declare function deleteMcpAuthSession(authSessionId: string): Promise<void>;
|
|
36
|
-
export declare function deleteMcpAuthSessionsForUserProvider(userId: string, provider: string): Promise<void>;
|
|
37
|
-
export declare function getLatestMcpAuthSessionForUserProvider(userId: string, provider: string): Promise<McpAuthSessionState | undefined>;
|
|
38
|
-
export declare function getMcpStoredOAuthCredentials(userId: string, provider: string): Promise<McpStoredOAuthCredentials | undefined>;
|
|
39
|
-
export declare function putMcpStoredOAuthCredentials(userId: string, provider: string, value: McpStoredOAuthCredentials, ttlMs?: number): Promise<void>;
|
|
40
|
-
export declare function deleteMcpStoredOAuthCredentials(userId: string, provider: string): Promise<void>;
|
|
41
|
-
export declare function getMcpServerSessionId(userId: string, provider: string): Promise<string | undefined>;
|
|
42
|
-
export declare function putMcpServerSessionId(userId: string, provider: string, sessionId: string, ttlMs?: number): Promise<void>;
|
|
43
|
-
export declare function deleteMcpServerSessionId(userId: string, provider: string): Promise<void>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
2
|
-
import { type OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
3
|
-
import type { PluginDefinition } from "@/chat/plugins/types";
|
|
4
|
-
type ListedTool = Awaited<ReturnType<Client["listTools"]>>["tools"][number];
|
|
5
|
-
type ToolCallResult = Awaited<ReturnType<Client["callTool"]>>;
|
|
6
|
-
export declare class McpAuthorizationRequiredError extends Error {
|
|
7
|
-
readonly provider: string;
|
|
8
|
-
constructor(provider: string, message: string);
|
|
9
|
-
}
|
|
10
|
-
export interface PluginMcpClientOptions {
|
|
11
|
-
authProvider?: OAuthClientProvider;
|
|
12
|
-
fetch?: typeof fetch;
|
|
13
|
-
}
|
|
14
|
-
export declare class PluginMcpClient {
|
|
15
|
-
private readonly plugin;
|
|
16
|
-
private readonly options;
|
|
17
|
-
private client?;
|
|
18
|
-
private clientPromise?;
|
|
19
|
-
private lastAttemptedTransportSessionId?;
|
|
20
|
-
private readonly providerStatusStore;
|
|
21
|
-
private transport?;
|
|
22
|
-
private listedTools?;
|
|
23
|
-
private readonly resourceHost?;
|
|
24
|
-
constructor(plugin: PluginDefinition, options?: PluginMcpClientOptions);
|
|
25
|
-
listTools(): Promise<ListedTool[]>;
|
|
26
|
-
callTool(name: string, args: Record<string, unknown> | undefined): Promise<ToolCallResult>;
|
|
27
|
-
close(): Promise<void>;
|
|
28
|
-
private withSessionRecovery;
|
|
29
|
-
private getClient;
|
|
30
|
-
private connectClient;
|
|
31
|
-
private wrapAuth;
|
|
32
|
-
private shouldResetMissingSession;
|
|
33
|
-
private resetClientState;
|
|
34
|
-
private cleanupClientAfterFailure;
|
|
35
|
-
private disposeClient;
|
|
36
|
-
private getStoredTransportSessionId;
|
|
37
|
-
private clearStoredTransportSessionId;
|
|
38
|
-
private syncTransportSessionId;
|
|
39
|
-
}
|
|
40
|
-
export type { ListedTool as PluginMcpListedTool, ToolCallResult as PluginMcpToolCallResult, };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
2
|
-
export type McpProviderErrorPhase = "connect" | "list_tools" | "call_tool" | "close" | "oauth_callback";
|
|
3
|
-
export interface McpProviderErrorDetails {
|
|
4
|
-
phase: McpProviderErrorPhase;
|
|
5
|
-
provider: string;
|
|
6
|
-
missingSession?: boolean;
|
|
7
|
-
resourceHost?: string;
|
|
8
|
-
status?: number;
|
|
9
|
-
}
|
|
10
|
-
/** Safe failure at an MCP network or OAuth boundary. */
|
|
11
|
-
export declare class McpProviderError extends Error {
|
|
12
|
-
readonly phase: McpProviderErrorPhase;
|
|
13
|
-
readonly provider: string;
|
|
14
|
-
readonly missingSession?: boolean;
|
|
15
|
-
readonly resourceHost?: string;
|
|
16
|
-
readonly status?: number;
|
|
17
|
-
constructor(details: McpProviderErrorDetails);
|
|
18
|
-
}
|
|
19
|
-
/** Replace an external MCP failure without retaining its provider-controlled cause. */
|
|
20
|
-
export declare function toMcpProviderError(error: unknown, details: McpProviderErrorDetails): McpProviderError;
|
|
21
|
-
/** Return safe MCP provider fields for logs and spans. */
|
|
22
|
-
export declare function getMcpProviderErrorAttributes(error: unknown): Record<string, string | number>;
|
|
23
|
-
/** Thrown when an MCP failure should be returned as a model-visible tool error. */
|
|
24
|
-
export declare class McpToolError extends Error {
|
|
25
|
-
constructor(message: string);
|
|
26
|
-
}
|
|
27
|
-
/** Return the OpenTelemetry error.type value for MCP-aware tool failures. */
|
|
28
|
-
export declare function getMcpAwareErrorType(error: unknown, fallback: string): string;
|
|
29
|
-
/** Return the display-safe error message for MCP-aware tool failures. */
|
|
30
|
-
export declare function getMcpAwareErrorMessage(error: unknown): string;
|
|
31
|
-
/** Return an error message safe for logs and span attributes. */
|
|
32
|
-
export declare function getMcpAwareTelemetryMessage(error: unknown, _privacy: ConversationPrivacy | undefined): string;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { OAuthClientInformationMixed, OAuthClientMetadata, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
|
|
2
|
-
import type { OAuthClientProvider, OAuthDiscoveryState } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
3
|
-
import { type McpAuthSessionState } from "./auth-store";
|
|
4
|
-
export declare class StateBackedMcpOAuthClientProvider implements OAuthClientProvider {
|
|
5
|
-
readonly authSessionId: string;
|
|
6
|
-
private readonly callbackUrl;
|
|
7
|
-
private readonly sessionContext?;
|
|
8
|
-
private readonly runCredentialMutation?;
|
|
9
|
-
readonly clientMetadata: OAuthClientMetadata;
|
|
10
|
-
constructor(authSessionId: string, callbackUrl: string, sessionContext?: Omit<McpAuthSessionState, "schemaVersion" | "authSessionId" | "authorizationUrl" | "codeVerifier" | "createdAtMs" | "updatedAtMs"> | undefined, runCredentialMutation?: (<T>(mutation: () => Promise<T>) => Promise<T>) | undefined);
|
|
11
|
-
get redirectUrl(): string;
|
|
12
|
-
state(): Promise<string>;
|
|
13
|
-
clientInformation(): Promise<OAuthClientInformationMixed | undefined>;
|
|
14
|
-
saveClientInformation(clientInformation: OAuthClientInformationMixed): Promise<void>;
|
|
15
|
-
tokens(): Promise<OAuthTokens | undefined>;
|
|
16
|
-
saveTokens(tokens: OAuthTokens): Promise<void>;
|
|
17
|
-
redirectToAuthorization(authorizationUrl: URL): Promise<void>;
|
|
18
|
-
saveCodeVerifier(codeVerifier: string): Promise<void>;
|
|
19
|
-
codeVerifier(): Promise<string>;
|
|
20
|
-
saveDiscoveryState(state: OAuthDiscoveryState): Promise<void>;
|
|
21
|
-
discoveryState(): Promise<OAuthDiscoveryState | undefined>;
|
|
22
|
-
invalidateCredentials(scope: "all" | "client" | "tokens" | "verifier" | "discovery"): Promise<void>;
|
|
23
|
-
getMcpServerSessionId(): Promise<string | undefined>;
|
|
24
|
-
saveMcpServerSessionId(sessionId: string | undefined): Promise<void>;
|
|
25
|
-
/** Route shared credential writes through callback-owned freshness control. */
|
|
26
|
-
private mutateCredentials;
|
|
27
|
-
private getCredentialContext;
|
|
28
|
-
private ensureSession;
|
|
29
|
-
private requireSession;
|
|
30
|
-
}
|
package/dist/chat/mcp/oauth.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
2
|
-
import { type McpAuthSessionState } from "./auth-store";
|
|
3
|
-
import { StateBackedMcpOAuthClientProvider } from "./oauth-provider";
|
|
4
|
-
export declare function getMcpOAuthCallbackPath(provider: string): string;
|
|
5
|
-
/** Create one immutable provider authorization attempt for the active turn. */
|
|
6
|
-
export declare function createMcpOAuthClientProvider(input: {
|
|
7
|
-
provider: string;
|
|
8
|
-
conversationId: string;
|
|
9
|
-
destination?: Destination;
|
|
10
|
-
source?: Source;
|
|
11
|
-
sessionId: string;
|
|
12
|
-
userId: string;
|
|
13
|
-
userMessage: string;
|
|
14
|
-
channelId?: string;
|
|
15
|
-
threadTs?: string;
|
|
16
|
-
toolChannelId?: string;
|
|
17
|
-
configuration?: Record<string, unknown>;
|
|
18
|
-
createAuthorizationState?: () => Promise<string>;
|
|
19
|
-
}): Promise<StateBackedMcpOAuthClientProvider>;
|
|
20
|
-
/** Exchange a callback code while guarding every shared credential mutation. */
|
|
21
|
-
export declare function finalizeMcpAuthorization(provider: string, authSessionId: string, authorizationCode: string, runCredentialMutation?: <T>(mutation: () => Promise<T>) => Promise<T>): Promise<McpAuthSessionState>;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Turn-local MCP tool manager.
|
|
3
|
-
*
|
|
4
|
-
* This manager activates plugin MCP providers for one agent turn, exposes
|
|
5
|
-
* discovered tools through provider-prefixed names, and converts MCP results
|
|
6
|
-
* into Pi tool content. MCP clients, auth challenges, and provider session
|
|
7
|
-
* details stay inside this layer.
|
|
8
|
-
*/
|
|
9
|
-
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
10
|
-
import type { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
11
|
-
import { type PluginMcpToolResult, type ToolAnnotations } from "@sentry/junior-plugin-api";
|
|
12
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
13
|
-
import type { PluginDefinition } from "@/chat/plugins/types";
|
|
14
|
-
import { McpAuthorizationRequiredError } from "./client";
|
|
15
|
-
export interface McpToolSuccessHookInput {
|
|
16
|
-
arguments: Record<string, unknown>;
|
|
17
|
-
provider: string;
|
|
18
|
-
structuredContent?: unknown;
|
|
19
|
-
toolName: string;
|
|
20
|
-
}
|
|
21
|
-
export interface McpToolManagerOptions {
|
|
22
|
-
authProviderFactory?: (plugin: PluginDefinition) => OAuthClientProvider | undefined | Promise<OAuthClientProvider | undefined>;
|
|
23
|
-
fetch?: typeof fetch;
|
|
24
|
-
onAuthorizationRequired?: (provider: string, error: McpAuthorizationRequiredError) => Promise<boolean | void> | boolean | void;
|
|
25
|
-
/**
|
|
26
|
-
* Optional post-success processor for model-facing MCP tool calls.
|
|
27
|
-
* Failures are logged by the host caller and must not fail the tool result.
|
|
28
|
-
*/
|
|
29
|
-
onToolSuccess?: (input: McpToolSuccessHookInput) => Promise<void> | void;
|
|
30
|
-
}
|
|
31
|
-
export interface ManagedMcpToolResult {
|
|
32
|
-
/**
|
|
33
|
-
* Internal bridge for direct model calls, which need placeholder content
|
|
34
|
-
* while the wrapper boundary receives a content-free discriminated result.
|
|
35
|
-
*/
|
|
36
|
-
authorizationPending?: boolean;
|
|
37
|
-
content: Array<TextContent | ImageContent>;
|
|
38
|
-
/** Original provider content before model-visible result normalization. */
|
|
39
|
-
providerContent?: Array<TextContent | ImageContent>;
|
|
40
|
-
structuredContent?: unknown;
|
|
41
|
-
}
|
|
42
|
-
export interface ManagedMcpToolDescriptor {
|
|
43
|
-
name: string;
|
|
44
|
-
rawName: string;
|
|
45
|
-
title?: string;
|
|
46
|
-
description: string;
|
|
47
|
-
parameters: Record<string, unknown>;
|
|
48
|
-
outputSchema?: Record<string, unknown>;
|
|
49
|
-
annotations?: ToolAnnotations;
|
|
50
|
-
provider: string;
|
|
51
|
-
}
|
|
52
|
-
export interface ManagedMcpTool extends ManagedMcpToolDescriptor {
|
|
53
|
-
execute: (args: Record<string, unknown>, options?: {
|
|
54
|
-
conversationPrivacy?: ConversationPrivacy;
|
|
55
|
-
toolCallId?: string;
|
|
56
|
-
}) => Promise<ManagedMcpToolResult>;
|
|
57
|
-
}
|
|
58
|
-
export declare class McpToolManager {
|
|
59
|
-
private readonly options;
|
|
60
|
-
private readonly pluginsByProvider;
|
|
61
|
-
private readonly activeProviders;
|
|
62
|
-
private readonly authorizationPendingProviders;
|
|
63
|
-
private readonly clientsByProvider;
|
|
64
|
-
private readonly clientPromisesByProvider;
|
|
65
|
-
private readonly toolsByProvider;
|
|
66
|
-
constructor(plugins: PluginDefinition[], options?: McpToolManagerOptions);
|
|
67
|
-
getActiveProviders(): string[];
|
|
68
|
-
/** List configured MCP providers for discovery without connecting to them. */
|
|
69
|
-
getAvailableProviderCatalog(): Array<{
|
|
70
|
-
provider: string;
|
|
71
|
-
description: string;
|
|
72
|
-
active: boolean;
|
|
73
|
-
}>;
|
|
74
|
-
activateProvider(provider: string): Promise<boolean>;
|
|
75
|
-
close(): Promise<void>;
|
|
76
|
-
/** Return descriptors for all active MCP provider tools, optionally filtered by provider. */
|
|
77
|
-
getActiveToolCatalog(options?: {
|
|
78
|
-
provider?: string;
|
|
79
|
-
}): ManagedMcpToolDescriptor[];
|
|
80
|
-
private filterListedTools;
|
|
81
|
-
private assertWrappedToolsAvailable;
|
|
82
|
-
private getClient;
|
|
83
|
-
private createClient;
|
|
84
|
-
private toManagedTool;
|
|
85
|
-
private handleAuthorizationRequired;
|
|
86
|
-
/** Return all active ManagedMcpTool objects, optionally filtered by provider. */
|
|
87
|
-
getResolvedActiveTools(options?: {
|
|
88
|
-
provider?: string;
|
|
89
|
-
}): ManagedMcpTool[];
|
|
90
|
-
/** Call one active provider tool declared for plugin-owned wrapping. */
|
|
91
|
-
callWrappedTool(provider: string, rawName: string, args: Record<string, unknown>, options?: {
|
|
92
|
-
toolCallId?: string;
|
|
93
|
-
}): Promise<PluginMcpToolResult>;
|
|
94
|
-
private toToolDescriptor;
|
|
95
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { BotConfig } from "@/chat/config";
|
|
3
|
-
import type { TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
4
|
-
/** Keep durable profile names stable and safe to expose in tool schemas. */
|
|
5
|
-
export declare const modelProfileSchema: z.ZodString;
|
|
6
|
-
/** A configured name for a model. */
|
|
7
|
-
export type ModelProfile = z.output<typeof modelProfileSchema>;
|
|
8
|
-
/** Runtime configuration for one named model profile. */
|
|
9
|
-
export interface ModelProfileConfig {
|
|
10
|
-
/**
|
|
11
|
-
* Tells models which tasks fit this profile.
|
|
12
|
-
* Name concrete tasks. Add use and avoid cases when helpful.
|
|
13
|
-
* Do not use model product names as the selection rule.
|
|
14
|
-
*/
|
|
15
|
-
description?: string;
|
|
16
|
-
modelId: string;
|
|
17
|
-
reasoningLevel?: TurnReasoningLevel;
|
|
18
|
-
}
|
|
19
|
-
/** App-level profile input: a model id string or a full profile config. */
|
|
20
|
-
export type ModelProfileInput = string | ModelProfileConfig;
|
|
21
|
-
/** Format one profile and its task-fit description. */
|
|
22
|
-
export declare function formatModelProfile(profile: ModelProfile, description?: string): string;
|
|
23
|
-
/** Format configured profiles as one list item per line. */
|
|
24
|
-
export declare function formatModelProfiles(profiles: Readonly<Record<string, ModelProfileConfig>>, profileNames: readonly ModelProfile[]): string;
|
|
25
|
-
/** Identify durable profile bindings that the current host cannot resolve. */
|
|
26
|
-
export declare class ModelProfileNotConfiguredError extends Error {
|
|
27
|
-
constructor(profile: ModelProfile);
|
|
28
|
-
}
|
|
29
|
-
/** Resolve a model id from a configured profile. */
|
|
30
|
-
export declare function modelIdForProfile(config: BotConfig, profile: ModelProfile): string;
|
|
31
|
-
/** Resolve the configured default profile's model. */
|
|
32
|
-
export declare function defaultModelId(config: BotConfig): string;
|
|
33
|
-
/** Return one configured profile. */
|
|
34
|
-
export declare function profileConfig(config: BotConfig, profile: ModelProfile): ModelProfileConfig;
|
package/dist/chat/no-reply.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** User-facing link and guidance for one OAuth authorization attempt. */
|
|
2
|
-
export interface OAuthAuthorizationRequest {
|
|
3
|
-
authorizationUrl: string;
|
|
4
|
-
completionText: string;
|
|
5
|
-
label: string;
|
|
6
|
-
}
|
|
7
|
-
/** Surface-owned capabilities for creating and presenting OAuth authorization. */
|
|
8
|
-
export interface OAuthAuthorization {
|
|
9
|
-
createState: () => Promise<string>;
|
|
10
|
-
deliver: (request: OAuthAuthorizationRequest) => void | Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
/** Build the stable event identity shared by authorization request and completion. */
|
|
13
|
-
export declare function authorizationId(args: {
|
|
14
|
-
kind: "mcp" | "plugin";
|
|
15
|
-
provider: string;
|
|
16
|
-
sessionId: string;
|
|
17
|
-
}): string;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { type Actor, type Destination, type Source } from "@sentry/junior-plugin-api";
|
|
2
|
-
import type { OAuthAuthorization, OAuthAuthorizationRequest } from "@/chat/oauth-authorization";
|
|
3
|
-
type PrivateDeliveryResult = "in_context" | "fallback_dm" | false;
|
|
4
|
-
export type OAuthStatePayload = {
|
|
5
|
-
userId: string;
|
|
6
|
-
provider: string;
|
|
7
|
-
actor?: Actor;
|
|
8
|
-
channelId?: string;
|
|
9
|
-
destination?: Destination;
|
|
10
|
-
source?: Source;
|
|
11
|
-
threadTs?: string;
|
|
12
|
-
resumeConversationId?: string;
|
|
13
|
-
resumeSessionId?: string;
|
|
14
|
-
scope?: string;
|
|
15
|
-
};
|
|
16
|
-
type OAuthFlowInput = {
|
|
17
|
-
actorId: string;
|
|
18
|
-
actor?: Actor;
|
|
19
|
-
channelId?: string;
|
|
20
|
-
destination?: Destination;
|
|
21
|
-
source?: Source;
|
|
22
|
-
threadTs?: string;
|
|
23
|
-
activeSkillName?: string;
|
|
24
|
-
resumeConversationId?: string;
|
|
25
|
-
resumeSessionId?: string;
|
|
26
|
-
scope?: string;
|
|
27
|
-
authorization?: OAuthAuthorization;
|
|
28
|
-
};
|
|
29
|
-
/** Parse OAuth callback state that was persisted before a provider redirect. */
|
|
30
|
-
export declare function parseOAuthStatePayload(value: unknown): OAuthStatePayload | undefined;
|
|
31
|
-
/** Return the manifest-owned display label for a provider. */
|
|
32
|
-
export declare function formatProviderLabel(provider: string): string;
|
|
33
|
-
/** Resolve the public base URL from environment variables (JUNIOR_BASE_URL or Vercel). */
|
|
34
|
-
export declare function resolveBaseUrl(): string | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Authorization links must only be visible to the requesting user.
|
|
37
|
-
* Try in-context private delivery first, then fall back to a DM.
|
|
38
|
-
*/
|
|
39
|
-
export declare function deliverPrivateMessage(input: {
|
|
40
|
-
channelId?: string;
|
|
41
|
-
threadTs?: string;
|
|
42
|
-
userId: string;
|
|
43
|
-
text: string;
|
|
44
|
-
}): Promise<PrivateDeliveryResult>;
|
|
45
|
-
/** Present one OAuth request through the active surface's private delivery. */
|
|
46
|
-
export declare function deliverOAuthAuthorization(request: OAuthAuthorizationRequest, input: {
|
|
47
|
-
authorization?: OAuthAuthorization;
|
|
48
|
-
channelId?: string;
|
|
49
|
-
threadTs?: string;
|
|
50
|
-
userId: string;
|
|
51
|
-
}): Promise<PrivateDeliveryResult>;
|
|
52
|
-
/** Initiate an OAuth authorization code flow for a provider and deliver the auth link to the user. */
|
|
53
|
-
export declare function startOAuthFlow(provider: string, input: OAuthFlowInput): Promise<{
|
|
54
|
-
ok: false;
|
|
55
|
-
error: string;
|
|
56
|
-
} | {
|
|
57
|
-
ok: true;
|
|
58
|
-
delivery: PrivateDeliveryResult;
|
|
59
|
-
}>;
|
|
60
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type OAuthProviderErrorPhase = "token_exchange" | "token_refresh";
|
|
2
|
-
export interface OAuthProviderErrorDetails {
|
|
3
|
-
phase: OAuthProviderErrorPhase;
|
|
4
|
-
provider: string;
|
|
5
|
-
resourceHost: string;
|
|
6
|
-
status?: number;
|
|
7
|
-
}
|
|
8
|
-
/** Safe failure at a generic OAuth provider boundary. */
|
|
9
|
-
export declare class OAuthProviderError extends Error {
|
|
10
|
-
readonly phase: OAuthProviderErrorPhase;
|
|
11
|
-
readonly provider: string;
|
|
12
|
-
readonly resourceHost: string;
|
|
13
|
-
readonly status?: number;
|
|
14
|
-
constructor(details: OAuthProviderErrorDetails);
|
|
15
|
-
}
|
|
16
|
-
/** Return safe generic OAuth provider fields for logs and spans. */
|
|
17
|
-
export declare function getOAuthProviderErrorAttributes(error: unknown): Record<string, string | number>;
|
|
18
|
-
/** Read only the bounded prefix needed to classify an OAuth error response. */
|
|
19
|
-
export declare function readBoundedOAuthErrorBody(response: Response): Promise<string>;
|
|
20
|
-
/** Preserve small OAuth error responses while bounding bodies before SDK parsing. */
|
|
21
|
-
export declare function fetchWithBoundedOAuthErrorBodies(fetchFn?: typeof fetch, onErrorResponseStatus?: (status: number) => void): typeof fetch;
|
package/dist/chat/pi/client.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { type Message, type Model, type ThinkingLevel } from "@/chat/pi/sdk";
|
|
2
|
-
export { getGatewayApiKey, MISSING_GATEWAY_CREDENTIALS_ERROR, resolveGatewayCredential, type GatewayCredential, } from "@/chat/pi/gateway-auth";
|
|
3
|
-
import type { ZodTypeAny, z } from "zod";
|
|
4
|
-
export declare const GEN_AI_PROVIDER_NAME: "vercel-ai-gateway";
|
|
5
|
-
export declare const GEN_AI_SERVER_ADDRESS = "ai-gateway.vercel.sh";
|
|
6
|
-
export declare const GEN_AI_SERVER_PORT = 443;
|
|
7
|
-
/**
|
|
8
|
-
* Look up a gateway model by id. Throws `Unknown AI Gateway model id: …` if
|
|
9
|
-
* the id is not in pi-ai's registry — callers at the config boundary can use
|
|
10
|
-
* this to fail fast at startup instead of mid-turn.
|
|
11
|
-
*/
|
|
12
|
-
export declare function resolveGatewayModel(modelId: string): Model<any>;
|
|
13
|
-
/** Execute a direct chat completion inside a dedicated `gen_ai.chat` span. */
|
|
14
|
-
export declare function completeText(params: {
|
|
15
|
-
modelId: string;
|
|
16
|
-
system?: string;
|
|
17
|
-
messages: Message[];
|
|
18
|
-
messageAttributeMode?: "content" | "metadata";
|
|
19
|
-
thinkingLevel?: ThinkingLevel;
|
|
20
|
-
temperature?: number;
|
|
21
|
-
maxTokens?: number;
|
|
22
|
-
signal?: AbortSignal;
|
|
23
|
-
metadata?: Record<string, unknown>;
|
|
24
|
-
promptName?: string;
|
|
25
|
-
}): Promise<{
|
|
26
|
-
message: import("@earendil-works/pi-ai").AssistantMessage;
|
|
27
|
-
text: string;
|
|
28
|
-
}>;
|
|
29
|
-
/** Execute a schema-constrained completion using the AI SDK structured output path. */
|
|
30
|
-
export declare function completeObject<TSchema extends ZodTypeAny>(params: {
|
|
31
|
-
modelId: string;
|
|
32
|
-
schema: TSchema;
|
|
33
|
-
system?: string;
|
|
34
|
-
prompt: string;
|
|
35
|
-
thinkingLevel?: ThinkingLevel;
|
|
36
|
-
temperature?: number;
|
|
37
|
-
maxTokens?: number;
|
|
38
|
-
/**
|
|
39
|
-
* `false` retains telemetry spans and metrics while omitting model inputs and
|
|
40
|
-
* outputs. Omission preserves the existing payload-recording behavior.
|
|
41
|
-
*/
|
|
42
|
-
recordTelemetryPayloads?: boolean;
|
|
43
|
-
signal?: AbortSignal;
|
|
44
|
-
metadata?: Record<string, unknown>;
|
|
45
|
-
promptName?: string;
|
|
46
|
-
}): Promise<{
|
|
47
|
-
costUsd?: number;
|
|
48
|
-
object: z.infer<TSchema>;
|
|
49
|
-
}>;
|
|
50
|
-
/** Generate text embeddings through the host-owned AI Gateway provider. */
|
|
51
|
-
export declare function embedTexts(params: {
|
|
52
|
-
modelId: string;
|
|
53
|
-
texts: string[];
|
|
54
|
-
signal?: AbortSignal;
|
|
55
|
-
metadata?: Record<string, unknown>;
|
|
56
|
-
}): Promise<{
|
|
57
|
-
costUsd?: number;
|
|
58
|
-
dimensions: number;
|
|
59
|
-
model: string;
|
|
60
|
-
provider: string;
|
|
61
|
-
vectors: number[][];
|
|
62
|
-
}>;
|