@extentos/mcp-server 0.0.79 → 0.0.81

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 (47) hide show
  1. package/dist/cli/setup.d.ts.map +1 -1
  2. package/dist/cli/setup.js +47 -17
  3. package/dist/cli/setup.js.map +1 -1
  4. package/dist/tools/data/capabilities.d.ts +30 -11
  5. package/dist/tools/data/capabilities.d.ts.map +1 -1
  6. package/dist/tools/data/capabilities.js +31 -12
  7. package/dist/tools/data/capabilities.js.map +1 -1
  8. package/dist/tools/data/capabilityPatterns.d.ts.map +1 -1
  9. package/dist/tools/data/capabilityPatterns.js +137 -0
  10. package/dist/tools/data/capabilityPatterns.js.map +1 -1
  11. package/dist/tools/data/codeExamples.d.ts.map +1 -1
  12. package/dist/tools/data/codeExamples.js +268 -12
  13. package/dist/tools/data/codeExamples.js.map +1 -1
  14. package/dist/tools/data/version.js +7 -7
  15. package/dist/tools/definitions.d.ts.map +1 -1
  16. package/dist/tools/definitions.js +48 -14
  17. package/dist/tools/definitions.js.map +1 -1
  18. package/dist/tools/docs/index.d.ts +12 -0
  19. package/dist/tools/docs/index.d.ts.map +1 -1
  20. package/dist/tools/docs/index.js +127 -1
  21. package/dist/tools/docs/index.js.map +1 -1
  22. package/dist/tools/handlers/createSimulatorSession.d.ts.map +1 -1
  23. package/dist/tools/handlers/createSimulatorSession.js +24 -3
  24. package/dist/tools/handlers/createSimulatorSession.js.map +1 -1
  25. package/dist/tools/handlers/getPlatformInfo.d.ts.map +1 -1
  26. package/dist/tools/handlers/getPlatformInfo.js +8 -8
  27. package/dist/tools/handlers/getPlatformInfo.js.map +1 -1
  28. package/dist/tools/handlers/getSimulatorStatus.d.ts.map +1 -1
  29. package/dist/tools/handlers/getSimulatorStatus.js +37 -2
  30. package/dist/tools/handlers/getSimulatorStatus.js.map +1 -1
  31. package/dist/tools/handlers/injectTranscript.d.ts +3 -0
  32. package/dist/tools/handlers/injectTranscript.d.ts.map +1 -0
  33. package/dist/tools/handlers/injectTranscript.js +89 -0
  34. package/dist/tools/handlers/injectTranscript.js.map +1 -0
  35. package/dist/tools/handlers/searchDocs.d.ts.map +1 -1
  36. package/dist/tools/handlers/searchDocs.js +36 -11
  37. package/dist/tools/handlers/searchDocs.js.map +1 -1
  38. package/dist/tools/handlers/validateIntegration.d.ts.map +1 -1
  39. package/dist/tools/handlers/validateIntegration.js +74 -15
  40. package/dist/tools/handlers/validateIntegration.js.map +1 -1
  41. package/dist/tools/registry.d.ts.map +1 -1
  42. package/dist/tools/registry.js +2 -0
  43. package/dist/tools/registry.js.map +1 -1
  44. package/dist/tools/util/permissions.d.ts.map +1 -1
  45. package/dist/tools/util/permissions.js +70 -30
  46. package/dist/tools/util/permissions.js.map +1 -1
  47. package/package.json +1 -1
