@engenty/wizards-runtime 0.14.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/runtime/dist/agents/studio-assistant.js +180 -4
- package/apps/runtime/dist/agents/website.js +10 -5
- package/apps/runtime/dist/app.js +27 -2
- package/apps/runtime/dist/auth/index.js +5 -0
- package/apps/runtime/dist/broker/account.js +5 -0
- package/apps/runtime/dist/broker/call.js +2 -0
- package/apps/runtime/dist/broker/host.js +1 -0
- package/apps/runtime/dist/broker/index.js +5 -0
- package/apps/runtime/dist/broker/rwx.js +293 -11
- package/apps/runtime/dist/cli/main.js +7 -0
- package/apps/runtime/dist/cli/move-files.js +68 -0
- package/apps/runtime/dist/cli/move-folder-sources.js +120 -0
- package/apps/runtime/dist/connectors/plugin-connections.js +74 -4
- package/apps/runtime/dist/db/migrations/tenant/0040_rwx_elements.sql +21 -0
- package/apps/runtime/dist/db/migrations/tenant/0041_broker_log_client.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0042_client_spaces.sql +16 -0
- package/apps/runtime/dist/db/migrations/tenant/0043_space_member_invite.sql +19 -0
- package/apps/runtime/dist/db/migrations/tenant/0044_client_portal.sql +8 -0
- package/apps/runtime/dist/db/migrations/tenant/0045_client_portal_no_slug.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0046_space_file_hash.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0047_knowledge_folders.sql +3 -0
- package/apps/runtime/dist/db/migrations/tenant/0048_space_chunk_kind.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0049_knowledge_sources.sql +57 -0
- package/apps/runtime/dist/db/migrations/tenant/0050_dateien.sql +71 -0
- package/apps/runtime/dist/db/migrations/tenant/0051_dateien_drafts.sql +23 -0
- package/apps/runtime/dist/db/migrations/tenant/0052_dateien_plugin_kinds.sql +5 -0
- package/apps/runtime/dist/db/migrations/tenant/0053_dateien_file_title.sql +3 -0
- package/apps/runtime/dist/db/migrations/tenant/0054_dateien_ocr.sql +14 -0
- package/apps/runtime/dist/db/migrations/tenant/0055_dateien_doc_reread.sql +3 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0040_snapshot.json +5153 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0041_snapshot.json +5160 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0042_snapshot.json +5286 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0043_snapshot.json +5293 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0044_snapshot.json +5344 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0045_snapshot.json +5329 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0046_snapshot.json +5343 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0047_snapshot.json +5391 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0048_snapshot.json +5398 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0049_snapshot.json +5793 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0050_snapshot.json +6288 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0051_snapshot.json +6461 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0052_snapshot.json +6497 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0053_snapshot.json +6504 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0054_snapshot.json +6504 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0055_snapshot.json +6504 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +112 -0
- package/apps/runtime/dist/db/schema.js +296 -5
- package/apps/runtime/dist/docs/dev/api.md +49 -2
- package/apps/runtime/dist/docs/dev/architecture.md +13 -2
- package/apps/runtime/dist/docs/dev/plugins/connections.md +30 -2
- package/apps/runtime/dist/docs/dev/plugins/index.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/reference.md +7 -4
- package/apps/runtime/dist/docs/dev/plugins/server.md +11 -5
- package/apps/runtime/dist/docs/dev/plugins/space.md +130 -4
- package/apps/runtime/dist/docs/dev/plugins/studio.md +13 -3
- package/apps/runtime/dist/docs/user-guide/command-line.md +2 -0
- package/apps/runtime/dist/docs/user-guide/plugins.md +1 -1
- package/apps/runtime/dist/docs/user-guide/space.md +6 -6
- package/apps/runtime/dist/docs/user-guide/steps.md +1 -1
- package/apps/runtime/dist/documents/ocr.js +72 -0
- package/apps/runtime/dist/documents/parse.js +81 -12
- package/apps/runtime/dist/elements/caller.js +47 -0
- package/apps/runtime/dist/elements/catalogue.js +14 -0
- package/apps/runtime/dist/elements/connections.js +60 -0
- package/apps/runtime/dist/elements/gate.js +81 -0
- package/apps/runtime/dist/elements/knowledge.js +308 -0
- package/apps/runtime/dist/elements/outside.js +103 -0
- package/apps/runtime/dist/elements/specs.js +102 -0
- package/apps/runtime/dist/elements/wizards.js +72 -0
- package/apps/runtime/dist/engenty/connections-google/connectors/drive.js +3 -0
- package/apps/runtime/dist/engenty/connections-microsoft/onedrive.js +3 -0
- package/apps/runtime/dist/engenty/connections-s3/s3.js +6 -0
- package/apps/runtime/dist/engine/runner.js +19 -2
- package/apps/runtime/dist/engine/steps.js +1 -1
- package/apps/runtime/dist/env.js +11 -2
- package/apps/runtime/dist/files/blobs.js +57 -1
- package/apps/runtime/dist/files/objects.js +1 -0
- package/apps/runtime/dist/files/pictures.js +41 -0
- package/apps/runtime/dist/files/storage.js +14 -26
- package/apps/runtime/dist/files/thumbs.js +77 -0
- package/apps/runtime/dist/files/upload-check.js +2 -2
- package/apps/runtime/dist/index.js +22 -0
- package/apps/runtime/dist/live/views.js +2 -1
- package/apps/runtime/dist/manage.js +4 -1
- package/apps/runtime/dist/mcp/elements.js +88 -0
- package/apps/runtime/dist/mcp/handler.js +2 -0
- package/apps/runtime/dist/mcp/scopes.js +5 -0
- package/apps/runtime/dist/mcp/tools.js +5 -0
- package/apps/runtime/dist/models.js +82 -13
- package/apps/runtime/dist/mounts/cache.js +71 -0
- package/apps/runtime/dist/mounts/drafts.js +367 -0
- package/apps/runtime/dist/mounts/folder.js +148 -0
- package/apps/runtime/dist/mounts/mounts.js +1315 -0
- package/apps/runtime/dist/mounts/source.js +179 -0
- package/apps/runtime/dist/mounts/units.js +97 -0
- package/apps/runtime/dist/move-files.js +4 -0
- package/apps/runtime/dist/plugins/loader.js +73 -1
- package/apps/runtime/dist/plugins/registry.js +2 -0
- package/apps/runtime/dist/prompts/authoring.md +2 -2
- package/apps/runtime/dist/prompts/goose.md +13 -1
- package/apps/runtime/dist/prompts/tools.md +8 -2
- package/apps/runtime/dist/render/convert.js +188 -1
- package/apps/runtime/dist/routes/api.js +7 -2
- package/apps/runtime/dist/routes/client-contract.js +164 -0
- package/apps/runtime/dist/routes/client-spaces.js +58 -0
- package/apps/runtime/dist/routes/dateien.js +173 -0
- package/apps/runtime/dist/routes/elements.js +76 -0
- package/apps/runtime/dist/routes/plugins.js +2 -1
- package/apps/runtime/dist/routes/runs.js +24 -10
- package/apps/runtime/dist/routes/studio.js +168 -8
- package/apps/runtime/dist/secrets/signing.js +16 -0
- package/apps/runtime/dist/services/client-portal.js +439 -0
- package/apps/runtime/dist/services/client-spaces.js +228 -0
- package/apps/runtime/dist/services/cloud.js +2 -0
- package/apps/runtime/dist/services/knowledge-model.js +24 -8
- package/apps/runtime/dist/services/knowledge.js +72 -42
- package/apps/runtime/dist/services/links.js +17 -0
- package/apps/runtime/dist/services/members-studio.js +5 -1
- package/apps/runtime/dist/services/page-pictures.js +162 -0
- package/apps/runtime/dist/services/runs.js +22 -6
- package/apps/runtime/dist/services/space-categories.js +41 -5
- package/apps/runtime/dist/services/space-data.js +165 -8
- package/apps/runtime/dist/services/space-files.js +102 -19
- package/apps/runtime/dist/services/space-index.js +384 -41
- package/apps/runtime/dist/services/space-origin.js +25 -1
- package/apps/runtime/dist/services/space-sources.js +937 -0
- package/apps/runtime/dist/services/spaces.js +60 -12
- package/apps/runtime/dist/services/synced-spaces.js +10 -1
- package/apps/runtime/dist/services/work-ai.js +53 -24
- package/apps/runtime/dist/services/work-chats.js +3 -2
- package/apps/runtime/dist/services/work-connections.js +2 -2
- package/apps/runtime/dist/sharing/index.js +2 -0
- package/apps/runtime/dist/store/index.js +29 -8
- package/apps/runtime/dist/store/shared-lists.js +30 -17
- package/apps/runtime/dist/sync/records.js +22 -27
- package/apps/runtime/dist/texts.js +4 -0
- package/apps/runtime/dist/tools/index.js +5 -4
- package/apps/runtime/dist/tools/pages.js +1 -1
- package/apps/runtime/dist/tools/skills.js +80 -54
- package/apps/runtime/dist/tools/space.js +8 -152
- package/apps/runtime/dist/widgets/step.js +2 -1
- package/apps/web/dist/assets/AboutDialog-0q4P80yv.js +1 -0
- package/apps/web/dist/assets/BlockEditor-CUYFH_CU.js +173 -0
- package/apps/web/dist/assets/BlockEditor-CtW6lw0y.css +1 -0
- package/apps/web/dist/assets/CapabilitiesPage-BlZP8DYb.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-D_dQOMIq.js → ChangelogDialog-CDN7kMs1.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-nxoOt8ge.js → CodeEditor-D-Y16fdk.js} +1 -1
- package/apps/web/dist/assets/EditorPage-CrMVsgUt.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-aMfwcPul.js → FlowPreview-DXnk7m9P.js} +1 -1
- package/apps/web/dist/assets/{LangSwitch-DpD0inR4.js → LangSwitch-Dkd0FBIH.js} +1 -1
- package/apps/web/dist/assets/Marketplace-Cty40VwG.js +2 -0
- package/apps/web/dist/assets/NewWizardChannels-Czool7s1.js +1 -0
- package/apps/web/dist/assets/NewWizardPage-CfVe_4a2.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-D3SEpTmt.js +1 -0
- package/apps/web/dist/assets/PreviewPane-CQDKQO6z.js +7 -0
- package/apps/web/dist/assets/PublicRunner-BDZNnlQw.js +1 -0
- package/apps/web/dist/assets/ReadOnly-B7MUySpC.js +1 -0
- package/apps/web/dist/assets/SettingsPage-Bgurv3l2.js +2 -0
- package/apps/web/dist/assets/SetupPage-C3km8vqv.js +1 -0
- package/apps/web/dist/assets/{SharePage-N80EhoD7.js → SharePage-UwEJBIzq.js} +1 -1
- package/apps/web/dist/assets/SkillEditor-BaEiqqXl.js +1 -0
- package/apps/web/dist/assets/Skills-Bv6XbKxc.js +9 -0
- package/apps/web/dist/assets/SpacePage-D9PXLSU_.js +2 -0
- package/apps/web/dist/assets/UpdateCheck-C7I43zFZ.js +2 -0
- package/apps/web/dist/assets/changelog-DwgWiSZb.js +1 -0
- package/apps/web/dist/assets/circle-check-DDLzlcXP.js +1 -0
- package/apps/web/dist/assets/code-DsnwzN1x.js +1 -0
- package/apps/web/dist/assets/code-editor-Ca5EAxmd.js +2 -0
- package/apps/web/dist/assets/code-xml-S4IFi5Jc.js +1 -0
- package/apps/web/dist/assets/connection-sign-in-hI3HXhq4.js +1 -0
- package/apps/web/dist/assets/{dist-H1UN89OA.js → dist-B3Ray2U5.js} +1 -1
- package/apps/web/dist/assets/dist-CQpLJoQZ.js +10 -0
- package/apps/web/dist/assets/{dist-GlRRx9Xl.js → dist-D1uGQ_tB.js} +1 -1
- package/apps/web/dist/assets/{dist-BdDd1FxP.js → dist-DFI-tsfx.js} +1 -1
- package/apps/web/dist/assets/eye-TJSuiHHO.js +1 -0
- package/apps/web/dist/assets/floating-ui.dom-pwdNGv4b.js +1 -0
- package/apps/web/dist/assets/host-D5hNHbhF.js +125 -0
- package/apps/web/dist/assets/i18n-BBzMbGoo.js +55 -0
- package/apps/web/dist/assets/index-CyBrvupM.js +10 -0
- package/apps/web/dist/assets/index-w-3J3ZJ9.css +1 -0
- package/apps/web/dist/assets/{json-CEsfHdlZ.js → json-Ce3iHrtf.js} +1 -1
- package/apps/web/dist/assets/link-CPL8pB1P.js +1 -0
- package/apps/web/dist/assets/list-checks-DaxmUPqK.js +1 -0
- package/apps/web/dist/assets/{markdown-5-I9_izp.js → markdown-hqKQy2pp.js} +1 -1
- package/apps/web/dist/assets/marked.esm-DQ7XA7AC.js +67 -0
- package/apps/web/dist/assets/oss-credits-BrwV0a4F.js +1 -0
- package/apps/web/dist/assets/pdf-Dg-raaUo.js +54 -0
- package/apps/web/dist/assets/pdf.worker.min-68CMzziE.js +1 -0
- package/apps/web/dist/assets/pdf.worker.min-CjEcRF4W.mjs +28 -0
- package/apps/web/dist/assets/phone-B4uKDBFq.js +1 -0
- package/apps/web/dist/assets/read-aloud-Bfp9_bUY.js +1 -0
- package/apps/web/dist/assets/{runners-CyIvJIHr.js → runners-CUpBpSji.js} +1 -1
- package/apps/web/dist/assets/scroll-text-BEnPzQEi.js +1 -0
- package/apps/web/dist/assets/session-CMQo8P-G.js +2 -0
- package/apps/web/dist/assets/table-5B9G3oA6.js +1 -0
- package/apps/web/dist/assets/theme-CdX0marK.js +11 -0
- package/apps/web/dist/assets/ui-BCfu5sia.js +16 -0
- package/apps/web/dist/assets/upload-CAlHC232.js +1 -0
- package/apps/web/dist/assets/{useMutation-DEkZhp5c.js → useMutation-1fV4Nnxq.js} +1 -1
- package/apps/web/dist/assets/viewers-ChriFcRy.js +2 -0
- package/apps/web/dist/assets/volume-2-BqlBtCIJ.js +1 -0
- package/apps/web/dist/assets/w3c-keyname-BOAvb0qz.js +1 -0
- package/apps/web/dist/assets/xlsx-CuSbHU4R.js +141 -0
- package/apps/web/dist/index.html +19 -14
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +223 -4
- package/node_modules/@engenty/wizards/dist/plugin/mount.d.ts +123 -0
- package/node_modules/@engenty/wizards/dist/plugin/mount.js +7 -0
- package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +110 -1
- package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +24 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +24 -0
- package/node_modules/@engenty/wizards-shared/dist/knowledge.d.ts +33 -4
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +6 -0
- package/node_modules/@engenty/wizards-shared/dist/run.js +12 -0
- package/node_modules/@engenty/wizards-shared/dist/rwx.d.ts +21 -4
- package/node_modules/@engenty/wizards-shared/dist/rwx.js +30 -3
- package/node_modules/@engenty/wizards-shared/dist/spaces.d.ts +11 -1
- package/node_modules/@engenty/wizards-shared/dist/spaces.js +9 -2
- package/node_modules/@engenty/wizards-shared/dist/text-merge.d.ts +6 -0
- package/node_modules/@engenty/wizards-shared/dist/text-merge.js +25 -0
- package/package.json +3 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/README.md +3 -0
- package/plugin/plugin.json +1 -1
- package/plugin/skills/work-in-space/SKILL.md +16 -0
- package/apps/web/dist/assets/AboutDialog-Cag3RJuT.js +0 -1
- package/apps/web/dist/assets/CapabilitiesPage-BQYiN0gT.js +0 -2
- package/apps/web/dist/assets/EditorPage-C4_8LsQN.js +0 -3
- package/apps/web/dist/assets/Marketplace-CpzD9pNQ.js +0 -2
- package/apps/web/dist/assets/NewWizardChannels-CcE3UMVb.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-BzN7zrQx.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-ztHT01ah.js +0 -1
- package/apps/web/dist/assets/PreviewPane-BabMbBZI.js +0 -9
- package/apps/web/dist/assets/PublicRunner-D-JmtqCi.js +0 -1
- package/apps/web/dist/assets/ReadOnly-GAORKKqV.js +0 -1
- package/apps/web/dist/assets/SettingsPage-BKAiYmXl.js +0 -2
- package/apps/web/dist/assets/SetupPage-C1EZZHIp.js +0 -1
- package/apps/web/dist/assets/SkillEditor-CqQMg2MC.js +0 -1
- package/apps/web/dist/assets/Skills-CnhpgoOA.js +0 -9
- package/apps/web/dist/assets/SpacePage-CRR8JvV1.js +0 -2
- package/apps/web/dist/assets/UpdateCheck-CfXZBQNv.js +0 -2
- package/apps/web/dist/assets/changelog-6MqC8Vy8.js +0 -1
- package/apps/web/dist/assets/circle-alert-C8Ma-bPY.js +0 -1
- package/apps/web/dist/assets/circle-check-Bu9Z3mlJ.js +0 -1
- package/apps/web/dist/assets/code-editor-CfTGqOpp.js +0 -2
- package/apps/web/dist/assets/code-xml-B4kLFZSj.js +0 -1
- package/apps/web/dist/assets/connection-sign-in-B2D0O8W-.js +0 -1
- package/apps/web/dist/assets/dist-EBVTpvRr.js +0 -10
- package/apps/web/dist/assets/eye-BpoKpIdt.js +0 -1
- package/apps/web/dist/assets/host-BlKXX7YK.js +0 -118
- package/apps/web/dist/assets/i18n-BJ7Ld6O6.js +0 -55
- package/apps/web/dist/assets/index-66tE1oti.js +0 -10
- package/apps/web/dist/assets/index-D18DvnxX.css +0 -1
- package/apps/web/dist/assets/oss-credits-IdX5bc71.js +0 -1
- package/apps/web/dist/assets/phone-Ctvf-Am-.js +0 -1
- package/apps/web/dist/assets/read-aloud-Da_RSm2S.js +0 -1
- package/apps/web/dist/assets/scroll-text-ChrjRu9Y.js +0 -1
- package/apps/web/dist/assets/session-SXPtTWRK.js +0 -2
- package/apps/web/dist/assets/theme-Br1S0j5h.js +0 -11
- package/apps/web/dist/assets/ui-Uqnx1UpK.js +0 -82
- package/apps/web/dist/assets/upload-BchUnQGV.js +0 -1
- package/apps/web/dist/assets/volume-2-CU_oy81Z.js +0 -1
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { DEFAULT_CONNECTION_RULES } from "@engenty/wizards-shared/connectors";
|
|
2
2
|
import { and, desc, eq } from "drizzle-orm";
|
|
3
3
|
import { nanoid } from "nanoid";
|
|
4
|
-
import { brokerCall, currentCaller, kindOf, reachesOutside } from "../broker/index.js";
|
|
4
|
+
import { brokerCall, currentCaller, grantedScopes, kindOf, reachesOutside, } from "../broker/index.js";
|
|
5
5
|
import { db, schema } from "../db/client.js";
|
|
6
6
|
import { buildAuthorizationUrl, createOAuth2Pkce, exchangeAuthorizationCode, } from "../engenty/connections-sdk/oauth2.js";
|
|
7
|
+
import { managed } from "../manage.js";
|
|
7
8
|
import { seal, unseal } from "../secrets/crypto.js";
|
|
8
9
|
import { currentTenant } from "../tenants/tenant.js";
|
|
9
10
|
import { builtinConnector, connectorFetch, resolveEnv, usable, viaAccount } from "./builtin.js";
|
|
10
11
|
import { connectRedirectUri as redirectUri } from "./index.js";
|
|
11
12
|
import { keepSpaceSignIn, } from "./space-connections.js";
|
|
12
13
|
import { AccountConnectError, redeemTicket, startThroughAccount } from "./via-account.js";
|
|
14
|
+
/** The broker's name for a plugin's own request through a connection (`connections.request`). */
|
|
15
|
+
const REQUEST = "request";
|
|
16
|
+
/**
|
|
17
|
+
* What a plugin's connection reaches: the public internet in the cloud; on a local install the
|
|
18
|
+
* local network too, where a person's own bucket (a NAS, a MinIO) is. A wizard's connections stay
|
|
19
|
+
* on the public internet everywhere (`connectorFetch`).
|
|
20
|
+
*/
|
|
21
|
+
const pluginFetch = managed ? connectorFetch : (input, init) => fetch(input, init);
|
|
13
22
|
function oauthConnector(id) {
|
|
14
23
|
const connector = builtinConnector(id);
|
|
15
24
|
if (connector?.auth.kind !== "oauth2") {
|
|
@@ -176,13 +185,13 @@ export function pluginConnections(plugin) {
|
|
|
176
185
|
}
|
|
177
186
|
return out;
|
|
178
187
|
},
|
|
179
|
-
async start({ space, connector: connectorId, actions, lang }) {
|
|
188
|
+
async start({ space, connector: connectorId, actions, scopes: more, lang }) {
|
|
180
189
|
const connector = oauthConnector(connectorId);
|
|
181
190
|
if (connector.auth.kind !== "oauth2") {
|
|
182
191
|
throw new Error("not an oauth connector");
|
|
183
192
|
}
|
|
184
193
|
await spaceExists(space);
|
|
185
|
-
const scopes = scopesOf(connector, actions);
|
|
194
|
+
const scopes = [...new Set([...scopesOf(connector, actions), ...(more ?? [])])];
|
|
186
195
|
const base = {
|
|
187
196
|
plugin,
|
|
188
197
|
tenantId: currentTenant(),
|
|
@@ -238,7 +247,7 @@ export function pluginConnections(plugin) {
|
|
|
238
247
|
}
|
|
239
248
|
let account;
|
|
240
249
|
try {
|
|
241
|
-
account = await connector.auth.apiKey.verify(keys,
|
|
250
|
+
account = await connector.auth.apiKey.verify(keys, pluginFetch);
|
|
242
251
|
}
|
|
243
252
|
catch (err) {
|
|
244
253
|
throw Object.assign(new Error(String(err?.message ?? err).slice(0, 300)), {
|
|
@@ -307,6 +316,67 @@ export function pluginConnections(plugin) {
|
|
|
307
316
|
}
|
|
308
317
|
return out.result;
|
|
309
318
|
},
|
|
319
|
+
async request(id, request) {
|
|
320
|
+
const row = await own(id);
|
|
321
|
+
if (!row) {
|
|
322
|
+
throw new Error(`There is no connection "${id}".`);
|
|
323
|
+
}
|
|
324
|
+
const connector = connectorOf(row.connectorId);
|
|
325
|
+
const capability = connector.request;
|
|
326
|
+
if (!capability) {
|
|
327
|
+
throw new Error(`${connector.name} takes no requests of a plugin.`);
|
|
328
|
+
}
|
|
329
|
+
const kind = request.kind ?? "read";
|
|
330
|
+
const caller = currentCaller() ?? {
|
|
331
|
+
who: { kind: "plugin", id: plugin },
|
|
332
|
+
where: { spaceId: row.spaceId },
|
|
333
|
+
};
|
|
334
|
+
reachesOutside(`plugin:${plugin}`, { connection: row.connectorId, action: REQUEST, kind });
|
|
335
|
+
const out = await brokerCall({
|
|
336
|
+
who: caller.who,
|
|
337
|
+
where: { ...caller.where, spaceId: caller.where.spaceId ?? row.spaceId },
|
|
338
|
+
connection: { kind: "space_connection", row, connector },
|
|
339
|
+
action: { id: REQUEST, kind },
|
|
340
|
+
input: { method: request.method ?? "GET", url: request.url.split("?")[0] },
|
|
341
|
+
handler: async (account) => {
|
|
342
|
+
const url = new URL(request.url);
|
|
343
|
+
if (!capability.origins(account.ctx).includes(url.origin)) {
|
|
344
|
+
throw new Error(`${connector.name} takes no requests to ${url.origin}.`);
|
|
345
|
+
}
|
|
346
|
+
const body = request.body;
|
|
347
|
+
const unsigned = new Request(url, {
|
|
348
|
+
method: request.method ?? "GET",
|
|
349
|
+
headers: request.headers,
|
|
350
|
+
body,
|
|
351
|
+
});
|
|
352
|
+
if (!capability.sign) {
|
|
353
|
+
unsigned.headers.set("authorization", `Bearer ${account.ctx.accessToken}`);
|
|
354
|
+
}
|
|
355
|
+
const signed = capability.sign ? await capability.sign(account.ctx, unsigned) : unsigned;
|
|
356
|
+
const res = await pluginFetch(signed.url, {
|
|
357
|
+
method: signed.method,
|
|
358
|
+
headers: signed.headers,
|
|
359
|
+
body,
|
|
360
|
+
signal: request.signal,
|
|
361
|
+
});
|
|
362
|
+
// The service turned the sign-in down: the broker hears of it, as of an action's.
|
|
363
|
+
if (res.status === 401) {
|
|
364
|
+
throw Object.assign(new Error(`${connector.name} refused the sign-in (401).`), {
|
|
365
|
+
status: 401,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
return res;
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
if (!out.ok) {
|
|
372
|
+
throw new Error(out.reason);
|
|
373
|
+
}
|
|
374
|
+
return out.result;
|
|
375
|
+
},
|
|
376
|
+
async scopes(id) {
|
|
377
|
+
const row = await own(id);
|
|
378
|
+
return row ? grantedScopes(row) : [];
|
|
379
|
+
},
|
|
310
380
|
async remove(id) {
|
|
311
381
|
await db
|
|
312
382
|
.delete(schema.spaceConnection)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-- The broker decides wizards, skills and a space's setup too (docs/plans/modular.md, phase 1).
|
|
2
|
+
-- A space that has its rules already gets the seed for the new kinds, once; a space without
|
|
3
|
+
-- rules is seeded whole on its first decision (broker/rwx.ts `seedRwx`).
|
|
4
|
+
INSERT OR IGNORE INTO `rwx_rule` (`id`, `tenant_id`, `space_id`, `subject_kind`, `subject_id`, `resource_kind`, `resource_id`, `r`, `w`, `x`, `created_by`)
|
|
5
|
+
SELECT lower(hex(randomblob(6))), s.`tenant_id`, s.`space_id`, v.subject_kind, v.subject_id, v.resource_kind, '*', v.r, v.w, v.x, 'seed'
|
|
6
|
+
FROM (SELECT `space_id`, min(`tenant_id`) AS `tenant_id` FROM `rwx_rule` GROUP BY `space_id`) AS s
|
|
7
|
+
CROSS JOIN (
|
|
8
|
+
SELECT 'role' AS subject_kind, 'admin' AS subject_id, 'wizard' AS resource_kind, 'allow' AS r, 'allow' AS w, 'allow' AS x
|
|
9
|
+
UNION ALL SELECT 'role', 'owner', 'wizard', 'allow', 'allow', 'allow'
|
|
10
|
+
UNION ALL SELECT 'role', 'member', 'wizard', 'allow', NULL, 'allow'
|
|
11
|
+
UNION ALL SELECT 'role', 'admin', 'skill', 'allow', 'allow', 'allow'
|
|
12
|
+
UNION ALL SELECT 'role', 'owner', 'skill', 'allow', 'allow', 'allow'
|
|
13
|
+
UNION ALL SELECT 'role', 'member', 'skill', 'allow', NULL, 'allow'
|
|
14
|
+
UNION ALL SELECT 'guest', NULL, 'skill', 'allow', NULL, 'allow'
|
|
15
|
+
UNION ALL SELECT 'role', 'admin', 'setup', 'allow', 'allow', 'allow'
|
|
16
|
+
UNION ALL SELECT 'role', 'owner', 'setup', 'allow', 'allow', 'allow'
|
|
17
|
+
UNION ALL SELECT 'role', 'member', 'setup', 'allow', 'allow', NULL
|
|
18
|
+
) AS v
|
|
19
|
+
WHERE NOT EXISTS (
|
|
20
|
+
SELECT 1 FROM `rwx_rule` AS e WHERE e.`space_id` = s.`space_id` AND e.`resource_kind` = v.resource_kind
|
|
21
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE `broker_log` ADD `client` text;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
CREATE TABLE `space_member` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`tenant_id` text NOT NULL,
|
|
4
|
+
`space_id` text NOT NULL,
|
|
5
|
+
`user_id` text NOT NULL,
|
|
6
|
+
`role` text NOT NULL,
|
|
7
|
+
`added_by` text NOT NULL,
|
|
8
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
9
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE UNIQUE INDEX `space_member_key` ON `space_member` (`space_id`,`user_id`);--> statement-breakpoint
|
|
13
|
+
CREATE INDEX `space_member_user` ON `space_member` (`user_id`);--> statement-breakpoint
|
|
14
|
+
ALTER TABLE `space` ADD `kind` text DEFAULT 'space' NOT NULL;--> statement-breakpoint
|
|
15
|
+
ALTER TABLE `space` ADD `parent_id` text REFERENCES space(id);--> statement-breakpoint
|
|
16
|
+
CREATE INDEX `space_parent` ON `space` (`parent_id`);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
2
|
+
CREATE TABLE `__new_space_member` (
|
|
3
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
4
|
+
`tenant_id` text NOT NULL,
|
|
5
|
+
`space_id` text NOT NULL,
|
|
6
|
+
`user_id` text,
|
|
7
|
+
`email` text,
|
|
8
|
+
`role` text NOT NULL,
|
|
9
|
+
`added_by` text NOT NULL,
|
|
10
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
11
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade
|
|
12
|
+
);
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
INSERT INTO `__new_space_member`("id", "tenant_id", "space_id", "user_id", "email", "role", "added_by", "created_at") SELECT "id", "tenant_id", "space_id", "user_id", NULL, "role", "added_by", "created_at" FROM `space_member`;--> statement-breakpoint
|
|
15
|
+
DROP TABLE `space_member`;--> statement-breakpoint
|
|
16
|
+
ALTER TABLE `__new_space_member` RENAME TO `space_member`;--> statement-breakpoint
|
|
17
|
+
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
|
18
|
+
CREATE UNIQUE INDEX `space_member_key` ON `space_member` (`space_id`,`user_id`);--> statement-breakpoint
|
|
19
|
+
CREATE INDEX `space_member_user` ON `space_member` (`user_id`);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
DROP INDEX `space_table_list`;--> statement-breakpoint
|
|
2
|
+
CREATE UNIQUE INDEX `space_table_list` ON `space_table` (`space_id`,`wizard_id`,`list`);--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `run` ADD `client_space_id` text REFERENCES space(id);--> statement-breakpoint
|
|
4
|
+
ALTER TABLE `run` ADD `client_shared_at` integer;--> statement-breakpoint
|
|
5
|
+
CREATE INDEX `run_client_space` ON `run` (`client_space_id`,`created_at`);--> statement-breakpoint
|
|
6
|
+
ALTER TABLE `space` ADD `slug` text;--> statement-breakpoint
|
|
7
|
+
CREATE UNIQUE INDEX `space_slug` ON `space` (`tenant_id`,`slug`);--> statement-breakpoint
|
|
8
|
+
UPDATE `space` SET `slug` = `id` WHERE `kind` = 'client';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
ALTER TABLE `space_file` ADD `parent_id` text REFERENCES space_page(id) ON DELETE set null;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE `space_table` ADD `parent_id` text REFERENCES space_page(id) ON DELETE set null;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `space_table` ADD `position` integer DEFAULT 0 NOT NULL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE `space_chunk` ADD `kind` text;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
CREATE TABLE `space_source` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`tenant_id` text NOT NULL,
|
|
4
|
+
`space_id` text NOT NULL,
|
|
5
|
+
`kind` text NOT NULL,
|
|
6
|
+
`plugin` text NOT NULL,
|
|
7
|
+
`address` text NOT NULL,
|
|
8
|
+
`label` text NOT NULL,
|
|
9
|
+
`state` text NOT NULL,
|
|
10
|
+
`rules` text NOT NULL,
|
|
11
|
+
`categories` text NOT NULL,
|
|
12
|
+
`every_hours` integer,
|
|
13
|
+
`token` text NOT NULL,
|
|
14
|
+
`status` text NOT NULL,
|
|
15
|
+
`error` text,
|
|
16
|
+
`last_run_at` integer,
|
|
17
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
18
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
19
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade
|
|
20
|
+
);
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
CREATE INDEX `space_source_space` ON `space_source` (`space_id`);--> statement-breakpoint
|
|
23
|
+
CREATE UNIQUE INDEX `space_source_token` ON `space_source` (`token`);--> statement-breakpoint
|
|
24
|
+
CREATE TABLE `space_source_entry` (
|
|
25
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
26
|
+
`source_id` text NOT NULL,
|
|
27
|
+
`address` text NOT NULL,
|
|
28
|
+
`title` text,
|
|
29
|
+
`path` text NOT NULL,
|
|
30
|
+
`included` integer NOT NULL,
|
|
31
|
+
`reason` text,
|
|
32
|
+
`decided_by` text,
|
|
33
|
+
`status` text NOT NULL,
|
|
34
|
+
`item_key` text,
|
|
35
|
+
`result` text,
|
|
36
|
+
`note` text,
|
|
37
|
+
`fingerprint` text,
|
|
38
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
39
|
+
FOREIGN KEY (`source_id`) REFERENCES `space_source`(`id`) ON UPDATE no action ON DELETE cascade
|
|
40
|
+
);
|
|
41
|
+
--> statement-breakpoint
|
|
42
|
+
CREATE UNIQUE INDEX `space_source_entry_address` ON `space_source_entry` (`source_id`,`address`);--> statement-breakpoint
|
|
43
|
+
CREATE TABLE `space_source_run` (
|
|
44
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
45
|
+
`source_id` text NOT NULL,
|
|
46
|
+
`started_at` integer NOT NULL,
|
|
47
|
+
`ended_at` integer,
|
|
48
|
+
`status` text NOT NULL,
|
|
49
|
+
`written` integer NOT NULL,
|
|
50
|
+
`unchanged` integer NOT NULL,
|
|
51
|
+
`failed` integer NOT NULL,
|
|
52
|
+
`left_out` integer NOT NULL,
|
|
53
|
+
`log` text NOT NULL,
|
|
54
|
+
FOREIGN KEY (`source_id`) REFERENCES `space_source`(`id`) ON UPDATE no action ON DELETE cascade
|
|
55
|
+
);
|
|
56
|
+
--> statement-breakpoint
|
|
57
|
+
CREATE INDEX `space_source_run_source` ON `space_source_run` (`source_id`,`started_at`);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
CREATE TABLE `space_mount` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`tenant_id` text NOT NULL,
|
|
4
|
+
`space_id` text NOT NULL,
|
|
5
|
+
`name` text NOT NULL,
|
|
6
|
+
`slug` text NOT NULL,
|
|
7
|
+
`kind` text NOT NULL,
|
|
8
|
+
`source` text NOT NULL,
|
|
9
|
+
`status` text DEFAULT 'scanning' NOT NULL,
|
|
10
|
+
`error` text,
|
|
11
|
+
`scanned_at` integer,
|
|
12
|
+
`folder_category_id` text,
|
|
13
|
+
`created_by` text,
|
|
14
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
15
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
16
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
17
|
+
FOREIGN KEY (`folder_category_id`) REFERENCES `space_category`(`id`) ON UPDATE no action ON DELETE set null
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE UNIQUE INDEX `space_mount_slug` ON `space_mount` (`space_id`,`slug`);--> statement-breakpoint
|
|
21
|
+
CREATE TABLE `space_mount_file` (
|
|
22
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
23
|
+
`mount_id` text NOT NULL,
|
|
24
|
+
`space_id` text NOT NULL,
|
|
25
|
+
`path` text NOT NULL,
|
|
26
|
+
`name` text NOT NULL,
|
|
27
|
+
`mime` text NOT NULL,
|
|
28
|
+
`size` integer NOT NULL,
|
|
29
|
+
`modified` integer NOT NULL,
|
|
30
|
+
`hash` text,
|
|
31
|
+
`status` text DEFAULT 'pending' NOT NULL,
|
|
32
|
+
`error` text,
|
|
33
|
+
`pages` integer,
|
|
34
|
+
`thumb` integer DEFAULT false NOT NULL,
|
|
35
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
36
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
37
|
+
FOREIGN KEY (`mount_id`) REFERENCES `space_mount`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
38
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade
|
|
39
|
+
);
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
CREATE UNIQUE INDEX `space_mount_file_path` ON `space_mount_file` (`mount_id`,`path`);--> statement-breakpoint
|
|
42
|
+
CREATE INDEX `space_mount_file_hash` ON `space_mount_file` (`mount_id`,`hash`);--> statement-breakpoint
|
|
43
|
+
CREATE INDEX `space_mount_file_status` ON `space_mount_file` (`mount_id`,`status`);--> statement-breakpoint
|
|
44
|
+
CREATE TABLE `space_mount_unit` (
|
|
45
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
46
|
+
`space_id` text NOT NULL,
|
|
47
|
+
`mount_id` text NOT NULL,
|
|
48
|
+
`file_id` text NOT NULL,
|
|
49
|
+
`idx` integer NOT NULL,
|
|
50
|
+
`heading` text,
|
|
51
|
+
`sheet` integer,
|
|
52
|
+
`start` integer,
|
|
53
|
+
`end` integer,
|
|
54
|
+
`embedding` blob,
|
|
55
|
+
`model` text,
|
|
56
|
+
`kind` text,
|
|
57
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
58
|
+
FOREIGN KEY (`mount_id`) REFERENCES `space_mount`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
59
|
+
FOREIGN KEY (`file_id`) REFERENCES `space_mount_file`(`id`) ON UPDATE no action ON DELETE cascade
|
|
60
|
+
);
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
CREATE INDEX `space_mount_unit_file` ON `space_mount_unit` (`file_id`);--> statement-breakpoint
|
|
63
|
+
CREATE INDEX `space_mount_unit_space` ON `space_mount_unit` (`space_id`,`model`);--> statement-breakpoint
|
|
64
|
+
ALTER TABLE `space_item_category` ADD `mount_file_id` text REFERENCES space_mount_file(id) ON DELETE cascade;--> statement-breakpoint
|
|
65
|
+
CREATE INDEX `space_item_category_mount_file` ON `space_item_category` (`mount_file_id`);--> statement-breakpoint
|
|
66
|
+
CREATE VIRTUAL TABLE `space_mount_unit_fts` USING fts5(`text`, content='', contentless_delete=1, tokenize='unicode61 remove_diacritics 2');--> statement-breakpoint
|
|
67
|
+
CREATE VIRTUAL TABLE `space_mount_unit_tri` USING fts5(`text`, content='', contentless_delete=1, tokenize='trigram remove_diacritics 1');--> statement-breakpoint
|
|
68
|
+
CREATE TRIGGER `space_mount_unit_ad` AFTER DELETE ON `space_mount_unit` BEGIN
|
|
69
|
+
DELETE FROM `space_mount_unit_fts` WHERE rowid = old.id;
|
|
70
|
+
DELETE FROM `space_mount_unit_tri` WHERE rowid = old.id;
|
|
71
|
+
END;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
CREATE TABLE `space_mount_draft` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`space_id` text NOT NULL,
|
|
4
|
+
`mount_id` text NOT NULL,
|
|
5
|
+
`file_id` text NOT NULL,
|
|
6
|
+
`base` text NOT NULL,
|
|
7
|
+
`text` text,
|
|
8
|
+
`base_text` text,
|
|
9
|
+
`blob` text,
|
|
10
|
+
`mime` text,
|
|
11
|
+
`conflict` text,
|
|
12
|
+
`created_by` text,
|
|
13
|
+
`updated_by` text,
|
|
14
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
15
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
16
|
+
FOREIGN KEY (`space_id`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
17
|
+
FOREIGN KEY (`mount_id`) REFERENCES `space_mount`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
18
|
+
FOREIGN KEY (`file_id`) REFERENCES `space_mount_file`(`id`) ON UPDATE no action ON DELETE cascade
|
|
19
|
+
);
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
CREATE UNIQUE INDEX `space_mount_draft_file` ON `space_mount_draft` (`file_id`);--> statement-breakpoint
|
|
22
|
+
CREATE INDEX `space_mount_draft_mount` ON `space_mount_draft` (`mount_id`);--> statement-breakpoint
|
|
23
|
+
ALTER TABLE `space_mount` ADD `writable` integer DEFAULT false NOT NULL;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
ALTER TABLE `space_mount` ADD `plugin` text;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE `space_mount` ADD `location` text;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `space_mount` ADD `cursor` text;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE `space_mount_file` ADD `source_id` text;--> statement-breakpoint
|
|
5
|
+
CREATE INDEX `space_mount_file_source` ON `space_mount_file` (`mount_id`,`source_id`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Scans are read by OCR and old Word files by their text now (docs/plans/document-reading.md):
|
|
2
|
+
-- PDFs indexed without a passage of text and .doc files are read once more.
|
|
3
|
+
UPDATE `space_mount_file` SET `status` = 'pending'
|
|
4
|
+
WHERE `status` IN ('ready', 'failed')
|
|
5
|
+
AND (
|
|
6
|
+
`mime` = 'application/msword'
|
|
7
|
+
OR (
|
|
8
|
+
`mime` = 'application/pdf'
|
|
9
|
+
AND NOT EXISTS (
|
|
10
|
+
SELECT 1 FROM `space_mount_unit` u
|
|
11
|
+
WHERE u.`file_id` = `space_mount_file`.`id` AND u.`kind` IS NULL AND u.`idx` > 0
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
);
|