@sharpee/chord 3.1.0 → 3.5.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/analyzer.d.ts +11 -3
- package/analyzer.d.ts.map +1 -1
- package/analyzer.js +1360 -33
- package/analyzer.js.map +1 -1
- package/ast.d.ts +480 -9
- package/ast.d.ts.map +1 -1
- package/catalog.d.ts +57 -1
- package/catalog.d.ts.map +1 -1
- package/catalog.js +91 -3
- package/catalog.js.map +1 -1
- package/diagnostics.d.ts +1 -1
- package/diagnostics.d.ts.map +1 -1
- package/index.d.ts +32 -13
- package/index.d.ts.map +1 -1
- package/index.js +112 -30
- package/index.js.map +1 -1
- package/ir.d.ts +361 -7
- package/ir.d.ts.map +1 -1
- package/lexer.d.ts +11 -3
- package/lexer.d.ts.map +1 -1
- package/lexer.js +36 -8
- package/lexer.js.map +1 -1
- package/manifests/combat.d.ts +16 -0
- package/manifests/combat.d.ts.map +1 -0
- package/manifests/combat.js +38 -0
- package/manifests/combat.js.map +1 -0
- package/manifests/hunger.d.ts +18 -0
- package/manifests/hunger.d.ts.map +1 -0
- package/manifests/hunger.js +8 -0
- package/manifests/hunger.js.map +1 -0
- package/manifests/index.d.ts +23 -0
- package/manifests/index.d.ts.map +1 -0
- package/manifests/index.js +52 -0
- package/manifests/index.js.map +1 -0
- package/manifests/npc.d.ts +19 -0
- package/manifests/npc.d.ts.map +1 -0
- package/manifests/npc.js +38 -0
- package/manifests/npc.js.map +1 -0
- package/manifests/scoring.d.ts +25 -0
- package/manifests/scoring.d.ts.map +1 -0
- package/manifests/scoring.js +8 -0
- package/manifests/scoring.js.map +1 -0
- package/manifests/state-machines.d.ts +17 -0
- package/manifests/state-machines.d.ts.map +1 -0
- package/manifests/state-machines.js +8 -0
- package/manifests/state-machines.js.map +1 -0
- package/manifests/types.d.ts +41 -0
- package/manifests/types.d.ts.map +1 -0
- package/manifests/types.js +18 -0
- package/manifests/types.js.map +1 -0
- package/message-alias-catalog.d.ts +22 -0
- package/message-alias-catalog.d.ts.map +1 -0
- package/message-alias-catalog.js +826 -0
- package/message-alias-catalog.js.map +1 -0
- package/package.json +1 -1
- package/parser.d.ts +2 -2
- package/parser.d.ts.map +1 -1
- package/parser.js +1644 -131
- package/parser.js.map +1 -1
- package/phrasebooks.d.ts +28 -0
- package/phrasebooks.d.ts.map +1 -0
- package/phrasebooks.js +6 -0
- package/phrasebooks.js.map +1 -0
- package/version.d.ts +38 -0
- package/version.d.ts.map +1 -0
- package/version.js +41 -0
- package/version.js.map +1 -0
- package/sharpee-chord-3.0.0.tgz +0 -0
package/phrasebooks.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* phrasebooks.ts — the packaged-phrasebook manifest registry (ADR-250 D3).
|
|
3
|
+
*
|
|
4
|
+
* Purpose: compile-time knowledge of the packaged phrasebooks a story may
|
|
5
|
+
* `use` — name plus covered key list. This is the ADR-215
|
|
6
|
+
* names-vs-mappings split applied to books: the manifest is DATA the
|
|
7
|
+
* analyzer reads (so a key supplied only by a used book still passes the
|
|
8
|
+
* missing-phrase gate), while the loader's data registry carries the
|
|
9
|
+
* actual entries and is conformance-checked against these keys at load
|
|
10
|
+
* (mismatch = LoadError). Initially empty — no books ship in this gate;
|
|
11
|
+
* hosts and tests register through this seam.
|
|
12
|
+
*
|
|
13
|
+
* Public interface: PhrasebookManifest, PHRASEBOOK_REGISTRY.
|
|
14
|
+
* Owner context: @sharpee/chord (language frontend; browser-safe).
|
|
15
|
+
*
|
|
16
|
+
* Invariants:
|
|
17
|
+
* - Keys are story-namespace keys (single kebab-case words) — never
|
|
18
|
+
* dotted platform message IDs (ADR-250 D1, David 2026-07-21).
|
|
19
|
+
*/
|
|
20
|
+
export interface PhrasebookManifest {
|
|
21
|
+
/** Single kebab-case book name (extension-name form). */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Story-namespace keys the book covers — the book's documented surface. */
|
|
24
|
+
keys: string[];
|
|
25
|
+
}
|
|
26
|
+
/** name → manifest. Mutable by design: hosts and tests register here. */
|
|
27
|
+
export declare const PHRASEBOOK_REGISTRY: Map<string, PhrasebookManifest>;
|
|
28
|
+
//# sourceMappingURL=phrasebooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phrasebooks.d.ts","sourceRoot":"","sources":["../../../repos/sharpee_v2/packages/chord/src/phrasebooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,iCAAwC,CAAC"}
|
package/phrasebooks.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PHRASEBOOK_REGISTRY = void 0;
|
|
4
|
+
/** name → manifest. Mutable by design: hosts and tests register here. */
|
|
5
|
+
exports.PHRASEBOOK_REGISTRY = new Map();
|
|
6
|
+
//# sourceMappingURL=phrasebooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phrasebooks.js","sourceRoot":"","sources":["../../../repos/sharpee_v2/packages/chord/src/phrasebooks.ts"],"names":[],"mappings":";;;AA0BA,yEAAyE;AAC5D,QAAA,mBAAmB,GAAG,IAAI,GAAG,EAA8B,CAAC"}
|
package/version.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* version.ts — the Chord LANGUAGE version (ADR-257).
|
|
3
|
+
*
|
|
4
|
+
* Chord the language carries its own semantic version, **independent of the
|
|
5
|
+
* `@sharpee/*` lockstep** package version: the `@sharpee/chord` npm package
|
|
6
|
+
* rides the platform release train (3.x), while this tracks *the language* and
|
|
7
|
+
* moves only when the author-visible surface changes.
|
|
8
|
+
*
|
|
9
|
+
* Hand-maintained — **not** stamped by the release tooling (`tsf version` /
|
|
10
|
+
* repokit `stampVersions`). Bumped on semver rules (ADR-257 D2): a new construct
|
|
11
|
+
* or additive syntax → **minor**; a removed/renamed construct or a syntax an
|
|
12
|
+
* existing story relied on that no longer parses → **major**; a spec/doc
|
|
13
|
+
* correction with no grammar change → **patch**. Compiler bug fixes, IR-shape
|
|
14
|
+
* refactors, and platform releases do NOT bump it.
|
|
15
|
+
*
|
|
16
|
+
* Distinct from `IR_FORMAT` (ir.ts) — the loader's wire-compat gate. The two move
|
|
17
|
+
* on different triggers (ADR-257 D3): a purely additive language feature bumps
|
|
18
|
+
* this version without touching the format. The `chord.ebnf` surface pin
|
|
19
|
+
* (`tests/language-version.test.ts`, ADR-257 D5) fails the build if the grammar
|
|
20
|
+
* changes without a bump here.
|
|
21
|
+
*
|
|
22
|
+
* **1.1.0 is a recorded one-time override of D2** (ADR-261 Consequences,
|
|
23
|
+
* 2026-07-23). ADR-261 D4's `use scoring` gate stops previously-valid stories
|
|
24
|
+
* from compiling, which D2 defines as a *major*; the owner ruled it ships as a
|
|
25
|
+
* minor anyway rather than amending the rule or softening the gate. The next
|
|
26
|
+
* construct that stops compiling is still a major unless someone rules
|
|
27
|
+
* otherwise again — the exception is cross-noted at ADR-257 D2 so it is
|
|
28
|
+
* discoverable from the rule.
|
|
29
|
+
*
|
|
30
|
+
* **1.2.0** adds the `, announce <mode>` suffix on a `use` line (ADR-262 D3) —
|
|
31
|
+
* purely additive optional grammar, so a minor bump by D2's ordinary rule.
|
|
32
|
+
*
|
|
33
|
+
* **1.3.0** adds the `use hunger` body (ADR-263 D1): `grows N each turn`,
|
|
34
|
+
* `<band> at <n> [says <key>]` rungs, and `fatal at N` — additive grammar, a
|
|
35
|
+
* minor bump.
|
|
36
|
+
*/
|
|
37
|
+
export declare const CHORD_LANGUAGE_VERSION = "1.3.0";
|
|
38
|
+
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../repos/sharpee_v2/packages/chord/src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,sBAAsB,UAAU,CAAC"}
|
package/version.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHORD_LANGUAGE_VERSION = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* version.ts — the Chord LANGUAGE version (ADR-257).
|
|
6
|
+
*
|
|
7
|
+
* Chord the language carries its own semantic version, **independent of the
|
|
8
|
+
* `@sharpee/*` lockstep** package version: the `@sharpee/chord` npm package
|
|
9
|
+
* rides the platform release train (3.x), while this tracks *the language* and
|
|
10
|
+
* moves only when the author-visible surface changes.
|
|
11
|
+
*
|
|
12
|
+
* Hand-maintained — **not** stamped by the release tooling (`tsf version` /
|
|
13
|
+
* repokit `stampVersions`). Bumped on semver rules (ADR-257 D2): a new construct
|
|
14
|
+
* or additive syntax → **minor**; a removed/renamed construct or a syntax an
|
|
15
|
+
* existing story relied on that no longer parses → **major**; a spec/doc
|
|
16
|
+
* correction with no grammar change → **patch**. Compiler bug fixes, IR-shape
|
|
17
|
+
* refactors, and platform releases do NOT bump it.
|
|
18
|
+
*
|
|
19
|
+
* Distinct from `IR_FORMAT` (ir.ts) — the loader's wire-compat gate. The two move
|
|
20
|
+
* on different triggers (ADR-257 D3): a purely additive language feature bumps
|
|
21
|
+
* this version without touching the format. The `chord.ebnf` surface pin
|
|
22
|
+
* (`tests/language-version.test.ts`, ADR-257 D5) fails the build if the grammar
|
|
23
|
+
* changes without a bump here.
|
|
24
|
+
*
|
|
25
|
+
* **1.1.0 is a recorded one-time override of D2** (ADR-261 Consequences,
|
|
26
|
+
* 2026-07-23). ADR-261 D4's `use scoring` gate stops previously-valid stories
|
|
27
|
+
* from compiling, which D2 defines as a *major*; the owner ruled it ships as a
|
|
28
|
+
* minor anyway rather than amending the rule or softening the gate. The next
|
|
29
|
+
* construct that stops compiling is still a major unless someone rules
|
|
30
|
+
* otherwise again — the exception is cross-noted at ADR-257 D2 so it is
|
|
31
|
+
* discoverable from the rule.
|
|
32
|
+
*
|
|
33
|
+
* **1.2.0** adds the `, announce <mode>` suffix on a `use` line (ADR-262 D3) —
|
|
34
|
+
* purely additive optional grammar, so a minor bump by D2's ordinary rule.
|
|
35
|
+
*
|
|
36
|
+
* **1.3.0** adds the `use hunger` body (ADR-263 D1): `grows N each turn`,
|
|
37
|
+
* `<band> at <n> [says <key>]` rungs, and `fatal at N` — additive grammar, a
|
|
38
|
+
* minor bump.
|
|
39
|
+
*/
|
|
40
|
+
exports.CHORD_LANGUAGE_VERSION = '1.3.0';
|
|
41
|
+
//# sourceMappingURL=version.js.map
|
package/version.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../repos/sharpee_v2/packages/chord/src/version.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACU,QAAA,sBAAsB,GAAG,OAAO,CAAC"}
|
package/sharpee-chord-3.0.0.tgz
DELETED
|
Binary file
|