rpg-engine 0.23.1 → 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.
Files changed (124) hide show
  1. package/README.md +2 -2
  2. package/dist/campaign/create-campaign.d.ts +1 -1
  3. package/dist/campaign/create-campaign.js +1 -1
  4. package/dist/campaign/find-campaign.js +11 -1
  5. package/dist/campaign/host-files.d.ts +5 -6
  6. package/dist/campaign/host-files.js +100 -60
  7. package/dist/campaign/settings.d.ts +3 -3
  8. package/dist/campaign/settings.js +5 -4
  9. package/dist/cli/cli.js +11 -2
  10. package/dist/commands/config/config.js +1 -1
  11. package/dist/commands/config/dashboard.js +23 -6
  12. package/dist/commands/config/words.js +1 -0
  13. package/dist/commands/image.js +3 -3
  14. package/dist/commands/import/import.d.ts +3 -1
  15. package/dist/commands/import/import.js +13 -5
  16. package/dist/commands/instructions.js +1 -1
  17. package/dist/commands/shared/campaign/images.js +3 -2
  18. package/dist/commands/shared/campaign/mode.js +1 -1
  19. package/dist/commands/shared/characters/voices.d.ts +2 -2
  20. package/dist/commands/shared/characters/voices.js +9 -9
  21. package/dist/commands/shared/sheet/sheet.d.ts +2 -2
  22. package/dist/commands/shared/sheet/sheet.js +3 -3
  23. package/dist/core/context.d.ts +8 -2
  24. package/dist/dashboard/acts/acts.js +39 -11
  25. package/dist/dashboard/acts/head.js +7 -0
  26. package/dist/dashboard/acts/names.js +4 -2
  27. package/dist/dashboard/acts/sending.js +23 -22
  28. package/dist/dashboard/acts/sheet.js +7 -149
  29. package/dist/dashboard/acts/strip.js +10 -14
  30. package/dist/dashboard/acts/talk.js +51 -0
  31. package/dist/dashboard/acts/thing.js +169 -0
  32. package/dist/dashboard/app.js +3 -3
  33. package/dist/dashboard/guide/ar.md +13 -13
  34. package/dist/dashboard/guide/cs.md +12 -12
  35. package/dist/dashboard/guide/da.md +12 -12
  36. package/dist/dashboard/guide/de.md +11 -11
  37. package/dist/dashboard/guide/el.md +11 -11
  38. package/dist/dashboard/guide/en.md +10 -10
  39. package/dist/dashboard/guide/es.md +11 -11
  40. package/dist/dashboard/guide/fi.md +11 -11
  41. package/dist/dashboard/guide/fr.md +12 -12
  42. package/dist/dashboard/guide/he.md +11 -11
  43. package/dist/dashboard/guide/hi.md +11 -11
  44. package/dist/dashboard/guide/hu.md +11 -11
  45. package/dist/dashboard/guide/is.md +11 -11
  46. package/dist/dashboard/guide/it.md +38 -38
  47. package/dist/dashboard/guide/ja.md +11 -11
  48. package/dist/dashboard/guide/ko.md +12 -12
  49. package/dist/dashboard/guide/nb.md +11 -11
  50. package/dist/dashboard/guide/nl.md +11 -11
  51. package/dist/dashboard/guide/pl.md +11 -11
  52. package/dist/dashboard/guide/pt.md +11 -11
  53. package/dist/dashboard/guide/ro.md +12 -12
  54. package/dist/dashboard/guide/ru.md +12 -12
  55. package/dist/dashboard/guide/sv.md +12 -12
  56. package/dist/dashboard/guide/tr.md +12 -12
  57. package/dist/dashboard/guide/uk.md +11 -11
  58. package/dist/dashboard/guide/zh.md +12 -12
  59. package/dist/dashboard/i18n/ar.json +24 -10
  60. package/dist/dashboard/i18n/cs.json +24 -10
  61. package/dist/dashboard/i18n/da.json +24 -10
  62. package/dist/dashboard/i18n/de.json +24 -10
  63. package/dist/dashboard/i18n/el.json +24 -10
  64. package/dist/dashboard/i18n/es.json +24 -10
  65. package/dist/dashboard/i18n/fi.json +24 -10
  66. package/dist/dashboard/i18n/fr.json +24 -10
  67. package/dist/dashboard/i18n/he.json +24 -10
  68. package/dist/dashboard/i18n/hi.json +24 -10
  69. package/dist/dashboard/i18n/hu.json +24 -10
  70. package/dist/dashboard/i18n/is.json +24 -10
  71. package/dist/dashboard/i18n/it.json +102 -88
  72. package/dist/dashboard/i18n/ja.json +24 -10
  73. package/dist/dashboard/i18n/ko.json +24 -10
  74. package/dist/dashboard/i18n/nb.json +24 -10
  75. package/dist/dashboard/i18n/nl.json +24 -10
  76. package/dist/dashboard/i18n/pl.json +24 -10
  77. package/dist/dashboard/i18n/pt.json +24 -10
  78. package/dist/dashboard/i18n/ro.json +24 -10
  79. package/dist/dashboard/i18n/ru.json +24 -10
  80. package/dist/dashboard/i18n/sv.json +24 -10
  81. package/dist/dashboard/i18n/tr.json +24 -10
  82. package/dist/dashboard/i18n/uk.json +24 -10
  83. package/dist/dashboard/i18n/zh.json +24 -10
  84. package/dist/dashboard/packages/packages.js +1 -1
  85. package/dist/dashboard/parts/icons.js +2 -0
  86. package/dist/dashboard/parts/labels.js +1 -0
  87. package/dist/dashboard/parts/layout.js +34 -0
  88. package/dist/dashboard/parts/widgets.js +6 -2
  89. package/dist/dashboard/settings/language-choice.js +1 -1
  90. package/dist/dashboard/settings/settings.js +61 -36
  91. package/dist/dashboard/settings/tabs.js +14 -0
  92. package/dist/dashboard/sheet/sheet.js +54 -33
  93. package/dist/dashboard/shell/notices.js +2 -2
  94. package/dist/dashboard/style.css +122 -47
  95. package/dist/helpers/antigravity.d.ts +47 -0
  96. package/dist/helpers/antigravity.js +434 -0
  97. package/dist/helpers/chosen.d.ts +11 -7
  98. package/dist/helpers/chosen.js +64 -37
  99. package/dist/helpers/index.d.ts +1 -0
  100. package/dist/helpers/index.js +2 -1
  101. package/dist/helpers/opencode.js +117 -24
  102. package/dist/helpers/programs.d.ts +8 -0
  103. package/dist/helpers/programs.js +35 -2
  104. package/dist/helpers/stop.d.ts +2 -0
  105. package/dist/helpers/stop.js +20 -1
  106. package/dist/helpers/svg.d.ts +4 -1
  107. package/dist/helpers/svg.js +16 -4
  108. package/dist/instructions/index.d.ts +4 -2
  109. package/dist/instructions/index.js +6 -3
  110. package/dist/server/bell/antigravity.d.ts +7 -2
  111. package/dist/server/bell/antigravity.js +24 -6
  112. package/dist/server/bell/index.d.ts +1 -1
  113. package/dist/server/bell/index.js +1 -1
  114. package/dist/server/bell/listener.js +6 -1
  115. package/dist/server/fence.d.ts +21 -0
  116. package/dist/server/fence.js +69 -0
  117. package/dist/server/mcp.js +26 -0
  118. package/dist/server/player-acts.js +1 -1
  119. package/dist/server/subagent.d.ts +4 -0
  120. package/dist/server/subagent.js +30 -0
  121. package/instructions/voices-antigravity.md +1 -0
  122. package/instructions/voices-codex.md +1 -0
  123. package/instructions/voices-opencode.md +1 -1
  124. package/package.json +1 -1
