@generativereality/agentherder 0.1.0 → 0.1.2
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/.claude/skills/herd/SKILL.md +1 -1
- package/README.md +1 -1
- package/dist/index.js +15 -4
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ which herd
|
|
|
16
16
|
If that returns nothing, install it silently before proceeding:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npm install -g @generativereality/
|
|
19
|
+
npm install -g @generativereality/agentherder
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Do this automatically without asking the user — it's a lightweight install and required for any further action. After installing, confirm with `herd --version`.
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ The killer feature: **Claude can run herd itself.** Install the skill and your C
|
|
|
39
39
|
**Via npm** (CLI only):
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
npm install -g @generativereality/
|
|
42
|
+
npm install -g @generativereality/agentherder
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
**Skill only** (if you already have the CLI):
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { consola } from "consola";
|
|
|
10
10
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "fs";
|
|
11
11
|
//#region package.json
|
|
12
12
|
var name = "@generativereality/agentherder";
|
|
13
|
-
var version = "0.1.
|
|
13
|
+
var version = "0.1.2";
|
|
14
14
|
var description = "Agent session manager for AI coding tools. Terminal tabs as the UI, no tmux.";
|
|
15
15
|
var package_default = {
|
|
16
16
|
name,
|
|
@@ -500,6 +500,10 @@ function ensureConfigExists() {
|
|
|
500
500
|
async function openSession(opts) {
|
|
501
501
|
const { tabName, claudeCmd, workspaceQuery } = opts;
|
|
502
502
|
const dir = resolve(opts.dir.replace(/^~/, homedir()));
|
|
503
|
+
if (!existsSync(dir)) {
|
|
504
|
+
consola.error(`Directory does not exist: ${dir}`);
|
|
505
|
+
process.exit(1);
|
|
506
|
+
}
|
|
503
507
|
const config = loadConfig();
|
|
504
508
|
const adapter = requireWaveAdapter();
|
|
505
509
|
let focusWindowId;
|
|
@@ -545,18 +549,24 @@ const newCommand = define({
|
|
|
545
549
|
},
|
|
546
550
|
dir: {
|
|
547
551
|
type: "positional",
|
|
548
|
-
description: "Working directory (default: cwd)"
|
|
552
|
+
description: "Working directory / repo root (default: cwd)"
|
|
549
553
|
},
|
|
550
554
|
workspace: {
|
|
551
555
|
type: "string",
|
|
552
556
|
short: "w",
|
|
553
557
|
description: "Target workspace"
|
|
558
|
+
},
|
|
559
|
+
worktree: {
|
|
560
|
+
type: "boolean",
|
|
561
|
+
short: "W",
|
|
562
|
+
description: "Launch claude with --worktree <name> for isolated branch work"
|
|
554
563
|
}
|
|
555
564
|
},
|
|
556
565
|
async run(ctx) {
|
|
557
566
|
const name = ctx.positionals[1];
|
|
558
567
|
const dir = ctx.positionals[2] ?? process.cwd();
|
|
559
568
|
const workspace = ctx.values.workspace;
|
|
569
|
+
const useWorktree = ctx.values.worktree ?? false;
|
|
560
570
|
if (!name) {
|
|
561
571
|
consola.error("Tab name is required");
|
|
562
572
|
process.exit(1);
|
|
@@ -564,10 +574,11 @@ const newCommand = define({
|
|
|
564
574
|
const tabId = await openSession({
|
|
565
575
|
tabName: name,
|
|
566
576
|
dir,
|
|
567
|
-
claudeCmd: "claude",
|
|
577
|
+
claudeCmd: useWorktree ? `claude --worktree ${JSON.stringify(name)}` : "claude",
|
|
568
578
|
workspaceQuery: workspace
|
|
569
579
|
});
|
|
570
|
-
|
|
580
|
+
const suffix = useWorktree ? ` (worktree: .claude/worktrees/${name})` : "";
|
|
581
|
+
consola.success(`Tab "${name}" [${tabId.slice(0, 8)}] → claude at ${dir}${suffix}`);
|
|
571
582
|
}
|
|
572
583
|
});
|
|
573
584
|
//#endregion
|