@haex-space/vault-sdk 2.5.4 → 2.5.7
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/dist/{client-Bw04hBmE.d.mts → client-Bcysw57u.d.mts} +1 -1
- package/dist/{client-CJC-_fwd.d.ts → client-K4BOBLQE.d.ts} +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +9 -3
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +9 -3
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +9 -3
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +9 -3
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +9 -3
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +9 -3
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-mMVOhsmm.d.mts → types-CAHAohTY.d.mts} +11 -1
- package/dist/{types-mMVOhsmm.d.ts → types-CAHAohTY.d.ts} +11 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +9 -3
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +9 -3
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -254,6 +254,16 @@ interface PendingAuthorization {
|
|
|
254
254
|
* Decision type for external authorization prompts
|
|
255
255
|
*/
|
|
256
256
|
type ExternalAuthDecision = 'allow' | 'deny';
|
|
257
|
+
/**
|
|
258
|
+
* Session-based authorization entry (for "allow once" authorizations)
|
|
259
|
+
* These are stored in-memory and cleared when haex-vault restarts.
|
|
260
|
+
*/
|
|
261
|
+
interface SessionAuthorization {
|
|
262
|
+
/** Unique client identifier (public key fingerprint) */
|
|
263
|
+
clientId: string;
|
|
264
|
+
/** Extension ID this client can access */
|
|
265
|
+
extensionId: string;
|
|
266
|
+
}
|
|
257
267
|
/**
|
|
258
268
|
* Connection state for external clients connecting to haex-vault via WebSocket.
|
|
259
269
|
* Used by browser extensions, CLI tools, servers, and other external clients.
|
|
@@ -396,4 +406,4 @@ declare class HaexVaultSdkError extends Error {
|
|
|
396
406
|
};
|
|
397
407
|
}
|
|
398
408
|
|
|
399
|
-
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E,
|
|
409
|
+
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, DEFAULT_TIMEOUT as F, getTableName as G, type HaexHubConfig as H, ExternalConnectionState as I, ExternalConnectionErrorCode as J, isExternalClientConnected as K, canExternalClientSendRequests as L, type Migration as M, HaexVaultSdkError as N, HAEXTENSION_EVENTS as O, type PermissionResponse as P, type HaextensionEvent as Q, EXTERNAL_EVENTS as R, type SearchResult as S, TABLE_SEPARATOR as T, type ExternalEvent as U, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type SessionAuthorization as w, type ExternalConnection as x, PermissionStatus as y, ErrorCode as z };
|
|
@@ -254,6 +254,16 @@ interface PendingAuthorization {
|
|
|
254
254
|
* Decision type for external authorization prompts
|
|
255
255
|
*/
|
|
256
256
|
type ExternalAuthDecision = 'allow' | 'deny';
|
|
257
|
+
/**
|
|
258
|
+
* Session-based authorization entry (for "allow once" authorizations)
|
|
259
|
+
* These are stored in-memory and cleared when haex-vault restarts.
|
|
260
|
+
*/
|
|
261
|
+
interface SessionAuthorization {
|
|
262
|
+
/** Unique client identifier (public key fingerprint) */
|
|
263
|
+
clientId: string;
|
|
264
|
+
/** Extension ID this client can access */
|
|
265
|
+
extensionId: string;
|
|
266
|
+
}
|
|
257
267
|
/**
|
|
258
268
|
* Connection state for external clients connecting to haex-vault via WebSocket.
|
|
259
269
|
* Used by browser extensions, CLI tools, servers, and other external clients.
|
|
@@ -396,4 +406,4 @@ declare class HaexVaultSdkError extends Error {
|
|
|
396
406
|
};
|
|
397
407
|
}
|
|
398
408
|
|
|
399
|
-
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E,
|
|
409
|
+
export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, DEFAULT_TIMEOUT as F, getTableName as G, type HaexHubConfig as H, ExternalConnectionState as I, ExternalConnectionErrorCode as J, isExternalClientConnected as K, canExternalClientSendRequests as L, type Migration as M, HaexVaultSdkError as N, HAEXTENSION_EVENTS as O, type PermissionResponse as P, type HaextensionEvent as Q, EXTERNAL_EVENTS as R, type SearchResult as S, TABLE_SEPARATOR as T, type ExternalEvent as U, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type SessionAuthorization as w, type ExternalConnection as x, PermissionStatus as y, ErrorCode as z };
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultClient, S as StorageAPI } from './client-Bcysw57u.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-CAHAohTY.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultClient, S as StorageAPI } from './client-K4BOBLQE.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-CAHAohTY.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|
package/dist/vue.js
CHANGED
|
@@ -339,6 +339,12 @@ var HAEXTENSION_EVENTS = {
|
|
|
339
339
|
/** Search request from HaexHub */
|
|
340
340
|
SEARCH_REQUEST: "haextension:search:request"
|
|
341
341
|
};
|
|
342
|
+
var EXTERNAL_EVENTS = {
|
|
343
|
+
/** External request from authorized client */
|
|
344
|
+
REQUEST: "haextension:external:request",
|
|
345
|
+
/** New external client requesting authorization */
|
|
346
|
+
AUTHORIZATION_REQUEST: "external:authorization-request"
|
|
347
|
+
};
|
|
342
348
|
|
|
343
349
|
// src/types.ts
|
|
344
350
|
var DEFAULT_TIMEOUT = 3e4;
|
|
@@ -1123,11 +1129,11 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
1123
1129
|
log("Failed to setup context change listener:", error);
|
|
1124
1130
|
}
|
|
1125
1131
|
try {
|
|
1126
|
-
await listen(
|
|
1132
|
+
await listen(EXTERNAL_EVENTS.REQUEST, (event) => {
|
|
1127
1133
|
log("Received external request event:", event);
|
|
1128
1134
|
if (event.payload) {
|
|
1129
1135
|
onEvent({
|
|
1130
|
-
type:
|
|
1136
|
+
type: EXTERNAL_EVENTS.REQUEST,
|
|
1131
1137
|
data: event.payload,
|
|
1132
1138
|
timestamp: Date.now()
|
|
1133
1139
|
});
|
|
@@ -1589,7 +1595,7 @@ function processEvent(event, log, eventListeners, onContextChanged, onExternalRe
|
|
|
1589
1595
|
onContextChanged(contextEvent.data.context);
|
|
1590
1596
|
log("Context updated:", contextEvent.data.context);
|
|
1591
1597
|
}
|
|
1592
|
-
if (event.type ===
|
|
1598
|
+
if (event.type === EXTERNAL_EVENTS.REQUEST) {
|
|
1593
1599
|
const externalEvent = event;
|
|
1594
1600
|
onExternalRequest(externalEvent);
|
|
1595
1601
|
return;
|