@sayknow-cli/coding-agent 0.3.0 → 0.3.2
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/bin/skc.js +4 -0
- package/dist/types/cli/mcp-cli.d.ts +25 -0
- package/dist/types/cli/notify-cli.d.ts +2 -0
- package/dist/types/cli/plugin-cli.d.ts +2 -0
- package/dist/types/cli.d.ts +6 -0
- package/dist/types/commands/mcp.d.ts +70 -0
- package/dist/types/commands/plugin.d.ts +6 -0
- package/dist/types/commands/session.d.ts +6 -0
- package/dist/types/config/keybindings.d.ts +2 -2
- package/dist/types/config/model-profile-activation.d.ts +8 -1
- package/dist/types/config/settings-schema.d.ts +39 -2
- package/dist/types/deep-interview/plaintext-gate-guard.d.ts +11 -0
- package/dist/types/defaults/skc-defaults.d.ts +2 -13
- package/dist/types/extensibility/shared-events.d.ts +1 -0
- package/dist/types/extensibility/skc-plugins/compiler.d.ts +19 -0
- package/dist/types/extensibility/skc-plugins/constrained-hooks.d.ts +29 -0
- package/dist/types/extensibility/skc-plugins/index.d.ts +9 -0
- package/dist/types/extensibility/skc-plugins/injection.d.ts +9 -0
- package/dist/types/extensibility/skc-plugins/installer.d.ts +13 -0
- package/dist/types/extensibility/skc-plugins/mcp-policy.d.ts +26 -0
- package/dist/types/extensibility/skc-plugins/observability.d.ts +27 -0
- package/dist/types/extensibility/skc-plugins/prompt-appendix.d.ts +16 -0
- package/dist/types/extensibility/skc-plugins/registry.d.ts +32 -0
- package/dist/types/extensibility/skc-plugins/runtime-adapters.d.ts +64 -0
- package/dist/types/extensibility/skc-plugins/session-validation.d.ts +42 -0
- package/dist/types/extensibility/skc-plugins/types.d.ts +158 -2
- package/dist/types/extensibility/skc-plugins/validation.d.ts +8 -1
- package/dist/types/lsp/types.d.ts +2 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +8 -0
- package/dist/types/modes/components/status-line/git-utils.d.ts +6 -0
- package/dist/types/modes/theme/defaults/index.d.ts +99 -0
- 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/html-format.d.ts +11 -0
- package/dist/types/notifications/index.d.ts +149 -1
- package/dist/types/notifications/lifecycle-commands.d.ts +60 -0
- package/dist/types/notifications/lifecycle-control-runtime.d.ts +98 -0
- package/dist/types/notifications/lifecycle-orchestrator.d.ts +144 -0
- package/dist/types/notifications/managed-daemon.d.ts +48 -0
- package/dist/types/notifications/operator-runtime.d.ts +52 -0
- package/dist/types/notifications/rate-limit-pool.d.ts +2 -0
- package/dist/types/notifications/recent-activity.d.ts +35 -0
- package/dist/types/notifications/telegram-daemon.d.ts +133 -16
- package/dist/types/notifications/telegram-reference.d.ts +3 -1
- package/dist/types/notifications/threaded-inbound.d.ts +19 -0
- package/dist/types/notifications/threaded-render.d.ts +6 -1
- package/dist/types/notifications/topic-registry.d.ts +12 -9
- package/dist/types/runtime-mcp/types.d.ts +7 -0
- package/dist/types/sdk.d.ts +2 -0
- package/dist/types/session/agent-session.d.ts +16 -4
- package/dist/types/session/blob-store.d.ts +25 -0
- package/dist/types/session/session-manager.d.ts +57 -0
- package/dist/types/skc-runtime/launch-tmux.d.ts +1 -0
- package/dist/types/skc-runtime/psmux-detect.d.ts +78 -0
- package/dist/types/skc-runtime/ralplan-runtime.d.ts +1 -1
- package/dist/types/skc-runtime/team-runtime.d.ts +2 -0
- package/dist/types/skc-runtime/tmux-common.d.ts +30 -2
- package/dist/types/skc-runtime/tmux-sessions.d.ts +18 -0
- package/dist/types/slash-commands/helpers/fast-status-report.d.ts +6 -0
- package/dist/types/system-prompt.d.ts +2 -0
- package/dist/types/task/executor.d.ts +9 -1
- package/dist/types/tools/composer-bash-policy.d.ts +14 -0
- package/dist/types/tools/fetch.d.ts +23 -0
- package/dist/types/tools/index.d.ts +4 -1
- package/dist/types/tools/telegram-send.d.ts +32 -0
- package/dist/types/utils/changelog.d.ts +1 -0
- package/dist/types/web/insane/bridge.d.ts +103 -0
- package/dist/types/web/insane/url-guard.d.ts +25 -0
- package/dist/types/web/scrapers/types.d.ts +5 -0
- package/dist/types/web/scrapers/utils.d.ts +7 -1
- 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 +14 -10
- package/scripts/g004-tmux-smoke.ts +100 -0
- package/scripts/g005-daemon-smoke.ts +180 -0
- package/scripts/g011-daemon-path-smoke.ts +153 -0
- package/scripts/verify-insane-vendor.ts +132 -0
- package/src/cli/args.ts +1 -1
- package/src/cli/fast-help.ts +30 -2
- package/src/cli/mcp-cli.ts +272 -0
- package/src/cli/notify-cli.ts +152 -5
- package/src/cli/plugin-cli.ts +66 -3
- package/src/cli.ts +30 -12
- package/src/commands/mcp.ts +117 -0
- package/src/commands/plugin.ts +4 -0
- package/src/commands/session.ts +18 -0
- package/src/commands/team.ts +1 -1
- package/src/config/keybindings.ts +2 -2
- package/src/config/model-profile-activation.ts +55 -7
- package/src/config/settings-schema.ts +30 -1
- package/src/deep-interview/plaintext-gate-guard.ts +94 -0
- package/src/defaults/skc/extensions/grok-cli-vendor/biome.json +1 -1
- package/src/defaults/skc/skills/deep-interview/SKILL.md +7 -6
- package/src/defaults/skc/skills/ralplan/SKILL.md +11 -4
- package/src/defaults/skc/skills/team/SKILL.md +5 -3
- package/src/defaults/skc/skills/ultragoal/SKILL.md +41 -13
- package/src/defaults/skc-defaults.ts +2 -27
- package/src/export/html/index.ts +2 -2
- package/src/extensibility/extensions/runner.ts +1 -0
- package/src/extensibility/shared-events.ts +1 -0
- package/src/extensibility/skc-plugins/compiler.ts +351 -0
- package/src/extensibility/skc-plugins/constrained-hooks.ts +170 -0
- package/src/extensibility/skc-plugins/index.ts +9 -0
- package/src/extensibility/skc-plugins/injection.ts +109 -0
- package/src/extensibility/skc-plugins/installer.ts +434 -0
- package/src/extensibility/skc-plugins/loader.ts +3 -1
- package/src/extensibility/skc-plugins/mcp-policy.ts +239 -0
- package/src/extensibility/skc-plugins/observability.ts +84 -0
- package/src/extensibility/skc-plugins/paths.ts +1 -1
- package/src/extensibility/skc-plugins/prompt-appendix.ts +109 -0
- package/src/extensibility/skc-plugins/registry.ts +180 -0
- package/src/extensibility/skc-plugins/runtime-adapters.ts +234 -0
- package/src/extensibility/skc-plugins/schema.ts +250 -20
- package/src/extensibility/skc-plugins/session-validation.ts +147 -0
- package/src/extensibility/skc-plugins/types.ts +199 -3
- package/src/extensibility/skc-plugins/validation.ts +80 -0
- package/src/extensibility/skills.ts +15 -0
- package/src/hooks/skill-state.ts +57 -0
- package/src/internal-urls/docs-index.generated.ts +17 -13
- package/src/lsp/config.ts +16 -3
- package/src/lsp/defaults.json +7 -0
- package/src/lsp/types.ts +2 -0
- package/src/main.ts +14 -3
- package/src/modes/bridge/bridge-mode.ts +11 -0
- package/src/modes/components/assistant-message.ts +49 -1
- package/src/modes/components/custom-editor.ts +2 -0
- package/src/modes/components/footer.ts +2 -3
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-selector.ts +67 -43
- package/src/modes/components/model-selector.ts +56 -11
- package/src/modes/components/status-line/git-utils.ts +25 -0
- package/src/modes/components/status-line.ts +10 -11
- package/src/modes/components/welcome.ts +2 -3
- package/src/modes/controllers/event-controller.ts +15 -0
- package/src/modes/controllers/extension-ui-controller.ts +0 -27
- package/src/modes/controllers/selector-controller.ts +53 -11
- package/src/modes/interactive-mode.ts +50 -3
- package/src/modes/shared/agent-wire/scopes.ts +1 -1
- package/src/modes/theme/defaults/gruvbox-dark.json +99 -0
- package/src/modes/theme/defaults/index.ts +2 -0
- package/src/modes/utils/context-usage.ts +2 -2
- package/src/modes/utils/hotkeys-markdown.ts +1 -1
- 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/html-format.ts +38 -0
- package/src/notifications/index.ts +417 -45
- package/src/notifications/lifecycle-commands.ts +238 -0
- package/src/notifications/lifecycle-control-runtime.ts +405 -0
- package/src/notifications/lifecycle-orchestrator.ts +358 -0
- package/src/notifications/managed-daemon.ts +163 -0
- package/src/notifications/operator-runtime.ts +171 -0
- package/src/notifications/rate-limit-pool.ts +19 -0
- package/src/notifications/recent-activity.ts +132 -0
- package/src/notifications/telegram-daemon.ts +984 -242
- package/src/notifications/telegram-reference.ts +25 -7
- package/src/notifications/threaded-inbound.ts +60 -4
- package/src/notifications/threaded-render.ts +20 -2
- package/src/notifications/topic-registry.ts +23 -9
- package/src/prompts/agents/executor.md +2 -2
- package/src/runtime-mcp/transports/stdio.ts +38 -4
- package/src/runtime-mcp/types.ts +7 -0
- package/src/sdk.ts +157 -10
- package/src/session/agent-session.ts +248 -125
- package/src/session/blob-store.ts +196 -8
- package/src/session/session-manager.ts +762 -12
- package/src/skc-runtime/launch-tmux.ts +85 -22
- package/src/skc-runtime/ledger-event-renderer.ts +1 -0
- package/src/skc-runtime/psmux-detect.ts +239 -0
- package/src/skc-runtime/ralplan-runtime.ts +2 -2
- package/src/skc-runtime/team-runtime.ts +56 -23
- package/src/skc-runtime/tmux-common.ts +88 -4
- package/src/skc-runtime/tmux-sessions.ts +111 -9
- package/src/skc-runtime/ultragoal-guard.ts +25 -8
- package/src/skc-runtime/ultragoal-runtime.ts +75 -15
- package/src/skc-runtime/workflow-manifest.generated.json +29 -0
- package/src/skc-runtime/workflow-manifest.ts +7 -2
- package/src/slash-commands/builtin-registry.ts +23 -3
- package/src/slash-commands/helpers/fast-status-report.ts +13 -3
- package/src/slash-commands/helpers/parse.ts +2 -1
- package/src/system-prompt.ts +9 -0
- package/src/task/executor.ts +31 -7
- package/src/task/index.ts +2 -0
- package/src/tools/ask.ts +5 -1
- package/src/tools/bash.ts +9 -0
- package/src/tools/composer-bash-policy.ts +96 -0
- package/src/tools/fetch.ts +94 -1
- package/src/tools/index.ts +6 -1
- package/src/tools/telegram-send.ts +137 -0
- package/src/utils/changelog.ts +8 -0
- package/src/web/insane/bridge.ts +350 -0
- package/src/web/insane/url-guard.ts +159 -0
- package/src/web/scrapers/types.ts +143 -45
- package/src/web/scrapers/utils.ts +70 -19
- 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
package/bin/skc.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MCPServerConfig } from "../runtime-mcp/types";
|
|
2
|
+
export type MCPAction = "add" | "list" | "remove";
|
|
3
|
+
export interface MCPCommandArgs {
|
|
4
|
+
action: MCPAction;
|
|
5
|
+
name?: string;
|
|
6
|
+
commandArgs?: string[];
|
|
7
|
+
flags: {
|
|
8
|
+
project?: boolean;
|
|
9
|
+
force?: boolean;
|
|
10
|
+
json?: boolean;
|
|
11
|
+
type?: "stdio" | "http" | "sse";
|
|
12
|
+
command?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
arg?: string[];
|
|
15
|
+
env?: string[];
|
|
16
|
+
header?: string[];
|
|
17
|
+
cwd?: string;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
};
|
|
20
|
+
cwd?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class MCPArgsError extends Error {
|
|
23
|
+
}
|
|
24
|
+
export declare function redactMCPServerConfig(config: MCPServerConfig): MCPServerConfig;
|
|
25
|
+
export declare function runMCPCommand(args: MCPCommandArgs): Promise<void>;
|
|
@@ -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>;
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* CLI entry point — registers all commands explicitly and delegates to the
|
|
4
|
+
* lightweight CLI runner from pi-utils.
|
|
5
|
+
*/
|
|
6
|
+
import { type CommandEntry } from "@sayknow-cli/utils/cli";
|
|
7
|
+
export declare const commands: CommandEntry[];
|
|
2
8
|
/** Run the CLI with the given argv (no `process.argv` prefix). */
|
|
3
9
|
export declare function runCli(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direct MCP server registration for standalone SKC.
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from "@sayknow-cli/utils/cli";
|
|
5
|
+
import { type MCPAction } from "../cli/mcp-cli";
|
|
6
|
+
export default class MCP extends Command {
|
|
7
|
+
static description: string;
|
|
8
|
+
static delegateHelp: boolean;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static args: {
|
|
11
|
+
action: import("@sayknow-cli/utils/cli").ArgDescriptor & {
|
|
12
|
+
description: string;
|
|
13
|
+
required: false;
|
|
14
|
+
options: MCPAction[];
|
|
15
|
+
};
|
|
16
|
+
name: import("@sayknow-cli/utils/cli").ArgDescriptor & {
|
|
17
|
+
description: string;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
commandArgs: import("@sayknow-cli/utils/cli").ArgDescriptor & {
|
|
21
|
+
description: string;
|
|
22
|
+
required: false;
|
|
23
|
+
multiple: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
static flags: {
|
|
27
|
+
project: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
force: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
json: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
|
|
35
|
+
char: string;
|
|
36
|
+
description: string;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
type: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
40
|
+
description: string;
|
|
41
|
+
options: string[];
|
|
42
|
+
};
|
|
43
|
+
command: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
url: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
arg: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
50
|
+
description: string;
|
|
51
|
+
multiple: true;
|
|
52
|
+
};
|
|
53
|
+
env: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
54
|
+
description: string;
|
|
55
|
+
multiple: true;
|
|
56
|
+
};
|
|
57
|
+
header: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
58
|
+
description: string;
|
|
59
|
+
multiple: true;
|
|
60
|
+
};
|
|
61
|
+
cwd: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
timeout: import("@sayknow-cli/utils/cli").FlagDescriptor<"integer"> & {
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
run(): Promise<void>;
|
|
69
|
+
private printHelp;
|
|
70
|
+
}
|
|
@@ -47,6 +47,12 @@ export default class Plugin extends Command {
|
|
|
47
47
|
description: string;
|
|
48
48
|
options: string[];
|
|
49
49
|
};
|
|
50
|
+
user: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
project: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
50
56
|
};
|
|
51
57
|
run(): Promise<void>;
|
|
52
58
|
}
|
|
@@ -18,6 +18,12 @@ export default class Session extends Command {
|
|
|
18
18
|
description: string;
|
|
19
19
|
default: boolean;
|
|
20
20
|
};
|
|
21
|
+
"session-id": import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
"state-file": import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
21
27
|
};
|
|
22
28
|
static examples: string[];
|
|
23
29
|
run(): Promise<void>;
|
|
@@ -230,8 +230,8 @@ export declare const KEYBINDINGS: {
|
|
|
230
230
|
readonly description: "Open external editor";
|
|
231
231
|
};
|
|
232
232
|
readonly "app.message.followUp": {
|
|
233
|
-
readonly defaultKeys:
|
|
234
|
-
readonly description: "Send follow-up message";
|
|
233
|
+
readonly defaultKeys: [];
|
|
234
|
+
readonly description: "Send follow-up message (no default; Ctrl+Enter inserts a newline)";
|
|
235
235
|
};
|
|
236
236
|
readonly "app.message.queue": {
|
|
237
237
|
readonly defaultKeys: "alt+enter";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@sayknow-cli/agent-core";
|
|
2
2
|
import type { Api, Model } from "@sayknow-cli/ai";
|
|
3
3
|
import type { AgentSession } from "../session/agent-session";
|
|
4
|
-
import { type ModelRegistry } from "./model-registry";
|
|
4
|
+
import { type ModelRegistry, type SkcModelAssignmentTargetId } from "./model-registry";
|
|
5
5
|
import type { Settings } from "./settings";
|
|
6
6
|
type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel" | "sessionId"> & {
|
|
7
7
|
setModelTemporary?: AgentSession["setModelTemporary"];
|
|
@@ -40,6 +40,13 @@ export interface PreparedModelProfileActivation {
|
|
|
40
40
|
*/
|
|
41
41
|
previousSessionDefaultModel: string | undefined;
|
|
42
42
|
}
|
|
43
|
+
export interface MaterializeModelProfileAssignmentOptions {
|
|
44
|
+
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "setActiveModelProfile" | "getActiveModelProfile">;
|
|
45
|
+
settings: Pick<Settings, "clearOverride" | "get" | "override" | "set">;
|
|
46
|
+
role: SkcModelAssignmentTargetId;
|
|
47
|
+
selector: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function materializeActiveModelProfileAssignment(options: MaterializeModelProfileAssignmentOptions): boolean;
|
|
43
50
|
export declare function formatModelProfileCredentialError(profileName: string, providers: readonly string[]): string;
|
|
44
51
|
export declare function prepareModelProfileActivation(options: PrepareModelProfileActivationOptions): Promise<PreparedModelProfileActivation>;
|
|
45
52
|
export declare function applyPreparedModelProfileActivation(prepared: PreparedModelProfileActivation, options?: {
|
|
@@ -130,6 +130,22 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
130
130
|
readonly type: "string";
|
|
131
131
|
readonly default: undefined;
|
|
132
132
|
};
|
|
133
|
+
readonly "notifications.discord.botToken": {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly default: undefined;
|
|
136
|
+
};
|
|
137
|
+
readonly "notifications.discord.channelId": {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly default: undefined;
|
|
140
|
+
};
|
|
141
|
+
readonly "notifications.slack.botToken": {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly default: undefined;
|
|
144
|
+
};
|
|
145
|
+
readonly "notifications.slack.channelId": {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly default: undefined;
|
|
148
|
+
};
|
|
133
149
|
readonly "notifications.redact": {
|
|
134
150
|
readonly type: "boolean";
|
|
135
151
|
readonly default: false;
|
|
@@ -2512,6 +2528,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2512
2528
|
readonly description: "Allow the read tool to fetch and process URLs";
|
|
2513
2529
|
};
|
|
2514
2530
|
};
|
|
2531
|
+
readonly "web.insaneFallback": {
|
|
2532
|
+
readonly type: "boolean";
|
|
2533
|
+
readonly default: false;
|
|
2534
|
+
readonly ui: {
|
|
2535
|
+
readonly tab: "tools";
|
|
2536
|
+
readonly label: "Insane Search Fallback";
|
|
2537
|
+
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.";
|
|
2538
|
+
};
|
|
2539
|
+
};
|
|
2515
2540
|
readonly "github.enabled": {
|
|
2516
2541
|
readonly type: "boolean";
|
|
2517
2542
|
readonly default: false;
|
|
@@ -2561,7 +2586,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2561
2586
|
readonly type: "array";
|
|
2562
2587
|
readonly default: string[];
|
|
2563
2588
|
readonly items: {
|
|
2564
|
-
readonly enum: readonly ["duckduckgo", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"];
|
|
2589
|
+
readonly enum: readonly ["duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"];
|
|
2565
2590
|
};
|
|
2566
2591
|
readonly ui: {
|
|
2567
2592
|
readonly tab: "tools";
|
|
@@ -3164,7 +3189,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3164
3189
|
};
|
|
3165
3190
|
readonly "providers.webSearch": {
|
|
3166
3191
|
readonly type: "enum";
|
|
3167
|
-
readonly values: readonly ["auto", "duckduckgo", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
3192
|
+
readonly values: readonly ["auto", "duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
3168
3193
|
readonly default: "auto";
|
|
3169
3194
|
readonly ui: {
|
|
3170
3195
|
readonly tab: "providers";
|
|
@@ -3178,6 +3203,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3178
3203
|
readonly value: "duckduckgo";
|
|
3179
3204
|
readonly label: "DuckDuckGo";
|
|
3180
3205
|
readonly description: "Keyless default \u2014 no API key or OAuth required";
|
|
3206
|
+
}, {
|
|
3207
|
+
readonly value: "insane";
|
|
3208
|
+
readonly label: "Insane";
|
|
3209
|
+
readonly description: "Keyless safe public-route fallback inspired by upstream insane-search";
|
|
3181
3210
|
}, {
|
|
3182
3211
|
readonly value: "exa";
|
|
3183
3212
|
readonly label: "Exa";
|
|
@@ -3650,6 +3679,14 @@ export interface NotificationsSettings {
|
|
|
3650
3679
|
botToken: string | undefined;
|
|
3651
3680
|
chatId: string | undefined;
|
|
3652
3681
|
};
|
|
3682
|
+
discord: {
|
|
3683
|
+
botToken: string | undefined;
|
|
3684
|
+
channelId: string | undefined;
|
|
3685
|
+
};
|
|
3686
|
+
slack: {
|
|
3687
|
+
botToken: string | undefined;
|
|
3688
|
+
channelId: string | undefined;
|
|
3689
|
+
};
|
|
3653
3690
|
redact: boolean;
|
|
3654
3691
|
daemon: {
|
|
3655
3692
|
idleTimeoutMs: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type DeepInterviewPlaintextAskLeakOption = "Yes, crystallize" | "Adjust wording" | "Missing scope";
|
|
2
|
+
export type DeepInterviewPlaintextAskLeakResult = {
|
|
3
|
+
kind: "deep_interview_plaintext_ask_leak";
|
|
4
|
+
matchedOptions: DeepInterviewPlaintextAskLeakOption[];
|
|
5
|
+
signals: {
|
|
6
|
+
optionsHeading: true;
|
|
7
|
+
restateIntent: true;
|
|
8
|
+
deepInterviewContext: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function detectDeepInterviewPlaintextAskLeak(text: string): DeepInterviewPlaintextAskLeakResult | null;
|
|
@@ -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 {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type NormalizedSkcPluginBundle } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Stable surface extension-id builders. Kept here so install, runtime, and
|
|
4
|
+
* observability all derive identical ids.
|
|
5
|
+
*/
|
|
6
|
+
export declare const surfaceIds: {
|
|
7
|
+
readonly tool: (name: string) => string;
|
|
8
|
+
readonly hook: (event: string, phase: string | undefined, target: string | undefined, name: string) => string;
|
|
9
|
+
readonly mcp: (name: string) => string;
|
|
10
|
+
readonly systemAppendix: (plugin: string, name: string) => string;
|
|
11
|
+
readonly agentAppendix: (agent: string, plugin: string, name: string) => string;
|
|
12
|
+
readonly subskill: (parent: string, phase: string, activationArg: string) => string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Pure compile step: reads only the manifest, subskill frontmatter, and
|
|
16
|
+
* declared files (as bytes for hashing/existence). It NEVER imports or executes
|
|
17
|
+
* plugin tool/hook code.
|
|
18
|
+
*/
|
|
19
|
+
export declare function compileSkcPluginBundle(root: string): Promise<NormalizedSkcPluginBundle>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type SessionQuarantine } from "./session-validation";
|
|
2
|
+
/**
|
|
3
|
+
* Constrained plugin-hook loader.
|
|
4
|
+
*
|
|
5
|
+
* Third-party plugin hooks are NOT given the broad first-party HookAPI. They
|
|
6
|
+
* receive a restricted API that can only register a handler for their declared
|
|
7
|
+
* event; every session-mutation / command / shell capability throws
|
|
8
|
+
* security_policy. After the factory runs we verify it registered exactly the
|
|
9
|
+
* declared event (and nothing else), or the hook is quarantined.
|
|
10
|
+
*/
|
|
11
|
+
export interface ConstrainedPluginHook {
|
|
12
|
+
plugin: string;
|
|
13
|
+
event: string;
|
|
14
|
+
target?: string;
|
|
15
|
+
phase?: "before" | "after";
|
|
16
|
+
handler: (...args: any[]) => unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface ConstrainedHookLoadResult {
|
|
19
|
+
hooks: ConstrainedPluginHook[];
|
|
20
|
+
quarantine: SessionQuarantine[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Load all always-on constrained plugin hooks for the effective registry at
|
|
24
|
+
* `cwd`, applying hash-drift + collision quarantine first. Returns empty when
|
|
25
|
+
* no plugins are installed.
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadConstrainedPluginHooks(input: {
|
|
28
|
+
cwd: string;
|
|
29
|
+
}): Promise<ConstrainedHookLoadResult>;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export * from "./activation";
|
|
2
|
+
export * from "./compiler";
|
|
3
|
+
export * from "./constrained-hooks";
|
|
2
4
|
export * from "./injection";
|
|
5
|
+
export * from "./installer";
|
|
3
6
|
export * from "./loader";
|
|
7
|
+
export * from "./mcp-policy";
|
|
8
|
+
export * from "./observability";
|
|
4
9
|
export * from "./paths";
|
|
10
|
+
export * from "./prompt-appendix";
|
|
11
|
+
export * from "./registry";
|
|
12
|
+
export * from "./runtime-adapters";
|
|
5
13
|
export * from "./schema";
|
|
14
|
+
export * from "./session-validation";
|
|
6
15
|
export * from "./state";
|
|
7
16
|
export * from "./tools";
|
|
8
17
|
export * from "./types";
|
|
@@ -29,3 +29,12 @@ export declare function buildAgentSubskillInjection(input: {
|
|
|
29
29
|
sessionId?: string;
|
|
30
30
|
agentName: string;
|
|
31
31
|
}): Promise<string>;
|
|
32
|
+
import type { SkcPluginRegistryEntry } from "./types";
|
|
33
|
+
/**
|
|
34
|
+
* Tier-1 advertisement for a workflow parent skill: bounded, metadata-only list
|
|
35
|
+
* of installed sub-skills bound to `parent`, rendered ONLY in that parent's
|
|
36
|
+
* prompt (never the global public-workflow-surface). No body content.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildSubskillAdvertisement(entries: readonly SkcPluginRegistryEntry[], parent: string, phase?: string): string;
|
|
39
|
+
/** Tier-1 advertisement for a role-agent parent. */
|
|
40
|
+
export declare function buildAgentSubskillAdvertisement(entries: readonly SkcPluginRegistryEntry[], agentName: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SkcPluginRegistryEntry, type SkcPluginScope } from "./types";
|
|
2
|
+
export interface InstallSkcPluginOptions {
|
|
3
|
+
scope: SkcPluginScope;
|
|
4
|
+
cwd: string;
|
|
5
|
+
force?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface InstallSkcPluginResult {
|
|
8
|
+
status: "installed" | "updated" | "unchanged";
|
|
9
|
+
entry: SkcPluginRegistryEntry;
|
|
10
|
+
}
|
|
11
|
+
export declare function installSkcPluginBundle(source: string, options: InstallSkcPluginOptions): Promise<InstallSkcPluginResult>;
|
|
12
|
+
/** True only when the source actually resolves to a SKC plugin bundle (root sayknow-plugin.json). */
|
|
13
|
+
export declare function isSkcPluginBundleSource(source: string): Promise<boolean>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type SkcPluginMcpManifestEntry } from "./types";
|
|
2
|
+
export declare function isDeniedIpv4(host: string): boolean;
|
|
3
|
+
export declare function isDeniedIpv6(host: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Synchronous URL policy (scheme, credentials, host literal ranges). Used for
|
|
6
|
+
* the primary endpoint and any redirect/token/discovery URL.
|
|
7
|
+
*/
|
|
8
|
+
export declare function assertUrlAllowed(rawUrl: string, label?: string): URL;
|
|
9
|
+
/** Reject headers with control characters / CRLF injection. */
|
|
10
|
+
export declare function assertHeadersAllowed(headers: Record<string, string> | undefined): void;
|
|
11
|
+
/**
|
|
12
|
+
* Runtime DNS check: resolve the host and ensure no resolved address falls in a
|
|
13
|
+
* denied range (covers DNS rebinding when re-run before each connect).
|
|
14
|
+
*/
|
|
15
|
+
export declare function assertDnsResolvesPublic(hostname: string, label?: string): Promise<void>;
|
|
16
|
+
export interface StdioPolicyContext {
|
|
17
|
+
pluginRoot: string;
|
|
18
|
+
}
|
|
19
|
+
/** stdio launcher/path confinement policy. */
|
|
20
|
+
export declare function assertStdioAllowed(entry: SkcPluginMcpManifestEntry, ctx: StdioPolicyContext): void;
|
|
21
|
+
/**
|
|
22
|
+
* Install-time MCP policy (no network required). Validates scheme/host literals
|
|
23
|
+
* and stdio confinement. Runtime connect additionally calls
|
|
24
|
+
* assertDnsResolvesPublic and re-validates redirect/token URLs.
|
|
25
|
+
*/
|
|
26
|
+
export declare function assertMcpInstallPolicy(entry: SkcPluginMcpManifestEntry, ctx: StdioPolicyContext): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SkcPluginRegistryEntry, SkcPluginScope } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Observability for SKC plugin bundle surfaces, consumable by the extension
|
|
4
|
+
* dashboard / state manager. Each surface row carries its stable extension id,
|
|
5
|
+
* owning plugin, scope, source kind, enabled/disabled/quarantined status, and a
|
|
6
|
+
* content hash. MCP auth/header values are NEVER included.
|
|
7
|
+
*/
|
|
8
|
+
export type PluginSurfaceStatus = "enabled" | "disabled" | "quarantined";
|
|
9
|
+
export interface PluginSurfaceRow {
|
|
10
|
+
extensionId: string;
|
|
11
|
+
kind: "tool" | "hook" | "mcp" | "system-appendix" | "agent-appendix" | "subskill";
|
|
12
|
+
plugin: string;
|
|
13
|
+
scope: SkcPluginScope;
|
|
14
|
+
sourceKind: SkcPluginRegistryEntry["source"]["kind"];
|
|
15
|
+
status: PluginSurfaceStatus;
|
|
16
|
+
hash: string;
|
|
17
|
+
quarantineCode?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface PluginObservabilitySummary {
|
|
20
|
+
plugins: number;
|
|
21
|
+
surfaces: PluginSurfaceRow[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Build the observability summary for the effective registry at `cwd`, including
|
|
25
|
+
* hash-drift and session-collision quarantine status.
|
|
26
|
+
*/
|
|
27
|
+
export declare function summarizeSkcPluginObservability(cwd: string): Promise<PluginObservabilitySummary>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SkcPluginRegistryEntry, SkcSubskillParentAgent } from "./types";
|
|
2
|
+
export interface RenderedPluginAppendices {
|
|
3
|
+
/** Combined system-appendix block text (empty if none). */
|
|
4
|
+
system: string;
|
|
5
|
+
/** Per-agent appendix block text. */
|
|
6
|
+
byAgent: Map<SkcSubskillParentAgent, string>;
|
|
7
|
+
/** Stable digest of all rendered appendix content + identities (for cache/refresh). */
|
|
8
|
+
digest: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Build appendix blocks from the active, enabled registry entries in their
|
|
12
|
+
* deterministic order. Per-appendix and total size caps are enforced
|
|
13
|
+
* fail-closed (oversize content is dropped with a marker, never silently
|
|
14
|
+
* truncated into the prompt as authoritative text).
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderPluginAppendices(entries: readonly SkcPluginRegistryEntry[]): Promise<RenderedPluginAppendices>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type SkcPluginRegistry, type SkcPluginRegistryEntry, type SkcPluginScope } from "./types";
|
|
2
|
+
export declare function registryRootForScope(scope: SkcPluginScope, cwd: string): string;
|
|
3
|
+
export declare function registryPathForScope(scope: SkcPluginScope, cwd: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Deterministic ordering: scope (user before project) -> normalized name ->
|
|
6
|
+
* resolved plugin root. Collisions are errors elsewhere; order only controls
|
|
7
|
+
* stable hook/appendix sequencing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sortRegistryEntries(entries: SkcPluginRegistryEntry[]): SkcPluginRegistryEntry[];
|
|
10
|
+
export declare function readRegistry(scope: SkcPluginScope, cwd: string): Promise<SkcPluginRegistry>;
|
|
11
|
+
export declare function withRegistryLock<T>(scope: SkcPluginScope, cwd: string, fn: () => Promise<T>): Promise<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Lock-free atomic write (temp+fsync+rename). Only call while already holding
|
|
14
|
+
* the per-scope registry lock via withRegistryLock.
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeRegistryUnlocked(registry: SkcPluginRegistry, cwd: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Atomic registry write: write to a temp sibling, fsync, then rename. Guarded
|
|
19
|
+
* by an interprocess lockfile so concurrent installs cannot clobber each other.
|
|
20
|
+
*/
|
|
21
|
+
export declare function writeRegistry(registry: SkcPluginRegistry, cwd: string): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Mutate a scope's registry as a single locked read-modify-write transaction so
|
|
24
|
+
* concurrent installs cannot lose each other's updates. The mutator receives a
|
|
25
|
+
* sorted copy and returns the next entry list.
|
|
26
|
+
*/
|
|
27
|
+
export declare function updateRegistry(scope: SkcPluginScope, cwd: string, mutator: (entries: SkcPluginRegistryEntry[]) => SkcPluginRegistryEntry[]): Promise<SkcPluginRegistry>;
|
|
28
|
+
/**
|
|
29
|
+
* Effective registry for a cwd: user + project entries in deterministic order.
|
|
30
|
+
*/
|
|
31
|
+
export declare function loadEffectiveSkcPluginRegistry(cwd: string): Promise<SkcPluginRegistryEntry[]>;
|
|
32
|
+
export declare function registryEntryFingerprint(entry: SkcPluginRegistryEntry): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { CustomTool } from "../custom-tools/types";
|
|
2
|
+
import { type SessionQuarantine } from "./session-validation";
|
|
3
|
+
export interface AlwaysOnPluginTools {
|
|
4
|
+
tools: CustomTool[];
|
|
5
|
+
quarantine: SessionQuarantine[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Load the always-on plugin tool surfaces for the effective registry at `cwd`.
|
|
9
|
+
*
|
|
10
|
+
* Safety properties:
|
|
11
|
+
* - Hash drift quarantines the plugin (runtime_mismatch) before any import.
|
|
12
|
+
* - Session-start collisions vs reserved/built-in names quarantine fail-closed.
|
|
13
|
+
* - Manifest-declared tool names are authoritative: a factory that returns a
|
|
14
|
+
* different/extra/missing name is rejected with runtime_mismatch and skipped.
|
|
15
|
+
* - Reserved tool names are never overwritten.
|
|
16
|
+
*
|
|
17
|
+
* Returns an empty result when no plugins are installed, so callers that always
|
|
18
|
+
* call this in `createAgentSession` incur no behavior change without plugins.
|
|
19
|
+
*/
|
|
20
|
+
export declare function loadAlwaysOnPluginTools(input: {
|
|
21
|
+
cwd: string;
|
|
22
|
+
reservedToolNames: string[];
|
|
23
|
+
}): Promise<AlwaysOnPluginTools>;
|
|
24
|
+
/**
|
|
25
|
+
* Render the always-on system-appendix blocks for the effective registry at
|
|
26
|
+
* `cwd`, applying hash-drift + collision quarantine first. Returns "" when no
|
|
27
|
+
* plugins are installed/enabled. Safe to call unconditionally at session start.
|
|
28
|
+
*/
|
|
29
|
+
export declare function renderAlwaysOnSystemAppendices(input: {
|
|
30
|
+
cwd: string;
|
|
31
|
+
}): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Render the agent-appendix block and Tier-1 sub-skill advertisement for a role
|
|
34
|
+
* agent at session/spawn time. Hash-drift + collision quarantine applied first.
|
|
35
|
+
* Returns empty strings when nothing applies.
|
|
36
|
+
*/
|
|
37
|
+
export declare function renderAgentPromptAdditions(input: {
|
|
38
|
+
cwd: string;
|
|
39
|
+
agentName: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
appendix: string;
|
|
42
|
+
advertisement: string;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Render the Tier-1 sub-skill advertisement for a workflow parent skill.
|
|
46
|
+
* Returns "" when nothing applies. Quarantine applied first.
|
|
47
|
+
*/
|
|
48
|
+
export declare function renderSkillAdvertisement(input: {
|
|
49
|
+
cwd: string;
|
|
50
|
+
skillName: string;
|
|
51
|
+
phase?: string;
|
|
52
|
+
}): Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Convert active plugin-bundle MCP surfaces into runtime MCPServerConfig entries,
|
|
55
|
+
* applying install + runtime MCP policy (URL scheme/private-range deny, DNS
|
|
56
|
+
* re-resolution for http/sse, stdio root-confinement) before connection. Servers
|
|
57
|
+
* failing policy are quarantined and excluded. Returns {} when none.
|
|
58
|
+
*/
|
|
59
|
+
export declare function buildPluginMcpConfigs(input: {
|
|
60
|
+
cwd: string;
|
|
61
|
+
}): Promise<{
|
|
62
|
+
configs: Record<string, any>;
|
|
63
|
+
quarantine: SessionQuarantine[];
|
|
64
|
+
}>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SkcPluginLoadErrorCode, SkcPluginRegistryEntry } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Session-start validation: the registry is the collision authority. Capability
|
|
4
|
+
* provider output is supplied as EVIDENCE only; plugin surfaces are never
|
|
5
|
+
* resolved by capability first-wins. Offending surfaces are quarantined
|
|
6
|
+
* fail-closed with a stable error code rather than silently shadowed.
|
|
7
|
+
*/
|
|
8
|
+
export interface SessionCapabilityEvidence {
|
|
9
|
+
/** Built-in + provider tool names already present before plugin insertion. */
|
|
10
|
+
toolNames?: Iterable<string>;
|
|
11
|
+
/** Non-plugin MCP server names from providers/built-ins. */
|
|
12
|
+
mcpNames?: Iterable<string>;
|
|
13
|
+
/** Non-plugin hook keys (event:phase:target:name) from providers/built-ins. */
|
|
14
|
+
hookKeys?: Iterable<string>;
|
|
15
|
+
/** Existing appendix extension ids already present. */
|
|
16
|
+
appendixIds?: Iterable<string>;
|
|
17
|
+
}
|
|
18
|
+
export interface SessionQuarantine {
|
|
19
|
+
plugin: string;
|
|
20
|
+
surfaceId: string;
|
|
21
|
+
code: SkcPluginLoadErrorCode;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SessionValidationResult {
|
|
25
|
+
/** Registry entries (enabled, non-quarantined) whose surfaces may activate. */
|
|
26
|
+
active: SkcPluginRegistryEntry[];
|
|
27
|
+
/** Per-surface quarantine records (fail-closed). */
|
|
28
|
+
quarantine: SessionQuarantine[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Re-verify that the installed files still match the registry's recorded hashes.
|
|
32
|
+
* Drift (manual edits, partial writes) quarantines the whole plugin with
|
|
33
|
+
* runtime_mismatch.
|
|
34
|
+
*/
|
|
35
|
+
export declare function verifyEntryHashes(entry: SkcPluginRegistryEntry): Promise<SessionQuarantine | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Validate the effective installed registry against the current capability
|
|
38
|
+
* universe (evidence) and across plugins. Returns the entries that may activate
|
|
39
|
+
* plus per-surface quarantine records. Disabled entries/surfaces are skipped
|
|
40
|
+
* (not an error).
|
|
41
|
+
*/
|
|
42
|
+
export declare function validateSessionBundles(entries: readonly SkcPluginRegistryEntry[], evidence?: SessionCapabilityEvidence, preQuarantined?: readonly SessionQuarantine[]): SessionValidationResult;
|