@senguoyun/dsh-arkme 0.1.56 → 0.1.58

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.
Files changed (63) hide show
  1. package/docs/harness-activity.md +18 -0
  2. package/docs/harness-quick-create.md +13 -0
  3. package/docs/harness-session-dropdown.md +65 -0
  4. package/docs/harness-sidebar-settings.md +9 -0
  5. package/docs/harness-trajectory-navigation.md +28 -0
  6. package/lib/client.js +972 -239
  7. package/lib/client.js.map +1 -1
  8. package/lib/harness-sidebar-client.js +840 -0
  9. package/lib/harness-trajectory-client.js +254 -0
  10. package/lib/index.js +70 -3
  11. package/lib/persistent-extension.js +1 -1
  12. package/lib/{persistent-runtime-Bsk6in2a.js → persistent-runtime-BnDj8qcY.js} +194 -15
  13. package/lib/types/client/ArkmePersistentShell.d.ts.map +1 -1
  14. package/lib/types/client/ArkmeQuickAdd.d.ts +5 -2
  15. package/lib/types/client/ArkmeQuickAdd.d.ts.map +1 -1
  16. package/lib/types/client/ArkmeSidebar.d.ts +6 -1
  17. package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
  18. package/lib/types/client/ArkmeSourceBreadcrumb.d.ts +9 -2
  19. package/lib/types/client/ArkmeSourceBreadcrumb.d.ts.map +1 -1
  20. package/lib/types/client/ArkmeVirtualWorkspace.d.ts +3 -1
  21. package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
  22. package/lib/types/client/DeepSeekHarnessSurface.d.ts +2 -1
  23. package/lib/types/client/DeepSeekHarnessSurface.d.ts.map +1 -1
  24. package/lib/types/client/frame-menu-dismissal.d.ts +3 -0
  25. package/lib/types/client/frame-menu-dismissal.d.ts.map +1 -0
  26. package/lib/types/client/harness-activity-reporter.d.ts +4 -0
  27. package/lib/types/client/harness-activity-reporter.d.ts.map +1 -0
  28. package/lib/types/client/harness-activity.d.ts +49 -0
  29. package/lib/types/client/harness-activity.d.ts.map +1 -0
  30. package/lib/types/client/harness-new-session.d.ts +3 -0
  31. package/lib/types/client/harness-new-session.d.ts.map +1 -0
  32. package/lib/types/client/harness-session-dropdown.d.ts +9 -0
  33. package/lib/types/client/harness-session-dropdown.d.ts.map +1 -0
  34. package/lib/types/client/harness-session-hover.d.ts +3 -0
  35. package/lib/types/client/harness-session-hover.d.ts.map +1 -0
  36. package/lib/types/client/harness-session-list-default.d.ts +12 -0
  37. package/lib/types/client/harness-session-list-default.d.ts.map +1 -0
  38. package/lib/types/client/harness-session-menu-bridge.d.ts +16 -0
  39. package/lib/types/client/harness-session-menu-bridge.d.ts.map +1 -0
  40. package/lib/types/client/harness-session-summary.d.ts +28 -0
  41. package/lib/types/client/harness-session-summary.d.ts.map +1 -0
  42. package/lib/types/client/harness-sidebar-client.d.ts +5 -0
  43. package/lib/types/client/harness-sidebar-client.d.ts.map +1 -0
  44. package/lib/types/client/harness-trajectory-client.d.ts +5 -0
  45. package/lib/types/client/harness-trajectory-client.d.ts.map +1 -0
  46. package/lib/types/client/harness-trajectory-menu.d.ts +7 -0
  47. package/lib/types/client/harness-trajectory-menu.d.ts.map +1 -0
  48. package/lib/types/client/self-topic-sort-preference.d.ts +5 -0
  49. package/lib/types/client/self-topic-sort-preference.d.ts.map +1 -0
  50. package/lib/types/client/use-harness-activity.d.ts +3 -0
  51. package/lib/types/client/use-harness-activity.d.ts.map +1 -0
  52. package/lib/types/harness-embed-contract.d.ts +2 -0
  53. package/lib/types/harness-embed-contract.d.ts.map +1 -1
  54. package/lib/types/harness-embed-route.d.ts +3 -1
  55. package/lib/types/harness-embed-route.d.ts.map +1 -1
  56. package/lib/types/index.d.ts.map +1 -1
  57. package/lib/types/services/chat-service.d.ts +2 -0
  58. package/lib/types/services/chat-service.d.ts.map +1 -1
  59. package/lib/types/services/source-service.d.ts +7 -0
  60. package/lib/types/services/source-service.d.ts.map +1 -1
  61. package/lib/types/types.d.ts +2 -2
  62. package/lib/types/types.d.ts.map +1 -1
  63. package/package.json +5 -5
@@ -0,0 +1,254 @@
1
+ window.__ModuleLoader__.load({
2
+ id: "@senguoyun/dsh-arkme/harness-trajectory",
3
+ factory: (require) => {
4
+ var module = { exports: {} };
5
+ var exports = module.exports;
6
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
+ //#region src/client/harness-trajectory-menu.ts
8
+ const HEADER_SLOT = "[data-slot=\"conversation.session.header\"]";
9
+ const UTILITIES_SLOT = "[data-slot=\"conversation.session.header.utilities\"]";
10
+ const OWNED = "[data-arkme-harness-return], [data-arkme-harness-trajectory-item]";
11
+ const TABS_MARKER = "data-arkme-harness-view-tabs";
12
+ const HEADER_MARKER = "data-arkme-harness-compact-header";
13
+ const COPY = [{
14
+ chat: "对话",
15
+ trajectory: "轨迹",
16
+ more: "更多操作",
17
+ view: "查看轨迹",
18
+ back: "← 返回对话"
19
+ }, {
20
+ chat: "Chat",
21
+ trajectory: "Trajectory",
22
+ more: "More actions",
23
+ view: "View trajectory",
24
+ back: "← Back to chat"
25
+ }];
26
+ /** Only recognize the native two-view header; new upstream views keep their own navigation. */
27
+ function navigation(header) {
28
+ const tablists = header.querySelectorAll(":scope > [role=\"tablist\"]");
29
+ if (tablists.length !== 1) return;
30
+ const tabs = tablists[0];
31
+ const buttons = [...tabs.querySelectorAll(":scope > button[role=\"tab\"]")];
32
+ if (buttons.length !== 2 || tabs.children.length !== 2) return;
33
+ const copy = COPY.find((value) => buttons.some((button) => button.textContent?.trim() === value.chat) && buttons.some((button) => button.textContent?.trim() === value.trajectory));
34
+ if (copy === void 0) return;
35
+ const chat = buttons.find((button) => button.textContent?.trim() === copy.chat);
36
+ const trajectory = buttons.find((button) => button.textContent?.trim() === copy.trajectory);
37
+ if (chat.disabled || trajectory.disabled) return;
38
+ if (buttons.filter((button) => button.getAttribute("aria-selected") === "true").length !== 1) return;
39
+ const triggers = [...header.querySelectorAll(`${UTILITIES_SLOT} button[aria-haspopup="menu"]`)].filter((button) => button.getAttribute("aria-label") === copy.more && !button.disabled);
40
+ if (triggers.length !== 1) return;
41
+ const more = triggers[0];
42
+ if (more.parentElement?.closest(UTILITIES_SLOT) === null) return;
43
+ return {
44
+ header,
45
+ tabs,
46
+ chat,
47
+ trajectory,
48
+ more,
49
+ copy
50
+ };
51
+ }
52
+ function removeMount(mount) {
53
+ mount.tabs.removeAttribute(TABS_MARKER);
54
+ mount.header.removeAttribute(HEADER_MARKER);
55
+ mount.back.remove();
56
+ mount.item?.remove();
57
+ }
58
+ /**
59
+ * A reversible presentation adapter for DSH's native header. DSH 0.1.5-rc.2
60
+ * has no tab-strip or export-menu-item slot. Keep its components, handlers,
61
+ * session state and other menu entries intact; never copy/replace the header.
62
+ */
63
+ function installHarnessTrajectoryMenu(doc) {
64
+ const Observer = doc.defaultView?.MutationObserver;
65
+ if (Observer === void 0 || doc.body === null) return () => {};
66
+ const mounts = /* @__PURE__ */ new Map();
67
+ const unsupported = /* @__PURE__ */ new WeakSet();
68
+ let disposed = false;
69
+ const style = doc.createElement("style");
70
+ style.dataset.arkmeHarnessTrajectory = "true";
71
+ style.textContent = `
72
+ [${TABS_MARKER}] { display: none !important; }
73
+ ${HEADER_SLOT} > header[${HEADER_MARKER}] {
74
+ min-height: 0; padding-bottom: 10px;
75
+ }
76
+ [data-arkme-harness-return] {
77
+ background: transparent; border: 0; padding: 4px 0; margin-top: 8px;
78
+ color: var(--dsw-alias-label-secondary, inherit); font: inherit;
79
+ font-size: 13px; cursor: pointer;
80
+ }
81
+ [data-arkme-harness-return]:hover { color: var(--dsw-alias-label-primary, inherit); }
82
+ [data-arkme-harness-return][hidden] { display: none; }
83
+ `;
84
+ doc.head.append(style);
85
+ function makeMount(value) {
86
+ const back = doc.createElement("button");
87
+ back.type = "button";
88
+ back.dataset.arkmeHarnessReturn = "true";
89
+ back.textContent = value.copy.back;
90
+ back.hidden = true;
91
+ const mount = {
92
+ ...value,
93
+ back,
94
+ focusBack: false
95
+ };
96
+ back.addEventListener("click", () => {
97
+ if (!mount.chat.isConnected || mount.chat.disabled) return;
98
+ mount.chat.click();
99
+ mount.more.focus();
100
+ });
101
+ value.header.append(back);
102
+ return mount;
103
+ }
104
+ function syncMenu(mount) {
105
+ if (mount.more.getAttribute("aria-expanded") !== "true") {
106
+ mount.item?.remove();
107
+ delete mount.item;
108
+ return true;
109
+ }
110
+ const menus = mount.more.parentElement?.querySelectorAll(":scope > [role=\"menu\"]");
111
+ if (menus?.length !== 1) return false;
112
+ const menu = menus[0];
113
+ const template = [...menu.querySelectorAll("button[role=\"menuitem\"]")].find((button) => !button.closest(OWNED) && button.closest("[role=\"menu\"]") === menu);
114
+ const itemParent = template?.parentElement;
115
+ const viewport = itemParent?.parentElement;
116
+ const label = template === void 0 ? void 0 : [...template.children].find((child) => child.tagName === "SPAN" && child.textContent?.trim() === template.textContent?.trim());
117
+ if (template === void 0 || itemParent === null || itemParent === void 0 || viewport?.getAttribute("role") !== "presentation" || viewport.parentElement !== menu || label === void 0) return false;
118
+ if (mount.item?.parentElement === viewport) return true;
119
+ mount.item?.remove();
120
+ const item = doc.createElement("div");
121
+ item.dataset.arkmeHarnessTrajectoryItem = "true";
122
+ item.className = itemParent.className;
123
+ const button = doc.createElement("button");
124
+ button.type = "button";
125
+ button.setAttribute("role", "menuitem");
126
+ button.className = template.className;
127
+ const templateIcon = [...template.children].find((child) => child.tagName === "SPAN" && child.querySelector("svg"));
128
+ if (templateIcon !== void 0) {
129
+ const icon = doc.createElement("span");
130
+ icon.className = templateIcon.className;
131
+ const svg = doc.createElementNS("http://www.w3.org/2000/svg", "svg");
132
+ svg.setAttribute("width", "16");
133
+ svg.setAttribute("height", "16");
134
+ svg.setAttribute("viewBox", "0 0 16 16");
135
+ svg.setAttribute("fill", "none");
136
+ svg.setAttribute("aria-hidden", "true");
137
+ const path = doc.createElementNS(svg.namespaceURI, "path");
138
+ path.setAttribute("d", "M3.5 3h.01M3.5 8h.01M3.5 13h.01M3.5 4.5v2M3.5 9.5v2M7 3h6M7 8h6M7 13h6");
139
+ path.setAttribute("stroke", "currentColor");
140
+ path.setAttribute("stroke-width", "1.5");
141
+ path.setAttribute("stroke-linecap", "round");
142
+ svg.append(path);
143
+ icon.append(svg);
144
+ button.append(icon);
145
+ }
146
+ const text = doc.createElement("span");
147
+ text.className = label.className;
148
+ text.textContent = mount.copy.view;
149
+ button.append(text);
150
+ button.addEventListener("click", (event) => {
151
+ event.stopPropagation();
152
+ if (!mount.trajectory.isConnected || mount.trajectory.disabled) return;
153
+ mount.focusBack = true;
154
+ mount.more.click();
155
+ mount.trajectory.click();
156
+ });
157
+ button.addEventListener("keydown", (event) => {
158
+ if (event.key !== "Escape") return;
159
+ event.preventDefault();
160
+ event.stopPropagation();
161
+ mount.more.click();
162
+ mount.more.focus();
163
+ });
164
+ item.append(button);
165
+ viewport.append(item);
166
+ mount.item = item;
167
+ return true;
168
+ }
169
+ function sync() {
170
+ if (disposed) return;
171
+ for (const [header, mount] of mounts) if (!header.isConnected) {
172
+ removeMount(mount);
173
+ mounts.delete(header);
174
+ }
175
+ for (const header of doc.querySelectorAll(`${HEADER_SLOT} > header`)) {
176
+ const value = unsupported.has(header) ? void 0 : navigation(header);
177
+ let mount = mounts.get(header);
178
+ if (mount !== void 0 && (value === void 0 || mount.tabs !== value.tabs || mount.more !== value.more || mount.chat !== value.chat || mount.trajectory !== value.trajectory || mount.copy !== value.copy || mount.back.parentElement !== header)) {
179
+ removeMount(mount);
180
+ mounts.delete(header);
181
+ mount = void 0;
182
+ }
183
+ if (value === void 0) continue;
184
+ if (mount === void 0) {
185
+ mount = makeMount(value);
186
+ mounts.set(header, mount);
187
+ }
188
+ if (!syncMenu(mount)) {
189
+ unsupported.add(header);
190
+ removeMount(mount);
191
+ mounts.delete(header);
192
+ continue;
193
+ }
194
+ if (!mount.tabs.hasAttribute(TABS_MARKER)) mount.tabs.setAttribute(TABS_MARKER, "");
195
+ if (!mount.header.hasAttribute(HEADER_MARKER)) mount.header.setAttribute(HEADER_MARKER, "");
196
+ const inTrajectory = mount.trajectory.getAttribute("aria-selected") === "true";
197
+ if (mount.back.hidden === inTrajectory) mount.back.hidden = !inTrajectory;
198
+ if (mount.focusBack && inTrajectory) {
199
+ mount.focusBack = false;
200
+ mount.back.focus();
201
+ }
202
+ }
203
+ }
204
+ function touchesHeader(record) {
205
+ const target = record.target.nodeType === 1 ? record.target : record.target.parentElement;
206
+ if (target?.closest(OWNED)) return false;
207
+ if (target?.closest(HEADER_SLOT)) return true;
208
+ return [...record.addedNodes, ...record.removedNodes].some((node) => {
209
+ if (node.nodeType !== 1) return false;
210
+ const element = node;
211
+ return element.matches(HEADER_SLOT) || element.querySelector(HEADER_SLOT) !== null;
212
+ });
213
+ }
214
+ const observer = new Observer((records) => {
215
+ if (records.some(touchesHeader)) sync();
216
+ });
217
+ observer.observe(doc.body, {
218
+ childList: true,
219
+ subtree: true,
220
+ characterData: true,
221
+ attributes: true,
222
+ attributeFilter: [
223
+ "aria-selected",
224
+ "aria-expanded",
225
+ "aria-label",
226
+ "disabled",
227
+ "role",
228
+ "data-slot"
229
+ ]
230
+ });
231
+ sync();
232
+ return () => {
233
+ if (disposed) return;
234
+ disposed = true;
235
+ observer.disconnect();
236
+ for (const mount of mounts.values()) removeMount(mount);
237
+ mounts.clear();
238
+ style.remove();
239
+ };
240
+ }
241
+ //#endregion
242
+ //#region src/client/harness-trajectory-client.ts
243
+ const inject = [];
244
+ /** This client is added only to the Arkme-owned native Harness iframe. */
245
+ function apply(ctx) {
246
+ if (typeof document === "undefined" || typeof window === "undefined" || new URLSearchParams(window.location.search).get("arkme-harness-embed") !== "1") return;
247
+ ctx.effect(() => installHarnessTrajectoryMenu(document), "arkme: native Harness trajectory navigation");
248
+ }
249
+ //#endregion
250
+ exports.apply = apply;
251
+ exports.inject = inject;
252
+ return module.exports;
253
+ }
254
+ });
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as ARKME_DEFAULT_SHARE_WEBSITE, A as inspectNativeBundleArtifactV3, At as createDesktopLifecycleReader, D as bundleSha256, Dt as ArkmePluginError, E as arkmeSandboxEntryId, Et as normalizeRecentEmojiIds, F as assertExtensionArtifactSize, Ft as __toCommonJS, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeRequiredLinkMetadataFallback, K as arkmeExtensionShareRefFromLink, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, Mt as __esmMin, N as readNativeBundleTarballV3, Nt as __exportAll, O as canonicalBundleJson, Ot as retryAfterMillis, P as renderArkmeSandboxHostEntry, Pt as __require, 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 __commonJSMin, k as inspectBundleArtifact, kt as recordOwnerId, 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-Bsk6in2a.js";
1
+ import { $ as ARKME_DEFAULT_SHARE_WEBSITE, A as inspectNativeBundleArtifactV3, At as createDesktopLifecycleReader, D as bundleSha256, Dt as ArkmePluginError, E as arkmeSandboxEntryId, Et as normalizeRecentEmojiIds, F as assertExtensionArtifactSize, Ft as __toCommonJS, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeRequiredLinkMetadataFallback, K as arkmeExtensionShareRefFromLink, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, Mt as __esmMin, N as readNativeBundleTarballV3, Nt as __exportAll, O as canonicalBundleJson, Ot as retryAfterMillis, P as renderArkmeSandboxHostEntry, Pt as __require, 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 __commonJSMin, k as inspectBundleArtifact, kt as recordOwnerId, 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-BnDj8qcY.js";
2
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";
@@ -109,6 +109,8 @@ 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
111
  const ARKME_HARNESS_ONBOARDING_CLIENT_PATH = "/arkme-self/harness-onboarding-client.js";
112
+ const ARKME_HARNESS_TRAJECTORY_CLIENT_PATH = "/arkme-self/harness-trajectory-client.js";
113
+ const ARKME_HARNESS_SIDEBAR_CLIENT_PATH = "/arkme-self/harness-sidebar-client.js";
112
114
  //#endregion
113
115
  //#region src/plugin-update-policy.ts
114
116
  const PLUGIN_UPDATE_TERMINAL_STATE_TTL_MS = 10 * 6e4;
@@ -12393,7 +12395,7 @@ function projectBootBatches(batches, keptPackageNames) {
12393
12395
  * Host halves stay process-owned and untouched; only this document's browser
12394
12396
  * boot graph is projected.
12395
12397
  */
12396
- function projectHarnessBootGraph(graph, installedPackageNames, modelClient) {
12398
+ function projectHarnessBootGraph(graph, installedPackageNames, modelClient, trajectoryClient, sidebarClient) {
12397
12399
  const requiredPackageNames = requiredBootPackages(graph.entries);
12398
12400
  const removedPackageNames = /* @__PURE__ */ new Set([
12399
12401
  ARKME_PLUGIN_PACKAGE_NAME,
@@ -12414,6 +12416,37 @@ function projectHarnessBootGraph(graph, installedPackageNames, modelClient) {
12414
12416
  entries: [modelClient.id]
12415
12417
  });
12416
12418
  }
12419
+ const trajectoryPackages = [
12420
+ "@deepseek-ai/dsh-client-ui-conversation",
12421
+ "@deepseek-ai/dsh-client-ui-trajectory",
12422
+ "@deepseek-ai/dsh-session-log-export"
12423
+ ];
12424
+ if (trajectoryClient && trajectoryPackages.every((id) => entries.some((entry) => entry.id === id))) {
12425
+ const entry = {
12426
+ ...trajectoryClient,
12427
+ inject: trajectoryPackages
12428
+ };
12429
+ entries.push(entry);
12430
+ batches?.push({
12431
+ phase: "application",
12432
+ url: entry.url,
12433
+ rev: entry.rev,
12434
+ entries: [entry.id]
12435
+ });
12436
+ }
12437
+ if (sidebarClient && entries.some((entry) => entry.id === "@deepseek-ai/dsh-client-ui-sidebar")) {
12438
+ const entry = {
12439
+ ...sidebarClient,
12440
+ inject: ["@deepseek-ai/dsh-client-ui-sidebar"]
12441
+ };
12442
+ entries.push(entry);
12443
+ batches?.push({
12444
+ phase: "application",
12445
+ url: entry.url,
12446
+ rev: entry.rev,
12447
+ entries: [entry.id]
12448
+ });
12449
+ }
12417
12450
  return {
12418
12451
  rev: shortHash(JSON.stringify(batches === void 0 ? entries : {
12419
12452
  entries,
@@ -12454,7 +12487,7 @@ function createHarnessEmbedRouteHandler(options) {
12454
12487
  }
12455
12488
  try {
12456
12489
  const fullGraph = options.getGraph();
12457
- const projectedGraph = projectHarnessBootGraph(fullGraph, options.installedPackageNames(), options.modelClient);
12490
+ const projectedGraph = projectHarnessBootGraph(fullGraph, options.installedPackageNames(), options.modelClient, options.trajectoryClient, options.sidebarClient);
12458
12491
  if (options.onboardingClient !== void 0) {
12459
12492
  const entry = {
12460
12493
  ...options.onboardingClient,
@@ -36826,6 +36859,30 @@ function apply(ctx, config) {
36826
36859
  }), "arkme: Harness session observer asset");
36827
36860
  const harnessModelClient = readFileSync(new URL("../lib/harness-model-client.js", import.meta.url));
36828
36861
  const harnessOnboardingClient = readFileSync(new URL("../lib/harness-onboarding-client.js", import.meta.url));
36862
+ const harnessTrajectoryClient = readFileSync(new URL("../lib/harness-trajectory-client.js", import.meta.url));
36863
+ const harnessSidebarClient = readFileSync(new URL("../lib/harness-sidebar-client.js", import.meta.url));
36864
+ ctx.effect(() => ctx.webServer.register({
36865
+ kind: "exact",
36866
+ path: ARKME_HARNESS_SIDEBAR_CLIENT_PATH,
36867
+ handler: (_request, response) => {
36868
+ response.writeHead(200, {
36869
+ "Content-Type": "application/javascript",
36870
+ "Cache-Control": "no-cache"
36871
+ });
36872
+ response.end(harnessSidebarClient);
36873
+ }
36874
+ }), "arkme: Harness sidebar settings asset");
36875
+ ctx.effect(() => ctx.webServer.register({
36876
+ kind: "exact",
36877
+ path: ARKME_HARNESS_TRAJECTORY_CLIENT_PATH,
36878
+ handler: (_request, response) => {
36879
+ response.writeHead(200, {
36880
+ "Content-Type": "application/javascript",
36881
+ "Cache-Control": "no-cache"
36882
+ });
36883
+ response.end(harnessTrajectoryClient);
36884
+ }
36885
+ }), "arkme: Harness trajectory navigation asset");
36829
36886
  ctx.effect(() => ctx.webServer.register({
36830
36887
  kind: "exact",
36831
36888
  path: ARKME_HARNESS_ONBOARDING_CLIENT_PATH,
@@ -36838,6 +36895,16 @@ function apply(ctx, config) {
36838
36895
  }
36839
36896
  }), "arkme: Harness onboarding bridge asset");
36840
36897
  const harnessEmbedHandler = createHarnessEmbedRouteHandler({
36898
+ sidebarClient: {
36899
+ id: "@senguoyun/dsh-arkme/harness-sidebar",
36900
+ url: ARKME_HARNESS_SIDEBAR_CLIENT_PATH,
36901
+ rev: createHash("sha256").update(harnessSidebarClient).digest("hex")
36902
+ },
36903
+ trajectoryClient: {
36904
+ id: "@senguoyun/dsh-arkme/harness-trajectory",
36905
+ url: ARKME_HARNESS_TRAJECTORY_CLIENT_PATH,
36906
+ rev: createHash("sha256").update(harnessTrajectoryClient).digest("hex")
36907
+ },
36841
36908
  onboardingClient: {
36842
36909
  id: "@senguoyun/dsh-arkme/harness-onboarding",
36843
36910
  url: ARKME_HARNESS_ONBOARDING_CLIENT_PATH,
@@ -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-Bsk6in2a.js";
1
+ import { a as persistentArkmeExtensionActive, i as invokePersistentArkmeExtension, n as applyPersistentArkmeHostExtension, o as persistentArkmeExtensionRuntimeState, r as deactivatePersistentArkmeExtension, t as activatePersistentArkmeExtension } from "./persistent-runtime-BnDj8qcY.js";
2
2
  export { activatePersistentArkmeExtension, applyPersistentArkmeHostExtension, deactivatePersistentArkmeExtension, invokePersistentArkmeExtension, persistentArkmeExtensionActive, persistentArkmeExtensionRuntimeState };
@@ -36316,6 +36316,64 @@ var SourceService = class {
36316
36316
  signal?.throwIfAborted();
36317
36317
  return target;
36318
36318
  }
36319
+ /**
36320
+ * Resolve one personal topic and every visible descendant from the same
36321
+ * paginated directory contract used by the topic picker. Keeping this owner
36322
+ * here prevents a timeline read from trusting a partial browser-side tree or
36323
+ * exposing raw topic ids across the Host boundary.
36324
+ */
36325
+ async topicSubtreeSources(sourceRef, signal) {
36326
+ signal?.throwIfAborted();
36327
+ const session = await this.runtime.requireSession();
36328
+ const selected = await this.openSourceRef(sourceRef, session.userId);
36329
+ if (selected.kind !== "topic") throw new ArkmePluginError("topic-subtree-source-invalid", "仅主题支持读取下级主题内容", false, 400);
36330
+ const selectedKey = await this.topicHierarchyKey(session.userId, selected.ownerRef);
36331
+ const byHierarchyKey = /* @__PURE__ */ new Map();
36332
+ let cursor;
36333
+ const visitedCursors = /* @__PURE__ */ new Set();
36334
+ for (let pageIndex = 0; pageIndex < 100; pageIndex += 1) {
36335
+ signal?.throwIfAborted();
36336
+ const page = await this.listSources("send_to_self", {
36337
+ limit: 100,
36338
+ ...cursor === void 0 ? {} : { cursor },
36339
+ ...signal === void 0 ? {} : { signal }
36340
+ });
36341
+ for (const item of page.items) {
36342
+ if (item.kind !== "topic" || item.topicHierarchyKey === void 0) continue;
36343
+ byHierarchyKey.set(item.topicHierarchyKey, item);
36344
+ }
36345
+ if (!page.hasMore || page.nextCursor === void 0) break;
36346
+ if (visitedCursors.has(page.nextCursor)) throw new ArkmePluginError("topic-subtree-cursor-invalid", "主题层级分页未推进,请重试", true, 502);
36347
+ visitedCursors.add(page.nextCursor);
36348
+ cursor = page.nextCursor;
36349
+ if (pageIndex === 99) throw new ArkmePluginError("topic-subtree-pagination-limit", "主题层级加载未完成,请重试", true, 502);
36350
+ }
36351
+ const selectedSource = byHierarchyKey.get(selectedKey) ?? {
36352
+ ...await this.sourceItem(selected),
36353
+ topicHierarchyKey: selectedKey
36354
+ };
36355
+ byHierarchyKey.set(selectedKey, selectedSource);
36356
+ const childrenByParent = /* @__PURE__ */ new Map();
36357
+ for (const item of byHierarchyKey.values()) {
36358
+ const parentKey = item.parentTopicHierarchyKey;
36359
+ if (parentKey === void 0 || parentKey === item.topicHierarchyKey) continue;
36360
+ const children = childrenByParent.get(parentKey) ?? [];
36361
+ children.push(item);
36362
+ childrenByParent.set(parentKey, children);
36363
+ }
36364
+ const result = [];
36365
+ const queue = [selectedSource];
36366
+ const visited = /* @__PURE__ */ new Set();
36367
+ while (queue.length > 0) {
36368
+ const current = queue.shift();
36369
+ const key = current.topicHierarchyKey ?? current.sourceRef;
36370
+ if (visited.has(key)) continue;
36371
+ visited.add(key);
36372
+ result.push(current);
36373
+ queue.push(...childrenByParent.get(key) ?? []);
36374
+ }
36375
+ return result;
36376
+ }
36319
36377
  async selfTargetForAccount(userId) {
36320
36378
  return {
36321
36379
  sourceRef: await this.sealSourceRef(userId, "send_to_self", "all", "发给自己"),
@@ -43309,6 +43367,7 @@ const OFFICIAL_AUTHOR_FALLBACK_DISPLAY_NAME = "即我作者";
43309
43367
  const RESERVED_ASEN_BOT_UID = "asen";
43310
43368
  const RESERVED_ASEN_DISPLAY_NAME = "阿森";
43311
43369
  const MAX_MESSAGE_COPY_LINK_ITEMS = 100;
43370
+ const TOPIC_SUBTREE_READ_CONCURRENCY = 6;
43312
43371
  const RECORD_UID_PATTERN$1 = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
43313
43372
  const CHAT_MEMBER_REF_PREFIX = "arkme-chat-member-v1";
43314
43373
  const MESSAGE_WITHDRAWAL_REF_PREFIX = "arkme-message-withdrawal-v1";
@@ -44959,6 +45018,77 @@ var ChatService = class {
44959
45018
  ...profile.avatarUrl === void 0 ? {} : { avatarRef: await this.profile.sealProfileImageRef(session.userId, OFFICIAL_AUTHOR_USER_ID) }
44960
45019
  };
44961
45020
  }
45021
+ async readTopicTimelineRawStream(topic, session, limit, cursor, lockedRecordUids, required, merged, signal) {
45022
+ const opened = await this.source.openSourceRef(topic.sourceRef, session.userId);
45023
+ if (opened.kind !== "topic") throw new ArkmePluginError("topic-subtree-source-invalid", "下级主题信息无效,请刷新后重试", true, 409);
45024
+ const records = [];
45025
+ let pageCursor = cursor;
45026
+ for (let pageIndex = 0; pageIndex < 100; pageIndex += 1) {
45027
+ signal?.throwIfAborted();
45028
+ const page = await readTopicRecordPage(this.runtime, session, opened.ownerRef, {
45029
+ limit,
45030
+ ...pageCursor === void 0 ? {} : { cursor: pageCursor },
45031
+ ...signal === void 0 ? {} : { signal }
45032
+ });
45033
+ if (page.privacyState === 2) {
45034
+ if (required) throw new ArkmePluginError("topic-privacy-locked", "隐私锁主题不能在 Arkme 插件中查看", false, 403);
45035
+ return {
45036
+ topic,
45037
+ topicUid: opened.ownerRef,
45038
+ records: [],
45039
+ hasMore: false
45040
+ };
45041
+ }
45042
+ for (const raw of page.records) {
45043
+ if (arkmePrivacyLockedRecord(raw) || lockedRecordUids.has(this.record.recordUid(raw))) continue;
45044
+ records.push(raw);
45045
+ }
45046
+ if (!merged) return {
45047
+ topic,
45048
+ topicUid: opened.ownerRef,
45049
+ records,
45050
+ hasMore: page.hasMore,
45051
+ ...page.nextCursor === void 0 ? {} : { nextCursor: page.nextCursor }
45052
+ };
45053
+ if (records.length >= limit) return {
45054
+ topic,
45055
+ topicUid: opened.ownerRef,
45056
+ records: records.slice(0, limit),
45057
+ hasMore: records.length > limit || page.hasMore,
45058
+ ...page.nextCursor === void 0 ? {} : { nextCursor: page.nextCursor }
45059
+ };
45060
+ if (!page.hasMore) return {
45061
+ topic,
45062
+ topicUid: opened.ownerRef,
45063
+ records,
45064
+ hasMore: false
45065
+ };
45066
+ if (page.nextCursor === void 0) throw new ArkmePluginError("topic-record-page-invalid", "主题快记分页信息不完整,请重试", true, 502);
45067
+ pageCursor = page.nextCursor;
45068
+ }
45069
+ throw new ArkmePluginError("topic-record-pagination-limit", "主题快记加载页数过多,请稍后重试", true, 502);
45070
+ }
45071
+ async readTopicTimelineRawStreams(topics, session, limit, cursor, lockedRecordUids, signal) {
45072
+ const results = new Array(topics.length);
45073
+ let nextIndex = 0;
45074
+ let failure;
45075
+ const worker = async () => {
45076
+ while (failure === void 0) {
45077
+ const index = nextIndex;
45078
+ nextIndex += 1;
45079
+ if (index >= topics.length) return;
45080
+ try {
45081
+ results[index] = await this.readTopicTimelineRawStream(topics[index], session, limit, cursor, lockedRecordUids, index === 0, topics.length > 1, signal);
45082
+ } catch (cause) {
45083
+ failure = cause;
45084
+ return;
45085
+ }
45086
+ }
45087
+ };
45088
+ await Promise.all(Array.from({ length: Math.min(TOPIC_SUBTREE_READ_CONCURRENCY, topics.length) }, () => worker()));
45089
+ if (failure !== void 0) throw failure;
45090
+ return results;
45091
+ }
44962
45092
  async readSource(sourceRef, options = {}) {
44963
45093
  const session = await this.runtime.requireSession();
44964
45094
  const source = await this.source.openSourceRef(sourceRef, session.userId);
@@ -45031,34 +45161,83 @@ var ChatService = class {
45031
45161
  };
45032
45162
  }
45033
45163
  if (source.kind === "topic") {
45034
- const lockedRecordUids = await this.privacy.lockedRecordUids(session, options.signal);
45035
- const [page, metadata] = await Promise.all([readTopicRecordPage(this.runtime, session, source.ownerRef, {
45036
- ...options,
45037
- limit
45038
- }), readTopicMetadata(this.runtime, session, source.ownerRef, options.signal)]);
45039
- if (arkmePrivacyLockedTopic({ privacy_state: page.privacyState }) || metadata.privacyState === 2) throw new ArkmePluginError("topic-privacy-locked", "隐私锁主题不能在 Arkme 插件中查看", false, 403);
45040
- const topicKind = metadata.topicKind;
45041
- const rawRecords = page.records.filter((raw) => !arkmePrivacyLockedRecord(raw) && !lockedRecordUids.has(this.record.recordUid(raw)));
45164
+ const metadata = await readTopicMetadata(this.runtime, session, source.ownerRef, options.signal);
45165
+ if (metadata.privacyState === 2) throw new ArkmePluginError("topic-privacy-locked", "隐私锁主题不能在 Arkme 插件中查看", false, 403);
45166
+ const exactTopicSource = async () => [{
45167
+ ...await this.source.sourceItem(source),
45168
+ topicHierarchyKey: typeof this.source.topicHierarchyKey === "function" ? await this.source.topicHierarchyKey(session.userId, source.ownerRef) : sourceRef
45169
+ }];
45170
+ const subtreeSourcesPromise = typeof this.source.topicSubtreeSources === "function" ? this.source.topicSubtreeSources(sourceRef, options.signal).catch(async (cause) => {
45171
+ if (options.signal?.aborted === true) throw cause;
45172
+ return await exactTopicSource();
45173
+ }) : exactTopicSource();
45174
+ const [lockedRecordUids, subtreeSources] = await Promise.all([this.privacy.lockedRecordUids(session, options.signal), subtreeSourcesPromise]);
45175
+ const streams = await this.readTopicTimelineRawStreams(subtreeSources, session, limit, options.cursor, lockedRecordUids, options.signal);
45176
+ const candidates = [];
45177
+ const seenRecordUids = /* @__PURE__ */ new Set();
45178
+ for (const stream of streams) {
45179
+ const topicHierarchyKey = stream.topic.topicHierarchyKey;
45180
+ if (topicHierarchyKey === void 0) continue;
45181
+ for (const raw of stream.records) {
45182
+ const item = this.record.recordTimelineItemFromRaw(raw, session.userId, {
45183
+ isMe: true,
45184
+ selfTopic: {
45185
+ topicHierarchyKey,
45186
+ sourceRef: stream.topic.sourceRef,
45187
+ title: stream.topic.displayName
45188
+ }
45189
+ });
45190
+ if (item.itemUid === "" || seenRecordUids.has(item.itemUid)) continue;
45191
+ seenRecordUids.add(item.itemUid);
45192
+ candidates.push({
45193
+ raw,
45194
+ topic: stream.topic,
45195
+ topicUid: stream.topicUid,
45196
+ item
45197
+ });
45198
+ }
45199
+ }
45200
+ candidates.sort((left, right) => right.item.sendAtMillis - left.item.sendAtMillis || right.item.itemUid.localeCompare(left.item.itemUid));
45201
+ const selected = candidates.slice(0, limit);
45202
+ const rawRecords = selected.map((candidate) => candidate.raw);
45042
45203
  const media = await this.media.hydrateRecordMediaPage(rawRecords, session, options.signal);
45043
45204
  const signingKey = await this.runtime.stateStore.uniqueCode();
45044
- const records = rawRecords.map((raw) => {
45205
+ const records = selected.map(({ raw, topic, topicUid }) => {
45045
45206
  const recordUid = this.record.recordUid(raw);
45046
45207
  const displayItems = media.displayItemsByRecordUid.get(recordUid);
45208
+ const topicHierarchyKey = topic.topicHierarchyKey;
45047
45209
  const item = this.record.recordTimelineItemFromRaw(raw, session.userId, {
45048
45210
  ...displayItems === void 0 ? {} : { displayItems },
45211
+ isMe: true,
45212
+ selfTopic: {
45213
+ topicHierarchyKey,
45214
+ sourceRef: topic.sourceRef,
45215
+ title: topic.displayName
45216
+ },
45049
45217
  mediaUnavailable: media.unavailableRecordUids.has(recordUid)
45050
45218
  });
45051
- return this.withPersonalRecordCapabilities(source, item, session.userId, signingKey, numberValue$19(objectValue$2(raw).owner_user_id), source.ownerRef);
45219
+ const assignable = this.withPersonalRecordCapabilities(source, item, session.userId, signingKey, numberValue$19(objectValue$2(raw).owner_user_id), topicUid);
45220
+ return assignable.recordTopicAssignmentRef === void 0 ? assignable : {
45221
+ ...assignable,
45222
+ recordTopicAssignmentTopicKey: topicHierarchyKey
45223
+ };
45052
45224
  });
45225
+ const hasMore = candidates.length > limit || streams.some((stream) => stream.hasMore);
45226
+ const lastItem = selected.at(-1)?.item;
45227
+ if (hasMore && lastItem === void 0) throw new ArkmePluginError("topic-subtree-page-invalid", "下级主题快记分页未推进,请重试", true, 502);
45228
+ const currentSource = subtreeSources[0] ?? await this.source.sourceItem(source);
45053
45229
  return {
45054
45230
  source: {
45055
- ...await this.source.sourceItem(source),
45056
- topicKind,
45057
- displayName: arkmeTopicDisplayName(source.displayName, topicKind)
45231
+ ...currentSource,
45232
+ topicKind: metadata.topicKind,
45233
+ displayName: arkmeTopicDisplayName(currentSource.displayName, metadata.topicKind)
45058
45234
  },
45059
45235
  items: records.map((item) => this.withRecordMessageActionRef(source, item, session.userId, signingKey)),
45060
- hasMore: page.hasMore,
45061
- ...page.nextCursor === void 0 ? {} : { nextCursor: page.nextCursor }
45236
+ hasMore,
45237
+ ...hasMore ? subtreeSources.length === 1 && streams[0]?.nextCursor !== void 0 ? { nextCursor: streams[0].nextCursor } : lastItem === void 0 ? {} : { nextCursor: {
45238
+ sendAtMillis: lastItem.sendAtMillis,
45239
+ itemUid: lastItem.itemUid
45240
+ } } : {}
45062
45241
  };
45063
45242
  }
45064
45243
  const aiPolishDecorations = source.kind === "group_chat" && options.cursor === void 0 ? Promise.allSettled([this.aiPolish.queryGroupAiPolishConfig(source.ownerRef, session, options.signal), this.aiPolish.queryGroupAiPolishNotices(source.ownerRef, session, options.signal)]) : void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"ArkmePersistentShell.d.ts","sourceRoot":"","sources":["../../../src/client/ArkmePersistentShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACnG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAA;AAGrF,OAAO,KAAK,EAAE,iBAAiB,EAAoC,MAAM,aAAa,CAAA;AAyBtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAyCvE,KAAK,wBAAwB,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,CAAA;AAEpE,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAOD,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,wBAAwB,GAAG,SAA6C,GAAG,MAAM,GAAG,SAAS,CAQhJ;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,wBAAwB,GAAG,SAA6C,GAAG,IAAI,CAIlJ;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,EACvB,oBAAoB,CAAC,EAAE,MAAM,GAC5B,MAAM,CAKR;AAED,gGAAgG;AAChG,wBAAgB,4BAA4B,gCAuC3C;AAED,yGAAyG;AACzG,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,iBAAiB,GAAG,SAAS,EACnC,IAAI,EAAE,MAAM,EACZ,kBAAkB,UAA2B,GAC5C,OAAO,CAET;AAED,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,SAAS,CAAC,GAC7D,gBAAgB,CAAC,uBAAuB,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,GAC9F;IACA,eAAe,IAAI,IAAI,CAAA;IACvB,YAAY,IAAI,IAAI,CAAA;IACpB,iBAAiB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IACvH,cAAc,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzC,CAAA;AAcH,mDAAmD;AACnD,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EACvD,iBAA+D,EAAE,cAAgC,GAClG,EAAE,2BAA2B,+BA0S7B;AAED,MAAM,MAAM,6BAA6B,GAAG,YAAY,CAAC,cAAc,CAAC,GACpE,WAAW,CAAC,OAAO,4BAA4B,CAAC,GAChD;IAAE,YAAY,IAAI,IAAI,CAAA;CAAE,CAAA;AAE5B,6FAA6F;AAC7F,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EAAE,YAAY,EAAE,CAAC,GAC3B,EAAE,6BAA6B,+BAsF/B;AAED,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG;IAAE,YAAY,IAAI,IAAI,CAAA;CAAE,CAAA;AAE5F,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,EAAE,YAAY,EAAE,EAAE,2BAA2B,+BAGnF"}
1
+ {"version":3,"file":"ArkmePersistentShell.d.ts","sourceRoot":"","sources":["../../../src/client/ArkmePersistentShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACnG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAA;AAGrF,OAAO,KAAK,EAAE,iBAAiB,EAAoC,MAAM,aAAa,CAAA;AAyBtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAyCvE,KAAK,wBAAwB,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,CAAA;AAEpE,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAOD,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,wBAAwB,GAAG,SAA6C,GAAG,MAAM,GAAG,SAAS,CAQhJ;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,wBAAwB,GAAG,SAA6C,GAAG,IAAI,CAIlJ;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,EACvB,oBAAoB,CAAC,EAAE,MAAM,GAC5B,MAAM,CAKR;AAED,gGAAgG;AAChG,wBAAgB,4BAA4B,gCAuC3C;AAED,yGAAyG;AACzG,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,iBAAiB,GAAG,SAAS,EACnC,IAAI,EAAE,MAAM,EACZ,kBAAkB,UAA2B,GAC5C,OAAO,CAET;AAED,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,SAAS,CAAC,GAC7D,gBAAgB,CAAC,uBAAuB,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,GAC9F;IACA,eAAe,IAAI,IAAI,CAAA;IACvB,YAAY,IAAI,IAAI,CAAA;IACpB,iBAAiB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IACvH,cAAc,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzC,CAAA;AAcH,mDAAmD;AACnD,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EACvD,iBAA+D,EAAE,cAAgC,GAClG,EAAE,2BAA2B,+BA0S7B;AAED,MAAM,MAAM,6BAA6B,GAAG,YAAY,CAAC,cAAc,CAAC,GACpE,WAAW,CAAC,OAAO,4BAA4B,CAAC,GAChD;IAAE,YAAY,IAAI,IAAI,CAAA;CAAE,CAAA;AAE5B,6FAA6F;AAC7F,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EAAE,YAAY,EAAE,CAAC,GAC3B,EAAE,6BAA6B,+BAuF/B;AAED,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG;IAAE,YAAY,IAAI,IAAI,CAAA;CAAE,CAAA;AAE5F,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,EAAE,YAAY,EAAE,EAAE,2BAA2B,+BAGnF"}
@@ -1,13 +1,16 @@
1
1
  import type { ArkmeBotSummary, ArkmeSourceItem } from '../types.js';
2
- export declare function ArkmeQuickAddMenu({ onContactAdd, onCreateGroup, onAddBot }: {
2
+ export declare function ArkmeQuickAddMenu({ onContactAdd, onCreateGroup, onAddBot, onNewDshSession, error }: {
3
3
  onContactAdd(): void;
4
4
  onCreateGroup(): void;
5
5
  onAddBot(): void;
6
+ onNewDshSession?: (() => void) | undefined;
7
+ error?: string;
6
8
  }): import("react").JSX.Element;
7
- export declare function ArkmeQuickAddButton({ onContactAdd, onSourceCreated, onBotCreated, notificationActivationRevision, onBlockingOverlayChange, }: {
9
+ export declare function ArkmeQuickAddButton({ onContactAdd, onSourceCreated, onBotCreated, onNewDshSession, notificationActivationRevision, onBlockingOverlayChange, }: {
8
10
  onContactAdd(): void;
9
11
  onSourceCreated(source: ArkmeSourceItem): void | Promise<void>;
10
12
  onBotCreated?(bot: ArkmeBotSummary): void | Promise<void>;
13
+ onNewDshSession?: (() => void) | undefined;
11
14
  notificationActivationRevision?: number;
12
15
  onBlockingOverlayChange?(open: boolean): void;
13
16
  }): import("react").JSX.Element;