@rudderhq/cli 0.2.7-canary.9 → 0.2.7
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/README.md +4 -4
- package/dist/index.js +58 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Rudder turns those coordination patterns into product primitives for agent teams
|
|
|
58
58
|
|
|
59
59
|
## What Rudder Is
|
|
60
60
|
|
|
61
|
-
Rudder is the operating layer for agent teams
|
|
61
|
+
Rudder is the operating layer for self-improving agent teams. One Rudder instance can run one or many organizations, each with its own goal, org structure, agents, issues, budgets, approvals, feedback, and governance.
|
|
62
62
|
|
|
63
63
|
| Human team pattern | Rudder equivalent |
|
|
64
64
|
| --- | --- |
|
|
@@ -108,8 +108,8 @@ Rudder defaults to embedded PostgreSQL in development. If `DATABASE_URL` is unse
|
|
|
108
108
|
|
|
109
109
|
1. Create an organization.
|
|
110
110
|
2. Define the organization goal.
|
|
111
|
-
3.
|
|
112
|
-
4.
|
|
111
|
+
3. Create or use a default agent with a clear role and runtime.
|
|
112
|
+
4. Add more agents only when repeated work needs stable ownership.
|
|
113
113
|
5. Create or convert work into issues.
|
|
114
114
|
6. Let agents pick up work through heartbeat invocations.
|
|
115
115
|
7. Review outputs, approvals, activity, and spend from the board.
|
|
@@ -117,7 +117,7 @@ Rudder defaults to embedded PostgreSQL in development. If `DATABASE_URL` is unse
|
|
|
117
117
|
9. Preserve reusable lessons as better context, skills, decisions, or workflows.
|
|
118
118
|
10. Future runs use the improved team context.
|
|
119
119
|
|
|
120
|
-
Every durable piece of work should still answer one question: why does this
|
|
120
|
+
Every durable piece of work should still answer one question: why does this issue exist? In Rudder, the intended answer is traceable all the way back to the organization goal.
|
|
121
121
|
|
|
122
122
|
## Contributing
|
|
123
123
|
|
package/dist/index.js
CHANGED
|
@@ -747,7 +747,7 @@ var init_resource = __esm({
|
|
|
747
747
|
|
|
748
748
|
// ../packages/shared/dist/validators/chat.js
|
|
749
749
|
import { z as z8 } from "zod";
|
|
750
|
-
var chatConversationStatusSchema, chatIssueCreationModeSchema, chatMessageRoleSchema, chatMessageKindSchema, chatMessageStatusSchema, chatContextEntityTypeSchema, createChatContextLinkSchema, createChatConversationSchema, setChatProjectContextSchema, updateChatConversationSchema, addChatMessageSchema, chatRichReferenceDisplaySchema, chatIssueIdentifierSchema, chatAskUserIdentifierSchema, chatAskUserOptionSchema, chatAskUserQuestionSchema, chatAskUserRequestSchema, chatIssueRichReferenceSchema, chatIssueCommentRichReferenceSchema, chatRichReferenceSchema, chatRichReferencesSchema, createChatAttachmentMetadataSchema, chatIssueProposalSchema, convertChatToIssueSchema, chatOperationProposalSchema, resolveChatOperationProposalSchema, updateChatConversationUserStateSchema;
|
|
750
|
+
var chatConversationStatusSchema, chatIssueCreationModeSchema, chatMessageRoleSchema, chatMessageKindSchema, chatMessageStatusSchema, chatContextEntityTypeSchema, createChatContextLinkSchema, createChatConversationSchema, setChatProjectContextSchema, updateChatConversationSchema, addChatMessageSchema, chatRichReferenceDisplaySchema, chatIssueIdentifierSchema, chatAskUserIdentifierSchema, chatAskUserOptionSchema, chatAskUserQuestionSchema, chatAskUserRequestSchema, chatIssueRichReferenceSchema, chatIssueCommentRichReferenceSchema, chatRichReferenceSchema, chatRichReferencesSchema, chatAutomationCreateSchema, createChatAttachmentMetadataSchema, chatIssueProposalSchema, convertChatToIssueSchema, chatOperationProposalSchema, resolveChatOperationProposalSchema, updateChatConversationUserStateSchema;
|
|
751
751
|
var init_chat = __esm({
|
|
752
752
|
"../packages/shared/dist/validators/chat.js"() {
|
|
753
753
|
"use strict";
|
|
@@ -798,6 +798,7 @@ var init_chat = __esm({
|
|
|
798
798
|
header: z8.string().trim().min(1).max(32).optional(),
|
|
799
799
|
question: z8.string().trim().min(1).max(240),
|
|
800
800
|
options: z8.array(chatAskUserOptionSchema).min(2).max(3),
|
|
801
|
+
selectionMode: z8.enum(["single", "multiple"]).optional(),
|
|
801
802
|
allowFreeform: z8.boolean().optional()
|
|
802
803
|
}).superRefine((question, ctx) => {
|
|
803
804
|
const optionIds = /* @__PURE__ */ new Set();
|
|
@@ -851,6 +852,24 @@ var init_chat = __esm({
|
|
|
851
852
|
chatIssueCommentRichReferenceSchema
|
|
852
853
|
]);
|
|
853
854
|
chatRichReferencesSchema = z8.array(chatRichReferenceSchema).max(5);
|
|
855
|
+
chatAutomationCreateSchema = z8.object({
|
|
856
|
+
title: z8.string().trim().min(1).max(200),
|
|
857
|
+
description: z8.string().trim().max(2e4).optional().nullable(),
|
|
858
|
+
projectId: z8.string().uuid().optional().nullable(),
|
|
859
|
+
goalId: z8.string().uuid().optional().nullable(),
|
|
860
|
+
parentIssueId: z8.string().uuid().optional().nullable(),
|
|
861
|
+
priority: z8.enum(["critical", "high", "medium", "low"]).optional().default("medium"),
|
|
862
|
+
status: z8.enum(AUTOMATION_STATUSES).optional().default("active"),
|
|
863
|
+
concurrencyPolicy: z8.enum(AUTOMATION_CONCURRENCY_POLICIES).optional().default("coalesce_if_active"),
|
|
864
|
+
catchUpPolicy: z8.enum(AUTOMATION_CATCH_UP_POLICIES).optional().default("skip_missed"),
|
|
865
|
+
outputMode: z8.enum(AUTOMATION_OUTPUT_MODES).optional().default("chat_output"),
|
|
866
|
+
schedule: z8.object({
|
|
867
|
+
cronExpression: z8.string().trim().min(1),
|
|
868
|
+
timezone: z8.string().trim().min(1),
|
|
869
|
+
label: z8.string().trim().max(120).optional().nullable(),
|
|
870
|
+
enabled: z8.boolean().optional().default(true)
|
|
871
|
+
})
|
|
872
|
+
});
|
|
854
873
|
createChatAttachmentMetadataSchema = z8.object({
|
|
855
874
|
messageId: z8.string().uuid()
|
|
856
875
|
});
|
|
@@ -2598,11 +2617,12 @@ var init_project_mentions = __esm({
|
|
|
2598
2617
|
|
|
2599
2618
|
// ../packages/shared/dist/config-schema.js
|
|
2600
2619
|
import { z as z27 } from "zod";
|
|
2601
|
-
var configMetaSchema, llmConfigSchema, databaseBackupConfigSchema, databaseConfigSchema, loggingConfigSchema, serverConfigSchema, authConfigSchema, storageLocalDiskConfigSchema, storageS3ConfigSchema, storageConfigSchema, secretsLocalEncryptedConfigSchema, secretsConfigSchema, langfuseConfigSchema, rudderConfigSchema;
|
|
2620
|
+
var DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES, configMetaSchema, llmConfigSchema, databaseBackupConfigSchema, databaseConfigSchema, loggingConfigSchema, serverConfigSchema, authConfigSchema, storageLocalDiskConfigSchema, storageS3ConfigSchema, storageConfigSchema, secretsLocalEncryptedConfigSchema, secretsConfigSchema, langfuseConfigSchema, rudderConfigSchema;
|
|
2602
2621
|
var init_config_schema = __esm({
|
|
2603
2622
|
"../packages/shared/dist/config-schema.js"() {
|
|
2604
2623
|
"use strict";
|
|
2605
2624
|
init_constants();
|
|
2625
|
+
DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES = 256 * 1024 * 1024;
|
|
2606
2626
|
configMetaSchema = z27.object({
|
|
2607
2627
|
version: z27.literal(1),
|
|
2608
2628
|
updatedAt: z27.string(),
|
|
@@ -2616,6 +2636,7 @@ var init_config_schema = __esm({
|
|
|
2616
2636
|
enabled: z27.boolean().default(true),
|
|
2617
2637
|
intervalMinutes: z27.number().int().min(1).max(7 * 24 * 60).default(60),
|
|
2618
2638
|
retentionDays: z27.number().int().min(1).max(3650).default(30),
|
|
2639
|
+
maxEstimatedBytes: z27.number().int().min(1).default(DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES),
|
|
2619
2640
|
dir: z27.string().default("~/.rudder/instances/default/data/backups")
|
|
2620
2641
|
});
|
|
2621
2642
|
databaseConfigSchema = z27.object({
|
|
@@ -2627,6 +2648,7 @@ var init_config_schema = __esm({
|
|
|
2627
2648
|
enabled: true,
|
|
2628
2649
|
intervalMinutes: 60,
|
|
2629
2650
|
retentionDays: 30,
|
|
2651
|
+
maxEstimatedBytes: DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES,
|
|
2630
2652
|
dir: "~/.rudder/instances/default/data/backups"
|
|
2631
2653
|
})
|
|
2632
2654
|
});
|
|
@@ -3140,6 +3162,7 @@ async function promptDatabase(current) {
|
|
|
3140
3162
|
enabled: true,
|
|
3141
3163
|
intervalMinutes: 60,
|
|
3142
3164
|
retentionDays: 30,
|
|
3165
|
+
maxEstimatedBytes: DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES,
|
|
3143
3166
|
dir: defaultBackupDir
|
|
3144
3167
|
}
|
|
3145
3168
|
};
|
|
@@ -3248,6 +3271,20 @@ async function promptDatabase(current) {
|
|
|
3248
3271
|
p.cancel("Setup cancelled.");
|
|
3249
3272
|
process.exit(0);
|
|
3250
3273
|
}
|
|
3274
|
+
const backupMaxEstimatedInput = await p.text({
|
|
3275
|
+
message: "Scheduled backup max database estimate (bytes)",
|
|
3276
|
+
defaultValue: String(base.backup.maxEstimatedBytes || DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES),
|
|
3277
|
+
placeholder: String(DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES),
|
|
3278
|
+
validate: (val) => {
|
|
3279
|
+
const n = Number(val);
|
|
3280
|
+
if (!Number.isInteger(n) || n < 1) return "Max estimate must be a positive integer byte count";
|
|
3281
|
+
return void 0;
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
if (p.isCancel(backupMaxEstimatedInput)) {
|
|
3285
|
+
p.cancel("Setup cancelled.");
|
|
3286
|
+
process.exit(0);
|
|
3287
|
+
}
|
|
3251
3288
|
return {
|
|
3252
3289
|
mode,
|
|
3253
3290
|
connectionString,
|
|
@@ -3257,6 +3294,7 @@ async function promptDatabase(current) {
|
|
|
3257
3294
|
enabled: backupEnabled,
|
|
3258
3295
|
intervalMinutes: Number(backupIntervalInput || "60"),
|
|
3259
3296
|
retentionDays: Number(backupRetentionInput || "30"),
|
|
3297
|
+
maxEstimatedBytes: Number(backupMaxEstimatedInput || String(DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES)),
|
|
3260
3298
|
dir: backupDirInput || defaultBackupDir
|
|
3261
3299
|
}
|
|
3262
3300
|
};
|
|
@@ -3264,6 +3302,7 @@ async function promptDatabase(current) {
|
|
|
3264
3302
|
var init_database = __esm({
|
|
3265
3303
|
"src/prompts/database.ts"() {
|
|
3266
3304
|
"use strict";
|
|
3305
|
+
init_schema();
|
|
3267
3306
|
init_home();
|
|
3268
3307
|
}
|
|
3269
3308
|
});
|
|
@@ -5471,6 +5510,18 @@ function parseNumberFromEnv(rawValue) {
|
|
|
5471
5510
|
if (!Number.isFinite(parsed)) return null;
|
|
5472
5511
|
return parsed;
|
|
5473
5512
|
}
|
|
5513
|
+
function parseBytesFromEnv(rawValue) {
|
|
5514
|
+
const value = rawValue?.trim();
|
|
5515
|
+
if (!value) return null;
|
|
5516
|
+
const match = value.match(/^(\d+(?:\.\d+)?)\s*(b|kb|kib|mb|mib|gb|gib)?$/i);
|
|
5517
|
+
if (!match) return null;
|
|
5518
|
+
const amount = Number(match[1]);
|
|
5519
|
+
const unit = match[2]?.toLowerCase() ?? "b";
|
|
5520
|
+
const multiplier = unit === "gb" || unit === "gib" ? 1024 ** 3 : unit === "mb" || unit === "mib" ? 1024 ** 2 : unit === "kb" || unit === "kib" ? 1024 : 1;
|
|
5521
|
+
const parsed = Math.floor(amount * multiplier);
|
|
5522
|
+
if (!Number.isSafeInteger(parsed) || parsed < 1) return null;
|
|
5523
|
+
return parsed;
|
|
5524
|
+
}
|
|
5474
5525
|
function parseEnumFromEnv(rawValue, allowedValues) {
|
|
5475
5526
|
if (!rawValue) return null;
|
|
5476
5527
|
return allowedValues.includes(rawValue) ? rawValue : null;
|
|
@@ -5516,6 +5567,7 @@ function quickstartDefaultsFromEnv() {
|
|
|
5516
5567
|
1,
|
|
5517
5568
|
parseNumberFromEnv(process.env.RUDDER_DB_BACKUP_RETENTION_DAYS) ?? 30
|
|
5518
5569
|
);
|
|
5570
|
+
const databaseBackupMaxEstimatedBytes = parseBytesFromEnv(process.env.RUDDER_DB_BACKUP_MAX_ESTIMATED_BYTES) ?? DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES;
|
|
5519
5571
|
const defaults = {
|
|
5520
5572
|
database: {
|
|
5521
5573
|
mode: databaseUrl ? "postgres" : "embedded-postgres",
|
|
@@ -5529,6 +5581,7 @@ function quickstartDefaultsFromEnv() {
|
|
|
5529
5581
|
enabled: databaseBackupEnabled,
|
|
5530
5582
|
intervalMinutes: databaseBackupIntervalMinutes,
|
|
5531
5583
|
retentionDays: databaseBackupRetentionDays,
|
|
5584
|
+
maxEstimatedBytes: databaseBackupMaxEstimatedBytes,
|
|
5532
5585
|
dir: resolvePathFromEnv(process.env.RUDDER_DB_BACKUP_DIR) ?? resolveDefaultBackupDir(instanceId)
|
|
5533
5586
|
}
|
|
5534
5587
|
},
|
|
@@ -5880,6 +5933,7 @@ var init_onboard = __esm({
|
|
|
5880
5933
|
"RUDDER_DB_BACKUP_INTERVAL_MINUTES",
|
|
5881
5934
|
"RUDDER_DB_BACKUP_RETENTION_DAYS",
|
|
5882
5935
|
"RUDDER_DB_BACKUP_DIR",
|
|
5936
|
+
"RUDDER_DB_BACKUP_MAX_ESTIMATED_BYTES",
|
|
5883
5937
|
"RUDDER_DEPLOYMENT_MODE",
|
|
5884
5938
|
"RUDDER_DEPLOYMENT_EXPOSURE",
|
|
5885
5939
|
"HOST",
|
|
@@ -6211,6 +6265,7 @@ function quoteShellValue(value) {
|
|
|
6211
6265
|
|
|
6212
6266
|
// src/commands/configure.ts
|
|
6213
6267
|
init_store();
|
|
6268
|
+
init_schema();
|
|
6214
6269
|
init_secrets_key();
|
|
6215
6270
|
init_database();
|
|
6216
6271
|
init_llm();
|
|
@@ -6248,6 +6303,7 @@ function defaultConfig() {
|
|
|
6248
6303
|
enabled: true,
|
|
6249
6304
|
intervalMinutes: 60,
|
|
6250
6305
|
retentionDays: 30,
|
|
6306
|
+
maxEstimatedBytes: DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES,
|
|
6251
6307
|
dir: resolveDefaultBackupDir(instanceId)
|
|
6252
6308
|
}
|
|
6253
6309
|
},
|