@wirecat/cli-core 0.707.0 → 0.709.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 (39) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cli/list-query.d.ts +5 -0
  3. package/dist/cli/list-query.js +9 -0
  4. package/dist/cli/messenger/conversation-answers.d.ts +4 -0
  5. package/dist/cli/messenger/message-answers.d.ts +4 -0
  6. package/dist/cli/messenger/message-writes.d.ts +8 -0
  7. package/dist/crm/cli/changes.d.ts +2 -0
  8. package/dist/crm/cli/changes.js +4 -2
  9. package/dist/crm/cli/index.d.ts +2 -0
  10. package/dist/crm/cli/index.js +17 -13
  11. package/dist/crm/cli/records.d.ts +2 -0
  12. package/dist/crm/cli/records.js +25 -8
  13. package/dist/crm/cli/search-all.d.ts +3 -1
  14. package/dist/crm/cli/search-all.js +5 -4
  15. package/dist/entities/contact-context.d.ts +8 -0
  16. package/dist/entities/conversation-results.d.ts +8 -0
  17. package/dist/entities/evidence.d.ts +32 -0
  18. package/dist/entities/index.d.ts +73 -88
  19. package/dist/entities/index.js +1 -0
  20. package/dist/entities/listener.d.ts +16 -0
  21. package/dist/entities/message-change.d.ts +4 -0
  22. package/dist/entities/message-context.d.ts +12 -0
  23. package/dist/entities/message-write.d.ts +16 -0
  24. package/dist/entities/message.d.ts +5 -0
  25. package/dist/entities/message.js +2 -0
  26. package/dist/entities/store-records.d.ts +4 -0
  27. package/dist/errors/reasons.js +2 -0
  28. package/dist/mail/cli/inbox.d.ts +15 -0
  29. package/dist/mail/cli/inbox.js +208 -0
  30. package/dist/mail/cli/index.d.ts +1 -0
  31. package/dist/mail/cli/index.js +1 -0
  32. package/dist/mail/cli/review.js +12 -8
  33. package/dist/mail/inbox.d.ts +108 -0
  34. package/dist/mail/inbox.js +215 -0
  35. package/dist/mail/index.d.ts +1 -0
  36. package/dist/mail/index.js +1 -0
  37. package/dist/ports/wirecat-tools.js +7 -0
  38. package/package.json +1 -1
  39. package/parity.json +23 -0
@@ -661,6 +661,10 @@ export declare const ENTITIES: {
661
661
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
662
662
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
663
663
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
664
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
665
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
666
+ readonly reason: v.StringSchema<undefined>;
667
+ }, undefined>, undefined>;
664
668
  }, undefined>, undefined>;
665
669
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
666
670
  }, undefined>;
@@ -884,6 +888,10 @@ export declare const ENTITIES: {
884
888
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
885
889
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
886
890
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
891
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
892
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
893
+ readonly reason: v.StringSchema<undefined>;
894
+ }, undefined>, undefined>;
887
895
  }, undefined>, undefined>;
888
896
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
889
897
  }, undefined>, v.StrictObjectSchema<{
@@ -1112,6 +1120,10 @@ export declare const ENTITIES: {
1112
1120
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1113
1121
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1114
1122
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1123
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
1124
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
1125
+ readonly reason: v.StringSchema<undefined>;
1126
+ }, undefined>, undefined>;
1115
1127
  }, undefined>, undefined>;
1116
1128
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
1117
1129
  }, undefined>, undefined>;
@@ -1479,6 +1491,10 @@ export declare const ENTITIES: {
1479
1491
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1480
1492
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1481
1493
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1494
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
1495
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
1496
+ readonly reason: v.StringSchema<undefined>;
1497
+ }, undefined>, undefined>;
1482
1498
  }, undefined>, undefined>;
1483
1499
  /** The files the message carries; absent when it has none. */
1484
1500
  readonly attachments: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
@@ -1490,94 +1506,7 @@ export declare const ENTITIES: {
1490
1506
  }, undefined>, undefined>, undefined>;
1491
1507
  readonly untrusted: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
1492
1508
  }, undefined>;
