mindoodb-app-sdk 0.0.71 → 0.0.72

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.
@@ -282,6 +282,15 @@ interface MindooDBAppComponentSpec {
282
282
  provides?: MindooDBAppComponentContract[];
283
283
  /** Fields of the root document that point at other root documents. */
284
284
  references?: MindooDBAppComponentReference[];
285
+ /**
286
+ * What the component can do for its hosts beyond showing the document, so a host
287
+ * can pick one that fits (`components.list({ requires })`): `inspect:<contract>`
288
+ * (describes its document, e.g. `inspect:mindoo.inspect.document@1`), `validate`
289
+ * (asks before it saves, `session.embedding.validate`), `issues` (shows a host's
290
+ * findings, `embed.showIssues`), `reveal` (scrolls to an anchor, `embed.reveal`).
291
+ * Changing it does not ask users again: it grants no access.
292
+ */
293
+ supports?: string[];
285
294
  }
286
295
  /**
287
296
  * Text in one language, or a map from locale (`de`, `fr`, …) to text. A map must carry
@@ -391,6 +400,351 @@ declare function validateMindooDBAppDefinition(raw: unknown): MindooDBAppDefinit
391
400
  */
392
401
  declare function resolveMindooDBAppDefinitionUrl(baseUrl: string): string;
393
402
 
403
+ /**
404
+ * Typed document values that plain JSON cannot express.
405
+ *
406
+ * Each helper returns a tagged plain object such as
407
+ * `{ $mindoo: "counter", value: 0 }`. Use it anywhere a value is written:
408
+ * `documents.create({ set })`, `documents.update({ set })`, JSON patch `set`
409
+ * and `listInsert` values, also nested inside objects and arrays. Haven turns
410
+ * the tags into the matching collaborative type. Reads return plain JSON:
411
+ * atomic strings as strings, counters as numbers, timestamps as ISO 8601
412
+ * strings.
413
+ *
414
+ * The object key `$mindoo` is reserved; an object carrying it must be one of
415
+ * these values, otherwise the write is rejected.
416
+ */
417
+ /** Reserved object key that marks a typed value. */
418
+ declare const MINDOODB_APP_VALUE_TAG = "$mindoo";
419
+ /** A string that is replaced as a whole on concurrent writes. */
420
+ interface MindooDBAppAtomicValue {
421
+ $mindoo: "atomic";
422
+ value: string;
423
+ }
424
+ /** A number whose concurrent increments are summed on merge. */
425
+ interface MindooDBAppCounterValue {
426
+ $mindoo: "counter";
427
+ value: number;
428
+ }
429
+ /** A point in time: epoch milliseconds or an ISO 8601 date-time string. */
430
+ interface MindooDBAppTimestampValue {
431
+ $mindoo: "timestamp";
432
+ value: number | string;
433
+ }
434
+ type MindooDBAppTypedValue = MindooDBAppAtomicValue | MindooDBAppCounterValue | MindooDBAppTimestampValue;
435
+ declare const MindooDBAppValue: {
436
+ /**
437
+ * An atomic string for identifiers, status and enum values, URLs, hashes
438
+ * and stored text cursors. Plain strings are collaborative text, where two
439
+ * concurrent changes of `"open"` to `"closed"` and `"blocked"` can
440
+ * interleave into a mix of both words.
441
+ */
442
+ readonly atomic: (value: string) => MindooDBAppAtomicValue;
443
+ /**
444
+ * A collaborative counter with an initial value (a safe integer). Create it
445
+ * once, then change it only with `json.counterIncrement`: writing a new
446
+ * counter is an assignment that does not merge with concurrent increments.
447
+ */
448
+ readonly counter: (value?: number) => MindooDBAppCounterValue;
449
+ /** A timestamp from a `Date`, epoch milliseconds or an ISO 8601 string. */
450
+ readonly timestamp: (value: Date | number | string) => MindooDBAppTimestampValue;
451
+ /** Whether `value` is a tagged typed value (any kind). */
452
+ readonly isTyped: (value: unknown) => value is MindooDBAppTypedValue;
453
+ };
454
+
455
+ /**
456
+ * Checking an embedded component's document before it is saved.
457
+ *
458
+ * A component that declares `supports: ["inspect:<contract>"]` describes its
459
+ * document on request in a shape every host can read without knowing the app:
460
+ * a Word or Markdown document as {@link MindooDBAppDocumentInspection}, a
461
+ * workbook as {@link MindooDBAppSpreadsheetInspection}, a deck as
462
+ * {@link MindooDBAppSlidesInspection}. A host asks for that (`embed.inspect`)
463
+ * or checks it before every save (`embed.onBeforeSave`), answering with
464
+ * {@link MindooDBAppIssue}s. The same checks can run on the small summary each
465
+ * component writes to its root document (`inspection` field), so a host can
466
+ * judge documents it does not have open.
467
+ *
468
+ * Rules that work on both: {@link defineDocumentRules}.
469
+ */
470
+
471
+ /** Word and Markdown documents. */
472
+ declare const MINDOODB_INSPECT_DOCUMENT = "mindoo.inspect.document@1";
473
+ /** Workbooks. */
474
+ declare const MINDOODB_INSPECT_SPREADSHEET = "mindoo.inspect.spreadsheet@1";
475
+ /** Presentations. */
476
+ declare const MINDOODB_INSPECT_SLIDES = "mindoo.inspect.slides@1";
477
+ /** Root document field holding the summary a component writes on every save. */
478
+ declare const MINDOODB_APP_INSPECTION_FIELD = "inspection";
479
+ /** Upper bound of the root summary, as JSON. */
480
+ declare const MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES: number;
481
+ /** Upper bound of a full inspection Haven passes between apps, as JSON. */
482
+ declare const MINDOODB_APP_INSPECTION_MAX_BYTES: number;
483
+ /** At most this many issues per check. */
484
+ declare const MINDOODB_APP_ISSUES_MAX = 100;
485
+ /**
486
+ * A place in the component's document, for `embed.reveal` and issues: a heading
487
+ * (its id from the outline), a cell (`Sheet1!B3`, or `B3` on the first sheet) or
488
+ * a slide (0-based).
489
+ */
490
+ type MindooDBAppInspectAnchor = {
491
+ kind: "heading";
492
+ id: string;
493
+ } | {
494
+ kind: "cell";
495
+ ref: string;
496
+ } | {
497
+ kind: "slide";
498
+ index: number;
499
+ };
500
+ type MindooDBAppIssueSeverity = "error" | "warning" | "info";
501
+ /**
502
+ * A finding about the document. Before a save, `error` stops it, `warning` asks
503
+ * the user whether to save anyway, `info` is only shown.
504
+ */
505
+ interface MindooDBAppIssue {
506
+ severity: MindooDBAppIssueSeverity;
507
+ /** For the user, in their language. At most 500 characters. */
508
+ message: string;
509
+ /** Where in the document, so the component can show it (`embed.reveal`). */
510
+ anchor?: MindooDBAppInspectAnchor;
511
+ /** Stable id of the rule, e.g. `open-placeholders`. */
512
+ code?: string;
513
+ }
514
+ /** What a host asks a component to describe (`embed.inspect`, `onBeforeSave`). */
515
+ interface MindooDBAppInspectRequest {
516
+ /** One of the component's `inspect:` contracts. Default: its first one. */
517
+ contract?: string;
518
+ /**
519
+ * Optional parts: `text` (plain text of a document, see `maxTextLength`). Other
520
+ * parts of the contracts are always there.
521
+ */
522
+ include?: string[];
523
+ /** Spreadsheets: cells whose values to return, `Sheet1!B3` or `B3` (first sheet). At most 200. */
524
+ cells?: string[];
525
+ /** With `include: ["text"]`: at most this many characters (default 4000, max 50000). */
526
+ maxTextLength?: number;
527
+ }
528
+ /** What every inspection carries. */
529
+ interface MindooDBAppInspectionBase {
530
+ contract: string;
531
+ /** Title of the document (the root's `subject`). */
532
+ subject?: string;
533
+ /** Set when lists or text were shortened, e.g. in the root summary. */
534
+ truncated?: boolean;
535
+ }
536
+ /** `mindoo.inspect.document@1`: a Word or Markdown document. */
537
+ interface MindooDBAppDocumentInspection extends MindooDBAppInspectionBase {
538
+ contract: typeof MINDOODB_INSPECT_DOCUMENT;
539
+ /** Plain text, shortened to `maxTextLength`; only with `include: ["text"]`. */
540
+ text?: string;
541
+ /** Headings in document order. */
542
+ outline: Array<{
543
+ level: number;
544
+ text: string;
545
+ anchor: {
546
+ kind: "heading";
547
+ id: string;
548
+ };
549
+ }>;
550
+ /** Placeholders and Word MERGEFIELDs that were not filled in yet. */
551
+ placeholders: Array<{
552
+ name: string;
553
+ kind: "placeholder" | "mergefield";
554
+ anchor?: MindooDBAppInspectAnchor;
555
+ }>;
556
+ /** Comments that are not resolved. */
557
+ openComments: number;
558
+ /** Tracked changes that were neither accepted nor rejected. */
559
+ openTrackedChanges: number;
560
+ wordCount: number;
561
+ }
562
+ /** A cell value as `mindoo.inspect.spreadsheet@1` reports it. */
563
+ interface MindooDBAppInspectedCell {
564
+ value: string | number | boolean | null;
565
+ formula?: string;
566
+ /** Formula error such as `#REF!` or `#DIV/0!`. */
567
+ error?: string;
568
+ }
569
+ /** `mindoo.inspect.spreadsheet@1`: a workbook. */
570
+ interface MindooDBAppSpreadsheetInspection extends MindooDBAppInspectionBase {
571
+ contract: typeof MINDOODB_INSPECT_SPREADSHEET;
572
+ sheets: Array<{
573
+ name: string;
574
+ rows?: number;
575
+ columns?: number;
576
+ }>;
577
+ namedRanges: Array<{
578
+ name: string;
579
+ ref: string;
580
+ }>;
581
+ /** The requested `cells`, keyed by the ref as requested. */
582
+ cells?: Record<string, MindooDBAppInspectedCell>;
583
+ /** Cells whose formula evaluates to an error. */
584
+ formulaErrors: Array<{
585
+ ref: string;
586
+ error: string;
587
+ formula?: string;
588
+ }>;
589
+ }
590
+ /** `mindoo.inspect.slides@1`: a presentation. */
591
+ interface MindooDBAppSlidesInspection extends MindooDBAppInspectionBase {
592
+ contract: typeof MINDOODB_INSPECT_SLIDES;
593
+ slideCount: number;
594
+ slides: Array<{
595
+ index: number;
596
+ title?: string;
597
+ }>;
598
+ /** Layout placeholders nobody filled, e.g. an empty title. */
599
+ emptyPlaceholders: Array<{
600
+ slide: number;
601
+ placeholder: string;
602
+ anchor: {
603
+ kind: "slide";
604
+ index: number;
605
+ };
606
+ }>;
607
+ }
608
+ type MindooDBAppInspection = MindooDBAppDocumentInspection | MindooDBAppSpreadsheetInspection | MindooDBAppSlidesInspection;
609
+ /** What a component passes to `session.embedding.complete`. */
610
+ interface MindooDBAppEmbeddingResult {
611
+ /** Title of the document after the edit. */
612
+ subject: string;
613
+ /** One or two sentences for the host to show. */
614
+ summary?: string;
615
+ /** Small preview, a `data:image/png` or `data:image/jpeg` URL (the whole result stays below 64 KiB). */
616
+ thumbnail?: string;
617
+ /** Counts such as words, sheets or slides. */
618
+ stats?: Record<string, number>;
619
+ }
620
+ /** The outcome of `session.embedding.validate`. */
621
+ interface MindooDBAppEmbedValidation {
622
+ /** False: do not save (an error, or the user did not confirm a warning). */
623
+ ok: boolean;
624
+ issues: MindooDBAppIssue[];
625
+ /** The host did not answer in time; Haven let the save go ahead. */
626
+ timedOut?: boolean;
627
+ }
628
+ /** Thrown by `session.embedding.save` when the host's checks stopped the save. */
629
+ declare class MindooDBAppEmbedValidationError extends Error {
630
+ readonly issues: MindooDBAppIssue[];
631
+ constructor(issues: MindooDBAppIssue[]);
632
+ }
633
+ /**
634
+ * Whether a component's `supports` list covers `requirement`: `inspect` is met by
635
+ * any `inspect:…` entry, `inspect:mindoo.inspect.document@1` only by that one.
636
+ */
637
+ declare function mindooDBAppComponentSupports(supports: readonly string[] | undefined, requirement: string): boolean;
638
+ /** The contracts of a component's `inspect:` entries, in declared order. */
639
+ declare function mindooDBAppInspectContracts(supports: readonly string[] | undefined): string[];
640
+ /** A valid anchor, or undefined. */
641
+ declare function normalizeMindooDBAppInspectAnchor(raw: unknown): MindooDBAppInspectAnchor | undefined;
642
+ /**
643
+ * Issues as they may cross between apps: known severities, messages and codes
644
+ * shortened, invalid anchors dropped, at most {@link MINDOODB_APP_ISSUES_MAX}.
645
+ * Anything that is not an issue is left out.
646
+ */
647
+ declare function normalizeMindooDBAppIssues(raw: unknown): MindooDBAppIssue[];
648
+ /** An inspect request as it may cross between apps. */
649
+ declare function normalizeMindooDBAppInspectRequest(raw: unknown): MindooDBAppInspectRequest;
650
+ /**
651
+ * An inspection as it may cross between apps: plain JSON with a `contract`, at
652
+ * most {@link MINDOODB_APP_INSPECTION_MAX_BYTES}. Throws otherwise.
653
+ */
654
+ declare function normalizeMindooDBAppInspection(raw: unknown): MindooDBAppInspectionBase & Record<string, unknown>;
655
+ /**
656
+ * The small summary of an inspection a component keeps on its root document:
657
+ * no requested cells, text and lists shortened (`truncated: true` then) until it
658
+ * fits {@link MINDOODB_APP_INSPECTION_SUMMARY_MAX_BYTES}. Counts stay exact, so
659
+ * rules like "no open placeholders" give the same answer on it.
660
+ */
661
+ declare function summarizeMindooDBAppInspection<T extends MindooDBAppInspectionBase>(inspection: T, maxBytes?: number): T;
662
+ /**
663
+ * The summary as a value to write to the root (`set: { inspection: … }`): one
664
+ * atomic string of JSON, so concurrent saves replace it instead of merging text.
665
+ */
666
+ declare function mindooDBAppInspectionSummaryValue(inspection: MindooDBAppInspectionBase): MindooDBAppAtomicValue;
667
+ /** The summary a component wrote to this root document, or null. */
668
+ declare function readMindooDBAppInspectionSummary<T extends MindooDBAppInspectionBase = MindooDBAppInspection>(root: Readonly<Record<string, unknown>> | null | undefined): T | null;
669
+ /** What a rule's `check` may return: a message, issues, or nothing for "fine". */
670
+ type MindooDBAppDocumentRuleOutcome = string | MindooDBAppIssue | MindooDBAppIssue[] | null | undefined | false;
671
+ /** One check on an inspection. */
672
+ interface MindooDBAppDocumentRule<T extends MindooDBAppInspectionBase = MindooDBAppInspection> {
673
+ /** Stable id; becomes the issue's `code`. */
674
+ code: string;
675
+ /** For a message returned as a string. Default `error`. */
676
+ severity?: MindooDBAppIssueSeverity;
677
+ check(inspection: T): MindooDBAppDocumentRuleOutcome;
678
+ }
679
+ /** What {@link defineDocumentRules} returns. */
680
+ interface MindooDBAppDocumentRules {
681
+ /** What to ask the component for (`embed.onBeforeSave(handler, { inspect: rules.request })`). */
682
+ readonly request: MindooDBAppInspectRequest;
683
+ /** Issues of a full inspection; none for an inspection of another contract. */
684
+ check(inspection: MindooDBAppInspectionBase | null | undefined): MindooDBAppIssue[];
685
+ /** The same rules on a root document's summary (`inspection` field); none without one. */
686
+ checkRoot(root: Readonly<Record<string, unknown>> | null | undefined): MindooDBAppIssue[];
687
+ /** A ready `embed.onBeforeSave` handler. */
688
+ beforeSave(input: {
689
+ inspection: MindooDBAppInspectionBase | null;
690
+ }): {
691
+ issues: MindooDBAppIssue[];
692
+ };
693
+ /** Checks every save of this embed; returns the function that stops it. */
694
+ attach(embed: {
695
+ onBeforeSave(handler: (input: {
696
+ inspection: MindooDBAppInspectionBase | null;
697
+ }) => {
698
+ issues: MindooDBAppIssue[];
699
+ }, options?: {
700
+ inspect?: MindooDBAppInspectRequest;
701
+ }): () => void;
702
+ }): () => void;
703
+ }
704
+ /**
705
+ * Rules a host applies to a component's document, before a save (on the full
706
+ * inspection) and when reading (on the root's summary):
707
+ *
708
+ * ```ts
709
+ * const rules = defineDocumentRules<MindooDBAppDocumentInspection>({
710
+ * contract: MINDOODB_INSPECT_DOCUMENT,
711
+ * rules: [mindooDBAppInspectRules.noOpenPlaceholders(), mindooDBAppInspectRules.noOpenTrackedChanges("warning")],
712
+ * });
713
+ * rules.attach(embed);
714
+ * const issues = rules.checkRoot(document.data);
715
+ * ```
716
+ *
717
+ * The summary is shortened, so rules that look at text or long lists may see
718
+ * less on it than on the full inspection; counts are always exact.
719
+ */
720
+ declare function defineDocumentRules<T extends MindooDBAppInspectionBase = MindooDBAppInspection>(definition: {
721
+ /** Only inspections of this contract are checked. */
722
+ contract?: string;
723
+ include?: string[];
724
+ cells?: string[];
725
+ maxTextLength?: number;
726
+ rules: Array<MindooDBAppDocumentRule<T>>;
727
+ }): MindooDBAppDocumentRules;
728
+ /** Common rules for {@link defineDocumentRules}; pass `message` to word them yourself. */
729
+ declare const mindooDBAppInspectRules: {
730
+ /** Documents: no placeholder or MERGEFIELD left open. */
731
+ noOpenPlaceholders(severity?: MindooDBAppIssueSeverity, message?: (names: string[]) => string): MindooDBAppDocumentRule<MindooDBAppDocumentInspection>;
732
+ /** Documents: every comment resolved. */
733
+ noOpenComments(severity?: MindooDBAppIssueSeverity, message?: (count: number) => string): MindooDBAppDocumentRule<MindooDBAppDocumentInspection>;
734
+ /** Documents: every tracked change accepted or rejected. */
735
+ noOpenTrackedChanges(severity?: MindooDBAppIssueSeverity, message?: (count: number) => string): MindooDBAppDocumentRule<MindooDBAppDocumentInspection>;
736
+ /** Spreadsheets: no formula evaluates to an error; one issue per cell. */
737
+ noFormulaErrors(severity?: MindooDBAppIssueSeverity): MindooDBAppDocumentRule<MindooDBAppSpreadsheetInspection>;
738
+ /** Presentations: no layout placeholder left empty; one issue per slide. */
739
+ noEmptySlidePlaceholders(severity?: MindooDBAppIssueSeverity): MindooDBAppDocumentRule<MindooDBAppSlidesInspection>;
740
+ };
741
+ /**
742
+ * How Haven turns a host's answer into the component's `validate` result: an error
743
+ * stops the save, warnings stop it unless the user confirms (`confirm`), or
744
+ * nothing asks (`interactive: false`).
745
+ */
746
+ declare function resolveMindooDBAppEmbedValidation(issues: MindooDBAppIssue[], interactive: boolean, confirm: (warnings: MindooDBAppIssue[]) => boolean | Promise<boolean>): Promise<MindooDBAppEmbedValidation>;
747
+
394
748
  /** Launch target used by the Haven when opening an app. */
