@sayknow-cli/coding-agent 0.3.12 → 0.3.15
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/types/autoresearch/tools/init-experiment.d.ts +1 -1
- package/dist/types/autoresearch/tools/log-experiment.d.ts +2 -2
- package/dist/types/cli/classify-install-target.d.ts +0 -10
- package/dist/types/cli/daemon-cli.d.ts +2 -0
- package/dist/types/cli/initial-message.d.ts +1 -1
- package/dist/types/cli/malloc-env-guard.d.ts +65 -0
- package/dist/types/cli/malloc-env-guard.test.d.ts +1 -0
- package/dist/types/cli/notify-cli.d.ts +3 -1
- package/dist/types/cli/session-picker.d.ts +4 -3
- package/dist/types/cli/update-cli.d.ts +22 -3
- package/dist/types/cli.d.ts +5 -0
- package/dist/types/commands/daemon.d.ts +6 -2
- package/dist/types/commands/launch.d.ts +1 -0
- package/dist/types/commands/notify.d.ts +6 -0
- package/dist/types/commands/web-search.d.ts +1 -1
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +4 -4
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +9 -9
- package/dist/types/commit/agentic/tools/schemas.d.ts +9 -9
- package/dist/types/commit/agentic/tools/split-commit.d.ts +9 -9
- package/dist/types/commit/analysis/conventional.d.ts +1 -1
- package/dist/types/commit/analysis/summary.d.ts +1 -1
- package/dist/types/commit/changelog/generate.d.ts +3 -3
- package/dist/types/commit/changelog/index.d.ts +2 -2
- package/dist/types/commit/map-reduce/map-phase.d.ts +1 -1
- package/dist/types/commit/map-reduce/reduce-phase.d.ts +1 -1
- package/dist/types/commit/shared-llm.d.ts +9 -9
- package/dist/types/config/keybindings.d.ts +134 -129
- package/dist/types/config/model-profile-activation.d.ts +1 -0
- package/dist/types/config/model-registry.d.ts +35 -35
- package/dist/types/config/models-config-schema.d.ts +111 -111
- package/dist/types/config/settings-schema.d.ts +56 -16
- package/dist/types/config/settings.d.ts +2 -0
- package/dist/types/coordinator/contract.d.ts +1 -1
- package/dist/types/coordinator-mcp/model-preset.d.ts +45 -0
- package/dist/types/coordinator-mcp/policy.d.ts +3 -0
- package/dist/types/coordinator-mcp/server.d.ts +79 -6
- package/dist/types/coordinator-mcp/session-reaper.d.ts +53 -0
- package/dist/types/daemon/control-types.d.ts +10 -0
- package/dist/types/daemon/operator-contract.d.ts +47 -0
- package/dist/types/defaults/skc/extensions/grok-cli-vendor/src/models/catalog.d.ts +4 -0
- package/dist/types/defaults/skc/extensions/grok-cli-vendor/src/shared/errors.d.ts +12 -12
- package/dist/types/discovery/helpers.d.ts +1 -1
- package/dist/types/discovery/substitute-plugin-root.d.ts +0 -4
- package/dist/types/edit/modes/patch.d.ts +2 -2
- package/dist/types/extensibility/extensions/types.d.ts +3 -1
- package/dist/types/goals/tools/goal-tool.d.ts +6 -6
- package/dist/types/i18n/messages/en.d.ts +8 -8
- package/dist/types/internal-urls/local-protocol.d.ts +13 -9
- package/dist/types/lsp/index.d.ts +9 -9
- package/dist/types/lsp/types.d.ts +9 -9
- package/dist/types/main.d.ts +66 -2
- package/dist/types/modes/acp/acp-agent.d.ts +19 -2
- package/dist/types/modes/acp/acp-mode.d.ts +12 -0
- package/dist/types/modes/components/assistant-message.d.ts +1 -1
- package/dist/types/modes/components/custom-editor.d.ts +2 -0
- package/dist/types/modes/components/hook-selector.d.ts +5 -0
- package/dist/types/modes/components/irc-sidebar.d.ts +32 -0
- package/dist/types/modes/components/pet-selector.d.ts +11 -0
- package/dist/types/modes/components/sayknow-pet-widget.d.ts +59 -0
- package/dist/types/modes/components/session-selector.d.ts +22 -9
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/status-line/types.d.ts +1 -1
- package/dist/types/modes/components/status-line.d.ts +0 -10
- package/dist/types/modes/components/tool-execution.d.ts +1 -0
- package/dist/types/modes/components/user-message.d.ts +2 -1
- package/dist/types/modes/controllers/event-controller.d.ts +4 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +24 -2
- package/dist/types/modes/irc-observation-ledger.d.ts +22 -0
- package/dist/types/modes/print-mode.d.ts +3 -4
- package/dist/types/modes/rpc/rpc-client.d.ts +7 -1
- package/dist/types/modes/rpc/rpc-mode.d.ts +2 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +17 -1
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +8 -0
- package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +5 -0
- package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +45 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +42 -2
- package/dist/types/modes/theme/defaults/index.d.ts +568 -568
- package/dist/types/modes/types.d.ts +28 -2
- package/dist/types/modes/utils/abort-message.d.ts +1 -1
- package/dist/types/modes/utils/context-usage.d.ts +4 -19
- package/dist/types/modes/utils/irc-message.d.ts +38 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +13 -4
- package/dist/types/notifications/config.d.ts +34 -0
- package/dist/types/notifications/daemon-paths.d.ts +7 -0
- package/dist/types/notifications/index.d.ts +27 -0
- package/dist/types/notifications/lifecycle-control-runtime.d.ts +12 -4
- package/dist/types/notifications/notification-service.d.ts +144 -0
- package/dist/types/notifications/rate-limit-pool.d.ts +27 -9
- package/dist/types/notifications/telegram-daemon-control.d.ts +6 -0
- package/dist/types/notifications/telegram-daemon.d.ts +130 -3
- package/dist/types/notifications/telegram-reference.d.ts +19 -2
- package/dist/types/notifications/topic-registry.d.ts +24 -4
- package/dist/types/registry/agent-registry.d.ts +2 -0
- package/dist/types/rlm/index.d.ts +1 -1
- package/dist/types/sdk.d.ts +2 -0
- package/dist/types/secrets/obfuscator.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +40 -3
- package/dist/types/session/cache-economics.d.ts +79 -0
- package/dist/types/session/context-estimation.d.ts +31 -0
- package/dist/types/session/provider-safety-stop.d.ts +5 -0
- package/dist/types/session/session-manager.d.ts +124 -4
- package/dist/types/session/session-storage.d.ts +155 -13
- package/dist/types/setup/credential-auto-import.d.ts +2 -2
- package/dist/types/skc-runtime/session-state-sidecar.d.ts +34 -3
- package/dist/types/skc-runtime/state-schema.d.ts +19 -19
- package/dist/types/skc-runtime/tmux-common.d.ts +6 -0
- package/dist/types/skc-runtime/tmux-owner-isolation-cli.d.ts +5 -0
- package/dist/types/skc-runtime/tmux-owner-isolation.d.ts +309 -0
- package/dist/types/skc-runtime/tmux-sessions.d.ts +49 -17
- package/dist/types/task/agents.d.ts +2 -2
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/receipt.d.ts +3 -1
- package/dist/types/task/types.d.ts +35 -27
- package/dist/types/tools/ask-answer-registry.d.ts +5 -0
- package/dist/types/tools/bash.d.ts +1 -1
- package/dist/types/tools/browser/tab-supervisor.d.ts +6 -0
- package/dist/types/tools/browser.d.ts +28 -28
- package/dist/types/tools/computer.d.ts +20 -20
- package/dist/types/tools/cron.d.ts +2 -2
- package/dist/types/tools/debug.d.ts +40 -40
- package/dist/types/tools/gh.d.ts +10 -10
- package/dist/types/tools/image-gen.d.ts +2 -2
- package/dist/types/tools/index.d.ts +58 -6
- package/dist/types/tools/monitor.d.ts +6 -6
- package/dist/types/tools/skill-discovery.d.ts +4 -4
- package/dist/types/tools/subagent.d.ts +12 -12
- package/dist/types/tools/telegram-send.d.ts +7 -0
- package/dist/types/tools/todo-write.d.ts +8 -8
- package/dist/types/utils/external-editor.d.ts +2 -0
- package/dist/types/web/insane/bridge.d.ts +9 -9
- package/dist/types/web/search/index.d.ts +4 -4
- package/package.json +8 -8
- package/scripts/g004-tmux-smoke.ts +196 -36
- package/src/cli/daemon-cli.ts +19 -29
- package/src/cli/malloc-env-guard.test.ts +104 -0
- package/src/cli/malloc-env-guard.ts +149 -0
- package/src/cli/notify-cli.ts +78 -14
- package/src/cli/session-picker.ts +23 -40
- package/src/cli/update-cli.ts +56 -37
- package/src/cli.ts +51 -10
- package/src/commands/daemon.ts +19 -5
- package/src/commands/harness.ts +515 -47
- package/src/commands/launch.ts +11 -3
- package/src/commands/notify.ts +5 -1
- package/src/commands/session.ts +6 -1
- package/src/config/keybindings.ts +5 -0
- package/src/config/model-profile-activation.ts +1 -1
- package/src/config/model-profiles.ts +14 -14
- package/src/config/settings-schema.ts +41 -1
- package/src/config/settings.ts +96 -45
- package/src/coordinator/contract.ts +1 -0
- package/src/coordinator-mcp/model-preset.ts +100 -0
- package/src/coordinator-mcp/policy.ts +30 -0
- package/src/coordinator-mcp/server.ts +2958 -430
- package/src/coordinator-mcp/session-reaper.ts +129 -0
- package/src/daemon/control-types.ts +11 -0
- package/src/daemon/operator-contract.ts +121 -0
- package/src/defaults/skc/extensions/grok-cli-vendor/src/models/catalog.ts +57 -17
- package/src/defaults/skc/extensions/grok-cli-vendor/src/payload/sanitize.ts +15 -2
- package/src/defaults/skc/extensions/grok-cli-vendor/src/provider/register.ts +5 -1
- package/src/extensibility/extensions/runner.ts +1 -1
- package/src/extensibility/extensions/types.ts +3 -1
- package/src/internal-urls/docs-index.generated.ts +10 -9
- package/src/internal-urls/local-protocol.ts +29 -10
- package/src/main.ts +301 -80
- package/src/modes/acp/acp-agent.ts +730 -100
- package/src/modes/acp/acp-mode.ts +29 -2
- package/src/modes/components/assistant-message.ts +32 -3
- package/src/modes/components/bash-execution.ts +43 -13
- package/src/modes/components/custom-editor.ts +5 -0
- package/src/modes/components/footer.ts +3 -3
- package/src/modes/components/hook-selector.ts +12 -0
- package/src/modes/components/irc-sidebar.ts +206 -0
- package/src/modes/components/pet-selector.ts +55 -0
- package/src/modes/components/sayknow-pet-widget.ts +360 -0
- package/src/modes/components/session-selector.ts +222 -221
- package/src/modes/components/settings-selector.ts +10 -0
- package/src/modes/components/status-line/segments.ts +14 -7
- package/src/modes/components/status-line/types.ts +1 -1
- package/src/modes/components/status-line.ts +4 -171
- package/src/modes/components/tool-execution.ts +47 -6
- package/src/modes/components/user-message.ts +26 -9
- package/src/modes/controllers/command-controller.ts +28 -2
- package/src/modes/controllers/event-controller.ts +159 -36
- package/src/modes/controllers/extension-ui-controller.ts +37 -18
- package/src/modes/controllers/input-controller.ts +8 -2
- package/src/modes/controllers/selector-controller.ts +62 -15
- package/src/modes/interactive-mode.ts +199 -7
- package/src/modes/irc-observation-ledger.ts +127 -0
- package/src/modes/print-mode.ts +228 -92
- package/src/modes/rpc/rpc-client.ts +58 -1
- package/src/modes/rpc/rpc-mode.ts +286 -85
- package/src/modes/rpc/rpc-types.ts +15 -1
- package/src/modes/shared/agent-wire/command-dispatch.ts +33 -1
- package/src/modes/shared/agent-wire/command-validation.ts +10 -0
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +45 -2
- package/src/modes/shared/agent-wire/scopes.ts +1 -0
- package/src/modes/shared/agent-wire/unattended-session.ts +288 -1
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +130 -20
- package/src/modes/types.ts +34 -2
- package/src/modes/utils/context-usage.ts +56 -92
- package/src/modes/utils/hotkeys-markdown.ts +1 -0
- package/src/modes/utils/irc-message.ts +138 -0
- package/src/modes/utils/ui-helpers.ts +216 -50
- package/src/notifications/config.ts +44 -0
- package/src/notifications/daemon-paths.ts +8 -0
- package/src/notifications/index.ts +535 -75
- package/src/notifications/lifecycle-control-runtime.ts +930 -77
- package/src/notifications/notification-service.ts +710 -0
- package/src/notifications/rate-limit-pool.ts +46 -12
- package/src/notifications/telegram-daemon-control.ts +27 -2
- package/src/notifications/telegram-daemon.ts +635 -94
- package/src/notifications/telegram-reference.ts +73 -13
- package/src/notifications/topic-registry.ts +86 -9
- package/src/prompts/system/irc-peer-roster.md +1 -0
- package/src/prompts/system/subagent-system-prompt.md +1 -0
- package/src/prompts/system/system-prompt.md +1 -0
- package/src/prompts/tools/irc.md +1 -1
- package/src/registry/agent-registry.ts +3 -0
- package/src/sdk.ts +52 -1
- package/src/secrets/obfuscator.ts +4 -2
- package/src/session/agent-session.ts +670 -217
- package/src/session/cache-economics.ts +275 -0
- package/src/session/context-estimation.ts +91 -0
- package/src/session/provider-safety-stop.ts +9 -0
- package/src/session/session-dump-format.ts +6 -0
- package/src/session/session-manager.ts +809 -39
- package/src/session/session-storage.ts +582 -38
- package/src/skc-runtime/session-state-sidecar.ts +756 -135
- package/src/skc-runtime/tmux-common.ts +26 -7
- package/src/skc-runtime/tmux-gc.ts +52 -9
- package/src/skc-runtime/tmux-owner-isolation-cli.ts +185 -0
- package/src/skc-runtime/tmux-owner-isolation.ts +2060 -0
- package/src/skc-runtime/tmux-sessions.ts +871 -68
- package/src/slash-commands/builtin-registry.ts +153 -9
- package/src/slash-commands/helpers/context-report.ts +26 -4
- package/src/task/executor.ts +12 -3
- package/src/task/index.ts +8 -0
- package/src/task/receipt.ts +7 -2
- package/src/task/types.ts +26 -0
- package/src/tools/ask-answer-registry.ts +25 -0
- package/src/tools/browser/tab-supervisor.ts +63 -6
- package/src/tools/browser.ts +8 -3
- package/src/tools/index.ts +81 -6
- package/src/tools/sqlite-reader.ts +8 -4
- package/src/tui/output-block.ts +18 -6
- package/src/utils/external-editor.ts +6 -1
|
@@ -7,12 +7,12 @@ import type { ToolSession } from "../../tools";
|
|
|
7
7
|
import type { Goal, GoalToolDetails } from "../state";
|
|
8
8
|
declare const goalSchema: z.ZodObject<{
|
|
9
9
|
op: z.ZodEnum<{
|
|
10
|
-
complete: "complete";
|
|
11
10
|
create: "create";
|
|
12
|
-
drop: "drop";
|
|
13
11
|
get: "get";
|
|
14
|
-
|
|
12
|
+
complete: "complete";
|
|
15
13
|
resume: "resume";
|
|
14
|
+
drop: "drop";
|
|
15
|
+
pause: "pause";
|
|
16
16
|
}>;
|
|
17
17
|
objective: z.ZodOptional<z.ZodString>;
|
|
18
18
|
}, z.core.$strip>;
|
|
@@ -29,12 +29,12 @@ export declare class GoalTool implements AgentTool<typeof goalSchema, GoalToolDe
|
|
|
29
29
|
readonly description: string;
|
|
30
30
|
readonly parameters: z.ZodObject<{
|
|
31
31
|
op: z.ZodEnum<{
|
|
32
|
-
complete: "complete";
|
|
33
32
|
create: "create";
|
|
34
|
-
drop: "drop";
|
|
35
33
|
get: "get";
|
|
36
|
-
|
|
34
|
+
complete: "complete";
|
|
37
35
|
resume: "resume";
|
|
36
|
+
drop: "drop";
|
|
37
|
+
pause: "pause";
|
|
38
38
|
}>;
|
|
39
39
|
objective: z.ZodOptional<z.ZodString>;
|
|
40
40
|
}, z.core.$strip>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const en: {
|
|
2
2
|
readonly "lang.auto": "Auto (system)";
|
|
3
3
|
readonly "lang.en": "English";
|
|
4
|
-
readonly "lang.ko": "
|
|
5
|
-
readonly "lang.zh": "
|
|
6
|
-
readonly "lang.ja": "
|
|
7
|
-
readonly "lang.es": "
|
|
8
|
-
readonly "lang.fr": "
|
|
4
|
+
readonly "lang.ko": "한국어";
|
|
5
|
+
readonly "lang.zh": "中文 (简体)";
|
|
6
|
+
readonly "lang.ja": "日本語";
|
|
7
|
+
readonly "lang.es": "Español";
|
|
8
|
+
readonly "lang.fr": "Français";
|
|
9
9
|
readonly "lang.de": "Deutsch";
|
|
10
10
|
readonly "welcome.tagline": "Coding should feel like thinking.";
|
|
11
11
|
readonly "welcome.workflows": "Workflows";
|
|
12
|
-
readonly "welcome.wf.deepInterview": "scope
|
|
12
|
+
readonly "welcome.wf.deepInterview": "scope · interview → spec";
|
|
13
13
|
readonly "welcome.wf.ralplan": "consensus plan";
|
|
14
14
|
readonly "welcome.wf.ultragoal": "autonomous build";
|
|
15
15
|
readonly "welcome.wf.team": "parallel agents";
|
|
@@ -26,7 +26,7 @@ export declare const en: {
|
|
|
26
26
|
readonly "welcome.sessionTrail": "Session trail";
|
|
27
27
|
readonly "welcome.noSessions": "No saved trails";
|
|
28
28
|
readonly "welcome.chooseModel": "choose a model";
|
|
29
|
-
readonly "welcome.modelHint": "ctrl+l to pick
|
|
29
|
+
readonly "welcome.modelHint": "ctrl+l to pick · / for commands";
|
|
30
30
|
readonly "settings.tab.appearance": "Appearance";
|
|
31
31
|
readonly "settings.tab.model": "Model";
|
|
32
32
|
readonly "settings.tab.interaction": "Interaction";
|
|
@@ -46,7 +46,7 @@ export declare const en: {
|
|
|
46
46
|
readonly "help.envVars": "ENVIRONMENT VARIABLES";
|
|
47
47
|
readonly "help.tools": "AVAILABLE TOOLS";
|
|
48
48
|
readonly "help.usefulCommands": "USEFUL COMMANDS";
|
|
49
|
-
readonly "help.appDescription": "Sayknow-CLI
|
|
49
|
+
readonly "help.appDescription": "Sayknow-CLI — an AI coding assistant";
|
|
50
50
|
readonly "statusline.plan": "Plan";
|
|
51
51
|
readonly "statusline.goal": "Goal";
|
|
52
52
|
readonly "statusline.paused": "paused";
|
|
@@ -17,22 +17,26 @@ export declare class LocalProtocolHandler implements ProtocolHandler {
|
|
|
17
17
|
readonly scheme = "local";
|
|
18
18
|
readonly immutable = false;
|
|
19
19
|
/**
|
|
20
|
-
* Install
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Install an explicit local-protocol mapping owned by the caller.
|
|
21
|
+
*
|
|
22
|
+
* The most recently installed live mapping wins. The returned disposer removes
|
|
23
|
+
* only this registration and is safe to call more than once.
|
|
24
|
+
*/
|
|
25
|
+
static installOverride(value: LocalProtocolOptions): () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Install a process-global test override that wins over owned and registry
|
|
28
|
+
* mappings. Prefer {@link installOverride} for lifecycle-bound production use.
|
|
23
29
|
*/
|
|
24
30
|
static setOverride(value: LocalProtocolOptions | undefined): void;
|
|
25
|
-
/** Reset
|
|
31
|
+
/** Reset all process-global local-protocol overrides. Test-only. */
|
|
26
32
|
static resetOverrideForTests(): void;
|
|
27
33
|
/**
|
|
28
34
|
* Returns the active local-protocol options.
|
|
29
35
|
*
|
|
30
36
|
* Resolution order:
|
|
31
|
-
* 1.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* 2. The main session in `AgentRegistry.global()`. Its `SessionManager`
|
|
35
|
-
* supplies both `getArtifactsDir` and `getSessionId`.
|
|
37
|
+
* 1. Direct test override installed via {@link setOverride}.
|
|
38
|
+
* 2. The most recently installed live owned override.
|
|
39
|
+
* 3. A live main session in `AgentRegistry.global()`.
|
|
36
40
|
*/
|
|
37
41
|
static resolveOptions(): LocalProtocolOptions | undefined;
|
|
38
42
|
resolve(url: InternalUrl): Promise<InternalResource>;
|
|
@@ -95,20 +95,20 @@ export declare class LspTool implements AgentTool<typeof lspSchema, LspToolDetai
|
|
|
95
95
|
readonly description: string;
|
|
96
96
|
readonly parameters: import("zod").ZodObject<{
|
|
97
97
|
action: import("zod").ZodEnum<{
|
|
98
|
-
|
|
99
|
-
code_actions: "code_actions";
|
|
100
|
-
definition: "definition";
|
|
98
|
+
status: "status";
|
|
101
99
|
diagnostics: "diagnostics";
|
|
102
|
-
|
|
103
|
-
implementation: "implementation";
|
|
100
|
+
definition: "definition";
|
|
104
101
|
references: "references";
|
|
105
|
-
|
|
102
|
+
hover: "hover";
|
|
103
|
+
symbols: "symbols";
|
|
106
104
|
rename: "rename";
|
|
107
105
|
rename_file: "rename_file";
|
|
108
|
-
|
|
109
|
-
status: "status";
|
|
110
|
-
symbols: "symbols";
|
|
106
|
+
code_actions: "code_actions";
|
|
111
107
|
type_definition: "type_definition";
|
|
108
|
+
implementation: "implementation";
|
|
109
|
+
reload: "reload";
|
|
110
|
+
capabilities: "capabilities";
|
|
111
|
+
request: "request";
|
|
112
112
|
}>;
|
|
113
113
|
file: import("zod").ZodOptional<import("zod").ZodString>;
|
|
114
114
|
line: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -3,20 +3,20 @@ import * as z from "zod/v4";
|
|
|
3
3
|
import type { OwnedProcess } from "../runtime/process-lifecycle";
|
|
4
4
|
export declare const lspSchema: z.ZodObject<{
|
|
5
5
|
action: z.ZodEnum<{
|
|
6
|
-
|
|
7
|
-
code_actions: "code_actions";
|
|
8
|
-
definition: "definition";
|
|
6
|
+
status: "status";
|
|
9
7
|
diagnostics: "diagnostics";
|
|
10
|
-
|
|
11
|
-
implementation: "implementation";
|
|
8
|
+
definition: "definition";
|
|
12
9
|
references: "references";
|
|
13
|
-
|
|
10
|
+
hover: "hover";
|
|
11
|
+
symbols: "symbols";
|
|
14
12
|
rename: "rename";
|
|
15
13
|
rename_file: "rename_file";
|
|
16
|
-
|
|
17
|
-
status: "status";
|
|
18
|
-
symbols: "symbols";
|
|
14
|
+
code_actions: "code_actions";
|
|
19
15
|
type_definition: "type_definition";
|
|
16
|
+
implementation: "implementation";
|
|
17
|
+
reload: "reload";
|
|
18
|
+
capabilities: "capabilities";
|
|
19
|
+
request: "request";
|
|
20
20
|
}>;
|
|
21
21
|
file: z.ZodOptional<z.ZodString>;
|
|
22
22
|
line: z.ZodOptional<z.ZodNumber>;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -4,15 +4,39 @@
|
|
|
4
4
|
* This file handles CLI argument parsing and translates them into
|
|
5
5
|
* createAgentSession() options. The SDK does the heavy lifting.
|
|
6
6
|
*/
|
|
7
|
+
import type { ImageContent } from "@sayknow-cli/ai";
|
|
7
8
|
import type { Args } from "./cli/args";
|
|
8
9
|
import { ModelRegistry } from "./config/model-registry";
|
|
9
10
|
import { Settings } from "./config/settings";
|
|
11
|
+
import type { ExtensionUIContext } from "./extensibility/extensions/types";
|
|
12
|
+
import type { SessionSelectionResult } from "./modes/components/session-selector";
|
|
10
13
|
import type { InteractiveMode } from "./modes/interactive-mode";
|
|
14
|
+
import type { PrintModeOptions } from "./modes/print-mode";
|
|
15
|
+
import { initTheme } from "./modes/theme/theme";
|
|
11
16
|
import type { SubmittedUserInput } from "./modes/types";
|
|
17
|
+
import type { MCPManager } from "./runtime-mcp";
|
|
12
18
|
import { type CreateAgentSessionOptions, type CreateAgentSessionResult, createAgentSession, discoverAuthStorage } from "./sdk";
|
|
13
19
|
import type { AgentSession } from "./session/agent-session";
|
|
14
20
|
import type { AuthStorage } from "./session/auth-storage";
|
|
15
|
-
import { SessionManager } from "./session/session-manager";
|
|
21
|
+
import { type ResumeSessionIdentity, type SessionInfo, SessionManager, type StrictSessionOpenResult } from "./session/session-manager";
|
|
22
|
+
import { runStartupCredentialAutoImportIfNeeded } from "./setup/credential-auto-import";
|
|
23
|
+
import type { LspStartupServerInfo } from "./tools";
|
|
24
|
+
import type { EventBus } from "./utils/event-bus";
|
|
25
|
+
export type StartupUpdateRoute = "interactive" | "print" | "text" | "json" | "rpc" | "rpc-ui" | "acp" | "bridge";
|
|
26
|
+
export declare function classifyStartupUpdateRoute(parsed: Pick<Args, "print" | "mode">, autoPrint: boolean): StartupUpdateRoute;
|
|
27
|
+
/** Coordinates the non-blocking update check around the interactive UI lifecycle. */
|
|
28
|
+
export declare class StartupUpdateOrchestrator {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(route: StartupUpdateRoute, enabled: () => boolean, check: () => Promise<string | undefined>);
|
|
31
|
+
startBeforeInteractiveInitialization(): void;
|
|
32
|
+
attachAfterInteractiveInitialization(notify: (version: string) => void): void;
|
|
33
|
+
}
|
|
34
|
+
export interface StartupUpdateInteractiveMode {
|
|
35
|
+
init: () => Promise<void>;
|
|
36
|
+
showNewVersionNotification: (version: string) => void;
|
|
37
|
+
}
|
|
38
|
+
export declare function initializeInteractiveModeWithStartupUpdate(mode: StartupUpdateInteractiveMode, startupUpdate: StartupUpdateOrchestrator): Promise<void>;
|
|
39
|
+
declare function readPipedInput(): Promise<string | undefined>;
|
|
16
40
|
export interface InteractiveModeNotify {
|
|
17
41
|
kind: "warn" | "error" | "info";
|
|
18
42
|
message: string;
|
|
@@ -52,6 +76,25 @@ export declare function applyStartupModelProfilesOrExit(args: Parameters<typeof
|
|
|
52
76
|
* tool registry and shadow the client-supplied servers (issue #1234).
|
|
53
77
|
*/
|
|
54
78
|
export declare function createAcpSessionFactory(args: AcpSessionFactoryOptions): AcpSessionFactory;
|
|
79
|
+
interface InteractiveModeFactoryOptions {
|
|
80
|
+
session: AgentSession;
|
|
81
|
+
version: string;
|
|
82
|
+
changelogMarkdown: string | undefined;
|
|
83
|
+
setExtensionUIContext: (uiContext: ExtensionUIContext, hasUI: boolean) => void;
|
|
84
|
+
lspServers: LspStartupServerInfo[] | undefined;
|
|
85
|
+
mcpManager: MCPManager | undefined;
|
|
86
|
+
eventBus?: EventBus;
|
|
87
|
+
}
|
|
88
|
+
type CreateInteractiveMode = (options: InteractiveModeFactoryOptions) => InteractiveMode;
|
|
89
|
+
type ResumePickerTerminalCheck = () => boolean;
|
|
90
|
+
type ListForResumePickerReadOnly = (cwd: string, sessionDir?: string) => Promise<SessionInfo[]>;
|
|
91
|
+
type SelectResumeSession = (sessions: SessionInfo[]) => Promise<SessionSelectionResult>;
|
|
92
|
+
type OpenExistingSessionStrict = (identity: ResumeSessionIdentity, sessionDir?: string) => Promise<StrictSessionOpenResult>;
|
|
93
|
+
export declare const BARE_RESUME_CONFLICT_ERROR = "--resume without a session cannot be combined with --continue, --fork, or --no-session.";
|
|
94
|
+
export declare const BARE_RESUME_INTERACTIVE_ERROR = "--resume requires an interactive terminal; use --resume <id>.";
|
|
95
|
+
export declare const BARE_RESUME_OPEN_ERROR = "Could not open the selected session. Use --resume <id>.";
|
|
96
|
+
export declare function runInteractiveMode(session: AgentSession, version: string, changelogMarkdown: string | undefined, notifs: (InteractiveModeNotify | null)[], startupUpdate: StartupUpdateOrchestrator, initialMessages: string[], setExtensionUIContext: (uiContext: ExtensionUIContext, hasUI: boolean) => void, lspServers: LspStartupServerInfo[] | undefined, mcpManager: MCPManager | undefined, eventBus?: EventBus, initialMessage?: string, initialImages?: ImageContent[], createInteractiveMode?: CreateInteractiveMode, resumeAction?: "continue-tail" | "open-idle"): Promise<void>;
|
|
97
|
+
declare function getChangelogForDisplay(parsed: Args): Promise<string | undefined>;
|
|
55
98
|
export declare function createSessionManager(parsed: Args, cwd: string, activeSettings?: Settings): Promise<SessionManager | undefined>;
|
|
56
99
|
/**
|
|
57
100
|
* Research-mode (RLM) preset hook. Lets `skc rlm` augment the session options
|
|
@@ -62,13 +105,34 @@ export interface RlmPreset {
|
|
|
62
105
|
applyOptions: (options: CreateAgentSessionOptions, settings: Settings) => void;
|
|
63
106
|
onSessionCreated?: (session: AgentSession) => void | Promise<void>;
|
|
64
107
|
}
|
|
65
|
-
|
|
108
|
+
type RunRpcMode = (session: AgentSession, setToolUIContext?: CreateAgentSessionResult["setToolUIContext"], options?: {
|
|
109
|
+
listen?: string;
|
|
110
|
+
}) => Promise<void>;
|
|
111
|
+
type RunBridgeMode = (session: AgentSession, setToolUIContext?: CreateAgentSessionResult["setToolUIContext"]) => Promise<void>;
|
|
112
|
+
type RunPrintMode = (session: AgentSession, options: PrintModeOptions) => Promise<void>;
|
|
113
|
+
export interface RunRootCommandDependencies {
|
|
66
114
|
createAgentSession?: typeof createAgentSession;
|
|
67
115
|
discoverAuthStorage?: typeof discoverAuthStorage;
|
|
68
116
|
runAcpMode?: (createSession: AcpSessionFactory) => Promise<void>;
|
|
69
117
|
settings?: Settings;
|
|
70
118
|
rlmPreset?: RlmPreset;
|
|
71
119
|
suppressProcessExit?: boolean;
|
|
120
|
+
startupUpdate?: {
|
|
121
|
+
check: () => Promise<string | undefined>;
|
|
122
|
+
};
|
|
123
|
+
initTheme?: typeof initTheme;
|
|
124
|
+
readPipedInput?: typeof readPipedInput;
|
|
125
|
+
runStartupCredentialAutoImportIfNeeded?: typeof runStartupCredentialAutoImportIfNeeded;
|
|
126
|
+
getChangelogForDisplay?: typeof getChangelogForDisplay;
|
|
127
|
+
runRpcMode?: RunRpcMode;
|
|
128
|
+
runBridgeMode?: RunBridgeMode;
|
|
129
|
+
createInteractiveMode?: CreateInteractiveMode;
|
|
130
|
+
runPrintMode?: RunPrintMode;
|
|
131
|
+
isResumePickerTerminal?: ResumePickerTerminalCheck;
|
|
132
|
+
listForResumePickerReadOnly?: ListForResumePickerReadOnly;
|
|
133
|
+
selectResumeSession?: SelectResumeSession;
|
|
134
|
+
openExistingSessionStrict?: OpenExistingSessionStrict;
|
|
135
|
+
initializeSettings?: typeof Settings.init;
|
|
72
136
|
}
|
|
73
137
|
export declare function runRootCommand(parsed: Args, rawArgs: string[], deps?: RunRootCommandDependencies): Promise<void>;
|
|
74
138
|
export declare function main(args: string[]): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Agent, type AgentSideConnection, type AuthenticateRequest, type AuthenticateResponse, type ClientCapabilities, type CloseSessionRequest, type CloseSessionResponse, type ForkSessionRequest, type ForkSessionResponse, type InitializeRequest, type InitializeResponse, type ListSessionsRequest, type ListSessionsResponse, type LoadSessionRequest, type LoadSessionResponse, type NewSessionRequest, type NewSessionResponse, type PromptRequest, type PromptResponse, type ResumeSessionRequest, type ResumeSessionResponse, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse, type
|
|
1
|
+
import { type Agent, type AgentSideConnection, type AuthenticateRequest, type AuthenticateResponse, type ClientCapabilities, type CloseSessionRequest, type CloseSessionResponse, type DeleteSessionRequest, type DeleteSessionResponse, type ForkSessionRequest, type ForkSessionResponse, type InitializeRequest, type InitializeResponse, type ListSessionsRequest, type ListSessionsResponse, type LoadSessionRequest, type LoadSessionResponse, type NewSessionRequest, type NewSessionResponse, type PromptRequest, type PromptResponse, type ResumeSessionRequest, type ResumeSessionResponse, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse, type SetSessionModeRequest, type SetSessionModeResponse } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { ExtensionUIContext } from "../../extensibility/extensions";
|
|
3
3
|
import type { AgentSession } from "../../session/agent-session";
|
|
4
4
|
/**
|
|
@@ -40,9 +40,20 @@ export declare class AcpAgent implements Agent {
|
|
|
40
40
|
resumeSession(params: ResumeSessionRequest): Promise<ResumeSessionResponse>;
|
|
41
41
|
unstable_forkSession(params: ForkSessionRequest): Promise<ForkSessionResponse>;
|
|
42
42
|
closeSession(params: CloseSessionRequest): Promise<CloseSessionResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Hard delete an ACP session. `DeleteSessionRequest` carries only `sessionId`;
|
|
45
|
+
* the server owns authorization through the immutable canonical cwd scope and
|
|
46
|
+
* the complete strict scoped inventory snapshot.
|
|
47
|
+
*
|
|
48
|
+
* - No scope / unknown / already-deleted id → lookup-free `{}`.
|
|
49
|
+
* - Duplicate/conflict id → visible error; neither transcript nor artifacts change.
|
|
50
|
+
* - Active session → reserve `deleting`, drain/cancel prompt, flush, strict
|
|
51
|
+
* dispose/close, recheck identity/state, then verified artifact-first deletion.
|
|
52
|
+
* - Concurrent delete callers join the terminal promise.
|
|
53
|
+
*/
|
|
54
|
+
deleteSession(params: DeleteSessionRequest): Promise<DeleteSessionResponse>;
|
|
43
55
|
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
44
56
|
setSessionConfigOption(params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
45
|
-
unstable_setSessionModel(params: SetSessionModelRequest): Promise<SetSessionModelResponse>;
|
|
46
57
|
prompt(params: PromptRequest): Promise<PromptResponse>;
|
|
47
58
|
cancel(params: {
|
|
48
59
|
sessionId: string;
|
|
@@ -57,5 +68,11 @@ export declare class AcpAgent implements Agent {
|
|
|
57
68
|
}): Promise<void>;
|
|
58
69
|
get signal(): AbortSignal;
|
|
59
70
|
get closed(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Connection-local shutdown promise. Resolves once all terminal work (dispose,
|
|
73
|
+
* active deletes, abort cleanup) has settled. `acp-mode.ts` awaits this after
|
|
74
|
+
* transport closure so `process.exit` never kills in-flight deletion/disposal.
|
|
75
|
+
*/
|
|
76
|
+
get shutdownPromise(): Promise<void>;
|
|
60
77
|
}
|
|
61
78
|
export {};
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { AgentSideConnection, type Stream } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { AgentSession } from "../../session/agent-session";
|
|
3
|
+
import { AcpAgent } from "./acp-agent";
|
|
3
4
|
export type AcpSessionFactory = (cwd: string) => Promise<AgentSession>;
|
|
5
|
+
export interface AcpConnectionHandle {
|
|
6
|
+
connection: AgentSideConnection;
|
|
7
|
+
agent: AcpAgent;
|
|
8
|
+
}
|
|
4
9
|
export declare function createAcpConnection(transport: Stream, createSession: AcpSessionFactory, initialSession?: AgentSession): AgentSideConnection;
|
|
10
|
+
/**
|
|
11
|
+
* Create an ACP connection and return both the {@link AgentSideConnection} and the
|
|
12
|
+
* underlying {@link AcpAgent}. Callers that need to await agent shutdown (terminal
|
|
13
|
+
* delete/dispose work) after transport closure should use this instead of
|
|
14
|
+
* {@link createAcpConnection}.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createAcpConnectionWithAgent(transport: Stream, createSession: AcpSessionFactory, initialSession?: AgentSession): AcpConnectionHandle;
|
|
5
17
|
export declare function runAcpMode(createSession: AcpSessionFactory, initialSession?: AgentSession): Promise<never>;
|
|
@@ -10,7 +10,7 @@ export declare class AssistantMessageComponent extends Container {
|
|
|
10
10
|
#private;
|
|
11
11
|
private hideThinkingBlock;
|
|
12
12
|
private readonly onImageUpdate?;
|
|
13
|
-
constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: (() => void) | undefined);
|
|
13
|
+
constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: (() => void) | undefined, viewportAnchorId?: string);
|
|
14
14
|
invalidate(): void;
|
|
15
15
|
setHideThinkingBlock(hide: boolean): void;
|
|
16
16
|
setToolResultImages(toolCallId: string, images: ImageContent[]): void;
|
|
@@ -49,6 +49,8 @@ export declare class CustomEditor extends Editor {
|
|
|
49
49
|
/** Called before regular composer input should return the transcript viewport to the live bottom. */
|
|
50
50
|
onViewportFollowLive?: () => void;
|
|
51
51
|
setActionKeys(action: ConfigurableEditorAction, keys: KeyId[]): void;
|
|
52
|
+
/** Returns whether a built-in editor action consumes this configured key before custom handlers. */
|
|
53
|
+
hasActionKey(key: KeyId): boolean;
|
|
52
54
|
/**
|
|
53
55
|
* Register a custom key handler. Extensions use this for shortcuts.
|
|
54
56
|
*/
|
|
@@ -44,6 +44,11 @@ export interface HookSelectorOptions {
|
|
|
44
44
|
* completion behavior as the main prompt editor.
|
|
45
45
|
*/
|
|
46
46
|
autocompleteProvider?: AutocompleteProvider;
|
|
47
|
+
/**
|
|
48
|
+
* Maps raw single-key accelerators to option labels. Unset maps preserve
|
|
49
|
+
* the legacy selector key handling exactly.
|
|
50
|
+
*/
|
|
51
|
+
acceleratorMap?: Readonly<Record<string, string>>;
|
|
47
52
|
}
|
|
48
53
|
export declare class HookSelectorComponent extends Container {
|
|
49
54
|
#private;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Component, type ViewportAnchorProvider, type ViewportAnchorRender } from "@sayknow-cli/tui";
|
|
2
|
+
import type { IrcObservationLedger } from "../irc-observation-ledger";
|
|
3
|
+
export declare const IRC_SIDEBAR_WIDTH_RATIO = 0.3;
|
|
4
|
+
export declare const IRC_SIDEBAR_MAX_RENDER_ROWS = 2048;
|
|
5
|
+
/** Computes transcript/sidebar widths while preserving at least half the terminal for the transcript. */
|
|
6
|
+
export declare function computeIrcSplitWidths(width: number): {
|
|
7
|
+
leftWidth: number;
|
|
8
|
+
separatorWidth: number;
|
|
9
|
+
rightWidth: number;
|
|
10
|
+
};
|
|
11
|
+
export interface IrcSidebarTheme {
|
|
12
|
+
fg(color: "dim" | "accent", text: string): string;
|
|
13
|
+
bold(text: string): string;
|
|
14
|
+
readonly boxSharp: {
|
|
15
|
+
readonly vertical: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export type IrcSidebarThemeSource = IrcSidebarTheme | (() => IrcSidebarTheme);
|
|
19
|
+
/** Read-only IRC history alongside the active transcript. */
|
|
20
|
+
export declare class IrcSplitViewComponent implements ViewportAnchorProvider {
|
|
21
|
+
#private;
|
|
22
|
+
private readonly leftPane;
|
|
23
|
+
private readonly ledger;
|
|
24
|
+
private readonly componentTheme;
|
|
25
|
+
constructor(leftPane: Component, ledger: IrcObservationLedger, componentTheme: IrcSidebarThemeSource);
|
|
26
|
+
get visible(): boolean;
|
|
27
|
+
effectiveSidebarVisible(width?: number): boolean;
|
|
28
|
+
setVisible(visible: boolean): void;
|
|
29
|
+
render(width: number): string[];
|
|
30
|
+
renderWithViewportAnchors(width: number): ViewportAnchorRender;
|
|
31
|
+
invalidate(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container, SelectList } from "@sayknow-cli/tui";
|
|
2
|
+
import type { PetMode } from "./sayknow-pet-widget";
|
|
3
|
+
/**
|
|
4
|
+
* Theme-style picker for the sayknow pet skin (Off / RedSayknow / BlueSayknow). Preview
|
|
5
|
+
* fires as the selection moves; select commits, cancel restores.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PetSelectorComponent extends Container {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(current: PetMode, onSelect: (mode: PetMode) => void, onCancel: () => void, onPreview: (mode: PetMode) => void);
|
|
10
|
+
getSelectList(): SelectList;
|
|
11
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type Component, type Container, type PetMode, type PetSkinId, type TUI } from "@sayknow-cli/tui";
|
|
2
|
+
import type { CustomEditor } from "./custom-editor";
|
|
3
|
+
/** Re-exported from the tui skin registry so widget-relative imports stay valid. */
|
|
4
|
+
export type { PetMode, PetSkinId };
|
|
5
|
+
/**
|
|
6
|
+
* Wraps the composer editor, reserving a right-side area beside it where the
|
|
7
|
+
* real-pixel pet is drawn. The editor just renders narrower; the pet pixels
|
|
8
|
+
* are emitted separately as an absolute-positioned overlay.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PetFramedEditor implements Component {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(editor: CustomEditor);
|
|
13
|
+
setReserve(columns: number): void;
|
|
14
|
+
canFit(width: number): boolean;
|
|
15
|
+
invalidate(): void;
|
|
16
|
+
render(width: number): string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The sayknow pet: a 16x16 real-pixel sprite living in a reserved area beside
|
|
20
|
+
* the composer. It is nearest-neighbor scaled to the two terminal rows occupied
|
|
21
|
+
* by an empty one-line composer and lifted one row so its feet meet the input
|
|
22
|
+
* box's bottom edge.
|
|
23
|
+
*
|
|
24
|
+
* Rendering has two paths that share one payload builder:
|
|
25
|
+
* - a post-render emitter re-draws the sprite after every TUI write (line
|
|
26
|
+
* renders clear the pet cells, so the overlay must be re-applied), and
|
|
27
|
+
* - frame advances write the payload directly to the terminal, because the
|
|
28
|
+
* TUI skips writes entirely when no component line changed.
|
|
29
|
+
*
|
|
30
|
+
* Requires a sixel- or kitty-graphics terminal (`pixelProtocol()`).
|
|
31
|
+
*/
|
|
32
|
+
export declare class SayknowPetWidget {
|
|
33
|
+
#private;
|
|
34
|
+
constructor(options: {
|
|
35
|
+
ui: TUI;
|
|
36
|
+
editor: CustomEditor;
|
|
37
|
+
editorContainer: Container;
|
|
38
|
+
floorContainer: Container;
|
|
39
|
+
isWorking: () => boolean;
|
|
40
|
+
/** Rows rendered below the composer box (pet floor + hook widgets). */
|
|
41
|
+
getComposerBottomOffset: () => number;
|
|
42
|
+
forcePixelProtocol?: "sixel" | "kitty";
|
|
43
|
+
/** Random [min, max] ms between auto-flexes; null disables. */
|
|
44
|
+
autoFlexGapMs?: [number, number] | null;
|
|
45
|
+
});
|
|
46
|
+
/** Protocol available for the real-pixel pet, if any. */
|
|
47
|
+
static pixelProtocol(): "sixel" | "kitty" | null;
|
|
48
|
+
get mode(): PetMode;
|
|
49
|
+
get isFlexing(): boolean;
|
|
50
|
+
setMode(mode: PetMode): void;
|
|
51
|
+
/** Live preview during a selector: change the sprite without re-mounting the
|
|
52
|
+
* composer editor (that would tear down the open overlay). After a short idle
|
|
53
|
+
* eye-roll it fires the signature burst once (RedSayknow flex, BlueSayknow para-para
|
|
54
|
+
* then sob) so the selector demos the animation instead of waiting the random gap. */
|
|
55
|
+
previewMode(mode: PetMode): void;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
/** Re-mount the composer editor (framed when a skin is active) after an overlay. */
|
|
58
|
+
remountComposer(): void;
|
|
59
|
+
}
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
import { type Component, Container } from "@sayknow-cli/tui";
|
|
2
|
-
import type { SessionInfo } from "../../session/session-manager";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { ResumeSessionIdentity, ResumeTailInspection, SessionInfo } from "../../session/session-manager";
|
|
3
|
+
export interface SelectedSession {
|
|
4
|
+
kind: "selected";
|
|
5
|
+
path: string;
|
|
6
|
+
identity: ResumeSessionIdentity;
|
|
7
|
+
action: "continue-tail" | "open-idle";
|
|
8
|
+
}
|
|
9
|
+
export interface CancelledSessionSelection {
|
|
10
|
+
kind: "cancelled";
|
|
11
|
+
}
|
|
12
|
+
export type SessionSelectionResult = SelectedSession | CancelledSessionSelection;
|
|
13
|
+
export type SessionInspector = (sessionPath: string) => Promise<ResumeTailInspection>;
|
|
6
14
|
declare class SessionList implements Component {
|
|
7
15
|
#private;
|
|
8
16
|
private readonly allSessions;
|
|
9
17
|
private readonly showCwd;
|
|
10
|
-
onSelect?: (
|
|
18
|
+
onSelect?: (session: SessionInfo) => void;
|
|
11
19
|
onCancel?: () => void;
|
|
12
20
|
onExit: () => void;
|
|
13
21
|
onDeleteRequest?: (session: SessionInfo) => void;
|
|
14
22
|
constructor(allSessions: SessionInfo[], showCwd?: boolean);
|
|
23
|
+
setInputFrozen(frozen: boolean): void;
|
|
15
24
|
removeSession(sessionPath: string): void;
|
|
16
25
|
invalidate(): void;
|
|
17
26
|
render(width: number): string[];
|
|
18
27
|
handleInput(keyData: string): void;
|
|
19
28
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Component that renders a session selector with optional confirmation dialog
|
|
22
|
-
*/
|
|
29
|
+
/** A one-shot resume consent selector. It never opens or mutates sessions. */
|
|
23
30
|
export declare class SessionSelectorComponent extends Container {
|
|
24
31
|
#private;
|
|
25
|
-
|
|
32
|
+
private readonly onSelect;
|
|
33
|
+
private readonly onCancel;
|
|
34
|
+
private readonly onExit;
|
|
35
|
+
private readonly onDelete?;
|
|
36
|
+
private readonly inspector?;
|
|
37
|
+
private readonly onSelection?;
|
|
38
|
+
constructor(sessions: SessionInfo[], onSelect: (sessionPath: string) => void, onCancel: () => void, onExit: () => void, onDelete?: ((session: SessionInfo) => Promise<boolean>) | undefined, inspector?: SessionInspector | undefined, onSelection?: ((selection: SessionSelectionResult) => void) | undefined);
|
|
26
39
|
setOnRequestRender(callback: () => void): void;
|
|
27
40
|
handleInput(keyData: string): void;
|
|
28
41
|
getSessionList(): SessionList;
|
|
@@ -39,6 +39,8 @@ export interface SettingsCallbacks {
|
|
|
39
39
|
onThemePreview?: (theme: string) => void | Promise<void>;
|
|
40
40
|
/** Called to restore the rendered theme when theme settings preview is cancelled */
|
|
41
41
|
onThemePreviewCancel?: (theme: string) => void | Promise<void>;
|
|
42
|
+
/** Called to live-preview the sayknow pet skin while browsing the pet setting. */
|
|
43
|
+
onPetPreview?: (mode: string) => void;
|
|
42
44
|
/** Called for status line preview while configuring */
|
|
43
45
|
onStatusLinePreview?: (settings: StatusLinePreviewSettings) => void;
|
|
44
46
|
/** Get current rendered status line for inline preview */
|
|
@@ -25,7 +25,7 @@ export interface SegmentContext {
|
|
|
25
25
|
cost: number;
|
|
26
26
|
tokensPerSecond: number | null;
|
|
27
27
|
};
|
|
28
|
-
contextPercent: number;
|
|
28
|
+
contextPercent: number | null;
|
|
29
29
|
contextWindow: number;
|
|
30
30
|
/**
|
|
31
31
|
* True when a standalone `context_pct` segment is also part of the active
|
|
@@ -70,16 +70,6 @@ export declare class StatusLineComponent implements Component {
|
|
|
70
70
|
* unit tests can verify the backoff invariant.
|
|
71
71
|
*/
|
|
72
72
|
refreshUsageInBackground(): void;
|
|
73
|
-
/**
|
|
74
|
-
* Compute the (cached) used-tokens / context-window totals for the
|
|
75
|
-
* status-line context% segment. Exposed (non-private) so unit tests can
|
|
76
|
-
* verify the incremental-cache invariants; not part of any external
|
|
77
|
-
* API.
|
|
78
|
-
*/
|
|
79
|
-
getCachedContextBreakdown(): {
|
|
80
|
-
usedTokens: number;
|
|
81
|
-
contextWindow: number;
|
|
82
|
-
};
|
|
83
73
|
getTopBorder(width: number): {
|
|
84
74
|
content: string;
|
|
85
75
|
width: number;
|
|
@@ -3,5 +3,6 @@ import { Container } from "@sayknow-cli/tui";
|
|
|
3
3
|
* Component that renders a user message
|
|
4
4
|
*/
|
|
5
5
|
export declare class UserMessageComponent extends Container {
|
|
6
|
-
|
|
6
|
+
#private;
|
|
7
|
+
constructor(text: string, synthetic?: boolean, viewportAnchorId?: string);
|
|
7
8
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Component } from "@sayknow-cli/tui";
|
|
1
2
|
import type { InteractiveModeContext } from "../../modes/types";
|
|
2
3
|
import type { AgentSessionEvent } from "../../session/agent-session";
|
|
3
4
|
/** Test-only performance counters for advisory baseline tests. */
|
|
@@ -12,6 +13,9 @@ export declare class EventController {
|
|
|
12
13
|
dispose(): void;
|
|
13
14
|
subscribeToAgent(): void;
|
|
14
15
|
handleEvent(event: AgentSessionEvent): Promise<void>;
|
|
16
|
+
clearIrcExpiryTimers(): void;
|
|
17
|
+
resetIrcObservations(): void;
|
|
18
|
+
reconcileIrcExpiryTimers(componentsByObservationId: Map<string, readonly Component[]>): void;
|
|
15
19
|
sendCompletionNotification(): void;
|
|
16
20
|
handleBackgroundEvent(event: AgentSessionEvent): Promise<void>;
|
|
17
21
|
}
|