@pellux/goodvibes-sdk 0.25.4 → 0.25.6
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/platform/adapters/ntfy/index.js +1 -1
- package/dist/_internal/platform/adapters/slack/index.d.ts.map +1 -1
- package/dist/_internal/platform/adapters/slack/index.js +16 -1
- package/dist/_internal/platform/adapters/types.d.ts +2 -0
- package/dist/_internal/platform/adapters/types.d.ts.map +1 -1
- package/dist/_internal/platform/automation/delivery-manager.d.ts +1 -0
- package/dist/_internal/platform/automation/delivery-manager.d.ts.map +1 -1
- package/dist/_internal/platform/automation/delivery-manager.js +1 -0
- package/dist/_internal/platform/channels/builtin/account-actions.js +58 -1
- package/dist/_internal/platform/channels/builtin/accounts.js +1 -1
- package/dist/_internal/platform/channels/builtin/setup-schema.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/setup-schema.js +4 -2
- package/dist/_internal/platform/channels/builtin/surfaces.d.ts +1 -0
- package/dist/_internal/platform/channels/builtin/surfaces.d.ts.map +1 -1
- package/dist/_internal/platform/channels/builtin/surfaces.js +21 -3
- package/dist/_internal/platform/channels/delivery/strategies-core.d.ts +2 -1
- package/dist/_internal/platform/channels/delivery/strategies-core.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery/strategies-core.js +6 -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 +2 -1
- package/dist/_internal/platform/channels/delivery-router.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery-router.js +3 -3
- package/dist/_internal/platform/channels/provider-runtime.d.ts +3 -0
- package/dist/_internal/platform/channels/provider-runtime.d.ts.map +1 -1
- package/dist/_internal/platform/channels/provider-runtime.js +24 -6
- package/dist/_internal/platform/config/secret-refs.d.ts +1 -0
- package/dist/_internal/platform/config/secret-refs.d.ts.map +1 -1
- package/dist/_internal/platform/config/secret-refs.js +15 -0
- package/dist/_internal/platform/config/service-registry.d.ts +7 -2
- package/dist/_internal/platform/config/service-registry.d.ts.map +1 -1
- package/dist/_internal/platform/config/service-registry.js +6 -2
- package/dist/_internal/platform/core/orchestrator.d.ts +13 -3
- package/dist/_internal/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/_internal/platform/core/orchestrator.js +15 -9
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +3 -0
- package/dist/_internal/platform/daemon/surface-actions.d.ts +5 -0
- package/dist/_internal/platform/daemon/surface-actions.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/surface-actions.js +63 -17
- package/dist/_internal/platform/daemon/surface-delivery.d.ts +5 -0
- package/dist/_internal/platform/daemon/surface-delivery.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/surface-delivery.js +26 -12
- package/dist/_internal/platform/integrations/index.d.ts +1 -1
- package/dist/_internal/platform/integrations/index.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/index.js +1 -1
- package/dist/_internal/platform/integrations/ntfy.d.ts +1 -0
- package/dist/_internal/platform/integrations/ntfy.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/ntfy.js +42 -2
- package/dist/_internal/platform/runtime/bootstrap-helpers.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/bootstrap-helpers.js +1 -0
- package/dist/_internal/platform/runtime/emitters/session.d.ts +1 -0
- package/dist/_internal/platform/runtime/emitters/session.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/emitters/turn.d.ts +2 -0
- package/dist/_internal/platform/runtime/emitters/turn.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/index.d.ts +1 -1
- package/dist/_internal/platform/runtime/events/index.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/session.d.ts +1 -0
- package/dist/_internal/platform/runtime/events/session.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/turn.d.ts +8 -0
- package/dist/_internal/platform/runtime/events/turn.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.js +2 -0
- package/dist/_internal/platform/version.js +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* {
|
|
10
10
|
* "openai": { "name": "openai", "baseUrl": "https://api.openai.com", "authType": "bearer", "tokenKey": "OPENAI_API_KEY" },
|
|
11
11
|
* "github": { "name": "github", "baseUrl": "https://api.github.com", "authType": "bearer", "tokenKey": "GITHUB_TOKEN" },
|
|
12
|
-
* "slack": { "name": "slack", "authType": "bearer", "tokenKey": "SLACK_BOT_TOKEN", "tokenRef": { "source": "vaultwarden", "item": "GoodVibes Slack", "field": "password", "server": "https://vault.example.test" } }
|
|
12
|
+
* "slack": { "name": "slack", "authType": "bearer", "tokenKey": "SLACK_BOT_TOKEN", "appTokenKey": "SLACK_APP_TOKEN", "tokenRef": { "source": "vaultwarden", "item": "GoodVibes Slack", "field": "password", "server": "https://vault.example.test" } }
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
15
15
|
import { SecretsManager } from './secrets.js';
|
|
@@ -45,12 +45,16 @@ export interface ServiceConfig {
|
|
|
45
45
|
publicKeyKey?: string;
|
|
46
46
|
/** Optional external/local secret reference for inbound public-key verification. */
|
|
47
47
|
publicKeyRef?: SecretRefInput;
|
|
48
|
+
/** Optional Slack-style app-level token key used by socket/client runtimes. */
|
|
49
|
+
appTokenKey?: string;
|
|
50
|
+
/** Optional external/local secret reference for app-level socket/client runtimes. */
|
|
51
|
+
appTokenRef?: SecretRefInput;
|
|
48
52
|
/** Optional provider ID used for subscription token override lookup. */
|
|
49
53
|
providerId?: string;
|
|
50
54
|
/** OAuth metadata for subscription-backed services. */
|
|
51
55
|
oauth?: OAuthProviderConfig;
|
|
52
56
|
}
|
|
53
|
-
export type ServiceSecretField = 'primary' | 'password' | 'webhookUrl' | 'signingSecret' | 'publicKey';
|
|
57
|
+
export type ServiceSecretField = 'primary' | 'password' | 'webhookUrl' | 'signingSecret' | 'publicKey' | 'appToken';
|
|
54
58
|
export interface ServiceInspection {
|
|
55
59
|
readonly config: ServiceConfig;
|
|
56
60
|
readonly hasPrimaryCredential: boolean;
|
|
@@ -58,6 +62,7 @@ export interface ServiceInspection {
|
|
|
58
62
|
readonly hasWebhookUrl: boolean;
|
|
59
63
|
readonly hasSigningSecret: boolean;
|
|
60
64
|
readonly hasPublicKey: boolean;
|
|
65
|
+
readonly hasAppToken: boolean;
|
|
61
66
|
}
|
|
62
67
|
export interface ServiceConnectionTestResult {
|
|
63
68
|
readonly ok: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-registry.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/config/service-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AASzD,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,UAAU,GACV,YAAY,GACZ,eAAe,GACf,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"service-registry.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/config/service-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AASzD,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,cAA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AAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACnD;AAqBD,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsB;gBAE9C,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB;IAMrE;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAIvC;;OAEG;IACH,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI;YAKhC,uBAAuB;IA4BrC;;;;;;OAMG;IACG,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAyDxE,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAoBnB,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IA+B/D,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC;CA+ChF"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* {
|
|
10
10
|
* "openai": { "name": "openai", "baseUrl": "https://api.openai.com", "authType": "bearer", "tokenKey": "OPENAI_API_KEY" },
|
|
11
11
|
* "github": { "name": "github", "baseUrl": "https://api.github.com", "authType": "bearer", "tokenKey": "GITHUB_TOKEN" },
|
|
12
|
-
* "slack": { "name": "slack", "authType": "bearer", "tokenKey": "SLACK_BOT_TOKEN", "tokenRef": { "source": "vaultwarden", "item": "GoodVibes Slack", "field": "password", "server": "https://vault.example.test" } }
|
|
12
|
+
* "slack": { "name": "slack", "authType": "bearer", "tokenKey": "SLACK_BOT_TOKEN", "appTokenKey": "SLACK_APP_TOKEN", "tokenRef": { "source": "vaultwarden", "item": "GoodVibes Slack", "field": "password", "server": "https://vault.example.test" } }
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
15
15
|
import { readFileSync } from 'fs';
|
|
@@ -153,18 +153,21 @@ export class ServiceRegistry {
|
|
|
153
153
|
return this.resolveConfiguredSecret(serviceName, field, config.signingSecretKey, config.signingSecretRef);
|
|
154
154
|
case 'publicKey':
|
|
155
155
|
return this.resolveConfiguredSecret(serviceName, field, config.publicKeyKey, config.publicKeyRef);
|
|
156
|
+
case 'appToken':
|
|
157
|
+
return this.resolveConfiguredSecret(serviceName, field, config.appTokenKey, config.appTokenRef);
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
160
|
async inspect(serviceName) {
|
|
159
161
|
const config = this.get(serviceName);
|
|
160
162
|
if (!config)
|
|
161
163
|
return null;
|
|
162
|
-
const [primary, password, webhookUrl, signingSecret, publicKey,] = await Promise.all([
|
|
164
|
+
const [primary, password, webhookUrl, signingSecret, publicKey, appToken,] = await Promise.all([
|
|
163
165
|
this.resolveSecret(serviceName, 'primary'),
|
|
164
166
|
this.resolveSecret(serviceName, 'password'),
|
|
165
167
|
this.resolveSecret(serviceName, 'webhookUrl'),
|
|
166
168
|
this.resolveSecret(serviceName, 'signingSecret'),
|
|
167
169
|
this.resolveSecret(serviceName, 'publicKey'),
|
|
170
|
+
this.resolveSecret(serviceName, 'appToken'),
|
|
168
171
|
]);
|
|
169
172
|
return {
|
|
170
173
|
config,
|
|
@@ -173,6 +176,7 @@ export class ServiceRegistry {
|
|
|
173
176
|
hasWebhookUrl: webhookUrl !== null && webhookUrl.length > 0,
|
|
174
177
|
hasSigningSecret: signingSecret !== null && signingSecret.length > 0,
|
|
175
178
|
hasPublicKey: publicKey !== null && publicKey.length > 0,
|
|
179
|
+
hasAppToken: appToken !== null && appToken.length > 0,
|
|
176
180
|
};
|
|
177
181
|
}
|
|
178
182
|
async testConnection(serviceName) {
|
|
@@ -8,7 +8,7 @@ import { type ConversationFollowUpItem } from './conversation-follow-ups.js';
|
|
|
8
8
|
import { AgentManager } from '../tools/agent/index.js';
|
|
9
9
|
import { WrfcController } from '../agents/wrfc-controller.js';
|
|
10
10
|
import type { FeatureFlagManager } from '../runtime/feature-flags/manager.js';
|
|
11
|
-
import type { RuntimeEventBus } from '../runtime/events/index.js';
|
|
11
|
+
import type { RuntimeEventBus, TurnInputOrigin } from '../runtime/events/index.js';
|
|
12
12
|
import { type OrchestratorCoreServices } from './orchestrator-runtime.js';
|
|
13
13
|
/** Minimal interface for hook dispatch — allows any compatible implementation */
|
|
14
14
|
interface HookDispatcherLike {
|
|
@@ -17,6 +17,9 @@ interface HookDispatcherLike {
|
|
|
17
17
|
interface LowPrioritySystemMessageSink {
|
|
18
18
|
low(message: string): void;
|
|
19
19
|
}
|
|
20
|
+
export interface OrchestratorUserInputOptions {
|
|
21
|
+
readonly origin?: TurnInputOrigin;
|
|
22
|
+
}
|
|
20
23
|
/**
|
|
21
24
|
* Options for constructing an {@link Orchestrator}.
|
|
22
25
|
*
|
|
@@ -58,6 +61,11 @@ export interface OrchestratorOptions {
|
|
|
58
61
|
requestRender?: (() => void) | null;
|
|
59
62
|
/** Optional runtime event bus for cross-system event propagation. */
|
|
60
63
|
runtimeBus?: RuntimeEventBus | null;
|
|
64
|
+
/**
|
|
65
|
+
* Stable session id used in runtime events, hook events, idempotency keys,
|
|
66
|
+
* plans, and reply correlation. Defaults to a generated private id.
|
|
67
|
+
*/
|
|
68
|
+
sessionId?: string;
|
|
61
69
|
/** Required runtime service dependencies. */
|
|
62
70
|
services: {
|
|
63
71
|
readonly agentManager: Pick<AgentManager, 'list' | 'spawn'>;
|
|
@@ -92,6 +100,7 @@ export declare class Orchestrator {
|
|
|
92
100
|
messageQueue: {
|
|
93
101
|
text: string;
|
|
94
102
|
content?: ContentPart[];
|
|
103
|
+
options?: OrchestratorUserInputOptions;
|
|
95
104
|
}[];
|
|
96
105
|
private animInterval;
|
|
97
106
|
private abortController;
|
|
@@ -105,7 +114,7 @@ export declare class Orchestrator {
|
|
|
105
114
|
private lastWarningBracket;
|
|
106
115
|
/** Whether auto-compaction is currently in progress (prevents re-entry). */
|
|
107
116
|
private isCompacting;
|
|
108
|
-
/** Session ID for hook events
|
|
117
|
+
/** Session ID for runtime and hook events. */
|
|
109
118
|
private readonly sessionId;
|
|
110
119
|
/**
|
|
111
120
|
* Submission key for the currently active turn.
|
|
@@ -204,8 +213,9 @@ export declare class Orchestrator {
|
|
|
204
213
|
* Queues if already thinking, otherwise kicks off the LLM turn.
|
|
205
214
|
* @param text - Plain text representation (for display and queuing).
|
|
206
215
|
* @param content - Optional ContentPart[] for multimodal messages.
|
|
216
|
+
* @param options - Optional origin metadata for external surfaces.
|
|
207
217
|
*/
|
|
208
|
-
handleUserInput(text: string, content?: ContentPart[]): Promise<void>;
|
|
218
|
+
handleUserInput(text: string, content?: ContentPart[], options?: OrchestratorUserInputOptions): Promise<void>;
|
|
209
219
|
private startThinking;
|
|
210
220
|
private stopThinking;
|
|
211
221
|
private runTurn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/core/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU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
58
58
|
lastWarningBracket = 0;
|
|
59
59
|
/** Whether auto-compaction is currently in progress (prevents re-entry). */
|
|
60
60
|
isCompacting = false;
|
|
61
|
-
/** Session ID for hook events
|
|
62
|
-
sessionId
|
|
61
|
+
/** Session ID for runtime and hook events. */
|
|
62
|
+
sessionId;
|
|
63
63
|
/**
|
|
64
64
|
* Submission key for the currently active turn.
|
|
65
65
|
*
|
|
@@ -134,7 +134,8 @@ export class Orchestrator {
|
|
|
134
134
|
* ```
|
|
135
135
|
*/
|
|
136
136
|
constructor(options) {
|
|
137
|
-
const { conversation, getViewportHeight, scrollToEnd, toolRegistry, permissionManager, getSystemPrompt = () => '', hookDispatcher = null, flagManager = null, requestRender = null, runtimeBus = null, services, } = options;
|
|
137
|
+
const { conversation, getViewportHeight, scrollToEnd, toolRegistry, permissionManager, getSystemPrompt = () => '', hookDispatcher = null, flagManager = null, requestRender = null, runtimeBus = null, sessionId, services, } = options;
|
|
138
|
+
this.sessionId = sessionId?.trim() || randomUUID();
|
|
138
139
|
this.conversation = conversation;
|
|
139
140
|
this.getViewportHeight = getViewportHeight;
|
|
140
141
|
this.scrollToEnd = scrollToEnd;
|
|
@@ -301,22 +302,23 @@ export class Orchestrator {
|
|
|
301
302
|
* Queues if already thinking, otherwise kicks off the LLM turn.
|
|
302
303
|
* @param text - Plain text representation (for display and queuing).
|
|
303
304
|
* @param content - Optional ContentPart[] for multimodal messages.
|
|
305
|
+
* @param options - Optional origin metadata for external surfaces.
|
|
304
306
|
*/
|
|
305
|
-
async handleUserInput(text, content) {
|
|
307
|
+
async handleUserInput(text, content, options) {
|
|
306
308
|
if (!text.trim() && !content?.length)
|
|
307
309
|
return;
|
|
308
310
|
if (this.isThinking || this.isCompacting) {
|
|
309
|
-
this.messageQueue.push({ text, content });
|
|
311
|
+
this.messageQueue.push({ text, content, options });
|
|
310
312
|
this.requestRender();
|
|
311
313
|
return;
|
|
312
314
|
}
|
|
313
315
|
// Set the original task on the first user message (idempotent — subsequent calls are no-ops)
|
|
314
316
|
getSessionLineageTracker(this.coreServices, this.ownedSessionLineageTracker).setOriginalTask(text.slice(0, 200));
|
|
315
|
-
await this.runTurn(text, content);
|
|
317
|
+
await this.runTurn(text, content, options);
|
|
316
318
|
// Process any messages queued while the LLM was thinking (iterative, not recursive)
|
|
317
319
|
while (this.messageQueue.length > 0) {
|
|
318
320
|
const next = this.messageQueue.shift();
|
|
319
|
-
await this.runTurn(next.text, next.content);
|
|
321
|
+
await this.runTurn(next.text, next.content, next.options);
|
|
320
322
|
}
|
|
321
323
|
this.followUpRuntime.scheduleFlush();
|
|
322
324
|
}
|
|
@@ -347,7 +349,7 @@ export class Orchestrator {
|
|
|
347
349
|
this.scrollToEnd(this.getViewportHeight());
|
|
348
350
|
this.requestRender();
|
|
349
351
|
}
|
|
350
|
-
async runTurn(text, content) {
|
|
352
|
+
async runTurn(text, content, options) {
|
|
351
353
|
const turnStartTime = Date.now();
|
|
352
354
|
const configManager = requireConfigManager(this.coreServices);
|
|
353
355
|
const providerRegistry = requireProviderRegistry(this.coreServices);
|
|
@@ -385,7 +387,11 @@ export class Orchestrator {
|
|
|
385
387
|
// 'duplicate' (completed/failed) — allow re-run (user sent same text intentionally).
|
|
386
388
|
// We just let it proceed; the prior record will be overwritten.
|
|
387
389
|
if (this.runtimeBus) {
|
|
388
|
-
emitTurnSubmitted(this.runtimeBus, createEmitterContext(this.sessionId, turnId), {
|
|
390
|
+
emitTurnSubmitted(this.runtimeBus, createEmitterContext(this.sessionId, turnId), {
|
|
391
|
+
turnId,
|
|
392
|
+
prompt: text,
|
|
393
|
+
...(options?.origin ? { origin: options.origin } : {}),
|
|
394
|
+
});
|
|
389
395
|
}
|
|
390
396
|
// Adaptive Execution Planner.
|
|
391
397
|
// If the feature flag is enabled, score and select the execution strategy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade-composition.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/facade-composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAiBrD,OAAO,KAAK,EAAE,oBAAoB,EAA0B,MAAM,wCAAwC,CAAC;AAI3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AAIpE,YAAY,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,sCAAsC,GACvC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,sCAAsC,EACvC,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,8BAA8B,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,oBAAoB,CA2FvG;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,YAAY,EACpB,qBAAqB,CAAC,EAAE,aAAa,GACpC,2BAA2B,CAoI7B;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,sCAAsC,GAC9C,yBAAyB,
|
|
1
|
+
{"version":3,"file":"facade-composition.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/facade-composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAiBrD,OAAO,KAAK,EAAE,oBAAoB,EAA0B,MAAM,wCAAwC,CAAC;AAI3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AAIpE,YAAY,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,sCAAsC,GACvC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,sCAAsC,EACvC,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,8BAA8B,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,oBAAoB,CA2FvG;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,YAAY,EACpB,qBAAqB,CAAC,EAAE,aAAa,GACpC,2BAA2B,CAoI7B;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,sCAAsC,GAC9C,yBAAyB,CAgK3B;AAED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE;IAC1D,QAAQ,CAAC,aAAa,EAAE,OAAO,2BAA2B,EAAE,mBAAmB,CAAC;IAChF,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,yBAAyB,EAAE,WAAW,GAAG,QAAQ,CAAC;IACzK,QAAQ,CAAC,4BAA4B,EAAE,CAAC,OAAO,EAAE,OAAO,kDAAkD,EAAE,sBAAsB,GAAG,SAAS,EAAE,KAAK,EAAE;QACrJ,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;KAC7B,KAAK,IAAI,CAAC;CACZ,GAAG,IAAI,CAoBP"}
|
|
@@ -268,6 +268,7 @@ export function createDaemonFacadeCollaborators(options) {
|
|
|
268
268
|
pendingSurfaceReplies: options.pendingSurfaceReplies,
|
|
269
269
|
channelReplyPipeline,
|
|
270
270
|
configManager: runtime.configManager,
|
|
271
|
+
secretsManager: runtime.runtimeServices.secretsManager,
|
|
271
272
|
serviceRegistry: runtime.serviceRegistry,
|
|
272
273
|
agentManager: runtime.agentManager,
|
|
273
274
|
sessionBroker: runtime.sessionBroker,
|
|
@@ -278,6 +279,7 @@ export function createDaemonFacadeCollaborators(options) {
|
|
|
278
279
|
});
|
|
279
280
|
const surfaceActionHelper = new DaemonSurfaceActionHelper({
|
|
280
281
|
serviceRegistry: runtime.serviceRegistry,
|
|
282
|
+
secretsManager: runtime.runtimeServices.secretsManager,
|
|
281
283
|
configManager: runtime.configManager,
|
|
282
284
|
routeBindings: runtime.routeBindings,
|
|
283
285
|
sessionBroker: runtime.sessionBroker,
|
|
@@ -369,6 +371,7 @@ export function createDaemonFacadeCollaborators(options) {
|
|
|
369
371
|
});
|
|
370
372
|
const providerRuntime = new ChannelProviderRuntimeManager({
|
|
371
373
|
configManager: runtime.configManager,
|
|
374
|
+
secretsManager: runtime.runtimeServices.secretsManager,
|
|
372
375
|
serviceRegistry: runtime.serviceRegistry,
|
|
373
376
|
buildSurfaceAdapterContext: () => surfaceActionHelper.buildSurfaceAdapterContext(),
|
|
374
377
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConfigManager } from '../config/manager.js';
|
|
2
|
+
import type { SecretsManager } from '../config/secrets.js';
|
|
2
3
|
import type { ServiceRegistry } from '../config/service-registry.js';
|
|
3
4
|
import type { AgentRecord } from '../tools/agent/index.js';
|
|
4
5
|
import type { AgentManager } from '../tools/agent/index.js';
|
|
@@ -11,6 +12,7 @@ import type { RuntimeEventBus } from '../runtime/events/index.js';
|
|
|
11
12
|
import type { CompanionChatManager } from '../companion/companion-chat-manager.js';
|
|
12
13
|
interface DaemonSurfaceActionContext {
|
|
13
14
|
readonly serviceRegistry: ServiceRegistry;
|
|
15
|
+
readonly secretsManager: Pick<SecretsManager, 'get' | 'getGlobalHome'>;
|
|
14
16
|
readonly configManager: ConfigManager;
|
|
15
17
|
readonly routeBindings: RouteBindingManager;
|
|
16
18
|
readonly sessionBroker: SharedSessionBroker;
|
|
@@ -62,7 +64,10 @@ export declare class DaemonSurfaceActionHelper {
|
|
|
62
64
|
private queueNtfyChatReply;
|
|
63
65
|
private ensureNtfyChatReplyListeners;
|
|
64
66
|
private matchNtfyChatReplyTurn;
|
|
67
|
+
private readNtfyOriginMessageId;
|
|
65
68
|
private deliverNtfyChatReply;
|
|
69
|
+
private findPendingNtfyChatReplyForPrompt;
|
|
70
|
+
private findPendingNtfyChatReplyForMessageId;
|
|
66
71
|
private takeNtfyChatReply;
|
|
67
72
|
private cleanupExpiredNtfyChatReplies;
|
|
68
73
|
private postNtfyRemoteChatMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-actions.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/surface-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"surface-actions.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/surface-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM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AAO,CAAC,uBAAuB;YAWjB,oBAAoB;IAmBlC,OAAO,CAAC,iCAAiC;IAoBzC,OAAO,CAAC,oCAAoC;IAU5C,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,6BAA6B;YAWvB,yBAAyB;YAyDzB,qBAAqB;YAiCrB,gBAAgB;YAYhB,gBAAgB;CAM/B"}
|
|
@@ -14,6 +14,7 @@ export class DaemonSurfaceActionHelper {
|
|
|
14
14
|
buildSurfaceAdapterContext() {
|
|
15
15
|
return {
|
|
16
16
|
serviceRegistry: this.context.serviceRegistry,
|
|
17
|
+
secretsManager: this.context.secretsManager,
|
|
17
18
|
configManager: this.context.configManager,
|
|
18
19
|
routeBindings: this.context.routeBindings,
|
|
19
20
|
sessionBroker: this.context.sessionBroker,
|
|
@@ -140,6 +141,7 @@ export class DaemonSurfaceActionHelper {
|
|
|
140
141
|
body: envelope.body,
|
|
141
142
|
source: envelope.source,
|
|
142
143
|
timestamp: envelope.timestamp,
|
|
144
|
+
...(envelope.metadata ? { metadata: envelope.metadata } : {}),
|
|
143
145
|
});
|
|
144
146
|
}
|
|
145
147
|
queueNtfyChatReply(input) {
|
|
@@ -156,7 +158,7 @@ export class DaemonSurfaceActionHelper {
|
|
|
156
158
|
if (this.ntfyChatReplyUnsubscribers.length > 0)
|
|
157
159
|
return;
|
|
158
160
|
this.ntfyChatReplyUnsubscribers = [
|
|
159
|
-
this.context.runtimeBus.on('TURN_SUBMITTED', (envelope) => this.matchNtfyChatReplyTurn(envelope.sessionId, envelope.payload.turnId, envelope.payload.prompt)),
|
|
161
|
+
this.context.runtimeBus.on('TURN_SUBMITTED', (envelope) => this.matchNtfyChatReplyTurn(envelope.sessionId, envelope.payload.turnId, envelope.payload.prompt, envelope.payload.origin)),
|
|
160
162
|
this.context.runtimeBus.on('TURN_COMPLETED', (envelope) => {
|
|
161
163
|
void this.deliverNtfyChatReply(envelope.sessionId, envelope.payload.turnId, envelope.payload.response);
|
|
162
164
|
}),
|
|
@@ -165,16 +167,34 @@ export class DaemonSurfaceActionHelper {
|
|
|
165
167
|
}),
|
|
166
168
|
];
|
|
167
169
|
}
|
|
168
|
-
matchNtfyChatReplyTurn(sessionId, turnId, prompt) {
|
|
170
|
+
matchNtfyChatReplyTurn(sessionId, turnId, prompt, origin) {
|
|
169
171
|
this.cleanupExpiredNtfyChatReplies();
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
+
const originMessageId = this.readNtfyOriginMessageId(origin);
|
|
173
|
+
const matchByMessageId = originMessageId
|
|
174
|
+
? this.findPendingNtfyChatReplyForMessageId(originMessageId)
|
|
175
|
+
: null;
|
|
176
|
+
if (matchByMessageId) {
|
|
177
|
+
matchByMessageId.pending.turnId = turnId;
|
|
178
|
+
matchByMessageId.pending.turnSessionId = sessionId;
|
|
172
179
|
return;
|
|
180
|
+
}
|
|
173
181
|
const normalizedPrompt = prompt.trim();
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
|
|
182
|
+
const match = this.findPendingNtfyChatReplyForPrompt(sessionId, normalizedPrompt);
|
|
183
|
+
if (!match)
|
|
184
|
+
return;
|
|
185
|
+
match.pending.turnId = turnId;
|
|
186
|
+
match.pending.turnSessionId = sessionId;
|
|
187
|
+
}
|
|
188
|
+
readNtfyOriginMessageId(origin) {
|
|
189
|
+
if (!origin)
|
|
190
|
+
return null;
|
|
191
|
+
if (typeof origin.messageId === 'string' && origin.messageId.trim()) {
|
|
192
|
+
return origin.messageId.trim();
|
|
177
193
|
}
|
|
194
|
+
const metadataMessageId = origin.metadata?.['ntfyMessageId'] ?? origin.metadata?.['messageId'];
|
|
195
|
+
return typeof metadataMessageId === 'string' && metadataMessageId.trim()
|
|
196
|
+
? metadataMessageId.trim()
|
|
197
|
+
: null;
|
|
178
198
|
}
|
|
179
199
|
async deliverNtfyChatReply(sessionId, turnId, message) {
|
|
180
200
|
const pending = this.takeNtfyChatReply(sessionId, turnId);
|
|
@@ -192,18 +212,44 @@ export class DaemonSurfaceActionHelper {
|
|
|
192
212
|
});
|
|
193
213
|
}
|
|
194
214
|
}
|
|
215
|
+
findPendingNtfyChatReplyForPrompt(preferredSessionId, normalizedPrompt) {
|
|
216
|
+
const preferredBucket = this.pendingNtfyChatReplies.get(preferredSessionId);
|
|
217
|
+
const preferred = preferredBucket?.find((entry) => !entry.turnId && entry.body.trim() === normalizedPrompt);
|
|
218
|
+
if (preferred)
|
|
219
|
+
return { pending: preferred, bucketSessionId: preferredSessionId };
|
|
220
|
+
let fallback = null;
|
|
221
|
+
for (const [bucketSessionId, bucket] of this.pendingNtfyChatReplies.entries()) {
|
|
222
|
+
if (bucketSessionId === preferredSessionId)
|
|
223
|
+
continue;
|
|
224
|
+
const candidate = bucket.find((entry) => !entry.turnId && entry.body.trim() === normalizedPrompt);
|
|
225
|
+
if (!candidate)
|
|
226
|
+
continue;
|
|
227
|
+
if (!fallback || candidate.createdAt < fallback.pending.createdAt) {
|
|
228
|
+
fallback = { pending: candidate, bucketSessionId };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return fallback;
|
|
232
|
+
}
|
|
233
|
+
findPendingNtfyChatReplyForMessageId(messageId) {
|
|
234
|
+
for (const [bucketSessionId, bucket] of this.pendingNtfyChatReplies.entries()) {
|
|
235
|
+
const pending = bucket.find((entry) => !entry.turnId && entry.messageId === messageId);
|
|
236
|
+
if (pending)
|
|
237
|
+
return { pending, bucketSessionId };
|
|
238
|
+
}
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
195
241
|
takeNtfyChatReply(sessionId, turnId) {
|
|
196
|
-
const bucket
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
242
|
+
for (const [bucketSessionId, bucket] of this.pendingNtfyChatReplies.entries()) {
|
|
243
|
+
const index = bucket.findIndex((entry) => entry.turnId === turnId && (!entry.turnSessionId || entry.turnSessionId === sessionId));
|
|
244
|
+
if (index < 0)
|
|
245
|
+
continue;
|
|
246
|
+
const [pending] = bucket.splice(index, 1);
|
|
247
|
+
if (bucket.length === 0) {
|
|
248
|
+
this.pendingNtfyChatReplies.delete(bucketSessionId);
|
|
249
|
+
}
|
|
250
|
+
return pending ?? null;
|
|
205
251
|
}
|
|
206
|
-
return
|
|
252
|
+
return null;
|
|
207
253
|
}
|
|
208
254
|
cleanupExpiredNtfyChatReplies(now = Date.now()) {
|
|
209
255
|
for (const [sessionId, bucket] of this.pendingNtfyChatReplies.entries()) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConfigManager } from '../config/manager.js';
|
|
2
|
+
import type { SecretsManager } from '../config/secrets.js';
|
|
2
3
|
import type { ServiceRegistry } from '../config/service-registry.js';
|
|
3
4
|
import type { AgentManager } from '../tools/agent/index.js';
|
|
4
5
|
import type { SharedSessionBroker } from '../control-plane/index.js';
|
|
@@ -22,6 +23,7 @@ interface DaemonSurfaceDeliveryContext {
|
|
|
22
23
|
readonly pendingSurfaceReplies: Map<string, PendingSurfaceReply>;
|
|
23
24
|
readonly channelReplyPipeline: ChannelReplyPipeline;
|
|
24
25
|
readonly configManager: ConfigManager;
|
|
26
|
+
readonly secretsManager?: Pick<SecretsManager, 'get' | 'getGlobalHome'>;
|
|
25
27
|
readonly serviceRegistry: ServiceRegistry;
|
|
26
28
|
readonly agentManager: AgentManager;
|
|
27
29
|
readonly sessionBroker: SharedSessionBroker;
|
|
@@ -52,6 +54,9 @@ export declare class DaemonSurfaceDeliveryHelper {
|
|
|
52
54
|
deliverDiscordApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
|
|
53
55
|
deliverNtfyApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
|
|
54
56
|
deliverWebhookApprovalUpdate(approval: SharedApprovalRecord, binding: RouteBinding): Promise<void>;
|
|
57
|
+
private resolveSlackWebhookUrl;
|
|
58
|
+
private resolveSlackBotToken;
|
|
59
|
+
private resolveConfigSecret;
|
|
55
60
|
}
|
|
56
61
|
export {};
|
|
57
62
|
//# sourceMappingURL=surface-delivery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-delivery.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/surface-delivery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAK7G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"surface-delivery.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/surface-delivery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAK7G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAKtD,KAAK,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D,OAAO,CAAC,wBAAwB;IAmE1B,0BAA0B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAqChG,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBlG,yBAAyB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB/F,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;YA2B1F,sBAAsB;YAMtB,oBAAoB;YAOpB,mBAAmB;CAQlC"}
|
|
@@ -4,6 +4,7 @@ import { logger } from '../utils/logger.js';
|
|
|
4
4
|
import { validatePublicWebhookUrl } from '../utils/url-safety.js';
|
|
5
5
|
import { summarizeError } from '../utils/error-display.js';
|
|
6
6
|
import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
|
|
7
|
+
import { resolveSecretInput } from '../config/secret-refs.js';
|
|
7
8
|
function isSupportedDeliverySurface(surface) {
|
|
8
9
|
return surface === 'slack'
|
|
9
10
|
|| surface === 'discord'
|
|
@@ -111,10 +112,8 @@ export class DaemonSurfaceDeliveryHelper {
|
|
|
111
112
|
}
|
|
112
113
|
async deliverSurfaceProgress(pending, progress) {
|
|
113
114
|
if (pending.surfaceKind === 'slack') {
|
|
114
|
-
const webhookUrl = await this.
|
|
115
|
-
|
|
116
|
-
const botToken = await this.context.serviceRegistry.resolveSecret('slack', 'primary')
|
|
117
|
-
?? process.env.SLACK_BOT_TOKEN;
|
|
115
|
+
const webhookUrl = await this.resolveSlackWebhookUrl();
|
|
116
|
+
const botToken = await this.resolveSlackBotToken();
|
|
118
117
|
const slack = new SlackIntegration(webhookUrl ?? undefined, botToken ?? undefined);
|
|
119
118
|
if (pending.responseUrl) {
|
|
120
119
|
await instrumentedFetch(pending.responseUrl, {
|
|
@@ -148,10 +147,8 @@ export class DaemonSurfaceDeliveryHelper {
|
|
|
148
147
|
}
|
|
149
148
|
}
|
|
150
149
|
async deliverSlackAgentReply(pending, message) {
|
|
151
|
-
const webhookUrl = await this.
|
|
152
|
-
|
|
153
|
-
const botToken = await this.context.serviceRegistry.resolveSecret('slack', 'primary')
|
|
154
|
-
?? process.env.SLACK_BOT_TOKEN;
|
|
150
|
+
const webhookUrl = await this.resolveSlackWebhookUrl();
|
|
151
|
+
const botToken = await this.resolveSlackBotToken();
|
|
155
152
|
const slack = new SlackIntegration(webhookUrl ?? undefined, botToken ?? undefined);
|
|
156
153
|
if (pending.responseUrl) {
|
|
157
154
|
await instrumentedFetch(pending.responseUrl, {
|
|
@@ -362,10 +359,8 @@ export class DaemonSurfaceDeliveryHelper {
|
|
|
362
359
|
const webUrl = this.controlPlaneWebUrl({ approvalId: approval.id, sessionId: approval.sessionId });
|
|
363
360
|
const isPending = approval.status === 'pending' || approval.status === 'claimed';
|
|
364
361
|
const summary = approval.request.analysis.summary;
|
|
365
|
-
const webhookUrl = await this.
|
|
366
|
-
|
|
367
|
-
const botToken = await this.context.serviceRegistry.resolveSecret('slack', 'primary')
|
|
368
|
-
?? process.env.SLACK_BOT_TOKEN;
|
|
362
|
+
const webhookUrl = await this.resolveSlackWebhookUrl();
|
|
363
|
+
const botToken = await this.resolveSlackBotToken();
|
|
369
364
|
const slack = new SlackIntegration(webhookUrl ?? undefined, botToken ?? undefined);
|
|
370
365
|
const blocks = isPending
|
|
371
366
|
? [
|
|
@@ -459,4 +454,23 @@ export class DaemonSurfaceDeliveryHelper {
|
|
|
459
454
|
body: payload,
|
|
460
455
|
}).catch(() => { });
|
|
461
456
|
}
|
|
457
|
+
async resolveSlackWebhookUrl() {
|
|
458
|
+
return await this.context.serviceRegistry.resolveSecret('slack', 'webhookUrl')
|
|
459
|
+
?? process.env.SLACK_WEBHOOK_URL
|
|
460
|
+
?? null;
|
|
461
|
+
}
|
|
462
|
+
async resolveSlackBotToken() {
|
|
463
|
+
return await this.context.serviceRegistry.resolveSecret('slack', 'primary')
|
|
464
|
+
?? await this.resolveConfigSecret(this.context.configManager.get('surfaces.slack.botToken'))
|
|
465
|
+
?? process.env.SLACK_BOT_TOKEN
|
|
466
|
+
?? null;
|
|
467
|
+
}
|
|
468
|
+
async resolveConfigSecret(value) {
|
|
469
|
+
return resolveSecretInput(value, {
|
|
470
|
+
resolveLocalSecret: this.context.secretsManager
|
|
471
|
+
? (key) => this.context.secretsManager.get(key)
|
|
472
|
+
: undefined,
|
|
473
|
+
homeDirectory: this.context.secretsManager?.getGlobalHome?.() ?? undefined,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
462
476
|
}
|
|
@@ -7,7 +7,7 @@ export { Notifier } from './notifier.js';
|
|
|
7
7
|
export { GitHubIntegration } from './github.js';
|
|
8
8
|
export type { GitHubWebhookEvent } from './github.js';
|
|
9
9
|
export { DeliveryQueue, DeliveryError, classifyDeliveryError, snapshotQueueStatus } from './delivery.js';
|
|
10
|
-
export { GOODVIBES_NTFY_ORIGIN, GOODVIBES_NTFY_ORIGIN_HEADER, GOODVIBES_NTFY_OUTBOUND_TAG, GOODVIBES_NTFY_AGENT_TOPIC, GOODVIBES_NTFY_CHAT_TOPIC, GOODVIBES_NTFY_DEFAULT_TOPICS, GOODVIBES_NTFY_REMOTE_TOPIC, NtfyIntegration, isGoodVibesNtfyDeliveryEcho, resolveGoodVibesNtfyTopics, } from './ntfy.js';
|
|
10
|
+
export { GOODVIBES_NTFY_ORIGIN, GOODVIBES_NTFY_ORIGIN_HEADER, GOODVIBES_NTFY_OUTBOUND_TAG, GOODVIBES_NTFY_AGENT_TOPIC, GOODVIBES_NTFY_CHAT_TOPIC, GOODVIBES_NTFY_DEFAULT_TOPICS, GOODVIBES_NTFY_REMOTE_TOPIC, NtfyIntegration, createNtfyLiveSubscriptionSince, isGoodVibesNtfyDeliveryEcho, resolveGoodVibesNtfyTopics, } from './ntfy.js';
|
|
11
11
|
export type { DeliveryOutcome, DeliveryFailureClass, DeadLetterEntry, DeliveryMetrics, DeliveryQueueConfig, IntegrationQueueStatus, } from './delivery.js';
|
|
12
12
|
export type { GoodVibesNtfyTopicConfig, GoodVibesNtfyTopics, NtfyMessage, NtfyPublishOptions, NtfySubscribeOptions, NtfyWebSocketOptions, } from './ntfy.js';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACrE,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACpH,YAAY,EACV,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,eAAe,EACf,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACrE,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACpH,YAAY,EACV,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,eAAe,EACf,+BAA+B,EAC/B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,WAAW,CAAC"}
|
|
@@ -4,4 +4,4 @@ export { DiscordInteractionType, DiscordInteractionResponseType } from './discor
|
|
|
4
4
|
export { Notifier } from './notifier.js';
|
|
5
5
|
export { GitHubIntegration } from './github.js';
|
|
6
6
|
export { DeliveryQueue, DeliveryError, classifyDeliveryError, snapshotQueueStatus } from './delivery.js';
|
|
7
|
-
export { GOODVIBES_NTFY_ORIGIN, GOODVIBES_NTFY_ORIGIN_HEADER, GOODVIBES_NTFY_OUTBOUND_TAG, GOODVIBES_NTFY_AGENT_TOPIC, GOODVIBES_NTFY_CHAT_TOPIC, GOODVIBES_NTFY_DEFAULT_TOPICS, GOODVIBES_NTFY_REMOTE_TOPIC, NtfyIntegration, isGoodVibesNtfyDeliveryEcho, resolveGoodVibesNtfyTopics, } from './ntfy.js';
|
|
7
|
+
export { GOODVIBES_NTFY_ORIGIN, GOODVIBES_NTFY_ORIGIN_HEADER, GOODVIBES_NTFY_OUTBOUND_TAG, GOODVIBES_NTFY_AGENT_TOPIC, GOODVIBES_NTFY_CHAT_TOPIC, GOODVIBES_NTFY_DEFAULT_TOPICS, GOODVIBES_NTFY_REMOTE_TOPIC, NtfyIntegration, createNtfyLiveSubscriptionSince, isGoodVibesNtfyDeliveryEcho, resolveGoodVibesNtfyTopics, } from './ntfy.js';
|
|
@@ -17,6 +17,7 @@ export interface GoodVibesNtfyTopics {
|
|
|
17
17
|
readonly all: readonly string[];
|
|
18
18
|
}
|
|
19
19
|
export declare function resolveGoodVibesNtfyTopics(config?: GoodVibesNtfyTopicConfig): GoodVibesNtfyTopics;
|
|
20
|
+
export declare function createNtfyLiveSubscriptionSince(nowMs?: number): string;
|
|
20
21
|
export interface NtfyPublishOptions {
|
|
21
22
|
readonly title?: string;
|
|
22
23
|
readonly priority?: 1 | 2 | 3 | 4 | 5;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ntfy.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/ntfy.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AACrD,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AACpE,eAAO,MAAM,yBAAyB,mBAAmB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,2BAA2B,mBAAmB,CAAC;AAC5D,eAAO,MAAM,6BAA6B,kEAIhC,CAAC;AAEX,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AA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