mindoodb-app-sdk 0.0.72 → 0.0.74

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/README.md CHANGED
@@ -266,7 +266,7 @@ Haven uses the app's registration label as the headline and ignores any title fr
266
266
 
267
267
  An app can offer its own operations to AI agents. Haven registers them with the browser's agent interface ([WebMCP](https://webmachinelearning.github.io/webmcp/)) next to Haven's own tools, so an agent in the browser — or a local agent connected through a WebMCP bridge — can call "create a mind map", "list open tasks" or "attach this file" instead of clicking through the UI.
268
268
 
269
- The app declares tools; `execute` runs inside the app. Haven validates the declarations, prefixes the names with the app's tool prefix (`vega_maps_list` for `"agentToolPrefix": "vega"` in `haven-app.json`; without it Haven derives one from the app id or label), checks permission, asks the user before consequential calls, and forwards each call over the bridge. The tools disappear when the app closes.
269
+ The app declares tools; `execute` runs inside the app. Haven validates the declarations, prefixes the names with the app's tool prefix (`todo_list` for `"agentToolPrefix": "todo"` in `haven-app.json`; without it Haven derives one from the app id or label), checks permission, asks the user before consequential calls, and forwards each call over the bridge. The tools disappear when the app closes.
270
270
 
271
271
  Agents only see an app's tools while the user has **Agent tools** switched on in Haven (Settings → General) **and** has allowed this app (**Offer tools to AI agents** in the app's settings). Neither can be set by `haven-app.json`. `registerTools()` works either way; `enabled` in its answer says whether agents can call the tools right now.
272
272
 
@@ -420,7 +420,7 @@ Agents only see an app's tools while it runs. To pick the right app first, they
420
420
  - **`summary`**: neutral, 1-3 sentences, at most 400 characters per locale; `en` is required.
421
421
  - **`capabilities`**: 1-8 entries; `tools` names the tools as in `registerTools` (no prefix, no `haven_*`). Together they should cover every tool.
422
422
  - **`examples`**, **`limits`**: up to 8 strings per locale.
423
- - **`guide`**: Markdown how-to per locale, a path relative to `haven-app.json` (at most 8 KB): typical steps, where ids come from, pitfalls. Parameter tables belong in the tools (or `ops_guide`), not here.
423
+ - **`guide`**: Markdown how-to per locale, a path relative to `haven-app.json` (at most 8 KB): typical steps, where ids come from, pitfalls. Parameter tables belong in the tools (or `ops_guide`), not here. Haven fetches it cross-origin, so serve it with `Access-Control-Allow-Origin: *` like `haven-app.json` (Cloudflare: an `/agent/*` rule in `public/_headers`).
424
424
 
425
425
  Keep the profile honest with a unit test: `checkAgentManifest` from `mindoodb-app-sdk/testing` compares it with the registered tools and fails when a capability or the guide names a tool that does not exist (`assertAgentManifest` throws instead):
426
426
 
