@openclaw/clickclack 2026.7.2-beta.2 → 2026.7.2-beta.4

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/README.md CHANGED
@@ -10,6 +10,18 @@ openclaw plugins install @openclaw/clickclack
10
10
 
11
11
  ## Setup
12
12
 
13
+ The recommended setup path uses the one-time command generated by ClickClack:
14
+
15
+ ```sh
16
+ openclaw channels add clickclack --code 'https://clickclack.example.com/#XXXX-XXXX-XXXX'
17
+ ```
18
+
19
+ Split-origin and path-mounted ClickClack deployments generate an exact
20
+ `/api/bot-setup-codes/claim#CODE` endpoint. OpenClaw validates the versioned
21
+ claim response and saves its canonical API base.
22
+
23
+ For manual token setup:
24
+
13
25
  ```sh
14
26
  openclaw channels add clickclack \
15
27
  --base-url https://clickclack.example.com \
@@ -24,6 +36,31 @@ Run `openclaw onboard` for guided setup. The workspace value can be a
24
36
  For the default account only, `--use-env` reads `CLICKCLACK_BOT_TOKEN`; config
25
37
  storage is the normal setup path.
26
38
 
39
+ ### Public and private endpoints
40
+
41
+ `baseUrl` is the public ClickClack URL used in links that people open. Set the
42
+ optional `apiBaseUrl` when the gateway should call ClickClack through a
43
+ different server-to-server endpoint:
44
+
45
+ ```json5
46
+ {
47
+ channels: {
48
+ clickclack: {
49
+ baseUrl: "https://clack.openclaw.ai",
50
+ apiBaseUrl: "http://127.0.0.1:8484",
51
+ token: { source: "env", provider: "default", id: "CLICKCLACK_BOT_TOKEN" },
52
+ workspace: "default",
53
+ },
54
+ },
55
+ }
56
+ ```
57
+
58
+ This same-host pattern lets the public hostname stay fully protected by an
59
+ authentication gateway such as Cloudflare Access while the local OpenClaw
60
+ gateway talks directly to ClickClack. REST requests, setup verification, and
61
+ the realtime WebSocket use `apiBaseUrl`; browser-facing discussion links keep
62
+ using `baseUrl`. When `apiBaseUrl` is unset, it defaults to `baseUrl`.
63
+
27
64
  ## Command menus
28
65
 
29
66
  ClickClack command menus are enabled by default. At gateway startup, the
@@ -35,6 +72,89 @@ Set `commandMenu: false` on an account to disable menu sync. Sync failures do
35
72
  not prevent the gateway from starting, so older tokens and ClickClack servers
36
73
  continue to work without a menu.
37
74
 
75
+ ## Discussions
76
+
77
+ ClickClack can create one managed channel for each OpenClaw session:
78
+
79
+ The account token needs `channels:write`, which is included in `bot:admin` but
80
+ not in the normal `bot:write` setup token. The ClickClack server must also
81
+ support and return the managed-channel fields used by this integration.
82
+
83
+ ```json5
84
+ {
85
+ channels: {
86
+ clickclack: {
87
+ baseUrl: "https://clickclack.example.com",
88
+ token: { source: "env", provider: "default", id: "CLICKCLACK_BOT_TOKEN" },
89
+ workspace: "default",
90
+ discussions: {
91
+ enabled: true,
92
+ workspace: "default",
93
+ controlUrlBase: "https://team.openclaw.ai",
94
+ section: "Sessions",
95
+ },
96
+ },
97
+ },
98
+ }
99
+ ```
100
+
101
+ Opening a session discussion creates a public, externally managed channel and
102
+ stores its binding in the ClickClack plugin's SQLite state. Session archive,
103
+ restore, label, category, and deletion changes are reflected in the channel;
104
+ deletion archives the channel and never deletes its messages. `workspace`
105
+ defaults to the account workspace, and `section` defaults to `Sessions`.
106
+ `controlUrlBase` adds a link back to `/chat?session=<session-key>` in the
107
+ OpenClaw Control UI.
108
+
109
+ Enable discussions on exactly one ClickClack account. Multiple enabled
110
+ discussion accounts are rejected because the session discussion provider does
111
+ not have an account selector.
112
+
113
+ Messages in the managed channel run in a stable side session under the same
114
+ agent id as the attached main session. The plugin installs a scoped host grant
115
+ for `sessions_history`, `session_status`, and `sessions_send` between that side
116
+ session and its attached main session, so `tools.sessions.visibility` can stay
117
+ at its safer default `tree`. A second host-side policy blocks session discovery
118
+ and alternate targets; the side-agent prompt is not the authorization boundary.
119
+ The agent still needs those three tools in its effective tool allowlist.
120
+
121
+ The binding, managed ownership reference, and side-session identity include the
122
+ concrete OpenClaw session id as well as the pinned server and channel. Resetting
123
+ a reusable session key, replacing a binding, or retargeting it therefore revokes
124
+ the old channel locally, archives it when the old credential remains usable, and
125
+ starts a fresh channel and side transcript.
126
+ Messages arriving through an archived, reset, disabled, or retargeted managed
127
+ binding are dropped instead of falling back to the account's normal channel
128
+ routing. Released bindings leave a durable revoked-channel marker so delayed
129
+ realtime events remain fail-closed. Remote ownership is keyed by ClickClack
130
+ server and channel id, so renaming the local account cannot turn a managed
131
+ channel into an ordinary one.
132
+
133
+ Managed-channel ownership references include a durable per-installation id, so
134
+ two OpenClaw gateways using the same ClickClack workspace do not adopt each
135
+ other's discussion channels. They also include the destination and a durable
136
+ binding generation, so an account or workspace round trip cannot re-adopt a
137
+ previous channel. Changing or removing `controlUrlBase` is reflected on the next
138
+ lifecycle reconciliation pass.
139
+
140
+ If a channel-create response is lost, the pending ownership reservation
141
+ temporarily quarantines otherwise-unbound events in that workspace. The same
142
+ coarse reconciler then adopts the created channel or clears/archives the
143
+ ambiguous attempt; a reset cannot make the old channel fall through to ordinary
144
+ routing.
145
+
146
+ When a workspace move keeps the original workspace credential configured, the
147
+ plugin archives the old channel before release. If the token is replaced with a
148
+ workspace-scoped credential that cannot access the old workspace, OpenClaw
149
+ releases the binding into the revoked-channel marker without trying the new token
150
+ against the old channel; archive that leftover channel from ClickClack.
151
+
152
+ The main session gets a read-only `discussion` tool that pulls the latest
153
+ channel messages, including recent thread replies. The pull uses bounded
154
+ history and thread-request budgets; its output says when older active threads
155
+ may have been omitted. It never posts, archives, renames, or otherwise mutates
156
+ the discussion.
157
+
38
158
  ## Docs
39
159
 
40
160
  See `docs/channels/clickclack.md` in the OpenClaw repository, or the published docs at `https://docs.openclaw.ai/channels/clickclack`.
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as createClickClackClient, d as DEFAULT_ACCOUNT_ID, f as listClickClackAccountIds, h as resolveDefaultClickClackAccountId, m as resolveClickClackAccount, p as listEnabledClickClackAccounts, s as clickClackConfigSchema } from "./setup-surface-B346XaAu.js";
2
- import { a as setClickClackRuntime, i as getClickClackRuntime, n as buildClickClackTarget, r as parseClickClackTarget, t as clickClackPlugin } from "./channel-BnREQIP8.js";
1
+ import { S as resolveDefaultClickClackAccountId, b as listEnabledClickClackAccounts, d as createClickClackClient, m as clickClackConfigSchema, v as DEFAULT_ACCOUNT_ID, x as resolveClickClackAccount, y as listClickClackAccountIds } from "./setup-surface-Baf26N-D.js";
2
+ import { T as setClickClackRuntime, n as buildClickClackTarget, r as parseClickClackTarget, t as clickClackPlugin, w as getClickClackRuntime } from "./channel-BDq0KWDB.js";
3
3
  export { DEFAULT_ACCOUNT_ID, buildClickClackTarget, clickClackConfigSchema, clickClackPlugin, createClickClackClient, getClickClackRuntime, listClickClackAccountIds, listEnabledClickClackAccounts, parseClickClackTarget, resolveClickClackAccount, resolveDefaultClickClackAccountId, setClickClackRuntime };