cheap-agent 1.1.0 → 1.1.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 CHANGED
@@ -6,7 +6,6 @@
6
6
 
7
7
  <p align="center">
8
8
  <img src="https://img.shields.io/npm/v/cheap-agent?style=flat-square&color=111111&label=npm" alt="npm">
9
- <img src="https://img.shields.io/npm/dt/cheap-agent?style=flat-square&color=111111&label=downloads" alt="npm downloads">
10
9
  <img src="https://img.shields.io/badge/for-Claude%20Code-111111?style=flat-square" alt="For Claude Code">
11
10
  <img src="https://img.shields.io/badge/cheap%20model-%C2%BD%C2%A2%20a%20task-111111?style=flat-square" alt="Cheap model: half a cent a task">
12
11
  <img src="https://img.shields.io/badge/tested%20on-SWE--bench%20Verified-111111?style=flat-square" alt="Tested on SWE-bench Verified">
package/dist/workspace.js CHANGED
@@ -58,7 +58,7 @@ export function createWorktree(root, job, linkDirs) {
58
58
  }
59
59
  const linked = links.map((l) => normalisePath(relative(path, l)));
60
60
  // the carried-over state as a tree object: the job's baseline, without committing anything
61
- git(path, ["add", "-A", "--", ".", ...outside(linked)]);
61
+ git(path, ["add", "-A", "--", ".", ...outside(notIgnored(path, linked))]);
62
62
  const base = git(path, ["write-tree"]).trim();
63
63
  return { path, head, stash, base, links, linked };
64
64
  }
@@ -78,6 +78,8 @@ function discard(root, path, links) {
78
78
  }
79
79
  /** Pathspecs that keep Cheap Agent's state and the given dependency dirs out of a git operation. */
80
80
  const outside = (dirs) => [".cheapag", ...dirs].map((d) => `:(exclude,top,literal)${d}`);
