lody 0.102.0 → 0.104.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.
@@ -0,0 +1,161 @@
1
+ import { o as object, l as literal, s as string, d as discriminatedUnion, a as _enum, b as array, c as boolean, n as number, e as union } from "./schemas-D_XLKCXC.js";
2
+ const RPC_SECRET_PUBLIC_KEY_TYPE = "rpc-secret-public-key-v1";
3
+ const RPC_SECRET_ENVELOPE_TYPE = "rpc-secret-envelope-v1";
4
+ const RPC_SECRET_ALGORITHM = "ECDH-P256-AES-256-GCM";
5
+ const Base64UrlSchema = string().trim().min(1).max(16384).regex(/^[A-Za-z0-9_-]+$/);
6
+ const RpcSecretEcPublicJwkSchema = object({
7
+ kty: literal("EC"),
8
+ crv: literal("P-256"),
9
+ x: Base64UrlSchema.max(128),
10
+ y: Base64UrlSchema.max(128)
11
+ }).strict();
12
+ const RpcSecretPublicKeySchema = object({
13
+ type: literal(RPC_SECRET_PUBLIC_KEY_TYPE),
14
+ algorithm: literal(RPC_SECRET_ALGORITHM),
15
+ keyId: Base64UrlSchema.max(128),
16
+ publicKey: RpcSecretEcPublicJwkSchema
17
+ }).strict();
18
+ const RpcSecretEnvelopeSchema = object({
19
+ type: literal(RPC_SECRET_ENVELOPE_TYPE),
20
+ algorithm: literal(RPC_SECRET_ALGORITHM),
21
+ keyId: Base64UrlSchema.max(128),
22
+ ephemeralPublicKey: RpcSecretEcPublicJwkSchema,
23
+ iv: Base64UrlSchema.max(64),
24
+ ciphertext: Base64UrlSchema
25
+ }).strict();
26
+ const id = string().min(1).max(200);
27
+ const IosSimulatorDeviceControlSchema = discriminatedUnion("kind", [
28
+ object({
29
+ kind: literal("button"),
30
+ button: _enum(["home", "app-switcher", "lock", "volume-up", "volume-down", "action"])
31
+ }).strict(),
32
+ object({ kind: literal("rotate"), direction: _enum(["left", "right"]) }).strict(),
33
+ object({ kind: literal("shake") }).strict(),
34
+ object({ kind: literal("text"), text: string().min(1).max(16e3) }).strict(),
35
+ object({ kind: literal("appearance"), appearance: _enum(["light", "dark"]) }).strict(),
36
+ object({
37
+ kind: literal("open-url"),
38
+ url: string().min(1).max(8192).refine((value) => {
39
+ for (const char of value) {
40
+ if (char.charCodeAt(0) <= 32 || char.charCodeAt(0) === 127) return false;
41
+ }
42
+ try {
43
+ return !["javascript:", "vbscript:", "data:", "file:", "blob:", "about:"].includes(
44
+ new URL(value).protocol
45
+ );
46
+ } catch {
47
+ return false;
48
+ }
49
+ })
50
+ }).strict()
51
+ ]);
52
+ const IosSimulatorDeviceControlRequestSchema = object({
53
+ operationId: id,
54
+ requestId: id,
55
+ control: IosSimulatorDeviceControlSchema
56
+ }).strict();
57
+ object({
58
+ success: boolean(),
59
+ rotation: union([literal(0), literal(90), literal(180), literal(270)]).optional(),
60
+ error: _enum(["unavailable", "unsupported", "failed", "busy"]).optional()
61
+ }).strict();
62
+ const IosSimulatorUdidSchema = string().uuid();
63
+ const IosSimulatorCommandSchema = discriminatedUnion("action", [
64
+ object({ action: literal("list") }).strict(),
65
+ object({ action: literal("exterior"), udid: IosSimulatorUdidSchema }).strict(),
66
+ object({ action: literal("start"), udid: IosSimulatorUdidSchema }).strict(),
67
+ object({ action: literal("status"), operationId: id.optional() }).strict(),
68
+ object({ action: literal("stop"), operationId: id }).strict()
69
+ ]);
70
+ const IosSimulatorRequestSchema = object({
71
+ sessionId: id,
72
+ requestedByUserId: id,
73
+ command: IosSimulatorCommandSchema
74
+ }).strict();
75
+ const IosSimulatorDeviceSchema = object({
76
+ udid: IosSimulatorUdidSchema,
77
+ name: string(),
78
+ runtime: string(),
79
+ deviceType: string(),
80
+ state: string(),
81
+ available: boolean(),
82
+ unavailableReason: string().optional(),
83
+ occupancy: _enum(["available", "this-session", "other-session"])
84
+ }).strict();
85
+ const IosSimulatorPreviewSchema = object({
86
+ operationId: id,
87
+ udid: IosSimulatorUdidSchema,
88
+ phase: _enum(["preparing", "booting", "connecting", "ready", "closed", "failed"]),
89
+ transport: _enum(["local", "remote"]),
90
+ viewerUrl: string().url().optional(),
91
+ message: string().optional()
92
+ }).strict();
93
+ const ExteriorSize = number().finite().positive().max(16384);
94
+ const ExteriorPosition = number().finite().min(0).max(16384);
95
+ const IosSimulatorExteriorSchema = object({
96
+ width: ExteriorSize,
97
+ height: ExteriorSize,
98
+ screen: object({
99
+ x: ExteriorPosition,
100
+ y: ExteriorPosition,
101
+ width: ExteriorSize,
102
+ height: ExteriorSize,
103
+ radius: ExteriorPosition
104
+ }).strict(),
105
+ buttons: array(
106
+ object({
107
+ button: _enum(["home", "lock", "volume-up", "volume-down", "action"]),
108
+ x: ExteriorPosition,
109
+ y: ExteriorPosition,
110
+ width: ExteriorSize,
111
+ height: ExteriorSize
112
+ }).strict()
113
+ ).max(16)
114
+ }).strict().refine((value) => {
115
+ const inside = (r) => r.x + r.width <= value.width && r.y + r.height <= value.height;
116
+ return inside(value.screen) && value.buttons.every(inside) && value.screen.radius <= Math.min(value.screen.width, value.screen.height) / 2;
117
+ });
118
+ const IOS_SIMULATOR_BEZEL_MAX_BYTES = 4 * 1024 * 1024;
119
+ function isIosSimulatorBezelPng(bytes, geometry) {
120
+ if (bytes.byteLength < 24 || bytes.byteLength > IOS_SIMULATOR_BEZEL_MAX_BYTES) return false;
121
+ if (![137, 80, 78, 71, 13, 10, 26, 10].every((byte, index) => bytes[index] === byte))
122
+ return false;
123
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
124
+ return view.getUint32(12) === 1229472850 && view.getUint32(16) === geometry.width && view.getUint32(20) === geometry.height && geometry.width * geometry.height <= 16 * 1024 * 1024;
125
+ }
126
+ const IosSimulatorExteriorAssetSchema = object({
127
+ geometry: IosSimulatorExteriorSchema,
128
+ pngBase64: string().min(32).max(35e4).regex(/^[A-Za-z0-9+/]+={0,2}$/)
129
+ }).strict();
130
+ const IosSimulatorResponseSchema = object({
131
+ type: literal("ios-simulator/control_response"),
132
+ sessionId: id,
133
+ success: boolean(),
134
+ devices: array(IosSimulatorDeviceSchema).optional(),
135
+ exterior: IosSimulatorExteriorAssetSchema.optional(),
136
+ preview: IosSimulatorPreviewSchema.optional(),
137
+ error: _enum(["unsupported", "environment", "occupied", "unavailable", "denied", "failed"]).optional(),
138
+ message: string().optional()
139
+ }).strict();
140
+ const IosSimulatorRemoteResponseSchema = IosSimulatorResponseSchema.extend({
141
+ preview: IosSimulatorPreviewSchema.omit({ viewerUrl: true }).extend({
142
+ viewerUrlEnvelope: RpcSecretEnvelopeSchema.optional()
143
+ }).strict().refine((p) => p.phase !== "ready" || p.viewerUrlEnvelope !== void 0).optional()
144
+ }).strict();
145
+ export {
146
+ IosSimulatorCommandSchema as I,
147
+ RpcSecretPublicKeySchema as R,
148
+ IosSimulatorRequestSchema as a,
149
+ IosSimulatorResponseSchema as b,
150
+ IosSimulatorExteriorSchema as c,
151
+ IOS_SIMULATOR_BEZEL_MAX_BYTES as d,
152
+ IosSimulatorDeviceControlRequestSchema as e,
153
+ RpcSecretEnvelopeSchema as f,
154
+ RPC_SECRET_ALGORITHM as g,
155
+ RpcSecretEcPublicJwkSchema as h,
156
+ isIosSimulatorBezelPng as i,
157
+ IosSimulatorRemoteResponseSchema as j,
158
+ IosSimulatorUdidSchema as k,
159
+ IosSimulatorDeviceControlSchema as l
160
+ };
161
+ //# sourceMappingURL=ios-simulator-hTbW-tat.js.map
@@ -10,7 +10,7 @@ import "node:async_hooks";
10
10
  import "fs";
