@segmentstream/ontology 0.193.0 → 0.193.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 +4 -0
- package/dist/chat-personas.d.ts +2 -0
- package/dist/chat-personas.js +12 -0
- package/dist/service/agent/server.js +3 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.193.1
|
|
4
|
+
|
|
5
|
+
Select a chat persona consistently across senders and threads. Resolve chat settings and live turns from the same chat address, and provide sandbox and browser guidance with the authorized tools.
|
|
6
|
+
|
|
3
7
|
## 0.193.0
|
|
4
8
|
|
|
5
9
|
`workspaceSourceHistory({ since, until, offset? })` reads main's commits of the workspace's own repository whose commit time is in `[since, until)`, at most 31 days, newest first: each commit's `sha`, `author` (`name`, `email`), `committedAt`, `title` and `parents`, with `nextOffset` to continue the window. A production deployment calls it in a workflow step's `run` or an action's `prepare`, for a caller (a member or the workflow's user) whose role grants `workspace_source:read`.
|
package/dist/chat-personas.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export interface PersonaContext {
|
|
|
5
5
|
readonly kind: "private" | "group";
|
|
6
6
|
readonly audience?: "guest" | "member";
|
|
7
7
|
}
|
|
8
|
+
/** Audience is an attribute of an authenticated web chat address. Shared chats can have mixed audiences. */
|
|
9
|
+
export declare function chatPersonaContext(address: Omit<PersonaContext, "audience">, externalId: string): PersonaContext;
|
|
8
10
|
export interface PersonaRule {
|
|
9
11
|
readonly when: Partial<PersonaContext>;
|
|
10
12
|
readonly use: string;
|
package/dist/chat-personas.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/** Audience is an attribute of an authenticated web chat address. Shared chats can have mixed audiences. */
|
|
2
|
+
export function chatPersonaContext(address, externalId) {
|
|
3
|
+
if (address.provider === "web" && address.kind === "private") {
|
|
4
|
+
if (externalId.startsWith("guest:")) {
|
|
5
|
+
return { ...address, audience: "guest" };
|
|
6
|
+
}
|
|
7
|
+
if (externalId.startsWith("member:")) {
|
|
8
|
+
return { ...address, audience: "member" };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return address;
|
|
12
|
+
}
|
|
1
13
|
export function chatPersonaNames(settings) {
|
|
2
14
|
return [
|
|
3
15
|
...new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chatPersona, chatPersonaNames, deployedChatPersonas } from "../../chat-personas.js";
|
|
1
|
+
import { chatPersona, chatPersonaContext, chatPersonaNames, deployedChatPersonas, } from "../../chat-personas.js";
|
|
2
2
|
import { isAllowed, effectiveScope } from "../../permissions.js";
|
|
3
3
|
import { confirmationCommand } from "./confirmations.js";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -966,14 +966,11 @@ export function agentLayer(options) {
|
|
|
966
966
|
}
|
|
967
967
|
const channel = String(chat.provider);
|
|
968
968
|
const assigned = typeof chat.agent_persona === "string" ? chat.agent_persona : null;
|
|
969
|
-
const selection = chatPersona(policy, {
|
|
969
|
+
const selection = chatPersona(policy, chatPersonaContext({
|
|
970
970
|
provider: store.channelKind?.(channel) ?? channel,
|
|
971
971
|
channel,
|
|
972
972
|
kind: chat.kind === "private" ? "private" : "group",
|
|
973
|
-
|
|
974
|
-
? "guest"
|
|
975
|
-
: "member",
|
|
976
|
-
}, assigned);
|
|
973
|
+
}, String(chat.external_id)), assigned);
|
|
977
974
|
const group = chat.kind === "group" && store.readGroupAccess
|
|
978
975
|
? yield* manageableChat(member, "id", id, "agent_chat:set_access")
|
|
979
976
|
: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.193.
|
|
3
|
+
"version": "0.193.1",
|
|
4
4
|
"description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|