typeclaw 0.44.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +7 -6
  2. package/src/agent/index.ts +11 -0
  3. package/src/agent/model-fallback.ts +59 -40
  4. package/src/agent/multimodal/look-at.ts +2 -1
  5. package/src/agent/provider-error.ts +71 -18
  6. package/src/agent/retry-same-ref.ts +139 -0
  7. package/src/agent/subagents.ts +6 -2
  8. package/src/agent/tools/channel-edit.ts +144 -0
  9. package/src/agent/tools/channel-fetch-attachment.ts +6 -5
  10. package/src/agent/tools/curl-impersonate.ts +40 -1
  11. package/src/agent/tools/webfetch/fetch.ts +86 -3
  12. package/src/agent/tools/webfetch/tool.ts +26 -3
  13. package/src/agent/tools/webfetch/types.ts +8 -0
  14. package/src/agent/turn-runner.ts +65 -36
  15. package/src/bundled-plugins/agent-browser/skills/agent-browser/SKILL.md +28 -11
  16. package/src/bundled-plugins/reviewer/skills/code-review.ts +22 -2
  17. package/src/channels/adapters/discord-bot-edit.ts +49 -0
  18. package/src/channels/adapters/discord-bot.ts +5 -0
  19. package/src/channels/adapters/discord-edit.ts +51 -0
  20. package/src/channels/adapters/discord.ts +4 -0
  21. package/src/channels/adapters/slack-bot-edit.ts +58 -0
  22. package/src/channels/adapters/slack-bot.ts +18 -6
  23. package/src/channels/adapters/slack-edit.ts +47 -0
  24. package/src/channels/adapters/slack.ts +5 -0
  25. package/src/channels/adapters/teams-edit.ts +61 -0
  26. package/src/channels/adapters/teams.ts +4 -0
  27. package/src/channels/adapters/telegram-bot-edit.ts +51 -0
  28. package/src/channels/adapters/telegram-bot.ts +5 -0
  29. package/src/channels/adapters/webex-bot.ts +5 -0
  30. package/src/channels/adapters/webex-edit.ts +47 -0
  31. package/src/channels/adapters/webex.ts +5 -0
  32. package/src/channels/continuation-willingness.ts +227 -35
  33. package/src/channels/router.ts +180 -14
  34. package/src/channels/schema.ts +24 -0
  35. package/src/channels/types.ts +36 -0
  36. package/src/server/command-runner.ts +2 -1
  37. package/src/server/index.ts +2 -1
@@ -18,6 +18,7 @@ import type {
18
18
 
19
19
  import { describeError } from './describe-error'
20
20
  import { classifyInbound, type InboundDropReason, TELEGRAM_WORKSPACE } from './telegram-bot-classify'
21
+ import { createTelegramEditMessageCallback } from './telegram-bot-edit'
21
22
  import { toTelegramMarkdownV2 } from './telegram-bot-format'
22
23
 
23
24
  export const TELEGRAM_API_BASE = 'https://api.telegram.org'
@@ -420,6 +421,7 @@ export function createTelegramBotAdapter(options: TelegramBotAdapterOptions): Te
420
421
  })
421
422
 
422
423
  const fetchAttachmentCallback = createFetchAttachmentCallback({ token: options.token, logger })
424
+ const editMessageCallback = createTelegramEditMessageCallback({ client })
423
425
 
