agent-afk 5.1.0 → 5.2.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/_lib/skill-sink-channel.d.ts +3 -0
- package/dist/agent/_lib/trusted-skill-events.d.ts +7 -0
- package/dist/agent/_lib/trusted-skill-registry.d.ts +3 -0
- package/dist/agent/abort-graph.d.ts +20 -0
- package/dist/agent/afk-channel.d.ts +9 -0
- package/dist/agent/afk-ledger-channel.d.ts +23 -0
- package/dist/agent/afk-mode-gate.d.ts +3 -0
- package/dist/agent/auth/credential-resolver.d.ts +3 -0
- package/dist/agent/auth/keychain.d.ts +4 -0
- package/dist/agent/awareness/index.d.ts +6 -0
- package/dist/agent/awareness/presence.d.ts +25 -0
- package/dist/agent/awareness/runtime-snapshot.d.ts +13 -0
- package/dist/agent/awareness/runtime-source.d.ts +18 -0
- package/dist/agent/awareness/tool.d.ts +7 -0
- package/dist/agent/awareness/types.d.ts +60 -0
- package/dist/agent/awareness/workspace-source.d.ts +2 -0
- package/dist/agent/background-registry.d.ts +57 -0
- package/dist/agent/background-summarizer.d.ts +43 -0
- package/dist/agent/bg-job-log.d.ts +41 -0
- package/dist/agent/daemon/gates.d.ts +20 -0
- package/dist/agent/daemon/http-client.d.ts +6 -0
- package/dist/agent/daemon/idle-detector.d.ts +7 -0
- package/dist/agent/daemon/queue-store.d.ts +13 -0
- package/dist/agent/daemon/schedule-store.d.ts +20 -0
- package/dist/agent/daemon/scheduler.d.ts +64 -0
- package/dist/agent/daemon/triggers.d.ts +10 -0
- package/dist/agent/daemon.d.ts +29 -0
- package/dist/agent/dag-subagent.d.ts +28 -0
- package/dist/agent/dag.d.ts +26 -0
- package/dist/agent/default-hook-registry.d.ts +23 -0
- package/dist/agent/elicitation-router.d.ts +20 -0
- package/dist/agent/facets/derive.d.ts +7 -0
- package/dist/agent/facets/index.d.ts +3 -0
- package/dist/agent/facets/raw-input.d.ts +3 -0
- package/dist/agent/facets/schema.d.ts +139 -0
- package/dist/agent/facets/store.d.ts +9 -0
- package/dist/agent/gh.d.ts +41 -0
- package/dist/agent/hook-registry.d.ts +9 -0
- package/dist/agent/hooks/command-executor.d.ts +12 -0
- package/dist/agent/hooks/config-bridge.d.ts +7 -0
- package/dist/agent/hooks/config-loader.d.ts +44 -0
- package/dist/agent/hooks.d.ts +88 -0
- package/dist/agent/index.d.ts +31 -0
- package/dist/agent/marketplaces/install.d.ts +23 -0
- package/dist/agent/marketplaces/manifest.d.ts +21 -0
- package/dist/agent/marketplaces/remove.d.ts +11 -0
- package/dist/agent/marketplaces/resolve.d.ts +27 -0
- package/dist/agent/marketplaces/update.d.ts +38 -0
- package/dist/agent/mcp/client.d.ts +28 -0
- package/dist/agent/mcp/config-loader.d.ts +22 -0
- package/dist/agent/mcp/env.d.ts +6 -0
- package/dist/agent/mcp/index.d.ts +8 -0
- package/dist/agent/mcp/manager.d.ts +23 -0
- package/dist/agent/mcp/naming.d.ts +20 -0
- package/dist/agent/mcp/oauth.d.ts +33 -0
- package/dist/agent/mcp/transport.d.ts +16 -0
- package/dist/agent/mcp/types.d.ts +22 -0
- package/dist/agent/memory/index.d.ts +5 -0
- package/dist/agent/memory/memory-evidence.d.ts +9 -0
- package/dist/agent/memory/memory-hooks.d.ts +3 -0
- package/dist/agent/memory/memory-loader.d.ts +3 -0
- package/dist/agent/memory/memory-store.d.ts +36 -0
- package/dist/agent/memory/memory-tool-renderers.d.ts +3 -0
- package/dist/agent/memory/memory-tools.d.ts +8 -0
- package/dist/agent/memory/types.d.ts +70 -0
- package/dist/agent/model-capabilities.d.ts +1 -0
- package/dist/agent/model-limits.d.ts +5 -0
- package/dist/agent/output-extractor.d.ts +1 -0
- package/dist/agent/permission-policy.d.ts +2 -0
- package/dist/agent/permissions-store.d.ts +28 -0
- package/dist/agent/permissions.d.ts +28 -0
- package/dist/agent/plan-mode-exit-prompt.d.ts +1 -0
- package/dist/agent/plan-mode-gate.d.ts +3 -0
- package/dist/agent/plugins/git-test-helpers.d.ts +2 -0
- package/dist/agent/plugins/git.d.ts +21 -0
- package/dist/agent/plugins/index-store.d.ts +32 -0
- package/dist/agent/plugins/install.d.ts +23 -0
- package/dist/agent/plugins/inventory.d.ts +16 -0
- package/dist/agent/plugins/load-entrypoints.d.ts +7 -0
- package/dist/agent/plugins/plugin-manifest.d.ts +5 -0
- package/dist/agent/plugins/remove.d.ts +10 -0
- package/dist/agent/plugins/source.d.ts +23 -0
- package/dist/agent/plugins/tool-injector.d.ts +18 -0
- package/dist/agent/plugins/update.d.ts +33 -0
- package/dist/agent/plugins/versions.d.ts +1 -0
- package/dist/agent/plugins-scanner.d.ts +9 -0
- package/dist/agent/provider.d.ts +212 -0
- package/dist/agent/providers/anthropic-direct/afk-mode-addendum.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/auth.d.ts +16 -0
- package/dist/agent/providers/anthropic-direct/cache-policy.d.ts +7 -0
- package/dist/agent/providers/anthropic-direct/compact.d.ts +10 -0
- package/dist/agent/providers/anthropic-direct/index.d.ts +75 -0
- package/dist/agent/providers/anthropic-direct/loop.d.ts +8 -0
- package/dist/agent/providers/anthropic-direct/oneshot.d.ts +15 -0
- package/dist/agent/providers/anthropic-direct/plan-mode-addendum.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/query/abort-coordinator.d.ts +15 -0
- package/dist/agent/providers/anthropic-direct/query/auto-compact.d.ts +15 -0
- package/dist/agent/providers/anthropic-direct/query/compact-handler.d.ts +12 -0
- package/dist/agent/providers/anthropic-direct/query/repair-orphan-tool-uses.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/query/retry-layer.d.ts +30 -0
- package/dist/agent/providers/anthropic-direct/query/session-state.d.ts +23 -0
- package/dist/agent/providers/anthropic-direct/query.d.ts +73 -0
- package/dist/agent/providers/anthropic-direct/resolve-params.d.ts +8 -0
- package/dist/agent/providers/anthropic-direct/tool-dispatcher.d.ts +7 -0
- package/dist/agent/providers/anthropic-direct/translate.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/types.d.ts +122 -0
- package/dist/agent/providers/anthropic-direct/usage-limit.d.ts +21 -0
- package/dist/agent/providers/index.d.ts +16 -0
- package/dist/agent/providers/openai-compatible/auth.d.ts +32 -0
- package/dist/agent/providers/openai-compatible/index.d.ts +53 -0
- package/dist/agent/providers/openai-compatible/loop.d.ts +47 -0
- package/dist/agent/providers/openai-compatible/messages.d.ts +33 -0
- package/dist/agent/providers/openai-compatible/oneshot.d.ts +17 -0
- package/dist/agent/providers/openai-compatible/query.d.ts +79 -0
- package/dist/agent/providers/openai-compatible/responses-config.d.ts +14 -0
- package/dist/agent/providers/openai-compatible/responses-messages.d.ts +54 -0
- package/dist/agent/providers/openai-compatible/responses-translate.d.ts +30 -0
- package/dist/agent/providers/openai-compatible/translate.d.ts +53 -0
- package/dist/agent/providers/router/provider-router.d.ts +55 -0
- package/dist/agent/query.d.ts +11 -0
- package/dist/agent/risk-classifier.d.ts +6 -0
- package/dist/agent/routing-directive.d.ts +5 -0
- package/dist/agent/routing-telemetry.d.ts +36 -0
- package/dist/agent/session/agent-session.d.ts +95 -0
- package/dist/agent/session/closure-guidance.d.ts +3 -0
- package/dist/agent/session/closure-reason.d.ts +11 -0
- package/dist/agent/session/hooks-dispatch.d.ts +9 -0
- package/dist/agent/session/input-iterable.d.ts +10 -0
- package/dist/agent/session/model-resolution.d.ts +5 -0
- package/dist/agent/session/model-slots.d.ts +24 -0
- package/dist/agent/session/phase-reducer.d.ts +3 -0
- package/dist/agent/session/prompt-dump.d.ts +33 -0
- package/dist/agent/session/session-identity.d.ts +6 -0
- package/dist/agent/session/session-setup.d.ts +6 -0
- package/dist/agent/session/session-state.d.ts +20 -0
- package/dist/agent/session/slot-credentials.d.ts +8 -0
- package/dist/agent/session/stream-consumer.d.ts +22 -0
- package/dist/agent/session-ledger.d.ts +81 -0
- package/dist/agent/session-ref.d.ts +4 -0
- package/dist/agent/session.d.ts +1 -0
- package/dist/agent/shadow-verify-nudge.d.ts +2 -0
- package/dist/agent/shell-jobs/index.d.ts +2 -0
- package/dist/agent/shell-jobs/registry.d.ts +36 -0
- package/dist/agent/shell-jobs/streamer.d.ts +33 -0
- package/dist/agent/signal-block.d.ts +45 -0
- package/dist/agent/subagent/handle.d.ts +51 -0
- package/dist/agent/subagent/result.d.ts +51 -0
- package/dist/agent/subagent/wave.d.ts +11 -0
- package/dist/agent/subagent-hooks.d.ts +12 -0
- package/dist/agent/subagent.d.ts +66 -0
- package/dist/agent/timeout.d.ts +7 -0
- package/dist/agent/tool-category.d.ts +9 -0
- package/dist/agent/tools/child-credential.d.ts +6 -0
- package/dist/agent/tools/compose-executor.d.ts +29 -0
- package/dist/agent/tools/custom-tool.d.ts +7 -0
- package/dist/agent/tools/dispatcher.d.ts +75 -0
- package/dist/agent/tools/handlers/_cwd-utils.d.ts +9 -0
- package/dist/agent/tools/handlers/ask-question.d.ts +2 -0
- package/dist/agent/tools/handlers/bash.d.ts +3 -0
- package/dist/agent/tools/handlers/browser-act.d.ts +4 -0
- package/dist/agent/tools/handlers/browser-close.d.ts +4 -0
- package/dist/agent/tools/handlers/browser-observe.d.ts +4 -0
- package/dist/agent/tools/handlers/browser-open.d.ts +6 -0
- package/dist/agent/tools/handlers/browser-screenshot.d.ts +4 -0
- package/dist/agent/tools/handlers/config-ops.d.ts +3 -0
- package/dist/agent/tools/handlers/edit-file.d.ts +2 -0
- package/dist/agent/tools/handlers/exit-plan-mode.d.ts +5 -0
- package/dist/agent/tools/handlers/glob.d.ts +3 -0
- package/dist/agent/tools/handlers/grep.d.ts +3 -0
- package/dist/agent/tools/handlers/index.d.ts +21 -0
- package/dist/agent/tools/handlers/list-directory.d.ts +2 -0
- package/dist/agent/tools/handlers/playwright-hints.d.ts +5 -0
- package/dist/agent/tools/handlers/read-file.d.ts +2 -0
- package/dist/agent/tools/handlers/schedules.d.ts +7 -0
- package/dist/agent/tools/handlers/send-telegram.d.ts +6 -0
- package/dist/agent/tools/handlers/terminal-font-size.d.ts +15 -0
- package/dist/agent/tools/handlers/test-runner-detector.d.ts +8 -0
- package/dist/agent/tools/handlers/web-scrape.d.ts +11 -0
- package/dist/agent/tools/handlers/write-denylist.d.ts +4 -0
- package/dist/agent/tools/handlers/write-file.d.ts +2 -0
- package/dist/agent/tools/hooks/bash-restriction-hook.d.ts +8 -0
- package/dist/agent/tools/hooks/path-approval-hook.d.ts +14 -0
- package/dist/agent/tools/index.d.ts +7 -0
- package/dist/agent/tools/nesting.d.ts +29 -0
- package/dist/agent/tools/permissions.d.ts +10 -0
- package/dist/agent/tools/readonly-bash.d.ts +4 -0
- package/dist/agent/tools/render-registry.d.ts +3 -0
- package/dist/agent/tools/renderers/bash-renderer.d.ts +1 -0
- package/dist/agent/tools/schemas.d.ts +29 -0
- package/dist/agent/tools/skill-bridge.d.ts +21 -0
- package/dist/agent/tools/skill-depth-message.d.ts +2 -0
- package/dist/agent/tools/skill-executor.d.ts +45 -0
- package/dist/agent/tools/subagent-executor.d.ts +57 -0
- package/dist/agent/tools/system-prompt.d.ts +6 -0
- package/dist/agent/tools/types.d.ts +17 -0
- package/dist/agent/trace/emit.d.ts +12 -0
- package/dist/agent/trace/events.d.ts +1052 -0
- package/dist/agent/trace/factory.d.ts +10 -0
- package/dist/agent/trace/index.d.ts +4 -0
- package/dist/agent/trace/receipt.d.ts +92 -0
- package/dist/agent/trace/types.d.ts +307 -0
- package/dist/agent/trace/writer.d.ts +42 -0
- package/dist/agent/transcript-search/transcript-index.d.ts +21 -0
- package/dist/agent/trusted-skill-result.d.ts +9 -0
- package/dist/agent/types/config-types.d.ts +86 -0
- package/dist/agent/types/message-types.d.ts +77 -0
- package/dist/agent/types/model-types.d.ts +2 -0
- package/dist/agent/types/permission-types.d.ts +8 -0
- package/dist/agent/types/sdk-types.d.ts +282 -0
- package/dist/agent/types/session-types.d.ts +134 -0
- package/dist/agent/types.d.ts +6 -0
- package/dist/agent/usage.d.ts +2 -0
- package/dist/agent/worktree-sweep.d.ts +52 -0
- package/dist/agent/worktree.d.ts +56 -0
- package/dist/browser/config.d.ts +13 -0
- package/dist/browser/playwright/index.d.ts +21 -0
- package/dist/browser/playwright/launcher.d.ts +32 -0
- package/dist/browser/playwright/observe.d.ts +12 -0
- package/dist/browser/playwright/resolve-target.d.ts +10 -0
- package/dist/browser/provider.d.ts +15 -0
- package/dist/browser/registry.d.ts +7 -0
- package/dist/browser/sanitize.d.ts +22 -0
- package/dist/browser/types.d.ts +139 -0
- package/dist/browser/witness.d.ts +11 -0
- package/dist/changelog.d.ts +13 -0
- package/dist/cli/_lib/capture-mode.d.ts +8 -0
- package/dist/cli/_lib/commit-block.d.ts +4 -0
- package/dist/cli/_lib/commit-coordinator.d.ts +13 -0
- package/dist/cli/_lib/dedup-line-writer.d.ts +5 -0
- package/dist/cli/_lib/overlay-composer.d.ts +18 -0
- package/dist/cli/_lib/sanitize.d.ts +1 -0
- package/dist/cli/_lib/stream-renderer-contexts.d.ts +43 -0
- package/dist/cli/_lib/stream-renderer-lifecycle.d.ts +33 -0
- package/dist/cli/_lib/stream-renderer-orchestrator-emit.d.ts +10 -0
- package/dist/cli/_lib/stream-renderer-orchestrator.d.ts +30 -0
- package/dist/cli/_lib/stream-renderer-source.d.ts +27 -0
- package/dist/cli/_lib/stream-renderer-subagent-helpers.d.ts +6 -0
- package/dist/cli/_lib/stream-renderer-subagent.d.ts +22 -0
- package/dist/cli/_lib/stream-renderer.d.ts +68 -0
- package/dist/cli/_lib/testing/virtual-screen.d.ts +54 -0
- package/dist/cli/afk-mode-toggle.d.ts +2 -0
- package/dist/cli/auth-wizard.d.ts +4 -0
- package/dist/cli/background/types.d.ts +8 -0
- package/dist/cli/background-status-bar.d.ts +37 -0
- package/dist/cli/clipboard.d.ts +7 -0
- package/dist/cli/color-config.d.ts +1 -0
- package/dist/cli/commands/bg.d.ts +2 -0
- package/dist/cli/commands/browser.d.ts +11 -0
- package/dist/cli/commands/chat.d.ts +2 -0
- package/dist/cli/commands/completion.d.ts +2 -0
- package/dist/cli/commands/config-command.d.ts +2 -0
- package/dist/cli/commands/daemon.d.ts +14 -0
- package/dist/cli/commands/doctor-checks.d.ts +19 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/farm.d.ts +40 -0
- package/dist/cli/commands/improve.d.ts +2 -0
- package/dist/cli/commands/interactive/afk-push.d.ts +14 -0
- package/dist/cli/commands/interactive/at-file-inject.d.ts +17 -0
- package/dist/cli/commands/interactive/boot-prune.d.ts +8 -0
- package/dist/cli/commands/interactive/bootstrap.d.ts +30 -0
- package/dist/cli/commands/interactive/context-pane.d.ts +11 -0
- package/dist/cli/commands/interactive/footer-subsystems.d.ts +15 -0
- package/dist/cli/commands/interactive/loop-iteration.d.ts +7 -0
- package/dist/cli/commands/interactive/loop-stage.d.ts +34 -0
- package/dist/cli/commands/interactive/progress-banner.d.ts +5 -0
- package/dist/cli/commands/interactive/provider-factory.d.ts +2 -0
- package/dist/cli/commands/interactive/repl-loop-shared.d.ts +10 -0
- package/dist/cli/commands/interactive/repl-loop.d.ts +6 -0
- package/dist/cli/commands/interactive/repl-renderer.d.ts +16 -0
- package/dist/cli/commands/interactive/resume-swap.d.ts +23 -0
- package/dist/cli/commands/interactive/shared.d.ts +116 -0
- package/dist/cli/commands/interactive/shell-passthrough.d.ts +33 -0
- package/dist/cli/commands/interactive/surface-setup.d.ts +12 -0
- package/dist/cli/commands/interactive/terminal-state.d.ts +18 -0
- package/dist/cli/commands/interactive/thinking-lane.d.ts +18 -0
- package/dist/cli/commands/interactive/thinking-paragraph.d.ts +5 -0
- package/dist/cli/commands/interactive/tool-lane-format-args.d.ts +4 -0
- package/dist/cli/commands/interactive/tool-lane-format-diff.d.ts +4 -0
- package/dist/cli/commands/interactive/tool-lane-format-sanitize.d.ts +2 -0
- package/dist/cli/commands/interactive/tool-lane-format.d.ts +14 -0
- package/dist/cli/commands/interactive/tool-lane-render-agent.d.ts +7 -0
- package/dist/cli/commands/interactive/tool-lane-render-children.d.ts +4 -0
- package/dist/cli/commands/interactive/tool-lane-render-grouping-overflow.d.ts +15 -0
- package/dist/cli/commands/interactive/tool-lane-render-grouping.d.ts +23 -0
- package/dist/cli/commands/interactive/tool-lane-render.d.ts +45 -0
- package/dist/cli/commands/interactive/tool-lane.d.ts +31 -0
- package/dist/cli/commands/interactive/transcript.d.ts +9 -0
- package/dist/cli/commands/interactive/turn-handler.d.ts +16 -0
- package/dist/cli/commands/interactive/verdict-card.d.ts +3 -0
- package/dist/cli/commands/interactive/verdict-ledger.d.ts +19 -0
- package/dist/cli/commands/interactive/worktree-autoname.d.ts +42 -0
- package/dist/cli/commands/interactive/worktree.d.ts +33 -0
- package/dist/cli/commands/interactive.d.ts +11 -0
- package/dist/cli/commands/login-command.d.ts +5 -0
- package/dist/cli/commands/marketplace.d.ts +8 -0
- package/dist/cli/commands/migrate.d.ts +14 -0
- package/dist/cli/commands/plugin.d.ts +7 -0
- package/dist/cli/commands/provider.d.ts +9 -0
- package/dist/cli/commands/queue.d.ts +2 -0
- package/dist/cli/commands/schedule.d.ts +2 -0
- package/dist/cli/commands/service.d.ts +2 -0
- package/dist/cli/commands/shell-init.d.ts +6 -0
- package/dist/cli/commands/skill-router.d.ts +9 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/telegram.d.ts +2 -0
- package/dist/cli/commands/trace.d.ts +25 -0
- package/dist/cli/commands/transcript.d.ts +4 -0
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/worktree.d.ts +2 -0
- package/dist/cli/commit-mode.d.ts +25 -0
- package/dist/cli/config.d.ts +69 -0
- package/dist/cli/constants.d.ts +4 -0
- package/dist/cli/context-bar.d.ts +8 -0
- package/dist/cli/context-sampler.d.ts +43 -0
- package/dist/cli/context-sparkline.d.ts +1 -0
- package/dist/cli/cup-frame-renderer.d.ts +18 -0
- package/dist/cli/daemon-options.d.ts +11 -0
- package/dist/cli/debug-banner.d.ts +2 -0
- package/dist/cli/display.d.ts +19 -0
- package/dist/cli/elicitation-repl.d.ts +26 -0
- package/dist/cli/errors/classifier.d.ts +9 -0
- package/dist/cli/errors/index.d.ts +4 -0
- package/dist/cli/errors/presenter.d.ts +5 -0
- package/dist/cli/format-cwd.d.ts +5 -0
- package/dist/cli/format-utils.d.ts +4 -0
- package/dist/cli/formatter.d.ts +27 -0
- package/dist/cli/git-status-sampler.d.ts +43 -0
- package/dist/cli/hyperlink.d.ts +6 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/input/attachments.d.ts +10 -0
- package/dist/cli/input/autocomplete-state.d.ts +11 -0
- package/dist/cli/input/caret-blink.d.ts +21 -0
- package/dist/cli/input/clipboard-image.d.ts +2 -0
- package/dist/cli/input/dropdown.d.ts +4 -0
- package/dist/cli/input/echo.d.ts +12 -0
- package/dist/cli/input/emit-keypress.d.ts +1 -0
- package/dist/cli/input/history.d.ts +15 -0
- package/dist/cli/input/input-surface.d.ts +63 -0
- package/dist/cli/input/non-tty.d.ts +2 -0
- package/dist/cli/input/raw-mode.d.ts +4 -0
- package/dist/cli/input/reader.d.ts +2 -0
- package/dist/cli/input/selectors.d.ts +3 -0
- package/dist/cli/input/spinner.d.ts +19 -0
- package/dist/cli/input/stdin-claim.d.ts +7 -0
- package/dist/cli/input/suggest.d.ts +36 -0
- package/dist/cli/input/trigger.d.ts +5 -0
- package/dist/cli/input/types.d.ts +53 -0
- package/dist/cli/input-box.d.ts +5 -0
- package/dist/cli/input-core.d.ts +37 -0
- package/dist/cli/input-highlight.d.ts +4 -0
- package/dist/cli/keychain.d.ts +1 -0
- package/dist/cli/loading-tips.d.ts +14 -0
- package/dist/cli/markdown-stream-format.d.ts +30 -0
- package/dist/cli/markdown-stream.d.ts +39 -0
- package/dist/cli/mascot.d.ts +6 -0
- package/dist/cli/model-limits.d.ts +1 -0
- package/dist/cli/multi-line-reader.d.ts +16 -0
- package/dist/cli/palette.d.ts +29 -0
- package/dist/cli/permission-mode-cycle.d.ts +3 -0
- package/dist/cli/plan-mode-toggle.d.ts +2 -0
- package/dist/cli/render/box.d.ts +8 -0
- package/dist/cli/render/card.d.ts +8 -0
- package/dist/cli/render/divider.d.ts +1 -0
- package/dist/cli/render/error-box.d.ts +1 -0
- package/dist/cli/render/help-table.d.ts +9 -0
- package/dist/cli/render/index.d.ts +9 -0
- package/dist/cli/render/picker.d.ts +15 -0
- package/dist/cli/render/progress-bar.d.ts +1 -0
- package/dist/cli/render/status-panel.d.ts +7 -0
- package/dist/cli/render/text-input.d.ts +9 -0
- package/dist/cli/render/usage-limit-box.d.ts +7 -0
- package/dist/cli/render/utils.d.ts +2 -0
- package/dist/cli/render/welcome-banner.d.ts +10 -0
- package/dist/cli/render.d.ts +1 -0
- package/dist/cli/resume-command.d.ts +3 -0
- package/dist/cli/resume-session.d.ts +13 -0
- package/dist/cli/session-name.d.ts +1 -0
- package/dist/cli/session-store.d.ts +51 -0
- package/dist/cli/shared-helpers.d.ts +33 -0
- package/dist/cli/slash/_lib/command-tags.d.ts +9 -0
- package/dist/cli/slash/_lib/create-skill-renderer.d.ts +9 -0
- package/dist/cli/slash/_lib/flag-harvest.d.ts +9 -0
- package/dist/cli/slash/_lib/image-blocks.d.ts +3 -0
- package/dist/cli/slash/_lib/review-post.d.ts +30 -0
- package/dist/cli/slash/_lib/run-skill-dispatch-turn.d.ts +11 -0
- package/dist/cli/slash/_lib/skill-message-bridge.d.ts +4 -0
- package/dist/cli/slash/_lib/skill-sink-channel.d.ts +1 -0
- package/dist/cli/slash/_lib/user-payload.d.ts +3 -0
- package/dist/cli/slash/builtin-skills.d.ts +4 -0
- package/dist/cli/slash/commands/afk.d.ts +2 -0
- package/dist/cli/slash/commands/allow-dir.d.ts +14 -0
- package/dist/cli/slash/commands/bgsub.d.ts +11 -0
- package/dist/cli/slash/commands/changelog.d.ts +2 -0
- package/dist/cli/slash/commands/config-doctor.d.ts +2 -0
- package/dist/cli/slash/commands/core.d.ts +2 -0
- package/dist/cli/slash/commands/font-size.d.ts +4 -0
- package/dist/cli/slash/commands/fork.d.ts +4 -0
- package/dist/cli/slash/commands/info.d.ts +2 -0
- package/dist/cli/slash/commands/init.d.ts +2 -0
- package/dist/cli/slash/commands/keys.d.ts +2 -0
- package/dist/cli/slash/commands/name.d.ts +2 -0
- package/dist/cli/slash/commands/plan.d.ts +2 -0
- package/dist/cli/slash/commands/reauth.d.ts +2 -0
- package/dist/cli/slash/commands/resume.d.ts +2 -0
- package/dist/cli/slash/commands/save.d.ts +2 -0
- package/dist/cli/slash/commands/sh.d.ts +4 -0
- package/dist/cli/slash/commands/stats.d.ts +2 -0
- package/dist/cli/slash/commands/todo.d.ts +2 -0
- package/dist/cli/slash/commands/transcript.d.ts +2 -0
- package/dist/cli/slash/commands/worktree.d.ts +2 -0
- package/dist/cli/slash/index.d.ts +3 -0
- package/dist/cli/slash/marketplace-browse.d.ts +1 -0
- package/dist/cli/slash/plugin-agents.d.ts +5 -0
- package/dist/cli/slash/plugin-skills.d.ts +32 -0
- package/dist/cli/slash/preflight/artifact-dir.d.ts +3 -0
- package/dist/cli/slash/preflight/index.d.ts +6 -0
- package/dist/cli/slash/preflight/registry.d.ts +8 -0
- package/dist/cli/slash/preflight/review-pr.d.ts +34 -0
- package/dist/cli/slash/preflight/stitch-forward.d.ts +1 -0
- package/dist/cli/slash/preflight/types.d.ts +18 -0
- package/dist/cli/slash/registry-exports.d.ts +2 -0
- package/dist/cli/slash/registry.d.ts +23 -0
- package/dist/cli/slash/session-stats.d.ts +6 -0
- package/dist/cli/slash/types.d.ts +103 -0
- package/dist/cli/slash/writer.d.ts +6 -0
- package/dist/cli/status-line.d.ts +51 -0
- package/dist/cli/syntax-highlight.d.ts +1 -0
- package/dist/cli/syntax-theme.d.ts +2 -0
- package/dist/cli/terminal-compositor.autocomplete.d.ts +16 -0
- package/dist/cli/terminal-compositor.committed-band-commit.d.ts +24 -0
- package/dist/cli/terminal-compositor.committed-band-repin.d.ts +3 -0
- package/dist/cli/terminal-compositor.committed-band.d.ts +2 -0
- package/dist/cli/terminal-compositor.d.ts +118 -0
- package/dist/cli/terminal-compositor.frame-preserve.d.ts +3 -0
- package/dist/cli/terminal-compositor.frame.d.ts +33 -0
- package/dist/cli/terminal-compositor.input-dispatch.d.ts +42 -0
- package/dist/cli/terminal-compositor.input-mode.d.ts +26 -0
- package/dist/cli/terminal-compositor.lifecycle.d.ts +40 -0
- package/dist/cli/terminal-compositor.paste.d.ts +16 -0
- package/dist/cli/terminal-compositor.render.d.ts +17 -0
- package/dist/cli/terminal-compositor.reset.d.ts +36 -0
- package/dist/cli/terminal-compositor.types.d.ts +80 -0
- package/dist/cli/terminal-size.d.ts +9 -0
- package/dist/cli/terminal-spawn/detect.d.ts +3 -0
- package/dist/cli/terminal-spawn/index.d.ts +29 -0
- package/dist/cli/terminal-spawn/spawners.d.ts +18 -0
- package/dist/cli/todo-panel.d.ts +18 -0
- package/dist/cli/tool-category.d.ts +9 -0
- package/dist/cli/trusted-skill-badge.d.ts +19 -0
- package/dist/cli/trusted-skill-ledger.d.ts +16 -0
- package/dist/cli/trusted-skills-registered.d.ts +1 -0
- package/dist/cli/update-checker.d.ts +10 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/wrap.d.ts +4 -0
- package/dist/cli.mjs +410 -408
- package/dist/config/env.d.ts +136 -0
- package/dist/config/import-sources.d.ts +46 -0
- package/dist/config/mutate.d.ts +78 -0
- package/dist/config/settable-keys.d.ts +44 -0
- package/dist/improve/eval-gen/replay-fixture.d.ts +19 -0
- package/dist/improve/eval-gen/writer.d.ts +41 -0
- package/dist/improve/eval-run/contracts.d.ts +25 -0
- package/dist/improve/eval-run/replay.d.ts +25 -0
- package/dist/improve/eval-run/runner.d.ts +37 -0
- package/dist/improve/paths.d.ts +19 -0
- package/dist/improve/propose/template-engine.d.ts +7 -0
- package/dist/improve/propose/writer.d.ts +26 -0
- package/dist/improve/scan/card-writer.d.ts +38 -0
- package/dist/improve/scan/detectors/closure-anomaly.d.ts +8 -0
- package/dist/improve/scan/detectors/index.d.ts +20 -0
- package/dist/improve/scan/detectors/repeated-tool-use.d.ts +29 -0
- package/dist/improve/scan/detectors/subagent-block.d.ts +13 -0
- package/dist/improve/scan/detectors/tool-failure-density.d.ts +10 -0
- package/dist/improve/scan/reader.d.ts +38 -0
- package/dist/improve/schemas.d.ts +494 -0
- package/dist/improve/triage.d.ts +22 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +148 -146
- package/dist/paths.d.ts +57 -0
- package/dist/service/launchd/install.d.ts +35 -0
- package/dist/service/launchd/paths.d.ts +8 -0
- package/dist/service/launchd/plist.d.ts +15 -0
- package/dist/service/launchd/status.d.ts +15 -0
- package/dist/service/launchd.d.ts +4 -0
- package/dist/skills/_agents/contract.d.ts +5 -0
- package/dist/skills/_agents/git-investigator.d.ts +8 -0
- package/dist/skills/_agents/index.d.ts +4 -0
- package/dist/skills/_agents/research-agent.d.ts +7 -0
- package/dist/skills/_agents/to-definition.d.ts +7 -0
- package/dist/skills/_lib/confidence-gate.d.ts +10 -0
- package/dist/skills/_lib/emit-card.d.ts +3 -0
- package/dist/skills/_lib/prompt-loader.d.ts +1 -0
- package/dist/skills/all.d.ts +7 -0
- package/dist/skills/audit-fit/discover.d.ts +16 -0
- package/dist/skills/audit-fit/index.d.ts +100 -0
- package/dist/skills/diagnose/_phases/orchestrator.d.ts +4 -0
- package/dist/skills/diagnose/_phases/triage.d.ts +4 -0
- package/dist/skills/diagnose/_phases/types.d.ts +142 -0
- package/dist/skills/diagnose/_phases/verifier.d.ts +16 -0
- package/dist/skills/diagnose/index.d.ts +6 -0
- package/dist/skills/example-template/index.d.ts +1 -0
- package/dist/skills/get-started/index.d.ts +2 -0
- package/dist/skills/index.d.ts +28 -0
- package/dist/skills/mint/_phases/build.d.ts +7 -0
- package/dist/skills/mint/_phases/heal.d.ts +8 -0
- package/dist/skills/mint/_phases/parallelize-dispatch.d.ts +12 -0
- package/dist/skills/mint/_phases/plan.d.ts +2 -0
- package/dist/skills/mint/_phases/research.d.ts +2 -0
- package/dist/skills/mint/_phases/ship.d.ts +3 -0
- package/dist/skills/mint/_phases/spec.d.ts +2 -0
- package/dist/skills/mint/_phases/verify.d.ts +9 -0
- package/dist/skills/mint/index.d.ts +47 -0
- package/dist/skills/mint/state-store.d.ts +4 -0
- package/dist/skills/score/digest-keyboard.d.ts +2 -0
- package/dist/skills/score/digest.d.ts +10 -0
- package/dist/skills/score/farm-run-record.d.ts +20 -0
- package/dist/skills/score/index.d.ts +33 -0
- package/dist/skills/score/memory-write.d.ts +31 -0
- package/dist/skills/score/winner.d.ts +10 -0
- package/dist/skills/service-setup/index.d.ts +2 -0
- package/dist/skills/telegram-setup/index.d.ts +2 -0
- package/dist/skills/user-skills.d.ts +9 -0
- package/dist/telegram/allowlist.d.ts +4 -0
- package/dist/telegram/bot.d.ts +38 -0
- package/dist/telegram/construct-session.d.ts +11 -0
- package/dist/telegram/elicitation-callback-data.d.ts +11 -0
- package/dist/telegram/elicitation-handler.d.ts +6 -0
- package/dist/telegram/elicitation-telegram.d.ts +6 -0
- package/dist/telegram/error-utils.d.ts +5 -0
- package/dist/telegram/example.d.ts +1 -0
- package/dist/telegram/farm-callback-data.d.ts +9 -0
- package/dist/telegram/formatter.d.ts +24 -0
- package/dist/telegram/handlers/commands.d.ts +11 -0
- package/dist/telegram/handlers/farm-callbacks.d.ts +26 -0
- package/dist/telegram/handlers/help.d.ts +3 -0
- package/dist/telegram/handlers/message.d.ts +26 -0
- package/dist/telegram/handlers/registration.d.ts +5 -0
- package/dist/telegram/handlers/start.d.ts +2 -0
- package/dist/telegram/index.d.ts +8 -0
- package/dist/telegram/manager.d.ts +35 -0
- package/dist/telegram/mcp-session.d.ts +8 -0
- package/dist/telegram/notify-routing.d.ts +12 -0
- package/dist/telegram/push.d.ts +23 -0
- package/dist/telegram/session-manager.d.ts +42 -0
- package/dist/telegram/setup-wizard.d.ts +59 -0
- package/dist/telegram/stream-timeout-error.d.ts +3 -0
- package/dist/telegram/streaming.d.ts +10 -0
- package/dist/telegram/version-check.d.ts +19 -0
- package/dist/telegram/watch.d.ts +22 -0
- package/dist/telegram.d.ts +2 -0
- package/dist/telegram.mjs +178 -176
- package/dist/telemetry/schemas.d.ts +10 -0
- package/dist/utils/CircularBuffer.d.ts +13 -0
- package/dist/utils/cd-on-exit.d.ts +5 -0
- package/dist/utils/cleanupRegistry.d.ts +2 -0
- package/dist/utils/debug.d.ts +2 -0
- package/dist/utils/diff.d.ts +17 -0
- package/dist/utils/envFile.d.ts +5 -0
- package/dist/utils/envUtils.d.ts +2 -0
- package/dist/utils/error-classifiers.d.ts +2 -0
- package/dist/utils/errors.d.ts +38 -0
- package/dist/utils/json.d.ts +1 -0
- package/dist/utils/memoize.d.ts +9 -0
- package/dist/utils/prompt-secret.d.ts +1 -0
- package/dist/utils/terminal-sanitize.d.ts +2 -0
- package/dist/web/extract.d.ts +3 -0
- package/dist/web/index.d.ts +6 -0
- package/dist/web/scrape.d.ts +14 -0
- package/dist/web/search.d.ts +14 -0
- package/dist/web/types.d.ts +29 -0
- package/package.json +10 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TraceWriter } from './writer.js';
|
|
2
|
+
export interface CreateDefaultTraceWriterOptions {
|
|
3
|
+
sessionLabel?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CreatedTraceWriter {
|
|
6
|
+
writer: TraceWriter;
|
|
7
|
+
tracePath: string;
|
|
8
|
+
sessionLabel: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createDefaultTraceWriter(options?: CreateDefaultTraceWriterOptions): CreatedTraceWriter | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { AbortOrigin, AbortPayload, BackgroundAgentCancelledPayload, BackgroundAgentCompletedPayload, BackgroundAgentFailedPayload, BackgroundAgentJoinedPayload, BackgroundAgentPayload, BackgroundAgentStartedPayload, BrowserActAction, BrowserEventPayload, BrowserEventTarget, BrowserEventTool, BudgetPayload, ClaimPayload, ClosurePayload, ClosureReason, CompactionPayloadInput, CompactionPayloadPersisted, CompactionSidecarRef, CompactionTrigger, HookDecisionPayload, HookEventName, SessionPhasePayload, SessionPhaseName, SessionSealedPayload, SubagentCancelledPayload, SubagentFailedPayload, SubagentLifecyclePayload, SubagentStartedPayload, SubagentSucceededPayload, ToolCallCompletedPayload, ToolCallPayload, ToolCallStartedPayload, TraceEvent, TraceEventInput, TraceEventKind, } from './types.js';
|
|
2
|
+
export { AbortOriginSchema, AbortPayloadSchema, BackgroundAgentCancelledPayloadSchema, BackgroundAgentCompletedPayloadSchema, BackgroundAgentFailedPayloadSchema, BackgroundAgentJoinedPayloadSchema, BackgroundAgentPayloadSchema, BackgroundAgentStartedPayloadSchema, BrowserActActionSchema, BrowserEventPayloadSchema, BrowserEventTargetSchema, BrowserEventToolSchema, BudgetPayloadSchema, ClaimPayloadSchema, ClosurePayloadSchema, ClosureReasonSchema, CompactionPayloadInputSchema, CompactionPayloadPersistedSchema, CompactionSidecarRefSchema, CompactionTriggerSchema, HookDecisionPayloadSchema, HookEventNameSchema, SessionPhaseNameSchema, SessionPhasePayloadSchema, SessionSealedPayloadSchema, SubagentCancelledPayloadSchema, SubagentFailedPayloadSchema, SubagentLifecyclePayloadSchema, SubagentStartedPayloadSchema, SubagentSucceededPayloadSchema, ToolCallCompletedPayloadSchema, ToolCallPayloadSchema, ToolCallStartedPayloadSchema, TraceEventInputSchema, TraceEventSchema, } from './events.js';
|
|
3
|
+
export { InMemoryTraceWriter, NdjsonTraceWriter, } from './writer.js';
|
|
4
|
+
export type { NdjsonTraceWriterOptions, TraceWriter } from './writer.js';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { HookHandler } from '../hooks.js';
|
|
2
|
+
import type { ClosureReason, ToolFailureClass, TraceEvent, TraceEventKind } from './types.js';
|
|
3
|
+
export declare const RECEIPT_SCHEMA_VERSION: 1;
|
|
4
|
+
export interface ReceiptToolFailure {
|
|
5
|
+
toolUseId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
failureClass?: ToolFailureClass;
|
|
8
|
+
durationMs: number;
|
|
9
|
+
ts: string;
|
|
10
|
+
truncated: boolean;
|
|
11
|
+
exempt: boolean;
|
|
12
|
+
subagentId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RunReceipt {
|
|
15
|
+
schemaVersion: typeof RECEIPT_SCHEMA_VERSION;
|
|
16
|
+
generatedAt: string;
|
|
17
|
+
witnessLabel: string;
|
|
18
|
+
tracePath: string;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
endReason?: string;
|
|
21
|
+
status: 'succeeded' | 'failed' | 'cancelled' | 'unknown';
|
|
22
|
+
closureReason?: ClosureReason;
|
|
23
|
+
lastStopReason?: string;
|
|
24
|
+
guidance?: string;
|
|
25
|
+
incomplete: boolean;
|
|
26
|
+
startedAt?: string;
|
|
27
|
+
endedAt?: string;
|
|
28
|
+
durationMs?: number;
|
|
29
|
+
toolCalls: {
|
|
30
|
+
total: number;
|
|
31
|
+
succeeded: number;
|
|
32
|
+
errored: number;
|
|
33
|
+
erroredNotable: number;
|
|
34
|
+
circuitBreakerHits: number;
|
|
35
|
+
byTool: Record<string, {
|
|
36
|
+
total: number;
|
|
37
|
+
errored: number;
|
|
38
|
+
}>;
|
|
39
|
+
byFailureClass: Record<string, number>;
|
|
40
|
+
};
|
|
41
|
+
events: {
|
|
42
|
+
total: number;
|
|
43
|
+
byKind: Partial<Record<TraceEventKind, number>>;
|
|
44
|
+
};
|
|
45
|
+
subagents: {
|
|
46
|
+
started: number;
|
|
47
|
+
succeeded: number;
|
|
48
|
+
failed: number;
|
|
49
|
+
cancelled: number;
|
|
50
|
+
};
|
|
51
|
+
cost: {
|
|
52
|
+
finalCostUsd?: number;
|
|
53
|
+
turnCount?: number;
|
|
54
|
+
tokens?: {
|
|
55
|
+
input?: number;
|
|
56
|
+
output?: number;
|
|
57
|
+
cacheRead?: number;
|
|
58
|
+
cacheCreation?: number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
failures: ReceiptToolFailure[];
|
|
62
|
+
humanReviewRequired: boolean;
|
|
63
|
+
humanReviewReasons: string[];
|
|
64
|
+
limitations: string[];
|
|
65
|
+
}
|
|
66
|
+
export interface ReceiptMeta {
|
|
67
|
+
tracePath: string;
|
|
68
|
+
witnessLabel: string;
|
|
69
|
+
sessionId?: string;
|
|
70
|
+
endReason?: string;
|
|
71
|
+
now?: Date;
|
|
72
|
+
}
|
|
73
|
+
export declare function parseTraceJsonl(raw: string): TraceEvent[];
|
|
74
|
+
export declare function receiptPathsFor(tracePath: string): {
|
|
75
|
+
label: string;
|
|
76
|
+
jsonPath: string;
|
|
77
|
+
mdPath: string;
|
|
78
|
+
};
|
|
79
|
+
export declare function generateReceipt(events: TraceEvent[], meta: ReceiptMeta): RunReceipt;
|
|
80
|
+
export declare function renderReceiptMarkdown(r: RunReceipt): string;
|
|
81
|
+
export interface WriteRunReceiptOptions {
|
|
82
|
+
tracePath: string;
|
|
83
|
+
sessionId?: string;
|
|
84
|
+
reason?: string;
|
|
85
|
+
now?: Date;
|
|
86
|
+
}
|
|
87
|
+
export declare function writeRunReceipt(opts: WriteRunReceiptOptions): Promise<{
|
|
88
|
+
label: string;
|
|
89
|
+
jsonPath: string;
|
|
90
|
+
mdPath: string;
|
|
91
|
+
} | null>;
|
|
92
|
+
export declare const runReceiptSessionEndHook: HookHandler;
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
export type TraceEventKind = 'tool_call' | 'hook_decision' | 'subagent_lifecycle' | 'background_agent' | 'budget' | 'abort' | 'compaction' | 'closure' | 'claim' | 'browser_event' | 'session_phase' | 'session_sealed';
|
|
2
|
+
export interface ToolCallStartedPayload {
|
|
3
|
+
phase: 'started';
|
|
4
|
+
toolUseId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
inputBytes: number;
|
|
7
|
+
subagentId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TOOL_FAILURE_CLASSES: readonly ["policy-refusal", "timeout", "permission-denied", "hook-block", "abort", "elicitation-declined"];
|
|
10
|
+
export type ToolFailureClass = (typeof TOOL_FAILURE_CLASSES)[number];
|
|
11
|
+
export interface ToolCallCompletedPayload {
|
|
12
|
+
phase: 'completed';
|
|
13
|
+
toolUseId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
resultBytes: number;
|
|
16
|
+
isError: boolean;
|
|
17
|
+
truncated: boolean;
|
|
18
|
+
durationMs: number;
|
|
19
|
+
circuitBreaker?: boolean;
|
|
20
|
+
failureClass?: ToolFailureClass;
|
|
21
|
+
subagentId?: string;
|
|
22
|
+
}
|
|
23
|
+
export type ToolCallPayload = ToolCallStartedPayload | ToolCallCompletedPayload;
|
|
24
|
+
export type HookEventName = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'SessionStart' | 'SessionEnd' | 'SubagentStart' | 'SubagentStop';
|
|
25
|
+
export interface HookDecisionPayload {
|
|
26
|
+
hookEvent: HookEventName;
|
|
27
|
+
decision?: 'block' | 'approve';
|
|
28
|
+
reason?: string;
|
|
29
|
+
blockedTool?: string;
|
|
30
|
+
injectedContextBytes?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface SubagentStartedPayload {
|
|
33
|
+
transition: 'started';
|
|
34
|
+
subagentId: string;
|
|
35
|
+
parentId: string;
|
|
36
|
+
model: string;
|
|
37
|
+
allowedTools?: readonly string[];
|
|
38
|
+
systemPromptHash?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SubagentSucceededPayload {
|
|
41
|
+
transition: 'succeeded';
|
|
42
|
+
subagentId: string;
|
|
43
|
+
durationMs: number;
|
|
44
|
+
turnCount: number;
|
|
45
|
+
totalCostUsd?: number;
|
|
46
|
+
outputBytes: number;
|
|
47
|
+
}
|
|
48
|
+
export interface SubagentFailedPayload {
|
|
49
|
+
transition: 'failed';
|
|
50
|
+
subagentId: string;
|
|
51
|
+
errorClass: string;
|
|
52
|
+
errorMessage: string;
|
|
53
|
+
partialOutputBytes: number;
|
|
54
|
+
}
|
|
55
|
+
export interface SubagentCancelledPayload {
|
|
56
|
+
transition: 'cancelled';
|
|
57
|
+
subagentId: string;
|
|
58
|
+
source: 'cascade' | 'explicit';
|
|
59
|
+
}
|
|
60
|
+
export type SubagentLifecyclePayload = SubagentStartedPayload | SubagentSucceededPayload | SubagentFailedPayload | SubagentCancelledPayload;
|
|
61
|
+
export interface BackgroundAgentStartedPayload {
|
|
62
|
+
transition: 'started';
|
|
63
|
+
jobId: string;
|
|
64
|
+
subagentId: string;
|
|
65
|
+
label: string;
|
|
66
|
+
model: string;
|
|
67
|
+
}
|
|
68
|
+
export interface BackgroundAgentCompletedPayload {
|
|
69
|
+
transition: 'completed';
|
|
70
|
+
jobId: string;
|
|
71
|
+
subagentId: string;
|
|
72
|
+
durationMs: number;
|
|
73
|
+
outputBytes: number;
|
|
74
|
+
}
|
|
75
|
+
export interface BackgroundAgentFailedPayload {
|
|
76
|
+
transition: 'failed';
|
|
77
|
+
jobId: string;
|
|
78
|
+
subagentId: string;
|
|
79
|
+
durationMs: number;
|
|
80
|
+
errorClass: string;
|
|
81
|
+
errorMessage: string;
|
|
82
|
+
}
|
|
83
|
+
export interface BackgroundAgentCancelledPayload {
|
|
84
|
+
transition: 'cancelled';
|
|
85
|
+
jobId: string;
|
|
86
|
+
subagentId: string;
|
|
87
|
+
source: 'explicit' | 'cascade';
|
|
88
|
+
}
|
|
89
|
+
export interface BackgroundAgentJoinedPayload {
|
|
90
|
+
transition: 'joined';
|
|
91
|
+
jobId: string;
|
|
92
|
+
subagentId: string;
|
|
93
|
+
jobStatus: 'completed' | 'failed' | 'cancelled';
|
|
94
|
+
}
|
|
95
|
+
export type BackgroundAgentPayload = BackgroundAgentStartedPayload | BackgroundAgentCompletedPayload | BackgroundAgentFailedPayload | BackgroundAgentCancelledPayload | BackgroundAgentJoinedPayload;
|
|
96
|
+
export interface BudgetPayload {
|
|
97
|
+
kind: 'monetary';
|
|
98
|
+
runningCostUsd: number;
|
|
99
|
+
maxBudgetUsd: number;
|
|
100
|
+
lastTurnCostUsd: number;
|
|
101
|
+
}
|
|
102
|
+
export type AbortOrigin = 'user_signal' | 'cascade' | 'timeout' | 'budget' | 'hook_block';
|
|
103
|
+
export interface AbortPayload {
|
|
104
|
+
origin: AbortOrigin;
|
|
105
|
+
cascadedTo: readonly string[];
|
|
106
|
+
reason?: string;
|
|
107
|
+
}
|
|
108
|
+
export type CompactionTrigger = 'manual' | 'token_threshold' | 'turn_count';
|
|
109
|
+
export interface CompactionPayloadInput {
|
|
110
|
+
trigger: CompactionTrigger;
|
|
111
|
+
preCompactionMessages: unknown[];
|
|
112
|
+
summary: string;
|
|
113
|
+
keptTailCount: number;
|
|
114
|
+
keepLastNConfig: number;
|
|
115
|
+
messagesBefore: number;
|
|
116
|
+
messagesAfter: number;
|
|
117
|
+
tokensSavedEstimate?: number;
|
|
118
|
+
summarizationTokens?: {
|
|
119
|
+
input: number;
|
|
120
|
+
output: number;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export interface CompactionSidecarRef {
|
|
124
|
+
path: string;
|
|
125
|
+
sizeBytes: number;
|
|
126
|
+
sha256: string;
|
|
127
|
+
}
|
|
128
|
+
export interface CompactionPayloadPersisted {
|
|
129
|
+
trigger: CompactionTrigger;
|
|
130
|
+
preCompactionMessagesRef: CompactionSidecarRef;
|
|
131
|
+
summary: string;
|
|
132
|
+
keptTailCount: number;
|
|
133
|
+
keepLastNConfig: number;
|
|
134
|
+
messagesBefore: number;
|
|
135
|
+
messagesAfter: number;
|
|
136
|
+
tokensSavedEstimate?: number;
|
|
137
|
+
summarizationTokens?: {
|
|
138
|
+
input: number;
|
|
139
|
+
output: number;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export type ClosureReason = 'model_end_turn' | 'truncated' | 'iteration_cap' | 'abort' | 'timeout' | 'budget_exceeded' | 'hook_blocked' | 'max_turns_exceeded';
|
|
143
|
+
export interface ClosurePayload {
|
|
144
|
+
reason: ClosureReason;
|
|
145
|
+
finalTurnCount: number;
|
|
146
|
+
finalCostUsd: number;
|
|
147
|
+
finalTokens: {
|
|
148
|
+
input?: number;
|
|
149
|
+
output?: number;
|
|
150
|
+
cacheRead?: number;
|
|
151
|
+
cacheCreation?: number;
|
|
152
|
+
};
|
|
153
|
+
lastStopReason?: string;
|
|
154
|
+
guidance?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface ClaimPayload {
|
|
157
|
+
source: string;
|
|
158
|
+
assertion: string;
|
|
159
|
+
evidence: readonly string[];
|
|
160
|
+
confidence: number;
|
|
161
|
+
dissent?: string;
|
|
162
|
+
}
|
|
163
|
+
export type BrowserEventTool = 'browser_open' | 'browser_observe' | 'browser_act' | 'browser_screenshot' | 'browser_extract' | 'browser_close';
|
|
164
|
+
export type BrowserActAction = 'click' | 'fill' | 'press' | 'select' | 'hover' | 'scroll_to' | 'wait_for';
|
|
165
|
+
export interface BrowserEventTarget {
|
|
166
|
+
kind: 'semantic' | 'element_id' | 'selector';
|
|
167
|
+
text?: string;
|
|
168
|
+
role?: string;
|
|
169
|
+
elementId?: string;
|
|
170
|
+
selectorHash?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface BrowserEventPayload {
|
|
173
|
+
tool: BrowserEventTool;
|
|
174
|
+
action?: BrowserActAction;
|
|
175
|
+
toolUseId: string;
|
|
176
|
+
target?: BrowserEventTarget;
|
|
177
|
+
urlBefore: string | null;
|
|
178
|
+
urlAfter: string | null;
|
|
179
|
+
status: 'ok' | 'error' | 'ambiguous_target' | 'blocked_by_policy';
|
|
180
|
+
screenshotPath?: string;
|
|
181
|
+
observationSummary?: string;
|
|
182
|
+
error?: {
|
|
183
|
+
reason: string;
|
|
184
|
+
recoverable: boolean;
|
|
185
|
+
};
|
|
186
|
+
durationMs: number;
|
|
187
|
+
}
|
|
188
|
+
export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb';
|
|
189
|
+
export interface SessionPhasePayload {
|
|
190
|
+
phase: SessionPhaseName;
|
|
191
|
+
durationMs?: number;
|
|
192
|
+
metadata?: Record<string, string | number | boolean>;
|
|
193
|
+
model?: string;
|
|
194
|
+
resolvedModel?: string;
|
|
195
|
+
origin?: 'cli' | 'telegram' | 'daemon' | 'unknown';
|
|
196
|
+
actor?: 'main' | 'subagent';
|
|
197
|
+
}
|
|
198
|
+
export interface SessionSealedPayload {
|
|
199
|
+
status: 'succeeded' | 'failed' | 'cancelled';
|
|
200
|
+
finalCostUsd: number;
|
|
201
|
+
finalTurnCount: number;
|
|
202
|
+
closedAt: string;
|
|
203
|
+
incomplete?: boolean;
|
|
204
|
+
subagentCount?: number;
|
|
205
|
+
subagentTokens?: {
|
|
206
|
+
input?: number;
|
|
207
|
+
output?: number;
|
|
208
|
+
cacheRead?: number;
|
|
209
|
+
cacheCreation?: number;
|
|
210
|
+
};
|
|
211
|
+
subagentCostUsd?: number;
|
|
212
|
+
}
|
|
213
|
+
export type TraceEventInput = {
|
|
214
|
+
kind: 'tool_call';
|
|
215
|
+
payload: ToolCallPayload;
|
|
216
|
+
} | {
|
|
217
|
+
kind: 'hook_decision';
|
|
218
|
+
payload: HookDecisionPayload;
|
|
219
|
+
} | {
|
|
220
|
+
kind: 'subagent_lifecycle';
|
|
221
|
+
payload: SubagentLifecyclePayload;
|
|
222
|
+
} | {
|
|
223
|
+
kind: 'background_agent';
|
|
224
|
+
payload: BackgroundAgentPayload;
|
|
225
|
+
} | {
|
|
226
|
+
kind: 'budget';
|
|
227
|
+
payload: BudgetPayload;
|
|
228
|
+
} | {
|
|
229
|
+
kind: 'abort';
|
|
230
|
+
payload: AbortPayload;
|
|
231
|
+
} | {
|
|
232
|
+
kind: 'compaction';
|
|
233
|
+
payload: CompactionPayloadInput;
|
|
234
|
+
} | {
|
|
235
|
+
kind: 'closure';
|
|
236
|
+
payload: ClosurePayload;
|
|
237
|
+
} | {
|
|
238
|
+
kind: 'claim';
|
|
239
|
+
payload: ClaimPayload;
|
|
240
|
+
} | {
|
|
241
|
+
kind: 'browser_event';
|
|
242
|
+
payload: BrowserEventPayload;
|
|
243
|
+
} | {
|
|
244
|
+
kind: 'session_phase';
|
|
245
|
+
payload: SessionPhasePayload;
|
|
246
|
+
};
|
|
247
|
+
export type TraceEvent = {
|
|
248
|
+
ts: string;
|
|
249
|
+
seq: number;
|
|
250
|
+
kind: 'tool_call';
|
|
251
|
+
payload: ToolCallPayload;
|
|
252
|
+
} | {
|
|
253
|
+
ts: string;
|
|
254
|
+
seq: number;
|
|
255
|
+
kind: 'hook_decision';
|
|
256
|
+
payload: HookDecisionPayload;
|
|
257
|
+
} | {
|
|
258
|
+
ts: string;
|
|
259
|
+
seq: number;
|
|
260
|
+
kind: 'subagent_lifecycle';
|
|
261
|
+
payload: SubagentLifecyclePayload;
|
|
262
|
+
} | {
|
|
263
|
+
ts: string;
|
|
264
|
+
seq: number;
|
|
265
|
+
kind: 'background_agent';
|
|
266
|
+
payload: BackgroundAgentPayload;
|
|
267
|
+
} | {
|
|
268
|
+
ts: string;
|
|
269
|
+
seq: number;
|
|
270
|
+
kind: 'budget';
|
|
271
|
+
payload: BudgetPayload;
|
|
272
|
+
} | {
|
|
273
|
+
ts: string;
|
|
274
|
+
seq: number;
|
|
275
|
+
kind: 'abort';
|
|
276
|
+
payload: AbortPayload;
|
|
277
|
+
} | {
|
|
278
|
+
ts: string;
|
|
279
|
+
seq: number;
|
|
280
|
+
kind: 'compaction';
|
|
281
|
+
payload: CompactionPayloadPersisted;
|
|
282
|
+
} | {
|
|
283
|
+
ts: string;
|
|
284
|
+
seq: number;
|
|
285
|
+
kind: 'closure';
|
|
286
|
+
payload: ClosurePayload;
|
|
287
|
+
} | {
|
|
288
|
+
ts: string;
|
|
289
|
+
seq: number;
|
|
290
|
+
kind: 'claim';
|
|
291
|
+
payload: ClaimPayload;
|
|
292
|
+
} | {
|
|
293
|
+
ts: string;
|
|
294
|
+
seq: number;
|
|
295
|
+
kind: 'browser_event';
|
|
296
|
+
payload: BrowserEventPayload;
|
|
297
|
+
} | {
|
|
298
|
+
ts: string;
|
|
299
|
+
seq: number;
|
|
300
|
+
kind: 'session_phase';
|
|
301
|
+
payload: SessionPhasePayload;
|
|
302
|
+
} | {
|
|
303
|
+
ts: string;
|
|
304
|
+
seq: number;
|
|
305
|
+
kind: 'session_sealed';
|
|
306
|
+
payload: SessionSealedPayload;
|
|
307
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CompactionPayloadInput, SessionSealedPayload, TraceEvent, TraceEventInput } from './types.js';
|
|
2
|
+
export interface TraceWriter {
|
|
3
|
+
write(event: TraceEventInput): Promise<void>;
|
|
4
|
+
getTracePath(): string;
|
|
5
|
+
seal(payload: SessionSealedPayload): Promise<void>;
|
|
6
|
+
close(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface NdjsonTraceWriterOptions {
|
|
9
|
+
traceDir: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class NdjsonTraceWriter implements TraceWriter {
|
|
12
|
+
private readonly traceDir;
|
|
13
|
+
private readonly tracePath;
|
|
14
|
+
private seq;
|
|
15
|
+
private sealed;
|
|
16
|
+
private fh;
|
|
17
|
+
private writeQueue;
|
|
18
|
+
constructor(options: NdjsonTraceWriterOptions);
|
|
19
|
+
getTracePath(): string;
|
|
20
|
+
write(event: TraceEventInput): Promise<void>;
|
|
21
|
+
seal(payload: SessionSealedPayload): Promise<void>;
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
private enqueue;
|
|
24
|
+
private ensureOpen;
|
|
25
|
+
private closeHandle;
|
|
26
|
+
sealOnProcessExit(): void;
|
|
27
|
+
private appendLine;
|
|
28
|
+
private materializePersistedEvent;
|
|
29
|
+
private persistCompactionSidecar;
|
|
30
|
+
}
|
|
31
|
+
export declare class InMemoryTraceWriter implements TraceWriter {
|
|
32
|
+
private seq;
|
|
33
|
+
private sealed;
|
|
34
|
+
private readonly _events;
|
|
35
|
+
get events(): readonly TraceEvent[];
|
|
36
|
+
write(event: TraceEventInput): Promise<void>;
|
|
37
|
+
getTracePath(): string;
|
|
38
|
+
seal(payload: SessionSealedPayload): Promise<void>;
|
|
39
|
+
close(): Promise<void>;
|
|
40
|
+
private readonly _inlineCompactionPayloads;
|
|
41
|
+
getInlineCompactionPayload(seq: number): CompactionPayloadInput | undefined;
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface TranscriptSearchResult {
|
|
2
|
+
filename: string;
|
|
3
|
+
session_at: string;
|
|
4
|
+
snippet: string;
|
|
5
|
+
rank: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ReindexResult {
|
|
8
|
+
indexed: number;
|
|
9
|
+
skipped: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class TranscriptIndex {
|
|
12
|
+
private readonly indexDir;
|
|
13
|
+
private readonly transcriptsDir;
|
|
14
|
+
private readonly db;
|
|
15
|
+
constructor(indexDir?: string, transcriptsDir?: string);
|
|
16
|
+
reindex(): ReindexResult;
|
|
17
|
+
search(query: string, limit?: number): TranscriptSearchResult[];
|
|
18
|
+
count(): number;
|
|
19
|
+
close(): void;
|
|
20
|
+
}
|
|
21
|
+
export declare function withTranscriptIndex<T>(fn: (idx: TranscriptIndex) => T, indexDir?: string, transcriptsDir?: string): T;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { AgentDefinition, EffortLevel, HookCallbackMatcher, HookEvent, OnElicitation, PermissionMode, SdkPluginConfig, SettingSource, ThinkingConfig } from './sdk-types.js';
|
|
2
|
+
import type { HookRegistry } from '../hooks.js';
|
|
3
|
+
import type { ModelProvider } from '../provider.js';
|
|
4
|
+
import type { TraceWriter } from '../trace/index.js';
|
|
5
|
+
import type { AgentModelInput } from './model-types.js';
|
|
6
|
+
import type { ModelSlots } from '../session/model-slots.js';
|
|
7
|
+
import type { CanUseTool, PermissionBubbler } from './permission-types.js';
|
|
8
|
+
import type { Surface } from '../awareness/types.js';
|
|
9
|
+
export interface ToolConfig {
|
|
10
|
+
allowedTools?: string[];
|
|
11
|
+
disallowedTools?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ResumeHistoryTurn {
|
|
14
|
+
user: string;
|
|
15
|
+
assistant: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PlanExitControls {
|
|
18
|
+
setPermissionMode(mode: PermissionMode): Promise<void>;
|
|
19
|
+
requestImplementSeed(message: string, mode: PermissionMode): void;
|
|
20
|
+
}
|
|
21
|
+
export interface AgentConfig {
|
|
22
|
+
model: AgentModelInput;
|
|
23
|
+
models?: ModelSlots;
|
|
24
|
+
apiKey?: string;
|
|
25
|
+
baseUrl?: string;
|
|
26
|
+
openaiBaseUrl?: string;
|
|
27
|
+
maxTurns?: number;
|
|
28
|
+
thinking?: ThinkingConfig;
|
|
29
|
+
effort?: EffortLevel;
|
|
30
|
+
tools?: ToolConfig;
|
|
31
|
+
permissionMode?: PermissionMode;
|
|
32
|
+
hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>;
|
|
33
|
+
canUseTool?: CanUseTool;
|
|
34
|
+
permissionBubbler?: PermissionBubbler;
|
|
35
|
+
settingSources?: SettingSource[];
|
|
36
|
+
plugins?: SdkPluginConfig[];
|
|
37
|
+
systemPrompt?: string | {
|
|
38
|
+
type: 'preset';
|
|
39
|
+
preset: 'claude_code';
|
|
40
|
+
append?: string;
|
|
41
|
+
};
|
|
42
|
+
systemPromptSource?: string;
|
|
43
|
+
mcpServers?: Record<string, import('../mcp/types.js').McpServerConfig>;
|
|
44
|
+
mcpManager?: import('../mcp/index.js').McpManager;
|
|
45
|
+
agents?: Record<string, AgentDefinition>;
|
|
46
|
+
agent?: string;
|
|
47
|
+
cwd?: string;
|
|
48
|
+
readRoots?: string[];
|
|
49
|
+
writeRoots?: string[];
|
|
50
|
+
env?: Record<string, string>;
|
|
51
|
+
enableFileCheckpointing?: boolean;
|
|
52
|
+
pathToClaudeCodeExecutable?: string;
|
|
53
|
+
continue?: boolean;
|
|
54
|
+
resume?: string;
|
|
55
|
+
resumeHistory?: ResumeHistoryTurn[];
|
|
56
|
+
sessionId?: string;
|
|
57
|
+
resumeSessionAt?: string;
|
|
58
|
+
forkSession?: boolean;
|
|
59
|
+
persistSession?: boolean;
|
|
60
|
+
abortSignal?: AbortSignal;
|
|
61
|
+
timeoutMs?: number;
|
|
62
|
+
hookRegistry?: HookRegistry;
|
|
63
|
+
planExitControls?: PlanExitControls;
|
|
64
|
+
traceWriter?: TraceWriter;
|
|
65
|
+
provider?: ModelProvider;
|
|
66
|
+
providerFactory?: (model: string | undefined) => ModelProvider;
|
|
67
|
+
maxBudgetUsd?: number;
|
|
68
|
+
taskBudget?: number;
|
|
69
|
+
maxOutputTokens?: number;
|
|
70
|
+
includePartialMessages?: boolean;
|
|
71
|
+
includeHookEvents?: boolean;
|
|
72
|
+
agentProgressSummaries?: boolean;
|
|
73
|
+
onElicitation?: OnElicitation;
|
|
74
|
+
autoResumeOnUsageLimit?: boolean;
|
|
75
|
+
surface?: Surface;
|
|
76
|
+
parentSessionId?: string;
|
|
77
|
+
depth?: number;
|
|
78
|
+
maxDepth?: number;
|
|
79
|
+
phaseRole?: 'read-only' | 'read-write';
|
|
80
|
+
isSkillDispatch?: boolean;
|
|
81
|
+
isNonInteractive?: boolean;
|
|
82
|
+
autoCompact?: boolean | {
|
|
83
|
+
threshold: number;
|
|
84
|
+
};
|
|
85
|
+
customTools?: import('../tools/custom-tool.js').CustomToolDef[];
|
|
86
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { DiffPayload } from '../../utils/diff.js';
|
|
2
|
+
export type MessageRole = 'user' | 'assistant';
|
|
3
|
+
export interface ResponseMetadata extends Record<string, unknown> {
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
stopReason?: string | null;
|
|
6
|
+
resultSubtype?: string;
|
|
7
|
+
durationMs?: number;
|
|
8
|
+
durationApiMs?: number;
|
|
9
|
+
totalCostUsd?: number;
|
|
10
|
+
numTurns?: number;
|
|
11
|
+
isError?: boolean;
|
|
12
|
+
usage?: Record<string, unknown>;
|
|
13
|
+
modelUsage?: Record<string, unknown>;
|
|
14
|
+
permissionDenials?: unknown[];
|
|
15
|
+
errors?: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface Message {
|
|
18
|
+
role: MessageRole;
|
|
19
|
+
content: string;
|
|
20
|
+
metadata?: ResponseMetadata;
|
|
21
|
+
timestamp?: Date;
|
|
22
|
+
}
|
|
23
|
+
export interface ContentChunk {
|
|
24
|
+
type: 'content';
|
|
25
|
+
content: string;
|
|
26
|
+
metadata?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export interface ToolUseChunk {
|
|
29
|
+
type: 'tool_use';
|
|
30
|
+
content: string;
|
|
31
|
+
metadata?: Record<string, unknown>;
|
|
32
|
+
}
|
|
33
|
+
export interface ToolUseDetailChunk {
|
|
34
|
+
type: 'tool_use_detail';
|
|
35
|
+
toolUseId: string;
|
|
36
|
+
toolName: string;
|
|
37
|
+
toolInput: string;
|
|
38
|
+
toolInputRaw?: string;
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
export interface ThinkingChunk {
|
|
42
|
+
type: 'thinking';
|
|
43
|
+
content: string;
|
|
44
|
+
metadata?: Record<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
export interface ToolResultChunk {
|
|
47
|
+
type: 'tool_result';
|
|
48
|
+
toolUseId: string;
|
|
49
|
+
content: string;
|
|
50
|
+
isError?: boolean;
|
|
51
|
+
truncated?: boolean;
|
|
52
|
+
persistedPath?: string;
|
|
53
|
+
sizeBytes?: number;
|
|
54
|
+
sizeLabel?: string;
|
|
55
|
+
lineCount?: number;
|
|
56
|
+
display?: string;
|
|
57
|
+
metadata?: Record<string, unknown>;
|
|
58
|
+
}
|
|
59
|
+
export interface ToolDiffChunk {
|
|
60
|
+
type: 'tool_diff';
|
|
61
|
+
toolUseId: string;
|
|
62
|
+
diff: DiffPayload;
|
|
63
|
+
metadata?: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
export type MessageChunk = ContentChunk | ToolUseChunk | ToolUseDetailChunk | ThinkingChunk | ToolResultChunk | ToolDiffChunk | {
|
|
66
|
+
type: 'done' | 'error';
|
|
67
|
+
content?: string;
|
|
68
|
+
metadata?: Record<string, unknown>;
|
|
69
|
+
};
|
|
70
|
+
export interface SendMessageOptions {
|
|
71
|
+
stream?: boolean;
|
|
72
|
+
metadata?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
export interface StructuredMessageOptions extends SendMessageOptions {
|
|
75
|
+
maxRetries?: number;
|
|
76
|
+
injectSchemaPrompt?: boolean;
|
|
77
|
+
}
|