@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.
Files changed (238) hide show
  1. package/README.md +76 -0
  2. package/dist/types/capability/mcp.d.ts +2 -0
  3. package/dist/types/cli/local-provider-smoke.d.ts +59 -0
  4. package/dist/types/cli/notify-cli.d.ts +1 -1
  5. package/dist/types/cli/telegram-cli.d.ts +13 -0
  6. package/dist/types/cli/update-cli.d.ts +24 -1
  7. package/dist/types/commands/local-provider.d.ts +34 -0
  8. package/dist/types/commands/telegram.d.ts +22 -0
  9. package/dist/types/config/keybindings.d.ts +12 -6
  10. package/dist/types/config/model-registry.d.ts +5 -0
  11. package/dist/types/config/models-config-schema.d.ts +5 -0
  12. package/dist/types/config/settings-schema.d.ts +284 -4
  13. package/dist/types/config/settings.d.ts +7 -0
  14. package/dist/types/config/telegram-autostart.d.ts +14 -0
  15. package/dist/types/config/telegram-env-bridge.d.ts +18 -0
  16. package/dist/types/coordinator-mcp/server.d.ts +8 -0
  17. package/dist/types/defaults/skc-defaults.d.ts +7 -0
  18. package/dist/types/discovery/cursor.d.ts +4 -1
  19. package/dist/types/discovery/index.d.ts +0 -1
  20. package/dist/types/discovery/windsurf.d.ts +3 -1
  21. package/dist/types/extensibility/extensions/types.d.ts +11 -0
  22. package/dist/types/i18n/messages/en.d.ts +1 -0
  23. package/dist/types/modes/components/custom-editor.d.ts +6 -1
  24. package/dist/types/modes/components/custom-model-preset-wizard.d.ts +1 -1
  25. package/dist/types/modes/components/hook-selector.d.ts +5 -0
  26. package/dist/types/modes/components/model-selector.d.ts +2 -0
  27. package/dist/types/modes/components/settings-selector.d.ts +5 -1
  28. package/dist/types/modes/components/skill-message.d.ts +1 -0
  29. package/dist/types/modes/components/status-line/types.d.ts +5 -7
  30. package/dist/types/modes/components/status-line.d.ts +15 -3
  31. package/dist/types/modes/components/two-column-body.d.ts +9 -0
  32. package/dist/types/modes/components/welcome.d.ts +9 -1
  33. package/dist/types/modes/controllers/command-controller.d.ts +1 -0
  34. package/dist/types/modes/controllers/input-controller.d.ts +6 -1
  35. package/dist/types/modes/controllers/selector-controller.d.ts +10 -1
  36. package/dist/types/modes/interactive-mode.d.ts +2 -0
  37. package/dist/types/modes/prompt-action-autocomplete.d.ts +3 -0
  38. package/dist/types/modes/rpc/rpc-types.d.ts +1 -0
  39. package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +41 -7
  40. package/dist/types/modes/slash-command-visibility.d.ts +1 -0
  41. package/dist/types/modes/theme/theme.d.ts +1 -1
  42. package/dist/types/modes/tmux-scroll.d.ts +18 -0
  43. package/dist/types/modes/types.d.ts +5 -1
  44. package/dist/types/modes/utils/terminal-bell.d.ts +3 -0
  45. package/dist/types/notifications/daemon-paths.d.ts +9 -0
  46. package/dist/types/notifications/html-format.d.ts +2 -0
  47. package/dist/types/notifications/recent-activity.d.ts +5 -1
  48. package/dist/types/notifications/telegram-daemon-cli.d.ts +21 -4
  49. package/dist/types/notifications/telegram-daemon-control.d.ts +8 -0
  50. package/dist/types/notifications/telegram-daemon.d.ts +4 -10
  51. package/dist/types/notifications/telegram-reference.d.ts +4 -0
  52. package/dist/types/notifications/threaded-render.d.ts +1 -0
  53. package/dist/types/runtime-mcp/config-writer.d.ts +9 -0
  54. package/dist/types/runtime-mcp/config.d.ts +2 -0
  55. package/dist/types/runtime-mcp/loader.d.ts +2 -0
  56. package/dist/types/runtime-mcp/manager.d.ts +2 -0
  57. package/dist/types/runtime-mcp/types.d.ts +6 -0
  58. package/dist/types/sdk.d.ts +1 -1
  59. package/dist/types/skc-runtime/launch-tmux.d.ts +2 -2
  60. package/dist/types/skc-runtime/ralplan-runtime.d.ts +3 -2
  61. package/dist/types/skc-runtime/restricted-role-agent-bash.d.ts +1 -0
  62. package/dist/types/skc-runtime/session-state-sidecar.d.ts +5 -0
  63. package/dist/types/skc-runtime/state-writer.d.ts +1 -0
  64. package/dist/types/skc-runtime/team-runtime.d.ts +1 -1
  65. package/dist/types/skc-runtime/tmux-common.d.ts +12 -0
  66. package/dist/types/skc-runtime/ultragoal-guard.d.ts +7 -1
  67. package/dist/types/skc-runtime/ultragoal-runtime.d.ts +0 -4
  68. package/dist/types/slash-commands/types.d.ts +2 -0
  69. package/dist/types/system-prompt.d.ts +7 -0
  70. package/dist/types/tools/skill.d.ts +1 -1
  71. package/dist/types/utils/cmux-workspace.d.ts +52 -0
  72. package/dist/types/web/search/index.d.ts +4 -2
  73. package/dist/types/web/search/provider.d.ts +14 -0
  74. package/dist/types/web/search/providers/utils.d.ts +42 -13
  75. package/dist/types/web/search/render.d.ts +1 -0
  76. package/dist/types/workflow/workflow-intent-diff.d.ts +19 -0
  77. package/package.json +8 -8
  78. package/scripts/build-binary.ts +3 -0
  79. package/scripts/verify-insane-vendor.ts +0 -5
  80. package/src/capability/mcp.ts +2 -0
  81. package/src/cli/local-provider-smoke.ts +632 -0
  82. package/src/cli/notify-cli.ts +4 -2
  83. package/src/cli/telegram-cli.ts +156 -0
  84. package/src/cli/update-cli.ts +179 -13
  85. package/src/cli/web-search-cli.ts +5 -7
  86. package/src/cli.ts +20 -1
  87. package/src/commands/launch.ts +47 -2
  88. package/src/commands/local-provider.ts +62 -0
  89. package/src/commands/notify.ts +1 -1
  90. package/src/commands/ralplan.ts +1 -0
  91. package/src/commands/telegram.ts +47 -0
  92. package/src/config/keybindings.ts +15 -6
  93. package/src/config/mcp-schema.json +4 -0
  94. package/src/config/model-registry.ts +55 -1
  95. package/src/config/models-config-schema.ts +9 -0
  96. package/src/config/settings-schema.ts +256 -4
  97. package/src/config/settings.ts +11 -0
  98. package/src/config/telegram-autostart.ts +107 -0
  99. package/src/config/telegram-env-bridge.ts +92 -0
  100. package/src/coordinator-mcp/server.ts +276 -34
  101. package/src/defaults/skc/skills/ralplan/SKILL.md +29 -20
  102. package/src/defaults/skc/skills/ultragoal/SKILL.md +37 -112
  103. package/src/defaults/skc-defaults.ts +16 -0
  104. package/src/discovery/builtin.ts +12 -0
  105. package/src/discovery/cursor.ts +5 -84
  106. package/src/discovery/gemini.ts +3 -89
  107. package/src/discovery/index.ts +4 -1
  108. package/src/discovery/mcp-json.ts +11 -0
  109. package/src/discovery/opencode.ts +5 -122
  110. package/src/discovery/windsurf.ts +4 -82
  111. package/src/edit/read-file.ts +9 -1
  112. package/src/extensibility/extensions/runner.ts +2 -1
  113. package/src/extensibility/extensions/types.ts +11 -0
  114. package/src/extensibility/skills.ts +30 -2
  115. package/src/hooks/skill-state.ts +33 -73
  116. package/src/i18n/messages/de.ts +1 -0
  117. package/src/i18n/messages/en.ts +1 -0
  118. package/src/i18n/messages/es.ts +1 -0
  119. package/src/i18n/messages/fr.ts +1 -0
  120. package/src/i18n/messages/ja.settings.ts +28 -0
  121. package/src/i18n/messages/ja.ts +1 -0
  122. package/src/i18n/messages/ko.settings.ts +28 -0
  123. package/src/i18n/messages/ko.ts +1 -0
  124. package/src/i18n/messages/zh.settings.ts +28 -0
  125. package/src/i18n/messages/zh.ts +1 -0
  126. package/src/internal-urls/docs-index.generated.ts +12 -7
  127. package/src/main.ts +5 -2
  128. package/src/migrate/executor.ts +23 -6
  129. package/src/modes/acp/acp-agent.ts +7 -6
  130. package/src/modes/components/agent-dashboard.ts +3 -35
  131. package/src/modes/components/custom-editor.ts +26 -0
  132. package/src/modes/components/custom-model-preset-wizard.ts +30 -189
  133. package/src/modes/components/extensions/extension-dashboard.ts +2 -48
  134. package/src/modes/components/hook-selector.ts +21 -3
  135. package/src/modes/components/model-selector.ts +246 -11
  136. package/src/modes/components/session-observer-overlay.ts +3 -3
  137. package/src/modes/components/session-selector.ts +19 -9
  138. package/src/modes/components/settings-selector.ts +551 -11
  139. package/src/modes/components/skill-message.ts +18 -10
  140. package/src/modes/components/status-line/presets.ts +11 -0
  141. package/src/modes/components/status-line/segments.ts +16 -19
  142. package/src/modes/components/status-line/types.ts +6 -2
  143. package/src/modes/components/status-line.ts +281 -117
  144. package/src/modes/components/tree-selector.ts +28 -8
  145. package/src/modes/components/two-column-body.ts +36 -0
  146. package/src/modes/components/welcome.ts +165 -30
  147. package/src/modes/controllers/command-controller.ts +26 -2
  148. package/src/modes/controllers/event-controller.ts +102 -4
  149. package/src/modes/controllers/extension-ui-controller.ts +21 -2
  150. package/src/modes/controllers/input-controller.ts +214 -47
  151. package/src/modes/controllers/selector-controller.ts +35 -33
  152. package/src/modes/interactive-mode.ts +36 -30
  153. package/src/modes/prompt-action-autocomplete.ts +48 -8
  154. package/src/modes/rpc/rpc-types.ts +1 -0
  155. package/src/modes/shared/agent-wire/deep-interview-gate.ts +72 -15
  156. package/src/modes/shared/agent-wire/workflow-gate-schema.ts +20 -0
  157. package/src/modes/slash-command-visibility.ts +9 -0
  158. package/src/modes/theme/theme.ts +5 -1
  159. package/src/modes/tmux-scroll.ts +92 -0
  160. package/src/modes/types.ts +8 -1
  161. package/src/modes/utils/hotkeys-markdown.ts +5 -2
  162. package/src/modes/utils/terminal-bell.ts +48 -0
  163. package/src/modes/utils/ui-helpers.ts +76 -3
  164. package/src/notifications/daemon-paths.ts +22 -0
  165. package/src/notifications/html-format.ts +75 -1
  166. package/src/notifications/index.ts +32 -2
  167. package/src/notifications/lifecycle-control-runtime.ts +12 -3
  168. package/src/notifications/recent-activity.ts +32 -8
  169. package/src/notifications/telegram-daemon-cli.ts +125 -13
  170. package/src/notifications/telegram-daemon-control.ts +9 -0
  171. package/src/notifications/telegram-daemon.ts +88 -46
  172. package/src/notifications/telegram-reference.ts +36 -14
  173. package/src/notifications/threaded-render.ts +14 -6
  174. package/src/prompts/agents/architect.md +7 -4
  175. package/src/prompts/agents/critic.md +15 -6
  176. package/src/prompts/agents/planner.md +8 -3
  177. package/src/prompts/system/system-prompt.md +20 -2
  178. package/src/prompts/tools/bash.md +1 -1
  179. package/src/runtime-mcp/config-writer.ts +28 -0
  180. package/src/runtime-mcp/config.ts +7 -0
  181. package/src/runtime-mcp/loader.ts +3 -0
  182. package/src/runtime-mcp/manager.ts +3 -0
  183. package/src/runtime-mcp/types.ts +6 -0
  184. package/src/sdk.ts +10 -11
  185. package/src/session/agent-session.ts +103 -13
  186. package/src/session/session-manager.ts +58 -18
  187. package/src/skc-runtime/launch-tmux.ts +34 -8
  188. package/src/skc-runtime/launch-worktree.ts +16 -2
  189. package/src/skc-runtime/ralplan-runtime.ts +22 -6
  190. package/src/skc-runtime/restricted-role-agent-bash.ts +1 -0
  191. package/src/skc-runtime/session-state-sidecar.ts +167 -24
  192. package/src/skc-runtime/state-runtime.ts +8 -5
  193. package/src/skc-runtime/state-writer.ts +5 -5
  194. package/src/skc-runtime/team-runtime.ts +21 -6
  195. package/src/skc-runtime/tmux-common.ts +16 -0
  196. package/src/skc-runtime/tmux-sessions.ts +13 -9
  197. package/src/skc-runtime/ultragoal-guard.ts +150 -24
  198. package/src/skc-runtime/ultragoal-runtime.ts +16 -124
  199. package/src/skc-runtime/workflow-manifest.generated.json +0 -8
  200. package/src/skc-runtime/workflow-manifest.ts +0 -1
  201. package/src/slash-commands/builtin-registry.ts +136 -23
  202. package/src/slash-commands/types.ts +2 -0
  203. package/src/system-prompt.ts +8 -0
  204. package/src/task/executor.ts +5 -0
  205. package/src/tools/ast-grep.ts +10 -7
  206. package/src/tools/bash.ts +39 -14
  207. package/src/tools/index.ts +8 -1
  208. package/src/tools/skill.ts +1 -1
  209. package/src/utils/cmux-workspace.ts +233 -0
  210. package/src/utils/title-generator.ts +2 -0
  211. package/src/web/kagi.ts +1 -1
  212. package/src/web/parallel.ts +2 -2
  213. package/src/web/search/index.ts +137 -52
  214. package/src/web/search/provider.ts +80 -0
  215. package/src/web/search/providers/anthropic.ts +1 -1
  216. package/src/web/search/providers/brave.ts +1 -1
  217. package/src/web/search/providers/codex.ts +1 -1
  218. package/src/web/search/providers/duckduckgo.ts +1 -1
  219. package/src/web/search/providers/exa.ts +1 -1
  220. package/src/web/search/providers/gemini.ts +7 -3
  221. package/src/web/search/providers/jina.ts +1 -1
  222. package/src/web/search/providers/kimi.ts +6 -1
  223. package/src/web/search/providers/openai-compatible.ts +1 -1
  224. package/src/web/search/providers/parallel.ts +1 -1
  225. package/src/web/search/providers/perplexity.ts +2 -2
  226. package/src/web/search/providers/searxng.ts +1 -1
  227. package/src/web/search/providers/synthetic.ts +1 -1
  228. package/src/web/search/providers/tavily.ts +1 -1
  229. package/src/web/search/providers/utils.ts +67 -17
  230. package/src/web/search/providers/xai.ts +1 -1
  231. package/src/web/search/providers/zai.ts +1 -1
  232. package/src/web/search/render.ts +3 -0
  233. package/src/workflow/workflow-intent-diff.ts +199 -0
  234. package/vendor/insane-search/MANIFEST.json +1 -3
  235. package/vendor/insane-search/engine/tests/test_u1.py +0 -28
  236. package/vendor/insane-search/engine/transport.py +2 -3
  237. package/vendor/insane-search/engine/validators.py +0 -14
  238. package/src/defaults/skc/rules/ponytail.md +0 -68
package/README.md CHANGED
@@ -11,6 +11,82 @@ Package-specific references:
11
11
  - [DEVELOPMENT](./DEVELOPMENT.md)
12
12
  - [RenderMermaid guide](../../docs/render-mermaid.md)
13
13
 
14
+ ## External lifecycle notifications
15
+
16
+ SKC already exposes public lifecycle events through the extension/hook event contract. External notification integrations for Discord, Hermes, clawhip, or similar channels should be opt-in and subscribe to these events instead of scraping transcripts or logs:
17
+
18
+ - `turn_end` — a model/tool turn finished. The public payload is `{ type: "turn_end", turnIndex, message, toolResults }`.
19
+ - `agent_end` — the agent loop for a submitted prompt reached a terminal boundary. The public payload is `{ type: "agent_end", messages }`.
20
+
21
+ For simple local side effects that do not need a full extension, set the user-level `completion.notifyCommand`. SKC runs it on completed agent turns with `SKC_NOTIFICATION_*` environment variables (`SKC_NOTIFICATION_TITLE`, `SKC_NOTIFICATION_BODY`, `SKC_NOTIFICATION_JSON`, etc.); project settings cannot activate this command hook.
22
+
23
+ ```sh
24
+ skc config set completion.notifyCommand 'cmux notify --title "$SKC_NOTIFICATION_TITLE" --body "$SKC_NOTIFICATION_BODY"'
25
+ ```
26
+
27
+ When SKC runs inside a cmux terminal (`CMUX_WORKSPACE_ID` is set), SKC best-effort renames that cmux workspace to the current SKC session name (with a `SKC: ` prefix) — but only when the workspace still has its default title, so a name you pinned (or one set by a peer session sharing the workspace) is never overwritten. Opt out with `SKC_NO_CMUX_RENAME=1`.
28
+
29
+ Windows Terminal may keep BEL (`[Console]::Write([char]7)`) silent depending on profile and system sound settings even when `notifications.terminalBell` is enabled. For an audible Windows completion beep, configure a user-level PowerShell command hook instead:
30
+
31
+ ```powershell
32
+ skc config set completion.notifyCommand 'powershell.exe -NoProfile -Command "[Console]::Beep(880, 300)"'
33
+ ```
34
+
35
+ `cmux notify` returning successfully means SKC handed the completion event to cmux. cmux may still suppress the native desktop banner when the app/window is focused, the emitting workspace is active, or the notification panel is open. In those cases, check cmux's notification panel or unread workspace state instead of treating the missing banner as a SKC delivery failure.
36
+
37
+ Recommended external mapping:
38
+
39
+ | Notification | Public event | Status guidance |
40
+ |---|---|---|
41
+ | Turn finished | `turn_end` | Use the handler's own sanitized status such as `"finished"`. |
42
+ | Agent stopped/finished | `agent_end` | Treat as terminal for the prompt. |
43
+ | Waiting/blocked/failed | `agent_end` plus a caller-supplied safe summary | Current lifecycle events do not expose a separate structured waiting/blocked reason; inspect only public-safe, integration-owned state. |
44
+
45
+ Forward only a minimal, caller-sanitized payload. Do not include raw prompts, assistant transcripts, hidden prompts, tool outputs, raw logs, host paths, private config, webhook URLs, channel IDs, tokens, or secrets. A safe notification payload should be built by the extension/hook itself, for example:
46
+
47
+ ```ts
48
+ import type { ExtensionAPI } from "@sayknow-cli/coding-agent";
49
+
50
+ type PublicLifecycleNotification = {
51
+ type: "turn_end" | "agent_end";
52
+ status: "finished" | "stopped" | "failed" | "blocked" | "waiting";
53
+ turnIndex?: number;
54
+ timestamp: string;
55
+ summary: string;
56
+ };
57
+
58
+ export default function lifecycleNotifier(pi: ExtensionAPI) {
59
+ const enabled = process.env.SKC_LIFECYCLE_NOTIFY === "1";
60
+ if (!enabled) return;
61
+
62
+ const send = async (payload: PublicLifecycleNotification) => {
63
+ // POST to Discord/Hermes/clawhip here. Keep target URLs and channel IDs in
64
+ // private config or environment variables; never include them in payloads.
65
+ };
66
+
67
+ pi.on("turn_end", event =>
68
+ send({
69
+ type: "turn_end",
70
+ status: "finished",
71
+ turnIndex: event.turnIndex,
72
+ timestamp: new Date().toISOString(),
73
+ summary: "SKC turn finished",
74
+ }),
75
+ );
76
+
77
+ pi.on("agent_end", () =>
78
+ send({
79
+ type: "agent_end",
80
+ status: "stopped",
81
+ timestamp: new Date().toISOString(),
82
+ summary: "SKC prompt reached a terminal lifecycle boundary",
83
+ }),
84
+ );
85
+ }
86
+ ```
87
+
88
+ This is the supported repo-native lifecycle notification path. It is not Claude Code hook compatibility, and it remains disabled unless the user configures an extension/hook handler and private delivery target.
89
+
14
90
  ## Memory backends
