@jskit-ai/agent-docs 0.1.194 → 0.1.196

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.
Files changed (31) hide show
  1. package/guide/agent/app-extras/assistant-conversation.md +2608 -72
  2. package/guide/agent/app-extras/assistant-voice.md +244 -0
  3. package/guide/agent/app-extras/assistant.md +189 -20
  4. package/guide/agent/app-extras/realtime.md +6 -0
  5. package/guide/agent/index.md +1 -0
  6. package/package.json +1 -1
  7. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  8. package/patterns/minimal-foundation/example/package.json +4 -4
  9. package/patterns/shell-foundation/example/package.json +5 -5
  10. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  11. package/reference/autogen/PATTERN_INDEX.md +35 -35
  12. package/reference/autogen/README.md +2 -0
  13. package/reference/autogen/packages/assistant-core.md +974 -9
  14. package/reference/autogen/packages/assistant-runtime.md +126 -28
  15. package/reference/autogen/packages/assistant-voice-sherpa.md +82 -0
  16. package/reference/autogen/packages/assistant-voice.md +227 -0
  17. package/reference/autogen/packages/kernel.md +10 -0
  18. package/reference/autogen/packages/realtime.md +5 -2
  19. package/skills/jskit/references/pattern-index.md +35 -35
  20. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
  21. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
  22. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  23. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  24. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  25. package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
  26. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
  27. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
  28. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  29. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  30. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  31. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
@@ -14,6 +14,10 @@ Use this on demand; do not load the full index at startup.
14
14
 
15
15
  ### src
16
16
 
17
+ ### `src/client/components/AssistantConversationClientElement.vue`
18
+ Exports
19
+ - None
20
+
17
21
  ### `src/client/components/AssistantSettingsClientElement.vue`
18
22
  Exports
19
23
  - None
@@ -31,6 +35,20 @@ Local functions
31
35
  - `selectConversation(entry)`
32
36
  - `startNewConversation()`
33
37
 
38
+ ### `src/client/composables/useAssistantConversation.js`
39
+ Exports
40
+ - `configureAssistantConversations(app, { actorKey, api = null, request, clearDraftOn = "dispatch" } = {})`
41
+ - `useAssistantConversation(options)`
42
+ - `useAssistantConversationFactory(options = {})`
43
+ Local functions
44
+ - `text(value)`
45
+ - `isQuestionConfiguration(value)`
46
+ - `draftAfterAcceptedSubmission(currentDraft = "", submittedDraft = "")`
47
+ - `createConversation(identity, { api, socket, actorKey, placement, readers, queueWhileSending, draftStorage, application, goalReadEnabled })`
48
+ - `useBoundedTask({ command, endpoint, scope, input, result, onResult }, { active, data, presentation })`
49
+ - `conversationBindingSetup({ socket, boundedTask = null } = {})`
50
+ - `createConversationBinding({ conversationId, endpoint = "", surfaceId = "", hostSurfaceId = "", workspaceSlug, actorKey: suppliedActorKey, api: suppliedApi = null, socket: suppliedSocket = null, active = true, onEvent, clearDraftOn: suppliedClearDraftOn, queueWhileSending, draftWhileLoading = false, draftStorage = null, application = null, boundedTask = null, data, attachments = null, suggestions = null, models = null, questions = null, goal = null, presentation = {} } = {}, setup)`
51
+
34
52
  ### `src/client/composables/useAssistantRuntime.js`
35
53
  Exports
36
54
  - `useAssistantRuntime({ api = null, surfaceId = "", integrationId = "" } = {})`
@@ -47,9 +65,13 @@ Local functions
47
65
  ### `src/client/index.js`
48
66
  Exports
49
67
  - `AssistantSurfaceClientElement`
68
+ - `AssistantConversationClientElement`
50
69
  - `AssistantSettingsClientElement`
51
70
  - `AssistantClientProvider`
52
71
  - `useAssistantRuntime`
72
+ - `configureAssistantConversations`
73
+ - `useAssistantConversation`
74
+ - `useAssistantConversationFactory`
53
75
 
54
76
  ### `src/client/providers/AssistantClientProvider.js`
55
77
  Exports
@@ -72,6 +94,10 @@ Local functions
72
94
  - `normalizeBoundedPositiveInteger(value, fallback, maximum)`
73
95
  - `normalizeTotalPages(value)`
74
96
 
