agentrace 0.0.8 → 0.0.10
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/commands/init.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { ProxyAgent } from "undici";
|
|
3
4
|
import { saveConfig, getConfigPath } from "../config/manager.js";
|
|
4
5
|
import { installHooks, installMcpServer, installPreToolUseHook } from "../hooks/installer.js";
|
|
5
6
|
import { startCallbackServer, getRandomPort, generateToken, } from "../utils/callback-server.js";
|
|
@@ -25,13 +26,15 @@ export async function initCommand(options = {}) {
|
|
|
25
26
|
console.error("Error: Invalid URL format");
|
|
26
27
|
process.exit(1);
|
|
27
28
|
}
|
|
28
|
-
// Validate proxy URL if provided
|
|
29
|
+
// Validate proxy URL if provided (using ProxyAgent to match actual usage)
|
|
29
30
|
if (options.proxy) {
|
|
30
31
|
try {
|
|
31
|
-
new
|
|
32
|
+
new ProxyAgent(options.proxy);
|
|
32
33
|
}
|
|
33
|
-
catch {
|
|
34
|
+
catch (error) {
|
|
34
35
|
console.error("Error: Invalid proxy URL format");
|
|
36
|
+
console.error(` ${error instanceof Error ? error.message : String(error)}`);
|
|
37
|
+
console.error("");
|
|
35
38
|
console.error("Example: http://proxy.example.com:8080");
|
|
36
39
|
console.error(" http://user:pass@proxy.example.com:8080");
|
|
37
40
|
process.exit(1);
|
|
@@ -153,6 +153,7 @@ IMPORTANT GUIDELINES:
|
|
|
153
153
|
description: plan.description,
|
|
154
154
|
status: plan.status,
|
|
155
155
|
git_remote_url: plan.project?.canonical_git_repository || null,
|
|
156
|
+
url: plan.url || null,
|
|
156
157
|
updated_at: plan.updated_at,
|
|
157
158
|
collaborators: plan.collaborators.map((c) => c.display_name).join(", "),
|
|
158
159
|
}));
|
|
@@ -181,11 +182,15 @@ IMPORTANT GUIDELINES:
|
|
|
181
182
|
server.tool("read_plan", TOOL_DESCRIPTIONS.read_plan, ReadPlanSchema.shape, async (args) => {
|
|
182
183
|
try {
|
|
183
184
|
const plan = await getClient().getPlan(args.id);
|
|
185
|
+
let text = `# ${plan.description}\n\nStatus: ${plan.status}\n\n${plan.body}`;
|
|
186
|
+
if (plan.url) {
|
|
187
|
+
text += `\n\n---\nURL: ${plan.url}`;
|
|
188
|
+
}
|
|
184
189
|
return {
|
|
185
190
|
content: [
|
|
186
191
|
{
|
|
187
192
|
type: "text",
|
|
188
|
-
text
|
|
193
|
+
text,
|
|
189
194
|
},
|
|
190
195
|
],
|
|
191
196
|
};
|
|
@@ -213,11 +218,15 @@ IMPORTANT GUIDELINES:
|
|
|
213
218
|
claude_session_id: sessionInfo.session_id,
|
|
214
219
|
tool_use_id: sessionInfo.tool_use_id,
|
|
215
220
|
});
|
|
221
|
+
let text = `Plan created successfully.\n\nID: ${plan.id}\nDescription: ${plan.description}`;
|
|
222
|
+
if (plan.url) {
|
|
223
|
+
text += `\nURL: ${plan.url}`;
|
|
224
|
+
}
|
|
216
225
|
return {
|
|
217
226
|
content: [
|
|
218
227
|
{
|
|
219
228
|
type: "text",
|
|
220
|
-
text
|
|
229
|
+
text,
|
|
221
230
|
},
|
|
222
231
|
],
|
|
223
232
|
};
|
|
@@ -251,11 +260,15 @@ IMPORTANT GUIDELINES:
|
|
|
251
260
|
claude_session_id: sessionInfo.session_id,
|
|
252
261
|
tool_use_id: sessionInfo.tool_use_id,
|
|
253
262
|
});
|
|
263
|
+
let text = `Plan updated successfully.\n\nID: ${plan.id}\nDescription: ${plan.description}`;
|
|
264
|
+
if (plan.url) {
|
|
265
|
+
text += `\nURL: ${plan.url}`;
|
|
266
|
+
}
|
|
254
267
|
return {
|
|
255
268
|
content: [
|
|
256
269
|
{
|
|
257
270
|
type: "text",
|
|
258
|
-
text
|
|
271
|
+
text,
|
|
259
272
|
},
|
|
260
273
|
],
|
|
261
274
|
};
|
|
@@ -276,11 +289,15 @@ IMPORTANT GUIDELINES:
|
|
|
276
289
|
server.tool("set_plan_status", TOOL_DESCRIPTIONS.set_plan_status, SetPlanStatusSchema.shape, async (args) => {
|
|
277
290
|
try {
|
|
278
291
|
const plan = await getClient().setStatus(args.id, args.status, args.message);
|
|
292
|
+
let text = `Plan status updated successfully.\n\nID: ${plan.id}\nDescription: ${plan.description}\nStatus: ${plan.status}`;
|
|
293
|
+
if (plan.url) {
|
|
294
|
+
text += `\nURL: ${plan.url}`;
|
|
295
|
+
}
|
|
279
296
|
return {
|
|
280
297
|
content: [
|
|
281
298
|
{
|
|
282
299
|
type: "text",
|
|
283
|
-
text
|
|
300
|
+
text,
|
|
284
301
|
},
|
|
285
302
|
],
|
|
286
303
|
};
|
package/dist/commands/send.js
CHANGED
|
@@ -3,6 +3,8 @@ import { loadConfig } from "../config/manager.js";
|
|
|
3
3
|
import { getNewLines, saveCursor, hasCursor } from "../config/cursor.js";
|
|
4
4
|
import { sendIngest } from "../utils/http.js";
|
|
5
5
|
import { findSessionFile, extractCwdFromTranscript, } from "../utils/session-finder.js";
|
|
6
|
+
// Event types that should not be sent to the server (high-volume, not needed for display)
|
|
7
|
+
const SKIPPED_EVENT_TYPES = ["progress", "file-history-snapshot"];
|
|
6
8
|
function getGitRemoteUrl(cwd) {
|
|
7
9
|
try {
|
|
8
10
|
const url = execSync("git remote get-url origin", {
|
|
@@ -53,11 +55,16 @@ async function sendTranscript(params) {
|
|
|
53
55
|
}
|
|
54
56
|
process.exit(0);
|
|
55
57
|
}
|
|
56
|
-
// Parse JSONL lines
|
|
58
|
+
// Parse JSONL lines and filter out skipped event types
|
|
57
59
|
const transcriptLines = [];
|
|
58
60
|
for (const line of lines) {
|
|
59
61
|
try {
|
|
60
|
-
|
|
62
|
+
const parsed = JSON.parse(line);
|
|
63
|
+
// Skip high-volume event types that are not needed for display
|
|
64
|
+
if (typeof parsed.type === "string" && SKIPPED_EVENT_TYPES.includes(parsed.type)) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
transcriptLines.push(parsed);
|
|
61
68
|
}
|
|
62
69
|
catch {
|
|
63
70
|
// Skip invalid JSON lines
|