@web42/cli 0.1.9 → 0.1.12

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.
@@ -1,4 +1,4 @@
1
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync, statSync } from "fs";
2
2
  import { join } from "path";
3
3
  import { Command } from "commander";
4
4
  import chalk from "chalk";
@@ -97,6 +97,29 @@ export const pushCommand = new Command("push")
97
97
  if (existsSync(readmePath)) {
98
98
  readme = readFileSync(readmePath, "utf-8");
99
99
  }
100
+ let profile_image_data = undefined;
101
+ // Check for avatar/avatar.png or avatars/avatar.png
102
+ const avatarSearchPaths = [
103
+ join(cwd, "avatar/avatar.png"),
104
+ join(cwd, "avatars/avatar.png"),
105
+ join(cwd, "avatar.png"),
106
+ // Also check .web42/ for the one managed by build/pack
107
+ join(cwd, ".web42/avatar.png"),
108
+ ];
109
+ for (const ap of avatarSearchPaths) {
110
+ if (existsSync(ap)) {
111
+ try {
112
+ const stats = statSync(ap);
113
+ if (stats.size <= 5 * 1024 * 1024) {
114
+ profile_image_data = readFileSync(ap).toString("base64");
115
+ break;
116
+ }
117
+ }
118
+ catch (e) {
119
+ // Skip
120
+ }
121
+ }
122
+ }
100
123
  const agentResult = await apiPost("/api/agents", {
101
124
  slug: manifest.name,
102
125
  name: manifest.name,
@@ -104,6 +127,7 @@ export const pushCommand = new Command("push")
104
127
  readme,
105
128
  manifest,
106
129
  demo_video_url: manifest.demoVideoUrl,
130
+ profile_image_data,
107
131
  });
108
132
  agentId = agentResult.agent.id;
109
133
  isCreated = !!agentResult.created;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const CLI_VERSION = "0.1.9";
1
+ export declare const CLI_VERSION = "0.1.12";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.1.9";
1
+ export const CLI_VERSION = "0.1.12";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web42/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.12",
4
4
  "description": "CLI for the Web42 Agent Marketplace - push, install, and remix OpenClaw agent packages",
5
5
  "type": "module",
6
6
  "bin": {