@controlvector/cv-agent 1.7.0 → 1.7.1
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/bundle.cjs +39 -1
- package/dist/bundle.cjs.map +2 -2
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +48 -0
- package/dist/commands/setup.js.map +1 -1
- package/package.json +1 -1
package/dist/bundle.cjs
CHANGED
|
@@ -3804,6 +3804,22 @@ async function runSetup() {
|
|
|
3804
3804
|
try {
|
|
3805
3805
|
const existingRemote = (0, import_node_child_process.execSync)('git remote get-url cv-hub 2>/dev/null || echo ""', { cwd, encoding: "utf8" }).trim();
|
|
3806
3806
|
if (!existingRemote) {
|
|
3807
|
+
try {
|
|
3808
|
+
const controller = new AbortController();
|
|
3809
|
+
const timeout = setTimeout(() => controller.abort(), 15e3);
|
|
3810
|
+
await fetch(`${hubUrl}/api/v1/user/repos`, {
|
|
3811
|
+
method: "POST",
|
|
3812
|
+
headers: {
|
|
3813
|
+
Authorization: `Bearer ${token}`,
|
|
3814
|
+
"Content-Type": "application/json"
|
|
3815
|
+
},
|
|
3816
|
+
body: JSON.stringify({ name: repoName, auto_init: false }),
|
|
3817
|
+
signal: controller.signal
|
|
3818
|
+
});
|
|
3819
|
+
clearTimeout(timeout);
|
|
3820
|
+
console.log(source_default.green(" \u2713") + ` Repo created on CV-Hub: ${username}/${repoName}`);
|
|
3821
|
+
} catch {
|
|
3822
|
+
}
|
|
3807
3823
|
(0, import_node_child_process.execSync)(`git remote add cv-hub ${remoteUrl}`, { cwd, stdio: "pipe" });
|
|
3808
3824
|
console.log(source_default.green(" \u2713") + ` Remote added: cv-hub \u2192 ${remoteUrl}`);
|
|
3809
3825
|
} else {
|
|
@@ -3811,6 +3827,28 @@ async function runSetup() {
|
|
|
3811
3827
|
}
|
|
3812
3828
|
} catch {
|
|
3813
3829
|
}
|
|
3830
|
+
try {
|
|
3831
|
+
(0, import_node_child_process.execSync)("git log --oneline -1", { cwd, stdio: "pipe" });
|
|
3832
|
+
const status = (0, import_node_child_process.execSync)("git status --porcelain", { cwd, encoding: "utf8" }).trim();
|
|
3833
|
+
if (status) {
|
|
3834
|
+
(0, import_node_child_process.execSync)("git add -A", { cwd, stdio: "pipe" });
|
|
3835
|
+
(0, import_node_child_process.execSync)('git commit -m "chore: cv-agent setup"', { cwd, stdio: "pipe" });
|
|
3836
|
+
console.log(source_default.green(" \u2713") + " Changes committed");
|
|
3837
|
+
}
|
|
3838
|
+
} catch {
|
|
3839
|
+
try {
|
|
3840
|
+
(0, import_node_child_process.execSync)("git add -A", { cwd, stdio: "pipe" });
|
|
3841
|
+
(0, import_node_child_process.execSync)('git commit -m "Initial commit via cv-agent"', { cwd, stdio: "pipe" });
|
|
3842
|
+
console.log(source_default.green(" \u2713") + " Initial commit created");
|
|
3843
|
+
} catch {
|
|
3844
|
+
}
|
|
3845
|
+
}
|
|
3846
|
+
try {
|
|
3847
|
+
(0, import_node_child_process.execSync)("git push -u cv-hub main 2>&1", { cwd, stdio: "pipe", timeout: 3e4 });
|
|
3848
|
+
console.log(source_default.green(" \u2713") + " Pushed to CV-Hub");
|
|
3849
|
+
} catch {
|
|
3850
|
+
console.log(source_default.gray(" (Push skipped \u2014 you can push later with: git push cv-hub main)"));
|
|
3851
|
+
}
|
|
3814
3852
|
}
|
|
3815
3853
|
console.log();
|
|
3816
3854
|
console.log(source_default.bold(" Setup Complete"));
|
|
@@ -6032,7 +6070,7 @@ function statusCommand() {
|
|
|
6032
6070
|
|
|
6033
6071
|
// src/index.ts
|
|
6034
6072
|
var program2 = new Command();
|
|
6035
|
-
program2.name("cva").description('CV-Hub Agent \u2014 bridges Claude Code with CV-Hub task dispatch.\n\nRun "cva setup" to get started.').version(true ? "1.7.
|
|
6073
|
+
program2.name("cva").description('CV-Hub Agent \u2014 bridges Claude Code with CV-Hub task dispatch.\n\nRun "cva setup" to get started.').version(true ? "1.7.1" : "1.6.0");
|
|
6036
6074
|
program2.addCommand(setupCommand());
|
|
6037
6075
|
program2.addCommand(agentCommand());
|
|
6038
6076
|
program2.addCommand(authCommand());
|