quukk-clawmessenger 0.1.0-beta.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.
Files changed (100) hide show
  1. package/LICENSE +328 -0
  2. package/MODIFICATIONS.md +98 -0
  3. package/NOTICE +14 -0
  4. package/README.md +223 -0
  5. package/THIRD_PARTY_NOTICES.md +580 -0
  6. package/bin/quukk-clawmessenger.js +3 -0
  7. package/dist/bindings/service.d.ts +39 -0
  8. package/dist/bindings/service.js +414 -0
  9. package/dist/cardkit/action-router.d.ts +64 -0
  10. package/dist/cardkit/action-router.js +239 -0
  11. package/dist/cardkit/builders.d.ts +65 -0
  12. package/dist/cardkit/builders.js +304 -0
  13. package/dist/cardkit/parse-marker.d.ts +24 -0
  14. package/dist/cardkit/parse-marker.js +180 -0
  15. package/dist/cardkit/schema.d.ts +199 -0
  16. package/dist/cardkit/schema.js +15 -0
  17. package/dist/cardkit/templates.d.ts +35 -0
  18. package/dist/cardkit/templates.js +59 -0
  19. package/dist/cardkit/validate.d.ts +21 -0
  20. package/dist/cardkit/validate.js +638 -0
  21. package/dist/cli.d.ts +218 -0
  22. package/dist/cli.js +2067 -0
  23. package/dist/config/atomic-json.d.ts +42 -0
  24. package/dist/config/atomic-json.js +216 -0
  25. package/dist/config/paths.d.ts +14 -0
  26. package/dist/config/paths.js +20 -0
  27. package/dist/config/schema.d.ts +144 -0
  28. package/dist/config/schema.js +187 -0
  29. package/dist/config/store.d.ts +49 -0
  30. package/dist/config/store.js +502 -0
  31. package/dist/go/binary.d.ts +34 -0
  32. package/dist/go/binary.js +175 -0
  33. package/dist/go/client.d.ts +50 -0
  34. package/dist/go/client.js +500 -0
  35. package/dist/go/sse.d.ts +14 -0
  36. package/dist/go/sse.js +143 -0
  37. package/dist/go/types.d.ts +224 -0
  38. package/dist/go/types.js +145 -0
  39. package/dist/http/routes.d.ts +537 -0
  40. package/dist/http/routes.js +543 -0
  41. package/dist/http/security.d.ts +24 -0
  42. package/dist/http/security.js +183 -0
  43. package/dist/http/server.d.ts +25 -0
  44. package/dist/http/server.js +319 -0
  45. package/dist/http/tickets.d.ts +17 -0
  46. package/dist/http/tickets.js +92 -0
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.js +3 -0
  49. package/dist/logging/logger.d.ts +65 -0
  50. package/dist/logging/logger.js +365 -0
  51. package/dist/migration/discover.d.ts +43 -0
  52. package/dist/migration/discover.js +172 -0
  53. package/dist/migration/import.d.ts +17 -0
  54. package/dist/migration/import.js +40 -0
  55. package/dist/process/identity.d.ts +43 -0
  56. package/dist/process/identity.js +222 -0
  57. package/dist/process/service-identity.d.ts +89 -0
  58. package/dist/process/service-identity.js +667 -0
  59. package/dist/process/supervisor.d.ts +73 -0
  60. package/dist/process/supervisor.js +539 -0
  61. package/dist/protocol/discussion-v1.d.ts +54 -0
  62. package/dist/protocol/discussion-v1.js +162 -0
  63. package/dist/protocol/discussion-v2.d.ts +250 -0
  64. package/dist/protocol/discussion-v2.js +747 -0
  65. package/dist/protocol/discussion-wire.d.ts +48 -0
  66. package/dist/protocol/discussion-wire.js +297 -0
  67. package/dist/protocol/messages.d.ts +75 -0
  68. package/dist/protocol/messages.js +622 -0
  69. package/dist/registration/capabilities.d.ts +1 -0
  70. package/dist/registration/capabilities.js +8 -0
  71. package/dist/registration/client.d.ts +53 -0
  72. package/dist/registration/client.js +361 -0
  73. package/dist/rongcloud/client.d.ts +87 -0
  74. package/dist/rongcloud/client.js +730 -0
  75. package/dist/rongcloud/env-polyfill.d.ts +41 -0
  76. package/dist/rongcloud/env-polyfill.js +550 -0
  77. package/dist/rongcloud/worker-entry.d.ts +39 -0
  78. package/dist/rongcloud/worker-entry.js +447 -0
  79. package/dist/rongcloud/worker-protocol.d.ts +205 -0
  80. package/dist/rongcloud/worker-protocol.js +353 -0
  81. package/dist/rongcloud/worker-supervisor.d.ts +102 -0
  82. package/dist/rongcloud/worker-supervisor.js +1141 -0
  83. package/dist/router/conversation.d.ts +12 -0
  84. package/dist/router/conversation.js +15 -0
  85. package/dist/router/dedup.d.ts +50 -0
  86. package/dist/router/dedup.js +76 -0
  87. package/dist/router/message-router.d.ts +133 -0
  88. package/dist/router/message-router.js +2835 -0
  89. package/dist/router/session-store.d.ts +36 -0
  90. package/dist/router/session-store.js +366 -0
  91. package/dist/service.d.ts +155 -0
  92. package/dist/service.js +1319 -0
  93. package/dist/ui/assets/index-DY3ktjjQ.css +2 -0
  94. package/dist/ui/assets/index-TQoT5GpO.js +67 -0
  95. package/dist/ui/index.html +15 -0
  96. package/dist/version.d.ts +2 -0
  97. package/dist/version.js +3 -0
  98. package/package.json +56 -0
  99. package/scripts/audit-tarball.mjs +613 -0
  100. package/scripts/postinstall.mjs +172 -0
