@agent-lint/cli 0.3.0 → 0.3.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/dist/index.js +125 -69
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -3539,78 +3539,109 @@ var colors = {
|
|
|
3539
3539
|
secondary: "#8494FF",
|
|
3540
3540
|
tertiary: "#C9BEFF",
|
|
3541
3541
|
accent: "#FFDBFD",
|
|
3542
|
-
dim: "#
|
|
3542
|
+
dim: "#555555",
|
|
3543
3543
|
success: "#22c55e",
|
|
3544
3544
|
warning: "#eab308",
|
|
3545
3545
|
error: "#ef4444",
|
|
3546
|
-
muted: "#
|
|
3546
|
+
muted: "#777777",
|
|
3547
|
+
bg: "#1a1a2e"
|
|
3547
3548
|
};
|
|
3548
|
-
var
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3549
|
+
var gradient = [
|
|
3550
|
+
"#6367FF",
|
|
3551
|
+
"#7078FF",
|
|
3552
|
+
"#8494FF",
|
|
3553
|
+
"#A3A9FF",
|
|
3554
|
+
"#C9BEFF",
|
|
3555
|
+
"#E4CCFE",
|
|
3556
|
+
"#FFDBFD"
|
|
3557
|
+
];
|
|
3558
|
+
var BANNER_LINES = [
|
|
3559
|
+
" \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
|
|
3560
|
+
"\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D",
|
|
3561
|
+
"\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 ",
|
|
3562
|
+
"\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 ",
|
|
3563
|
+
"\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 ",
|
|
3564
|
+
"\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D "
|
|
3565
|
+
];
|
|
3566
|
+
var BANNER_LINES_2 = [
|
|
3567
|
+
"\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
|
|
3568
|
+
"\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D",
|
|
3569
|
+
"\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 ",
|
|
3570
|
+
"\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 ",
|
|
3571
|
+
"\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 ",
|
|
3572
|
+
"\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D "
|
|
3573
|
+
];
|
|
3555
3574
|
var TAGLINE = "Meta-agent orchestrator for AI coding agents";
|
|
3556
|
-
var VERSION = "0.3.
|
|
3575
|
+
var VERSION = "0.3.1";
|
|
3557
3576
|
|
|
3558
3577
|
// src/ui/components.tsx
|
|
3559
3578
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3560
3579
|
function Banner() {
|
|
3561
3580
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
3562
|
-
/* @__PURE__ */ jsx(
|
|
3563
|
-
|
|
3564
|
-
/* @__PURE__ */ jsx(Text, {
|
|
3581
|
+
/* @__PURE__ */ jsx(Box, { flexDirection: "column", children: BANNER_LINES.map((line, i) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
3582
|
+
/* @__PURE__ */ jsx(Text, { color: gradient[i] ?? gradient[gradient.length - 1], bold: true, children: line }),
|
|
3583
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
3584
|
+
/* @__PURE__ */ jsx(Text, { color: gradient[i] ?? gradient[gradient.length - 1], bold: true, children: BANNER_LINES_2[i] ?? "" })
|
|
3585
|
+
] }, i)) }),
|
|
3586
|
+
/* @__PURE__ */ jsxs(Box, { marginTop: 0, marginLeft: 1, gap: 1, children: [
|
|
3587
|
+
/* @__PURE__ */ jsx(Text, { color: colors.accent, children: "*" }),
|
|
3588
|
+
/* @__PURE__ */ jsx(Text, { color: colors.tertiary, italic: true, children: TAGLINE }),
|
|
3565
3589
|
/* @__PURE__ */ jsxs(Text, { color: colors.dim, children: [
|
|
3566
|
-
"
|
|
3590
|
+
"v",
|
|
3567
3591
|
VERSION
|
|
3568
3592
|
] })
|
|
3569
3593
|
] })
|
|
3570
3594
|
] });
|
|
3571
3595
|
}
|
|
3572
3596
|
function Divider() {
|
|
3573
|
-
|
|
3597
|
+
const left = "\u2500".repeat(3);
|
|
3598
|
+
const mid = " * ";
|
|
3599
|
+
const right = "\u2500".repeat(44);
|
|
3600
|
+
return /* @__PURE__ */ jsxs(Box, { marginY: 0, children: [
|
|
3601
|
+
/* @__PURE__ */ jsx(Text, { color: colors.dim, children: left }),
|
|
3602
|
+
/* @__PURE__ */ jsx(Text, { color: colors.accent, children: mid }),
|
|
3603
|
+
/* @__PURE__ */ jsx(Text, { color: colors.dim, children: right })
|
|
3604
|
+
] });
|
|
3574
3605
|
}
|
|
3575
3606
|
function SectionTitle({ children }) {
|
|
3576
|
-
return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginBottom: 0, children: [
|
|
3577
|
-
/* @__PURE__ */ jsx(Text, { color: colors.
|
|
3578
|
-
/* @__PURE__ */ jsx(Text, { color: colors.secondary, bold: true, children })
|
|
3607
|
+
return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginBottom: 0, gap: 1, children: [
|
|
3608
|
+
/* @__PURE__ */ jsx(Text, { color: colors.primary, bold: true, children: "//" }),
|
|
3609
|
+
/* @__PURE__ */ jsx(Text, { color: colors.secondary, bold: true, children: children.toUpperCase() })
|
|
3579
3610
|
] });
|
|
3580
3611
|
}
|
|
3581
3612
|
function SuccessItem({ children }) {
|
|
3582
|
-
return /* @__PURE__ */ jsxs(Box, { marginLeft:
|
|
3583
|
-
/* @__PURE__ */ jsx(Text, { color: colors.success, children: "
|
|
3613
|
+
return /* @__PURE__ */ jsxs(Box, { marginLeft: 3, children: [
|
|
3614
|
+
/* @__PURE__ */ jsx(Text, { color: colors.success, bold: true, children: "+ " }),
|
|
3584
3615
|
/* @__PURE__ */ jsx(Text, { children })
|
|
3585
3616
|
] });
|
|
3586
3617
|
}
|
|
3587
3618
|
function SkipItem({ children }) {
|
|
3588
|
-
return /* @__PURE__ */ jsxs(Box, { marginLeft:
|
|
3589
|
-
/* @__PURE__ */ jsx(Text, { color: colors.warning, children: "
|
|
3619
|
+
return /* @__PURE__ */ jsxs(Box, { marginLeft: 3, children: [
|
|
3620
|
+
/* @__PURE__ */ jsx(Text, { color: colors.warning, children: "~ " }),
|
|
3590
3621
|
/* @__PURE__ */ jsx(Text, { color: colors.muted, children })
|
|
3591
3622
|
] });
|
|
3592
3623
|
}
|
|
3593
3624
|
function InfoItem({ children }) {
|
|
3594
|
-
return /* @__PURE__ */ jsxs(Box, { marginLeft:
|
|
3595
|
-
/* @__PURE__ */ jsx(Text, { color: colors.accent, children: "
|
|
3625
|
+
return /* @__PURE__ */ jsxs(Box, { marginLeft: 3, children: [
|
|
3626
|
+
/* @__PURE__ */ jsx(Text, { color: colors.accent, bold: true, children: "* " }),
|
|
3596
3627
|
/* @__PURE__ */ jsx(Text, { children })
|
|
3597
3628
|
] });
|
|
3598
3629
|
}
|
|
3599
3630
|
function ErrorItem({ children }) {
|
|
3600
|
-
return /* @__PURE__ */ jsxs(Box, { marginLeft:
|
|
3601
|
-
/* @__PURE__ */ jsx(Text, { color: colors.error, children: "
|
|
3631
|
+
return /* @__PURE__ */ jsxs(Box, { marginLeft: 3, children: [
|
|
3632
|
+
/* @__PURE__ */ jsx(Text, { color: colors.error, bold: true, children: "x " }),
|
|
3602
3633
|
/* @__PURE__ */ jsx(Text, { children })
|
|
3603
3634
|
] });
|
|
3604
3635
|
}
|
|
3605
3636
|
function Hint({ children }) {
|
|
3606
|
-
return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginLeft:
|
|
3607
|
-
/* @__PURE__ */ jsx(Text, { color: colors.
|
|
3608
|
-
/* @__PURE__ */ jsx(Text, { color: colors.
|
|
3637
|
+
return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginLeft: 3, children: [
|
|
3638
|
+
/* @__PURE__ */ jsx(Text, { color: colors.tertiary, children: "? " }),
|
|
3639
|
+
/* @__PURE__ */ jsx(Text, { color: colors.muted, italic: true, children })
|
|
3609
3640
|
] });
|
|
3610
3641
|
}
|
|
3611
3642
|
function NextStep({ children }) {
|
|
3612
|
-
return /* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
|
|
3613
|
-
/* @__PURE__ */ jsx(Text, { color: colors.
|
|
3643
|
+
return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginLeft: 1, children: [
|
|
3644
|
+
/* @__PURE__ */ jsx(Text, { color: colors.accent, bold: true, children: ">> " }),
|
|
3614
3645
|
/* @__PURE__ */ jsx(Text, { color: colors.tertiary, children })
|
|
3615
3646
|
] });
|
|
3616
3647
|
}
|
|
@@ -3619,26 +3650,34 @@ function PromptBox({ children }) {
|
|
|
3619
3650
|
Box,
|
|
3620
3651
|
{
|
|
3621
3652
|
borderStyle: "round",
|
|
3622
|
-
borderColor: colors.
|
|
3653
|
+
borderColor: colors.secondary,
|
|
3623
3654
|
paddingX: 2,
|
|
3624
3655
|
paddingY: 1,
|
|
3625
3656
|
marginY: 1,
|
|
3626
|
-
|
|
3657
|
+
marginX: 1,
|
|
3658
|
+
children: /* @__PURE__ */ jsx(Text, { color: colors.tertiary, children })
|
|
3627
3659
|
}
|
|
3628
3660
|
);
|
|
3629
3661
|
}
|
|
3630
|
-
function
|
|
3631
|
-
|
|
3632
|
-
value,
|
|
3633
|
-
color
|
|
3662
|
+
function StatusBar({
|
|
3663
|
+
items
|
|
3634
3664
|
}) {
|
|
3635
|
-
return /* @__PURE__ */
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3665
|
+
return /* @__PURE__ */ jsx(
|
|
3666
|
+
Box,
|
|
3667
|
+
{
|
|
3668
|
+
marginLeft: 1,
|
|
3669
|
+
marginTop: 1,
|
|
3670
|
+
borderStyle: "single",
|
|
3671
|
+
borderColor: colors.dim,
|
|
3672
|
+
paddingX: 2,
|
|
3673
|
+
paddingY: 0,
|
|
3674
|
+
gap: 3,
|
|
3675
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
3676
|
+
/* @__PURE__ */ jsx(Text, { color: colors.muted, children: item.label }),
|
|
3677
|
+
/* @__PURE__ */ jsx(Text, { color: item.color, bold: true, children: String(item.value) })
|
|
3678
|
+
] }, i))
|
|
3679
|
+
}
|
|
3680
|
+
);
|
|
3642
3681
|
}
|
|
3643
3682
|
|
|
3644
3683
|
// src/commands/init.tsx
|
|
@@ -18202,25 +18241,23 @@ function DoctorApp() {
|
|
|
18202
18241
|
/* @__PURE__ */ jsx3(Divider, {}),
|
|
18203
18242
|
phase === "scanning" && /* @__PURE__ */ jsx3(Box3, { marginTop: 1, marginLeft: 2, children: /* @__PURE__ */ jsx3(Spinner2, { label: "Scanning workspace for context artifacts..." }) }),
|
|
18204
18243
|
phase === "done" && result && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
18205
|
-
/* @__PURE__ */ jsx3(
|
|
18206
|
-
|
|
18207
|
-
|
|
18208
|
-
|
|
18209
|
-
|
|
18210
|
-
|
|
18211
|
-
|
|
18212
|
-
|
|
18213
|
-
|
|
18214
|
-
|
|
18215
|
-
|
|
18216
|
-
|
|
18217
|
-
|
|
18218
|
-
|
|
18219
|
-
|
|
18220
|
-
|
|
18221
|
-
|
|
18222
|
-
)
|
|
18223
|
-
] }),
|
|
18244
|
+
/* @__PURE__ */ jsx3(
|
|
18245
|
+
StatusBar,
|
|
18246
|
+
{
|
|
18247
|
+
items: [
|
|
18248
|
+
{
|
|
18249
|
+
label: "Found",
|
|
18250
|
+
value: result.discoveredCount,
|
|
18251
|
+
color: result.discoveredCount > 0 ? colors.success : colors.warning
|
|
18252
|
+
},
|
|
18253
|
+
{
|
|
18254
|
+
label: "Missing",
|
|
18255
|
+
value: result.missingCount,
|
|
18256
|
+
color: result.missingCount > 0 ? colors.warning : colors.success
|
|
18257
|
+
}
|
|
18258
|
+
]
|
|
18259
|
+
}
|
|
18260
|
+
),
|
|
18224
18261
|
result.discovered.length > 0 && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
18225
18262
|
/* @__PURE__ */ jsx3(SectionTitle, { children: "Discovered artifacts" }),
|
|
18226
18263
|
result.discovered.map((item, i) => /* @__PURE__ */ jsx3(SuccessItem, { children: item }, i))
|
|
@@ -18251,10 +18288,12 @@ function runDoctorCommand(options2) {
|
|
|
18251
18288
|
}
|
|
18252
18289
|
|
|
18253
18290
|
// src/commands/prompt.tsx
|
|
18291
|
+
import { useState as useState3, useEffect as useEffect3 } from "react";
|
|
18254
18292
|
import fs4 from "fs";
|
|
18255
18293
|
import path4 from "path";
|
|
18256
18294
|
import { Box as Box4, Text as Text4, render as render3 } from "ink";
|
|
18257
|
-
import
|
|
18295
|
+
import clipboardy from "clipboardy";
|
|
18296
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
18258
18297
|
var REPORT_FILENAME2 = ".agentlint-report.md";
|
|
18259
18298
|
var PROMPT_WITH_REPORT = "Read the file .agentlint-report.md in this project and execute all recommended fixes. Use the agentlint MCP tools (agentlint_get_guidelines, agentlint_plan_workspace_autofix) for detailed guidelines on each artifact type. Apply all changes directly.";
|
|
18260
18299
|
var PROMPT_WITHOUT_REPORT = "Run agentlint_plan_workspace_autofix to scan this project for AI agent context artifacts (AGENTS.md, skills, rules, workflows, plans). Then execute the fix plan step by step. Use agentlint_get_guidelines for each artifact type before editing. Apply all changes directly.";
|
|
@@ -18263,18 +18302,35 @@ function PromptApp() {
|
|
|
18263
18302
|
const reportPath = path4.join(rootPath, REPORT_FILENAME2);
|
|
18264
18303
|
const hasReport = fs4.existsSync(reportPath);
|
|
18265
18304
|
const prompt = hasReport ? PROMPT_WITH_REPORT : PROMPT_WITHOUT_REPORT;
|
|
18305
|
+
const [copied, setCopied] = useState3(false);
|
|
18306
|
+
const [copyError, setCopyError] = useState3(false);
|
|
18307
|
+
useEffect3(() => {
|
|
18308
|
+
clipboardy.write(prompt).then(() => setCopied(true)).catch(() => setCopyError(true));
|
|
18309
|
+
}, []);
|
|
18266
18310
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
18267
18311
|
/* @__PURE__ */ jsx4(Banner, {}),
|
|
18268
18312
|
/* @__PURE__ */ jsx4(Divider, {}),
|
|
18269
|
-
/* @__PURE__ */
|
|
18313
|
+
/* @__PURE__ */ jsxs4(Box4, { marginTop: 1, marginLeft: 1, gap: 1, children: [
|
|
18314
|
+
copied && /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
18315
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.success, bold: true, children: "+" }),
|
|
18316
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.success, bold: true, children: "Copied to clipboard!" }),
|
|
18317
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.muted, children: "Paste it into your IDE chat." })
|
|
18318
|
+
] }),
|
|
18319
|
+
copyError && /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
18320
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.warning, children: "~" }),
|
|
18321
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.warning, children: "Could not copy to clipboard." }),
|
|
18322
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.muted, children: "Copy the prompt below manually." })
|
|
18323
|
+
] }),
|
|
18324
|
+
!copied && !copyError && /* @__PURE__ */ jsx4(Text4, { color: colors.muted, children: "Copying to clipboard..." })
|
|
18325
|
+
] }),
|
|
18270
18326
|
/* @__PURE__ */ jsx4(PromptBox, { children: prompt }),
|
|
18271
|
-
hasReport ? /* @__PURE__ */ jsxs4(Box4, { marginLeft:
|
|
18272
|
-
/* @__PURE__ */ jsx4(Text4, { color: colors.success, children: "
|
|
18327
|
+
hasReport ? /* @__PURE__ */ jsxs4(Box4, { marginLeft: 3, children: [
|
|
18328
|
+
/* @__PURE__ */ jsx4(Text4, { color: colors.success, bold: true, children: "+ " }),
|
|
18273
18329
|
/* @__PURE__ */ jsxs4(Text4, { color: colors.muted, children: [
|
|
18274
18330
|
"Using report from ",
|
|
18275
18331
|
REPORT_FILENAME2
|
|
18276
18332
|
] })
|
|
18277
|
-
] }) : /* @__PURE__ */ jsx4(Hint, { children:
|
|
18333
|
+
] }) : /* @__PURE__ */ jsx4(Hint, { children: "Run agent-lint doctor first to generate a detailed report for better results." })
|
|
18278
18334
|
] });
|
|
18279
18335
|
}
|
|
18280
18336
|
function runPromptCommand() {
|
|
@@ -18291,7 +18347,7 @@ if (nodeVersion < 18) {
|
|
|
18291
18347
|
process.exit(1);
|
|
18292
18348
|
}
|
|
18293
18349
|
var program = new Command();
|
|
18294
|
-
program.name("agent-lint").description("Meta-agent orchestrator for AI coding agent context artifacts").version("0.3.
|
|
18350
|
+
program.name("agent-lint").description("Meta-agent orchestrator for AI coding agent context artifacts").version("0.3.1").showHelpAfterError();
|
|
18295
18351
|
program.command("init").description("Set up Agent Lint MCP config for detected IDE clients").option("-y, --yes", "Skip confirmation prompts").option("--all", "Generate configs for all supported clients, not just detected ones").action((options2) => {
|
|
18296
18352
|
runInitCommand(options2);
|
|
18297
18353
|
});
|