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.
@@ -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.7/freebuff-autocontinue-v0.1.7.tar.gz"
9
- sha256 "e1a63802a3b2f31bd0929ed0d9b4a1647d88483992feb54434779648a1d925d3"
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 `prepare` build
20
- # needs them (esbuild). Install pinned build tools from package.json,
21
- # then build explicitly. Versions are read from package.json so they
22
- # can never drift.
23
- pkg = JSON.parse((buildpath/"package.json").read)
24
- # Keep the semver ranges from package.json (npm resolves them); stripping
25
- # `^` would pin nonexistent exact versions (e.g. typescript has no 5.6.0).
26
- build_tools = pkg.fetch("devDependencies", {}).map do |name, ver|
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
- pkgdir = libexec/"lib/node_modules/freebuff-autocontinue"
36
- esbuild = libexec/"node_modules/.bin/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
  [![Dependencies](https://img.shields.io/badge/dependencies-0%20(zero)-brightgreen.svg?style=flat-square)](./package.json)
6
6
  [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows%20(WSL)-lightgrey.svg?style=flat-square)](#platform-compatibility)
7
7
  [![CI Matrix](https://img.shields.io/badge/CI-Ubuntu%20%7C%20macOS%20%7C%20Windows-success.svg?style=flat-square)](./.github/workflows/ci.yml)
8
- [![Telemetry](https://img.shields.io/badge/telemetry-100%25%20local%20(none)-blueviolet.svg?style=flat-square)](#is-this-secure)
8
+ [![Telemetry](https://img.shields.io/badge/telemetry-off%20by%20default%20(opt--in)-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. **100% Local & No Telemetry**: Absolutely no data, prompts, or credentials are sent over any external network.
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 |