@cogineai/clawpacker 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -17
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/export.d.ts +1 -0
- package/dist/commands/export.js +31 -2
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts +1 -0
- package/dist/commands/import.js +37 -8
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/inspect.d.ts +1 -0
- package/dist/commands/inspect.js +40 -0
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -0
- package/dist/commands/validate.js +3 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/core/constants.d.ts +4 -0
- package/dist/core/constants.js +32 -1
- package/dist/core/constants.js.map +1 -1
- package/dist/core/import-exec.js +33 -0
- package/dist/core/import-exec.js.map +1 -1
- package/dist/core/import-plan.d.ts +1 -0
- package/dist/core/import-plan.js +174 -3
- package/dist/core/import-plan.js.map +1 -1
- package/dist/core/manifest.d.ts +5 -1
- package/dist/core/manifest.js +3 -0
- package/dist/core/manifest.js.map +1 -1
- package/dist/core/models-sanitize.d.ts +4 -0
- package/dist/core/models-sanitize.js +120 -0
- package/dist/core/models-sanitize.js.map +1 -0
- package/dist/core/openclaw-config.d.ts +7 -0
- package/dist/core/openclaw-config.js +41 -10
- package/dist/core/openclaw-config.js.map +1 -1
- package/dist/core/package-read.js +3 -0
- package/dist/core/package-read.js.map +1 -1
- package/dist/core/package-write.d.ts +3 -1
- package/dist/core/package-write.js +56 -0
- package/dist/core/package-write.js.map +1 -1
- package/dist/core/path-rewrite.d.ts +18 -0
- package/dist/core/path-rewrite.js +79 -0
- package/dist/core/path-rewrite.js.map +1 -0
- package/dist/core/runtime-mode.d.ts +2 -0
- package/dist/core/runtime-mode.js +19 -0
- package/dist/core/runtime-mode.js.map +1 -0
- package/dist/core/runtime-scan.d.ts +6 -0
- package/dist/core/runtime-scan.js +180 -0
- package/dist/core/runtime-scan.js.map +1 -0
- package/dist/core/settings-analysis.d.ts +5 -0
- package/dist/core/settings-analysis.js +85 -0
- package/dist/core/settings-analysis.js.map +1 -0
- package/dist/core/types.d.ts +68 -0
- package/dist/core/validate.d.ts +1 -0
- package/dist/core/validate.js +113 -2
- package/dist/core/validate.js.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -78,6 +78,77 @@ Skills are **manifest-only** right now.
|
|
|
78
78
|
|
|
79
79
|
That means Clawpacker records detected skill references (using backtick-quoted references like `` `skill-name` ``), but it does not bundle or install skill implementations for you.
|
|
80
80
|
|
|
81
|
+
### Runtime layer (optional)
|
|
82
|
+
|
|
83
|
+
In addition to workspace files, OpenClaw agents often have runtime configuration stored in a separate **agentDir** — things like `settings.json`, prompt templates, themes, and model definitions. Clawpacker can optionally package a portable slice of this runtime layer alongside the workspace.
|
|
84
|
+
|
|
85
|
+
This is an **optional portability convenience**, not a full backup of the agent runtime directory.
|
|
86
|
+
|
|
87
|
+
#### The three modes
|
|
88
|
+
|
|
89
|
+
| Mode | What gets packaged | When to use |
|
|
90
|
+
|------|-------------------|-------------|
|
|
91
|
+
| `none` | Nothing from agentDir | You only need workspace files |
|
|
92
|
+
| `default` | `AGENTS.md`, `settings.json`, `prompts/**`, `themes/**`, `models.json` | Most agent transfers (recommended) |
|
|
93
|
+
| `full` | Everything in `default`, plus `skills/**` and `extensions/**` | When the target instance needs locally installed skills or extensions |
|
|
94
|
+
|
|
95
|
+
Use `--runtime-mode <mode>` on `inspect` and `export`. When omitted, `inspect` defaults to `default`; `export` skips the runtime layer unless the flag is explicitly provided.
|
|
96
|
+
|
|
97
|
+
#### What is always excluded
|
|
98
|
+
|
|
99
|
+
Regardless of mode, Clawpacker never packages these from agentDir:
|
|
100
|
+
|
|
101
|
+
- `auth.json`, `auth-profiles.json` — authentication state
|
|
102
|
+
- `sessions/**` — session data
|
|
103
|
+
- `.git/**`, `node_modules/**`, `npm/**`, `bin/**` — toolchain artifacts
|
|
104
|
+
- `tools/**`, `caches/**`, `logs/**` — ephemeral runtime state
|
|
105
|
+
- Files with extensions `.log`, `.lock`, `.tmp`, `.bak`, `.swp`, `.pid`
|
|
106
|
+
|
|
107
|
+
These exclusions exist because auth and session state is inherently non-portable and should be established fresh on the target instance.
|
|
108
|
+
|
|
109
|
+
#### models.json sanitization
|
|
110
|
+
|
|
111
|
+
When `models.json` is included, Clawpacker **sanitizes** it before packaging:
|
|
112
|
+
|
|
113
|
+
- API keys, secrets, and `$secretRef` objects are stripped
|
|
114
|
+
- Secret-bearing HTTP headers are removed
|
|
115
|
+
- Non-sensitive fields (model id, provider, max tokens, temperature) are preserved
|
|
116
|
+
|
|
117
|
+
If sanitization removes everything useful, the file is excluded entirely and a warning is emitted.
|
|
118
|
+
|
|
119
|
+
#### settings.json path analysis
|
|
120
|
+
|
|
121
|
+
Clawpacker analyzes path-like values in `settings.json` and classifies them:
|
|
122
|
+
|
|
123
|
+
| Classification | Meaning | On import |
|
|
124
|
+
|---------------|---------|-----------|
|
|
125
|
+
| `package-internal-workspace` | Points inside the source workspace | Rewritten to target workspace path |
|
|
126
|
+
| `package-internal-agentDir` | Points inside the source agentDir | Rewritten to target agentDir path |
|
|
127
|
+
| `relative` | Relative path (e.g. `./data`) | Preserved as-is |
|
|
128
|
+
| `external-absolute` | Absolute path outside workspace/agentDir | Preserved (may need manual update) |
|
|
129
|
+
| `host-bound` | Platform-specific path (e.g. `C:\...`, `/proc/...`) | Preserved (warning emitted) |
|
|
130
|
+
|
|
131
|
+
#### Runtime import behavior
|
|
132
|
+
|
|
133
|
+
When importing a package that includes a runtime layer:
|
|
134
|
+
|
|
135
|
+
- **`--target-agent-dir`** specifies where runtime files should be written. If omitted, Clawpacker attempts to resolve it from the target OpenClaw config.
|
|
136
|
+
- If no target agentDir can be resolved, import **blocks** and tells you what is needed.
|
|
137
|
+
- If runtime files already exist at the target agentDir, import **blocks** unless `--force` is passed. Only allowlisted runtime files are overwritten — auth and session files are never written.
|
|
138
|
+
- If a target OpenClaw config is provided, the agent entry is upserted with the agentDir path.
|
|
139
|
+
- `settings.json` paths referencing the source workspace or agentDir are automatically rewritten to the target paths.
|
|
140
|
+
|
|
141
|
+
Use `--dry-run` to preview the full import plan (including runtime file list, path rewrites, and collision detection) before committing.
|
|
142
|
+
|
|
143
|
+
#### agentDir resolution
|
|
144
|
+
|
|
145
|
+
The agentDir is resolved from the OpenClaw config by matching the agent entry that owns the source workspace. This requires:
|
|
146
|
+
|
|
147
|
+
1. A readable OpenClaw config (via `--config`, `OPENCLAW_CONFIG_PATH`, or `~/.openclaw/openclaw.json`)
|
|
148
|
+
2. An agent entry with an `agentDir` field
|
|
149
|
+
|
|
150
|
+
If the config is missing or the agent entry has no `agentDir`, the runtime layer is skipped on inspect, and export errors out with a clear message.
|
|
151
|
+
|
|
81
152
|
## Install
|
|
82
153
|
|
|
83
154
|
### Published package
|
|
@@ -136,12 +207,22 @@ node dist/cli.js inspect \
|
|
|
136
207
|
--workspace ./tests/fixtures/source-workspace
|
|
137
208
|
```
|
|
138
209
|
|
|
210
|
+
With runtime layer inspection:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
node dist/cli.js inspect \
|
|
214
|
+
--workspace ./tests/fixtures/source-workspace \
|
|
215
|
+
--config ./tests/fixtures/openclaw-config/source-config.jsonc \
|
|
216
|
+
--runtime-mode default
|
|
217
|
+
```
|
|
218
|
+
|
|
139
219
|
Machine-readable JSON report:
|
|
140
220
|
|
|
141
221
|
```bash
|
|
142
222
|
node dist/cli.js inspect \
|
|
143
223
|
--workspace ./tests/fixtures/source-workspace \
|
|
144
224
|
--config ./tests/fixtures/openclaw-config/source-config.jsonc \
|
|
225
|
+
--runtime-mode default \
|
|
145
226
|
--json
|
|
146
227
|
```
|
|
147
228
|
|
|
@@ -152,18 +233,30 @@ What `inspect` tells you:
|
|
|
152
233
|
- whether a portable agent definition could be derived
|
|
153
234
|
- which fields are portable vs import-time inputs
|
|
154
235
|
- which skills were detected
|
|
236
|
+
- runtime layer contents (when `--runtime-mode` is `default` or `full`)
|
|
155
237
|
- warnings you should expect on export/import
|
|
156
238
|
|
|
157
239
|
### 2) Export a package
|
|
158
240
|
|
|
159
|
-
Directory package:
|
|
241
|
+
Directory package (workspace only):
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
node dist/cli.js export \
|
|
245
|
+
--workspace ./tests/fixtures/source-workspace \
|
|
246
|
+
--out ./tests/tmp/example-supercoder.ocpkg \
|
|
247
|
+
--name supercoder-template \
|
|
248
|
+
--runtime-mode none
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Directory package with runtime layer:
|
|
160
252
|
|
|
161
253
|
```bash
|
|
162
254
|
node dist/cli.js export \
|
|
163
255
|
--workspace ./tests/fixtures/source-workspace \
|
|
164
256
|
--config ./tests/fixtures/openclaw-config/source-config.jsonc \
|
|
165
257
|
--out ./tests/tmp/example-supercoder.ocpkg \
|
|
166
|
-
--name supercoder-template
|
|
258
|
+
--name supercoder-template \
|
|
259
|
+
--runtime-mode default
|
|
167
260
|
```
|
|
168
261
|
|
|
169
262
|
Single-file archive:
|
|
@@ -174,6 +267,7 @@ node dist/cli.js export \
|
|
|
174
267
|
--config ./tests/fixtures/openclaw-config/source-config.jsonc \
|
|
175
268
|
--out ./tests/tmp/example-supercoder.ocpkg \
|
|
176
269
|
--name supercoder-template \
|
|
270
|
+
--runtime-mode default \
|
|
177
271
|
--archive
|
|
178
272
|
```
|
|
179
273
|
|
|
@@ -186,7 +280,9 @@ Output defaults to human-readable text. Add `--json` for machine-readable output
|
|
|
186
280
|
"status": "ok",
|
|
187
281
|
"packageRoot": ".../example-supercoder.ocpkg",
|
|
188
282
|
"manifestPath": ".../example-supercoder.ocpkg/manifest.json",
|
|
189
|
-
"fileCount": 12
|
|
283
|
+
"fileCount": 12,
|
|
284
|
+
"runtimeMode": "default",
|
|
285
|
+
"runtimeFiles": ["AGENTS.md", "settings.json", "prompts/system.md"]
|
|
190
286
|
}
|
|
191
287
|
```
|
|
192
288
|
|
|
@@ -202,6 +298,17 @@ node dist/cli.js import \
|
|
|
202
298
|
--config ./tests/tmp/target-openclaw-config.json
|
|
203
299
|
```
|
|
204
300
|
|
|
301
|
+
Import with runtime layer targeting a specific agentDir:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
node dist/cli.js import \
|
|
305
|
+
./tests/tmp/example-supercoder.ocpkg \
|
|
306
|
+
--target-workspace ./tests/tmp/workspace-supercoder-imported \
|
|
307
|
+
--agent-id supercoder-imported \
|
|
308
|
+
--target-agent-dir ~/.openclaw/agents/supercoder-imported \
|
|
309
|
+
--config ./tests/tmp/target-openclaw-config.json
|
|
310
|
+
```
|
|
311
|
+
|
|
205
312
|
Preview the import plan without writing anything:
|
|
206
313
|
|
|
207
314
|
```bash
|
|
@@ -216,9 +323,11 @@ Notes:
|
|
|
216
323
|
|
|
217
324
|
- `--target-workspace` is required
|
|
218
325
|
- `--agent-id` is strongly recommended and becomes required in practice for collision-safe import planning
|
|
219
|
-
- `--
|
|
326
|
+
- `--target-agent-dir` is required when the package includes a runtime layer and no agentDir is discoverable from the target config
|
|
327
|
+
- `--dry-run` prints the import plan (including runtime details, path rewrites, and collision info) and exits without writing files
|
|
220
328
|
- if the target workspace or target agent already exists, import blocks unless you pass `--force`
|
|
221
|
-
- if
|
|
329
|
+
- if runtime files already exist at the target agentDir, import blocks unless `--force` is passed; auth and session files are never written even with `--force`
|
|
330
|
+
- if no config is found, import can still restore workspace files, but config registration and runtime import become limited
|
|
222
331
|
|
|
223
332
|
### 4) Validate the imported result
|
|
224
333
|
|
|
@@ -229,12 +338,24 @@ node dist/cli.js validate \
|
|
|
229
338
|
--config ./tests/tmp/target-openclaw-config.json
|
|
230
339
|
```
|
|
231
340
|
|
|
341
|
+
When a runtime layer was imported, validate also checks runtime file integrity:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
node dist/cli.js validate \
|
|
345
|
+
--target-workspace ./tests/tmp/workspace-supercoder-imported \
|
|
346
|
+
--agent-id supercoder-imported \
|
|
347
|
+
--target-agent-dir ~/.openclaw/agents/supercoder-imported \
|
|
348
|
+
--config ./tests/tmp/target-openclaw-config.json
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The `--target-agent-dir` flag can be omitted — validate auto-infers it from import metadata when available.
|
|
352
|
+
|
|
232
353
|
Output defaults to human-readable text. Add `--json` for a structured report with:
|
|
233
354
|
|
|
234
|
-
- `passed`
|
|
235
|
-
- `warnings`
|
|
236
|
-
- `failed`
|
|
237
|
-
- `nextSteps`
|
|
355
|
+
- `passed` — checks that succeeded (including runtime file presence and agentDir consistency)
|
|
356
|
+
- `warnings` — non-blocking observations (e.g. auth files found at agentDir)
|
|
357
|
+
- `failed` — checks that failed (e.g. missing runtime files, agentDir mismatch)
|
|
358
|
+
- `nextSteps` — recommended actions
|
|
238
359
|
|
|
239
360
|
## OpenClaw config awareness
|
|
240
361
|
|
|
@@ -283,13 +404,19 @@ Clawpacker is designed to be conservative.
|
|
|
283
404
|
- daily memory logs (`memory/*.md`) are excluded by default
|
|
284
405
|
- package contents are declared in a manifest instead of hidden in opaque state
|
|
285
406
|
- checksums are generated for integrity verification
|
|
407
|
+
- runtime layer is opt-in via `--runtime-mode`
|
|
408
|
+
- `models.json` is sanitized before packaging — API keys, secrets, and `$secretRef` objects are removed
|
|
409
|
+
- auth and session files are never included in the runtime layer regardless of mode
|
|
286
410
|
|
|
287
411
|
### Import safety
|
|
288
412
|
|
|
289
413
|
- import is planned before it executes
|
|
290
414
|
- existing workspace collisions block by default
|
|
291
415
|
- existing config agent collisions block by default
|
|
292
|
-
-
|
|
416
|
+
- existing runtime file collisions block by default
|
|
417
|
+
- `--force` is required to overwrite existing targets (workspace and runtime files)
|
|
418
|
+
- `--force` never writes auth or session files — these are always excluded
|
|
419
|
+
- `settings.json` paths referencing the source workspace or agentDir are automatically rewritten to the target paths
|
|
293
420
|
- import writes local metadata so validation can confirm what happened later
|
|
294
421
|
|
|
295
422
|
### Post-import safety expectations
|
|
@@ -326,19 +453,36 @@ supercoder-template.ocpkg/
|
|
|
326
453
|
meta/
|
|
327
454
|
checksums.json
|
|
328
455
|
export-report.json
|
|
456
|
+
runtime/ # present when --runtime-mode is default or full
|
|
457
|
+
manifest.json
|
|
458
|
+
checksums.json
|
|
459
|
+
path-rewrites.json
|
|
460
|
+
settings-analysis.json # present when settings.json was included
|
|
461
|
+
files/
|
|
462
|
+
AGENTS.md
|
|
463
|
+
settings.json
|
|
464
|
+
models.json # sanitized — no API keys or secrets
|
|
465
|
+
prompts/
|
|
466
|
+
system.md
|
|
467
|
+
themes/
|
|
468
|
+
dark.json
|
|
469
|
+
skills/ # present only in full mode
|
|
470
|
+
my-skill/
|
|
471
|
+
SKILL.md
|
|
329
472
|
```
|
|
330
473
|
|
|
331
474
|
The `workspace/` directory mirrors the source workspace structure. All non-excluded files are included, so the contents vary depending on what lives in the source workspace.
|
|
332
475
|
|
|
476
|
+
The `runtime/` subtree is only present when `--runtime-mode default` or `--runtime-mode full` is used on export. Its `manifest.json` records the mode, source agentDir, and which files were included or excluded. The `files/` subdirectory contains the actual runtime files.
|
|
477
|
+
|
|
333
478
|
Packages can also be distributed as single-file `.ocpkg.tar.gz` archives.
|
|
334
479
|
|
|
335
480
|
## What is intentionally out of scope
|
|
336
481
|
|
|
337
|
-
- full OpenClaw instance backup
|
|
338
|
-
- secret migration
|
|
339
|
-
- auth/session migration
|
|
482
|
+
- full OpenClaw instance backup (the runtime layer is a portable slice, not a full agentDir copy)
|
|
483
|
+
- secret migration (API keys and auth tokens are stripped on export)
|
|
484
|
+
- auth/session migration (auth files are always excluded)
|
|
340
485
|
- channel binding export/import
|
|
341
|
-
- packaging globally installed skill implementations
|
|
342
486
|
- zero-touch import across mismatched environments
|
|
343
487
|
|
|
344
488
|
## Roadmap / known limitations
|
|
@@ -346,15 +490,15 @@ Packages can also be distributed as single-file `.ocpkg.tar.gz` archives.
|
|
|
346
490
|
Near-term likely improvements:
|
|
347
491
|
|
|
348
492
|
- richer import guidance when models or skills are missing
|
|
349
|
-
- optional packaging for workspace-local skill folders
|
|
350
493
|
- better package compatibility/version negotiation
|
|
351
494
|
|
|
352
495
|
Current limitations to be aware of:
|
|
353
496
|
|
|
354
497
|
- package format should still be treated as early-stage (currently v2)
|
|
355
|
-
- skills are detected
|
|
498
|
+
- skills are detected and optionally bundled via `--runtime-mode full`, but not auto-installed on import
|
|
356
499
|
- import assumes conservative file-level replacement semantics via `--force`
|
|
357
500
|
- OpenClaw config support is minimal by design
|
|
501
|
+
- runtime layer path rewriting only handles `settings.json` — other config files with embedded paths require manual update
|
|
358
502
|
|
|
359
503
|
## Development
|
|
360
504
|
|
|
@@ -389,7 +533,7 @@ A practical smoke path is:
|
|
|
389
533
|
```bash
|
|
390
534
|
npm run build
|
|
391
535
|
node dist/cli.js inspect --workspace ./tests/fixtures/source-workspace --json
|
|
392
|
-
node dist/cli.js export --workspace ./tests/fixtures/source-workspace --out ./tests/tmp/readme-demo.ocpkg
|
|
536
|
+
node dist/cli.js export --workspace ./tests/fixtures/source-workspace --out ./tests/tmp/readme-demo.ocpkg --runtime-mode none
|
|
393
537
|
node dist/cli.js import ./tests/tmp/readme-demo.ocpkg --target-workspace ./tests/tmp/readme-demo-target --agent-id readme-demo
|
|
394
538
|
node dist/cli.js validate --target-workspace ./tests/tmp/readme-demo-target --agent-id readme-demo
|
|
395
539
|
npm test
|
package/dist/cli.js
CHANGED
|
@@ -10,8 +10,8 @@ const renderable_cli_error_1 = require("./renderable-cli-error");
|
|
|
10
10
|
const program = new commander_1.Command();
|
|
11
11
|
program
|
|
12
12
|
.name('clawpacker')
|
|
13
|
-
.description('Export, import, and validate portable OpenClaw agent/workspace templates.')
|
|
14
|
-
.version('0.
|
|
13
|
+
.description('Export, import, and validate portable OpenClaw agent/workspace templates.\n\nSupports an optional runtime layer (--runtime-mode) that packages agent-level\nconfig from the OpenClaw agentDir alongside workspace files.')
|
|
14
|
+
.version('0.3.0');
|
|
15
15
|
(0, inspect_1.registerInspectCommand)(program.command('inspect'));
|
|
16
16
|
(0, export_1.registerExportCommand)(program.command('export'));
|
|
17
17
|
(0, import_1.registerImportCommand)(program.command('import'));
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,8CAA0D;AAC1D,8CAA0D;AAC1D,gDAA4D;AAC5D,kDAA8D;AAC9D,iEAA8D;AAE9D,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,8CAA0D;AAC1D,8CAA0D;AAC1D,gDAA4D;AAC5D,kDAA8D;AAC9D,iEAA8D;AAE9D,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,0NAA0N,CAAC;KACvO,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,IAAA,gCAAsB,EAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AACnD,IAAA,8BAAqB,EAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjD,IAAA,8BAAqB,EAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjD,IAAA,kCAAuB,EAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AAErD,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACxD,IAAI,IAAA,2CAAoB,EAAC,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAChC,CAAC;SAAM,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
package/dist/commands/export.js
CHANGED
|
@@ -9,12 +9,15 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
9
9
|
const agent_extract_1 = require("../core/agent-extract");
|
|
10
10
|
const openclaw_config_1 = require("../core/openclaw-config");
|
|
11
11
|
const package_write_1 = require("../core/package-write");
|
|
12
|
+
const runtime_mode_1 = require("../core/runtime-mode");
|
|
13
|
+
const runtime_scan_1 = require("../core/runtime-scan");
|
|
12
14
|
const skills_detect_1 = require("../core/skills-detect");
|
|
13
15
|
const workspace_scan_1 = require("../core/workspace-scan");
|
|
14
16
|
async function runExport(options) {
|
|
15
17
|
if (!options.workspace || !options.out) {
|
|
16
18
|
throw new Error('export requires --workspace <path> and --out <path>');
|
|
17
19
|
}
|
|
20
|
+
const runtimeMode = (0, runtime_mode_1.normalizeRuntimeMode)(options.runtimeMode);
|
|
18
21
|
const scan = await (0, workspace_scan_1.scanWorkspace)(node_path_1.default.resolve(options.workspace));
|
|
19
22
|
const skills = await (0, skills_detect_1.detectSkills)(scan);
|
|
20
23
|
const agentDefinition = await (0, agent_extract_1.extractAgentDefinition)(scan.workspacePath, {
|
|
@@ -26,6 +29,23 @@ async function runExport(options) {
|
|
|
26
29
|
cwd: scan.workspacePath,
|
|
27
30
|
});
|
|
28
31
|
const packageName = options.name ?? node_path_1.default.basename(options.out).replace(/\.ocpkg(\.tar\.gz)?$/, '');
|
|
32
|
+
let runtimeScan;
|
|
33
|
+
if (runtimeMode && runtimeMode !== 'none') {
|
|
34
|
+
const agentDir = await (0, openclaw_config_1.resolveAgentDir)({
|
|
35
|
+
configPath: options.config,
|
|
36
|
+
workspacePath: scan.workspacePath,
|
|
37
|
+
agentId: options.agentId,
|
|
38
|
+
});
|
|
39
|
+
if (!agentDir) {
|
|
40
|
+
throw new Error('Cannot export runtime layer: agentDir could not be resolved from OpenClaw config. ' +
|
|
41
|
+
'Ensure the agent entry includes an agentDir field, or use --runtime-mode none.');
|
|
42
|
+
}
|
|
43
|
+
runtimeScan = await (0, runtime_scan_1.scanRuntime)({
|
|
44
|
+
mode: runtimeMode,
|
|
45
|
+
agentDir,
|
|
46
|
+
workspacePath: scan.workspacePath,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
29
49
|
const writeParams = {
|
|
30
50
|
outputPath: node_path_1.default.resolve(options.out),
|
|
31
51
|
packageName,
|
|
@@ -33,6 +53,7 @@ async function runExport(options) {
|
|
|
33
53
|
skills,
|
|
34
54
|
agentDefinition,
|
|
35
55
|
openclawVersion,
|
|
56
|
+
runtimeScan,
|
|
36
57
|
};
|
|
37
58
|
const result = options.archive
|
|
38
59
|
? await (0, package_write_1.writePackageArchive)(writeParams)
|
|
@@ -42,17 +63,24 @@ async function runExport(options) {
|
|
|
42
63
|
packageRoot: result.packageRoot,
|
|
43
64
|
manifestPath: result.manifestPath,
|
|
44
65
|
fileCount: result.fileCount,
|
|
66
|
+
runtimeMode: runtimeScan?.mode,
|
|
67
|
+
runtimeFiles: runtimeScan?.includedFiles.map(f => f.relativePath),
|
|
45
68
|
};
|
|
46
69
|
if (options.json) {
|
|
47
70
|
console.log(JSON.stringify(report, null, 2));
|
|
48
71
|
return;
|
|
49
72
|
}
|
|
50
|
-
|
|
73
|
+
const lines = [
|
|
51
74
|
'Export complete',
|
|
52
75
|
` Package: ${report.packageRoot}`,
|
|
53
76
|
` Manifest: ${report.manifestPath}`,
|
|
54
77
|
` Files: ${report.fileCount}`,
|
|
55
|
-
]
|
|
78
|
+
];
|
|
79
|
+
if (runtimeScan && runtimeScan.mode !== 'none') {
|
|
80
|
+
lines.push(` Runtime mode: ${runtimeScan.mode}`);
|
|
81
|
+
lines.push(` Runtime files: ${runtimeScan.includedFiles.length}`);
|
|
82
|
+
}
|
|
83
|
+
console.log(lines.join('\n'));
|
|
56
84
|
}
|
|
57
85
|
function registerExportCommand(command) {
|
|
58
86
|
command
|
|
@@ -62,6 +90,7 @@ function registerExportCommand(command) {
|
|
|
62
90
|
.option('--name <package-name>', 'Package name override')
|
|
63
91
|
.option('--config <path>', 'OpenClaw config path')
|
|
64
92
|
.option('--agent-id <id>', 'Source agent id override')
|
|
93
|
+
.option('--runtime-mode <mode>', 'Runtime layer mode: none (skip), default (settings, prompts, themes, models), or full (adds skills, extensions). Requires a resolvable agentDir in OpenClaw config. Auth and session files are always excluded.')
|
|
65
94
|
.option('--archive', 'Produce a .ocpkg.tar.gz single-file archive')
|
|
66
95
|
.option('--json', 'Emit the full machine-readable JSON report')
|
|
67
96
|
.action(runExport);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":";;;;;AAsBA,8BAgFC;AAED,sDAeC;AAvHD,0DAA6B;AAE7B,yDAA+D;AAC/D,6DAAiF;AACjF,yDAAmF;AACnF,uDAA4D;AAC5D,uDAAmD;AACnD,yDAAqD;AAErD,2DAAuD;AAahD,KAAK,UAAU,SAAS,CAAC,OAAsB;IACpD,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,mCAAoB,EAAC,OAAO,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ChC,CAAC;AAED,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,WAAW,CAAC,+EAA+E,CAAC;SAC5F,cAAc,CAAC,oBAAoB,EAAE,uBAAuB,CAAC;SAC7D,cAAc,CAAC,cAAc,EAAE,qBAAqB,CAAC;SACrD,MAAM,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;SACxD,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;SACjD,MAAM,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;SACrD,MAAM,CACL,uBAAuB,EACvB,iNAAiN,CAClN;SACA,MAAM,CAAC,WAAW,EAAE,6CAA6C,CAAC;SAClE,MAAM,CAAC,QAAQ,EAAE,4CAA4C,CAAC;SAC9D,MAAM,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/commands/import.js
CHANGED
|
@@ -7,8 +7,8 @@ exports.runImport = runImport;
|
|
|
7
7
|
exports.registerImportCommand = registerImportCommand;
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const import_exec_1 = require("../core/import-exec");
|
|
10
|
-
const openclaw_config_1 = require("../core/openclaw-config");
|
|
11
10
|
const import_plan_1 = require("../core/import-plan");
|
|
11
|
+
const openclaw_config_1 = require("../core/openclaw-config");
|
|
12
12
|
const package_read_1 = require("../core/package-read");
|
|
13
13
|
const renderable_cli_error_1 = require("../renderable-cli-error");
|
|
14
14
|
const output_1 = require("../utils/output");
|
|
@@ -23,9 +23,7 @@ class ImportBlockedError extends Error {
|
|
|
23
23
|
this.name = 'ImportBlockedError';
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return this.asJson
|
|
27
|
-
? JSON.stringify(this.report, null, 2)
|
|
28
|
-
: this.message;
|
|
26
|
+
return this.asJson ? JSON.stringify(this.report, null, 2) : this.message;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
function formatRequiredInputKey(key) {
|
|
@@ -54,6 +52,15 @@ function formatBlockedImportReport(report) {
|
|
|
54
52
|
if (summary.configAgentCollision) {
|
|
55
53
|
lines.push('- target config agent collision detected: yes');
|
|
56
54
|
}
|
|
55
|
+
if (summary.runtimeFileCount > 0) {
|
|
56
|
+
lines.push(`- runtime files: ${summary.runtimeFileCount}`);
|
|
57
|
+
}
|
|
58
|
+
if (report.writePlan.runtimePlan) {
|
|
59
|
+
lines.push(`- target agentDir: ${report.writePlan.runtimePlan.targetAgentDir}`);
|
|
60
|
+
}
|
|
61
|
+
if (summary.runtimeCollisions) {
|
|
62
|
+
lines.push('- runtime collisions detected: yes');
|
|
63
|
+
}
|
|
57
64
|
return lines.join('\n');
|
|
58
65
|
}
|
|
59
66
|
function formatDryRunImportReport(report) {
|
|
@@ -71,6 +78,18 @@ function formatDryRunImportReport(report) {
|
|
|
71
78
|
if (summary.configAgentCollision) {
|
|
72
79
|
lines.push('- target config agent collision detected: yes');
|
|
73
80
|
}
|
|
81
|
+
if (summary.runtimeFileCount > 0) {
|
|
82
|
+
lines.push(`- runtime files: ${summary.runtimeFileCount}`);
|
|
83
|
+
}
|
|
84
|
+
if (report.writePlan.runtimePlan) {
|
|
85
|
+
lines.push(`- target agentDir: ${report.writePlan.runtimePlan.targetAgentDir}`);
|
|
86
|
+
if (report.writePlan.runtimePlan.pathRewrites.length > 0) {
|
|
87
|
+
lines.push(`- path rewrites: ${report.writePlan.runtimePlan.pathRewrites.length}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (summary.runtimeCollisions) {
|
|
91
|
+
lines.push('- runtime collisions detected: yes');
|
|
92
|
+
}
|
|
74
93
|
return lines.join('\n');
|
|
75
94
|
}
|
|
76
95
|
async function runImport(packagePath, options) {
|
|
@@ -80,7 +99,9 @@ async function runImport(packagePath, options) {
|
|
|
80
99
|
let tempDir;
|
|
81
100
|
try {
|
|
82
101
|
const pkg = await (0, package_read_1.readPackage)(node_path_1.default.resolve(packagePath), {
|
|
83
|
-
onTempDir(dir) {
|
|
102
|
+
onTempDir(dir) {
|
|
103
|
+
tempDir = dir;
|
|
104
|
+
},
|
|
84
105
|
});
|
|
85
106
|
const configPath = options.config
|
|
86
107
|
? node_path_1.default.resolve(options.config)
|
|
@@ -90,6 +111,7 @@ async function runImport(packagePath, options) {
|
|
|
90
111
|
targetWorkspacePath: node_path_1.default.resolve(options.targetWorkspace),
|
|
91
112
|
targetAgentId: options.agentId,
|
|
92
113
|
targetConfigPath: configPath,
|
|
114
|
+
targetAgentDir: options.targetAgentDir,
|
|
93
115
|
force: options.force,
|
|
94
116
|
});
|
|
95
117
|
if (!plan.canProceed) {
|
|
@@ -124,6 +146,12 @@ async function runImport(packagePath, options) {
|
|
|
124
146
|
` Imported files: ${result.importedFiles.length}`,
|
|
125
147
|
` Metadata files: ${result.metadataFiles.length}`,
|
|
126
148
|
];
|
|
149
|
+
if (result.importedRuntimeFiles.length > 0) {
|
|
150
|
+
lines.push(` Runtime files: ${result.importedRuntimeFiles.length}`);
|
|
151
|
+
}
|
|
152
|
+
if (result.targetAgentDir) {
|
|
153
|
+
lines.push(` Agent dir: ${result.targetAgentDir}`);
|
|
154
|
+
}
|
|
127
155
|
(0, output_1.pushSection)(lines, 'Warnings', result.warnings);
|
|
128
156
|
(0, output_1.pushSection)(lines, 'Next steps', result.nextSteps);
|
|
129
157
|
console.log(lines.join('\n'));
|
|
@@ -136,13 +164,14 @@ async function runImport(packagePath, options) {
|
|
|
136
164
|
}
|
|
137
165
|
function registerImportCommand(command) {
|
|
138
166
|
command
|
|
139
|
-
.description('Import a portable .ocpkg directory into a target workspace.')
|
|
167
|
+
.description('Import a portable .ocpkg directory into a target workspace. If the package includes a runtime layer, runtime files are restored to the target agentDir.')
|
|
140
168
|
.argument('<package-path>', 'Portable package directory path')
|
|
141
169
|
.requiredOption('--target-workspace <path>', 'Target workspace path')
|
|
142
170
|
.option('--agent-id <id>', 'Target agent id override')
|
|
171
|
+
.option('--target-agent-dir <path>', 'Target agentDir for runtime file import. Required when the package includes a runtime layer and no agentDir is discoverable from config.')
|
|
143
172
|
.option('--config <path>', 'Target OpenClaw config path')
|
|
144
|
-
.option('--force', 'Overwrite
|
|
145
|
-
.option('--dry-run', 'Print the import plan and exit without writing files')
|
|
173
|
+
.option('--force', 'Overwrite existing target workspace and runtime files')
|
|
174
|
+
.option('--dry-run', 'Print the import plan (including runtime details) and exit without writing files')
|
|
146
175
|
.option('--json', 'Emit the full machine-readable JSON report')
|
|
147
176
|
.action(runImport);
|
|
148
177
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":";;;;;AA0JA,8BAyFC;AAED,sDAYC;AAjQD,0DAA6B;AAE7B,qDAAoD;AACpD,qDAAiD;AACjD,6DAAiE;AACjE,uDAAmE;AAEnE,kEAA2F;AAC3F,4CAA8C;AAyB9C,MAAM,kBAAmB,SAAQ,KAAK;IAIzB;IACQ;IAJV,CAAC,8CAAuB,CAAC,GAAG,IAAI,CAAC;IAE1C,YACW,MAA2B,EACnB,MAAe;QAEhC,KAAK,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC;QAHhC,WAAM,GAAN,MAAM,CAAqB;QACnB,WAAM,GAAN,MAAM,CAAS;QAGhC,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IAC3E,CAAC;CACF;AAED,SAAS,sBAAsB,CAAC,GAAyD;IACvF,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,GAAG,KA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