@rpgm-tools/neo-angband-mod-sdk 0.22.0 → 0.24.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/dist/capabilities.d.ts +24 -2
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +25 -3
- package/dist/capabilities.js.map +1 -1
- package/dist/compose.d.ts +1 -1
- package/dist/compose.js +1 -1
- package/dist/engine.d.ts +22 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +51 -0
- package/dist/engine.js.map +1 -1
- package/dist/hud.d.ts +1 -1
- package/dist/hud.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/sort.js +1 -1
- package/package.json +1 -1
- package/src/capabilities.ts +25 -3
- package/src/compose.ts +1 -1
- package/src/engine.ts +46 -0
- package/src/hud.ts +1 -1
- package/src/index.ts +1 -1
- package/src/sort.ts +1 -1
package/dist/capabilities.d.ts
CHANGED
|
@@ -6,12 +6,28 @@
|
|
|
6
6
|
* packs are validated data that cannot execute, so they request none
|
|
7
7
|
* (docs/MODS.md trust tiers). A plugin's `capabilities` list in its
|
|
8
8
|
* manifest is the consent surface: the installer shows each one in plain
|
|
9
|
-
* language, the user approves, and the runtime
|
|
10
|
-
*
|
|
9
|
+
* language, the user approves, and the runtime opens exactly that set of
|
|
10
|
+
* facades and no others (read the next paragraph for the scope of that
|
|
11
|
+
* claim, which is narrower than it sounds). The
|
|
11
12
|
* perceive/act facades (a later P7 phase) call `CapabilitySet.check()`
|
|
12
13
|
* before honoring a request; an ungranted capability throws a clear
|
|
13
14
|
* author-facing error rather than silently doing nothing or diverging.
|
|
14
15
|
*
|
|
16
|
+
* WHAT "GRANTS EXACTLY THAT SET" MEANS, AND WHAT IT DOES NOT. It is a
|
|
17
|
+
* statement about the FACADES, and it holds: a facade whose capability
|
|
18
|
+
* was not granted throws. It is not a statement about what in-process
|
|
19
|
+
* code can reach. A trusted plugin also receives `ctx.core` (the live
|
|
20
|
+
* engine namespace), `ctx.state` and `ctx.registries`, none of them
|
|
21
|
+
* capability-checked, and those carry the same live registry objects the
|
|
22
|
+
* `registry:*` facades write through - see docs/modding/PLUGINS.md,
|
|
23
|
+
* "What a capability gates", and the measurement in
|
|
24
|
+
* packages/web/src/capability-gate-reach.test.ts. So a capability list
|
|
25
|
+
* is a DECLARATION the player reads and the conflict report is built
|
|
26
|
+
* from, not a containment boundary; the boundary is the install consent.
|
|
27
|
+
* A capability granted to the SANDBOXED Worker tier is a different
|
|
28
|
+
* matter - that tier is isolated by construction and gets none of the
|
|
29
|
+
* registries.
|
|
30
|
+
*
|
|
15
31
|
* Vocabulary (four forms, MOD_LIFECYCLE section 4 / the frost example in
|
|
16
32
|
* section 2):
|
|
17
33
|
* - "command:add" - register commands on the act facade.
|
|
@@ -80,6 +96,12 @@
|
|
|
80
96
|
* "registry:menu" rewrites the semantic rows of
|
|
81
97
|
* one stable front-end menu id. It is distinct from
|
|
82
98
|
* a future full front-end selection capability.
|
|
99
|
+
* "registry:tiles" supplies tiles for content the
|
|
100
|
+
* loaded tile pack does not draw, which in practice
|
|
101
|
+
* means content a mod added. Additive only, and it
|
|
102
|
+
* cannot repaint what the pack or a pref file
|
|
103
|
+
* already assigned: the fill door writes where
|
|
104
|
+
* nothing has and refuses elsewhere.
|
|
83
105
|
* - "display:replace" - become the game's FRONT END: everything the
|
|
84
106
|
* player sees of the dungeon is drawn by this
|
|
85
107
|
* plugin (ModPlugin.frontend). Its own kind
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,aAAa;IAgB1D;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKzB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAOxB,0EAA0E;IAC1E,kBAAkB,IAAI,OAAO;IAI7B,6DAA6D;IAC7D,iBAAiB,IAAI,OAAO;CAG7B"}
|
package/dist/capabilities.js
CHANGED
|
@@ -6,12 +6,28 @@
|
|
|
6
6
|
* packs are validated data that cannot execute, so they request none
|
|
7
7
|
* (docs/MODS.md trust tiers). A plugin's `capabilities` list in its
|
|
8
8
|
* manifest is the consent surface: the installer shows each one in plain
|
|
9
|
-
* language, the user approves, and the runtime
|
|
10
|
-
*
|
|
9
|
+
* language, the user approves, and the runtime opens exactly that set of
|
|
10
|
+
* facades and no others (read the next paragraph for the scope of that
|
|
11
|
+
* claim, which is narrower than it sounds). The
|
|
11
12
|
* perceive/act facades (a later P7 phase) call `CapabilitySet.check()`
|
|
12
13
|
* before honoring a request; an ungranted capability throws a clear
|
|
13
14
|
* author-facing error rather than silently doing nothing or diverging.
|
|
14
15
|
*
|
|
16
|
+
* WHAT "GRANTS EXACTLY THAT SET" MEANS, AND WHAT IT DOES NOT. It is a
|
|
17
|
+
* statement about the FACADES, and it holds: a facade whose capability
|
|
18
|
+
* was not granted throws. It is not a statement about what in-process
|
|
19
|
+
* code can reach. A trusted plugin also receives `ctx.core` (the live
|
|
20
|
+
* engine namespace), `ctx.state` and `ctx.registries`, none of them
|
|
21
|
+
* capability-checked, and those carry the same live registry objects the
|
|
22
|
+
* `registry:*` facades write through - see docs/modding/PLUGINS.md,
|
|
23
|
+
* "What a capability gates", and the measurement in
|
|
24
|
+
* packages/web/src/capability-gate-reach.test.ts. So a capability list
|
|
25
|
+
* is a DECLARATION the player reads and the conflict report is built
|
|
26
|
+
* from, not a containment boundary; the boundary is the install consent.
|
|
27
|
+
* A capability granted to the SANDBOXED Worker tier is a different
|
|
28
|
+
* matter - that tier is isolated by construction and gets none of the
|
|
29
|
+
* registries.
|
|
30
|
+
*
|
|
15
31
|
* Vocabulary (four forms, MOD_LIFECYCLE section 4 / the frost example in
|
|
16
32
|
* section 2):
|
|
17
33
|
* - "command:add" - register commands on the act facade.
|
|
@@ -80,6 +96,12 @@
|
|
|
80
96
|
* "registry:menu" rewrites the semantic rows of
|
|
81
97
|
* one stable front-end menu id. It is distinct from
|
|
82
98
|
* a future full front-end selection capability.
|
|
99
|
+
* "registry:tiles" supplies tiles for content the
|
|
100
|
+
* loaded tile pack does not draw, which in practice
|
|
101
|
+
* means content a mod added. Additive only, and it
|
|
102
|
+
* cannot repaint what the pack or a pref file
|
|
103
|
+
* already assigned: the fill door writes where
|
|
104
|
+
* nothing has and refuses elsewhere.
|
|
83
105
|
* - "display:replace" - become the game's FRONT END: everything the
|
|
84
106
|
* player sees of the dungeon is drawn by this
|
|
85
107
|
* plugin (ModPlugin.frontend). Its own kind
|
|
@@ -171,7 +193,7 @@ const UI_CREATE_RE = /^ui:region\.create$/;
|
|
|
171
193
|
const STATE_RE = /^state:(\*|[a-z][a-z0-9-]*)\.read$/;
|
|
172
194
|
const NETWORK_RE = /^network:(\*|[a-zA-Z0-9.-]+)$/;
|
|
173
195
|
/** The override domains ModRegistryHost gates, plus the "*" wildcard. */
|
|
174
|
-
const REGISTRY_RE = /^registry:(\*|effect-info|effect|room|profile|blow|store|command|monster|projection|ui-entry|glyph|randart|rune|tval|vocab|menu|message)$/;
|
|
196
|
+
const REGISTRY_RE = /^registry:(\*|effect-info|effect|room|profile|blow|store|command|monster|projection|ui-entry|glyph|randart|rune|tval|vocab|menu|message|tiles)$/;
|
|
175
197
|
/**
|
|
176
198
|
* Parse and validate a capability string against the vocabulary above,
|
|
177
199
|
* returning its structured form. Throws CapabilityError on anything
|
package/dist/capabilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"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;IACH,KAAK,CAAC,GAAW;QACf,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO;QAC1B,MAAM,IAAI,eAAe,CACvB,iCAAiC,GAAG,qCAAqC,CAC1E,CAAC;IACJ,CAAC;IAED,0EAA0E;IAC1E,kBAAkB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,6DAA6D;IAC7D,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/compose.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ export interface ComposedRecord {
|
|
|
114
114
|
* from the mistake.
|
|
115
115
|
*
|
|
116
116
|
* Deliberately NOT a ComposeError. That type is the mod-attributable channel -
|
|
117
|
-
* it carries a pack id and tells an author which line to fix - and this is
|
|
117
|
+
* it carries a pack id and tells an author which line to fix - and this is the SDK's own
|
|
118
118
|
* bug, not a mod's. Blaming whichever pack happened to be loading would send a
|
|
119
119
|
* reader after the wrong thing entirely.
|
|
120
120
|
*/
|
package/dist/compose.js
CHANGED
|
@@ -146,7 +146,7 @@ const fieldProvenanceByRecord = new WeakMap();
|
|
|
146
146
|
* from the mistake.
|
|
147
147
|
*
|
|
148
148
|
* Deliberately NOT a ComposeError. That type is the mod-attributable channel -
|
|
149
|
-
* it carries a pack id and tells an author which line to fix - and this is
|
|
149
|
+
* it carries a pack id and tells an author which line to fix - and this is the SDK's own
|
|
150
150
|
* bug, not a mod's. Blaming whichever pack happened to be loading would send a
|
|
151
151
|
* reader after the wrong thing entirely.
|
|
152
152
|
*/
|
package/dist/engine.d.ts
CHANGED
|
@@ -85,6 +85,28 @@ export type EngineVerdict = {
|
|
|
85
85
|
* Pure, and takes the version as an argument rather than importing it, so a test
|
|
86
86
|
* can drive any build and so mod-sdk stays independent of core.
|
|
87
87
|
*/
|
|
88
|
+
/**
|
|
89
|
+
* Whether a NEWER game could satisfy this range, when the current one does not.
|
|
90
|
+
*
|
|
91
|
+
* WHY THIS IS NOT PART OF THE VERDICT. `engineVerdict` deliberately refuses to say
|
|
92
|
+
* which side is behind, because a range does not give that away: `>=0.24.0` wants a
|
|
93
|
+
* newer game and `<0.5.0` wants an older one, and a confident "update the game"
|
|
94
|
+
* would be wrong half the time on the one line a player acts on. That restraint is
|
|
95
|
+
* right for the verdict, which has to be correct for every range. But a screen that
|
|
96
|
+
* has decided to OFFER an older version of a mod does need to know whether updating
|
|
97
|
+
* the game is the thing that would unlock the newer one, or whether it would make
|
|
98
|
+
* matters worse - so the question gets asked separately, and answered by probing
|
|
99
|
+
* rather than by reasoning about a range this matcher cannot decompose.
|
|
100
|
+
*
|
|
101
|
+
* A BOUNDED PROBE, NOT AN INTERVAL SOLVER, and the bound is the honest part. It
|
|
102
|
+
* tries the next nine patches, the next nine minors and the next nine majors above
|
|
103
|
+
* the running version, plus one far-future version for an open upper bound. `true`
|
|
104
|
+
* means one of those satisfies the range, so a game update really can get there.
|
|
105
|
+
* `false` means none of them does, which is not a proof that none ever could - so
|
|
106
|
+
* the caller must fall back to naming both versions and claiming nothing, exactly
|
|
107
|
+
* as the verdict does. `null` is a range this build cannot read at all.
|
|
108
|
+
*/
|
|
109
|
+
export declare function newerGameCouldRun(range: string, engineVersion: string): boolean | null;
|
|
88
110
|
export declare function engineVerdict(manifest: Pick<PackManifest, "engine" | "modApi">, engineVersion: string,
|
|
89
111
|
/**
|
|
90
112
|
* Whether this pack ships CODE, and therefore whether a mismatch is a gate or
|
package/dist/engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,EAAE,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aAAa,EAAE,MAAM;AACrB;;;;;;;GAOG;AACH,OAAO,GAAE,OAAuC,GAC/C,aAAa,CA0Df"}
|
package/dist/engine.js
CHANGED
|
@@ -58,6 +58,57 @@ const OK = { ok: true };
|
|
|
58
58
|
* Pure, and takes the version as an argument rather than importing it, so a test
|
|
59
59
|
* can drive any build and so mod-sdk stays independent of core.
|
|
60
60
|
*/
|
|
61
|
+
/**
|
|
62
|
+
* Whether a NEWER game could satisfy this range, when the current one does not.
|
|
63
|
+
*
|
|
64
|
+
* WHY THIS IS NOT PART OF THE VERDICT. `engineVerdict` deliberately refuses to say
|
|
65
|
+
* which side is behind, because a range does not give that away: `>=0.24.0` wants a
|
|
66
|
+
* newer game and `<0.5.0` wants an older one, and a confident "update the game"
|
|
67
|
+
* would be wrong half the time on the one line a player acts on. That restraint is
|
|
68
|
+
* right for the verdict, which has to be correct for every range. But a screen that
|
|
69
|
+
* has decided to OFFER an older version of a mod does need to know whether updating
|
|
70
|
+
* the game is the thing that would unlock the newer one, or whether it would make
|
|
71
|
+
* matters worse - so the question gets asked separately, and answered by probing
|
|
72
|
+
* rather than by reasoning about a range this matcher cannot decompose.
|
|
73
|
+
*
|
|
74
|
+
* A BOUNDED PROBE, NOT AN INTERVAL SOLVER, and the bound is the honest part. It
|
|
75
|
+
* tries the next nine patches, the next nine minors and the next nine majors above
|
|
76
|
+
* the running version, plus one far-future version for an open upper bound. `true`
|
|
77
|
+
* means one of those satisfies the range, so a game update really can get there.
|
|
78
|
+
* `false` means none of them does, which is not a proof that none ever could - so
|
|
79
|
+
* the caller must fall back to naming both versions and claiming nothing, exactly
|
|
80
|
+
* as the verdict does. `null` is a range this build cannot read at all.
|
|
81
|
+
*/
|
|
82
|
+
export function newerGameCouldRun(range, engineVersion) {
|
|
83
|
+
const m = /^v?(\d+)\.(\d+)\.(\d+)/u.exec(engineVersion);
|
|
84
|
+
if (!m)
|
|
85
|
+
return null;
|
|
86
|
+
const major = Number(m[1]);
|
|
87
|
+
const minor = Number(m[2]);
|
|
88
|
+
const patch = Number(m[3]);
|
|
89
|
+
const ladder = [];
|
|
90
|
+
for (let i = 1; i <= 9; i++)
|
|
91
|
+
ladder.push(`${String(major)}.${String(minor)}.${String(patch + i)}`);
|
|
92
|
+
for (let i = 1; i <= 9; i++)
|
|
93
|
+
ladder.push(`${String(major)}.${String(minor + i)}.0`);
|
|
94
|
+
for (let i = 1; i <= 9; i++)
|
|
95
|
+
ladder.push(`${String(major + i)}.0.0`);
|
|
96
|
+
ladder.push("9999.0.0");
|
|
97
|
+
for (const candidate of ladder) {
|
|
98
|
+
try {
|
|
99
|
+
if (satisfies(candidate, range))
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
/* An unreadable range is unreadable for every candidate, so one throw settles
|
|
104
|
+
* it. Reported as "cannot tell" rather than "no", because the manifest being
|
|
105
|
+
* broken is a different fact from the game being the wrong version, and the
|
|
106
|
+
* caller says different words for each. */
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
61
112
|
export function engineVerdict(manifest, engineVersion,
|
|
62
113
|
/**
|
|
63
114
|
* Whether this pack ships CODE, and therefore whether a mismatch is a gate or
|
package/dist/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA+BxC,MAAM,EAAE,GAAkB,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AAEvC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAC3B,QAAiD,EACjD,aAAqB;AACrB;;;;;;;GAOG;AACH,UAAmB,QAAQ,CAAC,MAAM,KAAK,SAAS;IAEhD,MAAM,KAAK,GAAG,Q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;gBACvE,gFAAgF;YAClF,CAAC,CAAC,0BAA0B,KAAK,qBAAqB,aAAa,aAAa;gBAC9E,4EAA4E;gBAC5E,6CAA6C;KAClD,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,CAAU;IACzB,OAAO,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
package/dist/hud.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* OWNERSHIP IS PER REGION, which is the whole shape of this file. A plugin's
|
|
11
11
|
* `hud()` returns a sink per region name it wants, each one gated by its own
|
|
12
12
|
* `ui:<region>.replace` capability, and it receives ONLY those regions. The
|
|
13
|
-
* others stay core's and keep being drawn. That follows the
|
|
13
|
+
* others stay core's and keep being drawn. That follows the rule that a screen
|
|
14
14
|
* is COMPOSED of regions rather than covering them.
|
|
15
15
|
*
|
|
16
16
|
* This module contains types only. A folder plugin may `import type` from the
|
package/dist/hud.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* OWNERSHIP IS PER REGION, which is the whole shape of this file. A plugin's
|
|
11
11
|
* `hud()` returns a sink per region name it wants, each one gated by its own
|
|
12
12
|
* `ui:<region>.replace` capability, and it receives ONLY those regions. The
|
|
13
|
-
* others stay core's and keep being drawn. That follows the
|
|
13
|
+
* others stay core's and keep being drawn. That follows the rule that a screen
|
|
14
14
|
* is COMPOSED of regions rather than covering them.
|
|
15
15
|
*
|
|
16
16
|
* This module contains types only. A folder plugin may `import type` from the
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type { DroppedEdge, SortEdge, SortPin, SortResult, SortTier } from "./sor
|
|
|
32
32
|
export { contestedSlots, describeContested, describeDeclaredConflict, foldDiscards, } from "./contested.js";
|
|
33
33
|
export type { Claim, ContestedLayer, ContestedSlot, DeclaredConflict, Fold, NameOf, } from "./contested.js";
|
|
34
34
|
export { compareSemver, satisfies, SemverError } from "./semver.js";
|
|
35
|
-
export { engineVerdict } from "./engine.js";
|
|
35
|
+
export { engineVerdict, newerGameCouldRun } from "./engine.js";
|
|
36
36
|
export type { EngineVerdict } from "./engine.js";
|
|
37
37
|
export { ComposeError, composePacks, mergePatch, RENAMED_HINT } from "./compose.js";
|
|
38
38
|
export { composeContentPacks, composeDroppingBroken } from "./loader.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACtF,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,KAAK,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,IAAI,EACJ,MAAM,GACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,mBAAmB,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C"}
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export { expandedPackContents, expandSections, resolveSectionState, sectionFlag,
|
|
|
27
27
|
export { collectSortEdges, SORT_TIERS, sortModOrder } from "./sort.js";
|
|
28
28
|
export { contestedSlots, describeContested, describeDeclaredConflict, foldDiscards, } from "./contested.js";
|
|
29
29
|
export { compareSemver, satisfies, SemverError } from "./semver.js";
|
|
30
|
-
export { engineVerdict } from "./engine.js";
|
|
30
|
+
export { engineVerdict, newerGameCouldRun } from "./engine.js";
|
|
31
31
|
export { ComposeError, composePacks, mergePatch, RENAMED_HINT } from "./compose.js";
|
|
32
32
|
export { composeContentPacks, composeDroppingBroken } from "./loader.js";
|
|
33
33
|
export { PROVENANCE_KEY, provenanceOf, stampProvenance } from "./provenance.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAqBxB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,WAAW,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB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,iBAAiB,CAAC;AAEhF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,aAAa,GACd,MAAM,iBAAiB,CAAC;AAUzB,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,aAAa,GACd,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAOvD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAQxB;;;;wDAIwD;AACxD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,gBAAgB,CAAC;AAYxB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAOzE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/sort.js
CHANGED
|
@@ -224,7 +224,7 @@ export function sortModOrder(manifests, options = {}) {
|
|
|
224
224
|
let edges = collectSortEdges(manifests, options.pins ?? []);
|
|
225
225
|
const dropped = [];
|
|
226
226
|
const unresolvable = [];
|
|
227
|
-
/* Drop the weakest edge on a cycle until nothing is left that
|
|
227
|
+
/* Drop the weakest edge on a cycle until nothing is left that may be dropped.
|
|
228
228
|
* Bounded by the edge count: every pass removes one edge or records one
|
|
229
229
|
* unbreakable cycle and stops. */
|
|
230
230
|
for (;;) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgm-tools/neo-angband-mod-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Pack schemas, validation, and tooling for Neo Angband mods (content packs, tile packs, scripted plugins)",
|
|
5
5
|
"license": "GPL-2.0-only",
|
|
6
6
|
"author": "neostryder (RPGM Tools)",
|
package/src/capabilities.ts
CHANGED
|
@@ -6,12 +6,28 @@
|
|
|
6
6
|
* packs are validated data that cannot execute, so they request none
|
|
7
7
|
* (docs/MODS.md trust tiers). A plugin's `capabilities` list in its
|
|
8
8
|
* manifest is the consent surface: the installer shows each one in plain
|
|
9
|
-
* language, the user approves, and the runtime
|
|
10
|
-
*
|
|
9
|
+
* language, the user approves, and the runtime opens exactly that set of
|
|
10
|
+
* facades and no others (read the next paragraph for the scope of that
|
|
11
|
+
* claim, which is narrower than it sounds). The
|
|
11
12
|
* perceive/act facades (a later P7 phase) call `CapabilitySet.check()`
|
|
12
13
|
* before honoring a request; an ungranted capability throws a clear
|
|
13
14
|
* author-facing error rather than silently doing nothing or diverging.
|
|
14
15
|
*
|
|
16
|
+
* WHAT "GRANTS EXACTLY THAT SET" MEANS, AND WHAT IT DOES NOT. It is a
|
|
17
|
+
* statement about the FACADES, and it holds: a facade whose capability
|
|
18
|
+
* was not granted throws. It is not a statement about what in-process
|
|
19
|
+
* code can reach. A trusted plugin also receives `ctx.core` (the live
|
|
20
|
+
* engine namespace), `ctx.state` and `ctx.registries`, none of them
|
|
21
|
+
* capability-checked, and those carry the same live registry objects the
|
|
22
|
+
* `registry:*` facades write through - see docs/modding/PLUGINS.md,
|
|
23
|
+
* "What a capability gates", and the measurement in
|
|
24
|
+
* packages/web/src/capability-gate-reach.test.ts. So a capability list
|
|
25
|
+
* is a DECLARATION the player reads and the conflict report is built
|
|
26
|
+
* from, not a containment boundary; the boundary is the install consent.
|
|
27
|
+
* A capability granted to the SANDBOXED Worker tier is a different
|
|
28
|
+
* matter - that tier is isolated by construction and gets none of the
|
|
29
|
+
* registries.
|
|
30
|
+
*
|
|
15
31
|
* Vocabulary (four forms, MOD_LIFECYCLE section 4 / the frost example in
|
|
16
32
|
* section 2):
|
|
17
33
|
* - "command:add" - register commands on the act facade.
|
|
@@ -80,6 +96,12 @@
|
|
|
80
96
|
* "registry:menu" rewrites the semantic rows of
|
|
81
97
|
* one stable front-end menu id. It is distinct from
|
|
82
98
|
* a future full front-end selection capability.
|
|
99
|
+
* "registry:tiles" supplies tiles for content the
|
|
100
|
+
* loaded tile pack does not draw, which in practice
|
|
101
|
+
* means content a mod added. Additive only, and it
|
|
102
|
+
* cannot repaint what the pack or a pref file
|
|
103
|
+
* already assigned: the fill door writes where
|
|
104
|
+
* nothing has and refuses elsewhere.
|
|
83
105
|
* - "display:replace" - become the game's FRONT END: everything the
|
|
84
106
|
* player sees of the dungeon is drawn by this
|
|
85
107
|
* plugin (ModPlugin.frontend). Its own kind
|
|
@@ -185,7 +207,7 @@ const STATE_RE = /^state:(\*|[a-z][a-z0-9-]*)\.read$/;
|
|
|
185
207
|
const NETWORK_RE = /^network:(\*|[a-zA-Z0-9.-]+)$/;
|
|
186
208
|
/** The override domains ModRegistryHost gates, plus the "*" wildcard. */
|
|
187
209
|
const REGISTRY_RE =
|
|
188
|
-
/^registry:(\*|effect-info|effect|room|profile|blow|store|command|monster|projection|ui-entry|glyph|randart|rune|tval|vocab|menu|message)$/;
|
|
210
|
+
/^registry:(\*|effect-info|effect|room|profile|blow|store|command|monster|projection|ui-entry|glyph|randart|rune|tval|vocab|menu|message|tiles)$/;
|
|
189
211
|
|
|
190
212
|
/**
|
|
191
213
|
* Parse and validate a capability string against the vocabulary above,
|
package/src/compose.ts
CHANGED
|
@@ -249,7 +249,7 @@ const fieldProvenanceByRecord = new WeakMap<ComposedRecord, FieldProvenance>();
|
|
|
249
249
|
* from the mistake.
|
|
250
250
|
*
|
|
251
251
|
* Deliberately NOT a ComposeError. That type is the mod-attributable channel -
|
|
252
|
-
* it carries a pack id and tells an author which line to fix - and this is
|
|
252
|
+
* it carries a pack id and tells an author which line to fix - and this is the SDK's own
|
|
253
253
|
* bug, not a mod's. Blaming whichever pack happened to be loading would send a
|
|
254
254
|
* reader after the wrong thing entirely.
|
|
255
255
|
*/
|
package/src/engine.ts
CHANGED
|
@@ -91,6 +91,52 @@ const OK: EngineVerdict = { ok: true };
|
|
|
91
91
|
* Pure, and takes the version as an argument rather than importing it, so a test
|
|
92
92
|
* can drive any build and so mod-sdk stays independent of core.
|
|
93
93
|
*/
|
|
94
|
+
/**
|
|
95
|
+
* Whether a NEWER game could satisfy this range, when the current one does not.
|
|
96
|
+
*
|
|
97
|
+
* WHY THIS IS NOT PART OF THE VERDICT. `engineVerdict` deliberately refuses to say
|
|
98
|
+
* which side is behind, because a range does not give that away: `>=0.24.0` wants a
|
|
99
|
+
* newer game and `<0.5.0` wants an older one, and a confident "update the game"
|
|
100
|
+
* would be wrong half the time on the one line a player acts on. That restraint is
|
|
101
|
+
* right for the verdict, which has to be correct for every range. But a screen that
|
|
102
|
+
* has decided to OFFER an older version of a mod does need to know whether updating
|
|
103
|
+
* the game is the thing that would unlock the newer one, or whether it would make
|
|
104
|
+
* matters worse - so the question gets asked separately, and answered by probing
|
|
105
|
+
* rather than by reasoning about a range this matcher cannot decompose.
|
|
106
|
+
*
|
|
107
|
+
* A BOUNDED PROBE, NOT AN INTERVAL SOLVER, and the bound is the honest part. It
|
|
108
|
+
* tries the next nine patches, the next nine minors and the next nine majors above
|
|
109
|
+
* the running version, plus one far-future version for an open upper bound. `true`
|
|
110
|
+
* means one of those satisfies the range, so a game update really can get there.
|
|
111
|
+
* `false` means none of them does, which is not a proof that none ever could - so
|
|
112
|
+
* the caller must fall back to naming both versions and claiming nothing, exactly
|
|
113
|
+
* as the verdict does. `null` is a range this build cannot read at all.
|
|
114
|
+
*/
|
|
115
|
+
export function newerGameCouldRun(range: string, engineVersion: string): boolean | null {
|
|
116
|
+
const m = /^v?(\d+)\.(\d+)\.(\d+)/u.exec(engineVersion);
|
|
117
|
+
if (!m) return null;
|
|
118
|
+
const major = Number(m[1]);
|
|
119
|
+
const minor = Number(m[2]);
|
|
120
|
+
const patch = Number(m[3]);
|
|
121
|
+
const ladder: string[] = [];
|
|
122
|
+
for (let i = 1; i <= 9; i++) ladder.push(`${String(major)}.${String(minor)}.${String(patch + i)}`);
|
|
123
|
+
for (let i = 1; i <= 9; i++) ladder.push(`${String(major)}.${String(minor + i)}.0`);
|
|
124
|
+
for (let i = 1; i <= 9; i++) ladder.push(`${String(major + i)}.0.0`);
|
|
125
|
+
ladder.push("9999.0.0");
|
|
126
|
+
for (const candidate of ladder) {
|
|
127
|
+
try {
|
|
128
|
+
if (satisfies(candidate, range)) return true;
|
|
129
|
+
} catch {
|
|
130
|
+
/* An unreadable range is unreadable for every candidate, so one throw settles
|
|
131
|
+
* it. Reported as "cannot tell" rather than "no", because the manifest being
|
|
132
|
+
* broken is a different fact from the game being the wrong version, and the
|
|
133
|
+
* caller says different words for each. */
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
|
|
94
140
|
export function engineVerdict(
|
|
95
141
|
manifest: Pick<PackManifest, "engine" | "modApi">,
|
|
96
142
|
engineVersion: string,
|
package/src/hud.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* OWNERSHIP IS PER REGION, which is the whole shape of this file. A plugin's
|
|
11
11
|
* `hud()` returns a sink per region name it wants, each one gated by its own
|
|
12
12
|
* `ui:<region>.replace` capability, and it receives ONLY those regions. The
|
|
13
|
-
* others stay core's and keep being drawn. That follows the
|
|
13
|
+
* others stay core's and keep being drawn. That follows the rule that a screen
|
|
14
14
|
* is COMPOSED of regions rather than covering them.
|
|
15
15
|
*
|
|
16
16
|
* This module contains types only. A folder plugin may `import type` from the
|
package/src/index.ts
CHANGED
|
@@ -90,7 +90,7 @@ export type {
|
|
|
90
90
|
NameOf,
|
|
91
91
|
} from "./contested.js";
|
|
92
92
|
export { compareSemver, satisfies, SemverError } from "./semver.js";
|
|
93
|
-
export { engineVerdict } from "./engine.js";
|
|
93
|
+
export { engineVerdict, newerGameCouldRun } from "./engine.js";
|
|
94
94
|
export type { EngineVerdict } from "./engine.js";
|
|
95
95
|
export { ComposeError, composePacks, mergePatch, RENAMED_HINT } from "./compose.js";
|
|
96
96
|
export { composeContentPacks, composeDroppingBroken } from "./loader.js";
|
package/src/sort.ts
CHANGED
|
@@ -297,7 +297,7 @@ export function sortModOrder(
|
|
|
297
297
|
const dropped: DroppedEdge[] = [];
|
|
298
298
|
const unresolvable: string[][] = [];
|
|
299
299
|
|
|
300
|
-
/* Drop the weakest edge on a cycle until nothing is left that
|
|
300
|
+
/* Drop the weakest edge on a cycle until nothing is left that may be dropped.
|
|
301
301
|
* Bounded by the edge count: every pass removes one edge or records one
|
|
302
302
|
* unbreakable cycle and stops. */
|
|
303
303
|
for (;;) {
|