395
749
  type MindooDBAppRuntime = "iframe" | "window";
396
750
  /**
@@ -1912,12 +2266,20 @@ interface MindooDBAppComponentInfo {
1912
2266
  provides?: MindooDBAppComponentContract[];
1913
2267
  /** Fields of its root documents that point at other root documents. */
1914
2268
  references?: MindooDBAppComponentReference[];
2269
+ /** What it can do beyond showing the document, e.g. `inspect:mindoo.inspect.document@1`, `validate`. */
2270
+ supports?: string[];
1915
2271
  }
1916
2272
  /** Filter for `session.components.list`. */
1917
2273
  interface MindooDBAppComponentQuery {
1918
2274
  intent?: MindooDBAppComponentIntent;
1919
2275
  /** Only components whose `match` fits these root document fields. */
1920
2276
  document?: Record<string, unknown>;
2277
+ /**
2278
+ * Only components that support all of these (`supports` in their haven-app.json):
2279
+ * `inspect` matches any `inspect:…` entry, `inspect:mindoo.inspect.document@1`
2280
+ * only that contract.
2281
+ */
2282
+ requires?: string[];
1921
2283
  }
1922
2284
  /** Rectangle in the host app's viewport, CSS pixels. */
1923
2285
  type MindooDBAppEmbedRect = MindooDBAppMenuRect;
