agent-afk 5.1.0 → 5.3.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 +14 -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 +25 -0
- package/dist/agent/elicitation-router.d.ts +22 -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 +1079 -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 +310 -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 +430 -426
- 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 +203 -199
- 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,31 @@
|
|
|
1
|
+
import type { ToolResultChunk } from '../../../agent/types/message-types.js';
|
|
2
|
+
import { formatToolLine, formatToolResultLine } from './tool-lane-format.js';
|
|
3
|
+
import type { DiffPayload } from '../../../utils/diff.js';
|
|
4
|
+
import { type ToolEntry, type TextEntry, type Entry } from './tool-lane-render.js';
|
|
5
|
+
export type { ToolEntry, TextEntry, Entry };
|
|
6
|
+
export declare const MAX_OVERLAY_ROOTS = 6;
|
|
7
|
+
export declare class ToolLane {
|
|
8
|
+
private entries;
|
|
9
|
+
private order;
|
|
10
|
+
private agentIdStack;
|
|
11
|
+
addStart(toolUseId: string, toolName: string, toolInput: string): void;
|
|
12
|
+
addStartWithAgentContext(toolUseId: string, toolName: string, toolInput: string, agentContext: string | undefined, maxWidth?: number): void;
|
|
13
|
+
mergeAgentLabel(parentToolUseId: string, label: string, maxWidth?: number): boolean;
|
|
14
|
+
setAgentContext(toolUseId: string, agentContext: string | undefined): void;
|
|
15
|
+
setAgentResultSummary(toolUseId: string, summary: string): void;
|
|
16
|
+
setThinkingTail(toolUseId: string, tail: string | undefined): void;
|
|
17
|
+
addResult(toolUseId: string, chunk: ToolResultChunk): void;
|
|
18
|
+
addDiff(toolUseId: string, diff: DiffPayload): void;
|
|
19
|
+
upsertTextChild(toolUseId: string, agentContext: string, text: string): void;
|
|
20
|
+
removeTextChildrenUnder(agentContext: string): void;
|
|
21
|
+
hasPending(): boolean;
|
|
22
|
+
hasEntry(id: string): boolean;
|
|
23
|
+
findLastSkillEntryId(): string | undefined;
|
|
24
|
+
getOverlay(): string;
|
|
25
|
+
private ancestorDepthOf;
|
|
26
|
+
flushSource(parentId: string, homeDir?: string): string[];
|
|
27
|
+
flushCompletedRoots(homeDir?: string): string[];
|
|
28
|
+
flush(homeDir?: string): string[];
|
|
29
|
+
private buildChildMap;
|
|
30
|
+
}
|
|
31
|
+
export { formatToolLine, formatToolResultLine };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function startTranscript(dir: string, model: string, continued?: boolean): Promise<string>;
|
|
2
|
+
export interface TranscriptHandle {
|
|
3
|
+
path(): string;
|
|
4
|
+
appendUser(userInput: string): Promise<void>;
|
|
5
|
+
appendTurn(userInput: string, assistantText: string): Promise<void>;
|
|
6
|
+
rotateOnClear(): Promise<void>;
|
|
7
|
+
appendEnded(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function initTranscript(getModel: () => string): Promise<TranscriptHandle>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentSession } from '../../../agent/session.js';
|
|
2
|
+
import type { SessionStats } from '../../slash/types.js';
|
|
3
|
+
import type { ImageAttachment } from '../../input/attachments.js';
|
|
4
|
+
import type { InputSurfaceRefs } from '../../input/input-surface.js';
|
|
5
|
+
import { type CompletionWriter, type ThinkingUiMode, type TurnHandles } from './shared.js';
|
|
6
|
+
export { formatToolLine, formatToolResultLine, ToolLane } from './tool-lane.js';
|
|
7
|
+
export type { InputSurfaceRefs } from '../../input/input-surface.js';
|
|
8
|
+
export declare function runTurn(input: {
|
|
9
|
+
text: string;
|
|
10
|
+
attachments: ImageAttachment[];
|
|
11
|
+
}, session: AgentSession, stats: SessionStats, h: TurnHandles, thinkingUi?: ThinkingUiMode, completionWriter?: CompletionWriter, inputSurface?: InputSurfaceRefs): Promise<void>;
|
|
12
|
+
export declare function printTurnFooter(meta: {
|
|
13
|
+
durationMs?: number;
|
|
14
|
+
totalCostUsd?: number;
|
|
15
|
+
usage?: Record<string, unknown>;
|
|
16
|
+
} | undefined, stats: SessionStats, write?: (line: string) => void): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TerminalKind, TerminalState } from './terminal-state.js';
|
|
2
|
+
export interface VerdictLedger {
|
|
3
|
+
push(state: TerminalState): void;
|
|
4
|
+
reset(): void;
|
|
5
|
+
render(): string | null;
|
|
6
|
+
entries(): readonly TerminalKind[];
|
|
7
|
+
setRowCountChangeHandler(handler: (rows: number) => void): void;
|
|
8
|
+
start(opts: VerdictLedgerStartOpts): void;
|
|
9
|
+
stop(): void;
|
|
10
|
+
repaint(): void;
|
|
11
|
+
}
|
|
12
|
+
export interface VerdictLedgerStartOpts {
|
|
13
|
+
stream?: NodeJS.WriteStream;
|
|
14
|
+
getAdjacentRows?: () => number;
|
|
15
|
+
}
|
|
16
|
+
export interface VerdictLedgerOptions {
|
|
17
|
+
capacity?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function createVerdictLedger(opts?: VerdictLedgerOptions): VerdictLedger;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type DeferredWorktree } from './worktree.js';
|
|
2
|
+
import type { AgentSession } from '../../../agent/session/agent-session.js';
|
|
3
|
+
export type SkipReason = 'empty-message' | 'slash-command' | 'slug-generator-error' | 'invalid-slug-output';
|
|
4
|
+
export interface AutonameOptions {
|
|
5
|
+
token: string;
|
|
6
|
+
model?: string;
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
worktreePath: string;
|
|
9
|
+
signal?: AbortSignal;
|
|
10
|
+
slugGenerator?: (message: string, signal: AbortSignal) => Promise<string>;
|
|
11
|
+
onSkip?: (reason: SkipReason, detail?: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function generateSlugFromPrompt(message: string, opts: AutonameOptions): Promise<string | null>;
|
|
14
|
+
export declare function sanitizeSlug(raw: string): string | null;
|
|
15
|
+
export type AutonameOutcome = {
|
|
16
|
+
status: 'created';
|
|
17
|
+
path: string;
|
|
18
|
+
branch: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'created-fallback';
|
|
22
|
+
path: string;
|
|
23
|
+
branch: string;
|
|
24
|
+
reason: SkipReason | 'create-failed' | 'unknown';
|
|
25
|
+
detail?: string;
|
|
26
|
+
} | {
|
|
27
|
+
status: 'failed';
|
|
28
|
+
reason: string;
|
|
29
|
+
};
|
|
30
|
+
export interface RunAutonameInput {
|
|
31
|
+
deferred: DeferredWorktree;
|
|
32
|
+
message: string;
|
|
33
|
+
token: string;
|
|
34
|
+
model?: string;
|
|
35
|
+
timeoutMs?: number;
|
|
36
|
+
session?: AgentSession | null;
|
|
37
|
+
branchPrefix?: string;
|
|
38
|
+
slugGenerator?: (message: string, signal: AbortSignal) => Promise<string>;
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}
|
|
41
|
+
export declare function runFirstTurnAutoname(input: RunAutonameInput): Promise<AutonameOutcome>;
|
|
42
|
+
export declare function pinProcessCwd(newPath: string): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type ExecFileFn = (file: string, args: string[], opts?: {
|
|
2
|
+
cwd?: string;
|
|
3
|
+
}) => Promise<{
|
|
4
|
+
stdout: string;
|
|
5
|
+
stderr: string;
|
|
6
|
+
}>;
|
|
7
|
+
export interface WorktreeHandle {
|
|
8
|
+
path: string;
|
|
9
|
+
branch: string;
|
|
10
|
+
cleanup: (opts?: {
|
|
11
|
+
force?: boolean;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_BRANCH_PREFIX = "afk/";
|
|
15
|
+
export declare function validateBranchPrefix(value: string, source: string): string;
|
|
16
|
+
export declare function resolveBranchPrefix(override?: string): string;
|
|
17
|
+
export declare function setupWorktree(flagValue: string | true, opts?: {
|
|
18
|
+
execFile?: ExecFileFn;
|
|
19
|
+
branchPrefix?: string;
|
|
20
|
+
baseRef?: string;
|
|
21
|
+
}): Promise<WorktreeHandle>;
|
|
22
|
+
export interface DeferredWorktree {
|
|
23
|
+
repoRoot: string;
|
|
24
|
+
handle(): WorktreeHandle | undefined;
|
|
25
|
+
create(flagValue: string | true): Promise<WorktreeHandle>;
|
|
26
|
+
}
|
|
27
|
+
export declare function setupWorktreeDeferred(opts?: {
|
|
28
|
+
execFile?: ExecFileFn;
|
|
29
|
+
branchPrefix?: string;
|
|
30
|
+
baseRef?: string;
|
|
31
|
+
}): Promise<DeferredWorktree>;
|
|
32
|
+
export declare function validateBaseRef(value: string, source: string): void;
|
|
33
|
+
export declare function resolveBaseRef(override?: string): string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { type SkipReason } from './interactive/worktree-autoname.js';
|
|
3
|
+
import { type CliConfig } from '../config.js';
|
|
4
|
+
import type { CliOptions } from './interactive/shared.js';
|
|
5
|
+
import { type UpdateInfo } from '../update-checker.js';
|
|
6
|
+
export { formatToolResultLine } from './interactive/tool-lane.js';
|
|
7
|
+
export declare function setInteractiveUpdateNotices(updateInfo: UpdateInfo | null, pendingMessage: string | null): void;
|
|
8
|
+
export declare function formatAutonameSkipReason(reason: SkipReason | 'create-failed' | 'unknown', detail: string | undefined): string | undefined;
|
|
9
|
+
export declare function isAutonameEnabled(options: CliOptions, config: CliConfig): boolean;
|
|
10
|
+
export declare function startupHintLine(): string;
|
|
11
|
+
export declare function registerInteractiveCommand(program: Command): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { type MarketplaceInstallDeps } from '../../agent/marketplaces/install.js';
|
|
3
|
+
import { type InstallFromMarketplaceDeps } from '../../agent/marketplaces/resolve.js';
|
|
4
|
+
import { type UpdateMarketplaceDeps } from '../../agent/marketplaces/update.js';
|
|
5
|
+
export interface MarketplaceCommandDeps extends MarketplaceInstallDeps, InstallFromMarketplaceDeps, UpdateMarketplaceDeps {
|
|
6
|
+
logger?: Pick<Console, 'log' | 'error'>;
|
|
7
|
+
}
|
|
8
|
+
export declare function registerMarketplaceCommand(program: Command, deps?: MarketplaceCommandDeps): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { type DetectedSource, type ImportSourceBinary } from '../../config/import-sources.js';
|
|
3
|
+
export declare function registerMigrateCommand(program: Command): void;
|
|
4
|
+
export declare function normalizeBinary(value: string | undefined): ImportSourceBinary | null;
|
|
5
|
+
export declare function buildImportBlock(targets: DetectedSource[], includeMcp: boolean): Record<ImportSourceBinary, {
|
|
6
|
+
plugins: boolean;
|
|
7
|
+
skills: boolean;
|
|
8
|
+
mcp: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function writeImportFrom(configPath: string, importBlock: Record<string, {
|
|
11
|
+
plugins: boolean;
|
|
12
|
+
skills: boolean;
|
|
13
|
+
mcp: boolean;
|
|
14
|
+
}>): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { type InstallDeps } from '../../agent/plugins/install.js';
|
|
3
|
+
import { type UpdateDeps } from '../../agent/plugins/update.js';
|
|
4
|
+
export interface PluginCommandDeps extends InstallDeps, UpdateDeps {
|
|
5
|
+
logger?: Pick<Console, 'log' | 'error'>;
|
|
6
|
+
}
|
|
7
|
+
export declare function registerPluginCommand(program: Command, deps?: PluginCommandDeps): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { type OpenAIAuthSource, type AuthResolverDeps } from '../../agent/providers/openai-compatible/auth.js';
|
|
3
|
+
export declare function buildProviderAuthDiagnose(explicitConfigKey: string | undefined, deps?: AuthResolverDeps): {
|
|
4
|
+
source: OpenAIAuthSource;
|
|
5
|
+
message: string;
|
|
6
|
+
exitCode: number;
|
|
7
|
+
last4?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function registerProviderCommand(program: Command): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
type SupportedShell = 'bash' | 'zsh' | 'fish';
|
|
3
|
+
export declare function renderShellInit(shell: SupportedShell, markerPath: string): string;
|
|
4
|
+
export declare function detectShellFromEnv(shellEnv: string | undefined): SupportedShell;
|
|
5
|
+
export declare function registerShellInitCommand(program: Command): void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAgentSession } from '../../agent/types.js';
|
|
2
|
+
import '../../skills/mint/index.js';
|
|
3
|
+
import '../../skills/diagnose/index.js';
|
|
4
|
+
export interface RouteResult {
|
|
5
|
+
handled: true;
|
|
6
|
+
output: string;
|
|
7
|
+
status: 'ok' | 'error' | 'help';
|
|
8
|
+
}
|
|
9
|
+
export declare function tryRouteSkill(input: string, session: IAgentSession): Promise<RouteResult | null>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import type { TraceEvent } from '../../agent/trace/index.js';
|
|
3
|
+
export interface TraceDirEntry {
|
|
4
|
+
sessionId: string;
|
|
5
|
+
tracePath: string;
|
|
6
|
+
mtimeMs: number;
|
|
7
|
+
exists: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function listTraces(): Promise<TraceDirEntry[]>;
|
|
10
|
+
export declare function resolveLatestSession(): Promise<string | null>;
|
|
11
|
+
export interface ParsedTrace {
|
|
12
|
+
events: TraceEvent[];
|
|
13
|
+
malformed: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function parseTrace(content: string): ParsedTrace;
|
|
16
|
+
export declare function loadTrace(session: string): Promise<{
|
|
17
|
+
sessionId: string;
|
|
18
|
+
tracePath: string;
|
|
19
|
+
} & ParsedTrace>;
|
|
20
|
+
export interface FormatTraceOptions {
|
|
21
|
+
showAll?: boolean;
|
|
22
|
+
limit?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function formatTrace(sessionId: string, tracePath: string, parsed: ParsedTrace, options?: FormatTraceOptions): string;
|
|
25
|
+
export declare function registerTraceCommand(program: Command): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface CommitModeInput {
|
|
2
|
+
prevTopRow: number;
|
|
3
|
+
frameTop: number;
|
|
4
|
+
anchorFloor: number;
|
|
5
|
+
anchorRow: number;
|
|
6
|
+
lineCount: number;
|
|
7
|
+
textLines: string[];
|
|
8
|
+
rows: number;
|
|
9
|
+
extraRows: number;
|
|
10
|
+
committedBand: string[];
|
|
11
|
+
committedBandBottomRow: number;
|
|
12
|
+
committedBandPaintedRows: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CommitMode {
|
|
15
|
+
fitsAboveFrame: boolean;
|
|
16
|
+
room: number;
|
|
17
|
+
overflowTargetBottom: number;
|
|
18
|
+
maxBandModel: number;
|
|
19
|
+
overflowPriorContiguous: boolean;
|
|
20
|
+
overflowRun: string[];
|
|
21
|
+
overflowHasPending: boolean;
|
|
22
|
+
useBandHold: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function decideCommitMode(input: CommitModeInput): CommitMode;
|
|
25
|
+
export declare function capBandModel(run: string[], max: number): string[];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { getModelId, isValidModel } from '../agent/session/model-resolution.js';
|
|
2
|
+
import { type ModelSlots } from '../agent/session/model-slots.js';
|
|
3
|
+
import { type BundledProviderName } from '../agent/providers/index.js';
|
|
4
|
+
import type { AgentModelInput } from '../agent/types.js';
|
|
5
|
+
import type { PermissionMode } from '../agent/types/sdk-types.js';
|
|
6
|
+
import type { RawHooksConfig } from '../agent/hooks/config-loader.js';
|
|
7
|
+
import { type ImportFromConfig, type ImportSourceBinary } from '../config/import-sources.js';
|
|
8
|
+
export type { ImportFromConfig, ImportSourceBinary };
|
|
9
|
+
export { getModelId, isValidModel };
|
|
10
|
+
export interface AutoRoutingConfig {
|
|
11
|
+
interactive?: boolean;
|
|
12
|
+
chat?: boolean;
|
|
13
|
+
telegram?: boolean;
|
|
14
|
+
daemon?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface CliConfig {
|
|
17
|
+
apiKey?: string;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
model: AgentModelInput;
|
|
20
|
+
models?: ModelSlots;
|
|
21
|
+
maxTokens: number;
|
|
22
|
+
temperature: number;
|
|
23
|
+
openaiBaseUrl?: string;
|
|
24
|
+
systemPrompt?: string;
|
|
25
|
+
systemPromptSource?: string;
|
|
26
|
+
permissionMode?: PermissionMode;
|
|
27
|
+
autoRouting?: AutoRoutingConfig;
|
|
28
|
+
daemon?: {
|
|
29
|
+
task?: string;
|
|
30
|
+
taskId?: string;
|
|
31
|
+
worktreePrune?: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
cron: string;
|
|
34
|
+
maxAgeDaysClean: number;
|
|
35
|
+
maxAgeDaysDirty: number;
|
|
36
|
+
scope: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
telegram?: {
|
|
40
|
+
notify?: {
|
|
41
|
+
mode?: 'primary' | 'broadcast' | 'custom';
|
|
42
|
+
primaryChatId?: number;
|
|
43
|
+
targets?: number[];
|
|
44
|
+
};
|
|
45
|
+
verifyDone?: boolean;
|
|
46
|
+
};
|
|
47
|
+
interactive?: {
|
|
48
|
+
worktreeAutoname?: boolean;
|
|
49
|
+
worktreeBranchPrefix?: string;
|
|
50
|
+
worktreeBase?: string;
|
|
51
|
+
suggestGhost?: boolean;
|
|
52
|
+
};
|
|
53
|
+
updatePolicy: 'notify' | 'auto' | 'off';
|
|
54
|
+
autoResumeOnUsageLimit?: boolean;
|
|
55
|
+
bgSummaries?: boolean;
|
|
56
|
+
maxSummaryCallsPerSession?: number;
|
|
57
|
+
hooks?: RawHooksConfig;
|
|
58
|
+
enableShellHooks?: boolean;
|
|
59
|
+
importFrom?: ImportFromConfig;
|
|
60
|
+
}
|
|
61
|
+
export declare const DEFAULT_CLI_PERMISSION_MODE: PermissionMode;
|
|
62
|
+
export declare function loadCredential(): string | undefined;
|
|
63
|
+
export declare function normalizeOpenAIBaseUrl(raw: string): string;
|
|
64
|
+
export declare function _resetOpenAIBaseUrlWarnCache(): void;
|
|
65
|
+
export declare function _resetConfigCache(): void;
|
|
66
|
+
export declare function loadTelegramConfig(): NonNullable<CliConfig['telegram']>;
|
|
67
|
+
export declare function resolveCliPermissionMode(): PermissionMode;
|
|
68
|
+
export declare function loadConfig(overrides?: Partial<CliConfig>): CliConfig;
|
|
69
|
+
export declare function resolvedProviderName(config: CliConfig): BundledProviderName;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AgentSession } from '../agent/session.js';
|
|
2
|
+
export interface ContextSamplerOptions {
|
|
3
|
+
sampleEveryNTurns?: number;
|
|
4
|
+
}
|
|
5
|
+
interface ContextUsageSource {
|
|
6
|
+
getContextUsage(): Promise<{
|
|
7
|
+
apiUsage?: {
|
|
8
|
+
input_tokens: number;
|
|
9
|
+
output_tokens: number;
|
|
10
|
+
cache_creation_input_tokens: number;
|
|
11
|
+
cache_read_input_tokens: number;
|
|
12
|
+
} | null;
|
|
13
|
+
percentage?: number;
|
|
14
|
+
totalTokens?: number;
|
|
15
|
+
maxTokens?: number;
|
|
16
|
+
autoCompactThreshold?: number;
|
|
17
|
+
isAutoCompactEnabled: boolean;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare class ContextSampler {
|
|
22
|
+
private source;
|
|
23
|
+
private readonly sampleEveryNTurns;
|
|
24
|
+
private cachedRatio;
|
|
25
|
+
private cachedDetail;
|
|
26
|
+
private inFlight;
|
|
27
|
+
private disposed;
|
|
28
|
+
private generation;
|
|
29
|
+
constructor(source: ContextUsageSource, opts?: ContextSamplerOptions);
|
|
30
|
+
attach(session: AgentSession): this;
|
|
31
|
+
getRatio(): number | undefined;
|
|
32
|
+
getDetail(): {
|
|
33
|
+
used: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
percentage: number;
|
|
36
|
+
} | undefined;
|
|
37
|
+
refresh(): Promise<void>;
|
|
38
|
+
onTurn(turnIndex: number): Promise<void>;
|
|
39
|
+
reset(): void;
|
|
40
|
+
dispose(): void;
|
|
41
|
+
private doFetch;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatTurnSparkline(ratios: number[], n?: number): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Writable } from 'node:stream';
|
|
2
|
+
export declare class CupFrameRenderer {
|
|
3
|
+
private readonly stream;
|
|
4
|
+
private previousTopRow;
|
|
5
|
+
private previousLineCount;
|
|
6
|
+
private previousRawLineCount;
|
|
7
|
+
constructor(stream: NodeJS.WriteStream & Writable);
|
|
8
|
+
get topRow(): number;
|
|
9
|
+
private static wrapToPhysicalLines;
|
|
10
|
+
measure(content: string, targetBottomRow: number): {
|
|
11
|
+
topRow: number;
|
|
12
|
+
lineCount: number;
|
|
13
|
+
};
|
|
14
|
+
render(content: string, targetBottomRow: number, anchorFloor?: number): void;
|
|
15
|
+
resetGeometry(): void;
|
|
16
|
+
clear(extraRows?: number): void;
|
|
17
|
+
done(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TriggerMode } from '../agent/daemon/triggers.js';
|
|
2
|
+
export declare function resolveDaemonTimeoutMs(flagValue: string | undefined, envValue: string | undefined): number | undefined;
|
|
3
|
+
export declare function resolveSessionStartCooldownMs(flagValue: string | undefined, envValue: string | undefined): number | undefined;
|
|
4
|
+
export declare function resolveTriggerMode(flagValue: string | undefined, cronFlag?: string | undefined): TriggerMode;
|
|
5
|
+
export declare const COMPILED_DEFAULT_TASK = "";
|
|
6
|
+
export declare const COMPILED_DEFAULT_TASK_ID = "default";
|
|
7
|
+
export declare function resolveDefaultTask(flagValue: string | undefined, envValue: string | undefined, configValue: string | undefined): string;
|
|
8
|
+
export declare function resolveDefaultTaskId(flagValue: string | undefined, envValue: string | undefined, configValue: string | undefined): string;
|
|
9
|
+
export declare const DEFAULT_DAEMON_HOST = "127.0.0.1";
|
|
10
|
+
export declare function resolveDaemonHost(flagValue: string | undefined, envValue: string | undefined): string;
|
|
11
|
+
export declare function isLoopbackHost(host: string): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function stripAnsi(text: string): string;
|
|
2
|
+
export declare function displayWidth(text: string): number;
|
|
3
|
+
export declare function splitGraphemes(text: string): string[];
|
|
4
|
+
export declare function padDisplayRight(text: string, width: number): string;
|
|
5
|
+
export declare function padDisplayLeft(text: string, width: number): string;
|
|
6
|
+
export declare function padDisplay(text: string, width: number, align?: 'left' | 'right' | 'center'): string;
|
|
7
|
+
export declare function truncateDisplayWidth(text: string, maxWidth: number, ellipsis?: string): string;
|
|
8
|
+
export declare function previousGraphemeIndex(text: string, index: number): number;
|
|
9
|
+
export declare function nextGraphemeIndex(text: string, index: number): number;
|
|
10
|
+
export interface CursorMetrics {
|
|
11
|
+
row: number;
|
|
12
|
+
col: number;
|
|
13
|
+
}
|
|
14
|
+
export interface BufferMetrics {
|
|
15
|
+
cursor: CursorMetrics;
|
|
16
|
+
end: CursorMetrics;
|
|
17
|
+
rowsUsed: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function measureBuffer(buffer: string, cursor: number, promptWidth: number, columns: number): BufferMetrics;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ElicitationRequest, ElicitationResult } from '../agent/types/sdk-types.js';
|
|
2
|
+
export interface ReplElicitationDeps {
|
|
3
|
+
readLine: (prompt: string) => Promise<string>;
|
|
4
|
+
writer: {
|
|
5
|
+
line: (text?: string) => void;
|
|
6
|
+
};
|
|
7
|
+
pendingCount: () => number;
|
|
8
|
+
suspendInput?: () => void;
|
|
9
|
+
resumeInput?: () => void;
|
|
10
|
+
pickFromList?: (opts: {
|
|
11
|
+
header: readonly string[];
|
|
12
|
+
options: readonly string[];
|
|
13
|
+
multi?: boolean;
|
|
14
|
+
signal: AbortSignal;
|
|
15
|
+
}) => Promise<readonly string[] | null>;
|
|
16
|
+
readTextOverlay?: (opts: {
|
|
17
|
+
header: readonly string[];
|
|
18
|
+
initial?: string;
|
|
19
|
+
help?: string;
|
|
20
|
+
validate?: (value: string) => string | null;
|
|
21
|
+
signal: AbortSignal;
|
|
22
|
+
}) => Promise<string | null>;
|
|
23
|
+
}
|
|
24
|
+
export declare function makeReplElicitationHandler(deps: ReplElicitationDeps): (request: ElicitationRequest, options: {
|
|
25
|
+
signal: AbortSignal;
|
|
26
|
+
}) => Promise<ElicitationResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ErrorKind = 'auth' | 'rate_limit' | 'overloaded' | 'budget_exceeded' | 'unsupported_config' | 'hook_blocked' | 'timeout' | 'network' | 'not_git_repo' | 'unknown';
|
|
2
|
+
export interface ClassifiedError {
|
|
3
|
+
kind: ErrorKind;
|
|
4
|
+
userMessage: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
exitCode: number;
|
|
7
|
+
raw: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare function classifyError(err: unknown): ClassifiedError;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface RenderMarkdownOptions {
|
|
2
|
+
maxWidth?: number;
|
|
3
|
+
}
|
|
4
|
+
export declare function renderCardLine(text: string): string;
|
|
5
|
+
export declare function renderMarkdownToTerminal(text: string, opts?: RenderMarkdownOptions): string;
|
|
6
|
+
export declare class OutputFormatter {
|
|
7
|
+
private useColors;
|
|
8
|
+
constructor(useColors?: boolean);
|
|
9
|
+
formatMarkdown(text: string): string;
|
|
10
|
+
formatError(message: string, error?: Error): string;
|
|
11
|
+
formatSuccess(message: string): string;
|
|
12
|
+
formatInfo(message: string): string;
|
|
13
|
+
formatWarning(message: string): string;
|
|
14
|
+
formatCommand(command: string): string;
|
|
15
|
+
formatPrompt(modelName: string): string;
|
|
16
|
+
formatModelInfo(model: string, maxTokens: number, temp: number): string;
|
|
17
|
+
separator(char?: string, width?: number): string;
|
|
18
|
+
formatHelp(sections: {
|
|
19
|
+
title: string;
|
|
20
|
+
items: string[];
|
|
21
|
+
}[]): string;
|
|
22
|
+
formatStreaming(text: string): string;
|
|
23
|
+
}
|
|
24
|
+
export declare const formatter: OutputFormatter;
|
|
25
|
+
export declare function truncate(text: string, maxLength: number): string;
|
|
26
|
+
export declare function wordWrap(text: string, width: number): string;
|
|
27
|
+
export {};
|