clanka 0.0.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 +3 -0
- package/dist/Agent.d.ts +119 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +240 -0
- package/dist/Agent.js.map +1 -0
- package/dist/AgentTools.d.ts +246 -0
- package/dist/AgentTools.d.ts.map +1 -0
- package/dist/AgentTools.js +374 -0
- package/dist/AgentTools.js.map +1 -0
- package/dist/AgentTools.test.d.ts +2 -0
- package/dist/AgentTools.test.d.ts.map +1 -0
- package/dist/AgentTools.test.js +147 -0
- package/dist/AgentTools.test.js.map +1 -0
- package/dist/ApplyPatch.d.ts +27 -0
- package/dist/ApplyPatch.d.ts.map +1 -0
- package/dist/ApplyPatch.js +343 -0
- package/dist/ApplyPatch.js.map +1 -0
- package/dist/ApplyPatch.test.d.ts +2 -0
- package/dist/ApplyPatch.test.d.ts.map +1 -0
- package/dist/ApplyPatch.test.js +99 -0
- package/dist/ApplyPatch.test.js.map +1 -0
- package/dist/Codex.d.ts +11 -0
- package/dist/Codex.d.ts.map +1 -0
- package/dist/Codex.js +14 -0
- package/dist/Codex.js.map +1 -0
- package/dist/CodexAuth.d.ts +68 -0
- package/dist/CodexAuth.d.ts.map +1 -0
- package/dist/CodexAuth.js +270 -0
- package/dist/CodexAuth.js.map +1 -0
- package/dist/CodexAuth.test.d.ts +2 -0
- package/dist/CodexAuth.test.d.ts.map +1 -0
- package/dist/CodexAuth.test.js +425 -0
- package/dist/CodexAuth.test.js.map +1 -0
- package/dist/Executor.d.ts +20 -0
- package/dist/Executor.d.ts.map +1 -0
- package/dist/Executor.js +76 -0
- package/dist/Executor.js.map +1 -0
- package/dist/OutputFormatter.d.ts +11 -0
- package/dist/OutputFormatter.d.ts.map +1 -0
- package/dist/OutputFormatter.js +5 -0
- package/dist/OutputFormatter.js.map +1 -0
- package/dist/ToolkitRenderer.d.ts +17 -0
- package/dist/ToolkitRenderer.d.ts.map +1 -0
- package/dist/ToolkitRenderer.js +25 -0
- package/dist/ToolkitRenderer.js.map +1 -0
- package/dist/TypeBuilder.d.ts +11 -0
- package/dist/TypeBuilder.d.ts.map +1 -0
- package/dist/TypeBuilder.js +383 -0
- package/dist/TypeBuilder.js.map +1 -0
- package/dist/TypeBuilder.test.d.ts +2 -0
- package/dist/TypeBuilder.test.d.ts.map +1 -0
- package/dist/TypeBuilder.test.js +243 -0
- package/dist/TypeBuilder.test.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/package.json +72 -0
- package/src/Agent.ts +398 -0
- package/src/AgentTools.test.ts +215 -0
- package/src/AgentTools.ts +507 -0
- package/src/ApplyPatch.test.ts +154 -0
- package/src/ApplyPatch.ts +473 -0
- package/src/Codex.ts +14 -0
- package/src/CodexAuth.test.ts +729 -0
- package/src/CodexAuth.ts +571 -0
- package/src/Executor.ts +129 -0
- package/src/OutputFormatter.ts +17 -0
- package/src/ToolkitRenderer.ts +39 -0
- package/src/TypeBuilder.test.ts +508 -0
- package/src/TypeBuilder.ts +670 -0
- package/src/index.ts +29 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
const BEGIN = "*** Begin Patch";
|
|
5
|
+
const END = "*** End Patch";
|
|
6
|
+
const ADD = "*** Add File:";
|
|
7
|
+
const DELETE = "*** Delete File:";
|
|
8
|
+
const MOVE = "*** Move to:";
|
|
9
|
+
const UPDATE = "*** Update File:";
|
|
10
|
+
const stripHeredoc = (input) => {
|
|
11
|
+
const match = input.match(/^(?:cat\s+)?<<['"]?(\w+)['"]?\s*\n([\s\S]*?)\n\1\s*$/);
|
|
12
|
+
return match?.[2] ?? input;
|
|
13
|
+
};
|
|
14
|
+
const normalize = (input) => stripHeredoc(input.replace(/\r\n/g, "\n").replace(/\r/g, "\n").trim());
|
|
15
|
+
const fail = (message) => {
|
|
16
|
+
throw new Error(`applyPatch verification failed: ${message}`);
|
|
17
|
+
};
|
|
18
|
+
const locate = (text) => {
|
|
19
|
+
const lines = text.split("\n");
|
|
20
|
+
const begin = lines.findIndex((line) => line === BEGIN);
|
|
21
|
+
const end = lines.findIndex((line) => line === END);
|
|
22
|
+
if (begin === -1 || end === -1 || begin >= end) {
|
|
23
|
+
fail("Invalid patch format: missing Begin/End markers");
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
lines,
|
|
27
|
+
begin,
|
|
28
|
+
end,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const parseChunks = (lines, start, end = lines.length) => {
|
|
32
|
+
const chunks = Array();
|
|
33
|
+
let i = start;
|
|
34
|
+
while (i < end) {
|
|
35
|
+
const line = lines[i];
|
|
36
|
+
if (line.startsWith("***")) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
if (!line.startsWith("@@")) {
|
|
40
|
+
i++;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const ctx = line.slice(2).trim();
|
|
44
|
+
const old = Array();
|
|
45
|
+
const next = Array();
|
|
46
|
+
let eof = false;
|
|
47
|
+
i++;
|
|
48
|
+
while (i < end) {
|
|
49
|
+
const line = lines[i];
|
|
50
|
+
if (line === "*** End of File") {
|
|
51
|
+
eof = true;
|
|
52
|
+
i++;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
if (line.startsWith("@@") || line.startsWith("***")) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
if (line.startsWith(" ")) {
|
|
59
|
+
const text = line.slice(1);
|
|
60
|
+
old.push(text);
|
|
61
|
+
next.push(text);
|
|
62
|
+
}
|
|
63
|
+
else if (line.startsWith("-")) {
|
|
64
|
+
old.push(line.slice(1));
|
|
65
|
+
}
|
|
66
|
+
else if (line.startsWith("+")) {
|
|
67
|
+
next.push(line.slice(1));
|
|
68
|
+
}
|
|
69
|
+
i++;
|
|
70
|
+
}
|
|
71
|
+
chunks.push({
|
|
72
|
+
old,
|
|
73
|
+
next,
|
|
74
|
+
...(ctx.length > 0 ? { ctx } : {}),
|
|
75
|
+
...(eof ? { eof: true } : {}),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
chunks,
|
|
80
|
+
next: i,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const parseWrapped = (text) => {
|
|
84
|
+
const { lines, begin, end } = locate(text);
|
|
85
|
+
let i = begin + 1;
|
|
86
|
+
while (i < end && lines[i].trim() === "") {
|
|
87
|
+
i++;
|
|
88
|
+
}
|
|
89
|
+
if (i === end) {
|
|
90
|
+
throw new Error("patch rejected: empty patch");
|
|
91
|
+
}
|
|
92
|
+
if (!lines[i].startsWith(UPDATE)) {
|
|
93
|
+
fail("only single-file update patches are supported");
|
|
94
|
+
}
|
|
95
|
+
const path = lines[i].slice(UPDATE.length).trim();
|
|
96
|
+
if (path.length === 0) {
|
|
97
|
+
fail("missing update file path");
|
|
98
|
+
}
|
|
99
|
+
i++;
|
|
100
|
+
if (i < end && lines[i].startsWith(MOVE)) {
|
|
101
|
+
fail("move patches are not supported");
|
|
102
|
+
}
|
|
103
|
+
const parsed = parseChunks(lines, i, end);
|
|
104
|
+
if (parsed.chunks.length === 0) {
|
|
105
|
+
fail("no hunks found");
|
|
106
|
+
}
|
|
107
|
+
i = parsed.next;
|
|
108
|
+
while (i < end && lines[i].trim() === "") {
|
|
109
|
+
i++;
|
|
110
|
+
}
|
|
111
|
+
if (i !== end) {
|
|
112
|
+
fail("only one update file section is supported");
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
path,
|
|
116
|
+
chunks: parsed.chunks,
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
const parseAdd = (lines, start, end) => {
|
|
120
|
+
const out = Array();
|
|
121
|
+
let i = start;
|
|
122
|
+
while (i < end) {
|
|
123
|
+
const line = lines[i];
|
|
124
|
+
if (line.startsWith("***")) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
if (line.startsWith("+")) {
|
|
128
|
+
out.push(line.slice(1));
|
|
129
|
+
}
|
|
130
|
+
i++;
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
content: out.join("\n"),
|
|
134
|
+
next: i,
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
export const parsePatch = (input) => {
|
|
138
|
+
const text = normalize(input);
|
|
139
|
+
if (text.length === 0) {
|
|
140
|
+
throw new Error("patchText is required");
|
|
141
|
+
}
|
|
142
|
+
if (text === `${BEGIN}\n${END}`) {
|
|
143
|
+
throw new Error("patch rejected: empty patch");
|
|
144
|
+
}
|
|
145
|
+
const { lines, begin, end } = locate(text);
|
|
146
|
+
const out = Array();
|
|
147
|
+
let i = begin + 1;
|
|
148
|
+
while (i < end) {
|
|
149
|
+
while (i < end && lines[i].trim() === "") {
|
|
150
|
+
i++;
|
|
151
|
+
}
|
|
152
|
+
if (i === end) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
const line = lines[i];
|
|
156
|
+
if (line.startsWith(ADD)) {
|
|
157
|
+
const path = line.slice(ADD.length).trim();
|
|
158
|
+
if (path.length === 0) {
|
|
159
|
+
fail("missing add file path");
|
|
160
|
+
}
|
|
161
|
+
const parsed = parseAdd(lines, i + 1, end);
|
|
162
|
+
out.push({
|
|
163
|
+
type: "add",
|
|
164
|
+
path,
|
|
165
|
+
content: parsed.content,
|
|
166
|
+
});
|
|
167
|
+
i = parsed.next;
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (line.startsWith(DELETE)) {
|
|
171
|
+
const path = line.slice(DELETE.length).trim();
|
|
172
|
+
if (path.length === 0) {
|
|
173
|
+
fail("missing delete file path");
|
|
174
|
+
}
|
|
175
|
+
out.push({
|
|
176
|
+
type: "delete",
|
|
177
|
+
path,
|
|
178
|
+
});
|
|
179
|
+
i++;
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if (line.startsWith(UPDATE)) {
|
|
183
|
+
const path = line.slice(UPDATE.length).trim();
|
|
184
|
+
if (path.length === 0) {
|
|
185
|
+
fail("missing update file path");
|
|
186
|
+
}
|
|
187
|
+
i++;
|
|
188
|
+
let movePath;
|
|
189
|
+
if (i < end && lines[i].startsWith(MOVE)) {
|
|
190
|
+
movePath = lines[i].slice(MOVE.length).trim();
|
|
191
|
+
if (movePath.length === 0) {
|
|
192
|
+
fail("missing move file path");
|
|
193
|
+
}
|
|
194
|
+
i++;
|
|
195
|
+
}
|
|
196
|
+
const parsed = parseChunks(lines, i, end);
|
|
197
|
+
if (parsed.chunks.length === 0) {
|
|
198
|
+
fail("no hunks found");
|
|
199
|
+
}
|
|
200
|
+
out.push({
|
|
201
|
+
type: "update",
|
|
202
|
+
path,
|
|
203
|
+
chunks: parsed.chunks,
|
|
204
|
+
...(movePath === undefined ? {} : { movePath }),
|
|
205
|
+
});
|
|
206
|
+
i = parsed.next;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
fail(`unexpected line in wrapped patch: ${line}`);
|
|
210
|
+
}
|
|
211
|
+
if (out.length === 0) {
|
|
212
|
+
fail("no hunks found");
|
|
213
|
+
}
|
|
214
|
+
return out;
|
|
215
|
+
};
|
|
216
|
+
export const wrappedPath = (input) => {
|
|
217
|
+
const text = normalize(input);
|
|
218
|
+
if (!text.startsWith(BEGIN)) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
return parseWrapped(text).path;
|
|
222
|
+
};
|
|
223
|
+
const parse = (input) => {
|
|
224
|
+
const text = normalize(input);
|
|
225
|
+
if (text.length === 0) {
|
|
226
|
+
throw new Error("patchText is required");
|
|
227
|
+
}
|
|
228
|
+
if (text === `${BEGIN}\n${END}`) {
|
|
229
|
+
throw new Error("patch rejected: empty patch");
|
|
230
|
+
}
|
|
231
|
+
if (text.startsWith(BEGIN)) {
|
|
232
|
+
return parseWrapped(text).chunks;
|
|
233
|
+
}
|
|
234
|
+
const parsed = parseChunks(text.split("\n"), 0);
|
|
235
|
+
if (parsed.chunks.length === 0) {
|
|
236
|
+
fail("no hunks found");
|
|
237
|
+
}
|
|
238
|
+
return parsed.chunks;
|
|
239
|
+
};
|
|
240
|
+
const normalizeUnicode = (line) => line
|
|
241
|
+
.replace(/[\u2018\u2019\u201A\u201B]/g, "'")
|
|
242
|
+
.replace(/[\u201C\u201D\u201E\u201F]/g, '"')
|
|
243
|
+
.replace(/[\u2010\u2011\u2012\u2013\u2014\u2015]/g, "-")
|
|
244
|
+
.replace(/\u2026/g, "...")
|
|
245
|
+
.replace(/\u00A0/g, " ");
|
|
246
|
+
const match = (lines, part, from, same, eof) => {
|
|
247
|
+
if (eof) {
|
|
248
|
+
const last = lines.length - part.length;
|
|
249
|
+
if (last >= from) {
|
|
250
|
+
let ok = true;
|
|
251
|
+
for (let i = 0; i < part.length; i++) {
|
|
252
|
+
if (!same(lines[last + i], part[i])) {
|
|
253
|
+
ok = false;
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (ok) {
|
|
258
|
+
return last;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
for (let i = from; i <= lines.length - part.length; i++) {
|
|
263
|
+
let ok = true;
|
|
264
|
+
for (let j = 0; j < part.length; j++) {
|
|
265
|
+
if (!same(lines[i + j], part[j])) {
|
|
266
|
+
ok = false;
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (ok) {
|
|
271
|
+
return i;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return -1;
|
|
275
|
+
};
|
|
276
|
+
const seek = (lines, part, from, eof = false) => {
|
|
277
|
+
if (part.length === 0) {
|
|
278
|
+
return -1;
|
|
279
|
+
}
|
|
280
|
+
const exact = match(lines, part, from, (left, right) => left === right, eof);
|
|
281
|
+
if (exact !== -1) {
|
|
282
|
+
return exact;
|
|
283
|
+
}
|
|
284
|
+
const rstrip = match(lines, part, from, (left, right) => left.trimEnd() === right.trimEnd(), eof);
|
|
285
|
+
if (rstrip !== -1) {
|
|
286
|
+
return rstrip;
|
|
287
|
+
}
|
|
288
|
+
const trim = match(lines, part, from, (left, right) => left.trim() === right.trim(), eof);
|
|
289
|
+
if (trim !== -1) {
|
|
290
|
+
return trim;
|
|
291
|
+
}
|
|
292
|
+
return match(lines, part, from, (left, right) => normalizeUnicode(left.trim()) === normalizeUnicode(right.trim()), eof);
|
|
293
|
+
};
|
|
294
|
+
const compute = (file, lines, chunks) => {
|
|
295
|
+
const out = Array();
|
|
296
|
+
let from = 0;
|
|
297
|
+
for (const chunk of chunks) {
|
|
298
|
+
if (chunk.ctx) {
|
|
299
|
+
const at = seek(lines, [chunk.ctx], from);
|
|
300
|
+
if (at === -1) {
|
|
301
|
+
fail(`Failed to find context '${chunk.ctx}' in ${file}`);
|
|
302
|
+
}
|
|
303
|
+
from = at + 1;
|
|
304
|
+
}
|
|
305
|
+
if (chunk.old.length === 0) {
|
|
306
|
+
out.push([lines.length, 0, chunk.next]);
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
let old = chunk.old;
|
|
310
|
+
let next = chunk.next;
|
|
311
|
+
let at = seek(lines, old, from, chunk.eof === true);
|
|
312
|
+
if (at === -1 && old.at(-1) === "") {
|
|
313
|
+
old = old.slice(0, -1);
|
|
314
|
+
next = next.at(-1) === "" ? next.slice(0, -1) : next;
|
|
315
|
+
at = seek(lines, old, from, chunk.eof === true);
|
|
316
|
+
}
|
|
317
|
+
if (at === -1) {
|
|
318
|
+
fail(`Failed to find expected lines in ${file}:\n${chunk.old.join("\n")}`);
|
|
319
|
+
}
|
|
320
|
+
out.push([at, old.length, next]);
|
|
321
|
+
from = at + old.length;
|
|
322
|
+
}
|
|
323
|
+
out.sort((left, right) => left[0] - right[0]);
|
|
324
|
+
return out;
|
|
325
|
+
};
|
|
326
|
+
export const patchChunks = (file, input, chunks) => {
|
|
327
|
+
const eol = input.includes("\r\n") ? "\r\n" : "\n";
|
|
328
|
+
const lines = input.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
329
|
+
if (lines.at(-1) === "") {
|
|
330
|
+
lines.pop();
|
|
331
|
+
}
|
|
332
|
+
const out = [...lines];
|
|
333
|
+
for (const [at, size, next] of compute(file, lines, chunks).reverse()) {
|
|
334
|
+
out.splice(at, size, ...next);
|
|
335
|
+
}
|
|
336
|
+
if (out.at(-1) !== "") {
|
|
337
|
+
out.push("");
|
|
338
|
+
}
|
|
339
|
+
const text = out.join("\n");
|
|
340
|
+
return eol === "\r\n" ? text.replace(/\n/g, "\r\n") : text;
|
|
341
|
+
};
|
|
342
|
+
export const patchContent = (file, input, patchText) => patchChunks(file, input, parse(patchText));
|
|
343
|
+
//# sourceMappingURL=ApplyPatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyPatch.js","sourceRoot":"","sources":["../src/ApplyPatch.ts"],"names":[],"mappings":"AAAA;;GAEG;AA+BH,MAAM,KAAK,GAAG,iBAAiB,CAAA;AAC/B,MAAM,GAAG,GAAG,eAAe,CAAA;AAC3B,MAAM,GAAG,GAAG,eAAe,CAAA;AAC3B,MAAM,MAAM,GAAG,kBAAkB,CAAA;AACjC,MAAM,IAAI,GAAG,cAAc,CAAA;AAC3B,MAAM,MAAM,GAAG,kBAAkB,CAAA;AAEjC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAU,EAAE;IAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CACvB,sDAAsD,CACvD,CAAA;IACD,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,KAAa,EAAU,EAAE,CAC1C,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK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,MAAM,YAAY,GAAG,CAC1B,IAAY,EACZ,KAAa,EACb,SAAiB,EACT,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyPatch.test.d.ts","sourceRoot":"","sources":["../src/ApplyPatch.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { parsePatch, patchContent } from "./ApplyPatch.js";
|
|
3
|
+
describe("patchContent", () => {
|
|
4
|
+
it("applies raw hunks", () => {
|
|
5
|
+
expect(patchContent("sample.txt", "line1\nline2\n", "@@\n-line2\n+changed")).toBe("line1\nchanged\n");
|
|
6
|
+
});
|
|
7
|
+
it("does not treat raw marker text as a wrapped patch", () => {
|
|
8
|
+
expect(patchContent("sample.txt", "*** Begin Patch\nfinish\n", "@@\n-*** Begin Patch\n+*** End Patch")).toBe("*** End Patch\nfinish\n");
|
|
9
|
+
});
|
|
10
|
+
it("parses wrapped single-file patches", () => {
|
|
11
|
+
expect(patchContent("sample.txt", "alpha\nomega\n", "*** Begin Patch\n*** Update File: ignored.txt\n@@\n alpha\n+beta\n omega\n*** End Patch")).toBe("alpha\nbeta\nomega\n");
|
|
12
|
+
});
|
|
13
|
+
it("parses multi-file wrapped patches", () => {
|
|
14
|
+
expect(parsePatch([
|
|
15
|
+
"*** Begin Patch",
|
|
16
|
+
"*** Add File: hello.txt",
|
|
17
|
+
"+Hello world",
|
|
18
|
+
"*** Update File: src/app.ts",
|
|
19
|
+
"*** Move to: src/main.ts",
|
|
20
|
+
"@@ keep",
|
|
21
|
+
" keep",
|
|
22
|
+
"-old",
|
|
23
|
+
"+new",
|
|
24
|
+
"*** Delete File: obsolete.txt",
|
|
25
|
+
"*** End Patch",
|
|
26
|
+
].join("\n"))).toEqual([
|
|
27
|
+
{
|
|
28
|
+
type: "add",
|
|
29
|
+
path: "hello.txt",
|
|
30
|
+
content: "Hello world",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: "update",
|
|
34
|
+
path: "src/app.ts",
|
|
35
|
+
movePath: "src/main.ts",
|
|
36
|
+
chunks: [
|
|
37
|
+
{
|
|
38
|
+
ctx: "keep",
|
|
39
|
+
old: ["keep", "old"],
|
|
40
|
+
next: ["keep", "new"],
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "delete",
|
|
46
|
+
path: "obsolete.txt",
|
|
47
|
+
},
|
|
48
|
+
]);
|
|
49
|
+
});
|
|
50
|
+
it("parses wrapped patches when hunks contain marker text", () => {
|
|
51
|
+
expect(parsePatch([
|
|
52
|
+
"*** Begin Patch",
|
|
53
|
+
"*** Update File: src/app.ts",
|
|
54
|
+
"@@",
|
|
55
|
+
" *** End Patch",
|
|
56
|
+
"-old",
|
|
57
|
+
"+new",
|
|
58
|
+
"*** Delete File: obsolete.txt",
|
|
59
|
+
"*** End Patch",
|
|
60
|
+
].join("\n"))).toEqual([
|
|
61
|
+
{
|
|
62
|
+
type: "update",
|
|
63
|
+
path: "src/app.ts",
|
|
64
|
+
chunks: [
|
|
65
|
+
{
|
|
66
|
+
old: ["*** End Patch", "old"],
|
|
67
|
+
next: ["*** End Patch", "new"],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "delete",
|
|
73
|
+
path: "obsolete.txt",
|
|
74
|
+
},
|
|
75
|
+
]);
|
|
76
|
+
});
|
|
77
|
+
it("parses heredoc-wrapped hunks", () => {
|
|
78
|
+
expect(patchContent("sample.txt", "old\n", "<<'EOF'\n@@\n-old\n+new\nEOF")).toBe("new\n");
|
|
79
|
+
});
|
|
80
|
+
it("matches lines after trimming trailing whitespace", () => {
|
|
81
|
+
expect(patchContent("sample.txt", "old \n", "@@\n-old\n+new")).toBe("new\n");
|
|
82
|
+
});
|
|
83
|
+
it("matches lines after trimming surrounding whitespace", () => {
|
|
84
|
+
expect(patchContent("sample.txt", " old\n", "@@\n-old\n+new")).toBe("new\n");
|
|
85
|
+
});
|
|
86
|
+
it("matches lines after normalizing Unicode punctuation", () => {
|
|
87
|
+
expect(patchContent("sample.txt", "Don’t wait…\n", "@@\n-Don't wait...\n+Done")).toBe("Done\n");
|
|
88
|
+
});
|
|
89
|
+
it("matches EOF hunks from the end of the file", () => {
|
|
90
|
+
expect(patchContent("tail.txt", "start\nmarker\nend\nmiddle\nmarker\nend\n", "@@\n-marker\n-end\n+marker-changed\n+end\n*** End of File")).toBe("start\nmarker\nend\nmiddle\nmarker-changed\nend\n");
|
|
91
|
+
});
|
|
92
|
+
it("preserves CRLF files", () => {
|
|
93
|
+
expect(patchContent("crlf.txt", "old\r\n", "@@\n-old\n+new")).toBe("new\r\n");
|
|
94
|
+
});
|
|
95
|
+
it("rejects multi-file wrapped patches", () => {
|
|
96
|
+
expect(() => patchContent("sample.txt", "line1\nline2\n", "*** Begin Patch\n*** Update File: a.txt\n@@\n-line2\n+changed\n*** Update File: b.txt\n@@\n-old\n+new\n*** End Patch")).toThrow("only one update file section is supported");
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=ApplyPatch.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyPatch.test.js","sourceRoot":"","sources":["../src/ApplyPatch.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE1D,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CACJ,YAAY,CAAC,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,CAAC,CACr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,YAAY,CACV,UAAU,EACV,2CAA2C,EAC3C,2DAA2D,CAC5D,CACF,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAA;IAC7D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAChE,SAAS,CACV,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,GAAG,EAAE,CACV,YAAY,CACV,YAAY,EACZ,gBAAgB,EAChB,sHAAsH,CACvH,CACF,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAA;IACxD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/Codex.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { OpenAiClient } from "@effect/ai-openai";
|
|
5
|
+
import { Layer } from "effect";
|
|
6
|
+
/**
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category Layers
|
|
9
|
+
*/
|
|
10
|
+
export declare const CodexAiClient: Layer.Layer<OpenAiClient.OpenAiClient, never, import("effect/unstable/persistence/KeyValueStore").KeyValueStore | import("effect/unstable/http/HttpClient").HttpClient>;
|
|
11
|
+
//# sourceMappingURL=Codex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Codex.d.ts","sourceRoot":"","sources":["../src/Codex.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9B;;;GAGG;AACH,eAAO,MAAM,aAAa,yKAEmB,CAAA"}
|
package/dist/Codex.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { OpenAiClient } from "@effect/ai-openai";
|
|
5
|
+
import { Layer } from "effect";
|
|
6
|
+
import { CodexAuth } from "./CodexAuth.js";
|
|
7
|
+
/**
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category Layers
|
|
10
|
+
*/
|
|
11
|
+
export const CodexAiClient = OpenAiClient.layer({
|
|
12
|
+
apiUrl: "https://chatgpt.com/backend-api/codex",
|
|
13
|
+
}).pipe(Layer.provide(CodexAuth.layerClient));
|
|
14
|
+
//# sourceMappingURL=Codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Codex.js","sourceRoot":"","sources":["../src/Codex.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC;IAC9C,MAAM,EAAE,uCAAuC;CAChD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { Effect, Layer, Option, Schema, ServiceMap } from "effect";
|
|
5
|
+
import { HttpClient } from "effect/unstable/http";
|
|
6
|
+
import { KeyValueStore } from "effect/unstable/persistence";
|
|
7
|
+
export declare const CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
|
|
8
|
+
export declare const ISSUER = "https://auth.openai.com";
|
|
9
|
+
export declare const POLLING_SAFETY_MARGIN_MS = 3000;
|
|
10
|
+
export declare const TOKEN_EXPIRY_BUFFER_MS = 30000;
|
|
11
|
+
export declare const STORE_PREFIX = "codex.auth/";
|
|
12
|
+
export declare const STORE_TOKEN_KEY = "token";
|
|
13
|
+
declare const TokenData_base: Schema.ExtendableClass<TokenData, Schema.Struct<{
|
|
14
|
+
readonly access: Schema.String;
|
|
15
|
+
readonly refresh: Schema.String;
|
|
16
|
+
readonly expires: Schema.Number;
|
|
17
|
+
readonly accountId: Schema.OptionFromOptional<Schema.String>;
|
|
18
|
+
}>, {}>;
|
|
19
|
+
export declare class TokenData extends TokenData_base {
|
|
20
|
+
isExpired(): boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const CodexAuthError_base: Schema.ErrorClass<CodexAuthError, Schema.TaggedStruct<"CodexAuthError", {
|
|
23
|
+
readonly reason: Schema.Literals<readonly ["DeviceFlowFailed", "TokenExchangeFailed", "RefreshFailed"]>;
|
|
24
|
+
readonly message: Schema.String;
|
|
25
|
+
readonly cause: Schema.optional<Schema.Defect>;
|
|
26
|
+
}>, import("effect/Cause").YieldableError>;
|
|
27
|
+
export declare class CodexAuthError extends CodexAuthError_base {
|
|
28
|
+
}
|
|
29
|
+
export interface DeviceCodeData {
|
|
30
|
+
readonly deviceAuthId: string;
|
|
31
|
+
readonly userCode: string;
|
|
32
|
+
readonly intervalMs: number;
|
|
33
|
+
}
|
|
34
|
+
export interface AuthorizationCodeData {
|
|
35
|
+
readonly authorizationCode: string;
|
|
36
|
+
readonly codeVerifier: string;
|
|
37
|
+
}
|
|
38
|
+
export interface JwtClaims {
|
|
39
|
+
readonly chatgpt_account_id?: string;
|
|
40
|
+
readonly "https://api.openai.com/auth"?: {
|
|
41
|
+
readonly chatgpt_account_id?: string;
|
|
42
|
+
};
|
|
43
|
+
readonly organizations?: ReadonlyArray<{
|
|
44
|
+
readonly id: string;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
export declare const parseJwtClaims: (token: string) => Option.Option<JwtClaims>;
|
|
48
|
+
export declare const extractAccountIdFromClaims: (claims: JwtClaims) => Option.Option<string>;
|
|
49
|
+
export declare const extractAccountIdFromToken: (token: string) => Option.Option<string>;
|
|
50
|
+
export declare const toCodexAuthKeyValueStore: (store: KeyValueStore.KeyValueStore) => KeyValueStore.KeyValueStore;
|
|
51
|
+
export declare const toTokenStore: (store: KeyValueStore.KeyValueStore) => KeyValueStore.SchemaStore<typeof TokenData>;
|
|
52
|
+
declare const CodexAuth_base: ServiceMap.ServiceClass<CodexAuth, "clanka/CodexAuth", {
|
|
53
|
+
readonly get: Effect.Effect<TokenData, CodexAuthError>;
|
|
54
|
+
readonly authenticate: Effect.Effect<TokenData, CodexAuthError>;
|
|
55
|
+
readonly logout: Effect.Effect<void>;
|
|
56
|
+
}>;
|
|
57
|
+
export declare class CodexAuth extends CodexAuth_base {
|
|
58
|
+
static readonly make: Effect.Effect<{
|
|
59
|
+
readonly get: Effect.Effect<TokenData, CodexAuthError>;
|
|
60
|
+
readonly authenticate: Effect.Effect<TokenData, CodexAuthError>;
|
|
61
|
+
readonly logout: Effect.Effect<void>;
|
|
62
|
+
}, never, KeyValueStore.KeyValueStore | HttpClient.HttpClient>;
|
|
63
|
+
static readonly layer: Layer.Layer<CodexAuth, never, KeyValueStore.KeyValueStore | HttpClient.HttpClient>;
|
|
64
|
+
static readonly layerClientNoDeps: Layer.Layer<HttpClient.HttpClient, never, CodexAuth | HttpClient.HttpClient>;
|
|
65
|
+
static readonly layerClient: Layer.Layer<HttpClient.HttpClient, never, KeyValueStore.KeyValueStore | HttpClient.HttpClient>;
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=CodexAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodexAuth.d.ts","sourceRoot":"","sources":["../src/CodexAuth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,MAAM,EAGN,KAAK,EACL,MAAM,EAGN,MAAM,EAEN,UAAU,EACX,MAA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