@pellux/goodvibes-sdk 0.25.10 → 0.25.12
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/_internal/contracts/artifacts/operator-contract.json +178 -6
- package/dist/_internal/contracts/generated/foundation-client-types.d.ts +16 -1
- package/dist/_internal/contracts/generated/foundation-client-types.d.ts.map +1 -1
- package/dist/_internal/contracts/generated/foundation-metadata.d.ts +2 -2
- package/dist/_internal/contracts/generated/foundation-metadata.js +2 -2
- package/dist/_internal/contracts/generated/operator-contract.d.ts.map +1 -1
- package/dist/_internal/contracts/generated/operator-contract.js +178 -6
- package/dist/_internal/contracts/generated/operator-method-ids.d.ts +1 -1
- package/dist/_internal/contracts/generated/operator-method-ids.d.ts.map +1 -1
- package/dist/_internal/contracts/generated/operator-method-ids.js +1 -0
- package/dist/_internal/daemon/context.d.ts +1 -0
- package/dist/_internal/daemon/context.d.ts.map +1 -1
- package/dist/_internal/daemon/integration-route-types.d.ts +1 -0
- package/dist/_internal/daemon/integration-route-types.d.ts.map +1 -1
- package/dist/_internal/daemon/integration-routes.d.ts +1 -1
- package/dist/_internal/daemon/integration-routes.d.ts.map +1 -1
- package/dist/_internal/daemon/integration-routes.js +3 -0
- package/dist/_internal/daemon/operator.d.ts +1 -1
- package/dist/_internal/daemon/operator.d.ts.map +1 -1
- package/dist/_internal/daemon/operator.js +2 -0
- package/dist/_internal/daemon/runtime-route-types.d.ts +1 -1
- package/dist/_internal/daemon/runtime-route-types.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/discord/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/discord/index.js +4 -5
- package/dist/_internal/platform/adapters/github/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/github/index.js +4 -5
- package/dist/_internal/platform/adapters/google-chat/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/google-chat/index.js +7 -5
- package/dist/_internal/platform/adapters/helpers.d.ts +2 -1
- package/dist/_internal/platform/adapters/helpers.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/helpers.js +3 -34
- package/dist/_internal/platform/adapters/homeassistant/index.d.ts +3 -0
- package/dist/_internal/platform/adapters/homeassistant/index.d.ts.map +1 -0
- package/dist/_internal/platform/adapters/homeassistant/index.js +185 -0
- package/dist/_internal/platform/adapters/index.d.ts +1 -0
- package/dist/_internal/platform/adapters/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/index.js +1 -0
- package/dist/_internal/platform/adapters/mattermost/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/mattermost/index.js +6 -2
- package/dist/_internal/platform/adapters/slack/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/slack/index.js +4 -5
- package/dist/_internal/platform/adapters/telegram/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/telegram/index.js +7 -5
- package/dist/_internal/platform/adapters/types.d.ts +1 -1
- package/dist/_internal/platform/adapters/types.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/webhook/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/webhook/index.js +4 -1
- package/dist/_internal/platform/automation/types.d.ts +1 -1
- package/dist/_internal/platform/automation/types.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/accounts.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/accounts.js +23 -0
- package/dist/_internal/platform/channels/builtin/contracts.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/contracts.js +9 -0
- package/dist/_internal/platform/channels/builtin/descriptors.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/descriptors.js +9 -2
- package/dist/_internal/platform/channels/builtin/homeassistant.d.ts +64 -0
- package/dist/_internal/platform/channels/builtin/homeassistant.d.ts.map +1 -0
- package/dist/_internal/platform/channels/builtin/homeassistant.js +391 -0
- package/dist/_internal/platform/channels/builtin/plugins.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/plugins.js +2 -1
- package/dist/_internal/platform/channels/builtin/presentation.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/presentation.js +4 -0
- package/dist/_internal/platform/channels/builtin/rendering.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/rendering.js +7 -0
- package/dist/_internal/platform/channels/builtin/setup-schema.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/setup-schema.js +53 -0
- package/dist/_internal/platform/channels/builtin/shared.d.ts +1 -1
- package/dist/_internal/platform/channels/builtin/shared.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/shared.js +2 -0
- package/dist/_internal/platform/channels/builtin/surfaces.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/surfaces.js +1 -0
- package/dist/_internal/platform/channels/builtin/targets.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/targets.js +24 -0
- package/dist/_internal/platform/channels/builtin-runtime.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin-runtime.js +6 -0
- package/dist/_internal/platform/channels/delivery/strategies-core.d.ts +1 -0
- package/dist/_internal/platform/channels/delivery/strategies-core.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery/strategies-core.js +60 -1
- package/dist/_internal/platform/channels/delivery/types.d.ts +2 -0
- package/dist/_internal/platform/channels/delivery/types.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery-router.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery-router.js +2 -1
- package/dist/_internal/platform/channels/reply-pipeline.d.ts.map +1 -1
- package/dist/_internal/platform/channels/reply-pipeline.js +9 -0
- package/dist/_internal/platform/channels/route-manager.d.ts.map +1 -1
- package/dist/_internal/platform/channels/route-manager.js +1 -0
- package/dist/_internal/platform/channels/surface-registry.d.ts.map +1 -1
- package/dist/_internal/platform/channels/surface-registry.js +4 -0
- package/dist/_internal/platform/channels/types.d.ts +1 -1
- package/dist/_internal/platform/channels/types.d.ts.map +1 -1
- package/dist/_internal/platform/cloudflare/manager.d.ts +1 -1
- package/dist/_internal/platform/cloudflare/manager.d.ts.map +1 -1
- package/dist/_internal/platform/cloudflare/manager.js +27 -24
- package/dist/_internal/platform/cloudflare/types.d.ts +5 -0
- package/dist/_internal/platform/cloudflare/types.d.ts.map +1 -1
- package/dist/_internal/platform/cloudflare/utils.d.ts.map +1 -1
- package/dist/_internal/platform/cloudflare/utils.js +4 -10
- package/dist/_internal/platform/companion/companion-chat-manager.d.ts +24 -4
- package/dist/_internal/platform/companion/companion-chat-manager.d.ts.map +1 -1
- package/dist/_internal/platform/companion/companion-chat-manager.js +128 -78
- package/dist/_internal/platform/config/schema-domain-surfaces.d.ts +12 -0
- package/dist/_internal/platform/config/schema-domain-surfaces.d.ts.map +1 -1
- package/dist/_internal/platform/config/schema-domain-surfaces.js +67 -0
- package/dist/_internal/platform/config/schema-types.d.ts +15 -2
- package/dist/_internal/platform/config/schema-types.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/gateway-utils.d.ts +37 -0
- package/dist/_internal/platform/control-plane/gateway-utils.d.ts.map +1 -0
- package/dist/_internal/platform/control-plane/gateway-utils.js +97 -0
- package/dist/_internal/platform/control-plane/gateway.d.ts +4 -9
- package/dist/_internal/platform/control-plane/gateway.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/gateway.js +26 -61
- package/dist/_internal/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/method-catalog-runtime.js +11 -1
- package/dist/_internal/platform/control-plane/operator-contract-schemas-admin.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/operator-contract-schemas-admin.js +3 -2
- package/dist/_internal/platform/control-plane/operator-contract-schemas-control.d.ts +1 -0
- package/dist/_internal/platform/control-plane/operator-contract-schemas-control.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/operator-contract-schemas-control.js +26 -0
- package/dist/_internal/platform/control-plane/routes/operator.d.ts +1 -1
- package/dist/_internal/platform/control-plane/routes/operator.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/routes/operator.js +2 -0
- package/dist/_internal/platform/control-plane/session-types.d.ts +2 -1
- package/dist/_internal/platform/control-plane/session-types.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/types.d.ts +1 -1
- package/dist/_internal/platform/control-plane/types.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/control-plane.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/control-plane.js +50 -6
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +30 -2
- package/dist/_internal/platform/daemon/facade-types.d.ts +1 -1
- package/dist/_internal/platform/daemon/facade-types.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/homeassistant-routes.d.ts +40 -0
- package/dist/_internal/platform/daemon/http/homeassistant-routes.d.ts.map +1 -0
- package/dist/_internal/platform/daemon/http/homeassistant-routes.js +468 -0
- package/dist/_internal/platform/daemon/http/router.d.ts +4 -2
- package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/router.js +28 -16
- package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts +1 -1
- package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http-listener.js +4 -8
- package/dist/_internal/platform/daemon/surface-actions.d.ts +1 -1
- package/dist/_internal/platform/daemon/surface-actions.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/surface-delivery.d.ts +1 -1
- package/dist/_internal/platform/daemon/surface-delivery.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/surface-delivery.js +15 -0
- package/dist/_internal/platform/daemon/surface-policy.d.ts +1 -1
- package/dist/_internal/platform/daemon/surface-policy.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/surface-policy.js +8 -0
- package/dist/_internal/platform/daemon/types.d.ts +3 -3
- package/dist/_internal/platform/daemon/types.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/homeassistant.d.ts +62 -0
- package/dist/_internal/platform/integrations/homeassistant.d.ts.map +1 -0
- package/dist/_internal/platform/integrations/homeassistant.js +174 -0
- package/dist/_internal/platform/integrations/index.d.ts +2 -0
- package/dist/_internal/platform/integrations/index.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/index.js +1 -0
- package/dist/_internal/platform/runtime/events/control-plane.d.ts +1 -1
- package/dist/_internal/platform/runtime/events/control-plane.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/control-plane.js +1 -0
- package/dist/_internal/platform/runtime/events/routes.d.ts +1 -1
- package/dist/_internal/platform/runtime/events/routes.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/routes.js +1 -0
- package/dist/_internal/platform/runtime/feature-flags/flags.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/feature-flags/flags.js +9 -0
- package/dist/_internal/platform/runtime/feature-flags/gates.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/feature-flags/gates.js +2 -0
- package/dist/_internal/platform/runtime/index.d.ts +2 -0
- package/dist/_internal/platform/runtime/index.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/index.js +1 -0
- package/dist/_internal/platform/runtime/integration/helpers.d.ts +4 -0
- package/dist/_internal/platform/runtime/integration/helpers.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/integration/helpers.js +4 -0
- package/dist/_internal/platform/runtime/security-settings.d.ts +19 -0
- package/dist/_internal/platform/runtime/security-settings.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/security-settings.js +187 -0
- package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.js +1 -0
- package/dist/_internal/platform/security/user-auth.d.ts +1 -1
- package/dist/_internal/platform/security/user-auth.d.ts.map +1 -1
- package/dist/_internal/platform/security/user-auth.js +18 -3
- package/dist/_internal/platform/tools/edit/core.d.ts.map +1 -1
- package/dist/_internal/platform/tools/edit/core.js +4 -47
- package/dist/_internal/platform/tools/exec/runtime.d.ts.map +1 -1
- package/dist/_internal/platform/tools/exec/runtime.js +7 -1
- package/dist/_internal/platform/tools/exec/schema.d.ts +1 -0
- package/dist/_internal/platform/tools/exec/schema.d.ts.map +1 -1
- package/dist/_internal/platform/tools/exec/schema.js +1 -0
- package/dist/_internal/platform/tools/fetch/runtime.d.ts.map +1 -1
- package/dist/_internal/platform/tools/fetch/runtime.js +140 -19
- package/dist/_internal/platform/tools/fetch/schema.d.ts +1 -0
- package/dist/_internal/platform/tools/fetch/schema.d.ts.map +1 -1
- package/dist/_internal/platform/tools/fetch/schema.js +1 -0
- package/dist/_internal/platform/tools/find/executor.d.ts.map +1 -1
- package/dist/_internal/platform/tools/find/executor.js +7 -1
- package/dist/_internal/platform/tools/find/schema.d.ts.map +1 -1
- package/dist/_internal/platform/tools/find/schema.js +2 -0
- package/dist/_internal/platform/tools/read/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/read/index.js +7 -1
- package/dist/_internal/platform/tools/read/schema.d.ts +1 -0
- package/dist/_internal/platform/tools/read/schema.d.ts.map +1 -1
- package/dist/_internal/platform/tools/read/schema.js +1 -0
- package/dist/_internal/platform/tools/shared/process-manager.d.ts +2 -0
- package/dist/_internal/platform/tools/shared/process-manager.d.ts.map +1 -1
- package/dist/_internal/platform/tools/shared/process-manager.js +67 -5
- package/dist/_internal/platform/tools/write/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/write/index.js +3 -36
- package/dist/_internal/platform/utils/concurrency.d.ts +3 -0
- package/dist/_internal/platform/utils/concurrency.d.ts.map +1 -0
- package/dist/_internal/platform/utils/concurrency.js +17 -0
- package/dist/_internal/platform/utils/logger.d.ts.map +1 -1
- package/dist/_internal/platform/utils/logger.js +19 -1
- package/dist/_internal/platform/utils/request-body.d.ts +4 -0
- package/dist/_internal/platform/utils/request-body.d.ts.map +1 -0
- package/dist/_internal/platform/utils/request-body.js +45 -0
- package/dist/_internal/platform/version.js +1 -1
- package/dist/workers.d.ts +6 -0
- package/dist/workers.d.ts.map +1 -1
- package/dist/workers.js +55 -3
- package/package.json +1 -1
|
@@ -12,16 +12,10 @@ export function buildTokenRequirements(components, includeBootstrap) {
|
|
|
12
12
|
if (includeBootstrap) {
|
|
13
13
|
requirements.push({
|
|
14
14
|
component: 'bootstrap',
|
|
15
|
-
scope: '
|
|
16
|
-
permission: '
|
|
17
|
-
alternatives: ['API Tokens
|
|
18
|
-
reason: 'Create the narrower GoodVibes operational token from the temporary bootstrap token.',
|
|
19
|
-
}, {
|
|
20
|
-
component: 'bootstrap',
|
|
21
|
-
scope: 'account',
|
|
22
|
-
permission: 'Account Settings Read',
|
|
23
|
-
alternatives: ['Account Read'],
|
|
24
|
-
reason: 'Read the selected Cloudflare account during bootstrap validation.',
|
|
15
|
+
scope: 'user',
|
|
16
|
+
permission: 'API Tokens Write',
|
|
17
|
+
alternatives: ['API Tokens Edit'],
|
|
18
|
+
reason: 'Create the narrower GoodVibes operational user token from the temporary bootstrap token.',
|
|
25
19
|
});
|
|
26
20
|
}
|
|
27
21
|
if (components.workers) {
|
|
@@ -19,13 +19,15 @@
|
|
|
19
19
|
* for that specific session — never the global TUI event feed.
|
|
20
20
|
* - A GC sweep closes sessions that have been idle beyond the TTL.
|
|
21
21
|
*/
|
|
22
|
+
import type { ProviderMessage } from '../providers/interface.js';
|
|
22
23
|
import type { CompanionChatMessage, CompanionChatSession, CreateCompanionChatSessionInput, UpdateCompanionChatSessionInput } from './companion-chat-types.js';
|
|
23
24
|
import type { CompanionChatRateLimiterOptions } from './companion-chat-rate-limiter.js';
|
|
24
25
|
import type { ToolRegistry } from '../tools/registry.js';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
26
|
+
import type { ToolDefinition } from '../types/tools.js';
|
|
27
|
+
import type { PermissionManager } from '../permissions/manager.js';
|
|
28
|
+
import type { RuntimeEventBus } from '../runtime/events/index.js';
|
|
29
|
+
import type { HookEvent, HookResult } from '../hooks/types.js';
|
|
30
|
+
export type CompanionProviderMessage = ProviderMessage;
|
|
29
31
|
export interface CompanionProviderChunk {
|
|
30
32
|
readonly type: 'text_delta' | 'tool_call' | 'tool_result' | 'done' | 'error';
|
|
31
33
|
readonly delta?: string;
|
|
@@ -42,9 +44,13 @@ export interface CompanionLLMProvider {
|
|
|
42
44
|
readonly systemPrompt?: string | null;
|
|
43
45
|
readonly model?: string | null;
|
|
44
46
|
readonly provider?: string | null;
|
|
47
|
+
readonly tools?: readonly ToolDefinition[];
|
|
45
48
|
readonly abortSignal?: AbortSignal;
|
|
46
49
|
}): AsyncIterable<CompanionProviderChunk>;
|
|
47
50
|
}
|
|
51
|
+
type HookDispatcherLike = {
|
|
52
|
+
fire(event: HookEvent): Promise<HookResult>;
|
|
53
|
+
};
|
|
48
54
|
export interface CompanionChatEventPublisher {
|
|
49
55
|
publishEvent(event: string, payload: unknown, filter?: {
|
|
50
56
|
clientId?: string;
|
|
@@ -65,6 +71,15 @@ export interface CompanionChatManagerConfig {
|
|
|
65
71
|
* the LLM receives no tool result and must degrade gracefully.
|
|
66
72
|
*/
|
|
67
73
|
readonly toolRegistry?: ToolRegistry;
|
|
74
|
+
/**
|
|
75
|
+
* Permission boundary used when executing model-originated tool calls.
|
|
76
|
+
* Tool calls are denied when a registry is present without this manager.
|
|
77
|
+
*/
|
|
78
|
+
readonly permissionManager?: PermissionManager | null;
|
|
79
|
+
/** Optional hook dispatcher for Pre/Post/Fail tool hooks. */
|
|
80
|
+
readonly hookDispatcher?: HookDispatcherLike | null;
|
|
81
|
+
/** Optional runtime event bus for typed tool telemetry. */
|
|
82
|
+
readonly runtimeBus?: RuntimeEventBus | null;
|
|
68
83
|
/**
|
|
69
84
|
* Directory under which session JSON files are persisted.
|
|
70
85
|
* Default: ~/.goodvibes/companion-chat/sessions/
|
|
@@ -89,6 +104,9 @@ export declare class CompanionChatManager {
|
|
|
89
104
|
private readonly provider;
|
|
90
105
|
private readonly eventPublisher;
|
|
91
106
|
private readonly toolRegistry;
|
|
107
|
+
private readonly permissionManager;
|
|
108
|
+
private readonly hookDispatcher;
|
|
109
|
+
private readonly runtimeBus;
|
|
92
110
|
private readonly persistence;
|
|
93
111
|
private readonly rateLimiter;
|
|
94
112
|
private readonly idleActiveMs;
|
|
@@ -145,6 +163,7 @@ export declare class CompanionChatManager {
|
|
|
145
163
|
private _postMessageInternal;
|
|
146
164
|
dispose(): void;
|
|
147
165
|
private _runTurn;
|
|
166
|
+
private _executeToolCalls;
|
|
148
167
|
_gcSweep(): void;
|
|
149
168
|
private _updateMeta;
|
|
150
169
|
/**
|
|
@@ -157,4 +176,5 @@ export declare class CompanionChatManager {
|
|
|
157
176
|
private _doSave;
|
|
158
177
|
private resolvePendingReply;
|
|
159
178
|
}
|
|
179
|
+
export {};
|
|
160
180
|
//# sourceMappingURL=companion-chat-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-chat-manager.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/companion/companion-chat-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EAGpB,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"companion-chat-manager.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/companion/companion-chat-manager.ts"],"names":[],"mappings":"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"}
|
|
@@ -23,17 +23,22 @@ import { randomUUID } from 'node:crypto';
|
|
|
23
23
|
import { ConversationManager } from '../core/conversation.js';
|
|
24
24
|
import { CompanionChatPersistence, defaultSessionsDir, } from './companion-chat-persistence.js';
|
|
25
25
|
import { CompanionChatRateLimiter } from './companion-chat-rate-limiter.js';
|
|
26
|
+
import { executeToolCalls as executeOrchestratorToolCalls } from '../core/orchestrator-tool-runtime.js';
|
|
26
27
|
// ---------------------------------------------------------------------------
|
|
27
28
|
// Idle GC constants (customisable for tests)
|
|
28
29
|
// ---------------------------------------------------------------------------
|
|
29
30
|
const DEFAULT_IDLE_ACTIVE_MS = 30 * 60 * 1_000; // 30 minutes with messages
|
|
30
31
|
const DEFAULT_IDLE_EMPTY_MS = 5 * 60 * 1_000; // 5 minutes empty session
|
|
31
32
|
const GC_INTERVAL_MS = 60 * 1_000; // sweep every minute
|
|
33
|
+
const MAX_TOOL_ROUNDS_PER_TURN = 8;
|
|
32
34
|
export class CompanionChatManager {
|
|
33
35
|
sessions = new Map();
|
|
34
36
|
provider;
|
|
35
37
|
eventPublisher;
|
|
36
38
|
toolRegistry;
|
|
39
|
+
permissionManager;
|
|
40
|
+
hookDispatcher;
|
|
41
|
+
runtimeBus;
|
|
37
42
|
persistence;
|
|
38
43
|
rateLimiter;
|
|
39
44
|
idleActiveMs;
|
|
@@ -52,6 +57,9 @@ export class CompanionChatManager {
|
|
|
52
57
|
this.provider = config.provider;
|
|
53
58
|
this.eventPublisher = config.eventPublisher;
|
|
54
59
|
this.toolRegistry = config.toolRegistry ?? null;
|
|
60
|
+
this.permissionManager = config.permissionManager ?? null;
|
|
61
|
+
this.hookDispatcher = config.hookDispatcher ?? null;
|
|
62
|
+
this.runtimeBus = config.runtimeBus ?? null;
|
|
55
63
|
this.idleActiveMs = config.idleActiveMs ?? DEFAULT_IDLE_ACTIVE_MS;
|
|
56
64
|
this.idleEmptyMs = config.idleEmptyMs ?? DEFAULT_IDLE_EMPTY_MS;
|
|
57
65
|
// Persistence
|
|
@@ -309,91 +317,82 @@ export class CompanionChatManager {
|
|
|
309
317
|
let assistantContent = '';
|
|
310
318
|
const assistantMessageId = randomUUID();
|
|
311
319
|
try {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
break;
|
|
327
|
-
switch (chunk.type) {
|
|
328
|
-
case 'text_delta': {
|
|
329
|
-
const delta = chunk.delta ?? '';
|
|
330
|
-
assistantContent += delta;
|
|
331
|
-
publish({ type: 'turn.delta', sessionId, turnId, delta });
|
|
320
|
+
const toolDefinitions = this.toolRegistry?.getToolDefinitions() ?? [];
|
|
321
|
+
let completed = false;
|
|
322
|
+
for (let round = 0; round < MAX_TOOL_ROUNDS_PER_TURN; round++) {
|
|
323
|
+
const stream = this.provider.chatStream([...session.conversation.getMessagesForLLM()], {
|
|
324
|
+
systemPrompt: session.meta.systemPrompt,
|
|
325
|
+
model: session.meta.model,
|
|
326
|
+
provider: session.meta.provider,
|
|
327
|
+
tools: toolDefinitions,
|
|
328
|
+
abortSignal,
|
|
329
|
+
});
|
|
330
|
+
let roundAssistantContent = '';
|
|
331
|
+
const toolCalls = [];
|
|
332
|
+
for await (const chunk of stream) {
|
|
333
|
+
if (abortSignal.aborted)
|
|
332
334
|
break;
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
turnId,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
if (this.toolRegistry && chunk.toolName && chunk.toolCallId) {
|
|
345
|
-
const toolCallId = chunk.toolCallId;
|
|
346
|
-
const toolName = chunk.toolName;
|
|
335
|
+
switch (chunk.type) {
|
|
336
|
+
case 'text_delta': {
|
|
337
|
+
const delta = chunk.delta ?? '';
|
|
338
|
+
roundAssistantContent += delta;
|
|
339
|
+
assistantContent += delta;
|
|
340
|
+
publish({ type: 'turn.delta', sessionId, turnId, delta });
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
case 'tool_call': {
|
|
344
|
+
const toolCallId = chunk.toolCallId ?? '';
|
|
345
|
+
const toolName = chunk.toolName ?? '';
|
|
347
346
|
const toolInput = (chunk.toolInput ?? {});
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
catch (toolErr) {
|
|
361
|
-
const errMsg = toolErr instanceof Error ? toolErr.message : String(toolErr);
|
|
362
|
-
publish({
|
|
363
|
-
type: 'turn.tool_result',
|
|
364
|
-
sessionId,
|
|
365
|
-
turnId,
|
|
366
|
-
toolCallId,
|
|
367
|
-
toolName,
|
|
368
|
-
result: errMsg,
|
|
369
|
-
isError: true,
|
|
370
|
-
});
|
|
347
|
+
publish({
|
|
348
|
+
type: 'turn.tool_call',
|
|
349
|
+
sessionId,
|
|
350
|
+
turnId,
|
|
351
|
+
toolCallId,
|
|
352
|
+
toolName,
|
|
353
|
+
toolInput,
|
|
354
|
+
});
|
|
355
|
+
if (toolCallId && toolName) {
|
|
356
|
+
toolCalls.push({ id: toolCallId, name: toolName, arguments: toolInput });
|
|
371
357
|
}
|
|
358
|
+
break;
|
|
372
359
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
360
|
+
case 'tool_result': {
|
|
361
|
+
publish({
|
|
362
|
+
type: 'turn.tool_result',
|
|
363
|
+
sessionId,
|
|
364
|
+
turnId,
|
|
365
|
+
toolCallId: chunk.toolCallId ?? '',
|
|
366
|
+
toolName: chunk.toolName ?? '',
|
|
367
|
+
result: chunk.result ?? null,
|
|
368
|
+
isError: chunk.isError ?? false,
|
|
369
|
+
});
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
case 'error': {
|
|
373
|
+
throw new Error(chunk.error ?? 'Provider streaming error');
|
|
374
|
+
}
|
|
375
|
+
case 'done':
|
|
376
|
+
break;
|
|
389
377
|
}
|
|
390
|
-
case 'done':
|
|
391
|
-
break;
|
|
392
378
|
}
|
|
379
|
+
if (abortSignal.aborted)
|
|
380
|
+
break;
|
|
381
|
+
if (toolCalls.length === 0) {
|
|
382
|
+
session.conversation.addAssistantMessage(roundAssistantContent);
|
|
383
|
+
completed = true;
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
session.conversation.addAssistantMessage(roundAssistantContent, { toolCalls });
|
|
387
|
+
if (!this.toolRegistry) {
|
|
388
|
+
completed = true;
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
const toolResults = await this._executeToolCalls(toolCalls, publish, sessionId, turnId);
|
|
392
|
+
session.conversation.addToolResults(toolResults);
|
|
393
393
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
session.conversation.addAssistantMessage(assistantContent);
|
|
394
|
+
if (!completed && !abortSignal.aborted) {
|
|
395
|
+
throw new Error(`Companion chat exceeded ${MAX_TOOL_ROUNDS_PER_TURN} tool rounds without a final response`);
|
|
397
396
|
}
|
|
398
397
|
const now = Date.now();
|
|
399
398
|
const assistantMsg = {
|
|
@@ -429,6 +428,57 @@ export class CompanionChatManager {
|
|
|
429
428
|
}
|
|
430
429
|
}
|
|
431
430
|
}
|
|
431
|
+
async _executeToolCalls(toolCalls, publish, sessionId, turnId) {
|
|
432
|
+
const toolRegistry = this.toolRegistry;
|
|
433
|
+
if (!toolRegistry)
|
|
434
|
+
return [];
|
|
435
|
+
if (!this.permissionManager) {
|
|
436
|
+
return toolCalls.map((call) => {
|
|
437
|
+
const toolResult = {
|
|
438
|
+
callId: call.id,
|
|
439
|
+
success: false,
|
|
440
|
+
error: 'Tool execution denied: permission manager unavailable for companion chat',
|
|
441
|
+
};
|
|
442
|
+
publish({
|
|
443
|
+
type: 'turn.tool_result',
|
|
444
|
+
sessionId,
|
|
445
|
+
turnId,
|
|
446
|
+
toolCallId: call.id,
|
|
447
|
+
toolName: call.name,
|
|
448
|
+
result: toolResult.error,
|
|
449
|
+
isError: true,
|
|
450
|
+
});
|
|
451
|
+
return toolResult;
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
const results = await executeOrchestratorToolCalls({
|
|
455
|
+
toolRegistry,
|
|
456
|
+
permissionManager: this.permissionManager,
|
|
457
|
+
hookDispatcher: this.hookDispatcher,
|
|
458
|
+
runtimeBus: this.runtimeBus,
|
|
459
|
+
sessionId,
|
|
460
|
+
emitterContext: (id) => ({
|
|
461
|
+
sessionId,
|
|
462
|
+
traceId: `${sessionId}:${id}`,
|
|
463
|
+
source: 'companion-chat',
|
|
464
|
+
}),
|
|
465
|
+
}, turnId, toolCalls);
|
|
466
|
+
for (const [index, toolResult] of results.entries()) {
|
|
467
|
+
const call = toolCalls[index];
|
|
468
|
+
if (!call)
|
|
469
|
+
continue;
|
|
470
|
+
publish({
|
|
471
|
+
type: 'turn.tool_result',
|
|
472
|
+
sessionId,
|
|
473
|
+
turnId,
|
|
474
|
+
toolCallId: call.id,
|
|
475
|
+
toolName: call.name,
|
|
476
|
+
result: toolResult.output ?? toolResult.error ?? null,
|
|
477
|
+
isError: !toolResult.success,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
return results;
|
|
481
|
+
}
|
|
432
482
|
// ---------------------------------------------------------------------------
|
|
433
483
|
// GC sweep
|
|
434
484
|
// ---------------------------------------------------------------------------
|
|
@@ -36,6 +36,18 @@ export declare const surfaceConfigDefaults: {
|
|
|
36
36
|
secret: string;
|
|
37
37
|
setupVersion: number;
|
|
38
38
|
};
|
|
39
|
+
homeassistant: {
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
instanceUrl: string;
|
|
42
|
+
accessToken: string;
|
|
43
|
+
webhookSecret: string;
|
|
44
|
+
defaultConversationId: string;
|
|
45
|
+
deviceId: string;
|
|
46
|
+
deviceName: string;
|
|
47
|
+
eventType: string;
|
|
48
|
+
remoteSessionTtlMs: number;
|
|
49
|
+
setupVersion: number;
|
|
50
|
+
};
|
|
39
51
|
telegram: {
|
|
40
52
|
enabled: boolean;
|
|
41
53
|
botToken: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-domain-surfaces.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/config/schema-domain-surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"schema-domain-surfaces.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/config/schema-domain-surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgIjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,uBAAuB,EA0X1D,CAAC"}
|
|
@@ -35,6 +35,18 @@ export const surfaceConfigDefaults = {
|
|
|
35
35
|
secret: '',
|
|
36
36
|
setupVersion: 0,
|
|
37
37
|
},
|
|
38
|
+
homeassistant: {
|
|
39
|
+
enabled: false,
|
|
40
|
+
instanceUrl: '',
|
|
41
|
+
accessToken: '',
|
|
42
|
+
webhookSecret: '',
|
|
43
|
+
defaultConversationId: 'goodvibes',
|
|
44
|
+
deviceId: 'goodvibes-daemon',
|
|
45
|
+
deviceName: 'GoodVibes Daemon',
|
|
46
|
+
eventType: 'goodvibes_message',
|
|
47
|
+
remoteSessionTtlMs: 20 * 60_000,
|
|
48
|
+
setupVersion: 0,
|
|
49
|
+
},
|
|
38
50
|
telegram: {
|
|
39
51
|
enabled: false,
|
|
40
52
|
botToken: '',
|
|
@@ -262,6 +274,61 @@ export const surfaceConfigSettings = [
|
|
|
262
274
|
default: '',
|
|
263
275
|
description: 'Shared secret used to sign or verify webhook payloads',
|
|
264
276
|
},
|
|
277
|
+
{
|
|
278
|
+
key: 'surfaces.homeassistant.enabled',
|
|
279
|
+
type: 'boolean',
|
|
280
|
+
default: false,
|
|
281
|
+
description: 'Enable the Home Assistant daemon surface',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
key: 'surfaces.homeassistant.instanceUrl',
|
|
285
|
+
type: 'string',
|
|
286
|
+
default: '',
|
|
287
|
+
description: 'Home Assistant base URL, for example http://homeassistant.local:8123',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
key: 'surfaces.homeassistant.accessToken',
|
|
291
|
+
type: 'string',
|
|
292
|
+
default: '',
|
|
293
|
+
description: 'Home Assistant long-lived access token or goodvibes secret URI',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
key: 'surfaces.homeassistant.webhookSecret',
|
|
297
|
+
type: 'string',
|
|
298
|
+
default: '',
|
|
299
|
+
description: 'Shared secret used to verify inbound Home Assistant callbacks',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
key: 'surfaces.homeassistant.defaultConversationId',
|
|
303
|
+
type: 'string',
|
|
304
|
+
default: 'goodvibes',
|
|
305
|
+
description: 'Default Home Assistant conversation id used for route binding',
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
key: 'surfaces.homeassistant.deviceId',
|
|
309
|
+
type: 'string',
|
|
310
|
+
default: 'goodvibes-daemon',
|
|
311
|
+
description: 'Stable Home Assistant device identifier for this daemon',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
key: 'surfaces.homeassistant.deviceName',
|
|
315
|
+
type: 'string',
|
|
316
|
+
default: 'GoodVibes Daemon',
|
|
317
|
+
description: 'Home Assistant device display name for this daemon',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
key: 'surfaces.homeassistant.eventType',
|
|
321
|
+
type: 'string',
|
|
322
|
+
default: 'goodvibes_message',
|
|
323
|
+
description: 'Home Assistant event type used for daemon-to-Home Assistant deliveries',
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
key: 'surfaces.homeassistant.remoteSessionTtlMs',
|
|
327
|
+
type: 'number',
|
|
328
|
+
default: 20 * 60_000,
|
|
329
|
+
description: 'Idle TTL for Home Assistant remote conversation sessions before the daemon closes them',
|
|
330
|
+
validate: (v) => typeof v === 'number' && Number.isInteger(v) && v >= 60_000 && v <= 24 * 60 * 60_000,
|
|
331
|
+
},
|
|
265
332
|
{
|
|
266
333
|
key: 'surfaces.telegram.enabled',
|
|
267
334
|
type: 'boolean',
|
|
@@ -110,6 +110,18 @@ export interface WebhookSurfaceConfig {
|
|
|
110
110
|
secret: string;
|
|
111
111
|
setupVersion: number;
|
|
112
112
|
}
|
|
113
|
+
export interface HomeAssistantSurfaceConfig {
|
|
114
|
+
enabled: boolean;
|
|
115
|
+
instanceUrl: string;
|
|
116
|
+
accessToken: string;
|
|
117
|
+
webhookSecret: string;
|
|
118
|
+
defaultConversationId: string;
|
|
119
|
+
deviceId: string;
|
|
120
|
+
deviceName: string;
|
|
121
|
+
eventType: string;
|
|
122
|
+
remoteSessionTtlMs: number;
|
|
123
|
+
setupVersion: number;
|
|
124
|
+
}
|
|
113
125
|
export interface TelegramSurfaceConfig {
|
|
114
126
|
enabled: boolean;
|
|
115
127
|
botToken: string;
|
|
@@ -194,6 +206,7 @@ export interface SurfacesConfig {
|
|
|
194
206
|
discord: DiscordSurfaceConfig;
|
|
195
207
|
ntfy: NtfySurfaceConfig;
|
|
196
208
|
webhook: WebhookSurfaceConfig;
|
|
209
|
+
homeassistant: HomeAssistantSurfaceConfig;
|
|
197
210
|
telegram: TelegramSurfaceConfig;
|
|
198
211
|
googleChat: GoogleChatSurfaceConfig;
|
|
199
212
|
signal: SignalSurfaceConfig;
|
|
@@ -416,7 +429,7 @@ export interface ConfigSetting {
|
|
|
416
429
|
validate?: (value: unknown) => boolean;
|
|
417
430
|
}
|
|
418
431
|
/** Dot-path config keys for all settings. */
|
|
419
|
-
export type ConfigKey = 'display.stream' | 'display.lineNumbers' | 'display.collapseThreshold' | 'display.theme' | 'display.showThinking' | 'display.showReasoningSummary' | 'display.showTokenSpeed' | 'display.showToolPreview' | 'provider.reasoningEffort' | 'provider.model' | 'provider.provider' | 'provider.embeddingProvider' | 'provider.systemPromptFile' | 'behavior.autoApprove' | 'behavior.autoCompactThreshold' | 'behavior.staleContextWarnings' | 'behavior.saveHistory' | 'behavior.notifyOnComplete' | 'behavior.suggestAlternativeOnProviderFail' | 'behavior.hitlMode' | 'behavior.returnContextMode' | 'behavior.guidanceMode' | 'storage.secretPolicy' | 'permissions.mode' | 'permissions.tools.read' | 'permissions.tools.write' | 'permissions.tools.edit' | 'permissions.tools.exec' | 'permissions.tools.find' | 'permissions.tools.fetch' | 'permissions.tools.analyze' | 'permissions.tools.inspect' | 'permissions.tools.agent' | 'permissions.tools.state' | 'permissions.tools.workflow' | 'permissions.tools.registry' | 'permissions.tools.delegate' | 'permissions.tools.mcp' | 'orchestration.recursionEnabled' | 'orchestration.maxActiveAgents' | 'orchestration.maxDepth' | 'sandbox.replIsolation' | 'sandbox.mcpIsolation' | 'sandbox.windowsMode' | 'sandbox.vmBackend' | 'sandbox.qemuBinary' | 'sandbox.qemuImagePath' | 'sandbox.qemuExecWrapper' | 'sandbox.qemuGuestHost' | 'sandbox.qemuGuestPort' | 'sandbox.qemuGuestUser' | 'sandbox.qemuWorkspacePath' | 'sandbox.qemuSessionMode' | 'ui.voiceEnabled' | 'ui.systemMessages' | 'ui.operationalMessages' | 'ui.wrfcMessages' | 'tts.provider' | 'tts.voice' | 'tts.llmProvider' | 'tts.llmModel' | 'release.channel' | 'danger.daemon' | 'danger.httpListener' | 'tools.llmEnabled' | 'tools.llmProvider' | 'tools.llmModel' | 'tools.autoHeal' | 'tools.defaultTokenBudget' | 'tools.hooksFile' | 'wrfc.scoreThreshold' | 'wrfc.maxFixAttempts' | 'wrfc.autoCommit' | 'cache.enabled' | 'cache.stableTtl' | 'cache.monitorHitRate' | 'cache.hitRateWarningThreshold' | 'helper.enabled' | 'helper.globalProvider' | 'helper.globalModel' | 'automation.enabled' | 'automation.maxConcurrentRuns' | 'automation.runHistoryLimit' | 'automation.defaultTimeoutMs' | 'automation.catchUpWindowMinutes' | 'automation.failureCooldownMs' | 'automation.deleteAfterRun' | 'controlPlane.enabled' | 'controlPlane.hostMode' | 'controlPlane.host' | 'controlPlane.port' | 'controlPlane.baseUrl' | 'controlPlane.streamMode' | 'controlPlane.allowRemote' | 'controlPlane.trustProxy' | 'controlPlane.tls.mode' | 'controlPlane.tls.certFile' | 'controlPlane.tls.keyFile' | 'httpListener.hostMode' | 'httpListener.host' | 'httpListener.port' | 'httpListener.trustProxy' | 'httpListener.tls.mode' | 'httpListener.tls.certFile' | 'httpListener.tls.keyFile' | 'web.enabled' | 'web.hostMode' | 'web.host' | 'web.port' | 'web.publicBaseUrl' | 'web.staticAssetsDir' | 'surfaces.slack.enabled' | 'surfaces.slack.signingSecret' | 'surfaces.slack.botToken' | 'surfaces.slack.appToken' | 'surfaces.slack.defaultChannel' | 'surfaces.slack.workspaceId' | 'surfaces.discord.enabled' | 'surfaces.discord.publicKey' | 'surfaces.discord.botToken' | 'surfaces.discord.applicationId' | 'surfaces.discord.defaultChannelId' | 'surfaces.discord.guildId' | 'surfaces.ntfy.enabled' | 'surfaces.ntfy.baseUrl' | 'surfaces.ntfy.topic' | 'surfaces.ntfy.chatTopic' | 'surfaces.ntfy.agentTopic' | 'surfaces.ntfy.remoteTopic' | 'surfaces.ntfy.token' | 'surfaces.ntfy.defaultPriority' | 'surfaces.webhook.enabled' | 'surfaces.webhook.defaultTarget' | 'surfaces.webhook.timeoutMs' | 'surfaces.webhook.secret' | 'surfaces.telegram.enabled' | 'surfaces.telegram.botToken' | 'surfaces.telegram.webhookSecret' | 'surfaces.telegram.defaultChatId' | 'surfaces.telegram.botUsername' | 'surfaces.telegram.mode' | 'surfaces.googleChat.enabled' | 'surfaces.googleChat.webhookUrl' | 'surfaces.googleChat.verificationToken' | 'surfaces.googleChat.appId' | 'surfaces.googleChat.spaceId' | 'surfaces.signal.enabled' | 'surfaces.signal.bridgeUrl' | 'surfaces.signal.account' | 'surfaces.signal.token' | 'surfaces.signal.defaultRecipient' | 'surfaces.whatsapp.enabled' | 'surfaces.whatsapp.provider' | 'surfaces.whatsapp.accessToken' | 'surfaces.whatsapp.verifyToken' | 'surfaces.whatsapp.signingSecret' | 'surfaces.whatsapp.phoneNumberId' | 'surfaces.whatsapp.businessAccountId' | 'surfaces.whatsapp.defaultRecipient' | 'surfaces.imessage.enabled' | 'surfaces.imessage.bridgeUrl' | 'surfaces.imessage.account' | 'surfaces.imessage.token' | 'surfaces.imessage.defaultChatId' | 'surfaces.msteams.enabled' | 'surfaces.msteams.appId' | 'surfaces.msteams.appPassword' | 'surfaces.msteams.tenantId' | 'surfaces.msteams.serviceUrl' | 'surfaces.msteams.botId' | 'surfaces.msteams.defaultConversationId' | 'surfaces.msteams.defaultChannelId' | 'surfaces.bluebubbles.enabled' | 'surfaces.bluebubbles.serverUrl' | 'surfaces.bluebubbles.password' | 'surfaces.bluebubbles.account' | 'surfaces.bluebubbles.defaultChatGuid' | 'surfaces.mattermost.enabled' | 'surfaces.mattermost.baseUrl' | 'surfaces.mattermost.botToken' | 'surfaces.mattermost.teamId' | 'surfaces.mattermost.defaultChannelId' | 'surfaces.matrix.enabled' | 'surfaces.matrix.homeserverUrl' | 'surfaces.matrix.accessToken' | 'surfaces.matrix.userId' | 'surfaces.matrix.defaultRoomId' | 'watchers.enabled' | 'watchers.pollIntervalMs' | 'watchers.heartbeatIntervalMs' | 'watchers.recoveryWindowMinutes' | 'service.enabled' | 'service.autostart' | 'service.restartOnFailure' | 'service.platform' | 'service.serviceName' | 'service.logPath' | 'network.outboundTls.mode' | 'network.outboundTls.customCaFile' | 'network.outboundTls.customCaDir' | 'network.outboundTls.allowInsecureLocalhost' | 'network.remoteFetch.allowPrivateHosts' | 'runtime.companionChatLimiter.perSessionLimit' | 'runtime.eventBus.maxListeners' | 'telemetry.includeRawPrompts' | 'batch.mode' | 'batch.fallback' | 'batch.queueBackend' | 'batch.tickIntervalMs' | 'batch.maxDelayMs' | 'batch.maxJobsPerProviderBatch' | 'batch.maxQueuePayloadBytes' | 'batch.maxQueueMessagesPerDay' | 'cloudflare.enabled' | 'cloudflare.freeTierMode' | 'cloudflare.accountId' | 'cloudflare.apiTokenRef' | 'cloudflare.zoneId' | 'cloudflare.zoneName' | 'cloudflare.workerName' | 'cloudflare.workerSubdomain' | 'cloudflare.workerHostname' | 'cloudflare.workerBaseUrl' | 'cloudflare.daemonBaseUrl' | 'cloudflare.daemonHostname' | 'cloudflare.workerTokenRef' | 'cloudflare.workerClientTokenRef' | 'cloudflare.workerCron' | 'cloudflare.queueName' | 'cloudflare.deadLetterQueueName' | 'cloudflare.tunnelName' | 'cloudflare.tunnelId' | 'cloudflare.tunnelTokenRef' | 'cloudflare.accessAppId' | 'cloudflare.accessServiceTokenId' | 'cloudflare.accessServiceTokenRef' | 'cloudflare.kvNamespaceName' | 'cloudflare.kvNamespaceId' | 'cloudflare.durableObjectNamespaceName' | 'cloudflare.durableObjectNamespaceId' | 'cloudflare.r2BucketName' | 'cloudflare.secretsStoreName' | 'cloudflare.secretsStoreId' | 'cloudflare.maxQueueOpsPerDay';
|
|
432
|
+
export type ConfigKey = 'display.stream' | 'display.lineNumbers' | 'display.collapseThreshold' | 'display.theme' | 'display.showThinking' | 'display.showReasoningSummary' | 'display.showTokenSpeed' | 'display.showToolPreview' | 'provider.reasoningEffort' | 'provider.model' | 'provider.provider' | 'provider.embeddingProvider' | 'provider.systemPromptFile' | 'behavior.autoApprove' | 'behavior.autoCompactThreshold' | 'behavior.staleContextWarnings' | 'behavior.saveHistory' | 'behavior.notifyOnComplete' | 'behavior.suggestAlternativeOnProviderFail' | 'behavior.hitlMode' | 'behavior.returnContextMode' | 'behavior.guidanceMode' | 'storage.secretPolicy' | 'permissions.mode' | 'permissions.tools.read' | 'permissions.tools.write' | 'permissions.tools.edit' | 'permissions.tools.exec' | 'permissions.tools.find' | 'permissions.tools.fetch' | 'permissions.tools.analyze' | 'permissions.tools.inspect' | 'permissions.tools.agent' | 'permissions.tools.state' | 'permissions.tools.workflow' | 'permissions.tools.registry' | 'permissions.tools.delegate' | 'permissions.tools.mcp' | 'orchestration.recursionEnabled' | 'orchestration.maxActiveAgents' | 'orchestration.maxDepth' | 'sandbox.replIsolation' | 'sandbox.mcpIsolation' | 'sandbox.windowsMode' | 'sandbox.vmBackend' | 'sandbox.qemuBinary' | 'sandbox.qemuImagePath' | 'sandbox.qemuExecWrapper' | 'sandbox.qemuGuestHost' | 'sandbox.qemuGuestPort' | 'sandbox.qemuGuestUser' | 'sandbox.qemuWorkspacePath' | 'sandbox.qemuSessionMode' | 'ui.voiceEnabled' | 'ui.systemMessages' | 'ui.operationalMessages' | 'ui.wrfcMessages' | 'tts.provider' | 'tts.voice' | 'tts.llmProvider' | 'tts.llmModel' | 'release.channel' | 'danger.daemon' | 'danger.httpListener' | 'tools.llmEnabled' | 'tools.llmProvider' | 'tools.llmModel' | 'tools.autoHeal' | 'tools.defaultTokenBudget' | 'tools.hooksFile' | 'wrfc.scoreThreshold' | 'wrfc.maxFixAttempts' | 'wrfc.autoCommit' | 'cache.enabled' | 'cache.stableTtl' | 'cache.monitorHitRate' | 'cache.hitRateWarningThreshold' | 'helper.enabled' | 'helper.globalProvider' | 'helper.globalModel' | 'automation.enabled' | 'automation.maxConcurrentRuns' | 'automation.runHistoryLimit' | 'automation.defaultTimeoutMs' | 'automation.catchUpWindowMinutes' | 'automation.failureCooldownMs' | 'automation.deleteAfterRun' | 'controlPlane.enabled' | 'controlPlane.hostMode' | 'controlPlane.host' | 'controlPlane.port' | 'controlPlane.baseUrl' | 'controlPlane.streamMode' | 'controlPlane.allowRemote' | 'controlPlane.trustProxy' | 'controlPlane.tls.mode' | 'controlPlane.tls.certFile' | 'controlPlane.tls.keyFile' | 'httpListener.hostMode' | 'httpListener.host' | 'httpListener.port' | 'httpListener.trustProxy' | 'httpListener.tls.mode' | 'httpListener.tls.certFile' | 'httpListener.tls.keyFile' | 'web.enabled' | 'web.hostMode' | 'web.host' | 'web.port' | 'web.publicBaseUrl' | 'web.staticAssetsDir' | 'surfaces.slack.enabled' | 'surfaces.slack.signingSecret' | 'surfaces.slack.botToken' | 'surfaces.slack.appToken' | 'surfaces.slack.defaultChannel' | 'surfaces.slack.workspaceId' | 'surfaces.discord.enabled' | 'surfaces.discord.publicKey' | 'surfaces.discord.botToken' | 'surfaces.discord.applicationId' | 'surfaces.discord.defaultChannelId' | 'surfaces.discord.guildId' | 'surfaces.ntfy.enabled' | 'surfaces.ntfy.baseUrl' | 'surfaces.ntfy.topic' | 'surfaces.ntfy.chatTopic' | 'surfaces.ntfy.agentTopic' | 'surfaces.ntfy.remoteTopic' | 'surfaces.ntfy.token' | 'surfaces.ntfy.defaultPriority' | 'surfaces.webhook.enabled' | 'surfaces.webhook.defaultTarget' | 'surfaces.webhook.timeoutMs' | 'surfaces.webhook.secret' | 'surfaces.homeassistant.enabled' | 'surfaces.homeassistant.instanceUrl' | 'surfaces.homeassistant.accessToken' | 'surfaces.homeassistant.webhookSecret' | 'surfaces.homeassistant.defaultConversationId' | 'surfaces.homeassistant.deviceId' | 'surfaces.homeassistant.deviceName' | 'surfaces.homeassistant.eventType' | 'surfaces.homeassistant.remoteSessionTtlMs' | 'surfaces.telegram.enabled' | 'surfaces.telegram.botToken' | 'surfaces.telegram.webhookSecret' | 'surfaces.telegram.defaultChatId' | 'surfaces.telegram.botUsername' | 'surfaces.telegram.mode' | 'surfaces.googleChat.enabled' | 'surfaces.googleChat.webhookUrl' | 'surfaces.googleChat.verificationToken' | 'surfaces.googleChat.appId' | 'surfaces.googleChat.spaceId' | 'surfaces.signal.enabled' | 'surfaces.signal.bridgeUrl' | 'surfaces.signal.account' | 'surfaces.signal.token' | 'surfaces.signal.defaultRecipient' | 'surfaces.whatsapp.enabled' | 'surfaces.whatsapp.provider' | 'surfaces.whatsapp.accessToken' | 'surfaces.whatsapp.verifyToken' | 'surfaces.whatsapp.signingSecret' | 'surfaces.whatsapp.phoneNumberId' | 'surfaces.whatsapp.businessAccountId' | 'surfaces.whatsapp.defaultRecipient' | 'surfaces.imessage.enabled' | 'surfaces.imessage.bridgeUrl' | 'surfaces.imessage.account' | 'surfaces.imessage.token' | 'surfaces.imessage.defaultChatId' | 'surfaces.msteams.enabled' | 'surfaces.msteams.appId' | 'surfaces.msteams.appPassword' | 'surfaces.msteams.tenantId' | 'surfaces.msteams.serviceUrl' | 'surfaces.msteams.botId' | 'surfaces.msteams.defaultConversationId' | 'surfaces.msteams.defaultChannelId' | 'surfaces.bluebubbles.enabled' | 'surfaces.bluebubbles.serverUrl' | 'surfaces.bluebubbles.password' | 'surfaces.bluebubbles.account' | 'surfaces.bluebubbles.defaultChatGuid' | 'surfaces.mattermost.enabled' | 'surfaces.mattermost.baseUrl' | 'surfaces.mattermost.botToken' | 'surfaces.mattermost.teamId' | 'surfaces.mattermost.defaultChannelId' | 'surfaces.matrix.enabled' | 'surfaces.matrix.homeserverUrl' | 'surfaces.matrix.accessToken' | 'surfaces.matrix.userId' | 'surfaces.matrix.defaultRoomId' | 'watchers.enabled' | 'watchers.pollIntervalMs' | 'watchers.heartbeatIntervalMs' | 'watchers.recoveryWindowMinutes' | 'service.enabled' | 'service.autostart' | 'service.restartOnFailure' | 'service.platform' | 'service.serviceName' | 'service.logPath' | 'network.outboundTls.mode' | 'network.outboundTls.customCaFile' | 'network.outboundTls.customCaDir' | 'network.outboundTls.allowInsecureLocalhost' | 'network.remoteFetch.allowPrivateHosts' | 'runtime.companionChatLimiter.perSessionLimit' | 'runtime.eventBus.maxListeners' | 'telemetry.includeRawPrompts' | 'batch.mode' | 'batch.fallback' | 'batch.queueBackend' | 'batch.tickIntervalMs' | 'batch.maxDelayMs' | 'batch.maxJobsPerProviderBatch' | 'batch.maxQueuePayloadBytes' | 'batch.maxQueueMessagesPerDay' | 'cloudflare.enabled' | 'cloudflare.freeTierMode' | 'cloudflare.accountId' | 'cloudflare.apiTokenRef' | 'cloudflare.zoneId' | 'cloudflare.zoneName' | 'cloudflare.workerName' | 'cloudflare.workerSubdomain' | 'cloudflare.workerHostname' | 'cloudflare.workerBaseUrl' | 'cloudflare.daemonBaseUrl' | 'cloudflare.daemonHostname' | 'cloudflare.workerTokenRef' | 'cloudflare.workerClientTokenRef' | 'cloudflare.workerCron' | 'cloudflare.queueName' | 'cloudflare.deadLetterQueueName' | 'cloudflare.tunnelName' | 'cloudflare.tunnelId' | 'cloudflare.tunnelTokenRef' | 'cloudflare.accessAppId' | 'cloudflare.accessServiceTokenId' | 'cloudflare.accessServiceTokenRef' | 'cloudflare.kvNamespaceName' | 'cloudflare.kvNamespaceId' | 'cloudflare.durableObjectNamespaceName' | 'cloudflare.durableObjectNamespaceId' | 'cloudflare.r2BucketName' | 'cloudflare.secretsStoreName' | 'cloudflare.secretsStoreId' | 'cloudflare.maxQueueOpsPerDay';
|
|
420
433
|
/** Maps a ConfigKey to its value type. */
|
|
421
|
-
export type ConfigValue<K extends ConfigKey> = K extends 'display.stream' ? boolean : K extends 'display.lineNumbers' ? LineNumberMode : K extends 'display.collapseThreshold' ? number : K extends 'display.theme' ? string : K extends 'display.showThinking' ? boolean : K extends 'display.showReasoningSummary' ? boolean : K extends 'display.showTokenSpeed' ? boolean : K extends 'display.showToolPreview' ? boolean : K extends 'provider.reasoningEffort' ? 'instant' | 'low' | 'medium' | 'high' : K extends 'provider.model' ? string : K extends 'provider.provider' ? string : K extends 'provider.embeddingProvider' ? string : K extends 'provider.systemPromptFile' ? string : K extends 'behavior.autoApprove' ? boolean : K extends 'behavior.autoCompactThreshold' ? number : K extends 'behavior.staleContextWarnings' ? boolean : K extends 'behavior.saveHistory' ? boolean : K extends 'behavior.notifyOnComplete' ? boolean : K extends 'behavior.suggestAlternativeOnProviderFail' ? boolean : K extends 'behavior.hitlMode' ? 'quiet' | 'balanced' | 'operator' : K extends 'behavior.returnContextMode' ? 'off' | 'local' | 'assisted' : K extends 'behavior.guidanceMode' ? 'off' | 'minimal' | 'guided' : K extends 'storage.secretPolicy' ? 'plaintext_allowed' | 'preferred_secure' | 'require_secure' : K extends 'permissions.mode' ? PermissionMode : K extends 'permissions.tools.read' ? PermissionAction : K extends 'permissions.tools.write' ? PermissionAction : K extends 'permissions.tools.edit' ? PermissionAction : K extends 'permissions.tools.exec' ? PermissionAction : K extends 'permissions.tools.find' ? PermissionAction : K extends 'permissions.tools.fetch' ? PermissionAction : K extends 'permissions.tools.analyze' ? PermissionAction : K extends 'permissions.tools.inspect' ? PermissionAction : K extends 'permissions.tools.agent' ? PermissionAction : K extends 'permissions.tools.state' ? PermissionAction : K extends 'permissions.tools.workflow' ? PermissionAction : K extends 'permissions.tools.registry' ? PermissionAction : K extends 'permissions.tools.delegate' ? PermissionAction : K extends 'permissions.tools.mcp' ? PermissionAction : K extends 'orchestration.recursionEnabled' ? boolean : K extends 'orchestration.maxActiveAgents' ? number : K extends 'orchestration.maxDepth' ? number : K extends 'sandbox.replIsolation' ? 'shared-vm' | 'per-runtime-vm' : K extends 'sandbox.mcpIsolation' ? 'disabled' | 'shared-vm' | 'hybrid' | 'per-server-vm' : K extends 'sandbox.windowsMode' ? 'native-basic' | 'require-wsl' : K extends 'sandbox.vmBackend' ? 'local' | 'qemu' : K extends 'sandbox.qemuBinary' ? string : K extends 'sandbox.qemuImagePath' ? string : K extends 'sandbox.qemuExecWrapper' ? string : K extends 'sandbox.qemuGuestHost' ? string : K extends 'sandbox.qemuGuestPort' ? number : K extends 'sandbox.qemuGuestUser' ? string : K extends 'sandbox.qemuWorkspacePath' ? string : K extends 'sandbox.qemuSessionMode' ? 'attach' | 'launch-per-command' : K extends 'ui.voiceEnabled' ? boolean : K extends 'ui.systemMessages' ? 'panel' | 'conversation' | 'both' : K extends 'ui.operationalMessages' ? 'panel' | 'conversation' | 'both' : K extends 'ui.wrfcMessages' ? 'panel' | 'conversation' | 'both' : K extends 'tts.provider' ? string : K extends 'tts.voice' ? string : K extends 'tts.llmProvider' ? string : K extends 'tts.llmModel' ? string : K extends 'release.channel' ? 'stable' | 'preview' : K extends 'danger.daemon' ? boolean : K extends 'danger.httpListener' ? boolean : K extends 'tools.llmEnabled' ? boolean : K extends 'tools.llmProvider' ? string : K extends 'tools.llmModel' ? string : K extends 'tools.autoHeal' ? boolean : K extends 'tools.defaultTokenBudget' ? number : K extends 'tools.hooksFile' ? string : K extends 'wrfc.scoreThreshold' ? number : K extends 'wrfc.maxFixAttempts' ? number : K extends 'wrfc.autoCommit' ? boolean : K extends 'cache.enabled' ? boolean : K extends 'cache.stableTtl' ? '5m' | '1h' : K extends 'cache.monitorHitRate' ? boolean : K extends 'cache.hitRateWarningThreshold' ? number : K extends 'helper.enabled' ? boolean : K extends 'helper.globalProvider' ? string : K extends 'helper.globalModel' ? string : K extends 'automation.enabled' ? boolean : K extends 'automation.maxConcurrentRuns' ? number : K extends 'automation.runHistoryLimit' ? number : K extends 'automation.defaultTimeoutMs' ? number : K extends 'automation.catchUpWindowMinutes' ? number : K extends 'automation.failureCooldownMs' ? number : K extends 'automation.deleteAfterRun' ? boolean : K extends 'controlPlane.enabled' ? boolean : K extends 'controlPlane.hostMode' ? 'local' | 'network' | 'custom' : K extends 'controlPlane.host' ? string : K extends 'controlPlane.port' ? number : K extends 'controlPlane.baseUrl' ? string : K extends 'controlPlane.streamMode' ? 'sse' | 'websocket' | 'both' : K extends 'controlPlane.allowRemote' ? boolean : K extends 'controlPlane.trustProxy' ? boolean : K extends 'controlPlane.tls.mode' ? 'off' | 'proxy' | 'direct' : K extends 'controlPlane.tls.certFile' ? string : K extends 'controlPlane.tls.keyFile' ? string : K extends 'httpListener.hostMode' ? 'local' | 'network' | 'custom' : K extends 'httpListener.host' ? string : K extends 'httpListener.port' ? number : K extends 'httpListener.trustProxy' ? boolean : K extends 'httpListener.tls.mode' ? 'off' | 'proxy' | 'direct' : K extends 'httpListener.tls.certFile' ? string : K extends 'httpListener.tls.keyFile' ? string : K extends 'web.enabled' ? boolean : K extends 'web.hostMode' ? 'local' | 'network' | 'custom' : K extends 'web.host' ? string : K extends 'web.port' ? number : K extends 'web.publicBaseUrl' ? string : K extends 'web.staticAssetsDir' ? string : K extends 'surfaces.slack.enabled' ? boolean : K extends 'surfaces.slack.signingSecret' ? string : K extends 'surfaces.slack.botToken' ? string : K extends 'surfaces.slack.appToken' ? string : K extends 'surfaces.slack.defaultChannel' ? string : K extends 'surfaces.slack.workspaceId' ? string : K extends 'surfaces.discord.enabled' ? boolean : K extends 'surfaces.discord.publicKey' ? string : K extends 'surfaces.discord.botToken' ? string : K extends 'surfaces.discord.applicationId' ? string : K extends 'surfaces.discord.defaultChannelId' ? string : K extends 'surfaces.discord.guildId' ? string : K extends 'surfaces.ntfy.enabled' ? boolean : K extends 'surfaces.ntfy.baseUrl' ? string : K extends 'surfaces.ntfy.topic' ? string : K extends 'surfaces.ntfy.chatTopic' ? string : K extends 'surfaces.ntfy.agentTopic' ? string : K extends 'surfaces.ntfy.remoteTopic' ? string : K extends 'surfaces.ntfy.token' ? string : K extends 'surfaces.ntfy.defaultPriority' ? number : K extends 'surfaces.webhook.enabled' ? boolean : K extends 'surfaces.webhook.defaultTarget' ? string : K extends 'surfaces.webhook.timeoutMs' ? number : K extends 'surfaces.webhook.secret' ? string : K extends 'surfaces.telegram.enabled' ? boolean : K extends 'surfaces.telegram.botToken' ? string : K extends 'surfaces.telegram.webhookSecret' ? string : K extends 'surfaces.telegram.defaultChatId' ? string : K extends 'surfaces.telegram.botUsername' ? string : K extends 'surfaces.telegram.mode' ? 'webhook' | 'polling' : K extends 'surfaces.googleChat.enabled' ? boolean : K extends 'surfaces.googleChat.webhookUrl' ? string : K extends 'surfaces.googleChat.verificationToken' ? string : K extends 'surfaces.googleChat.appId' ? string : K extends 'surfaces.googleChat.spaceId' ? string : K extends 'surfaces.signal.enabled' ? boolean : K extends 'surfaces.signal.bridgeUrl' ? string : K extends 'surfaces.signal.account' ? string : K extends 'surfaces.signal.token' ? string : K extends 'surfaces.signal.defaultRecipient' ? string : K extends 'surfaces.whatsapp.enabled' ? boolean : K extends 'surfaces.whatsapp.provider' ? 'meta-cloud' | 'bridge' : K extends 'surfaces.whatsapp.accessToken' ? string : K extends 'surfaces.whatsapp.verifyToken' ? string : K extends 'surfaces.whatsapp.signingSecret' ? string : K extends 'surfaces.whatsapp.phoneNumberId' ? string : K extends 'surfaces.whatsapp.businessAccountId' ? string : K extends 'surfaces.whatsapp.defaultRecipient' ? string : K extends 'surfaces.imessage.enabled' ? boolean : K extends 'surfaces.imessage.bridgeUrl' ? string : K extends 'surfaces.imessage.account' ? string : K extends 'surfaces.imessage.token' ? string : K extends 'surfaces.imessage.defaultChatId' ? string : K extends 'surfaces.msteams.enabled' ? boolean : K extends 'surfaces.msteams.appId' ? string : K extends 'surfaces.msteams.appPassword' ? string : K extends 'surfaces.msteams.tenantId' ? string : K extends 'surfaces.msteams.serviceUrl' ? string : K extends 'surfaces.msteams.botId' ? string : K extends 'surfaces.msteams.defaultConversationId' ? string : K extends 'surfaces.msteams.defaultChannelId' ? string : K extends 'surfaces.bluebubbles.enabled' ? boolean : K extends 'surfaces.bluebubbles.serverUrl' ? string : K extends 'surfaces.bluebubbles.password' ? string : K extends 'surfaces.bluebubbles.account' ? string : K extends 'surfaces.bluebubbles.defaultChatGuid' ? string : K extends 'surfaces.mattermost.enabled' ? boolean : K extends 'surfaces.mattermost.baseUrl' ? string : K extends 'surfaces.mattermost.botToken' ? string : K extends 'surfaces.mattermost.teamId' ? string : K extends 'surfaces.mattermost.defaultChannelId' ? string : K extends 'surfaces.matrix.enabled' ? boolean : K extends 'surfaces.matrix.homeserverUrl' ? string : K extends 'surfaces.matrix.accessToken' ? string : K extends 'surfaces.matrix.userId' ? string : K extends 'surfaces.matrix.defaultRoomId' ? string : K extends 'watchers.enabled' ? boolean : K extends 'watchers.pollIntervalMs' ? number : K extends 'watchers.heartbeatIntervalMs' ? number : K extends 'watchers.recoveryWindowMinutes' ? number : K extends 'service.enabled' ? boolean : K extends 'service.autostart' ? boolean : K extends 'service.restartOnFailure' ? boolean : K extends 'service.platform' ? 'auto' | 'systemd' | 'launchd' | 'windows' | 'manual' : K extends 'service.serviceName' ? string : K extends 'service.logPath' ? string : K extends 'network.outboundTls.mode' ? 'bundled' | 'bundled+custom' | 'custom' : K extends 'network.outboundTls.customCaFile' ? string : K extends 'network.outboundTls.customCaDir' ? string : K extends 'network.outboundTls.allowInsecureLocalhost' ? boolean : K extends 'network.remoteFetch.allowPrivateHosts' ? boolean : K extends 'runtime.companionChatLimiter.perSessionLimit' ? number : K extends 'runtime.eventBus.maxListeners' ? number : K extends 'telemetry.includeRawPrompts' ? boolean : K extends 'batch.mode' ? BatchMode : K extends 'batch.fallback' ? BatchFallbackMode : K extends 'batch.queueBackend' ? BatchQueueBackend : K extends 'batch.tickIntervalMs' ? number : K extends 'batch.maxDelayMs' ? number : K extends 'batch.maxJobsPerProviderBatch' ? number : K extends 'batch.maxQueuePayloadBytes' ? number : K extends 'batch.maxQueueMessagesPerDay' ? number : K extends 'cloudflare.enabled' ? boolean : K extends 'cloudflare.freeTierMode' ? boolean : K extends 'cloudflare.accountId' ? string : K extends 'cloudflare.apiTokenRef' ? string : K extends 'cloudflare.zoneId' ? string : K extends 'cloudflare.zoneName' ? string : K extends 'cloudflare.workerName' ? string : K extends 'cloudflare.workerSubdomain' ? string : K extends 'cloudflare.workerHostname' ? string : K extends 'cloudflare.workerBaseUrl' ? string : K extends 'cloudflare.daemonBaseUrl' ? string : K extends 'cloudflare.daemonHostname' ? string : K extends 'cloudflare.workerTokenRef' ? string : K extends 'cloudflare.workerClientTokenRef' ? string : K extends 'cloudflare.workerCron' ? string : K extends 'cloudflare.queueName' ? string : K extends 'cloudflare.deadLetterQueueName' ? string : K extends 'cloudflare.tunnelName' ? string : K extends 'cloudflare.tunnelId' ? string : K extends 'cloudflare.tunnelTokenRef' ? string : K extends 'cloudflare.accessAppId' ? string : K extends 'cloudflare.accessServiceTokenId' ? string : K extends 'cloudflare.accessServiceTokenRef' ? string : K extends 'cloudflare.kvNamespaceName' ? string : K extends 'cloudflare.kvNamespaceId' ? string : K extends 'cloudflare.durableObjectNamespaceName' ? string : K extends 'cloudflare.durableObjectNamespaceId' ? string : K extends 'cloudflare.r2BucketName' ? string : K extends 'cloudflare.secretsStoreName' ? string : K extends 'cloudflare.secretsStoreId' ? string : K extends 'cloudflare.maxQueueOpsPerDay' ? number : never;
|
|
434
|
+
export type ConfigValue<K extends ConfigKey> = K extends 'display.stream' ? boolean : K extends 'display.lineNumbers' ? LineNumberMode : K extends 'display.collapseThreshold' ? number : K extends 'display.theme' ? string : K extends 'display.showThinking' ? boolean : K extends 'display.showReasoningSummary' ? boolean : K extends 'display.showTokenSpeed' ? boolean : K extends 'display.showToolPreview' ? boolean : K extends 'provider.reasoningEffort' ? 'instant' | 'low' | 'medium' | 'high' : K extends 'provider.model' ? string : K extends 'provider.provider' ? string : K extends 'provider.embeddingProvider' ? string : K extends 'provider.systemPromptFile' ? string : K extends 'behavior.autoApprove' ? boolean : K extends 'behavior.autoCompactThreshold' ? number : K extends 'behavior.staleContextWarnings' ? boolean : K extends 'behavior.saveHistory' ? boolean : K extends 'behavior.notifyOnComplete' ? boolean : K extends 'behavior.suggestAlternativeOnProviderFail' ? boolean : K extends 'behavior.hitlMode' ? 'quiet' | 'balanced' | 'operator' : K extends 'behavior.returnContextMode' ? 'off' | 'local' | 'assisted' : K extends 'behavior.guidanceMode' ? 'off' | 'minimal' | 'guided' : K extends 'storage.secretPolicy' ? 'plaintext_allowed' | 'preferred_secure' | 'require_secure' : K extends 'permissions.mode' ? PermissionMode : K extends 'permissions.tools.read' ? PermissionAction : K extends 'permissions.tools.write' ? PermissionAction : K extends 'permissions.tools.edit' ? PermissionAction : K extends 'permissions.tools.exec' ? PermissionAction : K extends 'permissions.tools.find' ? PermissionAction : K extends 'permissions.tools.fetch' ? PermissionAction : K extends 'permissions.tools.analyze' ? PermissionAction : K extends 'permissions.tools.inspect' ? PermissionAction : K extends 'permissions.tools.agent' ? PermissionAction : K extends 'permissions.tools.state' ? PermissionAction : K extends 'permissions.tools.workflow' ? PermissionAction : K extends 'permissions.tools.registry' ? PermissionAction : K extends 'permissions.tools.delegate' ? PermissionAction : K extends 'permissions.tools.mcp' ? PermissionAction : K extends 'orchestration.recursionEnabled' ? boolean : K extends 'orchestration.maxActiveAgents' ? number : K extends 'orchestration.maxDepth' ? number : K extends 'sandbox.replIsolation' ? 'shared-vm' | 'per-runtime-vm' : K extends 'sandbox.mcpIsolation' ? 'disabled' | 'shared-vm' | 'hybrid' | 'per-server-vm' : K extends 'sandbox.windowsMode' ? 'native-basic' | 'require-wsl' : K extends 'sandbox.vmBackend' ? 'local' | 'qemu' : K extends 'sandbox.qemuBinary' ? string : K extends 'sandbox.qemuImagePath' ? string : K extends 'sandbox.qemuExecWrapper' ? string : K extends 'sandbox.qemuGuestHost' ? string : K extends 'sandbox.qemuGuestPort' ? number : K extends 'sandbox.qemuGuestUser' ? string : K extends 'sandbox.qemuWorkspacePath' ? string : K extends 'sandbox.qemuSessionMode' ? 'attach' | 'launch-per-command' : K extends 'ui.voiceEnabled' ? boolean : K extends 'ui.systemMessages' ? 'panel' | 'conversation' | 'both' : K extends 'ui.operationalMessages' ? 'panel' | 'conversation' | 'both' : K extends 'ui.wrfcMessages' ? 'panel' | 'conversation' | 'both' : K extends 'tts.provider' ? string : K extends 'tts.voice' ? string : K extends 'tts.llmProvider' ? string : K extends 'tts.llmModel' ? string : K extends 'release.channel' ? 'stable' | 'preview' : K extends 'danger.daemon' ? boolean : K extends 'danger.httpListener' ? boolean : K extends 'tools.llmEnabled' ? boolean : K extends 'tools.llmProvider' ? string : K extends 'tools.llmModel' ? string : K extends 'tools.autoHeal' ? boolean : K extends 'tools.defaultTokenBudget' ? number : K extends 'tools.hooksFile' ? string : K extends 'wrfc.scoreThreshold' ? number : K extends 'wrfc.maxFixAttempts' ? number : K extends 'wrfc.autoCommit' ? boolean : K extends 'cache.enabled' ? boolean : K extends 'cache.stableTtl' ? '5m' | '1h' : K extends 'cache.monitorHitRate' ? boolean : K extends 'cache.hitRateWarningThreshold' ? number : K extends 'helper.enabled' ? boolean : K extends 'helper.globalProvider' ? string : K extends 'helper.globalModel' ? string : K extends 'automation.enabled' ? boolean : K extends 'automation.maxConcurrentRuns' ? number : K extends 'automation.runHistoryLimit' ? number : K extends 'automation.defaultTimeoutMs' ? number : K extends 'automation.catchUpWindowMinutes' ? number : K extends 'automation.failureCooldownMs' ? number : K extends 'automation.deleteAfterRun' ? boolean : K extends 'controlPlane.enabled' ? boolean : K extends 'controlPlane.hostMode' ? 'local' | 'network' | 'custom' : K extends 'controlPlane.host' ? string : K extends 'controlPlane.port' ? number : K extends 'controlPlane.baseUrl' ? string : K extends 'controlPlane.streamMode' ? 'sse' | 'websocket' | 'both' : K extends 'controlPlane.allowRemote' ? boolean : K extends 'controlPlane.trustProxy' ? boolean : K extends 'controlPlane.tls.mode' ? 'off' | 'proxy' | 'direct' : K extends 'controlPlane.tls.certFile' ? string : K extends 'controlPlane.tls.keyFile' ? string : K extends 'httpListener.hostMode' ? 'local' | 'network' | 'custom' : K extends 'httpListener.host' ? string : K extends 'httpListener.port' ? number : K extends 'httpListener.trustProxy' ? boolean : K extends 'httpListener.tls.mode' ? 'off' | 'proxy' | 'direct' : K extends 'httpListener.tls.certFile' ? string : K extends 'httpListener.tls.keyFile' ? string : K extends 'web.enabled' ? boolean : K extends 'web.hostMode' ? 'local' | 'network' | 'custom' : K extends 'web.host' ? string : K extends 'web.port' ? number : K extends 'web.publicBaseUrl' ? string : K extends 'web.staticAssetsDir' ? string : K extends 'surfaces.slack.enabled' ? boolean : K extends 'surfaces.slack.signingSecret' ? string : K extends 'surfaces.slack.botToken' ? string : K extends 'surfaces.slack.appToken' ? string : K extends 'surfaces.slack.defaultChannel' ? string : K extends 'surfaces.slack.workspaceId' ? string : K extends 'surfaces.discord.enabled' ? boolean : K extends 'surfaces.discord.publicKey' ? string : K extends 'surfaces.discord.botToken' ? string : K extends 'surfaces.discord.applicationId' ? string : K extends 'surfaces.discord.defaultChannelId' ? string : K extends 'surfaces.discord.guildId' ? string : K extends 'surfaces.ntfy.enabled' ? boolean : K extends 'surfaces.ntfy.baseUrl' ? string : K extends 'surfaces.ntfy.topic' ? string : K extends 'surfaces.ntfy.chatTopic' ? string : K extends 'surfaces.ntfy.agentTopic' ? string : K extends 'surfaces.ntfy.remoteTopic' ? string : K extends 'surfaces.ntfy.token' ? string : K extends 'surfaces.ntfy.defaultPriority' ? number : K extends 'surfaces.webhook.enabled' ? boolean : K extends 'surfaces.webhook.defaultTarget' ? string : K extends 'surfaces.webhook.timeoutMs' ? number : K extends 'surfaces.webhook.secret' ? string : K extends 'surfaces.homeassistant.enabled' ? boolean : K extends 'surfaces.homeassistant.instanceUrl' ? string : K extends 'surfaces.homeassistant.accessToken' ? string : K extends 'surfaces.homeassistant.webhookSecret' ? string : K extends 'surfaces.homeassistant.defaultConversationId' ? string : K extends 'surfaces.homeassistant.deviceId' ? string : K extends 'surfaces.homeassistant.deviceName' ? string : K extends 'surfaces.homeassistant.eventType' ? string : K extends 'surfaces.homeassistant.remoteSessionTtlMs' ? number : K extends 'surfaces.telegram.enabled' ? boolean : K extends 'surfaces.telegram.botToken' ? string : K extends 'surfaces.telegram.webhookSecret' ? string : K extends 'surfaces.telegram.defaultChatId' ? string : K extends 'surfaces.telegram.botUsername' ? string : K extends 'surfaces.telegram.mode' ? 'webhook' | 'polling' : K extends 'surfaces.googleChat.enabled' ? boolean : K extends 'surfaces.googleChat.webhookUrl' ? string : K extends 'surfaces.googleChat.verificationToken' ? string : K extends 'surfaces.googleChat.appId' ? string : K extends 'surfaces.googleChat.spaceId' ? string : K extends 'surfaces.signal.enabled' ? boolean : K extends 'surfaces.signal.bridgeUrl' ? string : K extends 'surfaces.signal.account' ? string : K extends 'surfaces.signal.token' ? string : K extends 'surfaces.signal.defaultRecipient' ? string : K extends 'surfaces.whatsapp.enabled' ? boolean : K extends 'surfaces.whatsapp.provider' ? 'meta-cloud' | 'bridge' : K extends 'surfaces.whatsapp.accessToken' ? string : K extends 'surfaces.whatsapp.verifyToken' ? string : K extends 'surfaces.whatsapp.signingSecret' ? string : K extends 'surfaces.whatsapp.phoneNumberId' ? string : K extends 'surfaces.whatsapp.businessAccountId' ? string : K extends 'surfaces.whatsapp.defaultRecipient' ? string : K extends 'surfaces.imessage.enabled' ? boolean : K extends 'surfaces.imessage.bridgeUrl' ? string : K extends 'surfaces.imessage.account' ? string : K extends 'surfaces.imessage.token' ? string : K extends 'surfaces.imessage.defaultChatId' ? string : K extends 'surfaces.msteams.enabled' ? boolean : K extends 'surfaces.msteams.appId' ? string : K extends 'surfaces.msteams.appPassword' ? string : K extends 'surfaces.msteams.tenantId' ? string : K extends 'surfaces.msteams.serviceUrl' ? string : K extends 'surfaces.msteams.botId' ? string : K extends 'surfaces.msteams.defaultConversationId' ? string : K extends 'surfaces.msteams.defaultChannelId' ? string : K extends 'surfaces.bluebubbles.enabled' ? boolean : K extends 'surfaces.bluebubbles.serverUrl' ? string : K extends 'surfaces.bluebubbles.password' ? string : K extends 'surfaces.bluebubbles.account' ? string : K extends 'surfaces.bluebubbles.defaultChatGuid' ? string : K extends 'surfaces.mattermost.enabled' ? boolean : K extends 'surfaces.mattermost.baseUrl' ? string : K extends 'surfaces.mattermost.botToken' ? string : K extends 'surfaces.mattermost.teamId' ? string : K extends 'surfaces.mattermost.defaultChannelId' ? string : K extends 'surfaces.matrix.enabled' ? boolean : K extends 'surfaces.matrix.homeserverUrl' ? string : K extends 'surfaces.matrix.accessToken' ? string : K extends 'surfaces.matrix.userId' ? string : K extends 'surfaces.matrix.defaultRoomId' ? string : K extends 'watchers.enabled' ? boolean : K extends 'watchers.pollIntervalMs' ? number : K extends 'watchers.heartbeatIntervalMs' ? number : K extends 'watchers.recoveryWindowMinutes' ? number : K extends 'service.enabled' ? boolean : K extends 'service.autostart' ? boolean : K extends 'service.restartOnFailure' ? boolean : K extends 'service.platform' ? 'auto' | 'systemd' | 'launchd' | 'windows' | 'manual' : K extends 'service.serviceName' ? string : K extends 'service.logPath' ? string : K extends 'network.outboundTls.mode' ? 'bundled' | 'bundled+custom' | 'custom' : K extends 'network.outboundTls.customCaFile' ? string : K extends 'network.outboundTls.customCaDir' ? string : K extends 'network.outboundTls.allowInsecureLocalhost' ? boolean : K extends 'network.remoteFetch.allowPrivateHosts' ? boolean : K extends 'runtime.companionChatLimiter.perSessionLimit' ? number : K extends 'runtime.eventBus.maxListeners' ? number : K extends 'telemetry.includeRawPrompts' ? boolean : K extends 'batch.mode' ? BatchMode : K extends 'batch.fallback' ? BatchFallbackMode : K extends 'batch.queueBackend' ? BatchQueueBackend : K extends 'batch.tickIntervalMs' ? number : K extends 'batch.maxDelayMs' ? number : K extends 'batch.maxJobsPerProviderBatch' ? number : K extends 'batch.maxQueuePayloadBytes' ? number : K extends 'batch.maxQueueMessagesPerDay' ? number : K extends 'cloudflare.enabled' ? boolean : K extends 'cloudflare.freeTierMode' ? boolean : K extends 'cloudflare.accountId' ? string : K extends 'cloudflare.apiTokenRef' ? string : K extends 'cloudflare.zoneId' ? string : K extends 'cloudflare.zoneName' ? string : K extends 'cloudflare.workerName' ? string : K extends 'cloudflare.workerSubdomain' ? string : K extends 'cloudflare.workerHostname' ? string : K extends 'cloudflare.workerBaseUrl' ? string : K extends 'cloudflare.daemonBaseUrl' ? string : K extends 'cloudflare.daemonHostname' ? string : K extends 'cloudflare.workerTokenRef' ? string : K extends 'cloudflare.workerClientTokenRef' ? string : K extends 'cloudflare.workerCron' ? string : K extends 'cloudflare.queueName' ? string : K extends 'cloudflare.deadLetterQueueName' ? string : K extends 'cloudflare.tunnelName' ? string : K extends 'cloudflare.tunnelId' ? string : K extends 'cloudflare.tunnelTokenRef' ? string : K extends 'cloudflare.accessAppId' ? string : K extends 'cloudflare.accessServiceTokenId' ? string : K extends 'cloudflare.accessServiceTokenRef' ? string : K extends 'cloudflare.kvNamespaceName' ? string : K extends 'cloudflare.kvNamespaceId' ? string : K extends 'cloudflare.durableObjectNamespaceName' ? string : K extends 'cloudflare.durableObjectNamespaceId' ? string : K extends 'cloudflare.r2BucketName' ? string : K extends 'cloudflare.secretsStoreName' ? string : K extends 'cloudflare.secretsStoreId' ? string : K extends 'cloudflare.maxQueueOpsPerDay' ? number : never;
|
|
422
435
|
//# sourceMappingURL=schema-types.d.ts.map
|