@engenty/wizards-runtime 0.17.0 → 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/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/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 +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 +251 -31
- package/apps/runtime/dist/docs/user-guide/capabilities.md +123 -5
- package/apps/runtime/dist/docs/user-guide/connectors.md +52 -5
- package/apps/runtime/dist/docs/user-guide/protocol.md +15 -4
- 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/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/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 +102 -10
- 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-mZCBU7KF.js} +1 -1
- package/apps/web/dist/assets/{BlockEditor-D0HoUSih.js → BlockEditor-Dk0QwLSU.js} +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-GkpgF-wZ.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-BIrJbAKi.js → ChangelogDialog-BhyilZWA.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-DUVcXI5P.js → CodeEditor-DULYZbuE.js} +1 -1
- package/apps/web/dist/assets/EditorPage-D_mCdYdZ.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-BIag8_Be.js → FlowPreview-ykxZxWnk.js} +1 -1
- package/apps/web/dist/assets/{LangSwitch-CJ00IgaO.js → LangSwitch-iO54w9AP.js} +1 -1
- package/apps/web/dist/assets/{Marketplace-D7-ot9Dz.js → Marketplace-C97fH7UC.js} +2 -2
- package/apps/web/dist/assets/{NewWizardChannels-DI3SQ4iS.js → NewWizardChannels-CsSV7sm2.js} +1 -1
- package/apps/web/dist/assets/{NewWizardPage-CytheHxX.js → NewWizardPage-Ebgw-Vf_.js} +1 -1
- package/apps/web/dist/assets/{OnboardingPage-_91Pa8Ad.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-CEgXSk3r.js → PublicRunner-4Lf4SnwB.js} +1 -1
- package/apps/web/dist/assets/{ReadOnly-CWf5x74a.js → ReadOnly-CXQ41R9Q.js} +1 -1
- package/apps/web/dist/assets/{SettingsPage-Dr8SDk-L.js → SettingsPage-C-8BgK9O.js} +2 -2
- package/apps/web/dist/assets/{SetupPage-B68n0l4I.js → SetupPage-4_K083Wl.js} +1 -1
- package/apps/web/dist/assets/{SharePage-DfznN7ar.js → SharePage-CQjgMcDI.js} +1 -1
- package/apps/web/dist/assets/{SkillEditor-BIcIczRc.js → SkillEditor-DT5hQwbg.js} +1 -1
- package/apps/web/dist/assets/{Skills-CN4QE7Kx.js → Skills-D7V_9_xo.js} +1 -1
- package/apps/web/dist/assets/SpacePage-D3rYS1bA.js +2 -0
- package/apps/web/dist/assets/{UpdateCheck-QhBI3rlQ.js → UpdateCheck-DVgAJmy8.js} +2 -2
- package/apps/web/dist/assets/changelog-DzQCUSsx.js +1 -0
- package/apps/web/dist/assets/{code-editor-DkPo1C-L.js → code-editor-5T7ilBjd.js} +2 -2
- package/apps/web/dist/assets/{host-D6H6Z9Jp.js → host-CCijW1hj.js} +6 -6
- package/apps/web/dist/assets/i18n-DCPDesT-.js +55 -0
- package/apps/web/dist/assets/{index-De0Wb42y.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-CnFwDSGD.js → read-aloud-Qb719not.js} +1 -1
- package/apps/web/dist/assets/{runners-0sTPbWzr.js → runners-BeZ84YH_.js} +1 -1
- package/apps/web/dist/assets/{session-BMiUrqHg.js → session-CEJRkSP5.js} +1 -1
- package/apps/web/dist/assets/{theme-CkNTe-_Z.js → theme-y_owNosi.js} +1 -1
- package/apps/web/dist/assets/{ui-DAk_vjrL.js → ui-BacfkQ7Q.js} +1 -1
- package/apps/web/dist/assets/{useMutation-isHfB33W.js → useMutation-CgzFr4qH.js} +1 -1
- package/apps/web/dist/assets/{viewers-ijNZHJFG.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-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/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/PreviewPane-BDsYm-_K.js +0 -7
- package/apps/web/dist/assets/ProtocolSection-D_zaxHEL.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
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import type { ActionKindChoice, ConnectorView, SignInChoice, SourcePreview } from "./connectors.js";
|
|
2
|
+
import type { SkillMode } from "./skills.js";
|
|
3
|
+
/**
|
|
4
|
+
* A Connector that brings skills (docs/plans/capabilities-next.md, piece 4): a plugin for Claude
|
|
5
|
+
* Code or Cursor, taken into a space from a public repository on GitHub or an uploaded zip. Its
|
|
6
|
+
* MCP servers over http become Connectors, its skills become Skills that name them. A `bundle`
|
|
7
|
+
* is the record of what came together; the studio has no word for it and shows a Connector with
|
|
8
|
+
* its Skills.
|
|
9
|
+
*/
|
|
10
|
+
/** Whose manifest was read: Claude Code's, Cursor's, or the open one Cursor reads at the root. */
|
|
11
|
+
export declare const BUNDLE_FORMATS: readonly ["claude", "cursor", "agent"];
|
|
12
|
+
export type BundleFormat = (typeof BUNDLE_FORMATS)[number];
|
|
13
|
+
/** Where it came from: a repository on GitHub (`owner/name`, a branch or tag, a folder), or a file. */
|
|
14
|
+
export type BundleOrigin = {
|
|
15
|
+
kind: "github";
|
|
16
|
+
repo: string;
|
|
17
|
+
ref: string | null;
|
|
18
|
+
path: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "upload";
|
|
21
|
+
file: string;
|
|
22
|
+
path: string;
|
|
23
|
+
};
|
|
24
|
+
/** What a plugin holds that a space does not take. */
|
|
25
|
+
export declare const BUNDLE_LEFT_OUT_KINDS: readonly ["command", "agent", "hook", "rule", "server", "skill", "other"];
|
|
26
|
+
export type BundleLeftOutKind = (typeof BUNDLE_LEFT_OUT_KINDS)[number];
|
|
27
|
+
/**
|
|
28
|
+
* Why a server or a skill was left out. A server: started on the command line (`stdio`), over a
|
|
29
|
+
* socket, without an address, an address with a value nobody gave (`variable`), a bundled file,
|
|
30
|
+
* no http address, refused when it was read (`refused`, with the words in `detail`), or more
|
|
31
|
+
* than a plugin may bring (`count`). A skill: its `SKILL.md` or its size (`invalid`), or `count`.
|
|
32
|
+
*/
|
|
33
|
+
export type BundleLeftOutReason = "stdio" | "socket" | "noAddress" | "variable" | "file" | "address" | "refused" | "invalid" | "count";
|
|
34
|
+
export interface BundleLeftOut {
|
|
35
|
+
kind: BundleLeftOutKind;
|
|
36
|
+
/** A command's, an agent's or a server's name, a hook's event, a skill's folder. */
|
|
37
|
+
name: string;
|
|
38
|
+
reason?: BundleLeftOutReason;
|
|
39
|
+
/** A refusal in the reader's words; only in a preview, never kept. */
|
|
40
|
+
detail?: string;
|
|
41
|
+
}
|
|
42
|
+
/** An MCP server over http a plugin names, read as „Per Adresse“ reads an address. */
|
|
43
|
+
export interface BundleServerPreview {
|
|
44
|
+
/** Its name in the plugin. */
|
|
45
|
+
key: string;
|
|
46
|
+
url: string;
|
|
47
|
+
transport: "http" | "sse";
|
|
48
|
+
/** Headers the plugin sets on every request, by name. */
|
|
49
|
+
headers: string[];
|
|
50
|
+
/** A key in a header the plugin asks for, where the server describes no sign-in itself. */
|
|
51
|
+
keyHeader: {
|
|
52
|
+
name: string;
|
|
53
|
+
scheme?: string;
|
|
54
|
+
} | null;
|
|
55
|
+
/** What answered at the address: its actions with what each was read as, how it signs in. */
|
|
56
|
+
source: SourcePreview;
|
|
57
|
+
}
|
|
58
|
+
/** A skill a plugin brings, before it is taken. */
|
|
59
|
+
export interface BundleSkillPreview {
|
|
60
|
+
/** Its folder in the plugin: `skills/call-prep`. */
|
|
61
|
+
path: string;
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
/** Characters of its instructions. */
|
|
65
|
+
chars: number;
|
|
66
|
+
/** Its files beside the `SKILL.md`. */
|
|
67
|
+
files: number;
|
|
68
|
+
/** It brings scripts: they stay off until someone switches them on for the skill. */
|
|
69
|
+
scripts: boolean;
|
|
70
|
+
/** Files left out: not text and too large, or too many. */
|
|
71
|
+
skipped: number;
|
|
72
|
+
}
|
|
73
|
+
/** A plugin read whole, before anything is taken. */
|
|
74
|
+
export interface BundlePreview {
|
|
75
|
+
name: string;
|
|
76
|
+
version: string | null;
|
|
77
|
+
description: string | null;
|
|
78
|
+
format: BundleFormat;
|
|
79
|
+
origin: BundleOrigin;
|
|
80
|
+
/** Of what would be taken: the import takes it only as it was shown. */
|
|
81
|
+
hash: string;
|
|
82
|
+
servers: BundleServerPreview[];
|
|
83
|
+
skills: BundleSkillPreview[];
|
|
84
|
+
leftOut: BundleLeftOut[];
|
|
85
|
+
/** How many more skills the space holds. */
|
|
86
|
+
skillsFree: number;
|
|
87
|
+
/** The space has it from this origin already: its record's id. */
|
|
88
|
+
added: string | null;
|
|
89
|
+
}
|
|
90
|
+
/** One plugin of a repository that holds several. */
|
|
91
|
+
export interface BundleChoice {
|
|
92
|
+
name: string;
|
|
93
|
+
description: string | null;
|
|
94
|
+
/** Its folder in this repository; null where it lives in another one. */
|
|
95
|
+
path: string | null;
|
|
96
|
+
/** Its own address on GitHub, where it lives in another repository. */
|
|
97
|
+
address: string | null;
|
|
98
|
+
}
|
|
99
|
+
/** What reading an address or a zip found: one plugin, or the plugins to choose from. */
|
|
100
|
+
export interface BundlePreviewAnswer {
|
|
101
|
+
preview: BundlePreview | null;
|
|
102
|
+
plugins: BundleChoice[];
|
|
103
|
+
}
|
|
104
|
+
/** What an admin says about one server of the plugin; left out: taken as it was read. */
|
|
105
|
+
export interface BundleServerChoice {
|
|
106
|
+
/** `false`: this server stays out. */
|
|
107
|
+
take?: boolean;
|
|
108
|
+
id?: string;
|
|
109
|
+
toolPrefix?: string;
|
|
110
|
+
name?: string;
|
|
111
|
+
signIn?: SignInChoice;
|
|
112
|
+
actionKinds?: Record<string, ActionKindChoice>;
|
|
113
|
+
oauthClientId?: string;
|
|
114
|
+
oauthClientSecret?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface BundleImportRequest {
|
|
117
|
+
/** The preview's hash: a plugin that changed since is shown again first. */
|
|
118
|
+
hash?: string;
|
|
119
|
+
/** By the server's name in the plugin. */
|
|
120
|
+
servers?: Record<string, BundleServerChoice>;
|
|
121
|
+
/** The skills to take, by their folder; left out: all of them. */
|
|
122
|
+
skills?: string[];
|
|
123
|
+
}
|
|
124
|
+
/** A skill of the space that came with a bundle. */
|
|
125
|
+
export interface BundleSkill {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
description: string;
|
|
129
|
+
mode: SkillMode;
|
|
130
|
+
}
|
|
131
|
+
/** What came together, as the Connector's page shows it. */
|
|
132
|
+
export interface BundleView {
|
|
133
|
+
id: string;
|
|
134
|
+
spaceId: string;
|
|
135
|
+
name: string;
|
|
136
|
+
version: string | null;
|
|
137
|
+
description: string | null;
|
|
138
|
+
format: BundleFormat;
|
|
139
|
+
origin: BundleOrigin;
|
|
140
|
+
hash: string;
|
|
141
|
+
/** What the plugin holds and the space did not take; no words, the studio has them. */
|
|
142
|
+
leftOut: BundleLeftOut[];
|
|
143
|
+
connectors: {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
}[];
|
|
147
|
+
connections: {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
connectorId: string;
|
|
151
|
+
}[];
|
|
152
|
+
skills: BundleSkill[];
|
|
153
|
+
addedAt: string;
|
|
154
|
+
updatedAt: string;
|
|
155
|
+
}
|
|
156
|
+
/** What an import made. */
|
|
157
|
+
export interface BundleImported {
|
|
158
|
+
bundle: BundleView;
|
|
159
|
+
connectors: ConnectorView[];
|
|
160
|
+
warnings: string[];
|
|
161
|
+
}
|
|
162
|
+
/** What the origin has now that the space has not: null where nothing changed. */
|
|
163
|
+
export interface BundleUpdate {
|
|
164
|
+
version: string | null;
|
|
165
|
+
hash: string;
|
|
166
|
+
/** Skills by name: new at the origin, changed there, gone from it. */
|
|
167
|
+
skills: {
|
|
168
|
+
added: string[];
|
|
169
|
+
changed: string[];
|
|
170
|
+
removed: string[];
|
|
171
|
+
};
|
|
172
|
+
/** Servers: new at the origin, and the space's connectors the origin no longer names. */
|
|
173
|
+
servers: {
|
|
174
|
+
added: {
|
|
175
|
+
key: string;
|
|
176
|
+
url: string;
|
|
177
|
+
}[];
|
|
178
|
+
removed: {
|
|
179
|
+
connectorId: string;
|
|
180
|
+
name: string;
|
|
181
|
+
}[];
|
|
182
|
+
};
|
|
183
|
+
leftOut: BundleLeftOut[];
|
|
184
|
+
}
|
|
185
|
+
export interface BundleUpdateAnswer {
|
|
186
|
+
update: BundleUpdate | null;
|
|
187
|
+
/** It came from a file: the origin cannot be asked, a new file is uploaded. */
|
|
188
|
+
upload: boolean;
|
|
189
|
+
}
|
|
190
|
+
/** What taking an update did. */
|
|
191
|
+
export interface BundleUpdated {
|
|
192
|
+
bundle: BundleView;
|
|
193
|
+
/** New servers that were not imported, each with why, in the reader's words. */
|
|
194
|
+
notTaken: {
|
|
195
|
+
key: string;
|
|
196
|
+
detail: string;
|
|
197
|
+
}[];
|
|
198
|
+
}
|
|
199
|
+
/** What removing takes with it, said before it is removed. */
|
|
200
|
+
export interface BundleRemoval {
|
|
201
|
+
connectors: {
|
|
202
|
+
id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
}[];
|
|
205
|
+
connections: {
|
|
206
|
+
id: string;
|
|
207
|
+
name: string;
|
|
208
|
+
}[];
|
|
209
|
+
skills: {
|
|
210
|
+
id: string;
|
|
211
|
+
name: string;
|
|
212
|
+
}[];
|
|
213
|
+
/** The wizards whose draft or published version uses one of the connections. */
|
|
214
|
+
wizards: {
|
|
215
|
+
id: string;
|
|
216
|
+
title: string;
|
|
217
|
+
connections: string[];
|
|
218
|
+
}[];
|
|
219
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Connector that brings skills (docs/plans/capabilities-next.md, piece 4): a plugin for Claude
|
|
3
|
+
* Code or Cursor, taken into a space from a public repository on GitHub or an uploaded zip. Its
|
|
4
|
+
* MCP servers over http become Connectors, its skills become Skills that name them. A `bundle`
|
|
5
|
+
* is the record of what came together; the studio has no word for it and shows a Connector with
|
|
6
|
+
* its Skills.
|
|
7
|
+
*/
|
|
8
|
+
/** Whose manifest was read: Claude Code's, Cursor's, or the open one Cursor reads at the root. */
|
|
9
|
+
export const BUNDLE_FORMATS = ["claude", "cursor", "agent"];
|
|
10
|
+
/** What a plugin holds that a space does not take. */
|
|
11
|
+
export const BUNDLE_LEFT_OUT_KINDS = [
|
|
12
|
+
"command",
|
|
13
|
+
"agent",
|
|
14
|
+
"hook",
|
|
15
|
+
"rule",
|
|
16
|
+
"server",
|
|
17
|
+
"skill",
|
|
18
|
+
"other",
|
|
19
|
+
];
|
|
@@ -4,7 +4,17 @@ export type ActionGroup = "read" | "write" | "send" | "destructive";
|
|
|
4
4
|
export interface ConnectorActionView {
|
|
5
5
|
id: string;
|
|
6
6
|
summary: string;
|
|
7
|
+
/** What it does: what an admin said, else what the importer read from its hints and words. */
|
|
7
8
|
group: ActionGroup;
|
|
9
|
+
/** A send: the input field that holds the recipient, where an admin named one. */
|
|
10
|
+
recipientField?: string;
|
|
11
|
+
/** An imported action's input fields (`body.to` for one inside an HTTP body), to name the recipient's. */
|
|
12
|
+
fields?: string[];
|
|
13
|
+
}
|
|
14
|
+
/** What an admin says an action does; for a send, the input field that holds the recipient. */
|
|
15
|
+
export interface ActionKindChoice {
|
|
16
|
+
kind: ActionGroup;
|
|
17
|
+
recipientField?: string;
|
|
8
18
|
}
|
|
9
19
|
export interface ConnectorView {
|
|
10
20
|
id: string;
|
|
@@ -24,6 +34,16 @@ export interface ConnectorView {
|
|
|
24
34
|
needsOAuthClient: boolean;
|
|
25
35
|
/** An MCP server that lists its tools only to a signed-in account: none are known yet. */
|
|
26
36
|
toolsPending: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Imported from a pasted address, not from the registry: nobody checked it („nicht geprüft“),
|
|
39
|
+
* and a new connection on it starts for the admins.
|
|
40
|
+
*/
|
|
41
|
+
fromAddress: boolean;
|
|
42
|
+
/** It came with a plugin, together with skills (`bundles.ts`): the record and the plugin's name. */
|
|
43
|
+
bundle: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
} | null;
|
|
27
47
|
actions: ConnectorActionView[];
|
|
28
48
|
importedAt: string;
|
|
29
49
|
refreshedAt: string | null;
|
|
@@ -56,25 +76,70 @@ export interface RegistryService {
|
|
|
56
76
|
url: string | null;
|
|
57
77
|
}[];
|
|
58
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* How a source signs in, as it describes itself: an MCP server's OAuth documents or its tools
|
|
81
|
+
* list answering without a sign-in, an OpenAPI description's security schemes, or the registry.
|
|
82
|
+
*/
|
|
83
|
+
export interface DescribedSignIn {
|
|
84
|
+
/** `null`: it asks for a sign-in and describes none, so the admin chooses. */
|
|
85
|
+
described: "none" | "oauth2" | "api_key" | null;
|
|
86
|
+
/** OAuth without self-registration: the import needs a client id and secret of your own. */
|
|
87
|
+
needsOAuthClient: boolean;
|
|
88
|
+
/** A described key: the header or query parameter it goes in. */
|
|
89
|
+
keyIn: string | null;
|
|
90
|
+
}
|
|
59
91
|
export interface SourcePreview {
|
|
92
|
+
/** What answered at the address. */
|
|
93
|
+
sourceKind: "openapi" | "mcp";
|
|
94
|
+
/** The address's host, and the id and tool prefix it suggests (free in the space). */
|
|
95
|
+
host: string;
|
|
96
|
+
suggestedId: string;
|
|
97
|
+
suggestedToolPrefix: string;
|
|
60
98
|
title: string | null;
|
|
99
|
+
/** Each action with what the importer read it as (`group`) and its input fields. */
|
|
61
100
|
actions: ConnectorActionView[];
|
|
62
101
|
blockers: string[];
|
|
63
102
|
/** Actions beyond the per-connector cap. */
|
|
64
103
|
dropped: number;
|
|
65
104
|
toolsPending: boolean;
|
|
105
|
+
signIn: DescribedSignIn;
|
|
106
|
+
/** The registry lists nothing at this address: the connector will be „nicht geprüft“. */
|
|
107
|
+
fromAddress: boolean;
|
|
108
|
+
/** A private or loopback address, taken because this is a computer of one's own. */
|
|
109
|
+
privateAddress: boolean;
|
|
66
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* What an admin chooses for the sign-in of a source from a pasted address: what the source
|
|
113
|
+
* describes itself, a key or token in a header, or none. A header's `value` only lists an MCP
|
|
114
|
+
* server's tools now; it is kept nowhere, the connection asks for the key again.
|
|
115
|
+
*/
|
|
116
|
+
export type SignInChoice = {
|
|
117
|
+
kind: "described";
|
|
118
|
+
} | {
|
|
119
|
+
kind: "header";
|
|
120
|
+
name: string;
|
|
121
|
+
scheme?: string;
|
|
122
|
+
value?: string;
|
|
123
|
+
} | {
|
|
124
|
+
kind: "none";
|
|
125
|
+
};
|
|
67
126
|
export interface ImportRequest {
|
|
68
|
-
domain
|
|
127
|
+
/** The registry's domain; left out for a pasted address, whose host stands for it. */
|
|
128
|
+
domain?: string;
|
|
69
129
|
sourceKind: "openapi" | "mcp";
|
|
70
130
|
sourceUrl: string;
|
|
71
|
-
|
|
72
|
-
|
|
131
|
+
/** Left out: the address's host suggests them. */
|
|
132
|
+
id?: string;
|
|
133
|
+
toolPrefix?: string;
|
|
73
134
|
name?: string;
|
|
74
135
|
/** Only these actions; default all. */
|
|
75
136
|
actions?: string[];
|
|
76
137
|
oauthClientId?: string;
|
|
77
138
|
oauthClientSecret?: string;
|
|
139
|
+
/** A pasted address: the sign-in the admin chose; left out: what the source describes. */
|
|
140
|
+
signIn?: SignInChoice;
|
|
141
|
+
/** What single actions do, where the admin says otherwise than the importer read. */
|
|
142
|
+
actionKinds?: Record<string, ActionKindChoice>;
|
|
78
143
|
}
|
|
79
144
|
/** How a connection signs in: once as the space (a key, an app token, a team login), or each person themselves. */
|
|
80
145
|
export declare const CONNECTION_SIGN_INS: readonly ["space", "person"];
|
|
@@ -89,7 +154,7 @@ export type CriticalKind = (typeof CRITICAL_KINDS)[number];
|
|
|
89
154
|
* Why the broker did not run a call (the runtime's broker/call.ts `Refusal`), as the log's
|
|
90
155
|
* `result` and „Was darf …?“ name it. The Protokoll page has words for each one.
|
|
91
156
|
*/
|
|
92
|
-
export declare const BROKER_REFUSALS: readonly ["not_connected", "no_action", "not_in_grant", "denied", "declined", "nobody", "needs_approval", "ai_step_writes", "not_allowed_recipient", "channel_not_fixed", "run_limit", "day_limit"];
|
|
157
|
+
export declare const BROKER_REFUSALS: readonly ["not_connected", "no_action", "not_in_grant", "denied", "declined", "nobody", "needs_approval", "ai_step_writes", "not_allowed_recipient", "channel_not_fixed", "run_limit", "day_limit", "calls_per_run", "calls_per_day", "run_ended", "paused"];
|
|
93
158
|
export type BrokerRefusal = (typeof BROKER_REFUSALS)[number];
|
|
94
159
|
/** A person of the organization, as Fähigkeiten › Protokoll names them and „Was darf …?“ offers them. */
|
|
95
160
|
export interface ProtocolPerson {
|
|
@@ -222,6 +287,8 @@ export declare const CONNECTION_LIMITS: {
|
|
|
222
287
|
name: number;
|
|
223
288
|
/** Connections one space may hold. */
|
|
224
289
|
perSpace: number;
|
|
290
|
+
/** The most calls a connection's limit may name, per run or per day. */
|
|
291
|
+
calls: number;
|
|
225
292
|
};
|
|
226
293
|
/** A connection of a space as the studio lists it; never a secret. */
|
|
227
294
|
export interface SpaceConnectionView {
|
|
@@ -237,6 +304,8 @@ export interface SpaceConnectionView {
|
|
|
237
304
|
description?: string;
|
|
238
305
|
/** An `api_key` connector: what is typed to sign in (as the space, or each person). */
|
|
239
306
|
fields?: ConnectorKeyField[];
|
|
307
|
+
/** Imported from a pasted address, not from the registry: the lists mark it „nicht geprüft“. */
|
|
308
|
+
fromAddress?: boolean;
|
|
240
309
|
} | null;
|
|
241
310
|
name: string;
|
|
242
311
|
signIn: ConnectionSignIn;
|
|
@@ -248,6 +317,8 @@ export interface SpaceConnectionView {
|
|
|
248
317
|
plugin: string | null;
|
|
249
318
|
/** That plugin by name, as the runtime carries it; its id where it is not loaded. */
|
|
250
319
|
pluginName?: string | null;
|
|
320
|
+
/** Its connector came with a plugin for Claude Code or Cursor: the record of what came together. */
|
|
321
|
+
bundleId: string | null;
|
|
251
322
|
/** A `space` sign-in: the account as the provider names it; null until an admin signed in. */
|
|
252
323
|
account: {
|
|
253
324
|
label: string;
|
|
@@ -265,6 +336,16 @@ export interface SpaceConnectionView {
|
|
|
265
336
|
lastUsedAt: string | null;
|
|
266
337
|
/** A `person` sign-in: how many people signed in; never who. */
|
|
267
338
|
signedIn: number;
|
|
339
|
+
/** Since when it pauses: nobody reaches it until an admin resumes it. Null: it does not pause. */
|
|
340
|
+
pausedAt: string | null;
|
|
341
|
+
/** Who paused it, by name where the organization still knows them. */
|
|
342
|
+
pausedByName?: string | null;
|
|
343
|
+
/** How many calls one run makes through it at most, whoever calls. Null: no limit. */
|
|
344
|
+
callsPerRun: number | null;
|
|
345
|
+
/** How many calls it takes per day (UTC), runs, chats and plugins together. Null: no limit. */
|
|
346
|
+
callsPerDay: number | null;
|
|
347
|
+
/** The calls it took today (UTC), as the limit per day counts them. */
|
|
348
|
+
callsToday: number;
|
|
268
349
|
}
|
|
269
350
|
/**
|
|
270
351
|
* Whether guests reach a connection: it is for everyone and signs in as the space. Where each
|
|
@@ -274,6 +355,24 @@ export declare function reachedByGuests(c: {
|
|
|
274
355
|
audience: ConnectionAudience;
|
|
275
356
|
signIn: ConnectionSignIn;
|
|
276
357
|
}): boolean;
|
|
358
|
+
/**
|
|
359
|
+
* What the editor warns of on a step; never an error, the wizard saves and publishes.
|
|
360
|
+
* `needs_approval`: a fixed step calls an action of a connection of the space whose rule for that
|
|
361
|
+
* kind of action is „Mit Freigabe“. That asks the space's admins, and nothing in a run waits for
|
|
362
|
+
* them, so the step fails there (docs/plans/capabilities-next.md, 2b).
|
|
363
|
+
*/
|
|
364
|
+
export interface StepWarning {
|
|
365
|
+
stepId: string;
|
|
366
|
+
kind: "needs_approval";
|
|
367
|
+
connection: {
|
|
368
|
+
id: string;
|
|
369
|
+
name: string;
|
|
370
|
+
};
|
|
371
|
+
action: {
|
|
372
|
+
id: string;
|
|
373
|
+
kind: ConnectionActionKind;
|
|
374
|
+
};
|
|
375
|
+
}
|
|
277
376
|
/** A field an `api_key` connector asks for when someone signs in. */
|
|
278
377
|
export interface ConnectorKeyField {
|
|
279
378
|
key: string;
|
|
@@ -312,6 +411,8 @@ export interface PersonConnectionView {
|
|
|
312
411
|
/** Who set it up, by name where the organization still knows them. */
|
|
313
412
|
setUpBy: string | null;
|
|
314
413
|
setUpAt: string;
|
|
414
|
+
/** Since when it pauses: nobody reaches it until an admin resumes it. Null: it does not pause. */
|
|
415
|
+
pausedAt: string | null;
|
|
315
416
|
}
|
|
316
417
|
/** The person's menu › „Verbindungen“: per space they belong to, the connections they may use. */
|
|
317
418
|
export interface PersonSignIns {
|
|
@@ -33,6 +33,10 @@ export const BROKER_REFUSALS = [
|
|
|
33
33
|
"channel_not_fixed",
|
|
34
34
|
"run_limit",
|
|
35
35
|
"day_limit",
|
|
36
|
+
"calls_per_run",
|
|
37
|
+
"calls_per_day",
|
|
38
|
+
"run_ended",
|
|
39
|
+
"paused",
|
|
36
40
|
];
|
|
37
41
|
/** What an action does, as the rules see it. */
|
|
38
42
|
export const CONNECTION_ACTION_KINDS = ["read", "write", "destructive", "send"];
|
|
@@ -50,6 +54,8 @@ export const CONNECTION_LIMITS = {
|
|
|
50
54
|
name: 80,
|
|
51
55
|
/** Connections one space may hold. */
|
|
52
56
|
perSpace: 200,
|
|
57
|
+
/** The most calls a connection's limit may name, per run or per day. */
|
|
58
|
+
calls: 1_000_000,
|
|
53
59
|
};
|
|
54
60
|
/**
|
|
55
61
|
* Whether guests reach a connection: it is for everyone and signs in as the space. Where each
|
|
@@ -315,6 +315,12 @@ declare const NOTES_EN: {
|
|
|
315
315
|
readonly appleNotConverted: "Apple Intelligence couldn’t convert the recording: {detail}";
|
|
316
316
|
readonly connectorAlreadyExistsSpace: "The connector “{id}” already exists in this space.";
|
|
317
317
|
readonly connectorNotExist: "This connector doesn’t exist.";
|
|
318
|
+
readonly connectorPrivateAddress: "{host} is in a private network. A connector reaches such an address only on your own computer, not in the cloud.";
|
|
319
|
+
readonly connectorSignInUnknown: "{host} asks for a sign-in and doesn’t describe one. Choose a key in a header or no sign-in.";
|
|
320
|
+
readonly connectorAddressNotRead: "Neither an MCP server nor an OpenAPI description answered at {host}. Check the address: {detail}";
|
|
321
|
+
readonly connectorNoSignedInConnection: "{name} lists its actions only to a signed-in account. Set up a connection and sign in, then reload.";
|
|
322
|
+
readonly connectorNoRecipientField: "The action “{id}” has no field “{field}”.";
|
|
323
|
+
readonly connectorKeyRefused: "{host} didn’t accept the key. Check the header and the key.";
|
|
318
324
|
readonly fieldMissing: "“{label}” is missing.";
|
|
319
325
|
readonly mailServerNotExist: "The mail server{host} doesn’t exist. Enter the IMAP server. For Gmail and Google Workspace, it’s imap.gmail.com.";
|
|
320
326
|
readonly mailServerNotResponding: "The mail server{host} isn’t responding. Check the IMAP server and port.";
|
|
@@ -327,6 +333,8 @@ declare const NOTES_EN: {
|
|
|
327
333
|
readonly stepCallsUnknownConnection: "This step calls the connection “{id}”, which the wizard doesn’t have.";
|
|
328
334
|
readonly stepCallNotAllowed: "The change in {service} wasn’t allowed, so this step stopped.";
|
|
329
335
|
readonly stepCallRefused: "{service} didn’t run “{action}” for this step: {reason}";
|
|
336
|
+
readonly stepCallsPerRun: "{service} takes only so many calls from one run, and this run has made them, so this step stopped.";
|
|
337
|
+
readonly stepCallsPerDay: "{service} takes only so many calls a day, and today’s are made, so this step stopped. Try again tomorrow.";
|
|
330
338
|
readonly clientNotSignedIn: "{name} isn’t signed in on this computer. Sign in under Settings → Models.";
|
|
331
339
|
readonly clientNotInstalled: "{name} isn’t installed on this computer. Install it under Settings → Models.";
|
|
332
340
|
readonly clientNoCredit: "The account {name} is signed in with has no credit or quota left.";
|
|
@@ -141,6 +141,12 @@ const NOTES_EN = {
|
|
|
141
141
|
appleNotConverted: "Apple Intelligence couldn’t convert the recording: {detail}",
|
|
142
142
|
connectorAlreadyExistsSpace: "The connector “{id}” already exists in this space.",
|
|
143
143
|
connectorNotExist: "This connector doesn’t exist.",
|
|
144
|
+
connectorPrivateAddress: "{host} is in a private network. A connector reaches such an address only on your own computer, not in the cloud.",
|
|
145
|
+
connectorSignInUnknown: "{host} asks for a sign-in and doesn’t describe one. Choose a key in a header or no sign-in.",
|
|
146
|
+
connectorAddressNotRead: "Neither an MCP server nor an OpenAPI description answered at {host}. Check the address: {detail}",
|
|
147
|
+
connectorNoSignedInConnection: "{name} lists its actions only to a signed-in account. Set up a connection and sign in, then reload.",
|
|
148
|
+
connectorNoRecipientField: "The action “{id}” has no field “{field}”.",
|
|
149
|
+
connectorKeyRefused: "{host} didn’t accept the key. Check the header and the key.",
|
|
144
150
|
fieldMissing: "“{label}” is missing.",
|
|
145
151
|
mailServerNotExist: "The mail server{host} doesn’t exist. Enter the IMAP server. For Gmail and Google Workspace, it’s imap.gmail.com.",
|
|
146
152
|
mailServerNotResponding: "The mail server{host} isn’t responding. Check the IMAP server and port.",
|
|
@@ -153,6 +159,8 @@ const NOTES_EN = {
|
|
|
153
159
|
stepCallsUnknownConnection: "This step calls the connection “{id}”, which the wizard doesn’t have.",
|
|
154
160
|
stepCallNotAllowed: "The change in {service} wasn’t allowed, so this step stopped.",
|
|
155
161
|
stepCallRefused: "{service} didn’t run “{action}” for this step: {reason}",
|
|
162
|
+
stepCallsPerRun: "{service} takes only so many calls from one run, and this run has made them, so this step stopped.",
|
|
163
|
+
stepCallsPerDay: "{service} takes only so many calls a day, and today’s are made, so this step stopped. Try again tomorrow.",
|
|
156
164
|
clientNotSignedIn: "{name} isn’t signed in on this computer. Sign in under Settings → Models.",
|
|
157
165
|
clientNotInstalled: "{name} isn’t installed on this computer. Install it under Settings → Models.",
|
|
158
166
|
clientNoCredit: "The account {name} is signed in with has no credit or quota left.",
|
|
@@ -537,6 +545,12 @@ const NOTES_DE = {
|
|
|
537
545
|
appleNotConverted: "Apple Intelligence konnte die Aufnahme nicht umwandeln: {detail}",
|
|
538
546
|
connectorAlreadyExistsSpace: "Den Connector „{id}“ gibt es in diesem Space schon.",
|
|
539
547
|
connectorNotExist: "Diesen Connector gibt es nicht.",
|
|
548
|
+
connectorPrivateAddress: "{host} liegt in einem privaten Netz. Ein Connector erreicht so eine Adresse nur auf deinem eigenen Computer, nicht in der Cloud.",
|
|
549
|
+
connectorSignInUnknown: "{host} verlangt eine Anmeldung und beschreibt keine. Wähl einen Key im Header oder keine Anmeldung.",
|
|
550
|
+
connectorAddressNotRead: "Unter {host} hat weder ein MCP-Server noch eine OpenAPI-Beschreibung geantwortet. Prüf die Adresse: {detail}",
|
|
551
|
+
connectorNoSignedInConnection: "{name} nennt seine Aktionen nur einem angemeldeten Konto. Richte eine Verbindung ein und melde dich an, dann lade neu.",
|
|
552
|
+
connectorNoRecipientField: "Die Aktion „{id}“ hat kein Feld „{field}“.",
|
|
553
|
+
connectorKeyRefused: "{host} hat den Key nicht angenommen. Prüf den Header und den Key.",
|
|
540
554
|
fieldMissing: "„{label}“ fehlt.",
|
|
541
555
|
mailServerNotExist: "Den Mail-Server{host} gibt es nicht. Trag den IMAP-Server ein, bei Gmail und Google Workspace imap.gmail.com.",
|
|
542
556
|
mailServerNotResponding: "Der Mail-Server{host} antwortet nicht. Prüf IMAP-Server und Port.",
|
|
@@ -549,6 +563,8 @@ const NOTES_DE = {
|
|
|
549
563
|
stepCallsUnknownConnection: "Dieser Schritt ruft die Verbindung „{id}“ auf, die der Wizard nicht hat.",
|
|
550
564
|
stepCallNotAllowed: "Die Änderung in {service} wurde nicht erlaubt, darum hat dieser Schritt aufgehört.",
|
|
551
565
|
stepCallRefused: "{service} hat „{action}“ für diesen Schritt nicht ausgeführt: {reason}",
|
|
566
|
+
stepCallsPerRun: "{service} nimmt aus einem Lauf nur eine bestimmte Zahl von Aufrufen an, und dieser Lauf hat sie gemacht. Darum hat dieser Schritt aufgehört.",
|
|
567
|
+
stepCallsPerDay: "{service} nimmt am Tag nur eine bestimmte Zahl von Aufrufen an, und die für heute sind gemacht. Darum hat dieser Schritt aufgehört. Versuch es morgen wieder.",
|
|
552
568
|
clientNotSignedIn: "{name} ist auf diesem Computer nicht angemeldet. Melde dich unter Einstellungen → Modelle an.",
|
|
553
569
|
clientNotInstalled: "{name} ist auf diesem Computer nicht installiert. Installiere es unter Einstellungen → Modelle.",
|
|
554
570
|
clientNoCredit: "Das Konto, mit dem {name} angemeldet ist, hat kein Guthaben oder Kontingent mehr.",
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* The broker's first part (docs/plans/broker.md, "First: RWX"): the words of a space's rules.
|
|
3
3
|
* A rule says who (a subject) may read, write or execute what (a resource); each flag is allow,
|
|
4
4
|
* deny or unset. Unset means deny, and a deny wins over every allow from any other rule. The
|
|
5
|
-
* runtime decides in apps/runtime/src/broker/rwx.ts; the studio
|
|
5
|
+
* runtime decides in apps/runtime/src/broker/rwx.ts; the studio draws the rows as sentences in
|
|
6
|
+
* Fähigkeiten › Rechte (apps/web/src/studio/capabilities/rights-words.ts).
|
|
6
7
|
*/
|
|
7
8
|
/**
|
|
8
9
|
* Who a rule is about. A role's id is `member`, `admin` or `owner`; a guest has none. `agent`: an
|
|
@@ -57,3 +58,85 @@ export interface RwxRule extends RwxRuleInput {
|
|
|
57
58
|
createdBy: string;
|
|
58
59
|
createdAt: string;
|
|
59
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* What the runtime asks today, and so all a rule can say: per kind of resource and permission, the
|
|
63
|
+
* kinds of subject a reader asks it for. A rule outside this table would be stored and never
|
|
64
|
+
* asked, so the runtime refuses it (apps/runtime/src/broker/rwx.ts `refusalOf`), and the studio
|
|
65
|
+
* offers nothing else. A reader that starts asking adds its line here.
|
|
66
|
+
*
|
|
67
|
+
* - `document`, `page`, `table` · `r`: every reader of Knowledge (the studio's routes, a run's
|
|
68
|
+
* step, a Work chat, Goose, search, a share link, the client portal); a plugin reads pages and
|
|
69
|
+
* documents. A folder's rule is a rule on its page.
|
|
70
|
+
* - `page` · `w`: Goose writing a page of Knowledge for its person (`write_knowledge_page`). Not
|
|
71
|
+
* for the role `client`, and neither is the setup: a client reaches no studio (`rwxAsked`).
|
|
72
|
+
* - `wizard` · `r`, `x`: `wizard_list` and `wizard_run` for a person in a Work chat or through an
|
|
73
|
+
* outside client, and the client portal's list and start. A guest reaches a wizard by its link,
|
|
74
|
+
* and a person starting one in Work or the studio is not asked.
|
|
75
|
+
* - `skill` · `r`: `skill_list`, `skill_load`, `skill_read` in a step, a Work chat, for Goose and
|
|
76
|
+
* outside clients. `x`: its scripts placed in a sandbox, which Goose has none of.
|
|
77
|
+
* - `setup` · `w`: Goose's writes to the space's setup.
|
|
78
|
+
* - `mount` · `r`: `readableMounts`; `w`: a draft and „Veröffentlichen“ (mounts/drafts.ts), which a
|
|
79
|
+
* wizard is refused before any rule is asked. Its rules are written by its form in Dateien alone.
|
|
80
|
+
* - `connection`, `mail`, `host`, `sandbox`: nothing. A connection has its own audience and rules
|
|
81
|
+
* (broker/call.ts), which decide mail too; a run's grant decides hosts; the sandbox is a step's.
|
|
82
|
+
*/
|
|
83
|
+
export declare const RWX_ASKED: Record<RwxResourceKind, Partial<Record<RwxPerm, readonly RwxSubjectKind[]>>>;
|
|
84
|
+
/**
|
|
85
|
+
* Whether a reader asks `perm` on a resource of `kind` for a subject of `subject`; `subjectId`
|
|
86
|
+
* tells the roles apart, where it is known.
|
|
87
|
+
*/
|
|
88
|
+
export declare const rwxAsked: (subject: RwxSubjectKind, kind: RwxResourceKind, perm: RwxPerm, subjectId?: string | null) => boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Where a rule is set, and so where it is changed: the start set every space has (a role's or the
|
|
91
|
+
* guests' rule on every resource of a kind), „Wer sieht diesen Ordner“ on a page of Wissen, a
|
|
92
|
+
* mount's form in Dateien, „Für Kund:innen sichtbar“, or Fähigkeiten › Rechte. It is read off the
|
|
93
|
+
* rule: a place that shows a rule also replaces it, whoever wrote the row.
|
|
94
|
+
*/
|
|
95
|
+
export declare const RWX_ORIGINS: readonly ["start", "folder", "mount", "clients", "rights"];
|
|
96
|
+
export type RwxOrigin = (typeof RWX_ORIGINS)[number];
|
|
97
|
+
/** A rule as Fähigkeiten › Rechte lists it: where it is set, and what its ids are called. */
|
|
98
|
+
export interface RwxRuleView extends RwxRule {
|
|
99
|
+
origin: RwxOrigin;
|
|
100
|
+
/** The person's, wizard's or plugin's name; null for a role, guests and the AI in Work, and where it is gone. */
|
|
101
|
+
subjectName: string | null;
|
|
102
|
+
/** The resource's name; null for `*`, the setup, and where it is gone. */
|
|
103
|
+
resourceName: string | null;
|
|
104
|
+
/** A page that is a folder of Wissen. */
|
|
105
|
+
folder?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/** Whom „Was darf …?“ asks about for content. */
|
|
108
|
+
export declare const RWX_ASK_WHO: readonly ["guest", "person", "goose", "agent", "wizard", "plugin"];
|
|
109
|
+
export type RwxAskWho = (typeof RWX_ASK_WHO)[number];
|
|
110
|
+
/** What „Was darf …?“ asks about for content: the kinds decided by one rule lookup. */
|
|
111
|
+
export declare const RWX_ASK_KINDS: readonly ["document", "page", "table", "wizard", "skill", "setup"];
|
|
112
|
+
export type RwxAskKind = (typeof RWX_ASK_KINDS)[number];
|
|
113
|
+
/** The answer of „Was darf …?“ for content (`GET /api/studio/spaces/:id/rules/ask`). */
|
|
114
|
+
export interface RwxAnswer {
|
|
115
|
+
ok: boolean;
|
|
116
|
+
/** The rule that decided; none where no rule allows it, or the runtime itself reads (a plugin's job). */
|
|
117
|
+
rule: RwxRuleView | null;
|
|
118
|
+
/** Why, as the broker says it: the resource's kind and id, never its content. */
|
|
119
|
+
reason: string;
|
|
120
|
+
}
|
|
121
|
+
/** Something a rule or the question can name. */
|
|
122
|
+
export interface RwxChoice {
|
|
123
|
+
id: string;
|
|
124
|
+
name: string;
|
|
125
|
+
}
|
|
126
|
+
/** What Rechte picks from (`GET /api/studio/spaces/:id/rules/choices`). */
|
|
127
|
+
export interface RwxChoices {
|
|
128
|
+
people: {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
role: (typeof RWX_ROLES)[number];
|
|
132
|
+
}[];
|
|
133
|
+
wizards: RwxChoice[];
|
|
134
|
+
plugins: RwxChoice[];
|
|
135
|
+
documents: RwxChoice[];
|
|
136
|
+
/** The pages of Wissen; `folder` for one that holds others and has no text. */
|
|
137
|
+
pages: (RwxChoice & {
|
|
138
|
+
folder: boolean;
|
|
139
|
+
})[];
|
|
140
|
+
tables: RwxChoice[];
|
|
141
|
+
skills: RwxChoice[];
|
|
142
|
+
}
|