@scotthuang/agent-knock-knock 0.13.18 → 0.14.0

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 (270) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/CONTRIBUTING.md +212 -0
  3. package/README.md +105 -166
  4. package/connectors/deepseek-harness/LICENSE +21 -0
  5. package/connectors/deepseek-harness/README.md +406 -0
  6. package/connectors/pi/LICENSE +21 -0
  7. package/connectors/pi/README.md +446 -0
  8. package/dist/src/backend-recovery-semantic.d.ts +16 -0
  9. package/dist/src/backend-recovery-semantic.js +113 -0
  10. package/dist/src/backend-recovery-semantic.js.map +1 -0
  11. package/dist/src/backend-task-recovery.d.ts +103 -0
  12. package/dist/src/backend-task-recovery.js +142 -0
  13. package/dist/src/backend-task-recovery.js.map +1 -0
  14. package/dist/src/callback-transport.d.ts +8 -0
  15. package/dist/src/callback-transport.js +14 -0
  16. package/dist/src/callback-transport.js.map +1 -1
  17. package/dist/src/cli-core.js +18 -8
  18. package/dist/src/cli-core.js.map +1 -1
  19. package/dist/src/cli-runtime-context.d.ts +5 -0
  20. package/dist/src/cli-runtime-context.js.map +1 -1
  21. package/dist/src/codex-native-cli-adapter.d.ts +6 -0
  22. package/dist/src/codex-native-cli-adapter.js +273 -0
  23. package/dist/src/codex-native-cli-adapter.js.map +1 -0
  24. package/dist/src/codex-native-client-interactions.d.ts +6 -0
  25. package/dist/src/codex-native-client-interactions.js +124 -0
  26. package/dist/src/codex-native-client-interactions.js.map +1 -0
  27. package/dist/src/codex-native-client-rpc.d.ts +21 -0
  28. package/dist/src/codex-native-client-rpc.js +137 -0
  29. package/dist/src/codex-native-client-rpc.js.map +1 -0
  30. package/dist/src/codex-native-client.d.ts +42 -0
  31. package/dist/src/codex-native-client.js +326 -0
  32. package/dist/src/codex-native-client.js.map +1 -0
  33. package/dist/src/codex-native-identity.d.ts +6 -0
  34. package/dist/src/codex-native-identity.js +42 -0
  35. package/dist/src/codex-native-identity.js.map +1 -0
  36. package/dist/src/codex-native-monitor.d.ts +4 -0
  37. package/dist/src/codex-native-monitor.js +92 -0
  38. package/dist/src/codex-native-monitor.js.map +1 -0
  39. package/dist/src/codex-native-outbox.d.ts +16 -0
  40. package/dist/src/codex-native-outbox.js +120 -0
  41. package/dist/src/codex-native-outbox.js.map +1 -0
  42. package/dist/src/codex-native-public-projection.d.ts +545 -0
  43. package/dist/src/codex-native-public-projection.js +182 -0
  44. package/dist/src/codex-native-public-projection.js.map +1 -0
  45. package/dist/src/codex-native-record-store.d.ts +27 -0
  46. package/dist/src/codex-native-record-store.js +111 -0
  47. package/dist/src/codex-native-record-store.js.map +1 -0
  48. package/dist/src/codex-native-response-service.d.ts +69 -0
  49. package/dist/src/codex-native-response-service.js +244 -0
  50. package/dist/src/codex-native-response-service.js.map +1 -0
  51. package/dist/src/codex-native-runtime.d.ts +46 -0
  52. package/dist/src/codex-native-runtime.js +112 -0
  53. package/dist/src/codex-native-runtime.js.map +1 -0
  54. package/dist/src/codex-native-semantic.d.ts +17 -0
  55. package/dist/src/codex-native-semantic.js +175 -0
  56. package/dist/src/codex-native-semantic.js.map +1 -0
  57. package/dist/src/codex-native-snapshot.d.ts +19 -0
  58. package/dist/src/codex-native-snapshot.js +160 -0
  59. package/dist/src/codex-native-snapshot.js.map +1 -0
  60. package/dist/src/codex-native-state-store.d.ts +61 -0
  61. package/dist/src/codex-native-state-store.js +132 -0
  62. package/dist/src/codex-native-state-store.js.map +1 -0
  63. package/dist/src/codex-native-task-service.d.ts +71 -0
  64. package/dist/src/codex-native-task-service.js +502 -0
  65. package/dist/src/codex-native-task-service.js.map +1 -0
  66. package/dist/src/codex-native-types.d.ts +92 -0
  67. package/dist/src/codex-native-types.js +15 -0
  68. package/dist/src/codex-native-types.js.map +1 -0
  69. package/dist/src/conversation-list.d.ts +12 -0
  70. package/dist/src/conversation-list.js +30 -0
  71. package/dist/src/conversation-list.js.map +1 -0
  72. package/dist/src/conversation-route-dispatch.d.ts +13 -0
  73. package/dist/src/conversation-route-dispatch.js +66 -0
  74. package/dist/src/conversation-route-dispatch.js.map +1 -0
  75. package/dist/src/conversation-route-legacy.d.ts +18 -0
  76. package/dist/src/conversation-route-legacy.js +54 -0
  77. package/dist/src/conversation-route-legacy.js.map +1 -0
  78. package/dist/src/conversation-route-store.d.ts +51 -0
  79. package/dist/src/conversation-route-store.js +126 -0
  80. package/dist/src/conversation-route-store.js.map +1 -0
  81. package/dist/src/conversation-routing-cli-adapter.d.ts +12 -0
  82. package/dist/src/conversation-routing-cli-adapter.js +211 -0
  83. package/dist/src/conversation-routing-cli-adapter.js.map +1 -0
  84. package/dist/src/conversation-routing-commands.d.ts +11 -0
  85. package/dist/src/conversation-routing-commands.js +85 -0
  86. package/dist/src/conversation-routing-commands.js.map +1 -0
  87. package/dist/src/conversation-routing-home.d.ts +26 -0
  88. package/dist/src/conversation-routing-home.js +105 -0
  89. package/dist/src/conversation-routing-home.js.map +1 -0
  90. package/dist/src/conversation-routing-identity.d.ts +40 -0
  91. package/dist/src/conversation-routing-identity.js +174 -0
  92. package/dist/src/conversation-routing-identity.js.map +1 -0
  93. package/dist/src/conversation-runtime-route-store.d.ts +11 -0
  94. package/dist/src/conversation-runtime-route-store.js +118 -0
  95. package/dist/src/conversation-runtime-route-store.js.map +1 -0
  96. package/dist/src/desktop-async-interactions.d.ts +15 -0
  97. package/dist/src/desktop-async-interactions.js +88 -0
  98. package/dist/src/desktop-async-interactions.js.map +1 -0
  99. package/dist/src/desktop-async-state.d.ts +5 -0
  100. package/dist/src/desktop-async-state.js +53 -0
  101. package/dist/src/desktop-async-state.js.map +1 -0
  102. package/dist/src/desktop-cli-adapter.d.ts +7 -0
  103. package/dist/src/desktop-cli-adapter.js +322 -0
  104. package/dist/src/desktop-cli-adapter.js.map +1 -0
  105. package/dist/src/desktop-cli-controls.d.ts +9 -0
  106. package/dist/src/desktop-cli-controls.js +45 -0
  107. package/dist/src/desktop-cli-controls.js.map +1 -0
  108. package/dist/src/desktop-command-presentation.d.ts +2 -0
  109. package/dist/src/desktop-command-presentation.js +31 -0
  110. package/dist/src/desktop-command-presentation.js.map +1 -0
  111. package/dist/src/desktop-control-semantic.d.ts +8 -0
  112. package/dist/src/desktop-control-semantic.js +68 -0
  113. package/dist/src/desktop-control-semantic.js.map +1 -0
  114. package/dist/src/desktop-identity.d.ts +5 -0
  115. package/dist/src/desktop-identity.js +40 -0
  116. package/dist/src/desktop-identity.js.map +1 -0
  117. package/dist/src/desktop-interaction-projection.d.ts +57 -0
  118. package/dist/src/desktop-interaction-projection.js +196 -0
  119. package/dist/src/desktop-interaction-projection.js.map +1 -0
  120. package/dist/src/desktop-interaction-state.d.ts +3 -0
  121. package/dist/src/desktop-interaction-state.js +48 -0
  122. package/dist/src/desktop-interaction-state.js.map +1 -0
  123. package/dist/src/desktop-ipc-async-answer.d.ts +9 -0
  124. package/dist/src/desktop-ipc-async-answer.js +71 -0
  125. package/dist/src/desktop-ipc-async-answer.js.map +1 -0
  126. package/dist/src/desktop-ipc-client.d.ts +47 -0
  127. package/dist/src/desktop-ipc-client.js +400 -0
  128. package/dist/src/desktop-ipc-client.js.map +1 -0
  129. package/dist/src/desktop-ipc-native-operations.d.ts +11 -0
  130. package/dist/src/desktop-ipc-native-operations.js +126 -0
  131. package/dist/src/desktop-ipc-native-operations.js.map +1 -0
  132. package/dist/src/desktop-ipc-transport.d.ts +13 -0
  133. package/dist/src/desktop-ipc-transport.js +123 -0
  134. package/dist/src/desktop-ipc-transport.js.map +1 -0
  135. package/dist/src/desktop-list.d.ts +25 -0
  136. package/dist/src/desktop-list.js +55 -0
  137. package/dist/src/desktop-list.js.map +1 -0
  138. package/dist/src/desktop-metadata-reader.d.ts +30 -0
  139. package/dist/src/desktop-metadata-reader.js +182 -0
  140. package/dist/src/desktop-metadata-reader.js.map +1 -0
  141. package/dist/src/desktop-monitor.d.ts +4 -0
  142. package/dist/src/desktop-monitor.js +101 -0
  143. package/dist/src/desktop-monitor.js.map +1 -0
  144. package/dist/src/desktop-public-projection.d.ts +6 -0
  145. package/dist/src/desktop-public-projection.js +134 -0
  146. package/dist/src/desktop-public-projection.js.map +1 -0
  147. package/dist/src/desktop-request-interactions.d.ts +14 -0
  148. package/dist/src/desktop-request-interactions.js +144 -0
  149. package/dist/src/desktop-request-interactions.js.map +1 -0
  150. package/dist/src/desktop-response-dispatch.d.ts +14 -0
  151. package/dist/src/desktop-response-dispatch.js +19 -0
  152. package/dist/src/desktop-response-dispatch.js.map +1 -0
  153. package/dist/src/desktop-response-evidence.d.ts +4 -0
  154. package/dist/src/desktop-response-evidence.js +19 -0
  155. package/dist/src/desktop-response-evidence.js.map +1 -0
  156. package/dist/src/desktop-response-service.d.ts +11 -0
  157. package/dist/src/desktop-response-service.js +188 -0
  158. package/dist/src/desktop-response-service.js.map +1 -0
  159. package/dist/src/desktop-response-store.d.ts +35 -0
  160. package/dist/src/desktop-response-store.js +58 -0
  161. package/dist/src/desktop-response-store.js.map +1 -0
  162. package/dist/src/desktop-response-types.d.ts +20 -0
  163. package/dist/src/desktop-response-types.js +2 -0
  164. package/dist/src/desktop-response-types.js.map +1 -0
  165. package/dist/src/desktop-response-value.d.ts +6 -0
  166. package/dist/src/desktop-response-value.js +31 -0
  167. package/dist/src/desktop-response-value.js.map +1 -0
  168. package/dist/src/desktop-runtime.d.ts +153 -0
  169. package/dist/src/desktop-runtime.js +88 -0
  170. package/dist/src/desktop-runtime.js.map +1 -0
  171. package/dist/src/desktop-semantic.d.ts +21 -0
  172. package/dist/src/desktop-semantic.js +140 -0
  173. package/dist/src/desktop-semantic.js.map +1 -0
  174. package/dist/src/desktop-session-catalog.d.ts +68 -0
  175. package/dist/src/desktop-session-catalog.js +225 -0
  176. package/dist/src/desktop-session-catalog.js.map +1 -0
  177. package/dist/src/desktop-session-controls.d.ts +145 -0
  178. package/dist/src/desktop-session-controls.js +176 -0
  179. package/dist/src/desktop-session-controls.js.map +1 -0
  180. package/dist/src/desktop-sidebar-metadata.d.ts +27 -0
  181. package/dist/src/desktop-sidebar-metadata.js +83 -0
  182. package/dist/src/desktop-sidebar-metadata.js.map +1 -0
  183. package/dist/src/desktop-sidebar-projects.d.ts +10 -0
  184. package/dist/src/desktop-sidebar-projects.js +31 -0
  185. package/dist/src/desktop-sidebar-projects.js.map +1 -0
  186. package/dist/src/desktop-sidebar-selection.d.ts +28 -0
  187. package/dist/src/desktop-sidebar-selection.js +85 -0
  188. package/dist/src/desktop-sidebar-selection.js.map +1 -0
  189. package/dist/src/desktop-snapshot-details.d.ts +4 -0
  190. package/dist/src/desktop-snapshot-details.js +116 -0
  191. package/dist/src/desktop-snapshot-details.js.map +1 -0
  192. package/dist/src/desktop-snapshot.d.ts +11 -0
  193. package/dist/src/desktop-snapshot.js +276 -0
  194. package/dist/src/desktop-snapshot.js.map +1 -0
  195. package/dist/src/desktop-state-store.d.ts +72 -0
  196. package/dist/src/desktop-state-store.js +269 -0
  197. package/dist/src/desktop-state-store.js.map +1 -0
  198. package/dist/src/desktop-task-interactions.d.ts +10 -0
  199. package/dist/src/desktop-task-interactions.js +93 -0
  200. package/dist/src/desktop-task-interactions.js.map +1 -0
  201. package/dist/src/desktop-task-recovery.d.ts +38 -0
  202. package/dist/src/desktop-task-recovery.js +171 -0
  203. package/dist/src/desktop-task-recovery.js.map +1 -0
  204. package/dist/src/desktop-task-service.d.ts +54 -0
  205. package/dist/src/desktop-task-service.js +441 -0
  206. package/dist/src/desktop-task-service.js.map +1 -0
  207. package/dist/src/desktop-types.d.ts +281 -0
  208. package/dist/src/desktop-types.js +13 -0
  209. package/dist/src/desktop-types.js.map +1 -0
  210. package/dist/src/host-monitor-reconciliation.js +36 -4
  211. package/dist/src/host-monitor-reconciliation.js.map +1 -1
  212. package/dist/src/host-profile-runtime.js +7 -3
  213. package/dist/src/host-profile-runtime.js.map +1 -1
  214. package/dist/src/local-codex-cli-adapter.d.ts +7 -0
  215. package/dist/src/local-codex-cli-adapter.js +13 -0
  216. package/dist/src/local-codex-cli-adapter.js.map +1 -0
  217. package/dist/src/openclaw-callback-transport.js +2 -1
  218. package/dist/src/openclaw-callback-transport.js.map +1 -1
  219. package/dist/src/semantic-conversation-target.d.ts +4 -0
  220. package/dist/src/semantic-conversation-target.js +20 -0
  221. package/dist/src/semantic-conversation-target.js.map +1 -0
  222. package/dist/src/semantic-permission-control.js +47 -9
  223. package/dist/src/semantic-permission-control.js.map +1 -1
  224. package/dist/src/semantic-private-authority-offers.d.ts +1 -1
  225. package/dist/src/semantic-private-authority-offers.js +3 -1
  226. package/dist/src/semantic-private-authority-offers.js.map +1 -1
  227. package/dist/src/semantic-tool-command-helpers.d.ts +6 -0
  228. package/dist/src/semantic-tool-command-helpers.js +199 -78
  229. package/dist/src/semantic-tool-command-helpers.js.map +1 -1
  230. package/dist/src/semantic-tool-descriptions.d.ts +2 -1
  231. package/dist/src/semantic-tool-descriptions.js +81 -35
  232. package/dist/src/semantic-tool-descriptions.js.map +1 -1
  233. package/dist/src/semantic-tool-list-projection.js +66 -2
  234. package/dist/src/semantic-tool-list-projection.js.map +1 -1
  235. package/dist/src/semantic-tool-presentation.js +76 -7
  236. package/dist/src/semantic-tool-presentation.js.map +1 -1
  237. package/dist/src/semantic-tool-runtime.js +129 -29
  238. package/dist/src/semantic-tool-runtime.js.map +1 -1
  239. package/dist/src/semantic-tool-schemas.d.ts +410 -27
  240. package/dist/src/semantic-tool-schemas.js +176 -88
  241. package/dist/src/semantic-tool-schemas.js.map +1 -1
  242. package/dist/src/terminal-action-contracts.js +10 -6
  243. package/dist/src/terminal-action-contracts.js.map +1 -1
  244. package/dist/src/terminal-list-cli-adapter.d.ts +1 -0
  245. package/dist/src/terminal-list-cli-adapter.js +6 -3
  246. package/dist/src/terminal-list-cli-adapter.js.map +1 -1
  247. package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
  248. package/dist/src/terminal-permission-control-list-projection.d.ts +1 -1
  249. package/dist/src/terminal-user-send-intent.d.ts +2 -0
  250. package/dist/src/terminal-user-send-intent.js +11 -3
  251. package/dist/src/terminal-user-send-intent.js.map +1 -1
  252. package/docs/architecture/current-architecture.md +313 -0
  253. package/docs/architecture/interactive-terminal-response.md +276 -0
  254. package/docs/architecture/issue-126-final-report.md +248 -0
  255. package/docs/architecture/orchestration-refactor-history.md +2987 -0
  256. package/docs/architecture/orchestration-refactor.md +21 -0
  257. package/docs/backend-task-recovery.md +89 -0
  258. package/docs/bidirectional-agent-protocol.md +260 -0
  259. package/docs/codex-cli-native-compatibility.md +246 -0
  260. package/docs/codex-desktop-compatibility.md +414 -0
  261. package/docs/openclaw-operations.md +281 -0
  262. package/docs/openclaw-session-turn-delivery-requirement.md +45 -0
  263. package/docs/operator-guide.md +543 -0
  264. package/docs/storage-and-logging.md +91 -0
  265. package/docs/test-performance-issue-108.md +80 -0
  266. package/docs/test-performance-issue-120.md +226 -0
  267. package/docs/testing.md +628 -0
  268. package/openclaw.plugin.json +7 -3
  269. package/package.json +6 -13
  270. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +66 -15
