diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 83707a4..b076eb0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Build & Deploy (Nix) +name: Build & Deploy (Bun) on: push: @@ -25,26 +25,27 @@ jobs: with: fetch-depth: 0 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v22 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 with: - determinate: false - extra-conf: | - sandbox = false - accept-flake-config = true + bun-version: 1.3.14 - - name: Cache Nix - uses: DeterminateSystems/magic-nix-cache-action@v14 + - name: Install deps + run: bun install --frozen-lockfile - - name: Build zesdex - id: build + - name: Type-check + run: bun run check + + - name: Test + run: bun test + + - name: Build binary run: | - nix build .#default --impure --option sandbox false --print-build-logs - STORE_PATH=$(readlink result) - echo "store-path=$STORE_PATH" >> "$GITHUB_OUTPUT" - echo "Build OK: $STORE_PATH" + bun run build + test -x dist/zesdex && echo "binary OK ($(stat -c%s dist/zesdex) bytes)" - name: Setup SSH key + if: env.VPS_HOST != '' && env.VPS_HOST != 'null' env: SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | @@ -56,6 +57,7 @@ jobs: ssh-keyscan -H "$VPS_HOST" >> ~/.ssh/known_hosts 2>/dev/null - name: Deploy zesdex to VPS + if: env.VPS_HOST != '' && env.VPS_HOST != 'null' run: | - STORE_PATH="${{ steps.build.outputs.store-path }}" - ssh "$VPS_USER@$VPS_HOST" "nix copy --to file:///nix/store $STORE_PATH && nix-env --install --force $STORE_PATH --profile /nix/var/nix/profiles/zesdex && systemctl restart zesdex" + scp dist/zesdex "$VPS_USER@$VPS_HOST:/usr/local/bin/zesdex" + ssh "$VPS_USER@$VPS_HOST" "chmod +x /usr/local/bin/zesdex && systemctl restart zesdex" diff --git a/.github/workflows/flakehub-publish-rolling.yaml b/.github/workflows/flakehub-publish-rolling.yaml deleted file mode 100644 index 34e96e7..0000000 --- a/.github/workflows/flakehub-publish-rolling.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Publish to FlakeHub - -on: - push: - branches: [main, master] - workflow_dispatch: - -jobs: - flakehub-publish: - runs-on: ubuntu-latest - permissions: - id-token: write - contents: read - steps: - - uses: actions/checkout@v6 - - uses: DeterminateSystems/determinate-nix-action@main - - uses: DeterminateSystems/flakehub-push@main - with: - visibility: public - rolling: true diff --git a/default.nix b/default.nix deleted file mode 100644 index a9d2e20..0000000 --- a/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs ? import { } }: - -pkgs.rustPlatform.buildRustPackage { - pname = "zesdex"; - version = "1.18.2"; - src = ./.; - - cargoLock = { - lockFile = ./Cargo.lock; - }; - - cargoBuildFlags = [ "-p" "zesdex-gateway" "--bin" "zesdex" ]; - - nativeBuildInputs = with pkgs; [ pkg-config ]; - buildInputs = with pkgs; [ openssl sqlite ]; - - doCheck = false; - - meta = with pkgs.lib; { - description = "AI-native coding agent with workflow orchestration"; - homepage = "https://github.com/asepharyana/zesdex"; - license = licenses.mit; - mainProgram = "zesdex"; - }; -} diff --git a/docker-compose.yml b/docker-compose.yml index 6768163..99b4e6d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - ./workspace:/workspace:ro environment: - ZESDEX_DATA_DIR=/data - - RUST_LOG=${RUST_LOG:-info} + - ZESDEX_API_PORT=${ZESDEX_API_PORT:-8080} stdin_open: true tty: true # For daemon mode, expose the IPC socket directory diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 41626d9..0000000 --- a/flake.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - description = "Zesdex — AI-native coding agent"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { self, nixpkgs, flake-utils, rust-overlay }: - flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: - let - overlays = [ (import rust-overlay) ]; - pkgs = import nixpkgs { inherit system overlays; }; - rustToolchain = pkgs.rust-bin.stable.latest.default.override { - extensions = [ "rust-src" "rust-analyzer" "clippy" ]; - }; - in - { - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ - rustToolchain - pkg-config - openssl - sqlite - ]; - - RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; - RUST_LOG = "info"; - }; - - packages.default = pkgs.rustPlatform.buildRustPackage { - pname = "zesdex"; - version = "1.18.2"; - src = ./.; - - cargoLock = { - lockFile = ./Cargo.lock; - }; - - # Build only the main binary - cargoBuildFlags = [ "-p" "zesdex-gateway" "--bin" "zesdex" ]; - - nativeBuildInputs = with pkgs; [ pkg-config perl ]; - buildInputs = with pkgs; [ openssl sqlite ]; - - doCheck = false; # Tests require filesystem access - - meta = with pkgs.lib; { - description = "AI-native coding agent with workflow orchestration"; - homepage = "https://github.com/asepharyana/zesdex"; - license = licenses.mit; - mainProgram = "zesdex"; - }; - }; - }); -} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 720fa6e..0000000 --- a/shell.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs ? import { } }: - -with pkgs; - -mkShell { - buildInputs = [ - (rust-bin.stable.latest.default.override { - extensions = [ "rust-src" "rust-analyzer" "clippy" ]; - }) - pkg-config - openssl - sqlite - ]; - - RUST_SRC_PATH = "${rust-bin.stable.latest.default}/lib/rustlib/src/rust/library"; - RUST_LOG = "info"; -}