@agimon-ai/po-voice 0.0.0-alpha.13 → 0.0.0-alpha.14
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.
|
@@ -17,7 +17,7 @@ let _agimon_ai_po_core_voiceTools = require("@agimon-ai/po-core/voiceTools");
|
|
|
17
17
|
let _agimon_ai_po_telemetry = require("@agimon-ai/po-telemetry");
|
|
18
18
|
let _agimon_ai_po_core_piSettings = require("@agimon-ai/po-core/piSettings");
|
|
19
19
|
let typebox_value = require("typebox/value");
|
|
20
|
-
let
|
|
20
|
+
let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
|
|
21
21
|
let _agimon_ai_po_core_extensionFile = require("@agimon-ai/po-core/extensionFile");
|
|
22
22
|
let _agimon_ai_po_session = require("@agimon-ai/po-session");
|
|
23
23
|
let xstate = require("xstate");
|
|
@@ -7675,7 +7675,7 @@ function createVoiceServer(host, broker, homeDirectory, hubToken, peerAgents, re
|
|
|
7675
7675
|
});
|
|
7676
7676
|
}
|
|
7677
7677
|
],
|
|
7678
|
-
methods: [(0,
|
|
7678
|
+
methods: [(0, _agimon_ai_po_core_serverPlugin.defineServerMethod)(voiceControlMethod, ({ action, target, revision, mode: requested }) => control(action, target, revision, requested))],
|
|
7679
7679
|
api: [{
|
|
7680
7680
|
basePath: VOICE_API_BASE_PATH,
|
|
7681
7681
|
start: () => ({
|
|
@@ -7713,7 +7713,7 @@ function createVoiceServer(host, broker, homeDirectory, hubToken, peerAgents, re
|
|
|
7713
7713
|
when,
|
|
7714
7714
|
name: "po-use-voice",
|
|
7715
7715
|
kind: "skill",
|
|
7716
|
-
read: () => (0,
|
|
7716
|
+
read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-voice/SKILL.md")
|
|
7717
7717
|
}],
|
|
7718
7718
|
hooks: [
|
|
7719
7719
|
{
|
|
@@ -8213,7 +8213,7 @@ var root_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoot)(({ ag
|
|
|
8213
8213
|
});
|
|
8214
8214
|
//#endregion
|
|
8215
8215
|
//#region src/extensions/(backend)/api/voice-media/route.server.ts
|
|
8216
|
-
var route_server_default$3 = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) => context.
|
|
8216
|
+
var route_server_default$3 = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) => context.root.mediaApi, { cardinality: "optional" });
|
|
8217
8217
|
//#endregion
|
|
8218
8218
|
//#region src/extensions/(backend)/api/voice/route.server.ts
|
|
8219
8219
|
/**
|
|
@@ -8224,14 +8224,12 @@ var route_server_default$3 = (0, _agimon_ai_po_core_extensionFile.defineRoutedCo
|
|
|
8224
8224
|
* mounted at `voice`, which cost nothing while every URL was hand-built and
|
|
8225
8225
|
* became a wrong base path the moment the build started reading the mount off
|
|
8226
8226
|
* the folder. `workspaces/sessions/(backend)/api/voice/` names the same mount
|
|
8227
|
-
* at session scope, and that is not a collision:
|
|
8228
|
-
*
|
|
8229
|
-
*
|
|
8230
|
-
*
|
|
8231
|
-
* the guard is what keeps readiness off workspace and session, where the
|
|
8232
|
-
* session tree's status and control routes answer instead.
|
|
8227
|
+
* at session scope, and that is not a collision: the session's declaration
|
|
8228
|
+
* replaces this one where it cascades, and in a hub the workspace level leaves
|
|
8229
|
+
* it to the global level that serves it. The root builds readiness only at a
|
|
8230
|
+
* global level, so a root built anywhere else contributes nothing here.
|
|
8233
8231
|
*/
|
|
8234
|
-
var route_server_default$2 = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) => context.
|
|
8232
|
+
var route_server_default$2 = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) => context.root.voiceApi, { cardinality: "optional" });
|
|
8235
8233
|
//#endregion
|
|
8236
8234
|
//#region src/extensions/workspaces/(backend)/channel/voice-media-wake.server.ts
|
|
8237
8235
|
var voice_media_wake_server_default = (0, _agimon_ai_po_core_extensionFile.defineChannel)(createVoiceMediaWakeChannel);
|
|
@@ -8283,11 +8281,16 @@ const via = (identity, value) => value === void 0 ? void 0 : {
|
|
|
8283
8281
|
...identity,
|
|
8284
8282
|
...value
|
|
8285
8283
|
};
|
|
8286
|
-
const
|
|
8284
|
+
const serverPlugin = (0, _agimon_ai_po_core_serverPlugin.defineServerPlugin)({
|
|
8287
8285
|
name: "@agimon-ai/po-voice",
|
|
8288
|
-
providerOverrides: (0,
|
|
8286
|
+
providerOverrides: (0, _agimon_ai_po_core_serverPlugin.composeServerProviderOverrides)(root_server_default$1, root_server_default),
|
|
8287
|
+
injects: (0, _agimon_ai_po_core_extensionFile.composeRootInjects)({
|
|
8288
|
+
global: [root_server_default$1],
|
|
8289
|
+
workspace: [root_server_default$1],
|
|
8290
|
+
session: [root_server_default$1, root_server_default]
|
|
8291
|
+
}),
|
|
8289
8292
|
global: async (context) => {
|
|
8290
|
-
const scopeGlobal = await root_server_default$1
|
|
8293
|
+
const scopeGlobal = await context.scopeRoot("global", root_server_default$1, context);
|
|
8291
8294
|
const contextGlobal = {
|
|
8292
8295
|
...context,
|
|
8293
8296
|
root: scopeGlobal.value
|
|
@@ -8301,7 +8304,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
8301
8304
|
};
|
|
8302
8305
|
},
|
|
8303
8306
|
workspace: async (context) => {
|
|
8304
|
-
const scopeGlobal = await root_server_default$1
|
|
8307
|
+
const scopeGlobal = await context.scopeRoot("global", root_server_default$1, context);
|
|
8305
8308
|
const contextGlobal = {
|
|
8306
8309
|
...context,
|
|
8307
8310
|
root: scopeGlobal.value
|
|
@@ -8309,7 +8312,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
8309
8312
|
return {
|
|
8310
8313
|
...(0, _agimon_ai_po_core_extensionFile.composeRootHooks)(scopeGlobal),
|
|
8311
8314
|
get api() {
|
|
8312
|
-
return defined([at(route_server_default$3, contextGlobal), at(route_server_default$2, contextGlobal)]);
|
|
8315
|
+
return defined([context.hosted("global") ? void 0 : at(route_server_default$3, contextGlobal), context.hosted("global") ? void 0 : at(route_server_default$2, contextGlobal)]);
|
|
8313
8316
|
},
|
|
8314
8317
|
get channels() {
|
|
8315
8318
|
return [() => via({ frameType: "voice_media_wake" }, voice_media_wake_server_default())];
|
|
@@ -8318,12 +8321,12 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
8318
8321
|
};
|
|
8319
8322
|
},
|
|
8320
8323
|
session: async (context) => {
|
|
8321
|
-
const scopeGlobal = await root_server_default$1
|
|
8324
|
+
const scopeGlobal = await context.scopeRoot("global", root_server_default$1, context);
|
|
8322
8325
|
const contextGlobal = {
|
|
8323
8326
|
...context,
|
|
8324
8327
|
root: scopeGlobal.value
|
|
8325
8328
|
};
|
|
8326
|
-
const scopeSession = await root_server_default
|
|
8329
|
+
const scopeSession = await context.scopeRoot("session", root_server_default, contextGlobal);
|
|
8327
8330
|
const contextSession = {
|
|
8328
8331
|
...contextGlobal,
|
|
8329
8332
|
root: scopeSession.value
|
|
@@ -8331,15 +8334,10 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
8331
8334
|
return {
|
|
8332
8335
|
...(0, _agimon_ai_po_core_extensionFile.composeRootHooks)(scopeGlobal, scopeSession),
|
|
8333
8336
|
get api() {
|
|
8334
|
-
return
|
|
8335
|
-
at(route_server_default$3, contextGlobal),
|
|
8336
|
-
at(route_server_default$2, contextGlobal),
|
|
8337
|
-
at(route_server_default$1, contextSession),
|
|
8338
|
-
at(route_server_default, contextSession)
|
|
8339
|
-
]);
|
|
8337
|
+
return [at(route_server_default$1, contextSession), at(route_server_default, contextSession)];
|
|
8340
8338
|
},
|
|
8341
8339
|
get channels() {
|
|
8342
|
-
return [() => via({ frameType: "voice_media_wake" }, voice_media_wake_server_default())];
|
|
8340
|
+
return defined([context.hosted("workspace") ? void 0 : () => via({ frameType: "voice_media_wake" }, voice_media_wake_server_default())]);
|
|
8343
8341
|
},
|
|
8344
8342
|
get hooks() {
|
|
8345
8343
|
return [
|
|
@@ -8372,7 +8370,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
8372
8370
|
}
|
|
8373
8371
|
});
|
|
8374
8372
|
//#endregion
|
|
8375
|
-
exports.default =
|
|
8376
|
-
exports.
|
|
8373
|
+
exports.default = serverPlugin;
|
|
8374
|
+
exports.serverPlugin = serverPlugin;
|
|
8377
8375
|
|
|
8378
8376
|
//# sourceMappingURL=server.cjs.map
|