@sharpee/lang-en-us 0.9.65-beta → 0.9.66-beta

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.
Files changed (293) hide show
  1. package/package.json +6 -17
  2. package/dist-npm/actions/about.d.ts +0 -35
  3. package/dist-npm/actions/about.d.ts.map +0 -1
  4. package/dist-npm/actions/about.js +0 -50
  5. package/dist-npm/actions/about.js.map +0 -1
  6. package/dist-npm/actions/again.d.ts +0 -16
  7. package/dist-npm/actions/again.d.ts.map +0 -1
  8. package/dist-npm/actions/again.js +0 -23
  9. package/dist-npm/actions/again.js.map +0 -1
  10. package/dist-npm/actions/answering.d.ts +0 -29
  11. package/dist-npm/actions/answering.d.ts.map +0 -1
  12. package/dist-npm/actions/answering.js +0 -44
  13. package/dist-npm/actions/answering.js.map +0 -1
  14. package/dist-npm/actions/asking.d.ts +0 -31
  15. package/dist-npm/actions/asking.d.ts.map +0 -1
  16. package/dist-npm/actions/asking.js +0 -44
  17. package/dist-npm/actions/asking.js.map +0 -1
  18. package/dist-npm/actions/attacking.d.ts +0 -82
  19. package/dist-npm/actions/attacking.d.ts.map +0 -1
  20. package/dist-npm/actions/attacking.js +0 -111
  21. package/dist-npm/actions/attacking.js.map +0 -1
  22. package/dist-npm/actions/climbing.d.ts +0 -27
  23. package/dist-npm/actions/climbing.d.ts.map +0 -1
  24. package/dist-npm/actions/climbing.js +0 -48
  25. package/dist-npm/actions/climbing.js.map +0 -1
  26. package/dist-npm/actions/closing.d.ts +0 -21
  27. package/dist-npm/actions/closing.d.ts.map +0 -1
  28. package/dist-npm/actions/closing.js +0 -27
  29. package/dist-npm/actions/closing.js.map +0 -1
  30. package/dist-npm/actions/drinking.d.ts +0 -40
  31. package/dist-npm/actions/drinking.d.ts.map +0 -1
  32. package/dist-npm/actions/drinking.js +0 -57
  33. package/dist-npm/actions/drinking.js.map +0 -1
  34. package/dist-npm/actions/dropping.d.ts +0 -22
  35. package/dist-npm/actions/dropping.d.ts.map +0 -1
  36. package/dist-npm/actions/dropping.js +0 -31
  37. package/dist-npm/actions/dropping.js.map +0 -1
  38. package/dist-npm/actions/eating.d.ts +0 -37
  39. package/dist-npm/actions/eating.d.ts.map +0 -1
  40. package/dist-npm/actions/eating.js +0 -54
  41. package/dist-npm/actions/eating.js.map +0 -1
  42. package/dist-npm/actions/entering.d.ts +0 -26
  43. package/dist-npm/actions/entering.d.ts.map +0 -1
  44. package/dist-npm/actions/entering.js +0 -49
  45. package/dist-npm/actions/entering.js.map +0 -1
  46. package/dist-npm/actions/examining.d.ts +0 -37
  47. package/dist-npm/actions/examining.d.ts.map +0 -1
  48. package/dist-npm/actions/examining.js +0 -50
  49. package/dist-npm/actions/examining.js.map +0 -1
  50. package/dist-npm/actions/exiting.d.ts +0 -23
  51. package/dist-npm/actions/exiting.d.ts.map +0 -1
  52. package/dist-npm/actions/exiting.js +0 -40
  53. package/dist-npm/actions/exiting.js.map +0 -1
  54. package/dist-npm/actions/giving.d.ts +0 -30
  55. package/dist-npm/actions/giving.d.ts.map +0 -1
  56. package/dist-npm/actions/giving.js +0 -45
  57. package/dist-npm/actions/giving.js.map +0 -1
  58. package/dist-npm/actions/going.d.ts +0 -35
  59. package/dist-npm/actions/going.d.ts.map +0 -1
  60. package/dist-npm/actions/going.js +0 -45
  61. package/dist-npm/actions/going.js.map +0 -1
  62. package/dist-npm/actions/help.d.ts +0 -26
  63. package/dist-npm/actions/help.d.ts.map +0 -1
  64. package/dist-npm/actions/help.js +0 -44
  65. package/dist-npm/actions/help.js.map +0 -1
  66. package/dist-npm/actions/index.d.ts +0 -1327
  67. package/dist-npm/actions/index.d.ts.map +0 -1
  68. package/dist-npm/actions/index.js +0 -208
  69. package/dist-npm/actions/index.js.map +0 -1
  70. package/dist-npm/actions/inserting.d.ts +0 -25
  71. package/dist-npm/actions/inserting.d.ts.map +0 -1
  72. package/dist-npm/actions/inserting.js +0 -33
  73. package/dist-npm/actions/inserting.js.map +0 -1
  74. package/dist-npm/actions/inventory.d.ts +0 -32
  75. package/dist-npm/actions/inventory.d.ts.map +0 -1
  76. package/dist-npm/actions/inventory.js +0 -41
  77. package/dist-npm/actions/inventory.js.map +0 -1
  78. package/dist-npm/actions/listening.d.ts +0 -26
  79. package/dist-npm/actions/listening.d.ts.map +0 -1
  80. package/dist-npm/actions/listening.js +0 -37
  81. package/dist-npm/actions/listening.js.map +0 -1
  82. package/dist-npm/actions/locking.d.ts +0 -25
  83. package/dist-npm/actions/locking.d.ts.map +0 -1
  84. package/dist-npm/actions/locking.js +0 -33
  85. package/dist-npm/actions/locking.js.map +0 -1
  86. package/dist-npm/actions/looking.d.ts +0 -23
  87. package/dist-npm/actions/looking.d.ts.map +0 -1
  88. package/dist-npm/actions/looking.js +0 -34
  89. package/dist-npm/actions/looking.js.map +0 -1
  90. package/dist-npm/actions/lowering.d.ts +0 -22
  91. package/dist-npm/actions/lowering.d.ts.map +0 -1
  92. package/dist-npm/actions/lowering.js +0 -29
  93. package/dist-npm/actions/lowering.js.map +0 -1
  94. package/dist-npm/actions/opening.d.ts +0 -23
  95. package/dist-npm/actions/opening.d.ts.map +0 -1
  96. package/dist-npm/actions/opening.js +0 -30
  97. package/dist-npm/actions/opening.js.map +0 -1
  98. package/dist-npm/actions/pulling.d.ts +0 -35
  99. package/dist-npm/actions/pulling.d.ts.map +0 -1
  100. package/dist-npm/actions/pulling.js +0 -53
  101. package/dist-npm/actions/pulling.js.map +0 -1
  102. package/dist-npm/actions/pushing.d.ts +0 -30
  103. package/dist-npm/actions/pushing.d.ts.map +0 -1
  104. package/dist-npm/actions/pushing.js +0 -45
  105. package/dist-npm/actions/pushing.js.map +0 -1
  106. package/dist-npm/actions/putting.d.ts +0 -28
  107. package/dist-npm/actions/putting.d.ts.map +0 -1
  108. package/dist-npm/actions/putting.js +0 -40
  109. package/dist-npm/actions/putting.js.map +0 -1
  110. package/dist-npm/actions/quitting.d.ts +0 -31
  111. package/dist-npm/actions/quitting.d.ts.map +0 -1
  112. package/dist-npm/actions/quitting.js +0 -47
  113. package/dist-npm/actions/quitting.js.map +0 -1
  114. package/dist-npm/actions/raising.d.ts +0 -22
  115. package/dist-npm/actions/raising.d.ts.map +0 -1
  116. package/dist-npm/actions/raising.js +0 -30
  117. package/dist-npm/actions/raising.js.map +0 -1
  118. package/dist-npm/actions/reading.d.ts +0 -23
  119. package/dist-npm/actions/reading.d.ts.map +0 -1
  120. package/dist-npm/actions/reading.js +0 -32
  121. package/dist-npm/actions/reading.js.map +0 -1
  122. package/dist-npm/actions/removing.d.ts +0 -25
  123. package/dist-npm/actions/removing.d.ts.map +0 -1
  124. package/dist-npm/actions/removing.js +0 -34
  125. package/dist-npm/actions/removing.js.map +0 -1
  126. package/dist-npm/actions/restoring.d.ts +0 -35
  127. package/dist-npm/actions/restoring.d.ts.map +0 -1
  128. package/dist-npm/actions/restoring.js +0 -51
  129. package/dist-npm/actions/restoring.js.map +0 -1
  130. package/dist-npm/actions/saving.d.ts +0 -33
  131. package/dist-npm/actions/saving.d.ts.map +0 -1
  132. package/dist-npm/actions/saving.js +0 -48
  133. package/dist-npm/actions/saving.js.map +0 -1
  134. package/dist-npm/actions/scoring.d.ts +0 -42
  135. package/dist-npm/actions/scoring.d.ts.map +0 -1
  136. package/dist-npm/actions/scoring.js +0 -70
  137. package/dist-npm/actions/scoring.js.map +0 -1
  138. package/dist-npm/actions/searching.d.ts +0 -26
  139. package/dist-npm/actions/searching.d.ts.map +0 -1
  140. package/dist-npm/actions/searching.js +0 -40
  141. package/dist-npm/actions/searching.js.map +0 -1
  142. package/dist-npm/actions/showing.d.ts +0 -29
  143. package/dist-npm/actions/showing.d.ts.map +0 -1
  144. package/dist-npm/actions/showing.js +0 -40
  145. package/dist-npm/actions/showing.js.map +0 -1
  146. package/dist-npm/actions/sleeping.d.ts +0 -28
  147. package/dist-npm/actions/sleeping.d.ts.map +0 -1
  148. package/dist-npm/actions/sleeping.js +0 -41
  149. package/dist-npm/actions/sleeping.js.map +0 -1
  150. package/dist-npm/actions/smelling.d.ts +0 -30
  151. package/dist-npm/actions/smelling.d.ts.map +0 -1
  152. package/dist-npm/actions/smelling.js +0 -43
  153. package/dist-npm/actions/smelling.js.map +0 -1
  154. package/dist-npm/actions/switching-off.d.ts +0 -28
  155. package/dist-npm/actions/switching-off.d.ts.map +0 -1
  156. package/dist-npm/actions/switching-off.js +0 -42
  157. package/dist-npm/actions/switching-off.js.map +0 -1
  158. package/dist-npm/actions/switching-on.d.ts +0 -28
  159. package/dist-npm/actions/switching-on.d.ts.map +0 -1
  160. package/dist-npm/actions/switching-on.js +0 -42
  161. package/dist-npm/actions/switching-on.js.map +0 -1
  162. package/dist-npm/actions/taking-off.d.ts +0 -20
  163. package/dist-npm/actions/taking-off.d.ts.map +0 -1
  164. package/dist-npm/actions/taking-off.js +0 -28
  165. package/dist-npm/actions/taking-off.js.map +0 -1
  166. package/dist-npm/actions/taking.d.ts +0 -26
  167. package/dist-npm/actions/taking.d.ts.map +0 -1
  168. package/dist-npm/actions/taking.js +0 -36
  169. package/dist-npm/actions/taking.js.map +0 -1
  170. package/dist-npm/actions/talking.d.ts +0 -33
  171. package/dist-npm/actions/talking.d.ts.map +0 -1
  172. package/dist-npm/actions/talking.js +0 -49
  173. package/dist-npm/actions/talking.js.map +0 -1
  174. package/dist-npm/actions/telling.d.ts +0 -30
  175. package/dist-npm/actions/telling.d.ts.map +0 -1
  176. package/dist-npm/actions/telling.js +0 -42
  177. package/dist-npm/actions/telling.js.map +0 -1
  178. package/dist-npm/actions/throwing.d.ts +0 -39
  179. package/dist-npm/actions/throwing.d.ts.map +0 -1
  180. package/dist-npm/actions/throwing.js +0 -60
  181. package/dist-npm/actions/throwing.js.map +0 -1
  182. package/dist-npm/actions/touching.d.ts +0 -36
  183. package/dist-npm/actions/touching.d.ts.map +0 -1
  184. package/dist-npm/actions/touching.js +0 -50
  185. package/dist-npm/actions/touching.js.map +0 -1
  186. package/dist-npm/actions/turning.d.ts +0 -40
  187. package/dist-npm/actions/turning.d.ts.map +0 -1
  188. package/dist-npm/actions/turning.js +0 -62
  189. package/dist-npm/actions/turning.js.map +0 -1
  190. package/dist-npm/actions/undoing.d.ts +0 -19
  191. package/dist-npm/actions/undoing.d.ts.map +0 -1
  192. package/dist-npm/actions/undoing.js +0 -26
  193. package/dist-npm/actions/undoing.js.map +0 -1
  194. package/dist-npm/actions/unlocking.d.ts +0 -25
  195. package/dist-npm/actions/unlocking.d.ts.map +0 -1
  196. package/dist-npm/actions/unlocking.js +0 -32
  197. package/dist-npm/actions/unlocking.js.map +0 -1
  198. package/dist-npm/actions/using.d.ts +0 -43
  199. package/dist-npm/actions/using.d.ts.map +0 -1
  200. package/dist-npm/actions/using.js +0 -61
  201. package/dist-npm/actions/using.js.map +0 -1
  202. package/dist-npm/actions/version.d.ts +0 -18
  203. package/dist-npm/actions/version.d.ts.map +0 -1
  204. package/dist-npm/actions/version.js +0 -26
  205. package/dist-npm/actions/version.js.map +0 -1
  206. package/dist-npm/actions/waiting.d.ts +0 -27
  207. package/dist-npm/actions/waiting.d.ts.map +0 -1
  208. package/dist-npm/actions/waiting.js +0 -36
  209. package/dist-npm/actions/waiting.js.map +0 -1
  210. package/dist-npm/actions/wearing.d.ts +0 -22
  211. package/dist-npm/actions/wearing.d.ts.map +0 -1
  212. package/dist-npm/actions/wearing.js +0 -30
  213. package/dist-npm/actions/wearing.js.map +0 -1
  214. package/dist-npm/data/events.d.ts +0 -134
  215. package/dist-npm/data/events.d.ts.map +0 -1
  216. package/dist-npm/data/events.js +0 -301
  217. package/dist-npm/data/events.js.map +0 -1
  218. package/dist-npm/data/messages.d.ts +0 -141
  219. package/dist-npm/data/messages.d.ts.map +0 -1
  220. package/dist-npm/data/messages.js +0 -300
  221. package/dist-npm/data/messages.js.map +0 -1
  222. package/dist-npm/data/templates.d.ts +0 -257
  223. package/dist-npm/data/templates.d.ts.map +0 -1
  224. package/dist-npm/data/templates.js +0 -289
  225. package/dist-npm/data/templates.js.map +0 -1
  226. package/dist-npm/data/verbs.d.ts +0 -68
  227. package/dist-npm/data/verbs.d.ts.map +0 -1
  228. package/dist-npm/data/verbs.js +0 -324
  229. package/dist-npm/data/verbs.js.map +0 -1
  230. package/dist-npm/data/words.d.ts +0 -79
  231. package/dist-npm/data/words.d.ts.map +0 -1
  232. package/dist-npm/data/words.js +0 -218
  233. package/dist-npm/data/words.js.map +0 -1
  234. package/dist-npm/events/index.d.ts +0 -8
  235. package/dist-npm/events/index.d.ts.map +0 -1
  236. package/dist-npm/events/index.js +0 -12
  237. package/dist-npm/events/index.js.map +0 -1
  238. package/dist-npm/events/revealed.d.ts +0 -19
  239. package/dist-npm/events/revealed.d.ts.map +0 -1
  240. package/dist-npm/events/revealed.js +0 -36
  241. package/dist-npm/events/revealed.js.map +0 -1
  242. package/dist-npm/formatters/article.d.ts +0 -41
  243. package/dist-npm/formatters/article.d.ts.map +0 -1
  244. package/dist-npm/formatters/article.js +0 -143
  245. package/dist-npm/formatters/article.js.map +0 -1
  246. package/dist-npm/formatters/index.d.ts +0 -18
  247. package/dist-npm/formatters/index.d.ts.map +0 -1
  248. package/dist-npm/formatters/index.js +0 -38
  249. package/dist-npm/formatters/index.js.map +0 -1
  250. package/dist-npm/formatters/list.d.ts +0 -38
  251. package/dist-npm/formatters/list.d.ts.map +0 -1
  252. package/dist-npm/formatters/list.js +0 -94
  253. package/dist-npm/formatters/list.js.map +0 -1
  254. package/dist-npm/formatters/registry.d.ts +0 -48
  255. package/dist-npm/formatters/registry.d.ts.map +0 -1
  256. package/dist-npm/formatters/registry.js +0 -128
  257. package/dist-npm/formatters/registry.js.map +0 -1
  258. package/dist-npm/formatters/text.d.ts +0 -33
  259. package/dist-npm/formatters/text.d.ts.map +0 -1
  260. package/dist-npm/formatters/text.js +0 -80
  261. package/dist-npm/formatters/text.js.map +0 -1
  262. package/dist-npm/formatters/types.d.ts +0 -41
  263. package/dist-npm/formatters/types.d.ts.map +0 -1
  264. package/dist-npm/formatters/types.js +0 -14
  265. package/dist-npm/formatters/types.js.map +0 -1
  266. package/dist-npm/grammar.d.ts +0 -189
  267. package/dist-npm/grammar.d.ts.map +0 -1
  268. package/dist-npm/grammar.js +0 -203
  269. package/dist-npm/grammar.js.map +0 -1
  270. package/dist-npm/index.d.ts +0 -22
  271. package/dist-npm/index.d.ts.map +0 -1
  272. package/dist-npm/index.js +0 -59
  273. package/dist-npm/index.js.map +0 -1
  274. package/dist-npm/language-provider.d.ts +0 -159
  275. package/dist-npm/language-provider.d.ts.map +0 -1
  276. package/dist-npm/language-provider.js +0 -527
  277. package/dist-npm/language-provider.js.map +0 -1
  278. package/dist-npm/npc/index.d.ts +0 -5
  279. package/dist-npm/npc/index.d.ts.map +0 -1
  280. package/dist-npm/npc/index.js +0 -21
  281. package/dist-npm/npc/index.js.map +0 -1
  282. package/dist-npm/npc/npc.d.ts +0 -43
  283. package/dist-npm/npc/npc.d.ts.map +0 -1
  284. package/dist-npm/npc/npc.js +0 -55
  285. package/dist-npm/npc/npc.js.map +0 -1
  286. package/dist-npm/perspective/index.d.ts +0 -5
  287. package/dist-npm/perspective/index.d.ts.map +0 -1
  288. package/dist-npm/perspective/index.js +0 -12
  289. package/dist-npm/perspective/index.js.map +0 -1
  290. package/dist-npm/perspective/placeholder-resolver.d.ts +0 -102
  291. package/dist-npm/perspective/placeholder-resolver.d.ts.map +0 -1
  292. package/dist-npm/perspective/placeholder-resolver.js +0 -275
  293. package/dist-npm/perspective/placeholder-resolver.js.map +0 -1
