@agentuity/cli 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cmd/cloud/queue/consumers.d.ts +3 -0
- package/dist/cmd/cloud/queue/consumers.d.ts.map +1 -0
- package/dist/cmd/cloud/queue/consumers.js +90 -0
- package/dist/cmd/cloud/queue/consumers.js.map +1 -0
- package/dist/cmd/cloud/queue/destinations.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/destinations.js +20 -3
- package/dist/cmd/cloud/queue/destinations.js.map +1 -1
- package/dist/cmd/cloud/queue/index.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/index.js +2 -0
- package/dist/cmd/cloud/queue/index.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +6 -6
- package/src/cmd/cloud/queue/consumers.ts +97 -0
- package/src/cmd/cloud/queue/destinations.ts +21 -3
- package/src/cmd/cloud/queue/index.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumers.d.ts","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/consumers.ts"],"names":[],"mappings":"AAiFA,eAAO,MAAM,mBAAmB,sCAa9B,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createCommand, createSubcommand } from '../../../types';
|
|
3
|
+
import * as tui from '../../../tui';
|
|
4
|
+
import { createQueueAPIClient, getQueueApiOptions } from './util';
|
|
5
|
+
import { getCommand } from '../../../command-prefix';
|
|
6
|
+
import { listConsumers } from '@agentuity/server';
|
|
7
|
+
const ConsumersListResponseSchema = z.object({
|
|
8
|
+
consumers: z.array(z.object({
|
|
9
|
+
id: z.string(),
|
|
10
|
+
client_id: z.string().nullable().optional(),
|
|
11
|
+
durable: z.boolean(),
|
|
12
|
+
connected: z.boolean(),
|
|
13
|
+
ip_address: z.string().nullable().optional(),
|
|
14
|
+
last_offset: z.number().nullable().optional(),
|
|
15
|
+
})),
|
|
16
|
+
});
|
|
17
|
+
const listConsumersSubcommand = createSubcommand({
|
|
18
|
+
name: 'list',
|
|
19
|
+
aliases: ['ls'],
|
|
20
|
+
description: 'List consumers for a queue',
|
|
21
|
+
tags: ['read-only', 'fast', 'requires-auth'],
|
|
22
|
+
requires: { auth: true },
|
|
23
|
+
examples: [
|
|
24
|
+
{
|
|
25
|
+
command: getCommand('cloud queue consumers list my-queue'),
|
|
26
|
+
description: 'List queue consumers',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
schema: {
|
|
30
|
+
args: z.object({
|
|
31
|
+
queue_name: z.string().min(1).describe('Queue name'),
|
|
32
|
+
}),
|
|
33
|
+
response: ConsumersListResponseSchema,
|
|
34
|
+
},
|
|
35
|
+
idempotent: true,
|
|
36
|
+
async handler(ctx) {
|
|
37
|
+
const { args, options } = ctx;
|
|
38
|
+
const client = await createQueueAPIClient(ctx);
|
|
39
|
+
const consumers = await listConsumers(client, args.queue_name, getQueueApiOptions(ctx));
|
|
40
|
+
if (!options.json) {
|
|
41
|
+
if (consumers.length === 0) {
|
|
42
|
+
tui.info('No consumers connected');
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const tableData = consumers.map((c) => ({
|
|
46
|
+
ID: c.id,
|
|
47
|
+
'Client ID': c.client_id || '-',
|
|
48
|
+
Durable: c.durable ? 'Yes' : 'No',
|
|
49
|
+
Connected: c.disconnected_at ? 'No' : 'Yes',
|
|
50
|
+
'IP Address': c.ip_address || '-',
|
|
51
|
+
'Last Offset': c.last_offset != null ? String(c.last_offset) : '-',
|
|
52
|
+
}));
|
|
53
|
+
tui.table(tableData, [
|
|
54
|
+
'ID',
|
|
55
|
+
'Client ID',
|
|
56
|
+
'Durable',
|
|
57
|
+
'Connected',
|
|
58
|
+
'IP Address',
|
|
59
|
+
'Last Offset',
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
consumers: consumers.map((c) => ({
|
|
65
|
+
id: c.id,
|
|
66
|
+
client_id: c.client_id || null,
|
|
67
|
+
durable: c.durable,
|
|
68
|
+
connected: !c.disconnected_at,
|
|
69
|
+
ip_address: c.ip_address || null,
|
|
70
|
+
last_offset: c.last_offset ?? null,
|
|
71
|
+
})),
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export const consumersSubcommand = createCommand({
|
|
76
|
+
name: 'consumers',
|
|
77
|
+
aliases: ['consumer'],
|
|
78
|
+
description: 'Manage queue consumers (WebSocket subscriptions)',
|
|
79
|
+
tags: ['requires-auth'],
|
|
80
|
+
requires: { auth: true },
|
|
81
|
+
examples: [
|
|
82
|
+
{
|
|
83
|
+
command: getCommand('cloud queue consumers list my-queue'),
|
|
84
|
+
description: 'List consumers',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
subcommands: [listConsumersSubcommand],
|
|
88
|
+
});
|
|
89
|
+
export default consumersSubcommand;
|
|
90
|
+
//# sourceMappingURL=consumers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumers.js","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/consumers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAiB,MAAM,mBAAmB,CAAC;AAEjE,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,CAAC,CAAC,KAAK,CACjB,CAAC,CAAC,MAAM,CAAC;QACR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C,CAAC,WAAW,IAAI,IAAI;aAClC,CAAC,CAAC;SACH,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;IAChD,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,CAAC,eAAe,CAAC;IACvB,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACxB,QAAQ,EAAE;QACT;YACC,OAAO,EAAE,UAAU,CAAC,qCAAqC,CAAC;YAC1D,WAAW,EAAE,gBAAgB;SAC7B;KACD;IACD,WAAW,EAAE,CAAC,uBAAuB,CAAC;CACtC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/destinations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/destinations.ts"],"names":[],"mappings":"AAsRA,eAAO,MAAM,sBAAsB,sCAwBjC,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
|
|
@@ -8,6 +8,8 @@ import { createDestination, listDestinations, updateDestination, deleteDestinati
|
|
|
8
8
|
const DestinationsListResponseSchema = z.object({
|
|
9
9
|
destinations: z.array(z.object({
|
|
10
10
|
id: z.string(),
|
|
11
|
+
name: z.string(),
|
|
12
|
+
description: z.string().nullable().optional(),
|
|
11
13
|
destination_type: z.string(),
|
|
12
14
|
url: z.string(),
|
|
13
15
|
enabled: z.boolean(),
|
|
@@ -44,17 +46,20 @@ const listDestinationsSubcommand = createSubcommand({
|
|
|
44
46
|
else {
|
|
45
47
|
const tableData = destinations.map((d) => ({
|
|
46
48
|
ID: d.id,
|
|
49
|
+
Name: d.name,
|
|
47
50
|
Type: d.destination_type,
|
|
48
51
|
URL: d.config.url,
|
|
49
52
|
Enabled: d.enabled ? 'Yes' : 'No',
|
|
50
53
|
Created: new Date(d.created_at).toLocaleString(),
|
|
51
54
|
}));
|
|
52
|
-
tui.table(tableData, ['ID', 'Type', 'URL', 'Enabled', 'Created']);
|
|
55
|
+
tui.table(tableData, ['ID', 'Name', 'Type', 'URL', 'Enabled', 'Created']);
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
return {
|
|
56
59
|
destinations: destinations.map((d) => ({
|
|
57
60
|
id: d.id,
|
|
61
|
+
name: d.name,
|
|
62
|
+
description: d.description ?? null,
|
|
58
63
|
destination_type: d.destination_type,
|
|
59
64
|
url: d.config.url,
|
|
60
65
|
enabled: d.enabled,
|
|
@@ -70,7 +75,7 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
70
75
|
requires: { auth: true },
|
|
71
76
|
examples: [
|
|
72
77
|
{
|
|
73
|
-
command: getCommand('cloud queue destinations create my-queue --url https://example.com/webhook'),
|
|
78
|
+
command: getCommand('cloud queue destinations create my-queue --name order-webhooks --url https://example.com/webhook'),
|
|
74
79
|
description: 'Create a webhook destination',
|
|
75
80
|
},
|
|
76
81
|
],
|
|
@@ -79,6 +84,8 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
79
84
|
queue_name: z.string().min(1).describe('Queue name'),
|
|
80
85
|
}),
|
|
81
86
|
options: z.object({
|
|
87
|
+
name: z.string().min(1).describe('Destination name'),
|
|
88
|
+
description: z.string().optional().describe('Destination description'),
|
|
82
89
|
url: z.string().url().describe('Webhook URL'),
|
|
83
90
|
method: z.string().default('POST').optional().describe('HTTP method (default: POST)'),
|
|
84
91
|
timeout: z.coerce.number().optional().describe('Request timeout in milliseconds'),
|
|
@@ -90,6 +97,8 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
90
97
|
const client = await createQueueAPIClient(ctx);
|
|
91
98
|
try {
|
|
92
99
|
const destination = await createDestination(client, args.queue_name, {
|
|
100
|
+
name: opts.name,
|
|
101
|
+
description: opts.description,
|
|
93
102
|
destination_type: 'http',
|
|
94
103
|
config: {
|
|
95
104
|
url: opts.url,
|
|
@@ -100,6 +109,7 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
100
109
|
}, getQueueApiOptions(ctx));
|
|
101
110
|
if (!options.json) {
|
|
102
111
|
tui.success(`Created destination: ${destination.id}`);
|
|
112
|
+
console.log(` Name: ${destination.name}`);
|
|
103
113
|
console.log(` URL: ${destination.config.url}`);
|
|
104
114
|
console.log(` Method: ${destination.config.method}`);
|
|
105
115
|
}
|
|
@@ -120,7 +130,7 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
120
130
|
requires: { auth: true },
|
|
121
131
|
examples: [
|
|
122
132
|
{
|
|
123
|
-
command: getCommand('cloud queue destinations update my-queue
|
|
133
|
+
command: getCommand('cloud queue destinations update my-queue qdest_abc123 --disabled'),
|
|
124
134
|
description: 'Disable a destination',
|
|
125
135
|
},
|
|
126
136
|
],
|
|
@@ -130,6 +140,8 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
130
140
|
destination_id: z.string().min(1).describe('Destination ID'),
|
|
131
141
|
}),
|
|
132
142
|
options: z.object({
|
|
143
|
+
name: z.string().min(1).optional().describe('Destination name'),
|
|
144
|
+
description: z.string().optional().describe('Destination description'),
|
|
133
145
|
url: z.string().url().optional().describe('Webhook URL'),
|
|
134
146
|
method: z.string().optional().describe('HTTP method'),
|
|
135
147
|
timeout: z.coerce.number().optional().describe('Request timeout in milliseconds'),
|
|
@@ -142,6 +154,10 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
142
154
|
const { args, opts, options } = ctx;
|
|
143
155
|
const client = await createQueueAPIClient(ctx);
|
|
144
156
|
const updateParams = {};
|
|
157
|
+
if (opts.name !== undefined)
|
|
158
|
+
updateParams.name = opts.name;
|
|
159
|
+
if (opts.description !== undefined)
|
|
160
|
+
updateParams.description = opts.description || null;
|
|
145
161
|
if (opts.url || opts.method || opts.timeout !== undefined) {
|
|
146
162
|
updateParams.config = {};
|
|
147
163
|
if (opts.url)
|
|
@@ -161,6 +177,7 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
161
177
|
const destination = await updateDestination(client, args.queue_name, args.destination_id, updateParams, getQueueApiOptions(ctx));
|
|
162
178
|
if (!options.json) {
|
|
163
179
|
tui.success(`Updated destination: ${destination.id}`);
|
|
180
|
+
console.log(` Name: ${destination.name}`);
|
|
164
181
|
console.log(` URL: ${destination.config.url}`);
|
|
165
182
|
console.log(` Enabled: ${destination.enabled ? 'Yes' : 'No'}`);
|
|
166
183
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destinations.js","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/destinations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,GAE7B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,YAAY,EAAE,CAAC,CAAC,KAAK,CACpB,CAAC,CAAC,MAAM,CAAC;QACR,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;QAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;QACpB,UAAU,EAAE,CAAC,CAAC,MAAM,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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,OAAO,sCA8ClB,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { nackSubcommand } from './nack';
|
|
|
11
11
|
import { dlqSubcommand } from './dlq';
|
|
12
12
|
import { destinationsSubcommand } from './destinations';
|
|
13
13
|
import { sourcesSubcommand } from './sources';
|
|
14
|
+
import { consumersSubcommand } from './consumers';
|
|
14
15
|
import { pauseSubcommand } from './pause';
|
|
15
16
|
import { resumeSubcommand } from './resume';
|
|
16
17
|
import { statsSubcommand } from './stats';
|
|
@@ -55,6 +56,7 @@ export const command = createCommand({
|
|
|
55
56
|
dlqSubcommand,
|
|
56
57
|
destinationsSubcommand,
|
|
57
58
|
sourcesSubcommand,
|
|
59
|
+
consumersSubcommand,
|
|
58
60
|
pauseSubcommand,
|
|
59
61
|
resumeSubcommand,
|
|
60
62
|
statsSubcommand,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cmd/cloud/queue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,cAAc,EA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,EAAE;QACT;YACC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC;YACvC,WAAW,EAAE,iBAAiB;SAC9B;QACD;YACC,OAAO,EAAE,UAAU,CAAC,2CAA2C,CAAC;YAChE,WAAW,EAAE,uBAAuB;SACpC;QACD;YACC,OAAO,EAAE,UAAU,CAAC,qDAAqD,CAAC;YAC1E,WAAW,EAAE,mBAAmB;SAChC;QACD;YACC,OAAO,EAAE,UAAU,CAAC,8BAA8B,CAAC;YACnD,WAAW,EAAE,uCAAuC;SACpD;QACD;YACC,OAAO,EAAE,UAAU,CAAC,mBAAmB,CAAC;YACxC,WAAW,EAAE,+BAA+B;SAC5C;KACD;IACD,WAAW,EAAE;QACZ,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,gBAAgB;QAChB,iBAAiB;QACjB,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;QACb,cAAc;QACd,aAAa;QACb,sBAAsB;QACtB,iBAAiB;QACjB,mBAAmB;QACnB,eAAe;QACf,gBAAgB;QAChB,eAAe;KACf;IACD,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CACxB,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -702,9 +702,9 @@ export declare const BuildMetadataSchema: z.ZodObject<{
|
|
|
702
702
|
}>;
|
|
703
703
|
version: z.ZodString;
|
|
704
704
|
type: z.ZodEnum<{
|
|
705
|
+
email: "email";
|
|
705
706
|
stream: "stream";
|
|
706
707
|
api: "api";
|
|
707
|
-
email: "email";
|
|
708
708
|
sms: "sms";
|
|
709
709
|
cron: "cron";
|
|
710
710
|
websocket: "websocket";
|
|
@@ -786,8 +786,8 @@ export declare const BuildMetadataSchema: z.ZodObject<{
|
|
|
786
786
|
buildUrl: z.ZodOptional<z.ZodString>;
|
|
787
787
|
event: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
788
788
|
push: "push";
|
|
789
|
-
manual: "manual";
|
|
790
789
|
pull_request: "pull_request";
|
|
790
|
+
manual: "manual";
|
|
791
791
|
workflow: "workflow";
|
|
792
792
|
}>>>;
|
|
793
793
|
pull_request: z.ZodOptional<z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Agentuity employees and contributors",
|
|
6
6
|
"type": "module",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"prepublishOnly": "bun run clean && bun run build"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@agentuity/auth": "1.0.
|
|
45
|
-
"@agentuity/core": "1.0.
|
|
46
|
-
"@agentuity/server": "1.0.
|
|
44
|
+
"@agentuity/auth": "1.0.34",
|
|
45
|
+
"@agentuity/core": "1.0.34",
|
|
46
|
+
"@agentuity/server": "1.0.34",
|
|
47
47
|
"@datasert/cronjs-parser": "^1.4.0",
|
|
48
48
|
"@vitejs/plugin-react": "^5.1.2",
|
|
49
49
|
"acorn-loose": "^8.5.2",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"typescript": "^5.9.0",
|
|
61
61
|
"vite": "^7.2.7",
|
|
62
62
|
"zod": "^4.3.5",
|
|
63
|
-
"@agentuity/frontend": "1.0.
|
|
63
|
+
"@agentuity/frontend": "1.0.34"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@agentuity/test-utils": "1.0.
|
|
66
|
+
"@agentuity/test-utils": "1.0.34",
|
|
67
67
|
"@types/adm-zip": "^0.5.7",
|
|
68
68
|
"@types/bun": "latest",
|
|
69
69
|
"@types/tar-fs": "^2.0.4",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createCommand, createSubcommand } from '../../../types';
|
|
3
|
+
import * as tui from '../../../tui';
|
|
4
|
+
import { createQueueAPIClient, getQueueApiOptions } from './util';
|
|
5
|
+
import { getCommand } from '../../../command-prefix';
|
|
6
|
+
import { listConsumers, type Consumer } from '@agentuity/server';
|
|
7
|
+
|
|
8
|
+
const ConsumersListResponseSchema = z.object({
|
|
9
|
+
consumers: z.array(
|
|
10
|
+
z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
client_id: z.string().nullable().optional(),
|
|
13
|
+
durable: z.boolean(),
|
|
14
|
+
connected: z.boolean(),
|
|
15
|
+
ip_address: z.string().nullable().optional(),
|
|
16
|
+
last_offset: z.number().nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const listConsumersSubcommand = createSubcommand({
|
|
22
|
+
name: 'list',
|
|
23
|
+
aliases: ['ls'],
|
|
24
|
+
description: 'List consumers for a queue',
|
|
25
|
+
tags: ['read-only', 'fast', 'requires-auth'],
|
|
26
|
+
requires: { auth: true },
|
|
27
|
+
examples: [
|
|
28
|
+
{
|
|
29
|
+
command: getCommand('cloud queue consumers list my-queue'),
|
|
30
|
+
description: 'List queue consumers',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
schema: {
|
|
34
|
+
args: z.object({
|
|
35
|
+
queue_name: z.string().min(1).describe('Queue name'),
|
|
36
|
+
}),
|
|
37
|
+
response: ConsumersListResponseSchema,
|
|
38
|
+
},
|
|
39
|
+
idempotent: true,
|
|
40
|
+
|
|
41
|
+
async handler(ctx) {
|
|
42
|
+
const { args, options } = ctx;
|
|
43
|
+
const client = await createQueueAPIClient(ctx);
|
|
44
|
+
const consumers = await listConsumers(client, args.queue_name, getQueueApiOptions(ctx));
|
|
45
|
+
|
|
46
|
+
if (!options.json) {
|
|
47
|
+
if (consumers.length === 0) {
|
|
48
|
+
tui.info('No consumers connected');
|
|
49
|
+
} else {
|
|
50
|
+
const tableData = consumers.map((c: Consumer) => ({
|
|
51
|
+
ID: c.id,
|
|
52
|
+
'Client ID': c.client_id || '-',
|
|
53
|
+
Durable: c.durable ? 'Yes' : 'No',
|
|
54
|
+
Connected: c.disconnected_at ? 'No' : 'Yes',
|
|
55
|
+
'IP Address': c.ip_address || '-',
|
|
56
|
+
'Last Offset': c.last_offset != null ? String(c.last_offset) : '-',
|
|
57
|
+
}));
|
|
58
|
+
tui.table(tableData, [
|
|
59
|
+
'ID',
|
|
60
|
+
'Client ID',
|
|
61
|
+
'Durable',
|
|
62
|
+
'Connected',
|
|
63
|
+
'IP Address',
|
|
64
|
+
'Last Offset',
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
consumers: consumers.map((c: Consumer) => ({
|
|
71
|
+
id: c.id,
|
|
72
|
+
client_id: c.client_id || null,
|
|
73
|
+
durable: c.durable,
|
|
74
|
+
connected: !c.disconnected_at,
|
|
75
|
+
ip_address: c.ip_address || null,
|
|
76
|
+
last_offset: c.last_offset ?? null,
|
|
77
|
+
})),
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const consumersSubcommand = createCommand({
|
|
83
|
+
name: 'consumers',
|
|
84
|
+
aliases: ['consumer'],
|
|
85
|
+
description: 'Manage queue consumers (WebSocket subscriptions)',
|
|
86
|
+
tags: ['requires-auth'],
|
|
87
|
+
requires: { auth: true },
|
|
88
|
+
examples: [
|
|
89
|
+
{
|
|
90
|
+
command: getCommand('cloud queue consumers list my-queue'),
|
|
91
|
+
description: 'List consumers',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
subcommands: [listConsumersSubcommand],
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export default consumersSubcommand;
|
|
@@ -18,6 +18,8 @@ const DestinationsListResponseSchema = z.object({
|
|
|
18
18
|
destinations: z.array(
|
|
19
19
|
z.object({
|
|
20
20
|
id: z.string(),
|
|
21
|
+
name: z.string(),
|
|
22
|
+
description: z.string().nullable().optional(),
|
|
21
23
|
destination_type: z.string(),
|
|
22
24
|
url: z.string(),
|
|
23
25
|
enabled: z.boolean(),
|
|
@@ -57,18 +59,21 @@ const listDestinationsSubcommand = createSubcommand({
|
|
|
57
59
|
} else {
|
|
58
60
|
const tableData = destinations.map((d: Destination) => ({
|
|
59
61
|
ID: d.id,
|
|
62
|
+
Name: d.name,
|
|
60
63
|
Type: d.destination_type,
|
|
61
64
|
URL: d.config.url,
|
|
62
65
|
Enabled: d.enabled ? 'Yes' : 'No',
|
|
63
66
|
Created: new Date(d.created_at).toLocaleString(),
|
|
64
67
|
}));
|
|
65
|
-
tui.table(tableData, ['ID', 'Type', 'URL', 'Enabled', 'Created']);
|
|
68
|
+
tui.table(tableData, ['ID', 'Name', 'Type', 'URL', 'Enabled', 'Created']);
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
return {
|
|
70
73
|
destinations: destinations.map((d: Destination) => ({
|
|
71
74
|
id: d.id,
|
|
75
|
+
name: d.name,
|
|
76
|
+
description: d.description ?? null,
|
|
72
77
|
destination_type: d.destination_type,
|
|
73
78
|
url: d.config.url,
|
|
74
79
|
enabled: d.enabled,
|
|
@@ -86,7 +91,7 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
86
91
|
examples: [
|
|
87
92
|
{
|
|
88
93
|
command: getCommand(
|
|
89
|
-
'cloud queue destinations create my-queue --url https://example.com/webhook'
|
|
94
|
+
'cloud queue destinations create my-queue --name order-webhooks --url https://example.com/webhook'
|
|
90
95
|
),
|
|
91
96
|
description: 'Create a webhook destination',
|
|
92
97
|
},
|
|
@@ -96,6 +101,8 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
96
101
|
queue_name: z.string().min(1).describe('Queue name'),
|
|
97
102
|
}),
|
|
98
103
|
options: z.object({
|
|
104
|
+
name: z.string().min(1).describe('Destination name'),
|
|
105
|
+
description: z.string().optional().describe('Destination description'),
|
|
99
106
|
url: z.string().url().describe('Webhook URL'),
|
|
100
107
|
method: z.string().default('POST').optional().describe('HTTP method (default: POST)'),
|
|
101
108
|
timeout: z.coerce.number().optional().describe('Request timeout in milliseconds'),
|
|
@@ -112,6 +119,8 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
112
119
|
client,
|
|
113
120
|
args.queue_name,
|
|
114
121
|
{
|
|
122
|
+
name: opts.name,
|
|
123
|
+
description: opts.description,
|
|
115
124
|
destination_type: 'http',
|
|
116
125
|
config: {
|
|
117
126
|
url: opts.url,
|
|
@@ -125,6 +134,7 @@ const createDestinationSubcommand = createSubcommand({
|
|
|
125
134
|
|
|
126
135
|
if (!options.json) {
|
|
127
136
|
tui.success(`Created destination: ${destination.id}`);
|
|
137
|
+
console.log(` Name: ${destination.name}`);
|
|
128
138
|
console.log(` URL: ${destination.config.url}`);
|
|
129
139
|
console.log(` Method: ${destination.config.method}`);
|
|
130
140
|
}
|
|
@@ -149,7 +159,7 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
149
159
|
requires: { auth: true },
|
|
150
160
|
examples: [
|
|
151
161
|
{
|
|
152
|
-
command: getCommand('cloud queue destinations update my-queue
|
|
162
|
+
command: getCommand('cloud queue destinations update my-queue qdest_abc123 --disabled'),
|
|
153
163
|
description: 'Disable a destination',
|
|
154
164
|
},
|
|
155
165
|
],
|
|
@@ -159,6 +169,8 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
159
169
|
destination_id: z.string().min(1).describe('Destination ID'),
|
|
160
170
|
}),
|
|
161
171
|
options: z.object({
|
|
172
|
+
name: z.string().min(1).optional().describe('Destination name'),
|
|
173
|
+
description: z.string().optional().describe('Destination description'),
|
|
162
174
|
url: z.string().url().optional().describe('Webhook URL'),
|
|
163
175
|
method: z.string().optional().describe('HTTP method'),
|
|
164
176
|
timeout: z.coerce.number().optional().describe('Request timeout in milliseconds'),
|
|
@@ -173,10 +185,15 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
173
185
|
const client = await createQueueAPIClient(ctx);
|
|
174
186
|
|
|
175
187
|
const updateParams: {
|
|
188
|
+
name?: string;
|
|
189
|
+
description?: string | null;
|
|
176
190
|
config?: { url?: string; method?: string; timeout_ms?: number };
|
|
177
191
|
enabled?: boolean;
|
|
178
192
|
} = {};
|
|
179
193
|
|
|
194
|
+
if (opts.name !== undefined) updateParams.name = opts.name;
|
|
195
|
+
if (opts.description !== undefined) updateParams.description = opts.description || null;
|
|
196
|
+
|
|
180
197
|
if (opts.url || opts.method || opts.timeout !== undefined) {
|
|
181
198
|
updateParams.config = {};
|
|
182
199
|
if (opts.url) updateParams.config.url = opts.url;
|
|
@@ -202,6 +219,7 @@ const updateDestinationSubcommand = createSubcommand({
|
|
|
202
219
|
|
|
203
220
|
if (!options.json) {
|
|
204
221
|
tui.success(`Updated destination: ${destination.id}`);
|
|
222
|
+
console.log(` Name: ${destination.name}`);
|
|
205
223
|
console.log(` URL: ${destination.config.url}`);
|
|
206
224
|
console.log(` Enabled: ${destination.enabled ? 'Yes' : 'No'}`);
|
|
207
225
|
}
|
|
@@ -11,6 +11,7 @@ import { nackSubcommand } from './nack';
|
|
|
11
11
|
import { dlqSubcommand } from './dlq';
|
|
12
12
|
import { destinationsSubcommand } from './destinations';
|
|
13
13
|
import { sourcesSubcommand } from './sources';
|
|
14
|
+
import { consumersSubcommand } from './consumers';
|
|
14
15
|
import { pauseSubcommand } from './pause';
|
|
15
16
|
import { resumeSubcommand } from './resume';
|
|
16
17
|
import { statsSubcommand } from './stats';
|
|
@@ -56,6 +57,7 @@ export const command = createCommand({
|
|
|
56
57
|
dlqSubcommand,
|
|
57
58
|
destinationsSubcommand,
|
|
58
59
|
sourcesSubcommand,
|
|
60
|
+
consumersSubcommand,
|
|
59
61
|
pauseSubcommand,
|
|
60
62
|
resumeSubcommand,
|
|
61
63
|
statsSubcommand,
|