97
+ ### `src/client/support/subscribeAssistantConversation.js`
98
+ Exports
99
+ - `subscribeAssistantConversation({ socket, conversationId, targetSurfaceId, hostSurfaceId, workspaceSlug, read, onState, onEvent = () => {}, onError = () => {} } = {})`
100
+
75
101
  ### `src/client/support/workspaceScopeSupport.js`
76
102
  Exports
77
103
  - `EMPTY_WORKSPACE_WEB_SCOPE_SUPPORT`
@@ -85,37 +111,75 @@ Exports
85
111
 
86
112
  ### `src/server/actions.js`
87
113
  Exports
88
- - `createAssistantActions({ assistantConfigService, chatService, config = {} } = {})`
114
+ - `createAssistantActions({ assistantConfigService, chatService, conversationRuntime = null, conversationAccess = null, conversationDataSchema = null, conversationConfigurationSchema = null, conversationSelectionSchema = null, conversationReplacementSchema = null, workspaceScopeSupport = null, config = {} } = {})`
89
115
  Local functions
90
116
  - `configuredAssistantSurfaces(config = {})`
117
+ - `createConversationActions({ conversationRuntime, conversationDataSchema, conversationConfigurationSchema, conversationSelectionSchema, conversationReplacementSchema, config, runtimeSurfaces, workspaceScopeSupport })`
91
118
 
92
119
  ### `src/server/AssistantProvider.js`
93
120
  Exports
94
121
  - `AssistantFeature`
122
+
123
+ ### `src/server/createAssistantRuntime.js`
124
+ Exports
95
125
  - `createAssistantAiClientFactory(config = {})`
96
- - `createAssistantRuntime({ actionCatalogue, config, consoleRuntime, database, env, aiConnections, attachments, workspaces } = {})`
126
+ - `createAssistantRuntime({ actionCatalogue, config, consoleRuntime, repositories = {}, env, aiConnections, attachments, workspaces } = {})`
127
+ - `createAssistantConversationRuntime({ conversationsRepository, messagesRepository, aiClientFactory, toolCatalog, attachments })`
128
+
129
+ ### `src/server/createAssistantSettingsActions.js`
130
+ Exports
131
+ - `createAssistantSettingsActions({ assistantConfigService, settingsSurfaces })`
132
+
133
+ ### `src/server/index.js`
134
+ Exports
135
+ - `AssistantFeature`
136
+ - `createAssistantActions`
137
+ - `assistantConversationGoalBodyValidator`
138
+ - `registerAssistantRoutes`
139
+ - `registerConversationSubscriptions`
140
+ - `registerFastifyConversations`
97
141
 
98
142
  ### `src/server/inputSchemas.js`
99
143
  Exports
144
+ - `assistantConversationIdInputValidator`
145
+ - `assistantConversationMessageIdInputValidator`
146
+ - `assistantConversationReadQueryValidator`
147
+ - `assistantConversationSendBodyValidator`
148
+ - `conversationSendBodyValidator(conversationDataSchema = null)`
149
+ - `conversationConfigureBodyValidator(configurationSchema)`
150
+ - `conversationSelectBodyValidator(selectionSchema)`
151
+ - `conversationReplaceBodyValidator(replacementSchema)`
152
+ - `assistantConversationGoalBodyValidator`
100
153
  - `assistantSurfaceRouteParamsValidator`
101
154
  - `assistantTargetSurfaceInputValidator`
102
155
 
156
+ ### `src/server/registerConversationSubscriptions.js`
157
+ Exports
158
+ - `registerConversationSubscriptions({ realtime, events, actions, config = {}, workspaceScopeSupport = null, subscribeActionId = actionIds.conversationSubscribe, requestPolicy = "authenticated" } = {})`
159
+ Local functions
160
+ - `requireSubscriptionId(input)`
161
+ - `subscriptionError(error)`
162
+
163
+ ### `src/server/registerFastifyConversations.js`
164
+ Exports
165
+ - `registerFastifyConversations(app, { runtime, config, authenticate, bootstrap, env = process.env } = {})`
166
+
103
167
  ### `src/server/registerRoutes.js`
104
168
  Exports
105
- - `registerRoutes(router, { config = {}, workspaceScopeSupport = null } = {})`
169
+ - `registerRoutes(router, { config = {}, workspaceScopeSupport = null, conversationRuntime = null, conversationAccess = null, conversationDataSchema = null, conversationConfigurationSchema = null, conversationSelectionSchema = null, conversationReplacementSchema = null, assistantConfigService = null } = {})`
106
170
  Local functions
