Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@harnessa-fe/protocol

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harnessa-fe/protocol - npm Package Compare versions

Comparing version
0.6.2
to
0.7.0
+57
-0
dist/messages.d.ts

@@ -236,2 +236,59 @@ /**

export type QueryResponseFrame = z.infer<typeof queryResponseFrameSchema>;
export declare const httpBatchSchema: z.ZodObject<{
hello: z.ZodObject<{
type: z.ZodOptional<z.ZodLiteral<"hello">>;
id: z.ZodOptional<z.ZodString>;
projectId: z.ZodString;
parentProjectId: z.ZodOptional<z.ZodString>;
displayName: z.ZodOptional<z.ZodString>;
buildId: z.ZodOptional<z.ZodString>;
tabId: z.ZodOptional<z.ZodString>;
sessionId: z.ZodOptional<z.ZodString>;
visitorId: z.ZodOptional<z.ZodString>;
userId: z.ZodOptional<z.ZodString>;
env: z.ZodOptional<z.ZodObject<{
userAgent: z.ZodString;
language: z.ZodString;
languages: z.ZodArray<z.ZodString>;
timezone: z.ZodString;
timezoneOffsetMin: z.ZodNumber;
screen: z.ZodObject<{
width: z.ZodNumber;
height: z.ZodNumber;
dpr: z.ZodNumber;
colorDepth: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
viewport: z.ZodObject<{
width: z.ZodNumber;
height: z.ZodNumber;
}, z.core.$strip>;
colorScheme: z.ZodEnum<{
unknown: "unknown";
light: "light";
dark: "dark";
}>;
reducedMotion: z.ZodBoolean;
platform: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
page: z.ZodOptional<z.ZodObject<{
url: z.ZodOptional<z.ZodString>;
title: z.ZodOptional<z.ZodString>;
userAgent: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
role: z.ZodLiteral<"node-runtime">;
}, z.core.$strip>;
events: z.ZodArray<z.ZodObject<{
type: z.ZodOptional<z.ZodLiteral<"event">>;
id: z.ZodString;
tabId: z.ZodOptional<z.ZodString>;
projectId: z.ZodOptional<z.ZodString>;
sessionId: z.ZodOptional<z.ZodString>;
buildId: z.ZodOptional<z.ZodString>;
visitorId: z.ZodOptional<z.ZodString>;
name: z.ZodString;
ts: z.ZodNumber;
payload: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export type HttpBatch = z.infer<typeof httpBatchSchema>;
export declare const frameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{

@@ -238,0 +295,0 @@ type: z.ZodLiteral<"hello">;

@@ -228,2 +228,11 @@ /**

});
// ─── HTTP batch transport (Edge Runtime) ────────────────────────────────────
//
// Used by HttpBatchTransport to POST events from Node/Edge environments where
// a persistent WebSocket is not available. The body carries a hello snapshot
// plus a batch of event frames — daemon treats it as a stateless hello+events.
export const httpBatchSchema = z.object({
hello: helloFrameSchema.partial({ type: true, id: true }).merge(z.object({ role: z.literal('node-runtime') })),
events: z.array(eventFrameSchema.partial({ type: true })),
});
export const frameSchema = z.discriminatedUnion('type', [

@@ -230,0 +239,0 @@ helloFrameSchema,

+1
-1
{
"name": "@harnessa-fe/protocol",
"version": "0.6.2",
"version": "0.7.0",
"description": "Shared types + Zod schemas across mcp-server, vite-plugin, runtime-client.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -264,2 +264,16 @@ /**

// ─── HTTP batch transport (Edge Runtime) ────────────────────────────────────
//
// Used by HttpBatchTransport to POST events from Node/Edge environments where
// a persistent WebSocket is not available. The body carries a hello snapshot
// plus a batch of event frames — daemon treats it as a stateless hello+events.
export const httpBatchSchema = z.object({
hello: helloFrameSchema.partial({ type: true, id: true }).merge(
z.object({ role: z.literal('node-runtime') }),
),
events: z.array(eventFrameSchema.partial({ type: true })),
});
export type HttpBatch = z.infer<typeof httpBatchSchema>;
export const frameSchema = z.discriminatedUnion('type', [

@@ -266,0 +280,0 @@ helloFrameSchema,