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,136 @@
|
|
|
1
|
+
export type EnvVarType = 'string' | 'number' | 'boolean' | 'json';
|
|
2
|
+
export type EnvVarCategory = 'model' | 'auth' | 'telegram' | 'paths' | 'debug' | 'daemon' | 'worktree' | 'mcp' | 'routing' | 'browser' | 'process' | 'misc';
|
|
3
|
+
export interface EnvVarMeta {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
readonly type: EnvVarType;
|
|
7
|
+
readonly required: boolean;
|
|
8
|
+
readonly default?: string;
|
|
9
|
+
readonly example?: string;
|
|
10
|
+
readonly category: EnvVarCategory;
|
|
11
|
+
readonly describedTodo?: boolean;
|
|
12
|
+
readonly secret?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const ENV_REGISTRY: readonly EnvVarMeta[];
|
|
15
|
+
export declare const env: {
|
|
16
|
+
readonly AFK_COMPACT_KEEP_LAST_TURNS: string | undefined;
|
|
17
|
+
readonly AFK_COMPACT_MODEL: string | undefined;
|
|
18
|
+
readonly AFK_DEFAULT_SUBAGENT_MODEL: string | undefined;
|
|
19
|
+
readonly AFK_DIAGNOSE_BASELINE: string | undefined;
|
|
20
|
+
readonly AFK_DISABLE_BASH_INTERPRETER_GUARD: string | undefined;
|
|
21
|
+
readonly AFK_DISABLE_PATH_APPROVAL: string | undefined;
|
|
22
|
+
readonly AFK_DISABLE_PROMPT_CACHE: string | undefined;
|
|
23
|
+
readonly AFK_EFFORT: string | undefined;
|
|
24
|
+
readonly AFK_FORCE_BASH_INTERPRETER_GUARD: string | undefined;
|
|
25
|
+
readonly AFK_MAX_BUDGET_USD: string | undefined;
|
|
26
|
+
readonly AFK_MAX_OUTPUT_TOKENS: string | undefined;
|
|
27
|
+
readonly AFK_MAX_TOKENS: string | undefined;
|
|
28
|
+
readonly AFK_MEMORY_EVIDENCE_GATE: string | undefined;
|
|
29
|
+
readonly AFK_MODEL: string | undefined;
|
|
30
|
+
readonly AFK_MODEL_LARGE: string | undefined;
|
|
31
|
+
readonly AFK_MODEL_LARGE_API_KEY: string | undefined;
|
|
32
|
+
readonly AFK_MODEL_LARGE_BASE_URL: string | undefined;
|
|
33
|
+
readonly AFK_MODEL_LOCAL: string | undefined;
|
|
34
|
+
readonly AFK_MODEL_LOCAL_API_KEY: string | undefined;
|
|
35
|
+
readonly AFK_MODEL_LOCAL_BASE_URL: string | undefined;
|
|
36
|
+
readonly AFK_MODEL_MEDIUM: string | undefined;
|
|
37
|
+
readonly AFK_MODEL_MEDIUM_API_KEY: string | undefined;
|
|
38
|
+
readonly AFK_MODEL_MEDIUM_BASE_URL: string | undefined;
|
|
39
|
+
readonly AFK_MODEL_SMALL: string | undefined;
|
|
40
|
+
readonly AFK_MODEL_SMALL_API_KEY: string | undefined;
|
|
41
|
+
readonly AFK_MODEL_SMALL_BASE_URL: string | undefined;
|
|
42
|
+
readonly AFK_VISION_MODELS: string | undefined;
|
|
43
|
+
readonly AFK_PROMPT_CACHE_TTL: string | undefined;
|
|
44
|
+
readonly AFK_SUGGEST_ENABLED: string | undefined;
|
|
45
|
+
readonly AFK_SUGGEST_GHOST: string | undefined;
|
|
46
|
+
readonly AFK_SUGGEST_MODEL: string | undefined;
|
|
47
|
+
readonly AFK_TASK_BUDGET: string | undefined;
|
|
48
|
+
readonly AFK_TEMPERATURE: string | undefined;
|
|
49
|
+
readonly AFK_THINKING: string | undefined;
|
|
50
|
+
readonly AFK_TIMEOUT_MS: string | undefined;
|
|
51
|
+
readonly CLAUDE_MODEL: string | undefined;
|
|
52
|
+
readonly AFK_SYSTEM_PROMPT: string | undefined;
|
|
53
|
+
readonly AFK_DUMP_PROMPT: string | undefined;
|
|
54
|
+
readonly ANTHROPIC_API_KEY: string | undefined;
|
|
55
|
+
readonly CLAUDE_CODE_OAUTH_TOKEN: string | undefined;
|
|
56
|
+
readonly OPENAI_API_KEY: string | undefined;
|
|
57
|
+
readonly CODEX_API_KEY: string | undefined;
|
|
58
|
+
readonly AFK_LOCAL_API_KEY: string | undefined;
|
|
59
|
+
readonly AFK_LOCAL_BASE_URL: string | undefined;
|
|
60
|
+
readonly AFK_OPENAI_BASE_URL: string | undefined;
|
|
61
|
+
readonly AFK_OPENAI_USE_RESPONSES: string | undefined;
|
|
62
|
+
readonly AFK_OPENAI_CHATGPT_OAUTH: string | undefined;
|
|
63
|
+
readonly AFK_PROVIDER: string | undefined;
|
|
64
|
+
readonly EXA_API_KEY: string | undefined;
|
|
65
|
+
readonly TELEGRAM_BOT_TOKEN: string | undefined;
|
|
66
|
+
readonly AFK_TELEGRAM_BOT_TOKEN: string | undefined;
|
|
67
|
+
readonly AFK_TELEGRAM_ALLOWED_CHAT_IDS: string | undefined;
|
|
68
|
+
readonly AFK_TELEGRAM_PRIMARY_CHAT_ID: string | undefined;
|
|
69
|
+
readonly AFK_TELEGRAM_NOTIFY_MODE: string | undefined;
|
|
70
|
+
readonly TELEGRAM_DATA_DIR: string | undefined;
|
|
71
|
+
readonly TELEGRAM_VERBOSE: string | undefined;
|
|
72
|
+
readonly AFK_TELEGRAM_TRACE: string | undefined;
|
|
73
|
+
readonly AFK_TELEGRAM_CWD: string | undefined;
|
|
74
|
+
readonly AFK_HOME: string | undefined;
|
|
75
|
+
readonly AFK_STATE_DIR: string | undefined;
|
|
76
|
+
readonly AFK_FRAMEWORK_DIR: string | undefined;
|
|
77
|
+
readonly HOME: string | undefined;
|
|
78
|
+
readonly PATH: string | undefined;
|
|
79
|
+
readonly AFK_DAEMON_CWD: string | undefined;
|
|
80
|
+
readonly AFK_DAEMON_TASK: string | undefined;
|
|
81
|
+
readonly AFK_DAEMON_TASK_ID: string | undefined;
|
|
82
|
+
readonly AFK_DAEMON_HOST: string | undefined;
|
|
83
|
+
readonly AFK_SESSIONSTART_COOLDOWN_MS: string | undefined;
|
|
84
|
+
readonly AFK_WORKTREE_AUTONAME: string | undefined;
|
|
85
|
+
readonly AFK_WORKTREE_BRANCH_PREFIX: string | undefined;
|
|
86
|
+
readonly AFK_WORKTREE_BASE: string | undefined;
|
|
87
|
+
readonly AFK_WORKTREE_BOOT_PRUNE: string | undefined;
|
|
88
|
+
readonly AFK_WORKTREE_PRUNE_DISABLE: string | undefined;
|
|
89
|
+
readonly AFK_WORKTREE_MAX_AGE_CLEAN: string | undefined;
|
|
90
|
+
readonly AFK_WORKTREE_MAX_AGE_DIRTY: string | undefined;
|
|
91
|
+
readonly AFK_WORKTREE_SWEEP_ROOT: string | undefined;
|
|
92
|
+
readonly AFK_ALLOW_PROJECT_MCP: string | undefined;
|
|
93
|
+
readonly AFK_AUTO_ROUTING: string | undefined;
|
|
94
|
+
readonly AFK_INTERNAL: string | undefined;
|
|
95
|
+
readonly AFK_SHELL_PASSTHROUGH: string | undefined;
|
|
96
|
+
readonly AFK_BANNER_PLAIN: string | undefined;
|
|
97
|
+
readonly AFK_SPINNER_TIPS: string | undefined;
|
|
98
|
+
readonly AFK_SHOW_DIFFS: string | undefined;
|
|
99
|
+
readonly AFK_SKILL_STREAM_VERBOSE: string | undefined;
|
|
100
|
+
readonly FORCE_COLOR: string | undefined;
|
|
101
|
+
readonly NO_COLOR: string | undefined;
|
|
102
|
+
readonly AFK_DEBUG: string | undefined;
|
|
103
|
+
readonly AFK_DEBUG_CLIPBOARD: string | undefined;
|
|
104
|
+
readonly AFK_DEBUG_COMPOSITOR: string | undefined;
|
|
105
|
+
readonly AFK_TRACE_DISABLED: string | undefined;
|
|
106
|
+
readonly AFK_SESSION_LEDGER_DISABLED: string | undefined;
|
|
107
|
+
readonly AFK_RUN_RECEIPT_DISABLED: string | undefined;
|
|
108
|
+
readonly DEBUG: string | undefined;
|
|
109
|
+
readonly AGENT_AFK_ASCII: string | undefined;
|
|
110
|
+
readonly AGENT_SURFACE: string | undefined;
|
|
111
|
+
readonly CI: string | undefined;
|
|
112
|
+
readonly NODE_ENV: string | undefined;
|
|
113
|
+
readonly VITEST: string | undefined;
|
|
114
|
+
readonly NO_UPDATE_NOTIFIER: string | undefined;
|
|
115
|
+
readonly AFK_SESSION_ID: string | undefined;
|
|
116
|
+
readonly AFK_BROWSER_HEADLESS: string | undefined;
|
|
117
|
+
readonly AFK_BROWSER_ALLOWED_DOMAINS: string | undefined;
|
|
118
|
+
readonly AFK_BROWSER_BLOCKED_DOMAINS: string | undefined;
|
|
119
|
+
readonly AFK_BROWSER_DOM_SNAPSHOTS: string | undefined;
|
|
120
|
+
readonly AFK_BROWSER_BACKEND: string | undefined;
|
|
121
|
+
readonly AFK_BROWSER_CONFIG: string | undefined;
|
|
122
|
+
readonly AFK_WRITE_DENYLIST: string | undefined;
|
|
123
|
+
readonly AFK_WRITE_DIFF: string | undefined;
|
|
124
|
+
readonly AFK_DEMO_CLEAN: string | undefined;
|
|
125
|
+
readonly SCRIPT: string | undefined;
|
|
126
|
+
readonly ASCIINEMA_REC: string | undefined;
|
|
127
|
+
readonly SHELL: string | undefined;
|
|
128
|
+
readonly PAGER: string | undefined;
|
|
129
|
+
readonly AFK_DIFF_LINES: string | undefined;
|
|
130
|
+
readonly AFK_SHELL_WRAPPER: string | undefined;
|
|
131
|
+
readonly AFK_USER_CARD_MAX_ROWS: string | undefined;
|
|
132
|
+
};
|
|
133
|
+
export type EnvVarName = keyof typeof env;
|
|
134
|
+
export declare function getEnvVarMeta(name: string): EnvVarMeta | undefined;
|
|
135
|
+
export declare function getMissingRequiredEnvVars(category?: EnvVarCategory): EnvVarMeta[];
|
|
136
|
+
export declare function isEnvVarSet(name: string): boolean;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ImportSourceBinary = 'claude-code' | 'codex';
|
|
2
|
+
export declare const KNOWN_IMPORT_BINARIES: readonly ImportSourceBinary[];
|
|
3
|
+
export interface ImportAssetToggles {
|
|
4
|
+
plugins: boolean;
|
|
5
|
+
skills: boolean;
|
|
6
|
+
mcp: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type ImportFromConfig = Partial<Record<ImportSourceBinary, ImportAssetToggles>>;
|
|
9
|
+
export type ImportedSkillOrigin = `imported:${ImportSourceBinary}`;
|
|
10
|
+
export type McpConfigFormat = 'json' | 'toml';
|
|
11
|
+
export declare const KNOWN_SOURCE_LABELS: Record<ImportSourceBinary, string>;
|
|
12
|
+
export declare function parseImportFromConfig(raw: unknown): ImportFromConfig | undefined;
|
|
13
|
+
export declare function importFromConfigPaths(): string[];
|
|
14
|
+
export declare function loadImportFromConfig(configPaths?: readonly string[]): ImportFromConfig | undefined;
|
|
15
|
+
export interface ResolvedImportRoots {
|
|
16
|
+
pluginRoots: string[];
|
|
17
|
+
skillRoots: Array<{
|
|
18
|
+
dir: string;
|
|
19
|
+
origin: ImportedSkillOrigin;
|
|
20
|
+
}>;
|
|
21
|
+
mcpConfigs: Array<{
|
|
22
|
+
source: string;
|
|
23
|
+
format: McpConfigFormat;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
export declare function resolveImportedRoots(config: ImportFromConfig | undefined, home?: string): ResolvedImportRoots;
|
|
27
|
+
export interface DetectedAsset {
|
|
28
|
+
name: string;
|
|
29
|
+
path: string;
|
|
30
|
+
}
|
|
31
|
+
export interface DetectedMcpServer {
|
|
32
|
+
name: string;
|
|
33
|
+
command: string;
|
|
34
|
+
}
|
|
35
|
+
export interface DetectedSource {
|
|
36
|
+
binary: ImportSourceBinary;
|
|
37
|
+
label: string;
|
|
38
|
+
present: boolean;
|
|
39
|
+
plugins: DetectedAsset[];
|
|
40
|
+
skills: DetectedAsset[];
|
|
41
|
+
mcpServers: DetectedMcpServer[];
|
|
42
|
+
mcpConfigPath: string | null;
|
|
43
|
+
mcpFormat: McpConfigFormat;
|
|
44
|
+
}
|
|
45
|
+
export declare function detectSources(home?: string): DetectedSource[];
|
|
46
|
+
export declare function readMcpServers(path: string, format: McpConfigFormat): DetectedMcpServer[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type EnvKeyClass, type ConfigKeyClass } from './settable-keys.js';
|
|
2
|
+
export declare const RESTART_NOTE = "effective on the next session/daemon restart; the current session is unchanged";
|
|
3
|
+
export declare class UnknownKeyError extends Error {
|
|
4
|
+
constructor(key: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class NonConfigKeyError extends Error {
|
|
7
|
+
constructor(key: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class SecretWriteRefused extends Error {
|
|
10
|
+
constructor(key: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class ProtectedEnvKeyRefused extends Error {
|
|
13
|
+
constructor(key: string);
|
|
14
|
+
}
|
|
15
|
+
export declare class HumanOnlyKeyRefused extends Error {
|
|
16
|
+
constructor(key: string);
|
|
17
|
+
}
|
|
18
|
+
export declare class ConfigValidationError extends Error {
|
|
19
|
+
constructor(message: string);
|
|
20
|
+
}
|
|
21
|
+
export declare class MalformedConfigError extends Error {
|
|
22
|
+
constructor(path: string);
|
|
23
|
+
}
|
|
24
|
+
export declare function maskSecret(value: string | undefined): string;
|
|
25
|
+
export interface EnvOptions {
|
|
26
|
+
allowSecret?: boolean;
|
|
27
|
+
allowProtected?: boolean;
|
|
28
|
+
filePath?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface EnvVarView {
|
|
31
|
+
key: string;
|
|
32
|
+
class: EnvKeyClass;
|
|
33
|
+
persisted: string | undefined;
|
|
34
|
+
activeInProcess: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface EnvWriteResult {
|
|
37
|
+
key: string;
|
|
38
|
+
class: EnvKeyClass;
|
|
39
|
+
persistedTo: string;
|
|
40
|
+
display: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function setEnvVar(key: string, rawValue: string, opts?: EnvOptions): EnvWriteResult;
|
|
43
|
+
export interface EnvRemoveResult {
|
|
44
|
+
key: string;
|
|
45
|
+
class: EnvKeyClass;
|
|
46
|
+
removed: boolean;
|
|
47
|
+
persistedTo: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function unsetEnvVar(key: string, opts?: EnvOptions): EnvRemoveResult;
|
|
50
|
+
export declare function getEnvVar(key: string, opts?: EnvOptions): EnvVarView;
|
|
51
|
+
export declare function listEnv(opts?: EnvOptions & {
|
|
52
|
+
all?: boolean;
|
|
53
|
+
}): EnvVarView[];
|
|
54
|
+
export interface ConfigOptions {
|
|
55
|
+
allowHumanOnly?: boolean;
|
|
56
|
+
filePath?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ConfigWriteResult {
|
|
59
|
+
path: string;
|
|
60
|
+
class: ConfigKeyClass;
|
|
61
|
+
value: string | number | boolean | number[];
|
|
62
|
+
persistedTo: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function setConfigValue(path: string, rawValue: unknown, opts?: ConfigOptions): ConfigWriteResult;
|
|
65
|
+
export interface ConfigRemoveResult {
|
|
66
|
+
path: string;
|
|
67
|
+
class: ConfigKeyClass;
|
|
68
|
+
removed: boolean;
|
|
69
|
+
persistedTo: string;
|
|
70
|
+
}
|
|
71
|
+
export declare function unsetConfigValue(path: string, opts?: ConfigOptions): ConfigRemoveResult;
|
|
72
|
+
export interface ConfigValueView {
|
|
73
|
+
path: string;
|
|
74
|
+
class: ConfigKeyClass;
|
|
75
|
+
value: unknown;
|
|
76
|
+
}
|
|
77
|
+
export declare function getConfigValue(path: string, opts?: ConfigOptions): ConfigValueView;
|
|
78
|
+
export declare function listConfig(opts?: ConfigOptions): Record<string, unknown>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type EnvVarMeta } from './env.js';
|
|
2
|
+
export declare const INHERITED_ENV_KEYS: ReadonlySet<string>;
|
|
3
|
+
export declare const PROTECTED_ENV_KEYS: ReadonlySet<string>;
|
|
4
|
+
export type EnvKeyClass = 'settable' | 'secret' | 'protected' | 'non-config' | 'unknown';
|
|
5
|
+
export declare function classifyEnvKey(name: string): EnvKeyClass;
|
|
6
|
+
export type CoerceResult = {
|
|
7
|
+
ok: true;
|
|
8
|
+
value: string;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
error: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function coerceEnvValue(meta: EnvVarMeta, raw: string): CoerceResult;
|
|
14
|
+
export type ConfigKeyTier = 'agent' | 'human';
|
|
15
|
+
export type ConfigKeyType = 'string' | 'number' | 'boolean' | 'enum' | 'number-array';
|
|
16
|
+
export interface ConfigKeySpec {
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly tier: ConfigKeyTier;
|
|
19
|
+
readonly type: ConfigKeyType;
|
|
20
|
+
readonly enumValues?: readonly string[];
|
|
21
|
+
readonly clamp?: {
|
|
22
|
+
readonly min: number;
|
|
23
|
+
readonly max: number;
|
|
24
|
+
readonly integer?: boolean;
|
|
25
|
+
};
|
|
26
|
+
readonly description: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const CONFIG_KEY_SPECS: readonly ConfigKeySpec[];
|
|
29
|
+
export declare function getConfigKeySpec(path: string): ConfigKeySpec | undefined;
|
|
30
|
+
export type ConfigKeyClass = 'agent' | 'human' | 'unknown';
|
|
31
|
+
export declare function classifyConfigKey(path: string): ConfigKeyClass;
|
|
32
|
+
export type ConfigCoerceResult = {
|
|
33
|
+
ok: true;
|
|
34
|
+
value: string | number | boolean | number[];
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
error: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function coerceConfigValue(spec: ConfigKeySpec, raw: unknown): ConfigCoerceResult;
|
|
40
|
+
type Json = Record<string, unknown>;
|
|
41
|
+
export declare function getAtPath(obj: Json, path: string): unknown;
|
|
42
|
+
export declare function setAtPath(obj: Json, path: string, value: unknown): void;
|
|
43
|
+
export declare function unsetAtPath(obj: Json, path: string): boolean;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type EvalGenErrorCode = 'source-not-found' | 'source-empty' | 'seq-not-found' | 'unsupported-window' | 'fixture-mismatch' | 'card-not-found' | 'card-pattern-unknown' | 'evidence-row-out-of-range' | 'proposal-not-found';
|
|
2
|
+
export declare class EvalGenError extends Error {
|
|
3
|
+
readonly code: EvalGenErrorCode;
|
|
4
|
+
constructor(message: string, code: EvalGenErrorCode);
|
|
5
|
+
}
|
|
6
|
+
export interface SliceTraceOptions {
|
|
7
|
+
endSeq: number;
|
|
8
|
+
startLine?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface SliceTraceResult {
|
|
11
|
+
bytes: Buffer;
|
|
12
|
+
startLine: number;
|
|
13
|
+
endLine: number;
|
|
14
|
+
sliceLineCount: number;
|
|
15
|
+
sliceSha256: string;
|
|
16
|
+
sourceLineCount: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function sliceTracePrefix(sourceAbsPath: string, options: SliceTraceOptions): SliceTraceResult;
|
|
19
|
+
export declare function sha256Bytes(bytes: Buffer): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type EvalCase, type FailureCard } from '../schemas.js';
|
|
2
|
+
export interface IdContext {
|
|
3
|
+
now?: () => Date;
|
|
4
|
+
randomSuffix?: () => string;
|
|
5
|
+
}
|
|
6
|
+
export declare function generateEvalCaseId(cardSlug: string, ctx?: IdContext): string;
|
|
7
|
+
export interface BuildEvalCaseContext {
|
|
8
|
+
evalCaseId: string;
|
|
9
|
+
evidenceRowIndex: number;
|
|
10
|
+
proposalId?: string | null;
|
|
11
|
+
now?: () => Date;
|
|
12
|
+
resolveTraceAbsPath?: (relativeTracePath: string) => string;
|
|
13
|
+
}
|
|
14
|
+
export interface BuildEvalCaseResult {
|
|
15
|
+
evalCase: EvalCase;
|
|
16
|
+
sliceBytes: Buffer;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildEvalCase(card: FailureCard, ctx: BuildEvalCaseContext): BuildEvalCaseResult;
|
|
19
|
+
export interface WriteEvalCaseOutcome {
|
|
20
|
+
evalCaseId: string;
|
|
21
|
+
jsonPath: string;
|
|
22
|
+
fixturePath: string;
|
|
23
|
+
markdownPath: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function writeEvalCase(evalCase: EvalCase, sliceBytes: Buffer): WriteEvalCaseOutcome;
|
|
26
|
+
export declare function renderEvalCaseMarkdown(ec: EvalCase): string;
|
|
27
|
+
export interface EvalCaseListEntry {
|
|
28
|
+
evalCaseId: string;
|
|
29
|
+
cardSlug: string;
|
|
30
|
+
proposalId: string | null;
|
|
31
|
+
title: string;
|
|
32
|
+
kind: EvalCase['kind'];
|
|
33
|
+
status: EvalCase['status'];
|
|
34
|
+
patternId: EvalCase['assertion']['patternId'];
|
|
35
|
+
createdAt: string;
|
|
36
|
+
sliceSha256: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function listEvalCases(): EvalCaseListEntry[];
|
|
39
|
+
export declare function getEvalCase(evalCaseId: string): EvalCase | undefined;
|
|
40
|
+
export declare function getEvalCasesForCard(cardSlug: string): EvalCase[];
|
|
41
|
+
export declare function getEvalCasesForProposal(proposalId: string): EvalCase[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type SessionRead } from '../scan/reader.js';
|
|
2
|
+
import type { EvalCheck, EvalCheckStatus, EvalRunEvidenceRef, FailurePattern } from '../schemas.js';
|
|
3
|
+
export interface ContractProbeResult {
|
|
4
|
+
checks: EvalCheck[];
|
|
5
|
+
evidence: EvalRunEvidenceRef[];
|
|
6
|
+
}
|
|
7
|
+
export interface EvalContract {
|
|
8
|
+
id: string;
|
|
9
|
+
patternId: FailurePattern;
|
|
10
|
+
title: string;
|
|
11
|
+
run: () => Promise<ContractProbeResult>;
|
|
12
|
+
}
|
|
13
|
+
export declare function snapshot(value: unknown): string;
|
|
14
|
+
export declare function makeCheck(args: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
pass: boolean;
|
|
18
|
+
expected: string;
|
|
19
|
+
actual: string;
|
|
20
|
+
status?: EvalCheckStatus;
|
|
21
|
+
}): EvalCheck;
|
|
22
|
+
export declare function buildToolFailureClassificationCorpus(): SessionRead[];
|
|
23
|
+
export declare function resolveContract(patternId: FailurePattern): EvalContract | undefined;
|
|
24
|
+
export declare function supportedContractPatterns(): readonly FailurePattern[];
|
|
25
|
+
export declare function knownContractIds(): readonly string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ClosureReason } from '../../agent/trace/index.js';
|
|
2
|
+
import type { EvalCase, FailurePattern } from '../schemas.js';
|
|
3
|
+
import { type ContractProbeResult } from './contracts.js';
|
|
4
|
+
export declare const REPLAY_CHECK_PREFIX = "replay:";
|
|
5
|
+
export declare const REPLAY_CHECK_REPRODUCES = "replay:fixture-reproduces-pattern";
|
|
6
|
+
export declare const REPLAY_CHECK_NEUTRALIZED = "replay:guardrail-neutralizes-recorded-loop";
|
|
7
|
+
export declare const REPLAY_CHECK_CLOSURE_REPRODUCES = "replay:fixture-reproduces-closure-anomaly";
|
|
8
|
+
export declare const REPLAY_CHECK_CLOSURE_GUIDED = "replay:guardrail-guides-recorded-closure";
|
|
9
|
+
export interface LoopDriveResult {
|
|
10
|
+
trippedAtCall: number | null;
|
|
11
|
+
callsDriven: number;
|
|
12
|
+
}
|
|
13
|
+
export type LoopDriver = (toolName: string, count: number) => Promise<LoopDriveResult>;
|
|
14
|
+
export declare const liveCircuitBreakerDriver: LoopDriver;
|
|
15
|
+
export interface ReplayContext {
|
|
16
|
+
driveLoop?: LoopDriver;
|
|
17
|
+
buildGuidance?: (reason: ClosureReason) => string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ReplayHandler {
|
|
20
|
+
patternId: FailurePattern;
|
|
21
|
+
run: (evalCase: EvalCase, fixtureBytes: Buffer, ctx: ReplayContext) => Promise<ContractProbeResult>;
|
|
22
|
+
}
|
|
23
|
+
export declare function isReplayNeutralizeCheck(name: string): boolean;
|
|
24
|
+
export declare function resolveReplayHandler(patternId: FailurePattern): ReplayHandler | undefined;
|
|
25
|
+
export declare function replaySupportedPatterns(): readonly FailurePattern[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type EvalCase, type EvalCheck, type EvalRun, type EvalRunStatus } from '../schemas.js';
|
|
2
|
+
import type { IdContext } from '../eval-gen/writer.js';
|
|
3
|
+
import { type LoopDriver } from './replay.js';
|
|
4
|
+
export declare const EVAL_RUN_RUNNER_VERSION = "eval-run@v1";
|
|
5
|
+
export declare function generateEvalRunId(cardSlug: string, ctx?: IdContext): string;
|
|
6
|
+
export interface RunEvalCaseContext {
|
|
7
|
+
evalRunId: string;
|
|
8
|
+
now?: () => Date;
|
|
9
|
+
clockMs?: () => number;
|
|
10
|
+
resolveFixtureAbsPath?: (relativeFixturePath: string) => string;
|
|
11
|
+
driveLoop?: LoopDriver;
|
|
12
|
+
}
|
|
13
|
+
export declare function runEvalCase(evalCase: EvalCase, ctx: RunEvalCaseContext): Promise<EvalRun>;
|
|
14
|
+
export declare function decideStatus(args: {
|
|
15
|
+
hasContract: boolean;
|
|
16
|
+
contractThrew: boolean;
|
|
17
|
+
checks: EvalCheck[];
|
|
18
|
+
replayInconclusive?: boolean;
|
|
19
|
+
}): EvalRunStatus;
|
|
20
|
+
export interface WriteEvalRunOutcome {
|
|
21
|
+
evalRunId: string;
|
|
22
|
+
jsonPath: string;
|
|
23
|
+
markdownPath: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function writeEvalRun(evalRun: EvalRun): WriteEvalRunOutcome;
|
|
26
|
+
export declare function renderEvalRunMarkdown(run: EvalRun): string;
|
|
27
|
+
export interface EvalRunListEntry {
|
|
28
|
+
evalRunId: string;
|
|
29
|
+
evalCaseId: string;
|
|
30
|
+
cardSlug: string;
|
|
31
|
+
patternId: EvalRun['patternId'];
|
|
32
|
+
contract: string | null;
|
|
33
|
+
status: EvalRunStatus;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function listEvalRuns(): EvalRunListEntry[];
|
|
37
|
+
export declare function getEvalRun(evalRunId: string): EvalRun | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function getImproveRoot(): string;
|
|
2
|
+
export declare function getFailureCardsDir(): string;
|
|
3
|
+
export declare function getFailureCardsIndexPath(): string;
|
|
4
|
+
export declare function getFailureCardJsonPath(slug: string): string;
|
|
5
|
+
export declare function getFailureCardMarkdownPath(slug: string): string;
|
|
6
|
+
export declare function getWitnessRoot(): string;
|
|
7
|
+
export declare function getProposalsDir(): string;
|
|
8
|
+
export declare function getProposalsIndexPath(): string;
|
|
9
|
+
export declare function getProposalJsonPath(proposalId: string): string;
|
|
10
|
+
export declare function getProposalMarkdownPath(proposalId: string): string;
|
|
11
|
+
export declare function getEvalCasesDir(): string;
|
|
12
|
+
export declare function getEvalCasesIndexPath(): string;
|
|
13
|
+
export declare function getEvalCaseJsonPath(evalCaseId: string): string;
|
|
14
|
+
export declare function getEvalCaseFixturePath(evalCaseId: string): string;
|
|
15
|
+
export declare function getEvalCaseMarkdownPath(evalCaseId: string): string;
|
|
16
|
+
export declare function getEvalRunsDir(): string;
|
|
17
|
+
export declare function getEvalRunsIndexPath(): string;
|
|
18
|
+
export declare function getEvalRunJsonPath(evalRunId: string): string;
|
|
19
|
+
export declare function getEvalRunMarkdownPath(evalRunId: string): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FailureCard, type ImprovementProposal, type LikelyFile, type Severity } from '../schemas.js';
|
|
2
|
+
export interface TemplateContext {
|
|
3
|
+
proposalId: string;
|
|
4
|
+
now?: () => Date;
|
|
5
|
+
}
|
|
6
|
+
export declare function proposeFromCard(card: FailureCard, ctx: TemplateContext): ImprovementProposal;
|
|
7
|
+
export declare function deriveRiskLevel(floor: Severity, files: readonly LikelyFile[]): Severity;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ImprovementProposal } from '../schemas.js';
|
|
2
|
+
export interface WriteProposalOutcome {
|
|
3
|
+
proposalId: string;
|
|
4
|
+
jsonPath: string;
|
|
5
|
+
markdownPath: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function writeProposal(proposal: ImprovementProposal): WriteProposalOutcome;
|
|
8
|
+
export interface IdContext {
|
|
9
|
+
now?: () => Date;
|
|
10
|
+
randomSuffix?: () => string;
|
|
11
|
+
}
|
|
12
|
+
export declare function generateProposalId(cardSlug: string, ctx?: IdContext): string;
|
|
13
|
+
export declare function renderProposalMarkdown(p: ImprovementProposal): string;
|
|
14
|
+
export interface ProposalListEntry {
|
|
15
|
+
proposalId: string;
|
|
16
|
+
cardSlug: string;
|
|
17
|
+
title: string;
|
|
18
|
+
riskLevel: ImprovementProposal['riskLevel'];
|
|
19
|
+
status: ImprovementProposal['status'];
|
|
20
|
+
rootCauseClass: ImprovementProposal['rootCauseClass'];
|
|
21
|
+
generatedBy: ImprovementProposal['generatedBy'];
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function listProposals(): ProposalListEntry[];
|
|
25
|
+
export declare function getProposal(proposalId: string): ImprovementProposal | undefined;
|
|
26
|
+
export declare function getProposalsForCard(cardSlug: string): ImprovementProposal[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CardIndexEvent, type DetectorResult, type FailureCard } from '../schemas.js';
|
|
2
|
+
export interface WriteCardOutcome {
|
|
3
|
+
slug: string;
|
|
4
|
+
event: CardIndexEvent['event'];
|
|
5
|
+
occurrenceCount: number;
|
|
6
|
+
evidenceAdded: number;
|
|
7
|
+
jsonPath: string;
|
|
8
|
+
markdownPath: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function writeCard(detection: DetectorResult): WriteCardOutcome;
|
|
11
|
+
export declare function readCardIfExists(jsonPath: string): FailureCard | undefined;
|
|
12
|
+
export declare function mergeCard(existing: FailureCard | undefined, detection: DetectorResult): FailureCard;
|
|
13
|
+
export declare function renderMarkdown(card: FailureCard): string;
|
|
14
|
+
export interface CardListEntry {
|
|
15
|
+
slug: string;
|
|
16
|
+
title: string;
|
|
17
|
+
pattern: FailureCard['pattern'];
|
|
18
|
+
severity: FailureCard['severity'];
|
|
19
|
+
status: FailureCard['status'];
|
|
20
|
+
occurrenceCount: number;
|
|
21
|
+
firstSeen: string;
|
|
22
|
+
lastSeen: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function listCards(): CardListEntry[];
|
|
25
|
+
export declare function getCard(slug: string): FailureCard | undefined;
|
|
26
|
+
export interface RegressedCardEntry {
|
|
27
|
+
slug: string;
|
|
28
|
+
pattern: FailureCard['pattern'];
|
|
29
|
+
severity: FailureCard['severity'];
|
|
30
|
+
status: FailureCard['status'];
|
|
31
|
+
occurrenceCount: number;
|
|
32
|
+
lastSeen: string;
|
|
33
|
+
latestNoteAt: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function latestNoteAt(card: FailureCard): string | undefined;
|
|
36
|
+
export declare function isRegressed(card: FailureCard): boolean;
|
|
37
|
+
export declare function selectRegressed(cards: FailureCard[]): RegressedCardEntry[];
|
|
38
|
+
export declare function listRegressedCards(): RegressedCardEntry[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DetectorResult } from '../../schemas.js';
|
|
2
|
+
import type { SessionRead } from '../reader.js';
|
|
3
|
+
export declare const DEFAULT_CLOSURE_ANOMALY_MIN_OCCURRENCES = 1;
|
|
4
|
+
export interface ClosureAnomalyOptions {
|
|
5
|
+
minOccurrences?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function detectClosureAnomaly(sessions: SessionRead[], options?: ClosureAnomalyOptions): DetectorResult[];
|
|
8
|
+
export declare function makeSlug(reason: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DetectorResult } from '../../schemas.js';
|
|
2
|
+
import type { SessionRead } from '../reader.js';
|
|
3
|
+
export interface DetectorOptions {
|
|
4
|
+
minRepeats?: number;
|
|
5
|
+
closureAnomalyMinOccurrences?: number;
|
|
6
|
+
subagentBlockMinOccurrences?: number;
|
|
7
|
+
toolFailureMinFailures?: number;
|
|
8
|
+
toolFailureMinRate?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface DetectorEntry {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
enabledByDefault?: boolean;
|
|
14
|
+
run: (sessions: SessionRead[], options: DetectorOptions) => DetectorResult[];
|
|
15
|
+
}
|
|
16
|
+
export declare const DETECTOR_REGISTRY: readonly DetectorEntry[];
|
|
17
|
+
export declare function runAllDetectors(sessions: SessionRead[], options: DetectorOptions, enabledNames?: ReadonlySet<string>, includeDisabled?: boolean): DetectorResult[];
|
|
18
|
+
export declare function knownDetectorNames(): readonly string[];
|
|
19
|
+
export declare function defaultEnabledDetectorNames(): readonly string[];
|
|
20
|
+
export declare function disabledByDefaultDetectorNames(): readonly string[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { DetectorResult } from '../../schemas.js';
|
|
2
|
+
import type { ReaderEvent, SessionRead } from '../reader.js';
|
|
3
|
+
export declare const DEFAULT_MIN_REPEATS = 4;
|
|
4
|
+
export interface RepeatedToolUseOptions {
|
|
5
|
+
minRepeats?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function detectRepeatedToolUse(sessions: SessionRead[], options?: RepeatedToolUseOptions): DetectorResult[];
|
|
8
|
+
export interface ToolCallPair {
|
|
9
|
+
toolUseId: string;
|
|
10
|
+
startedSeq: number;
|
|
11
|
+
completedSeq: number;
|
|
12
|
+
completedLineNumber: number;
|
|
13
|
+
name: string;
|
|
14
|
+
inputBytes: number;
|
|
15
|
+
resultBytes: number;
|
|
16
|
+
isError: boolean;
|
|
17
|
+
subagentId: string | undefined;
|
|
18
|
+
rawLine: string;
|
|
19
|
+
fingerprint: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function pairToolCalls(events: ReaderEvent[]): ToolCallPair[];
|
|
22
|
+
export declare function computeFingerprint(args: {
|
|
23
|
+
name: string;
|
|
24
|
+
inputBytes: number;
|
|
25
|
+
resultBytes: number;
|
|
26
|
+
isError: boolean;
|
|
27
|
+
subagentId: string | undefined;
|
|
28
|
+
}): string;
|
|
29
|
+
export declare function makeSlug(toolName: string, fingerprint: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DetectorResult } from '../../schemas.js';
|
|
2
|
+
import type { SessionRead } from '../reader.js';
|
|
3
|
+
export declare const DEFAULT_SUBAGENT_BLOCK_MIN_OCCURRENCES = 2;
|
|
4
|
+
export interface SubagentBlockOptions {
|
|
5
|
+
minOccurrences?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function detectSubagentBlock(sessions: SessionRead[], options?: SubagentBlockOptions): DetectorResult[];
|
|
8
|
+
export declare function computeFingerprint(args: {
|
|
9
|
+
hookEvent: string;
|
|
10
|
+
reason: string;
|
|
11
|
+
blockedTool: string | undefined;
|
|
12
|
+
}): string;
|
|
13
|
+
export declare function makeSlug(fingerprint: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DetectorResult } from '../../schemas.js';
|
|
2
|
+
import type { SessionRead } from '../reader.js';
|
|
3
|
+
export declare const DEFAULT_TOOL_FAILURE_MIN_FAILURES = 3;
|
|
4
|
+
export declare const DEFAULT_TOOL_FAILURE_MIN_RATE = 0.25;
|
|
5
|
+
export interface ToolFailureDensityOptions {
|
|
6
|
+
minFailures?: number;
|
|
7
|
+
minFailureRate?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function detectToolFailureDensity(sessions: SessionRead[], options?: ToolFailureDensityOptions): DetectorResult[];
|
|
10
|
+
export declare function makeSlug(toolName: string): string;
|