@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.
Files changed (2) hide show
  1. package/dist/index.js +23 -8
  2. 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.1").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) => {
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 { shouldRegister } = await inquirer.prompt([
268
+ const { registrationChoice } = await inquirer.prompt([
269
269
  {
270
- type: "confirm",
271
- name: "shouldRegister",
272
- message: "Would you like to register an agent now?",
273
- default: false
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 (shouldRegister) {
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawtrail/init",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "CLI installer for ClawTrail AI agent skill files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {