@sayknow-cli/coding-agent 0.4.7 → 0.5.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/CHANGELOG.md +97 -0
- package/dist/types/capability/index.d.ts +10 -20
- package/dist/types/capability/types.d.ts +3 -0
- package/dist/types/cli/args.d.ts +0 -2
- package/dist/types/cli/read-cli.d.ts +1 -0
- package/dist/types/cli.d.ts +9 -1
- package/dist/types/commands/daemon.d.ts +2 -2
- package/dist/types/commands/deep-interview.d.ts +9 -0
- package/dist/types/commands/harness.d.ts +22 -0
- package/dist/types/commands/read.d.ts +6 -0
- package/dist/types/commands/sdk.d.ts +20 -2
- package/dist/types/config/keybindings.d.ts +34 -4
- package/dist/types/config/model-profile-contract.d.ts +40 -0
- package/dist/types/config/model-profiles.d.ts +2 -3
- package/dist/types/config/model-registry.d.ts +5 -0
- package/dist/types/config/provider-auth-health.d.ts +14 -0
- package/dist/types/config/provider-ranking.d.ts +59 -0
- package/dist/types/config/settings-schema.d.ts +156 -10
- package/dist/types/config/settings.d.ts +3 -0
- package/dist/types/edit/modes/patch.d.ts +13 -0
- package/dist/types/edit/path-mutation-lock.d.ts +15 -0
- package/dist/types/eval/py/executor.d.ts +1 -1
- package/dist/types/eval/py/runner-artifact.d.ts +8 -0
- package/dist/types/eval/py/tool-bridge.d.ts +1 -2
- package/dist/types/extensibility/extensions/types.d.ts +43 -2
- package/dist/types/extensibility/shared-events.d.ts +6 -0
- package/dist/types/internal-urls/local-root-gc.d.ts +2 -0
- package/dist/types/main.d.ts +33 -2
- package/dist/types/memories/index.d.ts +2 -0
- package/dist/types/modes/acp/acp-agent.d.ts +22 -9
- package/dist/types/modes/components/assistant-message.d.ts +3 -1
- package/dist/types/modes/components/btw-panel.d.ts +1 -0
- package/dist/types/modes/components/irc-sidebar.d.ts +41 -0
- package/dist/types/modes/components/queue-pane.d.ts +8 -0
- package/dist/types/modes/components/queued-message-selector.d.ts +6 -0
- package/dist/types/modes/components/read-tool-group.d.ts +4 -4
- package/dist/types/modes/components/runtime-mcp-add-wizard.d.ts +2 -1
- package/dist/types/modes/components/session-observer-overlay.d.ts +4 -0
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +8 -0
- package/dist/types/modes/components/tool-status-header.d.ts +4 -2
- package/dist/types/modes/components/welcome.d.ts +5 -0
- package/dist/types/modes/controllers/btw-controller.d.ts +5 -0
- package/dist/types/modes/controllers/command-controller.d.ts +2 -0
- package/dist/types/modes/controllers/event-controller.d.ts +3 -0
- package/dist/types/modes/interactive-mode.d.ts +13 -2
- package/dist/types/modes/irc-observation-ledger.d.ts +17 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +6 -1
- package/dist/types/modes/prompt-suggestion-controller.d.ts +35 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +2 -2
- package/dist/types/modes/types.d.ts +6 -0
- package/dist/types/modes/utils/hotkeys-markdown.d.ts +2 -1
- package/dist/types/modes/utils/ui-helpers.d.ts +16 -0
- package/dist/types/runtime/memory-domain.d.ts +9 -0
- package/dist/types/runtime/memory-guard-contract.d.ts +71 -0
- package/dist/types/runtime/memory-guard.d.ts +39 -0
- package/dist/types/runtime/memory-limit.d.ts +11 -0
- package/dist/types/runtime-mcp/content-limits.d.ts +7 -0
- package/dist/types/runtime-mcp/discoverable-tool-metadata.d.ts +1 -1
- package/dist/types/runtime-mcp/manager.d.ts +9 -1
- package/dist/types/runtime-mcp/oauth-flow.d.ts +0 -5
- package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +14 -0
- package/dist/types/runtime-mcp/redaction.d.ts +2 -0
- package/dist/types/runtime-mcp/smithery-auth.d.ts +5 -0
- package/dist/types/sdk/acp/final-text.d.ts +19 -0
- package/dist/types/sdk/acp/mcp.d.ts +23 -0
- package/dist/types/sdk/broker/broker.d.ts +2 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +13 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +9 -1
- package/dist/types/sdk/bus/config-commands.d.ts +2 -2
- package/dist/types/sdk/bus/config.d.ts +2 -0
- package/dist/types/sdk/bus/control-drain-lease.d.ts +52 -0
- package/dist/types/sdk/bus/conversation-store.d.ts +1 -0
- package/dist/types/sdk/bus/daemon-paths.d.ts +1 -0
- package/dist/types/sdk/bus/index.d.ts +52 -4
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +37 -0
- package/dist/types/sdk/bus/lifecycle-commands.d.ts +5 -4
- package/dist/types/sdk/bus/notification-orchestration.d.ts +1 -0
- package/dist/types/sdk/bus/notification-service.d.ts +34 -0
- package/dist/types/sdk/bus/operator-runtime.d.ts +1 -0
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +106 -0
- package/dist/types/sdk/bus/rate-limit-pool.d.ts +2 -0
- package/dist/types/sdk/bus/reconciliation-store.d.ts +65 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +33 -9
- package/dist/types/sdk/bus/telegram-daemon-control.d.ts +5 -1
- package/dist/types/sdk/bus/telegram-daemon.d.ts +286 -12
- package/dist/types/sdk/bus/telegram-reference.d.ts +2 -0
- package/dist/types/sdk/bus/topic-registry.d.ts +88 -2
- package/dist/types/sdk/client/discovery.d.ts +2 -0
- package/dist/types/sdk/client/liveness.d.ts +7 -0
- package/dist/types/sdk/host/control/operations.d.ts +3 -2
- package/dist/types/sdk/host/host.d.ts +3 -1
- package/dist/types/sdk/host/query/handlers.d.ts +14 -0
- package/dist/types/sdk/index.d.ts +2 -0
- package/dist/types/sdk/lifecycle-session.d.ts +10 -1
- package/dist/types/sdk/prompt-status.d.ts +88 -0
- package/dist/types/sdk/session-directory.d.ts +1 -1
- package/dist/types/sdk/session.d.ts +7 -0
- package/dist/types/sdk/startup-capability.d.ts +9 -0
- package/dist/types/sdk/transport/auth-preface.d.ts +9 -0
- package/dist/types/sdk/transport/index.d.ts +12 -0
- package/dist/types/sdk/transport/relay.d.ts +43 -0
- package/dist/types/sdk/transport/serve-cli.d.ts +4 -0
- package/dist/types/sdk/transport/socket.d.ts +7 -0
- package/dist/types/sdk/transport/stdio.d.ts +3 -0
- package/dist/types/session/agent-session.d.ts +83 -24
- package/dist/types/session/btw-contract.d.ts +16 -0
- package/dist/types/session/fallback-chain-controller.d.ts +18 -2
- package/dist/types/session/internal/managed-session-scope.d.ts +70 -10
- package/dist/types/session/internal/managed-session-storage.d.ts +34 -12
- package/dist/types/session/internal/native-publish-outcome.d.ts +48 -0
- package/dist/types/session/memory-guard-checkpoint-participant.d.ts +69 -0
- package/dist/types/session/session-manager.d.ts +89 -18
- package/dist/types/session/session-storage.d.ts +31 -0
- package/dist/types/session/streaming-output.d.ts +60 -5
- package/dist/types/setup/credential-import.d.ts +5 -1
- package/dist/types/setup/provider-onboarding.d.ts +2 -0
- package/dist/types/skc-runtime/deep-interview-runtime.d.ts +1 -1
- package/dist/types/skc-runtime/deep-interview-stage.d.ts +37 -0
- package/dist/types/skc-runtime/gc-runtime.d.ts +1 -1
- package/dist/types/skc-runtime/linux-proc.d.ts +22 -14
- package/dist/types/skc-runtime/memory-guard-owner-claims.d.ts +47 -0
- package/dist/types/skc-runtime/ralplan-runtime.d.ts +112 -1
- package/dist/types/skc-runtime/repository-binding.d.ts +63 -0
- package/dist/types/skc-runtime/state-runtime.d.ts +3 -1
- package/dist/types/skc-runtime/state-writer.d.ts +5 -1
- package/dist/types/skc-runtime/team-launch.d.ts +1 -1
- package/dist/types/skc-runtime/team-runtime.d.ts +9 -2
- package/dist/types/skc-runtime/team-store.d.ts +12 -0
- package/dist/types/skc-runtime/team-worker-memory-guard.d.ts +92 -0
- package/dist/types/skc-runtime/tmux-owner-isolation.d.ts +7 -0
- package/dist/types/skc-runtime/ultragoal-guard.d.ts +6 -5
- package/dist/types/skc-runtime/ultragoal-receipt-freshness.d.ts +28 -0
- package/dist/types/skc-runtime/ultragoal-runtime.d.ts +43 -5
- package/dist/types/skill-state/workflow-hud.d.ts +3 -0
- package/dist/types/ssh/utils.d.ts +1 -0
- package/dist/types/task/discovery.d.ts +3 -1
- package/dist/types/task/executor.d.ts +6 -0
- package/dist/types/task/index.d.ts +3 -1
- package/dist/types/task/provider-retry-status.d.ts +13 -0
- package/dist/types/task/receipt.d.ts +2 -0
- package/dist/types/task/types.d.ts +133 -0
- package/dist/types/task/ultragoal-redteam-activation.d.ts +33 -0
- package/dist/types/tools/browser/launch.d.ts +7 -0
- package/dist/types/tools/fetch.d.ts +22 -9
- package/dist/types/tools/image-gen.d.ts +63 -1
- package/dist/types/tools/index.d.ts +7 -1
- package/dist/types/tools/output-meta.d.ts +21 -1
- package/dist/types/tools/read-internals.d.ts +12 -0
- package/dist/types/tools/read.d.ts +45 -1
- package/dist/types/tools/resource-gc.d.ts +23 -0
- package/dist/types/tools/skill-discovery.d.ts +7 -0
- package/dist/types/tools/sqlite-reader.d.ts +7 -0
- package/dist/types/tools/tool-result.d.ts +7 -1
- package/dist/types/utils/prompt-suggestion.d.ts +33 -0
- package/dist/types/utils/shell-snapshot.d.ts +12 -0
- package/dist/types/web/insane/bridge.d.ts +1 -0
- package/dist/types/web/insane/url-guard.d.ts +17 -0
- package/package.json +8 -12
- package/scripts/benchmark-sticky-viewport-pr1.ts +239 -0
- package/scripts/capture-platform-shortcut-labels-showcase.ts +342 -0
- package/scripts/capture-sticky-viewport-showcase.ts +292 -0
- package/scripts/compile-args.ts +0 -1
- package/scripts/dogfood-repository-binding.ts +209 -0
- package/scripts/generate-docs-index.ts +4 -1
- package/scripts/generate-sdk-operation-inventory.ts +9 -0
- package/scripts/run-test-manifest.ts +6 -4
- package/scripts/verify-skc-sdk-canonicalization.ts +122 -18
- package/scripts/verify-sticky-viewport-showcase.ts +611 -0
- package/src/capability/index.ts +58 -42
- package/src/capability/types.ts +3 -0
- package/src/cli/args.ts +16 -100
- package/src/cli/fast-help.ts +1 -1
- package/src/cli/mcp-cli.ts +4 -21
- package/src/cli/notify-cli.ts +6 -38
- package/src/cli/read-cli.ts +2 -1
- package/src/cli/setup-cli.ts +10 -4
- package/src/cli.ts +133 -11
- package/src/commands/daemon.ts +22 -5
- package/src/commands/deep-interview.ts +26 -1
- package/src/commands/harness.ts +35 -12
- package/src/commands/read.ts +11 -2
- package/src/commands/sdk.ts +134 -17
- package/src/commands/team.ts +1 -1
- package/src/commit/agentic/index.ts +3 -3
- package/src/commit/map-reduce/index.ts +2 -2
- package/src/config/keybindings.ts +158 -25
- package/src/config/model-profile-contract.ts +174 -0
- package/src/config/model-profiles.ts +51 -10
- package/src/config/model-registry.ts +24 -4
- package/src/config/model-resolver.ts +2 -2
- package/src/config/provider-auth-health.ts +42 -0
- package/src/config/provider-ranking.ts +119 -0
- package/src/config/settings-schema.ts +157 -10
- package/src/config/settings.ts +254 -108
- package/src/coordinator-mcp/model-preset.ts +21 -74
- package/src/defaults/skc/skills/deep-interview/SKILL.md +147 -24
- package/src/defaults/skc/skills/ralplan/SKILL.md +91 -34
- package/src/defaults/skc/skills/team/SKILL.md +1 -1
- package/src/defaults/skc/skills/ultragoal/SKILL.md +68 -17
- package/src/discovery/ssh.ts +12 -1
- package/src/edit/index.ts +3 -6
- package/src/edit/modes/patch.ts +38 -1
- package/src/edit/modes/replace.ts +42 -0
- package/src/edit/path-mutation-lock.ts +112 -0
- package/src/eval/js/tool-bridge.ts +1 -1
- package/src/eval/py/executor.ts +37 -13
- package/src/eval/py/kernel.ts +1 -21
- package/src/eval/py/prelude.py +2 -2
- package/src/eval/py/runner-artifact.ts +84 -0
- package/src/eval/py/tool-bridge.ts +34 -18
- package/src/extensibility/extensions/runner.ts +4 -0
- package/src/extensibility/extensions/types.ts +42 -4
- package/src/extensibility/plugins/marketplace/fetcher.ts +191 -7
- package/src/extensibility/shared-events.ts +5 -0
- package/src/extensibility/skc-plugins/runtime-adapters.ts +2 -1
- package/src/hooks/native-skill-hook.ts +17 -4
- package/src/internal-urls/docs-index.generated.ts +17 -16
- package/src/internal-urls/local-protocol.ts +87 -25
- package/src/internal-urls/local-root-gc.ts +127 -0
- package/src/internal-urls/mcp-protocol.ts +73 -11
- package/src/main.ts +120 -42
- package/src/memories/index.ts +10 -0
- package/src/modes/DESIGN.md +52 -0
- package/src/modes/acp/acp-agent.ts +647 -83
- package/src/modes/acp/acp-event-mapper.ts +106 -12
- package/src/modes/acp/acp-mode.ts +39 -3
- package/src/modes/action-registry.ts +1 -1
- package/src/modes/components/assistant-message.ts +123 -22
- package/src/modes/components/btw-panel.ts +82 -16
- package/src/modes/components/irc-sidebar.ts +176 -62
- package/src/modes/components/model-selector.ts +61 -4
- package/src/modes/components/notifications-settings-editor.ts +1 -1
- package/src/modes/components/oauth-selector.ts +42 -12
- package/src/modes/components/plan-preview-overlay.ts +1 -1
- package/src/modes/components/queue-pane.ts +55 -9
- package/src/modes/components/queued-message-selector.ts +53 -10
- package/src/modes/components/read-tool-group.ts +82 -14
- package/src/modes/components/runtime-mcp-add-wizard.ts +5 -0
- package/src/modes/components/sayknow-pet-widget.ts +20 -8
- package/src/modes/components/session-observer-overlay.ts +187 -32
- package/src/modes/components/settings-selector.ts +60 -18
- package/src/modes/components/tool-execution.ts +138 -27
- package/src/modes/components/tool-status-header.ts +26 -8
- package/src/modes/components/welcome.ts +50 -23
- package/src/modes/controllers/btw-controller.ts +119 -36
- package/src/modes/controllers/command-controller.ts +101 -54
- package/src/modes/controllers/event-controller.ts +119 -27
- package/src/modes/controllers/extension-ui-controller.ts +23 -12
- package/src/modes/controllers/input-controller.ts +100 -8
- package/src/modes/controllers/runtime-mcp-command-controller.ts +29 -6
- package/src/modes/controllers/selector-controller.ts +4 -1
- package/src/modes/interactive-mode.ts +201 -60
- package/src/modes/irc-observation-ledger.ts +71 -15
- package/src/modes/prompt-action-autocomplete.ts +32 -13
- package/src/modes/prompt-suggestion-controller.ts +96 -0
- package/src/modes/runtime-init.ts +20 -2
- package/src/modes/shared/agent-wire/command-dispatch.ts +3 -3
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +2 -2
- package/src/modes/types.ts +6 -0
- package/src/modes/utils/hotkeys-markdown.ts +64 -36
- package/src/modes/utils/ui-helpers.ts +99 -4
- package/src/prompts/agent-fragments/restricted-bash.md +1 -1
- package/src/prompts/agents/architect.md +17 -3
- package/src/prompts/agents/critic.md +17 -2
- package/src/prompts/agents/executor.md +1 -1
- package/src/prompts/agents/planner.md +8 -1
- package/src/prompts/system/btw-user.md +3 -8
- package/src/prompts/system/prompt-suggestion-system.md +32 -0
- package/src/prompts/system/system-prompt.md +6 -3
- package/src/prompts/tools/cron.md +3 -1
- package/src/prompts/tools/read.md +4 -2
- package/src/prompts/tools/skill-discovery.md +1 -0
- package/src/runtime/memory-domain.ts +66 -0
- package/src/runtime/memory-guard-contract.ts +73 -0
- package/src/runtime/memory-guard.ts +292 -0
- package/src/runtime/memory-limit.ts +50 -0
- package/src/runtime-mcp/client.ts +41 -55
- package/src/runtime-mcp/content-limits.ts +71 -0
- package/src/runtime-mcp/discoverable-tool-metadata.ts +1 -1
- package/src/runtime-mcp/json-rpc.ts +28 -11
- package/src/runtime-mcp/manager.ts +77 -59
- package/src/runtime-mcp/oauth-flow.ts +0 -72
- package/src/runtime-mcp/plugin-network-boundary.ts +101 -0
- package/src/runtime-mcp/redaction.ts +30 -0
- package/src/runtime-mcp/smithery-auth.ts +17 -2
- package/src/runtime-mcp/smithery-connect.ts +11 -1
- package/src/runtime-mcp/transports/http.ts +63 -22
- package/src/sdk/acp/adapter.ts +8 -1
- package/src/sdk/acp/final-text.ts +40 -0
- package/src/sdk/acp/mcp.ts +26 -0
- package/src/sdk/broker/broker.ts +34 -20
- package/src/sdk/broker/identity.ts +22 -12
- package/src/sdk/broker/lifecycle.ts +293 -43
- package/src/sdk/broker/session-index.ts +11 -1
- package/src/sdk/bus/chat-daemon-cli.ts +2 -2
- package/src/sdk/bus/chat-daemon-control.ts +22 -5
- package/src/sdk/bus/config-commands.ts +2 -2
- package/src/sdk/bus/config.ts +10 -2
- package/src/sdk/bus/control-drain-lease.ts +104 -0
- package/src/sdk/bus/conversation-store.ts +40 -6
- package/src/sdk/bus/daemon-paths.ts +2 -0
- package/src/sdk/bus/index.ts +793 -121
- package/src/sdk/bus/kind-aware-reconciliation.ts +242 -0
- package/src/sdk/bus/lifecycle-commands.ts +63 -10
- package/src/sdk/bus/lifecycle-control-runtime.ts +11 -2
- package/src/sdk/bus/lifecycle-orchestrator.ts +32 -1
- package/src/sdk/bus/notification-orchestration.ts +12 -0
- package/src/sdk/bus/notification-service.ts +87 -25
- package/src/sdk/bus/operator-runtime.ts +31 -5
- package/src/sdk/bus/prompt-reconciliation.ts +240 -0
- package/src/sdk/bus/rate-limit-pool.ts +8 -0
- package/src/sdk/bus/recent-activity.ts +90 -26
- package/src/sdk/bus/reconciliation-store.ts +224 -0
- package/src/sdk/bus/telegram-cli.ts +6 -13
- package/src/sdk/bus/telegram-daemon-cli.ts +8 -3
- package/src/sdk/bus/telegram-daemon-contract.ts +34 -9
- package/src/sdk/bus/telegram-daemon-control.ts +161 -40
- package/src/sdk/bus/telegram-daemon.ts +3649 -593
- package/src/sdk/bus/telegram-reference.ts +20 -2
- package/src/sdk/bus/topic-registry.ts +451 -12
- package/src/sdk/cli/session-cli.ts +15 -2
- package/src/sdk/client/discovery.ts +19 -3
- package/src/sdk/client/liveness.ts +49 -0
- package/src/sdk/host/control/dispatch.ts +8 -2
- package/src/sdk/host/control/operations.ts +3 -2
- package/src/sdk/host/host.ts +27 -9
- package/src/sdk/host/query/handlers.ts +125 -5
- package/src/sdk/index.ts +12 -0
- package/src/sdk/lifecycle-session.ts +19 -3
- package/src/sdk/mcp/server.ts +46 -18
- package/src/sdk/prompt-status.ts +97 -0
- package/src/sdk/protocol/operation-inventory.generated.json +145 -0
- package/src/sdk/protocol/operation-registry.ts +24 -4
- package/src/sdk/session-directory.ts +5 -1
- package/src/sdk/session.ts +69 -8
- package/src/sdk/startup-capability.ts +15 -1
- package/src/sdk/transport/auth-preface.ts +82 -0
- package/src/sdk/transport/index.ts +18 -0
- package/src/sdk/transport/relay.ts +252 -0
- package/src/sdk/transport/serve-cli.ts +105 -0
- package/src/sdk/transport/socket.ts +197 -0
- package/src/sdk/transport/stdio.ts +17 -0
- package/src/session/agent-session.ts +1112 -314
- package/src/session/blob-store.ts +25 -7
- package/src/session/btw-contract.ts +59 -0
- package/src/session/fallback-chain-controller.ts +47 -8
- package/src/session/internal/managed-session-scope.ts +1426 -259
- package/src/session/internal/managed-session-storage.ts +414 -238
- package/src/session/internal/native-publish-outcome.ts +271 -0
- package/src/session/memory-guard-checkpoint-participant.ts +131 -0
- package/src/session/session-manager.ts +2079 -469
- package/src/session/session-storage.ts +151 -11
- package/src/session/streaming-output.ts +262 -43
- package/src/setup/credential-import.ts +28 -3
- package/src/setup/provider-onboarding.ts +49 -5
- package/src/setup/provider-presets.json +2 -1
- package/src/skc-runtime/deep-interview-runtime.ts +303 -36
- package/src/skc-runtime/deep-interview-stage.ts +1016 -0
- package/src/skc-runtime/deep-interview-state.ts +8 -5
- package/src/skc-runtime/gc-render.ts +1 -0
- package/src/skc-runtime/gc-runtime.ts +11 -1
- package/src/skc-runtime/linux-proc.ts +70 -36
- package/src/skc-runtime/managed-owner-supervisor.ts +83 -4
- package/src/skc-runtime/memory-guard-owner-claims.ts +389 -0
- package/src/skc-runtime/ralplan-runtime.ts +1057 -75
- package/src/skc-runtime/repository-binding.ts +267 -0
- package/src/skc-runtime/session-state-sidecar.ts +25 -9
- package/src/skc-runtime/state-runtime.ts +50 -12
- package/src/skc-runtime/state-writer.ts +68 -56
- package/src/skc-runtime/team-launch.ts +34 -5
- package/src/skc-runtime/team-runtime.ts +41 -1
- package/src/skc-runtime/team-store.ts +32 -0
- package/src/skc-runtime/team-worker-memory-guard.ts +363 -0
- package/src/skc-runtime/team-workers.ts +1 -0
- package/src/skc-runtime/tmux-common.ts +13 -2
- package/src/skc-runtime/tmux-owner-isolation.ts +20 -1
- package/src/skc-runtime/tmux-sessions.ts +45 -6
- package/src/skc-runtime/ultragoal-guard.ts +93 -15
- package/src/skc-runtime/ultragoal-receipt-freshness.ts +123 -0
- package/src/skc-runtime/ultragoal-runtime.ts +469 -38
- package/src/skc-runtime/workflow-manifest.generated.json +195 -5
- package/src/skc-runtime/workflow-manifest.ts +67 -3
- package/src/skill-state/workflow-hud.ts +25 -2
- package/src/skill-state/workflow-mutation-guard.ts +104 -12
- package/src/slash-commands/builtin-registry.ts +1 -1
- package/src/ssh/utils.ts +14 -0
- package/src/task/discovery.ts +8 -2
- package/src/task/executor.ts +165 -47
- package/src/task/index.ts +123 -15
- package/src/task/provider-retry-status.ts +88 -0
- package/src/task/receipt.ts +3 -0
- package/src/task/render.ts +45 -26
- package/src/task/skc-command.ts +2 -2
- package/src/task/types.ts +55 -10
- package/src/task/ultragoal-redteam-activation.ts +75 -0
- package/src/tools/ask.ts +1 -1
- package/src/tools/ast-edit.ts +2 -2
- package/src/tools/bash-allowed-prefixes.ts +45 -1
- package/src/tools/bash-pty-selection.ts +2 -2
- package/src/tools/browser/launch.ts +41 -6
- package/src/tools/browser/screenshot-format.ts +6 -1
- package/src/tools/cron.ts +1 -1
- package/src/tools/fetch.ts +127 -154
- package/src/tools/image-gen.ts +476 -23
- package/src/tools/index.ts +7 -1
- package/src/tools/output-meta.ts +176 -9
- package/src/tools/path-utils.ts +5 -1
- package/src/tools/read-internals.ts +44 -0
- package/src/tools/read.ts +1544 -310
- package/src/tools/resource-gc.ts +665 -125
- package/src/tools/skill-discovery.ts +39 -3
- package/src/tools/sqlite-reader.ts +63 -5
- package/src/tools/subagent-render.ts +74 -16
- package/src/tools/subagent.ts +2 -0
- package/src/tools/tool-result.ts +14 -1
- package/src/utils/edit-mode.ts +2 -2
- package/src/utils/pasted-image-path.ts +15 -6
- package/src/utils/prompt-suggestion.ts +265 -0
- package/src/utils/shell-snapshot.ts +173 -63
- package/src/utils/sixel.ts +3 -3
- package/src/web/insane/bridge.ts +5 -1
- package/src/web/insane/url-guard.ts +140 -27
- package/src/web/scrapers/docs-rs.ts +30 -5
- package/src/web/scrapers/types.ts +19 -49
- package/src/web/scrapers/utils.ts +12 -26
- package/src/web/search/providers/codex.ts +1 -1
- package/src/workflow/workflow-intent-diff.ts +4 -1
|
@@ -6,6 +6,7 @@ interface BtwPanelComponentOptions {
|
|
|
6
6
|
export declare class BtwPanelComponent extends Container {
|
|
7
7
|
#private;
|
|
8
8
|
constructor(options: BtwPanelComponentOptions);
|
|
9
|
+
beginTurn(question: string): void;
|
|
9
10
|
appendText(delta: string): void;
|
|
10
11
|
setAnswer(text: string): void;
|
|
11
12
|
markComplete(): void;
|
|
@@ -2,12 +2,50 @@ import { type Component, type ViewportAnchorProvider, type ViewportAnchorRender
|
|
|
2
2
|
import type { IrcObservationLedger } from "../irc-observation-ledger";
|
|
3
3
|
export declare const IRC_SIDEBAR_WIDTH_RATIO = 0.3;
|
|
4
4
|
export declare const IRC_SIDEBAR_MAX_RENDER_ROWS = 2048;
|
|
5
|
+
export declare const __ircSidebarPerfCounters: {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
projectionMemoHits: number;
|
|
8
|
+
projectionMemoMisses: number;
|
|
9
|
+
recordsVisited: number;
|
|
10
|
+
sourceBytes: number;
|
|
11
|
+
rows: number;
|
|
12
|
+
styledCacheHits: number;
|
|
13
|
+
styledCacheMisses: number;
|
|
14
|
+
wrapCalls: number;
|
|
15
|
+
snapshot(): {
|
|
16
|
+
projectionMemoHits: number;
|
|
17
|
+
projectionMemoMisses: number;
|
|
18
|
+
recordsVisited: number;
|
|
19
|
+
sourceBytes: number;
|
|
20
|
+
rows: number;
|
|
21
|
+
styledCacheHits: number;
|
|
22
|
+
styledCacheMisses: number;
|
|
23
|
+
wrapCalls: number;
|
|
24
|
+
};
|
|
25
|
+
enable(): void;
|
|
26
|
+
disable(): void;
|
|
27
|
+
reset(): void;
|
|
28
|
+
};
|
|
5
29
|
/** Computes transcript/sidebar widths while preserving at least half the terminal for the transcript. */
|
|
6
30
|
export declare function computeIrcSplitWidths(width: number): {
|
|
7
31
|
leftWidth: number;
|
|
8
32
|
separatorWidth: number;
|
|
9
33
|
rightWidth: number;
|
|
10
34
|
};
|
|
35
|
+
type SemanticLine = Readonly<{
|
|
36
|
+
kind: "header" | "body" | "elision" | "blank";
|
|
37
|
+
text: string;
|
|
38
|
+
sender?: string;
|
|
39
|
+
recipient?: string;
|
|
40
|
+
time?: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type IrcSidebarSemanticProjection = Readonly<{
|
|
43
|
+
token: string;
|
|
44
|
+
lines: readonly SemanticLine[];
|
|
45
|
+
}>;
|
|
46
|
+
/** The authoritative bounded, display-neutral IRC sidebar projection. */
|
|
47
|
+
export declare function getIrcSidebarSemanticProjection(ledger: IrcObservationLedger, width: number): IrcSidebarSemanticProjection;
|
|
48
|
+
export declare function getIrcSidebarSemanticToken(ledger: IrcObservationLedger, width: number): string;
|
|
11
49
|
export interface IrcSidebarTheme {
|
|
12
50
|
fg(color: "dim" | "accent", text: string): string;
|
|
13
51
|
bold(text: string): string;
|
|
@@ -26,7 +64,10 @@ export declare class IrcSplitViewComponent implements ViewportAnchorProvider {
|
|
|
26
64
|
get visible(): boolean;
|
|
27
65
|
effectiveSidebarVisible(width?: number): boolean;
|
|
28
66
|
setVisible(visible: boolean): void;
|
|
67
|
+
invalidateTheme(): void;
|
|
68
|
+
resetSource(): void;
|
|
29
69
|
render(width: number): string[];
|
|
30
70
|
renderWithViewportAnchors(width: number): ViewportAnchorRender;
|
|
31
71
|
invalidate(): void;
|
|
32
72
|
}
|
|
73
|
+
export {};
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { Container } from "@sayknow-cli/tui";
|
|
2
2
|
import type { QueuedMessageEditEntry } from "../../session/agent-session";
|
|
3
|
+
type QueueSelectorAction = "tui.select.confirm" | "tui.select.cancel";
|
|
4
|
+
type QueueSelectorNavigationAction = "tui.select.up" | "tui.select.down" | "tui.select.pageUp" | "tui.select.pageDown";
|
|
3
5
|
export declare class QueuePaneComponent extends Container {
|
|
4
6
|
#private;
|
|
5
7
|
constructor(entries: QueuedMessageEditEntry[], options: {
|
|
6
8
|
selectedIndex?: number;
|
|
9
|
+
formatKeyHint?: (key: string) => string;
|
|
10
|
+
formatSelectAction?: (action: QueueSelectorAction) => string;
|
|
11
|
+
matchesSelectAction?: (keyData: string, action: QueueSelectorAction) => boolean;
|
|
12
|
+
resolveSelectNavigation?: (keyData: string) => QueueSelectorNavigationAction | undefined;
|
|
13
|
+
onSelect: (entry: QueuedMessageEditEntry) => void;
|
|
7
14
|
onDelete: (entry: QueuedMessageEditEntry, index: number) => void;
|
|
8
15
|
onMove: (entry: QueuedMessageEditEntry, index: number, direction: "up" | "down") => void;
|
|
9
16
|
onClose: () => void;
|
|
10
17
|
});
|
|
11
18
|
handleInput(keyData: string): void;
|
|
12
19
|
}
|
|
20
|
+
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Container, SelectList } from "@sayknow-cli/tui";
|
|
2
2
|
import type { QueuedMessageEditEntry } from "../../session/agent-session";
|
|
3
3
|
type QueuedMessageMoveDirection = "up" | "down";
|
|
4
|
+
type QueueSelectorAction = "tui.select.confirm" | "tui.select.cancel";
|
|
5
|
+
type QueueSelectorNavigationAction = "tui.select.up" | "tui.select.down" | "tui.select.pageUp" | "tui.select.pageDown";
|
|
4
6
|
export type { QueuedMessageMoveDirection };
|
|
5
7
|
export declare class QueuedMessageSelectorComponent extends Container {
|
|
6
8
|
#private;
|
|
7
9
|
constructor(entries: QueuedMessageEditEntry[], onSelect: (entry: QueuedMessageEditEntry) => void, onDelete: (entry: QueuedMessageEditEntry, selectedIndex: number) => void, onMove: (entry: QueuedMessageEditEntry, selectedIndex: number, direction: QueuedMessageMoveDirection) => void, onCancel: () => void, options?: {
|
|
8
10
|
selectedIndex?: number;
|
|
11
|
+
formatKeyHint?: (key: string) => string;
|
|
12
|
+
formatSelectAction?: (action: QueueSelectorAction) => string;
|
|
13
|
+
matchesSelectAction?: (keyData: string, action: QueueSelectorAction) => boolean;
|
|
14
|
+
resolveSelectNavigation?: (keyData: string) => QueueSelectorNavigationAction | undefined;
|
|
9
15
|
});
|
|
10
16
|
handleInput(keyData: string): void;
|
|
11
17
|
getSelectList(): SelectList;
|
|
@@ -8,12 +8,11 @@ type ReadRenderArgs = {
|
|
|
8
8
|
file_path?: string;
|
|
9
9
|
sel?: string;
|
|
10
10
|
};
|
|
11
|
-
type ReadToolGroupOptions = {
|
|
12
|
-
showContentPreview?: boolean;
|
|
13
|
-
};
|
|
14
11
|
export declare class ReadToolGroupComponent extends Container implements ToolExecutionHandle {
|
|
15
12
|
#private;
|
|
16
|
-
constructor(options?:
|
|
13
|
+
constructor(options?: {
|
|
14
|
+
showContentPreview?: boolean;
|
|
15
|
+
});
|
|
17
16
|
updateArgs(args: ReadRenderArgs, toolCallId?: string): void;
|
|
18
17
|
updateResult(result: {
|
|
19
18
|
content: Array<{
|
|
@@ -32,5 +31,6 @@ export declare class ReadToolGroupComponent extends Container implements ToolExe
|
|
|
32
31
|
*/
|
|
33
32
|
setManuallyExpanded(expanded: boolean): void;
|
|
34
33
|
getComponent(): Component;
|
|
34
|
+
consumeVisibleTranscriptChange(): boolean;
|
|
35
35
|
}
|
|
36
36
|
export {};
|
|
@@ -14,12 +14,13 @@ type Scope = "user" | "project";
|
|
|
14
14
|
*/
|
|
15
15
|
export interface MCPAddWizardOAuthResult {
|
|
16
16
|
credentialId: string;
|
|
17
|
+
tokenEndpoint: string;
|
|
17
18
|
clientId?: string;
|
|
18
19
|
clientSecret?: string;
|
|
19
20
|
}
|
|
20
21
|
export declare class MCPAddWizard extends Container {
|
|
21
22
|
#private;
|
|
22
|
-
constructor(onComplete: (name: string, config: MCPServerConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPServerConfig) => Promise<void>, onRender?: () => void, initialName?: string);
|
|
23
|
+
constructor(onComplete: (name: string, config: MCPServerConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (endpointUrl: string, authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPServerConfig) => Promise<void>, onRender?: () => void, initialName?: string);
|
|
23
24
|
dispose(): void;
|
|
24
25
|
handleInput(keyData: string): void;
|
|
25
26
|
}
|
|
@@ -9,4 +9,8 @@ export declare class SessionObserverOverlayComponent extends TranscriptViewerOve
|
|
|
9
9
|
refreshFromRegistry(): void;
|
|
10
10
|
handleInput(keyData: string): void;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* This deliberately remains the eager full-history projection. PR2 owns projection
|
|
14
|
+
* virtualization/incrementalization; source acquisition above only controls snapshot safety.
|
|
15
|
+
*/
|
|
12
16
|
export declare function entriesFromMessages(entries: readonly SessionMessageEntry[]): TranscriptViewerEntry[];
|
|
@@ -58,6 +58,8 @@ export interface SettingsCallbacks {
|
|
|
58
58
|
getStatusLinePreview?: (width?: number) => string;
|
|
59
59
|
/** Called when plugins change */
|
|
60
60
|
onPluginsChanged?: () => void;
|
|
61
|
+
/** Called when an interactive setting cannot be committed. */
|
|
62
|
+
onError?: (message: string) => void;
|
|
61
63
|
/** Called when settings panel is closed */
|
|
62
64
|
onCancel: () => void;
|
|
63
65
|
}
|
|
@@ -5,6 +5,8 @@ export interface ToolExecutionOptions {
|
|
|
5
5
|
editFuzzyThreshold?: number;
|
|
6
6
|
editAllowFuzzy?: boolean;
|
|
7
7
|
hashlineAutoDropPureInsertDuplicates?: boolean;
|
|
8
|
+
/** Internal observer for visible asynchronous renderer mutations. */
|
|
9
|
+
onVisibleTranscriptMutation?: () => void;
|
|
8
10
|
}
|
|
9
11
|
export interface ToolExecutionHandle {
|
|
10
12
|
updateArgs(args: any, toolCallId?: string): void;
|
|
@@ -29,6 +31,11 @@ export interface ToolExecutionHandle {
|
|
|
29
31
|
* back to {@link setExpanded}.
|
|
30
32
|
*/
|
|
31
33
|
setManuallyExpanded?(expanded: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* Internal capability for dispatchers that need exact synchronous visible-output
|
|
36
|
+
* detection. Optional so existing structural handles remain source compatible.
|
|
37
|
+
*/
|
|
38
|
+
consumeVisibleTranscriptChange?(): boolean;
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
41
|
* Component that renders a tool call with its result (updateable)
|
|
@@ -52,6 +59,7 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
52
59
|
details?: any;
|
|
53
60
|
isError?: boolean;
|
|
54
61
|
}, isPartial?: boolean, _toolCallId?: string): void;
|
|
62
|
+
consumeVisibleTranscriptChange(): boolean;
|
|
55
63
|
/**
|
|
56
64
|
* Stop spinner animation and cleanup resources.
|
|
57
65
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Component } from "@sayknow-cli/tui";
|
|
2
|
-
import type
|
|
2
|
+
import { type AppKeybinding, type KeybindingsManager, type KeyDisplayContext } from "../../config/keybindings";
|
|
3
3
|
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
|
|
4
4
|
import type { AgentSession } from "../../session/agent-session";
|
|
5
5
|
import { type SkillActiveEntry } from "../../skill-state/active-state";
|
|
@@ -38,6 +38,7 @@ export interface StatusLineSettings {
|
|
|
38
38
|
previewHighlightSegment?: StatusLineSegmentId;
|
|
39
39
|
showHookStatus?: boolean;
|
|
40
40
|
showSkillHud?: boolean;
|
|
41
|
+
showActionHints?: boolean;
|
|
41
42
|
sessionAccent?: boolean;
|
|
42
43
|
maxRows?: number;
|
|
43
44
|
}
|
|
@@ -46,6 +47,7 @@ export interface StatusLineComponentOptions {
|
|
|
46
47
|
actionRegistry?: ActionRegistry<void>;
|
|
47
48
|
getKeybindings?: () => KeybindingsManager;
|
|
48
49
|
focusDomain?: FocusDomain;
|
|
50
|
+
keyDisplayContext?: KeyDisplayContext;
|
|
49
51
|
}
|
|
50
52
|
export interface StatusLineActionHint {
|
|
51
53
|
id: AppKeybinding;
|
|
@@ -56,7 +58,7 @@ export interface StatusLineActionHint {
|
|
|
56
58
|
* remains the authority for availability; KEYBINDINGS remains the authority for
|
|
57
59
|
* whether an action has a binding and the active manager supplies overrides.
|
|
58
60
|
*/
|
|
59
|
-
export declare function getAvailableActionHints(actionRegistry: ActionRegistry<void> | undefined, getKeybindings: (() => KeybindingsManager) | undefined, width: number, domain?: FocusDomain): StatusLineActionHint[];
|
|
61
|
+
export declare function getAvailableActionHints(actionRegistry: ActionRegistry<void> | undefined, getKeybindings: (() => KeybindingsManager) | undefined, width: number, domain?: FocusDomain, keyDisplayContext?: KeyDisplayContext): StatusLineActionHint[];
|
|
60
62
|
export declare class StatusLineComponent implements Component {
|
|
61
63
|
#private;
|
|
62
64
|
private readonly session;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Component } from "@sayknow-cli/tui";
|
|
2
|
+
import { type KeyDisplayContext } from "../../config/keybindings";
|
|
2
3
|
export interface RecentSession {
|
|
3
4
|
name: string;
|
|
4
5
|
timeAgo: string;
|
|
@@ -13,8 +14,10 @@ export interface WelcomeComponentOptions {
|
|
|
13
14
|
getViewportRows?: () => number | undefined;
|
|
14
15
|
getReservedBottomRows?: (termWidth: number) => number;
|
|
15
16
|
changelogMarkdown?: string;
|
|
17
|
+
rightGutterWidth?: number;
|
|
16
18
|
collapseChangelog?: boolean;
|
|
17
19
|
buildLabel?: string;
|
|
20
|
+
keyDisplayContext?: KeyDisplayContext;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* Sayknow-CLI launch surface: a blue-gradient SAYKNOW wordmark, compact
|
|
@@ -44,3 +47,5 @@ export declare class WelcomeComponent implements Component {
|
|
|
44
47
|
setLspServers(servers: LspServerInfo[]): void;
|
|
45
48
|
render(termWidth: number): string[];
|
|
46
49
|
}
|
|
50
|
+
/** Resolve the intro cadence without making tests mutate global process state. */
|
|
51
|
+
export declare function resolveWelcomeIntroTickMs(platform?: NodeJS.Platform, tmux?: string | undefined): number;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { InteractiveModeContext } from "../types";
|
|
2
|
+
type BtwFollowUpResult = "accepted" | "busy" | "closed" | "rejected";
|
|
2
3
|
export declare class BtwController {
|
|
3
4
|
#private;
|
|
4
5
|
private readonly ctx;
|
|
5
6
|
constructor(ctx: InteractiveModeContext);
|
|
6
7
|
hasActiveRequest(): boolean;
|
|
8
|
+
hasOpenPanel(): boolean;
|
|
9
|
+
isTurnInFlight(): boolean;
|
|
7
10
|
handleEscape(): boolean;
|
|
8
11
|
dispose(): void;
|
|
9
12
|
start(question: string): Promise<void>;
|
|
13
|
+
submitFollowUp(question: string): Promise<BtwFollowUpResult>;
|
|
10
14
|
}
|
|
15
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type CompactionOutcome } from "@sayknow-cli/agent-core/compaction";
|
|
2
2
|
import { type ProviderDetails, type UsageReport } from "@sayknow-cli/ai";
|
|
3
|
+
import type { KeybindingsManager } from "../../config/keybindings";
|
|
3
4
|
import type { CompactOptions } from "../../extensibility/extensions/types";
|
|
4
5
|
import { theme } from "../../modes/theme/theme";
|
|
5
6
|
import type { InteractiveModeContext } from "../../modes/types";
|
|
7
|
+
export declare function buildHelpMarkdown(keybindings: Pick<KeybindingsManager, "getAccessibleDisplayString">): string;
|
|
6
8
|
export declare class CommandController {
|
|
7
9
|
#private;
|
|
8
10
|
private readonly ctx;
|
|
@@ -3,7 +3,10 @@ import type { InteractiveModeContext } from "../../modes/types";
|
|
|
3
3
|
import type { AgentSessionEvent } from "../../session/agent-session";
|
|
4
4
|
/** Test-only performance counters for advisory baseline tests. */
|
|
5
5
|
export declare const __eventControllerPerfCounters: {
|
|
6
|
+
enabled: boolean;
|
|
6
7
|
messageUpdateContentVisits: number;
|
|
8
|
+
enable(): void;
|
|
9
|
+
disable(): void;
|
|
7
10
|
reset(): void;
|
|
8
11
|
};
|
|
9
12
|
export declare class EventController {
|
|
@@ -3,7 +3,7 @@ import type { CompactionOutcome } from "@sayknow-cli/agent-core/compaction";
|
|
|
3
3
|
import type { AssistantMessage, ImageContent, Message, UsageReport } from "@sayknow-cli/ai";
|
|
4
4
|
import type { Component, EditorTheme, SlashCommand } from "@sayknow-cli/tui";
|
|
5
5
|
import { Container, Loader, Spacer, Text, TUI } from "@sayknow-cli/tui";
|
|
6
|
-
import { KeybindingsManager } from "../config/keybindings";
|
|
6
|
+
import { KeybindingsManager, type KeyDisplayContext } from "../config/keybindings";
|
|
7
7
|
import { type Settings } from "../config/settings";
|
|
8
8
|
import type { ExtensionUIContext, ExtensionUIDialogOptions, ExtensionWidgetContent, ExtensionWidgetOptions } from "../extensibility/extensions";
|
|
9
9
|
import type { CompactOptions } from "../extensibility/extensions/types";
|
|
@@ -30,10 +30,16 @@ import { GoalModeController } from "./controllers/goal-mode-controller";
|
|
|
30
30
|
import { PlanModeController } from "./controllers/plan-mode-controller";
|
|
31
31
|
import { IrcObservationLedger } from "./irc-observation-ledger";
|
|
32
32
|
import { OAuthManualInputManager } from "./oauth-manual-input";
|
|
33
|
+
import { PromptSuggestionController } from "./prompt-suggestion-controller";
|
|
33
34
|
import type { Theme } from "./theme/theme";
|
|
34
35
|
import { type CompactionQueuedMessage, type ComposerSubmissionOptions, type InteractiveModeContext, type IrcArrivalSnapshot, type SubmittedUserInput, type TodoItem, type TodoPhase, type TranscriptRebuildPolicy } from "./types";
|
|
35
36
|
import type { ParsedIrcMessage } from "./utils/irc-message";
|
|
37
|
+
export declare function getDefaultComposerPlaceholder(context?: KeyDisplayContext, keybindings?: Pick<KeybindingsManager, "getDisplayString">): string;
|
|
36
38
|
export declare const DEFAULT_COMPOSER_PLACEHOLDER: string;
|
|
39
|
+
export declare function getComposerPlaceholder(keybindings: Pick<KeybindingsManager, "getDisplayString">, context: KeyDisplayContext, options: {
|
|
40
|
+
readonly busy: boolean;
|
|
41
|
+
readonly busyPromptMode: "steer" | "queue";
|
|
42
|
+
}): string;
|
|
37
43
|
export declare function getWelcomeTranscriptReservedRows(chatContainer: Container, width: number): number;
|
|
38
44
|
export type WelcomeBannerSettingMode = "auto" | "unicode" | "square" | "ascii";
|
|
39
45
|
export declare function resolveWelcomeLogoMode(mode: WelcomeBannerSettingMode, env?: Record<string, string | undefined>, platform?: NodeJS.Platform): WelcomeLogoMode;
|
|
@@ -50,6 +56,7 @@ export interface InteractiveModeOptions {
|
|
|
50
56
|
/** Additional initial messages to queue */
|
|
51
57
|
initialMessages?: string[];
|
|
52
58
|
}
|
|
59
|
+
export declare function selectShutdownDraft(editorText: string, hasActiveBtw: boolean): string;
|
|
53
60
|
export declare class InteractiveMode implements InteractiveModeContext {
|
|
54
61
|
#private;
|
|
55
62
|
session: AgentSession;
|
|
@@ -114,12 +121,13 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
114
121
|
fileSlashCommands: Set<string>;
|
|
115
122
|
skillCommands: Map<string, Skill>;
|
|
116
123
|
oauthManualInput: OAuthManualInputManager;
|
|
124
|
+
promptSuggestion: PromptSuggestionController;
|
|
117
125
|
readonly lspServers: LspStartupServerInfo[] | undefined;
|
|
118
126
|
mcpManager?: import("../runtime-mcp").MCPManager;
|
|
119
127
|
/** Direct controller capabilities for consumers that coordinate mode transitions. */
|
|
120
128
|
get planModeController(): PlanModeController;
|
|
121
129
|
get goalModeController(): GoalModeController;
|
|
122
|
-
constructor(session: AgentSession, version: string, changelogMarkdown?: string | undefined, setToolUIContext?: (uiContext: ExtensionUIContext, hasUI: boolean) => void, lspServers?: LspStartupServerInfo[] | undefined, mcpManager?: import("../runtime-mcp").MCPManager, eventBus?: EventBus);
|
|
130
|
+
constructor(session: AgentSession, version: string, changelogMarkdown?: string | undefined, setToolUIContext?: (uiContext: ExtensionUIContext, hasUI: boolean) => void, lspServers?: LspStartupServerInfo[] | undefined, mcpManager?: import("../runtime-mcp").MCPManager, eventBus?: EventBus, keyDisplayContext?: KeyDisplayContext);
|
|
123
131
|
getCurrentSessionNotificationStatus(): NotificationSessionStatus | undefined;
|
|
124
132
|
setCurrentSessionNotificationsEnabled(enabled: boolean): Promise<NotificationSessionReconcileResult | undefined>;
|
|
125
133
|
init(): Promise<void>;
|
|
@@ -173,6 +181,8 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
173
181
|
}): Promise<void>;
|
|
174
182
|
flushPendingBashComponents(): void;
|
|
175
183
|
isKnownSlashCommand(text: string): boolean;
|
|
184
|
+
/** Advances the sticky-viewport source only for semantic transcript output. */
|
|
185
|
+
recordVisibleTranscriptMutation(): void;
|
|
176
186
|
addMessageToChat(message: AgentMessage, options?: {
|
|
177
187
|
populateHistory?: boolean;
|
|
178
188
|
}): Component[];
|
|
@@ -261,6 +271,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
261
271
|
handleImagePaste(): Promise<boolean>;
|
|
262
272
|
handleBtwCommand(question: string): Promise<void>;
|
|
263
273
|
hasActiveBtw(): boolean;
|
|
274
|
+
handleBtwFollowUp(question: string): Promise<"accepted" | "busy" | "closed" | "rejected">;
|
|
264
275
|
handleBtwEscape(): boolean;
|
|
265
276
|
cycleThinkingLevel(): void;
|
|
266
277
|
cycleRoleModel(options?: {
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import type { ParsedIrcMessage } from "./utils/irc-message";
|
|
2
2
|
type InlineMode = "persistent" | "ephemeral";
|
|
3
|
+
export declare const IRC_OBSERVATION_LEDGER_MAX_RECORDS = 10000;
|
|
4
|
+
export declare const IRC_OBSERVATION_LEDGER_MAX_RETAINED_UTF8_BYTES: number;
|
|
5
|
+
export declare const IRC_OBSERVATION_LEDGER_MAX_SEEN_IDENTITIES = 100000;
|
|
6
|
+
export declare const __ircLedgerPerfCounters: {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
epochAdvances: number;
|
|
9
|
+
snapshot(): {
|
|
10
|
+
epochAdvances: number;
|
|
11
|
+
};
|
|
12
|
+
enable(): void;
|
|
13
|
+
disable(): void;
|
|
14
|
+
reset(): void;
|
|
15
|
+
};
|
|
3
16
|
export type IrcObservationRecord = Readonly<ParsedIrcMessage & {
|
|
4
17
|
mode: InlineMode;
|
|
5
18
|
observedAt: number;
|
|
@@ -10,6 +23,7 @@ export type IrcObservationRecord = Readonly<ParsedIrcMessage & {
|
|
|
10
23
|
/** Runtime-only IRC observations. This intentionally has no persistence layer. */
|
|
11
24
|
export declare class IrcObservationLedger {
|
|
12
25
|
#private;
|
|
26
|
+
get mutationEpoch(): number;
|
|
13
27
|
/** Inline observations expire after 10 seconds; closed-panel observations persist inline. */
|
|
14
28
|
observe(message: ParsedIrcMessage, panelVisibleAtObservation: boolean): IrcObservationRecord | undefined;
|
|
15
29
|
getRecord(observationId: string): IrcObservationRecord | undefined;
|
|
@@ -17,6 +31,8 @@ export declare class IrcObservationLedger {
|
|
|
17
31
|
getInlineProjection(now: number): readonly IrcObservationRecord[];
|
|
18
32
|
/** Returns and clears IDs whose retained payload was released. */
|
|
19
33
|
drainEvictedObservationIds(): readonly string[];
|
|
20
|
-
reset(
|
|
34
|
+
reset(options?: {
|
|
35
|
+
retireCurrentSessionIdentities?: boolean;
|
|
36
|
+
}): void;
|
|
21
37
|
}
|
|
22
38
|
export {};
|
|
@@ -22,10 +22,15 @@ interface PromptActionAutocompleteOptions {
|
|
|
22
22
|
moveCursorToMessageStart: () => void;
|
|
23
23
|
moveCursorToLineStart: () => void;
|
|
24
24
|
moveCursorToLineEnd: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Ghost-text next-prompt prediction shown in the empty composer as a dim
|
|
27
|
+
* inline hint (Tab accepts it via the editor's onTab handler).
|
|
28
|
+
*/
|
|
29
|
+
getPromptSuggestion?: () => string | null;
|
|
25
30
|
}
|
|
26
31
|
export declare class PromptActionAutocompleteProvider implements AutocompleteProvider {
|
|
27
32
|
#private;
|
|
28
|
-
constructor(commands: SlashCommand[], basePath: string, actions: PromptActionDefinition[]);
|
|
33
|
+
constructor(commands: SlashCommand[], basePath: string, actions: PromptActionDefinition[], getPromptSuggestion?: () => string | null);
|
|
29
34
|
getSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
|
|
30
35
|
items: AutocompleteItem[];
|
|
31
36
|
prefix: string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { InteractiveModeContext } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Owns the ghost-text next-prompt prediction lifecycle for interactive mode.
|
|
4
|
+
*
|
|
5
|
+
* After each agent turn ends (and only when `promptSuggestions` is enabled
|
|
6
|
+
* and the composer is empty), a smol-model prediction of the user's next
|
|
7
|
+
* prompt is generated in the background. The result renders as dim ghost
|
|
8
|
+
* text in the empty composer via the autocomplete provider's inline hint;
|
|
9
|
+
* Tab accepts it, typing dismisses it, and a new turn clears it.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PromptSuggestionController {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(ctx: InteractiveModeContext);
|
|
14
|
+
/** Current suggestion to render as ghost text, or null. */
|
|
15
|
+
get current(): string | null;
|
|
16
|
+
/** Drop the current suggestion and invalidate any in-flight generation. */
|
|
17
|
+
clear(): void;
|
|
18
|
+
/** A new agent turn started; any pending suggestion is stale. */
|
|
19
|
+
onAgentStart(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Editor content changed. A non-empty composer means the user is writing
|
|
22
|
+
* their own prompt: dismiss the suggestion and cancel pending generation.
|
|
23
|
+
*/
|
|
24
|
+
notifyEditorChanged(text: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Agent turn ended; kick off background generation when the feature is
|
|
27
|
+
* enabled and the composer is idle and empty.
|
|
28
|
+
*/
|
|
29
|
+
onAgentEnd(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Tab handler for the composer: accept the suggestion when the composer
|
|
32
|
+
* is empty. Returns true when Tab was consumed.
|
|
33
|
+
*/
|
|
34
|
+
tryAcceptOnTab(text: string): boolean;
|
|
35
|
+
}
|
|
@@ -59,7 +59,7 @@ export interface AskSelectedAckRecoveryParticipant {
|
|
|
59
59
|
}
|
|
60
60
|
/** SDK-native surface for emitting a workflow gate and awaiting its answer. */
|
|
61
61
|
export interface WorkflowGateEmitter {
|
|
62
|
-
|
|
62
|
+
supportsRemoteGateAnswers(): boolean;
|
|
63
63
|
emitGate(input: OpenGateInput): Promise<unknown>;
|
|
64
64
|
onGateEmitted?(listener: (gate: WorkflowGate) => void): () => void;
|
|
65
65
|
resolveGate?(response: WorkflowGateResponse): Promise<WorkflowGateResolution>;
|
|
@@ -96,7 +96,7 @@ export interface WorkflowGateEmitter {
|
|
|
96
96
|
export declare class BrokerWorkflowGateEmitter implements WorkflowGateEmitter {
|
|
97
97
|
#private;
|
|
98
98
|
constructor(runId: string, store: GateStore, emitterHooks?: Pick<BrokerHooks, "advance">);
|
|
99
|
-
|
|
99
|
+
supportsRemoteGateAnswers(): boolean;
|
|
100
100
|
setRuntimeTurnProvider(provider: (() => string | undefined) | null): void;
|
|
101
101
|
emitGate(input: OpenGateInput): Promise<unknown>;
|
|
102
102
|
onGateEmitted(listener: (gate: WorkflowGate) => void): () => void;
|
|
@@ -27,6 +27,7 @@ import type { ToolExecutionHandle } from "./components/tool-execution";
|
|
|
27
27
|
import type { StatusLineComponent } from "./components/tool-status-header";
|
|
28
28
|
import type { IrcObservationLedger } from "./irc-observation-ledger";
|
|
29
29
|
import type { OAuthManualInputManager } from "./oauth-manual-input";
|
|
30
|
+
import type { PromptSuggestionController } from "./prompt-suggestion-controller";
|
|
30
31
|
import type { Theme } from "./theme/theme";
|
|
31
32
|
import type { ParsedIrcMessage } from "./utils/irc-message";
|
|
32
33
|
export type TranscriptRebuildPolicy = "replace-identity" | "reconcile-same-transcript";
|
|
@@ -133,6 +134,8 @@ export interface InteractiveModeContext {
|
|
|
133
134
|
skillCommands: Map<string, Skill>;
|
|
134
135
|
oauthManualInput: OAuthManualInputManager;
|
|
135
136
|
todoPhases: TodoPhase[];
|
|
137
|
+
/** Ghost-text next-prompt prediction; absent in ACP/lightweight test contexts. */
|
|
138
|
+
promptSuggestion?: PromptSuggestionController;
|
|
136
139
|
init(): Promise<void>;
|
|
137
140
|
shutdown(): Promise<void>;
|
|
138
141
|
checkShutdownRequested(): Promise<void>;
|
|
@@ -215,6 +218,8 @@ export interface InteractiveModeContext {
|
|
|
215
218
|
getAssistantViewportAnchorId?(message: AssistantMessage): string;
|
|
216
219
|
findLastAssistantMessage(): AssistantMessage | undefined;
|
|
217
220
|
extractAssistantText(message: AssistantMessage): string;
|
|
221
|
+
/** Records one semantic visible-transcript mutation for the sticky viewport. */
|
|
222
|
+
recordVisibleTranscriptMutation?(): void;
|
|
218
223
|
updateEditorTopBorder(): void;
|
|
219
224
|
updateEditorBorderColor(): void;
|
|
220
225
|
rebuildChatFromMessages(policy: TranscriptRebuildPolicy): void;
|
|
@@ -295,6 +300,7 @@ export interface InteractiveModeContext {
|
|
|
295
300
|
handleBackgroundCommand(): void;
|
|
296
301
|
handleImagePaste(): Promise<boolean>;
|
|
297
302
|
handleBtwCommand(question: string): Promise<void>;
|
|
303
|
+
handleBtwFollowUp(question: string): Promise<"accepted" | "busy" | "closed" | "rejected">;
|
|
298
304
|
hasActiveBtw(): boolean;
|
|
299
305
|
handleBtwEscape(): boolean;
|
|
300
306
|
cycleThinkingLevel(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { KeybindingsManager } from "../../config/keybindings";
|
|
2
2
|
export interface HotkeysMarkdownBindings {
|
|
3
|
-
keybindings: Pick<KeybindingsManager, "
|
|
3
|
+
keybindings: Pick<KeybindingsManager, "formatAccessibleKeyHint" | "getAccessibleDisplayString">;
|
|
4
4
|
}
|
|
5
|
+
export declare function formatHotkeyMarkdownCode(label: string, escapeTablePipes?: boolean): string;
|
|
5
6
|
export declare function buildHotkeysMarkdown(bindings: HotkeysMarkdownBindings): string;
|
|
@@ -6,6 +6,22 @@ import { type SessionContext } from "../../session/session-manager";
|
|
|
6
6
|
import { type ParsedIrcMessage } from "./irc-message";
|
|
7
7
|
export type { TranscriptRebuildPolicy } from "../../modes/types";
|
|
8
8
|
export declare function prepareTranscriptRebuild(ui: TUI, policy: TranscriptRebuildPolicy): void;
|
|
9
|
+
export declare const RESUME_PROGRESS_COMMIT_TIMEOUT_MS = 250;
|
|
10
|
+
export interface ResumeProgressLease {
|
|
11
|
+
readonly committed: Promise<boolean>;
|
|
12
|
+
clear(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Mount a resume loader on the live status rail and wait for its render generation
|
|
16
|
+
* to commit before session I/O begins. The commit is advisory: a stopped or
|
|
17
|
+
* unavailable terminal resolves false and callers continue without blocking.
|
|
18
|
+
*
|
|
19
|
+
* Fail open (no-op lease, committed=false) when the status rail or UI lacks the
|
|
20
|
+
* child-mutation/render-commit surface required to mount progress. Headless and
|
|
21
|
+
* minimal controller contexts keep resume/migration semantics; full interactive
|
|
22
|
+
* TUI containers retain progress-before-switch.
|
|
23
|
+
*/
|
|
24
|
+
export declare function acquireResumeProgressLease(ctx: Pick<InteractiveModeContext, "ui" | "statusContainer">): ResumeProgressLease;
|
|
9
25
|
interface RenderInitialMessagesOptions {
|
|
10
26
|
preserveExistingChat?: boolean;
|
|
11
27
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MemoryGuardDomainSnapshot, MemoryGuardWorkerSample } from "./memory-guard-contract";
|
|
2
|
+
export interface MemoryGuardDomainInput {
|
|
3
|
+
effectiveLimitBytes: number;
|
|
4
|
+
totalUsageBytes: number;
|
|
5
|
+
parentBytes: number;
|
|
6
|
+
parentReserveBytes: number;
|
|
7
|
+
workers: readonly MemoryGuardWorkerSample[];
|
|
8
|
+
}
|
|
9
|
+
export declare function computeMemoryGuardDomain(input: MemoryGuardDomainInput): MemoryGuardDomainSnapshot;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export interface MemoryGuardPolicy {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
checkIntervalMs: number;
|
|
4
|
+
gcThresholdRatio: number;
|
|
5
|
+
restartThresholdRatio: number;
|
|
6
|
+
restartThresholdWindowMs: number;
|
|
7
|
+
cooldownMs: number;
|
|
8
|
+
parentReserveBytes: number;
|
|
9
|
+
policyLimitBytes: number | null;
|
|
10
|
+
}
|
|
11
|
+
export interface MemoryGuardWorkerSample {
|
|
12
|
+
workerId: string;
|
|
13
|
+
bytes: number;
|
|
14
|
+
accepted?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface MemoryGuardWorkerAccounting {
|
|
17
|
+
workerId: string;
|
|
18
|
+
bytes: number;
|
|
19
|
+
accepted: boolean;
|
|
20
|
+
allowanceBytes: number;
|
|
21
|
+
excessBytes: number;
|
|
22
|
+
}
|
|
23
|
+
export interface MemoryGuardDomainSnapshot {
|
|
24
|
+
effectiveLimitBytes: number;
|
|
25
|
+
totalUsageBytes: number;
|
|
26
|
+
parentBytes: number;
|
|
27
|
+
parentReserveBytes: number;
|
|
28
|
+
totalWorkerBytes: number;
|
|
29
|
+
acceptedWorkerCount: number;
|
|
30
|
+
unmanagedBytes: number;
|
|
31
|
+
headroomBytes: number;
|
|
32
|
+
workerBudgetBytes: number;
|
|
33
|
+
perWorkerAllowanceBytes: number;
|
|
34
|
+
hostExcessBytes: number;
|
|
35
|
+
workers: MemoryGuardWorkerAccounting[];
|
|
36
|
+
}
|
|
37
|
+
export interface MemoryGuardHostTarget {
|
|
38
|
+
kind: "host";
|
|
39
|
+
excessBytes: number;
|
|
40
|
+
}
|
|
41
|
+
export interface MemoryGuardWorkerTarget {
|
|
42
|
+
kind: "worker";
|
|
43
|
+
workerId: string;
|
|
44
|
+
excessBytes: number;
|
|
45
|
+
}
|
|
46
|
+
export type MemoryGuardActionTarget = MemoryGuardHostTarget | MemoryGuardWorkerTarget;
|
|
47
|
+
export type MemoryGuardNoopReason = "memory_guard_action_noop_unmanaged_or_within_allowance" | "memory_guard_action_noop_unsupported";
|
|
48
|
+
export type MemoryGuardDecision = {
|
|
49
|
+
kind: "execute";
|
|
50
|
+
target: MemoryGuardActionTarget;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "noop";
|
|
53
|
+
reason: MemoryGuardNoopReason;
|
|
54
|
+
} | {
|
|
55
|
+
kind: "revalidated_out";
|
|
56
|
+
reason: "memory_guard_action_revalidated_out";
|
|
57
|
+
};
|
|
58
|
+
export interface MemoryGuardSchedulerState {
|
|
59
|
+
timerActive: boolean;
|
|
60
|
+
registrationCount: number;
|
|
61
|
+
inProgress: boolean;
|
|
62
|
+
generation: number;
|
|
63
|
+
pendingDeadline: number | null;
|
|
64
|
+
pendingOwner: {
|
|
65
|
+
generation: number;
|
|
66
|
+
token: number;
|
|
67
|
+
} | null;
|
|
68
|
+
deferredDeadline: number | null;
|
|
69
|
+
deferredGeneration: number | null;
|
|
70
|
+
activeGeneration: number | null;
|
|
71
|
+
}
|