@@ -0,0 +1,406 @@
1
+ # Agent Knock Knock for DeepSeek Harness
2
+
3
+ This package is the native DeepSeek Harness Web connector for Agent Knock
4
+ Knock (AKK). When the Web Host mounts the bundle, it adds `/akk`, the AKK
5
+ semantic tools supplied by its pinned runtime, and the bundled
6
+ `agent-knock-knock` skill to every live Agent.
7
+ There is no `/akk-bind` step, separate skill installation, or session id for
8
+ the user to copy.
9
+
10
+ The connector is developed in the AKK repository but is an independent npm
11
+ package. It does not modify DeepSeek Harness and has its own version, build,
12
+ tests, lockfile, bundle manifest, and connector-specific release tag.
13
+
14
+ ## Compatibility
15
+
16
+ This connector pins AKK **0.13.3** in its package and lockfile. Its terminal
17
+ workflow is separate from the AKK 0.14.0 CLI direct, Desktop, and Recovery
18
+ features in the [root README](../../README.md). Neither a newer core release
19
+ nor a root checkout replaces the connector's pinned runtime automatically.
20
+
21
+ This prerelease supports DeepSeek Harness `0.1.1-rc.2`, `0.1.2-alpha.1`, and
22
+ `0.1.5-rc.2` on the resident Web Host and Node.js `>=22.19.0`. Activation locates the real
23
+ `@deepseek-ai/dsh` launcher and requires that launcher plus its `dsh-base`,
24
+ `dsh-agent`, `dsh-commands`, `dsh-llm`, and `dsh-tools` packages to form one
25
+ coherent set at one reviewed version. An unsupported, missing, or split Host
26
+ fails before mounting. The detected launcher version is also projected into the
27
+ private AKK Host Profile instead of being replaced with a connector build-time
28
+ version. Runtime message and schema helpers are imported from that verified
29
+ Host package tree, so a source checkout's development dependencies cannot
30
+ replace them.
31
+
32
+ Headless/one-shot Harness processes, Host-exit callback continuity, and Windows
33
+ named pipes are not supported in this release. AKK discovers existing Codex and
34
+ Claude Code processes in tmux or Herdr; this connector does not start those
35
+ processes or create terminal panes.
36
+
37
+ ## Five-minute quick start
38
+
39
+ ### 1. Check the prerequisites
40
+
41
+ The Web Host must be one of the supported DeepSeek Harness releases, Node
42
+ must satisfy the engine above, and `pnpm` must be on `PATH` because `dsh plugin`
43
+ forwards package operations to pnpm.
44
+
45
+ ```sh
46
+ node --version
47
+ dsh --version
48
+ pnpm --version
49
+ npm view @scotthuang/agent-knock-knock-deepseek-harness dist-tags --json
50
+ ```
51
+
52
+ The last command reports registry state; this repository does not assume that a
53
+ particular prerelease is present in every configured npm registry. Connector
54
+ prereleases use the `next` tag when published.
55
+
56
+ ### 2. Add the connector to the Web profile
57
+
58
+ ```sh
59
+ dsh plugin --profile web add @scotthuang/agent-knock-knock-deepseek-harness@next
60
+ ```
61
+
62
+ Stop the current Web Host cleanly if it is running, then start a fresh process
63
+ so the new bundle is mounted:
64
+
65
+ ```sh
66
+ dsh web
67
+ ```
68
+
69
+ Do not start a second Web Host merely to reload the connector. The callback
70
+ route belongs to the Host process and exact Agent that accepted the command or
71
+ tool invocation.
72
+
73
+ ### 3. Verify discovery in a Web conversation
74
+
75
+ Make sure at least one Codex or Claude Code process is already running inside a
76
+ tmux or Herdr pane, then enter:
77
+
78
+ ```text
79
+ /akk list
80
+ ```
81
+
82
+ The compact result contains that live terminal, current action names, and only
83
+ the dynamic inputs needed for those actions. Static action meanings and safety
84
+ rules come from the automatically registered `agent-knock-knock` skill. AKK
85
+ never asks callers to invent identifiers: copy only the complete
86
+ `terminal_id`, `session_id`, `turn_id`, `watch_id`, or `native_thread_id`
87
+ returned by AKK.
88
+
89
+ ### 4. Send one task and receive its callback
90
+
91
+ If exactly one matching terminal is send-ready, this is a complete smoke test:
92
+
93
+ ```text
94
+ /akk codex: Inspect package.json and report the package name. Do not modify files.
95
+ ```
96
+
97
+ Use `claude:` instead when testing Claude Code. With multiple matching panes,
98
+ run `/akk list` first and use the displayed session selector, or let the Agent
99
+ call `agent_knock_knock_send` with the exact semantic identifier in that row's
100
+ advertised action.
101
+
102
+ An accepted managed Send creates a `turn_id`. When the coding agent finishes,
103
+ asks a question, becomes blocked, or requests approval, AKK sends a callback to
104
+ the same live DeepSeek Harness Agent. A running Agent receives the update via
105
+ `inject()`; an idle Agent receives it via `followup()`.
106
+
107
+ If stale or broken AKK management prevents managed delivery before terminal
108
+ input, an explicit user Send can instead be delivered once through the physical
109
+ terminal and best-effort attach a Terminal Watch. That result has no managed
110
+ callback Turn; retain its returned `watch_id` for callback recovery. A warning
111
+ that Watch attachment failed does not undo an already successful Send.
112
+
113
+ ### 5. Observe work that AKK did not send
114
+
115
+ Terminal Watch is read-only and can follow an existing human-started task
116
+ without creating an AKK Session or Turn:
117
+
118
+ ```text
119
+ /akk list
120
+ /akk watch <complete-terminal-id-from-list>
121
+ /akk status <watch-id-returned-by-watch>
122
+ /akk unwatch <watch-id-returned-by-watch>
123
+ ```
124
+
125
+ Watch prefers an exact task anchor and otherwise degrades to warning-bearing
126
+ terminal activity observation. A fallback Watch can prove stable idle, not that
127
+ one uniquely identified task produced the final output.
128
+
129
+ ## Tool workflow
130
+
131
+ The slash command is the human-facing shortcut. Agents receive the same
132
+ behavior through the complete capability-handshake-verified tool catalog:
133
+
134
+ | Tool | Purpose |
135
+ | --- | --- |
136
+ | `agent_knock_knock_list` | List live Codex/Claude terminals, managed state, Terminal Watches, and each row's currently available actions. |
137
+ | `agent_knock_knock_watch` | Start durable, read-only observation of one exact `terminal_id`. |
138
+ | `agent_knock_knock_unwatch` | Stop one exact `watch_id` without sending terminal input. |
139
+ | `agent_knock_knock_list_resumable_threads` | List structurally verified native threads for one terminal. |
140
+ | `agent_knock_knock_native_inspect` | Run only the adapter-owned native `status` inspection advertised for an idle terminal. |
141
+ | `agent_knock_knock_model_options` | Read one exact idle terminal's native model and reasoning catalog and create a single-use typed offer. |
142
+ | `agent_knock_knock_repair_model_control` | Dismiss only an exactly recognized stale model-control surface; it never selects a model or submits work. |
143
+ | `agent_knock_knock_set_model` | Consume the current catalog offer to choose one advertised semantic model and reasoning effort. |
144
+ | `agent_knock_knock_identify_foreground` | Run a bounded diagnostic native identity probe without creating durable authority. |
145
+ | `agent_knock_knock_identify_and_send` | Keep one terminal lock across identity observation and one explicit Send when foreground identity is ambiguous. |
146
+ | `agent_knock_knock_new_thread` | Start and verify a clean native coding-agent thread after explicit user intent. |
147
+ | `agent_knock_knock_reconcile_binding` | Detach one proven stale conflicting binding after explicit confirmation; it neither sends work nor adopts a thread. |
148
+ | `agent_knock_knock_resume_thread` | Resume one complete `native_thread_id` from a fresh resumable-thread listing. |
149
+ | `agent_knock_knock_status` | Inspect one AKK `turn_id` or Terminal Watch `watch_id` plus a bounded current screen. |
150
+ | `agent_knock_knock_send` | Send a new task through the exact action advertised by `list`. |
151
+ | `agent_knock_knock_respond` | Answer a question or unblock one existing managed Turn; it does not create a new Turn. |
152
+ | `agent_knock_knock_respond_interaction` | Answer the current typed native questionnaire step for one exact response-capable Turn or Watch. |
153
+ | `agent_knock_knock_approve` | Approve the current exact permission request once, only after human review and confirmation. |
154
+ | `agent_knock_knock_renew` | Renew monitoring for a still-live stalled Turn without typing into the terminal. |
155
+ | `agent_knock_knock_retry_callback` | Retry one persisted failed callback with its original message and delivery identity. |
156
+ | `agent_knock_knock_cancel` | Interrupt one exact active Turn while leaving the shared pane open. |
157
+ | `agent_knock_knock_close` | Release AKK management of a Turn without terminal input, process interruption, or pane closure. |
158
+
159
+ The ordinary closed loop is:
160
+
161
+ 1. Call `list` and select one exact terminal row.
162
+ 2. Use only that row's advertised `send` action and semantic identifier.
163
+ 3. Retain the returned `turn_id` for managed delivery, or the `watch_id` from an
164
+ automatic physical-Send fallback. Completion or attention callbacks return
165
+ to the originating DeepSeek Harness Agent.
166
+ 4. For a managed question or blocked callback, use `respond` with its `turn_id`.
167
+ For a permission request, follow the approval procedure below.
168
+ 5. Use `status` when a callback is late or uncertain. Use an explicit `watch`
169
+ for other work that was not sent as a managed AKK Turn.
170
+
171
+ Do not cache `available_actions` or private terminal state. Refresh `list` or
172
+ `status` before a mutation, and never blindly retry an uncertain Send,
173
+ approval, cancel, native inspection, or native thread transition.
174
+
175
+ ## Active approval
176
+
177
+ The DeepSeek Harness connector registers AKK's approval tool directly; unlike
178
+ the Pi connector, this prerelease does **not** add a Host-native confirm/select
179
+ dialog around that tool. Explicit human confirmation is therefore a required
180
+ calling contract for the Agent and user, not a UI gate enforced by this
181
+ connector. With the default configuration, the manual flow is:
182
+
183
+ 1. Receive the approval callback, then call
184
+ `agent_knock_knock_status({turn_id})` to refresh the exact current request and
185
+ terminal screen.
186
+ 2. Present the current request, tool name, and relevant arguments to the user.
187
+ 3. Obtain an explicit approve or reject decision in the same Web conversation.
188
+ 4. Only for an explicit approval, invoke the currently advertised
189
+ `agent_knock_knock_approve({turn_id})`, or let the user enter
190
+ `/akk approve <turn-selector>`.
191
+ 5. If approval was interrupted or returned an uncertain result, refresh status
192
+ and let the human inspect the live TUI. Never retry it blindly.
193
+
194
+ AKK's deterministic `pluginConfig.autoApprove` policy remains disabled by
195
+ default. If an administrator deliberately enables it, only the exact configured
196
+ agent, workspace, and command-vector rules may bypass this manual flow; unmatched
197
+ or ambiguous requests still require the confirmation procedure above.
198
+
199
+ A separately advertised terminal-scoped approval has no managed `turn_id`.
200
+ Refresh `list`, show that row's current approval request to the user, and after
201
+ explicit confirmation call the advertised `approve` action with its complete
202
+ `terminal_id`. Never convert a terminal-scoped approval into a guessed Turn.
203
+
204
+ The related controls are deliberately different:
205
+
206
+ - `respond` supplies text to a question or blocked managed Turn. It is not an
207
+ approval and is not a generic denial button.
208
+ - `cancel` interrupts the exact active task after explicit user intent. It does
209
+ not close the pane. A user's rejection must not be silently converted into
210
+ Cancel; ask separately whether they want the task interrupted or prefer to
211
+ handle the permission prompt in the live TUI.
212
+ - `close` only releases AKK's management records. It sends no terminal input and
213
+ does not stop the coding agent; refresh `list` and use `watch` if the process
214
+ continues working.
215
+ - `unwatch` stops observation only. It never interrupts the watched task.
216
+
217
+ ## Callback delivery and recovery
218
+
219
+ The synchronous callback acknowledgement means that the message was admitted
220
+ to the exact DeepSeek Harness Agent's inbox/session log. It does not prove that
221
+ the model consumed the message or that asynchronous persistence reached stable
222
+ storage. `status` and Terminal Watch are the recovery path.
223
+
224
+ - If the exact Agent and Host are still live, inspect the `turn_id` with
225
+ `status`. A persisted callback failure can be retried with
226
+ `agent_knock_knock_retry_callback`; AKK reuses the original callback message
227
+ id and Turn identity for idempotent delivery.
228
+ - For a Terminal Watch, inspect its `watch_id` with `status`. If the route is no
229
+ longer valid, `unwatch` it and start a fresh Watch from a current `list` row.
230
+ - A Host restart creates a new private Profile revision. Existing watches retain
231
+ their original route, so callbacks owned by the old Host incarnation fail
232
+ closed instead of being redirected to a new Agent. There is deliberately no
233
+ cross-restart callback migration in this prerelease.
234
+ - Replacing an Agent object with another Agent that has the same session id also
235
+ does not transfer its route. Start a current command/tool invocation from the
236
+ new Agent before expecting new callback ownership.
237
+ - Exact process-lifetime idempotency records return the original acceptance id
238
+ for a duplicate callback. Reusing an idempotency key with different content
239
+ is rejected.
240
+
241
+ ## Configuration
242
+
243
+ The connector accepts an optional lifecycle cadence and the existing AKK plugin
244
+ configuration object:
245
+
246
+ ```yaml
247
+ - id: agent-knock-knock-deepseek-harness
248
+ name: '@scotthuang/agent-knock-knock-deepseek-harness'
249
+ config:
250
+ lifecycleIntervalMs: 5000
251
+ pluginConfig:
252
+ storeDir: /absolute/path/to/akk-store
253
+ ```
254
+
255
+ `lifecycleIntervalMs` must be at least 50 milliseconds. Use an absolute
256
+ `storeDir`; a relative value is resolved from the Web Host's working directory.
257
+ When omitted, AKK uses `~/.agent-knock-knock/store`.
258
+
259
+ The optional bundle patch mounts only the Host plugin:
260
+
261
+ ```yaml
262
+ - insert:
263
+ - id: agent-knock-knock-deepseek-harness
264
+ name: '@scotthuang/agent-knock-knock-deepseek-harness'
265
+ ```
266
+
267
+ ## Security and storage
268
+
269
+ - Each Host process creates a private temporary directory with mode `0700`.
270
+ Its generated Host Profile is mode `0600`; the directory is removed during a
271
+ clean connector shutdown.
272
+ - The callback socket path and random token travel only through an allowlisted
273
+ environment. They are not command arguments. The callback helper uses the
274
+ absolute Node executable and package artifact without a shell or `PATH`
275
+ lookup.
276
+ - The callback IPC frame is authenticated and bounded. Successful admission is
277
+ tied to one exact Agent object and one Host incarnation.
278
+ - AKK's durable Store contains task, Session, Turn, receipt, watch, and callback
279
+ recovery metadata and may contain user request or callback text. AKK creates
280
+ Store directories as `0700` and files as `0600`; keep a custom Store on a
281
+ trusted local filesystem owned by the Host user. Do not share one writable
282
+ Store between unrelated users.
283
+ - Uninstalling the connector does not delete the durable AKK Store. Retain it if
284
+ recovery or audit history is still needed; archive or remove it only after
285
+ confirming there are no active Turns or Watches that depend on it.
286
+
287
+ ## Troubleshooting
288
+
289
+ | Symptom | Check and recovery |
290
+ | --- | --- |
291
+ | `dsh plugin` cannot run | Confirm `pnpm --version` succeeds. The DeepSeek Harness plugin command forwards its arguments to pnpm. |
292
+ | `@next` cannot be resolved | Run `npm view @scotthuang/agent-knock-knock-deepseek-harness dist-tags --json`. Use an exact published version if your registry has no `next` tag, or use the local-development installation below. |
293
+ | `/akk` and AKK tools are missing | Verify installation with `dsh plugin --profile web why @scotthuang/agent-knock-knock-deepseek-harness`, then fully restart the Web Host. Existing Host processes do not gain a newly added bundle. |
294
+ | Activation reports an unsupported or split Harness | Check `dsh --version` and run `dsh plugin --profile web why @deepseek-ai/dsh-base @deepseek-ai/dsh-agent @deepseek-ai/dsh-commands @deepseek-ai/dsh-llm @deepseek-ai/dsh-tools`. Update the whole Host coherently; do not repair it with a standalone connector npm install. |
295
+ | `/akk list` finds no terminals | Start or locate a real Codex/Claude Code process inside tmux or Herdr. AKK never launches the coding agent or creates its pane. |
296
+ | A mutation is absent or rejected | Refresh `/akk list` or structured `list` and use only the action currently advertised for that exact row. Resolve a current approval first when it blocks input. Do not reuse stale IDs or action payloads. |
297
+ | The callback never appears | Run `/akk status <turn-or-watch-id>`. If the same route is live, use the persisted `retry_callback` tool for a failed Turn callback. After a Host restart or Agent replacement, old delivery fails closed; recreate a Watch or start new work from the current Agent. |
298
+ | Callback delivery reports IPC unavailable or timeout | Keep the originating Web Host alive and inspect whether it was restarted or disposed. The socket is Host-process-private and has an eight-second callback boundary; there is no cross-process fallback route. |
299
+ | A Watch completed but its callback was missed | Query `status` by `watch_id`. Under a new Host incarnation, unwatch the old record and create a fresh Watch from a current terminal row. |
300
+ | A tool call fails schema validation | Pass only the documented fields and complete semantic IDs returned by AKK. DeepSeek's discovery schema is a projection; the connector always enforces the full original AKK schema before execution. |
301
+ | Windows, headless, or one-shot use fails | These surfaces are outside this prerelease's supported scope. Use the resident POSIX Web Host. |
302
+
303
+ ## Upgrade and uninstall
304
+
305
+ Inspect available versions before changing the profile:
306
+
307
+ ```sh
308
+ npm view @scotthuang/agent-knock-knock-deepseek-harness versions --json
309
+ npm view @scotthuang/agent-knock-knock-deepseek-harness dist-tags --json
310
+ ```
311
+
312
+ Update to the registry's current prerelease, or pin an exact reviewed version:
313
+
314
+ ```sh
315
+ dsh plugin --profile web add @scotthuang/agent-knock-knock-deepseek-harness@next
316
+ dsh plugin --profile web add @scotthuang/agent-knock-knock-deepseek-harness@0.1.0-rc.4
317
+ ```
318
+
319
+ Restart the Web Host after either operation. The connector pins the exact AKK
320
+ runtime version it was tested against, so updating the connector updates that
321
+ tested unit instead of letting the Host Adapter API drift independently.
322
+
323
+ To uninstall:
324
+
325
+ ```sh
326
+ dsh plugin --profile web remove @scotthuang/agent-knock-knock-deepseek-harness
327
+ ```
328
+
329
+ Restart the Web Host once more. Removal withdraws `/akk`, the tools, and live
330
+ callback routes; it does not delete the durable AKK Store.
331
+
332
+ ## Local development
333
+
334
+ From the AKK repository root, install and build the child package, then add that
335
+ connector checkout to the Web profile:
336
+
337
+ ```sh
338
+ npm --prefix connectors/deepseek-harness ci
339
+ npm run deepseek:build
340
+ dsh plugin --profile web add "file:$(pwd -P)/connectors/deepseek-harness"
341
+ ```
342
+
343
+ Restart `dsh web` after installation. The child package currently installs and
344
+ tests against its pinned published AKK runtime `0.13.3`; building the current
345
+ repository root does not silently replace that dependency. Testing connector
346
+ changes against another AKK runtime requires an explicit dependency change and
347
+ compatibility review rather than an implicit local link.
348
+
349
+ ## Tests and release status
350
+
351
+ The package manifest is currently `0.1.0-rc.4`, so this remains a prerelease and
352
+ is published under `next`; `latest` remains on the earlier `0.1.0-rc.1` tag.
353
+ Registry state can change independently of this source file, so the `npm view`
354
+ commands above remain authoritative.
355
+
356
+ From `connectors/deepseek-harness`, the normal development gate is:
357
+
358
+ ```sh
359
+ npm ci
360
+ npm run typecheck
361
+ npm run test:fast
362
+ npm run pack:check
363
+ ```
364
+
365
+ These commands typecheck the connector, run its fast wiring/profile/IPC/schema
366
+ tests, and inspect the package tarball. They do not publish anything. The
367
+ `0.1.0-rc.4` compatibility work is typechecked against the published DeepSeek
368
+ Harness `0.1.5-rc.2` SDK packages and runtime-smoked against that exact official
369
+ launcher package tree. The reproducible development lock therefore uses
370
+ `0.1.5-rc.2`, while peer and runtime checks retain the two older reviewed Host
371
+ versions for existing installations.
372
+
373
+ ## Release safety
374
+
375
+ `npm run release:check` is check-only. The shared connector gate first proves
376
+ the generated Skill hash, package manifest/constants/lock/dependency parity,
377
+ then runs typecheck, fast tests, and inspection of the real package tarball. In
378
+ release mode it additionally rejects a dirty tree, a non-`main` branch, an
379
+ unsynchronized upstream, an existing npm version or connector repository tag,
380
+ and any runtime `file:`, `link:`, or `workspace:` dependency.
381
+
382
+ Activation separately verifies the pinned AKK HostAdapter's versioned,
383
+ secretless capability handshake. The authoritative catalog digest, ordered
384
+ tool names and derived count, and Skill digest must match the generated Skill
385
+ and the tools registered with DeepSeek Harness. A missing/unknown handshake,
386
+ forged digest, or partial registration fails closed; the connector has no
387
+ independent hard-coded tool count.
388
+
389
+ For deterministic local verification without a registry or git-remote query:
390
+
391
+ ```sh
392
+ npm run release:check -- --offline
393
+ ```
394
+
395
+ From the repository root, `npm run connectors:verify` applies that same offline
396
+ gate to both connectors. Their package versions are validated independently.
397
+
398
+ Publishing additionally requires both explicit flags:
399
+
400
+ ```sh
401
+ npm run release:check -- --publish --confirm-version 0.1.0-rc.4
402
+ ```
403
+
404
+ Prereleases use npm tag `next`; stable versions use `latest`. Repository tags
405
+ and GitHub Releases use the connector-specific namespace
406
+ `deepseek-harness-v<version>` and are created separately after npm verification.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Agent Knock Knock contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.