@anhlp/alp-runtime 0.0.0-stage → 0.0.1-beta.4
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 +202 -0
- package/NOTICE +7 -0
- package/README.md +6 -2
- package/dist/acp-transport.d.ts +130 -0
- package/dist/acp-transport.js +511 -0
- package/dist/antigravity-transport.d.ts +82 -0
- package/dist/antigravity-transport.js +619 -0
- package/dist/assignment-results.d.ts +18 -0
- package/dist/assignment-results.js +77 -0
- package/dist/attachments.d.ts +84 -0
- package/dist/attachments.js +213 -0
- package/dist/board-domain.d.ts +56 -0
- package/dist/board-domain.js +157 -0
- package/dist/board.d.ts +21 -0
- package/dist/board.js +69 -0
- package/dist/catalog.d.ts +31 -0
- package/dist/catalog.js +38 -0
- package/dist/claude-transport.d.ts +202 -0
- package/dist/claude-transport.js +817 -0
- package/dist/configure.d.ts +44 -0
- package/dist/configure.js +64 -0
- package/dist/contracts.d.ts +327 -0
- package/dist/contracts.js +16 -0
- package/dist/conversation.d.ts +45 -0
- package/dist/conversation.js +62 -0
- package/dist/events.d.ts +1 -0
- package/dist/events.js +0 -0
- package/dist/github.d.ts +10 -0
- package/dist/github.js +39 -0
- package/dist/handoff.d.ts +36 -0
- package/dist/handoff.js +73 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +87 -0
- package/dist/language.d.ts +41 -0
- package/dist/language.js +68 -0
- package/dist/live.d.ts +48 -0
- package/dist/live.js +45 -0
- package/dist/mailbox.d.ts +26 -0
- package/dist/mailbox.js +38 -0
- package/dist/mcp-tools.d.ts +115 -0
- package/dist/mcp-tools.js +71 -0
- package/dist/permission-path.d.ts +2 -0
- package/dist/permission-path.js +44 -0
- package/dist/process-info.d.ts +14 -0
- package/dist/process-info.js +32 -0
- package/dist/providers.d.ts +28 -0
- package/dist/providers.js +71 -0
- package/dist/recall.d.ts +42 -0
- package/dist/recall.js +60 -0
- package/dist/resolve.d.ts +121 -0
- package/dist/resolve.js +238 -0
- package/dist/runtime-context.d.ts +43 -0
- package/dist/runtime-context.js +61 -0
- package/dist/runtime.d.ts +11 -0
- package/dist/runtime.js +3976 -0
- package/dist/session-config.d.ts +2102 -0
- package/dist/session-config.js +205 -0
- package/dist/session-state.d.ts +166 -0
- package/dist/session-state.js +0 -0
- package/dist/tool-detail.d.ts +81 -0
- package/dist/tool-detail.js +332 -0
- package/dist/tool-results.d.ts +12 -0
- package/dist/tool-results.js +25 -0
- package/dist/tools.d.ts +719 -0
- package/dist/tools.js +396 -0
- package/dist/transport.d.ts +47 -0
- package/dist/transport.js +169 -0
- package/dist/usage.d.ts +25 -0
- package/dist/usage.js +60 -0
- package/dist/workspace.d.ts +101 -0
- package/dist/workspace.js +259 -0
- package/dist/worktree-domain.d.ts +89 -0
- package/dist/worktree-domain.js +199 -0
- package/package.json +262 -4
- package/src/acp-transport.ts +508 -0
- package/src/antigravity-transport.ts +667 -0
- package/src/assignment-results.ts +64 -0
- package/src/attachments.ts +254 -0
- package/src/board-domain.ts +185 -0
- package/src/board.ts +80 -0
- package/src/catalog.ts +32 -0
- package/src/claude-transport.ts +938 -0
- package/src/configure.ts +93 -0
- package/src/contracts.ts +318 -0
- package/src/conversation.ts +81 -0
- package/src/events.ts +1 -0
- package/src/github.ts +37 -0
- package/src/handoff.ts +86 -0
- package/src/index.ts +32 -0
- package/src/language.ts +102 -0
- package/src/live.ts +86 -0
- package/src/mailbox.ts +49 -0
- package/src/mcp-tools.ts +73 -0
- package/src/permission-path.ts +37 -0
- package/src/process-info.ts +40 -0
- package/src/providers.ts +84 -0
- package/src/recall.ts +85 -0
- package/src/resolve.ts +230 -0
- package/src/runtime-context.ts +49 -0
- package/src/runtime.ts +4691 -0
- package/src/session-config.ts +304 -0
- package/src/session-state.ts +164 -0
- package/src/tool-detail.ts +397 -0
- package/src/tool-results.ts +26 -0
- package/src/tools.ts +397 -0
- package/src/transport.ts +116 -0
- package/src/usage.ts +79 -0
- package/src/workspace.ts +318 -0
- package/src/worktree-domain.ts +220 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// packages/runtime/src/worktree-domain.ts
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { describeVerification, runVerify, verifyConfig } from "@anhlp/alp-core/verify";
|
|
5
|
+
import { recordVerification, loadTasks } from "@anhlp/alp-core/tasks";
|
|
6
|
+
import { checkoutFingerprint, checkoutKey, commitWorktree, linkModules, mergeWorktree, removeWorktree } from "./workspace.js";
|
|
7
|
+
import { writes } from "./catalog.js";
|
|
8
|
+
import { nativeEnvironment } from "./providers.js";
|
|
9
|
+
import { mainOf } from "./tools.js";
|
|
10
|
+
import { errorData, plainObject, toolResult } from "./tool-results.js";
|
|
11
|
+
function createWorktreeDomain({ options, leases, releaseResult, rootOf, lineage, runLog, runHooks, touchTask }) {
|
|
12
|
+
const merging = /* @__PURE__ */ new Map();
|
|
13
|
+
async function settleWorktree(parentId, parent, assignment) {
|
|
14
|
+
const worktree = assignment.worktree;
|
|
15
|
+
try {
|
|
16
|
+
const change = await commitWorktree(worktree, `alp: ${assignment.agent} assignment ${assignment.id}`);
|
|
17
|
+
if (!change.files.length) {
|
|
18
|
+
await removeWorktree(worktree, { deleteBranch: true });
|
|
19
|
+
await releaseResult(assignment.id);
|
|
20
|
+
return { branch: worktree.branch, files: [], note: "No changes; the worktree was removed" };
|
|
21
|
+
}
|
|
22
|
+
const described = { branch: worktree.branch, base: worktree.base, commit: change.commit, files: change.files, stat: change.stat };
|
|
23
|
+
if (parent.closed) {
|
|
24
|
+
await removeWorktree(worktree);
|
|
25
|
+
runLog(rootOf(parentId), { event: "worktree.kept", assignmentId: assignment.id, branch: worktree.branch });
|
|
26
|
+
return { ...described, note: "The requester closed; the change stays on the branch" };
|
|
27
|
+
}
|
|
28
|
+
parent.worktrees.set(assignment.id, { agent: assignment.agent, worktree, change, ...assignment.taskId ? { taskId: assignment.taskId } : {} });
|
|
29
|
+
return { ...described, next: "Apply it with alp_merge, or drop it with alp_discard" };
|
|
30
|
+
} catch (error) {
|
|
31
|
+
await removeWorktree(worktree).catch(() => {
|
|
32
|
+
});
|
|
33
|
+
return { branch: worktree.branch, error: errorData(error).message };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function worktreeTool(sessionId, session, args, action) {
|
|
37
|
+
if (!plainObject(args, ["assignmentId", "skipVerify"]) || typeof args.assignmentId !== "string" || args.skipVerify !== void 0 && (action !== "merge" || typeof args.skipVerify !== "string" || !args.skipVerify.trim())) {
|
|
38
|
+
return toolResult(false, { error: action === "merge" ? "assignmentId is required; skipVerify, when given, says why to merge without verification" : "assignmentId is required" });
|
|
39
|
+
}
|
|
40
|
+
const pending = session.worktrees.get(args.assignmentId);
|
|
41
|
+
if (!pending) {
|
|
42
|
+
return toolResult(false, { error: session.assignments.has(args.assignmentId) ? "The assignment is still running; wait for its result" : "No unmerged worktree change with that assignment id" });
|
|
43
|
+
}
|
|
44
|
+
const { worktree, change } = pending;
|
|
45
|
+
if (action === "discard") {
|
|
46
|
+
session.worktrees.delete(args.assignmentId);
|
|
47
|
+
await removeWorktree(worktree, { deleteBranch: true });
|
|
48
|
+
await releaseResult(args.assignmentId);
|
|
49
|
+
runLog(rootOf(sessionId), { event: "worktree.discarded", assignmentId: args.assignmentId, branch: worktree.branch });
|
|
50
|
+
return toolResult(true, { discarded: args.assignmentId, branch: worktree.branch });
|
|
51
|
+
}
|
|
52
|
+
if (!writes(session.mapping.mode)) return toolResult(false, { error: "Merging needs workspace-write or full-access" });
|
|
53
|
+
if ([...session.assignments.values()].some((assignment) => assignment.mode !== "read-only" && assignment.isolation === "shared")) {
|
|
54
|
+
return toolResult(false, { error: "A writer assignment is working in this checkout; merge after its result" });
|
|
55
|
+
}
|
|
56
|
+
session.worktrees.delete(args.assignmentId);
|
|
57
|
+
const checkout = await checkoutKey(session.mapping.workdir);
|
|
58
|
+
const holder = leases.get(checkout);
|
|
59
|
+
if (holder && !lineage(sessionId).includes(holder.assignment)) {
|
|
60
|
+
session.worktrees.set(args.assignmentId, pending);
|
|
61
|
+
return toolResult(false, { error: `${holder.agent} in another session is writing this checkout; merge after it finishes` });
|
|
62
|
+
}
|
|
63
|
+
const project = session.mapping.agent.projectRoot;
|
|
64
|
+
const rootId = rootOf(sessionId);
|
|
65
|
+
let config;
|
|
66
|
+
try {
|
|
67
|
+
config = await verifyConfig(project);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
session.worktrees.set(args.assignmentId, pending);
|
|
70
|
+
return toolResult(false, { error: errorData(error).message });
|
|
71
|
+
}
|
|
72
|
+
let verified;
|
|
73
|
+
if (config && args.skipVerify === void 0) {
|
|
74
|
+
const verification = verified = await verifyIn(project, worktreeDirectory(worktree, project), config);
|
|
75
|
+
noteVerification(rootId, project, pending.taskId, args.assignmentId, "worktree", verification);
|
|
76
|
+
if (!verification.passed) {
|
|
77
|
+
session.worktrees.set(args.assignmentId, { ...pending, verification });
|
|
78
|
+
return toolResult(false, {
|
|
79
|
+
assignmentId: args.assignmentId,
|
|
80
|
+
error: `${describeVerification(verification)} in the assignment's worktree; nothing was applied`,
|
|
81
|
+
verification: verificationResult(verification),
|
|
82
|
+
branch: worktree.branch,
|
|
83
|
+
next: verification.skipped ? "The check could not run, which says nothing about the change; call alp_merge again, or alp_merge it with skipVerify saying why" : `Delegate again with continueFrom "${args.assignmentId}"${pending.taskId ? ` and taskId ${pending.taskId}` : ""} to fix it in a worktree that starts from this change; or alp_discard it; or alp_merge it with skipVerify saying why`
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
} else if (config && pending.taskId) {
|
|
87
|
+
await recordVerification(project, pending.taskId, { passed: false, skipped: args.skipVerify }, session.mapping.agent.name).catch(() => {
|
|
88
|
+
});
|
|
89
|
+
runLog(rootId, { event: "verify", assignmentId: args.assignmentId, where: "worktree", skipped: args.skipVerify });
|
|
90
|
+
}
|
|
91
|
+
const refused = await runHooks(sessionId, session, "merge", { assignment: args.assignmentId, branch: worktree.branch }, pending.taskId);
|
|
92
|
+
if (refused) {
|
|
93
|
+
session.worktrees.set(args.assignmentId, pending);
|
|
94
|
+
return toolResult(false, { assignmentId: args.assignmentId, error: `A merge hook refused it; nothing was applied:
|
|
95
|
+
${refused}`, branch: worktree.branch, next: `Fix what it reports in a new assignment with continueFrom "${args.assignmentId}", or alp_discard it` });
|
|
96
|
+
}
|
|
97
|
+
let merged;
|
|
98
|
+
let moved = false;
|
|
99
|
+
try {
|
|
100
|
+
({ merged, moved } = await inCheckout(checkout, async () => {
|
|
101
|
+
const before = await checkoutFingerprint(worktree.checkout).catch(() => void 0);
|
|
102
|
+
return { merged: await mergeWorktree(worktree, change), moved: !worktree.fingerprint || before !== worktree.fingerprint };
|
|
103
|
+
}));
|
|
104
|
+
} catch (error) {
|
|
105
|
+
session.worktrees.set(args.assignmentId, pending);
|
|
106
|
+
return toolResult(false, { error: errorData(error).message, branch: worktree.branch, next: "Merge the branch yourself, or alp_discard it" });
|
|
107
|
+
}
|
|
108
|
+
await removeWorktree(worktree, { deleteBranch: merged.status !== "conflicts" });
|
|
109
|
+
if (merged.status !== "conflicts") await releaseResult(args.assignmentId);
|
|
110
|
+
runLog(rootId, { event: "worktree.merged", assignmentId: args.assignmentId, branch: worktree.branch, ...merged });
|
|
111
|
+
let checked;
|
|
112
|
+
if (config && args.skipVerify === void 0 && merged.status === "applied" && moved) {
|
|
113
|
+
checked = await inCheckout(checkout, () => verifyIn(project, session.mapping.workdir, config));
|
|
114
|
+
noteVerification(rootId, project, pending.taskId, args.assignmentId, "checkout", checked);
|
|
115
|
+
}
|
|
116
|
+
return toolResult(true, {
|
|
117
|
+
assignmentId: args.assignmentId,
|
|
118
|
+
...merged,
|
|
119
|
+
...merged.status === "conflicts" ? { branch: worktree.branch } : {},
|
|
120
|
+
...verified ? { verification: verificationResult(checked ?? verified), ...checked ? { verifiedIn: "your checkout, which changed since the assignment started" } : {} } : {},
|
|
121
|
+
...args.skipVerify !== void 0 && config ? { verification: { skipped: args.skipVerify } } : {},
|
|
122
|
+
next: merged.status === "conflicts" ? `Resolve the conflict markers in the listed files, then verify${config ? " with alp_verify" : ""}` : checked && !checked.passed ? `The change passed in its worktree but ${describeVerification(checked)} in your checkout, which changed meanwhile; fix it, then run alp_verify` : "Review the applied change; it is not committed"
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function inCheckout(checkout, work) {
|
|
126
|
+
const previous = merging.get(checkout) ?? Promise.resolve();
|
|
127
|
+
const attempt = previous.catch(() => {
|
|
128
|
+
}).then(work);
|
|
129
|
+
merging.set(checkout, attempt);
|
|
130
|
+
void attempt.finally(() => {
|
|
131
|
+
if (merging.get(checkout) === attempt) merging.delete(checkout);
|
|
132
|
+
}).catch(() => {
|
|
133
|
+
});
|
|
134
|
+
return attempt;
|
|
135
|
+
}
|
|
136
|
+
function worktreeDirectory(worktree, project) {
|
|
137
|
+
let real = project;
|
|
138
|
+
try {
|
|
139
|
+
real = realpathSync(project);
|
|
140
|
+
} catch {
|
|
141
|
+
}
|
|
142
|
+
return path.join(worktree.path, path.relative(worktree.checkout, real));
|
|
143
|
+
}
|
|
144
|
+
async function verifyIn(project, directory, config) {
|
|
145
|
+
const same = path.resolve(directory) === path.resolve(project);
|
|
146
|
+
const unlinkModules = same ? async () => {
|
|
147
|
+
} : await linkModules(project, directory).catch(() => async () => {
|
|
148
|
+
});
|
|
149
|
+
try {
|
|
150
|
+
return await runVerify(directory, config, { env: nativeEnvironment(options) });
|
|
151
|
+
} finally {
|
|
152
|
+
await unlinkModules();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function verificationResult(verification) {
|
|
156
|
+
const failed = verification.commands.find((command) => command.exitCode !== 0);
|
|
157
|
+
return {
|
|
158
|
+
passed: verification.passed,
|
|
159
|
+
...verification.skipped ? { skipped: verification.skipped } : {},
|
|
160
|
+
steps: verification.commands.map(({ step, command, exitCode, ms, timedOut, idle }) => ({ step, command, exitCode, ms, ...timedOut ? { timedOut } : {}, ...idle ? { idle } : {} })),
|
|
161
|
+
...failed?.output ? { output: failed.output } : {}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function noteVerification(rootId, project, taskId, assignmentId, where, verification) {
|
|
165
|
+
runLog(rootId, { event: "verify", ...assignmentId ? { assignmentId } : {}, ...taskId ? { taskId } : {}, where, passed: verification.passed, detail: describeVerification(verification) });
|
|
166
|
+
if (taskId) void recordVerification(project, taskId, { ...verification, where }, "alpd").then(() => touchTask(rootId, taskId), () => {
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function continuedBrief(from, continued) {
|
|
170
|
+
const failed = continued.verification?.commands.find((command) => command.exitCode !== 0);
|
|
171
|
+
return `Your worktree starts from the change of ${continued.agent}'s assignment ${from}, committed on your branch (${continued.change.files.length} files: ${continued.change.files.slice(0, 20).join(", ")}). Build on it rather than starting over.` + (continued.verification && !continued.verification.passed ? ` The project's checks failed on it: ${describeVerification(continued.verification)}, running \`${failed?.command}\`. The end of its output:
|
|
172
|
+
${failed?.output.slice(-1500) ?? ""}` : "");
|
|
173
|
+
}
|
|
174
|
+
async function verifyTool(sessionId, session, args) {
|
|
175
|
+
if (!plainObject(args, ["taskId"]) || args.taskId !== void 0 && typeof args.taskId !== "string") return toolResult(false, { error: "alp_verify takes only taskId" });
|
|
176
|
+
if (args.taskId !== void 0 && (session.parent || session.mapping.agent.name !== mainOf(session.mapping))) return toolResult(false, { error: "Only main records a verification on a task; call alp_verify without taskId" });
|
|
177
|
+
const project = session.mapping.agent.projectRoot;
|
|
178
|
+
let config;
|
|
179
|
+
try {
|
|
180
|
+
config = await verifyConfig(project);
|
|
181
|
+
} catch (error) {
|
|
182
|
+
return toolResult(false, { error: errorData(error).message });
|
|
183
|
+
}
|
|
184
|
+
if (!config) return toolResult(false, { error: "This project has no verify commands (verify in .alp/settings.json); run its checks yourself" });
|
|
185
|
+
if (args.taskId !== void 0) {
|
|
186
|
+
const task = (await loadTasks(project)).tasks.find((entry) => entry.id === args.taskId);
|
|
187
|
+
if (!task) return toolResult(false, { error: `No task ${args.taskId}` });
|
|
188
|
+
if (task.status === "closed") return toolResult(false, { error: `${args.taskId} is closed` });
|
|
189
|
+
}
|
|
190
|
+
const checkout = await checkoutKey(session.mapping.workdir);
|
|
191
|
+
const verification = await inCheckout(checkout, () => verifyIn(project, session.mapping.workdir, config));
|
|
192
|
+
noteVerification(rootOf(sessionId), project, args.taskId, void 0, "checkout", verification);
|
|
193
|
+
return toolResult(true, { ...verificationResult(verification), summary: describeVerification(verification), ...args.taskId ? { recordedOn: args.taskId } : {} });
|
|
194
|
+
}
|
|
195
|
+
return { settleWorktree, worktreeTool, inCheckout, verifyIn, verificationResult, noteVerification, continuedBrief, verifyTool };
|
|
196
|
+
}
|
|
197
|
+
export {
|
|
198
|
+
createWorktreeDomain
|
|
199
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,264 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anhlp/alp-runtime",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1-beta.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "ALP runtime module",
|
|
6
|
+
"files": [
|
|
7
|
+
"src",
|
|
8
|
+
"dist",
|
|
9
|
+
"NOTICE"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
"./acp-transport": {
|
|
13
|
+
"alp-source": {
|
|
14
|
+
"types": "./src/acp-transport.ts",
|
|
15
|
+
"default": "./src/acp-transport.ts"
|
|
16
|
+
},
|
|
17
|
+
"types": "./dist/acp-transport.d.ts",
|
|
18
|
+
"default": "./dist/acp-transport.js"
|
|
19
|
+
},
|
|
20
|
+
"./antigravity-transport": {
|
|
21
|
+
"alp-source": {
|
|
22
|
+
"types": "./src/antigravity-transport.ts",
|
|
23
|
+
"default": "./src/antigravity-transport.ts"
|
|
24
|
+
},
|
|
25
|
+
"types": "./dist/antigravity-transport.d.ts",
|
|
26
|
+
"default": "./dist/antigravity-transport.js"
|
|
27
|
+
},
|
|
28
|
+
"./attachments": {
|
|
29
|
+
"alp-source": {
|
|
30
|
+
"types": "./src/attachments.ts",
|
|
31
|
+
"default": "./src/attachments.ts"
|
|
32
|
+
},
|
|
33
|
+
"types": "./dist/attachments.d.ts",
|
|
34
|
+
"default": "./dist/attachments.js"
|
|
35
|
+
},
|
|
36
|
+
"./board": {
|
|
37
|
+
"alp-source": {
|
|
38
|
+
"types": "./src/board.ts",
|
|
39
|
+
"default": "./src/board.ts"
|
|
40
|
+
},
|
|
41
|
+
"types": "./dist/board.d.ts",
|
|
42
|
+
"default": "./dist/board.js"
|
|
43
|
+
},
|
|
44
|
+
"./catalog": {
|
|
45
|
+
"alp-source": {
|
|
46
|
+
"types": "./src/catalog.ts",
|
|
47
|
+
"default": "./src/catalog.ts"
|
|
48
|
+
},
|
|
49
|
+
"types": "./dist/catalog.d.ts",
|
|
50
|
+
"default": "./dist/catalog.js"
|
|
51
|
+
},
|
|
52
|
+
"./claude-transport": {
|
|
53
|
+
"alp-source": {
|
|
54
|
+
"types": "./src/claude-transport.ts",
|
|
55
|
+
"default": "./src/claude-transport.ts"
|
|
56
|
+
},
|
|
57
|
+
"types": "./dist/claude-transport.d.ts",
|
|
58
|
+
"default": "./dist/claude-transport.js"
|
|
59
|
+
},
|
|
60
|
+
"./contracts": {
|
|
61
|
+
"alp-source": {
|
|
62
|
+
"types": "./src/contracts.ts",
|
|
63
|
+
"default": "./src/contracts.ts"
|
|
64
|
+
},
|
|
65
|
+
"types": "./dist/contracts.d.ts",
|
|
66
|
+
"default": "./dist/contracts.js"
|
|
67
|
+
},
|
|
68
|
+
"./events": {
|
|
69
|
+
"alp-source": {
|
|
70
|
+
"types": "./src/events.ts",
|
|
71
|
+
"default": "./src/events.ts"
|
|
72
|
+
},
|
|
73
|
+
"types": "./dist/events.d.ts",
|
|
74
|
+
"default": "./dist/events.js"
|
|
75
|
+
},
|
|
76
|
+
"./github": {
|
|
77
|
+
"alp-source": {
|
|
78
|
+
"types": "./src/github.ts",
|
|
79
|
+
"default": "./src/github.ts"
|
|
80
|
+
},
|
|
81
|
+
"types": "./dist/github.d.ts",
|
|
82
|
+
"default": "./dist/github.js"
|
|
83
|
+
},
|
|
84
|
+
"./handoff": {
|
|
85
|
+
"alp-source": {
|
|
86
|
+
"types": "./src/handoff.ts",
|
|
87
|
+
"default": "./src/handoff.ts"
|
|
88
|
+
},
|
|
89
|
+
"types": "./dist/handoff.d.ts",
|
|
90
|
+
"default": "./dist/handoff.js"
|
|
91
|
+
},
|
|
92
|
+
"./index": {
|
|
93
|
+
"alp-source": {
|
|
94
|
+
"types": "./src/index.ts",
|
|
95
|
+
"default": "./src/index.ts"
|
|
96
|
+
},
|
|
97
|
+
"types": "./dist/index.d.ts",
|
|
98
|
+
"default": "./dist/index.js"
|
|
99
|
+
},
|
|
100
|
+
".": {
|
|
101
|
+
"alp-source": {
|
|
102
|
+
"types": "./src/index.ts",
|
|
103
|
+
"default": "./src/index.ts"
|
|
104
|
+
},
|
|
105
|
+
"types": "./dist/index.d.ts",
|
|
106
|
+
"default": "./dist/index.js"
|
|
107
|
+
},
|
|
108
|
+
"./language": {
|
|
109
|
+
"alp-source": {
|
|
110
|
+
"types": "./src/language.ts",
|
|
111
|
+
"default": "./src/language.ts"
|
|
112
|
+
},
|
|
113
|
+
"types": "./dist/language.d.ts",
|
|
114
|
+
"default": "./dist/language.js"
|
|
115
|
+
},
|
|
116
|
+
"./live": {
|
|
117
|
+
"alp-source": {
|
|
118
|
+
"types": "./src/live.ts",
|
|
119
|
+
"default": "./src/live.ts"
|
|
120
|
+
},
|
|
121
|
+
"types": "./dist/live.d.ts",
|
|
122
|
+
"default": "./dist/live.js"
|
|
123
|
+
},
|
|
124
|
+
"./mailbox": {
|
|
125
|
+
"alp-source": {
|
|
126
|
+
"types": "./src/mailbox.ts",
|
|
127
|
+
"default": "./src/mailbox.ts"
|
|
128
|
+
},
|
|
129
|
+
"types": "./dist/mailbox.d.ts",
|
|
130
|
+
"default": "./dist/mailbox.js"
|
|
131
|
+
},
|
|
132
|
+
"./mcp-tools": {
|
|
133
|
+
"alp-source": {
|
|
134
|
+
"types": "./src/mcp-tools.ts",
|
|
135
|
+
"default": "./src/mcp-tools.ts"
|
|
136
|
+
},
|
|
137
|
+
"types": "./dist/mcp-tools.d.ts",
|
|
138
|
+
"default": "./dist/mcp-tools.js"
|
|
139
|
+
},
|
|
140
|
+
"./process-info": {
|
|
141
|
+
"alp-source": {
|
|
142
|
+
"types": "./src/process-info.ts",
|
|
143
|
+
"default": "./src/process-info.ts"
|
|
144
|
+
},
|
|
145
|
+
"types": "./dist/process-info.d.ts",
|
|
146
|
+
"default": "./dist/process-info.js"
|
|
147
|
+
},
|
|
148
|
+
"./providers": {
|
|
149
|
+
"alp-source": {
|
|
150
|
+
"types": "./src/providers.ts",
|
|
151
|
+
"default": "./src/providers.ts"
|
|
152
|
+
},
|
|
153
|
+
"types": "./dist/providers.d.ts",
|
|
154
|
+
"default": "./dist/providers.js"
|
|
155
|
+
},
|
|
156
|
+
"./recall": {
|
|
157
|
+
"alp-source": {
|
|
158
|
+
"types": "./src/recall.ts",
|
|
159
|
+
"default": "./src/recall.ts"
|
|
160
|
+
},
|
|
161
|
+
"types": "./dist/recall.d.ts",
|
|
162
|
+
"default": "./dist/recall.js"
|
|
163
|
+
},
|
|
164
|
+
"./resolve": {
|
|
165
|
+
"alp-source": {
|
|
166
|
+
"types": "./src/resolve.ts",
|
|
167
|
+
"default": "./src/resolve.ts"
|
|
168
|
+
},
|
|
169
|
+
"types": "./dist/resolve.d.ts",
|
|
170
|
+
"default": "./dist/resolve.js"
|
|
171
|
+
},
|
|
172
|
+
"./runtime-context": {
|
|
173
|
+
"alp-source": {
|
|
174
|
+
"types": "./src/runtime-context.ts",
|
|
175
|
+
"default": "./src/runtime-context.ts"
|
|
176
|
+
},
|
|
177
|
+
"types": "./dist/runtime-context.d.ts",
|
|
178
|
+
"default": "./dist/runtime-context.js"
|
|
179
|
+
},
|
|
180
|
+
"./runtime": {
|
|
181
|
+
"alp-source": {
|
|
182
|
+
"types": "./src/runtime.ts",
|
|
183
|
+
"default": "./src/runtime.ts"
|
|
184
|
+
},
|
|
185
|
+
"types": "./dist/runtime.d.ts",
|
|
186
|
+
"default": "./dist/runtime.js"
|
|
187
|
+
},
|
|
188
|
+
"./session-config": {
|
|
189
|
+
"alp-source": {
|
|
190
|
+
"types": "./src/session-config.ts",
|
|
191
|
+
"default": "./src/session-config.ts"
|
|
192
|
+
},
|
|
193
|
+
"types": "./dist/session-config.d.ts",
|
|
194
|
+
"default": "./dist/session-config.js"
|
|
195
|
+
},
|
|
196
|
+
"./tools": {
|
|
197
|
+
"alp-source": {
|
|
198
|
+
"types": "./src/tools.ts",
|
|
199
|
+
"default": "./src/tools.ts"
|
|
200
|
+
},
|
|
201
|
+
"types": "./dist/tools.d.ts",
|
|
202
|
+
"default": "./dist/tools.js"
|
|
203
|
+
},
|
|
204
|
+
"./transport": {
|
|
205
|
+
"alp-source": {
|
|
206
|
+
"types": "./src/transport.ts",
|
|
207
|
+
"default": "./src/transport.ts"
|
|
208
|
+
},
|
|
209
|
+
"types": "./dist/transport.d.ts",
|
|
210
|
+
"default": "./dist/transport.js"
|
|
211
|
+
},
|
|
212
|
+
"./usage": {
|
|
213
|
+
"alp-source": {
|
|
214
|
+
"types": "./src/usage.ts",
|
|
215
|
+
"default": "./src/usage.ts"
|
|
216
|
+
},
|
|
217
|
+
"types": "./dist/usage.d.ts",
|
|
218
|
+
"default": "./dist/usage.js"
|
|
219
|
+
},
|
|
220
|
+
"./workspace": {
|
|
221
|
+
"alp-source": {
|
|
222
|
+
"types": "./src/workspace.ts",
|
|
223
|
+
"default": "./src/workspace.ts"
|
|
224
|
+
},
|
|
225
|
+
"types": "./dist/workspace.d.ts",
|
|
226
|
+
"default": "./dist/workspace.js"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"engines": {
|
|
230
|
+
"node": ">=22.12"
|
|
231
|
+
},
|
|
232
|
+
"dependencies": {
|
|
233
|
+
"@anhlp/alp-core": "0.0.1-beta.4",
|
|
234
|
+
"@anhlp/alp-protocol": "0.0.1-beta.4",
|
|
235
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.292",
|
|
236
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
237
|
+
"@agentclientprotocol/sdk": "1.7.0",
|
|
238
|
+
"smol-toml": "1.9.0",
|
|
239
|
+
"zod": "4.4.3"
|
|
240
|
+
},
|
|
241
|
+
"scripts": {
|
|
242
|
+
"build": "node ../../scripts/build-workspace.mjs runtime",
|
|
243
|
+
"test": "node ../../scripts/test-package.mjs runtime",
|
|
244
|
+
"prepack": "npm run build"
|
|
245
|
+
},
|
|
246
|
+
"publishConfig": {
|
|
247
|
+
"access": "public",
|
|
248
|
+
"registry": "https://registry.npmjs.org/",
|
|
249
|
+
"tag": "beta"
|
|
250
|
+
},
|
|
251
|
+
"license": "Apache-2.0",
|
|
252
|
+
"repository": {
|
|
253
|
+
"type": "git",
|
|
254
|
+
"url": "git+https://github.com/phucanh08/alp.git",
|
|
255
|
+
"directory": "packages/runtime"
|
|
256
|
+
},
|
|
257
|
+
"homepage": "https://github.com/phucanh08/alp/tree/main/packages/runtime#readme",
|
|
258
|
+
"bugs": {
|
|
259
|
+
"url": "https://github.com/phucanh08/alp/issues"
|
|
260
|
+
},
|
|
261
|
+
"devDependencies": {
|
|
262
|
+
"ajv": "8.20.0"
|
|
263
|
+
}
|
|
264
|
+
}
|