@@ -721,7 +721,7 @@
721
721
 
722
722
  /* The game's second line inside the cards (D-528): an outline that takes no room, in the colour of their edge; and their corners, cut, notched or
723
723
  scooped, where the browser draws them, else round. */
724
- :is(.card, .group, .band, .rolls-card, .turns-card, .settings-group, .scene-now, .quest-card, .note-card, .save-card, .chapter) {
724
+ :is(.card, .group, .band, .rolls-card, .turns-card, .scene-now, .quest-card, .note-card, .save-card, .chapter) {
725
725
  outline: 1px var(--card-inner-line) color-mix(in srgb, var(--card-edge) 70%, transparent);
726
726
  outline-offset: -5px;
727
727
  corner-shape: var(--card-corner, round);
@@ -1930,8 +1930,8 @@
1930
1930
  font-weight: 600;
1931
1931
  }
1932
1932
 
1933
- /* A name that acts (D-495): the name acts, the number rolls. A dotted line in the accent under it and a chevron after it; in a chip or a line, its whole
1934
- width the target. */
1933
+ /* A name that opens its card (D-495, D-581): the name acts, the number rolls. A dotted line in the accent under it, its one sign; in a chip or a line, its
1934
+ whole width the target. */
1935
1935
  .act {
1936
1936
  display: inline-block;
1937
1937
  max-width: 100%;
@@ -1955,13 +1955,6 @@
1955
1955
  max-width: none;
1956
1956
  }
1957
1957
 
1958
- /* Inline, a character after the last word, so that it never goes to a line of its own; mirrored by itself from right to left. */
1959
- .act-mark {
1960
- margin-inline-start: 0.25em;
1961
- color: var(--accent);
1962
- font-weight: 700;
1963
- }
1964
-
1965
1958
  .chips.acting li {
1966
1959
  padding: 0;
1967
1960
  }
@@ -3569,6 +3562,11 @@
3569
3562
  margin-top: 0;
3570
3563
  }
