@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
package/src/commands/notify.ts
CHANGED
package/src/commands/ralplan.ts
CHANGED
|
@@ -8,6 +8,7 @@ export default class Ralplan extends Command {
|
|
|
8
8
|
'$ skc ralplan "<task description>"',
|
|
9
9
|
'$ skc ralplan --interactive --deliberate "<task description>"',
|
|
10
10
|
'$ skc ralplan --write --stage planner --stage_n 1 --artifact "<markdown or path>"',
|
|
11
|
+
"$ skc ralplan --write --stage critic --stage_n 1 --artifact-env SKC_RALPLAN_ARTIFACT",
|
|
11
12
|
];
|
|
12
13
|
|
|
13
14
|
async run(): Promise<void> {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skc telegram` — manage the Telegram Remote integration.
|
|
3
|
+
*/
|
|
4
|
+
import { Args, Command, Flags, renderCommandHelp } from "@sayknow-cli/utils/cli";
|
|
5
|
+
import {
|
|
6
|
+
runTelegramCommand,
|
|
7
|
+
TELEGRAM_ACTIONS,
|
|
8
|
+
type TelegramAction,
|
|
9
|
+
type TelegramCommandArgs,
|
|
10
|
+
} from "../cli/telegram-cli";
|
|
11
|
+
import { initTheme } from "../modes/theme/theme";
|
|
12
|
+
|
|
13
|
+
export default class Telegram extends Command {
|
|
14
|
+
static description = "Manage the Telegram Remote integration (start/status/env)";
|
|
15
|
+
|
|
16
|
+
static args = {
|
|
17
|
+
action: Args.string({
|
|
18
|
+
description: "Sub-command",
|
|
19
|
+
required: false,
|
|
20
|
+
options: [...TELEGRAM_ACTIONS],
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
static flags = {
|
|
25
|
+
json: Flags.boolean({ description: "Output JSON (status)" }),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
static examples = [
|
|
29
|
+
"# Start the Telegram gateway with current settings\n skc telegram start",
|
|
30
|
+
"# Show integration status\n skc telegram status",
|
|
31
|
+
"# Show the env vars the gateway would receive\n skc telegram env",
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
async run(): Promise<void> {
|
|
35
|
+
const { args, flags } = await this.parse(Telegram);
|
|
36
|
+
if (!args.action) {
|
|
37
|
+
renderCommandHelp("skc", "telegram", Telegram);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const cmd: TelegramCommandArgs = {
|
|
41
|
+
action: args.action as TelegramAction,
|
|
42
|
+
flags: { json: flags.json },
|
|
43
|
+
};
|
|
44
|
+
await initTheme();
|
|
45
|
+
await runTelegramCommand(cmd);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -22,6 +22,7 @@ interface AppKeybindings {
|
|
|
22
22
|
"app.suspend": true;
|
|
23
23
|
"app.thinking.cycle": true;
|
|
24
24
|
"app.thinking.toggle": true;
|
|
25
|
+
"app.commandPalette.open": true;
|
|
25
26
|
"app.model.cycleForward": true;
|
|
26
27
|
"app.model.cycleBackward": true;
|
|
27
28
|
"app.model.select": true;
|
|
@@ -59,6 +60,10 @@ declare module "@sayknow-cli/tui" {
|
|
|
59
60
|
interface Keybindings extends AppKeybindings {}
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
export function defaultMessageQueueKeysForPlatform(platform: NodeJS.Platform = process.platform): KeyId {
|
|
64
|
+
return platform === "win32" ? "alt+q" : "alt+enter";
|
|
65
|
+
}
|
|
66
|
+
|
|
62
67
|
/**
|
|
63
68
|
* All keybindings definitions: TUI + app-specific.
|
|
64
69
|
*/
|
|
@@ -88,12 +93,16 @@ export const KEYBINDINGS = {
|
|
|
88
93
|
defaultKeys: "ctrl+t",
|
|
89
94
|
description: "Toggle thinking mode",
|
|
90
95
|
},
|
|
91
|
-
"app.
|
|
96
|
+
"app.commandPalette.open": {
|
|
92
97
|
defaultKeys: "ctrl+p",
|
|
98
|
+
description: "Open command palette",
|
|
99
|
+
},
|
|
100
|
+
"app.model.cycleForward": {
|
|
101
|
+
defaultKeys: "alt+n",
|
|
93
102
|
description: "Cycle to next model",
|
|
94
103
|
},
|
|
95
104
|
"app.model.cycleBackward": {
|
|
96
|
-
defaultKeys: "shift+
|
|
105
|
+
defaultKeys: "alt+shift+n",
|
|
97
106
|
description: "Cycle to previous model",
|
|
98
107
|
},
|
|
99
108
|
"app.model.select": {
|
|
@@ -118,10 +127,10 @@ export const KEYBINDINGS = {
|
|
|
118
127
|
},
|
|
119
128
|
"app.message.followUp": {
|
|
120
129
|
defaultKeys: [],
|
|
121
|
-
description: "Send follow-up message (no default; Ctrl+Enter
|
|
130
|
+
description: "Send follow-up message (no default; Ctrl+Enter submits)",
|
|
122
131
|
},
|
|
123
132
|
"app.message.queue": {
|
|
124
|
-
defaultKeys:
|
|
133
|
+
defaultKeys: defaultMessageQueueKeysForPlatform(),
|
|
125
134
|
description: "Queue message for next turn",
|
|
126
135
|
},
|
|
127
136
|
"app.message.dequeue": {
|
|
@@ -141,8 +150,8 @@ export const KEYBINDINGS = {
|
|
|
141
150
|
description: "Copy prompt",
|
|
142
151
|
},
|
|
143
152
|
"app.session.new": {
|
|
144
|
-
defaultKeys:
|
|
145
|
-
description: "
|
|
153
|
+
defaultKeys: "ctrl+n",
|
|
154
|
+
description: "Start a new session",
|
|
146
155
|
},
|
|
147
156
|
"app.session.tree": {
|
|
148
157
|
defaultKeys: [],
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
"type": "boolean",
|
|
97
97
|
"description": "Whether SKC should try to connect this server."
|
|
98
98
|
},
|
|
99
|
+
"autoload": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "Whether to connect this server automatically at session startup (default: true). When false the server stays configured until connected explicitly (e.g. /mcp connect <name>)."
|
|
102
|
+
},
|
|
99
103
|
"timeout": {
|
|
100
104
|
"type": "number",
|
|
101
105
|
"exclusiveMinimum": 0,
|
|
@@ -243,6 +243,7 @@ interface ProviderValidationConfig {
|
|
|
243
243
|
requestTransform?: ModelRequestTransform;
|
|
244
244
|
disableStrictTools?: boolean;
|
|
245
245
|
cacheRetention?: CacheRetention;
|
|
246
|
+
openaiCompat?: { baseUrl: string; apiKey?: string; apiKeyEnv?: string };
|
|
246
247
|
modelOverrides?: Record<string, unknown>;
|
|
247
248
|
models: ProviderValidationModel[];
|
|
248
249
|
}
|
|
@@ -271,11 +272,12 @@ function validateProviderConfiguration(
|
|
|
271
272
|
!config.disableStrictTools &&
|
|
272
273
|
!config.requestTransform &&
|
|
273
274
|
!config.cacheRetention &&
|
|
275
|
+
!config.openaiCompat &&
|
|
274
276
|
!hasModelOverrides &&
|
|
275
277
|
!config.discovery
|
|
276
278
|
) {
|
|
277
279
|
throw new Error(
|
|
278
|
-
`Provider ${providerName}: must specify "baseUrl", "headers", "apiKey", "compat", "requestTransform", "cacheRetention", "disableStrictTools", "modelOverrides", "discovery", or "models"`,
|
|
280
|
+
`Provider ${providerName}: must specify "baseUrl", "headers", "apiKey", "compat", "requestTransform", "cacheRetention", "disableStrictTools", "modelOverrides", "discovery", "openaiCompat", or "models"`,
|
|
279
281
|
);
|
|
280
282
|
}
|
|
281
283
|
}
|
|
@@ -389,6 +391,7 @@ export const ModelsConfigFile = new ConfigFile<ModelsConfig>("models", ModelsCon
|
|
|
389
391
|
requestTransform: providerConfig.requestTransform,
|
|
390
392
|
disableStrictTools: providerConfig.disableStrictTools,
|
|
391
393
|
cacheRetention: providerConfig.cacheRetention,
|
|
394
|
+
openaiCompat: providerConfig.openaiCompat,
|
|
392
395
|
modelOverrides: providerConfig.modelOverrides,
|
|
393
396
|
models: (providerConfig.models ?? []) as ProviderValidationModel[],
|
|
394
397
|
},
|
|
@@ -436,6 +439,18 @@ function resolveProviderBaseUrlFromEnv(provider: string): string | undefined {
|
|
|
436
439
|
return $pickenv(...getProviderBaseUrlEnvKeys(provider));
|
|
437
440
|
}
|
|
438
441
|
|
|
442
|
+
function normalizeLocalOpenAICompatBaseUrl(baseUrl: string): string {
|
|
443
|
+
try {
|
|
444
|
+
const parsed = new URL(baseUrl);
|
|
445
|
+
const trimmedPath = parsed.pathname.replace(/\/+$/g, "");
|
|
446
|
+
parsed.pathname = trimmedPath.endsWith("/v1") ? trimmedPath || "/v1" : `${trimmedPath}/v1`;
|
|
447
|
+
return `${parsed.protocol}//${parsed.host}${parsed.pathname}`;
|
|
448
|
+
} catch {
|
|
449
|
+
const trimmed = baseUrl.replace(/\/+$/g, "");
|
|
450
|
+
return trimmed.endsWith("/v1") ? trimmed : `${trimmed}/v1`;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
439
454
|
/**
|
|
440
455
|
* Merge a freshly discovered model with the matching bundled/configured entry
|
|
441
456
|
* (or a runtime provider override when no bundled entry exists).
|
|
@@ -1409,6 +1424,45 @@ export class ModelRegistry {
|
|
|
1409
1424
|
for (const [providerName, providerConfig] of providerEntries) {
|
|
1410
1425
|
if (providerConfig.webSearch) this.#providerWebSearchModes.set(providerName, providerConfig.webSearch);
|
|
1411
1426
|
const providerApiKeyConfig = providerConfig.apiKey ?? resolveApiKeyEnvConfig(providerConfig.apiKeyEnv);
|
|
1427
|
+
const localOpenAICompat = providerConfig.openaiCompat;
|
|
1428
|
+
const localOpenAICompatApiKeyConfig = localOpenAICompat
|
|
1429
|
+
? (localOpenAICompat.apiKey ?? resolveApiKeyEnvConfig(localOpenAICompat.apiKeyEnv))
|
|
1430
|
+
: undefined;
|
|
1431
|
+
if (localOpenAICompat) {
|
|
1432
|
+
const localOpenAICompatBaseUrl = normalizeLocalOpenAICompatBaseUrl(localOpenAICompat.baseUrl);
|
|
1433
|
+
const localCompatResolvedKey = localOpenAICompat.apiKeyEnv
|
|
1434
|
+
? resolveApiKeyEnvConfig(localOpenAICompat.apiKeyEnv)
|
|
1435
|
+
: localOpenAICompat.apiKey
|
|
1436
|
+
? resolveApiKeyConfig(localOpenAICompat.apiKey)
|
|
1437
|
+
: undefined;
|
|
1438
|
+
overrides.set(providerName, {
|
|
1439
|
+
baseUrl: localOpenAICompatBaseUrl,
|
|
1440
|
+
apiKey: localOpenAICompatApiKeyConfig,
|
|
1441
|
+
compat: {
|
|
1442
|
+
supportsStore: false,
|
|
1443
|
+
supportsDeveloperRole: false,
|
|
1444
|
+
supportsReasoningEffort: false,
|
|
1445
|
+
},
|
|
1446
|
+
});
|
|
1447
|
+
discoverableProviders.push({
|
|
1448
|
+
provider: providerName,
|
|
1449
|
+
api: "openai-completions",
|
|
1450
|
+
baseUrl: localOpenAICompatBaseUrl,
|
|
1451
|
+
compat: {
|
|
1452
|
+
supportsStore: false,
|
|
1453
|
+
supportsDeveloperRole: false,
|
|
1454
|
+
supportsReasoningEffort: false,
|
|
1455
|
+
},
|
|
1456
|
+
discovery: { type: "openai-models-list" },
|
|
1457
|
+
optional: false,
|
|
1458
|
+
});
|
|
1459
|
+
if (localCompatResolvedKey) {
|
|
1460
|
+
this.#customProviderApiKeys.set(providerName, localCompatResolvedKey);
|
|
1461
|
+
this.authStorage.setConfigApiKey(providerName, localCompatResolvedKey);
|
|
1462
|
+
} else {
|
|
1463
|
+
keylessProviders.add(providerName);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1412
1466
|
// Always set overrides when baseUrl/headers/apiKey/authHeader/compat/disableStrictTools/transport are present
|
|
1413
1467
|
if (
|
|
1414
1468
|
providerConfig.baseUrl ||
|
|
@@ -193,6 +193,14 @@ export const ProviderDiscoverySchema = z.object({
|
|
|
193
193
|
type: z.enum(["ollama", "llama.cpp", "lm-studio", "openai-models-list"]),
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
+
const LocalOpenAICompatSchema = z
|
|
197
|
+
.object({
|
|
198
|
+
baseUrl: z.string().min(1),
|
|
199
|
+
apiKey: z.string().min(1).optional(),
|
|
200
|
+
apiKeyEnv: z.string().min(1).optional(),
|
|
201
|
+
})
|
|
202
|
+
.strict();
|
|
203
|
+
|
|
196
204
|
export const ProviderAuthSchema = z.enum(["apiKey", "none", "oauth"]);
|
|
197
205
|
|
|
198
206
|
export type ProviderAuthMode = z.infer<typeof ProviderAuthSchema>;
|
|
@@ -237,6 +245,7 @@ const ProviderConfigSchema = z
|
|
|
237
245
|
*/
|
|
238
246
|
transport: z.literal("pi-native").optional(),
|
|
239
247
|
cacheRetention: CacheRetentionSchema.optional(),
|
|
248
|
+
openaiCompat: LocalOpenAICompatSchema.optional(),
|
|
240
249
|
})
|
|
241
250
|
.strict();
|
|
242
251
|
|
|
@@ -36,7 +36,8 @@ export type SettingTab =
|
|
|
36
36
|
| "editing"
|
|
37
37
|
| "tools"
|
|
38
38
|
| "tasks"
|
|
39
|
-
| "providers"
|
|
39
|
+
| "providers"
|
|
40
|
+
| "integrations";
|
|
40
41
|
|
|
41
42
|
/** Tab display metadata - icon is resolved via theme.symbol() */
|
|
42
43
|
export type TabMetadata = { label: string; icon: `tab.${string}` };
|
|
@@ -52,6 +53,7 @@ export const SETTING_TABS: SettingTab[] = [
|
|
|
52
53
|
"tools",
|
|
53
54
|
"tasks",
|
|
54
55
|
"providers",
|
|
56
|
+
"integrations",
|
|
55
57
|
];
|
|
56
58
|
|
|
57
59
|
/** Tab display metadata - icon is a symbol key from theme.ts (tab.*) */
|
|
@@ -65,6 +67,7 @@ export const TAB_METADATA: Record<SettingTab, { label: string; icon: `tab.${stri
|
|
|
65
67
|
tools: { label: "Tools", icon: "tab.tools" },
|
|
66
68
|
tasks: { label: "Tasks", icon: "tab.tasks" },
|
|
67
69
|
providers: { label: "Providers", icon: "tab.providers" },
|
|
70
|
+
integrations: { label: "Integrations", icon: "tab.integrations" },
|
|
68
71
|
};
|
|
69
72
|
|
|
70
73
|
/** Status line segment identifiers */
|
|
@@ -275,6 +278,44 @@ export const SETTINGS_SCHEMA = {
|
|
|
275
278
|
validate: (value: number) => Number.isFinite(value) && value > 0,
|
|
276
279
|
},
|
|
277
280
|
|
|
281
|
+
"notifications.terminalBell": {
|
|
282
|
+
type: "boolean",
|
|
283
|
+
default: false,
|
|
284
|
+
ui: {
|
|
285
|
+
tab: "interaction",
|
|
286
|
+
label: "Terminal Bell",
|
|
287
|
+
description:
|
|
288
|
+
"Emit a BEL character for local terminal notifications. Windows Terminal may keep BEL silent depending on profile/system sound settings; use completion.notifyCommand for a PowerShell Console.Beep workaround.",
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
"notifications.bellOnComplete": {
|
|
292
|
+
type: "boolean",
|
|
293
|
+
default: true,
|
|
294
|
+
ui: {
|
|
295
|
+
tab: "interaction",
|
|
296
|
+
label: "Bell on Completion",
|
|
297
|
+
description: "Ring the terminal bell when an agent turn completes",
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
"notifications.bellOnApproval": {
|
|
301
|
+
type: "boolean",
|
|
302
|
+
default: true,
|
|
303
|
+
ui: {
|
|
304
|
+
tab: "interaction",
|
|
305
|
+
label: "Bell on Approval",
|
|
306
|
+
description: "Ring the terminal bell when a plan or approval prompt needs attention",
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
"notifications.bellOnAsk": {
|
|
310
|
+
type: "boolean",
|
|
311
|
+
default: true,
|
|
312
|
+
ui: {
|
|
313
|
+
tab: "interaction",
|
|
314
|
+
label: "Bell on Ask",
|
|
315
|
+
description: "Ring the terminal bell when an ask/user-input prompt needs attention",
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
|
|
278
319
|
autoResume: {
|
|
279
320
|
type: "boolean",
|
|
280
321
|
default: false,
|
|
@@ -439,7 +480,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
439
480
|
// Status line
|
|
440
481
|
"statusLine.preset": {
|
|
441
482
|
type: "enum",
|
|
442
|
-
values: ["default", "minimal", "compact", "full", "nerd", "ascii", "custom"] as const,
|
|
483
|
+
values: ["default", "default-usage", "minimal", "compact", "full", "nerd", "ascii", "custom"] as const,
|
|
443
484
|
default: "default",
|
|
444
485
|
ui: {
|
|
445
486
|
tab: "appearance",
|
|
@@ -447,6 +488,11 @@ export const SETTINGS_SCHEMA = {
|
|
|
447
488
|
description: "Pre-built status line configurations",
|
|
448
489
|
options: [
|
|
449
490
|
{ value: "default", label: "Default", description: "Model, path, git, context, tokens, cost" },
|
|
491
|
+
{
|
|
492
|
+
value: "default-usage",
|
|
493
|
+
label: "Default + Usage",
|
|
494
|
+
description: "Default layout with provider usage quota",
|
|
495
|
+
},
|
|
450
496
|
{ value: "minimal", label: "Minimal", description: "Path and git only" },
|
|
451
497
|
{ value: "compact", label: "Compact", description: "Model, git, cost, context" },
|
|
452
498
|
{ value: "full", label: "Full", description: "All segments including time" },
|
|
@@ -486,6 +532,21 @@ export const SETTINGS_SCHEMA = {
|
|
|
486
532
|
description: "Use the session name color for the editor border and status line gap",
|
|
487
533
|
},
|
|
488
534
|
},
|
|
535
|
+
"statusLine.maxRows": {
|
|
536
|
+
type: "number",
|
|
537
|
+
default: 1,
|
|
538
|
+
ui: {
|
|
539
|
+
tab: "appearance",
|
|
540
|
+
label: "Status Line Rows",
|
|
541
|
+
description:
|
|
542
|
+
"Maximum rows for the status line. When greater than 1, overflowing segments wrap onto additional rows instead of being dropped.",
|
|
543
|
+
options: [
|
|
544
|
+
{ value: "1", label: "1 row", description: "Single line; overflow is truncated (default)" },
|
|
545
|
+
{ value: "2", label: "2 rows", description: "Wrap overflow onto a second row" },
|
|
546
|
+
{ value: "3", label: "3 rows", description: "Wrap overflow across up to three rows" },
|
|
547
|
+
],
|
|
548
|
+
},
|
|
549
|
+
},
|
|
489
550
|
"tools.artifactSpillThreshold": {
|
|
490
551
|
type: "number",
|
|
491
552
|
default: 50,
|
|
@@ -1157,6 +1218,16 @@ export const SETTINGS_SCHEMA = {
|
|
|
1157
1218
|
default: "on",
|
|
1158
1219
|
ui: { tab: "interaction", label: "Completion Notification", description: "Notify when the agent completes" },
|
|
1159
1220
|
},
|
|
1221
|
+
"completion.notifyCommand": {
|
|
1222
|
+
type: "string",
|
|
1223
|
+
default: "",
|
|
1224
|
+
ui: {
|
|
1225
|
+
tab: "interaction",
|
|
1226
|
+
label: "Completion Notification Command",
|
|
1227
|
+
description:
|
|
1228
|
+
"Optional user-level shell command to run when an agent turn completes; receives SKC_NOTIFICATION_* environment variables. On Windows, this can call PowerShell [Console]::Beep when terminal BEL is silent.",
|
|
1229
|
+
},
|
|
1230
|
+
},
|
|
1160
1231
|
|
|
1161
1232
|
"ask.timeout": {
|
|
1162
1233
|
type: "number",
|
|
@@ -2179,6 +2250,11 @@ export const SETTINGS_SCHEMA = {
|
|
|
2179
2250
|
ui: { tab: "tools", label: "Web Search", description: "Enable the web_search tool for web searching" },
|
|
2180
2251
|
},
|
|
2181
2252
|
|
|
2253
|
+
"web_search.provider": {
|
|
2254
|
+
type: "enum",
|
|
2255
|
+
values: ["auto", ...CONFIGURABLE_SEARCH_PROVIDER_IDS] as const,
|
|
2256
|
+
default: "auto",
|
|
2257
|
+
},
|
|
2182
2258
|
"web_search.fallback": {
|
|
2183
2259
|
type: "array",
|
|
2184
2260
|
default: EMPTY_STRING_ARRAY,
|
|
@@ -2442,7 +2518,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
2442
2518
|
"tools.discoveryMode": {
|
|
2443
2519
|
type: "enum",
|
|
2444
2520
|
values: ["off", "all"] as const,
|
|
2445
|
-
default: "
|
|
2521
|
+
default: "all",
|
|
2446
2522
|
ui: {
|
|
2447
2523
|
tab: "tools",
|
|
2448
2524
|
label: "Tool Discovery",
|
|
@@ -2457,7 +2533,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
2457
2533
|
tab: "tools",
|
|
2458
2534
|
label: "Essential Tools Override",
|
|
2459
2535
|
description:
|
|
2460
|
-
"Override the always-loaded built-in tools (default: read, bash, edit). Leave empty to use defaults.",
|
|
2536
|
+
"Override the always-loaded built-in tools (default: read, bash, edit, write, search, find). Leave empty to use defaults.",
|
|
2461
2537
|
},
|
|
2462
2538
|
},
|
|
2463
2539
|
|
|
@@ -3109,6 +3185,151 @@ export const SETTINGS_SCHEMA = {
|
|
|
3109
3185
|
description: "Score threshold (0–100) above which block mode denies install. Default 60.",
|
|
3110
3186
|
},
|
|
3111
3187
|
},
|
|
3188
|
+
|
|
3189
|
+
// Telegram Remote — two-way messaging integration.
|
|
3190
|
+
// Maps to SKC_TELEGRAM_REMOTE_* env vars consumed by the
|
|
3191
|
+
// @sayknow-cli/telegram-remote gateway (packages/telegram-remote).
|
|
3192
|
+
// The settings bridge converts these into env before spawning the gateway.
|
|
3193
|
+
"telegram.enabled": {
|
|
3194
|
+
type: "boolean",
|
|
3195
|
+
default: false,
|
|
3196
|
+
ui: {
|
|
3197
|
+
tab: "integrations",
|
|
3198
|
+
label: "Telegram Remote",
|
|
3199
|
+
description: "Enable two-way Telegram bot control of skc sessions",
|
|
3200
|
+
},
|
|
3201
|
+
},
|
|
3202
|
+
|
|
3203
|
+
"telegram.botToken": {
|
|
3204
|
+
type: "string",
|
|
3205
|
+
default: undefined,
|
|
3206
|
+
ui: {
|
|
3207
|
+
tab: "integrations",
|
|
3208
|
+
label: "Bot Token",
|
|
3209
|
+
description: "Telegram bot token from @BotFather (required when enabled)",
|
|
3210
|
+
},
|
|
3211
|
+
},
|
|
3212
|
+
|
|
3213
|
+
"telegram.allowedUserIds": {
|
|
3214
|
+
type: "string",
|
|
3215
|
+
default: undefined,
|
|
3216
|
+
ui: {
|
|
3217
|
+
tab: "integrations",
|
|
3218
|
+
label: "Allowed User IDs",
|
|
3219
|
+
description: "Comma-separated Telegram user IDs permitted to send commands",
|
|
3220
|
+
},
|
|
3221
|
+
},
|
|
3222
|
+
|
|
3223
|
+
"telegram.allowedChatIds": {
|
|
3224
|
+
type: "string",
|
|
3225
|
+
default: undefined,
|
|
3226
|
+
ui: {
|
|
3227
|
+
tab: "integrations",
|
|
3228
|
+
label: "Allowed Chat IDs",
|
|
3229
|
+
description: "Comma-separated Telegram chat IDs permitted to send commands",
|
|
3230
|
+
},
|
|
3231
|
+
},
|
|
3232
|
+
|
|
3233
|
+
"telegram.backend": {
|
|
3234
|
+
type: "enum",
|
|
3235
|
+
values: ["coordinator", "rpc"] as const,
|
|
3236
|
+
default: "coordinator",
|
|
3237
|
+
ui: {
|
|
3238
|
+
tab: "integrations",
|
|
3239
|
+
label: "Backend",
|
|
3240
|
+
description: "Coordinator (multi-session lifecycle) or RPC (single persistent session)",
|
|
3241
|
+
options: [
|
|
3242
|
+
{ value: "coordinator", label: "Coordinator", description: "Multi-session lifecycle + observation" },
|
|
3243
|
+
{ value: "rpc", label: "RPC", description: "Attach/detach to one persistent session socket" },
|
|
3244
|
+
],
|
|
3245
|
+
},
|
|
3246
|
+
},
|
|
3247
|
+
|
|
3248
|
+
"telegram.enableStop": {
|
|
3249
|
+
type: "boolean",
|
|
3250
|
+
default: false,
|
|
3251
|
+
ui: {
|
|
3252
|
+
tab: "integrations",
|
|
3253
|
+
label: "Enable /stop",
|
|
3254
|
+
description: "Allow graceful stop requests (adds the reports mutation class)",
|
|
3255
|
+
},
|
|
3256
|
+
},
|
|
3257
|
+
|
|
3258
|
+
"telegram.enableRich": {
|
|
3259
|
+
type: "boolean",
|
|
3260
|
+
default: true,
|
|
3261
|
+
ui: {
|
|
3262
|
+
tab: "integrations",
|
|
3263
|
+
label: "Rich Messages",
|
|
3264
|
+
description: "HTML formatting + inline keyboards",
|
|
3265
|
+
},
|
|
3266
|
+
},
|
|
3267
|
+
|
|
3268
|
+
"telegram.enablePush": {
|
|
3269
|
+
type: "boolean",
|
|
3270
|
+
default: false,
|
|
3271
|
+
ui: {
|
|
3272
|
+
tab: "integrations",
|
|
3273
|
+
label: "Push Notifications",
|
|
3274
|
+
description: "Follow/Mute subscriptions via coordinator event watch",
|
|
3275
|
+
},
|
|
3276
|
+
},
|
|
3277
|
+
|
|
3278
|
+
"telegram.registerCommands": {
|
|
3279
|
+
type: "boolean",
|
|
3280
|
+
default: true,
|
|
3281
|
+
ui: {
|
|
3282
|
+
tab: "integrations",
|
|
3283
|
+
label: "Register Bot Menu",
|
|
3284
|
+
description: "Register the Bot command menu at startup",
|
|
3285
|
+
},
|
|
3286
|
+
},
|
|
3287
|
+
|
|
3288
|
+
"telegram.presets": {
|
|
3289
|
+
type: "string",
|
|
3290
|
+
default: undefined,
|
|
3291
|
+
ui: {
|
|
3292
|
+
tab: "integrations",
|
|
3293
|
+
label: "Session Presets",
|
|
3294
|
+
description: "JSON array of {id, workdir, sessionCommand, taskTemplate?, taskMaxLen?}",
|
|
3295
|
+
},
|
|
3296
|
+
},
|
|
3297
|
+
|
|
3298
|
+
"telegram.rpcSocket": {
|
|
3299
|
+
type: "string",
|
|
3300
|
+
default: undefined,
|
|
3301
|
+
ui: {
|
|
3302
|
+
tab: "integrations",
|
|
3303
|
+
label: "RPC Socket",
|
|
3304
|
+
description: "Path to the skc launch --output rpc UNIX socket (RPC backend only)",
|
|
3305
|
+
},
|
|
3306
|
+
},
|
|
3307
|
+
|
|
3308
|
+
"telegram.stateDir": {
|
|
3309
|
+
type: "string",
|
|
3310
|
+
default: undefined,
|
|
3311
|
+
ui: {
|
|
3312
|
+
tab: "integrations",
|
|
3313
|
+
label: "State Directory",
|
|
3314
|
+
description: "Gateway state dir for reconnect/resync (required for RPC backend)",
|
|
3315
|
+
},
|
|
3316
|
+
},
|
|
3317
|
+
|
|
3318
|
+
// Telegram advanced — hidden from UI, editable via config.yml
|
|
3319
|
+
"telegram.pollTimeoutSec": { type: "number", default: 30 },
|
|
3320
|
+
"telegram.apiBase": { type: "string", default: undefined },
|
|
3321
|
+
"telegram.coordinatorCommand": { type: "string", default: "skc" },
|
|
3322
|
+
"telegram.coordinatorArgs": { type: "string", default: "mcp-serve,coordinator" },
|
|
3323
|
+
"telegram.enableEditMessageText": { type: "boolean", default: false },
|
|
3324
|
+
"telegram.richCallbackTtlMs": { type: "number", default: 600000 },
|
|
3325
|
+
"telegram.richCallbackMaxTokens": { type: "number", default: 500 },
|
|
3326
|
+
"telegram.defaultTaskMaxLen": { type: "number", default: 2000 },
|
|
3327
|
+
"telegram.livenessMs": { type: "number", default: 60000 },
|
|
3328
|
+
"telegram.followTtlMs": { type: "number", default: 86400000 },
|
|
3329
|
+
"telegram.subscriptionsMax": { type: "number", default: 1000 },
|
|
3330
|
+
"telegram.longPollMs": { type: "number", default: 25000 },
|
|
3331
|
+
"telegram.digestThreshold": { type: "number", default: 5 },
|
|
3332
|
+
"telegram.allowAttachSocketArg": { type: "boolean", default: false },
|
|
3112
3333
|
} as const;
|
|
3113
3334
|
|
|
3114
3335
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -3276,6 +3497,7 @@ export interface ExaSettings {
|
|
|
3276
3497
|
export interface StatusLineSettings {
|
|
3277
3498
|
preset: StatusLinePreset;
|
|
3278
3499
|
separator: StatusLineSeparatorStyle;
|
|
3500
|
+
maxRows: number;
|
|
3279
3501
|
showHookStatus: boolean;
|
|
3280
3502
|
showSkillHud: boolean;
|
|
3281
3503
|
leftSegments: StatusLineSegmentId[];
|
|
@@ -3336,6 +3558,35 @@ export interface NotificationsSettings {
|
|
|
3336
3558
|
};
|
|
3337
3559
|
}
|
|
3338
3560
|
|
|
3561
|
+
export interface TelegramSettings {
|
|
3562
|
+
enabled: boolean;
|
|
3563
|
+
botToken: string | undefined;
|
|
3564
|
+
allowedUserIds: string | undefined;
|
|
3565
|
+
allowedChatIds: string | undefined;
|
|
3566
|
+
backend: "coordinator" | "rpc";
|
|
3567
|
+
enableStop: boolean;
|
|
3568
|
+
enableRich: boolean;
|
|
3569
|
+
enablePush: boolean;
|
|
3570
|
+
registerCommands: boolean;
|
|
3571
|
+
presets: string | undefined;
|
|
3572
|
+
rpcSocket: string | undefined;
|
|
3573
|
+
stateDir: string | undefined;
|
|
3574
|
+
pollTimeoutSec: number;
|
|
3575
|
+
apiBase: string | undefined;
|
|
3576
|
+
coordinatorCommand: string;
|
|
3577
|
+
coordinatorArgs: string;
|
|
3578
|
+
enableEditMessageText: boolean;
|
|
3579
|
+
richCallbackTtlMs: number;
|
|
3580
|
+
richCallbackMaxTokens: number;
|
|
3581
|
+
defaultTaskMaxLen: number;
|
|
3582
|
+
livenessMs: number;
|
|
3583
|
+
followTtlMs: number;
|
|
3584
|
+
subscriptionsMax: number;
|
|
3585
|
+
longPollMs: number;
|
|
3586
|
+
digestThreshold: number;
|
|
3587
|
+
allowAttachSocketArg: boolean;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3339
3590
|
/** Map group prefix -> typed settings interface */
|
|
3340
3591
|
export interface GroupTypeMap {
|
|
3341
3592
|
compaction: CompactionSettings;
|
|
@@ -3354,6 +3605,7 @@ export interface GroupTypeMap {
|
|
|
3354
3605
|
modelTags: ModelTagsSettings;
|
|
3355
3606
|
cycleOrder: string[];
|
|
3356
3607
|
shellMinimizer: ShellMinimizerSettings;
|
|
3608
|
+
telegram: TelegramSettings;
|
|
3357
3609
|
notifications: NotificationsSettings;
|
|
3358
3610
|
}
|
|
3359
3611
|
|
package/src/config/settings.ts
CHANGED
|
@@ -298,6 +298,17 @@ export class Settings {
|
|
|
298
298
|
return getDefault(path);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Get a setting value from the user/global config only.
|
|
303
|
+
*
|
|
304
|
+
* Use for machine-local command hooks and other settings that must not be
|
|
305
|
+
* activated by project-scoped config files.
|
|
306
|
+
*/
|
|
307
|
+
getGlobal<P extends SettingPath>(path: P): SettingValue<P> | undefined {
|
|
308
|
+
const value = getByPath(this.#global, path.split("."));
|
|
309
|
+
return value === undefined ? undefined : (value as SettingValue<P>);
|
|
310
|
+
}
|
|
311
|
+
|
|
301
312
|
/** Check whether a setting is present in loaded settings/overrides rather than coming from schema defaults. */
|
|
302
313
|
has(path: SettingPath): boolean {
|
|
303
314
|
return getByPath(this.#merged, path.split(".")) !== undefined;
|