107
- - `requireWorkspaceAssistantRouteParams(workspaceScopeSupport = null)`
108
- - `readWorkspaceInput(request, requiresWorkspace, workspaceScopeSupport = null)`
109
- - `requireAssistantSurface(appConfig = {}, targetSurfaceId = "")`
110
- - `requireHostSurfaceId(request)`
111
171
  - `shouldExposeAppErrorDetails(errorCode = "")`
112
172
  - `sendPreStreamErrorResponse(reply, error)`
113
- - `resolveRouteRequestState(request, { resolveCurrentAppConfig = () => ({}), kind = "runtime", requiresWorkspace = false, workspaceScopeSupport = null } = {})`
114
173
  - `buildChatStreamActionInput(routeInput = {}, requestBody = {})`
115
- - `resolveAssistantSettingsRecordId(record = {})`
116
174
  - `resolveAssistantConversationMessagesRecordId(record = {})`
117
- - `registerSettingsRoutes(router, resolveCurrentAppConfig, { requiresWorkspace = false, workspaceScopeSupport = null } = {})`
118
175
  - `registerRuntimeRoutes(router, resolveCurrentAppConfig, { requiresWorkspace = false, workspaceScopeSupport = null } = {})`
176
+ - `registerConversationRoutes(router, resolveCurrentAppConfig, { requiresWorkspace = false, workspaceScopeSupport = null, conversationDataSchema = null, conversationConfigurationSchema = null, conversationSelectionSchema = null, conversationReplacementSchema = null } = {})`
177
+
178
+ ### `src/server/registerSettingsRoutes.js`
179
+ Exports
180
+ - `registerSettingsRoutes(router, resolveCurrentAppConfig, { requiresWorkspace = false, workspaceScopeSupport = null } = {})`
181
+ Local functions
182
+ - `resolveAssistantSettingsRecordId(record = {})`
119
183
 
120
184
  ### `src/server/repositories/assistantConfigRepository.js`
121
185
  Exports
@@ -170,42 +234,50 @@ Exports
170
234
 
171
235
  ### `src/server/services/chatService.js`
172
236
  Exports
173
- - `createChatService({ aiClientFactory, turnRequests, attachments, transcriptService, serviceToolCatalog, assistantConfigService, appConfig = {}, resolveAppConfig = null, workspaceScopeSupport = null } = {})`
237
+ - `createChatService({ conversationRuntime, aiClientFactory, turnRequests, attachments, transcriptService, serviceToolCatalog, assistantConfigService, appConfig = {}, resolveAppConfig = null, workspaceScopeSupport = null } = {})`
174
238
  Local functions
175
239
  - `normalizeConversationId(value)`
176
240
  - `normalizeHistory(history = [])`
177
241
  - `normalizeStreamInput(payload = {})`
178
242
  - `hasStreamWriter(streamWriter)`
179
243
  - `isAbortError(error)`
180
- - `requiresCurrentTime(value = "")`
181
- - `resolvePreflightTools(toolDescriptors = [], input = "")`
182
- - `extractTextDelta(deltaContent)`
183
244
  - `toCompactJson(value, fallback = "{}")`
184
245
  - `buildToolContractLine(toolDescriptor = {})`
185
246
  - `buildSystemPrompt({ targetSurfaceId = "", toolDescriptors = [], workspaceSlug = "", customSystemPrompt = "" } = {})`
186
- - `buildRecoveryPrompt({ reason = "", toolFailures = [], toolSuccesses = [] } = {})`
187
- - `buildRecoveryFallbackAnswer({ reason = "", toolFailures = [], toolSuccesses = [] } = {})`
188
- - `toSafeToolResultText(value)`
189
- - `buildToolOutcomeFallbackAnswer({ toolFailures = [], toolSuccesses = [] } = {})`
190
- - `sanitizeAssistantMessageText(value)`
191
- - `buildAssistantToolCallMessage(toolCalls = [])`
192
- - `parseDsmlToolCallsFromText(value = "")`
193
- - `consumeCompletionStream(stream, onText = () => {})`
194
247
  - `requireAssistantSurface(appConfig = {}, targetSurfaceId = "")`
195
248
  - `buildAssistantActionContext(context = {}, assistantSurface = {})`
196
249
 
197
250
  ### `src/server/services/transcriptService.js`
198
251
  Exports
199
252
  - `createTranscriptService({ conversationsRepository, messagesRepository } = {})`
