@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,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP authorization pause orchestration.
|
|
3
|
-
*
|
|
4
|
-
* This module turns an MCP client auth challenge into Junior's paused-run
|
|
5
|
-
* model: create provider auth state, privately present or reuse its link,
|
|
6
|
-
* record pending auth, and abort the agent so the OAuth callback can resume
|
|
7
|
-
* the same session.
|
|
8
|
-
*/
|
|
9
|
-
import type { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
10
|
-
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
11
|
-
import { type OAuthAuthorization } from "@/chat/oauth-authorization";
|
|
12
|
-
import { AuthorizationPauseError } from "@/chat/services/auth-pause";
|
|
13
|
-
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
14
|
-
import type { PluginDefinition } from "@/chat/plugins/types";
|
|
15
|
-
export declare class McpAuthorizationPauseError extends AuthorizationPauseError {
|
|
16
|
-
constructor(provider: string, providerDisplayName: string, disposition: "link_already_sent" | "link_sent", requestText?: string);
|
|
17
|
-
}
|
|
18
|
-
export interface McpAuthOrchestrationInput {
|
|
19
|
-
abortAgent: () => void;
|
|
20
|
-
conversationId?: string;
|
|
21
|
-
sessionId?: string;
|
|
22
|
-
actorId?: string;
|
|
23
|
-
channelId?: string;
|
|
24
|
-
destination?: Destination;
|
|
25
|
-
source?: Source;
|
|
26
|
-
threadTs?: string;
|
|
27
|
-
toolChannelId?: string;
|
|
28
|
-
userMessage: string;
|
|
29
|
-
pendingAuth?: ConversationPendingAuthState;
|
|
30
|
-
getConfiguration: () => Record<string, unknown>;
|
|
31
|
-
recordPendingAuth?: (pendingAuth: ConversationPendingAuthState | undefined) => void | Promise<void>;
|
|
32
|
-
/** When false, required auth hard-fails instead of pausing for an OAuth link. */
|
|
33
|
-
interactiveAuthEnabled?: boolean;
|
|
34
|
-
authorization?: OAuthAuthorization;
|
|
35
|
-
}
|
|
36
|
-
export interface McpAuthOrchestration {
|
|
37
|
-
authProviderFactory: (plugin: PluginDefinition) => Promise<OAuthClientProvider | undefined>;
|
|
38
|
-
onAuthorizationRequired: (provider: string) => Promise<boolean>;
|
|
39
|
-
getPendingPause: () => McpAuthorizationPauseError | undefined;
|
|
40
|
-
}
|
|
41
|
-
/** Create MCP authorization orchestration for a single agent run. */
|
|
42
|
-
export declare function createMcpAuthOrchestration(input: McpAuthOrchestrationInput): McpAuthOrchestration;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Message } from "chat";
|
|
2
|
-
import { type SlackActor, type SlackActorProfile, type UserActor } from "@/chat/actor";
|
|
3
|
-
interface MessageAuthorIdentity {
|
|
4
|
-
email?: string;
|
|
5
|
-
fullName?: string;
|
|
6
|
-
userId: string;
|
|
7
|
-
userName?: string;
|
|
8
|
-
}
|
|
9
|
-
type MessageActorIdentity = UserActor | MessageAuthorIdentity;
|
|
10
|
-
/** Preserve runtime-owned identity on Chat SDK messages before persistence. */
|
|
11
|
-
export declare function bindMessageActorIdentity(message: Message, actor: UserActor): UserActor;
|
|
12
|
-
/** Read message identity without promoting adapter display fallbacks. */
|
|
13
|
-
export declare function getMessageActorIdentity(message: Message): MessageActorIdentity | undefined;
|
|
14
|
-
/** Attach Slack display fields only after the author id is exact. */
|
|
15
|
-
export declare function ensureSlackMessageActorIdentity(message: Message, teamId: string, lookupSlackUser: (teamId: string, userId: string) => Promise<SlackActorProfile | null | undefined>): Promise<SlackActor>;
|
|
16
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { AuthorizationPauseKind } from "@/chat/services/auth-pause";
|
|
2
|
-
import type { ConversationPendingAuthState, ThreadConversationState } from "@/chat/state/conversation";
|
|
3
|
-
/** Decide whether the same agent-run session can reuse its fresh auth link. */
|
|
4
|
-
export declare function canReusePendingAuthLink(args: {
|
|
5
|
-
kind: AuthorizationPauseKind;
|
|
6
|
-
nowMs?: number;
|
|
7
|
-
pendingAuth?: ConversationPendingAuthState;
|
|
8
|
-
provider: string;
|
|
9
|
-
actorId: string;
|
|
10
|
-
scope?: string;
|
|
11
|
-
sessionId: string;
|
|
12
|
-
}): boolean;
|
|
13
|
-
/** Return the exact pending authorization target for one actor and provider. */
|
|
14
|
-
export declare function getConversationPendingAuth(args: {
|
|
15
|
-
conversation: ThreadConversationState;
|
|
16
|
-
kind: "mcp";
|
|
17
|
-
provider: string;
|
|
18
|
-
actorId: string;
|
|
19
|
-
scope?: string;
|
|
20
|
-
}): Extract<ConversationPendingAuthState, {
|
|
21
|
-
kind: "mcp";
|
|
22
|
-
}> | undefined;
|
|
23
|
-
export declare function getConversationPendingAuth(args: {
|
|
24
|
-
conversation: ThreadConversationState;
|
|
25
|
-
kind: "plugin";
|
|
26
|
-
provider: string;
|
|
27
|
-
actorId: string;
|
|
28
|
-
scope?: string;
|
|
29
|
-
}): Extract<ConversationPendingAuthState, {
|
|
30
|
-
kind: "plugin";
|
|
31
|
-
}> | undefined;
|
|
32
|
-
export declare function clearPendingAuth(conversation: ThreadConversationState, sessionId?: string): void;
|
|
33
|
-
/** Mark the prior blocked turn abandoned after a new auth attempt replaces it. */
|
|
34
|
-
export declare function abandonReplacedPendingAuth(args: {
|
|
35
|
-
conversationId: string | undefined;
|
|
36
|
-
previousPendingAuth: ConversationPendingAuthState | undefined;
|
|
37
|
-
nextPendingAuth: ConversationPendingAuthState;
|
|
38
|
-
}): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Decide whether an auth callback still belongs to the latest real human
|
|
41
|
-
* request, ignoring bot-authored and passive bystander rows while treating
|
|
42
|
-
* failed human turns and opt-outs as newer freshness blockers.
|
|
43
|
-
*/
|
|
44
|
-
export declare function isPendingAuthLatestRequest(conversation: ThreadConversationState, pendingAuth: ConversationPendingAuthState): boolean;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin authorization pause orchestration.
|
|
3
|
-
*
|
|
4
|
-
* This module detects plugin credential failures from the sandbox egress layer
|
|
5
|
-
* and maps them onto the same paused-run contract used by MCP auth. It owns
|
|
6
|
-
* provider attribution, private-link delivery/reuse, event-log recording,
|
|
7
|
-
* and credential cleanup.
|
|
8
|
-
*
|
|
9
|
-
* Auth failures are detected exclusively through the structured `auth_required`
|
|
10
|
-
* signal emitted by the egress proxy — never inferred from bash command text,
|
|
11
|
-
* stdout patterns, or exit codes.
|
|
12
|
-
*/
|
|
13
|
-
import type { Actor, Destination, Source } from "@sentry/junior-plugin-api";
|
|
14
|
-
import type { UserTokenStore } from "@/chat/credentials/user-token-store";
|
|
15
|
-
import { AuthorizationPauseError } from "@/chat/services/auth-pause";
|
|
16
|
-
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
17
|
-
import { type OAuthAuthorization } from "@/chat/oauth-authorization";
|
|
18
|
-
export declare class PluginAuthorizationPauseError extends AuthorizationPauseError {
|
|
19
|
-
constructor(provider: string, providerDisplayName: string, disposition: "link_already_sent" | "link_sent", requestText?: string);
|
|
20
|
-
}
|
|
21
|
-
export declare class PluginCredentialFailureError extends Error {
|
|
22
|
-
readonly provider: string;
|
|
23
|
-
constructor(provider: string, message: string);
|
|
24
|
-
}
|
|
25
|
-
export interface PluginAuthOrchestrationInput {
|
|
26
|
-
abortAgent: () => void;
|
|
27
|
-
conversationId?: string;
|
|
28
|
-
sessionId?: string;
|
|
29
|
-
actorId?: string;
|
|
30
|
-
actor?: Actor;
|
|
31
|
-
channelId?: string;
|
|
32
|
-
destination?: Destination;
|
|
33
|
-
source?: Source;
|
|
34
|
-
threadTs?: string;
|
|
35
|
-
userMessage?: string;
|
|
36
|
-
pendingAuth?: ConversationPendingAuthState;
|
|
37
|
-
recordPendingAuth?: (pendingAuth: ConversationPendingAuthState) => void | Promise<void>;
|
|
38
|
-
/** When false, required auth hard-fails instead of pausing for an OAuth link. */
|
|
39
|
-
interactiveAuthEnabled?: boolean;
|
|
40
|
-
userTokenStore?: UserTokenStore;
|
|
41
|
-
authorization?: OAuthAuthorization;
|
|
42
|
-
}
|
|
43
|
-
export interface PluginAuthOrchestration {
|
|
44
|
-
/**
|
|
45
|
-
* Inspect a sandbox tool result for an `auth_required` signal from the
|
|
46
|
-
* egress proxy. If one is present and an OAuth flow is available, parks the
|
|
47
|
-
* current run and sends the user an authorization link. No-ops when the
|
|
48
|
-
* result carries no auth signal.
|
|
49
|
-
*/
|
|
50
|
-
maybeHandleAuthSignal: (details: unknown) => Promise<void>;
|
|
51
|
-
getPendingPause: () => PluginAuthorizationPauseError | undefined;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Start plugin OAuth from a sandbox egress auth signal and park the run.
|
|
55
|
-
*/
|
|
56
|
-
export declare function createPluginAuthOrchestration(input: PluginAuthOrchestrationInput): PluginAuthOrchestration;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { LocationConfigurationService } from "@/chat/configuration/types";
|
|
2
|
-
/** Apply explicit provider-default config requests that do not need agent reasoning. */
|
|
3
|
-
export declare function maybeApplyProviderDefaultConfigRequest(args: {
|
|
4
|
-
locationConfiguration?: LocationConfigurationService;
|
|
5
|
-
actorId?: string;
|
|
6
|
-
text: string;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
text: string;
|
|
9
|
-
} | null>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Normalize failures at the model-provider boundary.
|
|
3
|
-
*
|
|
4
|
-
* Junior owns stable failure kinds, safe user copy, and telemetry fields. Pi
|
|
5
|
-
* remains the source of truth for retrying assistant error messages.
|
|
6
|
-
*/
|
|
7
|
-
export type ProviderErrorKind = "auth" | "permission" | "rate_limit" | "capacity" | "timeout" | "network" | "server" | "invalid_request" | "invalid_response" | "quota" | "content_policy" | "unknown";
|
|
8
|
-
interface ProviderErrorOptions {
|
|
9
|
-
kind?: ProviderErrorKind;
|
|
10
|
-
modelId?: string;
|
|
11
|
-
/** Pi's decision for an assistant error; explicit terminal kinds still win. */
|
|
12
|
-
retryable?: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface ProviderErrorDetails {
|
|
15
|
-
cause?: unknown;
|
|
16
|
-
kind: ProviderErrorKind;
|
|
17
|
-
modelId?: string;
|
|
18
|
-
retryable: boolean;
|
|
19
|
-
retryAfterMs?: number;
|
|
20
|
-
status?: number;
|
|
21
|
-
}
|
|
22
|
-
/** Structured failure produced at an AI provider boundary. */
|
|
23
|
-
export declare class ProviderError extends Error {
|
|
24
|
-
readonly code = "provider_error";
|
|
25
|
-
readonly kind: ProviderErrorKind;
|
|
26
|
-
readonly modelId?: string;
|
|
27
|
-
readonly retryable: boolean;
|
|
28
|
-
readonly retryAfterMs?: number;
|
|
29
|
-
readonly status?: number;
|
|
30
|
-
constructor(details: ProviderErrorDetails);
|
|
31
|
-
}
|
|
32
|
-
/** Normalize SDK, Gateway, and Pi failures into one provider error contract. */
|
|
33
|
-
export declare function createProviderError(error: unknown, options?: ProviderErrorOptions): ProviderError;
|
|
34
|
-
/** Return whether a provider-boundary error should be retried. */
|
|
35
|
-
export declare function isProviderRetryError(error: unknown): error is ProviderError;
|
|
36
|
-
/** Find the provider failure preserved inside a domain error cause chain. */
|
|
37
|
-
export declare function findProviderError(error: unknown): ProviderError | undefined;
|
|
38
|
-
/** Return stable, sanitized copy suitable for a terminal user response. */
|
|
39
|
-
export declare function getProviderErrorUserMessage(error: ProviderError): string;
|
|
40
|
-
/** Return safe structured fields for terminal failure telemetry. */
|
|
41
|
-
export declare function getProviderErrorAttributes(error: ProviderError): Record<string, unknown>;
|
|
42
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type AssistantMessage } from "@earendil-works/pi-ai";
|
|
2
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
3
|
-
import { type ProviderError } from "@/chat/services/provider-error";
|
|
4
|
-
/** Apply Junior's retry budget to a retryable Pi assistant failure. */
|
|
5
|
-
export declare function nextProviderRetry(args: {
|
|
6
|
-
attempt: number;
|
|
7
|
-
failure?: AssistantMessage;
|
|
8
|
-
messages: PiMessage[];
|
|
9
|
-
}): {
|
|
10
|
-
delayMs: number;
|
|
11
|
-
messages: PiMessage[];
|
|
12
|
-
providerError: ProviderError;
|
|
13
|
-
} | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { completeText } from "@/chat/pi/client";
|
|
2
|
-
export declare const SHORT_TITLE_MAX_LENGTH = 60;
|
|
3
|
-
export type ShortTitleKind = "conversation" | "task";
|
|
4
|
-
/** Collapse whitespace and cap a candidate short title. */
|
|
5
|
-
export declare function normalizeShortTitle(value: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Deterministic display title when no generated title is stored.
|
|
8
|
-
* Uses the first non-empty line of the source text, capped like generated titles.
|
|
9
|
-
*/
|
|
10
|
-
export declare function fallbackShortTitle(sourceText: string, fallback?: string): string;
|
|
11
|
-
/** Generate a short title with the fast model, or return undefined on failure. */
|
|
12
|
-
export declare function generateShortTitle(args: {
|
|
13
|
-
completeText: typeof completeText;
|
|
14
|
-
kind: ShortTitleKind;
|
|
15
|
-
sourceText: string;
|
|
16
|
-
}): Promise<string | undefined>;
|
|
17
|
-
/**
|
|
18
|
-
* Prefer an explicit task title when provided; otherwise generate one from the
|
|
19
|
-
* instruction with the fast model.
|
|
20
|
-
*/
|
|
21
|
-
export declare function resolveTaskTitle(args: {
|
|
22
|
-
completeText: typeof completeText;
|
|
23
|
-
instruction: string;
|
|
24
|
-
title?: string | null;
|
|
25
|
-
}): Promise<string | undefined>;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare enum SubscribedReplyReason {
|
|
3
|
-
ThreadOptOut = "thread_opt_out",
|
|
4
|
-
ExplicitMention = "explicit_mention",
|
|
5
|
-
DirectedFollowUp = "directed_follow_up",
|
|
6
|
-
DirectedToOtherParty = "directed_to_other_party",
|
|
7
|
-
EmptyMessage = "empty_message",
|
|
8
|
-
Classifier = "llm_classifier",
|
|
9
|
-
SideConversation = "side_conversation",
|
|
10
|
-
LowConfidence = "low_confidence",
|
|
11
|
-
ClassifierError = "classifier_error",
|
|
12
|
-
PassiveDisabled = "passive_disabled"
|
|
13
|
-
}
|
|
14
|
-
export interface SubscribedDecisionInput {
|
|
15
|
-
rawText: string;
|
|
16
|
-
text: string;
|
|
17
|
-
conversationContext?: string;
|
|
18
|
-
hasAttachments?: boolean;
|
|
19
|
-
isExplicitMention?: boolean;
|
|
20
|
-
context: {
|
|
21
|
-
threadId?: string;
|
|
22
|
-
actorId?: string;
|
|
23
|
-
channelId?: string;
|
|
24
|
-
runId?: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface SubscribedDecisionResult {
|
|
28
|
-
costUsd?: number;
|
|
29
|
-
shouldReply: boolean;
|
|
30
|
-
shouldUnsubscribe?: boolean;
|
|
31
|
-
reason: SubscribedReplyReason;
|
|
32
|
-
reasonDetail?: string;
|
|
33
|
-
}
|
|
34
|
-
declare const replyDecisionSchema: z.ZodObject<{
|
|
35
|
-
should_reply: z.ZodBoolean;
|
|
36
|
-
should_unsubscribe: z.ZodBoolean;
|
|
37
|
-
confidence: z.ZodNumber;
|
|
38
|
-
reason: z.ZodString;
|
|
39
|
-
}, z.core.$strict>;
|
|
40
|
-
/**
|
|
41
|
-
* Return a stop decision for one message body.
|
|
42
|
-
* Deferred batches must call this on each body, not on joined text.
|
|
43
|
-
*/
|
|
44
|
-
export declare function getThreadStopDecision(args: {
|
|
45
|
-
rawText: string;
|
|
46
|
-
text: string;
|
|
47
|
-
}): SubscribedDecisionResult | undefined;
|
|
48
|
-
/** Fast heuristic check before the LLM classifier — skips messages directed at another party. */
|
|
49
|
-
export declare function getSubscribedReplyPreflightDecision(args: {
|
|
50
|
-
botUserName: string;
|
|
51
|
-
rawText: string;
|
|
52
|
-
text: string;
|
|
53
|
-
isExplicitMention?: boolean;
|
|
54
|
-
}): SubscribedDecisionResult | undefined;
|
|
55
|
-
/** Decide whether to reply to a message in a subscribed thread using an LLM classifier. */
|
|
56
|
-
export declare function decideSubscribedThreadReply(args: {
|
|
57
|
-
botUserName: string;
|
|
58
|
-
modelId: string;
|
|
59
|
-
input: SubscribedDecisionInput;
|
|
60
|
-
completeObject: (args: {
|
|
61
|
-
modelId: string;
|
|
62
|
-
schema: typeof replyDecisionSchema;
|
|
63
|
-
maxTokens: number;
|
|
64
|
-
temperature: number;
|
|
65
|
-
system: string;
|
|
66
|
-
prompt: string;
|
|
67
|
-
metadata: Record<string, string>;
|
|
68
|
-
promptName?: string;
|
|
69
|
-
}) => Promise<{
|
|
70
|
-
costUsd?: number;
|
|
71
|
-
object: unknown;
|
|
72
|
-
}>;
|
|
73
|
-
logClassifierFailure: (error: unknown, input: SubscribedDecisionInput) => void;
|
|
74
|
-
}): Promise<SubscribedDecisionResult>;
|
|
75
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type SubscribedDecisionInput } from "@/chat/services/subscribed-decision";
|
|
2
|
-
import type { completeObject } from "@/chat/pi/client";
|
|
3
|
-
export interface SubscribedReplyPolicyDeps {
|
|
4
|
-
completeObject: typeof completeObject;
|
|
5
|
-
}
|
|
6
|
-
export interface SubscribedReplyDecision {
|
|
7
|
-
costUsd?: number;
|
|
8
|
-
reason: string;
|
|
9
|
-
shouldReply: boolean;
|
|
10
|
-
shouldUnsubscribe?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export type SubscribedReplyPolicy = (args: SubscribedDecisionInput) => Promise<SubscribedReplyDecision>;
|
|
13
|
-
export declare function createSubscribedReplyPolicy(deps: SubscribedReplyPolicyDeps): SubscribedReplyPolicy;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Passive subscribed-thread reply router policy.
|
|
3
|
-
*
|
|
4
|
-
* Modeled after Junior's Guardian action-review policy shape and the open-source
|
|
5
|
-
* Codex Guardian evidence/prompt pattern:
|
|
6
|
-
* https://github.com/openai/codex/tree/main/codex-rs/core/src/guardian
|
|
7
|
-
*
|
|
8
|
-
* Guardian judges one planned tool action from bounded transcript evidence.
|
|
9
|
-
* This router judges one inbound Slack message from bounded visible
|
|
10
|
-
* user/assistant thread evidence and decides whether Junior should reply.
|
|
11
|
-
*/
|
|
12
|
-
export declare function buildSubscribedReplyRouterPolicy(assistantName: string): string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ConversationTurnFailureReason } from "@/chat/conversations/history";
|
|
2
|
-
import type { AgentRunResult } from "@/chat/services/turn-result";
|
|
3
|
-
type LogException = (error: unknown, eventName: string, attributes?: Record<string, unknown>) => string | undefined;
|
|
4
|
-
/** Require captured turn failures to carry a real Sentry event reference. */
|
|
5
|
-
export declare function requireTurnFailureEventId(eventId: string | undefined, eventName: string): string;
|
|
6
|
-
/** Return a fixed reason label for a failed model turn. */
|
|
7
|
-
export declare function getTurnFailureReason(reply: AgentRunResult): ConversationTurnFailureReason | undefined;
|
|
8
|
-
/** Keep failed-turn Sentry captures and completion spans on the same keys. */
|
|
9
|
-
export declare function getAgentTurnDiagnosticsAttributes(reply: AgentRunResult): Record<string, unknown>;
|
|
10
|
-
/** Sanitized failure fallback plus its optional captured event ID. */
|
|
11
|
-
export interface FinalizedTurnFailure {
|
|
12
|
-
eventId?: string;
|
|
13
|
-
failureReason?: ConversationTurnFailureReason;
|
|
14
|
-
reply: AgentRunResult;
|
|
15
|
-
}
|
|
16
|
-
/** Enforce one captured failure response and return its structured correlation. */
|
|
17
|
-
export declare function finalizeFailedTurnReplyWithEvent(args: {
|
|
18
|
-
reply: AgentRunResult;
|
|
19
|
-
logException: LogException;
|
|
20
|
-
attributes?: Record<string, unknown>;
|
|
21
|
-
}): FinalizedTurnFailure;
|
|
22
|
-
/** Enforce one captured, event-ID-bearing failure response before delivery. */
|
|
23
|
-
export declare function finalizeFailedTurnReply(args: Parameters<typeof finalizeFailedTurnReplyWithEvent>[0]): AgentRunResult;
|
|
24
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** Terminal failure when one turn uses too many execution slices. */
|
|
2
|
-
export declare class TurnSliceLimitExceededError extends Error {
|
|
3
|
-
constructor(maxSlices: number);
|
|
4
|
-
}
|
|
5
|
-
/** Terminal failure when one turn uses too many tool calls. */
|
|
6
|
-
export declare class TurnToolCallLimitExceededError extends Error {
|
|
7
|
-
constructor(maxToolCalls: number);
|
|
8
|
-
}
|
|
9
|
-
/** True when a turn hit a hard execution limit, including one Error.cause wrap. */
|
|
10
|
-
export declare function isTurnExecutionLimitExceededError(error: unknown): boolean;
|
|
11
|
-
/** Stop the turn when its tool-call count is past the limit. */
|
|
12
|
-
export declare function assertTurnToolCallLimit(toolCallCount: number, maxToolCalls: number): void;
|
|
13
|
-
/** Explain a terminal turn execution limit with actionable recovery guidance. */
|
|
14
|
-
export declare function buildTurnLimitResponse(eventId: string): string;
|
|
15
|
-
/** User-facing reply for a thrown turn error. */
|
|
16
|
-
export declare function buildTurnErrorResponse(error: unknown, eventId: string): string;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
2
|
-
import type { TurnRoute } from "@/chat/services/turn-router";
|
|
3
|
-
import type { AgentTurnUsage } from "@/chat/usage";
|
|
4
|
-
import type { SandboxRef } from "@/chat/sandbox/ref";
|
|
5
|
-
export interface AgentTurnDiagnostics {
|
|
6
|
-
assistantMessageCount: number;
|
|
7
|
-
durationMs?: number;
|
|
8
|
-
errorMessage?: string;
|
|
9
|
-
providerError?: unknown;
|
|
10
|
-
modelId: string;
|
|
11
|
-
outcome: "success" | "execution_failure" | "provider_error";
|
|
12
|
-
reasoningLevel?: TurnRoute["reasoningLevel"];
|
|
13
|
-
stopReason?: string;
|
|
14
|
-
toolCalls: string[];
|
|
15
|
-
toolErrorCount: number;
|
|
16
|
-
toolResultCount: number;
|
|
17
|
-
usage?: AgentTurnUsage;
|
|
18
|
-
usedPrimaryText: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface AgentRunResult {
|
|
21
|
-
/** Sanitized terminal text for diagnostics and failure fallback, not success delivery. */
|
|
22
|
-
text: string;
|
|
23
|
-
sandboxRef?: SandboxRef;
|
|
24
|
-
piMessages?: PiMessage[];
|
|
25
|
-
diagnostics: AgentTurnDiagnostics;
|
|
26
|
-
}
|
|
27
|
-
export interface TurnResultInput {
|
|
28
|
-
newMessages: unknown[];
|
|
29
|
-
userInput: string;
|
|
30
|
-
toolCalls: string[];
|
|
31
|
-
sandboxRef?: SandboxRef;
|
|
32
|
-
piMessages?: PiMessage[];
|
|
33
|
-
durationMs?: number;
|
|
34
|
-
generatedFileCount: number;
|
|
35
|
-
shouldTrace: boolean;
|
|
36
|
-
usage?: AgentTurnUsage;
|
|
37
|
-
executionProfile: TurnRoute;
|
|
38
|
-
assistantUserName?: string;
|
|
39
|
-
modelId: string;
|
|
40
|
-
}
|
|
41
|
-
/** Process raw agent messages into a structured AgentRunResult. */
|
|
42
|
-
export declare function buildTurnResult(input: TurnResultInput): AgentRunResult;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { ThinkingLevel as AgentThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
2
|
-
import type { ThinkingLevel as ProviderThinkingLevel } from "@earendil-works/pi-ai";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { type TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
5
|
-
import { type ModelProfile, type ModelProfileConfig } from "@/chat/model-profile";
|
|
6
|
-
declare function createTurnRouteSchema(profiles: Readonly<Record<string, ModelProfileConfig>>): z.ZodObject<{
|
|
7
|
-
reasoning_level: z.ZodEnum<{
|
|
8
|
-
low: "low";
|
|
9
|
-
medium: "medium";
|
|
10
|
-
high: "high";
|
|
11
|
-
xhigh: "xhigh";
|
|
12
|
-
none: "none";
|
|
13
|
-
}>;
|
|
14
|
-
profile: z.ZodString;
|
|
15
|
-
confidence: z.ZodPreprocess<z.ZodNumber, unknown>;
|
|
16
|
-
reason: z.ZodString;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export interface TurnRoute {
|
|
19
|
-
confidence?: number;
|
|
20
|
-
costUsd?: number;
|
|
21
|
-
profile: ModelProfile;
|
|
22
|
-
reasoningLevel: TurnReasoningLevel;
|
|
23
|
-
reason: string;
|
|
24
|
-
source?: "configured" | "inherited" | "router";
|
|
25
|
-
}
|
|
26
|
-
/** Preserve an explicitly configured reasoning level without invoking the router. */
|
|
27
|
-
export declare function configuredTurnRoute(profile: ModelProfile, reasoningLevel: TurnReasoningLevel, source: "agent_config" | "default" | "profile"): TurnRoute;
|
|
28
|
-
/** Route the upcoming assistant turn to its reasoning and model profiles. */
|
|
29
|
-
export declare function selectTurnRoute(args: {
|
|
30
|
-
completeObject: (args: {
|
|
31
|
-
modelId: string;
|
|
32
|
-
schema: ReturnType<typeof createTurnRouteSchema>;
|
|
33
|
-
maxTokens: number;
|
|
34
|
-
metadata: Record<string, string>;
|
|
35
|
-
prompt: string;
|
|
36
|
-
thinkingLevel?: ProviderThinkingLevel;
|
|
37
|
-
system: string;
|
|
38
|
-
temperature: number;
|
|
39
|
-
promptName?: string;
|
|
40
|
-
}) => Promise<{
|
|
41
|
-
costUsd?: number;
|
|
42
|
-
object: unknown;
|
|
43
|
-
}>;
|
|
44
|
-
conversationContext?: string;
|
|
45
|
-
context?: {
|
|
46
|
-
channelId?: string;
|
|
47
|
-
actorId?: string;
|
|
48
|
-
runId?: string;
|
|
49
|
-
threadId?: string;
|
|
50
|
-
};
|
|
51
|
-
currentTurnBlocks?: string[];
|
|
52
|
-
defaultProfile: ModelProfile;
|
|
53
|
-
fastModelId: string;
|
|
54
|
-
messageText: string;
|
|
55
|
-
profiles: Readonly<Record<string, ModelProfileConfig>>;
|
|
56
|
-
}): Promise<TurnRoute>;
|
|
57
|
-
/** Convert a routing bucket into the Pi Agent reasoning setting for a main turn. */
|
|
58
|
-
export declare function toPiReasoningLevel(level: TurnRoute["reasoningLevel"]): AgentThinkingLevel | "off";
|
|
59
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Load Location, Destination, and session Source from the Conversation record.
|
|
3
|
-
*
|
|
4
|
-
* Destination is set once on the root Conversation. A Conversation with a
|
|
5
|
-
* parent reads through that relation. Later Turns and mailbox wakes use the
|
|
6
|
-
* same Destination so tools stay consistent for the whole Conversation.
|
|
7
|
-
*/
|
|
8
|
-
import type { Destination } from "@sentry/junior-plugin-api";
|
|
9
|
-
import type { ConversationStore } from "@/chat/conversations/store";
|
|
10
|
-
import type { Location } from "@/chat/conversations/location";
|
|
11
|
-
import type { SessionSource } from "@/chat/source";
|
|
12
|
-
export interface TurnSessionRouting {
|
|
13
|
-
destination: Destination;
|
|
14
|
-
location?: Location;
|
|
15
|
-
/** Present when the conversation already stores a session source. */
|
|
16
|
-
source?: SessionSource;
|
|
17
|
-
}
|
|
18
|
-
/** Conversation data with a required Destination and Source. */
|
|
19
|
-
export type RequiredTurnSessionRouting = TurnSessionRouting & {
|
|
20
|
-
source: SessionSource;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Resolve the Conversation Location, Destination, and session Source.
|
|
24
|
-
*
|
|
25
|
-
* Reads parent Conversations when this Conversation has no Destination.
|
|
26
|
-
*/
|
|
27
|
-
export declare function resolveConversationRouting(args: {
|
|
28
|
-
conversationId: string;
|
|
29
|
-
conversationStore?: ConversationStore;
|
|
30
|
-
}): Promise<TurnSessionRouting | undefined>;
|
|
31
|
-
/** Require the Conversation Destination and Source from SQL. */
|
|
32
|
-
export declare function resolveTurnSessionRouting(args: {
|
|
33
|
-
conversationId: string;
|
|
34
|
-
conversationStore?: ConversationStore;
|
|
35
|
-
}): Promise<RequiredTurnSessionRouting>;
|
package/dist/chat/skills.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export interface ParsedSkillFile {
|
|
2
|
-
name: string;
|
|
3
|
-
description: string;
|
|
4
|
-
body: string;
|
|
5
|
-
metadata?: Record<string, unknown>;
|
|
6
|
-
compatibility?: string;
|
|
7
|
-
license?: string;
|
|
8
|
-
allowedTools?: string[];
|
|
9
|
-
disableModelInvocation?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/** Strip YAML frontmatter from a skill file, returning only the body. */
|
|
12
|
-
export declare function stripFrontmatter(raw: string): string;
|
|
13
|
-
/** Parse a SKILL.md file's frontmatter and body. */
|
|
14
|
-
export declare function parseSkillFile(raw: string, expectedName?: string): {
|
|
15
|
-
ok: true;
|
|
16
|
-
skill: ParsedSkillFile;
|
|
17
|
-
} | {
|
|
18
|
-
ok: false;
|
|
19
|
-
error: string;
|
|
20
|
-
};
|
|
21
|
-
export interface SkillMetadata {
|
|
22
|
-
name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
skillPath: string;
|
|
25
|
-
pluginProvider?: string;
|
|
26
|
-
allowedTools?: string[];
|
|
27
|
-
disableModelInvocation?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface Skill extends SkillMetadata {
|
|
30
|
-
body: string;
|
|
31
|
-
}
|
|
32
|
-
export interface SkillInvocation {
|
|
33
|
-
skillName: string;
|
|
34
|
-
}
|
|
35
|
-
export interface DiscoverSkillsOptions {
|
|
36
|
-
additionalRoots?: string[];
|
|
37
|
-
}
|
|
38
|
-
/** Clear the cached skill discovery results so the next call re-scans disk. */
|
|
39
|
-
export declare function resetSkillDiscoveryCache(): void;
|
|
40
|
-
/** Scan all configured skill roots and return discovered skill metadata, using a cache when roots match. */
|
|
41
|
-
export declare function discoverSkills(options?: DiscoverSkillsOptions): Promise<SkillMetadata[]>;
|
|
42
|
-
/** Extract an explicit skill invocation from a user message. */
|
|
43
|
-
export declare function parseSkillInvocation(messageText: string, availableSkills: SkillMetadata[]): SkillInvocation | null;
|
|
44
|
-
/** Look up a skill by name from the available set. */
|
|
45
|
-
export declare function findSkillByName(skillName: string, available: SkillMetadata[]): SkillMetadata | null;
|
|
46
|
-
/** Load full skill bodies for a list of skill names, reading SKILL.md files from disk. */
|
|
47
|
-
export declare function loadSkillsByName(skillNames: string[], available: SkillMetadata[]): Promise<Skill[]>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const slackActionTokenSchema: z.core.$ZodBranded<z.ZodString, "SlackActionToken", "out">;
|
|
3
|
-
export type SlackActionToken = z.output<typeof slackActionTokenSchema>;
|
|
4
|
-
/** Parse the ephemeral search token from an untrusted Slack message envelope. */
|
|
5
|
-
export declare function readSlackActionToken(message: unknown): SlackActionToken | undefined;
|
|
6
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { SlackAdapter } from "@chat-adapter/slack";
|
|
2
|
-
import type { StateAdapter } from "chat";
|
|
3
|
-
export interface SlackInstallationContext {
|
|
4
|
-
enterpriseId?: string;
|
|
5
|
-
isEnterpriseInstall?: boolean;
|
|
6
|
-
teamId?: string;
|
|
7
|
-
}
|
|
8
|
-
/** Initialize the Slack adapter against the repository state adapter. */
|
|
9
|
-
export declare function ensureSlackAdapterInitialized(args: {
|
|
10
|
-
adapter: SlackAdapter;
|
|
11
|
-
state?: StateAdapter;
|
|
12
|
-
}): Promise<void>;
|
|
13
|
-
/** Verify a Slack request using the adapter's configured signing secret. */
|
|
14
|
-
export declare function verifySlackSignature(args: {
|
|
15
|
-
adapter: SlackAdapter;
|
|
16
|
-
body: string;
|
|
17
|
-
request: Request;
|
|
18
|
-
}): boolean;
|
|
19
|
-
/** Run Slack work with the installation token that matches the inbound event. */
|
|
20
|
-
export declare function runWithSlackInstallation<T>(args: {
|
|
21
|
-
adapter: SlackAdapter;
|
|
22
|
-
installation: SlackInstallationContext;
|
|
23
|
-
state?: StateAdapter;
|
|
24
|
-
task: () => T | Promise<T>;
|
|
25
|
-
}): Promise<T>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type SlackAdapter, type SlackAdapterConfig } from "@chat-adapter/slack";
|
|
2
|
-
/**
|
|
3
|
-
* Create the repository's Slack adapter.
|
|
4
|
-
*
|
|
5
|
-
* Junior used to patch private Slack adapter internals to alter native stream
|
|
6
|
-
* buffering. Visible reply delivery now relies on completed assistant-message
|
|
7
|
-
* thread posts plus status updates, so we keep the documented surface.
|
|
8
|
-
*/
|
|
9
|
-
export declare function createJuniorSlackAdapter(config?: SlackAdapterConfig): SlackAdapter;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { WebClient, KnownBlock } from "@slack/web-api";
|
|
2
|
-
import type { UserTokenStore } from "@/chat/credentials/user-token-store";
|
|
3
|
-
interface HomeView {
|
|
4
|
-
type: "home";
|
|
5
|
-
blocks: KnownBlock[];
|
|
6
|
-
}
|
|
7
|
-
/** Build the Slack App Home tab view showing skills, connected accounts, and version. */
|
|
8
|
-
export declare function buildHomeView(userId: string, userTokenStore: UserTokenStore): Promise<HomeView>;
|
|
9
|
-
/** Publish the App Home view to a specific Slack user. */
|
|
10
|
-
export declare function publishAppHomeView(slackClient: WebClient, userId: string, userTokenStore: UserTokenStore): Promise<void>;
|
|
11
|
-
export {};
|