@my-swu/simulator-client 0.1.4 → 0.1.6

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 (57) hide show
  1. package/dist/generated/index.d.ts +3 -0
  2. package/dist/generated/schemas.d.ts +1 -1
  3. package/dist/generated/schemas.js +2911 -2689
  4. package/dist/generated/types/admin-match-debug-bundle.d.ts +1 -1
  5. package/dist/generated/types/admin-match-replay-response.d.ts +1 -1
  6. package/dist/generated/types/client-message.d.ts +1 -1
  7. package/dist/generated/types/common.d.ts +272 -260
  8. package/dist/generated/types/create-playground-share-response.d.ts +1 -0
  9. package/dist/generated/types/create-playground-share-response.js +2 -0
  10. package/dist/generated/types/format-event-response.d.ts +1 -1
  11. package/dist/generated/types/game-command.d.ts +1 -1
  12. package/dist/generated/types/game-event.d.ts +1 -1
  13. package/dist/generated/types/game-state.d.ts +1 -1
  14. package/dist/generated/types/get-match-response.d.ts +1 -1
  15. package/dist/generated/types/list-active-ai-matches-response.d.ts +1 -1
  16. package/dist/generated/types/lobby-access-response.d.ts +1 -1
  17. package/dist/generated/types/lobby-server-message.d.ts +1 -1
  18. package/dist/generated/types/match-access-recovery-response.d.ts +1 -1
  19. package/dist/generated/types/match-access-response.d.ts +1 -1
  20. package/dist/generated/types/match-history-replay-response.d.ts +1 -1
  21. package/dist/generated/types/match-recovery-response.d.ts +1 -1
  22. package/dist/generated/types/match-spectator-access-response.d.ts +1 -1
  23. package/dist/generated/types/playground-export-payload.d.ts +1 -0
  24. package/dist/generated/types/playground-export-payload.js +2 -0
  25. package/dist/generated/types/rematch-match-response.d.ts +1 -1
  26. package/dist/generated/types/restore-history-response.d.ts +1 -1
  27. package/dist/generated/types/restore-match-save-response.d.ts +1 -1
  28. package/dist/generated/types/server-message.d.ts +1 -1
  29. package/dist/generated/types/set-ai-paused-response.d.ts +1 -1
  30. package/dist/generated/types/set-playground-ai-seat-request.d.ts +1 -0
  31. package/dist/generated/types/set-playground-ai-seat-request.js +2 -0
  32. package/dist/generated/types/shared-match-history-replay-response.d.ts +1 -1
  33. package/dist/generated/types/submit-match-deck-response.d.ts +1 -1
  34. package/dist/generated/types/tournament-room-access-response.d.ts +1 -1
  35. package/dist/generated/types/tournament-room-server-message.d.ts +1 -1
  36. package/dist/generated/types/undo-match-response.d.ts +1 -1
  37. package/dist/generated/types/welcome-payload.d.ts +1 -1
  38. package/dist/generated/version.d.ts +1 -1
  39. package/dist/generated/version.js +1 -1
  40. package/dist/index.d.ts +2 -1
  41. package/dist/resources/admin.d.ts +3 -1
  42. package/dist/resources/admin.js +1 -0
  43. package/dist/resources/match-types.d.ts +11 -1
  44. package/dist/resources/matches.js +49 -0
  45. package/dist/types.d.ts +1 -1
  46. package/dist/validators.d.ts +4 -1
  47. package/package.json +1 -1
  48. package/schema/common.schema.json +2814 -2735
  49. package/schema/create-match-request.schema.json +5 -0
  50. package/schema/create-playground-share-response.schema.json +22 -0
  51. package/schema/game-command.schema.json +20 -0
  52. package/schema/game-state.schema.json +23 -0
  53. package/schema/manifest.json +4 -1
  54. package/schema/match-save-payload.schema.json +9 -1
  55. package/schema/playground-export-payload.schema.json +26 -0
  56. package/schema/route-manifest.json +58 -0
  57. package/schema/set-playground-ai-seat-request.schema.json +36 -0
@@ -90,6 +90,11 @@
90
90
  "maximum": 255,
91
91
  "minimum": 0
92
92
  },
