@rudderhq/cli 0.3.4-canary.23 → 0.3.4-canary.25
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 +24 -11
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -965,6 +965,7 @@ var init_chat = __esm({
|
|
|
965
965
|
chatRichReferencesSchema = z8.array(chatRichReferenceSchema).max(5);
|
|
966
966
|
chatAutomationCreateSchema = z8.object({
|
|
967
967
|
title: z8.string().trim().min(1).max(200),
|
|
968
|
+
instructions: z8.string().trim().max(2e4).optional().nullable(),
|
|
968
969
|
description: z8.string().trim().max(2e4).optional().nullable(),
|
|
969
970
|
projectId: z8.string().uuid().optional().nullable(),
|
|
970
971
|
goalId: z8.string().uuid().optional().nullable(),
|
|
@@ -980,7 +981,10 @@ var init_chat = __esm({
|
|
|
980
981
|
label: z8.string().trim().max(120).optional().nullable(),
|
|
981
982
|
enabled: z8.boolean().optional().default(true)
|
|
982
983
|
})
|
|
983
|
-
})
|
|
984
|
+
}).transform(({ description, instructions, ...value }) => ({
|
|
985
|
+
...value,
|
|
986
|
+
instructions: instructions === void 0 ? description : instructions
|
|
987
|
+
}));
|
|
984
988
|
createChatAttachmentMetadataSchema = z8.object({
|
|
985
989
|
messageId: z8.string().uuid()
|
|
986
990
|
});
|
|
@@ -1985,22 +1989,31 @@ var init_approval = __esm({
|
|
|
1985
1989
|
|
|
1986
1990
|
// ../packages/shared/dist/validators/automation.js
|
|
1987
1991
|
import { z as z20 } from "zod";
|
|
1992
|
+
function normalizeAutomationInstructions(value) {
|
|
1993
|
+
const { instructions, ...rest } = value;
|
|
1994
|
+
return {
|
|
1995
|
+
...rest,
|
|
1996
|
+
description: instructions === void 0 ? value.description : instructions
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1988
1999
|
function normalizeAutomationNotifications(value) {
|
|
1989
2000
|
if (value.outputMode !== "chat_output" || !value.notifyOnIssueCreated)
|
|
1990
2001
|
return value;
|
|
1991
2002
|
return { ...value, notifyOnIssueCreated: false };
|
|
1992
2003
|
}
|
|
1993
|
-
var
|
|
2004
|
+
var automationTextFieldSchema, automationBodyFieldsSchema, createAutomationSchema, updateAutomationSchema, baseTriggerSchema, createAutomationTriggerSchema, updateAutomationTriggerSchema, runAutomationSchema, rotateAutomationTriggerSecretSchema;
|
|
1994
2005
|
var init_automation = __esm({
|
|
1995
2006
|
"../packages/shared/dist/validators/automation.js"() {
|
|
1996
2007
|
"use strict";
|
|
1997
2008
|
init_constants();
|
|
1998
|
-
|
|
2009
|
+
automationTextFieldSchema = z20.string().optional().nullable();
|
|
2010
|
+
automationBodyFieldsSchema = z20.object({
|
|
1999
2011
|
projectId: z20.string().uuid().optional().nullable().default(null),
|
|
2000
2012
|
goalId: z20.string().uuid().optional().nullable(),
|
|
2001
2013
|
parentIssueId: z20.string().uuid().optional().nullable(),
|
|
2002
2014
|
title: z20.string().trim().min(1).max(200),
|
|
2003
|
-
|
|
2015
|
+
instructions: automationTextFieldSchema,
|
|
2016
|
+
description: automationTextFieldSchema,
|
|
2004
2017
|
assigneeAgentId: z20.string().uuid(),
|
|
2005
2018
|
priority: z20.enum(ISSUE_PRIORITIES).optional().default("medium"),
|
|
2006
2019
|
status: z20.enum(AUTOMATION_STATUSES).optional().default("active"),
|
|
@@ -2010,7 +2023,7 @@ var init_automation = __esm({
|
|
|
2010
2023
|
chatConversationId: z20.string().uuid().optional().nullable().default(null),
|
|
2011
2024
|
notifyOnIssueCreated: z20.boolean().optional().default(false)
|
|
2012
2025
|
});
|
|
2013
|
-
createAutomationSchema =
|
|
2026
|
+
createAutomationSchema = automationBodyFieldsSchema.superRefine((value, ctx) => {
|
|
2014
2027
|
if (value.chatConversationId) {
|
|
2015
2028
|
ctx.addIssue({
|
|
2016
2029
|
code: z20.ZodIssueCode.custom,
|
|
@@ -2018,8 +2031,8 @@ var init_automation = __esm({
|
|
|
2018
2031
|
message: "Chat output creates an automation-owned conversation; existing chats cannot be selected"
|
|
2019
2032
|
});
|
|
2020
2033
|
}
|
|
2021
|
-
}).transform(normalizeAutomationNotifications);
|
|
2022
|
-
updateAutomationSchema =
|
|
2034
|
+
}).transform(normalizeAutomationInstructions).transform(normalizeAutomationNotifications);
|
|
2035
|
+
updateAutomationSchema = automationBodyFieldsSchema.partial().superRefine((value, ctx) => {
|
|
2023
2036
|
if (value.chatConversationId) {
|
|
2024
2037
|
ctx.addIssue({
|
|
2025
2038
|
code: z20.ZodIssueCode.custom,
|
|
@@ -2027,7 +2040,7 @@ var init_automation = __esm({
|
|
|
2027
2040
|
message: "Chat output creates an automation-owned conversation; existing chats cannot be selected"
|
|
2028
2041
|
});
|
|
2029
2042
|
}
|
|
2030
|
-
}).transform(normalizeAutomationNotifications);
|
|
2043
|
+
}).transform(normalizeAutomationInstructions).transform(normalizeAutomationNotifications);
|
|
2031
2044
|
baseTriggerSchema = z20.object({
|
|
2032
2045
|
label: z20.string().trim().max(120).optional().nullable(),
|
|
2033
2046
|
enabled: z20.boolean().optional().default(true)
|
|
@@ -13211,7 +13224,7 @@ function registerAutomationCommands(program) {
|
|
|
13211
13224
|
})
|
|
13212
13225
|
);
|
|
13213
13226
|
addCommonClientOptions(
|
|
13214
|
-
automation.command("create").description(getAgentCliCapabilityById("automation.create").description).option("-O, --org-id <id>", "Organization ID").option("--payload <json>", "Raw automation create payload JSON").option("--title <title>", "Automation title").option("--
|
|
13227
|
+
automation.command("create").description(getAgentCliCapabilityById("automation.create").description).option("-O, --org-id <id>", "Organization ID").option("--payload <json>", "Raw automation create payload JSON").option("--title <title>", "Automation title").option("--instructions <text>", "Automation run instructions").option("--description <text>", "Deprecated alias for --instructions").option("--assignee-agent-id <id>", "Assignee agent ID").option("--project-id <id>", "Project ID").option("--goal-id <id>", "Goal ID").option("--parent-issue-id <id>", "Parent issue ID").option("--priority <priority>", "Issue priority for tracked output").option("--status <status>", "Automation status").option("--output-mode <mode>", "Automation output mode").option("--concurrency-policy <policy>", "Automation concurrency policy").option("--catch-up-policy <policy>", "Automation catch-up policy").option("--notify-on-issue-created", "Notify when tracked issue output is created").action(async (opts) => {
|
|
13215
13228
|
try {
|
|
13216
13229
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
13217
13230
|
const payload = createAutomationSchema.parse(buildAutomationPayload(opts));
|
|
@@ -13224,7 +13237,7 @@ function registerAutomationCommands(program) {
|
|
|
13224
13237
|
{ includeCompany: false }
|
|
13225
13238
|
);
|
|
13226
13239
|
addCommonClientOptions(
|
|
13227
|
-
automation.command("update").description(getAgentCliCapabilityById("automation.update").description).argument("<automationId>", "Automation ID").option("--payload <json>", "Raw automation update payload JSON").option("--title <title>", "Automation title").option("--
|
|
13240
|
+
automation.command("update").description(getAgentCliCapabilityById("automation.update").description).argument("<automationId>", "Automation ID").option("--payload <json>", "Raw automation update payload JSON").option("--title <title>", "Automation title").option("--instructions <text>", "Automation run instructions").option("--description <text>", "Deprecated alias for --instructions").option("--assignee-agent-id <id>", "Assignee agent ID").option("--project-id <id>", "Project ID").option("--goal-id <id>", "Goal ID").option("--parent-issue-id <id>", "Parent issue ID").option("--priority <priority>", "Issue priority for tracked output").option("--status <status>", "Automation status").option("--output-mode <mode>", "Automation output mode").option("--concurrency-policy <policy>", "Automation concurrency policy").option("--catch-up-policy <policy>", "Automation catch-up policy").option("--notify-on-issue-created", "Notify when tracked issue output is created").action(async (automationId, opts) => {
|
|
13228
13241
|
try {
|
|
13229
13242
|
const ctx = resolveCommandContext(opts);
|
|
13230
13243
|
const payload = updateAutomationSchema.parse(buildAutomationPayload(opts));
|
|
@@ -13284,7 +13297,7 @@ function buildAutomationPayload(opts) {
|
|
|
13284
13297
|
...parseJsonObjectOption(opts.payload, "--payload"),
|
|
13285
13298
|
...definedRecord({
|
|
13286
13299
|
title: opts.title,
|
|
13287
|
-
|
|
13300
|
+
instructions: opts.instructions ?? opts.description,
|
|
13288
13301
|
assigneeAgentId: opts.assigneeAgentId,
|
|
13289
13302
|
projectId: opts.projectId,
|
|
13290
13303
|
goalId: opts.goalId,
|