@shuyhere/bb-agent 0.0.14 → 0.0.16
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/CHANGELOG.md +68 -20
- package/README.md +9 -9
- package/package.json +1 -1
- package/scripts/postinstall.js +79 -27
package/CHANGELOG.md
CHANGED
|
@@ -5,12 +5,58 @@ All notable changes to BB-Agent will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.0.16] - 2026-04-15
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- added `bb setup browser`, including platform-specific guidance and optional shell-profile persistence for configuring `BB_BROWSER`
|
|
15
|
+
- added a dedicated release-notes draft for `v0.0.16` under `docs/release-notes-0.0.16.md`
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- user-facing terminology now consistently uses **TUI** instead of legacy `fullscreen` wording, including CLI/help/docs text and internal module/type naming
|
|
20
|
+
- markdown code blocks and bash tool previews in the TUI now render as raw fenced blocks for easier copying and pasting
|
|
21
|
+
- tool availability, advertised schemas, transcript validation, and tool execution now follow a shared architecture with a single CLI `ToolRegistry`, centralized provider transcript repair, explicit tool lifecycle phases, lifecycle hook events, and mutation-aware scheduling for real tool execution
|
|
22
|
+
- release builds and npm installs now prefer stripped/compressed native binaries, reducing download size and improving install/update behavior
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- `browser_fetch` now gives actionable missing-browser diagnostics and setup guidance instead of failing opaquely when no local browser is installed
|
|
27
|
+
- TUI footer context usage no longer gets stuck at misleading values like `0.0%/272k (auto)` after resume/rebuild/fork paths
|
|
28
|
+
- queued prompt previews no longer hide compaction/local-action status, and fast local actions no longer flash meaningless `0ms` / `0.0s` timing
|
|
29
|
+
- failed or interrupted tool calls no longer wedge later prompts with provider-side `No tool output found ...` errors; transcript repair and lifecycle finalization now guarantee a valid follow-up turn state
|
|
30
|
+
- join-timeout warnings no longer make an active TUI turn look finished before the runner actually completes
|
|
31
|
+
- clean `bb-cli` builds no longer emit dead-code warnings from the new tool registry surface, and secret-bearing auth/token structs now redact sensitive fields in debug output instead of exposing raw credentials
|
|
32
|
+
|
|
33
|
+
### Improved
|
|
34
|
+
|
|
35
|
+
- ongoing Rust audit cleanup significantly reduced boolean-heavy APIs, overexposed state, and hotspot modules across `bb-cli`, `bb-core`, `bb-tools`, `bb-session`, `bb-tui`, `bb-provider`, `bb-plugin-host`, and `bb-hooks`, with expanded focused regression coverage throughout
|
|
36
|
+
- npm install now prefers compressed `.gz` GitHub release assets when available, falling back to the legacy uncompressed binaries for older releases
|
|
37
|
+
- release builds now strip debug info before publishing, substantially reducing native binary download size for npm installs and updates
|
|
38
|
+
|
|
39
|
+
## [0.0.15] - 2026-04-12
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- tui bash output now streams live stdout/stderr and keeps running, finished, historical, and expanded/collapsed tool blocks visually consistent with width-aware tail previews and elapsed/took footer hints
|
|
44
|
+
- bash tool titles now skip shell prelude lines like `set -e`, show configured timeout values in the UI, and validate invalid timeout arguments instead of accepting zero or non-finite values
|
|
45
|
+
- fixed the session getting stuck after interrupted or failed tool calls by flushing synthetic tool results before later prompts, preventing follow-up turns from failing with missing tool output
|
|
46
|
+
- Codex tool-call request handling is more robust: tool calls are serialized sequentially, orphan tool results are sanitized out of requests, and streamed/done function-call events are deduplicated more safely
|
|
47
|
+
- plain URLs and hyphenated text no longer trigger accidental markdown horizontal-rule rendering while explicit markdown rules and setext headings still render correctly
|
|
48
|
+
- tui resume menu handling now awaits the async resume path correctly instead of dropping back through the synchronous menu flow
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- regression coverage for interrupted tool-call recovery, Codex orphan-tool sanitization, builtin tool-name normalization, tui bash rendering consistency, and bash timeout validation/visibility
|
|
53
|
+
|
|
8
54
|
## [0.0.14] - 2026-04-12
|
|
9
55
|
|
|
10
56
|
### Added
|
|
11
57
|
|
|
12
|
-
-
|
|
13
|
-
- `/settings` in
|
|
58
|
+
- tui now supports extension-driven workflows and structured slash-command outcomes, including menus, hidden dispatches, and richer command result handling
|
|
59
|
+
- `/settings` in tui now exposes compaction controls for `Auto-compact`, `Reserve tokens`, and `Keep recent tokens`
|
|
14
60
|
- skills can now be listed, disabled, and re-enabled from the CLI without deleting their installed files
|
|
15
61
|
- startup model selection now prefers configured provider/model defaults more consistently, with better OpenAI startup fallback behavior
|
|
16
62
|
- added a parity test script against installed pi compaction logic to keep BB token accounting aligned with upstream behavior
|
|
@@ -18,39 +64,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
64
|
### Fixed
|
|
19
65
|
|
|
20
66
|
- session resume now restores the prior model and thinking level instead of starting with mismatched runtime defaults
|
|
21
|
-
-
|
|
67
|
+
- tui/TUI terminal rendering now sanitizes terminal control text more reliably and avoids ANSI leakage into the UI
|
|
22
68
|
- auto-compaction token estimation now matches pi more closely by using the last successful assistant usage plus trailing estimates, using ceil-based token heuristics, computing `tokens_before` from rebuilt context instead of raw payload size, and ignoring assistant usage from before the latest compaction boundary
|
|
23
|
-
-
|
|
69
|
+
- tui compaction behavior and status reporting are more consistent after auto-compaction and manual compaction events, and local tui actions now show an animated elapsed-time status while they run
|
|
24
70
|
|
|
25
71
|
### Changed
|
|
26
72
|
|
|
27
|
-
-
|
|
73
|
+
- tui extension workflows and session compaction support are now merged into the main interaction path on `master`
|
|
28
74
|
|
|
29
75
|
## [0.0.13] - 2026-04-09
|
|
30
76
|
|
|
31
77
|
### Added
|
|
32
78
|
|
|
33
|
-
-
|
|
79
|
+
- tui screenshot and image clipboard paste now works on the normal paste path, with macOS clipboard fallbacks and Codex image preservation so pasted images reach image-capable models correctly
|
|
34
80
|
- model registry metadata now tracks image input capability, making `/models` truthful about image support and allowing runtime warnings when users attach images to text-only models
|
|
35
81
|
|
|
36
82
|
### Fixed
|
|
37
83
|
|
|
38
|
-
-
|
|
84
|
+
- tui clipboard image attach no longer leaks helper `true` / `false` output or stray follow-up paste text into the input block
|
|
39
85
|
- attached image chips can now be removed with `Backspace`, image-only prompts can be submitted, and optimistic user messages keep attachment chip previews in the transcript
|
|
40
|
-
- rebuilt
|
|
86
|
+
- rebuilt tui session transcripts now preserve user image attachment markers instead of silently dropping image blocks
|
|
41
87
|
- managed `bb-clipboard-*.png` temp files are now cleaned up after removal or ingestion instead of lingering in `/tmp`
|
|
42
|
-
- the
|
|
43
|
-
-
|
|
88
|
+
- the tui input block now hides raw `@file` tokens when the corresponding attachment chip is already shown, preventing duplicated `@file` text in the editor
|
|
89
|
+
- tui tool-header regression tests now match the intended live bash-header rendering and running-dot animation behavior
|
|
44
90
|
|
|
45
91
|
## [0.0.12] - 2026-04-06
|
|
46
92
|
|
|
47
93
|
### Fixed
|
|
48
94
|
|
|
49
|
-
- direct `@image` references in print mode and
|
|
95
|
+
- direct `@image` references in print mode and tui now attach real image inputs instead of falling back to UTF-8 read warnings
|
|
50
96
|
- `@path with spaces` parsing now correctly keeps the full file path before trailing prompt text, including whole-message forms
|
|
51
97
|
- image tool results are now preserved through provider conversion so models can actually see images returned by tools instead of responding as if no image was provided
|
|
52
|
-
-
|
|
53
|
-
- the
|
|
98
|
+
- tui `@` folder navigation now keeps the completion menu open when you select a directory and immediately shows the next level, including directories with spaces
|
|
99
|
+
- the tui input block now shows attached files as `[name, sizeKB]`, keeps those chips visible, and places the cursor below them so typing starts after the attachments
|
|
54
100
|
|
|
55
101
|
### Changed
|
|
56
102
|
|
|
@@ -60,9 +106,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
60
106
|
|
|
61
107
|
### Added
|
|
62
108
|
|
|
63
|
-
- startup update notices in the
|
|
64
|
-
- read-tool line ranges in
|
|
65
|
-
-
|
|
109
|
+
- startup update notices in the tui transcript are now highlighted so available updates stand out clearly during startup
|
|
110
|
+
- read-tool line ranges in tui tool activity now highlight the requested span, so values like `2148-2267/5006` stand out while the model is using tools
|
|
111
|
+
- tui footer and `/session` info now show the active execution posture so safety vs yolo is visible during a run
|
|
66
112
|
|
|
67
113
|
### Improved
|
|
68
114
|
|
|
@@ -81,7 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
81
127
|
|
|
82
128
|
- npm install now uses a longer timeout, retries release-binary downloads, and reports real download errors instead of incorrectly saying no matching prebuilt binary exists
|
|
83
129
|
- npm install now shows progress logs during native binary download and verification so first-time installs on macOS/Linux are less confusing
|
|
84
|
-
-
|
|
130
|
+
- tui `/login` provider-family status now correctly shows OpenAI OAuth state after ChatGPT login instead of incorrectly showing the API key path as not authenticated
|
|
85
131
|
|
|
86
132
|
### Changed
|
|
87
133
|
|
|
@@ -97,9 +143,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
97
143
|
|
|
98
144
|
### Fixed
|
|
99
145
|
|
|
100
|
-
-
|
|
146
|
+
- tui paste in iTerm2/SSH no longer corrupts the input area after paste
|
|
101
147
|
- pasted file and image paths are normalized more reliably, including quoted paths and `file://` URLs
|
|
102
|
-
-
|
|
148
|
+
- tui prompt submission now expands `@file` references consistently
|
|
103
149
|
- running tool timers continue updating after `TurnEnd` while tools are still executing
|
|
104
150
|
- sub-second tool durations now display as `ms` instead of `0.0s`
|
|
105
151
|
- startup Skills/Prompts/Extensions note now only appears at startup or explicit `/reload`
|
|
@@ -107,7 +153,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
107
153
|
|
|
108
154
|
### Changed
|
|
109
155
|
|
|
110
|
-
-
|
|
156
|
+
- tui `Ctrl+V` now falls back to clipboard text when no clipboard image is available
|
|
111
157
|
- `@` autocomplete now inserts quoted file references when paths contain spaces
|
|
112
158
|
|
|
113
159
|
## [0.0.8] - 2026-04-06
|
|
@@ -128,6 +174,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
128
174
|
|
|
129
175
|
- latest published package includes the post-0.0.7 startup, auth, model-default, and update-notice improvements
|
|
130
176
|
|
|
177
|
+
[0.0.16]: https://github.com/shuyhere/bb-agent/releases/tag/v0.0.16
|
|
178
|
+
[0.0.15]: https://github.com/shuyhere/bb-agent/releases/tag/v0.0.15
|
|
131
179
|
[0.0.14]: https://github.com/shuyhere/bb-agent/releases/tag/v0.0.14
|
|
132
180
|
[0.0.13]: https://github.com/shuyhere/bb-agent/releases/tag/v0.0.13
|
|
133
181
|
[0.0.12]: https://github.com/shuyhere/bb-agent/releases/tag/v0.0.12
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> BB means Bridge Baby in Death Stranding. I named this project that way because while building it, I was also enjoying Death Stranding and loved the idea of connecting everyone together.
|
|
6
6
|
|
|
7
|
-
A Rust-native AI coding agent for the terminal — featuring a
|
|
7
|
+
A Rust-native AI coding agent for the terminal — featuring a TUI, multi-provider support, tool use, session persistence, branching, extensions, and skills.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ npm install -g @shuyhere/bb-agent
|
|
|
17
17
|
npm install downloads a small wrapper package first, then fetches the matching native BB-Agent binary from the GitHub release for your platform.
|
|
18
18
|
|
|
19
19
|
What to expect:
|
|
20
|
-
- first install can take a bit because npm downloads
|
|
20
|
+
- first install can take a bit because npm downloads a compressed native binary, expands it locally, and verifies it
|
|
21
21
|
- the installer now prints progress and retry information while downloading
|
|
22
22
|
- after install, run `bb`
|
|
23
23
|
|
|
@@ -68,7 +68,7 @@ Inside the TUI, run:
|
|
|
68
68
|
/login
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
This opens the provider picker and auth flow directly in the
|
|
71
|
+
This opens the provider picker and auth flow directly in the TUI.
|
|
72
72
|
|
|
73
73
|
If you prefer, you can also log in from a normal terminal:
|
|
74
74
|
|
|
@@ -81,12 +81,12 @@ bb login google # Login to Google (API key)
|
|
|
81
81
|
|
|
82
82
|
Or set environment variables: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`, etc.
|
|
83
83
|
|
|
84
|
-
That's it! Run `bb` to launch the
|
|
84
|
+
That's it! Run `bb` to launch the interactive TUI. Type your prompt and press Enter.
|
|
85
85
|
|
|
86
86
|
### More ways to use `bb`
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
bb # Launch the
|
|
89
|
+
bb # Launch the TUI
|
|
90
90
|
bb "Explain this codebase" # TUI with an initial prompt
|
|
91
91
|
bb -p "What is 2+2?" # Print mode (non-interactive, pipe-friendly)
|
|
92
92
|
bb -c # Continue your last session
|
|
@@ -98,7 +98,7 @@ bb --list-models # List all available models
|
|
|
98
98
|
|
|
99
99
|
## Features
|
|
100
100
|
|
|
101
|
-
- **
|
|
101
|
+
- **TUI** — rich terminal interface with streaming output, markdown rendering, syntax highlighting
|
|
102
102
|
- **Multi-provider** — Anthropic (Claude), OpenAI, Google (Gemini), Groq, xAI, OpenRouter, and custom OpenAI-compatible endpoints
|
|
103
103
|
- **Built-in tools** — `read`, `write`, `edit`, `bash`, `find`, `grep`, `ls`, `web_search`, `web_fetch`, `browser_fetch`
|
|
104
104
|
- **Safety and yolo execution modes** — default safety posture restricts built-in `write` and `edit` to the active workspace; yolo removes that guard
|
|
@@ -165,7 +165,7 @@ BB-Agent uses layered configuration:
|
|
|
165
165
|
|
|
166
166
|
### Execution Modes
|
|
167
167
|
|
|
168
|
-
BB-Agent exposes the active permission posture in
|
|
168
|
+
BB-Agent exposes the active permission posture in the TUI and `/session`.
|
|
169
169
|
|
|
170
170
|
- `safety` is the default. Built-in `write` and `edit` stay inside the current workspace, and bash commands use the safer approval/sandboxed posture.
|
|
171
171
|
- `yolo` is the opt-in less-restrictive mode.
|
|
@@ -202,14 +202,14 @@ Example:
|
|
|
202
202
|
| `bb-provider` | Model/provider integrations and streaming |
|
|
203
203
|
| `bb-hooks` | Hook event types for extensions |
|
|
204
204
|
| `bb-plugin-host` | Plugin discovery and host runtime |
|
|
205
|
-
| `bb-tui` | Terminal UI components and
|
|
205
|
+
| `bb-tui` | Terminal UI components and the interactive TUI experience |
|
|
206
206
|
| `bb-cli` | The `bb` command-line application |
|
|
207
207
|
|
|
208
208
|
## Troubleshooting
|
|
209
209
|
|
|
210
210
|
### Terminal & Font Compatibility
|
|
211
211
|
|
|
212
|
-
BB-Agent uses Unicode glyphs and ANSI color in the
|
|
212
|
+
BB-Agent uses Unicode glyphs and ANSI color in the TUI. For the best visual experience, use a modern terminal and a Unicode-capable monospace font such as:
|
|
213
213
|
|
|
214
214
|
- JetBrains Mono
|
|
215
215
|
- SF Mono / Menlo
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -8,6 +8,7 @@ const path = require("path");
|
|
|
8
8
|
const os = require("os");
|
|
9
9
|
const https = require("https");
|
|
10
10
|
const http = require("http");
|
|
11
|
+
const zlib = require("zlib");
|
|
11
12
|
|
|
12
13
|
const packageJson = require("../package.json");
|
|
13
14
|
const BINARY_RELEASE_TAG = `v${packageJson.version}`;
|
|
@@ -51,6 +52,20 @@ function assetNameForTarget(target) {
|
|
|
51
52
|
return isWindows() ? `bb-${target}.exe` : `bb-${target}`;
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
function assetCandidatesForTarget(target) {
|
|
56
|
+
const assetName = assetNameForTarget(target);
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
assetName: `${assetName}.gz`,
|
|
60
|
+
compressed: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
assetName,
|
|
64
|
+
compressed: false,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
|
|
54
69
|
function logLine(message = "") {
|
|
55
70
|
try {
|
|
56
71
|
process.stderr.write(`${message}\n`);
|
|
@@ -387,9 +402,16 @@ function verifyBinary(binaryPath) {
|
|
|
387
402
|
return { ok: true, version };
|
|
388
403
|
}
|
|
389
404
|
|
|
405
|
+
function expandCompressedBinary(src, dest) {
|
|
406
|
+
logLine("Decompressing downloaded BB-Agent binary...");
|
|
407
|
+
ensureParentDir(dest);
|
|
408
|
+
const expanded = zlib.gunzipSync(fs.readFileSync(src));
|
|
409
|
+
fs.writeFileSync(dest, expanded);
|
|
410
|
+
removeIfExists(src);
|
|
411
|
+
}
|
|
412
|
+
|
|
390
413
|
async function tryDownloadPrebuilt(target) {
|
|
391
|
-
const
|
|
392
|
-
const url = `https://github.com/${REPO}/releases/download/${BINARY_RELEASE_TAG}/${assetName}`;
|
|
414
|
+
const assetCandidates = assetCandidatesForTarget(target);
|
|
393
415
|
|
|
394
416
|
fs.mkdirSync(NATIVE_DIR, { recursive: true });
|
|
395
417
|
const dest = nativeBinaryPath();
|
|
@@ -412,37 +434,67 @@ async function tryDownloadPrebuilt(target) {
|
|
|
412
434
|
`Downloading BB-Agent ${BINARY_RELEASE_TAG} for ${target} (attempt ${attempt}/${MAX_DOWNLOAD_ATTEMPTS})...`
|
|
413
435
|
);
|
|
414
436
|
logLine("This may take a little while on first install because npm downloads the native binary from the GitHub release.");
|
|
415
|
-
removeIfExists(tmpDest);
|
|
416
|
-
await requestBinary(url, tmpDest, 0);
|
|
417
|
-
if (!isWindows()) {
|
|
418
|
-
fs.chmodSync(tmpDest, 0o755);
|
|
419
|
-
}
|
|
420
437
|
|
|
421
|
-
|
|
422
|
-
|
|
438
|
+
let missingCompressedAsset = false;
|
|
439
|
+
for (const asset of assetCandidates) {
|
|
440
|
+
const url = `https://github.com/${REPO}/releases/download/${BINARY_RELEASE_TAG}/${asset.assetName}`;
|
|
441
|
+
const downloadDest = asset.compressed ? `${tmpDest}.gz` : tmpDest;
|
|
442
|
+
|
|
423
443
|
removeIfExists(tmpDest);
|
|
424
|
-
|
|
425
|
-
ok: false,
|
|
426
|
-
kind: "verify",
|
|
427
|
-
message: `Downloaded binary could not run: ${verified.message}`,
|
|
428
|
-
};
|
|
429
|
-
}
|
|
444
|
+
removeIfExists(`${tmpDest}.gz`);
|
|
430
445
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
446
|
+
try {
|
|
447
|
+
if (asset.compressed) {
|
|
448
|
+
logLine(`Trying compressed release asset ${asset.assetName} first for a faster download.`);
|
|
449
|
+
}
|
|
450
|
+
await requestBinary(url, downloadDest, 0);
|
|
451
|
+
if (asset.compressed) {
|
|
452
|
+
expandCompressedBinary(downloadDest, tmpDest);
|
|
453
|
+
}
|
|
454
|
+
if (!isWindows()) {
|
|
455
|
+
fs.chmodSync(tmpDest, 0o755);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
const verified = verifyBinary(tmpDest);
|
|
459
|
+
if (!verified.ok) {
|
|
460
|
+
removeIfExists(tmpDest);
|
|
461
|
+
return {
|
|
462
|
+
ok: false,
|
|
463
|
+
kind: "verify",
|
|
464
|
+
message: `Downloaded binary could not run: ${verified.message}`,
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
fs.renameSync(tmpDest, dest);
|
|
469
|
+
refreshCacheFromExistingBinary(target, dest);
|
|
470
|
+
logLine("Cached verified BB-Agent binary for future installs.");
|
|
471
|
+
logLine("✓ BB-Agent binary installed successfully.");
|
|
472
|
+
return { ok: true, source: "download" };
|
|
473
|
+
} catch (err) {
|
|
474
|
+
lastError = err;
|
|
475
|
+
removeIfExists(tmpDest);
|
|
476
|
+
removeIfExists(`${tmpDest}.gz`);
|
|
477
|
+
if (err.kind === "not-found") {
|
|
478
|
+
if (asset.compressed) {
|
|
479
|
+
missingCompressedAsset = true;
|
|
480
|
+
logLine(`Compressed asset ${asset.assetName} not found; falling back to the uncompressed release binary.`);
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
483
|
+
return {
|
|
484
|
+
ok: false,
|
|
485
|
+
kind: "not-found",
|
|
486
|
+
message: missingCompressedAsset
|
|
487
|
+
? `No release asset named ${asset.assetName} or ${assetCandidates[0].assetName} was found for ${BINARY_RELEASE_TAG}.`
|
|
488
|
+
: `No release asset named ${asset.assetName} was found for ${BINARY_RELEASE_TAG}.`,
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
throw err;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
436
494
|
} catch (err) {
|
|
437
495
|
lastError = err;
|
|
438
496
|
removeIfExists(tmpDest);
|
|
439
|
-
|
|
440
|
-
return {
|
|
441
|
-
ok: false,
|
|
442
|
-
kind: "not-found",
|
|
443
|
-
message: `No release asset named ${assetName} was found for ${BINARY_RELEASE_TAG}.`,
|
|
444
|
-
};
|
|
445
|
-
}
|
|
497
|
+
removeIfExists(`${tmpDest}.gz`);
|
|
446
498
|
if (attempt < MAX_DOWNLOAD_ATTEMPTS) {
|
|
447
499
|
logLine(`Download failed (${err.message}). Retrying...`);
|
|
448
500
|
await new Promise((resolve) => setTimeout(resolve, 1000 * attempt));
|