fix(install): fetch gptscript from our Forgejo release #1

Merged
thklein merged 5 commits from fix/forgejo-binary into main 2026-10-17 21:25:50 +00:00
Owner

The postinstall fetches our gptscript fork from Forgejo, and nothing is published to npm or GitHub any more.

Depends on basepeak-ai/gptscript#19 plus the v0.9.10 tag. Until that release exists, installs without NODE_GPTSCRIPT_SKIP_INSTALL_BINARY=true fail on purpose.

  • scripts/install-binary.js:
    • Downloads v0.9.10 from git.basepeak.dev/basepeak-ai/gptscript/releases/download/ instead of upstream v0.9.8 on GitHub.
    • Aborts after 30s idle or 5 min in total. Previously a stalled download hung CI for an hour.
    • Exits non-zero on any failure. Previously it logged the error and carried on without a binary.
    • Awaits the tar extraction before resolving.
  • Workflows:
    • Removed the npm publish, the GitHub repository_dispatch version bump and the dependabot reviewer hook.
    • Tests call the local reusable workflow and get gptscript through the postinstall rather than get.gptscript.ai.

Tested locally against the snapshot archive from gptscript#19 served over HTTP: it extracts to bin/gptscript and the binary runs. Against a server that accepts and never answers, it exits 1 after 30s.

The postinstall fetches our gptscript fork from Forgejo, and nothing is published to npm or GitHub any more. **Depends on basepeak-ai/gptscript#19 plus the `v0.9.10` tag.** Until that release exists, installs without `NODE_GPTSCRIPT_SKIP_INSTALL_BINARY=true` fail on purpose. - `scripts/install-binary.js`: - Downloads `v0.9.10` from `git.basepeak.dev/basepeak-ai/gptscript/releases/download/` instead of upstream v0.9.8 on GitHub. - Aborts after 30s idle or 5 min in total. Previously a stalled download hung CI for an hour. - Exits non-zero on any failure. Previously it logged the error and carried on without a binary. - Awaits the tar extraction before resolving. - Workflows: - Removed the npm publish, the GitHub `repository_dispatch` version bump and the dependabot reviewer hook. - Tests call the local reusable workflow and get gptscript through the postinstall rather than `get.gptscript.ai`. Tested locally against the snapshot archive from gptscript#19 served over HTTP: it extracts to `bin/gptscript` and the binary runs. Against a server that accepts and never answers, it exits 1 after 30s.
The postinstall downloaded upstream gptscript v0.9.8 from GitHub, with
no timeout, and only logged failures. It now fetches our fork's
v0.9.10 from git.basepeak.dev and aborts after 30s idle or 5 min in
total. Any failure exits non-zero instead of leaving no binary behind.
Extraction is also awaited, so the script no longer resolves before
the tarball is unpacked.
ci: stop publishing to npm and GitHub
Some checks failed
run_tests.yaml / ci: stop publishing to npm and GitHub (push) Failing after 0s
Request reviewers for Dependabot PRs / request_reviewers (pull_request_target) Has been skipped
pull_request.yaml / ci: stop publishing to npm and GitHub (pull_request_target) Failing after 0s
run_tests.yaml / ci: stop publishing to npm and GitHub (pull_request) Failing after 0s
e2b024958d
Drop the npm publish on tags, the GitHub repository_dispatch version
bump and the dependabot reviewer hook. Tests now call the local
reusable workflow and get gptscript through the postinstall instead
of get.gptscript.ai.
basepeak-ai/gptscript is private, so an anonymous download is a 404.
Send GPTSCRIPT_RELEASE_TOKEN when set, say so on failure, and fail if
the archive did not contain the binary.
ci: run tests as a single Forgejo workflow
Some checks failed
pull_request.yaml / ci: run tests as a single Forgejo workflow (pull_request_target) Failing after 0s
test / test (pull_request) Has started running
2ef07d806c
Forgejo rejects workflow_call secrets, and the permission check calls
the GitHub API. One workflow installs with the org read token (which
exercises the installer), builds, and runs the model-driven suite only
when provider keys exist.
ci: re-run after runner MTU fix
Some checks failed
pull_request.yaml / ci: re-run after runner MTU fix (pull_request_target) Failing after 0s
test / test (pull_request) Successful in 38s
a6921a4ced
thklein deleted branch fix/forgejo-binary 2026-10-17 21:25:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
basepeak-ai/node-gptscript!1
No description provided.