dsh-realtime-agent 0.1.2 → 0.2.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/lib/tools.d.ts.map +1 -1
- package/lib/tools.js +0 -25
- package/lib/tools.js.map +1 -1
- package/package.json +2 -2
- package/src/tools.ts +0 -27
package/lib/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,cAAc,EAAwB,MAAM,wBAAwB,CAAA;AAC/G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAqBnD,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,eAAe,GAAG,SAAS,CAAA;IACnD,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;IAC9C,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,cAAc,EAAwB,MAAM,wBAAwB,CAAA;AAC/G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAqBnD,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,eAAe,GAAG,SAAS,CAAA;IACnD,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;IAC9C,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC;AAcD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG,cAAc,EAAE,CA2B1E"}
|
package/lib/tools.js
CHANGED
|
@@ -24,14 +24,6 @@ const STOPPED_VALUE = {
|
|
|
24
24
|
additionalProperties: false,
|
|
25
25
|
properties: { closed: { type: 'boolean', required: true } },
|
|
26
26
|
};
|
|
27
|
-
const SAID_VALUE = {
|
|
28
|
-
type: 'object',
|
|
29
|
-
additionalProperties: false,
|
|
30
|
-
properties: {
|
|
31
|
-
spoken: { type: 'boolean', required: true },
|
|
32
|
-
characters: { type: 'number', required: true },
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
27
|
/**
|
|
36
28
|
* The tools that let an agent drive a voice session.
|
|
37
29
|
*
|
|
@@ -66,23 +58,6 @@ export function voiceToolDefinitions(deps) {
|
|
|
66
58
|
return { closed: wasOpen };
|
|
67
59
|
},
|
|
68
60
|
}),
|
|
69
|
-
defineTool({
|
|
70
|
-
name: 'voice_say',
|
|
71
|
-
description: 'Say something out loud in the live voice session, in your own voice.',
|
|
72
|
-
parameters: { text: { type: 'string', required: true, description: 'What to say aloud.' } },
|
|
73
|
-
output: jsonOutput(SAID_VALUE),
|
|
74
|
-
async execute(args) {
|
|
75
|
-
const session = deps.session();
|
|
76
|
-
// Thrown, not returned as a value. A tool-thrown failure is the registry's own failure
|
|
77
|
-
// channel, and reporting this as a successful result would leave the model believing it had
|
|
78
|
-
// spoken when nothing was said.
|
|
79
|
-
if (session === undefined) {
|
|
80
|
-
throw new Error('no voice session is open — call voice_start first');
|
|
81
|
-
}
|
|
82
|
-
await session.appendCommentary(args.text);
|
|
83
|
-
return { spoken: true, characters: args.text.length };
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
61
|
];
|
|
87
62
|
}
|
|
88
63
|
//# sourceMappingURL=tools.js.map
|
package/lib/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts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E,IAAI,EAAE,EAAE;CACrD,CAAA;AAEV,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;CACnD,CAAA;AAEV;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAmB;IACtD,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,yFAAyF;YACtG,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC;YACjC,KAAK,CAAC,OAAO;gBACX,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;gBAClC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,CAAA;YAClC,CAAC;SACF,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,6DAA6D;YAC1E,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC;YACjC,KAAK,CAAC,OAAO;gBACX,4FAA4F;gBAC5F,uEAAuE;gBACvE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,SAAS,CAAA;gBAC5C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;gBACjB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA;YAC5B,CAAC;SACF,CAAC;KACH,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-realtime-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Delegation bridge for the dsh-realtime seam: answers what the voice model delegates, or says plainly that it cannot.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
|
|
46
|
-
"dsh-realtime": "^0.
|
|
46
|
+
"dsh-realtime": "^0.2.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@deepseek-ai/cordis": "^4.0.3",
|
package/src/tools.ts
CHANGED
|
@@ -42,15 +42,6 @@ const STOPPED_VALUE = {
|
|
|
42
42
|
properties: { closed: { type: 'boolean', required: true } },
|
|
43
43
|
} as const
|
|
44
44
|
|
|
45
|
-
const SAID_VALUE = {
|
|
46
|
-
type: 'object',
|
|
47
|
-
additionalProperties: false,
|
|
48
|
-
properties: {
|
|
49
|
-
spoken: { type: 'boolean', required: true },
|
|
50
|
-
characters: { type: 'number', required: true },
|
|
51
|
-
},
|
|
52
|
-
} as const
|
|
53
|
-
|
|
54
45
|
/**
|
|
55
46
|
* The tools that let an agent drive a voice session.
|
|
56
47
|
*
|
|
@@ -86,23 +77,5 @@ export function voiceToolDefinitions(deps: VoiceToolDeps): ToolDefinition[] {
|
|
|
86
77
|
return { closed: wasOpen }
|
|
87
78
|
},
|
|
88
79
|
}),
|
|
89
|
-
|
|
90
|
-
defineTool({
|
|
91
|
-
name: 'voice_say',
|
|
92
|
-
description: 'Say something out loud in the live voice session, in your own voice.',
|
|
93
|
-
parameters: { text: { type: 'string', required: true, description: 'What to say aloud.' } },
|
|
94
|
-
output: jsonOutput(SAID_VALUE),
|
|
95
|
-
async execute(args) {
|
|
96
|
-
const session = deps.session()
|
|
97
|
-
// Thrown, not returned as a value. A tool-thrown failure is the registry's own failure
|
|
98
|
-
// channel, and reporting this as a successful result would leave the model believing it had
|
|
99
|
-
// spoken when nothing was said.
|
|
100
|
-
if (session === undefined) {
|
|
101
|
-
throw new Error('no voice session is open — call voice_start first')
|
|
102
|
-
}
|
|
103
|
-
await session.appendCommentary(args.text)
|
|
104
|
-
return { spoken: true, characters: args.text.length }
|
|
105
|
-
},
|
|
106
|
-
}),
|
|
107
80
|
]
|
|
108
81
|
}
|