@jait/shared 0.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.
Files changed (49) hide show
  1. package/dist/constants/index.d.ts +27 -0
  2. package/dist/constants/index.d.ts.map +1 -0
  3. package/dist/constants/index.js +32 -0
  4. package/dist/constants/index.js.map +1 -0
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +5 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/schemas/index.d.ts +214 -0
  10. package/dist/schemas/index.d.ts.map +1 -0
  11. package/dist/schemas/index.js +81 -0
  12. package/dist/schemas/index.js.map +1 -0
  13. package/dist/types/action.d.ts +32 -0
  14. package/dist/types/action.d.ts.map +1 -0
  15. package/dist/types/action.js +2 -0
  16. package/dist/types/action.js.map +1 -0
  17. package/dist/types/gateway.d.ts +47 -0
  18. package/dist/types/gateway.d.ts.map +1 -0
  19. package/dist/types/gateway.js +2 -0
  20. package/dist/types/gateway.js.map +1 -0
  21. package/dist/types/index.d.ts +10 -0
  22. package/dist/types/index.d.ts.map +1 -0
  23. package/dist/types/index.js +2 -0
  24. package/dist/types/index.js.map +1 -0
  25. package/dist/types/message.d.ts +61 -0
  26. package/dist/types/message.d.ts.map +1 -0
  27. package/dist/types/message.js +2 -0
  28. package/dist/types/message.js.map +1 -0
  29. package/dist/types/network.d.ts +49 -0
  30. package/dist/types/network.d.ts.map +1 -0
  31. package/dist/types/network.js +3 -0
  32. package/dist/types/network.js.map +1 -0
  33. package/dist/types/screen-share.d.ts +68 -0
  34. package/dist/types/screen-share.d.ts.map +1 -0
  35. package/dist/types/screen-share.js +2 -0
  36. package/dist/types/screen-share.js.map +1 -0
  37. package/dist/types/session.d.ts +14 -0
  38. package/dist/types/session.d.ts.map +1 -0
  39. package/dist/types/session.js +2 -0
  40. package/dist/types/session.js.map +1 -0
  41. package/dist/types/surface.d.ts +19 -0
  42. package/dist/types/surface.d.ts.map +1 -0
  43. package/dist/types/surface.js +13 -0
  44. package/dist/types/surface.js.map +1 -0
  45. package/dist/types/thread.d.ts +74 -0
  46. package/dist/types/thread.d.ts.map +1 -0
  47. package/dist/types/thread.js +8 -0
  48. package/dist/types/thread.js.map +1 -0
  49. package/package.json +46 -0
