@duvoai/cli 1.106.0 → 1.107.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 +2 -0
- package/dist/bin/duvo.js +179 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -376,6 +376,8 @@ Default output is summary-first and compact. JSON output also includes a compact
|
|
|
376
376
|
| `duvo queues create --name <name>` | Create a new queue |
|
|
377
377
|
| `duvo queues update <id>` | Update a queue |
|
|
378
378
|
| `duvo queues delete <id>` | Delete a queue (interrupts active runs and removes all cases) |
|
|
379
|
+
| `duvo queues pause <id>` | Pause a queue: it starts no new cases until resumed; runs in progress finish |
|
|
380
|
+
| `duvo queues resume <id>` | Resume a paused queue |
|
|
379
381
|
| `duvo queues stats --queue-ids <ids>` | Get case status counts for multiple queues in one call (keyed by queue ID, zeros included) |
|
|
380
382
|
| `duvo queues agents <queue-id>` | List producer/consumer agents bound to a queue |
|
|
381
383
|
| `duvo queues eval-rubrics <queue-id>` | List a queue's active case-level evaluation rubrics |
|
package/dist/bin/duvo.js
CHANGED
|
@@ -13189,6 +13189,11 @@ var caseClearQueueResponseSchema = z50.object({
|
|
|
13189
13189
|
deletedCount: z50.number(),
|
|
13190
13190
|
interruptedRunIds: z50.array(z50.guid())
|
|
13191
13191
|
});
|
|
13192
|
+
var caseQueueUserRefSchema = z50.object({
|
|
13193
|
+
id: z50.string(),
|
|
13194
|
+
name: z50.string().nullable(),
|
|
13195
|
+
email: z50.string()
|
|
13196
|
+
});
|
|
13192
13197
|
var caseQueueSchema = z50.object({
|
|
13193
13198
|
id: z50.guid(),
|
|
13194
13199
|
name: z50.string(),
|
|
@@ -13210,11 +13215,15 @@ var caseQueueSchema = z50.object({
|
|
|
13210
13215
|
* reason as the fields above: existing fixtures and CLI callers must keep
|
|
13211
13216
|
* validating.
|
|
13212
13217
|
*/
|
|
13213
|
-
created_by:
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
+
created_by: caseQueueUserRefSchema.nullable().optional(),
|
|
13219
|
+
// Optional (additive), for the same reason as `created_by`; every queue
|
|
13220
|
+
// response from the backend carries both.
|
|
13221
|
+
paused_at: z50.string().nullable().optional().describe(
|
|
13222
|
+
"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed."
|
|
13223
|
+
),
|
|
13224
|
+
paused_by: caseQueueUserRefSchema.nullable().optional().describe(
|
|
13225
|
+
"The user who paused the queue, or null while it runs or when that user's profile is gone."
|
|
13226
|
+
),
|
|
13218
13227
|
/**
|
|
13219
13228
|
* True when at least one case in this queue has ever had an approval
|
|
13220
13229
|
* batch (open, resolved, or cancelled). The frontend uses this to relabel
|
|
@@ -20730,6 +20739,8 @@ var PERMISSION = {
|
|
|
20730
20739
|
AGENT_TRIGGER_VIEW_OTHERS: "agent.trigger.view.others",
|
|
20731
20740
|
AGENT_TRIGGER_MANAGE_OTHERS: "agent.trigger.manage.others",
|
|
20732
20741
|
AGENT_MEMORY_MANAGE: "agent.memory.manage",
|
|
20742
|
+
AGENT_MEMORY_TEAM_VIEW: "agent.memory.team.view",
|
|
20743
|
+
AGENT_MEMORY_TEAM_MANAGE: "agent.memory.team.manage",
|
|
20733
20744
|
COMPUTER_TEMPLATE_VIEW: "computer.template.view",
|
|
20734
20745
|
COMPUTER_TEMPLATE_USE: "computer.template.use",
|
|
20735
20746
|
COMPUTER_TEMPLATE_MANAGE: "computer.template.manage",
|
|
@@ -21442,7 +21453,7 @@ var TEAM_PERMISSION_META = {
|
|
|
21442
21453
|
[P4.AGENT_TRIGGER_MANAGE]: {
|
|
21443
21454
|
domain: D3.AGENTS,
|
|
21444
21455
|
label: "Manage schedules and triggers",
|
|
21445
|
-
help: "Create and change your own schedules, Slack, Teams and case triggers.",
|
|
21456
|
+
help: "Create and change your own schedules, Slack, Teams and case triggers, and pause or resume a queue where your case trigger is on.",
|
|
21446
21457
|
implies: [P4.AGENT_RUN, P4.AGENT_TRIGGER_VIEW],
|
|
21447
21458
|
validScopes: SCOPES3
|
|
21448
21459
|
},
|
|
@@ -21467,6 +21478,20 @@ var TEAM_PERMISSION_META = {
|
|
|
21467
21478
|
implies: [P4.AGENT_VIEW],
|
|
21468
21479
|
validScopes: SCOPES3
|
|
21469
21480
|
},
|
|
21481
|
+
[P4.AGENT_MEMORY_TEAM_VIEW]: {
|
|
21482
|
+
domain: D3.AGENTS,
|
|
21483
|
+
label: "See team AOP exceptions",
|
|
21484
|
+
help: "See the AOP exceptions a Team automation's runs use, which belong to the team rather than a person.",
|
|
21485
|
+
implies: [P4.AGENT_VIEW],
|
|
21486
|
+
validScopes: SCOPES3
|
|
21487
|
+
},
|
|
21488
|
+
[P4.AGENT_MEMORY_TEAM_MANAGE]: {
|
|
21489
|
+
domain: D3.AGENTS,
|
|
21490
|
+
label: "Manage team AOP exceptions",
|
|
21491
|
+
help: "Add, change and delete the AOP exceptions a Team automation's runs use.",
|
|
21492
|
+
implies: [P4.AGENT_MEMORY_TEAM_VIEW],
|
|
21493
|
+
validScopes: SCOPES3
|
|
21494
|
+
},
|
|
21470
21495
|
[P4.COMPUTER_TEMPLATE_VIEW]: {
|
|
21471
21496
|
domain: D3.AGENTS,
|
|
21472
21497
|
label: "See computer templates",
|
|
@@ -21533,7 +21558,7 @@ var TEAM_PERMISSION_META = {
|
|
|
21533
21558
|
[P4.QUEUE_MANAGE]: {
|
|
21534
21559
|
domain: D3.CASES,
|
|
21535
21560
|
label: "Manage queues",
|
|
21536
|
-
help: "Create, configure, clear and delete queues and their evaluation rubrics.",
|
|
21561
|
+
help: "Create, configure, pause, resume, clear and delete queues and their evaluation rubrics.",
|
|
21537
21562
|
implies: [P4.QUEUE_SCHEMA_MANAGE],
|
|
21538
21563
|
validScopes: SCOPES3
|
|
21539
21564
|
},
|
|
@@ -21961,6 +21986,8 @@ var LEAD_BUILDER_TIER = [
|
|
|
21961
21986
|
...BUILDER_TIER,
|
|
21962
21987
|
P5.AGENT_DUPLICATE,
|
|
21963
21988
|
P5.AGENT_MANAGE_OTHERS,
|
|
21989
|
+
P5.AGENT_MEMORY_TEAM_MANAGE,
|
|
21990
|
+
P5.AGENT_MEMORY_TEAM_VIEW,
|
|
21964
21991
|
P5.AGENT_PROMOTE_OTHERS,
|
|
21965
21992
|
P5.APIKEY_MANAGE_OTHERS,
|
|
21966
21993
|
P5.AUTOMATION_MANAGE_OTHERS,
|
|
@@ -22022,6 +22049,7 @@ var OWNER_TIER = [
|
|
|
22022
22049
|
P5.TEAM_ROLE_ASSIGN_UNRESTRICTED
|
|
22023
22050
|
];
|
|
22024
22051
|
var ORG_LEADER_TEAM_READS = [
|
|
22052
|
+
P5.AGENT_MEMORY_TEAM_VIEW,
|
|
22025
22053
|
P5.AGENT_TRIGGER_VIEW_OTHERS,
|
|
22026
22054
|
P5.AGENT_VIEW,
|
|
22027
22055
|
P5.AUTOMATION_POLICY_VIEW,
|
|
@@ -30089,16 +30117,15 @@ var sizeBandSchema = z372.number().int({ message: "Use whole DPUs for each size"
|
|
|
30089
30117
|
message: "Each size must start at 1,000,000 DPUs or less"
|
|
30090
30118
|
});
|
|
30091
30119
|
var hourlyRateSchema = z372.number().positive({ message: "Each rate must be above $0" }).max(1e4, { message: "Each rate must be $10,000 or less" });
|
|
30092
|
-
var
|
|
30120
|
+
var revenueMultiplierSchema = z372.number().positive({ message: "Each multiplier must be above 0" }).max(100, { message: "Each multiplier must be 100 or less" });
|
|
30093
30121
|
var sizingFormulaValuesSchema = z372.object({
|
|
30094
30122
|
hourlyRateUsd: hourlyRateSchema,
|
|
30095
30123
|
/** The rate for a process an outsourced team does. */
|
|
30096
30124
|
outsourcedHourlyRateUsd: hourlyRateSchema,
|
|
30097
|
-
/** Multiplies a process
|
|
30098
|
-
|
|
30099
|
-
|
|
30100
|
-
|
|
30101
|
-
revenue: useCaseMultiplierSchema
|
|
30125
|
+
/** Multiplies the DPUs of a revenue-generating process, by who does it. */
|
|
30126
|
+
revenueMultipliers: z372.object({
|
|
30127
|
+
insourced: revenueMultiplierSchema,
|
|
30128
|
+
outsourced: revenueMultiplierSchema
|
|
30102
30129
|
}),
|
|
30103
30130
|
/** Lowest DPUs a year for each size; S is everything below M. */
|
|
30104
30131
|
sizeMinDpusPerYear: z372.object({
|
|
@@ -30121,10 +30148,9 @@ var createSizingFormulaRequestSchema = z372.union([
|
|
|
30121
30148
|
var sizingFormulaSchema = z372.object({
|
|
30122
30149
|
hourlyRateUsd: z372.number(),
|
|
30123
30150
|
outsourcedHourlyRateUsd: z372.number(),
|
|
30124
|
-
|
|
30125
|
-
outsourced: z372.number(),
|
|
30151
|
+
revenueMultipliers: z372.object({
|
|
30126
30152
|
insourced: z372.number(),
|
|
30127
|
-
|
|
30153
|
+
outsourced: z372.number()
|
|
30128
30154
|
}),
|
|
30129
30155
|
/** For admin tabs loaded before the rates shipped; goes with `hours_per_dpu`. */
|
|
30130
30156
|
hoursPerDpu: z372.number().optional(),
|
|
@@ -30136,7 +30162,7 @@ var sizingFormulaSchema = z372.object({
|
|
|
30136
30162
|
id: z372.string(),
|
|
30137
30163
|
version: z372.number().int().positive(),
|
|
30138
30164
|
createdAt: z372.string(),
|
|
30139
|
-
/** Null for
|
|
30165
|
+
/** Null for versions a migration shipped. */
|
|
30140
30166
|
createdByName: z372.string().nullable()
|
|
30141
30167
|
});
|
|
30142
30168
|
var sizingFormulaResponseSchema = z372.object({
|
|
@@ -30183,8 +30209,8 @@ var sizingOutsourcedOverrideSchema = z372.object({
|
|
|
30183
30209
|
createdAt: z372.string(),
|
|
30184
30210
|
createdByName: z372.string()
|
|
30185
30211
|
});
|
|
30186
|
-
var
|
|
30187
|
-
|
|
30212
|
+
var sizingRevenueGeneratingOverrideSchema = z372.object({
|
|
30213
|
+
revenueGenerating: z372.boolean().nullable(),
|
|
30188
30214
|
version: z372.number().int().positive(),
|
|
30189
30215
|
createdAt: z372.string(),
|
|
30190
30216
|
createdByName: z372.string()
|
|
@@ -30214,8 +30240,8 @@ var sizingProcessSchema = z372.object({
|
|
|
30214
30240
|
outsourcedOverride: sizingOutsourcedOverrideSchema.nullable(),
|
|
30215
30241
|
/** Scales every version's time saved; without an admin's percent, the estimate's, then the default. */
|
|
30216
30242
|
automatableOverride: sizingAutomatableOverrideSchema.nullable(),
|
|
30217
|
-
/** Without an admin's answer, the
|
|
30218
|
-
|
|
30243
|
+
/** Without an admin's answer, the LLM's use case decides: revenue is Yes, anything else No. */
|
|
30244
|
+
revenueGeneratingOverride: sizingRevenueGeneratingOverrideSchema.nullable()
|
|
30219
30245
|
});
|
|
30220
30246
|
var sizingTeamSchema = z372.object({
|
|
30221
30247
|
id: z372.string(),
|
|
@@ -30228,14 +30254,10 @@ var sizingOrganizationSummarySchema = z372.object({
|
|
|
30228
30254
|
processCount: z372.number().int(),
|
|
30229
30255
|
/** Summed over each process's live size; null when none has a figure. */
|
|
30230
30256
|
timeSavedHoursPerMonth: z372.number().nullable(),
|
|
30231
|
-
/**
|
|
30232
|
-
|
|
30233
|
-
|
|
30234
|
-
|
|
30235
|
-
timeSavedHoursPerMonth: z372.number(),
|
|
30236
|
-
outsourcedHoursPerMonth: z372.number()
|
|
30237
|
-
})
|
|
30238
|
-
),
|
|
30257
|
+
/** The parts of that sum from outsourced processes and from revenue-generating ones. */
|
|
30258
|
+
outsourcedHoursPerMonth: z372.number(),
|
|
30259
|
+
revenueInsourcedHoursPerMonth: z372.number(),
|
|
30260
|
+
revenueOutsourcedHoursPerMonth: z372.number(),
|
|
30239
30261
|
/** Processes the sum counts. */
|
|
30240
30262
|
timedProcessCount: z372.number().int()
|
|
30241
30263
|
});
|
|
@@ -30263,8 +30285,8 @@ var setSizingOutsourcedRequestSchema = z372.object({
|
|
|
30263
30285
|
/** The version the admin edited, 0 for none; the save fails once a newer one exists. */
|
|
30264
30286
|
baseVersion: z372.number().int().nonnegative().max(1e6)
|
|
30265
30287
|
});
|
|
30266
|
-
var
|
|
30267
|
-
|
|
30288
|
+
var setSizingRevenueGeneratingRequestSchema = z372.object({
|
|
30289
|
+
revenueGenerating: z372.boolean().nullable(),
|
|
30268
30290
|
/** The version the admin edited, 0 for none; the save fails once a newer one exists. */
|
|
30269
30291
|
baseVersion: z372.number().int().nonnegative().max(1e6)
|
|
30270
30292
|
});
|
|
@@ -38523,14 +38545,15 @@ function pulseMcpBridgeBody(target, mode, snapshotReadyEvent) {
|
|
|
38523
38545
|
return void 0;
|
|
38524
38546
|
}
|
|
38525
38547
|
const raw = headers.get("retry-after");
|
|
38526
|
-
|
|
38548
|
+
const trimmed = typeof raw === "string" ? raw.trim() : "";
|
|
38549
|
+
if (trimmed === "") {
|
|
38527
38550
|
return void 0;
|
|
38528
38551
|
}
|
|
38529
|
-
const seconds = Number(
|
|
38552
|
+
const seconds = Number(trimmed);
|
|
38530
38553
|
if (Number.isFinite(seconds)) {
|
|
38531
|
-
return seconds * 1e3;
|
|
38554
|
+
return seconds > 0 ? seconds * 1e3 : void 0;
|
|
38532
38555
|
}
|
|
38533
|
-
const at = Date.parse(
|
|
38556
|
+
const at = Date.parse(trimmed);
|
|
38534
38557
|
const delay2 = at - Date.now();
|
|
38535
38558
|
return Number.isNaN(at) || delay2 <= 0 ? void 0 : delay2;
|
|
38536
38559
|
}
|
|
@@ -45813,6 +45836,11 @@ var caseClearQueueResponseSchema2 = z115.object({
|
|
|
45813
45836
|
deletedCount: z115.number(),
|
|
45814
45837
|
interruptedRunIds: z115.array(z115.guid())
|
|
45815
45838
|
});
|
|
45839
|
+
var caseQueueUserRefSchema2 = z115.object({
|
|
45840
|
+
id: z115.string(),
|
|
45841
|
+
name: z115.string().nullable(),
|
|
45842
|
+
email: z115.string()
|
|
45843
|
+
});
|
|
45816
45844
|
var caseQueueSchema2 = z115.object({
|
|
45817
45845
|
id: z115.guid(),
|
|
45818
45846
|
name: z115.string(),
|
|
@@ -45834,11 +45862,15 @@ var caseQueueSchema2 = z115.object({
|
|
|
45834
45862
|
* reason as the fields above: existing fixtures and CLI callers must keep
|
|
45835
45863
|
* validating.
|
|
45836
45864
|
*/
|
|
45837
|
-
created_by:
|
|
45838
|
-
|
|
45839
|
-
|
|
45840
|
-
|
|
45841
|
-
|
|
45865
|
+
created_by: caseQueueUserRefSchema2.nullable().optional(),
|
|
45866
|
+
// Optional (additive), for the same reason as `created_by`; every queue
|
|
45867
|
+
// response from the backend carries both.
|
|
45868
|
+
paused_at: z115.string().nullable().optional().describe(
|
|
45869
|
+
"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed."
|
|
45870
|
+
),
|
|
45871
|
+
paused_by: caseQueueUserRefSchema2.nullable().optional().describe(
|
|
45872
|
+
"The user who paused the queue, or null while it runs or when that user's profile is gone."
|
|
45873
|
+
),
|
|
45842
45874
|
/**
|
|
45843
45875
|
* True when at least one case in this queue has ever had an approval
|
|
45844
45876
|
* batch (open, resolved, or cancelled). The frontend uses this to relabel
|
|
@@ -48691,6 +48723,12 @@ var FEATURE_FLAG_CATALOGUE = {
|
|
|
48691
48723
|
stage: "dev",
|
|
48692
48724
|
description: 'Per-team opt-in for Ask Duvo default Skills \u2014 a team Skill marked "Use in Ask Duvo" is written into the sandbox of every NEW general Ask Duvo chat in that team, so the agent can read and follow it. Gates both halves: the toggle on the Skills page (and its PATCH route) and the runtime seed, so turning it off is a complete kill switch \u2014 already-flagged Skills stop reaching new sandboxes without needing the flags cleared. A chat that resolves to a preset never receives team Skills (today CHAT_PRESETS holds Clarity landscape onboarding and policy-apply \u2014 a Pulse or ERP-diagnosis chat is a plain chat and does get them). Off by default for staged rollout.'
|
|
48693
48725
|
},
|
|
48726
|
+
CASE_QUEUE_PAUSING: {
|
|
48727
|
+
key: "case_queue_pausing",
|
|
48728
|
+
defaultValue: false,
|
|
48729
|
+
stage: "dev",
|
|
48730
|
+
description: "Per-team opt-in for pausing a Queue: the Pause queue item in a Queue's actions menu and POST /queues/:id/pause (also the pauseQueue MCP tool and `duvo queues pause`), which answers 403 when the pause is not available. A team on automation revisions (`automation_revisions_migrated_at` stamped) can pause whatever this flag says, because a revision change there cannot switch a Queue off live. The flag gates only starting a pause: resuming a paused Queue, the Paused badges and banner, and the dispatcher's respect for a pause are never gated, so turning the flag off leaves an already-paused Queue paused and resumable. Resolved per viewer (user, team, organization). Off by default for staged rollout."
|
|
48731
|
+
},
|
|
48694
48732
|
CASE_SCHEMA: {
|
|
48695
48733
|
key: "case_schema",
|
|
48696
48734
|
defaultValue: false,
|
|
@@ -53001,6 +53039,52 @@ async function pRetry(fn, retries = 3, baseDelayMs = 100) {
|
|
|
53001
53039
|
}
|
|
53002
53040
|
__name(pRetry, "pRetry");
|
|
53003
53041
|
__name3(pRetry, "pRetry");
|
|
53042
|
+
function parseRetryAfterMs(value, nowMs = Date.now()) {
|
|
53043
|
+
if (value === null || value === void 0) {
|
|
53044
|
+
return null;
|
|
53045
|
+
}
|
|
53046
|
+
if (typeof value === "number") {
|
|
53047
|
+
return Number.isFinite(value) && value > 0 ? value * 1e3 : null;
|
|
53048
|
+
}
|
|
53049
|
+
const trimmed = value.trim();
|
|
53050
|
+
if (trimmed === "") {
|
|
53051
|
+
return null;
|
|
53052
|
+
}
|
|
53053
|
+
const deltaSeconds = Number(trimmed);
|
|
53054
|
+
if (Number.isFinite(deltaSeconds)) {
|
|
53055
|
+
return deltaSeconds > 0 ? deltaSeconds * 1e3 : null;
|
|
53056
|
+
}
|
|
53057
|
+
const httpDateMs = Date.parse(trimmed);
|
|
53058
|
+
if (Number.isNaN(httpDateMs)) {
|
|
53059
|
+
return null;
|
|
53060
|
+
}
|
|
53061
|
+
const delayMs = httpDateMs - nowMs;
|
|
53062
|
+
return delayMs > 0 ? delayMs : null;
|
|
53063
|
+
}
|
|
53064
|
+
__name(parseRetryAfterMs, "parseRetryAfterMs");
|
|
53065
|
+
__name3(parseRetryAfterMs, "parseRetryAfterMs");
|
|
53066
|
+
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
53067
|
+
async function retryWithBackoff(operation, options) {
|
|
53068
|
+
const { maxAttempts, delayMs, onRetry, sleep: sleep22 = sleep } = options;
|
|
53069
|
+
if (maxAttempts !== void 0 && maxAttempts < 1) {
|
|
53070
|
+
throw new RangeError("retryWithBackoff: maxAttempts must be at least 1");
|
|
53071
|
+
}
|
|
53072
|
+
for (let attempt = 1; ; attempt++) {
|
|
53073
|
+
try {
|
|
53074
|
+
return await operation(attempt);
|
|
53075
|
+
} catch (error) {
|
|
53076
|
+
const waitMs = delayMs(error, attempt);
|
|
53077
|
+
const attemptsLeft = maxAttempts === void 0 || attempt < maxAttempts;
|
|
53078
|
+
if (waitMs === null || waitMs > MAX_TIMER_DELAY_MS || !attemptsLeft) {
|
|
53079
|
+
throw error;
|
|
53080
|
+
}
|
|
53081
|
+
onRetry?.({ error, attempt, delayMs: waitMs });
|
|
53082
|
+
await sleep22(waitMs);
|
|
53083
|
+
}
|
|
53084
|
+
}
|
|
53085
|
+
}
|
|
53086
|
+
__name(retryWithBackoff, "retryWithBackoff");
|
|
53087
|
+
__name3(retryWithBackoff, "retryWithBackoff");
|
|
53004
53088
|
function parseAgentConfig2(configJson, options = {}) {
|
|
53005
53089
|
if (!configJson) {
|
|
53006
53090
|
return { config: null };
|
|
@@ -78911,6 +78995,57 @@ function registerQueuesEvalRubrics(queues) {
|
|
|
78911
78995
|
}
|
|
78912
78996
|
__name(registerQueuesEvalRubrics, "registerQueuesEvalRubrics");
|
|
78913
78997
|
|
|
78998
|
+
// src/commands/queues/pause.ts
|
|
78999
|
+
function describeQueuePause(queue) {
|
|
79000
|
+
if (!queue.paused_at) {
|
|
79001
|
+
return "Running";
|
|
79002
|
+
}
|
|
79003
|
+
const by = queue.paused_by ? ` by ${queue.paused_by.name ?? queue.paused_by.email}` : "";
|
|
79004
|
+
return `Paused${by} at ${queue.paused_at}`;
|
|
79005
|
+
}
|
|
79006
|
+
__name(describeQueuePause, "describeQueuePause");
|
|
79007
|
+
function registerPauseAction(queues, action) {
|
|
79008
|
+
queues.command(`${action} <id>`).description(
|
|
79009
|
+
action === "pause" ? "Pause a queue: it starts no new cases until resumed. Runs in progress finish. Not yet available on every team." : "Resume a paused queue, so its pending cases start again"
|
|
79010
|
+
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function pauseAction(id, options) {
|
|
79011
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
79012
|
+
const raw = await httpRequest({
|
|
79013
|
+
method: "POST",
|
|
79014
|
+
path: `/v2/queues/${encodeURIComponent(id)}/${action}`,
|
|
79015
|
+
apiKey,
|
|
79016
|
+
apiBaseUrl
|
|
79017
|
+
});
|
|
79018
|
+
if (options.json) {
|
|
79019
|
+
printJson(raw);
|
|
79020
|
+
return;
|
|
79021
|
+
}
|
|
79022
|
+
const parsed = caseUpdateQueueResponseSchema.safeParse(raw);
|
|
79023
|
+
if (!parsed.success) {
|
|
79024
|
+
throw new CliError(
|
|
79025
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
79026
|
+
);
|
|
79027
|
+
}
|
|
79028
|
+
const { queue } = parsed.data;
|
|
79029
|
+
console.log(
|
|
79030
|
+
green(action === "pause" ? "Queue paused." : "Queue resumed.")
|
|
79031
|
+
);
|
|
79032
|
+
console.log();
|
|
79033
|
+
console.log(
|
|
79034
|
+
renderKeyValue([
|
|
79035
|
+
{ label: "ID", value: queue.id },
|
|
79036
|
+
{ label: "Name", value: queue.name },
|
|
79037
|
+
{ label: "State", value: describeQueuePause(queue) }
|
|
79038
|
+
])
|
|
79039
|
+
);
|
|
79040
|
+
}, "pauseAction"));
|
|
79041
|
+
}
|
|
79042
|
+
__name(registerPauseAction, "registerPauseAction");
|
|
79043
|
+
function registerQueuesPause(queues) {
|
|
79044
|
+
registerPauseAction(queues, "pause");
|
|
79045
|
+
registerPauseAction(queues, "resume");
|
|
79046
|
+
}
|
|
79047
|
+
__name(registerQueuesPause, "registerQueuesPause");
|
|
79048
|
+
|
|
78914
79049
|
// src/commands/queues/get.ts
|
|
78915
79050
|
function registerQueuesGet(queues) {
|
|
78916
79051
|
queues.command("get <id>").description("Get a queue by ID").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function getAction(id, options) {
|
|
@@ -78942,7 +79077,8 @@ function registerQueuesGet(queues) {
|
|
|
78942
79077
|
{
|
|
78943
79078
|
label: "Created by",
|
|
78944
79079
|
value: queue.created_by ? `${queue.created_by.name ?? queue.created_by.email} (${queue.created_by.id})` : ""
|
|
78945
|
-
}
|
|
79080
|
+
},
|
|
79081
|
+
{ label: "State", value: describeQueuePause(queue) }
|
|
78946
79082
|
])
|
|
78947
79083
|
);
|
|
78948
79084
|
}, "getAction"));
|
|
@@ -79932,6 +80068,7 @@ function registerQueues(program) {
|
|
|
79932
80068
|
registerQueuesCreate(queues);
|
|
79933
80069
|
registerQueuesUpdate(queues);
|
|
79934
80070
|
registerQueuesDelete(queues);
|
|
80071
|
+
registerQueuesPause(queues);
|
|
79935
80072
|
registerQueuesAgents(queues);
|
|
79936
80073
|
registerQueuesLinkAgent(queues);
|
|
79937
80074
|
registerQueuesUnlinkAgent(queues);
|
|
@@ -84548,7 +84685,7 @@ __name(isStandaloneBinary, "isStandaloneBinary");
|
|
|
84548
84685
|
import { createRequire } from "node:module";
|
|
84549
84686
|
function getPackageMeta() {
|
|
84550
84687
|
if (true) {
|
|
84551
|
-
return { name: "@duvoai/cli", version: "1.
|
|
84688
|
+
return { name: "@duvoai/cli", version: "1.107.0" };
|
|
84552
84689
|
}
|
|
84553
84690
|
const require2 = createRequire(import.meta.url);
|
|
84554
84691
|
const raw = require2("../../package.json");
|