feat: added github action for starting opencode/openchamber in actions infrastructure with persistence encryption (#194)
* fix(ui): make chat message action icons always visible - Removes opacity-0 and pointer-events-none classes from UserMessageBody action buttons container. - Ensures icons are visible by default instead of only on hover/focus. - Addresses user feedback about empty space at the bottom of chat bubbles. * fix(ui): make chat message action icons always visible - Removes opacity-0 and pointer-events-none classes from UserMessageBody action buttons container. - Ensures icons are visible by default instead of only on hover/focus. - Addresses user feedback about empty space at the bottom of chat bubbles. * fix(ui): prevent diff comment input from closing on click (#3) Replaced global `document.querySelector('[data-comment-ui]')` with a local `useRef` to detect clicks inside the comment input area. This fixes an issue where clicking the input in one diff viewer would close it if another diff viewer (found first by querySelector) existed in the DOM. - Added `commentContainerRef` in `PierreDiffViewer.tsx`. - Updated `handleClickOutside` to check against the ref. - Attached ref to comment UI containers in both 'fill' and 'inline' layouts. - Preserved `data-comment-ui` attribute for backward compatibility. * feat(ui): add visual connector lines to file explorer (#2) - Replaced manual padding-based indentation with nested list structure - Added vertical connector lines using border-l on nested ul - Added horizontal connector lines using pseudo-elements on list items - Added tail masking for the last item in a branch to create the 'L' shape - Removed manual padding calculation from file/folder buttons * Create openchamber.yml * Create OPENCODE_FOR_ACTIONS.md * feat: update OpenChamber for Actions workflow and docs (#6) - Rename `docs/OPENCODE_FOR_ACTIONS.md` to `docs/OPENCHAMBER_FOR_ACTIONS.md`. - Update `README.md` to include a section on OpenChamber for Actions. - Update `.github/workflows/openchamber.yml` to allow users to select which service to expose (OpenChamber, OpenCode, or Both). - Update documentation to reflect the new workflow options. * feat: Add shimmer effect for generating messages (#7) * Create test_unreleased.yml * Update test_unreleased.yml * Delete test_unreleased.yml * 🧪 Labs: Enhanced File Explorer with Context Menus & UI Improvements (#13) * feat: add file management capabilities (create, rename, delete) (#11) Added backend endpoints for delete and rename operations. Extended FilesAPI interface and implementation. Updated FilesView with toolbar buttons for Create File/Folder. Added context menu to file tree items for Rename, Delete, and Copy Path. Implemented dialogs for all file operations. * Refactor UI/UX: Modernize styles, components, and layout architecture (#10) Refactored `packages/ui` CSS into modular files (design-system, typography, mobile). Modernized `Header` with pill-style tabs and semantic Flexbox layout. Enhanced `Chat` UI with threading visuals, improved typography, and better spacing. Updated `Sidebar` to match the new design system aesthetic. Verified with full workspace build. * Add workflow * Change to manual dispatch only * Delete test.yml * Update openchamber.yml * Fix styling and workflow improvements (#17) * Refactor OpenChamber workflow and update docs (#18) - Refactor `.github/workflows/openchamber.yml` to use modular helper scripts. - Add helper scripts in `scripts/`: `monitor.sh`, `persistence-restore.sh`, `persistence-save.sh`, `opencode-config.sh`. - Update `docs/OPENCHAMBER_FOR_ACTIONS.md` to reflect new inputs and features. - Implement robust monitoring with self-healing and proper URL logging. - Improve persistence robustness for file copying. * Expose Opencode Core, Web, and Chamber via Cloudflare tunnels (#19) This commit updates the GitHub Actions workflow and monitoring script to: 1. Install `wetty` to expose the core Opencode TTY over the web (interpreted from user request for "WiTTY"). 2. Start `opencode web` (8080), `openchamber` (9090), and `wetty` (3000) concurrently. 3. Configure Cloudflare to create three separate tunnels for these ports. 4. Update `monitor.sh` to accept and display URLs for all three services. * Update opencode-config.sh * Tighten actions persistence and UI polish * Delete openchamber.yml * Delete persistence-save.sh * Delete persistence-restore.sh * Delete opencode-config.sh * Delete monitor.sh * Delete install.sh * Fix OpenChamber workflow and scripts for multi-service tunnels (#21) * Create auto-opencode.yml * Update opencode.yml * feat: add password protection for OpenChamber in Actions (#22) - Introduce `OPENCODE_SERVER_PASSWORD` secret support in `.github/workflows/opencode.yml`. - Automatically set `OPENCHAMBER_UI_PASSWORD` and `OPENCODE_UI_PASSWORD` if the secret is provided. - Configure `ttyd` to use basic auth (`-c user:password`) when password is set. - Update `scripts/monitor.sh` to respect password settings during service restarts. - Significantly update `docs/OPENCHAMBER_FOR_ACTIONS.md` with an overview, password configuration instructions, and improved layout (collapsible sections). * use one password env variable * Update OPENCHAMBER_FOR_ACTIONS.md * feat: improve GITHUB_STEP_SUMMARY, fix TTY home logic and add encryption support in scripts * feat: lazy load large diffs to prevent page freeze (#186) When diff content exceeds 1500 lines or 150KB, show a placeholder with "Load Diff" button instead of parsing immediately. This prevents the page from freezing when viewing large diffs. Co-authored-by: Jovines <jovines@qq.com> * feat: add Web Push API support and PWA integration (#189) * feat: add Web Push API support and PWA integration Add web Push API with subscribe/unsubscribe and visibility endpoints Introduce usePushVisibilityBeacon and useSessionDeepLink hooks Integrate PWA with service worker, registerSW, and VAPID key persistence * feat: add heartbeat visibility beacon for web runtime Add a 10s heartbeat to ping visibility while visible Subscribe to visibilitychange, focus, blur, pageshow, and pagehide events to report state Clear heartbeat interval on unmount to avoid leaks * feat(UI): Introduce new UI components for file attachments and related views (#191) Add file management API and UI components Implement directory listing, search and CRUD operations in desktop backend Expose new Files API on frontend to list, search, and modify files * feat: add workbox-window and improve event stream cleanup Add workbox-window dependency to bun.lock and web package.json Cancel and release the stream reader on disconnect to avoid leaks * feat: provider config management (#193) * feat: support scoped removal of provider config (auth, user, project, custom) * feat: implement UI session token management with cookies for window visibility control * feature: header layout changes (#195) * fix(ui): remove fixed sessions button and mac titlebar coupling Remove fixed sessions button from header on desktop Mac Eliminate Mac titlebar spacer and drag-to-dock logic in sidebar Update layout to rely on standard header/sidebar without mac-specific tweaks * feat: improve mobile header with session toggle and back button Add back button in mobile header to exit session switcher Show Sessions label when session switcher is open in mobile header Toggle between opening sessions and back navigation based on session state * restore: add back scripts/install.sh from main branch * docs: improve Tech Stack section with organized label badges * Fix actions auth and remove shimmer
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
# OpenChamber for Actions
|
||||
|
||||
**Version:** `v0.1.0-preview`
|
||||
|
||||
OpenChamber for Actions allows you to run a full OpenChamber environment remotely using GitHub Actions infrastructure. It provides access to OpenCode, OpenChamber, and a web-based terminal without requiring any local hardware.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
OpenChamber for Actions is a "computer in the cloud" solution that leverages GitHub Runners to host a temporary development environment. It spins up three key services:
|
||||
* **OpenCode TTY:** A web-based terminal for command-line access.
|
||||
* **OpenChamber:** The core environment.
|
||||
* **OpenCode Web:** The web interface for coding and interaction.
|
||||
|
||||
These services are exposed via secure tunnels (Cloudflare or Ngrok), allowing you to access them from any browser. The session can persist data between runs using GitHub Artifacts.
|
||||
|
||||
---
|
||||
|
||||
## Key Features
|
||||
|
||||
* **No local hardware required:** Run OpenChamber on GitHub Actions infrastructure.
|
||||
* **OpenCode integration:** Access the OpenCode suite and "Antigravity" model selection (including Gemini 3 and Claude 4.5).
|
||||
* **Secure access (optional):** Protect OpenChamber, OpenCode Web, and the TTY with `OPENCODE_SERVER_PASSWORD`.
|
||||
* **Persistent sessions (optional):** Save login state, OAuth tokens, and configuration as GitHub Artifacts when a password is set (encrypted).
|
||||
* **Self-healing tunnels:** Background monitoring keeps the tunnel stable.
|
||||
|
||||
---
|
||||
|
||||
## New to this? (Beginners' Guide)
|
||||
|
||||
<details>
|
||||
<summary><b>Click to expand: What is this and how does it help me?</b></summary>
|
||||
|
||||
### 1. What exactly is this?
|
||||
Think of this as a "computer in the cloud." Instead of running a local AI environment, GitHub Actions provides the compute for you.
|
||||
|
||||
### 2. What do I need to start?
|
||||
* A GitHub account.
|
||||
* A web browser (Chrome, Edge, Safari, etc.).
|
||||
* No special hardware required.
|
||||
|
||||
### 3. Why is Cloudflare recommended?
|
||||
Cloudflare Quick Tunnels create a secure public URL automatically. You do not need extra accounts or API keys, so it is the simplest option.
|
||||
|
||||
### 4. What is persistence?
|
||||
When a password is set, the workflow saves your login info and settings as an encrypted GitHub Artifact. The next run restores the session so you can continue without logging in again.
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary><b>Usage Limits & Quotas</b></summary>
|
||||
|
||||
To ensure stability and compliance with GitHub’s Terms of Service, be aware of the following limits:
|
||||
|
||||
| Limit Type | Constraint | Explanation |
|
||||
| :--- | :--- | :--- |
|
||||
| **Time Limit** | **6 Hours Max** | GitHub stops any job after 360 minutes. |
|
||||
| **Storage** | **2GB** | Session artifacts cannot exceed 2GB per repository. |
|
||||
| **Concurrency** | **1 Run Only** | Run a single OpenChamber instance at a time. |
|
||||
| **Hardware** | **2-Core CPU** | Standard Linux runners (~7GB RAM). |
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Installation Guide
|
||||
|
||||
### Option A: Easy Mode (Recommended)
|
||||
Uses Cloudflare tunnels. No configuration required unless you want password protection.
|
||||
|
||||
1. Fork this repository to your GitHub account.
|
||||
2. Open the Actions tab in your fork.
|
||||
3. Select the **OpenChamber for Actions** workflow.
|
||||
4. (Optional) **Set a Password (recommended):**
|
||||
* Go to **Settings** -> **Secrets and variables** -> **Actions**.
|
||||
* Click **New repository secret**.
|
||||
* **Name:** `OPENCODE_SERVER_PASSWORD`
|
||||
* **Secret:** Your desired password.
|
||||
* *Note: If this secret is set, it protects OpenCode TTY, OpenChamber, and OpenCode Web. It also enables encrypted persistence.*
|
||||
5. Click **Run workflow**.
|
||||
* **Tunnel Provider:** Choose `cloudflare` (default) or `ngrok`.
|
||||
* **Auto-shutdown after (minutes):** Set the duration (default `300`).
|
||||
6. Wait about 30 seconds for setup to finish.
|
||||
7. Open the run, then open the `serve` job.
|
||||
8. Expand the **Monitor & Self-Heal** step to find the URLs and open them.
|
||||
|
||||
> [!TIP]
|
||||
> Keep the repository visibility `Private` or use `OPENCODE_SERVER_PASSWORD` in Github Actions Secrets. Otherwise, your privacy can be violated.
|
||||
|
||||
---
|
||||
|
||||
### Option B: Pro Mode (Ngrok)
|
||||
|
||||
<details>
|
||||
<summary><b>Click to expand: Step-by-step guide for setting up Ngrok</b></summary>
|
||||
|
||||
If you prefer using Ngrok for a static domain, follow these steps to set up your API key.
|
||||
|
||||
#### Step 1: Get your authtoken
|
||||
1. Log in or sign up at dashboard.ngrok.com.
|
||||
2. In the sidebar, click "Your Authtoken."
|
||||
3. Copy the token string (for example, `21xYz...`).
|
||||
|
||||
#### Step 2: Add the secret to GitHub
|
||||
1. Open your forked repository on GitHub.
|
||||
2. Open Settings.
|
||||
3. In the sidebar, open Secrets and variables and click Actions.
|
||||
4. Click New repository secret.
|
||||
5. **Name:** `NGROK_AUTH_TOKEN`.
|
||||
6. **Secret:** Paste the token.
|
||||
7. (Optional) Add `OPENCODE_SERVER_PASSWORD` to enable password protection for all services and encrypted persistence.
|
||||
8. Click Add secret.
|
||||
|
||||
#### Step 3: Run with Ngrok
|
||||
1. Go to the Actions tab.
|
||||
2. Select **OpenChamber for Actions**.
|
||||
3. Click **Run workflow**.
|
||||
4. Select `ngrok` as the Tunnel Provider.
|
||||
5. Find the URL in the "Monitor & Self-Heal" step.
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Frequently Asked Questions (FAQ)
|
||||
|
||||
<details>
|
||||
<summary><b>Q: Is this completely free?</b></summary>
|
||||
GitHub provides 2,000 minutes for private repositories and unlimited minutes for public repositories. This workflow uses those minutes.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Q: Why did my session stop working after a few hours?</b></summary>
|
||||
GitHub Actions has a 6-hour job limit. The environment shuts down automatically. If persistence is enabled, your session data is restored on the next run.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Q: Can I use this on my phone or tablet?</b></summary>
|
||||
Yes. Once you have a public URL (Cloudflare or Ngrok), open it in any mobile browser.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Q: Is my data private?</b></summary>
|
||||
If you fork this as a public repository, your code may be visible depending on how you save it. For maximum privacy, use a private fork. If you want persistence, set `OPENCODE_SERVER_PASSWORD` so the artifact is encrypted.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Q: I see a "Connection Refused" error. What do I do?</b></summary>
|
||||
Wait about 30 seconds and refresh the page. If it persists, check the Monitor logs in the Actions run.
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Technical Specifications
|
||||
|
||||
| Feature | Detail |
|
||||
| :--- | :--- |
|
||||
| **Version** | `v0.1.0-preview` |
|
||||
| **OS** | Ubuntu 22.04 LTS (GitHub Runner) |
|
||||
| **Node Version** | v20.x |
|
||||
| **Tunnel Protocols** | `cloudflared` (Argon) / `ngrok` (HTTP) |
|
||||
| **Artifact Retention** | 90 Days (Default GitHub Policy) |
|
||||
|
||||
> [!NOTE]
|
||||
> This project is for educational and development purposes. Do not use this workflow for mining crypto or other activities banned by the GitHub Acceptable Use Policy.
|
||||
Reference in New Issue
Block a user