@haex-space/vault-sdk 4.9.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- package/dist/{client-CS0AdXto.d.mts → client-DXHXxcgw.d.mts} +31 -11
- package/dist/{client-BzgCo_Ch.d.ts → client-EtzmMEnK.d.ts} +31 -11
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +23 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +23 -1
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.js +23 -1
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +23 -1
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +23 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +23 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +23 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +23 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/svelte.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StorageAPI } from './client-
|
|
1
|
+
import { S as StorageAPI } from './client-DXHXxcgw.mjs';
|
|
2
2
|
import { HaexVaultSdk } from './index.mjs';
|
|
3
3
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
4
4
|
import { Readable } from 'svelte/store';
|
package/dist/svelte.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StorageAPI } from './client-
|
|
1
|
+
import { S as StorageAPI } from './client-EtzmMEnK.js';
|
|
2
2
|
import { HaexVaultSdk } from './index.js';
|
|
3
3
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
4
4
|
import { Readable } from 'svelte/store';
|
package/dist/svelte.js
CHANGED
|
@@ -805,7 +805,11 @@ var MODEL_COMMANDS = {
|
|
|
805
805
|
/** Starts a job; the result follows as an event */
|
|
806
806
|
start: "extension_model_job_start",
|
|
807
807
|
/** Cancels a running job of this frame */
|
|
808
|
-
cancel: "extension_model_job_cancel"
|
|
808
|
+
cancel: "extension_model_job_cancel",
|
|
809
|
+
/** Asks for a grant before the first job; nothing goes to a model */
|
|
810
|
+
requestAccess: "extension_model_access_request",
|
|
811
|
+
/** Opens the host's page of this extension's models */
|
|
812
|
+
openSettings: "extension_model_settings_open"
|
|
809
813
|
};
|
|
810
814
|
|
|
811
815
|
// src/commands/peers.ts
|
|
@@ -2052,6 +2056,24 @@ var ModelsAPI = class {
|
|
|
2052
2056
|
);
|
|
2053
2057
|
return answer.models;
|
|
2054
2058
|
}
|
|
2059
|
+
/**
|
|
2060
|
+
* Asks for a grant before the first job (holzi spec 055 US9) and resolves with the allowed
|
|
2061
|
+
* models that fit `needs`. Without one, the host asks the user as it would for a job, and the
|
|
2062
|
+
* SDK waits for the answer. Rejects with `no_capable_model` (8001) when no model of the host
|
|
2063
|
+
* fits and with a denial (1002) when the user refused. Nothing is sent to a model, and consent
|
|
2064
|
+
* for a destination outside this device is asked with the first job that sends data.
|
|
2065
|
+
*/
|
|
2066
|
+
async requestAccessAsync(request) {
|
|
2067
|
+
const answer = await this.client.request(
|
|
2068
|
+
MODEL_COMMANDS.requestAccess,
|
|
2069
|
+
{ ...request }
|
|
2070
|
+
);
|
|
2071
|
+
return answer.models;
|
|
2072
|
+
}
|
|
2073
|
+
/** Opens the host's page of this extension's models, where the user chooses models and effort. */
|
|
2074
|
+
async openSettingsAsync() {
|
|
2075
|
+
await this.client.request(MODEL_COMMANDS.openSettings, {});
|
|
2076
|
+
}
|
|
2055
2077
|
/** Starts a job; its end comes as {@link onCompleted}. Use {@link runAsync} to await it. */
|
|
2056
2078
|
async startAsync(job) {
|
|
2057
2079
|
const answer = await this.client.request(MODEL_COMMANDS.start, {
|