@framers/agentos-ext-endpoint-semantic 0.2.1 → 0.2.3
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/README.md +60 -0
- package/manifest.json +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Semantic endpoint detection
|
|
2
|
+
|
|
3
|
+
This pack registers a turn endpoint detector for the AgentOS voice pipeline. It combines punctuation and acknowledgement rules with turn-completeness classification through a supplied LLM callback.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-endpoint-semantic
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` (`>=0.10.40`).
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [
|
|
21
|
+
{
|
|
22
|
+
package: '@framers/agentos-ext-endpoint-semantic',
|
|
23
|
+
options: {
|
|
24
|
+
timeoutMs: 500,
|
|
25
|
+
minSilenceBeforeCheckMs: 500,
|
|
26
|
+
silenceTimeoutMs: 1500,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This example uses the factory's fallback callback. Supply a context-level `llmCall` function with signature `(prompt: string) => Promise<string>` to enable LLM classification.
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
The pack reads no secrets or environment variables.
|
|
39
|
+
|
|
40
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
42
|
+
| `llmCall` (context field) | None | None | No | Callback resolving to `INCOMPLETE (no llmCall provided)` |
|
|
43
|
+
| `timeoutMs` | None | None | No | `500` milliseconds |
|
|
44
|
+
| `minSilenceBeforeCheckMs` | None | None | No | `500` milliseconds |
|
|
45
|
+
| `silenceTimeoutMs` | None | None | No | `1500` milliseconds |
|
|
46
|
+
| `model` | None | None | No | Unset; declared but not read by the detector |
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
|
|
50
|
+
The detector accepts final transcripts through `pushTranscript` and VAD transitions through `pushVadEvent`. Interim transcripts are ignored. Recognized acknowledgements emit `backchannel_detected` without replacing the stored transcript. Terminal punctuation triggers `turn_complete` on `speech_end`.
|
|
51
|
+
|
|
52
|
+
For text without terminal punctuation, the detector delays classification by `minSilenceBeforeCheckMs`. A response beginning with `COMPLETE` ends the turn with reason `semantic_model`. Other responses, callback failures and classification timeouts leave the silence fallback active. Missing `llmCall` uses that fallback without making an LLM request.
|
|
53
|
+
|
|
54
|
+
The callback receives a prompt containing the transcript. Classification results are cached by transcript prefix and evicted in insertion order. Conversation context is not part of the cache key. The detector does not pass conversation context or a model identifier to the callback. Its timeout stops waiting without cancelling the callback's request.
|
|
55
|
+
|
|
56
|
+
Resumed speech cancels pending detector timers. Turn completion resets detector state before emitting the event, and `reset` also clears state and timers.
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
Apache-2.0
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-endpoint-semantic",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Semantic endpoint detection extension pack for AgentOS voice pipeline — LLM-based turn-completeness classification",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"@framers/agentos": ">=0.10.40"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@framers/agentos": "^0.
|
|
24
|
+
"@framers/agentos": "^0.13.47",
|
|
25
25
|
"typescript": "^5.5.0",
|
|
26
26
|
"vitest": "^3.2.7"
|
|
27
27
|
},
|
|
28
|
-
"license": "
|
|
28
|
+
"license": "Apache-2.0",
|
|
29
29
|
"author": "Frame.dev",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|