@senguoyun/dsh-arkme 0.1.43 → 0.1.44
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/docs/emoji-presentation.md +54 -0
- package/docs/member-event-cache.md +49 -0
- package/lib/client.js +81407 -28069
- package/lib/client.js.map +1 -1
- package/lib/index.js +25 -1
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-DYBmIlId.js → persistent-runtime-CEGGFpR7.js} +20273 -598
- package/lib/types/arkme-emoji-text.d.ts +26 -0
- package/lib/types/arkme-emoji-text.d.ts.map +1 -0
- package/lib/types/arkme-service.d.ts +11 -1
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/chat-realtime.d.ts +27 -0
- package/lib/types/chat-realtime.d.ts.map +1 -1
- package/lib/types/client/ArkmeCalendarSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeLongArticleDialog.d.ts.map +1 -1
- package/lib/types/client/ArkmeMarkdownBody.d.ts +11 -0
- package/lib/types/client/ArkmeMarkdownBody.d.ts.map +1 -0
- package/lib/types/client/ArkmeMarkdownComposerInput.d.ts +10 -0
- package/lib/types/client/ArkmeMarkdownComposerInput.d.ts.map +1 -0
- package/lib/types/client/ArkmeMemberEventProfile.d.ts +10 -0
- package/lib/types/client/ArkmeMemberEventProfile.d.ts.map +1 -0
- package/lib/types/client/ArkmeMessagePreparingIndicator.d.ts +6 -0
- package/lib/types/client/ArkmeMessagePreparingIndicator.d.ts.map +1 -0
- package/lib/types/client/ArkmeNoteDetails.d.ts.map +1 -1
- package/lib/types/client/ArkmeRecordingSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeRelatedQuickNotes.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichComposerInput.d.ts +6 -1
- package/lib/types/client/ArkmeRichComposerInput.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichContent.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichText.d.ts +7 -3
- package/lib/types/client/ArkmeRichText.d.ts.map +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts +6 -0
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkmeWorldSurface.d.ts.map +1 -1
- package/lib/types/client/arkme-emoji.d.ts +3 -12
- package/lib/types/client/arkme-emoji.d.ts.map +1 -1
- package/lib/types/client/composer-draft-store.d.ts +4 -0
- package/lib/types/client/composer-draft-store.d.ts.map +1 -1
- package/lib/types/client/conversation-resize-anchor.d.ts +3 -3
- package/lib/types/client/conversation-resize-anchor.d.ts.map +1 -1
- package/lib/types/client/interwoven-moments.d.ts +7 -2
- package/lib/types/client/interwoven-moments.d.ts.map +1 -1
- package/lib/types/client/markdown-editor.d.ts +28 -0
- package/lib/types/client/markdown-editor.d.ts.map +1 -0
- package/lib/types/client/member-event-cache.d.ts +24 -0
- package/lib/types/client/member-event-cache.d.ts.map +1 -0
- package/lib/types/client/member-event-hints.d.ts +11 -0
- package/lib/types/client/member-event-hints.d.ts.map +1 -0
- package/lib/types/client/member-event-timeline.d.ts +60 -0
- package/lib/types/client/member-event-timeline.d.ts.map +1 -0
- package/lib/types/client/message-preparing-reporter.d.ts +41 -0
- package/lib/types/client/message-preparing-reporter.d.ts.map +1 -0
- package/lib/types/client/message-preparing-store.d.ts +29 -0
- package/lib/types/client/message-preparing-store.d.ts.map +1 -0
- package/lib/types/client/realtime-client-events.d.ts +3 -1
- package/lib/types/client/realtime-client-events.d.ts.map +1 -1
- package/lib/types/client/recordings/ArkmeRecordingTimeline.d.ts +2 -1
- package/lib/types/client/recordings/ArkmeRecordingTimeline.d.ts.map +1 -1
- package/lib/types/client/recordings/useRecordingPlayback.d.ts +4 -0
- package/lib/types/client/recordings/useRecordingPlayback.d.ts.map +1 -1
- package/lib/types/client/use-member-event-timeline.d.ts +31 -0
- package/lib/types/client/use-member-event-timeline.d.ts.map +1 -0
- package/lib/types/client/use-message-preparing.d.ts +14 -0
- package/lib/types/client/use-message-preparing.d.ts.map +1 -0
- package/lib/types/client/use-resizable-composer.d.ts.map +1 -1
- package/lib/types/hashtag.d.ts +1 -1
- package/lib/types/hashtag.d.ts.map +1 -1
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/markdown.d.ts +43 -0
- package/lib/types/markdown.d.ts.map +1 -0
- package/lib/types/record-reedit-contract.d.ts +2 -0
- package/lib/types/record-reedit-contract.d.ts.map +1 -1
- package/lib/types/services/calendar-service.d.ts.map +1 -1
- package/lib/types/services/chat-realtime-service.d.ts +22 -0
- package/lib/types/services/chat-realtime-service.d.ts.map +1 -1
- package/lib/types/services/chat-service.d.ts +11 -1
- package/lib/types/services/chat-service.d.ts.map +1 -1
- package/lib/types/services/member-event-service.d.ts +25 -0
- package/lib/types/services/member-event-service.d.ts.map +1 -0
- package/lib/types/services/message-action-infrastructure.d.ts.map +1 -1
- package/lib/types/services/record-service.d.ts +2 -2
- package/lib/types/services/record-service.d.ts.map +1 -1
- package/lib/types/services/related-quick-note-service.d.ts.map +1 -1
- package/lib/types/services/service.d.ts +6 -1
- package/lib/types/services/service.d.ts.map +1 -1
- package/lib/types/services/source-service.d.ts +5 -0
- package/lib/types/services/source-service.d.ts.map +1 -1
- package/lib/types/types.d.ts +74 -1
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +22 -6
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ARKME_PROVIDER_CONTRACT_VERSION, A as inspectNativeBundleArtifactV3, D as bundleSha256, E as arkmeSandboxEntryId, F as assertExtensionArtifactSize, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeIsGenericLinkMetadataTitle, K as isRecordingInstantOnOrAfterUnixEpoch, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, N as readNativeBundleTarballV3, O as canonicalBundleJson, P as renderArkmeSandboxHostEntry, Q as ARKME_DEFAULT_SHARE_WEBSITE, R as unpackArkmeExtension, S as ARKME_BUNDLE_ARTIFACT_KIND, T as ArkmeBundleArtifactError, U as ARKME_EXTENSION_RUNTIME_UNAVAILABLE_MESSAGE, W as ArkmeService, X as arkmeFileBackgroundSound, Y as arkmeRequiredLinkMetadataFallback, Z as arkmeRichBackgroundSound, _ as arkmeClientContentDigest, _t as ArkmePluginError, at as ARKME_RUNTIME_INSTANCE_ID, b as verifyExtensionResolutionSignature, c as persistentExtensionBundleDirectory, ct as arkmeNormalizedFileMimeType, d as readPersistentExtensionActivation, dt as recordingImportFileKind, f as refreshPersistentClientWrapper, ft as sameRecordingImportIdentity, g as activeProfileExtensionOwnerConflicts, gt as SecretValue, h as renderArkmeBundleClientBundle, ht as ArkmeOutgoingCallError, i as invokePersistentArkmeExtension, it as ARKME_WORLD_PUBLISH_MAX_IMAGE_BYTES, j as packBundleFiles, k as inspectBundleArtifact, l as persistentExtensionPackageIdentity, lt as arkmePickedFileKind, m as writePersistentExtensionActivation, mt as recordingImportFileNameKey, o as persistentArkmeExtensionRuntimeState, ot as ARKME_TOOL_FILE_MAX_BYTES, p as repairPersistentExtensionInstallation, q as arkmeExtensionShareRefFromLink, r as deactivatePersistentArkmeExtension, rt as ARKME_WORLD_PUBLISH_MAX_IMAGES, s as materializePersistentExtensionBundle, st as arkmeCanInlineLocalFile, t as activatePersistentArkmeExtension, u as quarantinePersistentExtension, ut as isArkmeBotAvatarRef, v as arkmeClientContentDigestFromSource, w as ARKME_NATIVE_BUNDLE_ARTIFACT_KIND, x as verifyNativeBundleResolutionSignature, y as verifyBundleResolutionSignature, z as ARKME_EXTENSION_FORMAT } from "./persistent-runtime-
|
|
1
|
+
import { $ as ARKME_PROVIDER_CONTRACT_VERSION, A as inspectNativeBundleArtifactV3, D as bundleSha256, E as arkmeSandboxEntryId, F as assertExtensionArtifactSize, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeIsGenericLinkMetadataTitle, K as isRecordingInstantOnOrAfterUnixEpoch, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, N as readNativeBundleTarballV3, O as canonicalBundleJson, P as renderArkmeSandboxHostEntry, Q as ARKME_DEFAULT_SHARE_WEBSITE, R as unpackArkmeExtension, S as ARKME_BUNDLE_ARTIFACT_KIND, T as ArkmeBundleArtifactError, U as ARKME_EXTENSION_RUNTIME_UNAVAILABLE_MESSAGE, W as ArkmeService, X as arkmeFileBackgroundSound, Y as arkmeRequiredLinkMetadataFallback, Z as arkmeRichBackgroundSound, _ as arkmeClientContentDigest, _t as ArkmePluginError, at as ARKME_RUNTIME_INSTANCE_ID, b as verifyExtensionResolutionSignature, c as persistentExtensionBundleDirectory, ct as arkmeNormalizedFileMimeType, d as readPersistentExtensionActivation, dt as recordingImportFileKind, f as refreshPersistentClientWrapper, ft as sameRecordingImportIdentity, g as activeProfileExtensionOwnerConflicts, gt as SecretValue, h as renderArkmeBundleClientBundle, ht as ArkmeOutgoingCallError, i as invokePersistentArkmeExtension, it as ARKME_WORLD_PUBLISH_MAX_IMAGE_BYTES, j as packBundleFiles, k as inspectBundleArtifact, l as persistentExtensionPackageIdentity, lt as arkmePickedFileKind, m as writePersistentExtensionActivation, mt as recordingImportFileNameKey, o as persistentArkmeExtensionRuntimeState, ot as ARKME_TOOL_FILE_MAX_BYTES, p as repairPersistentExtensionInstallation, q as arkmeExtensionShareRefFromLink, r as deactivatePersistentArkmeExtension, rt as ARKME_WORLD_PUBLISH_MAX_IMAGES, s as materializePersistentExtensionBundle, st as arkmeCanInlineLocalFile, t as activatePersistentArkmeExtension, u as quarantinePersistentExtension, ut as isArkmeBotAvatarRef, v as arkmeClientContentDigestFromSource, w as ARKME_NATIVE_BUNDLE_ARTIFACT_KIND, x as verifyNativeBundleResolutionSignature, y as verifyBundleResolutionSignature, z as ARKME_EXTENSION_FORMAT } from "./persistent-runtime-CEGGFpR7.js";
|
|
2
2
|
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-CvojZuTD.js";
|
|
3
3
|
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-BByw0ZyG.js";
|
|
4
4
|
import { i as invokeArkmeBundle, n as arkmeBundleActive, r as deactivateArkmeBundle } from "./bundle-runtime-BTzRlc6V.js";
|
|
@@ -1911,6 +1911,7 @@ function botRefsParam(params) {
|
|
|
1911
1911
|
return values.map((value) => String(value).trim());
|
|
1912
1912
|
}
|
|
1913
1913
|
function richSendParam(params) {
|
|
1914
|
+
if (params.textFormat !== void 0 && params.textFormat !== "plain" && params.textFormat !== "markdown") throw new ArkmePluginError("text-format-invalid", "正文格式无效", false, 400);
|
|
1914
1915
|
const rawAssets = Array.isArray(params.assets) ? params.assets : [];
|
|
1915
1916
|
const thinkingDurationMillis = Math.max(0, Math.trunc(numberParam(params, "thinkingDurationMillis", 0)));
|
|
1916
1917
|
const recordDurationMillis = Math.max(0, Math.trunc(numberParam(params, "recordDurationMillis", 0)));
|
|
@@ -1939,6 +1940,7 @@ function richSendParam(params) {
|
|
|
1939
1940
|
return {
|
|
1940
1941
|
title: stringParam(params, "title"),
|
|
1941
1942
|
textContent: stringParam(params, "textContent"),
|
|
1943
|
+
...params.textFormat === void 0 ? {} : { textFormat: params.textFormat },
|
|
1942
1944
|
displayKind: numberParam(params, "displayKind", 0) === 1 ? 1 : 0,
|
|
1943
1945
|
...thinkingDurationMillis === 0 ? {} : { thinkingDurationMillis },
|
|
1944
1946
|
...recordDurationMillis === 0 ? {} : { recordDurationMillis },
|
|
@@ -2054,6 +2056,7 @@ function createArkmeHostApi(service, options) {
|
|
|
2054
2056
|
const params = request.params ?? {};
|
|
2055
2057
|
if (request.operation === "link.metadata" && origin === void 0) throw new ArkmePluginError("origin-required", "网址名称解析必须从当前 DSH 页面发起", false, 403);
|
|
2056
2058
|
if (["user-ban.ban", "user-ban.unban"].includes(request.operation) && origin === void 0) throw new ArkmePluginError("origin-required", "封禁操作必须从当前 DSH 页面发起", false, 403);
|
|
2059
|
+
if (["source.message-preparing.report", "source.message-preparing.cancel"].includes(request.operation) && origin === void 0) throw new ArkmePluginError("origin-required", "正在输入状态必须从当前 DSH 页面发起", false, 403);
|
|
2057
2060
|
if ([
|
|
2058
2061
|
"user.arkme-id.set",
|
|
2059
2062
|
"extensions.delete",
|
|
@@ -2539,6 +2542,14 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
2539
2542
|
...requestSignal === void 0 ? {} : { signal: requestSignal }
|
|
2540
2543
|
});
|
|
2541
2544
|
case "source.members": return await service.listSourceMembers(stringParam(params, "sourceRef"), { activeOnly: params.activeOnly !== false });
|
|
2545
|
+
case "source.member-events": return await service.memberEvents(stringParam(params, "sourceRef"), {
|
|
2546
|
+
fromAtMillis: numberParam(params, "fromAtMillis", 0),
|
|
2547
|
+
toAtMillis: numberParam(params, "toAtMillis", 0),
|
|
2548
|
+
limit: numberParam(params, "limit", 50),
|
|
2549
|
+
...typeof params.cursor === "string" ? { cursor: params.cursor } : {}
|
|
2550
|
+
}, requestSignal);
|
|
2551
|
+
case "source.member-event.profile": return await service.memberEventProfile(stringParam(params, "sourceRef"), stringParam(params, "eventId"), requestSignal);
|
|
2552
|
+
case "source.member-event.private.open": return await service.memberEventPrivateChat(stringParam(params, "sourceRef"), stringParam(params, "eventId"), requestSignal);
|
|
2542
2553
|
case "source.member-records": return await service.sourceMemberRecords(stringParam(params, "sourceRef"), stringParam(params, "memberRef"), conversationMemberRecordModeParam(params), {
|
|
2543
2554
|
limit: numberParam(params, "limit", 30),
|
|
2544
2555
|
beforeSequence: numberParam(params, "beforeSequence", 0)
|
|
@@ -2548,6 +2559,17 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
2548
2559
|
case "source.related-quick-notes.from-message": return await service.relatedQuickNotesFromMessage(requiredRelatedQuickNoteParam(params, "sourceRef"), requiredRelatedQuickNoteParam(params, "messageActionRef", MAX_MESSAGE_ACTION_REF_CHARS), requestSignal);
|
|
2549
2560
|
case "source.related-quick-notes.from-moment": return await service.relatedQuickNotesFromMoment(requiredRelatedQuickNoteParam(params, "sourceRef"), requiredRelatedQuickNoteParam(params, "momentRef"), requestSignal);
|
|
2550
2561
|
case "source.related-quick-note.detail": return await service.relatedQuickNoteDetail(requiredRelatedQuickNoteParam(params, "sourceRef"), requiredRelatedQuickNoteParam(params, "relatedRef"), requestSignal);
|
|
2562
|
+
case "source.message-preparing.report":
|
|
2563
|
+
case "source.message-preparing.cancel": {
|
|
2564
|
+
const sourceRef = typeof params.sourceRef === "string" ? params.sourceRef.trim() : "";
|
|
2565
|
+
const timestampKey = operation === "source.message-preparing.report" ? "prepareAtMillis" : "cancelAtMillis";
|
|
2566
|
+
const stateAtMillis = params[timestampKey];
|
|
2567
|
+
if (Object.keys(params).some((key) => key !== "sourceRef" && key !== timestampKey) || sourceRef === "" || typeof stateAtMillis !== "number" || !Number.isSafeInteger(stateAtMillis) || stateAtMillis <= 0 || !Number.isSafeInteger(stateAtMillis + 5e3)) throw new ArkmePluginError("message-preparing-invalid", "正在输入参数无效", false, 400);
|
|
2568
|
+
const options = requestSignal === void 0 ? {} : { signal: requestSignal };
|
|
2569
|
+
if (operation === "source.message-preparing.report") await service.reportMessagePreparing(sourceRef, stateAtMillis, options);
|
|
2570
|
+
else await service.cancelMessagePreparing(sourceRef, stateAtMillis, options);
|
|
2571
|
+
return null;
|
|
2572
|
+
}
|
|
2551
2573
|
case "source.mark-read": return await service.markSourceRead(stringParam(params, "sourceRef"), numberParam(params, "readSequence", 0));
|
|
2552
2574
|
case "source.read-receipts.summary-list": return await service.messageReadReceiptSummaries(stringParam(params, "sourceRef"), messageReadReceiptItemsParam(params), requestSignal === void 0 ? {} : { signal: requestSignal });
|
|
2553
2575
|
case "source.read-receipts.detail": return await service.messageReadReceiptDetail(stringParam(params, "sourceRef"), stringParam(params, "itemUid"), numberParam(params, "sequence", 0), requestSignal === void 0 ? {} : { signal: requestSignal });
|
|
@@ -2570,6 +2592,7 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
2570
2592
|
case "source.message-copy-link.extend": return await service.extendMessageCopyLink(stringParam(params, "sid"), numberParam(params, "itemIndex", 0), stringParam(params, "textContent"), stringParam(params, "recordUid"), requestSignal === void 0 ? {} : { signal: requestSignal });
|
|
2571
2593
|
case "source.message-extension.context": return await service.sourceMessageExtensionContext(stringParam(params, "sourceRef"), stringParam(params, "messageActionRef"), requestSignal === void 0 ? {} : { signal: requestSignal });
|
|
2572
2594
|
case "source.message-extension.extend": return await service.extendSourceMessage(stringParam(params, "sourceRef"), stringParam(params, "messageActionRef"), stringParam(params, "textContent"), stringParam(params, "recordUid"), [...new Set(stringListParam(params, "fileRefs").map((value) => value.trim()).filter((value) => value !== ""))], {
|
|
2595
|
+
...richSendParam(params),
|
|
2573
2596
|
...stringParam(params, "relationUid") === "" ? {} : { relationUid: stringParam(params, "relationUid") },
|
|
2574
2597
|
...stringParam(params, "parentRecordUid") === "" ? {} : { parentRecordUid: stringParam(params, "parentRecordUid") },
|
|
2575
2598
|
...requestSignal === void 0 ? {} : { signal: requestSignal }
|
|
@@ -24495,6 +24518,7 @@ const Config = Schema.object({
|
|
|
24495
24518
|
updateCheckIntervalHours: Schema.number().min(1).max(168).default(12),
|
|
24496
24519
|
updateAllowLocalInstall: Schema.boolean().default(true),
|
|
24497
24520
|
richMediaRenderEnabled: Schema.boolean().default(true),
|
|
24521
|
+
markdownQuickNotesEnabled: Schema.boolean().default(false),
|
|
24498
24522
|
richMediaSendEnabled: Schema.boolean().default(true),
|
|
24499
24523
|
maxUploadBytes: Schema.number().min(1024).max(1024 * 1024 * 1024).default(100 * 1024 * 1024),
|
|
24500
24524
|
openclawProfile: Schema.string().default("dev"),
|
|
@@ -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-CEGGFpR7.js";
|
|
2
2
|
export { activatePersistentArkmeExtension, applyPersistentArkmeHostExtension, deactivatePersistentArkmeExtension, invokePersistentArkmeExtension, persistentArkmeExtensionActive, persistentArkmeExtensionRuntimeState };
|