@llamaventures/cli 1.25.0 → 2.0.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/AGENT_BRIEFING.md +125 -336
- package/CHANGELOG.md +32 -0
- package/README.md +116 -213
- package/README.zh-CN.md +112 -205
- package/bin/llama-mcp.mjs +209 -1992
- package/bin/llama.mjs +388 -3609
- package/contracts/core-api.json +4 -4
- package/contracts/required-operations.json +27 -356
- package/lib/build-manifest.json +4 -4
- package/lib/client.mjs +12 -5
- package/lib/deal-actions.mjs +102 -0
- package/package.json +3 -3
- package/contracts/investment-workflow-v2.md +0 -19
- package/lib/workflow-audit.mjs +0 -13
- package/lib/workflow-remediation.mjs +0 -45
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export const WORKFLOW_REMEDIATION_PATH = "/api/admin/workflow-remediation";
|
|
2
|
-
export const WORKFLOW_REMEDIATION_GUARDS = [
|
|
3
|
-
"intake.founder_identity",
|
|
4
|
-
"intake.reason_why",
|
|
5
|
-
];
|
|
6
|
-
|
|
7
|
-
export function workflowRemediationBody(flags, requestId) {
|
|
8
|
-
const dealId = typeof flags.deal === "string" ? flags.deal.trim() : "";
|
|
9
|
-
const rawGuards = typeof flags.guard === "string" ? flags.guard : "";
|
|
10
|
-
const guardKeys = [...new Set(
|
|
11
|
-
rawGuards.split(",").map((value) => value.trim()).filter(Boolean),
|
|
12
|
-
)];
|
|
13
|
-
if (!dealId || guardKeys.length < 1 || guardKeys.length > 2 ||
|
|
14
|
-
guardKeys.some((key) => !WORKFLOW_REMEDIATION_GUARDS.includes(key))) {
|
|
15
|
-
throw new Error(
|
|
16
|
-
"Usage: llama admin workflow remediate --deal <uuid> " +
|
|
17
|
-
"--guard intake.reason_why[,intake.founder_identity] " +
|
|
18
|
-
"[--apply --expected-revision <n> --reason \"...\"]",
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (flags.apply !== true) {
|
|
23
|
-
if (flags["expected-revision"] !== undefined || flags.reason !== undefined) {
|
|
24
|
-
throw new Error("--expected-revision and --reason require --apply");
|
|
25
|
-
}
|
|
26
|
-
return { action: "preview", dealId, guardKeys };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const expectedRevision = Number(flags["expected-revision"]);
|
|
30
|
-
const reason = typeof flags.reason === "string" ? flags.reason.trim() : "";
|
|
31
|
-
if (!Number.isInteger(expectedRevision) || expectedRevision < 0 || !reason) {
|
|
32
|
-
throw new Error("--apply requires --expected-revision <n> from preview and --reason \"...\"");
|
|
33
|
-
}
|
|
34
|
-
if (typeof requestId !== "string" || !requestId) {
|
|
35
|
-
throw new Error("workflow remediation apply requires a request ID");
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
action: "apply",
|
|
39
|
-
dealId,
|
|
40
|
-
guardKeys,
|
|
41
|
-
expectedRevision,
|
|
42
|
-
requestId,
|
|
43
|
-
reason,
|
|
44
|
-
};
|
|
45
|
-
}
|