mindoodb-app-sdk 0.0.68 → 0.0.70
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 +26 -1
- package/dist/{chunk-44S2R2PT.js → chunk-P7SOHCEQ.js} +82 -5
- package/dist/index.d.ts +30 -4
- package/dist/index.js +3 -1
- package/dist/testing/index.d.ts +17 -2
- package/dist/testing/index.js +56 -2
- package/dist/{types-BYsO5n5-.d.ts → types-7oOzrSr5.d.ts} +104 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -165,7 +165,7 @@ if (ctx.runtime === "iframe") {
|
|
|
165
165
|
}
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
`browserFeatures` says which browser features Haven leaves available to the app: `popups`, `camera`, `microphone`, `geolocation`, `clipboardWrite`, `motion`, `webRtc` and `workers`. `false` means Haven blocks the feature for this app, through the iframe sandbox, its `allow` attribute or the hosted app CSP, and the user has to enable it in the app's settings. The browser cannot report these restrictions to the app itself, so check them in an initial setup instead of letting a call fail silently:
|
|
168
|
+
`browserFeatures` says which browser features Haven leaves available to the app: `popups`, `camera`, `microphone`, `geolocation`, `clipboardWrite`, `motion`, `localFonts`, `webRtc` and `workers`. `false` means Haven blocks the feature for this app, through the iframe sandbox, its `allow` attribute or the hosted app CSP, and the user has to enable it in the app's settings. The browser cannot report these restrictions to the app itself, so check them in an initial setup instead of letting a call fail silently:
|
|
169
169
|
|
|
170
170
|
```ts
|
|
171
171
|
const ctx = await session.getLaunchContext();
|
|
@@ -687,6 +687,30 @@ Requirements and limits worth knowing before you design around this:
|
|
|
687
687
|
|
|
688
688
|
There is deliberately no API for decrypting arbitrary data with the user's key. That would be a decryption oracle: doc keys wrapped to the same key are publicly readable in the tenant directory, so an app able to unwrap chosen ciphertext could obtain keys for databases it was never granted.
|
|
689
689
|
|
|
690
|
+
### Signing PDFs with a certificate
|
|
691
|
+
|
|
692
|
+
`session.pdf.sign` signs finished PDF bytes with an X.509 certificate the user picks in Haven, as a PAdES signature that Adobe Acrobat and other readers list as a digital signature. Haven asks for a PKCS#12 file (`.p12`/`.pfx`) and its password, shows holder, issuer and validity, signs, and hands back the signed bytes. The certificate file, the password and the private key never reach your app, and Haven keeps none of them after the dialog: the user chooses the certificate again for every signature.
|
|
693
|
+
|
|
694
|
+
```ts
|
|
695
|
+
const bytes = await pdfDocument.save();
|
|
696
|
+
const result = await session.pdf.sign({
|
|
697
|
+
pdf: bytes,
|
|
698
|
+
fileName: "Site survey.pdf",
|
|
699
|
+
reason: "Approved",
|
|
700
|
+
visibleSignature: { pageIndex: 0, position: "bottom-right" }, // a proposal; the user can turn it off
|
|
701
|
+
timestamp: true, // RFC 3161 timestamp (PAdES-B-T), also a proposal
|
|
702
|
+
});
|
|
703
|
+
if (!result.ok) {
|
|
704
|
+
// "declined": the user cancelled. "unsupported": older Haven. Not errors.
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
download(result.pdf, "Site survey (signed).pdf");
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
- Signing is an incremental update: the original bytes stay unchanged and earlier signatures stay valid. Edit the PDF before signing, never after, or the signature breaks.
|
|
711
|
+
- Acrobat shows a green check only for certificates that chain to the Adobe Approved Trust List or that the reader trusts; a self-signed or company certificate shows "validity unknown", which is expected.
|
|
712
|
+
- No capability is needed: nothing is signed without the user choosing a certificate and entering its password in Haven's own dialog.
|
|
713
|
+
|
|
690
714
|
### Theme and viewport events
|
|
691
715
|
|
|
692
716
|
Haven pushes two types of live events to your app:
|
|
@@ -2142,6 +2166,7 @@ Connect options: `launchId?`, `targetOrigin?`, `connectTimeoutMs?`.
|
|
|
2142
2166
|
| `hasHostFocus()` | `Promise<boolean>` |
|
|
2143
2167
|
| `onHostFocusChange(listener)` | `() => void` (unsubscribe) |
|
|
2144
2168
|
| `notify(input)` | `Promise<{ id: string }>` |
|
|
2169
|
+
| `pdf.sign(input)` | `Promise<MindooDBAppPdfSignResult>` |
|
|
2145
2170
|
| `agent?.registerTools(tools)` | `Promise<MindooDBAppAgentRegistration>` |
|
|
2146
2171
|
| `agent?.setContext(context)` | `Promise<void>` |
|
|
2147
2172
|
| `agent?.provideFile(data, options)` | `Promise<{ fileRef: string; size: number }>` |
|
|
@@ -766,6 +766,7 @@ function validateMindooDBAppDefinition(raw) {
|
|
|
766
766
|
const allowGeolocation = readOptionalBoolean(raw, "allowGeolocation", errors);
|
|
767
767
|
const allowClipboardWrite = readOptionalBoolean(raw, "allowClipboardWrite", errors);
|
|
768
768
|
const allowMotion = readOptionalBoolean(raw, "allowMotion", errors);
|
|
769
|
+
const allowLocalFonts = readOptionalBoolean(raw, "allowLocalFonts", errors);
|
|
769
770
|
const allowWebRtc = readOptionalBoolean(raw, "allowWebRtc", errors);
|
|
770
771
|
const allowWorkers = readOptionalBoolean(raw, "allowWorkers", errors);
|
|
771
772
|
const listing = readListing(raw.listing, errors);
|
|
@@ -802,6 +803,7 @@ function validateMindooDBAppDefinition(raw) {
|
|
|
802
803
|
allowGeolocation,
|
|
803
804
|
allowClipboardWrite,
|
|
804
805
|
allowMotion,
|
|
806
|
+
allowLocalFonts,
|
|
805
807
|
allowWebRtc,
|
|
806
808
|
allowWorkers,
|
|
807
809
|
agentToolPrefix,
|
|
@@ -1226,6 +1228,47 @@ function bindDragSource(element, options, start, follow) {
|
|
|
1226
1228
|
};
|
|
1227
1229
|
}
|
|
1228
1230
|
|
|
1231
|
+
// src/client/agentInput.ts
|
|
1232
|
+
function isPlainObject2(value) {
|
|
1233
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1234
|
+
}
|
|
1235
|
+
function isPlaceholder(value) {
|
|
1236
|
+
if (value === null || value === void 0) return true;
|
|
1237
|
+
if (typeof value === "string") return value.trim() === "";
|
|
1238
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
1239
|
+
if (isPlainObject2(value)) return Object.keys(value).length === 0;
|
|
1240
|
+
return false;
|
|
1241
|
+
}
|
|
1242
|
+
function normalizeValue(value, schema) {
|
|
1243
|
+
if (!isPlainObject2(schema)) return value;
|
|
1244
|
+
if (Array.isArray(value)) {
|
|
1245
|
+
const items = schema.items;
|
|
1246
|
+
return isPlainObject2(items) ? value.map((item) => normalizeValue(item, items)) : value;
|
|
1247
|
+
}
|
|
1248
|
+
if (isPlainObject2(value) && isPlainObject2(schema.properties)) {
|
|
1249
|
+
return normalizeObject(value, schema);
|
|
1250
|
+
}
|
|
1251
|
+
return value;
|
|
1252
|
+
}
|
|
1253
|
+
function normalizeObject(input, schema) {
|
|
1254
|
+
const properties = isPlainObject2(schema.properties) ? schema.properties : {};
|
|
1255
|
+
const required = new Set(Array.isArray(schema.required) ? schema.required.filter((key) => typeof key === "string") : []);
|
|
1256
|
+
const result = {};
|
|
1257
|
+
for (const [key, raw] of Object.entries(input)) {
|
|
1258
|
+
if (!(key in properties)) {
|
|
1259
|
+
result[key] = raw;
|
|
1260
|
+
continue;
|
|
1261
|
+
}
|
|
1262
|
+
const value = normalizeValue(raw, properties[key]);
|
|
1263
|
+
if (!required.has(key) && isPlaceholder(value)) continue;
|
|
1264
|
+
result[key] = value;
|
|
1265
|
+
}
|
|
1266
|
+
return result;
|
|
1267
|
+
}
|
|
1268
|
+
function normalizeAgentToolInput(input, schema) {
|
|
1269
|
+
return isPlainObject2(input) ? normalizeObject(input, schema) : input;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1229
1272
|
// src/client/agentTools.ts
|
|
1230
1273
|
var TOOL_NAME_PATTERN = /^[a-z][a-z0-9_]{0,47}$/;
|
|
1231
1274
|
var MindooDBAppAgentToolError = class extends Error {
|
|
@@ -1303,7 +1346,8 @@ var MindooDBAppAgentApiImpl = class {
|
|
|
1303
1346
|
if (!tool) {
|
|
1304
1347
|
throw new MindooDBAppAgentToolError("NOT_FOUND", `The app has no tool "${name}" (any more).`);
|
|
1305
1348
|
}
|
|
1306
|
-
const
|
|
1349
|
+
const raw = input ?? {};
|
|
1350
|
+
const result = await tool.execute(tool.keepEmptyInput ? raw : normalizeAgentToolInput(raw, tool.inputSchema));
|
|
1307
1351
|
reply = { protocol: "mindoodb-app-bridge", kind: "agent-result", callId, ok: true, result: toJson(result) };
|
|
1308
1352
|
} catch (error) {
|
|
1309
1353
|
reply = {
|
|
@@ -1977,11 +2021,41 @@ var MindooDBAppIncomingApiImpl = class {
|
|
|
1977
2021
|
}
|
|
1978
2022
|
};
|
|
1979
2023
|
|
|
2024
|
+
// src/client/pdf.ts
|
|
2025
|
+
function isUnknownMethod(error) {
|
|
2026
|
+
const code = error?.code;
|
|
2027
|
+
return code === "method-not-found" || code === "unsupported";
|
|
2028
|
+
}
|
|
2029
|
+
var MindooDBAppPdfApiImpl = class {
|
|
2030
|
+
constructor(rpc) {
|
|
2031
|
+
this.rpc = rpc;
|
|
2032
|
+
}
|
|
2033
|
+
rpc;
|
|
2034
|
+
async sign(input) {
|
|
2035
|
+
try {
|
|
2036
|
+
return await this.rpc.call("pdf.sign", {
|
|
2037
|
+
pdf: input.pdf,
|
|
2038
|
+
fileName: input.fileName,
|
|
2039
|
+
reason: input.reason,
|
|
2040
|
+
location: input.location,
|
|
2041
|
+
contactInfo: input.contactInfo,
|
|
2042
|
+
visibleSignature: input.visibleSignature,
|
|
2043
|
+
timestamp: input.timestamp
|
|
2044
|
+
});
|
|
2045
|
+
} catch (error) {
|
|
2046
|
+
if (isUnknownMethod(error)) {
|
|
2047
|
+
return { ok: false, reason: "unsupported" };
|
|
2048
|
+
}
|
|
2049
|
+
throw error;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
};
|
|
2053
|
+
|
|
1980
2054
|
// src/client/reminders.ts
|
|
1981
2055
|
function isReminderOpenedMessage(message) {
|
|
1982
2056
|
return message.kind === "reminder-opened";
|
|
1983
2057
|
}
|
|
1984
|
-
function
|
|
2058
|
+
function isUnknownMethod2(error) {
|
|
1985
2059
|
const code = error?.code;
|
|
1986
2060
|
return code === "method-not-found" || code === "unsupported";
|
|
1987
2061
|
}
|
|
@@ -2014,7 +2088,7 @@ var MindooDBAppRemindersApiImpl = class {
|
|
|
2014
2088
|
target: request.target
|
|
2015
2089
|
});
|
|
2016
2090
|
} catch (error) {
|
|
2017
|
-
if (
|
|
2091
|
+
if (isUnknownMethod2(error)) {
|
|
2018
2092
|
return { status: "unsupported" };
|
|
2019
2093
|
}
|
|
2020
2094
|
throw error;
|
|
@@ -2024,7 +2098,7 @@ var MindooDBAppRemindersApiImpl = class {
|
|
|
2024
2098
|
try {
|
|
2025
2099
|
await this.rpc.call("reminders.cancel", { id });
|
|
2026
2100
|
} catch (error) {
|
|
2027
|
-
if (!
|
|
2101
|
+
if (!isUnknownMethod2(error)) {
|
|
2028
2102
|
throw error;
|
|
2029
2103
|
}
|
|
2030
2104
|
}
|
|
@@ -2033,7 +2107,7 @@ var MindooDBAppRemindersApiImpl = class {
|
|
|
2033
2107
|
try {
|
|
2034
2108
|
return await this.rpc.call("reminders.list", {});
|
|
2035
2109
|
} catch (error) {
|
|
2036
|
-
if (
|
|
2110
|
+
if (isUnknownMethod2(error)) {
|
|
2037
2111
|
return [];
|
|
2038
2112
|
}
|
|
2039
2113
|
throw error;
|
|
@@ -3351,6 +3425,7 @@ var MindooDBAppSessionImpl = class {
|
|
|
3351
3425
|
this.agent = new MindooDBAppAgentApiImpl(this.rpc);
|
|
3352
3426
|
this.incoming = new MindooDBAppIncomingApiImpl(this.rpc);
|
|
3353
3427
|
this.reminders = new MindooDBAppRemindersApiImpl(this.rpc);
|
|
3428
|
+
this.pdf = new MindooDBAppPdfApiImpl(this.rpc);
|
|
3354
3429
|
this.embedsClient = new MindooDBAppEmbedsClient(this.rpc);
|
|
3355
3430
|
this.components = this.embedsClient.components;
|
|
3356
3431
|
this.embeds = this.embedsClient.embeds;
|
|
@@ -3420,6 +3495,7 @@ var MindooDBAppSessionImpl = class {
|
|
|
3420
3495
|
agent;
|
|
3421
3496
|
incoming;
|
|
3422
3497
|
reminders;
|
|
3498
|
+
pdf;
|
|
3423
3499
|
embedsClient;
|
|
3424
3500
|
components;
|
|
3425
3501
|
embeds;
|
|
@@ -3696,6 +3772,7 @@ export {
|
|
|
3696
3772
|
normalizeDragStartInput,
|
|
3697
3773
|
snapshotElementToPng,
|
|
3698
3774
|
bindDragSource,
|
|
3775
|
+
normalizeAgentToolInput,
|
|
3699
3776
|
MindooDBAppAgentToolError,
|
|
3700
3777
|
pageUsers,
|
|
3701
3778
|
DEFAULT_HAVEN_HOST_SHORTCUTS,
|
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-
|
|
2
|
-
export { q as MINDOODB_APP_ACCEPTS_MAX, r as MINDOODB_APP_COMPONENTS_MAX, s as MINDOODB_APP_COMPONENT_CONTRACT_PATTERN, t as MINDOODB_APP_DEFINITION_FILE_NAME, u as MINDOODB_APP_DEFINITION_FORMAT, v as MINDOODB_APP_DEFINITION_PERMISSIONS, w as MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS, x as MINDOODB_APP_DEFINITION_VERSION, y as MINDOODB_APP_LISTING_DESCRIPTION_MAX, z as MINDOODB_APP_LISTING_MAX_SCREENSHOTS, A as MINDOODB_APP_LISTING_SUMMARY_MAX, B as MINDOODB_APP_SEAL_SIGNING_DOMAIN, C as MINDOODB_APP_WELL_KNOWN_DRAG_TYPES, D as MindooDBAppAcceptSpec, E as MindooDBAppAccessDecision, F as MindooDBAppAccessTier, G as MindooDBAppAgentApi, H as MindooDBAppAgentRegistration, I as MindooDBAppAgentToolAnnotations, J as MindooDBAppAgentToolDescriptor, K as MindooDBAppAgentToolScope, L as MindooDBAppAttachmentApi, N as MindooDBAppAttachmentChunk, O as MindooDBAppAttachmentInfo, P as MindooDBAppAttachmentPreviewOptions, Q as MindooDBAppAttachmentPreviewSession, R as MindooDBAppAutomergeChangesPatch, S as MindooDBAppAutomergeChangesSince, T as MindooDBAppAutomergeGetOptions, U as MindooDBAppAutomergePatchResult, V as MindooDBAppAutomergeSnapshot, W as MindooDBAppBridgeAgentInvokeMessage, X as MindooDBAppBridgeAgentResultMessage, Y as MindooDBAppBridgeBeforeCloseAck, Z as MindooDBAppBridgeBeforeCloseMessage, _ as MindooDBAppBridgeConnectMessage, $ as MindooDBAppBridgeConnectOptions, a0 as MindooDBAppBridgeConnectedMessage, a1 as MindooDBAppBridgeDragDropMessage, a2 as MindooDBAppBridgeDragLeaveMessage, a3 as MindooDBAppBridgeDragOverMessage, a4 as MindooDBAppBridgeEmbedEventMessage, a5 as MindooDBAppBridgeEmbeddingRequestMessage, a6 as MindooDBAppBridgeErrorPayload, a7 as MindooDBAppBridgeHandshakeErrorMessage, a8 as MindooDBAppBridgeHostFocusChangedMessage, a9 as MindooDBAppBridgeIncomingContentMessage, aa as MindooDBAppBridgeLocaleChangedMessage, ab as MindooDBAppBridgePortMessage, ac as MindooDBAppBridgeQueryResultMessage, ad as MindooDBAppBridgeReminderOpenedMessage, ae as MindooDBAppBridgeRpcError, af as MindooDBAppBridgeRpcMessage, ag as MindooDBAppBridgeRpcRequest, ah as MindooDBAppBridgeRpcSuccess, ai as MindooDBAppBridgeShortcutInvokedMessage, aj as MindooDBAppBridgeShortcutsChangedMessage, ak as MindooDBAppBridgeStreamAbortRequest, al as MindooDBAppBridgeStreamAck, am as MindooDBAppBridgeStreamCloseRequest, an as MindooDBAppBridgeStreamError, ao as MindooDBAppBridgeStreamMessage, ap as MindooDBAppBridgeStreamOpenResult, aq as MindooDBAppBridgeStreamReadRequest, ar as MindooDBAppBridgeStreamWriteRequest, as as MindooDBAppBridgeThemeChangedMessage, at as MindooDBAppBridgeUiPreferencesChangedMessage, au as MindooDBAppBridgeViewChangedMessage, av as MindooDBAppBridgeViewportChangedMessage, aw as MindooDBAppBridgeWorkspaceFocusRequestedMessage, ax as MindooDBAppBrowserFeatures, ay as MindooDBAppCapability, az as MindooDBAppComponentCategory, aA as MindooDBAppComponentChildren, aB as MindooDBAppComponentContract, aC as MindooDBAppComponentFieldValue, aD as MindooDBAppComponentInfo, aE as MindooDBAppComponentIntent, aF as MindooDBAppComponentQuery, aG as MindooDBAppComponentReference, aH as MindooDBAppComponentSpec, aI as MindooDBAppComponentsApi, aJ as MindooDBAppConfiguredViewCategorizationStyle, aK as MindooDBAppConfiguredViewColumn, aL as MindooDBAppConfiguredViewColumnRole, aM as MindooDBAppConfiguredViewExpressionMode, aN as MindooDBAppConfiguredViewFieldExpression, aO as MindooDBAppConfiguredViewFilterDefinition, aP as MindooDBAppConfiguredViewFilterMode, aQ as MindooDBAppConfiguredViewFilterRule, aR as MindooDBAppConfiguredViewFormulaExpression, aS as MindooDBAppConfiguredViewFormulaFilterDefinition, aT as MindooDBAppConfiguredViewPreviewMode, aU as MindooDBAppConfiguredViewRuleFilterDefinition, aV as MindooDBAppConfiguredViewRuleMatchMode, aW as MindooDBAppConfiguredViewRuleOperator, aX as MindooDBAppConfiguredViewValueExpression, aY as MindooDBAppCreateKeyInfo, aZ as MindooDBAppCreateViewInput, a_ as MindooDBAppCreateViewNavigatorInput, a$ as MindooDBAppDatabaseInfo, b0 as MindooDBAppDefinitionDatabase, b1 as MindooDBAppDefinitionListing, b2 as MindooDBAppDefinitionPermission, b3 as MindooDBAppDefinitionRegistrationPermission, b4 as MindooDBAppDefinitionScreenshot, b5 as MindooDBAppDefinitionValidation, b6 as MindooDBAppDirectoryApi, b7 as MindooDBAppDirectoryEntry, b8 as MindooDBAppDocumentApi, b9 as MindooDBAppDocumentHeadCursorResult, ba as MindooDBAppDocumentHistoryEntry, bb as MindooDBAppDocumentListQuery, bc as MindooDBAppDocumentListResult, bd as MindooDBAppDocumentQuery, be as MindooDBAppDocumentRevisionId, 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 MindooDBAppEmbedCloseReason, by as MindooDBAppEmbedClosedEvent, bz as MindooDBAppEmbedContext, bA as MindooDBAppEmbedDirtyEvent, bB as MindooDBAppEmbedOpenInput, bC as MindooDBAppEmbedRect, bD as MindooDBAppEmbeddingApi, bE as MindooDBAppEmbeddingLookupOptions, bF as MindooDBAppEmbeddingLookupResult, bG as MindooDBAppEmbedsApi, bH as MindooDBAppEntryAttachmentRef, bI as MindooDBAppEntryProvenance, bJ as MindooDBAppExtractDocumentTextInput, bK as MindooDBAppExtractDocumentTextResult, bL as MindooDBAppExtractTextFormat, bM as MindooDBAppExtractionSetup, bN as MindooDBAppFulltextSetup, bO as MindooDBAppHistoricalDocument, bP as MindooDBAppHistoryQuery, bQ as MindooDBAppHostTheme, bR as MindooDBAppIdentityApi, bS as MindooDBAppInaccessibleDocument, bT as MindooDBAppInaccessibleDocumentListQuery, bU as MindooDBAppInaccessibleDocumentListResult, bV as MindooDBAppIncomingContent, bW as MindooDBAppIncomingContentHandler, bX as MindooDBAppIncomingContentInfo, bY as MindooDBAppIncomingItem, bZ as MindooDBAppIncomingItemInfo, b_ as MindooDBAppIncomingResult, b$ as MindooDBAppIncomingSource, c0 as MindooDBAppJsonCounterIncrementPatch, c1 as MindooDBAppJsonListDeletePatch, c2 as MindooDBAppJsonListInsertPatch, c3 as MindooDBAppJsonPatch, c4 as MindooDBAppJsonSetPatch, c5 as MindooDBAppJsonTextMarkPatch, c6 as MindooDBAppJsonTextSplicePatch, c7 as MindooDBAppJsonTextUnmarkPatch, c8 as MindooDBAppJsonUnsetPatch, c9 as MindooDBAppLaunchContext, ca as MindooDBAppListUsersOptions, cb as MindooDBAppListUsersPage, cc as MindooDBAppLiveQuerySubscription, cd as MindooDBAppLocalizedText, ce as MindooDBAppMenuAnchor, cf as MindooDBAppMenuApi, cg as MindooDBAppMenuCommandItem, ch as MindooDBAppMenuDismissReason, ci as MindooDBAppMenuDismissedResult, cj as MindooDBAppMenuItem, ck as MindooDBAppMenuKind, cl as MindooDBAppMenuPlacement, cm as MindooDBAppMenuPointAnchor, cn as MindooDBAppMenuRect, co as MindooDBAppMenuRectAnchor, cp as MindooDBAppMenuSelectionResult, cq as MindooDBAppMenuSeparatorItem, cr as MindooDBAppNotificationSeverity, cs as MindooDBAppNotifyInput, ct as MindooDBAppNotifyResult, cu as MindooDBAppProposeAppInput, cv as MindooDBAppProposeAppResult, cw as MindooDBAppQueryCoverage, cx as MindooDBAppQueryInclude, cy as MindooDBAppQueryIncludeCardinality, cz as MindooDBAppQueryIncludeSlots, cA as MindooDBAppQueryResult, cB as MindooDBAppQueryRow, cC as MindooDBAppQuerySortKey, cD as MindooDBAppQueryTextClause, cE as MindooDBAppReadableAttachmentStream, cF as MindooDBAppRecipientOptions, cG as MindooDBAppReminder, cH as MindooDBAppReminderOpened, cI as MindooDBAppReminderOpenedHandler, cJ as MindooDBAppReminderRequest, cK as MindooDBAppReminderScheduleResult, cL as MindooDBAppRemindersApi, cM as MindooDBAppResolvedViewDefinition, cN as MindooDBAppResolvedViewSource, cO as MindooDBAppRevisionPhase, cP as MindooDBAppRevisionVerification, cQ as MindooDBAppRichTextBlockSpan, cR as MindooDBAppRichTextGetOptions, cS as MindooDBAppRichTextImmutableString, cT as MindooDBAppRichTextMarkRange, cU as MindooDBAppRichTextMaterializeValue, cV as MindooDBAppRichTextPatch, cW as MindooDBAppRichTextScalar, cX as MindooDBAppRichTextSpliceStep, cY as MindooDBAppRichTextStep, cZ as MindooDBAppRichTextStepPatch, c_ as MindooDBAppRichTextTextSpan, c$ as MindooDBAppRuntime, d0 as MindooDBAppScanAttachmentOptions, d1 as MindooDBAppScanAttachmentResult, d2 as MindooDBAppScopedDocId, d3 as MindooDBAppScopedDocumentSummary, d4 as MindooDBAppSealIntent, d5 as MindooDBAppSealedChannelOpenInput, d6 as MindooDBAppSealedChannelOpenResult, d7 as MindooDBAppSealedChannelRequestInput, d8 as MindooDBAppSession, d9 as MindooDBAppShowMenuInput, da as MindooDBAppShowMenuResult, db as MindooDBAppSignPreview, dc as MindooDBAppSignPreviewScope, dd as MindooDBAppSignStatementInput, de as MindooDBAppSignStatementResult, df as MindooDBAppStorageApi, dg as MindooDBAppSummarySetup, dh as MindooDBAppTextCursorOptions, di as MindooDBAppTextCursorPosition, dj as MindooDBAppTextCursorPositionsResult, dk as MindooDBAppTextCursorsResult, dl as MindooDBAppTextEdit, dm as MindooDBAppTextPatch, dn as MindooDBAppThemeMode, dp as MindooDBAppTimestampApi, dq as MindooDBAppTimestampInput, dr as MindooDBAppTimestampProvider, ds as MindooDBAppTimestampResult, dt as MindooDBAppUiPreferences, du as MindooDBAppUpdateDocumentInput, dv as MindooDBAppViewCursorDocumentListResult, dw as MindooDBAppViewCursorResult, dx as MindooDBAppViewEntry, dy as MindooDBAppViewEntryKind, dz as MindooDBAppViewNavigator, dA as MindooDBAppViewNavigatorExpansionState, dB as MindooDBAppViewNavigatorOpenOptions, dC as MindooDBAppViewNavigatorPageOptions, dD as MindooDBAppViewNavigatorPageResult, dE as MindooDBAppViewNavigatorRangeQuery, dF as MindooDBAppViewNavigatorSelectionState, dG as MindooDBAppViewUpdateStats, dH as MindooDBAppViewport, dI as MindooDBAppWellKnownDragType, dJ as MindooDBAppWritableAttachmentStream, dK as mindooDBAppAcceptMatchesType, dL as mindooDBAppComponentFieldsMatch, dM as resolveMindooDBAppDefinitionUrl, dN as resolveMindooDBAppListingAssetUrl, dO as resolveMindooDBAppLocalizedText, dP as validateMindooDBAppAccepts, dQ as validateMindooDBAppComponents, dR as validateMindooDBAppDefinition } from './types-BYsO5n5-.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-7oOzrSr5.js';
|
|
2
|
+
export { q as MINDOODB_APP_ACCEPTS_MAX, r as MINDOODB_APP_COMPONENTS_MAX, s as MINDOODB_APP_COMPONENT_CONTRACT_PATTERN, t as MINDOODB_APP_DEFINITION_FILE_NAME, u as MINDOODB_APP_DEFINITION_FORMAT, v as MINDOODB_APP_DEFINITION_PERMISSIONS, w as MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS, x as MINDOODB_APP_DEFINITION_VERSION, y as MINDOODB_APP_LISTING_DESCRIPTION_MAX, z as MINDOODB_APP_LISTING_MAX_SCREENSHOTS, A as MINDOODB_APP_LISTING_SUMMARY_MAX, B as MINDOODB_APP_SEAL_SIGNING_DOMAIN, C as MINDOODB_APP_WELL_KNOWN_DRAG_TYPES, D as MindooDBAppAcceptSpec, E as MindooDBAppAccessDecision, F as MindooDBAppAccessTier, G as MindooDBAppAgentApi, H as MindooDBAppAgentRegistration, I as MindooDBAppAgentToolAnnotations, J as MindooDBAppAgentToolDescriptor, K as MindooDBAppAgentToolScope, L as MindooDBAppAttachmentApi, N as MindooDBAppAttachmentChunk, O as MindooDBAppAttachmentInfo, P as MindooDBAppAttachmentPreviewOptions, Q as MindooDBAppAttachmentPreviewSession, R as MindooDBAppAutomergeChangesPatch, S as MindooDBAppAutomergeChangesSince, T as MindooDBAppAutomergeGetOptions, U as MindooDBAppAutomergePatchResult, V as MindooDBAppAutomergeSnapshot, W as MindooDBAppBridgeAgentInvokeMessage, X as MindooDBAppBridgeAgentResultMessage, Y as MindooDBAppBridgeBeforeCloseAck, Z as MindooDBAppBridgeBeforeCloseMessage, _ as MindooDBAppBridgeConnectMessage, $ as MindooDBAppBridgeConnectOptions, a0 as MindooDBAppBridgeConnectedMessage, a1 as MindooDBAppBridgeDragDropMessage, a2 as MindooDBAppBridgeDragLeaveMessage, a3 as MindooDBAppBridgeDragOverMessage, a4 as MindooDBAppBridgeEmbedEventMessage, a5 as MindooDBAppBridgeEmbeddingRequestMessage, a6 as MindooDBAppBridgeErrorPayload, a7 as MindooDBAppBridgeHandshakeErrorMessage, a8 as MindooDBAppBridgeHostFocusChangedMessage, a9 as MindooDBAppBridgeIncomingContentMessage, aa as MindooDBAppBridgeLocaleChangedMessage, ab as MindooDBAppBridgePortMessage, ac as MindooDBAppBridgeQueryResultMessage, ad as MindooDBAppBridgeReminderOpenedMessage, ae as MindooDBAppBridgeRpcError, af as MindooDBAppBridgeRpcMessage, ag as MindooDBAppBridgeRpcRequest, ah as MindooDBAppBridgeRpcSuccess, ai as MindooDBAppBridgeShortcutInvokedMessage, aj as MindooDBAppBridgeShortcutsChangedMessage, ak as MindooDBAppBridgeStreamAbortRequest, al as MindooDBAppBridgeStreamAck, am as MindooDBAppBridgeStreamCloseRequest, an as MindooDBAppBridgeStreamError, ao as MindooDBAppBridgeStreamMessage, ap as MindooDBAppBridgeStreamOpenResult, aq as MindooDBAppBridgeStreamReadRequest, ar as MindooDBAppBridgeStreamWriteRequest, as as MindooDBAppBridgeThemeChangedMessage, at as MindooDBAppBridgeUiPreferencesChangedMessage, au as MindooDBAppBridgeViewChangedMessage, av as MindooDBAppBridgeViewportChangedMessage, aw as MindooDBAppBridgeWorkspaceFocusRequestedMessage, ax as MindooDBAppBrowserFeatures, ay as MindooDBAppCapability, az as MindooDBAppComponentCategory, aA as MindooDBAppComponentChildren, aB as MindooDBAppComponentContract, aC as MindooDBAppComponentFieldValue, aD as MindooDBAppComponentInfo, aE as MindooDBAppComponentIntent, aF as MindooDBAppComponentQuery, aG as MindooDBAppComponentReference, aH as MindooDBAppComponentSpec, aI as MindooDBAppComponentsApi, aJ as MindooDBAppConfiguredViewCategorizationStyle, aK as MindooDBAppConfiguredViewColumn, aL as MindooDBAppConfiguredViewColumnRole, aM as MindooDBAppConfiguredViewExpressionMode, aN as MindooDBAppConfiguredViewFieldExpression, aO as MindooDBAppConfiguredViewFilterDefinition, aP as MindooDBAppConfiguredViewFilterMode, aQ as MindooDBAppConfiguredViewFilterRule, aR as MindooDBAppConfiguredViewFormulaExpression, aS as MindooDBAppConfiguredViewFormulaFilterDefinition, aT as MindooDBAppConfiguredViewPreviewMode, aU as MindooDBAppConfiguredViewRuleFilterDefinition, aV as MindooDBAppConfiguredViewRuleMatchMode, aW as MindooDBAppConfiguredViewRuleOperator, aX as MindooDBAppConfiguredViewValueExpression, aY as MindooDBAppCreateKeyInfo, aZ as MindooDBAppCreateViewInput, a_ as MindooDBAppCreateViewNavigatorInput, a$ as MindooDBAppDatabaseInfo, b0 as MindooDBAppDefinitionDatabase, b1 as MindooDBAppDefinitionListing, b2 as MindooDBAppDefinitionPermission, b3 as MindooDBAppDefinitionRegistrationPermission, b4 as MindooDBAppDefinitionScreenshot, b5 as MindooDBAppDefinitionValidation, b6 as MindooDBAppDirectoryApi, b7 as MindooDBAppDirectoryEntry, b8 as MindooDBAppDocumentApi, b9 as MindooDBAppDocumentHeadCursorResult, ba as MindooDBAppDocumentHistoryEntry, bb as MindooDBAppDocumentListQuery, bc as MindooDBAppDocumentListResult, bd as MindooDBAppDocumentQuery, be as MindooDBAppDocumentRevisionId, 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 MindooDBAppEmbedCloseReason, by as MindooDBAppEmbedClosedEvent, bz as MindooDBAppEmbedContext, bA as MindooDBAppEmbedDirtyEvent, bB as MindooDBAppEmbedOpenInput, bC as MindooDBAppEmbedRect, bD as MindooDBAppEmbeddingApi, bE as MindooDBAppEmbeddingLookupOptions, bF as MindooDBAppEmbeddingLookupResult, bG as MindooDBAppEmbedsApi, bH as MindooDBAppEntryAttachmentRef, bI as MindooDBAppEntryProvenance, bJ as MindooDBAppExtractDocumentTextInput, bK as MindooDBAppExtractDocumentTextResult, bL as MindooDBAppExtractTextFormat, bM as MindooDBAppExtractionSetup, bN as MindooDBAppFulltextSetup, bO as MindooDBAppHistoricalDocument, bP as MindooDBAppHistoryQuery, bQ as MindooDBAppHostTheme, bR as MindooDBAppIdentityApi, bS as MindooDBAppInaccessibleDocument, bT as MindooDBAppInaccessibleDocumentListQuery, bU as MindooDBAppInaccessibleDocumentListResult, bV as MindooDBAppIncomingContent, bW as MindooDBAppIncomingContentHandler, bX as MindooDBAppIncomingContentInfo, bY as MindooDBAppIncomingItem, bZ as MindooDBAppIncomingItemInfo, b_ as MindooDBAppIncomingResult, b$ as MindooDBAppIncomingSource, c0 as MindooDBAppJsonCounterIncrementPatch, c1 as MindooDBAppJsonListDeletePatch, c2 as MindooDBAppJsonListInsertPatch, c3 as MindooDBAppJsonPatch, c4 as MindooDBAppJsonSetPatch, c5 as MindooDBAppJsonTextMarkPatch, c6 as MindooDBAppJsonTextSplicePatch, c7 as MindooDBAppJsonTextUnmarkPatch, c8 as MindooDBAppJsonUnsetPatch, c9 as MindooDBAppLaunchContext, ca as MindooDBAppListUsersOptions, cb as MindooDBAppListUsersPage, cc as MindooDBAppLiveQuerySubscription, cd as MindooDBAppLocalizedText, ce as MindooDBAppMenuAnchor, cf as MindooDBAppMenuApi, cg as MindooDBAppMenuCommandItem, ch as MindooDBAppMenuDismissReason, ci as MindooDBAppMenuDismissedResult, cj as MindooDBAppMenuItem, ck as MindooDBAppMenuKind, cl as MindooDBAppMenuPlacement, cm as MindooDBAppMenuPointAnchor, cn as MindooDBAppMenuRect, co as MindooDBAppMenuRectAnchor, cp as MindooDBAppMenuSelectionResult, cq as MindooDBAppMenuSeparatorItem, cr as MindooDBAppNotificationSeverity, cs as MindooDBAppNotifyInput, ct as MindooDBAppNotifyResult, cu as MindooDBAppPdfApi, cv as MindooDBAppPdfSignInput, cw as MindooDBAppPdfSignResult, cx as MindooDBAppPdfSignaturePosition, cy as MindooDBAppPdfSigner, cz as MindooDBAppProposeAppInput, cA as MindooDBAppProposeAppResult, cB as MindooDBAppQueryCoverage, cC as MindooDBAppQueryInclude, cD as MindooDBAppQueryIncludeCardinality, cE as MindooDBAppQueryIncludeSlots, cF as MindooDBAppQueryResult, cG as MindooDBAppQueryRow, cH as MindooDBAppQuerySortKey, cI as MindooDBAppQueryTextClause, cJ as MindooDBAppReadableAttachmentStream, cK as MindooDBAppRecipientOptions, cL as MindooDBAppReminder, cM as MindooDBAppReminderOpened, cN as MindooDBAppReminderOpenedHandler, cO as MindooDBAppReminderRequest, cP as MindooDBAppReminderScheduleResult, cQ as MindooDBAppRemindersApi, cR as MindooDBAppResolvedViewDefinition, cS as MindooDBAppResolvedViewSource, cT as MindooDBAppRevisionPhase, cU as MindooDBAppRevisionVerification, cV as MindooDBAppRichTextBlockSpan, cW as MindooDBAppRichTextGetOptions, cX as MindooDBAppRichTextImmutableString, cY as MindooDBAppRichTextMarkRange, cZ as MindooDBAppRichTextMaterializeValue, c_ as MindooDBAppRichTextPatch, c$ as MindooDBAppRichTextScalar, d0 as MindooDBAppRichTextSpliceStep, d1 as MindooDBAppRichTextStep, d2 as MindooDBAppRichTextStepPatch, d3 as MindooDBAppRichTextTextSpan, d4 as MindooDBAppRuntime, d5 as MindooDBAppScanAttachmentOptions, d6 as MindooDBAppScanAttachmentResult, d7 as MindooDBAppScopedDocId, d8 as MindooDBAppScopedDocumentSummary, d9 as MindooDBAppSealIntent, da as MindooDBAppSealedChannelOpenInput, db as MindooDBAppSealedChannelOpenResult, dc as MindooDBAppSealedChannelRequestInput, dd as MindooDBAppSession, de as MindooDBAppShowMenuInput, df as MindooDBAppShowMenuResult, dg as MindooDBAppSignPreview, dh as MindooDBAppSignPreviewScope, di as MindooDBAppSignStatementInput, dj as MindooDBAppSignStatementResult, dk as MindooDBAppStorageApi, dl as MindooDBAppSummarySetup, dm as MindooDBAppTextCursorOptions, dn as MindooDBAppTextCursorPosition, dp as MindooDBAppTextCursorPositionsResult, dq as MindooDBAppTextCursorsResult, dr as MindooDBAppTextEdit, ds as MindooDBAppTextPatch, dt as MindooDBAppThemeMode, du as MindooDBAppTimestampApi, dv as MindooDBAppTimestampInput, dw as MindooDBAppTimestampProvider, dx as MindooDBAppTimestampResult, dy as MindooDBAppUiPreferences, dz as MindooDBAppUpdateDocumentInput, dA as MindooDBAppViewCursorDocumentListResult, dB as MindooDBAppViewCursorResult, dC as MindooDBAppViewEntry, dD as MindooDBAppViewEntryKind, dE as MindooDBAppViewNavigator, dF as MindooDBAppViewNavigatorExpansionState, dG as MindooDBAppViewNavigatorOpenOptions, dH as MindooDBAppViewNavigatorPageOptions, dI as MindooDBAppViewNavigatorPageResult, dJ as MindooDBAppViewNavigatorRangeQuery, dK as MindooDBAppViewNavigatorSelectionState, dL as MindooDBAppViewUpdateStats, dM as MindooDBAppViewport, dN as MindooDBAppWellKnownDragType, dO as MindooDBAppWritableAttachmentStream, dP as mindooDBAppAcceptMatchesType, dQ as mindooDBAppComponentFieldsMatch, dR as resolveMindooDBAppDefinitionUrl, dS as resolveMindooDBAppListingAssetUrl, dT as resolveMindooDBAppLocalizedText, dU as validateMindooDBAppAccepts, dV as validateMindooDBAppComponents, dW as validateMindooDBAppDefinition } from './types-7oOzrSr5.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';
|
|
@@ -206,7 +206,9 @@ declare function createMindooDBAppBridge(): MindooDBAppBridge;
|
|
|
206
206
|
* Only descriptors cross the bridge. `execute` stays in the app and runs when
|
|
207
207
|
* Haven forwards an agent's call; the outcome goes back as one `agent-result`
|
|
208
208
|
* message per call. A tool that throws {@link MindooDBAppAgentToolError}
|
|
209
|
-
* reports its code; any other exception becomes `FAILED`.
|
|
209
|
+
* reports its code; any other exception becomes `FAILED`. Placeholder values
|
|
210
|
+
* agents send for optional fields are removed first ({@link normalizeAgentToolInput}),
|
|
211
|
+
* unless the tool sets `keepEmptyInput`.
|
|
210
212
|
*
|
|
211
213
|
* @module agentTools
|
|
212
214
|
*/
|
|
@@ -218,6 +220,30 @@ declare class MindooDBAppAgentToolError extends Error {
|
|
|
218
220
|
constructor(code: MindooDBAppAgentToolErrorCode, message: string, requiredAction?: string);
|
|
219
221
|
}
|
|
220
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Placeholder values some agent clients send for optional fields.
|
|
225
|
+
*
|
|
226
|
+
* Several agents (Goose, for one) fill every optional property of a tool's
|
|
227
|
+
* input schema: `""` for strings, `[]` for arrays, an object of such
|
|
228
|
+
* placeholders for objects. A tool that reads "present" as "chosen" then
|
|
229
|
+
* rejects the call ("pass only one of …") or acts on an empty id. Before a
|
|
230
|
+
* call reaches `execute`, the SDK removes these placeholders from optional
|
|
231
|
+
* properties, guided by the schema, so tools see the input the agent meant.
|
|
232
|
+
*
|
|
233
|
+
* Only values that cannot carry a choice are removed: `null`, blank strings,
|
|
234
|
+
* empty arrays and objects left empty after their own placeholders are gone.
|
|
235
|
+
* Numbers and booleans stay, since `0` and `false` are real values; tools
|
|
236
|
+
* decide whether a zero means "not set" for them. Required properties and
|
|
237
|
+
* properties the schema does not declare are kept as sent.
|
|
238
|
+
*
|
|
239
|
+
* @module agentInput
|
|
240
|
+
*/
|
|
241
|
+
/**
|
|
242
|
+
* Returns `input` without the placeholder values agents send for optional
|
|
243
|
+
* properties of `schema` (see the module comment). Does not change `input`.
|
|
244
|
+
*/
|
|
245
|
+
declare function normalizeAgentToolInput(input: Record<string, unknown>, schema: Record<string, unknown>): Record<string, unknown>;
|
|
246
|
+
|
|
221
247
|
/**
|
|
222
248
|
* A reference tool for an app's edit language ("ops_guide"), so the edit tools
|
|
223
249
|
* themselves can keep short descriptions.
|
|
@@ -697,4 +723,4 @@ declare function inheritDocumentEncryption(parent: Pick<MindooDBAppDocument, "de
|
|
|
697
723
|
*/
|
|
698
724
|
declare function watchWordChunks(database: MindooDBAppDatabase, parentId: string, listener: (docIds: string[]) => void): Promise<() => Promise<void>>;
|
|
699
725
|
|
|
700
|
-
export { type CreateMindooDBRichTextHandleOptions, type CreateMindooDBTextBufferOptions, DEFAULT_DRAG_LONG_PRESS_MS, DEFAULT_DRAG_POINTER_THRESHOLD_PX, DEFAULT_HAVEN_HOST_SHORTCUTS, DEFAULT_HAVEN_URL, type HavenAppLandingPage, type HavenStorageShimHandle, type InstallHavenStorageShimOptions, type ListingBlock, type ListingInline, MINDOODB_APP_HOSTING_QUERY_PARAM, MINDOODB_APP_LAUNCH_ID_QUERY_PARAM, MINDOODB_APP_MAX_DRAG_PAYLOAD_BYTES, MINDOODB_APP_MAX_DRAG_PREVIEW_BYTES, MINDOODB_APP_MAX_DRAG_PREVIEW_EDGE, MINDOODB_APP_MAX_DRAG_TYPES, MINDOODB_APP_VALUE_TAG, MINDOODB_CUSTOM_DOCUMENT_ID_PATTERN, MINDOODB_DOCUMENT_ID_PREFIX_PATTERN, MINIMAL_DRAG_PREVIEW_PNG, type MindooDBAppAgentGuideField, type MindooDBAppAgentGuideGroup, type MindooDBAppAgentGuideOp, type MindooDBAppAgentGuideOptions, MindooDBAppAgentTool, MindooDBAppAgentToolError, MindooDBAppAgentToolErrorCode, type MindooDBAppAtomicValue, MindooDBAppAttachmentPreviewMode, MindooDBAppBridge, type MindooDBAppCounterValue, MindooDBAppCreateDocumentInput, MindooDBAppDatabase, MindooDBAppDefinition, MindooDBAppDocument, MindooDBAppDragBindSourceOptions, MindooDBAppDragInputError, MindooDBAppDragPreview, MindooDBAppDragStartInput, MindooDBAppDragStartResult, MindooDBAppHostShortcutAction, MindooDBAppHostShortcutBinding, MindooDBAppHostingMode, MindooDBAppRichTextSnapshot, MindooDBAppRichTextSpan, type MindooDBAppTimestampValue, type MindooDBAppTypedValue, MindooDBAppValue, MindooDBRichTextHandle, type MindooDBRichTextHandleChangeListener, type MindooDBRichTextHandleFlushResult, MindooDBTextBuffer, type MindooDBTextBufferFlushResult, type RenderHavenAppLandingPageOptions, abbreviateCanonicalName, agentGuideExamples, agentGuideSignatureIndex, applyHostedDocumentOverscrollContain, assertValidMindooDBCreateIds, bindDragSource, buildHavenAppInstallUrl, canPreviewAttachment, createAgentGuideTool, createMindooDBAppBridge, createMindooDBRichTextHandle, createMindooDBTextBuffer, expandAbbreviatedName, inheritDocumentEncryption, installHavenStorageShim, installHostShortcutCapture, isHostShortcutAction, isHostedBundleRuntime, isLaunchedByHaven, isMindooDBAppDragType, isValidMindooDBDocumentId, listingMarkdownToPlainText, matchHostShortcut, mindooDBDocumentId, normalizeDragAccepts, normalizeDragPointerInput, normalizeDragStartInput, parseListingMarkdown, queryDocuments, readMindooDBAppHostingMode, readMindooDBAppLaunchId, releaseMindooDBAppBridgeSessions, renderAgentGuideGroup, renderHavenAppLandingPage, resolveCurrentHavenAppUrl, sanitizeHostShortcutBindings, sanitizeListingHref, snapshotElementToPng, watchWordChunks };
|
|
726
|
+
export { type CreateMindooDBRichTextHandleOptions, type CreateMindooDBTextBufferOptions, DEFAULT_DRAG_LONG_PRESS_MS, DEFAULT_DRAG_POINTER_THRESHOLD_PX, DEFAULT_HAVEN_HOST_SHORTCUTS, DEFAULT_HAVEN_URL, type HavenAppLandingPage, type HavenStorageShimHandle, type InstallHavenStorageShimOptions, type ListingBlock, type ListingInline, MINDOODB_APP_HOSTING_QUERY_PARAM, MINDOODB_APP_LAUNCH_ID_QUERY_PARAM, MINDOODB_APP_MAX_DRAG_PAYLOAD_BYTES, MINDOODB_APP_MAX_DRAG_PREVIEW_BYTES, MINDOODB_APP_MAX_DRAG_PREVIEW_EDGE, MINDOODB_APP_MAX_DRAG_TYPES, MINDOODB_APP_VALUE_TAG, MINDOODB_CUSTOM_DOCUMENT_ID_PATTERN, MINDOODB_DOCUMENT_ID_PREFIX_PATTERN, MINIMAL_DRAG_PREVIEW_PNG, type MindooDBAppAgentGuideField, type MindooDBAppAgentGuideGroup, type MindooDBAppAgentGuideOp, type MindooDBAppAgentGuideOptions, MindooDBAppAgentTool, MindooDBAppAgentToolError, MindooDBAppAgentToolErrorCode, type MindooDBAppAtomicValue, MindooDBAppAttachmentPreviewMode, MindooDBAppBridge, type MindooDBAppCounterValue, MindooDBAppCreateDocumentInput, MindooDBAppDatabase, MindooDBAppDefinition, MindooDBAppDocument, MindooDBAppDragBindSourceOptions, MindooDBAppDragInputError, MindooDBAppDragPreview, MindooDBAppDragStartInput, MindooDBAppDragStartResult, MindooDBAppHostShortcutAction, MindooDBAppHostShortcutBinding, MindooDBAppHostingMode, MindooDBAppRichTextSnapshot, MindooDBAppRichTextSpan, type MindooDBAppTimestampValue, type MindooDBAppTypedValue, MindooDBAppValue, MindooDBRichTextHandle, type MindooDBRichTextHandleChangeListener, type MindooDBRichTextHandleFlushResult, MindooDBTextBuffer, type MindooDBTextBufferFlushResult, type RenderHavenAppLandingPageOptions, abbreviateCanonicalName, agentGuideExamples, agentGuideSignatureIndex, applyHostedDocumentOverscrollContain, assertValidMindooDBCreateIds, bindDragSource, buildHavenAppInstallUrl, canPreviewAttachment, createAgentGuideTool, createMindooDBAppBridge, createMindooDBRichTextHandle, createMindooDBTextBuffer, expandAbbreviatedName, inheritDocumentEncryption, installHavenStorageShim, installHostShortcutCapture, isHostShortcutAction, isHostedBundleRuntime, isLaunchedByHaven, isMindooDBAppDragType, isValidMindooDBDocumentId, listingMarkdownToPlainText, matchHostShortcut, mindooDBDocumentId, normalizeAgentToolInput, normalizeDragAccepts, normalizeDragPointerInput, normalizeDragStartInput, parseListingMarkdown, queryDocuments, readMindooDBAppHostingMode, readMindooDBAppLaunchId, releaseMindooDBAppBridgeSessions, renderAgentGuideGroup, renderHavenAppLandingPage, resolveCurrentHavenAppUrl, sanitizeHostShortcutBindings, sanitizeListingHref, snapshotElementToPng, watchWordChunks };
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
mindooDBAppAcceptMatchesType,
|
|
37
37
|
mindooDBAppComponentFieldsMatch,
|
|
38
38
|
mindooDBDocumentId,
|
|
39
|
+
normalizeAgentToolInput,
|
|
39
40
|
normalizeDragAccepts,
|
|
40
41
|
normalizeDragPointerInput,
|
|
41
42
|
normalizeDragStartInput,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
validateMindooDBAppAccepts,
|
|
49
50
|
validateMindooDBAppComponents,
|
|
50
51
|
validateMindooDBAppDefinition
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-P7SOHCEQ.js";
|
|
52
53
|
import {
|
|
53
54
|
MINDOODB_APP_BUNDLE_ARCHIVE_FILE_NAME,
|
|
54
55
|
MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME,
|
|
@@ -1426,6 +1427,7 @@ export {
|
|
|
1426
1427
|
mindooDBAppAcceptMatchesType,
|
|
1427
1428
|
mindooDBAppComponentFieldsMatch,
|
|
1428
1429
|
mindooDBDocumentId,
|
|
1430
|
+
normalizeAgentToolInput,
|
|
1429
1431
|
normalizeDragAccepts,
|
|
1430
1432
|
normalizeDragPointerInput,
|
|
1431
1433
|
normalizeDragStartInput,
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aD as MindooDBAppComponentInfo, bC as MindooDBAppEmbedRect, bv as MindooDBAppEmbedAgentTools, bE as MindooDBAppEmbeddingLookupOptions, bF as MindooDBAppEmbeddingLookupResult, bt as MindooDBAppEmbedAccessPair, J as MindooDBAppAgentToolDescriptor, f as MindooDBAppAgentToolErrorCode, X as MindooDBAppBridgeAgentResultMessage, W as MindooDBAppBridgeAgentInvokeMessage, a_ as MindooDBAppCreateViewNavigatorInput,
|
|
1
|
+
import { aD as MindooDBAppComponentInfo, bC as MindooDBAppEmbedRect, bv as MindooDBAppEmbedAgentTools, bE as MindooDBAppEmbeddingLookupOptions, bF as MindooDBAppEmbeddingLookupResult, bt as MindooDBAppEmbedAccessPair, J as MindooDBAppAgentToolDescriptor, f as MindooDBAppAgentToolErrorCode, X as MindooDBAppBridgeAgentResultMessage, W as MindooDBAppBridgeAgentInvokeMessage, a_ as MindooDBAppCreateViewNavigatorInput, dE as MindooDBAppViewNavigator, ag as MindooDBAppBridgeRpcRequest, bQ as MindooDBAppHostTheme, ay as MindooDBAppCapability, dz as MindooDBAppUpdateDocumentInput, m as MindooDBAppDocument, k as MindooDBAppDefinition, L as MindooDBAppAttachmentApi, e as MindooDBAppBridge, dd as MindooDBAppSession, cz as MindooDBAppProposeAppInput, dM as MindooDBAppViewport, dy as MindooDBAppUiPreferences, cF as MindooDBAppQueryResult, dL as MindooDBAppViewUpdateStats, ab as MindooDBAppBridgePortMessage, a$ as MindooDBAppDatabaseInfo, cv as MindooDBAppPdfSignInput, bs as MindooDBAppEmbedAccessInput, bx as MindooDBAppEmbedCloseReason, a6 as MindooDBAppBridgeErrorPayload, c9 as MindooDBAppLaunchContext, b8 as MindooDBAppDocumentApi, dG as MindooDBAppViewNavigatorOpenOptions, bR as MindooDBAppIdentityApi, du as MindooDBAppTimestampApi, b6 as MindooDBAppDirectoryApi, bN as MindooDBAppFulltextSetup, bM as MindooDBAppExtractionSetup, dl as MindooDBAppSummarySetup, cA as MindooDBAppProposeAppResult, b$ as MindooDBAppIncomingSource, c as MindooDBAppDragStartResult, bp as MindooDBAppDragProfile, b_ as MindooDBAppIncomingResult, cL as MindooDBAppReminder } from '../types-7oOzrSr5.js';
|
|
2
2
|
import * as mindoodb from 'mindoodb';
|
|
3
3
|
import 'mindoodb-view-language';
|
|
4
4
|
|
|
@@ -442,6 +442,13 @@ type MockDatabaseMethods = {
|
|
|
442
442
|
timestamps?: Partial<MindooDBAppTimestampApi>;
|
|
443
443
|
directory?: Partial<MindooDBAppDirectoryApi>;
|
|
444
444
|
};
|
|
445
|
+
/**
|
|
446
|
+
* What the mock answers to `session.pdf.sign`: `"signed"` (default) returns the
|
|
447
|
+
* bytes unchanged with a mock signer, as if the user signed — a test host has
|
|
448
|
+
* no certificate, and a fake signature would let a test "verify" something that
|
|
449
|
+
* never held. The other values answer `ok: false` with that reason.
|
|
450
|
+
*/
|
|
451
|
+
type MockPdfSignOutcome = "signed" | "declined" | "unsupported" | "invalid";
|
|
445
452
|
interface MockSeedDocument {
|
|
446
453
|
id: string;
|
|
447
454
|
data: Record<string, unknown>;
|
|
@@ -638,6 +645,10 @@ interface MockMindooDBAppSessionController {
|
|
|
638
645
|
* to `session.reminders.onOpened` (held until registered).
|
|
639
646
|
*/
|
|
640
647
|
emitReminderOpened(id: string, action?: "open" | "done"): Promise<void>;
|
|
648
|
+
/** Every `session.pdf.sign` request so far, oldest first. */
|
|
649
|
+
getPdfSignRequests(): MindooDBAppPdfSignInput[];
|
|
650
|
+
/** What the next `session.pdf.sign` calls answer; see {@link MockPdfSignOutcome}. */
|
|
651
|
+
setPdfSignOutcome(outcome: MockPdfSignOutcome): void;
|
|
641
652
|
/** Embeds the app has open (`session.embeds.open`). */
|
|
642
653
|
listEmbeds(): MockEmbedState[];
|
|
643
654
|
/** Every `session.embeds.requestAccess` input so far, oldest first. */
|
|
@@ -769,6 +780,10 @@ interface FakeBridgeHostController {
|
|
|
769
780
|
getDirectoryUsers(): string[];
|
|
770
781
|
/** See {@link MockMindooDBAppSessionController.applyRemoteUpdate}. */
|
|
771
782
|
applyRemoteUpdate(databaseId: string, docId: string, input: MindooDBAppUpdateDocumentInput, options?: MockRemoteUpdateOptions): Promise<MindooDBAppDocument>;
|
|
783
|
+
/** Every `session.pdf.sign` request so far, oldest first. */
|
|
784
|
+
getPdfSignRequests(): MindooDBAppPdfSignInput[];
|
|
785
|
+
/** What the next `session.pdf.sign` calls answer; see {@link MockPdfSignOutcome}. */
|
|
786
|
+
setPdfSignOutcome(outcome: MockPdfSignOutcome): void;
|
|
772
787
|
/** Embeds the app has open (`session.embeds.open`). */
|
|
773
788
|
listEmbeds(): MockEmbedState[];
|
|
774
789
|
/** Every `session.embeds.requestAccess` input so far, oldest first. */
|
|
@@ -803,4 +818,4 @@ interface FakeBridgeHostController {
|
|
|
803
818
|
}
|
|
804
819
|
declare function createFakeBridgeHost(options?: CreateFakeBridgeHostOptions): FakeBridgeHostController;
|
|
805
820
|
|
|
806
|
-
export { ALL_CAPABILITIES, type BrowserTestHost, type BrowserTestHostLog, type BrowserTestHostScan, type BrowserTestHostScanMode, type CreateBrowserTestHostOptions, type CreateFakeBridgeHostOptions, type CreateMockMindooDBAppSessionOptions, DEFAULT_TEST_HOST_USERS, type EvaluatingViewDocument, type FakeBridgeHostController, type FakeBridgePortMessageHandler, type FakeBridgeRequestHandler, type FakeBridgeRpcResponse, type MockAgentCall, type MockAgentCallResult, type MockAgentConsent, type MockAgentFile, type MockAgentHost, type MockAgentHostController, type MockAgentHostOptions, type MockDatabaseOverride, type MockDatabasesFromDefinitionOptions, type MockEmbedState, type MockEmbeddingFinish, MockForbiddenError, type MockIncomingContentInput, type MockMindooDBAppDatabaseDefinition, type MockMindooDBAppSessionController, type MockRemoteUpdateOptions, type MockSealedChannelOptions, type MockSeedDocument, type MountHavenTestHostOptions, TEST_HOST_LOCALES, type TestHostUrlSettings, type TestHostUser, type TwoUserTestHost, capabilitiesForDefinitionPermissions, createBrowserTestHost, createEvaluatingViewNavigator, createFakeBridgeHost, createMemoryAttachments, createMockAgentHost, createMockMindooDBAppBridge, createMockMindooDBAppSession, generateDirectoryUsers, loadMindoodbForTesting, mockAgentToolPrefix, mockDatabasesFromDefinition, mockReplicaDifferences, modeSwitch, mountHavenTestHost, mountTwoUserTestHost, previewJson, readTestHostUrlSettings, syncMockReplicas, validateMockAgentTools };
|
|
821
|
+
export { ALL_CAPABILITIES, type BrowserTestHost, type BrowserTestHostLog, type BrowserTestHostScan, type BrowserTestHostScanMode, type CreateBrowserTestHostOptions, type CreateFakeBridgeHostOptions, type CreateMockMindooDBAppSessionOptions, DEFAULT_TEST_HOST_USERS, type EvaluatingViewDocument, type FakeBridgeHostController, type FakeBridgePortMessageHandler, type FakeBridgeRequestHandler, type FakeBridgeRpcResponse, type MockAgentCall, type MockAgentCallResult, type MockAgentConsent, type MockAgentFile, type MockAgentHost, type MockAgentHostController, type MockAgentHostOptions, type MockDatabaseOverride, type MockDatabasesFromDefinitionOptions, type MockEmbedState, type MockEmbeddingFinish, MockForbiddenError, type MockIncomingContentInput, type MockMindooDBAppDatabaseDefinition, type MockMindooDBAppSessionController, type MockPdfSignOutcome, type MockRemoteUpdateOptions, type MockSealedChannelOptions, type MockSeedDocument, type MountHavenTestHostOptions, TEST_HOST_LOCALES, type TestHostUrlSettings, type TestHostUser, type TwoUserTestHost, capabilitiesForDefinitionPermissions, createBrowserTestHost, createEvaluatingViewNavigator, createFakeBridgeHost, createMemoryAttachments, createMockAgentHost, createMockMindooDBAppBridge, createMockMindooDBAppSession, generateDirectoryUsers, loadMindoodbForTesting, mockAgentToolPrefix, mockDatabasesFromDefinition, mockReplicaDifferences, modeSwitch, mountHavenTestHost, mountTwoUserTestHost, previewJson, readTestHostUrlSettings, syncMockReplicas, validateMockAgentTools };
|
package/dist/testing/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
mindooDBAppComponentFieldsMatch,
|
|
5
5
|
pageUsers,
|
|
6
6
|
releaseMindooDBAppBridgeSessions
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-P7SOHCEQ.js";
|
|
8
8
|
|
|
9
9
|
// src/testing/index.ts
|
|
10
10
|
import * as Automerge from "@automerge/automerge";
|
|
@@ -2261,7 +2261,15 @@ Allow?`),
|
|
|
2261
2261
|
const link = document.createElement("a");
|
|
2262
2262
|
link.textContent = name;
|
|
2263
2263
|
link.download = name;
|
|
2264
|
-
link.href =
|
|
2264
|
+
link.href = "#";
|
|
2265
|
+
link.addEventListener("click", () => {
|
|
2266
|
+
const url2 = URL.createObjectURL(new Blob([data.slice().buffer], { type: mimeType }));
|
|
2267
|
+
link.href = url2;
|
|
2268
|
+
setTimeout(() => {
|
|
2269
|
+
URL.revokeObjectURL(url2);
|
|
2270
|
+
link.href = "#";
|
|
2271
|
+
}, 0);
|
|
2272
|
+
});
|
|
2265
2273
|
return link;
|
|
2266
2274
|
}
|
|
2267
2275
|
const openCalls = /* @__PURE__ */ new Set();
|
|
@@ -2784,6 +2792,7 @@ function createDefaultLaunchContext(patch) {
|
|
|
2784
2792
|
geolocation: false,
|
|
2785
2793
|
clipboardWrite: false,
|
|
2786
2794
|
motion: false,
|
|
2795
|
+
localFonts: false,
|
|
2787
2796
|
webRtc: false,
|
|
2788
2797
|
workers: false
|
|
2789
2798
|
},
|
|
@@ -4697,6 +4706,7 @@ function createDatabaseHandle(definition, peers, directoryUsers = () => [], loca
|
|
|
4697
4706
|
);
|
|
4698
4707
|
persistMockAutomergeDocument(document2, mergedDoc);
|
|
4699
4708
|
document2.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
4709
|
+
notifyLiveQueries();
|
|
4700
4710
|
const mergedHeads = document2.heads ? [...document2.heads] : [];
|
|
4701
4711
|
let changesSince;
|
|
4702
4712
|
if (patch.replicaHeads?.length) {
|
|
@@ -5176,6 +5186,15 @@ function createDatabaseHandle(definition, peers, directoryUsers = () => [], loca
|
|
|
5176
5186
|
}
|
|
5177
5187
|
};
|
|
5178
5188
|
}
|
|
5189
|
+
var MOCK_PDF_SIGNER = Object.freeze({
|
|
5190
|
+
commonName: "Test Signer",
|
|
5191
|
+
subject: "CN=Test Signer, O=MindooDB test host",
|
|
5192
|
+
issuerCommonName: "Test Signer",
|
|
5193
|
+
validFrom: "2026-01-01T00:00:00.000Z",
|
|
5194
|
+
validTo: "2036-01-01T00:00:00.000Z",
|
|
5195
|
+
fingerprintSha256: "0".repeat(64),
|
|
5196
|
+
selfSigned: true
|
|
5197
|
+
});
|
|
5179
5198
|
function createMockSessionState(options = {}) {
|
|
5180
5199
|
let launchContext = createDefaultLaunchContext(options.launchContext);
|
|
5181
5200
|
const embedHost = createMockEmbedHost(
|
|
@@ -5192,6 +5211,8 @@ function createMockSessionState(options = {}) {
|
|
|
5192
5211
|
const themeListeners = /* @__PURE__ */ new Set();
|
|
5193
5212
|
let incomingHandler = null;
|
|
5194
5213
|
const mockReminders = /* @__PURE__ */ new Map();
|
|
5214
|
+
const pdfSignRequests = [];
|
|
5215
|
+
let pdfSignOutcome = "signed";
|
|
5195
5216
|
let reminderHandler = null;
|
|
5196
5217
|
const pendingReminderTaps = [];
|
|
5197
5218
|
const pendingIncoming = [];
|
|
@@ -5589,6 +5610,27 @@ function createMockSessionState(options = {}) {
|
|
|
5589
5610
|
};
|
|
5590
5611
|
}
|
|
5591
5612
|
},
|
|
5613
|
+
pdf: {
|
|
5614
|
+
async sign(input) {
|
|
5615
|
+
const pdf = input.pdf instanceof Uint8Array ? input.pdf : new Uint8Array(input.pdf);
|
|
5616
|
+
pdfSignRequests.push({ ...input, pdf: pdf.slice() });
|
|
5617
|
+
const header = new TextDecoder("latin1").decode(pdf.subarray(0, 1024));
|
|
5618
|
+
if (!header.includes("%PDF-") || pdf.byteLength > 100 * 1024 * 1024) {
|
|
5619
|
+
return { ok: false, reason: "invalid", message: "Not a PDF, or larger than 100 MB." };
|
|
5620
|
+
}
|
|
5621
|
+
if (pdfSignOutcome !== "signed") {
|
|
5622
|
+
return { ok: false, reason: pdfSignOutcome };
|
|
5623
|
+
}
|
|
5624
|
+
const signedAt = Date.now();
|
|
5625
|
+
return {
|
|
5626
|
+
ok: true,
|
|
5627
|
+
pdf: pdf.slice(),
|
|
5628
|
+
signer: { ...MOCK_PDF_SIGNER },
|
|
5629
|
+
...input.timestamp === false ? {} : { timestampTime: signedAt },
|
|
5630
|
+
signedAt
|
|
5631
|
+
};
|
|
5632
|
+
}
|
|
5633
|
+
},
|
|
5592
5634
|
onBeforeClose(listener) {
|
|
5593
5635
|
beforeCloseListeners.add(listener);
|
|
5594
5636
|
return () => {
|
|
@@ -5688,6 +5730,12 @@ function createMockSessionState(options = {}) {
|
|
|
5688
5730
|
listReminders() {
|
|
5689
5731
|
return [...mockReminders.values()].map((reminder) => ({ ...reminder }));
|
|
5690
5732
|
},
|
|
5733
|
+
getPdfSignRequests() {
|
|
5734
|
+
return pdfSignRequests.map((request) => ({ ...request }));
|
|
5735
|
+
},
|
|
5736
|
+
setPdfSignOutcome(outcome) {
|
|
5737
|
+
pdfSignOutcome = outcome;
|
|
5738
|
+
},
|
|
5691
5739
|
async emitReminderOpened(id, action = "open") {
|
|
5692
5740
|
const reminder = mockReminders.get(id);
|
|
5693
5741
|
const opened = {
|
|
@@ -5892,6 +5940,8 @@ function createMockMindooDBAppSession(options = {}) {
|
|
|
5892
5940
|
emitIncomingContent: state.emitIncomingContent,
|
|
5893
5941
|
listReminders: state.listReminders,
|
|
5894
5942
|
emitReminderOpened: state.emitReminderOpened,
|
|
5943
|
+
getPdfSignRequests: state.getPdfSignRequests,
|
|
5944
|
+
setPdfSignOutcome: state.setPdfSignOutcome,
|
|
5895
5945
|
listEmbeds: () => state.embedHost.listEmbeds(),
|
|
5896
5946
|
getEmbedAccessRequests: () => state.embedHost.getAccessRequests(),
|
|
5897
5947
|
closeEmbed: (embedId, reason, result) => state.embedHost.closeEmbed(embedId, reason, result),
|
|
@@ -6257,6 +6307,8 @@ function createFakeBridgeHost(options = {}) {
|
|
|
6257
6307
|
return { ok: true };
|
|
6258
6308
|
case "apps.propose":
|
|
6259
6309
|
return await state.session.proposeApp(params);
|
|
6310
|
+
case "pdf.sign":
|
|
6311
|
+
return await state.session.pdf.sign(params);
|
|
6260
6312
|
case "documents.list":
|
|
6261
6313
|
return await state.getDatabase(String(params.databaseId)).documents.list(
|
|
6262
6314
|
params.query
|
|
@@ -6847,6 +6899,8 @@ function createFakeBridgeHost(options = {}) {
|
|
|
6847
6899
|
setDirectoryUsers: state.setDirectoryUsers,
|
|
6848
6900
|
getDirectoryUsers: state.getDirectoryUsers,
|
|
6849
6901
|
applyRemoteUpdate: state.applyRemoteUpdate,
|
|
6902
|
+
getPdfSignRequests: state.getPdfSignRequests,
|
|
6903
|
+
setPdfSignOutcome: state.setPdfSignOutcome,
|
|
6850
6904
|
listEmbeds: () => state.embedHost.listEmbeds(),
|
|
6851
6905
|
getEmbedAccessRequests: () => state.embedHost.getAccessRequests(),
|
|
6852
6906
|
closeEmbed: (embedId, reason, result) => state.embedHost.closeEmbed(embedId, reason, result),
|
|
@@ -93,6 +93,13 @@ interface MindooDBAppDefinition {
|
|
|
93
93
|
* read the compass. iOS still asks the user (`DeviceOrientationEvent.requestPermission`).
|
|
94
94
|
*/
|
|
95
95
|
allowMotion?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* The user's installed fonts (Permissions-Policy `local-fonts`, `window.queryLocalFonts`),
|
|
98
|
+
* e.g. to show documents in their real fonts. The browser still asks the user once.
|
|
99
|
+
* Not needed for Haven: it delegates `local-fonts` to every app frame; only hosts that
|
|
100
|
+
* gate it per app read this field.
|
|
101
|
+
*/
|
|
102
|
+
allowLocalFonts?: boolean;
|
|
96
103
|
allowWebRtc?: boolean;
|
|
97
104
|
allowWorkers?: boolean;
|
|
98
105
|
/**
|
|
@@ -455,6 +462,12 @@ interface MindooDBAppBrowserFeatures {
|
|
|
455
462
|
* iOS still asks the user. Definition field `allowMotion`.
|
|
456
463
|
*/
|
|
457
464
|
motion: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* `window.queryLocalFonts` (the user's installed fonts). The browser still asks the
|
|
467
|
+
* user once. Haven allows it for every app; definition field `allowLocalFonts` only
|
|
468
|
+
* matters for hosts that gate it per app. Absent from hosts older than this field.
|
|
469
|
+
*/
|
|
470
|
+
localFonts?: boolean;
|
|
458
471
|
/** `RTCPeerConnection`. Blocked only for hosted apps. Definition field `allowWebRtc`. */
|
|
459
472
|
webRtc: boolean;
|
|
460
473
|
/** `new Worker`, shared and service workers. Blocked only for hosted apps. Definition field `allowWorkers`. */
|
|
@@ -1510,6 +1523,13 @@ interface MindooDBAppAgentToolDescriptor {
|
|
|
1510
1523
|
/** One agent tool an app offers. `execute` runs inside the app; its result must be JSON. */
|
|
1511
1524
|
interface MindooDBAppAgentTool extends MindooDBAppAgentToolDescriptor {
|
|
1512
1525
|
execute(input: Record<string, unknown>): Promise<unknown>;
|
|
1526
|
+
/**
|
|
1527
|
+
* Pass blank strings, empty arrays and empty objects in optional fields through
|
|
1528
|
+
* to `execute`. By default the SDK drops them, because some agents send them for
|
|
1529
|
+
* every optional field they do not mean to set. Set it when such a value is a
|
|
1530
|
+
* real choice for this tool (say, `""` to clear a field).
|
|
1531
|
+
*/
|
|
1532
|
+
keepEmptyInput?: boolean;
|
|
1513
1533
|
}
|
|
1514
1534
|
/** Haven's answer to {@link MindooDBAppAgentApi.registerTools}. */
|
|
1515
1535
|
interface MindooDBAppAgentRegistration {
|
|
@@ -1719,6 +1739,87 @@ interface MindooDBAppBridgeReminderOpenedMessage {
|
|
|
1719
1739
|
kind: "reminder-opened";
|
|
1720
1740
|
reminder: MindooDBAppReminderOpened;
|
|
1721
1741
|
}
|
|
1742
|
+
/** Corner of the page for a visible signature stamp, as the viewer displays the page. */
|
|
1743
|
+
type MindooDBAppPdfSignaturePosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1744
|
+
/**
|
|
1745
|
+
* Request to sign a PDF with an X.509 certificate the user picks in Haven.
|
|
1746
|
+
*
|
|
1747
|
+
* The app hands over finished PDF bytes; Haven asks the user for a PKCS#12
|
|
1748
|
+
* file (`.p12`/`.pfx`) and its password, shows who the certificate belongs to,
|
|
1749
|
+
* signs and returns the signed bytes. The certificate, password and private
|
|
1750
|
+
* key never reach the app, and Haven keeps none of them after the dialog.
|
|
1751
|
+
*/
|
|
1752
|
+
interface MindooDBAppPdfSignInput {
|
|
1753
|
+
/** The complete PDF, e.g. the result of pdf-lib's `save()`. Max. 100 MB. */
|
|
1754
|
+
pdf: Uint8Array;
|
|
1755
|
+
/** Shown in the dialog so the user knows what they sign, e.g. `"Site survey.pdf"`. */
|
|
1756
|
+
fileName?: string;
|
|
1757
|
+
/** Stored in the signature (`/Reason`), e.g. "Approved". Max. 200 characters. */
|
|
1758
|
+
reason?: string;
|
|
1759
|
+
/** Stored in the signature (`/Location`). Max. 200 characters. */
|
|
1760
|
+
location?: string;
|
|
1761
|
+
/** Stored in the signature (`/ContactInfo`). Max. 200 characters. */
|
|
1762
|
+
contactInfo?: string;
|
|
1763
|
+
/**
|
|
1764
|
+
* Proposes a visible stamp (signer name, date, reason) on one page. The user
|
|
1765
|
+
* can turn it off. Omit or pass `false` for a signature that only appears in
|
|
1766
|
+
* the viewer's signature panel.
|
|
1767
|
+
*/
|
|
1768
|
+
visibleSignature?: false | {
|
|
1769
|
+
/** Zero-based. @defaultValue 0 */
|
|
1770
|
+
pageIndex?: number;
|
|
1771
|
+
/** @defaultValue "bottom-right" */
|
|
1772
|
+
position?: MindooDBAppPdfSignaturePosition;
|
|
1773
|
+
};
|
|
1774
|
+
/**
|
|
1775
|
+
* Proposes an RFC 3161 timestamp from a trusted authority (PAdES-B-T), so the
|
|
1776
|
+
* signing time is evidence rather than the device's clock. The user can turn
|
|
1777
|
+
* it off. @defaultValue true
|
|
1778
|
+
*/
|
|
1779
|
+
timestamp?: boolean;
|
|
1780
|
+
}
|
|
1781
|
+
/** The certificate a PDF was signed with, for display. */
|
|
1782
|
+
interface MindooDBAppPdfSigner {
|
|
1783
|
+
commonName: string;
|
|
1784
|
+
/** Subject as `CN=…, O=…, C=…`. */
|
|
1785
|
+
subject: string;
|
|
1786
|
+
issuerCommonName: string;
|
|
1787
|
+
/** ISO 8601. */
|
|
1788
|
+
validFrom: string;
|
|
1789
|
+
validTo: string;
|
|
1790
|
+
/** Lower-case hex SHA-256 of the certificate. */
|
|
1791
|
+
fingerprintSha256: string;
|
|
1792
|
+
selfSigned: boolean;
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Outcome of {@link MindooDBAppPdfApi.sign}. Declining is an ordinary outcome:
|
|
1796
|
+
* `declined` when the user cancelled, `unsupported` when the host cannot sign
|
|
1797
|
+
* PDFs (older Haven), `invalid` when the request broke a limit or the bytes are
|
|
1798
|
+
* not a signable PDF (`message` says which).
|
|
1799
|
+
*/
|
|
1800
|
+
type MindooDBAppPdfSignResult = {
|
|
1801
|
+
ok: true;
|
|
1802
|
+
/** The original bytes followed by one signature revision (incremental update). */
|
|
1803
|
+
pdf: Uint8Array;
|
|
1804
|
+
signer: MindooDBAppPdfSigner;
|
|
1805
|
+
/** Time from the timestamp authority, epoch ms, when the user kept the timestamp. */
|
|
1806
|
+
timestampTime?: number;
|
|
1807
|
+
/** Client wall-clock at signing. Not evidence — the timestamp is. */
|
|
1808
|
+
signedAt: number;
|
|
1809
|
+
} | {
|
|
1810
|
+
ok: false;
|
|
1811
|
+
reason: "declined" | "unsupported" | "invalid";
|
|
1812
|
+
message?: string;
|
|
1813
|
+
};
|
|
1814
|
+
/** `session.pdf`: PDF services that need the user, performed by Haven. */
|
|
1815
|
+
interface MindooDBAppPdfApi {
|
|
1816
|
+
/**
|
|
1817
|
+
* Sign a PDF with a certificate the user chooses (PAdES, recognised by Adobe
|
|
1818
|
+
* Acrobat and other readers). Opens a Haven dialog; resolves once the user
|
|
1819
|
+
* signed or cancelled.
|
|
1820
|
+
*/
|
|
1821
|
+
sign(input: MindooDBAppPdfSignInput): Promise<MindooDBAppPdfSignResult>;
|
|
1822
|
+
}
|
|
1722
1823
|
/** A component another app offers, as `session.components.list` returns it. */
|
|
1723
1824
|
interface MindooDBAppComponentInfo {
|
|
1724
1825
|
/** Opaque key for `session.embeds.open`. */
|
|
@@ -3651,6 +3752,8 @@ interface MindooDBAppSession {
|
|
|
3651
3752
|
* elsewhere). See {@link MindooDBAppRemindersApi}.
|
|
3652
3753
|
*/
|
|
3653
3754
|
reminders: MindooDBAppRemindersApi;
|
|
3755
|
+
/** PDF services that need the user, such as signing with a certificate. */
|
|
3756
|
+
pdf: MindooDBAppPdfApi;
|
|
3654
3757
|
/**
|
|
3655
3758
|
* Run work before the host tears this launch down, e.g. flushing buffered writes.
|
|
3656
3759
|
*
|
|
@@ -3713,4 +3816,4 @@ interface MindooDBAppBridge {
|
|
|
3713
3816
|
connect(options?: MindooDBAppBridgeConnectOptions): Promise<MindooDBAppSession>;
|
|
3714
3817
|
}
|
|
3715
3818
|
|
|
3716
|
-
export { type MindooDBAppBridgeConnectOptions as $, MINDOODB_APP_LISTING_SUMMARY_MAX as A, MINDOODB_APP_SEAL_SIGNING_DOMAIN as B, MINDOODB_APP_WELL_KNOWN_DRAG_TYPES as C, type MindooDBAppAcceptSpec as D, type MindooDBAppAccessDecision as E, type MindooDBAppAccessTier as F, type MindooDBAppAgentApi as G, type MindooDBAppAgentRegistration as H, type MindooDBAppAgentToolAnnotations as I, type MindooDBAppAgentToolDescriptor as J, type MindooDBAppAgentToolScope as K, type MindooDBAppAttachmentApi as L, type MindooDBAppAttachmentPreviewMode as M, type MindooDBAppAttachmentChunk as N, type MindooDBAppAttachmentInfo as O, type MindooDBAppAttachmentPreviewOptions as P, type MindooDBAppAttachmentPreviewSession as Q, type MindooDBAppAutomergeChangesPatch as R, type MindooDBAppAutomergeChangesSince as S, type MindooDBAppAutomergeGetOptions as T, type MindooDBAppAutomergePatchResult as U, type MindooDBAppAutomergeSnapshot as V, type MindooDBAppBridgeAgentInvokeMessage as W, type MindooDBAppBridgeAgentResultMessage as X, type MindooDBAppBridgeBeforeCloseAck as Y, type MindooDBAppBridgeBeforeCloseMessage as Z, type MindooDBAppBridgeConnectMessage as _, type MindooDBAppDragBindSourceOptions as a, type MindooDBAppDatabaseInfo as a$, type MindooDBAppBridgeConnectedMessage as a0, type MindooDBAppBridgeDragDropMessage as a1, type MindooDBAppBridgeDragLeaveMessage as a2, type MindooDBAppBridgeDragOverMessage as a3, type MindooDBAppBridgeEmbedEventMessage as a4, type MindooDBAppBridgeEmbeddingRequestMessage as a5, type MindooDBAppBridgeErrorPayload as a6, type MindooDBAppBridgeHandshakeErrorMessage as a7, type MindooDBAppBridgeHostFocusChangedMessage as a8, type MindooDBAppBridgeIncomingContentMessage as a9, type MindooDBAppComponentChildren as aA, type MindooDBAppComponentContract as aB, type MindooDBAppComponentFieldValue as aC, type MindooDBAppComponentInfo as aD, type MindooDBAppComponentIntent as aE, type MindooDBAppComponentQuery as aF, type MindooDBAppComponentReference as aG, type MindooDBAppComponentSpec as aH, type MindooDBAppComponentsApi as aI, type MindooDBAppConfiguredViewCategorizationStyle as aJ, type MindooDBAppConfiguredViewColumn as aK, type MindooDBAppConfiguredViewColumnRole as aL, type MindooDBAppConfiguredViewExpressionMode as aM, type MindooDBAppConfiguredViewFieldExpression as aN, type MindooDBAppConfiguredViewFilterDefinition as aO, type MindooDBAppConfiguredViewFilterMode as aP, type MindooDBAppConfiguredViewFilterRule as aQ, type MindooDBAppConfiguredViewFormulaExpression as aR, type MindooDBAppConfiguredViewFormulaFilterDefinition as aS, type MindooDBAppConfiguredViewPreviewMode as aT, type MindooDBAppConfiguredViewRuleFilterDefinition as aU, type MindooDBAppConfiguredViewRuleMatchMode as aV, type MindooDBAppConfiguredViewRuleOperator as aW, type MindooDBAppConfiguredViewValueExpression as aX, type MindooDBAppCreateKeyInfo as aY, type MindooDBAppCreateViewInput as aZ, type MindooDBAppCreateViewNavigatorInput as a_, type MindooDBAppBridgeLocaleChangedMessage as aa, type MindooDBAppBridgePortMessage as ab, type MindooDBAppBridgeQueryResultMessage as ac, type MindooDBAppBridgeReminderOpenedMessage as ad, type MindooDBAppBridgeRpcError as ae, type MindooDBAppBridgeRpcMessage as af, type MindooDBAppBridgeRpcRequest as ag, type MindooDBAppBridgeRpcSuccess as ah, type MindooDBAppBridgeShortcutInvokedMessage as ai, type MindooDBAppBridgeShortcutsChangedMessage as aj, type MindooDBAppBridgeStreamAbortRequest as ak, type MindooDBAppBridgeStreamAck as al, type MindooDBAppBridgeStreamCloseRequest as am, type MindooDBAppBridgeStreamError as an, type MindooDBAppBridgeStreamMessage as ao, type MindooDBAppBridgeStreamOpenResult as ap, type MindooDBAppBridgeStreamReadRequest as aq, type MindooDBAppBridgeStreamWriteRequest as ar, type MindooDBAppBridgeThemeChangedMessage as as, type MindooDBAppBridgeUiPreferencesChangedMessage as at, type MindooDBAppBridgeViewChangedMessage as au, type MindooDBAppBridgeViewportChangedMessage as av, type MindooDBAppBridgeWorkspaceFocusRequestedMessage as aw, type MindooDBAppBrowserFeatures as ax, type MindooDBAppCapability as ay, type MindooDBAppComponentCategory as az, type MindooDBAppDragStartInput as b, type MindooDBAppIncomingSource as b$, type MindooDBAppDefinitionDatabase as b0, type MindooDBAppDefinitionListing as b1, type MindooDBAppDefinitionPermission as b2, type MindooDBAppDefinitionRegistrationPermission as b3, type MindooDBAppDefinitionScreenshot as b4, type MindooDBAppDefinitionValidation as b5, type MindooDBAppDirectoryApi as b6, type MindooDBAppDirectoryEntry as b7, type MindooDBAppDocumentApi as b8, type MindooDBAppDocumentHeadCursorResult as b9, type MindooDBAppEmbedDirtyEvent as bA, type MindooDBAppEmbedOpenInput as bB, type MindooDBAppEmbedRect as bC, type MindooDBAppEmbeddingApi as bD, type MindooDBAppEmbeddingLookupOptions as bE, type MindooDBAppEmbeddingLookupResult as bF, type MindooDBAppEmbedsApi as bG, type MindooDBAppEntryAttachmentRef as bH, type MindooDBAppEntryProvenance as bI, type MindooDBAppExtractDocumentTextInput as bJ, type MindooDBAppExtractDocumentTextResult as bK, type MindooDBAppExtractTextFormat as bL, type MindooDBAppExtractionSetup as bM, type MindooDBAppFulltextSetup as bN, type MindooDBAppHistoricalDocument as bO, type MindooDBAppHistoryQuery as bP, type MindooDBAppHostTheme as bQ, type MindooDBAppIdentityApi as bR, type MindooDBAppInaccessibleDocument as bS, type MindooDBAppInaccessibleDocumentListQuery as bT, type MindooDBAppInaccessibleDocumentListResult as bU, type MindooDBAppIncomingContent as bV, type MindooDBAppIncomingContentHandler as bW, type MindooDBAppIncomingContentInfo as bX, type MindooDBAppIncomingItem as bY, type MindooDBAppIncomingItemInfo as bZ, type MindooDBAppIncomingResult as b_, type MindooDBAppDocumentHistoryEntry as ba, type MindooDBAppDocumentListQuery as bb, type MindooDBAppDocumentListResult as bc, type MindooDBAppDocumentQuery as bd, type MindooDBAppDocumentRevisionId 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 MindooDBAppEmbedCloseReason as bx, type MindooDBAppEmbedClosedEvent as by, type MindooDBAppEmbedContext as bz, type MindooDBAppDragStartResult as c, type MindooDBAppRuntime as c$, type MindooDBAppJsonCounterIncrementPatch as c0, type MindooDBAppJsonListDeletePatch as c1, type MindooDBAppJsonListInsertPatch as c2, type MindooDBAppJsonPatch as c3, type MindooDBAppJsonSetPatch as c4, type MindooDBAppJsonTextMarkPatch as c5, type MindooDBAppJsonTextSplicePatch as c6, type MindooDBAppJsonTextUnmarkPatch as c7, type MindooDBAppJsonUnsetPatch as c8, type MindooDBAppLaunchContext as c9, type MindooDBAppQueryResult as cA, type MindooDBAppQueryRow as cB, type MindooDBAppQuerySortKey as cC, type MindooDBAppQueryTextClause as cD, type MindooDBAppReadableAttachmentStream as cE, type MindooDBAppRecipientOptions as cF, type MindooDBAppReminder as cG, type MindooDBAppReminderOpened as cH, type MindooDBAppReminderOpenedHandler as cI, type MindooDBAppReminderRequest as cJ, type MindooDBAppReminderScheduleResult as cK, type MindooDBAppRemindersApi as cL, type MindooDBAppResolvedViewDefinition as cM, type MindooDBAppResolvedViewSource as cN, type MindooDBAppRevisionPhase as cO, type MindooDBAppRevisionVerification as cP, type MindooDBAppRichTextBlockSpan as cQ, type MindooDBAppRichTextGetOptions as cR, type MindooDBAppRichTextImmutableString as cS, type MindooDBAppRichTextMarkRange as cT, type MindooDBAppRichTextMaterializeValue as cU, type MindooDBAppRichTextPatch as cV, type MindooDBAppRichTextScalar as cW, type MindooDBAppRichTextSpliceStep as cX, type MindooDBAppRichTextStep as cY, type MindooDBAppRichTextStepPatch as cZ, type MindooDBAppRichTextTextSpan as c_, type MindooDBAppListUsersOptions as ca, type MindooDBAppListUsersPage as cb, type MindooDBAppLiveQuerySubscription as cc, type MindooDBAppLocalizedText as cd, type MindooDBAppMenuAnchor as ce, type MindooDBAppMenuApi as cf, type MindooDBAppMenuCommandItem as cg, type MindooDBAppMenuDismissReason as ch, type MindooDBAppMenuDismissedResult as ci, type MindooDBAppMenuItem as cj, type MindooDBAppMenuKind as ck, type MindooDBAppMenuPlacement as cl, type MindooDBAppMenuPointAnchor as cm, type MindooDBAppMenuRect as cn, type MindooDBAppMenuRectAnchor as co, type MindooDBAppMenuSelectionResult as cp, type MindooDBAppMenuSeparatorItem as cq, type MindooDBAppNotificationSeverity as cr, type MindooDBAppNotifyInput as cs, type MindooDBAppNotifyResult as ct, type MindooDBAppProposeAppInput as cu, type MindooDBAppProposeAppResult as cv, type MindooDBAppQueryCoverage as cw, type MindooDBAppQueryInclude as cx, type MindooDBAppQueryIncludeCardinality as cy, type MindooDBAppQueryIncludeSlots as cz, type MindooDBAppDragPreview as d, type MindooDBAppScanAttachmentOptions as d0, type MindooDBAppScanAttachmentResult as d1, type MindooDBAppScopedDocId as d2, type MindooDBAppScopedDocumentSummary as d3, type MindooDBAppSealIntent as d4, type MindooDBAppSealedChannelOpenInput as d5, type MindooDBAppSealedChannelOpenResult as d6, type MindooDBAppSealedChannelRequestInput as d7, type MindooDBAppSession as d8, type MindooDBAppShowMenuInput as d9, type MindooDBAppViewNavigatorExpansionState as dA, type MindooDBAppViewNavigatorOpenOptions as dB, type MindooDBAppViewNavigatorPageOptions as dC, type MindooDBAppViewNavigatorPageResult as dD, type MindooDBAppViewNavigatorRangeQuery as dE, type MindooDBAppViewNavigatorSelectionState as dF, type MindooDBAppViewUpdateStats as dG, type MindooDBAppViewport as dH, type MindooDBAppWellKnownDragType as dI, type MindooDBAppWritableAttachmentStream as dJ, mindooDBAppAcceptMatchesType as dK, mindooDBAppComponentFieldsMatch as dL, resolveMindooDBAppDefinitionUrl as dM, resolveMindooDBAppListingAssetUrl as dN, resolveMindooDBAppLocalizedText as dO, validateMindooDBAppAccepts as dP, validateMindooDBAppComponents as dQ, validateMindooDBAppDefinition as dR, type MindooDBAppShowMenuResult as da, type MindooDBAppSignPreview as db, type MindooDBAppSignPreviewScope as dc, type MindooDBAppSignStatementInput as dd, type MindooDBAppSignStatementResult as de, type MindooDBAppStorageApi as df, type MindooDBAppSummarySetup as dg, type MindooDBAppTextCursorOptions as dh, type MindooDBAppTextCursorPosition as di, type MindooDBAppTextCursorPositionsResult as dj, type MindooDBAppTextCursorsResult as dk, type MindooDBAppTextEdit as dl, type MindooDBAppTextPatch as dm, type MindooDBAppThemeMode as dn, type MindooDBAppTimestampApi as dp, type MindooDBAppTimestampInput as dq, type MindooDBAppTimestampProvider as dr, type MindooDBAppTimestampResult as ds, type MindooDBAppUiPreferences as dt, type MindooDBAppUpdateDocumentInput as du, type MindooDBAppViewCursorDocumentListResult as dv, type MindooDBAppViewCursorResult as dw, type MindooDBAppViewEntry as dx, type MindooDBAppViewEntryKind as dy, type MindooDBAppViewNavigator as dz, type MindooDBAppBridge as e, 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_COMPONENTS_MAX as r, MINDOODB_APP_COMPONENT_CONTRACT_PATTERN as s, MINDOODB_APP_DEFINITION_FILE_NAME as t, MINDOODB_APP_DEFINITION_FORMAT as u, MINDOODB_APP_DEFINITION_PERMISSIONS as v, MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS as w, MINDOODB_APP_DEFINITION_VERSION as x, MINDOODB_APP_LISTING_DESCRIPTION_MAX as y, MINDOODB_APP_LISTING_MAX_SCREENSHOTS as z };
|
|
3819
|
+
export { type MindooDBAppBridgeConnectOptions as $, MINDOODB_APP_LISTING_SUMMARY_MAX as A, MINDOODB_APP_SEAL_SIGNING_DOMAIN as B, MINDOODB_APP_WELL_KNOWN_DRAG_TYPES as C, type MindooDBAppAcceptSpec as D, type MindooDBAppAccessDecision as E, type MindooDBAppAccessTier as F, type MindooDBAppAgentApi as G, type MindooDBAppAgentRegistration as H, type MindooDBAppAgentToolAnnotations as I, type MindooDBAppAgentToolDescriptor as J, type MindooDBAppAgentToolScope as K, type MindooDBAppAttachmentApi as L, type MindooDBAppAttachmentPreviewMode as M, type MindooDBAppAttachmentChunk as N, type MindooDBAppAttachmentInfo as O, type MindooDBAppAttachmentPreviewOptions as P, type MindooDBAppAttachmentPreviewSession as Q, type MindooDBAppAutomergeChangesPatch as R, type MindooDBAppAutomergeChangesSince as S, type MindooDBAppAutomergeGetOptions as T, type MindooDBAppAutomergePatchResult as U, type MindooDBAppAutomergeSnapshot as V, type MindooDBAppBridgeAgentInvokeMessage as W, type MindooDBAppBridgeAgentResultMessage as X, type MindooDBAppBridgeBeforeCloseAck as Y, type MindooDBAppBridgeBeforeCloseMessage as Z, type MindooDBAppBridgeConnectMessage as _, type MindooDBAppDragBindSourceOptions as a, type MindooDBAppDatabaseInfo as a$, type MindooDBAppBridgeConnectedMessage as a0, type MindooDBAppBridgeDragDropMessage as a1, type MindooDBAppBridgeDragLeaveMessage as a2, type MindooDBAppBridgeDragOverMessage as a3, type MindooDBAppBridgeEmbedEventMessage as a4, type MindooDBAppBridgeEmbeddingRequestMessage as a5, type MindooDBAppBridgeErrorPayload as a6, type MindooDBAppBridgeHandshakeErrorMessage as a7, type MindooDBAppBridgeHostFocusChangedMessage as a8, type MindooDBAppBridgeIncomingContentMessage as a9, type MindooDBAppComponentChildren as aA, type MindooDBAppComponentContract as aB, type MindooDBAppComponentFieldValue as aC, type MindooDBAppComponentInfo as aD, type MindooDBAppComponentIntent as aE, type MindooDBAppComponentQuery as aF, type MindooDBAppComponentReference as aG, type MindooDBAppComponentSpec as aH, type MindooDBAppComponentsApi as aI, type MindooDBAppConfiguredViewCategorizationStyle as aJ, type MindooDBAppConfiguredViewColumn as aK, type MindooDBAppConfiguredViewColumnRole as aL, type MindooDBAppConfiguredViewExpressionMode as aM, type MindooDBAppConfiguredViewFieldExpression as aN, type MindooDBAppConfiguredViewFilterDefinition as aO, type MindooDBAppConfiguredViewFilterMode as aP, type MindooDBAppConfiguredViewFilterRule as aQ, type MindooDBAppConfiguredViewFormulaExpression as aR, type MindooDBAppConfiguredViewFormulaFilterDefinition as aS, type MindooDBAppConfiguredViewPreviewMode as aT, type MindooDBAppConfiguredViewRuleFilterDefinition as aU, type MindooDBAppConfiguredViewRuleMatchMode as aV, type MindooDBAppConfiguredViewRuleOperator as aW, type MindooDBAppConfiguredViewValueExpression as aX, type MindooDBAppCreateKeyInfo as aY, type MindooDBAppCreateViewInput as aZ, type MindooDBAppCreateViewNavigatorInput as a_, type MindooDBAppBridgeLocaleChangedMessage as aa, type MindooDBAppBridgePortMessage as ab, type MindooDBAppBridgeQueryResultMessage as ac, type MindooDBAppBridgeReminderOpenedMessage as ad, type MindooDBAppBridgeRpcError as ae, type MindooDBAppBridgeRpcMessage as af, type MindooDBAppBridgeRpcRequest as ag, type MindooDBAppBridgeRpcSuccess as ah, type MindooDBAppBridgeShortcutInvokedMessage as ai, type MindooDBAppBridgeShortcutsChangedMessage as aj, type MindooDBAppBridgeStreamAbortRequest as ak, type MindooDBAppBridgeStreamAck as al, type MindooDBAppBridgeStreamCloseRequest as am, type MindooDBAppBridgeStreamError as an, type MindooDBAppBridgeStreamMessage as ao, type MindooDBAppBridgeStreamOpenResult as ap, type MindooDBAppBridgeStreamReadRequest as aq, type MindooDBAppBridgeStreamWriteRequest as ar, type MindooDBAppBridgeThemeChangedMessage as as, type MindooDBAppBridgeUiPreferencesChangedMessage as at, type MindooDBAppBridgeViewChangedMessage as au, type MindooDBAppBridgeViewportChangedMessage as av, type MindooDBAppBridgeWorkspaceFocusRequestedMessage as aw, type MindooDBAppBrowserFeatures as ax, type MindooDBAppCapability as ay, type MindooDBAppComponentCategory as az, type MindooDBAppDragStartInput as b, type MindooDBAppIncomingSource as b$, type MindooDBAppDefinitionDatabase as b0, type MindooDBAppDefinitionListing as b1, type MindooDBAppDefinitionPermission as b2, type MindooDBAppDefinitionRegistrationPermission as b3, type MindooDBAppDefinitionScreenshot as b4, type MindooDBAppDefinitionValidation as b5, type MindooDBAppDirectoryApi as b6, type MindooDBAppDirectoryEntry as b7, type MindooDBAppDocumentApi as b8, type MindooDBAppDocumentHeadCursorResult as b9, type MindooDBAppEmbedDirtyEvent as bA, type MindooDBAppEmbedOpenInput as bB, type MindooDBAppEmbedRect as bC, type MindooDBAppEmbeddingApi as bD, type MindooDBAppEmbeddingLookupOptions as bE, type MindooDBAppEmbeddingLookupResult as bF, type MindooDBAppEmbedsApi as bG, type MindooDBAppEntryAttachmentRef as bH, type MindooDBAppEntryProvenance as bI, type MindooDBAppExtractDocumentTextInput as bJ, type MindooDBAppExtractDocumentTextResult as bK, type MindooDBAppExtractTextFormat as bL, type MindooDBAppExtractionSetup as bM, type MindooDBAppFulltextSetup as bN, type MindooDBAppHistoricalDocument as bO, type MindooDBAppHistoryQuery as bP, type MindooDBAppHostTheme as bQ, type MindooDBAppIdentityApi as bR, type MindooDBAppInaccessibleDocument as bS, type MindooDBAppInaccessibleDocumentListQuery as bT, type MindooDBAppInaccessibleDocumentListResult as bU, type MindooDBAppIncomingContent as bV, type MindooDBAppIncomingContentHandler as bW, type MindooDBAppIncomingContentInfo as bX, type MindooDBAppIncomingItem as bY, type MindooDBAppIncomingItemInfo as bZ, type MindooDBAppIncomingResult as b_, type MindooDBAppDocumentHistoryEntry as ba, type MindooDBAppDocumentListQuery as bb, type MindooDBAppDocumentListResult as bc, type MindooDBAppDocumentQuery as bd, type MindooDBAppDocumentRevisionId 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 MindooDBAppEmbedCloseReason as bx, type MindooDBAppEmbedClosedEvent as by, type MindooDBAppEmbedContext as bz, type MindooDBAppDragStartResult as c, type MindooDBAppRichTextScalar as c$, type MindooDBAppJsonCounterIncrementPatch as c0, type MindooDBAppJsonListDeletePatch as c1, type MindooDBAppJsonListInsertPatch as c2, type MindooDBAppJsonPatch as c3, type MindooDBAppJsonSetPatch as c4, type MindooDBAppJsonTextMarkPatch as c5, type MindooDBAppJsonTextSplicePatch as c6, type MindooDBAppJsonTextUnmarkPatch as c7, type MindooDBAppJsonUnsetPatch as c8, type MindooDBAppLaunchContext as c9, type MindooDBAppProposeAppResult as cA, type MindooDBAppQueryCoverage as cB, type MindooDBAppQueryInclude as cC, type MindooDBAppQueryIncludeCardinality as cD, type MindooDBAppQueryIncludeSlots as cE, type MindooDBAppQueryResult as cF, type MindooDBAppQueryRow as cG, type MindooDBAppQuerySortKey as cH, type MindooDBAppQueryTextClause as cI, type MindooDBAppReadableAttachmentStream as cJ, type MindooDBAppRecipientOptions as cK, type MindooDBAppReminder as cL, type MindooDBAppReminderOpened as cM, type MindooDBAppReminderOpenedHandler as cN, type MindooDBAppReminderRequest as cO, type MindooDBAppReminderScheduleResult as cP, type MindooDBAppRemindersApi as cQ, type MindooDBAppResolvedViewDefinition as cR, type MindooDBAppResolvedViewSource as cS, type MindooDBAppRevisionPhase as cT, type MindooDBAppRevisionVerification as cU, type MindooDBAppRichTextBlockSpan as cV, type MindooDBAppRichTextGetOptions as cW, type MindooDBAppRichTextImmutableString as cX, type MindooDBAppRichTextMarkRange as cY, type MindooDBAppRichTextMaterializeValue as cZ, type MindooDBAppRichTextPatch as c_, type MindooDBAppListUsersOptions as ca, type MindooDBAppListUsersPage as cb, type MindooDBAppLiveQuerySubscription as cc, type MindooDBAppLocalizedText as cd, type MindooDBAppMenuAnchor as ce, type MindooDBAppMenuApi as cf, type MindooDBAppMenuCommandItem as cg, type MindooDBAppMenuDismissReason as ch, type MindooDBAppMenuDismissedResult as ci, type MindooDBAppMenuItem as cj, type MindooDBAppMenuKind as ck, type MindooDBAppMenuPlacement as cl, type MindooDBAppMenuPointAnchor as cm, type MindooDBAppMenuRect as cn, type MindooDBAppMenuRectAnchor as co, type MindooDBAppMenuSelectionResult as cp, type MindooDBAppMenuSeparatorItem as cq, type MindooDBAppNotificationSeverity as cr, type MindooDBAppNotifyInput as cs, type MindooDBAppNotifyResult as ct, type MindooDBAppPdfApi as cu, type MindooDBAppPdfSignInput as cv, type MindooDBAppPdfSignResult as cw, type MindooDBAppPdfSignaturePosition as cx, type MindooDBAppPdfSigner as cy, type MindooDBAppProposeAppInput as cz, type MindooDBAppDragPreview as d, type MindooDBAppRichTextSpliceStep as d0, type MindooDBAppRichTextStep as d1, type MindooDBAppRichTextStepPatch as d2, type MindooDBAppRichTextTextSpan as d3, type MindooDBAppRuntime as d4, type MindooDBAppScanAttachmentOptions as d5, type MindooDBAppScanAttachmentResult as d6, type MindooDBAppScopedDocId as d7, type MindooDBAppScopedDocumentSummary as d8, type MindooDBAppSealIntent as d9, type MindooDBAppViewCursorDocumentListResult as dA, type MindooDBAppViewCursorResult as dB, type MindooDBAppViewEntry as dC, type MindooDBAppViewEntryKind as dD, type MindooDBAppViewNavigator as dE, type MindooDBAppViewNavigatorExpansionState as dF, type MindooDBAppViewNavigatorOpenOptions as dG, type MindooDBAppViewNavigatorPageOptions as dH, type MindooDBAppViewNavigatorPageResult as dI, type MindooDBAppViewNavigatorRangeQuery as dJ, type MindooDBAppViewNavigatorSelectionState as dK, type MindooDBAppViewUpdateStats as dL, type MindooDBAppViewport as dM, type MindooDBAppWellKnownDragType as dN, type MindooDBAppWritableAttachmentStream as dO, mindooDBAppAcceptMatchesType as dP, mindooDBAppComponentFieldsMatch as dQ, resolveMindooDBAppDefinitionUrl as dR, resolveMindooDBAppListingAssetUrl as dS, resolveMindooDBAppLocalizedText as dT, validateMindooDBAppAccepts as dU, validateMindooDBAppComponents as dV, validateMindooDBAppDefinition as dW, type MindooDBAppSealedChannelOpenInput as da, type MindooDBAppSealedChannelOpenResult as db, type MindooDBAppSealedChannelRequestInput as dc, type MindooDBAppSession as dd, type MindooDBAppShowMenuInput as de, type MindooDBAppShowMenuResult as df, type MindooDBAppSignPreview as dg, type MindooDBAppSignPreviewScope as dh, type MindooDBAppSignStatementInput as di, type MindooDBAppSignStatementResult as dj, type MindooDBAppStorageApi as dk, type MindooDBAppSummarySetup as dl, type MindooDBAppTextCursorOptions as dm, type MindooDBAppTextCursorPosition as dn, type MindooDBAppTextCursorPositionsResult as dp, type MindooDBAppTextCursorsResult as dq, type MindooDBAppTextEdit as dr, type MindooDBAppTextPatch as ds, type MindooDBAppThemeMode as dt, type MindooDBAppTimestampApi as du, type MindooDBAppTimestampInput as dv, type MindooDBAppTimestampProvider as dw, type MindooDBAppTimestampResult as dx, type MindooDBAppUiPreferences as dy, type MindooDBAppUpdateDocumentInput as dz, type MindooDBAppBridge as e, 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_COMPONENTS_MAX as r, MINDOODB_APP_COMPONENT_CONTRACT_PATTERN as s, MINDOODB_APP_DEFINITION_FILE_NAME as t, MINDOODB_APP_DEFINITION_FORMAT as u, MINDOODB_APP_DEFINITION_PERMISSIONS as v, MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS as w, MINDOODB_APP_DEFINITION_VERSION as x, MINDOODB_APP_LISTING_DESCRIPTION_MAX as y, MINDOODB_APP_LISTING_MAX_SCREENSHOTS as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindoodb-app-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22.13.0"
|
|
6
6
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@automerge/automerge": "^3.3.2",
|
|
48
|
-
"mindoodb": ">=0.0.
|
|
48
|
+
"mindoodb": ">=0.0.76"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@automerge/automerge": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@automerge/automerge": "^3.5.0",
|
|
60
|
-
"mindoodb": "^0.0.
|
|
60
|
+
"mindoodb": "^0.0.76",
|
|
61
61
|
"@types/node": "25.5.0",
|
|
62
62
|
"jsdom": "^29.0.1",
|
|
63
63
|
"tsup": "^8.5.1",
|