1493
- readonly "message.summary": v.StrictObjectSchema<{
1494
- readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
1495
- readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1496
- readonly chat_title: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
1497
- readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1498
- readonly sender_is_me: v.BooleanSchema<undefined>;
1499
- readonly timestamp: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
1500
- readonly text: v.StringSchema<undefined>;
1501
- readonly transcript: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1502
- readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
1503
- readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
1504
- readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
1505
- readonly kind: v.StringSchema<undefined>;
1506
- readonly position: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1507
- readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1508
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1509
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1510
- readonly mime: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1511
- readonly size: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1512
- readonly width: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1513
- readonly height: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1514
- readonly duration: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1515
- readonly text: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1516
- readonly extraction: v.OptionalSchema<v.StrictObjectSchema<{
1517
- readonly origin: v.StringSchema<undefined>;
1518
- readonly extractor: v.StringSchema<undefined>;
1519
- readonly chars: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1520
- readonly error: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1521
- }, undefined>, undefined>;
1522
- readonly local_path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1523
- readonly contact: v.OptionalSchema<v.StrictObjectSchema<{
1524
- readonly name: v.StringSchema<undefined>;
1525
- readonly first_name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1526
- readonly last_name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1527
- readonly phone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1528
- readonly user_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
1529
- }, undefined>, undefined>;
1530
- readonly buttons: v.OptionalSchema<v.ArraySchema<v.ArraySchema<v.StrictObjectSchema<{
1531
- readonly kind: v.PicklistSchema<["callback", "link", "message", "chat", "contact", "location", "app", "clipboard", "other"], undefined>;
1532
- readonly text: v.StringSchema<undefined>;
1533
- readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1534
- }, undefined>, undefined>, undefined>, undefined>;
1535
- }, undefined>, undefined>;
1536
- readonly email: v.OptionalSchema<v.StrictObjectSchema<{
1537
- readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1538
- readonly from: v.NullableSchema<v.StrictObjectSchema<{
1539
- readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1540
- readonly address: v.StringSchema<undefined>;
1541
- readonly ref: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
1542
- }, undefined>, undefined>;
1543
- readonly to: v.ArraySchema<v.StrictObjectSchema<{
1544
- readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1545
- readonly address: v.StringSchema<undefined>;
1546
- readonly ref: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
1547
- }, undefined>, undefined>;
1548
- readonly cc: v.ArraySchema<v.StrictObjectSchema<{
1549
- readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1550
- readonly address: v.StringSchema<undefined>;
1551
- readonly ref: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
1552
- }, undefined>, undefined>;
1553
- readonly bcc: v.ArraySchema<v.StrictObjectSchema<{
1554
- readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1555
- readonly address: v.StringSchema<undefined>;
1556
- readonly ref: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
1557
- }, undefined>, undefined>;
1558
- readonly reply_addresses: v.ArraySchema<v.StrictObjectSchema<{
1559
- readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1560
- readonly address: v.StringSchema<undefined>;
1561
- readonly ref: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
1562
- }, undefined>, undefined>;
1563
- readonly labels: v.ArraySchema<v.StringSchema<undefined>, undefined>;
1564
- readonly thread: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
1565
- readonly read: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
1566
- readonly flagged: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
1567
- readonly sender_score: v.OptionalSchema<v.StrictObjectSchema<{
1568
- readonly score: v.NumberSchema<undefined>;
1569
- readonly signals: v.ArraySchema<v.StringSchema<undefined>, undefined>;
1570
- readonly demoted: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
1571
- }, undefined>, undefined>;
1572
- readonly bulk: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1573
- readonly list_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
1574
- readonly rule_id: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1575
- readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1576
- readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1577
- readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1578
- }, undefined>, undefined>;
1579
- readonly untrusted: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
1580
- }, undefined>;
1509
+ readonly "message.summary": v.GenericSchema;
1581
1510
  readonly message_link: v.StrictObjectSchema<{
1582
1511
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
1583
1512
  readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -1813,6 +1742,10 @@ export declare const ENTITIES: {
1813
1742
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1814
1743
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1815
1744
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1745
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
1746
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
1747
+ readonly reason: v.StringSchema<undefined>;
1748
+ }, undefined>, undefined>;
1816
1749
  }, undefined>, undefined>;
1817
1750
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
1818
1751
  }, undefined>;
@@ -2036,6 +1969,10 @@ export declare const ENTITIES: {
2036
1969
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
2037
1970
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2038
1971
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1972
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
1973
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
1974
+ readonly reason: v.StringSchema<undefined>;
1975
+ }, undefined>, undefined>;
2039
1976
  }, undefined>, undefined>;
2040
1977
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
2041
1978
  }, undefined>, undefined>, undefined>;
