@clawscarf/cli 0.1.0-alpha.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 (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/THIRD_PARTY_NOTICES.md +102 -0
  4. package/deploy/execution/browser/LICENSE.playwright +202 -0
  5. package/deploy/execution/browser/seccomp.json +640 -0
  6. package/deploy/execution/browser-node/configuration.js +85 -0
  7. package/deploy/execution/browser-node/operator.js +167 -0
  8. package/deploy/execution/network/node-ingress.cfg +35 -0
  9. package/deploy/models/catalog.json +275 -0
  10. package/deploy/openshell/policy.yaml +24 -0
  11. package/generated/http/LICENSE.md +21 -0
  12. package/generated/http/client/client.gen.d.ts +2 -0
  13. package/generated/http/client/client.gen.js +216 -0
  14. package/generated/http/client/index.d.ts +10 -0
  15. package/generated/http/client/index.js +6 -0
  16. package/generated/http/client/types.gen.d.ts +120 -0
  17. package/generated/http/client/types.gen.js +2 -0
  18. package/generated/http/client/utils.gen.d.ts +37 -0
  19. package/generated/http/client/utils.gen.js +228 -0
  20. package/generated/http/core/auth.gen.d.ts +25 -0
  21. package/generated/http/core/auth.gen.js +14 -0
  22. package/generated/http/core/bodySerializer.gen.d.ts +25 -0
  23. package/generated/http/core/bodySerializer.gen.js +57 -0
  24. package/generated/http/core/params.gen.d.ts +43 -0
  25. package/generated/http/core/params.gen.js +109 -0
  26. package/generated/http/core/pathSerializer.gen.d.ts +33 -0
  27. package/generated/http/core/pathSerializer.gen.js +106 -0
  28. package/generated/http/core/queryKeySerializer.gen.d.ts +18 -0
  29. package/generated/http/core/queryKeySerializer.gen.js +92 -0
  30. package/generated/http/core/serverSentEvents.gen.d.ts +71 -0
  31. package/generated/http/core/serverSentEvents.gen.js +132 -0
  32. package/generated/http/core/types.gen.d.ts +83 -0
  33. package/generated/http/core/types.gen.js +2 -0
  34. package/generated/http/core/utils.gen.d.ts +19 -0
  35. package/generated/http/core/utils.gen.js +87 -0
  36. package/package.json +37 -0
  37. package/packs/README.md +130 -0
  38. package/packs/research-team/pack.json +20 -0
  39. package/packs/research-team/researcher/CLAW.md +19 -0
  40. package/packs/research-team/researcher/package.json +8 -0
  41. package/packs/research-team/researcher/profiles/openclaw.yml +6 -0
  42. package/packs/research-team/reviewer/CLAW.md +19 -0
  43. package/packs/research-team/reviewer/package.json +8 -0
  44. package/packs/research-team/reviewer/profiles/openclaw.yml +6 -0
  45. package/pnpm-lock.yaml +7158 -0
  46. package/recipes/README.md +37 -0
  47. package/recipes/team-server/recipe.json +28 -0
  48. package/release/README.md +137 -0
  49. package/release/components.json +29 -0
  50. package/release/operator.md +63 -0
  51. package/runtime/configuration.js +135 -0
  52. package/runtime/connections-configuration.js +70 -0
  53. package/runtime/model-contract.js +92 -0
  54. package/runtime/releases/0.1.0-alpha.1.json +37 -0
  55. package/scripts/clawscarf.js +92 -0
  56. package/scripts/cloud/login.js +134 -0
  57. package/scripts/cloud/registration.js +232 -0
  58. package/scripts/cloud/url.js +9 -0
  59. package/scripts/connections.js +193 -0
  60. package/scripts/controller.js +143 -0
  61. package/scripts/deployment/browser-node-compose.js +81 -0
  62. package/scripts/deployment/browser-node-helper.js +9 -0
  63. package/scripts/deployment/browser-node-pairing.js +165 -0
  64. package/scripts/deployment/browser-node.js +154 -0
  65. package/scripts/deployment/browser.js +143 -0
  66. package/scripts/deployment/certificates.js +76 -0
  67. package/scripts/deployment/compose.js +191 -0
  68. package/scripts/deployment/configuration.js +275 -0
  69. package/scripts/deployment/connection-policy.js +80 -0
  70. package/scripts/deployment/connection-settings.js +60 -0
  71. package/scripts/deployment/connections-runtime.js +31 -0
  72. package/scripts/deployment/connections.js +213 -0
  73. package/scripts/deployment/controller-compose.js +59 -0
  74. package/scripts/deployment/database.js +199 -0
  75. package/scripts/deployment/entrypoint.js +7 -0
  76. package/scripts/deployment/images.js +17 -0
  77. package/scripts/deployment/initial-services.js +53 -0
  78. package/scripts/deployment/launch.js +177 -0
  79. package/scripts/deployment/logs.js +15 -0
  80. package/scripts/deployment/model-gateway-compose.js +74 -0
  81. package/scripts/deployment/model-gateway.js +125 -0
  82. package/scripts/deployment/models.js +82 -0
  83. package/scripts/deployment/networks.js +354 -0
  84. package/scripts/deployment/policy.js +56 -0
  85. package/scripts/deployment/preflight.js +124 -0
  86. package/scripts/deployment/prepare.js +205 -0
  87. package/scripts/deployment/process.js +70 -0
  88. package/scripts/deployment/relay.js +58 -0
  89. package/scripts/deployment/runtime-binding.js +100 -0
  90. package/scripts/deployment/runtime.js +232 -0
  91. package/scripts/deployment/state.js +154 -0
  92. package/scripts/deployment/team.js +76 -0
  93. package/scripts/deployment/upgrade-rpc.py +148 -0
  94. package/scripts/deployment/upgrade-state.js +47 -0
  95. package/scripts/deployment/upgrade.js +298 -0
  96. package/scripts/deployment/volumes.js +24 -0
  97. package/scripts/errors.js +9 -0
  98. package/scripts/installation/administrator.js +23 -0
  99. package/scripts/installation/command.js +176 -0
  100. package/scripts/installation/configuration.js +104 -0
  101. package/scripts/installation/configure.js +122 -0
  102. package/scripts/installation/delete.js +111 -0
  103. package/scripts/installation/doctor.js +8 -0
  104. package/scripts/installation/errors.js +8 -0
  105. package/scripts/installation/files.js +51 -0
  106. package/scripts/installation/installer/cloud.js +22 -0
  107. package/scripts/installation/installer/collect.js +245 -0
  108. package/scripts/installation/installer/inputs.js +59 -0
  109. package/scripts/installation/installer/menu.js +49 -0
  110. package/scripts/installation/installer/prompts.js +139 -0
  111. package/scripts/installation/installer/run.js +251 -0
  112. package/scripts/installation/installer/secrets.js +16 -0
  113. package/scripts/installation/installer/sections/access.js +69 -0
  114. package/scripts/installation/installer/sections/certificates.js +18 -0
  115. package/scripts/installation/installer/sections/connections.js +4 -0
  116. package/scripts/installation/installer/sections/external-models.js +35 -0
  117. package/scripts/installation/installer/sections/models.js +119 -0
  118. package/scripts/installation/installer/sections/packs.js +82 -0
  119. package/scripts/installation/installer/sections/resources.js +10 -0
  120. package/scripts/installation/installer/settings.js +192 -0
  121. package/scripts/installation/installer/summary.js +44 -0
  122. package/scripts/installation/lifecycle.js +127 -0
  123. package/scripts/installation/location.js +3 -0
  124. package/scripts/installation/models.js +42 -0
  125. package/scripts/installation/options.js +360 -0
  126. package/scripts/installation/packs.js +150 -0
  127. package/scripts/installation/plan.js +121 -0
  128. package/scripts/installation/prerequisites.js +170 -0
  129. package/scripts/installation/recipes/catalog.js +55 -0
  130. package/scripts/installation/recipes/definition.js +32 -0
  131. package/scripts/installation/reconfigure.js +255 -0
  132. package/scripts/installation/requirements.js +23 -0
  133. package/scripts/installation/resolve.js +217 -0
  134. package/scripts/installation/runtime.js +87 -0
  135. package/scripts/installation/save.js +95 -0
  136. package/scripts/installation/setup.js +91 -0
  137. package/scripts/models/catalog.js +9 -0
  138. package/scripts/models/configuration.js +184 -0
  139. package/scripts/models/credentials.js +132 -0
  140. package/scripts/models/runtime.js +87 -0
  141. package/scripts/output.js +34 -0
  142. package/scripts/packs/connections.js +95 -0
  143. package/scripts/packs/lifecycle.js +125 -0
  144. package/scripts/packs/model.js +66 -0
  145. package/scripts/packs/native.js +69 -0
  146. package/scripts/packs/openshell.js +148 -0
  147. package/scripts/packs/policy.js +189 -0
  148. package/scripts/packs/requirements.in +1 -0
  149. package/scripts/packs/requirements.js +11 -0
  150. package/scripts/packs/requirements.txt +116 -0
  151. package/scripts/packs/source.js +90 -0
  152. package/scripts/packs/transport.py +68 -0
  153. package/scripts/people.js +52 -0
  154. package/scripts/release/create.js +62 -0
  155. package/scripts/release/definition.js +51 -0
  156. package/scripts/session.js +27 -0
  157. package/services/access/generated/client.gen.d.ts +12 -0
  158. package/services/access/generated/client.gen.js +3 -0
  159. package/services/access/generated/fastify.gen.d.ts +49 -0
  160. package/services/access/generated/fastify.gen.js +2 -0
  161. package/services/access/generated/index.d.ts +2 -0
  162. package/services/access/generated/index.js +2 -0
  163. package/services/access/generated/sdk.gen.d.ts +28 -0
  164. package/services/access/generated/sdk.gen.js +107 -0
  165. package/services/access/generated/types.gen.d.ts +349 -0
  166. package/services/access/generated/types.gen.js +2 -0
  167. package/services/access/migrations/001_access.sql +39 -0
  168. package/services/access/migrations/002_administrator_setup.sql +16 -0
  169. package/services/access/migrations/003_local_login_completion.sql +5 -0
  170. package/services/access/migrations/004_invitations.sql +21 -0
  171. package/services/access/repo/postgres.js +341 -0
  172. package/services/access/repo/session-logout.js +28 -0
  173. package/services/access/types/credential.js +2 -0
  174. package/services/access/types/errors.js +7 -0
  175. package/services/access/types/ingress.js +1 -0
  176. package/services/access/types/model.js +1 -0
  177. package/services/access/types/native-errors.js +7 -0
  178. package/services/access/types/native.js +1 -0
  179. package/services/cloud/generated/client.gen.d.ts +12 -0
  180. package/services/cloud/generated/client.gen.js +3 -0
  181. package/services/cloud/generated/index.d.ts +2 -0
  182. package/services/cloud/generated/index.js +2 -0
  183. package/services/cloud/generated/sdk.gen.d.ts +145 -0
  184. package/services/cloud/generated/sdk.gen.js +488 -0
  185. package/services/cloud/generated/types.gen.d.ts +2034 -0
  186. package/services/cloud/generated/types.gen.js +2 -0
  187. package/services/connections/cloud/generated/client.gen.d.ts +12 -0
  188. package/services/connections/cloud/generated/client.gen.js +3 -0
  189. package/services/connections/cloud/generated/fastify.gen.d.ts +68 -0
  190. package/services/connections/cloud/generated/fastify.gen.js +2 -0
  191. package/services/connections/cloud/generated/index.d.ts +2 -0
  192. package/services/connections/cloud/generated/index.js +2 -0
  193. package/services/connections/cloud/generated/sdk.gen.d.ts +95 -0
  194. package/services/connections/cloud/generated/sdk.gen.js +210 -0
  195. package/services/connections/cloud/generated/types.gen.d.ts +1044 -0
  196. package/services/connections/cloud/generated/types.gen.js +2 -0
  197. package/services/connections/migrations/001_connections.sql +220 -0
@@ -0,0 +1,37 @@
1
+ # Recipes
2
+
3
+ Recipes are bundled with the CLI. Each folder contains a [recipe.json](team-server/recipe.json), validated by
4
+ [the recipe schema](../scripts/installation/recipes/definition.ts).
5
+
6
+ ```text
7
+ recipes/team-server/recipe.json
8
+ runtime/releases/0.1.0-dev.json
9
+ packs/research-team/pack.json
10
+ ```
11
+
12
+ Each recipe has an ID and a version. Accepted installations retain that provenance
13
+ alongside their actual settings; a CLI update never reapplies new defaults. Bump the
14
+ recipe version when its defaults, pack selections or runtime pin change.
15
+
16
+ A recipe's `runtime` points to an exact runtime definition, relative to the recipe
17
+ file. Runtime images and tools are fixed; its other fields are defaults that users
18
+ can change in the settings menu or through CLI flags. Recipes cannot disable
19
+ OpenShell protection or authenticated entry, admission and revocation. They contain
20
+ no executable hooks, secrets or user identities.
21
+
22
+ - `models` selects model ID, provider and reasoning from the bundled
23
+ [model catalog](../deploy/models/catalog.json).
24
+ - `defaults` selects resources, browser and Connections enablement.
25
+ - `packs: [{ id, members }]` selects agents from the bundled [packs](../packs/README.md).
26
+ The installer checks members and collects required credentials after settings review.
27
+
28
+ `clawscarf configure` lists the bundled recipes. `--recipe team-server` skips that
29
+ menu; `--recipe /path/to/recipe.json` uses a custom definition. Both use the same
30
+ validation and editable settings. `clawscarf recipes` lists available choices.
31
+ Recipe changes never reconfigure an existing server automatically.
32
+
33
+ **Team server:** GPT-6 Astra through OpenAI, medium reasoning,
34
+ hosted login, Connections enabled, browser off, and no packs selected. It supplies
35
+ a basic team server, not a document ingestion or question-answering workflow. A future document recipe remains separate in [TODO.md](../TODO.md).
36
+
37
+ See [runtime and package distribution](../release/README.md).
@@ -0,0 +1,28 @@
1
+ {
2
+ "id": "team-server",
3
+ "version": "0.1.0",
4
+ "runtime": "../../runtime/releases/0.1.0-alpha.1.json",
5
+ "name": "Team server",
6
+ "description": "A protected OpenClaw server for your team, with hosted login, managed models and optional Connections.",
7
+ "maturity": "supported",
8
+ "defaults": {
9
+ "resources": {
10
+ "runtime": {
11
+ "cpu": "4",
12
+ "memory": "4Gi"
13
+ }
14
+ },
15
+ "browser": {
16
+ "enabled": false
17
+ },
18
+ "connections": {
19
+ "enabled": true
20
+ }
21
+ },
22
+ "models": {
23
+ "model": "gpt-6-astra",
24
+ "provider": "openai",
25
+ "reasoning": "medium"
26
+ },
27
+ "packs": []
28
+ }
@@ -0,0 +1,137 @@
1
+ # Runtime releases, recipes and packs
2
+
3
+ These have separate responsibilities:
4
+
5
+ | Definition | Owns | Location |
6
+ | --------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
7
+ | Runtime release | Exact software images, OpenShell executables, checksums and supported platforms | [runtime/releases](../runtime/releases/0.1.0-dev.json) |
8
+ | Recipe | A fixed runtime reference plus editable model, reasoning, resource, capability and pack defaults | [recipes](../recipes/README.md) |
9
+ | Pack | Native agent, skill and workflow files with declared prerequisites | [packs](../packs/README.md) |
10
+
11
+ Several recipes can use the same runtime. A runtime contains no recipes, model
12
+ catalog or pack selections. Changing a recipe does not require rebuilding its runtime.
13
+ Recipes and packs ship with the CLI; there is no separate registry or dependency resolver.
14
+ The [model catalog](../deploy/models/catalog.json) is also a CLI asset. Recipe IDs select
15
+ catalog entries; model protocols and limits have one definition.
16
+
17
+ ## Current development use
18
+
19
+ ```sh
20
+ clawscarf configure
21
+ # Or use staging for hosted login and Connections:
22
+ clawscarf configure --cloud-url https://cloud-staging.clawscarf.com
23
+ ```
24
+
25
+ No recipe argument opens the bundled recipe menu. `--recipe team-server` selects
26
+ that bundled definition; `--recipe /path/to/recipe.json` reads a custom one. Its
27
+ `runtime` path resolves relative to the recipe file. The runtime cannot be changed
28
+ in the settings menu. `--directory` defaults to `~/clawscarf-team`.
29
+
30
+ The tracked [development runtime](../runtime/releases/0.1.0-dev.json) currently names
31
+ locally built Docker image IDs and checksum-pinned OpenShell tools under ignored
32
+ `runtime/tools/0.0.116/`. It works on the prepared development machine; it is **not a
33
+ published, clean-machine release**. Definitions belong in the tracked directories
34
+ above. Compiled images, binaries and test artifacts are not source definitions.
35
+
36
+ The current platform is macOS arm64 with Docker Desktop. Setup validates the host,
37
+ tools and ports; it pulls registry images by digest and downloads missing runtime tools
38
+ when their definition supplies an HTTPS URL and SHA-256. It cannot recover a missing
39
+ local development image ID. See the
40
+ [installation guide](../deploy/deployment/installation.md) for diagnostics.
41
+
42
+ ## Publishing structure
43
+
44
+ Release candidates contain:
45
+
46
+ - npm `@clawscarf/cli`: compiled CLI, recipes, pack files, model catalog and runtime
47
+ definitions. No Docker images or large OpenShell executables in npm.
48
+ - GitHub Releases: versioned runtime tool archives, checksums and required notices.
49
+ - GHCR: runtime/companion images referenced by immutable registry digest.
50
+
51
+ Installing a newer CLI supplies newer recipes. Each recipe still selects an exact
52
+ runtime; startup never resolves “latest.” Existing installations retain their
53
+ accepted settings and runtime. Explicit configuration changes preserve unrelated
54
+ native edits. The CLI package version and a runtime version need not be the same.
55
+
56
+ New installations copy their runtime definition and tools into their own `runtime/`
57
+ directory and retain selected pack files under `state/pack-sources/`. Removing the
58
+ checkout, an npm cache entry or an older CLI package does not remove those files.
59
+ Downloads are bounded, checked before becoming executable inputs, and reused on
60
+ subsequent configuration. Corrupt retained tools fail verification rather than being
61
+ silently replaced. Docker verifies image digests. No start command resolves latest.
62
+
63
+ ## Build and publish
64
+
65
+ [Build release candidate](../.github/workflows/build-release.yml) is manually dispatched
66
+ with an exact version, such as `0.1.0-alpha.1`. It:
67
+
68
+ 1. Runs checks and tests the compiled operator outside the checkout on macOS arm64.
69
+ 2. Builds the pinned OpenClaw source and ClawScarf images on Linux arm64, checks
70
+ runtime capabilities and the Chromium sandbox, and pushes candidate images to GHCR.
71
+ 3. Downloads checksum-pinned OpenShell tools, records the image digests, and assembles
72
+ the runtime archive, individual executable assets, npm CLI, checksums and notices.
73
+ 4. Installs the resulting npm archive into a temporary prefix and checks its CLI/catalog.
74
+
75
+ The [image builder](../scripts/release/build-images.sh) and
76
+ [candidate assembler](../scripts/release/candidate.ts) contain the build commands;
77
+ Actions supplies runners and registry credentials. The source recipe pins the development
78
+ runtime. Packaging resolves that same runtime to the candidate's immutable definition;
79
+ it does not make recipes select latest. The first release uses the same CLI/runtime
80
+ version. Recipe versions remain independent; bump them when defaults, pack selection
81
+ or the selected runtime changes. Published definitions must not be overwritten.
82
+
83
+ The `release-candidate` Actions artifact is the reviewable output. Download it and test
84
+ a fresh supported installation, administrator login, real inference and stop/start
85
+ before publication. GitHub's macOS runner does not provide our Docker Desktop journey;
86
+ its packaging checks alone do not establish that journey. The browser-selection bug
87
+ remains a separate, explicit limit; the Team server recipe leaves browser disabled.
88
+
89
+ [Publish release candidate](../.github/workflows/publish-release.yml) accepts a successful
90
+ build run from `main`. It checks the source commit and artifact checksums, creates the
91
+ GitHub Release and publishes the already-built npm tarball. It never rebuilds images
92
+ or packages. Prereleases use npm's `next` tag; stable versions use `latest`. Repeating
93
+ a GitHub upload is allowed only when the existing checksums match exactly.
94
+
95
+ Repository setup before first publication:
96
+
97
+ - GHCR image packages must be publicly readable; a private candidate digest is not
98
+ usable by an unauthenticated installer. The build uses GitHub's scoped job token.
99
+ - Configure the GitHub `release` environment and npm trusted publishing for
100
+ `@clawscarf/cli`, repository `clawscarf/clawscarf`, workflow [publish-release.yml](../.github/workflows/publish-release.yml),
101
+ environment `release`. npm ownership/initial package setup is separate from code.
102
+ - Check transitive notices/source obligations before distributing the first images.
103
+ Debian copyright files remain in the images; runtime assets include upstream notices
104
+ and the image build exports its network-tool sources. Those files are not a claim of
105
+ a completed license audit. Pinned Debian packages still depend on mirror retention.
106
+
107
+ No npm/GitHub release has been published by adding these workflows. The first Actions
108
+ run, clean-machine journey, registry access and publication remain in [TODO.md](../TODO.md).
109
+
110
+ ## Assemble runtime artifacts
111
+
112
+ For release development, the existing builder copies already-built tools into a
113
+ movable directory:
114
+
115
+ ```sh
116
+ clawscarf release-create --input /absolute/built-components.json \
117
+ --output /absolute/runtime-bundle
118
+ ```
119
+
120
+ The input follows the [runtime schema](../scripts/release/definition.ts), except
121
+ `tools.openshell.cli` and `gateway` are source executable paths. Relative inputs
122
+ resolve beside that input file. The result is:
123
+
124
+ ```text
125
+ runtime-bundle/
126
+ clawscarf-release.json
127
+ LICENSE
128
+ THIRD_PARTY_NOTICES.md
129
+ tools/openshell
130
+ tools/openshell-gateway
131
+ ```
132
+
133
+ The builder checks executable files, computes their checksums, refuses overwriting
134
+ an existing output directory and removes incomplete output on failure. It does not
135
+ build images, copy recipes/packs or publish artifacts. A custom recipe can point to
136
+ the resulting runtime definition. The [component pins](components.json) record
137
+ upstream sources; [operator packaging](operator.md) describes the CLI archive.
@@ -0,0 +1,29 @@
1
+ {
2
+ "openclaw": {
3
+ "version": "2026.9.4",
4
+ "sourceRevision": "7bc487d39dc9e059bb9b19ea08152883022f83fe",
5
+ "image": "clawscarf-openclaw:7bc487d39dc9e059bb9b19ea08152883022f83fe"
6
+ },
7
+ "openshell": {
8
+ "version": "0.0.116",
9
+ "sourceRevision": "d1155aa70042d3e2ee49dbfa15346b108b7c1d92",
10
+ "supervisorImage": "ghcr.io/nvidia/openshell/supervisor:0.0.116@sha256:c8c42aef16c200063e32cbf72e553e4ead027085427b555efafd95063ecead42",
11
+ "cli": {
12
+ "darwin-arm64": {
13
+ "url": "https://github.com/NVIDIA/OpenShell/releases/download/v0.0.116/openshell-aarch64-apple-darwin.tar.gz",
14
+ "sha256": "e582f2374053bebac8e6aaeb4a369931b7d4bb97bd55055e2c02e85502627e22"
15
+ }
16
+ },
17
+ "gateway": {
18
+ "darwin-arm64": {
19
+ "url": "https://github.com/NVIDIA/OpenShell/releases/download/v0.0.116/openshell-gateway-aarch64-apple-darwin.tar.gz",
20
+ "sha256": "f192d3d737c125264e13ef73458541df2ca6a9eb2fa599736a7f2587d5d2ce8d"
21
+ }
22
+ },
23
+ "gatewayImage": "ghcr.io/nvidia/openshell/gateway:0.0.116@sha256:05cf77bbb022a739aed6f22daa0e7e164415f4ab273b5f84319e46d91eb8f645"
24
+ },
25
+ "companionNode": {
26
+ "version": "24.19.0",
27
+ "image": "node@sha256:4196d66a565c6f195728d9952f161f4adfe2ad753052a08b7ec7f1c5a6bda42b"
28
+ }
29
+ }
@@ -0,0 +1,63 @@
1
+ # ClawScarf operator
2
+
3
+ The operator archive contains the compiled configuration/lifecycle CLI and its controller, model and pack
4
+ operators. It runs outside the contributor checkout. It is not the complete
5
+ distribution: runtime/companion images and the pinned OpenShell executables are
6
+ separate inputs. The archive includes recipes, packs, the model catalog and runtime definitions.
7
+ The interactive menu lists those recipes; each fixes its runtime. For a published runtime it downloads missing OpenShell tools by checksum and pulls
8
+ registry images by digest. Local development image IDs cannot be downloaded. The npm
9
+ package is named `@clawscarf/cli` and exposes the `clawscarf` command. Development archives
10
+ remain private; the release candidate builder makes the package publishable. [Release contents](README.md) defines the publication model.
11
+
12
+ ## Run the archive
13
+
14
+ Verify the archive against its accompanying `SHA256SUMS`, then extract it into a new
15
+ directory. Use Node 24.16 or later in the Node 24 line, or Node 26.1 or later, and
16
+ pnpm 10.33.0. In the extracted `package` directory:
17
+
18
+ ```sh
19
+ pnpm install --prod --frozen-lockfile --ignore-scripts
20
+ node scripts/clawscarf.js --help
21
+ node scripts/clawscarf.js configure --directory /absolute/new-team
22
+ node scripts/clawscarf.js configure --help
23
+ node scripts/clawscarf.js people --help
24
+ node scripts/clawscarf.js connections --help
25
+ ```
26
+
27
+ Dependencies are installed from the included frozen lockfile. Its root importer
28
+ contains only the production dependencies referenced by the staged operator;
29
+ publisher and browser dependencies are omitted. Locked transitive versions are retained.
30
+ No TypeScript compiler, contributor source or build step is needed to run the commands.
31
+ The current local assembly supports macOS arm64 with Docker Desktop only.
32
+
33
+ The installer reviews recipe settings before credentials, prepares the installation,
34
+ and offers **Start now**. It starts Docker services and protected OpenShell containers, then exits; closing
35
+ the terminal leaves them running. Administrator setup supplies a private sign-in link and waits for successful
36
+ browser setup, with replacement links offered on expiry. The same public
37
+ operations use `configure` for new or existing installations, with `--non-interactive`
38
+ for automation. `start`, `stop`, `status` and `logs` operate the selected `--directory`.
39
+ Validation and preview/apply are internal. See the source installation guide for
40
+ supported retained changes and administrator setup.
41
+
42
+ Recipes select runtime definitions relative to their own files. New installations
43
+ retain the runtime and selected packs outside the package. The development descriptor
44
+ still uses local image IDs and tools prepared separately; that development archive alone
45
+ cannot install on a clean machine. Published candidates instead contain registry digests
46
+ and checksummed tool download URLs. Custom recipes can point to a separately prepared
47
+ runtime bundle. Team server supplies a basic team server, not a document workflow.
48
+
49
+ Keep installation data outside this extracted package. Stop retains state; replacing
50
+ an operator archive is not a runtime upgrade or backup. Docker services keep running after
51
+ terminal exit; Docker must remain available. No host service is installed.
52
+ The pack operator additionally needs the pinned Python environment from
53
+ `scripts/packs/requirements.txt`. Models require an external LiteLLM gateway or the unified configuration’s pinned local
54
+ LiteLLM service. This archive contains no model/provider credentials. Unified preparation
55
+ can issue initial scoped model and Connections credentials for fresh installations;
56
+ normal start never rotates or reactivates them. Use `configure` for capability changes;
57
+ `connections` manages application accounts and grants.
58
+
59
+ The source checkout owns full local setup, model and pack qualification instructions.
60
+ [Third-party notices](../THIRD_PARTY_NOTICES.md) are retained verbatim; their relative source references refer
61
+ to the source checkout, not additional runtime payload in this archive. Installed
62
+ dependencies retain their own notices. Full binary-release license qualification
63
+ remains separate from this operator packaging check.
@@ -0,0 +1,135 @@
1
+ import { z } from "zod";
2
+ const origin = z.url().refine((value) => {
3
+ const url = new URL(value);
4
+ return (url.origin === value &&
5
+ !url.username &&
6
+ !url.password &&
7
+ (url.protocol === "https:" ||
8
+ (url.protocol === "http:" &&
9
+ ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname))));
10
+ }, "Use HTTPS, or HTTP on loopback, without a path.");
11
+ export const configurationInput = z
12
+ .strictObject({
13
+ publicOrigin: origin,
14
+ widgetOrigin: origin,
15
+ standaloneNavigation: z.boolean().default(true),
16
+ administratorIdentity: z
17
+ .string()
18
+ .min(1)
19
+ .max(512)
20
+ .refine((value) => value.trim() === value &&
21
+ [...value].every((character) => character.charCodeAt(0) >= 32 && character.charCodeAt(0) !== 127), "Use the exact trusted-ingress identity without whitespace or control characters."),
22
+ })
23
+ .refine((value) => value.publicOrigin !== value.widgetOrigin, {
24
+ message: "Widgets require a separate origin.",
25
+ path: ["widgetOrigin"],
26
+ });
27
+ export function initialConfiguration(input) {
28
+ const settings = configurationInput.parse(input);
29
+ const identity = settings.administratorIdentity;
30
+ return {
31
+ gateway: {
32
+ publicOrigin: settings.publicOrigin,
33
+ mode: "local",
34
+ bind: "loopback",
35
+ port: 18789,
36
+ terminal: { enabled: false },
37
+ trustedProxies: ["127.0.0.1"],
38
+ controlUi: {
39
+ allowedOrigins: [settings.publicOrigin],
40
+ communityInvite: false,
41
+ experimental: { customPlugins: settings.standaloneNavigation },
42
+ },
43
+ auth: {
44
+ mode: "trusted-proxy",
45
+ trustedProxy: {
46
+ userHeader: "x-openclaw-user",
47
+ requiredHeaders: ["x-forwarded-proto", "x-forwarded-host"],
48
+ allowUsers: [identity],
49
+ allowLoopback: true,
50
+ deviceAutoApprove: { enabled: true, scopes: ["operator.read"] },
51
+ },
52
+ identityScopes: { [identity]: ["operator.admin"] },
53
+ },
54
+ roles: {
55
+ default: "admin",
56
+ definitions: {
57
+ admin: {
58
+ agents: "*",
59
+ scopes: ["operator.admin"],
60
+ sessions: { others: "write" },
61
+ },
62
+ member: {
63
+ agents: "*",
64
+ scopes: ["operator.read", "operator.write", "operator.talk"],
65
+ sessions: { others: "none" },
66
+ sandbox: "inherit",
67
+ },
68
+ },
69
+ },
70
+ },
71
+ agents: {
72
+ defaults: {
73
+ workspace: "/home/node/.openclaw/workspace",
74
+ sandbox: { mode: "off" },
75
+ },
76
+ },
77
+ plugins: {
78
+ load: {
79
+ paths: [
80
+ "/app/clawscarf/connections",
81
+ "/app/clawscarf/native-plugins/node_modules/@openclaw/lobster",
82
+ ...(settings.standaloneNavigation ? ["/app/clawscarf/access"] : []),
83
+ ],
84
+ },
85
+ entries: {
86
+ "clawscarf-connections": { enabled: false },
87
+ "clawscarf-access": { enabled: settings.standaloneNavigation },
88
+ lobster: { enabled: true },
89
+ codex: {
90
+ enabled: true,
91
+ config: {
92
+ sessionCatalog: { enabled: false },
93
+ appServer: {
94
+ networkProxy: {
95
+ enabled: true,
96
+ baseProfile: "workspace",
97
+ mode: "full",
98
+ },
99
+ },
100
+ codexDynamicToolsExclude: [
101
+ "gateway_exec",
102
+ "gateway_process",
103
+ "gateway",
104
+ "nodes",
105
+ "computer",
106
+ "mobile_ui",
107
+ "terminal",
108
+ ],
109
+ },
110
+ },
111
+ anthropic: { config: { sessionCatalog: { enabled: false } } },
112
+ },
113
+ },
114
+ mcp: {
115
+ apps: {
116
+ enabled: true,
117
+ sandboxPort: 18790,
118
+ sandboxOrigin: settings.widgetOrigin,
119
+ },
120
+ },
121
+ tools: {
122
+ alsoAllow: ["lobster"],
123
+ exec: { host: "gateway", mode: "auto" },
124
+ sessions: { visibility: "self" },
125
+ elevated: { enabled: false },
126
+ },
127
+ browser: {
128
+ headless: true,
129
+ noSandbox: false,
130
+ executablePath: "/usr/bin/chromium",
131
+ },
132
+ models: { catalogRefresh: { enabled: false } },
133
+ discovery: { mdns: { mode: "off" } },
134
+ };
135
+ }
@@ -0,0 +1,70 @@
1
+ import { X509Certificate } from "node:crypto";
2
+ import { z } from "zod";
3
+ const maximumBytes = 1024 * 1024;
4
+ const brokerUrl = z
5
+ .url()
6
+ .max(2048)
7
+ .refine((value) => {
8
+ const url = new URL(value);
9
+ return (url.protocol === "https:" &&
10
+ !url.username &&
11
+ !url.password &&
12
+ !url.search &&
13
+ !url.hash);
14
+ });
15
+ const credentialSchema = z.strictObject({
16
+ token: z
17
+ .string()
18
+ .min(1)
19
+ .max(512)
20
+ .regex(/^[\x21-\x7e]+$/u),
21
+ ca: z
22
+ .string()
23
+ .min(1)
24
+ .max(maximumBytes)
25
+ .refine((value) => {
26
+ try {
27
+ new X509Certificate(value);
28
+ return true;
29
+ }
30
+ catch {
31
+ return false;
32
+ }
33
+ })
34
+ .optional(),
35
+ });
36
+ export const connectionsConfigurationInputSchema = z
37
+ .strictObject({
38
+ kind: z.enum(["configure", "observe", "disable"]),
39
+ ownerId: z.uuid(),
40
+ serverId: z.uuid(),
41
+ brokerUrl,
42
+ enable: z.boolean().optional(),
43
+ credential: credentialSchema.optional(),
44
+ })
45
+ .refine((value) => value.kind !== "configure" || value.credential !== undefined, "Configuration requires a scoped credential.");
46
+ export const nativeConnectionsConfigurationResultSchema = z.discriminatedUnion("state", [
47
+ z.strictObject({ state: z.literal("not_installed") }),
48
+ z.strictObject({
49
+ state: z.literal("unconfigured"),
50
+ enabled: z.boolean(),
51
+ expectedPackage: z.boolean(),
52
+ }),
53
+ z.strictObject({
54
+ state: z.literal("configured"),
55
+ enabled: z.boolean(),
56
+ brokerUrl,
57
+ configHash: z.string().min(1).max(256),
58
+ }),
59
+ ]);
60
+ export const connectionsConfigurationResultSchema = z.discriminatedUnion("state", [
61
+ nativeConnectionsConfigurationResultSchema.options[0].extend({
62
+ credentialMatches: z.boolean().optional(),
63
+ }),
64
+ nativeConnectionsConfigurationResultSchema.options[1].extend({
65
+ credentialMatches: z.boolean().optional(),
66
+ }),
67
+ nativeConnectionsConfigurationResultSchema.options[2].extend({
68
+ credentialMatches: z.boolean().optional(),
69
+ }),
70
+ ]);
@@ -0,0 +1,92 @@
1
+ import { z } from "zod";
2
+ const assignmentSchema = z.discriminatedUnion("path", [
3
+ z.strictObject({
4
+ path: z.literal("secrets.providers.clawscarf-models"),
5
+ value: z.strictObject({
6
+ source: z.literal("env"),
7
+ allowlist: z.tuple([z.literal("CLAWSCARF_MODEL_TOKEN")]),
8
+ }),
9
+ }),
10
+ z.strictObject({
11
+ path: z.literal("models.providers.clawscarf"),
12
+ value: z.strictObject({
13
+ baseUrl: z.url(),
14
+ api: z.literal("openai-completions"),
15
+ agentRuntime: z.strictObject({ id: z.literal("openclaw") }),
16
+ apiKey: z.strictObject({
17
+ source: z.literal("env"),
18
+ provider: z.literal("clawscarf-models"),
19
+ id: z.literal("CLAWSCARF_MODEL_TOKEN"),
20
+ }),
21
+ models: z
22
+ .array(z.strictObject({
23
+ id: z.string().min(1),
24
+ name: z.string().min(1),
25
+ api: z.enum(["openai-completions", "openai-responses"]).optional(),
26
+ input: z.array(z.enum(["text", "image"])).min(1),
27
+ reasoning: z.boolean(),
28
+ contextWindow: z.number().int().positive(),
29
+ maxTokens: z.number().int().positive(),
30
+ compat: z.strictObject({
31
+ supportsTools: z.boolean(),
32
+ supportsUsageInStreaming: z.literal(true),
33
+ supportsStrictMode: z.literal(true),
34
+ }),
35
+ }))
36
+ .min(1)
37
+ .max(512),
38
+ }),
39
+ }),
40
+ z.strictObject({
41
+ path: z.literal("agents.defaults.model.primary"),
42
+ value: z.string().startsWith("clawscarf/").min(11),
43
+ }),
44
+ z.strictObject({
45
+ path: z.literal("agents.defaults.thinkingDefault"),
46
+ value: z.enum(["low", "medium", "high"]),
47
+ }),
48
+ ]);
49
+ export const modelInputSchema = z
50
+ .strictObject({
51
+ assignments: z.array(assignmentSchema).min(2).max(4),
52
+ token: z.string().trim().min(1).max(65536),
53
+ ca: z.string().min(1).max(262144).nullable(),
54
+ apply: z.boolean(),
55
+ })
56
+ .superRefine(({ assignments }, context) => {
57
+ const paths = new Set(assignments.map((assignment) => assignment.path));
58
+ if (paths.size !== assignments.length ||
59
+ !paths.has("models.providers.clawscarf") ||
60
+ !paths.has("secrets.providers.clawscarf-models"))
61
+ context.addIssue({
62
+ code: "custom",
63
+ message: "Require unique paths and both provider assignments.",
64
+ });
65
+ });
66
+ export const modelFailureCodeSchema = z.enum([
67
+ "invalid_input",
68
+ "invalid_state",
69
+ "unavailable",
70
+ "validation_rejected",
71
+ "outcome_unknown",
72
+ ]);
73
+ export class ModelConfigurationError extends Error {
74
+ code;
75
+ constructor(code) {
76
+ super(code);
77
+ this.code = code;
78
+ this.name = "ModelConfigurationError";
79
+ }
80
+ }
81
+ export const modelStateSchema = z.enum([
82
+ "configured",
83
+ "configured_restart_required",
84
+ "validated",
85
+ ]);
86
+ export const modelResultSchema = z.discriminatedUnion("ok", [
87
+ z.strictObject({
88
+ ok: z.literal(true),
89
+ state: modelStateSchema,
90
+ }),
91
+ z.strictObject({ ok: z.literal(false), error: modelFailureCodeSchema }),
92
+ ]);
@@ -0,0 +1,37 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "0.1.0-alpha.1",
4
+ "sourceRevision": "a53e95251321e61d8ffd6d06a6984f651c0b0db4",
5
+ "platforms": [
6
+ "darwin-arm64"
7
+ ],
8
+ "images": {
9
+ "postgres": "postgres@sha256:742f40ea20b9ff2ff31db5458d127452988a2164df9e17441e191f3b72252193",
10
+ "gateway": "ghcr.io/clawscarf/clawscarf/runtime@sha256:eaa25c8e487970176b95de657df8bf4faff605f9f265ca760197800d9a1e5fcf",
11
+ "companion": "ghcr.io/clawscarf/clawscarf/companion@sha256:97cfeb78ab56ba625b30aafe2249633d9b69f7f3c75de7116453385010e6281f",
12
+ "openshellClient": "ghcr.io/clawscarf/clawscarf/openshell-client@sha256:669f37f654926fc7714783cc8b1b76bae9666895c2a4da959580037d281ebf56",
13
+ "relay": "ghcr.io/clawscarf/clawscarf/browser-relay@sha256:5ee13e9496e3b76e076e91c59a861a10ad7a31a13b145384fba314d7f0b686b5",
14
+ "models": "ghcr.io/berriai/litellm:v1.100.1@sha256:a3715fa7ad8387941ab697259bd2881d68931657247a41984f90fae6d11c62bf",
15
+ "browser": {
16
+ "chromium": "ghcr.io/clawscarf/clawscarf/browser@sha256:28ca9e4007d3b7c1bb9cb8f4bbaf275d1bc36ee2744079326b151b1f9eec78fd",
17
+ "node": "ghcr.io/clawscarf/clawscarf/browser-node@sha256:2837d8b75df69fb39c7f7ca8fa68249d9de6e20d4e028213792de5f8f9ef1bd7",
18
+ "dns": "ghcr.io/clawscarf/clawscarf/browser-dns@sha256:9f14cb85df522014c2bfc068e2b5788568f26b6e8d948cebe1250aff7630847b",
19
+ "egress": "ghcr.io/clawscarf/clawscarf/browser-egress@sha256:bd819dffa4e1f60fbeed3b459a26b3b274300a4e5836bb90cbd080f6681d594c"
20
+ }
21
+ },
22
+ "tools": {
23
+ "openshell": {
24
+ "version": "0.0.116",
25
+ "cli": {
26
+ "file": "tools/openshell",
27
+ "sha256": "0baeeffe0e4c184b08fde910ac9e8815fb0b8cfb808e49c0e634d7db65fb03bb",
28
+ "url": "https://github.com/clawscarf/clawscarf/releases/download/v0.1.0-alpha.1/openshell-darwin-arm64"
29
+ },
30
+ "gateway": {
31
+ "file": "tools/openshell-gateway",
32
+ "sha256": "298706259ef18350f334c222e981e91583558511d50bce22727c689d261203e6",
33
+ "url": "https://github.com/clawscarf/clawscarf/releases/download/v0.1.0-alpha.1/openshell-gateway-darwin-arm64"
34
+ }
35
+ }
36
+ }
37
+ }