clawdock 0.2.8 → 0.3.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/dist/index.js +23 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -125,6 +125,15 @@ program.command("push [path]").description("Publish an agent bundle").option("--
|
|
|
125
125
|
formData.append("tarball", new Blob([tarball]), `${manifest.name}.tar.gz`);
|
|
126
126
|
formData.append("is_public", opts.private ? "false" : "true");
|
|
127
127
|
if (opts.changelog) formData.append("changelog", opts.changelog);
|
|
128
|
+
const readmeCandidates = ["README.md", "readme.md", "SOUL.md"];
|
|
129
|
+
for (const candidate of readmeCandidates) {
|
|
130
|
+
const readmePath = path.join(dir, candidate);
|
|
131
|
+
if (fs.existsSync(readmePath)) {
|
|
132
|
+
const content = fs.readFileSync(readmePath, "utf-8");
|
|
133
|
+
formData.append("readme", content);
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
128
137
|
try {
|
|
129
138
|
const result = await apiRequest("POST", "/v1/bundles/publish", formData, true);
|
|
130
139
|
console.log(`\u2705 Published ${result.owner}/${result.slug}@${result.version}`);
|
|
@@ -434,8 +443,20 @@ program.command("run <bundle>").description("Pull and run an agent locally").opt
|
|
|
434
443
|
const agentDir = path.join(os.homedir(), ".openclaw", "agents", agentName, "agent");
|
|
435
444
|
fs.mkdirSync(agentDir, { recursive: true });
|
|
436
445
|
const authProfilesPath = path.join(agentDir, "auth-profiles.json");
|
|
437
|
-
const
|
|
438
|
-
authProfiles
|
|
446
|
+
const profileKey = `${provider}:default`;
|
|
447
|
+
const authProfiles = {
|
|
448
|
+
version: 1,
|
|
449
|
+
profiles: {
|
|
450
|
+
[profileKey]: {
|
|
451
|
+
type: "token",
|
|
452
|
+
provider,
|
|
453
|
+
token: apiKey
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
lastGood: {
|
|
457
|
+
[provider]: profileKey
|
|
458
|
+
}
|
|
459
|
+
};
|
|
439
460
|
fs.writeFileSync(authProfilesPath, JSON.stringify(authProfiles, null, 2));
|
|
440
461
|
}
|
|
441
462
|
const introMessage = "Hello! I just pulled you from ClawDock. Introduce yourself.";
|