@@ -2263,6 +2200,10 @@ export declare const ENTITIES: {
2263
2200
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
2264
2201
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2265
2202
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2203
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
2204
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
2205
+ readonly reason: v.StringSchema<undefined>;
2206
+ }, undefined>, undefined>;
2266
2207
  }, undefined>, undefined>;
2267
2208
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
2268
2209
  }, undefined>;
@@ -2486,6 +2427,10 @@ export declare const ENTITIES: {
2486
2427
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
2487
2428
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2488
2429
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2430
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
2431
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
2432
+ readonly reason: v.StringSchema<undefined>;
2433
+ }, undefined>, undefined>;
2489
2434
  }, undefined>, undefined>;
2490
2435
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
2491
2436
  }, undefined>, undefined>, undefined>;
@@ -3231,6 +3176,10 @@ export declare const ENTITIES: {
3231
3176
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
3232
3177
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3233
3178
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3179
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
3180
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
3181
+ readonly reason: v.StringSchema<undefined>;
3182
+ }, undefined>, undefined>;
3234
3183
  readonly reply_to: v.ArraySchema<v.StrictObjectSchema<{
3235
3184
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3236
3185
  readonly address: v.StringSchema<undefined>;
@@ -7407,6 +7356,10 @@ export declare const ENTITIES: {
7407
7356
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
7408
7357
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
7409
7358
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
7359
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
7360
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
7361
+ readonly reason: v.StringSchema<undefined>;
7362
+ }, undefined>, undefined>;
7410
7363
  }, undefined>, undefined>;
7411
7364
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
7412
7365
  }, undefined>, undefined>;
@@ -7630,6 +7583,10 @@ export declare const ENTITIES: {
7630
7583
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
7631
7584
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
7632
7585
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
7586
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
7587
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
7588
+ readonly reason: v.StringSchema<undefined>;
7589
+ }, undefined>, undefined>;
7633
7590
  }, undefined>, undefined>;
7634
7591
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
7635
7592
  }, undefined>], undefined>;
@@ -8095,6 +8052,10 @@ export declare const ENTITIES: {
8095
8052
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
8096
8053
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
8097
8054
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
8055
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
8056
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
8057
+ readonly reason: v.StringSchema<undefined>;
8058
+ }, undefined>, undefined>;
8098
8059
  }, undefined>, undefined>;
8099
8060
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
8100
8061
  readonly starred: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -8609,6 +8570,10 @@ export declare const ENTITIES: {
8609
8570
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
8610
8571
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
8611
8572
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
8573
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
8574
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
8575
+ readonly reason: v.StringSchema<undefined>;
8576
+ }, undefined>, undefined>;
8612
8577
  }, undefined>, undefined>;
8613
8578
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
8614
8579
  readonly starred: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -9313,6 +9278,10 @@ export declare const ENTITIES: {
9313
9278
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
9314
9279
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
9315
9280
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
9281
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
9282
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
9283
+ readonly reason: v.StringSchema<undefined>;
9284
+ }, undefined>, undefined>;
9316
9285
  }, undefined>, undefined>;
9317
9286
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
9318
9287
  }, undefined>, v.StrictObjectSchema<{
@@ -11087,6 +11056,10 @@ export declare const ENTITIES: {
11087
11056
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
11088
11057
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11089
11058
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
11059
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
11060
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
11061
+ readonly reason: v.StringSchema<undefined>;
11062
+ }, undefined>, undefined>;
11090
11063
  }, undefined>, undefined>;
11091
11064
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
11092
11065
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
@@ -11310,6 +11283,10 @@ export declare const ENTITIES: {
11310
11283
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
11311
11284
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11312
11285
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
11286
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
11287
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
11288
+ readonly reason: v.StringSchema<undefined>;
11289
+ }, undefined>, undefined>;
11313
11290
  }, undefined>, undefined>;
11314
11291
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
11315
11292
  }, "chat_title" | "ref" | "sender_name" | "text" | "timestamp">;
@@ -11571,6 +11548,10 @@ export declare const ENTITIES: {
11571
11548
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
11572
11549
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11573
11550
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
11551
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
11552
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
11553
+ readonly reason: v.StringSchema<undefined>;
11554
+ }, undefined>, undefined>;
11574
11555
  }, undefined>, undefined>;
11575
11556
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
11576
11557
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
@@ -11794,6 +11775,10 @@ export declare const ENTITIES: {
11794
11775
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
11795
11776
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11796
11777
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
11778
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
11779
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
11780
+ readonly reason: v.StringSchema<undefined>;
11781
+ }, undefined>, undefined>;
11797
11782
  }, undefined>, undefined>;