@@ -2062,6 +2424,55 @@ interface MindooDBAppEmbed {
2062
2424
  * `timeoutMs` (default 10 s) or when the component closes.
2063
2425
  */
2064
2426
  waitForAgentTools(timeoutMs?: number): Promise<MindooDBAppEmbedAgentTools | null>;
2427
+ /** What the component supports (`supports` in its haven-app.json); empty on older Havens. */
2428
+ readonly supports: readonly string[];
2429
+ /**
2430
+ * Asks the component to describe its document (it must support `inspect:<contract>`),
2431
+ * e.g. to show the open placeholders of a letter. Rejects with `unsupported` when it
2432
+ * does not.
2433
+ */
2434
+ inspect<T extends MindooDBAppInspectionBase = MindooDBAppInspectionBase>(request?: MindooDBAppInspectRequest): Promise<T>;
2435
+ /**
2436
+ * Checks every save of the component before it happens (components that support
2437
+ * `validate` ask before they save, `session.embedding.validate`). `handler` gets the
2438
+ * component's inspection, asked for with `options.inspect` (null when the component
2439
+ * cannot describe its document), plus the root document as saved last time, and
2440
+ * answers with issues: an `error` stops the save, a `warning` makes Haven ask the
2441
+ * user. Saves the user, this app (`save()`) or an agent start alike. Without an
2442
+ * answer within about 5 s the component saves and the user is told. One handler at
2443
+ * a time; returns the function that removes it.
2444
+ */
2445
+ onBeforeSave(handler: (input: MindooDBAppEmbedBeforeSaveInput) => MindooDBAppEmbedBeforeSaveResult | Promise<MindooDBAppEmbedBeforeSaveResult>, options?: {
2446
+ inspect?: MindooDBAppInspectRequest;
2447
+ }): () => void;
2448
+ /** Called after the component saved (it reports that through `session.embedding.save`). */
2449
+ onAfterSave(listener: (event: MindooDBAppEmbedSavedEvent) => void): () => void;
2450
+ /** Shows issues in the component (it must support `issues`), e.g. after this app checked it. */
2451
+ showIssues(issues: MindooDBAppIssue[]): Promise<void>;
2452
+ /** Scrolls the component to a place in its document (it must support `reveal`). */
2453
+ reveal(anchor: MindooDBAppInspectAnchor): Promise<void>;
2454
+ /**
2455
+ * Runs one of the component's document agent tools (`scope: "document"`), e.g.
2456
+ * `text_insert`, with or without its prefix. For what the other methods do not
2457
+ * cover; agent tools need not be switched on. Resolves with the tool's result.
2458
+ */
2459
+ callTool(name: string, input?: Record<string, unknown>): Promise<unknown>;
2460
+ }
2461
+ /** What an `embed.onBeforeSave` handler gets. */
2462
+ interface MindooDBAppEmbedBeforeSaveInput {
2463
+ embedId: string;
2464
+ /** The component's description of the document as it is about to be saved; null if it has none. */
2465
+ inspection: MindooDBAppInspectionBase | null;
2466
+ /** The root document's fields as last saved (large fields may be missing). */
2467
+ root: Record<string, unknown> | null;
2468
+ }
2469
+ /** What an `embed.onBeforeSave` handler answers. */
2470
+ interface MindooDBAppEmbedBeforeSaveResult {
2471
+ issues: MindooDBAppIssue[];
2472
+ }
2473
+ /** Pushed after an embedded component saved. */
2474
+ interface MindooDBAppEmbedSavedEvent {
2475
+ embedId: string;
2065
2476
  }
