@hyperwindmill/caretaker-cli 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/dispatch.d.ts.map +1 -1
- package/dist/agents/dispatch.js +4 -1
- package/dist/cli/web/server.d.ts.map +1 -1
- package/dist/cli/web/server.js +29 -7
- package/dist/cli/web/session_scope.d.ts +11 -0
- package/dist/cli/web/session_scope.d.ts.map +1 -0
- package/dist/cli/web/session_scope.js +13 -0
- package/dist/cli/web/turn_guard.d.ts +9 -0
- package/dist/cli/web/turn_guard.d.ts.map +1 -0
- package/dist/cli/web/turn_guard.js +18 -0
- package/dist/cli/web/voice_backend.d.ts +4 -0
- package/dist/cli/web/voice_backend.d.ts.map +1 -1
- package/dist/cli/web/voice_backend.js +14 -3
- package/dist/cli/web/voice_builtin.d.ts +3 -0
- package/dist/cli/web/voice_builtin.d.ts.map +1 -0
- package/dist/cli/web/voice_builtin.js +74 -0
- package/dist/cli/web/voice_proxy.d.ts +36 -1
- package/dist/cli/web/voice_proxy.d.ts.map +1 -1
- package/dist/cli/web/voice_proxy.js +201 -30
- package/dist/commands/loader.js +2 -2
- package/dist/harness/tools/builtin/index.d.ts.map +1 -1
- package/dist/harness/tools/builtin/index.js +4 -0
- package/dist/harness/tools/builtin/set_workspace.d.ts +3 -0
- package/dist/harness/tools/builtin/set_workspace.d.ts.map +1 -0
- package/dist/harness/tools/builtin/set_workspace.js +71 -0
- package/dist/plugins/manifest.d.ts +1 -1
- package/dist/plugins/manifest.js +1 -1
- package/dist/session/store.d.ts +6 -0
- package/dist/session/store.d.ts.map +1 -1
- package/dist/session/store.js +11 -0
- package/dist/session/types.d.ts +5 -0
- package/dist/session/types.d.ts.map +1 -1
- package/dist/store/db.d.ts.map +1 -1
- package/dist/store/db.js +3 -1
- package/dist/voice/pocket/catalog.d.ts +24 -0
- package/dist/voice/pocket/catalog.d.ts.map +1 -0
- package/dist/voice/pocket/catalog.js +152 -0
- package/dist/voice/pocket/engine.d.ts +17 -0
- package/dist/voice/pocket/engine.d.ts.map +1 -0
- package/dist/voice/pocket/engine.js +145 -0
- package/dist/voice/pocket/inference.d.ts +36 -0
- package/dist/voice/pocket/inference.d.ts.map +1 -0
- package/dist/voice/pocket/inference.js +228 -0
- package/dist/voice/pocket/install.d.ts +68 -0
- package/dist/voice/pocket/install.d.ts.map +1 -0
- package/dist/voice/pocket/install.js +329 -0
- package/dist/voice/pocket/tokenizer.d.ts +42 -0
- package/dist/voice/pocket/tokenizer.d.ts.map +1 -0
- package/dist/voice/pocket/tokenizer.js +279 -0
- package/dist/voice/pocket/voices.d.ts +9 -0
- package/dist/voice/pocket/voices.d.ts.map +1 -0
- package/dist/voice/pocket/voices.js +88 -0
- package/dist/voice/pronunciation.d.ts +16 -0
- package/dist/voice/pronunciation.d.ts.map +1 -0
- package/dist/voice/pronunciation.js +54 -0
- package/dist/voice/whisper/catalog.d.ts +15 -0
- package/dist/voice/whisper/catalog.d.ts.map +1 -0
- package/dist/voice/whisper/catalog.js +53 -0
- package/dist/voice/whisper/decoder.d.ts +3 -0
- package/dist/voice/whisper/decoder.d.ts.map +1 -0
- package/dist/voice/whisper/decoder.js +48 -0
- package/dist/voice/whisper/engine.d.ts +8 -0
- package/dist/voice/whisper/engine.d.ts.map +1 -0
- package/dist/voice/whisper/engine.js +77 -0
- package/dist/voice/whisper/features.d.ts +10 -0
- package/dist/voice/whisper/features.d.ts.map +1 -0
- package/dist/voice/whisper/features.js +149 -0
- package/dist/voice/whisper/inference.d.ts +17 -0
- package/dist/voice/whisper/inference.d.ts.map +1 -0
- package/dist/voice/whisper/inference.js +257 -0
- package/dist/voice/whisper/wav.d.ts +5 -0
- package/dist/voice/whisper/wav.d.ts.map +1 -0
- package/dist/voice/whisper/wav.js +48 -0
- package/dist/webview/standalone.js +1777 -743
- package/dist/webview/standalone.js.map +4 -4
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/agents/dispatch.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAQ,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,CAcjG;AAED,MAAM,WAAW,cAAc;IAC7B;yEACqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IACvC;6EACyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,WAAW,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/agents/dispatch.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAQ,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,CAcjG;AAED,MAAM,WAAW,cAAc;IAC7B;yEACqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IACvC;6EACyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,WAAW,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAiFlF"}
|
package/dist/agents/dispatch.js
CHANGED
|
@@ -52,7 +52,10 @@ export async function dispatchAgent(opts) {
|
|
|
52
52
|
guardError: `dispatch depth exceeded (${MAX_DISPATCH_DEPTH})`,
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
// Inherit the caller's *live* working dir, not its stored config: a chat
|
|
56
|
+
// moved by `set_workspace` mutates ctx.workingDir, and a sub-agent must
|
|
57
|
+
// follow the session into that project.
|
|
58
|
+
const effective = effectiveAgent(opts.invoked, caller && { ...caller, workingDir: opts.ctx.workingDir });
|
|
56
59
|
if (!effective.provider) {
|
|
57
60
|
return {
|
|
58
61
|
text: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/web/server.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/web/server.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AA8ClD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAgC,MAAM,gBAAgB,CAAC;AAChG,OAAO,KAAK,EAAe,eAAe,EAA0B,MAAM,mBAAmB,CAAC;AAsC9F,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EA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AAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAutC3E"}
|
package/dist/cli/web/server.js
CHANGED
|
@@ -20,12 +20,15 @@ import { createSource, deleteSource, patchSource, refreshSource, } from '../../p
|
|
|
20
20
|
import { createMcpServer, deleteMcpServer, patchMcpServer, readOAuthBlob } from '../../mcp/server_manager.js';
|
|
21
21
|
import { authenticateMcpServer, revokeMcpAuth } from '../../mcp/oauth.js';
|
|
22
22
|
import { listForAgent, readSession, deleteSession, computeContextUsage, createSession, userMessage, appendMessage, saveAttachment, attachmentsDir, } from '../../session/index.js';
|
|
23
|
+
import { sessionRunScope } from './session_scope.js';
|
|
24
|
+
import { guardTurnCallbacks } from './turn_guard.js';
|
|
23
25
|
import { watchCycleStream } from './scheduler/cycle_events.js';
|
|
24
26
|
import { startBackgroundScheduler, loadTaskRuns } from './scheduler.js';
|
|
25
27
|
import { fsRouter } from './fs.js';
|
|
26
28
|
import { activationStatus, resolvePlanningEnabled } from './scheduler/task_roles.js';
|
|
27
|
-
import { registerVoiceProxy, voiceClientConfig, fetchVoiceCatalog } from './voice_proxy.js';
|
|
29
|
+
import { registerVoiceProxy, voiceClientConfig, fetchVoiceCatalog, formKeyFor, KEY_WITHHELD_HINT, } from './voice_proxy.js';
|
|
28
30
|
import { registerVoiceBackend, maybeAutoStartBackend } from './voice_backend.js';
|
|
31
|
+
import { registerVoiceBuiltin } from './voice_builtin.js';
|
|
29
32
|
import { fetchAcpRegistry, installAcpAgent } from '../../acp/index.js';
|
|
30
33
|
// Resolve Webview static files path.
|
|
31
34
|
// Published npm package ships the assets under dist/webview (see scripts/copy-webview.mjs);
|
|
@@ -86,7 +89,13 @@ export class WebSessionController {
|
|
|
86
89
|
this.history = [];
|
|
87
90
|
}
|
|
88
91
|
}
|
|
92
|
+
else {
|
|
93
|
+
// Re-read the latest session_meta every turn: `set_workspace` may have
|
|
94
|
+
// appended a workspace override during the previous turn.
|
|
95
|
+
this.metaRecord = (await readSession(this.opts.agent.id, this.metaRecord.id)).meta;
|
|
96
|
+
}
|
|
89
97
|
const meta = this.metaRecord;
|
|
98
|
+
const scope = sessionRunScope(meta, this.opts.workingDir);
|
|
90
99
|
const attachmentRecords = [];
|
|
91
100
|
if (rawAttachments && rawAttachments.length > 0) {
|
|
92
101
|
for (const att of rawAttachments) {
|
|
@@ -109,7 +118,8 @@ export class WebSessionController {
|
|
|
109
118
|
prompt,
|
|
110
119
|
history: priorHistory,
|
|
111
120
|
signal: ac.signal,
|
|
112
|
-
workingDir:
|
|
121
|
+
workingDir: scope.workingDir,
|
|
122
|
+
memoryProjectId: scope.memoryProjectId,
|
|
113
123
|
sessionId: meta.id,
|
|
114
124
|
promptAttachments: attachmentRecords.length > 0 ? attachmentRecords : undefined,
|
|
115
125
|
voiceConversation,
|
|
@@ -149,6 +159,7 @@ export async function startServer(port, host) {
|
|
|
149
159
|
registerTaskBridge(app);
|
|
150
160
|
registerVoiceProxy(app);
|
|
151
161
|
registerVoiceBackend(app);
|
|
162
|
+
registerVoiceBuiltin(app);
|
|
152
163
|
// Pure-Node static serving with absolute path validation and fallback
|
|
153
164
|
app.get('/', (c) => {
|
|
154
165
|
try {
|
|
@@ -863,6 +874,10 @@ export async function startServer(port, host) {
|
|
|
863
874
|
controller = null;
|
|
864
875
|
post({ type: 'contextUsage', usage: null });
|
|
865
876
|
await loadSessionsAndSend(agent.id);
|
|
877
|
+
// Ack: the switch is complete server-side. The desktop assistant waits
|
|
878
|
+
// for it before opening the mic, so a `start` cannot reach the previous
|
|
879
|
+
// agent while this one's MCP servers are still connecting.
|
|
880
|
+
post({ type: 'agentSelected', agentId: agent.id });
|
|
866
881
|
};
|
|
867
882
|
const loadSessionsAndSend = async (agentId) => {
|
|
868
883
|
try {
|
|
@@ -990,7 +1005,8 @@ export async function startServer(port, host) {
|
|
|
990
1005
|
sessionId: currentSessionId ?? undefined,
|
|
991
1006
|
});
|
|
992
1007
|
}
|
|
993
|
-
|
|
1008
|
+
const turnController = controller;
|
|
1009
|
+
await controller.start(msg.prompt, guardTurnCallbacks({
|
|
994
1010
|
onChunk: (text) => post({ type: 'chunk', text }),
|
|
995
1011
|
onThinking: (text) => post({ type: 'thinking', text }),
|
|
996
1012
|
onToolCall: (id, name, args) => post({ type: 'tool_call', id, name, args }),
|
|
@@ -1015,7 +1031,7 @@ export async function startServer(port, host) {
|
|
|
1015
1031
|
currentSessionId = sessionId;
|
|
1016
1032
|
void loadSessionsAndSend(currentAgent.id);
|
|
1017
1033
|
},
|
|
1018
|
-
}, msg.attachments, msg.voice);
|
|
1034
|
+
}, () => controller === turnController), msg.attachments, msg.voice);
|
|
1019
1035
|
return;
|
|
1020
1036
|
}
|
|
1021
1037
|
case 'abort':
|
|
@@ -1048,6 +1064,9 @@ export async function startServer(port, host) {
|
|
|
1048
1064
|
return;
|
|
1049
1065
|
}
|
|
1050
1066
|
case 'createSession': {
|
|
1067
|
+
// A confirm card of the superseded turn can no longer be answered
|
|
1068
|
+
// (the view was cleared); reject it so that run can wind down.
|
|
1069
|
+
resolveAllPending('reject');
|
|
1051
1070
|
currentSessionId = null;
|
|
1052
1071
|
controller = null;
|
|
1053
1072
|
post({ type: 'contextUsage', usage: null });
|
|
@@ -1275,15 +1294,18 @@ export async function startServer(port, host) {
|
|
|
1275
1294
|
post({ type: 'acpInstallResult', agentId: msg.agentId, ok: false, error: String(err) });
|
|
1276
1295
|
}
|
|
1277
1296
|
return;
|
|
1278
|
-
case 'fetchVoiceModels':
|
|
1297
|
+
case 'fetchVoiceModels': {
|
|
1298
|
+
const { key, withheld } = formKeyFor(msg.endpoint, msg.apiKey, (await loadConfig()).voice);
|
|
1279
1299
|
try {
|
|
1280
|
-
const catalog = await fetchVoiceCatalog(msg.endpoint,
|
|
1300
|
+
const catalog = await fetchVoiceCatalog(msg.endpoint, key);
|
|
1281
1301
|
post({ type: 'voiceModelsFetched', result: { ok: true, catalog }, target: msg.target });
|
|
1282
1302
|
}
|
|
1283
1303
|
catch (err) {
|
|
1284
|
-
|
|
1304
|
+
const error = withheld && /\b40[13]\b/.test(String(err)) ? `${KEY_WITHHELD_HINT} (${err})` : String(err);
|
|
1305
|
+
post({ type: 'voiceModelsFetched', result: { ok: false, error }, target: msg.target });
|
|
1285
1306
|
}
|
|
1286
1307
|
return;
|
|
1308
|
+
}
|
|
1287
1309
|
case 'watchCycle': {
|
|
1288
1310
|
// Ids name files on disk; the same rule as the bridge parser.
|
|
1289
1311
|
if (!/^[A-Za-z0-9_-]+$/.test(msg.agentId) || !/^[A-Za-z0-9_-]+$/.test(msg.sessionId))
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SessionMetaRecord } from '../../session/types.js';
|
|
2
|
+
/** Working dir + memory scope for one chat turn. The `set_workspace` override
|
|
3
|
+
* on the session meta wins over the agent's own workingDir and brings its
|
|
4
|
+
* projectId along (passed explicitly: a managed clone's blank
|
|
5
|
+
* `projects[].workingDir` never prefix-matches, so dir-based resolution
|
|
6
|
+
* would degrade the turn to global-only memories). */
|
|
7
|
+
export declare function sessionRunScope(meta: Pick<SessionMetaRecord, 'workingDir' | 'projectId'> | undefined, agentWorkingDir: string): {
|
|
8
|
+
workingDir: string;
|
|
9
|
+
memoryProjectId?: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=session_scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session_scope.d.ts","sourceRoot":"","sources":["../../../src/cli/web/session_scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;uDAIuD;AACvD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,WAAW,CAAC,GAAG,SAAS,EACrE,eAAe,EAAE,MAAM,GACtB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAOlD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Working dir + memory scope for one chat turn. The `set_workspace` override
|
|
2
|
+
* on the session meta wins over the agent's own workingDir and brings its
|
|
3
|
+
* projectId along (passed explicitly: a managed clone's blank
|
|
4
|
+
* `projects[].workingDir` never prefix-matches, so dir-based resolution
|
|
5
|
+
* would degrade the turn to global-only memories). */
|
|
6
|
+
export function sessionRunScope(meta, agentWorkingDir) {
|
|
7
|
+
if (meta?.workingDir) {
|
|
8
|
+
return meta.projectId
|
|
9
|
+
? { workingDir: meta.workingDir, memoryProjectId: meta.projectId }
|
|
10
|
+
: { workingDir: meta.workingDir };
|
|
11
|
+
}
|
|
12
|
+
return { workingDir: agentWorkingDir };
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChatCallbacks } from './server.js';
|
|
2
|
+
/** Silence a chat turn once it is superseded. Dropping the controller
|
|
3
|
+
* (new session, agent switch) does not stop its run, and the run's callbacks
|
|
4
|
+
* post straight to the socket — without this, a still-streaming turn keeps
|
|
5
|
+
* writing chunks, `done` and confirm cards into the session that replaced
|
|
6
|
+
* it. The old run keeps going; only its output is cut. A superseded turn's
|
|
7
|
+
* confirmations resolve `reject`: nobody can answer them any more. */
|
|
8
|
+
export declare function guardTurnCallbacks(cb: ChatCallbacks, isCurrent: () => boolean): ChatCallbacks;
|
|
9
|
+
//# sourceMappingURL=turn_guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn_guard.d.ts","sourceRoot":"","sources":["../../../src/cli/web/turn_guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;uEAKuE;AACvE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,GAAG,aAAa,CAY7F"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Silence a chat turn once it is superseded. Dropping the controller
|
|
2
|
+
* (new session, agent switch) does not stop its run, and the run's callbacks
|
|
3
|
+
* post straight to the socket — without this, a still-streaming turn keeps
|
|
4
|
+
* writing chunks, `done` and confirm cards into the session that replaced
|
|
5
|
+
* it. The old run keeps going; only its output is cut. A superseded turn's
|
|
6
|
+
* confirmations resolve `reject`: nobody can answer them any more. */
|
|
7
|
+
export function guardTurnCallbacks(cb, isCurrent) {
|
|
8
|
+
return {
|
|
9
|
+
onChunk: (t) => isCurrent() && cb.onChunk(t),
|
|
10
|
+
onThinking: (t) => isCurrent() && cb.onThinking(t),
|
|
11
|
+
onToolCall: (id, name, args) => isCurrent() && cb.onToolCall(id, name, args),
|
|
12
|
+
onToolResult: (id, content) => isCurrent() && cb.onToolResult(id, content),
|
|
13
|
+
askConfirm: (id, toolName, args) => isCurrent() ? cb.askConfirm(id, toolName, args) : Promise.resolve('reject'),
|
|
14
|
+
onError: (m) => isCurrent() && cb.onError(m),
|
|
15
|
+
onDone: () => isCurrent() && cb.onDone(),
|
|
16
|
+
onSessionCreated: (id) => isCurrent() && cb.onSessionCreated?.(id),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -71,5 +71,9 @@ export declare function registerVoiceBackend(app: Hono): void;
|
|
|
71
71
|
* out of the caller — every failure is logged and otherwise swallowed, and
|
|
72
72
|
* the UI learns the outcome by polling GET /api/voice/backend. */
|
|
73
73
|
export declare function maybeAutoStartBackend(): void;
|
|
74
|
+
/** Containers auto-start should bring up. STT serves endpoint transcription and,
|
|
75
|
+
* absent a separate ttsEndpoint, endpoint synthesis; the TTS container exists only
|
|
76
|
+
* with a separate ttsEndpoint. Built-in engines need neither. */
|
|
77
|
+
export declare function autoStartTargets(voice: VoiceConfig): Array<'stt' | 'tts'>;
|
|
74
78
|
export {};
|
|
75
79
|
//# sourceMappingURL=voice_backend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice_backend.d.ts","sourceRoot":"","sources":["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AC,CAsF/B;AAED;;;;4EAI4E;AAC5E,wBAAsB,WAAW,CAAC,MAAM,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvE;AAED;6EAC6E;AAC7E,wBAAsB,aAAa,CAAC,MAAM,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;AAaD;+EAC+E;AAC/E,wBAAgB,6BAA6B,CAAC,MAAM,GAAE,MAAc,GAAG,OAAO,CAE7E;AA6BD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CA4EpD;AAED;;;mEAGmE;AACnE,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED;;kEAEkE;AAClE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAOzE"}
|
|
@@ -531,6 +531,19 @@ export function registerVoiceBackend(app) {
|
|
|
531
531
|
export function maybeAutoStartBackend() {
|
|
532
532
|
void runAutoStart();
|
|
533
533
|
}
|
|
534
|
+
/** Containers auto-start should bring up. STT serves endpoint transcription and,
|
|
535
|
+
* absent a separate ttsEndpoint, endpoint synthesis; the TTS container exists only
|
|
536
|
+
* with a separate ttsEndpoint. Built-in engines need neither. */
|
|
537
|
+
export function autoStartTargets(voice) {
|
|
538
|
+
const endpointTts = voice.ttsEngine !== 'builtin';
|
|
539
|
+
const separateTts = !!voice.ttsEndpoint?.trim();
|
|
540
|
+
const out = [];
|
|
541
|
+
if (voice.sttEngine !== 'builtin' || (endpointTts && !separateTts))
|
|
542
|
+
out.push('stt');
|
|
543
|
+
if (endpointTts && separateTts)
|
|
544
|
+
out.push('tts');
|
|
545
|
+
return out;
|
|
546
|
+
}
|
|
534
547
|
async function runAutoStart() {
|
|
535
548
|
let voice;
|
|
536
549
|
try {
|
|
@@ -554,9 +567,7 @@ async function runAutoStart() {
|
|
|
554
567
|
// target is only auto-started when a *separate* ttsEndpoint is configured —
|
|
555
568
|
// without one, synthesis goes to `endpoint` (the single-server Speaches case)
|
|
556
569
|
// and there is no second container to manage.
|
|
557
|
-
for (const target of
|
|
558
|
-
if (target === 'tts' && !voice.ttsEndpoint?.trim())
|
|
559
|
-
continue;
|
|
570
|
+
for (const target of autoStartTargets(voice)) {
|
|
560
571
|
const endpoint = targetEndpoint(voice, target);
|
|
561
572
|
if (loopbackPort(endpoint) == null)
|
|
562
573
|
continue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice_builtin.d.ts","sourceRoot":"","sources":["../../../src/cli/web/voice_builtin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAwCjC,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAqCpD"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Routes for the built-in voice installer. The in-flight guard is per language so a
|
|
2
|
+
// second install of the same language cannot start a parallel download.
|
|
3
|
+
import { stream } from 'hono/streaming';
|
|
4
|
+
import { POCKET_LANGUAGES } from '../../voice/pocket/catalog.js';
|
|
5
|
+
import { WHISPER_MODELS } from '../../voice/whisper/catalog.js';
|
|
6
|
+
import { builtinVoiceStatus, deleteBuiltinStt, deleteBuiltinVoice, installBuiltinStt, installBuiltinVoice, } from '../../voice/pocket/install.js';
|
|
7
|
+
import { releasePocketModels, runtimeLoadError, runtimeLoaded, speakBuiltin } from '../../voice/pocket/engine.js';
|
|
8
|
+
import { releaseWhisperModels, transcribeBuiltin } from '../../voice/whisper/engine.js';
|
|
9
|
+
import { setBuiltinSpeaker, setBuiltinTranscriber } from './voice_proxy.js';
|
|
10
|
+
// One install or delete at a time: voices and models share the runtime directory.
|
|
11
|
+
let busy = null;
|
|
12
|
+
/** Exactly one of `?language=` / `?stt=`, both known; otherwise a 400 message. */
|
|
13
|
+
function reqTarget(language, stt) {
|
|
14
|
+
if ((language === undefined) === (stt === undefined))
|
|
15
|
+
return 'Pass exactly one of language or stt.';
|
|
16
|
+
if (stt !== undefined) {
|
|
17
|
+
return Object.hasOwn(WHISPER_MODELS, stt) ? { kind: 'stt', size: stt } : 'Unknown model size.';
|
|
18
|
+
}
|
|
19
|
+
const lang = reqLanguage(language);
|
|
20
|
+
return lang ? { kind: 'voice', lang } : 'Unknown language.';
|
|
21
|
+
}
|
|
22
|
+
function reqLanguage(q) {
|
|
23
|
+
return q && Object.hasOwn(POCKET_LANGUAGES, q) ? q : null;
|
|
24
|
+
}
|
|
25
|
+
async function statusWithLoadError() {
|
|
26
|
+
const status = await builtinVoiceStatus();
|
|
27
|
+
const loadError = runtimeLoadError();
|
|
28
|
+
return loadError ? { ...status, runtime: { ...status.runtime, loadError } } : status;
|
|
29
|
+
}
|
|
30
|
+
export function registerVoiceBuiltin(app) {
|
|
31
|
+
setBuiltinSpeaker(speakBuiltin);
|
|
32
|
+
setBuiltinTranscriber(transcribeBuiltin);
|
|
33
|
+
app.get('/api/voice/builtin', async (c) => c.json(await statusWithLoadError()));
|
|
34
|
+
app.post('/api/voice/builtin/install', async (c) => {
|
|
35
|
+
const t = reqTarget(c.req.query('language'), c.req.query('stt'));
|
|
36
|
+
if (typeof t === 'string')
|
|
37
|
+
return c.text(t, 400);
|
|
38
|
+
const name = t.kind === 'voice' ? t.lang : t.size;
|
|
39
|
+
if (busy)
|
|
40
|
+
return c.text(`An install of ${busy} is already in progress.`, 409);
|
|
41
|
+
busy = name;
|
|
42
|
+
c.header('Content-Type', 'application/x-ndjson');
|
|
43
|
+
return stream(c, async (s) => {
|
|
44
|
+
try {
|
|
45
|
+
for await (const p of t.kind === 'voice' ? installBuiltinVoice(t.lang) : installBuiltinStt(t.size))
|
|
46
|
+
await s.writeln(JSON.stringify(p));
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
busy = null;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
app.post('/api/voice/builtin/delete', async (c) => {
|
|
54
|
+
const t = reqTarget(c.req.query('language'), c.req.query('stt'));
|
|
55
|
+
if (typeof t === 'string')
|
|
56
|
+
return c.text(t, 400);
|
|
57
|
+
if (busy)
|
|
58
|
+
return c.text('An install is in progress; wait for it to finish.', 409);
|
|
59
|
+
busy = t.kind === 'voice' ? t.lang : t.size;
|
|
60
|
+
try {
|
|
61
|
+
await releasePocketModels();
|
|
62
|
+
await releaseWhisperModels();
|
|
63
|
+
const keepRuntime = runtimeLoaded();
|
|
64
|
+
if (t.kind === 'voice')
|
|
65
|
+
await deleteBuiltinVoice(t.lang, { keepRuntime });
|
|
66
|
+
else
|
|
67
|
+
await deleteBuiltinStt(t.size, { keepRuntime });
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
busy = null;
|
|
71
|
+
}
|
|
72
|
+
return c.json(await statusWithLoadError());
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Hono } from 'hono';
|
|
2
|
-
import type { CaretakerConfig, VoiceConfig } from 'caretaker-types';
|
|
2
|
+
import type { CaretakerConfig, PronunciationEntry, VoiceConfig } from 'caretaker-types';
|
|
3
3
|
import type { VoiceCatalog, VoiceClientConfig } from 'webview-ui/bridge';
|
|
4
4
|
export declare function voiceClientConfig(config: CaretakerConfig): VoiceClientConfig | null;
|
|
5
5
|
/** Resolve the usable voice config, or a reason it cannot be used. Shared with
|
|
@@ -22,6 +22,41 @@ export declare function ttsTarget(voice: VoiceConfig): {
|
|
|
22
22
|
apiKey?: string;
|
|
23
23
|
};
|
|
24
24
|
export declare function registerVoiceProxy(app: Hono): void;
|
|
25
|
+
export type SynthesisSettings = Pick<VoiceConfig, 'ttsEngine' | 'ttsLanguage' | 'ttsVoice' | 'ttsModel' | 'ttsSpeed' | 'ttsEndpoint' | 'pronunciationEnabled'> & {
|
|
26
|
+
pronunciation?: PronunciationEntry[];
|
|
27
|
+
};
|
|
28
|
+
/** The saved voice config if synthesis can run: voice enabled, and (for the
|
|
29
|
+
* endpoint engine) some endpoint to talk to. The built-in engine needs none. */
|
|
30
|
+
export declare function resolveSynthesis(): Promise<{
|
|
31
|
+
voice: VoiceConfig;
|
|
32
|
+
} | {
|
|
33
|
+
error: string;
|
|
34
|
+
}>;
|
|
35
|
+
/** Same server: scheme, host and port. A different path or a trailing slash is
|
|
36
|
+
* not a different host, so it keeps the saved key. */
|
|
37
|
+
export declare function sameHost(a?: string, b?: string): boolean;
|
|
38
|
+
export declare const KEY_WITHHELD_HINT = "The endpoint changed: enter the API key again, or save first, to use it with the new endpoint.";
|
|
39
|
+
/** The key to send to `endpoint` for a request built from the settings form. A key
|
|
40
|
+
* typed in the form is the user's own, for that endpoint. The stored key (the form
|
|
41
|
+
* round-trips its encrypted blob) goes only to the host it was saved for;
|
|
42
|
+
* otherwise it is withheld and the request goes without a key. */
|
|
43
|
+
export declare function formKeyFor(endpoint: string, formKey: string | null | undefined, saved: VoiceConfig | undefined): {
|
|
44
|
+
key: string | null;
|
|
45
|
+
withheld: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** Overlay the form's unsaved synthesis settings on the saved config. The saved
|
|
48
|
+
* `ttsApiKey` is dropped when the previewed `ttsEndpoint` is on another host than
|
|
49
|
+
* the saved one, so editing the URL can never send the stored key to a new host. */
|
|
50
|
+
export declare function mergePreview(saved: VoiceConfig, s: SynthesisSettings): VoiceConfig;
|
|
51
|
+
export type BuiltinSpeaker = (voice: VoiceConfig, text: string, signal: AbortSignal) => Promise<Response>;
|
|
52
|
+
export type BuiltinTranscriber = (voice: VoiceConfig, audio: Float32Array, signal: AbortSignal) => Promise<Response>;
|
|
53
|
+
/** The built-in transcription engine registers itself here; null unregisters. */
|
|
54
|
+
export declare function setBuiltinTranscriber(fn: BuiltinTranscriber | null): void;
|
|
55
|
+
/** The built-in engine registers itself here; null unregisters. */
|
|
56
|
+
export declare function setBuiltinSpeaker(fn: BuiltinSpeaker | null): void;
|
|
57
|
+
/** Synthesize `text` with the configured engine, dictionary applied, streaming
|
|
58
|
+
* the audio back. Failures are Responses (status + readable body), not throws. */
|
|
59
|
+
export declare function synthesize(voice: VoiceConfig, text: string, signal: AbortSignal): Promise<Response>;
|
|
25
60
|
/**
|
|
26
61
|
* Read a speech endpoint's installed models so the settings form can offer real
|
|
27
62
|
* choices instead of free text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice_proxy.d.ts","sourceRoot":"","sources":["../../../src/cli/web/voice_proxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"voice_proxy.d.ts","sourceRoot":"","sources":["../../../src/cli/web/voice_proxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGxF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAMzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,GAAG,IAAI,CAiBnF;AAED;;0EAE0E;AAC1E,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAUxF;AASD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE3E;AAED;uEACuE;AACvE,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGrF;AAED;;6CAE6C;AAC7C,wBAAgB,SAAS,CAAC,KAAK,EAAE,W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