@senguoyun/dsh-arkme 0.1.51 → 0.1.53
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/assets/desktop_call/call-demo-peer.png +0 -0
- package/assets/desktop_call/call-demo-self.png +0 -0
- package/assets/desktop_call/call-demo-utterance-v1.m4a +0 -0
- package/assets/desktop_call/call-demo-utterance-v1.md +14 -0
- package/docs/dsh-input-system-topic.md +26 -0
- package/lib/client.js +17201 -8267
- package/lib/client.js.map +1 -1
- package/lib/extension-profile-restart-helper.js +10 -6
- package/lib/harness-model-client.js +8 -0
- package/lib/harness-onboarding-client.js +73 -0
- package/lib/index.js +164 -58
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-Be8cvpQd.js → persistent-runtime-Bu8Zk87a.js} +698 -434
- package/lib/{plugin-updater-helper-B0yVav4f.js → plugin-updater-helper-n8JrMPum.js} +1 -1
- package/lib/{plugin-updater-helper-BbjKUV9T.js → plugin-updater-helper-y7wzJLOx.js} +11 -4
- package/lib/plugin-updater-helper.js +1 -1
- package/lib/sdk.js +8 -0
- package/lib/types/arkme-service.d.ts +6 -0
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/call-record-presentation.d.ts +2 -0
- package/lib/types/call-record-presentation.d.ts.map +1 -1
- package/lib/types/client/ArkmeBotConversationSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeBotCreateDialog.d.ts.map +1 -1
- package/lib/types/client/ArkmeCallDetailContent.d.ts +14 -0
- package/lib/types/client/ArkmeCallDetailContent.d.ts.map +1 -0
- package/lib/types/client/ArkmeCallDetailDrawer.d.ts +2 -1
- package/lib/types/client/ArkmeCallDetailDrawer.d.ts.map +1 -1
- package/lib/types/client/ArkmeCallRecordContent.d.ts +4 -2
- package/lib/types/client/ArkmeCallRecordContent.d.ts.map +1 -1
- package/lib/types/client/ArkmeCallSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeCallTour.d.ts +22 -0
- package/lib/types/client/ArkmeCallTour.d.ts.map +1 -0
- package/lib/types/client/ArkmeComposerSendButton.d.ts +10 -0
- package/lib/types/client/ArkmeComposerSendButton.d.ts.map +1 -0
- package/lib/types/client/ArkmeConversationBottomControl.d.ts +9 -0
- package/lib/types/client/ArkmeConversationBottomControl.d.ts.map +1 -0
- package/lib/types/client/ArkmeDshAgentInputMarker.d.ts +1 -1
- package/lib/types/client/ArkmeDshAgentInputMarker.d.ts.map +1 -1
- package/lib/types/client/ArkmeEmojiPicker.d.ts +2 -1
- package/lib/types/client/ArkmeEmojiPicker.d.ts.map +1 -1
- package/lib/types/client/ArkmeHomeTour.d.ts +12 -0
- package/lib/types/client/ArkmeHomeTour.d.ts.map +1 -0
- package/lib/types/client/ArkmeLinkText.d.ts +1 -1
- package/lib/types/client/ArkmeLinkText.d.ts.map +1 -1
- package/lib/types/client/ArkmeLogin.d.ts.map +1 -1
- package/lib/types/client/ArkmeMarketplace.d.ts +1 -0
- package/lib/types/client/ArkmeMarketplace.d.ts.map +1 -1
- package/lib/types/client/ArkmeMentionSuggestionRow.d.ts +20 -0
- package/lib/types/client/ArkmeMentionSuggestionRow.d.ts.map +1 -0
- package/lib/types/client/ArkmeMessageActions.d.ts.map +1 -1
- package/lib/types/client/ArkmeNoteDetails.d.ts +6 -2
- package/lib/types/client/ArkmeNoteDetails.d.ts.map +1 -1
- package/lib/types/client/ArkmeOfficialAuthorGuide.d.ts +7 -0
- package/lib/types/client/ArkmeOfficialAuthorGuide.d.ts.map +1 -0
- package/lib/types/client/ArkmePersistentShell.d.ts +1 -1
- package/lib/types/client/ArkmePersistentShell.d.ts.map +1 -1
- package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -1
- package/lib/types/client/ArkmeRecordingSurface.d.ts +6 -4
- package/lib/types/client/ArkmeRecordingSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeRecordingTour.d.ts +18 -0
- package/lib/types/client/ArkmeRecordingTour.d.ts.map +1 -0
- package/lib/types/client/ArkmeRichContent.d.ts +2 -1
- package/lib/types/client/ArkmeRichContent.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichText.d.ts +9 -5
- package/lib/types/client/ArkmeRichText.d.ts.map +1 -1
- package/lib/types/client/ArkmeScanGuide.d.ts +5 -0
- package/lib/types/client/ArkmeScanGuide.d.ts.map +1 -0
- package/lib/types/client/ArkmeSearchSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeSendToSelfTour.d.ts +20 -0
- package/lib/types/client/ArkmeSendToSelfTour.d.ts.map +1 -0
- package/lib/types/client/ArkmeSidebar.d.ts +3 -35
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkmeSourceBreadcrumb.d.ts +2 -1
- package/lib/types/client/ArkmeSourceBreadcrumb.d.ts.map +1 -1
- package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts +2 -1
- package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts.map +1 -1
- package/lib/types/client/ArkmeTopicReadOnlyNotice.d.ts +3 -0
- package/lib/types/client/ArkmeTopicReadOnlyNotice.d.ts.map +1 -0
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts +23 -7
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
- package/lib/types/client/api.d.ts +1 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/arkme-emoji.d.ts.map +1 -1
- package/lib/types/client/arkme-login-locales.d.ts +13 -0
- package/lib/types/client/arkme-login-locales.d.ts.map +1 -1
- package/lib/types/client/call-detail-presentation.d.ts +13 -0
- package/lib/types/client/call-detail-presentation.d.ts.map +1 -0
- package/lib/types/client/call-tour-session.d.ts +9 -0
- package/lib/types/client/call-tour-session.d.ts.map +1 -0
- package/lib/types/client/chat-directory-store.d.ts +6 -0
- package/lib/types/client/chat-directory-store.d.ts.map +1 -1
- package/lib/types/client/composer-draft-store.d.ts +7 -0
- package/lib/types/client/composer-draft-store.d.ts.map +1 -1
- package/lib/types/client/conversation-composer-presentation.d.ts +3 -0
- package/lib/types/client/conversation-composer-presentation.d.ts.map +1 -1
- package/lib/types/client/conversation-resize-anchor.d.ts +6 -4
- package/lib/types/client/conversation-resize-anchor.d.ts.map +1 -1
- package/lib/types/client/conversation-viewport.d.ts +26 -0
- package/lib/types/client/conversation-viewport.d.ts.map +1 -0
- package/lib/types/client/detail-extension-composer-style.d.ts +38 -0
- package/lib/types/client/detail-extension-composer-style.d.ts.map +1 -0
- package/lib/types/client/emoji-recent-store.d.ts +3 -0
- package/lib/types/client/emoji-recent-store.d.ts.map +1 -0
- package/lib/types/client/harness-onboarding-client.d.ts +5 -0
- package/lib/types/client/harness-onboarding-client.d.ts.map +1 -0
- package/lib/types/client/home-tour-diagnostics.d.ts +4 -0
- package/lib/types/client/home-tour-diagnostics.d.ts.map +1 -0
- package/lib/types/client/home-tour-session.d.ts +13 -0
- package/lib/types/client/home-tour-session.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +2 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/mention-candidates.d.ts +46 -0
- package/lib/types/client/mention-candidates.d.ts.map +1 -0
- package/lib/types/client/navigation-cache.d.ts.map +1 -1
- package/lib/types/client/provider-instance-runtime.d.ts.map +1 -1
- package/lib/types/client/read-deadline.d.ts +3 -0
- package/lib/types/client/read-deadline.d.ts.map +1 -0
- package/lib/types/client/realtime-client-events.d.ts.map +1 -1
- package/lib/types/client/realtime-connection.d.ts +9 -0
- package/lib/types/client/realtime-connection.d.ts.map +1 -0
- package/lib/types/client/recording-tour-session.d.ts +9 -0
- package/lib/types/client/recording-tour-session.d.ts.map +1 -0
- package/lib/types/client/recordings/ArkmeRecordingMobileGuideDialog.d.ts +6 -0
- package/lib/types/client/recordings/ArkmeRecordingMobileGuideDialog.d.ts.map +1 -0
- package/lib/types/client/recordings/RecordingTranscriptForward.d.ts.map +1 -1
- package/lib/types/client/recordings/recording-mobile-guide-styles.d.ts +2 -0
- package/lib/types/client/recordings/recording-mobile-guide-styles.d.ts.map +1 -0
- package/lib/types/client/recordings/recording-tour-sample.d.ts +3 -0
- package/lib/types/client/recordings/recording-tour-sample.d.ts.map +1 -0
- package/lib/types/client/scan-guide-icons.d.ts +7 -0
- package/lib/types/client/scan-guide-icons.d.ts.map +1 -0
- package/lib/types/client/scan-guide-styles.d.ts +2 -0
- package/lib/types/client/scan-guide-styles.d.ts.map +1 -0
- package/lib/types/client/send-to-self-tour-session.d.ts +9 -0
- package/lib/types/client/send-to-self-tour-session.d.ts.map +1 -0
- package/lib/types/client/slots-contract.d.ts +23 -0
- package/lib/types/client/slots-contract.d.ts.map +1 -1
- package/lib/types/client/source-tree.d.ts.map +1 -1
- package/lib/types/client/use-call-record-preview.d.ts +8 -0
- package/lib/types/client/use-call-record-preview.d.ts.map +1 -0
- package/lib/types/client/use-call-transcript-playback.d.ts +13 -0
- package/lib/types/client/use-call-transcript-playback.d.ts.map +1 -0
- package/lib/types/client/use-scroll-bottom-visibility.d.ts +7 -0
- package/lib/types/client/use-scroll-bottom-visibility.d.ts.map +1 -0
- package/lib/types/client/use-tour-account.d.ts +5 -0
- package/lib/types/client/use-tour-account.d.ts.map +1 -0
- package/lib/types/dsh-agent-input-source.d.ts +0 -1
- package/lib/types/dsh-agent-input-source.d.ts.map +1 -1
- package/lib/types/emoji-recent.d.ts +8 -0
- package/lib/types/emoji-recent.d.ts.map +1 -0
- package/lib/types/extensions/profile-restart-helper.d.ts.map +1 -1
- package/lib/types/harness-embed-contract.d.ts +1 -0
- package/lib/types/harness-embed-contract.d.ts.map +1 -1
- package/lib/types/harness-embed-route.d.ts +1 -0
- package/lib/types/harness-embed-route.d.ts.map +1 -1
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/local-database.d.ts +5 -1
- package/lib/types/local-database.d.ts.map +1 -1
- package/lib/types/outgoing-call-assets.d.ts.map +1 -1
- package/lib/types/plugin-updater-helper.d.ts.map +1 -1
- package/lib/types/realtime-events.d.ts +9 -5
- package/lib/types/realtime-events.d.ts.map +1 -1
- package/lib/types/sdk/index.d.ts +4 -0
- package/lib/types/sdk/index.d.ts.map +1 -1
- package/lib/types/services/bot-conversation-service.d.ts.map +1 -1
- package/lib/types/services/bot-service.d.ts.map +1 -1
- package/lib/types/services/call-history-service.d.ts +3 -1
- package/lib/types/services/call-history-service.d.ts.map +1 -1
- package/lib/types/services/chat-service.d.ts +1 -0
- package/lib/types/services/chat-service.d.ts.map +1 -1
- package/lib/types/services/media-service.d.ts.map +1 -1
- package/lib/types/services/search-service.d.ts.map +1 -1
- package/lib/types/services/service.d.ts +2 -1
- package/lib/types/services/service.d.ts.map +1 -1
- package/lib/types/services/source-service.d.ts +4 -0
- package/lib/types/services/source-service.d.ts.map +1 -1
- package/lib/types/services/topic-metadata.d.ts +10 -0
- package/lib/types/services/topic-metadata.d.ts.map +1 -0
- package/lib/types/services/topic-record-page.d.ts +18 -0
- package/lib/types/services/topic-record-page.d.ts.map +1 -0
- package/lib/types/tools/business/conversation/index.d.ts.map +1 -1
- package/lib/types/tools/business/conversation/topic-home-visibility.d.ts +2 -0
- package/lib/types/tools/business/conversation/topic-home-visibility.d.ts.map +1 -0
- package/lib/types/tools/business/index.d.ts.map +1 -1
- package/lib/types/tools/ports/bots.d.ts +1 -0
- package/lib/types/tools/ports/bots.d.ts.map +1 -1
- package/lib/types/tools/ports/conversations.d.ts +3 -0
- package/lib/types/tools/ports/conversations.d.ts.map +1 -1
- package/lib/types/tools/registry/registrar.d.ts.map +1 -1
- package/lib/types/topic-policy.d.ts +9 -0
- package/lib/types/topic-policy.d.ts.map +1 -0
- package/lib/types/types.d.ts +23 -2
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -84,6 +84,7 @@ function start(plan) {
|
|
|
84
84
|
async function healthy(plan) {
|
|
85
85
|
const deadline = Date.now() + HEALTH_TIMEOUT_MS;
|
|
86
86
|
while (Date.now() < deadline) {
|
|
87
|
+
let extensionReady = false;
|
|
87
88
|
try {
|
|
88
89
|
const response = await fetch(plan.healthUrl, {
|
|
89
90
|
method: "POST",
|
|
@@ -101,14 +102,17 @@ async function healthy(plan) {
|
|
|
101
102
|
const body = await response.json();
|
|
102
103
|
if (plan.desktopQuarantineActivation === true) {
|
|
103
104
|
const status = body.value;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
extensionReady = body.ok === true && status?.profileEnabled === true && status.active === true;
|
|
106
|
+
} else {
|
|
107
|
+
const installed = Array.isArray(body.value) ? body.value.find((item) => item.extensionId === plan.extensionId) : void 0;
|
|
108
|
+
extensionReady = body.ok === true && (plan.activationChange === true ? plan.expectActive ? installed?.enabled === true && installed.active === true : installed?.enabled === false && installed.active === false : plan.expectActive ? installed?.active === true : installed === void 0);
|
|
107
109
|
}
|
|
108
|
-
const installed = Array.isArray(body.value) ? body.value.find((item) => item.extensionId === plan.extensionId) : void 0;
|
|
109
|
-
if (body.ok === true && (plan.activationChange === true ? plan.expectActive ? installed?.enabled === true && installed.active === true : installed?.enabled === false && installed.active === false : plan.expectActive ? installed?.active === true : installed === void 0)) return true;
|
|
110
110
|
}
|
|
111
111
|
} catch {}
|
|
112
|
+
if (extensionReady) try {
|
|
113
|
+
const root = await fetch(new URL("/", plan.healthUrl), { signal: AbortSignal.timeout(2e3) });
|
|
114
|
+
if (root.ok || root.status === 401 || root.status === 403) return true;
|
|
115
|
+
} catch {}
|
|
112
116
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
113
117
|
}
|
|
114
118
|
return false;
|
|
@@ -220,7 +224,7 @@ async function main() {
|
|
|
220
224
|
if (planPath === void 0) throw new Error("extension restart plan path is required");
|
|
221
225
|
const rawPlan = JSON.parse(await readFile(planPath, "utf8"));
|
|
222
226
|
if (managed && isPluginUpdateRestartPlan(rawPlan)) {
|
|
223
|
-
const pluginUpdate = await import("./plugin-updater-helper-
|
|
227
|
+
const pluginUpdate = await import("./plugin-updater-helper-n8JrMPum.js");
|
|
224
228
|
if (mode === "--managed-finalize") {
|
|
225
229
|
const healthUrl = process.argv[4];
|
|
226
230
|
if (healthUrl === void 0) throw new Error("managed plugin update health URL is required");
|
|
@@ -751,6 +751,14 @@ window.__ModuleLoader__.load({
|
|
|
751
751
|
pinned
|
|
752
752
|
}, signal);
|
|
753
753
|
}
|
|
754
|
+
/** Read or explicitly set the existing topic home preference. */
|
|
755
|
+
async topicHomeVisibility(sourceRef, showInHome, signal) {
|
|
756
|
+
if (sourceRef.trim() === "") throw new TypeError("Arkme topic source reference must not be empty");
|
|
757
|
+
return await this.call("topic.home-visibility", {
|
|
758
|
+
sourceRef,
|
|
759
|
+
...showInHome === void 0 ? {} : { showInHome }
|
|
760
|
+
}, signal);
|
|
761
|
+
}
|
|
754
762
|
async listGroupMembers(sourceRef, signal) {
|
|
755
763
|
if (sourceRef.trim() === "") throw new TypeError("Arkme group source reference must not be empty");
|
|
756
764
|
return await this.call("group.members", {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@senguoyun/dsh-arkme/harness-onboarding",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react = require("react");
|
|
8
|
+
//#region src/client/home-tour-diagnostics.ts
|
|
9
|
+
let sequence = 0;
|
|
10
|
+
/** Structured lifecycle metadata only: never pass profile payloads, input text, or credentials. */
|
|
11
|
+
function homeTourDiagnostic(event, details = {}) {
|
|
12
|
+
try {
|
|
13
|
+
console.info("[ArkmeHomeTour]", JSON.stringify({
|
|
14
|
+
sequence: ++sequence,
|
|
15
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
16
|
+
documentTimeOrigin: typeof performance === "undefined" ? void 0 : performance.timeOrigin,
|
|
17
|
+
inFrame: typeof window === "undefined" ? void 0 : window !== window.top,
|
|
18
|
+
event,
|
|
19
|
+
...details
|
|
20
|
+
}));
|
|
21
|
+
} catch {}
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/client/harness-onboarding-client.tsx
|
|
25
|
+
const inject = ["slots", "sessions"];
|
|
26
|
+
/** Runs in the native iframe. The settings coordinator owns when this step mounts. */
|
|
27
|
+
function apply(ctx) {
|
|
28
|
+
const sessions = ctx.sessions;
|
|
29
|
+
let completed = false;
|
|
30
|
+
let wasActive;
|
|
31
|
+
const publish = () => {
|
|
32
|
+
const snapshot = sessions.list.getSnapshot();
|
|
33
|
+
const active = snapshot.phase === "ready" && (snapshot.current === void 0 || snapshot.byId[snapshot.current]?.blank === true);
|
|
34
|
+
if (active && wasActive === false) completed = false;
|
|
35
|
+
wasActive = active;
|
|
36
|
+
const state = snapshot.phase === "ready" && (!active || completed) ? "ready" : "pending";
|
|
37
|
+
if (document.body.dataset.arkmeHarnessOnboarding !== state) {
|
|
38
|
+
document.body.dataset.arkmeHarnessOnboarding = state;
|
|
39
|
+
homeTourDiagnostic("harness-onboarding-state", {
|
|
40
|
+
state,
|
|
41
|
+
active,
|
|
42
|
+
completed
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
function OnboardingComplete({ complete }) {
|
|
47
|
+
(0, react.useEffect)(() => {
|
|
48
|
+
completed = true;
|
|
49
|
+
publish();
|
|
50
|
+
complete();
|
|
51
|
+
}, [complete]);
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
ctx.effect(() => {
|
|
55
|
+
publish();
|
|
56
|
+
const unsubscribe = sessions.list.subscribe(publish);
|
|
57
|
+
return () => {
|
|
58
|
+
unsubscribe();
|
|
59
|
+
delete document.body.dataset.arkmeHarnessOnboarding;
|
|
60
|
+
};
|
|
61
|
+
}, "arkme: native onboarding readiness");
|
|
62
|
+
ctx.slots.inject("settings.onboarding", () => ctx.slots.register({
|
|
63
|
+
name: "settings.onboarding",
|
|
64
|
+
id: "arkme-home-ready",
|
|
65
|
+
order: Number.MAX_SAFE_INTEGER
|
|
66
|
+
}, OnboardingComplete));
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
exports.apply = apply;
|
|
70
|
+
exports.inject = inject;
|
|
71
|
+
return module.exports;
|
|
72
|
+
}
|
|
73
|
+
});
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ARKME_DEFAULT_SHARE_WEBSITE, A as inspectNativeBundleArtifactV3, At as
|
|
2
|
-
import { _ as parsePluginUpdateManifest, b as validatePluginUpdateServiceOrigin, d as writePluginUpdateLifecycleLog, f as PluginUpdateInstallStateStore, g as existingCachedPluginArtifactPath, h as downloadAndCachePluginArtifact, m as PluginUpdateArtifactError, n as buildTargetInstallArgs, o as reconcilePluginUpdaterProfilePolicy, p as ARKME_PLUGIN_PACKAGE_NAME$1, t as assertTargetArtifactIntegrity, u as detachManagedProfilePluginLink, v as pluginUpdateEndpointUrl, y as validatePluginUpdateArtifactOrigin } from "./plugin-updater-helper-
|
|
1
|
+
import { $ as ARKME_DEFAULT_SHARE_WEBSITE, A as inspectNativeBundleArtifactV3, At as __commonJSMin, D as bundleSha256, Dt as ArkmePluginError, E as arkmeSandboxEntryId, Et as normalizeRecentEmojiIds, F as assertExtensionArtifactSize, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeRequiredLinkMetadataFallback, K as arkmeExtensionShareRefFromLink, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, Mt as __exportAll, N as readNativeBundleTarballV3, Nt as __require, O as canonicalBundleJson, Ot as retryAfterMillis, P as renderArkmeSandboxHostEntry, Pt as __toCommonJS, Q as parseArkmeRecordReeditAttachments, R as unpackArkmeExtension, S as ARKME_BUNDLE_ARTIFACT_KIND, St as sameRecordingImportIdentity, T as ArkmeBundleArtifactError, Tt as isRecentEmojiId, U as ARKME_EXTENSION_RUNTIME_UNAVAILABLE_MESSAGE, W as ArkmeService, X as arkmeRichBackgroundSound, Y as arkmeFileBackgroundSound, Z as ArkmeRecordReeditDraftConflict, _ as arkmeClientContentDigest, _t as SecretValue, at as ARKME_WORLD_PUBLISH_MAX_IMAGE_BYTES, b as verifyExtensionResolutionSignature, bt as isUnresolvedRecordingImportJob, c as persistentExtensionBundleDirectory, ct as mergeMemberJoinEvents, d as readPersistentExtensionActivation, dt as ARKME_TOOL_FILE_MAX_BYTES, et as ARKME_PROVIDER_CONTRACT_VERSION, f as refreshPersistentClientWrapper, ft as arkmeCanInlineLocalFile, g as activeProfileExtensionOwnerConflicts, gt as ArkmeOutgoingCallError, h as renderArkmeBundleClientBundle, ht as isArkmeBotAvatarRef, i as invokePersistentArkmeExtension, it as ARKME_WORLD_PUBLISH_MAX_IMAGES, j as packBundleFiles, jt as __esmMin, k as inspectBundleArtifact, kt as createDesktopLifecycleReader, l as persistentExtensionPackageIdentity, lt as validateMemberUpdate, m as writePersistentExtensionActivation, mt as arkmePickedFileKind, o as persistentArkmeExtensionRuntimeState, ot as applyMemberUpdate, p as repairPersistentExtensionInstallation, pt as arkmeNormalizedFileMimeType, q as arkmeIsGenericLinkMetadataTitle, r as deactivatePersistentArkmeExtension, s as materializePersistentExtensionBundle, st as cachedMemberItem, t as activatePersistentArkmeExtension, u as quarantinePersistentExtension, ut as ARKME_RUNTIME_INSTANCE_ID, v as arkmeClientContentDigestFromSource, vt as ArkmeDirectMessageAdmissionError, w as ARKME_NATIVE_BUNDLE_ARTIFACT_KIND, wt as recordingImportFileNameKey, x as verifyNativeBundleResolutionSignature, xt as recordingImportFileKind, y as verifyBundleResolutionSignature, yt as isRecordingInstantOnOrAfterUnixEpoch, z as ARKME_EXTENSION_FORMAT } from "./persistent-runtime-Bu8Zk87a.js";
|
|
2
|
+
import { _ as parsePluginUpdateManifest, b as validatePluginUpdateServiceOrigin, d as writePluginUpdateLifecycleLog, f as PluginUpdateInstallStateStore, g as existingCachedPluginArtifactPath, h as downloadAndCachePluginArtifact, m as PluginUpdateArtifactError, n as buildTargetInstallArgs, o as reconcilePluginUpdaterProfilePolicy, p as ARKME_PLUGIN_PACKAGE_NAME$1, t as assertTargetArtifactIntegrity, u as detachManagedProfilePluginLink, v as pluginUpdateEndpointUrl, y as validatePluginUpdateArtifactOrigin } from "./plugin-updater-helper-y7wzJLOx.js";
|
|
3
3
|
import { a as securePrivateDirectory, c as securePrivateFileSync, i as prepareProfilePackageManager, n as isArkmeProfilePackageName, o as securePrivateDirectorySync, r as localExtensionPnpmArgs, s as securePrivateFile, t as applyArkmeProfileBundlePolicy } from "./profile-bundle-policy-DLXDyohJ.js";
|
|
4
4
|
import { i as invokeArkmeBundle, n as arkmeBundleActive, r as deactivateArkmeBundle } from "./bundle-runtime-CE73h3vS.js";
|
|
5
5
|
import { t as ArkmeExtensionInstallStore } from "./install-store-bnyQDtYt.js";
|
|
@@ -31,9 +31,9 @@ import { getOrCreateAnonymousUserId } from "@deepseek-ai/dsh-anonymous-user-id";
|
|
|
31
31
|
import { EMPTY_RESPONSE_CODE, LlmAdapter, LlmError, ProviderRequestId, ReasoningEffortId, attributionHeaders, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
32
32
|
import { DeepSeekAdapter, resolveAdapterOptions } from "@deepseek-ai/dsh-llm-deepseek";
|
|
33
33
|
import sharp from "sharp";
|
|
34
|
+
import WebSocket$1, { WebSocket, WebSocketServer } from "ws";
|
|
34
35
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
35
36
|
import { AttachmentError, AttachmentId } from "@deepseek-ai/dsh-attachment";
|
|
36
|
-
import WebSocket from "ws";
|
|
37
37
|
import { scheduler, setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
38
38
|
//#region src/tools/shared/output.ts
|
|
39
39
|
const TEXT_OUTPUT$3 = {
|
|
@@ -108,6 +108,7 @@ const ARKME_HARNESS_EMBED_PATH = "/arkme-self/harness-frame";
|
|
|
108
108
|
const HARNESS_SESSION_CLIENT_ID = "@senguoyun/dsh-arkme/harness-session";
|
|
109
109
|
const HARNESS_SESSION_CLIENT_PATH = "/arkme-self/harness-session-client.js";
|
|
110
110
|
const ARKME_HARNESS_MODEL_CLIENT_PATH = "/arkme-self/harness-model-client.js";
|
|
111
|
+
const ARKME_HARNESS_ONBOARDING_CLIENT_PATH = "/arkme-self/harness-onboarding-client.js";
|
|
111
112
|
//#endregion
|
|
112
113
|
//#region src/plugin-update-policy.ts
|
|
113
114
|
const PLUGIN_UPDATE_TERMINAL_STATE_TTL_MS = 10 * 6e4;
|
|
@@ -11453,6 +11454,7 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
11453
11454
|
return await service.createBotSummary({
|
|
11454
11455
|
name: stringParam(params, "name"),
|
|
11455
11456
|
provider: botProviderParam(params),
|
|
11457
|
+
...stringParam(params, "requestUid").trim() === "" ? {} : { requestUid: stringParam(params, "requestUid").trim() },
|
|
11456
11458
|
...stringParam(params, "description").trim() === "" ? {} : { description: stringParam(params, "description") },
|
|
11457
11459
|
...avatar === "" ? {} : { avatar }
|
|
11458
11460
|
});
|
|
@@ -11700,6 +11702,9 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
11700
11702
|
...requestSignal === void 0 ? {} : { signal: requestSignal }
|
|
11701
11703
|
});
|
|
11702
11704
|
case "topic.rename": return await service.renameTopic(stringParam(params, "sourceRef"), stringParam(params, "title"));
|
|
11705
|
+
case "topic.home-visibility":
|
|
11706
|
+
if (params.showInHome !== void 0 && typeof params.showInHome !== "boolean") throw new ArkmePluginError("topic-policy-invalid", "首页展示开关必须为布尔值", false);
|
|
11707
|
+
return await service.topicHomeVisibility(stringParam(params, "sourceRef"), params.showInHome, requestSignal);
|
|
11703
11708
|
case "topic.dissolve": return await service.dissolveTopic(stringParam(params, "sourceRef"), stringParam(params, "parentSourceRef") || void 0, stringListParam(params, "childSourceRefs"), stringParam(params, "requestId") || void 0, numberParam(params, "expectedRecordCount", 0));
|
|
11704
11709
|
case "topic.dissolve.status": return await service.topicDissolveStatus(stringParam(params, "requestId")) ?? null;
|
|
11705
11710
|
case "topic.dissolve.active": return await service.activeTopicDissolve() ?? null;
|
|
@@ -11722,7 +11727,8 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
11722
11727
|
const cursor = timelineCursorParam(params);
|
|
11723
11728
|
return await service.readSource(stringParam(params, "sourceRef"), {
|
|
11724
11729
|
limit: numberParam(params, "limit", 30),
|
|
11725
|
-
...cursor === void 0 ? {} : { cursor }
|
|
11730
|
+
...cursor === void 0 ? {} : { cursor },
|
|
11731
|
+
...requestSignal === void 0 ? {} : { signal: requestSignal }
|
|
11726
11732
|
});
|
|
11727
11733
|
}
|
|
11728
11734
|
case "source.timeline-around": return await service.readSourceAround(stringParam(params, "sourceRef"), stringParam(params, "itemUid"), numberParam(params, "recordOwnerUserId", 0), {
|
|
@@ -11958,6 +11964,8 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
11958
11964
|
...expectedUserId === void 0 ? {} : { expectedUserId }
|
|
11959
11965
|
});
|
|
11960
11966
|
}
|
|
11967
|
+
case "emoji.recent.list": return await service.recentEmojiIds(stringParam(params, "accountKey"), requestSignal);
|
|
11968
|
+
case "emoji.recent.record": return await service.recordRecentEmoji(stringParam(params, "accountKey"), stringParam(params, "emojiId"), requestSignal);
|
|
11961
11969
|
case "favorite-stickers.list": return await service.favoriteStickers();
|
|
11962
11970
|
case "favorite-stickers.add": return await service.addFavoriteSticker(favoriteStickerItemParam(params));
|
|
11963
11971
|
case "favorite-stickers.send": return await service.sendFavoriteSticker(stringParam(params, "sourceRef"), stringParam(params, "fileAssetUid"), {
|
|
@@ -12422,6 +12430,20 @@ function createHarnessEmbedRouteHandler(options) {
|
|
|
12422
12430
|
try {
|
|
12423
12431
|
const fullGraph = options.getGraph();
|
|
12424
12432
|
const projectedGraph = projectHarnessBootGraph(fullGraph, options.installedPackageNames(), options.modelClient);
|
|
12433
|
+
if (options.onboardingClient !== void 0) {
|
|
12434
|
+
const entry = {
|
|
12435
|
+
...options.onboardingClient,
|
|
12436
|
+
inject: [...requiredBootPackages(projectedGraph.entries), ...projectedGraph.entries.filter((item) => item.id.startsWith("@deepseek-ai/dsh-client-ui-settings")).map((item) => item.id)]
|
|
12437
|
+
};
|
|
12438
|
+
projectedGraph.entries.push(entry);
|
|
12439
|
+
projectedGraph.batches?.push({
|
|
12440
|
+
phase: "application",
|
|
12441
|
+
url: entry.url,
|
|
12442
|
+
rev: entry.rev,
|
|
12443
|
+
entries: [entry.id]
|
|
12444
|
+
});
|
|
12445
|
+
projectedGraph.rev = shortHash(`${projectedGraph.rev}:${entry.rev}`);
|
|
12446
|
+
}
|
|
12425
12447
|
if (options.sessionClient !== void 0) {
|
|
12426
12448
|
const rev = options.sessionClient.revision;
|
|
12427
12449
|
projectedGraph.entries.push({
|
|
@@ -12572,6 +12594,10 @@ const ASSETS = {
|
|
|
12572
12594
|
contentType: "image/png",
|
|
12573
12595
|
cacheControl: "public, max-age=31536000, immutable"
|
|
12574
12596
|
},
|
|
12597
|
+
"call-demo-utterance-v1.m4a": {
|
|
12598
|
+
contentType: "audio/mp4",
|
|
12599
|
+
cacheControl: "public, max-age=31536000, immutable"
|
|
12600
|
+
},
|
|
12575
12601
|
"manifest.json": {
|
|
12576
12602
|
contentType: "application/json; charset=utf-8",
|
|
12577
12603
|
cacheControl: "no-store"
|
|
@@ -15453,6 +15479,9 @@ var ArkmeLocalDatabase = class {
|
|
|
15453
15479
|
PRAGMA journal_mode = WAL;
|
|
15454
15480
|
PRAGMA synchronous = NORMAL;
|
|
15455
15481
|
PRAGMA foreign_keys = ON;
|
|
15482
|
+
CREATE TABLE IF NOT EXISTS recent_emoji (
|
|
15483
|
+
account_key TEXT PRIMARY KEY, emoji_ids TEXT NOT NULL
|
|
15484
|
+
);
|
|
15456
15485
|
CREATE TABLE IF NOT EXISTS conversation_directory (
|
|
15457
15486
|
user_id INTEGER NOT NULL, identity TEXT NOT NULL, payload TEXT NOT NULL,
|
|
15458
15487
|
visibility TEXT, PRIMARY KEY(user_id, identity)
|
|
@@ -16106,12 +16135,34 @@ var ArkmeLocalDatabase = class {
|
|
|
16106
16135
|
throw error;
|
|
16107
16136
|
}
|
|
16108
16137
|
}
|
|
16138
|
+
readRecentEmojiIds(accountKey) {
|
|
16139
|
+
const row = this.database.prepare("SELECT emoji_ids FROM recent_emoji WHERE account_key=?").get(accountKey);
|
|
16140
|
+
if (!row) return [];
|
|
16141
|
+
try {
|
|
16142
|
+
return normalizeRecentEmojiIds(JSON.parse(row.emoji_ids));
|
|
16143
|
+
} catch {
|
|
16144
|
+
return [];
|
|
16145
|
+
}
|
|
16146
|
+
}
|
|
16147
|
+
async recentEmojiIds(accountKey) {
|
|
16148
|
+
return this.readRecentEmojiIds(accountKey);
|
|
16149
|
+
}
|
|
16150
|
+
async recordRecentEmoji(accountKey, emojiId) {
|
|
16151
|
+
if (!isRecentEmojiId(emojiId)) throw new Error("Invalid recent emoji");
|
|
16152
|
+
let ids = [];
|
|
16153
|
+
this.transaction(() => {
|
|
16154
|
+
ids = normalizeRecentEmojiIds([emojiId, ...this.readRecentEmojiIds(accountKey)]);
|
|
16155
|
+
this.database.prepare(`INSERT INTO recent_emoji (account_key, emoji_ids) VALUES (?, ?)
|
|
16156
|
+
ON CONFLICT(account_key) DO UPDATE SET emoji_ids=excluded.emoji_ids`).run(accountKey, JSON.stringify(ids));
|
|
16157
|
+
});
|
|
16158
|
+
return ids;
|
|
16159
|
+
}
|
|
16109
16160
|
transaction(work) {
|
|
16110
16161
|
this.database.exec("BEGIN IMMEDIATE");
|
|
16111
16162
|
try {
|
|
16112
16163
|
work();
|
|
16113
|
-
this.database.exec("COMMIT");
|
|
16114
16164
|
this.secureDatabaseFiles();
|
|
16165
|
+
this.database.exec("COMMIT");
|
|
16115
16166
|
} catch (error) {
|
|
16116
16167
|
this.database.exec("ROLLBACK");
|
|
16117
16168
|
throw error;
|
|
@@ -17747,80 +17798,84 @@ const HEARTBEAT_MS = 2e4;
|
|
|
17747
17798
|
function isLoopback$2(address) {
|
|
17748
17799
|
return address === "127.0.0.1" || address === "::1" || address === "::ffff:127.0.0.1";
|
|
17749
17800
|
}
|
|
17750
|
-
function
|
|
17751
|
-
return
|
|
17801
|
+
function eventFrame(event) {
|
|
17802
|
+
return JSON.stringify({
|
|
17752
17803
|
...event,
|
|
17753
17804
|
providerInstanceId: ARKME_RUNTIME_INSTANCE_ID
|
|
17754
|
-
})
|
|
17805
|
+
});
|
|
17755
17806
|
}
|
|
17807
|
+
/** Host-owned, receive-only event transport; no business commands or credentials. */
|
|
17756
17808
|
var ArkmeRealtimeEvents = class {
|
|
17809
|
+
service;
|
|
17757
17810
|
options;
|
|
17758
|
-
|
|
17811
|
+
server = new WebSocketServer({
|
|
17812
|
+
noServer: true,
|
|
17813
|
+
maxPayload: 1024,
|
|
17814
|
+
perMessageDeflate: false
|
|
17815
|
+
});
|
|
17816
|
+
awaitingPong = /* @__PURE__ */ new Set();
|
|
17759
17817
|
unsubscribe;
|
|
17760
17818
|
heartbeat;
|
|
17819
|
+
closed = false;
|
|
17761
17820
|
constructor(service, options) {
|
|
17821
|
+
this.service = service;
|
|
17762
17822
|
this.options = options;
|
|
17763
17823
|
this.unsubscribe = service.subscribeChatRealtime((event) => {
|
|
17764
|
-
|
|
17824
|
+
const frame = eventFrame(event);
|
|
17825
|
+
for (const client of this.server.clients) if (client.readyState === WebSocket.OPEN) client.send(frame);
|
|
17765
17826
|
});
|
|
17766
17827
|
this.heartbeat = setInterval(() => {
|
|
17767
|
-
this.
|
|
17828
|
+
for (const client of this.server.clients) {
|
|
17829
|
+
if (this.awaitingPong.has(client)) {
|
|
17830
|
+
client.terminate();
|
|
17831
|
+
continue;
|
|
17832
|
+
}
|
|
17833
|
+
this.awaitingPong.add(client);
|
|
17834
|
+
client.ping();
|
|
17835
|
+
}
|
|
17768
17836
|
}, HEARTBEAT_MS);
|
|
17769
17837
|
this.heartbeat.unref();
|
|
17770
|
-
this.service = service;
|
|
17771
17838
|
}
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
res.writeHead(405);
|
|
17776
|
-
res.end();
|
|
17777
|
-
return;
|
|
17778
|
-
}
|
|
17779
|
-
if (!this.options.allowNonLoopback && !isLoopback$2(req.socket.remoteAddress)) {
|
|
17780
|
-
res.writeHead(403);
|
|
17781
|
-
res.end();
|
|
17782
|
-
return;
|
|
17783
|
-
}
|
|
17784
|
-
const origin = req.headers.origin;
|
|
17785
|
-
if (origin !== void 0) try {
|
|
17786
|
-
const parsed = new URL(origin);
|
|
17787
|
-
const port = parsed.port === "" ? parsed.protocol === "https:" ? 443 : 80 : Number(parsed.port);
|
|
17788
|
-
if (!["127.0.0.1", "localhost"].includes(parsed.hostname) || port !== this.options.expectedPort) {
|
|
17789
|
-
res.writeHead(403);
|
|
17790
|
-
res.end();
|
|
17791
|
-
return;
|
|
17792
|
-
}
|
|
17793
|
-
} catch {
|
|
17794
|
-
res.writeHead(403);
|
|
17795
|
-
res.end();
|
|
17839
|
+
handler = (req, socket, head) => {
|
|
17840
|
+
if (req.method !== "GET" || !this.allowed(req)) {
|
|
17841
|
+
socket.end("HTTP/1.1 403 Forbidden\r\nConnection: close\r\n\r\n");
|
|
17796
17842
|
return;
|
|
17797
17843
|
}
|
|
17798
|
-
|
|
17799
|
-
"
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
"
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17844
|
+
this.server.handleUpgrade(req, socket, head, (client) => {
|
|
17845
|
+
client.on("error", () => {
|
|
17846
|
+
client.terminate();
|
|
17847
|
+
});
|
|
17848
|
+
client.on("pong", () => {
|
|
17849
|
+
this.awaitingPong.delete(client);
|
|
17850
|
+
});
|
|
17851
|
+
client.on("close", () => {
|
|
17852
|
+
this.awaitingPong.delete(client);
|
|
17853
|
+
});
|
|
17854
|
+
client.on("message", () => {
|
|
17855
|
+
client.close(1008, "Receive-only channel");
|
|
17856
|
+
});
|
|
17857
|
+
client.send(eventFrame(this.service.chatRealtimeInitialEvent()));
|
|
17810
17858
|
});
|
|
17811
17859
|
};
|
|
17812
17860
|
close() {
|
|
17861
|
+
if (this.closed) return;
|
|
17862
|
+
this.closed = true;
|
|
17813
17863
|
this.unsubscribe();
|
|
17814
17864
|
clearInterval(this.heartbeat);
|
|
17815
|
-
for (const
|
|
17816
|
-
this.
|
|
17865
|
+
for (const client of this.server.clients) client.terminate();
|
|
17866
|
+
this.awaitingPong.clear();
|
|
17867
|
+
this.server.close();
|
|
17817
17868
|
}
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17869
|
+
allowed(req) {
|
|
17870
|
+
if (!this.options.allowNonLoopback && !isLoopback$2(req.socket.remoteAddress)) return false;
|
|
17871
|
+
const origin = req.headers.origin;
|
|
17872
|
+
if (origin === void 0) return true;
|
|
17873
|
+
try {
|
|
17874
|
+
const parsed = new URL(origin);
|
|
17875
|
+
const port = parsed.port === "" ? parsed.protocol === "https:" ? 443 : 80 : Number(parsed.port);
|
|
17876
|
+
return ["http:", "https:"].includes(parsed.protocol) && ["127.0.0.1", "localhost"].includes(parsed.hostname) && port === this.options.expectedPort;
|
|
17821
17877
|
} catch {
|
|
17822
|
-
|
|
17823
|
-
this.connections.delete(response);
|
|
17878
|
+
return false;
|
|
17824
17879
|
}
|
|
17825
17880
|
}
|
|
17826
17881
|
};
|
|
@@ -25442,6 +25497,36 @@ const pinBotDirectoryToolModule = defineArkmeCoreToolModule({
|
|
|
25442
25497
|
}
|
|
25443
25498
|
});
|
|
25444
25499
|
//#endregion
|
|
25500
|
+
//#region src/tools/business/conversation/topic-home-visibility.ts
|
|
25501
|
+
const topicHomeVisibilityToolModule = defineArkmeCoreToolModule({
|
|
25502
|
+
meta: {
|
|
25503
|
+
id: "business.conversation.topic-home-visibility.v1",
|
|
25504
|
+
toolName: "arkme_topic_home_visibility",
|
|
25505
|
+
kind: "business",
|
|
25506
|
+
phase: "core",
|
|
25507
|
+
effect: "write",
|
|
25508
|
+
grant: "explicit-user-write",
|
|
25509
|
+
profiles: ["business", "hybrid"]
|
|
25510
|
+
},
|
|
25511
|
+
create: (ports) => defineTool({
|
|
25512
|
+
name: "arkme_topic_home_visibility",
|
|
25513
|
+
description: "Read a topic home visibility preference. Only set show_in_home after an explicit user request. This never changes topic contents, name, privacy or the origin of any message.",
|
|
25514
|
+
parameters: {
|
|
25515
|
+
source_ref: {
|
|
25516
|
+
type: "string",
|
|
25517
|
+
required: true,
|
|
25518
|
+
description: "Account-bound topic source_ref from arkme_sources_list."
|
|
25519
|
+
},
|
|
25520
|
+
show_in_home: {
|
|
25521
|
+
type: "boolean",
|
|
25522
|
+
description: "Omit to read; true to show topic records on home, false to hide."
|
|
25523
|
+
}
|
|
25524
|
+
},
|
|
25525
|
+
output: TEXT_OUTPUT$3,
|
|
25526
|
+
execute: async (args) => taggedJSON("主题首页展示", await ports.topicHomeVisibility(args.source_ref, args.show_in_home))
|
|
25527
|
+
})
|
|
25528
|
+
});
|
|
25529
|
+
//#endregion
|
|
25445
25530
|
//#region src/tools/business/conversation/group-ai-polish.ts
|
|
25446
25531
|
const groupAiPolishToolModule = defineArkmeCoreToolModule({
|
|
25447
25532
|
meta: {
|
|
@@ -29234,6 +29319,7 @@ const businessToolModules = [
|
|
|
29234
29319
|
...wechatToolModules,
|
|
29235
29320
|
listSourcesToolModule,
|
|
29236
29321
|
pinBotDirectoryToolModule,
|
|
29322
|
+
topicHomeVisibilityToolModule,
|
|
29237
29323
|
unreadConversationsToolModule,
|
|
29238
29324
|
...groupMemberToolModules,
|
|
29239
29325
|
readSourceToolModule,
|
|
@@ -29400,6 +29486,7 @@ const arkmeToolCatalog = defineArkmeToolCatalog([
|
|
|
29400
29486
|
const CORE_CONFIRMATION_TOOLS = /* @__PURE__ */ new Set([
|
|
29401
29487
|
"arkme_bot_conversation_pin",
|
|
29402
29488
|
"arkme_direct_message_refusal_set",
|
|
29489
|
+
"arkme_topic_home_visibility",
|
|
29403
29490
|
"arkme_background_sound_disable",
|
|
29404
29491
|
"arkme_file_prepare",
|
|
29405
29492
|
"arkme_files_send",
|
|
@@ -29445,6 +29532,7 @@ function cleanArgument(value, maxLength) {
|
|
|
29445
29532
|
function coreConfirmationQuestion(name, args) {
|
|
29446
29533
|
if (name === "arkme_direct_message_refusal_set") return args.refused === true ? "是否确认拒收这个私聊用户的消息?拒收期间双方都无法发送新消息,历史记录保留。" : "是否确认解除你对这个私聊用户的拒收?如果对方仍拒收,双方依然无法发送新消息。";
|
|
29447
29534
|
if (name === "arkme_recording_import") return args.action === "retry" ? "是否确认重试这条失败的录音上传任务?" : `是否确认按指定的开始时间导入所选录音,并将归属设为“${args.ownership === "other" ? "其他" : "自己"}”?`;
|
|
29535
|
+
if (name === "arkme_topic_home_visibility") return args.show_in_home === true ? "是否确认将这个主题的快记展示在首页?" : "是否确认在首页隐藏这个主题的快记?主题与快记不会被删除。";
|
|
29448
29536
|
if (name === "arkme_background_sound_disable") return "是否确认关闭当前 Arkme 账号的文字背景音?这不会删除已经发送的背景音。";
|
|
29449
29537
|
if (name === "arkme_user_ban") return "是否确认封禁这个私聊用户?确认后将无法重新登录;Backend、聊天和录音请求立即受限;其他仅离线验 JWT 的服务中,旧 Access Token 最迟约 1 小时失效。";
|
|
29450
29538
|
if (name === "arkme_user_unban") return "是否确认解封这个私聊用户?确认后该用户可重新登录并恢复操作。";
|
|
@@ -29495,6 +29583,7 @@ function withCoreConversationalConfirmation(definition, conversation) {
|
|
|
29495
29583
|
const violations = validateJsonSchemaValue(definition.parameters, args, "");
|
|
29496
29584
|
if (violations.length > 0) throw new ToolArgsError(violations);
|
|
29497
29585
|
if (definition.name === "arkme_recording_import" && typeof args === "object" && args !== null && "action" in args && args.action === "status") return await definition.execute(args, exec);
|
|
29586
|
+
if (definition.name === "arkme_topic_home_visibility" && args.show_in_home === void 0) return await definition.execute(args, exec);
|
|
29498
29587
|
if (exec.agent === void 0) throw new Error("该 Arkme 操作必须在一个真实 DSH Agent 会话中执行");
|
|
29499
29588
|
const hooks = arkmeConfirmationContextHooks(definition);
|
|
29500
29589
|
const request = hooks?.confirmationRequest?.(args);
|
|
@@ -31141,7 +31230,7 @@ function createDefaultDshRemoteSocket(input) {
|
|
|
31141
31230
|
if (accessToken === "") throw new TypeError("DSH remote Realtime access token is required");
|
|
31142
31231
|
if (input.signal.aborted) throw input.signal.reason;
|
|
31143
31232
|
const diagnosticRequestId = randomUUID();
|
|
31144
|
-
const socket = new WebSocket(dshRemoteRealtimeEndpoint(input.realtimeBaseUrl), {
|
|
31233
|
+
const socket = new WebSocket$1(dshRemoteRealtimeEndpoint(input.realtimeBaseUrl), {
|
|
31145
31234
|
headers: {
|
|
31146
31235
|
Authorization: `Bearer ${accessToken}`,
|
|
31147
31236
|
"X-Request-ID": diagnosticRequestId
|
|
@@ -36202,7 +36291,25 @@ function apply(ctx, config) {
|
|
|
36202
36291
|
}
|
|
36203
36292
|
}), "arkme: Harness session observer asset");
|
|
36204
36293
|
const harnessModelClient = readFileSync(new URL("../lib/harness-model-client.js", import.meta.url));
|
|
36294
|
+
const harnessOnboardingClient = readFileSync(new URL("../lib/harness-onboarding-client.js", import.meta.url));
|
|
36295
|
+
ctx.effect(() => ctx.webServer.register({
|
|
36296
|
+
kind: "exact",
|
|
36297
|
+
path: ARKME_HARNESS_ONBOARDING_CLIENT_PATH,
|
|
36298
|
+
handler: (_request, response) => {
|
|
36299
|
+
response.writeHead(200, {
|
|
36300
|
+
"Content-Type": "application/javascript",
|
|
36301
|
+
"Cache-Control": "no-cache"
|
|
36302
|
+
});
|
|
36303
|
+
response.end(harnessOnboardingClient);
|
|
36304
|
+
}
|
|
36305
|
+
}), "arkme: Harness onboarding bridge asset");
|
|
36205
36306
|
const harnessEmbedHandler = createHarnessEmbedRouteHandler({
|
|
36307
|
+
onboardingClient: {
|
|
36308
|
+
id: "@senguoyun/dsh-arkme/harness-onboarding",
|
|
36309
|
+
url: ARKME_HARNESS_ONBOARDING_CLIENT_PATH,
|
|
36310
|
+
rev: createHash("sha256").update(harnessOnboardingClient).digest("hex"),
|
|
36311
|
+
external: ["react"]
|
|
36312
|
+
},
|
|
36206
36313
|
...sessionClient === void 0 ? {} : { sessionClient: {
|
|
36207
36314
|
revision: createHash("sha256").update(sessionClient.source).digest("hex").slice(0, 12),
|
|
36208
36315
|
apiPath: sessionClient.apiPath
|
|
@@ -36340,8 +36447,7 @@ function apply(ctx, config) {
|
|
|
36340
36447
|
handler: extensionPreviewReadHandler
|
|
36341
36448
|
}), "dsh-arkme: extension preview read route");
|
|
36342
36449
|
ctx.effect(() => {
|
|
36343
|
-
const disposeRoute = ctx.webServer.
|
|
36344
|
-
kind: "exact",
|
|
36450
|
+
const disposeRoute = ctx.webServer.registerUpgrade({
|
|
36345
36451
|
path: `${config.routePath}/events`,
|
|
36346
36452
|
handler: realtimeEvents.handler
|
|
36347
36453
|
});
|
|
@@ -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-Bu8Zk87a.js";
|
|
2
2
|
export { activatePersistentArkmeExtension, applyPersistentArkmeHostExtension, deactivatePersistentArkmeExtension, invokePersistentArkmeExtension, persistentArkmeExtensionActive, persistentArkmeExtensionRuntimeState };
|