253
+ - `deriveConversationTitleFromMessage(contentText)`
254
+ - `isDefaultConversationTitle(value)`
200
255
  Local functions
201
256
  - `resolveWorkspaceId(workspace, { required = false } = {})`
202
257
  - `resolveActorUserId(user, { required = false } = {})`
203
258
  - `normalizePagination(pagination = {}, { defaultPageSize = DEFAULT_PAGE_SIZE, maxPageSize = MAX_PAGE_SIZE } = {})`
204
259
  - `normalizeCursorPagination(query = {}, { defaultLimit = DEFAULT_PAGE_SIZE, maxLimit = MAX_PAGE_SIZE } = {})`
205
- - `deriveConversationTitleFromMessage(contentText)`
206
- - `isDefaultConversationTitle(value)`
207
260
  - `requireAssistantSurface(assistantSurface = {})`
208
261
 
262
+ ### `src/server/sqlConversationStorage.js`
263
+ Exports
264
+ - `createSqlConversationStorage({ conversationsRepository, messagesRepository })`
265
+ - `inspectSqlConversationRows(conversation, rows)`
266
+ Local functions
267
+ - `authored(row)`
268
+ - `rowLink(row)`
269
+ - `messageFromRow(row)`
270
+ - `requireUnambiguous(projection)`
271
+
272
+ ### `src/server/support/assistantRouteContext.js`
273
+ Exports
274
+ - `requireWorkspaceAssistantRouteParams(workspaceScopeSupport = null)`
275
+ - `resolveRouteRequestState(request, { resolveCurrentAppConfig = () => ({}), kind = "runtime", requiresWorkspace = false, workspaceScopeSupport = null } = {})`
276
+ Local functions
277
+ - `readWorkspaceInput(request, requiresWorkspace, workspaceScopeSupport = null)`
278
+ - `requireAssistantSurface(appConfig = {}, targetSurfaceId = "")`
279
+ - `requireHostSurfaceId(request)`
280
+
209
281
  ### `src/server/support/assistantServerConfig.js`
210
282
  Exports
211
283
  - `resolveAssistantServerConfigMap(appConfig = {})`
@@ -221,24 +293,28 @@ Local functions
221
293
  - `buildCatalogOptions(appConfig = {}, surfaceId = "")`
222
294
  - `requireContextSurfaceId(context = {})`
223
295
 
224
- ### `src/shared/assistantResponseText.js`
225
- Exports
226
- - `isAssistantProgressOnlyText(value)`
227
-
228
296
  ### `src/shared/assistantRuntimeConfig.js`
229
297
  Exports
230
298
  - `assistantRuntimeConfig`
231
299
 
232
300
  ### `src/shared/assistantSurfaces.js`
233
301
  Exports
302
+ - `defineAssistantSurface(surfaceId, { pagesRoot = "", requiresWorkspace = false, configScope = requiresWorkspace ? "workspace" : "global", ...definition } = {})`
234
303
  - `normalizeAssistantConfigScope(value = "")`
235
304
  - `resolveAssistantSurfaceConfig(appConfig = {}, targetSurfaceId = "")`
236
305
  - `resolveAssistantSurfacesConfig(appConfig = {})`
237
306
  - `resolveSurfaceDefinitions(appConfig = {})`
238
307
 
308
+ ### `src/shared/conversationRealtime.js`
309
+ Exports
310
+ - `ASSISTANT_CONVERSATION_SUBSCRIBE`
311
+ - `ASSISTANT_CONVERSATION_UNSUBSCRIBE`
312
+ - `ASSISTANT_CONVERSATION_EVENT`
313
+
239
314
  ### `src/shared/index.js`
240
315
  Exports
241
316
  - `assistantRuntimeConfig`
317
+ - `defineAssistantSurface`
242
318
  - `normalizeAssistantConfigScope`
243
319
  - `resolveAssistantSurfaceConfig`
244
320
  - `resolveAssistantSurfacesConfig`
@@ -246,6 +322,28 @@ Exports
246
322
 
247
323
  ### fixtures
248
324
 
325
+ ### `fixtures/canonical-conversation/App.vue`
326
+ Exports
327
+ - None
328
+ Local functions
329
+ - `recordDispatch(messageId)`
330
+
331
+ ### `fixtures/canonical-conversation/DraftConversation.vue`
332
+ Exports
333
+ - None
334
+
335
+ ### `fixtures/canonical-conversation/main.js`
336
+ Exports
337
+ - None
338
+
339
+ ### `fixtures/canonical-conversation/socket.js`
340
+ Exports
341
+ - `createFixtureSocket()`
342
+
343
+ ### `fixtures/canonical-conversation/vite.config.mjs`
344
+ Exports
345
+ - None
346
+
249
347
  ### `fixtures/conversation/App.vue`
250
348
  Exports
251
349
  - None
@@ -0,0 +1,82 @@
1
+ # packages/assistant-voice-sherpa
2
+
3
+ Generated by `npm run agent-docs:build`.
4
+ Do not edit manually.
5
+
6
+ Generated inventory for `packages/assistant-voice-sherpa`.
7
+ Use this on demand; do not load the full index at startup.
8
+
9
+ ## Scope
10
+ - Source: `packages/assistant-voice-sherpa/**/*{.js,.mjs,.cjs,.vue}`
11
+ - Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `.vitepress/cache/`, `.vitepress/dist/`
12
+
13
+ ## Sections
14
+
15
+ ### src
16
+
17
+ ### `src/cli.js`
18
+ Exports
19
+ - `argumentMap(values = [])`
20
+ - `runVoiceCli(argv = process.argv.slice(2), { createDaemon = createVoiceDaemon, recognitionVocabulary = {} } = {})`
21
+ Local functions
22
+ - `requiredOption(options, key, environmentKey = "")`
23
+ - `accessKeyFromFile(filePath)`
24
+ - `positiveInteger(value, fallback)`
25
+ - `usage()`
26
+
27
+ ### `src/index.js`
28
+ Exports
29
+ - `createSherpaSpeechEngine`
30
+ - `verifyVoiceModelContract`
31
+ - `readVoiceModelContract`
32
+
33
+ ### `src/sherpaSpeechEngine.js`
34
+ Exports
35
+ - `createSherpaSpeechEngine({ modelsRoot = "", configuration = {}, recognizerActivePaths = 16, recognizerThreads = 1, sherpa = null, createSynthesizer = createSynthesisProcess, synthesizerThreads = 1 } = {})`
36
+ - `positiveActivePathCount(value, fallback = 16)`
37
+ - `positiveThreadCount(value, fallback = 1)`
38
+ - `runtimeValue(runtime, key)`
39
+
40
+ ### `src/synthesisProcess.js`
41
+ Exports
42
+ - `createSynthesisProcess(configuration, { outputSampleRate, workerUrl = new URL("./synthesisWorker.js", import.meta.url) } = {})`
43
+
44
+ ### `src/synthesisWorker.js`
45
+ Exports
46
+ - None
47
+ Local functions
48
+ - `sendAudio(samples)`
49
+
50
+ ### `src/voiceModelContract.js`
51
+ Exports
52
+ - `VOICE_MODEL_CONTRACT_SCHEMA`
53
+ - `modelFilePath(modelsRoot = "", relativePath = "")`
54
+ - `readVoiceModelContract({ contractPath = "", modelsRoot = "" } = {})`
55
+ - `sha256File(filePath = "")`
56
+ - `verifyVoiceModelContract({ contractPath = "", modelsRoot = "" } = {})`
57
+ Local functions
58
+ - `modelContractError(code, message)`
59
+
60
+ ### bin
61
+
62
+ ### `bin/jskit-assistant-voice.js`
63
+ Exports
64
+ - None
65
+
66
+ ### tooling
67
+
68
+ ### `tooling/build-voice-model-contract.mjs`
69
+ Exports
70
+ - None
71
+ Local functions
72
+ - `collectFiles(root, relativeRoot = "")`
73
+
74
+ ### `tooling/stage-voice-models.mjs`
75
+ Exports
76
+ - None
77
+ Local functions
78
+ - `contained(root, relative)`
79
+
80
+ ### `tooling/verify-voice-models.mjs`
81
+ Exports
82
+ - None
@@ -0,0 +1,227 @@
1
+ # packages/assistant-voice
2
+
3
+ Generated by `npm run agent-docs:build`.
4
+ Do not edit manually.
5
+
6
+ Generated inventory for `packages/assistant-voice`.
7
+ Use this on demand; do not load the full index at startup.
8
+
9
+ ## Scope
10
+ - Source: `packages/assistant-voice/**/*{.js,.mjs,.cjs,.vue}`
11
+ - Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `.vitepress/cache/`, `.vitepress/dist/`
12
+
13
+ ## Sections
14
+
15
+ ### src
16
+
17
+ ### `src/client/audioCapture.js`
18
+ Exports
19
+ - `createMicrophoneCapture({ onLevel, onPcm, targetSampleRate = 16_000 } = {})`
20
+ - `float32ToPcm16ArrayBuffer(samples)`
21
+
22
+ ### `src/client/ConversationDialog.vue`
23
+ Exports
24
+ - None
25
+ Local functions
26
+ - `outsideClick(event)`
27
+ - `updateOpen(value)`
28
+
29
+ ### `src/client/conversationNarration.js`
30
+ Exports
31
+ - `createConversationNarrationTracker()`
32
+ - `latestConversationFinalNarrationEntry(turns = [])`
33
+
34
+ ### `src/client/conversationVoiceState.js`
35
+ Exports
36
+ - `projectConversationVoiceState({ turns = [], status = "ready", interimReply = null } = {})`
37
+
38
+ ### `src/client/index.js`
39
+ Exports
40
+ - `projectConversationVoiceState`
41
+ - `createVoiceConversationController`
42
+ - `VoiceConversationHost`
43
+ - `ConversationDialog`
44
+ - `VoiceConversation`
45
+ - `useVoiceLauncher`
46
+ - `useVoiceAvatar`
47
+ - `VoiceAvatar`
48
+
49
+ ### `src/client/voiceAvatar.js`
50
+ Exports
51
+ - `useVoiceAvatar(props)`
52
+
53
+ ### `src/client/VoiceAvatar.vue`
54
+ Exports
55
+ - None
56
+
57
+ ### `src/client/voiceController.js`
58
+ Exports
59
+ - `createVoiceConversationController({ connectSpeech, createSession = useVoiceConversation } = {})`
60
+
61
+ ### `src/client/voiceConversation.js`
62
+ Exports
63
+ - `useVoiceConversation(binding, { socketUrl, createTransport = useVoiceTransport } = {})`
64
+
65
+ ### `src/client/VoiceConversation.vue`
66
+ Exports
67
+ - None
68
+ Local functions
69
+ - `isAtBottom(element)`
70
+
71
+ ### `src/client/VoiceConversationHost.vue`
72
+ Exports
73
+ - None
74
+ Local functions
75
+ - `invoke(operation)`
76
+ - `openText()`
77
+
78
+ ### `src/client/voiceLauncher.js`
79
+ Exports
80
+ - `useVoiceLauncher({ open, enabled = true, onTap = null, onError = () => {} })`
81
+
82
+ ### `src/client/voicePlayback.js`
83
+ Exports
84
+ - `MOUTH_POSES`
85
+ - `normalizeSpeechSegment(message = {}, sampleRate = 22_050)`
86
+ - `pcm16ArrayBufferToFloat32(buffer)`
87
+ - `visemeCueAtTime(segments = [], currentTime = 0)`
88
+
89
+ ### `src/client/voiceTransport.js`
90
+ Exports
91
+ - `useVoiceTransport({ socketUrl, speechEnabled = true, interruptSpeechOnListen = false, autoReconnect = false, voiceId = "" } = {})`
92
+ - `voiceTurnId(prefix = "turn")`
93
+ Local functions
94
+ - `resolveWebSocketUrl(value)`
95
+
96
+ ### `src/server/index.js`
97
+ Exports
98
+ - `createVoiceDaemon`
99
+ - `registerVoiceProxyRoute`
100
+ - `readVoiceCatalogue`
101
+ - `resolveVoiceProxyConfig`
102
+ - `readVoiceAccessToken`
103
+ - `voiceEndpoint`
104
+ - `createVoiceAccessToken`
105
+ - `verifyVoiceAccessToken`
106
+ - `bearerVoiceAccessToken`
107
+ - `normalizeVoiceCloseMetadata`
108
+
109
+ ### `src/server/voiceAccessToken.js`
110
+ Exports
111
+ - `VOICE_ACCESS_TOKEN_VERSION`
112
+ - `bearerVoiceAccessToken(headers = {})`
113
+ - `createVoiceAccessToken({ key, tenant } = {})`
114
+ - `verifyVoiceAccessToken(token = "", { key } = {})`
115
+ - `voiceAccessKey(value = "")`
116
+ - `voiceTenant(value = "")`
117
+ Local functions
118
+ - `voiceAccessSignature(key, tenant)`
119
+
120
+ ### `src/server/voiceDaemon.js`
121
+ Exports
122
+ - `createBoundedSerialQueue({ maximumQueued = 4 } = {})`
123
+ - `createVoiceDaemon({ accessKey, authorize = token => verifyVoiceAccessToken(token, { key: accessKey }), handleRequest = null, engine, host = "127.0.0.1", idleTimeoutMs = 90_000, logger = console, maximumConnections = 8, maximumConnectionsPerTenant = 2, maximumQueuedSpeech = 4, port = 3092 } = {})`
124
+ - `sendJson(socket, type, fields = {})`
125
+ - `voiceDaemonError(error, fallback = "Voice operation failed.")`
126
+ Local functions
127
+ - `sendPcm(socket, audio = Buffer.alloc(0))`
128
+ - `requestPathname(request = {})`
129
+ - `writeJsonResponse(response, statusCode, payload)`
130
+
131
+ ### `src/server/voiceProxy.js`
132
+ Exports
133
+ - `closeSocket(socket, code, reason)`
134
+ - `readVoiceCatalogue(config, { fetchImpl = fetch } = {})`
135
+ - `registerVoiceProxyRoute(fastify, { proxyConfig, route, authorize = null, WebSocketCtor = WebSocket } = {})`
136
+ Local functions
137
+ - `sendSocketError(socket, code, message)`
138
+
139
+ ### `src/server/voiceProxyConfig.js`
140
+ Exports
141
+ - `readVoiceAccessToken(filePath = "")`
142
+ - `resolveVoiceProxyConfig({ endpoint: value = "", accessTokenFile = "" } = {})`
143
+ - `voiceEndpoint(value = "")`
144
+
145
+ ### `src/server/voiceSocketClose.js`
146
+ Exports
147
+ - `normalizeVoiceCloseMetadata(code, reason)`
148
+ Local functions
149
+ - `proxyCloseCode(code)`
150
+ - `proxyCloseReason(reason)`
151
+
152
+ ### `src/shared/protocol.js`
153
+ Exports
154
+ - `VOICE_DAEMON_WEBSOCKET_PATH`
155
+ - `VOICE_INPUT_SAMPLE_RATE`
156
+ - `VOICE_MAX_AUDIO_FRAME_BYTES`
157
+ - `VOICE_MAX_CONTROL_BYTES`
158
+ - `VOICE_MAX_SPEECH_CHUNK_CHARACTERS`
159
+ - `VOICE_MAX_SPEECH_TEXT_CHARACTERS`
160
+ - `VOICE_MAX_UTTERANCE_SECONDS`
161
+ - `VOICE_OUTPUT_SAMPLE_RATE`
162
+ - `VOICE_PROTOCOL_VERSION`
163
+ - `assertVoiceAudioFrame(frame = null)`
164
+ - `float32ToPcm16Le(samples = new Float32Array())`
165
+ - `normalizeRecognizedText(value = "", vocabulary = {})`
166
+ - `parseVoiceClientControl(raw = "")`
167
+ - `pcm16LeToFloat32(frame = Buffer.alloc(0))`
168
+ - `speechPauseDurationMs(value = "")`
169
+ - `speechPhrases(value = "")`
170
+ - `speechTextFromAssistant(value = "", maximumCharacters = VOICE_MAX_SPEECH_TEXT_CHARACTERS)`
171
+ - `splitSpeechText(value = "", maximumCharacters = VOICE_MAX_SPEECH_CHUNK_CHARACTERS)`
172
+ - `takeStreamingSpeech(text = "", final = false, maximumCharacters = 140)`
173
+ - `voiceProtocolError(code, message)`
174
+ - `voiceServerMessage(type = "", fields = {})`
175
+ - `voiceTurnId(value = "")`
176
+
177
+ ### `src/shared/visemes.js`
178
+ Exports
179
+ - `MAX_VISEME_CUES`
180
+ - `characterViseme(character = "")`
181
+ - `visemeCuesFromText(value = "", durationMs = 0)`
182
+ - `visemeUnitsFromText(value = "")`
183
+ Local functions
184
+ - `appendUnit(units, pose, level, weight)`
185
+
186
+ ### examples
187
+
188
+ ### `examples/conversation/App.vue`
189
+ Exports
190
+ - None
191
+ Local functions
192
+ - `openText(id)`
193
+ - `voiceBinding(runtime, label)`
194
+ - `openVoice(runtime, label)`
195
+
196
+ ### `examples/conversation/config.js`
197
+ Exports
198
+ - `conversations`
199
+ - `appConfig`
200
+
201
+ ### `examples/conversation/Conversation.vue`
202
+ Exports
203
+ - None
204
+
205
+ ### `examples/conversation/main.js`
206
+ Exports
207
+ - None
208
+
209
+ ### `examples/conversation/server.js`
210
+ Exports
211
+ - `createExampleServer({ env = process.env } = {})`
212
+
213
+ ### `examples/conversation/src/error.js`
214
+ Exports
215
+ - `default`
216
+
217
+ ### `examples/conversation/src/placement.js`
218
+ Exports
219
+ - None
220
+
221
+ ### `examples/conversation/src/placementTopology.js`
222
+ Exports
223
+ - None
224
+
225
+ ### `examples/conversation/vite.config.js`
226
+ Exports
227
+ - None
@@ -713,6 +713,7 @@ Exports
713
713
  Exports
