freebuff-autocontinue 0.1.7 → 0.2.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/Formula/freebuff-autocontinue.rb +19 -18
- package/README.md +25 -2
- package/dist/cli.js +752 -363
- package/dist/index.js +767 -382
- package/package.json +17 -3
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
1
|
class FreebuffAutocontinue < Formula
|
|
4
2
|
desc "Autonomous session supervisor for Freebuff CLI with smart model fallback"
|
|
5
3
|
homepage "https://github.com/kelvindesman/freebuff-autocontinue"
|
|
6
4
|
# NOTE: the tag-driven release workflow patches `url` + `sha256` on every
|
|
7
5
|
# version tag. The placeholder below is only for local `brew install --build-from-source` checks.
|
|
8
|
-
url "https://github.com/kelvindesman/freebuff-autocontinue/releases/download/v0.1.
|
|
9
|
-
sha256 "
|
|
6
|
+
url "https://github.com/kelvindesman/freebuff-autocontinue/releases/download/v0.1.8/freebuff-autocontinue-v0.1.8.tar.gz"
|
|
7
|
+
sha256 "77ef88dced2b327a63495f504812af0f49ee05da95593b8d9efd9685c4150c41"
|
|
10
8
|
license "MIT"
|
|
11
9
|
head "https://github.com/kelvindesman/freebuff-autocontinue.git", branch: "main"
|
|
12
10
|
|
|
11
|
+
livecheck do
|
|
12
|
+
url :stable
|
|
13
|
+
strategy :github_latest
|
|
14
|
+
end
|
|
15
|
+
|
|
13
16
|
depends_on "node"
|
|
14
17
|
depends_on "tmux"
|
|
15
18
|
|
|
16
19
|
def install
|
|
20
|
+
# NOTE: `brew audit` suggests `std_npm_args`, but that API does not exist
|
|
21
|
+
# in Homebrew <= 7.0.7 (including this machine). Revisit on core feedback.
|
|
17
22
|
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
|
|
18
23
|
|
|
19
|
-
# Homebrew's npm install omits devDependencies, but the
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"#{name}@#{ver}"
|
|
28
|
-
end
|
|
29
|
-
system "npm", "install", "--prefix=#{libexec}", "--no-save",
|
|
30
|
-
"--no-audit", "--no-fund", *build_tools
|
|
24
|
+
# Homebrew's npm install omits devDependencies, but the build needs them
|
|
25
|
+
# (esbuild). Install them deterministically from the committed lockfile,
|
|
26
|
+
# copied from the source tree (`files` deliberately excludes it from the
|
|
27
|
+
# published npm tarball), then build explicitly.
|
|
28
|
+
pkgdir = libexec/"lib/node_modules/freebuff-autocontinue"
|
|
29
|
+
cp buildpath/"package-lock.json", pkgdir/"package-lock.json"
|
|
30
|
+
system "npm", "ci", "--prefix=#{pkgdir}", "--no-audit", "--no-fund",
|
|
31
|
+
"--ignore-scripts"
|
|
31
32
|
|
|
32
33
|
# `npm install` honors the `files` whitelist, so `src/` never lands in
|
|
33
34
|
# libexec. Build from the extracted source (buildpath) into the installed
|
|
34
35
|
# package dir, with absolute paths (no cwd dependence).
|
|
35
|
-
|
|
36
|
-
esbuild =
|
|
36
|
+
# (`npm ci` above installs node_modules inside pkgdir.)
|
|
37
|
+
esbuild = pkgdir/"node_modules/.bin/esbuild"
|
|
37
38
|
system esbuild, "#{buildpath}/src/cli.ts", "--bundle", "--platform=node",
|
|
38
39
|
"--format=esm", "--outfile=#{pkgdir}/dist/cli.js"
|
|
39
40
|
system esbuild, "#{buildpath}/src/index.ts", "--bundle", "--platform=node",
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[-brightgreen.svg?style=flat-square)](./package.json)
|
|
6
6
|
[-lightgrey.svg?style=flat-square)](#platform-compatibility)
|
|
7
7
|
[](./.github/workflows/ci.yml)
|
|
8
|
-
[-blueviolet.svg?style=flat-square)](#is-this-secure)
|
|
9
9
|
|
|
10
10
|
> **Autonomous session supervisor for the [Freebuff CLI](https://freebuff.com/cli) AI coding agent.**
|
|
11
11
|
> Runs inside a detached, isolated `tmux` session with smart model fallback, Pacific Midnight refill scheduling, graceful midway account switching, and zero external runtime dependencies.
|
|
@@ -145,6 +145,23 @@ freebuff-autocontinue --attach
|
|
|
145
145
|
```
|
|
146
146
|
*(Detach anytime with `Ctrl+B, d` without interrupting the supervisor).*
|
|
147
147
|
|
|
148
|
+
### 8. Question Handling (`--auto-answer`)
|
|
149
|
+
When the agent pauses mid-turn to ask a question, the supervisor prints the
|
|
150
|
+
question, then submits the recommended option:
|
|
151
|
+
```text
|
|
152
|
+
============================================================================
|
|
153
|
+
[autocontinue] [QUESTION] Freebuff is asking a question:
|
|
154
|
+
----------------------------------------------------------------------------
|
|
155
|
+
Which ticket should I pick?
|
|
156
|
+
----------------------------------------------------------------------------
|
|
157
|
+
Attach to tmux directly: tmux -L freebuff-auto attach -t fb-auto
|
|
158
|
+
============================================================================
|
|
159
|
+
```
|
|
160
|
+
- Press `1`-`9` then Enter to pick an option, or `a` to attach and answer yourself.
|
|
161
|
+
- No input within `--question-timeout` seconds → the recommended option is submitted.
|
|
162
|
+
- `--no-auto-answer` never answers; it waits for a human (with a nudge every 30s).
|
|
163
|
+
- `--question-timeout 0` answers immediately without waiting.
|
|
164
|
+
|
|
148
165
|
---
|
|
149
166
|
|
|
150
167
|
## 🔒 Is This Secure?
|
|
@@ -154,7 +171,7 @@ freebuff-autocontinue --attach
|
|
|
154
171
|
1. **Zero Runtime Dependencies**: The package specifies `"dependencies": {}`. No third-party npm libraries are downloaded or executed at runtime, eliminating supply-chain attack vectors.
|
|
155
172
|
2. **Dedicated Socket Isolation**: Runs in `tmux -L freebuff-auto`, completely isolated from your personal tmux sessions.
|
|
156
173
|
3. **No Shell Injection**: Subprocesses are spawned using discrete argument arrays (`child_process.spawnSync("tmux", ["-L", ...])`). Never passes strings to `/bin/sh`.
|
|
157
|
-
4. **
|
|
174
|
+
4. **Local by Default, Opt-In Telemetry**: No data leaves your machine unless you opt in with `--telemetry-opt-in`. Even then, only version, platform, flag names, duration, exit code, and sanitized crash classes are recorded — never prompts, paths, or URLs. See [TELEMETRY.md](./TELEMETRY.md).
|
|
158
175
|
5. **Ethical Compliance**: Fully complies with [freebuff.com](https://freebuff.com) and [freebuff.com/web](https://freebuff.com/web) terms. Halts on bans (`banned`), country blocks (`country-blocked`), or IP caps (`ip-capped`).
|
|
159
176
|
|
|
160
177
|
For more details, see [SECURITY.md](./SECURITY.md).
|
|
@@ -190,6 +207,12 @@ For more details, see [SECURITY.md](./SECURITY.md).
|
|
|
190
207
|
| `--kill-on-exit` | `boolean` | `false` | Kill tmux session on exit (default leaves running) |
|
|
191
208
|
| `--allow-risky` | `boolean` | `false` | Consider TEST/peak-window tiers in model fallback |
|
|
192
209
|
| `--no-banner` | `boolean` | `false` | Silence rotating community reminders |
|
|
210
|
+
| `--auto-answer` | `boolean` | `true` | Auto-submit the recommended option when the agent asks a question |
|
|
211
|
+
| `--no-auto-answer` | `boolean` | `false` | Never auto-answer questions; wait for a human to attach |
|
|
212
|
+
| `--question-timeout` | `sec` | `30` | Seconds to wait for a human choice before auto-selecting (`0` = instant) |
|
|
213
|
+
| `--telemetry-opt-in` | `boolean` | `false` | Opt in to anonymous usage + crash reports |
|
|
214
|
+
| `--telemetry-opt-out` | `boolean` | `false` | Opt out and clear stored consent |
|
|
215
|
+
| `--telemetry-status` | `boolean` | `false` | Print the current telemetry consent state |
|
|
193
216
|
| `--attach` | `boolean` | `false` | Attach directly to the tmux session |
|
|
194
217
|
| `--self-test` | `boolean` | `false` | Run internal pattern detection tests |
|
|
195
218
|
| `--dry-run` | `boolean` | `false` | Classify sample transcript and preview actions |
|