@senguoyun/dsh-arkme 0.1.12 → 0.1.13
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 +2 -2
- package/assets/desktop_call/avatar-lin-xiaoman.jpeg +0 -0
- package/assets/desktop_call/avatar-mother.jpg +0 -0
- package/assets/desktop_call/avatar-self.png +0 -0
- package/assets/desktop_call/call-add-linear.svg +13 -0
- package/assets/desktop_call/icon-scan-add-contact.svg +4 -0
- package/assets/desktop_call/profile-circle-linear.svg +11 -0
- package/assets/desktop_call/user-add-linear.svg +15 -0
- package/cordis.patch.yml +4 -1
- package/docs/consumer-plugin-contract.md +13 -4
- package/docs/extension-market-controls.md +1 -1
- package/docs/gui-production-integration.md +1 -1
- package/lib/client.js +27533 -5149
- package/lib/client.js.map +1 -1
- package/lib/extension-profile-restart-helper.js +19 -3
- package/lib/index.js +1498 -380
- package/lib/{install-store-D6P-dH2i.js → install-store-Sn3Ccxfu.js} +32 -5
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-kUpXXUZI.js → persistent-runtime-Cki0XC3L.js} +826 -183
- package/lib/plugin-updater-helper-CiPlNqBc.js +346 -0
- package/lib/plugin-updater-helper.js +2 -250
- package/lib/sdk.js +114 -2
- package/lib/types/arkme-service.d.ts +30 -2
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/client/ArkmeAppUpdateDialog.d.ts +5 -0
- package/lib/types/client/ArkmeAppUpdateDialog.d.ts.map +1 -0
- package/lib/types/client/ArkmeCallHistorySurface.d.ts +57 -0
- package/lib/types/client/ArkmeCallHistorySurface.d.ts.map +1 -0
- package/lib/types/client/ArkmeContactAddSurface.d.ts +9 -0
- package/lib/types/client/ArkmeContactAddSurface.d.ts.map +1 -0
- package/lib/types/client/ArkmeExtensionPublishDialog.d.ts.map +1 -1
- package/lib/types/client/ArkmeExtensionReviews.d.ts +10 -0
- package/lib/types/client/ArkmeExtensionReviews.d.ts.map +1 -1
- package/lib/types/client/ArkmeMarketplace.d.ts +153 -0
- package/lib/types/client/ArkmeMarketplace.d.ts.map +1 -0
- package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -1
- package/lib/types/client/ArkmeQuickAdd.d.ts +12 -0
- package/lib/types/client/ArkmeQuickAdd.d.ts.map +1 -0
- package/lib/types/client/ArkmeRecordingSurface.d.ts +109 -3
- package/lib/types/client/ArkmeRecordingSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeSettingsSurface.d.ts +20 -0
- package/lib/types/client/ArkmeSettingsSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts +12 -0
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
- package/lib/types/client/ArkmeWorldSurface.d.ts +30 -0
- package/lib/types/client/ArkmeWorldSurface.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +1 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/app-update-store.d.ts +35 -0
- package/lib/types/client/app-update-store.d.ts.map +1 -0
- package/lib/types/client/demo-audio.d.ts +2 -0
- package/lib/types/client/demo-audio.d.ts.map +1 -0
- package/lib/types/client/extension-market-model.d.ts +1 -0
- package/lib/types/client/extension-market-model.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +8 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/personal-test-edition.d.ts +17 -0
- package/lib/types/client/personal-test-edition.d.ts.map +1 -0
- package/lib/types/client/ui-controller.d.ts +4 -1
- package/lib/types/client/ui-controller.d.ts.map +1 -1
- package/lib/types/extensions/bundle-artifact.d.ts +22 -0
- package/lib/types/extensions/bundle-artifact.d.ts.map +1 -1
- package/lib/types/extensions/install-store.d.ts +1 -0
- package/lib/types/extensions/install-store.d.ts.map +1 -1
- package/lib/types/extensions/manager.d.ts +35 -2
- package/lib/types/extensions/manager.d.ts.map +1 -1
- package/lib/types/extensions/owned-inventory.d.ts +2 -2
- package/lib/types/extensions/owned-inventory.d.ts.map +1 -1
- package/lib/types/extensions/owned-refs.d.ts +1 -1
- package/lib/types/extensions/owned-refs.d.ts.map +1 -1
- package/lib/types/extensions/owned-types.d.ts +18 -5
- package/lib/types/extensions/owned-types.d.ts.map +1 -1
- package/lib/types/extensions/profile-owned-inventory.d.ts +1 -0
- package/lib/types/extensions/profile-owned-inventory.d.ts.map +1 -1
- package/lib/types/extensions/profile-restart-helper.d.ts.map +1 -1
- package/lib/types/extensions/publish-client.d.ts +47 -2
- package/lib/types/extensions/publish-client.d.ts.map +1 -1
- package/lib/types/extensions/signature.d.ts +31 -1
- package/lib/types/extensions/signature.d.ts.map +1 -1
- package/lib/types/extensions/types.d.ts +71 -5
- package/lib/types/extensions/types.d.ts.map +1 -1
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts +8 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/outgoing-call-assets.d.ts.map +1 -1
- package/lib/types/plugin-update-artifact.d.ts +46 -0
- package/lib/types/plugin-update-artifact.d.ts.map +1 -0
- package/lib/types/plugin-update.d.ts +20 -11
- package/lib/types/plugin-update.d.ts.map +1 -1
- package/lib/types/plugin-updater-helper.d.ts +11 -0
- package/lib/types/plugin-updater-helper.d.ts.map +1 -1
- package/lib/types/recording-presentation.d.ts +2 -2
- package/lib/types/recording-presentation.d.ts.map +1 -1
- package/lib/types/sdk/index.d.ts +63 -7
- package/lib/types/sdk/index.d.ts.map +1 -1
- package/lib/types/services/bot-service.d.ts +5 -1
- package/lib/types/services/bot-service.d.ts.map +1 -1
- package/lib/types/services/contact-service.d.ts +25 -0
- package/lib/types/services/contact-service.d.ts.map +1 -0
- package/lib/types/services/group-service.d.ts +4 -1
- package/lib/types/services/group-service.d.ts.map +1 -1
- package/lib/types/services/recording-service.d.ts +4 -2
- package/lib/types/services/recording-service.d.ts.map +1 -1
- package/lib/types/services/service.d.ts +1 -0
- package/lib/types/services/service.d.ts.map +1 -1
- package/lib/types/services/world-service.d.ts +13 -0
- package/lib/types/services/world-service.d.ts.map +1 -1
- package/lib/types/tools/business/contacts/index.d.ts +4 -0
- package/lib/types/tools/business/contacts/index.d.ts.map +1 -0
- package/lib/types/tools/business/groups/create.d.ts +2 -0
- package/lib/types/tools/business/groups/create.d.ts.map +1 -0
- package/lib/types/tools/business/groups/index.d.ts +1 -0
- package/lib/types/tools/business/groups/index.d.ts.map +1 -1
- package/lib/types/tools/business/index.d.ts.map +1 -1
- package/lib/types/tools/business/recordings/index.d.ts +2 -1
- package/lib/types/tools/business/recordings/index.d.ts.map +1 -1
- package/lib/types/tools/business/world/index.d.ts +2 -0
- package/lib/types/tools/business/world/index.d.ts.map +1 -1
- package/lib/types/tools/business/world/mine.d.ts +2 -0
- package/lib/types/tools/business/world/mine.d.ts.map +1 -0
- package/lib/types/tools/business/world/voiceprint-invite.d.ts +2 -0
- package/lib/types/tools/business/world/voiceprint-invite.d.ts.map +1 -0
- package/lib/types/tools/extensions/index.d.ts.map +1 -1
- package/lib/types/tools/extensions/publish-conversation.d.ts +8 -1
- package/lib/types/tools/extensions/publish-conversation.d.ts.map +1 -1
- package/lib/types/tools/ports/contacts.d.ts +12 -0
- package/lib/types/tools/ports/contacts.d.ts.map +1 -0
- package/lib/types/tools/ports/groups.d.ts +4 -1
- package/lib/types/tools/ports/groups.d.ts.map +1 -1
- package/lib/types/tools/ports/index.d.ts +3 -2
- package/lib/types/tools/ports/index.d.ts.map +1 -1
- package/lib/types/tools/ports/recordings.d.ts +3 -2
- package/lib/types/tools/ports/recordings.d.ts.map +1 -1
- package/lib/types/tools/ports/world.d.ts +12 -1
- package/lib/types/tools/ports/world.d.ts.map +1 -1
- package/lib/types/tools/prompts/business.d.ts.map +1 -1
- package/lib/types/tools/registry/registrar.d.ts.map +1 -1
- package/lib/types/types.d.ts +48 -3
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +5 -4
- package/lib/plugin-update-install-state-CIsOCjWK.js +0 -67
- package/lib/types/client/ArkmeExtensionCenter.d.ts +0 -74
- package/lib/types/client/ArkmeExtensionCenter.d.ts.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { chmodSync, mkdirSync } from "node:fs";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
2
3
|
import { join } from "node:path";
|
|
3
4
|
import { DatabaseSync } from "node:sqlite";
|
|
4
5
|
//#region src/extensions/install-store.ts
|
|
@@ -29,6 +30,8 @@ var ArkmeExtensionInstallStore = class {
|
|
|
29
30
|
profile_package_name TEXT,
|
|
30
31
|
profile_bundle_path TEXT,
|
|
31
32
|
execution_model TEXT,
|
|
33
|
+
artifact_contract_version INTEGER,
|
|
34
|
+
native_capabilities_json TEXT NOT NULL DEFAULT '[]',
|
|
32
35
|
package_json_sha256 TEXT,
|
|
33
36
|
source_sha256 TEXT,
|
|
34
37
|
permission_snapshot_json TEXT NOT NULL DEFAULT '[]',
|
|
@@ -37,21 +40,39 @@ var ArkmeExtensionInstallStore = class {
|
|
|
37
40
|
last_checked_at_millis INTEGER NOT NULL DEFAULT 0,
|
|
38
41
|
last_error TEXT
|
|
39
42
|
);
|
|
43
|
+
CREATE TABLE IF NOT EXISTS extension_install_metadata (
|
|
44
|
+
key TEXT PRIMARY KEY,
|
|
45
|
+
value TEXT NOT NULL
|
|
46
|
+
);
|
|
40
47
|
`);
|
|
41
48
|
const columns = new Set(this.database.prepare("PRAGMA table_info(installed_extensions)").all().map((column) => column.name));
|
|
42
49
|
if (!columns.has("profile_package_name")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN profile_package_name TEXT");
|
|
43
50
|
if (!columns.has("profile_bundle_path")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN profile_bundle_path TEXT");
|
|
44
51
|
if (!columns.has("execution_model")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN execution_model TEXT");
|
|
52
|
+
if (!columns.has("artifact_contract_version")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN artifact_contract_version INTEGER");
|
|
53
|
+
if (!columns.has("native_capabilities_json")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN native_capabilities_json TEXT NOT NULL DEFAULT '[]'");
|
|
45
54
|
if (!columns.has("package_json_sha256")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN package_json_sha256 TEXT");
|
|
46
55
|
if (!columns.has("source_sha256")) this.database.exec("ALTER TABLE installed_extensions ADD COLUMN source_sha256 TEXT");
|
|
47
56
|
this.database.exec("UPDATE installed_extensions SET active = 0, dynamic_plugin_id = NULL, dynamic_package_id = NULL");
|
|
48
57
|
this.secureFiles();
|
|
49
58
|
}
|
|
59
|
+
installationInstanceId() {
|
|
60
|
+
const key = "installation_instance_id";
|
|
61
|
+
const existing = this.database.prepare("SELECT value FROM extension_install_metadata WHERE key = ?").get(key);
|
|
62
|
+
if (existing?.value.trim()) return existing.value;
|
|
63
|
+
const candidate = randomUUID();
|
|
64
|
+
this.database.prepare("INSERT OR IGNORE INTO extension_install_metadata (key, value) VALUES (?, ?)").run(key, candidate);
|
|
65
|
+
const persisted = this.database.prepare("SELECT value FROM extension_install_metadata WHERE key = ?").get(key);
|
|
66
|
+
if (persisted === void 0 || persisted.value.trim() === "") throw new Error("failed to persist extension installation instance identity");
|
|
67
|
+
this.secureFiles();
|
|
68
|
+
return persisted.value;
|
|
69
|
+
}
|
|
50
70
|
list() {
|
|
51
71
|
return this.database.prepare(`
|
|
52
72
|
SELECT extension_id, installed_version, artifact_sha256, artifact_path, manifest_json,
|
|
53
73
|
enabled, active, dynamic_plugin_id, dynamic_package_id, profile_package_name, profile_bundle_path,
|
|
54
|
-
execution_model,
|
|
74
|
+
execution_model, artifact_contract_version, native_capabilities_json,
|
|
75
|
+
package_json_sha256, source_sha256, permission_snapshot_json,
|
|
55
76
|
update_channel, installed_at_millis, last_checked_at_millis, last_error
|
|
56
77
|
FROM installed_extensions ORDER BY installed_at_millis DESC, extension_id ASC
|
|
57
78
|
`).all().map((row) => this.fromRow(row));
|
|
@@ -60,7 +81,8 @@ var ArkmeExtensionInstallStore = class {
|
|
|
60
81
|
const row = this.database.prepare(`
|
|
61
82
|
SELECT extension_id, installed_version, artifact_sha256, artifact_path, manifest_json,
|
|
62
83
|
enabled, active, dynamic_plugin_id, dynamic_package_id, profile_package_name, profile_bundle_path,
|
|
63
|
-
execution_model,
|
|
84
|
+
execution_model, artifact_contract_version, native_capabilities_json,
|
|
85
|
+
package_json_sha256, source_sha256, permission_snapshot_json,
|
|
64
86
|
update_channel, installed_at_millis, last_checked_at_millis, last_error
|
|
65
87
|
FROM installed_extensions WHERE extension_id = ?
|
|
66
88
|
`).get(extensionId);
|
|
@@ -71,9 +93,9 @@ var ArkmeExtensionInstallStore = class {
|
|
|
71
93
|
INSERT INTO installed_extensions (
|
|
72
94
|
extension_id, installed_version, artifact_sha256, artifact_path, manifest_json,
|
|
73
95
|
enabled, active, dynamic_plugin_id, dynamic_package_id, profile_package_name, profile_bundle_path,
|
|
74
|
-
execution_model, package_json_sha256, source_sha256,
|
|
96
|
+
execution_model, artifact_contract_version, native_capabilities_json, package_json_sha256, source_sha256,
|
|
75
97
|
permission_snapshot_json, update_channel, installed_at_millis, last_checked_at_millis, last_error
|
|
76
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
98
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
77
99
|
ON CONFLICT(extension_id) DO UPDATE SET
|
|
78
100
|
installed_version = excluded.installed_version,
|
|
79
101
|
artifact_sha256 = excluded.artifact_sha256,
|
|
@@ -86,6 +108,8 @@ var ArkmeExtensionInstallStore = class {
|
|
|
86
108
|
profile_package_name = excluded.profile_package_name,
|
|
87
109
|
profile_bundle_path = excluded.profile_bundle_path,
|
|
88
110
|
execution_model = excluded.execution_model,
|
|
111
|
+
artifact_contract_version = excluded.artifact_contract_version,
|
|
112
|
+
native_capabilities_json = excluded.native_capabilities_json,
|
|
89
113
|
package_json_sha256 = excluded.package_json_sha256,
|
|
90
114
|
source_sha256 = excluded.source_sha256,
|
|
91
115
|
permission_snapshot_json = excluded.permission_snapshot_json,
|
|
@@ -93,7 +117,7 @@ var ArkmeExtensionInstallStore = class {
|
|
|
93
117
|
installed_at_millis = excluded.installed_at_millis,
|
|
94
118
|
last_checked_at_millis = excluded.last_checked_at_millis,
|
|
95
119
|
last_error = excluded.last_error
|
|
96
|
-
`).run(item.extensionId, item.installedVersion, item.artifactSha256, item.artifactPath, JSON.stringify(item.manifest), item.enabled ? 1 : 0, item.active ? 1 : 0, item.dynamicPluginId ?? null, item.dynamicPackageId ?? null, item.profilePackageName ?? null, item.profileBundlePath ?? null, item.executionModel ?? null, item.packageJsonSha256 ?? null, item.sourceSha256 ?? null, JSON.stringify(item.permissionSnapshot), item.updateChannel, item.installedAtMillis, item.lastCheckedAtMillis, item.lastError ?? null);
|
|
120
|
+
`).run(item.extensionId, item.installedVersion, item.artifactSha256, item.artifactPath, JSON.stringify(item.manifest), item.enabled ? 1 : 0, item.active ? 1 : 0, item.dynamicPluginId ?? null, item.dynamicPackageId ?? null, item.profilePackageName ?? null, item.profileBundlePath ?? null, item.executionModel ?? null, item.artifactContractVersion ?? null, JSON.stringify(item.nativeCapabilities ?? []), item.packageJsonSha256 ?? null, item.sourceSha256 ?? null, JSON.stringify(item.permissionSnapshot), item.updateChannel, item.installedAtMillis, item.lastCheckedAtMillis, item.lastError ?? null);
|
|
97
121
|
this.secureFiles();
|
|
98
122
|
}
|
|
99
123
|
remove(extensionId) {
|
|
@@ -118,6 +142,7 @@ var ArkmeExtensionInstallStore = class {
|
|
|
118
142
|
fromRow(row) {
|
|
119
143
|
const manifest = JSON.parse(row.manifest_json);
|
|
120
144
|
const permissionSnapshot = JSON.parse(row.permission_snapshot_json);
|
|
145
|
+
const nativeCapabilities = JSON.parse(row.native_capabilities_json);
|
|
121
146
|
return {
|
|
122
147
|
extensionId: row.extension_id,
|
|
123
148
|
installedVersion: row.installed_version,
|
|
@@ -131,6 +156,8 @@ var ArkmeExtensionInstallStore = class {
|
|
|
131
156
|
...row.profile_package_name === null ? {} : { profilePackageName: row.profile_package_name },
|
|
132
157
|
...row.profile_bundle_path === null ? {} : { profileBundlePath: row.profile_bundle_path },
|
|
133
158
|
...row.execution_model === null ? {} : { executionModel: row.execution_model },
|
|
159
|
+
...row.artifact_contract_version === null ? {} : { artifactContractVersion: row.artifact_contract_version },
|
|
160
|
+
nativeCapabilities: Array.isArray(nativeCapabilities) ? nativeCapabilities.filter((value) => typeof value === "string") : [],
|
|
134
161
|
...row.package_json_sha256 === null ? {} : { packageJsonSha256: row.package_json_sha256 },
|
|
135
162
|
...row.source_sha256 === null ? {} : { sourceSha256: row.source_sha256 },
|
|
136
163
|
permissionSnapshot: Array.isArray(permissionSnapshot) ? permissionSnapshot.filter((value) => typeof value === "string") : [],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as persistentArkmeExtensionActive, i as invokePersistentArkmeExtension, n as applyPersistentArkmeHostExtension, o as persistentArkmeExtensionRuntimeState, r as deactivatePersistentArkmeExtension, t as activatePersistentArkmeExtension } from "./persistent-runtime-
|
|
1
|
+
import { a as persistentArkmeExtensionActive, i as invokePersistentArkmeExtension, n as applyPersistentArkmeHostExtension, o as persistentArkmeExtensionRuntimeState, r as deactivatePersistentArkmeExtension, t as activatePersistentArkmeExtension } from "./persistent-runtime-Cki0XC3L.js";
|
|
2
2
|
export { activatePersistentArkmeExtension, applyPersistentArkmeHostExtension, deactivatePersistentArkmeExtension, invokePersistentArkmeExtension, persistentArkmeExtensionActive, persistentArkmeExtensionRuntimeState };
|