@@ -64,9 +64,15 @@ class CoachHandler(
64
64
  // going to help?). Compile-time exhaustive \`when\` makes
65
65
  // adding a new variant break every caller until they
66
66
  // handle it explicitly.
67
+ // workouts.systemPrompt() flattens the customer's data layer
68
+ // into a grounding-context string (today's date, recent N
69
+ // sets formatted compactly, etc.) — fed via Anthropic's
70
+ // system-prompt slot so the coach references real records,
71
+ // not generic advice. The customer owns the format and the
72
+ // method name; the contract is "returns a String."
67
73
  val spoken = when (val r = anthropic.ask(
68
74
  question = question,
69
- workoutHistory = workouts.recent(),
75
+ system = workouts.systemPrompt(),
70
76
  )) {
71
77
  is LlmResult.Ok -> r.text
72
78
  LlmResult.AuthFailure -> "Your Anthropic key isn't set up — add it to local.properties and rebuild."
@@ -125,8 +131,14 @@ class CoachHandler(
125
131
  // them into one "try again" line confuses users and the
126
132
  // debugging agent. Exhaustive switch breaks compilation if a
127
133
  // new variant is added — that's the point.
134
+ // workouts.systemPrompt() flattens the customer's data layer
135
+ // into a grounding-context string (today's date, recent N sets
136
+ // formatted compactly, etc.) — fed via Anthropic's system-prompt
137
+ // slot so the coach references real records, not generic advice.
138
+ // The customer owns the format and the method name; the contract
139
+ // is "returns a String."
128
140
  let spoken: String
129
- switch await anthropic.ask(question: question, workoutHistory: workouts.recent()) {
141
+ switch await anthropic.ask(question: question, system: workouts.systemPrompt()) {
130
142
  case .ok(let text): spoken = text
131
143
  case .authFailure: spoken = "Your Anthropic key isn't set up — check Info.plist."
132
144
  case .connectivity: spoken = "I can't reach the network. Check your connection."
@@ -153,7 +165,7 @@ class CoachHandler(
153
165
  "Don't subscribe to transcriptions() inside the while-loop — that creates a new recognizer per turn. Subscribe once outside the loop.",
154
166
  "speak() blocks until done by default. If you want speak + listen-for-barge-in simultaneously, see the barge_in_speak pattern.",
155
167
  "BuildConfig API-key fields don't reflect rotations because kotlinc inlines them at compile time. Use resValue / R.string.X for Android secrets. See getCredentialGuide.",
156
- "AnthropicClient is a USER-PROVIDED stub there's no first-party Anthropic Kotlin SDK. Use getCodeExample('byok_anthropic') for a paste-ready minimal OkHttp / URLSession wrapper around POST /v1/messages, and getCredentialGuide('anthropic') for the key-storage pattern. WorkoutRepository is your app's existing data layerswap in whatever shape your app uses.",
168
+ "AnthropicClient is the CANONICAL paste-ready client from getCodeExample('byok_anthropic') composes here unchanged. The `ask(question, history, system)` signature in byok_anthropic accepts the `system =` parameter this example passes; no signature reconciliation needed. WorkoutRepository is YOUR app's data layer; the example calls `workouts.systemPrompt(): String` which returns the grounding-context block (today's date, recent N sets formatted compactly) that gets fed via Anthropic's `system` slot so the coach's answers reference real records instead of generic advice. The contract is: returns a String. Name + format are yours Room + a custom flattener, DataStore + a JSON-to-prose converter, anything. F-R5-01 — previously the two examples used different `ask()` shapes; now they compose.",
157
169
  "ask() returns LlmResult — 6 variants: Ok / AuthFailure / Connectivity / Transient / ClientBug / Empty. Pattern-match each into a distinct spoken line. R2 F-R2-10 + R3 F-R3-10: collapsing them obscures both the user's remediation (was it wifi? key? AI?) and the debugging agent's signal (was a retry going to help?).",
158
170
  ],
159
171
  relatedFeatures: ["voice_command", "transcription_incremental", "record_audio"],
@@ -596,7 +608,7 @@ struct ContentView: View {
596
608
  const BYOK_ANTHROPIC = {
597
609
  pattern: "byok_anthropic",
598
610
  title: "BYOK Anthropic Claude API client (text + Vision, OkHttp / URLSession, with retry + observability)",
599
- description: "Minimal AnthropicClient that voice_qa_assistant and photo_describe_voice reference. Two methods: `ask(question, history)` for text-only Q&A, `describe(imageBase64, mediaType, prompt)` for Claude Vision (image content blocks). There is no first-party Anthropic Kotlin SDK; this is the canonical OkHttp + kotlinx.serialization wrapper around POST /v1/messages. iOS uses URLSession + Codable. Returns LlmResult (Ok / AuthFailure / Connectivity / Transient / ClientBug / Empty) — distinct failure variants for distinct user-facing remediations. Built-in retry-with-backoff (200ms / 800ms / 3.2s, 3 attempts) for Transient (429 + 5xx) and Connectivity (IOException) failures so most upstream blips never reach the caller. Optional `observability: glasses.observability` wiring — pass it and every call surfaces under getEventLog's 'ai' filter chip. Paste, then wire the API key through resValue (Android) / Info.plist (iOS) per getCredentialGuide.",
611
+ description: "Minimal AnthropicClient that voice_qa_assistant and photo_describe_voice reference. Two methods: `ask(question, history, system)` for text-only Q&A — the `system` parameter is Anthropic's system-prompt slot, where you feed grounding context (a flattened representation of your app's data, today's date, role instructions) so the AI's answers derive from real records rather than generic prose — and `describe(imageBase64, mediaType, prompt, system)` for Claude Vision (image content blocks). There is no first-party Anthropic Kotlin SDK; this is the canonical OkHttp + kotlinx.serialization wrapper around POST /v1/messages. iOS uses URLSession + Codable. Returns LlmResult (Ok / AuthFailure / Connectivity / Transient / ClientBug / Empty) — distinct failure variants for distinct user-facing remediations. Built-in retry-with-backoff (200ms / 800ms / 3.2s, 3 attempts) for Transient (429 + 5xx) and Connectivity (IOException) failures so most upstream blips never reach the caller. Optional `observability: glasses.observability` wiring — pass it and every call surfaces under getEventLog's 'ai' filter chip. Paste, then wire the API key through resValue (Android) / Info.plist (iOS) per getCredentialGuide. F-R5-01 — ask() exposes `system` so voice_qa_assistant composes against this client unchanged.",
600
612
  code: {
601
613
  kotlin: `import com.extentos.glasses.core.ObservabilityClient
602
614
  import java.io.IOException
@@ -723,8 +735,19 @@ class AnthropicClient(
723
735
  // ---- Public API ----
724
736
 
725
737
  /** Text-only Q&A. Anthropic's content field accepts either a bare String or a
726
- * list of ContentBlock; we use the list shape so this client can also do Vision. */
727
- suspend fun ask(question: String, history: List<String> = emptyList()): LlmResult =
738
+ * list of ContentBlock; we use the list shape so this client can also do Vision.
739
+ *
740
+ * \`history\` is prior user turns concatenated as user messages — useful for
741
+ * short multi-turn loops where the user's earlier questions matter.
742
+ * \`system\` is Anthropic's system-prompt slot — feed grounding context
743
+ * here (a flattened view of your app's data, today's date, role
744
+ * instructions) so the AI's answers reference real records instead of
745
+ * generic advice. F-R5-01 — composes with voice_qa_assistant unchanged. */
746
+ suspend fun ask(
747
+ question: String,
748
+ history: List<String> = emptyList(),
749
+ system: String? = null,
750
+ ): LlmResult =
728
751
  wrap("anthropic.ask") {
729
752
  post(
730
753
  messages = buildList {
@@ -733,6 +756,7 @@ class AnthropicClient(
733
756
  }
734
757
  add(Message("user", listOf(ContentBlock.Text(question))))
735
758
  },
759
+ system = system,
736
760
  )
737
761
  }
738
762
 
@@ -877,8 +901,11 @@ class AnthropicClient(
877
901
  // observability = glasses.observability, // surfaces in getEventLog "ai" chip
878
902
  // )
879
903
  //
880
- // // text:
881
- // val spoken = when (val r = anthropic.ask("How many bench reps today?")) {
904
+ // // text — grounded in your app's data via the system slot:
905
+ // val spoken = when (val r = anthropic.ask(
906
+ // question = "How many bench reps did I do this week?",
907
+ // system = workoutRepo.systemPrompt(), // your app's grounding context
908
+ // )) {
882
909
  // is LlmResult.Ok -> r.text
883
910
  // LlmResult.AuthFailure -> "Your Anthropic key isn't set up — add it to local.properties and rebuild."
884
911
  // LlmResult.Connectivity -> "I can't reach the network. Check your connection."
@@ -1006,13 +1033,24 @@ actor AnthropicClient {
1006
1033
  // ---- Public API ----
1007
1034
 
1008
1035
  /// Text-only Q&A. Non-throwing: any error becomes an LlmResult case.
1009
- func ask(question: String, history: [String] = []) async -> LlmResult {
1036
+ ///
1037
+ /// \`history\` is prior user turns concatenated as user messages — useful
1038
+ /// for short multi-turn loops where earlier questions matter.
1039
+ /// \`system\` is Anthropic's system-prompt slot — feed grounding context
1040
+ /// here (today's date, a flattened view of your app's data, role
1041
+ /// instructions) so answers reference real records instead of generic
1042
+ /// advice. F-R5-01 — composes with voice_qa_assistant unchanged.
1043
+ func ask(
1044
+ question: String,
1045
+ history: [String] = [],
1046
+ system: String? = nil
1047
+ ) async -> LlmResult {
1010
1048
  var messages = history.map {
1011
1049
  Message(role: "user", content: [.text($0)])
1012
1050
  }
1013
1051
  messages.append(Message(role: "user", content: [.text(question)]))
1014
1052
  return await wrap(label: "anthropic.ask") {
1015
- await post(messages: messages, system: nil)
1053
+ await post(messages: messages, system: system)
1016
1054
  }
1017
1055
  }
1018
1056
 
@@ -1152,9 +1190,12 @@ actor AnthropicClient {
1152
1190
  // observability: glasses.observability // surfaces in getEventLog "ai" chip
1153
1191
  // )
1154
1192
  //
1155
- // // text:
1193
+ // // text — grounded in your app's data via the system slot:
1156
1194
  // let spoken: String
1157
- // switch await anthropic.ask(question: "How many bench reps today?") {
1195
+ // switch await anthropic.ask(
1196
+ // question: "How many bench reps did I do this week?",
1197
+ // system: workoutRepo.systemPrompt() // your app's grounding context
1198
+ // ) {
1158
1199
  // case .ok(let text): spoken = text
1159
1200
  // case .authFailure: spoken = "Your Anthropic key isn't set up — check Info.plist."
1160
1201
  // case .connectivity: spoken = "I can't reach the network. Check your connection."
@@ -1186,6 +1227,7 @@ actor AnthropicClient {
1186
1227
  "Vision content-block shape: each user message's `content` is a LIST of blocks. Image block: `{ type: \"image\", source: { type: \"base64\", media_type, data } }`. Text block: `{ type: \"text\", text }`. Image first, then text prompt — Claude reads them in order. media_type must match what Photos.mediaTypeFromUri returned (image/jpeg, image/png, image/webp).",
1187
1228
  "max_tokens defaults to 1024 here — bump for longer answers, but the glasses TTS engine will speak whatever comes back, so consider trimming on your side before speak() rather than asking for unbounded length. For Vision specifically, 256 is often plenty (you typically want a short action: hit / stand / split, not paragraphs).",
1188
1229
  "history is a list of prior user turns. For real multi-turn you'll likely want to interleave 'user' and 'assistant' roles — extend the schema's role enum and pass alternating turns.",
1230
+ "`system` vs `history` — both feed information into the prompt, but they serve different roles. `system` is Anthropic's system-prompt slot: stable grounding context that applies to EVERY turn (today's date, a flattened view of your app's data, role instructions like \"be brief, you're a fitness coach\"). `history` is a list of prior USER utterances concatenated into the messages array; useful for short multi-turn loops where what the user just said matters to the next answer. Rule of thumb: data → `system`; conversation continuity → `history`. The voice_qa_assistant pattern passes workout records via `system` so the coach grounds in real numbers across every turn, even when `history` is empty.",
1189
1231
  "OkHttp's .execute() blocks the calling thread — wrapping in withContext(Dispatchers.IO) keeps it off the main dispatcher. Don't call ask() / describe() from the UI thread directly.",
1190
1232
  "Vision LLM response p95 is 2-8 seconds. Play an earcon (`glasses.audio.earcon(EarconSound.START)`) BEFORE the call so the user knows the request fired. The retry-with-backoff loop adds up to ~4.2s in the worst-case Transient path, so plan UX timing accordingly (or lower maxAttempts).",
1191
1233
  "LlmResult has 6 variants — Ok / AuthFailure / Connectivity / Transient / ClientBug / Empty. Each has a distinct user-facing message; don't collapse them. The compile-time exhaustive `when` (Kotlin) / `switch` (Swift) makes the requirement explicit — adding a new variant breaks every caller until they handle it. Don't try/catch around the call; the sealed type IS the error channel.",
@@ -1230,6 +1272,219 @@ actor AnthropicClient {
1230
1272
  ],
1231
1273
  },
1232
1274
  };
1275
+ const AGENT_TEST_LOOP = {
1276
+ pattern: "agent_test_loop",
1277
+ title: "Agent-driven E2E test loop (dual-layer assertion)",
1278
+ description: "How an AI coding agent verifies its own generated handler end-to-end from the same MCP session that scaffolded it — no human in the loop. Pairs the canonical `voice_qa_assistant` handler with a test driver that asserts against THREE independent surfaces: the simulator event log (`getEventLog`), the emulator's persisted state (Room / SQLite via `adb run-as`), and the rendered UI (`adb screencap`). When all three agree, the flow really worked — not just at the protocol layer. See `searchDocs(topic: 'agent_e2e_testing')` for the conceptual framing.",
1279
+ code: {
1280
+ kotlin: `// HANDLER UNDER TEST — the agent writes this against the SDK.
1281
+ // Two assertion-relevant points marked **ASSERT** in comments below.
1282
+ import com.extentos.glasses.core.AudioRecordConfig
1283
+ import com.extentos.glasses.core.ExtentosGlasses
1284
+ import com.extentos.glasses.core.Transcript
1285
+ import com.extentos.glasses.core.valueOrNull
1286
+ import kotlinx.coroutines.flow.filterIsInstance
1287
+ import kotlinx.coroutines.flow.first
1288
+
1289
+ @Entity(tableName = "coaching_turns")
1290
+ data class CoachingTurn(
1291
+ @PrimaryKey(autoGenerate = true) val id: Long = 0,
1292
+ val sessionId: String,
1293
+ val role: String, // "user" or "assistant"
1294
+ val text: String,
1295
+ val createdAt: Long = System.currentTimeMillis(),
1296
+ )
1297
+
1298
+ @Dao
1299
+ interface CoachingTurnDao {
1300
+ @Insert suspend fun insert(turn: CoachingTurn)
1301
+ @Query("SELECT * FROM coaching_turns ORDER BY id") suspend fun all(): List<CoachingTurn>
1302
+ }
1303
+
1304
+ class CoachHandler(
1305
+ private val glasses: ExtentosGlasses,
1306
+ private val anthropic: AnthropicClient,
1307
+ private val dao: CoachingTurnDao,
1308
+ ) {
1309
+ private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
1310
+
1311
+ fun start() = scope.launch {
1312
+ glasses.audio.transcriptions().filterIsInstance<Transcript.Final>().collect { t ->
1313
+ if (!t.text.lowercase().contains("ask my coach")) return@collect
1314
+ handleWake()
1315
+ }
1316
+ }
1317
+
1318
+ private suspend fun handleWake() {
1319
+ val sessionId = UUID.randomUUID().toString()
1320
+ glasses.audio.speak("Yes coach?", SpeakConfig())
1321
+
1322
+ // **ASSERT POINT 1** — handler enters recordDiscrete; agent's
1323
+ // injectTranscript will satisfy this via the F-R5-03 race fix.
1324
+ val recording = glasses.audio.recordDiscrete(AudioRecordConfig(silenceTimeoutSeconds = 2.0)).valueOrNull()
1325
+ ?: return
1326
+ if (recording.transcript.isBlank()) return
1327
+
1328
+ // **ASSERT POINT 2** — user turn persisted BEFORE the LLM call.
1329
+ // Agent's DB-read assertion reads this row.
1330
+ dao.insert(CoachingTurn(sessionId = sessionId, role = "user", text = recording.transcript))
1331
+
1332
+ val answer = glasses.observability.aiCall("coach_q", mapOf("session" to sessionId)) {
1333
+ anthropic.complete(recording.transcript)
1334
+ }
1335
+
1336
+ // **ASSERT POINT 3** — assistant turn persisted AFTER the LLM call.
1337
+ // Agent asserts the row exists with the answer text.
1338
+ dao.insert(CoachingTurn(sessionId = sessionId, role = "assistant", text = answer))
1339
+
1340
+ glasses.audio.speak(answer, SpeakConfig())
1341
+ }
1342
+ }`,
1343
+ swift: `// HANDLER UNDER TEST — the agent writes this against the SDK.
1344
+ // Three assertion-relevant points marked **ASSERT** in comments below.
1345
+ import Extentos
1346
+ import GRDB // or Core Data; this example uses GRDB for sqlite-readable schema
1347
+
1348
+ struct CoachingTurn: Codable, FetchableRecord, PersistableRecord {
1349
+ var id: Int64?
1350
+ var sessionId: String
1351
+ var role: String // "user" or "assistant"
1352
+ var text: String
1353
+ var createdAt: Date
1354
+ }
1355
+
1356
+ actor CoachHandler {
1357
+ let glasses: Extentos
1358
+ let anthropic: AnthropicClient
1359
+ let db: DatabaseQueue
1360
+
1361
+ func start() async {
1362
+ for await transcript in glasses.audio.transcriptions() {
1363
+ guard case .final(let t) = transcript,
1364
+ t.text.lowercased().contains("ask my coach") else { continue }
1365
+ await handleWake()
1366
+ }
1367
+ }
1368
+
1369
+ func handleWake() async {
1370
+ let sessionId = UUID().uuidString
1371
+ _ = await glasses.audio.speak("Yes coach?", config: SpeakConfig())
1372
+
1373
+ // **ASSERT POINT 1** — handler enters recordDiscrete; agent's
1374
+ // injectTranscript satisfies this via the F-R5-03 race fix on iOS.
1375
+ guard case .success(let rec) = await glasses.audio.recordDiscrete(
1376
+ config: AudioRecordConfig(silenceTimeoutSeconds: 2.0)
1377
+ ), !rec.transcript.isEmpty else { return }
1378
+
1379
+ // **ASSERT POINT 2** — user turn persisted BEFORE the LLM call.
1380
+ try? await db.write { db in
1381
+ try CoachingTurn(sessionId: sessionId, role: "user",
1382
+ text: rec.transcript, createdAt: Date()).insert(db)
1383
+ }
1384
+
1385
+ let answer = try? await glasses.observability.aiCall(label: "coach_q",
1386
+ metadata: ["session": sessionId]) {
1387
+ try await anthropic.complete(rec.transcript)
1388
+ }
1389
+ guard let answer else { return }
1390
+
1391
+ // **ASSERT POINT 3** — assistant turn persisted AFTER the LLM call.
1392
+ try? await db.write { db in
1393
+ try CoachingTurn(sessionId: sessionId, role: "assistant",
1394
+ text: answer, createdAt: Date()).insert(db)
1395
+ }
1396
+
1397
+ _ = await glasses.audio.speak(answer, config: SpeakConfig())
1398
+ }
1399
+ }`,
1400
+ },
1401
+ explanation: `THE AGENT-SIDE TEST LOOP (run from the MCP session after the handler is installed)
1402
+
1403
+ The handler above writes to Room/GRDB and calls the LLM via observability.aiCall. That gives the agent three independent surfaces to assert against:
1404
+
1405
+ 1. Protocol activity → \`getEventLog\` (sees stt_transcript, record_audio, record_audio_returned, ai_call_start, ai_call_end, speak, speak_completed)
1406
+ 2. Persisted state → \`adb exec-out run-as <pkg> cat databases/<name>.db*\` + \`sqlite3\` (sees the coaching_turns rows)
1407
+ 3. Rendered UI → \`adb exec-out screencap -p\` (sees what the user sees)
1408
+
1409
+ CANONICAL DRIVER (run after \`./gradlew :app:installDebug && adb shell am start ...\`):
1410
+
1411
+ // 0. Confirm the install is attached to the sim.
1412
+ await getSimulatorStatus({ sessionId });
1413
+ // → connectedRoles should include "app"; hardwareReady: true.
1414
+ // If not: the app didn't bind. adb shell am force-stop <pkg>; relaunch.
1415
+
1416
+ // 1. Drive the wake.
1417
+ await injectTranscript({ sessionId, text: "ask my coach", isFinal: true });
1418
+
1419
+ // 2. Wait for the handler to enter recordDiscrete. Poll the event log
1420
+ // until a record_audio request frame appears — that's proof the
1421
+ // handler's recordDiscrete is subscribed and ready for the question.
1422
+ // Without this poll, a fast follow-up inject can race past the
1423
+ // subscriber and only reach the wake matcher.
1424
+ let log = await getEventLog({ sessionId, filter: "voice", limit: 50 });
1425
+ while (!log.events.some(e => e.type === "record_audio")) {
1426
+ await sleep(200);
1427
+ log = await getEventLog({ sessionId, filter: "voice", limit: 50, since: log.lastTs });
1428
+ }
1429
+
1430
+ // 3. Inject the question. The F-R5-03 race fix routes this directly
1431
+ // into the pending recordDiscrete — no visible browser tab needed.
1432
+ await injectTranscript({ sessionId, text: "what was my max bench press last week", isFinal: true });
1433
+
1434
+ // 4. Wait for the speak completion. Same polling shape.
1435
+ log = await getEventLog({ sessionId, filter: "voice", limit: 100 });
1436
+ while (!log.events.some(e => e.type === "speak_completed")) {
1437
+ await sleep(500);
1438
+ log = await getEventLog({ sessionId, filter: "voice", limit: 100, since: log.lastTs });
1439
+ }
1440
+
1441
+ // 5. THREE-SURFACE ASSERTION ─────────────────────────────────────────────
1442
+
1443
+ // Surface A: protocol log.
1444
+ // Assert record_audio_returned arrived with via="transcript_injection"
1445
+ // (proves the agent's inject won the race) and success=true.
1446
+ const aiCall = log.events.find(e => e.type === "ai_call_end");
1447
+ const recDone = log.events.find(e => e.type === "record_audio_returned");
1448
+ assert(recDone?.details?.via === "transcript_injection");
1449
+ assert(recDone?.details?.success === true);
1450
+ assert(aiCall?.details?.success === true);
1451
+
1452
+ // Surface B: persisted state. Pull all three SQLite files (the WAL
1453
+ // is mandatory — without it the file looks empty even after writes).
1454
+ await sh(\`adb exec-out run-as <pkg> cat databases/coach.db > local.db\`);
1455
+ await sh(\`adb exec-out run-as <pkg> cat databases/coach.db-wal > local.db-wal\`);
1456
+ await sh(\`adb exec-out run-as <pkg> cat databases/coach.db-shm > local.db-shm\`);
1457
+ const rows = await sh(
1458
+ \`$ANDROID_HOME/platform-tools/sqlite3.exe -header -column local.db \` +
1459
+ \`"SELECT role, text FROM coaching_turns ORDER BY id DESC LIMIT 2;"\`
1460
+ );
1461
+ assert(rows.includes("assistant")); // assistant turn was written
1462
+ assert(rows.includes("max bench")); // user's question was persisted
1463
+
1464
+ // Surface C: rendered screen. Confirms the UI observes the new state.
1465
+ await sh(\`adb exec-out screencap -p > screen.png\`);
1466
+ // Then Read the PNG path — agent sees the Today screen showing the new
1467
+ // exchange. Visual confirmation the user would have if they were holding
1468
+ // the phone.
1469
+
1470
+ When all three agree, the flow really happened end-to-end. When they diverge:
1471
+
1472
+ - Surface A passes, Surface B empty → persistence bug. The model returned text but the handler dropped it before insert.
1473
+ - Surface B has the row, Surface A missing speak_completed → output regression. Persisted but never spoken.
1474
+ - Surface A + B agree, Surface C unchanged → UI binding bug. State updated but the screen didn't recompose.
1475
+
1476
+ Each disagreement points to a specific layer of the handler to fix. With only Surface A, half these failures look identical.`,
1477
+ gotchas: [
1478
+ "**WAL caveat (Android Room).** Room writes in WAL mode by default. Pulling only the .db file gives a stale snapshot — recent writes live in .db-wal. Always pull .db + .db-wal + .db-shm together; the agent's first DB-read returning zero rows almost always means missing .db-wal.",
1479
+ "**Poll-before-inject for multi-turn.** Between the wake inject and the question inject, poll getEventLog until a `record_audio` request frame appears. Otherwise the second inject can land before the handler subscribes and only the wake matcher sees it.",
1480
+ "**hardwareReady requires the browser tab to load once.** Even with autoOpenBrowser: false, the simulator browser must be reached at least once for hardwareReady to flip to true. After that the sim persists. A future headless-surrogate mode would close this; not built yet.",
1481
+ "**adb on the same machine as the emulator.** This recipe needs adb where the agent runs. Cloud-hosted / headless agents can do Surface A but not B or C. A future `getAppState(sessionId, probe)` MCP tool routed through the local MCP bridge would lift this restriction.",
1482
+ "**Read record_audio_returned's `via` field.** Three values: \"transcript_injection\" (your inject won), \"browser_surrogate\" (the browser tab responded — unexpected in a headless agent loop), \"timeout\" (neither path resolved). Anything other than \"transcript_injection\" in an agent test is a signal to investigate.",
1483
+ "**BYOK keys inherit from local.properties / Info.plist.** The agent's installed APK picks up the dev's existing Anthropic key automatically; no per-test wiring. See searchDocs(topic: 'credentials').",
1484
+ "**Don't mint a fresh sim per test.** createSimulatorSession is get-or-create — the same sim resumes across test runs. Use resetFresh: true ONLY when you need a clean event-log slate; otherwise rebuild + reinstall and the library reattaches.",
1485
+ ],
1486
+ relatedFeatures: ["record_audio", "transcription_incremental", "speak", "voice_command"],
1487
+ };
1233
1488
  export const CODE_EXAMPLES = {
1234
1489
  voice_qa_assistant: VOICE_QA_ASSISTANT,
1235
1490
  barge_in_speak: BARGE_IN_SPEAK,
@@ -1238,6 +1493,7 @@ export const CODE_EXAMPLES = {
1238
1493
  voice_notes: VOICE_NOTES,
1239
1494
  connection_page_setup: CONNECTION_PAGE_SETUP,
1240
1495
  byok_anthropic: BYOK_ANTHROPIC,
1496
+ agent_test_loop: AGENT_TEST_LOOP,
1241
1497
  };
1242
1498
  export const CODE_EXAMPLE_PATTERNS = Object.keys(CODE_EXAMPLES).sort();
1243
1499
  //# sourceMappingURL=codeExamples.js.map
@@ -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,qDAAqD;IAC5D,WAAW,EACT,kSAAkS;IACpS,IAAI,EAAE;QACJ,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEV;QACE,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDT;KACC;IACD,WAAW,EACT,ggCAAggC;IAClgC,OAAO,EAAE;QACP,yXAAyX;QACzX,gbAAgb;QAChb,qXAAqX;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;QACjU,wMAAwM;QACxM,kPAAkP;KACnP;IACD,eAAe,EAAE,CAAC,cAAc,EAAE,2BAA2B,EAAE,OAAO,EAAE,eAAe,CAAC;CACzF,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;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC"}
@@ -6,13 +6,13 @@
6
6
  // scaffold a project pointing at 1.0.0 (no probe code) while running
7
7
  // 0.0.7+ server-side smarts that needed 1.1.x to function.
8
8
  //
9
- // Pre-public-Maven note: 1.1.33-pair currently lives only on the dev's
9
+ // Pre-public-Maven note: 1.1.35-pair currently lives only on the dev's
10
10
  // mavenLocal (./gradlew :glasses-core:publishToMavenLocal). Until a
11
11
  // public Maven Central / JitPack publish lands, scaffolded projects
12
12
  // require the dev to run mavenLocal-publish first. Document next to
13
13
  // the dependency notation in generateConnectionModule.
14
14
  export const VERSION_INFO = {
15
- latestStable: "1.1.33-pair",
15
+ latestStable: "1.1.35-pair",
16
16
  specVersion: "1.0",
17
17
  android: {
18
18
  minimumSdk: 31,
@@ -34,7 +34,7 @@ export const VERSION_INFO = {
34
34
  kotlinVersion: "2.1.20",
35
35
  // Toolchain minimums (F-R4-8 from DOGFOOD_R4). The library's transitive
36
36
  // Compose deps determine the floor:
37
- // - com.extentos:glasses-ui:1.1.33-pair brings in androidx.compose.* 1.9.0
37
+ // - com.extentos:glasses-ui:1.1.35-pair brings in androidx.compose.* 1.9.0
38
38
  // (via compose-bom 2024.10.00 and direct deps)
39
39
  // - Compose 1.9.0 AAR-metadata declares "requires AGP >= 8.6.0"
40
40
  // - AGP 8.6+ requires Gradle 8.7+ (Android Gradle Plugin compatibility table)
@@ -58,13 +58,13 @@ export const VERSION_INFO = {
58
58
  },
59
59
  artifacts: {
60
60
  android: {
61
- core: "com.extentos:glasses:1.1.33-pair",
62
- ui: "com.extentos:glasses-ui:1.1.33-pair",
63
- debug: "com.extentos:glasses-debug:1.1.33-pair",
61
+ core: "com.extentos:glasses:1.1.35-pair",
62
+ ui: "com.extentos:glasses-ui:1.1.35-pair",
63
+ debug: "com.extentos:glasses-debug:1.1.35-pair",
64
64
  },
65
65
  ios: {
66
66
  package: "https://github.com/extentos/swift-glasses",
67
- version: "1.1.33-pair",
67
+ version: "1.1.35-pair",
68
68
  products: ["GlassesCore", "GlassesUI", "GlassesDebug", "GlassesLifecycle", "GlassesTesting"],
69
69
  },
70
70
  },
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAcA,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,EAsXpC,CAAC;AAEF,eAAO,MAAM,SAAS,QAAyB,CAAC;AAShD,wBAAgB,iCAAiC,CAC/C,IAAI,GAAE,SAAS,OAAO,EAAoB,GACzC,IAAI,CAiBN"}
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,EA6ZpC,CAAC;AAEF,eAAO,MAAM,SAAS,QAAyB,CAAC;AAShD,wBAAgB,iCAAiC,CAC/C,IAAI,GAAE,SAAS,OAAO,EAAoB,GACzC,IAAI,CAiBN"}
@@ -11,6 +11,7 @@
11
11
  // Schemas are hand-authored plain JSON Schema (no zod→JSONSchema runtime
12
12
  // conversion). Cross-field "at least one of" constraints are enforced in the
13
13
  // handler, not the schema — see assertNoForbiddenTopLevelKeywords below.
14
+ import { CAPABILITY_GUIDE_FEATURES } from "./data/capabilityPatterns.js";
14
15
  const platformEnum = { type: "string", enum: ["android", "ios"] };
15
16
  const glassesEnum = { type: "string", enum: ["meta_rayban"] };
16
17
  const responseFormatEnum = { type: "string", enum: ["concise", "detailed"] };
@@ -18,7 +19,7 @@ export const toolDefinitions = [
18
19
  // --- 1. Discovery and Planning ---
19
20
  {
20
21
  name: "getPlatformInfo",
21
- description: "Return static platform metadata: library version + the list of SDK capabilities the glasses expose (audio.transcriptions, audio.recordDiscrete, audio.speak, camera.capturePhoto, camera.videoFrames, audio.audioChunks, 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 (wake → record → LLM → speak end-to-end) from `getCodeExample(pattern)`; conceptual docs from `searchDocs(topic)`. Pass `expand: ['capabilities.full']` for the machine-readable catalog with params/payload/requires/constraints. USE at session start before scaffolding or writing handler code. DON'T USE for what's installed in the project (use inspectIntegration).",
22
+ description: "Return static platform metadata: library version + the list of SDK capabilities the glasses expose (audio.transcriptions, audio.recordDiscrete, audio.speak, camera.capturePhoto, camera.videoFrames, audio.audioChunks, 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 (wake → record → LLM → speak end-to-end) from `getCodeExample(pattern)`; conceptual docs from `searchDocs(topic)`. 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).",
22
23
  inputSchema: {
23
24
  type: "object",
24
25
  properties: {
@@ -46,7 +47,7 @@ export const toolDefinitions = [
46
47
  // getPlatformInfo these are how a fresh agent learns to compose the SDK.
47
48
  {
48
49
  name: "getCodeExample",
49
- description: "Reference library — retrieve a complete SDK code example (Kotlin + Swift) for a use case. Patterns cover the canonical voice-glasses compositions: voice_qa_assistant (the multi-turn wake+question+LLM+speak flow that motivated the pure-SDK pivot), barge_in_speak (cancel TTS 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). USE when you're about to write handler code and want the canonical shape to peel from. DON'T USE for capability discovery (use getPlatformInfo) or per-feature minimal usage (use getCapabilityGuide).",
50
+ description: "Reference library — retrieve a complete SDK code example (Kotlin + Swift) for a use case. Patterns cover the canonical voice-glasses compositions: voice_qa_assistant (the multi-turn wake+question+LLM+speak flow that motivated the pure-SDK pivot), barge_in_speak (cancel TTS 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 (BYOK LLM client integration), agent_test_loop (the agent-driven E2E verification recipe — handler skeleton + dual-layer assertion against the sim event log, the emulator's Room/SQLite state, and the rendered screen). 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).",
50
51
  inputSchema: {
51
52
  type: "object",
52
53
  properties: {
@@ -60,6 +61,7 @@ export const toolDefinitions = [
60
61
  "voice_notes",
61
62
  "connection_page_setup",
62
63
  "byok_anthropic",
64
+ "agent_test_loop",
63
65
  ],
64
66
  description: "Which compositional pattern to fetch. Each returns full Kotlin + Swift code, an explanation, gotchas, and the SDK features it exercises.",
65
67
  },
@@ -76,17 +78,13 @@ export const toolDefinitions = [
76
78
  properties: {
77
79
  feature: {
78
80
  type: "string",
79
- enum: [
80
- "capture_photo",
81
- "record_audio",
82
- "transcription_incremental",
83
- "speak",
84
- "video_frames",
85
- "audio_chunks",
86
- "connection_state",
87
- "toggles",
88
- ],
89
- description: "Feature name from getPlatformInfo.features[].name. Plus 'connection_state' and 'toggles' for the cross-cutting SDK surfaces.",
81
+ // F-R4-03: derived from CAPABILITY_GUIDE_FEATURES (the actual
82
+ // handler-coverage map) so the schema enum can't drift past the
83
+ // tool's accepted inputs. Pre-fix the enum was hand-maintained and
84
+ // omitted voice_command (and later capture_video), so the input
85
+ // schema rejected feature names the handler quietly accepted.
86
+ enum: CAPABILITY_GUIDE_FEATURES,
87
+ description: "Feature name from getPlatformInfo.features[].name. Includes the cross-cutting SDK surfaces (connection_state, toggles) and the wake-phrase + media capabilities.",
90
88
  },
91
89
  },
92
90
  required: ["feature"],
@@ -261,6 +259,37 @@ export const toolDefinitions = [
261
259
  additionalProperties: false,
262
260
  },
263
261
  },
262
+ {
263
+ name: "injectTranscript",
264
+ description: "Inject a synthetic STT transcript into a live simulator session, the same way the simulator browser tab's click-to-fire chips do. Closes the agent-driven end-to-end test loop: after createSimulatorSession returns and your app attaches, call this with the wake phrase text to drive your voice handler — no human in the loop. Frame travels through the same hub path as a real browser click, so handler dispatch + event-log entries (visible via getEventLog) are identical. USE for automated voice-flow validation (createSimulatorSession → injectTranscript → getEventLog). DON'T USE for static validation (use validateIntegration) or capability discovery (use getPlatformInfo).",
265
+ inputSchema: {
266
+ type: "object",
267
+ properties: {
268
+ sessionId: { type: "string", minLength: 1 },
269
+ text: {
270
+ type: "string",
271
+ minLength: 1,
272
+ description: "The transcript text to inject. For wake-phrase tests, pass the exact phrase your onPhrase / transcriptions matcher expects (case-insensitive substring match — \"start recording\" matches \"please start recording now\").",
273
+ },
274
+ isFinal: {
275
+ type: "boolean",
276
+ description: "When true (default for type=stt_transcript), the frame is a final transcript that fires onPhrase matchers. When false, it's a partial — most matchers wait for finals, but the simulator UI + live-captions consumers see both.",
277
+ },
278
+ partial: {
279
+ type: "boolean",
280
+ description: "Convenience: when true, send as stt_partial (a not-yet-final transcript). Sets isFinal=false by default. Use for testing live-captions UI that consumes partials.",
281
+ },
282
+ confidence: {
283
+ type: "number",
284
+ minimum: 0,
285
+ maximum: 1,
286
+ description: "STT confidence value (0-1). Defaults to 0.99 to match the manual_trigger semantics the simulator's click-to-fire uses.",
287
+ },
288
+ },
289
+ required: ["sessionId", "text"],
290
+ additionalProperties: false,
291
+ },
292
+ },
264
293
  {
265
294
  name: "getSimulatorStatus",
266
295
  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), and current toggle values. Session-level snapshot only. USE during testing to confirm a stream is open, a toggle is set, the session is healthy, or the app role has actually attached. DON'T USE for event traces (use getEventLog).",
@@ -337,7 +366,7 @@ export const toolDefinitions = [
337
366
  // --- 7. Documentation ---
338
367
  {
339
368
  name: "searchDocs",
340
- description: "Search Extentos documentation by topic or keyword. The conceptual / narrative layer that complements the action-oriented tools — read these to understand *how* the SDK is meant to be used, not just what calls exist. Canonical post-pivot topics: `getting_started` (full topic index — read first), `custom_handlers` (the central composition doc — how to write a Handler class that subscribes to capability primitives), `voice_integration`, `connection_ui_placement`, `host_app_scaffold`, `auto_bind_session_lifecycle`, `local_bridge_discovery`, `device_code_flow`, `connection_state_model`, `permissions`, `production_checklist`, `concurrency_modes`, `multi_platform_projects`, `library_api`, `toggles`, `audio_video_coexistence`, `simulator_browser_mode`, `event_log_schema`, `file_actions`. Topic IDs are stable. **At least one of `topic` or `query` is required** (enforced by the handler — calling with neither returns an invalid_arguments error). Pass `topic` alone to fetch the full topic content (most common); pass `query` alone for keyword search across all topics; pass both to narrow keyword search inside a topic. USE to learn how primitives compose into a real flow, or to read up on a specific feature (permissions, toggles, connection lifecycle). DON'T USE for the platform capability list (use getPlatformInfo), call-shape per feature (use getCapabilityGuide), or project-installed state (use inspectIntegration).",
369
+ description: "Search Extentos documentation by topic or keyword. The conceptual / narrative layer that complements the action-oriented tools — read these to understand *how* the SDK is meant to be used, not just what calls exist. Canonical post-pivot topics: `getting_started` (full topic index — read first), `custom_handlers` (the central composition doc — how to write a Handler class that subscribes to capability primitives), `voice_integration`, `connection_ui_placement`, `host_app_scaffold`, `auto_bind_session_lifecycle`, `local_bridge_discovery`, `device_code_flow`, `connection_state_model`, `permissions`, `production_checklist`, `concurrency_modes`, `multi_platform_projects`, `library_api`, `toggles`, `audio_video_coexistence`, `simulator_browser_mode`, `event_log_schema`, `file_actions`, `agent_e2e_testing` (how an AI coding agent verifies its own generated handler end-to-end — sim event log + adb-mediated emulator DB read + screencap, the dual-layer pattern that closes the agent loop without a human). Topic IDs are stable. **At least one of `topic` or `query` is required** (enforced by the handler — calling with neither returns an invalid_arguments error). Pass `topic` alone to fetch the full topic content (most common); pass `query` alone for keyword search across all topics; pass both to narrow keyword search inside a topic. **mode: \"snippets\" (F-R4-10)** returns only the matching paragraphs instead of full topic bodies — pair with a query when keyword-searching across topics so a single search doesn't dump ~20KB of unrelated content into context. USE to learn how primitives compose into a real flow, or to read up on a specific feature (permissions, toggles, connection lifecycle). DON'T USE for the platform capability list (use getPlatformInfo), call-shape per feature (use getCapabilityGuide), or project-installed state (use inspectIntegration).",
341
370
  inputSchema: {
342
371
  type: "object",
343
372
  properties: {
@@ -350,6 +379,11 @@ export const toolDefinitions = [
350
379
  type: "string",
351
380
  description: "Optional topic id. Omit and pass `query` for cross-topic keyword search; pass topic alone to fetch the topic's full content (most common usage). At least one of `query` or `topic` must be supplied.",
352
381
  },
382
+ mode: {
383
+ type: "string",
384
+ enum: ["full", "snippets"],
385
+ description: "Response shape (F-R4-10). 'full' (default) returns each matching topic's full body — the original behavior, best for reading a single named topic. 'snippets' returns only the paragraphs containing the query terms (up to 3 per topic, ~600 chars each) — best when querying across topics so you don't pay for unrelated content in the agent's context window. Snippets mode requires a query; pure topic fetches always return full content.",
386
+ },
353
387
  },
354
388
  additionalProperties: false,
355
389
  },
@@ -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;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,87BAA87B;QACh8B,WAAW,EAAE;YACX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