@segmentstream/ontology 0.166.1 → 0.168.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.
- package/CHANGELOG.md +29 -0
- package/dist/analyze.d.ts +8 -0
- package/dist/analyze.js +13 -4
- package/dist/email.d.ts +26 -1
- package/dist/email.js +105 -1
- package/dist/gmail-send.d.ts +20 -0
- package/dist/gmail-send.js +45 -0
- package/dist/manifest.d.ts +83 -9
- package/dist/manifest.js +26 -4
- package/dist/migrate/model.d.ts +40 -0
- package/dist/service/chat/delivery.js +73 -24
- package/dist/service/chat/providers/email.d.ts +23 -5
- package/dist/service/chat/providers/email.js +122 -29
- package/dist/service/chat/providers/provider.d.ts +30 -1
- package/dist/service/chat/review-delivery.js +2 -1
- package/dist/service/schemas.d.ts +10 -0
- package/package.json +1 -1
package/dist/manifest.d.ts
CHANGED
|
@@ -108,6 +108,8 @@ import { type ResolvedGuest, type ResolvedSignInOptions, type SignInPolicy } fro
|
|
|
108
108
|
* Within version 16, `inbox` may carry `channels`, written only when declared: the channels whose
|
|
109
109
|
* chats with people who are no users the agent registers as `agent_chat` records of kind
|
|
110
110
|
* `private` without members. Older readers ignore it and register no chat without members.
|
|
111
|
+
* Within version 16, a mailbox in `chat` may carry `signature: true`, written only when declared:
|
|
112
|
+
* the ontology's replies to mail end with the mailbox's own signature. Older readers ignore it.
|
|
111
113
|
*/
|
|
112
114
|
export declare const MANIFEST_VERSION = 16;
|
|
113
115
|
/** The phrase used for a direction the author did not phrase. */
|
|
@@ -1296,10 +1298,14 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
1296
1298
|
* The agent's channels whose chats the built-in exact chat post delivers to, each through its
|
|
1297
1299
|
* declared connection, and the attribution it adds. Absent, or without a channel, delivers
|
|
1298
1300
|
* nowhere. The channel named after each kind has its key; `channels` holds the others by name,
|
|
1299
|
-
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail
|
|
1300
|
-
* from; no chat post goes to it, nor to another channel
|
|
1301
|
+
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail and
|
|
1302
|
+
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
1303
|
+
* of its kind. Within version 16, a
|
|
1301
1304
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
1302
|
-
* files as long as their messages. Older readers ignore it and keep files 24 hours.
|
|
1305
|
+
* files as long as their messages. Older readers ignore it and keep files 24 hours. Within
|
|
1306
|
+
* version 16, a mailbox (`email`, or a channel of that kind) may carry `signature: true`, written
|
|
1307
|
+
* only when declared: the ontology's replies to mail end with the mailbox's own signature. Older
|
|
1308
|
+
* readers ignore it and send them unsigned.
|
|
1303
1309
|
*/
|
|
1304
1310
|
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
|
|
1305
1311
|
readonly telegram: Schema.optionalKey<Schema.Struct<{
|
|
@@ -1307,24 +1313,28 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
1307
1313
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1308
1314
|
readonly keep: Schema.Boolean;
|
|
1309
1315
|
}>>;
|
|
1316
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1310
1317
|
}>>;
|
|
1311
1318
|
readonly slack: Schema.optionalKey<Schema.Struct<{
|
|
1312
1319
|
readonly connection: Schema.String;
|
|
1313
1320
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1314
1321
|
readonly keep: Schema.Boolean;
|
|
1315
1322
|
}>>;
|
|
1323
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1316
1324
|
}>>;
|
|
1317
1325
|
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
|
|
1318
1326
|
readonly connection: Schema.String;
|
|
1319
1327
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1320
1328
|
readonly keep: Schema.Boolean;
|
|
1321
1329
|
}>>;
|
|
1330
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1322
1331
|
}>>;
|
|
1323
1332
|
readonly email: Schema.optionalKey<Schema.Struct<{
|
|
1324
1333
|
readonly connection: Schema.String;
|
|
1325
1334
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1326
1335
|
readonly keep: Schema.Boolean;
|
|
1327
1336
|
}>>;
|
|
1337
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1328
1338
|
}>>;
|
|
1329
1339
|
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
1330
1340
|
readonly kind: Schema.Literals<readonly ["telegram", "slack", "whatsapp", "email", "custom"]>;
|
|
@@ -1332,6 +1342,7 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
1332
1342
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1333
1343
|
readonly keep: Schema.Boolean;
|
|
1334
1344
|
}>>;
|
|
1345
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1335
1346
|
}>>>;
|
|
1336
1347
|
readonly attribution: Schema.optionalKey<Schema.Struct<{
|
|
1337
1348
|
readonly template: Schema.optionalKey<Schema.String>;
|
|
@@ -1646,24 +1657,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1646
1657
|
readonly files?: {
|
|
1647
1658
|
readonly keep: boolean;
|
|
1648
1659
|
} | undefined;
|
|
1660
|
+
readonly signature?: boolean | undefined;
|
|
1649
1661
|
} | undefined;
|
|
1650
1662
|
readonly slack?: {
|
|
1651
1663
|
readonly connection: string;
|
|
1652
1664
|
readonly files?: {
|
|
1653
1665
|
readonly keep: boolean;
|
|
1654
1666
|
} | undefined;
|
|
1667
|
+
readonly signature?: boolean | undefined;
|
|
1655
1668
|
} | undefined;
|
|
1656
1669
|
readonly whatsapp?: {
|
|
1657
1670
|
readonly connection: string;
|
|
1658
1671
|
readonly files?: {
|
|
1659
1672
|
readonly keep: boolean;
|
|
1660
1673
|
} | undefined;
|
|
1674
|
+
readonly signature?: boolean | undefined;
|
|
1661
1675
|
} | undefined;
|
|
1662
1676
|
readonly email?: {
|
|
1663
1677
|
readonly connection: string;
|
|
1664
1678
|
readonly files?: {
|
|
1665
1679
|
readonly keep: boolean;
|
|
1666
1680
|
} | undefined;
|
|
1681
|
+
readonly signature?: boolean | undefined;
|
|
1667
1682
|
} | undefined;
|
|
1668
1683
|
readonly channels?: {
|
|
1669
1684
|
readonly [x: string]: {
|
|
@@ -1672,6 +1687,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1672
1687
|
readonly keep: boolean;
|
|
1673
1688
|
} | undefined;
|
|
1674
1689
|
readonly connection?: string | undefined;
|
|
1690
|
+
readonly signature?: boolean | undefined;
|
|
1675
1691
|
};
|
|
1676
1692
|
} | undefined;
|
|
1677
1693
|
readonly attribution?: {
|
|
@@ -2018,24 +2034,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2018
2034
|
readonly files?: {
|
|
2019
2035
|
readonly keep: boolean;
|
|
2020
2036
|
} | undefined;
|
|
2037
|
+
readonly signature?: boolean | undefined;
|
|
2021
2038
|
} | undefined;
|
|
2022
2039
|
readonly slack?: {
|
|
2023
2040
|
readonly connection: string;
|
|
2024
2041
|
readonly files?: {
|
|
2025
2042
|
readonly keep: boolean;
|
|
2026
2043
|
} | undefined;
|
|
2044
|
+
readonly signature?: boolean | undefined;
|
|
2027
2045
|
} | undefined;
|
|
2028
2046
|
readonly whatsapp?: {
|
|
2029
2047
|
readonly connection: string;
|
|
2030
2048
|
readonly files?: {
|
|
2031
2049
|
readonly keep: boolean;
|
|
2032
2050
|
} | undefined;
|
|
2051
|
+
readonly signature?: boolean | undefined;
|
|
2033
2052
|
} | undefined;
|
|
2034
2053
|
readonly email?: {
|
|
2035
2054
|
readonly connection: string;
|
|
2036
2055
|
readonly files?: {
|
|
2037
2056
|
readonly keep: boolean;
|
|
2038
2057
|
} | undefined;
|
|
2058
|
+
readonly signature?: boolean | undefined;
|
|
2039
2059
|
} | undefined;
|
|
2040
2060
|
readonly channels?: {
|
|
2041
2061
|
readonly [x: string]: {
|
|
@@ -2044,6 +2064,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2044
2064
|
readonly keep: boolean;
|
|
2045
2065
|
} | undefined;
|
|
2046
2066
|
readonly connection?: string | undefined;
|
|
2067
|
+
readonly signature?: boolean | undefined;
|
|
2047
2068
|
};
|
|
2048
2069
|
} | undefined;
|
|
2049
2070
|
readonly attribution?: {
|
|
@@ -2390,24 +2411,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2390
2411
|
readonly files?: {
|
|
2391
2412
|
readonly keep: boolean;
|
|
2392
2413
|
} | undefined;
|
|
2414
|
+
readonly signature?: boolean | undefined;
|
|
2393
2415
|
} | undefined;
|
|
2394
2416
|
readonly slack?: {
|
|
2395
2417
|
readonly connection: string;
|
|
2396
2418
|
readonly files?: {
|
|
2397
2419
|
readonly keep: boolean;
|
|
2398
2420
|
} | undefined;
|
|
2421
|
+
readonly signature?: boolean | undefined;
|
|
2399
2422
|
} | undefined;
|
|
2400
2423
|
readonly whatsapp?: {
|
|
2401
2424
|
readonly connection: string;
|
|
2402
2425
|
readonly files?: {
|
|
2403
2426
|
readonly keep: boolean;
|
|
2404
2427
|
} | undefined;
|
|
2428
|
+
readonly signature?: boolean | undefined;
|
|
2405
2429
|
} | undefined;
|
|
2406
2430
|
readonly email?: {
|
|
2407
2431
|
readonly connection: string;
|
|
2408
2432
|
readonly files?: {
|
|
2409
2433
|
readonly keep: boolean;
|
|
2410
2434
|
} | undefined;
|
|
2435
|
+
readonly signature?: boolean | undefined;
|
|
2411
2436
|
} | undefined;
|
|
2412
2437
|
readonly channels?: {
|
|
2413
2438
|
readonly [x: string]: {
|
|
@@ -2416,6 +2441,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2416
2441
|
readonly keep: boolean;
|
|
2417
2442
|
} | undefined;
|
|
2418
2443
|
readonly connection?: string | undefined;
|
|
2444
|
+
readonly signature?: boolean | undefined;
|
|
2419
2445
|
};
|
|
2420
2446
|
} | undefined;
|
|
2421
2447
|
readonly attribution?: {
|
|
@@ -2762,24 +2788,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2762
2788
|
readonly files?: {
|
|
2763
2789
|
readonly keep: boolean;
|
|
2764
2790
|
} | undefined;
|
|
2791
|
+
readonly signature?: boolean | undefined;
|
|
2765
2792
|
} | undefined;
|
|
2766
2793
|
readonly slack?: {
|
|
2767
2794
|
readonly connection: string;
|
|
2768
2795
|
readonly files?: {
|
|
2769
2796
|
readonly keep: boolean;
|
|
2770
2797
|
} | undefined;
|
|
2798
|
+
readonly signature?: boolean | undefined;
|
|
2771
2799
|
} | undefined;
|
|
2772
2800
|
readonly whatsapp?: {
|
|
2773
2801
|
readonly connection: string;
|
|
2774
2802
|
readonly files?: {
|
|
2775
2803
|
readonly keep: boolean;
|
|
2776
2804
|
} | undefined;
|
|
2805
|
+
readonly signature?: boolean | undefined;
|
|
2777
2806
|
} | undefined;
|
|
2778
2807
|
readonly email?: {
|
|
2779
2808
|
readonly connection: string;
|
|
2780
2809
|
readonly files?: {
|
|
2781
2810
|
readonly keep: boolean;
|
|
2782
2811
|
} | undefined;
|
|
2812
|
+
readonly signature?: boolean | undefined;
|
|
2783
2813
|
} | undefined;
|
|
2784
2814
|
readonly channels?: {
|
|
2785
2815
|
readonly [x: string]: {
|
|
@@ -2788,6 +2818,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2788
2818
|
readonly keep: boolean;
|
|
2789
2819
|
} | undefined;
|
|
2790
2820
|
readonly connection?: string | undefined;
|
|
2821
|
+
readonly signature?: boolean | undefined;
|
|
2791
2822
|
};
|
|
2792
2823
|
} | undefined;
|
|
2793
2824
|
readonly attribution?: {
|
|
@@ -3301,10 +3332,14 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3301
3332
|
* The agent's channels whose chats the built-in exact chat post delivers to, each through its
|
|
3302
3333
|
* declared connection, and the attribution it adds. Absent, or without a channel, delivers
|
|
3303
3334
|
* nowhere. The channel named after each kind has its key; `channels` holds the others by name,
|
|
3304
|
-
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail
|
|
3305
|
-
* from; no chat post goes to it, nor to another channel
|
|
3335
|
+
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail and
|
|
3336
|
+
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
3337
|
+
* of its kind. Within version 16, a
|
|
3306
3338
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
3307
|
-
* files as long as their messages. Older readers ignore it and keep files 24 hours.
|
|
3339
|
+
* files as long as their messages. Older readers ignore it and keep files 24 hours. Within
|
|
3340
|
+
* version 16, a mailbox (`email`, or a channel of that kind) may carry `signature: true`, written
|
|
3341
|
+
* only when declared: the ontology's replies to mail end with the mailbox's own signature. Older
|
|
3342
|
+
* readers ignore it and send them unsigned.
|
|
3308
3343
|
*/
|
|
3309
3344
|
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
|
|
3310
3345
|
readonly telegram: Schema.optionalKey<Schema.Struct<{
|
|
@@ -3312,24 +3347,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3312
3347
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3313
3348
|
readonly keep: Schema.Boolean;
|
|
3314
3349
|
}>>;
|
|
3350
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3315
3351
|
}>>;
|
|
3316
3352
|
readonly slack: Schema.optionalKey<Schema.Struct<{
|
|
3317
3353
|
readonly connection: Schema.String;
|
|
3318
3354
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3319
3355
|
readonly keep: Schema.Boolean;
|
|
3320
3356
|
}>>;
|
|
3357
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3321
3358
|
}>>;
|
|
3322
3359
|
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
|
|
3323
3360
|
readonly connection: Schema.String;
|
|
3324
3361
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3325
3362
|
readonly keep: Schema.Boolean;
|
|
3326
3363
|
}>>;
|
|
3364
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3327
3365
|
}>>;
|
|
3328
3366
|
readonly email: Schema.optionalKey<Schema.Struct<{
|
|
3329
3367
|
readonly connection: Schema.String;
|
|
3330
3368
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3331
3369
|
readonly keep: Schema.Boolean;
|
|
3332
3370
|
}>>;
|
|
3371
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3333
3372
|
}>>;
|
|
3334
3373
|
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
3335
3374
|
readonly kind: Schema.Literals<readonly ["telegram", "slack", "whatsapp", "email", "custom"]>;
|
|
@@ -3337,6 +3376,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3337
3376
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3338
3377
|
readonly keep: Schema.Boolean;
|
|
3339
3378
|
}>>;
|
|
3379
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3340
3380
|
}>>>;
|
|
3341
3381
|
readonly attribution: Schema.optionalKey<Schema.Struct<{
|
|
3342
3382
|
readonly template: Schema.optionalKey<Schema.String>;
|
|
@@ -3804,10 +3844,14 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3804
3844
|
* The agent's channels whose chats the built-in exact chat post delivers to, each through its
|
|
3805
3845
|
* declared connection, and the attribution it adds. Absent, or without a channel, delivers
|
|
3806
3846
|
* nowhere. The channel named after each kind has its key; `channels` holds the others by name,
|
|
3807
|
-
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail
|
|
3808
|
-
* from; no chat post goes to it, nor to another channel
|
|
3847
|
+
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail and
|
|
3848
|
+
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
3849
|
+
* of its kind. Within version 16, a
|
|
3809
3850
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
3810
|
-
* files as long as their messages. Older readers ignore it and keep files 24 hours.
|
|
3851
|
+
* files as long as their messages. Older readers ignore it and keep files 24 hours. Within
|
|
3852
|
+
* version 16, a mailbox (`email`, or a channel of that kind) may carry `signature: true`, written
|
|
3853
|
+
* only when declared: the ontology's replies to mail end with the mailbox's own signature. Older
|
|
3854
|
+
* readers ignore it and send them unsigned.
|
|
3811
3855
|
*/
|
|
3812
3856
|
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
|
|
3813
3857
|
readonly telegram: Schema.optionalKey<Schema.Struct<{
|
|
@@ -3815,24 +3859,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3815
3859
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3816
3860
|
readonly keep: Schema.Boolean;
|
|
3817
3861
|
}>>;
|
|
3862
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3818
3863
|
}>>;
|
|
3819
3864
|
readonly slack: Schema.optionalKey<Schema.Struct<{
|
|
3820
3865
|
readonly connection: Schema.String;
|
|
3821
3866
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3822
3867
|
readonly keep: Schema.Boolean;
|
|
3823
3868
|
}>>;
|
|
3869
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3824
3870
|
}>>;
|
|
3825
3871
|
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
|
|
3826
3872
|
readonly connection: Schema.String;
|
|
3827
3873
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3828
3874
|
readonly keep: Schema.Boolean;
|
|
3829
3875
|
}>>;
|
|
3876
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3830
3877
|
}>>;
|
|
3831
3878
|
readonly email: Schema.optionalKey<Schema.Struct<{
|
|
3832
3879
|
readonly connection: Schema.String;
|
|
3833
3880
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3834
3881
|
readonly keep: Schema.Boolean;
|
|
3835
3882
|
}>>;
|
|
3883
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3836
3884
|
}>>;
|
|
3837
3885
|
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
3838
3886
|
readonly kind: Schema.Literals<readonly ["telegram", "slack", "whatsapp", "email", "custom"]>;
|
|
@@ -3840,6 +3888,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3840
3888
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3841
3889
|
readonly keep: Schema.Boolean;
|
|
3842
3890
|
}>>;
|
|
3891
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3843
3892
|
}>>>;
|
|
3844
3893
|
readonly attribution: Schema.optionalKey<Schema.Struct<{
|
|
3845
3894
|
readonly template: Schema.optionalKey<Schema.String>;
|
|
@@ -4146,24 +4195,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4146
4195
|
readonly files?: {
|
|
4147
4196
|
readonly keep: boolean;
|
|
4148
4197
|
} | undefined;
|
|
4198
|
+
readonly signature?: boolean | undefined;
|
|
4149
4199
|
} | undefined;
|
|
4150
4200
|
readonly slack?: {
|
|
4151
4201
|
readonly connection: string;
|
|
4152
4202
|
readonly files?: {
|
|
4153
4203
|
readonly keep: boolean;
|
|
4154
4204
|
} | undefined;
|
|
4205
|
+
readonly signature?: boolean | undefined;
|
|
4155
4206
|
} | undefined;
|
|
4156
4207
|
readonly whatsapp?: {
|
|
4157
4208
|
readonly connection: string;
|
|
4158
4209
|
readonly files?: {
|
|
4159
4210
|
readonly keep: boolean;
|
|
4160
4211
|
} | undefined;
|
|
4212
|
+
readonly signature?: boolean | undefined;
|
|
4161
4213
|
} | undefined;
|
|
4162
4214
|
readonly email?: {
|
|
4163
4215
|
readonly connection: string;
|
|
4164
4216
|
readonly files?: {
|
|
4165
4217
|
readonly keep: boolean;
|
|
4166
4218
|
} | undefined;
|
|
4219
|
+
readonly signature?: boolean | undefined;
|
|
4167
4220
|
} | undefined;
|
|
4168
4221
|
readonly channels?: {
|
|
4169
4222
|
readonly [x: string]: {
|
|
@@ -4172,6 +4225,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4172
4225
|
readonly keep: boolean;
|
|
4173
4226
|
} | undefined;
|
|
4174
4227
|
readonly connection?: string | undefined;
|
|
4228
|
+
readonly signature?: boolean | undefined;
|
|
4175
4229
|
};
|
|
4176
4230
|
} | undefined;
|
|
4177
4231
|
readonly attribution?: {
|
|
@@ -4518,24 +4572,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4518
4572
|
readonly files?: {
|
|
4519
4573
|
readonly keep: boolean;
|
|
4520
4574
|
} | undefined;
|
|
4575
|
+
readonly signature?: boolean | undefined;
|
|
4521
4576
|
} | undefined;
|
|
4522
4577
|
readonly slack?: {
|
|
4523
4578
|
readonly connection: string;
|
|
4524
4579
|
readonly files?: {
|
|
4525
4580
|
readonly keep: boolean;
|
|
4526
4581
|
} | undefined;
|
|
4582
|
+
readonly signature?: boolean | undefined;
|
|
4527
4583
|
} | undefined;
|
|
4528
4584
|
readonly whatsapp?: {
|
|
4529
4585
|
readonly connection: string;
|
|
4530
4586
|
readonly files?: {
|
|
4531
4587
|
readonly keep: boolean;
|
|
4532
4588
|
} | undefined;
|
|
4589
|
+
readonly signature?: boolean | undefined;
|
|
4533
4590
|
} | undefined;
|
|
4534
4591
|
readonly email?: {
|
|
4535
4592
|
readonly connection: string;
|
|
4536
4593
|
readonly files?: {
|
|
4537
4594
|
readonly keep: boolean;
|
|
4538
4595
|
} | undefined;
|
|
4596
|
+
readonly signature?: boolean | undefined;
|
|
4539
4597
|
} | undefined;
|
|
4540
4598
|
readonly channels?: {
|
|
4541
4599
|
readonly [x: string]: {
|
|
@@ -4544,6 +4602,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4544
4602
|
readonly keep: boolean;
|
|
4545
4603
|
} | undefined;
|
|
4546
4604
|
readonly connection?: string | undefined;
|
|
4605
|
+
readonly signature?: boolean | undefined;
|
|
4547
4606
|
};
|
|
4548
4607
|
} | undefined;
|
|
4549
4608
|
readonly attribution?: {
|
|
@@ -4896,24 +4955,28 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
4896
4955
|
readonly files?: {
|
|
4897
4956
|
readonly keep: boolean;
|
|
4898
4957
|
} | undefined;
|
|
4958
|
+
readonly signature?: boolean | undefined;
|
|
4899
4959
|
} | undefined;
|
|
4900
4960
|
readonly slack?: {
|
|
4901
4961
|
readonly connection: string;
|
|
4902
4962
|
readonly files?: {
|
|
4903
4963
|
readonly keep: boolean;
|
|
4904
4964
|
} | undefined;
|
|
4965
|
+
readonly signature?: boolean | undefined;
|
|
4905
4966
|
} | undefined;
|
|
4906
4967
|
readonly whatsapp?: {
|
|
4907
4968
|
readonly connection: string;
|
|
4908
4969
|
readonly files?: {
|
|
4909
4970
|
readonly keep: boolean;
|
|
4910
4971
|
} | undefined;
|
|
4972
|
+
readonly signature?: boolean | undefined;
|
|
4911
4973
|
} | undefined;
|
|
4912
4974
|
readonly email?: {
|
|
4913
4975
|
readonly connection: string;
|
|
4914
4976
|
readonly files?: {
|
|
4915
4977
|
readonly keep: boolean;
|
|
4916
4978
|
} | undefined;
|
|
4979
|
+
readonly signature?: boolean | undefined;
|
|
4917
4980
|
} | undefined;
|
|
4918
4981
|
readonly channels?: {
|
|
4919
4982
|
readonly [x: string]: {
|
|
@@ -4922,6 +4985,7 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
4922
4985
|
readonly keep: boolean;
|
|
4923
4986
|
} | undefined;
|
|
4924
4987
|
readonly connection?: string | undefined;
|
|
4988
|
+
readonly signature?: boolean | undefined;
|
|
4925
4989
|
};
|
|
4926
4990
|
} | undefined;
|
|
4927
4991
|
readonly attribution?: {
|
|
@@ -5268,24 +5332,28 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
5268
5332
|
readonly files?: {
|
|
5269
5333
|
readonly keep: boolean;
|
|
5270
5334
|
} | undefined;
|
|
5335
|
+
readonly signature?: boolean | undefined;
|
|
5271
5336
|
} | undefined;
|
|
5272
5337
|
readonly slack?: {
|
|
5273
5338
|
readonly connection: string;
|
|
5274
5339
|
readonly files?: {
|
|
5275
5340
|
readonly keep: boolean;
|
|
5276
5341
|
} | undefined;
|
|
5342
|
+
readonly signature?: boolean | undefined;
|
|
5277
5343
|
} | undefined;
|
|
5278
5344
|
readonly whatsapp?: {
|
|
5279
5345
|
readonly connection: string;
|
|
5280
5346
|
readonly files?: {
|
|
5281
5347
|
readonly keep: boolean;
|
|
5282
5348
|
} | undefined;
|
|
5349
|
+
readonly signature?: boolean | undefined;
|
|
5283
5350
|
} | undefined;
|
|
5284
5351
|
readonly email?: {
|
|
5285
5352
|
readonly connection: string;
|
|
5286
5353
|
readonly files?: {
|
|
5287
5354
|
readonly keep: boolean;
|
|
5288
5355
|
} | undefined;
|
|
5356
|
+
readonly signature?: boolean | undefined;
|
|
5289
5357
|
} | undefined;
|
|
5290
5358
|
readonly channels?: {
|
|
5291
5359
|
readonly [x: string]: {
|
|
@@ -5294,6 +5362,7 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
5294
5362
|
readonly keep: boolean;
|
|
5295
5363
|
} | undefined;
|
|
5296
5364
|
readonly connection?: string | undefined;
|
|
5365
|
+
readonly signature?: boolean | undefined;
|
|
5297
5366
|
};
|
|
5298
5367
|
} | undefined;
|
|
5299
5368
|
readonly attribution?: {
|
|
@@ -5550,6 +5619,11 @@ export declare function declaredChatRetentionDaysOf(manifest: Pick<OntologyManif
|
|
|
5550
5619
|
* number in range, else the default.
|
|
5551
5620
|
*/
|
|
5552
5621
|
export declare function chatRetentionDaysOf(manifest: Pick<OntologyManifest, "chat">): number;
|
|
5622
|
+
/**
|
|
5623
|
+
* Whether the ontology's replies to mail through the agent's channel `name` end with the mailbox's
|
|
5624
|
+
* own signature, as the channel's `signature: true` in `chat` declares.
|
|
5625
|
+
*/
|
|
5626
|
+
export declare function signsMail(manifest: Pick<OntologyManifest, "chat">, name: string): boolean;
|
|
5553
5627
|
/**
|
|
5554
5628
|
* Whether the chats of the agent's channel `name` keep their files as long as their messages, as
|
|
5555
5629
|
* the channel's `files: { keep: true }` in `chat` declares; otherwise a file expires 24 hours after
|
package/dist/manifest.js
CHANGED
|
@@ -109,6 +109,8 @@ import { CHANNEL_PROVIDERS, DEFAULT_SIGN_IN_POLICY, isGuestBotCheckScheme, isGue
|
|
|
109
109
|
* Within version 16, `inbox` may carry `channels`, written only when declared: the channels whose
|
|
110
110
|
* chats with people who are no users the agent registers as `agent_chat` records of kind
|
|
111
111
|
* `private` without members. Older readers ignore it and register no chat without members.
|
|
112
|
+
* Within version 16, a mailbox in `chat` may carry `signature: true`, written only when declared:
|
|
113
|
+
* the ontology's replies to mail end with the mailbox's own signature. Older readers ignore it.
|
|
112
114
|
*/
|
|
113
115
|
export const MANIFEST_VERSION = 16;
|
|
114
116
|
/** The first version whose documents use snake_case names on the wire. */
|
|
@@ -571,10 +573,14 @@ export const EmailDocumentManifest = Schema.Struct({
|
|
|
571
573
|
export const EmailTemplateManifest = Schema.Union([EmailDocumentManifest, EmailLayoutManifest]);
|
|
572
574
|
/** What a chat channel keeps of its chats' files: `keep`, for as long as their messages. */
|
|
573
575
|
const ChatFilesManifest = Schema.Struct({ keep: Schema.Boolean });
|
|
574
|
-
/**
|
|
576
|
+
/**
|
|
577
|
+
* A chat channel named after its kind: the connection posts go through, what it keeps, and for a
|
|
578
|
+
* mailbox whether its replies end with its own signature.
|
|
579
|
+
*/
|
|
575
580
|
const ChatChannelManifest = Schema.Struct({
|
|
576
581
|
connection: Schema.String,
|
|
577
582
|
files: Schema.optionalKey(ChatFilesManifest),
|
|
583
|
+
signature: Schema.optionalKey(Schema.Boolean),
|
|
578
584
|
});
|
|
579
585
|
/**
|
|
580
586
|
* The ontology catalog: the contract between the SDK, backend-next, the console and the CLI. Decoding
|
|
@@ -609,10 +615,14 @@ const OntologyManifestModel = Schema.Struct({
|
|
|
609
615
|
* The agent's channels whose chats the built-in exact chat post delivers to, each through its
|
|
610
616
|
* declared connection, and the attribution it adds. Absent, or without a channel, delivers
|
|
611
617
|
* nowhere. The channel named after each kind has its key; `channels` holds the others by name,
|
|
612
|
-
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail
|
|
613
|
-
* from; no chat post goes to it, nor to another channel
|
|
618
|
+
* with their kinds. `email`, within version 15, is the mailbox reviewed replies to mail and
|
|
619
|
+
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
620
|
+
* of its kind. Within version 16, a
|
|
614
621
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
615
|
-
* files as long as their messages. Older readers ignore it and keep files 24 hours.
|
|
622
|
+
* files as long as their messages. Older readers ignore it and keep files 24 hours. Within
|
|
623
|
+
* version 16, a mailbox (`email`, or a channel of that kind) may carry `signature: true`, written
|
|
624
|
+
* only when declared: the ontology's replies to mail end with the mailbox's own signature. Older
|
|
625
|
+
* readers ignore it and send them unsigned.
|
|
616
626
|
*/
|
|
617
627
|
chat: Schema.optionalKey(Schema.Struct({
|
|
618
628
|
telegram: Schema.optionalKey(ChatChannelManifest),
|
|
@@ -624,6 +634,7 @@ const OntologyManifestModel = Schema.Struct({
|
|
|
624
634
|
// A workspace channel (`custom`) has none: the agent sends through it.
|
|
625
635
|
connection: Schema.optionalKey(Schema.String),
|
|
626
636
|
files: Schema.optionalKey(ChatFilesManifest),
|
|
637
|
+
signature: Schema.optionalKey(Schema.Boolean),
|
|
627
638
|
}))),
|
|
628
639
|
attribution: Schema.optionalKey(Schema.Struct({
|
|
629
640
|
template: Schema.optionalKey(Schema.String),
|
|
@@ -767,6 +778,17 @@ export function chatRetentionDaysOf(manifest) {
|
|
|
767
778
|
? days
|
|
768
779
|
: CHAT_RETENTION_DAYS.default;
|
|
769
780
|
}
|
|
781
|
+
/**
|
|
782
|
+
* Whether the ontology's replies to mail through the agent's channel `name` end with the mailbox's
|
|
783
|
+
* own signature, as the channel's `signature: true` in `chat` declares.
|
|
784
|
+
*/
|
|
785
|
+
export function signsMail(manifest, name) {
|
|
786
|
+
const chat = manifest.chat;
|
|
787
|
+
const channel = name === "telegram" || name === "slack" || name === "whatsapp" || name === "email"
|
|
788
|
+
? chat?.[name]
|
|
789
|
+
: chat?.channels?.[name];
|
|
790
|
+
return channel?.signature === true;
|
|
791
|
+
}
|
|
770
792
|
/**
|
|
771
793
|
* Whether the chats of the agent's channel `name` keep their files as long as their messages, as
|
|
772
794
|
* the channel's `files: { keep: true }` in `chat` declares; otherwise a file expires 24 hours after
|