@segmentstream/ontology 0.167.0 → 0.168.1
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 +20 -0
- package/dist/analyze.d.ts +8 -0
- package/dist/analyze.js +13 -4
- package/dist/email.d.ts +6 -1
- package/dist/email.js +13 -1
- package/dist/gmail-send.d.ts +20 -0
- package/dist/gmail-send.js +45 -0
- package/dist/manifest.d.ts +74 -3
- package/dist/manifest.js +23 -2
- package/dist/migrate/apply.js +5 -1
- package/dist/migrate/model.d.ts +40 -0
- package/dist/migrate/preview.js +1 -0
- package/dist/replication/erasure-schema.d.ts +11 -0
- package/dist/replication/erasure-schema.js +23 -0
- package/dist/replication/erasure.d.ts +56 -0
- package/dist/replication/erasure.js +127 -0
- package/dist/replication/schema.js +2 -0
- package/dist/service/chat/delivery.js +2 -1
- package/dist/service/chat/providers/email.js +24 -3
- package/dist/service/chat/providers/provider.d.ts +2 -0
- 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. */
|
|
@@ -1300,7 +1302,10 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
1300
1302
|
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
1301
1303
|
* of its kind. Within version 16, a
|
|
1302
1304
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
1303
|
-
* 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.
|
|
1304
1309
|
*/
|
|
1305
1310
|
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
|
|
1306
1311
|
readonly telegram: Schema.optionalKey<Schema.Struct<{
|
|
@@ -1308,24 +1313,28 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
1308
1313
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1309
1314
|
readonly keep: Schema.Boolean;
|
|
1310
1315
|
}>>;
|
|
1316
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1311
1317
|
}>>;
|
|
1312
1318
|
readonly slack: Schema.optionalKey<Schema.Struct<{
|
|
1313
1319
|
readonly connection: Schema.String;
|
|
1314
1320
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1315
1321
|
readonly keep: Schema.Boolean;
|
|
1316
1322
|
}>>;
|
|
1323
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1317
1324
|
}>>;
|
|
1318
1325
|
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
|
|
1319
1326
|
readonly connection: Schema.String;
|
|
1320
1327
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1321
1328
|
readonly keep: Schema.Boolean;
|
|
1322
1329
|
}>>;
|
|
1330
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1323
1331
|
}>>;
|
|
1324
1332
|
readonly email: Schema.optionalKey<Schema.Struct<{
|
|
1325
1333
|
readonly connection: Schema.String;
|
|
1326
1334
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1327
1335
|
readonly keep: Schema.Boolean;
|
|
1328
1336
|
}>>;
|
|
1337
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1329
1338
|
}>>;
|
|
1330
1339
|
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
1331
1340
|
readonly kind: Schema.Literals<readonly ["telegram", "slack", "whatsapp", "email", "custom"]>;
|
|
@@ -1333,6 +1342,7 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
1333
1342
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1334
1343
|
readonly keep: Schema.Boolean;
|
|
1335
1344
|
}>>;
|
|
1345
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
1336
1346
|
}>>>;
|
|
1337
1347
|
readonly attribution: Schema.optionalKey<Schema.Struct<{
|
|
1338
1348
|
readonly template: Schema.optionalKey<Schema.String>;
|
|
@@ -1647,24 +1657,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1647
1657
|
readonly files?: {
|
|
1648
1658
|
readonly keep: boolean;
|
|
1649
1659
|
} | undefined;
|
|
1660
|
+
readonly signature?: boolean | undefined;
|
|
1650
1661
|
} | undefined;
|
|
1651
1662
|
readonly slack?: {
|
|
1652
1663
|
readonly connection: string;
|
|
1653
1664
|
readonly files?: {
|
|
1654
1665
|
readonly keep: boolean;
|
|
1655
1666
|
} | undefined;
|
|
1667
|
+
readonly signature?: boolean | undefined;
|
|
1656
1668
|
} | undefined;
|
|
1657
1669
|
readonly whatsapp?: {
|
|
1658
1670
|
readonly connection: string;
|
|
1659
1671
|
readonly files?: {
|
|
1660
1672
|
readonly keep: boolean;
|
|
1661
1673
|
} | undefined;
|
|
1674
|
+
readonly signature?: boolean | undefined;
|
|
1662
1675
|
} | undefined;
|
|
1663
1676
|
readonly email?: {
|
|
1664
1677
|
readonly connection: string;
|
|
1665
1678
|
readonly files?: {
|
|
1666
1679
|
readonly keep: boolean;
|
|
1667
1680
|
} | undefined;
|
|
1681
|
+
readonly signature?: boolean | undefined;
|
|
1668
1682
|
} | undefined;
|
|
1669
1683
|
readonly channels?: {
|
|
1670
1684
|
readonly [x: string]: {
|
|
@@ -1673,6 +1687,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1673
1687
|
readonly keep: boolean;
|
|
1674
1688
|
} | undefined;
|
|
1675
1689
|
readonly connection?: string | undefined;
|
|
1690
|
+
readonly signature?: boolean | undefined;
|
|
1676
1691
|
};
|
|
1677
1692
|
} | undefined;
|
|
1678
1693
|
readonly attribution?: {
|
|
@@ -2019,24 +2034,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2019
2034
|
readonly files?: {
|
|
2020
2035
|
readonly keep: boolean;
|
|
2021
2036
|
} | undefined;
|
|
2037
|
+
readonly signature?: boolean | undefined;
|
|
2022
2038
|
} | undefined;
|
|
2023
2039
|
readonly slack?: {
|
|
2024
2040
|
readonly connection: string;
|
|
2025
2041
|
readonly files?: {
|
|
2026
2042
|
readonly keep: boolean;
|
|
2027
2043
|
} | undefined;
|
|
2044
|
+
readonly signature?: boolean | undefined;
|
|
2028
2045
|
} | undefined;
|
|
2029
2046
|
readonly whatsapp?: {
|
|
2030
2047
|
readonly connection: string;
|
|
2031
2048
|
readonly files?: {
|
|
2032
2049
|
readonly keep: boolean;
|
|
2033
2050
|
} | undefined;
|
|
2051
|
+
readonly signature?: boolean | undefined;
|
|
2034
2052
|
} | undefined;
|
|
2035
2053
|
readonly email?: {
|
|
2036
2054
|
readonly connection: string;
|
|
2037
2055
|
readonly files?: {
|
|
2038
2056
|
readonly keep: boolean;
|
|
2039
2057
|
} | undefined;
|
|
2058
|
+
readonly signature?: boolean | undefined;
|
|
2040
2059
|
} | undefined;
|
|
2041
2060
|
readonly channels?: {
|
|
2042
2061
|
readonly [x: string]: {
|
|
@@ -2045,6 +2064,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2045
2064
|
readonly keep: boolean;
|
|
2046
2065
|
} | undefined;
|
|
2047
2066
|
readonly connection?: string | undefined;
|
|
2067
|
+
readonly signature?: boolean | undefined;
|
|
2048
2068
|
};
|
|
2049
2069
|
} | undefined;
|
|
2050
2070
|
readonly attribution?: {
|
|
@@ -2391,24 +2411,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2391
2411
|
readonly files?: {
|
|
2392
2412
|
readonly keep: boolean;
|
|
2393
2413
|
} | undefined;
|
|
2414
|
+
readonly signature?: boolean | undefined;
|
|
2394
2415
|
} | undefined;
|
|
2395
2416
|
readonly slack?: {
|
|
2396
2417
|
readonly connection: string;
|
|
2397
2418
|
readonly files?: {
|
|
2398
2419
|
readonly keep: boolean;
|
|
2399
2420
|
} | undefined;
|
|
2421
|
+
readonly signature?: boolean | undefined;
|
|
2400
2422
|
} | undefined;
|
|
2401
2423
|
readonly whatsapp?: {
|
|
2402
2424
|
readonly connection: string;
|
|
2403
2425
|
readonly files?: {
|
|
2404
2426
|
readonly keep: boolean;
|
|
2405
2427
|
} | undefined;
|
|
2428
|
+
readonly signature?: boolean | undefined;
|
|
2406
2429
|
} | undefined;
|
|
2407
2430
|
readonly email?: {
|
|
2408
2431
|
readonly connection: string;
|
|
2409
2432
|
readonly files?: {
|
|
2410
2433
|
readonly keep: boolean;
|
|
2411
2434
|
} | undefined;
|
|
2435
|
+
readonly signature?: boolean | undefined;
|
|
2412
2436
|
} | undefined;
|
|
2413
2437
|
readonly channels?: {
|
|
2414
2438
|
readonly [x: string]: {
|
|
@@ -2417,6 +2441,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2417
2441
|
readonly keep: boolean;
|
|
2418
2442
|
} | undefined;
|
|
2419
2443
|
readonly connection?: string | undefined;
|
|
2444
|
+
readonly signature?: boolean | undefined;
|
|
2420
2445
|
};
|
|
2421
2446
|
} | undefined;
|
|
2422
2447
|
readonly attribution?: {
|
|
@@ -2763,24 +2788,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2763
2788
|
readonly files?: {
|
|
2764
2789
|
readonly keep: boolean;
|
|
2765
2790
|
} | undefined;
|
|
2791
|
+
readonly signature?: boolean | undefined;
|
|
2766
2792
|
} | undefined;
|
|
2767
2793
|
readonly slack?: {
|
|
2768
2794
|
readonly connection: string;
|
|
2769
2795
|
readonly files?: {
|
|
2770
2796
|
readonly keep: boolean;
|
|
2771
2797
|
} | undefined;
|
|
2798
|
+
readonly signature?: boolean | undefined;
|
|
2772
2799
|
} | undefined;
|
|
2773
2800
|
readonly whatsapp?: {
|
|
2774
2801
|
readonly connection: string;
|
|
2775
2802
|
readonly files?: {
|
|
2776
2803
|
readonly keep: boolean;
|
|
2777
2804
|
} | undefined;
|
|
2805
|
+
readonly signature?: boolean | undefined;
|
|
2778
2806
|
} | undefined;
|
|
2779
2807
|
readonly email?: {
|
|
2780
2808
|
readonly connection: string;
|
|
2781
2809
|
readonly files?: {
|
|
2782
2810
|
readonly keep: boolean;
|
|
2783
2811
|
} | undefined;
|
|
2812
|
+
readonly signature?: boolean | undefined;
|
|
2784
2813
|
} | undefined;
|
|
2785
2814
|
readonly channels?: {
|
|
2786
2815
|
readonly [x: string]: {
|
|
@@ -2789,6 +2818,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2789
2818
|
readonly keep: boolean;
|
|
2790
2819
|
} | undefined;
|
|
2791
2820
|
readonly connection?: string | undefined;
|
|
2821
|
+
readonly signature?: boolean | undefined;
|
|
2792
2822
|
};
|
|
2793
2823
|
} | undefined;
|
|
2794
2824
|
readonly attribution?: {
|
|
@@ -3306,7 +3336,10 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3306
3336
|
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
3307
3337
|
* of its kind. Within version 16, a
|
|
3308
3338
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
3309
|
-
* 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.
|
|
3310
3343
|
*/
|
|
3311
3344
|
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
|
|
3312
3345
|
readonly telegram: Schema.optionalKey<Schema.Struct<{
|
|
@@ -3314,24 +3347,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3314
3347
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3315
3348
|
readonly keep: Schema.Boolean;
|
|
3316
3349
|
}>>;
|
|
3350
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3317
3351
|
}>>;
|
|
3318
3352
|
readonly slack: Schema.optionalKey<Schema.Struct<{
|
|
3319
3353
|
readonly connection: Schema.String;
|
|
3320
3354
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3321
3355
|
readonly keep: Schema.Boolean;
|
|
3322
3356
|
}>>;
|
|
3357
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3323
3358
|
}>>;
|
|
3324
3359
|
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
|
|
3325
3360
|
readonly connection: Schema.String;
|
|
3326
3361
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3327
3362
|
readonly keep: Schema.Boolean;
|
|
3328
3363
|
}>>;
|
|
3364
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3329
3365
|
}>>;
|
|
3330
3366
|
readonly email: Schema.optionalKey<Schema.Struct<{
|
|
3331
3367
|
readonly connection: Schema.String;
|
|
3332
3368
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3333
3369
|
readonly keep: Schema.Boolean;
|
|
3334
3370
|
}>>;
|
|
3371
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3335
3372
|
}>>;
|
|
3336
3373
|
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
3337
3374
|
readonly kind: Schema.Literals<readonly ["telegram", "slack", "whatsapp", "email", "custom"]>;
|
|
@@ -3339,6 +3376,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3339
3376
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3340
3377
|
readonly keep: Schema.Boolean;
|
|
3341
3378
|
}>>;
|
|
3379
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3342
3380
|
}>>>;
|
|
3343
3381
|
readonly attribution: Schema.optionalKey<Schema.Struct<{
|
|
3344
3382
|
readonly template: Schema.optionalKey<Schema.String>;
|
|
@@ -3810,7 +3848,10 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3810
3848
|
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
3811
3849
|
* of its kind. Within version 16, a
|
|
3812
3850
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
3813
|
-
* 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.
|
|
3814
3855
|
*/
|
|
3815
3856
|
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
|
|
3816
3857
|
readonly telegram: Schema.optionalKey<Schema.Struct<{
|
|
@@ -3818,24 +3859,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3818
3859
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3819
3860
|
readonly keep: Schema.Boolean;
|
|
3820
3861
|
}>>;
|
|
3862
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3821
3863
|
}>>;
|
|
3822
3864
|
readonly slack: Schema.optionalKey<Schema.Struct<{
|
|
3823
3865
|
readonly connection: Schema.String;
|
|
3824
3866
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3825
3867
|
readonly keep: Schema.Boolean;
|
|
3826
3868
|
}>>;
|
|
3869
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3827
3870
|
}>>;
|
|
3828
3871
|
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
|
|
3829
3872
|
readonly connection: Schema.String;
|
|
3830
3873
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3831
3874
|
readonly keep: Schema.Boolean;
|
|
3832
3875
|
}>>;
|
|
3876
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3833
3877
|
}>>;
|
|
3834
3878
|
readonly email: Schema.optionalKey<Schema.Struct<{
|
|
3835
3879
|
readonly connection: Schema.String;
|
|
3836
3880
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3837
3881
|
readonly keep: Schema.Boolean;
|
|
3838
3882
|
}>>;
|
|
3883
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3839
3884
|
}>>;
|
|
3840
3885
|
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
3841
3886
|
readonly kind: Schema.Literals<readonly ["telegram", "slack", "whatsapp", "email", "custom"]>;
|
|
@@ -3843,6 +3888,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3843
3888
|
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
3844
3889
|
readonly keep: Schema.Boolean;
|
|
3845
3890
|
}>>;
|
|
3891
|
+
readonly signature: Schema.optionalKey<Schema.Boolean>;
|
|
3846
3892
|
}>>>;
|
|
3847
3893
|
readonly attribution: Schema.optionalKey<Schema.Struct<{
|
|
3848
3894
|
readonly template: Schema.optionalKey<Schema.String>;
|
|
@@ -4149,24 +4195,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4149
4195
|
readonly files?: {
|
|
4150
4196
|
readonly keep: boolean;
|
|
4151
4197
|
} | undefined;
|
|
4198
|
+
readonly signature?: boolean | undefined;
|
|
4152
4199
|
} | undefined;
|
|
4153
4200
|
readonly slack?: {
|
|
4154
4201
|
readonly connection: string;
|
|
4155
4202
|
readonly files?: {
|
|
4156
4203
|
readonly keep: boolean;
|
|
4157
4204
|
} | undefined;
|
|
4205
|
+
readonly signature?: boolean | undefined;
|
|
4158
4206
|
} | undefined;
|
|
4159
4207
|
readonly whatsapp?: {
|
|
4160
4208
|
readonly connection: string;
|
|
4161
4209
|
readonly files?: {
|
|
4162
4210
|
readonly keep: boolean;
|
|
4163
4211
|
} | undefined;
|
|
4212
|
+
readonly signature?: boolean | undefined;
|
|
4164
4213
|
} | undefined;
|
|
4165
4214
|
readonly email?: {
|
|
4166
4215
|
readonly connection: string;
|
|
4167
4216
|
readonly files?: {
|
|
4168
4217
|
readonly keep: boolean;
|
|
4169
4218
|
} | undefined;
|
|
4219
|
+
readonly signature?: boolean | undefined;
|
|
4170
4220
|
} | undefined;
|
|
4171
4221
|
readonly channels?: {
|
|
4172
4222
|
readonly [x: string]: {
|
|
@@ -4175,6 +4225,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4175
4225
|
readonly keep: boolean;
|
|
4176
4226
|
} | undefined;
|
|
4177
4227
|
readonly connection?: string | undefined;
|
|
4228
|
+
readonly signature?: boolean | undefined;
|
|
4178
4229
|
};
|
|
4179
4230
|
} | undefined;
|
|
4180
4231
|
readonly attribution?: {
|
|
@@ -4521,24 +4572,28 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4521
4572
|
readonly files?: {
|
|
4522
4573
|
readonly keep: boolean;
|
|
4523
4574
|
} | undefined;
|
|
4575
|
+
readonly signature?: boolean | undefined;
|
|
4524
4576
|
} | undefined;
|
|
4525
4577
|
readonly slack?: {
|
|
4526
4578
|
readonly connection: string;
|
|
4527
4579
|
readonly files?: {
|
|
4528
4580
|
readonly keep: boolean;
|
|
4529
4581
|
} | undefined;
|
|
4582
|
+
readonly signature?: boolean | undefined;
|
|
4530
4583
|
} | undefined;
|
|
4531
4584
|
readonly whatsapp?: {
|
|
4532
4585
|
readonly connection: string;
|
|
4533
4586
|
readonly files?: {
|
|
4534
4587
|
readonly keep: boolean;
|
|
4535
4588
|
} | undefined;
|
|
4589
|
+
readonly signature?: boolean | undefined;
|
|
4536
4590
|
} | undefined;
|
|
4537
4591
|
readonly email?: {
|
|
4538
4592
|
readonly connection: string;
|
|
4539
4593
|
readonly files?: {
|
|
4540
4594
|
readonly keep: boolean;
|
|
4541
4595
|
} | undefined;
|
|
4596
|
+
readonly signature?: boolean | undefined;
|
|
4542
4597
|
} | undefined;
|
|
4543
4598
|
readonly channels?: {
|
|
4544
4599
|
readonly [x: string]: {
|
|
@@ -4547,6 +4602,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
4547
4602
|
readonly keep: boolean;
|
|
4548
4603
|
} | undefined;
|
|
4549
4604
|
readonly connection?: string | undefined;
|
|
4605
|
+
readonly signature?: boolean | undefined;
|
|
4550
4606
|
};
|
|
4551
4607
|
} | undefined;
|
|
4552
4608
|
readonly attribution?: {
|
|
@@ -4899,24 +4955,28 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
4899
4955
|
readonly files?: {
|
|
4900
4956
|
readonly keep: boolean;
|
|
4901
4957
|
} | undefined;
|
|
4958
|
+
readonly signature?: boolean | undefined;
|
|
4902
4959
|
} | undefined;
|
|
4903
4960
|
readonly slack?: {
|
|
4904
4961
|
readonly connection: string;
|
|
4905
4962
|
readonly files?: {
|
|
4906
4963
|
readonly keep: boolean;
|
|
4907
4964
|
} | undefined;
|
|
4965
|
+
readonly signature?: boolean | undefined;
|
|
4908
4966
|
} | undefined;
|
|
4909
4967
|
readonly whatsapp?: {
|
|
4910
4968
|
readonly connection: string;
|
|
4911
4969
|
readonly files?: {
|
|
4912
4970
|
readonly keep: boolean;
|
|
4913
4971
|
} | undefined;
|
|
4972
|
+
readonly signature?: boolean | undefined;
|
|
4914
4973
|
} | undefined;
|
|
4915
4974
|
readonly email?: {
|
|
4916
4975
|
readonly connection: string;
|
|
4917
4976
|
readonly files?: {
|
|
4918
4977
|
readonly keep: boolean;
|
|
4919
4978
|
} | undefined;
|
|
4979
|
+
readonly signature?: boolean | undefined;
|
|
4920
4980
|
} | undefined;
|
|
4921
4981
|
readonly channels?: {
|
|
4922
4982
|
readonly [x: string]: {
|
|
@@ -4925,6 +4985,7 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
4925
4985
|
readonly keep: boolean;
|
|
4926
4986
|
} | undefined;
|
|
4927
4987
|
readonly connection?: string | undefined;
|
|
4988
|
+
readonly signature?: boolean | undefined;
|
|
4928
4989
|
};
|
|
4929
4990
|
} | undefined;
|
|
4930
4991
|
readonly attribution?: {
|
|
@@ -5271,24 +5332,28 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
5271
5332
|
readonly files?: {
|
|
5272
5333
|
readonly keep: boolean;
|
|
5273
5334
|
} | undefined;
|
|
5335
|
+
readonly signature?: boolean | undefined;
|
|
5274
5336
|
} | undefined;
|
|
5275
5337
|
readonly slack?: {
|
|
5276
5338
|
readonly connection: string;
|
|
5277
5339
|
readonly files?: {
|
|
5278
5340
|
readonly keep: boolean;
|
|
5279
5341
|
} | undefined;
|
|
5342
|
+
readonly signature?: boolean | undefined;
|
|
5280
5343
|
} | undefined;
|
|
5281
5344
|
readonly whatsapp?: {
|
|
5282
5345
|
readonly connection: string;
|
|
5283
5346
|
readonly files?: {
|
|
5284
5347
|
readonly keep: boolean;
|
|
5285
5348
|
} | undefined;
|
|
5349
|
+
readonly signature?: boolean | undefined;
|
|
5286
5350
|
} | undefined;
|
|
5287
5351
|
readonly email?: {
|
|
5288
5352
|
readonly connection: string;
|
|
5289
5353
|
readonly files?: {
|
|
5290
5354
|
readonly keep: boolean;
|
|
5291
5355
|
} | undefined;
|
|
5356
|
+
readonly signature?: boolean | undefined;
|
|
5292
5357
|
} | undefined;
|
|
5293
5358
|
readonly channels?: {
|
|
5294
5359
|
readonly [x: string]: {
|
|
@@ -5297,6 +5362,7 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
5297
5362
|
readonly keep: boolean;
|
|
5298
5363
|
} | undefined;
|
|
5299
5364
|
readonly connection?: string | undefined;
|
|
5365
|
+
readonly signature?: boolean | undefined;
|
|
5300
5366
|
};
|
|
5301
5367
|
} | undefined;
|
|
5302
5368
|
readonly attribution?: {
|
|
@@ -5553,6 +5619,11 @@ export declare function declaredChatRetentionDaysOf(manifest: Pick<OntologyManif
|
|
|
5553
5619
|
* number in range, else the default.
|
|
5554
5620
|
*/
|
|
5555
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;
|
|
5556
5627
|
/**
|
|
5557
5628
|
* Whether the chats of the agent's channel `name` keep their files as long as their messages, as
|
|
5558
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
|
|
@@ -613,7 +619,10 @@ const OntologyManifestModel = Schema.Struct({
|
|
|
613
619
|
* staff's replies in the inbox leave from; no other chat post goes to it, nor to another channel
|
|
614
620
|
* of its kind. Within version 16, a
|
|
615
621
|
* channel may carry `files: { keep: true }`, written only when declared: its chats keep their
|
|
616
|
-
* 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.
|
|
617
626
|
*/
|
|
618
627
|
chat: Schema.optionalKey(Schema.Struct({
|
|
619
628
|
telegram: Schema.optionalKey(ChatChannelManifest),
|
|
@@ -625,6 +634,7 @@ const OntologyManifestModel = Schema.Struct({
|
|
|
625
634
|
// A workspace channel (`custom`) has none: the agent sends through it.
|
|
626
635
|
connection: Schema.optionalKey(Schema.String),
|
|
627
636
|
files: Schema.optionalKey(ChatFilesManifest),
|
|
637
|
+
signature: Schema.optionalKey(Schema.Boolean),
|
|
628
638
|
}))),
|
|
629
639
|
attribution: Schema.optionalKey(Schema.Struct({
|
|
630
640
|
template: Schema.optionalKey(Schema.String),
|
|
@@ -768,6 +778,17 @@ export function chatRetentionDaysOf(manifest) {
|
|
|
768
778
|
? days
|
|
769
779
|
: CHAT_RETENTION_DAYS.default;
|
|
770
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
|
+
}
|
|
771
792
|
/**
|
|
772
793
|
* Whether the chats of the agent's channel `name` keep their files as long as their messages, as
|
|
773
794
|
* the channel's `files: { keep: true }` in `chat` declares; otherwise a file expires 24 hours after
|
package/dist/migrate/apply.js
CHANGED
|
@@ -255,7 +255,10 @@ export const applyMigration = (plan, options) => Effect.gen(function* () {
|
|
|
255
255
|
const targetPresent = presence.targets && isNoopMigration(plan)
|
|
256
256
|
? "EXISTS (SELECT 1 FROM _ontology_replication_targets WHERE generation = active_generation)"
|
|
257
257
|
: "false";
|
|
258
|
-
const [state] = yield* sql.unsafe(
|
|
258
|
+
const [state] = yield* sql.unsafe(
|
|
259
|
+
// Tables a release adds within the schema version are installed by its first migration.
|
|
260
|
+
`SELECT version, enabled, ${targetPresent} AS target_present, selection,
|
|
261
|
+
to_regclass('_ontology_replication_erasures') IS NOT NULL AS erasures
|
|
259
262
|
FROM _ontology_replication WHERE id`);
|
|
260
263
|
if (state?.enabled &&
|
|
261
264
|
state.version >= 6 &&
|
|
@@ -273,6 +276,7 @@ export const applyMigration = (plan, options) => Effect.gen(function* () {
|
|
|
273
276
|
}
|
|
274
277
|
if (isNoopMigration(plan) &&
|
|
275
278
|
state?.version === REPLICATION_SCHEMA_VERSION &&
|
|
279
|
+
state.erasures &&
|
|
276
280
|
(!state.enabled || (state.target_present && replicatesAll(plan.target, state.selection)))) {
|
|
277
281
|
if (options.workspaceId !== undefined || syncsIdentities(plan)) {
|
|
278
282
|
// Under the migration lock, and only while the catalog still records this target.
|