11
11
  import "crypto";
12
12
  import "node:os";
13
- import "./schemas-WuyisFi9.js";
13
+ import "./schemas-D_XLKCXC.js";
14
14
  import "node:events";
15
15
  import "node:child_process";
16
16
  import "node:tty";
@@ -28,8 +28,9 @@ import "node:util";
28
28
  import "node:zlib";
29
29
  import "child_process";
30
30
  import "./plan-mode-D0D5cnMs.js";
31
- import "./acp-Bsd2Lmd6.js";
31
+ import "./acp-C0LiROfB.js";
32
32
  import "node:url";
33
+ import "./ios-simulator-hTbW-tat.js";
33
34
  import "./subagent-events-BJ9JwZva.js";
34
35
  import "./loro_wasm_bg-DIxpLA2J.js";
35
36
  import "perf_hooks";
@@ -52,23 +53,25 @@ import "node:util/types";
52
53
  import "node:worker_threads";
53
54
  import "node:console";
54
55
  import "node:dns";
55
- import "./directory-handle-CtdCjbNh.js";
56
- import "./diff-line-counts-DDGc5P-T.js";
57
56
  import "node:stream/promises";
58
57
  import "node:string_decoder";
58
+ import "async_hooks";
59
+ import "./cloudflared-native-BWtpTE_5.js";
60
+ import "node:dns/promises";
61
+ import "dgram";
62
+ import "timers/promises";
63
+ import "node:timers/promises";
64
+ import "./directory-handle-DgcESjFj.js";
65
+ import "./diff-line-counts-DDGc5P-T.js";
59
66
  import "./package-BoOO46ct.js";
