@mindcraft-lang/bridge-protocol 0.1.1

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 ADDED
@@ -0,0 +1,17 @@
1
+ # @mindcraft-lang/bridge-protocol
2
+
3
+ WebSocket protocol types and schemas for the Mindcraft bridge.
4
+
5
+ Defines the message types, validation schemas, and notification types shared between
6
+ the bridge server (`vscode-bridge`), client SDK (`bridge-client`), and app-level
7
+ packages.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install @mindcraft-lang/bridge-protocol
13
+ ```
14
+
15
+ ## License
16
+
17
+ MIT
@@ -0,0 +1,8 @@
1
+ export type { AppClientMessage, AppServerMessage, AppSessionJoinCodeMessage, AppSessionJoinCodePayload, AppSessionWelcomeMessage, AppSessionWelcomePayload, ControlPingMessage, ControlPongMessage, ErrorPayload, ExtensionAppStatusMessage, ExtensionAppStatusPayload, ExtensionClientMessage, ExtensionServerMessage, ExtensionSessionWelcomeMessage, ExtensionSessionWelcomePayload, FilesystemChangeMessage, FilesystemSyncMessage, GeneralErrorMessage, SessionErrorMessage, SessionGoodbyeMessage, SessionHelloMessage, SessionHelloPayload, } from "./messages/index.js";
2
+ export { sessionHelloPayloadSchema } from "./messages/index.js";
3
+ export type { FileSystemNotification, FilesystemSyncPayload } from "./notifications.js";
4
+ export { fileSystemNotificationSchema, filesystemSyncPayloadSchema } from "./notifications.js";
5
+ export type { WsMessage } from "./schemas.js";
6
+ export { wsMessageSchema } from "./schemas.js";
7
+ export type SessionRole = "app" | "extension";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAE/F,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { sessionHelloPayloadSchema } from "./messages/index.js";
2
+ export { fileSystemNotificationSchema, filesystemSyncPayloadSchema } from "./notifications.js";
3
+ export { wsMessageSchema } from "./schemas.js";
@@ -0,0 +1,21 @@
1
+ import type { ControlPingMessage, ControlPongMessage, FilesystemChangeMessage, FilesystemSyncMessage, GeneralErrorMessage, SessionErrorMessage, SessionGoodbyeMessage, SessionHelloMessage } from "./shared.js";
2
+ export interface AppSessionWelcomePayload {
3
+ sessionId: string;
4
+ joinCode: string;
5
+ bindingToken?: string;
6
+ }
7
+ export interface AppSessionJoinCodePayload {
8
+ joinCode: string;
9
+ }
10
+ export type AppClientMessage = SessionHelloMessage | SessionGoodbyeMessage | SessionErrorMessage | ControlPingMessage | FilesystemChangeMessage | FilesystemSyncMessage;
11
+ export interface AppSessionWelcomeMessage {
12
+ type: "session:welcome";
13
+ id?: string;
14
+ payload: AppSessionWelcomePayload;
15
+ }
16
+ export interface AppSessionJoinCodeMessage {
17
+ type: "session:joinCode";
18
+ payload: AppSessionJoinCodePayload;
19
+ }
20
+ export type AppServerMessage = AppSessionWelcomeMessage | AppSessionJoinCodeMessage | SessionErrorMessage | ControlPongMessage | GeneralErrorMessage | FilesystemChangeMessage | FilesystemSyncMessage;
21
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/messages/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,iBAAiB,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,yBAAyB,GACzB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,uBAAuB,GACvB,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { ControlPingMessage, ControlPongMessage, FilesystemChangeMessage, FilesystemSyncMessage, GeneralErrorMessage, SessionErrorMessage, SessionGoodbyeMessage, SessionHelloMessage } from "./shared.js";
2
+ export interface ExtensionSessionWelcomePayload {
3
+ sessionId: string;
4
+ }
5
+ export type ExtensionClientMessage = SessionHelloMessage | SessionGoodbyeMessage | ControlPingMessage | FilesystemChangeMessage | FilesystemSyncMessage;
6
+ export interface ExtensionSessionWelcomeMessage {
7
+ type: "session:welcome";
8
+ id?: string;
9
+ payload: ExtensionSessionWelcomePayload;
10
+ }
11
+ export interface ExtensionAppStatusPayload {
12
+ bound: boolean;
13
+ clientConnected?: boolean;
14
+ appName?: string;
15
+ projectId?: string;
16
+ projectName?: string;
17
+ bindingToken?: string;
18
+ }
19
+ export interface ExtensionAppStatusMessage {
20
+ type: "session:appStatus";
21
+ payload: ExtensionAppStatusPayload;
22
+ }
23
+ export type ExtensionServerMessage = ExtensionSessionWelcomeMessage | ExtensionAppStatusMessage | SessionErrorMessage | ControlPongMessage | GeneralErrorMessage | FilesystemChangeMessage | FilesystemSyncMessage;
24
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/messages/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,sBAAsB,GAC9B,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,iBAAiB,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,8BAA8B,CAAC;CACzC;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,MAAM,sBAAsB,GAC9B,8BAA8B,GAC9B,yBAAyB,GACzB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,uBAAuB,GACvB,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export type { AppClientMessage, AppServerMessage, AppSessionJoinCodeMessage, AppSessionJoinCodePayload, AppSessionWelcomeMessage, AppSessionWelcomePayload, } from "./app.js";
2
+ export type { ExtensionAppStatusMessage, ExtensionAppStatusPayload, ExtensionClientMessage, ExtensionServerMessage, ExtensionSessionWelcomeMessage, ExtensionSessionWelcomePayload, } from "./extension.js";
3
+ export type { ControlPingMessage, ControlPongMessage, ErrorPayload, FilesystemChangeMessage, FilesystemSyncMessage, GeneralErrorMessage, SessionErrorMessage, SessionGoodbyeMessage, SessionHelloMessage, SessionHelloPayload, } from "./shared.js";
4
+ export { sessionHelloPayloadSchema } from "./shared.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export { sessionHelloPayloadSchema } from "./shared.js";
@@ -0,0 +1,54 @@
1
+ import { z } from "zod";
2
+ import type { FileSystemNotification, FilesystemSyncPayload } from "../notifications.js";
3
+ export interface ErrorPayload {
4
+ message: string;
5
+ }
6
+ export interface FilesystemChangeMessage {
7
+ type: "filesystem:change";
8
+ id?: string;
9
+ payload?: FileSystemNotification;
10
+ seq?: number;
11
+ }
12
+ export interface FilesystemSyncMessage {
13
+ type: "filesystem:sync";
14
+ id?: string;
15
+ payload?: FilesystemSyncPayload;
16
+ seq?: number;
17
+ }
18
+ export interface ControlPingMessage {
19
+ type: "control:ping";
20
+ id?: string;
21
+ }
22
+ export interface ControlPongMessage {
23
+ type: "control:pong";
24
+ id?: string;
25
+ }
26
+ export interface SessionErrorMessage {
27
+ type: "session:error";
28
+ id?: string;
29
+ payload: ErrorPayload;
30
+ }
31
+ export interface GeneralErrorMessage {
32
+ type: "error";
33
+ id?: string;
34
+ payload: ErrorPayload;
35
+ }
36
+ export declare const sessionHelloPayloadSchema: z.ZodObject<{
37
+ sessionId: z.ZodOptional<z.ZodString>;
38
+ joinCode: z.ZodOptional<z.ZodString>;
39
+ appName: z.ZodOptional<z.ZodString>;
40
+ projectId: z.ZodOptional<z.ZodString>;
41
+ projectName: z.ZodOptional<z.ZodString>;
42
+ bindingToken: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>;
44
+ export type SessionHelloPayload = z.infer<typeof sessionHelloPayloadSchema>;
45
+ export interface SessionHelloMessage {
46
+ type: "session:hello";
47
+ id?: string;
48
+ payload?: SessionHelloPayload;
49
+ }
50
+ export interface SessionGoodbyeMessage {
51
+ type: "session:goodbye";
52
+ id?: string;
53
+ }
54
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/messages/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEzF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,yBAAyB;;;;;;;iBAOpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export const sessionHelloPayloadSchema = z.object({
3
+ sessionId: z.string().optional(),
4
+ joinCode: z.string().optional(),
5
+ appName: z.string().optional(),
6
+ projectId: z.string().optional(),
7
+ projectName: z.string().optional(),
8
+ bindingToken: z.string().optional(),
9
+ });
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+ export declare const fileSystemNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
+ action: z.ZodLiteral<"write">;
4
+ path: z.ZodString;
5
+ content: z.ZodString;
6
+ isReadonly: z.ZodOptional<z.ZodBoolean>;
7
+ newEtag: z.ZodString;
8
+ expectedEtag: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ action: z.ZodLiteral<"delete">;
11
+ path: z.ZodString;
12
+ expectedEtag: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>, z.ZodObject<{
14
+ action: z.ZodLiteral<"rename">;
15
+ oldPath: z.ZodString;
16
+ newPath: z.ZodString;
17
+ expectedEtag: z.ZodOptional<z.ZodString>;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ action: z.ZodLiteral<"mkdir">;
20
+ path: z.ZodString;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ action: z.ZodLiteral<"rmdir">;
23
+ path: z.ZodString;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ action: z.ZodLiteral<"import">;
26
+ entries: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ kind: z.ZodLiteral<"file">;
28
+ content: z.ZodString;
29
+ etag: z.ZodString;
30
+ isReadonly: z.ZodBoolean;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ kind: z.ZodLiteral<"directory">;
33
+ }, z.core.$strip>], "kind">], null>>;
34
+ }, z.core.$strip>], "action">;
35
+ export type FileSystemNotification = z.infer<typeof fileSystemNotificationSchema>;
36
+ export declare const filesystemSyncPayloadSchema: z.ZodObject<{
37
+ entries: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ kind: z.ZodLiteral<"file">;
39
+ content: z.ZodString;
40
+ etag: z.ZodString;
41
+ isReadonly: z.ZodBoolean;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ kind: z.ZodLiteral<"directory">;
44
+ }, z.core.$strip>], "kind">], null>>;
45
+ }, z.core.$strip>;
46
+ export type FilesystemSyncPayload = z.infer<typeof filesystemSyncPayloadSchema>;
47
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAsBvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,2BAA2B;;;;;;;;;iBAEtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ const fileSystemEntrySchema = z.discriminatedUnion("kind", [
3
+ z.object({ kind: z.literal("file"), content: z.string(), etag: z.string(), isReadonly: z.boolean() }),
4
+ z.object({ kind: z.literal("directory") }),
5
+ ]);
6
+ const fileSystemEntriesSchema = z.array(z.tuple([z.string(), fileSystemEntrySchema]));
7
+ export const fileSystemNotificationSchema = z.discriminatedUnion("action", [
8
+ z.object({
9
+ action: z.literal("write"),
10
+ path: z.string(),
11
+ content: z.string(),
12
+ isReadonly: z.boolean().optional(),
13
+ newEtag: z.string(),
14
+ expectedEtag: z.string().optional(),
15
+ }),
16
+ z.object({ action: z.literal("delete"), path: z.string(), expectedEtag: z.string().optional() }),
17
+ z.object({
18
+ action: z.literal("rename"),
19
+ oldPath: z.string(),
20
+ newPath: z.string(),
21
+ expectedEtag: z.string().optional(),
22
+ }),
23
+ z.object({ action: z.literal("mkdir"), path: z.string() }),
24
+ z.object({ action: z.literal("rmdir"), path: z.string() }),
25
+ z.object({
26
+ action: z.literal("import"),
27
+ entries: fileSystemEntriesSchema,
28
+ }),
29
+ ]);
30
+ export const filesystemSyncPayloadSchema = z.object({
31
+ entries: fileSystemEntriesSchema,
32
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const wsMessageSchema: z.ZodObject<{
3
+ type: z.ZodString;
4
+ id: z.ZodOptional<z.ZodString>;
5
+ payload: z.ZodOptional<z.ZodUnknown>;
6
+ seq: z.ZodOptional<z.ZodNumber>;
7
+ }, z.core.$strip>;
8
+ export type WsMessage = z.infer<typeof wsMessageSchema>;
9
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;;iBAK1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export const wsMessageSchema = z.object({
3
+ type: z.string(),
4
+ id: z.string().optional(),
5
+ payload: z.unknown().optional(),
6
+ seq: z.number().optional(),
7
+ });
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@mindcraft-lang/bridge-protocol",
3
+ "version": "0.1.1",
4
+ "description": "WebSocket protocol types and schemas for the Mindcraft VS Code Bridge",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "author": "humanapp",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/humanapp/mindcraft-lang.git",
11
+ "directory": "packages/bridge-protocol"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/humanapp/mindcraft-lang/issues"
15
+ },
16
+ "homepage": "https://github.com/humanapp/mindcraft-lang/tree/main/packages/bridge-protocol#readme",
17
+ "keywords": [
18
+ "mindcraft",
19
+ "visual-programming",
20
+ "tile-based",
21
+ "typescript",
22
+ "vscode",
23
+ "language",
24
+ "education",
25
+ "stem",
26
+ "coding",
27
+ "game-development",
28
+ "creative-coding",
29
+ "kodu",
30
+ "project-spark"
31
+ ],
32
+ "files": [
33
+ "dist",
34
+ "README.md"
35
+ ],
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "engines": {
40
+ "node": ">=18"
41
+ },
42
+ "main": "dist/index.js",
43
+ "types": "dist/index.d.ts",
44
+ "exports": {
45
+ ".": {
46
+ "types": "./dist/index.d.ts",
47
+ "browser": "./dist/index.js",
48
+ "import": "./dist/index.js"
49
+ }
50
+ },
51
+ "scripts": {
52
+ "build": "tsc --build",
53
+ "build:prod": "tsc --build",
54
+ "clean": "tsc --build --clean",
55
+ "watch": "tsc --build --watch",
56
+ "lint:only": "biome lint ./src",
57
+ "check:only": "biome check ./src",
58
+ "format:only": "biome format ./src",
59
+ "lint": "biome lint ./src --write",
60
+ "check": "biome check ./src --write",
61
+ "typecheck": "tsc --noEmit",
62
+ "format": "biome format ./src --write",
63
+ "release:patch": "node ../../scripts/release.js patch",
64
+ "release:minor": "node ../../scripts/release.js minor",
65
+ "release:major": "node ../../scripts/release.js major"
66
+ },
67
+ "dependencies": {
68
+ "zod": "^4.3.6"
69
+ },
70
+ "devDependencies": {
71
+ "@biomejs/biome": "2.3.15",
72
+ "typescript": "~5.9.3"
73
+ }
74
+ }