@segmentstream/ontology 0.180.0 → 0.182.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 +31 -0
- package/dist/agent-chat.d.ts +2 -2
- package/dist/agent-chat.js +2 -1
- package/dist/agent-draft.d.ts +8 -8
- package/dist/analyze.d.ts +1 -8
- package/dist/analyze.js +108 -52
- package/dist/index.d.ts +1 -1
- package/dist/manifest.d.ts +110 -68
- package/dist/manifest.js +24 -2
- package/dist/migrate/model.d.ts +78 -50
- package/dist/review.d.ts +46 -0
- package/dist/review.js +47 -0
- package/dist/runtime/agent-web.js +47 -26
- package/dist/runtime/agents.js +53 -4
- package/dist/runtime/guests.d.ts +4 -1
- package/dist/runtime/guests.js +24 -5
- package/dist/service/agent/protocol.d.ts +51 -0
- package/dist/service/agent/protocol.js +66 -1
- package/dist/service/agent/server.d.ts +8 -2
- package/dist/service/agent/server.js +208 -48
- package/dist/service/authentication.js +14 -3
- package/dist/service/chat/archive.d.ts +8 -1
- package/dist/service/chat/delivery.js +3 -1
- package/dist/service/chat/envelope.d.ts +8 -8
- package/dist/service/chat/local-reads.d.ts +5 -5
- package/dist/service/chat/providers/custom.js +2 -0
- package/dist/service/chat/providers/provider.d.ts +5 -0
- package/dist/service/chat/reply-proposal.d.ts +122 -0
- package/dist/service/chat/reply-proposal.js +385 -0
- package/dist/service/chat/review-delivery.d.ts +131 -24
- package/dist/service/chat/review-delivery.js +393 -296
- package/dist/service/chat/store-delivery.d.ts +27 -5
- package/dist/service/chat/store-delivery.js +45 -33
- package/dist/service/discovery-search.d.ts +1 -1
- package/dist/service/operations.js +2 -1
- package/dist/service/runtime-contract.d.ts +33 -1
- package/dist/service/runtime-identity.d.ts +1 -0
- package/dist/service/runtime-identity.js +2 -0
- package/dist/service/schemas.d.ts +4 -0
- package/dist/service/service.js +12 -14
- package/dist/service/toolsets.d.ts +1 -1
- package/dist/service/toolsets.js +38 -4
- package/dist/sign-in.d.ts +14 -7
- package/dist/sign-in.js +4 -3
- package/dist/toolset.d.ts +17 -1
- package/dist/workspace-channel.d.ts +6 -0
- package/dist/workspace-channel.js +27 -0
- package/package.json +5 -1
- package/dist/service/agent/public-group-action.d.ts +0 -23
- package/dist/service/agent/public-group-action.js +0 -53
package/dist/manifest.js
CHANGED
|
@@ -509,6 +509,8 @@ export const SignUpManifest = Schema.Struct({
|
|
|
509
509
|
* know admit nobody.
|
|
510
510
|
*/
|
|
511
511
|
export const GuestManifest = Schema.Struct({
|
|
512
|
+
openOnInvite: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
513
|
+
byChannel: Schema.optionalKey(Schema.Record(Schema.String, Schema.Array(Schema.String))),
|
|
512
514
|
channels: Schema.Array(Schema.String),
|
|
513
515
|
origins: Schema.Array(Schema.String),
|
|
514
516
|
/** The challenge a new guest passes, and the workspace secret holding its secret key. */
|
|
@@ -872,7 +874,7 @@ export function guestOf(manifest) {
|
|
|
872
874
|
if (typeof declared !== "object" || declared === null) {
|
|
873
875
|
return undefined;
|
|
874
876
|
}
|
|
875
|
-
const { channels, origins, botCheck, confirmations } = declared;
|
|
877
|
+
const { channels, origins, byChannel, openOnInvite, botCheck, confirmations } = declared;
|
|
876
878
|
const known = Array.isArray(channels) ? channels.filter(isGuestChannel) : [];
|
|
877
879
|
const websites = Array.isArray(origins)
|
|
878
880
|
? origins.flatMap((candidate) => {
|
|
@@ -887,7 +889,16 @@ export function guestOf(manifest) {
|
|
|
887
889
|
check.connection !== "" &&
|
|
888
890
|
typeof check.input === "string" &&
|
|
889
891
|
check.input !== "";
|
|
890
|
-
if (
|
|
892
|
+
if (byChannel !== undefined &&
|
|
893
|
+
(byChannel === null ||
|
|
894
|
+
typeof byChannel !== "object" ||
|
|
895
|
+
Array.isArray(byChannel) ||
|
|
896
|
+
Object.entries(byChannel).some(([key, roles]) => !known.some((channel) => channel === key) ||
|
|
897
|
+
!Array.isArray(roles) ||
|
|
898
|
+
!roles.every((role) => typeof role === "string")))) {
|
|
899
|
+
return undefined;
|
|
900
|
+
}
|
|
901
|
+
if (known.length === 0 || (known.includes("web") && websites.length === 0)) {
|
|
891
902
|
return undefined;
|
|
892
903
|
}
|
|
893
904
|
// A bot check this reader cannot verify admits no new guest, rather than none without a check.
|
|
@@ -901,6 +912,8 @@ export function guestOf(manifest) {
|
|
|
901
912
|
return {
|
|
902
913
|
channels: [...new Set(known)],
|
|
903
914
|
origins: websites,
|
|
915
|
+
...(byChannel && { byChannel }),
|
|
916
|
+
...(Array.isArray(openOnInvite) && { openOnInvite }),
|
|
904
917
|
...(check === undefined
|
|
905
918
|
? {}
|
|
906
919
|
: connected
|
|
@@ -1187,6 +1200,15 @@ export function buildManifest(input) {
|
|
|
1187
1200
|
: {
|
|
1188
1201
|
guest: {
|
|
1189
1202
|
channels: [...input.signIn.guest.channels],
|
|
1203
|
+
...(input.signIn.guest.openOnInvite && {
|
|
1204
|
+
openOnInvite: input.signIn.guest.openOnInvite,
|
|
1205
|
+
}),
|
|
1206
|
+
...(input.signIn.guest.byChannel && {
|
|
1207
|
+
byChannel: Object.fromEntries(Object.entries(input.signIn.guest.byChannel).map(([channel, roles]) => [
|
|
1208
|
+
channel,
|
|
1209
|
+
[...roles],
|
|
1210
|
+
])),
|
|
1211
|
+
}),
|
|
1190
1212
|
origins: [...input.signIn.guest.origins],
|
|
1191
1213
|
...(input.signIn.guest.botCheck === undefined
|
|
1192
1214
|
? {}
|