@manabrew/protocol 1.0.0 → 1.1.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.
@@ -1,4 +1,11 @@
1
1
  import type { PlaymatSettings } from "../game/index";
2
+ export type CardBackFaceSummary = {
3
+ name: string;
4
+ manaCost: string;
5
+ typeLine: string;
6
+ oracleText: string;
7
+ uris: CardImageUris;
8
+ };
2
9
  export type CardImageUris = {
3
10
  small: string;
4
11
  normal: string;
@@ -57,6 +64,11 @@ export type DeckCard = {
57
64
  text: string;
58
65
  layout?: string;
59
66
  isDoubleFaced?: boolean;
67
+ /**
68
+ * Back face of a transform / modal_dfc card, captured at deck import.
69
+ * Absent on single-faced cards and on decks saved before it existed.
70
+ */
71
+ backFace?: CardBackFaceSummary;
60
72
  };
61
73
  export type DeckCardIdentity = {
62
74
  id: string;
@@ -86,7 +86,6 @@ export type PromptPresentation = {
86
86
  title: string;
87
87
  description?: string;
88
88
  text?: string;
89
- sourceCardId?: string;
90
89
  targets: Array<TargetRef>;
91
90
  };
92
91
  export type TargetKind = "player" | "card" | "spell";
@@ -1,8 +1,9 @@
1
+ import type { CardDto } from "../game";
1
2
  import type { PromptInput } from "../prompts";
2
3
  export interface PromptRequestEnvelope {
3
4
  promptId?: string;
4
5
  decidingPlayerId?: string;
5
- sourceCardId?: string;
6
+ sourceCard?: CardDto;
6
7
  }
7
8
  export type PromptRequest<TInput extends {
8
9
  type: string;
@@ -1,10 +1,11 @@
1
+ import type { CardDto } from "../game/index";
1
2
  import type { GameViewDto } from "../game/index";
2
3
  import type { PromptInput } from "../prompts/promptInput";
3
4
  import type { PromptOutput } from "../prompts/promptOutput";
4
5
  export type AgentPrompt = {
5
6
  promptId: number;
6
7
  decidingPlayerId: string;
7
- sourceCardId?: string;
8
+ sourceCard?: CardDto;
8
9
  input: PromptInput;
9
10
  };
10
11
  export type ClientToServerMessage = {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0";
1
+ export declare const VERSION = "1.1.0";
2
2
  export declare const PROTOCOL_VERSION = 1;
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTOCOL_VERSION = exports.VERSION = void 0;
4
4
  // AUTO-GENERATED by `cargo run -p manabrew-protocol --bin gen-protocol`. Do not edit.
5
- exports.VERSION = "1.0.0";
5
+ exports.VERSION = "1.1.0";
6
6
  exports.PROTOCOL_VERSION = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manabrew/protocol",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "TypeScript types for the Manabrew wire protocol — the engine↔client message contract for the Manabrew Magic: The Gathering client.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {