@prestyj/voice 4.3.193 → 4.5.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/bridges/ezboss.cjs
CHANGED
|
@@ -20,29 +20,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/bridges/ezboss.ts
|
|
21
21
|
var ezboss_exports = {};
|
|
22
22
|
__export(ezboss_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
createEzBossBridge: () => createEzBossBridge,
|
|
24
|
+
createRelayEzBossTool: () => createRelayEzBossTool
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(ezboss_exports);
|
|
27
|
-
function
|
|
27
|
+
function createEzBossBridge(target) {
|
|
28
28
|
return {
|
|
29
29
|
async send(command, signal) {
|
|
30
30
|
throwIfAborted(signal);
|
|
31
31
|
if (command.type !== "prompt") {
|
|
32
32
|
return {
|
|
33
33
|
type: "error",
|
|
34
|
-
error: `Unsupported
|
|
34
|
+
error: `Unsupported EzBoss bridge command: ${command.type}`
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
await target.enqueueUserMessage(command.text);
|
|
38
38
|
return { type: "task_dispatch", text: command.text };
|
|
39
39
|
},
|
|
40
40
|
toTool() {
|
|
41
|
-
return
|
|
41
|
+
return createSendToEzBossTool(this);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function createRelayEzBossTool(send) {
|
|
46
46
|
return {
|
|
47
47
|
name: "send_to_ezboss",
|
|
48
48
|
description: "Send a prompt to a EZ Boss orchestrator relay.",
|
|
@@ -62,7 +62,7 @@ function createRelayGGBossTool(send) {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function createSendToEzBossTool(bridge) {
|
|
66
66
|
return {
|
|
67
67
|
name: "send_to_ezboss",
|
|
68
68
|
description: "Send a prompt to an in-process EZ Boss orchestrator.",
|
|
@@ -85,12 +85,12 @@ function createSendToGGBossTool(bridge) {
|
|
|
85
85
|
}
|
|
86
86
|
function throwIfAborted(signal) {
|
|
87
87
|
if (signal?.aborted) {
|
|
88
|
-
throw new Error("
|
|
88
|
+
throw new Error("EzBoss bridge command aborted");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
92
92
|
0 && (module.exports = {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
createEzBossBridge,
|
|
94
|
+
createRelayEzBossTool
|
|
95
95
|
});
|
|
96
96
|
//# sourceMappingURL=ezboss.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bridges/ezboss.ts"],"sourcesContent":["import type { JsonObject, VoiceBridgeCommand, VoiceBridgeEvent, VoiceTool } from \"../types.js\";\n\nexport interface
|
|
1
|
+
{"version":3,"sources":["../../src/bridges/ezboss.ts"],"sourcesContent":["import type { JsonObject, VoiceBridgeCommand, VoiceBridgeEvent, VoiceTool } from \"../types.js\";\n\nexport interface EzBossPromptTarget {\n enqueueUserMessage(text: string): Promise<void> | void;\n}\n\nexport interface EzBossBridge {\n send(command: VoiceBridgeCommand, signal?: AbortSignal): Promise<VoiceBridgeEvent>;\n toTool(): VoiceTool;\n}\n\nexport function createEzBossBridge(target: EzBossPromptTarget): EzBossBridge {\n return {\n async send(command, signal): Promise<VoiceBridgeEvent> {\n throwIfAborted(signal);\n if (command.type !== \"prompt\") {\n return {\n type: \"error\",\n error: `Unsupported EzBoss bridge command: ${command.type}`,\n };\n }\n await target.enqueueUserMessage(command.text);\n return { type: \"task_dispatch\", text: command.text };\n },\n toTool(): VoiceTool {\n return createSendToEzBossTool(this);\n },\n };\n}\n\nexport function createRelayEzBossTool(\n send: (command: VoiceBridgeCommand) => Promise<JsonObject>,\n): VoiceTool {\n return {\n name: \"send_to_ezboss\",\n description: \"Send a prompt to a EZ Boss orchestrator relay.\",\n parameters: {\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Prompt text to send to EZ Boss.\" },\n },\n required: [\"text\"],\n },\n async execute(args) {\n const text = typeof args.text === \"string\" ? args.text : \"\";\n if (!text) {\n return { error: \"text is required\" };\n }\n return send({ type: \"prompt\", text });\n },\n };\n}\n\nfunction createSendToEzBossTool(bridge: EzBossBridge): VoiceTool {\n return {\n name: \"send_to_ezboss\",\n description: \"Send a prompt to an in-process EZ Boss orchestrator.\",\n parameters: {\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Prompt text to send to EZ Boss.\" },\n },\n required: [\"text\"],\n },\n async execute(args, context) {\n const text = typeof args.text === \"string\" ? args.text : \"\";\n if (!text) {\n return { error: \"text is required\" };\n }\n const event = await bridge.send({ type: \"prompt\", text }, context.signal);\n return event;\n },\n };\n}\n\nfunction throwIfAborted(signal: AbortSignal | undefined): void {\n if (signal?.aborted) {\n throw new Error(\"EzBoss bridge command aborted\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,SAAS,mBAAmB,QAA0C;AAC3E,SAAO;AAAA,IACL,MAAM,KAAK,SAAS,QAAmC;AACrD,qBAAe,MAAM;AACrB,UAAI,QAAQ,SAAS,UAAU;AAC7B,eAAO;AAAA,UACL,MAAM;AAAA,UACN,OAAO,sCAAsC,QAAQ,IAAI;AAAA,QAC3D;AAAA,MACF;AACA,YAAM,OAAO,mBAAmB,QAAQ,IAAI;AAC5C,aAAO,EAAE,MAAM,iBAAiB,MAAM,QAAQ,KAAK;AAAA,IACrD;AAAA,IACA,SAAoB;AAClB,aAAO,uBAAuB,IAAI;AAAA,IACpC;AAAA,EACF;AACF;AAEO,SAAS,sBACd,MACW;AACX,SAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa;AAAA,IACb,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,QACV,MAAM,EAAE,MAAM,UAAU,aAAa,kCAAkC;AAAA,MACzE;AAAA,MACA,UAAU,CAAC,MAAM;AAAA,IACnB;AAAA,IACA,MAAM,QAAQ,MAAM;AAClB,YAAM,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;AACzD,UAAI,CAAC,MAAM;AACT,eAAO,EAAE,OAAO,mBAAmB;AAAA,MACrC;AACA,aAAO,KAAK,EAAE,MAAM,UAAU,KAAK,CAAC;AAAA,IACtC;AAAA,EACF;AACF;AAEA,SAAS,uBAAuB,QAAiC;AAC/D,SAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa;AAAA,IACb,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,QACV,MAAM,EAAE,MAAM,UAAU,aAAa,kCAAkC;AAAA,MACzE;AAAA,MACA,UAAU,CAAC,MAAM;AAAA,IACnB;AAAA,IACA,MAAM,QAAQ,MAAM,SAAS;AAC3B,YAAM,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;AACzD,UAAI,CAAC,MAAM;AACT,eAAO,EAAE,OAAO,mBAAmB;AAAA,MACrC;AACA,YAAM,QAAQ,MAAM,OAAO,KAAK,EAAE,MAAM,UAAU,KAAK,GAAG,QAAQ,MAAM;AACxE,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,SAAS,eAAe,QAAuC;AAC7D,MAAI,QAAQ,SAAS;AACnB,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AACF;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { p as VoiceBridgeCommand, q as VoiceBridgeEvent, e as VoiceTool, J as JsonObject } from '../types-Dc4Q3Z6X.cjs';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface EzBossPromptTarget {
|
|
4
4
|
enqueueUserMessage(text: string): Promise<void> | void;
|
|
5
5
|
}
|
|
6
|
-
interface
|
|
6
|
+
interface EzBossBridge {
|
|
7
7
|
send(command: VoiceBridgeCommand, signal?: AbortSignal): Promise<VoiceBridgeEvent>;
|
|
8
8
|
toTool(): VoiceTool;
|
|
9
9
|
}
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
10
|
+
declare function createEzBossBridge(target: EzBossPromptTarget): EzBossBridge;
|
|
11
|
+
declare function createRelayEzBossTool(send: (command: VoiceBridgeCommand) => Promise<JsonObject>): VoiceTool;
|
|
12
12
|
|
|
13
|
-
export { type
|
|
13
|
+
export { type EzBossBridge, type EzBossPromptTarget, createEzBossBridge, createRelayEzBossTool };
|
package/dist/bridges/ezboss.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { p as VoiceBridgeCommand, q as VoiceBridgeEvent, e as VoiceTool, J as JsonObject } from '../types-Dc4Q3Z6X.js';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface EzBossPromptTarget {
|
|
4
4
|
enqueueUserMessage(text: string): Promise<void> | void;
|
|
5
5
|
}
|
|
6
|
-
interface
|
|
6
|
+
interface EzBossBridge {
|
|
7
7
|
send(command: VoiceBridgeCommand, signal?: AbortSignal): Promise<VoiceBridgeEvent>;
|
|
8
8
|
toTool(): VoiceTool;
|
|
9
9
|
}
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
10
|
+
declare function createEzBossBridge(target: EzBossPromptTarget): EzBossBridge;
|
|
11
|
+
declare function createRelayEzBossTool(send: (command: VoiceBridgeCommand) => Promise<JsonObject>): VoiceTool;
|
|
12
12
|
|
|
13
|
-
export { type
|
|
13
|
+
export { type EzBossBridge, type EzBossPromptTarget, createEzBossBridge, createRelayEzBossTool };
|
package/dist/bridges/ezboss.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// src/bridges/ezboss.ts
|
|
2
|
-
function
|
|
2
|
+
function createEzBossBridge(target) {
|
|
3
3
|
return {
|
|
4
4
|
async send(command, signal) {
|
|
5
5
|
throwIfAborted(signal);
|
|
6
6
|
if (command.type !== "prompt") {
|
|
7
7
|
return {
|
|
8
8
|
type: "error",
|
|
9
|
-
error: `Unsupported
|
|
9
|
+
error: `Unsupported EzBoss bridge command: ${command.type}`
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
await target.enqueueUserMessage(command.text);
|
|
13
13
|
return { type: "task_dispatch", text: command.text };
|
|
14
14
|
},
|
|
15
15
|
toTool() {
|
|
16
|
-
return
|
|
16
|
+
return createSendToEzBossTool(this);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function createRelayEzBossTool(send) {
|
|
21
21
|
return {
|
|
22
22
|
name: "send_to_ezboss",
|
|
23
23
|
description: "Send a prompt to a EZ Boss orchestrator relay.",
|
|
@@ -37,7 +37,7 @@ function createRelayGGBossTool(send) {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function createSendToEzBossTool(bridge) {
|
|
41
41
|
return {
|
|
42
42
|
name: "send_to_ezboss",
|
|
43
43
|
description: "Send a prompt to an in-process EZ Boss orchestrator.",
|
|
@@ -60,11 +60,11 @@ function createSendToGGBossTool(bridge) {
|
|
|
60
60
|
}
|
|
61
61
|
function throwIfAborted(signal) {
|
|
62
62
|
if (signal?.aborted) {
|
|
63
|
-
throw new Error("
|
|
63
|
+
throw new Error("EzBoss bridge command aborted");
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
createEzBossBridge,
|
|
68
|
+
createRelayEzBossTool
|
|
69
69
|
};
|
|
70
70
|
//# sourceMappingURL=ezboss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bridges/ezboss.ts"],"sourcesContent":["import type { JsonObject, VoiceBridgeCommand, VoiceBridgeEvent, VoiceTool } from \"../types.js\";\n\nexport interface
|
|
1
|
+
{"version":3,"sources":["../../src/bridges/ezboss.ts"],"sourcesContent":["import type { JsonObject, VoiceBridgeCommand, VoiceBridgeEvent, VoiceTool } from \"../types.js\";\n\nexport interface EzBossPromptTarget {\n enqueueUserMessage(text: string): Promise<void> | void;\n}\n\nexport interface EzBossBridge {\n send(command: VoiceBridgeCommand, signal?: AbortSignal): Promise<VoiceBridgeEvent>;\n toTool(): VoiceTool;\n}\n\nexport function createEzBossBridge(target: EzBossPromptTarget): EzBossBridge {\n return {\n async send(command, signal): Promise<VoiceBridgeEvent> {\n throwIfAborted(signal);\n if (command.type !== \"prompt\") {\n return {\n type: \"error\",\n error: `Unsupported EzBoss bridge command: ${command.type}`,\n };\n }\n await target.enqueueUserMessage(command.text);\n return { type: \"task_dispatch\", text: command.text };\n },\n toTool(): VoiceTool {\n return createSendToEzBossTool(this);\n },\n };\n}\n\nexport function createRelayEzBossTool(\n send: (command: VoiceBridgeCommand) => Promise<JsonObject>,\n): VoiceTool {\n return {\n name: \"send_to_ezboss\",\n description: \"Send a prompt to a EZ Boss orchestrator relay.\",\n parameters: {\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Prompt text to send to EZ Boss.\" },\n },\n required: [\"text\"],\n },\n async execute(args) {\n const text = typeof args.text === \"string\" ? args.text : \"\";\n if (!text) {\n return { error: \"text is required\" };\n }\n return send({ type: \"prompt\", text });\n },\n };\n}\n\nfunction createSendToEzBossTool(bridge: EzBossBridge): VoiceTool {\n return {\n name: \"send_to_ezboss\",\n description: \"Send a prompt to an in-process EZ Boss orchestrator.\",\n parameters: {\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Prompt text to send to EZ Boss.\" },\n },\n required: [\"text\"],\n },\n async execute(args, context) {\n const text = typeof args.text === \"string\" ? args.text : \"\";\n if (!text) {\n return { error: \"text is required\" };\n }\n const event = await bridge.send({ type: \"prompt\", text }, context.signal);\n return event;\n },\n };\n}\n\nfunction throwIfAborted(signal: AbortSignal | undefined): void {\n if (signal?.aborted) {\n throw new Error(\"EzBoss bridge command aborted\");\n }\n}\n"],"mappings":";AAWO,SAAS,mBAAmB,QAA0C;AA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K,EAAE,MAAM,UAAU,KAAK,GAAG,QAAQ,MAAM;AACxE,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,SAAS,eAAe,QAAuC;AAC7D,MAAI,QAAQ,SAAS;AACnB,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prestyj/voice",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Provider-agnostic realtime voice orchestration for EZ tools and agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"zod": "^4.4.3",
|
|
48
|
-
"@prestyj/agent": "4.
|
|
49
|
-
"@prestyj/ai": "4.
|
|
48
|
+
"@prestyj/agent": "4.5.0",
|
|
49
|
+
"@prestyj/ai": "4.5.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"typescript": "^6.0.3",
|