@memizy/protocol 0.0.0-stage → 1.0.0-rc.5
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/README.md +20 -2
- package/SPEC.md +491 -0
- package/dist/errors.cjs +1 -0
- package/dist/errors.js +34 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +14 -0
- package/dist/items.cjs +1 -0
- package/dist/items.js +116 -0
- package/dist/limits.cjs +1 -0
- package/dist/limits.js +65 -0
- package/dist/manifestSchema.cjs +2 -0
- package/dist/manifestSchema.js +107 -0
- package/dist/pluginRuntime.cjs +1 -0
- package/dist/pluginRuntime.js +48 -0
- package/dist/polyfills.cjs +1 -0
- package/dist/polyfills.js +23 -0
- package/dist/relay.cjs +1 -0
- package/dist/relay.js +21 -0
- package/dist/schemas.cjs +1 -0
- package/dist/schemas.js +77 -0
- package/dist/security.cjs +1 -0
- package/dist/security.js +40 -0
- package/dist/settings.cjs +1 -0
- package/dist/settings.js +35 -0
- package/dist/settingsSchema.cjs +1 -0
- package/dist/settingsSchema.js +58 -0
- package/dist/src/errors.d.ts +21 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/items.d.ts +27 -0
- package/dist/src/limits.d.ts +62 -0
- package/dist/src/manifestSchema.d.ts +159 -0
- package/dist/src/pluginRuntime.d.ts +47 -0
- package/dist/src/polyfills.d.ts +6 -0
- package/dist/src/relay.d.ts +168 -0
- package/dist/src/schemas.d.ts +120 -0
- package/dist/src/security.d.ts +21 -0
- package/dist/src/settings.d.ts +22 -0
- package/dist/src/settingsSchema.d.ts +54 -0
- package/dist/src/types.d.ts +190 -0
- package/dist/src/version.d.ts +30 -0
- package/dist/types.cjs +1 -0
- package/dist/types.js +28 -0
- package/dist/version.cjs +1 -0
- package/dist/version.js +31 -0
- package/package.json +55 -4
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A string, or a map of BCP 47 language → string (e.g. `{ "cs": "Čas", "en": "Time" }`). */
|
|
3
|
+
export declare const LocalizedTextSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
4
|
+
export type LocalizedText = z.infer<typeof LocalizedTextSchema>;
|
|
5
|
+
export declare const SettingDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"number">;
|
|
7
|
+
default: z.ZodNumber;
|
|
8
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
13
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
14
|
+
modes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
15
|
+
solo: "solo";
|
|
16
|
+
multiplayer: "multiplayer";
|
|
17
|
+
}>>>;
|
|
18
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"boolean">;
|
|
20
|
+
default: z.ZodBoolean;
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
23
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
24
|
+
modes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25
|
+
solo: "solo";
|
|
26
|
+
multiplayer: "multiplayer";
|
|
27
|
+
}>>>;
|
|
28
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"select">;
|
|
30
|
+
options: z.ZodArray<z.ZodObject<{
|
|
31
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
32
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
33
|
+
}, z.core.$loose>>;
|
|
34
|
+
default: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
37
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
38
|
+
modes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
39
|
+
solo: "solo";
|
|
40
|
+
multiplayer: "multiplayer";
|
|
41
|
+
}>>>;
|
|
42
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"text">;
|
|
44
|
+
default: z.ZodString;
|
|
45
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
48
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
49
|
+
modes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
50
|
+
solo: "solo";
|
|
51
|
+
multiplayer: "multiplayer";
|
|
52
|
+
}>>>;
|
|
53
|
+
}, z.core.$loose>], "type">;
|
|
54
|
+
export type SettingDefinition = z.infer<typeof SettingDefinitionSchema>;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { OQSEAnyItem, OQSEMeta, ProgressRecord } from '@memizy/oqse';
|
|
2
|
+
import { HostAs, PluginView } from './pluginRuntime';
|
|
3
|
+
/** Address of an instance: a player ID, `"board"`; `"server"` is reserved. */
|
|
4
|
+
export type Address = string;
|
|
5
|
+
/** Address of the presenter's board. */
|
|
6
|
+
export declare const BOARD_ADDRESS = "board";
|
|
7
|
+
/** Reserved for a future server-side authority (SPEC 3.1). */
|
|
8
|
+
export declare const SERVER_ADDRESS = "server";
|
|
9
|
+
export type SessionMode = 'solo' | 'multiplayer';
|
|
10
|
+
export interface Player {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
isHost: boolean;
|
|
14
|
+
connected: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface SessionInfo {
|
|
17
|
+
id: string;
|
|
18
|
+
mode: SessionMode;
|
|
19
|
+
/** `null` in solo. */
|
|
20
|
+
hostAs: HostAs | null;
|
|
21
|
+
view: PluginView;
|
|
22
|
+
/** This instance. */
|
|
23
|
+
self: Address;
|
|
24
|
+
/** Who owns the game state. */
|
|
25
|
+
authority: Address;
|
|
26
|
+
/** This instance joined a running game. */
|
|
27
|
+
lateJoin: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface Handshake {
|
|
30
|
+
/** Protocol version the SDK speaks, e.g. `"1.0"`. */
|
|
31
|
+
protocol: string;
|
|
32
|
+
sdk: {
|
|
33
|
+
name: string;
|
|
34
|
+
version: string;
|
|
35
|
+
};
|
|
36
|
+
plugin: {
|
|
37
|
+
id: string;
|
|
38
|
+
version: string;
|
|
39
|
+
};
|
|
40
|
+
features: string[];
|
|
41
|
+
}
|
|
42
|
+
export interface Theme {
|
|
43
|
+
locale: string;
|
|
44
|
+
theme: 'light' | 'dark';
|
|
45
|
+
}
|
|
46
|
+
export type DataScope = 'plugin' | 'set';
|
|
47
|
+
export interface PluginData {
|
|
48
|
+
/** Data across all sets (`null` = nothing saved yet). */
|
|
49
|
+
plugin: unknown;
|
|
50
|
+
/** Data for this plugin and the current set (`null` = nothing saved yet). */
|
|
51
|
+
set: unknown;
|
|
52
|
+
}
|
|
53
|
+
export interface InitPayload {
|
|
54
|
+
/** Negotiated version: same MAJOR, the lower MINOR. */
|
|
55
|
+
protocol: string;
|
|
56
|
+
host: {
|
|
57
|
+
name: string;
|
|
58
|
+
version: string;
|
|
59
|
+
};
|
|
60
|
+
oqseVersion: string;
|
|
61
|
+
features: string[];
|
|
62
|
+
session: SessionInfo;
|
|
63
|
+
/** Current roster (the presenter is not a player). */
|
|
64
|
+
players: Player[];
|
|
65
|
+
set: {
|
|
66
|
+
meta: OQSEMeta;
|
|
67
|
+
items: OQSEAnyItem[];
|
|
68
|
+
};
|
|
69
|
+
/** Values for every declared setting (defaults applied). */
|
|
70
|
+
settings: Record<string, unknown>;
|
|
71
|
+
config: Theme;
|
|
72
|
+
/** The session clock and its pauses (see {@link SessionClock}). */
|
|
73
|
+
clock: SessionClock;
|
|
74
|
+
/**
|
|
75
|
+
* RC4: Memizy services this host offers to the plugin (declared in its manifest and
|
|
76
|
+
* available here); call them with `service()`. Absent on older hosts.
|
|
77
|
+
*/
|
|
78
|
+
services?: string[];
|
|
79
|
+
/** Learning progress of `self` (empty for board/settings). */
|
|
80
|
+
progress: Record<string, ProgressRecord>;
|
|
81
|
+
/** Plugin data of `self` (`null` values for board/settings). */
|
|
82
|
+
data: PluginData;
|
|
83
|
+
/** Last saved snapshot, only for the authority (resume). */
|
|
84
|
+
snapshot: unknown | null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The session clock. `Date.now() + offsetMs` is the session time. RC4 adds pauses: the
|
|
88
|
+
* game time is `(pausedAt ?? sessionTime) - pausedMs` – it stands still while the host
|
|
89
|
+
* has paused the game (`pausedAt` = session time of the pause) and continues afterwards
|
|
90
|
+
* without the paused time (`pausedMs` = total of finished pauses).
|
|
91
|
+
*/
|
|
92
|
+
export interface SessionClock {
|
|
93
|
+
offsetMs: number;
|
|
94
|
+
pausedMs?: number;
|
|
95
|
+
pausedAt?: number | null;
|
|
96
|
+
}
|
|
97
|
+
export interface AnswerRecord {
|
|
98
|
+
/** Default: self. The authority may record for any player. */
|
|
99
|
+
playerId?: string;
|
|
100
|
+
itemId: string;
|
|
101
|
+
isCorrect: boolean;
|
|
102
|
+
confidence?: 1 | 2 | 3 | 4;
|
|
103
|
+
timeSpentMs?: number;
|
|
104
|
+
hintsUsed?: number;
|
|
105
|
+
isSkipped?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* RC4: what the player answered, in the `checkAnswer` format of the item type
|
|
108
|
+
* (choice IDs, text, numbers…). Lets teachers see which wrong answers were chosen.
|
|
109
|
+
*/
|
|
110
|
+
answer?: unknown;
|
|
111
|
+
/**
|
|
112
|
+
* RC4: the item itself, required when `itemId` is not in the set (a generated item, e.g.
|
|
113
|
+
* from a service). It needs at least `id` (= `itemId`) and `type`; the answer fields may
|
|
114
|
+
* be left out. Such answers count for statistics (`skills`, `tags`), not for repetition.
|
|
115
|
+
*/
|
|
116
|
+
item?: {
|
|
117
|
+
id: string;
|
|
118
|
+
type: string;
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export interface SessionResult {
|
|
123
|
+
/** Final score per player ID (in solo: the single player). */
|
|
124
|
+
scores?: Record<string, number>;
|
|
125
|
+
/** Short plain-text summary shown by the host. */
|
|
126
|
+
summary?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface SettingsUpdate {
|
|
129
|
+
values: Record<string, unknown>;
|
|
130
|
+
valid: boolean;
|
|
131
|
+
message?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ResizeRequest {
|
|
134
|
+
height: number | 'auto';
|
|
135
|
+
}
|
|
136
|
+
export interface ErrorReport {
|
|
137
|
+
code: string;
|
|
138
|
+
message: string;
|
|
139
|
+
context?: Record<string, unknown>;
|
|
140
|
+
}
|
|
141
|
+
export interface OutgoingMessage {
|
|
142
|
+
/** `'all'` = every other instance. */
|
|
143
|
+
to: 'authority' | 'all' | Address[];
|
|
144
|
+
/** JSON-serializable. */
|
|
145
|
+
data: unknown;
|
|
146
|
+
}
|
|
147
|
+
export interface IncomingMessage {
|
|
148
|
+
from: Address;
|
|
149
|
+
data: unknown;
|
|
150
|
+
/** Session clock (ms). */
|
|
151
|
+
sentAt: number;
|
|
152
|
+
}
|
|
153
|
+
export type SessionEndReason = 'finished' | 'host_left' | 'kicked' | 'closed' | 'error';
|
|
154
|
+
/** Methods the host exposes to the plugin (plugin → host). SPEC section 5. */
|
|
155
|
+
export interface HostApi {
|
|
156
|
+
hello(handshake: Handshake): Promise<InitPayload>;
|
|
157
|
+
ready(): Promise<void>;
|
|
158
|
+
send(message: OutgoingMessage): Promise<void>;
|
|
159
|
+
saveSnapshot(snapshot: unknown): Promise<void>;
|
|
160
|
+
recordAnswer(answer: AnswerRecord): Promise<void>;
|
|
161
|
+
saveProgress(records: Record<string, ProgressRecord>): Promise<void>;
|
|
162
|
+
saveData(scope: DataScope, value: unknown): Promise<void>;
|
|
163
|
+
updateSettings(update: SettingsUpdate): Promise<void>;
|
|
164
|
+
getAsset(key: string, itemId?: string): Promise<Blob>;
|
|
165
|
+
end(result: SessionResult): Promise<void>;
|
|
166
|
+
resize(request: ResizeRequest): Promise<void>;
|
|
167
|
+
reportError(error: ErrorReport): Promise<void>;
|
|
168
|
+
exit(): Promise<void>;
|
|
169
|
+
/** RC4: calls a Memizy service (one of `InitPayload.services`); returns its JSON result. */
|
|
170
|
+
service(name: string, payload: unknown): Promise<unknown>;
|
|
171
|
+
}
|
|
172
|
+
/** Methods the plugin exposes to the host (host → plugin). SPEC section 7. */
|
|
173
|
+
export interface PluginApi {
|
|
174
|
+
start(): Promise<void>;
|
|
175
|
+
deliver(message: IncomingMessage): Promise<void>;
|
|
176
|
+
playersChanged(players: Player[]): Promise<void>;
|
|
177
|
+
authorityChanged(status: {
|
|
178
|
+
connected: boolean;
|
|
179
|
+
}): Promise<void>;
|
|
180
|
+
setChanged(set: {
|
|
181
|
+
meta: OQSEMeta;
|
|
182
|
+
items: OQSEAnyItem[];
|
|
183
|
+
}): Promise<void>;
|
|
184
|
+
configChanged(config: Theme): Promise<void>;
|
|
185
|
+
/** The clock was corrected, or the game was paused / resumed (RC4). */
|
|
186
|
+
clockChanged(clock: SessionClock): Promise<void>;
|
|
187
|
+
sessionEnded(reason: SessionEndReason): Promise<void>;
|
|
188
|
+
}
|
|
189
|
+
export declare const HOST_API_METHODS: readonly ["hello", "ready", "send", "saveSnapshot", "recordAnswer", "saveProgress", "saveData", "updateSettings", "getAsset", "end", "resize", "reportError", "exit", "service"];
|
|
190
|
+
export declare const PLUGIN_API_METHODS: readonly ["start", "deliver", "playersChanged", "authorityChanged", "setChanged", "configChanged", "clockChanged", "sessionEnded"];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol version handling (SPEC section 4.3).
|
|
3
|
+
*/
|
|
4
|
+
/** The protocol version implemented by this package. */
|
|
5
|
+
export declare const PROTOCOL_VERSION = "1.0";
|
|
6
|
+
export interface ProtocolVersion {
|
|
7
|
+
major: number;
|
|
8
|
+
minor: number;
|
|
9
|
+
}
|
|
10
|
+
/** Parses a `MAJOR.MINOR` version. Returns `null` for anything else. */
|
|
11
|
+
export declare function parseProtocolVersion(version: string): ProtocolVersion | null;
|
|
12
|
+
/** Compares two `MAJOR.MINOR` versions (negative: a < b, 0: equal, positive: a > b). */
|
|
13
|
+
export declare function compareProtocolVersions(a: string, b: string): number;
|
|
14
|
+
/**
|
|
15
|
+
* The protocol versions a host supports: one version, or one per MAJOR it supports
|
|
16
|
+
* (e.g. `['1.4', '2.1']`, SPEC 4.3).
|
|
17
|
+
*/
|
|
18
|
+
export type HostProtocolVersions = string | readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Negotiates the version both sides use: the plugin's MAJOR (which the host must
|
|
21
|
+
* support), the lower MINOR. Returns `null` when the host does not support that MAJOR
|
|
22
|
+
* or a version is invalid.
|
|
23
|
+
*/
|
|
24
|
+
export declare function negotiateProtocolVersion(plugin: string, host: HostProtocolVersions): string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Checks before loading the iframe whether a host can run a plugin whose
|
|
27
|
+
* manifest requires `required` (SPEC 4.3): the host supports its MAJOR with a MINOR ≥
|
|
28
|
+
* the required one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isProtocolSupported(required: string, host?: HostProtocolVersions): boolean;
|
package/dist/types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`board`,t=`server`,n=[`hello`,`ready`,`send`,`saveSnapshot`,`recordAnswer`,`saveProgress`,`saveData`,`updateSettings`,`getAsset`,`end`,`resize`,`reportError`,`exit`,`service`],r=[`start`,`deliver`,`playersChanged`,`authorityChanged`,`setChanged`,`configChanged`,`clockChanged`,`sessionEnded`];exports.BOARD_ADDRESS=e,exports.HOST_API_METHODS=n,exports.PLUGIN_API_METHODS=r,exports.SERVER_ADDRESS=t;
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/types.ts
|
|
2
|
+
var e = "board", t = "server", n = [
|
|
3
|
+
"hello",
|
|
4
|
+
"ready",
|
|
5
|
+
"send",
|
|
6
|
+
"saveSnapshot",
|
|
7
|
+
"recordAnswer",
|
|
8
|
+
"saveProgress",
|
|
9
|
+
"saveData",
|
|
10
|
+
"updateSettings",
|
|
11
|
+
"getAsset",
|
|
12
|
+
"end",
|
|
13
|
+
"resize",
|
|
14
|
+
"reportError",
|
|
15
|
+
"exit",
|
|
16
|
+
"service"
|
|
17
|
+
], r = [
|
|
18
|
+
"start",
|
|
19
|
+
"deliver",
|
|
20
|
+
"playersChanged",
|
|
21
|
+
"authorityChanged",
|
|
22
|
+
"setChanged",
|
|
23
|
+
"configChanged",
|
|
24
|
+
"clockChanged",
|
|
25
|
+
"sessionEnded"
|
|
26
|
+
];
|
|
27
|
+
//#endregion
|
|
28
|
+
export { e as BOARD_ADDRESS, n as HOST_API_METHODS, r as PLUGIN_API_METHODS, t as SERVER_ADDRESS };
|
package/dist/version.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`1.0`,t=/^(\d+)\.(\d+)$/;function n(e){let n=t.exec(e);return n?{major:Number(n[1]),minor:Number(n[2])}:null}function r(e,t){let r=n(e),i=n(t);if(!r||!i)throw Error(`Invalid protocol version: ${r?t:e}`);return r.major===i.major?r.minor-i.minor:r.major-i.major}function i(e,t){for(let r of typeof t==`string`?[t]:t){let t=n(r);if(t?.major===e)return t}return null}function a(e,t){let r=n(e),a=r&&i(r.major,t);return!r||!a?null:`${r.major}.${Math.min(r.minor,a.minor)}`}function o(e,t=`1.0`){let r=n(e),a=r&&i(r.major,t);return!!r&&!!a&&a.minor>=r.minor}exports.PROTOCOL_VERSION=e,exports.compareProtocolVersions=r,exports.isProtocolSupported=o,exports.negotiateProtocolVersion=a,exports.parseProtocolVersion=n;
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/version.ts
|
|
2
|
+
var e = "1.0", t = /^(\d+)\.(\d+)$/;
|
|
3
|
+
function n(e) {
|
|
4
|
+
let n = t.exec(e);
|
|
5
|
+
return n ? {
|
|
6
|
+
major: Number(n[1]),
|
|
7
|
+
minor: Number(n[2])
|
|
8
|
+
} : null;
|
|
9
|
+
}
|
|
10
|
+
function r(e, t) {
|
|
11
|
+
let r = n(e), i = n(t);
|
|
12
|
+
if (!r || !i) throw Error(`Invalid protocol version: ${r ? t : e}`);
|
|
13
|
+
return r.major === i.major ? r.minor - i.minor : r.major - i.major;
|
|
14
|
+
}
|
|
15
|
+
function i(e, t) {
|
|
16
|
+
for (let r of typeof t == "string" ? [t] : t) {
|
|
17
|
+
let t = n(r);
|
|
18
|
+
if (t?.major === e) return t;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
function a(e, t) {
|
|
23
|
+
let r = n(e), a = r && i(r.major, t);
|
|
24
|
+
return !r || !a ? null : `${r.major}.${Math.min(r.minor, a.minor)}`;
|
|
25
|
+
}
|
|
26
|
+
function o(e, t = "1.0") {
|
|
27
|
+
let r = n(e), a = r && i(r.major, t);
|
|
28
|
+
return !!r && !!a && a.minor >= r.minor;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { e as PROTOCOL_VERSION, r as compareProtocolVersions, o as isProtocolSupported, a as negotiateProtocolVersion, n as parseProtocolVersion };
|
package/package.json
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memizy/protocol",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-rc.5",
|
|
4
|
+
"description": "Memizy Plugin Protocol: types, Zod schemas and helpers shared by @memizy/plugin-sdk and @memizy/host-sdk.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/src/index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/src/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"SPEC.md",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc --noEmit && vite build",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"typecheck": "tsc --noEmit"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@memizy/oqse": "^1.0.0-rc.5",
|
|
30
|
+
"zod": "^4.3.6"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "^25.6.0",
|
|
34
|
+
"typescript": "~6.0.2",
|
|
35
|
+
"vite": "^8.0.4",
|
|
36
|
+
"vite-plugin-dts": "^4.5.4",
|
|
37
|
+
"vitest": "^4.1.4"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"author": "Memizy Team",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"memizy",
|
|
43
|
+
"plugin",
|
|
44
|
+
"protocol",
|
|
45
|
+
"oqse",
|
|
46
|
+
"education"
|
|
47
|
+
],
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/memizy/memizy.git",
|
|
51
|
+
"directory": "packages/protocol"
|
|
52
|
+
},
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/memizy/memizy/issues"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/memizy/memizy/tree/main/packages/protocol#readme"
|
|
57
|
+
}
|