@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,105 +0,0 @@
|
|
|
1
|
-
import { type TaskExecutionStatus } from "@/db/schema/task-executions";
|
|
2
|
-
export declare const TASK_EXECUTION_TYPES: readonly ["scheduled", "event"];
|
|
3
|
-
export declare const TASK_EXECUTION_STATUSES: readonly ["blocked", "completed", "failed"];
|
|
4
|
-
export type TaskExecutionType = (typeof TASK_EXECUTION_TYPES)[number];
|
|
5
|
-
export type TaskExecutionDay = {
|
|
6
|
-
costUsd: number;
|
|
7
|
-
date: string;
|
|
8
|
-
event: number;
|
|
9
|
-
scheduled: number;
|
|
10
|
-
};
|
|
11
|
-
export type TaskRunWindows = {
|
|
12
|
-
1: number;
|
|
13
|
-
7: number;
|
|
14
|
-
30: number;
|
|
15
|
-
90: number;
|
|
16
|
-
};
|
|
17
|
-
export type TaskExecutionSummary = {
|
|
18
|
-
lastConversationId?: string;
|
|
19
|
-
lastExecutedAtMs?: number;
|
|
20
|
-
runs: TaskRunWindows;
|
|
21
|
-
totalRuns: number;
|
|
22
|
-
};
|
|
23
|
-
/** Empty run windows for tasks with no execution history. */
|
|
24
|
-
export declare function emptyTaskRunWindows(): TaskRunWindows;
|
|
25
|
-
export type TaskExecutionRecord = {
|
|
26
|
-
conversationId?: string;
|
|
27
|
-
costUsd?: number;
|
|
28
|
-
durationMs?: number;
|
|
29
|
-
executedAt: string;
|
|
30
|
-
executionId: string;
|
|
31
|
-
status: TaskExecutionStatus;
|
|
32
|
-
title?: string;
|
|
33
|
-
totalTokens?: number;
|
|
34
|
-
};
|
|
35
|
-
export type TaskRunRecord = TaskExecutionRecord & {
|
|
36
|
-
kind: TaskExecutionType;
|
|
37
|
-
taskId: string;
|
|
38
|
-
};
|
|
39
|
-
export type TaskExecutionStatusDay = {
|
|
40
|
-
blocked: number;
|
|
41
|
-
completed: number;
|
|
42
|
-
date: string;
|
|
43
|
-
failed: number;
|
|
44
|
-
};
|
|
45
|
-
/** Record one terminal task execution and its durable conversation when present. */
|
|
46
|
-
export declare function recordTaskExecution(type: TaskExecutionType, taskId: string, options: {
|
|
47
|
-
conversationId?: string;
|
|
48
|
-
executionId: string;
|
|
49
|
-
namespace?: string;
|
|
50
|
-
nowMs?: number;
|
|
51
|
-
status?: TaskExecutionStatus;
|
|
52
|
-
}): Promise<void>;
|
|
53
|
-
/** Load usage analytics for all tasks of one type and namespace. */
|
|
54
|
-
export declare function readTaskExecutionSummaries(type: TaskExecutionType, namespace: string, options?: {
|
|
55
|
-
nowMs?: number;
|
|
56
|
-
}): Promise<Map<string, TaskExecutionSummary>>;
|
|
57
|
-
/** Load a fixed trailing window of completed executions stacked by task type. */
|
|
58
|
-
export declare function readTaskExecutionDays(dayCount?: number, options?: {
|
|
59
|
-
nowMs?: number;
|
|
60
|
-
}): Promise<TaskExecutionDay[]>;
|
|
61
|
-
/** Load a fixed trailing window of completed executions stacked by hour. */
|
|
62
|
-
export declare function readTaskExecutionHours(hourCount?: number, options?: {
|
|
63
|
-
nowMs?: number;
|
|
64
|
-
}): Promise<TaskExecutionDay[]>;
|
|
65
|
-
/** Load the newest terminal task execution linked to one conversation, if any. */
|
|
66
|
-
export declare function readTaskExecutionByConversationId(args: {
|
|
67
|
-
conversationId: string;
|
|
68
|
-
namespace?: string;
|
|
69
|
-
}): Promise<{
|
|
70
|
-
kind: TaskExecutionType;
|
|
71
|
-
taskId: string;
|
|
72
|
-
} | undefined>;
|
|
73
|
-
/** Load newest-first executions for one task, with conversation titles when present. */
|
|
74
|
-
export declare function readTaskExecutions(args: {
|
|
75
|
-
kind: TaskExecutionType;
|
|
76
|
-
limit: number;
|
|
77
|
-
namespace?: string;
|
|
78
|
-
taskId: string;
|
|
79
|
-
}): Promise<TaskExecutionRecord[]>;
|
|
80
|
-
/** Load newest-first executions for the supplied viewer-visible tasks. */
|
|
81
|
-
export declare function readTaskRuns(args: {
|
|
82
|
-
conversationIds?: string[];
|
|
83
|
-
limit: number;
|
|
84
|
-
namespace?: string;
|
|
85
|
-
tasks?: Array<{
|
|
86
|
-
kind: TaskExecutionType;
|
|
87
|
-
taskId: string;
|
|
88
|
-
}>;
|
|
89
|
-
}): Promise<TaskRunRecord[]>;
|
|
90
|
-
/** Load a fixed trailing window of terminal executions for one task by status. */
|
|
91
|
-
export declare function readTaskExecutionStatusDays(args: {
|
|
92
|
-
dayCount?: number;
|
|
93
|
-
kind: TaskExecutionType;
|
|
94
|
-
namespace?: string;
|
|
95
|
-
nowMs?: number;
|
|
96
|
-
taskId: string;
|
|
97
|
-
}): Promise<TaskExecutionStatusDay[]>;
|
|
98
|
-
/** Load a fixed trailing window of terminal executions for one task by hour. */
|
|
99
|
-
export declare function readTaskExecutionStatusHours(args: {
|
|
100
|
-
hourCount?: number;
|
|
101
|
-
kind: TaskExecutionType;
|
|
102
|
-
namespace?: string;
|
|
103
|
-
nowMs?: number;
|
|
104
|
-
taskId: string;
|
|
105
|
-
}): Promise<TaskExecutionStatusDay[]>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { User } from "@sentry/junior-plugin-api";
|
|
2
|
-
import type { ConversationSourceTask } from "@/api/schema/conversation";
|
|
3
|
-
import type { TaskExecutionList, TaskList, TaskRunList } from "@/api/schema/task";
|
|
4
|
-
export declare function readViewerTasks(user: User): Promise<TaskList>;
|
|
5
|
-
/**
|
|
6
|
-
* Read newest runs across live viewer-visible tasks and deleted tasks the
|
|
7
|
-
* viewer owns. Deleted task rows stay available so history does not depend on
|
|
8
|
-
* conversation actor membership.
|
|
9
|
-
*/
|
|
10
|
-
export declare function readViewerTaskRuns(user: User): Promise<TaskRunList>;
|
|
11
|
-
export declare class ViewerTaskNotFoundError extends Error {
|
|
12
|
-
constructor();
|
|
13
|
-
}
|
|
14
|
-
/** Read one viewer-visible task and its newest terminal executions. */
|
|
15
|
-
export declare function readViewerTaskExecutions(user: User, kind: "scheduled" | "event", id: string): Promise<TaskExecutionList>;
|
|
16
|
-
/** Resolve the source task for one conversation when a terminal execution links it. */
|
|
17
|
-
export declare function readConversationSourceTask(args: {
|
|
18
|
-
conversationId: string;
|
|
19
|
-
viewer?: User;
|
|
20
|
-
}): Promise<ConversationSourceTask | undefined>;
|
|
21
|
-
/** Delete one viewer-owned scheduled or event task. */
|
|
22
|
-
export declare function deleteViewerTask(user: User, kind: "scheduled" | "event", id: string): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AnyToolDefinition, ToolExposure } from "@/chat/tools/definition";
|
|
2
|
-
export interface PlannedToolExposure {
|
|
3
|
-
catalogTools: Record<string, AnyToolDefinition>;
|
|
4
|
-
directTools: Record<string, AnyToolDefinition>;
|
|
5
|
-
excludedTools: Record<string, AnyToolDefinition>;
|
|
6
|
-
}
|
|
7
|
-
/** Return the runtime exposure for a tool, preserving direct compatibility. */
|
|
8
|
-
export declare function effectiveToolExposure(definition: AnyToolDefinition): ToolExposure;
|
|
9
|
-
/** Plan which tools are native-visible, catalog-executable, or withheld. */
|
|
10
|
-
export declare function planToolExposure(tools: Record<string, AnyToolDefinition>): PlannedToolExposure;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
2
|
-
import type { ToolActionEvidence } from "@/chat/tool-support/action-review";
|
|
3
|
-
/** Project the Codex Guardian transcript selection into structured evidence. */
|
|
4
|
-
export declare function buildToolActionEvidence(messages: readonly PiMessage[]): ToolActionEvidence;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
declare const priorRejectionSchema: z.ZodObject<{
|
|
4
|
-
decision: z.ZodEnum<{
|
|
5
|
-
ask: "ask";
|
|
6
|
-
deny: "deny";
|
|
7
|
-
}>;
|
|
8
|
-
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
9
|
-
reason: z.ZodString;
|
|
10
|
-
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
11
|
-
low: "low";
|
|
12
|
-
medium: "medium";
|
|
13
|
-
high: "high";
|
|
14
|
-
critical: "critical";
|
|
15
|
-
}>>;
|
|
16
|
-
tool: z.ZodObject<{
|
|
17
|
-
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
18
|
-
description: z.ZodString;
|
|
19
|
-
dispatcherName: z.ZodOptional<z.ZodString>;
|
|
20
|
-
identity: z.ZodOptional<z.ZodObject<{
|
|
21
|
-
id: z.ZodString;
|
|
22
|
-
name: z.ZodString;
|
|
23
|
-
plugin: z.ZodString;
|
|
24
|
-
}, z.core.$strict>>;
|
|
25
|
-
name: z.ZodString;
|
|
26
|
-
proposalDescription: z.ZodOptional<z.ZodString>;
|
|
27
|
-
catalogSource: z.ZodOptional<z.ZodObject<{
|
|
28
|
-
description: z.ZodString;
|
|
29
|
-
id: z.ZodString;
|
|
30
|
-
}, z.core.$strict>>;
|
|
31
|
-
}, z.core.$strict>;
|
|
32
|
-
userAuthorization: z.ZodOptional<z.ZodEnum<{
|
|
33
|
-
unknown: "unknown";
|
|
34
|
-
low: "low";
|
|
35
|
-
medium: "medium";
|
|
36
|
-
high: "high";
|
|
37
|
-
}>>;
|
|
38
|
-
}, z.core.$strict>;
|
|
39
|
-
export type ToolActionPriorRejection = z.output<typeof priorRejectionSchema>;
|
|
40
|
-
declare const rejectionMarkerSchema: z.ZodObject<{
|
|
41
|
-
decision: z.ZodEnum<{
|
|
42
|
-
ask: "ask";
|
|
43
|
-
deny: "deny";
|
|
44
|
-
}>;
|
|
45
|
-
priorRejection: z.ZodObject<{
|
|
46
|
-
decision: z.ZodEnum<{
|
|
47
|
-
ask: "ask";
|
|
48
|
-
deny: "deny";
|
|
49
|
-
}>;
|
|
50
|
-
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
51
|
-
reason: z.ZodString;
|
|
52
|
-
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
53
|
-
low: "low";
|
|
54
|
-
medium: "medium";
|
|
55
|
-
high: "high";
|
|
56
|
-
critical: "critical";
|
|
57
|
-
}>>;
|
|
58
|
-
tool: z.ZodObject<{
|
|
59
|
-
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
-
description: z.ZodString;
|
|
61
|
-
dispatcherName: z.ZodOptional<z.ZodString>;
|
|
62
|
-
identity: z.ZodOptional<z.ZodObject<{
|
|
63
|
-
id: z.ZodString;
|
|
64
|
-
name: z.ZodString;
|
|
65
|
-
plugin: z.ZodString;
|
|
66
|
-
}, z.core.$strict>>;
|
|
67
|
-
name: z.ZodString;
|
|
68
|
-
proposalDescription: z.ZodOptional<z.ZodString>;
|
|
69
|
-
catalogSource: z.ZodOptional<z.ZodObject<{
|
|
70
|
-
description: z.ZodString;
|
|
71
|
-
id: z.ZodString;
|
|
72
|
-
}, z.core.$strict>>;
|
|
73
|
-
}, z.core.$strict>;
|
|
74
|
-
userAuthorization: z.ZodOptional<z.ZodEnum<{
|
|
75
|
-
unknown: "unknown";
|
|
76
|
-
low: "low";
|
|
77
|
-
medium: "medium";
|
|
78
|
-
high: "high";
|
|
79
|
-
}>>;
|
|
80
|
-
}, z.core.$strict>;
|
|
81
|
-
reason: z.ZodString;
|
|
82
|
-
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
83
|
-
low: "low";
|
|
84
|
-
medium: "medium";
|
|
85
|
-
high: "high";
|
|
86
|
-
critical: "critical";
|
|
87
|
-
}>>;
|
|
88
|
-
userAuthorization: z.ZodOptional<z.ZodEnum<{
|
|
89
|
-
unknown: "unknown";
|
|
90
|
-
low: "low";
|
|
91
|
-
medium: "medium";
|
|
92
|
-
high: "high";
|
|
93
|
-
}>>;
|
|
94
|
-
version: z.ZodLiteral<1>;
|
|
95
|
-
}, z.core.$strict>;
|
|
96
|
-
/** Core-owned versioned transcript state for one rejected action. */
|
|
97
|
-
export type ToolActionRejectionMarker = z.output<typeof rejectionMarkerSchema>;
|
|
98
|
-
/** Read a core-owned action rejection marker from one durable Pi message. */
|
|
99
|
-
export declare function getToolActionRejectionMarker(message: unknown): ToolActionRejectionMarker | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* Consume and project one core-owned rejection into Pi's durable tool result.
|
|
102
|
-
*
|
|
103
|
-
* The marker field is reserved: tool-supplied values are stripped so only
|
|
104
|
-
* state produced by the execution gate can survive into history.
|
|
105
|
-
*/
|
|
106
|
-
export declare function projectToolActionRejection<TResult extends {
|
|
107
|
-
details?: unknown;
|
|
108
|
-
isError?: boolean;
|
|
109
|
-
}>(pending: Map<string, ToolActionRejectionMarker>, toolCallId: string, result: TResult): TResult;
|
|
110
|
-
/**
|
|
111
|
-
* Restore compact Guardian rejection state from the durable Pi transcript.
|
|
112
|
-
*
|
|
113
|
-
* Tool results are not general Guardian evidence. Only core-generated action
|
|
114
|
-
* rejection messages are recognized here and paired with their exact tool call.
|
|
115
|
-
*/
|
|
116
|
-
export declare function restoreToolActionRejections(messages: readonly PiMessage[]): ToolActionPriorRejection[];
|
|
117
|
-
export {};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Owns the execution gate for reviewable tool actions.
|
|
3
|
-
*
|
|
4
|
-
* Deterministic host checks establish authority before the model evaluates
|
|
5
|
-
* untrusted action evidence.
|
|
6
|
-
*/
|
|
7
|
-
import { type Destination, type Source, type ToolAnnotations } from "@sentry/junior-plugin-api";
|
|
8
|
-
import type { Actor } from "@/chat/actor";
|
|
9
|
-
import type { CredentialContext } from "@/chat/credentials/context";
|
|
10
|
-
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
11
|
-
import type { ToolActionPriorRejection } from "@/chat/tool-support/action-review-history";
|
|
12
|
-
/** Outcome available to the action reviewer. */
|
|
13
|
-
export type ToolActionDecision = "allow" | "ask" | "deny";
|
|
14
|
-
export interface ToolActionReviewDecision {
|
|
15
|
-
costUsd?: number;
|
|
16
|
-
decision: ToolActionDecision;
|
|
17
|
-
reason: string;
|
|
18
|
-
riskLevel: "low" | "medium" | "high" | "critical";
|
|
19
|
-
userAuthorization: "high" | "medium" | "low" | "unknown";
|
|
20
|
-
}
|
|
21
|
-
export interface ToolActionEvidence {
|
|
22
|
-
entries: Array<{
|
|
23
|
-
role: "assistant" | "user" | `tool ${string} call` | `tool ${string} result`;
|
|
24
|
-
text: string;
|
|
25
|
-
}>;
|
|
26
|
-
omittedEntries: number;
|
|
27
|
-
}
|
|
28
|
-
/** Exact model-review request; only core-supplied context carries authority. */
|
|
29
|
-
export interface ToolActionProposal {
|
|
30
|
-
context: {
|
|
31
|
-
actor: {
|
|
32
|
-
platform: "local";
|
|
33
|
-
userId: string;
|
|
34
|
-
} | {
|
|
35
|
-
platform: "slack";
|
|
36
|
-
teamId: string;
|
|
37
|
-
userId: string;
|
|
38
|
-
} | {
|
|
39
|
-
platform: "system";
|
|
40
|
-
name: string;
|
|
41
|
-
};
|
|
42
|
-
conversationId: string;
|
|
43
|
-
credential?: {
|
|
44
|
-
actor: {
|
|
45
|
-
type: "user";
|
|
46
|
-
userId: string;
|
|
47
|
-
} | {
|
|
48
|
-
platform: "system";
|
|
49
|
-
name: string;
|
|
50
|
-
};
|
|
51
|
-
subject?: {
|
|
52
|
-
allowedWhen: "private-direct-conversation" | "scheduled-task" | "event-task";
|
|
53
|
-
taskId?: string;
|
|
54
|
-
type: "user";
|
|
55
|
-
userId: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
destination: Destination;
|
|
59
|
-
source: Source;
|
|
60
|
-
userIntent: string;
|
|
61
|
-
};
|
|
62
|
-
evidence?: ToolActionEvidence;
|
|
63
|
-
input: Record<string, unknown>;
|
|
64
|
-
priorRejectedActions?: ToolActionPriorRejection[];
|
|
65
|
-
tool: {
|
|
66
|
-
annotations?: ToolAnnotations;
|
|
67
|
-
description: string;
|
|
68
|
-
dispatcherName?: string;
|
|
69
|
-
identity?: {
|
|
70
|
-
id: string;
|
|
71
|
-
name: string;
|
|
72
|
-
plugin: string;
|
|
73
|
-
};
|
|
74
|
-
name: string;
|
|
75
|
-
proposalDescription?: string;
|
|
76
|
-
catalogSource?: {
|
|
77
|
-
description: string;
|
|
78
|
-
id: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
/** Guardian capability for one schema-constrained action proposal. */
|
|
83
|
-
export interface ToolActionReviewer {
|
|
84
|
-
review(proposal: ToolActionProposal, options?: {
|
|
85
|
-
signal?: AbortSignal;
|
|
86
|
-
}): Promise<ToolActionReviewDecision>;
|
|
87
|
-
}
|
|
88
|
-
/** Core-owned context used to prepare one exact action for Guardian. */
|
|
89
|
-
export interface ToolActionReviewContext {
|
|
90
|
-
actor?: Actor;
|
|
91
|
-
conversationId: string;
|
|
92
|
-
credentialContext?: CredentialContext;
|
|
93
|
-
destination: Destination;
|
|
94
|
-
source: Source;
|
|
95
|
-
userIntent?: () => string;
|
|
96
|
-
evidence?: () => ToolActionEvidence;
|
|
97
|
-
}
|
|
98
|
-
/** Review capability used immediately before tool execution. */
|
|
99
|
-
export interface ToolActionReview {
|
|
100
|
-
review(toolCallId: string, toolName: string, tool: AnyToolDefinition, input: Record<string, unknown>, signal?: AbortSignal): Promise<ToolActionReviewDecision | undefined>;
|
|
101
|
-
projectToolResult<TResult extends {
|
|
102
|
-
details?: unknown;
|
|
103
|
-
isError?: boolean;
|
|
104
|
-
}>(toolCallId: string, result: TResult): TResult;
|
|
105
|
-
}
|
|
106
|
-
/** Expected tool failure when core or Guardian rejects an exact action. */
|
|
107
|
-
export declare class ToolActionRejectedError extends Error {
|
|
108
|
-
readonly decision: Exclude<ToolActionDecision, "allow">;
|
|
109
|
-
readonly reason: string;
|
|
110
|
-
readonly reviewedAction?: ToolActionPriorRejection;
|
|
111
|
-
readonly riskLevel?: ToolActionReviewDecision["riskLevel"];
|
|
112
|
-
readonly userAuthorization?: ToolActionReviewDecision["userAuthorization"];
|
|
113
|
-
constructor(decision: Exclude<ToolActionDecision, "allow">, reason: string, assessment?: Partial<Pick<ToolActionReviewDecision, "riskLevel" | "userAuthorization">> & {
|
|
114
|
-
instructions?: string;
|
|
115
|
-
reviewedAction?: ToolActionPriorRejection;
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/** Required review could not run, so the action was not executed. */
|
|
119
|
-
export declare class ToolActionReviewUnavailableError extends Error {
|
|
120
|
-
constructor(options?: {
|
|
121
|
-
cause?: unknown;
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
/** Telemetry-only marker when action review exhausts consecutive rejections. */
|
|
125
|
-
export declare class ToolActionReviewLimitError extends Error {
|
|
126
|
-
constructor();
|
|
127
|
-
}
|
|
128
|
-
/** Create the core review path that prepares actions and enforces Guardian decisions. */
|
|
129
|
-
export declare function createToolActionReview(options: {
|
|
130
|
-
context: ToolActionReviewContext;
|
|
131
|
-
/** Persist the Guardian decision before the reviewed action can continue. */
|
|
132
|
-
onDecision(event: {
|
|
133
|
-
toolCallId: string;
|
|
134
|
-
toolName: string;
|
|
135
|
-
decision: ToolActionReviewDecision;
|
|
136
|
-
}): Promise<void>;
|
|
137
|
-
/** Escalate unavailable review to the owning agent-run boundary. */
|
|
138
|
-
onFatal(error: ToolActionReviewUnavailableError): void;
|
|
139
|
-
priorRejections?: ToolActionPriorRejection[];
|
|
140
|
-
reviewer: ToolActionReviewer;
|
|
141
|
-
}): ToolActionReview;
|
|
142
|
-
/** Review one exact tool action immediately before execution when required. */
|
|
143
|
-
export declare function reviewToolAction(toolCallId: string, toolName: string, tool: AnyToolDefinition, input: Record<string, unknown>, review: ToolActionReview | undefined, signal?: AbortSignal): Promise<ToolActionReviewDecision | undefined>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type AnyToolDefinition } from "@/chat/tools/definition";
|
|
2
|
-
export interface CatalogToolCall {
|
|
3
|
-
arguments: Record<string, unknown>;
|
|
4
|
-
definition: AnyToolDefinition;
|
|
5
|
-
toolName: string;
|
|
6
|
-
}
|
|
7
|
-
/** Resolve and validate a catalog executeTool request at runtime. */
|
|
8
|
-
export declare function resolveCatalogToolCall(input: Record<string, unknown>, catalogTools: Record<string, AnyToolDefinition>): CatalogToolCall;
|
|
9
|
-
/** Apply a catalog tool's own argument preparation and schema boundary. */
|
|
10
|
-
export declare function prepareCatalogToolCall(call: CatalogToolCall): CatalogToolCall;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
2
|
-
/** Normalize raw tool output into Pi content and structured details. */
|
|
3
|
-
export declare function normalizeToolResult(result: unknown, options?: {
|
|
4
|
-
requireStructuredResult?: boolean;
|
|
5
|
-
toolName?: string;
|
|
6
|
-
}): {
|
|
7
|
-
content: Array<TextContent | ImageContent>;
|
|
8
|
-
details: unknown;
|
|
9
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
|
2
|
-
import { type ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import { type LogContext } from "@/chat/logging";
|
|
4
|
-
import type { PluginAuthOrchestration } from "@/chat/services/plugin-auth-orchestration";
|
|
5
|
-
import type { AssistantStatusSpec } from "@/chat/slack/assistant-thread/status";
|
|
6
|
-
import type { SandboxTools } from "@/chat/sandbox/sandbox";
|
|
7
|
-
import type { SkillSandbox } from "@/chat/sandbox/skill-sandbox";
|
|
8
|
-
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
9
|
-
import type { ToolExecutionReport } from "@/chat/tool-support/tool-execution-report";
|
|
10
|
-
import type { PluginHookRunner } from "@/chat/plugins/agent-hooks";
|
|
11
|
-
import { type ToolActionReview } from "@/chat/tool-support/action-review";
|
|
12
|
-
/** Wrap tool definitions into Pi Agent tool objects with logging, validation, and sandbox execution. */
|
|
13
|
-
export declare function createPiAgentTools(tools: Record<string, AnyToolDefinition>, sandbox: SkillSandbox, spanContext: LogContext, onStatus?: (status: AssistantStatusSpec) => void | Promise<void>, sandboxTools?: SandboxTools, pluginAuthOrchestration?: PluginAuthOrchestration, onToolCall?: (toolCallId: string, toolName: string, params: Record<string, unknown>) => void | Promise<void>, agentHooks?: PluginHookRunner, conversationPrivacy?: ConversationPrivacy, onToolResult?: (report: ToolExecutionReport) => void | Promise<void>, actionReview?: ToolActionReview): AgentTool[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** Mark one tool result as an adapter-approved private trace projection. */
|
|
2
|
-
export declare function privateTraceResultAttributes(): Record<string, string>;
|
|
3
|
-
/** Consume and remove the adapter-owned private trace projection marker. */
|
|
4
|
-
export declare function consumePrivateTraceResultMarker(attributes: Record<string, unknown>): boolean;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ManagedMcpToolDescriptor } from "@/chat/mcp/tool-manager";
|
|
2
|
-
/** Agent-visible MCP tool descriptor with the provider schema as its argument contract. */
|
|
3
|
-
export interface ExposedToolSummary {
|
|
4
|
-
tool_name: string;
|
|
5
|
-
mcp_tool_name: string;
|
|
6
|
-
provider: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
description: string;
|
|
9
|
-
input_schema: Record<string, unknown>;
|
|
10
|
-
output_schema?: Record<string, unknown>;
|
|
11
|
-
annotations?: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
export interface ActiveMcpCatalogSummary {
|
|
14
|
-
provider: string;
|
|
15
|
-
available_tool_count: number;
|
|
16
|
-
}
|
|
17
|
-
/** Convert a managed MCP tool descriptor into agent-visible search output. */
|
|
18
|
-
export declare function toExposedToolSummary(toolDef: ManagedMcpToolDescriptor): ExposedToolSummary;
|
|
19
|
-
/** Group discovered MCP tools into provider catalogs for prompt disclosure. */
|
|
20
|
-
export declare function toActiveMcpCatalogSummaries(toolDefs: ManagedMcpToolDescriptor[]): ActiveMcpCatalogSummary[];
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
export declare const juniorToolContinuationSchema: z.ZodObject<{
|
|
4
|
-
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, z.core.$strict>;
|
|
7
|
-
export declare const juniorToolBoundContinuationSchema: z.ZodObject<{
|
|
8
|
-
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
9
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
10
|
-
tool_name: z.ZodString;
|
|
11
|
-
}, z.core.$strict>;
|
|
12
|
-
/** Shared optional fields for canonical Junior tool outputs. */
|
|
13
|
-
export declare const juniorToolOutputSchema: z.ZodObject<{
|
|
14
|
-
target: z.ZodOptional<z.ZodString>;
|
|
15
|
-
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
timed_out: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
continuation: z.ZodOptional<z.ZodObject<{
|
|
18
|
-
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
19
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
20
|
-
}, z.core.$strict>>;
|
|
21
|
-
}, z.core.$loose>;
|
|
22
|
-
export type JuniorToolOutput = z.output<typeof juniorToolOutputSchema>;
|
|
23
|
-
export interface JuniorToolOutputEnvelope<TDetails = unknown> {
|
|
24
|
-
content: [TextContent, ...(TextContent | ImageContent)[]];
|
|
25
|
-
details: TDetails;
|
|
26
|
-
}
|
|
27
|
-
/** Bind continuation metadata to the exposed runtime tool name. */
|
|
28
|
-
export declare function injectContinuationToolName(details: unknown, toolName: string): unknown;
|
|
29
|
-
export interface JuniorTextToolOutputEnvelope<TDetails = unknown> {
|
|
30
|
-
content: [TextContent];
|
|
31
|
-
details: TDetails;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Project one canonical tool output onto Pi's native result channels.
|
|
35
|
-
*
|
|
36
|
-
* This follows the Codex tool-result model: `details` remains the authoritative
|
|
37
|
-
* typed value, while `content` is its model-facing serialization. Telemetry and
|
|
38
|
-
* execution success or failure are separate runtime projections and must not be
|
|
39
|
-
* embedded in the tool output.
|
|
40
|
-
*/
|
|
41
|
-
export declare function makeStructuredToolOutput<TDetails>(details: TDetails): JuniorTextToolOutputEnvelope<TDetails>;
|
|
42
|
-
export declare function makeStructuredToolOutput<TDetails>(details: TDetails, options: {
|
|
43
|
-
content: Array<TextContent | ImageContent>;
|
|
44
|
-
}): JuniorToolOutputEnvelope<TDetails>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
interface TextRangeResult {
|
|
2
|
-
content: [{
|
|
3
|
-
type: "text";
|
|
4
|
-
text: string;
|
|
5
|
-
}];
|
|
6
|
-
details: {
|
|
7
|
-
target: string;
|
|
8
|
-
content: string;
|
|
9
|
-
end_line?: number;
|
|
10
|
-
path: string;
|
|
11
|
-
start_line: number;
|
|
12
|
-
total_lines: number;
|
|
13
|
-
truncation_reasons?: string[];
|
|
14
|
-
truncated: boolean;
|
|
15
|
-
character_limit_reached?: number;
|
|
16
|
-
line_truncated?: boolean;
|
|
17
|
-
continuation?: {
|
|
18
|
-
arguments: {
|
|
19
|
-
offset: number;
|
|
20
|
-
limit: number;
|
|
21
|
-
[key: string]: string | number;
|
|
22
|
-
};
|
|
23
|
-
reason: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/** Return a bounded line window so large files can be read incrementally. */
|
|
28
|
-
export declare function sliceFileContent(params: {
|
|
29
|
-
content: string;
|
|
30
|
-
continuationArgumentName?: string;
|
|
31
|
-
limit?: unknown;
|
|
32
|
-
offset?: unknown;
|
|
33
|
-
path: string;
|
|
34
|
-
}): TextRangeResult;
|
|
35
|
-
/** Reject an expected missing read target through the tool-error channel. */
|
|
36
|
-
export declare function missingFileResult(path: string): never;
|
|
37
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AfterToolCallResult, AgentToolResult } from "@earendil-works/pi-agent-core";
|
|
2
|
-
/**
|
|
3
|
-
* Project a host-preempted tool attempt onto the normal tool-result shape.
|
|
4
|
-
*
|
|
5
|
-
* Only rewrite results that mark the attempt itself as aborted. A finished
|
|
6
|
-
* sibling tool that settles after the host abort signal must keep its real
|
|
7
|
-
* outcome. Host continuity stays in session state (`resumeReason: "timeout"`)
|
|
8
|
-
* and automatic continuation. The model only needs the same fact bash already
|
|
9
|
-
* reports for command timeouts: this attempt timed out.
|
|
10
|
-
*/
|
|
11
|
-
export declare function projectTimedOutToolResult(result: AgentToolResult<unknown>): AfterToolCallResult | undefined;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { z, type ZodTypeAny } from "zod";
|
|
2
|
-
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
3
|
-
import type { AnyToolDefinition, JsonSchemaObject, ToolExecuteOptions } from "@/chat/tools/definition";
|
|
4
|
-
type ZodToolDefinitionBase<TInputSchema extends ZodTypeAny> = Pick<AnyToolDefinition, "approvalMode" | "identity" | "source" | "description" | "exposure" | "annotations" | "promptSnippet" | "promptGuidelines" | "executionMode"> & {
|
|
5
|
-
describeProposal?(input: z.output<TInputSchema>): string;
|
|
6
|
-
inputSchema: TInputSchema;
|
|
7
|
-
prepareArguments?: (args: unknown) => z.input<TInputSchema>;
|
|
8
|
-
resolveApprovalMetadata?(input: z.output<TInputSchema>): ReturnType<NonNullable<AnyToolDefinition["resolveApprovalMetadata"]>>;
|
|
9
|
-
};
|
|
10
|
-
type StructuredToolExecuteResult<TOutputSchema extends ZodTypeAny> = z.input<TOutputSchema> | StructuredToolResultEnvelope<z.input<TOutputSchema>>;
|
|
11
|
-
interface StructuredToolResultEnvelope<TDetails> {
|
|
12
|
-
content: Array<TextContent | ImageContent>;
|
|
13
|
-
details: TDetails;
|
|
14
|
-
}
|
|
15
|
-
export interface ContentOnlyToolResult {
|
|
16
|
-
content: Array<TextContent | ImageContent>;
|
|
17
|
-
details?: never;
|
|
18
|
-
}
|
|
19
|
-
type StructuredZodToolDefinition<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends StructuredToolExecuteResult<TOutputSchema>> = ZodToolDefinitionBase<TInputSchema> & {
|
|
20
|
-
outputSchema: TOutputSchema;
|
|
21
|
-
privateTraceResult?(result: z.output<TOutputSchema>): unknown;
|
|
22
|
-
execute?: (input: z.output<TInputSchema>, options: ToolExecuteOptions) => Promise<TExecuteResult> | TExecuteResult;
|
|
23
|
-
};
|
|
24
|
-
type ContentZodToolDefinition<TInputSchema extends ZodTypeAny> = ZodToolDefinitionBase<TInputSchema> & {
|
|
25
|
-
outputSchema?: undefined;
|
|
26
|
-
execute?: (input: z.output<TInputSchema>, options: ToolExecuteOptions) => Promise<ContentOnlyToolResult> | ContentOnlyToolResult;
|
|
27
|
-
};
|
|
28
|
-
type ParsedStructuredToolExecuteResult<TOutputSchema extends ZodTypeAny, TExecuteResult> = TExecuteResult extends StructuredToolResultEnvelope<unknown> ? StructuredToolResultEnvelope<z.output<TOutputSchema>> : z.output<TOutputSchema>;
|
|
29
|
-
type StructuredZodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult> = Omit<AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
30
|
-
inputSchema: JsonSchemaObject;
|
|
31
|
-
outputSchema: JsonSchemaObject;
|
|
32
|
-
prepareArguments(args: unknown): z.output<TInputSchema>;
|
|
33
|
-
execute?: (input: unknown, options: ToolExecuteOptions) => Promise<ParsedStructuredToolExecuteResult<TOutputSchema, TExecuteResult>> | ParsedStructuredToolExecuteResult<TOutputSchema, TExecuteResult>;
|
|
34
|
-
};
|
|
35
|
-
type ContentZodTool<TInputSchema extends ZodTypeAny> = Omit<AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
36
|
-
inputSchema: JsonSchemaObject;
|
|
37
|
-
outputSchema?: undefined;
|
|
38
|
-
prepareArguments(args: unknown): z.output<TInputSchema>;
|
|
39
|
-
execute?: (input: unknown, options: ToolExecuteOptions) => Promise<ContentOnlyToolResult> | ContentOnlyToolResult;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Define a Junior-owned tool with Zod input parsing and JSON Schema parameters.
|
|
43
|
-
*/
|
|
44
|
-
export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends StructuredToolExecuteResult<TOutputSchema>>(definition: StructuredZodToolDefinition<TInputSchema, TOutputSchema, TExecuteResult>): StructuredZodTool<TInputSchema, TOutputSchema, TExecuteResult>;
|
|
45
|
-
export declare function zodTool<TInputSchema extends ZodTypeAny>(definition: ContentZodToolDefinition<TInputSchema>): ContentZodTool<TInputSchema>;
|
|
46
|
-
export {};
|