@senguoyun/dsh-arkme 0.1.11 → 0.1.12

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 (135) hide show
  1. package/README.md +4 -0
  2. package/docs/gui-production-integration.md +46 -0
  3. package/docs/record-calendar-ui-flow.md +88 -0
  4. package/docs/tool-registry.md +4 -0
  5. package/lib/client.js +24408 -18902
  6. package/lib/client.js.map +1 -1
  7. package/lib/index.js +810 -55
  8. package/lib/persistent-extension.js +2 -2
  9. package/lib/{persistent-runtime-DInn3Zb1.js → persistent-runtime-kUpXXUZI.js} +1211 -201
  10. package/lib/sdk.js +88 -1
  11. package/lib/types/arkme-service.d.ts +38 -1
  12. package/lib/types/arkme-service.d.ts.map +1 -1
  13. package/lib/types/chat-realtime.d.ts +8 -0
  14. package/lib/types/chat-realtime.d.ts.map +1 -1
  15. package/lib/types/client/ArkmeAccountMenu.d.ts +4 -0
  16. package/lib/types/client/ArkmeAccountMenu.d.ts.map +1 -0
  17. package/lib/types/client/ArkmeArkoSurface.d.ts.map +1 -1
  18. package/lib/types/client/ArkmeAvatar.d.ts.map +1 -1
  19. package/lib/types/client/ArkmeBrand.d.ts +35 -0
  20. package/lib/types/client/ArkmeBrand.d.ts.map +1 -0
  21. package/lib/types/client/ArkmeCalendarSurface.d.ts +10 -0
  22. package/lib/types/client/ArkmeCalendarSurface.d.ts.map +1 -0
  23. package/lib/types/client/ArkmeConversationSurface.d.ts +5 -3
  24. package/lib/types/client/ArkmeConversationSurface.d.ts.map +1 -1
  25. package/lib/types/client/ArkmeExtensionAvatar.d.ts.map +1 -1
  26. package/lib/types/client/ArkmeExtensionCenter.d.ts +17 -4
  27. package/lib/types/client/ArkmeExtensionCenter.d.ts.map +1 -1
  28. package/lib/types/client/ArkmeFooterDropdown.d.ts +1 -1
  29. package/lib/types/client/ArkmeFooterDropdown.d.ts.map +1 -1
  30. package/lib/types/client/ArkmeGroupChatControls.d.ts +1 -0
  31. package/lib/types/client/ArkmeGroupChatControls.d.ts.map +1 -1
  32. package/lib/types/client/ArkmeLogin.d.ts.map +1 -1
  33. package/lib/types/client/ArkmePrivateCallMenu.d.ts.map +1 -1
  34. package/lib/types/client/ArkmeProductNavigation.d.ts +8 -0
  35. package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -0
  36. package/lib/types/client/ArkmeRecordingSurface.d.ts.map +1 -1
  37. package/lib/types/client/ArkmeSearchSurface.d.ts.map +1 -1
  38. package/lib/types/client/ArkmeSendToSelfIcon.d.ts +5 -0
  39. package/lib/types/client/ArkmeSendToSelfIcon.d.ts.map +1 -0
  40. package/lib/types/client/ArkmeSettingsRow.d.ts.map +1 -1
  41. package/lib/types/client/ArkmeSettingsSurface.d.ts +2 -0
  42. package/lib/types/client/ArkmeSettingsSurface.d.ts.map +1 -0
  43. package/lib/types/client/ArkmeSharedExtensionDetail.d.ts +7 -0
  44. package/lib/types/client/ArkmeSharedExtensionDetail.d.ts.map +1 -0
  45. package/lib/types/client/ArkmeSidebar.d.ts +11 -2
  46. package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
  47. package/lib/types/client/ArkmeTopicCreateDialog.d.ts +1 -1
  48. package/lib/types/client/ArkmeTopicCreateDialog.d.ts.map +1 -1
  49. package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts +1 -0
  50. package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts.map +1 -1
  51. package/lib/types/client/ArkmeVirtualWorkspace.d.ts +6 -1
  52. package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
  53. package/lib/types/client/api.d.ts +1 -1
  54. package/lib/types/client/api.d.ts.map +1 -1
  55. package/lib/types/client/arkme-assets.d.ts +2 -2
  56. package/lib/types/client/arkme-assets.d.ts.map +1 -1
  57. package/lib/types/client/arkme-theme.d.ts +5 -3
  58. package/lib/types/client/arkme-theme.d.ts.map +1 -1
  59. package/lib/types/client/arkme-wordmark.d.ts +3 -0
  60. package/lib/types/client/arkme-wordmark.d.ts.map +1 -0
  61. package/lib/types/client/desktop-notification-runtime.d.ts +35 -0
  62. package/lib/types/client/desktop-notification-runtime.d.ts.map +1 -0
  63. package/lib/types/client/extension-share-deeplink.d.ts +5 -0
  64. package/lib/types/client/extension-share-deeplink.d.ts.map +1 -0
  65. package/lib/types/client/index.d.ts +7 -0
  66. package/lib/types/client/index.d.ts.map +1 -1
  67. package/lib/types/client/interwoven-moments.d.ts +1 -1
  68. package/lib/types/client/interwoven-moments.d.ts.map +1 -1
  69. package/lib/types/client/notification-activation-store.d.ts +16 -0
  70. package/lib/types/client/notification-activation-store.d.ts.map +1 -0
  71. package/lib/types/client/related-recordings.d.ts +1 -0
  72. package/lib/types/client/related-recordings.d.ts.map +1 -1
  73. package/lib/types/client/ui-controller.d.ts +10 -1
  74. package/lib/types/client/ui-controller.d.ts.map +1 -1
  75. package/lib/types/extensions/manager.d.ts +18 -1
  76. package/lib/types/extensions/manager.d.ts.map +1 -1
  77. package/lib/types/extensions/owned-inventory.d.ts +4 -1
  78. package/lib/types/extensions/owned-inventory.d.ts.map +1 -1
  79. package/lib/types/extensions/owned-types.d.ts +1 -0
  80. package/lib/types/extensions/owned-types.d.ts.map +1 -1
  81. package/lib/types/extensions/persistent-bundle.d.ts +7 -0
  82. package/lib/types/extensions/persistent-bundle.d.ts.map +1 -1
  83. package/lib/types/extensions/persistent-client-bundle.d.ts.map +1 -1
  84. package/lib/types/extensions/persistent-runtime.d.ts +6 -0
  85. package/lib/types/extensions/persistent-runtime.d.ts.map +1 -1
  86. package/lib/types/extensions/publish-client.d.ts +5 -1
  87. package/lib/types/extensions/publish-client.d.ts.map +1 -1
  88. package/lib/types/extensions/share-discovery-relay.d.ts +33 -0
  89. package/lib/types/extensions/share-discovery-relay.d.ts.map +1 -0
  90. package/lib/types/extensions/types.d.ts +48 -1
  91. package/lib/types/extensions/types.d.ts.map +1 -1
  92. package/lib/types/host-api.d.ts.map +1 -1
  93. package/lib/types/index.d.ts +4 -2
  94. package/lib/types/index.d.ts.map +1 -1
  95. package/lib/types/rich-media-routes.d.ts.map +1 -1
  96. package/lib/types/sdk/index.d.ts +44 -4
  97. package/lib/types/sdk/index.d.ts.map +1 -1
  98. package/lib/types/services/calendar-service.d.ts +25 -0
  99. package/lib/types/services/calendar-service.d.ts.map +1 -0
  100. package/lib/types/services/chat-realtime-service.d.ts +19 -4
  101. package/lib/types/services/chat-realtime-service.d.ts.map +1 -1
  102. package/lib/types/services/group-service.d.ts +17 -2
  103. package/lib/types/services/group-service.d.ts.map +1 -1
  104. package/lib/types/services/media-service.d.ts +9 -1
  105. package/lib/types/services/media-service.d.ts.map +1 -1
  106. package/lib/types/services/search-service.d.ts +10 -2
  107. package/lib/types/services/search-service.d.ts.map +1 -1
  108. package/lib/types/services/service.d.ts +1 -0
  109. package/lib/types/services/service.d.ts.map +1 -1
  110. package/lib/types/services/world-service.d.ts +7 -1
  111. package/lib/types/services/world-service.d.ts.map +1 -1
  112. package/lib/types/tools/business/calendar/index.d.ts +4 -0
  113. package/lib/types/tools/business/calendar/index.d.ts.map +1 -0
  114. package/lib/types/tools/business/groups/index.d.ts +3 -0
  115. package/lib/types/tools/business/groups/index.d.ts.map +1 -0
  116. package/lib/types/tools/business/index.d.ts.map +1 -1
  117. package/lib/types/tools/business/records/images.d.ts +2 -0
  118. package/lib/types/tools/business/records/images.d.ts.map +1 -0
  119. package/lib/types/tools/business/records/index.d.ts.map +1 -1
  120. package/lib/types/tools/extensions/index.d.ts.map +1 -1
  121. package/lib/types/tools/extensions/publish-conversation.d.ts +1 -0
  122. package/lib/types/tools/extensions/publish-conversation.d.ts.map +1 -1
  123. package/lib/types/tools/ports/calendar.d.ts +17 -0
  124. package/lib/types/tools/ports/calendar.d.ts.map +1 -0
  125. package/lib/types/tools/ports/groups.d.ts +11 -0
  126. package/lib/types/tools/ports/groups.d.ts.map +1 -0
  127. package/lib/types/tools/ports/index.d.ts +4 -2
  128. package/lib/types/tools/ports/index.d.ts.map +1 -1
  129. package/lib/types/tools/ports/records.d.ts +6 -1
  130. package/lib/types/tools/ports/records.d.ts.map +1 -1
  131. package/lib/types/tools/prompts/business.d.ts.map +1 -1
  132. package/lib/types/tools/registry/registrar.d.ts.map +1 -1
  133. package/lib/types/types.d.ts +172 -2
  134. package/lib/types/types.d.ts.map +1 -1
  135. package/package.json +5 -4
