@senguoyun/dsh-arkme 0.1.35 → 0.1.37

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 (176) hide show
  1. package/assets/windows/arkme-credential-helper.exe +0 -0
  2. package/assets/windows/manifest.json +18 -2
  3. package/cordis.patch.yml +1 -0
  4. package/docs/consumer-plugin-contract.md +39 -0
  5. package/lib/client.js +16211 -6527
  6. package/lib/client.js.map +1 -1
  7. package/lib/index.js +672 -98
  8. package/lib/persistent-extension.js +1 -1
  9. package/lib/{persistent-runtime-e4gV6dqq.js → persistent-runtime-Bc6X98km.js} +3637 -669
  10. package/lib/sdk.js +28 -4
  11. package/lib/types/arkme-service.d.ts +48 -11
  12. package/lib/types/arkme-service.d.ts.map +1 -1
  13. package/lib/types/chat-attention.d.ts +27 -0
  14. package/lib/types/chat-attention.d.ts.map +1 -0
  15. package/lib/types/client/ArkmeArkoSurface.d.ts +4 -0
  16. package/lib/types/client/ArkmeArkoSurface.d.ts.map +1 -1
  17. package/lib/types/client/ArkmeBackgroundSoundWaveform.d.ts +11 -0
  18. package/lib/types/client/ArkmeBackgroundSoundWaveform.d.ts.map +1 -0
  19. package/lib/types/client/ArkmeBotConversationSurface.d.ts.map +1 -1
  20. package/lib/types/client/ArkmeBotCreateDialog.d.ts +2 -1
  21. package/lib/types/client/ArkmeBotCreateDialog.d.ts.map +1 -1
  22. package/lib/types/client/ArkmeBotSettingsPanel.d.ts.map +1 -1
  23. package/lib/types/client/ArkmeFooterDropdown.d.ts.map +1 -1
  24. package/lib/types/client/ArkmeGroupChatControls.d.ts +4 -2
  25. package/lib/types/client/ArkmeGroupChatControls.d.ts.map +1 -1
  26. package/lib/types/client/ArkmeLongArticleDialog.d.ts.map +1 -1
  27. package/lib/types/client/ArkmeMessageActions.d.ts +41 -0
  28. package/lib/types/client/ArkmeMessageActions.d.ts.map +1 -0
  29. package/lib/types/client/ArkmeMessageSnapshotDialog.d.ts +13 -3
  30. package/lib/types/client/ArkmeMessageSnapshotDialog.d.ts.map +1 -1
  31. package/lib/types/client/ArkmeNotificationPermissionBanner.d.ts +9 -0
  32. package/lib/types/client/ArkmeNotificationPermissionBanner.d.ts.map +1 -0
  33. package/lib/types/client/ArkmePersistentShell.d.ts.map +1 -1
  34. package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -1
  35. package/lib/types/client/ArkmeQuickAdd.d.ts +3 -1
  36. package/lib/types/client/ArkmeQuickAdd.d.ts.map +1 -1
  37. package/lib/types/client/ArkmeRecordingSurface.d.ts +19 -4
  38. package/lib/types/client/ArkmeRecordingSurface.d.ts.map +1 -1
  39. package/lib/types/client/ArkmeSearchSurface.d.ts.map +1 -1
  40. package/lib/types/client/ArkmeSettingsSurface.d.ts +20 -0
  41. package/lib/types/client/ArkmeSettingsSurface.d.ts.map +1 -1
  42. package/lib/types/client/ArkmeSidebar.d.ts +37 -0
  43. package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
  44. package/lib/types/client/ArkmeStartupAuthGate.d.ts.map +1 -1
  45. package/lib/types/client/ArkmeTopicCreateDialog.d.ts.map +1 -1
  46. package/lib/types/client/ArkmeVirtualWorkspace.d.ts +6 -1
  47. package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
  48. package/lib/types/client/ArkmeVoiceContent.d.ts +6 -0
  49. package/lib/types/client/ArkmeVoiceContent.d.ts.map +1 -1
  50. package/lib/types/client/api.d.ts +4 -1
  51. package/lib/types/client/api.d.ts.map +1 -1
  52. package/lib/types/client/attention-summary-store.d.ts +22 -0
  53. package/lib/types/client/attention-summary-store.d.ts.map +1 -0
  54. package/lib/types/client/bot-chat-directory-projection.d.ts.map +1 -1
  55. package/lib/types/client/chat-directory-store.d.ts +1 -0
  56. package/lib/types/client/chat-directory-store.d.ts.map +1 -1
  57. package/lib/types/client/composer-draft-store.d.ts.map +1 -1
  58. package/lib/types/client/desktop-notification-runtime.d.ts +34 -1
  59. package/lib/types/client/desktop-notification-runtime.d.ts.map +1 -1
  60. package/lib/types/client/file-send-tasks.d.ts +3 -0
  61. package/lib/types/client/file-send-tasks.d.ts.map +1 -1
  62. package/lib/types/client/index.d.ts.map +1 -1
  63. package/lib/types/client/navigation-cache.d.ts.map +1 -1
  64. package/lib/types/client/notification-activation-store.d.ts +12 -2
  65. package/lib/types/client/notification-activation-store.d.ts.map +1 -1
  66. package/lib/types/client/read-intent-visibility.d.ts +7 -0
  67. package/lib/types/client/read-intent-visibility.d.ts.map +1 -0
  68. package/lib/types/client/realtime-client-events.d.ts +1 -0
  69. package/lib/types/client/realtime-client-events.d.ts.map +1 -1
  70. package/lib/types/client/record-capture-location.d.ts +70 -5
  71. package/lib/types/client/record-capture-location.d.ts.map +1 -1
  72. package/lib/types/client/record-input-capture.d.ts +266 -0
  73. package/lib/types/client/record-input-capture.d.ts.map +1 -0
  74. package/lib/types/client/recordings/ArkmeRecordingImportDialog.d.ts +15 -0
  75. package/lib/types/client/recordings/ArkmeRecordingImportDialog.d.ts.map +1 -0
  76. package/lib/types/client/recordings/ArkmeRecordingSpeakerEditor.d.ts +27 -0
  77. package/lib/types/client/recordings/ArkmeRecordingSpeakerEditor.d.ts.map +1 -0
  78. package/lib/types/client/recordings/ArkmeRecordingTimeline.d.ts +58 -0
  79. package/lib/types/client/recordings/ArkmeRecordingTimeline.d.ts.map +1 -0
  80. package/lib/types/client/recordings/recording-empty-illustration.d.ts +2 -0
  81. package/lib/types/client/recordings/recording-empty-illustration.d.ts.map +1 -0
  82. package/lib/types/client/recordings/recording-import-selection.d.ts +19 -0
  83. package/lib/types/client/recordings/recording-import-selection.d.ts.map +1 -0
  84. package/lib/types/client/recordings/recording-speaker-presentation.d.ts +2 -0
  85. package/lib/types/client/recordings/recording-speaker-presentation.d.ts.map +1 -0
  86. package/lib/types/client/recordings/useRecordingPlayback.d.ts +14 -0
  87. package/lib/types/client/recordings/useRecordingPlayback.d.ts.map +1 -0
  88. package/lib/types/client/source-identity.d.ts +2 -1
  89. package/lib/types/client/source-identity.d.ts.map +1 -1
  90. package/lib/types/client/ui-controller.d.ts +5 -0
  91. package/lib/types/client/ui-controller.d.ts.map +1 -1
  92. package/lib/types/file-transfer-contract.d.ts +14 -2
  93. package/lib/types/file-transfer-contract.d.ts.map +1 -1
  94. package/lib/types/file-transfer-owner.d.ts +1 -1
  95. package/lib/types/file-transfer-owner.d.ts.map +1 -1
  96. package/lib/types/host-api.d.ts.map +1 -1
  97. package/lib/types/index.d.ts +1 -0
  98. package/lib/types/index.d.ts.map +1 -1
  99. package/lib/types/local-database.d.ts +9 -2
  100. package/lib/types/local-database.d.ts.map +1 -1
  101. package/lib/types/message-action-contract.d.ts +117 -0
  102. package/lib/types/message-action-contract.d.ts.map +1 -0
  103. package/lib/types/record-background-sound.d.ts +7 -0
  104. package/lib/types/record-background-sound.d.ts.map +1 -0
  105. package/lib/types/recording-import-contract.d.ts +71 -0
  106. package/lib/types/recording-import-contract.d.ts.map +1 -0
  107. package/lib/types/recording-import-coordinator.d.ts +34 -0
  108. package/lib/types/recording-import-coordinator.d.ts.map +1 -0
  109. package/lib/types/recording-import-probe.d.ts +19 -0
  110. package/lib/types/recording-import-probe.d.ts.map +1 -0
  111. package/lib/types/recording-import-ref.d.ts +7 -0
  112. package/lib/types/recording-import-ref.d.ts.map +1 -0
  113. package/lib/types/recording-import-routes.d.ts +23 -0
  114. package/lib/types/recording-import-routes.d.ts.map +1 -0
  115. package/lib/types/recording-import-shared.d.ts +19 -0
  116. package/lib/types/recording-import-shared.d.ts.map +1 -0
  117. package/lib/types/recording-presentation.d.ts +14 -1
  118. package/lib/types/recording-presentation.d.ts.map +1 -1
  119. package/lib/types/recording-time.d.ts +5 -0
  120. package/lib/types/recording-time.d.ts.map +1 -0
  121. package/lib/types/rich-media-routes.d.ts.map +1 -1
  122. package/lib/types/sdk/index.d.ts +9 -3
  123. package/lib/types/sdk/index.d.ts.map +1 -1
  124. package/lib/types/services/arko-service.d.ts +3 -1
  125. package/lib/types/services/arko-service.d.ts.map +1 -1
  126. package/lib/types/services/background-sound-membership-service.d.ts +17 -0
  127. package/lib/types/services/background-sound-membership-service.d.ts.map +1 -0
  128. package/lib/types/services/background-sound-preference-service.d.ts +14 -0
  129. package/lib/types/services/background-sound-preference-service.d.ts.map +1 -0
  130. package/lib/types/services/bot-conversation-service.d.ts +2 -1
  131. package/lib/types/services/bot-conversation-service.d.ts.map +1 -1
  132. package/lib/types/services/chat-realtime-service.d.ts +28 -1
  133. package/lib/types/services/chat-realtime-service.d.ts.map +1 -1
  134. package/lib/types/services/chat-service.d.ts +20 -2
  135. package/lib/types/services/chat-service.d.ts.map +1 -1
  136. package/lib/types/services/contact-directory-service.d.ts +6 -0
  137. package/lib/types/services/contact-directory-service.d.ts.map +1 -1
  138. package/lib/types/services/desktop-attention-bridge.d.ts +61 -0
  139. package/lib/types/services/desktop-attention-bridge.d.ts.map +1 -0
  140. package/lib/types/services/file-transfers.d.ts +13 -1
  141. package/lib/types/services/file-transfers.d.ts.map +1 -1
  142. package/lib/types/services/group-service.d.ts +7 -6
  143. package/lib/types/services/group-service.d.ts.map +1 -1
  144. package/lib/types/services/media-service.d.ts +17 -0
  145. package/lib/types/services/media-service.d.ts.map +1 -1
  146. package/lib/types/services/message-action-infrastructure.d.ts +29 -0
  147. package/lib/types/services/message-action-infrastructure.d.ts.map +1 -0
  148. package/lib/types/services/message-action-service.d.ts +53 -0
  149. package/lib/types/services/message-action-service.d.ts.map +1 -0
  150. package/lib/types/services/record-service.d.ts +2 -0
  151. package/lib/types/services/record-service.d.ts.map +1 -1
  152. package/lib/types/services/recording-import-gateway.d.ts +33 -0
  153. package/lib/types/services/recording-import-gateway.d.ts.map +1 -0
  154. package/lib/types/services/recording-service.d.ts +83 -4
  155. package/lib/types/services/recording-service.d.ts.map +1 -1
  156. package/lib/types/services/service.d.ts +15 -0
  157. package/lib/types/services/service.d.ts.map +1 -1
  158. package/lib/types/services/source-service.d.ts +8 -1
  159. package/lib/types/services/source-service.d.ts.map +1 -1
  160. package/lib/types/state-store.d.ts +8 -0
  161. package/lib/types/state-store.d.ts.map +1 -1
  162. package/lib/types/tools/business/account/background-sound.d.ts +4 -0
  163. package/lib/types/tools/business/account/background-sound.d.ts.map +1 -0
  164. package/lib/types/tools/business/account/index.d.ts.map +1 -1
  165. package/lib/types/tools/business/media/files.d.ts.map +1 -1
  166. package/lib/types/tools/ports/groups.d.ts +2 -2
  167. package/lib/types/tools/ports/groups.d.ts.map +1 -1
  168. package/lib/types/tools/ports/profile.d.ts +3 -1
  169. package/lib/types/tools/ports/profile.d.ts.map +1 -1
  170. package/lib/types/tools/prompts/business.d.ts.map +1 -1
  171. package/lib/types/tools/registry/registrar.d.ts.map +1 -1
  172. package/lib/types/tools/shared/conversational-confirmation.d.ts +15 -2
  173. package/lib/types/tools/shared/conversational-confirmation.d.ts.map +1 -1
  174. package/lib/types/types.d.ts +124 -6
  175. package/lib/types/types.d.ts.map +1 -1
  176. package/package.json +7 -6
