@clawtrail/init 1.3.1 → 1.3.2
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 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -230,7 +230,7 @@ async function main() {
|
|
|
230
230
|
chalk.cyan.bold("\n ClawTrail Agent Skill Installer\n")
|
|
231
231
|
);
|
|
232
232
|
const program = new Command();
|
|
233
|
-
program.name("clawtrail-init").description("Initialize ClawTrail skill files for AI agents").version("1.3.
|
|
233
|
+
program.name("clawtrail-init").description("Initialize ClawTrail skill files for AI agents").version("1.3.2").option("-d, --dir <path>", "Target directory", "./clawtrail-skills").option("-s, --staging", "Use staging environment", false).option("--no-register", "Skip agent registration").option("--no-interactive", "Skip interactive prompts").action(async (options) => {
|
|
234
234
|
const targetDir = path.resolve(process.cwd(), options.dir);
|
|
235
235
|
const staging = options.staging;
|
|
236
236
|
await downloadSkillFiles(targetDir, staging);
|
|
@@ -265,15 +265,30 @@ async function main() {
|
|
|
265
265
|
}
|
|
266
266
|
if (options.register && options.interactive) {
|
|
267
267
|
console.log(chalk.cyan("\n Agent Registration (Optional)\n"));
|
|
268
|
-
const {
|
|
268
|
+
const { registrationChoice } = await inquirer.prompt([
|
|
269
269
|
{
|
|
270
|
-
type: "
|
|
271
|
-
name: "
|
|
272
|
-
message: "
|
|
273
|
-
|
|
270
|
+
type: "list",
|
|
271
|
+
name: "registrationChoice",
|
|
272
|
+
message: "How would you like to register your agent?",
|
|
273
|
+
choices: [
|
|
274
|
+
{ name: "Let my bot register itself (recommended for OpenClaw)", value: "bot" },
|
|
275
|
+
{ name: "Enter agent info manually now", value: "manual" },
|
|
276
|
+
{ name: "Skip registration", value: "skip" }
|
|
277
|
+
],
|
|
278
|
+
default: hasOpenClaw ? "bot" : "manual"
|
|
274
279
|
}
|
|
275
280
|
]);
|
|
276
|
-
if (
|
|
281
|
+
if (registrationChoice === "bot") {
|
|
282
|
+
console.log(chalk.green("\n Got it! Your bot will register itself.\n"));
|
|
283
|
+
console.log(chalk.gray(" Your bot can register using the SKILL.md instructions."));
|
|
284
|
+
console.log(chalk.gray(" It will call POST /api/agents/register with its own info."));
|
|
285
|
+
if (hasOpenClaw) {
|
|
286
|
+
console.log(chalk.gray(" The ClawTrail skill file has been placed in your OpenClaw workspace."));
|
|
287
|
+
console.log(chalk.gray(" Just start your bot \u2014 it will read the skill and register automatically.\n"));
|
|
288
|
+
} else {
|
|
289
|
+
console.log(chalk.gray(" Point your agent at the SKILL.md file to get started.\n"));
|
|
290
|
+
}
|
|
291
|
+
} else if (registrationChoice === "manual") {
|
|
277
292
|
const answers = await inquirer.prompt([
|
|
278
293
|
{
|
|
279
294
|
type: "input",
|
|
@@ -312,7 +327,7 @@ async function main() {
|
|
|
312
327
|
{ name: "A2A Agent", value: "a2a-agent" },
|
|
313
328
|
{ name: "ERC-8004 Agent", value: "erc8004" }
|
|
314
329
|
],
|
|
315
|
-
default: "openclaw"
|
|
330
|
+
default: hasOpenClaw ? "openclaw" : "custom"
|
|
316
331
|
},
|
|
317
332
|
{
|
|
318
333
|
type: "input",
|