@segmentstream/ontology 0.142.0 → 0.143.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 +7 -0
- package/dist/analyze.js +6 -6
- package/dist/permissions.d.ts +4 -3
- package/dist/permissions.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.143.0
|
|
4
|
+
|
|
5
|
+
Roles can grant the agent's web search: `agent_tool:web_search`. It gives a caller the agent's
|
|
6
|
+
`segmentstream__web_search`, which the agent has while its `web.search` is on, and like every agent
|
|
7
|
+
tool permission only a role that names it, or `agent_tool:*`, grants it. A website's guests may hold
|
|
8
|
+
it in `guest.permissions`, beside `agent_tool:web`; each search is billed to the workspace.
|
|
9
|
+
|
|
3
10
|
## 0.142.0
|
|
4
11
|
|
|
5
12
|
Every `agent_chat` record has a unique `key`, `<provider>:<externalId>`, such as
|
package/dist/analyze.js
CHANGED
|
@@ -1965,14 +1965,14 @@ function checkGuestPermissions(input) {
|
|
|
1965
1965
|
report("invalid-sign-in", path, `Guests cannot hold ${String(permission)}; name the entities they may use.`);
|
|
1966
1966
|
continue;
|
|
1967
1967
|
}
|
|
1968
|
-
// A guest may read the agent's listed websites, never run its sandbox or
|
|
1969
|
-
// the sandbox reads the records and files of whoever it acts for, the
|
|
1970
|
-
// agent's own sign-ins, and anyone opening the website is a guest.
|
|
1968
|
+
// A guest may read the agent's listed websites and search the web, never run its sandbox or
|
|
1969
|
+
// drive its browser: the sandbox reads the records and files of whoever it acts for, the
|
|
1970
|
+
// browser acts with the agent's own sign-ins, and anyone opening the website is a guest.
|
|
1971
1971
|
if (parsed.entity === AGENT_TOOL &&
|
|
1972
1972
|
(MEMBER_AGENT_TOOLS.has(parsed.verb) || parsed.verb === WILDCARD)) {
|
|
1973
1973
|
report("invalid-sign-in", path, `Guests cannot hold ${String(permission)}: the agent's sandbox and browser are never a ` +
|
|
1974
|
-
`guest's. Name ${AGENT_TOOL}:web
|
|
1975
|
-
|
|
1974
|
+
`guest's. Name ${AGENT_TOOL}:web for the agent to read the websites web.domains lists ` +
|
|
1975
|
+
`for them, and ${AGENT_TOOL}:web_search for it to search the web for them.`);
|
|
1976
1976
|
continue;
|
|
1977
1977
|
}
|
|
1978
1978
|
const entity = entities.find((resolved) => resolved.name === parsed.entity);
|
|
@@ -2931,7 +2931,7 @@ function knownVerbs(entities, toolsets = []) {
|
|
|
2931
2931
|
verbs.set(AGENT_TOOL, new Set(AGENT_TOOL_VERBS));
|
|
2932
2932
|
return verbs;
|
|
2933
2933
|
}
|
|
2934
|
-
/** `agent_tool:sandbox, agent_tool:web and agent_tool:
|
|
2934
|
+
/** `agent_tool:sandbox, agent_tool:web, agent_tool:browser and agent_tool:web_search`, for messages. */
|
|
2935
2935
|
function agentToolPermissions() {
|
|
2936
2936
|
return listed(AGENT_TOOL_VERBS.map((tool) => `${AGENT_TOOL}:${tool}`));
|
|
2937
2937
|
}
|
package/dist/permissions.d.ts
CHANGED
|
@@ -47,10 +47,11 @@ export declare const AGENT_TOOL = "agent_tool";
|
|
|
47
47
|
* sandbox, copying a file the caller may read into it, and calling an ontology tool with arguments
|
|
48
48
|
* from a file in it. `web`: fetching pages from the domains the agent's configuration lists.
|
|
49
49
|
* `browser`: driving the agent's own cloud browser, signed in as the agent, with scripts that run
|
|
50
|
-
* in its sandbox, so the agent also needs the sandbox for it.
|
|
51
|
-
*
|
|
50
|
+
* in its sandbox, so the agent also needs the sandbox for it. `web_search`: searching the web, each
|
|
51
|
+
* search billed to the workspace. The agent's configuration says which of them the agent has; the
|
|
52
|
+
* roles say which caller gets them.
|
|
52
53
|
*/
|
|
53
|
-
export declare const AGENT_TOOL_VERBS: readonly ["sandbox", "web", "browser"];
|
|
54
|
+
export declare const AGENT_TOOL_VERBS: readonly ["sandbox", "web", "browser", "web_search"];
|
|
54
55
|
export type AgentToolVerb = (typeof AGENT_TOOL_VERBS)[number];
|
|
55
56
|
/**
|
|
56
57
|
* The agent tools no guest may hold, whoever opens the website: the sandbox reads the records and
|
package/dist/permissions.js
CHANGED
|
@@ -54,10 +54,11 @@ export const AGENT_TOOL = "agent_tool";
|
|
|
54
54
|
* sandbox, copying a file the caller may read into it, and calling an ontology tool with arguments
|
|
55
55
|
* from a file in it. `web`: fetching pages from the domains the agent's configuration lists.
|
|
56
56
|
* `browser`: driving the agent's own cloud browser, signed in as the agent, with scripts that run
|
|
57
|
-
* in its sandbox, so the agent also needs the sandbox for it.
|
|
58
|
-
*
|
|
57
|
+
* in its sandbox, so the agent also needs the sandbox for it. `web_search`: searching the web, each
|
|
58
|
+
* search billed to the workspace. The agent's configuration says which of them the agent has; the
|
|
59
|
+
* roles say which caller gets them.
|
|
59
60
|
*/
|
|
60
|
-
export const AGENT_TOOL_VERBS = ["sandbox", "web", "browser"];
|
|
61
|
+
export const AGENT_TOOL_VERBS = ["sandbox", "web", "browser", "web_search"];
|
|
61
62
|
/**
|
|
62
63
|
* The agent tools no guest may hold, whoever opens the website: the sandbox reads the records and
|
|
63
64
|
* files of whoever the agent acts for, and the browser acts with the agent's own sign-ins.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.143.0",
|
|
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",
|