@guildai/cli 0.10.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/agent/logs.d.ts +3 -0
- package/dist/commands/setup.d.ts +16 -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 +8231 -253
- package/dist/index.js.map +7 -0
- package/dist/lib/api-types.d.ts +44 -0
- package/dist/lib/auth.d.ts +1 -1
- package/dist/lib/config.d.ts +9 -0
- package/dist/lib/errors.d.ts +1 -1
- package/dist/lib/output-mode.d.ts +9 -2
- package/dist/lib/output.d.ts +17 -1
- package/dist/lib/session-events.d.ts +14 -3
- package/dist/lib/session-polling.d.ts +24 -1
- package/dist/lib/session-resume.d.ts +15 -1
- package/dist/lib/stdin.d.ts +5 -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 -278
- package/dist/commands/agent/clone.js +0 -116
- package/dist/commands/agent/code.js +0 -87
- package/dist/commands/agent/fork.js +0 -218
- package/dist/commands/agent/get.js +0 -37
- package/dist/commands/agent/grep.js +0 -107
- package/dist/commands/agent/init.js +0 -390
- package/dist/commands/agent/list.js +0 -110
- package/dist/commands/agent/owners.js +0 -74
- package/dist/commands/agent/publish.js +0 -91
- package/dist/commands/agent/pull.js +0 -198
- package/dist/commands/agent/revalidate.js +0 -56
- package/dist/commands/agent/save.js +0 -346
- 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 -486
- package/dist/commands/agent/unpublish.js +0 -64
- package/dist/commands/agent/update.js +0 -110
- package/dist/commands/agent/versions.js +0 -55
- package/dist/commands/agent/workspaces.js +0 -54
- package/dist/commands/auth/login.js +0 -33
- 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 -1345
- package/dist/commands/config/get.js +0 -64
- package/dist/commands/config/list.js +0 -47
- package/dist/commands/config/path.js +0 -38
- 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 -230
- 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 -33
- package/dist/lib/output.js +0 -591
- 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 -112
- package/dist/lib/session-polling.js +0 -160
- package/dist/lib/session-resume.js +0 -96
- package/dist/lib/spinners.js +0 -770
- package/dist/lib/splash.js +0 -41
- package/dist/lib/stdin.js +0 -84
- 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 -121
- 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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRequire as _cjsReq } from 'module'; if(typeof require === 'undefined') var require = _cjsReq(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
clearAuthToken,
|
|
4
|
+
getAuthStatus,
|
|
5
|
+
getAuthToken,
|
|
6
|
+
getAuthenticatedUrl,
|
|
7
|
+
login,
|
|
8
|
+
logout,
|
|
9
|
+
pollForToken,
|
|
10
|
+
saveAuthToken,
|
|
11
|
+
startDeviceFlow
|
|
12
|
+
} from "./chunk-LFMQJOKC.js";
|
|
13
|
+
import "./chunk-M347HP6M.js";
|
|
14
|
+
import "./chunk-ENKEEJ45.js";
|
|
15
|
+
import "./chunk-VVSOU6ON.js";
|
|
16
|
+
import "./chunk-PNCUR4OB.js";
|
|
17
|
+
import "./chunk-OYQ476FQ.js";
|
|
18
|
+
export {
|
|
19
|
+
clearAuthToken,
|
|
20
|
+
getAuthStatus,
|
|
21
|
+
getAuthToken,
|
|
22
|
+
getAuthenticatedUrl,
|
|
23
|
+
login,
|
|
24
|
+
logout,
|
|
25
|
+
pollForToken,
|
|
26
|
+
saveAuthToken,
|
|
27
|
+
startDeviceFlow
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=auth-CRMO5O3N.js.map
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { createRequire as _cjsReq } from 'module'; if(typeof require === 'undefined') var require = _cjsReq(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ChatApp,
|
|
4
|
+
createSession,
|
|
5
|
+
ensureAuthenticated,
|
|
6
|
+
fetchSession,
|
|
7
|
+
fetchSessionEvents,
|
|
8
|
+
render_default,
|
|
9
|
+
require_react,
|
|
10
|
+
suppressScrollbackClear
|
|
11
|
+
} from "./chunk-IBRKVGMZ.js";
|
|
12
|
+
import {
|
|
13
|
+
BuildFailedError,
|
|
14
|
+
BuildTimeoutError,
|
|
15
|
+
buildEphemeralVersion,
|
|
16
|
+
getAgentId,
|
|
17
|
+
readAgentFiles
|
|
18
|
+
} from "./chunk-B7VAF5UG.js";
|
|
19
|
+
import {
|
|
20
|
+
Command,
|
|
21
|
+
Option,
|
|
22
|
+
getOutputMode,
|
|
23
|
+
isQuietMode
|
|
24
|
+
} from "./chunk-DOIYVBNY.js";
|
|
25
|
+
import {
|
|
26
|
+
open_default
|
|
27
|
+
} from "./chunk-56YCMGL3.js";
|
|
28
|
+
import "./chunk-6EX6E7WP.js";
|
|
29
|
+
import {
|
|
30
|
+
pollForResponse
|
|
31
|
+
} from "./chunk-SPZPZXUN.js";
|
|
32
|
+
import {
|
|
33
|
+
GuildAPIClient,
|
|
34
|
+
getWorkspaceId,
|
|
35
|
+
getWorkspaceSourceLabel
|
|
36
|
+
} from "./chunk-RIG2HZWM.js";
|
|
37
|
+
import {
|
|
38
|
+
ErrorCodes,
|
|
39
|
+
ensureInteractiveStdin,
|
|
40
|
+
format,
|
|
41
|
+
getCliVersion,
|
|
42
|
+
handleAxiosError,
|
|
43
|
+
hyperlink,
|
|
44
|
+
readStdinAsJSON
|
|
45
|
+
} from "./chunk-LFMQJOKC.js";
|
|
46
|
+
import "./chunk-M347HP6M.js";
|
|
47
|
+
import "./chunk-ENKEEJ45.js";
|
|
48
|
+
import "./chunk-VVSOU6ON.js";
|
|
49
|
+
import "./chunk-PNCUR4OB.js";
|
|
50
|
+
import "./chunk-X3ADGWOF.js";
|
|
51
|
+
import {
|
|
52
|
+
__toESM
|
|
53
|
+
} from "./chunk-OYQ476FQ.js";
|
|
54
|
+
|
|
55
|
+
// src/commands/agent/chat.ts
|
|
56
|
+
var import_react = __toESM(require_react(), 1);
|
|
57
|
+
import path from "path";
|
|
58
|
+
import * as readline from "readline";
|
|
59
|
+
var cliVersion = getCliVersion();
|
|
60
|
+
function createAgentChatCommand() {
|
|
61
|
+
const cmd = new Command("chat");
|
|
62
|
+
cmd.description("Chat with the agent in current directory").argument("[prompt...]", "Optional initial prompt for the agent").option("--path <dir>", "Path to agent directory (defaults to current directory)").option(
|
|
63
|
+
"--workspace <identifier>",
|
|
64
|
+
"Workspace ID or full name (e.g., owner~workspace-name)"
|
|
65
|
+
).option(
|
|
66
|
+
"--agent-version <id>",
|
|
67
|
+
"Chat with a specific version (UUID or version number)"
|
|
68
|
+
).option("--no-splash", "Skip the splash screen animation").option("--resume <session-id>", "Resume an existing session").option("--open", "Open session in web dashboard").option("--no-cache", "Skip ephemeral build cache (force a fresh build)").addOption(new Option("--mode <format>").hideHelp()).addHelpText(
|
|
69
|
+
"after",
|
|
70
|
+
"\nTo chat with a published agent by name: guild chat --agent owner~agent-name"
|
|
71
|
+
).action(
|
|
72
|
+
async (promptArgs, options) => {
|
|
73
|
+
try {
|
|
74
|
+
const agentPath = options.path || ".";
|
|
75
|
+
const { agentId, config } = await getAgentId(void 0, agentPath);
|
|
76
|
+
const initialPrompt = promptArgs.length > 0 ? promptArgs.join(" ") : "Hello";
|
|
77
|
+
const outputMode = getOutputMode();
|
|
78
|
+
let inputData;
|
|
79
|
+
if (outputMode === "json") {
|
|
80
|
+
try {
|
|
81
|
+
inputData = await readStdinAsJSON();
|
|
82
|
+
} catch (error) {
|
|
83
|
+
const err = error;
|
|
84
|
+
console.error(`Error: ${err.message}`);
|
|
85
|
+
console.error("");
|
|
86
|
+
console.error("Example usage:");
|
|
87
|
+
console.error(
|
|
88
|
+
` echo '{"prompt": "test"}' | guild agent chat --mode json`
|
|
89
|
+
);
|
|
90
|
+
console.error(" guild agent chat --mode json < input.json");
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
await ensureAuthenticated();
|
|
95
|
+
const client = new GuildAPIClient();
|
|
96
|
+
const quiet = isQuietMode();
|
|
97
|
+
const resolvedPath = path.resolve(agentPath);
|
|
98
|
+
let version;
|
|
99
|
+
let ephemeralCached = false;
|
|
100
|
+
if (options.agentVersion) {
|
|
101
|
+
const existingVersions = await client.get(
|
|
102
|
+
`/agents/${agentId}/versions`
|
|
103
|
+
);
|
|
104
|
+
const match = existingVersions.items.find(
|
|
105
|
+
(v) => v.id === options.agentVersion || v.version_number === options.agentVersion
|
|
106
|
+
);
|
|
107
|
+
if (!match) {
|
|
108
|
+
console.error(`Error: Version not found: ${options.agentVersion}`);
|
|
109
|
+
console.error("");
|
|
110
|
+
console.error("List available versions:");
|
|
111
|
+
console.error(` guild agent versions ${agentId}`);
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
version = match;
|
|
115
|
+
} else {
|
|
116
|
+
if (!quiet) {
|
|
117
|
+
console.error("Building agent...");
|
|
118
|
+
}
|
|
119
|
+
const agentFiles = await readAgentFiles(resolvedPath);
|
|
120
|
+
const noCache = options.cache === false;
|
|
121
|
+
const result = await buildEphemeralVersion(
|
|
122
|
+
client,
|
|
123
|
+
agentId,
|
|
124
|
+
agentFiles,
|
|
125
|
+
resolvedPath,
|
|
126
|
+
"[Chat] Ephemeral development version",
|
|
127
|
+
{ noCache }
|
|
128
|
+
);
|
|
129
|
+
version = result.version;
|
|
130
|
+
ephemeralCached = result.cached;
|
|
131
|
+
if (ephemeralCached && !quiet) {
|
|
132
|
+
console.error("No changes detected, reusing cached build.");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (outputMode === "json" || outputMode === "jsonl") {
|
|
136
|
+
const sessionPrompt = outputMode === "json" && inputData ? JSON.stringify(inputData) : initialPrompt;
|
|
137
|
+
let resolvedWorkspaceId = options.workspace;
|
|
138
|
+
let workspaceSourceLabel;
|
|
139
|
+
if (!resolvedWorkspaceId) {
|
|
140
|
+
const wsResolved = await getWorkspaceId(resolvedPath);
|
|
141
|
+
resolvedWorkspaceId = wsResolved?.workspaceId;
|
|
142
|
+
workspaceSourceLabel = wsResolved ? getWorkspaceSourceLabel(wsResolved.source) : void 0;
|
|
143
|
+
}
|
|
144
|
+
const session = await createSession(
|
|
145
|
+
client,
|
|
146
|
+
resolvedWorkspaceId,
|
|
147
|
+
sessionPrompt,
|
|
148
|
+
version.id
|
|
149
|
+
);
|
|
150
|
+
if (!quiet) {
|
|
151
|
+
console.log(`\u2713 Agent: ${config?.name || agentId}`);
|
|
152
|
+
if (session.workspace_id) {
|
|
153
|
+
const workspaceDisplay = workspaceSourceLabel ? `${session.workspace_id} (from ${workspaceSourceLabel})` : session.workspace_id;
|
|
154
|
+
console.log(`\u2713 Workspace: ${workspaceDisplay}`);
|
|
155
|
+
}
|
|
156
|
+
const sessionLink = session.session_url ? hyperlink(session.id, session.session_url) : session.id;
|
|
157
|
+
console.log(`\u2713 Session: ${sessionLink}`);
|
|
158
|
+
console.log("");
|
|
159
|
+
}
|
|
160
|
+
if (options.open && session.session_url) {
|
|
161
|
+
await open_default(session.session_url);
|
|
162
|
+
}
|
|
163
|
+
if (outputMode === "json" && inputData) {
|
|
164
|
+
try {
|
|
165
|
+
const { response } = await pollForResponse(
|
|
166
|
+
client,
|
|
167
|
+
session.id,
|
|
168
|
+
void 0
|
|
169
|
+
);
|
|
170
|
+
if (!response) {
|
|
171
|
+
console.error("Timeout: No response received from agent");
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
if (quiet) {
|
|
175
|
+
console.log(response);
|
|
176
|
+
} else {
|
|
177
|
+
console.log(`< ${response}`);
|
|
178
|
+
console.log("");
|
|
179
|
+
console.log("\u2713 Chat complete");
|
|
180
|
+
}
|
|
181
|
+
process.exit(0);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
const formattedError = handleAxiosError(error);
|
|
184
|
+
console.error(`Error: ${formattedError.details}`);
|
|
185
|
+
process.exit(1);
|
|
186
|
+
}
|
|
187
|
+
} else if (outputMode === "jsonl") {
|
|
188
|
+
const rl = readline.createInterface({
|
|
189
|
+
input: process.stdin,
|
|
190
|
+
output: process.stdout,
|
|
191
|
+
terminal: false
|
|
192
|
+
});
|
|
193
|
+
let lineNumber = 0;
|
|
194
|
+
let processedCount = 0;
|
|
195
|
+
let lastEventId;
|
|
196
|
+
for await (const line of rl) {
|
|
197
|
+
lineNumber++;
|
|
198
|
+
if (!line.trim()) continue;
|
|
199
|
+
try {
|
|
200
|
+
const jsonInput = JSON.parse(line);
|
|
201
|
+
if (!quiet) {
|
|
202
|
+
console.error(`Processing line ${lineNumber}...`);
|
|
203
|
+
}
|
|
204
|
+
await client.post(`/sessions/${session.id}/events`, {
|
|
205
|
+
mode: "json",
|
|
206
|
+
content: jsonInput
|
|
207
|
+
});
|
|
208
|
+
const result = await pollForResponse(client, session.id, lastEventId);
|
|
209
|
+
lastEventId = result.lastEventId;
|
|
210
|
+
if (!result.response) {
|
|
211
|
+
console.error(`Timeout: No response for line ${lineNumber}`);
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
const response = result.response;
|
|
215
|
+
if (quiet) {
|
|
216
|
+
console.log(response);
|
|
217
|
+
} else {
|
|
218
|
+
console.log(`< ${response}`);
|
|
219
|
+
console.log("");
|
|
220
|
+
}
|
|
221
|
+
processedCount++;
|
|
222
|
+
} catch (error) {
|
|
223
|
+
const err = error;
|
|
224
|
+
console.error(`Error: Invalid JSON on line ${lineNumber}`);
|
|
225
|
+
console.error(`Failed to parse JSON: ${err.message}`);
|
|
226
|
+
console.error("Skipping line and continuing...");
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (!quiet) {
|
|
230
|
+
console.log(`
|
|
231
|
+
\u2713 Processed ${processedCount} messages`);
|
|
232
|
+
}
|
|
233
|
+
process.exit(0);
|
|
234
|
+
}
|
|
235
|
+
} else {
|
|
236
|
+
ensureInteractiveStdin("guild agent chat");
|
|
237
|
+
const resumeCommand = "guild agent chat";
|
|
238
|
+
let resumeSession;
|
|
239
|
+
let resumeSessionEvents;
|
|
240
|
+
if (options.resume) {
|
|
241
|
+
resumeSession = await fetchSession(client, options.resume);
|
|
242
|
+
resumeSessionEvents = await fetchSessionEvents(client, options.resume);
|
|
243
|
+
}
|
|
244
|
+
const isInteractive = getOutputMode() === "interactive" && !isQuietMode();
|
|
245
|
+
const shouldShowSplash = isInteractive && !options.noSplash && !options.resume;
|
|
246
|
+
if (shouldShowSplash) {
|
|
247
|
+
suppressScrollbackClear();
|
|
248
|
+
}
|
|
249
|
+
const { waitUntilExit } = render_default(
|
|
250
|
+
import_react.default.createElement(ChatApp, {
|
|
251
|
+
initialPrompt,
|
|
252
|
+
version: cliVersion,
|
|
253
|
+
workspaceId: options.workspace,
|
|
254
|
+
versionId: version.id,
|
|
255
|
+
agentName: config?.name,
|
|
256
|
+
showSplash: shouldShowSplash,
|
|
257
|
+
resumeSession,
|
|
258
|
+
resumeEvents: resumeSessionEvents,
|
|
259
|
+
resumeCommand,
|
|
260
|
+
openDashboard: options.open
|
|
261
|
+
}),
|
|
262
|
+
{
|
|
263
|
+
exitOnCtrlC: false
|
|
264
|
+
// We handle Ctrl-C in useInput (raw mode)
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
await waitUntilExit();
|
|
268
|
+
}
|
|
269
|
+
} catch (error) {
|
|
270
|
+
if (error instanceof BuildTimeoutError) {
|
|
271
|
+
console.error("Error: Build did not complete");
|
|
272
|
+
console.error("");
|
|
273
|
+
console.error(error.message);
|
|
274
|
+
console.error("");
|
|
275
|
+
console.error("Check build status:");
|
|
276
|
+
console.error(" guild agent versions");
|
|
277
|
+
process.exit(1);
|
|
278
|
+
}
|
|
279
|
+
if (error instanceof BuildFailedError) {
|
|
280
|
+
console.error(`Error: ${error.message}`);
|
|
281
|
+
process.exit(1);
|
|
282
|
+
}
|
|
283
|
+
const formattedError = handleAxiosError(error);
|
|
284
|
+
if (formattedError.code === ErrorCodes.AUTH_REQUIRED || formattedError.code === ErrorCodes.AUTH_TOKEN_INVALID) {
|
|
285
|
+
format.error("Not authenticated. Run: guild auth login");
|
|
286
|
+
process.exit(1);
|
|
287
|
+
}
|
|
288
|
+
console.error(`Error: ${formattedError.details}`);
|
|
289
|
+
process.exit(1);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
return cmd;
|
|
294
|
+
}
|
|
295
|
+
async function handleAgentChatAction(_promptArgs, _options) {
|
|
296
|
+
const cmd = createAgentChatCommand();
|
|
297
|
+
await cmd.parseAsync(process.argv.slice(3), { from: "user" });
|
|
298
|
+
}
|
|
299
|
+
export {
|
|
300
|
+
createAgentChatCommand,
|
|
301
|
+
handleAgentChatAction
|
|
302
|
+
};
|
|
303
|
+
//# sourceMappingURL=chat-5VX2WJH2.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/commands/agent/chat.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright 2026 Guild.ai\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Command, Option } from 'commander';\nimport { render } from 'ink';\nimport React from 'react';\nimport path from 'path';\nimport open from 'open';\nimport { hyperlink } from '../../lib/colors.js';\nimport {\n getAgentId,\n readAgentFiles,\n buildEphemeralVersion,\n BuildTimeoutError,\n BuildFailedError,\n} from '../../lib/agent-helpers.js';\nimport { ChatApp, createSession, ensureAuthenticated } from '../chat.js';\nimport { getCliVersion } from '../../lib/config.js';\nimport { GuildAPIClient } from '../../lib/api-client.js';\nimport { isQuietMode, getOutputMode } from '../../lib/output-mode.js';\nimport { handleAxiosError, ErrorCodes } from '../../lib/errors.js';\nimport { format } from '../../lib/progress.js';\nimport { suppressScrollbackClear } from '../../lib/alternate-screen.js';\nimport * as readline from 'readline';\nimport { SessionEvent, Session } from '../../lib/session-events.js';\nimport { pollForResponse } from '../../lib/session-polling.js';\nimport { readStdinAsJSON, ensureInteractiveStdin } from '../../lib/stdin.js';\nimport type { AgentVersion } from '../../lib/api-types.js';\nimport { fetchSession, fetchSessionEvents } from '../../lib/session-resume.js';\nimport { getWorkspaceId, getWorkspaceSourceLabel } from '../../lib/guild-config.js';\n\nconst cliVersion = getCliVersion();\n\nexport function createAgentChatCommand(): Command {\n const cmd = new Command('chat');\n\n cmd\n .description('Chat with the agent in current directory')\n .argument('[prompt...]', 'Optional initial prompt for the agent')\n .option('--path <dir>', 'Path to agent directory (defaults to current directory)')\n .option(\n '--workspace <identifier>',\n 'Workspace ID or full name (e.g., owner~workspace-name)'\n )\n .option(\n '--agent-version <id>',\n 'Chat with a specific version (UUID or version number)'\n )\n .option('--no-splash', 'Skip the splash screen animation')\n .option('--resume <session-id>', 'Resume an existing session')\n .option('--open', 'Open session in web dashboard')\n .option('--no-cache', 'Skip ephemeral build cache (force a fresh build)')\n // Accept --mode so `guild agent chat --mode json` works when re-parsed.\n // The actual value is read from process.argv by getOutputMode().\n .addOption(new Option('--mode <format>').hideHelp())\n .addHelpText(\n 'after',\n '\\nTo chat with a published agent by name: guild chat --agent owner~agent-name'\n )\n .action(\n async (\n promptArgs: string[],\n options: {\n path?: string;\n workspace?: string;\n agentVersion?: string;\n noSplash?: boolean;\n resume?: string;\n open?: boolean;\n cache?: boolean;\n }\n ) => {\n try {\n // Get agent ID from guild.json in the specified path\n const agentPath = options.path || '.';\n const { agentId, config } = await getAgentId(undefined, agentPath);\n const initialPrompt = promptArgs.length > 0 ? promptArgs.join(' ') : 'Hello';\n\n // If using JSON input, read it early (before auth) for fast failure on bad input\n const outputMode = getOutputMode();\n let inputData: unknown | undefined;\n if (outputMode === 'json') {\n try {\n inputData = await readStdinAsJSON();\n } catch (error: unknown) {\n const err = error as Error;\n console.error(`Error: ${err.message}`);\n console.error('');\n console.error('Example usage:');\n console.error(\n ' echo \\'{\"prompt\": \"test\"}\\' | guild agent chat --mode json'\n );\n console.error(' guild agent chat --mode json < input.json');\n process.exit(1);\n }\n }\n\n // Check authentication (uses shared function from chat.tsx)\n await ensureAuthenticated();\n\n const client = new GuildAPIClient();\n const quiet = isQuietMode();\n const resolvedPath = path.resolve(agentPath);\n\n // Resolve the version to chat with.\n // Default: create ephemeral version from working directory.\n // --version: use a specific existing version.\n let version: AgentVersion;\n let ephemeralCached = false;\n\n if (options.agentVersion) {\n // Explicit version: look it up by ID or version number\n const existingVersions = (await client.get(\n `/agents/${agentId}/versions`\n )) as { items: AgentVersion[] };\n const match = existingVersions.items.find(\n (v) =>\n v.id === options.agentVersion ||\n v.version_number === options.agentVersion\n );\n\n if (!match) {\n console.error(`Error: Version not found: ${options.agentVersion}`);\n console.error('');\n console.error('List available versions:');\n console.error(` guild agent versions ${agentId}`);\n process.exit(1);\n }\n\n version = match;\n } else {\n if (!quiet) {\n console.error('Building agent...');\n }\n\n const agentFiles = await readAgentFiles(resolvedPath);\n const noCache = options.cache === false;\n const result = await buildEphemeralVersion(\n client,\n agentId,\n agentFiles,\n resolvedPath,\n '[Chat] Ephemeral development version',\n { noCache }\n );\n version = result.version;\n ephemeralCached = result.cached;\n\n if (ephemeralCached && !quiet) {\n console.error('No changes detected, reusing cached build.');\n }\n }\n\n // Branch: JSON/JSONL modes vs interactive\n if (outputMode === 'json' || outputMode === 'jsonl') {\n // For JSON mode with piped input, use the piped data as the initial prompt\n // so the agent receives it as its input (not the default 'Hello')\n const sessionPrompt =\n outputMode === 'json' && inputData\n ? JSON.stringify(inputData)\n : initialPrompt;\n\n // Pre-resolve workspace so we can show the source label in output.\n // When --workspace is given explicitly, no source label is shown.\n let resolvedWorkspaceId = options.workspace;\n let workspaceSourceLabel: string | undefined;\n if (!resolvedWorkspaceId) {\n const wsResolved = await getWorkspaceId(resolvedPath);\n resolvedWorkspaceId = wsResolved?.workspaceId;\n workspaceSourceLabel = wsResolved\n ? getWorkspaceSourceLabel(wsResolved.source)\n : undefined;\n }\n\n const session = await createSession(\n client,\n resolvedWorkspaceId,\n sessionPrompt,\n version.id\n );\n\n if (!quiet) {\n console.log(`\u2713 Agent: ${config?.name || agentId}`);\n if (session.workspace_id) {\n const workspaceDisplay = workspaceSourceLabel\n ? `${session.workspace_id} (from ${workspaceSourceLabel})`\n : session.workspace_id;\n console.log(`\u2713 Workspace: ${workspaceDisplay}`);\n }\n const sessionLink = session.session_url\n ? hyperlink(session.id, session.session_url)\n : session.id;\n console.log(`\u2713 Session: ${sessionLink}`);\n console.log('');\n }\n\n if (options.open && session.session_url) {\n await open(session.session_url);\n }\n\n if (outputMode === 'json' && inputData) {\n // JSON one-shot mode \u2014 input was passed as initial_prompt during\n // session creation, so the agent already has it. Just poll for the response.\n try {\n const { response } = await pollForResponse(\n client,\n session.id,\n undefined\n );\n\n if (!response) {\n console.error('Timeout: No response received from agent');\n process.exit(1);\n }\n\n if (quiet) {\n console.log(response);\n } else {\n console.log(`< ${response}`);\n console.log('');\n console.log('\u2713 Chat complete');\n }\n process.exit(0);\n } catch (error: unknown) {\n const formattedError = handleAxiosError(error);\n console.error(`Error: ${formattedError.details}`);\n process.exit(1);\n }\n } else if (outputMode === 'jsonl') {\n // JSONL line-by-line mode\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n });\n\n let lineNumber = 0;\n let processedCount = 0;\n let lastEventId: string | undefined;\n\n for await (const line of rl) {\n lineNumber++;\n\n if (!line.trim()) continue;\n\n try {\n const jsonInput = JSON.parse(line);\n\n if (!quiet) {\n console.error(`Processing line ${lineNumber}...`);\n }\n\n await client.post(`/sessions/${session.id}/events`, {\n mode: 'json',\n content: jsonInput,\n });\n\n const result = await pollForResponse(client, session.id, lastEventId);\n lastEventId = result.lastEventId;\n\n if (!result.response) {\n console.error(`Timeout: No response for line ${lineNumber}`);\n continue;\n }\n\n const response = result.response;\n\n if (quiet) {\n console.log(response);\n } else {\n console.log(`< ${response}`);\n console.log('');\n }\n\n processedCount++;\n } catch (error: unknown) {\n const err = error as Error;\n console.error(`Error: Invalid JSON on line ${lineNumber}`);\n console.error(`Failed to parse JSON: ${err.message}`);\n console.error('Skipping line and continuing...');\n }\n }\n\n if (!quiet) {\n console.log(`\\n\u2713 Processed ${processedCount} messages`);\n }\n process.exit(0);\n }\n } else {\n // Interactive mode: use shared ChatApp with full features\n // (splash animation, task panel, status line, etc.)\n ensureInteractiveStdin('guild agent chat');\n const resumeCommand = 'guild agent chat';\n\n // Handle --resume: fetch existing session + events\n let resumeSession: Session | undefined;\n let resumeSessionEvents: SessionEvent[] | undefined;\n if (options.resume) {\n resumeSession = await fetchSession(client, options.resume);\n resumeSessionEvents = await fetchSessionEvents(client, options.resume);\n }\n\n const isInteractive = getOutputMode() === 'interactive' && !isQuietMode();\n const shouldShowSplash =\n isInteractive && !options.noSplash && !options.resume;\n\n if (shouldShowSplash) {\n suppressScrollbackClear();\n }\n\n const { waitUntilExit } = render(\n React.createElement(ChatApp, {\n initialPrompt,\n version: cliVersion,\n workspaceId: options.workspace,\n versionId: version.id,\n agentName: config?.name,\n showSplash: shouldShowSplash,\n resumeSession,\n resumeEvents: resumeSessionEvents,\n resumeCommand,\n openDashboard: options.open,\n }),\n {\n exitOnCtrlC: false, // We handle Ctrl-C in useInput (raw mode)\n }\n );\n\n await waitUntilExit();\n }\n } catch (error: unknown) {\n if (error instanceof BuildTimeoutError) {\n console.error('Error: Build did not complete');\n console.error('');\n console.error(error.message);\n console.error('');\n console.error('Check build status:');\n console.error(' guild agent versions');\n process.exit(1);\n }\n\n if (error instanceof BuildFailedError) {\n console.error(`Error: ${error.message}`);\n process.exit(1);\n }\n\n const formattedError = handleAxiosError(error);\n\n if (\n formattedError.code === ErrorCodes.AUTH_REQUIRED ||\n formattedError.code === ErrorCodes.AUTH_TOKEN_INVALID\n ) {\n format.error('Not authenticated. Run: guild auth login');\n process.exit(1);\n }\n\n console.error(`Error: ${formattedError.details}`);\n process.exit(1);\n }\n }\n );\n\n return cmd;\n}\n\n// Thin wrapper for lazy-loading from index.ts (avoids importing React at startup)\nexport async function handleAgentChatAction(\n _promptArgs: string[],\n _options: Record<string, unknown>\n): Promise<void> {\n const cmd = createAgentChatCommand();\n await cmd.parseAsync(process.argv.slice(3), { from: 'user' });\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,mBAAkB;AAClB,OAAO,UAAU;AAiBjB,YAAY,cAAc;AAQ1B,IAAM,aAAa,cAAc;AAE1B,SAAS,yBAAkC;AAChD,QAAM,MAAM,IAAI,QAAQ,MAAM;AAE9B,MACG,YAAY,0CAA0C,EACtD,SAAS,eAAe,uCAAuC,EAC/D,OAAO,gBAAgB,yDAAyD,EAChF;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,OAAO,eAAe,kCAAkC,EACxD,OAAO,yBAAyB,4BAA4B,EAC5D,OAAO,UAAU,+BAA+B,EAChD,OAAO,cAAc,kDAAkD,EAGvE,UAAU,IAAI,OAAO,iBAAiB,EAAE,SAAS,CAAC,EAClD;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC,OACE,YACA,YASG;AACH,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AQ,MAAM,MAAM,OAAO;AAC3B,kBAAQ,MAAM,EAAE;AAChB,kBAAQ,MAAM,qBAAqB;AACnC,kBAAQ,MAAM,wBAAwB;AACtC,kBAAQ,KAAK,CAAC;AAAA,QAChB;AAEA,YAAI,iBAAiB,kBAAkB;AACrC,kBAAQ,MAAM,UAAU,MAAM,OAAO,EAAE;AACvC,kBAAQ,KAAK,CAAC;AAAA,QAChB;AAEA,cAAM,iBAAiB,iBAAiB,KAAK;AAE7C,YACE,eAAe,SAAS,WAAW,iBACnC,eAAe,SAAS,WAAW,oBACnC;AACA,iBAAO,MAAM,0CAA0C;AACvD,kBAAQ,KAAK,CAAC;AAAA,QAChB;AAEA,gBAAQ,MAAM,UAAU,eAAe,OAAO,EAAE;AAChD,gBAAQ,KAAK,CAAC;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AACT;AAGA,eAAsB,sBACpB,aACA,UACe;AACf,QAAM,MAAM,uBAAuB;AACnC,QAAM,IAAI,WAAW,QAAQ,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC;AAC9D;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createRequire as _cjsReq } from 'module'; if(typeof require === 'undefined') var require = _cjsReq(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ChatApp,
|
|
4
|
+
WorkspaceNotConfiguredError,
|
|
5
|
+
WorkspaceNotFoundError,
|
|
6
|
+
createChatCommand,
|
|
7
|
+
createSession,
|
|
8
|
+
ensureAuthenticated,
|
|
9
|
+
handleChatAction
|
|
10
|
+
} from "./chunk-IBRKVGMZ.js";
|
|
11
|
+
import "./chunk-DOIYVBNY.js";
|
|
12
|
+
import "./chunk-56YCMGL3.js";
|
|
13
|
+
import "./chunk-SPZPZXUN.js";
|
|
14
|
+
import "./chunk-RIG2HZWM.js";
|
|
15
|
+
import "./chunk-LFMQJOKC.js";
|
|
16
|
+
import "./chunk-M347HP6M.js";
|
|
17
|
+
import "./chunk-ENKEEJ45.js";
|
|
18
|
+
import "./chunk-VVSOU6ON.js";
|
|
19
|
+
import "./chunk-PNCUR4OB.js";
|
|
20
|
+
import "./chunk-X3ADGWOF.js";
|
|
21
|
+
import "./chunk-OYQ476FQ.js";
|
|
22
|
+
export {
|
|
23
|
+
ChatApp,
|
|
24
|
+
WorkspaceNotConfiguredError,
|
|
25
|
+
WorkspaceNotFoundError,
|
|
26
|
+
createChatCommand,
|
|
27
|
+
createSession,
|
|
28
|
+
ensureAuthenticated,
|
|
29
|
+
handleChatAction
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chat-SIKDYZQK.js.map
|