@romandmitri/ai-patch 0.2.0 → 0.3.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/README.md +17 -33
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/target/Target.d.ts +0 -5
- package/dist/target/Target.d.ts.map +1 -1
- package/dist/target/Target.js +0 -12
- package/dist/target/Target.js.map +1 -1
- package/package.json +1 -2
- package/dist/target/test/Target.tool.test.d.ts +0 -2
- package/dist/target/test/Target.tool.test.d.ts.map +0 -1
- package/dist/target/test/Target.tool.test.js +0 -76
- package/dist/target/test/Target.tool.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
> Looking to hire me? Check out my [introduction](https://github.com/romandmitri/introduction) repository for a curated list!
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# `@romandmitri/ai-patch`
|
|
2
6
|
|
|
3
7
|
https://www.npmjs.com/package/@romandmitri/ai-patch
|
|
@@ -32,22 +36,25 @@ Text is the currently supported content format. JSON coming... if needed.
|
|
|
32
36
|
object.
|
|
33
37
|
|
|
34
38
|
```ts
|
|
35
|
-
import {
|
|
39
|
+
import { Target } from "@romandmitri/ai-patch";
|
|
36
40
|
import { Output, generateText } from "ai";
|
|
37
41
|
import { z } from "zod";
|
|
38
42
|
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
format: ContentFormat.Markdown,
|
|
46
|
-
});
|
|
43
|
+
const document = "# Guide\n\nOld instructions.\n";
|
|
44
|
+
const summary = "# Summary\n\nOld summary.\n";
|
|
45
|
+
const updateInstructions = "Update the guide and keep its summary in sync.";
|
|
46
|
+
|
|
47
|
+
const documentTarget = Target.fromContent(document);
|
|
48
|
+
const summaryTarget = Target.fromContent(summary);
|
|
47
49
|
|
|
48
50
|
const { output } = await generateText({
|
|
49
51
|
model,
|
|
50
|
-
|
|
52
|
+
instructions: "Return only the patches needed to perform the requested update.",
|
|
53
|
+
messages: [
|
|
54
|
+
{ role: "user", content: "The [update_instructions]:\n" + updateInstructions },
|
|
55
|
+
{ role: "user", content: "The [document]:\n" + document },
|
|
56
|
+
{ role: "user", content: "The [summary]:\n" + summary },
|
|
57
|
+
],
|
|
51
58
|
output: Output.object({
|
|
52
59
|
schema: z.object({
|
|
53
60
|
documentOperations: documentTarget.toSchema(),
|
|
@@ -61,26 +68,3 @@ const updatedSummary = summaryTarget.apply(output.summaryOperations);
|
|
|
61
68
|
```
|
|
62
69
|
|
|
63
70
|
Each schema describes one immutable target. Operations cannot address another target or change which content snapshot supplies their coordinates.
|
|
64
|
-
|
|
65
|
-
## Tools
|
|
66
|
-
|
|
67
|
-
`Target.toVercelTool()` creates a target-bound AI SDK tool. Its strict input is `{ patches: Operation[] }`, and execution returns the updated content string.
|
|
68
|
-
|
|
69
|
-
```ts
|
|
70
|
-
import { ContentFormat, Target } from "@romandmitri/ai-patch";
|
|
71
|
-
import { generateText, isStepCount } from "ai";
|
|
72
|
-
|
|
73
|
-
const target = new Target({
|
|
74
|
-
content: "# Guide\n\nOld instructions.\n",
|
|
75
|
-
format: ContentFormat.Markdown,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
await generateText({
|
|
79
|
-
model,
|
|
80
|
-
prompt: "Update the guide with the patch tool.",
|
|
81
|
-
tools: {
|
|
82
|
-
patchGuide: target.toVercelTool(),
|
|
83
|
-
},
|
|
84
|
-
stopWhen: isStepCount(5),
|
|
85
|
-
});
|
|
86
|
-
```
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export type { Operation_InsertBefore } from "#src/operation/Operation_InsertBefo
|
|
|
7
7
|
export type { Operation_Replace } from "#src/operation/Operation_Replace.js";
|
|
8
8
|
export { OperationType } from "#src/operation/OperationType.js";
|
|
9
9
|
export { Target } from "#src/target/Target.js";
|
|
10
|
-
export type { TargetOptions
|
|
10
|
+
export type { TargetOptions } from "#src/target/Target.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,YAAY,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACvF,YAAY,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,YAAY,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,YAAY,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACvF,YAAY,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/target/Target.d.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { Content } from "#src/content/Content.js";
|
|
2
2
|
import { ContentFormat } from "#src/content/ContentFormat.js";
|
|
3
3
|
import type { Operation } from "#src/operation/Operation.js";
|
|
4
|
-
import { type Tool } from "ai";
|
|
5
4
|
import { type ZodType } from "zod";
|
|
6
5
|
export interface TargetOptions {
|
|
7
6
|
readonly content: Content;
|
|
8
7
|
readonly format: ContentFormat;
|
|
9
8
|
}
|
|
10
|
-
export type TargetTool = Tool<{
|
|
11
|
-
patches: Operation[];
|
|
12
|
-
}, Content>;
|
|
13
9
|
export declare class Target {
|
|
14
10
|
readonly content: Content;
|
|
15
11
|
readonly format: ContentFormat;
|
|
@@ -17,7 +13,6 @@ export declare class Target {
|
|
|
17
13
|
static fromContent: (content: Content, format?: ContentFormat) => Target;
|
|
18
14
|
toSchema(): ZodType<Operation[]>;
|
|
19
15
|
apply(patches: readonly Operation[]): Content;
|
|
20
|
-
toVercelTool(): TargetTool;
|
|
21
16
|
private failValidation;
|
|
22
17
|
}
|
|
23
18
|
//# sourceMappingURL=Target.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../src/target/Target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAM7D,OAAO,
|
|
1
|
+
{"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../src/target/Target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAM7D,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAErD,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAC/B;AAED,qBAAa,MAAM;IAClB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,YAAY,CAAC,EAAE,aAAa,EAQ3B;IAED,MAAM,CAAC,WAAW,YAAa,OAAO,WAAW,aAAa,YAK5D;IAEF,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAa/B;IAED,KAAK,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,GAAG,OAAO,CAU5C;IAED,OAAO,CAAC,cAAc;CAiBtB"}
|
package/dist/target/Target.js
CHANGED
|
@@ -5,7 +5,6 @@ import { PatchOperation_InsertAfter_Schema } from "#src/operation/Operation_Inse
|
|
|
5
5
|
import { PatchOperation_InsertBefore_Schema } from "#src/operation/Operation_InsertBefore.js";
|
|
6
6
|
import { PatchOperation_Replace_Schema } from "#src/operation/Operation_Replace.js";
|
|
7
7
|
import { Patcher_Text } from "#src/patch/Patcher_Text.js";
|
|
8
|
-
import { tool } from "ai";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
export class Target {
|
|
11
10
|
content;
|
|
@@ -45,17 +44,6 @@ export class Target {
|
|
|
45
44
|
return new Patcher_Text(this.content).apply(parsed.data);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
toVercelTool() {
|
|
49
|
-
return tool({
|
|
50
|
-
description: "Atomically patch this target only. Every patch is validated against this target's original content, and execution returns the updated content string.",
|
|
51
|
-
inputSchema: z
|
|
52
|
-
.strictObject({
|
|
53
|
-
patches: this.toSchema().describe("The complete atomic patch list for this target only."),
|
|
54
|
-
})
|
|
55
|
-
.describe("Patch input for this immutable target; patches cannot address any other target."),
|
|
56
|
-
execute: ({ patches }) => this.apply(patches),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
47
|
failValidation(issue) {
|
|
60
48
|
const inputIndex = typeof issue.path[0] === "number" ? issue.path[0] : 0;
|
|
61
49
|
const field = issue.path[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Target.js","sourceRoot":"","sources":["../../src/target/Target.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Target.js","sourceRoot":"","sources":["../../src/target/Target.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,CAAC,EAA+B,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I,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3D,CAAC;IACF,CAAC;IAEO,cAAc,CAAC,KAAe;QACrC,MAAM,UAAU,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE5B,QAAQ,KAAK,EAAE,CAAC;YACf,KAAK,WAAW;gBACf,OAAO,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,CAAC,CAAC;YAC1F,KAAK,cAAc;gBAClB,OAAO,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,mBAAmB,EAAE,qDAAqD,CAAC,CAAC;YACpH,KAAK,SAAS;gBACb,OAAO,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;YACpF,KAAK,SAAS;gBACb,OAAO,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;YACpF;gBACC,OAAO,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,YAAY,EAAE,wCAAwC,CAAC,CAAC;QACjG,CAAC;IACF,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@romandmitri/ai-patch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"author": "Roman Eidenzon <romandmitri@gmail.com> (https://www.romandmitri.com)",
|
|
5
5
|
"description": "Validated, atomic text patches for precise AI and LLM edits to large text prompts/documents.",
|
|
6
6
|
"repository": {
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"ai": "7.0.87",
|
|
58
57
|
"zod": "4.5.4"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Target.tool.test.d.ts","sourceRoot":"","sources":["../../../src/target/test/Target.tool.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { ContentFormat, OperationType, PatchError, PatchErrorCode, Target } from "#src/index.js";
|
|
2
|
-
import assert from "node:assert/strict";
|
|
3
|
-
import { test } from "node:test";
|
|
4
|
-
function target(content) {
|
|
5
|
-
return new Target({ content, format: ContentFormat.Text });
|
|
6
|
-
}
|
|
7
|
-
async function executeTool(generatedTool, input) {
|
|
8
|
-
assert.ok(generatedTool.execute);
|
|
9
|
-
return await generatedTool.execute(input, {
|
|
10
|
-
toolCallId: "test-call",
|
|
11
|
-
messages: [],
|
|
12
|
-
context: undefined,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
test("generated tools delegate to their own immutable targets", async () => {
|
|
16
|
-
const documentTarget = target("document");
|
|
17
|
-
const summaryTarget = target("summary");
|
|
18
|
-
const documentTool = documentTarget.toVercelTool();
|
|
19
|
-
const summaryTool = summaryTarget.toVercelTool();
|
|
20
|
-
const documentResult = await executeTool(documentTool, {
|
|
21
|
-
patches: [
|
|
22
|
-
{
|
|
23
|
-
operation: OperationType.Replace,
|
|
24
|
-
expectedLine: 1,
|
|
25
|
-
oldText: "document",
|
|
26
|
-
newText: "updated document",
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
});
|
|
30
|
-
const summaryResult = await executeTool(summaryTool, {
|
|
31
|
-
patches: [
|
|
32
|
-
{
|
|
33
|
-
operation: OperationType.Replace,
|
|
34
|
-
expectedLine: 1,
|
|
35
|
-
oldText: "summary",
|
|
36
|
-
newText: "updated summary",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
});
|
|
40
|
-
assert.equal(documentResult, "updated document");
|
|
41
|
-
assert.equal(summaryResult, "updated summary");
|
|
42
|
-
assert.equal(documentTarget.content, "document");
|
|
43
|
-
assert.equal(summaryTarget.content, "summary");
|
|
44
|
-
});
|
|
45
|
-
test("generated tool input and tool descriptions are package-owned", () => {
|
|
46
|
-
const generatedTool = target("content").toVercelTool();
|
|
47
|
-
const inputSchema = generatedTool.inputSchema;
|
|
48
|
-
const description = generatedTool.description;
|
|
49
|
-
if (typeof description !== "string") {
|
|
50
|
-
assert.fail("expected a static tool description");
|
|
51
|
-
}
|
|
52
|
-
assert.match(description, /this target only/);
|
|
53
|
-
assert.match(inputSchema.description ?? "", /immutable target/);
|
|
54
|
-
assert.deepEqual(inputSchema.parse({ patches: [] }), { patches: [] });
|
|
55
|
-
assert.throws(() => inputSchema.parse([]));
|
|
56
|
-
});
|
|
57
|
-
test("generated tool execution propagates typed patch errors", async () => {
|
|
58
|
-
const patchTarget = target("expected");
|
|
59
|
-
const generatedTool = patchTarget.toVercelTool();
|
|
60
|
-
await assert.rejects(() => executeTool(generatedTool, {
|
|
61
|
-
patches: [
|
|
62
|
-
{
|
|
63
|
-
operation: OperationType.Delete,
|
|
64
|
-
expectedLine: 1,
|
|
65
|
-
oldText: "wrong",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
}), (error) => {
|
|
69
|
-
assert.ok(error instanceof PatchError);
|
|
70
|
-
assert.equal(error.code, PatchErrorCode.AnchorMismatch);
|
|
71
|
-
assert.equal(error.patchIndex, 0);
|
|
72
|
-
return true;
|
|
73
|
-
});
|
|
74
|
-
assert.equal(patchTarget.content, "expected");
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=Target.tool.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Target.tool.test.js","sourceRoot":"","sources":["../../../src/target/test/Target.tool.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,c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