@sayknow-cli/coding-agent 0.2.6 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/types/async/job-manager.d.ts +3 -1
  3. package/dist/types/cli/daemon-cli.d.ts +25 -0
  4. package/dist/types/cli/notify-cli.d.ts +23 -0
  5. package/dist/types/cli/setup-cli.d.ts +20 -1
  6. package/dist/types/commands/daemon.d.ts +41 -0
  7. package/dist/types/commands/notify.d.ts +41 -0
  8. package/dist/types/config/model-profile-activation.d.ts +12 -0
  9. package/dist/types/config/model-profiles.d.ts +2 -1
  10. package/dist/types/config/model-registry.d.ts +3 -3
  11. package/dist/types/config/models-config-schema.d.ts +5 -0
  12. package/dist/types/config/settings-schema.d.ts +71 -0
  13. package/dist/types/coordinator/contract.d.ts +1 -1
  14. package/dist/types/daemon/builtin.d.ts +20 -0
  15. package/dist/types/daemon/control-types.d.ts +57 -0
  16. package/dist/types/daemon/runtime.d.ts +25 -0
  17. package/dist/types/defaults/skc-defaults.d.ts +13 -2
  18. package/dist/types/extensibility/extensions/types.d.ts +8 -0
  19. package/dist/types/extensibility/plugins/index.d.ts +1 -0
  20. package/dist/types/extensibility/plugins/security-scanner.d.ts +31 -0
  21. package/dist/types/modes/components/oauth-selector.d.ts +2 -0
  22. package/dist/types/modes/controllers/selector-controller.d.ts +2 -2
  23. package/dist/types/modes/interactive-mode.d.ts +1 -1
  24. package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +10 -0
  25. package/dist/types/modes/types.d.ts +7 -1
  26. package/dist/types/notifications/config-commands.d.ts +26 -0
  27. package/dist/types/notifications/config.d.ts +61 -0
  28. package/dist/types/notifications/helpers.d.ts +55 -0
  29. package/dist/types/notifications/html-format.d.ts +62 -0
  30. package/dist/types/notifications/index.d.ts +28 -0
  31. package/dist/types/notifications/rate-limit-pool.d.ts +93 -0
  32. package/dist/types/notifications/telegram-cli.d.ts +19 -0
  33. package/dist/types/notifications/telegram-daemon-cli.d.ts +11 -0
  34. package/dist/types/notifications/telegram-daemon-control.d.ts +56 -0
  35. package/dist/types/notifications/telegram-daemon.d.ts +276 -0
  36. package/dist/types/notifications/telegram-reference.d.ts +111 -0
  37. package/dist/types/notifications/threaded-inbound.d.ts +58 -0
  38. package/dist/types/notifications/threaded-render.d.ts +66 -0
  39. package/dist/types/notifications/topic-registry.d.ts +67 -0
  40. package/dist/types/rlm/index.d.ts +12 -0
  41. package/dist/types/session/agent-session.d.ts +39 -2
  42. package/dist/types/session/auth-storage.d.ts +1 -1
  43. package/dist/types/setup/credential-auto-import.d.ts +63 -0
  44. package/dist/types/setup/credential-import.d.ts +3 -0
  45. package/dist/types/setup/host-plugin-setup.d.ts +39 -0
  46. package/dist/types/skc-runtime/launch-tmux.d.ts +1 -0
  47. package/dist/types/skc-runtime/state-writer.d.ts +2 -0
  48. package/dist/types/skc-runtime/tmux-common.d.ts +3 -0
  49. package/dist/types/skc-runtime/tmux-sessions.d.ts +2 -0
  50. package/dist/types/skc-runtime/ultragoal-guard.d.ts +15 -0
  51. package/dist/types/skc-runtime/ultragoal-runtime.d.ts +14 -0
  52. package/dist/types/tools/ask-answer-registry.d.ts +13 -0
  53. package/dist/types/tools/index.d.ts +18 -0
  54. package/dist/types/tools/subagent.d.ts +3 -0
  55. package/package.json +7 -7
  56. package/scripts/build-binary.ts +3 -0
  57. package/src/async/job-manager.ts +5 -1
  58. package/src/cli/daemon-cli.ts +122 -0
  59. package/src/cli/notify-cli.ts +274 -0
  60. package/src/cli/plugin-cli.ts +63 -6
  61. package/src/cli/setup-cli.ts +173 -84
  62. package/src/cli.ts +3 -3
  63. package/src/commands/daemon.ts +47 -0
  64. package/src/commands/notify.ts +61 -0
  65. package/src/commands/setup.ts +11 -1
  66. package/src/config/model-profile-activation.ts +74 -5
  67. package/src/config/model-profiles.ts +7 -4
  68. package/src/config/model-registry.ts +6 -3
  69. package/src/config/models-config-schema.ts +1 -1
  70. package/src/config/settings-schema.ts +61 -0
  71. package/src/coordinator/contract.ts +3 -0
  72. package/src/coordinator-mcp/server.ts +270 -1
  73. package/src/daemon/builtin.ts +46 -0
  74. package/src/daemon/control-types.ts +65 -0
  75. package/src/daemon/runtime.ts +51 -0
  76. package/src/defaults/skc/rules/ponytail.md +68 -0
  77. package/src/defaults/skc/skills/ultragoal/SKILL.md +16 -0
  78. package/src/defaults/skc-defaults.ts +27 -2
  79. package/src/edit/modes/replace.ts +1 -1
  80. package/src/extensibility/extensions/runner.ts +4 -0
  81. package/src/extensibility/extensions/types.ts +8 -0
  82. package/src/extensibility/plugins/index.ts +1 -0
  83. package/src/extensibility/plugins/manager.ts +50 -0
  84. package/src/extensibility/plugins/marketplace/manager.ts +42 -0
  85. package/src/extensibility/plugins/security-scanner.ts +477 -0
  86. package/src/goals/tools/goal-tool.ts +11 -2
  87. package/src/hashline/hash.ts +1 -1
  88. package/src/internal-urls/docs-index.generated.ts +10 -8
  89. package/src/main.ts +30 -0
  90. package/src/modes/acp/acp-event-mapper.ts +1 -0
  91. package/src/modes/components/hook-editor.ts +7 -2
  92. package/src/modes/components/oauth-selector.ts +19 -0
  93. package/src/modes/controllers/event-controller.ts +20 -0
  94. package/src/modes/controllers/selector-controller.ts +80 -17
  95. package/src/modes/interactive-mode.ts +6 -2
  96. package/src/modes/runtime-init.ts +1 -0
  97. package/src/modes/shared/agent-wire/event-contract.ts +1 -0
  98. package/src/modes/shared/agent-wire/event-envelope.ts +1 -0
  99. package/src/modes/shared/agent-wire/event-observation.ts +16 -0
  100. package/src/modes/shared/agent-wire/unattended-session.ts +22 -0
  101. package/src/modes/types.ts +7 -1
  102. package/src/modes/utils/ui-helpers.ts +23 -0
  103. package/src/notifications/config-commands.ts +50 -0
  104. package/src/notifications/config.ts +107 -0
  105. package/src/notifications/helpers.ts +135 -0
  106. package/src/notifications/html-format.ts +389 -0
  107. package/src/notifications/index.ts +700 -0
  108. package/src/notifications/rate-limit-pool.ts +179 -0
  109. package/src/notifications/telegram-cli.ts +194 -0
  110. package/src/notifications/telegram-daemon-cli.ts +74 -0
  111. package/src/notifications/telegram-daemon-control.ts +370 -0
  112. package/src/notifications/telegram-daemon.ts +1370 -0
  113. package/src/notifications/telegram-reference.ts +335 -0
  114. package/src/notifications/threaded-inbound.ts +80 -0
  115. package/src/notifications/threaded-render.ts +155 -0
  116. package/src/notifications/topic-registry.ts +133 -0
  117. package/src/rlm/index.ts +19 -0
  118. package/src/sdk.ts +16 -0
  119. package/src/session/agent-session.ts +113 -3
  120. package/src/session/auth-storage.ts +3 -0
  121. package/src/session/session-dump-format.ts +43 -2
  122. package/src/session/session-manager.ts +39 -5
  123. package/src/setup/credential-auto-import.ts +258 -0
  124. package/src/setup/credential-import.ts +17 -0
  125. package/src/setup/hermes/templates/operator-instructions.v1.md +10 -0
  126. package/src/setup/host-plugin-setup.ts +142 -0
  127. package/src/skc-runtime/deep-interview-recorder.ts +2 -2
  128. package/src/skc-runtime/launch-tmux.ts +10 -2
  129. package/src/skc-runtime/state-runtime.ts +18 -10
  130. package/src/skc-runtime/state-writer.ts +8 -8
  131. package/src/skc-runtime/tmux-common.ts +8 -0
  132. package/src/skc-runtime/tmux-sessions.ts +8 -1
  133. package/src/skc-runtime/ultragoal-guard.ts +57 -2
  134. package/src/skc-runtime/ultragoal-runtime.ts +105 -19
  135. package/src/skc-runtime/workflow-manifest.generated.json +27 -2
  136. package/src/skc-runtime/workflow-manifest.ts +11 -1
  137. package/src/slash-commands/builtin-registry.ts +4 -1
  138. package/src/task/executor.ts +5 -1
  139. package/src/tools/ask-answer-registry.ts +25 -0
  140. package/src/tools/ask.ts +77 -6
  141. package/src/tools/image-gen.ts +5 -8
  142. package/src/tools/index.ts +19 -0
  143. package/src/tools/inspect-image.ts +16 -11
  144. package/src/tools/subagent-render.ts +7 -0
  145. package/src/tools/subagent.ts +38 -7
package/CHANGELOG.md CHANGED
@@ -4,6 +4,38 @@ Sayknow-CLI is a rebranded fork of [gajae-code](https://github.com/Yeachan-Heo/g
4
4
  This file tracks the **fork's own releases**; upstream's full feature history lives
5
5
  in that project. Each release notes the upstream version it is built on.
6
6
 
7
+ ## [0.3.0] — 2026-06-23
8
+
9
+ ### Changed
10
+
11
+ - Synced onto upstream **gajae-code v0.7.1** (from v0.6.5), bringing 0.7.0's mobile
12
+ notifications SDK + managed Telegram daemon and 0.7.1's fixes (assistant
13
+ notification lead-in, stale tmux session reuse, packaged native imports, and the
14
+ glm-zcode Z.AI provider) while preserving the Sayknow-CLI brand.
15
+
16
+ ### Added
17
+
18
+ - **Decepticon red-team integration.** Vendored [Decepticon](https://github.com/PurpleAILAB/Decepticon)
19
+ as a git submodule (`vendor/decepticon`) plus `python/decepticon-bridge` — an
20
+ `skc-rpc` host-tool bridge that exposes Decepticon's red-team agents to skc
21
+ (`decepticon_run_agent` / `decepticon_list_agents`).
22
+ - **Ponytail default rule.** Bundled the ponytail "lazy senior dev" ruleset as an
23
+ always-on default rule: pick the simplest working solution first (YAGNI, reuse,
24
+ stdlib/native first) without ever cutting validation, error handling, security,
25
+ or accessibility. Adapted from [ponytail](https://github.com/DietrichGebert/ponytail) (MIT).
26
+
27
+ ## [0.2.7] — 2026-06-23
28
+
29
+ ### Added
30
+
31
+ - **Plugin install security scan (advisory).** Newly installed plugins/skills are now
32
+ statically scanned before activation for risky patterns — `curl|bash` download-and-exec,
33
+ `eval`/dynamic import, credential/secret access, obfuscation, cron persistence, and
34
+ package-install markers — with risk scoring. Findings surface as warnings in the install
35
+ output and in `plugin doctor`. Controlled by `plugins.security.scanMode`
36
+ (`warn` = default, `off`, `block`) and `plugins.security.riskThreshold`. Warn-only by
37
+ default — it never blocks an install unless you opt into `block` mode.
38
+
7
39
  ## [0.2.6] — 2026-06-22
8
40
 
9
41
  ### Fixed
@@ -68,7 +68,9 @@ export interface SubagentLiveHandle {
68
68
  /** Request a cooperative safe-boundary pause (never aborts the in-flight tool). */
69
69
  requestPause(): void;
70
70
  /** Inject a steering message into the live session. */
71
- injectMessage(content: string, deliverAs: "steer" | "followUp" | "nextTurn"): Promise<void>;
71
+ injectMessage(content: string, deliverAs: "steer" | "followUp" | "nextTurn", opts?: {
72
+ fromAgentId?: string;
73
+ }): Promise<void>;
72
74
  }
73
75
  /**
74
76
  * Canonical, stable-id-keyed record for a subagent. Survives `AsyncJob`
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `skc daemon` command handler.
3
+ *
4
+ * Generic over the static built-in daemon controller map: lists/inspects
5
+ * daemons and drives cooperative stop/reload. Telegram is the only kind today.
6
+ */
7
+ import { Settings } from "../config/settings";
8
+ import type { BuiltInDaemonController, DaemonKind } from "../daemon/control-types";
9
+ export type DaemonCliAction = "list" | "status" | "stop" | "reload";
10
+ export interface DaemonCommandArgs {
11
+ action: DaemonCliAction;
12
+ kinds: DaemonKind[];
13
+ all: boolean;
14
+ json: boolean;
15
+ force: boolean;
16
+ gracefulTimeoutMs?: number;
17
+ killTimeoutMs?: number;
18
+ spawnIfStopped?: boolean;
19
+ }
20
+ export interface DaemonCommandDeps {
21
+ settings?: Settings;
22
+ controllers?: BuiltInDaemonController[];
23
+ }
24
+ export declare function parseDaemonArgs(argv: string[]): DaemonCommandArgs | undefined;
25
+ export declare function runDaemonCommand(cmd: DaemonCommandArgs, deps?: DaemonCommandDeps): Promise<void>;
@@ -0,0 +1,23 @@
1
+ import { Settings } from "../config/settings";
2
+ export type NotifyAction = "setup" | "status" | "daemon-internal";
3
+ export interface NotifyCommandArgs {
4
+ action: NotifyAction;
5
+ smoke?: boolean;
6
+ rawArgs: string[];
7
+ token?: string;
8
+ chatId?: string;
9
+ redact?: boolean;
10
+ }
11
+ export interface NotifyCommandDeps {
12
+ fetchImpl?: typeof fetch;
13
+ apiBase?: string;
14
+ settings?: Settings;
15
+ setupToken?: string;
16
+ pollTimeoutMs?: number;
17
+ pollIntervalMs?: number;
18
+ setupChatId?: string;
19
+ setupRedact?: boolean;
20
+ }
21
+ export declare function parseNotifyArgs(args: string[]): NotifyCommandArgs | undefined;
22
+ export declare function runNotifyCommand(cmd: NotifyCommandArgs, deps?: NotifyCommandDeps): Promise<void>;
23
+ export declare function printNotifyHelp(): void;
@@ -3,7 +3,9 @@
3
3
  *
4
4
  * Handles `skc setup [component]` to install the normal defaults or optional feature dependencies.
5
5
  */
6
- export type SetupComponent = "credentials" | "defaults" | "hermes" | "hooks" | "provider" | "python" | "stt";
6
+ import { AuthStorage, SqliteAuthCredentialStore } from "@sayknow-cli/ai";
7
+ import { runExternalCredentialAutoImport } from "../setup/credential-auto-import";
8
+ export type SetupComponent = "claude" | "codex" | "credentials" | "defaults" | "hermes" | "hooks" | "provider" | "python" | "stt";
7
9
  export interface SetupCommandArgs {
8
10
  component: SetupComponent;
9
11
  flags: {
@@ -34,6 +36,7 @@ export interface SetupCommandArgs {
34
36
  profileDir?: string;
35
37
  yes?: boolean;
36
38
  dryRun?: boolean;
39
+ keychain?: boolean;
37
40
  };
38
41
  }
39
42
  /**
@@ -48,6 +51,22 @@ export declare function parseSetupArgs(args: string[]): SetupCommandArgs | undef
48
51
  * Run the setup command.
49
52
  */
50
53
  export declare function runSetupCommand(cmd: SetupCommandArgs): Promise<void>;
54
+ /**
55
+ * Discover existing Claude Code / Codex CLI credentials and import them into the
56
+ * skc credential store after a redacted preview + confirmation. Falls back to
57
+ * manual-setup guidance when nothing importable is found.
58
+ */
59
+ export interface CredentialsSetupDependencies {
60
+ openStore?: typeof SqliteAuthCredentialStore.open;
61
+ createAuthStorage?: (store: Awaited<ReturnType<typeof SqliteAuthCredentialStore.open>>) => AuthStorage;
62
+ discover?: Parameters<typeof runExternalCredentialAutoImport>[0]["discover"];
63
+ }
64
+ export declare function handleCredentialsSetup(flags: {
65
+ json?: boolean;
66
+ yes?: boolean;
67
+ dryRun?: boolean;
68
+ keychain?: boolean;
69
+ }, deps?: CredentialsSetupDependencies): Promise<void>;
51
70
  /**
52
71
  * Print setup command help.
53
72
  */
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Manage SKC background daemons (status/list/stop/reload).
3
+ */
4
+ import { Command } from "@sayknow-cli/utils/cli";
5
+ import { type DaemonCliAction } from "../cli/daemon-cli";
6
+ export default class Daemon extends Command {
7
+ static description: string;
8
+ static args: {
9
+ action: import("@sayknow-cli/utils/cli").ArgDescriptor & {
10
+ description: string;
11
+ required: false;
12
+ options: DaemonCliAction[];
13
+ };
14
+ kind: import("@sayknow-cli/utils/cli").ArgDescriptor & {
15
+ description: string;
16
+ required: false;
17
+ multiple: true;
18
+ };
19
+ };
20
+ static flags: {
21
+ all: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
22
+ description: string;
23
+ };
24
+ json: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
25
+ description: string;
26
+ };
27
+ force: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
28
+ description: string;
29
+ };
30
+ "graceful-timeout-ms": import("@sayknow-cli/utils/cli").FlagDescriptor<"integer"> & {
31
+ description: string;
32
+ };
33
+ "kill-timeout-ms": import("@sayknow-cli/utils/cli").FlagDescriptor<"integer"> & {
34
+ description: string;
35
+ };
36
+ "spawn-if-stopped": import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
37
+ description: string;
38
+ };
39
+ };
40
+ run(): Promise<void>;
41
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Configure Telegram notifications.
3
+ */
4
+ import { Command } from "@sayknow-cli/utils/cli";
5
+ import { type NotifyAction } from "../cli/notify-cli";
6
+ export default class Notify extends Command {
7
+ static description: string;
8
+ static args: {
9
+ action: import("@sayknow-cli/utils/cli").ArgDescriptor & {
10
+ description: string;
11
+ required: false;
12
+ options: NotifyAction[];
13
+ };
14
+ extra: import("@sayknow-cli/utils/cli").ArgDescriptor & {
15
+ description: string;
16
+ required: false;
17
+ multiple: true;
18
+ };
19
+ };
20
+ static flags: {
21
+ smoke: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
22
+ description: string;
23
+ };
24
+ token: import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
25
+ description: string;
26
+ };
27
+ "chat-id": import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
28
+ description: string;
29
+ };
30
+ redact: import("@sayknow-cli/utils/cli").FlagDescriptor<"boolean"> & {
31
+ description: string;
32
+ };
33
+ "owner-id": import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
34
+ description: string;
35
+ };
36
+ "agent-dir": import("@sayknow-cli/utils/cli").FlagDescriptor<"string"> & {
37
+ description: string;
38
+ };
39
+ };
40
+ run(): Promise<void>;
41
+ }
@@ -7,6 +7,8 @@ type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel
7
7
  setModelTemporary?: AgentSession["setModelTemporary"];
