@web42/cli 0.1.6 → 0.1.8
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/dist/commands/init.js +65 -1
- package/dist/commands/pack.js +11 -2
- package/dist/commands/pull.js +88 -17
- package/dist/commands/push.js +130 -66
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.js +98 -0
- package/dist/generated/embedded-skills.js +17 -5
- package/dist/index.js +2 -0
- package/dist/platforms/base.d.ts +1 -0
- package/dist/platforms/openclaw/adapter.d.ts +1 -0
- package/dist/platforms/openclaw/adapter.js +2 -2
- package/dist/types/sync.d.ts +74 -0
- package/dist/types/sync.js +7 -0
- package/dist/utils/api.d.ts +2 -0
- package/dist/utils/api.js +26 -0
- package/dist/utils/sync.d.ts +12 -0
- package/dist/utils/sync.js +197 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/web42-publish-prep/SKILL.md +84 -23
- package/skills/web42-publish-prep/_meta.json +3 -3
- package/skills/web42-publish-prep/assets/readme-template.md +9 -5
- package/skills/web42-publish-prep/references/file-hygiene.md +30 -9
- package/skills/web42-publish-prep/references/manifest-fields.md +4 -1
- package/skills/web42-publish-prep/references/marketplace-config.md +99 -0
- package/skills/web42-publish-prep/references/resources-guide.md +136 -0
- package/skills/web42-publish-prep/references/web42-folder.md +120 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# The `.web42/` Folder
|
|
2
|
+
|
|
3
|
+
The `.web42/` directory in your agent workspace is the metadata and sync hub for the Web42 marketplace. It is created automatically by `web42 init`.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.web42/
|
|
9
|
+
├── marketplace.json # Pricing, license, tags
|
|
10
|
+
├── resources.json # Metadata for resource files
|
|
11
|
+
├── sync.json # Sync state (auto-managed, do not edit)
|
|
12
|
+
├── avatar.png # Agent profile image (optional)
|
|
13
|
+
├── resources/ # Screenshots, videos, documents
|
|
14
|
+
│ ├── screenshot-1.png
|
|
15
|
+
│ └── demo.mp4
|
|
16
|
+
└── dist/ # Pack output (auto-generated by web42 pack)
|
|
17
|
+
├── AGENTS.md
|
|
18
|
+
├── IDENTITY.md
|
|
19
|
+
├── manifest.json
|
|
20
|
+
└── ...
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Files You Edit
|
|
24
|
+
|
|
25
|
+
### `marketplace.json`
|
|
26
|
+
|
|
27
|
+
Controls pricing, licensing, and discoverability on the marketplace.
|
|
28
|
+
|
|
29
|
+
- Created by `web42 init` with defaults.
|
|
30
|
+
- Edit manually or with agent assistance.
|
|
31
|
+
- Synced to/from the remote on push/pull.
|
|
32
|
+
- See `references/marketplace-config.md` for the full field reference.
|
|
33
|
+
|
|
34
|
+
### `resources.json`
|
|
35
|
+
|
|
36
|
+
Describes the resource files (screenshots, videos, documents) in the `resources/` subdirectory.
|
|
37
|
+
|
|
38
|
+
- JSON array of `ResourceMeta` objects.
|
|
39
|
+
- Each entry maps a file in `resources/` to a title, description, type, and display order.
|
|
40
|
+
- See `references/resources-guide.md` for the schema and guidance.
|
|
41
|
+
|
|
42
|
+
### `avatar.{png,jpg,jpeg,webp,svg}`
|
|
43
|
+
|
|
44
|
+
The agent's profile image, shown on the marketplace listing and search results.
|
|
45
|
+
|
|
46
|
+
- Only one avatar file should exist (the CLI picks the first match by extension priority: png, jpg, jpeg, webp, svg).
|
|
47
|
+
- Recommended: 400x400 or larger, square aspect ratio.
|
|
48
|
+
- Uploaded to the server on `web42 push`.
|
|
49
|
+
|
|
50
|
+
### `resources/`
|
|
51
|
+
|
|
52
|
+
Directory containing the actual resource files referenced by `resources.json`.
|
|
53
|
+
|
|
54
|
+
- Drop images, videos, or PDFs here.
|
|
55
|
+
- Filenames must match the `file` field in `resources.json`.
|
|
56
|
+
|
|
57
|
+
## Files You Should NOT Edit
|
|
58
|
+
|
|
59
|
+
### `sync.json`
|
|
60
|
+
|
|
61
|
+
Tracks the sync state between your local workspace and the remote database.
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"agent_id": "0c4cc49e-...",
|
|
66
|
+
"last_remote_hash": "7b1d3ecf...",
|
|
67
|
+
"last_local_hash": "d9a10b8a...",
|
|
68
|
+
"synced_at": "2026-03-17T03:54:46.124Z"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- **Auto-managed** by `web42 push`, `web42 pull`, and `web42 sync`.
|
|
73
|
+
- Editing this file manually will break change detection.
|
|
74
|
+
- Safe to delete if you want to force a full re-sync (next push/pull will recreate it).
|
|
75
|
+
|
|
76
|
+
### `dist/`
|
|
77
|
+
|
|
78
|
+
The pack output directory, generated by `web42 pack` or automatically during `web42 push`.
|
|
79
|
+
|
|
80
|
+
- Contains the processed, distributable version of your agent files.
|
|
81
|
+
- **Auto-generated** — do not edit files here directly.
|
|
82
|
+
- Excluded from the pack itself (no recursion).
|
|
83
|
+
|
|
84
|
+
## Git Integration
|
|
85
|
+
|
|
86
|
+
Add `.web42/sync.json` and `.web42/dist/` to `.gitignore` since they are auto-generated:
|
|
87
|
+
|
|
88
|
+
```gitignore
|
|
89
|
+
.web42/sync.json
|
|
90
|
+
.web42/dist/
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Keep these in version control:
|
|
94
|
+
|
|
95
|
+
- `.web42/marketplace.json`
|
|
96
|
+
- `.web42/resources.json`
|
|
97
|
+
- `.web42/avatar.*`
|
|
98
|
+
- `.web42/resources/`
|
|
99
|
+
|
|
100
|
+
## `.web42ignore` (Workspace Root)
|
|
101
|
+
|
|
102
|
+
Not inside `.web42/` — lives at the workspace root alongside `manifest.json`.
|
|
103
|
+
|
|
104
|
+
- Created by `web42 init` with sensible defaults (IDE dirs, env files, test folders, drafts).
|
|
105
|
+
- Glob patterns, one per line. Lines starting with `#` are comments.
|
|
106
|
+
- Controls which files are excluded when running `web42 pack` or `web42 push`.
|
|
107
|
+
- Use `web42 pack --dry-run` to verify what gets included/excluded.
|
|
108
|
+
- See `references/file-hygiene.md` for full details.
|
|
109
|
+
|
|
110
|
+
Keep `.web42ignore` in version control so the ignore rules travel with the project.
|
|
111
|
+
|
|
112
|
+
## Sync Lifecycle
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
web42 init → Creates .web42/, marketplace.json, resources.json, .web42ignore
|
|
116
|
+
web42 pack → Generates .web42/dist/ from workspace files (respects .web42ignore)
|
|
117
|
+
web42 push → Sends snapshot (manifest + README + marketplace + files + avatar + resources) to remote
|
|
118
|
+
web42 pull → Fetches remote snapshot, writes to local files
|
|
119
|
+
web42 sync → Shows local vs remote hash comparison without changing anything
|
|
120
|
+
```
|