3571
3564
 
3565
+ /* A block of lines after a list or a text keeps the same room from it as the list from the block before (D-581 (F)). */
3566
+ .rows > :is(.row-list, .row-text) + :is(.row-number, .row-pips, .row-bar, .row-track, .row-progress) {
3567
+ margin-top: calc(var(--gap) * 0.75);
3568
+ }
3569
+
3572
3570
  :is(.row-list, .row-text) > .label,
3573
3571
  .always-from {
3574
3572
  color: var(--muted);
@@ -6696,6 +6694,12 @@
6696
6694
  font-weight: 650;
6697
6695
  }
6698
6696
 
6697
+ /* Say it again waits for the game to be back. */
6698
+ .act-small:disabled {
6699
+ color: var(--muted);
6700
+ cursor: default;
6701
+ }
6702
+
6699
6703
  .act-close {
6700
6704
  flex: 0 0 auto;
6701
6705
  width: 36px;
@@ -7885,15 +7889,8 @@
7885
7889
  }
7886
7890
  /* Settings. */
7887
7891
  @layer pages {
7888
- /* The Settings section (D-341): the player's settings of the campaign in groups, each with what it is and its values, the chosen one in gold and what it
7889
- means under it; the page's own last. */
7890
- .settings {
7891
- display: grid;
7892
- gap: var(--gap);
7893
- /* Room at the end for the dice button, which stays over the page: no row is left under it. */
7894
- padding-bottom: 72px;
7895
- }
7896
-
7892
+ /* The Settings section (D-341), a stack as Packages': its head, what a change does, its tabs, then the chosen tab's cards of settings, each setting with
7893
+ what it is and its values, the chosen one in gold and what it means under it; the page's own in the last tab. */
7897
7894
  .settings-lead,
7898
7895
  .settings-problem {
7899
7896
  margin: -6px 0 0;
@@ -7905,18 +7902,24 @@
7905
7902
  color: var(--low);
7906
7903
  }
7907
7904
 
7908
- .settings-group {
7905
+ .settings-panel {
7909
7906
  display: grid;
7910
- padding: 14px 16px 6px;
7911
- border: 1px solid var(--card-edge);
7912
- border-radius: var(--radius-l);
7913
- background: var(--card-ornament-layer), var(--card-texture-layer, none), var(--panel);
7914
- box-shadow: var(--lift), var(--raise);
7907
+ grid-template-columns: minmax(0, 1fr);
7908
+ gap: var(--gap);
7915
7909
  }
7916
7910
 
7917
- .settings-group h3 {
7918
- margin: 0 0 4px;
7919
- font-size: 1.1rem;
7911
+ /* Over the cards of the page's own settings: where they are kept. */
7912
+ .settings-kept {
7913
+ margin: -6px 0 0;
7914
+ color: var(--muted);
7915
+ font-size: 0.85rem;
7916
+ }
7917
+
7918
+ /* A card's settings, a rule between them: each row has its own room, so the body gives little. */
7919
+ .settings-body {
7920
+ display: grid;
7921
+ grid-template-columns: minmax(0, 1fr);
7922
+ padding: 2px 16px 6px;
7920
7923
  }
7921
7924
 
7922
7925
  .setting {
@@ -7946,19 +7949,19 @@
7946
7949
  }
7947
7950
  }
7948
7951
 
7949
- /* What a whole group asks of the player, as keeping the repository private: a setting's note in ink with its edge, its icon saying what it is about. Not
7952
+ /* What a whole card asks of the player, as keeping the repository private: a setting's note in ink with its edge, its icon saying what it is about. Not
7950
7953
  the accent's tint, which on the light page fades to grey and on the dark one is the gold of what is chosen; not the warning's colour, for nothing is wrong. */
7951
- .settings-group-note {
7952
- margin: 4px 0 8px;
7954
+ .settings-card-note {
7955
+ margin: 12px 0 0;
7953
7956
  }
7954
7957
 
7955
- .settings-group-note > p {
7958
+ .settings-card-note > p {
7956
7959
  margin: 0;
7957
7960
  }
7958
7961
 
7959
- .settings-group h3 + .setting,
7960
- .settings-group .settings-group-note + .setting,
7961
- .settings-group .setting-about + .setting {
7962
+ /* The first setting of a card stands under the head's rule, or under the card's note, without one of its own. */
7963
+ .settings-body > .setting:first-child,
7964
+ .settings-card-note + .setting {
7962
7965
  border-top: 0;
7963
7966
  }
7964
7967
 
@@ -10453,6 +10456,38 @@
10453
10456
  }
10454
10457
  }
10455
10458
 
10459
+ /* A container's info icon, after its name, opens its card (D-581): small, a target of 2rem that takes no height from its line. */
10460
+ .items .item-info {
10461
+ width: 2rem;
10462
+ height: 2rem;
10463
+ margin-block: -0.5rem;
10464
+ margin-inline-start: 2px;
10465
+ text-indent: 0;
10466
+ vertical-align: middle;
10467
+ }
10468
+
10469
+ .items .item-info svg.icon {
10470
+ width: 1rem;
10471
+ height: 1rem;
10472
+ }
10473
+
10474
+ .items .item-info:hover {
10475
+ color: var(--ink);
10476
+ }
10477
+
10478
+ /* What is equipped heads the list under its eyebrow, a hairline under it before the rest (D-581 (6)). */
10479
+ .items tbody tr.items-head th {
10480
+ padding: 4px 8px 2px;
10481
+ border-top: 0;
10482
+ text-indent: 0;
10483
+ }
10484
+
10485
+ .items tr.items-rule td {
10486
+ height: 0;
10487
+ padding: 0;
10488
+ border-top: 1px solid var(--rule);
10489
+ }
10490
+
10456
10491
  /* The group's values, as the money, above its table. */
10457
10492
  .rows + .items {
10458
10493
  margin-top: 12px;
@@ -14250,38 +14285,48 @@
14250
14285
  line-height: 1.5;
14251
14286
  }
14252
14287
 
14253
- /* The thing's data, as damage and weight: label and value in two columns, as a stat block. */
14288
+ /* The thing's data, as damage and weight or a spell's range (D-581): a grid of facts, each its label over its value, hairlines between them; the lines on
14289
+ the grid's outer edges fall outside it, cut. */
14254
14290
  .act-data {
14255
14291
  display: grid;
14256
- grid-template-columns: max-content 1fr;
14257
- gap: 6px 16px;
14258
- margin: 0;
14259
- padding: 14px 16px 0;
14292
+ grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
14293
+ overflow: hidden;
14294
+ margin: 14px 16px 0;
14295
+ padding: 0;
14260
14296
  }
14261
14297
 
14262
14298
  .act-data > div {
14263
- display: contents;
14264
- }
14265
-
14266
- .act-data dt {
14267
- color: var(--muted);
14268
- font-size: 0.85rem;
14299
+ display: grid;
14300
+ align-content: start;
14301
+ gap: 2px;
14302
+ margin-block-end: -1px;
14303
+ margin-inline-end: -1px;
14304
+ padding: 8px 12px;
14305
+ border-inline-end: 1px solid var(--rule);
14306
+ border-bottom: 1px solid var(--rule);
14269
14307
  }
14270
14308
 
14271
14309
  .act-data dd {
14272
14310
  margin: 0;
14273
14311
  font-weight: 600;
14312
+ overflow-wrap: anywhere;
14274
14313
  }
14275
14314
 
14276
14315
  .act-about .markdown > :first-child {
14277
14316
  margin-top: 0;
14278
14317
  }
14279
14318
 
14319
+ /* The verbs under the thing, with what is said of them: that the master waits for an answer, that a chat does not hear by itself, a problem. */
14280
14320
  .act-verbs {
14281
- flex-wrap: wrap;
14321
+ display: grid;
14322
+ gap: 10px;
14282
14323
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
14283
14324
  }
14284
14325
 
14326
+ .act-verbs .act-buttons {
14327
+ flex-wrap: wrap;
14328
+ }
14329
+
14285
14330
  .act-body {
14286
14331
  flex: 1 1 auto;
14287
14332
  min-height: 0;
@@ -14476,10 +14521,40 @@
14476
14521
  }
14477
14522
 
14478
14523
  .act-go svg.icon {
14524
+ flex: none;
14479
14525
  width: 18px;
14480
14526
  height: 18px;
14481
14527
  }
14482
14528
 
14529
+ /* A button that says the whole action, as Confirm: Equip Staff (D-581): its words wrap, from their start; on a phone it takes the bar's width. */
14530
+ .act-go.says {
14531
+ padding-block: 8px;
14532
+ white-space: normal;
14533
+ text-align: start;
14534
+ }
14535
+
14536
+ @media (max-width: 599px) {
14537
+ .act-buttons:has(.says) {
14538
+ flex-wrap: wrap;
14539
+ }
14540
+
14541
+ .act-go.says {
14542
+ flex: 1 1 100%;
14543
+ }
14544
+ }
14545
+
14546
+ /* A verb that waits, while the master waits for an answer: there, dimmed. */
14547
+ .map-sheet-go[aria-disabled="true"] {
14548
+ background: color-mix(in srgb, var(--gold) 35%, var(--panel));
14549
+ color: var(--muted);
14550
+ cursor: default;
14551
+ }
14552
+
14553
+ .act-cancel[aria-disabled="true"] {
14554
+ color: var(--muted);
14555
+ cursor: default;
14556
+ }
14557
+
14483
14558
  /* A token to choose on the map of the sheet, or to talk to on the page (D-495): a ring at the pointer, the one chosen ringed in gold. */
14484
14559
  .lm-token.choosable {
14485
14560
  cursor: pointer;
@@ -0,0 +1,47 @@
1
+ import type { DocumentReader, PictureMaker, TextWriter } from "../core/context.ts";
2
+ /** The settings of agy's runs, as the engine passes them with --settings. */
3
+ export interface AgySettings {
4
+ trustedWorkspaces: string[];
5
+ model?: string;
6
+ permissions: {
7
+ allow?: string[];
8
+ deny: string[];
9
+ };
10
+ }
11
+ /**
12
+ * Antigravity on this computer as a writer of text (D-579 (1)): agy, sealed by settings of the engine's and refused every tool by its hook, in an empty folder
13
+ * of its own. `program` is the line that starts it, `home` the player's real home, where their model is chosen.
14
+ */
15
+ export declare function antigravityWriter(program?: string, home?: string): TextWriter;
16
+ /**
17
+ * Antigravity on this computer as the importer (D-579 (1)): agy in an empty folder of its own, reaching the import's folder by its full path, allowed to read
18
+ * there and to write only in the folders given; its hook refuses any other call, and the settings close the run that makes one anyway.
19
+ */
20
+ export declare function antigravityReader(program?: string, home?: string): DocumentReader;
21
+ /** Why Antigravity paints no pictures, for the master and the player (T-251): the engine never installs it, so there is no step to give. */
22
+ export declare const antigravitySays: {
23
+ notReady: {
24
+ why: string;
25
+ };
26
+ };
27
+ /**
28
+ * Antigravity on this computer as the painter, where the campaign chose it and another host is the chat (T-251): agy in an empty folder of its own, with its
29
+ * image tool and the two it calls it with let through, every other refused; the picture it saves in its own data folder, under its home of the engine's.
30
+ */
31
+ export declare function antigravityPainter(program?: string, home?: string): PictureMaker;
32
+ /** The painter's settings: its working folder trusted, the player's model, and every command, MCP tool and URL denied. */
33
+ export declare function painterSettings(work: string, model: string | undefined): AgySettings;
34
+ /** The writer's settings: `folder` trusted, the player's model, and every command, MCP tool, URL and file of the computer's `roots` denied. */
35
+ export declare function sealedSettings(folder: string, model: string | undefined, roots?: string[]): AgySettings;
36
+ /**
37
+ * The importer's settings: its working folder trusted, the player's model, reading in the import's `folder` and writing in its `writable` subfolders, by their
38
+ * full paths; commands, MCP tools and URLs denied. No drive is denied, as a deny wins over an allow beneath it.
39
+ */
40
+ export declare function readerSettings(folder: string, work: string, writable: string[], model: string | undefined): AgySettings;
41
+ /** The model the player chose in Antigravity, from its settings in their real `home`; undefined where there is none. */
42
+ export declare function playerModel(home: string): string | undefined;
43
+ /**
44
+ * Takes away what runs stopped from outside left, as by an import's cancel: each run's folder whose engine process is gone, its agy stopped first if it still
45
+ * runs, and a folder that names no process once it is an hour old. Never throws.
46
+ */
47
+ export declare function sweep(): Promise<void>;