@vemdev/cli 0.1.60 → 0.1.61
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/dist/{chunk-IPXCFYL6.js → chunk-YB3QAY53.js} +2 -1
- package/dist/{dist-CJJFNOXY.js → dist-B6M6M6F2.js} +2 -2
- package/dist/index.js +89 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-IPXCFYL6.js.map → chunk-YB3QAY53.js.map} +0 -0
- /package/dist/{dist-CJJFNOXY.js.map → dist-B6M6M6F2.js.map} +0 -0
|
@@ -17404,6 +17404,7 @@ export {
|
|
|
17404
17404
|
encryptProviderKey,
|
|
17405
17405
|
decryptProviderKey,
|
|
17406
17406
|
maskProviderKey,
|
|
17407
|
+
VemReviewSchema,
|
|
17407
17408
|
VEM_DIR,
|
|
17408
17409
|
TASKS_DIR,
|
|
17409
17410
|
CYCLES_DIR,
|
|
@@ -17461,4 +17462,4 @@ export {
|
|
|
17461
17462
|
WebhookService,
|
|
17462
17463
|
WorkflowGuideService
|
|
17463
17464
|
};
|
|
17464
|
-
//# sourceMappingURL=chunk-
|
|
17465
|
+
//# sourceMappingURL=chunk-YB3QAY53.js.map
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
validateEnv,
|
|
59
59
|
validatePasswordStrength,
|
|
60
60
|
validateWebhookUrl
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-YB3QAY53.js";
|
|
62
62
|
import {
|
|
63
63
|
computeCopilotSessionStats,
|
|
64
64
|
getCopilotSessionsDir,
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
validatePasswordStrength,
|
|
148
148
|
validateWebhookUrl
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=dist-
|
|
150
|
+
//# sourceMappingURL=dist-B6M6M6F2.js.map
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
SyncService,
|
|
12
12
|
TaskService,
|
|
13
13
|
UsageMetricsService,
|
|
14
|
+
VemReviewSchema,
|
|
14
15
|
WorkflowGuideService,
|
|
15
16
|
applyVemUpdate,
|
|
16
17
|
computeSessionStats,
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
isVemInitialized,
|
|
24
25
|
listAllAgentSessions,
|
|
25
26
|
parseVemUpdateBlock
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YB3QAY53.js";
|
|
27
28
|
import {
|
|
28
29
|
readCopilotSessionDetail
|
|
29
30
|
} from "./chunk-PO3WNPAJ.js";
|
|
@@ -1163,7 +1164,7 @@ var syncParsedTaskUpdatesToRemote = async (configService, update, result, active
|
|
|
1163
1164
|
const changelogEntry = Array.isArray(update.changelog_append) ? update.changelog_append.join("\n").trim() || null : update.changelog_append?.trim() ?? null;
|
|
1164
1165
|
await updateTaskMetaRemote(configService, activeTask, {
|
|
1165
1166
|
raw_vem_update: JSON.parse(JSON.stringify(update)),
|
|
1166
|
-
cli_version: "0.1.
|
|
1167
|
+
cli_version: "0.1.61",
|
|
1167
1168
|
...changelogEntry ? { changelog_entry: changelogEntry } : {}
|
|
1168
1169
|
});
|
|
1169
1170
|
}
|
|
@@ -1220,7 +1221,7 @@ var syncParsedTaskUpdatesToRemote = async (configService, update, result, active
|
|
|
1220
1221
|
...patch.subtask_order !== void 0 ? { subtask_order: patch.subtask_order } : {},
|
|
1221
1222
|
...patch.due_at !== void 0 ? { due_at: patch.due_at } : {},
|
|
1222
1223
|
raw_vem_update: JSON.parse(JSON.stringify(update)),
|
|
1223
|
-
cli_version: "0.1.
|
|
1224
|
+
cli_version: "0.1.61",
|
|
1224
1225
|
// Task memory fields — stored in task_memory_entries on the API side.
|
|
1225
1226
|
...buildRemoteTaskContextPatch(patch, updatedTask) ?? {},
|
|
1226
1227
|
changelog_entry: changelogReasoning ?? null
|
|
@@ -3403,7 +3404,7 @@ function registerMaintenanceCommands(program2) {
|
|
|
3403
3404
|
});
|
|
3404
3405
|
program2.command("diff").description("Show differences between local and cloud state").option("--detailed", "Show detailed content diffs").option("--json", "Output as JSON").action(async (options) => {
|
|
3405
3406
|
try {
|
|
3406
|
-
const { DiffService } = await import("./dist-
|
|
3407
|
+
const { DiffService } = await import("./dist-B6M6M6F2.js");
|
|
3407
3408
|
const diffService = new DiffService();
|
|
3408
3409
|
const result = await diffService.compareWithLastPush();
|
|
3409
3410
|
if (options.json) {
|
|
@@ -3461,7 +3462,7 @@ ${"\u2500".repeat(50)}`));
|
|
|
3461
3462
|
});
|
|
3462
3463
|
program2.command("doctor").description("Run health checks on VEM setup").option("--json", "Output as JSON").action(async (options) => {
|
|
3463
3464
|
try {
|
|
3464
|
-
const { DoctorService } = await import("./dist-
|
|
3465
|
+
const { DoctorService } = await import("./dist-B6M6M6F2.js");
|
|
3465
3466
|
const doctorService = new DoctorService();
|
|
3466
3467
|
const results = await doctorService.runAllChecks();
|
|
3467
3468
|
if (options.json) {
|
|
@@ -6750,6 +6751,87 @@ Snapshot Contents:`));
|
|
|
6750
6751
|
process.exitCode = 1;
|
|
6751
6752
|
}
|
|
6752
6753
|
});
|
|
6754
|
+
const reviewCmd = program2.command("review").description("Manage cycle validation reviews");
|
|
6755
|
+
reviewCmd.command("submit").description("Submit a vem_review block to the API from a cloud sandbox run").option("-f, --file <path>", "Path to a file containing the vem_review JSON block").action(async (options) => {
|
|
6756
|
+
await trackCommandUsage("review submit");
|
|
6757
|
+
try {
|
|
6758
|
+
let input = "";
|
|
6759
|
+
if (options.file) {
|
|
6760
|
+
input = await readFile6(options.file, "utf-8");
|
|
6761
|
+
} else if (!process.stdin.isTTY) {
|
|
6762
|
+
input = await readStdin();
|
|
6763
|
+
} else {
|
|
6764
|
+
console.error(
|
|
6765
|
+
chalk17.red(
|
|
6766
|
+
"Provide a vem_review JSON block via --file or pipe it into stdin."
|
|
6767
|
+
)
|
|
6768
|
+
);
|
|
6769
|
+
process.exitCode = 1;
|
|
6770
|
+
return;
|
|
6771
|
+
}
|
|
6772
|
+
const JSON_FENCE = /```(?:vem_review|json)\s*([\s\S]*?)```/i;
|
|
6773
|
+
const fenceMatch = JSON_FENCE.exec(input);
|
|
6774
|
+
const rawJson = fenceMatch ? fenceMatch[1] : input;
|
|
6775
|
+
let parsedJson;
|
|
6776
|
+
try {
|
|
6777
|
+
parsedJson = JSON.parse(rawJson.trim());
|
|
6778
|
+
} catch {
|
|
6779
|
+
console.error(chalk17.red("\n\u2716 Review Submit Failed: input is not valid JSON\n"));
|
|
6780
|
+
process.exitCode = 1;
|
|
6781
|
+
return;
|
|
6782
|
+
}
|
|
6783
|
+
const result = VemReviewSchema.safeParse(parsedJson);
|
|
6784
|
+
if (!result.success) {
|
|
6785
|
+
console.error(
|
|
6786
|
+
chalk17.red("\n\u2716 Review Submit Failed: invalid vem_review payload"),
|
|
6787
|
+
result.error.flatten()
|
|
6788
|
+
);
|
|
6789
|
+
process.exitCode = 1;
|
|
6790
|
+
return;
|
|
6791
|
+
}
|
|
6792
|
+
const sandboxRunId = process.env.VEM_TASK_RUN_ID;
|
|
6793
|
+
const sandboxApiKey = process.env.VEM_API_KEY;
|
|
6794
|
+
const sandboxApiUrl = "https://api.vem.dev";
|
|
6795
|
+
if (!sandboxRunId || !sandboxApiKey) {
|
|
6796
|
+
console.error(
|
|
6797
|
+
chalk17.red(
|
|
6798
|
+
"\n\u2716 Review Submit Failed: VEM_TASK_RUN_ID and VEM_API_KEY must be set.\n This command is intended for use inside a cloud sandbox container.\n"
|
|
6799
|
+
)
|
|
6800
|
+
);
|
|
6801
|
+
process.exitCode = 1;
|
|
6802
|
+
return;
|
|
6803
|
+
}
|
|
6804
|
+
const res = await fetch(
|
|
6805
|
+
`${sandboxApiUrl}/task-runs/${sandboxRunId}/vem-review-structured`,
|
|
6806
|
+
{
|
|
6807
|
+
method: "POST",
|
|
6808
|
+
headers: {
|
|
6809
|
+
Authorization: `Bearer ${sandboxApiKey}`,
|
|
6810
|
+
"Content-Type": "application/json"
|
|
6811
|
+
},
|
|
6812
|
+
body: JSON.stringify({ review: result.data })
|
|
6813
|
+
}
|
|
6814
|
+
);
|
|
6815
|
+
if (!res.ok) {
|
|
6816
|
+
const errText = await res.text().catch(() => "");
|
|
6817
|
+
console.error(
|
|
6818
|
+
chalk17.red("[vem review submit] API submission failed:"),
|
|
6819
|
+
res.status,
|
|
6820
|
+
errText
|
|
6821
|
+
);
|
|
6822
|
+
process.exitCode = 1;
|
|
6823
|
+
} else {
|
|
6824
|
+
console.log(chalk17.green("\n\u2714 vem review submitted to API\n"));
|
|
6825
|
+
}
|
|
6826
|
+
} catch (error) {
|
|
6827
|
+
if (error instanceof Error) {
|
|
6828
|
+
console.error(chalk17.red("\n\u2716 Review Submit Failed:"), error.message);
|
|
6829
|
+
} else {
|
|
6830
|
+
console.error(chalk17.red("\n\u2716 Review Submit Failed:"), String(error));
|
|
6831
|
+
}
|
|
6832
|
+
process.exitCode = 1;
|
|
6833
|
+
}
|
|
6834
|
+
});
|
|
6753
6835
|
program2.command("queue").description("Manage offline snapshot queue").option("--list", "List queued snapshots", true).option("--retry", "Retry pushing all queued snapshots").option("--clear", "Clear the queue").action(async (options) => {
|
|
6754
6836
|
try {
|
|
6755
6837
|
const configService = new ConfigService();
|
|
@@ -9183,11 +9265,11 @@ async function initServerMonitoring(config) {
|
|
|
9183
9265
|
await initServerMonitoring({
|
|
9184
9266
|
dsn: "https://ed007f2c213d0aa07c1be256ca51750c@o4510863861612544.ingest.de.sentry.io/4510863921774672",
|
|
9185
9267
|
environment: process.env.NODE_ENV || "production",
|
|
9186
|
-
release: "0.1.
|
|
9268
|
+
release: "0.1.61",
|
|
9187
9269
|
serviceName: "cli"
|
|
9188
9270
|
});
|
|
9189
9271
|
var program = new Command();
|
|
9190
|
-
program.name("vem").description("vem Project Memory CLI").version("0.1.
|
|
9272
|
+
program.name("vem").description("vem Project Memory CLI").version("0.1.61").addHelpText(
|
|
9191
9273
|
"after",
|
|
9192
9274
|
`
|
|
9193
9275
|
${chalk19.bold("\n\u26A1 Power Workflows:")}
|