@engenty/wizards-runtime 0.17.0 → 0.17.2
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/app.js +2 -0
- package/apps/runtime/dist/broker/account.js +20 -1
- package/apps/runtime/dist/broker/call.js +116 -20
- package/apps/runtime/dist/broker/host.js +8 -2
- package/apps/runtime/dist/broker/index.js +3 -2
- package/apps/runtime/dist/broker/log.js +149 -14
- 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 +295 -51
- package/apps/runtime/dist/broker/send.js +25 -12
- package/apps/runtime/dist/bundles/discover.js +133 -0
- 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 +540 -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 +73 -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 +312 -32
- package/apps/runtime/dist/docs/dev/skills.md +8 -1
- package/apps/runtime/dist/docs/user-guide/capabilities.md +127 -5
- package/apps/runtime/dist/docs/user-guide/connectors.md +103 -5
- package/apps/runtime/dist/docs/user-guide/protocol.md +15 -4
- package/apps/runtime/dist/docs/user-guide/skills.md +11 -1
- package/apps/runtime/dist/docs/user-guide/test-and-share.md +1 -1
- package/apps/runtime/dist/elements/caller.js +2 -2
- 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/env.js +2 -0
- package/apps/runtime/dist/index.js +11 -2
- 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/prompts/mcp.md +1 -1
- package/apps/runtime/dist/prompts/tools.md +16 -0
- package/apps/runtime/dist/routes/broker.js +1 -1
- package/apps/runtime/dist/routes/bundles.js +91 -0
- package/apps/runtime/dist/routes/connections.js +14 -3
- package/apps/runtime/dist/routes/discover.js +1 -0
- package/apps/runtime/dist/routes/rules.js +53 -9
- package/apps/runtime/dist/routes/studio.js +23 -18
- package/apps/runtime/dist/services/cloud.js +2 -0
- package/apps/runtime/dist/services/discover.js +9 -3
- package/apps/runtime/dist/services/draft-events.js +79 -6
- package/apps/runtime/dist/services/files.js +2 -2
- package/apps/runtime/dist/services/skills.js +61 -5
- package/apps/runtime/dist/services/space-index.js +113 -11
- package/apps/runtime/dist/services/synced-spaces.js +5 -1
- package/apps/runtime/dist/services/wizards.js +48 -2
- package/apps/runtime/dist/sharing/jobs.js +6 -2
- package/apps/runtime/dist/sync/records.js +6 -1
- package/apps/runtime/dist/texts.js +36 -1
- 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 +8 -3
- package/apps/runtime/dist/tools/skills.js +11 -1
- package/apps/web/dist/assets/{AboutDialog-B2Xmxyj4.js → AboutDialog-NzB-GEj_.js} +1 -1
- package/apps/web/dist/assets/{BlockEditor-D0HoUSih.js → BlockEditor-HyDf8fOb.js} +1 -1
- package/apps/web/dist/assets/Bundle-B0Bhs0By.js +1 -0
- package/apps/web/dist/assets/CapabilitiesPage-CQSaMsWK.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-BIrJbAKi.js → ChangelogDialog-Ngxuqubx.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-DUVcXI5P.js → CodeEditor-C2LBf4pS.js} +1 -1
- package/apps/web/dist/assets/EditorPage-Dysvvadu.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-BIag8_Be.js → FlowPreview-CGfSaeYu.js} +1 -1
- package/apps/web/dist/assets/LangSwitch-B7UQlGh5.js +1 -0
- package/apps/web/dist/assets/Marketplace-BkIxd1PW.js +2 -0
- package/apps/web/dist/assets/{NewWizardChannels-DI3SQ4iS.js → NewWizardChannels-BWLaVFld.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-BpRd8tDF.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-ScEcQcR0.js +1 -0
- package/apps/web/dist/assets/PreviewPane-CaC1FYxZ.js +7 -0
- package/apps/web/dist/assets/ProtocolSection-CILRCYLD.js +1 -0
- package/apps/web/dist/assets/PublicRunner-DHX431Pr.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-CWf5x74a.js → ReadOnly-DqS1UDQs.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-Dp2-rHXu.js +2 -0
- package/apps/web/dist/assets/SetupPage-mzMLQcD5.js +1 -0
- package/apps/web/dist/assets/SharePage-CBDgqEH7.js +1 -0
- package/apps/web/dist/assets/SkillEditor-Cf6FqkkU.js +1 -0
- package/apps/web/dist/assets/{Skills-CN4QE7Kx.js → Skills-DqV5Oqqu.js} +5 -5
- package/apps/web/dist/assets/SpacePage-C3SXe2hs.js +2 -0
- package/apps/web/dist/assets/{UpdateCheck-QhBI3rlQ.js → UpdateCheck-B51jMIhp.js} +2 -2
- package/apps/web/dist/assets/brand-CG35IRgr.js +2 -0
- package/apps/web/dist/assets/changelog-DN6sziTl.js +1 -0
- package/apps/web/dist/assets/{code-editor-DkPo1C-L.js → code-editor-Bsyy7cuT.js} +2 -2
- package/apps/web/dist/assets/{host-D6H6Z9Jp.js → host-DaDyLfqT.js} +16 -16
- package/apps/web/dist/assets/i18n-CyrHWeGk.js +55 -0
- package/apps/web/dist/assets/index-Db9JthZr.css +1 -0
- package/apps/web/dist/assets/index-LjwVRoki.js +10 -0
- package/apps/web/dist/assets/minus-BpYkOkYw.js +1 -0
- package/apps/web/dist/assets/plug-De3mHDFV.js +1 -0
- package/apps/web/dist/assets/{read-aloud-CnFwDSGD.js → read-aloud-DCTouK7J.js} +1 -1
- package/apps/web/dist/assets/{runners-0sTPbWzr.js → runners-DtiBHvG7.js} +1 -1
- package/apps/web/dist/assets/session-DKGZUy6h.js +1 -0
- package/apps/web/dist/assets/{theme-CkNTe-_Z.js → theme-Bcj8TXQr.js} +2 -2
- package/apps/web/dist/assets/{ui-DAk_vjrL.js → ui-C6vSmisV.js} +1 -1
- package/apps/web/dist/assets/{useMutation-isHfB33W.js → useMutation-B8hJ5Z6N.js} +1 -1
- package/apps/web/dist/assets/{viewers-ijNZHJFG.js → viewers-b9FdC42r.js} +2 -2
- package/apps/web/dist/assets/{volume-2-BqlBtCIJ.js → volume-2-B1roRk6x.js} +1 -1
- package/apps/web/dist/index.html +15 -13
- package/apps/web/dist/mcp/flow.html +2 -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 +105 -4
- package/node_modules/@engenty/wizards-shared/dist/connectors.js +6 -0
- package/node_modules/@engenty/wizards-shared/dist/discover.d.ts +28 -1
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +8 -0
- package/node_modules/@engenty/wizards-shared/dist/run.js +16 -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/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-C1th2cZE.js +0 -2
- package/apps/web/dist/assets/EditorPage-56sIqEfF.js +0 -3
- package/apps/web/dist/assets/LangSwitch-CJ00IgaO.js +0 -1
- package/apps/web/dist/assets/Marketplace-D7-ot9Dz.js +0 -2
- package/apps/web/dist/assets/NewWizardPage-CytheHxX.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-_91Pa8Ad.js +0 -1
- package/apps/web/dist/assets/PreviewPane-BDsYm-_K.js +0 -7
- package/apps/web/dist/assets/ProtocolSection-D_zaxHEL.js +0 -1
- package/apps/web/dist/assets/PublicRunner-CEgXSk3r.js +0 -1
- package/apps/web/dist/assets/SettingsPage-Dr8SDk-L.js +0 -2
- package/apps/web/dist/assets/SetupPage-B68n0l4I.js +0 -1
- package/apps/web/dist/assets/SharePage-DfznN7ar.js +0 -1
- package/apps/web/dist/assets/SkillEditor-BIcIczRc.js +0 -1
- package/apps/web/dist/assets/SpacePage-DiVTwhnJ.js +0 -2
- package/apps/web/dist/assets/changelog-a_CuplMX.js +0 -1
- package/apps/web/dist/assets/i18n-BaPKbQ1s.js +0 -55
- package/apps/web/dist/assets/index-CCUG6Vnh.css +0 -1
- package/apps/web/dist/assets/index-De0Wb42y.js +0 -10
- package/apps/web/dist/assets/session-BMiUrqHg.js +0 -2
|
@@ -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.1
|
|
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 |
|
|
@@ -17,6 +17,7 @@ the list of sections stays beside the page.
|
|
|
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
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
|
|
@@ -46,7 +47,14 @@ each setting, the scripts a skill may bring, and the limits.
|
|
|
46
47
|
Under Connectors, “In this space” lists the space’s **connections**. A connection is one account
|
|
47
48
|
at a service that the space uses, such as Gmail · Orders or HubSpot · Sales. Below the list you
|
|
48
49
|
see the built-in connectors that nobody connected yet, and under “More connectors” the ones from
|
|
49
|
-
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.
|
|
50
58
|
|
|
51
59
|
A connection belongs to the space, not to the person who set it up. Its page says who set it up
|
|
52
60
|
and when (“set up by Matthias on 12 Oct”), and when it was last used. It stays when that person
|
|
@@ -102,6 +110,11 @@ With approval on a connection that signs in as the space asks the space’s admi
|
|
|
102
110
|
under the bell in Work until one of them agrees. Where each person signs in, With approval asks
|
|
103
111
|
that person.
|
|
104
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
|
+
|
|
105
118
|
**What a guest’s run may send.** A guest starts a wizard from its link, and nobody of your team
|
|
106
119
|
watches the run. So the rules above are not all that counts for it:
|
|
107
120
|
|
|
@@ -109,7 +122,9 @@ watches the run. So the rules above are not all that counts for it:
|
|
|
109
122
|
space’s own mail domains.
|
|
110
123
|
- It posts to Slack only from a fixed step, and only to the channel written into that step of the
|
|
111
124
|
published wizard. A channel taken from what the guest typed is refused.
|
|
112
|
-
- One run sends three emails and messages in all. A wizard’s guests send a set number per day
|
|
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).
|
|
113
128
|
|
|
114
129
|
Your members’ runs are not bound by this. The [Audit](./protocol.md) shows each refusal with its
|
|
115
130
|
reason.
|
|
@@ -118,6 +133,41 @@ Members see the connections open to them, with their rules, and change nothing.
|
|
|
118
133
|
signs in, they sign in right there. [Connectors](./connectors.md#connections-in-the-space) has the
|
|
119
134
|
details, and how a wizard uses a connector of its own.
|
|
120
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
|
+
|
|
121
171
|
## Your own connections
|
|
122
172
|
|
|
123
173
|
Your own menu, behind your avatar in the top bar, has **Connections**. It lists, for each of your spaces, the
|
|
@@ -139,8 +189,79 @@ The owner and the admins see every line. A member sees only their own: what they
|
|
|
139
189
|
Goose called for them and what the fixed steps of their runs called. [Audit](./protocol.md)
|
|
140
190
|
explains each line, the filters, what counts as critical and what a member sees.
|
|
141
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.
|
|
258
|
+
|
|
142
259
|
## Discover
|
|
143
260
|
|
|
261
|
+
A repository that holds a plugin with an MCP server and skills shows as one result, “Connector
|
|
262
|
+
with skills”, in place of its skills and its service’s connector. An admin sets it up with
|
|
263
|
+
[its address](./connectors.md#a-connector-that-brings-skills).
|
|
264
|
+
|
|
144
265
|
Discover searches skills.sh for skills and integrations.sh for connectors at once. You view a skill
|
|
145
266
|
whole and add it right in the results. A connector’s result has “Set up” for the admins, which
|
|
146
267
|
starts a connection with it. What the space already has shows “In this space”.
|
|
@@ -158,6 +279,7 @@ space. There is no switch for one person.
|
|
|
158
279
|
| Skills, knowledge, data | Add and change | Add and change | – |
|
|
159
280
|
| 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 |
|
|
160
281
|
| Audit | Every line, **Who may do what?** and the notifications | Their own lines | No |
|
|
282
|
+
| Rights | See and change them | No | No |
|
|
161
283
|
| Own sign-ins | In their menu | In their menu | In their menu |
|
|
162
284
|
|
|
163
285
|
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, by their address or brought by a plugin with its skills.
|
|
4
|
+
version: 0.17.1
|
|
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,96 @@ 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
|
+
|
|
112
|
+
## A connector that brings skills
|
|
113
|
+
|
|
114
|
+
A plugin for Claude Code or Cursor often holds two things that belong together: an MCP server for
|
|
115
|
+
a service, and [skills](./skills.md) that say how to work with it. engenty wizards takes both
|
|
116
|
+
into a space. There is no extra name for the result: it is a connector with its skills, and
|
|
117
|
+
“plugin” only says where it came from.
|
|
118
|
+
|
|
119
|
+
Admins add one under “More connectors”, with “By address”:
|
|
120
|
+
|
|
121
|
+
1. Paste the address of the plugin’s repository on GitHub, such as
|
|
122
|
+
`https://github.com/makenotion/claude-code-notion-plugin`, and choose “Check”. A plugin in a
|
|
123
|
+
folder of a repository has the folder in its address: `…/tree/main/customer-support`. “Upload a
|
|
124
|
+
zip” takes a plugin as a `.zip` or `.plugin` file.
|
|
125
|
+
2. A repository that holds several plugins lists them. Choose one.
|
|
126
|
+
3. Read what engenty wizards found: the plugin’s name and version, each MCP server over http, the
|
|
127
|
+
skills, and what it doesn’t take.
|
|
128
|
+
4. Each server becomes a connector. Correct its name, its sign-in and what each action does, as
|
|
129
|
+
for [an address](#by-its-address). With several servers, untick the ones you don’t want.
|
|
130
|
+
5. Untick the skills you don’t want. “Import” adds the rest and opens “Add connection” with the
|
|
131
|
+
first connector.
|
|
132
|
+
|
|
133
|
+
**What comes along, and what doesn’t.**
|
|
134
|
+
|
|
135
|
+
| In the plugin | In the space |
|
|
136
|
+
|---|---|
|
|
137
|
+
| MCP servers over http (streamable HTTP, SSE) | A connector each, marked “not checked”. A new connection on it is for admins only at first |
|
|
138
|
+
| Skills (`skills/<name>/SKILL.md`, and the folders the plugin’s manifest names) | Skills, “on demand”. Their scripts stay off until you switch them on |
|
|
139
|
+
| Commands, agents, hooks, Cursor rules | Not taken. The form names them |
|
|
140
|
+
| MCP servers started on the command line | Not taken. engenty wizards reaches a server by its address only |
|
|
141
|
+
| A server whose address needs a value from you | Not taken. Paste the finished address under “By address” |
|
|
142
|
+
|
|
143
|
+
A plugin with skills and no server over http brings its skills alone. One with a server and no
|
|
144
|
+
skills brings its connector alone.
|
|
145
|
+
|
|
146
|
+
**On the connector’s page.** A connection on such a connector says where it came from: the plugin,
|
|
147
|
+
its repository and version, and what it brought. Below the connection’s settings the page lists
|
|
148
|
+
the skills, each with when it applies. They are listed under Skills too, with the connector’s
|
|
149
|
+
name.
|
|
150
|
+
|
|
151
|
+
**Update.** When the repository has changed, the page offers “Update” and says what is new:
|
|
152
|
+
skills added, changed or gone, and new servers. The connection and its sign-in stay as they are.
|
|
153
|
+
A server the plugin no longer names stays in the space as a connector of its own. A plugin from
|
|
154
|
+
a file updates with “Upload a new file”.
|
|
155
|
+
|
|
156
|
+
**Remove.** “Remove connector, connection and skills” takes everything the plugin brought at
|
|
157
|
+
once. Before it does, it names the wizards that use the connection. They won’t run through after
|
|
158
|
+
that.
|
|
159
|
+
|
|
160
|
+
The **Discover** tab shows such a plugin as one result, “Connector with skills”, where a
|
|
161
|
+
repository on skills.sh holds an MCP server too. “Set up” opens this form with its address.
|
|
162
|
+
|
|
71
163
|
## What a wizard may do
|
|
72
164
|
|
|
73
165
|
A wizard names the actions it uses. Without a list, it uses only the actions that read. What a run
|
|
@@ -89,7 +181,7 @@ Gmail · Orders and Gmail · Support.
|
|
|
89
181
|
|
|
90
182
|
Only the space’s admins set up connections. “Add connection” starts one, and so does a built-in
|
|
91
183
|
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:
|
|
184
|
+
registry or add a server [by its address](#by-its-address). When you set one up, you choose how it signs in:
|
|
93
185
|
|
|
94
186
|
| Signs in | What it means |
|
|
95
187
|
|---|---|
|
|
@@ -103,6 +195,7 @@ available. [Capabilities](./capabilities.md#connectors) has the details.
|
|
|
103
195
|
**Who may use it.** Admins, Members or Everyone. Everyone includes guests who start a wizard from
|
|
104
196
|
its link. Admins see above the list which connections guests reach, and narrow each to members
|
|
105
197
|
with one click ([Connections that guests reach](./capabilities.md#connections-that-guests-reach)).
|
|
198
|
+
A connection on a connector that is “not checked” starts with Admins.
|
|
106
199
|
|
|
107
200
|
**What it may do.** One rule for each kind of action:
|
|
108
201
|
|
|
@@ -114,8 +207,13 @@ with one click ([Connections that guests reach](./capabilities.md#connections-th
|
|
|
114
207
|
| Send | Sending emails and messages to others |
|
|
115
208
|
|
|
116
209
|
Each rule is Allowed, With approval or Never. A new connection reads freely, asks for approval
|
|
117
|
-
before a change or a send, and never deletes. With approval asks the space’s admins
|
|
118
|
-
waits until one of them agrees.
|
|
210
|
+
before a change or a send, and never deletes. With approval asks the space’s admins. In a Work
|
|
211
|
+
chat the action waits until one of them agrees. A wizard’s run doesn’t wait: a fixed step with
|
|
212
|
+
such a rule fails there, and the editor warns you on that step
|
|
213
|
+
([Capabilities](./capabilities.md#connectors)).
|
|
214
|
+
|
|
215
|
+
**How often.** An admin can limit a connection’s calls per run and per day. Empty means no limit.
|
|
216
|
+
[Limits](./capabilities.md#limits) has the details.
|
|
119
217
|
|
|
120
218
|
Members see the connections open to them, with their rules, but change nothing. Where each person
|
|
121
219
|
signs in, they sign in right there.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Audit
|
|
3
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.
|
|
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
|
|
@@ -22,7 +22,8 @@ A line reads like a sentence:
|
|
|
22
22
|
- **On which connection**, such as “HubSpot · Sales”.
|
|
23
23
|
- **Where**: in a run of a wizard, in a test run, in a Work chat or with Goose.
|
|
24
24
|
- **What came of it**: *done*, *refused* with the reason in words, or *waiting for the admins’
|
|
25
|
-
approval*.
|
|
25
|
+
approval*. A call through a connection with a [limit](./capabilities.md#limits) reads *still
|
|
26
|
+
running* until it ends.
|
|
26
27
|
|
|
27
28
|
A refused line has a red frame. A critical line has an orange one and the mark *critical*.
|
|
28
29
|
|
|
@@ -31,6 +32,11 @@ how big the input and the result were, and which rule decided. A line from a run
|
|
|
31
32
|
run’s grant: what the wizard allowed that run through this connection when the run started. The
|
|
32
33
|
buttons below lead to the run, the chat or the connection.
|
|
33
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
|
+
|
|
34
40
|
The audit never holds a password, a token, a key or a whole email. Of the input it keeps the names of
|
|
35
41
|
the fields, their sizes and one short value that is no secret.
|
|
36
42
|
|
|
@@ -74,10 +80,15 @@ A line is critical when someone should hear of it:
|
|
|
74
80
|
- a write, a delete or a send was refused;
|
|
75
81
|
- a guest’s run reached a connection that is only for members or admins;
|
|
76
82
|
- a run asked for a host the wizard doesn’t allow;
|
|
77
|
-
- 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;
|
|
78
86
|
- a sign-in ran out or the service refused it;
|
|
79
87
|
- a connection was used for the first time;
|
|
80
|
-
- 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.
|
|
81
92
|
|
|
82
93
|
A member’s own lines show the mark too. Only the admins hear of them.
|
|
83
94
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Skills
|
|
3
3
|
description: Instructions your wizards work by – always, or when a wizard needs one. Add them from skills.sh, upload them or write your own.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.1
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
A skill is a set of instructions your wizards work by: how you write, what a quote must hold, how
|
|
@@ -50,6 +50,11 @@ comes as a zip upload.
|
|
|
50
50
|
The **Discover** tab of Capabilities › Overview searches skills.sh and integrations.sh at once: you view or add a
|
|
51
51
|
skill right in the results, marked “In this space” once the space has it.
|
|
52
52
|
|
|
53
|
+
**With a connector.** A plugin for Claude Code or Cursor can bring skills together with a
|
|
54
|
+
connector: see [A connector that brings skills](./connectors.md#a-connector-that-brings-skills).
|
|
55
|
+
Such a skill shows its connector’s name in the list. A wizard that loads it is told which
|
|
56
|
+
connector it came with.
|
|
57
|
+
|
|
53
58
|
## Run a skill’s scripts
|
|
54
59
|
|
|
55
60
|
Some skills bring scripts in Python or JavaScript, such as one that fills a PDF form. A script
|
|
@@ -73,6 +78,11 @@ A skill from skills.sh stays as it came. When skills.sh has a newer version, the
|
|
|
73
78
|
says so, and you see the changes before you take them (“View changes”). To change it yourself,
|
|
74
79
|
copy it as your own skill.
|
|
75
80
|
|
|
81
|
+
A skill that came with a connector stays as it came too. You set when it applies and whether its
|
|
82
|
+
scripts run. To change its text, choose “Copy as your own skill”: the copy is yours. You can’t
|
|
83
|
+
delete it by itself. Switch it off, or remove the connector with everything it brought. Its
|
|
84
|
+
page says where it came from, and admins take an update there when the plugin has changed.
|
|
85
|
+
|
|
76
86
|
“Download as .zip” gives you the skill’s folder, for another tool or another space.
|
|
77
87
|
|
|
78
88
|
## Limits
|
|
@@ -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,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,9 +1,10 @@
|
|
|
1
1
|
import { decryptToken, defineConnector, } from "../shims/connections-sdk.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { headersFromRequired } from "./import-service.js";
|
|
4
|
-
import {
|
|
4
|
+
import { groupIn, recipientFieldIn } from "./importer/classify.js";
|
|
5
5
|
import { executeHttpAction } from "./invoke/http-invoker.js";
|
|
6
6
|
import { mcpCallTool } from "./invoke/mcp-client.js";
|
|
7
|
+
import { createGuardedFetch } from "./net/guarded-fetch.js";
|
|
7
8
|
import { connectionsRedirectUri, registerDynamicClient } from "./oauth-dcr.js";
|
|
8
9
|
/**
|
|
9
10
|
* Materialize a stored import record into a live `ConnectorDefinition`. From
|
|
@@ -43,12 +44,13 @@ function inputSchemaToZod(action) {
|
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
function buildAction(record, action, live) {
|
|
47
|
+
function buildAction(record, action, live, allowPrivate) {
|
|
47
48
|
const inputSchema = inputSchemaToZod(action);
|
|
48
49
|
if (!inputSchema) {
|
|
49
50
|
return null;
|
|
50
51
|
}
|
|
51
|
-
const group =
|
|
52
|
+
const group = groupIn(record, action);
|
|
53
|
+
const recipientField = recipientFieldIn(record, action);
|
|
52
54
|
return {
|
|
53
55
|
description: action.description.slice(0, 1024),
|
|
54
56
|
group,
|
|
@@ -61,6 +63,9 @@ function buildAction(record, action, live) {
|
|
|
61
63
|
return mcpCallTool({
|
|
62
64
|
args,
|
|
63
65
|
endpoint: current.source_url,
|
|
66
|
+
...(allowPrivate
|
|
67
|
+
? { fetchImpl: createGuardedFetch({ allowPrivate: true }) }
|
|
68
|
+
: {}),
|
|
64
69
|
headers: mcpHeaders(current, ctx.accessToken),
|
|
65
70
|
toolName: action.invoke.tool_name,
|
|
66
71
|
transport: current.mcp_transport,
|
|
@@ -68,7 +73,10 @@ function buildAction(record, action, live) {
|
|
|
68
73
|
}
|
|
69
74
|
return executeHttpAction({
|
|
70
75
|
accessToken: ctx.accessToken,
|
|
71
|
-
|
|
76
|
+
// The context's fetch refuses private hosts itself; where they may be
|
|
77
|
+
// reached the guard is the invoker's own, with `allowPrivate`.
|
|
78
|
+
...(allowPrivate ? { allowPrivate: true } : {}),
|
|
79
|
+
fetchImpl: allowPrivate ? fetch : ctx.fetchImpl,
|
|
72
80
|
input: args,
|
|
73
81
|
invoke: action.invoke,
|
|
74
82
|
record: current,
|
|
@@ -76,10 +84,14 @@ function buildAction(record, action, live) {
|
|
|
76
84
|
},
|
|
77
85
|
id: action.id,
|
|
78
86
|
inputSchema,
|
|
87
|
+
...(recipientField ? { recipientField } : {}),
|
|
79
88
|
summary: action.summary.slice(0, 256),
|
|
80
89
|
};
|
|
81
90
|
}
|
|
82
|
-
function buildAuth(record, live, persistOAuthClient) {
|
|
91
|
+
function buildAuth(record, live, allowPrivate, persistOAuthClient) {
|
|
92
|
+
// The endpoints came from a registry or a pasted address: the token calls
|
|
93
|
+
// and the client registration go through the guard like every other call.
|
|
94
|
+
const guarded = createGuardedFetch(allowPrivate ? { allowPrivate: true } : {});
|
|
83
95
|
const stored = record.auth_config;
|
|
84
96
|
if (stored.kind === "oauth2") {
|
|
85
97
|
const dcr = stored.dcr === true && Boolean(stored.registration_endpoint?.trim());
|
|
@@ -89,6 +101,7 @@ function buildAuth(record, live, persistOAuthClient) {
|
|
|
89
101
|
authUrl: stored.auth_url,
|
|
90
102
|
baseScopes: stored.scopes,
|
|
91
103
|
dynamicClientRegistration: dcr,
|
|
104
|
+
fetchImpl: guarded,
|
|
92
105
|
registerClient: dcr && persistOAuthClient
|
|
93
106
|
? async () => {
|
|
94
107
|
const current = live();
|
|
@@ -104,6 +117,7 @@ function buildAuth(record, live, persistOAuthClient) {
|
|
|
104
117
|
}
|
|
105
118
|
const registered = await registerDynamicClient({
|
|
106
119
|
clientName: current.name,
|
|
120
|
+
fetchImpl: guarded,
|
|
107
121
|
redirectUri: connectionsRedirectUri(),
|
|
108
122
|
registrationEndpoint: endpoint,
|
|
109
123
|
scopes: current.auth_config.kind === "oauth2"
|
|
@@ -162,12 +176,13 @@ function buildAuth(record, live, persistOAuthClient) {
|
|
|
162
176
|
kind: "api_key",
|
|
163
177
|
};
|
|
164
178
|
}
|
|
165
|
-
export function buildImportedConnector(record, resolveLive, persistOAuthClient) {
|
|
179
|
+
export function buildImportedConnector(record, resolveLive, persistOAuthClient, options) {
|
|
166
180
|
const live = () => resolveLive?.() ?? record;
|
|
181
|
+
const allowPrivate = options?.allowPrivate === true;
|
|
167
182
|
const actions = [];
|
|
168
183
|
const skippedActions = [];
|
|
169
184
|
for (const normalized of record.actions) {
|
|
170
|
-
const action = buildAction(record, normalized, live);
|
|
185
|
+
const action = buildAction(record, normalized, live, allowPrivate);
|
|
171
186
|
if (action) {
|
|
172
187
|
actions.push(action);
|
|
173
188
|
}
|
|
@@ -177,7 +192,7 @@ export function buildImportedConnector(record, resolveLive, persistOAuthClient)
|
|
|
177
192
|
}
|
|
178
193
|
const connector = defineConnector({
|
|
179
194
|
actions,
|
|
180
|
-
auth: buildAuth(record, live, persistOAuthClient),
|
|
195
|
+
auth: buildAuth(record, live, allowPrivate, persistOAuthClient),
|
|
181
196
|
description: `${record.name} — imported from ${record.domain} (${record.source_kind})`,
|
|
182
197
|
icon: "plug",
|
|
183
198
|
id: record.id,
|
|
@@ -190,16 +190,22 @@ export function assembleRecord(params) {
|
|
|
190
190
|
assertNoRegistryVariables(surface);
|
|
191
191
|
}
|
|
192
192
|
const requiredHeaders = surface ? resolveRequiredHeaders(surface) : [];
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
193
|
+
let auth;
|
|
194
|
+
if (params.auth) {
|
|
195
|
+
auth = params.auth;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const mapped = mapAuth({
|
|
199
|
+
discover: params.discover ?? null,
|
|
200
|
+
securitySchemes: normalized.security_schemes,
|
|
201
|
+
sourceKind: params.sourceKind,
|
|
202
|
+
surface,
|
|
203
|
+
});
|
|
204
|
+
if (!mapped.ok) {
|
|
205
|
+
throw new ImportValidationError(mapped.reason);
|
|
206
|
+
}
|
|
207
|
+
auth = mapped.auth;
|
|
201
208
|
}
|
|
202
|
-
const auth = mapped.auth;
|
|
203
209
|
if (auth.kind === "oauth2" && !params.oauthClient) {
|
|
204
210
|
if (auth.dcr && auth.registration_endpoint) {
|
|
205
211
|
warnings.push("oauth2 client will be registered on first authenticate (dynamic client registration)");
|
|
@@ -237,7 +243,10 @@ export function assembleRecord(params) {
|
|
|
237
243
|
if (params.sourceKind === "openapi" && !baseUrl) {
|
|
238
244
|
throw new ImportValidationError("spec declares no server URL — provide base_url explicitly");
|
|
239
245
|
}
|
|
246
|
+
const known = new Set(actions.map((action) => action.id));
|
|
247
|
+
const actionKinds = Object.fromEntries(Object.entries(params.actionKinds ?? {}).filter(([id]) => known.has(id)));
|
|
240
248
|
const record = {
|
|
249
|
+
...(Object.keys(actionKinds).length ? { action_kinds: actionKinds } : {}),
|
|
241
250
|
actions,
|
|
242
251
|
auth_config: auth,
|
|
243
252
|
base_url: baseUrl,
|
|
@@ -104,3 +104,15 @@ export function groupOf(action) {
|
|
|
104
104
|
}
|
|
105
105
|
return words.some((w) => SEND_WORDS.has(w)) ? "send" : action.classification;
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* The group an action of a stored connector runs under: what an admin said it
|
|
109
|
+
* does (`action_kinds`) first, the guess by name (`groupOf`) else.
|
|
110
|
+
*/
|
|
111
|
+
export function groupIn(record, action) {
|
|
112
|
+
return record.action_kinds?.[action.id]?.kind ?? groupOf(action);
|
|
113
|
+
}
|
|
114
|
+
/** The input field an admin named as a send's recipient, where one did. */
|
|
115
|
+
export function recipientFieldIn(record, action) {
|
|
116
|
+
const set = record.action_kinds?.[action.id];
|
|
117
|
+
return groupIn(record, action) === "send" ? set?.recipient_field : undefined;
|
|
118
|
+
}
|
|
@@ -102,6 +102,7 @@ export function buildHttpRequest(params) {
|
|
|
102
102
|
export async function executeHttpAction(params) {
|
|
103
103
|
const { accessToken, input, invoke, record } = params;
|
|
104
104
|
const fetchImpl = createGuardedFetch({
|
|
105
|
+
...(params.allowPrivate ? { allowPrivate: true } : {}),
|
|
105
106
|
fetchImpl: params.fetchImpl,
|
|
106
107
|
...(params.lookupImpl ? { lookupImpl: params.lookupImpl } : {}),
|
|
107
108
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { assertPublicHttpHost } from "../../shims/web-ingest.js";
|
|
1
|
+
import { assertLocalOrPublicHttpHost, assertPublicHttpHost, } from "../../shims/web-ingest.js";
|
|
2
2
|
/**
|
|
3
3
|
* Every network call this module makes reaches a URL that came from the
|
|
4
4
|
* registry, an admin-pasted field, or a stored import record — attacker
|
|
@@ -19,11 +19,14 @@ const DOWNGRADE_TO_GET = new Set([301, 302, 303]);
|
|
|
19
19
|
export function createGuardedFetch(options) {
|
|
20
20
|
const fetchImpl = options?.fetchImpl ?? fetch;
|
|
21
21
|
const maxRedirects = options?.maxRedirects ?? DEFAULT_MAX_REDIRECTS;
|
|
22
|
+
const assertHost = options?.allowPrivate
|
|
23
|
+
? assertLocalOrPublicHttpHost
|
|
24
|
+
: assertPublicHttpHost;
|
|
22
25
|
return (async (input, init) => {
|
|
23
26
|
let currentUrl = typeof input === "string" ? input : String(input);
|
|
24
27
|
let currentInit = { ...init, redirect: "manual" };
|
|
25
28
|
let hops = 0;
|
|
26
|
-
await
|
|
29
|
+
await assertHost(currentUrl, options?.lookupImpl);
|
|
27
30
|
while (true) {
|
|
28
31
|
const response = await fetchImpl(currentUrl, currentInit);
|
|
29
32
|
if (!REDIRECT_STATUSES.has(response.status)) {
|
|
@@ -44,7 +47,7 @@ export function createGuardedFetch(options) {
|
|
|
44
47
|
catch {
|
|
45
48
|
throw new Error(`Malformed Location header in redirect: ${location}`);
|
|
46
49
|
}
|
|
47
|
-
await
|
|
50
|
+
await assertHost(nextUrl, options?.lookupImpl);
|
|
48
51
|
if (DOWNGRADE_TO_GET.has(response.status)) {
|
|
49
52
|
currentInit = { ...currentInit, body: undefined, method: "GET" };
|
|
50
53
|
}
|