browser-plugin.client.spec.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /**
  2. * ui-skill browser half: source and keyed toolview registration +
  3. * locale dictionaries + source duplicate-name proof +
  4. * fiber-teardown removal (HMR safety) against the real InputTriggerService, then
  5. * the source behavior contract driven directly on the captured source with
  6. * real ClientSessionContext projections — sessionId addressing, the
  7. * session-keyed catalog cache (single-flight per key, scope-birth warm
  8. * prewarm, connection/reset clear), shared fuzzy name ranking, RPC-failure
  9. * rejection, pick → plain-text outcome (the plain-text-reference decision:
  10. * .agents/notes/archived/architecture/2026-07-25-web-input-machine-and-slash-pipeline.md),
  11. * the synchronous
  12. * lexicon reads over the settled cache, and the reference codec's two
  13. * projections. Direct driving is deliberate: this spec owns only the
  14. * source's own contract.
  15. */
  16. import { Context } from '@deepseek-ai/cordis'
  17. import { describe, expect, it, onTestFinished, vi } from 'vitest'
  18. import type { SessionId } from '@deepseek-ai/dsh-session/types'
  19. import { SlotRegistry } from '@deepseek-ai/dsh-client-ui-renderer/client'
  20. import { InputTriggerService } from '@deepseek-ai/dsh-client-ui-input-trigger/client'
  21. import { RemoteError, TestRemote } from '@deepseek-ai/dsh-client-test-runtime'
  22. import type { RemoteFailure } from '@deepseek-ai/dsh-api-remotes/client'
  23. import type { ClientSessionContext, InputTriggerSource } from '@deepseek-ai/dsh-client-ui-input-trigger/client'
  24. import { apply, inject } from '../src/client/index.ts'
  25. import { SkillRow as SkillToolRow } from '../src/client/SkillRow.tsx'
  26. type SkillRow = { name: string; description: string; whenToUse?: string; path?: string; modelInvocable?: boolean }
  27. type ListResult =
  28. | { ok: true; value: { skills: SkillRow[] } }
  29. | { ok: false; error: RemoteFailure }
  30. type ListFn = (payload: object, signal?: AbortSignal) => Promise<ListResult>
  31. interface PresentationCapture {
  32. slots: SlotRegistry
  33. dictionaries: Array<{ namespace: string; dictionaries: unknown }>
  34. localeDisposed: boolean
  35. }
  36. /** Provide the presentation registries and capture the plugin's registrations. */
  37. function providePresentation(ctx: Context): PresentationCapture {
  38. const slots = new SlotRegistry(ctx)
  39. slots.register({
  40. name: 'root',
  41. children: { 'tool.call.toolview': { kind: 'keyed', scope: 'session' } },
  42. } as never, () => null)
  43. const capture: PresentationCapture = {
  44. slots,
  45. dictionaries: [],
  46. localeDisposed: false,
  47. }
  48. ctx.provide('locale', {
  49. register(namespace: string, dictionaries: unknown) {
  50. capture.dictionaries.push({ namespace, dictionaries })
  51. return () => { capture.localeDisposed = true }
  52. },
  53. // Minimal bound-translate fake: zh dictionary lookup, key passthrough on miss.
  54. bind: () => (key: string) => key === 'menu.userOnly' ? '仅用户' : key,
  55. })
  56. return capture
  57. }
  58. /** Boot the plugin over fake slash/connection faces; returns the captured source and its ctx. */
  59. async function bench(list: ListFn, addressed?: SessionId) {
  60. const ctx = new Context()
  61. const openResource = vi.fn()
  62. ctx.provide('sidebarRight', { openResource })
  63. let captured: InputTriggerSource | undefined
  64. ctx.provide('inputTriggers', { registerSource: (src: InputTriggerSource) => { captured = src; return () => {} } })
  65. ctx.provide('sessions', {
  66. list: { getSnapshot: () => ({ byId: {} }) },
  67. subagentAddress: (id: SessionId) => id === addressed
  68. ? { parentSessionId: sid('parent'), childSessionId: id, mode: 'continuable' as const }
  69. : undefined,
  70. })
  71. const remote = new TestRemote(ctx, { skills: { list } })
  72. providePresentation(ctx)
  73. const fiber = ctx.plugin({ inject: [...inject], apply })
  74. onTestFinished(async () => { await fiber.dispose() })
  75. await fiber.await()
  76. return { ctx, source: captured!, remote, fiber, openResource }
  77. }
  78. const CATALOG: SkillRow[] = [
  79. { name: 'commit-helper', description: 'commit flow', modelInvocable: true },
  80. { name: 'code-review', description: 'review flow', whenToUse: 'reviews', modelInvocable: true },
  81. { name: 'deploy', description: 'deploy flow', modelInvocable: true },
  82. ]
  83. const listOk = (skills: SkillRow[]): ListFn => () => Promise.resolve({ ok: true as const, value: { skills } })
  84. /** Counting fake: records payloads, resolves the shared catalog. */
  85. function countingList(skills: SkillRow[] = CATALOG) {
  86. const payloads: object[] = []
  87. const list: ListFn = (payload) => {
  88. payloads.push(payload)
  89. return listOk(skills)(payload)
  90. }
  91. return { list, payloads }
  92. }
  93. const sid = (id: string) => id as SessionId
  94. const proj = (id: string): ClientSessionContext => ({ sessionId: sid(id) })
  95. const req = (query: string, signal?: AbortSignal) =>
  96. ({ query, position: 'leading' as const, drilled: false, signal: signal ?? new AbortController().signal })
  97. describe('apply', () => {
  98. it('declares the services it binds', () => {
  99. expect(inject).toEqual(['inputTriggers', 'sessions', 'slots', 'locale', 'remote', 'remote.skills', 'sidebarRight'])
  100. })
  101. it('registers the dedicated skill row and its locale dictionaries', async () => {
  102. const ctx = new Context()
  103. ctx.provide('sidebarRight', { openResource: vi.fn() })
  104. ctx.provide('inputTriggers', { registerSource: () => () => {} })
  105. ctx.provide('sessions', { subagentAddress: () => undefined })
  106. new TestRemote(ctx, { skills: { list: listOk(CATALOG) } })
  107. const presentation = providePresentation(ctx)
  108. await ctx.plugin({ inject: [...inject], apply }).await()
  109. const entry = presentation.slots.entries('tool.call.toolview')[0]
  110. expect(entry?.options).toMatchObject({ key: 'skill' })
  111. expect(entry?.locale).toBe('skill')
  112. expect(entry?.component).toBe(SkillToolRow)
  113. expect(presentation.dictionaries).toEqual([{
  114. namespace: 'skill', dictionaries: {
  115. zh: {
  116. 'row.title': 'Skill',
  117. 'row.running': '正在加载 skill',
  118. 'row.failed': 'skill 加载失败',
  119. 'row.stopped': 'skill 加载已中止',
  120. 'row.instructions': '说明',
  121. 'row.inspect': '查看',
  122. 'menu.userOnly': '仅用户',
  123. },
  124. en: {
  125. 'row.title': 'Skill',
  126. 'row.running': 'Loading skill',
  127. 'row.failed': 'Skill load failed',
  128. 'row.stopped': 'Skill load stopped',
  129. 'row.instructions': 'Instructions',
  130. 'row.inspect': 'Inspect',
  131. 'menu.userOnly': 'user-only',
  132. },
  133. },
  134. }])
  135. })
  136. it('registers the "/" skill source; disposal frees the name (HMR safety)', async () => {
  137. const ctx = new Context()
  138. ctx.provide('sidebarRight', { openResource: vi.fn() })
  139. // InputTriggerService itself injects 'sessions'; the stub unblocks its fiber.
  140. ctx.provide('sessions', {})
  141. await ctx.plugin(InputTriggerService).await()
  142. new TestRemote(ctx, { skills: { list: listOk(CATALOG) } })
  143. const presentation = providePresentation(ctx)
  144. const fiber = ctx.plugin({ inject: [...inject], apply })
  145. await fiber.await()
  146. const inputTriggers = ctx.get('inputTriggers') as InputTriggerService
  147. const rival = {
  148. trigger: '/' as const,
  149. name: 'skill',
  150. candidates: () => Promise.resolve([]),
  151. onPick: () => undefined,
  152. }
  153. // Live registration holds the (trigger, name) seat…
  154. expect(() => inputTriggers.registerSource(rival)).toThrow(/already registered/)
  155. // …and fiber teardown releases it.
  156. await fiber.dispose()
  157. expect(() => inputTriggers.registerSource(rival)).not.toThrow()
  158. expect(presentation.slots.entries('tool.call.toolview')).toHaveLength(0)
  159. expect(presentation.localeDisposed).toBe(true)
  160. })
  161. })
  162. describe('candidates: sessionId addressing', () => {
  163. it('lists via {sessionId} and ranks case-insensitive subsequence matches with prefixes first', async () => {
  164. const { list, payloads } = countingList()
  165. const { source } = await bench(list)
  166. const items = await source.candidates(proj('s1'), req('co'))
  167. // Exact payload: session address only — no agent or transport vocabulary.
  168. expect(payloads).toEqual([{ sessionId: 's1' }])
  169. expect(items).toEqual([
  170. { name: 'commit-helper', description: 'commit flow' },
  171. { name: 'code-review', description: 'review flow' },
  172. ])
  173. const names = async (query: string) => (await source.candidates(proj('s1'), req(query))).map(c => c.name)
  174. // 'de' prefixes deploy and is a subsequence of code-review: the prefix ranks first.
  175. await expect(names('de')).resolves.toEqual(['deploy', 'code-review'])
  176. await expect(names('REV')).resolves.toEqual(['code-review'])
  177. await expect(names('zzz')).resolves.toEqual([])
  178. })
  179. it('rejects on a failed result (the slash shell owns the menu-side fold)', async () => {
  180. const { source } = await bench(() => Promise.resolve({
  181. ok: false, error: new RemoteError('gateway/internal', 'boom', {}),
  182. }))
  183. await expect(source.candidates(proj('s1'), req('co')))
  184. .rejects.toThrow('skills/list failed: gateway/internal: boom')
  185. })
  186. it('does not fetch Agent-bound skills for an addressed child', async () => {
  187. const { list, payloads } = countingList()
  188. const { source } = await bench(list, sid('child'))
  189. await expect(source.candidates(proj('child'), req(''))).resolves.toEqual([])
  190. source.warm!(proj('child'))
  191. expect(payloads).toEqual([])
  192. })
  193. })
  194. describe('catalog cache', () => {
  195. it('re-polls on the same session filter locally: one RPC across keystrokes', async () => {
  196. const { list, payloads } = countingList()
  197. const { source } = await bench(list)
  198. await source.candidates(proj('s1'), req(''))
  199. const second = await source.candidates(proj('s1'), req('co'))
  200. expect(payloads).toHaveLength(1)
  201. expect(second).toEqual([
  202. { name: 'commit-helper', description: 'commit flow' },
  203. { name: 'code-review', description: 'review flow' },
  204. ])
  205. // A different session is its own key — one more RPC, not two.
  206. await source.candidates(proj('s2'), req(''))
  207. expect(payloads).toEqual([{ sessionId: 's1' }, { sessionId: 's2' }])
  208. })
  209. it('single-flight: concurrent candidates on one cold key share one RPC', async () => {
  210. const { list, payloads } = countingList()
  211. const { source } = await bench(list)
  212. const [a, b] = await Promise.all([
  213. source.candidates(proj('s1'), req('dep')),
  214. source.candidates(proj('s1'), req('co')),
  215. ])
  216. expect(payloads).toHaveLength(1)
  217. expect(a).toEqual([{ name: 'deploy', description: 'deploy flow' }])
  218. expect(b).toHaveLength(2)
  219. })
  220. it('an aborted caller yields empty but leaves the shared fetch warm', async () => {
  221. const { list, payloads } = countingList()
  222. const { source } = await bench(list)
  223. const aborted = new AbortController()
  224. aborted.abort()
  225. await expect(source.candidates(proj('s1'), req('co', aborted.signal))).resolves.toEqual([])
  226. // The fetch settled into the cache: the next caller pays zero RPC.
  227. await expect(source.candidates(proj('s1'), req('co'))).resolves.toHaveLength(2)
  228. expect(payloads).toHaveLength(1)
  229. })
  230. it('a failed fetch does not poison the key: the next caller retries', async () => {
  231. let fail = true
  232. const payloads: object[] = []
  233. const { source } = await bench((payload) => {
  234. payloads.push(payload)
  235. return fail
  236. ? Promise.resolve({ ok: false as const, error: new RemoteError('gateway/internal', 'boom', {}) })
  237. : listOk(CATALOG)(payload)
  238. })
  239. await expect(source.candidates(proj('s1'), req(''))).rejects.toThrow('boom')
  240. fail = false
  241. await expect(source.candidates(proj('s1'), req(''))).resolves.toHaveLength(3)
  242. expect(payloads).toHaveLength(2)
  243. })
  244. it('the scope-birth warm prewarms the session key fire-and-forget', async () => {
  245. const { list, payloads } = countingList()
  246. const { source } = await bench(list)
  247. source.warm!(proj('s1'))
  248. await vi.waitFor(() => { expect(payloads).toHaveLength(1) })
  249. expect(payloads[0]).toEqual({ sessionId: 's1' })
  250. // The prewarmed key serves candidates with zero further RPC; other
  251. // sessions' keys stay untouched.
  252. await expect(source.candidates(proj('s1'), req(''))).resolves.toHaveLength(3)
  253. expect(payloads).toHaveLength(1)
  254. await source.candidates(proj('s2'), req(''))
  255. expect(payloads).toHaveLength(2)
  256. })
  257. it('agent-preset/selected clears only the recomposed session', async () => {
  258. const { list, payloads } = countingList()
  259. const { source, remote } = await bench(list)
  260. await source.candidates(proj('s1'), req(''))
  261. await source.candidates(proj('s2'), req(''))
  262. expect(payloads).toHaveLength(2)
  263. // The catalog a preset supplies is the preset's; the other session's
  264. // composition did not change, so its cached catalog still holds.
  265. remote.emit('agent-preset/selected', [sid('s1'), 'minimal'])
  266. await source.candidates(proj('s1'), req(''))
  267. await source.candidates(proj('s2'), req(''))
  268. expect(payloads).toHaveLength(3)
  269. expect(payloads[2]).toEqual({ sessionId: 's1' })
  270. })
  271. it('connection/reset clears every cached session', async () => {
  272. const { list, payloads } = countingList()
  273. const { ctx, source } = await bench(list)
  274. await source.candidates(proj('s1'), req(''))
  275. await source.candidates(proj('s2'), req(''))
  276. expect(payloads).toHaveLength(2)
  277. ctx.emit('connection/reset')
  278. await source.candidates(proj('s1'), req(''))
  279. await source.candidates(proj('s2'), req(''))
  280. expect(payloads).toHaveLength(4)
  281. })
  282. })
  283. describe('lexicon', () => {
  284. it('is undefined before the session catalog settles and serves names after', async () => {
  285. let release: (() => void) | undefined
  286. const gate = new Promise<void>((resolve) => { release = resolve })
  287. const { source } = await bench(async (payload) => {
  288. await gate
  289. return listOk(CATALOG)(payload)
  290. })
  291. // Cold: nothing cached for the session.
  292. expect(source.lexicon!(proj('s1'))).toBeUndefined()
  293. const pending = source.candidates(proj('s1'), req(''))
  294. // In flight: still no synchronous snapshot.
  295. expect(source.lexicon!(proj('s1'))).toBeUndefined()
  296. release!()
  297. await pending
  298. expect(source.lexicon!(proj('s1'))).toEqual(['commit-helper', 'code-review', 'deploy'])
  299. // Another session's key is independent — cold until its own fetch.
  300. expect(source.lexicon!(proj('s2'))).toBeUndefined()
  301. })
  302. it('subscribeLexicon notifies on catalog settle and on invalidation, per session', async () => {
  303. const { list } = countingList()
  304. const { ctx, source } = await bench(list)
  305. const s1 = vi.fn()
  306. const s2 = vi.fn()
  307. source.subscribeLexicon!(proj('s1'), s1)
  308. source.subscribeLexicon!(proj('s2'), s2)
  309. await source.candidates(proj('s1'), req(''))
  310. expect(s1).toHaveBeenCalledTimes(1)
  311. expect(s2).not.toHaveBeenCalled()
  312. // Reset invalidates every cached session: each key notifies its own listeners.
  313. await source.candidates(proj('s2'), req(''))
  314. ctx.emit('connection/reset')
  315. expect(s1).toHaveBeenCalledTimes(2)
  316. expect(s2).toHaveBeenCalledTimes(2)
  317. })
  318. it('an unsubscribed lexicon listener stops receiving notifications', async () => {
  319. const { list } = countingList()
  320. const { source } = await bench(list)
  321. const listener = vi.fn()
  322. const off = source.subscribeLexicon!(proj('s1'), listener)
  323. off()
  324. await source.candidates(proj('s1'), req(''))
  325. expect(listener).not.toHaveBeenCalled()
  326. })
  327. })
  328. describe('pick lands plain text', () => {
  329. it('onPick returns the literal /name text with a closing space', async () => {
  330. const { source } = await bench(listOk(CATALOG))
  331. const outcome = source.onPick({
  332. candidate: { name: 'commit-helper', description: 'commit flow' },
  333. session: proj('s1'),
  334. position: 'leading',
  335. via: 'menu',
  336. action: 'pick',
  337. span: { start: 0, end: 4, draftRev: 7 },
  338. })
  339. expect(outcome).toEqual({ text: '/commit-helper ' })
  340. })
  341. it('keeps the legacy reference codec removed and stays out of adjudication', async () => {
  342. const { source } = await bench(listOk(CATALOG))
  343. // Determinism lives host-side (the pre-step gesture boundary), so the
  344. // source neither claims lines nor serializes reference markup.
  345. expect(source.codec).toBeUndefined()
  346. expect(typeof source.matchSpace).toBe('undefined')
  347. expect(typeof source.matchEnter).toBe('undefined')
  348. })
  349. })
  350. describe('user-only marking', () => {
  351. it('prefixes the description of candidates the model cannot invoke', async () => {
  352. const rows: SkillRow[] = [
  353. { name: 'shared-skill', description: 'both surfaces', modelInvocable: true },
  354. { name: 'user-only-skill', description: 'user surface only', modelInvocable: false },
  355. ]
  356. const { source } = await bench(listOk(rows))
  357. const candidates = await source.candidates(proj('s1'), req(''))
  358. expect(candidates).toEqual([
  359. { name: 'shared-skill', description: 'both surfaces' },
  360. { name: 'user-only-skill', description: '仅用户 · user surface only' },
  361. ])
  362. })
  363. })
  364. describe('reference preview', () => {
  365. const rows: SkillRow[] = [
  366. { name: 'review', description: 'Review', path: '/skills/review/SKILL.md' },
  367. { name: 'virtual', description: 'Virtual' },
  368. ]
  369. it('finishes the first click after a shared warm fetch and reloads after reconnect', async () => {
  370. const gate = Promise.withResolvers<ListResult>()
  371. const list = vi.fn<ListFn>().mockReturnValueOnce(gate.promise).mockImplementation(listOk(rows))
  372. const { ctx, source, openResource } = await bench(list)
  373. const session = proj('preview')
  374. source.warm!(session)
  375. expect(source.openReference!(session, { ref: '/review' })).toBe(true)
  376. const candidates = source.candidates(session, req(''))
  377. expect(openResource).not.toHaveBeenCalled()
  378. expect(list).toHaveBeenCalledTimes(1)
  379. gate.resolve({ ok: true, value: { skills: rows } })
  380. await candidates
  381. expect(openResource).toHaveBeenCalledExactlyOnceWith('dsh-resource://file/session/preview//skills/review/SKILL.md')
  382. expect(source.openReference!(session, { ref: '/virtual' })).toBe(false)
  383. expect(source.openReference!(session, { ref: '/missing' })).toBe(false)
  384. expect(source.openReference!(session, { ref: '/review' })).toBe(true)
  385. ctx.emit('connection/reset')
  386. expect(source.openReference!(session, { ref: '/review' })).toBe(true)
  387. await source.candidates(session, req(''))
  388. expect(list).toHaveBeenCalledTimes(2)
  389. expect(openResource).toHaveBeenCalledTimes(3)
  390. })
  391. it('keeps pending clicks bound to their own Session when another Session opens', async () => {
  392. const first = Promise.withResolvers<ListResult>()
  393. const second = Promise.withResolvers<ListResult>()
  394. const list = vi.fn<ListFn>().mockReturnValueOnce(first.promise).mockReturnValueOnce(second.promise)
  395. const { source, openResource } = await bench(list)
  396. source.openReference!(proj('first'), { ref: '/review' })
  397. const firstDone = source.candidates(proj('first'), req(''))
  398. source.openReference!(proj('second'), { ref: '/review' })
  399. const secondDone = source.candidates(proj('second'), req(''))
  400. second.resolve({ ok: true, value: { skills: [{ ...rows[0]!, path: '/second/SKILL.md' }] } })
  401. await secondDone
  402. expect(openResource).toHaveBeenLastCalledWith('dsh-resource://file/session/second//second/SKILL.md')
  403. first.resolve({ ok: true, value: { skills: rows } })
  404. await firstDone
  405. expect(openResource).toHaveBeenLastCalledWith('dsh-resource://file/session/first//skills/review/SKILL.md')
  406. expect(list.mock.calls.map(([payload]) => payload)).toEqual([{ sessionId: 'first' }, { sessionId: 'second' }])
  407. })
  408. it.each(['reset', 'preset', 'dispose'] as const)('cancels a pending preview on %s even if the RPC completes late', async (reason) => {
  409. const gate = Promise.withResolvers<ListResult>()
  410. const { ctx, source, remote, fiber, openResource } = await bench(() => gate.promise)
  411. const session = proj('preview')
  412. const listener = vi.fn()
  413. source.subscribeLexicon!(session, listener)
  414. source.openReference!(session, { ref: '/review' })
  415. const completion = expect(source.candidates(session, req(''))).rejects.toThrow()
  416. if (reason === 'reset') ctx.emit('connection/reset')
  417. else if (reason === 'preset') remote.emit('agent-preset/selected', [session.sessionId, 'minimal'])
  418. else await fiber.dispose()
  419. expect(listener).toHaveBeenCalledTimes(1)
  420. gate.resolve({ ok: true, value: { skills: rows } })
  421. await completion
  422. expect(source.lexicon!(session)).toBeUndefined()
  423. expect(listener).toHaveBeenCalledTimes(1)
  424. expect(openResource).not.toHaveBeenCalled()
  425. })
  426. it('reports a failed preview fetch and allows the next click to retry', async () => {
  427. const error = vi.spyOn(console, 'error').mockImplementation(() => {})
  428. onTestFinished(() => { error.mockRestore() })
  429. const list = vi.fn<ListFn>().mockRejectedValueOnce(new Error('offline')).mockImplementation(listOk(rows))
  430. const { source, openResource } = await bench(list)
  431. const session = proj('preview')
  432. source.openReference!(session, { ref: '/review' })
  433. await vi.waitFor(() => { expect(error).toHaveBeenCalledWith('[ui-skill] reference preview failed:', expect.any(Error)) })
  434. expect(openResource).not.toHaveBeenCalled()
  435. source.openReference!(session, { ref: '/review' })
  436. await source.candidates(session, req(''))
  437. expect(openResource).toHaveBeenCalledOnce()
  438. })
  439. it('does not fetch or preview a skill from addressed subagent history', async () => {
  440. const list = vi.fn(listOk(rows))
  441. const { source, openResource } = await bench(list, sid('child'))
  442. expect(source.openReference!(proj('child'), { ref: '/review' })).toBe(false)
  443. expect(list).not.toHaveBeenCalled()
  444. expect(openResource).not.toHaveBeenCalled()
  445. })
  446. })