@rudderhq/cli 0.1.0-canary.2 → 0.1.0-canary.3
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 +20 -3
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1109,7 +1109,7 @@ var init_secret = __esm({
|
|
|
1109
1109
|
|
|
1110
1110
|
// ../packages/shared/src/validators/agent.ts
|
|
1111
1111
|
import { z as z10 } from "zod";
|
|
1112
|
-
var agentPermissionsSchema, agentInstructionsBundleModeSchema, updateAgentInstructionsBundleSchema, upsertAgentInstructionsFileSchema, agentRuntimeConfigSchema, optionalAgentNameSchema, createAgentSchema, createAgentHireSchema, updateAgentSchema, updateAgentInstructionsPathSchema, createAgentKeySchema, wakeAgentSchema, resetAgentSessionSchema, testAgentRuntimeEnvironmentSchema, updateAgentPermissionsSchema;
|
|
1112
|
+
var agentPermissionsSchema, agentInstructionsBundleModeSchema, updateAgentInstructionsBundleSchema, upsertAgentInstructionsFileSchema, agentRuntimeConfigSchema, optionalAgentNameSchema, uploadedAgentIconSchema, customAgentIconSchema, agentIconSchema, createAgentSchema, createAgentHireSchema, updateAgentSchema, updateAgentInstructionsPathSchema, createAgentKeySchema, wakeAgentSchema, resetAgentSessionSchema, testAgentRuntimeEnvironmentSchema, updateAgentPermissionsSchema;
|
|
1113
1113
|
var init_agent = __esm({
|
|
1114
1114
|
"../packages/shared/src/validators/agent.ts"() {
|
|
1115
1115
|
"use strict";
|
|
@@ -1150,11 +1150,28 @@ var init_agent = __esm({
|
|
|
1150
1150
|
},
|
|
1151
1151
|
z10.string().trim().min(1).optional()
|
|
1152
1152
|
);
|
|
1153
|
+
uploadedAgentIconSchema = z10.string().regex(
|
|
1154
|
+
/^asset:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
|
|
1155
|
+
"Invalid uploaded avatar reference"
|
|
1156
|
+
);
|
|
1157
|
+
customAgentIconSchema = z10.string().trim().min(1).max(24).refine((value) => !value.toLowerCase().startsWith("asset:"), "Invalid uploaded avatar reference").refine((value) => !/[<>\u0000-\u001f\u007f]/u.test(value), "Icon cannot contain markup or control characters");
|
|
1158
|
+
agentIconSchema = z10.preprocess(
|
|
1159
|
+
(value) => {
|
|
1160
|
+
if (typeof value !== "string") return value;
|
|
1161
|
+
const trimmed = value.trim();
|
|
1162
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
1163
|
+
},
|
|
1164
|
+
z10.union([
|
|
1165
|
+
z10.enum(AGENT_ICON_NAMES),
|
|
1166
|
+
uploadedAgentIconSchema,
|
|
1167
|
+
customAgentIconSchema
|
|
1168
|
+
]).nullable()
|
|
1169
|
+
);
|
|
1153
1170
|
createAgentSchema = z10.object({
|
|
1154
1171
|
name: optionalAgentNameSchema,
|
|
1155
1172
|
role: z10.enum(AGENT_ROLES).optional().default("general"),
|
|
1156
1173
|
title: z10.string().optional().nullable(),
|
|
1157
|
-
icon:
|
|
1174
|
+
icon: agentIconSchema.optional(),
|
|
1158
1175
|
reportsTo: z10.string().uuid().optional().nullable(),
|
|
1159
1176
|
capabilities: z10.string().optional().nullable(),
|
|
1160
1177
|
desiredSkills: z10.array(z10.string().min(1)).optional(),
|
|
@@ -19173,7 +19190,7 @@ var DATA_DIR_OPTION_HELP = "Rudder data directory root (isolates state from ~/.r
|
|
|
19173
19190
|
var LOCAL_ENV_OPTION_HELP = "Local environment profile (dev, prod_local, e2e)";
|
|
19174
19191
|
function createProgram() {
|
|
19175
19192
|
const program = new Command();
|
|
19176
|
-
program.name("rudder").description("Rudder CLI \u2014 setup, diagnose, and configure your instance").version("0.1.0-canary.
|
|
19193
|
+
program.name("rudder").description("Rudder CLI \u2014 setup, diagnose, and configure your instance").version("0.1.0-canary.3");
|
|
19177
19194
|
program.option("--local-env <name>", LOCAL_ENV_OPTION_HELP);
|
|
19178
19195
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
19179
19196
|
const options = actionCommand.optsWithGlobals();
|