@xopcai/xopc 0.0.221 → 0.0.222
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B8SBTGg3.js → agent-avatar-dicebear-DsR_2U9-.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DijFbC4G.js +68 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BtmPXaqu.js → app-management-settings-panel-BCzVX09V.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-t7HoJyNN.js → appearance-settings-DgSpwqQI.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DJ_Dsb1j.js → apps-page-BFAmf9hq.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CsLXzas8.js → attachment-load-BQHcAR6J.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-D-zgoAKz.js → automations-page-CswK3HFb.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-B8us5JBf.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-B-MjP_22.js → binary-plugins-BlpyTJ1b.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-i4CfDqLG.js → block-editor-C3mwGsms.js} +4 -4
- package/dist/gateway/static/root/assets/browser-settings-page-BeBd17-3.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflows-page-EEFHUm1i.js → browser-workflows-page-CZNOOQY4.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Bv0z3KRq.js +7 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-BczD-pWE.js +3 -0
- package/dist/gateway/static/root/assets/{channels-settings-Je-9a5ZC.js → channels-settings-2KQYq6xl.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DT-OFl4r.js → chat-terminal-dock-2fpzufzt.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-PB1boaNy.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-MZ_AJqrm.js → cron-expression-VePLfPUR.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Bv9hZLuD.js → date-picker-CJegmPTJ.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-D-6oO_Vk.js → dependency-picker-B2o9unBk.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CiI5caKj.js → desktop-pet-BH4Np-ay.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DhkSOy4K.js → desktop-pet-settings-Duu3ctxD.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-C4s4Pz8I.js → directory-picker-path-field-BBCUZOg2.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DE7J1-6W.js → extension-debug-page-DS_o3F97.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DSnACD7E.js → extension-page-BTLBZdCq.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Dk7k2Pok.js → extension-settings-page-KTGrYbgk.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-IOA1OlHx.js → gateway-config-api-D3YJVfzY.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-FX7QsgSQ.js → gateway-settings-B8--s3yC.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-5YQ5BUwp.js +1 -0
- package/dist/gateway/static/root/assets/home-page-DfIVWJl3.js +1 -0
- package/dist/gateway/static/root/assets/{index-Dcj5KJRg.css → index-BXGC3VFm.css} +1 -1
- package/dist/gateway/static/root/assets/{index-EvA8c7fo.js → index-jqDCfet4.js} +47 -47
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BjYiM4xq.js → keyboard-shortcuts-settings-D-Ib-suu.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CAb0odzu.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-7DHvwSgA.js → local-apps-page-Bsy1lvAc.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CFxKbDZl.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-BSxppo9Z.js → management-settings-D-akydG4.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-D4oDjZtl.js → markdown-split-DHH4Cu2i.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BPNTGROA.js → media-plugins-BwHtUXkj.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DU5tKPTq.js → notes-page-BxM1p6hz.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-BGjEC89c.js +4 -0
- package/dist/gateway/static/root/assets/{product-open-page-CPoQvD6P.js → product-open-page-DrfWH1ir.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Dj9kEQwg.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-CitO1LMc.js → projects-page-CBRy5Ezz.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DSwz9RBh.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-xqnWcvIv.js → runtime-tools-settings-panel-DF7syQRd.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-CuIDPYu6.js → schema-form-BQ_qRIsM.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-WtattyVX.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CNAz_q1F.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DkAv9ncE.js → settings-form-section-BBHGOQHU.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-BJUQiEKb.js → settings-loading-skeleton-CiwjP2-b.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-KHRbLwmw.js → settings-page-Rl9waapk.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CNo4Ajhn.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-WCVtJ3sX.js → share-preview-page-B7PI3yZ6.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DpOH0zWB.js +1 -0
- package/dist/gateway/static/root/assets/{skill-reload-api-C_4cG30x.js → skill-reload-api-BOf4xCat.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-CKhR9J81.js → skills-page-YbtR_zEU.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-AYX-e5sD.js → skills-page.utils-DTmx2Zza.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-IIF-K9ML.js → system-settings-panel-BZDJcKdS.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-DrMX5Yhj.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-DcktF1j1.js → use-autosave-Be9aR9qA.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-ewIK2ddC.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BMkNTHHE.js → voice-api-key-field-IMc3Ua6C.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DVoiXekA.js → work-discovery-overlay-TC-xQenr.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Cw4LQjuM.js → workflow-run-setup-panel-B2auxcRv.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Bdn82kFQ.js +5 -0
- package/dist/gateway/static/root/index.html +2 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +20 -3
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/connectors/learning-coordinator.js +3 -19
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +8 -1
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +9 -9
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/voice/audio/normalize.d.ts +7 -0
- package/dist/src/voice/audio/normalize.js +30 -4
- package/dist/src/voice/local/runtime-worker.js +26 -6
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +7 -13
- package/dist/gateway/static/root/assets/agents-Brs2-m6t.js +0 -68
- package/dist/gateway/static/root/assets/automations-workspace-DehLRXfd.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-C3QIO4Ti.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BHhUp7FW.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DoClNVLz.js +0 -3
- package/dist/gateway/static/root/assets/connectors-page-D8z9Trw4.js +0 -2
- package/dist/gateway/static/root/assets/heartbeat-settings-D5CGVyci.js +0 -1
- package/dist/gateway/static/root/assets/home-page-DzfZFZx5.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-hPyTaVYU.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-DW0xMKWP.js +0 -2
- package/dist/gateway/static/root/assets/notes-workbench-D669d98r.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CpsQ9PTA.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C9-bL4V6.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CPSARi4y.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BxT80Fmr.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-C8jd20Db.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DrQ_cOXh.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-CYjsecEr.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-Cy1D2hkt.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DKKH1_Yt.js +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
5
4
|
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
5
|
+
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
6
6
|
import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
8
8
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
3
2
|
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
|
+
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
4
4
|
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
5
|
//#region src/providers/register-runtime-providers.ts
|
|
6
6
|
function registerRuntimeProvider(modelRuntime, source) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
2
|
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
|
+
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
4
4
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
6
6
|
import { loadSkills } from "../agent/skills/index.js";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -2,10 +2,10 @@ import { version } from "../../package.js";
|
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
3
|
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
4
4
|
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
5
6
|
import { init_paths } from "../config/paths.js";
|
|
6
7
|
import { loadConfig } from "../config/loader.js";
|
|
7
8
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
8
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
9
9
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
10
10
|
import { renderWorkflowFinalSummary, renderWorkflowPanel } from "../agent/workflow/snapshot.js";
|
|
11
11
|
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
@@ -4,6 +4,13 @@ export declare class AudioNormalizationError extends Error {
|
|
|
4
4
|
readonly code = "unsupported_audio_codec";
|
|
5
5
|
constructor(message: string, options?: ErrorOptions);
|
|
6
6
|
}
|
|
7
|
+
export interface AudioDecoderStatus {
|
|
8
|
+
available: boolean;
|
|
9
|
+
command: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Reports whether compressed browser/mobile recordings can be decoded on this host. */
|
|
13
|
+
export declare function getAudioDecoderStatus(): AudioDecoderStatus;
|
|
7
14
|
export declare function detectAudioFormat(buffer: Buffer): AudioFormat;
|
|
8
15
|
export declare function decodeAudioToMonoFloat32(input: {
|
|
9
16
|
buffer: Buffer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UnsupportedWavEncodingError, decodeWavToMonoFloat32 } from "../local/wav.js";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { spawn } from "node:child_process";
|
|
4
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
5
5
|
import { mkdtemp, readFile, readdir, rm } from "node:fs/promises";
|
|
6
6
|
//#region src/voice/audio/normalize.ts
|
|
7
7
|
const TARGET_SAMPLE_RATE = 16e3;
|
|
@@ -15,6 +15,31 @@ var AudioNormalizationError = class extends Error {
|
|
|
15
15
|
this.name = "AudioNormalizationError";
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
+
function ffmpegCommand() {
|
|
19
|
+
return process.env.XOPC_FFMPEG_PATH?.trim() || "ffmpeg";
|
|
20
|
+
}
|
|
21
|
+
/** Reports whether compressed browser/mobile recordings can be decoded on this host. */
|
|
22
|
+
function getAudioDecoderStatus() {
|
|
23
|
+
const command = ffmpegCommand();
|
|
24
|
+
const result = spawnSync(command, ["-version"], {
|
|
25
|
+
encoding: "utf8",
|
|
26
|
+
stdio: [
|
|
27
|
+
"ignore",
|
|
28
|
+
"ignore",
|
|
29
|
+
"pipe"
|
|
30
|
+
],
|
|
31
|
+
timeout: 5e3
|
|
32
|
+
});
|
|
33
|
+
if (!result.error && result.status === 0) return {
|
|
34
|
+
available: true,
|
|
35
|
+
command
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
available: false,
|
|
39
|
+
command,
|
|
40
|
+
error: `Audio decoder is unavailable (${command}): ${result.error instanceof Error ? result.error.message : result.stderr?.trim() || `decoder exited with status ${String(result.status)}`}. Install ffmpeg or set XOPC_FFMPEG_PATH.`
|
|
41
|
+
};
|
|
42
|
+
}
|
|
18
43
|
function detectAudioFormat(buffer) {
|
|
19
44
|
if (buffer.length >= 12 && buffer.toString("ascii", 0, 4) === "RIFF" && buffer.toString("ascii", 8, 12) === "WAVE") return "wav";
|
|
20
45
|
if (buffer.length >= 4 && buffer.subarray(0, 4).equals(Buffer.from([
|
|
@@ -32,7 +57,8 @@ function detectAudioFormat(buffer) {
|
|
|
32
57
|
function runFfmpeg(args, options = {}) {
|
|
33
58
|
options.signal?.throwIfAborted();
|
|
34
59
|
return new Promise((resolve, reject) => {
|
|
35
|
-
const
|
|
60
|
+
const command = ffmpegCommand();
|
|
61
|
+
const child = spawn(command, [
|
|
36
62
|
"-hide_banner",
|
|
37
63
|
"-loglevel",
|
|
38
64
|
"error",
|
|
@@ -75,7 +101,7 @@ function runFfmpeg(args, options = {}) {
|
|
|
75
101
|
errorBytes += bounded.length;
|
|
76
102
|
});
|
|
77
103
|
child.once("error", (error) => {
|
|
78
|
-
finish(new AudioNormalizationError(error.code === "ENOENT" ?
|
|
104
|
+
finish(new AudioNormalizationError(error.code === "ENOENT" ? `Audio decoder is unavailable (${command}); install ffmpeg or set XOPC_FFMPEG_PATH to transcribe this format` : `Audio decoder failed to start: ${error.message}`, { cause: error }));
|
|
79
105
|
});
|
|
80
106
|
child.once("close", (code) => {
|
|
81
107
|
if (settled) return;
|
|
@@ -172,4 +198,4 @@ async function forEachNormalizedAudioSegment(input, consume) {
|
|
|
172
198
|
}
|
|
173
199
|
}
|
|
174
200
|
//#endregion
|
|
175
|
-
export { AudioNormalizationError, decodeAudioToMonoFloat32, detectAudioFormat, forEachNormalizedAudioSegment };
|
|
201
|
+
export { AudioNormalizationError, decodeAudioToMonoFloat32, detectAudioFormat, forEachNormalizedAudioSegment, getAudioDecoderStatus };
|
|
@@ -7,6 +7,18 @@ import { createInterface } from "node:readline";
|
|
|
7
7
|
//#region src/voice/local/runtime-worker.ts
|
|
8
8
|
const pipelines = /* @__PURE__ */ new Map();
|
|
9
9
|
const sherpaRecognizers = /* @__PURE__ */ new Map();
|
|
10
|
+
async function assertLocalVoiceEngineAvailable(modelId) {
|
|
11
|
+
const model = getLocalVoiceModel(modelId);
|
|
12
|
+
if (model.engine === "sherpa-onnx") {
|
|
13
|
+
const imported = await import("sherpa-onnx-node").catch((cause) => {
|
|
14
|
+
throw new Error("The sherpa-onnx local voice engine is not installed. Install sherpa-onnx-node@1.13.4 alongside @xopcai/xopc.", { cause });
|
|
15
|
+
});
|
|
16
|
+
if (typeof (imported.default ?? imported).OfflineRecognizer !== "function") throw new Error("The sherpa-onnx local voice engine did not expose OfflineRecognizer");
|
|
17
|
+
} else await import("@huggingface/transformers").catch((cause) => {
|
|
18
|
+
throw new Error("The Transformers.js local voice engine is not installed. Install @huggingface/transformers@3.8.1 alongside @xopcai/xopc.", { cause });
|
|
19
|
+
});
|
|
20
|
+
return model.engine;
|
|
21
|
+
}
|
|
10
22
|
const networkAgent = new RetryAgent(new EnvHttpProxyAgent(), {
|
|
11
23
|
maxRetries: 4,
|
|
12
24
|
minTimeout: 500,
|
|
@@ -161,12 +173,20 @@ async function transcribeWithSherpa(modelId, audio, language) {
|
|
|
161
173
|
}
|
|
162
174
|
async function handle(request) {
|
|
163
175
|
const params = request.params ?? {};
|
|
164
|
-
if (request.method === "health")
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
176
|
+
if (request.method === "health") {
|
|
177
|
+
const modelId = typeof params.modelId === "string" && params.modelId ? params.modelId : void 0;
|
|
178
|
+
const selectedEngine = modelId ? await assertLocalVoiceEngineAvailable(modelId) : void 0;
|
|
179
|
+
return {
|
|
180
|
+
ok: true,
|
|
181
|
+
protocolVersion: 2,
|
|
182
|
+
engine: "transformers.js+sherpa-onnx",
|
|
183
|
+
engines: ["transformers.js", "sherpa-onnx"],
|
|
184
|
+
...modelId ? {
|
|
185
|
+
modelId,
|
|
186
|
+
selectedEngine
|
|
187
|
+
} : {}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
170
190
|
if (request.method === "model.install") {
|
|
171
191
|
const modelId = String(params.modelId ?? "");
|
|
172
192
|
const modelDir = resolve(resolveLocalVoiceModelDir(modelId));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
2
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
3
2
|
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
3
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
4
4
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
5
5
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
6
6
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.222",
|
|
4
4
|
"description": "Local-first personal AI assistant with reviewable user understanding, durable tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -108,27 +108,22 @@
|
|
|
108
108
|
"zod": "^4.4.3"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@huggingface/transformers": "3.8.1",
|
|
112
111
|
"@larksuiteoapi/node-sdk": "^1.66.0",
|
|
113
|
-
"playwright-core": "^1.60.0"
|
|
114
|
-
"sherpa-onnx-node": "1.13.4"
|
|
112
|
+
"playwright-core": "^1.60.0"
|
|
115
113
|
},
|
|
116
114
|
"peerDependenciesMeta": {
|
|
117
|
-
"@huggingface/transformers": {
|
|
118
|
-
"optional": true
|
|
119
|
-
},
|
|
120
115
|
"@larksuiteoapi/node-sdk": {
|
|
121
116
|
"optional": true
|
|
122
117
|
},
|
|
123
118
|
"playwright-core": {
|
|
124
119
|
"optional": true
|
|
125
|
-
},
|
|
126
|
-
"sherpa-onnx-node": {
|
|
127
|
-
"optional": true
|
|
128
120
|
}
|
|
129
121
|
},
|
|
130
|
-
"
|
|
122
|
+
"optionalDependencies": {
|
|
131
123
|
"@huggingface/transformers": "3.8.1",
|
|
124
|
+
"sherpa-onnx-node": "1.13.4"
|
|
125
|
+
},
|
|
126
|
+
"devDependencies": {
|
|
132
127
|
"@larksuiteoapi/node-sdk": "^1.66.0",
|
|
133
128
|
"@resvg/resvg-js": "^2.6.2",
|
|
134
129
|
"@tailwindcss/vite": "^4.3.0",
|
|
@@ -152,7 +147,6 @@
|
|
|
152
147
|
"onnxruntime-common": "1.21.0",
|
|
153
148
|
"node-pty": "1.1.0",
|
|
154
149
|
"playwright-core": "^1.60.0",
|
|
155
|
-
"sherpa-onnx-node": "1.13.4",
|
|
156
150
|
"svgo": "4.0.2",
|
|
157
151
|
"tailwindcss": "^4.3.0",
|
|
158
152
|
"tsdown": "0.21.10",
|
|
@@ -164,8 +158,8 @@
|
|
|
164
158
|
"vitest": "4.1.5",
|
|
165
159
|
"vue": "^3.5.35",
|
|
166
160
|
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
167
|
-
"@xopcai/gateway-contract": "0.0.0",
|
|
168
161
|
"@xopcai/realtime-protocol": "0.0.0",
|
|
162
|
+
"@xopcai/gateway-contract": "0.0.0",
|
|
169
163
|
"@xopcai/realtime-client": "0.0.0"
|
|
170
164
|
},
|
|
171
165
|
"scripts": {
|