@rudderhq/cli 0.6.1 → 0.6.2-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/dist/index.js +151 -33
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,8 +36,6 @@ Rudder turns those coordination patterns into product primitives for agent teams
|
|
|
36
36
|
|
|
37
37
|

|
|
38
38
|
|
|
39
|
-

|
|
40
|
-
|
|
41
39
|

|
|
42
40
|
|
|
43
41
|

|
|
@@ -52,19 +50,18 @@ Rudder turns those coordination patterns into product primitives for agent teams
|
|
|
52
50
|
|
|
53
51
|
- work belongs to an organization, not a loose thread
|
|
54
52
|
- every issue should trace back to a goal
|
|
55
|
-
- agents have roles, runtime config,
|
|
53
|
+
- agents have roles, runtime config, capabilities, and skills
|
|
56
54
|
- chat and issues provide conversational and structured ways to move work forward, with execution attached to inspectable runs, outputs, reviews, and history
|
|
57
55
|
- autonomy stays legible, governable, and budget-aware
|
|
58
56
|
|
|
59
57
|
## What Rudder Is
|
|
60
58
|
|
|
61
|
-
Rudder is open-source software for assigning, running, reviewing, and improving agent work. One Rudder instance can run one or many organizations, each with its own goal,
|
|
59
|
+
Rudder is open-source software for assigning, running, reviewing, and improving agent work. One Rudder instance can run one or many organizations, each with its own goal, agents, issues, budgets, approvals, feedback, and governance.
|
|
62
60
|
|
|
63
61
|
| Human team pattern | Rudder equivalent |
|
|
64
62
|
| --- | --- |
|
|
65
63
|
| Mission | Organization goal |
|
|
66
64
|
| Employees | AI agents |
|
|
67
|
-
| Org chart | Agent reporting structure |
|
|
68
65
|
| Work ownership | Issues and assignments |
|
|
69
66
|
| Team workflow | Workflow definitions and execution paths |
|
|
70
67
|
| Operational memory | Comments, documents, run history, activity, and skills |
|
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ var init_chat_work_manifest = __esm({
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
// ../packages/shared/dist/constants.js
|
|
46
|
-
var ORGANIZATION_STATUSES, ORGANIZATION_INTELLIGENCE_PROFILE_PURPOSES, ORGANIZATION_INTELLIGENCE_PROFILE_STATUSES, DEPLOYMENT_MODES, DEPLOYMENT_EXPOSURES, AUTH_BASE_URL_MODES, AGENT_STATUSES, AGENT_RUNTIME_TYPES, AGENT_ROLES, AGENT_ICON_NAMES, AGENT_OREO_ICON_PREFIX, AGENT_OREO_SHAPE_IDS, AGENT_OREO_PALETTE_IDS, AGENT_DICEBEAR_NOTIONISTS_ICON_PREFIX, AGENT_AVATAR_BACKGROUND_PRESET_IDS, ISSUE_STATUSES, ISSUE_PRIORITIES, AGENT_INTEGRATION_PROVIDERS, AGENT_INTEGRATION_STATUSES, AGENT_INTEGRATION_TRANSPORTS, AGENT_INTEGRATION_PROVIDER_REGIONS, AGENT_INTEGRATION_CHAT_TYPES, AGENT_INTEGRATION_DROP_REASONS, AGENT_INTEGRATION_OUTBOUND_STATUSES, RUDDER_AGENT_V1_MCP_TOOL_NAMES, RUDDER_BROWSER_MCP_TOOL_NAMES2, RUDDER_CORE_MCP_TOOL_NAMES2, CUSTOM_INTEGRATION_KINDS, CUSTOM_INTEGRATION_SCOPES, CUSTOM_INTEGRATION_STATUSES, CUSTOM_INTEGRATION_TOOL_STATUSES, CUSTOM_INTEGRATION_BINDING_STATUSES, CUSTOM_INTEGRATION_TOOL_CALL_STATUSES, MCP_CONNECTION_PROVIDERS, MCP_CONNECTION_TRANSPORTS, MCP_CONNECTION_ACCESS_MODES, MCP_CONNECTION_STATUSES, MCP_OAUTH_GRANT_STATUSES, MCP_AGENT_BINDING_STATUSES, MCP_OAUTH_SESSION_TTL_MS, MCP_PROVIDER_CATALOG, CALENDAR_SOURCE_TYPES, CALENDAR_OWNER_TYPES, CALENDAR_VISIBILITIES, CALENDAR_SOURCE_STATUSES, CALENDAR_EVENT_KINDS, CALENDAR_EVENT_STATUSES, CALENDAR_SOURCE_MODES, CHAT_CONVERSATION_STATUSES, CHAT_ISSUE_CREATION_MODES, CHAT_MESSAGE_ROLES, CHAT_MESSAGE_KINDS, CHAT_MESSAGE_STATUSES, CHAT_CONTEXT_ENTITY_TYPES, GOAL_LEVELS, GOAL_STATUSES, PROJECT_STATUSES, ORGANIZATION_RESOURCE_KINDS, ORGANIZATION_RESOURCE_SOURCE_TYPES, PROJECT_RESOURCE_ATTACHMENT_ROLES, AUTOMATION_STATUSES, AUTOMATION_CONCURRENCY_POLICIES, AUTOMATION_CATCH_UP_POLICIES, AUTOMATION_OUTPUT_MODES, AUTOMATION_TRIGGER_SIGNING_MODES, PROJECT_COLORS, PROJECT_ICONS, APPROVAL_TYPES, SECRET_PROVIDERS, STORAGE_PROVIDERS, BILLING_TYPES, FINANCE_EVENT_KINDS, FINANCE_DIRECTIONS, FINANCE_UNITS, BUDGET_SCOPE_TYPES, BUDGET_METRICS, BUDGET_WINDOW_KINDS, BUDGET_INCIDENT_RESOLUTION_ACTIONS, INVITE_JOIN_TYPES, JOIN_REQUEST_TYPES, JOIN_REQUEST_STATUSES, PERMISSION_KEYS, PLUGIN_STATUSES, PLUGIN_CATEGORIES, PLUGIN_CAPABILITIES, PLUGIN_UI_SLOT_TYPES, PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS, PLUGIN_LAUNCHER_PLACEMENT_ZONES, PLUGIN_LAUNCHER_ACTIONS, PLUGIN_LAUNCHER_BOUNDS, PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS, PLUGIN_UI_SLOT_ENTITY_TYPES, PLUGIN_STATE_SCOPE_KINDS;
|
|
46
|
+
var ORGANIZATION_STATUSES, ORGANIZATION_INTELLIGENCE_PROFILE_PURPOSES, ORGANIZATION_INTELLIGENCE_PROFILE_STATUSES, DEPLOYMENT_MODES, DEPLOYMENT_EXPOSURES, AUTH_BASE_URL_MODES, AGENT_STATUSES, AGENT_RUNTIME_TYPES, AGENT_ROLES, AGENT_ICON_NAMES, AGENT_OREO_ICON_PREFIX, AGENT_OREO_SHAPE_IDS, AGENT_OREO_PALETTE_IDS, AGENT_DICEBEAR_NOTIONISTS_ICON_PREFIX, AGENT_AVATAR_BACKGROUND_PRESET_IDS, ISSUE_STATUSES, ISSUE_PRIORITIES, AGENT_INTEGRATION_PROVIDERS, AGENT_INTEGRATION_STATUSES, AGENT_INTEGRATION_TRANSPORTS, AGENT_INTEGRATION_PROVIDER_REGIONS, AGENT_INTEGRATION_CHAT_TYPES, AGENT_INTEGRATION_DROP_REASONS, AGENT_INTEGRATION_OUTBOUND_STATUSES, RUDDER_AGENT_V1_MCP_TOOL_NAMES, RUDDER_BROWSER_MCP_TOOL_NAMES2, RUDDER_CORE_MCP_TOOL_NAMES2, CUSTOM_INTEGRATION_KINDS, CUSTOM_INTEGRATION_SCOPES, CUSTOM_INTEGRATION_STATUSES, CUSTOM_INTEGRATION_TOOL_STATUSES, CUSTOM_INTEGRATION_BINDING_STATUSES, CUSTOM_INTEGRATION_TOOL_CALL_STATUSES, MCP_CONNECTION_PROVIDERS, MCP_CONNECTION_TRANSPORTS, MCP_CONNECTION_ACCESS_MODES, MCP_AGENT_ACCESS_MODES, MCP_CONNECTION_CANONICAL_STATES, MCP_PROVIDER_SCOPE_MODES, MCP_PROVIDER_ORGANIZATION_STATES, MCP_TOOL_CAPABILITY_CLASSES, MCP_CONNECTION_STATUSES, MCP_OAUTH_GRANT_STATUSES, MCP_AGENT_BINDING_STATUSES, MCP_OAUTH_SESSION_TTL_MS, MCP_PROVIDER_CATALOG, CALENDAR_SOURCE_TYPES, CALENDAR_OWNER_TYPES, CALENDAR_VISIBILITIES, CALENDAR_SOURCE_STATUSES, CALENDAR_EVENT_KINDS, CALENDAR_EVENT_STATUSES, CALENDAR_SOURCE_MODES, CHAT_CONVERSATION_STATUSES, CHAT_ISSUE_CREATION_MODES, CHAT_MESSAGE_ROLES, CHAT_MESSAGE_KINDS, CHAT_MESSAGE_STATUSES, CHAT_CONTEXT_ENTITY_TYPES, GOAL_LEVELS, GOAL_STATUSES, PROJECT_STATUSES, ORGANIZATION_RESOURCE_KINDS, ORGANIZATION_RESOURCE_SOURCE_TYPES, PROJECT_RESOURCE_ATTACHMENT_ROLES, AUTOMATION_STATUSES, AUTOMATION_CONCURRENCY_POLICIES, AUTOMATION_CATCH_UP_POLICIES, AUTOMATION_OUTPUT_MODES, AUTOMATION_TRIGGER_SIGNING_MODES, PROJECT_COLORS, PROJECT_ICONS, APPROVAL_TYPES, SECRET_PROVIDERS, STORAGE_PROVIDERS, BILLING_TYPES, FINANCE_EVENT_KINDS, FINANCE_DIRECTIONS, FINANCE_UNITS, BUDGET_SCOPE_TYPES, BUDGET_METRICS, BUDGET_WINDOW_KINDS, BUDGET_INCIDENT_RESOLUTION_ACTIONS, INVITE_JOIN_TYPES, JOIN_REQUEST_TYPES, JOIN_REQUEST_STATUSES, PERMISSION_KEYS, PLUGIN_STATUSES, PLUGIN_CATEGORIES, PLUGIN_CAPABILITIES, PLUGIN_UI_SLOT_TYPES, PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS, PLUGIN_LAUNCHER_PLACEMENT_ZONES, PLUGIN_LAUNCHER_ACTIONS, PLUGIN_LAUNCHER_BOUNDS, PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS, PLUGIN_UI_SLOT_ENTITY_TYPES, PLUGIN_STATE_SCOPE_KINDS;
|
|
47
47
|
var init_constants = __esm({
|
|
48
48
|
"../packages/shared/dist/constants.js"() {
|
|
49
49
|
"use strict";
|
|
@@ -323,6 +323,29 @@ var init_constants = __esm({
|
|
|
323
323
|
MCP_CONNECTION_PROVIDERS = ["supabase", "linear", "notion", "custom"];
|
|
324
324
|
MCP_CONNECTION_TRANSPORTS = ["stdio", "streamable_http", "legacy_manual"];
|
|
325
325
|
MCP_CONNECTION_ACCESS_MODES = ["provider_default", "read_only", "read_write"];
|
|
326
|
+
MCP_AGENT_ACCESS_MODES = [
|
|
327
|
+
"none",
|
|
328
|
+
"read_only",
|
|
329
|
+
"read_write",
|
|
330
|
+
"provider_granted",
|
|
331
|
+
"full"
|
|
332
|
+
];
|
|
333
|
+
MCP_CONNECTION_CANONICAL_STATES = ["canonical", "superseded"];
|
|
334
|
+
MCP_PROVIDER_SCOPE_MODES = ["account", "workspace", "legacy_project"];
|
|
335
|
+
MCP_PROVIDER_ORGANIZATION_STATES = [
|
|
336
|
+
"not_connected",
|
|
337
|
+
"connecting",
|
|
338
|
+
"connected",
|
|
339
|
+
"needs_attention",
|
|
340
|
+
"disconnected"
|
|
341
|
+
];
|
|
342
|
+
MCP_TOOL_CAPABILITY_CLASSES = [
|
|
343
|
+
"read",
|
|
344
|
+
"normal_write",
|
|
345
|
+
"destructive",
|
|
346
|
+
"admin_or_billing",
|
|
347
|
+
"unknown"
|
|
348
|
+
];
|
|
326
349
|
MCP_CONNECTION_STATUSES = [
|
|
327
350
|
"draft",
|
|
328
351
|
"authorizing",
|
|
@@ -997,7 +1020,7 @@ function validateConnectionSecretMutation(value, ctx) {
|
|
|
997
1020
|
}
|
|
998
1021
|
}
|
|
999
1022
|
}
|
|
1000
|
-
var uuidSchema, timestampSchema, connectionNameSchema, reservedMcpConnectionNames, environmentNameSchema, externalMcpToolNameSchema, externalMcpToolFilterSchema, mcpConnectionProviderSchema, mcpConnectionTransportSchema, mcpConnectionAccessModeSchema, mcpConnectionStatusSchema, mcpOAuthGrantStatusSchema, mcpAgentBindingStatusSchema, stringMapSchema, environmentValueMapSchema, safeHeaderSchema, mcpStdioSafeConfigSchema, mcpStreamableHttpSafeConfigSchema, mcpConnectionSecretsMutationSchema, mcpLegacyManualSafeConfigSchema, mcpCuratedSafeConfigSchema, mcpConnectionSafeConfigSchema, mcpConnectionInputFields, providerAccessModes, createMcpConnectionSchema, updateMcpConnectionSchema, mcpConnectionMergedConfigFields, mcpConnectionMergedConfigSchema, mcpConnectionMutationConfigSchema, mcpConnectionSummarySchema, mcpProviderCatalogEntrySchema, mcpProviderCatalogSchema, mcpOAuthStartSchema, mcpOAuthStartResponseSchema, mcpOAuthCallbackSchema, mcpScopeSelectionSchema, mcpExternalScopeOptionSchema, mcpOAuthGrantSummarySchema, mcpDiscoveredToolSchema, mcpAgentBindingSchema, mcpAgentConnectionSummarySchema, upsertMcpAgentBindingSchema, updateMcpAgentBindingSchema, managedExternalMcpBindingSchema, managedExternalMcpBindingsSchema;
|
|
1023
|
+
var uuidSchema, timestampSchema, connectionNameSchema, reservedMcpConnectionNames, environmentNameSchema, externalMcpToolNameSchema, externalMcpToolFilterSchema, mcpConnectionProviderSchema, mcpConnectionTransportSchema, mcpConnectionAccessModeSchema, mcpAgentAccessModeSchema, mcpConnectionCanonicalStateSchema, mcpProviderScopeModeSchema, mcpProviderOrganizationStateSchema, mcpToolCapabilityClassSchema, mcpProviderMaxAccessSchema, mcpConnectionStatusSchema, mcpOAuthGrantStatusSchema, mcpAgentBindingStatusSchema, stringMapSchema, environmentValueMapSchema, safeHeaderSchema, mcpStdioSafeConfigSchema, mcpStreamableHttpSafeConfigSchema, mcpConnectionSecretsMutationSchema, mcpLegacyManualSafeConfigSchema, mcpCuratedSafeConfigSchema, mcpConnectionSafeConfigSchema, mcpConnectionInputFields, providerAccessModes, createMcpConnectionSchema, updateMcpConnectionSchema, mcpConnectionMergedConfigFields, mcpConnectionMergedConfigSchema, mcpConnectionMutationConfigSchema, mcpConnectionSummarySchema, mcpProviderCatalogEntrySchema, mcpProviderCatalogSchema, mcpOAuthStartSchema, mcpOAuthStartResponseSchema, mcpOAuthCallbackSchema, mcpScopeSelectionSchema, mcpExternalScopeOptionSchema, mcpOAuthGrantSummarySchema, mcpDiscoveredToolSchema, mcpAgentBindingSchema, mcpAgentConnectionSummarySchema, upsertMcpAgentBindingSchema, updateMcpAgentBindingSchema, managedExternalMcpBindingSchema, managedExternalMcpBindingsSchema, mcpProviderAvailabilitySchema;
|
|
1001
1024
|
var init_mcp = __esm({
|
|
1002
1025
|
"../packages/shared/dist/validators/mcp.js"() {
|
|
1003
1026
|
"use strict";
|
|
@@ -1012,6 +1035,12 @@ var init_mcp = __esm({
|
|
|
1012
1035
|
mcpConnectionProviderSchema = z2.enum(MCP_CONNECTION_PROVIDERS);
|
|
1013
1036
|
mcpConnectionTransportSchema = z2.enum(MCP_CONNECTION_TRANSPORTS);
|
|
1014
1037
|
mcpConnectionAccessModeSchema = z2.enum(MCP_CONNECTION_ACCESS_MODES);
|
|
1038
|
+
mcpAgentAccessModeSchema = z2.enum(MCP_AGENT_ACCESS_MODES);
|
|
1039
|
+
mcpConnectionCanonicalStateSchema = z2.enum(MCP_CONNECTION_CANONICAL_STATES);
|
|
1040
|
+
mcpProviderScopeModeSchema = z2.enum(MCP_PROVIDER_SCOPE_MODES);
|
|
1041
|
+
mcpProviderOrganizationStateSchema = z2.enum(MCP_PROVIDER_ORGANIZATION_STATES);
|
|
1042
|
+
mcpToolCapabilityClassSchema = z2.enum(MCP_TOOL_CAPABILITY_CLASSES);
|
|
1043
|
+
mcpProviderMaxAccessSchema = z2.enum(["read_only", "read_write", "provider_granted"]);
|
|
1015
1044
|
mcpConnectionStatusSchema = z2.enum(MCP_CONNECTION_STATUSES);
|
|
1016
1045
|
mcpOAuthGrantStatusSchema = z2.enum(MCP_OAUTH_GRANT_STATUSES);
|
|
1017
1046
|
mcpAgentBindingStatusSchema = z2.enum(MCP_AGENT_BINDING_STATUSES);
|
|
@@ -1270,6 +1299,9 @@ var init_mcp = __esm({
|
|
|
1270
1299
|
description: z2.string().max(4e3).nullable(),
|
|
1271
1300
|
inputSchema: z2.record(z2.unknown()),
|
|
1272
1301
|
outputSchema: z2.record(z2.unknown()).nullable(),
|
|
1302
|
+
capabilityClass: mcpToolCapabilityClassSchema,
|
|
1303
|
+
policyRevision: z2.number().int().positive(),
|
|
1304
|
+
catalogRevision: z2.number().int().positive(),
|
|
1273
1305
|
enabled: z2.boolean(),
|
|
1274
1306
|
removedAt: timestampSchema.nullable()
|
|
1275
1307
|
}).strict();
|
|
@@ -1278,19 +1310,26 @@ var init_mcp = __esm({
|
|
|
1278
1310
|
connectionId: uuidSchema,
|
|
1279
1311
|
agentId: uuidSchema,
|
|
1280
1312
|
status: mcpAgentBindingStatusSchema,
|
|
1313
|
+
accessMode: mcpAgentAccessModeSchema,
|
|
1314
|
+
policyRevision: z2.number().int().positive(),
|
|
1281
1315
|
enabledToolIds: z2.array(uuidSchema).max(500)
|
|
1282
1316
|
}).strict();
|
|
1283
1317
|
mcpAgentConnectionSummarySchema = z2.object({
|
|
1284
1318
|
connection: mcpConnectionSummarySchema,
|
|
1285
1319
|
binding: mcpAgentBindingSchema.nullable(),
|
|
1286
|
-
tools: z2.array(mcpDiscoveredToolSchema).max(500)
|
|
1320
|
+
tools: z2.array(mcpDiscoveredToolSchema).max(500),
|
|
1321
|
+
reviewRequired: z2.boolean()
|
|
1287
1322
|
}).strict();
|
|
1288
1323
|
upsertMcpAgentBindingSchema = z2.object({
|
|
1289
1324
|
status: mcpAgentBindingStatusSchema.optional(),
|
|
1325
|
+
accessMode: mcpAgentAccessModeSchema.optional(),
|
|
1326
|
+
expectedRevision: z2.number().int().positive().optional(),
|
|
1290
1327
|
enabledToolIds: z2.array(uuidSchema).max(500).optional()
|
|
1291
1328
|
}).strict();
|
|
1292
1329
|
updateMcpAgentBindingSchema = z2.object({
|
|
1293
1330
|
status: mcpAgentBindingStatusSchema.optional(),
|
|
1331
|
+
accessMode: mcpAgentAccessModeSchema.optional(),
|
|
1332
|
+
expectedRevision: z2.number().int().positive().optional(),
|
|
1294
1333
|
enabledToolIds: z2.array(uuidSchema).max(500).optional()
|
|
1295
1334
|
}).strict().refine((value) => Object.keys(value).length > 0, {
|
|
1296
1335
|
message: "At least one binding field is required"
|
|
@@ -1298,6 +1337,7 @@ var init_mcp = __esm({
|
|
|
1298
1337
|
managedExternalMcpBindingSchema = z2.object({
|
|
1299
1338
|
bindingId: uuidSchema,
|
|
1300
1339
|
serverName: connectionNameSchema,
|
|
1340
|
+
accessMode: mcpAgentAccessModeSchema,
|
|
1301
1341
|
toolPolicy: z2.object({
|
|
1302
1342
|
mode: z2.literal("allowlist"),
|
|
1303
1343
|
allowedToolNames: z2.array(z2.string().min(1).max(320)).max(500)
|
|
@@ -1307,6 +1347,66 @@ var init_mcp = __esm({
|
|
|
1307
1347
|
toolTimeoutMs: z2.number().int().positive()
|
|
1308
1348
|
}).strict();
|
|
1309
1349
|
managedExternalMcpBindingsSchema = z2.array(managedExternalMcpBindingSchema).max(100);
|
|
1350
|
+
mcpProviderAvailabilitySchema = z2.object({
|
|
1351
|
+
provider: z2.enum(["supabase", "linear", "notion"]),
|
|
1352
|
+
organization: z2.object({
|
|
1353
|
+
state: mcpProviderOrganizationStateSchema,
|
|
1354
|
+
connectionId: uuidSchema.nullable(),
|
|
1355
|
+
maxAccess: mcpProviderMaxAccessSchema.nullable(),
|
|
1356
|
+
scopeMode: mcpProviderScopeModeSchema.nullable(),
|
|
1357
|
+
revision: z2.number().int().positive().nullable(),
|
|
1358
|
+
affectedAgentCount: z2.number().int().nonnegative().optional(),
|
|
1359
|
+
historicalGrantConnectionIds: z2.array(uuidSchema).max(100).optional()
|
|
1360
|
+
}).strict(),
|
|
1361
|
+
agent: z2.object({
|
|
1362
|
+
access: mcpAgentAccessModeSchema,
|
|
1363
|
+
activeRunUsesOlderPolicy: z2.boolean()
|
|
1364
|
+
}).strict().optional()
|
|
1365
|
+
}).strict().superRefine((value, ctx) => {
|
|
1366
|
+
const connectedState = value.organization.state === "connected";
|
|
1367
|
+
if (connectedState && (value.organization.connectionId === null || value.organization.maxAccess === null || value.organization.scopeMode === null || value.organization.revision === null)) {
|
|
1368
|
+
ctx.addIssue({
|
|
1369
|
+
code: z2.ZodIssueCode.custom,
|
|
1370
|
+
path: ["organization"],
|
|
1371
|
+
message: "Connected providers require a connection, access, scope, and revision"
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
const maxAccess = value.organization.maxAccess;
|
|
1375
|
+
if (value.provider === "notion" && maxAccess !== null && maxAccess !== "provider_granted") {
|
|
1376
|
+
ctx.addIssue({
|
|
1377
|
+
code: z2.ZodIssueCode.custom,
|
|
1378
|
+
path: ["organization", "maxAccess"],
|
|
1379
|
+
message: "Notion exposes provider-granted access"
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
if (value.provider !== "notion" && maxAccess !== null && maxAccess === "provider_granted") {
|
|
1383
|
+
ctx.addIssue({
|
|
1384
|
+
code: z2.ZodIssueCode.custom,
|
|
1385
|
+
path: ["organization", "maxAccess"],
|
|
1386
|
+
message: `${value.provider} requires explicit read-only or read-write access`
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
const scopeMode = value.organization.scopeMode;
|
|
1390
|
+
const validScope = scopeMode === null || (value.provider === "supabase" ? scopeMode === "account" || scopeMode === "legacy_project" : scopeMode === "workspace");
|
|
1391
|
+
if (!validScope) {
|
|
1392
|
+
ctx.addIssue({
|
|
1393
|
+
code: z2.ZodIssueCode.custom,
|
|
1394
|
+
path: ["organization", "scopeMode"],
|
|
1395
|
+
message: `${value.provider} does not support ${scopeMode}`
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
const agentAccess = value.agent?.access;
|
|
1399
|
+
if (agentAccess !== void 0) {
|
|
1400
|
+
const validAgentAccess = agentAccess === "none" || (value.provider === "notion" ? agentAccess === "provider_granted" : agentAccess === "read_only" || agentAccess === "read_write" && value.organization.maxAccess === "read_write");
|
|
1401
|
+
if (!validAgentAccess) {
|
|
1402
|
+
ctx.addIssue({
|
|
1403
|
+
code: z2.ZodIssueCode.custom,
|
|
1404
|
+
path: ["agent", "access"],
|
|
1405
|
+
message: `${value.provider} agent access exceeds or conflicts with organization access`
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1310
1410
|
}
|
|
1311
1411
|
});
|
|
1312
1412
|
|
|
@@ -1423,7 +1523,7 @@ function createChatInlineAnnotationsSchema(annotationSchema) {
|
|
|
1423
1523
|
}
|
|
1424
1524
|
});
|
|
1425
1525
|
}
|
|
1426
|
-
var chatConversationStatusSchema, chatIssueCreationModeSchema, chatMessageRoleSchema, chatMessageKindSchema, chatMessageStatusSchema, chatContextEntityTypeSchema, chatGenerationStatusSchema, chatGenerationControlStateSchema, chatQueueDeliveryIntentSchema, chatControlDispositionSchema, chatProviderControlDispositionSchema, chatControlActionKindSchema, chatGenerationEventKindSchema, chatTerminalOutboxStatusSchema, chatQueuedMessageStatusSchema, chatControlActionIdSchema, chatBodyHashSchema, MAX_CHAT_INLINE_ANNOTATIONS, MAX_CHAT_INLINE_ANNOTATION_SELECTED_TEXT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_COMMENT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_TOTAL_TEXT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_CONTEXT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_ATTACHMENTS, chatInlineAnnotationCommentSchema, chatInlineAnnotationSelectedTextSchema, chatInlineAnnotationSourceHashSchema, chatInlineAnnotationShape, chatAssistantInlineAnnotationSchema, chatProcessInlineAnnotationSchema, chatInlineAnnotationSchema, chatAssistantInlineAnnotationInputSchema, chatProcessInlineAnnotationInputSchema, chatInlineAnnotationInputSchema, chatInlineAnnotationsSchema, chatInlineAnnotationsInputSchema, createChatContextLinkSchema, chatDraftSchema, createChatConversationSchema, createChatFirstTurnSchema, setChatProjectContextSchema, updateChatConversationSchema, forkChatConversationSchema, createSideChatSchema, addChatMessageSchema, chatQueuedMessagePayloadSchema, createChatQueuedMessageSchema, chatQueuedMessageUpdatePayloadSchema, updateChatQueuedMessageSchema, cancelChatQueuedMessageSchema, steerChatQueuedMessageSchema, stopChatGenerationSchema, chatClientCheckpointSchema, appendChatGenerationEventSchema, chatRichReferenceDisplaySchema, chatIssueIdentifierSchema, chatAskUserIdentifierSchema, chatAskUserOptionSchema, chatAskUserQuestionSchema, chatAskUserRequestSchema, chatIssueRichReferenceSchema, chatIssueCommentRichReferenceSchema, chatRichReferenceSchema, chatRichReferencesSchema, chatAutomationCreateSchema, createChatAttachmentMetadataSchema, chatIssueProposalSchema, convertChatToIssueSchema, chatOperationProposalSchema, resolveChatOperationProposalSchema, updateChatConversationUserStateSchema, updateMessengerThreadUserStateSchema, createMessengerCustomGroupSchema, messengerItemKeySchema, messengerItemKeysSchema, createMessengerCustomGroupWithEntriesSchema, updateMessengerCustomGroupSchema, reorderMessengerCustomGroupsSchema, assignMessengerCustomGroupEntrySchema, reorderMessengerCustomGroupEntriesSchema;
|
|
1526
|
+
var chatConversationStatusSchema, chatIssueCreationModeSchema, chatMessageRoleSchema, chatMessageKindSchema, chatMessageStatusSchema, chatContextEntityTypeSchema, chatGenerationStatusSchema, chatGenerationControlStateSchema, chatQueueDeliveryIntentSchema, chatControlDispositionSchema, chatProviderControlDispositionSchema, chatControlActionKindSchema, chatGenerationEventKindSchema, chatTerminalOutboxStatusSchema, chatQueuedMessageStatusSchema, chatControlActionIdSchema, chatBodyHashSchema, MAX_CHAT_INLINE_ANNOTATIONS, MAX_CHAT_INLINE_ANNOTATION_SELECTED_TEXT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_COMMENT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_TOTAL_TEXT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_CONTEXT_LENGTH, MAX_CHAT_INLINE_ANNOTATION_ATTACHMENTS, chatInlineAnnotationCommentSchema, chatInlineAnnotationSelectedTextSchema, chatInlineAnnotationSourceHashSchema, chatInlineAnnotationShape, chatAssistantInlineAnnotationSchema, chatProcessInlineAnnotationSchema, chatInlineAnnotationSchema, chatAssistantInlineAnnotationInputSchema, chatProcessInlineAnnotationInputSchema, chatInlineAnnotationInputSchema, chatInlineAnnotationsSchema, chatInlineAnnotationsInputSchema, createChatContextLinkSchema, chatModelOverrideSchema, chatEffortOverrideSchema, chatDraftSchema, createChatConversationSchema, createChatFirstTurnSchema, setChatProjectContextSchema, updateChatConversationSchema, forkChatConversationSchema, createSideChatSchema, addChatMessageSchema, chatQueuedMessagePayloadSchema, createChatQueuedMessageSchema, chatQueuedMessageUpdatePayloadSchema, updateChatQueuedMessageSchema, cancelChatQueuedMessageSchema, steerChatQueuedMessageSchema, stopChatGenerationSchema, chatClientCheckpointSchema, appendChatGenerationEventSchema, chatRichReferenceDisplaySchema, chatIssueIdentifierSchema, chatAskUserIdentifierSchema, chatAskUserOptionSchema, chatAskUserQuestionSchema, chatAskUserRequestSchema, chatIssueRichReferenceSchema, chatIssueCommentRichReferenceSchema, chatRichReferenceSchema, chatRichReferencesSchema, chatAutomationCreateSchema, createChatAttachmentMetadataSchema, chatIssueProposalSchema, convertChatToIssueSchema, chatOperationProposalSchema, resolveChatOperationProposalSchema, updateChatConversationUserStateSchema, updateMessengerThreadUserStateSchema, createMessengerCustomGroupSchema, messengerItemKeySchema, messengerItemKeysSchema, createMessengerCustomGroupWithEntriesSchema, updateMessengerCustomGroupSchema, reorderMessengerCustomGroupsSchema, assignMessengerCustomGroupEntrySchema, reorderMessengerCustomGroupEntriesSchema;
|
|
1427
1527
|
var init_chat = __esm({
|
|
1428
1528
|
"../packages/shared/dist/validators/chat.js"() {
|
|
1429
1529
|
"use strict";
|
|
@@ -1589,10 +1689,14 @@ var init_chat = __esm({
|
|
|
1589
1689
|
entityId: z3.string().min(1),
|
|
1590
1690
|
metadata: z3.record(z3.unknown()).optional().nullable()
|
|
1591
1691
|
});
|
|
1692
|
+
chatModelOverrideSchema = z3.string().trim().min(1).max(120).nullable();
|
|
1693
|
+
chatEffortOverrideSchema = z3.string().trim().min(1).max(120).nullable();
|
|
1592
1694
|
chatDraftSchema = z3.object({
|
|
1593
1695
|
title: z3.string().trim().min(1).max(200).optional(),
|
|
1594
1696
|
summary: z3.string().trim().max(5e3).optional().nullable(),
|
|
1595
1697
|
preferredAgentId: z3.string().uuid().optional().nullable(),
|
|
1698
|
+
modelOverride: chatModelOverrideSchema.optional(),
|
|
1699
|
+
effortOverride: chatEffortOverrideSchema.optional(),
|
|
1596
1700
|
issueCreationMode: chatIssueCreationModeSchema.optional(),
|
|
1597
1701
|
planMode: z3.boolean().optional(),
|
|
1598
1702
|
contextLinks: z3.array(createChatContextLinkSchema).optional().default([])
|
|
@@ -1620,7 +1724,10 @@ var init_chat = __esm({
|
|
|
1620
1724
|
});
|
|
1621
1725
|
createSideChatSchema = z3.object({
|
|
1622
1726
|
sourceMessageId: z3.string().uuid(),
|
|
1623
|
-
clientMutationId: z3.string().trim().min(1).max(120)
|
|
1727
|
+
clientMutationId: z3.string().trim().min(1).max(120),
|
|
1728
|
+
preferredAgentId: z3.string().uuid().optional(),
|
|
1729
|
+
modelOverride: chatModelOverrideSchema.optional(),
|
|
1730
|
+
effortOverride: chatEffortOverrideSchema.optional()
|
|
1624
1731
|
});
|
|
1625
1732
|
addChatMessageSchema = z3.object({
|
|
1626
1733
|
body: z3.string().trim().max(2e4).default(""),
|
|
@@ -1643,6 +1750,7 @@ var init_chat = __esm({
|
|
|
1643
1750
|
projectId: z3.string().uuid().optional().nullable(),
|
|
1644
1751
|
skillRefs: z3.array(z3.string().trim().min(1).max(240)).optional().default([]),
|
|
1645
1752
|
accessMode: z3.string().trim().min(1).max(120).optional().nullable(),
|
|
1753
|
+
agentId: z3.string().uuid().optional().nullable(),
|
|
1646
1754
|
model: z3.string().trim().min(1).max(120).optional().nullable(),
|
|
1647
1755
|
effort: z3.string().trim().min(1).max(120).optional().nullable(),
|
|
1648
1756
|
metadata: z3.record(z3.unknown()).optional().nullable()
|
|
@@ -1667,6 +1775,7 @@ var init_chat = __esm({
|
|
|
1667
1775
|
projectId: z3.string().uuid().optional().nullable(),
|
|
1668
1776
|
skillRefs: z3.array(z3.string().trim().min(1).max(240)).optional().default([]),
|
|
1669
1777
|
accessMode: z3.string().trim().min(1).max(120).optional().nullable(),
|
|
1778
|
+
agentId: z3.string().uuid().optional().nullable(),
|
|
1670
1779
|
model: z3.string().trim().min(1).max(120).optional().nullable(),
|
|
1671
1780
|
effort: z3.string().trim().min(1).max(120).optional().nullable(),
|
|
1672
1781
|
metadata: z3.record(z3.unknown()).optional().nullable()
|
|
@@ -2552,7 +2661,7 @@ var init_organization_portability = __esm({
|
|
|
2552
2661
|
title: z12.string().nullable(),
|
|
2553
2662
|
icon: z12.string().nullable(),
|
|
2554
2663
|
capabilities: z12.string().nullable(),
|
|
2555
|
-
reportsToSlug: z12.string().min(1).nullable(),
|
|
2664
|
+
reportsToSlug: z12.string().min(1).nullable().optional().default(null),
|
|
2556
2665
|
agentRuntimeType: z12.string().min(1),
|
|
2557
2666
|
agentRuntimeConfig: z12.record(z12.unknown()),
|
|
2558
2667
|
runtimeConfig: z12.record(z12.unknown()),
|
|
@@ -3024,7 +3133,6 @@ var init_agent = __esm({
|
|
|
3024
3133
|
role: z15.enum(AGENT_ROLES).optional().default("general"),
|
|
3025
3134
|
title: z15.string().optional().nullable(),
|
|
3026
3135
|
icon: agentIconSchema.optional(),
|
|
3027
|
-
reportsTo: z15.string().uuid().optional().nullable(),
|
|
3028
3136
|
capabilities: z15.string().optional().nullable(),
|
|
3029
3137
|
desiredSkills: z15.array(z15.string().min(1)).optional(),
|
|
3030
3138
|
agentRuntimeType: z15.enum(AGENT_RUNTIME_TYPES).optional().default("process"),
|
|
@@ -4974,7 +5082,7 @@ var init_env = __esm({
|
|
|
4974
5082
|
// src/runtime/postgres-payload.ts
|
|
4975
5083
|
import { cp, mkdir, stat } from "node:fs/promises";
|
|
4976
5084
|
import path6 from "node:path";
|
|
4977
|
-
async function
|
|
5085
|
+
async function copyRuntimePostgresPayload(sourceRuntimeDir, targetRuntimeDir, sourceShareDir = path6.join(sourceRuntimeDir, "share")) {
|
|
4978
5086
|
await mkdir(targetRuntimeDir, { recursive: true });
|
|
4979
5087
|
for (const directoryName of ["bin", "lib"]) {
|
|
4980
5088
|
const sourceDirectory = path6.join(sourceRuntimeDir, directoryName);
|
|
@@ -4985,6 +5093,11 @@ async function copyRuntimePostgresPayloadLibraries(sourceRuntimeDir, targetRunti
|
|
|
4985
5093
|
{ recursive: true, dereference: true }
|
|
4986
5094
|
);
|
|
4987
5095
|
}
|
|
5096
|
+
await cp(
|
|
5097
|
+
sourceShareDir,
|
|
5098
|
+
path6.join(targetRuntimeDir, "share"),
|
|
5099
|
+
{ recursive: true, dereference: true }
|
|
5100
|
+
);
|
|
4988
5101
|
}
|
|
4989
5102
|
var init_postgres_payload = __esm({
|
|
4990
5103
|
"src/runtime/postgres-payload.ts"() {
|
|
@@ -4994,7 +5107,7 @@ var init_postgres_payload = __esm({
|
|
|
4994
5107
|
|
|
4995
5108
|
// src/runtime/install.ts
|
|
4996
5109
|
import { execFileSync, spawnSync as spawnSync2 } from "node:child_process";
|
|
4997
|
-
import { copyFile,
|
|
5110
|
+
import { copyFile, mkdir as mkdir2, mkdtemp, readFile, readdir, realpath, rename, rm, stat as stat2, symlink, writeFile } from "node:fs/promises";
|
|
4998
5111
|
import { createRequire } from "node:module";
|
|
4999
5112
|
import path7 from "node:path";
|
|
5000
5113
|
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
|
|
@@ -5513,6 +5626,10 @@ async function resolveRuntimePostgresTemplateDir(binDir) {
|
|
|
5513
5626
|
return null;
|
|
5514
5627
|
}
|
|
5515
5628
|
}
|
|
5629
|
+
function resolveRuntimePostgresShareDir(binDir, templateDir) {
|
|
5630
|
+
const adjacentShareDir = path7.resolve(binDir, "..", "share");
|
|
5631
|
+
return pathIsInside(templateDir, adjacentShareDir) ? adjacentShareDir : templateDir;
|
|
5632
|
+
}
|
|
5516
5633
|
async function assertRuntimePostgresBinDirComplete(cacheDir, binDir) {
|
|
5517
5634
|
const requiredBinaries = ["initdb", "pg_ctl", "postgres"];
|
|
5518
5635
|
const missing = [];
|
|
@@ -5533,10 +5650,17 @@ async function assertRuntimePostgresBinDirComplete(cacheDir, binDir) {
|
|
|
5533
5650
|
} catch {
|
|
5534
5651
|
missing.push(path7.join(templateDir, "postgresql.conf.sample"));
|
|
5535
5652
|
}
|
|
5653
|
+
const shareDir = resolveRuntimePostgresShareDir(binDir, templateDir);
|
|
5654
|
+
try {
|
|
5655
|
+
const timezoneStats = await stat2(path7.join(shareDir, "timezone"));
|
|
5656
|
+
if (!timezoneStats.isDirectory()) missing.push(path7.join(shareDir, "timezone"));
|
|
5657
|
+
} catch {
|
|
5658
|
+
missing.push(path7.join(shareDir, "timezone"));
|
|
5659
|
+
}
|
|
5536
5660
|
}
|
|
5537
5661
|
if (missing.length > 0) {
|
|
5538
5662
|
throw new RuntimeInstallError(
|
|
5539
|
-
`${RUDDER_POSTGRES_BIN_DIR_ENV} must contain PostgreSQL 18.4 initdb, pg_ctl, postgres binaries, and
|
|
5663
|
+
`${RUDDER_POSTGRES_BIN_DIR_ENV} must contain PostgreSQL 18.4 initdb, pg_ctl, postgres binaries, initdb templates, and runtime support files; missing ${missing.join(", ")}`,
|
|
5540
5664
|
{ cacheDir, command: "validate PostgreSQL 18.4 runtime payload", output: "" }
|
|
5541
5665
|
);
|
|
5542
5666
|
}
|
|
@@ -5825,12 +5949,12 @@ async function installSharedRuntimePostgresPayload(cacheDir, homeDir, sourceBinD
|
|
|
5825
5949
|
await rm(previousPlatformRoot, { recursive: true, force: true });
|
|
5826
5950
|
try {
|
|
5827
5951
|
const temporaryRuntimeDir = temporaryPlatformRoot;
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5952
|
+
const sourceShareDir = resolveRuntimePostgresShareDir(sourceBinDir, sourceTemplateDir);
|
|
5953
|
+
await copyRuntimePostgresPayload(
|
|
5954
|
+
sourceRuntimeDir,
|
|
5955
|
+
temporaryRuntimeDir,
|
|
5956
|
+
sourceShareDir
|
|
5957
|
+
);
|
|
5834
5958
|
const temporaryBinDir = path7.join(temporaryRuntimeDir, "bin");
|
|
5835
5959
|
await validateRuntimePostgresVersion(cacheDir, temporaryBinDir, postgresVersionProbe);
|
|
5836
5960
|
try {
|
|
@@ -8702,7 +8826,7 @@ var RUDDER_MCP_TOOL_DESCRIPTORS = [
|
|
|
8702
8826
|
{
|
|
8703
8827
|
"capabilityId": "agent.me",
|
|
8704
8828
|
"name": "rudder_agent_me",
|
|
8705
|
-
"description": "Show the authenticated agent identity
|
|
8829
|
+
"description": "Show the authenticated agent identity and budget.",
|
|
8706
8830
|
"mutating": false,
|
|
8707
8831
|
"requiresOrgId": false,
|
|
8708
8832
|
"requiresAgentId": false,
|
|
@@ -9870,7 +9994,6 @@ function rudderMcpInputSchemaForCapability(id) {
|
|
|
9870
9994
|
slug: "Slug.",
|
|
9871
9995
|
markdown: "Direct Markdown content.",
|
|
9872
9996
|
role: "Agent role.",
|
|
9873
|
-
reportsTo: "Manager or reporting agent reference.",
|
|
9874
9997
|
capabilities: "Agent capability summary.",
|
|
9875
9998
|
wakeCommentId: "Issue comment id that triggered the wake.",
|
|
9876
9999
|
expectedStatuses: "Comma-separated checkout precondition statuses.",
|
|
@@ -10030,7 +10153,7 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
10030
10153
|
id: "agent.me",
|
|
10031
10154
|
command: "rudder agent me",
|
|
10032
10155
|
category: "agent",
|
|
10033
|
-
description: "Show the authenticated agent identity
|
|
10156
|
+
description: "Show the authenticated agent identity and budget.",
|
|
10034
10157
|
mutating: false,
|
|
10035
10158
|
contract: "agent-v1",
|
|
10036
10159
|
requiresOrgId: false,
|
|
@@ -11874,6 +11997,7 @@ async function callToolDirectlyIfSupported(toolName, rawArgs, env, signal) {
|
|
|
11874
11997
|
const capabilityId = toolNameToCapabilityId(toolName);
|
|
11875
11998
|
if (!capabilityId) return null;
|
|
11876
11999
|
const input = isRecord2(rawArgs) ? rawArgs : {};
|
|
12000
|
+
if (hasLocalImageInputs(input.images)) return null;
|
|
11877
12001
|
const api = mcpApiClient(env, signal);
|
|
11878
12002
|
const success = (data) => mcpSuccess(
|
|
11879
12003
|
data,
|
|
@@ -11991,6 +12115,9 @@ async function callToolDirectlyIfSupported(toolName, rawArgs, env, signal) {
|
|
|
11991
12115
|
return null;
|
|
11992
12116
|
}
|
|
11993
12117
|
}
|
|
12118
|
+
function hasLocalImageInputs(value) {
|
|
12119
|
+
return Array.isArray(value) && value.some((entry) => typeof entry === "string" && entry.trim().length > 0);
|
|
12120
|
+
}
|
|
11994
12121
|
function mcpApiClient(env, signal) {
|
|
11995
12122
|
const apiBase = optionalString(env.RUDDER_API_URL);
|
|
11996
12123
|
if (!apiBase) {
|
|
@@ -12078,10 +12205,8 @@ function cliArgsForCapability(capabilityId, input, tempFiles, env) {
|
|
|
12078
12205
|
pushOptional(args, "--role", input.role);
|
|
12079
12206
|
pushOptional(args, "--title", input.title);
|
|
12080
12207
|
pushOptional(args, "--capabilities", input.capabilities ?? input.description);
|
|
12081
|
-
pushOptional(args, "--reports-to", input.reportsTo);
|
|
12082
12208
|
pushBoolean(args, "--clear-title", input.clearTitle);
|
|
12083
12209
|
pushBoolean(args, "--clear-capabilities", input.clearCapabilities ?? input.clearDescription);
|
|
12084
|
-
pushBoolean(args, "--clear-reports-to", input.clearReportsTo);
|
|
12085
12210
|
return args;
|
|
12086
12211
|
}
|
|
12087
12212
|
case "agent.skills.create": {
|
|
@@ -13974,7 +14099,6 @@ function registerAgentCommands(program) {
|
|
|
13974
14099
|
name: row.name,
|
|
13975
14100
|
role: row.role,
|
|
13976
14101
|
status: row.status,
|
|
13977
|
-
reportsTo: row.reportsTo,
|
|
13978
14102
|
budgetMonthlyCents: row.budgetMonthlyCents,
|
|
13979
14103
|
spentMonthlyCents: row.spentMonthlyCents
|
|
13980
14104
|
})
|
|
@@ -14031,7 +14155,6 @@ function registerAgentCommands(program) {
|
|
|
14031
14155
|
role: row.role,
|
|
14032
14156
|
status: row.status,
|
|
14033
14157
|
agentRuntimeType: row.agentRuntimeType,
|
|
14034
|
-
reportsTo: row.reportsTo,
|
|
14035
14158
|
updatedAt: row.updatedAt
|
|
14036
14159
|
})
|
|
14037
14160
|
);
|
|
@@ -14196,7 +14319,7 @@ function registerAgentCommands(program) {
|
|
|
14196
14319
|
})
|
|
14197
14320
|
);
|
|
14198
14321
|
addCommonClientOptions(
|
|
14199
|
-
agent.command("update").description(getAgentCliCapabilityById("agent.update").description).argument("[agentId]", "Agent ID or shortname/url-key; defaults to RUDDER_AGENT_ID").option("-O, --org-id <id>", "Organization ID").option("--name <name>", "Agent display name").option("--role <role>", "Agent organization role").option("--title <title>", "Agent title shown in mentions and agent labels").option("--clear-title", "Clear the agent title").option("--capabilities <text>", "Agent capabilities/description text").option("--capabilities-file <path>", "Read agent capabilities/description from a local file").option("--description <text>", "Alias for --capabilities").option("--description-file <path>", "Alias for --capabilities-file").option("--clear-capabilities", "Clear the agent capabilities/description").option("--clear-description", "Alias for --clear-capabilities").
|
|
14322
|
+
agent.command("update").description(getAgentCliCapabilityById("agent.update").description).argument("[agentId]", "Agent ID or shortname/url-key; defaults to RUDDER_AGENT_ID").option("-O, --org-id <id>", "Organization ID").option("--name <name>", "Agent display name").option("--role <role>", "Agent organization role").option("--title <title>", "Agent title shown in mentions and agent labels").option("--clear-title", "Clear the agent title").option("--capabilities <text>", "Agent capabilities/description text").option("--capabilities-file <path>", "Read agent capabilities/description from a local file").option("--description <text>", "Alias for --capabilities").option("--description-file <path>", "Alias for --capabilities-file").option("--clear-capabilities", "Clear the agent capabilities/description").option("--clear-description", "Alias for --clear-capabilities").action(async (agentIdArg, opts) => {
|
|
14200
14323
|
try {
|
|
14201
14324
|
const ctx = resolveCommandContext(opts);
|
|
14202
14325
|
const agentId = agentIdArg?.trim() || ctx.agentId;
|
|
@@ -14206,7 +14329,7 @@ function registerAgentCommands(program) {
|
|
|
14206
14329
|
const patch = await buildAgentUpdatePatch(opts);
|
|
14207
14330
|
if (Object.keys(patch).length === 0) {
|
|
14208
14331
|
throw new Error(
|
|
14209
|
-
"No agent fields to update. Pass --name, --role, --title, --capabilities,
|
|
14332
|
+
"No agent fields to update. Pass --name, --role, --title, --capabilities, or --description."
|
|
14210
14333
|
);
|
|
14211
14334
|
}
|
|
14212
14335
|
const query = new URLSearchParams();
|
|
@@ -14329,11 +14452,6 @@ async function buildAgentUpdatePatch(opts) {
|
|
|
14329
14452
|
}
|
|
14330
14453
|
if (opts.title !== void 0) rawPatch.title = opts.title;
|
|
14331
14454
|
if (opts.clearTitle) rawPatch.title = null;
|
|
14332
|
-
if (opts.reportsTo !== void 0 && opts.clearReportsTo) {
|
|
14333
|
-
throw new Error("Pass only one of --reports-to or --clear-reports-to.");
|
|
14334
|
-
}
|
|
14335
|
-
if (opts.reportsTo !== void 0) rawPatch.reportsTo = opts.reportsTo;
|
|
14336
|
-
if (opts.clearReportsTo) rawPatch.reportsTo = null;
|
|
14337
14455
|
const capabilitiesInputs = [
|
|
14338
14456
|
opts.capabilities !== void 0 ? "--capabilities" : null,
|
|
14339
14457
|
opts.capabilitiesFile !== void 0 ? "--capabilities-file" : null,
|
|
@@ -15523,7 +15641,7 @@ var IMPORT_INCLUDE_OPTIONS = [
|
|
|
15523
15641
|
{ value: "organization", label: "Organization", hint: "name, branding, and organization settings" },
|
|
15524
15642
|
{ value: "projects", label: "Projects", hint: "projects and workspace metadata" },
|
|
15525
15643
|
{ value: "issues", label: "Tasks", hint: "tasks and recurring automations" },
|
|
15526
|
-
{ value: "agents", label: "Agents", hint: "agent records and
|
|
15644
|
+
{ value: "agents", label: "Agents", hint: "agent records and configuration" },
|
|
15527
15645
|
{ value: "skills", label: "Skills", hint: "organization skill packages and references" }
|
|
15528
15646
|
];
|
|
15529
15647
|
var IMPORT_PREVIEW_SAMPLE_LIMIT = 6;
|
|
@@ -19193,7 +19311,7 @@ import * as p15 from "@clack/prompts";
|
|
|
19193
19311
|
import { spawn as spawn3, spawnSync as spawnSync4 } from "node:child_process";
|
|
19194
19312
|
import { createHash as createHash2, randomUUID } from "node:crypto";
|
|
19195
19313
|
import { createWriteStream, constants as fsConstants, mkdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
19196
|
-
import { access, chmod, copyFile as copyFile2, cp as
|
|
19314
|
+
import { access, chmod, copyFile as copyFile2, cp as cp2, mkdir as mkdir4, mkdtemp as mkdtemp2, readdir as readdir3, readFile as readFile6, rm as rm2, stat as stat5, utimes, writeFile as writeFile3 } from "node:fs/promises";
|
|
19197
19315
|
import { homedir, tmpdir } from "node:os";
|
|
19198
19316
|
import path23 from "node:path";
|
|
19199
19317
|
import { Readable, Transform } from "node:stream";
|
|
@@ -20419,7 +20537,7 @@ async function copyPortableAppBundle(sourcePath, destinationPath) {
|
|
|
20419
20537
|
if (isSuccessfulRobocopyExitCode(result.status)) return;
|
|
20420
20538
|
throw new Error(formatCommandFailure(command.command, command.args, result.stdout, result.stderr));
|
|
20421
20539
|
}
|
|
20422
|
-
await
|
|
20540
|
+
await cp2(sourcePath, destinationPath, { recursive: true, verbatimSymlinks: true });
|
|
20423
20541
|
}
|
|
20424
20542
|
async function removeMacQuarantine(paths, target) {
|
|
20425
20543
|
if (target.platform !== "macos") return;
|