8
8
  setActiveModelProfile?: (name: string | undefined) => void;
9
9
  getActiveModelProfile?: () => string | undefined;
10
+ getSessionDefaultModelSelector?: () => string | undefined;
11
+ recordResumeDefaultModel?: (selector: string) => void;
10
12
  };
11
13
  export interface PrepareModelProfileActivationOptions {
12
14
  session: ModelProfileActivationSession;
@@ -23,10 +25,20 @@ export interface PreparedModelProfileActivation {
23
25
  previousModel: Model<Api> | undefined;
24
26
  previousThinkingLevel: ThinkingLevel | undefined;
25
27
  previousAgentModelOverrides: Record<string, string>;
28
+ previousModelRoles: Record<string, string>;
26
29
  defaultModel: Model<Api> | undefined;
27
30
  defaultThinkingLevel: ThinkingLevel | undefined;
31
+ modelRoles: Record<string, string>;
28
32
  agentModelOverrides: Record<string, string>;
29
33
  previousActiveModelProfile: string | undefined;
34
+ /**
35
+ * The session resume default ("provider/id") captured BEFORE activation —
36
+ * the model resume would restore prior to this profile. Snapshotted
37
+ * separately from `previousModel` (the live runtime model, which may be a
38
+ * transient switch) so a failed-activation rollback restores the correct
39
+ * resume default without promoting a transient model to it.
40
+ */
41
+ previousSessionDefaultModel: string | undefined;
30
42
  }
31
43
  export declare function formatModelProfileCredentialError(profileName: string, providers: readonly string[]): string;
32
44
  export declare function prepareModelProfileActivation(options: PrepareModelProfileActivationOptions): Promise<PreparedModelProfileActivation>;
@@ -20,7 +20,8 @@ export interface ModelProfileDefinition {
20
20
  }
21
21
  export interface ResolvedProfileBinding {
22
22
  defaultSelector?: string;
23
- agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default">, string>>;
23
+ modelRoles: Partial<Record<"vision", string>>;
24
+ agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default" | "vision">, string>>;
24
25
  }
25
26
  export declare function deriveModelProfileMappedProviders(definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
26
27
  export declare function aggregateModelProfileRequiredProviders(requiredProviders: readonly string[], definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
@@ -11,7 +11,7 @@ import { type Settings } from "./settings";
11
11
  export type { CanonicalModelIndex, CanonicalModelRecord, CanonicalModelVariant, ModelEquivalenceConfig };
12
12
  export declare const kNoAuth = "N/A";
13
13
  export declare function isAuthenticated(apiKey: string | undefined | null): apiKey is string;
14
- export type ModelRole = "default";
14
+ export type ModelRole = "default" | "vision";
15
15
  export interface ModelRoleInfo {
16
16
  tag?: string;
17
17
  name: string;
@@ -19,7 +19,7 @@ export interface ModelRoleInfo {
19
19
  }
20
20
  export declare const MODEL_ROLES: Record<ModelRole, ModelRoleInfo>;
21
21
  export declare const MODEL_ROLE_IDS: ModelRole[];
22
- export type SkcModelAssignmentTargetId = "default" | "executor" | "architect" | "planner" | "critic";
22
+ export type SkcModelAssignmentTargetId = "default" | "vision" | "executor" | "architect" | "planner" | "critic";
23
23
  export interface SkcModelAssignmentTargetInfo extends ModelRoleInfo {
24
24
  id: SkcModelAssignmentTargetId;
25
25
  settingsPath: "modelRoles" | "task.agentModelOverrides";
@@ -268,7 +268,7 @@ export declare const ModelsConfigFile: ConfigFile<{
268
268
  profiles?: Record<string, {
269
269
  required_providers: string[];
270
270
  display_name?: string | undefined;
271
- model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner", string>>;
271
+ model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner" | "vision", string>>;
272
272
  }> | undefined;
273
273
  }>;
274
274
  /** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
@@ -68,6 +68,7 @@ export declare const ProfileRoleSchema: z.ZodEnum<{
68
68
  default: "default";
69
69
  executor: "executor";
70
70
  planner: "planner";
71
+ vision: "vision";
71
72
  }>;
72
73
  export declare const ProfileModelSelectorSchema: z.ZodString;
73
74
  export declare const ProfileModelMappingSchema: z.ZodRecord<z.ZodEnum<{
@@ -76,6 +77,7 @@ export declare const ProfileModelMappingSchema: z.ZodRecord<z.ZodEnum<{
76
77
  default: "default";
77
78
  executor: "executor";
78
79
  planner: "planner";
80
+ vision: "vision";
79
81
  }> & z.core.$partial, z.ZodString>;
80
82
  export declare const ProfileDefinitionSchema: z.ZodObject<{
81
83
  required_providers: z.ZodArray<z.ZodString>;
@@ -86,6 +88,7 @@ export declare const ProfileDefinitionSchema: z.ZodObject<{
86
88
  default: "default";
87
89
  executor: "executor";
88
90
  planner: "planner";
91
+ vision: "vision";
89
92
  }> & z.core.$partial, z.ZodString>;
90
93
  }, z.core.$strict>;
91
94
  export declare const ProfilesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -97,6 +100,7 @@ export declare const ProfilesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
97
100
  default: "default";
98
101
  executor: "executor";
99
102
  planner: "planner";
103
+ vision: "vision";
100
104
  }> & z.core.$partial, z.ZodString>;
101
105
  }, z.core.$strict>>;
102
106
  export declare const ModelOverrideSchema: z.ZodObject<{
@@ -687,6 +691,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
687
691
  default: "default";
688
692
  executor: "executor";
689
693
  planner: "planner";
694
+ vision: "vision";
690
695
  }> & z.core.$partial, z.ZodString>;
691
696
  }, z.core.$strict>>>;
692
697
  }, z.core.$strict>;
@@ -118,6 +118,32 @@ export declare const SETTINGS_SCHEMA: {
118
118
  readonly type: "string";
119
119
  readonly default: undefined;
120
120
  };
121
+ readonly "notifications.enabled": {
122
+ readonly type: "boolean";
123
+ readonly default: false;
124
+ };
125
+ readonly "notifications.telegram.botToken": {
126
+ readonly type: "string";
127
+ readonly default: undefined;
128
+ };
129
+ readonly "notifications.telegram.chatId": {
130
+ readonly type: "string";
131
+ readonly default: undefined;
132
+ };
133
+ readonly "notifications.redact": {
134
+ readonly type: "boolean";
135
+ readonly default: false;
136
+ };
137
+ readonly "notifications.verbosity": {
138
+ readonly type: "string";
139
+ readonly default: "lean";
140
+ readonly validate: (value: string) => value is "lean" | "verbose";
141
+ };
142
+ readonly "notifications.daemon.idleTimeoutMs": {
143
+ readonly type: "number";
144
+ readonly default: 60000;
145
+ readonly validate: (value: number) => boolean;
146
+ };
121
147
  readonly autoResume: {
122
148
  readonly type: "boolean";
123
149
  readonly default: false;
@@ -3433,6 +3459,39 @@ export declare const SETTINGS_SCHEMA: {
3433
3459
  readonly type: "number";
3434
3460
  readonly default: 65536;
3435
3461
  };
3462
+ readonly "plugins.security.scanMode": {
3463
+ readonly type: "enum";
3464
+ readonly values: readonly ["warn", "off", "block"];
3465
+ readonly default: "warn";
3466
+ readonly ui: {
3467
+ readonly tab: "interaction";
3468
+ readonly label: "Plugin Security Scan Mode";
3469
+ readonly description: "warn: scan on install and log advisory findings (default); off: skip scan; block: deny install when score exceeds threshold";
3470
+ readonly options: readonly [{
3471
+ readonly value: "warn";
3472
+ readonly label: "Warn";
3473
+ readonly description: "Scan and log advisory findings (default)";
3474
+ }, {
3475
+ readonly value: "off";
3476
+ readonly label: "Off";
3477
+ readonly description: "Disable security scanning";
3478
+ }, {
3479
+ readonly value: "block";
3480
+ readonly label: "Block";
3481
+ readonly description: "Deny install when risk score exceeds threshold";
3482
+ }];
3483
+ };
3484
+ };
3485
+ readonly "plugins.security.riskThreshold": {
3486
+ readonly type: "number";
3487
+ readonly default: 60;
3488
+ readonly validate: (value: number) => boolean;
3489
+ readonly ui: {
3490
+ readonly tab: "interaction";
3491
+ readonly label: "Plugin Security Risk Threshold";
3492
+ readonly description: "Score threshold (0\u2013100) above which block mode denies install. Default 60.";
3493
+ };
3494
+ };
3436
3495
  };
3437
3496
  type Schema = typeof SETTINGS_SCHEMA;
3438
3497
  /** All valid setting paths */
@@ -3585,6 +3644,17 @@ export interface ShellMinimizerSettings {
3585
3644
  except: string[];
3586
3645
  maxCaptureBytes: number;
3587
3646
  }
3647
+ export interface NotificationsSettings {
3648
+ enabled: boolean;
3649
+ telegram: {
3650
+ botToken: string | undefined;
3651
+ chatId: string | undefined;
3652
+ };
3653
+ redact: boolean;
3654
+ daemon: {
3655
+ idleTimeoutMs: number;
3656
+ };
3657
+ }
3588
3658
  /** Map group prefix -> typed settings interface */
3589
3659
  export interface GroupTypeMap {
3590
3660
  compaction: CompactionSettings;
@@ -3603,6 +3673,7 @@ export interface GroupTypeMap {
3603
3673
  modelTags: ModelTagsSettings;
3604
3674
  cycleOrder: string[];
3605
3675
  shellMinimizer: ShellMinimizerSettings;
3676
+ notifications: NotificationsSettings;
3606
3677
  }
3607
3678
  export type GroupPrefix = keyof GroupTypeMap;
3608
3679
  export {};
@@ -1,4 +1,4 @@
1
1
  export declare const COORDINATOR_MCP_PROTOCOL_VERSION = "2024-11-05";
2
2
  export declare const COORDINATOR_MCP_SERVER_NAME = "skc-coordinator-mcp";
3
- export declare const COORDINATOR_MCP_TOOL_NAMES: readonly ["skc_coordinator_list_sessions", "skc_coordinator_read_status", "skc_coordinator_read_tail", "skc_coordinator_list_questions", "skc_coordinator_list_artifacts", "skc_coordinator_read_artifact", "skc_coordinator_read_coordination_status", "skc_coordinator_watch_events", "skc_coordinator_register_session", "skc_coordinator_start_session", "skc_coordinator_send_prompt", "skc_coordinator_submit_question_answer", "skc_coordinator_read_turn", "skc_coordinator_await_turn", "skc_coordinator_report_status"];
3
+ export declare const COORDINATOR_MCP_TOOL_NAMES: readonly ["skc_coordinator_list_sessions", "skc_coordinator_read_status", "skc_coordinator_read_tail", "skc_coordinator_list_questions", "skc_coordinator_list_artifacts", "skc_coordinator_read_artifact", "skc_coordinator_read_coordination_status", "skc_coordinator_watch_events", "skc_coordinator_register_session", "skc_coordinator_start_session", "skc_coordinator_send_prompt", "skc_coordinator_submit_question_answer", "skc_coordinator_read_turn", "skc_coordinator_await_turn", "skc_coordinator_report_status", "skc_delegate_plan", "skc_delegate_execute", "skc_delegate_team"];
4
4
  export type CoordinatorToolName = (typeof COORDINATOR_MCP_TOOL_NAMES)[number];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Static built-in daemon controller map.
3
+ *
4
+ * Intentionally a static map keyed by daemon kind rather than a mutable plugin
5
+ * registry: there is exactly one kind today (`telegram`). Promote to a richer
6
+ * registry only when a second daemon kind exists.
7
+ */
8
+ import type { Settings } from "../config/settings";
9
+ import { type TelegramDaemonControlDeps } from "../notifications/telegram-daemon-control";
10
+ import type { BuiltInDaemonController, DaemonKind } from "./control-types";
11
+ export declare const BUILT_IN_DAEMON_KINDS: readonly ["telegram"];
12
+ export interface BuiltInDaemonControllerDeps {
13
+ telegram?: TelegramDaemonControlDeps;
14
+ }
15
+ export declare function createBuiltInDaemonControllers(settings: Settings, deps?: BuiltInDaemonControllerDeps): Record<DaemonKind, BuiltInDaemonController>;
16
+ /**
17
+ * Resolve the controllers a command should act on. `--all` selects every
18
+ * built-in kind; otherwise the explicit `kinds` (defaulting to `telegram`).
19
+ */
20
+ export declare function selectDaemonControllers(settings: Settings, kinds: DaemonKind[] | undefined, all: boolean, deps?: BuiltInDaemonControllerDeps): BuiltInDaemonController[];
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Public types for the `skc daemon` control plane.
3
+ *
4
+ * Deliberately compact: a small result/status surface plus a built-in
5
+ * controller contract. There is exactly one daemon kind today (`telegram`);
6
+ * a richer registry is intentionally deferred until a second kind exists.
7
+ */
8
+ export type DaemonKind = "telegram";
9
+ export type DaemonAction = "list" | "status" | "stop" | "reload";
10
+ export type DaemonHealth = "not_configured" | "stopped" | "running" | "stale" | "stopping" | "error";
11
+ export interface DaemonRuntimeInfo {
12
+ /** `source` when respawn goes through bun/node + the entry script; `compiled` for a single-file binary. */
13
+ mode: "source" | "compiled";
14
+ execPath: string;
15
+ /** True only in source/dev mode, where a respawn loads amended TypeScript directly. */
16
+ reloadPicksUpSourceEdits: boolean;
17
+ /** Present when the runtime mode constrains what reload can achieve (e.g. compiled binary). */
18
+ warning?: string;
19
+ }
20
+ export interface DaemonStatus {
21
+ kind: DaemonKind;
22
+ configured: boolean;
23
+ health: DaemonHealth;
24
+ pid?: number;
25
+ ownerId?: string;
26
+ startedAt?: number;
27
+ heartbeatAt?: number;
28
+ roots?: string[];
29
+ rootCount?: number;
30
+ runtime: DaemonRuntimeInfo;
31
+ detail?: string;
32
+ }
33
+ export interface DaemonOperationOptions {
34
+ /** How long to wait for cooperative release before escalating. */
35
+ gracefulTimeoutMs?: number;
36
+ /** How long to wait for the old pid to die after SIGKILL. */
37
+ killTimeoutMs?: number;
38
+ /** Allow hard-kill escalation / acting on a still-live owner. */
39
+ force?: boolean;
40
+ /** For reload: spawn a fresh owner even when none is currently running. */
41
+ spawnIfStopped?: boolean;
42
+ }
43
+ export interface DaemonOperationResult {
44
+ kind: DaemonKind;
45
+ action: Exclude<DaemonAction, "list">;
46
+ ok: boolean;
47
+ before?: DaemonStatus;
48
+ after?: DaemonStatus;
49
+ warnings: string[];
50
+ message: string;
51
+ }
52
+ export interface BuiltInDaemonController {
53
+ readonly kind: DaemonKind;
54
+ status(): Promise<DaemonStatus>;
55
+ stop(opts?: DaemonOperationOptions): Promise<DaemonOperationResult>;
56
+ reload(opts?: DaemonOperationOptions): Promise<DaemonOperationResult>;
57
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Shared source-vs-compiled runtime detection for daemon spawning.
3
+ *
4
+ * Centralizes the logic previously embedded in `ensureTelegramDaemonRunning`
5
+ * so session autostart, reload, and status reporting agree on how a daemon
6
+ * process is launched and whether a reload can pick up amended source.
7
+ */
8
+ export interface SkcRuntimeSpawnInfo {
9
+ execPath: string;
10
+ mode: "source" | "compiled";
11
+ /** Prefix prepended before the skc subcommand args; `[Bun.main]` in source mode, otherwise `[]`. */
12
+ argsPrefix: string[];
13
+ /** True only when respawn loads edited TypeScript directly (source/dev mode). */
14
+ reloadPicksUpSourceEdits: boolean;
15
+ /** Set in compiled mode to explain that a rebuild is required before reload picks up source edits. */
16
+ warning?: string;
17
+ }
18
+ /**
19
+ * Resolve how to spawn a detached skc subcommand for the current runtime.
20
+ *
21
+ * Source/dev mode (bun/node) prepends the entry script (`Bun.main`) so the
22
+ * respawn loads edited source. A compiled single-file binary self-spawns its
23
+ * own subcommand directly and cannot pick up workspace source edits.
24
+ */
25
+ export declare function resolveSkcRuntimeSpawnInfo(execPath?: string): SkcRuntimeSpawnInfo;
@@ -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" | "rule";
4
4
  export type EmbeddedDefaultSkcSkill = {
5
5
  name: DefaultSkcDefinitionName;
6
6
  description: string;
@@ -23,7 +23,13 @@ export interface DefaultSkcSkillFragmentDefinition {
23
23
  relativePath: string;
24
24
  content: string;
25
25
  }
26
- export type DefaultSkcDefinition = DefaultSkcSkillDefinition | DefaultSkcSkillFragmentDefinition;
26
+ export interface DefaultSkcRuleDefinition {
27
+ kind: "rule";
28
+ name: string;
29
+ relativePath: string;
30
+ content: string;
31
+ }
32
+ export type DefaultSkcDefinition = DefaultSkcSkillDefinition | DefaultSkcSkillFragmentDefinition | DefaultSkcRuleDefinition;
27
33
  export interface InstallDefaultSkcDefinitionsOptions {
28
34
  check?: boolean;
29
35
  force?: boolean;
@@ -39,6 +45,11 @@ export type DefaultSkcDefinitionInstallFile = {
39
45
  parentSkillName: DefaultSkcDefinitionName;
40
46
  path: string;
41
47
  status: DefaultSkcInstallStatus;
48
+ } | {
49
+ kind: "rule";
50
+ name: string;
51
+ path: string;
52
+ status: DefaultSkcInstallStatus;
42
53
  };
43
54
  export interface DefaultSkcDefinitionInstallResult {
44
55
  targetRoot: string;
@@ -20,6 +20,7 @@ import type { PythonResult } from "../../eval/py/executor";
20
20
  import type { BashResult } from "../../exec/bash-executor";
21
21
  import type { ExecOptions, ExecResult } from "../../exec/exec";
22
22
  import type { CustomEditor } from "../../modes/components/custom-editor";
23
+ import type { WorkflowGateEmitter } from "../../modes/shared/agent-wire/unattended-session";
23
24
  import type { Theme } from "../../modes/theme/theme";
24
25
  import type { CustomMessage } from "../../session/messages";
25
26
  import type { ReadonlySessionManager, SessionManager } from "../../session/session-manager";
@@ -206,6 +207,11 @@ export interface ExtensionContext {
206
207
  getSystemPrompt(): string[];
207
208
  /** @deprecated Use hasPendingMessages() instead */
208
209
  hasQueuedMessages(): boolean;
210
+ /**
211
+ * Unattended workflow-gate bridge. Present only when the session runs in
212
+ * unattended/RPC mode; `undefined` in interactive/TUI mode (notify-only).
213
+ */
214
+ workflowGate?: WorkflowGateEmitter;
209
215
  }
210
216
  /**
211
217
  * Extended context for command handlers.
@@ -834,6 +840,8 @@ export interface ExtensionContextActions {
834
840
  getContextUsage: () => ContextUsage | undefined;
835
841
  compact: (instructionsOrOptions?: string | CompactOptions) => Promise<void>;
836
842
  getSystemPrompt: () => string[];
843
+ /** Unattended workflow-gate bridge (present only in unattended/RPC mode). */
844
+ getWorkflowGate?: () => WorkflowGateEmitter | undefined;
837
845
  }
838
846
  /** Actions for ExtensionCommandContext (ctx.* in command handlers). */
839
847
  export interface ExtensionCommandContextActions {
@@ -4,4 +4,5 @@ export * from "./loader";
4
4
  export * from "./manager";
5
5
  export * from "./marketplace";
6
6
  export * from "./parser";
7
+ export * from "./security-scanner";
7
8
  export type * from "./types";
@@ -0,0 +1,31 @@
1
+ import type { DoctorCheck } from "./types";
2
+ export type RiskLevel = "none" | "low" | "medium" | "high";
3
+ export type FindingCategory = "credential" | "execution" | "network" | "obfuscation" | "package_install" | "persistence";
4
+ export interface SecurityFinding {
5
+ category: FindingCategory;
6
+ id: string;
7
+ label: string;
8
+ severity: "low" | "medium" | "high";
9
+ file: string;
10
+ line?: number;
11
+ snippet?: string;
12
+ }
13
+ export interface ScanReport {
14
+ findings: SecurityFinding[];
15
+ networkUrls: string[];
16
+ riskLevel: RiskLevel;
17
+ score: number;
18
+ reasoning: string;
19
+ recommendation: string;
20
+ }
21
+ /**
22
+ * Recursively scan `dir` for risky patterns.
23
+ * Never throws — on any top-level error returns an empty safe report.
24
+ */
25
+ export declare function scanPluginDir(dir: string): Promise<ScanReport>;
26
+ /**
27
+ * Convert a ScanReport into DoctorCheck entries for the plugin health check.
28
+ * Returns [] when riskLevel is "none".
29
+ * NEVER emits status:"error" — advisory only.
30
+ */
31
+ export declare function toDoctorChecks(pluginName: string, report: ScanReport): DoctorCheck[];