@extentos/mcp-server 0.0.94 → 0.1.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/tools/data/capabilityPatterns.d.ts.map +1 -1
- package/dist/tools/data/capabilityPatterns.js +248 -1
- package/dist/tools/data/capabilityPatterns.js.map +1 -1
- package/dist/tools/data/codeExamples.d.ts.map +1 -1
- package/dist/tools/data/codeExamples.js +337 -2
- package/dist/tools/data/codeExamples.js.map +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +54 -3
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/docs/index.d.ts.map +1 -1
- package/dist/tools/docs/index.js +111 -1
- package/dist/tools/docs/index.js.map +1 -1
- package/dist/tools/handlers/assertToolCalled.d.ts +3 -0
- package/dist/tools/handlers/assertToolCalled.d.ts.map +1 -0
- package/dist/tools/handlers/assertToolCalled.js +171 -0
- package/dist/tools/handlers/assertToolCalled.js.map +1 -0
- package/dist/tools/handlers/getProductionChecklist.d.ts.map +1 -1
- package/dist/tools/handlers/getProductionChecklist.js +52 -1
- package/dist/tools/handlers/getProductionChecklist.js.map +1 -1
- package/dist/tools/handlers/injectAssistantUtterance.d.ts +3 -0
- package/dist/tools/handlers/injectAssistantUtterance.d.ts.map +1 -0
- package/dist/tools/handlers/injectAssistantUtterance.js +139 -0
- package/dist/tools/handlers/injectAssistantUtterance.js.map +1 -0
- package/dist/tools/handlers/validateIntegration.d.ts.map +1 -1
- package/dist/tools/handlers/validateIntegration.js +67 -0
- package/dist/tools/handlers/validateIntegration.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +4 -0
- package/dist/tools/registry.js.map +1 -1
- package/package.json +1 -1
|
@@ -1604,8 +1604,8 @@ The agent reads each \`speak\` event's \`details.text\` — that is what the app
|
|
|
1604
1604
|
};
|
|
1605
1605
|
const CONVERSATION_AGENT_LOOP = {
|
|
1606
1606
|
pattern: "conversation_agent_loop",
|
|
1607
|
-
title: "Phase 3 conversation runtime
|
|
1608
|
-
description: "
|
|
1607
|
+
title: "LEGACY Phase 3 conversation runtime (DEPRECATED in v1.4.0; removed in v2.0.0 — use assistant_agent_loop for new apps)",
|
|
1608
|
+
description: "**LEGACY — DEPRECATED in v1.4.0; removed entirely in v2.0.0.** For new voice-assistant work use `assistant_agent_loop` (Phase 4 `glasses.assistant.start { tool(...) { ... } }`). The Phase 4 customer surface drops ~60% LoC vs this pattern, ships zero on-device ML (no ONNX models to bundle), and lets the model decide which tool to call instead of the customer hand-writing `when (turn.text)` keyword routing. This Phase 3 pattern stays in the catalog for the v1.4.0 → v2.0.0 migration window (3-month deprecation period) — existing apps continue to work unchanged. See `searchDocs(topic:'assistant_runtime')` migration section for the side-by-side Phase 3 → Phase 4 walkthrough. The Phase 3 `glasses.conversation.onWake { listen() / speak() / ai.complete() }` API composes VAD + STT + Smart Turn + TTS + BYOK LLM in the shared Rust core; the agent loop here drives wake + follow-up utterances via `injectTranscript` and asserts symmetric `conversation.*` event pairs.",
|
|
1609
1609
|
code: {
|
|
1610
1610
|
kotlin: `// ── Application bootstrap (do once, typically in Application.onCreate
|
|
1611
1611
|
// after RECORD_AUDIO is granted) ────────────────────────────────────
|
|
@@ -1901,6 +1901,340 @@ browser side-by-side with this agent loop and watch the panel react.`,
|
|
|
1901
1901
|
],
|
|
1902
1902
|
relatedFeatures: ["voice_command", "speak", "transcription_incremental", "ai_call", "smart_turn_eou"],
|
|
1903
1903
|
};
|
|
1904
|
+
const ASSISTANT_AGENT_LOOP = {
|
|
1905
|
+
pattern: "assistant_agent_loop",
|
|
1906
|
+
title: "Phase 4 assistant runtime + agent-driven E2E loop (canonical voice-AI for new apps)",
|
|
1907
|
+
description: "**Canonical Phase 4 voice-AI pattern. Start here for any new voice assistant work on Extentos.** The customer code is one block: `glasses.assistant.start(provider) { tool(name, description) { body -> ToolResult } }`. The model owns wake detection, turn taking, intent parsing, and confirmation speech — the customer only writes tool bodies that act on the app's own state (route data, app DB, camera, library). Provider abstraction wraps OpenAI Realtime in v1; Gemini Live follows. The agent-test loop drives utterances via `injectAssistantUtterance` (Mock provider — deterministic, $0) and asserts via `assertToolCalled`, closing E2E verification without humans. **This replaces `conversation_agent_loop` (Phase 3 cascaded VAD+STT+SmartTurn+TTS+LLM) which is deprecated in v1.4.0 and removed in v2.0.0.** Customer code typically drops ~60% LoC vs Phase 3.",
|
|
1908
|
+
code: {
|
|
1909
|
+
kotlin: `// ── Application bootstrap (do once in Application.onCreate after
|
|
1910
|
+
// RECORD_AUDIO is granted) ──────────────────────────────────────────
|
|
1911
|
+
//
|
|
1912
|
+
// No ONNX models, no model paths, no cascaded options — Phase 4 ships
|
|
1913
|
+
// end-to-end via the provider's WebSocket. glasses.assistant is
|
|
1914
|
+
// always-on (no opt-in conversationOptions needed).
|
|
1915
|
+
import com.extentos.glasses.core.ExtentosConfig
|
|
1916
|
+
import com.extentos.glasses.core.ExtentosGlasses
|
|
1917
|
+
import com.extentos.glasses.core.assistant.AssistantProvider
|
|
1918
|
+
import com.extentos.glasses.core.assistant.ToolResult
|
|
1919
|
+
import com.extentos.glasses.core.assistant.tool
|
|
1920
|
+
|
|
1921
|
+
suspend fun createGlasses(context: android.content.Context): ExtentosGlasses {
|
|
1922
|
+
return ExtentosGlasses.create(
|
|
1923
|
+
ExtentosConfig(applicationContext = context)
|
|
1924
|
+
).also { glasses ->
|
|
1925
|
+
// BYOK OpenAI key — see getCredentialGuide(service:"openai") for
|
|
1926
|
+
// the local.properties + resValue plumbing. Key flows direct from
|
|
1927
|
+
// device → api.openai.com via WS Authorization header; Extentos
|
|
1928
|
+
// backend never sees it.
|
|
1929
|
+
glasses.assistant.setOpenaiApiKey(BuildConfig.OPENAI_API_KEY)
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
// ── Handler — Strava-style example. Wire after createGlasses returns. ──
|
|
1934
|
+
|
|
1935
|
+
class StravaAssistantHandler(
|
|
1936
|
+
private val glasses: ExtentosGlasses,
|
|
1937
|
+
private val routeTracker: RouteTracker, // app-internal state
|
|
1938
|
+
private val library: ClipLibrary, // app-internal state
|
|
1939
|
+
private val scope: kotlinx.coroutines.CoroutineScope,
|
|
1940
|
+
) {
|
|
1941
|
+
private var activeVideo: kotlinx.coroutines.Deferred<*>? = null
|
|
1942
|
+
|
|
1943
|
+
fun start() {
|
|
1944
|
+
// Sugar form (the trailing-lambda builder). The block runs once
|
|
1945
|
+
// at start to register tools + instructions; \`session.update\` is
|
|
1946
|
+
// sent to OpenAI and the audio pump engages. Returns when the
|
|
1947
|
+
// session reaches Active state.
|
|
1948
|
+
scope.launch {
|
|
1949
|
+
glasses.assistant.start(
|
|
1950
|
+
provider = AssistantProvider.OpenAi(
|
|
1951
|
+
model = "gpt-realtime",
|
|
1952
|
+
voice = "alloy",
|
|
1953
|
+
),
|
|
1954
|
+
) {
|
|
1955
|
+
instructions = """
|
|
1956
|
+
You are a Strava companion. Help the runner with route
|
|
1957
|
+
stats and capture moments. Speak briefly — they're
|
|
1958
|
+
running. Don't narrate what you're doing — just do it
|
|
1959
|
+
and confirm.
|
|
1960
|
+
""".trimIndent()
|
|
1961
|
+
|
|
1962
|
+
// Read-tools: instant data the AI reads aloud or weaves
|
|
1963
|
+
// into the answer.
|
|
1964
|
+
tool("get_route_remaining", "How much of the planned route is left, in km.") {
|
|
1965
|
+
ToolResult.Ok("\${routeTracker.kmRemaining()} km remaining")
|
|
1966
|
+
}
|
|
1967
|
+
tool("get_average_pace", "Current average pace in minutes per km.") {
|
|
1968
|
+
ToolResult.Ok("\${routeTracker.avgPaceMinKm()} min per km")
|
|
1969
|
+
}
|
|
1970
|
+
tool("get_route_length", "Total planned route length in km.") {
|
|
1971
|
+
ToolResult.Ok("\${routeTracker.totalKm} km")
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
// Action-tools: side effects on the app's own state. The
|
|
1975
|
+
// AI manages the take/stop pair — it knows from context
|
|
1976
|
+
// that stop_video pairs with take_video.
|
|
1977
|
+
tool("take_video", "Start recording a video clip of the runner's view.") {
|
|
1978
|
+
activeVideo = scope.async {
|
|
1979
|
+
glasses.camera.captureVideo(
|
|
1980
|
+
VideoConfig(maxDurationSeconds = 30),
|
|
1981
|
+
)
|
|
1982
|
+
}
|
|
1983
|
+
ToolResult.Ok("recording started")
|
|
1984
|
+
}
|
|
1985
|
+
tool("stop_video", "Stop the current video recording.") {
|
|
1986
|
+
// Cooperative cancellation: cancel the Deferred awaiting
|
|
1987
|
+
// captureVideo. The library's transport layer catches the
|
|
1988
|
+
// cancellation, fires core.abortCaptureVideo() internally,
|
|
1989
|
+
// and surfaces a partial clip (or nothing if cancel landed
|
|
1990
|
+
// before any frames). There is no glasses.camera.stopVideo()
|
|
1991
|
+
// — Deferred cancellation IS the customer-facing stop
|
|
1992
|
+
// mechanism. Matches the iOS Task.cancel() pattern.
|
|
1993
|
+
val pending = activeVideo
|
|
1994
|
+
activeVideo = null
|
|
1995
|
+
if (pending == null) return@tool ToolResult.Err("nothing was recording")
|
|
1996
|
+
pending.cancel()
|
|
1997
|
+
val clip = runCatching { pending.await().valueOrNull() }.getOrNull()
|
|
1998
|
+
clip?.let { library.add(it); ToolResult.Ok("video saved") }
|
|
1999
|
+
?: ToolResult.Err("nothing was recording")
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
// ── Raw form — equivalent, for programmatic construction (tools loaded
|
|
2007
|
+
// from config, conditional registration). Customer-can-skip-it: the
|
|
2008
|
+
// trailing-lambda builder above reduces to this. ────────────────────
|
|
2009
|
+
|
|
2010
|
+
import com.extentos.glasses.core.assistant.AssistantConfig
|
|
2011
|
+
import com.extentos.glasses.core.assistant.ToolDefinition
|
|
2012
|
+
|
|
2013
|
+
suspend fun startRawForm(glasses: ExtentosGlasses) {
|
|
2014
|
+
val session = glasses.assistant.createSession(
|
|
2015
|
+
AssistantConfig(
|
|
2016
|
+
provider = AssistantProvider.OpenAi(model = "gpt-realtime", voice = "alloy"),
|
|
2017
|
+
instructions = "You are a helpful assistant.",
|
|
2018
|
+
tools = listOf(
|
|
2019
|
+
ToolDefinition("take_picture", "Take a photo when asked.") { _ ->
|
|
2020
|
+
ToolResult.Ok("photo saved")
|
|
2021
|
+
},
|
|
2022
|
+
),
|
|
2023
|
+
),
|
|
2024
|
+
)
|
|
2025
|
+
session.start()
|
|
2026
|
+
}`,
|
|
2027
|
+
swift: `import GlassesCore
|
|
2028
|
+
|
|
2029
|
+
// ── App bootstrap (do once, e.g. in App.init or DI container) ─────────
|
|
2030
|
+
//
|
|
2031
|
+
// Phase 4 is end-to-end via the provider's WebSocket — no ONNX models
|
|
2032
|
+
// to bundle, no cascaded options. glasses.assistant is always-on.
|
|
2033
|
+
// \`Extentos.create(config:)\` is synchronous + non-throwing on iOS.
|
|
2034
|
+
func makeGlasses() -> ExtentosGlasses {
|
|
2035
|
+
let glasses = Extentos.create(config: ExtentosConfig())
|
|
2036
|
+
// BYOK OpenAI key — see getCredentialGuide(service:"openai") for the
|
|
2037
|
+
// Info.plist plumbing. Key flows direct from device → api.openai.com
|
|
2038
|
+
// via WS Authorization header; Extentos backend never sees it.
|
|
2039
|
+
glasses.assistant.setOpenAiApiKey(Secrets.openAiKey)
|
|
2040
|
+
return glasses
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
// ── Handler — Strava-style example ────────────────────────────────────
|
|
2044
|
+
//
|
|
2045
|
+
// Plain final class (not @MainActor) so the @Sendable tool-body
|
|
2046
|
+
// closures can call into the handler without forcing every access
|
|
2047
|
+
// through an actor hop. State mutation (\`activeVideo\`) is single-
|
|
2048
|
+
// dispatch in practice — OpenAi + Mock providers serialize per-call_id
|
|
2049
|
+
// tool dispatch in v1.
|
|
2050
|
+
|
|
2051
|
+
final class StravaAssistantHandler: @unchecked Sendable {
|
|
2052
|
+
private let glasses: ExtentosGlasses
|
|
2053
|
+
private let routeTracker: RouteTracker // app-internal
|
|
2054
|
+
private let library: ClipLibrary // app-internal
|
|
2055
|
+
private var activeVideo: Task<VideoClip?, Never>?
|
|
2056
|
+
|
|
2057
|
+
init(glasses: ExtentosGlasses, routeTracker: RouteTracker, library: ClipLibrary) {
|
|
2058
|
+
self.glasses = glasses
|
|
2059
|
+
self.routeTracker = routeTracker
|
|
2060
|
+
self.library = library
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
func start() async throws {
|
|
2064
|
+
// Sugar form (trailing-closure builder). Returns once the session
|
|
2065
|
+
// reaches Active. Q3 asymmetry: Swift's typed-args overload
|
|
2066
|
+
// requires an explicit \`schema:\` parameter (no Mirror walk on
|
|
2067
|
+
// types — see assistant_tool capability guide).
|
|
2068
|
+
_ = try await glasses.assistant.start(
|
|
2069
|
+
provider: .openAI(model: "gpt-realtime", voice: "alloy")
|
|
2070
|
+
) { config in
|
|
2071
|
+
config.instructions = """
|
|
2072
|
+
You are a Strava companion. Help the runner with route
|
|
2073
|
+
stats and capture moments. Speak briefly — they're
|
|
2074
|
+
running. Don't narrate what you're doing — just do it.
|
|
2075
|
+
"""
|
|
2076
|
+
|
|
2077
|
+
// Read-tools
|
|
2078
|
+
config.tool("get_route_remaining", description: "How much of the planned route is left, in km.") {
|
|
2079
|
+
.ok("\\(self.routeTracker.kmRemaining()) km remaining")
|
|
2080
|
+
}
|
|
2081
|
+
config.tool("get_average_pace", description: "Current average pace in minutes per km.") {
|
|
2082
|
+
.ok("\\(self.routeTracker.avgPaceMinKm()) min per km")
|
|
2083
|
+
}
|
|
2084
|
+
config.tool("get_route_length", description: "Total planned route length in km.") {
|
|
2085
|
+
.ok("\\(self.routeTracker.totalKm) km")
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
// Action-tools — fire-and-forget via Task; stop_video cancels
|
|
2089
|
+
// the activeVideo task + reads its (possibly partial) result.
|
|
2090
|
+
// Camera's captureVideo returns \`ExtentosResult<VideoClip,
|
|
2091
|
+
// CaptureError>\` async — we extract the success branch into
|
|
2092
|
+
// an optional clip via the \`.success\` accessor.
|
|
2093
|
+
config.tool("take_video", description: "Start recording a video clip of the runner's view.") {
|
|
2094
|
+
self.activeVideo = Task {
|
|
2095
|
+
let result = await self.glasses.camera.captureVideo(
|
|
2096
|
+
VideoConfig(maxDurationSeconds: 30)
|
|
2097
|
+
)
|
|
2098
|
+
return result.success
|
|
2099
|
+
}
|
|
2100
|
+
return .ok("recording started")
|
|
2101
|
+
}
|
|
2102
|
+
config.tool("stop_video", description: "Stop the current video recording.") {
|
|
2103
|
+
// Cooperative cancellation: the camera capture finishes
|
|
2104
|
+
// its current chunk and surfaces a partial clip (or
|
|
2105
|
+
// nothing if the cancel landed before any frames).
|
|
2106
|
+
self.activeVideo?.cancel()
|
|
2107
|
+
let clip = await self.activeVideo?.value ?? nil
|
|
2108
|
+
self.activeVideo = nil
|
|
2109
|
+
if let clip {
|
|
2110
|
+
self.library.add(clip)
|
|
2111
|
+
return .ok("video saved")
|
|
2112
|
+
} else {
|
|
2113
|
+
return .err("nothing was recording")
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
// ── Raw form — equivalent, for programmatic construction ──────────────
|
|
2121
|
+
|
|
2122
|
+
func startRawForm(_ glasses: ExtentosGlasses) async throws {
|
|
2123
|
+
let session = glasses.assistant.createSession(config: AssistantConfig(
|
|
2124
|
+
provider: .openAI(model: "gpt-realtime", voice: "alloy"),
|
|
2125
|
+
instructions: "You are a helpful assistant.",
|
|
2126
|
+
tools: [
|
|
2127
|
+
ToolDefinition(name: "take_picture", description: "Take a photo when asked.") { _ in
|
|
2128
|
+
.ok("photo saved")
|
|
2129
|
+
},
|
|
2130
|
+
]
|
|
2131
|
+
))
|
|
2132
|
+
try await session.start()
|
|
2133
|
+
}`,
|
|
2134
|
+
},
|
|
2135
|
+
explanation: `AGENT-DRIVEN E2E TEST LOOP — RUN AFTER createGlasses + handler.start()
|
|
2136
|
+
|
|
2137
|
+
The headless verification: drive the assistant with synthetic utterances,
|
|
2138
|
+
assert the expected tools fire, then read the event log. Two providers
|
|
2139
|
+
satisfy the same agent loop:
|
|
2140
|
+
|
|
2141
|
+
- AssistantProvider.Mock — deterministic, sub-millisecond, $0. Word-
|
|
2142
|
+
overlap-matches the injected utterance against tool descriptions
|
|
2143
|
+
and dispatches the first match. Use for CI + tight inner loop.
|
|
2144
|
+
- AssistantProvider.OpenAi — real WebSocket to api.openai.com,
|
|
2145
|
+
real LLM picks the tool, real audio output. Use for end-to-end
|
|
2146
|
+
smoke when the sim browser tab has mic input.
|
|
2147
|
+
|
|
2148
|
+
// Mock-provider path — set useMockProvider when constructing the
|
|
2149
|
+
// handler in your dogfood / test build. Production stays on OpenAi.
|
|
2150
|
+
const { sessionId } = await createSimulatorSession({
|
|
2151
|
+
glasses: "meta_rayban", platform: "android",
|
|
2152
|
+
});
|
|
2153
|
+
// Anchor cursor BEFORE inject so a fresh log read starts at 'now'.
|
|
2154
|
+
const head = await getEventLog({ sessionId, filter: "voice", limit: 1 });
|
|
2155
|
+
let cur = head.cursor;
|
|
2156
|
+
|
|
2157
|
+
// 1. Inject the utterance. text: routes to MockAssistantProvider via
|
|
2158
|
+
// the BrowserSim raw-frame observer (S2.W.0 wiring).
|
|
2159
|
+
await injectAssistantUtterance({ sessionId, text: "take a picture" });
|
|
2160
|
+
|
|
2161
|
+
// 2. Assert the expected tool was called within the timeout.
|
|
2162
|
+
const call = await assertToolCalled({
|
|
2163
|
+
sessionId, name: "take_picture", timeoutMs: 5000,
|
|
2164
|
+
});
|
|
2165
|
+
// call.args is the parsed JsonObject from the tool's args schema
|
|
2166
|
+
// (or {} for no-arg tools); call.call_id pairs with the result event.
|
|
2167
|
+
|
|
2168
|
+
// 3. (Optional) Read the full event-log trace for assertions on the
|
|
2169
|
+
// speak transcript, the tool result, etc.
|
|
2170
|
+
const log = await getEventLog({
|
|
2171
|
+
sessionId, cursor: cur, filter: "voice",
|
|
2172
|
+
});
|
|
2173
|
+
// Expected events (in order):
|
|
2174
|
+
// assistant.user_spoke transcript="take a picture"
|
|
2175
|
+
// assistant.tool_called name="take_picture", call_id
|
|
2176
|
+
// assistant.tool_result name="take_picture", output, is_error,
|
|
2177
|
+
// duration_ms
|
|
2178
|
+
// assistant.assistant_spoke transcript="ok, take_picture" (Mock
|
|
2179
|
+
// synthesizes; OpenAi has the model
|
|
2180
|
+
// speak its own confirmation)
|
|
2181
|
+
|
|
2182
|
+
// 4. To drive a multi-utterance flow, just repeat steps 1-3 with the
|
|
2183
|
+
// next text. The session stays Active across injects until you
|
|
2184
|
+
// explicitly stop it.
|
|
2185
|
+
|
|
2186
|
+
WHAT GETS LOGGED — assistant.* event family (per synthesis #15)
|
|
2187
|
+
|
|
2188
|
+
assistant.session_started provider, model, voice
|
|
2189
|
+
assistant.session_ended reason (user / error / ceiling), message
|
|
2190
|
+
assistant.user_spoke transcript (verbatim — see PII note below)
|
|
2191
|
+
assistant.assistant_spoke transcript (verbatim)
|
|
2192
|
+
assistant.tool_called name, args (JsonObject), call_id
|
|
2193
|
+
assistant.tool_result call_id, name, output, is_error, duration_ms
|
|
2194
|
+
assistant.reconnected reason, downtime_ms (synthesis #23
|
|
2195
|
+
transparent 60-min ceiling + onFailure
|
|
2196
|
+
recovery — library hides this from
|
|
2197
|
+
customers; observable here for debugging)
|
|
2198
|
+
assistant.error kind, message (non-fatal; fatal errors
|
|
2199
|
+
emit session_ended(error))
|
|
2200
|
+
|
|
2201
|
+
PII BOUNDARY — Phase 4 differs from Phase 3 conversation.* events
|
|
2202
|
+
|
|
2203
|
+
Phase 4 assistant events DO carry verbatim transcripts in
|
|
2204
|
+
user_spoke / assistant_spoke. Phase 3 conversation.* events strip
|
|
2205
|
+
text (only text_len) because the cascaded path routed transcripts
|
|
2206
|
+
through Extentos backend. Phase 4's BYOK contract sends transcripts
|
|
2207
|
+
device → openai.com directly without touching Extentos backend, so
|
|
2208
|
+
the platform-side PII boundary that Phase 3 enforced doesn't apply.
|
|
2209
|
+
Customer apps own their data retention story.
|
|
2210
|
+
|
|
2211
|
+
FILTER QUICK REFERENCE
|
|
2212
|
+
|
|
2213
|
+
- filter: "voice" → all assistant.* events + legacy stt_/speak/
|
|
2214
|
+
audio_/tts_audio_chunk frames coexist here
|
|
2215
|
+
- filter: "errors" → assistant.error AUTOMATICALLY (the backend
|
|
2216
|
+
bumps severity to warn for this type)
|
|
2217
|
+
|
|
2218
|
+
SIMULATOR UI
|
|
2219
|
+
|
|
2220
|
+
The sim's right rail renders an AssistantPanel showing the active
|
|
2221
|
+
session's provider + model + voice + current state. Recent turns
|
|
2222
|
+
appear as colored chips (UserSpoke=sky, AssistantSpoke=emerald,
|
|
2223
|
+
ToolCalled→Result=indigo, Error=red). Open the sim browser side-by-
|
|
2224
|
+
side with this agent loop and watch the panel react.`,
|
|
2225
|
+
gotchas: [
|
|
2226
|
+
"**Anchor a cursor BEFORE the first inject.** A no-cursor getEventLog returns the tail of the log + a cursor positioned after it — that's your 'now' bookmark. Without it, a resumed sim's stale assistant.tool_called from a prior run can satisfy your assertion and you'd never know the new inject silently failed.",
|
|
2227
|
+
"**Mock provider matches utterances by word overlap (≥3 chars) against tool descriptions.** Tool descriptions whose keywords appear in your test utterances get matched; ones without don't. Write descriptions like \"Take a photo when the user asks to capture a moment\" rather than \"Captures imagery via the camera SDK\" — both the model AND the Mock matcher work better when descriptions describe WHEN to call, not what they do internally. For deterministic tests with ambiguous text, use `argsMatch` on assertToolCalled to constrain the matched call further.",
|
|
2228
|
+
"**Mock provider only attaches when transport is BrowserSim.** RealMeta + LocalSim sessions silently no-op the inject subscription (Mock is sim-only by design). To test against the OpenAi provider in sim, open the sim browser tab — its mic input flows through audio_chunks → OpenAI WebSocket → tool dispatch. injectAssistantUtterance.text: still works against Mock; for real-provider audio injection use the sim browser mic or wait for v1.1's audioWavBase64 path.",
|
|
2229
|
+
"**No ONNX models, no model paths, no conversationOptions.** Phase 4 ships zero on-device ML — the provider's WebSocket carries everything. If you're carrying old conversationOptions / ConversationModels code from Phase 3, delete it during migration (see `searchDocs(topic:'assistant_runtime')` → migration section). The deprecation warning fires on first `glasses.conversation.*` call in v1.4.0; the API is removed in v2.0.0.",
|
|
2230
|
+
"**Singleton-active sessions — synthesis #13.** At most one assistant.start at a time per ExtentosGlasses instance. A second start while one is active throws AssistantException(AlreadyActive). Call assistant.stop() (or session.stop()) before starting a new one. For v1 simplicity; can relax in v1.x if customer demand surfaces.",
|
|
2231
|
+
"**Reconnection is library-owned + transparent — synthesis #23.** OpenAI Realtime hard-caps sessions at 60 min; the library proactively reconnects every ~50 min (configurable in v1.1+). assistant.reconnected fires for observability; customer code doesn't see the swap. Conversation history is replayed (recent 40 turns) on each reconnect. Tool dispatches in flight at reconnect time are preserved.",
|
|
2232
|
+
"**Tool body runs on Dispatchers.IO (Kotlin) / Swift Task (Swift); suspending camera/storage/HTTP calls are fine.** Per-tool blocking opt-out via `tool(name, desc, blocking = true) { ... }` per synthesis #9 — when true, the model waits silently for the result before speaking. Default is non-blocking (model says \"let me check...\" while the tool runs). Use blocking=true for sub-100ms tools where the filler would be awkward (\"what time is it\" returning in 10 ms).",
|
|
2233
|
+
"**BYOK key flows direct, not via Extentos.** synthesis §12. `glasses.assistant.setOpenaiApiKey(key)` stores the key in the AssistantClient. When start() opens a WebSocket, the key goes into `Authorization: Bearer ...` for the wss://api.openai.com/v1/realtime?model=gpt-realtime connection. Extentos backend never sees the key. Test endpoint override is on the AssistantProvider.OpenAi case if you need to point at a mock OpenAI proxy.",
|
|
2234
|
+
"**`glasses.ai.complete` is deprecated in v1.4.0 and removed in v2.0.0.** Use the OpenAI SDK directly for non-voice LLM calls (image description, summarization, etc.). Migration: see `searchDocs(topic:'assistant_runtime')` → migration section walkthrough C.",
|
|
2235
|
+
],
|
|
2236
|
+
relatedFeatures: ["assistant_runtime", "assistant_start", "assistant_tool", "assistant_provider_openai", "audio_chunks", "speak"],
|
|
2237
|
+
};
|
|
1904
2238
|
export const CODE_EXAMPLES = {
|
|
1905
2239
|
voice_qa_assistant: VOICE_QA_ASSISTANT,
|
|
1906
2240
|
barge_in_speak: BARGE_IN_SPEAK,
|
|
@@ -1910,6 +2244,7 @@ export const CODE_EXAMPLES = {
|
|
|
1910
2244
|
connection_page_setup: CONNECTION_PAGE_SETUP,
|
|
1911
2245
|
byok_anthropic: BYOK_ANTHROPIC,
|
|
1912
2246
|
agent_test_loop: AGENT_TEST_LOOP,
|
|
2247
|
+
assistant_agent_loop: ASSISTANT_AGENT_LOOP,
|
|
1913
2248
|
conversation_agent_loop: CONVERSATION_AGENT_LOOP,
|
|
1914
2249
|
};
|
|
1915
2250
|
export const CODE_EXAMPLE_PATTERNS = Object.keys(CODE_EXAMPLES).sort();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeExamples.js","sourceRoot":"","sources":["../../../src/tools/data/codeExamples.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,sEAAsE;AACtE,sEAAsE;AACtE,uDAAuD;AACvD,sCAAsC;AACtC,EAAE;AACF,qEAAqE;AACrE,uDAAuD;AACvD,wEAAwE;AACxE,kEAAkE;AAClE,oEAAoE;AACpE,2DAA2D;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAuE5C,MAAM,kBAAkB,GAAgB;IACtC,OAAO,EAAE,oBAAoB;IAC7B,KAAK,EAAE,4FAA4F;IACnG,WAAW,EACT,08BAA08B;IAC58B,IAAI,EAAE;QACJ,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEV;QACE,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgET;KACC;IACD,WAAW,EACT,ggCAAggC;IAClgC,OAAO,EAAE;QACP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xM,kPAAkP;KACnP;IACD,eAAe,EAAE,CAAC,cAAc,EAAE,2BAA2B,EAAE,OAAO,EAAE,eAAe,CAAC;CACzF,CAAC;AAEF,MAAM,uBAAuB,GAAgB;IAC3C,OAAO,EAAE,yBAAyB;IAClC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"codeExamples.js","sourceRoot":"","sources":["../../../src/tools/data/codeExamples.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,sEAAsE;AACtE,sEAAsE;AACtE,uDAAuD;AACvD,sCAAsC;AACtC,EAAE;AACF,qEAAqE;AACrE,uDAAuD;AACvD,wEAAwE;AACxE,kEAAkE;AAClE,oEAAoE;AACpE,2DAA2D;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAuE5C,MAAM,kBAAkB,GAAgB;IACtC,OAAO,EAAE,oBAAoB;IAC7B,KAAK,EAAE,4FAA4F;IACnG,WAAW,EACT,08BAA08B;IAC58B,IAAI,EAAE;QACJ,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEV;QACE,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgET;KACC;IACD,WAAW,EACT,ggCAAggC;IAClgC,OAAO,EAAE;QACP,yXAAyX;QACzX,gbAAgb;QAChb,qXAAqX;QACrX,mSAAmS;QACnS,oSAAoS;QACpS,+SAA+S;QAC/S,msBAAmsB;QACnsB,sIAAsI;QACtI,+HAA+H;QAC/H,yKAAyK;QACzK,kyBAAkyB;QAClyB,0UAA0U;KAC3U;IACD,eAAe,EAAE,CAAC,eAAe,EAAE,2BAA2B,EAAE,cAAc,CAAC;CAChF,CAAC;AAEF,MAAM,cAAc,GAAgB;IAClC,OAAO,EAAE,gBAAgB;IACzB,KAAK,EAAE,gDAAgD;IACvD,WAAW,EACT,itBAA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rd,obAAob;QACpb,kQAAkQ;KACnQ;IACD,eAAe,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,cAAc,EAAE,OAAO,CAAC;CAClI,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,kBAAkB,EAAE,kBAAkB;IACtC,cAAc,EAAE,cAAc;IAC9B,oBAAoB,EAAE,oBAAoB;IAC1C,qBAAqB,EAAE,qBAAqB;IAC5C,WAAW,EAAE,WAAW;IACxB,qBAAqB,EAAE,qBAAqB;IAC5C,cAAc,EAAE,cAAc;IAC9B,eAAe,EAAE,eAAe;IAChC,oBAAoB,EAAE,oBAAoB;IAC1C,uBAAuB,EAAE,uBAAuB;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAMpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,oBAAoB,EAAE,KAAK,CAAC;KAC7B,CAAC;CACH;AAMD,eAAO,MAAM,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAMpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,oBAAoB,EAAE,KAAK,CAAC;KAC7B,CAAC;CACH;AAMD,eAAO,MAAM,eAAe,EAAE,OAAO,EA2fpC,CAAC;AAEF,eAAO,MAAM,SAAS,QAAyB,CAAC;AAShD,wBAAgB,iCAAiC,CAC/C,IAAI,GAAE,SAAS,OAAO,EAAoB,GACzC,IAAI,CAiBN"}
|
|
@@ -19,7 +19,7 @@ export const toolDefinitions = [
|
|
|
19
19
|
// --- 1. Discovery and Planning ---
|
|
20
20
|
{
|
|
21
21
|
name: "getPlatformInfo",
|
|
22
|
-
description: "Return static platform metadata: library version + the list of SDK capabilities the glasses expose. **Phase
|
|
22
|
+
description: "Return static platform metadata: library version + the list of SDK capabilities the glasses expose. **Phase 4 assistant runtime** (`glasses.assistant.start(provider) { tool(name, description) { body -> ToolResult } }`) is the canonical voice-assistant API — the model owns wake/turn-taking/intent/confirmation, the customer writes tool bodies that act on app state. The legacy Phase 3 conversation runtime (`glasses.conversation.onWake { listen() / speak() / ai.complete() }`) is DEPRECATED in v1.4.0; removed in v2.0.0. Lower-level primitives are still surfaced for fine-grained control (audio.transcriptions, audio.recordDiscrete, audio.speak, audio.audioChunks, camera.capturePhoto, camera.videoFrames, toggles, connection.state, …). The right first call for any new task — primes the agent on what primitives are available before writing handler code. **Default response is COMPACT** — capability names and categories only — keeping the typical first-call cost ~2KB. Per-feature call shape + idiom + gotchas comes from `getCapabilityGuide(feature)`; full compositional patterns (Phase 4 `assistant_agent_loop` for the canonical glasses.assistant.start loop; legacy `conversation_agent_loop` for Phase 3; `voice_qa_assistant` for the pre-Phase-3 manual composition) from `getCodeExample(pattern)`; conceptual docs from `searchDocs(topic: 'assistant_runtime')` for the Phase 4 surface, `searchDocs(topic: 'conversation_runtime')` for Phase 3, or `searchDocs(topic: 'voice_integration')` for the legacy primitives. Pass `expand: ['capabilities.full']` for the machine-readable catalog with params/payload/requires/constraints. **glasses is optional (F-R4-01)** — defaults to `meta_rayban` (the only currently supported vendor); pass it explicitly for forward compatibility once additional vendors land. USE at session start before scaffolding or writing handler code. DON'T USE for what's installed in the project (use inspectIntegration).",
|
|
23
23
|
inputSchema: {
|
|
24
24
|
type: "object",
|
|
25
25
|
properties: {
|
|
@@ -47,7 +47,7 @@ export const toolDefinitions = [
|
|
|
47
47
|
// getPlatformInfo these are how a fresh agent learns to compose the SDK.
|
|
48
48
|
{
|
|
49
49
|
name: "getCodeExample",
|
|
50
|
-
description: "Reference library — retrieve a complete SDK code example (Kotlin + Swift) for a use case. **For voice-assistant work, start with `
|
|
50
|
+
description: "Reference library — retrieve a complete SDK code example (Kotlin + Swift) for a use case. **For voice-assistant work on any new app, start with `assistant_agent_loop`** — the Phase 4 `glasses.assistant.start { tool(name, description) { body -> ToolResult } }` API where the model owns wake detection + turn taking + intent parsing + confirmation speech and the customer only writes tool bodies that act on app state. Provider abstraction wraps OpenAI Realtime in v1; Gemini Live in v1.5+. The example pairs the customer code with the agent-driven E2E loop (`injectAssistantUtterance` → `assertToolCalled`) that verifies it without humans. Customer code typically drops ~60% LoC vs the legacy Phase 3 pattern. `conversation_agent_loop` is the LEGACY Phase 3 pattern (DEPRECATED in v1.4.0; removed in v2.0.0) — kept in the catalog during the migration window. Other patterns still ship for apps that need fine-grained control: voice_qa_assistant (manual `glasses.voice.onPhrase` wake + `glasses.audio.recordDiscrete` + customer-side AnthropicClient — the pre-Phase-3 composition), barge_in_speak (manual TTS cancel on user interrupt), photo_describe_voice (wake → photo → vision LLM → speak), live_transcription_ui (transcripts into Compose/SwiftUI state), voice_notes (wake → record → persist), connection_page_setup (the minimum bootstrap wiring), byok_anthropic (Anthropic BYOK client — used by voice_qa_assistant / photo_describe_voice; for the assistant runtime's OpenAI BYOK key see `getCredentialGuide(service: 'openai')`), agent_test_loop (the legacy three-surface verification recipe — for Phase 4 use assistant_agent_loop). USE when you're about to write handler code and want the canonical shape to peel from, OR when you want the agent test driver that asserts the handler works end-to-end. DON'T USE for capability discovery (use getPlatformInfo) or per-feature minimal usage (use getCapabilityGuide).",
|
|
51
51
|
inputSchema: {
|
|
52
52
|
type: "object",
|
|
53
53
|
properties: {
|
|
@@ -62,6 +62,7 @@ export const toolDefinitions = [
|
|
|
62
62
|
"connection_page_setup",
|
|
63
63
|
"byok_anthropic",
|
|
64
64
|
"agent_test_loop",
|
|
65
|
+
"assistant_agent_loop",
|
|
65
66
|
"conversation_agent_loop",
|
|
66
67
|
],
|
|
67
68
|
description: "Which compositional pattern to fetch. Each returns full Kotlin + Swift code, an explanation, gotchas, and the SDK features it exercises.",
|
|
@@ -73,7 +74,7 @@ export const toolDefinitions = [
|
|
|
73
74
|
},
|
|
74
75
|
{
|
|
75
76
|
name: "getCapabilityGuide",
|
|
76
|
-
description: "Per-feature SDK usage guide — minimal Kotlin + Swift snippet + gotchas + which getCodeExample patterns exercise the feature. Pairs with getPlatformInfo (which lists feature names and categories) by adding the actual idiom for using each feature. Covers
|
|
77
|
+
description: "Per-feature SDK usage guide — minimal Kotlin + Swift snippet + gotchas + which getCodeExample patterns exercise the feature. Pairs with getPlatformInfo (which lists feature names and categories) by adding the actual idiom for using each feature. Covers: lower-level primitives (capture_photo / capture_video / record_audio / transcription_incremental / speak / video_frames / audio_chunks / connection_state / toggles / voice_command); the **Phase 4 assistant runtime** (assistant_runtime as the umbrella, assistant_start, assistant_tool, assistant_provider_openai) — the canonical voice-AI surface; and the **legacy Phase 3 conversation runtime** (conversation_runtime + conversation_on_wake / conversation_listen / conversation_speak / conversation_ai_complete) — DEPRECATED in v1.4.0 / REMOVED in v2.0.0, kept here for the migration window. For voice-assistant work on new apps, start with `assistant_runtime` for the overview then drill into the individual primitives. USE when you know which feature you need but don't know the canonical call shape, or when you're hitting a confusing failure (the gotchas typically cover it). DON'T USE for a complete compositional pattern (use getCodeExample) or for capability discovery (use getPlatformInfo).",
|
|
77
78
|
inputSchema: {
|
|
78
79
|
type: "object",
|
|
79
80
|
properties: {
|
|
@@ -304,6 +305,56 @@ export const toolDefinitions = [
|
|
|
304
305
|
additionalProperties: false,
|
|
305
306
|
},
|
|
306
307
|
},
|
|
308
|
+
{
|
|
309
|
+
name: "injectAssistantUtterance",
|
|
310
|
+
description: "**Phase 4** — drive an assistant turn from outside the live session for agent-driven E2E tests of `glasses.assistant.start { tool(...) { ... } }`. Sibling of `injectTranscript` scoped to the Phase 4 voice surface. v1 text path: library's active `AssistantClient` with a Mock provider routes the utterance to `MockAssistantProvider`, which word-overlap-matches against registered tool descriptions and dispatches synchronously; ms-fast, deterministic, $0. audioWavBase64 path is DEFERRED to v1.1 (needs Rust core changes, out of Sprint 1 scope) — handler returns not_implemented if passed. USE in the agent E2E loop: createSimulatorSession → injectAssistantUtterance({ text: \"take a picture\" }) → assertToolCalled({ name: \"take_picture\" }) → getEventLog(types:['assistant.*']). DON'T USE for Phase 3 `glasses.conversation.onWake { listen / speak }` flows — that's still `injectTranscript`'s domain; the two coexist until v2.0.0 retires the cascaded path.",
|
|
311
|
+
inputSchema: {
|
|
312
|
+
type: "object",
|
|
313
|
+
properties: {
|
|
314
|
+
sessionId: { type: "string", minLength: 1 },
|
|
315
|
+
text: {
|
|
316
|
+
type: "string",
|
|
317
|
+
minLength: 1,
|
|
318
|
+
description: "Utterance text for the Mock-provider path. The library's MockAssistantProvider word-overlap-matches this against each registered tool's description (case-insensitive, tokens ≥ 3 chars, first match wins) — write tool descriptions so the keywords your test utterance contains overlap, e.g. tool description \"Take a photo with the glasses camera\" matches text \"take a photo\". For OpenAi/Gemini provider sessions, the text is forwarded but those providers ignore it (they consume audio); use audioWavBase64 instead.",
|
|
319
|
+
},
|
|
320
|
+
audioWavBase64: {
|
|
321
|
+
type: "string",
|
|
322
|
+
minLength: 1,
|
|
323
|
+
description: "DEFERRED to v1.1 — passing this field returns `not_implemented`. The intended path: base64-encoded WAV (8 kHz mono i16 LE PCM); library decodes and feeds through audio_chunks Flow to the active real provider. Needs a Rust core extension that Sprint 1's machine-split deliberately avoids. For end-to-end real-provider validation in the meantime, run the OpenAi provider session with a real mic source (sim browser tab mic, or real glasses).",
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
required: ["sessionId"],
|
|
327
|
+
additionalProperties: false,
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "assertToolCalled",
|
|
332
|
+
description: "**Phase 4** — wait for `assistant.tool_called` event matching `name` (and optionally `argsMatch` partial-match). Polls the backend event log every ~200ms until match or timeout. Equivalent to `getEventLog({ types: ['assistant.tool_called'], filter: { name }, timeoutMs })` in an assertion shape — returns the matched event payload directly + errors with `tool_not_called` code on timeout. USE in the agent E2E loop after `injectAssistantUtterance` to verify the expected tool fired. DON'T USE to inspect the full event trace (use `getEventLog`) or to check static tool registration (use `inspectIntegration`).",
|
|
333
|
+
inputSchema: {
|
|
334
|
+
type: "object",
|
|
335
|
+
properties: {
|
|
336
|
+
sessionId: { type: "string", minLength: 1 },
|
|
337
|
+
name: {
|
|
338
|
+
type: "string",
|
|
339
|
+
minLength: 1,
|
|
340
|
+
description: "Exact tool name to wait for. Must match the `name` argument passed to `tool(name, description) { ... }` in the customer's glasses.assistant.start { } block.",
|
|
341
|
+
},
|
|
342
|
+
argsMatch: {
|
|
343
|
+
type: "object",
|
|
344
|
+
description: "Optional top-level partial match against the tool's parsed args. All keys in argsMatch must be present in the call's args with equal scalar values; nested objects compared structurally. v1 ships top-level partial-match only — nested glob patterns deferred. Omit for any-args match.",
|
|
345
|
+
additionalProperties: true,
|
|
346
|
+
},
|
|
347
|
+
timeoutMs: {
|
|
348
|
+
type: "number",
|
|
349
|
+
minimum: 250,
|
|
350
|
+
maximum: 60000,
|
|
351
|
+
description: "Max time to wait, in ms. Default 5000. Clamped to [250, 60000]. The Mock provider dispatches in <50ms so 5000 is generous; OpenAi provider dispatches in 500-1500ms post-utterance.",
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
required: ["sessionId", "name"],
|
|
355
|
+
additionalProperties: false,
|
|
356
|
+
},
|
|
357
|
+
},
|
|
307
358
|
{
|
|
308
359
|
name: "getSimulatorStatus",
|
|
309
360
|
description: "Read a live simulator session's current state — phase (active/paused/closed), hardware-ready, attached roles (app + browser), active capability streams (which `videoFrames`/`audioChunks`/`transcriptions` subscriptions are open right now), current toggle values, and the **testVideos** list available to drive `setSimVideo` (defaults bundled with the platform plus any MP4s uploaded for this project on the simulator page). Session-level snapshot only. USE during testing to confirm a stream is open, a toggle is set, the session is healthy, the app role has attached, or to discover which test videos you can pipe into capture_photo/capture_video. DON'T USE for event traces (use getEventLog).",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,EAAE;AACF,iFAAiF;AACjF,uEAAuE;AACvE,6EAA6E;AAC7E,gFAAgF;AAChF,yEAAyE;AACzE,iFAAiF;AACjF,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,yEAAyE;AAEzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAkBzE,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,QAAiB,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;AAC3E,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,QAAiB,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;AACvE,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,QAAiB,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,CAAC;AAEtF,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,oCAAoC;IACpC;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"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AC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC1C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,iCAAiC,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/docs/index.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AA2LD,eAAO,MAAM,SAAS,EAAE,QAAQ,EA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/docs/index.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AA2LD,eAAO,MAAM,SAAS,EAAE,QAAQ,EA+lC/B,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,CAuB/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,WAAW,GAAE,MAAU,EACvB,eAAe,GAAE,MAAY,GAC5B,MAAM,EAAE,CAmBV"}
|