@sayknow-cli/coding-agent 0.3.5 → 0.3.7
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/README.md +76 -0
- package/dist/types/capability/mcp.d.ts +2 -0
- package/dist/types/cli/local-provider-smoke.d.ts +59 -0
- package/dist/types/cli/notify-cli.d.ts +1 -1
- package/dist/types/cli/telegram-cli.d.ts +13 -0
- package/dist/types/cli/update-cli.d.ts +24 -1
- package/dist/types/commands/local-provider.d.ts +34 -0
- package/dist/types/commands/telegram.d.ts +22 -0
- package/dist/types/config/keybindings.d.ts +12 -6
- package/dist/types/config/model-registry.d.ts +5 -0
- package/dist/types/config/models-config-schema.d.ts +5 -0
- package/dist/types/config/settings-schema.d.ts +284 -4
- package/dist/types/config/settings.d.ts +7 -0
- package/dist/types/config/telegram-autostart.d.ts +14 -0
- package/dist/types/config/telegram-env-bridge.d.ts +18 -0
- package/dist/types/coordinator-mcp/server.d.ts +8 -0
- package/dist/types/defaults/skc-defaults.d.ts +7 -0
- package/dist/types/discovery/cursor.d.ts +4 -1
- package/dist/types/discovery/index.d.ts +0 -1
- package/dist/types/discovery/windsurf.d.ts +3 -1
- package/dist/types/extensibility/extensions/types.d.ts +11 -0
- package/dist/types/i18n/messages/en.d.ts +1 -0
- package/dist/types/modes/components/custom-editor.d.ts +6 -1
- package/dist/types/modes/components/custom-model-preset-wizard.d.ts +1 -1
- package/dist/types/modes/components/hook-selector.d.ts +5 -0
- package/dist/types/modes/components/model-selector.d.ts +2 -0
- package/dist/types/modes/components/settings-selector.d.ts +5 -1
- package/dist/types/modes/components/skill-message.d.ts +1 -0
- package/dist/types/modes/components/status-line/types.d.ts +5 -7
- package/dist/types/modes/components/status-line.d.ts +15 -3
- package/dist/types/modes/components/two-column-body.d.ts +9 -0
- package/dist/types/modes/components/welcome.d.ts +9 -1
- package/dist/types/modes/controllers/command-controller.d.ts +1 -0
- package/dist/types/modes/controllers/input-controller.d.ts +6 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +10 -1
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/prompt-action-autocomplete.d.ts +3 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +1 -0
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +41 -7
- package/dist/types/modes/slash-command-visibility.d.ts +1 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/tmux-scroll.d.ts +18 -0
- package/dist/types/modes/types.d.ts +5 -1
- package/dist/types/modes/utils/terminal-bell.d.ts +3 -0
- package/dist/types/notifications/daemon-paths.d.ts +9 -0
- package/dist/types/notifications/html-format.d.ts +2 -0
- package/dist/types/notifications/recent-activity.d.ts +5 -1
- package/dist/types/notifications/telegram-daemon-cli.d.ts +21 -4
- package/dist/types/notifications/telegram-daemon-control.d.ts +8 -0
- package/dist/types/notifications/telegram-daemon.d.ts +4 -10
- package/dist/types/notifications/telegram-reference.d.ts +4 -0
- package/dist/types/notifications/threaded-render.d.ts +1 -0
- package/dist/types/runtime-mcp/config-writer.d.ts +9 -0
- package/dist/types/runtime-mcp/config.d.ts +2 -0
- package/dist/types/runtime-mcp/loader.d.ts +2 -0
- package/dist/types/runtime-mcp/manager.d.ts +2 -0
- package/dist/types/runtime-mcp/types.d.ts +6 -0
- package/dist/types/sdk.d.ts +1 -1
- package/dist/types/skc-runtime/launch-tmux.d.ts +2 -2
- package/dist/types/skc-runtime/ralplan-runtime.d.ts +3 -2
- package/dist/types/skc-runtime/restricted-role-agent-bash.d.ts +1 -0
- package/dist/types/skc-runtime/session-state-sidecar.d.ts +5 -0
- package/dist/types/skc-runtime/state-writer.d.ts +1 -0
- package/dist/types/skc-runtime/team-runtime.d.ts +1 -1
- package/dist/types/skc-runtime/tmux-common.d.ts +12 -0
- package/dist/types/skc-runtime/ultragoal-guard.d.ts +7 -1
- package/dist/types/skc-runtime/ultragoal-runtime.d.ts +0 -4
- package/dist/types/slash-commands/types.d.ts +2 -0
- package/dist/types/system-prompt.d.ts +7 -0
- package/dist/types/tools/skill.d.ts +1 -1
- package/dist/types/utils/cmux-workspace.d.ts +52 -0
- package/dist/types/web/search/index.d.ts +4 -2
- package/dist/types/web/search/provider.d.ts +14 -0
- package/dist/types/web/search/providers/utils.d.ts +42 -13
- package/dist/types/web/search/render.d.ts +1 -0
- package/dist/types/workflow/workflow-intent-diff.d.ts +19 -0
- package/package.json +8 -8
- package/scripts/build-binary.ts +3 -0
- package/scripts/verify-insane-vendor.ts +0 -5
- package/src/capability/mcp.ts +2 -0
- package/src/cli/local-provider-smoke.ts +632 -0
- package/src/cli/notify-cli.ts +4 -2
- package/src/cli/telegram-cli.ts +156 -0
- package/src/cli/update-cli.ts +179 -13
- package/src/cli/web-search-cli.ts +5 -7
- package/src/cli.ts +20 -1
- package/src/commands/launch.ts +47 -2
- package/src/commands/local-provider.ts +62 -0
- package/src/commands/notify.ts +1 -1
- package/src/commands/ralplan.ts +1 -0
- package/src/commands/telegram.ts +47 -0
- package/src/config/keybindings.ts +15 -6
- package/src/config/mcp-schema.json +4 -0
- package/src/config/model-registry.ts +55 -1
- package/src/config/models-config-schema.ts +9 -0
- package/src/config/settings-schema.ts +256 -4
- package/src/config/settings.ts +11 -0
- package/src/config/telegram-autostart.ts +107 -0
- package/src/config/telegram-env-bridge.ts +92 -0
- package/src/coordinator-mcp/server.ts +276 -34
- package/src/defaults/skc/skills/ralplan/SKILL.md +29 -20
- package/src/defaults/skc/skills/ultragoal/SKILL.md +37 -112
- package/src/defaults/skc-defaults.ts +16 -0
- package/src/discovery/builtin.ts +12 -0
- package/src/discovery/cursor.ts +5 -84
- package/src/discovery/gemini.ts +3 -89
- package/src/discovery/index.ts +4 -1
- package/src/discovery/mcp-json.ts +11 -0
- package/src/discovery/opencode.ts +5 -122
- package/src/discovery/windsurf.ts +4 -82
- package/src/edit/read-file.ts +9 -1
- package/src/extensibility/extensions/runner.ts +2 -1
- package/src/extensibility/extensions/types.ts +11 -0
- package/src/extensibility/skills.ts +30 -2
- package/src/hooks/skill-state.ts +33 -73
- package/src/i18n/messages/de.ts +1 -0
- package/src/i18n/messages/en.ts +1 -0
- package/src/i18n/messages/es.ts +1 -0
- package/src/i18n/messages/fr.ts +1 -0
- package/src/i18n/messages/ja.settings.ts +28 -0
- package/src/i18n/messages/ja.ts +1 -0
- package/src/i18n/messages/ko.settings.ts +28 -0
- package/src/i18n/messages/ko.ts +1 -0
- package/src/i18n/messages/zh.settings.ts +28 -0
- package/src/i18n/messages/zh.ts +1 -0
- package/src/internal-urls/docs-index.generated.ts +12 -7
- package/src/main.ts +5 -2
- package/src/migrate/executor.ts +23 -6
- package/src/modes/acp/acp-agent.ts +7 -6
- package/src/modes/components/agent-dashboard.ts +3 -35
- package/src/modes/components/custom-editor.ts +26 -0
- package/src/modes/components/custom-model-preset-wizard.ts +30 -189
- package/src/modes/components/extensions/extension-dashboard.ts +2 -48
- package/src/modes/components/hook-selector.ts +21 -3
- package/src/modes/components/model-selector.ts +246 -11
- package/src/modes/components/session-observer-overlay.ts +3 -3
- package/src/modes/components/session-selector.ts +19 -9
- package/src/modes/components/settings-selector.ts +551 -11
- package/src/modes/components/skill-message.ts +18 -10
- package/src/modes/components/status-line/presets.ts +11 -0
- package/src/modes/components/status-line/segments.ts +16 -19
- package/src/modes/components/status-line/types.ts +6 -2
- package/src/modes/components/status-line.ts +281 -117
- package/src/modes/components/tree-selector.ts +28 -8
- package/src/modes/components/two-column-body.ts +36 -0
- package/src/modes/components/welcome.ts +165 -30
- package/src/modes/controllers/command-controller.ts +26 -2
- package/src/modes/controllers/event-controller.ts +102 -4
- package/src/modes/controllers/extension-ui-controller.ts +21 -2
- package/src/modes/controllers/input-controller.ts +214 -47
- package/src/modes/controllers/selector-controller.ts +35 -33
- package/src/modes/interactive-mode.ts +36 -30
- package/src/modes/prompt-action-autocomplete.ts +48 -8
- package/src/modes/rpc/rpc-types.ts +1 -0
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +72 -15
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +20 -0
- package/src/modes/slash-command-visibility.ts +9 -0
- package/src/modes/theme/theme.ts +5 -1
- package/src/modes/tmux-scroll.ts +92 -0
- package/src/modes/types.ts +8 -1
- package/src/modes/utils/hotkeys-markdown.ts +5 -2
- package/src/modes/utils/terminal-bell.ts +48 -0
- package/src/modes/utils/ui-helpers.ts +76 -3
- package/src/notifications/daemon-paths.ts +22 -0
- package/src/notifications/html-format.ts +75 -1
- package/src/notifications/index.ts +32 -2
- package/src/notifications/lifecycle-control-runtime.ts +12 -3
- package/src/notifications/recent-activity.ts +32 -8
- package/src/notifications/telegram-daemon-cli.ts +125 -13
- package/src/notifications/telegram-daemon-control.ts +9 -0
- package/src/notifications/telegram-daemon.ts +88 -46
- package/src/notifications/telegram-reference.ts +36 -14
- package/src/notifications/threaded-render.ts +14 -6
- package/src/prompts/agents/architect.md +7 -4
- package/src/prompts/agents/critic.md +15 -6
- package/src/prompts/agents/planner.md +8 -3
- package/src/prompts/system/system-prompt.md +20 -2
- package/src/prompts/tools/bash.md +1 -1
- package/src/runtime-mcp/config-writer.ts +28 -0
- package/src/runtime-mcp/config.ts +7 -0
- package/src/runtime-mcp/loader.ts +3 -0
- package/src/runtime-mcp/manager.ts +3 -0
- package/src/runtime-mcp/types.ts +6 -0
- package/src/sdk.ts +10 -11
- package/src/session/agent-session.ts +103 -13
- package/src/session/session-manager.ts +58 -18
- package/src/skc-runtime/launch-tmux.ts +34 -8
- package/src/skc-runtime/launch-worktree.ts +16 -2
- package/src/skc-runtime/ralplan-runtime.ts +22 -6
- package/src/skc-runtime/restricted-role-agent-bash.ts +1 -0
- package/src/skc-runtime/session-state-sidecar.ts +167 -24
- package/src/skc-runtime/state-runtime.ts +8 -5
- package/src/skc-runtime/state-writer.ts +5 -5
- package/src/skc-runtime/team-runtime.ts +21 -6
- package/src/skc-runtime/tmux-common.ts +16 -0
- package/src/skc-runtime/tmux-sessions.ts +13 -9
- package/src/skc-runtime/ultragoal-guard.ts +150 -24
- package/src/skc-runtime/ultragoal-runtime.ts +16 -124
- package/src/skc-runtime/workflow-manifest.generated.json +0 -8
- package/src/skc-runtime/workflow-manifest.ts +0 -1
- package/src/slash-commands/builtin-registry.ts +136 -23
- package/src/slash-commands/types.ts +2 -0
- package/src/system-prompt.ts +8 -0
- package/src/task/executor.ts +5 -0
- package/src/tools/ast-grep.ts +10 -7
- package/src/tools/bash.ts +39 -14
- package/src/tools/index.ts +8 -1
- package/src/tools/skill.ts +1 -1
- package/src/utils/cmux-workspace.ts +233 -0
- package/src/utils/title-generator.ts +2 -0
- package/src/web/kagi.ts +1 -1
- package/src/web/parallel.ts +2 -2
- package/src/web/search/index.ts +137 -52
- package/src/web/search/provider.ts +80 -0
- package/src/web/search/providers/anthropic.ts +1 -1
- package/src/web/search/providers/brave.ts +1 -1
- package/src/web/search/providers/codex.ts +1 -1
- package/src/web/search/providers/duckduckgo.ts +1 -1
- package/src/web/search/providers/exa.ts +1 -1
- package/src/web/search/providers/gemini.ts +7 -3
- package/src/web/search/providers/jina.ts +1 -1
- package/src/web/search/providers/kimi.ts +6 -1
- package/src/web/search/providers/openai-compatible.ts +1 -1
- package/src/web/search/providers/parallel.ts +1 -1
- package/src/web/search/providers/perplexity.ts +2 -2
- package/src/web/search/providers/searxng.ts +1 -1
- package/src/web/search/providers/synthetic.ts +1 -1
- package/src/web/search/providers/tavily.ts +1 -1
- package/src/web/search/providers/utils.ts +67 -17
- package/src/web/search/providers/xai.ts +1 -1
- package/src/web/search/providers/zai.ts +1 -1
- package/src/web/search/render.ts +3 -0
- package/src/workflow/workflow-intent-diff.ts +199 -0
- package/vendor/insane-search/MANIFEST.json +1 -3
- package/vendor/insane-search/engine/tests/test_u1.py +0 -28
- package/vendor/insane-search/engine/transport.py +2 -3
- package/vendor/insane-search/engine/validators.py +0 -14
- package/src/defaults/skc/rules/ponytail.md +0 -68
|
@@ -22,6 +22,9 @@ export interface StatusLineSegmentOptions {
|
|
|
22
22
|
format?: "12h" | "24h";
|
|
23
23
|
showSeconds?: boolean;
|
|
24
24
|
};
|
|
25
|
+
usage?: {
|
|
26
|
+
mode?: "used" | "remaining";
|
|
27
|
+
};
|
|
25
28
|
}
|
|
26
29
|
export interface StatusLineSettings {
|
|
27
30
|
preset?: StatusLinePreset;
|
|
@@ -29,9 +32,11 @@ export interface StatusLineSettings {
|
|
|
29
32
|
rightSegments?: StatusLineSegmentId[];
|
|
30
33
|
separator?: StatusLineSeparatorStyle;
|
|
31
34
|
segmentOptions?: StatusLineSegmentOptions;
|
|
35
|
+
previewHighlightSegment?: StatusLineSegmentId;
|
|
32
36
|
showHookStatus?: boolean;
|
|
33
37
|
showSkillHud?: boolean;
|
|
34
38
|
sessionAccent?: boolean;
|
|
39
|
+
maxRows?: number;
|
|
35
40
|
}
|
|
36
41
|
export interface StatusLineComponentOptions {
|
|
37
42
|
version?: string;
|
|
@@ -59,9 +64,9 @@ export declare class StatusLineComponent implements Component {
|
|
|
59
64
|
dispose(): void;
|
|
60
65
|
invalidate(): void;
|
|
61
66
|
/**
|
|
62
|
-
* Background-refresh the
|
|
63
|
-
*
|
|
64
|
-
*
|
|
67
|
+
* Background-refresh the OAuth quota report. Guarded by a 5-min TTL on both
|
|
68
|
+
* success (cache lifetime) and error (backoff). Exposed (non-private) so
|
|
69
|
+
* unit tests can verify the backoff invariant.
|
|
65
70
|
*/
|
|
66
71
|
refreshUsageInBackground(): void;
|
|
67
72
|
/**
|
|
@@ -78,5 +83,12 @@ export declare class StatusLineComponent implements Component {
|
|
|
78
83
|
content: string;
|
|
79
84
|
width: number;
|
|
80
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* Multi-row-aware content for the settings preview: the wrapped rows joined
|
|
88
|
+
* with newlines so a single `Text` renders them stacked. Honors the current
|
|
89
|
+
* `maxRows`; identical to the single status line when `maxRows` is 1 or when
|
|
90
|
+
* everything fits on one row.
|
|
91
|
+
*/
|
|
92
|
+
getPreviewContent(width: number): string;
|
|
81
93
|
render(width: number): string[];
|
|
82
94
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Component } from "@sayknow-cli/tui";
|
|
2
|
+
export declare class TwoColumnBody implements Component {
|
|
3
|
+
private readonly leftPane;
|
|
4
|
+
private readonly rightPane;
|
|
5
|
+
private readonly maxHeight;
|
|
6
|
+
constructor(leftPane: Component, rightPane: Component, maxHeight: number);
|
|
7
|
+
render(width: number): string[];
|
|
8
|
+
invalidate(): void;
|
|
9
|
+
}
|
|
@@ -9,6 +9,12 @@ export interface LspServerInfo {
|
|
|
9
9
|
fileTypes: string[];
|
|
10
10
|
}
|
|
11
11
|
export type WelcomeLogoMode = "unicode" | "square" | "ascii";
|
|
12
|
+
export interface WelcomeComponentOptions {
|
|
13
|
+
getViewportRows?: () => number | undefined;
|
|
14
|
+
getReservedBottomRows?: (termWidth: number) => number;
|
|
15
|
+
changelogMarkdown?: string;
|
|
16
|
+
collapseChangelog?: boolean;
|
|
17
|
+
}
|
|
12
18
|
/**
|
|
13
19
|
* Sayknow-CLI launch surface: a blue-gradient SAYKNOW wordmark, compact
|
|
14
20
|
* command affordances, and project signals — a distinct identity, not a
|
|
@@ -22,7 +28,8 @@ export declare class WelcomeComponent implements Component {
|
|
|
22
28
|
private recentSessions;
|
|
23
29
|
private lspServers;
|
|
24
30
|
private readonly logoMode;
|
|
25
|
-
|
|
31
|
+
private readonly options;
|
|
32
|
+
constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], lspServers?: LspServerInfo[], logoMode?: WelcomeLogoMode, options?: WelcomeComponentOptions);
|
|
26
33
|
invalidate(): void;
|
|
27
34
|
/**
|
|
28
35
|
* Play a one-shot intro that sweeps the gradient through every phase
|
|
@@ -30,6 +37,7 @@ export declare class WelcomeComponent implements Component {
|
|
|
30
37
|
* subsequent calls reset and replay.
|
|
31
38
|
*/
|
|
32
39
|
playIntro(requestRender: () => void): void;
|
|
40
|
+
dispose(): void;
|
|
33
41
|
setModel(modelName: string, providerName: string): void;
|
|
34
42
|
setRecentSessions(sessions: RecentSession[]): void;
|
|
35
43
|
setLspServers(servers: LspServerInfo[]): void;
|
|
@@ -18,6 +18,7 @@ export declare class CommandController {
|
|
|
18
18
|
handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
|
|
19
19
|
handleChangelogCommand(showFull?: boolean): Promise<void>;
|
|
20
20
|
handleHotkeysCommand(): void;
|
|
21
|
+
handleHelpCommand(): void;
|
|
21
22
|
handleToolsCommand(): void;
|
|
22
23
|
handleContextCommand(): void;
|
|
23
24
|
handleMemoryCommand(text: string): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AutocompleteProvider, type SlashCommand } from "@sayknow-cli/tui";
|
|
2
2
|
import type { InteractiveModeContext } from "../../modes/types";
|
|
3
3
|
export declare class InputController {
|
|
4
4
|
#private;
|
|
@@ -14,6 +14,9 @@ export declare class InputController {
|
|
|
14
14
|
handleFollowUp(): Promise<void>;
|
|
15
15
|
/** Send editor text explicitly as a queued next-turn message. */
|
|
16
16
|
handleQueueSubmit(): Promise<void>;
|
|
17
|
+
restoreLatestQueuedMessageToEditor(options?: {
|
|
18
|
+
currentText?: string;
|
|
19
|
+
}): number;
|
|
17
20
|
restoreQueuedMessagesToEditor(options?: {
|
|
18
21
|
abort?: boolean;
|
|
19
22
|
currentText?: string;
|
|
@@ -27,11 +30,13 @@ export declare class InputController {
|
|
|
27
30
|
handleCopyCurrentLine(): void;
|
|
28
31
|
/** Copy current prompt text to system clipboard. */
|
|
29
32
|
handleCopyPrompt(): void;
|
|
33
|
+
openCommandPalette(): void;
|
|
30
34
|
cycleThinkingLevel(): void;
|
|
31
35
|
cycleRoleModel(options?: {
|
|
32
36
|
temporary?: boolean;
|
|
33
37
|
}): Promise<void>;
|
|
34
38
|
toggleToolOutputExpansion(): void;
|
|
39
|
+
scrollTmuxToPreviousUserInput(): void;
|
|
35
40
|
setToolsExpanded(expanded: boolean): void;
|
|
36
41
|
toggleThinkingBlockVisibility(): void;
|
|
37
42
|
openExternalEditor(): Promise<void>;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import type { Component } from "@sayknow-cli/tui";
|
|
2
|
+
import type { ModelProfileConfig } from "../../config/models-config-schema";
|
|
3
|
+
import { type Settings } from "../../config/settings";
|
|
2
4
|
import type { InteractiveModeContext, OAuthSelectorOptions } from "../../modes/types";
|
|
5
|
+
import type { StatusLineSettings } from "../components/status-line";
|
|
3
6
|
import type { JobsObserver } from "../jobs-observer";
|
|
4
7
|
import type { SessionObserverRegistry } from "../session-observer-registry";
|
|
8
|
+
/**
|
|
9
|
+
* Snapshot the persisted status-line settings that the status-line component
|
|
10
|
+
* cares about. Preview, cancel-restore, and commit paths all share this so the
|
|
11
|
+
* previewed row count (and every other field) can never drift out of sync.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildStatusLineSettings(settingsInstance: Settings): StatusLineSettings;
|
|
5
14
|
export declare class SelectorController {
|
|
6
15
|
#private;
|
|
7
16
|
private ctx;
|
|
@@ -15,7 +24,7 @@ export declare class SelectorController {
|
|
|
15
24
|
focus: Component;
|
|
16
25
|
}): void;
|
|
17
26
|
showProviderOnboarding(): void;
|
|
18
|
-
showCustomModelPresetWizard(): void;
|
|
27
|
+
showCustomModelPresetWizard(snapshot: ModelProfileConfig): void;
|
|
19
28
|
showCustomProviderWizard(): void;
|
|
20
29
|
showSettingsSelector(): void;
|
|
21
30
|
showThemeSelector(): void;
|
|
@@ -89,6 +89,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
89
89
|
retryLoader: Loader | undefined;
|
|
90
90
|
autoCompactionEscapeHandler?: () => void;
|
|
91
91
|
retryEscapeHandler?: () => void;
|
|
92
|
+
retryEscapePrimed: boolean;
|
|
92
93
|
retryCountdownTimer?: NodeJS.Timeout;
|
|
93
94
|
unsubscribe?: () => void;
|
|
94
95
|
onInputCallback?: (input: SubmittedUserInput) => void;
|
|
@@ -184,6 +185,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
184
185
|
handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
|
|
185
186
|
handleChangelogCommand(showFull?: boolean): Promise<void>;
|
|
186
187
|
handleHotkeysCommand(): void;
|
|
188
|
+
handleHelpCommand(): void;
|
|
187
189
|
handleToolsCommand(): void;
|
|
188
190
|
handleContextCommand(): void;
|
|
189
191
|
handleClearCommand(): Promise<void>;
|
|
@@ -14,6 +14,9 @@ interface PromptActionAutocompleteOptions {
|
|
|
14
14
|
copyCurrentLine: () => void;
|
|
15
15
|
copyPrompt: () => void;
|
|
16
16
|
pasteImage: () => void;
|
|
17
|
+
newSession: () => void;
|
|
18
|
+
showHelp: () => void;
|
|
19
|
+
scrollTmuxToPreviousUserInput: () => void;
|
|
17
20
|
undo: (prefix: string) => void;
|
|
18
21
|
moveCursorToMessageEnd: () => void;
|
|
19
22
|
moveCursorToMessageStart: () => void;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep-interview gate mapping (#316).
|
|
3
|
+
*
|
|
4
|
+
* Converts deep-interview `ask`-tool questions into machine-addressable
|
|
5
|
+
* `workflow_gate` { kind: "question" } events (option set + free-text shape
|
|
6
|
+
* encoded in `schema`/`options`) and decodes a `workflow_gate_response` answer
|
|
7
|
+
* back into the exact QuestionResult shape the human path produces, so ambiguity
|
|
8
|
+
* scoring/state updates proceed identically whether a human or an agent answers.
|
|
9
|
+
*
|
|
10
|
+
* This is the pure mapping primitive. Routing the ask tool through it (instead of
|
|
11
|
+
* the interactive select/editor UI) when an unattended controller + gate broker
|
|
12
|
+
* are attached is wired with the transport in #321 and exercised by #323.
|
|
13
|
+
*/
|
|
14
|
+
import type { RpcWorkflowGateKind, RpcWorkflowStage } from "../../rpc/rpc-types";
|
|
1
15
|
import type { OpenGateInput } from "./workflow-gate-broker";
|
|
2
16
|
/** "Other (type your own)" sentinel, mirroring the interactive ask tool. */
|
|
3
17
|
export declare const GATE_OTHER_OPTION = "Other (type your own)";
|
|
@@ -9,6 +23,10 @@ export interface AskGateDeepInterviewState {
|
|
|
9
23
|
dimension: string;
|
|
10
24
|
ambiguity: number;
|
|
11
25
|
}
|
|
26
|
+
export interface AskGateWorkflowGateMeta {
|
|
27
|
+
stage: RpcWorkflowStage;
|
|
28
|
+
kind: RpcWorkflowGateKind;
|
|
29
|
+
}
|
|
12
30
|
export interface AskGateQuestion {
|
|
13
31
|
id: string;
|
|
14
32
|
question: string;
|
|
@@ -22,6 +40,8 @@ export interface AskGateQuestion {
|
|
|
22
40
|
* `stage_state`; when absent, the question text is regex-parsed as a fallback.
|
|
23
41
|
*/
|
|
24
42
|
deepInterview?: AskGateDeepInterviewState;
|
|
43
|
+
/** Override the emitted workflow gate address for non-deep-interview ask prompts. */
|
|
44
|
+
workflowGate?: AskGateWorkflowGateMeta;
|
|
25
45
|
}
|
|
26
46
|
export interface AskGateResult {
|
|
27
47
|
id: string;
|
|
@@ -30,6 +50,7 @@ export interface AskGateResult {
|
|
|
30
50
|
multi: boolean;
|
|
31
51
|
selectedOptions: string[];
|
|
32
52
|
customInput?: string;
|
|
53
|
+
clarificationQuestion?: string;
|
|
33
54
|
}
|
|
34
55
|
/**
|
|
35
56
|
* The answer shape an agent returns for a deep-interview question gate.
|
|
@@ -37,17 +58,30 @@ export interface AskGateResult {
|
|
|
37
58
|
* `selected` are picked option labels; free text is conveyed by `other: true`
|
|
38
59
|
* plus `custom`, encoded separately from `selected` so a real option whose label
|
|
39
60
|
* happens to equal the display sentinel can never collide with the free-text path.
|
|
61
|
+
*
|
|
62
|
+
* `action: "clarify"` is a non-answer. It lets a Deep Interview user ask about
|
|
63
|
+
* the presented choices without advancing the round, scoring ambiguity, or
|
|
64
|
+
* recording selection state.
|
|
40
65
|
*/
|
|
41
|
-
export
|
|
66
|
+
export type DeepInterviewGateAnswer = {
|
|
42
67
|
selected: string[];
|
|
43
|
-
other?:
|
|
44
|
-
custom?:
|
|
45
|
-
|
|
68
|
+
other?: false;
|
|
69
|
+
custom?: undefined;
|
|
70
|
+
action?: "answer";
|
|
71
|
+
} | {
|
|
72
|
+
selected: string[];
|
|
73
|
+
other: true;
|
|
74
|
+
custom: string;
|
|
75
|
+
action?: "answer";
|
|
76
|
+
} | {
|
|
77
|
+
action: "clarify";
|
|
78
|
+
question: string;
|
|
79
|
+
};
|
|
46
80
|
export declare class DeepInterviewGateError extends Error {
|
|
47
|
-
readonly code: "invalid_answer_shape" | "unknown_option" | "multi_not_allowed" | "missing_custom" | "empty_selection" | "duplicate_selection";
|
|
48
|
-
constructor(code: "invalid_answer_shape" | "unknown_option" | "multi_not_allowed" | "missing_custom" | "empty_selection" | "duplicate_selection", message: string);
|
|
81
|
+
readonly code: "invalid_answer_shape" | "unknown_option" | "multi_not_allowed" | "missing_custom" | "missing_clarification" | "empty_selection" | "duplicate_selection";
|
|
82
|
+
constructor(code: "invalid_answer_shape" | "unknown_option" | "multi_not_allowed" | "missing_custom" | "missing_clarification" | "empty_selection" | "duplicate_selection", message: string);
|
|
49
83
|
}
|
|
50
|
-
/** Build the `workflow_gate` open-input for one
|
|
84
|
+
/** Build the `workflow_gate` open-input for one ask question. */
|
|
51
85
|
export declare function questionToGate(question: AskGateQuestion): OpenGateInput;
|
|
52
86
|
/**
|
|
53
87
|
* Decode a gate answer into the QuestionResult the interactive path produces.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shouldShowExtensionCommand(name: string, activeProvider: string | undefined): boolean;
|
|
@@ -6,7 +6,7 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
|
|
|
6
6
|
/**
|
|
7
7
|
* All available symbol keys organized by category.
|
|
8
8
|
*/
|
|
9
|
-
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.goal" | "icon.pause" | "icon.folder" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.time" | "icon.pi" | "icon.agents" | "icon.cache" | "icon.input" | "icon.output" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.mic" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "checkbox.checked" | "checkbox.unchecked" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.editing" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers";
|
|
9
|
+
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.goal" | "icon.pause" | "icon.folder" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.time" | "icon.pi" | "icon.agents" | "icon.cache" | "icon.input" | "icon.output" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.mic" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "checkbox.checked" | "checkbox.unchecked" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.editing" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tab.integrations";
|
|
10
10
|
export type SpinnerType = "status" | "activity";
|
|
11
11
|
export declare const THEME_COLOR_KEYS: readonly ["accent", "border", "borderAccent", "borderMuted", "success", "error", "warning", "muted", "dim", "text", "thinkingText", "selectedBg", "userMessageBg", "userMessageText", "customMessageBg", "customMessageText", "customMessageLabel", "toolPendingBg", "toolSuccessBg", "toolErrorBg", "toolTitle", "toolOutput", "mdHeading", "mdLink", "mdLinkUrl", "mdCode", "mdCodeBlock", "mdCodeBlockBorder", "mdQuote", "mdQuoteBorder", "mdHr", "mdListBullet", "toolDiffAdded", "toolDiffRemoved", "toolDiffContext", "syntaxComment", "syntaxKeyword", "syntaxFunction", "syntaxVariable", "syntaxString", "syntaxNumber", "syntaxType", "syntaxOperator", "syntaxPunctuation", "thinkingOff", "thinkingMinimal", "thinkingLow", "thinkingMedium", "thinkingHigh", "thinkingXhigh", "bashMode", "pythonMode", "statusLineBg", "statusLineSep", "statusLineModel", "statusLinePath", "statusLineGitClean", "statusLineGitDirty", "statusLineContext", "statusLineSpend", "statusLineStaged", "statusLineDirty", "statusLineUntracked", "statusLineOutput", "statusLineCost", "statusLineSubagents"];
|
|
12
12
|
export type ThemeColor = "accent" | "border" | "borderAccent" | "borderMuted" | "success" | "error" | "warning" | "muted" | "dim" | "text" | "thinkingText" | "userMessageText" | "customMessageText" | "customMessageLabel" | "toolTitle" | "toolOutput" | "mdHeading" | "mdLink" | "mdLinkUrl" | "mdCode" | "mdCodeBlock" | "mdCodeBlockBorder" | "mdQuote" | "mdQuoteBorder" | "mdHr" | "mdListBullet" | "toolDiffAdded" | "toolDiffRemoved" | "toolDiffContext" | "syntaxComment" | "syntaxKeyword" | "syntaxFunction" | "syntaxVariable" | "syntaxString" | "syntaxNumber" | "syntaxType" | "syntaxOperator" | "syntaxPunctuation" | "thinkingOff" | "thinkingMinimal" | "thinkingLow" | "thinkingMedium" | "thinkingHigh" | "thinkingXhigh" | "bashMode" | "pythonMode" | "statusLineSep" | "statusLineModel" | "statusLinePath" | "statusLineGitClean" | "statusLineGitDirty" | "statusLineContext" | "statusLineSpend" | "statusLineStaged" | "statusLineDirty" | "statusLineUntracked" | "statusLineOutput" | "statusLineCost" | "statusLineSubagents";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const TMUX_PREVIOUS_USER_INPUT_SEARCH_PATTERN = "^ *user *$";
|
|
2
|
+
type TmuxScrollFailureReason = "not_inside_tmux" | "tmux_command_failed" | "copy_mode_failed" | "history_bottom_failed" | "search_failed";
|
|
3
|
+
export type TmuxScrollToPreviousUserInputResult = {
|
|
4
|
+
ok: true;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
reason: TmuxScrollFailureReason;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
interface TmuxSpawnResult {
|
|
11
|
+
exitCode: number | null;
|
|
12
|
+
stderr?: {
|
|
13
|
+
toString(): string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
type TmuxSpawnSync = (command: string, args: string[], env: NodeJS.ProcessEnv) => TmuxSpawnResult;
|
|
17
|
+
export declare function scrollTmuxToPreviousUserInput(env?: NodeJS.ProcessEnv, spawnSync?: TmuxSpawnSync): TmuxScrollToPreviousUserInputResult;
|
|
18
|
+
export {};
|
|
@@ -94,6 +94,7 @@ export interface InteractiveModeContext {
|
|
|
94
94
|
retryLoader: Loader | undefined;
|
|
95
95
|
autoCompactionEscapeHandler?: () => void;
|
|
96
96
|
retryEscapeHandler?: () => void;
|
|
97
|
+
retryEscapePrimed: boolean;
|
|
97
98
|
retryCountdownTimer?: NodeJS.Timeout;
|
|
98
99
|
unsubscribe?: () => void;
|
|
99
100
|
onInputCallback?: (input: SubmittedUserInput) => void;
|
|
@@ -191,6 +192,7 @@ export interface InteractiveModeContext {
|
|
|
191
192
|
handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
|
|
192
193
|
handleChangelogCommand(showFull?: boolean): Promise<void>;
|
|
193
194
|
handleHotkeysCommand(): void;
|
|
195
|
+
handleHelpCommand(): void;
|
|
194
196
|
handleToolsCommand(): void;
|
|
195
197
|
handleContextCommand(): void;
|
|
196
198
|
handleDumpCommand(): void;
|
|
@@ -260,7 +262,9 @@ export interface InteractiveModeContext {
|
|
|
260
262
|
setHookStatus(key: string, text: string | undefined): void;
|
|
261
263
|
showHookSelector(title: string, options: string[], dialogOptions?: ExtensionUIDialogOptions): Promise<string | undefined>;
|
|
262
264
|
hideHookSelector(): void;
|
|
263
|
-
showHookInput(title: string, placeholder?: string
|
|
265
|
+
showHookInput(title: string, placeholder?: string, dialogOptions?: ExtensionUIDialogOptions, inputOptions?: {
|
|
266
|
+
readonly initialValue?: string;
|
|
267
|
+
}): Promise<string | undefined>;
|
|
264
268
|
hideHookInput(): void;
|
|
265
269
|
showHookEditor(title: string, prefill?: string, dialogOptions?: ExtensionUIDialogOptions, editorOptions?: {
|
|
266
270
|
promptStyle?: boolean;
|
|
@@ -38,6 +38,8 @@ export declare function markdownToTelegramHtml(markdown: string): string;
|
|
|
38
38
|
* `marker`. The final string is guaranteed to be <= `max`.
|
|
39
39
|
*/
|
|
40
40
|
export declare function truncateTelegramHtml(message: string, max?: number, marker?: string): string;
|
|
41
|
+
/** Split a finished Telegram HTML message into ordered chunks without splitting tags or entities. */
|
|
42
|
+
export declare function splitTelegramHtml(message: string, max?: number): string[];
|
|
41
43
|
/** Finalize an optional message: undefined passthrough, else safe-truncate. */
|
|
42
44
|
export declare function finalizeTelegramHtml(message?: string): string | undefined;
|
|
43
45
|
/**
|
|
@@ -14,6 +14,8 @@ export interface RecentSessionEntry {
|
|
|
14
14
|
mtimeMs: number;
|
|
15
15
|
/** True when a terminal breadcrumb points at this session file. */
|
|
16
16
|
currentTerminal?: boolean;
|
|
17
|
+
/** True when this history is an internal helper/sub-agent session. */
|
|
18
|
+
internal?: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface RecentActivityDeps {
|
|
19
21
|
/** Root holding `<encoded-cwd>/<sessionId>.jsonl` history files. */
|
|
@@ -22,8 +24,10 @@ export interface RecentActivityDeps {
|
|
|
22
24
|
breadcrumbPaths?: string[];
|
|
23
25
|
/** Max entries to return (default 20). */
|
|
24
26
|
limit?: number;
|
|
27
|
+
/** Include internal helper/sub-agent sessions (default true). */
|
|
28
|
+
includeInternal?: boolean;
|
|
25
29
|
/** Injection seam for tests. */
|
|
26
|
-
|
|
30
|
+
readInitialLines?: (file: string, maxLines: number) => string[];
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* List recent sessions ranked by history-file mtime (newest first).
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import { Settings } from "../config/settings";
|
|
2
|
-
import {
|
|
1
|
+
import type { Settings } from "../config/settings";
|
|
2
|
+
import type { TelegramDaemonOptions } from "./telegram-daemon";
|
|
3
|
+
type TelegramDaemonRunner = {
|
|
4
|
+
run(): Promise<void>;
|
|
5
|
+
requestStop(reason?: "reload" | "signal" | "stop"): void;
|
|
6
|
+
};
|
|
7
|
+
type TelegramDaemonConstructor = new (opts: TelegramDaemonOptions) => TelegramDaemonRunner;
|
|
3
8
|
export interface RunDaemonInternalDeps {
|
|
4
|
-
SettingsImpl?:
|
|
5
|
-
|
|
9
|
+
SettingsImpl?: {
|
|
10
|
+
init: (options?: {
|
|
11
|
+
agentDir?: string;
|
|
12
|
+
}) => Promise<Pick<Settings, "get" | "getAgentDir">>;
|
|
13
|
+
};
|
|
14
|
+
DaemonImpl?: TelegramDaemonConstructor;
|
|
6
15
|
processPid?: number;
|
|
16
|
+
pidAlive?: (pid: number) => boolean;
|
|
7
17
|
}
|
|
18
|
+
export declare function createLightweightDaemonSettings(input: {
|
|
19
|
+
agentDir: string;
|
|
20
|
+
rawConfig?: unknown;
|
|
21
|
+
}): Pick<Settings, "get" | "getAgentDir">;
|
|
22
|
+
export declare function loadLightweightDaemonSettings(agentDir: string): Promise<Pick<Settings, "get" | "getAgentDir">>;
|
|
23
|
+
export declare function ownerPidFromOwnerId(ownerId: string): number | undefined;
|
|
8
24
|
export declare function runDaemonSmoke(opts?: {
|
|
9
25
|
agentDir?: string;
|
|
10
26
|
}): Promise<void>;
|
|
11
27
|
export declare function runDaemonInternal(argv: string[], deps?: RunDaemonInternalDeps): Promise<void>;
|
|
28
|
+
export {};
|
|
@@ -29,6 +29,14 @@ export interface TelegramDaemonControlDeps {
|
|
|
29
29
|
sendSignal?: (pid: number, signal: NodeJS.Signals) => void;
|
|
30
30
|
spawn?: TelegramDaemonDeps["spawn"];
|
|
31
31
|
execPath?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Stable process id encoded into freshly-spawned daemon owner ids.
|
|
34
|
+
*
|
|
35
|
+
* The daemon-internal entrypoint rejects numeric owner ids whose process is
|
|
36
|
+
* already gone. `skc daemon reload` is a short-lived CLI process, so using its
|
|
37
|
+
* own pid can race the child startup and make the replacement exit immediately.
|
|
38
|
+
*/
|
|
39
|
+
ownerPid?: number;
|
|
32
40
|
randomId?: () => string;
|
|
33
41
|
sleep?: (ms: number) => Promise<void>;
|
|
34
42
|
waitStepMs?: number;
|
|
@@ -16,14 +16,6 @@ export interface DaemonState {
|
|
|
16
16
|
version: 1;
|
|
17
17
|
stoppedAt?: number;
|
|
18
18
|
}
|
|
19
|
-
export interface DaemonPaths {
|
|
20
|
-
dir: string;
|
|
21
|
-
lock: string;
|
|
22
|
-
state: string;
|
|
23
|
-
roots: string;
|
|
24
|
-
steal: string;
|
|
25
|
-
aliases: string;
|
|
26
|
-
}
|
|
27
19
|
export interface TelegramDaemonFs {
|
|
28
20
|
mkdir(path: string, opts?: fs.MakeDirectoryOptions): Promise<void>;
|
|
29
21
|
readFile(path: string, encoding: BufferEncoding): Promise<string>;
|
|
@@ -59,7 +51,7 @@ export declare const DAEMON_VERSION = 1;
|
|
|
59
51
|
export declare const CLIENT_PING_PONG_CAPABILITY = "client_ping_pong";
|
|
60
52
|
/** Protocol version the daemon advertises in its ClientHello. */
|
|
61
53
|
export declare const NOTIFICATION_PROTOCOL_VERSION = 2;
|
|
62
|
-
export
|
|
54
|
+
export { type DaemonPaths, daemonPaths } from "./daemon-paths";
|
|
63
55
|
/**
|
|
64
56
|
* Attach session-lifecycle control (create/close/resume) to the running daemon.
|
|
65
57
|
*
|
|
@@ -241,6 +233,7 @@ export interface TelegramDaemonOptions {
|
|
|
241
233
|
interface SessionSocket {
|
|
242
234
|
sessionId: string;
|
|
243
235
|
token: string;
|
|
236
|
+
endpointKey: string;
|
|
244
237
|
ws: WebSocket;
|
|
245
238
|
pending: Map<string, {
|
|
246
239
|
sessionId: string;
|
|
@@ -275,6 +268,8 @@ export declare class TelegramNotificationDaemon {
|
|
|
275
268
|
private readonly topicOwnerByIdentity;
|
|
276
269
|
/** Non-identity frames held until identity creates the correct thread. */
|
|
277
270
|
private readonly pendingThreadedFrames;
|
|
271
|
+
/** Endpoint generation tombstones for sessions that already sent session_closed. */
|
|
272
|
+
private readonly closedEndpointKeys;
|
|
278
273
|
/** True once the daemon has nudged the user to enable Threaded Mode. */
|
|
279
274
|
private threadedFallbackNoticeSent;
|
|
280
275
|
/** Sessions whose identity header was already sent flat (Threaded Mode off). */
|
|
@@ -390,4 +385,3 @@ export declare class TelegramNotificationDaemon {
|
|
|
390
385
|
run(): Promise<void>;
|
|
391
386
|
private controlStopRequested;
|
|
392
387
|
}
|
|
393
|
-
export {};
|
|
@@ -23,6 +23,7 @@ export interface RenderedMessage {
|
|
|
23
23
|
text: string;
|
|
24
24
|
inline_keyboard?: InlineButton[][];
|
|
25
25
|
}
|
|
26
|
+
type TelegramSend = (method: string, body: unknown) => Promise<Response>;
|
|
26
27
|
/** Encode `actionId` + option `index` into Telegram callback_data (<=64 bytes). */
|
|
27
28
|
export declare function encodeCallbackData(actionId: string, index: number): string;
|
|
28
29
|
/** Decode callback_data produced by {@link encodeCallbackData}. */
|
|
@@ -58,6 +59,8 @@ export declare function buildActionMessage(action: {
|
|
|
58
59
|
options?: string[];
|
|
59
60
|
summary?: string;
|
|
60
61
|
}): RenderedMessage;
|
|
62
|
+
/** Send Telegram HTML text chunks sequentially so long messages preserve order. */
|
|
63
|
+
export declare function sendTelegramHtmlChunks(send: TelegramSend, chatId: string, text: string, inlineKeyboard?: InlineButton[][]): Promise<void>;
|
|
61
64
|
/** A protocol `reply` frame the client should send to the server. */
|
|
62
65
|
export interface ReplyFrame {
|
|
63
66
|
type: "reply";
|
|
@@ -111,3 +114,4 @@ export interface TelegramReferenceOptions {
|
|
|
111
114
|
* production clients add reconnection, multi-chat routing, and persistence.
|
|
112
115
|
*/
|
|
113
116
|
export declare function runTelegramReferenceClient(opts: TelegramReferenceOptions): Promise<void>;
|
|
117
|
+
export {};
|
|
@@ -69,6 +69,15 @@ export declare function getMCPServer(filePath: string, name: string): Promise<MC
|
|
|
69
69
|
* List all server names in a config file.
|
|
70
70
|
*/
|
|
71
71
|
export declare function listMCPServers(filePath: string): Promise<string[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Set a server's autoload flag (connect automatically at session startup).
|
|
74
|
+
*
|
|
75
|
+
* Autoload defaults to true, so turning it on removes the key to keep the
|
|
76
|
+
* config file free of redundant fields; turning it off writes `autoload: false`.
|
|
77
|
+
*
|
|
78
|
+
* @throws Error if the server doesn't exist
|
|
79
|
+
*/
|
|
80
|
+
export declare function setServerAutoload(filePath: string, name: string, autoload: boolean): Promise<void>;
|
|
72
81
|
/**
|
|
73
82
|
* Read the disabled servers list from a config file.
|
|
74
83
|
*/
|
|
@@ -13,6 +13,8 @@ export interface LoadMCPConfigsOptions {
|
|
|
13
13
|
filterExa?: boolean;
|
|
14
14
|
/** Whether to filter out browser MCP servers when builtin browser tool is enabled (default: false) */
|
|
15
15
|
filterBrowser?: boolean;
|
|
16
|
+
/** Only include servers eligible for startup connection, i.e. autoload !== false (default: false) */
|
|
17
|
+
autoloadOnly?: boolean;
|
|
16
18
|
}
|
|
17
19
|
/** Result of loading MCP configs */
|
|
18
20
|
export interface LoadMCPConfigsResult {
|
|
@@ -28,6 +28,8 @@ export interface MCPToolsLoadOptions {
|
|
|
28
28
|
filterExa?: boolean;
|
|
29
29
|
/** Whether to filter out browser MCP servers when builtin browser tool is enabled (default: false) */
|
|
30
30
|
filterBrowser?: boolean;
|
|
31
|
+
/** Only connect servers with autoload !== false (default: false) */
|
|
32
|
+
autoloadOnly?: boolean;
|
|
31
33
|
/** SQLite storage for MCP tool cache (null disables cache) */
|
|
32
34
|
cacheStorage?: AgentStorage | null;
|
|
33
35
|
/** Auth storage used to resolve OAuth credentials before initial MCP connect */
|
|
@@ -38,6 +38,8 @@ export interface MCPDiscoverOptions {
|
|
|
38
38
|
filterExa?: boolean;
|
|
39
39
|
/** Whether to filter out browser MCP servers when builtin browser tool is enabled (default: false) */
|
|
40
40
|
filterBrowser?: boolean;
|
|
41
|
+
/** Only connect servers with autoload !== false (default: false) */
|
|
42
|
+
autoloadOnly?: boolean;
|
|
41
43
|
/** Called when starting to connect to servers */
|
|
42
44
|
onConnecting?: (serverNames: string[]) => void;
|
|
43
45
|
}
|
|
@@ -45,6 +45,12 @@ export interface MCPAuthConfig {
|
|
|
45
45
|
interface MCPServerConfigBase {
|
|
46
46
|
/** Whether this server is enabled (default: true) */
|
|
47
47
|
enabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to connect this server automatically at session startup (default: true).
|
|
50
|
+
* When false the server stays configured-but-disconnected until connected
|
|
51
|
+
* explicitly (e.g. `/mcp connect <name>`).
|
|
52
|
+
*/
|
|
53
|
+
autoload?: boolean;
|
|
48
54
|
/** Connection timeout in milliseconds (default: 30000) */
|
|
49
55
|
timeout?: number;
|
|
50
56
|
/** Authentication configuration (optional) */
|
package/dist/types/sdk.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface CreateAgentSessionOptions {
|
|
|
47
47
|
requestedModel: Model;
|
|
48
48
|
reason: string;
|
|
49
49
|
};
|
|
50
|
-
/** Models available for cycling (
|
|
50
|
+
/** Models available for cycling (Alt+N in interactive mode) */
|
|
51
51
|
scopedModels?: ScopedModelSelection[];
|
|
52
52
|
/** System prompt blocks. Array replaces default, function receives default blocks and returns final blocks. */
|
|
53
53
|
systemPrompt?: string[] | ((defaultPrompt: string[]) => string[]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Args } from "../cli/args";
|
|
2
|
-
import { buildSkcTmuxProfileCommands, SKC_DEFAULT_TMUX_SESSION, SKC_TMUX_COMMAND_ENV, SKC_TMUX_MOUSE_ENV, SKC_TMUX_PROFILE_ENV, SKC_TMUX_SESSION_PREFIX, type SkcTmuxProfileCommand } from "./tmux-common";
|
|
3
|
-
export { buildSkcTmuxProfileCommands, SKC_DEFAULT_TMUX_SESSION, SKC_TMUX_COMMAND_ENV, SKC_TMUX_MOUSE_ENV, SKC_TMUX_PROFILE_ENV, SKC_TMUX_SESSION_PREFIX, };
|
|
2
|
+
import { buildSkcTmuxExactSessionTarget, buildSkcTmuxProfileCommands, SKC_DEFAULT_TMUX_SESSION, SKC_TMUX_COMMAND_ENV, SKC_TMUX_MOUSE_ENV, SKC_TMUX_PROFILE_ENV, SKC_TMUX_SESSION_PREFIX, type SkcTmuxProfileCommand } from "./tmux-common";
|
|
3
|
+
export { buildSkcTmuxExactSessionTarget, buildSkcTmuxProfileCommands, SKC_DEFAULT_TMUX_SESSION, SKC_TMUX_COMMAND_ENV, SKC_TMUX_MOUSE_ENV, SKC_TMUX_PROFILE_ENV, SKC_TMUX_SESSION_PREFIX, };
|
|
4
4
|
export declare const SKC_TMUX_LAUNCHED_ENV = "SKC_TMUX_LAUNCHED";
|
|
5
5
|
export declare const SKC_LAUNCH_POLICY_ENV = "SKC_LAUNCH_POLICY";
|
|
6
6
|
export declare const SKC_TMUX_WINDOW_LABEL_MAX_WIDTH = 48;
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* that lives in the bundled `/skill:ralplan` skill — but it accepts every documented flag so
|
|
11
11
|
* scripted users see a useful response and the active run is visible to the TUI.
|
|
12
12
|
*
|
|
13
|
-
* 2. **Artifact write**: `skc ralplan --write --stage <type> --stage_n <N>
|
|
14
|
-
* <path-or-string>
|
|
13
|
+
* 2. **Artifact write**: `skc ralplan --write --stage <type> --stage_n <N>
|
|
14
|
+
* (--artifact <path-or-string> | --artifact-env SKC_RALPLAN_ARTIFACT)
|
|
15
|
+
* [--run-id <id>] [--session-id <id>] [--json]` persists Planner / Architect
|
|
15
16
|
* / Critic / revision / post-interview / ADR / final markdown under `.skc/plans/ralplan/<run-id>/`, maintains
|
|
16
17
|
* an `index.jsonl` audit log, copies `final` stages to `pending-approval.md`, and advances
|
|
17
18
|
* the HUD chip to reflect the latest persisted stage.
|