15
91
 
16
92
  The agent supports three mutually-exclusive memory backends, selected via the `memory.backend` setting (Settings → Memory tab, or `~/.skc/config.yml`):
@@ -7,6 +7,8 @@ export interface MCPServer {
7
7
  name: string;
8
8
  /** Whether this server is enabled (default: true) */
9
9
  enabled?: boolean;
10
+ /** Whether to connect automatically at session startup (default: true) */
11
+ autoload?: boolean;
10
12
  /** Connection timeout in milliseconds */
11
13
  timeout?: number;
12
14
  /** Command to run (for stdio transport) */
@@ -0,0 +1,59 @@
1
+ import type { ModelsConfig } from "../config/models-config-schema";
2
+ export interface LocalProviderSmokeCommandArgs {
3
+ model?: string;
4
+ modelsPath?: string;
5
+ timeoutMs?: number;
6
+ json?: boolean;
7
+ smoke?: boolean;
8
+ }
9
+ export interface LocalOpenAICompatConfig {
10
+ baseUrl: string;
11
+ apiKey?: string;
12
+ }
13
+ export type LocalProviderDiagnosticCheckName = "config" | "models" | "chat_stream";
14
+ export type LocalProviderDiagnosticStatus = "ok" | "skipped" | "error";
15
+ export type LocalProviderDiagnosticCategory = "auth" | "timeout" | "unreachable" | "not_ready" | "oom" | "malformed_response" | "http_error" | "configuration" | "empty_response";
16
+ export interface LocalProviderDiagnosticCheck {
17
+ name: LocalProviderDiagnosticCheckName;
18
+ status: LocalProviderDiagnosticStatus;
19
+ message: string;
20
+ action?: string;
21
+ category?: LocalProviderDiagnosticCategory;
22
+ error?: string;
23
+ httpStatus?: number;
24
+ }
25
+ export interface LocalProviderSmokeResult {
26
+ ok: boolean;
27
+ baseUrl?: string;
28
+ model?: string;
29
+ message: string;
30
+ error?: string;
31
+ category?: LocalProviderDiagnosticCategory;
32
+ action?: string;
33
+ }
34
+ export interface LocalProviderDiscoveryResult {
35
+ ok: boolean;
36
+ provider: string;
37
+ baseUrl?: string;
38
+ models: string[];
39
+ message: string;
40
+ error?: string;
41
+ category?: LocalProviderDiagnosticCategory;
42
+ action?: string;
43
+ }
44
+ export interface LocalProviderStatusResult {
45
+ ok: boolean;
46
+ provider: "local";
47
+ baseUrl?: string;
48
+ model?: string;
49
+ models: string[];
50
+ checks: LocalProviderDiagnosticCheck[];
51
+ message: string;
52
+ }
53
+ export declare function getLocalOpenAICompatConfig(config: ModelsConfig | undefined): LocalOpenAICompatConfig | undefined;
54
+ export declare function runLocalProviderDiscover(cmd: Omit<LocalProviderSmokeCommandArgs, "model" | "smoke">): Promise<LocalProviderDiscoveryResult>;
55
+ export declare function runLocalProviderStatus(cmd: LocalProviderSmokeCommandArgs): Promise<LocalProviderStatusResult>;
56
+ export declare function runLocalProviderSmoke(cmd: LocalProviderSmokeCommandArgs): Promise<LocalProviderSmokeResult>;
57
+ export declare function runLocalProviderDiscoverCommand(cmd: Omit<LocalProviderSmokeCommandArgs, "model" | "smoke">): Promise<void>;
58
+ export declare function runLocalProviderStatusCommand(cmd: LocalProviderSmokeCommandArgs): Promise<void>;
59
+ export declare function runLocalProviderSmokeCommand(cmd: LocalProviderSmokeCommandArgs): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { Settings } from "../config/settings";
1
+ import type { Settings } from "../config/settings";
2
2
  export type NotifyAction = "setup" | "status" | "daemon-internal";
3
3
  export interface NotifyCommandArgs {
4
4
  action: NotifyAction;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `skc telegram` command handlers — start/status/env for the Telegram Remote
3
+ * integration, driven entirely by the `telegram.*` settings group.
4
+ */
5
+ export type TelegramAction = "start" | "status" | "env" | "__gateway";
6
+ export interface TelegramCommandArgs {
7
+ action: TelegramAction;
8
+ flags: {
9
+ json?: boolean;
10
+ };
11
+ }
12
+ export declare const TELEGRAM_ACTIONS: readonly TelegramAction[];
13
+ export declare function runTelegramCommand(cmd: TelegramCommandArgs): Promise<void>;
@@ -5,6 +5,20 @@ export interface InstalledVersionVerification {
5
5
  path?: string;
6
6
  smokeTestFailed?: boolean;
7
7
  smokeTestOutput?: string;
8
+ cleanupWarning?: string;
9
+ }
10
+ export interface PackageManagerUpdateResult {
11
+ exitCode: number | null;
12
+ text: () => string;
13
+ }
14
+ export type PackageManagerUpdateRunner = (expectedVersion: string) => Promise<PackageManagerUpdateResult>;
15
+ export interface PackageManagerUpdateOptions {
16
+ managerName: string;
17
+ expectedVersion: string;
18
+ runInstall: PackageManagerUpdateRunner;
19
+ verifyInstalledRuntime: (expectedVersion: string) => Promise<InstalledVersionVerification>;
20
+ printVerificationResult?: (expectedVersion: string) => Promise<void>;
21
+ printRecoveredVerification?: (expectedVersion: string) => void;
8
22
  }
9
23
  /** Paths and verifier used while replacing a downloaded binary update. */
10
24
  export interface BinaryReplacementOptions {
@@ -22,7 +36,14 @@ export declare function parseUpdateArgs(args: string[]): {
22
36
  force: boolean;
23
37
  check: boolean;
24
38
  } | undefined;
25
- export declare function resolveUpdateMethodForTest(ompPath: string, bunBinDir: string | undefined): "bun" | "binary";
39
+ type PackageManagerTarget = {
40
+ manager: "npm";
41
+ packageName: string;
42
+ };
43
+ type PathPlatform = NodeJS.Platform;
44
+ type PackageExists = (packageName: string, packageRoot: string) => boolean;
45
+ export declare function resolveUpdateMethodForTest(ompPath: string, bunBinDir: string | undefined): "bun" | "npm" | "binary";
46
+ export declare function resolveNpmManagedTargetForTest(ompPath: string, platform: PathPlatform, packageExists: PackageExists): PackageManagerTarget | undefined;
26
47
  export declare function formatBinaryDownloadFailureMessageForTest(binaryName: string, url: string, status: string | number, platform?: NodeJS.Platform): string;
27
48
  export declare function buildReleaseBinaryUrlForTest(version: string, platform?: NodeJS.Platform, arch?: string): string;
28
49
  export declare function formatManualUpdateInstructionsForTest(platform?: NodeJS.Platform): string;
@@ -31,6 +52,7 @@ export declare function formatVerificationFailureForTest(result: InstalledVersio
31
52
  * Atomically replace the installed binary and roll back if version verification fails.
32
53
  */
33
54
  export declare function replaceBinaryForUpdate(options: BinaryReplacementOptions): Promise<InstalledVersionVerification>;
55
+ export declare function runPackageManagerUpdateForTest(options: PackageManagerUpdateOptions): Promise<InstalledVersionVerification>;
34
56
  /**
35
57
  * Run the update command.
36
58
  */
@@ -42,3 +64,4 @@ export declare function runUpdateCommand(opts: {
42
64
  * Print update command help.
43
65
  */
44
66
  export declare function printUpdateHelp(): void;
67
+ export {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Test configured local OpenAI-compatible providers.
3
+ */
4
+ import { Command } from "@sayknow-cli/utils/cli";
5
+ export declare const LOCAL_PROVIDER_ACTIONS: readonly ["status", "diagnose", "discover", "models", "smoke"];
6
+ export declare const LOCAL_PROVIDER_DEFAULT_ACTION = "status";
7
+ export default class LocalProvider extends Command {
8
+ static description: string;
9
+ static args: {
10
+ action: import("@sayknow-cli/utils/cli").ArgDescriptor & {
11
+ description: string;
12
+ required: false;
13
+ options: readonly ["status", "diagnose", "discover", "models", "smoke"];
14
+ };
15
+ };
16
+ static flags: {
17
+ model: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
18
+ description: string;
19
+ };
20
+ "models-path": import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
21
+ description: string;
22
+ };
23
+ "timeout-ms": import("@sayknow-cli/utils/cli").FlagDescriptor<"integer"> & {
24
+ description: string;
25
+ };
26
+ smoke: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
27
+ description: string;
28
+ };
29
+ json: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
30
+ description: string;
31
+ };
32
+ };
33
+ run(): Promise<void>;
34
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `skc telegram` — manage the Telegram Remote integration.
3
+ */
4
+ import { Command } from "@sayknow-cli/utils/cli";
5
+ import { type TelegramAction } from "../cli/telegram-cli";
6
+ export default class Telegram extends Command {
7
+ static description: string;
8
+ static args: {
9
+ action: import("@sayknow-cli/utils/cli").ArgDescriptor & {
10
+ description: string;
11
+ required: false;
12
+ options: TelegramAction[];
13
+ };
14
+ };
15
+ static flags: {
16
+ json: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
17
+ description: string;
18
+ };
19
+ };
20
+ static examples: string[];
21
+ run(): Promise<void>;
22
+ }
@@ -10,6 +10,7 @@ interface AppKeybindings {
10
10
  "app.suspend": true;
11
11
  "app.thinking.cycle": true;
12
12
  "app.thinking.toggle": true;
13
+ "app.commandPalette.open": true;
13
14
  "app.model.cycleForward": true;
14
15
  "app.model.cycleBackward": true;
15
16
  "app.model.select": true;
@@ -45,6 +46,7 @@ declare module "@sayknow-cli/tui" {
45
46
  interface Keybindings extends AppKeybindings {
46
47
  }
47
48
  }
49
+ export declare function defaultMessageQueueKeysForPlatform(platform?: NodeJS.Platform): KeyId;
48
50
  /**
49
51
  * All keybindings definitions: TUI + app-specific.
50
52
  */
@@ -201,12 +203,16 @@ export declare const KEYBINDINGS: {
201
203
  readonly defaultKeys: "ctrl+t";
202
204
  readonly description: "Toggle thinking mode";
203
205
  };
204
- readonly "app.model.cycleForward": {
206
+ readonly "app.commandPalette.open": {
205
207
  readonly defaultKeys: "ctrl+p";
208
+ readonly description: "Open command palette";
209
+ };
210
+ readonly "app.model.cycleForward": {
211
+ readonly defaultKeys: "alt+n";
206
212
  readonly description: "Cycle to next model";
207
213
  };
208
214
  readonly "app.model.cycleBackward": {
209
- readonly defaultKeys: "shift+ctrl+p";
215
+ readonly defaultKeys: "alt+shift+n";
210
216
  readonly description: "Cycle to previous model";
211
217
  };
212
218
  readonly "app.model.select": {
@@ -231,10 +237,10 @@ export declare const KEYBINDINGS: {
231
237
  };
232
238
  readonly "app.message.followUp": {
233
239
  readonly defaultKeys: [];
234
- readonly description: "Send follow-up message (no default; Ctrl+Enter inserts a newline)";
240
+ readonly description: "Send follow-up message (no default; Ctrl+Enter submits)";
235
241
  };
236
242
  readonly "app.message.queue": {
237
- readonly defaultKeys: "alt+enter";
243
+ readonly defaultKeys: KeyId;
238
244
  readonly description: "Queue message for next turn";
239
245
  };
240
246
  readonly "app.message.dequeue": {
@@ -254,8 +260,8 @@ export declare const KEYBINDINGS: {
254
260
  readonly description: "Copy prompt";
255
261
  };
256
262
  readonly "app.session.new": {
257
- readonly defaultKeys: [];
258
- readonly description: "Create new session";
263
+ readonly defaultKeys: "ctrl+n";
264
+ readonly description: "Start a new session";
259
265
  };
260
266
  readonly "app.session.tree": {
261
267
  readonly defaultKeys: [];
@@ -256,6 +256,11 @@ export declare const ModelsConfigFile: ConfigFile<{
256
256
  disableStrictTools?: boolean | undefined;
257
257
  transport?: "pi-native" | undefined;
258
258
  cacheRetention?: "long" | "none" | "short" | undefined;
259
+ openaiCompat?: {
260
+ baseUrl: string;
261
+ apiKey?: string | undefined;
262
+ apiKeyEnv?: string | undefined;
263
+ } | undefined;
259
264
  }> | undefined;
260
265
  modelBindings?: {
261
266
  modelRoles?: Record<string, string> | undefined;
@@ -669,6 +669,11 @@ export declare const ModelsConfigSchema: z.ZodObject<{
669
669
  none: "none";
670
670
  short: "short";
671
671
  }>>;
672
+ openaiCompat: z.ZodOptional<z.ZodObject<{
673
+ baseUrl: z.ZodString;
674
+ apiKey: z.ZodOptional<z.ZodString>;
675
+ apiKeyEnv: z.ZodOptional<z.ZodString>;
676
+ }, z.core.$strict>>;
672
677
  }, z.core.$strict>>>;
673
678
  modelBindings: z.ZodOptional<z.ZodObject<{
674
679
  modelRoles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;