@engenty/wizards-runtime 0.16.2 → 0.17.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/apps/runtime/dist/agents/studio-assistant.js +13 -6
- package/apps/runtime/dist/app.js +2 -0
- package/apps/runtime/dist/assistant/knows.js +15 -2
- package/apps/runtime/dist/broker/account.js +20 -1
- package/apps/runtime/dist/broker/call.js +131 -22
- package/apps/runtime/dist/broker/grant.js +25 -1
- package/apps/runtime/dist/broker/host.js +8 -2
- package/apps/runtime/dist/broker/index.js +5 -4
- package/apps/runtime/dist/broker/log.js +178 -24
- package/apps/runtime/dist/broker/over.js +38 -0
- package/apps/runtime/dist/broker/rights.js +192 -0
- package/apps/runtime/dist/broker/rwx.js +309 -53
- package/apps/runtime/dist/broker/send.js +109 -44
- package/apps/runtime/dist/bundles/fetch.js +119 -0
- package/apps/runtime/dist/bundles/index.js +621 -0
- package/apps/runtime/dist/bundles/read.js +607 -0
- package/apps/runtime/dist/connectors/external.js +532 -61
- package/apps/runtime/dist/connectors/person-sign-ins.js +1 -0
- package/apps/runtime/dist/connectors/reload.js +73 -0
- package/apps/runtime/dist/connectors/space-connections.js +118 -6
- package/apps/runtime/dist/db/migrations/tenant/0058_mcp_state_across_roles.sql +26 -0
- package/apps/runtime/dist/db/migrations/tenant/0059_space_connection_paused.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0060_space_bundle.sql +21 -0
- package/apps/runtime/dist/db/migrations/tenant/0061_space_connection_limits.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0058_snapshot.json +6696 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0059_snapshot.json +6710 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0060_snapshot.json +6857 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0061_snapshot.json +6871 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +28 -0
- package/apps/runtime/dist/db/schema.js +81 -3
- package/apps/runtime/dist/docs/dev/broker.md +316 -50
- package/apps/runtime/dist/docs/dev/plugins/space.md +13 -2
- package/apps/runtime/dist/docs/user-guide/capabilities.md +172 -10
- package/apps/runtime/dist/docs/user-guide/connectors.md +57 -7
- package/apps/runtime/dist/docs/user-guide/protocol.md +44 -7
- package/apps/runtime/dist/docs/user-guide/test-and-share.md +1 -1
- package/apps/runtime/dist/docs/user-guide/together.md +4 -4
- package/apps/runtime/dist/elements/caller.js +2 -2
- package/apps/runtime/dist/elements/knowledge.js +16 -12
- package/apps/runtime/dist/engenty/connections-external/build-connector.js +23 -8
- package/apps/runtime/dist/engenty/connections-external/import-service.js +18 -9
- package/apps/runtime/dist/engenty/connections-external/importer/classify.js +12 -0
- package/apps/runtime/dist/engenty/connections-external/invoke/http-invoker.js +1 -0
- package/apps/runtime/dist/engenty/connections-external/net/guarded-fetch.js +6 -3
- package/apps/runtime/dist/engenty/connections-sdk/oauth2.js +2 -2
- package/apps/runtime/dist/engenty/shims/web-ingest.js +64 -0
- package/apps/runtime/dist/engine/resources.js +15 -6
- package/apps/runtime/dist/engine/runner.js +2 -1
- package/apps/runtime/dist/engine/steps.js +3 -2
- package/apps/runtime/dist/env.js +2 -0
- package/apps/runtime/dist/index.js +19 -2
- package/apps/runtime/dist/live/hub.js +17 -3
- package/apps/runtime/dist/live/origin.js +6 -4
- package/apps/runtime/dist/live/views.js +38 -7
- package/apps/runtime/dist/mcp/handler.js +2 -2
- package/apps/runtime/dist/mcp/seen.js +71 -51
- package/apps/runtime/dist/mcp/tools.js +5 -1
- package/apps/runtime/dist/models.js +18 -0
- package/apps/runtime/dist/prompts/mcp.md +1 -1
- package/apps/runtime/dist/prompts/tools.md +17 -1
- package/apps/runtime/dist/routes/api.js +2 -2
- package/apps/runtime/dist/routes/broker.js +59 -20
- package/apps/runtime/dist/routes/bundles.js +91 -0
- package/apps/runtime/dist/routes/connections.js +14 -3
- package/apps/runtime/dist/routes/live.js +4 -2
- package/apps/runtime/dist/routes/rules.js +53 -9
- package/apps/runtime/dist/routes/studio.js +36 -20
- package/apps/runtime/dist/services/api.js +4 -2
- package/apps/runtime/dist/services/cloud.js +2 -0
- package/apps/runtime/dist/services/draft-events.js +79 -6
- package/apps/runtime/dist/services/errors.js +1 -0
- package/apps/runtime/dist/services/files.js +2 -2
- package/apps/runtime/dist/services/knowledge.js +93 -27
- package/apps/runtime/dist/services/members-studio.js +22 -2
- package/apps/runtime/dist/services/skills.js +61 -5
- package/apps/runtime/dist/services/space-categories.js +83 -5
- package/apps/runtime/dist/services/space-index.js +173 -25
- package/apps/runtime/dist/services/space-origin.js +28 -11
- package/apps/runtime/dist/services/synced-spaces.js +5 -1
- package/apps/runtime/dist/services/wizards.js +48 -2
- package/apps/runtime/dist/services/work-ai.js +15 -5
- package/apps/runtime/dist/sharing/jobs.js +8 -2
- package/apps/runtime/dist/sync/hub.js +17 -3
- package/apps/runtime/dist/sync/records.js +6 -1
- package/apps/runtime/dist/texts.js +42 -5
- package/apps/runtime/dist/tools/connections.js +8 -0
- package/apps/runtime/dist/tools/connector.js +13 -1
- package/apps/runtime/dist/tools/index.js +21 -10
- package/apps/runtime/dist/tools/skills.js +11 -1
- package/apps/runtime/dist/tools/web-search.js +36 -0
- package/apps/web/dist/assets/{AboutDialog-BCcD8hKm.js → AboutDialog-mZCBU7KF.js} +1 -1
- package/apps/web/dist/assets/{BlockEditor-DgaUm2pR.js → BlockEditor-Dk0QwLSU.js} +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-GkpgF-wZ.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-B08elwyr.js → ChangelogDialog-BhyilZWA.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-BiyOk_SC.js → CodeEditor-DULYZbuE.js} +1 -1
- package/apps/web/dist/assets/EditorPage-D_mCdYdZ.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-DF_6TvZ0.js → FlowPreview-ykxZxWnk.js} +1 -1
- package/apps/web/dist/assets/{LangSwitch-Ba4OWLzJ.js → LangSwitch-iO54w9AP.js} +1 -1
- package/apps/web/dist/assets/{Marketplace-DqziLf66.js → Marketplace-C97fH7UC.js} +2 -2
- package/apps/web/dist/assets/{NewWizardChannels-CsIGp0nZ.js → NewWizardChannels-CsSV7sm2.js} +1 -1
- package/apps/web/dist/assets/{NewWizardPage-CzQAkKMy.js → NewWizardPage-Ebgw-Vf_.js} +1 -1
- package/apps/web/dist/assets/{OnboardingPage-B9gr2OX5.js → OnboardingPage-BZlloT7v.js} +1 -1
- package/apps/web/dist/assets/PreviewPane-CJuqY5uA.js +7 -0
- package/apps/web/dist/assets/ProtocolSection-CPaDKVpZ.js +1 -0
- package/apps/web/dist/assets/{PublicRunner-BVs8-Vu3.js → PublicRunner-4Lf4SnwB.js} +1 -1
- package/apps/web/dist/assets/{ReadOnly--4CIJCDD.js → ReadOnly-CXQ41R9Q.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-C-8BgK9O.js +2 -0
- package/apps/web/dist/assets/{SetupPage-9Zk-KUGA.js → SetupPage-4_K083Wl.js} +1 -1
- package/apps/web/dist/assets/{SharePage-D_Ab0gjr.js → SharePage-CQjgMcDI.js} +1 -1
- package/apps/web/dist/assets/{SkillEditor-DvtameHg.js → SkillEditor-DT5hQwbg.js} +1 -1
- package/apps/web/dist/assets/{Skills-Cf1Kl4Fy.js → Skills-D7V_9_xo.js} +1 -1
- package/apps/web/dist/assets/SpacePage-D3rYS1bA.js +2 -0
- package/apps/web/dist/assets/{UpdateCheck-DweZBVP6.js → UpdateCheck-DVgAJmy8.js} +2 -2
- package/apps/web/dist/assets/changelog-DzQCUSsx.js +1 -0
- package/apps/web/dist/assets/{code-editor-B1RbFTAZ.js → code-editor-5T7ilBjd.js} +2 -2
- package/apps/web/dist/assets/{host-CKS5U5Vg.js → host-CCijW1hj.js} +6 -6
- package/apps/web/dist/assets/i18n-DCPDesT-.js +55 -0
- package/apps/web/dist/assets/{index-Ckcn5vy7.js → index-C_iWl8iS.js} +3 -3
- package/apps/web/dist/assets/index-zcPlodHx.css +1 -0
- package/apps/web/dist/assets/minus-BpYkOkYw.js +1 -0
- package/apps/web/dist/assets/{read-aloud-Bq88XUHC.js → read-aloud-Qb719not.js} +1 -1
- package/apps/web/dist/assets/{runners-DvYVe9Dt.js → runners-BeZ84YH_.js} +1 -1
- package/apps/web/dist/assets/{session-D2bjiA3P.js → session-CEJRkSP5.js} +1 -1
- package/apps/web/dist/assets/{theme-CNJIC2be.js → theme-y_owNosi.js} +1 -1
- package/apps/web/dist/assets/{ui-Mplfhz_Z.js → ui-BacfkQ7Q.js} +1 -1
- package/apps/web/dist/assets/{useMutation-8QRM-z4M.js → useMutation-CgzFr4qH.js} +1 -1
- package/apps/web/dist/assets/{viewers-CEocUV_2.js → viewers-CkyHAjnk.js} +2 -2
- package/apps/web/dist/index.html +12 -12
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +7 -2
- package/node_modules/@engenty/wizards-shared/dist/bundles.d.ts +219 -0
- package/node_modules/@engenty/wizards-shared/dist/bundles.js +19 -0
- package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +117 -4
- package/node_modules/@engenty/wizards-shared/dist/connectors.js +14 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +12 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +12 -0
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +11 -0
- package/node_modules/@engenty/wizards-shared/dist/run.js +22 -0
- package/node_modules/@engenty/wizards-shared/dist/rwx.d.ts +84 -1
- package/node_modules/@engenty/wizards-shared/dist/rwx.js +69 -1
- package/node_modules/@engenty/wizards-shared/dist/skills.d.ts +20 -3
- package/node_modules/@engenty/wizards-shared/dist/skills.js +5 -2
- package/node_modules/@engenty/wizards-shared/dist/spaces.d.ts +3 -2
- package/node_modules/@engenty/wizards-shared/dist/spaces.js +12 -3
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-DuJJV1ll.js +0 -2
- package/apps/web/dist/assets/EditorPage-EMFTHEYD.js +0 -3
- package/apps/web/dist/assets/PreviewPane-DSOV3o-1.js +0 -7
- package/apps/web/dist/assets/SettingsPage-z2u8lSe2.js +0 -2
- package/apps/web/dist/assets/SpacePage-CyqVzX9b.js +0 -2
- package/apps/web/dist/assets/changelog-C85v9OWg.js +0 -1
- package/apps/web/dist/assets/connection-sign-in-CaVvh5GQ.js +0 -1
- package/apps/web/dist/assets/i18n-Bymk5Ev-.js +0 -55
- package/apps/web/dist/assets/index-w-3J3ZJ9.css +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Capabilities
|
|
3
|
-
description: One place for what your wizards, Work chats and Goose may use – skills, the space’s connections to other services, the audit of every call, and a search for more.
|
|
4
|
-
version: 0.
|
|
3
|
+
description: One place for what your wizards, Work chats and Goose may use – skills, the space’s connections to other services, the audit of every call, who may read, change and run what, and a search for more.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
**Capabilities** in the app bar, after Resources, holds what a space’s wizards, Work chats and
|
|
8
8
|
Goose may use. On a phone you find it in the “More” menu. It belongs to the space you are in, and
|
|
9
9
|
each space has its own.
|
|
10
10
|
|
|
11
|
-
It opens on the **Overview**, then has
|
|
11
|
+
It opens on the **Overview**, then has four more sections. None of them has a menu of its own:
|
|
12
12
|
the list of sections stays beside the page.
|
|
13
13
|
|
|
14
14
|
| Section | What it holds | Who sees it |
|
|
@@ -16,7 +16,8 @@ the list of sections stays beside the page.
|
|
|
16
16
|
| **Overview** | The skills that count, the space’s connections and the built-in connectors nobody connected yet, on one page, with a search over them. Its second tab, **Discover**, searches skills.sh and integrations.sh | Everyone who uses the studio. Only admins set up a connector from Discover |
|
|
17
17
|
| **Skills** | Instructions your wizards work by. See [Skills](./skills.md) | Everyone who uses the studio |
|
|
18
18
|
| **Connectors** | The space’s connections to other services, the built-in connectors and the ones from the registry | Everyone who uses the studio. Members see the connections open to them |
|
|
19
|
-
| **Audit** | Every call to a connection, allowed or not. See [Audit](./protocol.md) | The owner and the admins |
|
|
19
|
+
| **Audit** | Every call to a connection, allowed or not. See [Audit](./protocol.md) | The owner and the admins see every line. A member sees their own |
|
|
20
|
+
| **Rights** | Who may read, change and run what in the space. See [Rights](#rights) | The owner and the admins |
|
|
20
21
|
|
|
21
22
|
The old addresses still work: `/skills` opens Capabilities › Skills, the connectors’ old address
|
|
22
23
|
in the settings opens Capabilities › Connectors, and `/capabilities/discover` opens the Overview’s
|
|
@@ -25,7 +26,9 @@ Discover tab.
|
|
|
25
26
|
## Overview
|
|
26
27
|
|
|
27
28
|
The Overview shows the skills that are always on or on demand, with the ones always on first, and
|
|
28
|
-
the space’s connections, each with how it signs in and who may use it.
|
|
29
|
+
the space’s connections, each with how it signs in and who may use it. A connection that guests
|
|
30
|
+
reach is marked “open to guests”, and admins see a note above the list that counts them (see
|
|
31
|
+
[Connections that guests reach](#connections-that-guests-reach)). “All” beside each part
|
|
29
32
|
opens its section, and the menu shows how many skills and connections the space has. The search
|
|
30
33
|
looks through both. The “Discover” tab, or a search for something the space doesn’t have, searches
|
|
31
34
|
skills.sh and integrations.sh in place, with the same words. “Add” leads to a new skill, a new
|
|
@@ -44,7 +47,14 @@ each setting, the scripts a skill may bring, and the limits.
|
|
|
44
47
|
Under Connectors, “In this space” lists the space’s **connections**. A connection is one account
|
|
45
48
|
at a service that the space uses, such as Gmail · Orders or HubSpot · Sales. Below the list you
|
|
46
49
|
see the built-in connectors that nobody connected yet, and under “More connectors” the ones from
|
|
47
|
-
the integrations.sh registry.
|
|
50
|
+
the integrations.sh registry and the ones you add by their address.
|
|
51
|
+
|
|
52
|
+
**By address.** A service the registry doesn’t list, such as your own MCP server, comes in under
|
|
53
|
+
“More connectors” with “By address”. You paste the address, check what engenty wizards read there,
|
|
54
|
+
and import it. Such a connector is marked “not checked”: nobody has looked at the server, and its
|
|
55
|
+
texts reach the AI as they are. A new connection on it is for admins only at first. On your
|
|
56
|
+
computer the address may be a private one, such as `localhost`. In the cloud a private address is
|
|
57
|
+
refused. [Connectors](./connectors.md#by-its-address) has the steps.
|
|
48
58
|
|
|
49
59
|
A connection belongs to the space, not to the person who set it up. Its page says who set it up
|
|
50
60
|
and when (“set up by Matthias on 12 Oct”), and when it was last used. It stays when that person
|
|
@@ -53,16 +63,43 @@ leaves. Only the space’s admins set up a connection, change it or remove it.
|
|
|
53
63
|
When an admin sets one up, they choose how it signs in and who may use it. On its page they then
|
|
54
64
|
set what it may do.
|
|
55
65
|
|
|
56
|
-
**How it signs in.**
|
|
66
|
+
**How it signs in.**
|
|
57
67
|
|
|
58
68
|
| Signs in | What it means |
|
|
59
69
|
|---|---|
|
|
60
70
|
| As the space | An admin signs in once, with an API key, an app token or a team account such as orders@. Everyone uses that account, also when nobody is watching. The AI only reads through it. Changes come from fixed steps or from an action a person confirms in a Work chat |
|
|
61
71
|
| Each person signs in | Each person signs in once with their own account, on the connection’s page or in their menu. The connection then acts as that person, and asks them before it changes something |
|
|
62
72
|
|
|
73
|
+
An admin can change this later on the connection’s page. The change removes the sign-ins made
|
|
74
|
+
until then: every person’s when the connection becomes the space’s, the space’s when each person
|
|
75
|
+
signs in from then on. The page asks before it changes anything. A connection that a plugin uses
|
|
76
|
+
always signs in as the space.
|
|
77
|
+
|
|
78
|
+
In the cloud, your organization’s plan decides whether “Each person signs in” is available. Where
|
|
79
|
+
the plan doesn’t include it, the choice is greyed out with a sentence that says so, and a new
|
|
80
|
+
connection signs in as the space. A connection that already has each person sign in keeps working,
|
|
81
|
+
and people still sign in and out of it. You can change it to “As the space”, but not back. On your
|
|
82
|
+
computer there is no plan, so both ways are always available.
|
|
83
|
+
|
|
63
84
|
**Who may use it.** Admins, Members or Everyone. Everyone includes guests who start a wizard from
|
|
64
85
|
its link. A guest’s run never uses a connection that is only for members or admins.
|
|
65
86
|
|
|
87
|
+
### Connections that guests reach
|
|
88
|
+
|
|
89
|
+
Guests reach a connection that is for Everyone and signs in as the space. The list marks each one
|
|
90
|
+
“open to guests”. Where each person signs in, a guest has no sign-in of their own, so guests don’t
|
|
91
|
+
reach it, whoever it is for.
|
|
92
|
+
|
|
93
|
+
Admins see a note above the list, on the Overview and under Connectors, as long as the space has
|
|
94
|
+
such a connection. It says how many there are and names each one. “Narrow to members” beside a
|
|
95
|
+
connection sets it to Members with one click, and nothing changes until you click. To open it
|
|
96
|
+
again, choose Everyone on the connection’s page. Members don’t see the note.
|
|
97
|
+
|
|
98
|
+
A connection that a plugin set up names the plugin, in the list and on its page. The appointment
|
|
99
|
+
planner, for example, books for guests through a calendar connection. The note says so before you
|
|
100
|
+
narrow it: once the connection is for members only, the plugin can’t reach it when a guest starts
|
|
101
|
+
a wizard. What the plugin does by itself, such as keeping a calendar in step, goes on.
|
|
102
|
+
|
|
66
103
|
**What it may do.** One rule for each kind of action: Read, Change, Delete and Send. Each rule is
|
|
67
104
|
Allowed, With approval or Never. A new connection reads freely, asks for approval before a change
|
|
68
105
|
or a send, and never deletes.
|
|
@@ -73,10 +110,64 @@ With approval on a connection that signs in as the space asks the space’s admi
|
|
|
73
110
|
under the bell in Work until one of them agrees. Where each person signs in, With approval asks
|
|
74
111
|
that person.
|
|
75
112
|
|
|
113
|
+
A wizard’s run doesn’t wait for the admins. A fixed step whose rule is With approval fails in a
|
|
114
|
+
run. The editor warns you on such a step: it names the connection and the rule, and leads to the
|
|
115
|
+
connection’s page. An admin sets the rule to Allowed there. A member asks an admin. The warning
|
|
116
|
+
is no error: the wizard still saves and publishes.
|
|
117
|
+
|
|
118
|
+
**What a guest’s run may send.** A guest starts a wizard from its link, and nobody of your team
|
|
119
|
+
watches the run. So the rules above are not all that counts for it:
|
|
120
|
+
|
|
121
|
+
- It sends an email only to the address the guest gave in the wizard, or to an address in the
|
|
122
|
+
space’s own mail domains.
|
|
123
|
+
- It posts to Slack only from a fixed step, and only to the channel written into that step of the
|
|
124
|
+
published wizard. A channel taken from what the guest typed is refused.
|
|
125
|
+
- One run sends three emails and messages in all. A wizard’s guests send a set number per day:
|
|
126
|
+
50 unless you change it under Settings in the wizard’s
|
|
127
|
+
[share dialog](./test-and-share.md#share).
|
|
128
|
+
|
|
129
|
+
Your members’ runs are not bound by this. The [Audit](./protocol.md) shows each refusal with its
|
|
130
|
+
reason.
|
|
131
|
+
|
|
76
132
|
Members see the connections open to them, with their rules, and change nothing. Where each person
|
|
77
133
|
signs in, they sign in right there. [Connectors](./connectors.md#connections-in-the-space) has the
|
|
78
134
|
details, and how a wizard uses a connector of its own.
|
|
79
135
|
|
|
136
|
+
### Limits
|
|
137
|
+
|
|
138
|
+
An admin can limit how often a connection is called. “Limits” is on the connection’s page, below
|
|
139
|
+
its rules:
|
|
140
|
+
|
|
141
|
+
| Limit | Counts |
|
|
142
|
+
|---|---|
|
|
143
|
+
| Calls per run | Each run of a wizard for itself |
|
|
144
|
+
| Calls per day | All runs, chats and plugins together. The day starts at midnight UTC |
|
|
145
|
+
|
|
146
|
+
An empty field means no limit, and a new connection has none. A limit holds for everyone: admins,
|
|
147
|
+
members, guests, AI steps, fixed steps, Goose and what a plugin does by itself. A call counts once
|
|
148
|
+
it reaches the service, even when the service then fails. A call that a rule refused, or that
|
|
149
|
+
waits for approval, doesn’t count.
|
|
150
|
+
|
|
151
|
+
Once a limit is reached, the connection refuses further calls, in that run or until the next day.
|
|
152
|
+
The [Audit](./protocol.md) shows each refused call with its reason, and the admins hear of the
|
|
153
|
+
first one. A changed limit is a critical line there too. “Use” on the page counts today’s calls,
|
|
154
|
+
and “View in the audit” shows the connection’s lines.
|
|
155
|
+
|
|
156
|
+
A guest’s emails keep their own numbers, described above. The connection’s limits apply as well.
|
|
157
|
+
|
|
158
|
+
### Pause a connection
|
|
159
|
+
|
|
160
|
+
An admin can pause a connection without removing it. “Pause connection” is at the bottom of the
|
|
161
|
+
connection’s page, beside “Remove connection”. While it’s paused, nobody reaches it: no wizard, no
|
|
162
|
+
chat, no plugin. A step that was already running is refused at its next call. Nothing is lost. The
|
|
163
|
+
sign-ins, the rules and who may use it stay as they are.
|
|
164
|
+
|
|
165
|
+
The page says on top that the connection is paused, since when and who paused it. “Resume” there
|
|
166
|
+
gives it back as it was. The lists on the Overview, under Connectors and under Connections in your
|
|
167
|
+
own menu mark it *paused*. The [Audit](./protocol.md) shows the pause and the resume as critical
|
|
168
|
+
lines. Each call the connection refused meanwhile is a line too, with the reason “the connection
|
|
169
|
+
is paused”.
|
|
170
|
+
|
|
80
171
|
## Your own connections
|
|
81
172
|
|
|
82
173
|
Your own menu, behind your avatar in the top bar, has **Connections**. It lists, for each of your spaces, the
|
|
@@ -92,8 +183,78 @@ You set up no connection there. That stays with the space’s admins.
|
|
|
92
183
|
|
|
93
184
|
The Audit shows every call your space’s wizards, Work chats and Goose made to a connection, one line
|
|
94
185
|
each, whether it ran or not. Critical lines, such as a refused change, reach the admins under the
|
|
95
|
-
bell in Work. **Who may do what?** tries a rule before anything runs
|
|
96
|
-
|
|
186
|
+
bell in Work. **Who may do what?** tries a rule before anything runs, for the owner and the admins.
|
|
187
|
+
|
|
188
|
+
The owner and the admins see every line. A member sees only their own: what they called, what
|
|
189
|
+
Goose called for them and what the fixed steps of their runs called. [Audit](./protocol.md)
|
|
190
|
+
explains each line, the filters, what counts as critical and what a member sees.
|
|
191
|
+
|
|
192
|
+
**Stop a run.** An admin stops a run from the Audit. Click a line of a run that is still under
|
|
193
|
+
way, then “Stop run”. From then on the run calls nothing more: each later call is refused, on
|
|
194
|
+
every connection, and the line says the run is *stopped*. A call that was already under way still
|
|
195
|
+
finishes. A stopped run can’t be continued. Stopping a run is the one way to take back what it may
|
|
196
|
+
reach, and there is no other.
|
|
197
|
+
|
|
198
|
+
## Rights
|
|
199
|
+
|
|
200
|
+
**Rights** is the one place where the owner and the admins see and change who may read, change
|
|
201
|
+
and run what in the space. Nobody else sees it.
|
|
202
|
+
|
|
203
|
+
**What everyone may do.** The top of the page lists what each group may do with everything in the
|
|
204
|
+
space, as long as no exception says otherwise.
|
|
205
|
+
|
|
206
|
+
| Group | Who it is | Can you change it |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| Admins | The owner and the admins | No. What they may do is fixed |
|
|
209
|
+
| Members | The people working in the space, also in Work | Yes, each right has a switch |
|
|
210
|
+
| Guests | Someone at a shared link or a public page, without signing in | Yes, for the rights a guest can have |
|
|
211
|
+
| Clients | Your clients, signed in to their client space. Shown where client spaces are on | Yes |
|
|
212
|
+
|
|
213
|
+
Each row is one right. Rights names only what engenty wizards checks, and it words each right as
|
|
214
|
+
far as the check goes.
|
|
215
|
+
|
|
216
|
+
| Right | What it covers |
|
|
217
|
+
|---|---|
|
|
218
|
+
| “Read documents”, “Read pages and folders”, “Read tables” | Reading Knowledge, wherever it is read: the studio, a wizard’s step, a Work chat, Goose, the search, a shared link |
|
|
219
|
+
| “Have Goose change pages”, “Have Goose change the space’s setup” | Goose writes a page of Knowledge or the space’s info and brand for you only with this right. Someone who writes in the studio themselves doesn’t need it |
|
|
220
|
+
| “Let the AI find wizards”, “Let the AI start wizards” | The AI in Work and in connected apps such as Claude or Codex lists and starts a wizard for you only with this right. A member starts any wizard themselves in Work and in the studio, and a guest reaches a wizard by its link. For clients the rights read “See wizards” and “Start wizards”, and hold in their client space |
|
|
221
|
+
| “Use skills”, “Run the scripts of skills” | A wizard’s step, a Work chat and Goose read a skill for you, and a skill’s scripts run in your runs and chats |
|
|
222
|
+
|
|
223
|
+
A switch that is off means that nothing allows it for the whole group. An exception can still
|
|
224
|
+
allow it for one person or one thing. The AI in Work and Goose may do what the person they work
|
|
225
|
+
for may. An exception can allow them less.
|
|
226
|
+
|
|
227
|
+
**Exceptions.** Below the groups you see every other rule of the space as a sentence, for example
|
|
228
|
+
*Guests may not read the folder “Internal prices”.* A “may not” always holds, even where another
|
|
229
|
+
rule allows it. Under each sentence it says where the rule is set.
|
|
230
|
+
|
|
231
|
+
| It says | How you change it |
|
|
232
|
+
|---|---|
|
|
233
|
+
| “Set on this page.” | “Remove” takes the exception away |
|
|
234
|
+
| “Set in Knowledge, under ‘Who sees this folder’.” | “Change it there” opens that dialog for the page or folder |
|
|
235
|
+
| “Set in Files, on the folder itself.” | “Change it there” opens the mounted folder, where you set who sees it, which wizards use it and what the AI in Work may do |
|
|
236
|
+
| “Set with ‘Visible to clients’.” | “Change it there” opens the document or table in Knowledge, or the Clients part for a wizard |
|
|
237
|
+
|
|
238
|
+
**Add an exception.** “Add an exception” asks who, “may not” or “may”, what to do, and with what:
|
|
239
|
+
a document, a page or folder, a table, a wizard, a skill or the space’s setup. You choose a group,
|
|
240
|
+
one person, Goose for one person, the AI in Work, a wizard or a plugin. The form offers only what
|
|
241
|
+
engenty wizards checks, and it shows the sentence before you add it. What holds for a whole group
|
|
242
|
+
with everything of a kind is set at the top, not here.
|
|
243
|
+
|
|
244
|
+
**Connections have their own rules.** Who uses a connection and what it may do is set on the
|
|
245
|
+
connection’s page, not here. Rights shows how many connections the space has and how many of them
|
|
246
|
+
guests reach, and “Open Connectors” leads there.
|
|
247
|
+
|
|
248
|
+
**Who may do what?** On this page the question is about content. Choose a person, a guest, Goose
|
|
249
|
+
or the AI in Work for a person, a wizard in a guest’s or a person’s run, or a plugin, then what
|
|
250
|
+
they want to do with which document, page, table, wizard or skill. The answer says yes or no and
|
|
251
|
+
names the rule that decided, with where it is set. Nothing is read or run for it. For a
|
|
252
|
+
connection, ask in the Audit.
|
|
253
|
+
|
|
254
|
+
Rights does not cover everything. A member who may use the studio changes pages, tables and the
|
|
255
|
+
space’s setup there, and starts any wizard of the space in Work. A guest who has a wizard’s link
|
|
256
|
+
runs it. Mail, the hosts a wizard requests and commands in the sandbox follow a connection’s rules
|
|
257
|
+
and [what the run may reach](./protocol.md), not these rights.
|
|
97
258
|
|
|
98
259
|
## Discover
|
|
99
260
|
|
|
@@ -113,7 +274,8 @@ space. There is no switch for one person.
|
|
|
113
274
|
| Wizards | Build, test, publish and share | Build and test | Run them in Work |
|
|
114
275
|
| Skills, knowledge, data | Add and change | Add and change | – |
|
|
115
276
|
| Connections | Set up, choose how they sign in, set the rules and who may use them | Use the ones open to members. The rules are locked | Their Work chats use the ones open to them |
|
|
116
|
-
| Audit |
|
|
277
|
+
| Audit | Every line, **Who may do what?** and the notifications | Their own lines | No |
|
|
278
|
+
| Rights | See and change them | No | No |
|
|
117
279
|
| Own sign-ins | In their menu | In their menu | In their menu |
|
|
118
280
|
|
|
119
281
|
Approvals always go to the space’s admins, never to a member. On your computer you are the only
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Connectors
|
|
3
|
-
description: Services a wizard works in for the person who runs it – built in, from the registry or
|
|
4
|
-
version: 0.
|
|
3
|
+
description: Services a wizard works in for the person who runs it – built in, from the registry or by their address.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
**[Capabilities](./capabilities.md) › Connectors** lists the services the space’s wizards, Work
|
|
@@ -61,6 +61,8 @@ Any other service comes from the [integrations.sh](https://integrations.sh) regi
|
|
|
61
61
|
If a service needs an OAuth client of your own, it says so. Remove it and import it again with
|
|
62
62
|
“Your own OAuth client”.
|
|
63
63
|
|
|
64
|
+
A service the registry doesn’t list comes in [by its address](#by-its-address).
|
|
65
|
+
|
|
64
66
|
The **Discover** tab of Capabilities › Overview searches integrations.sh and skills.sh at once. Admins set up a
|
|
65
67
|
service from its result with “Set up”, and a service the space already has shows “In this space”.
|
|
66
68
|
|
|
@@ -68,6 +70,45 @@ The editor’s chat does the same while it builds a wizard: ask it to work with
|
|
|
68
70
|
finds and imports the connector. An [AI app](./ai-apps.md) connected to engenty wizards can do
|
|
69
71
|
this too.
|
|
70
72
|
|
|
73
|
+
## By its address
|
|
74
|
+
|
|
75
|
+
A service the registry doesn’t list comes in by its address: an MCP server, or an OpenAPI
|
|
76
|
+
description. This is how you add your own MCP server. Admins do it under “More connectors”, with
|
|
77
|
+
“By address”:
|
|
78
|
+
|
|
79
|
+
1. Paste the address and choose “Check”. engenty wizards reads what answers there: whether it is
|
|
80
|
+
an MCP server or an OpenAPI description, its host and its actions.
|
|
81
|
+
2. Give it a name and a short name. Its actions start with the short name.
|
|
82
|
+
3. Choose the sign-in. What the server describes itself comes first: a sign-in with OAuth, an API
|
|
83
|
+
key, or none. If the server asks for a sign-in and describes none, choose “Key in a header”
|
|
84
|
+
and name the header, or “None”.
|
|
85
|
+
4. Check what each action does: “reads”, “changes”, “sends” or “deletes”. engenty wizards reads
|
|
86
|
+
this from the server’s hints and from the action’s name. Change one that is wrong: the
|
|
87
|
+
connection’s rules go by it. For “sends”, name the field that holds the recipient. That’s how
|
|
88
|
+
engenty wizards checks who a guest’s run sends to.
|
|
89
|
+
5. “Import” adds the connector and opens “Add connection” with it.
|
|
90
|
+
|
|
91
|
+
With “Key in a header”, the API key itself belongs to the connection: whoever sets it up enters
|
|
92
|
+
it. If you enter it in the form, “Read actions” lists the server’s actions right away. The form
|
|
93
|
+
doesn’t keep the key.
|
|
94
|
+
|
|
95
|
+
You can change what an action does later. Open the connector under “More connectors” and set it
|
|
96
|
+
there. A changed kind shows in the [audit](./capabilities.md#audit) of every connection on that
|
|
97
|
+
connector, like a changed rule.
|
|
98
|
+
|
|
99
|
+
**Not checked.** A connector from an address is marked “not checked”, in the lists and on its
|
|
100
|
+
connections. Nobody has looked at the server: not engenty and not the registry. Its descriptions
|
|
101
|
+
and its answers reach the AI as they are. That’s why a new connection on it is for admins only at
|
|
102
|
+
first. Widen it on the connection’s page once you trust the server.
|
|
103
|
+
|
|
104
|
+
**Private addresses.** On your computer the address may be a private one: `localhost`, or a server
|
|
105
|
+
in your home or office network. The form says so when it sees one. Only a connector from an
|
|
106
|
+
address reaches such addresses. In the cloud a private address is refused.
|
|
107
|
+
|
|
108
|
+
**Reload actions.** Some servers list their actions only to a signed-in account. Set up the
|
|
109
|
+
connection, sign in, then choose “Reload actions” on the connector. It asks the server with that
|
|
110
|
+
sign-in, and what you set for each action stays. Only admins check an address and reload actions.
|
|
111
|
+
|
|
71
112
|
## What a wizard may do
|
|
72
113
|
|
|
73
114
|
A wizard names the actions it uses. Without a list, it uses only the actions that read. What a run
|
|
@@ -89,17 +130,21 @@ Gmail · Orders and Gmail · Support.
|
|
|
89
130
|
|
|
90
131
|
Only the space’s admins set up connections. “Add connection” starts one, and so does a built-in
|
|
91
132
|
connector below the list or an imported one under “More connectors”, where you also search the
|
|
92
|
-
registry. When you set one up, you choose how it signs in:
|
|
133
|
+
registry or add a server [by its address](#by-its-address). When you set one up, you choose how it signs in:
|
|
93
134
|
|
|
94
135
|
| Signs in | What it means |
|
|
95
136
|
|---|---|
|
|
96
137
|
| As the space | An admin signs the space in once, with an API key, an app token or a team account. Everyone uses that account, even when nobody is watching. On this kind of connection the AI only reads; writing happens in fixed steps or as an action someone confirms |
|
|
97
138
|
| Each person signs in | Each person signs in once with their own account, here or in their menu › Connections. The connection then acts as that person, and asks them before it changes something |
|
|
98
139
|
|
|
99
|
-
|
|
140
|
+
An admin can change how a connection signs in later, on its page. The sign-ins made until then go
|
|
141
|
+
with the change. In the cloud, your organization’s plan decides whether “Each person signs in” is
|
|
142
|
+
available. [Capabilities](./capabilities.md#connectors) has the details.
|
|
100
143
|
|
|
101
144
|
**Who may use it.** Admins, Members or Everyone. Everyone includes guests who start a wizard from
|
|
102
|
-
its link.
|
|
145
|
+
its link. Admins see above the list which connections guests reach, and narrow each to members
|
|
146
|
+
with one click ([Connections that guests reach](./capabilities.md#connections-that-guests-reach)).
|
|
147
|
+
A connection on a connector that is “not checked” starts with Admins.
|
|
103
148
|
|
|
104
149
|
**What it may do.** One rule for each kind of action:
|
|
105
150
|
|
|
@@ -111,8 +156,13 @@ its link.
|
|
|
111
156
|
| Send | Sending emails and messages to others |
|
|
112
157
|
|
|
113
158
|
Each rule is Allowed, With approval or Never. A new connection reads freely, asks for approval
|
|
114
|
-
before a change or a send, and never deletes. With approval asks the space’s admins
|
|
115
|
-
waits until one of them agrees.
|
|
159
|
+
before a change or a send, and never deletes. With approval asks the space’s admins. In a Work
|
|
160
|
+
chat the action waits until one of them agrees. A wizard’s run doesn’t wait: a fixed step with
|
|
161
|
+
such a rule fails there, and the editor warns you on that step
|
|
162
|
+
([Capabilities](./capabilities.md#connectors)).
|
|
163
|
+
|
|
164
|
+
**How often.** An admin can limit a connection’s calls per run and per day. Empty means no limit.
|
|
165
|
+
[Limits](./capabilities.md#limits) has the details.
|
|
116
166
|
|
|
117
167
|
Members see the connections open to them, with their rules, but change nothing. Where each person
|
|
118
168
|
signs in, they sign in right there.
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Audit
|
|
3
|
-
description: Every time a wizard, a chat or Goose used a connection of your space, allowed or not – what critical means, and how to try a rule before anything runs.
|
|
4
|
-
version: 0.
|
|
3
|
+
description: Every time a wizard, a chat or Goose used a connection of your space, allowed or not – what critical means, what a member sees, and how to try a rule before anything runs.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
**[Capabilities](./capabilities.md) › Audit** shows every call your space’s wizards, Work chats and
|
|
8
8
|
Goose made to a connection. Each call is one line, whether it ran or not.
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
The owner and the admins of the organization see every line. A member sees only their own lines,
|
|
11
|
+
in a space that lets members use the studio. [What a member sees](#what-a-member-sees) says which
|
|
12
|
+
lines those are.
|
|
10
13
|
|
|
11
14
|
## What a line says
|
|
12
15
|
|
|
@@ -19,7 +22,8 @@ A line reads like a sentence:
|
|
|
19
22
|
- **On which connection**, such as “HubSpot · Sales”.
|
|
20
23
|
- **Where**: in a run of a wizard, in a test run, in a Work chat or with Goose.
|
|
21
24
|
- **What came of it**: *done*, *refused* with the reason in words, or *waiting for the admins’
|
|
22
|
-
approval*.
|
|
25
|
+
approval*. A call through a connection with a [limit](./capabilities.md#limits) reads *still
|
|
26
|
+
running* until it ends.
|
|
23
27
|
|
|
24
28
|
A refused line has a red frame. A critical line has an orange one and the mark *critical*.
|
|
25
29
|
|
|
@@ -28,6 +32,11 @@ how big the input and the result were, and which rule decided. A line from a run
|
|
|
28
32
|
run’s grant: what the wizard allowed that run through this connection when the run started. The
|
|
29
33
|
buttons below lead to the run, the chat or the connection.
|
|
30
34
|
|
|
35
|
+
A line from a run also says how the run stands: running, waiting, done, failed or stopped. While
|
|
36
|
+
the run is under way, an admin sees “Stop run” there. A stopped run calls nothing more. What it
|
|
37
|
+
tries after that is refused with “the run was stopped”, and a call already under way still
|
|
38
|
+
finishes.
|
|
39
|
+
|
|
31
40
|
The audit never holds a password, a token, a key or a whole email. Of the input it keeps the names of
|
|
32
41
|
the fields, their sizes and one short value that is no secret.
|
|
33
42
|
|
|
@@ -36,7 +45,8 @@ the fields, their sizes and one short value that is no secret.
|
|
|
36
45
|
Above the lines you choose:
|
|
37
46
|
|
|
38
47
|
- **All**, **Refused**, **Critical** or **Waiting for approval**;
|
|
39
|
-
- who called: guests, members, admins, Goose, plugins or fixed steps
|
|
48
|
+
- who called: guests, members, admins, Goose, plugins or fixed steps. Only admins have this
|
|
49
|
+
filter, because a member’s lines are all their own;
|
|
40
50
|
- one connection;
|
|
41
51
|
- a time range, from the last hour to all time;
|
|
42
52
|
- a search. It finds a person’s name, a connection’s, a wizard’s, an action, a reason and the
|
|
@@ -44,6 +54,25 @@ Above the lines you choose:
|
|
|
44
54
|
|
|
45
55
|
The newest lines come first. “Load more” shows older ones.
|
|
46
56
|
|
|
57
|
+
## What a member sees
|
|
58
|
+
|
|
59
|
+
As a member you see your own calls and nobody else’s:
|
|
60
|
+
|
|
61
|
+
- what you called yourself, in a Work chat or in an AI step of a run you started;
|
|
62
|
+
- what Goose called for you;
|
|
63
|
+
- what the fixed steps of your runs called.
|
|
64
|
+
|
|
65
|
+
Each of your lines opens like any other, with the input’s fields, the rule that decided and your
|
|
66
|
+
run’s grant. The filters and the search only ever count your own lines. A search for a colleague’s
|
|
67
|
+
name finds nothing.
|
|
68
|
+
|
|
69
|
+
Three things stay with the admins:
|
|
70
|
+
|
|
71
|
+
- the filter by who, **Who may do what?** and the notifications;
|
|
72
|
+
- the name of a connection that is not open to you. A call of yours that such a connection
|
|
73
|
+
refused shows without the connection’s name;
|
|
74
|
+
- what you called while you were an admin yourself. Those lines stay admins’ lines.
|
|
75
|
+
|
|
47
76
|
## Critical
|
|
48
77
|
|
|
49
78
|
A line is critical when someone should hear of it:
|
|
@@ -51,10 +80,17 @@ A line is critical when someone should hear of it:
|
|
|
51
80
|
- a write, a delete or a send was refused;
|
|
52
81
|
- a guest’s run reached a connection that is only for members or admins;
|
|
53
82
|
- a run asked for a host the wizard doesn’t allow;
|
|
54
|
-
- a limit was reached
|
|
83
|
+
- a limit was reached: the emails a guest’s run may send, or a connection’s calls per run or per
|
|
84
|
+
day. A connection’s limit is critical once, at the first call it refuses in that run or on
|
|
85
|
+
that day;
|
|
55
86
|
- a sign-in ran out or the service refused it;
|
|
56
87
|
- a connection was used for the first time;
|
|
57
|
-
- someone changed a rule.
|
|
88
|
+
- someone changed a rule or a connection’s limits, or paused or resumed a connection.
|
|
89
|
+
|
|
90
|
+
What a paused connection refuses is not critical. The admins paused it themselves and heard of
|
|
91
|
+
that.
|
|
92
|
+
|
|
93
|
+
A member’s own lines show the mark too. Only the admins hear of them.
|
|
58
94
|
|
|
59
95
|
The admins hear of a critical line at once, under the bell in Work. Where no admin was in the app,
|
|
60
96
|
they get one email an hour with the critical lines since the last one. The bell icon beside the
|
|
@@ -65,6 +101,7 @@ or on for the space.
|
|
|
65
101
|
|
|
66
102
|
Rules are easier to understand when you can try them. **Who may do what?**, the button beside the
|
|
67
103
|
audit’s title, answers a question before anything runs, for example “May Julia send an email in this space?”.
|
|
104
|
+
Only the owner and the admins have it.
|
|
68
105
|
|
|
69
106
|
1. Choose **who**: a person of your organization, a guest, Goose, or a fixed step in a guest’s or
|
|
70
107
|
a member’s run.
|
|
@@ -62,7 +62,7 @@ The ⋯ menu on a card and in the editor has “Duplicate”, “Export as a wiz
|
|
|
62
62
|
| 3 · QR code | One of the links as a QR code to download or print |
|
|
63
63
|
| 4 · Website | The code for a website (see below) |
|
|
64
64
|
| 5 · Copy link | The link people open. It opens the first way that is on, and the wizard offers the other on its first page |
|
|
65
|
-
| 6 · Settings (the gear) | “Limit per day” (50 runs unless you change it, with what that costs at most), “Offer a translation” (a machine translation per language, which you can edit), and “Create a new link”: the old link and its QR code stop working, in the cloud too |
|
|
65
|
+
| 6 · Settings (the gear) | “Limit per day” (50 runs unless you change it, with what that costs at most; below it, how many emails and messages guests’ runs send per day, 50 unless you change it and 0 for none), “Offer a translation” (a machine translation per language, which you can edit), and “Create a new link”: the old link and its QR code stop working, in the cloud too |
|
|
66
66
|
|
|
67
67
|
The picture is from a computer without an account: the box at the top offers “Sign in” and
|
|
68
68
|
“Create account”, and “Access” says “Only on this computer” (see
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Working together
|
|
3
3
|
description: How the studio shows what others change while you work, merges it with what you type, shows who else is in a wizard, page or table, where an organization’s settings are, and who may use the studio.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.16.2
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
The studio shows changes made elsewhere as they happen. You don’t reload anything. That holds
|
|
@@ -69,9 +69,9 @@ Admins decide for each space whether its members may use the studio: in the spac
|
|
|
69
69
|
|
|
70
70
|
With it on, members build and test wizards in that space. They add and change skills, knowledge
|
|
71
71
|
and data, and use the connections open to them. Admins still publish wizards and share them
|
|
72
|
-
outside the space, set up connections and change their rules. Approvals go to the admins
|
|
73
|
-
|
|
74
|
-
there.
|
|
72
|
+
outside the space, set up connections and change their rules. Approvals go to the admins. In the
|
|
73
|
+
[Audit](./protocol.md) admins see every line, and a member sees their own. With it off, members
|
|
74
|
+
work in Work and run the space’s wizards there.
|
|
75
75
|
|
|
76
76
|
A new space starts with the studio closed to members. [Capabilities](./capabilities.md#who-sees-capabilities)
|
|
77
77
|
has a table of what each role sees.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { whereOf, whoOf } from "../broker/call.js";
|
|
2
|
-
import {
|
|
2
|
+
import { subjectsOf, subjectsOfAgent, subjectsOfGoose } from "../broker/rwx.js";
|
|
3
3
|
/** A step of a run: its holder and its wizard, in the run. */
|
|
4
4
|
export function stepCaller(ctx, sandbox = null) {
|
|
5
5
|
return {
|
|
@@ -19,7 +19,7 @@ export function personCaller(input) {
|
|
|
19
19
|
space: input.space,
|
|
20
20
|
who: whoOf(`u:${input.userId}`, input.role),
|
|
21
21
|
// An AI for the person: what the person may, and what the space lets agents do (Dateien).
|
|
22
|
-
subjects:
|
|
22
|
+
subjects: subjectsOfAgent(input.userId, input.role),
|
|
23
23
|
where: {
|
|
24
24
|
spaceId: input.space.id,
|
|
25
25
|
...(input.chatId ? { chatId: input.chatId } : {}),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createTool } from "@mastra/core/tools";
|
|
2
2
|
import { and, eq, inArray } from "drizzle-orm";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { assertRwx, decide } from "../broker/rwx.js";
|
|
4
|
+
import { assertRwx, decide, readableIds } from "../broker/rwx.js";
|
|
5
5
|
import { db, schema } from "../db/client.js";
|
|
6
6
|
import { openDraft, saveDraft } from "../mounts/drafts.js";
|
|
7
7
|
import { fileByPath, mountFileText, usableMounts } from "../mounts/mounts.js";
|
|
8
8
|
import { prompt } from "../prompts.js";
|
|
9
|
-
import { filePaths,
|
|
9
|
+
import { filePaths, knowledgeKinds, listForStep, readPage, readTable, resolvePath, } from "../services/knowledge.js";
|
|
10
10
|
import { documentText, hasIndexEntries, searchKnowledge } from "../services/space-index.js";
|
|
11
11
|
import { attempt, clip } from "../tools/shared.js";
|
|
12
12
|
import { elementCall } from "./gate.js";
|
|
@@ -71,18 +71,18 @@ export async function knowledgeTools(caller) {
|
|
|
71
71
|
const spaceId = caller.space.id;
|
|
72
72
|
const who = caller.subjects;
|
|
73
73
|
const spaces = await readsFrom(spaceId);
|
|
74
|
-
const
|
|
74
|
+
const holds = { pages: false, tables: false, files: false };
|
|
75
75
|
let entries = false;
|
|
76
76
|
for (const space of spaces) {
|
|
77
|
-
const of = await
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const of = await knowledgeKinds(space.id);
|
|
78
|
+
holds.pages ||= of.pages;
|
|
79
|
+
holds.tables ||= of.tables;
|
|
80
|
+
holds.files ||= of.files;
|
|
81
81
|
entries ||= await hasIndexEntries(space.id);
|
|
82
82
|
}
|
|
83
83
|
// The folders of Dateien the caller may use: searched, and read by their path.
|
|
84
84
|
const mounted = (await usableMounts(spaceId, who)).length > 0;
|
|
85
|
-
if (!(
|
|
85
|
+
if (!(holds.pages || holds.tables || holds.files || entries || mounted)) {
|
|
86
86
|
return {};
|
|
87
87
|
}
|
|
88
88
|
const call = (action, input, run) => attempt(() => elementCall(caller, { action, perm: "r", input }, run));
|
|
@@ -142,7 +142,7 @@ export async function knowledgeTools(caller) {
|
|
|
142
142
|
}),
|
|
143
143
|
}),
|
|
144
144
|
};
|
|
145
|
-
if (
|
|
145
|
+
if (holds.pages) {
|
|
146
146
|
tools.page_read = createTool({
|
|
147
147
|
id: "page_read",
|
|
148
148
|
description: prompt("tools", "tool.page_read.knowledge"),
|
|
@@ -150,7 +150,7 @@ export async function knowledgeTools(caller) {
|
|
|
150
150
|
execute: (input) => readKnowledgePage(caller, input),
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
if (
|
|
153
|
+
if (holds.tables) {
|
|
154
154
|
tools.table_read = createTool({
|
|
155
155
|
id: "table_read",
|
|
156
156
|
description: prompt("tools", "tool.table_read"),
|
|
@@ -162,7 +162,7 @@ export async function knowledgeTools(caller) {
|
|
|
162
162
|
}),
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
if (
|
|
165
|
+
if (holds.files || mounted) {
|
|
166
166
|
tools.space_document = createTool({
|
|
167
167
|
id: "space_document",
|
|
168
168
|
description: prompt("tools", "tool.space_document"),
|
|
@@ -182,7 +182,11 @@ export async function knowledgeTools(caller) {
|
|
|
182
182
|
}).catch(() => spaceId);
|
|
183
183
|
const found = await resolvePath(inSpace, wanted);
|
|
184
184
|
if (found?.kind !== "file") {
|
|
185
|
-
|
|
185
|
+
// The files the caller may read: one closed to them is not named.
|
|
186
|
+
const paths = await filePaths(spaceId);
|
|
187
|
+
const there = (await readableIds(spaceId, who, "document", [...paths.keys()]))
|
|
188
|
+
.slice(0, 40)
|
|
189
|
+
.map((id) => paths.get(id));
|
|
186
190
|
throw new Error(`No file "${path}". There are: ${there.join(", ")}`);
|
|
187
191
|
}
|
|
188
192
|
const file = await db.query.spaceFile.findFirst({
|