@agentuity/cli 1.0.32 → 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/catalyst.d.ts +3 -1
- package/dist/catalyst.d.ts.map +1 -1
- package/dist/catalyst.js +5 -1
- package/dist/catalyst.js.map +1 -1
- package/dist/cmd/cloud/db/create.d.ts.map +1 -1
- package/dist/cmd/cloud/db/create.js +8 -10
- package/dist/cmd/cloud/db/create.js.map +1 -1
- package/dist/cmd/cloud/db/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/db/delete.js +12 -14
- package/dist/cmd/cloud/db/delete.js.map +1 -1
- package/dist/cmd/cloud/db/get.d.ts.map +1 -1
- package/dist/cmd/cloud/db/get.js +7 -7
- package/dist/cmd/cloud/db/get.js.map +1 -1
- package/dist/cmd/cloud/db/list.d.ts.map +1 -1
- package/dist/cmd/cloud/db/list.js +5 -5
- package/dist/cmd/cloud/db/list.js.map +1 -1
- package/dist/cmd/cloud/db/logs.d.ts.map +1 -1
- package/dist/cmd/cloud/db/logs.js +7 -7
- package/dist/cmd/cloud/db/logs.js.map +1 -1
- package/dist/cmd/cloud/db/sql.js +5 -5
- package/dist/cmd/cloud/db/sql.js.map +1 -1
- package/dist/cmd/cloud/db/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/db/stats.js +5 -5
- package/dist/cmd/cloud/db/stats.js.map +1 -1
- package/dist/cmd/cloud/deploy.d.ts.map +1 -1
- package/dist/cmd/cloud/deploy.js +1 -1
- package/dist/cmd/cloud/deploy.js.map +1 -1
- package/dist/cmd/cloud/email/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/email/stats.js +5 -5
- package/dist/cmd/cloud/email/stats.js.map +1 -1
- package/dist/cmd/cloud/email/util.d.ts +2 -2
- package/dist/cmd/cloud/email/util.d.ts.map +1 -1
- package/dist/cmd/cloud/email/util.js +2 -2
- package/dist/cmd/cloud/email/util.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/util.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/util.js +1 -1
- package/dist/cmd/cloud/keyvalue/util.js.map +1 -1
- package/dist/cmd/cloud/machine/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/delete.js +6 -6
- package/dist/cmd/cloud/machine/delete.js.map +1 -1
- package/dist/cmd/cloud/machine/deployments.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/deployments.js +5 -5
- package/dist/cmd/cloud/machine/deployments.js.map +1 -1
- package/dist/cmd/cloud/machine/get.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/get.js +5 -5
- package/dist/cmd/cloud/machine/get.js.map +1 -1
- package/dist/cmd/cloud/machine/list.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/list.js +5 -5
- package/dist/cmd/cloud/machine/list.js.map +1 -1
- 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/cmd/cloud/queue/util.d.ts +1 -1
- package/dist/cmd/cloud/queue/util.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/util.js +1 -1
- package/dist/cmd/cloud/queue/util.js.map +1 -1
- package/dist/cmd/cloud/redis/get.js +5 -5
- package/dist/cmd/cloud/redis/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/get.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/get.js +4 -4
- package/dist/cmd/cloud/sandbox/execution/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/list.js +5 -5
- package/dist/cmd/cloud/sandbox/execution/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/runtime/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/runtime/list.js +4 -4
- package/dist/cmd/cloud/sandbox/runtime/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/build.js +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/build.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.js +5 -5
- package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/get.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/get.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/list.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/tag.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/tag.js.map +1 -1
- package/dist/cmd/cloud/sandbox/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/stats.js +5 -5
- package/dist/cmd/cloud/sandbox/stats.js.map +1 -1
- package/dist/cmd/cloud/sandbox/util.d.ts +3 -3
- package/dist/cmd/cloud/sandbox/util.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/util.js +5 -5
- package/dist/cmd/cloud/sandbox/util.js.map +1 -1
- package/dist/cmd/cloud/schedule/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/stats.js +5 -5
- package/dist/cmd/cloud/schedule/stats.js.map +1 -1
- package/dist/cmd/cloud/schedule/util.d.ts +1 -1
- package/dist/cmd/cloud/schedule/util.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/util.js +1 -1
- package/dist/cmd/cloud/schedule/util.js.map +1 -1
- package/dist/cmd/cloud/services/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/services/stats.js +5 -5
- package/dist/cmd/cloud/services/stats.js.map +1 -1
- package/dist/cmd/cloud/session/get.d.ts.map +1 -1
- package/dist/cmd/cloud/session/get.js +5 -5
- package/dist/cmd/cloud/session/get.js.map +1 -1
- package/dist/cmd/cloud/session/list.d.ts.map +1 -1
- package/dist/cmd/cloud/session/list.js +5 -5
- package/dist/cmd/cloud/session/list.js.map +1 -1
- package/dist/cmd/cloud/storage/config.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/config.js +7 -7
- package/dist/cmd/cloud/storage/config.js.map +1 -1
- package/dist/cmd/cloud/storage/create.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/create.js +8 -10
- package/dist/cmd/cloud/storage/create.js.map +1 -1
- package/dist/cmd/cloud/storage/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/delete.js +12 -14
- package/dist/cmd/cloud/storage/delete.js.map +1 -1
- package/dist/cmd/cloud/storage/download.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/download.js +6 -6
- package/dist/cmd/cloud/storage/download.js.map +1 -1
- package/dist/cmd/cloud/storage/get.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/get.js +6 -6
- package/dist/cmd/cloud/storage/get.js.map +1 -1
- package/dist/cmd/cloud/storage/list.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/list.js +6 -6
- package/dist/cmd/cloud/storage/list.js.map +1 -1
- package/dist/cmd/cloud/storage/upload.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/upload.js +7 -7
- package/dist/cmd/cloud/storage/upload.js.map +1 -1
- package/dist/cmd/cloud/stream/create.js +1 -1
- package/dist/cmd/cloud/stream/create.js.map +1 -1
- package/dist/cmd/cloud/stream/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/stats.js +5 -5
- package/dist/cmd/cloud/stream/stats.js.map +1 -1
- package/dist/cmd/cloud/task/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/task/stats.js +5 -5
- package/dist/cmd/cloud/task/stats.js.map +1 -1
- package/dist/cmd/cloud/task/util.d.ts +1 -1
- package/dist/cmd/cloud/task/util.d.ts.map +1 -1
- package/dist/cmd/cloud/task/util.js +2 -2
- package/dist/cmd/cloud/task/util.js.map +1 -1
- package/dist/cmd/cloud/thread/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/delete.js +5 -5
- package/dist/cmd/cloud/thread/delete.js.map +1 -1
- package/dist/cmd/cloud/thread/get.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/get.js +5 -5
- package/dist/cmd/cloud/thread/get.js.map +1 -1
- package/dist/cmd/cloud/thread/list.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/list.js +5 -5
- package/dist/cmd/cloud/thread/list.js.map +1 -1
- package/dist/cmd/cloud/vector/util.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/util.js +1 -1
- package/dist/cmd/cloud/vector/util.js.map +1 -1
- package/dist/cmd/cloud/webhook/util.d.ts +1 -1
- package/dist/cmd/cloud/webhook/util.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/util.js +1 -1
- package/dist/cmd/cloud/webhook/util.js.map +1 -1
- package/dist/cmd/git/api.d.ts +38 -0
- package/dist/cmd/git/api.d.ts.map +1 -1
- package/dist/cmd/git/api.js +55 -0
- package/dist/cmd/git/api.js.map +1 -1
- package/dist/cmd/project/add/database.js +8 -8
- package/dist/cmd/project/add/database.js.map +1 -1
- package/dist/cmd/project/add/storage.js +8 -8
- package/dist/cmd/project/add/storage.js.map +1 -1
- package/dist/cmd/project/auth/init.d.ts.map +1 -1
- package/dist/cmd/project/auth/init.js +7 -6
- package/dist/cmd/project/auth/init.js.map +1 -1
- package/dist/cmd/project/auth/shared.d.ts +2 -3
- package/dist/cmd/project/auth/shared.d.ts.map +1 -1
- package/dist/cmd/project/auth/shared.js +7 -7
- package/dist/cmd/project/auth/shared.js.map +1 -1
- package/dist/cmd/project/download.d.ts +12 -1
- package/dist/cmd/project/download.d.ts.map +1 -1
- package/dist/cmd/project/download.js +37 -14
- package/dist/cmd/project/download.js.map +1 -1
- package/dist/cmd/project/import.d.ts.map +1 -1
- package/dist/cmd/project/import.js +67 -9
- package/dist/cmd/project/import.js.map +1 -1
- package/dist/cmd/project/remote-import.d.ts +41 -0
- package/dist/cmd/project/remote-import.d.ts.map +1 -0
- package/dist/cmd/project/remote-import.js +1074 -0
- package/dist/cmd/project/remote-import.js.map +1 -0
- package/dist/cmd/project/template-flow.d.ts +1 -1
- package/dist/cmd/project/template-flow.d.ts.map +1 -1
- package/dist/cmd/project/template-flow.js +27 -11
- package/dist/cmd/project/template-flow.js.map +1 -1
- package/dist/config.d.ts +29 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -14
- package/dist/config.js.map +1 -1
- package/dist/schema-parser.d.ts.map +1 -1
- package/dist/schema-parser.js +47 -5
- package/dist/schema-parser.js.map +1 -1
- package/dist/types.d.ts +27 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +42 -0
- package/dist/types.js.map +1 -1
- package/package.json +6 -6
- package/src/catalyst.ts +9 -1
- package/src/cmd/cloud/db/create.ts +8 -9
- package/src/cmd/cloud/db/delete.ts +18 -13
- package/src/cmd/cloud/db/get.ts +13 -7
- package/src/cmd/cloud/db/list.ts +11 -5
- package/src/cmd/cloud/db/logs.ts +13 -7
- package/src/cmd/cloud/db/sql.ts +5 -5
- package/src/cmd/cloud/db/stats.ts +11 -5
- package/src/cmd/cloud/deploy.ts +7 -1
- package/src/cmd/cloud/email/stats.ts +11 -5
- package/src/cmd/cloud/email/util.ts +4 -4
- package/src/cmd/cloud/keyvalue/util.ts +2 -2
- package/src/cmd/cloud/machine/delete.ts +12 -6
- package/src/cmd/cloud/machine/deployments.ts +11 -5
- package/src/cmd/cloud/machine/get.ts +11 -5
- package/src/cmd/cloud/machine/list.ts +11 -5
- 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
- package/src/cmd/cloud/queue/util.ts +2 -2
- package/src/cmd/cloud/redis/get.ts +5 -5
- package/src/cmd/cloud/sandbox/execution/get.ts +10 -4
- package/src/cmd/cloud/sandbox/execution/list.ts +6 -5
- package/src/cmd/cloud/sandbox/runtime/list.ts +10 -4
- package/src/cmd/cloud/sandbox/snapshot/build.ts +1 -1
- package/src/cmd/cloud/sandbox/snapshot/create.ts +12 -5
- package/src/cmd/cloud/sandbox/snapshot/delete.ts +10 -4
- package/src/cmd/cloud/sandbox/snapshot/get.ts +12 -6
- package/src/cmd/cloud/sandbox/snapshot/list.ts +10 -4
- package/src/cmd/cloud/sandbox/snapshot/tag.ts +10 -4
- package/src/cmd/cloud/sandbox/stats.ts +11 -5
- package/src/cmd/cloud/sandbox/util.ts +14 -7
- package/src/cmd/cloud/schedule/stats.ts +11 -5
- package/src/cmd/cloud/schedule/util.ts +3 -3
- package/src/cmd/cloud/services/stats.ts +13 -7
- package/src/cmd/cloud/session/get.ts +14 -8
- package/src/cmd/cloud/session/list.ts +11 -5
- package/src/cmd/cloud/storage/config.ts +24 -12
- package/src/cmd/cloud/storage/create.ts +8 -9
- package/src/cmd/cloud/storage/delete.ts +18 -13
- package/src/cmd/cloud/storage/download.ts +12 -6
- package/src/cmd/cloud/storage/get.ts +12 -6
- package/src/cmd/cloud/storage/list.ts +12 -6
- package/src/cmd/cloud/storage/upload.ts +13 -7
- package/src/cmd/cloud/stream/create.ts +1 -1
- package/src/cmd/cloud/stream/stats.ts +11 -5
- package/src/cmd/cloud/task/stats.ts +11 -5
- package/src/cmd/cloud/task/util.ts +4 -4
- package/src/cmd/cloud/thread/delete.ts +11 -5
- package/src/cmd/cloud/thread/get.ts +11 -5
- package/src/cmd/cloud/thread/list.ts +11 -5
- package/src/cmd/cloud/vector/util.ts +2 -2
- package/src/cmd/cloud/webhook/util.ts +2 -2
- package/src/cmd/git/api.ts +127 -0
- package/src/cmd/project/add/database.ts +9 -9
- package/src/cmd/project/add/storage.ts +9 -9
- package/src/cmd/project/auth/init.ts +11 -10
- package/src/cmd/project/auth/shared.ts +15 -10
- package/src/cmd/project/download.ts +52 -16
- package/src/cmd/project/import.ts +71 -9
- package/src/cmd/project/remote-import.ts +1347 -0
- package/src/cmd/project/template-flow.ts +38 -22
- package/src/config.ts +23 -18
- package/src/schema-parser.ts +48 -5
- package/src/types.ts +45 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { EmailStorageService, type Logger } from '@agentuity/core';
|
|
3
2
|
import { createServerFetchAdapter } from '@agentuity/server';
|
|
4
|
-
import
|
|
3
|
+
import { z } from 'zod';
|
|
5
4
|
import { getCatalystUrl } from '../../../catalyst';
|
|
6
5
|
import { defaultProfileName, getDefaultRegion } from '../../../config';
|
|
7
6
|
import * as tui from '../../../tui';
|
|
7
|
+
import type { AuthData, Config, GlobalOptions } from '../../../types';
|
|
8
8
|
|
|
9
9
|
export type {
|
|
10
10
|
EmailAddress,
|
|
11
|
+
EmailAttachment,
|
|
11
12
|
EmailDestination,
|
|
12
13
|
EmailInbound,
|
|
13
14
|
EmailOutbound,
|
|
14
|
-
EmailAttachment,
|
|
15
15
|
EmailSendParams,
|
|
16
16
|
} from '@agentuity/core';
|
|
17
17
|
|
|
@@ -63,6 +63,6 @@ export async function createEmailAdapter(ctx: EmailContext, region?: string) {
|
|
|
63
63
|
|
|
64
64
|
const resolvedRegion =
|
|
65
65
|
region ?? (await getDefaultRegion(ctx.config?.name ?? defaultProfileName, ctx.config));
|
|
66
|
-
const baseUrl = getCatalystUrl(resolvedRegion);
|
|
66
|
+
const baseUrl = getCatalystUrl(resolvedRegion, ctx.config?.overrides);
|
|
67
67
|
return new EmailStorageService(baseUrl, adapter);
|
|
68
68
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { KeyValueStorageService, type Logger } from '@agentuity/core';
|
|
2
2
|
import { createServerFetchAdapter } from '@agentuity/server';
|
|
3
|
-
import type { AuthData, Config, GlobalOptions, ProjectConfig } from '../../../types';
|
|
4
3
|
import { getCatalystUrl } from '../../../catalyst';
|
|
5
4
|
import * as tui from '../../../tui';
|
|
5
|
+
import type { AuthData, Config, GlobalOptions, ProjectConfig } from '../../../types';
|
|
6
6
|
|
|
7
7
|
export function createStorageAdapter(
|
|
8
8
|
ctx: {
|
|
@@ -36,6 +36,6 @@ export function createStorageAdapter(
|
|
|
36
36
|
ctx.logger
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
const baseUrl = getCatalystUrl(ctx.region);
|
|
39
|
+
const baseUrl = getCatalystUrl(ctx.region, ctx.config?.overrides);
|
|
40
40
|
return new KeyValueStorageService(baseUrl, adapter);
|
|
41
41
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { createSubcommand } from '../../../types';
|
|
3
|
-
import * as tui from '../../../tui';
|
|
4
1
|
import { machineDelete, machineGet } from '@agentuity/server';
|
|
2
|
+
import enquirer from 'enquirer';
|
|
3
|
+
import { z } from 'zod';
|
|
5
4
|
import { getCommand } from '../../../command-prefix';
|
|
6
|
-
import { ErrorCode } from '../../../errors';
|
|
7
5
|
import { getGlobalCatalystAPIClient } from '../../../config';
|
|
8
|
-
import
|
|
6
|
+
import { ErrorCode } from '../../../errors';
|
|
7
|
+
import * as tui from '../../../tui';
|
|
8
|
+
import { createSubcommand } from '../../../types';
|
|
9
9
|
|
|
10
10
|
const MachineDeleteResponseSchema = z.object({
|
|
11
11
|
success: z.boolean().describe('Whether the deletion succeeded'),
|
|
@@ -41,7 +41,13 @@ export const deleteSubcommand = createSubcommand({
|
|
|
41
41
|
async handler(ctx) {
|
|
42
42
|
const { args, opts, options, logger, auth, config, orgId } = ctx;
|
|
43
43
|
|
|
44
|
-
const catalystClient = await getGlobalCatalystAPIClient(
|
|
44
|
+
const catalystClient = await getGlobalCatalystAPIClient(
|
|
45
|
+
logger,
|
|
46
|
+
auth,
|
|
47
|
+
config?.name,
|
|
48
|
+
orgId,
|
|
49
|
+
config
|
|
50
|
+
);
|
|
45
51
|
|
|
46
52
|
try {
|
|
47
53
|
const machine = await machineGet(catalystClient, args.machine_id);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { createSubcommand } from '../../../types';
|
|
3
|
-
import * as tui from '../../../tui';
|
|
4
1
|
import { machineDeployments } from '@agentuity/server';
|
|
2
|
+
import { z } from 'zod';
|
|
5
3
|
import { getCommand } from '../../../command-prefix';
|
|
6
|
-
import { ErrorCode } from '../../../errors';
|
|
7
4
|
import { getGlobalCatalystAPIClient } from '../../../config';
|
|
5
|
+
import { ErrorCode } from '../../../errors';
|
|
6
|
+
import * as tui from '../../../tui';
|
|
7
|
+
import { createSubcommand } from '../../../types';
|
|
8
8
|
|
|
9
9
|
const MachineDeploymentResponseSchema = z.array(
|
|
10
10
|
z.object({
|
|
@@ -41,7 +41,13 @@ export const deploymentsSubcommand = createSubcommand({
|
|
|
41
41
|
async handler(ctx) {
|
|
42
42
|
const { args, options, logger, auth, config, orgId } = ctx;
|
|
43
43
|
|
|
44
|
-
const catalystClient = await getGlobalCatalystAPIClient(
|
|
44
|
+
const catalystClient = await getGlobalCatalystAPIClient(
|
|
45
|
+
logger,
|
|
46
|
+
auth,
|
|
47
|
+
config?.name,
|
|
48
|
+
orgId,
|
|
49
|
+
config
|
|
50
|
+
);
|
|
45
51
|
|
|
46
52
|
try {
|
|
47
53
|
const deployments = await machineDeployments(catalystClient, args.machine_id);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { createSubcommand } from '../../../types';
|
|
3
|
-
import * as tui from '../../../tui';
|
|
4
1
|
import { machineGet } from '@agentuity/server';
|
|
2
|
+
import { z } from 'zod';
|
|
5
3
|
import { getCommand } from '../../../command-prefix';
|
|
6
|
-
import { ErrorCode } from '../../../errors';
|
|
7
4
|
import { getGlobalCatalystAPIClient } from '../../../config';
|
|
5
|
+
import { ErrorCode } from '../../../errors';
|
|
6
|
+
import * as tui from '../../../tui';
|
|
7
|
+
import { createSubcommand } from '../../../types';
|
|
8
8
|
|
|
9
9
|
const MachineGetResponseSchema = z.object({
|
|
10
10
|
id: z.string().describe('Machine ID'),
|
|
@@ -46,7 +46,13 @@ export const getSubcommand = createSubcommand({
|
|
|
46
46
|
async handler(ctx) {
|
|
47
47
|
const { args, options, logger, auth, config, orgId } = ctx;
|
|
48
48
|
|
|
49
|
-
const catalystClient = await getGlobalCatalystAPIClient(
|
|
49
|
+
const catalystClient = await getGlobalCatalystAPIClient(
|
|
50
|
+
logger,
|
|
51
|
+
auth,
|
|
52
|
+
config?.name,
|
|
53
|
+
orgId,
|
|
54
|
+
config
|
|
55
|
+
);
|
|
50
56
|
|
|
51
57
|
try {
|
|
52
58
|
const machine = await machineGet(catalystClient, args.machine_id);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { createSubcommand } from '../../../types';
|
|
3
|
-
import * as tui from '../../../tui';
|
|
4
1
|
import { machineList } from '@agentuity/server';
|
|
2
|
+
import { z } from 'zod';
|
|
5
3
|
import { getCommand } from '../../../command-prefix';
|
|
6
|
-
import { ErrorCode } from '../../../errors';
|
|
7
4
|
import { getGlobalCatalystAPIClient } from '../../../config';
|
|
5
|
+
import { ErrorCode } from '../../../errors';
|
|
6
|
+
import * as tui from '../../../tui';
|
|
7
|
+
import { createSubcommand } from '../../../types';
|
|
8
8
|
|
|
9
9
|
const MachineListResponseSchema = z.array(
|
|
10
10
|
z.object({
|
|
@@ -43,7 +43,13 @@ export const listSubcommand = createSubcommand({
|
|
|
43
43
|
async handler(ctx) {
|
|
44
44
|
const { options, opts, logger, auth, config } = ctx;
|
|
45
45
|
|
|
46
|
-
const catalystClient = await getGlobalCatalystAPIClient(
|
|
46
|
+
const catalystClient = await getGlobalCatalystAPIClient(
|
|
47
|
+
logger,
|
|
48
|
+
auth,
|
|
49
|
+
config?.name,
|
|
50
|
+
undefined,
|
|
51
|
+
config
|
|
52
|
+
);
|
|
47
53
|
|
|
48
54
|
try {
|
|
49
55
|
const machines = await machineList(catalystClient, { orgId: opts?.orgId });
|
|
@@ -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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from '@agentuity/core';
|
|
2
|
-
import { APIClient,
|
|
2
|
+
import type { APIClient, QueueApiOptions } from '@agentuity/server';
|
|
3
3
|
import { getGlobalCatalystAPIClient } from '../../../config';
|
|
4
4
|
import type { AuthData, Config, GlobalOptions } from '../../../types';
|
|
5
5
|
|
|
@@ -21,7 +21,7 @@ export interface QueueContext {
|
|
|
21
21
|
* Uses the global Catalyst API client with user authentication.
|
|
22
22
|
*/
|
|
23
23
|
export async function createQueueAPIClient(ctx: QueueContext): Promise<APIClient> {
|
|
24
|
-
return getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name);
|
|
24
|
+
return getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name, undefined, ctx.config);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { listResources } from '@agentuity/server';
|
|
3
|
-
import {
|
|
4
|
-
import * as tui from '../../../tui';
|
|
5
|
-
import { getCatalystAPIClient } from '../../../config';
|
|
2
|
+
import { z } from 'zod';
|
|
6
3
|
import { getCommand } from '../../../command-prefix';
|
|
4
|
+
import { getCatalystAPIClient } from '../../../config';
|
|
5
|
+
import * as tui from '../../../tui';
|
|
6
|
+
import { createSubcommand } from '../../../types';
|
|
7
7
|
|
|
8
8
|
const RedisGetResponseSchema = z.object({
|
|
9
9
|
url: z.string().optional().describe('Redis connection URL'),
|
|
@@ -42,7 +42,7 @@ export const showSubcommand = createSubcommand({
|
|
|
42
42
|
async handler(ctx) {
|
|
43
43
|
const { logger, opts, options, orgId, region, auth } = ctx;
|
|
44
44
|
|
|
45
|
-
const catalystClient = getCatalystAPIClient(logger, auth, region);
|
|
45
|
+
const catalystClient = getCatalystAPIClient(logger, auth, region, undefined, ctx.config);
|
|
46
46
|
|
|
47
47
|
const resources = await tui.spinner({
|
|
48
48
|
message: `Fetching Redis for ${orgId} in ${region}`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { executionGet } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
3
|
import { getCommand } from '../../../../command-prefix';
|
|
5
|
-
import { executionGet } from '@agentuity/server';
|
|
6
4
|
import { getGlobalCatalystAPIClient } from '../../../../config';
|
|
5
|
+
import * as tui from '../../../../tui';
|
|
6
|
+
import { createCommand } from '../../../../types';
|
|
7
7
|
|
|
8
8
|
const ExecutionGetResponseSchema = z.object({
|
|
9
9
|
executionId: z.string().describe('Execution ID'),
|
|
@@ -41,7 +41,13 @@ export const getSubcommand = createCommand({
|
|
|
41
41
|
|
|
42
42
|
async handler(ctx) {
|
|
43
43
|
const { args, options, auth, logger, orgId, config } = ctx;
|
|
44
|
-
const client = await getGlobalCatalystAPIClient(
|
|
44
|
+
const client = await getGlobalCatalystAPIClient(
|
|
45
|
+
logger,
|
|
46
|
+
auth,
|
|
47
|
+
config?.name,
|
|
48
|
+
undefined,
|
|
49
|
+
config
|
|
50
|
+
);
|
|
45
51
|
|
|
46
52
|
const result = await executionGet(client, { executionId: args.executionId, orgId });
|
|
47
53
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { executionList } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
|
-
import { getSandboxRegion, createSandboxClient } from '../util';
|
|
5
3
|
import { getCommand } from '../../../../command-prefix';
|
|
6
|
-
import
|
|
4
|
+
import * as tui from '../../../../tui';
|
|
5
|
+
import { createCommand } from '../../../../types';
|
|
6
|
+
import { createSandboxClient, getSandboxRegion } from '../util';
|
|
7
7
|
|
|
8
8
|
const ExecutionInfoSchema = z.object({
|
|
9
9
|
executionId: z.string().describe('Execution ID'),
|
|
@@ -56,7 +56,8 @@ export const listSubcommand = createCommand({
|
|
|
56
56
|
auth,
|
|
57
57
|
config?.name,
|
|
58
58
|
args.sandboxId,
|
|
59
|
-
effectiveOrgId
|
|
59
|
+
effectiveOrgId,
|
|
60
|
+
config
|
|
60
61
|
);
|
|
61
62
|
const client = createSandboxClient(logger, auth, region);
|
|
62
63
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { runtimeList } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
3
|
import { getCommand } from '../../../../command-prefix';
|
|
5
|
-
import { runtimeList } from '@agentuity/server';
|
|
6
4
|
import { getGlobalCatalystAPIClient } from '../../../../config';
|
|
5
|
+
import * as tui from '../../../../tui';
|
|
6
|
+
import { createCommand } from '../../../../types';
|
|
7
7
|
|
|
8
8
|
const RuntimeInfoSchema = z.object({
|
|
9
9
|
id: z.string().describe('Runtime ID'),
|
|
@@ -45,7 +45,13 @@ export const listSubcommand = createCommand({
|
|
|
45
45
|
|
|
46
46
|
async handler(ctx) {
|
|
47
47
|
const { opts, options, orgId: ctxOrgId, logger, auth, config } = ctx;
|
|
48
|
-
const client = await getGlobalCatalystAPIClient(
|
|
48
|
+
const client = await getGlobalCatalystAPIClient(
|
|
49
|
+
logger,
|
|
50
|
+
auth,
|
|
51
|
+
config?.name,
|
|
52
|
+
undefined,
|
|
53
|
+
config
|
|
54
|
+
);
|
|
49
55
|
const effectiveOrgId = opts?.orgId || ctxOrgId;
|
|
50
56
|
|
|
51
57
|
const result = await runtimeList(client, {
|
|
@@ -757,7 +757,7 @@ export const buildSubcommand = createCommand({
|
|
|
757
757
|
const archiveFile = Bun.file(archivePath);
|
|
758
758
|
const archiveSize = archiveFile.size;
|
|
759
759
|
|
|
760
|
-
const client = getCatalystAPIClient(logger, auth, region);
|
|
760
|
+
const client = getCatalystAPIClient(logger, auth, region, undefined, config);
|
|
761
761
|
|
|
762
762
|
// Auto-detect git info and merge with CLI overrides
|
|
763
763
|
const autoDetectedGit = await getGitInfo(directory, logger);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { snapshotCreate } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
|
-
import { getSandboxRegion, createSandboxClient } from '../util';
|
|
5
3
|
import { getCommand } from '../../../../command-prefix';
|
|
6
|
-
import
|
|
4
|
+
import * as tui from '../../../../tui';
|
|
5
|
+
import { createCommand } from '../../../../types';
|
|
6
|
+
import { createSandboxClient, getSandboxRegion } from '../util';
|
|
7
7
|
|
|
8
8
|
const SNAPSHOT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
|
|
9
9
|
const SNAPSHOT_TAG_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
|
|
@@ -87,7 +87,14 @@ export const createSubcommand = createCommand({
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
const profileName = config?.name;
|
|
90
|
-
const region = await getSandboxRegion(
|
|
90
|
+
const region = await getSandboxRegion(
|
|
91
|
+
logger,
|
|
92
|
+
auth,
|
|
93
|
+
profileName,
|
|
94
|
+
args.sandboxId,
|
|
95
|
+
orgId,
|
|
96
|
+
config
|
|
97
|
+
);
|
|
91
98
|
const client = createSandboxClient(logger, auth, region);
|
|
92
99
|
|
|
93
100
|
const snapshot = await snapshotCreate(client, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { snapshotDelete } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
3
|
import { getCommand } from '../../../../command-prefix';
|
|
5
|
-
import { snapshotDelete } from '@agentuity/server';
|
|
6
4
|
import { getGlobalCatalystAPIClient } from '../../../../config';
|
|
5
|
+
import * as tui from '../../../../tui';
|
|
6
|
+
import { createCommand } from '../../../../types';
|
|
7
7
|
|
|
8
8
|
const SnapshotDeleteResponseSchema = z.object({
|
|
9
9
|
success: z.boolean().describe('Whether the operation succeeded'),
|
|
@@ -53,7 +53,13 @@ export const deleteSubcommand = createCommand({
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
const client = await getGlobalCatalystAPIClient(
|
|
56
|
+
const client = await getGlobalCatalystAPIClient(
|
|
57
|
+
logger,
|
|
58
|
+
auth,
|
|
59
|
+
config?.name,
|
|
60
|
+
undefined,
|
|
61
|
+
config
|
|
62
|
+
);
|
|
57
63
|
|
|
58
64
|
await snapshotDelete(client, {
|
|
59
65
|
snapshotId: args.snapshotId,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { SandboxInfo } from '@agentuity/core';
|
|
2
|
+
import type { SnapshotFileInfo } from '@agentuity/server';
|
|
3
|
+
import { sandboxList, snapshotGet } from '@agentuity/server';
|
|
1
4
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
5
|
import { getCommand } from '../../../../command-prefix';
|
|
5
|
-
import { snapshotGet, sandboxList } from '@agentuity/server';
|
|
6
|
-
import type { SnapshotFileInfo } from '@agentuity/server';
|
|
7
|
-
import type { SandboxInfo } from '@agentuity/core';
|
|
8
6
|
import { getGlobalCatalystAPIClient } from '../../../../config';
|
|
7
|
+
import * as tui from '../../../../tui';
|
|
8
|
+
import { createCommand } from '../../../../types';
|
|
9
9
|
|
|
10
10
|
const SnapshotFileSchema = z.object({
|
|
11
11
|
path: z.string(),
|
|
@@ -87,7 +87,13 @@ export const getSubcommand = createCommand({
|
|
|
87
87
|
|
|
88
88
|
async handler(ctx) {
|
|
89
89
|
const { args, options, auth, logger, orgId, config } = ctx;
|
|
90
|
-
const client = await getGlobalCatalystAPIClient(
|
|
90
|
+
const client = await getGlobalCatalystAPIClient(
|
|
91
|
+
logger,
|
|
92
|
+
auth,
|
|
93
|
+
config?.name,
|
|
94
|
+
undefined,
|
|
95
|
+
config
|
|
96
|
+
);
|
|
91
97
|
|
|
92
98
|
const snapshot = await snapshotGet(client, {
|
|
93
99
|
snapshotId: args.snapshotId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { snapshotList } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
3
|
import { getCommand } from '../../../../command-prefix';
|
|
5
|
-
import { snapshotList } from '@agentuity/server';
|
|
6
4
|
import { getGlobalCatalystAPIClient } from '../../../../config';
|
|
5
|
+
import * as tui from '../../../../tui';
|
|
6
|
+
import { createCommand } from '../../../../types';
|
|
7
7
|
|
|
8
8
|
const SnapshotInfoSchema = z.object({
|
|
9
9
|
snapshotId: z.string(),
|
|
@@ -58,7 +58,13 @@ export const listSubcommand = createCommand({
|
|
|
58
58
|
|
|
59
59
|
async handler(ctx) {
|
|
60
60
|
const { opts, options, orgId: ctxOrgId, logger, auth, config } = ctx;
|
|
61
|
-
const client = await getGlobalCatalystAPIClient(
|
|
61
|
+
const client = await getGlobalCatalystAPIClient(
|
|
62
|
+
logger,
|
|
63
|
+
auth,
|
|
64
|
+
config?.name,
|
|
65
|
+
undefined,
|
|
66
|
+
config
|
|
67
|
+
);
|
|
62
68
|
const effectiveOrgId = opts?.orgId || ctxOrgId;
|
|
63
69
|
|
|
64
70
|
const result = await snapshotList(client, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { snapshotTag } from '@agentuity/server';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { createCommand } from '../../../../types';
|
|
3
|
-
import * as tui from '../../../../tui';
|
|
4
3
|
import { getCommand } from '../../../../command-prefix';
|
|
5
|
-
import { snapshotTag } from '@agentuity/server';
|
|
6
4
|
import { getGlobalCatalystAPIClient } from '../../../../config';
|
|
5
|
+
import * as tui from '../../../../tui';
|
|
6
|
+
import { createCommand } from '../../../../types';
|
|
7
7
|
|
|
8
8
|
const SNAPSHOT_TAG_REGEX = /^[a-zA-Z0-9_][a-zA-Z0-9._-]*$/;
|
|
9
9
|
const MAX_SNAPSHOT_TAG_LENGTH = 128;
|
|
@@ -41,7 +41,13 @@ export const tagSubcommand = createCommand({
|
|
|
41
41
|
|
|
42
42
|
async handler(ctx) {
|
|
43
43
|
const { args, opts, options, auth, logger, orgId, config } = ctx;
|
|
44
|
-
const client = await getGlobalCatalystAPIClient(
|
|
44
|
+
const client = await getGlobalCatalystAPIClient(
|
|
45
|
+
logger,
|
|
46
|
+
auth,
|
|
47
|
+
config?.name,
|
|
48
|
+
undefined,
|
|
49
|
+
config
|
|
50
|
+
);
|
|
45
51
|
|
|
46
52
|
if (!args.tag && !opts.clear) {
|
|
47
53
|
throw new Error('Either provide a tag name or use --clear to remove the tag');
|