11798
11783
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
11799
11784
  }, "chat_title" | "ref" | "sender_name" | "text" | "timestamp">;
@@ -135,6 +135,7 @@ export const ENTITIES = {
135
135
  attachments: v.optional(v.array(hitFile)),
136
136
  untrusted,
137
137
  }),
138
+ // Typed loosely: the inferred type of `ENTITIES` would pass the size the compiler writes out (TS7056).
138
139
  "message.summary": v.strictObject({
139
140
  ...v.pick(message, [
140
141
  "ref",
@@ -219,6 +219,10 @@ export declare const watchedMessage: v.StrictObjectSchema<{
219
219
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
220
220
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
221
221
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
222
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
223
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
224
+ readonly reason: v.StringSchema<undefined>;
225
+ }, undefined>, undefined>;
222
226
  }, undefined>, undefined>;
223
227
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
224
228
  readonly starred: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -734,6 +738,10 @@ export declare const messageEvent: v.VariantSchema<"event", [v.StrictObjectSchem
734
738
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
735
739
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
736
740
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
741
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
742
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
743
+ readonly reason: v.StringSchema<undefined>;
744
+ }, undefined>, undefined>;
737
745
  }, undefined>, undefined>;
738
746
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
739
747
  readonly starred: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1356,6 +1364,10 @@ export declare const watchItem: v.UnionSchema<[v.StrictObjectSchema<{
1356
1364
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1357
1365
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1358
1366
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1367
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
1368
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
1369
+ readonly reason: v.StringSchema<undefined>;
1370
+ }, undefined>, undefined>;
1359
1371
  }, undefined>, undefined>;
1360
1372
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
1361
1373
  readonly starred: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1870,6 +1882,10 @@ export declare const watchItem: v.UnionSchema<[v.StrictObjectSchema<{
1870
1882
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1871
1883
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1872
1884
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
1885
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
1886
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
1887
+ readonly reason: v.StringSchema<undefined>;
1888
+ }, undefined>, undefined>;
1873
1889
  }, undefined>, undefined>;
1874
1890
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
1875
1891
  readonly starred: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -247,6 +247,10 @@ declare const scheduledSendEntries: {
247
247
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
248
248
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
249
249
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
250
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
251
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
252
+ readonly reason: v.StringSchema<undefined>;
253
+ }, undefined>, undefined>;
250
254
  }, undefined>, undefined>;
251
255
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
252
256
  }, undefined>, undefined>;
@@ -225,6 +225,10 @@ export declare const messageThread: v.StrictObjectSchema<{
225
225
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
226
226
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
227
227
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
228
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
229
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
230
+ readonly reason: v.StringSchema<undefined>;
231
+ }, undefined>, undefined>;
228
232
  }, undefined>, undefined>;
229
233
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
230
234
  }, undefined>, undefined>;
@@ -472,6 +476,10 @@ export declare const messageContext: v.UnionSchema<[v.StrictObjectSchema<{
472
476
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
473
477
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
474
478
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
479
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
480
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
481
+ readonly reason: v.StringSchema<undefined>;
482
+ }, undefined>, undefined>;
475
483
  }, undefined>, undefined>;
476
484
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
477
485
  }, undefined>, v.StrictObjectSchema<{
@@ -700,6 +708,10 @@ export declare const messageContext: v.UnionSchema<[v.StrictObjectSchema<{
700
708
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
701
709
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
702
710
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
711
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
712
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
713
+ readonly reason: v.StringSchema<undefined>;
714
+ }, undefined>, undefined>;
703
715
  }, undefined>, undefined>;
704
716
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
705
717
  }, undefined>, undefined>;
@@ -221,6 +221,10 @@ export declare const messageWrite: v.StrictObjectSchema<{
221
221
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
222
222
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
223
223
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
224
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
225
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
226
+ readonly reason: v.StringSchema<undefined>;
227
+ }, undefined>, undefined>;
224
228
  }, undefined>, undefined>;
225
229
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
226
230
  }, undefined>;
@@ -445,6 +449,10 @@ export declare const messageWrite: v.StrictObjectSchema<{
445
449
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
446
450
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
447
451
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
452
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
453
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
454
+ readonly reason: v.StringSchema<undefined>;
455
+ }, undefined>, undefined>;
448
456
  }, undefined>, undefined>;
