fvtt-world-cli 1.1.1 → 1.1.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 +34 -34
- package/dist/index.js +3 -2
- package/docs/README.md +5 -61
- package/docs/architecture.md +53 -209
- package/docs/commands.md +166 -444
- package/docs/compatibility.md +13 -22
- package/docs/getting-started.md +76 -74
- package/docs/images/module-settings.png +0 -0
- package/docs/protocol.md +228 -187
- package/docs/security.md +149 -322
- package/docs/skill.md +24 -33
- package/package.json +14 -2
- package/skills/foundry-world-editor/SKILL.md +8 -0
- package/skills/foundry-world-editor/SKILL.md.sha256 +1 -1
- package/docs/images/icon.svg +0 -16
- package/docs/images/mark.svg +0 -15
package/docs/compatibility.md
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
# Foundry compatibility
|
|
2
2
|
|
|
3
|
-
The bridge supports Foundry VTT v13 and v14.
|
|
4
|
-
|
|
5
|
-
result honestly.
|
|
3
|
+
The bridge supports Foundry VTT v13 and v14. Check your connected version with
|
|
4
|
+
`fvtt-world-cli system info --json`.
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
6
|
+
| Area | v13 | v14 | What to do |
|
|
7
|
+
|---|---|---|---|
|
|
8
|
+
| Measured templates | Available | Removed from core | Use `scene.template` commands on v13. They are unavailable on v14. |
|
|
9
|
+
| Scene thumbnail rendering | Renders the scene | Renders the scene's initial level by default | On v14, expect the initial level in the thumbnail. Check the returned dimensions and image. |
|
|
10
|
+
| Scene thumbnail files | Uses a stable scene-based filename | Uses a filename based on the image content | Use the returned path. On v14, a changed image can leave an older thumbnail file behind. |
|
|
11
|
+
| User permission names | `TEMPLATE_CREATE` | `REGION_CREATE` | Use the permission keys reported by the connected Foundry version when calling `user.permissions.set`. |
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Scene placeable fields and available region behavior types also differ. Read the target document
|
|
14
|
+
before preparing a patch; valid data from one version is not automatically valid on the other.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|---|---|---|---|
|
|
18
|
-
| Measured templates | Available | Removed from core | Template commands are capability-gated |
|
|
19
|
-
| Scene thumbnail rendering | Whole-scene behavior | Initial-level behavior | Reports the dimensions and stored path actually produced |
|
|
20
|
-
| Scene thumbnail files | Stable scene-based filename | Content-derived filenames | Consumers use the returned path; cleanup policy differs |
|
|
21
|
-
| Scene placeable fields | Older document models | Some families add fields | Open-family writes pass through sanitized data; reads expose the documented projection |
|
|
22
|
-
| Region behaviors | Core v13 type set | Additional core types | Executable core behavior types remain guarded; other types are Foundry-validated |
|
|
23
|
-
| Combat and action APIs | Version-specific signatures | Version-specific signatures | The bridge adapts known signatures and refuses unsupported behavior |
|
|
24
|
-
| Scene activation | `Scene#activate` runs for any caller | `Scene#activate` throws for non-GM users | The bridge requires GM authority on both versions |
|
|
25
|
-
| User permission names | `TEMPLATE_CREATE` | Renamed to `REGION_CREATE` | `user.permissions.set` validates keys against the connected version's live permission set rather than a fixed list |
|
|
16
|
+
## When an operation is unavailable
|
|
26
17
|
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
`UNSUPPORTED_OPERATION` means the connected Foundry runtime cannot perform the requested operation.
|
|
19
|
+
Repeating the same request will not fix it. Choose a supported operation or use a compatible runtime.
|
package/docs/getting-started.md
CHANGED
|
@@ -1,113 +1,115 @@
|
|
|
1
1
|
# Getting started
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
and confirming the bridge, with what to expect at each step and what to do when something deviates.
|
|
3
|
+
## Before you begin
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
You need Node.js 20 or newer, Foundry VTT v13 or v14, and a GM account in the target world.
|
|
6
|
+
Install the CLI on the machine where you use your AI agent and GM browser. The Foundry server
|
|
7
|
+
can be hosted elsewhere; the bridge runs in your browser.
|
|
8
|
+
|
|
9
|
+
Install the CLI:
|
|
7
10
|
|
|
8
11
|
```bash
|
|
9
|
-
fvtt-world-cli
|
|
12
|
+
npm install -g fvtt-world-cli
|
|
10
13
|
```
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
sends commands to it, and it routes each command into the GM session. It listens on
|
|
14
|
-
`ws://127.0.0.1:47833` unless overridden and stays running in the foreground for as long as the
|
|
15
|
-
tool is in use.
|
|
15
|
+
In Foundry's *Install Module* dialog, paste this manifest URL:
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
reload.
|
|
17
|
+
```
|
|
18
|
+
https://github.com/DroiD16/fvtt-world-cli/releases/latest/download/module.json
|
|
19
|
+
```
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
Enable *World CLI for Foundry VTT* in the target world. The CLI and module must come from the
|
|
22
|
+
same release. If either was already installed, follow [Updating](#updating) to bring them into sync.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
browser.
|
|
24
|
+
## 1. Start the daemon
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
```bash
|
|
27
|
+
fvtt-world-cli bridge serve
|
|
28
|
+
```
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- red: stopped or failed
|
|
30
|
+
The daemon connects the CLI to your GM browser. By default it listens on
|
|
31
|
+
`ws://127.0.0.1:47833` and stays running in this terminal for as long as you use the tool.
|
|
32
|
+
Keep the terminal open and use a second terminal for the remaining commands.
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
With the daemon running, open the world in your GM browser. If the world was already open when
|
|
35
|
+
you started the daemon, choose *Connect* in the World CLI scene controls or reload the client.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
## 2. Pair the Foundry GM client
|
|
38
|
+
|
|
39
|
+
Open *Authorization* from the *World CLI* group in the left scene controls. The same window is
|
|
40
|
+
available through Configure Settings → Module Settings → World CLI for Foundry VTT.
|
|
38
41
|
|
|
39
|
-
The module
|
|
40
|
-
the daemon listens, so there is nothing to configure; the setting exists for running the daemon on
|
|
41
|
-
a custom port or address, and then it has to match the URL that `bridge serve` prints at startup.
|
|
42
|
+

|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
prompts and in `auth list`. It is editable until pairing; after pairing it is fixed, and changing
|
|
45
|
-
it takes an Unpair followed by a new Pair. Each browser also carries its own permanent client
|
|
46
|
-
identifier, so several browsers stay paired side by side and a re-pair replaces only that browser's
|
|
47
|
-
record.
|
|
44
|
+
Enter a *Browser label* that you will recognize in the terminal, then choose *Pair*.
|
|
48
45
|
|
|
49
46
|

|
|
50
47
|
|
|
51
|
-
|
|
52
|
-
what turns the request into a stored permission:
|
|
48
|
+
In your second terminal, run:
|
|
53
49
|
|
|
54
50
|
```bash
|
|
55
51
|
fvtt-world-cli auth
|
|
56
52
|
```
|
|
57
53
|
|
|
58
|
-
The command
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
answer denies it. To read a request over before deciding, or to approve from a script, the same
|
|
62
|
-
approval exists as two steps:
|
|
54
|
+
The command shows the requesting origin, world, GM, browser label, and client id. Check that
|
|
55
|
+
these match the browser you just paired. At `Approve pairing request <code>? [y/N]`, type `y`
|
|
56
|
+
and press Enter to approve. Any other answer denies the request.
|
|
63
57
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```
|
|
58
|
+
Pairing is saved for this browser, world, and GM; you do not repeat it on each use.
|
|
59
|
+
|
|
60
|
+
## 3. Check the connection
|
|
68
61
|
|
|
69
|
-
|
|
62
|
+
After pairing approval, the *World CLI* icon in the scene controls turns green. Open *Bridge status*
|
|
63
|
+
from the same group to see the connection details. No reload is needed after pairing.
|
|
70
64
|
|
|
71
|
-
On
|
|
72
|
-
|
|
73
|
-
own as soon as the world loads: that is the client-scoped `Connect automatically` setting, enabled
|
|
74
|
-
by default; with it disabled the bridge stays offline until Connect is chosen.
|
|
65
|
+
On later runs, start the daemon before opening the world. The browser reconnects automatically
|
|
66
|
+
unless you disable *Connect automatically* in the module settings.
|
|
75
67
|
|
|
76
|
-
|
|
68
|
+
## Start working
|
|
69
|
+
|
|
70
|
+
To give your AI agent the operating instructions, install the packaged skill:
|
|
77
71
|
|
|
78
72
|
```bash
|
|
79
|
-
fvtt-world-cli
|
|
73
|
+
fvtt-world-cli skill install
|
|
80
74
|
```
|
|
81
75
|
|
|
82
|
-
|
|
76
|
+
[Agent skill](skill.md) explains installation options and updates. For manual use, start with the
|
|
77
|
+
[common workflows](commands.md#common-workflows).
|
|
78
|
+
|
|
79
|
+
## Updating
|
|
80
|
+
|
|
81
|
+
Update the CLI and Foundry module to the same release. Components from different releases refuse
|
|
82
|
+
to connect, even when their command lists look the same.
|
|
83
|
+
|
|
84
|
+
1. Stop the daemon with Ctrl+C in its terminal.
|
|
85
|
+
2. Update the CLI:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm install -g fvtt-world-cli@latest
|
|
89
|
+
```
|
|
83
90
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
3. Update *World CLI for Foundry VTT* in Foundry's module management screen.
|
|
92
|
+
4. Start `fvtt-world-cli bridge serve` again, then open or reload the GM client.
|
|
93
|
+
5. Check that the *World CLI* icon is green.
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
Module Settings → World CLI → Command permissions. Set the waiting time in the `Approval timeout
|
|
90
|
-
(minutes)` field in the main Module Settings form. [Commands](commands.md#command-permissions-and-approval)
|
|
91
|
-
describes the behavior in full.
|
|
95
|
+
Existing browser pairings remain valid.
|
|
92
96
|
|
|
93
|
-
##
|
|
97
|
+
## Troubleshooting
|
|
94
98
|
|
|
95
|
-
|
|
96
|
-
look: it names the connection state in the same colours as the icon and shows the daemon URL, the
|
|
97
|
-
last connection time, the reconnect attempts, and the reason behind a stop, updating itself while
|
|
98
|
-
open.
|
|
99
|
+
Open *Bridge status* first. It shows the daemon URL, connection state, and the reason for a stop.
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
| What you see | What to do |
|
|
102
|
+
|---|---|
|
|
103
|
+
| The daemon was unavailable when the world loaded | Start the daemon, then choose *Connect* or reload the GM client. |
|
|
104
|
+
| `BRIDGE_BUSY` | Another paired browser holds the connection. Choose *Disconnect* there, then *Connect* in the browser you want to use. Keep the existing pairing. |
|
|
105
|
+
| A protocol-version mismatch | Follow [Updating](#updating). The status window identifies the component that needs an update when it can compare the versions. |
|
|
106
|
+
| The daemon URL does not match | Set the module's *Daemon URL* to the address printed by `bridge serve`. The defaults already match. |
|
|
107
|
+
| *Connect automatically* is disabled | Choose *Connect*, or enable that setting for future world loads. |
|
|
108
|
+
| A command waits for GM approval | Answer the Command Approval window in Foundry. The command continues after approval. |
|
|
109
|
+
| Unpair cannot reach the daemon | Restore the daemon and retry. *Forget local* removes only the browser's credential; the daemon profile remains until `auth revoke <pairingId>` succeeds. |
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Connect on the other; pairing plays no part in it.
|
|
111
|
+
If the active browser is unavailable, `fvtt-world-cli bridge release` frees its slot. The released
|
|
112
|
+
browser stays stopped until its operator chooses *Connect*.
|
|
109
113
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
reached: it clears only the browser's side, and the daemon's record stays active until
|
|
113
|
-
`auth revoke <pairingId>` succeeds.
|
|
114
|
+
For pairing management, scripted approval, and profile removal, see
|
|
115
|
+
[Authorization commands](commands.md#authorization-commands).
|
|
Binary file
|