opencode (2.0.18-0parrot2) echo; urgency=medium

  * Rebuild package.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Mon, 28 Sep 2026 23:35:39 +0200

opencode (2.0.18-0parrot1) echo; urgency=medium

  * New upstream version 2.0.18.
  * Harden the build against silent stalls: run the heartbeat as
    debian/heartbeat.sh (a plain shell script, directly testable, no
    make-recipe quoting hazards) and extend it into a stall detector:
    it tracks the kernel oom_kill counter and, after two consecutive
    samples without any runnable (R-state) build process, dumps each
    build process's wait site (kernel wait channel, syscall, RSS) so a
    hung vite/esbuild/bun step leaves a diagnosable log instead of an
    empty one. The previous arm64 builds sat with load 0.00 and all
    build processes idle for ~50 minutes until the inactivity
    watchdog killed them; the detector will show whether that was a
    userspace deadlock (futex wait), a dead worker after an OOM kill
    (pipe wait + oom_kill increment) or a merely slow CPU-bound
    build (R-state processes at 100% cpu).
  * Bound the build's network steps: the models.dev catalog refresh
    now runs under timeout(1) (300s) so a hung fetch cannot stall the
    build, and the Bun toolchain download uses curl stall detection
    (--speed-limit 1024 --speed-time 60, retries) instead of running
    unbounded.
  * Make the OpenCode Web desktop launcher fully automatic: add an
    opencode-web wrapper command that starts `opencode serve`, prints
    the complete login (the username, hardcoded upstream as "opencode",
    together with the generated session password) and opens the web UI
    in the default browser with xdg-open, instead of leaving the user
    to copy-paste the printed URL by hand. The plain serve output only
    shows the password without the username. xdg-utils moves back from
    Suggests to Depends: the automatic browser launch is part of the
    launcher's function on amd64 (unused but harmless on arm64, where
    the launcher is not installed since the arm64 binaries omit the
    web UI).
  * Skip the embedded web UI on arm64: the web UI is produced by a large
    vite build whose arm64 builds have repeatedly stalled silently on
    the build workers (see the stall detector above). Pass --skip-web-ui
    on arm64 and do not install the OpenCode Web desktop launcher there;
    the binary embeds an empty app archive while the terminal UI, the
    CLI and the headless `serve` API server remain fully functional.
    Revisit once the stall detector has identified the arm64 vite stall.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Mon, 28 Sep 2026 15:28:22 +0200

opencode (2.0.5-0parrot1) echo; urgency=medium

  * New upstream version 2.0.5.
  * Fix the build heartbeat's memory reading: the awk program inside
    the heartbeat echo contained backslash-escaped double quotes, which
    the buildd shell passes through literally inside "$( ... )" quoting,
    so mawk rejected the program ("unexpected character") and every
    heartbeat reported an empty memory value. Rewrite the awk program
    quote-free (print int($2/1024) with the MB suffix in the echo text
    instead) and add a snapshot of the build processes (state, %cpu,
    command) to every heartbeat: the arm64 build's heartbeats
    consistently reported load 0.00, which suggests the build sits
    blocked rather than merely slow, and the process snapshot will tell
    CPU-bound builds from blocked ones. Verified by running the exact
    recipe bytes through make with /bin/sh (dash) and mawk, like the
    buildd does.
  * Refresh the bundled models.dev provider catalog snapshot
    (packages/core/src/models-dev/snapshot.txt) at build time with
    upstream's own update-models-snapshot.ts: the snapshot committed in
    the release tarball lagged the live catalog by 35 providers and
    1184 models, and the binary only refreshes it live at runtime, so
    offline and first-run users started from a stale model list. The
    refresh is best-effort (a failed fetch keeps the upstream snapshot
    and prints a warning) and honours the OPENCODE_MODELS_URL override.
    The refreshed snapshot is a build artifact: debian/source/options
    keeps it out of regenerated source diffs.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Thu, 17 Sep 2026 01:03:26 +0200

opencode (2.0.3-0parrot4) echo; urgency=medium

  * Emit a build heartbeat every 10 minutes during the Bun build.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Thu, 17 Sep 2026 00:55:21 +0200

opencode (2.0.3-0parrot3) echo; urgency=medium

  * Rebuild package.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Wed, 16 Sep 2026 15:01:02 +0200

