@engenty/wizards-runtime 0.15.0 → 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 +138 -9
- package/apps/runtime/dist/agents/website.js +10 -5
- package/apps/runtime/dist/app.js +18 -0
- package/apps/runtime/dist/auth/index.js +5 -0
- package/apps/runtime/dist/broker/account.js +5 -0
- package/apps/runtime/dist/broker/index.js +5 -0
- package/apps/runtime/dist/broker/rwx.js +255 -7
- 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/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/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 +98 -0
- package/apps/runtime/dist/db/schema.js +294 -5
- package/apps/runtime/dist/docs/dev/api.md +25 -0
- 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 +5 -3
- package/apps/runtime/dist/elements/gate.js +1 -1
- package/apps/runtime/dist/elements/knowledge.js +181 -12
- package/apps/runtime/dist/elements/specs.js +1 -1
- package/apps/runtime/dist/elements/wizards.js +15 -2
- 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 +6 -0
- 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/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/goose.md +13 -1
- package/apps/runtime/dist/prompts/tools.md +5 -2
- package/apps/runtime/dist/render/convert.js +188 -1
- package/apps/runtime/dist/routes/api.js +6 -1
- 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 +2 -2
- 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 +29 -8
- package/apps/runtime/dist/services/work-chats.js +3 -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/pages.js +1 -1
- 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-Do7pwmFv.js → ChangelogDialog-CDN7kMs1.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-Cdox-51M.js → CodeEditor-D-Y16fdk.js} +1 -1
- package/apps/web/dist/assets/EditorPage-CrMVsgUt.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-BPS86xzA.js → FlowPreview-DXnk7m9P.js} +1 -1
- package/apps/web/dist/assets/{LangSwitch-BRHbi_Sd.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-PKHX8a8a.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-BoPaPsjN.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-7_FOHoEl.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 +3 -0
- package/node_modules/@engenty/wizards-shared/dist/run.js +6 -0
- package/node_modules/@engenty/wizards-shared/dist/rwx.d.ts +21 -4
- package/node_modules/@engenty/wizards-shared/dist/rwx.js +27 -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/plugin.json +1 -1
- package/apps/web/dist/assets/AboutDialog-DaWEIHFN.js +0 -1
- package/apps/web/dist/assets/CapabilitiesPage-Dt91U_sK.js +0 -2
- package/apps/web/dist/assets/EditorPage-DS_a5K3s.js +0 -3
- package/apps/web/dist/assets/Marketplace-CS7JTgiv.js +0 -2
- package/apps/web/dist/assets/NewWizardChannels-D-OLsex6.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-BM_pkk41.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-Cpn5pubC.js +0 -1
- package/apps/web/dist/assets/PreviewPane-BOk1-yO4.js +0 -9
- package/apps/web/dist/assets/PublicRunner-CgzMZb0r.js +0 -1
- package/apps/web/dist/assets/ReadOnly-8DEx-ly3.js +0 -1
- package/apps/web/dist/assets/SettingsPage-CcrknFcI.js +0 -2
- package/apps/web/dist/assets/SetupPage-D5nzjgPU.js +0 -1
- package/apps/web/dist/assets/SkillEditor-BsXTqNli.js +0 -1
- package/apps/web/dist/assets/Skills-C_X1ZsKg.js +0 -9
- package/apps/web/dist/assets/SpacePage-wZGqUoSQ.js +0 -2
- package/apps/web/dist/assets/UpdateCheck-D6x7MqEl.js +0 -2
- package/apps/web/dist/assets/changelog-M-eOBqgu.js +0 -1
- package/apps/web/dist/assets/circle-alert-DJbCyxcg.js +0 -1
- package/apps/web/dist/assets/circle-check-jqtsKi_b.js +0 -1
- package/apps/web/dist/assets/code-editor-BpCEnf8H.js +0 -2
- package/apps/web/dist/assets/code-xml-q88cSTV8.js +0 -1
- package/apps/web/dist/assets/connection-sign-in-UJ6xk-TD.js +0 -1
- package/apps/web/dist/assets/dist-EBVTpvRr.js +0 -10
- package/apps/web/dist/assets/eye-CgkvVlba.js +0 -1
- package/apps/web/dist/assets/host-Bd_bon_c.js +0 -118
- package/apps/web/dist/assets/i18n-0fUKyVRE.js +0 -55
- package/apps/web/dist/assets/index-D18DvnxX.css +0 -1
- package/apps/web/dist/assets/index-DOgwxnto.js +0 -10
- package/apps/web/dist/assets/oss-credits-IdX5bc71.js +0 -1
- package/apps/web/dist/assets/phone-CjPvZ0nk.js +0 -1
- package/apps/web/dist/assets/read-aloud-CLXo_asN.js +0 -1
- package/apps/web/dist/assets/scroll-text-2BhJO_W7.js +0 -1
- package/apps/web/dist/assets/session-CpYa5hwd.js +0 -2
- package/apps/web/dist/assets/theme-Bj3wNQR0.js +0 -11
- package/apps/web/dist/assets/ui-CktezodE.js +0 -82
- package/apps/web/dist/assets/upload-CHGCFVZK.js +0 -1
- package/apps/web/dist/assets/volume-2-Bw5KASy8.js +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
2
2
|
import type { z } from "zod";
|
|
3
|
+
import type { PluginMountKind, PluginMounts } from "./mount.js";
|
|
4
|
+
export type { PluginMount, PluginMountChanges, PluginMountEntry, PluginMountKind, PluginMountReader, PluginMounts, } from "./mount.js";
|
|
3
5
|
/**
|
|
4
6
|
* What the runtime hands a plugin's server half. A plugin is a file or a folder the runtime finds
|
|
5
7
|
* at start (docs/content/dev/plugins); its default export is a factory that registers what it adds. The
|
|
@@ -134,7 +136,7 @@ export interface PluginSpaceFileEvent {
|
|
|
134
136
|
file: {
|
|
135
137
|
id: string;
|
|
136
138
|
name: string;
|
|
137
|
-
kind: "logo" | "asset" | "document" | "pattern";
|
|
139
|
+
kind: "logo" | "asset" | "document" | "pattern" | "picture";
|
|
138
140
|
mime: string;
|
|
139
141
|
};
|
|
140
142
|
}
|
|
@@ -277,6 +279,16 @@ export interface PluginPageInput {
|
|
|
277
279
|
fill?: boolean;
|
|
278
280
|
/** Why a person should look at it ("hardly readable"); shown in Knowledge. */
|
|
279
281
|
review?: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* The pictures the page shows, as `web.read` gives them (`images`): the space keeps a copy of
|
|
284
|
+
* each and the Markdown shows the copy (``), so a wizard finds it by what it
|
|
285
|
+
* shows and puts it into what it makes. At most 30, 8 MB each; icons and pictures under 10 KB
|
|
286
|
+
* or 200 px are left as they are. One the Markdown doesn't show is added at its end.
|
|
287
|
+
*/
|
|
288
|
+
images?: {
|
|
289
|
+
url: string;
|
|
290
|
+
alt?: string;
|
|
291
|
+
}[];
|
|
280
292
|
}
|
|
281
293
|
export interface PluginTableInput {
|
|
282
294
|
space: string;
|
|
@@ -352,7 +364,7 @@ export interface PluginSpaceFile {
|
|
|
352
364
|
name: string;
|
|
353
365
|
mime: string;
|
|
354
366
|
size: number;
|
|
355
|
-
kind: "logo" | "asset" | "document" | "pattern";
|
|
367
|
+
kind: "logo" | "asset" | "document" | "pattern" | "picture";
|
|
356
368
|
updatedAt: string;
|
|
357
369
|
}
|
|
358
370
|
/** What a plugin wrote into a space. */
|
|
@@ -411,7 +423,7 @@ export interface PluginSpaceData {
|
|
|
411
423
|
parent?: string;
|
|
412
424
|
}): Promise<PluginSpacePage[]>;
|
|
413
425
|
/** The space's files of a kind (`document` when left out), newest first. */
|
|
414
|
-
files(space: string, kind?: "logo" | "asset" | "document" | "pattern"): Promise<PluginSpaceFile[]>;
|
|
426
|
+
files(space: string, kind?: "logo" | "asset" | "document" | "pattern" | "picture"): Promise<PluginSpaceFile[]>;
|
|
415
427
|
/** One file of the space with its bytes: a price list someone dropped into Knowledge. */
|
|
416
428
|
readFile(space: string, fileId: string): Promise<PluginSpaceFile & {
|
|
417
429
|
data: Uint8Array;
|
|
@@ -424,6 +436,161 @@ export interface PluginSpaceData {
|
|
|
424
436
|
*/
|
|
425
437
|
summarize(space: string, category?: string, value?: string): Promise<number>;
|
|
426
438
|
}
|
|
439
|
+
/** An entry left out by its address: `pattern` is a part of it, `*` stands for anything. */
|
|
440
|
+
export interface PluginSourceRule {
|
|
441
|
+
pattern: string;
|
|
442
|
+
reason: string;
|
|
443
|
+
}
|
|
444
|
+
/** A source of Knowledge, as its reader is handed it. */
|
|
445
|
+
export interface PluginSourceInfo {
|
|
446
|
+
id: string;
|
|
447
|
+
space: string;
|
|
448
|
+
kind: string;
|
|
449
|
+
/** What the source was named by: the website's address, the sitemap's. */
|
|
450
|
+
address: string;
|
|
451
|
+
label: string;
|
|
452
|
+
rules: PluginSourceRule[];
|
|
453
|
+
}
|
|
454
|
+
/** One entry a source holds, before anything is read of it. */
|
|
455
|
+
export interface PluginSourceFound {
|
|
456
|
+
address: string;
|
|
457
|
+
title?: string | null;
|
|
458
|
+
/** What says whether it changed (a sitemap's lastmod, an ETag): the same again is not read. */
|
|
459
|
+
fingerprint?: string | null;
|
|
460
|
+
/**
|
|
461
|
+
* Where it stands below the source's folder, the folders' names outermost first: a website's
|
|
462
|
+
* paths. Left out: in the source's folder. An entry whose path is another's folder is that
|
|
463
|
+
* folder's text.
|
|
464
|
+
*/
|
|
465
|
+
path?: string[];
|
|
466
|
+
}
|
|
467
|
+
/** An entry of a source, as `read` is handed it. */
|
|
468
|
+
export interface PluginSourceEntry {
|
|
469
|
+
id: string;
|
|
470
|
+
address: string;
|
|
471
|
+
title: string | null;
|
|
472
|
+
/** What the entry was last read with: for asking whether it changed (`if-none-match`). */
|
|
473
|
+
fingerprint: string | null;
|
|
474
|
+
/** What `list` said this time; null for a source of addresses added by hand. */
|
|
475
|
+
found: PluginSourceFound | null;
|
|
476
|
+
}
|
|
477
|
+
/** What an entry is now: a page, a document read as an upload is, or nothing new. */
|
|
478
|
+
export type PluginSourceRead = {
|
|
479
|
+
kind: "unchanged";
|
|
480
|
+
} | {
|
|
481
|
+
kind: "page";
|
|
482
|
+
title: string;
|
|
483
|
+
markdown: string;
|
|
484
|
+
/** The pictures it shows, as `web.read` gives them: the space keeps copies (`putPage` `images`). */
|
|
485
|
+
images?: {
|
|
486
|
+
url: string;
|
|
487
|
+
alt?: string;
|
|
488
|
+
}[];
|
|
489
|
+
/** Without one the page's text is its fingerprint. */
|
|
490
|
+
fingerprint?: string | null;
|
|
491
|
+
/**
|
|
492
|
+
* It is the text of a folder, as a README is: with an empty path the source's own folder's.
|
|
493
|
+
* An entry whose path is a folder of others is that folder's text without it.
|
|
494
|
+
*/
|
|
495
|
+
folder?: boolean;
|
|
496
|
+
} | {
|
|
497
|
+
kind: "document";
|
|
498
|
+
name: string;
|
|
499
|
+
mime: string;
|
|
500
|
+
data: Uint8Array;
|
|
501
|
+
fingerprint?: string | null;
|
|
502
|
+
}
|
|
503
|
+
/** Read, but nothing for Knowledge in it: "Die Seite hat kaum Text." */
|
|
504
|
+
| {
|
|
505
|
+
kind: "failed";
|
|
506
|
+
note: string;
|
|
507
|
+
fingerprint?: string | null;
|
|
508
|
+
};
|
|
509
|
+
/** What a model proposes for a new source, from its list and a sample. */
|
|
510
|
+
export interface PluginSourceProposal {
|
|
511
|
+
/** What a person would call it: "Förderprogramme SFG". */
|
|
512
|
+
label?: string;
|
|
513
|
+
/** Kategorien that keep its entries apart; put into the space when it is taken. */
|
|
514
|
+
categories?: PluginCategory[];
|
|
515
|
+
/** Entries that do not belong, by address, each with why. */
|
|
516
|
+
leaveOut?: {
|
|
517
|
+
address: string;
|
|
518
|
+
reason: string;
|
|
519
|
+
}[];
|
|
520
|
+
}
|
|
521
|
+
/** What a reader's calls are handed besides the source. */
|
|
522
|
+
export interface PluginSourceContext {
|
|
523
|
+
signal: AbortSignal;
|
|
524
|
+
/** Tells the person what it is doing right now: "Liest die Sitemap …". */
|
|
525
|
+
emit(message: string): void;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* How a kind of source is read: the core keeps its rows, its runs and its folder, and asks the
|
|
529
|
+
* reader what the source holds and what each entry is now.
|
|
530
|
+
*/
|
|
531
|
+
export interface PluginKnowledgeReader {
|
|
532
|
+
/** What the source holds now; at most 1000 entries are kept. */
|
|
533
|
+
list(source: PluginSourceInfo, ctx: PluginSourceContext): Promise<PluginSourceFound[]>;
|
|
534
|
+
/** One entry, unless it did not change since `entry.fingerprint`. */
|
|
535
|
+
read(source: PluginSourceInfo, entry: PluginSourceEntry, ctx: PluginSourceContext): Promise<PluginSourceRead>;
|
|
536
|
+
/**
|
|
537
|
+
* After the first list, before anything is written: a name, Kategorien and entries to leave
|
|
538
|
+
* out, usually by a model that reads a sample. Throwing leaves the proposal as it is.
|
|
539
|
+
*/
|
|
540
|
+
propose?(source: PluginSourceInfo, entries: {
|
|
541
|
+
address: string;
|
|
542
|
+
title: string | null;
|
|
543
|
+
included: boolean;
|
|
544
|
+
reason: string | null;
|
|
545
|
+
}[], ctx: PluginSourceContext): Promise<PluginSourceProposal>;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* A kind of source of Knowledge (`registerKnowledgeSource`): a website, a sitemap, a list of
|
|
549
|
+
* addresses. Each source of it fills a folder of its own, owns what it wrote there and keeps it
|
|
550
|
+
* current; the studio half registers the same kind with its label, icon and form.
|
|
551
|
+
*/
|
|
552
|
+
export interface PluginKnowledgeSource {
|
|
553
|
+
/** Lower case, digits and `-`, unique on the runtime: `website`. */
|
|
554
|
+
kind: string;
|
|
555
|
+
/**
|
|
556
|
+
* Whether what a person names is a source of this kind, and its address as kept (with
|
|
557
|
+
* `https://` in front, say); null when it is not. A kind without one is picked only by name.
|
|
558
|
+
*/
|
|
559
|
+
match?(address: string): string | null;
|
|
560
|
+
/** The entries left out by their address before anyone looked: Impressum, Datenschutz. */
|
|
561
|
+
rules?: PluginSourceRule[];
|
|
562
|
+
/** How often it is read again, in hours; null or left out: only when asked. */
|
|
563
|
+
everyHours?: number | null;
|
|
564
|
+
/** Its entries are added by hand (`addEntries`), never listed. */
|
|
565
|
+
manual?: boolean;
|
|
566
|
+
/** A model fills the space's Kategorien on what each entry becomes. */
|
|
567
|
+
fill?: boolean;
|
|
568
|
+
reader: PluginKnowledgeReader;
|
|
569
|
+
}
|
|
570
|
+
/** A source of the space's Knowledge, as the core keeps it. */
|
|
571
|
+
export interface PluginSourceView extends PluginSourceInfo {
|
|
572
|
+
plugin: string;
|
|
573
|
+
state: "proposed" | "taken";
|
|
574
|
+
everyHours: number | null;
|
|
575
|
+
/** What a signal address names the source by. */
|
|
576
|
+
token: string;
|
|
577
|
+
status: "idle" | "running" | "failed";
|
|
578
|
+
error: string | null;
|
|
579
|
+
lastRunAt: string | null;
|
|
580
|
+
/** The page that is its folder in Knowledge; null before it is taken. */
|
|
581
|
+
folderId: string | null;
|
|
582
|
+
}
|
|
583
|
+
/** The sources of the tenant's Knowledge, for a kind's own routes and jobs. */
|
|
584
|
+
export interface PluginKnowledgeSources {
|
|
585
|
+
/** The sources of the plugin's kinds, of one space or of every space. */
|
|
586
|
+
list(space?: string): Promise<PluginSourceView[]>;
|
|
587
|
+
/** The source a signal address names; null when there is none. */
|
|
588
|
+
byToken(token: string): Promise<PluginSourceView | null>;
|
|
589
|
+
/** Reads it now, in the background; nothing when it runs already or is not taken. */
|
|
590
|
+
run(id: string): Promise<void>;
|
|
591
|
+
/** Adds addresses to a source of a `manual` kind and reads them. */
|
|
592
|
+
addEntries(id: string, addresses: string[]): Promise<void>;
|
|
593
|
+
}
|
|
427
594
|
/** What a tool of the space assistant knows about the turn that calls it. */
|
|
428
595
|
export interface PluginAssistantContext {
|
|
429
596
|
tenantId: string;
|
|
@@ -476,8 +643,23 @@ export interface PluginWebPage {
|
|
|
476
643
|
lastModified: string | null;
|
|
477
644
|
title: string;
|
|
478
645
|
description: string;
|
|
479
|
-
/** The page's text as Markdown. */
|
|
646
|
+
/** The page's whole text as Markdown, menus and footer included. */
|
|
480
647
|
text: string;
|
|
648
|
+
/**
|
|
649
|
+
* The page's content as Markdown: its main part, without the site's navigation, header and
|
|
650
|
+
* footer, asides, forms, hidden menus, skip links and cookie notices. What a page is about.
|
|
651
|
+
*/
|
|
652
|
+
content: string;
|
|
653
|
+
/**
|
|
654
|
+
* The pictures `content` shows, each once, in their order: absolute, the largest `srcset`
|
|
655
|
+
* entry up to 2000 px, without icons, sprites, drawings (SVG) and pictures drawn under 200 px.
|
|
656
|
+
* `text` and `content` show them at these same addresses: `spaceData.putPage` takes them as
|
|
657
|
+
* `images` and the space keeps copies.
|
|
658
|
+
*/
|
|
659
|
+
images: {
|
|
660
|
+
url: string;
|
|
661
|
+
alt: string;
|
|
662
|
+
}[];
|
|
481
663
|
/** Every link of the page, absolute, each once. */
|
|
482
664
|
links: {
|
|
483
665
|
url: string;
|
|
@@ -652,6 +834,11 @@ export interface PluginConnections {
|
|
|
652
834
|
space: string;
|
|
653
835
|
connector: string;
|
|
654
836
|
actions: string[];
|
|
837
|
+
/**
|
|
838
|
+
* Rights at the provider beyond what the actions need, for `request`: Drive's `drive` to
|
|
839
|
+
* write a mounted folder, Microsoft's `Files.Read.All` to read a SharePoint library.
|
|
840
|
+
*/
|
|
841
|
+
scopes?: string[];
|
|
655
842
|
lang?: "de" | "en";
|
|
656
843
|
}): Promise<{
|
|
657
844
|
url: string;
|
|
@@ -678,6 +865,24 @@ export interface PluginConnections {
|
|
|
678
865
|
* disconnected there: connect again).
|
|
679
866
|
*/
|
|
680
867
|
call<T = unknown>(connectionId: string, action: string, input: Record<string, unknown>): Promise<T>;
|
|
868
|
+
/**
|
|
869
|
+
* Sends a request of the plugin's own to the connector's service as the connection's account:
|
|
870
|
+
* signed in (a bearer token, renewed where it ran out) or signed with its keys (a bucket's).
|
|
871
|
+
* Only to the service's own addresses (a bucket's: the endpoint its keys name), and only for a
|
|
872
|
+
* connector that takes requests (Google Drive, OneDrive, S3). The local network is reached on a
|
|
873
|
+
* local install only, as `connect` checks keys there. `kind` says what it does there, for the
|
|
874
|
+
* connection's rules and its log. The answer comes back as it is, whatever its status.
|
|
875
|
+
*/
|
|
876
|
+
request(connectionId: string, request: {
|
|
877
|
+
url: string;
|
|
878
|
+
method?: string;
|
|
879
|
+
headers?: Record<string, string>;
|
|
880
|
+
body?: Uint8Array | string;
|
|
881
|
+
kind?: "read" | "write" | "destructive";
|
|
882
|
+
signal?: AbortSignal;
|
|
883
|
+
}): Promise<Response>;
|
|
884
|
+
/** The rights the provider granted the connection: what `start` asked for, as it answered. */
|
|
885
|
+
scopes(connectionId: string): Promise<string[]>;
|
|
681
886
|
/** Forgets the connection and its tokens. */
|
|
682
887
|
remove(connectionId: string): Promise<void>;
|
|
683
888
|
}
|
|
@@ -1100,6 +1305,20 @@ export interface PluginServerApi {
|
|
|
1100
1305
|
index: PluginIndex;
|
|
1101
1306
|
/** Knowledge of a space: pages, tables and files the plugin writes, with their categories. */
|
|
1102
1307
|
spaceData: PluginSpaceData;
|
|
1308
|
+
/**
|
|
1309
|
+
* A kind of source of Knowledge: its sources show in Knowledge's „Hinzufügen“ and in the space
|
|
1310
|
+
* assistant's proposals, each fills a folder of its own and is read again on its schedule.
|
|
1311
|
+
*/
|
|
1312
|
+
registerKnowledgeSource(source: PluginKnowledgeSource): void;
|
|
1313
|
+
/** The sources of the plugin's kinds. */
|
|
1314
|
+
knowledgeSources: PluginKnowledgeSources;
|
|
1315
|
+
/**
|
|
1316
|
+
* A kind of mount of Dateien: a bucket, a drive's folder. Its mounts show in Dateien, are
|
|
1317
|
+
* indexed where they live and found by the space's search. Behind the `dateien` switch.
|
|
1318
|
+
*/
|
|
1319
|
+
registerMountKind(kind: PluginMountKind): void;
|
|
1320
|
+
/** The mounts of the plugin's kinds. */
|
|
1321
|
+
mounts: PluginMounts;
|
|
1103
1322
|
spaces: {
|
|
1104
1323
|
/** The space's brand, of the current tenant; null for a space it does not have. */
|
|
1105
1324
|
brand(space: string): Promise<PluginBrand | null>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A file tree another party owns, as Dateien reads it (docs/plans/media-and-files.md, section
|
|
3
|
+
* 3): a folder on this computer, a bucket, a drive's folder. Every mount implements this one
|
|
4
|
+
* reader. The runtime lists the tree, follows its changes, reads a file when it indexes, opens or
|
|
5
|
+
* hands it to a step, and writes only where the mount allows it; it keeps no copy of the bytes.
|
|
6
|
+
*/
|
|
7
|
+
/** A file of a mount, as its source tells it. Folders are no entries: the paths say them. */
|
|
8
|
+
export interface PluginMountEntry {
|
|
9
|
+
/** Its path in the mount, with `/` and without a leading one: `Kunden/A1/angebot.pdf`. */
|
|
10
|
+
path: string;
|
|
11
|
+
size: number;
|
|
12
|
+
/** When it last changed, in milliseconds. */
|
|
13
|
+
modified: number;
|
|
14
|
+
/** Its type where the source says it; else the runtime goes by the name. */
|
|
15
|
+
mime?: string;
|
|
16
|
+
/**
|
|
17
|
+
* What the source changes with the bytes, where it has one: an ETag, Drive's `md5Checksum`,
|
|
18
|
+
* OneDrive's `cTag`. Null: size and time say it (a folder on a computer), and the runtime
|
|
19
|
+
* hashes the bytes where those changed.
|
|
20
|
+
*/
|
|
21
|
+
version: string | null;
|
|
22
|
+
/** The source's own id where it keeps one across a move (Drive, OneDrive): the row follows it. */
|
|
23
|
+
id?: string;
|
|
24
|
+
}
|
|
25
|
+
/** What changed since a cursor. */
|
|
26
|
+
export interface PluginMountChanges {
|
|
27
|
+
/** Files new or changed. */
|
|
28
|
+
changed: PluginMountEntry[];
|
|
29
|
+
/** Paths gone; a folder's path stands for everything under it. */
|
|
30
|
+
gone: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Files gone by the source's own id (`PluginMountEntry.id`), where the source tells only that:
|
|
33
|
+
* a file deleted on a drive, or moved out of the mounted folder.
|
|
34
|
+
*/
|
|
35
|
+
goneIds?: string[];
|
|
36
|
+
/** What to ask from next time. */
|
|
37
|
+
cursor: string;
|
|
38
|
+
/** The source can't say what changed since that cursor: the runtime lists the whole tree. */
|
|
39
|
+
relist?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface PluginMountReader {
|
|
42
|
+
/** Every file under `path`, or in the whole tree, in no particular order. */
|
|
43
|
+
list(path?: string, opts?: {
|
|
44
|
+
signal?: AbortSignal;
|
|
45
|
+
}): AsyncIterable<PluginMountEntry>;
|
|
46
|
+
/** What changed since `cursor`. Null asks where to start: no changes, and the cursor. */
|
|
47
|
+
changes(cursor: string | null): Promise<PluginMountChanges>;
|
|
48
|
+
/** The file's bytes. `id`: the source's id of it, where the runtime knows it from the listing. */
|
|
49
|
+
read(path: string, opts?: {
|
|
50
|
+
signal?: AbortSignal;
|
|
51
|
+
id?: string;
|
|
52
|
+
}): Promise<Uint8Array>;
|
|
53
|
+
/** The file as it is now, or null where there is none. */
|
|
54
|
+
stat(path: string, opts?: {
|
|
55
|
+
id?: string;
|
|
56
|
+
}): Promise<PluginMountEntry | null>;
|
|
57
|
+
/**
|
|
58
|
+
* Writes the file, where the mount allows writing. `expected` is the entry it was read as:
|
|
59
|
+
* changed at the source since, the write is refused with an error whose `code` is `conflict`.
|
|
60
|
+
* Null writes a new file and is refused where one stands.
|
|
61
|
+
*/
|
|
62
|
+
write(path: string, data: Uint8Array, expected: PluginMountEntry | null): Promise<PluginMountEntry>;
|
|
63
|
+
/**
|
|
64
|
+
* Where the source tells of changes: calls `changed` soon after one, and the runtime asks
|
|
65
|
+
* `changes`. Gives what stops it. Without it the runtime asks on its own, hourly.
|
|
66
|
+
*/
|
|
67
|
+
watch?(changed: () => void): () => void;
|
|
68
|
+
/** Lets go of what it holds: a watcher, a connection. */
|
|
69
|
+
close?(): void;
|
|
70
|
+
}
|
|
71
|
+
/** A mount of a plugin's kind, as its reader is opened for it. */
|
|
72
|
+
export interface PluginMount {
|
|
73
|
+
id: string;
|
|
74
|
+
space: string;
|
|
75
|
+
name: string;
|
|
76
|
+
/** What the kind's `prepare` kept: a connection, a bucket, a folder's id. */
|
|
77
|
+
source: Record<string, unknown>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A kind of mount a plugin brings (`registerMountKind`): a bucket, a drive's folder. The studio
|
|
81
|
+
* half registers the same `kind` with its label and the form that connects the account and
|
|
82
|
+
* picks the folder. Its mounts are listed, indexed, searched and opened as the computer's folders
|
|
83
|
+
* are; everything they read goes through the kind's reader.
|
|
84
|
+
*/
|
|
85
|
+
export interface PluginMountKind {
|
|
86
|
+
/** Lower case, digits and `-`, unique on the runtime: `s3`. */
|
|
87
|
+
kind: string;
|
|
88
|
+
/**
|
|
89
|
+
* What the studio's form gave, checked before the mount is made: the source to keep (no
|
|
90
|
+
* secret in plain text: seal it), the mount's name, and where it lives, in one line for the
|
|
91
|
+
* studio (`s3://fotos/produkte/`). Throws, with the reason as its message, where it can't be
|
|
92
|
+
* reached.
|
|
93
|
+
*/
|
|
94
|
+
prepare(input: {
|
|
95
|
+
space: string;
|
|
96
|
+
source: Record<string, unknown>;
|
|
97
|
+
}): Promise<{
|
|
98
|
+
source: Record<string, unknown>;
|
|
99
|
+
name: string;
|
|
100
|
+
where: string;
|
|
101
|
+
}>;
|
|
102
|
+
/** The reader of a mount of this kind. */
|
|
103
|
+
open(mount: PluginMount): PluginMountReader;
|
|
104
|
+
/**
|
|
105
|
+
* How often the runtime asks `changes` where the reader can't `watch`, in hours. Default 1.
|
|
106
|
+
* A kind whose `changes` lists everything again (a bucket) asks less often.
|
|
107
|
+
*/
|
|
108
|
+
everyHours?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the mount's account may write where it is mounted. False: the studio connects it
|
|
111
|
+
* again, with the rights to write, before writing is turned on.
|
|
112
|
+
*/
|
|
113
|
+
canWrite?(mount: PluginMount): Promise<boolean>;
|
|
114
|
+
}
|
|
115
|
+
/** The mounts of the plugin's kinds, for its own routes and jobs. */
|
|
116
|
+
export interface PluginMounts {
|
|
117
|
+
/** The mounts of the plugin's kinds, of one space or of every space. */
|
|
118
|
+
list(space?: string): Promise<(PluginMount & {
|
|
119
|
+
kind: string;
|
|
120
|
+
})[]>;
|
|
121
|
+
/** The source told of a change (a signal address, a webhook): the runtime asks `changes` now. */
|
|
122
|
+
changed(id: string): Promise<void>;
|
|
123
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A file tree another party owns, as Dateien reads it (docs/plans/media-and-files.md, section
|
|
3
|
+
* 3): a folder on this computer, a bucket, a drive's folder. Every mount implements this one
|
|
4
|
+
* reader. The runtime lists the tree, follows its changes, reads a file when it indexes, opens or
|
|
5
|
+
* hands it to a step, and writes only where the mount allows it; it keeps no copy of the bytes.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -41,7 +41,7 @@ export interface StudioSettingsSection {
|
|
|
41
41
|
* (its public page at `<organization>.wizards.page/<slug>`), `results` (what its runs produced) and
|
|
42
42
|
* `skills` (instructions its wizards follow, behind the `skills` switch).
|
|
43
43
|
*/
|
|
44
|
-
export type StudioSpaceGroup = "info" | "brand" | "knowledge" | "data" | "page" | "results" | "skills";
|
|
44
|
+
export type StudioSpaceGroup = "info" | "brand" | "knowledge" | "data" | "files" | "page" | "results" | "skills" | "clients";
|
|
45
45
|
/**
|
|
46
46
|
* A section of the space page, in one of its parts, below the part's own sections. The studio
|
|
47
47
|
* draws its heading and hint above it, and its entry in the part's menu under the plugin's name;
|
|
@@ -56,6 +56,27 @@ export interface StudioSpaceSection {
|
|
|
56
56
|
/** One line under the heading: what the section is for. */
|
|
57
57
|
hint?: () => string;
|
|
58
58
|
component: ComponentType;
|
|
59
|
+
/**
|
|
60
|
+
* What the section is busy with, drawn on Knowledge's overview above its items: a run in
|
|
61
|
+
* progress, say. It draws nothing while there is nothing to say. Knowledge only.
|
|
62
|
+
*/
|
|
63
|
+
status?: ComponentType;
|
|
64
|
+
/** Its row's icon in the part's menu; a puzzle piece when left out. */
|
|
65
|
+
icon?: Icon;
|
|
66
|
+
/**
|
|
67
|
+
* `false`: its row in the part's menu stands among the part's own, without the plugin's name
|
|
68
|
+
* above it.
|
|
69
|
+
*/
|
|
70
|
+
grouped?: false;
|
|
71
|
+
/**
|
|
72
|
+
* An entry of Knowledge's „Hinzufügen“ that opens the section: what the plugin brings in
|
|
73
|
+
* („Website oder Sitemap“). Knowledge only, behind the studio's `knowledgeTree` switch.
|
|
74
|
+
*/
|
|
75
|
+
add?: {
|
|
76
|
+
label: () => string;
|
|
77
|
+
hint?: () => string;
|
|
78
|
+
icon?: Icon;
|
|
79
|
+
};
|
|
59
80
|
}
|
|
60
81
|
/**
|
|
61
82
|
* A part of the space page of the plugin's own, beside Info, Brand, Knowledge, Data and
|
|
@@ -144,6 +165,90 @@ export interface StudioShareSetup {
|
|
|
144
165
|
*/
|
|
145
166
|
notice?: ComponentType<StudioShareNoticeProps>;
|
|
146
167
|
}
|
|
168
|
+
/** What a kind's form in Knowledge's „Hinzufügen“ is handed. */
|
|
169
|
+
export interface StudioKnowledgeSourceFormProps {
|
|
170
|
+
/**
|
|
171
|
+
* Proposes the source: the core lists what it holds and shows the proposal to take. Rejects
|
|
172
|
+
* with the reason when it cannot be read.
|
|
173
|
+
*/
|
|
174
|
+
propose(input: {
|
|
175
|
+
address: string;
|
|
176
|
+
label?: string;
|
|
177
|
+
}): Promise<void>;
|
|
178
|
+
busy: boolean;
|
|
179
|
+
/** Why the last proposal failed, in the person's language; null when it did not. */
|
|
180
|
+
error: string | null;
|
|
181
|
+
}
|
|
182
|
+
/** What a kind's own settings in a source's „Quelle“ are handed. */
|
|
183
|
+
export interface StudioKnowledgeSourceSettingsProps {
|
|
184
|
+
source: {
|
|
185
|
+
id: string;
|
|
186
|
+
kind: string;
|
|
187
|
+
address: string;
|
|
188
|
+
label: string;
|
|
189
|
+
token: string;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* A kind of source of Knowledge, as the studio offers it: an entry in Knowledge's „Hinzufügen“
|
|
194
|
+
* that opens a dialog, and the same kind in the assistant's proposals. The server half registers
|
|
195
|
+
* the same `kind` with its reader (`server.registerKnowledgeSource`). Behind the studio's
|
|
196
|
+
* `knowledgeTree` switch.
|
|
197
|
+
*/
|
|
198
|
+
export interface StudioKnowledgeSource {
|
|
199
|
+
kind: string;
|
|
200
|
+
/** „Website“: a function, the language can change while the studio is open. */
|
|
201
|
+
label: () => string;
|
|
202
|
+
/** What it takes, one line: „Eine Seite und alles darunter“. */
|
|
203
|
+
hint?: () => string;
|
|
204
|
+
/** Its entry's icon, and the mark of its sources' folders. */
|
|
205
|
+
icon: Icon;
|
|
206
|
+
/** What the dialog asks before it proposes; one field for the address when left out. */
|
|
207
|
+
form?: ComponentType<StudioKnowledgeSourceFormProps>;
|
|
208
|
+
/** The field's placeholder where there is no `form`: „sfg.at/foerderungen/“. */
|
|
209
|
+
placeholder?: () => string;
|
|
210
|
+
/** The kind's own part of a source's settings (⋯ › Quelle): a signal address, say. */
|
|
211
|
+
settings?: ComponentType<StudioKnowledgeSourceSettingsProps>;
|
|
212
|
+
}
|
|
213
|
+
/** What a mount kind's form in Dateien's „Einbinden“ is handed. */
|
|
214
|
+
export interface StudioMountFormProps {
|
|
215
|
+
/** The space the mount goes into. */
|
|
216
|
+
space: string;
|
|
217
|
+
/**
|
|
218
|
+
* What the person chose: the source for the server half's `prepare` (a connection, a folder's
|
|
219
|
+
* id) and the name proposed. The dialog goes on to who sees it and mounts it. Null: not ready.
|
|
220
|
+
*/
|
|
221
|
+
onChange(chosen: {
|
|
222
|
+
source: Record<string, unknown>;
|
|
223
|
+
name: string;
|
|
224
|
+
} | null): void;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A kind of mount of Dateien, as the studio offers it: a choice in „Einbinden“ with the form
|
|
228
|
+
* that connects the account and picks the folder, and how its mounts are marked in Dateien's
|
|
229
|
+
* menu. The server half registers the same `kind` with its reader (`server.registerMountKind`).
|
|
230
|
+
* Behind the studio's `dateien` switch.
|
|
231
|
+
*/
|
|
232
|
+
export interface StudioMountKind {
|
|
233
|
+
kind: string;
|
|
234
|
+
/** „S3-Bucket“: a function, the language can change while the studio is open. */
|
|
235
|
+
label: () => string;
|
|
236
|
+
/** What it takes, one line: „Ein Ordner aus Google Drive“. */
|
|
237
|
+
hint?: () => string;
|
|
238
|
+
/** Its choice's icon, and the mark of its mounts in the menu. */
|
|
239
|
+
icon: Icon;
|
|
240
|
+
/** Where its mounts live, beside their name in the menu: „Google Drive“. */
|
|
241
|
+
place: () => string;
|
|
242
|
+
form: ComponentType<StudioMountFormProps>;
|
|
243
|
+
/**
|
|
244
|
+
* Writing is turned on for a mount of this kind: connects the account again with the rights to
|
|
245
|
+
* write, where it lacks them. False where the person did not; writing stays off.
|
|
246
|
+
*/
|
|
247
|
+
allowWrite?(input: {
|
|
248
|
+
space: string;
|
|
249
|
+
source: Record<string, unknown>;
|
|
250
|
+
}): Promise<boolean>;
|
|
251
|
+
}
|
|
147
252
|
/** What a card in the assistant's chat is handed. */
|
|
148
253
|
export interface StudioAssistantCardProps<T = unknown> {
|
|
149
254
|
/** What the assistant tool returned. */
|
|
@@ -262,6 +367,10 @@ export interface StudioPluginContext {
|
|
|
262
367
|
registerShareSection(section: StudioShareSection): void;
|
|
263
368
|
registerShareSetup(setup: StudioShareSetup): void;
|
|
264
369
|
registerAssistantCard(card: StudioAssistantCard): void;
|
|
370
|
+
/** A kind of source of Knowledge: its entry in „Hinzufügen“, its form and its settings. */
|
|
371
|
+
registerKnowledgeSource(source: StudioKnowledgeSource): void;
|
|
372
|
+
/** A kind of mount of Dateien: its choice in „Einbinden“, its form, its mark in the menu. */
|
|
373
|
+
registerMountKind(kind: StudioMountKind): void;
|
|
265
374
|
/**
|
|
266
375
|
* A hook: the space the studio shows, `null` while it has none. A component that calls it draws
|
|
267
376
|
* again when the person picks another space.
|
|
@@ -95,7 +95,7 @@ export type BrokerRefusal = (typeof BROKER_REFUSALS)[number];
|
|
|
95
95
|
export interface ProtocolPerson {
|
|
96
96
|
id: string;
|
|
97
97
|
name: string;
|
|
98
|
-
role: "owner" | "admin" | "member";
|
|
98
|
+
role: "owner" | "admin" | "member" | "client";
|
|
99
99
|
}
|
|
100
100
|
/** An action of a connection, as „Was darf …?“ offers it. */
|
|
101
101
|
export interface BrokerActionChoice {
|
|
@@ -159,6 +159,30 @@ export declare const FEATURES: {
|
|
|
159
159
|
readonly label: "Capabilities";
|
|
160
160
|
readonly hint: "One place in the app bar for Skills and Verbindungen: the space's connections with sign-in, audience and rules, each person's own sign-ins, the broker's Protokoll, Entdecken.";
|
|
161
161
|
};
|
|
162
|
+
readonly clientSpaces: {
|
|
163
|
+
readonly kind: "release";
|
|
164
|
+
readonly default: false;
|
|
165
|
+
readonly label: "Client spaces";
|
|
166
|
+
readonly hint: "A space's clients, each in a client space under it: their own data, results and chats, the firm's setup read from the space (docs/plans/client-spaces.md).";
|
|
167
|
+
};
|
|
168
|
+
readonly knowledgeTree: {
|
|
169
|
+
readonly kind: "release";
|
|
170
|
+
readonly default: false;
|
|
171
|
+
readonly label: "Knowledge as a knowledge base";
|
|
172
|
+
readonly hint: "Knowledge's start page with one Add menu, folders in its menu and categories as a tab, the block editor for pages (docs/plans/knowledge-base.md).";
|
|
173
|
+
};
|
|
174
|
+
readonly knowledgeMedia: {
|
|
175
|
+
readonly kind: "release";
|
|
176
|
+
readonly default: false;
|
|
177
|
+
readonly label: "Pictures in Wissen by what they show";
|
|
178
|
+
readonly hint: "Pictures and PDF pages are embedded as pictures where the embedding model takes them (EmbeddingGemma 2), so a search finds a photo by what it shows (docs/plans/media-and-files.md).";
|
|
179
|
+
};
|
|
180
|
+
readonly dateien: {
|
|
181
|
+
readonly kind: "release";
|
|
182
|
+
readonly default: false;
|
|
183
|
+
readonly label: "Dateien";
|
|
184
|
+
readonly hint: "File trees another party owns, mounted in a space and indexed where they live: a folder on this computer first (docs/plans/media-and-files.md).";
|
|
185
|
+
};
|
|
162
186
|
readonly ownKeys: {
|
|
163
187
|
readonly kind: "plan";
|
|
164
188
|
readonly default: true;
|
|
@@ -151,6 +151,30 @@ export const FEATURES = {
|
|
|
151
151
|
label: "Capabilities",
|
|
152
152
|
hint: "One place in the app bar for Skills and Verbindungen: the space's connections with sign-in, audience and rules, each person's own sign-ins, the broker's Protokoll, Entdecken.",
|
|
153
153
|
},
|
|
154
|
+
clientSpaces: {
|
|
155
|
+
kind: "release",
|
|
156
|
+
default: false,
|
|
157
|
+
label: "Client spaces",
|
|
158
|
+
hint: "A space's clients, each in a client space under it: their own data, results and chats, the firm's setup read from the space (docs/plans/client-spaces.md).",
|
|
159
|
+
},
|
|
160
|
+
knowledgeTree: {
|
|
161
|
+
kind: "release",
|
|
162
|
+
default: false,
|
|
163
|
+
label: "Knowledge as a knowledge base",
|
|
164
|
+
hint: "Knowledge's start page with one Add menu, folders in its menu and categories as a tab, the block editor for pages (docs/plans/knowledge-base.md).",
|
|
165
|
+
},
|
|
166
|
+
knowledgeMedia: {
|
|
167
|
+
kind: "release",
|
|
168
|
+
default: false,
|
|
169
|
+
label: "Pictures in Wissen by what they show",
|
|
170
|
+
hint: "Pictures and PDF pages are embedded as pictures where the embedding model takes them (EmbeddingGemma 2), so a search finds a photo by what it shows (docs/plans/media-and-files.md).",
|
|
171
|
+
},
|
|
172
|
+
dateien: {
|
|
173
|
+
kind: "release",
|
|
174
|
+
default: false,
|
|
175
|
+
label: "Dateien",
|
|
176
|
+
hint: "File trees another party owns, mounted in a space and indexed where they live: a folder on this computer first (docs/plans/media-and-files.md).",
|
|
177
|
+
},
|
|
154
178
|
ownKeys: {
|
|
155
179
|
kind: "plan",
|
|
156
180
|
default: true,
|