agenthud 0.2.1 → 0.3.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 CHANGED
@@ -44,14 +44,14 @@ npx agenthud
44
44
  ## Features
45
45
 
46
46
  - **Git**: Branch, commits, line changes
47
- - **Plan**: Progress, decisions from `.agent/plan.json`
47
+ - **Plan**: Progress, decisions from `.agenthud/plan.json`
48
48
  - **Tests**: Results with outdated detection
49
49
 
50
50
  ## Setup
51
51
 
52
52
  Add to your `CLAUDE.md`:
53
53
  ```markdown
54
- Maintain `.agent/` directory:
54
+ Maintain `.agenthud/` directory:
55
55
  - Update `plan.json` when plan changes
56
56
  - Update `decisions.json` for key decisions
57
57
  ```
package/dist/index.js CHANGED
@@ -60,10 +60,12 @@ function GitPanel({ branch, commits, stats, uncommitted = 0 }) {
60
60
  " \xB7 ",
61
61
  stats.files,
62
62
  " ",
63
- fileWord,
64
- hasUncommitted ? ` \xB7 ` : ""
65
- ] }),
66
- hasUncommitted && /* @__PURE__ */ jsxs(Text, { color: "yellow", children: [
63
+ fileWord
64
+ ] })
65
+ ] }),
66
+ hasUncommitted && /* @__PURE__ */ jsxs(Fragment, { children: [
67
+ /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \xB7 " }),
68
+ /* @__PURE__ */ jsxs(Text, { color: "yellow", children: [
67
69
  uncommitted,
68
70
  " dirty"
69
71
  ] })
@@ -257,7 +259,7 @@ function WelcomePanel() {
257
259
  return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", borderStyle: "single", paddingX: 1, width: PANEL_WIDTH, children: [
258
260
  /* @__PURE__ */ jsx4(Box4, { marginTop: -1, children: /* @__PURE__ */ jsx4(Text4, { children: " Welcome to agenthud " }) }),
259
261
  /* @__PURE__ */ jsx4(Text4, { children: " " }),
260
- /* @__PURE__ */ jsx4(Text4, { children: " No .agent/ directory found." }),
262
+ /* @__PURE__ */ jsx4(Text4, { children: " No .agenthud/ directory found." }),
261
263
  /* @__PURE__ */ jsx4(Text4, { children: " " }),
262
264
  /* @__PURE__ */ jsx4(Text4, { children: " Quick setup:" }),
263
265
  /* @__PURE__ */ jsx4(Text4, { color: "cyan", children: " npx agenthud init" }),
@@ -338,7 +340,7 @@ function getUncommittedCount() {
338
340
  // src/data/plan.ts
339
341
  import { readFileSync as nodeReadFileSync } from "fs";
340
342
  import { join } from "path";
341
- var AGENT_DIR = ".agent";
343
+ var AGENT_DIR = ".agenthud";
342
344
  var PLAN_FILE = "plan.json";
343
345
  var DECISIONS_FILE = "decisions.json";
344
346
  var MAX_DECISIONS = 3;
@@ -374,7 +376,7 @@ function getPlanData(dir = process.cwd()) {
374
376
  import { readFileSync as nodeReadFileSync2 } from "fs";
375
377
  import { execSync as nodeExecSync2 } from "child_process";
376
378
  import { join as join2 } from "path";
377
- var AGENT_DIR2 = ".agent";
379
+ var AGENT_DIR2 = ".agenthud";
378
380
  var TEST_RESULTS_FILE = "test-results.json";
379
381
  var readFileFn2 = (path) => nodeReadFileSync2(path, "utf-8");
380
382
  var getHeadHashFn = () => {
@@ -566,7 +568,7 @@ var fs = {
566
568
  };
567
569
  var AGENT_STATE_SECTION = `## Agent State
568
570
 
569
- Maintain \`.agent/\` directory:
571
+ Maintain \`.agenthud/\` directory:
570
572
  - Update \`plan.json\` when plan changes
571
573
  - Append to \`decisions.json\` for key decisions
572
574
  `;
@@ -575,23 +577,35 @@ function runInit() {
575
577
  created: [],
576
578
  skipped: []
577
579
  };
578
- if (!fs.existsSync(".agent")) {
579
- fs.mkdirSync(".agent", { recursive: true });
580
- result.created.push(".agent/");
580
+ if (!fs.existsSync(".agenthud")) {
581
+ fs.mkdirSync(".agenthud", { recursive: true });
582
+ result.created.push(".agenthud/");
581
583
  } else {
582
- result.skipped.push(".agent/");
584
+ result.skipped.push(".agenthud/");
583
585
  }
584
- if (!fs.existsSync(".agent/plan.json")) {
585
- fs.writeFileSync(".agent/plan.json", "{}\n");
586
- result.created.push(".agent/plan.json");
586
+ if (!fs.existsSync(".agenthud/plan.json")) {
587
+ fs.writeFileSync(".agenthud/plan.json", "{}\n");
588
+ result.created.push(".agenthud/plan.json");
587
589
  } else {
588
- result.skipped.push(".agent/plan.json");
590
+ result.skipped.push(".agenthud/plan.json");
589
591
  }
590
- if (!fs.existsSync(".agent/decisions.json")) {
591
- fs.writeFileSync(".agent/decisions.json", "[]\n");
592
- result.created.push(".agent/decisions.json");
592
+ if (!fs.existsSync(".agenthud/decisions.json")) {
593
+ fs.writeFileSync(".agenthud/decisions.json", "[]\n");
594
+ result.created.push(".agenthud/decisions.json");
593
595
  } else {
594
- result.skipped.push(".agent/decisions.json");
596
+ result.skipped.push(".agenthud/decisions.json");
597
+ }
598
+ if (!fs.existsSync(".gitignore")) {
599
+ fs.writeFileSync(".gitignore", ".agenthud/\n");
600
+ result.created.push(".gitignore");
601
+ } else {
602
+ const content = fs.readFileSync(".gitignore");
603
+ if (!content.includes(".agenthud/")) {
604
+ fs.appendFileSync(".gitignore", "\n.agenthud/\n");
605
+ result.created.push(".gitignore");
606
+ } else {
607
+ result.skipped.push(".gitignore");
608
+ }
595
609
  }
596
610
  if (!fs.existsSync("CLAUDE.md")) {
597
611
  fs.writeFileSync("CLAUDE.md", AGENT_STATE_SECTION);
@@ -622,11 +636,11 @@ if (options.command === "init") {
622
636
  result.skipped.forEach((file) => console.log(` ${file}`));
623
637
  }
624
638
  console.log("\nNext steps:");
625
- console.log(" 1. Edit .agent/plan.json to add your project plan");
639
+ console.log(" 1. Edit .agenthud/plan.json to add your project plan");
626
640
  console.log(" 2. Run: npx agenthud\n");
627
641
  process.exit(0);
628
642
  }
629
- var agentDirExists = existsSync(".agent");
643
+ var agentDirExists = existsSync(".agenthud");
630
644
  if (options.mode === "watch") {
631
645
  clearScreen();
632
646
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenthud",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "CLI tool to monitor agent status in real-time. Works with Claude Code, multi-agent workflows, and any AI agent system.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -7,7 +7,7 @@
7
7
  * npm run test:save
8
8
  *
9
9
  * Output:
10
- * .agent/test-results.json
10
+ * .agenthud/test-results.json
11
11
  */
12
12
 
13
13
  import { execSync } from "child_process";
@@ -106,8 +106,8 @@ function main(): void {
106
106
  failures: extractFailures(vitestResult),
107
107
  };
108
108
 
109
- // Ensure .agent directory exists
110
- const agentDir = join(process.cwd(), ".agent");
109
+ // Ensure .agenthud directory exists
110
+ const agentDir = join(process.cwd(), ".agenthud");
111
111
  if (!existsSync(agentDir)) {
112
112
  mkdirSync(agentDir, { recursive: true });
113
113
  }