60
67
  import "./session-DyqwlJbY.js";
61
- import "async_hooks";
62
68
  import "module";
63
69
  import "./diff-worker-task-MZsLArT5.js";
64
70
  import "./workspace-watch-protocol-POg9Lpeq.js";
65
- import "node:dns/promises";
66
- import "./cloudflared-native-DbUToPHH.js";
67
- import "node:timers/promises";
68
71
  import "node:module";
69
72
  import "node:v8";
70
73
  import "http2";
71
- const reviewViewerVersion = "0.102.0";
74
+ const reviewViewerVersion = "0.104.0";
72
75
  const reviewViewerSha256 = "d1ba5702aa0bd441b40492bd916d6412f8b970e92683f7073878a36efbdb0649";
73
76
  const reviewViewerFileName = "standalone.html";
74
77
  const DEFAULT_CDN_BASES = ["https://cdn.jsdelivr.net/npm", "https://unpkg.com"];
@@ -143,4 +146,4 @@ async function resolveReviewViewerTemplate() {
143
146
  export {
144
147
  resolveReviewViewerTemplate
145
148
  };
146
- //# sourceMappingURL=review-viewer-B6wZ9fN1.js.map
149
+ //# sourceMappingURL=review-viewer-nQBrydLp.js.map
@@ -4907,12 +4907,12 @@ function preprocess(fn, schema) {
4907
4907
  }
4908
4908
  export {
4909
4909
  uuid as A,
4910
- _null as B,
4910
+ lazy as B,
4911
4911
  looseObject as C,
4912
- lazy as D,
4913
- intersection as E,
4914
- optional as F,
4915
- datetime as G,
4912
+ intersection as D,
4913
+ optional as E,
4914
+ datetime as F,
4915
+ _null as G,
4916
4916
  url as H,
4917
4917
  any as I,
4918
4918
  toJSONSchema as J,
@@ -4926,8 +4926,8 @@ export {
4926
4926
  ZodNumber as Z,
4927
4927
  _coercedNumber as _,
4928
4928
  _enum as a,
4929
- boolean as b,
4930
- array as c,
4929
+ array as b,
4930
+ boolean as c,
4931
4931
  discriminatedUnion as d,
4932
4932
  union as e,
4933
4933
  custom as f,
@@ -4952,4 +4952,4 @@ export {
4952
4952
  ZodDiscriminatedUnion as y,
4953
4953
  _instanceof as z
4954
4954
  };
4955
- //# sourceMappingURL=schemas-WuyisFi9.js.map
4955
+ //# sourceMappingURL=schemas-D_XLKCXC.js.map
@@ -23,7 +23,7 @@ import { isIPv4, isIPv6 } from "net";
23
23
  import { createRequire as createRequire$1 } from "module";
24
24
  import { fileURLToPath } from "url";
25
25
  import { StringDecoder } from "string_decoder";
26
- import { c as array, u as unknown, N as NEVER, e as union, n as number, s as string, o as object, r as record, Q as int, l as literal, b as boolean, E as intersection, H as url } from "./chunks/schemas-WuyisFi9.js";
26
+ import { b as array, u as unknown, N as NEVER, e as union, n as number, s as string, o as object, r as record, Q as int, l as literal, c as boolean, D as intersection, H as url } from "./chunks/schemas-D_XLKCXC.js";
27
27
  import { L as LODY_EXTENSION_METHODS, s as sumModelUsage, e as supportsLodySubagentEvents, d as LODY_SUBAGENT_EVENT_METHOD } from "./chunks/subagent-events-BJ9JwZva.js";
28
28
  import { L as LodySubagentEmitter } from "./chunks/subagent-emitter-BsTuVPDw.js";
29
29
  import { execFile as execFile$1 } from "node:child_process";
@@ -1,5 +1,5 @@
1
- import { s as startCloudflaredNative, C as CloudflaredError } from "./chunks/cloudflared-native-DbUToPHH.js";
2
- import { P as tuple, s as string, o as object, l as literal } from "./chunks/schemas-WuyisFi9.js";
1
+ import { s as startCloudflaredNative, C as CloudflaredError } from "./chunks/cloudflared-native-BWtpTE_5.js";
2
+ import { P as tuple, s as string, o as object, l as literal } from "./chunks/schemas-D_XLKCXC.js";
3
3
  import "node:child_process";
4
4
  import "node:fs/promises";
5
5
  import "node:os";
package/dist/codex-acp.js CHANGED
@@ -2,5 +2,5 @@ if (!process.env.CODEX_PATH?.trim()) {
2
2
  console.error("CODEX_PATH is required for the bundled Codex ACP adapter.");
3
3
  process.exit(1);
4
4
  }
5
- await import("./chunks/index-C0n6fro1.js");
5
+ await import("./chunks/index-Sv4ANSUY.js");
6
6
  //# sourceMappingURL=codex-acp.js.map