package/LICENSE ADDED
@@ -0,0 +1,328 @@
1
+ # Multica License
2
+
3
+ Multica is provided under the terms of the Apache License, Version 2.0 —
4
+ the complete, unmodified text of which is reproduced in Part II of this
5
+ file — subject to the additional conditions in Part I.
6
+
7
+ Part I and Part II together constitute the "Multica License". Neither part
8
+ grants any rights on its own. Condition 3 states how the two parts fit
9
+ together and what must be delivered when you redistribute.
10
+
11
+ ------------------------------------------------------------------------
12
+
13
+ Part I — Additional Conditions
14
+
15
+ 1. Multica may be utilized commercially, including as a backend service for
16
+ other applications or as a task management platform for enterprises,
17
+ subject to the following conditions:
18
+
19
+ a. Hosted or embedded service: Unless you have obtained a commercial
20
+ license from the producer, you may not use the Multica source code
21
+ to provide a hosted service to third parties, or embed Multica as a
22
+ component of a product or service that is sold, licensed, or
23
+ otherwise commercially distributed to third parties.
24
+
25
+ - This restriction applies to offering Multica (in whole or
26
+ substantial part) as a SaaS platform, a managed service, or as
27
+ an integrated component within another commercial offering.
28
+ - Providing a hosted service to third parties is restricted whether
29
+ or not you charge for it. A publicly accessible instance operated
30
+ for users outside your own organization requires a commercial
31
+ license even when it is offered free of charge, carries no
32
+ advertising, and sells no paid tier.
33
+ - Internal use within a single organization (including multiple
34
+ workspaces) does not require a commercial license.
35
+ - Making the source code available, including publishing the source
36
+ code of a fork in a public repository, is not itself a hosted
37
+ service and does not require a commercial license. Any such
38
+ distribution remains subject to all applicable terms of this
39
+ Multica License, including conditions (b) and (c) below and
40
+ condition 3. Source distribution does not grant recipients the
41
+ right to operate a hosted service; each operator must obtain its
42
+ own commercial license.
43
+
44
+ b. Branding and copyright information: Unless the producer has granted
45
+ you a written branding waiver, you may not remove or modify the
46
+ Multica LOGO, the Multica product name, or the copyright and
47
+ attribution information displayed by a Multica user interface.
48
+
49
+ - User Interface Definition: For the purposes of this license, a
50
+ "Multica user interface" means any user interface derived, in whole
51
+ or in substantial part, from the user interface code in this
52
+ repository. This includes the components located in the
53
+ `apps/web/`, `apps/desktop/`, `apps/mobile/`, `packages/views/`,
54
+ and `packages/ui/` directories when running Multica from the raw
55
+ source code, the frontend container image (published as
56
+ `ghcr.io/multica-ai/multica-web`) when running Multica with
57
+ Docker, and any compiled desktop or mobile application built from
58
+ that code. That enumeration is illustrative rather than
59
+ exhaustive: user interface code remains covered when it is
60
+ modified, moved, renamed, or extracted into another package or
61
+ repository.
62
+ - This restriction is inapplicable to uses of Multica that do not
63
+ involve a Multica user interface, such as running only the
64
+ `server/` backend, the daemon, or the CLI without redistributing
65
+ or operating any Multica user interface. Such uses remain subject
66
+ to condition (c) below.
67
+
68
+ c. Attribution for non-interface use: If you redistribute or operate a
69
+ product or service built on Multica's backend, daemon, or CLI
70
+ without a Multica user interface, you must retain all copyright,
71
+ patent, trademark, and attribution notices present in the source
72
+ code and in the NOTICE file, and state in your user-facing
73
+ documentation that the product is built on Multica, including a link
74
+ to https://github.com/multica-ai/multica.
75
+
76
+ d. Relationship between grants: A branding waiver is not a commercial
77
+ license and does not permit any use restricted by condition (a). A
78
+ commercial license does not by itself waive condition (b) or
79
+ condition (c). Each grant must be obtained from the producer
80
+ expressly and separately, and neither may be inferred from the other
81
+ or from the producer's silence, review, or acceptance of your
82
+ contributions.
83
+
84
+ 2. Contributions: By submitting a contribution to Multica, you agree that:
85
+
86
+ a. The producer can adjust this Multica License to be more strict or
87
+ relaxed as deemed necessary.
88
+
89
+ b. Your contributed code may be used for commercial purposes, including
90
+ but not limited to its cloud business operations.
91
+
92
+ c. Your contribution is submitted under this Multica License as a whole,
93
+ as described in condition 3, and not under Part II alone.
94
+
95
+ 3. Composition, precedence, and redistribution:
96
+
97
+ a. This entire file is the Multica License. Part I (these additional
98
+ conditions) and Part II (the incorporated Apache License, Version
99
+ 2.0) together form a single set of terms. Apart from the conditions
100
+ stated in Part I, all other rights and restrictions follow Part II.
101
+
102
+ b. Wherever Part II refers to "this License", that reference means the
103
+ Multica License as a whole — Part I and Part II together — and not
104
+ Part II in isolation. This includes the copy of the License that
105
+ section 4(a) of Part II requires you to give to recipients, and the
106
+ terms under which section 5 of Part II treats a contribution as
107
+ submitted.
108
+
109
+ c. If Part I and Part II conflict, Part I controls.
110
+
111
+ d. If you redistribute Multica or a derivative work of it, you must
112
+ deliver this complete file. Delivering Part II alone does not
113
+ satisfy the Multica License or section 4(a) of Part II.
114
+
115
+ © 2025-2026 Multica, Inc.
116
+
117
+ ------------------------------------------------------------------------
118
+
119
+ Part II — Incorporated Apache License 2.0 Text
120
+
121
+ The text below is reproduced verbatim and unmodified from
122
+ https://www.apache.org/licenses/LICENSE-2.0.txt. It is incorporated into
123
+ the Multica License as described in condition 3 above.
124
+
125
+ ------------------------------------------------------------------------
126
+
127
+
128
+ Apache License
129
+ Version 2.0, January 2004
130
+ http://www.apache.org/licenses/
131
+
132
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
133
+
134
+ 1. Definitions.
135
+
136
+ "License" shall mean the terms and conditions for use, reproduction,
137
+ and distribution as defined by Sections 1 through 9 of this document.
138
+
139
+ "Licensor" shall mean the copyright owner or entity authorized by
140
+ the copyright owner that is granting the License.
141
+
142
+ "Legal Entity" shall mean the union of the acting entity and all
143
+ other entities that control, are controlled by, or are under common
144
+ control with that entity. For the purposes of this definition,
145
+ "control" means (i) the power, direct or indirect, to cause the
146
+ direction or management of such entity, whether by contract or
147
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
148
+ outstanding shares, or (iii) beneficial ownership of such entity.
149
+
150
+ "You" (or "Your") shall mean an individual or Legal Entity
151
+ exercising permissions granted by this License.
152
+
153
+ "Source" form shall mean the preferred form for making modifications,
154
+ including but not limited to software source code, documentation
155
+ source, and configuration files.
156
+
157
+ "Object" form shall mean any form resulting from mechanical
158
+ transformation or translation of a Source form, including but
159
+ not limited to compiled object code, generated documentation,
160
+ and conversions to other media types.
161
+
162
+ "Work" shall mean the work of authorship, whether in Source or
163
+ Object form, made available under the License, as indicated by a
164
+ copyright notice that is included in or attached to the work
165
+ (an example is provided in the Appendix below).
166
+
167
+ "Derivative Works" shall mean any work, whether in Source or Object
168
+ form, that is based on (or derived from) the Work and for which the
169
+ editorial revisions, annotations, elaborations, or other modifications
170
+ represent, as a whole, an original work of authorship. For the purposes
171
+ of this License, Derivative Works shall not include works that remain
172
+ separable from, or merely link (or bind by name) to the interfaces of,
173
+ the Work and Derivative Works thereof.
174
+
175
+ "Contribution" shall mean any work of authorship, including
176
+ the original version of the Work and any modifications or additions
177
+ to that Work or Derivative Works thereof, that is intentionally
178
+ submitted to Licensor for inclusion in the Work by the copyright owner
179
+ or by an individual or Legal Entity authorized to submit on behalf of
180
+ the copyright owner. For the purposes of this definition, "submitted"
181
+ means any form of electronic, verbal, or written communication sent
182
+ to the Licensor or its representatives, including but not limited to
183
+ communication on electronic mailing lists, source code control systems,
184
+ and issue tracking systems that are managed by, or on behalf of, the
185
+ Licensor for the purpose of discussing and improving the Work, but
186
+ excluding communication that is conspicuously marked or otherwise
187
+ designated in writing by the copyright owner as "Not a Contribution."
188
+
189
+ "Contributor" shall mean Licensor and any individual or Legal Entity
190
+ on behalf of whom a Contribution has been received by Licensor and
191
+ subsequently incorporated within the Work.
192
+
193
+ 2. Grant of Copyright License. Subject to the terms and conditions of
194
+ this License, each Contributor hereby grants to You a perpetual,
195
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
196
+ copyright license to reproduce, prepare Derivative Works of,
197
+ publicly display, publicly perform, sublicense, and distribute the
198
+ Work and such Derivative Works in Source or Object form.
199
+
200
+ 3. Grant of Patent License. Subject to the terms and conditions of
201
+ this License, each Contributor hereby grants to You a perpetual,
202
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
203
+ (except as stated in this section) patent license to make, have made,
204
+ use, offer to sell, sell, import, and otherwise transfer the Work,
205
+ where such license applies only to those patent claims licensable
206
+ by such Contributor that are necessarily infringed by their
207
+ Contribution(s) alone or by combination of their Contribution(s)
208
+ with the Work to which such Contribution(s) was submitted. If You
209
+ institute patent litigation against any entity (including a
210
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
211
+ or a Contribution incorporated within the Work constitutes direct
212
+ or contributory patent infringement, then any patent licenses
213
+ granted to You under this License for that Work shall terminate
214
+ as of the date such litigation is filed.
215
+
216
+ 4. Redistribution. You may reproduce and distribute copies of the
217
+ Work or Derivative Works thereof in any medium, with or without
218
+ modifications, and in Source or Object form, provided that You
219
+ meet the following conditions:
220
+
221
+ (a) You must give any other recipients of the Work or
222
+ Derivative Works a copy of this License; and
223
+
224
+ (b) You must cause any modified files to carry prominent notices
225
+ stating that You changed the files; and
226
+
227
+ (c) You must retain, in the Source form of any Derivative Works
228
+ that You distribute, all copyright, patent, trademark, and
229
+ attribution notices from the Source form of the Work,
230
+ excluding those notices that do not pertain to any part of
231
+ the Derivative Works; and
232
+
233
+ (d) If the Work includes a "NOTICE" text file as part of its
234
+ distribution, then any Derivative Works that You distribute must
235
+ include a readable copy of the attribution notices contained
236
+ within such NOTICE file, excluding those notices that do not
237
+ pertain to any part of the Derivative Works, in at least one
238
+ of the following places: within a NOTICE text file distributed
239
+ as part of the Derivative Works; within the Source form or
240
+ documentation, if provided along with the Derivative Works; or,
241
+ within a display generated by the Derivative Works, if and
242
+ wherever such third-party notices normally appear. The contents
243
+ of the NOTICE file are for informational purposes only and
244
+ do not modify the License. You may add Your own attribution
245
+ notices within Derivative Works that You distribute, alongside
246
+ or as an addendum to the NOTICE text from the Work, provided
247
+ that such additional attribution notices cannot be construed
248
+ as modifying the License.
249
+
250
+ You may add Your own copyright statement to Your modifications and
251
+ may provide additional or different license terms and conditions
252
+ for use, reproduction, or distribution of Your modifications, or
253
+ for any such Derivative Works as a whole, provided Your use,
254
+ reproduction, and distribution of the Work otherwise complies with
255
+ the conditions stated in this License.
256
+
257
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
258
+ any Contribution intentionally submitted for inclusion in the Work
259
+ by You to the Licensor shall be under the terms and conditions of
260
+ this License, without any additional terms or conditions.
261
+ Notwithstanding the above, nothing herein shall supersede or modify
262
+ the terms of any separate license agreement you may have executed
263
+ with Licensor regarding such Contributions.
264
+
265
+ 6. Trademarks. This License does not grant permission to use the trade
266
+ names, trademarks, service marks, or product names of the Licensor,
267
+ except as required for reasonable and customary use in describing the
268
+ origin of the Work and reproducing the content of the NOTICE file.
269
+
270
+ 7. Disclaimer of Warranty. Unless required by applicable law or
271
+ agreed to in writing, Licensor provides the Work (and each
272
+ Contributor provides its Contributions) on an "AS IS" BASIS,
273
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
274
+ implied, including, without limitation, any warranties or conditions
275
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
276
+ PARTICULAR PURPOSE. You are solely responsible for determining the
277
+ appropriateness of using or redistributing the Work and assume any
278
+ risks associated with Your exercise of permissions under this License.
279
+
280
+ 8. Limitation of Liability. In no event and under no legal theory,
281
+ whether in tort (including negligence), contract, or otherwise,
282
+ unless required by applicable law (such as deliberate and grossly
283
+ negligent acts) or agreed to in writing, shall any Contributor be
284
+ liable to You for damages, including any direct, indirect, special,
285
+ incidental, or consequential damages of any character arising as a
286
+ result of this License or out of the use or inability to use the
287
+ Work (including but not limited to damages for loss of goodwill,
288
+ work stoppage, computer failure or malfunction, or any and all
289
+ other commercial damages or losses), even if such Contributor
290
+ has been advised of the possibility of such damages.
291
+
292
+ 9. Accepting Warranty or Additional Liability. While redistributing
293
+ the Work or Derivative Works thereof, You may choose to offer,
294
+ and charge a fee for, acceptance of support, warranty, indemnity,
295
+ or other liability obligations and/or rights consistent with this
296
+ License. However, in accepting such obligations, You may act only
297
+ on Your own behalf and on Your sole responsibility, not on behalf
298
+ of any other Contributor, and only if You agree to indemnify,
299
+ defend, and hold each Contributor harmless for any liability
300
+ incurred by, or claims asserted against, such Contributor by reason
301
+ of your accepting any such warranty or additional liability.
302
+
303
+ END OF TERMS AND CONDITIONS
304
+
305
+ APPENDIX: How to apply the Apache License to your work.
306
+
307
+ To apply the Apache License to your work, attach the following
308
+ boilerplate notice, with the fields enclosed by brackets "[]"
309
+ replaced with your own identifying information. (Don't include
310
+ the brackets!) The text should be enclosed in the appropriate
311
+ comment syntax for the file format. We also recommend that a
312
+ file or class name and description of purpose be included on the
313
+ same "printed page" as the copyright notice for easier
314
+ identification within third-party archives.
315
+
316
+ Copyright [yyyy] [name of copyright owner]
317
+
318
+ Licensed under the Apache License, Version 2.0 (the "License");
319
+ you may not use this file except in compliance with the License.
320
+ You may obtain a copy of the License at
321
+
322
+ http://www.apache.org/licenses/LICENSE-2.0
323
+
324
+ Unless required by applicable law or agreed to in writing, software
325
+ distributed under the License is distributed on an "AS IS" BASIS,
326
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
327
+ See the License for the specific language governing permissions and
328
+ limitations under the License.
@@ -0,0 +1,98 @@
1
+ # Quukk ClawMessenger Modifications
2
+
3
+ ## Fork baseline
4
+
5
+ - Fork repository: https://github.com/quukk/quukk-clawmessenger
6
+ - Upstream repository: https://github.com/multica-ai/multica
7
+ - Upstream baseline commit: `54027ba763fa7da0699b2fe89df4a6b2c13d1c6f`
8
+ - Fork development branch: `codex/quukk-clawmessenger`
9
+ - Upstream remote is read-only for fork development.
10
+
11
+ ## Bridge additions
12
+
13
+ - `packages/quukk-clawmessenger`: publishable Node.js entry package for the local ClawMessenger bridge.
14
+ - `apps/bridge`: private React/Vite workspace that builds local Bridge UI assets into the entry package.
15
+ - `server/internal/daemon/bridge*.go`: injected, bounded discovery for local OpenCode, OpenClaw, Codex, and Hermes runtimes, kept separate from the existing daemon lifecycle.
16
+ - Synchronous agent probe output shares a 64 KiB cap so noisy version and catalog commands safely fail instead of growing daemon memory without bound; Task 14/CI must watch for real catalog output above that limit.
17
+ - The fork now includes the runtime workers, registration transport, session routing, local
18
+ service/CLI, and Bridge UI described below.
19
+
20
+ ## Local runtime selection UI
21
+
22
+ - `apps/bridge/src` adds the Multica-attributed Quukk ClawMessenger setup and local operations interface for OpenCode, OpenClaw, Codex, and Hermes.
23
+ - Setup defaults to detected ready runtimes, requires an explicit submit, discloses headless permissions, and requires a real authorized work root plus a default working directory before describing a registered runtime as task-ready.
24
+ - Registration progress is isolated per runtime so a successful RongCloud identity stays successful when another runtime fails.
25
+ - The UI uses one-use local session tickets, removes the ticket from browser history before exchange, and adds the returned CSRF token only to same-origin mutations.
26
+ - Generated `packages/quukk-clawmessenger/dist/ui` assets are intentionally excluded from Git. `pnpm --dir apps/bridge build` creates them deterministically before package assembly.
27
+
28
+ ## Authenticated Bridge transport
29
+
30
+ - `server/internal/daemon/bridge_http.go` and `server/internal/daemon/bridge_http_test.go` add the loopback-only, per-install bearer-authenticated Bridge JSON/SSE API, bounded request decoding, runtime refresh, task streaming/cancellation, health reporting, and graceful shutdown. The Node supervisor owns and protects the installation secret; the Go child receives it only through bounded startup stdin and retains it only in memory.
31
+ - `server/cmd/multica/cmd_bridge.go` and `server/cmd/multica/cmd_bridge_test.go` add the hidden `multica daemon bridge` entrypoint with bounded strict stdin, fixed ephemeral IPv4 loopback binding, process identity generation, and a single post-refresh readiness record.
32
+ - The serving lifecycle synchronously fences parent cancellation against discovery/readiness, seals new handler entries at shutdown, drains cooperative handlers and every started Bridge task within one deadline, and force-closes timed-out HTTP connections without waiting indefinitely for a non-cooperative Go handler. The command reuses the existing cross-platform shutdown context and rejects changed inherited flags before startup I/O.
33
+
34
+ ## External service prerequisite
35
+
36
+ - `clawmessenger-server` commit `68496a3edf934c90b9af03a5c1c81422ab2d9ef7` adds Hermes to the server's supported AI node identity types. Deploy that server commit before enabling Hermes registration from the Quukk bridge; existing node types remain unchanged.
37
+ - `clawmessenger-server` commit `8a29e4e24af00145c072ccca568a0e9049842d29` retires the anonymous user-token route, allowlists public node responses, redacts RongCloud token logs/errors, and adds no-store to sensitive responses. Enrollment enforcement and owner/node authorization remain mandatory follow-up server gates before npm publication.
38
+
39
+ ## Local identity and enrollment
40
+
41
+ - `packages/quukk-clawmessenger/src/config`, `src/registration`, and `src/bindings` add strict versioned config/state/credential storage, protected per-install identity, fail-closed work-directory authorization, bounded atomic JSON recovery, four-provider registration, per-runtime enrollment proof, credentials-first token swaps, and provider-isolated lifecycle coordination.
42
+ - The enrollment proof is derived locally from the decoded 32-byte Bridge secret, full normalized server base URL, and runtime ID. Only the domain-separated HMAC result crosses HTTPS; raw Bridge and RongCloud credentials remain outside request bodies, URLs, errors, logs, state, and ordinary config.
43
+
44
+ ## Legacy migration and package audit
45
+
46
+ - `packages/quukk-clawmessenger/src/migration` discovers only the fixed OpenCode
47
+ ClawMessenger configuration locations under an explicitly supplied home directory. It reads
48
+ only the bounded main settings file, projects validated non-secret server/work-directory/path
49
+ settings, reports registration caches without opening them, and requires explicit confirmation
50
+ before writing through `LocalStore`.
51
+ - Migration never moves or deletes a legacy file and never imports tokens, AppKey/AppSecret,
52
+ passwords, node/MAC identity, bindings, sessions, or logs. Validation and atomic-write failures
53
+ leave the legacy bytes and destination config unchanged.
54
+ - `packages/quukk-clawmessenger/scripts/prepare-package.mjs` copies the exact four root legal
55
+ files into the entry package and the exact root `LICENSE`, `NOTICE`, `MODIFICATIONS.md`, and
56
+ `GO_THIRD_PARTY_NOTICES.md` into either zero or the complete six binary-only platform staging
57
+ packages while rejecting partial matrices, traversal, and symbolic-link/junction components.
58
+ Platform manifests record the exact linked Go modules and the tarball audit requires every
59
+ module to appear in the bundled notice generated from checksum-verified module sources.
60
+ - `packages/quukk-clawmessenger/scripts/audit-tarball.mjs` consumes bounded `npm pack --json`
61
+ reports and strictly checks legal files, README, npm/platform manifests, bin, compiled worker,
62
+ Bridge UI assets, source-map absence, path containment, symlinks, credential-like literals, and
63
+ developer-specific paths. Failure output is a fixed code and does not echo matched content.
64
+ - The entry TypeScript build excludes tests and disables source/declaration maps so rejected
65
+ development artifacts cannot enter the npm tarball.
66
+
67
+ ## Modified upstream files
68
+
69
+ - `.gitignore`: excludes a repository-local Quukk ClawMessenger runtime-data directory.
70
+ - `docs/superpowers/specs/2026-08-26-quukk-clawmessenger-fork-design.md`: records the initial workspace scaffold and its intentionally limited scope.
71
+ - `pnpm-workspace.yaml`: adds the catalog-pinned Vite version required by the Bridge UI workspace.
72
+ - `pnpm-lock.yaml`: records the fork workspaces and the focused Bridge UI dependencies used by the local package build.
73
+ - `README.md`: adds the Quukk ClawMessenger derivative entry point while retaining Multica as the
74
+ primary product and attribution.
75
+ - `MODIFICATIONS.md`, `THIRD_PARTY_NOTICES.md`, and `GO_THIRD_PARTY_NOTICES.md`: record
76
+ migration/package hardening, pin the matching RongCloud 5.38.0 package pair whose registry
77
+ metadata points to the identical integrity-verified embedded license, and carry the exact
78
+ notices for Go modules linked into runtime binaries.
79
+ - `server/pkg/agent/launch.go`: bounds synchronous probe output while preserving process ownership and timeout errors.
80
+ - `server/pkg/agent/agent_test.go`: covers oversized version output and timeout precedence without executing an installed agent CLI.
81
+ - `server/internal/daemon/bridge_http_test.go`: uses OS-native absolute runtime fixture paths so
82
+ the Bridge HTTP lifecycle contracts run consistently on Windows and Linux.
83
+ - `.github/workflows/quukk-clawmessenger-runtime.yml`: supplies the GitHub-hosted runner's
84
+ temporary directory to entry-package tests without weakening the package's fail-closed runtime
85
+ requirement for `TEMP`/`TMP`, and prefixes runtime package directories with `./` so npm treats
86
+ them as local folders rather than GitHub repository shorthands.
87
+ - `packages/quukk-clawmessenger/src/process/service-identity.test.ts`,
88
+ `src/rongcloud/worker-supervisor.test.ts`, `src/router/message-router.test.ts`,
89
+ `src/router/router.integration.test.ts`, and `src/service.test.ts`: use OS-native temporary and
90
+ absolute fixture paths so the same security and lifecycle contracts run on Windows and Linux.
91
+ - `packages/quukk-clawmessenger/scripts/audit-tarball.mjs`: excludes bounded HTTP(S) URL text
92
+ before applying local developer-path checks while continuing to reject checkout paths outside
93
+ URLs; its package-artifact tests cover Linux CI paths explicitly.
94
+ - `packages/quukk-clawmessenger/src/go/binary.test.ts`, `src/logging/redact.test.ts`, and
95
+ `src/process/service-identity.test.ts`: remove host-path assumptions and explicitly mock the
96
+ platform-dependent filesystem behavior exercised by each contract.
97
+
98
+ New fork-specific files are listed in this task's commit and do not replace upstream source files.
package/NOTICE ADDED
@@ -0,0 +1,14 @@
1
+ Multica
2
+ Copyright 2025-2026 Multica, Inc.
3
+
4
+ This product includes software developed at Multica, Inc.
5
+ (https://github.com/multica-ai/multica).
6
+
7
+ Multica is distributed under the Multica License, which incorporates the
8
+ complete text of the Apache License, Version 2.0 together with additional
9
+ conditions covering hosted or embedded commercial use, branding and
10
+ copyright information displayed by a Multica user interface, and
11
+ attribution for non-interface use. See the LICENSE file for the full text.
12
+
13
+ This NOTICE file is provided for attribution purposes only and does not
14
+ modify the Multica License.
package/README.md ADDED
@@ -0,0 +1,223 @@
1
+ # Quukk ClawMessenger
2
+
3
+ Quukk ClawMessenger connects local OpenCode, OpenClaw, Codex, and Hermes agents to
4
+ ClawMessenger. Install one npm package, review the agents detected on this computer, and choose
5
+ which agents to connect. Each selected runtime receives its own RongCloud identity, worker,
6
+ session store, and failure boundary.
7
+
8
+ **Built on [Multica](https://github.com/multica-ai/multica).** This is a community derivative;
9
+ the local interface retains the Multica product name, logo, copyright, and attribution alongside
10
+ the Quukk ClawMessenger label. Fork source:
11
+ [quukk/quukk-clawmessenger](https://github.com/quukk/quukk-clawmessenger).
12
+
13
+ ## Install and set up
14
+
15
+ Requirements:
16
+
17
+ - Node.js 22.13 or newer.
18
+ - A supported Windows, macOS, or Linux desktop build listed below.
19
+ - At least one supported agent CLI installed and authenticated.
20
+ - A compatible ClawMessenger server deployment; Hermes has additional server prerequisites.
21
+
22
+ Install globally, then open the local setup page:
23
+
24
+ ```bash
25
+ npm install -g quukk-clawmessenger@beta
26
+ quukk-clawmessenger setup
27
+ ```
28
+
29
+ For a terminal-only host, CI, or an environment where a browser must not open:
30
+
31
+ ```bash
32
+ quukk-clawmessenger setup --no-open
33
+ ```
34
+
35
+ The npm `postinstall` hook only launches setup for a global install in an interactive desktop
36
+ session. It does not register an agent, wait for input, or download an executable. CI, local
37
+ installs, non-desktop sessions, and `QUUKK_CLAWMESSENGER_NO_OPEN=1` receive only a setup hint.
38
+ Run `setup` explicitly whenever lifecycle scripts are disabled.
39
+
40
+ Before upgrading a beta installation, stop the authenticated old daemon so the package manager
41
+ does not reuse or try to replace a running Bridge binary:
42
+
43
+ ```bash
44
+ quukk-clawmessenger stop
45
+ npm install -g quukk-clawmessenger@beta
46
+ quukk-clawmessenger setup
47
+ ```
48
+
49
+ The local service listens only on `127.0.0.1`. Registration starts only after the user reviews
50
+ the detected runtimes and explicitly submits a selection.
51
+
52
+ ## Cloud registration and data disclosure
53
+
54
+ Before a selected runtime can be registered, setup shows the configured service URL and requires
55
+ a separate confirmation. Registration sends that service a hostname-derived node label, a
56
+ network-interface MAC address when available (or a stable install-derived fallback), the selected
57
+ provider and capability flags, and a runtime-scoped enrollment proof. Each enabled runtime then
58
+ uses its own RongCloud connection; its ClawMessenger chat and task messages traverse that cloud IM
59
+ service.
60
+
61
+ This beta has no self-service remote identity deletion. Removing a local binding or uninstalling
62
+ the npm package does not delete its server or RongCloud identity. Before enabling a hosted service,
63
+ obtain its operator contact, privacy terms, retention policy, and deletion process. Publication of
64
+ the default hosted service remains blocked until those items and the data-processing review are
65
+ complete.
66
+
67
+ ## Agent login prerequisites
68
+
69
+ Quukk ClawMessenger does not install, upgrade, or sign in to any agent CLI. Complete the
70
+ provider's own installation and authentication flow first, then run `rescan`:
71
+
72
+ | Provider | Local prerequisite |
73
+ | --- | --- |
74
+ | OpenCode | `opencode` is runnable and its model/provider credentials are configured. |
75
+ | OpenClaw | `openclaw` is runnable and its gateway/model authentication is configured. |
76
+ | Codex | `codex` is runnable and signed in with the intended OpenAI account or API environment. |
77
+ | Hermes | `hermes` is runnable and its selected model provider is authenticated. |
78
+
79
+ Detection reports whether a CLI is runnable; it does not prove that every model credential is
80
+ valid. A clear authentication failure from the first task changes that runtime to `needs_auth`.
81
+ Sign in with the provider's CLI, then rescan.
82
+
83
+ ## CLI reference
84
+
85
+ | Command | Purpose |
86
+ | --- | --- |
87
+ | `quukk-clawmessenger setup` | Start the local service and open the setup page. |
88
+ | `quukk-clawmessenger start` | Start the local service; add `--foreground` to keep it attached. |
89
+ | `quukk-clawmessenger stop` | Gracefully stop verified workers and the local service. |
90
+ | `quukk-clawmessenger status` | Show whether the verified local service is ready. |
91
+ | `quukk-clawmessenger logs` | Read bounded local logs; supports `--lines 1..1000` and `--follow`. |
92
+ | `quukk-clawmessenger doctor` | Show redacted local diagnostics; use `--json` for automation. |
93
+ | `quukk-clawmessenger rescan` | Re-run local detection for all four providers. |
94
+
95
+ `setup` and `start` accept `--no-open`, `--server-url`, `--workdir`, repeated
96
+ `--authorized-work-root`, four provider-specific `--*-path` overrides, and `--log-level`.
97
+ `status`, `doctor`, and `rescan` accept `--json`. Run `quukk-clawmessenger --help` for the exact
98
+ validated option syntax.
99
+
100
+ ## Headless permission policy
101
+
102
+ Quukk's local authorization boundary is deny-by-default:
103
+
104
+ - `authorizedWorkRoots` starts empty. A remote task is rejected until a real local directory is
105
+ explicitly authorized and the default work directory is inside an authorized root.
106
+ - v1 advertises `approval_events: false`. A CardKit permission action is parsed for compatibility
107
+ but cannot grant permission or resume a paused provider approval.
108
+ - Quukk does not turn a chat message into arbitrary shell execution. Only the documented message
109
+ and device-control allowlists are accepted.
110
+
111
+ The four provider adapters run headlessly and may apply their own non-interactive policy. Review
112
+ the selected CLI's configuration before connecting it. If a provider requires an interactive
113
+ approval that its headless adapter cannot safely resolve, the operation is denied or fails; the
114
+ ClawMessenger client is not treated as an approval authority.
115
+
116
+ ## Configuration and local data
117
+
118
+ Quukk keeps its data separate from Multica and the legacy single-provider bridges:
119
+
120
+ | Data | Unix/macOS | Windows |
121
+ | --- | --- | --- |
122
+ | Root | `$HOME/.quukk-clawmessenger/` | `%USERPROFILE%\.quukk-clawmessenger\` |
123
+ | Settings | `config.json` | `config.json` |
124
+ | Protected credentials | `credentials.json` | `credentials.json` |
125
+ | Runtime bindings | `state.json` | `state.json` |
126
+ | Sessions | `sessions.json` | `sessions.json` |
127
+ | Redacted log | `logs/bridge.log` | `logs\bridge.log` |
128
+ | Process identity | `run/bridge.pid`, `run/daemon.pid` | `run\bridge.pid`, `run\daemon.pid` |
129
+ | RongCloud SDK state | `rongcloud/<runtimeId>/` | `rongcloud\<runtimeId>\` |
130
+
131
+ Configuration precedence is CLI options, then `QUUKK_CLAWMESSENGER_*` environment variables,
132
+ then `config.json`, then built-in defaults. The default server URL is
133
+ `https://newsradar.dreamdt.cn/im`. `config.json` never stores RongCloud tokens or the per-install
134
+ Bridge secret.
135
+
136
+ ## Legacy migration in this beta
137
+
138
+ The beta CLI and setup page do not automatically inspect or import an older OpenCode
139
+ ClawMessenger installation. Enter the non-secret server, work-directory, authorized-root, and
140
+ provider-path settings again in Quukk setup, then select and register each runtime to obtain its
141
+ new isolated identity.
142
+
143
+ Legacy files are never moved, changed, or deleted. Do not copy legacy node IDs, MAC-derived
144
+ identities, AppKey/AppSecret values, passwords, tokens, bindings, sessions, or logs into Quukk
145
+ configuration. Automated, explicitly confirmed migration remains disabled until it has a complete
146
+ authenticated setup UI path.
147
+
148
+ ## Diagnostics and recovery
149
+
150
+ - Start with `quukk-clawmessenger status --json` and `quukk-clawmessenger doctor --json`.
151
+ - Use `quukk-clawmessenger logs --lines 100`; logs and diagnostics redact credentials, tickets,
152
+ prompts, environment variables, and provider paths.
153
+ - `probe_failed` is a bounded detection failure, not proof that a CLI is absent. Fix the CLI or
154
+ path override and run `rescan`.
155
+ - Registration and worker failures are isolated per runtime. Re-register only the affected row.
156
+ - A config/state recovery warning is fail-closed. Preserve the files before changing anything,
157
+ then follow the diagnostic code rather than copying credentials into ordinary config.
158
+
159
+ ## Uninstall
160
+
161
+ Stop the verified service before removing the package:
162
+
163
+ ```bash
164
+ quukk-clawmessenger stop
165
+ npm uninstall -g quukk-clawmessenger
166
+ ```
167
+
168
+ Uninstall does not silently delete `~/.quukk-clawmessenger` (or the Windows equivalent). That
169
+ directory contains local identity and session data. Remove it manually only when permanent local
170
+ identity/session loss is intended. Remote RongCloud identities are not implicitly deleted by
171
+ uninstalling the local package.
172
+
173
+ ## Supported platforms
174
+
175
+ | Operating system | x64 | arm64 | Notes |
176
+ | --- | --- | --- | --- |
177
+ | Windows | Supported | Supported | Native platform package; user ACL protects local credentials. |
178
+ | macOS | Supported | Supported | Native platform package. |
179
+ | Linux (glibc) | Supported | Supported | Desktop auto-open requires `DISPLAY` or `WAYLAND_DISPLAY`. |
180
+
181
+ Unsupported OS/architecture pairs fail with a repair message. The package never falls back to an
182
+ unverified postinstall download.
183
+
184
+ ## Server prerequisite for Hermes and production use
185
+
186
+ Deploy the matching ClawMessenger server changes before enabling this client. The server must:
187
+
188
+ - accept `hermes` as its own node type;
189
+ - enforce strict, single-node enrollment proof ownership and shared-edge rate limits;
190
+ - retire anonymous token routes and redact public responses, errors, and logs;
191
+ - enforce node/owner authorization on OM, SaaS, configuration, and download routes; and
192
+ - have an approved rotation or revocation disposition for any credential exposed by an older
193
+ deployment.
194
+
195
+ Compatibility enrollment mode is only a migration window and must be off before npm publication.
196
+ The local package cannot make an incompatible or undeployed server safe.
197
+
198
+ ## Packaging checks for maintainers
199
+
200
+ From a source checkout, copy the exact four root legal files into the entry package and the exact
201
+ root `LICENSE`, `NOTICE`, `MODIFICATIONS.md`, and `GO_THIRD_PARTY_NOTICES.md` into each
202
+ binary-only platform staging package. Build the Node package and Bridge UI, generate
203
+ `npm pack --dry-run --json` output, then pass that report and package directory to
204
+ `scripts/audit-tarball.mjs`. Each platform package also requires its generated `SOURCE.md` and a
205
+ manifest containing the exact linked Go module list. The audit rejects missing legal/module/UI/
206
+ worker/manifest files, unexpected files, source maps, symlinks, traversal, credential-like
207
+ literals, and developer-specific absolute paths. It reports only fixed error codes.
208
+
209
+ Publishing remains a separate protected action. Do not publish until the server, six-platform
210
+ matrix, clean-install smoke tests, npm ownership/2FA, and legal review gates all pass.
211
+
212
+ ## License and attribution
213
+
214
+ This derivative is distributed under the complete [Multica License](LICENSE), including its
215
+ additional conditions. The package also carries the unchanged Multica [NOTICE](NOTICE), the fork
216
+ [modification record](MODIFICATIONS.md), and [third-party notices](THIRD_PARTY_NOTICES.md).
217
+ Platform runtime packages additionally carry the checksum-traced Go dependency notices in
218
+ `GO_THIRD_PARTY_NOTICES.md`.
219
+
220
+ The Multica License restricts hosted service use for third parties and commercial embedding or
221
+ distribution unless the producer grants the required commercial license. A branding waiver is a
222
+ separate grant. This project does not claim either grant. Review the complete license and obtain
223
+ independent legal advice for the intended use.