wiki-plugin-rcnsd 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +49 -2
- package/client/rcnsd.js +1635 -0
- package/factory.json +1 -0
- package/index.js +2 -0
- package/package.json +28 -4
- package/pages/about-rcnsd-plugin +237 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marc Pierson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# wiki-plugin-rcnsd
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An RCN System Dynamics model on a Federated Wiki page. The item **holds the model**, the Vensim `.mdl` text, the way an RCN Graph item holds its graph, so the page carries it wherever it is forked. The page draws the model as Vensim laid it out, runs it, shows each stock's change and every value at a moment you choose, graphs what you click, and plays the model's walks: step-by-step readings, read aloud if you like, that light the names they talk about, play the run forward and turn knobs.
|
|
4
|
+
|
|
5
|
+
**Edit in RCN System Dynamics ↗** opens the full tool (`tools/rcn-sd.html` in the rcn repository) with this model loaded: knobs for every fixed number, graphs and a table, run settings, and the walk editor. Its **→ Save to wiki item** sends the model, its walks, and the knobs, graphs and run settings back into the item. On a localhost wiki the tool is the working copy on port 8765. Elsewhere it is the shared copy at `https://marc.relocalizecreativity.net/assets/Drag/rcn-sd.html`. An item's `tool` field overrides both.
|
|
6
|
+
|
|
7
|
+
The drawing, the engine and the Vensim reader are the same files the tool uses (`tools/rcn-mdl.js`, `tools/rcn-sd-engine.js`, `tools/rcn-sd-sketch.js`), pasted into `client/rcnsd.js` by `node build.js`. The page loads math.js 12.4.2 from cdnjs.cloudflare.com on first use to run the equations.
|
|
8
|
+
|
|
9
|
+
Install on a wiki server:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm install -g wiki-plugin-rcnsd
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
and restart the wiki. The Factory then offers **RCN System Dynamics**.
|
|
16
|
+
|
|
17
|
+
## The item
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"type": "rcnsd",
|
|
22
|
+
"text": "Caption on the first line\nStocks: …\nFlows: …\nWalks: …",
|
|
23
|
+
"mdl": "{UTF-8}\n\"Ave. Time Spent Doing\"=\n\t2\n…the whole Vensim .mdl file…",
|
|
24
|
+
"fileName": "SODOTOv4.mdl",
|
|
25
|
+
"walks": [ { "name": "…", "steps": [ { "say": "…", "names": ["Certified Teachers"], "run": [0, 100] } ] } ],
|
|
26
|
+
"settings": { "overrides": { "Certified Teacher Abandon Rate": 0.05 }, "final": 150, "dt": 1, "method": "euler", "graph": ["Certified Teachers"], "view": 0 }
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- `mdl` is the Vensim file exactly as saved, sketch and all.
|
|
31
|
+
- `walks` is the tool's walk format (see the tool's manual, "The walk file").
|
|
32
|
+
- `settings` (optional) is how the page shows the model: knob values that differ from the model's own, run length, time step, method, what is graphed, and which view is drawn. The tool writes it on save.
|
|
33
|
+
- `text`: the first line is the caption. The rest names the stocks, flows and walks, for search and for a wiki without this plugin. The plugin rewrites it on every save and keeps your caption.
|
|
34
|
+
- `tool` (optional): where Edit opens the full tool.
|
|
35
|
+
|
|
36
|
+
## Starting one
|
|
37
|
+
|
|
38
|
+
Add **RCN System Dynamics** from the Factory, then drop a Vensim `.mdl` file on the empty item. Or press **Open RCN System Dynamics ↗**, open a model there and press **→ Save to wiki item**. Dropping a walks file (`.sdwalks.json`) on an item that holds a model adds its walks. Only the page's owner can drop.
|
|
39
|
+
|
|
40
|
+
## Building
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
node build.js # paste the shared files in; rewrite pages/about-rcnsd-plugin
|
|
44
|
+
node build.js --check # exit 1 if anything is out of date
|
|
45
|
+
node ../.claude/skills/fedwiki-page/scripts/fedwiki-attribution.js pages/about-rcnsd-plugin
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Run the stamp after a build that rewrote the About page from scratch. A rebuild keeps an existing stamp.
|
|
49
|
+
|
|
50
|
+
Marc Pierson with Claude Opus 5.5, November 2026. Software under the MIT licence (`LICENSE`).
|