2066
2477
  /** The agent tools of an embedded component, as its host sees them. */
2067
2478
  interface MindooDBAppEmbedAgentTools {
@@ -2135,6 +2546,47 @@ interface MindooDBAppEmbeddingApi {
2135
2546
  * 20, max 100) results.
2136
2547
  */
2137
2548
  lookup(field: string, options?: MindooDBAppEmbeddingLookupOptions): Promise<MindooDBAppEmbeddingLookupResult[]>;
2549
+ /**
2550
+ * Describes the document when the host asks (`embed.inspect`, its save checks),
2551
+ * following one of the contracts in `supports` (`inspect:<contract>`). Also used
2552
+ * by `save` for the root summary. One provider at a time; returns the unregister
2553
+ * function.
2554
+ */
2555
+ provideInspection(provider: (request: MindooDBAppInspectRequest) => MindooDBAppInspectionBase | Promise<MindooDBAppInspectionBase>): () => void;
2556
+ /**
2557
+ * Lets the host check the document before this component saves it: Haven asks the
2558
+ * host's `onBeforeSave` (with this app's inspection) and, for warnings, the user
2559
+ * (unless `interactive: false`, e.g. for an agent's save; then warnings do not
2560
+ * stop it). Resolves `ok: true` right away when not embedded or the host has no
2561
+ * checks. Prefer {@link save}, which also writes the root summary.
2562
+ */
2563
+ validate(options?: {
2564
+ interactive?: boolean;
2565
+ }): Promise<MindooDBAppEmbedValidation>;
2566
+ /**
2567
+ * Saving with the host's checks: `validate`, then `flush` (write the pending
2568
+ * changes; put `context.inspection` into the root's `inspection` field when it is
2569
+ * set), then tells the host it saved. Throws a `MindooDBAppEmbedValidationError`
2570
+ * without calling `flush` when the checks stopped it, after passing the issues to
2571
+ * the `onShowIssues` handler. Works the same standalone, without checks.
2572
+ */
2573
+ save(flush: (context: MindooDBAppEmbeddingSaveContext) => void | Promise<void>, options?: {
2574
+ interactive?: boolean;
2575
+ }): Promise<MindooDBAppEmbedValidation>;
2576
+ /** Shows the host's issues (`embed.showIssues`, and failed saves). Returns the unregister function. */
2577
+ onShowIssues(handler: (issues: MindooDBAppIssue[]) => void | Promise<void>): () => void;
2578
+ /** Scrolls to a place in the document (`embed.reveal`). Returns the unregister function. */
2579
+ onReveal(handler: (anchor: MindooDBAppInspectAnchor) => void | Promise<void>): () => void;
2580
+ }
2581
+ /** What `session.embedding.save` hands to `flush`. */
2582
+ interface MindooDBAppEmbeddingSaveContext {
2583
+ /**
2584
+ * The summary of this app's inspection (see `provideInspection`), ready to write as
2585
+ * the root's `inspection` field; null without a provider.
2586
+ */
2587
+ inspection: MindooDBAppAtomicValue | null;
2588
+ /** What the host's checks found but let pass (warnings the user confirmed, infos). */
2589
+ issues: MindooDBAppIssue[];
2138
2590
  }
2139
2591
  interface MindooDBAppEmbeddingLookupOptions {
2140
2592
  query?: string;
@@ -2147,12 +2599,29 @@ interface MindooDBAppEmbeddingLookupResult {
2147
2599
  /** The reference's `show` fields the document has. */
2148
2600
  fields: Record<string, unknown>;
2149
2601
  }
2150
- /** Haven → component: the host asked for something (`embed.save()`). */
2602
+ /**
2603
+ * Haven → component: the host asked for something (`embed.save()`, `embed.inspect()`,
2604
+ * …). The component answers with `embedding.respond`.
2605
+ */
2151
2606
  interface MindooDBAppBridgeEmbeddingRequestMessage {
2152
2607
  protocol: "mindoodb-app-bridge";
2153
2608
  kind: "embedding-request";
2154
2609
  requestId: string;
2155
- request: "save";
2610
+ request: "save" | "inspect" | "showIssues" | "reveal";
2611
+ /** `inspect`: `{ request }`, `showIssues`: `{ issues }`, `reveal`: `{ anchor }`. */
2612
+ params?: Record<string, unknown>;
2613
+ }
2614
+ /** Haven → host: a question about an embed the host has to answer (`embeds.respond`). */
2615
+ interface MindooDBAppBridgeEmbedRequestMessage {
2616
+ protocol: "mindoodb-app-bridge";
2617
+ kind: "embed-request";
2618
+ requestId: string;
2619
+ embedId: string;
2620
+ request: "beforeSave";
2621
+ params: {
2622
+ inspection: MindooDBAppInspectionBase | null;
2623
+ root: Record<string, unknown> | null;
2624
+ };
2156
2625
  }
2157
2626
  /** The component reported whether it has unsaved changes. */
2158
2627
  interface MindooDBAppEmbedDirtyEvent {
@@ -2169,9 +2638,11 @@ interface MindooDBAppBridgeEmbedEventMessage {
2169
2638
  type: "dirty";
2170
2639
  } & MindooDBAppEmbedDirtyEvent) | ({
2171
2640
  type: "agentTools";
2172
- } & MindooDBAppEmbedAgentToolsEvent);
2641
+ } & MindooDBAppEmbedAgentToolsEvent) | ({
2642
+ type: "saved";
2643
+ } & MindooDBAppEmbedSavedEvent);
2173
2644
  }