714
714
  - `createCapabilityHttpRuntime`
715
715
  - `HttpProvider`
716
+ - `attachDirectRequestActionExecutor`
716
717
  - `createCachedResponseSerializerFactory`
717
718
 
718
719
  ### `server/http/lib/controller.js`
@@ -1049,6 +1050,14 @@ Local functions
1049
1050
  Exports
1050
1051
  - `defaultMissingHandler(_request, reply)`
1051
1052
 
1053
+ ### `server/support/fileLock.js`
1054
+ Exports
1055
+ - `FILE_LOCK_ERROR_CODE`
1056
+ - `tryAcquireExclusiveFileLock(lockPath = "", { cwd = "", errorCode = FILE_LOCK_ERROR_CODE } = {})`
1057
+ Local functions
1058
+ - `fileLockError(message = "", code = FILE_LOCK_ERROR_CODE)`
1059
+ - `normalizedAbsolutePath(value = "", label = "path", errorCode = FILE_LOCK_ERROR_CODE)`
1060
+
1052
1061
  ### `server/support/importFreshModuleFromAbsolutePath.js`
1053
1062
  Exports
1054
1063
  - `importFreshModuleFromAbsolutePath(absolutePath)`
@@ -1086,6 +1095,7 @@ Exports
1086
1095
  - `discoverShellOutletTargetsFromApp`