opencode (2.0.3-0parrot2) echo; urgency=medium

  * Fix the build for the upstream 2.x monorepo layout: the CLI package
    moved from packages/opencode to packages/cli and the build output
    directory is now packages/cli/dist/cli-linux-<arch> (was
    packages/opencode/dist/opencode-linux-<arch>). The rules file still
    cd'ed into the removed directory and the build aborted with
    "cd: can't cd to packages/opencode".
  * Build with the Bun version required by upstream's packageManager
    field (bun 1.4.2 for 2.0.3) instead of the stale 1.3.14 pin: the new
    upstream build toolchain refuses to run under an older Bun
    ("This script requires bun@^1.4.2").
  * Derive the upstream version from the Debian changelog and the Bun
    toolchain version from package.json instead of hardcoding both in
    debian/rules, so new upstream versions no longer require manual
    rules edits (the previous rules would have stamped 2.0.3 binaries
    with the stale OPENCODE_VERSION 1.18.21).
  * The `opencode web` command was replaced by `opencode serve` upstream:
    update the OpenCode Web desktop launcher (and the package
    description) accordingly.
  * Clean the packages/cli and packages/app dist directories built by
    the new build (the web UI is now always embedded by upstream's
    build script).
  * Fix debian/watch: uscan has no @VERSION@ substitution variable, so
    the filenamemangle saved downloads as opencode-@VERSION@.tar.gz
    (worked around manually with a symlink). Capture the version with
    @ANY_VERSION@ and re-insert it with $1, and make the mangle produce
    the canonical orig-tarball name opencode_<version>.orig.tar.gz
    directly.
  * Install npm dependencies with bun install --frozen-lockfile so the
    build fails loudly if the upstream lockfile ever drifts out of sync
    instead of silently re-resolving versions (the failed 0parrot1 build
    re-resolved 520 packages and rewrote bun.lock under the old Bun pin).
  * Move xdg-utils from Depends to Suggests: upstream 2.x no longer
    opens the browser itself (`opencode serve` prints the server URL;
    the user opens it in the browser of their choice).
  * The models.dev provider catalog is no longer fetched from the
    network at build time (upstream 2.x ships it as a committed snapshot
    in the source; the program refreshes it at runtime): update the
    debian/rules comments and the package description accordingly.
  * Ignore the packages/app and packages/cli dist directories (embedded
    web UI and compiled CLI build output) in debian/source/options when
    regenerating the source package from a tree that already ran a
    binary build.
 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Tue, 15 Sep 2026 16:45:00 +0200

opencode (2.0.3-0parrot1) echo; urgency=medium

  * New upstream version 2.0.3

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Tue, 15 Sep 2026 15:54:36 +0200

opencode (1.18.21-0parrot7) echo; urgency=medium

  * Install two independent application-menu launchers: OpenCode Web starts
    `opencode web` in a terminal for browser access and server monitoring;
    OpenCode CLI starts the interactive terminal UI with `opencode`.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Tue, 24 Aug 2026 09:00:00 +0200

opencode (1.18.21-0parrot6) echo; urgency=medium

  * Run the `opencode web` desktop launcher in a terminal so users can
    monitor server output and stop the backend cleanly with Ctrl+C.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Tue, 24 Aug 2026 08:30:00 +0200

opencode (1.18.21-0parrot5) echo; urgency=medium

  * Build and embed the OpenCode web UI instead of passing
    --skip-embed-web-ui.
  * Make the desktop launcher run `opencode web` without opening a terminal;
    add desktop actions for the terminal TUI and continuing the latest
    session. The /usr/bin/opencode terminal command remains unchanged.
  * Depend on xdg-utils so `opencode web` can reliably open the default
    browser from the desktop launcher.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Tue, 24 Aug 2026 08:00:00 +0200

opencode (1.18.21-0parrot4) echo; urgency=medium

  * Do not run dh_strip or dh_dwz on the Bun standalone executable. These
    tools remove or rewrite Bun's appended module graph, leaving a plain Bun
    runtime that prints Bun's generic help instead of starting OpenCode.
  * Install /usr/bin/opencode as a wrapper which clears an inherited
    BUN_BE_BUN value before executing the standalone application.
  * Smoke-test the final staged executable during the dh_strip sequence.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Mon, 24 Aug 2026 05:00:00 +0200

opencode (1.18.21-0parrot3) echo; urgency=medium

  * Install the compiled CLI at /usr/lib/opencode/opencode and provide the
    /usr/bin/opencode command. The previous dh_install destination contained
    an erroneous extra "opencode/" prefix.
  * Add a terminal desktop launcher and upstream application icon.

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Mon, 24 Aug 2026 04:26:24 +0200


opencode (1.18.21-0parrot2) echo; urgency=medium

  * No Node.js relationship: opencode runs entirely on its embedded Bun
    runtime and does not need Node.js. (Optional Node-based LSP servers and
    the npm plugin/upgrade path use a system node if the user happens to have
    one, but the package neither needs nor references one.)

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Tue, 24 Aug 2026 00:45:00 +0200

opencode (1.18.21-0parrot1) echo; urgency=medium

  * Initial Debian packaging of opencode (opencode.ai) v1.18.21.
  * Build from the upstream source tarball with the Bun toolchain.
    opencode is a Bun-native application: the CLI is produced by
    `bun build --compile` as a self-contained binary (Bun runtime and all
    JS dependencies embedded), so the package has no Node.js runtime
    dependency.
  * Bun is not packaged in Debian, so the Bun toolchain is downloaded from
    the network at build time (pinned to the version required by upstream's
    packageManager field, bun@1.3.14).
  * npm dependencies are installed at build time with `bun install`, pinned
    by the upstream bun.lock; the models.dev provider catalog used for code
    generation is fetched from the network as well. The build therefore
    requires a network-enabled build worker and will not run offline.
  * The build targets the build host's architecture only (--single) and runs
    upstream's smoke test (opencode --version). The optional embedded web UI
    is not included; the TUI, headless server and CLI are fully functional.
  * Redirect HOME to a writable dir inside the build tree
    (debian/fakehome) so bun's install cache/tmp work under sbuild, which
    sets HOME=/sbuild-nonexistent (fixes EACCES "mkdir /sbuild-nonexistent").

 -- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>  Sun, 23 Aug 2026 22:40:00 +0200