2174
- type MindooDBAppBridgePortMessage = MindooDBAppBridgeRpcMessage | MindooDBAppBridgeStreamMessage | MindooDBAppBridgeThemeChangedMessage | MindooDBAppBridgeViewportChangedMessage | MindooDBAppBridgeUiPreferencesChangedMessage | MindooDBAppBridgeLocaleChangedMessage | MindooDBAppBridgeQueryResultMessage | MindooDBAppBridgeViewChangedMessage | MindooDBAppBridgeBeforeCloseMessage | MindooDBAppBridgeBeforeCloseAck | MindooDBAppBridgeShortcutsChangedMessage | MindooDBAppBridgeShortcutInvokedMessage | MindooDBAppBridgeWorkspaceFocusRequestedMessage | MindooDBAppBridgeHostFocusChangedMessage | MindooDBAppBridgeAgentInvokeMessage | MindooDBAppBridgeAgentResultMessage | MindooDBAppBridgeDragOverMessage | MindooDBAppBridgeDragLeaveMessage | MindooDBAppBridgeDragDropMessage | MindooDBAppBridgeIncomingContentMessage | MindooDBAppBridgeReminderOpenedMessage | MindooDBAppBridgeEmbedEventMessage | MindooDBAppBridgeEmbeddingRequestMessage;
2645
+ type MindooDBAppBridgePortMessage = MindooDBAppBridgeRpcMessage | MindooDBAppBridgeStreamMessage | MindooDBAppBridgeThemeChangedMessage | MindooDBAppBridgeViewportChangedMessage | MindooDBAppBridgeUiPreferencesChangedMessage | MindooDBAppBridgeLocaleChangedMessage | MindooDBAppBridgeQueryResultMessage | MindooDBAppBridgeViewChangedMessage | MindooDBAppBridgeBeforeCloseMessage | MindooDBAppBridgeBeforeCloseAck | MindooDBAppBridgeShortcutsChangedMessage | MindooDBAppBridgeShortcutInvokedMessage | MindooDBAppBridgeWorkspaceFocusRequestedMessage | MindooDBAppBridgeHostFocusChangedMessage | MindooDBAppBridgeAgentInvokeMessage | MindooDBAppBridgeAgentResultMessage | MindooDBAppBridgeDragOverMessage | MindooDBAppBridgeDragLeaveMessage | MindooDBAppBridgeDragDropMessage | MindooDBAppBridgeIncomingContentMessage | MindooDBAppBridgeReminderOpenedMessage | MindooDBAppBridgeEmbedEventMessage | MindooDBAppBridgeEmbedRequestMessage | MindooDBAppBridgeEmbeddingRequestMessage;
2175
2646
  /** Placement hint for a host-rendered overlay menu. */
2176
2647
  type MindooDBAppMenuPlacement = "auto" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | "right-start" | "left-start";
2177
2648
  /** Semantic hint allowing Haven to tune menu behavior or styling. */
@@ -3882,4 +4353,4 @@ interface MindooDBAppBridge {
3882
4353
  connect(options?: MindooDBAppBridgeConnectOptions): Promise<MindooDBAppSession>;
3883
4354
  }
3884
4355
 