@@ -3,7 +3,23 @@
3
3
  "platform": "win32",
4
4
  "arch": "x64",
5
5
  "file": "arkme-credential-helper.exe",
6
- "sha256": "8b598f3f4facb0c785c3fbc29ccddb75a08e90528ba02a55fc6c996442ec4a16",
6
+ "sha256": "fbfb99a440b2f1fcb83e49f29bb752ae214c4c2fe14890609835b53a8438db58",
7
7
  "sourceSha256": "7e2267aa232d4fbe785d2ab88bd707ab6edacd88bd454fda7f8017ddfc0335b6",
8
- "goVersion": "go version go1.25.5 darwin/arm64"
8
+ "goVersion": "go version go1.25.5 darwin/arm64",
9
+ "helperVersion": "1.0.0.0",
10
+ "pe": {
11
+ "CompanyName": "Senqisi (Wuhan) Technology Co., Ltd.",
12
+ "ProductName": "Arkme Credential Helper",
13
+ "FileDescription": "Arkme Windows Credential Manager Helper",
14
+ "InternalName": "arkme-credential-helper",
15
+ "OriginalFilename": "arkme-credential-helper.exe",
16
+ "FileVersion": "1.0.0.0",
17
+ "ProductVersion": "1.0.0.0"
18
+ },
19
+ "authenticode": {
20
+ "digestAlgorithm": "sha256",
21
+ "signerSubject": "CN=\"Senqisi (Wuhan) Technology Co., Ltd.\", O=\"Senqisi (Wuhan) Technology Co., Ltd.\", L=Wuhan, S=Hubei, C=CN",
22
+ "signerSha1": "00ADCF59ACCC45F4643B4A682E32620C206CE66B",
23
+ "timestampRequired": true
24
+ }
9
25
  }
