@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/index.mjs
CHANGED
|
@@ -1215,7 +1215,11 @@ var MODEL_COMMANDS = {
|
|
|
1215
1215
|
/** Starts a job; the result follows as an event */
|
|
1216
1216
|
start: "extension_model_job_start",
|
|
1217
1217
|
/** Cancels a running job of this frame */
|
|
1218
|
-
cancel: "extension_model_job_cancel"
|
|
1218
|
+
cancel: "extension_model_job_cancel",
|
|
1219
|
+
/** Asks for a grant before the first job; nothing goes to a model */
|
|
1220
|
+
requestAccess: "extension_model_access_request",
|
|
1221
|
+
/** Opens the host's page of this extension's models */
|
|
1222
|
+
openSettings: "extension_model_settings_open"
|
|
1219
1223
|
};
|
|
1220
1224
|
|
|
1221
1225
|
// src/commands/peers.ts
|
|
@@ -2493,6 +2497,24 @@ var ModelsAPI = class {
|
|
|
2493
2497
|
);
|
|
2494
2498
|
return answer.models;
|
|
2495
2499
|
}
|
|
2500
|
+
/**
|
|
2501
|
+
* Asks for a grant before the first job (holzi spec 055 US9) and resolves with the allowed
|
|
2502
|
+
* models that fit `needs`. Without one, the host asks the user as it would for a job, and the
|
|
2503
|
+
* SDK waits for the answer. Rejects with `no_capable_model` (8001) when no model of the host
|
|
2504
|
+
* fits and with a denial (1002) when the user refused. Nothing is sent to a model, and consent
|
|
2505
|
+
* for a destination outside this device is asked with the first job that sends data.
|
|
2506
|
+
*/
|
|
2507
|
+
async requestAccessAsync(request) {
|
|
2508
|
+
const answer = await this.client.request(
|
|
2509
|
+
MODEL_COMMANDS.requestAccess,
|
|
2510
|
+
{ ...request }
|
|
2511
|
+
);
|
|
2512
|
+
return answer.models;
|
|
2513
|
+
}
|
|
2514
|
+
/** Opens the host's page of this extension's models, where the user chooses models and effort. */
|
|
2515
|
+
async openSettingsAsync() {
|
|
2516
|
+
await this.client.request(MODEL_COMMANDS.openSettings, {});
|
|
2517
|
+
}
|
|
2496
2518
|
/** Starts a job; its end comes as {@link onCompleted}. Use {@link runAsync} to await it. */
|
|
2497
2519
|
async startAsync(job) {
|
|
2498
2520
|
const answer = await this.client.request(MODEL_COMMANDS.start, {
|