424
426
  const handleMessage = async (event: TelegramMessage): Promise<void> => {
425
427
  inflightInbounds++
@@ -536,6 +538,7 @@ export function createTelegramBotAdapter(options: TelegramBotAdapterOptions): Te
536
538
  options.router.registerSelfIdentity('telegram-bot', selfIdentityResolver)
537
539
  options.router.registerFetchAttachment('telegram-bot', fetchAttachmentCallback)
538
540
  options.router.registerMembership('telegram-bot', membershipResolver)
541
+ options.router.registerEditMessage('telegram-bot', editMessageCallback)
539
542
 
540
543
  const rollbackStart = (reason: string, cause: Error): never => {
541
544
  options.router.unregisterOutbound('telegram-bot', outboundCallback)
@@ -545,6 +548,7 @@ export function createTelegramBotAdapter(options: TelegramBotAdapterOptions): Te
545
548
  options.router.unregisterSelfIdentity('telegram-bot', selfIdentityResolver)
546
549
  options.router.unregisterFetchAttachment('telegram-bot', fetchAttachmentCallback)
547
550
  options.router.unregisterMembership('telegram-bot', membershipResolver)
551
+ options.router.unregisterEditMessage('telegram-bot', editMessageCallback)
548
552
  listener?.stop()
549
553
  listener = null
550
554
  botUser = null
@@ -574,6 +578,7 @@ export function createTelegramBotAdapter(options: TelegramBotAdapterOptions): Te
574
578
  options.router.unregisterSelfIdentity('telegram-bot', selfIdentityResolver)
575
579
  options.router.unregisterFetchAttachment('telegram-bot', fetchAttachmentCallback)
576
580
  options.router.unregisterMembership('telegram-bot', membershipResolver)
581
+ options.router.unregisterEditMessage('telegram-bot', editMessageCallback)
577
582
  // Stop the listener BEFORE waiting for inflight handlers. The SDK's
578
583
  // `stop()` aborts the in-flight `getUpdates` long-poll and
579
584
  // increments its generation counter so any pending dispatch is
@@ -33,6 +33,7 @@ import { describeError } from './describe-error'
33
33
  import { createWebexChannelNameResolver } from './webex-bot-channel-resolver'
34
34
  import { classifyInbound, type InboundDropReason, type WebexInboundMessage } from './webex-bot-classify'
35
35
  import { enrichWebexMessageReference } from './webex-bot-reference'
36
+ import { createWebexEditMessageCallback } from './webex-edit'
36
37
  import { resolveWebexBodyText } from './webex-format'
37
38
  import { createWebexPrefetchLimiter, isWebexRateLimitError, type WebexPrefetchLimiter } from './webex-prefetch-limiter'
38
39
 
@@ -312,6 +313,7 @@ export function createWebexBotAdapter(options: WebexBotAdapterOptions): WebexBot
312
313
  })
313
314
  const outboundCallback = createOutboundCallback({ client, logger, formatChannelTag })
314
315
  const fetchAttachmentCallback = createFetchAttachmentCallback({ token: options.token, logger, fetchImpl })
316
+ const editMessageCallback = createWebexEditMessageCallback({ adapter: 'webex-bot', client })
315
317
 
