@vibes.diy/call-ai-v2 2.2.1-dev.1 → 2.2.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 +9 -46
- package/block-stream.d.ts +0 -14
- package/block-stream.js +0 -16
- package/block-stream.js.map +1 -1
- package/index.d.ts +0 -3
- package/index.js +0 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/apply-edits.d.ts +0 -39
- package/apply-edits.js +0 -76
- package/apply-edits.js.map +0 -1
- package/apply-edits.test.d.ts +0 -1
- package/apply-edits.test.js +0 -85
- package/apply-edits.test.js.map +0 -1
- package/block-stream-path.test.d.ts +0 -1
- package/block-stream-path.test.js +0 -91
- package/block-stream-path.test.js.map +0 -1
- package/fence-body-parser.d.ts +0 -11
- package/fence-body-parser.js +0 -76
- package/fence-body-parser.js.map +0 -1
- package/fence-body-parser.test.d.ts +0 -1
- package/fence-body-parser.test.js +0 -130
- package/fence-body-parser.test.js.map +0 -1
- package/filesystem-stream.d.ts +0 -107
- package/filesystem-stream.js +0 -151
- package/filesystem-stream.js.map +0 -1
- package/filesystem-stream.test.d.ts +0 -1
- package/filesystem-stream.test.js +0 -170
- package/filesystem-stream.test.js.map +0 -1
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { stream2array } from "@adviser/cement";
|
|
3
|
-
import { createBlockStream, isCodeBegin, isCodeLine, isCodeEnd } from "./block-stream.js";
|
|
4
|
-
const innerStreamId = "inner";
|
|
5
|
-
const streamId = "test";
|
|
6
|
-
function makeLineEvents(lines) {
|
|
7
|
-
const events = [{ type: "line.begin", streamId: innerStreamId, timestamp: new Date() }];
|
|
8
|
-
lines.forEach((content, i) => {
|
|
9
|
-
events.push({
|
|
10
|
-
type: "line.line",
|
|
11
|
-
streamId: innerStreamId,
|
|
12
|
-
content,
|
|
13
|
-
lineNr: i + 1,
|
|
14
|
-
timestamp: new Date(),
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
events.push({ type: "line.end", streamId: innerStreamId, totalLines: lines.length, timestamp: new Date() });
|
|
18
|
-
return events;
|
|
19
|
-
}
|
|
20
|
-
async function runBlockStream(lines) {
|
|
21
|
-
const events = makeLineEvents(lines);
|
|
22
|
-
const input = new ReadableStream({
|
|
23
|
-
start(controller) {
|
|
24
|
-
events.forEach((e) => controller.enqueue(e));
|
|
25
|
-
controller.close();
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
let idCounter = 0;
|
|
29
|
-
const createId = () => `id-${++idCounter}`;
|
|
30
|
-
return stream2array(input.pipeThrough(createBlockStream(streamId, innerStreamId, createId)));
|
|
31
|
-
}
|
|
32
|
-
describe("block-stream path-line tracking", () => {
|
|
33
|
-
it("attaches path 'App.jsx' (default) when no path line precedes the fence", async () => {
|
|
34
|
-
const chunks = await runBlockStream(["Some intro prose.", "```jsx", "const x = 1;", "```"]);
|
|
35
|
-
const begin = chunks.find((c) => isCodeBegin(c));
|
|
36
|
-
const end = chunks.find((c) => isCodeEnd(c));
|
|
37
|
-
expect(begin?.path).toBe("App.jsx");
|
|
38
|
-
expect(end?.path).toBe("App.jsx");
|
|
39
|
-
});
|
|
40
|
-
it("attaches the preceding path-line as the path", async () => {
|
|
41
|
-
const chunks = await runBlockStream(["Building a layout.", "App.jsx", "```jsx", "const x = 1;", "```"]);
|
|
42
|
-
const begin = chunks.find((c) => isCodeBegin(c));
|
|
43
|
-
const end = chunks.find((c) => isCodeEnd(c));
|
|
44
|
-
expect(begin?.path).toBe("App.jsx");
|
|
45
|
-
expect(end?.path).toBe("App.jsx");
|
|
46
|
-
});
|
|
47
|
-
it("recognizes nested-path filenames with allowed extensions", async () => {
|
|
48
|
-
const chunks = await runBlockStream(["src/components/Foo.tsx", "```tsx", "export const Foo = () => null;", "```"]);
|
|
49
|
-
const begin = chunks.find((c) => isCodeBegin(c));
|
|
50
|
-
expect(begin?.path).toBe("src/components/Foo.tsx");
|
|
51
|
-
});
|
|
52
|
-
it("ignores a non-path-looking preceding line", async () => {
|
|
53
|
-
const chunks = await runBlockStream(["Here is the code:", "```jsx", "const x = 1;", "```"]);
|
|
54
|
-
const begin = chunks.find((c) => isCodeBegin(c));
|
|
55
|
-
expect(begin?.path).toBe("App.jsx");
|
|
56
|
-
});
|
|
57
|
-
it("stamps path on every code.line within the block", async () => {
|
|
58
|
-
const chunks = await runBlockStream(["App.jsx", "```jsx", "const a = 1;", "const b = 2;", "```"]);
|
|
59
|
-
const lines = chunks.filter((c) => isCodeLine(c));
|
|
60
|
-
expect(lines).toHaveLength(2);
|
|
61
|
-
for (const l of lines)
|
|
62
|
-
expect(l.path).toBe("App.jsx");
|
|
63
|
-
});
|
|
64
|
-
it("uses the most recent non-blank toplevel line, not earlier ones", async () => {
|
|
65
|
-
const chunks = await runBlockStream(["First paragraph.", "App.jsx", "", "```jsx", "const x = 1;", "```"]);
|
|
66
|
-
const begin = chunks.find((c) => isCodeBegin(c));
|
|
67
|
-
expect(begin?.path).toBe("App.jsx");
|
|
68
|
-
});
|
|
69
|
-
it("does not carry a path-line forward across multiple blocks if the second has its own toplevel section", async () => {
|
|
70
|
-
const chunks = await runBlockStream([
|
|
71
|
-
"App.jsx",
|
|
72
|
-
"```jsx",
|
|
73
|
-
"const a = 1;",
|
|
74
|
-
"```",
|
|
75
|
-
"Now some more prose without a path line.",
|
|
76
|
-
"```jsx",
|
|
77
|
-
"const b = 2;",
|
|
78
|
-
"```",
|
|
79
|
-
]);
|
|
80
|
-
const begins = chunks.filter((c) => isCodeBegin(c));
|
|
81
|
-
expect(begins).toHaveLength(2);
|
|
82
|
-
expect(begins[0].path).toBe("App.jsx");
|
|
83
|
-
expect(begins[1].path).toBe("App.jsx");
|
|
84
|
-
});
|
|
85
|
-
it("rejects a path line whose extension is not in the allowed set", async () => {
|
|
86
|
-
const chunks = await runBlockStream(["foo.exe", "```", "binary", "```"]);
|
|
87
|
-
const begin = chunks.find((c) => isCodeBegin(c));
|
|
88
|
-
expect(begin?.path).toBe("App.jsx");
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
//# sourceMappingURL=block-stream-path.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-stream-path.test.js","sourceRoot":"","sources":["../jsr/block-stream-path.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAsC,MAAM,mBAAmB,CAAC;AAG9H,MAAM,aAAa,GAAG,OAAO,CAAC;AAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB,SAAS,cAAc,CAAC,KAAe;IACrC,MAAM,MAAM,GAAoB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IACzG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE;QAC3B,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,aAAa;YACvB,OAAO;YACP,MAAM,EAAE,CAAC,GAAG,CAAC;YACb,SAAS,EAAE,IAAI,IAAI,EAAE;SACtB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IAC5G,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,KAAe;IAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CA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M,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEvC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAA6B,CAAC;QAC7E,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/fence-body-parser.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Edit } from "./apply-edits.js";
|
|
2
|
-
export type FenceParseErrorKind = "orphan-divider" | "orphan-end" | "unterminated-search" | "unterminated-replace" | "content-before-search";
|
|
3
|
-
export interface FenceParseError {
|
|
4
|
-
readonly kind: FenceParseErrorKind;
|
|
5
|
-
readonly lineNr: number;
|
|
6
|
-
}
|
|
7
|
-
export interface ParsedFenceBody {
|
|
8
|
-
readonly edits: readonly Edit[];
|
|
9
|
-
readonly errors: readonly FenceParseError[];
|
|
10
|
-
}
|
|
11
|
-
export declare function parseFenceBody(lines: readonly string[]): ParsedFenceBody;
|
package/fence-body-parser.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
const SEARCH_MARKER = /^<{7}\s+SEARCH\s*$/;
|
|
2
|
-
const DIVIDER = /^={7}\s*$/;
|
|
3
|
-
const REPLACE_MARKER = /^>{7}\s+REPLACE\s*$/;
|
|
4
|
-
export function parseFenceBody(lines) {
|
|
5
|
-
let mode = "plain";
|
|
6
|
-
const plainLines = [];
|
|
7
|
-
let searchLines = [];
|
|
8
|
-
let replaceLines = [];
|
|
9
|
-
const edits = [];
|
|
10
|
-
const errors = [];
|
|
11
|
-
let sawAnyMarker = false;
|
|
12
|
-
for (let i = 0; i < lines.length; i += 1) {
|
|
13
|
-
const line = lines[i];
|
|
14
|
-
const lineNr = i + 1;
|
|
15
|
-
const trimmed = line.replace(/[ \t]+$/, "");
|
|
16
|
-
if (SEARCH_MARKER.test(trimmed)) {
|
|
17
|
-
sawAnyMarker = true;
|
|
18
|
-
if (mode === "plain" && plainLines.some((l) => l.trim().length > 0)) {
|
|
19
|
-
errors.push({ kind: "content-before-search", lineNr });
|
|
20
|
-
}
|
|
21
|
-
mode = "in-search";
|
|
22
|
-
searchLines = [];
|
|
23
|
-
replaceLines = [];
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
if (DIVIDER.test(trimmed)) {
|
|
27
|
-
if (mode === "in-search") {
|
|
28
|
-
mode = "in-replace";
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
errors.push({ kind: "orphan-divider", lineNr });
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (REPLACE_MARKER.test(trimmed)) {
|
|
35
|
-
if (mode === "in-replace") {
|
|
36
|
-
edits.push({
|
|
37
|
-
op: "replace",
|
|
38
|
-
search: searchLines.join("\n"),
|
|
39
|
-
replace: replaceLines.join("\n"),
|
|
40
|
-
});
|
|
41
|
-
searchLines = [];
|
|
42
|
-
replaceLines = [];
|
|
43
|
-
mode = "between";
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
errors.push({ kind: "orphan-end", lineNr });
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (mode === "plain") {
|
|
50
|
-
plainLines.push(line);
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
if (mode === "in-search") {
|
|
54
|
-
searchLines.push(line);
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (mode === "in-replace") {
|
|
58
|
-
replaceLines.push(line);
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
if (line.trim().length > 0) {
|
|
62
|
-
errors.push({ kind: "content-before-search", lineNr });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (mode === "in-search") {
|
|
66
|
-
errors.push({ kind: "unterminated-search", lineNr: lines.length });
|
|
67
|
-
}
|
|
68
|
-
else if (mode === "in-replace") {
|
|
69
|
-
errors.push({ kind: "unterminated-replace", lineNr: lines.length });
|
|
70
|
-
}
|
|
71
|
-
if (!sawAnyMarker) {
|
|
72
|
-
edits.push({ op: "create", content: plainLines.join("\n") });
|
|
73
|
-
}
|
|
74
|
-
return { edits, errors };
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=fence-body-parser.js.map
|
package/fence-body-parser.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fence-body-parser.js","sourceRoot":"","sources":["../jsr/fence-body-parser.ts"],"names":[],"mappings":"AAmBA,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAC3C,MAAM,OAAO,GAAG,WAAW,CAAC;AAC5B,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAI7C,MAAM,UAAU,cAAc,CAAC,KAAwB;IACrD,IAAI,IAAI,GAAS,OAAO,CAAC;IACzB,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,IAAI,WAAW,GAAa,EAAE,CAAC;IAC/B,IAAI,YAAY,GAAa,EAAE,CAAC;IAChC,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,IAAI,YAAY,GAAG,KAAK,CAAC;IAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,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EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { parseFenceBody } from "./fence-body-parser.js";
|
|
3
|
-
describe("parseFenceBody — create blocks", () => {
|
|
4
|
-
it("treats a body with no markers as a single create", () => {
|
|
5
|
-
const r = parseFenceBody(["const x = 1;", "const y = 2;"]);
|
|
6
|
-
expect(r.errors).toEqual([]);
|
|
7
|
-
expect(r.edits).toEqual([{ op: "create", content: "const x = 1;\nconst y = 2;" }]);
|
|
8
|
-
});
|
|
9
|
-
it("preserves blank lines inside a create body", () => {
|
|
10
|
-
const r = parseFenceBody(["a", "", "b"]);
|
|
11
|
-
expect(r.edits).toEqual([{ op: "create", content: "a\n\nb" }]);
|
|
12
|
-
});
|
|
13
|
-
it("handles an empty body as an empty create", () => {
|
|
14
|
-
const r = parseFenceBody([]);
|
|
15
|
-
expect(r.errors).toEqual([]);
|
|
16
|
-
expect(r.edits).toEqual([{ op: "create", content: "" }]);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe("parseFenceBody — replace blocks", () => {
|
|
20
|
-
it("parses a single SEARCH/REPLACE section", () => {
|
|
21
|
-
const r = parseFenceBody(["<<<<<<< SEARCH", "old line", "=======", "new line", ">>>>>>> REPLACE"]);
|
|
22
|
-
expect(r.errors).toEqual([]);
|
|
23
|
-
expect(r.edits).toEqual([{ op: "replace", search: "old line", replace: "new line" }]);
|
|
24
|
-
});
|
|
25
|
-
it("parses multiple SEARCH/REPLACE sections in one fence", () => {
|
|
26
|
-
const r = parseFenceBody([
|
|
27
|
-
"<<<<<<< SEARCH",
|
|
28
|
-
"a1",
|
|
29
|
-
"=======",
|
|
30
|
-
"A1",
|
|
31
|
-
">>>>>>> REPLACE",
|
|
32
|
-
"<<<<<<< SEARCH",
|
|
33
|
-
"b2",
|
|
34
|
-
"=======",
|
|
35
|
-
"B2",
|
|
36
|
-
">>>>>>> REPLACE",
|
|
37
|
-
]);
|
|
38
|
-
expect(r.errors).toEqual([]);
|
|
39
|
-
expect(r.edits).toEqual([
|
|
40
|
-
{ op: "replace", search: "a1", replace: "A1" },
|
|
41
|
-
{ op: "replace", search: "b2", replace: "B2" },
|
|
42
|
-
]);
|
|
43
|
-
});
|
|
44
|
-
it("preserves multi-line SEARCH and REPLACE bodies including indentation", () => {
|
|
45
|
-
const r = parseFenceBody([
|
|
46
|
-
"<<<<<<< SEARCH",
|
|
47
|
-
" function foo() {",
|
|
48
|
-
" return 1;",
|
|
49
|
-
" }",
|
|
50
|
-
"=======",
|
|
51
|
-
" function foo() {",
|
|
52
|
-
" return 2;",
|
|
53
|
-
" }",
|
|
54
|
-
">>>>>>> REPLACE",
|
|
55
|
-
]);
|
|
56
|
-
expect(r.edits).toEqual([
|
|
57
|
-
{
|
|
58
|
-
op: "replace",
|
|
59
|
-
search: " function foo() {\n return 1;\n }",
|
|
60
|
-
replace: " function foo() {\n return 2;\n }",
|
|
61
|
-
},
|
|
62
|
-
]);
|
|
63
|
-
});
|
|
64
|
-
it("tolerates trailing whitespace on marker lines", () => {
|
|
65
|
-
const r = parseFenceBody(["<<<<<<< SEARCH ", "old", "=======\t", "new", ">>>>>>> REPLACE "]);
|
|
66
|
-
expect(r.errors).toEqual([]);
|
|
67
|
-
expect(r.edits).toHaveLength(1);
|
|
68
|
-
});
|
|
69
|
-
it("ignores blank lines between sections", () => {
|
|
70
|
-
const r = parseFenceBody([
|
|
71
|
-
"<<<<<<< SEARCH",
|
|
72
|
-
"a",
|
|
73
|
-
"=======",
|
|
74
|
-
"A",
|
|
75
|
-
">>>>>>> REPLACE",
|
|
76
|
-
"",
|
|
77
|
-
"",
|
|
78
|
-
"<<<<<<< SEARCH",
|
|
79
|
-
"b",
|
|
80
|
-
"=======",
|
|
81
|
-
"B",
|
|
82
|
-
">>>>>>> REPLACE",
|
|
83
|
-
]);
|
|
84
|
-
expect(r.errors).toEqual([]);
|
|
85
|
-
expect(r.edits).toHaveLength(2);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
describe("parseFenceBody — error cases", () => {
|
|
89
|
-
it("reports orphan divider with no preceding SEARCH", () => {
|
|
90
|
-
const r = parseFenceBody(["just text", "=======", "more text"]);
|
|
91
|
-
expect(r.errors).toEqual([{ kind: "orphan-divider", lineNr: 2 }]);
|
|
92
|
-
});
|
|
93
|
-
it("reports orphan REPLACE end with no in-progress section", () => {
|
|
94
|
-
const r = parseFenceBody(["text", ">>>>>>> REPLACE"]);
|
|
95
|
-
expect(r.errors).toEqual([{ kind: "orphan-end", lineNr: 2 }]);
|
|
96
|
-
});
|
|
97
|
-
it("reports unterminated SEARCH (missing divider)", () => {
|
|
98
|
-
const r = parseFenceBody(["<<<<<<< SEARCH", "old", "old2"]);
|
|
99
|
-
expect(r.errors).toEqual([{ kind: "unterminated-search", lineNr: 3 }]);
|
|
100
|
-
expect(r.edits).toEqual([]);
|
|
101
|
-
});
|
|
102
|
-
it("reports unterminated REPLACE (missing end marker)", () => {
|
|
103
|
-
const r = parseFenceBody(["<<<<<<< SEARCH", "old", "=======", "new"]);
|
|
104
|
-
expect(r.errors).toEqual([{ kind: "unterminated-replace", lineNr: 4 }]);
|
|
105
|
-
expect(r.edits).toEqual([]);
|
|
106
|
-
});
|
|
107
|
-
it("reports content-before-search when the body starts with non-blank prose then a SEARCH", () => {
|
|
108
|
-
const r = parseFenceBody(["stray text before any marker", "<<<<<<< SEARCH", "old", "=======", "new", ">>>>>>> REPLACE"]);
|
|
109
|
-
expect(r.errors).toContainEqual({ kind: "content-before-search", lineNr: 2 });
|
|
110
|
-
expect(r.edits).toEqual([{ op: "replace", search: "old", replace: "new" }]);
|
|
111
|
-
});
|
|
112
|
-
it("reports content-before-search when stray content sits between two sections", () => {
|
|
113
|
-
const r = parseFenceBody([
|
|
114
|
-
"<<<<<<< SEARCH",
|
|
115
|
-
"a",
|
|
116
|
-
"=======",
|
|
117
|
-
"A",
|
|
118
|
-
">>>>>>> REPLACE",
|
|
119
|
-
"stray non-blank content",
|
|
120
|
-
"<<<<<<< SEARCH",
|
|
121
|
-
"b",
|
|
122
|
-
"=======",
|
|
123
|
-
"B",
|
|
124
|
-
">>>>>>> REPLACE",
|
|
125
|
-
]);
|
|
126
|
-
expect(r.errors).toContainEqual({ kind: "content-before-search", lineNr: 6 });
|
|
127
|
-
expect(r.edits).toHaveLength(2);
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
//# sourceMappingURL=fence-body-parser.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fence-body-parser.test.js","sourceRoot":"","sources":["../jsr/fence-body-parser.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;QAC3D,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,CAAC,CAA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M,CAAC,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9E,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/filesystem-stream.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { type Edit } from "./apply-edits.js";
|
|
2
|
-
import { type FenceParseError } from "./fence-body-parser.js";
|
|
3
|
-
import { type BlockStreamMsg } from "./block-stream.js";
|
|
4
|
-
export declare const FsApplyFailure: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
5
|
-
sectionIndex: number;
|
|
6
|
-
reason: "multiple-match" | "no-match" | "parse-error";
|
|
7
|
-
parseErrorKind?: string | undefined;
|
|
8
|
-
matchCount?: number | undefined;
|
|
9
|
-
search?: string | undefined;
|
|
10
|
-
}, {}>;
|
|
11
|
-
export type FsApplyFailure = typeof FsApplyFailure.infer;
|
|
12
|
-
export declare const FsFileSnapshotMsg: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
13
|
-
blockId: string;
|
|
14
|
-
streamId: string;
|
|
15
|
-
seq: number;
|
|
16
|
-
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
17
|
-
type: "fs.file.snapshot";
|
|
18
|
-
path: string;
|
|
19
|
-
content: string;
|
|
20
|
-
sectionId: string;
|
|
21
|
-
source: "create" | "replace";
|
|
22
|
-
appliedSections: number;
|
|
23
|
-
}, {}>;
|
|
24
|
-
export type FsFileSnapshotMsg = typeof FsFileSnapshotMsg.infer;
|
|
25
|
-
export declare const FsApplyErrorMsg: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
26
|
-
blockId: string;
|
|
27
|
-
streamId: string;
|
|
28
|
-
seq: number;
|
|
29
|
-
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
30
|
-
type: "fs.apply.error";
|
|
31
|
-
path: string;
|
|
32
|
-
sectionId: string;
|
|
33
|
-
failures: {
|
|
34
|
-
sectionIndex: number;
|
|
35
|
-
reason: "multiple-match" | "no-match" | "parse-error";
|
|
36
|
-
parseErrorKind?: string | undefined;
|
|
37
|
-
matchCount?: number | undefined;
|
|
38
|
-
search?: string | undefined;
|
|
39
|
-
}[];
|
|
40
|
-
}, {}>;
|
|
41
|
-
export type FsApplyErrorMsg = typeof FsApplyErrorMsg.infer;
|
|
42
|
-
export declare const FsTurnEndMsg: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
43
|
-
blockId: string;
|
|
44
|
-
streamId: string;
|
|
45
|
-
seq: number;
|
|
46
|
-
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
47
|
-
type: "fs.turn.end";
|
|
48
|
-
files: {
|
|
49
|
-
[x: string]: string;
|
|
50
|
-
};
|
|
51
|
-
errorCount: number;
|
|
52
|
-
}, {}>;
|
|
53
|
-
export type FsTurnEndMsg = typeof FsTurnEndMsg.infer;
|
|
54
|
-
export declare const FsStreamMsg: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
55
|
-
blockId: string;
|
|
56
|
-
streamId: string;
|
|
57
|
-
seq: number;
|
|
58
|
-
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
59
|
-
type: "fs.file.snapshot";
|
|
60
|
-
path: string;
|
|
61
|
-
content: string;
|
|
62
|
-
sectionId: string;
|
|
63
|
-
source: "create" | "replace";
|
|
64
|
-
appliedSections: number;
|
|
65
|
-
} | {
|
|
66
|
-
blockId: string;
|
|
67
|
-
streamId: string;
|
|
68
|
-
seq: number;
|
|
69
|
-
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
70
|
-
type: "fs.apply.error";
|
|
71
|
-
path: string;
|
|
72
|
-
sectionId: string;
|
|
73
|
-
failures: {
|
|
74
|
-
sectionIndex: number;
|
|
75
|
-
reason: "multiple-match" | "no-match" | "parse-error";
|
|
76
|
-
parseErrorKind?: string | undefined;
|
|
77
|
-
matchCount?: number | undefined;
|
|
78
|
-
search?: string | undefined;
|
|
79
|
-
}[];
|
|
80
|
-
} | {
|
|
81
|
-
blockId: string;
|
|
82
|
-
streamId: string;
|
|
83
|
-
seq: number;
|
|
84
|
-
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
85
|
-
type: "fs.turn.end";
|
|
86
|
-
files: {
|
|
87
|
-
[x: string]: string;
|
|
88
|
-
};
|
|
89
|
-
errorCount: number;
|
|
90
|
-
}, {}>;
|
|
91
|
-
export type FsStreamMsg = typeof FsStreamMsg.infer;
|
|
92
|
-
export declare const isFsFileSnapshot: (msg: unknown, streamId?: string) => msg is FsFileSnapshotMsg;
|
|
93
|
-
export declare const isFsApplyError: (msg: unknown, streamId?: string) => msg is FsApplyErrorMsg;
|
|
94
|
-
export declare const isFsTurnEnd: (msg: unknown, streamId?: string) => msg is FsTurnEndMsg;
|
|
95
|
-
export interface FileSystemStreamOptions {
|
|
96
|
-
readonly streamId: string;
|
|
97
|
-
readonly createId: () => string;
|
|
98
|
-
readonly seed?: ReadonlyMap<string, string>;
|
|
99
|
-
}
|
|
100
|
-
export declare function createFileSystemStream(opts: FileSystemStreamOptions): TransformStream<BlockStreamMsg, BlockStreamMsg | FsStreamMsg>;
|
|
101
|
-
interface EditCount {
|
|
102
|
-
readonly creates: number;
|
|
103
|
-
readonly replaces: number;
|
|
104
|
-
}
|
|
105
|
-
export declare function classifyEdits(edits: readonly Edit[]): EditCount;
|
|
106
|
-
export declare function summarizeFailures(failures: readonly FsApplyFailure[]): readonly string[];
|
|
107
|
-
export type { FenceParseError };
|
package/filesystem-stream.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { type } from "arktype";
|
|
2
|
-
import { CoercedDate } from "./types.js";
|
|
3
|
-
import { passthrough } from "./passthrough.js";
|
|
4
|
-
import { applyEdits } from "./apply-edits.js";
|
|
5
|
-
import { parseFenceBody } from "./fence-body-parser.js";
|
|
6
|
-
import { isBlockEnd, isCodeBegin, isCodeEnd, isCodeLine } from "./block-stream.js";
|
|
7
|
-
const FsBase = type({
|
|
8
|
-
blockId: "string",
|
|
9
|
-
streamId: "string",
|
|
10
|
-
seq: "number",
|
|
11
|
-
timestamp: CoercedDate,
|
|
12
|
-
});
|
|
13
|
-
export const FsApplyFailure = type({
|
|
14
|
-
sectionIndex: "number",
|
|
15
|
-
reason: "'no-match' | 'multiple-match' | 'parse-error'",
|
|
16
|
-
"parseErrorKind?": "string",
|
|
17
|
-
"matchCount?": "number",
|
|
18
|
-
"search?": "string",
|
|
19
|
-
});
|
|
20
|
-
export const FsFileSnapshotMsg = type({
|
|
21
|
-
type: "'fs.file.snapshot'",
|
|
22
|
-
path: "string",
|
|
23
|
-
content: "string",
|
|
24
|
-
sectionId: "string",
|
|
25
|
-
source: "'create' | 'replace'",
|
|
26
|
-
appliedSections: "number",
|
|
27
|
-
}).and(FsBase);
|
|
28
|
-
export const FsApplyErrorMsg = type({
|
|
29
|
-
type: "'fs.apply.error'",
|
|
30
|
-
path: "string",
|
|
31
|
-
sectionId: "string",
|
|
32
|
-
failures: FsApplyFailure.array(),
|
|
33
|
-
}).and(FsBase);
|
|
34
|
-
export const FsTurnEndMsg = type({
|
|
35
|
-
type: "'fs.turn.end'",
|
|
36
|
-
files: type({ "[string]": "string" }),
|
|
37
|
-
errorCount: "number",
|
|
38
|
-
}).and(FsBase);
|
|
39
|
-
export const FsStreamMsg = FsFileSnapshotMsg.or(FsApplyErrorMsg).or(FsTurnEndMsg);
|
|
40
|
-
export const isFsFileSnapshot = (msg, streamId) => !(FsFileSnapshotMsg(msg) instanceof type.errors) && (!streamId || msg.streamId === streamId);
|
|
41
|
-
export const isFsApplyError = (msg, streamId) => !(FsApplyErrorMsg(msg) instanceof type.errors) && (!streamId || msg.streamId === streamId);
|
|
42
|
-
export const isFsTurnEnd = (msg, streamId) => !(FsTurnEndMsg(msg) instanceof type.errors) && (!streamId || msg.streamId === streamId);
|
|
43
|
-
export function createFileSystemStream(opts) {
|
|
44
|
-
const { streamId } = opts;
|
|
45
|
-
const vfs = new Map(opts.seed ?? []);
|
|
46
|
-
const pending = new Map();
|
|
47
|
-
let seq = 0;
|
|
48
|
-
return new TransformStream({
|
|
49
|
-
transform: passthrough((msg, controller) => {
|
|
50
|
-
if (isCodeBegin(msg, streamId)) {
|
|
51
|
-
pending.set(msg.sectionId, {
|
|
52
|
-
path: msg.path ?? "App.jsx",
|
|
53
|
-
lines: [],
|
|
54
|
-
});
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (isCodeLine(msg, streamId)) {
|
|
58
|
-
const acc = pending.get(msg.sectionId);
|
|
59
|
-
if (acc !== undefined)
|
|
60
|
-
acc.lines.push(msg.line);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (isCodeEnd(msg, streamId)) {
|
|
64
|
-
const acc = pending.get(msg.sectionId);
|
|
65
|
-
pending.delete(msg.sectionId);
|
|
66
|
-
if (acc === undefined)
|
|
67
|
-
return;
|
|
68
|
-
const parsed = parseFenceBody(acc.lines);
|
|
69
|
-
const seed = vfs.get(acc.path) ?? "";
|
|
70
|
-
const result = applyEdits(seed, parsed.edits);
|
|
71
|
-
const failures = [];
|
|
72
|
-
for (const pe of parsed.errors) {
|
|
73
|
-
failures.push({ sectionIndex: -1, reason: "parse-error", parseErrorKind: pe.kind });
|
|
74
|
-
}
|
|
75
|
-
for (const ae of result.errors) {
|
|
76
|
-
failures.push({
|
|
77
|
-
sectionIndex: ae.index,
|
|
78
|
-
reason: ae.reason,
|
|
79
|
-
matchCount: ae.matchCount,
|
|
80
|
-
search: ae.search,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
const isCreate = parsed.edits.some((e) => e.op === "create");
|
|
84
|
-
const successfulSections = parsed.edits.length - result.errors.length;
|
|
85
|
-
if (successfulSections > 0 || isCreate) {
|
|
86
|
-
vfs.set(acc.path, result.content);
|
|
87
|
-
controller.enqueue({
|
|
88
|
-
type: "fs.file.snapshot",
|
|
89
|
-
path: acc.path,
|
|
90
|
-
content: result.content,
|
|
91
|
-
sectionId: msg.sectionId,
|
|
92
|
-
source: isCreate ? "create" : "replace",
|
|
93
|
-
appliedSections: successfulSections,
|
|
94
|
-
blockId: msg.blockId,
|
|
95
|
-
streamId,
|
|
96
|
-
seq: seq++,
|
|
97
|
-
timestamp: new Date(),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
if (failures.length > 0) {
|
|
101
|
-
controller.enqueue({
|
|
102
|
-
type: "fs.apply.error",
|
|
103
|
-
path: acc.path,
|
|
104
|
-
sectionId: msg.sectionId,
|
|
105
|
-
failures,
|
|
106
|
-
blockId: msg.blockId,
|
|
107
|
-
streamId,
|
|
108
|
-
seq: seq++,
|
|
109
|
-
timestamp: new Date(),
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (isBlockEnd(msg, streamId)) {
|
|
115
|
-
const filesObj = {};
|
|
116
|
-
for (const [k, v] of vfs.entries())
|
|
117
|
-
filesObj[k] = v;
|
|
118
|
-
controller.enqueue({
|
|
119
|
-
type: "fs.turn.end",
|
|
120
|
-
files: filesObj,
|
|
121
|
-
errorCount: 0,
|
|
122
|
-
blockId: msg.blockId,
|
|
123
|
-
streamId,
|
|
124
|
-
seq: seq++,
|
|
125
|
-
timestamp: new Date(),
|
|
126
|
-
});
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
}),
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
export function classifyEdits(edits) {
|
|
133
|
-
let creates = 0;
|
|
134
|
-
let replaces = 0;
|
|
135
|
-
for (const e of edits) {
|
|
136
|
-
if (e.op === "create")
|
|
137
|
-
creates += 1;
|
|
138
|
-
else
|
|
139
|
-
replaces += 1;
|
|
140
|
-
}
|
|
141
|
-
return { creates, replaces };
|
|
142
|
-
}
|
|
143
|
-
export function summarizeFailures(failures) {
|
|
144
|
-
return failures.map((f) => {
|
|
145
|
-
if (f.reason === "parse-error")
|
|
146
|
-
return `parse error: ${f.parseErrorKind ?? "unknown"}`;
|
|
147
|
-
const ctx = f.search !== undefined ? `: ${f.search.slice(0, 40)}…` : "";
|
|
148
|
-
return `section #${f.sectionIndex + 1} ${f.reason}${ctx}`;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=filesystem-stream.js.map
|
package/filesystem-stream.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-stream.js","sourceRoot":"","sources":["../jsr/filesystem-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAa,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAwB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAuB,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAExG,MAAM,MAAM,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,QAAQ;IACb,SAAS,EAAE,WAAW;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,QAAQ;IACtB,MAAM,EAAE,+CAA+C;IACvD,iBAAiB,EAAE,QAAQ;IAC3B,aAAa,EAAE,QAAQ;IACvB,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;IACpC,IAAI,EAAE,oBAAoB;IAC1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