@sentry/junior 0.197.0 → 0.199.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-CM4EKXL4.js → agent-hooks-GLHLHDA6.js} +11 -11
- package/dist/api/schema.d.ts +3157 -22
- package/dist/api/schema.js +1 -1
- package/dist/api.d.ts +27 -8
- package/dist/api.js +26 -25
- package/dist/app.d.ts +456 -15
- package/dist/app.js +3920 -3706
- package/dist/{catalog-runtime-V7WGCXUD.js → catalog-runtime-J2VOYYYV.js} +4 -4
- package/dist/{chunk-V2IX5Q5L.js → chunk-23ITKUM3.js} +8 -8
- package/dist/{chunk-SBCWV4E4.js → chunk-2B2KKIWT.js} +9 -9
- package/dist/{chunk-HDSDOBWN.js → chunk-3ARYTHKB.js} +8 -2
- package/dist/{chunk-5MMQLB2B.js → chunk-46WKZ2SS.js} +1 -1
- package/dist/{chunk-O5RG7SKU.js → chunk-4YIE2TYI.js} +3 -3
- package/dist/{chunk-YC5CFKME.js → chunk-5UMYAEOX.js} +1 -1
- package/dist/{chunk-DBTI74IT.js → chunk-7667XKEG.js} +5 -5
- package/dist/{chunk-C2SOA3KN.js → chunk-B63AKBOM.js} +3 -3
- package/dist/{chunk-6ZQ3CE6X.js → chunk-BO6MPZSQ.js} +1 -1
- package/dist/{chunk-ITP4OR7R.js → chunk-CIFTZ6A7.js} +4 -4
- package/dist/{chunk-5GWV7SXF.js → chunk-CYTCY25C.js} +3 -3
- package/dist/{chunk-EZKISZ3Q.js → chunk-CZFI77CX.js} +1 -1
- package/dist/{chunk-2K26W3FP.js → chunk-FAGRJZ4E.js} +1 -1
- package/dist/{chunk-VAUPAX3O.js → chunk-GNHCHX6P.js} +4 -4
- package/dist/{chunk-DHWYAHAM.js → chunk-HDZEZ7OB.js} +1 -1
- package/dist/{chunk-MJCJ62RZ.js → chunk-I3HP6Z6Z.js} +4 -4
- package/dist/{chunk-XALIC5SY.js → chunk-K3427KVO.js} +2 -2
- package/dist/{chunk-DLXA2ZXJ.js → chunk-MI5SP4SR.js} +2 -2
- package/dist/{chunk-LBN67OZR.js → chunk-MTM5IFCY.js} +1 -0
- package/dist/{chunk-WOJG25QZ.js → chunk-OJBDDF7X.js} +8 -8
- package/dist/{chunk-IGSAXSM7.js → chunk-P22PNLK7.js} +4 -4
- package/dist/{chunk-YZQLXALE.js → chunk-P7QOUKYL.js} +2 -2
- package/dist/{chunk-LIK4T6CF.js → chunk-PB74QQQS.js} +6 -6
- package/dist/{chunk-PM5WSDAD.js → chunk-PQWRTBQJ.js} +2 -2
- package/dist/{chunk-7ENMKNEK.js → chunk-PSFQC35H.js} +1 -1
- package/dist/{chunk-LMTHFU5D.js → chunk-PTT4LXUL.js} +7 -6
- package/dist/{chunk-T5MK3RUT.js → chunk-QF4E3RNM.js} +3 -3
- package/dist/{chunk-4USCVHQZ.js → chunk-RQJ4PBAI.js} +5 -5
- package/dist/{chunk-NANQFFGO.js → chunk-RVM3TBKW.js} +28 -28
- package/dist/{chunk-BR5GNDPS.js → chunk-SHWGNIZJ.js} +55 -3
- package/dist/{chunk-O2H7JUEQ.js → chunk-SWA7F2IQ.js} +25 -24
- package/dist/{chunk-H6QL3FWC.js → chunk-TN3MRLBG.js} +21 -21
- package/dist/{chunk-BQ7UXCUO.js → chunk-TT2FUK6X.js} +1 -1
- package/dist/{chunk-YLBJBBYX.js → chunk-VL4SXCWF.js} +3 -3
- package/dist/{chunk-FCONFDZ4.js → chunk-VXG62JVC.js} +1 -1
- package/dist/{chunk-PF3PEX4Q.js → chunk-WQ7RAWIY.js} +1 -1
- package/dist/{chunk-BGSAFVJO.js → chunk-WR4GQARR.js} +1 -1
- package/dist/{chunk-4UUKQB6I.js → chunk-YTXEKSV6.js} +6 -6
- package/dist/{chunk-S3DRTWPX.js → chunk-ZOUAXRCD.js} +5 -5
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/{db-6BD722UD.js → db-2K4NSLLX.js} +6 -6
- package/dist/instrumentation.d.ts +3 -1
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.d.ts +14 -7
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-P6AIT27Q.js → oauth-callback-server-ECRF67PN.js} +29 -29
- package/dist/{runner-OKPDZOJC.js → runner-WCRHEM6N.js} +21 -21
- package/dist/{skills-CQFX3V2I.js → skills-HGNNRMPX.js} +5 -5
- package/dist/spawn-IZ5SV7OV.js +42 -0
- package/dist/task-runner-GG6KD2PL.js +36 -0
- package/dist/{validation-STB4W433.js → validation-EKFIUZ4Y.js} +5 -5
- package/dist/vercel.d.ts +4 -2
- package/dist/version.d.ts +3 -1
- package/dist/version.js +1 -1
- package/dist/{work-B7N5TEYI.js → work-LFTVZJUQ.js} +21 -21
- package/dist/{worker-W6PBEHCA.js → worker-5GGUQCE3.js} +10 -10
- package/package.json +5 -5
- package/dist/api/acp/auth.d.ts +0 -46
- package/dist/api/acp/authorization-page.d.ts +0 -11
- package/dist/api/acp/conversations.d.ts +0 -70
- package/dist/api/acp/errors.d.ts +0 -6
- package/dist/api/acp/route.d.ts +0 -16
- package/dist/api/acp/schema.d.ts +0 -115
- package/dist/api/acp/sleep.d.ts +0 -2
- package/dist/api/acp/state.d.ts +0 -22
- package/dist/api/acp/transport.d.ts +0 -113
- package/dist/api/activity.d.ts +0 -24
- package/dist/api/code/overview.d.ts +0 -98
- package/dist/api/code/routes.d.ts +0 -4
- package/dist/api/conversations/access.d.ts +0 -10
- package/dist/api/conversations/aggregate.d.ts +0 -31
- package/dist/api/conversations/archive.d.ts +0 -6
- package/dist/api/conversations/attachments.d.ts +0 -32
- package/dist/api/conversations/auxiliary-costs.d.ts +0 -6
- package/dist/api/conversations/cancel-pending-messages.d.ts +0 -4
- package/dist/api/conversations/create.d.ts +0 -6
- package/dist/api/conversations/cursor.d.ts +0 -17
- package/dist/api/conversations/detail.d.ts +0 -7
- package/dist/api/conversations/event-list.d.ts +0 -7
- package/dist/api/conversations/event-page.d.ts +0 -18
- package/dist/api/conversations/events.d.ts +0 -18
- package/dist/api/conversations/list.d.ts +0 -145
- package/dist/api/conversations/membership.d.ts +0 -30
- package/dist/api/conversations/pending-messages.d.ts +0 -15
- package/dist/api/conversations/priority.d.ts +0 -22
- package/dist/api/conversations/projection.d.ts +0 -21
- package/dist/api/conversations/reporting.d.ts +0 -48
- package/dist/api/conversations/routes.d.ts +0 -7
- package/dist/api/conversations/shared.d.ts +0 -5
- package/dist/api/conversations/stats.d.ts +0 -3
- package/dist/api/conversations/stats.query.d.ts +0 -3
- package/dist/api/conversations/usage.d.ts +0 -9
- package/dist/api/conversations/user-message-activity.d.ts +0 -3
- package/dist/api/http.d.ts +0 -8
- package/dist/api/locations/detail.d.ts +0 -134
- package/dist/api/locations/list.d.ts +0 -47
- package/dist/api/locations/query.d.ts +0 -8
- package/dist/api/locations/routes.d.ts +0 -4
- package/dist/api/people/code.d.ts +0 -34
- package/dist/api/people/list.d.ts +0 -3
- package/dist/api/people/list.query.d.ts +0 -3
- package/dist/api/people/plugin-reports.d.ts +0 -7
- package/dist/api/people/profile.d.ts +0 -6
- package/dist/api/people/profile.query.d.ts +0 -6
- package/dist/api/people/routes.d.ts +0 -4
- package/dist/api/people/shared.d.ts +0 -1375
- package/dist/api/people/spend.d.ts +0 -3
- package/dist/api/people/spend.query.d.ts +0 -3
- package/dist/api/personal-tokens/routes.d.ts +0 -4
- package/dist/api/reporting-window.d.ts +0 -78
- package/dist/api/route.d.ts +0 -15
- package/dist/api/schema/code.d.ts +0 -147
- package/dist/api/schema/common.d.ts +0 -6
- package/dist/api/schema/conversation.d.ts +0 -1604
- package/dist/api/schema/location.d.ts +0 -270
- package/dist/api/schema/person.d.ts +0 -362
- package/dist/api/schema/personal-token.d.ts +0 -38
- package/dist/api/schema/stats.d.ts +0 -22
- package/dist/api/schema/task.d.ts +0 -423
- package/dist/api/schema/workspace.d.ts +0 -69
- package/dist/api/stats.d.ts +0 -3
- package/dist/api/tasks/routes.d.ts +0 -4
- package/dist/api/user-pages/routes.d.ts +0 -4
- package/dist/api/validation.d.ts +0 -7
- package/dist/api/viewer.d.ts +0 -3
- package/dist/api/workspaces/routes.d.ts +0 -4
- package/dist/build/copy-build-content.d.ts +0 -6
- package/dist/build/glob-to-regex.d.ts +0 -2
- package/dist/build/rolldown-workarounds.d.ts +0 -14
- package/dist/build/virtual-config.d.ts +0 -25
- package/dist/chat/actor.d.ts +0 -83
- package/dist/chat/agent/action-confirmation-retry.d.ts +0 -6
- package/dist/chat/agent/handoff.d.ts +0 -73
- package/dist/chat/agent/index.d.ts +0 -22
- package/dist/chat/agent/prompt.d.ts +0 -86
- package/dist/chat/agent/repository-context.d.ts +0 -21
- package/dist/chat/agent/resume.d.ts +0 -60
- package/dist/chat/agent/retry-usage.d.ts +0 -8
- package/dist/chat/agent/sandbox.d.ts +0 -55
- package/dist/chat/agent/skills.d.ts +0 -17
- package/dist/chat/agent/tools.d.ts +0 -91
- package/dist/chat/agent/types.d.ts +0 -224
- package/dist/chat/agent-dispatch/context.d.ts +0 -43
- package/dist/chat/agent-dispatch/heartbeat.d.ts +0 -27
- package/dist/chat/agent-dispatch/store.d.ts +0 -42
- package/dist/chat/agent-dispatch/types.d.ts +0 -60
- package/dist/chat/agent-dispatch/validation.d.ts +0 -5
- package/dist/chat/agent-dispatch/work.d.ts +0 -49
- package/dist/chat/agent-invocations/errors.d.ts +0 -8
- package/dist/chat/agent-invocations/spawn.d.ts +0 -12
- package/dist/chat/agent-invocations/store.d.ts +0 -46
- package/dist/chat/agent-invocations/types.d.ts +0 -505
- package/dist/chat/agent-invocations/work.d.ts +0 -29
- package/dist/chat/app/conversation-work.d.ts +0 -37
- package/dist/chat/app/factory.d.ts +0 -23
- package/dist/chat/app/production.d.ts +0 -24
- package/dist/chat/app/services.d.ts +0 -25
- package/dist/chat/artifacts/store.d.ts +0 -42
- package/dist/chat/attachments/storage.d.ts +0 -14
- package/dist/chat/attachments/store.d.ts +0 -68
- package/dist/chat/attachments/vercel.d.ts +0 -3
- package/dist/chat/capabilities/factory.d.ts +0 -11
- package/dist/chat/capabilities/jr-rpc-command.d.ts +0 -26
- package/dist/chat/capabilities/router.d.ts +0 -20
- package/dist/chat/code/publisher.d.ts +0 -3
- package/dist/chat/code/store.d.ts +0 -9
- package/dist/chat/coerce.d.ts +0 -6
- package/dist/chat/config.d.ts +0 -84
- package/dist/chat/configuration/defaults.d.ts +0 -4
- package/dist/chat/configuration/service.d.ts +0 -5
- package/dist/chat/configuration/sql.d.ts +0 -9
- package/dist/chat/configuration/types.d.ts +0 -41
- package/dist/chat/configuration/validation.d.ts +0 -2
- package/dist/chat/conversation-privacy.d.ts +0 -39
- package/dist/chat/conversations/destination-visibility.d.ts +0 -7
- package/dist/chat/conversations/destination.d.ts +0 -12
- package/dist/chat/conversations/history.d.ts +0 -1157
- package/dist/chat/conversations/location.d.ts +0 -5
- package/dist/chat/conversations/message-projection.d.ts +0 -4
- package/dist/chat/conversations/message-search.d.ts +0 -38
- package/dist/chat/conversations/message-summaries.d.ts +0 -9
- package/dist/chat/conversations/messages.d.ts +0 -32
- package/dist/chat/conversations/projection.d.ts +0 -199
- package/dist/chat/conversations/provenance.d.ts +0 -50
- package/dist/chat/conversations/retention.d.ts +0 -40
- package/dist/chat/conversations/sql/actor-identity.d.ts +0 -19
- package/dist/chat/conversations/sql/bindings.d.ts +0 -13
- package/dist/chat/conversations/sql/conversation-row.d.ts +0 -17
- package/dist/chat/conversations/sql/event-actor.d.ts +0 -14
- package/dist/chat/conversations/sql/event-lock.d.ts +0 -3
- package/dist/chat/conversations/sql/history.d.ts +0 -4
- package/dist/chat/conversations/sql/location.d.ts +0 -18
- package/dist/chat/conversations/sql/message-search.d.ts +0 -4
- package/dist/chat/conversations/sql/participants.d.ts +0 -18
- package/dist/chat/conversations/sql/privacy.d.ts +0 -15
- package/dist/chat/conversations/sql/purge.d.ts +0 -45
- package/dist/chat/conversations/sql/store.d.ts +0 -77
- package/dist/chat/conversations/stop.d.ts +0 -12
- package/dist/chat/conversations/store.d.ts +0 -151
- package/dist/chat/conversations/structured-events.d.ts +0 -42
- package/dist/chat/conversations/tool-source.d.ts +0 -5
- package/dist/chat/conversations/turn-lifecycle.d.ts +0 -44
- package/dist/chat/conversations/web-authorization.d.ts +0 -24
- package/dist/chat/conversations/web-input.d.ts +0 -98
- package/dist/chat/conversations/web-mailbox.d.ts +0 -12
- package/dist/chat/credentials/broker.d.ts +0 -23
- package/dist/chat/credentials/context.d.ts +0 -121
- package/dist/chat/credentials/header-transforms.d.ts +0 -3
- package/dist/chat/credentials/oauth-scope.d.ts +0 -4
- package/dist/chat/credentials/state-adapter-token-store.d.ts +0 -11
- package/dist/chat/credentials/subject.d.ts +0 -49
- package/dist/chat/credentials/unlink-provider.d.ts +0 -3
- package/dist/chat/credentials/user-token-store.d.ts +0 -24
- package/dist/chat/current-instruction.d.ts +0 -8
- package/dist/chat/db.d.ts +0 -16
- package/dist/chat/destination.d.ts +0 -14
- package/dist/chat/discovery.d.ts +0 -49
- package/dist/chat/egress/credentialed.d.ts +0 -57
- package/dist/chat/egress/plugin.d.ts +0 -24
- package/dist/chat/event-tasks/ingest.d.ts +0 -9
- package/dist/chat/event-tasks/store.d.ts +0 -41
- package/dist/chat/event-tasks/tool-support.d.ts +0 -158
- package/dist/chat/event-tasks/types.d.ts +0 -51
- package/dist/chat/experimental.d.ts +0 -16
- package/dist/chat/identities/identity.d.ts +0 -18
- package/dist/chat/identities/sql.d.ts +0 -12
- package/dist/chat/ingress/bot-mention.d.ts +0 -13
- package/dist/chat/ingress/junior-chat.d.ts +0 -26
- package/dist/chat/ingress/message-changed.d.ts +0 -52
- package/dist/chat/ingress/message-router.d.ts +0 -12
- package/dist/chat/ingress/slack-webhook.d.ts +0 -21
- package/dist/chat/ingress/slash-command.d.ts +0 -3
- package/dist/chat/ingress/workspace-membership.d.ts +0 -9
- package/dist/chat/interruption-marker.d.ts +0 -2
- package/dist/chat/local/credential-sync.d.ts +0 -5
- package/dist/chat/local/oauth-relay.d.ts +0 -4
- package/dist/chat/log-context.d.ts +0 -40
- package/dist/chat/logging.d.ts +0 -122
- package/dist/chat/mcp/auth-store.d.ts +0 -43
- package/dist/chat/mcp/client.d.ts +0 -40
- package/dist/chat/mcp/errors.d.ts +0 -32
- package/dist/chat/mcp/oauth-provider.d.ts +0 -30
- package/dist/chat/mcp/oauth.d.ts +0 -21
- package/dist/chat/mcp/tool-manager.d.ts +0 -95
- package/dist/chat/mcp/tool-name.d.ts +0 -2
- package/dist/chat/model-profile.d.ts +0 -34
- package/dist/chat/no-reply.d.ts +0 -6
- package/dist/chat/oauth-authorization.d.ts +0 -17
- package/dist/chat/oauth-flow.d.ts +0 -60
- package/dist/chat/oauth-response.d.ts +0 -21
- package/dist/chat/optional-string.d.ts +0 -5
- package/dist/chat/pi/client.d.ts +0 -62
- package/dist/chat/pi/conversation-events.d.ts +0 -38
- package/dist/chat/pi/gateway-auth.d.ts +0 -16
- package/dist/chat/pi/messages.d.ts +0 -19
- package/dist/chat/pi/sdk.d.ts +0 -7
- package/dist/chat/pi/sql-model-usage.d.ts +0 -13
- package/dist/chat/pi/traced-stream.d.ts +0 -13
- package/dist/chat/pi/transcript.d.ts +0 -52
- package/dist/chat/plugins/agent-hooks.d.ts +0 -89
- package/dist/chat/plugins/annotations.d.ts +0 -11
- package/dist/chat/plugins/auth/api-headers-broker.d.ts +0 -6
- package/dist/chat/plugins/auth/auth-token-placeholder.d.ts +0 -3
- package/dist/chat/plugins/auth/oauth-bearer-broker.d.ts +0 -6
- package/dist/chat/plugins/auth/oauth-request.d.ts +0 -26
- package/dist/chat/plugins/catalog-runtime.d.ts +0 -1
- package/dist/chat/plugins/command-env.d.ts +0 -3
- package/dist/chat/plugins/conversation-event-stats.d.ts +0 -3
- package/dist/chat/plugins/conversation-events.d.ts +0 -15
- package/dist/chat/plugins/conversation-sidebar.d.ts +0 -3
- package/dist/chat/plugins/credential-hooks.d.ts +0 -51
- package/dist/chat/plugins/inline-manifest-source.d.ts +0 -5
- package/dist/chat/plugins/logging.d.ts +0 -3
- package/dist/chat/plugins/manifest.d.ts +0 -5
- package/dist/chat/plugins/model.d.ts +0 -9
- package/dist/chat/plugins/package-discovery.d.ts +0 -20
- package/dist/chat/plugins/prompt.d.ts +0 -14
- package/dist/chat/plugins/registry.d.ts +0 -27
- package/dist/chat/plugins/state.d.ts +0 -4
- package/dist/chat/plugins/task-queue.d.ts +0 -42
- package/dist/chat/plugins/task-runner.d.ts +0 -12
- package/dist/chat/plugins/types.d.ts +0 -126
- package/dist/chat/plugins/unfinished-work.d.ts +0 -13
- package/dist/chat/plugins/user-pages.d.ts +0 -16
- package/dist/chat/plugins/validation.d.ts +0 -5
- package/dist/chat/plugins/viewer.d.ts +0 -24
- package/dist/chat/prompt.d.ts +0 -44
- package/dist/chat/providers/slack/input.d.ts +0 -32
- package/dist/chat/providers/slack/processing-reaction.d.ts +0 -21
- package/dist/chat/providers/slack/resume.d.ts +0 -73
- package/dist/chat/providers/slack/runtime.d.ts +0 -114
- package/dist/chat/providers/slack/system-turn.d.ts +0 -13
- package/dist/chat/providers/slack/turn.d.ts +0 -59
- package/dist/chat/queue/callback.d.ts +0 -26
- package/dist/chat/queue/sign.d.ts +0 -30
- package/dist/chat/reasoning-level.d.ts +0 -4
- package/dist/chat/repository-instructions.d.ts +0 -55
- package/dist/chat/resource-events/actor.d.ts +0 -36
- package/dist/chat/resource-events/app-publisher.d.ts +0 -18
- package/dist/chat/resource-events/catalog.d.ts +0 -52
- package/dist/chat/resource-events/ingest.d.ts +0 -10
- package/dist/chat/resource-events/notification.d.ts +0 -54
- package/dist/chat/resource-events/runtime-catalog.d.ts +0 -8
- package/dist/chat/resource-events/store.d.ts +0 -92
- package/dist/chat/resource-events/tool-support.d.ts +0 -9
- package/dist/chat/resource-events/workspace.d.ts +0 -8
- package/dist/chat/runtime/agent-run-outcome.d.ts +0 -29
- package/dist/chat/runtime/agent-runner.d.ts +0 -18
- package/dist/chat/runtime/auth-pause-state.d.ts +0 -11
- package/dist/chat/runtime/conversation-message.d.ts +0 -10
- package/dist/chat/runtime/delivered-turn-state.d.ts +0 -12
- package/dist/chat/runtime/dev-agent-trace.d.ts +0 -1
- package/dist/chat/runtime/report-progress.d.ts +0 -6
- package/dist/chat/runtime/request-deadline.d.ts +0 -8
- package/dist/chat/runtime/thread-context.d.ts +0 -29
- package/dist/chat/runtime/thread-state.d.ts +0 -25
- package/dist/chat/runtime/turn-execution.d.ts +0 -35
- package/dist/chat/runtime/turn-input.d.ts +0 -34
- package/dist/chat/runtime/turn-preparation.d.ts +0 -30
- package/dist/chat/runtime/turn-user-message.d.ts +0 -13
- package/dist/chat/runtime/turn.d.ts +0 -77
- package/dist/chat/sandbox/command-result.d.ts +0 -74
- package/dist/chat/sandbox/credentials.d.ts +0 -11
- package/dist/chat/sandbox/docker.d.ts +0 -17
- package/dist/chat/sandbox/egress/credentials.d.ts +0 -61
- package/dist/chat/sandbox/egress/oidc.d.ts +0 -3
- package/dist/chat/sandbox/egress/policy.d.ts +0 -32
- package/dist/chat/sandbox/egress/proxy.d.ts +0 -35
- package/dist/chat/sandbox/egress/schemas.d.ts +0 -187
- package/dist/chat/sandbox/egress/session.d.ts +0 -59
- package/dist/chat/sandbox/egress/signals.d.ts +0 -9
- package/dist/chat/sandbox/egress/tracing.d.ts +0 -7
- package/dist/chat/sandbox/errors.d.ts +0 -18
- package/dist/chat/sandbox/http-error-details.d.ts +0 -18
- package/dist/chat/sandbox/noninteractive-command.d.ts +0 -21
- package/dist/chat/sandbox/paths.d.ts +0 -8
- package/dist/chat/sandbox/prepare-workspace.d.ts +0 -35
- package/dist/chat/sandbox/ref.d.ts +0 -6
- package/dist/chat/sandbox/resources.d.ts +0 -15
- package/dist/chat/sandbox/runtime-dependencies.d.ts +0 -3
- package/dist/chat/sandbox/sandbox.d.ts +0 -45
- package/dist/chat/sandbox/session.d.ts +0 -50
- package/dist/chat/sandbox/skill-sandbox.d.ts +0 -42
- package/dist/chat/sandbox/skill-sync.d.ts +0 -16
- package/dist/chat/sandbox/snapshot/builder-sandbox.d.ts +0 -5
- package/dist/chat/sandbox/snapshot/events.d.ts +0 -30
- package/dist/chat/sandbox/snapshot/install.d.ts +0 -6
- package/dist/chat/sandbox/snapshot/job-callback.d.ts +0 -5
- package/dist/chat/sandbox/snapshot/job-queue.d.ts +0 -26
- package/dist/chat/sandbox/snapshot/job-runner.d.ts +0 -11
- package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +0 -11
- package/dist/chat/sandbox/snapshot/profile.d.ts +0 -15
- package/dist/chat/sandbox/snapshot/resolve.d.ts +0 -43
- package/dist/chat/sandbox/snapshot/runtime.d.ts +0 -2
- package/dist/chat/sandbox/snapshot/span.d.ts +0 -5
- package/dist/chat/sandbox/snapshot/store.d.ts +0 -31
- package/dist/chat/sandbox/snapshot/workspace.d.ts +0 -23
- package/dist/chat/sandbox/workspace.d.ts +0 -72
- package/dist/chat/scheduled-tasks/cadence.d.ts +0 -27
- package/dist/chat/scheduled-tasks/heartbeat.d.ts +0 -6
- package/dist/chat/scheduled-tasks/identity.d.ts +0 -6
- package/dist/chat/scheduled-tasks/personal.d.ts +0 -23
- package/dist/chat/scheduled-tasks/runs.d.ts +0 -49
- package/dist/chat/scheduled-tasks/schedule-intent.d.ts +0 -61
- package/dist/chat/scheduled-tasks/tasks.d.ts +0 -27
- package/dist/chat/scheduled-tasks/telemetry.d.ts +0 -7
- package/dist/chat/scheduled-tasks/tool-support.d.ts +0 -231
- package/dist/chat/scheduled-tasks/tools/create.d.ts +0 -95
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +0 -70
- package/dist/chat/scheduled-tasks/tools/list.d.ts +0 -71
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +0 -70
- package/dist/chat/scheduled-tasks/tools/update.d.ts +0 -97
- package/dist/chat/scheduled-tasks/tools.d.ts +0 -6
- package/dist/chat/scheduled-tasks/types.d.ts +0 -135
- package/dist/chat/sentry-links.d.ts +0 -6
- package/dist/chat/sentry-payload-filter.d.ts +0 -14
- package/dist/chat/sentry.d.ts +0 -3
- package/dist/chat/services/assistant-reply.d.ts +0 -16
- package/dist/chat/services/auth-pause-response.d.ts +0 -2
- package/dist/chat/services/auth-pause.d.ts +0 -24
- package/dist/chat/services/automated-turn-limit.d.ts +0 -89
- package/dist/chat/services/context-budget.d.ts +0 -19
- package/dist/chat/services/context-compaction-marker.d.ts +0 -8
- package/dist/chat/services/context-compaction.d.ts +0 -78
- package/dist/chat/services/conversation-memory.d.ts +0 -53
- package/dist/chat/services/conversation-title.d.ts +0 -20
- package/dist/chat/services/empty-output-continuation.d.ts +0 -20
- package/dist/chat/services/guardian-action-policy.d.ts +0 -12
- package/dist/chat/services/guardian-action-review.d.ts +0 -9
- package/dist/chat/services/mcp-auth-orchestration.d.ts +0 -42
- package/dist/chat/services/message-actor-identity.d.ts +0 -16
- package/dist/chat/services/pending-auth.d.ts +0 -44
- package/dist/chat/services/persist-retry.d.ts +0 -2
- package/dist/chat/services/plugin-auth-orchestration.d.ts +0 -56
- package/dist/chat/services/provider-default-config.d.ts +0 -9
- package/dist/chat/services/provider-error.d.ts +0 -42
- package/dist/chat/services/provider-retry.d.ts +0 -13
- package/dist/chat/services/short-title.d.ts +0 -25
- package/dist/chat/services/subscribed-decision.d.ts +0 -75
- package/dist/chat/services/subscribed-reply-policy.d.ts +0 -13
- package/dist/chat/services/subscribed-reply-router-policy.d.ts +0 -12
- package/dist/chat/services/turn-failure-response.d.ts +0 -24
- package/dist/chat/services/turn-limit.d.ts +0 -16
- package/dist/chat/services/turn-result.d.ts +0 -42
- package/dist/chat/services/turn-router.d.ts +0 -59
- package/dist/chat/services/turn-session-routing.d.ts +0 -35
- package/dist/chat/skills.d.ts +0 -47
- package/dist/chat/slack/action-token.d.ts +0 -6
- package/dist/chat/slack/adapter-context.d.ts +0 -25
- package/dist/chat/slack/adapter.d.ts +0 -9
- package/dist/chat/slack/app-home.d.ts +0 -11
- package/dist/chat/slack/assistant-thread/lifecycle.d.ts +0 -12
- package/dist/chat/slack/assistant-thread/status-render.d.ts +0 -28
- package/dist/chat/slack/assistant-thread/status-scheduler.d.ts +0 -24
- package/dist/chat/slack/assistant-thread/status-send.d.ts +0 -31
- package/dist/chat/slack/assistant-thread/status.d.ts +0 -36
- package/dist/chat/slack/assistant-thread/title.d.ts +0 -16
- package/dist/chat/slack/attachment-fetchers.d.ts +0 -11
- package/dist/chat/slack/automated-turn-limit-notice.d.ts +0 -16
- package/dist/chat/slack/canvas-references.d.ts +0 -2
- package/dist/chat/slack/channel.d.ts +0 -65
- package/dist/chat/slack/client.d.ts +0 -87
- package/dist/chat/slack/context.d.ts +0 -21
- package/dist/chat/slack/conversation-context.d.ts +0 -40
- package/dist/chat/slack/dashboard-link.d.ts +0 -11
- package/dist/chat/slack/dispatch-turn.d.ts +0 -24
- package/dist/chat/slack/emoji.d.ts +0 -1
- package/dist/chat/slack/errors.d.ts +0 -8
- package/dist/chat/slack/footer.d.ts +0 -46
- package/dist/chat/slack/id-param.d.ts +0 -25
- package/dist/chat/slack/ids.d.ts +0 -24
- package/dist/chat/slack/location-url.d.ts +0 -11
- package/dist/chat/slack/message/attachments.d.ts +0 -2
- package/dist/chat/slack/message/blocks.d.ts +0 -2
- package/dist/chat/slack/message/content.d.ts +0 -18
- package/dist/chat/slack/message/identity.d.ts +0 -7
- package/dist/chat/slack/message-control.d.ts +0 -2
- package/dist/chat/slack/mrkdwn.d.ts +0 -19
- package/dist/chat/slack/oauth-authorization-message.d.ts +0 -3
- package/dist/chat/slack/outbound.d.ts +0 -79
- package/dist/chat/slack/output.d.ts +0 -54
- package/dist/chat/slack/reply.d.ts +0 -19
- package/dist/chat/slack/status-format.d.ts +0 -2
- package/dist/chat/slack/team-domain.d.ts +0 -4
- package/dist/chat/slack/timestamp-param.d.ts +0 -23
- package/dist/chat/slack/timestamp.d.ts +0 -6
- package/dist/chat/slack/tool-support/canvas/api.d.ts +0 -38
- package/dist/chat/slack/tool-support/canvas/context.d.ts +0 -11
- package/dist/chat/slack/tool-support/canvas/markdown.d.ts +0 -9
- package/dist/chat/slack/tool-support/channel-access.d.ts +0 -42
- package/dist/chat/slack/tool-support/channel-capabilities.d.ts +0 -13
- package/dist/chat/slack/tool-support/channel-target.d.ts +0 -28
- package/dist/chat/slack/tool-support/context.d.ts +0 -15
- package/dist/chat/slack/tool-support/list/api.d.ts +0 -50
- package/dist/chat/slack/tool-support/list/params.d.ts +0 -5
- package/dist/chat/slack/tool-support/slack-message-url.d.ts +0 -18
- package/dist/chat/slack/tools/canvas/create.d.ts +0 -30
- package/dist/chat/slack/tools/canvas/edit.d.ts +0 -48
- package/dist/chat/slack/tools/canvas/read.d.ts +0 -51
- package/dist/chat/slack/tools/canvas/write.d.ts +0 -29
- package/dist/chat/slack/tools/channel-join.d.ts +0 -28
- package/dist/chat/slack/tools/channel-list-messages.d.ts +0 -34
- package/dist/chat/slack/tools/conversation-message-search.d.ts +0 -67
- package/dist/chat/slack/tools/list/add-items.d.ts +0 -31
- package/dist/chat/slack/tools/list/create.d.ts +0 -28
- package/dist/chat/slack/tools/list/get-items.d.ts +0 -28
- package/dist/chat/slack/tools/list/update-item.d.ts +0 -36
- package/dist/chat/slack/tools/message-add-reaction.d.ts +0 -29
- package/dist/chat/slack/tools/public-search.d.ts +0 -121
- package/dist/chat/slack/tools/send-files.d.ts +0 -53
- package/dist/chat/slack/tools/thread-read.d.ts +0 -32
- package/dist/chat/slack/user.d.ts +0 -11
- package/dist/chat/slack/users.d.ts +0 -40
- package/dist/chat/slack/vision-cache.d.ts +0 -5
- package/dist/chat/slack/vision-context.d.ts +0 -63
- package/dist/chat/slack/workspace-context.d.ts +0 -4
- package/dist/chat/sleep.d.ts +0 -2
- package/dist/chat/source.d.ts +0 -16
- package/dist/chat/state/adapter.d.ts +0 -10
- package/dist/chat/state/conversation.d.ts +0 -80
- package/dist/chat/state/locks.d.ts +0 -35
- package/dist/chat/state/ttl.d.ts +0 -2
- package/dist/chat/state/turn-id.d.ts +0 -4
- package/dist/chat/task-execution/assistant-message.d.ts +0 -32
- package/dist/chat/task-execution/checkpoint.d.ts +0 -86
- package/dist/chat/task-execution/conversation-turn.d.ts +0 -8
- package/dist/chat/task-execution/heartbeat.d.ts +0 -13
- package/dist/chat/task-execution/mailbox-input.d.ts +0 -3
- package/dist/chat/task-execution/mailbox-turn.d.ts +0 -52
- package/dist/chat/task-execution/paused-turn.d.ts +0 -27
- package/dist/chat/task-execution/queue-signing.d.ts +0 -17
- package/dist/chat/task-execution/queue.d.ts +0 -33
- package/dist/chat/task-execution/slack-work.d.ts +0 -274
- package/dist/chat/task-execution/state.d.ts +0 -410
- package/dist/chat/task-execution/store.d.ts +0 -248
- package/dist/chat/task-execution/turn-cursor-keys.d.ts +0 -6
- package/dist/chat/task-execution/turn-cursor.d.ts +0 -165
- package/dist/chat/task-execution/turn-wake.d.ts +0 -41
- package/dist/chat/task-execution/vercel-callback.d.ts +0 -27
- package/dist/chat/task-execution/vercel-queue.d.ts +0 -19
- package/dist/chat/task-execution/worker.d.ts +0 -42
- package/dist/chat/task-input.d.ts +0 -22
- package/dist/chat/tasks/execution-stats.d.ts +0 -105
- package/dist/chat/tasks/read.d.ts +0 -22
- package/dist/chat/tool-exposure.d.ts +0 -10
- package/dist/chat/tool-support/action-review-evidence.d.ts +0 -4
- package/dist/chat/tool-support/action-review-history.d.ts +0 -117
- package/dist/chat/tool-support/action-review.d.ts +0 -143
- package/dist/chat/tool-support/catalog-tool-call.d.ts +0 -10
- package/dist/chat/tool-support/normalize-result.d.ts +0 -9
- package/dist/chat/tool-support/pi-tool-adapter.d.ts +0 -13
- package/dist/chat/tool-support/private-trace-result.d.ts +0 -4
- package/dist/chat/tool-support/skill/mcp-tool-summary.d.ts +0 -20
- package/dist/chat/tool-support/structured-result.d.ts +0 -44
- package/dist/chat/tool-support/text-range-result.d.ts +0 -37
- package/dist/chat/tool-support/timed-out-tool-result.d.ts +0 -11
- package/dist/chat/tool-support/tool-execution-report.d.ts +0 -8
- package/dist/chat/tool-support/zod-tool.d.ts +0 -46
- package/dist/chat/tools/create-event-task.d.ts +0 -71
- package/dist/chat/tools/definition.d.ts +0 -122
- package/dist/chat/tools/delete-event-task.d.ts +0 -61
- package/dist/chat/tools/event-tasks.d.ts +0 -5
- package/dist/chat/tools/execute-tool.d.ts +0 -11
- package/dist/chat/tools/execution/build-sandbox-input.d.ts +0 -2
- package/dist/chat/tools/execution/tool-error-handler.d.ts +0 -4
- package/dist/chat/tools/execution/tool-input-error.d.ts +0 -6
- package/dist/chat/tools/handoff/tool.d.ts +0 -31
- package/dist/chat/tools/idempotency.d.ts +0 -1
- package/dist/chat/tools/index.d.ts +0 -11
- package/dist/chat/tools/list-event-tasks.d.ts +0 -59
- package/dist/chat/tools/list-resource-event-subscriptions.d.ts +0 -46
- package/dist/chat/tools/publish-image.d.ts +0 -44
- package/dist/chat/tools/resource-events.d.ts +0 -5
- package/dist/chat/tools/runtime/report-progress.d.ts +0 -27
- package/dist/chat/tools/runtime/spawn-agent.d.ts +0 -33
- package/dist/chat/tools/sandbox/bash.d.ts +0 -11
- package/dist/chat/tools/sandbox/edit-file.d.ts +0 -43
- package/dist/chat/tools/sandbox/file-uploads.d.ts +0 -52
- package/dist/chat/tools/sandbox/file-utils.d.ts +0 -64
- package/dist/chat/tools/sandbox/find-files.d.ts +0 -33
- package/dist/chat/tools/sandbox/generated-artifacts.d.ts +0 -16
- package/dist/chat/tools/sandbox/grep.d.ts +0 -51
- package/dist/chat/tools/sandbox/list-dir.d.ts +0 -35
- package/dist/chat/tools/sandbox/read-file.d.ts +0 -12
- package/dist/chat/tools/sandbox/text-edits.d.ts +0 -29
- package/dist/chat/tools/sandbox/view-image.d.ts +0 -11
- package/dist/chat/tools/sandbox/write-file.d.ts +0 -10
- package/dist/chat/tools/scheduled-tasks.d.ts +0 -4
- package/dist/chat/tools/search-conversation-events.d.ts +0 -56
- package/dist/chat/tools/search-resource-event-types.d.ts +0 -56
- package/dist/chat/tools/search-tools.d.ts +0 -71
- package/dist/chat/tools/skill/call-mcp-tool.d.ts +0 -16
- package/dist/chat/tools/skill/load-skill.d.ts +0 -39
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +0 -81
- package/dist/chat/tools/stop-watching-resources.d.ts +0 -30
- package/dist/chat/tools/system-time.d.ts +0 -42
- package/dist/chat/tools/types.d.ts +0 -129
- package/dist/chat/tools/unpublish-image.d.ts +0 -35
- package/dist/chat/tools/update-event-task.d.ts +0 -71
- package/dist/chat/tools/user-lookup.d.ts +0 -29
- package/dist/chat/tools/watch-resource-events.d.ts +0 -64
- package/dist/chat/tools/web/constants.d.ts +0 -6
- package/dist/chat/tools/web/fetch-content.d.ts +0 -28
- package/dist/chat/tools/web/fetch-tool.d.ts +0 -31
- package/dist/chat/tools/web/image-generate.d.ts +0 -51
- package/dist/chat/tools/web/network.d.ts +0 -6
- package/dist/chat/tools/web/search.d.ts +0 -28
- package/dist/chat/turn-context-tag.d.ts +0 -6
- package/dist/chat/usage.d.ts +0 -42
- package/dist/chat/vercel-queue-client.d.ts +0 -3
- package/dist/chat/workspaces/checkout-path.d.ts +0 -4
- package/dist/chat/workspaces/store.d.ts +0 -35
- package/dist/chat/workspaces/tools.d.ts +0 -4
- package/dist/chat/workspaces/types.d.ts +0 -36
- package/dist/chat/workspaces/validation.d.ts +0 -20
- package/dist/chat/xml.d.ts +0 -3
- package/dist/db/db.d.ts +0 -27
- package/dist/db/executor.d.ts +0 -8
- package/dist/db/neon.d.ts +0 -8
- package/dist/db/postgres-json.d.ts +0 -5
- package/dist/db/postgres.d.ts +0 -7
- package/dist/db/schema/agent-invocations.d.ts +0 -592
- package/dist/db/schema/api-tokens.d.ts +0 -160
- package/dist/db/schema/artifacts.d.ts +0 -178
- package/dist/db/schema/attachments.d.ts +0 -178
- package/dist/db/schema/code.d.ts +0 -367
- package/dist/db/schema/conversation-annotations.d.ts +0 -142
- package/dist/db/schema/conversation-bindings.d.ts +0 -110
- package/dist/db/schema/conversation-events.d.ts +0 -170
- package/dist/db/schema/conversation-participants.d.ts +0 -80
- package/dist/db/schema/conversations.d.ts +0 -1341
- package/dist/db/schema/destinations.d.ts +0 -209
- package/dist/db/schema/event-tasks.d.ts +0 -150
- package/dist/db/schema/identities.d.ts +0 -265
- package/dist/db/schema/location-configurations.d.ts +0 -127
- package/dist/db/schema/scheduled-tasks.d.ts +0 -298
- package/dist/db/schema/snapshots.d.ts +0 -271
- package/dist/db/schema/stats.d.ts +0 -97
- package/dist/db/schema/task-executions.d.ts +0 -131
- package/dist/db/schema/timestamps.d.ts +0 -1
- package/dist/db/schema/users.d.ts +0 -109
- package/dist/db/schema/workspaces.d.ts +0 -152
- package/dist/db/schema.d.ts +0 -4436
- package/dist/deployment.d.ts +0 -12
- package/dist/handlers/artifacts.d.ts +0 -8
- package/dist/handlers/health.d.ts +0 -7
- package/dist/handlers/heartbeat.d.ts +0 -7
- package/dist/handlers/mcp-oauth-callback.d.ts +0 -10
- package/dist/handlers/oauth-callback.d.ts +0 -10
- package/dist/handlers/oauth-html.d.ts +0 -4
- package/dist/handlers/retention.d.ts +0 -9
- package/dist/handlers/sandbox-egress-proxy.d.ts +0 -11
- package/dist/handlers/sandbox-egress-route.d.ts +0 -4
- package/dist/handlers/sandbox-egress-signals.d.ts +0 -4
- package/dist/handlers/slack-webhook.d.ts +0 -4
- package/dist/handlers/types.d.ts +0 -2
- package/dist/handlers/webhooks.d.ts +0 -12
- package/dist/package-resolution.d.ts +0 -13
- package/dist/personal-tokens/store.d.ts +0 -27
- package/dist/plugin-module.d.ts +0 -21
- package/dist/plugins.d.ts +0 -26
- package/dist/reporting-schema.d.ts +0 -194
- package/dist/reporting.d.ts +0 -12
- package/dist/spawn-GA5MADGU.js +0 -42
- package/dist/stats.d.ts +0 -18
- package/dist/task-runner-7IIYO44C.js +0 -36
- package/dist/usage-schema.d.ts +0 -25
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { MessageHistory } from "./history";
|
|
2
|
-
import type { ConversationMessage } from "@/chat/state/conversation";
|
|
3
|
-
/** Reduce a boundary-bearing message-history suffix into destination history. */
|
|
4
|
-
export declare function projectConversationMessages(history: Pick<MessageHistory, "events" | "historyFromSeq">): ConversationMessage[];
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** One relevant chat-message match from a prior conversation. */
|
|
2
|
-
export interface ConversationMessageSearchResult {
|
|
3
|
-
channelName?: string;
|
|
4
|
-
conversationId: string;
|
|
5
|
-
excerpt: string;
|
|
6
|
-
messageCreatedAtMs: number;
|
|
7
|
-
messageId: string;
|
|
8
|
-
providerDestinationId: string;
|
|
9
|
-
role: "assistant" | "user";
|
|
10
|
-
}
|
|
11
|
-
/** Runtime-derived public workspace scope for cross-conversation search. */
|
|
12
|
-
export interface ConversationMessageSearchScope {
|
|
13
|
-
kind: "public_provider_tenant";
|
|
14
|
-
provider: "slack";
|
|
15
|
-
providerTenantId: string;
|
|
16
|
-
}
|
|
17
|
-
/** Optional filters that narrow retained public workspace search. */
|
|
18
|
-
export interface ConversationMessageSearchFilters {
|
|
19
|
-
/** Only conversations active at or after this time. */
|
|
20
|
-
afterMs?: number;
|
|
21
|
-
/** Annotation key, matched case-insensitively. Nested keys may continue with `#`. */
|
|
22
|
-
annotation?: string;
|
|
23
|
-
/** Only conversations active before this time. */
|
|
24
|
-
beforeMs?: number;
|
|
25
|
-
/** Slack channel id of the conversation destination. */
|
|
26
|
-
channelId?: string;
|
|
27
|
-
/** Full-text query over retained visible message text. */
|
|
28
|
-
query?: string;
|
|
29
|
-
}
|
|
30
|
-
/** Search retained public messages within an authorized workspace. */
|
|
31
|
-
export interface ConversationMessageSearchStore {
|
|
32
|
-
search(args: {
|
|
33
|
-
currentConversationId: string;
|
|
34
|
-
filters: ConversationMessageSearchFilters;
|
|
35
|
-
limit: number;
|
|
36
|
-
scope: ConversationMessageSearchScope;
|
|
37
|
-
}): Promise<ConversationMessageSearchResult[]>;
|
|
38
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ConversationEvent } from "./history";
|
|
2
|
-
import type { ConversationCompaction, ThreadConversationState } from "@/chat/state/conversation";
|
|
3
|
-
/** Project the latest source-message summary snapshot from event history. */
|
|
4
|
-
export declare function projectConversationMessageSummaries(events: ConversationEvent[]): ConversationCompaction[];
|
|
5
|
-
/** Persist a changed source-message summary snapshot in event history. */
|
|
6
|
-
export declare function persistConversationMessageSummaries(args: {
|
|
7
|
-
conversation: ThreadConversationState;
|
|
8
|
-
conversationId: string;
|
|
9
|
-
}): Promise<void>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ConversationMessage, ThreadConversationState } from "@/chat/state/conversation";
|
|
2
|
-
import type { ConversationEventStore } from "./history";
|
|
3
|
-
/** Author role of a visible conversation message. */
|
|
4
|
-
export type ConversationMessageRole = "user" | "assistant" | "system";
|
|
5
|
-
/** A source message to record; identity is `(conversationId, messageId)`. */
|
|
6
|
-
export interface NewConversationMessage {
|
|
7
|
-
messageId: string;
|
|
8
|
-
role: ConversationMessageRole;
|
|
9
|
-
text: string;
|
|
10
|
-
authorIdentityId?: string;
|
|
11
|
-
meta?: Record<string, unknown>;
|
|
12
|
-
createdAtMs: number;
|
|
13
|
-
}
|
|
14
|
-
/** Serialize one in-memory message into its event-backed write shape. */
|
|
15
|
-
export declare function toStoredConversationMessage(message: ConversationMessage): NewConversationMessage;
|
|
16
|
-
/** Hydrate the current message working set from canonical conversation events. */
|
|
17
|
-
export declare function hydrateConversationMessages(args: {
|
|
18
|
-
conversation: ThreadConversationState;
|
|
19
|
-
conversationId: string | undefined;
|
|
20
|
-
}): Promise<void>;
|
|
21
|
-
/** Append new messages and handled markers idempotently. */
|
|
22
|
-
export declare function persistConversationMessages(args: {
|
|
23
|
-
conversation: ThreadConversationState;
|
|
24
|
-
conversationId: string | undefined;
|
|
25
|
-
repliedAtMs?: number;
|
|
26
|
-
}): Promise<void>;
|
|
27
|
-
/** Append visible message facts through a caller-owned event-store transaction. */
|
|
28
|
-
export declare function appendConversationMessages(eventStore: ConversationEventStore, args: {
|
|
29
|
-
conversation: ThreadConversationState;
|
|
30
|
-
conversationId: string;
|
|
31
|
-
repliedAtMs?: number;
|
|
32
|
-
}): Promise<void>;
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { type PiMessage } from "@/chat/pi/messages";
|
|
2
|
-
import { type ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
3
|
-
import type { AuthorizationKind, ConversationEvent } from "@/chat/conversations/history";
|
|
4
|
-
import type { RepositoryInstructions } from "@/chat/repository-instructions";
|
|
5
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
6
|
-
import { type ProviderConversationReference } from "@/chat/conversations/sql/bindings";
|
|
7
|
-
import { type PiConversationEventProjection, type PiConversationProjection } from "@/chat/pi/conversation-events";
|
|
8
|
-
import type { ModelProfile } from "@/chat/model-profile";
|
|
9
|
-
import type { TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
10
|
-
import type { PluginTurnContext } from "@/chat/plugins/prompt";
|
|
11
|
-
import type { ThreadConversationState } from "@/chat/state/conversation";
|
|
12
|
-
import type { AssistantMessage } from "@earendil-works/pi-ai";
|
|
13
|
-
/** A checkpoint tried to replace already committed agent history. */
|
|
14
|
-
export declare class AgentHistoryBranchError extends Error {
|
|
15
|
-
constructor(conversationId: string);
|
|
16
|
-
}
|
|
17
|
-
interface ScopedConversation {
|
|
18
|
-
conversationId: string;
|
|
19
|
-
}
|
|
20
|
-
/** Load the current Pi agent history for a conversation. */
|
|
21
|
-
export declare function loadProjection(args: ScopedConversation): Promise<PiMessage[]>;
|
|
22
|
-
/** Load current Pi context with aligned provenance and source event sequences. */
|
|
23
|
-
export declare function loadConversationProjection(args: ScopedConversation): Promise<PiConversationEventProjection>;
|
|
24
|
-
/** Load the active Pi projection before a conversation's next request. */
|
|
25
|
-
export declare function openConversationProjection(args: ScopedConversation): Promise<PiConversationProjection>;
|
|
26
|
-
/**
|
|
27
|
-
* Load a turn's committed Pi projection from the durable event store.
|
|
28
|
-
*
|
|
29
|
-
* The record stays pinned to the history version containing its committed
|
|
30
|
-
* boundary, so later compaction cannot rewrite what a stale record resumes
|
|
31
|
-
* from. Unfinished records (`includeTail`) also see that version's tail so
|
|
32
|
-
* parked input appended after the last safe boundary is model-visible. Terminal records
|
|
33
|
-
* reproduce exactly the boundary they committed by cutting at `committedSeq`.
|
|
34
|
-
* Returns undefined when the committed boundary no longer exists (purged
|
|
35
|
-
* history) so callers fail closed.
|
|
36
|
-
*/
|
|
37
|
-
export declare function loadTurnProjection(args: {
|
|
38
|
-
conversationId: string;
|
|
39
|
-
committedSeq: number;
|
|
40
|
-
includeTail: boolean;
|
|
41
|
-
}): Promise<PiConversationEventProjection | undefined>;
|
|
42
|
-
/** Load MCP providers the credential subject connected in this conversation. */
|
|
43
|
-
export declare function loadConnectedMcpProviders(args: {
|
|
44
|
-
conversationId: string;
|
|
45
|
-
credentialSubjectId: string;
|
|
46
|
-
}): Promise<string[]>;
|
|
47
|
-
/**
|
|
48
|
-
* Append newly stable native history items.
|
|
49
|
-
*
|
|
50
|
-
* Checkpoints are append-only against the durable identity of the committed
|
|
51
|
-
* prefix (role, timestamp, content; tool results also match call id). A shorter
|
|
52
|
-
* history or a true content branch is rejected — only compaction and handoff may
|
|
53
|
-
* intentionally replace active model history. In-place Pi mutations of already
|
|
54
|
-
* committed assistant envelopes (usage/stopReason) do not block the suffix.
|
|
55
|
-
*/
|
|
56
|
-
export declare function commitMessages(args: {
|
|
57
|
-
conversationId: string;
|
|
58
|
-
messages: PiMessage[];
|
|
59
|
-
/** Explicit per-message provenance aligned one-to-one with `messages`. */
|
|
60
|
-
provenance?: ConversationMessageProvenance[];
|
|
61
|
-
/** Explicit provenance for the trailing newly committed messages. */
|
|
62
|
-
trailingMessageProvenance?: ConversationMessageProvenance[];
|
|
63
|
-
/** Default applied to the last new user message when no explicit array. */
|
|
64
|
-
newMessageProvenance?: ConversationMessageProvenance;
|
|
65
|
-
/** Structured plugin context committed atomically with this turn's input. */
|
|
66
|
-
turnContext?: {
|
|
67
|
-
contexts: PluginTurnContext[];
|
|
68
|
-
turnId: string;
|
|
69
|
-
};
|
|
70
|
-
/** SQL authority for the atomic commit; defaults to the process executor. */
|
|
71
|
-
executor?: JuniorSqlDatabase;
|
|
72
|
-
}): Promise<{
|
|
73
|
-
committedSeq: number;
|
|
74
|
-
historyVersion: number;
|
|
75
|
-
/** Event sequence for every projected agent history item. */
|
|
76
|
-
messageSeqs: number[];
|
|
77
|
-
/** Normalized durable messages after volatile runtime context is removed. */
|
|
78
|
-
messages: PiMessage[];
|
|
79
|
-
provenance: ConversationMessageProvenance[];
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* Commit an accepted agent reply and its visible message in causal order.
|
|
83
|
-
*
|
|
84
|
-
* The destination has already accepted the reply. One transaction prevents
|
|
85
|
-
* reporting from observing the visible reply before the agent message that
|
|
86
|
-
* produced it.
|
|
87
|
-
*/
|
|
88
|
-
export declare function commitAcceptedReply(args: {
|
|
89
|
-
agentMessage?: AssistantMessage;
|
|
90
|
-
conversation: ThreadConversationState;
|
|
91
|
-
conversationMessageId: string;
|
|
92
|
-
conversationId: string;
|
|
93
|
-
providerConversationBindings?: ProviderConversationReference[];
|
|
94
|
-
repliedAtMs?: number;
|
|
95
|
-
}): Promise<void>;
|
|
96
|
-
/** Record a successful MCP provider connection for one credential subject without duplicating it. */
|
|
97
|
-
export declare function recordMcpProviderConnected(args: {
|
|
98
|
-
conversationId: string;
|
|
99
|
-
provider: string;
|
|
100
|
-
credentialSubjectId: string;
|
|
101
|
-
}): Promise<void>;
|
|
102
|
-
/** Record that an OAuth/MCP authorization link was delivered or reused. */
|
|
103
|
-
export declare function recordAuthorizationRequested(args: {
|
|
104
|
-
conversationId: string;
|
|
105
|
-
kind: AuthorizationKind;
|
|
106
|
-
provider: string;
|
|
107
|
-
actorId: string;
|
|
108
|
-
authorizationId: string;
|
|
109
|
-
delivery: "private_link_sent" | "private_link_reused";
|
|
110
|
-
}): Promise<void>;
|
|
111
|
-
/** Record completed authorization as a chronological host observation for Pi. */
|
|
112
|
-
export declare function recordAuthorizationCompleted(args: {
|
|
113
|
-
conversationId: string;
|
|
114
|
-
kind: AuthorizationKind;
|
|
115
|
-
provider: string;
|
|
116
|
-
actorId: string;
|
|
117
|
-
authorizationId: string;
|
|
118
|
-
}): Promise<void>;
|
|
119
|
-
type AuthenticationAccountChangeArgs = {
|
|
120
|
-
accountLabel?: string;
|
|
121
|
-
actorId: string;
|
|
122
|
-
authorizationId?: string;
|
|
123
|
-
conversationId: string;
|
|
124
|
-
provider: string;
|
|
125
|
-
providerLabel?: string;
|
|
126
|
-
turnId?: string;
|
|
127
|
-
};
|
|
128
|
-
/** Record a successful conversation-bound account link as host transcript metadata. */
|
|
129
|
-
export declare function recordAuthenticationLinked(args: AuthenticationAccountChangeArgs): Promise<void>;
|
|
130
|
-
/** Record a successful conversation-bound account unlink as host transcript metadata. */
|
|
131
|
-
export declare function recordAuthenticationUnlinked(args: AuthenticationAccountChangeArgs): Promise<void>;
|
|
132
|
-
type AgentsInstructionsTransitionArgs = {
|
|
133
|
-
conversationId: string;
|
|
134
|
-
instructions?: RepositoryInstructions;
|
|
135
|
-
turnId: string;
|
|
136
|
-
};
|
|
137
|
-
/** Record one AGENTS.md bootstrap transition as host transcript metadata. */
|
|
138
|
-
export declare function recordAgentsInstructionsUpdated(args: AgentsInstructionsTransitionArgs): Promise<void>;
|
|
139
|
-
/** Record a model-backed subscribed reply route, including no-reply outcomes. */
|
|
140
|
-
export declare function recordSubscribedReplyRoute(args: {
|
|
141
|
-
conversationId: string;
|
|
142
|
-
costUsd: number;
|
|
143
|
-
reason: string;
|
|
144
|
-
runId: string;
|
|
145
|
-
shouldReply: boolean;
|
|
146
|
-
shouldUnsubscribe?: boolean;
|
|
147
|
-
}): Promise<void>;
|
|
148
|
-
/** Load a previously selected model profile for a resumed turn. */
|
|
149
|
-
export declare function loadTurnRoute(args: {
|
|
150
|
-
conversationId: string;
|
|
151
|
-
turnId: string;
|
|
152
|
-
}): Promise<(Extract<ConversationEvent["data"], {
|
|
153
|
-
type: "turn_routed";
|
|
154
|
-
}> & {
|
|
155
|
-
seq: number;
|
|
156
|
-
}) | undefined>;
|
|
157
|
-
/** Record the model profile selected for one turn without changing agent history. */
|
|
158
|
-
export declare function recordTurnRoute(args: {
|
|
159
|
-
conversationId: string;
|
|
160
|
-
turnId: string;
|
|
161
|
-
modelProfile: ModelProfile;
|
|
162
|
-
modelId: string;
|
|
163
|
-
costUsd?: number;
|
|
164
|
-
reasoningLevel: TurnReasoningLevel;
|
|
165
|
-
confidence?: number;
|
|
166
|
-
source: "configured" | "inherited" | "router";
|
|
167
|
-
}): Promise<void>;
|
|
168
|
-
/** Record a host-observed parent tool start without adding it to Pi replay. */
|
|
169
|
-
export declare function recordToolExecutionStarted(args: {
|
|
170
|
-
conversationId: string;
|
|
171
|
-
createdAtMs?: number;
|
|
172
|
-
toolCallId: string;
|
|
173
|
-
toolName: string;
|
|
174
|
-
}): Promise<void>;
|
|
175
|
-
/** Record files delivered for humans without adding them to Pi replay. */
|
|
176
|
-
export declare function recordAttachmentsDelivered(args: {
|
|
177
|
-
attachments: Array<{
|
|
178
|
-
bytes: number;
|
|
179
|
-
contentType: string;
|
|
180
|
-
filename: string;
|
|
181
|
-
id: string;
|
|
182
|
-
}>;
|
|
183
|
-
conversationId: string;
|
|
184
|
-
createdAtMs?: number;
|
|
185
|
-
toolCallId?: string;
|
|
186
|
-
turnId?: string;
|
|
187
|
-
}): Promise<void>;
|
|
188
|
-
/** Record one privacy-safe Guardian decision before the reviewed action continues. */
|
|
189
|
-
export declare function recordGuardianActionReviewed(args: {
|
|
190
|
-
conversationId: string;
|
|
191
|
-
turnId: string;
|
|
192
|
-
toolCallId: string;
|
|
193
|
-
toolName: string;
|
|
194
|
-
costUsd?: number;
|
|
195
|
-
decision: "allow" | "ask" | "deny";
|
|
196
|
-
riskLevel: "low" | "medium" | "high" | "critical";
|
|
197
|
-
userAuthorization: "high" | "medium" | "low" | "unknown";
|
|
198
|
-
}): Promise<void>;
|
|
199
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Durable message attribution shared by storage and projections.
|
|
3
|
-
* Attribution never grants credential authority.
|
|
4
|
-
*/
|
|
5
|
-
import { type Actor } from "@sentry/junior-plugin-api";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
declare const conversationMessageAuthoritySchema: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
8
|
-
/** Canonical authority and actor metadata for one durable message event. */
|
|
9
|
-
export declare const conversationMessageProvenanceSchema: z.ZodObject<{
|
|
10
|
-
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
11
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
|
-
platform: z.ZodLiteral<"slack">;
|
|
13
|
-
teamId: z.ZodString;
|
|
14
|
-
email: z.ZodOptional<z.ZodString>;
|
|
15
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
16
|
-
userId: z.ZodString;
|
|
17
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
18
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
-
platform: z.ZodLiteral<"local">;
|
|
20
|
-
email: z.ZodOptional<z.ZodString>;
|
|
21
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
22
|
-
userId: z.ZodString;
|
|
23
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
-
platform: z.ZodLiteral<"web">;
|
|
26
|
-
email: z.ZodOptional<z.ZodString>;
|
|
27
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
28
|
-
userId: z.ZodString;
|
|
29
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
30
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
-
platform: z.ZodLiteral<"system">;
|
|
32
|
-
name: z.ZodString;
|
|
33
|
-
}, z.core.$strict>], "platform">>;
|
|
34
|
-
}, z.core.$strict>;
|
|
35
|
-
/** Whether a message is a durable instruction or ambient conversation context. */
|
|
36
|
-
export type ConversationMessageAuthority = z.output<typeof conversationMessageAuthoritySchema>;
|
|
37
|
-
/** Actor and authority metadata aligned with one durable message event. */
|
|
38
|
-
export type ConversationMessageProvenance = z.output<typeof conversationMessageProvenanceSchema>;
|
|
39
|
-
/** Build instruction provenance for an optional actor. */
|
|
40
|
-
export declare function instructionProvenanceFor(actor: Actor | undefined): ConversationMessageProvenance;
|
|
41
|
-
/** Unattributed ambient-context provenance for non-instruction messages. */
|
|
42
|
-
export declare const contextProvenance: ConversationMessageProvenance;
|
|
43
|
-
/** Compare two actors by runtime identity only, never by display metadata. */
|
|
44
|
-
export declare function sameActorIdentity(left: Actor | undefined, right: Actor | undefined): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Return distinct instruction actors in first-seen order for attribution only.
|
|
47
|
-
* Never use this list as credential authority.
|
|
48
|
-
*/
|
|
49
|
-
export declare function instructionActors(provenance: ConversationMessageProvenance[]): Actor[];
|
|
50
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { AttachmentStorage } from "@/chat/attachments/storage";
|
|
2
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
3
|
-
/** Content retention windows keyed by resolved conversation visibility. */
|
|
4
|
-
export declare const CONTENT_RETENTION_MS: {
|
|
5
|
-
readonly public: number;
|
|
6
|
-
readonly private: number;
|
|
7
|
-
};
|
|
8
|
-
/** Aggregate outcome of one bounded retention purge batch. */
|
|
9
|
-
export interface RetentionPurgeResult {
|
|
10
|
-
/** Attachment blobs removed after conversation content was purged. */
|
|
11
|
-
attachments: number;
|
|
12
|
-
/** Root conversations examined and attempted this run. */
|
|
13
|
-
scanned: number;
|
|
14
|
-
/** Root trees successfully purged. */
|
|
15
|
-
purged: number;
|
|
16
|
-
/** Root trees whose purge failed and were skipped. */
|
|
17
|
-
failed: number;
|
|
18
|
-
/** Total conversation rows (roots plus descendants) stamped by the purge. */
|
|
19
|
-
conversations: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Run one bounded retention purge batch: delete expired root conversation trees
|
|
23
|
-
* oldest-activity-first. Each tree is purged transactionally in isolation, so a
|
|
24
|
-
* single failing tree is logged and skipped without aborting the batch, and the
|
|
25
|
-
* remainder of an over-limit backlog is left for the next run.
|
|
26
|
-
*/
|
|
27
|
-
export declare function runRetentionPurge(executor: JuniorSqlDatabase, args: {
|
|
28
|
-
attachmentStorage?: AttachmentStorage;
|
|
29
|
-
nowMs: number;
|
|
30
|
-
limit?: number;
|
|
31
|
-
}): Promise<RetentionPurgeResult>;
|
|
32
|
-
/**
|
|
33
|
-
* Erase one conversation's content and descendants immediately, regardless of
|
|
34
|
-
* age, applying the same visibility-based metadata scrubbing as the purge job.
|
|
35
|
-
* The scrub decision uses the root's resolved visibility so erasing a child
|
|
36
|
-
* still fails closed to private for a private root.
|
|
37
|
-
*/
|
|
38
|
-
export declare function purgeConversation(executor: JuniorSqlDatabase, conversationId: string, opts?: {
|
|
39
|
-
nowMs?: number;
|
|
40
|
-
}): Promise<void>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { StoredSlackActor } from "@/chat/actor";
|
|
2
|
-
import type { IdentityUpsert } from "@/chat/identities/identity";
|
|
3
|
-
import type { Conversation, ConversationSource } from "../store";
|
|
4
|
-
import type { juniorIdentities } from "@/db/schema";
|
|
5
|
-
type IdentityRow = typeof juniorIdentities.$inferSelect;
|
|
6
|
-
/** Build a durable identity observation from a stored conversation actor. */
|
|
7
|
-
export declare function identityFromActor(actor: StoredSlackActor | undefined): IdentityUpsert | undefined;
|
|
8
|
-
/** Build a system identity when a conversation has no user actor. */
|
|
9
|
-
export declare function systemIdentityFromSource(source: ConversationSource | undefined): IdentityUpsert | undefined;
|
|
10
|
-
/** Prefer the user actor identity, else a source-derived system identity. */
|
|
11
|
-
export declare function actorIdentityForConversation(conversation: Conversation): IdentityUpsert | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Reconstruct a stored actor with the linked user name and identity-scoped
|
|
14
|
-
* provider fields.
|
|
15
|
-
*/
|
|
16
|
-
export declare function actorFromIdentityRow(identity: IdentityRow | null, userDisplayName: string | null): StoredSlackActor | undefined;
|
|
17
|
-
/** Merge later actor observations without replacing a durable Slack subject. */
|
|
18
|
-
export declare function mergeActor(current: StoredSlackActor | undefined, next: StoredSlackActor | undefined): StoredSlackActor | undefined;
|
|
19
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
export interface ProviderConversationBinding {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
provider: string;
|
|
5
|
-
providerDestinationId: string;
|
|
6
|
-
providerTenantId: string;
|
|
7
|
-
providerConversationId: string;
|
|
8
|
-
}
|
|
9
|
-
export type ProviderConversationReference = Omit<ProviderConversationBinding, "conversationId">;
|
|
10
|
-
/** Resolve the durable conversation bound to provider-owned coordinates. */
|
|
11
|
-
export declare function getConversationIdByProviderConversation(executor: JuniorSqlDatabase, args: ProviderConversationReference): Promise<string | undefined>;
|
|
12
|
-
/** Bind provider coordinates to a durable conversation in the caller's SQL scope. */
|
|
13
|
-
export declare function bindProviderConversation(executor: JuniorSqlDatabase, args: ProviderConversationBinding): Promise<void>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
/**
|
|
3
|
-
* Establish the conversation metadata row on first contact for content writes
|
|
4
|
-
* (conversation events, visible transcript) that can land before activity has
|
|
5
|
-
* created the row, and whose tables FK to it.
|
|
6
|
-
*
|
|
7
|
-
* First contact creates the row; every later content write advances the
|
|
8
|
-
* activity clock so retention mirrors append-refresh semantics (each content
|
|
9
|
-
* append refreshes the retention window). Background observations may opt out
|
|
10
|
-
* and leave an existing row unchanged. The timestamp is content-intrinsic (the
|
|
11
|
-
* first item's `createdAtMs`), and `greatest(...)` guarantees a backfilled or
|
|
12
|
-
* imported historical write — which carries an old timestamp — can never
|
|
13
|
-
* regress `last_activity_at`.
|
|
14
|
-
*/
|
|
15
|
-
export declare function ensureConversationRow(executor: JuniorSqlDatabase, conversationId: string, atMs: number, options?: {
|
|
16
|
-
activity?: "preserve";
|
|
17
|
-
}): Promise<void>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
import type { ConversationEventData } from "../history";
|
|
3
|
-
/**
|
|
4
|
-
* Resolve the durable actor identity for one event payload.
|
|
5
|
-
* Human user messages get an identity when author data is enough; other events
|
|
6
|
-
* keep a null actor.
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolveEventActorIdentityId(executor: JuniorSqlDatabase, args: {
|
|
9
|
-
conversationId: string;
|
|
10
|
-
data: ConversationEventData;
|
|
11
|
-
nowMs: number;
|
|
12
|
-
}): Promise<string | undefined>;
|
|
13
|
-
/** Drop payload-only authorIdentityId after lifting it onto the event column. */
|
|
14
|
-
export declare function stripPayloadAuthorIdentityId(data: ConversationEventData): ConversationEventData;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
import { type ConversationEventStore } from "../history";
|
|
3
|
-
/** Create a SQL-backed canonical conversation event store. */
|
|
4
|
-
export declare function createSqlConversationEventStore(executor: JuniorSqlDatabase): ConversationEventStore;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Destination } from "@sentry/junior-plugin-api";
|
|
2
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import { type Location } from "@/chat/conversations/location";
|
|
4
|
-
import type { SessionSource } from "@/chat/source";
|
|
5
|
-
import type { juniorDestinations } from "@/db/schema";
|
|
6
|
-
type LocationRow = typeof juniorDestinations.$inferSelect;
|
|
7
|
-
/** Build the complete Location for one Conversation SQL write. */
|
|
8
|
-
export declare function locationForWrite(args: {
|
|
9
|
-
destination: Destination | undefined;
|
|
10
|
-
destinationId: string | undefined;
|
|
11
|
-
location: Location | undefined;
|
|
12
|
-
sessionSource: SessionSource | undefined;
|
|
13
|
-
}): Location | undefined;
|
|
14
|
-
/** Read one complete Location from SQL. */
|
|
15
|
-
export declare function locationFromRow(value: unknown, row: LocationRow | null, sessionSource: SessionSource | undefined): Location | undefined;
|
|
16
|
-
/** Read confirmed visibility from one linked Location row. */
|
|
17
|
-
export declare function visibilityFromLocationRow(row: LocationRow | null): ConversationPrivacy | undefined;
|
|
18
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
import type { ConversationMessageSearchStore } from "../message-search";
|
|
3
|
-
/** Create a SQL-backed public workspace message search store. */
|
|
4
|
-
export declare function createSqlConversationMessageSearchStore(executor: JuniorSqlDatabase): ConversationMessageSearchStore;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
/** Resolve the root conversation id that owns personal-feed membership. */
|
|
3
|
-
export declare function resolveRootConversationId(executor: JuniorSqlDatabase, conversationId: string): Promise<string>;
|
|
4
|
-
/**
|
|
5
|
-
* Upsert one linked user as a participant on a root conversation.
|
|
6
|
-
* No-ops when the identity is missing, unlinked, or not a user.
|
|
7
|
-
*/
|
|
8
|
-
export declare function recordConversationParticipant(executor: JuniorSqlDatabase, args: {
|
|
9
|
-
actorIdentityId: string;
|
|
10
|
-
conversationId: string;
|
|
11
|
-
atMs: number;
|
|
12
|
-
restoreArchive?: boolean;
|
|
13
|
-
}): Promise<void>;
|
|
14
|
-
/** Find which of the supplied root conversations include the linked user. */
|
|
15
|
-
export declare function rootConversationIdsForParticipant(executor: JuniorSqlDatabase, args: {
|
|
16
|
-
rootConversationIds: readonly string[];
|
|
17
|
-
userId: string;
|
|
18
|
-
}): Promise<Set<string>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
import type { JuniorDestinationVisibility } from "@/db/schema/destinations";
|
|
3
|
-
/** Root conversation identity and its normalized destination visibility. */
|
|
4
|
-
export interface RootConversationVisibility {
|
|
5
|
-
rootConversationId: string;
|
|
6
|
-
visibility: JuniorDestinationVisibility | null;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Resolve a conversation's privacy authority from its persisted root.
|
|
10
|
-
*
|
|
11
|
-
* Missing or structurally invalid root metadata fails closed. The root
|
|
12
|
-
* destination is locked so callers that keep the transaction open receive a
|
|
13
|
-
* stable visibility decision.
|
|
14
|
-
*/
|
|
15
|
-
export declare function resolveRootVisibility(executor: JuniorSqlDatabase, conversationId: string): Promise<RootConversationVisibility>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
-
import type { JuniorDestinationVisibility } from "@/db/schema/destinations";
|
|
3
|
-
/** An expired root conversation selected for purge, with its resolved visibility. */
|
|
4
|
-
export interface ExpiredRoot {
|
|
5
|
-
conversationId: string;
|
|
6
|
-
visibility: JuniorDestinationVisibility | null;
|
|
7
|
-
}
|
|
8
|
-
/** Outcome of purging one conversation tree. */
|
|
9
|
-
export interface PurgeTreeResult {
|
|
10
|
-
/** Whether this transaction still found the root eligible for purge. */
|
|
11
|
-
purged: boolean;
|
|
12
|
-
/** Root plus descendant conversation rows stamped by the purge. */
|
|
13
|
-
conversations: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Select expired root conversations for purge, oldest activity first.
|
|
17
|
-
*
|
|
18
|
-
* Roots have no parent, so visibility is read directly from the root's own
|
|
19
|
-
* destination; the private window applies to every non-`public` case. A row is
|
|
20
|
-
* skipped once it is fully purged — no content rows survive and no non-public
|
|
21
|
-
* scrub fields remain — so a bounded batch spends its budget on real work.
|
|
22
|
-
*/
|
|
23
|
-
export declare function selectExpiredRoots(executor: JuniorSqlDatabase, args: {
|
|
24
|
-
nowMs: number;
|
|
25
|
-
publicWindowMs: number;
|
|
26
|
-
privateWindowMs: number;
|
|
27
|
-
limit: number;
|
|
28
|
-
}): Promise<ExpiredRoot[]>;
|
|
29
|
-
/**
|
|
30
|
-
* Purge one conversation tree in a single transaction: delete all message and
|
|
31
|
-
* event rows for the given conversation and every descendant, stamp
|
|
32
|
-
* `transcript_purged_at`, and — for non-public content — null the raw-payload
|
|
33
|
-
* metadata (`title`, `channel_name`, legacy actor JSON) so purged private
|
|
34
|
-
* conversations keep only safe metadata. The metadata rows themselves survive.
|
|
35
|
-
*/
|
|
36
|
-
export declare function purgeConversationTree(executor: JuniorSqlDatabase, args: {
|
|
37
|
-
rootConversationId: string;
|
|
38
|
-
scrubMetadata?: boolean;
|
|
39
|
-
scrubMetadataFromRootVisibility?: boolean;
|
|
40
|
-
nowMs: number;
|
|
41
|
-
retention?: {
|
|
42
|
-
privateWindowMs: number;
|
|
43
|
-
publicWindowMs: number;
|
|
44
|
-
};
|
|
45
|
-
}): Promise<PurgeTreeResult>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
2
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import type { StoredSlackActor } from "@/chat/actor";
|
|
4
|
-
import type { JuniorSqlDatabase } from "@/db/db";
|
|
5
|
-
import type { Conversation, ConversationExecution, ConversationSource, ConversationStore } from "../store";
|
|
6
|
-
import type { AgentTurnUsage } from "@/chat/usage";
|
|
7
|
-
import { type ProviderConversationBinding, type ProviderConversationReference } from "./bindings";
|
|
8
|
-
/** Serialize one conversation's durable mutations inside a SQL transaction. */
|
|
9
|
-
export declare function withConversationMutationLock<T>(executor: JuniorSqlDatabase, conversationId: string, callback: () => Promise<T>): Promise<T>;
|
|
10
|
-
export declare class SqlStore implements ConversationStore {
|
|
11
|
-
private readonly executor;
|
|
12
|
-
constructor(executor: JuniorSqlDatabase);
|
|
13
|
-
getConversationIdByProviderConversation(args: ProviderConversationReference): Promise<string | undefined>;
|
|
14
|
-
bindProviderConversation(args: ProviderConversationBinding): Promise<void>;
|
|
15
|
-
createChild(args: {
|
|
16
|
-
childConversationId: string;
|
|
17
|
-
parentConversationId: string;
|
|
18
|
-
nowMs?: number;
|
|
19
|
-
source?: ConversationSource;
|
|
20
|
-
}): Promise<void>;
|
|
21
|
-
get(args: {
|
|
22
|
-
conversationId: string;
|
|
23
|
-
}): Promise<Conversation | undefined>;
|
|
24
|
-
recordActivity(args: {
|
|
25
|
-
activityAtMs?: number;
|
|
26
|
-
channelName?: string;
|
|
27
|
-
conversationId: string;
|
|
28
|
-
destination?: Destination;
|
|
29
|
-
nowMs?: number;
|
|
30
|
-
actor?: StoredSlackActor;
|
|
31
|
-
source?: ConversationSource;
|
|
32
|
-
sessionSource?: Source;
|
|
33
|
-
title?: string;
|
|
34
|
-
visibility?: ConversationPrivacy;
|
|
35
|
-
}): Promise<void>;
|
|
36
|
-
recordExecution(args: {
|
|
37
|
-
channelName?: string;
|
|
38
|
-
conversationId: string;
|
|
39
|
-
createdAtMs: number;
|
|
40
|
-
destination?: Destination;
|
|
41
|
-
execution: ConversationExecution;
|
|
42
|
-
lastActivityAtMs: number;
|
|
43
|
-
metrics: {
|
|
44
|
-
durationMs: number;
|
|
45
|
-
usage?: AgentTurnUsage;
|
|
46
|
-
} | null;
|
|
47
|
-
actor?: StoredSlackActor;
|
|
48
|
-
source?: ConversationSource;
|
|
49
|
-
title?: string;
|
|
50
|
-
updatedAtMs: number;
|
|
51
|
-
visibility?: ConversationPrivacy;
|
|
52
|
-
}): Promise<void>;
|
|
53
|
-
listByActivity(args?: {
|
|
54
|
-
limit?: number;
|
|
55
|
-
offset?: number;
|
|
56
|
-
}): Promise<Conversation[]>;
|
|
57
|
-
getDestinationVisibility(args: {
|
|
58
|
-
provider: string;
|
|
59
|
-
providerDestinationId: string;
|
|
60
|
-
providerTenantId?: string;
|
|
61
|
-
}): Promise<ConversationPrivacy | undefined>;
|
|
62
|
-
findSlackDestinationByName(args: {
|
|
63
|
-
channelName: string;
|
|
64
|
-
teamId: string;
|
|
65
|
-
}): Promise<{
|
|
66
|
-
channelId: string;
|
|
67
|
-
channelName?: string;
|
|
68
|
-
} | undefined>;
|
|
69
|
-
/** Serialize all durable mutations for one conversation inside a SQL transaction. */
|
|
70
|
-
private withConversationMutation;
|
|
71
|
-
private readConversationRow;
|
|
72
|
-
/** Upsert the conversation row while preserving previously discovered nullable metadata fields. */
|
|
73
|
-
private upsertConversation;
|
|
74
|
-
private upsertDestination;
|
|
75
|
-
}
|
|
76
|
-
/** Create a SQL-backed conversation store. */
|
|
77
|
-
export declare function createSqlStore(executor: JuniorSqlDatabase): SqlStore;
|