316
318
  const handleMessage = async (event: WebexInboundMessage): Promise<void> => {
317
319
  inflightInbounds++
@@ -395,6 +397,7 @@ export function createWebexBotAdapter(options: WebexBotAdapterOptions): WebexBot
395
397
  options.router.registerHistory('webex-bot', historyCallback)
396
398
  options.router.registerFetchAttachment('webex-bot', fetchAttachmentCallback)
397
399
  options.router.registerMembership('webex-bot', membershipResolver)
400
+ options.router.registerEditMessage('webex-bot', editMessageCallback)
398
401
 
399
402
  const rollbackStart = (reason: string, cause: Error): never => {
400
403
  options.router.unregisterOutbound('webex-bot', outboundCallback)
@@ -403,6 +406,7 @@ export function createWebexBotAdapter(options: WebexBotAdapterOptions): WebexBot
403
406
  options.router.unregisterHistory('webex-bot', historyCallback)
404
407
  options.router.unregisterFetchAttachment('webex-bot', fetchAttachmentCallback)
405
408
  options.router.unregisterMembership('webex-bot', membershipResolver)
409
+ options.router.unregisterEditMessage('webex-bot', editMessageCallback)
406
410
  listener?.stop()
407
411
  listener = null
408
412
  botPerson = null
@@ -434,6 +438,7 @@ export function createWebexBotAdapter(options: WebexBotAdapterOptions): WebexBot
434
438
  options.router.unregisterHistory('webex-bot', historyCallback)
435
439
  options.router.unregisterFetchAttachment('webex-bot', fetchAttachmentCallback)
436
440
  options.router.unregisterMembership('webex-bot', membershipResolver)
441
+ options.router.unregisterEditMessage('webex-bot', editMessageCallback)
437
442
  listener?.stop()
438
443
  listener = null
439
444
  connected = false
@@ -0,0 +1,47 @@
1
+ import type { AdapterId } from '@/channels/schema'
2
+ import type { EditMessageCallback, EditMessageResult } from '@/channels/types'
3
+
4
+ // Both WebexClient and WebexBotClient expose the same edit primitive
5
+ // (webex-bot delegates to webex), so one factory serves both adapters —
6
+ // parameterized on the adapter id it guards against. Webex addresses an edit
7
+ // by (messageId, roomId): the router's `chat` IS the roomId.
8
+ type WebexEditClient = {
9
+ editMessage: (messageId: string, roomId: string, text: string, options?: { markdown?: boolean }) => Promise<unknown>
10
+ }
11
+
12
+ export function createWebexEditMessageCallback(deps: {
13
+ adapter: Extract<AdapterId, 'webex' | 'webex-bot'>
14
+ client: WebexEditClient
15
+ }): EditMessageCallback {
16
+ return async (req): Promise<EditMessageResult> => {
17
+ if (req.adapter !== deps.adapter) {
18
+ return { ok: false, error: `unknown adapter: ${req.adapter}`, code: 'not-supported' }
19
+ }
20
+ try {
21
+ await deps.client.editMessage(req.messageId, req.chat, req.text)
22
+ } catch (err) {
23
+ return { ok: false, error: describe(err), code: classifyEditError(err) }
24
+ }
25
+ return { ok: true }
26
+ }
27
+ }
28
+
29
+ // Webex REST returns 404 for a gone/foreign message id and 403 when the token
30
+ // can't edit the target; anything else is treated as a soft not-found miss.
31
+ function classifyEditError(err: unknown): NonNullable<(EditMessageResult & { ok: false })['code']> {
32
+ const status = httpStatus(err)
33
+ if (status === 403 || status === 401) return 'permission-denied'
34
+ return 'not-found'
35
+ }
36
+
37
+ function httpStatus(err: unknown): number | null {
38
+ if (typeof err === 'object' && err !== null && 'status' in err) {
39
+ const status = (err as { status: unknown }).status
40
+ if (typeof status === 'number') return status
41
+ }
42
+ return null
43
+ }
44
+
45
+ function describe(err: unknown): string {
46
+ return err instanceof Error ? err.message : String(err)
47
+ }
@@ -37,6 +37,7 @@ import type { WebexAccountRecord } from '@/secrets/schema'
37
37
  import { describeError } from './describe-error'
38
38
  import { createWebexChannelNameResolver } from './webex-channel-resolver'
39
39
  import { classifyInbound, type InboundDropReason, type WebexInboundMessage } from './webex-classify'
40
+ import { createWebexEditMessageCallback } from './webex-edit'
40
41
  import { resolveWebexBodyText } from './webex-format'
41
42
  import { createWebexPrefetchLimiter, isWebexRateLimitError, type WebexPrefetchLimiter } from './webex-prefetch-limiter'
42
43
  import { enrichWebexMessageReference } from './webex-reference'
@@ -365,6 +366,7 @@ export function createWebexAdapter(options: WebexAdapterOptions): WebexAdapter {
365
366
  const outboundCallback = createOutboundCallback({ client, logger, formatChannelTag })
366
367
  const typingCallback = createTypingCallback({ client, logger, formatChannelTag })
367
368
  const fetchAttachmentCallback = createFetchAttachmentCallback({ tokenRef: () => currentToken, logger, fetchImpl })
369
+ const editMessageCallback = createWebexEditMessageCallback({ adapter: 'webex', client })
368
370
 
369
371
  const handleMessage = async (event: WebexInboundMessage): Promise<void> => {
370
372
  inflightInbounds++
@@ -457,6 +459,7 @@ export function createWebexAdapter(options: WebexAdapterOptions): WebexAdapter {
457
459
  options.router.registerHistory('webex', historyCallback)
458
460
  options.router.registerFetchAttachment('webex', fetchAttachmentCallback)
459
461
  options.router.registerMembership('webex', membershipResolver)
462
+ options.router.registerEditMessage('webex', editMessageCallback)
460
463
 
461
464
  const rollbackStart = (reason: string, cause: Error): never => {
462
465
  options.router.unregisterOutbound('webex', outboundCallback)
@@ -467,6 +470,7 @@ export function createWebexAdapter(options: WebexAdapterOptions): WebexAdapter {
467
470
  options.router.unregisterHistory('webex', historyCallback)
468
471
  options.router.unregisterFetchAttachment('webex', fetchAttachmentCallback)
469
472
  options.router.unregisterMembership('webex', membershipResolver)
473
+ options.router.unregisterEditMessage('webex', editMessageCallback)
470
474
  listener?.stop()
471
475
  listener = null
472
476
  botPerson = null
@@ -501,6 +505,7 @@ export function createWebexAdapter(options: WebexAdapterOptions): WebexAdapter {
501
505
  options.router.unregisterHistory('webex', historyCallback)
502
506
  options.router.unregisterFetchAttachment('webex', fetchAttachmentCallback)
503
507
  options.router.unregisterMembership('webex', membershipResolver)
508
+ options.router.unregisterEditMessage('webex', editMessageCallback)
504
509
  listener?.stop()
505
510
  listener = null
506
511
  connected = false
@@ -91,45 +91,57 @@ const EN_PHRASES: readonly string[] = [
91
91
  'let me add',
92
92
  'let me create',
93
93
  'let me handle',
94
+ // Casual/contracted acks chat models emit. "imma"/"ima"/"gonna" are the
95
+ // spoken-future contractions; in an assistant reply "gonna VERB" is self-directed
96
+ // (a rival "you're gonna" is other-directed and never a willingness signal here).
97
+ 'lemme dig',
98
+ 'imma check',
99
+ 'gonna check',
100
+ 'gonna look',
101
+ 'ima look',
102
+ 'let me go check',
103
+ 'let me peek',
104
+ 'gimme a sec',
94
105
  ]
95
106
 
96
- // Korean: the -겠습니다/-겠어요 and -ㄹ게요 verb endings are first-person
107
+ // Korean: the -겠습니다/-겠어요 and -ㄹ게(요) verb endings are first-person
97
108
  // volitional — they cannot address the listener, so they are safe self-direction
98
109
  // anchors. The -겠습니다/-겠어요 form is matched by MORPHEME_PATTERNS below (it
99
- // generalizes across all action verbs), so only the -게요/-게여 forms and stall
100
- // idioms are enumerated here. Bare adverb+noun fragments ("바로 확인", "계속 확인",
101
- // "곧 알려") are deliberately NOT listed: without the volitional ending they match
102
- // other-directed requests ("바로 확인 부탁드려요" = "please check") and descriptive
103
- // progressives ("계속 확인 중입니다" = "I'm still checking") — the exact false
104
- // positives the design forbids. Their volitional forms are caught by the morpheme
105
- // regex regardless.
110
+ // generalizes across all action verbs), so only the -ㄹ게 forms and stall idioms
111
+ // are enumerated here. Each entry is the CASUAL (banmal) -게 base; the polite -게요
112
+ // / -게여 forms match too because the substring pass tests `includes` (볼게 ⊂
113
+ // 볼게요). Enumerating the casual base is deliberate over a broad `[ㄹ-final]게`
114
+ // morpheme regex: that would also fire on the adverbial -게 of adjective stems
115
+ // (힘들게 "hard-ly", 멀게 "far-ly", 길게 "long-ly"), violating the file's
116
+ // prefer-false-negatives bias. Bare adverb+noun fragments ("바로 확인", "계속 확인")
117
+ // are still excluded: without the -게 volitional they match other-directed requests
118
+ // ("바로 확인 부탁드려요" = "please check") and descriptive progressives ("계속 확인
119
+ // 중입니다" = "I'm still checking"). The persona speaking banmal ("확인해볼게!") was
120
+ // the production miss that closed a Discord turn in silence.
106
121
  const KO_PHRASES: readonly string[] = [
107
- '확인해볼게요',
108
- '확인해 볼게요',
109
- '확인할게요',
110
- '확인할게여',
111
- '계속 진행할게요',
112
- '계속할게요',
113
- '바로 볼게요',
114
- '살펴볼게요',
115
- '볼게요',
116
- '볼게여',
117
- '검토할게요',
118
- '검토해볼게요',
119
- '조회해볼게요',
120
- '찾아볼게요',
121
- '알아볼게요',
122
- '처리할게요',
123
- '알려드릴게요',
124
- // Action/config verb -게요 forms (the -겠습니다 siblings are covered by the
125
- // morpheme regex; these are the casual-polite variants chat models also emit).
126
- '업데이트할게요',
127
- '수정할게요',
128
- '설정할게요',
129
- '반영할게요',
130
- '적용할게요',
131
- '추가할게요',
132
- '생성할게요',
122
+ '확인해볼게',
123
+ '확인해 볼게',
124
+ '확인할게',
125
+ '계속 진행할게',
126
+ '계속할게',
127
+ '살펴볼게',
128
+ '볼게',
129
+ '검토할게',
130
+ '검토해볼게',
131
+ '조회해볼게',
132
+ '찾아볼게',
133
+ '알아볼게',
134
+ '처리할게',
135
+ '알려드릴게',
136
+ // Action/config verb -게 forms (the -겠습니다 siblings are covered by the
137
+ // morpheme regex; these are the casual/casual-polite variants chat models emit).
138
+ '업데이트할게',
139
+ '수정할게',
140
+ '설정할게',
141
+ '반영할게',
142
+ '적용할게',
143
+ '추가할게',
144
+ '생성할게',
133
145
  '잠시만요',
134
146
  '잠깐만요',
135
147
  ]
@@ -181,6 +193,21 @@ const ES_PHRASES: readonly string[] = [
181
193
  'voy a aplicar',
182
194
  'déjame actualizar',
183
195
  'déjame corregir',
196
+ // Casual register: "déjame ver/checar" (the colloquial twins of the déjame-forms
197
+ // above), and "ya lo"/"ahora mismo" + bare present, whose temporal anchor pins the
198
+ // present-as-future so it can't read as the descriptive "reviso [cada mañana]".
199
+ // "checar" is the LatAm colloquial for "revisar".
200
+ 'déjame ver',
201
+ 'déjame checar',
202
+ 'ya lo reviso',
203
+ 'lo reviso ya',
204
+ 'ya lo checo',
205
+ 'lo checo ya',
206
+ 'me pongo a revisar',
207
+ 'ahora mismo reviso',
208
+ 'voy a darle un vistazo',
209
+ 'reviso y te digo',
210
+ 'lo checo enseguida',
184
211
  ]
185
212
 
186
213
  // French: "je vais" + work verb; "laisse-moi" idioms.
@@ -213,6 +240,17 @@ const FR_PHRASES: readonly string[] = [
213
240
  'je vais appliquer',
214
241
  'laisse-moi corriger',
215
242
  'laisse-moi mettre à jour',
243
+ // Casual: the "check" anglicism (not a native French word, so zero descriptive
244
+ // ambiguity), "laisse-moi voir" (colloquial twin of laisse-moi vérifier),
245
+ // present+"rapidement" (the adverb forces future intent), and "je m'en charge"
246
+ // ("I'll take charge of it"). Bare "je regarde"/"je vérifie" are deliberately
247
+ // omitted — present tense alone reads as descriptive "I'm looking [right now]".
248
+ 'je check ça',
249
+ 'laisse-moi voir',
250
+ 'je vais checker',
251
+ 'je regarde rapidement',
252
+ 'je vérifie rapidement',
253
+ "je m'en charge",
216
254
  ]
217
255
 
218
256
  // Italian: "vado a" / "fammi" + work verb; "controllo subito" idioms.
@@ -242,6 +280,16 @@ const IT_PHRASES: readonly string[] = [
242
280
  'vado ad applicare',
243
281
  'fammi aggiornare',
244
282
  'fammi correggere',
283
+ // Casual: "fammi vedere" (colloquial twin of fammi controllare), present+"subito"/
284
+ // "adesso" (temporal anchor forces future), "vado a vedere", and "ci guardo io"
285
+ // (the "io" makes it emphatically self-directed). Bare "controllo"/"guardo" are
286
+ // omitted — present alone reads descriptive ("guardo la TV" = I'm watching TV).
287
+ 'fammi vedere',
288
+ 'vedo subito',
289
+ 'vado a vedere',
290
+ 'ci guardo io',
291
+ 'controllo adesso',
292
+ 'verifico adesso',
245
293
  ]
246
294
 
247
295
  // Portuguese: "vou" + work verb; "deixa eu" idioms.
@@ -272,6 +320,18 @@ const PT_PHRASES: readonly string[] = [
272
320
  'vou aplicar',
273
321
  'deixa eu atualizar',
274
322
  'deixa eu corrigir',
323
+ // Casual (BR-leaning): "vou ver" (the most common informal ack), "deixa eu ver/
324
+ // checar" and "deixa que eu vejo" (colloquial "let me"), "deixa comigo" ("leave it
325
+ // to me"), and "já vou ver"/"já dou uma olhada"/"...agora" (the já/agora temporal
326
+ // anchor forces future). "checar" is the BR colloquial for "verificar".
327
+ 'vou ver',
328
+ 'deixa eu ver',
329
+ 'deixa eu checar',
330
+ 'deixa comigo',
331
+ 'já vou ver',
332
+ 'verifico agora',
333
+ 'deixa que eu vejo',
334
+ 'já dou uma olhada',
275
335
  ]
276
336
 
277
337
  // German: "ich werde" / "lass mich" + work verb; "ich schaue gleich" idioms.
@@ -306,6 +366,22 @@ const DE_PHRASES: readonly string[] = [
306
366
  'ich werde anwenden',
307
367
  'lass mich aktualisieren',
308
368
  'lass mich korrigieren',
369
+ // Casual: present-as-future with the "mal"/"kurz"/"nach" particles ("ich schau
370
+ // mal", "ich guck nach"), the V2-inverted "schau ich mir" (word order flags 1sg),
371
+ // the Germanized "ich check das", and the take-responsibility forms ("ich kümmere
372
+ // mich", "das übernehm ich", "ich nehm das"). Bare "ich schau" is omitted — it also
373
+ // fits "ich schau dir zu" (I'm watching you), which is not a work promise.
374
+ 'ich schau mal',
375
+ 'ich guck mal',
376
+ 'ich schau nach',
377
+ 'ich guck nach',
378
+ 'schau ich mir',
379
+ 'ich kümmere mich',
380
+ 'ich check das',
381
+ 'das übernehm ich',
382
+ 'ich nehm das',
383
+ 'ich geh das checken',
384
+ 'ich schau kurz',
309
385
  ]
310
386
 
311
387
  // Russian: first-person-future verbs (проверю/посмотрю/продолжу) — the -ю/-у
@@ -333,6 +409,24 @@ const RU_PHRASES: readonly string[] = [
333
409
  'я применю',
334
410
  'сейчас обновлю',
335
411
  'сейчас исправлю',
412
+ // Colloquial: "щас" is the ubiquitous informal spelling of "сейчас"; "гляну" is
413
+ // bare 1sg perfective of глянуть — morphologically locked to "I will" (2sg is
414
+ // глянешь, 3sg глянет), so it's self-directed even without a pronoun. All entries
415
+ // pair a 1sg-perfective verb (гляну/посмотрю/проверю/разберусь/сделаю/поправлю)
416
+ // with щас/сейчас/дай, none of which can read as descriptive or other-directed.
417
+ 'гляну',
418
+ 'щас гляну',
419
+ 'сейчас гляну',
420
+ 'щас посмотрю',
421
+ 'щас проверю',
422
+ 'дай гляну',
423
+ 'дай посмотреть',
424
+ 'сейчас разберусь',
425
+ 'щас разберусь',
426
+ 'сейчас сделаю',
427
+ 'щас сделаю',
428
+ 'сейчас поправлю',
429
+ 'щас поправлю',
336
430
  ]
337
431
 
338
432
  // Chinese: 我会/我来/我再 + work verb. Full multi-character intent phrases only;
@@ -370,6 +464,17 @@ const ZH_PHRASES: readonly string[] = [
370
464
  '我马上更新',
371
465
  '让我更新',
372
466
  '让我改一下',
467
+ // Casual/spoken: 去+verb (我去看下/我去核实) and 来+verb (我来处理/我来瞧瞧) mark quick
468
+ // self-initiated action. Entries are ≥4 chars ending in a volitional suffix. The
469
+ // 2-char 我看/我查 are omitted (descriptive 我看你说的对 = "I see you're right"), and
470
+ // the 3-char reduplications 我看看/我查查 are omitted too: they fall under MIN_LENGTH
471
+ // as standalone acks, and embedded they risk the past-narrative 我看看了 ("I glanced").
472
+ '我去看下',
473
+ '我来处理',
474
+ '我搜一下',
475
+ '我确认下',
476
+ '我去核实',
477
+ '我来瞧瞧',
373
478
  ]
374
479
 
375
480
  // Japanese: handled by the JA_VOLITIONAL morpheme check below (-します/-いたします/
@@ -383,6 +488,24 @@ const JA_PHRASES: readonly string[] = [
383
488
  '続けます',
384
489
  '少々お待ちください',
385
490
  'ちょっと待ってください',
491
+ // Casual plain form (タメ口), particle-anchored. Bare dictionary forms (見る/確認する)
492
+ // are the SAME as descriptive present and far too ambiguous, so each entry pins a
493
+ // work verb to a self-commitment sentence-final particle: 〜ね (volitional), 〜わ
494
+ // (soft assertion), or the 〜とく/〜てくる/〜てみる auxiliaries that already imply
495
+ // "I'll take care of / go do / try". 〜よ is excluded (it can be merely informational).
496
+ '確認するね',
497
+ '調べるね',
498
+ '見てみるね',
499
+ '確認しとくね',
500
+ '調べとくね',
501
+ 'チェックしとくね',
502
+ '見とくね',
503
+ '見てみるわ',
504
+ '調べてみるね',
505
+ '確認してみるね',
506
+ '見てくるね',
507
+ '調べてくるね',
508
+ 'すぐ見るね',
386
509
  ]
387
510
 
388
511
  // Arabic: future particle سـ prefixed first-person verb (سأتحقق = "I will
@@ -408,12 +531,45 @@ const AR_PHRASES: readonly string[] = [
408
531
  'سأصلح',
409
532
  'سأنشئ',
410
533
  'سأضيف',
534
+ // Colloquial dialects: explicit future markers راح/رح (Gulf/Levantine) and هـ
535
+ // (Egyptian) + verb, plus خليني ("let me") and بدي ("I want to", Levantine
536
+ // volitional). Bare بشوف is omitted — بـ+imperfect is present-habitual in some
537
+ // dialects, so it can read descriptive. شيك only appears prefixed (هاشيك/راح أشيك)
538
+ // so it can't collide with the noun شيك ("cheque").
539
+ 'راح أشوف',
540
+ 'رح أشوف',
541
+ 'هشوف',
542
+ 'هأشوف',
543
+ 'خليني أشوف',
544
+ 'رح أتأكد',
545
+ 'هاشيك',
546
+ 'راح أشيك',
547
+ 'رح أتحقق',
548
+ 'بدي أشوف',
549
+ 'هجيب المعلومة',
550
+ 'راح أراجع',
411
551
  ]
412
552
 
413
553
  // Hindi: first-person-future is the -ūṅgā/-ūṅgī suffix, matched by
414
554
  // MORPHEME_PATTERNS below (it covers all X-करना compounds). Only the stall idiom
415
555
  // is enumerated here.
416
- const HI_PHRASES: readonly string[] = ['एक मिनट रुकिए']
556
+ // Casual Hindi uses the habitual present (देखता हूँ) for immediate intent, but only
557
+ // with an immediacy anchor (अभी "now", जरा "just") or the completive ले, which mark
558
+ // volition; bare देखता हूँ / करता हूँ are omitted (descriptive "I'm looking / I do").
559
+ // Both genders (-ता/-ती) are listed since the ending marks speaker gender. The formal
560
+ // -ऊँगा future is already covered by MORPHEME_PATTERNS. एक मिनट रुकिए is the stall idiom.
561
+ const HI_PHRASES: readonly string[] = [
562
+ 'एक मिनट रुकिए',
563
+ 'अभी देखता हूँ',
564
+ 'देख लेता हूँ',
565
+ 'मैं देख लेता हूँ',
566
+ 'अभी चेक करता हूँ',
567
+ 'चेक कर लेता हूँ',
568
+ 'अभी देख लेता हूँ',
569
+ 'जरा देखता हूँ',
570
+ 'देख लेती हूँ',
571
+ 'चेक कर लेती हूँ',
572
+ ]
417
573
 
418
574
  // Turkish: first-person-future "-eceğim/-acağım" is matched by MORPHEME_PATTERNS
419
575
  // below. The present-progressive ("ediyorum" = "I'm checking now"), optative
@@ -428,6 +584,16 @@ const TR_PHRASES: readonly string[] = [
428
584
  'hemen bakıyorum',
429
585
  'bir saniye',
430
586
  'bir dakika',
587
+ // Casual: the -eyim/-ayım optative ("let me VERB") is the safest volition anchor
588
+ // (bakayım/edeyim/atayım/inceleyeyim); the -ır/-ar aorist (bakarım) is only added
589
+ // with hemen/şimdi to force future over habitual. -yor present-continuous
590
+ // (bakıyorum) is NOT extended — it's descriptive "I'm looking [now]". baksana is
591
+ // excluded (imperative "look!", other-directed).
592
+ 'şuna bakayım',
593
+ 'bir inceleyeyim',
594
+ 'bir göz atayım',
595
+ 'şimdi bakayım',
596
+ 'hemen bakarım',
431
597
  ]
432
598
 
433
599
  // Vietnamese: "tôi sẽ" / "để tôi" (I will / let me) + work verb.
@@ -449,6 +615,16 @@ const VI_PHRASES: readonly string[] = [
449
615
  'tôi sẽ thêm',
450
616
  'để tôi cập nhật',
451
617
  'để tôi sửa',
618
+ // Casual/Southern: "coi" is the Southern colloquial for "xem" (look); "thử" (try)
619
+ // is a strong volition marker, so coi/xem/kiểm tra + thử are safe. Bare "để coi" is
620
+ // omitted — it can mean "let's see [what happens]" (观望), not a work promise.
621
+ 'coi thử',
622
+ 'để tôi coi',
623
+ 'xem thử',
624
+ 'tôi coi thử',
625
+ 'kiểm tra thử',
626
+ 'coi một lúc',
627
+ 'để tôi coi thử',
452
628
  ]
453
629
 
454
630
  // Indonesian: "saya akan" / "biar saya" (I will / let me) + work verb.
@@ -473,6 +649,22 @@ const ID_PHRASES: readonly string[] = [
473
649
  'saya akan tambah',
474
650
  'biar saya perbaiki',
475
651
  'biar saya perbarui',
652
+ // Casual/spoken: "coba" (let/try) leads a volitional; "dulu"/"aja"/"sekarang" anchor
653
+ // the bare present as imminent ("saya cek dulu" = "I'll check first"). "liat" is the
654
+ // casual "lihat". Bare "saya cek"/"saya liat" are omitted (present/past ambiguous),
655
+ // and the Javanese "tak" prefix is excluded (3-char substring collides with takut
656
+ // "afraid", menata "arrange").
657
+ 'coba saya cek',
658
+ 'saya cek dulu',
659
+ 'liat dulu',
660
+ 'saya liat dulu',
661
+ 'coba saya liat',
662
+ 'saya cek aja',
663
+ 'liat dulu ya',
664
+ 'saya cek sekarang',
665
+ 'saya bantu cek',
666
+ 'saya usahakan cek',
667
+ 'liat sebentar',
476
668
  ]
477
669
 
478
670
  const ALL_PHRASES: readonly string[] = [