@calimero-network/agent-skills 0.2.0 → 0.4.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 +137 -17
- package/SKILL.md +31 -23
- package/package.json +2 -2
- package/scripts/install.js +3 -3
- package/scripts/test.js +6 -15
- package/skills/calimero-abi-codegen/SKILL.md +121 -22
- package/skills/calimero-abi-codegen/references/abi-format.md +3 -5
- package/skills/calimero-abi-codegen/references/generated-output.md +12 -4
- package/skills/calimero-abi-codegen/rules/schema-version.md +11 -4
- package/skills/calimero-abi-codegen/rules/unique-names.md +2 -6
- package/skills/calimero-client-js/SKILL.md +127 -22
- package/skills/calimero-client-js/references/auth.md +18 -10
- package/skills/calimero-client-js/references/rpc-calls.md +15 -21
- package/skills/calimero-client-js/references/sso.md +9 -9
- package/skills/calimero-client-js/references/websocket-events.md +73 -59
- package/skills/calimero-client-js/rules/camelcase-api.md +10 -7
- package/skills/calimero-client-js/rules/token-refresh.md +59 -21
- package/skills/calimero-client-py/SKILL.md +26 -10
- package/skills/calimero-client-py/references/api.md +41 -43
- package/skills/calimero-client-py/references/auth.md +7 -7
- package/skills/calimero-client-py/rules/async-usage.md +27 -31
- package/skills/calimero-client-py/rules/stable-node-name.md +7 -7
- package/skills/calimero-core/SKILL.md +135 -0
- package/skills/calimero-core/references/architecture.md +101 -0
- package/skills/calimero-core/references/jsonrpc-protocol.md +192 -0
- package/skills/calimero-core/references/namespaces-groups.md +94 -0
- package/skills/calimero-core/references/storage-types.md +118 -0
- package/skills/calimero-core/references/websocket-events.md +142 -0
- package/skills/calimero-core/rules/context-is-not-app.md +35 -0
- package/skills/calimero-core/rules/crdt-types-only.md +55 -0
- package/skills/calimero-desktop/SKILL.md +25 -14
- package/skills/calimero-desktop/references/sso-integration.md +49 -22
- package/skills/calimero-desktop/rules/sso-fallback.md +3 -2
- package/skills/calimero-merobox/SKILL.md +255 -28
- package/skills/calimero-merobox/references/ci-integration.md +3 -2
- package/skills/calimero-merobox/references/workflow-files.md +7 -5
- package/skills/calimero-merobox/rules/docker-required.md +7 -6
- package/skills/calimero-meroctl/SKILL.md +68 -0
- package/skills/calimero-meroctl/references/commands.md +177 -0
- package/skills/calimero-meroctl/references/scripting.md +80 -0
- package/skills/calimero-meroctl/rules/call-view-flag.md +28 -0
- package/skills/calimero-meroctl/rules/register-node-once.md +34 -0
- package/skills/calimero-merod/SKILL.md +49 -0
- package/skills/calimero-merod/references/health-endpoints.md +90 -0
- package/skills/calimero-merod/references/init-flags.md +84 -0
- package/skills/calimero-merod/rules/init-before-run.md +40 -0
- package/skills/calimero-merod/rules/port-assignments.md +33 -0
- package/skills/calimero-node/SKILL.md +52 -35
- package/skills/calimero-node/references/context-lifecycle.md +34 -17
- package/skills/calimero-node/references/meroctl-commands.md +89 -99
- package/skills/calimero-node/rules/app-vs-context.md +4 -4
- package/skills/calimero-registry/SKILL.md +110 -31
- package/skills/calimero-registry/references/bundle-and-push.md +99 -34
- package/skills/calimero-registry/references/manifest-format.md +56 -35
- package/skills/calimero-registry/references/mero-sign.md +10 -9
- package/skills/calimero-registry/rules/key-security.md +3 -2
- package/skills/calimero-registry/rules/sign-before-pack.md +5 -5
- package/skills/calimero-rust-sdk/SKILL.md +154 -44
- package/skills/calimero-rust-sdk/references/blob-api.md +119 -0
- package/skills/calimero-rust-sdk/references/event-handlers.md +122 -0
- package/skills/calimero-rust-sdk/references/events.md +2 -1
- package/skills/calimero-rust-sdk/references/examples.md +81 -29
- package/skills/calimero-rust-sdk/references/migrations.md +123 -0
- package/skills/calimero-rust-sdk/references/nested-crdts.md +113 -0
- package/skills/calimero-rust-sdk/references/private-storage.md +76 -34
- package/skills/calimero-rust-sdk/references/state-collections.md +106 -21
- package/skills/calimero-rust-sdk/references/user-and-frozen-storage.md +169 -0
- package/skills/calimero-rust-sdk/rules/app-macro-placement.md +5 -2
- package/skills/calimero-rust-sdk/rules/no-std-collections.md +5 -2
- package/skills/calimero-rust-sdk/rules/state-derives.md +45 -0
- package/skills/calimero-rust-sdk/rules/wasm-constraints.md +12 -10
- package/skills/calimero-sdk-js/SKILL.md +145 -0
- package/skills/calimero-sdk-js/references/build-pipeline.md +98 -0
- package/skills/calimero-sdk-js/references/collections.md +132 -0
- package/skills/calimero-sdk-js/references/events.md +63 -0
- package/skills/calimero-sdk-js/rules/crdt-only-state.md +47 -0
- package/skills/calimero-sdk-js/rules/no-console-log.md +38 -0
- package/skills/calimero-sdk-js/rules/view-decorator.md +48 -0
|
@@ -5,17 +5,39 @@ Full CLI for managing a running Calimero node.
|
|
|
5
5
|
## Global flags
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
meroctl --node
|
|
9
|
-
meroctl --
|
|
8
|
+
meroctl --node node1 <command> # use registered node by name
|
|
9
|
+
meroctl --api http://localhost:2428 <command> # connect directly by URL
|
|
10
|
+
meroctl --home ~/.calimero <command> # alternate config path
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Register a node once, then use by name:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
meroctl node add node1 /path/to/home # local node
|
|
17
|
+
meroctl node add mynode http://node.com # remote node
|
|
18
|
+
meroctl node use node1 # set as active (default)
|
|
10
19
|
```
|
|
11
20
|
|
|
12
21
|
---
|
|
13
22
|
|
|
14
|
-
## Node commands
|
|
23
|
+
## Node management commands
|
|
15
24
|
|
|
16
25
|
```bash
|
|
17
|
-
#
|
|
18
|
-
meroctl
|
|
26
|
+
# Add / connect to a node
|
|
27
|
+
meroctl node add node1 /path/to/calimero/home
|
|
28
|
+
meroctl node add remote1 http://node.example.com
|
|
29
|
+
|
|
30
|
+
# Set active node
|
|
31
|
+
meroctl node use node1
|
|
32
|
+
|
|
33
|
+
# List configured nodes
|
|
34
|
+
meroctl node ls
|
|
35
|
+
|
|
36
|
+
# Remove a node connection
|
|
37
|
+
meroctl node remove node1
|
|
38
|
+
|
|
39
|
+
# Show node peer identity
|
|
40
|
+
meroctl node identity
|
|
19
41
|
```
|
|
20
42
|
|
|
21
43
|
---
|
|
@@ -23,22 +45,22 @@ meroctl --node-url http://localhost:2428 node health
|
|
|
23
45
|
## App commands
|
|
24
46
|
|
|
25
47
|
```bash
|
|
26
|
-
# Install app from local
|
|
27
|
-
meroctl --node
|
|
28
|
-
meroctl --node
|
|
48
|
+
# Install app from local file (.wasm or .mpk)
|
|
49
|
+
meroctl --node node1 app install --path myapp.wasm
|
|
50
|
+
meroctl --node node1 app install --path myapp.mpk
|
|
29
51
|
|
|
30
52
|
# Install app from registry URL
|
|
31
|
-
meroctl --node
|
|
32
|
-
--url https://
|
|
53
|
+
meroctl --node node1 app install \
|
|
54
|
+
--url https://apps.calimero.network/com.yourorg.myapp/1.0.0
|
|
33
55
|
|
|
34
56
|
# List installed apps
|
|
35
|
-
meroctl --node
|
|
57
|
+
meroctl --node node1 app ls
|
|
36
58
|
|
|
37
59
|
# Get details of a specific app
|
|
38
|
-
meroctl --node
|
|
60
|
+
meroctl --node node1 app get <application-id>
|
|
39
61
|
|
|
40
|
-
# Remove an app
|
|
41
|
-
meroctl --node
|
|
62
|
+
# Remove an app
|
|
63
|
+
meroctl --node node1 app remove <application-id>
|
|
42
64
|
```
|
|
43
65
|
|
|
44
66
|
---
|
|
@@ -47,44 +69,23 @@ meroctl --node-url http://localhost:2428 app remove <app-id>
|
|
|
47
69
|
|
|
48
70
|
```bash
|
|
49
71
|
# Create a context (instantiates the app — calls init())
|
|
50
|
-
meroctl --node
|
|
72
|
+
meroctl --node node1 context create --application-id <application-id>
|
|
51
73
|
# Returns: context-id
|
|
52
74
|
|
|
75
|
+
# Dev mode — watch a WASM file for changes and hot-reload
|
|
76
|
+
meroctl --node node1 context create --watch path/to/app.wasm
|
|
77
|
+
|
|
53
78
|
# List all contexts on this node
|
|
54
|
-
meroctl --node
|
|
79
|
+
meroctl --node node1 context ls
|
|
55
80
|
|
|
56
81
|
# Get details of a specific context
|
|
57
|
-
meroctl --node
|
|
58
|
-
|
|
59
|
-
# Delete a context (wipes all state and storage for this context)
|
|
60
|
-
meroctl --node-url http://localhost:2428 context delete <context-id>
|
|
82
|
+
meroctl --node node1 context get <context-id>
|
|
61
83
|
|
|
62
|
-
#
|
|
63
|
-
meroctl --node
|
|
84
|
+
# Delete a context (wipes all state and storage)
|
|
85
|
+
meroctl --node node1 context delete <context-id>
|
|
64
86
|
|
|
65
|
-
#
|
|
66
|
-
meroctl --node
|
|
67
|
-
<context-id> --identity <identity>
|
|
68
|
-
# Returns: invitation payload JSON — share this with the invitee
|
|
69
|
-
|
|
70
|
-
# Join a context using an invitation payload (run on the joining node)
|
|
71
|
-
meroctl --node-url http://localhost:2428 context join \
|
|
72
|
-
--invitation '<invitation-payload-json>'
|
|
73
|
-
# After this, the node syncs state from the inviting node
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Full invite + join example
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# ── Node A (inviter) ──
|
|
80
|
-
meroctl --node-url http://localhost:2428 context invite \
|
|
81
|
-
abc123ctx --identity ed25519:AAAA...
|
|
82
|
-
# Prints: {"payload":"..."}
|
|
83
|
-
|
|
84
|
-
# ── Node B (joiner) ──
|
|
85
|
-
meroctl --node-url http://localhost:2429 context join \
|
|
86
|
-
--invitation '{"payload":"..."}'
|
|
87
|
-
# Node B now participates in the context and syncs CRDT state
|
|
87
|
+
# Sync a context with peers
|
|
88
|
+
meroctl --node node1 context sync <context-id>
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
---
|
|
@@ -92,16 +93,16 @@ meroctl --node-url http://localhost:2429 context join \
|
|
|
92
93
|
## Calling app methods
|
|
93
94
|
|
|
94
95
|
```bash
|
|
95
|
-
# Mutation — changes shared state
|
|
96
|
-
meroctl --node
|
|
96
|
+
# Mutation — changes shared state
|
|
97
|
+
meroctl --node node1 call <context-id> set \
|
|
97
98
|
--args '{"key":"hello","value":"world"}'
|
|
98
99
|
|
|
99
100
|
# View — read-only, does NOT change state
|
|
100
|
-
meroctl --node
|
|
101
|
+
meroctl --node node1 call <context-id> get \
|
|
101
102
|
--args '{"key":"hello"}' --view
|
|
102
103
|
|
|
103
104
|
# Method with no arguments
|
|
104
|
-
meroctl --node
|
|
105
|
+
meroctl --node node1 call <context-id> list_all \
|
|
105
106
|
--args '{}' --view
|
|
106
107
|
```
|
|
107
108
|
|
|
@@ -110,74 +111,63 @@ meroctl --node-url http://localhost:2428 call <context-id> list_all \
|
|
|
110
111
|
## Identity commands
|
|
111
112
|
|
|
112
113
|
```bash
|
|
113
|
-
# Create a new identity
|
|
114
|
-
meroctl --node
|
|
114
|
+
# Create a new identity
|
|
115
|
+
meroctl --node node1 identity create
|
|
115
116
|
|
|
116
|
-
# List all identities
|
|
117
|
-
meroctl --node
|
|
117
|
+
# List all identities
|
|
118
|
+
meroctl --node node1 identity ls
|
|
118
119
|
|
|
119
120
|
# Get details of a specific identity
|
|
120
|
-
meroctl --node
|
|
121
|
+
meroctl --node node1 identity get <identity>
|
|
121
122
|
```
|
|
122
123
|
|
|
123
124
|
---
|
|
124
125
|
|
|
125
|
-
##
|
|
126
|
+
## Multi-node context sharing (namespace + group model)
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
# 1. Build the WASM app
|
|
129
|
-
cargo build --target wasm32-unknown-unknown --release
|
|
128
|
+
Multi-node participation uses namespaces (root groups) and group membership.
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
```bash
|
|
131
|
+
# ── Node A: create a namespace and context ──
|
|
132
|
+
meroctl --node node1 namespace create
|
|
133
|
+
# → <namespace-id>
|
|
133
134
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
--path target/wasm32-unknown-unknown/release/myapp.wasm
|
|
137
|
-
# Copy the app-id from output
|
|
135
|
+
meroctl --node node1 context create --application-id <app-id>
|
|
136
|
+
# → <context-id>
|
|
138
137
|
|
|
139
|
-
#
|
|
140
|
-
meroctl --node
|
|
141
|
-
#
|
|
138
|
+
# Generate an invitation for another node to join
|
|
139
|
+
meroctl --node node1 namespace invite <namespace-id>
|
|
140
|
+
# → invitation JSON payload
|
|
142
141
|
|
|
143
|
-
#
|
|
144
|
-
meroctl --node
|
|
145
|
-
--args '{"key":"foo","value":"bar"}'
|
|
142
|
+
# ── Node B: join via invitation ──
|
|
143
|
+
meroctl --node node2 namespace join <namespace-id> '<invitation-json>'
|
|
146
144
|
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
# ── Node B: join the context (after joining namespace/group) ──
|
|
146
|
+
meroctl --node node2 group join-context <context-id>
|
|
149
147
|
```
|
|
150
148
|
|
|
151
149
|
---
|
|
152
150
|
|
|
153
|
-
## Step-by-step:
|
|
151
|
+
## Step-by-step: full local development flow
|
|
154
152
|
|
|
155
153
|
```bash
|
|
156
|
-
#
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
#
|
|
154
|
+
# 1. Initialize and start a node
|
|
155
|
+
merod --node node1 init --server-port 2428 --swarm-port 2528
|
|
156
|
+
merod --node node1 run & # run in background
|
|
157
|
+
|
|
158
|
+
# 2. Register the node in meroctl
|
|
159
|
+
meroctl node add node1 ~/.calimero/node1
|
|
160
|
+
meroctl node use node1
|
|
161
|
+
|
|
162
|
+
# 3. Install the app
|
|
163
|
+
meroctl app install --path target/wasm32-unknown-unknown/release/myapp.wasm
|
|
164
|
+
# → copy the application-id
|
|
161
165
|
|
|
162
|
-
# Create
|
|
163
|
-
meroctl --
|
|
164
|
-
# →
|
|
165
|
-
|
|
166
|
-
#
|
|
167
|
-
meroctl
|
|
168
|
-
|
|
169
|
-
# → <invitation-payload>
|
|
170
|
-
|
|
171
|
-
# ── Node B (port 2429) ──
|
|
172
|
-
# Accept invitation
|
|
173
|
-
meroctl --node-url http://localhost:2429 context join \
|
|
174
|
-
--invitation '<invitation-payload>'
|
|
175
|
-
# Node B syncs all existing state from node A
|
|
176
|
-
|
|
177
|
-
# Both nodes can now call methods and see each other's mutations:
|
|
178
|
-
meroctl --node-url http://localhost:2428 call <context-id> set \
|
|
179
|
-
--args '{"key":"shared","value":"data"}'
|
|
180
|
-
meroctl --node-url http://localhost:2429 call <context-id> get \
|
|
181
|
-
--args '{"key":"shared"}' --view
|
|
182
|
-
# → "data" (synced from node A)
|
|
166
|
+
# 4. Create a context
|
|
167
|
+
meroctl context create --application-id <application-id>
|
|
168
|
+
# → copy the context-id
|
|
169
|
+
|
|
170
|
+
# 5. Interact with the app
|
|
171
|
+
meroctl call <context-id> set --args '{"key":"foo","value":"bar"}'
|
|
172
|
+
meroctl call <context-id> get --args '{"key":"foo"}' --view
|
|
183
173
|
```
|
|
@@ -26,8 +26,8 @@ meroctl call <context-id> get --args '{"key":"hello"}' --view
|
|
|
26
26
|
|
|
27
27
|
## Why this matters
|
|
28
28
|
|
|
29
|
-
API calls take a `context-id`, not an `app-id`. If you try to call a method with an
|
|
30
|
-
|
|
29
|
+
API calls take a `context-id`, not an `app-id`. If you try to call a method with an `app-id` instead
|
|
30
|
+
of a `context-id` you will get a "context not found" error.
|
|
31
31
|
|
|
32
|
-
One app can have multiple independent contexts — each with its own members and state.
|
|
33
|
-
|
|
32
|
+
One app can have multiple independent contexts — each with its own members and state. For example, a
|
|
33
|
+
chat app might have one context per chat room.
|
|
@@ -1,51 +1,130 @@
|
|
|
1
1
|
# calimero-registry — Agent Instructions
|
|
2
2
|
|
|
3
|
-
You are helping a developer **
|
|
3
|
+
You are helping a developer **build and publish a Calimero app bundle** to the App Registry.
|
|
4
4
|
|
|
5
|
-
## Two tools
|
|
5
|
+
## Two tools
|
|
6
6
|
|
|
7
|
-
| Tool
|
|
8
|
-
|
|
|
9
|
-
| `
|
|
10
|
-
| `
|
|
7
|
+
| Tool | Install | Purpose |
|
|
8
|
+
| ------------------- | ----------------------------------------------- | ----------------------------------------------------------- |
|
|
9
|
+
| `calimero-registry` | `npm install -g @calimero-network/registry-cli` | Bundle creation and registry push |
|
|
10
|
+
| `mero-sign` | `cargo install mero-sign` | Ed25519 key management and manifest signing (for ownership) |
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Quick workflow
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
```bash
|
|
15
|
+
# 1. Install registry CLI
|
|
16
|
+
npm install -g @calimero-network/registry-cli
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
3. `mero-sign sign manifest.json --key key.json` ← sign first
|
|
21
|
-
4. `calimero-registry bundle create ...` ← bundle second
|
|
22
|
-
5. `calimero-registry bundle push ...` ← then push
|
|
18
|
+
# 2. Configure registry (one-time)
|
|
19
|
+
calimero-registry config set registry-url https://apps.calimero.network
|
|
20
|
+
calimero-registry config set api-key your-api-key
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
# 3. Build WASM (your app's build script)
|
|
23
|
+
./build.sh
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
# 4. Create bundle (WASM + metadata → .mpk)
|
|
26
|
+
calimero-registry bundle create \
|
|
27
|
+
--output myapp-1.0.0.mpk \
|
|
28
|
+
--name "My App" \
|
|
29
|
+
--description "Does something useful" \
|
|
30
|
+
--author "Your Name" \
|
|
31
|
+
--frontend "https://my-app.com" \
|
|
32
|
+
--github "https://github.com/yourorg/myapp" \
|
|
33
|
+
path/to/app.wasm \
|
|
34
|
+
com.yourorg.myapp \
|
|
35
|
+
1.0.0
|
|
36
|
+
|
|
37
|
+
# 5. Push to registry
|
|
38
|
+
calimero-registry bundle push myapp-1.0.0.mpk --remote
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Signing for ownership (optional but recommended)
|
|
42
|
+
|
|
43
|
+
The registry tracks package ownership via Ed25519 signatures. If you sign the manifest, your key
|
|
44
|
+
becomes the package owner — only your key (or keys in `manifest.owners`) can push future versions.
|
|
30
45
|
|
|
31
|
-
|
|
46
|
+
```bash
|
|
47
|
+
# Generate signing key (one-time)
|
|
32
48
|
mero-sign generate-key --output my-key.json
|
|
33
49
|
echo "my-key.json" >> .gitignore
|
|
34
50
|
|
|
35
|
-
#
|
|
36
|
-
mero-sign sign
|
|
51
|
+
# After bundle create, sign the manifest inside the bundle:
|
|
52
|
+
mero-sign sign path/to/manifest.json --key my-key.json
|
|
53
|
+
|
|
54
|
+
# Then push
|
|
55
|
+
calimero-registry bundle push myapp-1.0.0.mpk --remote
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Bundle create flags
|
|
59
|
+
|
|
60
|
+
| Flag | Required | Description |
|
|
61
|
+
| ----------------------- | -------- | ------------------------------------------------------ |
|
|
62
|
+
| `<wasm-file>` | Yes | Path to WASM binary (positional) |
|
|
63
|
+
| `[package]` | Yes | Reverse-domain package name (e.g. `com.yourorg.myapp`) |
|
|
64
|
+
| `[version]` | Yes | SemVer version (e.g. `1.0.0`) |
|
|
65
|
+
| `-o, --output <path>` | No | Output `.mpk` filename |
|
|
66
|
+
| `-m, --manifest <path>` | No | Read config from a manifest JSON file |
|
|
67
|
+
| `--name <name>` | No | App display name |
|
|
68
|
+
| `--description <text>` | No | Short description |
|
|
69
|
+
| `--author <name>` | No | Author name |
|
|
70
|
+
| `--frontend <url>` | No | Frontend URL (used by Desktop to open the app) |
|
|
71
|
+
| `--github <url>` | No | Source repository URL |
|
|
72
|
+
| `--docs <url>` | No | Documentation URL |
|
|
73
|
+
|
|
74
|
+
## Bundle push flags
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Push to local registry (default)
|
|
78
|
+
calimero-registry bundle push myapp-1.0.0.mpk --local
|
|
37
79
|
|
|
38
|
-
#
|
|
80
|
+
# Push to remote registry (uses config file)
|
|
81
|
+
calimero-registry bundle push myapp-1.0.0.mpk --remote
|
|
82
|
+
|
|
83
|
+
# Override config with flags
|
|
84
|
+
calimero-registry bundle push myapp-1.0.0.mpk \
|
|
85
|
+
--remote \
|
|
86
|
+
--url https://apps.calimero.network \
|
|
87
|
+
--api-key your-api-key
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Set defaults (stored in ~/.calimero-registry/remote-config.json)
|
|
94
|
+
calimero-registry config set registry-url https://apps.calimero.network
|
|
95
|
+
calimero-registry config set api-key your-api-key
|
|
96
|
+
calimero-registry config list
|
|
97
|
+
|
|
98
|
+
# Or use environment variables
|
|
99
|
+
export CALIMERO_REGISTRY_URL=https://apps.calimero.network
|
|
100
|
+
export CALIMERO_API_KEY=your-api-key
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Package naming rules
|
|
104
|
+
|
|
105
|
+
- Must be reverse-domain format: `com.yourorg.appname`
|
|
106
|
+
- Version must be SemVer without `v` prefix: `1.0.0` not `v1.0.0`
|
|
107
|
+
|
|
108
|
+
## Updating an existing app (new version)
|
|
109
|
+
|
|
110
|
+
```bash
|
|
39
111
|
calimero-registry bundle create \
|
|
40
|
-
--output myapp-1.
|
|
41
|
-
|
|
42
|
-
|
|
112
|
+
--output myapp-1.1.0.mpk \
|
|
113
|
+
--name "My App" \
|
|
114
|
+
path/to/app.wasm \
|
|
115
|
+
com.yourorg.myapp \
|
|
116
|
+
1.1.0
|
|
43
117
|
|
|
44
|
-
|
|
45
|
-
calimero-registry bundle push myapp-1.0.0.mpk --key my-key.json
|
|
118
|
+
calimero-registry bundle push myapp-1.1.0.mpk --remote
|
|
46
119
|
```
|
|
47
120
|
|
|
121
|
+
## Related skills
|
|
122
|
+
|
|
123
|
+
- **`calimero-rust-sdk`** — building the WASM app that gets published
|
|
124
|
+
- **`calimero-core`** — application/context model and how the registry integrates with node app
|
|
125
|
+
install
|
|
126
|
+
|
|
48
127
|
## References
|
|
49
128
|
|
|
50
|
-
See `references/` for manifest format, signing details, and push workflow.
|
|
51
|
-
|
|
129
|
+
See `references/` for manifest format, signing details, and push workflow. See `rules/` for hard
|
|
130
|
+
constraints.
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
# Bundle Create & Push
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Install
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install -g calimero-registry
|
|
6
|
+
npm install -g @calimero-network/registry-cli
|
|
7
7
|
# or
|
|
8
|
-
pnpm add -g calimero-registry
|
|
8
|
+
pnpm add -g @calimero-network/registry-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## One-time configuration
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
calimero-registry config set registry-url https://apps.calimero.network
|
|
15
|
+
calimero-registry config set api-key your-api-key
|
|
16
|
+
calimero-registry config list
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or use environment variables:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
export CALIMERO_REGISTRY_URL=https://apps.calimero.network
|
|
23
|
+
export CALIMERO_API_KEY=your-api-key
|
|
9
24
|
```
|
|
10
25
|
|
|
11
26
|
## Bundle create
|
|
12
27
|
|
|
13
|
-
|
|
28
|
+
Creates an `.mpk` bundle from a WASM file:
|
|
14
29
|
|
|
15
30
|
```bash
|
|
16
31
|
calimero-registry bundle create \
|
|
@@ -18,52 +33,102 @@ calimero-registry bundle create \
|
|
|
18
33
|
--name "My App" \
|
|
19
34
|
--description "Does something useful" \
|
|
20
35
|
--author "Your Name" \
|
|
21
|
-
--frontend "https://my-app
|
|
22
|
-
--github "https://github.com/yourorg/
|
|
36
|
+
--frontend "https://my-app.com" \
|
|
37
|
+
--github "https://github.com/yourorg/myapp" \
|
|
23
38
|
path/to/app.wasm \
|
|
24
|
-
com.yourorg.myapp
|
|
39
|
+
com.yourorg.myapp \
|
|
40
|
+
1.0.0
|
|
25
41
|
```
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
| `--
|
|
34
|
-
| `--
|
|
43
|
+
Positional arguments: `<wasm-file> [package] [version]`
|
|
44
|
+
|
|
45
|
+
| Flag | Required | Description |
|
|
46
|
+
| ----------------------- | -------- | ------------------------------------------------ |
|
|
47
|
+
| `-o, --output <path>` | No | Output `.mpk` filename |
|
|
48
|
+
| `-m, --manifest <path>` | No | Read metadata from a manifest JSON file |
|
|
49
|
+
| `--name <name>` | No | App display name |
|
|
50
|
+
| `--description <text>` | No | Short description |
|
|
51
|
+
| `--author <name>` | No | Author name |
|
|
52
|
+
| `--frontend <url>` | No | Frontend URL (Desktop uses this to open the app) |
|
|
53
|
+
| `--github <url>` | No | Source repository URL |
|
|
54
|
+
| `--docs <url>` | No | Documentation URL |
|
|
35
55
|
|
|
36
|
-
|
|
56
|
+
After creating, the CLI prints sign instructions:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
1. Sign the manifest: mero-sign sign <output>/manifest.json --key key.json
|
|
60
|
+
2. Push the bundle: calimero-registry bundle push <output> --remote
|
|
61
|
+
```
|
|
37
62
|
|
|
38
63
|
## Bundle push
|
|
39
64
|
|
|
40
65
|
```bash
|
|
41
|
-
|
|
66
|
+
# Push to remote registry (uses config file values)
|
|
67
|
+
calimero-registry bundle push myapp-1.0.0.mpk --remote
|
|
68
|
+
|
|
69
|
+
# Push to local registry
|
|
70
|
+
calimero-registry bundle push myapp-1.0.0.mpk --local
|
|
71
|
+
|
|
72
|
+
# Override config
|
|
73
|
+
calimero-registry bundle push myapp-1.0.0.mpk \
|
|
74
|
+
--remote \
|
|
75
|
+
--url https://apps.calimero.network \
|
|
76
|
+
--api-key your-api-key
|
|
42
77
|
```
|
|
43
78
|
|
|
44
|
-
|
|
45
|
-
1. Unpack the `.mpk`
|
|
46
|
-
2. Verify the Ed25519 signature against the manifest
|
|
47
|
-
3. Validate your authenticated email against org membership (if publishing to an org)
|
|
48
|
-
4. Store the bundle and make it discoverable
|
|
79
|
+
## Full publish workflow
|
|
49
80
|
|
|
50
|
-
|
|
81
|
+
```bash
|
|
82
|
+
# 1. Build WASM
|
|
83
|
+
./build.sh
|
|
51
84
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
85
|
+
# 2. Create bundle
|
|
86
|
+
calimero-registry bundle create \
|
|
87
|
+
--output myapp-1.0.0.mpk \
|
|
88
|
+
--name "My App" \
|
|
89
|
+
--frontend "https://my-app.com" \
|
|
90
|
+
path/to/app.wasm \
|
|
91
|
+
com.yourorg.myapp \
|
|
92
|
+
1.0.0
|
|
56
93
|
|
|
57
|
-
|
|
94
|
+
# 3. (Optional) Sign manifest for ownership
|
|
95
|
+
mero-sign sign myapp-1.0.0/manifest.json --key my-key.json
|
|
96
|
+
|
|
97
|
+
# 4. Push
|
|
98
|
+
calimero-registry bundle push myapp-1.0.0.mpk --remote
|
|
99
|
+
```
|
|
58
100
|
|
|
59
101
|
## Updating an existing app (new version)
|
|
60
102
|
|
|
61
103
|
```bash
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
104
|
+
calimero-registry bundle create \
|
|
105
|
+
--output myapp-1.1.0.mpk \
|
|
106
|
+
--name "My App" \
|
|
107
|
+
path/to/app.wasm \
|
|
108
|
+
com.yourorg.myapp \
|
|
109
|
+
1.1.0
|
|
110
|
+
|
|
111
|
+
calimero-registry bundle push myapp-1.1.0.mpk --remote
|
|
66
112
|
```
|
|
67
113
|
|
|
68
|
-
|
|
69
|
-
|
|
114
|
+
## CI/CD (GitHub Actions)
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
- name: Install Registry CLI
|
|
118
|
+
run: npm install -g @calimero-network/registry-cli
|
|
119
|
+
|
|
120
|
+
- name: Create Bundle
|
|
121
|
+
run: |
|
|
122
|
+
calimero-registry bundle create \
|
|
123
|
+
--output app-${{ github.event.release.tag_name }}.mpk \
|
|
124
|
+
--name "My Application" \
|
|
125
|
+
./app.wasm \
|
|
126
|
+
com.yourorg.myapp \
|
|
127
|
+
${{ github.event.release.tag_name }}
|
|
128
|
+
|
|
129
|
+
- name: Publish Bundle
|
|
130
|
+
env:
|
|
131
|
+
CALIMERO_API_KEY: ${{ secrets.CALIMERO_API_KEY }}
|
|
132
|
+
run: |
|
|
133
|
+
calimero-registry bundle push app-${{ github.event.release.tag_name }}.mpk --remote
|
|
134
|
+
```
|