package/README.md CHANGED
@@ -5,6 +5,10 @@ Arkme 的 DeepSeek Harness 集成插件,为 DSH 提供账号、记录、聊天
5
5
  - npm:[`@senguoyun/dsh-arkme`](https://www.npmjs.com/package/@senguoyun/dsh-arkme)
6
6
  - 源码:[`arkme-senx/arkme-dsh-plugin`](https://github.com/arkme-senx/arkme-dsh-plugin)
7
7
 
8
+ ## 功能
9
+
10
+ - 内置搜索页支持快记搜索、搜索历史、纯图片库和已生成 AI 视频快速入口;图片库采用桌面端多列视图并排除普通视频。
11
+
8
12
  ## 安装
9
13
 
10
14
  将插件安装到 DSH Web Profile:
@@ -0,0 +1,46 @@
1
+ # Arkme GUI production integration
2
+
3
+ This branch implements the selected Arkme desktop visual direction in the production plugin UI. It is not a standalone demo application.
4
+
5
+ ## Modification boundary
6
+
7
+ - The entry remains the official DSH `sidebar.footer.action` slot registered by the Arkme client bundle.
8
+ - The complete transparent Arkme wordmark occupies the top-left `sidebar.brand.mark` slot and the adjacent `sidebar.brand.name` slot intentionally renders nothing. The square `conversation.hero.brand.mark` slot keeps the compact Arkme mark because DSH owns the adjacent `探索未至之境` headline and exposes no title slot.
9
+ - The product navigation and all new visual styles render below nodes marked with `data-arkme-owned`.
10
+ - No global stylesheet, DSH package import, DSH source patch, or write to a DSH repository is used.
11
+ - The existing floating surface still measures the host conversation region at runtime. That compatibility adapter is pre-existing plugin code; this branch does not patch the measured DSH element.
12
+ - DSH top chrome, native sidebar dimensions, native session list, and native conversation components remain owned by DSH and are intentionally unchanged.
13
+
14
+ ## Supported visual routes
15
+
16
+ | Route | Layout inside the Arkme surface | Production owner | Status |
17
+ | --- | --- | --- | --- |
18
+ | Conversations | Feature rail + conversation directory + content | Existing Arkme source directory and timeline | Implemented |
19
+ | Recordings | Feature rail + full-width recording page | Existing recording calendar/day API | Implemented with the updated Demo's date browser, selected-day list, day timeline, and content tabs |
20
+ | Search | Feature rail + full-width search page | Existing record search and AI video API | Implemented with the existing search actions and history |
21
+ | Calendar | Feature rail + floating month calendar + day-content panel | Baseline calendar bucket/day APIs | Implemented with real counts, date switching, paging, loading, empty, and error states |
22
+ | Plugins | Feature rail + full-width plugin page | Existing Arkme extension center | Implemented as the real search/install/uninstall center |
23
+ | Tasks | Not rendered | No stable task-list/session contract in the plugin | Deferred; no mock implementation |
24
+
25
+ The conversation directory is mounted only in conversation mode. It is unmounted for recordings, search, calendar, and plugins so its asynchronous source restoration cannot force a utility page back to the conversation layout.
26
+
27
+ The conversation route keeps the existing production composer for this iteration. Its add-content `+` is moved to the far-left edge of the toolbar, while the remaining redesign is limited to the surrounding three-column shell, directory density, header alignment, message typography and bubbles, member drawer alignment, and list metadata placement.
28
+
29
+ The plugin page keeps the production extension operations. The embedded discovery view intentionally omits the modal-only category tab strip to match the Demo; `我的插件` switches to the installed list, while install, uninstall, detail, loading, restart, and error flows remain the existing implementations.
30
+
31
+ ## Capability matrix
32
+
33
+ | Surface | Decision | Evidence |
34
+ | --- | --- | --- |
35
+ | UI | Required | Production `src/client` components provide navigation, responsive layout, and visible states. |
36
+ | Tools | N/A | This change adds no Host route, query, command, or persisted business capability. Existing Tools are unchanged. |
37
+ | SDK | N/A | This change adds no business capability for external plugins. Existing SDK exports are unchanged. |
38
+ | Host owner | Existing owners | Conversations, recordings, search, and extensions continue to use their existing `callArkme` operations. |
39
+
40
+ ## Packaging acceptance
41
+
42
+ The final acceptance artifact must be an immutable `.tgz` built from this worktree and installed into a fresh profile of an unmodified supported DSH runtime. A standalone Vite preview is not acceptance evidence.
43
+
44
+ Final acceptance used the rebased `@senguoyun/dsh-arkme@0.1.11` package as an immutable `.tgz` installed through the official DSH plugin command into a fresh isolated DSH home. The runtime was a clean `@deepseek-ai/dsh@0.1.0-rc.8` install with no runtime-level Arkme dependency; no DSH checkout was created or modified.
45
+
46
+ Typecheck, production build, and the complete test suite passed. The suite result is 152 test files passed and 3 skipped, with 837 tests passed and 3 skipped. Saved Demo/production comparisons remain in `qa/`; final host-integration checks were performed at `http://127.0.0.1:5193/`.
@@ -0,0 +1,88 @@
1
+ # DSH Record Calendar UI Flow
2
+
3
+ ## Scope
4
+
5
+ Migrate the Arkme record calendar surface into the DSH plugin by reusing the client record-service calendar APIs:
6
+
7
+ - `POST /api/v1/calendar/buckets/query`
8
+ - `POST /api/v1/calendar/records/query`
9
+
10
+ The DSH plugin exposes only the signed-in user's self calendar in this iteration. Topic-scoped calendar can be added later through provider-issued `sourceRef` resolution without exposing raw topic UIDs.
11
+
12
+ ## Capability Matrix
13
+
14
+ | Surface | Entry | Owner |
15
+ | --- | --- | --- |
16
+ | UI | `calendar.buckets`, `calendar.records` from `ArkmeCalendarSurface` | `CalendarService` |
17
+ | SDK | `sdk.calendarBuckets()`, `sdk.calendarRecords()` | `CalendarService` |
18
+ | Tools | `arkme_record_calendar_days`, `arkme_record_calendar_read` | `CalendarService` |
19
+ | Host owner | `CalendarService` validates date/range/cursor and projects safe record fields | Record service APIs |
20
+
21
+ ## UI Diagram
22
+
23
+ ```text
24
+ Arkme feature rail
25
+ 对话
26
+ 录音
27
+ 搜索
28
+ 日历 <- selected
29
+ 插件
30
+
31
+ Arkme surface: 日历
32
+ +-------------------------------------------------------------+
33
+ | +---------------------------+ +-------------------------+ |
34
+ | | [<] [>] 2026年8月 回到今日 × | | 2026年8月 × | |
35
+ | | | | 21日 · 今天 41条内容 | |
36
+ | |
37
+ | | 一 二 三 四 五 六 日 | | 当天快记 | |
38
+ | | 1 2 | | 10:50 会议纪要 | |
39
+ | | 3 4 5 6 7 8 9 | | 讨论日历迁移 | |
40
+ | | ... | | ... | |
41
+ | | 17 18 19 20 [21] 22 23 | | 加载更多 | |
42
+ | +---------------------------+ +-------------------------+ |
43
+ +-------------------------------------------------------------+
44
+ ```
45
+
46
+ ## Interaction Diagram
47
+
48
+ ```text
49
+ User clicks 日历
50
+ -> ArkmeUiController.showCalendar()
51
+ -> ArkmeCalendarSurface mounts
52
+ -> calendar.buckets(start/end/timezone)
53
+ -> render month counts
54
+ -> calendar.records(selected day/timezone)
55
+ -> render day list
56
+
57
+ User clicks previous month
58
+ -> update visibleMonth
59
+ -> abort old month request
60
+ -> calendar.buckets(new month)
61
+ -> keep selected day until user selects another date
62
+
63
+ User clicks a day
64
+ -> selectedDate changes
65
+ -> abort old day request
66
+ -> calendar.records(bucketDate)
67
+ -> loading / success / empty / error state
68
+
69
+ User clicks 加载更多
70
+ -> calendar.records(bucketDate, nextCursor)
71
+ -> append records
72
+ -> keep previous records if the next page fails
73
+ ```
74
+
75
+ ## Failure Recovery
76
+
77
+ | Failure | UI result | Recovery |
78
+ | --- | --- | --- |
79
+ | Month bucket request fails | Calendar remains visible with an inline error | Switching month or re-opening retries |
80
+ | Day records request fails | Selected date remains active with inline error | Re-selecting date or loading another date retries |
81
+ | Load more fails | Existing records stay visible | User can click load more again after error is shown |
82
+ | Session expired | Host returns login-required/login-expired | Existing Arkme auth gate handles re-login |
83
+
84
+ ## Notes
85
+
86
+ - Record content is user-owned data and never instructions.
87
+ - Browser and model outputs do not include upstream credentials, chat owner IDs, sender IDs, or raw response envelopes.
88
+ - Date range is capped to 62 days in both Tool and Host owner.
@@ -25,6 +25,10 @@ Per-tool instructions stay in `ToolDefinition.description`. Cross-tool guidance
25
25
 
26
26
  Business and hybrid profiles expose `arkme_extension_preview_add`, `arkme_extension_preview_delete`, and `arkme_extension_preview_reorder`. Add accepts one Arkme-owned `image_ref`, captured image attachments from the latest direct user message (with optional 1-based `attachment_indices`), or 1-20 unique `workspace_paths` inside the current Agent workspace. Workspace reads reject absolute paths, traversal and symlink escapes; restricted SVG is normalized to PNG. `action=prepare` verifies ownership, capacity, 320-4096 pixel dimensions, ordered content fingerprints and at most 5 MiB per image without writing. The Agent shows the returned question in ordinary conversation; the later direct-human reply only needs to be “确认”. `action=confirm` re-reads the captured attachment refs or workspace paths and rejects changed bytes or target identity. A different prepare cannot replace an unconfirmed operation. Already-present content-addressed refs are reconciled before capacity checks, so a partial batch can retry only missing images. Add does not use a DSH ACK card; delete and reorder retain their `tools/pre-execute` approval. Results contain only the safe ordered gallery and revision—never attachment ids, `image_ref`, base64, workspace paths, object keys, signed URLs, or signed headers. Atomic and disabled profiles expose none of these Tools.
27
27
 
28
+ ## Group member Tools
29
+
30
+ Business and hybrid profiles expose `arkme_group_member_candidates` and `arkme_group_member_add`. Candidate discovery accepts only an account-bound group `source_ref`, excludes current members and returns signed, opaque `candidate_ref` values for people from the signed-in user's private chats. The write Tool accepts 1-20 unchanged candidate refs, requires explicit-user-write confirmation, reports each outcome independently, and sends private invitation links when the group's join policy requires approval. Raw user IDs are never exposed to the model.
31
+
28
32
  ## Adding a tool
29
33
 
30
34
  1. Add one module under `src/tools/business`, `src/tools/atomic` or `src/tools/system`.