81
+ // git 2.55 rejects a pathspec naming an ignored path, even as an exclusion; an already-ignored dir needs no exclusion
82
+ const notIgnored = (dir, paths) => paths.filter((p) => spawnSync("git", [...GIT_ARGS, "check-ignore", "-q", "--", p], { cwd: dir, stdio: "pipe" }).status !== 0);
81
83
  const isDirectory = (path) => {
82
84
  try {
83
85
  return statSync(path).isDirectory();
@@ -91,7 +93,7 @@ export function worktreeDiff(worktree) {
91
93
  const { path, base } = worktree;
92
94
  // the worktree's own index: throwaway, never committed. A linked dir is a symlink, which a `node_modules/`
93
95
  // ignore rule does not match, so the linked ones (only those: a tracked vendor/ stays in) are excluded.
94
- git(path, ["add", "-A", "--", ".", ...outside(worktree.linked)]);
96
+ git(path, ["add", "-A", "--", ".", ...outside(notIgnored(path, worktree.linked))]);
95
97
  const patch = git(path, ["diff", "--cached", "--binary", base]);
96
98
  const stats = git(path, ["diff", "--cached", "--numstat", "-z", "--no-renames", base]).split("\0").filter(Boolean);
97
99
  const statuses = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cheap-agent",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Cut your Claude Code usage: Claude plans, a cheap model writes the code. One command to install.",
5
5
  "license": "Elastic-2.0",
6
6
  "author": "muaaz9329",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cheapag",
3
3
  "displayName": "Cheap Agent",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "description": "Claude plans and reviews while a cheaper model implements: the cheapag MCP server, the plan-writing skill, status, allow, hook and clean commands, and an opt-in edit guard.",
6
6
  "author": { "name": "muaaz9329" },
7
7
  "keywords": ["delegation", "opencode", "mcp", "cost"]
package/plugin/.mcp.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "cheapag": {
4
4
  "command": "npx",
5
- "args": ["-y", "cheap-agent@1.1.0"]
5
+ "args": ["-y", "cheap-agent@1.1.1"]
6
6
  }
7
7
  }
8
8
  }
@@ -7,7 +7,7 @@
7
7
  "hooks": [
8
8
  {
9
9
  "type": "command",
10
- "command": "r=$(git rev-parse --show-toplevel 2>/dev/null) && { [ -f \"$r/.cheapag/hook.json\" ] || [ -f \"$r/.cheapag/hook/takeover\" ]; } && npx -y cheap-agent@1.1.0 hook guard; exit 0",
10
+ "command": "r=$(git rev-parse --show-toplevel 2>/dev/null) && { [ -f \"$r/.cheapag/hook.json\" ] || [ -f \"$r/.cheapag/hook/takeover\" ]; } && npx -y cheap-agent@1.1.1 hook guard; exit 0",
11
11
  "timeout": 60
12
12
  }
13
13
  ]
@@ -19,7 +19,7 @@
19
19
  "hooks": [
20
20
  {
21
21
  "type": "command",
22
- "command": "npx -y cheap-agent@1.1.0 hook result; exit 0",
22
+ "command": "npx -y cheap-agent@1.1.1 hook result; exit 0",
23
23
  "timeout": 60
24
24
  }
25
25
  ]
@@ -30,7 +30,7 @@
30
30
  "hooks": [
31
31
  {
32
32
  "type": "command",
33
- "command": "npx -y cheap-agent@1.1.0 hook context",
33
+ "command": "npx -y cheap-agent@1.1.1 hook context",
34
34
  "timeout": 60
35
35
  }
36
36
  ]
@@ -3,9 +3,9 @@ name: allow
3
3
  description: Opt this repository in to sending code to Cheap Agent's worker models - all models, --zdr-only (zero-retention only), or --models provider/model,...
4
4
  argument-hint: "[--zdr-only | --models provider/model,...]"
5
5
  disable-model-invocation: true
6
- allowed-tools: Bash(npx -y cheap-agent@1.1.0 allow) Bash(npx -y cheap-agent@1.1.0 allow *)
6
+ allowed-tools: Bash(npx -y cheap-agent@1.1.1 allow) Bash(npx -y cheap-agent@1.1.1 allow *)
7
7
  ---
8
8
 
9
- !`npx -y cheap-agent@1.1.0 allow $ARGUMENTS`
9
+ !`npx -y cheap-agent@1.1.1 allow $ARGUMENTS`
10
10
 
11
11
  The developer ran this consent command themselves; its output is above. Report it in one line. Do not run `cheapag allow` or change consent in any other way.
@@ -3,9 +3,9 @@ name: clean
3
3
  description: Remove Cheap Agent's old worktrees and job logs now; --all removes everything not in flight.
4
4
  argument-hint: "[--all]"
5
5
  disable-model-invocation: true
6
- allowed-tools: Bash(npx -y cheap-agent@1.1.0 clean) Bash(npx -y cheap-agent@1.1.0 clean *)
6
+ allowed-tools: Bash(npx -y cheap-agent@1.1.1 clean) Bash(npx -y cheap-agent@1.1.1 clean *)
7
7
  ---
8
8
 
9
- !`npx -y cheap-agent@1.1.0 clean $ARGUMENTS`
9
+ !`npx -y cheap-agent@1.1.1 clean $ARGUMENTS`
10
10
 
11
11
  Report the result above to the user in one or two lines.
@@ -3,9 +3,9 @@ name: hook
3
3
  description: Turn Cheap Agent's edit guard on or off for this repo - when on, Claude's large edits (or a 3rd edit to one file in a turn) are denied and redirected to delegate.
4
4
  argument-hint: "[on | off]"
5
5
  disable-model-invocation: true
6
- allowed-tools: Bash(npx -y cheap-agent@1.1.0 hook) Bash(npx -y cheap-agent@1.1.0 hook *)
6
+ allowed-tools: Bash(npx -y cheap-agent@1.1.1 hook) Bash(npx -y cheap-agent@1.1.1 hook *)
7
7
  ---
8
8
 
9
- !`npx -y cheap-agent@1.1.0 hook $ARGUMENTS`
9
+ !`npx -y cheap-agent@1.1.1 hook $ARGUMENTS`
10
10
 
11
11
  The developer ran this command themselves; its output is above. Report it in one line. Do not turn the edit guard on or off in any other way.
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: status
3
3
  description: Show Cheap Agent's status for this repo - running jobs, recent results, consent, and tracked spend against OpenCode Go windows.
4
- allowed-tools: Bash(npx -y cheap-agent@1.1.0 status)
4
+ allowed-tools: Bash(npx -y cheap-agent@1.1.1 status)
5
5
  ---
6
6
 
7
- !`npx -y cheap-agent@1.1.0 status`
7
+ !`npx -y cheap-agent@1.1.1 status`
8
8
 
9
9
  Show the status above to the user as is. Add a line only if something needs their action (a BLOCKED job to reply to, a missing consent, a Go window near its cap).