@scotthuang/agent-knock-knock 0.13.18 → 0.14.1
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/CHANGELOG.md +41 -0
- package/CONTRIBUTING.md +212 -0
- package/README.md +106 -166
- package/connectors/deepseek-harness/LICENSE +21 -0
- package/connectors/deepseek-harness/README.md +406 -0
- package/connectors/pi/LICENSE +21 -0
- package/connectors/pi/README.md +446 -0
- package/dist/src/backend-public-progress.d.ts +38 -0
- package/dist/src/backend-public-progress.js +106 -0
- package/dist/src/backend-public-progress.js.map +1 -0
- package/dist/src/backend-recovery-semantic.d.ts +16 -0
- package/dist/src/backend-recovery-semantic.js +113 -0
- package/dist/src/backend-recovery-semantic.js.map +1 -0
- package/dist/src/backend-task-recovery.d.ts +103 -0
- package/dist/src/backend-task-recovery.js +143 -0
- package/dist/src/backend-task-recovery.js.map +1 -0
- package/dist/src/callback-transport.d.ts +8 -0
- package/dist/src/callback-transport.js +14 -0
- package/dist/src/callback-transport.js.map +1 -1
- package/dist/src/cli-core.js +20 -10
- package/dist/src/cli-core.js.map +1 -1
- package/dist/src/cli-runtime-context.d.ts +5 -0
- package/dist/src/cli-runtime-context.js.map +1 -1
- package/dist/src/codex-app-server-read-client.d.ts +3 -0
- package/dist/src/codex-app-server-read-client.js.map +1 -1
- package/dist/src/codex-native-cli-adapter.d.ts +6 -0
- package/dist/src/codex-native-cli-adapter.js +303 -0
- package/dist/src/codex-native-cli-adapter.js.map +1 -0
- package/dist/src/codex-native-client-interactions.d.ts +6 -0
- package/dist/src/codex-native-client-interactions.js +124 -0
- package/dist/src/codex-native-client-interactions.js.map +1 -0
- package/dist/src/codex-native-client-rpc.d.ts +21 -0
- package/dist/src/codex-native-client-rpc.js +137 -0
- package/dist/src/codex-native-client-rpc.js.map +1 -0
- package/dist/src/codex-native-client.d.ts +42 -0
- package/dist/src/codex-native-client.js +331 -0
- package/dist/src/codex-native-client.js.map +1 -0
- package/dist/src/codex-native-identity.d.ts +6 -0
- package/dist/src/codex-native-identity.js +42 -0
- package/dist/src/codex-native-identity.js.map +1 -0
- package/dist/src/codex-native-monitor.d.ts +4 -0
- package/dist/src/codex-native-monitor.js +92 -0
- package/dist/src/codex-native-monitor.js.map +1 -0
- package/dist/src/codex-native-outbox.d.ts +16 -0
- package/dist/src/codex-native-outbox.js +120 -0
- package/dist/src/codex-native-outbox.js.map +1 -0
- package/dist/src/codex-native-public-projection.d.ts +545 -0
- package/dist/src/codex-native-public-projection.js +182 -0
- package/dist/src/codex-native-public-projection.js.map +1 -0
- package/dist/src/codex-native-record-store.d.ts +27 -0
- package/dist/src/codex-native-record-store.js +111 -0
- package/dist/src/codex-native-record-store.js.map +1 -0
- package/dist/src/codex-native-response-service.d.ts +69 -0
- package/dist/src/codex-native-response-service.js +244 -0
- package/dist/src/codex-native-response-service.js.map +1 -0
- package/dist/src/codex-native-runtime.d.ts +46 -0
- package/dist/src/codex-native-runtime.js +112 -0
- package/dist/src/codex-native-runtime.js.map +1 -0
- package/dist/src/codex-native-semantic.d.ts +17 -0
- package/dist/src/codex-native-semantic.js +175 -0
- package/dist/src/codex-native-semantic.js.map +1 -0
- package/dist/src/codex-native-snapshot.d.ts +19 -0
- package/dist/src/codex-native-snapshot.js +160 -0
- package/dist/src/codex-native-snapshot.js.map +1 -0
- package/dist/src/codex-native-state-store.d.ts +61 -0
- package/dist/src/codex-native-state-store.js +132 -0
- package/dist/src/codex-native-state-store.js.map +1 -0
- package/dist/src/codex-native-task-service.d.ts +71 -0
- package/dist/src/codex-native-task-service.js +503 -0
- package/dist/src/codex-native-task-service.js.map +1 -0
- package/dist/src/codex-native-types.d.ts +92 -0
- package/dist/src/codex-native-types.js +15 -0
- package/dist/src/codex-native-types.js.map +1 -0
- package/dist/src/conversation-list.d.ts +12 -0
- package/dist/src/conversation-list.js +30 -0
- package/dist/src/conversation-list.js.map +1 -0
- package/dist/src/conversation-route-dispatch.d.ts +13 -0
- package/dist/src/conversation-route-dispatch.js +66 -0
- package/dist/src/conversation-route-dispatch.js.map +1 -0
- package/dist/src/conversation-route-legacy.d.ts +18 -0
- package/dist/src/conversation-route-legacy.js +54 -0
- package/dist/src/conversation-route-legacy.js.map +1 -0
- package/dist/src/conversation-route-store.d.ts +51 -0
- package/dist/src/conversation-route-store.js +126 -0
- package/dist/src/conversation-route-store.js.map +1 -0
- package/dist/src/conversation-routing-cli-adapter.d.ts +12 -0
- package/dist/src/conversation-routing-cli-adapter.js +211 -0
- package/dist/src/conversation-routing-cli-adapter.js.map +1 -0
- package/dist/src/conversation-routing-commands.d.ts +11 -0
- package/dist/src/conversation-routing-commands.js +85 -0
- package/dist/src/conversation-routing-commands.js.map +1 -0
- package/dist/src/conversation-routing-home.d.ts +26 -0
- package/dist/src/conversation-routing-home.js +105 -0
- package/dist/src/conversation-routing-home.js.map +1 -0
- package/dist/src/conversation-routing-identity.d.ts +40 -0
- package/dist/src/conversation-routing-identity.js +174 -0
- package/dist/src/conversation-routing-identity.js.map +1 -0
- package/dist/src/conversation-runtime-route-store.d.ts +11 -0
- package/dist/src/conversation-runtime-route-store.js +118 -0
- package/dist/src/conversation-runtime-route-store.js.map +1 -0
- package/dist/src/desktop-async-interactions.d.ts +15 -0
- package/dist/src/desktop-async-interactions.js +88 -0
- package/dist/src/desktop-async-interactions.js.map +1 -0
- package/dist/src/desktop-async-state.d.ts +5 -0
- package/dist/src/desktop-async-state.js +53 -0
- package/dist/src/desktop-async-state.js.map +1 -0
- package/dist/src/desktop-cli-adapter.d.ts +7 -0
- package/dist/src/desktop-cli-adapter.js +343 -0
- package/dist/src/desktop-cli-adapter.js.map +1 -0
- package/dist/src/desktop-cli-controls.d.ts +9 -0
- package/dist/src/desktop-cli-controls.js +45 -0
- package/dist/src/desktop-cli-controls.js.map +1 -0
- package/dist/src/desktop-command-presentation.d.ts +2 -0
- package/dist/src/desktop-command-presentation.js +31 -0
- package/dist/src/desktop-command-presentation.js.map +1 -0
- package/dist/src/desktop-control-semantic.d.ts +8 -0
- package/dist/src/desktop-control-semantic.js +68 -0
- package/dist/src/desktop-control-semantic.js.map +1 -0
- package/dist/src/desktop-identity.d.ts +5 -0
- package/dist/src/desktop-identity.js +40 -0
- package/dist/src/desktop-identity.js.map +1 -0
- package/dist/src/desktop-interaction-projection.d.ts +57 -0
- package/dist/src/desktop-interaction-projection.js +196 -0
- package/dist/src/desktop-interaction-projection.js.map +1 -0
- package/dist/src/desktop-interaction-state.d.ts +3 -0
- package/dist/src/desktop-interaction-state.js +48 -0
- package/dist/src/desktop-interaction-state.js.map +1 -0
- package/dist/src/desktop-ipc-async-answer.d.ts +9 -0
- package/dist/src/desktop-ipc-async-answer.js +71 -0
- package/dist/src/desktop-ipc-async-answer.js.map +1 -0
- package/dist/src/desktop-ipc-client.d.ts +47 -0
- package/dist/src/desktop-ipc-client.js +400 -0
- package/dist/src/desktop-ipc-client.js.map +1 -0
- package/dist/src/desktop-ipc-native-operations.d.ts +11 -0
- package/dist/src/desktop-ipc-native-operations.js +126 -0
- package/dist/src/desktop-ipc-native-operations.js.map +1 -0
- package/dist/src/desktop-ipc-transport.d.ts +13 -0
- package/dist/src/desktop-ipc-transport.js +123 -0
- package/dist/src/desktop-ipc-transport.js.map +1 -0
- package/dist/src/desktop-list.d.ts +25 -0
- package/dist/src/desktop-list.js +55 -0
- package/dist/src/desktop-list.js.map +1 -0
- package/dist/src/desktop-metadata-reader.d.ts +30 -0
- package/dist/src/desktop-metadata-reader.js +182 -0
- package/dist/src/desktop-metadata-reader.js.map +1 -0
- package/dist/src/desktop-monitor.d.ts +4 -0
- package/dist/src/desktop-monitor.js +101 -0
- package/dist/src/desktop-monitor.js.map +1 -0
- package/dist/src/desktop-public-projection.d.ts +6 -0
- package/dist/src/desktop-public-projection.js +134 -0
- package/dist/src/desktop-public-projection.js.map +1 -0
- package/dist/src/desktop-request-interactions.d.ts +14 -0
- package/dist/src/desktop-request-interactions.js +144 -0
- package/dist/src/desktop-request-interactions.js.map +1 -0
- package/dist/src/desktop-response-dispatch.d.ts +14 -0
- package/dist/src/desktop-response-dispatch.js +19 -0
- package/dist/src/desktop-response-dispatch.js.map +1 -0
- package/dist/src/desktop-response-evidence.d.ts +4 -0
- package/dist/src/desktop-response-evidence.js +19 -0
- package/dist/src/desktop-response-evidence.js.map +1 -0
- package/dist/src/desktop-response-service.d.ts +11 -0
- package/dist/src/desktop-response-service.js +188 -0
- package/dist/src/desktop-response-service.js.map +1 -0
- package/dist/src/desktop-response-store.d.ts +35 -0
- package/dist/src/desktop-response-store.js +58 -0
- package/dist/src/desktop-response-store.js.map +1 -0
- package/dist/src/desktop-response-types.d.ts +20 -0
- package/dist/src/desktop-response-types.js +2 -0
- package/dist/src/desktop-response-types.js.map +1 -0
- package/dist/src/desktop-response-value.d.ts +6 -0
- package/dist/src/desktop-response-value.js +31 -0
- package/dist/src/desktop-response-value.js.map +1 -0
- package/dist/src/desktop-runtime.d.ts +153 -0
- package/dist/src/desktop-runtime.js +88 -0
- package/dist/src/desktop-runtime.js.map +1 -0
- package/dist/src/desktop-semantic.d.ts +21 -0
- package/dist/src/desktop-semantic.js +140 -0
- package/dist/src/desktop-semantic.js.map +1 -0
- package/dist/src/desktop-session-catalog.d.ts +68 -0
- package/dist/src/desktop-session-catalog.js +225 -0
- package/dist/src/desktop-session-catalog.js.map +1 -0
- package/dist/src/desktop-session-controls.d.ts +145 -0
- package/dist/src/desktop-session-controls.js +176 -0
- package/dist/src/desktop-session-controls.js.map +1 -0
- package/dist/src/desktop-sidebar-metadata.d.ts +27 -0
- package/dist/src/desktop-sidebar-metadata.js +83 -0
- package/dist/src/desktop-sidebar-metadata.js.map +1 -0
- package/dist/src/desktop-sidebar-projects.d.ts +10 -0
- package/dist/src/desktop-sidebar-projects.js +31 -0
- package/dist/src/desktop-sidebar-projects.js.map +1 -0
- package/dist/src/desktop-sidebar-selection.d.ts +28 -0
- package/dist/src/desktop-sidebar-selection.js +85 -0
- package/dist/src/desktop-sidebar-selection.js.map +1 -0
- package/dist/src/desktop-snapshot-details.d.ts +4 -0
- package/dist/src/desktop-snapshot-details.js +116 -0
- package/dist/src/desktop-snapshot-details.js.map +1 -0
- package/dist/src/desktop-snapshot.d.ts +11 -0
- package/dist/src/desktop-snapshot.js +281 -0
- package/dist/src/desktop-snapshot.js.map +1 -0
- package/dist/src/desktop-state-store.d.ts +72 -0
- package/dist/src/desktop-state-store.js +269 -0
- package/dist/src/desktop-state-store.js.map +1 -0
- package/dist/src/desktop-task-interactions.d.ts +10 -0
- package/dist/src/desktop-task-interactions.js +93 -0
- package/dist/src/desktop-task-interactions.js.map +1 -0
- package/dist/src/desktop-task-recovery.d.ts +38 -0
- package/dist/src/desktop-task-recovery.js +172 -0
- package/dist/src/desktop-task-recovery.js.map +1 -0
- package/dist/src/desktop-task-service.d.ts +54 -0
- package/dist/src/desktop-task-service.js +442 -0
- package/dist/src/desktop-task-service.js.map +1 -0
- package/dist/src/desktop-types.d.ts +283 -0
- package/dist/src/desktop-types.js +13 -0
- package/dist/src/desktop-types.js.map +1 -0
- package/dist/src/host-monitor-reconciliation.js +36 -4
- package/dist/src/host-monitor-reconciliation.js.map +1 -1
- package/dist/src/host-profile-runtime.js +7 -3
- package/dist/src/host-profile-runtime.js.map +1 -1
- package/dist/src/local-codex-cli-adapter.d.ts +7 -0
- package/dist/src/local-codex-cli-adapter.js +13 -0
- package/dist/src/local-codex-cli-adapter.js.map +1 -0
- package/dist/src/monitor-deadline-policy.d.ts +8 -0
- package/dist/src/monitor-deadline-policy.js +16 -0
- package/dist/src/monitor-deadline-policy.js.map +1 -0
- package/dist/src/openclaw-callback-transport.js +2 -1
- package/dist/src/openclaw-callback-transport.js.map +1 -1
- package/dist/src/semantic-conversation-target.d.ts +4 -0
- package/dist/src/semantic-conversation-target.js +20 -0
- package/dist/src/semantic-conversation-target.js.map +1 -0
- package/dist/src/semantic-permission-control.js +47 -9
- package/dist/src/semantic-permission-control.js.map +1 -1
- package/dist/src/semantic-private-authority-offers.d.ts +1 -1
- package/dist/src/semantic-private-authority-offers.js +3 -1
- package/dist/src/semantic-private-authority-offers.js.map +1 -1
- package/dist/src/semantic-tool-command-helpers.d.ts +6 -0
- package/dist/src/semantic-tool-command-helpers.js +199 -78
- package/dist/src/semantic-tool-command-helpers.js.map +1 -1
- package/dist/src/semantic-tool-descriptions.d.ts +2 -1
- package/dist/src/semantic-tool-descriptions.js +84 -35
- package/dist/src/semantic-tool-descriptions.js.map +1 -1
- package/dist/src/semantic-tool-list-projection.js +66 -2
- package/dist/src/semantic-tool-list-projection.js.map +1 -1
- package/dist/src/semantic-tool-presentation.js +76 -7
- package/dist/src/semantic-tool-presentation.js.map +1 -1
- package/dist/src/semantic-tool-runtime.js +129 -29
- package/dist/src/semantic-tool-runtime.js.map +1 -1
- package/dist/src/semantic-tool-schemas.d.ts +410 -27
- package/dist/src/semantic-tool-schemas.js +176 -88
- package/dist/src/semantic-tool-schemas.js.map +1 -1
- package/dist/src/terminal-action-contracts.js +10 -6
- package/dist/src/terminal-action-contracts.js.map +1 -1
- package/dist/src/terminal-command-cli-adapter.js +4 -4
- package/dist/src/terminal-command-cli-adapter.js.map +1 -1
- package/dist/src/terminal-command-dispatch-preparation.js +2 -1
- package/dist/src/terminal-command-dispatch-preparation.js.map +1 -1
- package/dist/src/terminal-list-cli-adapter.d.ts +1 -0
- package/dist/src/terminal-list-cli-adapter.js +6 -3
- package/dist/src/terminal-list-cli-adapter.js.map +1 -1
- package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
- package/dist/src/terminal-monitor-launch-plan.js +3 -2
- package/dist/src/terminal-monitor-launch-plan.js.map +1 -1
- package/dist/src/terminal-monitor-supervision-cli-adapter.js +2 -2
- package/dist/src/terminal-monitor-supervision-cli-adapter.js.map +1 -1
- package/dist/src/terminal-submission-retry-reconciliation.js +2 -2
- package/dist/src/terminal-submission-retry-reconciliation.js.map +1 -1
- package/dist/src/terminal-user-send-intent.d.ts +2 -0
- package/dist/src/terminal-user-send-intent.js +11 -3
- package/dist/src/terminal-user-send-intent.js.map +1 -1
- package/dist/src/terminal-watch-cli-adapter.js +4 -4
- package/dist/src/terminal-watch-cli-adapter.js.map +1 -1
- package/docs/architecture/current-architecture.md +313 -0
- package/docs/architecture/interactive-terminal-response.md +276 -0
- package/docs/architecture/issue-126-final-report.md +248 -0
- package/docs/architecture/orchestration-refactor-history.md +2987 -0
- package/docs/architecture/orchestration-refactor.md +21 -0
- package/docs/backend-task-recovery.md +98 -0
- package/docs/bidirectional-agent-protocol.md +260 -0
- package/docs/codex-cli-native-compatibility.md +246 -0
- package/docs/codex-desktop-compatibility.md +414 -0
- package/docs/openclaw-operations.md +281 -0
- package/docs/openclaw-session-turn-delivery-requirement.md +45 -0
- package/docs/operator-guide.md +572 -0
- package/docs/storage-and-logging.md +91 -0
- package/docs/test-performance-issue-108.md +80 -0
- package/docs/test-performance-issue-120.md +226 -0
- package/docs/testing.md +628 -0
- package/openclaw.plugin.json +8 -4
- package/package.json +6 -13
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +66 -15
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# OpenClaw Operations
|
|
2
|
+
|
|
3
|
+
This document covers OpenClaw-specific installation choices, optional tool
|
|
4
|
+
routing, configuration, approval policy, recovery, and diagnostics. For
|
|
5
|
+
ordinary AKK commands and cross-Host reliability semantics, use the
|
|
6
|
+
[Operator Guide](operator-guide.md). AKK 0.14.0 introduces the Codex CLI
|
|
7
|
+
backend, Desktop, and backend Recovery support described here.
|
|
8
|
+
|
|
9
|
+
## Requirements and compatibility
|
|
10
|
+
|
|
11
|
+
- Node.js supported by the installed OpenClaw release; Node.js 24 LTS is
|
|
12
|
+
recommended.
|
|
13
|
+
- OpenClaw `2026.6.5` or newer for normal packaged installation.
|
|
14
|
+
- Plugin API and Gateway `2026.5.12` or newer. The adjacent tested boundary,
|
|
15
|
+
`2026.5.10-beta.2`, lacks the required session workflow API.
|
|
16
|
+
- An existing supported coding-agent environment running under the same OS
|
|
17
|
+
user as OpenClaw and AKK; choose its setup below.
|
|
18
|
+
|
|
19
|
+
| Coding-agent environment | Requirement |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| Codex CLI shared backend | An authenticated, loaded main CLI conversation on a compatible local backend; [CLI backend guide](codex-cli-native-compatibility.md). No tmux or Herdr required. |
|
|
22
|
+
| Codex Desktop | The supported local app and the intended conversation open in its original owner; [Desktop guide](codex-desktop-compatibility.md). No tmux or Herdr required. |
|
|
23
|
+
| Codex or Claude Code terminal | An authenticated CLI in tmux or local Herdr `0.8.0` using socket protocol 19; [tmux](quickstart-tmux.md) or [Herdr](quickstart-herdr.md) setup. |
|
|
24
|
+
|
|
25
|
+
OpenClaw and AKK inspect local processes, private backend endpoints, and any
|
|
26
|
+
selected terminal provider. Workspace is not a routing boundary: exact current
|
|
27
|
+
conversation identity and explicit user selection are. Terminal setup
|
|
28
|
+
instructions apply only when using the terminal route.
|
|
29
|
+
|
|
30
|
+
## Choose one installation path
|
|
31
|
+
|
|
32
|
+
Use one AKK installation per OpenClaw profile: ClawHub, npm, or a linked local
|
|
33
|
+
checkout. ClawHub is the normal OpenClaw path; npm also provides the standalone
|
|
34
|
+
CLI. A [local development build](#local-development-build) is optional.
|
|
35
|
+
|
|
36
|
+
### ClawHub
|
|
37
|
+
|
|
38
|
+
This installs the OpenClaw plugin with the 0.14 backend, Desktop, and terminal
|
|
39
|
+
capabilities:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
openclaw plugins install clawhub:@scotthuang/agent-knock-knock
|
|
43
|
+
openclaw gateway restart
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
ClawHub installs the plugin, bundled AKK skill, and package-local relay CLI.
|
|
47
|
+
The plugin always uses that bundled relay. It does not add the standalone
|
|
48
|
+
`agent-knock-knock` command to the shell `PATH`.
|
|
49
|
+
|
|
50
|
+
### npm
|
|
51
|
+
|
|
52
|
+
Use npm only when the standalone shell CLI is also wanted:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g @scotthuang/agent-knock-knock
|
|
56
|
+
agent-knock-knock install-openclaw --verify
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`install-openclaw` detects whether the installed OpenClaw supports capability
|
|
60
|
+
consent. When supported, this explicit installation command passes
|
|
61
|
+
`--accept-capabilities` to both fresh and replacement plugin installs and
|
|
62
|
+
reports `capability_consent: "accepted"` in its result. Older OpenClaw versions
|
|
63
|
+
continue through the same installation path without the unsupported option.
|
|
64
|
+
|
|
65
|
+
Do not run `install-openclaw` after a ClawHub installation. These are
|
|
66
|
+
alternative installation paths. For a nonstandard OpenClaw executable:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
agent-knock-knock install-openclaw --verify \
|
|
70
|
+
--openclaw-bin /absolute/path/to/openclaw
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Local development build
|
|
74
|
+
|
|
75
|
+
Use a reviewed checkout when developing AKK or evaluating source changes.
|
|
76
|
+
This optional source installation is not required for the 0.14 backend or
|
|
77
|
+
Desktop features. Choose an OpenClaw profile with no other AKK installation,
|
|
78
|
+
or remove its existing installation
|
|
79
|
+
through OpenClaw's plugin management before linking this checkout. Do not
|
|
80
|
+
layer the link on top of a ClawHub or npm-installed plugin in the same profile.
|
|
81
|
+
|
|
82
|
+
From the reviewed repository checkout, build and link the plugin:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm ci
|
|
86
|
+
npm run build
|
|
87
|
+
openclaw plugins install --link .
|
|
88
|
+
openclaw plugins enable agent-knock-knock
|
|
89
|
+
openclaw gateway restart
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Keep the checkout available while the plugin is linked. After changing its
|
|
93
|
+
source, rebuild and restart the Gateway so it loads the new compiled code.
|
|
94
|
+
For CLI backend or Desktop use, start with a fresh AKK List, select the intended
|
|
95
|
+
conversation, and inspect its Status and advertised capabilities. These paths
|
|
96
|
+
use their own setup guides above; a terminal session is not a prerequisite.
|
|
97
|
+
`/akk doctor` checks the terminal-oriented installation environment. Missing
|
|
98
|
+
terminal prerequisites in that result do not establish that a backend or
|
|
99
|
+
Desktop conversation is unavailable. See [Contributing](../CONTRIBUTING.md)
|
|
100
|
+
for development checks.
|
|
101
|
+
|
|
102
|
+
## Optional natural-language routing
|
|
103
|
+
|
|
104
|
+
Direct `/akk ...` commands bypass model tool selection and require no tool
|
|
105
|
+
policy change. To let OpenClaw decide to call AKK from natural language, grant
|
|
106
|
+
the optional `agent-knock-knock` tools.
|
|
107
|
+
|
|
108
|
+
With the default `coding` profile and no existing `tools.allow`:
|
|
109
|
+
|
|
110
|
+
```json5
|
|
111
|
+
{
|
|
112
|
+
tools: {
|
|
113
|
+
profile: "coding",
|
|
114
|
+
alsoAllow: ["agent-knock-knock"]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
If a restrictive `tools.allow` already exists at that scope, add
|
|
120
|
+
`"agent-knock-knock"` to it instead. Do not configure `allow` and `alsoAllow`
|
|
121
|
+
at the same scope. Restart the Gateway after changing tool policy.
|
|
122
|
+
|
|
123
|
+
## Configuration
|
|
124
|
+
|
|
125
|
+
AKK requires no project-specific plugin configuration. Optional settings live
|
|
126
|
+
under `plugins.entries.agent-knock-knock.config`:
|
|
127
|
+
|
|
128
|
+
| Option | Default | Purpose |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| `storeDir` | `~/.agent-knock-knock/store` | Stable AKK Session, Turn, Watch, receipt, and callback-outbox Store. |
|
|
131
|
+
| `openclawBin` | Auto-detected | OpenClaw CLI used by the callback adapter. |
|
|
132
|
+
| `codexHome` | Auto-detected | Optional Codex home used for native-session discovery. |
|
|
133
|
+
| `idleTimeoutMinutes` | `10080` | Retention checked during controlled reconciliation. |
|
|
134
|
+
| `agentTimeoutMinutes` | `60` | Terminal inactivity timeout. |
|
|
135
|
+
| `agentHardTimeoutMinutes` | `720` | New Send/Watch hard lifetime across backend and terminal routes starting in AKK 0.14.1; also the default backend Renew duration. AKK 0.14.0 backend Send/Watch used 60 minutes when this setting is omitted. |
|
|
136
|
+
|
|
137
|
+
A custom `storeDir` must be a dedicated private directory. AKK initializes a
|
|
138
|
+
missing or empty path and refuses a non-empty manifestless directory instead
|
|
139
|
+
of guessing how to write it. The complete schema is in
|
|
140
|
+
[`openclaw.plugin.json`](../openclaw.plugin.json).
|
|
141
|
+
|
|
142
|
+
## Manual approval
|
|
143
|
+
|
|
144
|
+
AKK preserves the coding agent's existing permission mode. An approval
|
|
145
|
+
callback is not authorization: the Host must refresh Status, show the current
|
|
146
|
+
request, obtain explicit human confirmation, and invoke only the approval
|
|
147
|
+
action advertised for that exact prompt.
|
|
148
|
+
|
|
149
|
+
CLI backend and Desktop approvals use the current typed interaction in the
|
|
150
|
+
original native task and controller session. Copy the advertised interaction
|
|
151
|
+
and decision; do not translate terminal approval keys into backend requests.
|
|
152
|
+
See the [CLI backend](codex-cli-native-compatibility.md) and
|
|
153
|
+
[Desktop](codex-desktop-compatibility.md) guides for supported request types.
|
|
154
|
+
|
|
155
|
+
Terminal approval has separate boundaries. Claude Code manual approval is
|
|
156
|
+
deliberately narrow. It supports the current AKK-managed Turn only and
|
|
157
|
+
requires an exact one-time Bash **Yes** choice
|
|
158
|
+
correlated with the owner-private transcript. Persistent permission choices,
|
|
159
|
+
unknown dialogs, and changed evidence remain manual in the TUI.
|
|
160
|
+
|
|
161
|
+
Codex may also advertise terminal-scoped approval when the exact visible prompt
|
|
162
|
+
is known but managed foreground UUID attribution is unavailable. The action is
|
|
163
|
+
prefilled with the exact `terminal_id`; never construct or guess it. Both paths
|
|
164
|
+
retain the confirmation offer and prompt fence privately and recapture them
|
|
165
|
+
under lock immediately before sending one key.
|
|
166
|
+
|
|
167
|
+
## Automatic approval
|
|
168
|
+
|
|
169
|
+
Trusted Codex and supported hookless Claude terminal commands can optionally
|
|
170
|
+
be auto-approved with a deterministic, default-disabled policy:
|
|
171
|
+
|
|
172
|
+
```json5
|
|
173
|
+
autoApprove: {
|
|
174
|
+
enabled: true,
|
|
175
|
+
rules: [{
|
|
176
|
+
id: "project-read-status",
|
|
177
|
+
agents: ["codex", "claude"],
|
|
178
|
+
workspaces: [
|
|
179
|
+
"/absolute/path/to/project-a",
|
|
180
|
+
"/absolute/path/to/project-b"
|
|
181
|
+
],
|
|
182
|
+
commands: [["pwd"], ["git", "status"], ["git", "diff", "--stat"]]
|
|
183
|
+
}]
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Place `autoApprove` inside the plugin `config`. Each rule may authorize
|
|
188
|
+
multiple canonical workspace roots; `autoApprove.rules[].workspaces` is the
|
|
189
|
+
sole workspace boundary for automatic approval and does not limit discovery or
|
|
190
|
+
manual control. Rules match only the configured agents and exact argument
|
|
191
|
+
vectors. Shell composition, substitutions, globs, environment assignments,
|
|
192
|
+
unparseable commands, and paths outside every authorized root remain manual.
|
|
193
|
+
Terminal Watch approval notifications never participate in auto-approval.
|
|
194
|
+
|
|
195
|
+
## Supervisor and callbacks
|
|
196
|
+
|
|
197
|
+
OpenClaw starts one non-overlapping AKK supervision cycle at startup and after
|
|
198
|
+
each previous cycle completes. Terminal managed-Turn monitors, Terminal
|
|
199
|
+
Watches, CLI backend Watches, and Desktop Watches have independent recovery
|
|
200
|
+
phases and error boundaries, so a failure in one does not starve the others.
|
|
201
|
+
|
|
202
|
+
For terminal managed Turns, with a writable Store, healthy Gateway, successful
|
|
203
|
+
reconciliation, and an unchanged Turn binding, AKK prepares one immutable
|
|
204
|
+
completion message and outbox entry within 30 seconds after reliable native completion evidence
|
|
205
|
+
becomes stable. External transport and wake acknowledgement are outside that
|
|
206
|
+
bound. Status remains the manual recovery path when presentation is delayed.
|
|
207
|
+
|
|
208
|
+
For CLI backend and Desktop work, retain the exact task ID returned by Send
|
|
209
|
+
or Watch. Use [backend task recovery](backend-task-recovery.md) for Recover,
|
|
210
|
+
Renew, Close, Unwatch, and Retry Callback. These operations target that original
|
|
211
|
+
task and controller session without terminal input. Close releases Send
|
|
212
|
+
management; it does not cancel Codex. Unwatch stops observation. A callback
|
|
213
|
+
accepted by OpenClaw does not prove delivery by a downstream chat channel, and
|
|
214
|
+
an uncertain callback is not eligible for manual replay.
|
|
215
|
+
|
|
216
|
+
Terminal binding and menu recovery remain separate; see
|
|
217
|
+
[terminal recovery and diagnostics](operator-guide.md#terminal-recovery-and-diagnostics).
|
|
218
|
+
|
|
219
|
+
## Troubleshooting
|
|
220
|
+
|
|
221
|
+
For CLI backend and Desktop, start with fresh List and Status for the selected
|
|
222
|
+
conversation or exact task. For terminal installation diagnostics, use:
|
|
223
|
+
|
|
224
|
+
```text
|
|
225
|
+
/akk doctor
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
With the standalone npm CLI installed, `agent-knock-knock doctor` additionally
|
|
229
|
+
checks the executable environment directly. Doctor's readiness result includes
|
|
230
|
+
tmux/Herdr and CLI prerequisites; a missing terminal requirement is not a
|
|
231
|
+
backend or Desktop health result.
|
|
232
|
+
|
|
233
|
+
| Symptom | Recovery |
|
|
234
|
+
| --- | --- |
|
|
235
|
+
| CLI backend conversation is missing | Check that the intended main CLI conversation is loaded under the selected local Codex home, then refresh List; see the [CLI backend guide](codex-cli-native-compatibility.md). |
|
|
236
|
+
| Desktop row has no live owner | Open that exact conversation in the supported Desktop app, then refresh List. Catalog membership alone does not grant Send capability. |
|
|
237
|
+
| No eligible terminal, when terminal control is intended | Start authenticated Codex or Claude Code inside tmux or supported Herdr as the same OS user, then refresh `/akk list`. |
|
|
238
|
+
| Plugin or callbacks cannot find OpenClaw | Configure `openclawBin`; for npm installation, pass the matching `--openclaw-bin` to `install-openclaw`. |
|
|
239
|
+
| Linked source changes do not appear | Run `npm run build` in the linked checkout and restart the Gateway; see [Local development build](#local-development-build). |
|
|
240
|
+
| Backend observation is stale, stopped, or expired | Inspect Status for the original `watch_id`, then use the action advertised for its state; [backend recovery](backend-task-recovery.md) distinguishes Recover from Renew. |
|
|
241
|
+
| Backend callback failed | Use only an advertised Retry Callback action for an eligible notification; select its exact `notification_id` when several are eligible. Accepted, in-flight, and uncertain deliveries cannot be replayed. |
|
|
242
|
+
| Terminal Turn is `stalled` | Inspect Status and the exact pane; use the advertised Renew action only if the same Turn is still live. |
|
|
243
|
+
| Terminal Turn is `callback_failed` | Use the advertised Retry Callback action; it reuses the original message identity. |
|
|
244
|
+
| Human native-thread switch conflicts with active terminal work | Ask the user whether to keep the old work or take over the current thread. Use only the nested fresh action returned by List. |
|
|
245
|
+
| Terminal List reports orphaned dispatch or transition state | Inspect the pane, then run only the exact Close recovery command returned by List. It leaves the coding agent and terminal running. |
|
|
246
|
+
| Claude approval is not offered | Resolve unsupported, persistent, stale, or uncorrelated dialogs in the TUI. |
|
|
247
|
+
| Claude request was not auto-approved | Check the enabled rule, agent, canonical workspace, exact argv, and current screen/transcript evidence. |
|
|
248
|
+
|
|
249
|
+
Terminal diagnostics:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
agent-knock-knock status --conversation latest --trace
|
|
253
|
+
agent-knock-knock list --terminal-debug
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
For backend tasks, use the exact returned task ID instead of `latest`, for
|
|
257
|
+
example `agent-knock-knock status --watch '<watch_id>'`. Status for that task
|
|
258
|
+
reads its original backend without terminal input. List never types into a
|
|
259
|
+
terminal; a targeted conversation Status for an unbound, idle physical Codex
|
|
260
|
+
terminal may perform the closed identity inspection described in the
|
|
261
|
+
[Operator Guide](operator-guide.md#akk-status-and-native-inspection).
|
|
262
|
+
|
|
263
|
+
Trace and logs must not expose agent reasoning, raw callback payloads,
|
|
264
|
+
credentials, tokens, passwords, or proxy secrets.
|
|
265
|
+
|
|
266
|
+
## Trust and privacy
|
|
267
|
+
|
|
268
|
+
AKK has no hosted control plane or telemetry. Ordinary Send preserves the
|
|
269
|
+
coding agent's permission settings; an explicit supported permission action
|
|
270
|
+
applies the user's selected mode. Terminal, Session, Turn, Watch, receipt, and
|
|
271
|
+
log state stay on the local machine. Claude approval callbacks omit raw commands; Codex
|
|
272
|
+
may include bounded visible command detail so the Host can present it for
|
|
273
|
+
review.
|
|
274
|
+
|
|
275
|
+
Task content is still processed by OpenClaw and the coding-agent or model
|
|
276
|
+
providers configured by the user. Keep secrets out of prompts and review every
|
|
277
|
+
agent's permission mode.
|
|
278
|
+
|
|
279
|
+
For Store migration, filesystem permissions, retention, and log settings, see
|
|
280
|
+
[Storage and Logging](storage-and-logging.md). For development and release
|
|
281
|
+
workflows, see [Contributing](../CONTRIBUTING.md) and [Testing](testing.md).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# OpenClaw Session Turn Delivery
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
AKK delivers structured terminal-monitor callbacks into the originating OpenClaw session without asking OpenClaw to poll terminal output, logs, or process state.
|
|
6
|
+
|
|
7
|
+
The current flow is:
|
|
8
|
+
|
|
9
|
+
1. OpenClaw sends a request through the terminal row's current exact action: `session_exact` with `session_id`, or `terminal_follow_current` with the full `terminal_id`. AKK derives and revalidates freshness evidence inside the trusted plugin/CLI boundary.
|
|
10
|
+
2. AKK creates a new `turn_id` and sends the user-facing request to the verified Codex or Claude Code tmux pane bound to that session.
|
|
11
|
+
3. AKK monitors the exact terminal, native session evidence, AKK session, Turn, process, and message. The running OpenClaw service independently replaces an unexpectedly exited eligible monitor without waiting for `list` or `status`.
|
|
12
|
+
4. When the adapter has reliable evidence, AKK records a canonical approval, completion, cancellation, stall, or error message.
|
|
13
|
+
5. AKK calls the plugin Gateway method `agent-knock-knock.callback` and receives a validated delivery plan.
|
|
14
|
+
6. AKK completes delivery into the originating OpenClaw session.
|
|
15
|
+
|
|
16
|
+
The identity chain is terminal → native coding-agent session → AKK `session_id` → `turn_id`. An ordinary send creates a new Turn through exactly one current listed scope: `session_exact` targets a prefilled `session_id`, while rollout-backed Codex uses `terminal_follow_current` with its full `terminal_id`. Opaque freshness, binding, and dispatch evidence never crosses the model boundary; AKK derives it privately and revalidates it under lock. Exact callbacks and managed control operations target `turn_id`. An unmanaged raw-terminal row may expose its own prefilled compatibility selector for status or recovery controls, but that selector is not a Turn ID and must never be constructed. If the coding agent asks a question, the callback marks that Turn `waiting_for_openclaw`; `respond(turn_id, answer)` continues the same Turn.
|
|
17
|
+
|
|
18
|
+
Native new/clear and resume controls operate between the terminal and Session layers. The model supplies the exact `terminal_id`; resume also supplies one complete, verified historical `native_thread_id`. AKK privately derives the current binding and candidate evidence, then revalidates both under lock. A successful transition creates or activates an AKK Session, advances the terminal binding generation, and creates no Turn. The next ordinary send creates the first Turn in that selected context.
|
|
19
|
+
|
|
20
|
+
The coding agent does not invoke a callback command. Terminal monitoring and callback delivery belong to AKK.
|
|
21
|
+
|
|
22
|
+
For an accepted Codex dispatch, durable completion prefers the exact rollout,
|
|
23
|
+
byte anchor, process incarnation, and native turn UUID already persisted on the
|
|
24
|
+
Turn. An exact identity or integrity failure is retained as a redacted detector
|
|
25
|
+
diagnostic and never falls through to a same-workspace rollout guess. Monitor
|
|
26
|
+
replacement reuses the immutable completion claim so recovery prepares at most
|
|
27
|
+
one `done` callback/outbox entry.
|
|
28
|
+
|
|
29
|
+
## Delivery Invariants
|
|
30
|
+
|
|
31
|
+
Callback delivery must:
|
|
32
|
+
|
|
33
|
+
1. Preserve the originating OpenClaw session, AKK `session_id`, and exact `turn_id`.
|
|
34
|
+
2. Trigger the target session's next run without impersonating a user interface.
|
|
35
|
+
3. Keep thinking text and unrelated raw terminal output out of callbacks, and disclose only the approval details required for review. Claude approval callbacks omit raw commands.
|
|
36
|
+
4. Deduplicate retries with stable Turn, message, and delivery identities.
|
|
37
|
+
5. Preserve structured provenance for audit and debugging.
|
|
38
|
+
6. Persist the canonical message before attempting external delivery.
|
|
39
|
+
7. Expose actionable callback failure and retry state without requiring raw-log inspection.
|
|
40
|
+
8. Refuse to report completion when terminal evidence is stale, ambiguous, or unsupported.
|
|
41
|
+
9. Fence every callback to the terminal incarnation, native identity, Session, Turn, and binding generation that created it, so a pre-transition callback cannot mutate the active post-transition context.
|
|
42
|
+
|
|
43
|
+
These invariants apply even if OpenClaw later exposes a more direct plugin session-turn API.
|
|
44
|
+
|
|
45
|
+
Native clear/new/resume operations are outside callback delivery and ordinary Turn creation. They are serialized against monitors and callback/recovery mutations; unresolved work blocks the transition, and stale delivery remains attached only to its historical Turn.
|