package/cordis.patch.yml CHANGED
@@ -26,6 +26,7 @@
26
26
  relatedRecordingsEnabled: true
27
27
  geetestCaptchaId: ec81315ab8b0f18a7bfa13602d01e307
28
28
  interwovenMomentsEnabled: true
29
+ recordingWorkbenchEnabled: true
29
30
  chatMemberJoinEventsEnabled: true
30
31
  allowNonLoopback: false
31
32
  allowProduction: true
@@ -141,6 +141,45 @@ Chat items returned by `readSource()` may include an opaque sender `avatarRef`.
141
141
 
142
142
  Timeline items may include `contentBlocks` for image, video, audio, and file content. Long articles use the owner contract's `templateKind: 8`; `displayKind: 1` remains accepted only as a compatibility signal for previously sent plugin records. Each block's `mediaRef` is account-bound and short-lived. Render it with `sdk.mediaUrl(mediaRef)`; never decode or persist it. `upload()` sends a browser file only to the same-origin plugin route and returns an Arkme asset descriptor for `sendRich()`.
143
143
 
144
+ ### Text background sound and location capture
145
+
146
+ Background sound is an explicit role, never an audio-MIME heuristic. An ordinary `audio/*` asset passed in `sendRich().assets` remains an ordinary attachment. A direct rich send passes background assets separately:
147
+
148
+ ```ts
149
+ const background = await arkme.upload(backgroundBlob, { fileName: 'background.m4a' })
150
+ await arkme.sendRich(sourceRef, {
151
+ textContent: '这是一条带背景音的文字快记',
152
+ backgroundSound: { assets: [background], amplitudes: [0.1, 0.6, 0.3] },
153
+ })
154
+ ```
155
+
156
+ The direct `upload()` route reports audio as service `fileKind: 2`, while a locally staged generic file currently reports `fileKind: 4`; both are accepted as background audio only when they appear in the separate `backgroundSound` descriptor. Putting either asset in ordinary `assets` keeps `content_file_role=1`.
157
+
158
+ For durable sends, stage every file first and pass every background ref in both `fileRefs` and `backgroundSound.fileRefs`. `sendFiles()` persists that descriptor with the task, uploads each local file at most once, and reuses the same uploaded asset and descriptor after a retry. A descriptor is rejected when refs are duplicated or not a subset, samples are non-finite or outside `0..1`, or a selected file is not an ordinary `audio/*` file (`fileKind: 4`).
159
+
160
+ The Browser UI may also persist a send-scoped `location` on a durable task after the user has explicitly enabled location recording. The task owner applies it only after the final record UID is confirmed, including reconciliation. External SDK consumers must obtain the same explicit user authorization before supplying precise coordinates. Model-facing file Tools neither accept nor return this field.
161
+
162
+ Gate background-sound sends on `capabilities().features.backgroundSound` so the same Consumer degrades cleanly on older Providers. The built-in message-detail owner remains authoritative for snapshot retrieval and display; this contract only extends that existing detail with optional background playback and the already-authorized location facts.
163
+
164
+ Successful `sendText()`, `sendRich()` and durable `sendFiles()` confirmations may return the same Host-signed `messageActionRef` immediately, before an authoritative timeline refresh. Consumers may use it to enable message actions without waiting for projection convergence, but must treat omission as a compatibility/degraded state and wait for `readSource()`; they must never synthesize or weaken validation of the reference.
165
+
166
+ The switch itself is an account-scoped server owner, not a browser-local preference. `backgroundSoundPreference()` reads `/api/v1/settings/background-voice/query` and the independent record-service membership owner; `updateBackgroundSoundPreference(enabled, signal?, expectedUserId?)` writes only `{ enabled }` to `/api/v1/settings/background-voice/update`. The built-in Host UI, SDK Consumer and confirmed Tool pass the `userId` captured from that verified read as `expectedUserId`; the owner rejects an account switch before the remote write. The Host verifies the returned `user_id` against the active session and returns `{ userId, found, enabled, eligible, memberType?, eligibilityReason, sourceVersion?, updatedAtMillis? }`. Free membership forces `enabled=false`; unknown membership also fails closed but remains distinguishable as `eligibilityReason=membership-unavailable`. Enabling is rejected before the settings write unless the membership owner confirms eligibility; disabling always remains available. A UI may update its local projection optimistically, but it must restore the previous value when the owner write fails. `found=false` means use the local default (`false`) without manufacturing a server fact.
167
+
168
+ Calling `updateBackgroundSoundPreference(true)` is allowed only from a current explicit human UI/SDK action and still does not grant microphone permission; the interactive composer owns that separate browser permission request. Model Tools can read the preference or, after explicit write confirmation, disable it. They intentionally have no enable parameter, because a model must not turn on a recording-affecting preference or trigger a microphone flow.
169
+
170
+ Do not derive subscription eligibility from `profile().accountType`; that field is an account classification, not the Flutter membership owner. `BackgroundSoundMembershipService` reads the authoritative `/api/v1/premium/get/member` `member_type` fact: `0` is free and ineligible, while positive member types are eligible. A failed or malformed membership read is `membership-unavailable`, not proof that the account is free.
171
+
172
+ Capability matrix:
173
+
174
+ | Surface | Entry | Contract and safety boundary |
175
+ | --- | --- | --- |
176
+ | Built-in UI | Settings switch, composer capture and message snapshot dialog | The switch is a reversible local projection of the account owner. One input-capture owner submits the explicit background descriptor; the snapshot dialog reads the same Host detail owner. |
177
+ | Browser SDK | `backgroundSoundPreference()`, `updateBackgroundSoundPreference()`, `sendRich()`, `sendFiles()` | Typed same-origin calls; no credentials, storage paths, implicit microphone grant, raw record id, or inferred background role. Enabling requires a current explicit human action. |
178
+ | DSH Tool | `arkme_background_sound_status`, `arkme_background_sound_disable`, `arkme_files_send` | Disable/file send remain `explicit-user-write`; no Tool can enable or open the microphone. File send reuses only staged opaque refs and never exposes precise location. |
179
+ | Host owner | `BackgroundSoundMembershipService`, `BackgroundSoundPreferenceService`, `ChatService.sendSourceRich()` and the existing snapshot detail owner | The settings owner validates current-account identity. One payload builder merges ordinary assets, mentions and background items. Background refs use `file_type=5`, `content_file_role=4`, `binding_type=4`, `render_role=1`; only-background text keeps the plain-text template. Existing account, source, permission and idempotency checks remain authoritative. |
180
+
181
+ Snapshot `backgroundSound=available` requires an identified media row (`file_asset_uid`, `uid`, `media_id`, or compatible file ID) carrying role `content_file_role=4`, `binding_type=4`, or legacy `file_type/type=5`. Waveform amplitudes without such a file remain `not-recorded`; an ordinary audio MIME never supplies the role.
182
+
144
183
  `capabilities().features.forwardContent === true` advertises expanded `readSource()` forward snapshots. `forwardRecords.items` may contain `sourceType`, `segments` (speaker, full text, relative start/end milliseconds), `contentBlocks` and `mediaUnavailable`. Segment audio also uses `contentBlocks`, never raw URLs. The same snapshot is returned to the built-in UI and `arkme_source_read`. Missing optional fields on older Providers mean text-only rendering, not an error. Unknown source types remain `unknown`; filenames must not determine recording type. No original chat name or source access is implied. A transcript with no attachment is not playable. `truncated` marks bounded output (100 flattened records, nesting depth four; up to 500 segments per record / 2000 total; 32 attachments per record). Display it as partial, never silently claim a complete archive.
145
184
 
146
185
  Consumers retain no additional resources for a one-shot `readSource()`. If they call `subscribe()`, invoke its returned unsubscribe function on disposal. Refresh the received timeline when a media reference expires; do not query the private original recording or cache/decode its reference. Unsupported `contractVersion` is rejected by `capabilities()`; an absent optional `forwardContent` feature falls back to the existing text snapshot.