agent-messenger 2.10.1 → 2.10.2

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 (239) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/package.json +1 -1
  3. package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -1
  4. package/dist/src/platforms/teams/token-extractor.js +9 -2
  5. package/dist/src/platforms/teams/token-extractor.js.map +1 -1
  6. package/dist/src/shared/chromium/decryptor.d.ts +6 -0
  7. package/dist/src/shared/chromium/decryptor.d.ts.map +1 -1
  8. package/dist/src/shared/chromium/decryptor.js +26 -6
  9. package/dist/src/shared/chromium/decryptor.js.map +1 -1
  10. package/e2e/channeltalk.e2e.test.ts +13 -13
  11. package/e2e/channeltalkbot.e2e.test.ts +13 -13
  12. package/e2e/discord.e2e.test.ts +24 -24
  13. package/e2e/discordbot.e2e.test.ts +16 -16
  14. package/e2e/instagram.e2e.test.ts +10 -10
  15. package/e2e/kakaotalk.e2e.test.ts +7 -7
  16. package/e2e/line.e2e.test.ts +8 -8
  17. package/e2e/slack.e2e.test.ts +34 -34
  18. package/e2e/slackbot.e2e.test.ts +14 -14
  19. package/e2e/teams.e2e.test.ts +23 -23
  20. package/e2e/telegram.e2e.test.ts +8 -8
  21. package/e2e/webex.e2e.test.ts +14 -14
  22. package/e2e/whatsapp.e2e.test.ts +8 -8
  23. package/e2e/whatsappbot.e2e.test.ts +6 -6
  24. package/package.json +1 -1
  25. package/skills/agent-channeltalk/SKILL.md +1 -1
  26. package/skills/agent-channeltalkbot/SKILL.md +1 -1
  27. package/skills/agent-discord/SKILL.md +1 -1
  28. package/skills/agent-discordbot/SKILL.md +1 -1
  29. package/skills/agent-instagram/SKILL.md +1 -1
  30. package/skills/agent-kakaotalk/SKILL.md +1 -1
  31. package/skills/agent-line/SKILL.md +1 -1
  32. package/skills/agent-slack/SKILL.md +1 -1
  33. package/skills/agent-slackbot/SKILL.md +1 -1
  34. package/skills/agent-teams/SKILL.md +1 -1
  35. package/skills/agent-telegram/SKILL.md +1 -1
  36. package/skills/agent-webex/SKILL.md +1 -1
  37. package/skills/agent-wechatbot/SKILL.md +1 -1
  38. package/skills/agent-whatsapp/SKILL.md +1 -1
  39. package/skills/agent-whatsappbot/SKILL.md +1 -1
  40. package/src/platforms/channeltalk/client.test.ts +26 -26
  41. package/src/platforms/channeltalk/commands/auth.test.ts +16 -16
  42. package/src/platforms/channeltalk/commands/bot.test.ts +2 -2
  43. package/src/platforms/channeltalk/commands/chat.test.ts +3 -3
  44. package/src/platforms/channeltalk/commands/group.test.ts +4 -4
  45. package/src/platforms/channeltalk/commands/manager.test.ts +2 -2
  46. package/src/platforms/channeltalk/commands/message.test.ts +17 -17
  47. package/src/platforms/channeltalk/commands/snapshot.test.ts +7 -7
  48. package/src/platforms/channeltalk/commands/whoami.test.ts +3 -3
  49. package/src/platforms/channeltalk/credential-manager.test.ts +18 -18
  50. package/src/platforms/channeltalk/ensure-auth.test.ts +5 -5
  51. package/src/platforms/channeltalk/index.test.ts +23 -23
  52. package/src/platforms/channeltalk/token-extractor.test.ts +21 -21
  53. package/src/platforms/channeltalk/types.test.ts +12 -12
  54. package/src/platforms/channeltalkbot/client.test.ts +14 -14
  55. package/src/platforms/channeltalkbot/commands/auth.test.ts +16 -16
  56. package/src/platforms/channeltalkbot/commands/bot.test.ts +6 -6
  57. package/src/platforms/channeltalkbot/commands/chat.test.ts +9 -9
  58. package/src/platforms/channeltalkbot/commands/group.test.ts +6 -6
  59. package/src/platforms/channeltalkbot/commands/manager.test.ts +3 -3
  60. package/src/platforms/channeltalkbot/commands/message.test.ts +10 -10
  61. package/src/platforms/channeltalkbot/commands/snapshot.test.ts +7 -7
  62. package/src/platforms/channeltalkbot/commands/whoami.test.ts +4 -4
  63. package/src/platforms/channeltalkbot/credential-manager.test.ts +27 -27
  64. package/src/platforms/channeltalkbot/index.test.ts +15 -15
  65. package/src/platforms/discord/client.test.ts +28 -28
  66. package/src/platforms/discord/commands/auth.test.ts +7 -7
  67. package/src/platforms/discord/commands/channel.test.ts +7 -7
  68. package/src/platforms/discord/commands/dm.test.ts +4 -4
  69. package/src/platforms/discord/commands/file.test.ts +4 -4
  70. package/src/platforms/discord/commands/friend.test.ts +6 -6
  71. package/src/platforms/discord/commands/member.test.ts +5 -5
  72. package/src/platforms/discord/commands/mention.test.ts +5 -5
  73. package/src/platforms/discord/commands/message.test.ts +9 -9
  74. package/src/platforms/discord/commands/note.test.ts +6 -6
  75. package/src/platforms/discord/commands/profile.test.ts +4 -4
  76. package/src/platforms/discord/commands/reaction.test.ts +5 -5
  77. package/src/platforms/discord/commands/server.test.ts +7 -7
  78. package/src/platforms/discord/commands/snapshot.test.ts +6 -6
  79. package/src/platforms/discord/commands/thread.test.ts +6 -6
  80. package/src/platforms/discord/commands/user.test.ts +5 -5
  81. package/src/platforms/discord/commands/whoami.test.ts +6 -6
  82. package/src/platforms/discord/credential-manager.test.ts +16 -16
  83. package/src/platforms/discord/ensure-auth.test.ts +8 -8
  84. package/src/platforms/discord/index.test.ts +17 -17
  85. package/src/platforms/discord/listener.test.ts +33 -33
  86. package/src/platforms/discord/token-extractor.test.ts +53 -53
  87. package/src/platforms/discord/types.test.ts +26 -26
  88. package/src/platforms/discordbot/client.test.ts +31 -31
  89. package/src/platforms/discordbot/commands/auth.test.ts +18 -18
  90. package/src/platforms/discordbot/commands/channel.test.ts +11 -11
  91. package/src/platforms/discordbot/commands/file.test.ts +7 -7
  92. package/src/platforms/discordbot/commands/message.test.ts +25 -25
  93. package/src/platforms/discordbot/commands/reaction.test.ts +6 -6
  94. package/src/platforms/discordbot/commands/server.test.ts +12 -12
  95. package/src/platforms/discordbot/commands/snapshot.test.ts +13 -13
  96. package/src/platforms/discordbot/commands/thread.test.ts +10 -10
  97. package/src/platforms/discordbot/commands/user.test.ts +9 -9
  98. package/src/platforms/discordbot/commands/whoami.test.ts +4 -4
  99. package/src/platforms/discordbot/credential-manager.test.ts +28 -28
  100. package/src/platforms/instagram/client.test.ts +18 -18
  101. package/src/platforms/instagram/commands/auth.test.ts +11 -11
  102. package/src/platforms/instagram/commands/chat.test.ts +6 -6
  103. package/src/platforms/instagram/commands/message.test.ts +11 -11
  104. package/src/platforms/instagram/commands/shared.test.ts +12 -12
  105. package/src/platforms/instagram/commands/whoami.test.ts +3 -3
  106. package/src/platforms/instagram/credential-manager.test.ts +21 -21
  107. package/src/platforms/instagram/ensure-auth.test.ts +4 -4
  108. package/src/platforms/instagram/index.test.ts +9 -9
  109. package/src/platforms/instagram/listener.test.ts +8 -8
  110. package/src/platforms/instagram/token-extractor.test.ts +35 -35
  111. package/src/platforms/kakaotalk/client.test.ts +33 -33
  112. package/src/platforms/kakaotalk/commands/auth.test.ts +11 -11
  113. package/src/platforms/kakaotalk/commands/chat.test.ts +6 -6
  114. package/src/platforms/kakaotalk/commands/message.test.ts +7 -7
  115. package/src/platforms/kakaotalk/commands/whoami.test.ts +5 -5
  116. package/src/platforms/kakaotalk/credential-manager.test.ts +15 -15
  117. package/src/platforms/kakaotalk/index.test.ts +15 -15
  118. package/src/platforms/kakaotalk/listener.test.ts +17 -17
  119. package/src/platforms/line/client.test.ts +17 -17
  120. package/src/platforms/line/commands/auth.test.ts +8 -8
  121. package/src/platforms/line/commands/chat.test.ts +7 -7
  122. package/src/platforms/line/commands/friend.test.ts +6 -6
  123. package/src/platforms/line/commands/message.test.ts +7 -7
  124. package/src/platforms/line/commands/whoami.test.ts +6 -6
  125. package/src/platforms/line/credential-manager.test.ts +17 -17
  126. package/src/platforms/line/index.test.ts +10 -10
  127. package/src/platforms/line/listener.test.ts +15 -15
  128. package/src/platforms/line/types.test.ts +14 -14
  129. package/src/platforms/slack/cli.test.ts +8 -8
  130. package/src/platforms/slack/client.test.ts +151 -151
  131. package/src/platforms/slack/commands/activity.test.ts +13 -13
  132. package/src/platforms/slack/commands/auth.test.ts +34 -34
  133. package/src/platforms/slack/commands/bookmark.test.ts +9 -9
  134. package/src/platforms/slack/commands/channel.test.ts +17 -17
  135. package/src/platforms/slack/commands/drafts.test.ts +7 -7
  136. package/src/platforms/slack/commands/emoji.test.ts +3 -3
  137. package/src/platforms/slack/commands/file.test.ts +12 -12
  138. package/src/platforms/slack/commands/message.test.ts +19 -19
  139. package/src/platforms/slack/commands/pin.test.ts +7 -7
  140. package/src/platforms/slack/commands/reaction.test.ts +10 -10
  141. package/src/platforms/slack/commands/reminder.test.ts +9 -9
  142. package/src/platforms/slack/commands/saved.test.ts +7 -7
  143. package/src/platforms/slack/commands/sections.test.ts +5 -5
  144. package/src/platforms/slack/commands/snapshot.test.ts +13 -13
  145. package/src/platforms/slack/commands/unread.test.ts +6 -6
  146. package/src/platforms/slack/commands/user.test.ts +10 -10
  147. package/src/platforms/slack/commands/usergroup.test.ts +15 -15
  148. package/src/platforms/slack/commands/whoami.test.ts +6 -6
  149. package/src/platforms/slack/commands/workspace.test.ts +26 -26
  150. package/src/platforms/slack/credential-manager.test.ts +14 -14
  151. package/src/platforms/slack/ensure-auth.test.ts +21 -21
  152. package/src/platforms/slack/index.test.ts +12 -12
  153. package/src/platforms/slack/listener.test.ts +17 -17
  154. package/src/platforms/slack/token-extractor-node.test.ts +2 -2
  155. package/src/platforms/slack/token-extractor.test.ts +37 -37
  156. package/src/platforms/slack/types.test.ts +21 -21
  157. package/src/platforms/slackbot/client.test.ts +22 -22
  158. package/src/platforms/slackbot/commands/auth.test.ts +14 -14
  159. package/src/platforms/slackbot/commands/channel.test.ts +7 -7
  160. package/src/platforms/slackbot/commands/message.test.ts +13 -13
  161. package/src/platforms/slackbot/commands/reaction.test.ts +6 -6
  162. package/src/platforms/slackbot/commands/user.test.ts +7 -7
  163. package/src/platforms/slackbot/commands/whoami.test.ts +4 -4
  164. package/src/platforms/slackbot/credential-manager.test.ts +22 -22
  165. package/src/platforms/slackbot/types.test.ts +7 -7
  166. package/src/platforms/teams/client.test.ts +30 -30
  167. package/src/platforms/teams/commands/auth.test.ts +8 -8
  168. package/src/platforms/teams/commands/channel.test.ts +7 -7
  169. package/src/platforms/teams/commands/file.test.ts +4 -4
  170. package/src/platforms/teams/commands/message.test.ts +5 -5
  171. package/src/platforms/teams/commands/reaction.test.ts +4 -4
  172. package/src/platforms/teams/commands/snapshot.test.ts +7 -7
  173. package/src/platforms/teams/commands/team.test.ts +8 -8
  174. package/src/platforms/teams/commands/user.test.ts +4 -4
  175. package/src/platforms/teams/commands/whoami.test.ts +6 -6
  176. package/src/platforms/teams/credential-manager.test.ts +17 -17
  177. package/src/platforms/teams/ensure-auth.test.ts +13 -13
  178. package/src/platforms/teams/index.test.ts +15 -15
  179. package/src/platforms/teams/token-extractor.test.ts +109 -49
  180. package/src/platforms/teams/token-extractor.ts +7 -2
  181. package/src/platforms/teams/types.test.ts +26 -26
  182. package/src/platforms/telegram/app-config.test.ts +4 -4
  183. package/src/platforms/telegram/chat-utils.test.ts +12 -12
  184. package/src/platforms/telegram/client.test.ts +4 -4
  185. package/src/platforms/telegram/commands/auth.test.ts +16 -16
  186. package/src/platforms/telegram/commands/chat.test.ts +9 -9
  187. package/src/platforms/telegram/commands/message.test.ts +6 -6
  188. package/src/platforms/telegram/commands/shared.test.ts +3 -3
  189. package/src/platforms/telegram/commands/whoami.test.ts +3 -3
  190. package/src/platforms/telegram/credential-manager.test.ts +10 -10
  191. package/src/platforms/telegram/types.test.ts +6 -6
  192. package/src/platforms/webex/app-config.test.ts +8 -8
  193. package/src/platforms/webex/cli.test.ts +5 -5
  194. package/src/platforms/webex/client.test.ts +65 -65
  195. package/src/platforms/webex/commands/auth.test.ts +18 -18
  196. package/src/platforms/webex/commands/member.test.ts +5 -5
  197. package/src/platforms/webex/commands/message.test.ts +12 -12
  198. package/src/platforms/webex/commands/snapshot.test.ts +5 -5
  199. package/src/platforms/webex/commands/space.test.ts +10 -10
  200. package/src/platforms/webex/commands/whoami.test.ts +6 -6
  201. package/src/platforms/webex/credential-manager.test.ts +22 -22
  202. package/src/platforms/webex/encryption.test.ts +4 -4
  203. package/src/platforms/webex/ensure-auth.test.ts +5 -5
  204. package/src/platforms/webex/index.test.ts +5 -5
  205. package/src/platforms/webex/markdown-to-html.test.ts +33 -33
  206. package/src/platforms/webex/token-extractor.test.ts +23 -23
  207. package/src/platforms/webex/types.test.ts +27 -27
  208. package/src/platforms/wechatbot/client.test.ts +27 -27
  209. package/src/platforms/wechatbot/commands/auth.test.ts +15 -15
  210. package/src/platforms/wechatbot/commands/message.test.ts +8 -8
  211. package/src/platforms/wechatbot/commands/template.test.ts +9 -9
  212. package/src/platforms/wechatbot/commands/user.test.ts +7 -7
  213. package/src/platforms/wechatbot/commands/whoami.test.ts +5 -5
  214. package/src/platforms/wechatbot/credential-manager.test.ts +18 -18
  215. package/src/platforms/wechatbot/index.test.ts +10 -10
  216. package/src/platforms/wechatbot/types.test.ts +25 -25
  217. package/src/platforms/whatsapp/commands/auth.test.ts +13 -13
  218. package/src/platforms/whatsapp/commands/chat.test.ts +8 -8
  219. package/src/platforms/whatsapp/commands/message.test.ts +10 -10
  220. package/src/platforms/whatsapp/commands/whoami.test.ts +3 -3
  221. package/src/platforms/whatsapp/credential-manager.test.ts +23 -23
  222. package/src/platforms/whatsapp/ensure-auth.test.ts +4 -4
  223. package/src/platforms/whatsapp/index.test.ts +8 -8
  224. package/src/platforms/whatsapp/types.test.ts +42 -42
  225. package/src/platforms/whatsappbot/client.test.ts +27 -27
  226. package/src/platforms/whatsappbot/commands/auth.test.ts +14 -14
  227. package/src/platforms/whatsappbot/commands/message.test.ts +16 -16
  228. package/src/platforms/whatsappbot/commands/template.test.ts +9 -9
  229. package/src/platforms/whatsappbot/commands/whoami.test.ts +5 -5
  230. package/src/platforms/whatsappbot/credential-manager.test.ts +18 -18
  231. package/src/platforms/whatsappbot/index.test.ts +7 -7
  232. package/src/platforms/whatsappbot/types.test.ts +18 -18
  233. package/src/shared/chromium/browsers.test.ts +22 -22
  234. package/src/shared/chromium/cookie-reader.test.ts +13 -13
  235. package/src/shared/chromium/decryptor.test.ts +97 -32
  236. package/src/shared/chromium/decryptor.ts +27 -6
  237. package/src/shared/utils/concurrency.test.ts +6 -6
  238. package/src/shared/utils/derived-key-cache.test.ts +11 -11
  239. package/src/tui/utils.test.ts +31 -31
@@ -1,4 +1,4 @@
1
- import { beforeEach, describe, expect, mock, test } from 'bun:test'
1
+ import { beforeEach, describe, expect, mock, it } from 'bun:test'
2
2
 
3
3
  const mockSendGroupMessage = mock(() =>
4
4
  Promise.resolve({
@@ -306,7 +306,7 @@ describe('message commands', () => {
306
306
  )
307
307
  })
308
308
 
309
- test('sendAction sends a group message with wrapped blocks', async () => {
309
+ it('sendAction sends a group message with wrapped blocks', async () => {
310
310
  const result = await sendAction('group', 'grp-1', 'Hello group')
311
311
 
312
312
  expect(mockSendGroupMessage).toHaveBeenCalledWith('ws-1', 'grp-1', [{ type: 'text', value: 'Hello group' }])
@@ -319,7 +319,7 @@ describe('message commands', () => {
319
319
  })
320
320
  })
321
321
 
322
- test('sendAction sends a user chat message with wrapped blocks', async () => {
322
+ it('sendAction sends a user chat message with wrapped blocks', async () => {
323
323
  const result = await sendAction('user-chat', 'chat-1', 'Hello user chat')
324
324
 
325
325
  expect(mockSendUserChatMessage).toHaveBeenCalledWith('ws-1', 'chat-1', [{ type: 'text', value: 'Hello user chat' }])
@@ -332,7 +332,7 @@ describe('message commands', () => {
332
332
  })
333
333
  })
334
334
 
335
- test('sendAction sends a direct chat message with wrapped blocks', async () => {
335
+ it('sendAction sends a direct chat message with wrapped blocks', async () => {
336
336
  const result = await sendAction('direct-chat', 'dm-1', 'Hello direct chat')
337
337
 
338
338
  expect(mockSendDirectChatMessage).toHaveBeenCalledWith('ws-1', 'dm-1', [
@@ -347,7 +347,7 @@ describe('message commands', () => {
347
347
  })
348
348
  })
349
349
 
350
- test('listAction lists group messages with limit and sort options', async () => {
350
+ it('listAction lists group messages with limit and sort options', async () => {
351
351
  const result = await listAction('group', 'grp-1', { limit: '10', sort: 'asc' })
352
352
 
353
353
  expect(mockGetGroupMessages).toHaveBeenCalledWith('ws-1', 'grp-1', { limit: 10, sortOrder: 'asc' })
@@ -365,7 +365,7 @@ describe('message commands', () => {
365
365
  ])
366
366
  })
367
367
 
368
- test('listAction lists user chat messages', async () => {
368
+ it('listAction lists user chat messages', async () => {
369
369
  const result = await listAction('user-chat', 'chat-1')
370
370
 
371
371
  expect(mockGetUserChatMessages).toHaveBeenCalledWith('ws-1', 'chat-1', { limit: 25, sortOrder: 'desc' })
@@ -376,7 +376,7 @@ describe('message commands', () => {
376
376
  })
377
377
  })
378
378
 
379
- test('listAction lists direct chat messages', async () => {
379
+ it('listAction lists direct chat messages', async () => {
380
380
  const result = await listAction('direct-chat', 'dm-1')
381
381
 
382
382
  expect(mockGetDirectChatMessages).toHaveBeenCalledWith('ws-1', 'dm-1', { limit: 25, sortOrder: 'desc' })
@@ -387,21 +387,21 @@ describe('message commands', () => {
387
387
  })
388
388
  })
389
389
 
390
- test('getAction returns specific message by ID', async () => {
390
+ it('getAction returns specific message by ID', async () => {
391
391
  const result = await getAction('group', 'grp-1', 'msg-group-list-1')
392
392
 
393
393
  expect(result.error).toBeUndefined()
394
394
  expect(result.id).toBe('msg-group-list-1')
395
395
  })
396
396
 
397
- test('getAction returns error when message not found', async () => {
397
+ it('getAction returns error when message not found', async () => {
398
398
  const result = await getAction('group', 'grp-1', 'nonexistent')
399
399
 
400
400
  expect(result.error).toBeDefined()
401
401
  expect(result.error).toContain('not found')
402
402
  })
403
403
 
404
- test('searchAction searches team chat messages by default', async () => {
404
+ it('searchAction searches team chat messages by default', async () => {
405
405
  const result = await searchAction('search')
406
406
 
407
407
  expect(mockSearchTeamChatMessages).toHaveBeenCalledWith('ws-1', 'search', { limit: undefined })
@@ -420,7 +420,7 @@ describe('message commands', () => {
420
420
  ])
421
421
  })
422
422
 
423
- test('searchAction searches user chat messages with scope option', async () => {
423
+ it('searchAction searches user chat messages with scope option', async () => {
424
424
  const result = await searchAction('search', { scope: 'user-chat' })
425
425
 
426
426
  expect(mockSearchUserChatMessages).toHaveBeenCalledWith('ws-1', 'search', { limit: undefined })
@@ -439,13 +439,13 @@ describe('message commands', () => {
439
439
  ])
440
440
  })
441
441
 
442
- test('searchAction passes limit parameter', async () => {
442
+ it('searchAction passes limit parameter', async () => {
443
443
  await searchAction('test', { limit: '5' })
444
444
 
445
445
  expect(mockSearchTeamChatMessages).toHaveBeenCalledWith('ws-1', 'test', { limit: 5 })
446
446
  })
447
447
 
448
- test('searchAction returns error on failure', async () => {
448
+ it('searchAction returns error on failure', async () => {
449
449
  mockSearchTeamChatMessages.mockImplementation(() => Promise.reject(new Error('Network error')))
450
450
 
451
451
  const result = await searchAction('test')
@@ -454,7 +454,7 @@ describe('message commands', () => {
454
454
  expect(result.results).toBeUndefined()
455
455
  })
456
456
 
457
- test('searchAction returns error for invalid scope', async () => {
457
+ it('searchAction returns error for invalid scope', async () => {
458
458
  const result = await searchAction('test', { scope: 'invalid' })
459
459
 
460
460
  expect(result.error).toContain('Invalid --scope value')
@@ -462,7 +462,7 @@ describe('message commands', () => {
462
462
  expect(result.results).toBeUndefined()
463
463
  })
464
464
 
465
- test('searchAction handles zero hits', async () => {
465
+ it('searchAction handles zero hits', async () => {
466
466
  mockSearchTeamChatMessages.mockImplementation(() =>
467
467
  Promise.resolve({ hits: [], bots: [], sessions: [], groups: [] }),
468
468
  )
@@ -473,7 +473,7 @@ describe('message commands', () => {
473
473
  expect(result.error).toBeUndefined()
474
474
  })
475
475
 
476
- test('searchAction handles missing highlight plainText key', async () => {
476
+ it('searchAction handles missing highlight plainText key', async () => {
477
477
  mockSearchTeamChatMessages.mockImplementation(() =>
478
478
  Promise.resolve({
479
479
  hits: [
@@ -506,7 +506,7 @@ describe('message commands', () => {
506
506
  expect(result.results?.[0]?.plain_text).toBe('some message')
507
507
  })
508
508
 
509
- test('searchAction uses extractText for block-only messages', async () => {
509
+ it('searchAction uses extractText for block-only messages', async () => {
510
510
  mockSearchTeamChatMessages.mockImplementation(() =>
511
511
  Promise.resolve({
512
512
  hits: [
@@ -1,4 +1,4 @@
1
- import { beforeEach, describe, expect, mock, test } from 'bun:test'
1
+ import { beforeEach, describe, expect, mock, it } from 'bun:test'
2
2
 
3
3
  const mockGetChannel = mock(() => Promise.resolve({ id: 'ws-1', name: 'Workspace One' }))
4
4
  const mockListManagers = mock(() =>
@@ -81,7 +81,7 @@ describe('snapshot command', () => {
81
81
  mockListUserChats.mockClear()
82
82
  })
83
83
 
84
- test('brief snapshot returns workspace, groups (name only), chat counts, and hint', async () => {
84
+ it('brief snapshot returns workspace, groups (name only), chat counts, and hint', async () => {
85
85
  const result = await snapshotAction()
86
86
 
87
87
  expect(result.error).toBeUndefined()
@@ -100,7 +100,7 @@ describe('snapshot command', () => {
100
100
  expect(mockGetGroupMessages).not.toHaveBeenCalled()
101
101
  })
102
102
 
103
- test('brief groups-only returns group names without messages', async () => {
103
+ it('brief groups-only returns group names without messages', async () => {
104
104
  const result = await snapshotAction({ groupsOnly: true })
105
105
 
106
106
  expect(result.workspace).toEqual({ id: 'ws-1', name: 'Workspace One' })
@@ -112,7 +112,7 @@ describe('snapshot command', () => {
112
112
  expect(mockListUserChats).not.toHaveBeenCalled()
113
113
  })
114
114
 
115
- test('brief chats-only returns counts without recent details', async () => {
115
+ it('brief chats-only returns counts without recent details', async () => {
116
116
  const result = await snapshotAction({ chatsOnly: true })
117
117
 
118
118
  expect(result.workspace).toEqual({ id: 'ws-1', name: 'Workspace One' })
@@ -126,7 +126,7 @@ describe('snapshot command', () => {
126
126
  expect(mockGetGroupMessages).not.toHaveBeenCalled()
127
127
  })
128
128
 
129
- test('full snapshot returns workspace, managers, bots, groups, and user chats', async () => {
129
+ it('full snapshot returns workspace, managers, bots, groups, and user chats', async () => {
130
130
  const result = await snapshotAction({ full: true })
131
131
 
132
132
  expect(result.error).toBeUndefined()
@@ -201,7 +201,7 @@ describe('snapshot command', () => {
201
201
  })
202
202
  })
203
203
 
204
- test('full groups-only includes messages', async () => {
204
+ it('full groups-only includes messages', async () => {
205
205
  const result = await snapshotAction({ full: true, groupsOnly: true, limit: 3 })
206
206
 
207
207
  expect(mockGetGroupMessages).toHaveBeenCalledWith('ws-1', 'grp-1', { limit: 3, sortOrder: 'desc' })
@@ -214,7 +214,7 @@ describe('snapshot command', () => {
214
214
  })
215
215
  })
216
216
 
217
- test('full chats-only includes recent details', async () => {
217
+ it('full chats-only includes recent details', async () => {
218
218
  const result = await snapshotAction({ full: true, chatsOnly: true, limit: 1 })
219
219
 
220
220
  expect(result.workspace).toEqual({ id: 'ws-1', name: 'Workspace One' })
@@ -1,4 +1,4 @@
1
- import { beforeEach, describe, expect, mock, test } from 'bun:test'
1
+ import { beforeEach, describe, expect, mock, it } from 'bun:test'
2
2
 
3
3
  const mockGetAccount = mock(() =>
4
4
  Promise.resolve({
@@ -37,7 +37,7 @@ describe('whoami command', () => {
37
37
  )
38
38
  })
39
39
 
40
- test('whoamiAction returns account info', async () => {
40
+ it('returns account info', async () => {
41
41
  const result = await whoamiAction({})
42
42
 
43
43
  expect(mockGetAccount).toHaveBeenCalled()
@@ -53,7 +53,7 @@ describe('whoami command', () => {
53
53
  expect(result.error).toBeUndefined()
54
54
  })
55
55
 
56
- test('whoamiAction returns error when getAccount fails', async () => {
56
+ it('returns error when getAccount fails', async () => {
57
57
  mockGetAccount.mockImplementation(() => Promise.reject(new Error('Not authenticated')))
58
58
 
59
59
  const result = await whoamiAction({})
@@ -1,4 +1,4 @@
1
- import { afterEach, beforeEach, describe, expect, test } from 'bun:test'
1
+ import { afterEach, beforeEach, describe, expect, it } from 'bun:test'
2
2
  import { existsSync, mkdtempSync, rmSync } from 'node:fs'
3
3
  import { stat } from 'node:fs/promises'
4
4
  import { tmpdir } from 'node:os'
@@ -42,14 +42,14 @@ describe('ChannelCredentialManager', () => {
42
42
  delete process.env.E2E_CHANNEL_WORKSPACE_ID
43
43
  })
44
44
 
45
- test('returns empty config when no file exists', async () => {
45
+ it('returns empty config when no file exists', async () => {
46
46
  const config = await manager.load()
47
47
 
48
48
  expect(config.current).toBeNull()
49
49
  expect(config.workspaces).toEqual({})
50
50
  })
51
51
 
52
- test('persists config to file', async () => {
52
+ it('persists config to file', async () => {
53
53
  const config = {
54
54
  current: { workspace_id: '232986' },
55
55
  workspaces: {
@@ -63,11 +63,11 @@ describe('ChannelCredentialManager', () => {
63
63
  expect(loaded).toEqual(config)
64
64
  })
65
65
 
66
- test('returns null when no credentials exist', async () => {
66
+ it('returns null when no credentials exist', async () => {
67
67
  expect(await manager.getCredentials()).toBeNull()
68
68
  })
69
69
 
70
- test('returns current workspace credentials', async () => {
70
+ it('returns current workspace credentials', async () => {
71
71
  await manager.setCredentials(WORKSPACE_A)
72
72
 
73
73
  expect(await manager.getCredentials()).toEqual({
@@ -78,7 +78,7 @@ describe('ChannelCredentialManager', () => {
78
78
  })
79
79
  })
80
80
 
81
- test('returns specific workspace by id', async () => {
81
+ it('returns specific workspace by id', async () => {
82
82
  await manager.setCredentials(WORKSPACE_A)
83
83
  await manager.setCredentials(WORKSPACE_B)
84
84
 
@@ -90,13 +90,13 @@ describe('ChannelCredentialManager', () => {
90
90
  })
91
91
  })
92
92
 
93
- test('returns null for unknown workspace id', async () => {
93
+ it('returns null for unknown workspace id', async () => {
94
94
  await manager.setCredentials(WORKSPACE_A)
95
95
 
96
96
  expect(await manager.getCredentials('missing')).toBeNull()
97
97
  })
98
98
 
99
- test('env vars take precedence when no workspace id is specified', async () => {
99
+ it('env vars take precedence when no workspace id is specified', async () => {
100
100
  await manager.setCredentials(WORKSPACE_A)
101
101
 
102
102
  process.env.E2E_CHANNEL_ACCOUNT_COOKIE = 'env-account-cookie'
@@ -111,7 +111,7 @@ describe('ChannelCredentialManager', () => {
111
111
  })
112
112
  })
113
113
 
114
- test('env vars are ignored when a workspace id is explicitly provided', async () => {
114
+ it('env vars are ignored when a workspace id is explicitly provided', async () => {
115
115
  await manager.setCredentials(WORKSPACE_A)
116
116
 
117
117
  process.env.E2E_CHANNEL_ACCOUNT_COOKIE = 'env-account-cookie'
@@ -126,7 +126,7 @@ describe('ChannelCredentialManager', () => {
126
126
  })
127
127
  })
128
128
 
129
- test('stores multiple workspaces and marks the latest current', async () => {
129
+ it('stores multiple workspaces and marks the latest current', async () => {
130
130
  await manager.setCredentials(WORKSPACE_A)
131
131
  await manager.setCredentials(WORKSPACE_B)
132
132
 
@@ -136,7 +136,7 @@ describe('ChannelCredentialManager', () => {
136
136
  expect(config.current).toEqual({ workspace_id: '232987' })
137
137
  })
138
138
 
139
- test('lists all workspaces with current flag', async () => {
139
+ it('lists all workspaces with current flag', async () => {
140
140
  await manager.setCredentials(WORKSPACE_A)
141
141
  await manager.setCredentials(WORKSPACE_B)
142
142
 
@@ -147,7 +147,7 @@ describe('ChannelCredentialManager', () => {
147
147
  expect(all.find((workspace) => workspace.workspace_id === '232987')?.is_current).toBe(true)
148
148
  })
149
149
 
150
- test('switches current workspace', async () => {
150
+ it('switches current workspace', async () => {
151
151
  await manager.setCredentials(WORKSPACE_A)
152
152
  await manager.setCredentials(WORKSPACE_B)
153
153
 
@@ -160,11 +160,11 @@ describe('ChannelCredentialManager', () => {
160
160
  })
161
161
  })
162
162
 
163
- test('returns false when setting an unknown current workspace', async () => {
163
+ it('returns false when setting an unknown current workspace', async () => {
164
164
  expect(await manager.setCurrent('missing')).toBe(false)
165
165
  })
166
166
 
167
- test('removes a workspace by id', async () => {
167
+ it('removes a workspace by id', async () => {
168
168
  await manager.setCredentials(WORKSPACE_A)
169
169
  await manager.setCredentials(WORKSPACE_B)
170
170
 
@@ -172,7 +172,7 @@ describe('ChannelCredentialManager', () => {
172
172
  expect(await manager.listAll()).toHaveLength(1)
173
173
  })
174
174
 
175
- test('clears current when current workspace is removed', async () => {
175
+ it('clears current when current workspace is removed', async () => {
176
176
  await manager.setCredentials(WORKSPACE_A)
177
177
 
178
178
  await manager.removeWorkspace(WORKSPACE_A.workspace_id)
@@ -181,11 +181,11 @@ describe('ChannelCredentialManager', () => {
181
181
  expect(config.current).toBeNull()
182
182
  })
183
183
 
184
- test('returns false when removing an unknown workspace', async () => {
184
+ it('returns false when removing an unknown workspace', async () => {
185
185
  expect(await manager.removeWorkspace('missing')).toBe(false)
186
186
  })
187
187
 
188
- test('clears all credentials', async () => {
188
+ it('clears all credentials', async () => {
189
189
  await manager.setCredentials(WORKSPACE_A)
190
190
  await manager.setCredentials(WORKSPACE_B)
191
191
 
@@ -196,7 +196,7 @@ describe('ChannelCredentialManager', () => {
196
196
  expect(config.workspaces).toEqual({})
197
197
  })
198
198
 
199
- test('saves file with secure permissions', async () => {
199
+ it('saves file with secure permissions', async () => {
200
200
  await manager.setCredentials(WORKSPACE_A)
201
201
 
202
202
  const credentialsPath = join(tempDir, 'channel-credentials.json')
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeEach, describe, expect, mock, test } from 'bun:test'
1
+ import { afterAll, beforeEach, describe, expect, mock, it } from 'bun:test'
2
2
 
3
3
  import {
4
4
  ensureChannelAuth,
@@ -62,7 +62,7 @@ describe('ensureChannelAuth', () => {
62
62
  mockListChannels.mockImplementation(() => Promise.resolve([{ id: 'ws-1', name: 'Workspace 1' }]))
63
63
  })
64
64
 
65
- test('extracts and saves workspaces when no credentials exist', async () => {
65
+ it('extracts and saves workspaces when no credentials exist', async () => {
66
66
  mockExtract.mockImplementation(() =>
67
67
  Promise.resolve([
68
68
  {
@@ -101,7 +101,7 @@ describe('ensureChannelAuth', () => {
101
101
  expect(mockSetCurrent).toHaveBeenCalledWith('ws-1')
102
102
  })
103
103
 
104
- test('returns early when stored credentials are valid', async () => {
104
+ it('returns early when stored credentials are valid', async () => {
105
105
  mockGetCredentials.mockImplementation(() =>
106
106
  Promise.resolve({
107
107
  workspace_id: 'ws-1',
@@ -118,7 +118,7 @@ describe('ensureChannelAuth', () => {
118
118
  expect(mockSetCredentials).not.toHaveBeenCalled()
119
119
  })
120
120
 
121
- test('re-extracts when stored credentials are invalid', async () => {
121
+ it('re-extracts when stored credentials are invalid', async () => {
122
122
  mockGetCredentials.mockImplementation(() =>
123
123
  Promise.resolve({
124
124
  workspace_id: 'ws-1',
@@ -148,7 +148,7 @@ describe('ensureChannelAuth', () => {
148
148
  expect(mockSetCurrent).toHaveBeenCalledWith('ws-1')
149
149
  })
150
150
 
151
- test('returns gracefully when extractor yields no cookies', async () => {
151
+ it('returns gracefully when extractor yields no cookies', async () => {
152
152
  await ensureChannelAuth()
153
153
 
154
154
  expect(mockExtract).toHaveBeenCalledTimes(1)
@@ -1,4 +1,4 @@
1
- import { expect, test } from 'bun:test'
1
+ import { expect, it } from 'bun:test'
2
2
 
3
3
  import {
4
4
  BlockInlineAttrsSchema,
@@ -25,90 +25,90 @@ import {
25
25
  MessageBlockSchema,
26
26
  } from '@/platforms/channeltalk/index'
27
27
 
28
- test('ChannelClient is exported from barrel', () => {
28
+ it('ChannelClient is exported from barrel', () => {
29
29
  expect(typeof ChannelClient).toBe('function')
30
30
  })
31
31
 
32
- test('ChannelError is exported from barrel', () => {
32
+ it('ChannelError is exported from barrel', () => {
33
33
  expect(typeof ChannelError).toBe('function')
34
34
  })
35
35
 
36
- test('ChannelCredentialManager is exported from barrel', () => {
36
+ it('ChannelCredentialManager is exported from barrel', () => {
37
37
  expect(typeof ChannelCredentialManager).toBe('function')
38
38
  })
39
39
 
40
- test('ChannelSchema is exported from barrel', () => {
40
+ it('ChannelSchema is exported from barrel', () => {
41
41
  expect(typeof ChannelSchema.parse).toBe('function')
42
42
  })
43
43
 
44
- test('ChannelAccountSchema is exported from barrel', () => {
44
+ it('ChannelAccountSchema is exported from barrel', () => {
45
45
  expect(typeof ChannelAccountSchema.parse).toBe('function')
46
46
  })
47
47
 
48
- test('ChannelBotSchema is exported from barrel', () => {
48
+ it('ChannelBotSchema is exported from barrel', () => {
49
49
  expect(typeof ChannelBotSchema.parse).toBe('function')
50
50
  })
51
51
 
52
- test('ChannelConfigSchema is exported from barrel', () => {
52
+ it('ChannelConfigSchema is exported from barrel', () => {
53
53
  expect(typeof ChannelConfigSchema.parse).toBe('function')
54
54
  })
55
55
 
56
- test('ChannelCredentialsSchema is exported from barrel', () => {
56
+ it('ChannelCredentialsSchema is exported from barrel', () => {
57
57
  expect(typeof ChannelCredentialsSchema.parse).toBe('function')
58
58
  })
59
59
 
60
- test('ChannelDirectChatSchema is exported from barrel', () => {
60
+ it('ChannelDirectChatSchema is exported from barrel', () => {
61
61
  expect(typeof ChannelDirectChatSchema.parse).toBe('function')
62
62
  })
63
63
 
64
- test('ChannelGroupSchema is exported from barrel', () => {
64
+ it('ChannelGroupSchema is exported from barrel', () => {
65
65
  expect(typeof ChannelGroupSchema.parse).toBe('function')
66
66
  })
67
67
 
68
- test('ChannelManagerSchema is exported from barrel', () => {
68
+ it('ChannelManagerSchema is exported from barrel', () => {
69
69
  expect(typeof ChannelManagerSchema.parse).toBe('function')
70
70
  })
71
71
 
72
- test('ChannelMessageSchema is exported from barrel', () => {
72
+ it('ChannelMessageSchema is exported from barrel', () => {
73
73
  expect(typeof ChannelMessageSchema.parse).toBe('function')
74
74
  })
75
75
 
76
- test('ChannelSessionSchema is exported from barrel', () => {
76
+ it('ChannelSessionSchema is exported from barrel', () => {
77
77
  expect(typeof ChannelSessionSchema.parse).toBe('function')
78
78
  })
79
79
 
80
- test('ChannelUserChatSchema is exported from barrel', () => {
80
+ it('ChannelUserChatSchema is exported from barrel', () => {
81
81
  expect(typeof ChannelUserChatSchema.parse).toBe('function')
82
82
  })
83
83
 
84
- test('ChannelWorkspaceEntrySchema is exported from barrel', () => {
84
+ it('ChannelWorkspaceEntrySchema is exported from barrel', () => {
85
85
  expect(typeof ChannelWorkspaceEntrySchema.parse).toBe('function')
86
86
  })
87
87
 
88
- test('ChannelSearchHighlightSchema is exported from barrel', () => {
88
+ it('ChannelSearchHighlightSchema is exported from barrel', () => {
89
89
  expect(typeof ChannelSearchHighlightSchema.parse).toBe('function')
90
90
  })
91
91
 
92
- test('ChannelSearchHitSchema is exported from barrel', () => {
92
+ it('ChannelSearchHitSchema is exported from barrel', () => {
93
93
  expect(typeof ChannelSearchHitSchema.parse).toBe('function')
94
94
  })
95
95
 
96
- test('ChannelSearchResponseSchema is exported from barrel', () => {
96
+ it('ChannelSearchResponseSchema is exported from barrel', () => {
97
97
  expect(typeof ChannelSearchResponseSchema.parse).toBe('function')
98
98
  })
99
99
 
100
- test('ExtractedChannelTokenSchema is exported from barrel', () => {
100
+ it('ExtractedChannelTokenSchema is exported from barrel', () => {
101
101
  expect(typeof ExtractedChannelTokenSchema.parse).toBe('function')
102
102
  })
103
103
 
104
- test('MessageBlockSchema is exported from barrel', () => {
104
+ it('MessageBlockSchema is exported from barrel', () => {
105
105
  expect(typeof MessageBlockSchema.parse).toBe('function')
106
106
  })
107
107
 
108
- test('BlockInlineSchema is exported from barrel', () => {
108
+ it('BlockInlineSchema is exported from barrel', () => {
109
109
  expect(typeof BlockInlineSchema.parse).toBe('function')
110
110
  })
111
111
 
112
- test('BlockInlineAttrsSchema is exported from barrel', () => {
112
+ it('BlockInlineAttrsSchema is exported from barrel', () => {
113
113
  expect(typeof BlockInlineAttrsSchema.parse).toBe('function')
114
114
  })