@duvoai/cli 1.27.0 → 1.30.0
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 +0 -2
- package/dist/bin/duvo.js +634 -314
- package/dist/bin/duvo.js.map +4 -4
- package/package.json +1 -1
package/dist/bin/duvo.js
CHANGED
|
@@ -2255,6 +2255,16 @@ var AGENT_RUN_STATUSES = [
|
|
|
2255
2255
|
"interrupted"
|
|
2256
2256
|
// User interrupted
|
|
2257
2257
|
];
|
|
2258
|
+
var TERMINAL_AGENT_RUN_STATUSES = [
|
|
2259
|
+
"completed",
|
|
2260
|
+
"failed",
|
|
2261
|
+
"interrupted"
|
|
2262
|
+
];
|
|
2263
|
+
function isTerminalAgentRunStatus(status) {
|
|
2264
|
+
return TERMINAL_AGENT_RUN_STATUSES.includes(status);
|
|
2265
|
+
}
|
|
2266
|
+
__name(isTerminalAgentRunStatus, "isTerminalAgentRunStatus");
|
|
2267
|
+
__name2(isTerminalAgentRunStatus, "isTerminalAgentRunStatus");
|
|
2258
2268
|
var agentRunStatusSchema = z10.enum(AGENT_RUN_STATUSES);
|
|
2259
2269
|
var AGENT_RUN_SOURCES = [
|
|
2260
2270
|
"app",
|
|
@@ -2503,7 +2513,7 @@ var canExecuteConcurrentResultSchema = z11.object({
|
|
|
2503
2513
|
var BrowsingProviderSchema = z12.enum(["google", "anthropic"]);
|
|
2504
2514
|
var PLATFORM_DEFAULT_MODELS = {
|
|
2505
2515
|
agent: {
|
|
2506
|
-
model: "claude-sonnet-5"
|
|
2516
|
+
model: "claude-sonnet-5[1m]"
|
|
2507
2517
|
},
|
|
2508
2518
|
browsing: {
|
|
2509
2519
|
provider: "google",
|
|
@@ -2512,6 +2522,7 @@ var PLATFORM_DEFAULT_MODELS = {
|
|
|
2512
2522
|
};
|
|
2513
2523
|
var CLAUDE_MODEL_IDS = [
|
|
2514
2524
|
"claude-sonnet-5",
|
|
2525
|
+
"claude-sonnet-5[1m]",
|
|
2515
2526
|
"claude-opus-4-8",
|
|
2516
2527
|
"claude-opus-4-8[1m]"
|
|
2517
2528
|
];
|
|
@@ -2555,6 +2566,10 @@ var AVAILABLE_AGENT_MODELS = {
|
|
|
2555
2566
|
displayName: "Claude Sonnet 5",
|
|
2556
2567
|
description: "Fast and capable for everyday tasks"
|
|
2557
2568
|
},
|
|
2569
|
+
"claude-sonnet-5[1m]": {
|
|
2570
|
+
displayName: "Claude Sonnet 5",
|
|
2571
|
+
description: "Fast and capable for everyday tasks"
|
|
2572
|
+
},
|
|
2558
2573
|
"claude-opus-4-8": {
|
|
2559
2574
|
displayName: "Claude Opus 4.8",
|
|
2560
2575
|
description: "Our most capable model \u2014 best for complex work"
|
|
@@ -2572,21 +2587,28 @@ var BrowsingModelIdSchema = z12.enum([
|
|
|
2572
2587
|
"claude-sonnet-4-5",
|
|
2573
2588
|
"claude-opus-4-1"
|
|
2574
2589
|
]);
|
|
2575
|
-
var LEGACY_DEFAULT_MODEL = "claude-sonnet-5";
|
|
2590
|
+
var LEGACY_DEFAULT_MODEL = "claude-sonnet-5[1m]";
|
|
2576
2591
|
var LEGACY_MODEL_REMAP = {
|
|
2577
|
-
|
|
2578
|
-
|
|
2592
|
+
// Bare Sonnet 5 is still schema-valid (stored configs keep parsing) but is
|
|
2593
|
+
// upgraded to the [1m]-suffixed ID at resolve time so the pinned CLI budgets
|
|
2594
|
+
// the real 1M window instead of its 200K unknown-model fallback.
|
|
2595
|
+
"claude-sonnet-5": "claude-sonnet-5[1m]",
|
|
2596
|
+
"claude-sonnet-4-6": "claude-sonnet-5[1m]",
|
|
2597
|
+
"claude-sonnet-4-6[1m]": "claude-sonnet-5[1m]",
|
|
2579
2598
|
"claude-opus-4-6": "claude-opus-4-8",
|
|
2580
2599
|
"claude-opus-4-6[1m]": "claude-opus-4-8[1m]",
|
|
2581
2600
|
"claude-opus-4-7": "claude-opus-4-8",
|
|
2582
2601
|
"claude-opus-4-7[1m]": "claude-opus-4-8[1m]"
|
|
2583
2602
|
};
|
|
2584
2603
|
function mapModelToClaudeModel(model) {
|
|
2604
|
+
const remapped = model != null && model !== "" ? LEGACY_MODEL_REMAP[model] : void 0;
|
|
2605
|
+
if (remapped) {
|
|
2606
|
+
return remapped;
|
|
2607
|
+
}
|
|
2585
2608
|
if (model && CLAUDE_MODEL_IDS.includes(model)) {
|
|
2586
2609
|
return model;
|
|
2587
2610
|
}
|
|
2588
|
-
|
|
2589
|
-
return remapped ?? LEGACY_DEFAULT_MODEL;
|
|
2611
|
+
return LEGACY_DEFAULT_MODEL;
|
|
2590
2612
|
}
|
|
2591
2613
|
__name(mapModelToClaudeModel, "mapModelToClaudeModel");
|
|
2592
2614
|
__name2(mapModelToClaudeModel, "mapModelToClaudeModel");
|
|
@@ -3186,7 +3208,63 @@ var clarityProcessListItemSchema = z15.object({
|
|
|
3186
3208
|
contributors: z15.array(z15.object({ userId: z15.string(), userName: z15.string() })).optional(),
|
|
3187
3209
|
createdAt: z15.coerce.date(),
|
|
3188
3210
|
updatedAt: z15.coerce.date(),
|
|
3189
|
-
createdByName: z15.string().optional()
|
|
3211
|
+
createdByName: z15.string().optional(),
|
|
3212
|
+
/** Team-scoped lists only; absent on org portfolio rows. */
|
|
3213
|
+
folderId: z15.guid().nullable().optional(),
|
|
3214
|
+
/**
|
|
3215
|
+
* Read-time folder suggestion: set when the process is unfiled and its
|
|
3216
|
+
* landscape leaf sits under a group node a team folder links to.
|
|
3217
|
+
*/
|
|
3218
|
+
suggestedFolderId: z15.guid().nullable().optional()
|
|
3219
|
+
});
|
|
3220
|
+
var clarityProcessFolderSchema = z15.object({
|
|
3221
|
+
id: z15.guid(),
|
|
3222
|
+
teamId: z15.guid(),
|
|
3223
|
+
name: z15.string(),
|
|
3224
|
+
/** Linked landscape group node, or null for plain custom folders. */
|
|
3225
|
+
landscapeNodeId: z15.guid().nullable(),
|
|
3226
|
+
/** Once true, landscape group renames no longer propagate to this folder. */
|
|
3227
|
+
nameOverridden: z15.boolean(),
|
|
3228
|
+
sortOrder: z15.number().int(),
|
|
3229
|
+
createdAt: z15.coerce.date(),
|
|
3230
|
+
updatedAt: z15.coerce.date()
|
|
3231
|
+
});
|
|
3232
|
+
var clarityProcessFolderListItemSchema = clarityProcessFolderSchema.extend({
|
|
3233
|
+
processCount: z15.number(),
|
|
3234
|
+
/** Unfiled team processes whose landscape group matches this folder's link. */
|
|
3235
|
+
suggestedCount: z15.number()
|
|
3236
|
+
});
|
|
3237
|
+
var clarityProcessFolderListResponseSchema = z15.object({
|
|
3238
|
+
folders: z15.array(clarityProcessFolderListItemSchema)
|
|
3239
|
+
});
|
|
3240
|
+
var claritySuccessResponseSchema = z15.object({
|
|
3241
|
+
success: z15.boolean()
|
|
3242
|
+
});
|
|
3243
|
+
var clarityProcessFolderResponseSchema = z15.object({
|
|
3244
|
+
folder: clarityProcessFolderSchema
|
|
3245
|
+
});
|
|
3246
|
+
var clarityMoveProcessesToFolderResponseSchema = z15.object({
|
|
3247
|
+
movedCount: z15.number()
|
|
3248
|
+
});
|
|
3249
|
+
var claritySetupFoldersFromLandscapeResponseSchema = z15.object({
|
|
3250
|
+
folders: z15.array(clarityProcessFolderSchema),
|
|
3251
|
+
createdCount: z15.number()
|
|
3252
|
+
});
|
|
3253
|
+
var clarityFileSuggestedProcessesResponseSchema = z15.object({
|
|
3254
|
+
filedCount: z15.number()
|
|
3255
|
+
});
|
|
3256
|
+
var clarityLandscapeGroupSchema = z15.object({
|
|
3257
|
+
id: z15.guid(),
|
|
3258
|
+
name: z15.string(),
|
|
3259
|
+
sortOrder: z15.number().int(),
|
|
3260
|
+
processCount: z15.number()
|
|
3261
|
+
});
|
|
3262
|
+
var clarityLandscapeGroupListResponseSchema = z15.object({
|
|
3263
|
+
groups: z15.array(clarityLandscapeGroupSchema),
|
|
3264
|
+
/** Team processes whose landscape leaf sits under no group node. */
|
|
3265
|
+
unclassifiedCount: z15.number(),
|
|
3266
|
+
/** True when the bounded read could not return every group. */
|
|
3267
|
+
truncated: z15.boolean()
|
|
3190
3268
|
});
|
|
3191
3269
|
var CLARITY_PROCESS_LIST_ORDERS = [
|
|
3192
3270
|
"updated_desc",
|
|
@@ -3337,7 +3415,9 @@ var clarityLandscapeCaptureRequestSchema = z15.object({
|
|
|
3337
3415
|
});
|
|
3338
3416
|
}
|
|
3339
3417
|
});
|
|
3340
|
-
var
|
|
3418
|
+
var CLARITY_PROCESS_LANDSCAPE_REDACTED_NODE_HINT = "restricted_process";
|
|
3419
|
+
var clarityProcessLandscapeFullNodeSchema = z15.object({
|
|
3420
|
+
access: z15.literal("full"),
|
|
3341
3421
|
id: z15.guid(),
|
|
3342
3422
|
parentId: z15.guid().nullable(),
|
|
3343
3423
|
processId: z15.guid().nullable(),
|
|
@@ -3360,7 +3440,27 @@ var clarityProcessLandscapeNodeSchema = z15.object({
|
|
|
3360
3440
|
captureSuggestions: z15.array(clarityLandscapeCaptureSuggestionSchema).default([]),
|
|
3361
3441
|
captureRequests: z15.array(clarityLandscapeCaptureRequestSchema).default([]),
|
|
3362
3442
|
labels: z15.array(clarityProcessAssignedLabelSchema).default([])
|
|
3363
|
-
});
|
|
3443
|
+
}).strict();
|
|
3444
|
+
var clarityProcessLandscapePublicNodeSchema = clarityProcessLandscapeFullNodeSchema.omit({ access: true }).partial({
|
|
3445
|
+
teamAssignmentSuggestions: true,
|
|
3446
|
+
captureSuggestions: true,
|
|
3447
|
+
captureRequests: true
|
|
3448
|
+
});
|
|
3449
|
+
var clarityProcessLandscapeRedactedNodeSchema = z15.object({
|
|
3450
|
+
access: z15.literal("redacted"),
|
|
3451
|
+
hint: z15.literal(CLARITY_PROCESS_LANDSCAPE_REDACTED_NODE_HINT),
|
|
3452
|
+
id: z15.guid(),
|
|
3453
|
+
parentId: z15.guid().nullable(),
|
|
3454
|
+
sortOrder: z15.number(),
|
|
3455
|
+
depth: z15.number()
|
|
3456
|
+
}).strict();
|
|
3457
|
+
var clarityProcessLandscapeNodeSchema = z15.discriminatedUnion(
|
|
3458
|
+
"access",
|
|
3459
|
+
[
|
|
3460
|
+
clarityProcessLandscapeFullNodeSchema,
|
|
3461
|
+
clarityProcessLandscapeRedactedNodeSchema
|
|
3462
|
+
]
|
|
3463
|
+
);
|
|
3364
3464
|
var clarityProcessLandscapeUnlinkedProcessSchema = clarityProcessLandscapeSummarySchema.extend({
|
|
3365
3465
|
teamId: z15.guid(),
|
|
3366
3466
|
teamName: z15.string().nullable(),
|
|
@@ -3372,7 +3472,8 @@ var clarityProcessLandscapeLinkSchema = z15.object({
|
|
|
3372
3472
|
targetNodeId: z15.guid(),
|
|
3373
3473
|
type: z15.enum(["hands_off_to", "shares_step_with", "variant_of"]),
|
|
3374
3474
|
state: z15.enum(["suggested", "confirmed"]),
|
|
3375
|
-
confidence: z15.number().nullable()
|
|
3475
|
+
confidence: z15.number().nullable(),
|
|
3476
|
+
rationale: z15.string().nullable().default(null)
|
|
3376
3477
|
});
|
|
3377
3478
|
var clarityProcessLandscapeStatsSchema = z15.object({
|
|
3378
3479
|
totalNodes: z15.number(),
|
|
@@ -3386,6 +3487,7 @@ var landscapeGenerationResultSummarySchema = z15.object({
|
|
|
3386
3487
|
createdNodeCount: z15.number().int().nonnegative(),
|
|
3387
3488
|
reparentedNodeCount: z15.number().int().nonnegative(),
|
|
3388
3489
|
attachedProcessCount: z15.number().int().nonnegative(),
|
|
3490
|
+
suggestedRelationshipCount: z15.number().int().nonnegative().default(0),
|
|
3389
3491
|
unchangedWriteCount: z15.number().int().nonnegative(),
|
|
3390
3492
|
failedWriteCount: z15.number().int().nonnegative()
|
|
3391
3493
|
});
|
|
@@ -3408,6 +3510,9 @@ var clarityProcessLandscapeResponseSchema = z15.object({
|
|
|
3408
3510
|
generation: clarityProcessLandscapeGenerationSchema,
|
|
3409
3511
|
truncated: z15.boolean()
|
|
3410
3512
|
});
|
|
3513
|
+
var clarityProcessLandscapePublicResponseSchema = clarityProcessLandscapeResponseSchema.extend({
|
|
3514
|
+
nodes: z15.array(clarityProcessLandscapePublicNodeSchema)
|
|
3515
|
+
});
|
|
3411
3516
|
var clarityProcessPersonSchema = z15.object({
|
|
3412
3517
|
id: z15.guid(),
|
|
3413
3518
|
userId: z15.guid().nullable(),
|
|
@@ -5021,9 +5126,15 @@ var clarityProcessLandscapeGenerationStatusChangedEventDataSchema = z21.object({
|
|
|
5021
5126
|
status: clarityProcessLandscapeGenerationSchema.shape.status.exclude([
|
|
5022
5127
|
"idle"
|
|
5023
5128
|
]),
|
|
5024
|
-
error: z21.string().optional(),
|
|
5025
5129
|
result: landscapeGenerationResultSummarySchema.optional()
|
|
5026
5130
|
});
|
|
5131
|
+
var clarityProcessLandscapeChangedEventDataSchema = z21.object({
|
|
5132
|
+
organizationId: z21.guid()
|
|
5133
|
+
});
|
|
5134
|
+
var clarityProcessLandscapeOrganizeStatusChangedEventDataSchema = z21.object({
|
|
5135
|
+
organizationId: z21.guid(),
|
|
5136
|
+
status: z21.enum(["completed", "failed"])
|
|
5137
|
+
});
|
|
5027
5138
|
var clarityProcessLandscapeRoomPayloadSchema = z21.object({
|
|
5028
5139
|
organizationId: z21.guid()
|
|
5029
5140
|
});
|
|
@@ -6903,7 +7014,6 @@ var integrationResponseSchema = z27.object({
|
|
|
6903
7014
|
server_url: z27.string().optional(),
|
|
6904
7015
|
transport_type: TransportTypeSchema.optional(),
|
|
6905
7016
|
auth_method: z27.string().nullable().optional(),
|
|
6906
|
-
composio_mcp_id: z27.string().nullable().default(null),
|
|
6907
7017
|
custom_integration_id: z27.string().nullable().optional(),
|
|
6908
7018
|
icon_url: z27.string().nullable().optional(),
|
|
6909
7019
|
oauth_provider: z27.string().nullable().optional(),
|
|
@@ -6912,7 +7022,7 @@ var integrationResponseSchema = z27.object({
|
|
|
6912
7022
|
* to start the OAuth flow via
|
|
6913
7023
|
* `POST /v1/connections/oauth/native/:provider/start`. Derived
|
|
6914
7024
|
* server-side from the integration `type`; null when no native provider
|
|
6915
|
-
* exists for the type (default-provider,
|
|
7025
|
+
* exists for the type (default-provider, custom MCP).
|
|
6916
7026
|
*/
|
|
6917
7027
|
oauth_provider_key: z27.string().nullable().optional(),
|
|
6918
7028
|
oauth_scopes: z27.array(z27.string()).nullable().optional(),
|
|
@@ -7001,15 +7111,6 @@ var checkDcrSupportResponseSchema = z27.object({
|
|
|
7001
7111
|
var authorizationUrlResponseSchema = z27.object({
|
|
7002
7112
|
authorization_url: z27.string().describe("OAuth provider authorization URL to open in a browser")
|
|
7003
7113
|
});
|
|
7004
|
-
var startComposioConnectionResponseSchema = z27.object({
|
|
7005
|
-
redirect_url: z27.string().nullable().describe(
|
|
7006
|
-
"Browser URL the user must visit to complete authorization. Null when the connection was completed synchronously (e.g. for API_KEY auth that did not require a browser flow)."
|
|
7007
|
-
),
|
|
7008
|
-
status: z27.string().nullable().describe("Composio connection status, e.g. INITIATED or ACTIVE."),
|
|
7009
|
-
connected_account_id: z27.string().describe(
|
|
7010
|
-
"Composio connected-account ID, passed to /v1/connections/composio/finalize to complete the flow."
|
|
7011
|
-
)
|
|
7012
|
-
});
|
|
7013
7114
|
var createCustomIntegrationRequestSchema = z27.object({
|
|
7014
7115
|
name: z27.string().min(1, "Name is required"),
|
|
7015
7116
|
auth_method: z27.enum(["url", "apikey", "headers", "oauth"]),
|
|
@@ -7046,7 +7147,6 @@ var updateIntegrationRequestSchema = z27.object({
|
|
|
7046
7147
|
plaintext: z27.record(z27.string(), z27.string()).optional(),
|
|
7047
7148
|
secret: z27.record(z27.string(), z27.string()).optional()
|
|
7048
7149
|
}).nullable().optional(),
|
|
7049
|
-
composio_mcp_id: z27.string().nullable().optional(),
|
|
7050
7150
|
// Toggle team sharing. `true` makes the instance team-shared
|
|
7051
7151
|
// (`user_id = NULL`); `false` reverts it to personal owned by the caller.
|
|
7052
7152
|
// Rejected when the org-level "Connections sharing" setting is OFF and
|
|
@@ -7252,6 +7352,14 @@ var artifactVisibilitySchema = z31.enum([
|
|
|
7252
7352
|
"teams"
|
|
7253
7353
|
]);
|
|
7254
7354
|
var artifactPublishPermissionSchema = z31.enum(["view", "edit"]);
|
|
7355
|
+
var artifactRefreshFrequencySchema = z31.enum([
|
|
7356
|
+
"every_15_minutes",
|
|
7357
|
+
"every_30_minutes",
|
|
7358
|
+
"hourly",
|
|
7359
|
+
"every_6_hours",
|
|
7360
|
+
"daily",
|
|
7361
|
+
"weekly"
|
|
7362
|
+
]);
|
|
7255
7363
|
var artifactSchema = z31.object({
|
|
7256
7364
|
id: z31.guid(),
|
|
7257
7365
|
team_id: z31.guid(),
|
|
@@ -7274,6 +7382,13 @@ var artifactSchema = z31.object({
|
|
|
7274
7382
|
// image. Optional so older/other clients (and fixtures) tolerate its absence;
|
|
7275
7383
|
// the backend always includes it (string or null).
|
|
7276
7384
|
thumbnail_url: z31.string().nullable().optional(),
|
|
7385
|
+
// Background auto-refresh cadence, or null when off. Optional so older
|
|
7386
|
+
// clients and fixtures tolerate its absence; the backend always includes it.
|
|
7387
|
+
refresh_frequency: artifactRefreshFrequencySchema.nullable().optional(),
|
|
7388
|
+
// When the last scheduled refresh was dispatched / the next one is due.
|
|
7389
|
+
// Null until a schedule is set (next) or has fired at least once (last).
|
|
7390
|
+
last_refresh_at: z31.string().nullable().optional(),
|
|
7391
|
+
next_refresh_at: z31.string().nullable().optional(),
|
|
7277
7392
|
created_at: z31.string(),
|
|
7278
7393
|
updated_at: z31.string()
|
|
7279
7394
|
});
|
|
@@ -7402,8 +7517,12 @@ var answerArtifactQuestionResponseSchema = z31.object({
|
|
|
7402
7517
|
ok: z31.literal(true)
|
|
7403
7518
|
});
|
|
7404
7519
|
var updateArtifactBodySchema = z31.object({
|
|
7405
|
-
title: z31.string().trim().min(1).max(120)
|
|
7406
|
-
|
|
7520
|
+
title: z31.string().trim().min(1).max(120).optional(),
|
|
7521
|
+
refresh_frequency: artifactRefreshFrequencySchema.nullable().optional()
|
|
7522
|
+
}).strict().refine(
|
|
7523
|
+
(body) => body.title !== void 0 || body.refresh_frequency !== void 0,
|
|
7524
|
+
{ message: "At least one field is required" }
|
|
7525
|
+
);
|
|
7407
7526
|
var publishArtifactBodySchema = z31.object({
|
|
7408
7527
|
visibility: z31.enum(["private", "team", "organization"]),
|
|
7409
7528
|
// The audience permission to apply when publishing. Applies to the Pulse's
|
|
@@ -8001,10 +8120,18 @@ var adminDreamEditReferenceSchema = z38.object({
|
|
|
8001
8120
|
source_refs: z38.array(memorySourceRefSchema),
|
|
8002
8121
|
created_at: z38.string()
|
|
8003
8122
|
});
|
|
8123
|
+
var adminDreamTraceEntrySchema = z38.object({
|
|
8124
|
+
type: z38.string().max(128),
|
|
8125
|
+
role: z38.string().max(64).optional(),
|
|
8126
|
+
toolName: z38.string().max(512).optional(),
|
|
8127
|
+
contentPreview: z38.string().max(2e3).optional(),
|
|
8128
|
+
ts: z38.string()
|
|
8129
|
+
});
|
|
8004
8130
|
var adminDreamingRunDetailSchema = adminDreamingRunSummarySchema.extend({
|
|
8005
8131
|
input: z38.record(z38.string(), z38.unknown()),
|
|
8006
8132
|
resolvedInputs: z38.array(adminDreamResolvedInputSchema),
|
|
8007
|
-
editReferences: z38.array(adminDreamEditReferenceSchema)
|
|
8133
|
+
editReferences: z38.array(adminDreamEditReferenceSchema),
|
|
8134
|
+
sessionTrace: z38.array(adminDreamTraceEntrySchema)
|
|
8008
8135
|
});
|
|
8009
8136
|
var adminDreamingRunDetailResponseSchema = z38.object({
|
|
8010
8137
|
dream: adminDreamingRunDetailSchema
|
|
@@ -8329,6 +8456,16 @@ var adminOrgAddMemberRequestSchema = z40.object({
|
|
|
8329
8456
|
var adminOrgAddMemberResponseSchema = z40.object({
|
|
8330
8457
|
member: adminOrgMemberSchema
|
|
8331
8458
|
});
|
|
8459
|
+
var adminOrgInviteMemberRequestSchema = z40.object({
|
|
8460
|
+
email: z40.email(),
|
|
8461
|
+
role: z40.enum(ORG_ROLES.ALL),
|
|
8462
|
+
frontendUrl: z40.url().optional()
|
|
8463
|
+
});
|
|
8464
|
+
var adminOrgInviteMemberResponseSchema = z40.object({
|
|
8465
|
+
success: z40.literal(true),
|
|
8466
|
+
invitationId: z40.guid(),
|
|
8467
|
+
emailSent: z40.boolean()
|
|
8468
|
+
});
|
|
8332
8469
|
var adminOrgUpdateMemberRoleRequestSchema = z40.object({
|
|
8333
8470
|
role: z40.enum(ORG_ROLES.ALL)
|
|
8334
8471
|
});
|
|
@@ -8707,6 +8844,7 @@ var agentApiSchema = z42.object({
|
|
|
8707
8844
|
team_id: z42.string().nullable(),
|
|
8708
8845
|
thread_id: z42.string().nullable(),
|
|
8709
8846
|
folder_id: z42.string().nullable().optional(),
|
|
8847
|
+
automation_id: z42.guid().nullable().optional(),
|
|
8710
8848
|
created_at: z42.string().nullable(),
|
|
8711
8849
|
updated_at: z42.string().nullable(),
|
|
8712
8850
|
created_by: z42.object({
|
|
@@ -9074,6 +9212,33 @@ var automationRevisionDetailResponseApiSchema = z50.object({
|
|
|
9074
9212
|
var automationRevisionResponseApiSchema = z50.object({
|
|
9075
9213
|
revision: automationRevisionSummaryApiSchema.describe("The revision summary")
|
|
9076
9214
|
});
|
|
9215
|
+
var automationFlowAgentApiSchema = z50.object({
|
|
9216
|
+
id: z50.guid().describe("Agent identifier"),
|
|
9217
|
+
name: z50.string().describe("Agent name")
|
|
9218
|
+
});
|
|
9219
|
+
var automationFlowQueueApiSchema = z50.object({
|
|
9220
|
+
id: z50.guid().describe("Queue identifier"),
|
|
9221
|
+
name: z50.string().describe("Queue name (per-revision override or canonical)"),
|
|
9222
|
+
item_count: z50.int().describe("Active (non-deleted) case count in the queue"),
|
|
9223
|
+
producer_agent_ids: z50.array(z50.guid()).describe("Agents that add cases to this queue"),
|
|
9224
|
+
consumer_agent_ids: z50.array(z50.guid()).describe("Agents that process cases from this queue"),
|
|
9225
|
+
routed_consumer_agent_id: z50.guid().nullable().describe(
|
|
9226
|
+
"Consumer the revision routes new cases to (null when unrouted or disabled)"
|
|
9227
|
+
)
|
|
9228
|
+
});
|
|
9229
|
+
var automationFlowHandoverApiSchema = z50.object({
|
|
9230
|
+
source_agent_id: z50.guid().describe("Agent that hands work over"),
|
|
9231
|
+
target_agent_id: z50.guid().describe("Agent that receives the handover")
|
|
9232
|
+
});
|
|
9233
|
+
var automationFlowApiSchema = z50.object({
|
|
9234
|
+
revision_id: z50.guid().describe("Revision this flow was computed for"),
|
|
9235
|
+
agents: z50.array(automationFlowAgentApiSchema).describe("Agent nodes in the flow"),
|
|
9236
|
+
queues: z50.array(automationFlowQueueApiSchema).describe("Queue nodes in the flow"),
|
|
9237
|
+
handovers: z50.array(automationFlowHandoverApiSchema).describe("Agent \u2192 agent handover edges")
|
|
9238
|
+
});
|
|
9239
|
+
var automationFlowResponseApiSchema = z50.object({
|
|
9240
|
+
flow: automationFlowApiSchema.describe("The revision's flow graph")
|
|
9241
|
+
});
|
|
9077
9242
|
var AUTOMATION_REVISION_NAME_MAX_LENGTH = 200;
|
|
9078
9243
|
var AUTOMATION_REVISION_DESCRIPTION_MAX_LENGTH = 2e3;
|
|
9079
9244
|
var revisionNameFieldSchema = z50.string().trim().min(1).max(AUTOMATION_REVISION_NAME_MAX_LENGTH);
|
|
@@ -9114,6 +9279,82 @@ var activateAutomationRevisionResponseApiSchema = z50.object({
|
|
|
9114
9279
|
),
|
|
9115
9280
|
repinned_case_count: z50.int().describe("Number of pending cases re-pinned onto the activated revision")
|
|
9116
9281
|
});
|
|
9282
|
+
var automationEntrypointRunApiSchema = z50.object({
|
|
9283
|
+
id: z50.guid().describe("Agent run ID of the entrypoint run"),
|
|
9284
|
+
agent_id: z50.guid().describe("Agent that ran"),
|
|
9285
|
+
build_id: z50.guid().describe("Build the run executed"),
|
|
9286
|
+
agent_name: z50.string().nullable().describe("Display name of the agent that ran"),
|
|
9287
|
+
status: agentRunStatusSchema.describe("Run status"),
|
|
9288
|
+
source: z50.string().nullable().describe("How the run was started (schedule, slack, manual, api, \u2026)"),
|
|
9289
|
+
automation_revision_id: z50.guid().nullable().describe("Revision the run was pinned to (null for legacy runs)"),
|
|
9290
|
+
run_count: z50.int().describe(
|
|
9291
|
+
"Total runs in this run's chain, including the entrypoint run itself"
|
|
9292
|
+
),
|
|
9293
|
+
produced_case_count: z50.int().describe(
|
|
9294
|
+
"Cases produced by runs in this chain. Non-zero means the chain has something to expand even when run_count is 1 (an unclaimed produced case)"
|
|
9295
|
+
),
|
|
9296
|
+
eval_summaries: evalSummarySchema.nullable().describe("Evaluation summary for the run, when available"),
|
|
9297
|
+
created_at: z50.string().describe("ISO 8601 creation timestamp"),
|
|
9298
|
+
started_at: z50.string().nullable().describe("ISO 8601 start timestamp"),
|
|
9299
|
+
completed_at: z50.string().nullable().describe("ISO 8601 completion timestamp"),
|
|
9300
|
+
updated_at: z50.string().describe("ISO 8601 last-modified timestamp")
|
|
9301
|
+
});
|
|
9302
|
+
var automationEntrypointRunsListApiSchema = z50.object({
|
|
9303
|
+
runs: z50.array(automationEntrypointRunApiSchema).describe("Entrypoint runs, newest first"),
|
|
9304
|
+
total: z50.int().describe("Total entrypoint runs matching the query"),
|
|
9305
|
+
limit: z50.int().describe("Page size used"),
|
|
9306
|
+
offset: z50.int().describe("Offset used")
|
|
9307
|
+
});
|
|
9308
|
+
var automationRunChainNodeApiSchema = z50.object({
|
|
9309
|
+
id: z50.guid().describe("Agent run ID"),
|
|
9310
|
+
agent_id: z50.guid().describe("Agent that ran"),
|
|
9311
|
+
build_id: z50.guid().describe("Build the run executed"),
|
|
9312
|
+
agent_name: z50.string().nullable().describe("Display name of the agent"),
|
|
9313
|
+
automation_revision_id: z50.guid().nullable().describe("Revision the run was pinned to (null for legacy runs)"),
|
|
9314
|
+
parent_agent_run_id: z50.guid().nullable().describe(
|
|
9315
|
+
"Run that directly caused this run (null for the entrypoint run)"
|
|
9316
|
+
),
|
|
9317
|
+
parent_relationship: z50.string().nullable().describe(
|
|
9318
|
+
"Why this run was created from its parent (produced_case, handover, retry, \u2026)"
|
|
9319
|
+
),
|
|
9320
|
+
status: agentRunStatusSchema.describe("Run status"),
|
|
9321
|
+
source: z50.string().nullable().describe("How the run was started"),
|
|
9322
|
+
case_queue_item_id: z50.guid().nullable().describe(
|
|
9323
|
+
"Case this run claimed, when it was triggered by claiming one (nests the run under that case in the tree)"
|
|
9324
|
+
),
|
|
9325
|
+
eval_summaries: evalSummarySchema.nullable().describe("Evaluation summary for the run, when available"),
|
|
9326
|
+
created_at: z50.string().describe("ISO 8601 creation timestamp"),
|
|
9327
|
+
started_at: z50.string().nullable().describe("ISO 8601 start timestamp"),
|
|
9328
|
+
completed_at: z50.string().nullable().describe("ISO 8601 completion timestamp")
|
|
9329
|
+
});
|
|
9330
|
+
var automationRunChainCaseNodeApiSchema = z50.object({
|
|
9331
|
+
id: z50.guid().describe("Case (case_queue_item) ID"),
|
|
9332
|
+
title: z50.string().nullable().describe("Case title"),
|
|
9333
|
+
queue_id: z50.guid().describe("Queue the case belongs to"),
|
|
9334
|
+
queue_name: z50.string().nullable().describe("Display name of the queue the case was added to"),
|
|
9335
|
+
status: z50.enum([
|
|
9336
|
+
"pending",
|
|
9337
|
+
"in_progress",
|
|
9338
|
+
"needs_input",
|
|
9339
|
+
"postponed",
|
|
9340
|
+
"completed",
|
|
9341
|
+
"failed"
|
|
9342
|
+
]).describe("Derived case display status"),
|
|
9343
|
+
producer_run_id: z50.guid().describe("Run that produced this case \u2014 its parent in the tree"),
|
|
9344
|
+
created_at: z50.string().describe("ISO 8601 creation timestamp")
|
|
9345
|
+
});
|
|
9346
|
+
var automationRunChainResponseApiSchema = z50.object({
|
|
9347
|
+
entrypoint_run_id: z50.guid().describe(
|
|
9348
|
+
"The chain's entrypoint run \u2014 resolved from the requested run, which may be any run in the chain"
|
|
9349
|
+
),
|
|
9350
|
+
runs: z50.array(automationRunChainNodeApiSchema).describe("All runs in the chain, oldest first"),
|
|
9351
|
+
cases: z50.array(automationRunChainCaseNodeApiSchema).describe(
|
|
9352
|
+
"Cases produced by runs in the chain, each nested under its producer run"
|
|
9353
|
+
),
|
|
9354
|
+
truncated: z50.boolean().describe(
|
|
9355
|
+
"True when the chain exceeded the server cap and only the first runs are returned, so the rendered tree is incomplete"
|
|
9356
|
+
)
|
|
9357
|
+
});
|
|
9117
9358
|
var BROWSER_EGRESS_MODES = [
|
|
9118
9359
|
"provider",
|
|
9119
9360
|
"direct",
|
|
@@ -9706,6 +9947,10 @@ var caseQueueSchema = z60.object({
|
|
|
9706
9947
|
// Optional (additive) so existing CaseQueue consumers and fixtures across the
|
|
9707
9948
|
// FE/CLI don't break; the backend always populates it on real responses.
|
|
9708
9949
|
automation_id: z60.guid().nullable().optional(),
|
|
9950
|
+
// Optional (additive), populated by the get-queue route. Consumers use it to
|
|
9951
|
+
// confirm a queue belongs to the acting team before building team-scoped
|
|
9952
|
+
// links (e.g. the automation-shell redirect resolver).
|
|
9953
|
+
team_id: z60.string().nullable().optional(),
|
|
9709
9954
|
created_at: z60.string(),
|
|
9710
9955
|
/**
|
|
9711
9956
|
* True when at least one case in this queue has ever had an approval
|
|
@@ -9973,6 +10218,11 @@ var FEATURE_FLAG_CATALOGUE = {
|
|
|
9973
10218
|
defaultValue: false,
|
|
9974
10219
|
description: "Enables the Clarity meeting notetaker (Recall.ai bot). When disabled, the 'Meeting Notetaker' option is hidden in the Add Content menu and the POST /clarity/processes/:id/captures/meeting invite route returns 404; the Recall webhook callback is unaffected. Off-by-default for staged rollout."
|
|
9975
10220
|
},
|
|
10221
|
+
CLARITY_REALTIME_SDP_PROXY: {
|
|
10222
|
+
key: "clarity_realtime_sdp_proxy",
|
|
10223
|
+
defaultValue: false,
|
|
10224
|
+
description: "Routes the Clarity interview WebRTC signaling (SDP offer/answer exchange) through the Duvo backend instead of the browser calling api.openai.com directly, so interviews can start on corporate networks that domain-block OpenAI. Voice/screen media still flows browser-to-OpenAI over WebRTC. Off-by-default for staged rollout; does not help networks that block UDP (those need a TURN relay)."
|
|
10225
|
+
},
|
|
9976
10226
|
CLARITY_SIGNAVIO_SWIMLANES_EXPORT: {
|
|
9977
10227
|
key: "clarity_signavio_swimlanes_export",
|
|
9978
10228
|
defaultValue: false,
|
|
@@ -10058,6 +10308,11 @@ var FEATURE_FLAG_CATALOGUE = {
|
|
|
10058
10308
|
defaultValue: false,
|
|
10059
10309
|
description: "Enables portfolio intelligence analysis in the Clarity sidebar, providing cross-process insights and recommendations."
|
|
10060
10310
|
},
|
|
10311
|
+
PULSE_SCHEDULED_REFRESH: {
|
|
10312
|
+
key: "pulse_scheduled_refresh",
|
|
10313
|
+
defaultValue: false,
|
|
10314
|
+
description: "Enables Pulse scheduled background auto-refresh: the Auto-refresh menu in the Pulse header, the `refresh_frequency` field on PATCH /artifacts/:id, and dispatching by the scheduled-refresh cron (already-armed schedules pause while off). The manual Refresh data button is unaffected. Off-by-default for staged rollout."
|
|
10315
|
+
},
|
|
10061
10316
|
SHARED_CONNECTIONS: {
|
|
10062
10317
|
key: "shared_connections",
|
|
10063
10318
|
defaultValue: false,
|
|
@@ -11389,6 +11644,53 @@ function deriveHostnameFromInput(input) {
|
|
|
11389
11644
|
}
|
|
11390
11645
|
__name(deriveHostnameFromInput, "deriveHostnameFromInput");
|
|
11391
11646
|
__name2(deriveHostnameFromInput, "deriveHostnameFromInput");
|
|
11647
|
+
function isHostLikeIdentifier(value) {
|
|
11648
|
+
const host = deriveHostnameFromInput(value);
|
|
11649
|
+
if (!host) {
|
|
11650
|
+
return false;
|
|
11651
|
+
}
|
|
11652
|
+
if (/\s/.test(host)) {
|
|
11653
|
+
return false;
|
|
11654
|
+
}
|
|
11655
|
+
return host.includes(".") || host === "localhost";
|
|
11656
|
+
}
|
|
11657
|
+
__name(isHostLikeIdentifier, "isHostLikeIdentifier");
|
|
11658
|
+
__name2(isHostLikeIdentifier, "isHostLikeIdentifier");
|
|
11659
|
+
function normalizeAppName(value) {
|
|
11660
|
+
return value.trim().toLowerCase().replace(/\s+/g, " ");
|
|
11661
|
+
}
|
|
11662
|
+
__name(normalizeAppName, "normalizeAppName");
|
|
11663
|
+
__name2(normalizeAppName, "normalizeAppName");
|
|
11664
|
+
function normalizeCredentialIdentifier(input) {
|
|
11665
|
+
const trimmed = (input || "").trim();
|
|
11666
|
+
if (!trimmed) {
|
|
11667
|
+
return "";
|
|
11668
|
+
}
|
|
11669
|
+
return isHostLikeIdentifier(trimmed) ? deriveDomain(trimmed) : trimmed;
|
|
11670
|
+
}
|
|
11671
|
+
__name(normalizeCredentialIdentifier, "normalizeCredentialIdentifier");
|
|
11672
|
+
__name2(normalizeCredentialIdentifier, "normalizeCredentialIdentifier");
|
|
11673
|
+
function identifiersMatch(a, b) {
|
|
11674
|
+
if (!a || !b) {
|
|
11675
|
+
return false;
|
|
11676
|
+
}
|
|
11677
|
+
const aIsHost = isHostLikeIdentifier(a);
|
|
11678
|
+
const bIsHost = isHostLikeIdentifier(b);
|
|
11679
|
+
if (aIsHost && bIsHost) {
|
|
11680
|
+
const hostA = deriveDomain(a);
|
|
11681
|
+
const hostB = deriveDomain(b);
|
|
11682
|
+
if (!hostA || !hostB) {
|
|
11683
|
+
return false;
|
|
11684
|
+
}
|
|
11685
|
+
return hostA === hostB || hostA.endsWith(`.${hostB}`) || hostB.endsWith(`.${hostA}`);
|
|
11686
|
+
}
|
|
11687
|
+
if (!aIsHost && !bIsHost) {
|
|
11688
|
+
return normalizeAppName(a) === normalizeAppName(b);
|
|
11689
|
+
}
|
|
11690
|
+
return false;
|
|
11691
|
+
}
|
|
11692
|
+
__name(identifiersMatch, "identifiersMatch");
|
|
11693
|
+
__name2(identifiersMatch, "identifiersMatch");
|
|
11392
11694
|
var AGENT_MENTION_REGEX_SOURCE = `<DUVO:AGENT\\s+id="((?:[^"\\\\]|\\\\.)*)"\\s+name="((?:[^"\\\\]|\\\\.)*)">`;
|
|
11393
11695
|
function unescapeAttrValue(value) {
|
|
11394
11696
|
return value.replace(/\\(.)/g, "$1");
|
|
@@ -16198,7 +16500,6 @@ var integrationSchema = z89.object({
|
|
|
16198
16500
|
server_url: z89.string().optional(),
|
|
16199
16501
|
transport_type: z89.string().optional(),
|
|
16200
16502
|
auth_method: z89.string().nullish(),
|
|
16201
|
-
composio_mcp_id: z89.string().nullish(),
|
|
16202
16503
|
custom_integration_id: z89.string().nullish(),
|
|
16203
16504
|
icon_url: z89.string().nullish(),
|
|
16204
16505
|
oauth_provider: z89.string().nullish(),
|
|
@@ -21319,7 +21620,8 @@ var processSummarySchema = z99.object({
|
|
|
21319
21620
|
id: z99.string(),
|
|
21320
21621
|
name: z99.string()
|
|
21321
21622
|
}).passthrough();
|
|
21322
|
-
var
|
|
21623
|
+
var landscapeFullNodeSchema = z99.object({
|
|
21624
|
+
access: z99.literal("full").default("full"),
|
|
21323
21625
|
id: z99.string(),
|
|
21324
21626
|
parentId: z99.string().nullable(),
|
|
21325
21627
|
processId: z99.string().nullable(),
|
|
@@ -21327,6 +21629,18 @@ var landscapeNodeSchema = z99.object({
|
|
|
21327
21629
|
ownerLabel: z99.string().nullable(),
|
|
21328
21630
|
process: processSummarySchema.nullable()
|
|
21329
21631
|
}).passthrough();
|
|
21632
|
+
var landscapeRedactedNodeSchema = z99.object({
|
|
21633
|
+
access: z99.literal("redacted"),
|
|
21634
|
+
hint: z99.literal("restricted_process"),
|
|
21635
|
+
id: z99.string(),
|
|
21636
|
+
parentId: z99.string().nullable(),
|
|
21637
|
+
sortOrder: z99.number(),
|
|
21638
|
+
depth: z99.number()
|
|
21639
|
+
}).strict();
|
|
21640
|
+
var landscapeNodeSchema = z99.union([
|
|
21641
|
+
landscapeFullNodeSchema,
|
|
21642
|
+
landscapeRedactedNodeSchema
|
|
21643
|
+
]);
|
|
21330
21644
|
var unlinkedProcessSchema = processSummarySchema.extend({
|
|
21331
21645
|
teamId: z99.string(),
|
|
21332
21646
|
teamName: z99.string().nullable()
|
|
@@ -21408,10 +21722,14 @@ var LANDSCAPE_COLUMNS = [
|
|
|
21408
21722
|
maxWidth: 36
|
|
21409
21723
|
},
|
|
21410
21724
|
{ header: "TYPE", cell: getLandscapeNodeType },
|
|
21411
|
-
{
|
|
21725
|
+
{
|
|
21726
|
+
header: "NAME",
|
|
21727
|
+
cell: /* @__PURE__ */ __name((row) => row.access === "redacted" ? "Restricted process" : row.name, "cell"),
|
|
21728
|
+
maxWidth: 28
|
|
21729
|
+
},
|
|
21412
21730
|
{
|
|
21413
21731
|
header: "PROCESS",
|
|
21414
|
-
cell: /* @__PURE__ */ __name((row) => row.process?.name ?? "-", "cell"),
|
|
21732
|
+
cell: /* @__PURE__ */ __name((row) => row.access === "redacted" ? "-" : row.process?.name ?? "-", "cell"),
|
|
21415
21733
|
maxWidth: 28
|
|
21416
21734
|
}
|
|
21417
21735
|
];
|
|
@@ -21575,7 +21893,7 @@ function registerClarityLandscape(clarity) {
|
|
|
21575
21893
|
}
|
|
21576
21894
|
renderCaptures(response, "No landscape captures found.");
|
|
21577
21895
|
}, "capturesAction"));
|
|
21578
|
-
landscape.command("propose-process").description("
|
|
21896
|
+
landscape.command("propose-process").description("Create a process node in the Clarity process landscape").requiredOption("--name <name>", "process name").option("--description <text>", "process description").option("--parent <node-id>", "parent area node id").option("--team <team-id>", "owning team id").option("--org <org-id>", ORG_FLAG_DESCRIPTION).option("--json", "output JSON").action(/* @__PURE__ */ __name(async function proposeProcessAction(options) {
|
|
21579
21897
|
const config = await requireAuthenticatedConfig(this);
|
|
21580
21898
|
const path = resolveOrgPath(this, PROPOSED_PROCESSES_RESOURCE_PATH);
|
|
21581
21899
|
const raw = await httpRequest({
|
|
@@ -21583,10 +21901,13 @@ function registerClarityLandscape(clarity) {
|
|
|
21583
21901
|
path,
|
|
21584
21902
|
apiKey: config.apiKey,
|
|
21585
21903
|
apiBaseUrl: config.apiBaseUrl,
|
|
21586
|
-
body: buildProposeProcessBody(
|
|
21904
|
+
body: buildProposeProcessBody({
|
|
21905
|
+
...options,
|
|
21906
|
+
team: this.optsWithGlobals().team
|
|
21907
|
+
})
|
|
21587
21908
|
});
|
|
21588
21909
|
const node = nodeResponseSchema.parse(raw);
|
|
21589
|
-
renderNodeMutationResult("
|
|
21910
|
+
renderNodeMutationResult("Process created", node, options);
|
|
21590
21911
|
}, "proposeProcessAction"));
|
|
21591
21912
|
}
|
|
21592
21913
|
__name(registerClarityLandscape, "registerClarityLandscape");
|
|
@@ -21632,7 +21953,8 @@ function buildProposeProcessBody(options) {
|
|
|
21632
21953
|
return {
|
|
21633
21954
|
name: options.name,
|
|
21634
21955
|
...options.description !== void 0 ? { description: options.description } : {},
|
|
21635
|
-
...options.parent !== void 0 ? { parentId: options.parent } : {}
|
|
21956
|
+
...options.parent !== void 0 ? { parentId: options.parent } : {},
|
|
21957
|
+
...options.team !== void 0 ? { teamId: options.team } : {}
|
|
21636
21958
|
};
|
|
21637
21959
|
}
|
|
21638
21960
|
__name(buildProposeProcessBody, "buildProposeProcessBody");
|
|
@@ -21758,6 +22080,9 @@ function renderNodeMutationResult(label, node, options) {
|
|
|
21758
22080
|
}
|
|
21759
22081
|
__name(renderNodeMutationResult, "renderNodeMutationResult");
|
|
21760
22082
|
function searchableLandscapeNodeText(node) {
|
|
22083
|
+
if (node.access === "redacted") {
|
|
22084
|
+
return [node.id, node.parentId ?? ""];
|
|
22085
|
+
}
|
|
21761
22086
|
return [
|
|
21762
22087
|
node.id,
|
|
21763
22088
|
node.parentId ?? "",
|
|
@@ -21770,6 +22095,9 @@ function searchableLandscapeNodeText(node) {
|
|
|
21770
22095
|
}
|
|
21771
22096
|
__name(searchableLandscapeNodeText, "searchableLandscapeNodeText");
|
|
21772
22097
|
function getLandscapeNodeType(node) {
|
|
22098
|
+
if (node.access === "redacted") {
|
|
22099
|
+
return PROCESS_NODE_TYPE;
|
|
22100
|
+
}
|
|
21773
22101
|
return node.processId ? PROCESS_NODE_TYPE : AREA_NODE_TYPE;
|
|
21774
22102
|
}
|
|
21775
22103
|
__name(getLandscapeNodeType, "getLandscapeNodeType");
|
|
@@ -22395,6 +22723,7 @@ var processLinkSchema = z101.object({
|
|
|
22395
22723
|
type: processLinkTypeSchema,
|
|
22396
22724
|
state: processLinkStateSchema,
|
|
22397
22725
|
confidence: z101.number().nullable(),
|
|
22726
|
+
rationale: z101.string().nullable().default(null),
|
|
22398
22727
|
created_at: z101.string(),
|
|
22399
22728
|
updated_at: z101.string()
|
|
22400
22729
|
});
|
|
@@ -22428,6 +22757,11 @@ var PROCESS_LINK_COLUMNS = [
|
|
|
22428
22757
|
{
|
|
22429
22758
|
header: "CONF",
|
|
22430
22759
|
cell: /* @__PURE__ */ __name((row) => row.confidence === null ? "-" : row.confidence.toFixed(2), "cell")
|
|
22760
|
+
},
|
|
22761
|
+
{
|
|
22762
|
+
header: "RATIONALE",
|
|
22763
|
+
cell: /* @__PURE__ */ __name((row) => row.rationale ?? "-", "cell"),
|
|
22764
|
+
maxWidth: 60
|
|
22431
22765
|
}
|
|
22432
22766
|
];
|
|
22433
22767
|
function registerClarityProcessLinks(clarity) {
|
|
@@ -22594,6 +22928,9 @@ function renderProcessLinks(response) {
|
|
|
22594
22928
|
return;
|
|
22595
22929
|
}
|
|
22596
22930
|
console.log(renderTable(PROCESS_LINK_COLUMNS, response.process_links));
|
|
22931
|
+
console.log(
|
|
22932
|
+
"Source and target nodes can belong to different teams in this organization."
|
|
22933
|
+
);
|
|
22597
22934
|
console.log("");
|
|
22598
22935
|
console.log(
|
|
22599
22936
|
`Showing ${response.process_links.length} of ${response.total} \xB7 offset ${response.offset}`
|
|
@@ -23836,10 +24173,7 @@ function registerConnectionsUpdate(connections) {
|
|
|
23836
24173
|
...previous ?? [],
|
|
23837
24174
|
value
|
|
23838
24175
|
]
|
|
23839
|
-
).option("--clear-headers", "remove all configured headers").option("--
|
|
23840
|
-
"--clear-composio-mcp-id",
|
|
23841
|
-
"remove the Composio MCP server association"
|
|
23842
|
-
).option("--share", "share this connection with the team (manager+ only)").option("--unshare", "revert this connection to personal").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(id, options) {
|
|
24176
|
+
).option("--clear-headers", "remove all configured headers").option("--share", "share this connection with the team (manager+ only)").option("--unshare", "revert this connection to personal").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(id, options) {
|
|
23843
24177
|
if (options.share && options.unshare) {
|
|
23844
24178
|
throw new CliError("Pass either --share or --unshare, not both.");
|
|
23845
24179
|
}
|
|
@@ -23848,11 +24182,6 @@ function registerConnectionsUpdate(connections) {
|
|
|
23848
24182
|
"Pass either --clear-headers or --header / --secret-header, not both."
|
|
23849
24183
|
);
|
|
23850
24184
|
}
|
|
23851
|
-
if (options.composioMcpId !== void 0 && Boolean(options.clearComposioMcpId)) {
|
|
23852
|
-
throw new CliError(
|
|
23853
|
-
"Pass either --composio-mcp-id or --clear-composio-mcp-id, not both."
|
|
23854
|
-
);
|
|
23855
|
-
}
|
|
23856
24185
|
const body = {};
|
|
23857
24186
|
if (options.name !== void 0) {
|
|
23858
24187
|
const trimmed = options.name.trim();
|
|
@@ -23891,15 +24220,6 @@ function registerConnectionsUpdate(connections) {
|
|
|
23891
24220
|
}
|
|
23892
24221
|
body.headers = headers;
|
|
23893
24222
|
}
|
|
23894
|
-
if (options.composioMcpId !== void 0) {
|
|
23895
|
-
const trimmed = options.composioMcpId.trim();
|
|
23896
|
-
if (trimmed.length === 0) {
|
|
23897
|
-
throw new CliError("--composio-mcp-id must not be empty");
|
|
23898
|
-
}
|
|
23899
|
-
body.composio_mcp_id = trimmed;
|
|
23900
|
-
} else if (options.clearComposioMcpId) {
|
|
23901
|
-
body.composio_mcp_id = null;
|
|
23902
|
-
}
|
|
23903
24223
|
if (options.share) {
|
|
23904
24224
|
body.shared = true;
|
|
23905
24225
|
} else if (options.unshare) {
|
|
@@ -23907,7 +24227,7 @@ function registerConnectionsUpdate(connections) {
|
|
|
23907
24227
|
}
|
|
23908
24228
|
if (Object.keys(body).length === 0) {
|
|
23909
24229
|
throw new CliError(
|
|
23910
|
-
"Provide at least one field to update (--name, --server-url, --auth-method, --header, --secret-header, --clear-headers, --
|
|
24230
|
+
"Provide at least one field to update (--name, --server-url, --auth-method, --header, --secret-header, --clear-headers, --share, --unshare)."
|
|
23911
24231
|
);
|
|
23912
24232
|
}
|
|
23913
24233
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
@@ -25574,184 +25894,6 @@ async function revokeOAuthProfile(profile) {
|
|
|
25574
25894
|
}
|
|
25575
25895
|
__name(revokeOAuthProfile, "revokeOAuthProfile");
|
|
25576
25896
|
|
|
25577
|
-
// src/commands/oauth/composio/connect.ts
|
|
25578
|
-
function registerOauthComposioConnect(composio) {
|
|
25579
|
-
composio.command("connect").description(
|
|
25580
|
-
"Finalize a Composio-backed connection after the start step has produced a connected_account_id."
|
|
25581
|
-
).requiredOption(
|
|
25582
|
-
"--app <slug>",
|
|
25583
|
-
"Composio app slug (e.g. 'slack', 'googlesheets')"
|
|
25584
|
-
).requiredOption(
|
|
25585
|
-
"--name <name>",
|
|
25586
|
-
"human-readable name to display for the connection"
|
|
25587
|
-
).requiredOption(
|
|
25588
|
-
"--connected-account-id <id>",
|
|
25589
|
-
"Composio connected-account ID returned by `duvo oauth composio start`"
|
|
25590
|
-
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function connectComposioAction(options) {
|
|
25591
|
-
const config = await requireAuthenticatedConfig(this);
|
|
25592
|
-
const { apiKey, apiBaseUrl } = config;
|
|
25593
|
-
const teamId = await resolveRequiredTeamId(config, {
|
|
25594
|
-
override: getTeamFlag(this)
|
|
25595
|
-
});
|
|
25596
|
-
if (!options.app || options.app.trim().length === 0) {
|
|
25597
|
-
throw new CliError("--app must not be empty");
|
|
25598
|
-
}
|
|
25599
|
-
if (!options.name || options.name.trim().length === 0) {
|
|
25600
|
-
throw new CliError("--name must not be empty");
|
|
25601
|
-
}
|
|
25602
|
-
if (!options.connectedAccountId || options.connectedAccountId.trim().length === 0) {
|
|
25603
|
-
throw new CliError("--connected-account-id must not be empty");
|
|
25604
|
-
}
|
|
25605
|
-
const body = {
|
|
25606
|
-
app: options.app.trim(),
|
|
25607
|
-
integration_name: options.name.trim(),
|
|
25608
|
-
connected_account_id: options.connectedAccountId.trim()
|
|
25609
|
-
};
|
|
25610
|
-
const raw = await httpRequest({
|
|
25611
|
-
method: "POST",
|
|
25612
|
-
path: buildTeamPath(teamId, "/connections/composio/finalize"),
|
|
25613
|
-
apiKey,
|
|
25614
|
-
apiBaseUrl,
|
|
25615
|
-
body
|
|
25616
|
-
});
|
|
25617
|
-
if (options.json) {
|
|
25618
|
-
printJson(raw);
|
|
25619
|
-
return;
|
|
25620
|
-
}
|
|
25621
|
-
const parsed = connectIntegrationResponseSchema.safeParse(raw);
|
|
25622
|
-
if (!parsed.success) {
|
|
25623
|
-
throw new CliError(
|
|
25624
|
-
`Unexpected response from the API: ${parsed.error.message}`
|
|
25625
|
-
);
|
|
25626
|
-
}
|
|
25627
|
-
const { integration_id, mcp_url } = parsed.data;
|
|
25628
|
-
console.log(green("Connection created!"));
|
|
25629
|
-
console.log();
|
|
25630
|
-
console.log(
|
|
25631
|
-
renderKeyValue([
|
|
25632
|
-
{ label: "Integration ID", value: integration_id },
|
|
25633
|
-
{ label: "MCP URL", value: mcp_url }
|
|
25634
|
-
])
|
|
25635
|
-
);
|
|
25636
|
-
}, "connectComposioAction"));
|
|
25637
|
-
}
|
|
25638
|
-
__name(registerOauthComposioConnect, "registerOauthComposioConnect");
|
|
25639
|
-
|
|
25640
|
-
// src/commands/oauth/composio/start.ts
|
|
25641
|
-
function collectKeyValue(value, previous) {
|
|
25642
|
-
return [...previous, value];
|
|
25643
|
-
}
|
|
25644
|
-
__name(collectKeyValue, "collectKeyValue");
|
|
25645
|
-
function parseAuthFields(raw) {
|
|
25646
|
-
if (!raw || raw.length === 0) {
|
|
25647
|
-
return void 0;
|
|
25648
|
-
}
|
|
25649
|
-
const result = {};
|
|
25650
|
-
for (const entry of raw) {
|
|
25651
|
-
const index = entry.indexOf("=");
|
|
25652
|
-
if (index <= 0) {
|
|
25653
|
-
throw new CliError(
|
|
25654
|
-
`--auth-field must be in KEY=VALUE format (got "${entry}")`
|
|
25655
|
-
);
|
|
25656
|
-
}
|
|
25657
|
-
const key = entry.slice(0, index).trim();
|
|
25658
|
-
const value = entry.slice(index + 1);
|
|
25659
|
-
if (key.length === 0) {
|
|
25660
|
-
throw new CliError(`--auth-field key must not be empty (got "${entry}")`);
|
|
25661
|
-
}
|
|
25662
|
-
result[key] = value;
|
|
25663
|
-
}
|
|
25664
|
-
return result;
|
|
25665
|
-
}
|
|
25666
|
-
__name(parseAuthFields, "parseAuthFields");
|
|
25667
|
-
function registerOauthComposioStart(composio) {
|
|
25668
|
-
composio.command("start").description(
|
|
25669
|
-
"Start a Composio-backed OAuth connection. Returns a redirect URL to open in a browser; afterwards run `duvo oauth composio connect` to finalize."
|
|
25670
|
-
).requiredOption(
|
|
25671
|
-
"--auth-config <id>",
|
|
25672
|
-
"Composio auth-config ID for the toolkit"
|
|
25673
|
-
).requiredOption(
|
|
25674
|
-
"--callback-url <url>",
|
|
25675
|
-
"where to send the user's browser after they finish the Composio consent screen"
|
|
25676
|
-
).option(
|
|
25677
|
-
"--auth-scheme <scheme>",
|
|
25678
|
-
"Composio auth scheme (e.g. OAUTH2, API_KEY, BEARER_TOKEN); required when using --auth-field"
|
|
25679
|
-
).option(
|
|
25680
|
-
"--auth-field <key=value>",
|
|
25681
|
-
"auth field for non-OAuth schemes; repeat for multiple",
|
|
25682
|
-
collectKeyValue,
|
|
25683
|
-
[]
|
|
25684
|
-
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function startComposioAction(options) {
|
|
25685
|
-
const config = await requireAuthenticatedConfig(this);
|
|
25686
|
-
const { apiKey, apiBaseUrl } = config;
|
|
25687
|
-
const teamId = await resolveRequiredTeamId(config, {
|
|
25688
|
-
override: getTeamFlag(this)
|
|
25689
|
-
});
|
|
25690
|
-
if (!options.authConfig || options.authConfig.trim().length === 0) {
|
|
25691
|
-
throw new CliError("--auth-config must not be empty");
|
|
25692
|
-
}
|
|
25693
|
-
if (!options.callbackUrl || options.callbackUrl.trim().length === 0) {
|
|
25694
|
-
throw new CliError("--callback-url must not be empty");
|
|
25695
|
-
}
|
|
25696
|
-
const authFields = parseAuthFields(options.authField);
|
|
25697
|
-
const trimmedAuthScheme = options.authScheme?.trim();
|
|
25698
|
-
if (authFields && !trimmedAuthScheme) {
|
|
25699
|
-
throw new CliError(
|
|
25700
|
-
"--auth-scheme is required when --auth-field is provided"
|
|
25701
|
-
);
|
|
25702
|
-
}
|
|
25703
|
-
const body = {
|
|
25704
|
-
auth_config_id: options.authConfig.trim(),
|
|
25705
|
-
callback_url: options.callbackUrl.trim()
|
|
25706
|
-
};
|
|
25707
|
-
if (options.authScheme !== void 0) {
|
|
25708
|
-
if (trimmedAuthScheme === void 0 || trimmedAuthScheme.length === 0) {
|
|
25709
|
-
throw new CliError("--auth-scheme must not be empty");
|
|
25710
|
-
}
|
|
25711
|
-
body.auth_scheme = trimmedAuthScheme;
|
|
25712
|
-
}
|
|
25713
|
-
if (authFields) {
|
|
25714
|
-
body.auth_fields = authFields;
|
|
25715
|
-
}
|
|
25716
|
-
const raw = await httpRequest({
|
|
25717
|
-
method: "POST",
|
|
25718
|
-
path: buildTeamPath(teamId, "/connections/composio/start"),
|
|
25719
|
-
apiKey,
|
|
25720
|
-
apiBaseUrl,
|
|
25721
|
-
body
|
|
25722
|
-
});
|
|
25723
|
-
if (options.json) {
|
|
25724
|
-
printJson(raw);
|
|
25725
|
-
return;
|
|
25726
|
-
}
|
|
25727
|
-
const parsed = startComposioConnectionResponseSchema.safeParse(raw);
|
|
25728
|
-
if (!parsed.success) {
|
|
25729
|
-
throw new CliError(
|
|
25730
|
-
`Unexpected response from the API: ${parsed.error.message}`
|
|
25731
|
-
);
|
|
25732
|
-
}
|
|
25733
|
-
const { redirect_url, status, connected_account_id } = parsed.data;
|
|
25734
|
-
console.log(
|
|
25735
|
-
renderKeyValue([
|
|
25736
|
-
{ label: "Connected Account ID", value: connected_account_id },
|
|
25737
|
-
{ label: "Status", value: status ?? "" },
|
|
25738
|
-
{ label: "Redirect URL", value: redirect_url ?? "" }
|
|
25739
|
-
])
|
|
25740
|
-
);
|
|
25741
|
-
}, "startComposioAction"));
|
|
25742
|
-
}
|
|
25743
|
-
__name(registerOauthComposioStart, "registerOauthComposioStart");
|
|
25744
|
-
|
|
25745
|
-
// src/commands/oauth/composio/index.ts
|
|
25746
|
-
function registerOauthComposio(oauth) {
|
|
25747
|
-
const composio = oauth.command("composio").description(
|
|
25748
|
-
"Composio-backed OAuth flows. Run `start` to get a redirect URL, then `connect` to finalize."
|
|
25749
|
-
);
|
|
25750
|
-
registerOauthComposioStart(composio);
|
|
25751
|
-
registerOauthComposioConnect(composio);
|
|
25752
|
-
}
|
|
25753
|
-
__name(registerOauthComposio, "registerOauthComposio");
|
|
25754
|
-
|
|
25755
25897
|
// src/commands/oauth/mcp/authorize.ts
|
|
25756
25898
|
function registerOauthMcpAuthorize(mcp) {
|
|
25757
25899
|
mcp.command("authorize").description(
|
|
@@ -25876,10 +26018,10 @@ function registerOauthMcpCheck(mcp) {
|
|
|
25876
26018
|
__name(registerOauthMcpCheck, "registerOauthMcpCheck");
|
|
25877
26019
|
|
|
25878
26020
|
// src/commands/oauth/mcp/probe.ts
|
|
25879
|
-
function
|
|
26021
|
+
function collectKeyValue(value, previous) {
|
|
25880
26022
|
return [...previous, value];
|
|
25881
26023
|
}
|
|
25882
|
-
__name(
|
|
26024
|
+
__name(collectKeyValue, "collectKeyValue");
|
|
25883
26025
|
function parseHeaders(raw) {
|
|
25884
26026
|
if (!raw || raw.length === 0) {
|
|
25885
26027
|
return void 0;
|
|
@@ -25912,7 +26054,7 @@ function registerOauthMcpProbe(mcp) {
|
|
|
25912
26054
|
).option(
|
|
25913
26055
|
"--header <key=value>",
|
|
25914
26056
|
"optional HTTP header for authentication; repeat for multiple",
|
|
25915
|
-
|
|
26057
|
+
collectKeyValue,
|
|
25916
26058
|
[]
|
|
25917
26059
|
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function probeMcpAction(url, options) {
|
|
25918
26060
|
const trimmedUrl = url.trim();
|
|
@@ -26046,7 +26188,6 @@ __name(registerOauthNative, "registerOauthNative");
|
|
|
26046
26188
|
function registerOauth(program) {
|
|
26047
26189
|
const oauth = program.command("oauth").description("Start and probe OAuth flows for Duvo connections");
|
|
26048
26190
|
registerOauthNative(oauth);
|
|
26049
|
-
registerOauthComposio(oauth);
|
|
26050
26191
|
registerOauthMcp(oauth);
|
|
26051
26192
|
}
|
|
26052
26193
|
__name(registerOauth, "registerOauth");
|
|
@@ -26889,6 +27030,69 @@ function registerPulsePdf(pulse) {
|
|
|
26889
27030
|
}
|
|
26890
27031
|
__name(registerPulsePdf, "registerPulsePdf");
|
|
26891
27032
|
|
|
27033
|
+
// src/commands/pulse/refresh-schedule.ts
|
|
27034
|
+
var OFF = "off";
|
|
27035
|
+
var FREQUENCY_CHOICES = [...artifactRefreshFrequencySchema.options, OFF].join(
|
|
27036
|
+
", "
|
|
27037
|
+
);
|
|
27038
|
+
function parseFrequency2(raw) {
|
|
27039
|
+
if (raw === OFF) {
|
|
27040
|
+
return null;
|
|
27041
|
+
}
|
|
27042
|
+
const parsed = artifactRefreshFrequencySchema.safeParse(raw);
|
|
27043
|
+
if (!parsed.success) {
|
|
27044
|
+
throw new CliError(`--frequency must be one of: ${FREQUENCY_CHOICES}.`);
|
|
27045
|
+
}
|
|
27046
|
+
return parsed.data;
|
|
27047
|
+
}
|
|
27048
|
+
__name(parseFrequency2, "parseFrequency");
|
|
27049
|
+
function registerPulseRefreshSchedule(pulse) {
|
|
27050
|
+
pulse.command("refresh-schedule <id>").description(
|
|
27051
|
+
"Set how often a Pulse dashboard auto-refreshes in the background (creator only)"
|
|
27052
|
+
).requiredOption(
|
|
27053
|
+
"--frequency <frequency>",
|
|
27054
|
+
`the auto-refresh cadence: ${FREQUENCY_CHOICES}`
|
|
27055
|
+
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function refreshScheduleAction(id, options) {
|
|
27056
|
+
const pulseId = trimRequired(id, "<id>");
|
|
27057
|
+
const frequency = parseFrequency2(
|
|
27058
|
+
trimRequired(options.frequency ?? "", "--frequency")
|
|
27059
|
+
);
|
|
27060
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
27061
|
+
const raw = await httpRequest({
|
|
27062
|
+
method: "PATCH",
|
|
27063
|
+
path: `/v2/artifacts/${encodeURIComponent(pulseId)}`,
|
|
27064
|
+
apiKey,
|
|
27065
|
+
apiBaseUrl,
|
|
27066
|
+
body: { refresh_frequency: frequency }
|
|
27067
|
+
});
|
|
27068
|
+
if (options.json) {
|
|
27069
|
+
printJson(raw);
|
|
27070
|
+
return;
|
|
27071
|
+
}
|
|
27072
|
+
const parsed = artifactSchema.safeParse(raw);
|
|
27073
|
+
if (!parsed.success) {
|
|
27074
|
+
throw new CliError(
|
|
27075
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
27076
|
+
);
|
|
27077
|
+
}
|
|
27078
|
+
console.log(
|
|
27079
|
+
frequency ? green("Pulse auto-refresh scheduled.") : green("Pulse auto-refresh turned off.")
|
|
27080
|
+
);
|
|
27081
|
+
console.log();
|
|
27082
|
+
console.log(
|
|
27083
|
+
renderKeyValue([
|
|
27084
|
+
{ label: "ID", value: parsed.data.id },
|
|
27085
|
+
{ label: "Frequency", value: parsed.data.refresh_frequency ?? OFF },
|
|
27086
|
+
{
|
|
27087
|
+
label: "Next refresh",
|
|
27088
|
+
value: parsed.data.next_refresh_at ?? "\u2014"
|
|
27089
|
+
}
|
|
27090
|
+
])
|
|
27091
|
+
);
|
|
27092
|
+
}, "refreshScheduleAction"));
|
|
27093
|
+
}
|
|
27094
|
+
__name(registerPulseRefreshSchedule, "registerPulseRefreshSchedule");
|
|
27095
|
+
|
|
26892
27096
|
// src/commands/pulse/refresh.ts
|
|
26893
27097
|
function registerPulseRefresh(pulse) {
|
|
26894
27098
|
pulse.command("refresh <id>").description(
|
|
@@ -27256,6 +27460,7 @@ function registerPulse(program) {
|
|
|
27256
27460
|
registerPulseStop(pulse);
|
|
27257
27461
|
registerPulseRefresh(pulse);
|
|
27258
27462
|
registerPulseRename(pulse);
|
|
27463
|
+
registerPulseRefreshSchedule(pulse);
|
|
27259
27464
|
registerPulseShare(pulse);
|
|
27260
27465
|
registerPulseDuplicate(pulse);
|
|
27261
27466
|
registerPulseMove(pulse);
|
|
@@ -29558,7 +29763,7 @@ __name(registerSandboxes, "registerSandboxes");
|
|
|
29558
29763
|
|
|
29559
29764
|
// src/commands/secrets/parse-key-value.ts
|
|
29560
29765
|
var ENV_VAR_KEY_PATTERN = /^[A-Z_][A-Z0-9_]*$/;
|
|
29561
|
-
function
|
|
29766
|
+
function collectKeyValue2(flag, raw, previous) {
|
|
29562
29767
|
const equalsIndex = raw.indexOf("=");
|
|
29563
29768
|
if (equalsIndex <= 0) {
|
|
29564
29769
|
throw new CliError(`${flag} must be in the form KEY=VALUE (got "${raw}")`);
|
|
@@ -29578,7 +29783,7 @@ function collectKeyValue3(flag, raw, previous) {
|
|
|
29578
29783
|
accumulator[key] = value;
|
|
29579
29784
|
return accumulator;
|
|
29580
29785
|
}
|
|
29581
|
-
__name(
|
|
29786
|
+
__name(collectKeyValue2, "collectKeyValue");
|
|
29582
29787
|
function collectRename(flag, raw, previous) {
|
|
29583
29788
|
const equalsIndex = raw.indexOf("=");
|
|
29584
29789
|
if (equalsIndex <= 0) {
|
|
@@ -29632,7 +29837,7 @@ function registerSecretsCreate(secrets) {
|
|
|
29632
29837
|
).option("--shared", "create as team-shared (requires manager role)").requiredOption(
|
|
29633
29838
|
"--value <KEY=VALUE>",
|
|
29634
29839
|
"env var to store (repeat for multiple)",
|
|
29635
|
-
|
|
29840
|
+
collectKeyValue2.bind(null, "--value"),
|
|
29636
29841
|
void 0
|
|
29637
29842
|
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function createAction(options) {
|
|
29638
29843
|
const name = trimRequired(options.name ?? "", "--name");
|
|
@@ -29823,7 +30028,7 @@ function registerSecretsUpdate(secrets) {
|
|
|
29823
30028
|
).option("--name <name>", "new name").option("--service-slug <slug>", "set the service slug").option("--clear-service-slug", "remove the service slug").option("--shared", "promote to team-shared (requires manager role)").option("--personal", "demote to personal (requires manager role)").option(
|
|
29824
30029
|
"--set <KEY=VALUE>",
|
|
29825
30030
|
"add or overwrite an env var (repeatable)",
|
|
29826
|
-
|
|
30031
|
+
collectKeyValue2.bind(null, "--set"),
|
|
29827
30032
|
void 0
|
|
29828
30033
|
).option(
|
|
29829
30034
|
"--remove <KEY>",
|
|
@@ -30989,15 +31194,128 @@ function registerTeam(program) {
|
|
|
30989
31194
|
}
|
|
30990
31195
|
__name(registerTeam, "registerTeam");
|
|
30991
31196
|
|
|
30992
|
-
// src/commands/teams/
|
|
31197
|
+
// src/commands/teams/create-org-team.ts
|
|
30993
31198
|
import { z as z113 } from "zod";
|
|
30994
|
-
var
|
|
30995
|
-
id: z113.
|
|
30996
|
-
name: z113.string()
|
|
30997
|
-
|
|
31199
|
+
var createOrgTeamResponseSchema = z113.object({
|
|
31200
|
+
id: z113.guid(),
|
|
31201
|
+
name: z113.string()
|
|
31202
|
+
});
|
|
31203
|
+
function registerTeamsCreateOrgTeam(teams) {
|
|
31204
|
+
teams.command("create-org-team <org-id>").description("Create a new team inside an organization you administer").requiredOption("--name <name>", "team name").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function createOrgTeamAction(orgId, options) {
|
|
31205
|
+
if (options.name === void 0 || options.name.trim().length === 0) {
|
|
31206
|
+
throw new CliError("--name must not be empty");
|
|
31207
|
+
}
|
|
31208
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
31209
|
+
const raw = await httpRequest({
|
|
31210
|
+
method: "POST",
|
|
31211
|
+
path: `/v2/organizations/${encodeURIComponent(orgId)}/teams`,
|
|
31212
|
+
apiKey,
|
|
31213
|
+
apiBaseUrl,
|
|
31214
|
+
body: { name: options.name.trim() }
|
|
31215
|
+
});
|
|
31216
|
+
if (options.json) {
|
|
31217
|
+
printJson(raw);
|
|
31218
|
+
return;
|
|
31219
|
+
}
|
|
31220
|
+
const parsed = createOrgTeamResponseSchema.safeParse(raw);
|
|
31221
|
+
if (!parsed.success) {
|
|
31222
|
+
throw new CliError(
|
|
31223
|
+
`Unexpected response from POST /v2/organizations/:orgId/teams: ${parsed.error.message}`
|
|
31224
|
+
);
|
|
31225
|
+
}
|
|
31226
|
+
console.log(green("Team created!"));
|
|
31227
|
+
console.log();
|
|
31228
|
+
console.log(
|
|
31229
|
+
renderKeyValue([
|
|
31230
|
+
{ label: "ID", value: parsed.data.id },
|
|
31231
|
+
{ label: "Name", value: parsed.data.name }
|
|
31232
|
+
])
|
|
31233
|
+
);
|
|
31234
|
+
}, "createOrgTeamAction"));
|
|
31235
|
+
}
|
|
31236
|
+
__name(registerTeamsCreateOrgTeam, "registerTeamsCreateOrgTeam");
|
|
31237
|
+
|
|
31238
|
+
// src/commands/teams/invite-org-member.ts
|
|
31239
|
+
var ORG_ROLES2 = Object.values(ORG_ROLE);
|
|
31240
|
+
var DEFAULT_ROLE = ORG_ROLE.MEMBER;
|
|
31241
|
+
function registerTeamsInviteOrgMember(teams) {
|
|
31242
|
+
teams.command("invite-org-member <org-id>").description(
|
|
31243
|
+
"Invite a person to an organization, optionally onto one of its teams"
|
|
31244
|
+
).requiredOption("--email <email>", "email address of the person to invite").option(
|
|
31245
|
+
"--role <role>",
|
|
31246
|
+
`organization role to grant: ${ORG_ROLES2.join(", ")} (default ${DEFAULT_ROLE})`,
|
|
31247
|
+
DEFAULT_ROLE
|
|
31248
|
+
).option("--team-id <id>", "assign the invitee to this team in the org").option(
|
|
31249
|
+
"--frontend-url <url>",
|
|
31250
|
+
"base URL used to build the invitation email link (email is skipped if omitted)"
|
|
31251
|
+
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function inviteOrgMemberAction(orgId, options) {
|
|
31252
|
+
const email = options.email?.trim();
|
|
31253
|
+
if (email === void 0 || email.length === 0) {
|
|
31254
|
+
throw new CliError("--email must not be empty");
|
|
31255
|
+
}
|
|
31256
|
+
const role = options.role ?? DEFAULT_ROLE;
|
|
31257
|
+
if (!ORG_ROLES2.includes(role)) {
|
|
31258
|
+
throw new CliError(
|
|
31259
|
+
`Invalid --role "${role}"; expected one of: ${ORG_ROLES2.join(", ")}`
|
|
31260
|
+
);
|
|
31261
|
+
}
|
|
31262
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
31263
|
+
const body = { email, role };
|
|
31264
|
+
if (options.teamId !== void 0) {
|
|
31265
|
+
const teamId = options.teamId.trim();
|
|
31266
|
+
if (teamId.length === 0) {
|
|
31267
|
+
throw new CliError("--team-id must not be empty");
|
|
31268
|
+
}
|
|
31269
|
+
body.teamId = teamId;
|
|
31270
|
+
}
|
|
31271
|
+
if (options.frontendUrl !== void 0) {
|
|
31272
|
+
const frontendUrl = options.frontendUrl.trim();
|
|
31273
|
+
if (frontendUrl.length === 0) {
|
|
31274
|
+
throw new CliError("--frontend-url must not be empty");
|
|
31275
|
+
}
|
|
31276
|
+
body.frontendUrl = frontendUrl;
|
|
31277
|
+
}
|
|
31278
|
+
const raw = await httpRequest({
|
|
31279
|
+
method: "POST",
|
|
31280
|
+
path: `/v2/organizations/${encodeURIComponent(orgId)}/members`,
|
|
31281
|
+
apiKey,
|
|
31282
|
+
apiBaseUrl,
|
|
31283
|
+
body
|
|
31284
|
+
});
|
|
31285
|
+
if (options.json) {
|
|
31286
|
+
printJson(raw);
|
|
31287
|
+
return;
|
|
31288
|
+
}
|
|
31289
|
+
const parsed = inviteOrgMemberResponseSchema.safeParse(raw);
|
|
31290
|
+
if (!parsed.success) {
|
|
31291
|
+
throw new CliError(
|
|
31292
|
+
`Unexpected response from POST /v2/organizations/:orgId/members: ${parsed.error.message}`
|
|
31293
|
+
);
|
|
31294
|
+
}
|
|
31295
|
+
console.log(green("Invitation created!"));
|
|
31296
|
+
console.log();
|
|
31297
|
+
console.log(
|
|
31298
|
+
renderKeyValue([
|
|
31299
|
+
{ label: "Invitation ID", value: parsed.data.invitationId },
|
|
31300
|
+
{ label: "Email", value: email },
|
|
31301
|
+
{ label: "Role", value: role },
|
|
31302
|
+
{ label: "Team", value: body.teamId ?? "\u2014" },
|
|
31303
|
+
{ label: "Email sent", value: parsed.data.emailSent ? "yes" : "no" }
|
|
31304
|
+
])
|
|
31305
|
+
);
|
|
31306
|
+
}, "inviteOrgMemberAction"));
|
|
31307
|
+
}
|
|
31308
|
+
__name(registerTeamsInviteOrgMember, "registerTeamsInviteOrgMember");
|
|
31309
|
+
|
|
31310
|
+
// src/commands/teams/list.ts
|
|
31311
|
+
import { z as z114 } from "zod";
|
|
31312
|
+
var teamApiSchema2 = z114.object({
|
|
31313
|
+
id: z114.string(),
|
|
31314
|
+
name: z114.string(),
|
|
31315
|
+
organization_id: z114.string().nullable()
|
|
30998
31316
|
});
|
|
30999
|
-
var listMyTeamsResponseSchema3 =
|
|
31000
|
-
teams:
|
|
31317
|
+
var listMyTeamsResponseSchema3 = z114.object({
|
|
31318
|
+
teams: z114.array(teamApiSchema2)
|
|
31001
31319
|
});
|
|
31002
31320
|
function registerTeamsList(teams) {
|
|
31003
31321
|
teams.command("list", { isDefault: true }).description("List every team you can act on").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
|
|
@@ -31040,21 +31358,21 @@ function registerTeamsList(teams) {
|
|
|
31040
31358
|
__name(registerTeamsList, "registerTeamsList");
|
|
31041
31359
|
|
|
31042
31360
|
// src/commands/teams/org-insights.ts
|
|
31043
|
-
import { z as
|
|
31044
|
-
var headlineSchema =
|
|
31045
|
-
total_runs:
|
|
31046
|
-
completed_runs:
|
|
31047
|
-
failed_runs:
|
|
31048
|
-
success_rate:
|
|
31049
|
-
active_agents:
|
|
31050
|
-
active_users:
|
|
31051
|
-
start_date:
|
|
31052
|
-
end_date:
|
|
31053
|
-
truncated:
|
|
31054
|
-
aggregated_teams:
|
|
31055
|
-
total_teams:
|
|
31056
|
-
});
|
|
31057
|
-
var orgInsightsHeadlineResponseSchema =
|
|
31361
|
+
import { z as z115 } from "zod";
|
|
31362
|
+
var headlineSchema = z115.object({
|
|
31363
|
+
total_runs: z115.number(),
|
|
31364
|
+
completed_runs: z115.number(),
|
|
31365
|
+
failed_runs: z115.number(),
|
|
31366
|
+
success_rate: z115.number().nullable(),
|
|
31367
|
+
active_agents: z115.number(),
|
|
31368
|
+
active_users: z115.number(),
|
|
31369
|
+
start_date: z115.string(),
|
|
31370
|
+
end_date: z115.string(),
|
|
31371
|
+
truncated: z115.boolean(),
|
|
31372
|
+
aggregated_teams: z115.number(),
|
|
31373
|
+
total_teams: z115.number()
|
|
31374
|
+
});
|
|
31375
|
+
var orgInsightsHeadlineResponseSchema = z115.object({
|
|
31058
31376
|
headline: headlineSchema
|
|
31059
31377
|
});
|
|
31060
31378
|
function formatRate(rate) {
|
|
@@ -31122,26 +31440,26 @@ function registerTeamsOrgInsights(teams) {
|
|
|
31122
31440
|
__name(registerTeamsOrgInsights, "registerTeamsOrgInsights");
|
|
31123
31441
|
|
|
31124
31442
|
// src/commands/teams/org-metrics.ts
|
|
31125
|
-
import { z as
|
|
31126
|
-
var teamMetricSchema =
|
|
31127
|
-
team_id:
|
|
31128
|
-
team_name:
|
|
31129
|
-
is_deleted:
|
|
31130
|
-
member_count:
|
|
31131
|
-
assignment_count:
|
|
31132
|
-
scheduled_job_count:
|
|
31133
|
-
total_jobs:
|
|
31134
|
-
completed_jobs:
|
|
31135
|
-
failed_jobs:
|
|
31136
|
-
total_runs:
|
|
31137
|
-
});
|
|
31138
|
-
var orgInsightsMetricsResponseSchema =
|
|
31139
|
-
teams:
|
|
31140
|
-
start_date:
|
|
31141
|
-
end_date:
|
|
31142
|
-
truncated:
|
|
31143
|
-
total_teams:
|
|
31144
|
-
org_member_count:
|
|
31443
|
+
import { z as z116 } from "zod";
|
|
31444
|
+
var teamMetricSchema = z116.object({
|
|
31445
|
+
team_id: z116.string(),
|
|
31446
|
+
team_name: z116.string(),
|
|
31447
|
+
is_deleted: z116.boolean(),
|
|
31448
|
+
member_count: z116.number(),
|
|
31449
|
+
assignment_count: z116.number(),
|
|
31450
|
+
scheduled_job_count: z116.number(),
|
|
31451
|
+
total_jobs: z116.number(),
|
|
31452
|
+
completed_jobs: z116.number(),
|
|
31453
|
+
failed_jobs: z116.number(),
|
|
31454
|
+
total_runs: z116.number()
|
|
31455
|
+
});
|
|
31456
|
+
var orgInsightsMetricsResponseSchema = z116.object({
|
|
31457
|
+
teams: z116.array(teamMetricSchema),
|
|
31458
|
+
start_date: z116.string(),
|
|
31459
|
+
end_date: z116.string(),
|
|
31460
|
+
truncated: z116.boolean(),
|
|
31461
|
+
total_teams: z116.number(),
|
|
31462
|
+
org_member_count: z116.number()
|
|
31145
31463
|
});
|
|
31146
31464
|
function registerTeamsOrgMetrics(teams) {
|
|
31147
31465
|
teams.command("org-metrics <org-id>").description("Show per-team run metrics across an organization").option("--start-date <date>", "window start (ISO 8601, default 7d ago)").option("--end-date <date>", "window end (ISO 8601, default now)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function orgMetricsAction(orgId, options) {
|
|
@@ -31204,20 +31522,20 @@ ${total_teams} teams${suffix} \xB7 ${org_member_count} org members`
|
|
|
31204
31522
|
__name(registerTeamsOrgMetrics, "registerTeamsOrgMetrics");
|
|
31205
31523
|
|
|
31206
31524
|
// src/commands/teams/org-usage.ts
|
|
31207
|
-
import { z as
|
|
31525
|
+
import { z as z117 } from "zod";
|
|
31208
31526
|
var GRANULARITIES = ["day", "week", "month"];
|
|
31209
31527
|
var DEFAULT_LOOKBACK_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
31210
|
-
var bucketSchema =
|
|
31211
|
-
period:
|
|
31212
|
-
total_runs:
|
|
31213
|
-
scheduled_runs:
|
|
31214
|
-
on_demand_runs:
|
|
31215
|
-
});
|
|
31216
|
-
var usageChartResponseSchema =
|
|
31217
|
-
buckets:
|
|
31218
|
-
granularity:
|
|
31219
|
-
truncated:
|
|
31220
|
-
total_teams:
|
|
31528
|
+
var bucketSchema = z117.object({
|
|
31529
|
+
period: z117.string(),
|
|
31530
|
+
total_runs: z117.number(),
|
|
31531
|
+
scheduled_runs: z117.number(),
|
|
31532
|
+
on_demand_runs: z117.number()
|
|
31533
|
+
});
|
|
31534
|
+
var usageChartResponseSchema = z117.object({
|
|
31535
|
+
buckets: z117.array(bucketSchema),
|
|
31536
|
+
granularity: z117.enum(GRANULARITIES),
|
|
31537
|
+
truncated: z117.boolean(),
|
|
31538
|
+
total_teams: z117.number()
|
|
31221
31539
|
});
|
|
31222
31540
|
function registerTeamsOrgUsage(teams) {
|
|
31223
31541
|
teams.command("org-usage <org-id>").description("Show org-wide run volume over time (scheduled vs on-demand)").option("--start-date <date>", "window start (ISO 8601, default 30d ago)").option("--end-date <date>", "window end (ISO 8601, default now)").option(
|
|
@@ -31276,17 +31594,17 @@ function registerTeamsOrgUsage(teams) {
|
|
|
31276
31594
|
__name(registerTeamsOrgUsage, "registerTeamsOrgUsage");
|
|
31277
31595
|
|
|
31278
31596
|
// src/commands/teams/org.ts
|
|
31279
|
-
import { z as
|
|
31280
|
-
var orgTeamSchema =
|
|
31281
|
-
id:
|
|
31282
|
-
name:
|
|
31283
|
-
userIsMember:
|
|
31284
|
-
userRole:
|
|
31285
|
-
memberCount:
|
|
31597
|
+
import { z as z118 } from "zod";
|
|
31598
|
+
var orgTeamSchema = z118.object({
|
|
31599
|
+
id: z118.string(),
|
|
31600
|
+
name: z118.string(),
|
|
31601
|
+
userIsMember: z118.boolean(),
|
|
31602
|
+
userRole: z118.string().nullable(),
|
|
31603
|
+
memberCount: z118.number()
|
|
31286
31604
|
});
|
|
31287
|
-
var listOrgTeamsResponseSchema =
|
|
31288
|
-
teams:
|
|
31289
|
-
total:
|
|
31605
|
+
var listOrgTeamsResponseSchema = z118.object({
|
|
31606
|
+
teams: z118.array(orgTeamSchema),
|
|
31607
|
+
total: z118.number()
|
|
31290
31608
|
});
|
|
31291
31609
|
function registerTeamsOrg(teams) {
|
|
31292
31610
|
teams.command("org <org-id>").description("List all teams in an organization you belong to").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function orgAction(orgId, options) {
|
|
@@ -31328,17 +31646,17 @@ function registerTeamsOrg(teams) {
|
|
|
31328
31646
|
__name(registerTeamsOrg, "registerTeamsOrg");
|
|
31329
31647
|
|
|
31330
31648
|
// src/commands/teams/orgs.ts
|
|
31331
|
-
import { z as
|
|
31332
|
-
var orgMembershipSchema =
|
|
31333
|
-
organization:
|
|
31334
|
-
id:
|
|
31335
|
-
name:
|
|
31649
|
+
import { z as z119 } from "zod";
|
|
31650
|
+
var orgMembershipSchema = z119.object({
|
|
31651
|
+
organization: z119.object({
|
|
31652
|
+
id: z119.string(),
|
|
31653
|
+
name: z119.string()
|
|
31336
31654
|
}),
|
|
31337
|
-
role:
|
|
31338
|
-
memberCount:
|
|
31655
|
+
role: z119.string(),
|
|
31656
|
+
memberCount: z119.number()
|
|
31339
31657
|
});
|
|
31340
|
-
var listMyOrganizationsResponseSchema =
|
|
31341
|
-
memberships:
|
|
31658
|
+
var listMyOrganizationsResponseSchema = z119.object({
|
|
31659
|
+
memberships: z119.array(orgMembershipSchema)
|
|
31342
31660
|
});
|
|
31343
31661
|
function registerTeamsOrgs(teams) {
|
|
31344
31662
|
teams.command("orgs").description("List the organizations you belong to and your role in each").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function orgsAction(options) {
|
|
@@ -31384,6 +31702,8 @@ function registerTeams(program) {
|
|
|
31384
31702
|
registerTeamsList(teams);
|
|
31385
31703
|
registerTeamsOrg(teams);
|
|
31386
31704
|
registerTeamsOrgs(teams);
|
|
31705
|
+
registerTeamsCreateOrgTeam(teams);
|
|
31706
|
+
registerTeamsInviteOrgMember(teams);
|
|
31387
31707
|
registerTeamsOrgInsights(teams);
|
|
31388
31708
|
registerTeamsOrgMetrics(teams);
|
|
31389
31709
|
registerTeamsOrgUsage(teams);
|
|
@@ -31443,7 +31763,7 @@ __name(resolveActiveTeamId, "resolveActiveTeamId");
|
|
|
31443
31763
|
var version = resolveVersion();
|
|
31444
31764
|
function resolveVersion() {
|
|
31445
31765
|
if (true) {
|
|
31446
|
-
return "1.
|
|
31766
|
+
return "1.30.0";
|
|
31447
31767
|
}
|
|
31448
31768
|
const packageJsonPath = join3(
|
|
31449
31769
|
dirname3(fileURLToPath2(import.meta.url)),
|
|
@@ -31637,7 +31957,7 @@ function isNewerVersion(candidate, current) {
|
|
|
31637
31957
|
__name(isNewerVersion, "isNewerVersion");
|
|
31638
31958
|
function loadPackageMeta() {
|
|
31639
31959
|
if (true) {
|
|
31640
|
-
return { name: "@duvoai/cli", version: "1.
|
|
31960
|
+
return { name: "@duvoai/cli", version: "1.30.0" };
|
|
31641
31961
|
}
|
|
31642
31962
|
const require2 = createRequire(import.meta.url);
|
|
31643
31963
|
const raw = require2("../package.json");
|