fvtt-world-cli 1.1.1 → 1.2.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 +34 -34
- package/dist/index.js +428 -159
- package/docs/README.md +5 -61
- package/docs/architecture.md +53 -209
- package/docs/commands.md +188 -439
- package/docs/compatibility.md +15 -22
- package/docs/getting-started.md +76 -74
- package/docs/images/module-settings.png +0 -0
- package/docs/protocol.md +231 -189
- package/docs/security.md +149 -322
- package/docs/skill.md +24 -33
- package/package.json +14 -2
- package/skills/foundry-world-editor/SKILL.md +15 -1
- 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/skill.md
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
# Agent skill
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
health, the read → preview → commit → verify loop, how to classify failures before retrying, and
|
|
6
|
-
where the hard safety boundaries are. Skills follow the open Agent Skills standard, so the same
|
|
7
|
-
file works in Claude Code, Codex, and every other agent that reads `SKILL.md` files.
|
|
8
|
-
|
|
9
|
-
The skill deliberately contains no command inventory. Agents discover the exact command surface
|
|
10
|
-
from the CLI itself (`commands --json`, `schema <command>`), so the skill stays valid as commands
|
|
11
|
-
evolve; it carries only the knowledge that runtime discovery cannot provide. The skill itself lives
|
|
12
|
-
at [`skills/foundry-world-editor/SKILL.md`](../skills/foundry-world-editor/SKILL.md).
|
|
3
|
+
The package includes [foundry-world-editor](../skills/foundry-world-editor/SKILL.md), operating
|
|
4
|
+
instructions for AI agents that support Agent Skills.
|
|
13
5
|
|
|
14
6
|
## Installing
|
|
15
7
|
|
|
@@ -17,10 +9,8 @@ at [`skills/foundry-world-editor/SKILL.md`](../skills/foundry-world-editor/SKILL
|
|
|
17
9
|
fvtt-world-cli skill install
|
|
18
10
|
```
|
|
19
11
|
|
|
20
|
-
The default installation
|
|
21
|
-
|
|
22
|
-
vendor-neutral location of the Agent Skills standard, and points each agent's own skill directory
|
|
23
|
-
at it, so every agent reads the same single copy.
|
|
12
|
+
The default installation runs `npx skills add`, which detects the agents present on the machine.
|
|
13
|
+
It keeps a shared copy under `~/.agents/skills` and links the agents' skill directories to it.
|
|
24
14
|
|
|
25
15
|
An explicit destination works without the skills CLI or network access:
|
|
26
16
|
|
|
@@ -28,35 +18,27 @@ An explicit destination works without the skills CLI or network access:
|
|
|
28
18
|
fvtt-world-cli skill install --to <skills-directory>
|
|
29
19
|
```
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
skill permanently identical to the CLI it came from.
|
|
21
|
+
The CLI records this destination for later updates. Add `--link` to use the packaged skill
|
|
22
|
+
directly through a symlink:
|
|
34
23
|
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
```bash
|
|
25
|
+
fvtt-world-cli skill install --to <skills-directory> --link
|
|
26
|
+
```
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
`--link` requires `--to`. A linked skill follows CLI package updates automatically.
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
own: the bridge daemon checks every known copy at startup and refreshes outdated ones, so a package
|
|
42
|
-
update takes effect the next time the daemon starts. The check runs inside the CLI itself; nothing
|
|
43
|
-
about installation or updates relies on npm lifecycle scripts, which npm blocks by default. For
|
|
44
|
-
updates, a copy is one of two kinds:
|
|
30
|
+
## Staying up to date
|
|
45
31
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- A **modified** copy, one with local edits, is never replaced automatically. It produces a
|
|
49
|
-
warning instead, and keeps producing it until the difference is resolved.
|
|
32
|
+
At startup, the daemon updates unmodified copies in the shared directory and recorded `--to`
|
|
33
|
+
locations. It preserves locally edited copies and warns instead of overwriting them.
|
|
50
34
|
|
|
51
|
-
|
|
35
|
+
To update manually:
|
|
52
36
|
|
|
53
37
|
```bash
|
|
54
38
|
fvtt-world-cli skill update
|
|
55
|
-
fvtt-world-cli skill update --force
|
|
56
39
|
```
|
|
57
40
|
|
|
58
|
-
|
|
59
|
-
every installed copy, so an outdated installation is never mistaken for a customized one.
|
|
41
|
+
Add `--force` to replace a locally edited copy with the packaged version.
|
|
60
42
|
|
|
61
43
|
## Removing
|
|
62
44
|
|
|
@@ -67,3 +49,12 @@ fvtt-world-cli skill remove --to <skills-directory>
|
|
|
67
49
|
|
|
68
50
|
The default removal uninstalls the canonical copy, the agent links pointing at it, and every
|
|
69
51
|
location recorded for `--to` installations; `--to` removes one location and forgets it.
|
|
52
|
+
|
|
53
|
+
## JSON output
|
|
54
|
+
|
|
55
|
+
For `skill install`, `skill update`, and `skill remove`, `--json` requires an explicit `--to`
|
|
56
|
+
destination:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
fvtt-world-cli skill install --to <skills-directory> --json
|
|
60
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fvtt-world-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Safe local CLI and authenticated bridge for automating live Foundry VTT worlds.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"foundry-vtt",
|
|
7
|
+
"foundryvtt",
|
|
8
|
+
"fvtt",
|
|
9
|
+
"virtual-tabletop",
|
|
10
|
+
"ttrpg",
|
|
11
|
+
"cli",
|
|
12
|
+
"automation",
|
|
13
|
+
"ai",
|
|
14
|
+
"ai-agent",
|
|
15
|
+
"agent-skills"
|
|
16
|
+
],
|
|
5
17
|
"license": "MIT",
|
|
6
18
|
"author": "DroiD16",
|
|
7
19
|
"repository": {
|
|
@@ -44,6 +56,6 @@
|
|
|
44
56
|
"zod": "^3.24.3"
|
|
45
57
|
},
|
|
46
58
|
"devDependencies": {
|
|
47
|
-
"@fvtt-world-cli/protocol": "1.
|
|
59
|
+
"@fvtt-world-cli/protocol": "1.2.0"
|
|
48
60
|
}
|
|
49
61
|
}
|
|
@@ -75,6 +75,11 @@ A macro that throws fails `macro.execute` with a partial outcome — read what i
|
|
|
75
75
|
retrying — while a macro that catches its own errors still returns `null`, which proves nothing;
|
|
76
76
|
verify effects with reads, and treat `MACRO_TIMEOUT` as indeterminate — the macro may still be
|
|
77
77
|
running.
|
|
78
|
+
On Foundry v14 maps live on levels: pass `levels` in `scene.create`, then use `scene.level.*`;
|
|
79
|
+
level ids in a preview are provisional.
|
|
80
|
+
Deleting a level also deletes its tokens and every placeable only on that level, and the dry run
|
|
81
|
+
does not list them: read the scene's placeables (token `level`, others' `levels`) and tell the user
|
|
82
|
+
what the delete removes before running it.
|
|
78
83
|
`setting.set` cannot touch this module's own namespace (`SETTING_PROTECTED` is final; never retry).
|
|
79
84
|
When a setting write returns `requiresReload: true`, the change needs a GM-client reload to take
|
|
80
85
|
effect; `system.reload` performs it, drops the bridge, and requires a reconnect wait before the
|
|
@@ -135,7 +140,8 @@ details}}`, alongside `protocolVersion`, `type`, and the correlation `id` (echoi
|
|
|
135
140
|
Documents live under a type-named key inside `result` that varies between commands but is stable
|
|
136
141
|
for each one. `id` is the public identifier; a `_id` mirror may accompany it. Values requested
|
|
137
142
|
through `include` flags may be derived or version-dependent. Write them back only when the
|
|
138
|
-
update schema explicitly accepts them.
|
|
143
|
+
update schema explicitly accepts them. Actor reads return `itemCount` in place of owned items; add
|
|
144
|
+
`--include items` when the task needs them, or use `actor item list` and `actor item get`.
|
|
139
145
|
|
|
140
146
|
## Retry classification
|
|
141
147
|
|
|
@@ -155,8 +161,16 @@ Classify a failure before reacting:
|
|
|
155
161
|
- `APPROVAL_DENIED`, `APPROVAL_TIMEOUT`, and `APPROVAL_CANCELLED` mean nothing ran. Report the outcome
|
|
156
162
|
and wait for user direction. `APPROVAL_QUEUE_FULL` also means nothing ran, but it can clear after
|
|
157
163
|
earlier requests settle.
|
|
164
|
+
- `APPROVAL_STALE` means the GM allowed a macro execution whose body or type changed — or whose
|
|
165
|
+
macro was deleted — after it was shown, so nothing ran. Read the macro again and re-send the execution if the current content is
|
|
166
|
+
still what the user wants; that opens a fresh approval.
|
|
158
167
|
- `APPROVAL_UNKNOWN` and unconfirmed cancellation are indeterminate. Read the affected documents,
|
|
159
168
|
report the result, and use a fresh key if the operation still needs to run.
|
|
169
|
+
- For an update `INTERNAL_ERROR` with `details.partial: true` or `details.indeterminate: true`,
|
|
170
|
+
read the affected document before retrying. `changedFields` names requested top-level fields
|
|
171
|
+
observed to change, not fully applied nested values. An embedded creation without a requested
|
|
172
|
+
id may already exist despite an indeterminate error. Send only the remaining changes as a new
|
|
173
|
+
operation with a fresh idempotency key, if using one.
|
|
160
174
|
- Correct a structured Foundry rejection and submit the corrected content as a new operation.
|
|
161
175
|
|
|
162
176
|
## Bulk writes and actions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
248c52464e776236de6f937530e220dcb77b45a8b5cc754adbb4cfb4671a8c66
|
package/docs/images/icon.svg
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
-
<rect width="512" height="512" fill="#0b0a13"/>
|
|
3
|
-
<g fill="none" stroke="#fc6119" stroke-linecap="round" stroke-linejoin="round">
|
|
4
|
-
<g stroke-width="15">
|
|
5
|
-
<path d="M256 36 446.53 146V366L256 476 65.47 366V146Z"/>
|
|
6
|
-
<path d="M256 120 373.78 324H138.22Z"/>
|
|
7
|
-
<path d="M256 36 256 120M446.53 146 256 120M65.47 146 256 120"/>
|
|
8
|
-
<path d="M446.53 366 373.78 324M446.53 146 373.78 324M256 476 373.78 324"/>
|
|
9
|
-
<path d="M65.47 366 138.22 324M65.47 146 138.22 324M256 476 138.22 324"/>
|
|
10
|
-
</g>
|
|
11
|
-
<g stroke-width="12">
|
|
12
|
-
<path d="M223 240 251 268 223 296"/>
|
|
13
|
-
<path d="M266 296H306" stroke-linecap="butt"/>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</svg>
|
package/docs/images/mark.svg
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
-
<g fill="none" stroke="#fc6119" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
-
<g stroke-width="15">
|
|
4
|
-
<path d="M256 36 446.53 146V366L256 476 65.47 366V146Z"/>
|
|
5
|
-
<path d="M256 120 373.78 324H138.22Z"/>
|
|
6
|
-
<path d="M256 36 256 120M446.53 146 256 120M65.47 146 256 120"/>
|
|
7
|
-
<path d="M446.53 366 373.78 324M446.53 146 373.78 324M256 476 373.78 324"/>
|
|
8
|
-
<path d="M65.47 366 138.22 324M65.47 146 138.22 324M256 476 138.22 324"/>
|
|
9
|
-
</g>
|
|
10
|
-
<g stroke-width="12">
|
|
11
|
-
<path d="M223 240 251 268 223 296"/>
|
|
12
|
-
<path d="M266 296H306" stroke-linecap="butt"/>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</svg>
|