@vm0/cli 9.130.0 → 9.131.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/{chunk-V5JAHNBR.js → chunk-BS3XRRR3.js} +107 -104
- package/{chunk-V5JAHNBR.js.map → chunk-BS3XRRR3.js.map} +1 -1
- package/index.js +32 -292
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +79 -2
- package/zero.js.map +1 -1
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
upsertZeroOrgModelProvider,
|
|
131
131
|
withErrorHandler,
|
|
132
132
|
zeroAgentCustomSkillNameSchema
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-BS3XRRR3.js";
|
|
134
134
|
import {
|
|
135
135
|
__toESM,
|
|
136
136
|
init_esm_shims
|
|
@@ -1251,6 +1251,81 @@ function resolveAvatarUrl(opts) {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
return buildCustomSvgAvatar(opts);
|
|
1253
1253
|
}
|
|
1254
|
+
var REVERSE_SKIN_MAP = {
|
|
1255
|
+
0: "light",
|
|
1256
|
+
1: "light-medium",
|
|
1257
|
+
2: "medium",
|
|
1258
|
+
3: "medium-dark",
|
|
1259
|
+
4: "dark"
|
|
1260
|
+
};
|
|
1261
|
+
var REVERSE_HAIR_COLOR_MAP = {
|
|
1262
|
+
1: "blonde",
|
|
1263
|
+
2: "teal",
|
|
1264
|
+
3: "grey",
|
|
1265
|
+
4: "pink",
|
|
1266
|
+
5: "brown"
|
|
1267
|
+
};
|
|
1268
|
+
var REVERSE_EXPRESSION_MAP = {
|
|
1269
|
+
1: "calm",
|
|
1270
|
+
2: "content",
|
|
1271
|
+
3: "neutral",
|
|
1272
|
+
4: "pleasant",
|
|
1273
|
+
5: "excited"
|
|
1274
|
+
};
|
|
1275
|
+
var REVERSE_INTENSITY_MAP = {
|
|
1276
|
+
d: "chill",
|
|
1277
|
+
m: "normal",
|
|
1278
|
+
h: "hyped"
|
|
1279
|
+
};
|
|
1280
|
+
var PRESET_DESCRIPTIONS = {
|
|
1281
|
+
"preset:0": "light skin, brown hair, calm, hyped",
|
|
1282
|
+
"preset:1": "light-medium skin, grey hair, calm, normal",
|
|
1283
|
+
"preset:2": "medium skin, pink hair, neutral, chill",
|
|
1284
|
+
"preset:3": "medium-dark skin, blonde hair, pleasant, hyped",
|
|
1285
|
+
"preset:4": "dark skin, teal hair, excited, normal"
|
|
1286
|
+
};
|
|
1287
|
+
function parseSvgAvatar(svg) {
|
|
1288
|
+
const match = svg.match(/^svg:r(\d)s(\d)h(\d)c(\d)f(\d)([dmh])$/);
|
|
1289
|
+
if (!match) return void 0;
|
|
1290
|
+
const [, r, s, h, c, f, i] = match;
|
|
1291
|
+
const parts = [];
|
|
1292
|
+
const skin = REVERSE_SKIN_MAP[Number(s)];
|
|
1293
|
+
if (skin) parts.push(`${skin} skin`);
|
|
1294
|
+
const hairColor = REVERSE_HAIR_COLOR_MAP[Number(c)];
|
|
1295
|
+
if (hairColor) parts.push(`${hairColor} hair`);
|
|
1296
|
+
const expression = REVERSE_EXPRESSION_MAP[Number(f)];
|
|
1297
|
+
if (expression) parts.push(expression);
|
|
1298
|
+
const intensity = REVERSE_INTENSITY_MAP[i];
|
|
1299
|
+
if (intensity) parts.push(intensity);
|
|
1300
|
+
if (parts.length === 0) return void 0;
|
|
1301
|
+
let desc = parts.join(", ");
|
|
1302
|
+
if (r !== "3") {
|
|
1303
|
+
const rotationLabels = {
|
|
1304
|
+
"1": "far-left",
|
|
1305
|
+
"2": "left",
|
|
1306
|
+
"4": "right",
|
|
1307
|
+
"5": "far-right"
|
|
1308
|
+
};
|
|
1309
|
+
const rot = rotationLabels[r];
|
|
1310
|
+
if (rot) desc += `, ${rot}`;
|
|
1311
|
+
}
|
|
1312
|
+
if (h !== "1") {
|
|
1313
|
+
desc += `, hair style ${h}`;
|
|
1314
|
+
}
|
|
1315
|
+
return desc;
|
|
1316
|
+
}
|
|
1317
|
+
function formatAvatar(avatarUrl) {
|
|
1318
|
+
if (!avatarUrl) return void 0;
|
|
1319
|
+
if (avatarUrl.startsWith("preset:")) {
|
|
1320
|
+
const desc = PRESET_DESCRIPTIONS[avatarUrl];
|
|
1321
|
+
return desc ? `${avatarUrl} (${desc})` : avatarUrl;
|
|
1322
|
+
}
|
|
1323
|
+
if (avatarUrl.startsWith("svg:")) {
|
|
1324
|
+
const desc = parseSvgAvatar(avatarUrl);
|
|
1325
|
+
return desc ? `custom (${desc})` : avatarUrl;
|
|
1326
|
+
}
|
|
1327
|
+
return avatarUrl;
|
|
1328
|
+
}
|
|
1254
1329
|
|
|
1255
1330
|
// src/commands/zero/agent/create.ts
|
|
1256
1331
|
var createCommand = new Command().name("create").description("Create a new zero agent").option(
|
|
@@ -1647,6 +1722,8 @@ Examples:
|
|
|
1647
1722
|
if (agent.description)
|
|
1648
1723
|
console.log(`Description: ${agent.description}`);
|
|
1649
1724
|
if (agent.sound) console.log(`Sound: ${agent.sound}`);
|
|
1725
|
+
const avatar = formatAvatar(agent.avatarUrl);
|
|
1726
|
+
if (avatar) console.log(`Avatar: ${avatar}`);
|
|
1650
1727
|
if (options.permissions && connectorInfos.length > 0) {
|
|
1651
1728
|
console.log();
|
|
1652
1729
|
console.log(source_default.bold("Connectors:"));
|
|
@@ -6796,7 +6873,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6796
6873
|
var program = new Command();
|
|
6797
6874
|
program.name("zero").description(
|
|
6798
6875
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6799
|
-
).version("9.
|
|
6876
|
+
).version("9.131.1").addHelpText(
|
|
6800
6877
|
"after",
|
|
6801
6878
|
`
|
|
6802
6879
|
Examples:
|