93
+ "playground": {
94
+ "description": "Enables the server-owned scenario Playground runtime. Normal matches\nretain the default and never accept Playground mutations.",
95
+ "type": "boolean",
96
+ "default": false
97
+ },
93
98
  "scenario": {
94
99
  "description": "Optional authored scenario selector for direct Learn match creation.",
95
100
  "anyOf": [
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "CreatePlaygroundShareResponse",
4
+ "description": "Opaque 30-day Playground share capability.",
5
+ "type": "object",
6
+ "properties": {
7
+ "expiresAtMs": {
8
+ "type": "integer",
9
+ "format": "uint64",
10
+ "minimum": 0
11
+ },
12
+ "shareToken": {
13
+ "type": "string",
14
+ "format": "uuid"
15
+ }
16
+ },
17
+ "additionalProperties": false,
18
+ "required": [
19
+ "shareToken",
20
+ "expiresAtMs"
21
+ ]
22
+ }
@@ -11,6 +11,26 @@
11
11
  "concede"
12
12
  ]
13
13
  },
14
+ {
15
+ "type": "object",
16
+ "properties": {
17
+ "playground": {
18
+ "type": "object",
19
+ "properties": {
20
+ "command": {
21
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/PlaygroundCommand"
22
+ }
23
+ },
24
+ "required": [
25
+ "command"
26
+ ]
27
+ }
28
+ },
29
+ "additionalProperties": false,
30
+ "required": [
31
+ "playground"
32
+ ]
33
+ },
14
34
  {
15
35
  "type": "object",
16
36
  "properties": {
@@ -165,6 +165,29 @@
165
165
  "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/SeatState"
166
166
  }
167
167
  },
168
+ "playground": {
169
+ "description": "Whether this snapshot belongs to a server-authorized Playground match.",
170
+ "type": "boolean",
171
+ "default": false
172
+ },
173
+ "playgroundActionAbilities": {
174
+ "description": "Host-only Playground ability projection. Empty for normal matches and\nwhile a resolution owns the command boundary.",
175
+ "type": "array",
176
+ "default": [],
177
+ "items": {
178
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/PlaygroundActionAbilityView"
179
+ }
180
+ },
181
+ "playgroundDeckCardIds": {
182
+ "description": "Printed cards supplied by every configured Playground deck.",
183
+ "type": "array",
184
+ "default": [],
185
+ "items": {
186
+ "type": "integer",
187
+ "format": "uint32",
188
+ "minimum": 0
189
+ }
190
+ },
168
191
  "prompt": {
169
192
  "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/PromptState"
170
193
  },
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "e4a6c8c3043fdb5779d215ad8f673458da5a45bd6d196f0dbd5cc721aa189045",
2
+ "version": "f0334cd661de38164d34b780eea4872102c9f26c8e44630d13130a0c30054717",
3
3
  "files": [
4
4
  "admin-match-list-response.schema.json",
5
5
  "admin-match-debug-bundle.schema.json",
@@ -96,6 +96,9 @@
96
96
  "rematch-match-response.schema.json",
97
97
  "set-ai-paused-request.schema.json",
98
98
  "set-ai-paused-response.schema.json",
99
+ "set-playground-ai-seat-request.schema.json",
100
+ "playground-export-payload.schema.json",
101
+ "create-playground-share-response.schema.json",
99
102
  "get-match-response.schema.json",
100
103
  "match-history-list-request.schema.json",
101
104
  "match-history-list-response.schema.json",
@@ -15,6 +15,14 @@
15
15
  "description": "Whether AI was manually paused when this snapshot was captured.",
16
16
  "type": "boolean"
17
17
  },
18
+ "aiPausedSeats": {
19
+ "description": "Exact manually paused AI seats. Empty payloads from older clients use\n`ai_paused` as the all-seat compatibility fallback.",
20
+ "type": "array",
21
+ "default": [],
22
+ "items": {
23
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/Seat"
24
+ }
25
+ },
18
26
  "copiedCards": {
19
27
  "description": "Wire mirror of the [`UnitState::copied_card`] Arcs that the inner\nstate could not embed. Keyed by `unit.instance_id`. Empty when no\nactive unit has a copied card.",
20
28
  "type": "array",
@@ -52,7 +60,7 @@
52
60
  "description": "The serialized engine state. Catalog `Arc`s are skip-default here\nand grafted on by the restore path before the state goes live.\n\nOpaque to the public schema — SDK consumers should treat this as an\nimplementation-defined object that round-trips byte-for-byte. Pinning\nevery engine sub-struct into the schema would couple the SDK type\nsurface to the entire engine, which we explicitly do not want."
53
61
  },
54
62
  "version": {
55
- "description": "Wire-format version. Always [`MATCH_SAVE_VERSION`] for newly minted\npayloads; restore rejects mismatches.",
63
+ "description": "Wire-format version. Always [`MATCH_SAVE_VERSION`] for newly minted\npayloads; restore accepts every [`SUPPORTED_SAVE_VERSIONS`] entry and\nrejects anything else.",
56
64
  "type": "integer",
57
65
  "format": "uint8",
58
66
  "maximum": 255,
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "PlaygroundExportPayload",
4
+ "description": "Portable Playground file. `restore_token` is a dedicated capability and\nnever contains a live match seat token.",
5
+ "type": "object",
6
+ "properties": {
7
+ "restoreToken": {
8
+ "type": "string"
9
+ },
10
+ "save": {
11
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/MatchSavePayload"
12
+ },
13
+ "version": {
14
+ "type": "integer",
15
+ "format": "uint8",
16
+ "maximum": 1,
17
+ "minimum": 1
18
+ }
19
+ },
20
+ "additionalProperties": false,
21
+ "required": [
22
+ "version",
23
+ "save",
24
+ "restoreToken"
25
+ ]
26
+ }
@@ -32,6 +32,17 @@
32
32
  "method": "getGameReplay"
33
33
  }
34
34
  },
35
+ {
36
+ "operationId": "createAdminGameReplayShare",
37
+ "method": "POST",
38
+ "path": "/api/admin/games/{history_id}/replay-shares",
39
+ "responseSchema": "create-match-history-replay-share-response",
40
+ "sdk": {
41
+ "kind": "required",
42
+ "resource": "admin",
43
+ "method": "createGameReplayShare"
44
+ }
45
+ },
35
46
  {
36
47
  "operationId": "listSimulatorReports",
37
48
  "method": "GET",
@@ -401,6 +412,41 @@
401
412
  "method": "save"
402
413
  }
403
414
  },
415
+ {
416
+ "operationId": "match_playground_export",
417
+ "method": "POST",
418
+ "path": "/api/matches/{match_id}/playground/export",
419
+ "requestSchema": "save-match-request",
420
+ "responseSchema": "playground-export-payload",
421
+ "sdk": {
422
+ "kind": "required",
423
+ "resource": "matches",
424
+ "method": "exportPlayground"
425
+ }
426
+ },
427
+ {
428
+ "operationId": "match_playground_share_create",
429
+ "method": "POST",
430
+ "path": "/api/matches/{match_id}/playground-shares",
431
+ "requestSchema": "save-match-request",
432
+ "responseSchema": "create-playground-share-response",
433
+ "sdk": {
434
+ "kind": "required",
435
+ "resource": "matches",
436
+ "method": "createPlaygroundShare"
437
+ }
438
+ },
439
+ {
440
+ "operationId": "match_playground_share_restore",
441
+ "method": "POST",
442
+ "path": "/api/playground-shares/{share_token}/restore",
443
+ "responseSchema": "restore-match-save-response",
444
+ "sdk": {
445
+ "kind": "required",
446
+ "resource": "matches",
447
+ "method": "restorePlaygroundShare"
448
+ }
449
+ },
404
450
  {
405
451
  "operationId": "match_undo",
406
452
  "method": "POST",
@@ -449,6 +495,18 @@
449
495
  "method": "setAiPaused"
450
496
  }
451
497
  },
498
+ {
499
+ "operationId": "match_playground_ai_seat",
500
+ "method": "POST",
501
+ "path": "/api/matches/{match_id}/playground/ai",
502
+ "requestSchema": "set-playground-ai-seat-request",
503
+ "responseSchema": "set-ai-paused-response",
504
+ "sdk": {
505
+ "kind": "required",
506
+ "resource": "matches",
507
+ "method": "setPlaygroundAiSeat"
508
+ }
509
+ },
452
510
  {
453
511
  "operationId": "match_join",
454
512
  "method": "POST",
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "SetPlaygroundAiSeatRequest",
4
+ "description": "Host-authored AI controller settings for one Playground seat.",
5
+ "type": "object",
6
+ "properties": {
7
+ "difficulty": {
8
+ "description": "`None` removes the AI controller from this seat.",
9
+ "anyOf": [
10
+ {
11
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/AiDifficulty"
12
+ },
13
+ {
14
+ "type": "null"
15
+ }
16
+ ]
17
+ },
18
+ "paused": {
19
+ "description": "Manual per-seat pause state. Ignored when `difficulty` is `None`.",
20
+ "type": "boolean"
21
+ },
22
+ "seat": {
23
+ "$ref": "https://simulator-sdk.my-swu.com/schema/common.json#/$defs/Seat"
24
+ },
25
+ "seatToken": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "additionalProperties": false,
30
+ "required": [
31
+ "seatToken",
32
+ "seat",
33
+ "difficulty",
34
+ "paused"
35
+ ]
36
+ }