@sayknow-cli/coding-agent 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/cli/notify-cli.d.ts +2 -0
- package/dist/types/config/settings-schema.d.ts +98 -3
- package/dist/types/defaults/skc-defaults.d.ts +2 -13
- package/dist/types/extensibility/shared-events.d.ts +1 -0
- package/dist/types/i18n/messages/en.d.ts +1 -0
- package/dist/types/lsp/types.d.ts +2 -0
- package/dist/types/modes/components/settings-defs.d.ts +1 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/notifications/attachment-registry.d.ts +17 -0
- package/dist/types/notifications/chat-adapters.d.ts +9 -0
- package/dist/types/notifications/config.d.ts +9 -1
- package/dist/types/notifications/engine.d.ts +59 -0
- package/dist/types/notifications/managed-daemon.d.ts +48 -0
- package/dist/types/notifications/telegram-daemon.d.ts +19 -0
- package/dist/types/notifications/threaded-inbound.d.ts +19 -0
- package/dist/types/notifications/threaded-render.d.ts +6 -1
- package/dist/types/session/agent-session.d.ts +2 -0
- package/dist/types/skc-runtime/ralplan-runtime.d.ts +1 -1
- package/dist/types/tools/fetch.d.ts +23 -0
- package/dist/types/tools/index.d.ts +1 -0
- package/dist/types/tools/telegram-send.d.ts +32 -0
- package/dist/types/web/insane/bridge.d.ts +103 -0
- package/dist/types/web/insane/url-guard.d.ts +22 -0
- package/dist/types/web/search/provider.d.ts +18 -1
- package/dist/types/web/search/providers/insane.d.ts +53 -0
- package/dist/types/web/search/providers/text-citations.d.ts +23 -0
- package/dist/types/web/search/types.d.ts +12 -4
- package/package.json +10 -8
- package/scripts/verify-insane-vendor.ts +132 -0
- package/src/cli/args.ts +1 -1
- package/src/cli/fast-help.ts +1 -1
- package/src/cli/notify-cli.ts +152 -5
- package/src/commands/team.ts +1 -1
- package/src/config/settings-schema.ts +119 -5
- package/src/defaults/skc/skills/ralplan/SKILL.md +11 -4
- package/src/defaults/skc-defaults.ts +2 -27
- package/src/extensibility/shared-events.ts +1 -0
- 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.ts +1 -0
- package/src/i18n/messages/ko.ts +1 -0
- package/src/i18n/messages/zh.ts +1 -0
- package/src/internal-urls/docs-index.generated.ts +9 -9
- package/src/lsp/config.ts +16 -3
- package/src/lsp/defaults.json +7 -0
- package/src/lsp/types.ts +2 -0
- package/src/modes/components/settings-defs.ts +2 -1
- package/src/modes/components/settings-selector.ts +7 -2
- package/src/modes/controllers/event-controller.ts +15 -0
- package/src/modes/interactive-mode.ts +46 -2
- package/src/modes/theme/theme.ts +4 -0
- package/src/modes/utils/context-usage.ts +2 -2
- package/src/notifications/attachment-registry.ts +23 -0
- package/src/notifications/chat-adapters.ts +147 -0
- package/src/notifications/config.ts +23 -2
- package/src/notifications/engine.ts +100 -0
- package/src/notifications/index.ts +180 -38
- package/src/notifications/managed-daemon.ts +163 -0
- package/src/notifications/telegram-daemon.ts +235 -14
- package/src/notifications/threaded-inbound.ts +60 -4
- package/src/notifications/threaded-render.ts +20 -2
- package/src/session/agent-session.ts +82 -51
- package/src/skc-runtime/launch-tmux.ts +17 -3
- package/src/skc-runtime/ledger-event-renderer.ts +1 -0
- package/src/skc-runtime/ralplan-runtime.ts +2 -2
- package/src/skc-runtime/workflow-manifest.generated.json +29 -0
- package/src/skc-runtime/workflow-manifest.ts +7 -2
- package/src/tools/fetch.ts +78 -1
- package/src/tools/index.ts +3 -0
- package/src/tools/telegram-send.ts +137 -0
- package/src/web/insane/bridge.ts +350 -0
- package/src/web/insane/url-guard.ts +155 -0
- package/src/web/search/provider.ts +77 -18
- package/src/web/search/providers/anthropic.ts +70 -3
- package/src/web/search/providers/codex.ts +1 -119
- package/src/web/search/providers/gemini.ts +99 -0
- package/src/web/search/providers/insane.ts +551 -0
- package/src/web/search/providers/openai-compatible.ts +66 -32
- package/src/web/search/providers/text-citations.ts +111 -0
- package/src/web/search/types.ts +13 -2
- package/vendor/insane-search/LICENSE +21 -0
- package/vendor/insane-search/MANIFEST.json +24 -0
- package/vendor/insane-search/engine/__init__.py +23 -0
- package/vendor/insane-search/engine/__main__.py +128 -0
- package/vendor/insane-search/engine/bias_check.py +183 -0
- package/vendor/insane-search/engine/executor.py +254 -0
- package/vendor/insane-search/engine/fetch_chain.py +725 -0
- package/vendor/insane-search/engine/learning.py +175 -0
- package/vendor/insane-search/engine/phase0.py +214 -0
- package/vendor/insane-search/engine/safety.py +91 -0
- package/vendor/insane-search/engine/templates/package.json +11 -0
- package/vendor/insane-search/engine/templates/playwright_mobile_chrome.js +188 -0
- package/vendor/insane-search/engine/templates/playwright_real_chrome.js +243 -0
- package/vendor/insane-search/engine/tests/test_hardening.py +57 -0
- package/vendor/insane-search/engine/tests/test_smoke.py +152 -0
- package/vendor/insane-search/engine/tests/test_u1.py +200 -0
- package/vendor/insane-search/engine/tests/test_u4.py +131 -0
- package/vendor/insane-search/engine/tests/test_u5.py +163 -0
- package/vendor/insane-search/engine/tests/test_u7.py +124 -0
- package/vendor/insane-search/engine/transport.py +211 -0
- package/vendor/insane-search/engine/url_transforms.py +98 -0
- package/vendor/insane-search/engine/validators.py +331 -0
- package/vendor/insane-search/engine/waf_detector.py +214 -0
- package/vendor/insane-search/engine/waf_profiles.yaml +162 -0
|
@@ -17,6 +17,8 @@ export interface NotifyCommandDeps {
|
|
|
17
17
|
pollIntervalMs?: number;
|
|
18
18
|
setupChatId?: string;
|
|
19
19
|
setupRedact?: boolean;
|
|
20
|
+
setupInteractive?: boolean;
|
|
21
|
+
threadedModePrompt?: (message: string) => Promise<string>;
|
|
20
22
|
}
|
|
21
23
|
export declare function parseNotifyArgs(args: string[]): NotifyCommandArgs | undefined;
|
|
22
24
|
export declare function runNotifyCommand(cmd: NotifyCommandArgs, deps?: NotifyCommandDeps): Promise<void>;
|
|
@@ -10,7 +10,7 @@ import { type SkillDiscoverySettings } from "./skill-settings-defaults";
|
|
|
10
10
|
* settings.get("compaction.enabled") // => boolean
|
|
11
11
|
* settings.set("theme.dark", "red-octopus") // sync, saves in background
|
|
12
12
|
*/
|
|
13
|
-
export type SettingTab = "appearance" | "model" | "interaction" | "context" | "memory" | "editing" | "tools" | "tasks" | "providers";
|
|
13
|
+
export type SettingTab = "appearance" | "model" | "interaction" | "notifications" | "context" | "memory" | "editing" | "tools" | "tasks" | "providers";
|
|
14
14
|
/** Tab display metadata - icon is resolved via theme.symbol() */
|
|
15
15
|
export type TabMetadata = {
|
|
16
16
|
label: string;
|
|
@@ -56,10 +56,13 @@ interface UiString extends UiBase {
|
|
|
56
56
|
* - Omitted → renders as a free text input.
|
|
57
57
|
*/
|
|
58
58
|
options?: ReadonlyArray<SubmenuOption> | "runtime";
|
|
59
|
+
/** When true, the value is masked in the settings list display but edited in full. */
|
|
60
|
+
secret?: boolean;
|
|
59
61
|
}
|
|
60
62
|
/** Wide ui shape exposed to consumers that walk the schema generically. */
|
|
61
63
|
export type AnyUiMetadata = UiBase & {
|
|
62
64
|
options?: ReadonlyArray<SubmenuOption> | "runtime";
|
|
65
|
+
secret?: boolean;
|
|
63
66
|
};
|
|
64
67
|
interface BooleanDef {
|
|
65
68
|
type: "boolean";
|
|
@@ -121,23 +124,94 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
121
124
|
readonly "notifications.enabled": {
|
|
122
125
|
readonly type: "boolean";
|
|
123
126
|
readonly default: false;
|
|
127
|
+
readonly ui: {
|
|
128
|
+
readonly tab: "notifications";
|
|
129
|
+
readonly label: "Enabled";
|
|
130
|
+
readonly description: "Master switch for notifications. Requires at least one adapter (Telegram/Discord/Slack) configured with a token and a chat/channel to actually deliver.";
|
|
131
|
+
};
|
|
124
132
|
};
|
|
125
133
|
readonly "notifications.telegram.botToken": {
|
|
126
134
|
readonly type: "string";
|
|
127
135
|
readonly default: undefined;
|
|
136
|
+
readonly ui: {
|
|
137
|
+
readonly tab: "notifications";
|
|
138
|
+
readonly label: "Telegram bot token";
|
|
139
|
+
readonly description: "Telegram BotFather HTTP API token. Stored locally; shown masked.";
|
|
140
|
+
readonly secret: true;
|
|
141
|
+
};
|
|
128
142
|
};
|
|
129
143
|
readonly "notifications.telegram.chatId": {
|
|
130
144
|
readonly type: "string";
|
|
131
145
|
readonly default: undefined;
|
|
146
|
+
readonly ui: {
|
|
147
|
+
readonly tab: "notifications";
|
|
148
|
+
readonly label: "Telegram chat ID";
|
|
149
|
+
readonly description: "Target chat. For end-to-end per-session delivery this must be a forum-enabled supergroup the bot can manage; a private chat id is only enough for setup/status.";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly "notifications.discord.botToken": {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly default: undefined;
|
|
155
|
+
readonly ui: {
|
|
156
|
+
readonly tab: "notifications";
|
|
157
|
+
readonly label: "Discord bot token";
|
|
158
|
+
readonly description: "Discord bot token for the notifications adapter. Stored locally; shown masked.";
|
|
159
|
+
readonly secret: true;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly "notifications.discord.channelId": {
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
readonly default: undefined;
|
|
165
|
+
readonly ui: {
|
|
166
|
+
readonly tab: "notifications";
|
|
167
|
+
readonly label: "Discord channel ID";
|
|
168
|
+
readonly description: "Discord channel that receives notifications and routes replies back.";
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
readonly "notifications.slack.botToken": {
|
|
172
|
+
readonly type: "string";
|
|
173
|
+
readonly default: undefined;
|
|
174
|
+
readonly ui: {
|
|
175
|
+
readonly tab: "notifications";
|
|
176
|
+
readonly label: "Slack bot token";
|
|
177
|
+
readonly description: "Slack bot token for the notifications adapter. Stored locally; shown masked.";
|
|
178
|
+
readonly secret: true;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
readonly "notifications.slack.channelId": {
|
|
182
|
+
readonly type: "string";
|
|
183
|
+
readonly default: undefined;
|
|
184
|
+
readonly ui: {
|
|
185
|
+
readonly tab: "notifications";
|
|
186
|
+
readonly label: "Slack channel ID";
|
|
187
|
+
readonly description: "Slack channel that receives notifications and routes replies back.";
|
|
188
|
+
};
|
|
132
189
|
};
|
|
133
190
|
readonly "notifications.redact": {
|
|
134
191
|
readonly type: "boolean";
|
|
135
192
|
readonly default: false;
|
|
193
|
+
readonly ui: {
|
|
194
|
+
readonly tab: "notifications";
|
|
195
|
+
readonly label: "Redact";
|
|
196
|
+
readonly description: "Strip idle summaries and streamed content before remote delivery. Ask prompts are always sent so they remain answerable.";
|
|
197
|
+
};
|
|
136
198
|
};
|
|
137
199
|
readonly "notifications.verbosity": {
|
|
138
200
|
readonly type: "string";
|
|
139
201
|
readonly default: "lean";
|
|
140
202
|
readonly validate: (value: string) => value is "lean" | "verbose";
|
|
203
|
+
readonly ui: {
|
|
204
|
+
readonly tab: "notifications";
|
|
205
|
+
readonly label: "Verbosity";
|
|
206
|
+
readonly description: "How much session context to stream to Telegram.";
|
|
207
|
+
readonly options: readonly [{
|
|
208
|
+
readonly value: "lean";
|
|
209
|
+
readonly label: "Lean";
|
|
210
|
+
}, {
|
|
211
|
+
readonly value: "verbose";
|
|
212
|
+
readonly label: "Verbose";
|
|
213
|
+
}];
|
|
214
|
+
};
|
|
141
215
|
};
|
|
142
216
|
readonly "notifications.daemon.idleTimeoutMs": {
|
|
143
217
|
readonly type: "number";
|
|
@@ -2512,6 +2586,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2512
2586
|
readonly description: "Allow the read tool to fetch and process URLs";
|
|
2513
2587
|
};
|
|
2514
2588
|
};
|
|
2589
|
+
readonly "web.insaneFallback": {
|
|
2590
|
+
readonly type: "boolean";
|
|
2591
|
+
readonly default: false;
|
|
2592
|
+
readonly ui: {
|
|
2593
|
+
readonly tab: "tools";
|
|
2594
|
+
readonly label: "Insane Search Fallback";
|
|
2595
|
+
readonly description: "Opt in to the vendored insane-search escalation for blocked public URL reads (403/WAF/JS-gated). Off by default. Requires preinstalled python3 + curl_cffi (and node + playwright/stealth for the browser phase); changes network posture by enabling TLS/browser impersonation for public pages.";
|
|
2596
|
+
};
|
|
2597
|
+
};
|
|
2515
2598
|
readonly "github.enabled": {
|
|
2516
2599
|
readonly type: "boolean";
|
|
2517
2600
|
readonly default: false;
|
|
@@ -2561,7 +2644,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2561
2644
|
readonly type: "array";
|
|
2562
2645
|
readonly default: string[];
|
|
2563
2646
|
readonly items: {
|
|
2564
|
-
readonly enum: readonly ["duckduckgo", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"];
|
|
2647
|
+
readonly enum: readonly ["duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"];
|
|
2565
2648
|
};
|
|
2566
2649
|
readonly ui: {
|
|
2567
2650
|
readonly tab: "tools";
|
|
@@ -3164,7 +3247,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3164
3247
|
};
|
|
3165
3248
|
readonly "providers.webSearch": {
|
|
3166
3249
|
readonly type: "enum";
|
|
3167
|
-
readonly values: readonly ["auto", "duckduckgo", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
3250
|
+
readonly values: readonly ["auto", "duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
3168
3251
|
readonly default: "auto";
|
|
3169
3252
|
readonly ui: {
|
|
3170
3253
|
readonly tab: "providers";
|
|
@@ -3178,6 +3261,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3178
3261
|
readonly value: "duckduckgo";
|
|
3179
3262
|
readonly label: "DuckDuckGo";
|
|
3180
3263
|
readonly description: "Keyless default \u2014 no API key or OAuth required";
|
|
3264
|
+
}, {
|
|
3265
|
+
readonly value: "insane";
|
|
3266
|
+
readonly label: "Insane";
|
|
3267
|
+
readonly description: "Keyless safe public-route fallback inspired by upstream insane-search";
|
|
3181
3268
|
}, {
|
|
3182
3269
|
readonly value: "exa";
|
|
3183
3270
|
readonly label: "Exa";
|
|
@@ -3650,6 +3737,14 @@ export interface NotificationsSettings {
|
|
|
3650
3737
|
botToken: string | undefined;
|
|
3651
3738
|
chatId: string | undefined;
|
|
3652
3739
|
};
|
|
3740
|
+
discord: {
|
|
3741
|
+
botToken: string | undefined;
|
|
3742
|
+
channelId: string | undefined;
|
|
3743
|
+
};
|
|
3744
|
+
slack: {
|
|
3745
|
+
botToken: string | undefined;
|
|
3746
|
+
channelId: string | undefined;
|
|
3747
|
+
};
|
|
3653
3748
|
redact: boolean;
|
|
3654
3749
|
daemon: {
|
|
3655
3750
|
idleTimeoutMs: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_SKC_DEFINITION_NAMES: readonly ["deep-interview", "ralplan", "team", "ultragoal"];
|
|
2
2
|
export type DefaultSkcDefinitionName = (typeof DEFAULT_SKC_DEFINITION_NAMES)[number];
|
|
3
|
-
export type DefaultSkcDefinitionKind = "skill" | "skill-fragment"
|
|
3
|
+
export type DefaultSkcDefinitionKind = "skill" | "skill-fragment";
|
|
4
4
|
export type EmbeddedDefaultSkcSkill = {
|
|
5
5
|
name: DefaultSkcDefinitionName;
|
|
6
6
|
description: string;
|
|
@@ -23,13 +23,7 @@ export interface DefaultSkcSkillFragmentDefinition {
|
|
|
23
23
|
relativePath: string;
|
|
24
24
|
content: string;
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
kind: "rule";
|
|
28
|
-
name: string;
|
|
29
|
-
relativePath: string;
|
|
30
|
-
content: string;
|
|
31
|
-
}
|
|
32
|
-
export type DefaultSkcDefinition = DefaultSkcSkillDefinition | DefaultSkcSkillFragmentDefinition | DefaultSkcRuleDefinition;
|
|
26
|
+
export type DefaultSkcDefinition = DefaultSkcSkillDefinition | DefaultSkcSkillFragmentDefinition;
|
|
33
27
|
export interface InstallDefaultSkcDefinitionsOptions {
|
|
34
28
|
check?: boolean;
|
|
35
29
|
force?: boolean;
|
|
@@ -45,11 +39,6 @@ export type DefaultSkcDefinitionInstallFile = {
|
|
|
45
39
|
parentSkillName: DefaultSkcDefinitionName;
|
|
46
40
|
path: string;
|
|
47
41
|
status: DefaultSkcInstallStatus;
|
|
48
|
-
} | {
|
|
49
|
-
kind: "rule";
|
|
50
|
-
name: string;
|
|
51
|
-
path: string;
|
|
52
|
-
status: DefaultSkcInstallStatus;
|
|
53
42
|
};
|
|
54
43
|
export interface DefaultSkcDefinitionInstallResult {
|
|
55
44
|
targetRoot: string;
|
|
@@ -172,6 +172,7 @@ export interface AutoCompactionEndEvent {
|
|
|
172
172
|
errorMessage?: string;
|
|
173
173
|
/** True when compaction was skipped for a benign reason (no model, no candidates, nothing to compact). */
|
|
174
174
|
skipped?: boolean;
|
|
175
|
+
continuationSkipReason?: "auto_continue_disabled_non_resumable_tail";
|
|
175
176
|
}
|
|
176
177
|
/** Fired when auto-retry starts */
|
|
177
178
|
export interface AutoRetryStartEvent {
|
|
@@ -30,6 +30,7 @@ export declare const en: {
|
|
|
30
30
|
readonly "settings.tab.appearance": "Appearance";
|
|
31
31
|
readonly "settings.tab.model": "Model";
|
|
32
32
|
readonly "settings.tab.interaction": "Interaction";
|
|
33
|
+
readonly "settings.tab.notifications": "Notifications";
|
|
33
34
|
readonly "settings.tab.context": "Context";
|
|
34
35
|
readonly "settings.tab.memory": "Memory";
|
|
35
36
|
readonly "settings.tab.editing": "Editing";
|
|
@@ -224,6 +224,8 @@ export interface ServerConfig {
|
|
|
224
224
|
/** Per-server warmup timeout in milliseconds. Overrides the global WARMUP_TIMEOUT_MS for this server during startup. */
|
|
225
225
|
warmupTimeoutMs?: number;
|
|
226
226
|
capabilities?: ServerCapabilities;
|
|
227
|
+
/** Names of lower-precedence servers to drop when this server is available. */
|
|
228
|
+
supersedes?: string[];
|
|
227
229
|
/** If true, this is a linter/formatter server (e.g., Biome) - used only for diagnostics/actions, not type intelligence */
|
|
228
230
|
isLinter?: boolean;
|
|
229
231
|
/** Resolved absolute path to the command binary (set during config loading) */
|
|
@@ -37,6 +37,7 @@ export interface SubmenuSettingDef extends BaseSettingDef {
|
|
|
37
37
|
}
|
|
38
38
|
export interface TextInputSettingDef extends BaseSettingDef {
|
|
39
39
|
type: "text";
|
|
40
|
+
secret?: boolean;
|
|
40
41
|
}
|
|
41
42
|
export type SettingDef = BooleanSettingDef | EnumSettingDef | SubmenuSettingDef | TextInputSettingDef;
|
|
42
43
|
/** Get all setting definitions with UI */
|
|
@@ -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.notifications" | "tab.context" | "tab.editing" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers";
|
|
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,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process-wide registry mapping a session id to a sink that delivers a local
|
|
3
|
+
* file to the session's connected Telegram chat as a document. Registered by
|
|
4
|
+
* the notifications extension; consumed by the telegram_send tool.
|
|
5
|
+
*/
|
|
6
|
+
/** Delivers a local file to the session's Telegram chat. */
|
|
7
|
+
export type TelegramFileSink = (file: {
|
|
8
|
+
path: string;
|
|
9
|
+
caption?: string;
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
ok: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** Register `sink` for `sessionId`. Returns a disposer that clears it. */
|
|
15
|
+
export declare function registerTelegramFileSink(sessionId: string, sink: TelegramFileSink): () => void;
|
|
16
|
+
/** The Telegram file sink for `sessionId`, if one is registered. */
|
|
17
|
+
export declare function getTelegramFileSink(sessionId: string): TelegramFileSink | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationPresentationAdapter } from "./engine";
|
|
2
|
+
type AdapterKind = "discord" | "slack";
|
|
3
|
+
interface ChatAdapterOptions {
|
|
4
|
+
kind: AdapterKind;
|
|
5
|
+
channelId?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createDiscordAdapter(opts?: Omit<ChatAdapterOptions, "kind">): NotificationPresentationAdapter;
|
|
8
|
+
export declare function createSlackAdapter(opts?: Omit<ChatAdapterOptions, "kind">): NotificationPresentationAdapter;
|
|
9
|
+
export {};
|
|
@@ -3,13 +3,21 @@ export interface NotificationConfig {
|
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
botToken?: string;
|
|
5
5
|
chatId?: string;
|
|
6
|
+
discord: {
|
|
7
|
+
botToken?: string;
|
|
8
|
+
channelId?: string;
|
|
9
|
+
};
|
|
10
|
+
slack: {
|
|
11
|
+
botToken?: string;
|
|
12
|
+
channelId?: string;
|
|
13
|
+
};
|
|
6
14
|
redact: boolean;
|
|
7
15
|
verbosity: "lean" | "verbose";
|
|
8
16
|
idleTimeoutMs: number;
|
|
9
17
|
}
|
|
10
18
|
/** Read typed config from Settings. */
|
|
11
19
|
export declare function getNotificationConfig(settings: Settings): NotificationConfig;
|
|
12
|
-
/** Is global config sufficient for auto-on (enabled +
|
|
20
|
+
/** Is global config sufficient for auto-on (enabled + at least one configured adapter)? */
|
|
13
21
|
export declare function isGloballyConfigured(cfg: NotificationConfig): boolean;
|
|
14
22
|
/** Resolve whether the notifications extension should be registered at SDK startup. */
|
|
15
23
|
export declare function shouldRegisterNotificationsExtension(input: {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type RedactableAction } from "./config";
|
|
2
|
+
export type NotificationEvent = ({
|
|
3
|
+
type: "action_needed";
|
|
4
|
+
} & RedactableAction) | {
|
|
5
|
+
type: "action_resolved";
|
|
6
|
+
id: string;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
resolvedBy?: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: "frame";
|
|
11
|
+
sessionId: string;
|
|
12
|
+
frame: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
export interface NotificationReplyRoute {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
actionId: string;
|
|
17
|
+
answer: number | string | {
|
|
18
|
+
selected?: Array<number | string>;
|
|
19
|
+
custom?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface NotificationAdapterPayload {
|
|
23
|
+
adapter: string;
|
|
24
|
+
channelKey?: string;
|
|
25
|
+
body: unknown;
|
|
26
|
+
route?: Omit<NotificationReplyRoute, "answer">;
|
|
27
|
+
}
|
|
28
|
+
export interface NotificationPresentationAdapter {
|
|
29
|
+
readonly kind: "telegram" | "discord" | "slack";
|
|
30
|
+
render(event: NotificationEvent): NotificationAdapterPayload[];
|
|
31
|
+
mapInbound(input: unknown): NotificationReplyRoute | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface EngineSessionSink {
|
|
34
|
+
sendReply(route: NotificationReplyRoute): void;
|
|
35
|
+
}
|
|
36
|
+
export interface NotificationEngineOptions {
|
|
37
|
+
redact: boolean;
|
|
38
|
+
sessionTag: (sessionId: string) => string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Shared presentation engine for managed notification clients.
|
|
42
|
+
*
|
|
43
|
+
* It owns fanout, redaction boundaries, pending-action routing, and reply
|
|
44
|
+
* delivery into session sinks. Transport adapters stay pure: render an internal
|
|
45
|
+
* event into a public-safe payload and map an inbound transport interaction
|
|
46
|
+
* back into a session/action answer.
|
|
47
|
+
*/
|
|
48
|
+
export declare class NotificationPresentationEngine {
|
|
49
|
+
private readonly opts;
|
|
50
|
+
readonly adapters: readonly NotificationPresentationAdapter[];
|
|
51
|
+
private readonly sessions;
|
|
52
|
+
private readonly pending;
|
|
53
|
+
constructor(adapters: readonly NotificationPresentationAdapter[], opts: NotificationEngineOptions);
|
|
54
|
+
connectSession(sessionId: string, sink: EngineSessionSink): void;
|
|
55
|
+
dropSession(sessionId: string): void;
|
|
56
|
+
fanout(event: NotificationEvent): NotificationAdapterPayload[];
|
|
57
|
+
routeInbound(adapterKind: NotificationPresentationAdapter["kind"], input: unknown): boolean;
|
|
58
|
+
private redactEvent;
|
|
59
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Settings } from "../config/settings";
|
|
2
|
+
import { RateLimitPool } from "./rate-limit-pool";
|
|
3
|
+
import { type ThreadedSend } from "./threaded-render";
|
|
4
|
+
export interface ManagedNotificationDaemonFs {
|
|
5
|
+
readdir(path: string): Promise<string[]>;
|
|
6
|
+
}
|
|
7
|
+
export interface ManagedSessionSocket {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
token: string;
|
|
10
|
+
ws: WebSocket;
|
|
11
|
+
pending: Map<string, {
|
|
12
|
+
sessionId: string;
|
|
13
|
+
actionId: string;
|
|
14
|
+
}>;
|
|
15
|
+
capable: boolean;
|
|
16
|
+
lastPongAt: number;
|
|
17
|
+
awaitingNonce: string | undefined;
|
|
18
|
+
pingTimer: ReturnType<typeof setInterval> | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface ManagedNotificationDaemonOptions {
|
|
21
|
+
settings: Settings;
|
|
22
|
+
fs: ManagedNotificationDaemonFs;
|
|
23
|
+
WebSocketImpl?: typeof WebSocket;
|
|
24
|
+
now?: () => number;
|
|
25
|
+
setIntervalImpl?: typeof setInterval;
|
|
26
|
+
clearIntervalImpl?: typeof clearInterval;
|
|
27
|
+
rateLimitPool?: RateLimitPool<{
|
|
28
|
+
send: ThreadedSend;
|
|
29
|
+
topicId?: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export declare abstract class ManagedNotificationDaemon {
|
|
33
|
+
protected readonly opts: ManagedNotificationDaemonOptions;
|
|
34
|
+
readonly sessions: Map<string, ManagedSessionSocket>;
|
|
35
|
+
readonly pool: RateLimitPool<{
|
|
36
|
+
send: ThreadedSend;
|
|
37
|
+
topicId?: string;
|
|
38
|
+
}>;
|
|
39
|
+
protected constructor(opts: ManagedNotificationDaemonOptions);
|
|
40
|
+
scanRoots(): Promise<void>;
|
|
41
|
+
connectSession(sessionId: string, url: string, token: string): ManagedSessionSocket;
|
|
42
|
+
protected handleSessionMessage(session: ManagedSessionSocket, msg: Record<string, unknown>): Promise<boolean>;
|
|
43
|
+
protected renderFrame(frame: Record<string, unknown>): ThreadedSend | undefined;
|
|
44
|
+
protected dropSession(session: ManagedSessionSocket): void;
|
|
45
|
+
protected abstract readRoots(): Promise<string[]>;
|
|
46
|
+
private sendHello;
|
|
47
|
+
private startLiveness;
|
|
48
|
+
}
|
|
@@ -206,6 +206,12 @@ export declare class TelegramNotificationDaemon {
|
|
|
206
206
|
private readonly topics;
|
|
207
207
|
private readonly pool;
|
|
208
208
|
private readonly seenUpdateIds;
|
|
209
|
+
/** True once the daemon has nudged the user to enable Threaded Mode. */
|
|
210
|
+
private threadedFallbackNoticeSent;
|
|
211
|
+
/** Sessions whose identity header was already sent flat (Threaded Mode off). */
|
|
212
|
+
private readonly flatIdentitySent;
|
|
213
|
+
/** Cached result of whether the paired chat is a private chat (flat-fallback gate). */
|
|
214
|
+
private pairedChatPrivate;
|
|
209
215
|
private flushTimer;
|
|
210
216
|
private scanTimer;
|
|
211
217
|
private scanning;
|
|
@@ -251,7 +257,20 @@ export declare class TelegramNotificationDaemon {
|
|
|
251
257
|
private ensureTopic;
|
|
252
258
|
private persistTopics;
|
|
253
259
|
loadTopics(): Promise<void>;
|
|
260
|
+
private downloadTelegramFile;
|
|
261
|
+
/**
|
|
262
|
+
* Per-session private temp directories (mode 0700) holding inbound non-image
|
|
263
|
+
* attachments. Keyed by session id and reused across transient reconnects;
|
|
264
|
+
* removed when the daemon stops (see {@link cleanupAllAttachmentDirs}).
|
|
265
|
+
*/
|
|
266
|
+
private readonly attachmentDirs;
|
|
267
|
+
private ensureAttachmentDir;
|
|
268
|
+
private cleanupAllAttachmentDirs;
|
|
269
|
+
private resolveInboundAttachment;
|
|
254
270
|
private flushPool;
|
|
271
|
+
private deliverFlatFallback;
|
|
272
|
+
private pairedChatIsPrivate;
|
|
273
|
+
private notifyThreadedFallback;
|
|
255
274
|
private startFlushTimer;
|
|
256
275
|
private stopFlushTimer;
|
|
257
276
|
private runScan;
|
|
@@ -20,12 +20,30 @@ export interface InboundUpdate {
|
|
|
20
20
|
message?: {
|
|
21
21
|
message_id?: unknown;
|
|
22
22
|
text?: unknown;
|
|
23
|
+
caption?: unknown;
|
|
24
|
+
photo?: unknown;
|
|
25
|
+
document?: unknown;
|
|
26
|
+
video?: unknown;
|
|
27
|
+
audio?: unknown;
|
|
28
|
+
voice?: unknown;
|
|
29
|
+
animation?: unknown;
|
|
23
30
|
chat?: {
|
|
24
31
|
id?: unknown;
|
|
25
32
|
};
|
|
26
33
|
message_thread_id?: unknown;
|
|
27
34
|
};
|
|
28
35
|
}
|
|
36
|
+
/** A downloadable media attachment referenced by an inbound message. */
|
|
37
|
+
export interface InboundAttachment {
|
|
38
|
+
/** Telegram file_id to resolve via getFile. */
|
|
39
|
+
fileId: string;
|
|
40
|
+
/** Source media kind; "photo" is always an image. */
|
|
41
|
+
kind: "photo" | "document" | "video" | "audio" | "voice" | "animation";
|
|
42
|
+
/** MIME type when Telegram provides one. */
|
|
43
|
+
mime?: string;
|
|
44
|
+
/** Original file name when provided. */
|
|
45
|
+
fileName?: string;
|
|
46
|
+
}
|
|
29
47
|
/** Context for {@link decideThreadedInbound}. All lookups are injected. */
|
|
30
48
|
export interface ThreadedInboundCtx {
|
|
31
49
|
/** The single paired chat id (string-compared). */
|
|
@@ -43,6 +61,7 @@ export type ThreadedInboundDecision = {
|
|
|
43
61
|
updateId: number;
|
|
44
62
|
threadId: string;
|
|
45
63
|
messageId?: number;
|
|
64
|
+
attachment?: InboundAttachment;
|
|
46
65
|
} | {
|
|
47
66
|
kind: "duplicate";
|
|
48
67
|
updateId: number;
|
|
@@ -11,15 +11,19 @@
|
|
|
11
11
|
import type { RateLimitLane } from "./rate-limit-pool";
|
|
12
12
|
/** A Telegram send derived from a threaded frame (topic id is applied by the daemon). */
|
|
13
13
|
export interface ThreadedSend {
|
|
14
|
-
method: "sendMessage" | "sendPhoto";
|
|
14
|
+
method: "sendMessage" | "sendPhoto" | "sendDocument";
|
|
15
15
|
/** Rate-limit lane for prioritisation/fairness. */
|
|
16
16
|
lane: RateLimitLane;
|
|
17
17
|
/** Message text (sendMessage) or photo caption (sendPhoto). */
|
|
18
18
|
text?: string;
|
|
19
19
|
/** Base64 image bytes for sendPhoto. */
|
|
20
20
|
photoBase64?: string;
|
|
21
|
+
/** Base64 file bytes for sendDocument. */
|
|
22
|
+
documentBase64?: string;
|
|
21
23
|
/** Image MIME type for sendPhoto. */
|
|
22
24
|
mime?: string;
|
|
25
|
+
/** Suggested document filename. */
|
|
26
|
+
fileName?: string;
|
|
23
27
|
/** Coalesce key for live edits (same key collapses to the latest). */
|
|
24
28
|
coalesceKey?: string;
|
|
25
29
|
/** True for the one-time identity header (the daemon pins it once). */
|
|
@@ -45,6 +49,7 @@ interface ThreadedFrame {
|
|
|
45
49
|
data?: unknown;
|
|
46
50
|
mime?: unknown;
|
|
47
51
|
caption?: unknown;
|
|
52
|
+
name?: unknown;
|
|
48
53
|
verbosity?: unknown;
|
|
49
54
|
redact?: unknown;
|
|
50
55
|
}
|
|
@@ -81,6 +81,7 @@ import type { BranchSummaryEntry, NewSessionOptions, SessionContext, SessionMana
|
|
|
81
81
|
import { ToolChoiceQueue } from "./tool-choice-queue";
|
|
82
82
|
import { YieldQueue } from "./yield-queue";
|
|
83
83
|
/** Session-specific events that extend the core AgentEvent */
|
|
84
|
+
export type AutoCompactionContinuationSkipReason = "auto_continue_disabled_non_resumable_tail";
|
|
84
85
|
export type AgentSessionEvent = AgentEvent | {
|
|
85
86
|
type: "auto_compaction_start";
|
|
86
87
|
reason: "threshold" | "overflow" | "idle";
|
|
@@ -94,6 +95,7 @@ export type AgentSessionEvent = AgentEvent | {
|
|
|
94
95
|
errorMessage?: string;
|
|
95
96
|
/** True when compaction was skipped for a benign reason (no model, no candidates, nothing to compact). */
|
|
96
97
|
skipped?: boolean;
|
|
98
|
+
continuationSkipReason?: AutoCompactionContinuationSkipReason;
|
|
97
99
|
} | {
|
|
98
100
|
type: "auto_retry_start";
|
|
99
101
|
attempt: number;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* 2. **Artifact write**: `skc ralplan --write --stage <type> --stage_n <N> --artifact
|
|
14
14
|
* <path-or-string> [--run-id <id>] [--session-id <id>] [--json]` persists Planner / Architect
|
|
15
|
-
* / Critic / revision / ADR / final markdown under `.skc/plans/ralplan/<run-id>/`, maintains
|
|
15
|
+
* / Critic / revision / post-interview / ADR / final markdown under `.skc/plans/ralplan/<run-id>/`, maintains
|
|
16
16
|
* an `index.jsonl` audit log, copies `final` stages to `pending-approval.md`, and advances
|
|
17
17
|
* the HUD chip to reflect the latest persisted stage.
|
|
18
18
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { AgentToolResult } from "@sayknow-cli/agent-core";
|
|
2
2
|
import { type Component } from "@sayknow-cli/tui";
|
|
3
|
+
import type { Settings } from "../config/settings";
|
|
3
4
|
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
|
4
5
|
import { type Theme } from "../modes/theme/theme";
|
|
5
6
|
import type { ToolSession } from "../sdk";
|
|
7
|
+
import type { RenderResult } from "../web/scrapers/types";
|
|
6
8
|
import { type OutputMeta } from "./output-meta";
|
|
7
9
|
export declare function isReadableUrlPath(value: string): boolean;
|
|
8
10
|
export interface ParsedReadUrlTarget {
|
|
@@ -16,6 +18,27 @@ interface FetchImagePayload {
|
|
|
16
18
|
data: string;
|
|
17
19
|
mimeType: string;
|
|
18
20
|
}
|
|
21
|
+
type FetchRenderResult = RenderResult & {
|
|
22
|
+
image?: FetchImagePayload;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Opt-in insane-search fallback for blocked / degraded public URL reads.
|
|
26
|
+
*
|
|
27
|
+
* Returns a finalized `method: "insane"` result on success, or null (so the
|
|
28
|
+
* caller continues with its normal degraded behavior). Fail-closed: no note,
|
|
29
|
+
* guard DNS, dependency probe, or subprocess when raw mode or the opt-in
|
|
30
|
+
* setting is off. The public-URL guard runs BEFORE any probe/spawn.
|
|
31
|
+
*/
|
|
32
|
+
export declare function tryInsaneFallback(args: {
|
|
33
|
+
url: string;
|
|
34
|
+
finalUrl: string;
|
|
35
|
+
timeout: number;
|
|
36
|
+
raw: boolean;
|
|
37
|
+
settings: Settings;
|
|
38
|
+
signal: AbortSignal | undefined;
|
|
39
|
+
fetchedAt: string;
|
|
40
|
+
notes: string[];
|
|
41
|
+
}): Promise<FetchRenderResult | null>;
|
|
19
42
|
export interface ReadUrlToolDetails {
|
|
20
43
|
kind: "url";
|
|
21
44
|
url: string;
|