@@ -436,7 +436,27 @@ const warnings = assertAgentManifest({
436
436
  expect(warnings).toEqual([]); // every tool belongs to a capability
437
437
  ```
438
438
 
439
- `session.agent` is absent on hosts without agent tools, so check for it. Test tools by calling `execute` directly in unit tests; the reference implementation is `src/features/agent/` in [mindoodb-app-vega](https://github.com/klehmann/mindoodb-app-vega). How to design tools that agents use well is in the [best practices guide](https://github.com/klehmann/MindooDB/blob/main/docs/best-practices.md) (section "Offer operations to AI agents").
439
+ `session.agent` is absent on hosts without agent tools, so check for it. `registerTools()` answers `{ enabled, exposedNames }`: show from `enabled` whether agents can call the tools right now (and that **Offer tools to AI agents** switches them on), and use `exposedNames` when you display the names agents see. There is no event when the user changes the setting later; register again (e.g. when the app regains focus) to refresh it.
440
+
441
+ #### A recommended tool set for a data app
442
+
443
+ What the open-source SDK example app and TodoManager offer, from small to large:
444
+
445
+ - `get_context`: the open database, read-only or not, the signed-in user, today's date, what is selected. Agents call it first.
446
+ - `list` / `search`: exact criteria through `documents.query` filters on the summary buffer, topics through a full-text `text` clause, bounded output with `truncated`. Check `db.getFulltextSetup()` first: Haven rejects `text` with `fulltext-not-enabled` when the database has no index, while the mock answers anyway.
447
+ - `get`, `create`, `update`, `delete` over a small public model, never storage field names; `delete` with `consequentialHint`. Batch with lists so one call is one step.
448
+ - `undo` (and `history`/`redo` in larger apps): every write call is one undo step marked as made by an agent; undo refuses with `STATE_CHANGED` when the document changed since, so agents never overwrite user work.
449
+ - `users_search` when the app stores people: look names up in the tenant directory (`directory` permission) and store the directory id.
450
+
451
+ Small reference: `src/features/agent/` and `src/app/useAgentSection.ts` in [mindoodb-app-example](https://github.com/klehmann/mindoodb-app-example) (eight tools, undo, profile test). Full-size: `src/features/agent/` in [mindoodb-app-todomanager](https://github.com/klehmann/mindoodb-app-todomanager) (search, undo/redo/history, directory lookup, agent profile). Both are open source; copy from them.
452
+
453
+ #### Testing agent tools
454
+
455
+ - **Unit**: call `execute` directly with a database from `createMockMindooDBAppSession`.
456
+ - **End to end**: `createFakeBridgeHost({ agentToolPrefix, agentToolsEnabled, agentConsent })` connects the real bridge; `host.agent.tools()`, `host.agent.context()` and `host.agent.call(name, input)` act as the agent, and `call` answers `{ ok, result }` or `{ ok: false, error }`; `agentConsent: "deny"` plays a user who declines a `consequentialHint` call (`NOT_ALLOWED`).
457
+ - **In the browser**: the `/__haven-test/` page (`mountHavenTestHost`) lists the tools with a call button. Pass `agentToolPrefix: definition.agentToolPrefix`; without it the page derives the prefix from the app id, so the names differ from Haven's.
458
+
459
+ How to design tools that agents use well is in the [best practices guide](https://github.com/klehmann/MindooDB/blob/main/docs/best-practices.md) (section "Offer operations to AI agents").
440
460
 
441
461
  ### Host-owned drag
442
462
 
@@ -697,6 +717,35 @@ is a component, `embeddingValidation` plays the host, and `requestEmbeddingInspe
697
717
  `requestEmbeddingShowIssues`, `requestEmbeddingReveal`, `getEmbeddingValidations` and
698
718
  `getEmbeddingSaveCount` drive and observe it.
699
719
 
720
+ **Fields, templates and export.** Three more `supports` entries:
721
+
722
+ ```json
723
+ "supports": ["variables", "template", "export:pdf", "export:png"]
724
+ ```
725
+
726
+ ```ts
727
+ // host
728
+ const embed = await session.embeds.open({
729
+ componentKey, databaseId: "crmdata", docId: newDoc.id, container,
730
+ template: { docId: templateId }, // the new document starts as a copy
731
+ variables: [{ key: "company.name", label: "Firma", value: "Müller GmbH", group: "Firma" }],
732
+ });
733
+ await embed.setVariables(nextVariables); // e.g. after the contact changed
734
+ const pdf = await embed.export({ format: "pdf" }); // a File
735
+ const preview = await embed.export({ format: "png", maxWidth: 480 });
736
+
737
+ // component
738
+ const variables = await session.embedding.getVariables(); // offer them under "Insert field ▸"
739
+ session.embedding.onVariablesChange((next) => refreshFields(next));
740
+ session.embedding.provideExport(async ({ format }) => (format === "pdf" ? await renderPdf() : await renderPng()));
741
+ // launchContext.embed.template: { docId } of the template in the sandbox (read only); copy it while the root is empty
742
+ ```
743
+
744
+ `resolveMindooDBAppVariables(text, variables)` fills `{{key}}` placeholders for editors
745
+ without real fields. In tests, `embedExport` plays the components, `getEmbedRequests`
746
+ records exports, and for an app that is a component `embeddingVariables`,
747
+ `requestEmbeddingVariables` and `requestEmbeddingExport` drive it.
748
+
700
749
  Havens that predate this lay the component over the container instead, above the host's
701
750
  frame (`embed.placement === "overlay"`). The host then cannot draw on top of it: hide it
702
751
  with `embed.setVisible(false)` while a menu or dialog of the host should be visible.
@@ -711,6 +760,30 @@ answers like a current Haven, so the SDK frames that URL in the container. Both
711
760
  controllers simulate unsaved changes: `setEmbedDirty`, `failNextEmbedSave`, and for an
712
761
  app under test that is a component, `getEmbeddingDirty` and `requestEmbeddingSave`.
713
762
 
763
+ **Host checklist.** What a host needs beyond the calls above (the "Embedded editors" tab of
764
+ [mindoodb-app-example](https://github.com/klehmann/mindoodb-app-example) is a small
765
+ complete host, `src/app/useEmbedsSection.ts`):
766
+
767
+ - `embeds.open` rejects with an `Error` whose `name` says why: `declined` (the user said
768
+ no), `component-not-found` (the app is not installed or no longer offers it),
769
+ `forbidden`, `database-not-found`, `document-not-found`, `invalid-request`,
770
+ `unsupported` (a Haven without components). Explain these to the user.
771
+ - `requestAccess` never asks again for what the user put off; Haven asks for it when the
772
+ document is opened. So say "Haven asks when you open one" instead of offering "ask again".
773
+ - `createFields` may contain nested values; copy it with a JSON round trip, not
774
+ `structuredClone`, when the component sits in Vue reactive state.
775
+ - Keep fields of your own on the root top-level and prefixed (`exampleEditor`), so
776
+ queries find them without `setSummarySetup`; nested fields (`crm.folders`) need a summary
777
+ setup first.
778
+ - Copy the component's `children` link onto the root (or remember it) so you can still
779
+ delete a document with all its children after the providing app was uninstalled.
780
+ - Keep the container mounted while the editor should live: removing the element (a tab
781
+ rendered with `v-if`) closes the editor. Hide it with `v-show` and
782
+ `embed.setVisible(false)` instead.
783
+ - With `placement === "overlay"` the SDK follows the container on resize and scroll, not
784
+ when content above it changes height; keep banners and confirm bars out of the space
785
+ above an open editor.
786
+
714
787
  A host with agent tools marks the component in the front tab with `embed.setActive()`
715
788
  and reads `embed.agentTools`; see *Agent tools of embedded components*.
716
789
 
@@ -1036,7 +1109,7 @@ An id in `dependencyIds` may name a revision the timeline does not list, because
1036
1109
 
1037
1110
  ### Granular JSON edits
1038
1111
 
1039
- When you need to edit nested objects or lists inside a document — not just top-level fields — describe the change as a **granular JSON patch** rather than rewriting the whole document. This is the model behind structured collaborative editing in apps like [`mindoodb-app-teamgrid`](https://github.com/klehmann/mindoodb-app-teamgrid), where two users can insert different rows into the same worksheet on different devices and the merge keeps both sides cleanly.
1112
+ When you need to edit nested objects or lists inside a document — not just top-level fields — describe the change as a **granular JSON patch** rather than rewriting the whole document. This is the model behind structured collaborative editing in apps like TeamGrid, where two users can insert different rows into the same worksheet on different devices and the merge keeps both sides cleanly.
1040
1113
 
1041
1114
  A JSON patch is a bag of four operation kinds applied at specific JSON paths inside `document.data`, all carried with the document version (`baseHeads`) the app was looking at when it composed them:
1042
1115
 
@@ -1337,11 +1410,11 @@ Buffer API at a glance:
1337
1410
 
1338
1411
  #### End-to-end sample
1339
1412
 
1340
- The [`mindoodb-app-teamedit`](https://github.com/klehmann/mindoodb-app-teamedit) sample wires `MindooDBTextBuffer` to a Milkdown markdown editor with Save / Refresh / preview pane, and is the recommended starting point for building your own collaborative text app.
1413
+ TeamEdit wires `MindooDBTextBuffer` to a Milkdown markdown editor with Save / Refresh / preview pane; its code is not public, so build on the snippets above.
1341
1414
 
1342
1415
  ### Collaborative rich-text editing
1343
1416
 
1344
- For structured documents that need formatting — headings, bold/italic runs, lists, tables, fonts, colors — use the **rich-text patch API**. This is the surface behind the Word/.docx mode in [`mindoodb-app-teamedit`](https://github.com/klehmann/mindoodb-app-teamedit), where two users can edit the same document at the same time and Haven merges both formatting and structure on its side via Automerge's rich-text CRDT.
1417
+ For structured documents that need formatting — headings, bold/italic runs, lists, tables, fonts, colors — use the **rich-text patch API**. This is the surface behind TeamEdit's Word/.docx mode, where two users can edit the same document at the same time and Haven merges both formatting and structure on its side via Automerge's rich-text CRDT.
1345
1418
 
1346
1419
  Rich-text fields are stored internally as Automerge rich-text, but apps never see Automerge directly. The bridge speaks JSON and represents a rich-text field as an ordered list of **spans** — text runs with marks for inline formatting, plus block markers for paragraphs, headings, lists, and tables:
1347
1420
 
@@ -1451,7 +1524,7 @@ Like the text buffer, the rich-text handle always sends the original `baseHeads`
1451
1524
 
1452
1525
  #### End-to-end sample
1453
1526
 
1454
- The Word/.docx mode in [`mindoodb-app-teamedit`](https://github.com/klehmann/mindoodb-app-teamedit) is the **only supported in-repo use case** for the Automerge binary sync API below — it needs a local replica and binary flush because `set`/`unset` and the JSON patch APIs are not sufficient for that editor. For span-only rich-text apps, use `createMindooDBRichTextHandle` instead.
1527
+ TeamEdit's Word/.docx mode is the **only supported in-repo use case** for the Automerge binary sync API below — it needs a local replica and binary flush because `set`/`unset` and the JSON patch APIs are not sufficient for that editor. For span-only rich-text apps, use `createMindooDBRichTextHandle` instead.
1455
1528
 
1456
1529
  ### Automerge binary sync (advanced)
1457
1530
 
@@ -1560,7 +1633,7 @@ Requires the `update` capability (same as other write operations). For historica
1560
1633
 
1561
1634
  #### Reference implementation (not a template)
1562
1635
 
1563
- TeamEdit's Word/.docx mode is why these RPCs exist — see `wordAutomergeHandle.ts` in [`mindoodb-app-teamedit`](https://github.com/klehmann/mindoodb-app-teamedit). Treat it as a reference for an unsupported edge case, not as a pattern to copy into new apps.
1636
+ TeamEdit's Word/.docx mode is why these RPCs exist. Treat them as an unsupported edge case, not as a pattern for new apps.
1564
1637
 
1565
1638
  ### Queries & Live Queries
1566
1639
 
@@ -314,12 +314,13 @@ var mindooDBAppInspectRules = {
314
314
  };
315
315
  }
316
316
  };
317
+ var SUPPORTS_ARGUMENT = /^[a-z0-9][a-z0-9-]{0,31}$/;
317
318
  function isMindooDBAppSupportsEntry(entry, contractPattern) {
318
- const [capability, contract, ...rest] = entry.split(":");
319
+ const [capability, argument, ...rest] = entry.split(":");
319
320
  if (rest.length || !capability || !SUPPORTS_CAPABILITY.test(capability)) {
320
321
  return false;
321
322
  }
322
- return contract === void 0 || contractPattern.test(contract);
323
+ return argument === void 0 || contractPattern.test(argument) || SUPPORTS_ARGUMENT.test(argument);
323
324
  }
324
325
  async function performMindooDBAppEmbeddingSave(steps) {
325
326
  const validation = await steps.validate();
@@ -680,7 +681,7 @@ function readComponentSupports(value, label, errors) {
680
681
  for (const entry of value) {
681
682
  const text = typeof entry === "string" ? entry.trim() : "";
682
683
  if (!isMindooDBAppSupportsEntry(text, MINDOODB_APP_COMPONENT_CONTRACT_PATTERN)) {
683
- errors.push(`${label} entries must look like "validate" or "inspect:mindoo.inspect.document@1", received ${JSON.stringify(entry)}.`);
684
+ errors.push(`${label} entries must look like "validate", "export:pdf" or "inspect:mindoo.inspect.document@1", received ${JSON.stringify(entry)}.`);
684
685
  return void 0;
685
686
  }
686
687
  if (!result.includes(text)) {
@@ -1852,6 +1853,83 @@ var MindooDBAppAgentApiImpl = class {
1852
1853
  }
1853
1854
  };
1854
1855
 
1856
+ // src/embedExchange.ts
1857
+ var MINDOODB_APP_EMBED_VARIABLES_MAX = 200;
1858
+ var VARIABLE_KEY = /^[A-Za-z_][A-Za-z0-9_.-]{0,63}$/;
1859
+ function normalizeMindooDBAppEmbedVariables(raw) {
1860
+ if (!Array.isArray(raw)) {
1861
+ return [];
1862
+ }
1863
+ const byKey = /* @__PURE__ */ new Map();
1864
+ for (const entry of raw) {
1865
+ if (!entry || typeof entry !== "object") continue;
1866
+ const { key, label, value, group } = entry;
1867
+ if (typeof key !== "string" || !VARIABLE_KEY.test(key)) continue;
1868
+ const text = (input, max) => typeof input === "string" ? input.slice(0, max) : "";
1869
+ byKey.delete(key);
1870
+ byKey.set(key, {
1871
+ key,
1872
+ label: text(label, 120).trim() || key,
1873
+ value: typeof value === "number" || typeof value === "boolean" ? String(value) : text(value, 4e3),
1874
+ ...typeof group === "string" && group.trim() ? { group: group.trim().slice(0, 80) } : {}
1875
+ });
1876
+ if (byKey.size >= MINDOODB_APP_EMBED_VARIABLES_MAX) break;
1877
+ }
1878
+ return [...byKey.values()];
1879
+ }
1880
+ function resolveMindooDBAppVariables(text, variables, options = {}) {
1881
+ const values = new Map(variables.map((variable) => [variable.key, variable.value]));
1882
+ return text.replace(/\{\{\s*([A-Za-z_][A-Za-z0-9_.-]{0,63})\s*\}\}/g, (match, key) => {
1883
+ const value = values.get(key);
1884
+ return value === void 0 || !value && !options.keepEmpty ? match : value;
1885
+ });
1886
+ }
1887
+ var MINDOODB_APP_EMBED_EXPORT_MAX_BYTES = 64 * 1024 * 1024;
1888
+ var EXPORT_TYPES = {
1889
+ pdf: "application/pdf",
1890
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1891
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1892
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
1893
+ png: "image/png",
1894
+ md: "text/markdown",
1895
+ csv: "text/csv"
1896
+ };
1897
+ function mindooDBAppExportMimeType(format) {
1898
+ return EXPORT_TYPES[format] ?? "application/octet-stream";
1899
+ }
1900
+ function normalizeMindooDBAppEmbedExportRequest(raw) {
1901
+ const input = raw && typeof raw === "object" ? raw : {};
1902
+ const format = typeof input.format === "string" ? input.format.trim().toLowerCase() : "";
1903
+ if (!/^[a-z0-9][a-z0-9-]{0,31}$/.test(format)) {
1904
+ throw new Error('An export needs a format such as "pdf" or "png".');
1905
+ }
1906
+ const size = (value) => {
1907
+ const number = Number(value);
1908
+ return Number.isFinite(number) && number > 0 ? Math.min(Math.round(number), 8192) : void 0;
1909
+ };
1910
+ const maxWidth = size(input.maxWidth);
1911
+ const maxHeight = size(input.maxHeight);
1912
+ return { format, ...maxWidth ? { maxWidth } : {}, ...maxHeight ? { maxHeight } : {} };
1913
+ }
1914
+ async function mindooDBAppExportPayload(result, request, baseName = "document") {
1915
+ const blob = result instanceof Blob ? result : null;
1916
+ const data = blob ?? result.data;
1917
+ const bytes = data instanceof Blob ? await data.arrayBuffer() : ArrayBuffer.isView(data) ? data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength) : data;
1918
+ if (Object.prototype.toString.call(bytes) !== "[object ArrayBuffer]") {
1919
+ throw new Error("An export must be a Blob, an ArrayBuffer or a Uint8Array.");
1920
+ }
1921
+ if (bytes.byteLength > MINDOODB_APP_EMBED_EXPORT_MAX_BYTES) {
1922
+ throw new Error(`An export must not be larger than ${MINDOODB_APP_EMBED_EXPORT_MAX_BYTES / 1024 / 1024} MiB.`);
1923
+ }
1924
+ const named = blob ? blob.name : result.name;
1925
+ const mimeType = !blob && result.mimeType || (blob?.type ? blob.type : "") || mindooDBAppExportMimeType(request.format);
1926
+ const name = (typeof named === "string" && named.trim() ? named.trim() : `${baseName}.${request.format}`).slice(0, 200);
1927
+ return { data: bytes, name, mimeType };
1928
+ }
1929
+ function mindooDBAppExportFile(payload) {
1930
+ return new File([payload.data], payload.name, { type: payload.mimeType });
1931
+ }
1932
+
1855
1933
  // src/directoryPaging.ts
1856
1934
  var LIST_USERS_DEFAULT_LIMIT = 50;
1857
1935
  var LIST_USERS_MAX_LIMIT = 500;
@@ -2233,6 +2311,22 @@ var MindooDBAppEmbedImpl = class {
2233
2311
  }
2234
2312
  await this.rpc.call("embeds.reveal", { embedId: this.embedId, anchor: normalized });
2235
2313
  }
2314
+ async setVariables(variables) {
2315
+ await this.rpc.call("embeds.setVariables", {
2316
+ embedId: this.embedId,
2317
+ variables: normalizeMindooDBAppEmbedVariables(variables)
2318
+ });
2319
+ }
2320
+ async export(request) {
2321
+ const payload = await this.rpc.call("embeds.export", {
2322
+ embedId: this.embedId,
2323
+ request: normalizeMindooDBAppEmbedExportRequest(request)
2324
+ });
2325
+ if (!payload || Object.prototype.toString.call(payload.data) !== "[object ArrayBuffer]") {
2326
+ throw new Error("The component handed over no file.");
2327
+ }
2328
+ return mindooDBAppExportFile(payload);
2329
+ }
2236
2330
  async callTool(name, input) {
2237
2331
  return await this.rpc.call("embeds.callTool", {
2238
2332
  embedId: this.embedId,
@@ -2370,10 +2464,17 @@ var MindooDBAppEmbedsClient = class {
2370
2464
  open: async (input) => {
2371
2465
  const { container, rect, ...rest } = input;
2372
2466
  const initialRect = container ? containerRect(container) : toRect(rect ?? { left: 0, top: 0, width: 0, height: 0 });
2467
+ const { variables, template, ...plain } = rest;
2373
2468
  const response = await this.rpc.call("embeds.open", {
2374
2469
  // `frame`: Haven hands back a page for the container instead of laying
2375
2470
  // the component over this app. Havens that do not know it ignore it.
2376
- input: { ...rest, rect: initialRect, ...container ? { placement: "frame" } : {} }
2471
+ input: {
2472
+ ...plain,
2473
+ rect: initialRect,
2474
+ ...container ? { placement: "frame" } : {},
2475
+ ...variables ? { variables: normalizeMindooDBAppEmbedVariables(variables) } : {},
2476
+ ...template ? { template: { docId: String(template.docId), ...template.databaseId ? { databaseId: String(template.databaseId) } : {} } } : {}
2477
+ }
2377
2478
  });
2378
2479
  const frame = container && response.frame?.url ? createComponentFrame(container, response.frame.url, response.frame.allow) : null;
2379
2480
  const embed = new MindooDBAppEmbedImpl(
@@ -2477,6 +2578,35 @@ var MindooDBAppEmbedsClient = class {
2477
2578
  }
2478
2579
  };
2479
2580
  },
2581
+ getVariables: async () => {
2582
+ if (this.variables) {
2583
+ return this.variables.map((variable) => ({ ...variable }));
2584
+ }
2585
+ try {
2586
+ const result = await this.rpc.call("embedding.getVariables", {});
2587
+ this.variables ??= normalizeMindooDBAppEmbedVariables(result?.variables);
2588
+ } catch (error) {
2589
+ if (!isMethodNotFound(error) && !(error instanceof Error && error.name === "unsupported")) {
2590
+ throw error;
2591
+ }
2592
+ this.variables ??= [];
2593
+ }
2594
+ return this.variables.map((variable) => ({ ...variable }));
2595
+ },
2596
+ onVariablesChange: (listener) => {
2597
+ this.variableListeners.add(listener);
2598
+ return () => {
2599
+ this.variableListeners.delete(listener);
2600
+ };
2601
+ },
2602
+ provideExport: (provider) => {
2603
+ this.exportProvider = provider;
2604
+ return () => {
2605
+ if (this.exportProvider === provider) {
2606
+ this.exportProvider = null;
2607
+ }
2608
+ };
2609
+ },
2480
2610
  onReveal: (handler) => {
2481
2611
  this.revealHandler = handler;
2482
2612
  return () => {
@@ -2516,6 +2646,10 @@ var MindooDBAppEmbedsClient = class {
2516
2646
  inspectionProvider = null;
2517
2647
  showIssuesHandler = null;
2518
2648
  revealHandler = null;
2649
+ exportProvider = null;
2650
+ /** The host's variables as last pushed; null until known (then asked for on first use). */
2651
+ variables = null;
2652
+ variableListeners = /* @__PURE__ */ new Set();
2519
2653
  /** `embedding.validate`; ok when Haven cannot check (not embedded, older Haven). */
2520
2654
  async validate(options) {
2521
2655
  try {
@@ -2555,6 +2689,20 @@ var MindooDBAppEmbedsClient = class {
2555
2689
  }
2556
2690
  await this.revealHandler(anchor);
2557
2691
  response = { ok: true };
2692
+ } else if (message.request === "variables") {
2693
+ this.variables = normalizeMindooDBAppEmbedVariables(params.variables);
2694
+ const variables = this.variables;
2695
+ this.variableListeners.forEach((listener) => {
2696
+ try {
2697
+ listener(variables.map((variable) => ({ ...variable })));
2698
+ } catch (error) {
2699
+ console.error("MindooDB embedding variables listener failed.", error);
2700
+ }
2701
+ });
2702
+ response = { ok: true };
2703
+ } else if (message.request === "export" && this.exportProvider) {
2704
+ const request = normalizeMindooDBAppEmbedExportRequest(params.request);
2705
+ response = { ok: true, result: await mindooDBAppExportPayload(await this.exportProvider(request), request) };
2558
2706
  } else {
2559
2707
  response = { ok: false, error: "unsupported" };
2560
2708
  }
@@ -4484,6 +4632,14 @@ export {
4484
4632
  bindDragSource,
4485
4633
  normalizeAgentToolInput,
4486
4634
  MindooDBAppAgentToolError,
4635
+ MINDOODB_APP_EMBED_VARIABLES_MAX,
4636
+ normalizeMindooDBAppEmbedVariables,
4637
+ resolveMindooDBAppVariables,
4638
+ MINDOODB_APP_EMBED_EXPORT_MAX_BYTES,
4639
+ mindooDBAppExportMimeType,
4640
+ normalizeMindooDBAppEmbedExportRequest,
4641
+ mindooDBAppExportPayload,
4642
+ mindooDBAppExportFile,
4487
4643
  pageUsers,
4488
4644
  DEFAULT_HAVEN_HOST_SHORTCUTS,
4489
4645
  matchHostShortcut,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MindooDBAppAttachmentPreviewMode, a as MindooDBAppDragBindSourceOptions, b as MindooDBAppDragStartInput, c as MindooDBAppDragStartResult, d as MindooDBAppDragPreview, e as MindooDBAppBridge, f as MindooDBAppAgentToolErrorCode, g as MindooDBAppAgentTool, h as MindooDBAppHostShortcutBinding, i as MindooDBAppHostShortcutAction, j as MindooDBAppHostingMode, k as MindooDBAppDefinition, l as MindooDBAppDatabase, m as MindooDBAppDocument, n as MindooDBAppRichTextSpan, o as MindooDBAppRichTextSnapshot, p as MindooDBAppCreateDocumentInput } from './types-DN-E0X34.js';
2
- export { q as MINDOODB_APP_ACCEPTS_MAX, r as MINDOODB_APP_AGENT_CAPABILITIES_MAX, s as MINDOODB_APP_AGENT_CAPABILITY_TITLE_MAX, t as MINDOODB_APP_AGENT_CAPABILITY_TOOLS_MAX, u as MINDOODB_APP_AGENT_EXAMPLE_MAX, v as MINDOODB_APP_AGENT_GUIDE_MAX_BYTES, w as MINDOODB_APP_AGENT_LIMIT_MAX, x as MINDOODB_APP_AGENT_LIST_MAX, y as MINDOODB_APP_AGENT_SUMMARY_MAX, z as MINDOODB_APP_AGENT_TOOL_NAME_PATTERN, A as MINDOODB_APP_COMPONENTS_MAX, B as MINDOODB_APP_COMPONENT_CONTRACT_PATTERN, C as MINDOODB_APP_DEFINITION_FILE_NAME, D as MINDOODB_APP_DEFINITION_FORMAT, E as MINDOODB_APP_DEFINITION_PERMISSIONS, F as MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS, G as MINDOODB_APP_DEFINITION_VERSION, H as MINDOODB_APP_INSPECTION_FIELD, I as MINDOODB_APP_INSPECTION_MAX_BYTES, J as MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES, K as MINDOODB_APP_ISSUES_MAX, L as MINDOODB_APP_LISTING_DESCRIPTION_MAX, N as MINDOODB_APP_LISTING_MAX_SCREENSHOTS, O as MINDOODB_APP_LISTING_SUMMARY_MAX, P as MINDOODB_APP_SEAL_SIGNING_DOMAIN, Q as MINDOODB_APP_VALUE_TAG, R as MINDOODB_APP_WELL_KNOWN_DRAG_TYPES, S as MINDOODB_INSPECT_DOCUMENT, T as MINDOODB_INSPECT_SLIDES, U as MINDOODB_INSPECT_SPREADSHEET, V as MindooDBAppAcceptSpec, W as MindooDBAppAccessDecision, X as MindooDBAppAccessTier, Y as MindooDBAppAgentApi, Z as MindooDBAppAgentCapability, _ as MindooDBAppAgentProfile, $ as MindooDBAppAgentRegistration, a0 as MindooDBAppAgentToolAnnotations, a1 as MindooDBAppAgentToolDescriptor, a2 as MindooDBAppAgentToolScope, a3 as MindooDBAppAtomicValue, a4 as MindooDBAppAttachmentApi, a5 as MindooDBAppAttachmentChunk, a6 as MindooDBAppAttachmentInfo, a7 as MindooDBAppAttachmentPreviewOptions, a8 as MindooDBAppAttachmentPreviewSession, a9 as MindooDBAppAutomergeChangesPatch, aa as MindooDBAppAutomergeChangesSince, ab as MindooDBAppAutomergeGetOptions, ac as MindooDBAppAutomergePatchResult, ad as MindooDBAppAutomergeSnapshot, ae as MindooDBAppBridgeAgentInvokeMessage, af as MindooDBAppBridgeAgentResultMessage, ag as MindooDBAppBridgeBeforeCloseAck, ah as MindooDBAppBridgeBeforeCloseMessage, ai as MindooDBAppBridgeConnectMessage, aj as MindooDBAppBridgeConnectOptions, ak as MindooDBAppBridgeConnectedMessage, al as MindooDBAppBridgeDragDropMessage, am as MindooDBAppBridgeDragLeaveMessage, an as MindooDBAppBridgeDragOverMessage, ao as MindooDBAppBridgeEmbedEventMessage, ap as MindooDBAppBridgeEmbedRequestMessage, aq as MindooDBAppBridgeEmbeddingRequestMessage, ar as MindooDBAppBridgeErrorPayload, as as MindooDBAppBridgeHandshakeErrorMessage, at as MindooDBAppBridgeHostFocusChangedMessage, au as MindooDBAppBridgeIncomingContentMessage, av as MindooDBAppBridgeLocaleChangedMessage, aw as MindooDBAppBridgePortMessage, ax as MindooDBAppBridgeQueryResultMessage, ay as MindooDBAppBridgeReminderOpenedMessage, az as MindooDBAppBridgeRpcError, aA as MindooDBAppBridgeRpcMessage, aB as MindooDBAppBridgeRpcRequest, aC as MindooDBAppBridgeRpcSuccess, aD as MindooDBAppBridgeShortcutInvokedMessage, aE as MindooDBAppBridgeShortcutsChangedMessage, aF as MindooDBAppBridgeStreamAbortRequest, aG as MindooDBAppBridgeStreamAck, aH as MindooDBAppBridgeStreamCloseRequest, aI as MindooDBAppBridgeStreamError, aJ as MindooDBAppBridgeStreamMessage, aK as MindooDBAppBridgeStreamOpenResult, aL as MindooDBAppBridgeStreamReadRequest, aM as MindooDBAppBridgeStreamWriteRequest, aN as MindooDBAppBridgeThemeChangedMessage, aO as MindooDBAppBridgeUiPreferencesChangedMessage, aP as MindooDBAppBridgeViewChangedMessage, aQ as MindooDBAppBridgeViewportChangedMessage, aR as MindooDBAppBridgeWorkspaceFocusRequestedMessage, aS as MindooDBAppBrowserFeatures, aT as MindooDBAppCapability, aU as MindooDBAppComponentCategory, aV as MindooDBAppComponentChildren, aW as MindooDBAppComponentContract, aX as MindooDBAppComponentFieldValue, aY as MindooDBAppComponentInfo, aZ as MindooDBAppComponentIntent, a_ as MindooDBAppComponentQuery, a$ as MindooDBAppComponentReference, b0 as MindooDBAppComponentSpec, b1 as MindooDBAppComponentsApi, b2 as MindooDBAppConfiguredViewCategorizationStyle, b3 as MindooDBAppConfiguredViewColumn, b4 as MindooDBAppConfiguredViewColumnRole, b5 as MindooDBAppConfiguredViewExpressionMode, b6 as MindooDBAppConfiguredViewFieldExpression, b7 as MindooDBAppConfiguredViewFilterDefinition, b8 as MindooDBAppConfiguredViewFilterMode, b9 as MindooDBAppConfiguredViewFilterRule, ba as MindooDBAppConfiguredViewFormulaExpression, bb as MindooDBAppConfiguredViewFormulaFilterDefinition, bc as MindooDBAppConfiguredViewPreviewMode, bd as MindooDBAppConfiguredViewRuleFilterDefinition, be as MindooDBAppConfiguredViewRuleMatchMode, bf as MindooDBAppConfiguredViewRuleOperator, bg as MindooDBAppConfiguredViewValueExpression, bh as MindooDBAppCounterValue, bi as MindooDBAppCreateKeyInfo, bj as MindooDBAppCreateViewInput, bk as MindooDBAppCreateViewNavigatorInput, bl as MindooDBAppDatabaseInfo, bm as MindooDBAppDefinitionDatabase, bn as MindooDBAppDefinitionListing, bo as MindooDBAppDefinitionPermission, bp as MindooDBAppDefinitionRegistrationPermission, bq as MindooDBAppDefinitionScreenshot, br as MindooDBAppDefinitionValidation, bs as MindooDBAppDirectoryApi, bt as MindooDBAppDirectoryEntry, bu as MindooDBAppDocumentApi, bv as MindooDBAppDocumentHeadCursorResult, bw as MindooDBAppDocumentHistoryEntry, bx as MindooDBAppDocumentInspection, by as MindooDBAppDocumentListQuery, bz as MindooDBAppDocumentListResult, bA as MindooDBAppDocumentQuery, bB as MindooDBAppDocumentRevisionId, bC as MindooDBAppDocumentRule, bD as MindooDBAppDocumentRuleOutcome, bE as MindooDBAppDocumentRules, bF as MindooDBAppDocumentScanPreset, bG as MindooDBAppDocumentSummary, bH as MindooDBAppDragApi, bI as MindooDBAppDragCancelReason, bJ as MindooDBAppDragDropEvent, bK as MindooDBAppDragEffect, bL as MindooDBAppDragHoverResult, bM as MindooDBAppDragOffer, bN as MindooDBAppDragOverEvent, bO as MindooDBAppDragPointer, bP as MindooDBAppDragProfile, bQ as MindooDBAppEmbed, bR as MindooDBAppEmbedAccessComponent, bS as MindooDBAppEmbedAccessInput, bT as MindooDBAppEmbedAccessPair, bU as MindooDBAppEmbedAccessResult, bV as MindooDBAppEmbedAgentTools, bW as MindooDBAppEmbedAgentToolsEvent, bX as MindooDBAppEmbedBeforeSaveInput, bY as MindooDBAppEmbedBeforeSaveResult, bZ as MindooDBAppEmbedCloseReason, b_ as MindooDBAppEmbedClosedEvent, b$ as MindooDBAppEmbedContext, c0 as MindooDBAppEmbedDirtyEvent, c1 as MindooDBAppEmbedOpenInput, c2 as MindooDBAppEmbedRect, c3 as MindooDBAppEmbedSavedEvent, c4 as MindooDBAppEmbedValidation, c5 as MindooDBAppEmbedValidationError, c6 as MindooDBAppEmbeddingApi, c7 as MindooDBAppEmbeddingLookupOptions, c8 as MindooDBAppEmbeddingLookupResult, c9 as MindooDBAppEmbeddingResult, ca as MindooDBAppEmbeddingSaveContext, cb as MindooDBAppEmbedsApi, cc as MindooDBAppEntryAttachmentRef, cd as MindooDBAppEntryProvenance, ce as MindooDBAppExtractDocumentTextInput, cf as MindooDBAppExtractDocumentTextResult, cg as MindooDBAppExtractTextFormat, ch as MindooDBAppExtractionSetup, ci as MindooDBAppFulltextSetup, cj as MindooDBAppHistoricalDocument, ck as MindooDBAppHistoryQuery, cl as MindooDBAppHostTheme, cm as MindooDBAppIdentityApi, cn as MindooDBAppInaccessibleDocument, co as MindooDBAppInaccessibleDocumentListQuery, cp as MindooDBAppInaccessibleDocumentListResult, cq as MindooDBAppIncomingContent, cr as MindooDBAppIncomingContentHandler, cs as MindooDBAppIncomingContentInfo, ct as MindooDBAppIncomingItem, cu as MindooDBAppIncomingItemInfo, cv as MindooDBAppIncomingResult, cw as MindooDBAppIncomingSource, cx as MindooDBAppInspectAnchor, cy as MindooDBAppInspectRequest, cz as MindooDBAppInspectedCell, cA as MindooDBAppInspection, cB as MindooDBAppInspectionBase, cC as MindooDBAppIssue, cD as MindooDBAppIssueSeverity, cE as MindooDBAppJsonCounterIncrementPatch, cF as MindooDBAppJsonListDeletePatch, cG as MindooDBAppJsonListInsertPatch, cH as MindooDBAppJsonPatch, cI as MindooDBAppJsonSetPatch, cJ as MindooDBAppJsonTextMarkPatch, cK as MindooDBAppJsonTextSplicePatch, cL as MindooDBAppJsonTextUnmarkPatch, cM as MindooDBAppJsonUnsetPatch, cN as MindooDBAppLaunchContext, cO as MindooDBAppListUsersOptions, cP as MindooDBAppListUsersPage, cQ as MindooDBAppLiveQuerySubscription, cR as MindooDBAppLocaleMap, cS as MindooDBAppLocalizedText, cT as MindooDBAppMenuAnchor, cU as MindooDBAppMenuApi, cV as MindooDBAppMenuCommandItem, cW as MindooDBAppMenuDismissReason, cX as MindooDBAppMenuDismissedResult, cY as MindooDBAppMenuItem, cZ as MindooDBAppMenuKind, c_ as MindooDBAppMenuPlacement, c$ as MindooDBAppMenuPointAnchor, d0 as MindooDBAppMenuRect, d1 as MindooDBAppMenuRectAnchor, d2 as MindooDBAppMenuSelectionResult, d3 as MindooDBAppMenuSeparatorItem, d4 as MindooDBAppNotificationSeverity, d5 as MindooDBAppNotifyInput, d6 as MindooDBAppNotifyResult, d7 as MindooDBAppPdfApi, d8 as MindooDBAppPdfSignInput, d9 as MindooDBAppPdfSignResult, da as MindooDBAppPdfSignaturePosition, db as MindooDBAppPdfSigner, dc as MindooDBAppProposeAppInput, dd as MindooDBAppProposeAppResult, de as MindooDBAppQueryCoverage, df as MindooDBAppQueryInclude, dg as MindooDBAppQueryIncludeCardinality, dh as MindooDBAppQueryIncludeSlots, di as MindooDBAppQueryResult, dj as MindooDBAppQueryRow, dk as MindooDBAppQuerySortKey, dl as MindooDBAppQueryTextClause, dm as MindooDBAppReadableAttachmentStream, dn as MindooDBAppRecipientOptions, dp as MindooDBAppReminder, dq as MindooDBAppReminderOpened, dr as MindooDBAppReminderOpenedHandler, ds as MindooDBAppReminderRequest, dt as MindooDBAppReminderScheduleResult, du as MindooDBAppRemindersApi, dv as MindooDBAppResolvedViewDefinition, dw as MindooDBAppResolvedViewSource, dx as MindooDBAppRevisionPhase, dy as MindooDBAppRevisionVerification, dz as MindooDBAppRichTextBlockSpan, dA as MindooDBAppRichTextGetOptions, dB as MindooDBAppRichTextImmutableString, dC as MindooDBAppRichTextMarkRange, dD as MindooDBAppRichTextMaterializeValue, dE as MindooDBAppRichTextPatch, dF as MindooDBAppRichTextScalar, dG as MindooDBAppRichTextSpliceStep, dH as MindooDBAppRichTextStep, dI as MindooDBAppRichTextStepPatch, dJ as MindooDBAppRichTextTextSpan, dK as MindooDBAppRuntime, dL as MindooDBAppScanAttachmentOptions, dM as MindooDBAppScanAttachmentResult, dN as MindooDBAppScopedDocId, dO as MindooDBAppScopedDocumentSummary, dP as MindooDBAppSealIntent, dQ as MindooDBAppSealedChannelOpenInput, dR as MindooDBAppSealedChannelOpenResult, dS as MindooDBAppSealedChannelRequestInput, dT as MindooDBAppSession, dU as MindooDBAppShowMenuInput, dV as MindooDBAppShowMenuResult, dW as MindooDBAppSignPreview, dX as MindooDBAppSignPreviewScope, dY as MindooDBAppSignStatementInput, dZ as MindooDBAppSignStatementResult, d_ as MindooDBAppSlidesInspection, d$ as MindooDBAppSpreadsheetInspection, e0 as MindooDBAppStorageApi, e1 as MindooDBAppSummarySetup, e2 as MindooDBAppTextCursorOptions, e3 as MindooDBAppTextCursorPosition, e4 as MindooDBAppTextCursorPositionsResult, e5 as MindooDBAppTextCursorsResult, e6 as MindooDBAppTextEdit, e7 as MindooDBAppTextPatch, e8 as MindooDBAppThemeMode, e9 as MindooDBAppTimestampApi, ea as MindooDBAppTimestampInput, eb as MindooDBAppTimestampProvider, ec as MindooDBAppTimestampResult, ed as MindooDBAppTimestampValue, ee as MindooDBAppTypedValue, ef as MindooDBAppUiPreferences, eg as MindooDBAppUpdateDocumentInput, eh as MindooDBAppValue, ei as MindooDBAppViewCursorDocumentListResult, ej as MindooDBAppViewCursorResult, ek as MindooDBAppViewEntry, el as MindooDBAppViewEntryKind, em as MindooDBAppViewNavigator, en as MindooDBAppViewNavigatorExpansionState, eo as MindooDBAppViewNavigatorOpenOptions, ep as MindooDBAppViewNavigatorPageOptions, eq as MindooDBAppViewNavigatorPageResult, er as MindooDBAppViewNavigatorRangeQuery, es as MindooDBAppViewNavigatorSelectionState, et as MindooDBAppViewUpdateStats, eu as MindooDBAppViewport, ev as MindooDBAppWellKnownDragType, ew as MindooDBAppWritableAttachmentStream, ex as defineDocumentRules, ey as mindooDBAppAcceptMatchesType, ez as mindooDBAppComponentFieldsMatch, eA as mindooDBAppComponentSupports, eB as mindooDBAppInspectContracts, eC as mindooDBAppInspectRules, eD as mindooDBAppInspectionSummaryValue, eE as normalizeMindooDBAppInspectAnchor, eF as normalizeMindooDBAppInspectRequest, eG as normalizeMindooDBAppInspection, eH as normalizeMindooDBAppIssues, eI as readMindooDBAppInspectionSummary, eJ as resolveMindooDBAppDefinitionUrl, eK as resolveMindooDBAppEmbedValidation, eL as resolveMindooDBAppListingAssetUrl, eM as resolveMindooDBAppLocalizedText, eN as summarizeMindooDBAppInspection, eO as validateMindooDBAppAccepts, eP as validateMindooDBAppAgentProfile, eQ as validateMindooDBAppComponents, eR as validateMindooDBAppDefinition } from './types-DN-E0X34.js';
1
+ import { M as MindooDBAppAttachmentPreviewMode, a as MindooDBAppDragBindSourceOptions, b as MindooDBAppDragStartInput, c as MindooDBAppDragStartResult, d as MindooDBAppDragPreview, e as MindooDBAppBridge, f as MindooDBAppAgentToolErrorCode, g as MindooDBAppAgentTool, h as MindooDBAppHostShortcutBinding, i as MindooDBAppHostShortcutAction, j as MindooDBAppHostingMode, k as MindooDBAppDefinition, l as MindooDBAppDatabase, m as MindooDBAppDocument, n as MindooDBAppRichTextSpan, o as MindooDBAppRichTextSnapshot, p as MindooDBAppCreateDocumentInput } from './types-CbH_R16h.js';
2
+ export { q as MINDOODB_APP_ACCEPTS_MAX, r as MINDOODB_APP_AGENT_CAPABILITIES_MAX, s as MINDOODB_APP_AGENT_CAPABILITY_TITLE_MAX, t as MINDOODB_APP_AGENT_CAPABILITY_TOOLS_MAX, u as MINDOODB_APP_AGENT_EXAMPLE_MAX, v as MINDOODB_APP_AGENT_GUIDE_MAX_BYTES, w as MINDOODB_APP_AGENT_LIMIT_MAX, x as MINDOODB_APP_AGENT_LIST_MAX, y as MINDOODB_APP_AGENT_SUMMARY_MAX, z as MINDOODB_APP_AGENT_TOOL_NAME_PATTERN, A as MINDOODB_APP_COMPONENTS_MAX, B as MINDOODB_APP_COMPONENT_CONTRACT_PATTERN, C as MINDOODB_APP_DEFINITION_FILE_NAME, D as MINDOODB_APP_DEFINITION_FORMAT, E as MINDOODB_APP_DEFINITION_PERMISSIONS, F as MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS, G as MINDOODB_APP_DEFINITION_VERSION, H as MINDOODB_APP_EMBED_EXPORT_MAX_BYTES, I as MINDOODB_APP_EMBED_VARIABLES_MAX, J as MINDOODB_APP_INSPECTION_FIELD, K as MINDOODB_APP_INSPECTION_MAX_BYTES, L as MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES, N as MINDOODB_APP_ISSUES_MAX, O as MINDOODB_APP_LISTING_DESCRIPTION_MAX, P as MINDOODB_APP_LISTING_MAX_SCREENSHOTS, Q as MINDOODB_APP_LISTING_SUMMARY_MAX, R as MINDOODB_APP_SEAL_SIGNING_DOMAIN, S as MINDOODB_APP_VALUE_TAG, T as MINDOODB_APP_WELL_KNOWN_DRAG_TYPES, U as MINDOODB_INSPECT_DOCUMENT, V as MINDOODB_INSPECT_SLIDES, W as MINDOODB_INSPECT_SPREADSHEET, X as MindooDBAppAcceptSpec, Y as MindooDBAppAccessDecision, Z as MindooDBAppAccessTier, _ as MindooDBAppAgentApi, $ as MindooDBAppAgentCapability, a0 as MindooDBAppAgentProfile, a1 as MindooDBAppAgentRegistration, a2 as MindooDBAppAgentToolAnnotations, a3 as MindooDBAppAgentToolDescriptor, a4 as MindooDBAppAgentToolScope, a5 as MindooDBAppAtomicValue, a6 as MindooDBAppAttachmentApi, a7 as MindooDBAppAttachmentChunk, a8 as MindooDBAppAttachmentInfo, a9 as MindooDBAppAttachmentPreviewOptions, aa as MindooDBAppAttachmentPreviewSession, ab as MindooDBAppAutomergeChangesPatch, ac as MindooDBAppAutomergeChangesSince, ad as MindooDBAppAutomergeGetOptions, ae as MindooDBAppAutomergePatchResult, af as MindooDBAppAutomergeSnapshot, ag as MindooDBAppBridgeAgentInvokeMessage, ah as MindooDBAppBridgeAgentResultMessage, ai as MindooDBAppBridgeBeforeCloseAck, aj as MindooDBAppBridgeBeforeCloseMessage, ak as MindooDBAppBridgeConnectMessage, al as MindooDBAppBridgeConnectOptions, am as MindooDBAppBridgeConnectedMessage, an as MindooDBAppBridgeDragDropMessage, ao as MindooDBAppBridgeDragLeaveMessage, ap as MindooDBAppBridgeDragOverMessage, aq as MindooDBAppBridgeEmbedEventMessage, ar as MindooDBAppBridgeEmbedRequestMessage, as as MindooDBAppBridgeEmbeddingRequestMessage, at as MindooDBAppBridgeErrorPayload, au as MindooDBAppBridgeHandshakeErrorMessage, av as MindooDBAppBridgeHostFocusChangedMessage, aw as MindooDBAppBridgeIncomingContentMessage, ax as MindooDBAppBridgeLocaleChangedMessage, ay as MindooDBAppBridgePortMessage, az as MindooDBAppBridgeQueryResultMessage, aA as MindooDBAppBridgeReminderOpenedMessage, aB as MindooDBAppBridgeRpcError, aC as MindooDBAppBridgeRpcMessage, aD as MindooDBAppBridgeRpcRequest, aE as MindooDBAppBridgeRpcSuccess, aF as MindooDBAppBridgeShortcutInvokedMessage, aG as MindooDBAppBridgeShortcutsChangedMessage, aH as MindooDBAppBridgeStreamAbortRequest, aI as MindooDBAppBridgeStreamAck, aJ as MindooDBAppBridgeStreamCloseRequest, aK as MindooDBAppBridgeStreamError, aL as MindooDBAppBridgeStreamMessage, aM as MindooDBAppBridgeStreamOpenResult, aN as MindooDBAppBridgeStreamReadRequest, aO as MindooDBAppBridgeStreamWriteRequest, aP as MindooDBAppBridgeThemeChangedMessage, aQ as MindooDBAppBridgeUiPreferencesChangedMessage, aR as MindooDBAppBridgeViewChangedMessage, aS as MindooDBAppBridgeViewportChangedMessage, aT as MindooDBAppBridgeWorkspaceFocusRequestedMessage, aU as MindooDBAppBrowserFeatures, aV as MindooDBAppCapability, aW as MindooDBAppComponentCategory, aX as MindooDBAppComponentChildren, aY as MindooDBAppComponentContract, aZ as MindooDBAppComponentFieldValue, a_ as MindooDBAppComponentInfo, a$ as MindooDBAppComponentIntent, b0 as MindooDBAppComponentQuery, b1 as MindooDBAppComponentReference, b2 as MindooDBAppComponentSpec, b3 as MindooDBAppComponentsApi, b4 as MindooDBAppConfiguredViewCategorizationStyle, b5 as MindooDBAppConfiguredViewColumn, b6 as MindooDBAppConfiguredViewColumnRole, b7 as MindooDBAppConfiguredViewExpressionMode, b8 as MindooDBAppConfiguredViewFieldExpression, b9 as MindooDBAppConfiguredViewFilterDefinition, ba as MindooDBAppConfiguredViewFilterMode, bb as MindooDBAppConfiguredViewFilterRule, bc as MindooDBAppConfiguredViewFormulaExpression, bd as MindooDBAppConfiguredViewFormulaFilterDefinition, be as MindooDBAppConfiguredViewPreviewMode, bf as MindooDBAppConfiguredViewRuleFilterDefinition, bg as MindooDBAppConfiguredViewRuleMatchMode, bh as MindooDBAppConfiguredViewRuleOperator, bi as MindooDBAppConfiguredViewValueExpression, bj as MindooDBAppCounterValue, bk as MindooDBAppCreateKeyInfo, bl as MindooDBAppCreateViewInput, bm as MindooDBAppCreateViewNavigatorInput, bn as MindooDBAppDatabaseInfo, bo as MindooDBAppDefinitionDatabase, bp as MindooDBAppDefinitionListing, bq as MindooDBAppDefinitionPermission, br as MindooDBAppDefinitionRegistrationPermission, bs as MindooDBAppDefinitionScreenshot, bt as MindooDBAppDefinitionValidation, bu as MindooDBAppDirectoryApi, bv as MindooDBAppDirectoryEntry, bw as MindooDBAppDocumentApi, bx as MindooDBAppDocumentHeadCursorResult, by as MindooDBAppDocumentHistoryEntry, bz as MindooDBAppDocumentInspection, bA as MindooDBAppDocumentListQuery, bB as MindooDBAppDocumentListResult, bC as MindooDBAppDocumentQuery, bD as MindooDBAppDocumentRevisionId, bE as MindooDBAppDocumentRule, bF as MindooDBAppDocumentRuleOutcome, bG as MindooDBAppDocumentRules, bH as MindooDBAppDocumentScanPreset, bI as MindooDBAppDocumentSummary, bJ as MindooDBAppDragApi, bK as MindooDBAppDragCancelReason, bL as MindooDBAppDragDropEvent, bM as MindooDBAppDragEffect, bN as MindooDBAppDragHoverResult, bO as MindooDBAppDragOffer, bP as MindooDBAppDragOverEvent, bQ as MindooDBAppDragPointer, bR as MindooDBAppDragProfile, bS as MindooDBAppEmbed, bT as MindooDBAppEmbedAccessComponent, bU as MindooDBAppEmbedAccessInput, bV as MindooDBAppEmbedAccessPair, bW as MindooDBAppEmbedAccessResult, bX as MindooDBAppEmbedAgentTools, bY as MindooDBAppEmbedAgentToolsEvent, bZ as MindooDBAppEmbedBeforeSaveInput, b_ as MindooDBAppEmbedBeforeSaveResult, b$ as MindooDBAppEmbedCloseReason, c0 as MindooDBAppEmbedClosedEvent, c1 as MindooDBAppEmbedContext, c2 as MindooDBAppEmbedDirtyEvent, c3 as MindooDBAppEmbedExportFormat, c4 as MindooDBAppEmbedExportPayload, c5 as MindooDBAppEmbedExportRequest, c6 as MindooDBAppEmbedOpenInput, c7 as MindooDBAppEmbedRect, c8 as MindooDBAppEmbedSavedEvent, c9 as MindooDBAppEmbedTemplate, ca as MindooDBAppEmbedValidation, cb as MindooDBAppEmbedValidationError, cc as MindooDBAppEmbedVariable, cd as MindooDBAppEmbeddingApi, ce as MindooDBAppEmbeddingExport, cf as MindooDBAppEmbeddingLookupOptions, cg as MindooDBAppEmbeddingLookupResult, ch as MindooDBAppEmbeddingResult, ci as MindooDBAppEmbeddingSaveContext, cj as MindooDBAppEmbedsApi, ck as MindooDBAppEntryAttachmentRef, cl as MindooDBAppEntryProvenance, cm as MindooDBAppExtractDocumentTextInput, cn as MindooDBAppExtractDocumentTextResult, co as MindooDBAppExtractTextFormat, cp as MindooDBAppExtractionSetup, cq as MindooDBAppFulltextSetup, cr as MindooDBAppHistoricalDocument, cs as MindooDBAppHistoryQuery, ct as MindooDBAppHostTheme, cu as MindooDBAppIdentityApi, cv as MindooDBAppInaccessibleDocument, cw as MindooDBAppInaccessibleDocumentListQuery, cx as MindooDBAppInaccessibleDocumentListResult, cy as MindooDBAppIncomingContent, cz as MindooDBAppIncomingContentHandler, cA as MindooDBAppIncomingContentInfo, cB as MindooDBAppIncomingItem, cC as MindooDBAppIncomingItemInfo, cD as MindooDBAppIncomingResult, cE as MindooDBAppIncomingSource, cF as MindooDBAppInspectAnchor, cG as MindooDBAppInspectRequest, cH as MindooDBAppInspectedCell, cI as MindooDBAppInspection, cJ as MindooDBAppInspectionBase, cK as MindooDBAppIssue, cL as MindooDBAppIssueSeverity, cM as MindooDBAppJsonCounterIncrementPatch, cN as MindooDBAppJsonListDeletePatch, cO as MindooDBAppJsonListInsertPatch, cP as MindooDBAppJsonPatch, cQ as MindooDBAppJsonSetPatch, cR as MindooDBAppJsonTextMarkPatch, cS as MindooDBAppJsonTextSplicePatch, cT as MindooDBAppJsonTextUnmarkPatch, cU as MindooDBAppJsonUnsetPatch, cV as MindooDBAppLaunchContext, cW as MindooDBAppListUsersOptions, cX as MindooDBAppListUsersPage, cY as MindooDBAppLiveQuerySubscription, cZ as MindooDBAppLocaleMap, c_ as MindooDBAppLocalizedText, c$ as MindooDBAppMenuAnchor, d0 as MindooDBAppMenuApi, d1 as MindooDBAppMenuCommandItem, d2 as MindooDBAppMenuDismissReason, d3 as MindooDBAppMenuDismissedResult, d4 as MindooDBAppMenuItem, d5 as MindooDBAppMenuKind, d6 as MindooDBAppMenuPlacement, d7 as MindooDBAppMenuPointAnchor, d8 as MindooDBAppMenuRect, d9 as MindooDBAppMenuRectAnchor, da as MindooDBAppMenuSelectionResult, db as MindooDBAppMenuSeparatorItem, dc as MindooDBAppNotificationSeverity, dd as MindooDBAppNotifyInput, de as MindooDBAppNotifyResult, df as MindooDBAppPdfApi, dg as MindooDBAppPdfSignInput, dh as MindooDBAppPdfSignResult, di as MindooDBAppPdfSignaturePosition, dj as MindooDBAppPdfSigner, dk as MindooDBAppProposeAppInput, dl as MindooDBAppProposeAppResult, dm as MindooDBAppQueryCoverage, dn as MindooDBAppQueryInclude, dp as MindooDBAppQueryIncludeCardinality, dq as MindooDBAppQueryIncludeSlots, dr as MindooDBAppQueryResult, ds as MindooDBAppQueryRow, dt as MindooDBAppQuerySortKey, du as MindooDBAppQueryTextClause, dv as MindooDBAppReadableAttachmentStream, dw as MindooDBAppRecipientOptions, dx as MindooDBAppReminder, dy as MindooDBAppReminderOpened, dz as MindooDBAppReminderOpenedHandler, dA as MindooDBAppReminderRequest, dB as MindooDBAppReminderScheduleResult, dC as MindooDBAppRemindersApi, dD as MindooDBAppResolvedViewDefinition, dE as MindooDBAppResolvedViewSource, dF as MindooDBAppRevisionPhase, dG as MindooDBAppRevisionVerification, dH as MindooDBAppRichTextBlockSpan, dI as MindooDBAppRichTextGetOptions, dJ as MindooDBAppRichTextImmutableString, dK as MindooDBAppRichTextMarkRange, dL as MindooDBAppRichTextMaterializeValue, dM as MindooDBAppRichTextPatch, dN as MindooDBAppRichTextScalar, dO as MindooDBAppRichTextSpliceStep, dP as MindooDBAppRichTextStep, dQ as MindooDBAppRichTextStepPatch, dR as MindooDBAppRichTextTextSpan, dS as MindooDBAppRuntime, dT as MindooDBAppScanAttachmentOptions, dU as MindooDBAppScanAttachmentResult, dV as MindooDBAppScopedDocId, dW as MindooDBAppScopedDocumentSummary, dX as MindooDBAppSealIntent, dY as MindooDBAppSealedChannelOpenInput, dZ as MindooDBAppSealedChannelOpenResult, d_ as MindooDBAppSealedChannelRequestInput, d$ as MindooDBAppSession, e0 as MindooDBAppShowMenuInput, e1 as MindooDBAppShowMenuResult, e2 as MindooDBAppSignPreview, e3 as MindooDBAppSignPreviewScope, e4 as MindooDBAppSignStatementInput, e5 as MindooDBAppSignStatementResult, e6 as MindooDBAppSlidesInspection, e7 as MindooDBAppSpreadsheetInspection, e8 as MindooDBAppStorageApi, e9 as MindooDBAppSummarySetup, ea as MindooDBAppTextCursorOptions, eb as MindooDBAppTextCursorPosition, ec as MindooDBAppTextCursorPositionsResult, ed as MindooDBAppTextCursorsResult, ee as MindooDBAppTextEdit, ef as MindooDBAppTextPatch, eg as MindooDBAppThemeMode, eh as MindooDBAppTimestampApi, ei as MindooDBAppTimestampInput, ej as MindooDBAppTimestampProvider, ek as MindooDBAppTimestampResult, el as MindooDBAppTimestampValue, em as MindooDBAppTypedValue, en as MindooDBAppUiPreferences, eo as MindooDBAppUpdateDocumentInput, ep as MindooDBAppValue, eq as MindooDBAppViewCursorDocumentListResult, er as MindooDBAppViewCursorResult, es as MindooDBAppViewEntry, et as MindooDBAppViewEntryKind, eu as MindooDBAppViewNavigator, ev as MindooDBAppViewNavigatorExpansionState, ew as MindooDBAppViewNavigatorOpenOptions, ex as MindooDBAppViewNavigatorPageOptions, ey as MindooDBAppViewNavigatorPageResult, ez as MindooDBAppViewNavigatorRangeQuery, eA as MindooDBAppViewNavigatorSelectionState, eB as MindooDBAppViewUpdateStats, eC as MindooDBAppViewport, eD as MindooDBAppWellKnownDragType, eE as MindooDBAppWritableAttachmentStream, eF as defineDocumentRules, eG as mindooDBAppAcceptMatchesType, eH as mindooDBAppComponentFieldsMatch, eI as mindooDBAppComponentSupports, eJ as mindooDBAppExportFile, eK as mindooDBAppExportMimeType, eL as mindooDBAppExportPayload, eM as mindooDBAppInspectContracts, eN as mindooDBAppInspectRules, eO as mindooDBAppInspectionSummaryValue, eP as normalizeMindooDBAppEmbedExportRequest, eQ as normalizeMindooDBAppEmbedVariables, eR as normalizeMindooDBAppInspectAnchor, eS as normalizeMindooDBAppInspectRequest, eT as normalizeMindooDBAppInspection, eU as normalizeMindooDBAppIssues, eV as readMindooDBAppInspectionSummary, eW as resolveMindooDBAppDefinitionUrl, eX as resolveMindooDBAppEmbedValidation, eY as resolveMindooDBAppListingAssetUrl, eZ as resolveMindooDBAppLocalizedText, e_ as resolveMindooDBAppVariables, e$ as summarizeMindooDBAppInspection, f0 as validateMindooDBAppAccepts, f1 as validateMindooDBAppAgentProfile, f2 as validateMindooDBAppComponents, f3 as validateMindooDBAppDefinition } from './types-CbH_R16h.js';
3
3
  export { M as MINDOODB_APP_BUNDLE_ARCHIVE_FILE_NAME, a as MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME, b as MINDOODB_APP_BUNDLE_MANIFEST_FORMAT, c as MINDOODB_APP_BUNDLE_MANIFEST_VERSION, d as MindooDBAppBundleArchive, e as MindooDBAppBundleFileEntry, f as MindooDBAppBundleHash, g as MindooDBAppBundleManifest, h as MindooDBAppBundleManifestValidation, i as buildMindooDBAppBundleContentHashInput, j as isMindooDBAppBundleHash, n as normalizeMindooDBAppBundlePath, v as validateMindooDBAppBundleManifest } from './appBundleManifest-B0xfpaXG.js';
4
4
  import { MindooDBAppBooleanExpression } from 'mindoodb-view-language';
5
5
  export { MindooDBAppBooleanExpression, MindooDBAppExpression, MindooDBAppFilterDefinition, MindooDBAppViewCategoryChildrenPageRequest, MindooDBAppViewColumn, MindooDBAppViewColumnRole, MindooDBAppViewDefinition, MindooDBAppViewExpansionState, MindooDBAppViewExpressionBase, MindooDBAppViewExpressionDatePart, MindooDBAppViewExpressionOperation, MindooDBAppViewFieldExpression, MindooDBAppViewIfExpression, MindooDBAppViewLetExpression, MindooDBAppViewLiteralExpression, MindooDBAppViewLookupByPath, MindooDBAppViewOperationExpression, MindooDBAppViewOriginExpression, MindooDBAppViewPageRequest, MindooDBAppViewPageResult, MindooDBAppViewRow, MindooDBAppViewSortDirection, MindooDBAppViewTotalMode, MindooDBAppViewValueExpressionRef, MindooDBAppViewVariableExpression, createViewLanguage } from 'mindoodb-view-language';
package/dist/index.js CHANGED
@@ -1,3 +1,13 @@
1
+ import {
2
+ MINDOODB_APP_BUNDLE_ARCHIVE_FILE_NAME,
3
+ MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME,
4
+ MINDOODB_APP_BUNDLE_MANIFEST_FORMAT,
5
+ MINDOODB_APP_BUNDLE_MANIFEST_VERSION,
6
+ buildMindooDBAppBundleContentHashInput,
7
+ isMindooDBAppBundleHash,
8
+ normalizeMindooDBAppBundlePath,
9
+ validateMindooDBAppBundleManifest
10
+ } from "./chunk-LT4FK6LU.js";
1
11
  import {
2
12
  DEFAULT_DRAG_LONG_PRESS_MS,
3
13
  DEFAULT_DRAG_POINTER_THRESHOLD_PX,
@@ -19,6 +29,8 @@ import {
19
29
  MINDOODB_APP_DEFINITION_PERMISSIONS,
20
30
  MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS,
21
31
  MINDOODB_APP_DEFINITION_VERSION,
32
+ MINDOODB_APP_EMBED_EXPORT_MAX_BYTES,
33
+ MINDOODB_APP_EMBED_VARIABLES_MAX,
22
34
  MINDOODB_APP_INSPECTION_FIELD,
23
35
  MINDOODB_APP_INSPECTION_MAX_BYTES,
24
36
  MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES,
@@ -54,6 +66,9 @@ import {
54
66
  mindooDBAppAcceptMatchesType,
55
67
  mindooDBAppComponentFieldsMatch,
56
68
  mindooDBAppComponentSupports,
69
+ mindooDBAppExportFile,
70
+ mindooDBAppExportMimeType,
71
+ mindooDBAppExportPayload,
57
72
  mindooDBAppInspectContracts,
58
73
  mindooDBAppInspectRules,
59
74
  mindooDBAppInspectionSummaryValue,
@@ -62,6 +77,8 @@ import {
62
77
  normalizeDragAccepts,
63
78
  normalizeDragPointerInput,
64
79
  normalizeDragStartInput,
80
+ normalizeMindooDBAppEmbedExportRequest,
81
+ normalizeMindooDBAppEmbedVariables,
65
82
  normalizeMindooDBAppInspectAnchor,
66
83
  normalizeMindooDBAppInspectRequest,
67
84
  normalizeMindooDBAppInspection,
@@ -72,6 +89,7 @@ import {
72
89
  resolveMindooDBAppEmbedValidation,
73
90
  resolveMindooDBAppListingAssetUrl,
74
91
  resolveMindooDBAppLocalizedText,
92
+ resolveMindooDBAppVariables,
75
93
  sanitizeHostShortcutBindings,
76
94
  snapshotElementToPng,
77
95
  summarizeMindooDBAppInspection,
@@ -79,17 +97,7 @@ import {
79
97
  validateMindooDBAppAgentProfile,
80
98
  validateMindooDBAppComponents,
81
99
  validateMindooDBAppDefinition
82
- } from "./chunk-UFP7O4OJ.js";
83
- import {
84
- MINDOODB_APP_BUNDLE_ARCHIVE_FILE_NAME,
85
- MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME,
86
- MINDOODB_APP_BUNDLE_MANIFEST_FORMAT,
87
- MINDOODB_APP_BUNDLE_MANIFEST_VERSION,
88
- buildMindooDBAppBundleContentHashInput,
89
- isMindooDBAppBundleHash,
90
- normalizeMindooDBAppBundlePath,
91
- validateMindooDBAppBundleManifest
92
- } from "./chunk-LT4FK6LU.js";
100
+ } from "./chunk-FKTNDDWB.js";
93
101
 
94
102
  // src/types.ts
95
103
  var MINDOODB_APP_WELL_KNOWN_DRAG_TYPES = [
@@ -1417,6 +1425,8 @@ export {
1417
1425
  MINDOODB_APP_DEFINITION_PERMISSIONS,
1418
1426
  MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS,
1419
1427
  MINDOODB_APP_DEFINITION_VERSION,
1428
+ MINDOODB_APP_EMBED_EXPORT_MAX_BYTES,
1429
+ MINDOODB_APP_EMBED_VARIABLES_MAX,
1420
1430
  MINDOODB_APP_HOSTING_QUERY_PARAM,
1421
1431
  MINDOODB_APP_INSPECTION_FIELD,
1422
1432
  MINDOODB_APP_INSPECTION_MAX_BYTES,
@@ -1475,6 +1485,9 @@ export {
1475
1485
  mindooDBAppAcceptMatchesType,
1476
1486
  mindooDBAppComponentFieldsMatch,
1477
1487
  mindooDBAppComponentSupports,
1488
+ mindooDBAppExportFile,
1489
+ mindooDBAppExportMimeType,
1490
+ mindooDBAppExportPayload,
1478
1491
  mindooDBAppInspectContracts,
1479
1492
  mindooDBAppInspectRules,
1480
1493
  mindooDBAppInspectionSummaryValue,
@@ -1484,6 +1497,8 @@ export {
1484
1497
  normalizeDragPointerInput,
1485
1498
  normalizeDragStartInput,
1486
1499
  normalizeMindooDBAppBundlePath,
1500
+ normalizeMindooDBAppEmbedExportRequest,
1501
+ normalizeMindooDBAppEmbedVariables,
1487
1502
  normalizeMindooDBAppInspectAnchor,
1488
1503
  normalizeMindooDBAppInspectRequest,
1489
1504
  normalizeMindooDBAppInspection,
@@ -1501,6 +1516,7 @@ export {
1501
1516
  resolveMindooDBAppEmbedValidation,
1502
1517
  resolveMindooDBAppListingAssetUrl,
1503
1518
  resolveMindooDBAppLocalizedText,
1519
+ resolveMindooDBAppVariables,
1504
1520
  sanitizeHostShortcutBindings,
1505
1521
  sanitizeListingHref,
1506
1522
  snapshotElementToPng,
@@ -1,4 +1,4 @@
1
- import { aY as MindooDBAppComponentInfo, c2 as MindooDBAppEmbedRect, bV as MindooDBAppEmbedAgentTools, cy as MindooDBAppInspectRequest, cC as MindooDBAppIssue, cx as MindooDBAppInspectAnchor, c7 as MindooDBAppEmbeddingLookupOptions, c8 as MindooDBAppEmbeddingLookupResult, bT as MindooDBAppEmbedAccessPair, cB as MindooDBAppInspectionBase, c4 as MindooDBAppEmbedValidation, a1 as MindooDBAppAgentToolDescriptor, f as MindooDBAppAgentToolErrorCode, af as MindooDBAppBridgeAgentResultMessage, ae as MindooDBAppBridgeAgentInvokeMessage, bk as MindooDBAppCreateViewNavigatorInput, em as MindooDBAppViewNavigator, aB as MindooDBAppBridgeRpcRequest, cl as MindooDBAppHostTheme, aT as MindooDBAppCapability, eg as MindooDBAppUpdateDocumentInput, m as MindooDBAppDocument, k as MindooDBAppDefinition, a4 as MindooDBAppAttachmentApi, e as MindooDBAppBridge, dT as MindooDBAppSession, dc as MindooDBAppProposeAppInput, eu as MindooDBAppViewport, ef as MindooDBAppUiPreferences, di as MindooDBAppQueryResult, et as MindooDBAppViewUpdateStats, aw as MindooDBAppBridgePortMessage, bl as MindooDBAppDatabaseInfo, d8 as MindooDBAppPdfSignInput, bS as MindooDBAppEmbedAccessInput, bZ as MindooDBAppEmbedCloseReason, ar as MindooDBAppBridgeErrorPayload, cN as MindooDBAppLaunchContext, bu as MindooDBAppDocumentApi, eo as MindooDBAppViewNavigatorOpenOptions, cm as MindooDBAppIdentityApi, e9 as MindooDBAppTimestampApi, bs as MindooDBAppDirectoryApi, ci as MindooDBAppFulltextSetup, ch as MindooDBAppExtractionSetup, e1 as MindooDBAppSummarySetup, dd as MindooDBAppProposeAppResult, cw as MindooDBAppIncomingSource, c as MindooDBAppDragStartResult, bP as MindooDBAppDragProfile, cv as MindooDBAppIncomingResult, dp as MindooDBAppReminder } from '../types-DN-E0X34.js';
1
+ import { a_ as MindooDBAppComponentInfo, c7 as MindooDBAppEmbedRect, bX as MindooDBAppEmbedAgentTools, cG as MindooDBAppInspectRequest, cK as MindooDBAppIssue, cF as MindooDBAppInspectAnchor, c5 as MindooDBAppEmbedExportRequest, cc as MindooDBAppEmbedVariable, cf as MindooDBAppEmbeddingLookupOptions, cg as MindooDBAppEmbeddingLookupResult, bV as MindooDBAppEmbedAccessPair, cJ as MindooDBAppInspectionBase, ce as MindooDBAppEmbeddingExport, ca as MindooDBAppEmbedValidation, a3 as MindooDBAppAgentToolDescriptor, f as MindooDBAppAgentToolErrorCode, ah as MindooDBAppBridgeAgentResultMessage, ag as MindooDBAppBridgeAgentInvokeMessage, bm as MindooDBAppCreateViewNavigatorInput, eu as MindooDBAppViewNavigator, aD as MindooDBAppBridgeRpcRequest, ct as MindooDBAppHostTheme, aV as MindooDBAppCapability, eo as MindooDBAppUpdateDocumentInput, m as MindooDBAppDocument, k as MindooDBAppDefinition, a6 as MindooDBAppAttachmentApi, e as MindooDBAppBridge, d$ as MindooDBAppSession, dk as MindooDBAppProposeAppInput, eC as MindooDBAppViewport, en as MindooDBAppUiPreferences, dr as MindooDBAppQueryResult, eB as MindooDBAppViewUpdateStats, ay as MindooDBAppBridgePortMessage, bn as MindooDBAppDatabaseInfo, dg as MindooDBAppPdfSignInput, bU as MindooDBAppEmbedAccessInput, b$ as MindooDBAppEmbedCloseReason, at as MindooDBAppBridgeErrorPayload, cV as MindooDBAppLaunchContext, bw as MindooDBAppDocumentApi, ew as MindooDBAppViewNavigatorOpenOptions, cu as MindooDBAppIdentityApi, eh as MindooDBAppTimestampApi, bu as MindooDBAppDirectoryApi, cq as MindooDBAppFulltextSetup, cp as MindooDBAppExtractionSetup, e9 as MindooDBAppSummarySetup, dl as MindooDBAppProposeAppResult, cE as MindooDBAppIncomingSource, c as MindooDBAppDragStartResult, bR as MindooDBAppDragProfile, cD as MindooDBAppIncomingResult, dx as MindooDBAppReminder } from '../types-CbH_R16h.js';
2
2
  import * as mindoodb from 'mindoodb';
3
3
  import 'mindoodb-view-language';
4
4
 
@@ -25,6 +25,13 @@ interface MockEmbedState {
25
25
  } | null;
26
26
  /** What the app asked of the component, oldest first. */
27
27
  requests: MockEmbedRequest[];
28
+ /** The values offered as fields (`embeds.open({ variables })`, `embed.setVariables`). */
29
+ variables: MindooDBAppEmbedVariable[];
30
+ /** The template the document starts from (`embeds.open({ template })`). */
31
+ template?: {
32
+ databaseId: string;
33
+ docId: string;
34
+ };
28
35
  }
29
36
  /** One request of the host app to its component, as the mock recorded it. */
30
37
  type MockEmbedRequest = {
@@ -40,6 +47,9 @@ type MockEmbedRequest = {
40
47
  request: "callTool";
41
48
  name: string;
42
49
  input: Record<string, unknown>;
50
+ } | {
51
+ request: "export";
52
+ export: MindooDBAppEmbedExportRequest;
43
53
  };
44
54
  /** How an app running as an embedded component finished (`session.embedding`). */
45
55
  interface MockEmbeddingFinish {
@@ -68,6 +78,13 @@ interface MockEmbedHostOptions {
68
78
  * embed's document. Without it components cannot describe theirs (`unsupported`).
69
79
  */
70
80
  embedInspection?: (embed: MockEmbedState, request: MindooDBAppInspectRequest) => MindooDBAppInspectionBase | Promise<MindooDBAppInspectionBase>;
81
+ /**
82
+ * Plays the components for `embed.export` (they must declare `export:<format>`);
83
+ * without it exports fail with `unsupported`.
84
+ */
85
+ embedExport?: (embed: MockEmbedState, request: MindooDBAppEmbedExportRequest) => MindooDBAppEmbeddingExport | Promise<MindooDBAppEmbeddingExport>;
86
+ /** For an app under test that runs as a component: the host's variables at start. */
87
+ embeddingVariables?: MindooDBAppEmbedVariable[];
71
88
  /** Plays the components for `embed.callTool`; without it calls fail with `unsupported`. */
72
89
  embedTools?: (embed: MockEmbedState, name: string, input: Record<string, unknown>) => unknown;
73
90
  /**
@@ -660,6 +677,10 @@ interface CreateMockMindooDBAppSessionOptions {
660
677
  embedInspection?: MockEmbedHostOptions["embedInspection"];
661
678
  /** Plays the components for `embed.callTool`. */
662
679
  embedTools?: MockEmbedHostOptions["embedTools"];
680
+ /** Plays the components for `embed.export`. */
681
+ embedExport?: MockEmbedHostOptions["embedExport"];
682
+ /** For an app under test that runs as a component: the host's variables at start. */
683
+ embeddingVariables?: MockEmbedHostOptions["embeddingVariables"];
663
684
  /** Plays the user when a save check found only warnings; default: save anyway. */
664
685
  confirmSaveWarnings?: MockEmbedHostOptions["confirmSaveWarnings"];
665
686
  /** For an app under test that runs as a component: its host's checks (`embedding.validate`). */
@@ -781,6 +802,10 @@ interface MockMindooDBAppSessionController {
781
802
  }>;
782
803
  /** For an app under test that runs as a component: how often it reported a save (`embedding.save`). */
783
804
  getEmbeddingSaveCount(): number;
805
+ /** For an app under test that runs as a component: the host changes its variables. */
806
+ requestEmbeddingVariables(variables: MindooDBAppEmbedVariable[]): Promise<void>;
807
+ /** For an app under test that runs as a component: asks it for a file (`embed.export`). */
808
+ requestEmbeddingExport(request: MindooDBAppEmbedExportRequest): Promise<File>;
784
809
  }
785
810
 
786
811
  /** Content for `emitIncomingContent`. */
@@ -944,6 +969,10 @@ interface FakeBridgeHostController {
944
969
  }>;
945
970
  /** For an app under test that runs as a component: how often it reported a save (`embedding.save`). */
946
971
  getEmbeddingSaveCount(): number;
972
+ /** For an app under test that runs as a component: the host changes its variables. */
973
+ requestEmbeddingVariables(variables: MindooDBAppEmbedVariable[]): Promise<void>;
974
+ /** For an app under test that runs as a component: asks it for a file (`embed.export`). */
975
+ requestEmbeddingExport(request: MindooDBAppEmbedExportRequest): Promise<File>;
947
976
  /**
948
977
  * Haven's agent-tool side: the tools and context the app declared, files in the
949
978
  * exchange, and `call()` to run a tool as an agent would.
@@ -4,6 +4,10 @@ import {
4
4
  assertValidMindooDBCreateIds,
5
5
  mindooDBAppComponentFieldsMatch,
6
6
  mindooDBAppComponentSupports,
7
+ mindooDBAppExportFile,
8
+ mindooDBAppExportPayload,
9
+ normalizeMindooDBAppEmbedExportRequest,
10
+ normalizeMindooDBAppEmbedVariables,
7
11
  normalizeMindooDBAppInspectAnchor,
8
12
  normalizeMindooDBAppInspectRequest,
9
13
  normalizeMindooDBAppInspection,
@@ -13,7 +17,7 @@ import {
13
17
  releaseMindooDBAppBridgeSessions,
14
18
  resolveMindooDBAppEmbedValidation,
15
19
  validateMindooDBAppDefinition
16
- } from "../chunk-UFP7O4OJ.js";
20
+ } from "../chunk-FKTNDDWB.js";
17
21
 
18
22
  // src/testing/index.ts
19
23
  import * as Automerge from "@automerge/automerge";
@@ -481,6 +485,9 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
481
485
  let inspectionProvider = null;
482
486
  let showIssuesHandler = null;
483
487
  let revealHandler = null;
488
+ let exportProvider = null;
489
+ let embeddingVariables = normalizeMindooDBAppEmbedVariables(options.embeddingVariables ?? []);
490
+ const variableListeners = /* @__PURE__ */ new Set();
484
491
  const embeddingValidations = [];
485
492
  let embeddingSaveCount = 0;
486
493
  const beforeSaveHandlers = /* @__PURE__ */ new Map();
@@ -534,6 +541,18 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
534
541
  if (!mindooDBAppComponentFieldsMatch(component.match, document2.data)) {
535
542
  throw new Error(`Document ${input.docId} is not a "${component.label}" document.`);
536
543
  }
544
+ let template;
545
+ if (input.template) {
546
+ const databaseId = input.template.databaseId ?? input.databaseId;
547
+ const source = await getDatabase(databaseId).documents.get(input.template.docId);
548
+ if (!source || !mindooDBAppComponentFieldsMatch(component.match, source.data)) {
549
+ throw new Error(`Template ${input.template.docId} is not a "${component.label}" document.`);
550
+ }
551
+ if (!(component.supports ?? []).includes("template")) {
552
+ throw Object.assign(new Error(`Component "${component.label}" cannot start from a template.`), { name: "unsupported" });
553
+ }
554
+ template = { databaseId, docId: input.template.docId };
555
+ }
537
556
  embedCounter += 1;
538
557
  const embedId = `mock-embed-${embedCounter}`;
539
558
  embeds.set(embedId, {
@@ -548,7 +567,9 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
548
567
  agentTools: null,
549
568
  supports: [...component.supports ?? []],
550
569
  beforeSave: null,
551
- requests: []
570
+ requests: [],
571
+ variables: normalizeMindooDBAppEmbedVariables(input.variables ?? []),
572
+ ...template ? { template } : {}
552
573
  });
553
574
  setActive(embedId);
554
575
  return embedId;
@@ -658,6 +679,12 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
658
679
  async callTool(name, input) {
659
680
  return await callEmbedTool(this.embedId, name, input ?? {});
660
681
  }
682
+ async setVariables(variables) {
683
+ setEmbedVariables(this.embedId, variables);
684
+ }
685
+ async export(request) {
686
+ return mindooDBAppExportFile(await exportEmbed(this.embedId, request));
687
+ }
661
688
  onDirtyChange(listener) {
662
689
  this.dirtyListeners.add(listener);
663
690
  return () => {
@@ -875,6 +902,19 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
875
902
  embeddingValidations.push({ interactive, result: structuredClone(result) });
876
903
  return result;
877
904
  }
905
+ function setEmbedVariables(embedId, variables) {
906
+ entryOf(embedId).variables = normalizeMindooDBAppEmbedVariables(variables);
907
+ notifyChange();
908
+ }
909
+ async function exportEmbed(embedId, request) {
910
+ const entry = entryOf(embedId);
911
+ const normalized = normalizeMindooDBAppEmbedExportRequest(request);
912
+ entry.requests.push({ request: "export", export: normalized });
913
+ if (!options.embedExport || !mindooDBAppComponentSupports(entry.supports, `export:${normalized.format}`)) {
914
+ throw unsupported(`The component cannot export ${normalized.format}.`);
915
+ }
916
+ return await mindooDBAppExportPayload(await options.embedExport(structuredClone(entry), normalized), normalized);
917
+ }
878
918
  function unsupportedHandler() {
879
919
  throw unsupported("unsupported");
880
920
  }
@@ -943,6 +983,21 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
943
983
  };
944
984
  },
945
985
  validate: validateEmbedding,
986
+ async getVariables() {
987
+ return embeddingVariables.map((variable) => ({ ...variable }));
988
+ },
989
+ onVariablesChange(listener) {
990
+ variableListeners.add(listener);
991
+ return () => {
992
+ variableListeners.delete(listener);
993
+ };
994
+ },
995
+ provideExport(provider) {
996
+ exportProvider = provider;
997
+ return () => {
998
+ if (exportProvider === provider) exportProvider = null;
999
+ };
1000
+ },
946
1001
  async save(flush, saveOptions) {
947
1002
  return await performMindooDBAppEmbeddingSave({
948
1003
  validate: () => validateEmbedding(saveOptions),
@@ -1054,6 +1109,20 @@ function createMockEmbedHost(options, getDatabase, listDatabaseIds = () => []) {
1054
1109
  validateEmbedding,
1055
1110
  recordEmbeddingSaved() {
1056
1111
  embeddingSaveCount += 1;
1112
+ },
1113
+ setEmbedVariables,
1114
+ exportEmbed,
1115
+ async requestEmbeddingVariables(variables) {
1116
+ embeddingVariables = normalizeMindooDBAppEmbedVariables(variables);
1117
+ variableListeners.forEach((listener) => listener(embeddingVariables.map((variable) => ({ ...variable }))));
1118
+ },
1119
+ getEmbeddingVariables() {
1120
+ return embeddingVariables.map((variable) => ({ ...variable }));
1121
+ },
1122
+ async requestEmbeddingExport(request) {
1123
+ if (!exportProvider) unsupportedHandler();
1124
+ const normalized = normalizeMindooDBAppEmbedExportRequest(request);
1125
+ return mindooDBAppExportFile(await mindooDBAppExportPayload(await exportProvider(normalized), normalized));
1057
1126
  }
1058
1127
  };
1059
1128
  }
@@ -6270,7 +6339,9 @@ function createMockMindooDBAppSession(options = {}) {
6270
6339
  requestEmbeddingShowIssues: (issues) => state.embedHost.requestEmbeddingShowIssues(issues),
6271
6340
  requestEmbeddingReveal: (anchor) => state.embedHost.requestEmbeddingReveal(anchor),
6272
6341
  getEmbeddingValidations: () => state.embedHost.getEmbeddingValidations(),
6273
- getEmbeddingSaveCount: () => state.embedHost.getEmbeddingSaveCount()
6342
+ getEmbeddingSaveCount: () => state.embedHost.getEmbeddingSaveCount(),
6343
+ requestEmbeddingVariables: (variables) => state.embedHost.requestEmbeddingVariables(variables),
6344
+ requestEmbeddingExport: (request) => state.embedHost.requestEmbeddingExport(request)
6274
6345
  };
6275
6346
  replicaStates.set(controller, state);
6276
6347
  return controller;
@@ -6626,6 +6697,13 @@ function createFakeBridgeHost(options = {}) {
6626
6697
  String(params.name),
6627
6698
  params.input ?? {}
6628
6699
  );
6700
+ case "embeds.setVariables":
6701
+ state.embedHost.setEmbedVariables(String(params.embedId), params.variables);
6702
+ return { ok: true };
6703
+ case "embeds.export":
6704
+ return await state.embedHost.exportEmbed(String(params.embedId), params.request);
6705
+ case "embedding.getVariables":
6706
+ return { variables: state.embedHost.getEmbeddingVariables() };
6629
6707
  case "embedding.validate":
6630
6708
  return await state.embedHost.validateEmbedding({ interactive: params.interactive !== false });
6631
6709
  case "embedding.saved":
@@ -7321,6 +7399,13 @@ function createFakeBridgeHost(options = {}) {
7321
7399
  },
7322
7400
  getEmbeddingValidations: () => state.embedHost.getEmbeddingValidations(),
7323
7401
  getEmbeddingSaveCount: () => state.embedHost.getEmbeddingSaveCount(),
7402
+ async requestEmbeddingVariables(variables) {
7403
+ await state.embedHost.requestEmbeddingVariables(variables);
7404
+ await pushEmbeddingRequest("variables", { variables: state.embedHost.getEmbeddingVariables() });
7405
+ },
7406
+ async requestEmbeddingExport(request) {
7407
+ return mindooDBAppExportFile(await pushEmbeddingRequest("export", { request }));
7408
+ },
7324
7409
  dispose() {
7325
7410
  restoreWindow();
7326
7411
  connectedPorts.forEach((port) => {
@@ -287,7 +287,10 @@ interface MindooDBAppComponentSpec {
287
287
  * can pick one that fits (`components.list({ requires })`): `inspect:<contract>`
288
288
  * (describes its document, e.g. `inspect:mindoo.inspect.document@1`), `validate`
289
289
  * (asks before it saves, `session.embedding.validate`), `issues` (shows a host's
290
- * findings, `embed.showIssues`), `reveal` (scrolls to an anchor, `embed.reveal`).
290
+ * findings, `embed.showIssues`), `reveal` (scrolls to an anchor, `embed.reveal`),
291
+ * `variables` (offers the host's fields to insert, `embed.setVariables`),
292
+ * `template` (starts a new document from a template, `embeds.open({ template })`),
293
+ * `export:<format>` (hands over a file, `embed.export`, e.g. `export:pdf`).
291
294
  * Changing it does not ask users again: it grants no access.
292
295
  */
293
296
  supports?: string[];
@@ -745,6 +748,80 @@ declare const mindooDBAppInspectRules: {
745
748
  */
746
749
  declare function resolveMindooDBAppEmbedValidation(issues: MindooDBAppIssue[], interactive: boolean, confirm: (warnings: MindooDBAppIssue[]) => boolean | Promise<boolean>): Promise<MindooDBAppEmbedValidation>;
747
750
 
751
+ /**
752
+ * What a host hands to an embedded component and gets back, beyond the document:
753
+ *
754
+ * - **Variables** (`embeds.open({ variables })`, `embed.setVariables`): named values
755
+ * the user can insert as fields ("Insert field ▸"), e.g. a contact's name and
756
+ * address. Word keeps them as MERGEFIELDs, text editors as `{{key}}`. Components
757
+ * that offer this declare `supports: ["variables"]`.
758
+ * - **Templates** (`embeds.open({ template })`): a new document starts as a copy of
759
+ * another one; the component copies it (it knows its format). `supports: ["template"]`.
760
+ * - **Export** (`embed.export({ format })`): the document as a file, e.g. a PDF to
761
+ * file with the record or a PNG preview. `supports: ["export:pdf", "export:png"]`.
762
+ */
763
+ /** A value a host offers to insert, e.g. `{ key: "company.name", label: "Company", value: "Müller GmbH" }`. */
764
+ interface MindooDBAppEmbedVariable {
765
+ /** Stable name: letters, digits, `_` and `.`; how fields refer to it (`{{company.name}}`, `MERGEFIELD company.name`). */
766
+ key: string;
767
+ /** For the user, in their language. */
768
+ label: string;
769
+ /** The current value; `""` when the host has none (the field stays visible as a field). */
770
+ value: string;
771
+ /** For grouping in menus, e.g. "Company" or "Contact person". */
772
+ group?: string;
773
+ }
774
+ declare const MINDOODB_APP_EMBED_VARIABLES_MAX = 200;
775
+ /**
776
+ * Variables as they may cross between apps: valid keys only, each once (the last
777
+ * wins), texts shortened, at most {@link MINDOODB_APP_EMBED_VARIABLES_MAX}.
778
+ */
779
+ declare function normalizeMindooDBAppEmbedVariables(raw: unknown): MindooDBAppEmbedVariable[];
780
+ /**
781
+ * `{{key}}` placeholders in `text` replaced by the variables' values; unknown keys
782
+ * (and keys whose value is empty, unless `keepEmpty`) stay as they are.
783
+ */
784
+ declare function resolveMindooDBAppVariables(text: string, variables: readonly MindooDBAppEmbedVariable[], options?: {
785
+ keepEmpty?: boolean;
786
+ }): string;
787
+ /** A template for `embeds.open`: the document a new one starts as a copy of. */
788
+ interface MindooDBAppEmbedTemplate {
789
+ /** Host database that holds the template; default the database of the new document. */
790
+ databaseId?: string;
791
+ docId: string;
792
+ }
793
+ /** Formats `embed.export` knows by name; components may offer others (`export:<format>`). */
794
+ type MindooDBAppEmbedExportFormat = "pdf" | "docx" | "xlsx" | "pptx" | "png" | "md" | "csv" | (string & {});
795
+ /** What a host asks `embed.export` for. */
796
+ interface MindooDBAppEmbedExportRequest {
797
+ format: MindooDBAppEmbedExportFormat;
798
+ /** `png`: the largest width and height in CSS pixels (a preview); the component keeps the aspect ratio. */
799
+ maxWidth?: number;
800
+ maxHeight?: number;
801
+ }
802
+ /** What a component's export provider returns: the file, or the bytes with name and type. */
803
+ type MindooDBAppEmbeddingExport = Blob | {
804
+ data: Blob | ArrayBuffer | Uint8Array;
805
+ name?: string;
806
+ mimeType?: string;
807
+ };
808
+ /** The export as it crosses between apps (Haven forwards it unchanged). */
809
+ interface MindooDBAppEmbedExportPayload {
810
+ data: ArrayBuffer;
811
+ name: string;
812
+ mimeType: string;
813
+ }
814
+ /** Exports larger than this are refused. */
815
+ declare const MINDOODB_APP_EMBED_EXPORT_MAX_BYTES: number;
816
+ /** The media type a format stands for (`application/octet-stream` for unknown ones). */
817
+ declare function mindooDBAppExportMimeType(format: string): string;
818
+ /** An export request as it may cross between apps. Throws without a usable format. */
819
+ declare function normalizeMindooDBAppEmbedExportRequest(raw: unknown): MindooDBAppEmbedExportRequest;
820
+ /** A provider's result as a payload: bytes, a name with the format's extension, the media type. */
821
+ declare function mindooDBAppExportPayload(result: MindooDBAppEmbeddingExport, request: MindooDBAppEmbedExportRequest, baseName?: string): Promise<MindooDBAppEmbedExportPayload>;
822
+ /** The payload as a `File` for the host. */
823
+ declare function mindooDBAppExportFile(payload: MindooDBAppEmbedExportPayload): File;
824
+
748
825
  /** Launch target used by the Haven when opening an app. */
749
826
  type MindooDBAppRuntime = "iframe" | "window";
750
827
  /**
@@ -982,6 +1059,15 @@ interface MindooDBAppEmbedContext {
982
1059
  /** Opening other documents. Always false: the sandbox only holds this one. */
983
1060
  open: boolean;
984
1061
  };
1062
+ /**
1063
+ * Set when the host wants the new document to start as a copy of a template
1064
+ * (`embeds.open({ template })`): the template's root document id in the sandbox.
1065
+ * It and its children are there to read only; copy them into `docId` while it is
1066
+ * still empty. Absent otherwise.
1067
+ */
1068
+ template?: {
1069
+ docId: string;
1070
+ };
985
1071
  }
986
1072
  /** Attachment metadata returned by the attachment APIs. */
987
1073
  interface MindooDBAppAttachmentInfo {
@@ -2311,6 +2397,19 @@ interface MindooDBAppEmbedOpenInput {
2311
2397
  rect?: MindooDBAppEmbedRect;
2312
2398
  /** Default true. */
2313
2399
  visible?: boolean;
2400
+ /**
2401
+ * Values the user can insert as fields, e.g. the linked contact's name and address
2402
+ * (components with `supports: ["variables"]`). Change them later with
2403
+ * `embed.setVariables`.
2404
+ */
2405
+ variables?: MindooDBAppEmbedVariable[];
2406
+ /**
2407
+ * Start the (new, empty) document as a copy of this one (components with
2408
+ * `supports: ["template"]`). The template must match the component, and this app
2409
+ * must be allowed to read its database. Haven hands it to the component to read;
2410
+ * nothing is written back to it.
2411
+ */
2412
+ template?: MindooDBAppEmbedTemplate;
2314
2413
  }
2315
2414
  /** One component a host app wants to show, for `session.embeds.requestAccess`. */
2316
2415
  interface MindooDBAppEmbedAccessComponent {
@@ -2457,6 +2556,14 @@ interface MindooDBAppEmbed {
2457
2556
  * cover; agent tools need not be switched on. Resolves with the tool's result.
2458
2557
  */
2459
2558
  callTool(name: string, input?: Record<string, unknown>): Promise<unknown>;
2559
+ /** Replaces the values the user can insert as fields (`supports: ["variables"]`). */
2560
+ setVariables(variables: MindooDBAppEmbedVariable[]): Promise<void>;
2561
+ /**
2562
+ * The document as a file in `format` (the component must support `export:<format>`),
2563
+ * e.g. a PDF to keep with the record or a PNG preview. Edits the component has not
2564
+ * saved yet are included as it shows them.
2565
+ */
2566
+ export(request: MindooDBAppEmbedExportRequest): Promise<File>;
2460
2567
  }
2461
2568
  /** What an `embed.onBeforeSave` handler gets. */
2462
2569
  interface MindooDBAppEmbedBeforeSaveInput {
@@ -2577,6 +2684,19 @@ interface MindooDBAppEmbeddingApi {
2577
2684
  onShowIssues(handler: (issues: MindooDBAppIssue[]) => void | Promise<void>): () => void;
2578
2685
  /** Scrolls to a place in the document (`embed.reveal`). Returns the unregister function. */
2579
2686
  onReveal(handler: (anchor: MindooDBAppInspectAnchor) => void | Promise<void>): () => void;
2687
+ /**
2688
+ * The values the host offers to insert as fields (`embeds.open({ variables })`);
2689
+ * empty when it offers none, when not embedded, and on older Havens.
2690
+ */
2691
+ getVariables(): Promise<MindooDBAppEmbedVariable[]>;
2692
+ /** Called with the new list whenever the host changes it (`embed.setVariables`). */
2693
+ onVariablesChange(listener: (variables: MindooDBAppEmbedVariable[]) => void): () => void;
2694
+ /**
2695
+ * Hands the document over as a file when the host asks (`embed.export`), in one of
2696
+ * the formats in `supports` (`export:<format>`). Throw for a format you do not
2697
+ * offer. One provider at a time; returns the unregister function.
2698
+ */
2699
+ provideExport(provider: (request: MindooDBAppEmbedExportRequest) => MindooDBAppEmbeddingExport | Promise<MindooDBAppEmbeddingExport>): () => void;
2580
2700
  }
2581
2701
  /** What `session.embedding.save` hands to `flush`. */
2582
2702
  interface MindooDBAppEmbeddingSaveContext {
@@ -2607,8 +2727,11 @@ interface MindooDBAppBridgeEmbeddingRequestMessage {
2607
2727
  protocol: "mindoodb-app-bridge";
2608
2728
  kind: "embedding-request";
2609
2729
  requestId: string;
2610
- request: "save" | "inspect" | "showIssues" | "reveal";
2611
- /** `inspect`: `{ request }`, `showIssues`: `{ issues }`, `reveal`: `{ anchor }`. */
2730
+ request: "save" | "inspect" | "showIssues" | "reveal" | "variables" | "export";
2731
+ /**
2732
+ * `inspect`: `{ request }`, `showIssues`: `{ issues }`, `reveal`: `{ anchor }`,
2733
+ * `variables`: `{ variables }`, `export`: `{ request }`.
2734
+ */
2612
2735
  params?: Record<string, unknown>;
2613
2736
  }
2614
2737
  /** Haven → host: a question about an embed the host has to answer (`embeds.respond`). */
@@ -4353,4 +4476,4 @@ interface MindooDBAppBridge {
4353
4476
  connect(options?: MindooDBAppBridgeConnectOptions): Promise<MindooDBAppSession>;
4354
4477
  }
4355
4478
 
4356
- export { type MindooDBAppAgentRegistration as $, MINDOODB_APP_COMPONENTS_MAX as A, MINDOODB_APP_COMPONENT_CONTRACT_PATTERN as B, MINDOODB_APP_DEFINITION_FILE_NAME as C, MINDOODB_APP_DEFINITION_FORMAT as D, MINDOODB_APP_DEFINITION_PERMISSIONS as E, MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS as F, MINDOODB_APP_DEFINITION_VERSION as G, MINDOODB_APP_INSPECTION_FIELD as H, MINDOODB_APP_INSPECTION_MAX_BYTES as I, MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES as J, MINDOODB_APP_ISSUES_MAX as K, MINDOODB_APP_LISTING_DESCRIPTION_MAX as L, type MindooDBAppAttachmentPreviewMode as M, MINDOODB_APP_LISTING_MAX_SCREENSHOTS as N, MINDOODB_APP_LISTING_SUMMARY_MAX as O, MINDOODB_APP_SEAL_SIGNING_DOMAIN as P, MINDOODB_APP_VALUE_TAG as Q, MINDOODB_APP_WELL_KNOWN_DRAG_TYPES as R, MINDOODB_INSPECT_DOCUMENT as S, MINDOODB_INSPECT_SLIDES as T, MINDOODB_INSPECT_SPREADSHEET as U, type MindooDBAppAcceptSpec as V, type MindooDBAppAccessDecision as W, type MindooDBAppAccessTier as X, type MindooDBAppAgentApi as Y, type MindooDBAppAgentCapability as Z, type MindooDBAppAgentProfile as _, type MindooDBAppDragBindSourceOptions as a, type MindooDBAppComponentReference as a$, type MindooDBAppAgentToolAnnotations as a0, type MindooDBAppAgentToolDescriptor as a1, type MindooDBAppAgentToolScope as a2, type MindooDBAppAtomicValue as a3, type MindooDBAppAttachmentApi as a4, type MindooDBAppAttachmentChunk as a5, type MindooDBAppAttachmentInfo as a6, type MindooDBAppAttachmentPreviewOptions as a7, type MindooDBAppAttachmentPreviewSession as a8, type MindooDBAppAutomergeChangesPatch as a9, type MindooDBAppBridgeRpcMessage as aA, type MindooDBAppBridgeRpcRequest as aB, type MindooDBAppBridgeRpcSuccess as aC, type MindooDBAppBridgeShortcutInvokedMessage as aD, type MindooDBAppBridgeShortcutsChangedMessage as aE, type MindooDBAppBridgeStreamAbortRequest as aF, type MindooDBAppBridgeStreamAck as aG, type MindooDBAppBridgeStreamCloseRequest as aH, type MindooDBAppBridgeStreamError as aI, type MindooDBAppBridgeStreamMessage as aJ, type MindooDBAppBridgeStreamOpenResult as aK, type MindooDBAppBridgeStreamReadRequest as aL, type MindooDBAppBridgeStreamWriteRequest as aM, type MindooDBAppBridgeThemeChangedMessage as aN, type MindooDBAppBridgeUiPreferencesChangedMessage as aO, type MindooDBAppBridgeViewChangedMessage as aP, type MindooDBAppBridgeViewportChangedMessage as aQ, type MindooDBAppBridgeWorkspaceFocusRequestedMessage as aR, type MindooDBAppBrowserFeatures as aS, type MindooDBAppCapability as aT, type MindooDBAppComponentCategory as aU, type MindooDBAppComponentChildren as aV, type MindooDBAppComponentContract as aW, type MindooDBAppComponentFieldValue as aX, type MindooDBAppComponentInfo as aY, type MindooDBAppComponentIntent as aZ, type MindooDBAppComponentQuery as a_, type MindooDBAppAutomergeChangesSince as aa, type MindooDBAppAutomergeGetOptions as ab, type MindooDBAppAutomergePatchResult as ac, type MindooDBAppAutomergeSnapshot as ad, type MindooDBAppBridgeAgentInvokeMessage as ae, type MindooDBAppBridgeAgentResultMessage as af, type MindooDBAppBridgeBeforeCloseAck as ag, type MindooDBAppBridgeBeforeCloseMessage as ah, type MindooDBAppBridgeConnectMessage as ai, type MindooDBAppBridgeConnectOptions as aj, type MindooDBAppBridgeConnectedMessage as ak, type MindooDBAppBridgeDragDropMessage as al, type MindooDBAppBridgeDragLeaveMessage as am, type MindooDBAppBridgeDragOverMessage as an, type MindooDBAppBridgeEmbedEventMessage as ao, type MindooDBAppBridgeEmbedRequestMessage as ap, type MindooDBAppBridgeEmbeddingRequestMessage as aq, type MindooDBAppBridgeErrorPayload as ar, type MindooDBAppBridgeHandshakeErrorMessage as as, type MindooDBAppBridgeHostFocusChangedMessage as at, type MindooDBAppBridgeIncomingContentMessage as au, type MindooDBAppBridgeLocaleChangedMessage as av, type MindooDBAppBridgePortMessage as aw, type MindooDBAppBridgeQueryResultMessage as ax, type MindooDBAppBridgeReminderOpenedMessage as ay, type MindooDBAppBridgeRpcError as az, type MindooDBAppDragStartInput as b, type MindooDBAppEmbedContext as b$, type MindooDBAppComponentSpec as b0, type MindooDBAppComponentsApi as b1, type MindooDBAppConfiguredViewCategorizationStyle as b2, type MindooDBAppConfiguredViewColumn as b3, type MindooDBAppConfiguredViewColumnRole as b4, type MindooDBAppConfiguredViewExpressionMode as b5, type MindooDBAppConfiguredViewFieldExpression as b6, type MindooDBAppConfiguredViewFilterDefinition as b7, type MindooDBAppConfiguredViewFilterMode as b8, type MindooDBAppConfiguredViewFilterRule as b9, type MindooDBAppDocumentQuery as bA, type MindooDBAppDocumentRevisionId as bB, type MindooDBAppDocumentRule as bC, type MindooDBAppDocumentRuleOutcome as bD, type MindooDBAppDocumentRules as bE, type MindooDBAppDocumentScanPreset as bF, type MindooDBAppDocumentSummary as bG, type MindooDBAppDragApi as bH, type MindooDBAppDragCancelReason as bI, type MindooDBAppDragDropEvent as bJ, type MindooDBAppDragEffect as bK, type MindooDBAppDragHoverResult as bL, type MindooDBAppDragOffer as bM, type MindooDBAppDragOverEvent as bN, type MindooDBAppDragPointer as bO, type MindooDBAppDragProfile as bP, type MindooDBAppEmbed as bQ, type MindooDBAppEmbedAccessComponent as bR, type MindooDBAppEmbedAccessInput as bS, type MindooDBAppEmbedAccessPair as bT, type MindooDBAppEmbedAccessResult as bU, type MindooDBAppEmbedAgentTools as bV, type MindooDBAppEmbedAgentToolsEvent as bW, type MindooDBAppEmbedBeforeSaveInput as bX, type MindooDBAppEmbedBeforeSaveResult as bY, type MindooDBAppEmbedCloseReason as bZ, type MindooDBAppEmbedClosedEvent as b_, type MindooDBAppConfiguredViewFormulaExpression as ba, type MindooDBAppConfiguredViewFormulaFilterDefinition as bb, type MindooDBAppConfiguredViewPreviewMode as bc, type MindooDBAppConfiguredViewRuleFilterDefinition as bd, type MindooDBAppConfiguredViewRuleMatchMode as be, type MindooDBAppConfiguredViewRuleOperator as bf, type MindooDBAppConfiguredViewValueExpression as bg, type MindooDBAppCounterValue as bh, type MindooDBAppCreateKeyInfo as bi, type MindooDBAppCreateViewInput as bj, type MindooDBAppCreateViewNavigatorInput as bk, type MindooDBAppDatabaseInfo as bl, type MindooDBAppDefinitionDatabase as bm, type MindooDBAppDefinitionListing as bn, type MindooDBAppDefinitionPermission as bo, type MindooDBAppDefinitionRegistrationPermission as bp, type MindooDBAppDefinitionScreenshot as bq, type MindooDBAppDefinitionValidation as br, type MindooDBAppDirectoryApi as bs, type MindooDBAppDirectoryEntry as bt, type MindooDBAppDocumentApi as bu, type MindooDBAppDocumentHeadCursorResult as bv, type MindooDBAppDocumentHistoryEntry as bw, type MindooDBAppDocumentInspection as bx, type MindooDBAppDocumentListQuery as by, type MindooDBAppDocumentListResult as bz, type MindooDBAppDragStartResult as c, type MindooDBAppMenuPointAnchor as c$, type MindooDBAppEmbedDirtyEvent as c0, type MindooDBAppEmbedOpenInput as c1, type MindooDBAppEmbedRect as c2, type MindooDBAppEmbedSavedEvent as c3, type MindooDBAppEmbedValidation as c4, MindooDBAppEmbedValidationError as c5, type MindooDBAppEmbeddingApi as c6, type MindooDBAppEmbeddingLookupOptions as c7, type MindooDBAppEmbeddingLookupResult as c8, type MindooDBAppEmbeddingResult as c9, type MindooDBAppInspection as cA, type MindooDBAppInspectionBase as cB, type MindooDBAppIssue as cC, type MindooDBAppIssueSeverity as cD, type MindooDBAppJsonCounterIncrementPatch as cE, type MindooDBAppJsonListDeletePatch as cF, type MindooDBAppJsonListInsertPatch as cG, type MindooDBAppJsonPatch as cH, type MindooDBAppJsonSetPatch as cI, type MindooDBAppJsonTextMarkPatch as cJ, type MindooDBAppJsonTextSplicePatch as cK, type MindooDBAppJsonTextUnmarkPatch as cL, type MindooDBAppJsonUnsetPatch as cM, type MindooDBAppLaunchContext as cN, type MindooDBAppListUsersOptions as cO, type MindooDBAppListUsersPage as cP, type MindooDBAppLiveQuerySubscription as cQ, type MindooDBAppLocaleMap as cR, type MindooDBAppLocalizedText as cS, type MindooDBAppMenuAnchor as cT, type MindooDBAppMenuApi as cU, type MindooDBAppMenuCommandItem as cV, type MindooDBAppMenuDismissReason as cW, type MindooDBAppMenuDismissedResult as cX, type MindooDBAppMenuItem as cY, type MindooDBAppMenuKind as cZ, type MindooDBAppMenuPlacement as c_, type MindooDBAppEmbeddingSaveContext as ca, type MindooDBAppEmbedsApi as cb, type MindooDBAppEntryAttachmentRef as cc, type MindooDBAppEntryProvenance as cd, type MindooDBAppExtractDocumentTextInput as ce, type MindooDBAppExtractDocumentTextResult as cf, type MindooDBAppExtractTextFormat as cg, type MindooDBAppExtractionSetup as ch, type MindooDBAppFulltextSetup as ci, type MindooDBAppHistoricalDocument as cj, type MindooDBAppHistoryQuery as ck, type MindooDBAppHostTheme as cl, type MindooDBAppIdentityApi as cm, type MindooDBAppInaccessibleDocument as cn, type MindooDBAppInaccessibleDocumentListQuery as co, type MindooDBAppInaccessibleDocumentListResult as cp, type MindooDBAppIncomingContent as cq, type MindooDBAppIncomingContentHandler as cr, type MindooDBAppIncomingContentInfo as cs, type MindooDBAppIncomingItem as ct, type MindooDBAppIncomingItemInfo as cu, type MindooDBAppIncomingResult as cv, type MindooDBAppIncomingSource as cw, type MindooDBAppInspectAnchor as cx, type MindooDBAppInspectRequest as cy, type MindooDBAppInspectedCell as cz, type MindooDBAppDragPreview as d, type MindooDBAppSpreadsheetInspection as d$, type MindooDBAppMenuRect as d0, type MindooDBAppMenuRectAnchor as d1, type MindooDBAppMenuSelectionResult as d2, type MindooDBAppMenuSeparatorItem as d3, type MindooDBAppNotificationSeverity as d4, type MindooDBAppNotifyInput as d5, type MindooDBAppNotifyResult as d6, type MindooDBAppPdfApi as d7, type MindooDBAppPdfSignInput as d8, type MindooDBAppPdfSignResult as d9, type MindooDBAppRichTextGetOptions as dA, type MindooDBAppRichTextImmutableString as dB, type MindooDBAppRichTextMarkRange as dC, type MindooDBAppRichTextMaterializeValue as dD, type MindooDBAppRichTextPatch as dE, type MindooDBAppRichTextScalar as dF, type MindooDBAppRichTextSpliceStep as dG, type MindooDBAppRichTextStep as dH, type MindooDBAppRichTextStepPatch as dI, type MindooDBAppRichTextTextSpan as dJ, type MindooDBAppRuntime as dK, type MindooDBAppScanAttachmentOptions as dL, type MindooDBAppScanAttachmentResult as dM, type MindooDBAppScopedDocId as dN, type MindooDBAppScopedDocumentSummary as dO, type MindooDBAppSealIntent as dP, type MindooDBAppSealedChannelOpenInput as dQ, type MindooDBAppSealedChannelOpenResult as dR, type MindooDBAppSealedChannelRequestInput as dS, type MindooDBAppSession as dT, type MindooDBAppShowMenuInput as dU, type MindooDBAppShowMenuResult as dV, type MindooDBAppSignPreview as dW, type MindooDBAppSignPreviewScope as dX, type MindooDBAppSignStatementInput as dY, type MindooDBAppSignStatementResult as dZ, type MindooDBAppSlidesInspection as d_, type MindooDBAppPdfSignaturePosition as da, type MindooDBAppPdfSigner as db, type MindooDBAppProposeAppInput as dc, type MindooDBAppProposeAppResult as dd, type MindooDBAppQueryCoverage as de, type MindooDBAppQueryInclude as df, type MindooDBAppQueryIncludeCardinality as dg, type MindooDBAppQueryIncludeSlots as dh, type MindooDBAppQueryResult as di, type MindooDBAppQueryRow as dj, type MindooDBAppQuerySortKey as dk, type MindooDBAppQueryTextClause as dl, type MindooDBAppReadableAttachmentStream as dm, type MindooDBAppRecipientOptions as dn, type MindooDBAppReminder as dp, type MindooDBAppReminderOpened as dq, type MindooDBAppReminderOpenedHandler as dr, type MindooDBAppReminderRequest as ds, type MindooDBAppReminderScheduleResult as dt, type MindooDBAppRemindersApi as du, type MindooDBAppResolvedViewDefinition as dv, type MindooDBAppResolvedViewSource as dw, type MindooDBAppRevisionPhase as dx, type MindooDBAppRevisionVerification as dy, type MindooDBAppRichTextBlockSpan as dz, type MindooDBAppBridge as e, type MindooDBAppStorageApi as e0, type MindooDBAppSummarySetup as e1, type MindooDBAppTextCursorOptions as e2, type MindooDBAppTextCursorPosition as e3, type MindooDBAppTextCursorPositionsResult as e4, type MindooDBAppTextCursorsResult as e5, type MindooDBAppTextEdit as e6, type MindooDBAppTextPatch as e7, type MindooDBAppThemeMode as e8, type MindooDBAppTimestampApi as e9, mindooDBAppComponentSupports as eA, mindooDBAppInspectContracts as eB, mindooDBAppInspectRules as eC, mindooDBAppInspectionSummaryValue as eD, normalizeMindooDBAppInspectAnchor as eE, normalizeMindooDBAppInspectRequest as eF, normalizeMindooDBAppInspection as eG, normalizeMindooDBAppIssues as eH, readMindooDBAppInspectionSummary as eI, resolveMindooDBAppDefinitionUrl as eJ, resolveMindooDBAppEmbedValidation as eK, resolveMindooDBAppListingAssetUrl as eL, resolveMindooDBAppLocalizedText as eM, summarizeMindooDBAppInspection as eN, validateMindooDBAppAccepts as eO, validateMindooDBAppAgentProfile as eP, validateMindooDBAppComponents as eQ, validateMindooDBAppDefinition as eR, type MindooDBAppTimestampInput as ea, type MindooDBAppTimestampProvider as eb, type MindooDBAppTimestampResult as ec, type MindooDBAppTimestampValue as ed, type MindooDBAppTypedValue as ee, type MindooDBAppUiPreferences as ef, type MindooDBAppUpdateDocumentInput as eg, MindooDBAppValue as eh, type MindooDBAppViewCursorDocumentListResult as ei, type MindooDBAppViewCursorResult as ej, type MindooDBAppViewEntry as ek, type MindooDBAppViewEntryKind as el, type MindooDBAppViewNavigator as em, type MindooDBAppViewNavigatorExpansionState as en, type MindooDBAppViewNavigatorOpenOptions as eo, type MindooDBAppViewNavigatorPageOptions as ep, type MindooDBAppViewNavigatorPageResult as eq, type MindooDBAppViewNavigatorRangeQuery as er, type MindooDBAppViewNavigatorSelectionState as es, type MindooDBAppViewUpdateStats as et, type MindooDBAppViewport as eu, type MindooDBAppWellKnownDragType as ev, type MindooDBAppWritableAttachmentStream as ew, defineDocumentRules as ex, mindooDBAppAcceptMatchesType as ey, mindooDBAppComponentFieldsMatch as ez, type MindooDBAppAgentToolErrorCode as f, type MindooDBAppAgentTool as g, type MindooDBAppHostShortcutBinding as h, type MindooDBAppHostShortcutAction as i, type MindooDBAppHostingMode as j, type MindooDBAppDefinition as k, type MindooDBAppDatabase as l, type MindooDBAppDocument as m, type MindooDBAppRichTextSpan as n, type MindooDBAppRichTextSnapshot as o, type MindooDBAppCreateDocumentInput as p, MINDOODB_APP_ACCEPTS_MAX as q, MINDOODB_APP_AGENT_CAPABILITIES_MAX as r, MINDOODB_APP_AGENT_CAPABILITY_TITLE_MAX as s, MINDOODB_APP_AGENT_CAPABILITY_TOOLS_MAX as t, MINDOODB_APP_AGENT_EXAMPLE_MAX as u, MINDOODB_APP_AGENT_GUIDE_MAX_BYTES as v, MINDOODB_APP_AGENT_LIMIT_MAX as w, MINDOODB_APP_AGENT_LIST_MAX as x, MINDOODB_APP_AGENT_SUMMARY_MAX as y, MINDOODB_APP_AGENT_TOOL_NAME_PATTERN as z };
4479
+ export { type MindooDBAppAgentCapability as $, MINDOODB_APP_COMPONENTS_MAX as A, MINDOODB_APP_COMPONENT_CONTRACT_PATTERN as B, MINDOODB_APP_DEFINITION_FILE_NAME as C, MINDOODB_APP_DEFINITION_FORMAT as D, MINDOODB_APP_DEFINITION_PERMISSIONS as E, MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS as F, MINDOODB_APP_DEFINITION_VERSION as G, MINDOODB_APP_EMBED_EXPORT_MAX_BYTES as H, MINDOODB_APP_EMBED_VARIABLES_MAX as I, MINDOODB_APP_INSPECTION_FIELD as J, MINDOODB_APP_INSPECTION_MAX_BYTES as K, MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES as L, type MindooDBAppAttachmentPreviewMode as M, MINDOODB_APP_ISSUES_MAX as N, MINDOODB_APP_LISTING_DESCRIPTION_MAX as O, MINDOODB_APP_LISTING_MAX_SCREENSHOTS as P, MINDOODB_APP_LISTING_SUMMARY_MAX as Q, MINDOODB_APP_SEAL_SIGNING_DOMAIN as R, MINDOODB_APP_VALUE_TAG as S, MINDOODB_APP_WELL_KNOWN_DRAG_TYPES as T, MINDOODB_INSPECT_DOCUMENT as U, MINDOODB_INSPECT_SLIDES as V, MINDOODB_INSPECT_SPREADSHEET as W, type MindooDBAppAcceptSpec as X, type MindooDBAppAccessDecision as Y, type MindooDBAppAccessTier as Z, type MindooDBAppAgentApi as _, type MindooDBAppDragBindSourceOptions as a, type MindooDBAppComponentIntent as a$, type MindooDBAppAgentProfile as a0, type MindooDBAppAgentRegistration as a1, type MindooDBAppAgentToolAnnotations as a2, type MindooDBAppAgentToolDescriptor as a3, type MindooDBAppAgentToolScope as a4, type MindooDBAppAtomicValue as a5, type MindooDBAppAttachmentApi as a6, type MindooDBAppAttachmentChunk as a7, type MindooDBAppAttachmentInfo as a8, type MindooDBAppAttachmentPreviewOptions as a9, type MindooDBAppBridgeReminderOpenedMessage as aA, type MindooDBAppBridgeRpcError as aB, type MindooDBAppBridgeRpcMessage as aC, type MindooDBAppBridgeRpcRequest as aD, type MindooDBAppBridgeRpcSuccess as aE, type MindooDBAppBridgeShortcutInvokedMessage as aF, type MindooDBAppBridgeShortcutsChangedMessage as aG, type MindooDBAppBridgeStreamAbortRequest as aH, type MindooDBAppBridgeStreamAck as aI, type MindooDBAppBridgeStreamCloseRequest as aJ, type MindooDBAppBridgeStreamError as aK, type MindooDBAppBridgeStreamMessage as aL, type MindooDBAppBridgeStreamOpenResult as aM, type MindooDBAppBridgeStreamReadRequest as aN, type MindooDBAppBridgeStreamWriteRequest as aO, type MindooDBAppBridgeThemeChangedMessage as aP, type MindooDBAppBridgeUiPreferencesChangedMessage as aQ, type MindooDBAppBridgeViewChangedMessage as aR, type MindooDBAppBridgeViewportChangedMessage as aS, type MindooDBAppBridgeWorkspaceFocusRequestedMessage as aT, type MindooDBAppBrowserFeatures as aU, type MindooDBAppCapability as aV, type MindooDBAppComponentCategory as aW, type MindooDBAppComponentChildren as aX, type MindooDBAppComponentContract as aY, type MindooDBAppComponentFieldValue as aZ, type MindooDBAppComponentInfo as a_, type MindooDBAppAttachmentPreviewSession as aa, type MindooDBAppAutomergeChangesPatch as ab, type MindooDBAppAutomergeChangesSince as ac, type MindooDBAppAutomergeGetOptions as ad, type MindooDBAppAutomergePatchResult as ae, type MindooDBAppAutomergeSnapshot as af, type MindooDBAppBridgeAgentInvokeMessage as ag, type MindooDBAppBridgeAgentResultMessage as ah, type MindooDBAppBridgeBeforeCloseAck as ai, type MindooDBAppBridgeBeforeCloseMessage as aj, type MindooDBAppBridgeConnectMessage as ak, type MindooDBAppBridgeConnectOptions as al, type MindooDBAppBridgeConnectedMessage as am, type MindooDBAppBridgeDragDropMessage as an, type MindooDBAppBridgeDragLeaveMessage as ao, type MindooDBAppBridgeDragOverMessage as ap, type MindooDBAppBridgeEmbedEventMessage as aq, type MindooDBAppBridgeEmbedRequestMessage as ar, type MindooDBAppBridgeEmbeddingRequestMessage as as, type MindooDBAppBridgeErrorPayload as at, type MindooDBAppBridgeHandshakeErrorMessage as au, type MindooDBAppBridgeHostFocusChangedMessage as av, type MindooDBAppBridgeIncomingContentMessage as aw, type MindooDBAppBridgeLocaleChangedMessage as ax, type MindooDBAppBridgePortMessage as ay, type MindooDBAppBridgeQueryResultMessage as az, type MindooDBAppDragStartInput as b, type MindooDBAppEmbedCloseReason as b$, type MindooDBAppComponentQuery as b0, type MindooDBAppComponentReference as b1, type MindooDBAppComponentSpec as b2, type MindooDBAppComponentsApi as b3, type MindooDBAppConfiguredViewCategorizationStyle as b4, type MindooDBAppConfiguredViewColumn as b5, type MindooDBAppConfiguredViewColumnRole as b6, type MindooDBAppConfiguredViewExpressionMode as b7, type MindooDBAppConfiguredViewFieldExpression as b8, type MindooDBAppConfiguredViewFilterDefinition as b9, type MindooDBAppDocumentListQuery as bA, type MindooDBAppDocumentListResult as bB, type MindooDBAppDocumentQuery as bC, type MindooDBAppDocumentRevisionId as bD, type MindooDBAppDocumentRule as bE, type MindooDBAppDocumentRuleOutcome as bF, type MindooDBAppDocumentRules as bG, type MindooDBAppDocumentScanPreset as bH, type MindooDBAppDocumentSummary as bI, type MindooDBAppDragApi as bJ, type MindooDBAppDragCancelReason as bK, type MindooDBAppDragDropEvent as bL, type MindooDBAppDragEffect as bM, type MindooDBAppDragHoverResult as bN, type MindooDBAppDragOffer as bO, type MindooDBAppDragOverEvent as bP, type MindooDBAppDragPointer as bQ, type MindooDBAppDragProfile as bR, type MindooDBAppEmbed as bS, type MindooDBAppEmbedAccessComponent as bT, type MindooDBAppEmbedAccessInput as bU, type MindooDBAppEmbedAccessPair as bV, type MindooDBAppEmbedAccessResult as bW, type MindooDBAppEmbedAgentTools as bX, type MindooDBAppEmbedAgentToolsEvent as bY, type MindooDBAppEmbedBeforeSaveInput as bZ, type MindooDBAppEmbedBeforeSaveResult as b_, type MindooDBAppConfiguredViewFilterMode as ba, type MindooDBAppConfiguredViewFilterRule as bb, type MindooDBAppConfiguredViewFormulaExpression as bc, type MindooDBAppConfiguredViewFormulaFilterDefinition as bd, type MindooDBAppConfiguredViewPreviewMode as be, type MindooDBAppConfiguredViewRuleFilterDefinition as bf, type MindooDBAppConfiguredViewRuleMatchMode as bg, type MindooDBAppConfiguredViewRuleOperator as bh, type MindooDBAppConfiguredViewValueExpression as bi, type MindooDBAppCounterValue as bj, type MindooDBAppCreateKeyInfo as bk, type MindooDBAppCreateViewInput as bl, type MindooDBAppCreateViewNavigatorInput as bm, type MindooDBAppDatabaseInfo as bn, type MindooDBAppDefinitionDatabase as bo, type MindooDBAppDefinitionListing as bp, type MindooDBAppDefinitionPermission as bq, type MindooDBAppDefinitionRegistrationPermission as br, type MindooDBAppDefinitionScreenshot as bs, type MindooDBAppDefinitionValidation as bt, type MindooDBAppDirectoryApi as bu, type MindooDBAppDirectoryEntry as bv, type MindooDBAppDocumentApi as bw, type MindooDBAppDocumentHeadCursorResult as bx, type MindooDBAppDocumentHistoryEntry as by, type MindooDBAppDocumentInspection as bz, type MindooDBAppDragStartResult as c, type MindooDBAppMenuAnchor as c$, type MindooDBAppEmbedClosedEvent as c0, type MindooDBAppEmbedContext as c1, type MindooDBAppEmbedDirtyEvent as c2, type MindooDBAppEmbedExportFormat as c3, type MindooDBAppEmbedExportPayload as c4, type MindooDBAppEmbedExportRequest as c5, type MindooDBAppEmbedOpenInput as c6, type MindooDBAppEmbedRect as c7, type MindooDBAppEmbedSavedEvent as c8, type MindooDBAppEmbedTemplate as c9, type MindooDBAppIncomingContentInfo as cA, type MindooDBAppIncomingItem as cB, type MindooDBAppIncomingItemInfo as cC, type MindooDBAppIncomingResult as cD, type MindooDBAppIncomingSource as cE, type MindooDBAppInspectAnchor as cF, type MindooDBAppInspectRequest as cG, type MindooDBAppInspectedCell as cH, type MindooDBAppInspection as cI, type MindooDBAppInspectionBase as cJ, type MindooDBAppIssue as cK, type MindooDBAppIssueSeverity as cL, type MindooDBAppJsonCounterIncrementPatch as cM, type MindooDBAppJsonListDeletePatch as cN, type MindooDBAppJsonListInsertPatch as cO, type MindooDBAppJsonPatch as cP, type MindooDBAppJsonSetPatch as cQ, type MindooDBAppJsonTextMarkPatch as cR, type MindooDBAppJsonTextSplicePatch as cS, type MindooDBAppJsonTextUnmarkPatch as cT, type MindooDBAppJsonUnsetPatch as cU, type MindooDBAppLaunchContext as cV, type MindooDBAppListUsersOptions as cW, type MindooDBAppListUsersPage as cX, type MindooDBAppLiveQuerySubscription as cY, type MindooDBAppLocaleMap as cZ, type MindooDBAppLocalizedText as c_, type MindooDBAppEmbedValidation as ca, MindooDBAppEmbedValidationError as cb, type MindooDBAppEmbedVariable as cc, type MindooDBAppEmbeddingApi as cd, type MindooDBAppEmbeddingExport as ce, type MindooDBAppEmbeddingLookupOptions as cf, type MindooDBAppEmbeddingLookupResult as cg, type MindooDBAppEmbeddingResult as ch, type MindooDBAppEmbeddingSaveContext as ci, type MindooDBAppEmbedsApi as cj, type MindooDBAppEntryAttachmentRef as ck, type MindooDBAppEntryProvenance as cl, type MindooDBAppExtractDocumentTextInput as cm, type MindooDBAppExtractDocumentTextResult as cn, type MindooDBAppExtractTextFormat as co, type MindooDBAppExtractionSetup as cp, type MindooDBAppFulltextSetup as cq, type MindooDBAppHistoricalDocument as cr, type MindooDBAppHistoryQuery as cs, type MindooDBAppHostTheme as ct, type MindooDBAppIdentityApi as cu, type MindooDBAppInaccessibleDocument as cv, type MindooDBAppInaccessibleDocumentListQuery as cw, type MindooDBAppInaccessibleDocumentListResult as cx, type MindooDBAppIncomingContent as cy, type MindooDBAppIncomingContentHandler as cz, type MindooDBAppDragPreview as d, type MindooDBAppSession as d$, type MindooDBAppMenuApi as d0, type MindooDBAppMenuCommandItem as d1, type MindooDBAppMenuDismissReason as d2, type MindooDBAppMenuDismissedResult as d3, type MindooDBAppMenuItem as d4, type MindooDBAppMenuKind as d5, type MindooDBAppMenuPlacement as d6, type MindooDBAppMenuPointAnchor as d7, type MindooDBAppMenuRect as d8, type MindooDBAppMenuRectAnchor as d9, type MindooDBAppReminderRequest as dA, type MindooDBAppReminderScheduleResult as dB, type MindooDBAppRemindersApi as dC, type MindooDBAppResolvedViewDefinition as dD, type MindooDBAppResolvedViewSource as dE, type MindooDBAppRevisionPhase as dF, type MindooDBAppRevisionVerification as dG, type MindooDBAppRichTextBlockSpan as dH, type MindooDBAppRichTextGetOptions as dI, type MindooDBAppRichTextImmutableString as dJ, type MindooDBAppRichTextMarkRange as dK, type MindooDBAppRichTextMaterializeValue as dL, type MindooDBAppRichTextPatch as dM, type MindooDBAppRichTextScalar as dN, type MindooDBAppRichTextSpliceStep as dO, type MindooDBAppRichTextStep as dP, type MindooDBAppRichTextStepPatch as dQ, type MindooDBAppRichTextTextSpan as dR, type MindooDBAppRuntime as dS, type MindooDBAppScanAttachmentOptions as dT, type MindooDBAppScanAttachmentResult as dU, type MindooDBAppScopedDocId as dV, type MindooDBAppScopedDocumentSummary as dW, type MindooDBAppSealIntent as dX, type MindooDBAppSealedChannelOpenInput as dY, type MindooDBAppSealedChannelOpenResult as dZ, type MindooDBAppSealedChannelRequestInput as d_, type MindooDBAppMenuSelectionResult as da, type MindooDBAppMenuSeparatorItem as db, type MindooDBAppNotificationSeverity as dc, type MindooDBAppNotifyInput as dd, type MindooDBAppNotifyResult as de, type MindooDBAppPdfApi as df, type MindooDBAppPdfSignInput as dg, type MindooDBAppPdfSignResult as dh, type MindooDBAppPdfSignaturePosition as di, type MindooDBAppPdfSigner as dj, type MindooDBAppProposeAppInput as dk, type MindooDBAppProposeAppResult as dl, type MindooDBAppQueryCoverage as dm, type MindooDBAppQueryInclude as dn, type MindooDBAppQueryIncludeCardinality as dp, type MindooDBAppQueryIncludeSlots as dq, type MindooDBAppQueryResult as dr, type MindooDBAppQueryRow as ds, type MindooDBAppQuerySortKey as dt, type MindooDBAppQueryTextClause as du, type MindooDBAppReadableAttachmentStream as dv, type MindooDBAppRecipientOptions as dw, type MindooDBAppReminder as dx, type MindooDBAppReminderOpened as dy, type MindooDBAppReminderOpenedHandler as dz, type MindooDBAppBridge as e, summarizeMindooDBAppInspection as e$, type MindooDBAppShowMenuInput as e0, type MindooDBAppShowMenuResult as e1, type MindooDBAppSignPreview as e2, type MindooDBAppSignPreviewScope as e3, type MindooDBAppSignStatementInput as e4, type MindooDBAppSignStatementResult as e5, type MindooDBAppSlidesInspection as e6, type MindooDBAppSpreadsheetInspection as e7, type MindooDBAppStorageApi as e8, type MindooDBAppSummarySetup as e9, type MindooDBAppViewNavigatorSelectionState as eA, type MindooDBAppViewUpdateStats as eB, type MindooDBAppViewport as eC, type MindooDBAppWellKnownDragType as eD, type MindooDBAppWritableAttachmentStream as eE, defineDocumentRules as eF, mindooDBAppAcceptMatchesType as eG, mindooDBAppComponentFieldsMatch as eH, mindooDBAppComponentSupports as eI, mindooDBAppExportFile as eJ, mindooDBAppExportMimeType as eK, mindooDBAppExportPayload as eL, mindooDBAppInspectContracts as eM, mindooDBAppInspectRules as eN, mindooDBAppInspectionSummaryValue as eO, normalizeMindooDBAppEmbedExportRequest as eP, normalizeMindooDBAppEmbedVariables as eQ, normalizeMindooDBAppInspectAnchor as eR, normalizeMindooDBAppInspectRequest as eS, normalizeMindooDBAppInspection as eT, normalizeMindooDBAppIssues as eU, readMindooDBAppInspectionSummary as eV, resolveMindooDBAppDefinitionUrl as eW, resolveMindooDBAppEmbedValidation as eX, resolveMindooDBAppListingAssetUrl as eY, resolveMindooDBAppLocalizedText as eZ, resolveMindooDBAppVariables as e_, type MindooDBAppTextCursorOptions as ea, type MindooDBAppTextCursorPosition as eb, type MindooDBAppTextCursorPositionsResult as ec, type MindooDBAppTextCursorsResult as ed, type MindooDBAppTextEdit as ee, type MindooDBAppTextPatch as ef, type MindooDBAppThemeMode as eg, type MindooDBAppTimestampApi as eh, type MindooDBAppTimestampInput as ei, type MindooDBAppTimestampProvider as ej, type MindooDBAppTimestampResult as ek, type MindooDBAppTimestampValue as el, type MindooDBAppTypedValue as em, type MindooDBAppUiPreferences as en, type MindooDBAppUpdateDocumentInput as eo, MindooDBAppValue as ep, type MindooDBAppViewCursorDocumentListResult as eq, type MindooDBAppViewCursorResult as er, type MindooDBAppViewEntry as es, type MindooDBAppViewEntryKind as et, type MindooDBAppViewNavigator as eu, type MindooDBAppViewNavigatorExpansionState as ev, type MindooDBAppViewNavigatorOpenOptions as ew, type MindooDBAppViewNavigatorPageOptions as ex, type MindooDBAppViewNavigatorPageResult as ey, type MindooDBAppViewNavigatorRangeQuery as ez, type MindooDBAppAgentToolErrorCode as f, validateMindooDBAppAccepts as f0, validateMindooDBAppAgentProfile as f1, validateMindooDBAppComponents as f2, validateMindooDBAppDefinition as f3, type MindooDBAppAgentTool as g, type MindooDBAppHostShortcutBinding as h, type MindooDBAppHostShortcutAction as i, type MindooDBAppHostingMode as j, type MindooDBAppDefinition as k, type MindooDBAppDatabase as l, type MindooDBAppDocument as m, type MindooDBAppRichTextSpan as n, type MindooDBAppRichTextSnapshot as o, type MindooDBAppCreateDocumentInput as p, MINDOODB_APP_ACCEPTS_MAX as q, MINDOODB_APP_AGENT_CAPABILITIES_MAX as r, MINDOODB_APP_AGENT_CAPABILITY_TITLE_MAX as s, MINDOODB_APP_AGENT_CAPABILITY_TOOLS_MAX as t, MINDOODB_APP_AGENT_EXAMPLE_MAX as u, MINDOODB_APP_AGENT_GUIDE_MAX_BYTES as v, MINDOODB_APP_AGENT_LIMIT_MAX as w, MINDOODB_APP_AGENT_LIST_MAX as x, MINDOODB_APP_AGENT_SUMMARY_MAX as y, MINDOODB_APP_AGENT_TOOL_NAME_PATTERN as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindoodb-app-sdk",
3
- "version": "0.0.72",
3
+ "version": "0.0.74",
4
4
  "engines": {
5
5
  "node": ">=22.13.0"
6
6
  },