aztrx-cli 0.2.0 → 0.2.1
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 +4 -4
- package/dist/core/orchestrator.js +2 -1
- package/dist/core/version.js +15 -0
- package/dist/ui/app.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,7 +196,7 @@ jobs:
|
|
|
196
196
|
permissions: { contents: read, pull-requests: write }
|
|
197
197
|
steps:
|
|
198
198
|
- uses: actions/checkout@v4
|
|
199
|
-
- uses: DanisChaparov/aztrx@
|
|
199
|
+
- uses: DanisChaparov/aztrx@94d1173e6b363bc60e2237775cca11addd39b10f
|
|
200
200
|
with:
|
|
201
201
|
url: http://localhost:3000
|
|
202
202
|
start-command: npm run dev # optional — boot the app in the background
|
|
@@ -210,7 +210,7 @@ Or as a reusable workflow:
|
|
|
210
210
|
on: pull_request
|
|
211
211
|
jobs:
|
|
212
212
|
aztrx:
|
|
213
|
-
uses: DanisChaparov/aztrx/.github/workflows/aztrx-pr.yml@
|
|
213
|
+
uses: DanisChaparov/aztrx/.github/workflows/aztrx-pr.yml@94d1173e6b363bc60e2237775cca11addd39b10f
|
|
214
214
|
with:
|
|
215
215
|
url: http://localhost:3000
|
|
216
216
|
start-command: npm run dev
|
|
@@ -261,7 +261,7 @@ jobs:
|
|
|
261
261
|
sleep 2
|
|
262
262
|
done
|
|
263
263
|
- name: Generate badge
|
|
264
|
-
run: npx --yes aztrx-cli@0.2.
|
|
264
|
+
run: npx --yes aztrx-cli@0.2.1 run http://localhost:3000 --badge badge.svg
|
|
265
265
|
- name: Commit badge
|
|
266
266
|
run: |
|
|
267
267
|
git config user.name "github-actions[bot]"
|
|
@@ -320,7 +320,7 @@ LLM call.
|
|
|
320
320
|
CORS.
|
|
321
321
|
- **`.aztrx/` is gitignored** on `init` — repro specs, reports, and patches stay
|
|
322
322
|
out of history.
|
|
323
|
-
- **Pinned supply chain.** The GitHub Action pins `aztrx-cli@0.2.
|
|
323
|
+
- **Pinned supply chain.** The GitHub Action pins `aztrx-cli@0.2.1` (never
|
|
324
324
|
`@latest`).
|
|
325
325
|
|
|
326
326
|
## Telemetry & privacy
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
2
|
import pc from "picocolors";
|
|
3
|
+
import { VERSION } from "./version.js";
|
|
3
4
|
import { EventBus } from "./eventBus.js";
|
|
4
5
|
import { loadBaseline } from "./classifier.js";
|
|
5
6
|
import { attachNetworkGuard, allowHostsFrom } from "./networkGuard.js";
|
|
@@ -66,7 +67,7 @@ export async function run(options) {
|
|
|
66
67
|
console.log(parts.join(" "));
|
|
67
68
|
};
|
|
68
69
|
const emitPhase = (phase, detail) => bus.emit("phase", { phase, detail, ts: Date.now() });
|
|
69
|
-
say(pc.cyan(
|
|
70
|
+
say(pc.cyan(`\nAztrx AI v${VERSION} — Runtime Detector`));
|
|
70
71
|
say(pc.dim(`Target: ${url}`));
|
|
71
72
|
say(pc.dim(`Repo: ${repoRoot}`));
|
|
72
73
|
if (options.fuzz)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { readFileSync } from "fs";
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
// Single source of truth for the CLI's self-reported version. Read from the
|
|
4
|
+
// installed package.json so a future `npm version` bump never drifts from the
|
|
5
|
+
// printed banner — a hardcoded "v0.1.1" previously survived the 0.2.0 bump.
|
|
6
|
+
function readVersion() {
|
|
7
|
+
try {
|
|
8
|
+
const url = new URL("../../package.json", import.meta.url);
|
|
9
|
+
return JSON.parse(readFileSync(fileURLToPath(url), "utf-8")).version;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return "0.0.0"; // cosmetic only — package.json not resolvable (raw dist/ checkout)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const VERSION = readVersion();
|
package/dist/ui/app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
3
3
|
import { render, Box, Text, useApp } from "ink";
|
|
4
|
+
import { VERSION } from "../core/version.js";
|
|
4
5
|
// Palette — mirrors web/app/globals.css "crash seismograph" tokens, mapped to
|
|
5
6
|
// the nearest ANSI colors so the terminal panel reads as the same instrument.
|
|
6
7
|
const C = {
|
|
@@ -124,7 +125,7 @@ function AztrxApp({ bus, done, targetUrl, repoRoot, mode }) {
|
|
|
124
125
|
}, [done, exit]);
|
|
125
126
|
const phase = PHASE_LABEL[state.phase];
|
|
126
127
|
const currentRoute = state.routes[state.routes.length - 1] ?? targetUrl;
|
|
127
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: C.azure, bold: true, children: "Aztrx AI" }), _jsx(Text, { color: C.dim, children: " \u2014 Runtime Detector" }),
|
|
128
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: C.azure, bold: true, children: "Aztrx AI" }), _jsx(Text, { color: C.dim, children: " \u2014 Runtime Detector" }), _jsxs(Text, { color: C.dim, children: [" v", VERSION] })] }), _jsxs(Text, { color: C.dim, children: [" target ", targetUrl, " repo ", repoRoot] }), _jsxs(Text, { color: C.dim, children: [" mode ", mode] }), _jsx(Text, { color: C.dim, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: phase.color, children: phase.text }), _jsx(Text, { color: C.dim, children: " " }), _jsx(Text, { color: C.azureBright, bold: true, children: rate.toFixed(1) }), _jsx(Text, { color: C.dim, children: " ops/s \u00B7 " }), _jsx(Text, { color: C.fg, children: state.actions }), _jsx(Text, { color: C.dim, children: " actions \u00B7 " }), _jsx(Text, { color: C.fg, children: state.clicks }), _jsx(Text, { color: C.dim, children: " clicks" })] }), _jsxs(Box, { children: [_jsx(Text, { color: C.dim, children: " route " }), _jsx(Text, { color: C.muted, children: currentRoute }), _jsxs(Text, { color: C.dim, children: [" \u00B7 ", state.routes.length, " route(s)"] })] }), state.findings.length > 0 ? (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { color: C.muted, bold: true, children: ["findings (", state.findings.length, ")"] }), state.findings.map((f) => (_jsx(FindingRow, { finding: f, repro: state.repros[f.fingerprint] }, f.fingerprint)))] })) : null, state.noise > 0 ? (_jsxs(Text, { color: C.dim, children: [" \u25B8 ", state.noise, " noise event(s) suppressed"] })) : null] }));
|
|
128
129
|
}
|
|
129
130
|
/** Mount the live terminal panel and resolve once the run (or a failure) ends. */
|
|
130
131
|
export function renderTui(props) {
|