449
457
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
450
458
  }, undefined>, undefined>, undefined>;
@@ -677,6 +685,10 @@ export declare const messageSend: v.UnionSchema<[v.StrictObjectSchema<{
677
685
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
678
686
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
679
687
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
688
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
689
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
690
+ readonly reason: v.StringSchema<undefined>;
691
+ }, undefined>, undefined>;
680
692
  }, undefined>, undefined>;
681
693
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
682
694
  }, undefined>;
@@ -901,6 +913,10 @@ export declare const messageSend: v.UnionSchema<[v.StrictObjectSchema<{
901
913
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
902
914
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
903
915
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
916
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
917
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
918
+ readonly reason: v.StringSchema<undefined>;
919
+ }, undefined>, undefined>;
904
920
  }, undefined>, undefined>;
905
921
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
906
922
  }, undefined>, undefined>, undefined>;
@@ -250,6 +250,11 @@ export declare const message: v.StrictObjectSchema<{
250
250
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
251
251
  /** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
252
252
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
253
+ /** Mail `review`: how `inbox` sorted the thread, by the AI model; the reason is untrusted. */
254
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
255
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
256
+ readonly reason: v.StringSchema<undefined>;
257
+ }, undefined>, undefined>;
253
258
  }, undefined>, undefined>;
254
259
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
255
260
  }, undefined>;
@@ -115,6 +115,8 @@ export const message = v.strictObject({
115
115
  new_sender: v.optional(v.boolean()),
116
116
  /** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
117
117
  sender_identities: v.optional(v.number()),
118
+ /** Mail `review`: how `inbox` sorted the thread, by the AI model; the reason is untrusted. */
119
+ inbox: v.optional(v.strictObject({ bucket: v.picklist(["answer", "read", "later"]), reason: text })),
118
120
  })),
119
121
  provider_metadata: providerMetadata,
120
122
  });
@@ -252,6 +252,10 @@ export declare const storeExport: v.UnionSchema<[v.StrictObjectSchema<{
252
252
  readonly fingerprint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
253
253
  readonly new_sender: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
254
254
  readonly sender_identities: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
255
+ readonly inbox: v.OptionalSchema<v.StrictObjectSchema<{
256
+ readonly bucket: v.PicklistSchema<["answer", "read", "later"], undefined>;
257
+ readonly reason: v.StringSchema<undefined>;
258
+ }, undefined>, undefined>;
255
259
  }, undefined>, undefined>;
256
260
  readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
257
261
  }, undefined>, v.StrictObjectSchema<{
@@ -208,6 +208,8 @@ const OTHERS = [
208
208
  validation("mail.cursor-ahead", "an acknowledge cursor is past the newest stored email"),
209
209
  ["mail.holder-not-yours", "permission_error", "a run moves only the mark of the holder its schedule names"],
210
210
  ["mail.no-mark", "not_found", "the holder has no mark in the mailbox yet; its first review starts it"],
211
+ ["mail.inbox-agent", "permission_error", "an agent sorts mail itself from review; inbox --offline lists"],
212
+ ["mail.inbox-answer-invalid", "invalid_response", "the AI model's answer to inbox is not the JSON it asks for"],
211
213
  ["mail.reset-owner-only", "permission_error", "only the owner moves a holder's mark back"],
212
214
  ["mail.source-failed", "provider_error", "the mail server refused or did not complete a request"],
213
215
  ["mail.search-refused", "provider_error", "the mail server refused to search a folder"],
@@ -0,0 +1,15 @@
1
+ import { type KeyringStore } from "@wirecat/cli-base";
2
+ import { Command } from "commander";
3
+ import type { MailReads } from "./index.js";
4
+ export interface MailInboxOptions {
5
+ /** Where the owner chooses the shared AI model and the `models chats` setting; mail has no `models` of its own. */
6
+ modelsCommand?: string;
7
+ keyring?: KeyringStore;
8
+ fetch?: typeof globalThis.fetch;
9
+ }
10
+ /**
11
+ * `inbox`: the threads that changed since its last run, sorted by the shared AI model into those that need an answer,
12
+ * those to read and those that can wait, each with a one-line reason; then every sorted thread still open. It runs
13
+ * the model through its API, with no agent: an agent reads `review` and sorts the mail itself.
14
+ */
15
+ export declare const mailInboxCommand: (mail: MailReads, options?: MailInboxOptions | undefined) => Command;