@sentry/junior 0.198.0 → 0.200.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-6LGY2MBH.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-CIO3ERVQ.js} +4 -4
- package/dist/{chunk-X2WFY3TM.js → chunk-22Y5SBDM.js} +8 -8
- package/dist/{chunk-KVXHBJCH.js → chunk-3WUBDFFL.js} +1 -1
- package/dist/{chunk-N6LJYW7V.js → chunk-4Q5IR5GA.js} +1 -1
- package/dist/{chunk-342FVAX5.js → chunk-5JDNDQHL.js} +1 -1
- package/dist/{chunk-7KXZRRMK.js → chunk-5Q6KP6LH.js} +1 -1
- package/dist/{chunk-3J5Y4RWY.js → chunk-5VRPXF4T.js} +1 -1
- package/dist/{chunk-N3GQY63R.js → chunk-752M26LC.js} +1 -1
- package/dist/{chunk-3TMKXW4H.js → chunk-7DO36XLF.js} +1 -1
- package/dist/{chunk-ZORFTPFN.js → chunk-ADNSL3MX.js} +28 -28
- package/dist/{chunk-EWPTEQXA.js → chunk-AV552V2K.js} +3 -3
- package/dist/{chunk-IZ4CIFJY.js → chunk-EOOWKTQC.js} +9 -9
- package/dist/{chunk-EATO3SKS.js → chunk-GFXDMDHR.js} +3 -3
- package/dist/{chunk-QYSJWJLJ.js → chunk-IAZBUDVU.js} +4 -4
- package/dist/{chunk-U67DBSNZ.js → chunk-JLUCKXGI.js} +7 -6
- package/dist/{chunk-SPEJV3TW.js → chunk-JMRHEW6B.js} +3 -3
- package/dist/{chunk-2ACXVY6O.js → chunk-K2QYWZ7F.js} +1 -1
- package/dist/{chunk-CSGQWJIY.js → chunk-LICM66W2.js} +2 -2
- package/dist/{chunk-CGNZXN7B.js → chunk-LUITHZZL.js} +8 -8
- package/dist/{chunk-VYGZPJSM.js → chunk-M7BHRB3G.js} +4 -4
- package/dist/{chunk-LBN67OZR.js → chunk-MTM5IFCY.js} +1 -0
- package/dist/{chunk-4UW7BEJZ.js → chunk-N5VHBUXF.js} +7 -7
- package/dist/{chunk-F3XUS2T5.js → chunk-ODSGDVHT.js} +5 -5
- package/dist/{chunk-ZUEUBQWE.js → chunk-OIILBD56.js} +3 -3
- package/dist/{chunk-XNZAZ57D.js → chunk-OTTKTTVI.js} +2 -2
- package/dist/{chunk-BFIFTKUS.js → chunk-OVHO76WN.js} +3 -3
- package/dist/{chunk-CZC6ZEXR.js → chunk-PIHLVU7T.js} +6 -6
- package/dist/{chunk-T5KV6DUY.js → chunk-PMSENMWY.js} +1 -1
- package/dist/{chunk-G6XSYS3Q.js → chunk-PSQ4SWI3.js} +4 -4
- package/dist/{chunk-FU4OWKCL.js → chunk-RDWWCDA4.js} +2 -2
- package/dist/{chunk-NVDUM2CM.js → chunk-RG74Q34N.js} +1 -1
- package/dist/{chunk-4FHQ6CCO.js → chunk-SY2RQ77O.js} +1 -1
- package/dist/{chunk-D3SLBCD4.js → chunk-T6263C3N.js} +2 -2
- package/dist/{chunk-CBHQOGFA.js → chunk-TF5TXGRD.js} +1 -1
- package/dist/{chunk-A6KKPVEA.js → chunk-UR43NMUR.js} +4 -4
- package/dist/{chunk-C3SNQB6B.js → chunk-V2VL335Y.js} +21 -21
- package/dist/{chunk-OKQMTCHU.js → chunk-VLBLCJXK.js} +5 -5
- package/dist/{chunk-SCVIT6K4.js → chunk-X2Q4H6JQ.js} +25 -24
- package/dist/{chunk-LXPGGSYD.js → chunk-YVP6QNBZ.js} +3 -3
- package/dist/{chunk-G2CT2D5U.js → chunk-ZPLAAHVP.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-SCTYCGQ5.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-QXKBXP5M.js} +29 -29
- package/dist/{runner-3GKIVG6A.js → runner-Z3EQSZ23.js} +21 -21
- package/dist/{skills-FKMV7HTX.js → skills-CGEPG74A.js} +5 -5
- package/dist/spawn-WBEM46BW.js +42 -0
- package/dist/task-runner-2X5MUSHN.js +36 -0
- package/dist/{validation-4XYG33GY.js → validation-YLALMVMB.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-N6PUG4MY.js} +21 -21
- package/dist/{worker-3OYUEME2.js → worker-M7464FAO.js} +10 -10
- package/package.json +6 -6
- 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,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-profile handoff helpers for one agent run slice.
|
|
3
|
-
*
|
|
4
|
-
* Owns the durable handoff commit, Pi apply shape, tool control, and the few
|
|
5
|
-
* loop checks that only care about handoff tool calls.
|
|
6
|
-
*/
|
|
7
|
-
import { type Agent, type AgentLoopTurnUpdate, type AgentTool } from "@earendil-works/pi-agent-core";
|
|
8
|
-
import type { ResumeState } from "@/chat/agent/resume";
|
|
9
|
-
import { type ModelProfile } from "@/chat/model-profile";
|
|
10
|
-
import { resolveGatewayModel } from "@/chat/pi/client";
|
|
11
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
12
|
-
import { type CompactContextArgs } from "@/chat/services/context-compaction";
|
|
13
|
-
import { type TurnRoute } from "@/chat/services/turn-router";
|
|
14
|
-
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
15
|
-
import { type AgentTurnUsage } from "@/chat/usage";
|
|
16
|
-
/** Staged handoff waiting for the next Pi turn boundary. */
|
|
17
|
-
export type PendingHandoff = {
|
|
18
|
-
messages: PiMessage[];
|
|
19
|
-
model: ReturnType<typeof resolveGatewayModel>;
|
|
20
|
-
modelId: string;
|
|
21
|
-
modelProfile: ModelProfile;
|
|
22
|
-
phaseUsage?: AgentTurnUsage;
|
|
23
|
-
thinkingLevel: NonNullable<AgentLoopTurnUpdate["thinkingLevel"]>;
|
|
24
|
-
turnRoute: TurnRoute;
|
|
25
|
-
};
|
|
26
|
-
/** Return the exclusive tool name when one is present among the calls. */
|
|
27
|
-
export declare function exclusiveToolName(toolCalls: ReadonlyArray<{
|
|
28
|
-
name: string;
|
|
29
|
-
}>): string | undefined;
|
|
30
|
-
/** Build the tool control for every configured profile except the active one. */
|
|
31
|
-
export declare function handoffControl(args: {
|
|
32
|
-
activeProfile: ModelProfile;
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
execute: NonNullable<ToolRuntimeContext["handoff"]>["execute"];
|
|
35
|
-
}): ToolRuntimeContext["handoff"];
|
|
36
|
-
/**
|
|
37
|
-
* Rebind the handoff tool description and schema for the active profile.
|
|
38
|
-
* Other tools stay as wired.
|
|
39
|
-
*/
|
|
40
|
-
export declare function toolsForHandoffProfile(args: {
|
|
41
|
-
activeProfile: ModelProfile;
|
|
42
|
-
agentTools: AgentTool[];
|
|
43
|
-
enabled: boolean;
|
|
44
|
-
execute: NonNullable<ToolRuntimeContext["handoff"]>["execute"];
|
|
45
|
-
}): AgentTool[];
|
|
46
|
-
/**
|
|
47
|
-
* Commit the durable handoff epoch and return the staged Pi swap.
|
|
48
|
-
* No-op when the requested profile is already active.
|
|
49
|
-
*/
|
|
50
|
-
export declare function commitHandoff(args: {
|
|
51
|
-
activeModelProfile: ModelProfile;
|
|
52
|
-
beforeMessageCount: number;
|
|
53
|
-
conversationContext?: string;
|
|
54
|
-
conversationId: string;
|
|
55
|
-
metadata?: CompactContextArgs["metadata"];
|
|
56
|
-
onStatus?: (status: {
|
|
57
|
-
text: string;
|
|
58
|
-
}) => void | Promise<void>;
|
|
59
|
-
profile: ModelProfile;
|
|
60
|
-
runtimeContextSourceMessages?: PiMessage[];
|
|
61
|
-
signal?: AbortSignal;
|
|
62
|
-
sourceMessages: PiMessage[];
|
|
63
|
-
triggeringToolCallId?: string;
|
|
64
|
-
turnRoute: TurnRoute;
|
|
65
|
-
}): Promise<PendingHandoff | undefined>;
|
|
66
|
-
/** Apply a committed handoff to Pi and reset its durable resume baseline. */
|
|
67
|
-
export declare function applyHandoff(args: {
|
|
68
|
-
agent: Agent;
|
|
69
|
-
baseInstructions: string;
|
|
70
|
-
pending: PendingHandoff;
|
|
71
|
-
resume: ResumeState;
|
|
72
|
-
tools: AgentTool[];
|
|
73
|
-
}): AgentLoopTurnUpdate;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent executor.
|
|
3
|
-
*
|
|
4
|
-
* Composition root and execution loop for one agent run slice after
|
|
5
|
-
* runtime/ingress code has parsed and routed the request. Wires the phase
|
|
6
|
-
* modules (session restore, skills, tools, prompt, resume), runs the Pi agent
|
|
7
|
-
* with inline retry handling, and translates expected run endings into
|
|
8
|
-
* `AgentRunOutcome` values. It emits every completed, tool-free visible
|
|
9
|
-
* assistant message through the delivery port; the result carries diagnostics,
|
|
10
|
-
* artifacts, and transcript state for destination-owned completion.
|
|
11
|
-
*/
|
|
12
|
-
import { type StreamFn } from "@earendil-works/pi-agent-core";
|
|
13
|
-
import type { AgentRunOutcome } from "@/chat/runtime/agent-run-outcome";
|
|
14
|
-
import { type AgentRun } from "@/chat/agent/types";
|
|
15
|
-
/**
|
|
16
|
-
* Run a full agent turn, optionally using a caller-provided model stream.
|
|
17
|
-
*
|
|
18
|
-
* Prefer binding `streamFn` through `createAgentRunner`. The stream changes
|
|
19
|
-
* model output only; prompt assembly, persistence, tools, delivery, and
|
|
20
|
-
* completion still use the normal agent runtime.
|
|
21
|
-
*/
|
|
22
|
-
export declare function executeAgentRun(run: AgentRun, streamFn?: StreamFn): Promise<AgentRunOutcome>;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
2
|
-
import { type LogContext } from "@/chat/logging";
|
|
3
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
4
|
-
import type { Skill, SkillMetadata } from "@/chat/skills";
|
|
5
|
-
import type { ActiveMcpCatalogSummary } from "@/chat/tool-support/skill/mcp-tool-summary";
|
|
6
|
-
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
7
|
-
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
8
|
-
import { type Actor } from "@/chat/actor";
|
|
9
|
-
import type { PluginTurnContext } from "@/chat/plugins/prompt";
|
|
10
|
-
import type { AgentInstruction, AgentInstructionActor, AgentRun, AgentSteeringMessage } from "@/chat/agent/types";
|
|
11
|
-
export type UserContentPart = {
|
|
12
|
-
type: "text";
|
|
13
|
-
text: string;
|
|
14
|
-
} | {
|
|
15
|
-
type: "image";
|
|
16
|
-
data: string;
|
|
17
|
-
mimeType: string;
|
|
18
|
-
};
|
|
19
|
-
/** User-turn content parts plus the plain-text blocks used for routing decisions. */
|
|
20
|
-
export interface PromptInput {
|
|
21
|
-
contextContentParts: UserContentPart[];
|
|
22
|
-
routerBlocks: string[];
|
|
23
|
-
userContentParts: UserContentPart[];
|
|
24
|
-
}
|
|
25
|
-
/** Fully assembled prompt state for one run slice. */
|
|
26
|
-
export interface PromptAssembly {
|
|
27
|
-
baseInstructions: string;
|
|
28
|
-
contextContentParts: UserContentPart[];
|
|
29
|
-
inputMessages: Array<{
|
|
30
|
-
role: string;
|
|
31
|
-
content: Record<string, unknown>[];
|
|
32
|
-
}>;
|
|
33
|
-
inputMessagesAttribute: string | undefined;
|
|
34
|
-
promptTimestamp?: number;
|
|
35
|
-
promptHistoryMessages: PiMessage[];
|
|
36
|
-
shouldPromptAgent: boolean;
|
|
37
|
-
turnContexts: PluginTurnContext[];
|
|
38
|
-
userContentParts: UserContentPart[];
|
|
39
|
-
}
|
|
40
|
-
/** Render the current actor's instruction without host-owned thread context. */
|
|
41
|
-
export declare function buildUserTurnText(userInput: string, actor?: AgentInstructionActor): string;
|
|
42
|
-
/** Render an explicitly selected skill as instructions for the current turn. */
|
|
43
|
-
export declare function renderExplicitSkillInstructions(skill: Skill): string;
|
|
44
|
-
/** Encode a non-image attachment as base64 XML for the prompt. */
|
|
45
|
-
export declare function encodeNonImageAttachmentForPrompt(attachment: {
|
|
46
|
-
data: Buffer;
|
|
47
|
-
mediaType: string;
|
|
48
|
-
filename?: string;
|
|
49
|
-
}): string;
|
|
50
|
-
/** Redact image data from prompt content parts for observability. */
|
|
51
|
-
export declare function toObservablePromptPart(part: UserContentPart): Record<string, unknown>;
|
|
52
|
-
/** Build the prompt-facing user input, keeping router text aligned with Pi content. */
|
|
53
|
-
export declare function buildPromptInput(args: {
|
|
54
|
-
instruction: AgentInstruction;
|
|
55
|
-
history?: readonly import("@/chat/pi/messages").PiMessage[];
|
|
56
|
-
}): PromptInput;
|
|
57
|
-
/**
|
|
58
|
-
* Convert a mid-run user message into the Pi user message shape used for
|
|
59
|
-
* steering injection and parked-conversation event-log appends, so both
|
|
60
|
-
* paths store identical durable history.
|
|
61
|
-
*/
|
|
62
|
-
export declare function buildSteeringPiMessage(message: AgentSteeringMessage): PiMessage;
|
|
63
|
-
/** Assemble prompt history, instructions, and telemetry input for one slice. */
|
|
64
|
-
export declare function assemblePrompt(args: {
|
|
65
|
-
activeMcpCatalogs: ActiveMcpCatalogSummary[];
|
|
66
|
-
currentActor?: Actor;
|
|
67
|
-
availableSkills: SkillMetadata[];
|
|
68
|
-
configurationValues: Record<string, unknown>;
|
|
69
|
-
contextContentParts: UserContentPart[];
|
|
70
|
-
conversationPrivacy?: ConversationPrivacy;
|
|
71
|
-
existingSessionPiMessages?: PiMessage[];
|
|
72
|
-
existingTurnStartMessageIndex?: number;
|
|
73
|
-
explicitSkill: Skill | null;
|
|
74
|
-
priorPiMessages?: PiMessage[];
|
|
75
|
-
resumedFromSessionRecord: boolean;
|
|
76
|
-
run: Pick<AgentRun, "source" | "destination" | "dispatch" | "slackConversation" | "location" | "delivery">;
|
|
77
|
-
spanContext: LogContext;
|
|
78
|
-
turnId: string;
|
|
79
|
-
toolGuidance: Array<{
|
|
80
|
-
name: string;
|
|
81
|
-
promptGuidelines: AnyToolDefinition["promptGuidelines"];
|
|
82
|
-
promptSnippet: AnyToolDefinition["promptSnippet"];
|
|
83
|
-
}>;
|
|
84
|
-
toolRuntimeContext: ToolRuntimeContext;
|
|
85
|
-
userContentParts: UserContentPart[];
|
|
86
|
-
}): Promise<PromptAssembly>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AgentContext, AgentLoopTurnUpdate } from "@earendil-works/pi-agent-core";
|
|
2
|
-
import type { ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
3
|
-
import type { UserContentPart } from "@/chat/agent/prompt";
|
|
4
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
5
|
-
import { type RepositoryInstructions } from "@/chat/repository-instructions";
|
|
6
|
-
type RepositoryInstructionsContextOptions = {
|
|
7
|
-
capture(): Promise<RepositoryInstructions | undefined>;
|
|
8
|
-
hasSandbox(): boolean;
|
|
9
|
-
initialInstructions?: RepositoryInstructions;
|
|
10
|
-
onTransition?: (instructions: RepositoryInstructions | undefined) => void | Promise<void>;
|
|
11
|
-
restoredMessages?: PiMessage[];
|
|
12
|
-
restoredProvenance?: ConversationMessageProvenance[];
|
|
13
|
-
promptContextContentParts: UserContentPart[];
|
|
14
|
-
setMessages(messages: PiMessage[]): void;
|
|
15
|
-
shouldPromptAgent: boolean;
|
|
16
|
-
};
|
|
17
|
-
/** Track model-visible AGENTS.md state and append updates before later samples. */
|
|
18
|
-
export declare function createRepositoryInstructionsContext(options: RepositoryInstructionsContextOptions): {
|
|
19
|
-
applyUpdate(currentUpdate: AgentLoopTurnUpdate | undefined, currentContext: AgentContext): Promise<AgentLoopTurnUpdate | undefined>;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* In-memory resume helpers for one execution slice.
|
|
3
|
-
*
|
|
4
|
-
* Durable writes go through `saveTurnCheckpoint` only.
|
|
5
|
-
*/
|
|
6
|
-
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
7
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
8
|
-
import type { ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
9
|
-
import { CooperativeTurnYieldError } from "@/chat/runtime/turn";
|
|
10
|
-
import type { AgentRunOutcome } from "@/chat/runtime/agent-run-outcome";
|
|
11
|
-
import type { Actor } from "@/chat/actor";
|
|
12
|
-
import { type AgentTurnSurface, type TurnCheckpoint } from "@/chat/task-execution/checkpoint";
|
|
13
|
-
import { type AuthorizationPauseError } from "@/chat/services/auth-pause";
|
|
14
|
-
import { type AgentTurnUsage } from "@/chat/usage";
|
|
15
|
-
import { type AgentDurability } from "@/chat/agent/types";
|
|
16
|
-
import type { PluginTurnContext } from "@/chat/plugins/prompt";
|
|
17
|
-
interface ResumeStateArgs {
|
|
18
|
-
channelName?: string;
|
|
19
|
-
destination: Destination;
|
|
20
|
-
dispatchId?: string;
|
|
21
|
-
durability: AgentDurability;
|
|
22
|
-
recordActiveMcpProviders: () => Promise<void>;
|
|
23
|
-
actor?: Actor;
|
|
24
|
-
runSource: Source;
|
|
25
|
-
conversationId: string;
|
|
26
|
-
turnId: string;
|
|
27
|
-
checkpoint: TurnCheckpoint;
|
|
28
|
-
startedAtMs: number;
|
|
29
|
-
surface: AgentTurnSurface;
|
|
30
|
-
}
|
|
31
|
-
type AuthPauseOutcome = Extract<AgentRunOutcome, {
|
|
32
|
-
status: "awaiting_auth";
|
|
33
|
-
}>;
|
|
34
|
-
/** Create resume state for one slice. */
|
|
35
|
-
export declare function createResumeState(args: ResumeStateArgs): {
|
|
36
|
-
readonly inputCommitted: boolean;
|
|
37
|
-
readonly beforeMessageCount: number;
|
|
38
|
-
readonly timedOut: boolean;
|
|
39
|
-
setTurnStartMessageIndex(index: number | undefined): void;
|
|
40
|
-
setBeforeMessageCount(count: number): void;
|
|
41
|
-
/** Admit one tool call against the durable turn total, or throw the limit. */
|
|
42
|
-
admitToolCall(): void;
|
|
43
|
-
setTurnContexts(contexts: PluginTurnContext[]): void;
|
|
44
|
-
/** Use an already committed boundary as the resume baseline. */
|
|
45
|
-
adoptCommittedBoundary(messages: PiMessage[]): void;
|
|
46
|
-
captureResumeSnapshot(messages: PiMessage[]): void;
|
|
47
|
-
getResumeSnapshot(currentMessages: PiMessage[]): PiMessage[];
|
|
48
|
-
markTimedOut(): void;
|
|
49
|
-
commitInput(): Promise<void>;
|
|
50
|
-
persistSafeBoundary(messages: PiMessage[], trailingMessageProvenance?: ConversationMessageProvenance[]): Promise<boolean>;
|
|
51
|
-
requireDurableInputCheckpoint(messages: PiMessage[], trailingMessageProvenance?: ConversationMessageProvenance[]): Promise<boolean>;
|
|
52
|
-
prepareYieldIfDue(currentMessages: PiMessage[]): CooperativeTurnYieldError | undefined;
|
|
53
|
-
parkForAuth(pause: AuthorizationPauseError, currentUsage?: AgentTurnUsage): Promise<AuthPauseOutcome>;
|
|
54
|
-
translateSuspension(ending: {
|
|
55
|
-
currentUsage?: AgentTurnUsage;
|
|
56
|
-
error: unknown;
|
|
57
|
-
}): Promise<AgentRunOutcome | undefined>;
|
|
58
|
-
};
|
|
59
|
-
export type ResumeState = ReturnType<typeof createResumeState>;
|
|
60
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
2
|
-
import { type AgentTurnUsage } from "@/chat/usage";
|
|
3
|
-
/**
|
|
4
|
-
* Return usage discarded when a retry keeps an exact prefix of agent history.
|
|
5
|
-
*
|
|
6
|
-
* Retained messages stay in the next phase and must not be counted again here.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDiscardedRetryUsage(messages: PiMessage[], retryMessages: PiMessage[]): AgentTurnUsage | undefined;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent-facing sandbox adaptation.
|
|
3
|
-
*
|
|
4
|
-
* The sandbox module owns provider lifecycle and recovery. This module adds
|
|
5
|
-
* agent-specific preparation, durable reference propagation, custom command
|
|
6
|
-
* routing, and generated-artifact materialization.
|
|
7
|
-
*/
|
|
8
|
-
import type { FileUpload } from "chat";
|
|
9
|
-
import type { PluginSandbox } from "@sentry/junior-plugin-api";
|
|
10
|
-
import { type Actor } from "@/chat/actor";
|
|
11
|
-
import type { LocationConfigurationService } from "@/chat/configuration/types";
|
|
12
|
-
import type { CredentialContext } from "@/chat/credentials/context";
|
|
13
|
-
import type { LogContext } from "@/chat/logging";
|
|
14
|
-
import type { SandboxEgressTracePropagationConfig } from "@/chat/sandbox/egress/tracing";
|
|
15
|
-
import type { SandboxEgressSignalTransport } from "@/chat/sandbox/egress/signals";
|
|
16
|
-
import type { SandboxRef } from "@/chat/sandbox/ref";
|
|
17
|
-
import type { RepositoryInstructions } from "@/chat/repository-instructions";
|
|
18
|
-
import { type SandboxTools } from "@/chat/sandbox/sandbox";
|
|
19
|
-
import type { SandboxWorkspace } from "@/chat/sandbox/workspace";
|
|
20
|
-
import type { Skill, SkillMetadata } from "@/chat/skills";
|
|
21
|
-
import type { Workspace } from "@/chat/workspaces/types";
|
|
22
|
-
import type { GeneratedArtifactFileRef } from "@/chat/tools/sandbox/file-uploads";
|
|
23
|
-
export interface AgentSandboxOptions {
|
|
24
|
-
sandboxRef?: SandboxRef;
|
|
25
|
-
workspace?: Workspace;
|
|
26
|
-
skills: SkillMetadata[];
|
|
27
|
-
traceContext: LogContext;
|
|
28
|
-
tracePropagation?: SandboxEgressTracePropagationConfig;
|
|
29
|
-
egressSignals?: SandboxEgressSignalTransport;
|
|
30
|
-
credentialEgress?: CredentialContext;
|
|
31
|
-
actor?: Actor;
|
|
32
|
-
locationConfiguration?: LocationConfigurationService;
|
|
33
|
-
configurationValues: Record<string, unknown>;
|
|
34
|
-
getActiveSkill(): Skill | null;
|
|
35
|
-
prepareSandbox(workspace: SandboxWorkspace): void | Promise<void>;
|
|
36
|
-
prepareWorkspace?(workspace: SandboxWorkspace, recipe: Workspace, signal?: AbortSignal): Promise<void>;
|
|
37
|
-
onSandboxRefChanged(sandboxRef: SandboxRef): void;
|
|
38
|
-
persistSandboxRef?(sandboxRef: SandboxRef): void | Promise<void>;
|
|
39
|
-
}
|
|
40
|
-
export interface AgentSandbox {
|
|
41
|
-
/** Resolve the AGENTS.md bundle for the selected repository directory. */
|
|
42
|
-
captureRepositoryInstructions(): Promise<RepositoryInstructions | undefined>;
|
|
43
|
-
readonly tools: SandboxTools;
|
|
44
|
-
readonly workspace: SandboxWorkspace;
|
|
45
|
-
sandboxRef(): SandboxRef | undefined;
|
|
46
|
-
switchWorkspace(workspace: Workspace, signal?: AbortSignal): Promise<void>;
|
|
47
|
-
close(): void;
|
|
48
|
-
writeGeneratedArtifacts(files: FileUpload[]): Promise<GeneratedArtifactFileRef[]>;
|
|
49
|
-
}
|
|
50
|
-
/** Adapt agent sandbox execution for plugin-owned workspace tools. */
|
|
51
|
-
export declare function createPluginToolSandbox(sandbox: Pick<AgentSandbox, "tools" | "workspace">, options: {
|
|
52
|
-
handleAuthSignal(details: unknown): Promise<void>;
|
|
53
|
-
}): PluginSandbox;
|
|
54
|
-
/** Create run-scoped sandbox capabilities adapted to the current agent context. */
|
|
55
|
-
export declare function createAgentSandbox(options: AgentSandboxOptions): AgentSandbox;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Skill, type SkillMetadata } from "@/chat/skills";
|
|
2
|
-
import { SkillSandbox } from "@/chat/sandbox/skill-sandbox";
|
|
3
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
4
|
-
/** Upsert a skill into the active skills list by name. */
|
|
5
|
-
export declare function upsertActiveSkill(activeSkills: Skill[], next: Skill): void;
|
|
6
|
-
/** Discover skills for one slice; emits the startup discovery summary once per process. */
|
|
7
|
-
export declare function discoverRunSkills(args: {
|
|
8
|
-
skillDirs?: string[];
|
|
9
|
-
}): Promise<SkillMetadata[]>;
|
|
10
|
-
/** Load the explicit skill, or recover the last skill loaded in a resumed turn. */
|
|
11
|
-
export declare function loadRunSkill(args: {
|
|
12
|
-
activeSkills: Skill[];
|
|
13
|
-
currentTurnMessages: readonly PiMessage[];
|
|
14
|
-
invokedSkill: SkillMetadata | null;
|
|
15
|
-
resumed: boolean;
|
|
16
|
-
skillSandbox: SkillSandbox;
|
|
17
|
-
}): Promise<Skill | null>;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run tool wiring.
|
|
3
|
-
*
|
|
4
|
-
* Builds everything the agent can act through for one run slice: the sandbox
|
|
5
|
-
* access, MCP and plugin auth orchestration, credential-subject-owned MCP
|
|
6
|
-
* provider
|
|
7
|
-
* restoration, and the Pi-facing tool surfaces (main-agent tools plus runtime
|
|
8
|
-
* control tools). Auth pauses raised while restoring providers are thrown
|
|
9
|
-
* here so the run parks before prompting.
|
|
10
|
-
*/
|
|
11
|
-
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
|
12
|
-
import type { FileUpload } from "chat";
|
|
13
|
-
import { SkillSandbox } from "@/chat/sandbox/skill-sandbox";
|
|
14
|
-
import type { Skill, SkillMetadata } from "@/chat/skills";
|
|
15
|
-
import { type PluginHookRunner } from "@/chat/plugins/agent-hooks";
|
|
16
|
-
import { McpToolManager } from "@/chat/mcp/tool-manager";
|
|
17
|
-
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
18
|
-
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
19
|
-
import { type ActiveMcpCatalogSummary } from "@/chat/tool-support/skill/mcp-tool-summary";
|
|
20
|
-
import type { SandboxRef } from "@/chat/sandbox/ref";
|
|
21
|
-
import type { RepositoryInstructions } from "@/chat/repository-instructions";
|
|
22
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
23
|
-
import type { LogContext } from "@/chat/logging";
|
|
24
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
25
|
-
import type { OAuthAuthorization } from "@/chat/oauth-authorization";
|
|
26
|
-
import type { Actor } from "@/chat/actor";
|
|
27
|
-
import type { AuthorizationPauseError } from "@/chat/services/auth-pause";
|
|
28
|
-
import type { AgentTurnSurface } from "@/chat/task-execution/checkpoint";
|
|
29
|
-
import { type AgentDurability, type AgentEvent, type AgentRun, type AgentRunState } from "@/chat/agent/types";
|
|
30
|
-
import type { ResumeState } from "@/chat/agent/resume";
|
|
31
|
-
interface ToolWiringArgs {
|
|
32
|
-
abortAgent: () => void;
|
|
33
|
-
activeSkills: Skill[];
|
|
34
|
-
currentActor?: Actor;
|
|
35
|
-
/** Live projection of the run's committed instruction-authority actors so far. */
|
|
36
|
-
currentActors?: () => Actor[];
|
|
37
|
-
/** Live Pi transcript used to give Guardian bounded action context. */
|
|
38
|
-
currentAgentMessages: () => PiMessage[];
|
|
39
|
-
/** Durable transcript for this turn only, used to restore rejection state. */
|
|
40
|
-
currentTurnMessages: readonly PiMessage[];
|
|
41
|
-
/** Live same-actor instructions that authorize the pending action. */
|
|
42
|
-
currentUserIntent: () => string;
|
|
43
|
-
availableSkills: SkillMetadata[];
|
|
44
|
-
configurationValues: Record<string, unknown>;
|
|
45
|
-
connectedMcpProviders: Set<string>;
|
|
46
|
-
conversationPrivacy?: ConversationPrivacy;
|
|
47
|
-
durability: AgentDurability;
|
|
48
|
-
authorization?: OAuthAuthorization;
|
|
49
|
-
generatedFiles: FileUpload[];
|
|
50
|
-
invokedSkill: SkillMetadata | null;
|
|
51
|
-
onEvent?: (event: AgentEvent) => void | Promise<void>;
|
|
52
|
-
onFatalToolError(error: Error): void;
|
|
53
|
-
onSandboxRefChanged: (sandboxRef: SandboxRef) => void;
|
|
54
|
-
preAgentPromptMessages: () => PiMessage[];
|
|
55
|
-
recordConnectedMcpProvider: (provider: string) => Promise<void>;
|
|
56
|
-
requestHandoff?: ToolRuntimeContext["handoff"];
|
|
57
|
-
resume: ResumeState;
|
|
58
|
-
run: AgentRun;
|
|
59
|
-
skillSandbox: SkillSandbox;
|
|
60
|
-
spanContext: LogContext;
|
|
61
|
-
state: AgentRunState;
|
|
62
|
-
supportsImageInput: () => boolean;
|
|
63
|
-
surface: AgentTurnSurface;
|
|
64
|
-
toolCalls: string[];
|
|
65
|
-
userInput: string;
|
|
66
|
-
}
|
|
67
|
-
export interface ToolWiring {
|
|
68
|
-
activeMcpCatalogs: ActiveMcpCatalogSummary[];
|
|
69
|
-
agentTools: AgentTool[];
|
|
70
|
-
getPendingAuthPause: () => AuthorizationPauseError | undefined;
|
|
71
|
-
mcpToolManager: McpToolManager;
|
|
72
|
-
pluginHooks: PluginHookRunner;
|
|
73
|
-
/** Project core-owned review state into one durable Pi tool result. */
|
|
74
|
-
projectActionReviewResult<TResult extends {
|
|
75
|
-
details?: unknown;
|
|
76
|
-
isError?: boolean;
|
|
77
|
-
}>(toolCallId: string, result: TResult): TResult;
|
|
78
|
-
getSandboxRef: () => SandboxRef | undefined;
|
|
79
|
-
/** Resolve the AGENTS.md bundle selected by the sandbox workspace. */
|
|
80
|
-
captureRepositoryInstructions: () => Promise<RepositoryInstructions | undefined>;
|
|
81
|
-
close(): Promise<void>;
|
|
82
|
-
toolGuidance: Array<{
|
|
83
|
-
name: string;
|
|
84
|
-
promptGuidelines: AnyToolDefinition["promptGuidelines"];
|
|
85
|
-
promptSnippet: AnyToolDefinition["promptSnippet"];
|
|
86
|
-
}>;
|
|
87
|
-
toolRuntimeContext: ToolRuntimeContext;
|
|
88
|
-
}
|
|
89
|
-
/** Wire sandbox, auth orchestration, MCP restoration, and Pi tool surfaces for one slice. */
|
|
90
|
-
export declare function wireAgentTools(args: ToolWiringArgs): Promise<ToolWiring>;
|
|
91
|
-
export {};
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
/** Input for one Run through Junior's agent. */
|
|
2
|
-
import type { Destination, ReplyAttribution, Source, SystemActor } from "@sentry/junior-plugin-api";
|
|
3
|
-
import type { Location } from "@/chat/conversations/location";
|
|
4
|
-
import type { LocationConfigurationService } from "@/chat/configuration/types";
|
|
5
|
-
import type { CredentialContext } from "@/chat/credentials/context";
|
|
6
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
7
|
-
import type { Actor } from "@/chat/actor";
|
|
8
|
-
import type { SandboxRef } from "@/chat/sandbox/ref";
|
|
9
|
-
import type { SandboxEgressTracePropagationConfig } from "@/chat/sandbox/egress/tracing";
|
|
10
|
-
import type { SandboxEgressSignalTransport } from "@/chat/sandbox/egress/signals";
|
|
11
|
-
import type { OAuthAuthorization } from "@/chat/oauth-authorization";
|
|
12
|
-
import type { SlackConversationContext } from "@/chat/slack/conversation-context";
|
|
13
|
-
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
14
|
-
import type { ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
15
|
-
import type { AgentTurnSurface } from "@/chat/task-execution/checkpoint";
|
|
16
|
-
import type { ToolExecutionReport } from "@/chat/tool-support/tool-execution-report";
|
|
17
|
-
import type { SlackActionToken } from "@/chat/slack/action-token";
|
|
18
|
-
import type { TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
19
|
-
import type { ImageGenerateToolDeps, ViewImageToolDeps, WebFetchToolDeps, WebSearchToolDeps } from "@/chat/tools/types";
|
|
20
|
-
import type { AssistantMessage } from "@earendil-works/pi-ai";
|
|
21
|
-
import type { AttachmentStorage } from "@/chat/attachments/storage";
|
|
22
|
-
/** One attachment the model may see for the current instruction. */
|
|
23
|
-
export type AgentAttachment = {
|
|
24
|
-
data?: Buffer;
|
|
25
|
-
mediaType: string;
|
|
26
|
-
filename?: string;
|
|
27
|
-
promptText?: string;
|
|
28
|
-
};
|
|
29
|
-
/** Instruction author metadata used for prompt labels and provenance. */
|
|
30
|
-
export type AgentInstructionActor = {
|
|
31
|
-
authorId?: string;
|
|
32
|
-
authorName?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Slack message ts for the instruction when known.
|
|
35
|
-
* TODO(dcramer): Use a provider-neutral message id after prompt attributes no
|
|
36
|
-
* longer require the Slack timestamp.
|
|
37
|
-
*/
|
|
38
|
-
slackTs?: string;
|
|
39
|
-
};
|
|
40
|
-
/** One mid-turn steered user message drained from the durable mailbox. */
|
|
41
|
-
export type AgentSteeringMessage = {
|
|
42
|
-
actor?: AgentInstructionActor;
|
|
43
|
-
/** Provenance of this queued/steered message, carrying its original author. */
|
|
44
|
-
provenance: ConversationMessageProvenance;
|
|
45
|
-
omittedImageAttachmentCount?: number;
|
|
46
|
-
text: string;
|
|
47
|
-
timestampMs?: number;
|
|
48
|
-
attachments?: AgentAttachment[];
|
|
49
|
-
};
|
|
50
|
-
/** Model-safe input for one asynchronously delegated child-agent task. */
|
|
51
|
-
export type SpawnAgentInput = {
|
|
52
|
-
name?: string;
|
|
53
|
-
reasoningLevel?: TurnReasoningLevel;
|
|
54
|
-
task: string;
|
|
55
|
-
};
|
|
56
|
-
/** Handle returned after a child-agent task is durably scheduled. */
|
|
57
|
-
export type SpawnAgentResult = {
|
|
58
|
-
invocationId: string;
|
|
59
|
-
};
|
|
60
|
-
/** Runtime-bound child-agent capability exposed to model-facing tool wiring. */
|
|
61
|
-
export type SpawnAgent = (input: SpawnAgentInput, options: {
|
|
62
|
-
signal?: AbortSignal;
|
|
63
|
-
toolCallId: string;
|
|
64
|
-
}) => Promise<SpawnAgentResult>;
|
|
65
|
-
/** Current user instruction for one agent-run slice. */
|
|
66
|
-
export type AgentInstruction = {
|
|
67
|
-
text: string;
|
|
68
|
-
attachments?: readonly AgentAttachment[];
|
|
69
|
-
inboundAttachmentCount?: number;
|
|
70
|
-
omittedImageAttachmentCount?: number;
|
|
71
|
-
/** Host-owned turn context shown to the model near the instruction. */
|
|
72
|
-
context?: string;
|
|
73
|
-
actor?: AgentInstructionActor;
|
|
74
|
-
/**
|
|
75
|
-
* When history is present, still include `context` in the prompt. Default is
|
|
76
|
-
* to omit conversation context once durable history already carries it.
|
|
77
|
-
*/
|
|
78
|
-
includeConversationContextWithHistory?: boolean;
|
|
79
|
-
};
|
|
80
|
-
/** Dispatch identity carried on plugin-authored runs. */
|
|
81
|
-
export type AgentDispatch = {
|
|
82
|
-
actor?: SystemActor;
|
|
83
|
-
id: string;
|
|
84
|
-
metadata?: Record<string, string>;
|
|
85
|
-
plugin?: string;
|
|
86
|
-
replyAttribution?: ReplyAttribution;
|
|
87
|
-
};
|
|
88
|
-
/** Optional agent capabilities that a run slice can turn off. */
|
|
89
|
-
export declare const AGENT_RUN_FEATURES: readonly ["handoff", "interactive-auth", "subagents"];
|
|
90
|
-
/** One optional agent capability controlled per run. */
|
|
91
|
-
export type AgentFeature = (typeof AGENT_RUN_FEATURES)[number];
|
|
92
|
-
/** Already-loaded resume state for this conversation. */
|
|
93
|
-
export type AgentRunState = {
|
|
94
|
-
pendingAuth?: ConversationPendingAuthState;
|
|
95
|
-
/** Persisted sandbox reuse state from prior slices of this conversation. */
|
|
96
|
-
sandboxRef?: SandboxRef;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Delivers completed tool-free assistant messages in model order.
|
|
100
|
-
*
|
|
101
|
-
* The runner must commit the preceding agent boundary before invoking this
|
|
102
|
-
* port; the accepted reply transaction appends only this message.
|
|
103
|
-
*
|
|
104
|
-
* TODO(dcramer): Remove Conversation Message persistence from Delivery
|
|
105
|
-
* implementations after the core Turn lifecycle stores each completed
|
|
106
|
-
* assistant Message.
|
|
107
|
-
*/
|
|
108
|
-
export type Delivery = (message: AssistantMessage) => void | Promise<void>;
|
|
109
|
-
/** Resume the agent turn after a transient or ambiguous delivery failure. */
|
|
110
|
-
export declare class RetryableDeliveryError extends Error {
|
|
111
|
-
constructor(cause: unknown);
|
|
112
|
-
}
|
|
113
|
-
/** Durable-worker ports that commit or update resumable run state. */
|
|
114
|
-
export type AgentDurability = {
|
|
115
|
-
/** Schedule delegated work with authority bound by the active parent run. */
|
|
116
|
-
spawnAgent?: SpawnAgent;
|
|
117
|
-
onInputCommitted?: () => void | Promise<void>;
|
|
118
|
-
/** Return true when the durable worker should pause at the next Pi boundary. */
|
|
119
|
-
shouldYield?: () => boolean;
|
|
120
|
-
drainSteeringMessages?: (accept: (messages: AgentSteeringMessage[]) => Promise<void>) => Promise<AgentSteeringMessage[]>;
|
|
121
|
-
recordPendingAuth?: (pendingAuth: ConversationPendingAuthState | undefined) => void | Promise<void>;
|
|
122
|
-
onSandboxRefChanged?: (sandboxRef: SandboxRef) => void | Promise<void>;
|
|
123
|
-
};
|
|
124
|
-
/** Best-effort progress events. Failures here never affect the run. */
|
|
125
|
-
export type AgentEvent = {
|
|
126
|
-
type: "status";
|
|
127
|
-
text: string;
|
|
128
|
-
} | {
|
|
129
|
-
type: "tool_started";
|
|
130
|
-
toolCallId: string;
|
|
131
|
-
toolName: string;
|
|
132
|
-
params: Record<string, unknown>;
|
|
133
|
-
} | {
|
|
134
|
-
type: "tool_finished";
|
|
135
|
-
report: ToolExecutionReport;
|
|
136
|
-
};
|
|
137
|
-
/** Resolved environment and optional per-run tool test overrides. */
|
|
138
|
-
export type AgentEnvironment = {
|
|
139
|
-
attachmentStorage?: AttachmentStorage;
|
|
140
|
-
configuration?: Record<string, unknown>;
|
|
141
|
-
locationConfiguration?: LocationConfigurationService;
|
|
142
|
-
skillDirs?: string[];
|
|
143
|
-
/** Per-slice override for app-owned sandbox egress trace propagation. */
|
|
144
|
-
sandboxTracePropagation?: SandboxEgressTracePropagationConfig;
|
|
145
|
-
/** Per-slice sandbox egress signal storage override. */
|
|
146
|
-
sandboxEgressSignals?: SandboxEgressSignalTransport;
|
|
147
|
-
toolOverrides?: {
|
|
148
|
-
imageGenerate?: ImageGenerateToolDeps;
|
|
149
|
-
viewImage?: ViewImageToolDeps;
|
|
150
|
-
webFetch?: WebFetchToolDeps;
|
|
151
|
-
webSearch?: WebSearchToolDeps;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* One bounded attempt to advance a Turn.
|
|
156
|
-
*
|
|
157
|
-
* Build identity, instruction, history, delivery, and durability here. Bind
|
|
158
|
-
* stable model/stream composition when creating the runner, not on each run.
|
|
159
|
-
*/
|
|
160
|
-
export type AgentRun = {
|
|
161
|
-
/** Durable conversation advanced by this run. */
|
|
162
|
-
conversationId: string;
|
|
163
|
-
/** Stable turn advanced across this run and any continuation runs. */
|
|
164
|
-
turnId: string;
|
|
165
|
-
/** Optional bounded-run identifier used only for observability. */
|
|
166
|
-
runId?: string;
|
|
167
|
-
instruction: AgentInstruction;
|
|
168
|
-
/** Durable Pi transcript for this conversation, excluding ephemeral turn context. */
|
|
169
|
-
history?: readonly PiMessage[];
|
|
170
|
-
/**
|
|
171
|
-
* Who this run executes as. Prefer always setting this. Derive
|
|
172
|
-
* `credentialContext` with `credentialContextForActor(actor, subject?)`
|
|
173
|
-
* unless a caller already bound credentials.
|
|
174
|
-
*/
|
|
175
|
-
actor?: Actor;
|
|
176
|
-
/** Credential authority projected from actor (plus optional subject). */
|
|
177
|
-
credentialContext?: CredentialContext;
|
|
178
|
-
source: Source;
|
|
179
|
-
/** Conversation Location available to this Run. */
|
|
180
|
-
location?: Location;
|
|
181
|
-
destination: Destination;
|
|
182
|
-
surface?: AgentTurnSurface;
|
|
183
|
-
dispatch?: AgentDispatch;
|
|
184
|
-
/**
|
|
185
|
-
* TODO(dcramer): Move ephemeral Slack credentials and conversation labels into
|
|
186
|
-
* provider-owned tool/prompt context so the shared run edge stays neutral.
|
|
187
|
-
*/
|
|
188
|
-
slackConversation?: SlackConversationContext;
|
|
189
|
-
slackActionToken?: SlackActionToken;
|
|
190
|
-
toolChannelId?: string;
|
|
191
|
-
/** Surface-owned OAuth state and private delivery capabilities. */
|
|
192
|
-
authorization?: OAuthAuthorization;
|
|
193
|
-
/**
|
|
194
|
-
* Optional agent capabilities disabled for this run slice.
|
|
195
|
-
* `interactive-auth` blocks pausing to send an OAuth link; missing credentials
|
|
196
|
-
* hard-fail instead. Default is enabled when omitted.
|
|
197
|
-
* TODO(dcramer): Issues #881 and #883 track a path for child invocations to
|
|
198
|
-
* force interactive auth when a delegated tool requires credentials the
|
|
199
|
-
* parent can already request. Children currently disable it.
|
|
200
|
-
*/
|
|
201
|
-
disabledFeatures?: readonly AgentFeature[];
|
|
202
|
-
/** Absolute wall-clock deadline for this host request, in milliseconds. */
|
|
203
|
-
deadlineAtMs?: number;
|
|
204
|
-
/** Cancels provider work when the owning host request is abandoned. */
|
|
205
|
-
signal?: AbortSignal;
|
|
206
|
-
/** Explicit per-agent reasoning level. When set, adaptive routing is disabled. */
|
|
207
|
-
reasoning?: TurnReasoningLevel;
|
|
208
|
-
environment?: AgentEnvironment;
|
|
209
|
-
state?: AgentRunState;
|
|
210
|
-
/** Best-effort progress only. */
|
|
211
|
-
onEvent?: (event: AgentEvent) => void | Promise<void>;
|
|
212
|
-
delivery?: Delivery;
|
|
213
|
-
durability?: AgentDurability;
|
|
214
|
-
};
|
|
215
|
-
/** Return whether one optional agent capability is disabled for this run. */
|
|
216
|
-
export declare function isAgentRunFeatureDisabled(disabledFeatures: readonly AgentFeature[] | undefined, feature: AgentFeature): boolean;
|
|
217
|
-
/** Resolve the explicit actor, dispatch actor, or credential actor for this run. */
|
|
218
|
-
export declare function actorFromRun(run: Pick<AgentRun, "actor" | "dispatch" | "credentialContext">): Actor | undefined;
|
|
219
|
-
/** Reject contradictory provider coordinates before the run touches state. */
|
|
220
|
-
export declare function assertRunConsistency(run: Pick<AgentRun, "conversationId" | "source" | "location" | "destination" | "surface" | "actor" | "dispatch">): void;
|
|
221
|
-
/** Route tool side effects to the tool channel when one overrides the destination. */
|
|
222
|
-
export declare function toolInvocationDestination(run: Pick<AgentRun, "destination" | "toolChannelId">): Destination;
|
|
223
|
-
/** Infer the run surface when the caller did not state one. */
|
|
224
|
-
export declare function surfaceFromRun(run: Pick<AgentRun, "surface" | "source">): AgentTurnSurface;
|