package/dist-npm/index.js DELETED
@@ -1,59 +0,0 @@
1
- "use strict";
2
- /**
3
- * English (US) Language Package for Sharpee IF Platform
4
- *
5
- * Provides English language support including:
6
- * - Vocabulary (verbs, nouns, adjectives, etc.)
7
- * - Grammar patterns
8
- * - Text formatting and lemmatization
9
- * - Message templates
10
- * - Action patterns and messages
11
- * - NPC messages (ADR-070)
12
- */
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
- };
27
- var __importDefault = (this && this.__importDefault) || function (mod) {
28
- return (mod && mod.__esModule) ? mod : { "default": mod };
29
- };
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.getParserErrorMessage = exports.parserErrors = exports.irregularPlurals = exports.abbreviations = exports.englishWords = exports.directionMap = exports.ordinalNumbers = exports.cardinalNumbers = exports.LanguageProvider = exports.default = exports.EnglishLanguageProvider = void 0;
32
- var language_provider_1 = require("./language-provider");
33
- Object.defineProperty(exports, "EnglishLanguageProvider", { enumerable: true, get: function () { return language_provider_1.EnglishLanguageProvider; } });
34
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(language_provider_1).default; } });
35
- var language_provider_2 = require("./language-provider"); // For convenience
36
- Object.defineProperty(exports, "LanguageProvider", { enumerable: true, get: function () { return language_provider_2.EnglishLanguageProvider; } });
37
- // Export grammar types and constants
38
- __exportStar(require("./grammar"), exports);
39
- // Export action language definitions
40
- __exportStar(require("./actions"), exports);
41
- // Export NPC language definitions (ADR-070)
42
- __exportStar(require("./npc"), exports);
43
- // Export perspective placeholder resolution (ADR-089)
44
- __exportStar(require("./perspective"), exports);
45
- // Export formatter system (ADR-095)
46
- __exportStar(require("./formatters"), exports);
47
- // Export vocabulary data for parser use (ADR-082)
48
- var words_1 = require("./data/words");
49
- Object.defineProperty(exports, "cardinalNumbers", { enumerable: true, get: function () { return words_1.cardinalNumbers; } });
50
- Object.defineProperty(exports, "ordinalNumbers", { enumerable: true, get: function () { return words_1.ordinalNumbers; } });
51
- Object.defineProperty(exports, "directionMap", { enumerable: true, get: function () { return words_1.directionMap; } });
52
- Object.defineProperty(exports, "englishWords", { enumerable: true, get: function () { return words_1.englishWords; } });
53
- Object.defineProperty(exports, "abbreviations", { enumerable: true, get: function () { return words_1.abbreviations; } });
54
- Object.defineProperty(exports, "irregularPlurals", { enumerable: true, get: function () { return words_1.irregularPlurals; } });
55
- // Export parser error messages (Phase 1.2 recommendations)
56
- var messages_1 = require("./data/messages");
57
- Object.defineProperty(exports, "parserErrors", { enumerable: true, get: function () { return messages_1.parserErrors; } });
58
- Object.defineProperty(exports, "getParserErrorMessage", { enumerable: true, get: function () { return messages_1.getParserErrorMessage; } });
59
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;AAEH,yDAAuE;AAA9D,4HAAA,uBAAuB,OAAA;AAAE,6HAAA,OAAO,OAAA;AACzC,yDAAkF,CAAC,kBAAkB;AAA5F,qHAAA,uBAAuB,OAAoB;AAKpD,qCAAqC;AACrC,4CAA0B;AAE1B,qCAAqC;AACrC,4CAA0B;AAE1B,4CAA4C;AAC5C,wCAAsB;AAEtB,sDAAsD;AACtD,gDAA8B;AAE9B,oCAAoC;AACpC,+CAA6B;AAE7B,kDAAkD;AAClD,sCAOsB;AANpB,wGAAA,eAAe,OAAA;AACf,uGAAA,cAAc,OAAA;AACd,qGAAA,YAAY,OAAA;AACZ,qGAAA,YAAY,OAAA;AACZ,sGAAA,aAAa,OAAA;AACb,yGAAA,gBAAgB,OAAA;AAGlB,2DAA2D;AAC3D,4CAAsE;AAA7D,wGAAA,YAAY,OAAA;AAAE,iHAAA,qBAAqB,OAAA"}
@@ -1,159 +0,0 @@
1
- /**
2
- * English Language Provider
3
- *
4
- * Self-contained language implementation with no external dependencies
5
- * Enhanced to support getMessage interface for text service
6
- */
7
- import { ParserLanguageProvider, ActionHelp, VerbVocabulary, DirectionVocabulary, SpecialVocabulary, LanguageGrammarPattern } from "../../if-domain/dist-npm/src/index";
8
- import { NarrativeContext } from './perspective';
9
- import { FormatterRegistry, FormatterContext, EntityInfo } from './formatters';
10
- /**
11
- * English language data and rules
12
- */
13
- export declare class EnglishLanguageProvider implements ParserLanguageProvider {
14
- readonly languageCode = "en-US";
15
- readonly languageName = "English (US)";
16
- readonly textDirection: "ltr";
17
- private messages;
18
- private customActionPatterns;
19
- private narrativeContext;
20
- private formatterRegistry;
21
- private entityLookup?;
22
- constructor();
23
- /**
24
- * Load core system messages (command failures, etc.)
25
- * These are used by text-service for command.failed events
26
- */
27
- private loadCoreMessages;
28
- /**
29
- * Set narrative settings for perspective-aware message resolution (ADR-089)
30
- *
31
- * This should be called by the engine after loading a story to configure
32
- * how {You}, {your}, {take} placeholders are resolved.
33
- *
34
- * @param settings Narrative settings from story config
35
- */
36
- setNarrativeSettings(settings: NarrativeContext): void;
37
- /**
38
- * Get current narrative context
39
- */
40
- getNarrativeContext(): NarrativeContext;
41
- /**
42
- * Load messages from all action language definitions
43
- */
44
- private loadActionMessages;
45
- /**
46
- * Load NPC messages (ADR-070)
47
- */
48
- private loadNpcMessages;
49
- /**
50
- * Get a message by its ID with optional parameter substitution
51
- *
52
- * Supports three types of placeholders:
53
- * 1. Perspective placeholders (ADR-089): {You}, {your}, {take}, etc.
54
- * - Resolved based on narrative context (1st/2nd/3rd person)
55
- * 2. Formatted placeholders (ADR-095): {a:item}, {items:list}, etc.
56
- * - Applies formatters before substitution
57
- * 3. Simple placeholders: {item}, {target}, etc.
58
- * - Replaced with values from params object
59
- *
60
- * @param messageId Full message ID (e.g., 'if.action.taking.taken')
61
- * @param params Parameters to substitute in the message
62
- * @returns The resolved message text, or null if not found
63
- */
64
- getMessage(messageId: string, params?: Record<string, any>): string;
65
- /**
66
- * Set entity lookup function for formatters (ADR-095)
67
- *
68
- * This allows formatters to look up entity info (nounType, etc.)
69
- * for proper article selection.
70
- *
71
- * @param lookup Function that returns EntityInfo for an entity ID
72
- */
73
- setEntityLookup(lookup: (id: string) => EntityInfo | undefined): void;
74
- /**
75
- * Register a custom formatter (ADR-095)
76
- *
77
- * Stories can register custom formatters for special formatting needs.
78
- *
79
- * @param name Formatter name (used in templates as {name:placeholder})
80
- * @param formatter Formatter function
81
- */
82
- registerFormatter(name: string, formatter: (value: any, context: FormatterContext) => string): void;
83
- /**
84
- * Get the formatter registry (for testing or advanced use)
85
- */
86
- getFormatterRegistry(): FormatterRegistry;
87
- /**
88
- * Check if a message exists
89
- * @param messageId The message identifier
90
- * @returns True if the message exists
91
- */
92
- hasMessage(messageId: string): boolean;
93
- /**
94
- * Get patterns/aliases for an action
95
- * @param actionId The action identifier (e.g., 'if.action.taking')
96
- * @returns Array of patterns or undefined if action not found
97
- */
98
- getActionPatterns(actionId: string): string[] | undefined;
99
- /**
100
- * Get structured help information for an action
101
- * @param actionId The action identifier (e.g., 'if.action.taking')
102
- * @returns Structured help information or undefined if not found
103
- */
104
- getActionHelp(actionId: string): ActionHelp | undefined;
105
- /**
106
- * Get all supported actions
107
- * @returns Array of action IDs
108
- */
109
- getSupportedActions(): string[];
110
- /**
111
- * Get entity name/description
112
- * @param entity Entity object or ID
113
- * @returns Entity name or fallback
114
- */
115
- getEntityName(entity: any): string;
116
- /**
117
- * Get all messages for a given action
118
- * @param actionId Action identifier
119
- * @returns Map of message keys to messages
120
- */
121
- getActionMessages(actionId: string): Map<string, string> | null;
122
- getVerbs(): VerbVocabulary[];
123
- getDirections(): DirectionVocabulary[];
124
- getSpecialVocabulary(): SpecialVocabulary;
125
- getCommonAdjectives(): string[];
126
- getCommonNouns(): string[];
127
- getPrepositions(): string[];
128
- getDeterminers(): string[];
129
- getConjunctions(): string[];
130
- getNumbers(): string[];
131
- getGrammarPatterns(): LanguageGrammarPattern[];
132
- lemmatize(word: string): string;
133
- expandAbbreviation(abbreviation: string): string | null;
134
- formatList(items: string[], conjunction?: 'and' | 'or'): string;
135
- getIndefiniteArticle(noun: string): string;
136
- pluralize(noun: string): string;
137
- isIgnoreWord(word: string): boolean;
138
- /**
139
- * Add a custom message to the language provider
140
- * @param messageId The message identifier (e.g., 'custom.action.message')
141
- * @param template The message template with optional {param} placeholders
142
- */
143
- addMessage(messageId: string, template: string): void;
144
- /**
145
- * Add help information for a custom action
146
- * @param actionId The action identifier (e.g., 'custom.action.foo')
147
- * @param help The help information including usage, description, examples
148
- */
149
- addActionHelp(actionId: string, help: ActionHelp): void;
150
- /**
151
- * Add custom patterns/aliases for an action
152
- * @param actionId The action identifier
153
- * @param patterns Array of verb patterns/aliases
154
- */
155
- addActionPatterns(actionId: string, patterns: string[]): void;
156
- }
157
- declare const _default: EnglishLanguageProvider;
158
- export default _default;
159
- //# sourceMappingURL=language-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"language-provider.d.ts","sourceRoot":"","sources":["../../../../src/language-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoB,sBAAsB,EAAE,UAAU,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAK1K,OAAO,EACL,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACX,MAAM,cAAc,CAAC;AAItB;;GAEG;AACH,qBAAa,uBAAwB,YAAW,sBAAsB;IACpE,QAAQ,CAAC,YAAY,WAAW;IAChC,QAAQ,CAAC,YAAY,kBAAkB;IACvC,QAAQ,CAAC,aAAa,EAAG,KAAK,CAAU;IAGxC,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,oBAAoB,CAA+B;IAG3D,OAAO,CAAC,gBAAgB,CAA+C;IAGvE,OAAO,CAAC,iBAAiB,CAAoB;IAG7C,OAAO,CAAC,YAAY,CAAC,CAAyC;;IAa9D;;;OAGG;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