lody 0.76.0 → 0.77.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.
- package/dist/chunks/{diff-line-counts-Du5QanrM.js → diff-line-counts-bmGB_T-n.js} +1 -2
- package/dist/chunks/diff-worker-task-8tVIjLTu.js +60 -0
- package/dist/chunks/{directory-handle-B50CtQcb.js → directory-handle-BBQKxZ5F.js} +2 -2
- package/dist/chunks/{index-VHXDv9iy.js → index-gHAU1HiK.js} +365 -146
- package/dist/chunks/loro_wasm_bg-BuoLmEH-.js +5398 -0
- package/dist/chunks/{package-C-zjBee4.js → package-qnDHmQq4.js} +2 -2
- package/dist/chunks/review-viewer-DchNTv12.js +154 -0
- package/dist/chunks/{schemas-DAtmu1t9.js → schemas-Du3qLZPS.js} +47 -24
- package/dist/claude-acp.js +582 -100
- package/dist/codex-acp.js +1 -1
- package/dist/diff-worker.js +6 -3
- package/dist/file-index-scan-worker.js +3 -3
- package/dist/index.js +88295 -86755
- package/dist/turn-diff-store-worker.js +1552 -0
- package/package.json +59 -61
- package/dist/chunks/loro_wasm_bg-DLsklGR5.js +0 -5197
- package/dist/chunks/review-viewer-DRumOFSW.js +0 -80
- package/dist/chunks/turn-diff-replay-BUdzlx5r.js +0 -311
- package/dist/turn-diff-replay-worker.js +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as array, u as unknown, N as NEVER,
|
|
1
|
+
import { c as array, u as unknown, N as NEVER, f as union, n as number, s as string, o as object, r as record, H as int, l as literal, b as boolean, z as intersection, I as url } from "./schemas-Du3qLZPS.js";
|
|
2
2
|
const AGENT_METHODS = {
|
|
3
3
|
initialize: "initialize",
|
|
4
4
|
authenticate: "authenticate",
|
|
@@ -4114,7 +4114,7 @@ class ClientSideConnection {
|
|
|
4114
4114
|
}
|
|
4115
4115
|
}
|
|
4116
4116
|
const name = "acp-extension-claude";
|
|
4117
|
-
const version = "0.
|
|
4117
|
+
const version = "0.66.0";
|
|
4118
4118
|
const dependencies = { "@anthropic-ai/claude-agent-sdk": "0.3.220" };
|
|
4119
4119
|
const packageJson = {
|
|
4120
4120
|
name,
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFile, mkdir, writeFile, rename } from "node:fs/promises";
|
|
3
|
+
import path__default from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
import { g as getLodyDataDir, __tla as __tla_0 } from "../index.js";
|
|
6
|
+
import "path";
|
|
7
|
+
import "node:fs";
|
|
8
|
+
import "node:readline";
|
|
9
|
+
import "node:async_hooks";
|
|
10
|
+
import "fs";
|
|
11
|
+
import "crypto";
|
|
12
|
+
import "node:os";
|
|
13
|
+
import "./schemas-Du3qLZPS.js";
|
|
14
|
+
import "node:events";
|
|
15
|
+
import "node:child_process";
|
|
16
|
+
import "node:tty";
|
|
17
|
+
import "os";
|
|
18
|
+
import "util";
|
|
19
|
+
import "stream";
|
|
20
|
+
import "buffer";
|
|
21
|
+
import "events";
|
|
22
|
+
import "zlib";
|
|
23
|
+
import "tty";
|
|
24
|
+
import "string_decoder";
|
|
25
|
+
import "http";
|
|
26
|
+
import "https";
|
|
27
|
+
import "node:util";
|
|
28
|
+
import "node:zlib";
|
|
29
|
+
import "child_process";
|
|
30
|
+
import "perf_hooks";
|
|
31
|
+
import "net";
|
|
32
|
+
import "tls";
|
|
33
|
+
import "url";
|
|
34
|
+
import { __tla as __tla_1 } from "./loro_wasm_bg-BuoLmEH-.js";
|
|
35
|
+
import "assert";
|
|
36
|
+
import "fs/promises";
|
|
37
|
+
import "better-sqlite3";
|
|
38
|
+
import "node:diagnostics_channel";
|
|
39
|
+
import "node:assert";
|
|
40
|
+
import "node:net";
|
|
41
|
+
import "node:http";
|
|
42
|
+
import "node:stream";
|
|
43
|
+
import "node:buffer";
|
|
44
|
+
import "node:querystring";
|
|
45
|
+
import "node:tls";
|
|
46
|
+
import "node:perf_hooks";
|
|
47
|
+
import "node:util/types";
|
|
48
|
+
import "node:worker_threads";
|
|
49
|
+
import "node:url";
|
|
50
|
+
import "node:console";
|
|
51
|
+
import "node:dns";
|
|
52
|
+
import "./directory-handle-BBQKxZ5F.js";
|
|
53
|
+
import "./diff-line-counts-bmGB_T-n.js";
|
|
54
|
+
import "./package-qnDHmQq4.js";
|
|
55
|
+
import "node:string_decoder";
|
|
56
|
+
import "node:stream/promises";
|
|
57
|
+
import "async_hooks";
|
|
58
|
+
import "module";
|
|
59
|
+
import "./diff-worker-task-8tVIjLTu.js";
|
|
60
|
+
import "./workspace-watch-protocol-CSO-IQeE.js";
|
|
61
|
+
import "node:module";
|
|
62
|
+
import "node:v8";
|
|
63
|
+
let resolveReviewViewerTemplate;
|
|
64
|
+
let __tla = Promise.all([
|
|
65
|
+
(() => {
|
|
66
|
+
try {
|
|
67
|
+
return __tla_0;
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
})(),
|
|
71
|
+
(() => {
|
|
72
|
+
try {
|
|
73
|
+
return __tla_1;
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
})()
|
|
77
|
+
]).then(async () => {
|
|
78
|
+
const reviewViewerVersion = "0.77.0";
|
|
79
|
+
const reviewViewerSha256 = "41b6ffd0acff2c355e190b604776a89138f9598a1772d09390a6d5af514e71bb";
|
|
80
|
+
const reviewViewerFileName = "standalone.html";
|
|
81
|
+
const DEFAULT_CDN_BASES = [
|
|
82
|
+
"https://cdn.jsdelivr.net/npm",
|
|
83
|
+
"https://unpkg.com"
|
|
84
|
+
];
|
|
85
|
+
function cacheDir() {
|
|
86
|
+
return path__default.join(getLodyDataDir(), "code-review-viewer");
|
|
87
|
+
}
|
|
88
|
+
function cachePath() {
|
|
89
|
+
return path__default.join(cacheDir(), `${reviewViewerVersion}.html`);
|
|
90
|
+
}
|
|
91
|
+
function sha256(buffer) {
|
|
92
|
+
return createHash("sha256").update(buffer).digest("hex");
|
|
93
|
+
}
|
|
94
|
+
function isUrl(source) {
|
|
95
|
+
return /^https?:\/\//i.test(source);
|
|
96
|
+
}
|
|
97
|
+
async function loadSource(source) {
|
|
98
|
+
if (isUrl(source)) {
|
|
99
|
+
const response = await fetch(source, {
|
|
100
|
+
signal: AbortSignal.timeout(3e4)
|
|
101
|
+
});
|
|
102
|
+
if (!response.ok) {
|
|
103
|
+
throw new Error(`HTTP ${response.status}`);
|
|
104
|
+
}
|
|
105
|
+
return Buffer.from(await response.arrayBuffer());
|
|
106
|
+
}
|
|
107
|
+
return readFile(path__default.resolve(source));
|
|
108
|
+
}
|
|
109
|
+
async function writeCache(buffer) {
|
|
110
|
+
try {
|
|
111
|
+
await mkdir(cacheDir(), {
|
|
112
|
+
recursive: true
|
|
113
|
+
});
|
|
114
|
+
const tmp = `${cachePath()}.tmp-${process.pid}`;
|
|
115
|
+
await writeFile(tmp, buffer);
|
|
116
|
+
await rename(tmp, cachePath());
|
|
117
|
+
} catch {
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
resolveReviewViewerTemplate = async function() {
|
|
121
|
+
try {
|
|
122
|
+
const cached = await readFile(cachePath());
|
|
123
|
+
if (sha256(cached) === reviewViewerSha256) {
|
|
124
|
+
return cached.toString("utf8");
|
|
125
|
+
}
|
|
126
|
+
} catch {
|
|
127
|
+
}
|
|
128
|
+
const override = process.env.LODY_REVIEW_VIEWER?.trim();
|
|
129
|
+
const sources = override ? [
|
|
130
|
+
override
|
|
131
|
+
] : DEFAULT_CDN_BASES.map((base) => `${base}/lody-code-review-viewer@${reviewViewerVersion}/${reviewViewerFileName}`);
|
|
132
|
+
const failures = [];
|
|
133
|
+
for (const source of sources) {
|
|
134
|
+
try {
|
|
135
|
+
const buffer = await loadSource(source);
|
|
136
|
+
const actual = sha256(buffer);
|
|
137
|
+
if (actual !== reviewViewerSha256) {
|
|
138
|
+
failures.push(`${source}: sha256 mismatch (expected ${reviewViewerSha256.slice(0, 12)}\u2026, got ${actual.slice(0, 12)}\u2026)`);
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
await writeCache(buffer);
|
|
142
|
+
return buffer.toString("utf8");
|
|
143
|
+
} catch (error) {
|
|
144
|
+
failures.push(`${source}: ${error instanceof Error ? error.message : String(error)}`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
throw new Error(`Could not obtain the code-review viewer (lody-code-review-viewer@${reviewViewerVersion}).
|
|
148
|
+
` + failures.map((line) => ` - ${line}`).join("\n") + "\nIf you are offline or behind a firewall, download standalone.html for this version and point LODY_REVIEW_VIEWER at it (a file path or URL).");
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
export {
|
|
152
|
+
__tla,
|
|
153
|
+
resolveReviewViewerTemplate
|
|
154
|
+
};
|
|
@@ -4828,20 +4828,43 @@ function refine(fn, _params = {}) {
|
|
|
4828
4828
|
function superRefine(fn) {
|
|
4829
4829
|
return /* @__PURE__ */ _superRefine(fn);
|
|
4830
4830
|
}
|
|
4831
|
+
function _instanceof(cls, params = {}) {
|
|
4832
|
+
const inst = new ZodCustom({
|
|
4833
|
+
type: "custom",
|
|
4834
|
+
check: "custom",
|
|
4835
|
+
fn: (data) => data instanceof cls,
|
|
4836
|
+
abort: true,
|
|
4837
|
+
...normalizeParams(params)
|
|
4838
|
+
});
|
|
4839
|
+
inst._zod.bag.Class = cls;
|
|
4840
|
+
inst._zod.check = (payload) => {
|
|
4841
|
+
if (!(payload.value instanceof cls)) {
|
|
4842
|
+
payload.issues.push({
|
|
4843
|
+
code: "invalid_type",
|
|
4844
|
+
expected: cls.name,
|
|
4845
|
+
input: payload.value,
|
|
4846
|
+
inst,
|
|
4847
|
+
path: [...inst._zod.def.path ?? []]
|
|
4848
|
+
});
|
|
4849
|
+
}
|
|
4850
|
+
};
|
|
4851
|
+
return inst;
|
|
4852
|
+
}
|
|
4831
4853
|
function preprocess(fn, schema) {
|
|
4832
4854
|
return pipe(transform(fn), schema);
|
|
4833
4855
|
}
|
|
4834
4856
|
export {
|
|
4835
4857
|
$constructor as $,
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4858
|
+
optional as A,
|
|
4859
|
+
datetime as B,
|
|
4860
|
+
custom as C,
|
|
4861
|
+
toJSONSchema as D,
|
|
4862
|
+
ZodOptional as E,
|
|
4863
|
+
never as F,
|
|
4864
|
+
xor as G,
|
|
4865
|
+
int as H,
|
|
4866
|
+
url as I,
|
|
4867
|
+
tuple as J,
|
|
4845
4868
|
NEVER as N,
|
|
4846
4869
|
ZodNumber as Z,
|
|
4847
4870
|
_coercedNumber as _,
|
|
@@ -4849,26 +4872,26 @@ export {
|
|
|
4849
4872
|
boolean as b,
|
|
4850
4873
|
array as c,
|
|
4851
4874
|
discriminatedUnion as d,
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4875
|
+
_instanceof as e,
|
|
4876
|
+
union as f,
|
|
4877
|
+
ZodError as g,
|
|
4878
|
+
_null as h,
|
|
4879
|
+
normalizeParams as i,
|
|
4880
|
+
$ZodObject as j,
|
|
4881
|
+
defineLazy as k,
|
|
4859
4882
|
literal as l,
|
|
4860
|
-
|
|
4883
|
+
$ZodType as m,
|
|
4861
4884
|
number as n,
|
|
4862
4885
|
object as o,
|
|
4863
4886
|
preprocess as p,
|
|
4864
|
-
|
|
4887
|
+
parse$1 as q,
|
|
4865
4888
|
record as r,
|
|
4866
4889
|
string as s,
|
|
4867
|
-
|
|
4890
|
+
safeParse$1 as t,
|
|
4868
4891
|
unknown as u,
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4892
|
+
parseAsync$1 as v,
|
|
4893
|
+
safeParseAsync$1 as w,
|
|
4894
|
+
clone as x,
|
|
4895
|
+
looseObject as y,
|
|
4896
|
+
intersection as z
|
|
4874
4897
|
};
|