@@ -0,0 +1,27 @@
1
+ export declare const VERSION = "0.1.0";
2
+ export declare const DEFAULT_PORT = 8000;
3
+ export declare const DEFAULT_WS_PORT = 18789;
4
+ export declare const DEFAULT_WEB_PORT = 3000;
5
+ export declare const MAX_MESSAGE_LENGTH = 100000;
6
+ export declare const MAX_SESSION_NAME_LENGTH = 200;
7
+ export declare const CONSENT_TIMEOUT_MS: number;
8
+ export declare const ERROR_CODES: {
9
+ readonly UNAUTHORIZED: "UNAUTHORIZED";
10
+ readonly FORBIDDEN: "FORBIDDEN";
11
+ readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
12
+ readonly SESSION_CLOSED: "SESSION_CLOSED";
13
+ readonly ACTION_NOT_FOUND: "ACTION_NOT_FOUND";
14
+ readonly ACTION_ALREADY_EXECUTED: "ACTION_ALREADY_EXECUTED";
15
+ readonly CONSENT_TIMEOUT: "CONSENT_TIMEOUT";
16
+ readonly CONSENT_REJECTED: "CONSENT_REJECTED";
17
+ readonly TOOL_NOT_FOUND: "TOOL_NOT_FOUND";
18
+ readonly TOOL_EXECUTION_FAILED: "TOOL_EXECUTION_FAILED";
19
+ readonly TOOL_PERMISSION_DENIED: "TOOL_PERMISSION_DENIED";
20
+ readonly SURFACE_NOT_FOUND: "SURFACE_NOT_FOUND";
21
+ readonly SURFACE_UNAVAILABLE: "SURFACE_UNAVAILABLE";
22
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
23
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
24
+ readonly RATE_LIMITED: "RATE_LIMITED";
25
+ };
26
+ export type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,eAAO,MAAM,kBAAkB,SAAU,CAAC;AAC1C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,eAAO,MAAM,kBAAkB,QAAgB,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CA4Bd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ export const VERSION = "0.1.0";
2
+ export const DEFAULT_PORT = 8000;
3
+ export const DEFAULT_WS_PORT = 18789;
4
+ export const DEFAULT_WEB_PORT = 3000;
5
+ export const MAX_MESSAGE_LENGTH = 100_000;
6
+ export const MAX_SESSION_NAME_LENGTH = 200;
7
+ export const CONSENT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
8
+ export const ERROR_CODES = {
9
+ // Auth
10
+ UNAUTHORIZED: "UNAUTHORIZED",
11
+ FORBIDDEN: "FORBIDDEN",
12
+ // Sessions
13
+ SESSION_NOT_FOUND: "SESSION_NOT_FOUND",
14
+ SESSION_CLOSED: "SESSION_CLOSED",
15
+ // Actions
16
+ ACTION_NOT_FOUND: "ACTION_NOT_FOUND",
17
+ ACTION_ALREADY_EXECUTED: "ACTION_ALREADY_EXECUTED",
18
+ CONSENT_TIMEOUT: "CONSENT_TIMEOUT",
19
+ CONSENT_REJECTED: "CONSENT_REJECTED",
20
+ // Tools
21
+ TOOL_NOT_FOUND: "TOOL_NOT_FOUND",
22
+ TOOL_EXECUTION_FAILED: "TOOL_EXECUTION_FAILED",
23
+ TOOL_PERMISSION_DENIED: "TOOL_PERMISSION_DENIED",
24
+ // Surfaces
25
+ SURFACE_NOT_FOUND: "SURFACE_NOT_FOUND",
26
+ SURFACE_UNAVAILABLE: "SURFACE_UNAVAILABLE",
27
+ // General
28
+ VALIDATION_ERROR: "VALIDATION_ERROR",
29
+ INTERNAL_ERROR: "INTERNAL_ERROR",
30
+ RATE_LIMITED: "RATE_LIMITED",
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAE7D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO;IACP,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IAEtB,WAAW;IACX,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAEhC,UAAU;IACV,gBAAgB,EAAE,kBAAkB;IACpC,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IAEpC,QAAQ;IACR,cAAc,EAAE,gBAAgB;IAChC,qBAAqB,EAAE,uBAAuB;IAC9C,sBAAsB,EAAE,wBAAwB;IAEhD,WAAW;IACX,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAE1C,UAAU;IACV,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;CACpB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./types/index.js";
2
+ export * from "./schemas/index.js";
3
+ export * from "./constants/index.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // @jait/shared — main entry point
2
+ export * from "./types/index.js";
3
+ export * from "./schemas/index.js";
4
+ export * from "./constants/index.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,214 @@
1
+ import { z } from "zod";
2
+ export declare const surfaceTypeSchema: z.ZodEnum<["terminal", "browser", "screen-share", "screen-capture", "voice", "file-system", "os-control", "clipboard", "notification"]>;
3
+ export declare const surfaceCapabilitiesSchema: z.ZodObject<{
4
+ supportsStreaming: z.ZodBoolean;
5
+ supportsInput: z.ZodBoolean;
6
+ supportsSnapshot: z.ZodBoolean;
7
+ supportsRecording: z.ZodBoolean;
8
+ requiresConsent: z.ZodBoolean;
9
+ maxConcurrent: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ supportsStreaming: boolean;
12
+ supportsInput: boolean;
13
+ supportsSnapshot: boolean;
14
+ supportsRecording: boolean;
15
+ requiresConsent: boolean;
16
+ maxConcurrent: number;
17
+ }, {
18
+ supportsStreaming: boolean;
19
+ supportsInput: boolean;
20
+ supportsSnapshot: boolean;
21
+ supportsRecording: boolean;
22
+ requiresConsent: boolean;
23
+ maxConcurrent: number;
24
+ }>;
25
+ export declare const surfaceInfoSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ type: z.ZodEnum<["terminal", "browser", "screen-share", "screen-capture", "voice", "file-system", "os-control", "clipboard", "notification"]>;
28
+ status: z.ZodEnum<["connected", "disconnected", "error"]>;
29
+ capabilities: z.ZodObject<{
30
+ supportsStreaming: z.ZodBoolean;
31
+ supportsInput: z.ZodBoolean;
32
+ supportsSnapshot: z.ZodBoolean;
33
+ supportsRecording: z.ZodBoolean;
34
+ requiresConsent: z.ZodBoolean;
35
+ maxConcurrent: z.ZodNumber;
36
+ }, "strip", z.ZodTypeAny, {
37
+ supportsStreaming: boolean;
38
+ supportsInput: boolean;
39
+ supportsSnapshot: boolean;
40
+ supportsRecording: boolean;
41
+ requiresConsent: boolean;
42
+ maxConcurrent: number;
43
+ }, {
44
+ supportsStreaming: boolean;
45
+ supportsInput: boolean;
46
+ supportsSnapshot: boolean;
47
+ supportsRecording: boolean;
48
+ requiresConsent: boolean;
49
+ maxConcurrent: number;
50
+ }>;
51
+ deviceId: z.ZodString;
52
+ connectedAt: z.ZodNullable<z.ZodString>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ type: "terminal" | "browser" | "screen-share" | "screen-capture" | "voice" | "file-system" | "os-control" | "clipboard" | "notification";
55
+ status: "connected" | "disconnected" | "error";
56
+ id: string;
57
+ capabilities: {
58
+ supportsStreaming: boolean;
59
+ supportsInput: boolean;
60
+ supportsSnapshot: boolean;
61
+ supportsRecording: boolean;
62
+ requiresConsent: boolean;
63
+ maxConcurrent: number;
64
+ };
65
+ deviceId: string;
66
+ connectedAt: string | null;
67
+ }, {
68
+ type: "terminal" | "browser" | "screen-share" | "screen-capture" | "voice" | "file-system" | "os-control" | "clipboard" | "notification";
69
+ status: "connected" | "disconnected" | "error";
70
+ id: string;
71
+ capabilities: {
72
+ supportsStreaming: boolean;
73
+ supportsInput: boolean;
74
+ supportsSnapshot: boolean;
75
+ supportsRecording: boolean;
76
+ requiresConsent: boolean;
77
+ maxConcurrent: number;
78
+ };
79
+ deviceId: string;
80
+ connectedAt: string | null;
81
+ }>;
82
+ export declare const sessionCreateSchema: z.ZodObject<{
83
+ name: z.ZodOptional<z.ZodString>;
84
+ workspacePath: z.ZodOptional<z.ZodString>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ name?: string | undefined;
87
+ workspacePath?: string | undefined;
88
+ }, {
89
+ name?: string | undefined;
90
+ workspacePath?: string | undefined;
91
+ }>;
92
+ export declare const sessionInfoSchema: z.ZodObject<{
93
+ id: z.ZodString;
94
+ name: z.ZodNullable<z.ZodString>;
95
+ workspacePath: z.ZodNullable<z.ZodString>;
96
+ status: z.ZodEnum<["active", "archived", "deleted"]>;
97
+ createdAt: z.ZodString;
98
+ lastActiveAt: z.ZodString;
99
+ metadata: z.ZodNullable<z.ZodString>;
100
+ }, "strip", z.ZodTypeAny, {
101
+ status: "active" | "archived" | "deleted";
102
+ id: string;
103
+ name: string | null;
104
+ workspacePath: string | null;
105
+ createdAt: string;
106
+ lastActiveAt: string;
107
+ metadata: string | null;
108
+ }, {
109
+ status: "active" | "archived" | "deleted";
110
+ id: string;
111
+ name: string | null;
112
+ workspacePath: string | null;
113
+ createdAt: string;
114
+ lastActiveAt: string;
115
+ metadata: string | null;
116
+ }>;
117
+ export declare const actionStatusSchema: z.ZodEnum<["pending", "approved", "executing", "executed", "completed", "failed", "reverted"]>;
118
+ export declare const actionResponseSchema: z.ZodObject<{
119
+ action_id: z.ZodString;
120
+ status: z.ZodEnum<["pending", "approved", "executing", "executed", "completed", "failed", "reverted"]>;
121
+ surface: z.ZodString;
122
+ device_id: z.ZodOptional<z.ZodString>;
123
+ preview: z.ZodOptional<z.ZodObject<{
124
+ command: z.ZodOptional<z.ZodString>;
125
+ description: z.ZodString;
126
+ side_effects: z.ZodArray<z.ZodString, "many">;
127
+ }, "strip", z.ZodTypeAny, {
128
+ description: string;
129
+ side_effects: string[];
130
+ command?: string | undefined;
131
+ }, {
132
+ description: string;
133
+ side_effects: string[];
134
+ command?: string | undefined;
135
+ }>>;
136
+ consent_url: z.ZodOptional<z.ZodString>;
137
+ expires_at: z.ZodOptional<z.ZodString>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ status: "pending" | "approved" | "executing" | "executed" | "completed" | "failed" | "reverted";
140
+ action_id: string;
141
+ surface: string;
142
+ device_id?: string | undefined;
143
+ preview?: {
144
+ description: string;
145
+ side_effects: string[];
146
+ command?: string | undefined;
147
+ } | undefined;
148
+ consent_url?: string | undefined;
149
+ expires_at?: string | undefined;
150
+ }, {
151
+ status: "pending" | "approved" | "executing" | "executed" | "completed" | "failed" | "reverted";
152
+ action_id: string;
153
+ surface: string;
154
+ device_id?: string | undefined;
155
+ preview?: {
156
+ description: string;
157
+ side_effects: string[];
158
+ command?: string | undefined;
159
+ } | undefined;
160
+ consent_url?: string | undefined;
161
+ expires_at?: string | undefined;
162
+ }>;
163
+ export declare const chatMessageSchema: z.ZodObject<{
164
+ id: z.ZodString;
165
+ role: z.ZodEnum<["user", "assistant", "system", "tool"]>;
166
+ content: z.ZodString;
167
+ timestamp: z.ZodString;
168
+ sessionId: z.ZodString;
169
+ }, "strip", z.ZodTypeAny, {
170
+ id: string;
171
+ role: "user" | "assistant" | "system" | "tool";
172
+ content: string;
173
+ timestamp: string;
174
+ sessionId: string;
175
+ }, {
176
+ id: string;
177
+ role: "user" | "assistant" | "system" | "tool";
178
+ content: string;
179
+ timestamp: string;
180
+ sessionId: string;
181
+ }>;
182
+ export declare const sendMessageSchema: z.ZodObject<{
183
+ content: z.ZodString;
184
+ sessionId: z.ZodString;
185
+ }, "strip", z.ZodTypeAny, {
186
+ content: string;
187
+ sessionId: string;
188
+ }, {
189
+ content: string;
190
+ sessionId: string;
191
+ }>;
192
+ export declare const gatewayStatusSchema: z.ZodObject<{
193
+ version: z.ZodString;
194
+ uptime: z.ZodNumber;
195
+ sessions: z.ZodNumber;
196
+ surfaces: z.ZodNumber;
197
+ devices: z.ZodNumber;
198
+ healthy: z.ZodBoolean;
199
+ }, "strip", z.ZodTypeAny, {
200
+ version: string;
201
+ uptime: number;
202
+ sessions: number;
203
+ surfaces: number;
204
+ devices: number;
205
+ healthy: boolean;
206
+ }, {
207
+ version: string;
208
+ uptime: number;
209
+ sessions: number;
210
+ surfaces: number;
211
+ devices: number;
212
+ healthy: boolean;
213
+ }>;
214
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB,yIAAwB,CAAC;AAEvD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC;AAIH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAC;AAIH,eAAO,MAAM,kBAAkB,gGAQ7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc/B,CAAC;AAIH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAIH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { z } from "zod";
2
+ import { SURFACE_TYPES } from "../types/surface.js";
3
+ // --- Surface schemas ---
4
+ export const surfaceTypeSchema = z.enum(SURFACE_TYPES);
5
+ export const surfaceCapabilitiesSchema = z.object({
6
+ supportsStreaming: z.boolean(),
7
+ supportsInput: z.boolean(),
8
+ supportsSnapshot: z.boolean(),
9
+ supportsRecording: z.boolean(),
10
+ requiresConsent: z.boolean(),
11
+ maxConcurrent: z.number().int().positive(),
12
+ });
13
+ export const surfaceInfoSchema = z.object({
14
+ id: z.string(),
15
+ type: surfaceTypeSchema,
16
+ status: z.enum(["connected", "disconnected", "error"]),
17
+ capabilities: surfaceCapabilitiesSchema,
18
+ deviceId: z.string(),
19
+ connectedAt: z.string().nullable(),
20
+ });
21
+ // --- Session schemas ---
22
+ export const sessionCreateSchema = z.object({
23
+ name: z.string().max(200).optional(),
24
+ workspacePath: z.string().optional(),
25
+ });
26
+ export const sessionInfoSchema = z.object({
27
+ id: z.string(),
28
+ name: z.string().nullable(),
29
+ workspacePath: z.string().nullable(),
30
+ status: z.enum(["active", "archived", "deleted"]),
31
+ createdAt: z.string(),
32
+ lastActiveAt: z.string(),
33
+ metadata: z.string().nullable(),
34
+ });
35
+ // --- Action schemas ---
36
+ export const actionStatusSchema = z.enum([
37
+ "pending",
38
+ "approved",
39
+ "executing",
40
+ "executed",
41
+ "completed",
42
+ "failed",
43
+ "reverted",
44
+ ]);
45
+ export const actionResponseSchema = z.object({
46
+ action_id: z.string(),
47
+ status: actionStatusSchema,
48
+ surface: z.string(),
49
+ device_id: z.string().optional(),
50
+ preview: z
51
+ .object({
52
+ command: z.string().optional(),
53
+ description: z.string(),
54
+ side_effects: z.array(z.string()),
55
+ })
56
+ .optional(),
57
+ consent_url: z.string().url().optional(),
58
+ expires_at: z.string().datetime().optional(),
59
+ });
60
+ // --- Message schemas ---
61
+ export const chatMessageSchema = z.object({
62
+ id: z.string(),
63
+ role: z.enum(["user", "assistant", "system", "tool"]),
64
+ content: z.string(),
65
+ timestamp: z.string().datetime(),
66
+ sessionId: z.string(),
67
+ });
68
+ export const sendMessageSchema = z.object({
69
+ content: z.string().min(1).max(100_000),
70
+ sessionId: z.string().uuid(),
71
+ });
72
+ // --- Gateway schemas ---
73
+ export const gatewayStatusSchema = z.object({
74
+ version: z.string(),
75
+ uptime: z.number(),
76
+ sessions: z.number().int(),
77
+ surfaces: z.number().int(),
78
+ devices: z.number().int(),
79
+ healthy: z.boolean(),
80
+ });
81
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,0BAA0B;AAE1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC9B,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;IAC1B,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7B,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC9B,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACtD,YAAY,EAAE,yBAAyB;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAEH,0BAA0B;AAE1B,MAAM,CAAC,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O,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ export type ActionStatus = "pending" | "approved" | "executing" | "executed" | "completed" | "failed" | "reverted";
2
+ export interface ActionResponse {
3
+ action_id: string;
4
+ status: ActionStatus;
5
+ surface: string;
6
+ device_id?: string;
7
+ preview?: {
8
+ command?: string;
9
+ description: string;
10
+ side_effects: string[];
11
+ };
12
+ consent_url?: string;
13
+ expires_at?: string;
14
+ }
15
+ export interface AuditEntry {
16
+ id: string;
17
+ timestamp: string;
18
+ sessionId?: string | null;
19
+ surfaceType?: string | null;
20
+ deviceId?: string | null;
21
+ actionId: string;
22
+ actionType: string;
23
+ toolName?: string | null;
24
+ inputs?: string | null;
25
+ outputs?: string | null;
26
+ sideEffects?: string | null;
27
+ status: string;
28
+ consentMethod?: string | null;
29
+ signature?: string | null;
30
+ parentActionId?: string | null;
31
+ }
32
+ //# sourceMappingURL=action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/types/action.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,CAAC;AAEf,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.js","sourceRoot":"","sources":["../../src/types/action.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ export interface GatewayStatus {
2
+ version: string;
3
+ uptime: number;
4
+ sessions: number;
5
+ surfaces: number;
6
+ devices: number;
7
+ healthy: boolean;
8
+ }
9
+ export interface DeviceInfo {
10
+ id: string;
11
+ name: string;
12
+ platform: "desktop" | "mobile" | "browser";
13
+ capabilities: string[];
14
+ connectedAt: string;
15
+ lastSeen: string;
16
+ }
17
+ /**
18
+ * A filesystem node — a device that can expose its local filesystem
19
+ * for remote browsing through the gateway.
20
+ */
21
+ export interface FsNode {
22
+ id: string;
23
+ name: string;
24
+ platform: "windows" | "macos" | "linux" | "android" | "ios";
25
+ /** The WS client ID that owns this node (used for proxying requests) */
26
+ clientId: string;
27
+ /** Whether this is the gateway server itself (uses local fs, no WS proxy needed) */
28
+ isGateway: boolean;
29
+ registeredAt: string;
30
+ }
31
+ /** Entry returned by filesystem browse operations */
32
+ export interface FsBrowseEntry {
33
+ name: string;
34
+ path: string;
35
+ type: "dir" | "file";
36
+ }
37
+ /** Response from a filesystem browse request */
38
+ export interface FsBrowseResponse {
39
+ path: string;
40
+ parent: string | null;
41
+ entries: FsBrowseEntry[];
42
+ }
43
+ /** Response from a filesystem roots request */
44
+ export interface FsRootsResponse {
45
+ roots: FsBrowseEntry[];
46
+ }
47
+ //# sourceMappingURL=gateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/types/gateway.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IAC5D,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;CACtB;AAED,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../src/types/gateway.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export type { SurfaceType, SurfaceCapabilities, SurfaceInfo } from "./surface.js";
2
+ export { SURFACE_TYPES } from "./surface.js";
3
+ export type { SessionInfo, SessionCreateParams } from "./session.js";
4
+ export type { ActionStatus, ActionResponse, AuditEntry, } from "./action.js";
5
+ export type { MessageRole, ChatMessage, ToolCall, WsEventType, WsEvent, UICommandType, UICommandPayload, UIStateKey, UIStateUpdate, WorkspaceOpenData, WorkspaceCloseData, TerminalFocusData, FileHighlightData, ScreenShareOpenData, } from "./message.js";
6
+ export type { GatewayStatus, DeviceInfo, FsNode, FsBrowseEntry, FsBrowseResponse, FsRootsResponse } from "./gateway.js";
7
+ export type { NetworkHost, NetworkScanResult, SshTestResult, DeployStatus, GatewayNode, } from "./network.js";
8
+ export type { DevicePlatform, ScreenShareDevice, ScreenShareRouteMode, ScreenShareViewer, ScreenShareSessionState, OsToolNetworkShareState, ScreenShareOffer, ScreenShareAnswer, ScreenShareIceCandidate, ScreenShareSignalType, ScreenShareStartRequest, ScreenShareStopRequest, } from "./screen-share.js";
9
+ export type { ProviderId, ProviderInfo, RuntimeMode, ThreadStatus, ThreadInfo, ThreadActivityKind, ThreadActivity, CreateThreadParams, UpdateThreadParams, ThreadWsEventType, ThreadWsEvent, } from "./thread.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACrE,YAAY,EACV,YAAY,EACZ,cAAc,EACd,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAExH,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SURFACE_TYPES } from "./surface.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,61 @@
1
+ export type MessageRole = "user" | "assistant" | "system" | "tool";
2
+ export interface ChatMessage {
3
+ id: string;
4
+ role: MessageRole;
5
+ content: string;
6
+ timestamp: string;
7
+ sessionId: string;
8
+ toolCalls?: ToolCall[];
9
+ }
10
+ export interface ToolCall {
11
+ id: string;
12
+ name: string;
13
+ arguments: Record<string, unknown>;
14
+ result?: unknown;
15
+ status: "pending" | "approved" | "executing" | "completed" | "failed" | "rejected";
16
+ }
17
+ export type WsEventType = "session.created" | "session.closed" | "message.delta" | "message.complete" | "tool.call" | "tool.result" | "consent.required" | "consent.resolved" | "surface.connected" | "surface.disconnected" | "ui.command" | "ui.state-sync" | "ui.full-state" | "thread.created" | "thread.updated" | "thread.deleted" | "thread.status" | "thread.activity" | "repo.created" | "repo.updated" | "repo.deleted" | "error";
18
+ export interface WsEvent<T = unknown> {
19
+ type: WsEventType;
20
+ sessionId: string;
21
+ timestamp: string;
22
+ payload: T;
23
+ }
24
+ export type UICommandType = "workspace.open" | "workspace.close" | "terminal.focus" | "file.highlight" | "screen-share.open" | "screen-share.close";
25
+ /** Payload sent inside a `ui.command` WsEvent */
26
+ export interface UICommandPayload<T = Record<string, unknown>> {
27
+ command: UICommandType;
28
+ data: T;
29
+ }
30
+ export interface WorkspaceOpenData {
31
+ surfaceId: string;
32
+ workspaceRoot: string;
33
+ }
34
+ export interface WorkspaceCloseData {
35
+ surfaceId: string;
36
+ }
37
+ export interface TerminalFocusData {
38
+ terminalId: string;
39
+ reason?: "interactive-input-required" | string;
40
+ message?: string;
41
+ }
42
+ export interface FileHighlightData {
43
+ path: string;
44
+ line?: number;
45
+ }
46
+ export interface ScreenShareOpenData {
47
+ sessionId: string;
48
+ targetDeviceId: string;
49
+ }
50
+ /**
51
+ * Keys for UI component state that can be synced between client and server.
52
+ * Each key maps to a specific panel/component that the agent can control.
53
+ */
54
+ export type UIStateKey = "workspace.panel" | "screen-share.panel" | "terminal.panel" | "todo_list" | "changed_files";
55
+ /** Payload sent inside a `ui.state` client→server WS message */
56
+ export interface UIStateUpdate {
57
+ sessionId: string;
58
+ key: UIStateKey;
59
+ value: unknown | null;
60
+ }
61
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;CACpF;AAGD,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,GACnB,sBAAsB,GACtB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,gBAAgB,GA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AAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ export interface NetworkHost {
2
+ ip: string;
3
+ mac: string | null;
4
+ hostname: string | null;
5
+ vendor: string | null;
6
+ /** Whether the host responded to ping / ARP */
7
+ alive: boolean;
8
+ /** Open ports discovered (e.g. 22, 80, 443) */
9
+ openPorts: number[];
10
+ /** Whether SSH (port 22) appears reachable */
11
+ sshReachable: boolean;
12
+ /** Gateway agent status on this host */
13
+ agentStatus: 'not-installed' | 'installed' | 'running' | 'unreachable';
14
+ /** Timestamp of last scan */
15
+ lastSeen: string;
16
+ }
17
+ export interface NetworkScanResult {
18
+ subnet: string;
19
+ hosts: NetworkHost[];
20
+ scannedAt: string;
21
+ /** Duration of the scan in ms */
22
+ durationMs: number;
23
+ }
24
+ export interface SshTestResult {
25
+ ip: string;
26
+ reachable: boolean;
27
+ authMethods: string[];
28
+ /** If authenticated, the remote platform info */
29
+ platform?: string;
30
+ error?: string;
31
+ }
32
+ export interface DeployStatus {
33
+ ip: string;
34
+ stage: 'connecting' | 'uploading' | 'installing' | 'configuring' | 'starting' | 'done' | 'error';
35
+ progress: number;
36
+ message: string;
37
+ error?: string;
38
+ }
39
+ export interface GatewayNode {
40
+ id: string;
41
+ ip: string;
42
+ hostname: string | null;
43
+ platform: string;
44
+ version: string;
45
+ status: 'online' | 'offline' | 'degraded';
46
+ lastSeen: string;
47
+ capabilities: string[];
48
+ }
49
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/types/network.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAA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f,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB"}
@@ -0,0 +1,3 @@
1
+ // @jait/shared — Network scanning, SSH, and device deployment types
2
+ export {};
3
+ //# sourceMappingURL=network.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/types/network.ts"],"names":[],"mappings":"AAAA,oEAAoE"}
@@ -0,0 +1,68 @@
1
+ export type DevicePlatform = "electron" | "react-native" | "web";
2
+ export interface ScreenShareDevice {
3
+ id: string;
4
+ name: string;
5
+ platform: DevicePlatform;
6
+ authorized: boolean;
7
+ capabilities: string[];
8
+ connectedAt: string;
9
+ lastSeenAt: string;
10
+ }
11
+ export type ScreenShareRouteMode = "p2p" | "turn";
12
+ export interface ScreenShareViewer {
13
+ deviceId: string;
14
+ connectedAt: string;
15
+ canControl: boolean;
16
+ transportMode: ScreenShareRouteMode;
17
+ latencyMs: number;
18
+ }
19
+ export interface ScreenShareSessionState {
20
+ id: string;
21
+ status: "idle" | "sharing" | "paused";
22
+ hostDeviceId: string;
23
+ controllerDeviceId: string | null;
24
+ viewers: ScreenShareViewer[];
25
+ capabilities: {
26
+ remoteInput: boolean;
27
+ recording: boolean;
28
+ turnRelay: boolean;
29
+ adaptiveStreaming: boolean;
30
+ };
31
+ transport: {
32
+ iceConnectionState: "new" | "checking" | "connected" | "disconnected" | "failed";
33
+ routeMode: ScreenShareRouteMode;
34
+ avgLatencyMs: number;
35
+ relayActive: boolean;
36
+ };
37
+ updatedAt: string;
38
+ }
39
+ export interface OsToolNetworkShareState {
40
+ devices: ScreenShareDevice[];
41
+ activeSession: ScreenShareSessionState | null;
42
+ }
43
+ export interface ScreenShareOffer {
44
+ sessionId: string;
45
+ hostDeviceId: string;
46
+ sdp: string;
47
+ }
48
+ export interface ScreenShareAnswer {
49
+ sessionId: string;
50
+ viewerDeviceId: string;
51
+ sdp: string;
52
+ }
53
+ export interface ScreenShareIceCandidate {
54
+ sessionId: string;
55
+ fromDeviceId: string;
56
+ candidate: string;
57
+ sdpMid: string | null;
58
+ sdpMLineIndex: number | null;
59
+ }
60
+ export type ScreenShareSignalType = "screen-share:offer" | "screen-share:answer" | "screen-share:ice-candidate" | "screen-share:start-request" | "screen-share:stop-request" | "screen-share:state-update";
61
+ export interface ScreenShareStartRequest {
62
+ hostDeviceId: string;
63
+ viewerDeviceIds?: string[];
64
+ }
65
+ export interface ScreenShareStopRequest {
66
+ sessionId: string;
67
+ }
68
+ //# sourceMappingURL=screen-share.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen-share.d.ts","sourceRoot":"","sources":["../../src/types/screen-share.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,cAAc,GAAG,KAAK,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,oBAAoB,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IA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M,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=screen-share.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen-share.js","sourceRoot":"","sources":["../../src/types/screen-share.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export interface SessionInfo {
2
+ id: string;
3
+ name: string | null;
4
+ workspacePath: string | null;
5
+ status: "active" | "archived" | "deleted";
6
+ createdAt: string;
7
+ lastActiveAt: string;
8
+ metadata: string | null;
9
+ }
10
+ export interface SessionCreateParams {
11
+ name?: string;
12
+ workspacePath?: string;
13
+ }
14
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export declare const SURFACE_TYPES: readonly ["terminal", "browser", "screen-share", "screen-capture", "voice", "file-system", "os-control", "clipboard", "notification"];
2
+ export type SurfaceType = (typeof SURFACE_TYPES)[number];
3
+ export interface SurfaceCapabilities {
4
+ supportsStreaming: boolean;
5
+ supportsInput: boolean;
6
+ supportsSnapshot: boolean;
7
+ supportsRecording: boolean;
8
+ requiresConsent: boolean;
9
+ maxConcurrent: number;
10
+ }
11
+ export interface SurfaceInfo {
12
+ id: string;
13
+ type: SurfaceType;
14
+ status: "connected" | "disconnected" | "error";
15
+ capabilities: SurfaceCapabilities;
16
+ deviceId: string;
17
+ connectedAt: string | null;
18
+ }
19
+ //# sourceMappingURL=surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/types/surface.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,uIAUhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,WAAW,GAAG,cAAc,GAAG,OAAO,CAAC;IAC/C,YAAY,EAAE,mBAAmB,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,13 @@
1
+ // @jait/shared — Surface types
2
+ export const SURFACE_TYPES = [
3
+ "terminal",
4
+ "browser",
5
+ "screen-share",
6
+ "screen-capture",
7
+ "voice",
8
+ "file-system",
9
+ "os-control",
10
+ "clipboard",
11
+ "notification",
12
+ ];
13
+ //# sourceMappingURL=surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/types/surface.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU;IACV,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,OAAO;IACP,aAAa;IACb,YAAY;IACZ,WAAW;IACX,cAAc;CACN,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Shared types for agent threads and CLI providers.
3
+ *
4
+ * These types are consumed by both the gateway (backend) and
5
+ * the web app (frontend) for the parallel-agents UI.
6
+ */
7
+ export type ProviderId = "jait" | "codex" | "claude-code";
8
+ export interface ProviderInfo {
9
+ id: ProviderId;
10
+ name: string;
11
+ description: string;
12
+ available: boolean;
13
+ unavailableReason?: string;
14
+ modes: RuntimeMode[];
15
+ }
16
+ export type RuntimeMode = "full-access" | "supervised";
17
+ export type ThreadStatus = "running" | "completed" | "error" | "interrupted";
18
+ export interface ThreadInfo {
19
+ id: string;
20
+ userId: string | null;
21
+ sessionId: string | null;
22
+ title: string;
23
+ providerId: ProviderId;
24
+ model: string | null;
25
+ runtimeMode: RuntimeMode;
26
+ workingDirectory: string | null;
27
+ branch: string | null;
28
+ status: ThreadStatus;
29
+ providerSessionId: string | null;
30
+ error: string | null;
31
+ prUrl: string | null;
32
+ prNumber: number | null;
33
+ prTitle: string | null;
34
+ prState: "open" | "closed" | "merged" | null;
35
+ createdAt: string;
36
+ updatedAt: string;
37
+ completedAt: string | null;
38
+ }
39
+ export type ThreadActivityKind = "tool.start" | "tool.result" | "tool.error" | "tool.approval" | "message" | "error" | "session" | "activity";
40
+ export interface ThreadActivity {
41
+ id: string;
42
+ threadId: string;
43
+ kind: string;
44
+ summary: string;
45
+ payload?: unknown;
46
+ createdAt: string;
47
+ }
48
+ export interface CreateThreadParams {
49
+ sessionId?: string;
50
+ title: string;
51
+ providerId: ProviderId;
52
+ model?: string;
53
+ runtimeMode?: RuntimeMode;
54
+ workingDirectory?: string;
55
+ branch?: string;
56
+ }
57
+ export interface UpdateThreadParams {
58
+ title?: string;
59
+ model?: string;
60
+ runtimeMode?: RuntimeMode;
61
+ workingDirectory?: string;
62
+ branch?: string;
63
+ prUrl?: string | null;
64
+ prNumber?: number | null;
65
+ prTitle?: string | null;
66
+ prState?: "open" | "closed" | "merged" | null;
67
+ }
68
+ export type ThreadWsEventType = "thread.created" | "thread.updated" | "thread.deleted" | "thread.status" | "thread.activity";
69
+ export interface ThreadWsEvent {
70
+ type: ThreadWsEventType;
71
+ threadId: string;
72
+ data: unknown;
73
+ }
74
+ //# sourceMappingURL=thread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../src/types/thread.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;AAE1D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,UAAU,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,CAAC;AAIvD,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,WAAW,GACX,OAAO,GACP,aAAa,CAAC;AAIlB,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM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B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC;CAC/C;AAID,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,iBAAiB,CAAC;AAEtB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shared types for agent threads and CLI providers.
3
+ *
4
+ * These types are consumed by both the gateway (backend) and
5
+ * the web app (frontend) for the parallel-agents UI.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=thread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread.js","sourceRoot":"","sources":["../../src/types/thread.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@jait/shared",
3
+ "version": "0.1.0",
4
+ "description": "Shared schemas, constants, and domain types for Jait",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ },
16
+ "./schemas": {
17
+ "import": "./dist/schemas/index.js",
18
+ "types": "./dist/schemas/index.d.ts"
19
+ },
20
+ "./types": {
21
+ "import": "./dist/types/index.js",
22
+ "types": "./dist/types/index.d.ts"
23
+ },
24
+ "./constants": {
25
+ "import": "./dist/constants/index.js",
26
+ "types": "./dist/constants/index.d.ts"
27
+ }
28
+ },
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/JakobWl/Jait.git",
33
+ "directory": "packages/shared"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc",
37
+ "dev": "tsc --watch",
38
+ "typecheck": "tsc --noEmit"
39
+ },
40
+ "dependencies": {
41
+ "zod": "^3.24.0"
42
+ },
43
+ "devDependencies": {
44
+ "typescript": "^5.7.3"
45
+ }
46
+ }