@keel_flow/extend 0.2.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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +152 -0
- package/dist/index.js.map +1 -0
- package/dist/pr.d.ts +37 -0
- package/dist/pr.d.ts.map +1 -0
- package/dist/pr.js +111 -0
- package/dist/pr.js.map +1 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jglasskatz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @keel_flow/extend
|
|
2
|
+
|
|
3
|
+
LLM-driven architecture extension: given an existing architecture map and a follow-up prompt, emits a typed `ArchitectureDelta` via `emit_delta` tool_use, applies it with `applyDelta`, and opens a GitHub PR with the updated `architecture/data.ts` via `openExtendPR`.
|
|
4
|
+
|
|
5
|
+
Part of the [Keel](https://github.com/jglasskatz/keel) framework.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install @keel_flow/extend
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { KnowledgeBase } from "@keel_flow/core";
|
|
2
|
+
import type { ArchitectureDelta, ArchitectureMap } from "@keel_flow/schema";
|
|
3
|
+
import type { ModelProvider } from "@keel_flow/runtime";
|
|
4
|
+
export type { ArchitectureDelta };
|
|
5
|
+
export { openExtendPR, openPr } from "./pr.js";
|
|
6
|
+
export type { OpenExtendPRArgs, OpenExtendPRResult, OpenPrArgs, OpenPrResult } from "./pr.js";
|
|
7
|
+
export interface ExtendResult {
|
|
8
|
+
delta: ArchitectureDelta;
|
|
9
|
+
rationale: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function extend({ prompt, architecture, kb, provider, }: {
|
|
12
|
+
prompt: string;
|
|
13
|
+
architecture: ArchitectureMap;
|
|
14
|
+
kb: KnowledgeBase;
|
|
15
|
+
provider: ModelProvider;
|
|
16
|
+
}): Promise<ExtendResult>;
|
|
17
|
+
export declare function applyDelta(map: ArchitectureMap, delta: ArchitectureDelta): ArchitectureMap;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE9F,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAmFD,wBAAsB,MAAM,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,EAAE,EACF,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,eAAe,CAAC;IAC9B,EAAE,EAAE,aAAa,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;CACzB,GAAG,OAAO,CAAC,YAAY,CAAC,CAuDxB;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,GAAG,eAAe,CA0B1F"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { ArchitectureDeltaSchema, ArchitectureMapSchema } from "@keel_flow/schema";
|
|
2
|
+
export { openExtendPR, openPr } from "./pr.js";
|
|
3
|
+
const extendToolSchema = {
|
|
4
|
+
name: "emit_delta",
|
|
5
|
+
description: "Emit only the additions and updates to the existing architecture map — not a full new map",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
addNodes: {
|
|
10
|
+
type: "array",
|
|
11
|
+
description: "New nodes to add to the architecture",
|
|
12
|
+
items: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
id: { type: "string" },
|
|
16
|
+
label: { type: "string" },
|
|
17
|
+
layer: { type: "string" },
|
|
18
|
+
tech: { type: "string" },
|
|
19
|
+
description: { type: "string" },
|
|
20
|
+
keyFiles: { type: "array", items: { type: "string" } },
|
|
21
|
+
keyFunctionality: { type: "array", items: { type: "string" } },
|
|
22
|
+
principles: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
upholds: { type: "array", items: { type: "object" } },
|
|
26
|
+
violates: { type: "array", items: { type: "object" } },
|
|
27
|
+
},
|
|
28
|
+
required: ["upholds", "violates"],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ["id", "label", "layer", "tech", "description", "keyFiles", "keyFunctionality", "principles"],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
addConnections: {
|
|
35
|
+
type: "array",
|
|
36
|
+
description: "New connections to add between existing or new nodes",
|
|
37
|
+
items: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
from: { type: "string" },
|
|
41
|
+
to: { type: "string" },
|
|
42
|
+
type: { type: "string" },
|
|
43
|
+
label: { type: "string" },
|
|
44
|
+
},
|
|
45
|
+
required: ["from", "to", "type"],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
addContexts: {
|
|
49
|
+
type: "array",
|
|
50
|
+
description: "New bounded contexts to add (optional)",
|
|
51
|
+
items: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
id: { type: "string" },
|
|
55
|
+
label: { type: "string" },
|
|
56
|
+
description: { type: "string" },
|
|
57
|
+
nodeIds: { type: "array", items: { type: "string" } },
|
|
58
|
+
},
|
|
59
|
+
required: ["id", "label", "description", "nodeIds"],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
updateNodes: {
|
|
63
|
+
type: "array",
|
|
64
|
+
description: "Partial updates to existing nodes (optional)",
|
|
65
|
+
items: {
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: {
|
|
68
|
+
id: { type: "string" },
|
|
69
|
+
changes: { type: "object" },
|
|
70
|
+
},
|
|
71
|
+
required: ["id", "changes"],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
rationale: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "Why this delta was chosen",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
required: ["addNodes", "addConnections", "rationale"],
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
export async function extend({ prompt, architecture, kb, provider, }) {
|
|
83
|
+
const chunks = await kb.retrieve(prompt, 10);
|
|
84
|
+
const kbContext = chunks.length > 0
|
|
85
|
+
? chunks.map((c, i) => `[${i + 1}] (source: ${c.source})\n${c.content}`).join("\n\n")
|
|
86
|
+
: "No KB documents available.";
|
|
87
|
+
const archJson = JSON.stringify(architecture, null, 2).slice(0, 4096);
|
|
88
|
+
const systemPrompt = `You are an expert software architect extending an existing Keel architecture map.
|
|
89
|
+
|
|
90
|
+
You will receive:
|
|
91
|
+
1. The current architecture map (compact JSON, up to 4KB)
|
|
92
|
+
2. A user prompt describing the change to make
|
|
93
|
+
3. KB context chunks relevant to the prompt
|
|
94
|
+
|
|
95
|
+
Your task: emit ONLY a delta — additions and/or updates to the existing map. Do NOT emit a full new map.
|
|
96
|
+
Use the emit_delta tool to return:
|
|
97
|
+
- addNodes: new nodes not yet in the map
|
|
98
|
+
- addConnections: new connections between existing or new nodes
|
|
99
|
+
- addContexts: optional new bounded contexts
|
|
100
|
+
- updateNodes: optional partial updates to existing nodes
|
|
101
|
+
- rationale: why this delta makes sense architecturally
|
|
102
|
+
|
|
103
|
+
Existing node IDs in the map: ${architecture.nodes.map((n) => n.id).join(", ")}`;
|
|
104
|
+
const userMessage = `User prompt: ${prompt}
|
|
105
|
+
|
|
106
|
+
Current architecture map:
|
|
107
|
+
${archJson}
|
|
108
|
+
|
|
109
|
+
KB context (top-10 chunks):
|
|
110
|
+
${kbContext}
|
|
111
|
+
|
|
112
|
+
Extend the architecture by emitting a delta using the emit_delta tool.`;
|
|
113
|
+
const response = await provider.generate({
|
|
114
|
+
model: provider.defaultModel,
|
|
115
|
+
system: systemPrompt,
|
|
116
|
+
messages: [{ role: "user", content: [{ type: "text", text: userMessage }] }],
|
|
117
|
+
tools: [extendToolSchema],
|
|
118
|
+
toolChoice: "any",
|
|
119
|
+
maxTokens: 4096,
|
|
120
|
+
});
|
|
121
|
+
const toolUse = response.content.find((b) => b.type === "tool_use");
|
|
122
|
+
if (!toolUse || toolUse.type !== "tool_use") {
|
|
123
|
+
throw new Error("Model did not return a delta");
|
|
124
|
+
}
|
|
125
|
+
const { rationale, ...deltaInput } = toolUse.input;
|
|
126
|
+
const delta = ArchitectureDeltaSchema.parse(deltaInput);
|
|
127
|
+
return { delta, rationale: String(rationale ?? "") };
|
|
128
|
+
}
|
|
129
|
+
export function applyDelta(map, delta) {
|
|
130
|
+
const nodeMap = new Map(map.nodes.map((n) => [n.id, { ...n }]));
|
|
131
|
+
for (const node of delta.addNodes) {
|
|
132
|
+
nodeMap.set(node.id, node);
|
|
133
|
+
}
|
|
134
|
+
if (delta.updateNodes) {
|
|
135
|
+
for (const { id, changes } of delta.updateNodes) {
|
|
136
|
+
const existing = nodeMap.get(id);
|
|
137
|
+
if (existing) {
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- merging Partial<ArchitectureNode> onto a full node; ArchitectureMapSchema.parse below validates the result
|
|
139
|
+
nodeMap.set(id, { ...existing, ...changes });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const validatedMap = ArchitectureMapSchema.parse({
|
|
144
|
+
schemaVersion: map.schemaVersion,
|
|
145
|
+
layers: map.layers,
|
|
146
|
+
nodes: Array.from(nodeMap.values()),
|
|
147
|
+
connections: [...map.connections, ...delta.addConnections],
|
|
148
|
+
contexts: [...map.contexts, ...(delta.addContexts ?? [])],
|
|
149
|
+
});
|
|
150
|
+
return validatedMap;
|
|
151
|
+
}
|
|
152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AED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;QACtB,KAAK,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjC,IAAI,QAAQ,EAAE,CAAC;gBACb,4KAA4K;gBAC5K,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,EAAE,GAAI,OAAe,EAAE,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC;QAC/C,aAAa,EAAE,GAAG,CAAC,aAAa;QAChC,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACnC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,cAAc,CAAC;QAC1D,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;KAC1D,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/dist/pr.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ArchitectureDelta } from "./index.js";
|
|
2
|
+
export interface OpenPrArgs {
|
|
3
|
+
branch: string;
|
|
4
|
+
title: string;
|
|
5
|
+
body: string;
|
|
6
|
+
repo: {
|
|
7
|
+
owner: string;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
baseBranch?: string;
|
|
11
|
+
token: string;
|
|
12
|
+
merge?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface OpenPrResult {
|
|
15
|
+
url: string;
|
|
16
|
+
number: number;
|
|
17
|
+
merged: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function openPr({ branch, title, body, repo, baseBranch, token, merge, }: OpenPrArgs): Promise<OpenPrResult>;
|
|
20
|
+
export interface OpenExtendPRArgs {
|
|
21
|
+
delta: ArchitectureDelta;
|
|
22
|
+
updatedArchitectureSource: string;
|
|
23
|
+
repo: {
|
|
24
|
+
owner: string;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
baseBranch?: string;
|
|
28
|
+
token: string;
|
|
29
|
+
promptSummary: string;
|
|
30
|
+
}
|
|
31
|
+
export interface OpenExtendPRResult {
|
|
32
|
+
url: string;
|
|
33
|
+
number: number;
|
|
34
|
+
branch: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function openExtendPR({ delta, updatedArchitectureSource, repo, baseBranch, token, promptSummary, }: OpenExtendPRArgs): Promise<OpenExtendPRResult>;
|
|
37
|
+
//# sourceMappingURL=pr.d.ts.map
|
package/dist/pr.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../src/pr.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,MAAM,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,UAAmB,EACnB,KAAK,EACL,KAAa,GACd,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAgCpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAoCD,wBAAsB,YAAY,CAAC,EACjC,KAAK,EACL,yBAAyB,EACzB,IAAI,EACJ,UAAmB,EACnB,KAAK,EACL,aAAa,GACd,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA+DhD"}
|
package/dist/pr.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Octokit } from "@octokit/rest";
|
|
2
|
+
export async function openPr({ branch, title, body, repo, baseBranch = "main", token, merge = false, }) {
|
|
3
|
+
if (!token) {
|
|
4
|
+
throw new Error("GitHub token is required to open a PR");
|
|
5
|
+
}
|
|
6
|
+
if (!repo.owner || !repo.name) {
|
|
7
|
+
throw new Error("repo.owner and repo.name are required");
|
|
8
|
+
}
|
|
9
|
+
const octokit = new Octokit({ auth: token });
|
|
10
|
+
const { data: pr } = await octokit.pulls.create({
|
|
11
|
+
owner: repo.owner,
|
|
12
|
+
repo: repo.name,
|
|
13
|
+
title,
|
|
14
|
+
head: branch,
|
|
15
|
+
base: baseBranch,
|
|
16
|
+
body,
|
|
17
|
+
});
|
|
18
|
+
if (merge) {
|
|
19
|
+
await octokit.pulls.merge({
|
|
20
|
+
owner: repo.owner,
|
|
21
|
+
repo: repo.name,
|
|
22
|
+
pull_number: pr.number,
|
|
23
|
+
// Merge commit, not squash: CLAUDE.md mandates "merge to main with a
|
|
24
|
+
// merge commit — the conventional commits are the history; do not squash".
|
|
25
|
+
merge_method: "merge",
|
|
26
|
+
});
|
|
27
|
+
return { url: pr.html_url, number: pr.number, merged: true };
|
|
28
|
+
}
|
|
29
|
+
return { url: pr.html_url, number: pr.number, merged: false };
|
|
30
|
+
}
|
|
31
|
+
function slugify(text) {
|
|
32
|
+
return text
|
|
33
|
+
.toLowerCase()
|
|
34
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
35
|
+
.replace(/^-|-$/g, "")
|
|
36
|
+
.slice(0, 40);
|
|
37
|
+
}
|
|
38
|
+
function buildPRBody(delta, rationale) {
|
|
39
|
+
const addedNodes = delta.addNodes
|
|
40
|
+
.map((n) => `- **${n.id}** (${n.layer}): ${n.label}`)
|
|
41
|
+
.join("\n");
|
|
42
|
+
const addedConnections = delta.addConnections
|
|
43
|
+
.map((c) => `- ${c.from} → ${c.to} (${c.type}${c.label ? `: ${c.label}` : ""})`)
|
|
44
|
+
.join("\n");
|
|
45
|
+
const updatedNodes = delta.updateNodes && delta.updateNodes.length > 0
|
|
46
|
+
? delta.updateNodes.map((u) => `- **${u.id}**: ${Object.keys(u.changes).join(", ")}`).join("\n")
|
|
47
|
+
: null;
|
|
48
|
+
const sections = [
|
|
49
|
+
`## Rationale\n\n${rationale}`,
|
|
50
|
+
`## Delta`,
|
|
51
|
+
delta.addNodes.length > 0 ? `### Added nodes\n\n${addedNodes}` : null,
|
|
52
|
+
delta.addConnections.length > 0 ? `### Added connections\n\n${addedConnections}` : null,
|
|
53
|
+
updatedNodes ? `### Updated nodes\n\n${updatedNodes}` : null,
|
|
54
|
+
`---\n_Generated by Keel via \`/adopt/extend\`. Verify gate will run on this PR._`,
|
|
55
|
+
].filter(Boolean);
|
|
56
|
+
return sections.join("\n\n");
|
|
57
|
+
}
|
|
58
|
+
export async function openExtendPR({ delta, updatedArchitectureSource, repo, baseBranch = "main", token, promptSummary, }) {
|
|
59
|
+
if (!token) {
|
|
60
|
+
throw new Error("GitHub token is required to open a PR");
|
|
61
|
+
}
|
|
62
|
+
if (!repo.owner || !repo.name) {
|
|
63
|
+
throw new Error("repo.owner and repo.name are required");
|
|
64
|
+
}
|
|
65
|
+
const octokit = new Octokit({ auth: token });
|
|
66
|
+
const timestamp = Date.now();
|
|
67
|
+
const slug = slugify(promptSummary);
|
|
68
|
+
const branch = `keel/extend-${timestamp}-${slug}`;
|
|
69
|
+
const { data: baseRef } = await octokit.git.getRef({
|
|
70
|
+
owner: repo.owner,
|
|
71
|
+
repo: repo.name,
|
|
72
|
+
ref: `heads/${baseBranch}`,
|
|
73
|
+
});
|
|
74
|
+
const baseSha = baseRef.object.sha;
|
|
75
|
+
await octokit.git.createRef({
|
|
76
|
+
owner: repo.owner,
|
|
77
|
+
repo: repo.name,
|
|
78
|
+
ref: `refs/heads/${branch}`,
|
|
79
|
+
sha: baseSha,
|
|
80
|
+
});
|
|
81
|
+
const { data: currentFile } = await octokit.repos.getContent({
|
|
82
|
+
owner: repo.owner,
|
|
83
|
+
repo: repo.name,
|
|
84
|
+
path: "architecture/data.ts",
|
|
85
|
+
ref: baseBranch,
|
|
86
|
+
}).catch(() => ({ data: null }));
|
|
87
|
+
const fileSha = currentFile && !Array.isArray(currentFile) && "sha" in currentFile
|
|
88
|
+
? currentFile.sha
|
|
89
|
+
: undefined;
|
|
90
|
+
await octokit.repos.createOrUpdateFileContents({
|
|
91
|
+
owner: repo.owner,
|
|
92
|
+
repo: repo.name,
|
|
93
|
+
path: "architecture/data.ts",
|
|
94
|
+
message: `feat(architecture): ${promptSummary.slice(0, 72)}`,
|
|
95
|
+
content: Buffer.from(updatedArchitectureSource, "utf8").toString("base64"),
|
|
96
|
+
branch,
|
|
97
|
+
...(fileSha !== undefined ? { sha: fileSha } : {}),
|
|
98
|
+
});
|
|
99
|
+
const title = `feat(architecture): ${promptSummary.slice(0, 72)}`;
|
|
100
|
+
const body = buildPRBody(delta, "Architecture extension via Keel /adopt/extend flow");
|
|
101
|
+
const { data: pr } = await octokit.pulls.create({
|
|
102
|
+
owner: repo.owner,
|
|
103
|
+
repo: repo.name,
|
|
104
|
+
title,
|
|
105
|
+
head: branch,
|
|
106
|
+
base: baseBranch,
|
|
107
|
+
body,
|
|
108
|
+
});
|
|
109
|
+
return { url: pr.html_url, number: pr.number, branch };
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=pr.js.map
|
package/dist/pr.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr.js","sourceRoot":"","sources":["../src/pr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAmBxC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,GAAG,MAAM,EACnB,KAAK,EACL,KAAK,GAAG,KAAK,GACF;IACX,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAE7C,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9C,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,UAAU;QAChB,IAAI;KACL,CAAC,CAAC;IAEH,IAAI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"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@octokit/rest": "^21.0.0",
|
|
23
|
+
"zod": "^3.23.0",
|
|
24
|
+
"@keel_flow/core": "0.2.0",
|
|
25
|
+
"@keel_flow/runtime": "0.2.0",
|
|
26
|
+
"@keel_flow/schema": "0.2.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^25.9.1",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
31
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
32
|
+
"eslint": "^9.0.0",
|
|
33
|
+
"typescript": "^5.5.0",
|
|
34
|
+
"vitest": "^2.0.0"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"lint": "eslint src"
|
|
41
|
+
}
|
|
42
|
+
}
|