@rudderhq/cli 0.4.6-canary.0 → 0.4.6-canary.10
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 +492 -433
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -496,13 +496,6 @@ var init_agent_run = __esm({
|
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
498
|
|
|
499
|
-
// ../packages/shared/dist/types/observability.js
|
|
500
|
-
var init_observability = __esm({
|
|
501
|
-
"../packages/shared/dist/types/observability.js"() {
|
|
502
|
-
"use strict";
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
|
|
506
499
|
// ../packages/shared/dist/types/workspace-backup.js
|
|
507
500
|
var init_workspace_backup = __esm({
|
|
508
501
|
"../packages/shared/dist/types/workspace-backup.js"() {
|
|
@@ -551,7 +544,7 @@ var init_website_icons = __esm({
|
|
|
551
544
|
{ hostnames: ["docs.google.com"], siteName: "Google Docs", iconDataUrl: googleDocsIcon },
|
|
552
545
|
{ hostnames: ["notion.so", "www.notion.so"], siteName: "Notion", iconDataUrl: notionIcon },
|
|
553
546
|
{ hostnames: ["linear.app", "linear.com"], siteName: "Linear", iconDataUrl: linearIcon },
|
|
554
|
-
{ hostnames: ["openai.com"], includeSubdomains: true, siteName: "OpenAI", iconDataUrl: openaiIcon },
|
|
547
|
+
{ hostnames: ["openai.com"], includeSubdomains: true, siteName: "OpenAI", iconDataUrl: openaiIcon, darkMode: "invert" },
|
|
555
548
|
{ hostnames: ["chatgpt.com", "chat.openai.com"], includeSubdomains: true, siteName: "ChatGPT", iconDataUrl: chatgptIcon },
|
|
556
549
|
{ hostnames: ["anthropic.com"], includeSubdomains: true, siteName: "Anthropic", iconDataUrl: anthropicIcon },
|
|
557
550
|
{ hostnames: ["claude.ai"], siteName: "Claude", iconDataUrl: claudeIcon },
|
|
@@ -623,7 +616,7 @@ var init_custom_integration = __esm({
|
|
|
623
616
|
|
|
624
617
|
// ../packages/shared/dist/validators/instance.js
|
|
625
618
|
import { z as z2 } from "zod";
|
|
626
|
-
var DEFAULT_INSTANCE_BROWSER_SETTINGS, instanceBrowserSettingsSchema, patchInstanceBrowserSettingsSchema, instanceLocaleSchema, instanceGeneralSettingsSchema, patchInstanceGeneralSettingsSchema, instanceNotificationSettingsSchema, patchInstanceNotificationSettingsSchema,
|
|
619
|
+
var DEFAULT_INSTANCE_BROWSER_SETTINGS, instanceBrowserSettingsSchema, patchInstanceBrowserSettingsSchema, instanceLocaleSchema, instanceGeneralSettingsSchema, patchInstanceGeneralSettingsSchema, instanceNotificationSettingsSchema, patchInstanceNotificationSettingsSchema, OPERATOR_PROFILE_MORE_ABOUT_YOU_MAX_LENGTH, operatorProfileSettingsSchema, patchOperatorProfileSettingsSchema, KEYBOARD_SHORTCUT_ACTION_IDS, keyboardShortcutActionIdSchema, keyboardShortcutBindingSchema, keyboardShortcutPreferenceSchema, keyboardShortcutSettingsSchema, instancePathPickerSelectionTypeSchema, instancePathPickerRequestSchema, instancePathPickerResultSchema;
|
|
627
620
|
var init_instance = __esm({
|
|
628
621
|
"../packages/shared/dist/validators/instance.js"() {
|
|
629
622
|
"use strict";
|
|
@@ -653,23 +646,6 @@ var init_instance = __esm({
|
|
|
653
646
|
desktopChatNotifications: z2.boolean().default(true)
|
|
654
647
|
}).strict();
|
|
655
648
|
patchInstanceNotificationSettingsSchema = instanceNotificationSettingsSchema.partial();
|
|
656
|
-
instanceLangfuseSettingsSchema = z2.object({
|
|
657
|
-
installed: z2.boolean().default(false),
|
|
658
|
-
enabled: z2.boolean().default(false),
|
|
659
|
-
baseUrl: z2.string().url().default("http://localhost:3000"),
|
|
660
|
-
publicKey: z2.string().default(""),
|
|
661
|
-
environment: z2.string().default(""),
|
|
662
|
-
secretKeyConfigured: z2.boolean().default(false),
|
|
663
|
-
managedByEnv: z2.boolean().default(false)
|
|
664
|
-
}).strict();
|
|
665
|
-
patchInstanceLangfuseSettingsSchema = z2.object({
|
|
666
|
-
enabled: z2.boolean().optional(),
|
|
667
|
-
baseUrl: z2.string().url().optional(),
|
|
668
|
-
publicKey: z2.string().optional(),
|
|
669
|
-
secretKey: z2.string().optional(),
|
|
670
|
-
environment: z2.string().optional(),
|
|
671
|
-
clearSecretKey: z2.boolean().optional()
|
|
672
|
-
}).strict();
|
|
673
649
|
OPERATOR_PROFILE_MORE_ABOUT_YOU_MAX_LENGTH = 8e3;
|
|
674
650
|
operatorProfileSettingsSchema = z2.object({
|
|
675
651
|
nickname: z2.string().max(80).default(""),
|
|
@@ -1231,230 +1207,301 @@ var init_organization_intelligence_profile = __esm({
|
|
|
1231
1207
|
}
|
|
1232
1208
|
});
|
|
1233
1209
|
|
|
1234
|
-
// ../packages/shared/dist/
|
|
1210
|
+
// ../packages/shared/dist/organization-issue-key.js
|
|
1211
|
+
var ORGANIZATION_ISSUE_KEY_MAX_LENGTH, ORGANIZATION_ISSUE_KEY_PATTERN;
|
|
1212
|
+
var init_organization_issue_key = __esm({
|
|
1213
|
+
"../packages/shared/dist/organization-issue-key.js"() {
|
|
1214
|
+
"use strict";
|
|
1215
|
+
ORGANIZATION_ISSUE_KEY_MAX_LENGTH = 12;
|
|
1216
|
+
ORGANIZATION_ISSUE_KEY_PATTERN = /^[A-Z][A-Z0-9]*$/;
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1220
|
+
// ../packages/shared/dist/validators/organization.js
|
|
1235
1221
|
import { z as z9 } from "zod";
|
|
1222
|
+
var logoAssetIdSchema, brandColorSchema, organizationIssueKeySchema, createOrganizationSchema, updateOrganizationSchema, updateOrganizationBrandingSchema, updateOrganizationWorkspaceFileSchema, createOrganizationWorkspaceFileSchema, createOrganizationWorkspaceDirectorySchema, renameOrganizationWorkspaceEntrySchema, moveOrganizationWorkspaceEntrySchema, copyOrganizationWorkspaceEntrySchema;
|
|
1223
|
+
var init_organization = __esm({
|
|
1224
|
+
"../packages/shared/dist/validators/organization.js"() {
|
|
1225
|
+
"use strict";
|
|
1226
|
+
init_constants();
|
|
1227
|
+
init_organization_issue_key();
|
|
1228
|
+
logoAssetIdSchema = z9.string().uuid().nullable().optional();
|
|
1229
|
+
brandColorSchema = z9.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
|
|
1230
|
+
organizationIssueKeySchema = z9.string().trim().min(1).max(ORGANIZATION_ISSUE_KEY_MAX_LENGTH).transform((value) => value.toUpperCase()).refine((value) => ORGANIZATION_ISSUE_KEY_PATTERN.test(value), {
|
|
1231
|
+
message: "Issue key must start with a letter and contain only letters and numbers"
|
|
1232
|
+
});
|
|
1233
|
+
createOrganizationSchema = z9.object({
|
|
1234
|
+
name: z9.string().min(1),
|
|
1235
|
+
issuePrefix: organizationIssueKeySchema.optional(),
|
|
1236
|
+
description: z9.string().optional().nullable(),
|
|
1237
|
+
budgetMonthlyCents: z9.number().int().nonnegative().optional().default(0),
|
|
1238
|
+
defaultChatIssueCreationMode: z9.enum(CHAT_ISSUE_CREATION_MODES).optional().default("manual_approval"),
|
|
1239
|
+
brandColor: brandColorSchema,
|
|
1240
|
+
requireBoardApprovalForNewAgents: z9.boolean().optional()
|
|
1241
|
+
});
|
|
1242
|
+
updateOrganizationSchema = createOrganizationSchema.partial().extend({
|
|
1243
|
+
status: z9.enum(ORGANIZATION_STATUSES).optional(),
|
|
1244
|
+
spentMonthlyCents: z9.number().int().nonnegative().optional(),
|
|
1245
|
+
requireBoardApprovalForNewAgents: z9.boolean().optional(),
|
|
1246
|
+
defaultChatIssueCreationMode: z9.enum(CHAT_ISSUE_CREATION_MODES).optional(),
|
|
1247
|
+
brandColor: brandColorSchema,
|
|
1248
|
+
logoAssetId: logoAssetIdSchema
|
|
1249
|
+
});
|
|
1250
|
+
updateOrganizationBrandingSchema = z9.object({
|
|
1251
|
+
name: z9.string().min(1).optional(),
|
|
1252
|
+
description: z9.string().nullable().optional(),
|
|
1253
|
+
brandColor: brandColorSchema,
|
|
1254
|
+
logoAssetId: logoAssetIdSchema
|
|
1255
|
+
}).strict().refine((value) => value.name !== void 0 || value.description !== void 0 || value.brandColor !== void 0 || value.logoAssetId !== void 0, "At least one branding field must be provided");
|
|
1256
|
+
updateOrganizationWorkspaceFileSchema = z9.object({
|
|
1257
|
+
content: z9.string(),
|
|
1258
|
+
expectedContent: z9.string().optional()
|
|
1259
|
+
});
|
|
1260
|
+
createOrganizationWorkspaceFileSchema = z9.object({
|
|
1261
|
+
filePath: z9.string().trim().min(1).max(1e3),
|
|
1262
|
+
content: z9.string().optional().default("")
|
|
1263
|
+
});
|
|
1264
|
+
createOrganizationWorkspaceDirectorySchema = z9.object({
|
|
1265
|
+
directoryPath: z9.string().trim().min(1).max(1e3)
|
|
1266
|
+
});
|
|
1267
|
+
renameOrganizationWorkspaceEntrySchema = z9.object({
|
|
1268
|
+
name: z9.string().trim().min(1).max(255)
|
|
1269
|
+
});
|
|
1270
|
+
moveOrganizationWorkspaceEntrySchema = z9.object({
|
|
1271
|
+
destinationDirectoryPath: z9.string().trim().max(1e3).default("")
|
|
1272
|
+
});
|
|
1273
|
+
copyOrganizationWorkspaceEntrySchema = z9.object({
|
|
1274
|
+
destinationDirectoryPath: z9.string().trim().max(1e3).optional()
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
|
|
1279
|
+
// ../packages/shared/dist/validators/organization-portability.js
|
|
1280
|
+
import { z as z10 } from "zod";
|
|
1236
1281
|
var portabilityIncludeSchema, portabilityEnvInputSchema, portabilityFileEntrySchema, portabilityOrganizationManifestEntrySchema, portabilitySidebarOrderSchema, portabilityAgentManifestEntrySchema, portabilitySkillManifestEntrySchema, portabilityProjectManifestEntrySchema, portabilityIssueAutomationTriggerManifestEntrySchema, portabilityIssueAutomationManifestEntrySchema, portabilityIssueManifestEntrySchema, portabilityManifestSchema, portabilitySourceSchema, portabilityTargetSchema, portabilityAgentSelectionSchema, portabilityCollisionStrategySchema, organizationPortabilityExportSchema, organizationPortabilityPreviewSchema, portabilityAdapterOverrideSchema, organizationPortabilityImportSchema;
|
|
1237
1282
|
var init_organization_portability = __esm({
|
|
1238
1283
|
"../packages/shared/dist/validators/organization-portability.js"() {
|
|
1239
1284
|
"use strict";
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1285
|
+
init_organization();
|
|
1286
|
+
portabilityIncludeSchema = z10.object({
|
|
1287
|
+
organization: z10.boolean().optional(),
|
|
1288
|
+
agents: z10.boolean().optional(),
|
|
1289
|
+
projects: z10.boolean().optional(),
|
|
1290
|
+
issues: z10.boolean().optional(),
|
|
1291
|
+
skills: z10.boolean().optional()
|
|
1246
1292
|
}).partial();
|
|
1247
|
-
portabilityEnvInputSchema =
|
|
1248
|
-
key:
|
|
1249
|
-
description:
|
|
1250
|
-
agentSlug:
|
|
1251
|
-
kind:
|
|
1252
|
-
requirement:
|
|
1253
|
-
defaultValue:
|
|
1254
|
-
portability:
|
|
1293
|
+
portabilityEnvInputSchema = z10.object({
|
|
1294
|
+
key: z10.string().min(1),
|
|
1295
|
+
description: z10.string().nullable(),
|
|
1296
|
+
agentSlug: z10.string().min(1).nullable(),
|
|
1297
|
+
kind: z10.enum(["secret", "plain"]),
|
|
1298
|
+
requirement: z10.enum(["required", "optional"]),
|
|
1299
|
+
defaultValue: z10.string().nullable(),
|
|
1300
|
+
portability: z10.enum(["portable", "system_dependent"])
|
|
1255
1301
|
});
|
|
1256
|
-
portabilityFileEntrySchema =
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
encoding:
|
|
1260
|
-
data:
|
|
1261
|
-
contentType:
|
|
1302
|
+
portabilityFileEntrySchema = z10.union([
|
|
1303
|
+
z10.string(),
|
|
1304
|
+
z10.object({
|
|
1305
|
+
encoding: z10.literal("base64"),
|
|
1306
|
+
data: z10.string(),
|
|
1307
|
+
contentType: z10.string().min(1).optional().nullable()
|
|
1262
1308
|
})
|
|
1263
1309
|
]);
|
|
1264
|
-
portabilityOrganizationManifestEntrySchema =
|
|
1265
|
-
path:
|
|
1266
|
-
name:
|
|
1267
|
-
description:
|
|
1268
|
-
brandColor:
|
|
1269
|
-
logoPath:
|
|
1270
|
-
requireBoardApprovalForNewAgents:
|
|
1310
|
+
portabilityOrganizationManifestEntrySchema = z10.object({
|
|
1311
|
+
path: z10.string().min(1),
|
|
1312
|
+
name: z10.string().min(1),
|
|
1313
|
+
description: z10.string().nullable(),
|
|
1314
|
+
brandColor: z10.string().nullable(),
|
|
1315
|
+
logoPath: z10.string().nullable(),
|
|
1316
|
+
requireBoardApprovalForNewAgents: z10.boolean()
|
|
1271
1317
|
});
|
|
1272
|
-
portabilitySidebarOrderSchema =
|
|
1273
|
-
agents:
|
|
1274
|
-
projects:
|
|
1318
|
+
portabilitySidebarOrderSchema = z10.object({
|
|
1319
|
+
agents: z10.array(z10.string().min(1)).default([]),
|
|
1320
|
+
projects: z10.array(z10.string().min(1)).default([])
|
|
1275
1321
|
});
|
|
1276
|
-
portabilityAgentManifestEntrySchema =
|
|
1277
|
-
slug:
|
|
1278
|
-
name:
|
|
1279
|
-
path:
|
|
1280
|
-
skills:
|
|
1281
|
-
role:
|
|
1282
|
-
title:
|
|
1283
|
-
icon:
|
|
1284
|
-
capabilities:
|
|
1285
|
-
reportsToSlug:
|
|
1286
|
-
agentRuntimeType:
|
|
1287
|
-
agentRuntimeConfig:
|
|
1288
|
-
runtimeConfig:
|
|
1289
|
-
permissions:
|
|
1290
|
-
budgetMonthlyCents:
|
|
1291
|
-
metadata:
|
|
1322
|
+
portabilityAgentManifestEntrySchema = z10.object({
|
|
1323
|
+
slug: z10.string().min(1),
|
|
1324
|
+
name: z10.string().min(1),
|
|
1325
|
+
path: z10.string().min(1),
|
|
1326
|
+
skills: z10.array(z10.string().min(1)).default([]),
|
|
1327
|
+
role: z10.string().min(1),
|
|
1328
|
+
title: z10.string().nullable(),
|
|
1329
|
+
icon: z10.string().nullable(),
|
|
1330
|
+
capabilities: z10.string().nullable(),
|
|
1331
|
+
reportsToSlug: z10.string().min(1).nullable(),
|
|
1332
|
+
agentRuntimeType: z10.string().min(1),
|
|
1333
|
+
agentRuntimeConfig: z10.record(z10.unknown()),
|
|
1334
|
+
runtimeConfig: z10.record(z10.unknown()),
|
|
1335
|
+
permissions: z10.record(z10.unknown()),
|
|
1336
|
+
budgetMonthlyCents: z10.number().int().nonnegative(),
|
|
1337
|
+
metadata: z10.record(z10.unknown()).nullable()
|
|
1292
1338
|
});
|
|
1293
|
-
portabilitySkillManifestEntrySchema =
|
|
1294
|
-
key:
|
|
1295
|
-
slug:
|
|
1296
|
-
name:
|
|
1297
|
-
path:
|
|
1298
|
-
description:
|
|
1299
|
-
sourceType:
|
|
1300
|
-
sourceLocator:
|
|
1301
|
-
sourceRef:
|
|
1302
|
-
trustLevel:
|
|
1303
|
-
compatibility:
|
|
1304
|
-
metadata:
|
|
1305
|
-
fileInventory:
|
|
1306
|
-
path:
|
|
1307
|
-
kind:
|
|
1339
|
+
portabilitySkillManifestEntrySchema = z10.object({
|
|
1340
|
+
key: z10.string().min(1),
|
|
1341
|
+
slug: z10.string().min(1),
|
|
1342
|
+
name: z10.string().min(1),
|
|
1343
|
+
path: z10.string().min(1),
|
|
1344
|
+
description: z10.string().nullable(),
|
|
1345
|
+
sourceType: z10.string().min(1),
|
|
1346
|
+
sourceLocator: z10.string().nullable(),
|
|
1347
|
+
sourceRef: z10.string().nullable(),
|
|
1348
|
+
trustLevel: z10.string().nullable(),
|
|
1349
|
+
compatibility: z10.string().nullable(),
|
|
1350
|
+
metadata: z10.record(z10.unknown()).nullable(),
|
|
1351
|
+
fileInventory: z10.array(z10.object({
|
|
1352
|
+
path: z10.string().min(1),
|
|
1353
|
+
kind: z10.string().min(1)
|
|
1308
1354
|
})).default([])
|
|
1309
1355
|
});
|
|
1310
|
-
portabilityProjectManifestEntrySchema =
|
|
1311
|
-
slug:
|
|
1312
|
-
name:
|
|
1313
|
-
path:
|
|
1314
|
-
description:
|
|
1315
|
-
ownerAgentSlug:
|
|
1316
|
-
leadAgentSlug:
|
|
1317
|
-
targetDate:
|
|
1318
|
-
color:
|
|
1319
|
-
status:
|
|
1320
|
-
executionWorkspacePolicy:
|
|
1321
|
-
workspaces:
|
|
1322
|
-
key:
|
|
1323
|
-
name:
|
|
1324
|
-
sourceType:
|
|
1325
|
-
repoUrl:
|
|
1326
|
-
repoRef:
|
|
1327
|
-
defaultRef:
|
|
1328
|
-
visibility:
|
|
1329
|
-
setupCommand:
|
|
1330
|
-
cleanupCommand:
|
|
1331
|
-
metadata:
|
|
1332
|
-
isPrimary:
|
|
1356
|
+
portabilityProjectManifestEntrySchema = z10.object({
|
|
1357
|
+
slug: z10.string().min(1),
|
|
1358
|
+
name: z10.string().min(1),
|
|
1359
|
+
path: z10.string().min(1),
|
|
1360
|
+
description: z10.string().nullable(),
|
|
1361
|
+
ownerAgentSlug: z10.string().min(1).nullable(),
|
|
1362
|
+
leadAgentSlug: z10.string().min(1).nullable(),
|
|
1363
|
+
targetDate: z10.string().nullable(),
|
|
1364
|
+
color: z10.string().nullable(),
|
|
1365
|
+
status: z10.string().nullable(),
|
|
1366
|
+
executionWorkspacePolicy: z10.record(z10.unknown()).nullable(),
|
|
1367
|
+
workspaces: z10.array(z10.object({
|
|
1368
|
+
key: z10.string().min(1),
|
|
1369
|
+
name: z10.string().min(1),
|
|
1370
|
+
sourceType: z10.string().nullable(),
|
|
1371
|
+
repoUrl: z10.string().nullable(),
|
|
1372
|
+
repoRef: z10.string().nullable(),
|
|
1373
|
+
defaultRef: z10.string().nullable(),
|
|
1374
|
+
visibility: z10.string().nullable(),
|
|
1375
|
+
setupCommand: z10.string().nullable(),
|
|
1376
|
+
cleanupCommand: z10.string().nullable(),
|
|
1377
|
+
metadata: z10.record(z10.unknown()).nullable(),
|
|
1378
|
+
isPrimary: z10.boolean()
|
|
1333
1379
|
})).default([]),
|
|
1334
|
-
metadata:
|
|
1380
|
+
metadata: z10.record(z10.unknown()).nullable()
|
|
1335
1381
|
});
|
|
1336
|
-
portabilityIssueAutomationTriggerManifestEntrySchema =
|
|
1337
|
-
kind:
|
|
1338
|
-
label:
|
|
1339
|
-
enabled:
|
|
1340
|
-
cronExpression:
|
|
1341
|
-
timezone:
|
|
1342
|
-
signingMode:
|
|
1343
|
-
replayWindowSec:
|
|
1382
|
+
portabilityIssueAutomationTriggerManifestEntrySchema = z10.object({
|
|
1383
|
+
kind: z10.string().min(1),
|
|
1384
|
+
label: z10.string().nullable(),
|
|
1385
|
+
enabled: z10.boolean(),
|
|
1386
|
+
cronExpression: z10.string().nullable(),
|
|
1387
|
+
timezone: z10.string().nullable(),
|
|
1388
|
+
signingMode: z10.string().nullable(),
|
|
1389
|
+
replayWindowSec: z10.number().int().nullable()
|
|
1344
1390
|
});
|
|
1345
|
-
portabilityIssueAutomationManifestEntrySchema =
|
|
1346
|
-
concurrencyPolicy:
|
|
1347
|
-
catchUpPolicy:
|
|
1348
|
-
triggers:
|
|
1391
|
+
portabilityIssueAutomationManifestEntrySchema = z10.object({
|
|
1392
|
+
concurrencyPolicy: z10.string().nullable(),
|
|
1393
|
+
catchUpPolicy: z10.string().nullable(),
|
|
1394
|
+
triggers: z10.array(portabilityIssueAutomationTriggerManifestEntrySchema).default([])
|
|
1349
1395
|
});
|
|
1350
|
-
portabilityIssueManifestEntrySchema =
|
|
1351
|
-
slug:
|
|
1352
|
-
identifier:
|
|
1353
|
-
title:
|
|
1354
|
-
path:
|
|
1355
|
-
projectSlug:
|
|
1356
|
-
projectWorkspaceKey:
|
|
1357
|
-
assigneeAgentSlug:
|
|
1358
|
-
description:
|
|
1359
|
-
recurring:
|
|
1396
|
+
portabilityIssueManifestEntrySchema = z10.object({
|
|
1397
|
+
slug: z10.string().min(1),
|
|
1398
|
+
identifier: z10.string().min(1).nullable(),
|
|
1399
|
+
title: z10.string().min(1),
|
|
1400
|
+
path: z10.string().min(1),
|
|
1401
|
+
projectSlug: z10.string().min(1).nullable(),
|
|
1402
|
+
projectWorkspaceKey: z10.string().min(1).nullable(),
|
|
1403
|
+
assigneeAgentSlug: z10.string().min(1).nullable(),
|
|
1404
|
+
description: z10.string().nullable(),
|
|
1405
|
+
recurring: z10.boolean().default(false),
|
|
1360
1406
|
automation: portabilityIssueAutomationManifestEntrySchema.nullable(),
|
|
1361
|
-
legacyRecurrence:
|
|
1362
|
-
status:
|
|
1363
|
-
priority:
|
|
1364
|
-
labelIds:
|
|
1365
|
-
billingCode:
|
|
1366
|
-
executionWorkspaceSettings:
|
|
1367
|
-
assigneeAgentRuntimeOverrides:
|
|
1368
|
-
metadata:
|
|
1407
|
+
legacyRecurrence: z10.record(z10.unknown()).nullable(),
|
|
1408
|
+
status: z10.string().nullable(),
|
|
1409
|
+
priority: z10.string().nullable(),
|
|
1410
|
+
labelIds: z10.array(z10.string().min(1)).default([]),
|
|
1411
|
+
billingCode: z10.string().nullable(),
|
|
1412
|
+
executionWorkspaceSettings: z10.record(z10.unknown()).nullable(),
|
|
1413
|
+
assigneeAgentRuntimeOverrides: z10.record(z10.unknown()).nullable(),
|
|
1414
|
+
metadata: z10.record(z10.unknown()).nullable()
|
|
1369
1415
|
});
|
|
1370
|
-
portabilityManifestSchema =
|
|
1371
|
-
schemaVersion:
|
|
1372
|
-
generatedAt:
|
|
1373
|
-
source:
|
|
1374
|
-
orgId:
|
|
1375
|
-
organizationName:
|
|
1416
|
+
portabilityManifestSchema = z10.object({
|
|
1417
|
+
schemaVersion: z10.number().int().positive(),
|
|
1418
|
+
generatedAt: z10.string().datetime(),
|
|
1419
|
+
source: z10.object({
|
|
1420
|
+
orgId: z10.string().uuid(),
|
|
1421
|
+
organizationName: z10.string().min(1)
|
|
1376
1422
|
}).nullable(),
|
|
1377
|
-
includes:
|
|
1378
|
-
organization:
|
|
1379
|
-
agents:
|
|
1380
|
-
projects:
|
|
1381
|
-
issues:
|
|
1382
|
-
skills:
|
|
1423
|
+
includes: z10.object({
|
|
1424
|
+
organization: z10.boolean(),
|
|
1425
|
+
agents: z10.boolean(),
|
|
1426
|
+
projects: z10.boolean(),
|
|
1427
|
+
issues: z10.boolean(),
|
|
1428
|
+
skills: z10.boolean()
|
|
1383
1429
|
}),
|
|
1384
1430
|
organization: portabilityOrganizationManifestEntrySchema.nullable(),
|
|
1385
1431
|
sidebar: portabilitySidebarOrderSchema.nullable(),
|
|
1386
|
-
agents:
|
|
1387
|
-
skills:
|
|
1388
|
-
projects:
|
|
1389
|
-
issues:
|
|
1390
|
-
envInputs:
|
|
1432
|
+
agents: z10.array(portabilityAgentManifestEntrySchema),
|
|
1433
|
+
skills: z10.array(portabilitySkillManifestEntrySchema).default([]),
|
|
1434
|
+
projects: z10.array(portabilityProjectManifestEntrySchema).default([]),
|
|
1435
|
+
issues: z10.array(portabilityIssueManifestEntrySchema).default([]),
|
|
1436
|
+
envInputs: z10.array(portabilityEnvInputSchema).default([])
|
|
1391
1437
|
});
|
|
1392
|
-
portabilitySourceSchema =
|
|
1393
|
-
|
|
1394
|
-
type:
|
|
1395
|
-
rootPath:
|
|
1396
|
-
files:
|
|
1438
|
+
portabilitySourceSchema = z10.discriminatedUnion("type", [
|
|
1439
|
+
z10.object({
|
|
1440
|
+
type: z10.literal("inline"),
|
|
1441
|
+
rootPath: z10.string().min(1).optional().nullable(),
|
|
1442
|
+
files: z10.record(portabilityFileEntrySchema)
|
|
1397
1443
|
}),
|
|
1398
|
-
|
|
1399
|
-
type:
|
|
1400
|
-
url:
|
|
1444
|
+
z10.object({
|
|
1445
|
+
type: z10.literal("github"),
|
|
1446
|
+
url: z10.string().url()
|
|
1401
1447
|
})
|
|
1402
1448
|
]);
|
|
1403
|
-
portabilityTargetSchema =
|
|
1404
|
-
|
|
1405
|
-
mode:
|
|
1406
|
-
newOrganizationName:
|
|
1449
|
+
portabilityTargetSchema = z10.discriminatedUnion("mode", [
|
|
1450
|
+
z10.object({
|
|
1451
|
+
mode: z10.literal("new_organization"),
|
|
1452
|
+
newOrganizationName: z10.string().min(1).optional().nullable(),
|
|
1453
|
+
newOrganizationIssueKey: organizationIssueKeySchema.optional().nullable()
|
|
1407
1454
|
}),
|
|
1408
|
-
|
|
1409
|
-
mode:
|
|
1410
|
-
orgId:
|
|
1455
|
+
z10.object({
|
|
1456
|
+
mode: z10.literal("existing_organization"),
|
|
1457
|
+
orgId: z10.string().uuid()
|
|
1411
1458
|
})
|
|
1412
1459
|
]);
|
|
1413
|
-
portabilityAgentSelectionSchema =
|
|
1414
|
-
|
|
1415
|
-
|
|
1460
|
+
portabilityAgentSelectionSchema = z10.union([
|
|
1461
|
+
z10.literal("all"),
|
|
1462
|
+
z10.array(z10.string().min(1))
|
|
1416
1463
|
]);
|
|
1417
|
-
portabilityCollisionStrategySchema =
|
|
1418
|
-
organizationPortabilityExportSchema =
|
|
1464
|
+
portabilityCollisionStrategySchema = z10.enum(["rename", "skip", "replace"]);
|
|
1465
|
+
organizationPortabilityExportSchema = z10.object({
|
|
1419
1466
|
include: portabilityIncludeSchema.optional(),
|
|
1420
|
-
agents:
|
|
1421
|
-
skills:
|
|
1422
|
-
projects:
|
|
1423
|
-
issues:
|
|
1424
|
-
projectIssues:
|
|
1425
|
-
selectedFiles:
|
|
1426
|
-
expandReferencedSkills:
|
|
1467
|
+
agents: z10.array(z10.string().min(1)).optional(),
|
|
1468
|
+
skills: z10.array(z10.string().min(1)).optional(),
|
|
1469
|
+
projects: z10.array(z10.string().min(1)).optional(),
|
|
1470
|
+
issues: z10.array(z10.string().min(1)).optional(),
|
|
1471
|
+
projectIssues: z10.array(z10.string().min(1)).optional(),
|
|
1472
|
+
selectedFiles: z10.array(z10.string().min(1)).optional(),
|
|
1473
|
+
expandReferencedSkills: z10.boolean().optional(),
|
|
1427
1474
|
sidebarOrder: portabilitySidebarOrderSchema.partial().optional()
|
|
1428
1475
|
});
|
|
1429
|
-
organizationPortabilityPreviewSchema =
|
|
1476
|
+
organizationPortabilityPreviewSchema = z10.object({
|
|
1430
1477
|
source: portabilitySourceSchema,
|
|
1431
1478
|
include: portabilityIncludeSchema.optional(),
|
|
1432
1479
|
target: portabilityTargetSchema,
|
|
1433
1480
|
agents: portabilityAgentSelectionSchema.optional(),
|
|
1434
1481
|
collisionStrategy: portabilityCollisionStrategySchema.optional(),
|
|
1435
|
-
nameOverrides:
|
|
1436
|
-
selectedFiles:
|
|
1482
|
+
nameOverrides: z10.record(z10.string().min(1), z10.string().min(1)).optional(),
|
|
1483
|
+
selectedFiles: z10.array(z10.string().min(1)).optional()
|
|
1437
1484
|
});
|
|
1438
|
-
portabilityAdapterOverrideSchema =
|
|
1439
|
-
agentRuntimeType:
|
|
1440
|
-
agentRuntimeConfig:
|
|
1485
|
+
portabilityAdapterOverrideSchema = z10.object({
|
|
1486
|
+
agentRuntimeType: z10.string().min(1),
|
|
1487
|
+
agentRuntimeConfig: z10.record(z10.unknown()).optional()
|
|
1441
1488
|
});
|
|
1442
1489
|
organizationPortabilityImportSchema = organizationPortabilityPreviewSchema.extend({
|
|
1443
|
-
agentRuntimeOverrides:
|
|
1490
|
+
agentRuntimeOverrides: z10.record(z10.string().min(1), portabilityAdapterOverrideSchema).optional()
|
|
1444
1491
|
});
|
|
1445
1492
|
}
|
|
1446
1493
|
});
|
|
1447
1494
|
|
|
1448
1495
|
// ../packages/shared/dist/validators/organization-skill.js
|
|
1449
|
-
import { z as
|
|
1496
|
+
import { z as z11 } from "zod";
|
|
1450
1497
|
var organizationSkillSourceTypeSchema, organizationSkillTrustLevelSchema, organizationSkillCompatibilitySchema, organizationSkillSourceBadgeSchema, organizationSkillFileInventoryEntrySchema, organizationSkillSchema, organizationSkillListItemSchema, organizationSkillUsageAgentSchema, organizationSkillDetailSchema, organizationSkillUpdateStatusSchema, organizationSkillImportSchema, organizationSkillProjectScanRequestSchema, organizationSkillProjectScanSkippedSchema, organizationSkillProjectScanConflictSchema, organizationSkillProjectScanResultSchema, organizationSkillLocalScanRequestSchema, organizationSkillLocalScanSkippedSchema, organizationSkillLocalScanConflictSchema, organizationSkillLocalScanResultSchema, organizationSkillCreateSchema, organizationSkillFileDetailSchema, organizationSkillFileUpdateSchema;
|
|
1451
1498
|
var init_organization_skill = __esm({
|
|
1452
1499
|
"../packages/shared/dist/validators/organization-skill.js"() {
|
|
1453
1500
|
"use strict";
|
|
1454
|
-
organizationSkillSourceTypeSchema =
|
|
1455
|
-
organizationSkillTrustLevelSchema =
|
|
1456
|
-
organizationSkillCompatibilitySchema =
|
|
1457
|
-
organizationSkillSourceBadgeSchema =
|
|
1501
|
+
organizationSkillSourceTypeSchema = z11.enum(["local_path", "github", "url", "catalog", "skills_sh"]);
|
|
1502
|
+
organizationSkillTrustLevelSchema = z11.enum(["markdown_only", "assets", "scripts_executables"]);
|
|
1503
|
+
organizationSkillCompatibilitySchema = z11.enum(["compatible", "unknown", "invalid"]);
|
|
1504
|
+
organizationSkillSourceBadgeSchema = z11.enum([
|
|
1458
1505
|
"rudder",
|
|
1459
1506
|
"community",
|
|
1460
1507
|
"github",
|
|
@@ -1463,199 +1510,146 @@ var init_organization_skill = __esm({
|
|
|
1463
1510
|
"catalog",
|
|
1464
1511
|
"skills_sh"
|
|
1465
1512
|
]);
|
|
1466
|
-
organizationSkillFileInventoryEntrySchema =
|
|
1467
|
-
path:
|
|
1468
|
-
kind:
|
|
1513
|
+
organizationSkillFileInventoryEntrySchema = z11.object({
|
|
1514
|
+
path: z11.string().min(1),
|
|
1515
|
+
kind: z11.enum(["skill", "markdown", "reference", "script", "asset", "other"])
|
|
1469
1516
|
});
|
|
1470
|
-
organizationSkillSchema =
|
|
1471
|
-
id:
|
|
1472
|
-
orgId:
|
|
1473
|
-
key:
|
|
1474
|
-
slug:
|
|
1475
|
-
name:
|
|
1476
|
-
description:
|
|
1477
|
-
markdown:
|
|
1517
|
+
organizationSkillSchema = z11.object({
|
|
1518
|
+
id: z11.string().uuid(),
|
|
1519
|
+
orgId: z11.string().uuid(),
|
|
1520
|
+
key: z11.string().min(1),
|
|
1521
|
+
slug: z11.string().min(1),
|
|
1522
|
+
name: z11.string().min(1),
|
|
1523
|
+
description: z11.string().nullable(),
|
|
1524
|
+
markdown: z11.string(),
|
|
1478
1525
|
sourceType: organizationSkillSourceTypeSchema,
|
|
1479
|
-
sourceLocator:
|
|
1480
|
-
sourceRef:
|
|
1526
|
+
sourceLocator: z11.string().nullable(),
|
|
1527
|
+
sourceRef: z11.string().nullable(),
|
|
1481
1528
|
trustLevel: organizationSkillTrustLevelSchema,
|
|
1482
1529
|
compatibility: organizationSkillCompatibilitySchema,
|
|
1483
|
-
fileInventory:
|
|
1484
|
-
metadata:
|
|
1485
|
-
createdAt:
|
|
1486
|
-
updatedAt:
|
|
1530
|
+
fileInventory: z11.array(organizationSkillFileInventoryEntrySchema).default([]),
|
|
1531
|
+
metadata: z11.record(z11.unknown()).nullable(),
|
|
1532
|
+
createdAt: z11.coerce.date(),
|
|
1533
|
+
updatedAt: z11.coerce.date()
|
|
1487
1534
|
});
|
|
1488
1535
|
organizationSkillListItemSchema = organizationSkillSchema.extend({
|
|
1489
|
-
attachedAgentCount:
|
|
1490
|
-
editable:
|
|
1491
|
-
editableReason:
|
|
1492
|
-
sourceLabel:
|
|
1536
|
+
attachedAgentCount: z11.number().int().nonnegative(),
|
|
1537
|
+
editable: z11.boolean(),
|
|
1538
|
+
editableReason: z11.string().nullable(),
|
|
1539
|
+
sourceLabel: z11.string().nullable(),
|
|
1493
1540
|
sourceBadge: organizationSkillSourceBadgeSchema,
|
|
1494
|
-
sourcePath:
|
|
1495
|
-
workspaceEditPath:
|
|
1541
|
+
sourcePath: z11.string().nullable(),
|
|
1542
|
+
workspaceEditPath: z11.string().nullable()
|
|
1496
1543
|
});
|
|
1497
|
-
organizationSkillUsageAgentSchema =
|
|
1498
|
-
id:
|
|
1499
|
-
name:
|
|
1500
|
-
urlKey:
|
|
1501
|
-
agentRuntimeType:
|
|
1502
|
-
desired:
|
|
1503
|
-
actualState:
|
|
1544
|
+
organizationSkillUsageAgentSchema = z11.object({
|
|
1545
|
+
id: z11.string().uuid(),
|
|
1546
|
+
name: z11.string().min(1),
|
|
1547
|
+
urlKey: z11.string().min(1),
|
|
1548
|
+
agentRuntimeType: z11.string().min(1),
|
|
1549
|
+
desired: z11.boolean(),
|
|
1550
|
+
actualState: z11.string().nullable()
|
|
1504
1551
|
});
|
|
1505
1552
|
organizationSkillDetailSchema = organizationSkillSchema.extend({
|
|
1506
|
-
attachedAgentCount:
|
|
1507
|
-
usedByAgents:
|
|
1508
|
-
editable:
|
|
1509
|
-
editableReason:
|
|
1510
|
-
sourceLabel:
|
|
1553
|
+
attachedAgentCount: z11.number().int().nonnegative(),
|
|
1554
|
+
usedByAgents: z11.array(organizationSkillUsageAgentSchema).default([]),
|
|
1555
|
+
editable: z11.boolean(),
|
|
1556
|
+
editableReason: z11.string().nullable(),
|
|
1557
|
+
sourceLabel: z11.string().nullable(),
|
|
1511
1558
|
sourceBadge: organizationSkillSourceBadgeSchema,
|
|
1512
|
-
sourcePath:
|
|
1513
|
-
workspaceEditPath:
|
|
1559
|
+
sourcePath: z11.string().nullable(),
|
|
1560
|
+
workspaceEditPath: z11.string().nullable()
|
|
1514
1561
|
});
|
|
1515
|
-
organizationSkillUpdateStatusSchema =
|
|
1516
|
-
supported:
|
|
1517
|
-
reason:
|
|
1518
|
-
trackingRef:
|
|
1519
|
-
currentRef:
|
|
1520
|
-
latestRef:
|
|
1521
|
-
hasUpdate:
|
|
1562
|
+
organizationSkillUpdateStatusSchema = z11.object({
|
|
1563
|
+
supported: z11.boolean(),
|
|
1564
|
+
reason: z11.string().nullable(),
|
|
1565
|
+
trackingRef: z11.string().nullable(),
|
|
1566
|
+
currentRef: z11.string().nullable(),
|
|
1567
|
+
latestRef: z11.string().nullable(),
|
|
1568
|
+
hasUpdate: z11.boolean()
|
|
1522
1569
|
});
|
|
1523
|
-
organizationSkillImportSchema =
|
|
1524
|
-
source:
|
|
1570
|
+
organizationSkillImportSchema = z11.object({
|
|
1571
|
+
source: z11.string().min(1)
|
|
1525
1572
|
});
|
|
1526
|
-
organizationSkillProjectScanRequestSchema =
|
|
1527
|
-
projectIds:
|
|
1528
|
-
workspaceIds:
|
|
1573
|
+
organizationSkillProjectScanRequestSchema = z11.object({
|
|
1574
|
+
projectIds: z11.array(z11.string().uuid()).optional(),
|
|
1575
|
+
workspaceIds: z11.array(z11.string().uuid()).optional()
|
|
1529
1576
|
});
|
|
1530
|
-
organizationSkillProjectScanSkippedSchema =
|
|
1531
|
-
projectId:
|
|
1532
|
-
projectName:
|
|
1533
|
-
workspaceId:
|
|
1534
|
-
workspaceName:
|
|
1535
|
-
path:
|
|
1536
|
-
reason:
|
|
1577
|
+
organizationSkillProjectScanSkippedSchema = z11.object({
|
|
1578
|
+
projectId: z11.string().uuid(),
|
|
1579
|
+
projectName: z11.string().min(1),
|
|
1580
|
+
workspaceId: z11.string().uuid().nullable(),
|
|
1581
|
+
workspaceName: z11.string().nullable(),
|
|
1582
|
+
path: z11.string().nullable(),
|
|
1583
|
+
reason: z11.string().min(1)
|
|
1537
1584
|
});
|
|
1538
|
-
organizationSkillProjectScanConflictSchema =
|
|
1539
|
-
slug:
|
|
1540
|
-
key:
|
|
1541
|
-
projectId:
|
|
1542
|
-
projectName:
|
|
1543
|
-
workspaceId:
|
|
1544
|
-
workspaceName:
|
|
1545
|
-
path:
|
|
1546
|
-
existingSkillId:
|
|
1547
|
-
existingSkillKey:
|
|
1548
|
-
existingSourceLocator:
|
|
1549
|
-
reason:
|
|
1585
|
+
organizationSkillProjectScanConflictSchema = z11.object({
|
|
1586
|
+
slug: z11.string().min(1),
|
|
1587
|
+
key: z11.string().min(1),
|
|
1588
|
+
projectId: z11.string().uuid(),
|
|
1589
|
+
projectName: z11.string().min(1),
|
|
1590
|
+
workspaceId: z11.string().uuid(),
|
|
1591
|
+
workspaceName: z11.string().min(1),
|
|
1592
|
+
path: z11.string().min(1),
|
|
1593
|
+
existingSkillId: z11.string().uuid(),
|
|
1594
|
+
existingSkillKey: z11.string().min(1),
|
|
1595
|
+
existingSourceLocator: z11.string().nullable(),
|
|
1596
|
+
reason: z11.string().min(1)
|
|
1550
1597
|
});
|
|
1551
|
-
organizationSkillProjectScanResultSchema =
|
|
1552
|
-
scannedProjects:
|
|
1553
|
-
scannedWorkspaces:
|
|
1554
|
-
discovered:
|
|
1555
|
-
imported:
|
|
1556
|
-
updated:
|
|
1557
|
-
skipped:
|
|
1558
|
-
conflicts:
|
|
1559
|
-
warnings:
|
|
1598
|
+
organizationSkillProjectScanResultSchema = z11.object({
|
|
1599
|
+
scannedProjects: z11.number().int().nonnegative(),
|
|
1600
|
+
scannedWorkspaces: z11.number().int().nonnegative(),
|
|
1601
|
+
discovered: z11.number().int().nonnegative(),
|
|
1602
|
+
imported: z11.array(organizationSkillSchema),
|
|
1603
|
+
updated: z11.array(organizationSkillSchema),
|
|
1604
|
+
skipped: z11.array(organizationSkillProjectScanSkippedSchema),
|
|
1605
|
+
conflicts: z11.array(organizationSkillProjectScanConflictSchema),
|
|
1606
|
+
warnings: z11.array(z11.string())
|
|
1560
1607
|
});
|
|
1561
|
-
organizationSkillLocalScanRequestSchema =
|
|
1562
|
-
roots:
|
|
1608
|
+
organizationSkillLocalScanRequestSchema = z11.object({
|
|
1609
|
+
roots: z11.array(z11.string().min(1)).optional()
|
|
1563
1610
|
});
|
|
1564
|
-
organizationSkillLocalScanSkippedSchema =
|
|
1565
|
-
root:
|
|
1566
|
-
path:
|
|
1567
|
-
reason:
|
|
1611
|
+
organizationSkillLocalScanSkippedSchema = z11.object({
|
|
1612
|
+
root: z11.string().min(1),
|
|
1613
|
+
path: z11.string().nullable(),
|
|
1614
|
+
reason: z11.string().min(1)
|
|
1568
1615
|
});
|
|
1569
|
-
organizationSkillLocalScanConflictSchema =
|
|
1570
|
-
root:
|
|
1571
|
-
path:
|
|
1572
|
-
slug:
|
|
1573
|
-
key:
|
|
1574
|
-
existingSkillId:
|
|
1575
|
-
existingSkillKey:
|
|
1576
|
-
existingSourceLocator:
|
|
1577
|
-
reason:
|
|
1616
|
+
organizationSkillLocalScanConflictSchema = z11.object({
|
|
1617
|
+
root: z11.string().min(1),
|
|
1618
|
+
path: z11.string().min(1),
|
|
1619
|
+
slug: z11.string().min(1),
|
|
1620
|
+
key: z11.string().min(1),
|
|
1621
|
+
existingSkillId: z11.string().uuid(),
|
|
1622
|
+
existingSkillKey: z11.string().min(1),
|
|
1623
|
+
existingSourceLocator: z11.string().nullable(),
|
|
1624
|
+
reason: z11.string().min(1)
|
|
1578
1625
|
});
|
|
1579
|
-
organizationSkillLocalScanResultSchema =
|
|
1580
|
-
scannedRoots:
|
|
1581
|
-
discovered:
|
|
1582
|
-
imported:
|
|
1583
|
-
updated:
|
|
1584
|
-
skipped:
|
|
1585
|
-
conflicts:
|
|
1586
|
-
warnings:
|
|
1626
|
+
organizationSkillLocalScanResultSchema = z11.object({
|
|
1627
|
+
scannedRoots: z11.number().int().nonnegative(),
|
|
1628
|
+
discovered: z11.number().int().nonnegative(),
|
|
1629
|
+
imported: z11.array(organizationSkillSchema),
|
|
1630
|
+
updated: z11.array(organizationSkillSchema),
|
|
1631
|
+
skipped: z11.array(organizationSkillLocalScanSkippedSchema),
|
|
1632
|
+
conflicts: z11.array(organizationSkillLocalScanConflictSchema),
|
|
1633
|
+
warnings: z11.array(z11.string())
|
|
1587
1634
|
});
|
|
1588
|
-
organizationSkillCreateSchema =
|
|
1589
|
-
name: z10.string().min(1),
|
|
1590
|
-
slug: z10.string().min(1).nullable().optional(),
|
|
1591
|
-
description: z10.string().nullable().optional(),
|
|
1592
|
-
markdown: z10.string().nullable().optional()
|
|
1593
|
-
});
|
|
1594
|
-
organizationSkillFileDetailSchema = z10.object({
|
|
1595
|
-
skillId: z10.string().uuid(),
|
|
1596
|
-
path: z10.string().min(1),
|
|
1597
|
-
kind: z10.enum(["skill", "markdown", "reference", "script", "asset", "other"]),
|
|
1598
|
-
content: z10.string(),
|
|
1599
|
-
language: z10.string().nullable(),
|
|
1600
|
-
markdown: z10.boolean(),
|
|
1601
|
-
editable: z10.boolean()
|
|
1602
|
-
});
|
|
1603
|
-
organizationSkillFileUpdateSchema = z10.object({
|
|
1604
|
-
path: z10.string().min(1),
|
|
1605
|
-
content: z10.string()
|
|
1606
|
-
});
|
|
1607
|
-
}
|
|
1608
|
-
});
|
|
1609
|
-
|
|
1610
|
-
// ../packages/shared/dist/validators/organization.js
|
|
1611
|
-
import { z as z11 } from "zod";
|
|
1612
|
-
var logoAssetIdSchema, brandColorSchema, createOrganizationSchema, updateOrganizationSchema, updateOrganizationBrandingSchema, updateOrganizationWorkspaceFileSchema, createOrganizationWorkspaceFileSchema, createOrganizationWorkspaceDirectorySchema, renameOrganizationWorkspaceEntrySchema, moveOrganizationWorkspaceEntrySchema, copyOrganizationWorkspaceEntrySchema;
|
|
1613
|
-
var init_organization = __esm({
|
|
1614
|
-
"../packages/shared/dist/validators/organization.js"() {
|
|
1615
|
-
"use strict";
|
|
1616
|
-
init_constants();
|
|
1617
|
-
logoAssetIdSchema = z11.string().uuid().nullable().optional();
|
|
1618
|
-
brandColorSchema = z11.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional();
|
|
1619
|
-
createOrganizationSchema = z11.object({
|
|
1635
|
+
organizationSkillCreateSchema = z11.object({
|
|
1620
1636
|
name: z11.string().min(1),
|
|
1621
|
-
|
|
1622
|
-
budgetMonthlyCents: z11.number().int().nonnegative().optional().default(0),
|
|
1623
|
-
defaultChatIssueCreationMode: z11.enum(CHAT_ISSUE_CREATION_MODES).optional().default("manual_approval"),
|
|
1624
|
-
brandColor: brandColorSchema,
|
|
1625
|
-
requireBoardApprovalForNewAgents: z11.boolean().optional()
|
|
1626
|
-
});
|
|
1627
|
-
updateOrganizationSchema = createOrganizationSchema.partial().extend({
|
|
1628
|
-
status: z11.enum(ORGANIZATION_STATUSES).optional(),
|
|
1629
|
-
spentMonthlyCents: z11.number().int().nonnegative().optional(),
|
|
1630
|
-
requireBoardApprovalForNewAgents: z11.boolean().optional(),
|
|
1631
|
-
defaultChatIssueCreationMode: z11.enum(CHAT_ISSUE_CREATION_MODES).optional(),
|
|
1632
|
-
brandColor: brandColorSchema,
|
|
1633
|
-
logoAssetId: logoAssetIdSchema
|
|
1634
|
-
});
|
|
1635
|
-
updateOrganizationBrandingSchema = z11.object({
|
|
1636
|
-
name: z11.string().min(1).optional(),
|
|
1637
|
+
slug: z11.string().min(1).nullable().optional(),
|
|
1637
1638
|
description: z11.string().nullable().optional(),
|
|
1638
|
-
|
|
1639
|
-
logoAssetId: logoAssetIdSchema
|
|
1640
|
-
}).strict().refine((value) => value.name !== void 0 || value.description !== void 0 || value.brandColor !== void 0 || value.logoAssetId !== void 0, "At least one branding field must be provided");
|
|
1641
|
-
updateOrganizationWorkspaceFileSchema = z11.object({
|
|
1642
|
-
content: z11.string()
|
|
1643
|
-
});
|
|
1644
|
-
createOrganizationWorkspaceFileSchema = z11.object({
|
|
1645
|
-
filePath: z11.string().trim().min(1).max(1e3),
|
|
1646
|
-
content: z11.string().optional().default("")
|
|
1647
|
-
});
|
|
1648
|
-
createOrganizationWorkspaceDirectorySchema = z11.object({
|
|
1649
|
-
directoryPath: z11.string().trim().min(1).max(1e3)
|
|
1650
|
-
});
|
|
1651
|
-
renameOrganizationWorkspaceEntrySchema = z11.object({
|
|
1652
|
-
name: z11.string().trim().min(1).max(255)
|
|
1639
|
+
markdown: z11.string().nullable().optional()
|
|
1653
1640
|
});
|
|
1654
|
-
|
|
1655
|
-
|
|
1641
|
+
organizationSkillFileDetailSchema = z11.object({
|
|
1642
|
+
skillId: z11.string().uuid(),
|
|
1643
|
+
path: z11.string().min(1),
|
|
1644
|
+
kind: z11.enum(["skill", "markdown", "reference", "script", "asset", "other"]),
|
|
1645
|
+
content: z11.string(),
|
|
1646
|
+
language: z11.string().nullable(),
|
|
1647
|
+
markdown: z11.boolean(),
|
|
1648
|
+
editable: z11.boolean()
|
|
1656
1649
|
});
|
|
1657
|
-
|
|
1658
|
-
|
|
1650
|
+
organizationSkillFileUpdateSchema = z11.object({
|
|
1651
|
+
path: z11.string().min(1),
|
|
1652
|
+
content: z11.string()
|
|
1659
1653
|
});
|
|
1660
1654
|
}
|
|
1661
1655
|
});
|
|
@@ -3188,7 +3182,7 @@ var init_issue_activity = __esm({
|
|
|
3188
3182
|
|
|
3189
3183
|
// ../packages/shared/dist/config-schema.js
|
|
3190
3184
|
import { z as z29 } from "zod";
|
|
3191
|
-
var DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES, configMetaSchema, llmConfigSchema, databaseBackupConfigSchema, databaseConfigSchema, loggingConfigSchema, serverConfigSchema, authConfigSchema, storageLocalDiskConfigSchema, storageS3ConfigSchema, storageConfigSchema, secretsLocalEncryptedConfigSchema, secretsConfigSchema,
|
|
3185
|
+
var DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES, configMetaSchema, llmConfigSchema, databaseBackupConfigSchema, databaseConfigSchema, loggingConfigSchema, serverConfigSchema, authConfigSchema, storageLocalDiskConfigSchema, storageS3ConfigSchema, storageConfigSchema, secretsLocalEncryptedConfigSchema, secretsConfigSchema, rudderConfigSchema;
|
|
3192
3186
|
var init_config_schema = __esm({
|
|
3193
3187
|
"../packages/shared/dist/config-schema.js"() {
|
|
3194
3188
|
"use strict";
|
|
@@ -3272,14 +3266,6 @@ var init_config_schema = __esm({
|
|
|
3272
3266
|
keyFilePath: "~/.rudder/instances/default/secrets/master.key"
|
|
3273
3267
|
})
|
|
3274
3268
|
});
|
|
3275
|
-
langfuseConfigSchema = z29.object({
|
|
3276
|
-
installed: z29.boolean().optional(),
|
|
3277
|
-
enabled: z29.boolean().default(false),
|
|
3278
|
-
baseUrl: z29.string().url().default("http://localhost:3000"),
|
|
3279
|
-
publicKey: z29.string().optional(),
|
|
3280
|
-
secretKey: z29.string().optional(),
|
|
3281
|
-
environment: z29.string().optional()
|
|
3282
|
-
});
|
|
3283
3269
|
rudderConfigSchema = z29.object({
|
|
3284
3270
|
$meta: configMetaSchema,
|
|
3285
3271
|
llm: llmConfigSchema.optional(),
|
|
@@ -3308,8 +3294,7 @@ var init_config_schema = __esm({
|
|
|
3308
3294
|
localEncrypted: {
|
|
3309
3295
|
keyFilePath: "~/.rudder/instances/default/secrets/master.key"
|
|
3310
3296
|
}
|
|
3311
|
-
})
|
|
3312
|
-
langfuse: langfuseConfigSchema.optional()
|
|
3297
|
+
})
|
|
3313
3298
|
}).superRefine((value, ctx) => {
|
|
3314
3299
|
if (value.server.deploymentMode === "local_trusted") {
|
|
3315
3300
|
if (value.server.exposure !== "private") {
|
|
@@ -3353,7 +3338,6 @@ var init_dist = __esm({
|
|
|
3353
3338
|
init_chat_work_manifest();
|
|
3354
3339
|
init_constants();
|
|
3355
3340
|
init_agent_run();
|
|
3356
|
-
init_observability();
|
|
3357
3341
|
init_workspace_backup();
|
|
3358
3342
|
init_website_icons();
|
|
3359
3343
|
init_custom_integration();
|
|
@@ -3362,6 +3346,7 @@ var init_dist = __esm({
|
|
|
3362
3346
|
init_agent_url_key();
|
|
3363
3347
|
init_api();
|
|
3364
3348
|
init_messenger_preview();
|
|
3349
|
+
init_organization_issue_key();
|
|
3365
3350
|
init_organization_skill_reference();
|
|
3366
3351
|
init_organization_url_key();
|
|
3367
3352
|
init_project_mentions();
|
|
@@ -7888,9 +7873,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7888
7873
|
},
|
|
7889
7874
|
{
|
|
7890
7875
|
id: "runs.list",
|
|
7891
|
-
command: "rudder runs list --org-id <id> [--used-skill <skill>] [--loaded-skill <skill>]",
|
|
7876
|
+
command: "rudder runs list --org-id <id> [--used-skill <skill>] [--loaded-skill <skill>] [--cursor <cursor>] [--full]",
|
|
7892
7877
|
category: "runs",
|
|
7893
|
-
description: "List
|
|
7878
|
+
description: "List lightweight run summaries with stable pagination and filters; use --full only for legacy full-row compatibility.",
|
|
7894
7879
|
mutating: false,
|
|
7895
7880
|
contract: "agent-v1",
|
|
7896
7881
|
requiresOrgId: true,
|
|
@@ -7900,9 +7885,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7900
7885
|
},
|
|
7901
7886
|
{
|
|
7902
7887
|
id: "runs.by-skill",
|
|
7903
|
-
command: "rudder runs by-skill <skill> --org-id <id> [--evidence <used-or-loaded>]",
|
|
7888
|
+
command: "rudder runs by-skill <skill> --org-id <id> [--evidence <used-or-loaded>] [--cursor <cursor>] [--full]",
|
|
7904
7889
|
category: "runs",
|
|
7905
|
-
description: "Build a skill evidence packet from
|
|
7890
|
+
description: "Build a paginated skill evidence packet from lightweight run summaries; use --full only for legacy full-row compatibility.",
|
|
7906
7891
|
mutating: false,
|
|
7907
7892
|
contract: "agent-v1",
|
|
7908
7893
|
requiresOrgId: true,
|
|
@@ -7924,9 +7909,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7924
7909
|
},
|
|
7925
7910
|
{
|
|
7926
7911
|
id: "runs.events",
|
|
7927
|
-
command: "rudder runs events <run-id>",
|
|
7912
|
+
command: "rudder runs events <run-id> [--after-seq <n>] [--limit <n>]",
|
|
7928
7913
|
category: "runs",
|
|
7929
|
-
description: "List persisted run events.",
|
|
7914
|
+
description: "List a bounded page of persisted run events with a sequence cursor.",
|
|
7930
7915
|
mutating: false,
|
|
7931
7916
|
contract: "agent-v1",
|
|
7932
7917
|
requiresOrgId: false,
|
|
@@ -7936,9 +7921,9 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
7936
7921
|
},
|
|
7937
7922
|
{
|
|
7938
7923
|
id: "runs.log",
|
|
7939
|
-
command: "rudder runs log <run-id>",
|
|
7924
|
+
command: "rudder runs log <run-id> [--offset <bytes>] [--limit-bytes <n>]",
|
|
7940
7925
|
category: "runs",
|
|
7941
|
-
description: "Read stored run log content
|
|
7926
|
+
description: "Read a bounded byte range of stored run log content.",
|
|
7942
7927
|
mutating: false,
|
|
7943
7928
|
contract: "agent-v1",
|
|
7944
7929
|
requiresOrgId: false,
|
|
@@ -8185,7 +8170,10 @@ function mcpInputSchemaForCapability(id) {
|
|
|
8185
8170
|
turnLimit: "Maximum turns to return.",
|
|
8186
8171
|
contextTurns: "Number of context turns.",
|
|
8187
8172
|
maxChars: "Maximum characters.",
|
|
8188
|
-
snippetChars: "Maximum snippet characters."
|
|
8173
|
+
snippetChars: "Maximum snippet characters.",
|
|
8174
|
+
afterSeq: "Return events after this sequence number.",
|
|
8175
|
+
offset: "Byte offset for ranged reads.",
|
|
8176
|
+
limitBytes: "Maximum bytes for ranged reads."
|
|
8189
8177
|
})) {
|
|
8190
8178
|
add(key, mcpNumber(description));
|
|
8191
8179
|
}
|
|
@@ -8198,7 +8186,7 @@ function mcpInputSchemaForCapability(id) {
|
|
|
8198
8186
|
})) {
|
|
8199
8187
|
add(key, mcpStringArray(description));
|
|
8200
8188
|
}
|
|
8201
|
-
for (const key of ["clearTitle", "clearCapabilities", "clearDescription", "clearReportsTo", "enable", "enabled", "disabled", "reopen", "planMode", "includeTranscript", "includeOutput", "includeOutputs", "notifyOnIssueCreated", "errorsOnly", "chronological", "narrative", "submit"]) {
|
|
8189
|
+
for (const key of ["clearTitle", "clearCapabilities", "clearDescription", "clearReportsTo", "enable", "enabled", "disabled", "reopen", "planMode", "includeTranscript", "includeOutput", "includeOutputs", "notifyOnIssueCreated", "errorsOnly", "chronological", "narrative", "submit", "full"]) {
|
|
8202
8190
|
add(key, mcpBoolean(`Boolean option ${key}.`));
|
|
8203
8191
|
}
|
|
8204
8192
|
return {
|
|
@@ -9134,7 +9122,9 @@ function cliArgsForCapability(capabilityId, input, tempFiles, env) {
|
|
|
9134
9122
|
pushOptional(args, "--used-skill", input.usedSkill);
|
|
9135
9123
|
pushOptional(args, "--loaded-skill", input.loadedSkill);
|
|
9136
9124
|
pushOptional(args, "--created-before", input.createdBefore);
|
|
9125
|
+
pushOptional(args, "--cursor", input.cursor);
|
|
9137
9126
|
pushOptional(args, "--limit", input.limit);
|
|
9127
|
+
pushBoolean(args, "--full", input.full);
|
|
9138
9128
|
return args;
|
|
9139
9129
|
}
|
|
9140
9130
|
case "runs.by-skill": {
|
|
@@ -9145,16 +9135,24 @@ function cliArgsForCapability(capabilityId, input, tempFiles, env) {
|
|
|
9145
9135
|
pushOptional(args, "--runtime", input.runtime);
|
|
9146
9136
|
pushOptional(args, "--issue-id", input.issueId);
|
|
9147
9137
|
pushOptional(args, "--created-before", input.createdBefore);
|
|
9138
|
+
pushOptional(args, "--cursor", input.cursor);
|
|
9148
9139
|
pushOptional(args, "--limit", input.limit);
|
|
9140
|
+
pushBoolean(args, "--full", input.full);
|
|
9149
9141
|
return args;
|
|
9150
9142
|
}
|
|
9151
9143
|
case "runs.get":
|
|
9152
9144
|
return ["runs", "get", requiredString(input, "run")];
|
|
9153
|
-
case "runs.events":
|
|
9154
|
-
|
|
9145
|
+
case "runs.events": {
|
|
9146
|
+
const args = ["runs", "events", requiredString(input, "run")];
|
|
9147
|
+
pushOptional(args, "--after-seq", input.afterSeq);
|
|
9148
|
+
pushOptional(args, "--limit", input.limit);
|
|
9149
|
+
return args;
|
|
9150
|
+
}
|
|
9155
9151
|
case "runs.log": {
|
|
9156
9152
|
const args = ["runs", "log", requiredString(input, "run")];
|
|
9157
9153
|
pushOptional(args, "--max-chars", input.maxChars);
|
|
9154
|
+
pushOptional(args, "--offset", input.offset);
|
|
9155
|
+
pushOptional(args, "--limit-bytes", input.limitBytes);
|
|
9158
9156
|
return args;
|
|
9159
9157
|
}
|
|
9160
9158
|
case "runs.transcript": {
|
|
@@ -12773,7 +12771,7 @@ function registerCompanyCommands(program) {
|
|
|
12773
12771
|
})
|
|
12774
12772
|
);
|
|
12775
12773
|
addCommonClientOptions(
|
|
12776
|
-
company.command("import").description("Import a portable markdown organization package from local path, URL, or GitHub").argument("<fromPathOrUrl>", "Source path or URL").option("--include <values>", "Comma-separated include set: organization,agents,projects,issues,tasks,skills").option("--target <mode>", "Target mode: new | existing").option("-O, --org-id <id>", "Existing target organization ID").option("--new-organization-name <name>", "Name override for --target new").option("--agents <list>", "Comma-separated agent slugs to import, or all", "all").option("--collision <mode>", "Collision strategy: rename | skip | replace", "rename").option("--ref <value>", "Git ref to use for GitHub imports (branch, tag, or commit)").option("--rudder-url <url>", "Alias for --api-base on this command").option("--yes", "Accept default selection and skip the pre-import confirmation prompt", false).option("--dry-run", "Run preview only without applying", false).action(async (fromPathOrUrl, opts) => {
|
|
12774
|
+
company.command("import").description("Import a portable markdown organization package from local path, URL, or GitHub").argument("<fromPathOrUrl>", "Source path or URL").option("--include <values>", "Comma-separated include set: organization,agents,projects,issues,tasks,skills").option("--target <mode>", "Target mode: new | existing").option("-O, --org-id <id>", "Existing target organization ID").option("--new-organization-name <name>", "Name override for --target new").option("--new-organization-issue-key <key>", "Issue Key override for --target new").option("--agents <list>", "Comma-separated agent slugs to import, or all", "all").option("--collision <mode>", "Collision strategy: rename | skip | replace", "rename").option("--ref <value>", "Git ref to use for GitHub imports (branch, tag, or commit)").option("--rudder-url <url>", "Alias for --api-base on this command").option("--yes", "Accept default selection and skip the pre-import confirmation prompt", false).option("--dry-run", "Run preview only without applying", false).action(async (fromPathOrUrl, opts) => {
|
|
12777
12775
|
try {
|
|
12778
12776
|
if (!opts.apiBase?.trim() && opts.rudderUrl?.trim()) {
|
|
12779
12777
|
opts.apiBase = opts.rudderUrl.trim();
|
|
@@ -12801,7 +12799,8 @@ function registerCompanyCommands(program) {
|
|
|
12801
12799
|
orgId: existingTargetOrganizationId
|
|
12802
12800
|
} : {
|
|
12803
12801
|
mode: "new_organization",
|
|
12804
|
-
newOrganizationName: opts.newOrganizationName?.trim() || null
|
|
12802
|
+
newOrganizationName: opts.newOrganizationName?.trim() || null,
|
|
12803
|
+
newOrganizationIssueKey: opts.newOrganizationIssueKey?.trim() || null
|
|
12805
12804
|
};
|
|
12806
12805
|
if (targetPayload.mode === "existing_organization" && !targetPayload.orgId) {
|
|
12807
12806
|
throw new Error("Target existing organization requires --org-id (or context default orgId).");
|
|
@@ -14155,7 +14154,7 @@ function projectPath(projectRef, orgId) {
|
|
|
14155
14154
|
function registerRunsCommands(program) {
|
|
14156
14155
|
const runs = program.command("runs").description("Run debugging operations");
|
|
14157
14156
|
addCommonClientOptions(
|
|
14158
|
-
runs.command("list").description(getAgentCliCapabilityById("runs.list").description).option("-O, --org-id <id>", "Organization ID").option("--updated-after <iso>", "Only runs updated after this timestamp").option("--run-id-prefix <prefix>", "Filter by run ID prefix").option("--agent-id <id>", "Filter by agent ID").option("--status <status>", "Filter by run status").option("--runtime <type>", "Filter by runtime type").option("--issue-id <id>", "Filter by linked issue ID").option("--used-skill <key-or-name>", "Filter by skill actually used during the run").option("--loaded-skill <key-or-name>", "Filter by skill loaded for the run").option("--created-before <iso>", "Only runs created before this timestamp").option("--limit <n>", "Maximum rows", "
|
|
14157
|
+
runs.command("list").description(getAgentCliCapabilityById("runs.list").description).option("-O, --org-id <id>", "Organization ID").option("--updated-after <iso>", "Only runs updated after this timestamp").option("--run-id-prefix <prefix>", "Filter by run ID prefix").option("--agent-id <id>", "Filter by agent ID").option("--status <status>", "Filter by run status").option("--runtime <type>", "Filter by runtime type").option("--issue-id <id>", "Filter by linked issue ID").option("--used-skill <key-or-name>", "Filter by skill actually used during the run").option("--loaded-skill <key-or-name>", "Filter by skill loaded for the run").option("--created-before <iso>", "Only runs created before this timestamp").option("--cursor <cursor>", "Stable summary cursor returned in page.nextCursor").option("--limit <n>", "Maximum rows; defaults to 50 summaries or 200 full rows").option("--full", "Use the legacy full-row list response for compatibility").addHelpText("after", formatExamplesAndCautions({
|
|
14159
14158
|
examples: [
|
|
14160
14159
|
{
|
|
14161
14160
|
description: "Find recent failures for one agent before opening transcripts:",
|
|
@@ -14174,8 +14173,13 @@ function registerRunsCommands(program) {
|
|
|
14174
14173
|
try {
|
|
14175
14174
|
assertSingleSkillFilter(opts);
|
|
14176
14175
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
14177
|
-
|
|
14178
|
-
|
|
14176
|
+
if (opts.full) {
|
|
14177
|
+
const rows = await ctx.api.get(`/api/run-intelligence/orgs/${ctx.orgId}/runs?${buildRunsListQuery(opts)}`) ?? [];
|
|
14178
|
+
printOutput(ctx.json ? rows : rows.map(formatRunListRow), { json: ctx.json });
|
|
14179
|
+
return;
|
|
14180
|
+
}
|
|
14181
|
+
const page = await ctx.api.get(`/api/run-intelligence/orgs/${ctx.orgId}/runs?${buildRunsListQuery(opts)}`);
|
|
14182
|
+
printOutput(ctx.json ? page : formatRunSummaryPage(page), { json: ctx.json });
|
|
14179
14183
|
} catch (err) {
|
|
14180
14184
|
handleCommandError(err);
|
|
14181
14185
|
}
|
|
@@ -14183,13 +14187,19 @@ function registerRunsCommands(program) {
|
|
|
14183
14187
|
{ includeCompany: false }
|
|
14184
14188
|
);
|
|
14185
14189
|
addCommonClientOptions(
|
|
14186
|
-
runs.command("by-skill").description(getAgentCliCapabilityById("runs.by-skill").description).argument("<skill>", "Skill key or display name").option("-O, --org-id <id>", "Organization ID").option("--evidence <used|loaded>", "Evidence type to match; defaults to used", "used").option("--agent-id <id>", "Filter by agent ID").option("--status <status>", "Filter by run status").option("--runtime <type>", "Filter by runtime type").option("--issue-id <id>", "Filter by linked issue ID").option("--created-before <iso>", "Only runs created before this timestamp").option("--limit <n>", "Maximum rows", "50").action(async (skill, opts) => {
|
|
14190
|
+
runs.command("by-skill").description(getAgentCliCapabilityById("runs.by-skill").description).argument("<skill>", "Skill key or display name").option("-O, --org-id <id>", "Organization ID").option("--evidence <used|loaded>", "Evidence type to match; defaults to used", "used").option("--agent-id <id>", "Filter by agent ID").option("--status <status>", "Filter by run status").option("--runtime <type>", "Filter by runtime type").option("--issue-id <id>", "Filter by linked issue ID").option("--created-before <iso>", "Only runs created before this timestamp").option("--cursor <cursor>", "Stable summary cursor returned in page.nextCursor").option("--limit <n>", "Maximum rows", "50").option("--full", "Use the legacy full-row list response for compatibility").action(async (skill, opts) => {
|
|
14187
14191
|
try {
|
|
14188
14192
|
const evidenceType = parseSkillEvidenceType(opts.evidence);
|
|
14189
14193
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
14190
14194
|
const params = buildRunsBySkillQuery(skill, opts, evidenceType);
|
|
14191
|
-
|
|
14192
|
-
|
|
14195
|
+
if (opts.full) {
|
|
14196
|
+
const rows = await ctx.api.get(`/api/run-intelligence/orgs/${ctx.orgId}/runs?${params}`) ?? [];
|
|
14197
|
+
const report2 = buildSkillRunReport(skill, evidenceType, rows);
|
|
14198
|
+
printOutput(ctx.json ? report2 : formatSkillRunReport(report2), { json: ctx.json });
|
|
14199
|
+
return;
|
|
14200
|
+
}
|
|
14201
|
+
const page = await ctx.api.get(`/api/run-intelligence/orgs/${ctx.orgId}/runs?${params}`);
|
|
14202
|
+
const report = buildSkillRunReport(skill, evidenceType, page?.items ?? [], page?.page);
|
|
14193
14203
|
printOutput(ctx.json ? report : formatSkillRunReport(report), { json: ctx.json });
|
|
14194
14204
|
} catch (err) {
|
|
14195
14205
|
handleCommandError(err);
|
|
@@ -14209,21 +14219,33 @@ function registerRunsCommands(program) {
|
|
|
14209
14219
|
})
|
|
14210
14220
|
);
|
|
14211
14221
|
addCommonClientOptions(
|
|
14212
|
-
runs.command("events").description(getAgentCliCapabilityById("runs.events").description).argument("<runId>", "Run ID or short run ID").action(async (runId, opts) => {
|
|
14222
|
+
runs.command("events").description(getAgentCliCapabilityById("runs.events").description).argument("<runId>", "Run ID or short run ID").option("--after-seq <n>", "Return events after this sequence number", "0").option("--limit <n>", "Maximum events to return", "200").action(async (runId, opts) => {
|
|
14213
14223
|
try {
|
|
14214
14224
|
const ctx = resolveCommandContext(opts);
|
|
14215
|
-
const
|
|
14216
|
-
|
|
14225
|
+
const params = new URLSearchParams({
|
|
14226
|
+
afterSeq: String(parseNonNegativeInteger(opts.afterSeq, 0)),
|
|
14227
|
+
limit: String(parseLimit2(opts.limit, 200))
|
|
14228
|
+
});
|
|
14229
|
+
const page = await ctx.api.get(
|
|
14230
|
+
`/api/run-intelligence/runs/${encodeURIComponent(runId)}/events?${params}`
|
|
14231
|
+
);
|
|
14232
|
+
printOutput(ctx.json ? page : (page?.items ?? []).map(formatRunEvent), { json: ctx.json });
|
|
14217
14233
|
} catch (err) {
|
|
14218
14234
|
handleCommandError(err);
|
|
14219
14235
|
}
|
|
14220
14236
|
})
|
|
14221
14237
|
);
|
|
14222
14238
|
addCommonClientOptions(
|
|
14223
|
-
runs.command("log").description(getAgentCliCapabilityById("runs.log").description).argument("<runId>", "Run ID or short run ID").option("--max-chars <n>", "Maximum log characters for human output", "12000").action(async (runId, opts) => {
|
|
14239
|
+
runs.command("log").description(getAgentCliCapabilityById("runs.log").description).argument("<runId>", "Run ID or short run ID").option("--max-chars <n>", "Maximum log characters for human output", "12000").option("--offset <n>", "Start reading at this byte offset", "0").option("--limit-bytes <n>", "Maximum log bytes to return", "256000").action(async (runId, opts) => {
|
|
14224
14240
|
try {
|
|
14225
14241
|
const ctx = resolveCommandContext(opts);
|
|
14226
|
-
const
|
|
14242
|
+
const params = new URLSearchParams({
|
|
14243
|
+
offset: String(parseNonNegativeInteger(opts.offset, 0)),
|
|
14244
|
+
limitBytes: String(parseLimit2(opts.limitBytes, 256e3))
|
|
14245
|
+
});
|
|
14246
|
+
const row = await ctx.api.get(
|
|
14247
|
+
`/api/run-intelligence/runs/${encodeURIComponent(runId)}/log?${params}`
|
|
14248
|
+
);
|
|
14227
14249
|
if (ctx.json) {
|
|
14228
14250
|
printOutput(row, { json: true });
|
|
14229
14251
|
} else {
|
|
@@ -14323,6 +14345,7 @@ function registerRunsCommands(program) {
|
|
|
14323
14345
|
}
|
|
14324
14346
|
function buildRunsListQuery(opts) {
|
|
14325
14347
|
const params = new URLSearchParams();
|
|
14348
|
+
params.set("projection", opts.full ? "full" : "summary");
|
|
14326
14349
|
if (opts.updatedAfter) params.set("updatedAfter", opts.updatedAfter);
|
|
14327
14350
|
if (opts.runIdPrefix) params.set("runIdPrefix", opts.runIdPrefix);
|
|
14328
14351
|
if (opts.agentId) params.set("agentId", opts.agentId);
|
|
@@ -14332,18 +14355,21 @@ function buildRunsListQuery(opts) {
|
|
|
14332
14355
|
if (opts.usedSkill) params.set("usedSkill", opts.usedSkill);
|
|
14333
14356
|
if (opts.loadedSkill) params.set("loadedSkill", opts.loadedSkill);
|
|
14334
14357
|
if (opts.createdBefore) params.set("createdBefore", opts.createdBefore);
|
|
14335
|
-
if (opts.
|
|
14358
|
+
if (!opts.full && opts.cursor) params.set("cursor", opts.cursor);
|
|
14359
|
+
params.set("limit", opts.limit ?? (opts.full ? "200" : "50"));
|
|
14336
14360
|
return params.toString();
|
|
14337
14361
|
}
|
|
14338
14362
|
function buildRunsBySkillQuery(skill, opts, evidenceType) {
|
|
14339
14363
|
const params = new URLSearchParams();
|
|
14364
|
+
params.set("projection", opts.full ? "full" : "summary");
|
|
14340
14365
|
params.set(evidenceType === "used" ? "usedSkill" : "loadedSkill", skill);
|
|
14341
14366
|
if (opts.agentId) params.set("agentId", opts.agentId);
|
|
14342
14367
|
if (opts.status) params.set("status", opts.status);
|
|
14343
14368
|
if (opts.runtime) params.set("runtime", opts.runtime);
|
|
14344
14369
|
if (opts.issueId) params.set("issueId", opts.issueId);
|
|
14345
14370
|
if (opts.createdBefore) params.set("createdBefore", opts.createdBefore);
|
|
14346
|
-
if (opts.
|
|
14371
|
+
if (!opts.full && opts.cursor) params.set("cursor", opts.cursor);
|
|
14372
|
+
params.set("limit", opts.limit ?? "50");
|
|
14347
14373
|
return params.toString();
|
|
14348
14374
|
}
|
|
14349
14375
|
function assertSingleSkillFilter(opts) {
|
|
@@ -14371,23 +14397,22 @@ function buildTranscriptQuery(opts, output) {
|
|
|
14371
14397
|
return params.toString();
|
|
14372
14398
|
}
|
|
14373
14399
|
function formatRunListRow(row) {
|
|
14374
|
-
const runId = formatCliRunId(row
|
|
14400
|
+
const runId = formatCliRunId(runIdOf(row));
|
|
14375
14401
|
return {
|
|
14376
14402
|
id: runId,
|
|
14377
|
-
status: row
|
|
14378
|
-
agent: row.agentName ?? row
|
|
14379
|
-
runtime: row
|
|
14403
|
+
status: runStatusOf(row),
|
|
14404
|
+
agent: row.agentName ?? runAgentIdOf(row),
|
|
14405
|
+
runtime: runRuntimeOf(row),
|
|
14380
14406
|
issue: formatIssueRef(row.issue),
|
|
14381
|
-
createdAt: row
|
|
14382
|
-
finishedAt: row
|
|
14407
|
+
createdAt: runCreatedAtOf(row),
|
|
14408
|
+
finishedAt: runFinishedAtOf(row) ?? "-",
|
|
14383
14409
|
evidence: row.skillEvidence?.evidenceType ?? "-",
|
|
14384
14410
|
skill: row.skillEvidence?.matchedSkillKey ?? "-",
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
next: row.run.status === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`
|
|
14411
|
+
error: runErrorOf(row) ?? "-",
|
|
14412
|
+
next: runStatusOf(row) === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`
|
|
14388
14413
|
};
|
|
14389
14414
|
}
|
|
14390
|
-
function buildSkillRunReport(skill, evidenceType, rows) {
|
|
14415
|
+
function buildSkillRunReport(skill, evidenceType, rows, page) {
|
|
14391
14416
|
const statusCounts = {
|
|
14392
14417
|
succeeded: 0,
|
|
14393
14418
|
failed: 0,
|
|
@@ -14401,7 +14426,7 @@ function buildSkillRunReport(skill, evidenceType, rows) {
|
|
|
14401
14426
|
const issues = /* @__PURE__ */ new Map();
|
|
14402
14427
|
const errors = /* @__PURE__ */ new Map();
|
|
14403
14428
|
for (const row of rows) {
|
|
14404
|
-
const status = row
|
|
14429
|
+
const status = runStatusOf(row);
|
|
14405
14430
|
if (status === "succeeded") statusCounts.succeeded += 1;
|
|
14406
14431
|
else if (status === "failed") statusCounts.failed += 1;
|
|
14407
14432
|
else if (status === "cancelled") statusCounts.cancelled += 1;
|
|
@@ -14409,7 +14434,8 @@ function buildSkillRunReport(skill, evidenceType, rows) {
|
|
|
14409
14434
|
else if (status === "running") statusCounts.running += 1;
|
|
14410
14435
|
else if (status === "queued") statusCounts.queued += 1;
|
|
14411
14436
|
else statusCounts.other += 1;
|
|
14412
|
-
const
|
|
14437
|
+
const agentId = runAgentIdOf(row);
|
|
14438
|
+
const agent = agents.get(agentId) ?? { id: agentId, name: row.agentName, count: 0 };
|
|
14413
14439
|
agent.count += 1;
|
|
14414
14440
|
agents.set(agent.id, agent);
|
|
14415
14441
|
if (row.issue) {
|
|
@@ -14417,7 +14443,7 @@ function buildSkillRunReport(skill, evidenceType, rows) {
|
|
|
14417
14443
|
issue.count += 1;
|
|
14418
14444
|
issues.set(issue.id, issue);
|
|
14419
14445
|
}
|
|
14420
|
-
const error = row
|
|
14446
|
+
const error = runErrorOf(row)?.trim();
|
|
14421
14447
|
if (error) errors.set(error, (errors.get(error) ?? 0) + 1);
|
|
14422
14448
|
}
|
|
14423
14449
|
return {
|
|
@@ -14430,9 +14456,10 @@ function buildSkillRunReport(skill, evidenceType, rows) {
|
|
|
14430
14456
|
commonErrors: [...errors.entries()].map(([summary, count]) => ({ summary, count })).sort((a, b) => b.count - a.count).slice(0, 5)
|
|
14431
14457
|
},
|
|
14432
14458
|
rows,
|
|
14459
|
+
...page ? { page } : {},
|
|
14433
14460
|
nextCommands: rows.slice(0, 5).map((row) => {
|
|
14434
|
-
const runId = formatCliRunId(row
|
|
14435
|
-
return row
|
|
14461
|
+
const runId = formatCliRunId(runIdOf(row));
|
|
14462
|
+
return runStatusOf(row) === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`;
|
|
14436
14463
|
})
|
|
14437
14464
|
};
|
|
14438
14465
|
}
|
|
@@ -14450,40 +14477,67 @@ function formatSkillRunReport(report) {
|
|
|
14450
14477
|
lines.push(`commonErrors=${report.summary.commonErrors.map((error) => `${clip2(error.summary, 80)}:${error.count}`).join(" | ")}`);
|
|
14451
14478
|
}
|
|
14452
14479
|
lines.push(...report.rows.map((row) => formatInlineSkillRun(row)));
|
|
14480
|
+
if (report.page?.hasMore && report.page.nextCursor) {
|
|
14481
|
+
lines.push(`more: hasMore=true nextCursor=${report.page.nextCursor}`);
|
|
14482
|
+
}
|
|
14453
14483
|
if (report.nextCommands.length > 0) {
|
|
14454
14484
|
lines.push("next:");
|
|
14455
14485
|
lines.push(...report.nextCommands.map((command) => ` ${command}`));
|
|
14456
14486
|
}
|
|
14457
14487
|
return lines;
|
|
14458
14488
|
}
|
|
14489
|
+
function formatRunSummaryPage(page) {
|
|
14490
|
+
const lines = (page?.items ?? []).map(formatRunListRow);
|
|
14491
|
+
if (page?.page.hasMore && page.page.nextCursor) {
|
|
14492
|
+
lines.push(`more: hasMore=true nextCursor=${page.page.nextCursor}`);
|
|
14493
|
+
}
|
|
14494
|
+
return lines;
|
|
14495
|
+
}
|
|
14459
14496
|
function formatInlineSkillRun(row) {
|
|
14460
|
-
const runId = formatCliRunId(row
|
|
14497
|
+
const runId = formatCliRunId(runIdOf(row));
|
|
14461
14498
|
const issue = formatIssueRef(row.issue);
|
|
14462
14499
|
const label = row.skillEvidence?.matchedSkillLabel && row.skillEvidence.matchedSkillLabel !== row.skillEvidence.matchedSkillKey ? ` label=${row.skillEvidence.matchedSkillLabel}` : "";
|
|
14463
|
-
const langfuse = readLangfuseTraceUrl(row.langfuse);
|
|
14464
14500
|
return [
|
|
14465
14501
|
`id=${runId}`,
|
|
14466
|
-
`status=${row
|
|
14467
|
-
`agent=${row.agentName ?? row
|
|
14502
|
+
`status=${runStatusOf(row)}`,
|
|
14503
|
+
`agent=${row.agentName ?? runAgentIdOf(row)}`,
|
|
14468
14504
|
`issue=${issue}`,
|
|
14469
|
-
`runtime=${row
|
|
14470
|
-
`createdAt=${row
|
|
14471
|
-
`finishedAt=${row
|
|
14505
|
+
`runtime=${runRuntimeOf(row)}`,
|
|
14506
|
+
`createdAt=${runCreatedAtOf(row)}`,
|
|
14507
|
+
`finishedAt=${runFinishedAtOf(row) ?? "-"}`,
|
|
14472
14508
|
`evidence=${row.skillEvidence?.evidenceType ?? "-"}`,
|
|
14473
14509
|
`skill=${row.skillEvidence?.matchedSkillKey ?? "-"}${label}`,
|
|
14474
|
-
`
|
|
14475
|
-
`
|
|
14476
|
-
`next=${row.run.status === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`}`
|
|
14510
|
+
`error=${runErrorOf(row) ?? "-"}`,
|
|
14511
|
+
`next=${runStatusOf(row) === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`}`
|
|
14477
14512
|
].join(" ");
|
|
14478
14513
|
}
|
|
14479
14514
|
function formatIssueRef(issue) {
|
|
14480
14515
|
if (!issue) return "-";
|
|
14481
14516
|
return issue.identifier && issue.title ? `${issue.identifier} ${issue.title}` : issue.identifier ?? issue.title ?? issue.id;
|
|
14482
14517
|
}
|
|
14483
|
-
function
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14518
|
+
function isRunSummary(row) {
|
|
14519
|
+
return "id" in row;
|
|
14520
|
+
}
|
|
14521
|
+
function runIdOf(row) {
|
|
14522
|
+
return isRunSummary(row) ? row.id : row.run.id;
|
|
14523
|
+
}
|
|
14524
|
+
function runAgentIdOf(row) {
|
|
14525
|
+
return isRunSummary(row) ? row.agentId : row.run.agentId;
|
|
14526
|
+
}
|
|
14527
|
+
function runStatusOf(row) {
|
|
14528
|
+
return isRunSummary(row) ? row.status : row.run.status;
|
|
14529
|
+
}
|
|
14530
|
+
function runRuntimeOf(row) {
|
|
14531
|
+
return isRunSummary(row) ? row.runtime : row.bundle.agentRuntimeType;
|
|
14532
|
+
}
|
|
14533
|
+
function runCreatedAtOf(row) {
|
|
14534
|
+
return isRunSummary(row) ? row.createdAt : row.run.createdAt;
|
|
14535
|
+
}
|
|
14536
|
+
function runFinishedAtOf(row) {
|
|
14537
|
+
return isRunSummary(row) ? row.finishedAt : row.run.finishedAt;
|
|
14538
|
+
}
|
|
14539
|
+
function runErrorOf(row) {
|
|
14540
|
+
return isRunSummary(row) ? row.error : row.errorSummary;
|
|
14487
14541
|
}
|
|
14488
14542
|
function formatRunEvent(row) {
|
|
14489
14543
|
return {
|
|
@@ -14525,6 +14579,11 @@ function parseLimit2(value, fallback) {
|
|
|
14525
14579
|
if (!Number.isFinite(parsed) || parsed <= 0) return fallback;
|
|
14526
14580
|
return Math.floor(parsed);
|
|
14527
14581
|
}
|
|
14582
|
+
function parseNonNegativeInteger(value, fallback) {
|
|
14583
|
+
const parsed = Number(value ?? fallback);
|
|
14584
|
+
if (!Number.isFinite(parsed) || parsed < 0) return fallback;
|
|
14585
|
+
return Math.floor(parsed);
|
|
14586
|
+
}
|
|
14528
14587
|
function clip2(value, maxChars) {
|
|
14529
14588
|
if (value.length <= maxChars) return value;
|
|
14530
14589
|
return `${value.slice(0, Math.max(0, maxChars - 1))}\u2026`;
|