@guildai/cli 0.11.0 → 0.12.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/dist/auth-CRMO5O3N.js +29 -0
- package/dist/auth-CRMO5O3N.js.map +7 -0
- package/dist/chat-5VX2WJH2.js +303 -0
- package/dist/chat-5VX2WJH2.js.map +7 -0
- package/dist/chat-SIKDYZQK.js +31 -0
- package/dist/chat-SIKDYZQK.js.map +7 -0
- package/dist/chunk-56YCMGL3.js +522 -0
- package/dist/chunk-56YCMGL3.js.map +7 -0
- package/dist/chunk-6EX6E7WP.js +7042 -0
- package/dist/chunk-6EX6E7WP.js.map +7 -0
- package/dist/chunk-B7VAF5UG.js +532 -0
- package/dist/chunk-B7VAF5UG.js.map +7 -0
- package/dist/chunk-DOIYVBNY.js +3057 -0
- package/dist/chunk-DOIYVBNY.js.map +7 -0
- package/dist/chunk-ENKEEJ45.js +17 -0
- package/dist/chunk-ENKEEJ45.js.map +7 -0
- package/dist/chunk-IBRKVGMZ.js +97041 -0
- package/dist/chunk-IBRKVGMZ.js.map +7 -0
- package/dist/chunk-LFMQJOKC.js +19778 -0
- package/dist/chunk-LFMQJOKC.js.map +7 -0
- package/dist/chunk-M347HP6M.js +22896 -0
- package/dist/chunk-M347HP6M.js.map +7 -0
- package/dist/chunk-OYQ476FQ.js +44 -0
- package/dist/chunk-OYQ476FQ.js.map +7 -0
- package/dist/chunk-PNCUR4OB.js +257 -0
- package/dist/chunk-PNCUR4OB.js.map +7 -0
- package/dist/chunk-RIG2HZWM.js +317 -0
- package/dist/chunk-RIG2HZWM.js.map +7 -0
- package/dist/chunk-SPZPZXUN.js +826 -0
- package/dist/chunk-SPZPZXUN.js.map +7 -0
- package/dist/chunk-VVSOU6ON.js +53 -0
- package/dist/chunk-VVSOU6ON.js.map +7 -0
- package/dist/chunk-X3ADGWOF.js +3643 -0
- package/dist/chunk-X3ADGWOF.js.map +7 -0
- package/dist/commands/skill/create.d.ts +3 -0
- package/dist/commands/skill/get.d.ts +3 -0
- package/dist/commands/skill/list.d.ts +3 -0
- package/dist/commands/skill/update.d.ts +3 -0
- package/dist/commands/skill/version/create.d.ts +3 -0
- package/dist/commands/skill/version/get.d.ts +3 -0
- package/dist/commands/skill/version/list.d.ts +3 -0
- package/dist/devtools-AO7YSDOD.js +67 -0
- package/dist/devtools-AO7YSDOD.js.map +7 -0
- package/dist/dist-4CBK6X5H.js +1566 -0
- package/dist/dist-4CBK6X5H.js.map +7 -0
- package/dist/esm-FRAVZP4J.js +13 -0
- package/dist/esm-FRAVZP4J.js.map +7 -0
- package/dist/execa-XQMWSABC.js +35 -0
- package/dist/execa-XQMWSABC.js.map +7 -0
- package/dist/index.js +8230 -263
- package/dist/index.js.map +7 -0
- package/dist/lib/api-types.d.ts +44 -0
- package/dist/lib/config.d.ts +9 -0
- package/dist/lib/errors.d.ts +1 -1
- package/dist/lib/output.d.ts +11 -1
- package/dist/lib/session-events.d.ts +1 -1
- package/dist/lib/session-polling.d.ts +24 -1
- package/dist/lib/websocket-client.d.ts +46 -0
- package/dist/open-RF4X5MOP.js +13 -0
- package/dist/open-RF4X5MOP.js.map +7 -0
- package/dist/server-JYVH64FD.js +27659 -0
- package/dist/server-JYVH64FD.js.map +7 -0
- package/dist/test-SNIYRJ32.js +692 -0
- package/dist/test-SNIYRJ32.js.map +7 -0
- package/docs/skills/codex-agent-dev.md +2 -2
- package/package.json +8 -12
- package/dist/commands/agent/chat.js +0 -281
- package/dist/commands/agent/clone.js +0 -118
- package/dist/commands/agent/code.js +0 -87
- package/dist/commands/agent/fork.js +0 -220
- package/dist/commands/agent/get.js +0 -37
- package/dist/commands/agent/grep.js +0 -107
- package/dist/commands/agent/init.js +0 -403
- package/dist/commands/agent/list.js +0 -110
- package/dist/commands/agent/logs.js +0 -62
- package/dist/commands/agent/owners.js +0 -74
- package/dist/commands/agent/publish.js +0 -91
- package/dist/commands/agent/pull.js +0 -194
- package/dist/commands/agent/revalidate.js +0 -56
- package/dist/commands/agent/save.js +0 -345
- package/dist/commands/agent/search.js +0 -61
- package/dist/commands/agent/tags/add.js +0 -73
- package/dist/commands/agent/tags/list.js +0 -43
- package/dist/commands/agent/tags/remove.js +0 -84
- package/dist/commands/agent/tags/set.js +0 -71
- package/dist/commands/agent/test.js +0 -489
- package/dist/commands/agent/unpublish.js +0 -64
- package/dist/commands/agent/update.js +0 -118
- package/dist/commands/agent/versions.js +0 -55
- package/dist/commands/agent/workspaces.js +0 -54
- package/dist/commands/auth/login.js +0 -31
- package/dist/commands/auth/logout.js +0 -24
- package/dist/commands/auth/status.js +0 -38
- package/dist/commands/auth/token.js +0 -19
- package/dist/commands/chat.js +0 -1416
- package/dist/commands/config/get.js +0 -64
- package/dist/commands/config/list.js +0 -46
- package/dist/commands/config/path.js +0 -37
- package/dist/commands/config/set.js +0 -132
- package/dist/commands/credentials/endpoint-list.js +0 -88
- package/dist/commands/credentials/list.js +0 -50
- package/dist/commands/credentials/policy-create.js +0 -66
- package/dist/commands/credentials/policy-delete.js +0 -33
- package/dist/commands/credentials/policy-list.js +0 -45
- package/dist/commands/credentials/policy-update.js +0 -66
- package/dist/commands/doctor.js +0 -233
- package/dist/commands/integration/connect.js +0 -76
- package/dist/commands/integration/create.js +0 -298
- package/dist/commands/integration/get.js +0 -95
- package/dist/commands/integration/list.js +0 -62
- package/dist/commands/integration/operation/create.js +0 -164
- package/dist/commands/integration/operation/list.js +0 -92
- package/dist/commands/integration/update.js +0 -139
- package/dist/commands/integration/version/build.js +0 -86
- package/dist/commands/integration/version/create.js +0 -45
- package/dist/commands/integration/version/get.js +0 -72
- package/dist/commands/integration/version/list.js +0 -45
- package/dist/commands/integration/version/publish.js +0 -79
- package/dist/commands/integration/version/test.js +0 -104
- package/dist/commands/job/get-step.js +0 -40
- package/dist/commands/job/get.js +0 -44
- package/dist/commands/mcp.js +0 -34
- package/dist/commands/session/create.js +0 -59
- package/dist/commands/session/events.js +0 -56
- package/dist/commands/session/get.js +0 -33
- package/dist/commands/session/interrupt.js +0 -33
- package/dist/commands/session/list.js +0 -59
- package/dist/commands/session/send.js +0 -54
- package/dist/commands/session/tasks.js +0 -45
- package/dist/commands/setup.js +0 -260
- package/dist/commands/trigger/activate.js +0 -41
- package/dist/commands/trigger/create.js +0 -197
- package/dist/commands/trigger/deactivate.js +0 -41
- package/dist/commands/trigger/get.js +0 -33
- package/dist/commands/trigger/list.js +0 -57
- package/dist/commands/trigger/sessions.js +0 -48
- package/dist/commands/trigger/update.js +0 -128
- package/dist/commands/version.js +0 -24
- package/dist/commands/workspace/agent/add.js +0 -114
- package/dist/commands/workspace/agent/list.js +0 -78
- package/dist/commands/workspace/agent/remove.js +0 -78
- package/dist/commands/workspace/clear.js +0 -45
- package/dist/commands/workspace/context/edit.js +0 -107
- package/dist/commands/workspace/context/get.js +0 -47
- package/dist/commands/workspace/context/list.js +0 -51
- package/dist/commands/workspace/context/publish.js +0 -42
- package/dist/commands/workspace/create.js +0 -51
- package/dist/commands/workspace/current.js +0 -63
- package/dist/commands/workspace/get.js +0 -39
- package/dist/commands/workspace/list.js +0 -70
- package/dist/commands/workspace/select.js +0 -184
- package/dist/components/AgentInstallPrompt.js +0 -97
- package/dist/components/SplashAnimation.js +0 -321
- package/dist/components/TaskView.js +0 -268
- package/dist/lib/agent-helpers.js +0 -306
- package/dist/lib/alternate-screen.js +0 -59
- package/dist/lib/api-client.js +0 -154
- package/dist/lib/api-types.js +0 -10
- package/dist/lib/auth.js +0 -284
- package/dist/lib/braille-canvas.js +0 -321
- package/dist/lib/colors.js +0 -46
- package/dist/lib/config-cache.js +0 -45
- package/dist/lib/config.js +0 -153
- package/dist/lib/did-you-mean.js +0 -144
- package/dist/lib/errors.js +0 -375
- package/dist/lib/event-filter.js +0 -91
- package/dist/lib/generated-types.js +0 -56
- package/dist/lib/git.js +0 -176
- package/dist/lib/gk.js +0 -91
- package/dist/lib/guild-config.js +0 -178
- package/dist/lib/iap.js +0 -117
- package/dist/lib/integration-helpers.js +0 -38
- package/dist/lib/loading-messages.js +0 -72
- package/dist/lib/logo.js +0 -141
- package/dist/lib/lottie-serverside.js +0 -181
- package/dist/lib/markdown.js +0 -38
- package/dist/lib/npmrc.js +0 -59
- package/dist/lib/output-mode.js +0 -54
- package/dist/lib/output.js +0 -622
- package/dist/lib/owner-helpers.js +0 -112
- package/dist/lib/polling.js +0 -76
- package/dist/lib/progress.js +0 -324
- package/dist/lib/session-events-fetch.js +0 -25
- package/dist/lib/session-events.js +0 -126
- package/dist/lib/session-polling.js +0 -166
- package/dist/lib/session-resume.js +0 -229
- package/dist/lib/spinners.js +0 -770
- package/dist/lib/splash.js +0 -42
- package/dist/lib/stdin.js +0 -91
- package/dist/lib/svg-to-braille.js +0 -76
- package/dist/lib/table.js +0 -59
- package/dist/lib/update-check.js +0 -65
- package/dist/lib/validate-input-schema.js +0 -208
- package/dist/lib/version-helpers.js +0 -137
- package/dist/lib/workspace-helpers.js +0 -49
- package/dist/mcp/resources.js +0 -67
- package/dist/mcp/server.js +0 -64
- package/dist/mcp/tools.js +0 -753
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { GuildAPIClient } from '../../../lib/api-client.js';
|
|
6
|
-
import { getAuthToken } from '../../../lib/auth.js';
|
|
7
|
-
import { handleAxiosError } from '../../../lib/errors.js';
|
|
8
|
-
import { isMachineReadable } from '../../../lib/output-mode.js';
|
|
9
|
-
import { createOutputWriter } from '../../../lib/output.js';
|
|
10
|
-
export function createIntegrationVersionCreateCommand() {
|
|
11
|
-
const cmd = new Command('create');
|
|
12
|
-
cmd
|
|
13
|
-
.description('Create a new draft version')
|
|
14
|
-
.argument('<id_or_name>', 'Integration ID or name')
|
|
15
|
-
.action(async (identifier) => {
|
|
16
|
-
const output = createOutputWriter();
|
|
17
|
-
try {
|
|
18
|
-
const token = await getAuthToken();
|
|
19
|
-
if (!token) {
|
|
20
|
-
output.error('Not authenticated. Please log in first.', 'Run: guild auth login');
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
const client = new GuildAPIClient();
|
|
24
|
-
const response = await client.post(`/integrations/${identifier}/versions`, {});
|
|
25
|
-
if (isMachineReadable()) {
|
|
26
|
-
output.data(response);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
console.log(chalk.green('Version created successfully'));
|
|
30
|
-
console.log();
|
|
31
|
-
console.log(` ${'Version ID'.padEnd(15)}${response.id}`);
|
|
32
|
-
console.log(` ${'Status'.padEnd(15)}Draft`);
|
|
33
|
-
console.log(` ${'Author'.padEnd(15)}${response.author?.name || chalk.dim('—')}`);
|
|
34
|
-
console.log(` ${'Created'.padEnd(15)}just now`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
const formattedError = handleAxiosError(error);
|
|
39
|
-
output.error(`Failed to create version: ${formattedError.details}`);
|
|
40
|
-
process.exit(1);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return cmd;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { GuildAPIClient } from '../../../lib/api-client.js';
|
|
6
|
-
import { getAuthToken } from '../../../lib/auth.js';
|
|
7
|
-
import { handleAxiosError } from '../../../lib/errors.js';
|
|
8
|
-
import { isMachineReadable } from '../../../lib/output-mode.js';
|
|
9
|
-
import { createOutputWriter } from '../../../lib/output.js';
|
|
10
|
-
import { resolveVersionId } from '../../../lib/integration-helpers.js';
|
|
11
|
-
function formatDate(dateStr) {
|
|
12
|
-
return new Date(dateStr).toLocaleString('en-US', {
|
|
13
|
-
month: 'short',
|
|
14
|
-
day: 'numeric',
|
|
15
|
-
year: 'numeric',
|
|
16
|
-
hour: 'numeric',
|
|
17
|
-
minute: '2-digit',
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function formatValidationStatus(status) {
|
|
21
|
-
switch (status) {
|
|
22
|
-
case 'PASSED':
|
|
23
|
-
return 'Valid';
|
|
24
|
-
case 'FAILED':
|
|
25
|
-
return 'Failed';
|
|
26
|
-
case 'RUNNING':
|
|
27
|
-
return 'Building';
|
|
28
|
-
default:
|
|
29
|
-
return '—';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export function createIntegrationVersionGetCommand() {
|
|
33
|
-
const cmd = new Command('get');
|
|
34
|
-
cmd
|
|
35
|
-
.description('Get version details')
|
|
36
|
-
.argument('<id_or_name>', 'Integration ID or name (owner~name)')
|
|
37
|
-
.option('--version-number <semver>', 'Specific version, e.g. 1.0.0')
|
|
38
|
-
.action(async (identifier, options) => {
|
|
39
|
-
const output = createOutputWriter();
|
|
40
|
-
try {
|
|
41
|
-
const token = await getAuthToken();
|
|
42
|
-
if (!token) {
|
|
43
|
-
output.error('Not authenticated. Please log in first.', 'Run: guild auth login');
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
const client = new GuildAPIClient();
|
|
47
|
-
const versionId = await resolveVersionId(client, identifier, options.versionNumber);
|
|
48
|
-
const response = await client.get(`/integration_versions/${versionId}`);
|
|
49
|
-
if (isMachineReadable()) {
|
|
50
|
-
output.data(response);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
const versionDisplay = response.version_number || 'Draft';
|
|
54
|
-
const integrationName = response.integration?.name || identifier;
|
|
55
|
-
console.log(chalk.bold(`${integrationName} - ${versionDisplay}`));
|
|
56
|
-
console.log();
|
|
57
|
-
console.log(` ${'Status'.padEnd(15)}${formatValidationStatus(response.validation_status)}`);
|
|
58
|
-
console.log(` ${'Author'.padEnd(15)}${response.author?.name || chalk.dim('—')}`);
|
|
59
|
-
console.log(` ${'Published'.padEnd(15)}${response.published_at ? formatDate(response.published_at) : chalk.dim('—')}`);
|
|
60
|
-
console.log(` ${'Created'.padEnd(15)}${formatDate(response.created_at)}`);
|
|
61
|
-
console.log(` ${'Last Updated'.padEnd(15)}${formatDate(response.updated_at)}`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
const formattedError = handleAxiosError(error);
|
|
66
|
-
output.error(`Failed to get version: ${formattedError.details}`);
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return cmd;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../../lib/auth.js';
|
|
6
|
-
import { handleAxiosError } from '../../../lib/errors.js';
|
|
7
|
-
import { isMachineReadable } from '../../../lib/output-mode.js';
|
|
8
|
-
import { createOutputWriter, formatIntegrationVersionTable, } from '../../../lib/output.js';
|
|
9
|
-
import { DEFAULT_PAGE_LIMIT } from '../../../lib/api-types.js';
|
|
10
|
-
export function createIntegrationVersionListCommand() {
|
|
11
|
-
const cmd = new Command('list');
|
|
12
|
-
cmd
|
|
13
|
-
.description('List integration versions')
|
|
14
|
-
.argument('<id_or_name>', 'Integration ID or name')
|
|
15
|
-
.option('--limit <number>', `Number of results to return (default: ${DEFAULT_PAGE_LIMIT})`, String(DEFAULT_PAGE_LIMIT))
|
|
16
|
-
.option('--offset <number>', 'Offset for pagination (default: 0)', '0')
|
|
17
|
-
.action(async (identifier, options) => {
|
|
18
|
-
const output = createOutputWriter();
|
|
19
|
-
try {
|
|
20
|
-
const token = await getAuthToken();
|
|
21
|
-
if (!token) {
|
|
22
|
-
output.error('Not authenticated. Please log in first.', 'Run: guild auth login');
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
const client = new GuildAPIClient();
|
|
26
|
-
const params = new URLSearchParams();
|
|
27
|
-
params.append('limit', options.limit);
|
|
28
|
-
params.append('offset', options.offset);
|
|
29
|
-
const response = await client.get(`/integrations/${identifier}/versions?${params.toString()}`);
|
|
30
|
-
if (isMachineReadable()) {
|
|
31
|
-
output.data(response);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
formatIntegrationVersionTable(response.items, response.pagination, identifier);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
const formattedError = handleAxiosError(error);
|
|
39
|
-
output.error(`Failed to list versions: ${formattedError.details}`);
|
|
40
|
-
process.exit(1);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return cmd;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=list.js.map
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { GuildAPIClient } from '../../../lib/api-client.js';
|
|
6
|
-
import { getAuthToken } from '../../../lib/auth.js';
|
|
7
|
-
import { handleAxiosError } from '../../../lib/errors.js';
|
|
8
|
-
import { isMachineReadable } from '../../../lib/output-mode.js';
|
|
9
|
-
import { createOutputWriter } from '../../../lib/output.js';
|
|
10
|
-
import { createSpinner } from '../../../lib/progress.js';
|
|
11
|
-
import { resolveVersionId } from '../../../lib/integration-helpers.js';
|
|
12
|
-
function formatDate(dateStr) {
|
|
13
|
-
return new Date(dateStr).toLocaleString('en-US', {
|
|
14
|
-
month: 'short',
|
|
15
|
-
day: 'numeric',
|
|
16
|
-
year: 'numeric',
|
|
17
|
-
hour: 'numeric',
|
|
18
|
-
minute: '2-digit',
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
export function createIntegrationVersionPublishCommand() {
|
|
22
|
-
const cmd = new Command('publish');
|
|
23
|
-
cmd
|
|
24
|
-
.description('Publish a built version')
|
|
25
|
-
.argument('<id_or_name>', 'Integration ID or name (owner~name)')
|
|
26
|
-
.option('--version-number <semver>', 'Specific version to publish, e.g. 1.0.0')
|
|
27
|
-
.action(async (identifier, options) => {
|
|
28
|
-
const output = createOutputWriter();
|
|
29
|
-
try {
|
|
30
|
-
const token = await getAuthToken();
|
|
31
|
-
if (!token) {
|
|
32
|
-
output.error('Not authenticated. Please log in first.', 'Run: guild auth login');
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
const client = new GuildAPIClient();
|
|
36
|
-
const versionId = await resolveVersionId(client, identifier, options.versionNumber);
|
|
37
|
-
// Get current version info for display
|
|
38
|
-
const currentVersion = await client.get(`/integration_versions/${versionId}`);
|
|
39
|
-
const versionDisplay = currentVersion.version_number || versionId;
|
|
40
|
-
const publishResponse = await client.post(`/integration_versions/${versionId}/publish`, {});
|
|
41
|
-
if (isMachineReadable()) {
|
|
42
|
-
output.data(publishResponse);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
// Poll until published
|
|
46
|
-
const spinner = createSpinner(`Publishing version ${versionDisplay}...`);
|
|
47
|
-
spinner.start();
|
|
48
|
-
const maxAttempts = 60;
|
|
49
|
-
let attempt = 0;
|
|
50
|
-
let finalVersion = null;
|
|
51
|
-
while (attempt < maxAttempts) {
|
|
52
|
-
await new Promise((r) => setTimeout(r, 3000));
|
|
53
|
-
attempt++;
|
|
54
|
-
const version = await client.get(`/integration_versions/${versionId}`);
|
|
55
|
-
if (version.published_at) {
|
|
56
|
-
finalVersion = version;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
spinner.text = `Publishing version ${versionDisplay}... (${attempt}/${maxAttempts})`;
|
|
60
|
-
}
|
|
61
|
-
if (!finalVersion) {
|
|
62
|
-
spinner.fail('Publish timed out');
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
spinner.succeed('Version published');
|
|
66
|
-
console.log();
|
|
67
|
-
console.log(` ${'Version ID'.padEnd(17)}${finalVersion.id}`);
|
|
68
|
-
console.log(` ${'Version Number'.padEnd(17)}${finalVersion.version_number || chalk.dim('—')}`);
|
|
69
|
-
console.log(` ${'Published'.padEnd(17)}${formatDate(finalVersion.published_at)}`);
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
const formattedError = handleAxiosError(error);
|
|
73
|
-
output.error(`Failed to publish version: ${formattedError.details}`);
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
return cmd;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=publish.js.map
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { GuildAPIClient } from '../../../lib/api-client.js';
|
|
6
|
-
import { getAuthToken } from '../../../lib/auth.js';
|
|
7
|
-
import { handleAxiosError } from '../../../lib/errors.js';
|
|
8
|
-
import { isMachineReadable } from '../../../lib/output-mode.js';
|
|
9
|
-
import { createOutputWriter } from '../../../lib/output.js';
|
|
10
|
-
import { resolveVersionId } from '../../../lib/integration-helpers.js';
|
|
11
|
-
function parseJsonFlag(value, flagName) {
|
|
12
|
-
try {
|
|
13
|
-
return JSON.parse(value);
|
|
14
|
-
}
|
|
15
|
-
catch (e) {
|
|
16
|
-
const msg = e instanceof Error ? e.message : String(e);
|
|
17
|
-
throw new Error(`Invalid JSON for ${flagName}: ${msg}`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export function createIntegrationVersionTestCommand() {
|
|
21
|
-
const cmd = new Command('test');
|
|
22
|
-
cmd
|
|
23
|
-
.description('Test an endpoint invocation')
|
|
24
|
-
.argument('<id_or_name>', 'Integration ID or name (owner~name)')
|
|
25
|
-
.option('--version-number <semver>', 'Specific version, e.g. 1.0.0')
|
|
26
|
-
.requiredOption('--operation <name>', 'Operation to test, e.g. list_users')
|
|
27
|
-
.option('--account <name>', 'Account name to resolve credential from')
|
|
28
|
-
.option('--input-path <json>', 'JSON object of path parameters')
|
|
29
|
-
.option('--input-query <json>', 'JSON object of query parameters')
|
|
30
|
-
.option('--input-body <json>', 'JSON object for request body')
|
|
31
|
-
.action(async (identifier, options) => {
|
|
32
|
-
const output = createOutputWriter();
|
|
33
|
-
try {
|
|
34
|
-
const token = await getAuthToken();
|
|
35
|
-
if (!token) {
|
|
36
|
-
output.error('Not authenticated. Please log in first.', 'Run: guild auth login');
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
// Validate JSON inputs before any API calls
|
|
40
|
-
const body = {
|
|
41
|
-
operation: options.operation,
|
|
42
|
-
};
|
|
43
|
-
if (options.inputPath) {
|
|
44
|
-
body.input_path = parseJsonFlag(options.inputPath, '--input-path');
|
|
45
|
-
}
|
|
46
|
-
if (options.inputQuery) {
|
|
47
|
-
body.input_query = parseJsonFlag(options.inputQuery, '--input-query');
|
|
48
|
-
}
|
|
49
|
-
if (options.inputBody) {
|
|
50
|
-
body.input_body = parseJsonFlag(options.inputBody, '--input-body');
|
|
51
|
-
}
|
|
52
|
-
const client = new GuildAPIClient();
|
|
53
|
-
const versionId = await resolveVersionId(client, identifier, options.versionNumber);
|
|
54
|
-
if (options.account) {
|
|
55
|
-
const creds = await client.get(`/accounts/${options.account}/credentials?integration=${encodeURIComponent(identifier)}`);
|
|
56
|
-
if (creds.items.length === 0) {
|
|
57
|
-
output.error(`Error: No credentials found for account '${options.account}' on integration '${identifier}'`);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
body.credential_id = creds.items[0].id;
|
|
61
|
-
}
|
|
62
|
-
const response = await client.post(`/integration_versions/${versionId}/test`, body);
|
|
63
|
-
if (isMachineReadable()) {
|
|
64
|
-
output.data(response);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
console.log(`Testing operation: ${options.operation}`);
|
|
68
|
-
console.log();
|
|
69
|
-
console.log(chalk.bold('Request'));
|
|
70
|
-
console.log(` ${'URL'.padEnd(9)}${response.request_url}`);
|
|
71
|
-
console.log();
|
|
72
|
-
console.log(chalk.bold('Response'));
|
|
73
|
-
console.log(` ${'Status'.padEnd(9)}${response.status_code}`);
|
|
74
|
-
console.log(` ${'Type'.padEnd(9)}${response.content_type || chalk.dim('—')}`);
|
|
75
|
-
console.log();
|
|
76
|
-
console.log(chalk.bold('Body'));
|
|
77
|
-
if (response.body !== null && response.body !== undefined) {
|
|
78
|
-
const bodyStr = typeof response.body === 'string'
|
|
79
|
-
? response.body
|
|
80
|
-
: JSON.stringify(response.body, null, 2);
|
|
81
|
-
const indented = bodyStr
|
|
82
|
-
.split('\n')
|
|
83
|
-
.map((line) => ` ${line}`)
|
|
84
|
-
.join('\n');
|
|
85
|
-
console.log(indented);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
console.log(chalk.dim(' (empty)'));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
if (error instanceof Error && error.message.startsWith('Invalid JSON')) {
|
|
94
|
-
output.error(`Error: ${error.message}`);
|
|
95
|
-
process.exit(1);
|
|
96
|
-
}
|
|
97
|
-
const formattedError = handleAxiosError(error);
|
|
98
|
-
output.error(`Failed to test endpoint: ${formattedError.details}`);
|
|
99
|
-
process.exit(1);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
return cmd;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=test.js.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../lib/auth.js';
|
|
6
|
-
import { handleAxiosError } from '../../lib/errors.js';
|
|
7
|
-
import { createOutputWriter } from '../../lib/output.js';
|
|
8
|
-
export function createJobGetStepCommand() {
|
|
9
|
-
const cmd = new Command('get-step');
|
|
10
|
-
cmd
|
|
11
|
-
.description('Get details of a step in a job')
|
|
12
|
-
.argument('<job-id>', 'Job ID')
|
|
13
|
-
.argument('<step-name>', 'Step name')
|
|
14
|
-
.action(async (jobId, stepName) => {
|
|
15
|
-
const output = createOutputWriter();
|
|
16
|
-
try {
|
|
17
|
-
const token = await getAuthToken();
|
|
18
|
-
if (!token) {
|
|
19
|
-
output.error('Not authenticated. Run: guild auth login');
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
const client = new GuildAPIClient();
|
|
23
|
-
const stepsResponse = await client.get(`/jobs/${jobId}/steps`);
|
|
24
|
-
const step = stepsResponse.steps.find((s) => s.name === stepName);
|
|
25
|
-
if (!step) {
|
|
26
|
-
const available = stepsResponse.steps.map((s) => s.name).join(', ');
|
|
27
|
-
output.error(`Step "${stepName}" not found. Available steps: ${available || 'none'}`);
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
output.data(step);
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
const formattedError = handleAxiosError(error);
|
|
34
|
-
output.error(`Failed to get job step: ${formattedError.details}`);
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return cmd;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=get-step.js.map
|
package/dist/commands/job/get.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../lib/auth.js';
|
|
6
|
-
import { handleAxiosError } from '../../lib/errors.js';
|
|
7
|
-
import { isMachineReadable } from '../../lib/output-mode.js';
|
|
8
|
-
import { createOutputWriter, formatJobStepTable } from '../../lib/output.js';
|
|
9
|
-
export function createJobGetCommand() {
|
|
10
|
-
const cmd = new Command('get');
|
|
11
|
-
cmd
|
|
12
|
-
.description('Get job details and steps')
|
|
13
|
-
.argument('<job-id>', 'Job ID')
|
|
14
|
-
.action(async (jobId) => {
|
|
15
|
-
const output = createOutputWriter();
|
|
16
|
-
try {
|
|
17
|
-
const token = await getAuthToken();
|
|
18
|
-
if (!token) {
|
|
19
|
-
output.error('Not authenticated. Run: guild auth login');
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
const client = new GuildAPIClient();
|
|
23
|
-
const [job, stepsResponse] = await Promise.all([
|
|
24
|
-
client.get(`/jobs/${jobId}`),
|
|
25
|
-
client.get(`/jobs/${jobId}/steps`),
|
|
26
|
-
]);
|
|
27
|
-
if (isMachineReadable()) {
|
|
28
|
-
console.log(JSON.stringify({ ...job, steps: stepsResponse.steps }, null, 2));
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
output.data(job);
|
|
32
|
-
console.log();
|
|
33
|
-
formatJobStepTable(stepsResponse.steps);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
const formattedError = handleAxiosError(error);
|
|
38
|
-
output.error(`Failed to get job: ${formattedError.details}`);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
return cmd;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=get.js.map
|
package/dist/commands/mcp.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
export function createMcpCommand() {
|
|
5
|
-
const cmd = new Command('mcp');
|
|
6
|
-
cmd
|
|
7
|
-
.description('Start an MCP server over stdio for use with Claude Code, Cursor, and other MCP hosts')
|
|
8
|
-
.option('--workspace <id>', 'Workspace ID or name (defaults to configured workspace)')
|
|
9
|
-
.option('--debug', 'Enable debug logging to stderr')
|
|
10
|
-
.addHelpText('after', `
|
|
11
|
-
Configuration:
|
|
12
|
-
|
|
13
|
-
Add to .mcp.json in your project root:
|
|
14
|
-
{
|
|
15
|
-
"mcpServers": {
|
|
16
|
-
"guild": {
|
|
17
|
-
"command": "guild",
|
|
18
|
-
"args": ["mcp"]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
Or run: guild setup --mcp
|
|
24
|
-
`)
|
|
25
|
-
.action(async (options) => {
|
|
26
|
-
const { startMcpServer } = await import('../mcp/server.js');
|
|
27
|
-
await startMcpServer({
|
|
28
|
-
workspace: options.workspace,
|
|
29
|
-
debug: options.debug,
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
return cmd;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=mcp.js.map
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../lib/auth.js';
|
|
6
|
-
import { getWorkspaceId } from '../../lib/guild-config.js';
|
|
7
|
-
import { handleAxiosError } from '../../lib/errors.js';
|
|
8
|
-
import { createOutputWriter } from '../../lib/output.js';
|
|
9
|
-
export function createSessionCreateCommand() {
|
|
10
|
-
const cmd = new Command('create');
|
|
11
|
-
cmd
|
|
12
|
-
.description('Create a new session')
|
|
13
|
-
.option('--workspace <id>', 'Workspace ID or name (e.g., owner~workspace-name)')
|
|
14
|
-
.option('--type <type>', 'Session type: chat or agent_test (default: chat)', 'chat')
|
|
15
|
-
.option('--prompt <text>', 'Initial prompt (required for chat sessions)')
|
|
16
|
-
.option('--agent <identifier>', 'Agent identifier, e.g., owner~agent-name')
|
|
17
|
-
.action(async (options) => {
|
|
18
|
-
const output = createOutputWriter();
|
|
19
|
-
try {
|
|
20
|
-
const token = await getAuthToken();
|
|
21
|
-
if (!token) {
|
|
22
|
-
output.error('Not authenticated. Run: guild auth login');
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
if (options.type === 'chat' && !options.prompt) {
|
|
26
|
-
output.error('--prompt is required for chat sessions');
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
let workspaceId = options.workspace;
|
|
30
|
-
if (!workspaceId) {
|
|
31
|
-
const resolved = await getWorkspaceId();
|
|
32
|
-
if (!resolved) {
|
|
33
|
-
output.error('No workspace specified. Run: guild workspace select');
|
|
34
|
-
process.exit(1);
|
|
35
|
-
}
|
|
36
|
-
workspaceId = resolved.workspaceId;
|
|
37
|
-
}
|
|
38
|
-
const client = new GuildAPIClient();
|
|
39
|
-
const body = {
|
|
40
|
-
session_type: options.type,
|
|
41
|
-
};
|
|
42
|
-
if (options.prompt) {
|
|
43
|
-
body.initial_prompt = options.prompt;
|
|
44
|
-
}
|
|
45
|
-
if (options.agent) {
|
|
46
|
-
body.agent_id = options.agent;
|
|
47
|
-
}
|
|
48
|
-
const response = await client.post(`/workspaces/${workspaceId}/sessions`, body);
|
|
49
|
-
output.data(response);
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
const formattedError = handleAxiosError(error);
|
|
53
|
-
output.error(`Failed to create session: ${formattedError.details}`);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
return cmd;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../lib/auth.js';
|
|
6
|
-
import { parseEventFilter, DEFAULT_EVENT_TYPES, USER_EVENT_TYPES, SYSTEM_EVENT_TYPES, } from '../../lib/event-filter.js';
|
|
7
|
-
import { DEFAULT_PAGE_LIMIT_LARGE } from '../../lib/api-types.js';
|
|
8
|
-
import { handleAxiosError } from '../../lib/errors.js';
|
|
9
|
-
import { createOutputWriter } from '../../lib/output.js';
|
|
10
|
-
export function createSessionEventsCommand() {
|
|
11
|
-
const cmd = new Command('events');
|
|
12
|
-
cmd
|
|
13
|
-
.description('List events in a session')
|
|
14
|
-
.argument('<session-id>', 'Session ID')
|
|
15
|
-
.option('--events <types>', 'Event types to show (default: user). Shorthands: none, user, system, all, or comma-separated type names')
|
|
16
|
-
.option('--limit <number>', `Number of results to return (default: ${DEFAULT_PAGE_LIMIT_LARGE})`, String(DEFAULT_PAGE_LIMIT_LARGE))
|
|
17
|
-
.option('--offset <number>', 'Offset for pagination (default: 0)', '0')
|
|
18
|
-
.addHelpText('after', [
|
|
19
|
-
'',
|
|
20
|
-
'Available event types:',
|
|
21
|
-
' User events (shown by default):',
|
|
22
|
-
` ${USER_EVENT_TYPES.join(', ')}`,
|
|
23
|
-
'',
|
|
24
|
-
' System / debug events:',
|
|
25
|
-
` ${SYSTEM_EVENT_TYPES.join(', ')}`,
|
|
26
|
-
].join('\n'))
|
|
27
|
-
.action(async (sessionId, options) => {
|
|
28
|
-
const output = createOutputWriter();
|
|
29
|
-
try {
|
|
30
|
-
const token = await getAuthToken();
|
|
31
|
-
if (!token) {
|
|
32
|
-
output.error('Not authenticated. Run: guild auth login');
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
const client = new GuildAPIClient();
|
|
36
|
-
const params = new URLSearchParams();
|
|
37
|
-
params.append('limit', options.limit);
|
|
38
|
-
params.append('offset', options.offset);
|
|
39
|
-
const rawFilter = options.events
|
|
40
|
-
? parseEventFilter(options.events)
|
|
41
|
-
: DEFAULT_EVENT_TYPES;
|
|
42
|
-
if (rawFilter.size > 0) {
|
|
43
|
-
params.append('types', [...rawFilter].join(','));
|
|
44
|
-
}
|
|
45
|
-
const response = await client.get(`/sessions/${sessionId}/events?${params.toString()}`);
|
|
46
|
-
output.data(response);
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
const formattedError = handleAxiosError(error);
|
|
50
|
-
output.error(`Failed to get session events: ${formattedError.details}`);
|
|
51
|
-
process.exit(1);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
return cmd;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=events.js.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../lib/auth.js';
|
|
6
|
-
import { handleAxiosError } from '../../lib/errors.js';
|
|
7
|
-
import { createOutputWriter } from '../../lib/output.js';
|
|
8
|
-
export function createSessionGetCommand() {
|
|
9
|
-
const cmd = new Command('get');
|
|
10
|
-
cmd
|
|
11
|
-
.description('Get session details')
|
|
12
|
-
.argument('<session-id>', 'Session ID')
|
|
13
|
-
.action(async (sessionId) => {
|
|
14
|
-
const output = createOutputWriter();
|
|
15
|
-
try {
|
|
16
|
-
const token = await getAuthToken();
|
|
17
|
-
if (!token) {
|
|
18
|
-
output.error('Not authenticated. Run: guild auth login');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
const client = new GuildAPIClient();
|
|
22
|
-
const response = await client.get(`/sessions/${sessionId}`);
|
|
23
|
-
output.data(response);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
const formattedError = handleAxiosError(error);
|
|
27
|
-
output.error(`Failed to get session: ${formattedError.details}`);
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
return cmd;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Guild.ai
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import { GuildAPIClient } from '../../lib/api-client.js';
|
|
5
|
-
import { getAuthToken } from '../../lib/auth.js';
|
|
6
|
-
import { handleAxiosError } from '../../lib/errors.js';
|
|
7
|
-
import { createOutputWriter } from '../../lib/output.js';
|
|
8
|
-
export function createSessionInterruptCommand() {
|
|
9
|
-
const cmd = new Command('interrupt');
|
|
10
|
-
cmd
|
|
11
|
-
.description('Interrupt a running session')
|
|
12
|
-
.argument('<session-id>', 'Session ID')
|
|
13
|
-
.action(async (sessionId) => {
|
|
14
|
-
const output = createOutputWriter();
|
|
15
|
-
try {
|
|
16
|
-
const token = await getAuthToken();
|
|
17
|
-
if (!token) {
|
|
18
|
-
output.error('Not authenticated. Run: guild auth login');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
const client = new GuildAPIClient();
|
|
22
|
-
const response = await client.post(`/sessions/${sessionId}/interrupt`, {});
|
|
23
|
-
output.data(response);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
const formattedError = handleAxiosError(error);
|
|
27
|
-
output.error(`Failed to interrupt session: ${formattedError.details}`);
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
return cmd;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=interrupt.js.map
|