1087
1096
  - `resolveSemanticPlacementTargetFromApp`
1088
1097
  - `resolveShellOutletPlacementTargetFromApp`
1098
+ - `tryAcquireExclusiveFileLock`
1089
1099
 
1090
1100
  ### `server/support/pageTargets.js`
1091
1101
  Exports
@@ -48,8 +48,9 @@ Exports
48
48
 
49
49
  ### `src/server/realtimeAudience.js`
50
50
  Exports
51
+ - `createSocketRequest(socket)`
51
52
  - `realtimeAuthenticationRequired(authService = null)`
52
- - `revalidateSocket({ socket, authService, workspaces = null })`
53
+ - `revalidateSocket({ socket, authService, workspaces = null, request })`
53
54
  - `registerSocketAudienceBootstrap({ io, logger, authService = null, workspaces = null })`
54
55
  - `resolveAudienceTargets(audience, event, { database = null, logger })`
55
56
  Local functions
@@ -64,7 +65,7 @@ Local functions
64
65
  - `addAudienceRooms(selection, state)`
65
66
  - `collectUserIds(rows)`
66
67
  - `parseCookieHeader(value = "")`
67
- - `resolveSocketActor(authService, socket)`
68
+ - `resolveSocketActor(authService, socket, request = createSocketRequest(socket))`
68
69
  - `authenticationRequiredError()`
69
70
  - `rememberSocketActorId(socket, actorId)`
70
71
  - `registerRequiredSocketAuthentication({ io, logger, authService })`
@@ -94,6 +95,8 @@ Exports
94
95
  - `configureSocketIoRedisAdapter(io, { redisUrl = "", redisNamespace = "", logger = console, createRedisAdapter = createSocketIoRedisAdapter, createRedisConnection = createRedisClient } = {})`
95
96
  - `closeSocketIoRedisConnections({ pubClient = null, subClient = null } = {})`
96
97
  Local functions
98
+ - `toRequestPathname(urlValue)`
99
+ - `registerSocketIoUpgradeHandoff(fastify)`
97
100
  - `resolveHttpServer({ httpServer = null, fastify = null } = {})`
98
101
  - `buildSocketIoRedisAdapterKey(redisNamespace = "")`
99
102