@runcofactor/cli 0.10.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/README.md +125 -0
- package/dist/api-catalog-GFGCLVS4.js +401 -0
- package/dist/api-catalog-GFGCLVS4.js.map +1 -0
- package/dist/attachment-SJC7D7FY.js +276 -0
- package/dist/attachment-SJC7D7FY.js.map +1 -0
- package/dist/auth-EN6NQCJY.js +31 -0
- package/dist/auth-EN6NQCJY.js.map +1 -0
- package/dist/bin.js +7 -0
- package/dist/bin.js.map +1 -0
- package/dist/chunk-3CZU7XCS.js +272 -0
- package/dist/chunk-3CZU7XCS.js.map +1 -0
- package/dist/chunk-4NRDONSC.js +1048 -0
- package/dist/chunk-4NRDONSC.js.map +1 -0
- package/dist/chunk-4PNOV7OV.js +51980 -0
- package/dist/chunk-4PNOV7OV.js.map +1 -0
- package/dist/chunk-52IO7ACJ.js +2941 -0
- package/dist/chunk-52IO7ACJ.js.map +1 -0
- package/dist/chunk-6LEZCKKV.js +663 -0
- package/dist/chunk-6LEZCKKV.js.map +1 -0
- package/dist/chunk-A4OFTUVV.js +170 -0
- package/dist/chunk-A4OFTUVV.js.map +1 -0
- package/dist/chunk-B2VISN2V.js +2459 -0
- package/dist/chunk-B2VISN2V.js.map +1 -0
- package/dist/chunk-CLAWT7BJ.js +271 -0
- package/dist/chunk-CLAWT7BJ.js.map +1 -0
- package/dist/chunk-GKY2KXO5.js +281 -0
- package/dist/chunk-GKY2KXO5.js.map +1 -0
- package/dist/chunk-I4QLI3JO.js +413 -0
- package/dist/chunk-I4QLI3JO.js.map +1 -0
- package/dist/chunk-IMPZAX6L.js +180 -0
- package/dist/chunk-IMPZAX6L.js.map +1 -0
- package/dist/chunk-J6SH7GQT.js +241 -0
- package/dist/chunk-J6SH7GQT.js.map +1 -0
- package/dist/chunk-JDBCZ3Z2.js +298 -0
- package/dist/chunk-JDBCZ3Z2.js.map +1 -0
- package/dist/chunk-JICSYFRJ.js +46 -0
- package/dist/chunk-JICSYFRJ.js.map +1 -0
- package/dist/chunk-JWHYXEA2.js +32 -0
- package/dist/chunk-JWHYXEA2.js.map +1 -0
- package/dist/chunk-N7HFALX3.js +88 -0
- package/dist/chunk-N7HFALX3.js.map +1 -0
- package/dist/chunk-Q4BO4Z5V.js +178 -0
- package/dist/chunk-Q4BO4Z5V.js.map +1 -0
- package/dist/chunk-QFDOWABX.js +195 -0
- package/dist/chunk-QFDOWABX.js.map +1 -0
- package/dist/chunk-SJJW77WN.js +605 -0
- package/dist/chunk-SJJW77WN.js.map +1 -0
- package/dist/chunk-VKVL7WBN.js +50 -0
- package/dist/chunk-VKVL7WBN.js.map +1 -0
- package/dist/chunk-WOHL4FTB.js +353 -0
- package/dist/chunk-WOHL4FTB.js.map +1 -0
- package/dist/chunk-XQXVG7RA.js +426 -0
- package/dist/chunk-XQXVG7RA.js.map +1 -0
- package/dist/chunk-ZD3KHESI.js +94 -0
- package/dist/chunk-ZD3KHESI.js.map +1 -0
- package/dist/credential-COLTBV6D.js +450 -0
- package/dist/credential-COLTBV6D.js.map +1 -0
- package/dist/credential-template-EEPYFG7R.js +291 -0
- package/dist/credential-template-EEPYFG7R.js.map +1 -0
- package/dist/debug-workflow-KOVH5GOP.js +259 -0
- package/dist/debug-workflow-KOVH5GOP.js.map +1 -0
- package/dist/dist-44PZR7BQ.js +423 -0
- package/dist/dist-44PZR7BQ.js.map +1 -0
- package/dist/docs-3SSORHB5.js +366 -0
- package/dist/docs-3SSORHB5.js.map +1 -0
- package/dist/doctor-OTSIWV6G.js +132 -0
- package/dist/doctor-OTSIWV6G.js.map +1 -0
- package/dist/feature-flag-T2LRZME3.js +283 -0
- package/dist/feature-flag-T2LRZME3.js.map +1 -0
- package/dist/file-type-S3UUBVCT.js +4205 -0
- package/dist/file-type-S3UUBVCT.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +982 -0
- package/dist/index.js.map +1 -0
- package/dist/init-TGWRECT2.js +208 -0
- package/dist/init-TGWRECT2.js.map +1 -0
- package/dist/install-DXSNWZKO.js +295 -0
- package/dist/install-DXSNWZKO.js.map +1 -0
- package/dist/issues-XIZOPX6T.js +564 -0
- package/dist/issues-XIZOPX6T.js.map +1 -0
- package/dist/knobs-NBINZIUB.js +295 -0
- package/dist/knobs-NBINZIUB.js.map +1 -0
- package/dist/list-3TDHK637.js +59 -0
- package/dist/list-3TDHK637.js.map +1 -0
- package/dist/local-HICVD6PU.js +100 -0
- package/dist/local-HICVD6PU.js.map +1 -0
- package/dist/login-UOIUXVUK.js +315 -0
- package/dist/login-UOIUXVUK.js.map +1 -0
- package/dist/mcp-54IJEOUA.js +1956 -0
- package/dist/mcp-54IJEOUA.js.map +1 -0
- package/dist/pdf-extract-ABWV3L5X.js +13 -0
- package/dist/pdf-extract-ABWV3L5X.js.map +1 -0
- package/dist/pdfjs-DQ2YA5S3.js +41561 -0
- package/dist/pdfjs-DQ2YA5S3.js.map +1 -0
- package/dist/property-UXLOLPTD.js +701 -0
- package/dist/property-UXLOLPTD.js.map +1 -0
- package/dist/property-skill-guide.md +189 -0
- package/dist/psql-BYUUNLGG.js +115 -0
- package/dist/psql-BYUUNLGG.js.map +1 -0
- package/dist/record-4TR2UIIS.js +233 -0
- package/dist/record-4TR2UIIS.js.map +1 -0
- package/dist/redis-35VBUYW7.js +116 -0
- package/dist/redis-35VBUYW7.js.map +1 -0
- package/dist/release-OOLTUBUT.js +354 -0
- package/dist/release-OOLTUBUT.js.map +1 -0
- package/dist/sandbox-XGSUU6G7.js +2046 -0
- package/dist/sandbox-XGSUU6G7.js.map +1 -0
- package/dist/scenarios-GWLJEGHA.js +280 -0
- package/dist/scenarios-GWLJEGHA.js.map +1 -0
- package/dist/session-MYFNZPRP.js +2414 -0
- package/dist/session-MYFNZPRP.js.map +1 -0
- package/dist/skill-KM34LDMO.js +1839 -0
- package/dist/skill-KM34LDMO.js.map +1 -0
- package/dist/skills/debug-run/SKILL.md +262 -0
- package/dist/skills/debug-run/history/1.0.0.md +244 -0
- package/dist/skills/debug-run/history/1.0.1.md +245 -0
- package/dist/skills/debug-run/history/1.0.2.md +254 -0
- package/dist/skills/debug-run/history/1.1.0.md +262 -0
- package/dist/skills/debug-run/version.json +3 -0
- package/dist/spec-RA3CFEKG.js +951 -0
- package/dist/spec-RA3CFEKG.js.map +1 -0
- package/dist/src-LB4HBTJQ.js +1516 -0
- package/dist/src-LB4HBTJQ.js.map +1 -0
- package/dist/src-N3TPKGTY.js +244 -0
- package/dist/src-N3TPKGTY.js.map +1 -0
- package/dist/src-UVDX5UP6.js +17 -0
- package/dist/src-UVDX5UP6.js.map +1 -0
- package/dist/start-PSEQSQA3.js +151 -0
- package/dist/start-PSEQSQA3.js.map +1 -0
- package/dist/tag-YY6YAABQ.js +22 -0
- package/dist/tag-YY6YAABQ.js.map +1 -0
- package/dist/task-IQC3YR5K.js +922 -0
- package/dist/task-IQC3YR5K.js.map +1 -0
- package/dist/test-suite-DZNJFXDW.js +394 -0
- package/dist/test-suite-DZNJFXDW.js.map +1 -0
- package/dist/trace-HXIW7U2D.js +14 -0
- package/dist/trace-HXIW7U2D.js.map +1 -0
- package/dist/triage-ORG45R5W.js +16 -0
- package/dist/triage-ORG45R5W.js.map +1 -0
- package/dist/upgrade-L2VYMP2V.js +61 -0
- package/dist/upgrade-L2VYMP2V.js.map +1 -0
- package/dist/workflow-XYFH5LTP.js +3708 -0
- package/dist/workflow-XYFH5LTP.js.map +1 -0
- package/dist/workflow-cache-NQJQFWMV.js +253 -0
- package/dist/workflow-cache-NQJQFWMV.js.map +1 -0
- package/dist/workflow-debug-BGD4UIXU.js +927 -0
- package/dist/workflow-debug-BGD4UIXU.js.map +1 -0
- package/dist/workflow-proposals-MTUDX46O.js +382 -0
- package/dist/workflow-proposals-MTUDX46O.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
import { createRequire as __cr } from "module"; const require = __cr(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
apiRequest,
|
|
4
|
+
getApplicationIdArg
|
|
5
|
+
} from "./chunk-WOHL4FTB.js";
|
|
6
|
+
import "./chunk-SJJW77WN.js";
|
|
7
|
+
import "./chunk-3CZU7XCS.js";
|
|
8
|
+
import {
|
|
9
|
+
getArgValue,
|
|
10
|
+
hasFlag,
|
|
11
|
+
resolveConfig
|
|
12
|
+
} from "./chunk-A4OFTUVV.js";
|
|
13
|
+
import "./chunk-JWHYXEA2.js";
|
|
14
|
+
import "./chunk-VKVL7WBN.js";
|
|
15
|
+
|
|
16
|
+
// src/issues.ts
|
|
17
|
+
import process from "process";
|
|
18
|
+
var SEVERITY_ICONS = {
|
|
19
|
+
high: "!!!",
|
|
20
|
+
medium: "!!",
|
|
21
|
+
low: "!",
|
|
22
|
+
unknown: "?"
|
|
23
|
+
};
|
|
24
|
+
var DIAGNOSTIC_CATEGORY_LABELS = {
|
|
25
|
+
software_bug: "Software Bug",
|
|
26
|
+
dependency_issue: "Dependency Issue",
|
|
27
|
+
agent_confusion: "Agent Confusion",
|
|
28
|
+
platform_error: "Platform Error"
|
|
29
|
+
};
|
|
30
|
+
function formatStatusLabel(status) {
|
|
31
|
+
switch (status) {
|
|
32
|
+
case "open":
|
|
33
|
+
return "Open";
|
|
34
|
+
case "closed":
|
|
35
|
+
return "Closed";
|
|
36
|
+
case "not_a_bug":
|
|
37
|
+
return "Not a Bug";
|
|
38
|
+
default:
|
|
39
|
+
return status;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function formatSeverity(severity) {
|
|
43
|
+
return severity.charAt(0).toUpperCase() + severity.slice(1);
|
|
44
|
+
}
|
|
45
|
+
function formatRelative(value) {
|
|
46
|
+
if (!value) return "\u2014";
|
|
47
|
+
try {
|
|
48
|
+
const date = new Date(value);
|
|
49
|
+
const now = /* @__PURE__ */ new Date();
|
|
50
|
+
const diffMs = now.getTime() - date.getTime();
|
|
51
|
+
const diffMins = Math.floor(diffMs / 6e4);
|
|
52
|
+
if (diffMins < 1) return "just now";
|
|
53
|
+
if (diffMins < 60) return `${diffMins}m ago`;
|
|
54
|
+
const diffHours = Math.floor(diffMins / 60);
|
|
55
|
+
if (diffHours < 24) return `${diffHours}h ago`;
|
|
56
|
+
const diffDays = Math.floor(diffHours / 24);
|
|
57
|
+
if (diffDays < 30) return `${diffDays}d ago`;
|
|
58
|
+
return date.toISOString().slice(0, 10);
|
|
59
|
+
} catch {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function truncate(text, max) {
|
|
64
|
+
if (text.length <= max) return text;
|
|
65
|
+
return text.slice(0, max - 1) + "\u2026";
|
|
66
|
+
}
|
|
67
|
+
function formatIssueDetailMarkdown(issue, consoleErrors, networkErrors) {
|
|
68
|
+
const sections = [];
|
|
69
|
+
const occ = issue.latestOccurrence;
|
|
70
|
+
sections.push(`# ${issue.title}`);
|
|
71
|
+
const meta = [];
|
|
72
|
+
meta.push(`**Status:** ${formatStatusLabel(issue.status)}`);
|
|
73
|
+
meta.push(`**Severity:** ${formatSeverity(issue.severity)}`);
|
|
74
|
+
meta.push(`**Category:** ${issue.category.label}`);
|
|
75
|
+
sections.push(meta.join(" | "));
|
|
76
|
+
if (occ?.primaryUrl) {
|
|
77
|
+
sections.push(`**URL:** ${occ.primaryUrl}`);
|
|
78
|
+
}
|
|
79
|
+
if (occ?.workflowSourceInfo) {
|
|
80
|
+
sections.push(
|
|
81
|
+
`**Workflow:** ${occ.workflowSourceInfo.workflowId} | **Workflow Run:** ${occ.workflowSourceInfo.workflowRunId}`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
const timeParts = [];
|
|
85
|
+
timeParts.push(`**First seen:** ${formatRelative(issue.firstSeenAt)}`);
|
|
86
|
+
timeParts.push(`**Last seen:** ${formatRelative(issue.lastSeenAt)}`);
|
|
87
|
+
timeParts.push(`**Occurrences:** ${issue.occurrenceCount}`);
|
|
88
|
+
sections.push(timeParts.join(" | "));
|
|
89
|
+
const summary = occ?.ticketUserFacingSummary?.trim();
|
|
90
|
+
if (summary) {
|
|
91
|
+
sections.push(`## Summary
|
|
92
|
+
${summary}`);
|
|
93
|
+
}
|
|
94
|
+
const reproSteps = occ?.ticketReproSteps?.trim();
|
|
95
|
+
if (reproSteps) {
|
|
96
|
+
sections.push(`## Reproduction Steps
|
|
97
|
+
${reproSteps}`);
|
|
98
|
+
}
|
|
99
|
+
const diagnostic = occ?.diagnosticJson;
|
|
100
|
+
if (diagnostic) {
|
|
101
|
+
const diagParts = [];
|
|
102
|
+
const categoryLabel = DIAGNOSTIC_CATEGORY_LABELS[diagnostic.category] ?? diagnostic.category;
|
|
103
|
+
diagParts.push("## Diagnostic Analysis");
|
|
104
|
+
diagParts.push(
|
|
105
|
+
`**Category:** ${categoryLabel} (${Math.round(diagnostic.confidence)}% confidence)`
|
|
106
|
+
);
|
|
107
|
+
diagParts.push(`**${diagnostic.title}**`);
|
|
108
|
+
diagParts.push(diagnostic.analysis);
|
|
109
|
+
if (diagnostic.smokingGun) {
|
|
110
|
+
const gun = diagnostic.smokingGun;
|
|
111
|
+
const gunLines = [`> **Key Evidence:** ${gun.description}`];
|
|
112
|
+
if (gun.detail) {
|
|
113
|
+
gunLines.push(`> \`${gun.detail}\``);
|
|
114
|
+
}
|
|
115
|
+
diagParts.push(gunLines.join("\n"));
|
|
116
|
+
}
|
|
117
|
+
diagParts.push(`**Recommendation:** ${diagnostic.recommendation}`);
|
|
118
|
+
sections.push(diagParts.join("\n\n"));
|
|
119
|
+
}
|
|
120
|
+
if (consoleErrors.length > 0) {
|
|
121
|
+
const logLines = consoleErrors.map((entry) => {
|
|
122
|
+
const loc = entry.location ? ` (${entry.location})` : "";
|
|
123
|
+
return `[${entry.type}] ${entry.text}${loc}`;
|
|
124
|
+
});
|
|
125
|
+
sections.push(`## Console Errors
|
|
126
|
+
\`\`\`
|
|
127
|
+
${logLines.join("\n")}
|
|
128
|
+
\`\`\``);
|
|
129
|
+
}
|
|
130
|
+
if (networkErrors.length > 0) {
|
|
131
|
+
const rows = networkErrors.map((entry) => {
|
|
132
|
+
const status = entry.status === null || entry.status === 0 ? "0 (failed)" : String(entry.status);
|
|
133
|
+
const duration = entry.durationMs !== null && entry.durationMs !== void 0 ? `${entry.durationMs}ms` : "\u2014";
|
|
134
|
+
return `| ${entry.method} | ${entry.url} | ${status} | ${duration} |`;
|
|
135
|
+
});
|
|
136
|
+
sections.push(
|
|
137
|
+
`## Network Errors
|
|
138
|
+
| Method | URL | Status | Duration |
|
|
139
|
+
|--------|-----|--------|----------|
|
|
140
|
+
${rows.join("\n")}`
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
return sections.join("\n\n");
|
|
144
|
+
}
|
|
145
|
+
function formatIssueListMarkdown(data, pagination) {
|
|
146
|
+
const sections = [];
|
|
147
|
+
sections.push(
|
|
148
|
+
`# Issues (page ${pagination.page} of ${pagination.totalPages}, ${pagination.totalItems} total)`
|
|
149
|
+
);
|
|
150
|
+
if (data.length === 0) {
|
|
151
|
+
sections.push("No issues found.");
|
|
152
|
+
return sections.join("\n\n");
|
|
153
|
+
}
|
|
154
|
+
const header = "| Severity | Title | Status | Last Seen | Occurrences |";
|
|
155
|
+
const divider = "|----------|-------|--------|-----------|-------------|";
|
|
156
|
+
const rows = data.map(
|
|
157
|
+
(issue) => `| ${issue.severity} | ${truncate(issue.title, 60)} | ${issue.status} | ${formatRelative(issue.lastSeenAt)} | ${issue.occurrenceCount} |`
|
|
158
|
+
);
|
|
159
|
+
sections.push([header, divider, ...rows].join("\n"));
|
|
160
|
+
return sections.join("\n\n");
|
|
161
|
+
}
|
|
162
|
+
async function fetchDiagnostics(apiUrl, token, issue) {
|
|
163
|
+
const occ = issue.latestOccurrence;
|
|
164
|
+
if (!occ) return { consoleErrors: [], networkErrors: [] };
|
|
165
|
+
let consoleErrors = [];
|
|
166
|
+
let networkErrors = [];
|
|
167
|
+
try {
|
|
168
|
+
const [consoleRes, networkRes] = await Promise.all([
|
|
169
|
+
apiRequest(
|
|
170
|
+
apiUrl,
|
|
171
|
+
token,
|
|
172
|
+
"GET",
|
|
173
|
+
`/v2/issues/${issue.id}/occurrences/${occ.id}/console-logs`
|
|
174
|
+
),
|
|
175
|
+
apiRequest(
|
|
176
|
+
apiUrl,
|
|
177
|
+
token,
|
|
178
|
+
"GET",
|
|
179
|
+
`/v2/issues/${issue.id}/occurrences/${occ.id}/network-requests`
|
|
180
|
+
)
|
|
181
|
+
]);
|
|
182
|
+
if (consoleRes.ok && Array.isArray(consoleRes.data)) {
|
|
183
|
+
consoleErrors = consoleRes.data.filter((e) => e.type === "error");
|
|
184
|
+
}
|
|
185
|
+
if (networkRes.ok && Array.isArray(networkRes.data)) {
|
|
186
|
+
networkErrors = networkRes.data.filter(
|
|
187
|
+
(e) => e.status === null || e.status === 0 || e.status >= 400
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
} catch {
|
|
191
|
+
}
|
|
192
|
+
if (consoleErrors.length === 0 && occ.consoleLogExcerpt?.trim()) {
|
|
193
|
+
consoleErrors = [
|
|
194
|
+
{ type: "error", text: occ.consoleLogExcerpt.trim(), timestamp: null, location: null }
|
|
195
|
+
];
|
|
196
|
+
}
|
|
197
|
+
if (networkErrors.length === 0 && occ.networkFailureUrl) {
|
|
198
|
+
networkErrors = [
|
|
199
|
+
{
|
|
200
|
+
url: occ.networkFailureUrl,
|
|
201
|
+
method: "GET",
|
|
202
|
+
status: occ.networkFailureStatus,
|
|
203
|
+
durationMs: null
|
|
204
|
+
}
|
|
205
|
+
];
|
|
206
|
+
}
|
|
207
|
+
return { consoleErrors, networkErrors };
|
|
208
|
+
}
|
|
209
|
+
async function handleList(argv, apiUrl, token) {
|
|
210
|
+
const jsonOutput = hasFlag(argv, "--json");
|
|
211
|
+
const fullOutput = hasFlag(argv, "--full") || hasFlag(argv, "--raw");
|
|
212
|
+
const markdownOutput = getArgValue(argv, "--format") === "markdown";
|
|
213
|
+
const params = new URLSearchParams();
|
|
214
|
+
const search = getArgValue(argv, "--search");
|
|
215
|
+
const severity = getArgValue(argv, "--severity");
|
|
216
|
+
const status = getArgValue(argv, "--status");
|
|
217
|
+
const propertyId = getApplicationIdArg(argv);
|
|
218
|
+
const page = getArgValue(argv, "--page");
|
|
219
|
+
const pageSize = getArgValue(argv, "--page-size");
|
|
220
|
+
if (search) params.set("search", search);
|
|
221
|
+
if (severity) params.set("severity", severity);
|
|
222
|
+
if (status) params.set("statuses", status);
|
|
223
|
+
if (propertyId) params.set("propertyId", propertyId);
|
|
224
|
+
if (page) params.set("page", page);
|
|
225
|
+
if (pageSize) params.set("pageSize", pageSize);
|
|
226
|
+
const qs = params.toString();
|
|
227
|
+
const path = `/v2/issues${qs ? `?${qs}` : ""}`;
|
|
228
|
+
const result = await apiRequest(apiUrl, token, "GET", path);
|
|
229
|
+
if (!result.ok) {
|
|
230
|
+
console.error(`Error: ${result.error}`);
|
|
231
|
+
process.exit(1);
|
|
232
|
+
}
|
|
233
|
+
if (jsonOutput) {
|
|
234
|
+
if (fullOutput) {
|
|
235
|
+
console.log(JSON.stringify({ data: result.data, pagination: result.pagination }, null, 2));
|
|
236
|
+
} else {
|
|
237
|
+
const compact = result.data.map((issue) => {
|
|
238
|
+
const occ = issue.latestOccurrence;
|
|
239
|
+
const source = {
|
|
240
|
+
kind: occ?.sourceKind ?? null,
|
|
241
|
+
id: occ?.sourceId ?? null
|
|
242
|
+
};
|
|
243
|
+
if (occ?.workflowSourceInfo) source.workflow = occ.workflowSourceInfo;
|
|
244
|
+
return {
|
|
245
|
+
id: issue.id,
|
|
246
|
+
title: issue.title,
|
|
247
|
+
severity: issue.severity,
|
|
248
|
+
status: issue.status,
|
|
249
|
+
occurrenceCount: issue.occurrenceCount,
|
|
250
|
+
lastSeenAt: issue.lastSeenAt,
|
|
251
|
+
source
|
|
252
|
+
};
|
|
253
|
+
});
|
|
254
|
+
console.log(JSON.stringify({ data: compact, pagination: result.pagination }, null, 2));
|
|
255
|
+
}
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (markdownOutput) {
|
|
259
|
+
console.log(formatIssueListMarkdown(result.data, result.pagination));
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const { data, pagination } = result;
|
|
263
|
+
console.log(
|
|
264
|
+
`Issues: ${pagination.totalItems} total (page ${pagination.page}/${pagination.totalPages})
|
|
265
|
+
`
|
|
266
|
+
);
|
|
267
|
+
if (data.length === 0) {
|
|
268
|
+
console.log("No issues found.");
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
for (const issue of data) {
|
|
272
|
+
const icon = SEVERITY_ICONS[issue.severity] ?? "?";
|
|
273
|
+
const statusLabel = formatStatusLabel(issue.status);
|
|
274
|
+
const lastSeen = formatRelative(issue.lastSeenAt);
|
|
275
|
+
const occ = issue.latestOccurrence;
|
|
276
|
+
const sourceTag = occ?.workflowSourceInfo ? ` [wf:${occ.workflowSourceInfo.workflowRunId.slice(0, 8)}]` : occ?.sourceKind && occ.sourceKind !== "workflow_test" ? ` [${occ.sourceKind}]` : "";
|
|
277
|
+
console.log(
|
|
278
|
+
` [${icon}] ${truncate(issue.title, 60)} ${statusLabel} ${lastSeen} (${issue.occurrenceCount}x)${sourceTag} ${issue.id}`
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function parseIncludes(argv) {
|
|
283
|
+
const raw = getArgValue(argv, "--include");
|
|
284
|
+
if (!raw) return /* @__PURE__ */ new Set();
|
|
285
|
+
return new Set(
|
|
286
|
+
raw.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean)
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
function buildCompactIssueGet(issue, consoleErrors, networkErrors, includes) {
|
|
290
|
+
const occ = issue.latestOccurrence;
|
|
291
|
+
const diag = occ?.diagnosticJson ?? null;
|
|
292
|
+
const source = {
|
|
293
|
+
kind: occ?.sourceKind ?? null,
|
|
294
|
+
id: occ?.sourceId ?? null
|
|
295
|
+
};
|
|
296
|
+
if (occ?.workflowSourceInfo) source.workflow = occ.workflowSourceInfo;
|
|
297
|
+
const compact = {
|
|
298
|
+
id: issue.id,
|
|
299
|
+
title: issue.title,
|
|
300
|
+
status: issue.status,
|
|
301
|
+
severity: issue.severity,
|
|
302
|
+
category: { key: issue.category.key, label: issue.category.label },
|
|
303
|
+
occurrenceCount: issue.occurrenceCount,
|
|
304
|
+
firstSeenAt: issue.firstSeenAt,
|
|
305
|
+
lastSeenAt: issue.lastSeenAt,
|
|
306
|
+
primaryUrl: occ?.primaryUrl ?? null,
|
|
307
|
+
assignedTo: issue.assignedTo ? { id: issue.assignedTo.id, displayName: issue.assignedTo.displayName } : null,
|
|
308
|
+
source,
|
|
309
|
+
summary: occ?.ticketUserFacingSummary ?? null,
|
|
310
|
+
diagnostic: diag ? {
|
|
311
|
+
category: diag.category,
|
|
312
|
+
confidence: diag.confidence,
|
|
313
|
+
title: diag.title,
|
|
314
|
+
recommendation: diag.recommendation
|
|
315
|
+
} : null,
|
|
316
|
+
consoleErrorCount: consoleErrors.length,
|
|
317
|
+
networkErrorCount: networkErrors.length,
|
|
318
|
+
links: {
|
|
319
|
+
occurrences: `/v2/issues/${issue.id}/occurrences`,
|
|
320
|
+
consoleLogs: occ ? `/v2/issues/${issue.id}/occurrences/${occ.id}/console-logs` : null,
|
|
321
|
+
networkRequests: occ ? `/v2/issues/${issue.id}/occurrences/${occ.id}/network-requests` : null,
|
|
322
|
+
reproPrompt: `/v2/issues/${issue.id}/repro-prompt`
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
if (includes.has("console")) compact.consoleErrors = consoleErrors;
|
|
326
|
+
if (includes.has("network")) compact.networkErrors = networkErrors;
|
|
327
|
+
if (includes.has("repro")) compact.reproSteps = occ?.ticketReproSteps ?? null;
|
|
328
|
+
if (includes.has("diagnostic-full")) compact.diagnosticFull = diag;
|
|
329
|
+
return compact;
|
|
330
|
+
}
|
|
331
|
+
async function handleGet(argv, apiUrl, token) {
|
|
332
|
+
const issueId = argv[0];
|
|
333
|
+
if (!issueId || issueId.startsWith("--")) {
|
|
334
|
+
console.error("Error: Missing issue ID.");
|
|
335
|
+
console.error("Usage: canary issues get <issueId>");
|
|
336
|
+
process.exit(1);
|
|
337
|
+
}
|
|
338
|
+
const jsonOutput = hasFlag(argv, "--json");
|
|
339
|
+
const fullOutput = hasFlag(argv, "--full") || hasFlag(argv, "--raw");
|
|
340
|
+
const markdownOutput = getArgValue(argv, "--format") === "markdown";
|
|
341
|
+
const includes = parseIncludes(argv);
|
|
342
|
+
const result = await apiRequest(
|
|
343
|
+
apiUrl,
|
|
344
|
+
token,
|
|
345
|
+
"GET",
|
|
346
|
+
`/v2/issues/${issueId}`
|
|
347
|
+
);
|
|
348
|
+
if (!result.ok) {
|
|
349
|
+
console.error(`Error: ${result.error}`);
|
|
350
|
+
process.exit(1);
|
|
351
|
+
}
|
|
352
|
+
const { issue } = result.data;
|
|
353
|
+
const needDiagnostics = !jsonOutput || fullOutput || includes.has("console") || includes.has("network");
|
|
354
|
+
const { consoleErrors, networkErrors } = needDiagnostics ? await fetchDiagnostics(apiUrl, token, issue) : { consoleErrors: [], networkErrors: [] };
|
|
355
|
+
if (jsonOutput) {
|
|
356
|
+
if (fullOutput) {
|
|
357
|
+
console.log(JSON.stringify({ ...result.data, consoleErrors, networkErrors }, null, 2));
|
|
358
|
+
} else {
|
|
359
|
+
console.log(
|
|
360
|
+
JSON.stringify(buildCompactIssueGet(issue, consoleErrors, networkErrors, includes), null, 2)
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
if (markdownOutput) {
|
|
366
|
+
console.log(formatIssueDetailMarkdown(issue, consoleErrors, networkErrors));
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
const occ = issue.latestOccurrence;
|
|
370
|
+
console.log(` Title: ${issue.title}`);
|
|
371
|
+
console.log(` ID: ${issue.id}`);
|
|
372
|
+
console.log(` Status: ${formatStatusLabel(issue.status)}`);
|
|
373
|
+
console.log(` Severity: ${formatSeverity(issue.severity)}`);
|
|
374
|
+
console.log(` Category: ${issue.category.label}`);
|
|
375
|
+
console.log(` Occurrences: ${issue.occurrenceCount}`);
|
|
376
|
+
console.log(` First seen: ${formatRelative(issue.firstSeenAt)}`);
|
|
377
|
+
console.log(` Last seen: ${formatRelative(issue.lastSeenAt)}`);
|
|
378
|
+
if (occ?.primaryUrl) {
|
|
379
|
+
console.log(` URL: ${occ.primaryUrl}`);
|
|
380
|
+
}
|
|
381
|
+
if (occ?.workflowSourceInfo) {
|
|
382
|
+
console.log(` Workflow: ${occ.workflowSourceInfo.workflowId}`);
|
|
383
|
+
console.log(` Workflow Run: ${occ.workflowSourceInfo.workflowRunId}`);
|
|
384
|
+
} else if (occ?.sourceKind) {
|
|
385
|
+
console.log(` Source: ${occ.sourceKind}${occ.sourceId ? ` (${occ.sourceId})` : ""}`);
|
|
386
|
+
}
|
|
387
|
+
if (issue.assignedTo) {
|
|
388
|
+
console.log(
|
|
389
|
+
` Assigned to: ${issue.assignedTo.displayName ?? issue.assignedTo.primaryEmail ?? issue.assignedTo.id}`
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
const summary = occ?.ticketUserFacingSummary?.trim();
|
|
393
|
+
if (summary) {
|
|
394
|
+
console.log(`
|
|
395
|
+
Summary:
|
|
396
|
+
${summary.split("\n").join("\n ")}`);
|
|
397
|
+
}
|
|
398
|
+
const diagnostic = occ?.diagnosticJson;
|
|
399
|
+
if (diagnostic) {
|
|
400
|
+
const categoryLabel = DIAGNOSTIC_CATEGORY_LABELS[diagnostic.category] ?? diagnostic.category;
|
|
401
|
+
console.log(`
|
|
402
|
+
Diagnostic: ${categoryLabel} (${Math.round(diagnostic.confidence)}%)`);
|
|
403
|
+
console.log(` ${diagnostic.title}`);
|
|
404
|
+
console.log(` Recommendation: ${diagnostic.recommendation}`);
|
|
405
|
+
}
|
|
406
|
+
if (consoleErrors.length > 0) {
|
|
407
|
+
console.log(`
|
|
408
|
+
Console Errors (${consoleErrors.length}):`);
|
|
409
|
+
for (const entry of consoleErrors.slice(0, 5)) {
|
|
410
|
+
const loc = entry.location ? ` (${entry.location})` : "";
|
|
411
|
+
console.log(` [${entry.type}] ${truncate(entry.text, 100)}${loc}`);
|
|
412
|
+
}
|
|
413
|
+
if (consoleErrors.length > 5) {
|
|
414
|
+
console.log(` ... and ${consoleErrors.length - 5} more`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (networkErrors.length > 0) {
|
|
418
|
+
console.log(`
|
|
419
|
+
Network Errors (${networkErrors.length}):`);
|
|
420
|
+
for (const entry of networkErrors.slice(0, 5)) {
|
|
421
|
+
const status = entry.status === null || entry.status === 0 ? "failed" : String(entry.status);
|
|
422
|
+
console.log(` ${entry.method} ${truncate(entry.url, 80)} -> ${status}`);
|
|
423
|
+
}
|
|
424
|
+
if (networkErrors.length > 5) {
|
|
425
|
+
console.log(` ... and ${networkErrors.length - 5} more`);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
async function handleClose(argv, apiUrl, token) {
|
|
430
|
+
const issueId = argv[0];
|
|
431
|
+
if (!issueId || issueId.startsWith("--")) {
|
|
432
|
+
console.error("Error: Missing issue ID.");
|
|
433
|
+
console.error("Usage: canary issues close <issueId> [--not-a-bug --reason <text>]");
|
|
434
|
+
process.exit(1);
|
|
435
|
+
}
|
|
436
|
+
const notABug = hasFlag(argv, "--not-a-bug");
|
|
437
|
+
const reason = getArgValue(argv, "--reason") ?? getArgValue(argv, "--feedback");
|
|
438
|
+
const jsonOutput = hasFlag(argv, "--json");
|
|
439
|
+
if (notABug && !reason?.trim()) {
|
|
440
|
+
console.error("Error: --not-a-bug requires --reason <text>.");
|
|
441
|
+
process.exit(1);
|
|
442
|
+
}
|
|
443
|
+
const status = notABug ? "not_a_bug" : "closed";
|
|
444
|
+
const body = { status };
|
|
445
|
+
if (reason?.trim()) body.feedback = reason.trim();
|
|
446
|
+
const result = await apiRequest(
|
|
447
|
+
apiUrl,
|
|
448
|
+
token,
|
|
449
|
+
"PATCH",
|
|
450
|
+
`/issues/${issueId}/status`,
|
|
451
|
+
body
|
|
452
|
+
);
|
|
453
|
+
if (!result.ok) {
|
|
454
|
+
if (jsonOutput) {
|
|
455
|
+
console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));
|
|
456
|
+
} else {
|
|
457
|
+
console.error(`Error: ${result.error}`);
|
|
458
|
+
}
|
|
459
|
+
process.exit(1);
|
|
460
|
+
}
|
|
461
|
+
if (jsonOutput) {
|
|
462
|
+
console.log(JSON.stringify(result, null, 2));
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
console.log(
|
|
466
|
+
`Issue ${issueId} ${status === "not_a_bug" ? "marked not-a-bug" : "closed"}.`
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
async function handleReopen(argv, apiUrl, token) {
|
|
470
|
+
const issueId = argv[0];
|
|
471
|
+
if (!issueId || issueId.startsWith("--")) {
|
|
472
|
+
console.error("Error: Missing issue ID.");
|
|
473
|
+
console.error("Usage: canary issues reopen <issueId>");
|
|
474
|
+
process.exit(1);
|
|
475
|
+
}
|
|
476
|
+
const jsonOutput = hasFlag(argv, "--json");
|
|
477
|
+
const result = await apiRequest(
|
|
478
|
+
apiUrl,
|
|
479
|
+
token,
|
|
480
|
+
"PATCH",
|
|
481
|
+
`/issues/${issueId}/status`,
|
|
482
|
+
{ status: "open" }
|
|
483
|
+
);
|
|
484
|
+
if (!result.ok) {
|
|
485
|
+
if (jsonOutput) {
|
|
486
|
+
console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));
|
|
487
|
+
} else {
|
|
488
|
+
console.error(`Error: ${result.error}`);
|
|
489
|
+
}
|
|
490
|
+
process.exit(1);
|
|
491
|
+
}
|
|
492
|
+
if (jsonOutput) {
|
|
493
|
+
console.log(JSON.stringify(result, null, 2));
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
console.log(`Issue ${issueId} reopened.`);
|
|
497
|
+
}
|
|
498
|
+
function printIssuesHelp() {
|
|
499
|
+
console.log(
|
|
500
|
+
[
|
|
501
|
+
"Usage: canary issues <sub-command> [options]",
|
|
502
|
+
"",
|
|
503
|
+
"Sub-commands:",
|
|
504
|
+
" list [options] List and search issues",
|
|
505
|
+
" get <issueId> [options] Get issue detail with diagnostics",
|
|
506
|
+
" close <issueId> [options] Close an issue (or mark not-a-bug)",
|
|
507
|
+
" reopen <issueId> [--json] Reopen a closed issue",
|
|
508
|
+
"",
|
|
509
|
+
"Close options:",
|
|
510
|
+
" --not-a-bug Mark as not-a-bug instead of closed (requires --reason)",
|
|
511
|
+
" --reason <text> Feedback/reason (required when --not-a-bug)",
|
|
512
|
+
" --json JSON output",
|
|
513
|
+
"",
|
|
514
|
+
"List options:",
|
|
515
|
+
" --search <query> Full-text search",
|
|
516
|
+
" --severity <level> Filter: low, medium, high, unknown",
|
|
517
|
+
" --status <statuses> Filter: open, closed, not_a_bug (comma-separated)",
|
|
518
|
+
" --application-id <uuid> Filter by application (alias: --property-id)",
|
|
519
|
+
" --page <n> Page number (default: 1)",
|
|
520
|
+
" --page-size <n> Page size (default: 25)",
|
|
521
|
+
"",
|
|
522
|
+
"Output options:",
|
|
523
|
+
" --json Compact JSON (workflow IDs + counts + links)",
|
|
524
|
+
" --full With --json, return the full unmodified response",
|
|
525
|
+
" --include <csv> With --json on `get`: console, network, repro, diagnostic-full",
|
|
526
|
+
" --format markdown Output as markdown",
|
|
527
|
+
"",
|
|
528
|
+
"Common options:",
|
|
529
|
+
" --env <env> Target environment (prod, dev, local)",
|
|
530
|
+
" --api-url <url> API URL override (takes precedence over --env)",
|
|
531
|
+
" --token <key> API token override"
|
|
532
|
+
].join("\n")
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
async function runIssues(argv) {
|
|
536
|
+
const [subCommand, ...rest] = argv;
|
|
537
|
+
if (!subCommand || subCommand === "help" || hasFlag(argv, "--help", "-h")) {
|
|
538
|
+
printIssuesHelp();
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
const { apiUrl, token } = await resolveConfig(argv);
|
|
542
|
+
switch (subCommand) {
|
|
543
|
+
case "list":
|
|
544
|
+
await handleList(rest, apiUrl, token);
|
|
545
|
+
break;
|
|
546
|
+
case "get":
|
|
547
|
+
await handleGet(rest, apiUrl, token);
|
|
548
|
+
break;
|
|
549
|
+
case "close":
|
|
550
|
+
await handleClose(rest, apiUrl, token);
|
|
551
|
+
break;
|
|
552
|
+
case "reopen":
|
|
553
|
+
await handleReopen(rest, apiUrl, token);
|
|
554
|
+
break;
|
|
555
|
+
default:
|
|
556
|
+
console.error(`Unknown sub-command: ${subCommand}`);
|
|
557
|
+
printIssuesHelp();
|
|
558
|
+
process.exit(1);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
export {
|
|
562
|
+
runIssues
|
|
563
|
+
};
|
|
564
|
+
//# sourceMappingURL=issues-XIZOPX6T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/issues.ts"],"sourcesContent":["/**\n * CLI Issues Management\n *\n * Search, list, and view issues with full diagnostics from the terminal.\n */\n\nimport process from 'node:process';\nimport { resolveConfig, getArgValue, hasFlag } from './auth.js';\nimport { apiRequest, getApplicationIdArg } from './cli-helpers.js';\n\n/* ── Types ────────────────────────────────────────────────────────────── */\n\ntype IssueCategorySummary = {\n id: string;\n key: string;\n label: string;\n description: string | null;\n instructions: string | null;\n};\n\ntype IssueAssignee = {\n id: string;\n displayName: string | null;\n primaryEmail: string | null;\n};\n\ntype FailureDiagnostic = {\n category: string;\n confidence: number;\n title: string;\n analysis: string;\n recommendation: string;\n smokingGun?: { description: string; detail?: string } | null;\n};\n\ntype WorkflowSourceInfo = { workflowId: string; workflowRunId: string };\n\ntype IssueOccurrence = {\n id: string;\n sourceKind?: string;\n sourceId?: string | null;\n primaryUrl: string;\n ticketUserFacingSummary: string | null;\n ticketReproSteps: string | null;\n diagnosticJson: FailureDiagnostic | null;\n consoleLogExcerpt: string | null;\n networkFailureUrl: string | null;\n networkFailureStatus: number | null;\n workflowSourceInfo?: WorkflowSourceInfo | null;\n};\n\ntype IssueSummary = {\n id: string;\n title: string;\n severity: 'low' | 'medium' | 'high' | 'unknown';\n status: 'open' | 'closed' | 'not_a_bug';\n category: IssueCategorySummary;\n firstSeenAt: string;\n lastSeenAt: string;\n occurrenceCount: number;\n assignedTo: IssueAssignee | null;\n latestOccurrence: (IssueOccurrence & { workflowSourceInfo?: WorkflowSourceInfo | null }) | null;\n};\n\ntype ConsoleLogEntry = {\n type: string;\n text: string;\n timestamp: number | null;\n location: string | null;\n};\n\ntype NetworkRequestEntry = {\n url: string;\n method: string;\n status: number | null;\n durationMs: number | null;\n};\n\ntype Pagination = {\n page: number;\n pageSize: number;\n totalItems: number;\n totalPages: number;\n};\n\ntype IssueListResponse = {\n ok: boolean;\n error?: string;\n data: IssueSummary[];\n pagination: Pagination;\n};\n\ntype IssueDetailResponse = {\n ok: boolean;\n error?: string;\n data: {\n issue: IssueSummary;\n occurrences: IssueOccurrence[];\n commentCount: number;\n };\n};\n\ntype DiagnosticsDataResponse = {\n ok: boolean;\n data: ConsoleLogEntry[] | NetworkRequestEntry[];\n};\n\n/* ── Formatting Helpers ───────────────────────────────────────────────── */\n\nconst SEVERITY_ICONS: Record<string, string> = {\n high: '!!!',\n medium: '!!',\n low: '!',\n unknown: '?',\n};\n\nconst DIAGNOSTIC_CATEGORY_LABELS: Record<string, string> = {\n software_bug: 'Software Bug',\n dependency_issue: 'Dependency Issue',\n agent_confusion: 'Agent Confusion',\n platform_error: 'Platform Error',\n};\n\nfunction formatStatusLabel(status: string): string {\n switch (status) {\n case 'open':\n return 'Open';\n case 'closed':\n return 'Closed';\n case 'not_a_bug':\n return 'Not a Bug';\n default:\n return status;\n }\n}\n\nfunction formatSeverity(severity: string): string {\n return severity.charAt(0).toUpperCase() + severity.slice(1);\n}\n\nfunction formatRelative(value: string | null): string {\n if (!value) return '—';\n try {\n const date = new Date(value);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n if (diffMins < 1) return 'just now';\n if (diffMins < 60) return `${diffMins}m ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours}h ago`;\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) return `${diffDays}d ago`;\n return date.toISOString().slice(0, 10);\n } catch {\n return value;\n }\n}\n\nfunction truncate(text: string, max: number): string {\n if (text.length <= max) return text;\n return text.slice(0, max - 1) + '…';\n}\n\n/* ── Markdown Formatters ──────────────────────────────────────────────── */\n\nfunction formatIssueDetailMarkdown(\n issue: IssueSummary,\n consoleErrors: ConsoleLogEntry[],\n networkErrors: NetworkRequestEntry[]\n): string {\n const sections: string[] = [];\n const occ = issue.latestOccurrence;\n\n sections.push(`# ${issue.title}`);\n\n const meta: string[] = [];\n meta.push(`**Status:** ${formatStatusLabel(issue.status)}`);\n meta.push(`**Severity:** ${formatSeverity(issue.severity)}`);\n meta.push(`**Category:** ${issue.category.label}`);\n sections.push(meta.join(' | '));\n\n if (occ?.primaryUrl) {\n sections.push(`**URL:** ${occ.primaryUrl}`);\n }\n\n if (occ?.workflowSourceInfo) {\n sections.push(\n `**Workflow:** ${occ.workflowSourceInfo.workflowId} | **Workflow Run:** ${occ.workflowSourceInfo.workflowRunId}`\n );\n }\n\n const timeParts: string[] = [];\n timeParts.push(`**First seen:** ${formatRelative(issue.firstSeenAt)}`);\n timeParts.push(`**Last seen:** ${formatRelative(issue.lastSeenAt)}`);\n timeParts.push(`**Occurrences:** ${issue.occurrenceCount}`);\n sections.push(timeParts.join(' | '));\n\n const summary = occ?.ticketUserFacingSummary?.trim();\n if (summary) {\n sections.push(`## Summary\\n${summary}`);\n }\n\n const reproSteps = occ?.ticketReproSteps?.trim();\n if (reproSteps) {\n sections.push(`## Reproduction Steps\\n${reproSteps}`);\n }\n\n const diagnostic = occ?.diagnosticJson;\n if (diagnostic) {\n const diagParts: string[] = [];\n const categoryLabel = DIAGNOSTIC_CATEGORY_LABELS[diagnostic.category] ?? diagnostic.category;\n diagParts.push('## Diagnostic Analysis');\n diagParts.push(\n `**Category:** ${categoryLabel} (${Math.round(diagnostic.confidence)}% confidence)`\n );\n diagParts.push(`**${diagnostic.title}**`);\n diagParts.push(diagnostic.analysis);\n\n if (diagnostic.smokingGun) {\n const gun = diagnostic.smokingGun;\n const gunLines = [`> **Key Evidence:** ${gun.description}`];\n if (gun.detail) {\n gunLines.push(`> \\`${gun.detail}\\``);\n }\n diagParts.push(gunLines.join('\\n'));\n }\n\n diagParts.push(`**Recommendation:** ${diagnostic.recommendation}`);\n sections.push(diagParts.join('\\n\\n'));\n }\n\n if (consoleErrors.length > 0) {\n const logLines = consoleErrors.map((entry) => {\n const loc = entry.location ? ` (${entry.location})` : '';\n return `[${entry.type}] ${entry.text}${loc}`;\n });\n sections.push(`## Console Errors\\n\\`\\`\\`\\n${logLines.join('\\n')}\\n\\`\\`\\``);\n }\n\n if (networkErrors.length > 0) {\n const rows = networkErrors.map((entry) => {\n const status =\n entry.status === null || entry.status === 0 ? '0 (failed)' : String(entry.status);\n const duration =\n entry.durationMs !== null && entry.durationMs !== undefined ? `${entry.durationMs}ms` : '—';\n return `| ${entry.method} | ${entry.url} | ${status} | ${duration} |`;\n });\n sections.push(\n `## Network Errors\\n| Method | URL | Status | Duration |\\n|--------|-----|--------|----------|\\n${rows.join('\\n')}`\n );\n }\n\n return sections.join('\\n\\n');\n}\n\nfunction formatIssueListMarkdown(data: IssueSummary[], pagination: Pagination): string {\n const sections: string[] = [];\n sections.push(\n `# Issues (page ${pagination.page} of ${pagination.totalPages}, ${pagination.totalItems} total)`\n );\n\n if (data.length === 0) {\n sections.push('No issues found.');\n return sections.join('\\n\\n');\n }\n\n const header = '| Severity | Title | Status | Last Seen | Occurrences |';\n const divider = '|----------|-------|--------|-----------|-------------|';\n const rows = data.map(\n (issue) =>\n `| ${issue.severity} | ${truncate(issue.title, 60)} | ${issue.status} | ${formatRelative(issue.lastSeenAt)} | ${issue.occurrenceCount} |`\n );\n sections.push([header, divider, ...rows].join('\\n'));\n\n return sections.join('\\n\\n');\n}\n\n/* ── Diagnostics Fetching ─────────────────────────────────────────────── */\n\nasync function fetchDiagnostics(\n apiUrl: string,\n token: string,\n issue: IssueSummary\n): Promise<{ consoleErrors: ConsoleLogEntry[]; networkErrors: NetworkRequestEntry[] }> {\n const occ = issue.latestOccurrence;\n if (!occ) return { consoleErrors: [], networkErrors: [] };\n\n let consoleErrors: ConsoleLogEntry[] = [];\n let networkErrors: NetworkRequestEntry[] = [];\n\n try {\n const [consoleRes, networkRes] = await Promise.all([\n apiRequest<DiagnosticsDataResponse>(\n apiUrl,\n token,\n 'GET',\n `/v2/issues/${issue.id}/occurrences/${occ.id}/console-logs`\n ),\n apiRequest<DiagnosticsDataResponse>(\n apiUrl,\n token,\n 'GET',\n `/v2/issues/${issue.id}/occurrences/${occ.id}/network-requests`\n ),\n ]);\n\n if (consoleRes.ok && Array.isArray(consoleRes.data)) {\n consoleErrors = (consoleRes.data as ConsoleLogEntry[]).filter((e) => e.type === 'error');\n }\n\n if (networkRes.ok && Array.isArray(networkRes.data)) {\n networkErrors = (networkRes.data as NetworkRequestEntry[]).filter(\n (e) => e.status === null || e.status === 0 || e.status >= 400\n );\n }\n } catch {\n // Diagnostics are best-effort; continue without them\n }\n\n // Fallback to legacy fields\n if (consoleErrors.length === 0 && occ.consoleLogExcerpt?.trim()) {\n consoleErrors = [\n { type: 'error', text: occ.consoleLogExcerpt.trim(), timestamp: null, location: null },\n ];\n }\n\n if (networkErrors.length === 0 && occ.networkFailureUrl) {\n networkErrors = [\n {\n url: occ.networkFailureUrl,\n method: 'GET',\n status: occ.networkFailureStatus,\n durationMs: null,\n },\n ];\n }\n\n return { consoleErrors, networkErrors };\n}\n\n/* ── Sub-command Handlers ─────────────────────────────────────────────── */\n\nasync function handleList(argv: string[], apiUrl: string, token: string): Promise<void> {\n const jsonOutput = hasFlag(argv, '--json');\n const fullOutput = hasFlag(argv, '--full') || hasFlag(argv, '--raw');\n const markdownOutput = getArgValue(argv, '--format') === 'markdown';\n\n const params = new URLSearchParams();\n const search = getArgValue(argv, '--search');\n const severity = getArgValue(argv, '--severity');\n const status = getArgValue(argv, '--status');\n const propertyId = getApplicationIdArg(argv);\n const page = getArgValue(argv, '--page');\n const pageSize = getArgValue(argv, '--page-size');\n\n if (search) params.set('search', search);\n if (severity) params.set('severity', severity);\n if (status) params.set('statuses', status);\n if (propertyId) params.set('propertyId', propertyId);\n if (page) params.set('page', page);\n if (pageSize) params.set('pageSize', pageSize);\n\n const qs = params.toString();\n const path = `/v2/issues${qs ? `?${qs}` : ''}`;\n\n const result = await apiRequest<IssueListResponse>(apiUrl, token, 'GET', path);\n\n if (!result.ok) {\n console.error(`Error: ${result.error}`);\n process.exit(1);\n }\n\n if (jsonOutput) {\n if (fullOutput) {\n console.log(JSON.stringify({ data: result.data, pagination: result.pagination }, null, 2));\n } else {\n const compact = result.data.map((issue) => {\n const occ = issue.latestOccurrence;\n const source: Record<string, unknown> = {\n kind: occ?.sourceKind ?? null,\n id: occ?.sourceId ?? null,\n };\n if (occ?.workflowSourceInfo) source.workflow = occ.workflowSourceInfo;\n return {\n id: issue.id,\n title: issue.title,\n severity: issue.severity,\n status: issue.status,\n occurrenceCount: issue.occurrenceCount,\n lastSeenAt: issue.lastSeenAt,\n source,\n };\n });\n console.log(JSON.stringify({ data: compact, pagination: result.pagination }, null, 2));\n }\n return;\n }\n\n if (markdownOutput) {\n console.log(formatIssueListMarkdown(result.data, result.pagination));\n return;\n }\n\n // Default compact output\n const { data, pagination } = result;\n console.log(\n `Issues: ${pagination.totalItems} total (page ${pagination.page}/${pagination.totalPages})\\n`\n );\n\n if (data.length === 0) {\n console.log('No issues found.');\n return;\n }\n\n for (const issue of data) {\n const icon = SEVERITY_ICONS[issue.severity] ?? '?';\n const statusLabel = formatStatusLabel(issue.status);\n const lastSeen = formatRelative(issue.lastSeenAt);\n const occ = issue.latestOccurrence;\n const sourceTag = occ?.workflowSourceInfo\n ? ` [wf:${occ.workflowSourceInfo.workflowRunId.slice(0, 8)}]`\n : occ?.sourceKind && occ.sourceKind !== 'workflow_test'\n ? ` [${occ.sourceKind}]`\n : '';\n console.log(\n ` [${icon}] ${truncate(issue.title, 60)} ${statusLabel} ${lastSeen} (${issue.occurrenceCount}x)${sourceTag} ${issue.id}`\n );\n }\n}\n\nfunction parseIncludes(argv: string[]): Set<string> {\n const raw = getArgValue(argv, '--include');\n if (!raw) return new Set();\n return new Set(\n raw\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .filter(Boolean)\n );\n}\n\nfunction buildCompactIssueGet(\n issue: IssueSummary,\n consoleErrors: ConsoleLogEntry[],\n networkErrors: NetworkRequestEntry[],\n includes: Set<string>\n): Record<string, unknown> {\n const occ = issue.latestOccurrence;\n const diag = occ?.diagnosticJson ?? null;\n\n const source: Record<string, unknown> = {\n kind: occ?.sourceKind ?? null,\n id: occ?.sourceId ?? null,\n };\n if (occ?.workflowSourceInfo) source.workflow = occ.workflowSourceInfo;\n\n const compact: Record<string, unknown> = {\n id: issue.id,\n title: issue.title,\n status: issue.status,\n severity: issue.severity,\n category: { key: issue.category.key, label: issue.category.label },\n occurrenceCount: issue.occurrenceCount,\n firstSeenAt: issue.firstSeenAt,\n lastSeenAt: issue.lastSeenAt,\n primaryUrl: occ?.primaryUrl ?? null,\n assignedTo: issue.assignedTo\n ? { id: issue.assignedTo.id, displayName: issue.assignedTo.displayName }\n : null,\n source,\n summary: occ?.ticketUserFacingSummary ?? null,\n diagnostic: diag\n ? {\n category: diag.category,\n confidence: diag.confidence,\n title: diag.title,\n recommendation: diag.recommendation,\n }\n : null,\n consoleErrorCount: consoleErrors.length,\n networkErrorCount: networkErrors.length,\n links: {\n occurrences: `/v2/issues/${issue.id}/occurrences`,\n consoleLogs: occ\n ? `/v2/issues/${issue.id}/occurrences/${occ.id}/console-logs`\n : null,\n networkRequests: occ\n ? `/v2/issues/${issue.id}/occurrences/${occ.id}/network-requests`\n : null,\n reproPrompt: `/v2/issues/${issue.id}/repro-prompt`,\n },\n };\n\n if (includes.has('console')) compact.consoleErrors = consoleErrors;\n if (includes.has('network')) compact.networkErrors = networkErrors;\n if (includes.has('repro')) compact.reproSteps = occ?.ticketReproSteps ?? null;\n if (includes.has('diagnostic-full')) compact.diagnosticFull = diag;\n\n return compact;\n}\n\nasync function handleGet(argv: string[], apiUrl: string, token: string): Promise<void> {\n const issueId = argv[0];\n if (!issueId || issueId.startsWith('--')) {\n console.error('Error: Missing issue ID.');\n console.error('Usage: canary issues get <issueId>');\n process.exit(1);\n }\n\n const jsonOutput = hasFlag(argv, '--json');\n const fullOutput = hasFlag(argv, '--full') || hasFlag(argv, '--raw');\n const markdownOutput = getArgValue(argv, '--format') === 'markdown';\n const includes = parseIncludes(argv);\n\n const result = await apiRequest<IssueDetailResponse>(\n apiUrl,\n token,\n 'GET',\n `/v2/issues/${issueId}`\n );\n\n if (!result.ok) {\n console.error(`Error: ${result.error}`);\n process.exit(1);\n }\n\n const { issue } = result.data;\n\n // Diagnostics are prefetched only when the user will see them (text/markdown\n // output, `--full`, or an explicit `--include console|network`). Compact JSON\n // without those flags returns occurrence counts only and leaves the heavy\n // arrays behind the linked endpoints.\n const needDiagnostics =\n !jsonOutput ||\n fullOutput ||\n includes.has('console') ||\n includes.has('network');\n const { consoleErrors, networkErrors } = needDiagnostics\n ? await fetchDiagnostics(apiUrl, token, issue)\n : { consoleErrors: [] as ConsoleLogEntry[], networkErrors: [] as NetworkRequestEntry[] };\n\n if (jsonOutput) {\n if (fullOutput) {\n console.log(JSON.stringify({ ...result.data, consoleErrors, networkErrors }, null, 2));\n } else {\n console.log(\n JSON.stringify(buildCompactIssueGet(issue, consoleErrors, networkErrors, includes), null, 2)\n );\n }\n return;\n }\n\n if (markdownOutput) {\n console.log(formatIssueDetailMarkdown(issue, consoleErrors, networkErrors));\n return;\n }\n\n // Default human-readable output\n const occ = issue.latestOccurrence;\n console.log(` Title: ${issue.title}`);\n console.log(` ID: ${issue.id}`);\n console.log(` Status: ${formatStatusLabel(issue.status)}`);\n console.log(` Severity: ${formatSeverity(issue.severity)}`);\n console.log(` Category: ${issue.category.label}`);\n console.log(` Occurrences: ${issue.occurrenceCount}`);\n console.log(` First seen: ${formatRelative(issue.firstSeenAt)}`);\n console.log(` Last seen: ${formatRelative(issue.lastSeenAt)}`);\n\n if (occ?.primaryUrl) {\n console.log(` URL: ${occ.primaryUrl}`);\n }\n\n if (occ?.workflowSourceInfo) {\n console.log(` Workflow: ${occ.workflowSourceInfo.workflowId}`);\n console.log(` Workflow Run: ${occ.workflowSourceInfo.workflowRunId}`);\n } else if (occ?.sourceKind) {\n console.log(` Source: ${occ.sourceKind}${occ.sourceId ? ` (${occ.sourceId})` : ''}`);\n }\n\n if (issue.assignedTo) {\n console.log(\n ` Assigned to: ${issue.assignedTo.displayName ?? issue.assignedTo.primaryEmail ?? issue.assignedTo.id}`\n );\n }\n\n const summary = occ?.ticketUserFacingSummary?.trim();\n if (summary) {\n console.log(`\\n Summary:\\n ${summary.split('\\n').join('\\n ')}`);\n }\n\n const diagnostic = occ?.diagnosticJson;\n if (diagnostic) {\n const categoryLabel = DIAGNOSTIC_CATEGORY_LABELS[diagnostic.category] ?? diagnostic.category;\n console.log(`\\n Diagnostic: ${categoryLabel} (${Math.round(diagnostic.confidence)}%)`);\n console.log(` ${diagnostic.title}`);\n console.log(` Recommendation: ${diagnostic.recommendation}`);\n }\n\n if (consoleErrors.length > 0) {\n console.log(`\\n Console Errors (${consoleErrors.length}):`);\n for (const entry of consoleErrors.slice(0, 5)) {\n const loc = entry.location ? ` (${entry.location})` : '';\n console.log(` [${entry.type}] ${truncate(entry.text, 100)}${loc}`);\n }\n if (consoleErrors.length > 5) {\n console.log(` ... and ${consoleErrors.length - 5} more`);\n }\n }\n\n if (networkErrors.length > 0) {\n console.log(`\\n Network Errors (${networkErrors.length}):`);\n for (const entry of networkErrors.slice(0, 5)) {\n const status = entry.status === null || entry.status === 0 ? 'failed' : String(entry.status);\n console.log(` ${entry.method} ${truncate(entry.url, 80)} -> ${status}`);\n }\n if (networkErrors.length > 5) {\n console.log(` ... and ${networkErrors.length - 5} more`);\n }\n }\n}\n\ntype IssueStatusUpdateResponse = {\n ok: boolean;\n error?: string;\n status?: 'open' | 'closed' | 'not_a_bug';\n statusUpdatedAt?: string;\n closedAt?: string | null;\n};\n\nasync function handleClose(argv: string[], apiUrl: string, token: string): Promise<void> {\n const issueId = argv[0];\n if (!issueId || issueId.startsWith('--')) {\n console.error('Error: Missing issue ID.');\n console.error('Usage: canary issues close <issueId> [--not-a-bug --reason <text>]');\n process.exit(1);\n }\n\n const notABug = hasFlag(argv, '--not-a-bug');\n const reason = getArgValue(argv, '--reason') ?? getArgValue(argv, '--feedback');\n const jsonOutput = hasFlag(argv, '--json');\n\n if (notABug && !reason?.trim()) {\n console.error('Error: --not-a-bug requires --reason <text>.');\n process.exit(1);\n }\n\n const status: 'closed' | 'not_a_bug' = notABug ? 'not_a_bug' : 'closed';\n const body: Record<string, unknown> = { status };\n if (reason?.trim()) body.feedback = reason.trim();\n\n const result = await apiRequest<IssueStatusUpdateResponse>(\n apiUrl,\n token,\n 'PATCH',\n `/issues/${issueId}/status`,\n body\n );\n\n if (!result.ok) {\n if (jsonOutput) {\n console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));\n } else {\n console.error(`Error: ${result.error}`);\n }\n process.exit(1);\n }\n\n if (jsonOutput) {\n console.log(JSON.stringify(result, null, 2));\n return;\n }\n\n console.log(\n `Issue ${issueId} ${status === 'not_a_bug' ? 'marked not-a-bug' : 'closed'}.`\n );\n}\n\nasync function handleReopen(argv: string[], apiUrl: string, token: string): Promise<void> {\n const issueId = argv[0];\n if (!issueId || issueId.startsWith('--')) {\n console.error('Error: Missing issue ID.');\n console.error('Usage: canary issues reopen <issueId>');\n process.exit(1);\n }\n\n const jsonOutput = hasFlag(argv, '--json');\n\n const result = await apiRequest<IssueStatusUpdateResponse>(\n apiUrl,\n token,\n 'PATCH',\n `/issues/${issueId}/status`,\n { status: 'open' }\n );\n\n if (!result.ok) {\n if (jsonOutput) {\n console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));\n } else {\n console.error(`Error: ${result.error}`);\n }\n process.exit(1);\n }\n\n if (jsonOutput) {\n console.log(JSON.stringify(result, null, 2));\n return;\n }\n\n console.log(`Issue ${issueId} reopened.`);\n}\n\n/* ── Help & Entry Point ───────────────────────────────────────────────── */\n\nfunction printIssuesHelp(): void {\n console.log(\n [\n 'Usage: canary issues <sub-command> [options]',\n '',\n 'Sub-commands:',\n ' list [options] List and search issues',\n ' get <issueId> [options] Get issue detail with diagnostics',\n ' close <issueId> [options] Close an issue (or mark not-a-bug)',\n ' reopen <issueId> [--json] Reopen a closed issue',\n '',\n 'Close options:',\n ' --not-a-bug Mark as not-a-bug instead of closed (requires --reason)',\n ' --reason <text> Feedback/reason (required when --not-a-bug)',\n ' --json JSON output',\n '',\n 'List options:',\n ' --search <query> Full-text search',\n ' --severity <level> Filter: low, medium, high, unknown',\n ' --status <statuses> Filter: open, closed, not_a_bug (comma-separated)',\n ' --application-id <uuid> Filter by application (alias: --property-id)',\n ' --page <n> Page number (default: 1)',\n ' --page-size <n> Page size (default: 25)',\n '',\n 'Output options:',\n ' --json Compact JSON (workflow IDs + counts + links)',\n ' --full With --json, return the full unmodified response',\n ' --include <csv> With --json on `get`: console, network, repro, diagnostic-full',\n ' --format markdown Output as markdown',\n '',\n 'Common options:',\n ' --env <env> Target environment (prod, dev, local)',\n ' --api-url <url> API URL override (takes precedence over --env)',\n ' --token <key> API token override',\n ].join('\\n')\n );\n}\n\nexport async function runIssues(argv: string[]): Promise<void> {\n const [subCommand, ...rest] = argv;\n\n if (!subCommand || subCommand === 'help' || hasFlag(argv, '--help', '-h')) {\n printIssuesHelp();\n return;\n }\n\n const { apiUrl, token } = await resolveConfig(argv);\n\n switch (subCommand) {\n case 'list':\n await handleList(rest, apiUrl, token);\n break;\n case 'get':\n await handleGet(rest, apiUrl, token);\n break;\n case 'close':\n await handleClose(rest, apiUrl, token);\n break;\n case 'reopen':\n await handleReopen(rest, apiUrl, token);\n break;\n default:\n console.error(`Unknown sub-command: ${subCommand}`);\n printIssuesHelp();\n process.exit(1);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAMA,OAAO,aAAa;AAuGpB,IAAM,iBAAyC;AAAA,EAC7C,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AACX;AAEA,IAAM,6BAAqD;AAAA,EACzD,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;AAEA,SAAS,kBAAkB,QAAwB;AACjD,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,eAAe,UAA0B;AAChD,SAAO,SAAS,OAAO,CAAC,EAAE,YAAY,IAAI,SAAS,MAAM,CAAC;AAC5D;AAEA,SAAS,eAAe,OAA8B;AACpD,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI;AACF,UAAM,OAAO,IAAI,KAAK,KAAK;AAC3B,UAAM,MAAM,oBAAI,KAAK;AACrB,UAAM,SAAS,IAAI,QAAQ,IAAI,KAAK,QAAQ;AAC5C,UAAM,WAAW,KAAK,MAAM,SAAS,GAAK;AAC1C,QAAI,WAAW,EAAG,QAAO;AACzB,QAAI,WAAW,GAAI,QAAO,GAAG,QAAQ;AACrC,UAAM,YAAY,KAAK,MAAM,WAAW,EAAE;AAC1C,QAAI,YAAY,GAAI,QAAO,GAAG,SAAS;AACvC,UAAM,WAAW,KAAK,MAAM,YAAY,EAAE;AAC1C,QAAI,WAAW,GAAI,QAAO,GAAG,QAAQ;AACrC,WAAO,KAA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