3885
- export { type MindooDBAppAttachmentPreviewSession 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_LISTING_DESCRIPTION_MAX as H, MINDOODB_APP_LISTING_MAX_SCREENSHOTS as I, MINDOODB_APP_LISTING_SUMMARY_MAX as J, MINDOODB_APP_SEAL_SIGNING_DOMAIN as K, MINDOODB_APP_WELL_KNOWN_DRAG_TYPES as L, type MindooDBAppAttachmentPreviewMode as M, type MindooDBAppAcceptSpec as N, type MindooDBAppAccessDecision as O, type MindooDBAppAccessTier as P, type MindooDBAppAgentApi as Q, type MindooDBAppAgentCapability as R, type MindooDBAppAgentProfile as S, type MindooDBAppAgentRegistration as T, type MindooDBAppAgentToolAnnotations as U, type MindooDBAppAgentToolDescriptor as V, type MindooDBAppAgentToolScope as W, type MindooDBAppAttachmentApi as X, type MindooDBAppAttachmentChunk as Y, type MindooDBAppAttachmentInfo as Z, type MindooDBAppAttachmentPreviewOptions as _, type MindooDBAppDragBindSourceOptions as a, type MindooDBAppConfiguredViewFilterRule as a$, type MindooDBAppAutomergeChangesPatch as a0, type MindooDBAppAutomergeChangesSince as a1, type MindooDBAppAutomergeGetOptions as a2, type MindooDBAppAutomergePatchResult as a3, type MindooDBAppAutomergeSnapshot as a4, type MindooDBAppBridgeAgentInvokeMessage as a5, type MindooDBAppBridgeAgentResultMessage as a6, type MindooDBAppBridgeBeforeCloseAck as a7, type MindooDBAppBridgeBeforeCloseMessage as a8, type MindooDBAppBridgeConnectMessage as a9, type MindooDBAppBridgeStreamOpenResult as aA, type MindooDBAppBridgeStreamReadRequest as aB, type MindooDBAppBridgeStreamWriteRequest as aC, type MindooDBAppBridgeThemeChangedMessage as aD, type MindooDBAppBridgeUiPreferencesChangedMessage as aE, type MindooDBAppBridgeViewChangedMessage as aF, type MindooDBAppBridgeViewportChangedMessage as aG, type MindooDBAppBridgeWorkspaceFocusRequestedMessage as aH, type MindooDBAppBrowserFeatures as aI, type MindooDBAppCapability as aJ, type MindooDBAppComponentCategory as aK, type MindooDBAppComponentChildren as aL, type MindooDBAppComponentContract as aM, type MindooDBAppComponentFieldValue as aN, type MindooDBAppComponentInfo as aO, type MindooDBAppComponentIntent as aP, type MindooDBAppComponentQuery as aQ, type MindooDBAppComponentReference as aR, type MindooDBAppComponentSpec as aS, type MindooDBAppComponentsApi as aT, type MindooDBAppConfiguredViewCategorizationStyle as aU, type MindooDBAppConfiguredViewColumn as aV, type MindooDBAppConfiguredViewColumnRole as aW, type MindooDBAppConfiguredViewExpressionMode as aX, type MindooDBAppConfiguredViewFieldExpression as aY, type MindooDBAppConfiguredViewFilterDefinition as aZ, type MindooDBAppConfiguredViewFilterMode as a_, type MindooDBAppBridgeConnectOptions as aa, type MindooDBAppBridgeConnectedMessage as ab, type MindooDBAppBridgeDragDropMessage as ac, type MindooDBAppBridgeDragLeaveMessage as ad, type MindooDBAppBridgeDragOverMessage as ae, type MindooDBAppBridgeEmbedEventMessage as af, type MindooDBAppBridgeEmbeddingRequestMessage as ag, type MindooDBAppBridgeErrorPayload as ah, type MindooDBAppBridgeHandshakeErrorMessage as ai, type MindooDBAppBridgeHostFocusChangedMessage as aj, type MindooDBAppBridgeIncomingContentMessage as ak, type MindooDBAppBridgeLocaleChangedMessage as al, type MindooDBAppBridgePortMessage as am, type MindooDBAppBridgeQueryResultMessage as an, type MindooDBAppBridgeReminderOpenedMessage as ao, type MindooDBAppBridgeRpcError as ap, type MindooDBAppBridgeRpcMessage as aq, type MindooDBAppBridgeRpcRequest as ar, type MindooDBAppBridgeRpcSuccess as as, type MindooDBAppBridgeShortcutInvokedMessage as at, type MindooDBAppBridgeShortcutsChangedMessage as au, type MindooDBAppBridgeStreamAbortRequest as av, type MindooDBAppBridgeStreamAck as aw, type MindooDBAppBridgeStreamCloseRequest as ax, type MindooDBAppBridgeStreamError as ay, type MindooDBAppBridgeStreamMessage as az, type MindooDBAppDragStartInput as b, type MindooDBAppHostTheme as b$, type MindooDBAppConfiguredViewFormulaExpression as b0, type MindooDBAppConfiguredViewFormulaFilterDefinition as b1, type MindooDBAppConfiguredViewPreviewMode as b2, type MindooDBAppConfiguredViewRuleFilterDefinition as b3, type MindooDBAppConfiguredViewRuleMatchMode as b4, type MindooDBAppConfiguredViewRuleOperator as b5, type MindooDBAppConfiguredViewValueExpression as b6, type MindooDBAppCreateKeyInfo as b7, type MindooDBAppCreateViewInput as b8, type MindooDBAppCreateViewNavigatorInput as b9, type MindooDBAppDragProfile as bA, type MindooDBAppEmbed as bB, type MindooDBAppEmbedAccessComponent as bC, type MindooDBAppEmbedAccessInput as bD, type MindooDBAppEmbedAccessPair as bE, type MindooDBAppEmbedAccessResult as bF, type MindooDBAppEmbedAgentTools as bG, type MindooDBAppEmbedAgentToolsEvent as bH, type MindooDBAppEmbedCloseReason as bI, type MindooDBAppEmbedClosedEvent as bJ, type MindooDBAppEmbedContext as bK, type MindooDBAppEmbedDirtyEvent as bL, type MindooDBAppEmbedOpenInput as bM, type MindooDBAppEmbedRect as bN, type MindooDBAppEmbeddingApi as bO, type MindooDBAppEmbeddingLookupOptions as bP, type MindooDBAppEmbeddingLookupResult as bQ, type MindooDBAppEmbedsApi as bR, type MindooDBAppEntryAttachmentRef as bS, type MindooDBAppEntryProvenance as bT, type MindooDBAppExtractDocumentTextInput as bU, type MindooDBAppExtractDocumentTextResult as bV, type MindooDBAppExtractTextFormat as bW, type MindooDBAppExtractionSetup as bX, type MindooDBAppFulltextSetup as bY, type MindooDBAppHistoricalDocument as bZ, type MindooDBAppHistoryQuery as b_, type MindooDBAppDatabaseInfo as ba, type MindooDBAppDefinitionDatabase as bb, type MindooDBAppDefinitionListing as bc, type MindooDBAppDefinitionPermission as bd, type MindooDBAppDefinitionRegistrationPermission as be, type MindooDBAppDefinitionScreenshot as bf, type MindooDBAppDefinitionValidation as bg, type MindooDBAppDirectoryApi as bh, type MindooDBAppDirectoryEntry as bi, type MindooDBAppDocumentApi as bj, type MindooDBAppDocumentHeadCursorResult as bk, type MindooDBAppDocumentHistoryEntry as bl, type MindooDBAppDocumentListQuery as bm, type MindooDBAppDocumentListResult as bn, type MindooDBAppDocumentQuery as bo, type MindooDBAppDocumentRevisionId as bp, type MindooDBAppDocumentScanPreset as bq, type MindooDBAppDocumentSummary as br, type MindooDBAppDragApi as bs, type MindooDBAppDragCancelReason as bt, type MindooDBAppDragDropEvent as bu, type MindooDBAppDragEffect as bv, type MindooDBAppDragHoverResult as bw, type MindooDBAppDragOffer as bx, type MindooDBAppDragOverEvent as by, type MindooDBAppDragPointer as bz, type MindooDBAppDragStartResult as c, type MindooDBAppReminderScheduleResult as c$, type MindooDBAppIdentityApi as c0, type MindooDBAppInaccessibleDocument as c1, type MindooDBAppInaccessibleDocumentListQuery as c2, type MindooDBAppInaccessibleDocumentListResult as c3, type MindooDBAppIncomingContent as c4, type MindooDBAppIncomingContentHandler as c5, type MindooDBAppIncomingContentInfo as c6, type MindooDBAppIncomingItem as c7, type MindooDBAppIncomingItemInfo as c8, type MindooDBAppIncomingResult as c9, type MindooDBAppMenuRectAnchor as cA, type MindooDBAppMenuSelectionResult as cB, type MindooDBAppMenuSeparatorItem as cC, type MindooDBAppNotificationSeverity as cD, type MindooDBAppNotifyInput as cE, type MindooDBAppNotifyResult as cF, type MindooDBAppPdfApi as cG, type MindooDBAppPdfSignInput as cH, type MindooDBAppPdfSignResult as cI, type MindooDBAppPdfSignaturePosition as cJ, type MindooDBAppPdfSigner as cK, type MindooDBAppProposeAppInput as cL, type MindooDBAppProposeAppResult as cM, type MindooDBAppQueryCoverage as cN, type MindooDBAppQueryInclude as cO, type MindooDBAppQueryIncludeCardinality as cP, type MindooDBAppQueryIncludeSlots as cQ, type MindooDBAppQueryResult as cR, type MindooDBAppQueryRow as cS, type MindooDBAppQuerySortKey as cT, type MindooDBAppQueryTextClause as cU, type MindooDBAppReadableAttachmentStream as cV, type MindooDBAppRecipientOptions as cW, type MindooDBAppReminder as cX, type MindooDBAppReminderOpened as cY, type MindooDBAppReminderOpenedHandler as cZ, type MindooDBAppReminderRequest as c_, type MindooDBAppIncomingSource as ca, type MindooDBAppJsonCounterIncrementPatch as cb, type MindooDBAppJsonListDeletePatch as cc, type MindooDBAppJsonListInsertPatch as cd, type MindooDBAppJsonPatch as ce, type MindooDBAppJsonSetPatch as cf, type MindooDBAppJsonTextMarkPatch as cg, type MindooDBAppJsonTextSplicePatch as ch, type MindooDBAppJsonTextUnmarkPatch as ci, type MindooDBAppJsonUnsetPatch as cj, type MindooDBAppLaunchContext as ck, type MindooDBAppListUsersOptions as cl, type MindooDBAppListUsersPage as cm, type MindooDBAppLiveQuerySubscription as cn, type MindooDBAppLocaleMap as co, type MindooDBAppLocalizedText as cp, type MindooDBAppMenuAnchor as cq, type MindooDBAppMenuApi as cr, type MindooDBAppMenuCommandItem as cs, type MindooDBAppMenuDismissReason as ct, type MindooDBAppMenuDismissedResult as cu, type MindooDBAppMenuItem as cv, type MindooDBAppMenuKind as cw, type MindooDBAppMenuPlacement as cx, type MindooDBAppMenuPointAnchor as cy, type MindooDBAppMenuRect as cz, type MindooDBAppDragPreview as d, mindooDBAppAcceptMatchesType as d$, type MindooDBAppRemindersApi as d0, type MindooDBAppResolvedViewDefinition as d1, type MindooDBAppResolvedViewSource as d2, type MindooDBAppRevisionPhase as d3, type MindooDBAppRevisionVerification as d4, type MindooDBAppRichTextBlockSpan as d5, type MindooDBAppRichTextGetOptions as d6, type MindooDBAppRichTextImmutableString as d7, type MindooDBAppRichTextMarkRange as d8, type MindooDBAppRichTextMaterializeValue as d9, type MindooDBAppTextCursorPosition as dA, type MindooDBAppTextCursorPositionsResult as dB, type MindooDBAppTextCursorsResult as dC, type MindooDBAppTextEdit as dD, type MindooDBAppTextPatch as dE, type MindooDBAppThemeMode as dF, type MindooDBAppTimestampApi as dG, type MindooDBAppTimestampInput as dH, type MindooDBAppTimestampProvider as dI, type MindooDBAppTimestampResult as dJ, type MindooDBAppUiPreferences as dK, type MindooDBAppUpdateDocumentInput as dL, type MindooDBAppViewCursorDocumentListResult as dM, type MindooDBAppViewCursorResult as dN, type MindooDBAppViewEntry as dO, type MindooDBAppViewEntryKind as dP, type MindooDBAppViewNavigator as dQ, type MindooDBAppViewNavigatorExpansionState as dR, type MindooDBAppViewNavigatorOpenOptions as dS, type MindooDBAppViewNavigatorPageOptions as dT, type MindooDBAppViewNavigatorPageResult as dU, type MindooDBAppViewNavigatorRangeQuery as dV, type MindooDBAppViewNavigatorSelectionState as dW, type MindooDBAppViewUpdateStats as dX, type MindooDBAppViewport as dY, type MindooDBAppWellKnownDragType as dZ, type MindooDBAppWritableAttachmentStream as d_, type MindooDBAppRichTextPatch as da, type MindooDBAppRichTextScalar as db, type MindooDBAppRichTextSpliceStep as dc, type MindooDBAppRichTextStep as dd, type MindooDBAppRichTextStepPatch as de, type MindooDBAppRichTextTextSpan as df, type MindooDBAppRuntime as dg, type MindooDBAppScanAttachmentOptions as dh, type MindooDBAppScanAttachmentResult as di, type MindooDBAppScopedDocId as dj, type MindooDBAppScopedDocumentSummary as dk, type MindooDBAppSealIntent as dl, type MindooDBAppSealedChannelOpenInput as dm, type MindooDBAppSealedChannelOpenResult as dn, type MindooDBAppSealedChannelRequestInput as dp, type MindooDBAppSession as dq, type MindooDBAppShowMenuInput as dr, type MindooDBAppShowMenuResult as ds, type MindooDBAppSignPreview as dt, type MindooDBAppSignPreviewScope as du, type MindooDBAppSignStatementInput as dv, type MindooDBAppSignStatementResult as dw, type MindooDBAppStorageApi as dx, type MindooDBAppSummarySetup as dy, type MindooDBAppTextCursorOptions as dz, type MindooDBAppBridge as e, mindooDBAppComponentFieldsMatch as e0, resolveMindooDBAppDefinitionUrl as e1, resolveMindooDBAppListingAssetUrl as e2, resolveMindooDBAppLocalizedText as e3, validateMindooDBAppAccepts as e4, validateMindooDBAppAgentProfile as e5, validateMindooDBAppComponents as e6, validateMindooDBAppDefinition as e7, 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindoodb-app-sdk",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "engines": {
5
5
  "node": ">=22.13.0"
6
6
  },