wiki-plugin-pod 1.0.0 → 1.2.2
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 +61 -36
- package/api/handlers.js +2 -2
- package/api/openapi.json +6 -18
- package/client/pod.js +9 -8
- package/client/pod.js.map +4 -4
- package/package.json +29 -4
- package/pages/about-pod-plugin +103 -5
- package/src/client/pod.js +132 -286
- package/src/pod/commands.js +49 -102
- package/src/pod/kinship.js +39 -0
- package/src/pod/roll.js +35 -66
- package/src/pod/vocabulary.js +20 -0
- package/server/package.json +0 -3
- package/server/server.js +0 -47
package/pages/about-pod-plugin
CHANGED
|
@@ -14,22 +14,37 @@
|
|
|
14
14
|
{
|
|
15
15
|
"type": "markdown",
|
|
16
16
|
"id": "625ddc4e896c6e27",
|
|
17
|
-
"text": "Write one **command** per line (UPPERCASE, an optional trailing colon \u2014 see the [[Fedwiki DSL Skill]] convention):\n\n- `POD` \u2014 `PARENT` and `SISTERS` together (shorthand)\n- `SISTERS` \u2014 sibling sites sharing the parent domain\n- `PARENT` \u2014 the parent-domain site itself\n- `CHILDREN` \u2014 direct sub-domains of this site\n- `DESCENDANTS` \u2014 all sub-domains, any depth\n- `FARM` \u2014 every wiki in the farm\n- `NEIGHBOURHOOD` \u2014 the sites currently in your neighborhood\n- `SNAPSHOT` \u2014 the current neighborhood *(same as NEIGHBOURHOOD)*\n\nAnd
|
|
17
|
+
"text": "Write one **command** per line (UPPERCASE, an optional trailing colon \u2014 see the [[Fedwiki DSL Skill]] convention):\n\n- `POD` \u2014 `PARENT` and `SISTERS` together (shorthand)\n- `SISTERS` \u2014 sibling sites sharing the parent domain\n- `PARENT` \u2014 the parent-domain site itself\n- `CHILDREN` \u2014 direct sub-domains of this site\n- `DESCENDANTS` \u2014 all sub-domains, any depth\n- `FARM` \u2014 every wiki in the farm\n- `NEIGHBOURHOOD` \u2014 the sites currently in your neighborhood\n- `SNAPSHOT` \u2014 the current neighborhood *(same as NEIGHBOURHOOD)*\n\nAnd one drawing choice:\n\n- `TITLE yes|no` \u2014 whether each group shows its heading (default yes)"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "markdown",
|
|
21
|
+
"id": "4161c30927bd",
|
|
22
|
+
"text": "### Mistyped commands\n\nA misspelled command is not silently swallowed. `CHIKDREN` names nothing, so the item would otherwise fall back to `SISTERS` and draw a pod nobody asked for. Instead the panel says *CHIKDREN \u2014 did you mean CHILDREN?* above the gather, in every display mode. A word that announces itself as a command \u2014 uppercase, the [[Fedwiki DSL Skill]] convention \u2014 but names none is always reported, even when no real command is close enough to guess. Ordinary lowercase prose stays data."
|
|
18
23
|
},
|
|
19
24
|
{
|
|
20
25
|
"type": "markdown",
|
|
21
26
|
"id": "7c1a4e0b9f2d5a86",
|
|
22
|
-
"text": "###
|
|
27
|
+
"text": "### How it draws\n\nEvery pod is a **roster**: a heading, then the members' flags. Pod does not draw it \u2014 the [[Roster Plugin]] does, on every wiki there is, so pod builds the roster text and hands it over. The text it builds is exactly what the \u2744 icon saves as a page, so the drawn thing and the saved thing are one string.\n\nEach heading names the site the pod is relative to \u2014 *Sisters of fedwiki.club*, *The rest of the farm*, *Your neighbourhood*. `TITLE no` draws the flags with no headings at all."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "markdown",
|
|
31
|
+
"id": "775aabdf4879ebab",
|
|
32
|
+
"text": "### Retired commands\n\n`ROSTER`, `TWIN` and `WATCH` stay in the table rather than being deleted, because a word removed from the table is a word the parser reports as a mistake \u2014 and pages still say them. They parse, gather nothing, and say what became of them.\n\n`ROSTER` is the default now. `TWIN` and `WATCH` moved to the [[Twin Plugin]], which asks who holds *this page* rather than who is kin to *this site*."
|
|
23
33
|
},
|
|
24
34
|
{
|
|
25
35
|
"type": "markdown",
|
|
26
36
|
"id": "cedff82dadcf82fd",
|
|
27
37
|
"text": "Each gathered site is registered as a neighbor, so its pages join your search and lineage. The page still reads normally without the plugin."
|
|
28
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"type": "markdown",
|
|
41
|
+
"id": "9bebcef374d5",
|
|
42
|
+
"text": "### Where a pod comes from\n\nThis plugin ships **no server**. It declares a specification and a module of plain functions, and the [[Farm Plugin]] mounts them \u2014 so the item reads its disk-derived pods from `/system/api/pod/roll.json`, the same address an agent uses. Kinship is arithmetic on names, and the only thing needing the disk is what sites exist: one directory read, no page counts.\n\n`NEIGHBOURHOOD` and `SNAPSHOT` ask nothing at all \u2014 they read the neighbourhood the browser has already assembled. Page counts and freshness come from each member's own sitemap.\n\nA wiki without the Farm Plugin says so in the panel instead of failing quietly; the requirement is declared in `fedwiki.requires`."
|
|
43
|
+
},
|
|
29
44
|
{
|
|
30
45
|
"type": "markdown",
|
|
31
46
|
"id": "c41e9b70a5d8362f",
|
|
32
|
-
"text": "# Which Commands Cross\n\nA command language is a superset of an interface, never a mirror of one. Of the thirteen words
|
|
47
|
+
"text": "# Which Commands Cross\n\nA command language is a superset of an interface, never a mirror of one. Of the thirteen words in the table, five become a value of the `kinds` parameter and one is shorthand for two of those; the rest never leave the browser \u2014 `TITLE` because it is a drawing choice the farm has no opinion about, `NEIGHBOURHOOD` and `SNAPSHOT` because they read what only a browser holds, and `ROSTER`, `TWIN` and `WATCH` because they are retired and answer nothing. That second group is not a gap to be closed: no server could answer them however this plugin were written.\n\nThe table saying which is which lives in one module, `src/pod/commands.js` \u2014 data with no imports, because the [[Farm Plugin]] loads it server-side. The parser that reads it is `@fortyfoxes/wiki-dsl`, shared with every other plugin whose item text is a small language."
|
|
33
48
|
},
|
|
34
49
|
{
|
|
35
50
|
"type": "markdown",
|
|
@@ -39,7 +54,7 @@
|
|
|
39
54
|
{
|
|
40
55
|
"type": "markdown",
|
|
41
56
|
"id": "19d5c8a03e6b7412",
|
|
42
|
-
"text": "# See\n\n[[Pod API]] \u00b7 [[Farm API]] \u00b7 [[About Farm Plugin]] \u00b7 [[Fedwiki DSL Skill]]"
|
|
57
|
+
"text": "# See\n\n[[Twin Plugin]] \u00b7 [[Roster Plugin]] \u00b7 [[Pod API]] \u00b7 [[Farm API]] \u00b7 [[About Farm Plugin]] \u00b7 [[Fedwiki DSL Skill]]"
|
|
43
58
|
}
|
|
44
59
|
],
|
|
45
60
|
"journal": [
|
|
@@ -151,7 +166,90 @@
|
|
|
151
166
|
"text": "### ROSTER, TWIN and WATCH \u2014 compact rosters of flags\n\nAll three render like a **roster item**: the members' flags flow inline in the grey box, each linking to that member's copy of the page, the (sub)domain on hover. `ROSTER` shows the whole gather (mirroring a normal roster, with an optional left-aligned title toggled by `TITLE yes|no`); `TWIN`/`WATCH` filter it:\n\n- **`TWIN`** is **existence-only** \u2014 a slug match in the member's sitemap, like the wiki-client *Twins* strip.\n- **`WATCH`** is **lineage-aware** \u2014 it fetches each twin's page JSON and keeps only those whose journal carries a `fork` event (`WATCH \u2286 TWIN`): who is watching your page.\n\nThe `ROSTER` and table views carry a subtle **\u2744 icon** that saves the gather as a roster ghost page titled after the commands (e.g. `PARENT SISTERS Rosters`). No separate `FREEZE` command.\n\n```\nSISTERS\nWATCH\n```"
|
|
152
167
|
},
|
|
153
168
|
"date": 1784400000000
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "add",
|
|
172
|
+
"id": "4161c30927bd",
|
|
173
|
+
"item": {
|
|
174
|
+
"type": "markdown",
|
|
175
|
+
"id": "4161c30927bd",
|
|
176
|
+
"text": "### Mistyped commands\n\nA misspelled command is not silently swallowed. `CHIKDREN` names nothing, so the item would otherwise fall back to `SISTERS` and draw a pod nobody asked for. Instead the panel says *CHIKDREN \u2014 did you mean CHILDREN?* above the gather, in every display mode. A word that announces itself as a command \u2014 uppercase, the [[Fedwiki DSL Skill]] convention \u2014 but names none is always reported, even when no real command is close enough to guess. Ordinary lowercase prose stays data."
|
|
177
|
+
},
|
|
178
|
+
"after": "625ddc4e896c6e27",
|
|
179
|
+
"date": 1757000000000
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"type": "add",
|
|
183
|
+
"id": "9bebcef374d5",
|
|
184
|
+
"item": {
|
|
185
|
+
"type": "markdown",
|
|
186
|
+
"id": "9bebcef374d5",
|
|
187
|
+
"text": "### Where a pod comes from\n\nKinship is arithmetic on names, so the farm is asked only what sites exist \u2014 `GET /plugin/pod/sites` \u2014 and the browser sorts that list into sisters, parent, children, descendants and farm itself. The same module does the sorting for the mounted API operation, so an agent and a reader get one answer from one implementation.\n\n`NEIGHBOURHOOD` and `SNAPSHOT` ask the farm nothing at all: they read the neighbourhood the browser has already assembled. Page counts and freshness come from each member's own sitemap, which the browser holds anyway."
|
|
188
|
+
},
|
|
189
|
+
"after": "cedff82dadcf82fd",
|
|
190
|
+
"date": 1757260000000
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "edit",
|
|
194
|
+
"id": "9bebcef374d5",
|
|
195
|
+
"item": {
|
|
196
|
+
"type": "markdown",
|
|
197
|
+
"id": "9bebcef374d5",
|
|
198
|
+
"text": "### Where a pod comes from\n\nThis plugin ships **no server**. It declares a specification and a module of plain functions, and the [[Farm Plugin]] mounts them \u2014 so the item reads its disk-derived pods from `/system/api/pod/roll.json`, the same address an agent uses. Kinship is arithmetic on names, and the only thing needing the disk is what sites exist: one directory read, no page counts.\n\n`NEIGHBOURHOOD` and `SNAPSHOT` ask nothing at all \u2014 they read the neighbourhood the browser has already assembled. Page counts and freshness come from each member's own sitemap.\n\nA wiki without the Farm Plugin says so in the panel instead of failing quietly; the requirement is declared in `fedwiki.requires`."
|
|
199
|
+
},
|
|
200
|
+
"date": 1757262000000
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"type": "edit",
|
|
204
|
+
"id": "7c1a4e0b9f2d5a86",
|
|
205
|
+
"item": {
|
|
206
|
+
"type": "markdown",
|
|
207
|
+
"id": "7c1a4e0b9f2d5a86",
|
|
208
|
+
"text": "### How it draws\n\nEvery pod is a **roster**: a heading, then the members' flags. Pod does not draw it \u2014 the [[Roster Plugin]] does, on every wiki there is, so pod builds the roster text and hands it over. The text it builds is exactly what the \u2744 icon saves as a page, so the drawn thing and the saved thing are one string.\n\nEach heading names the site the pod is relative to \u2014 *Sisters of fedwiki.club*, *The rest of the farm*, *Your neighbourhood*. `TITLE no` draws the flags with no headings at all."
|
|
209
|
+
},
|
|
210
|
+
"date": 1788799155315
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "add",
|
|
214
|
+
"id": "775aabdf4879ebab",
|
|
215
|
+
"item": {
|
|
216
|
+
"type": "markdown",
|
|
217
|
+
"id": "775aabdf4879ebab",
|
|
218
|
+
"text": "### Retired commands\n\n`ROSTER`, `TWIN` and `WATCH` stay in the table rather than being deleted, because a word removed from the table is a word the parser reports as a mistake \u2014 and pages still say them. They parse, gather nothing, and say what became of them.\n\n`ROSTER` is the default now. `TWIN` and `WATCH` moved to the [[Twin Plugin]], which asks who holds *this page* rather than who is kin to *this site*."
|
|
219
|
+
},
|
|
220
|
+
"after": "7c1a4e0b9f2d5a86",
|
|
221
|
+
"date": 1788799155315
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "edit",
|
|
225
|
+
"id": "19d5c8a03e6b7412",
|
|
226
|
+
"item": {
|
|
227
|
+
"type": "markdown",
|
|
228
|
+
"id": "19d5c8a03e6b7412",
|
|
229
|
+
"text": "# See\n\n[[Twin Plugin]] \u00b7 [[Roster Plugin]] \u00b7 [[Pod API]] \u00b7 [[Farm API]] \u00b7 [[About Farm Plugin]] \u00b7 [[Fedwiki DSL Skill]]"
|
|
230
|
+
},
|
|
231
|
+
"date": 1788799155315
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"type": "edit",
|
|
235
|
+
"id": "625ddc4e896c6e27",
|
|
236
|
+
"item": {
|
|
237
|
+
"type": "markdown",
|
|
238
|
+
"id": "625ddc4e896c6e27",
|
|
239
|
+
"text": "Write one **command** per line (UPPERCASE, an optional trailing colon \u2014 see the [[Fedwiki DSL Skill]] convention):\n\n- `POD` \u2014 `PARENT` and `SISTERS` together (shorthand)\n- `SISTERS` \u2014 sibling sites sharing the parent domain\n- `PARENT` \u2014 the parent-domain site itself\n- `CHILDREN` \u2014 direct sub-domains of this site\n- `DESCENDANTS` \u2014 all sub-domains, any depth\n- `FARM` \u2014 every wiki in the farm\n- `NEIGHBOURHOOD` \u2014 the sites currently in your neighborhood\n- `SNAPSHOT` \u2014 the current neighborhood *(same as NEIGHBOURHOOD)*\n\nAnd one drawing choice:\n\n- `TITLE yes|no` \u2014 whether each group shows its heading (default yes)"
|
|
240
|
+
},
|
|
241
|
+
"date": 1788801820003
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "edit",
|
|
245
|
+
"id": "c41e9b70a5d8362f",
|
|
246
|
+
"item": {
|
|
247
|
+
"type": "markdown",
|
|
248
|
+
"id": "c41e9b70a5d8362f",
|
|
249
|
+
"text": "# Which Commands Cross\n\nA command language is a superset of an interface, never a mirror of one. Of the thirteen words in the table, five become a value of the `kinds` parameter and one is shorthand for two of those; the rest never leave the browser \u2014 `TITLE` because it is a drawing choice the farm has no opinion about, `NEIGHBOURHOOD` and `SNAPSHOT` because they read what only a browser holds, and `ROSTER`, `TWIN` and `WATCH` because they are retired and answer nothing. That second group is not a gap to be closed: no server could answer them however this plugin were written.\n\nThe table saying which is which lives in one module, `src/pod/commands.js` \u2014 data with no imports, because the [[Farm Plugin]] loads it server-side. The parser that reads it is `@fortyfoxes/wiki-dsl`, shared with every other plugin whose item text is a small language."
|
|
250
|
+
},
|
|
251
|
+
"date": 1788801820003
|
|
154
252
|
}
|
|
155
253
|
],
|
|
156
254
|
"plugin": "pod"
|
|
157
|
-
}
|
|
255
|
+
}
|