pico-engine 1.8.0 → 1.9.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.
- package/README.md +5 -3
- package/dist/RulesetRegistryLoaderFs.js +46 -4
- package/dist/cli.js +3 -1
- package/dist/engineConfig.js +11 -0
- package/dist/index.js +2 -5
- package/dist/logging.js +148 -4
- package/dist/server.js +206 -1
- package/dist/stageKrl.js +26 -0
- package/dist/xmluiRuntime.js +68 -0
- package/krl/io.picolabs.pico-engine-ui.krl +14 -77
- package/krl/io.picolabs.wrangler.krl +28 -5
- package/krl/io.picolabs.xmlui.krl +305 -0
- package/mcp/devResources.js +17 -7
- package/mcp/docs/CLAUDE.md +85 -0
- package/{public → mcp}/docs/pico-engine.md +15 -11
- package/package.json +11 -7
- package/public/pico-engine-ui.css +1 -1
- package/public/pico-engine-ui.js +27 -25
- package/public/xmlui/0.12.7.js +419 -0
- package/public/xmlui/pico-view-boot.js +153 -0
- package/src/RulesetRegistryLoaderFs.ts +48 -4
- package/src/cli.ts +3 -1
- package/src/engineConfig.ts +18 -0
- package/src/index.ts +4 -6
- package/src/logging.ts +165 -4
- package/src/server.ts +250 -2
- package/src/stageKrl.ts +26 -0
- package/src/xmluiRuntime.ts +66 -0
- package/public/docs/README.md +0 -9
- package/public/docs/_media/logo.png +0 -0
- package/public/docs/_sidebar.md +0 -6
- package/public/docs/contributing.md +0 -64
- package/public/docs/favicon.ico +0 -0
- package/public/docs/index.html +0 -29
- package/public/docs/krl/README.md +0 -3
- package/public/docs/krl/_sidebar.md +0 -10
- package/public/docs/krl/discovery.md +0 -144
- package/public/docs/krl/modules/ctx.md +0 -151
- package/public/docs/krl/modules/event.md +0 -70
- package/public/docs/krl/modules/http.md +0 -42
- package/public/docs/krl/modules/math.md +0 -5
- package/public/docs/krl/modules/schedule.md +0 -5
- package/public/docs/krl/modules.md +0 -11
- package/public/docs/krl/rulesets.md +0 -81
- package/public/docs/krl/stdlib.md +0 -3
- package/public/docs/llms-full.txt +0 -479
- package/public/docs/llms.txt +0 -37
- package/public/docs/openapi.yaml +0 -78
- package/public/docs/pico.md +0 -5
- package/public/docs/rulesets/README.md +0 -25
- package/public/docs/rulesets/io.picolabs.oauth.md +0 -71
- package/public/docs/rulesets/io.picolabs.pds.md +0 -327
- package/public/docs/rulesets/io.picolabs.pico-engine-ui.md +0 -65
- package/public/docs/rulesets/io.picolabs.portable_subtree.md +0 -94
- package/public/docs/rulesets/io.picolabs.subscription.md +0 -398
- package/public/docs/rulesets/io.picolabs.wrangler.md +0 -471
- /package/{public → mcp}/docs/pico-overview.md +0 -0
|
@@ -1,471 +0,0 @@
|
|
|
1
|
-
# io.picolabs.wrangler
|
|
2
|
-
|
|
3
|
-
Wrangler Core Module,
|
|
4
|
-
use example: "use module io.picolabs.wrangler alias wrangler".
|
|
5
|
-
This Ruleset/Module provides a developer interface to the pico (persistent compute object).
|
|
6
|
-
When a pico is created this ruleset will be installed to provide essential services.
|
|
7
|
-
|
|
8
|
-
*Version draft. Generated from the ruleset's annotations by `krl-schema --format markdown`; edit the `/** */` comments in the source, not this page. Only annotated rules and shared functions appear.*
|
|
9
|
-
|
|
10
|
-
**Operations:** [wrangler:install_ruleset_request (install_ruleset_relatively)](#wranglerinstall_ruleset_request-install_ruleset_relatively) · [wrangler:install_ruleset_request (install_ruleset_absolutely)](#wranglerinstall_ruleset_request-install_ruleset_absolutely) · [wrangler:uninstall_ruleset_request](#wrangleruninstall_ruleset_request) · [wrangler:rulesets_need_flushing](#wranglerrulesets_need_flushing) · [wrangler:new_channel_request](#wranglernew_channel_request) · [wrangler:channel_deletion_request](#wranglerchannel_deletion_request) · [wrangler:channel_update_request](#wranglerchannel_update_request) · [wrangler:new_child_request](#wranglernew_child_request) · [wrangler:name_changed](#wranglername_changed) · [wrangler:child_deletion_request](#wranglerchild_deletion_request) · [wrangler:set_public_intro](#wranglerset_public_intro)
|
|
11
|
-
**Queries:** [picoQuery](#picoqueryeci-mod-func-params-_host-_path-_root_url--any) · [channels](#channelstags--array) · [discoveryChannel](#discoverychannel--map) · [rulesetConfig](#rulesetconfigrid--map) · [rulesetMeta](#rulesetmetarid--map) · [installedRIDs](#installedrids--array) · [picoSchema](#picoschema--map) · [rulesetSchema](#rulesetschemarid--map) · [channelSchema](#channelschemaeci--map) · [children](#children--array) · [parent_eci](#parent_eci--string) · [name](#name--string) · [myself](#myself--map) · [myDid](#mydid--string) · [publicIntro](#publicintro--boolean) · [id](#id--string)
|
|
12
|
-
|
|
13
|
-
## Operations
|
|
14
|
-
|
|
15
|
-
Events you can send to a pico with this ruleset installed. Whether an operation acts, and what it emits, depends on its condition and the pico's state when the event arrives.
|
|
16
|
-
|
|
17
|
-
### `wrangler:install_ruleset_request` (install_ruleset_relatively)
|
|
18
|
-
|
|
19
|
-
Install a ruleset that lives next to another one: the URL is built by replacing the last part of absoluteURL with <rid>.krl (pass meta:rulesetURI to install a sibling of the calling ruleset). Continues as an install by url.
|
|
20
|
-
|
|
21
|
-
**Send:** `wrangler:install_ruleset_request` with `absoluteURL` matches `re#(.+)#` and `rid` matches `re#(.+)#`
|
|
22
|
-
**Rule:** `install_ruleset_relatively`
|
|
23
|
-
|
|
24
|
-
| Attribute | Type | Required | Description |
|
|
25
|
-
|-----------|------|----------|-------------|
|
|
26
|
-
| `absoluteURL` | String | yes | URL of a ruleset in the same directory |
|
|
27
|
-
| `rid` | String | yes | id of the ruleset to install |
|
|
28
|
-
| `config` | Map | no | configuration for the installed ruleset |
|
|
29
|
-
|
|
30
|
-
**Examples:**
|
|
31
|
-
|
|
32
|
-
- **sibling of this ruleset:** `{"absoluteURL":"<meta:rulesetURI>","rid":"<rid>"}`
|
|
33
|
-
|
|
34
|
-
**Acts when:** always, once selected
|
|
35
|
-
|
|
36
|
-
**May emit** (possible, not guaranteed):
|
|
37
|
-
|
|
38
|
-
- raises `wrangler:install_ruleset_request` on this pico — when it acts
|
|
39
|
-
|
|
40
|
-
<details><summary>Select expression</summary>
|
|
41
|
-
|
|
42
|
-
```krl
|
|
43
|
-
select when wrangler install_ruleset_request
|
|
44
|
-
absoluteURL re#(.+)#
|
|
45
|
-
rid re#(.+)#
|
|
46
|
-
setting(absoluteURL, rid)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
</details>
|
|
50
|
-
|
|
51
|
-
### `wrangler:install_ruleset_request` (install_ruleset_absolutely)
|
|
52
|
-
|
|
53
|
-
Install (or reinstall) a ruleset from a URL on this pico. The URL is fetched and compiled first, so this also picks up a new version. Raises wrangler:ruleset_installed with the installed rid.
|
|
54
|
-
|
|
55
|
-
**Send:** `wrangler:install_ruleset_request` with `url` matches `re#(.+)#`
|
|
56
|
-
**Rule:** `install_ruleset_absolutely`
|
|
57
|
-
|
|
58
|
-
| Attribute | Type | Required | Description |
|
|
59
|
-
|-----------|------|----------|-------------|
|
|
60
|
-
| `url` | String | yes | URL of the .krl file |
|
|
61
|
-
| `config` | Map | no | configuration for the installed ruleset |
|
|
62
|
-
|
|
63
|
-
**Examples:**
|
|
64
|
-
|
|
65
|
-
- **from a URL:** `{"url":"https://example.com/krl/<rid>.krl"}`
|
|
66
|
-
- **with config:** `{"url":"https://example.com/krl/<rid>.krl","config":{"<key>":"<value>"}}`
|
|
67
|
-
|
|
68
|
-
**Acts when:** always, once selected
|
|
69
|
-
|
|
70
|
-
**May emit** (possible, not guaranteed):
|
|
71
|
-
|
|
72
|
-
- raises `wrangler:ruleset_installed` on this pico — when it acts
|
|
73
|
-
|
|
74
|
-
<details><summary>Select expression</summary>
|
|
75
|
-
|
|
76
|
-
```krl
|
|
77
|
-
select when wrangler install_ruleset_request url re#(.+)# setting(url)
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
</details>
|
|
81
|
-
|
|
82
|
-
### `wrangler:uninstall_ruleset_request`
|
|
83
|
-
|
|
84
|
-
Uninstall a ruleset from this pico. Refused if another installed ruleset uses it as a module. Raises wrangler:ruleset_uninstalled.
|
|
85
|
-
|
|
86
|
-
**Send:** `wrangler:uninstall_ruleset_request` with `rid` matches `re#(.+)#`
|
|
87
|
-
**Rule:** `uninstall_one_ruleset`
|
|
88
|
-
|
|
89
|
-
| Attribute | Type | Required | Description |
|
|
90
|
-
|-----------|------|----------|-------------|
|
|
91
|
-
| `rid` | String | yes | ruleset id |
|
|
92
|
-
|
|
93
|
-
**Examples:**
|
|
94
|
-
|
|
95
|
-
- **by rid:** `{"rid":"<rid>"}`
|
|
96
|
-
|
|
97
|
-
**Acts when:** always, once selected
|
|
98
|
-
|
|
99
|
-
**May emit** (possible, not guaranteed):
|
|
100
|
-
|
|
101
|
-
- raises `wrangler:ruleset_uninstalled` on this pico — when it acts
|
|
102
|
-
|
|
103
|
-
<details><summary>Select expression</summary>
|
|
104
|
-
|
|
105
|
-
```krl
|
|
106
|
-
select when wrangler uninstall_ruleset_request rid re#(.+)# setting(rid)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
</details>
|
|
110
|
-
|
|
111
|
-
### `wrangler:rulesets_need_flushing`
|
|
112
|
-
|
|
113
|
-
Re-fetch and recompile every ruleset installed on this pico, so each picks up its latest source. Raises wrangler:rulesets_flushed when done.
|
|
114
|
-
|
|
115
|
-
**Send:** `wrangler:rulesets_need_flushing`
|
|
116
|
-
**Rule:** `flush_all_rulesets`
|
|
117
|
-
|
|
118
|
-
No attributes.
|
|
119
|
-
|
|
120
|
-
**Acts when:** always, once selected
|
|
121
|
-
|
|
122
|
-
**May emit** (possible, not guaranteed):
|
|
123
|
-
|
|
124
|
-
- raises `wrangler:rulesets_flushed` on this pico — when it acts, after the last iteration
|
|
125
|
-
|
|
126
|
-
<details><summary>Select expression</summary>
|
|
127
|
-
|
|
128
|
-
```krl
|
|
129
|
-
select when wrangler rulesets_need_flushing
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
</details>
|
|
133
|
-
|
|
134
|
-
### `wrangler:new_channel_request`
|
|
135
|
-
|
|
136
|
-
Create a channel on this pico. Raises wrangler:channel_created with the new channel (including its id).
|
|
137
|
-
|
|
138
|
-
**Send:** `wrangler:new_channel_request`
|
|
139
|
-
**Rule:** `createChannel`
|
|
140
|
-
|
|
141
|
-
| Attribute | Type | Required | Description |
|
|
142
|
-
|-----------|------|----------|-------------|
|
|
143
|
-
| `tags` | Array | yes | tags for the channel, e.g. ["myapp", "webhook"] |
|
|
144
|
-
| `eventPolicy` | Map | yes | { allow: [ { domain, name } ], deny: [ … ] } |
|
|
145
|
-
| `queryPolicy` | Map | yes | { allow: [ { rid, name } ], deny: [ … ] } |
|
|
146
|
-
|
|
147
|
-
**Examples:**
|
|
148
|
-
|
|
149
|
-
- **webhook:** `{"tags":["<app>","webhook"],"eventPolicy":{"allow":[{"domain":"<app>","name":"*"}],"deny":[]},"queryPolicy":{"allow":[],"deny":[]}}`
|
|
150
|
-
|
|
151
|
-
**Acts when:** `tags && eventPolicy && queryPolicy`
|
|
152
|
-
|
|
153
|
-
**May emit** (possible, not guaranteed):
|
|
154
|
-
|
|
155
|
-
- raises `wrangler:channel_created` on this pico — when it acts
|
|
156
|
-
|
|
157
|
-
<details><summary>Select expression</summary>
|
|
158
|
-
|
|
159
|
-
```krl
|
|
160
|
-
select when wrangler new_channel_request
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
</details>
|
|
164
|
-
|
|
165
|
-
### `wrangler:channel_deletion_request`
|
|
166
|
-
|
|
167
|
-
Delete a channel on this pico. Raises wrangler:channel_deleted.
|
|
168
|
-
|
|
169
|
-
**Send:** `wrangler:channel_deletion_request` with `eci` matches `re#^(.+)$#`
|
|
170
|
-
**Rule:** `deleteChannel`
|
|
171
|
-
|
|
172
|
-
| Attribute | Type | Required | Description |
|
|
173
|
-
|-----------|------|----------|-------------|
|
|
174
|
-
| `eci` | String | yes | the channel to delete |
|
|
175
|
-
|
|
176
|
-
**Acts when:** always, once selected
|
|
177
|
-
|
|
178
|
-
**May emit** (possible, not guaranteed):
|
|
179
|
-
|
|
180
|
-
- raises `wrangler:channel_deleted` on this pico — when it acts
|
|
181
|
-
|
|
182
|
-
<details><summary>Select expression</summary>
|
|
183
|
-
|
|
184
|
-
```krl
|
|
185
|
-
select when wrangler channel_deletion_request eci re#^(.+)$# setting(eci)
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
</details>
|
|
189
|
-
|
|
190
|
-
### `wrangler:channel_update_request`
|
|
191
|
-
|
|
192
|
-
Replace a channel's tags and policies. Raises wrangler:channel_updated with the updated channel.
|
|
193
|
-
|
|
194
|
-
**Send:** `wrangler:channel_update_request`
|
|
195
|
-
**Rule:** `updateChannel`
|
|
196
|
-
|
|
197
|
-
| Attribute | Type | Required | Description |
|
|
198
|
-
|-----------|------|----------|-------------|
|
|
199
|
-
| `eci` | String | yes | the channel to update |
|
|
200
|
-
| `tags` | Array | yes | new tags |
|
|
201
|
-
| `eventPolicy` | Map | yes | new event policy |
|
|
202
|
-
| `queryPolicy` | Map | yes | new query policy |
|
|
203
|
-
|
|
204
|
-
**Acts when:** `eci && tags && eventPolicy && queryPolicy`
|
|
205
|
-
|
|
206
|
-
**May emit** (possible, not guaranteed):
|
|
207
|
-
|
|
208
|
-
- raises `wrangler:channel_updated` on this pico — when it acts
|
|
209
|
-
|
|
210
|
-
<details><summary>Select expression</summary>
|
|
211
|
-
|
|
212
|
-
```krl
|
|
213
|
-
select when wrangler channel_update_request
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
</details>
|
|
217
|
-
|
|
218
|
-
### `wrangler:new_child_request`
|
|
219
|
-
|
|
220
|
-
Create a child pico with wrangler, PDS, and relationships installed. Raises wrangler:new_child_created here with the child's family-channel eci and uiEci. Other attrs are passed to the child, and come back to this pico in wrangler:child_initialized once the child is set up (Manifold uses this, e.g. event_name, to tell its creations apart).
|
|
221
|
-
|
|
222
|
-
**Send:** `wrangler:new_child_request` with `name` matches `re#.+#` and `backgroundColor` (if given) matches `re#.*#`
|
|
223
|
-
**Rule:** `createChild`
|
|
224
|
-
|
|
225
|
-
| Attribute | Type | Required | Description |
|
|
226
|
-
|-----------|------|----------|-------------|
|
|
227
|
-
| `name` | String | yes | name for the child |
|
|
228
|
-
| `backgroundColor` | String | no | developer UI color, e.g. #87cefa |
|
|
229
|
-
| `policyCeiling` | Map | no | max channel policy for the child pico; must not exceed parent ceiling |
|
|
230
|
-
|
|
231
|
-
**Examples:**
|
|
232
|
-
|
|
233
|
-
- **named:** `{"name":"<name>"}`
|
|
234
|
-
- **with color:** `{"name":"<name>","backgroundColor":"#ffb347"}`
|
|
235
|
-
|
|
236
|
-
**Acts when:** always, once selected
|
|
237
|
-
|
|
238
|
-
**May emit** (possible, not guaranteed):
|
|
239
|
-
|
|
240
|
-
- raises `wrangler:new_child_created` on this pico — when it acts
|
|
241
|
-
|
|
242
|
-
<details><summary>Select expression</summary>
|
|
243
|
-
|
|
244
|
-
```krl
|
|
245
|
-
select when wrangler new_child_request
|
|
246
|
-
name re#.+#
|
|
247
|
-
backgroundColor re#.*#
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
</details>
|
|
251
|
-
|
|
252
|
-
### `wrangler:name_changed`
|
|
253
|
-
|
|
254
|
-
Change this pico's wrangler name (what name() and myself() return).
|
|
255
|
-
|
|
256
|
-
**Send:** `wrangler:name_changed` with `name` matches `re#(.+)#`
|
|
257
|
-
**Rule:** `take_note_of_name_change`
|
|
258
|
-
|
|
259
|
-
| Attribute | Type | Required | Description |
|
|
260
|
-
|-----------|------|----------|-------------|
|
|
261
|
-
| `name` | String | yes | new name |
|
|
262
|
-
|
|
263
|
-
**Acts when:** always, once selected
|
|
264
|
-
|
|
265
|
-
<details><summary>Select expression</summary>
|
|
266
|
-
|
|
267
|
-
```krl
|
|
268
|
-
select when wrangler name_changed name re#(.+)# setting(name)
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
</details>
|
|
272
|
-
|
|
273
|
-
### `wrangler:child_deletion_request`
|
|
274
|
-
|
|
275
|
-
Delete a child pico and all of its descendants. Raises wrangler:child_deleted.
|
|
276
|
-
|
|
277
|
-
**Send:** `wrangler:child_deletion_request` with `eci` matches `re#^(.+)$#`
|
|
278
|
-
**Rule:** `deleteOneChild`
|
|
279
|
-
|
|
280
|
-
| Attribute | Type | Required | Description |
|
|
281
|
-
|-----------|------|----------|-------------|
|
|
282
|
-
| `eci` | String | yes | the child's family-channel ECI (from children()) |
|
|
283
|
-
|
|
284
|
-
**Examples:**
|
|
285
|
-
|
|
286
|
-
- **by eci:** `{"eci":"<child family eci>"}`
|
|
287
|
-
|
|
288
|
-
**Acts when:** always, once selected
|
|
289
|
-
|
|
290
|
-
**May emit** (possible, not guaranteed):
|
|
291
|
-
|
|
292
|
-
- raises `wrangler:child_deleted` on this pico — when it acts
|
|
293
|
-
|
|
294
|
-
<details><summary>Select expression</summary>
|
|
295
|
-
|
|
296
|
-
```krl
|
|
297
|
-
select when wrangler child_deletion_request eci re#^(.+)$# setting(eci)
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
</details>
|
|
301
|
-
|
|
302
|
-
### `wrangler:set_public_intro`
|
|
303
|
-
|
|
304
|
-
Turn on or off accepting unsolicited introduction messages (Layer 2 relationship requests) on this pico's did:webvh. See publicIntro().
|
|
305
|
-
|
|
306
|
-
**Send:** `wrangler:set_public_intro`
|
|
307
|
-
**Rule:** `wrangler_set_public_intro`
|
|
308
|
-
|
|
309
|
-
| Attribute | Type | Required | Description |
|
|
310
|
-
|-----------|------|----------|-------------|
|
|
311
|
-
| `enabled` | Boolean | yes | true to accept introductions |
|
|
312
|
-
|
|
313
|
-
**Examples:**
|
|
314
|
-
|
|
315
|
-
- **accept:** `{"enabled":true}`
|
|
316
|
-
- **refuse:** `{"enabled":false}`
|
|
317
|
-
|
|
318
|
-
**Acts when:** always, once selected
|
|
319
|
-
|
|
320
|
-
**May emit** (possible, not guaranteed):
|
|
321
|
-
|
|
322
|
-
<details><summary>Select expression</summary>
|
|
323
|
-
|
|
324
|
-
```krl
|
|
325
|
-
select when wrangler set_public_intro
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
</details>
|
|
329
|
-
|
|
330
|
-
## Queries
|
|
331
|
-
|
|
332
|
-
### `picoQuery(eci, mod, func, params, _host, _path, _root_url)` → Any
|
|
333
|
-
|
|
334
|
-
Query a shared function on another pico. Picos on this engine are queried directly (which also works over parent/child family channels); a DID is queried over DIDComm; picos on another engine (_host) over HTTP. Querying one of this pico's own channels is refused. On failure, returns a map with error, httpStatus, and picoQueryError.
|
|
335
|
-
|
|
336
|
-
| Parameter | Type | Required | Default | Description |
|
|
337
|
-
|-----------|------|----------|---------|-------------|
|
|
338
|
-
| `eci` | String | yes | | channel on the other pico, or its DID |
|
|
339
|
-
| `mod` | String | yes | | ruleset id on the other pico |
|
|
340
|
-
| `func` | String | yes | | shared function to call |
|
|
341
|
-
| `params` | Map | yes | | arguments for the function |
|
|
342
|
-
| `_host` | String | yes | | the other pico's engine URL, if on a different engine |
|
|
343
|
-
| `_path` | String | yes | | path prefix on that engine (default /sky/cloud/) |
|
|
344
|
-
| `_root_url` | String | yes | | full query URL prefix, instead of _host and _path |
|
|
345
|
-
|
|
346
|
-
**Examples:**
|
|
347
|
-
|
|
348
|
-
- **child's name:** `{"eci":"<child family eci>","mod":"io.picolabs.wrangler","func":"name"}`
|
|
349
|
-
- **another engine:** `{"eci":"<eci>","mod":"<rid>","func":"<function>","params":{},"_host":"https://other.example"}`
|
|
350
|
-
|
|
351
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/picoQuery?eci=…&mod=…&func=…¶ms=…&_host=…&_path=…&_root_url=…`, or `<alias>:picoQuery(eci, mod, func, params, _host, _path, _root_url)` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
352
|
-
|
|
353
|
-
### `channels(tags)` → Array
|
|
354
|
-
|
|
355
|
-
This pico's channels, with their tags and event and query policies. With tags, only channels whose tags are exactly those (order and case don't matter).
|
|
356
|
-
|
|
357
|
-
| Parameter | Type | Required | Default | Description |
|
|
358
|
-
|-----------|------|----------|---------|-------------|
|
|
359
|
-
| `tags` | String | yes | | comma-separated tags, or an array of tags |
|
|
360
|
-
|
|
361
|
-
**Examples:**
|
|
362
|
-
|
|
363
|
-
- **all:** `{}`
|
|
364
|
-
- **by tags:** `{"tags":"discovery"}`
|
|
365
|
-
|
|
366
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/channels?tags=…`, or `<alias>:channels(tags)` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
367
|
-
|
|
368
|
-
### `discoveryChannel()` → Map
|
|
369
|
-
|
|
370
|
-
This pico's discovery channel, which every pico has: integrators query it to learn what the pico can do.
|
|
371
|
-
|
|
372
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/discoveryChannel`, or `<alias>:discoveryChannel()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
373
|
-
|
|
374
|
-
### `rulesetConfig(rid)` → Map
|
|
375
|
-
|
|
376
|
-
The configuration an installed ruleset was installed with, or null if it isn't installed.
|
|
377
|
-
|
|
378
|
-
| Parameter | Type | Required | Default | Description |
|
|
379
|
-
|-----------|------|----------|---------|-------------|
|
|
380
|
-
| `rid` | String | yes | | ruleset id |
|
|
381
|
-
|
|
382
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/rulesetConfig?rid=…`, or `<alias>:rulesetConfig(rid)` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
383
|
-
|
|
384
|
-
### `rulesetMeta(rid)` → Map
|
|
385
|
-
|
|
386
|
-
The meta block of an installed ruleset (name, description, shares, provides, …), or null if it isn't installed.
|
|
387
|
-
|
|
388
|
-
| Parameter | Type | Required | Default | Description |
|
|
389
|
-
|-----------|------|----------|---------|-------------|
|
|
390
|
-
| `rid` | String | yes | | ruleset id |
|
|
391
|
-
|
|
392
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/rulesetMeta?rid=…`, or `<alias>:rulesetMeta(rid)` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
393
|
-
|
|
394
|
-
### `installedRIDs()` → Array
|
|
395
|
-
|
|
396
|
-
Ids of the rulesets installed on this pico.
|
|
397
|
-
|
|
398
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/installedRIDs`, or `<alias>:installedRIDs()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
399
|
-
|
|
400
|
-
### `picoSchema()` → Map
|
|
401
|
-
|
|
402
|
-
Everything discoverable on this pico: the annotated operations and queries of all installed rulesets, merged and grouped by event, with any attr type conflicts between rulesets. For discovery and generated tools (MCP).
|
|
403
|
-
|
|
404
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/picoSchema`, or `<alias>:picoSchema()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
405
|
-
|
|
406
|
-
### `rulesetSchema(rid?)` → Map
|
|
407
|
-
|
|
408
|
-
The discovery schema of one installed ruleset: its annotated operations (with their select, condition, prechecks, emits, and the other rules on the same event) and queries. What the Testing tab shows. Null if not installed.
|
|
409
|
-
|
|
410
|
-
| Parameter | Type | Required | Default | Description |
|
|
411
|
-
|-----------|------|----------|---------|-------------|
|
|
412
|
-
| `rid` | String | no | | ruleset id |
|
|
413
|
-
|
|
414
|
-
**Examples:**
|
|
415
|
-
|
|
416
|
-
- **one ruleset:** `{"rid":"io.picolabs.pds"}`
|
|
417
|
-
- **all installed:** `{}`
|
|
418
|
-
|
|
419
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/rulesetSchema?rid=…`, or `<alias>:rulesetSchema(rid?)` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
420
|
-
|
|
421
|
-
### `channelSchema(eci)` → Map
|
|
422
|
-
|
|
423
|
-
The part of picoSchema() a channel allows: what a caller holding this ECI can discover and use. Use the caller's own ECI for "what can I do here?", or any channel to check what it would expose.
|
|
424
|
-
|
|
425
|
-
| Parameter | Type | Required | Default | Description |
|
|
426
|
-
|-----------|------|----------|---------|-------------|
|
|
427
|
-
| `eci` | String | yes | | channel on this pico |
|
|
428
|
-
|
|
429
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/channelSchema?eci=…`, or `<alias>:channelSchema(eci)` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
430
|
-
|
|
431
|
-
### `children()` → Array
|
|
432
|
-
|
|
433
|
-
This pico's children, each with its family-channel ECI, name, and parent ECI.
|
|
434
|
-
|
|
435
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/children`, or `<alias>:children()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
436
|
-
|
|
437
|
-
### `parent_eci()` → String
|
|
438
|
-
|
|
439
|
-
The family-channel ECI of this pico's parent; null for a root pico.
|
|
440
|
-
|
|
441
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/parent_eci`, or `<alias>:parent_eci()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
442
|
-
|
|
443
|
-
### `name()` → String
|
|
444
|
-
|
|
445
|
-
This pico's wrangler name.
|
|
446
|
-
|
|
447
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/name`, or `<alias>:name()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
448
|
-
|
|
449
|
-
### `myself()` → Map
|
|
450
|
-
|
|
451
|
-
This pico's wrangler name, id, and the ECI it was created with.
|
|
452
|
-
|
|
453
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/myself`, or `<alias>:myself()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
454
|
-
|
|
455
|
-
### `myDid()` → String
|
|
456
|
-
|
|
457
|
-
This pico's portable did:webvh, the identity other picos and meshes use for Layer 2 relationships. It survives moving the pico to another engine.
|
|
458
|
-
|
|
459
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/myDid`, or `<alias>:myDid()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
460
|
-
|
|
461
|
-
### `publicIntro()` → Boolean
|
|
462
|
-
|
|
463
|
-
True when this pico accepts unsolicited introduction messages (Layer 2 relationship requests) on its did:webvh. Change it with wrangler:set_public_intro.
|
|
464
|
-
|
|
465
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/publicIntro`, or `<alias>:publicIntro()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
466
|
-
|
|
467
|
-
### `id()` → String
|
|
468
|
-
|
|
469
|
-
This pico's id.
|
|
470
|
-
|
|
471
|
-
**Call:** `GET /sky/query/<eci>/io.picolabs.wrangler/id`, or `<alias>:id()` from KRL with `use module io.picolabs.wrangler alias <alias>`
|
|
File without changes
|