### Install PinkCollab Gateway and run setup Source: https://github.com/3xian/pinkcollab/blob/main/npm/pinkcollab/README.md Installs the PinkCollab Gateway globally, verifies the installation, and runs guided setup. Requires Oh My Pi (OMP) to be installed separately and Tailscale with Funnel access on the host. ```sh npm install -g pinkcollab@latest node "$(npm root -g)/pinkcollab/bin/check-install.js" cd ~/projects pinkcollab setup ``` -------------------------------- ### Install and setup PinkCollab CLI Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Install the CLI globally via npm and initialize the workspace. Replace the workspace path with your actual project directory. ```sh npm install -g pinkcollab@latest pinkcollab --version pinkcollab setup --workspace /absolute/path/to/projects ``` -------------------------------- ### Install Tailscale on macOS via Homebrew Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Install the Tailscale CLI and start the daemon. The Homebrew formula provides a daemon that starts at boot. Complete sign-in after running tailscale up. ```sh brew install tailscale sudo brew services start tailscale tailscale up ``` -------------------------------- ### Initialize and serve the Gateway for manual Funnel setup Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Initialize the workspace and start the Gateway. This is for advanced/manual Funnel installation. The workspace path must be absolute. Keep the Gateway running after initialization. ```sh pinkcollab init --workspace /absolute/path/to/projects pinkcollab serve ``` -------------------------------- ### Start a stopped installation Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.1.md Command to manually start the Gateway service if it has been stopped. ```bash pinkcollab service start ``` -------------------------------- ### Run pinkcollab setup for default Tailscale Funnel Source: https://github.com/3xian/pinkcollab/blob/main/README.md Run in the directory containing your projects. Confirms the directory as a workspace root, guides Tailscale sign-in and Funnel approval, and starts the Gateway in the background. Does not install OMP or Tailscale. ```sh pinkcollab setup ``` -------------------------------- ### Run setup with explicit OMP path Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.1.1.md Commands to select a replacement OMP path explicitly during the setup process. ```bash pinkcollab setup --omp omp ``` ```bash pinkcollab setup --omp "/absolute/path/to/omp" ``` -------------------------------- ### Automate non-interactive setup Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Run setup without prompts for automated environments. Use the appropriate flags for either Tailscale Funnel or external proxy configurations. ```sh # Tailscale must already be connected, with Funnel/HTTPS enabled. pinkcollab setup --non-interactive --workspace /srv/projects # Your HTTPS proxy must already be configured. pinkcollab setup --non-interactive --transport external --public-url https://collab.example.com --workspace /srv/projects ``` -------------------------------- ### Install PinkCollab Gateway with npm Source: https://github.com/3xian/pinkcollab/blob/main/website/index.html Use this command sequence to install the PinkCollab Gateway globally via npm. Requires Node.js 18+ and replaces /path/to/your/projects with your projects directory. The npm package installs the prebuilt native Gateway binary, so no Rust toolchain is needed. ```bash npm install -g pinkcollab@latest pinkcollab --version cd /path/to/your/projects pinkcollab setup ``` -------------------------------- ### Install PinkCollab CLI and check version Source: https://github.com/3xian/pinkcollab/blob/main/README.md Run these commands on your computer to install the PinkCollab CLI globally and verify the installation. Requires Node.js 18+ and a working OMP installation; use the same OS user that owns OMP configuration. ```sh npm install -g pinkcollab@latest pinkcollab --version ``` -------------------------------- ### Configure external HTTPS setup Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Run setup with the external transport flag and provide the public URL. This requires an existing reverse proxy configuration. ```sh pinkcollab setup --transport external --public-url https://collab.example.com --workspace /srv/projects ``` -------------------------------- ### Add project roots Source: https://github.com/3xian/pinkcollab/blob/main/README.md Configure workspace roots for the project using the setup command. ```bash pinkcollab setup --workspace /path/to/code --workspace /path/to/work ``` -------------------------------- ### Install and verify pinkcollab version Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md Install the specific version of pinkcollab from the npm registry in a clean environment and verify the installed version. ```bash npm install pinkcollab@X.Y.Z pinkcollab --version ``` -------------------------------- ### Run real OMP resume test with OMP installed Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Run a real resume without a provider request when OMP is installed. Set OMP_EXECUTABLE if it is not on PATH. ```bash cargo test --all-features --locked --test discovery real_omp_resumes -- --ignored ``` -------------------------------- ### Install Android signing key commands Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md Commands to create the signing directory and copy the keystore and credentials from an offline backup. ```sh mkdir -p ~/.pinkcollab-signing cp /path/to/pinkcollab-release.p12 ~/.pinkcollab-signing/ cp /path/to/pinkcollab-release.credentials ~/.pinkcollab-signing/pinkcollab-release.properties ``` -------------------------------- ### Build and install the Android debug APK Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md From the android/ directory, builds the debug APK and installs it on a connected device. On Windows use gradlew.bat; set sdk.dir in android/local.properties or ANDROID_HOME. Debug and release APKs use different signing keys, so switching requires uninstalling the app and loses phone-side pairings. ```sh sh ./gradlew :app:assembleDebug adb install -r app/build/outputs/apk/debug/app-debug.apk ``` -------------------------------- ### Run Windows background test Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md On Windows, runs the windows_background test which checks the hidden login launcher, duplicate starts, graceful stop/restart, external setup, and preserved host identity using isolated temporary directories. It runs the dedicated gateway-fixture binary, which uses the real CLI and desktop lifecycle but injects an empty legacy SCM lookup at the service factory. It neither queries nor modifies machine-wide Windows services and does not register real login startup. ```sh cargo test --all-features --locked --test windows_background ``` -------------------------------- ### Recover Stale OMP Installation Path Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Commands to verify the OMP version and re-run setup to approve a replacement launcher path. ```sh omp --version pinkcollab doctor pinkcollab setup ``` -------------------------------- ### Install and update PinkCollab CLI Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.2.0.md Standard upgrade procedure for the CLI. Finish active work before running these commands. ```bash npm install -g pinkcollab@3.2.0 pinkcollab update ``` -------------------------------- ### Update PinkCollab and Run Installation Diagnostic Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.4.2.md Commands to update the global package and execute the installation check script for different shell environments. ```bash npm install -g pinkcollab@2.4.2 node "$(npm root -g)/pinkcollab/bin/check-install.js" ``` ```powershell node (Join-Path (npm root -g) "pinkcollab/bin/check-install.js") Get-Command pinkcollab -All ``` -------------------------------- ### Run pinkcollab setup with external HTTPS proxy Source: https://github.com/3xian/pinkcollab/blob/main/README.md Use this for a fixed Linux server with your own HTTPS reverse proxy (Caddy/nginx); Tailscale is not needed. Specify the external public URL and workspace directory. ```sh pinkcollab setup \ --transport external \ --public-url https://pink.example.com \ --workspace /srv/projects ``` -------------------------------- ### Configure stable OMP path in config.yaml Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.0.1.md Example of the configuration key to update in config.yaml to point to a stable executable path. ```yaml omp: /opt/homebrew/bin/omp ``` -------------------------------- ### Diagnose problems Source: https://github.com/3xian/pinkcollab/blob/main/README.md Use the doctor command to troubleshoot issues with the installation or environment. ```bash pinkcollab doctor ``` -------------------------------- ### Publish with Tailscale Serve Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Publish the loopback listener using Tailscale Serve and check status. Connect both host and phone to the tailnet first. Use the HTTPS root reported by Serve with pinkcollab setup. ```sh tailscale serve --bg http://127.0.0.1:8787 tailscale serve status ``` -------------------------------- ### Pair and manage clients with pinkcollab CLI Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Pair a device, list paired clients, and revoke access. Pairing codes work once for five minutes. The pair command uses saved public_url or --url; it does not start HTTPS. Treat pairing output and QR files as credentials. ```sh pinkcollab pair pinkcollab clients pinkcollab revoke --client ``` -------------------------------- ### Upgrade commands: npm install -g pinkcollab@3.2.1 and pinkcollab update Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.2.1.md Run these commands under the existing OS user to update the Gateway. Retain --data-dir when applicable. Restarting the Gateway ends active OMP runtimes but preserves stored sessions and pairings. ```shell npm install -g pinkcollab@3.2.1 ``` ```shell pinkcollab update ``` -------------------------------- ### Update Gateway with npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.0.md Use this command to update the Gateway to PinkCollab 3.0.0. Requires npm and global installation privileges. ```bash npm install -g pinkcollab@3.0.0 ``` -------------------------------- ### GET /host Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves host information. This is an optional inspection API that uses public DTOs. ```APIDOC ## GET /host ### Description Retrieves host information. This is an optional inspection API that uses public DTOs. ### Method GET ### Endpoint /host ### Response #### Success Response (200) - Uses public DTOs. #### Response Example (No explicit example provided in source.) ``` -------------------------------- ### Update npm launcher to PinkCollab 1.0.0 Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v1.0.0.md Command to install the PinkCollab npm launcher version 1.0.0 globally. Required for upgrading to this release. ```bash npm install -g pinkcollab@1.0.0 ``` -------------------------------- ### Update PinkCollab CLI and Gateway Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Standard procedure to update the global npm package and apply the update to the installed Gateway. ```sh npm install -g pinkcollab@latest pinkcollab --version pinkcollab update pinkcollab doctor ``` -------------------------------- ### Publish with Tailscale Funnel and pair Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Run a dry-run, publish the loopback listener, and pair. The funnel command saves its HTTPS root as public_url; it does not start the Gateway. --dry-run changes nothing. ```sh pinkcollab funnel --dry-run pinkcollab funnel pinkcollab pair ``` -------------------------------- ### GET /fs/list?path=... Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Lists directories within allowed roots. Returns an object containing the path, parent, and directories. ```APIDOC ## GET /fs/list?path=... ### Description Lists directories within allowed roots. Returns an object containing the path, parent, and directories. ### Method GET ### Endpoint /fs/list?path=... ### Parameters #### Query Parameters - **path** (string) - Required - Directory path to list ### Request Example (No explicit example provided) ### Response #### Success Response (200) - **path** (string) - The path of the listed directory - **parent** (string) - The parent directory path - **directories** (array) - List of directory names #### Response Example { "path": "/example", "parent": "/", "directories": ["subdir1", "subdir2"] } ``` -------------------------------- ### GET /workspaces Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves workspace information. This is an optional inspection API that uses public DTOs. ```APIDOC ## GET /workspaces ### Description Retrieves workspace information. This is an optional inspection API that uses public DTOs. ### Method GET ### Endpoint /workspaces ### Response #### Success Response (200) - Uses public DTOs. #### Response Example (No explicit example provided in source.) ``` -------------------------------- ### GET /sessions?limit=50&cursor=... Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Lists sessions with creation-order paging. This is an optional inspection API that uses public DTOs. ```APIDOC ## GET /sessions?limit=50&cursor=... ### Description Lists sessions with creation-order paging. This is an optional inspection API that uses public DTOs. ### Method GET ### Endpoint /sessions ### Parameters #### Query Parameters - **limit** (integer) - Optional - Number of sessions to return. Example: 50. - **cursor** (string) - Optional - Pagination cursor for creation-order paging. ### Response #### Success Response (200) - Uses public DTOs. #### Response Example (No explicit example provided in source.) ``` -------------------------------- ### GET /sessions/:id/models Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves the available models and thinking levels from the attached runtime. Returns an object containing models and thinkingLevels. ```APIDOC ## GET /sessions/:id/models ### Description Retrieves the available models and thinking levels from the attached runtime. Returns an object containing models and thinkingLevels. ### Method GET ### Endpoint /sessions/:id/models ### Parameters #### Path Parameters - **id** (string) - Required - Session identifier ### Request Example (No explicit example provided) ### Response #### Success Response (200) - **models** (array) - List of available model names - **thinkingLevels** (array) - List of available thinking levels #### Response Example { "models": ["model1", "model2"], "thinkingLevels": ["low", "medium", "high"] } ``` -------------------------------- ### GET /sessions Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Pagination endpoint for older sessions. Used with nextSessionsCursor from the host bootstrap to retrieve additional sessions beyond the newest 50. ```APIDOC ## GET /sessions ### Description Retrieves a page of older sessions using the cursor provided in the host bootstrap. The response is bound to an epoch, and clients merge previously unseen IDs without overwriting socket state. ### Method GET ### Endpoint /sessions ### Parameters #### Query Parameters - **nextSessionsCursor** (string) - Required - Cursor for paginating older sessions. ### Response #### Success Response (200) - **sessions** (array) - List of session objects, omitting model and input bodies, exposing pendingInputCount. - **nextSessionsCursor** (string) - Cursor for the next page, if more sessions exist. - **epoch** (string) - Epoch identifier that the paged list response is bound to. #### Response Example { "sessions": [ { "id": "session-id", "pendingInputCount": 2 } ], "nextSessionsCursor": "cursor-value", "epoch": "epoch-value" } ``` -------------------------------- ### Update npm launcher to v3.1.0 Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.1.0.md Command to update the npm launcher to version 3.1.0. After updating, run 'pinkcollab setup' using your existing transport configuration. External HTTPS deployments must retain their '--transport external --public-url https://...' settings. ```bash npm install -g pinkcollab@3.1.0 ``` -------------------------------- ### GET /usage Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Reads host-wide provider account quotas through the configured OMP executable's usage --json. Requires pairing authentication and honors explicit profile selection from Gateway configuration. ```APIDOC ## GET /usage ### Description Reads host-wide provider account quotas through the configured OMP executable's usage --json, independent of session runtimes. Honors explicit --profile selection from Gateway configuration and requires pairing authentication. ### Method GET ### Endpoint /usage ### Parameters #### Query Parameters - **profile** (string) - Optional - Explicit profile selection from Gateway configuration. ### Response #### Success Response (200) - **generatedAt** (number) - Timestamp in epoch milliseconds describing snapshot generation. - **accounts** (array) - List of provider accounts. - **id** (string) - Opaque account ID. - **provider** (string) - Provider identifier. - **accountLabel** (string) - Masked account label. - **plan** (string) - Plan information. - **fetchedAt** (number) - Timestamp in epoch milliseconds describing provider report freshness. - **status** (string) - Account status: available, unavailable, or disabled. - **limits** (array) - List of limits. - **id** (string) - Limit ID. - **label** (string) - Limit label. - **modelId** (string) - Model identifier. - **tier** (string) - Tier information. - **windowLabel** (string) - Window label. - **resetsAt** (number) - Timestamp in epoch milliseconds for reset. - **usedFraction** (number) - Ratio of usage (0.62 means 62%). - **used** (number) - Used amount. - **limit** (number) - Limit amount. - **remaining** (number) - Remaining amount. - **unit** (string) - Unit of measurement. - **status** (string) - Limit status: ok, warning, exhausted, or unknown. #### Response Example { "generatedAt": 1710000000000, "accounts": [ { "id": "acct_123", "provider": "openai", "accountLabel": "****", "plan": "pro", "fetchedAt": 1710000000000, "status": "available", "limits": [ { "id": "lim_1", "label": "GPT-4", "modelId": "gpt-4", "tier": "tier1", "windowLabel": "monthly", "resetsAt": 1712592000000, "usedFraction": 0.62, "used": 620, "limit": 1000, "remaining": 380, "unit": "requests", "status": "warning" } ] } ] } #### Error Response (503) - **error** (string) - usage_unavailable #### Error Response Example { "error": "usage_unavailable" } ``` -------------------------------- ### GET /sessions/:id/tools/:callId Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves tool call details with pagination. Supports cursor-based reading of tool output and completion status. ```APIDOC ## GET /sessions/:id/tools/:callId ### Description Retrieves tool call details with pagination. Supports cursor-based reading of tool output and completion status. ### Method GET ### Endpoint /sessions/:id/tools/:callId ### Parameters #### Path Parameters - **id** (string) - Required - Session identifier - **callId** (string) - Required - Tool call identifier #### Query Parameters - **cursor** (string) - Optional - Pagination cursor ### Response #### Success Response (200) - **text** (string) - Tool output text - **version** (string) - Tool version - **completed** (boolean) - Whether tool call is completed - **nextCursor** (string) - Cursor for next page, tail for polling - **resumeCursor** (string) - Cursor identifying received boundary - **hasMore** (boolean) - Whether more pages are immediately available #### Error Response - **404** - tool_not_found - Call absent from branch - **409** - stale_detail - Prefix rewritten - **503** - tool_detail_unavailable - Retryable ``` -------------------------------- ### GET /sessions/:id Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves a session snapshot without event type or sessionId fields. This is an optional inspection API that uses public DTOs. ```APIDOC ## GET /sessions/:id ### Description Retrieves a session snapshot without event type or sessionId fields. This is an optional inspection API that uses public DTOs. ### Method GET ### Endpoint /sessions/:id ### Parameters #### Path Parameters - **id** (string) - Required - The session ID. ### Response #### Success Response (200) - Session snapshot fields without event type/sessionId. #### Response Example (No explicit example provided in source.) ``` -------------------------------- ### GET /sessions/:id/history Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves a paginated list of history items for a session. Supports cursor-based pagination with optional anchor and oldest parameters for continuity. ```APIDOC ## GET /sessions/:id/history ### Description Retrieves a paginated list of history items for a session. Supports cursor-based pagination with optional anchor and oldest parameters for continuity. ### Method GET ### Endpoint /sessions/:id/history ### Parameters #### Path Parameters - **id** (string) - Required - Session identifier #### Query Parameters - **limit** (integer) - Optional - Number of items to return (1-100, default 50) - **cursor** (string) - Optional - Opaque pagination cursor - **anchor** (string) - Optional - Previously read branch leaf identifier - **oldest** (string) - Optional - Earliest retained item identifier ### Response #### Success Response (200) - **items** (array) - List of history items - **source** (object) - Continuity evidence, includes `continues` boolean - **nextCursor** (string|null) - Next page cursor, null if end of pagination #### Error Response - **stale_cursor** - Cursor is invalid, restart pagination ``` -------------------------------- ### Retry Funnel approval with explicit HTTPS port Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Run Funnel with --bg and --https=443 to retry first-time approval. Complete browser approval and rerun setup. Substitute your configured ports. ```sh tailscale funnel --bg --https=443 http://127.0.0.1:8787 ``` -------------------------------- ### GET /sessions/:id/operations/:commandId Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Retrieves the durable receipt for a previously dispatched command, even if the original HTTP response was lost. The receipt is authenticated and reflects the command's current state. ```APIDOC ## GET /sessions/:id/operations/:commandId ### Description Retrieves the durable receipt for a previously dispatched command, even if the original HTTP response was lost. The receipt is authenticated and reflects the command's current state. ### Method GET ### Endpoint /sessions/:id/operations/:commandId ### Parameters #### Path Parameters - **id** (string) - Required - Session identifier - **commandId** (string) - Required - Command identifier ### Response #### Success Response (200) - **receipt** (object) - Durable receipt containing command state and dispatch information #### Error Response - **404** - operation_not_found - Receipt is absent ``` -------------------------------- ### Run gateway with startup timing enabled Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Set PINKCOLLAB_STARTUP_TIMING=1 and run cargo run -- serve from the gateway/ directory to log host/session snapshot timings. The log excludes credentials and transcript text. ```bash PINKCOLLAB_STARTUP_TIMING=1 cargo run -- serve ``` -------------------------------- ### Run the Gateway during development Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md From the gateway/ directory, initialize the workspace once and then serve in the foreground. OMP must be on PATH. Put -- before Gateway arguments. The data directory defaults to ~/.pinkcollab; pass --data-dir after -- on every command that should use another one. ```sh cargo run -- init --workspace /absolute/path/to/projects # once cargo run -- serve ``` -------------------------------- ### Build the Gateway release binary Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md From the gateway/ directory, builds the release binary with locked dependencies. The binary is target/release/pinkcollab-gateway (.exe on Windows). ```sh cargo build --release --locked --bin pinkcollab-gateway ``` -------------------------------- ### Build PinkCollab gateway from source with cargo Source: https://github.com/3xian/pinkcollab/blob/main/website/index.html Clone the PinkCollab repository, navigate to the gateway directory, and build the release binary with cargo. Requires Rust 1.89 or later. ```bash git clone https://github.com/3xian/PinkCollab.git cd PinkCollab/gateway cargo build --release --locked --bin pinkcollab-gateway ``` -------------------------------- ### Pair another phone Source: https://github.com/3xian/pinkcollab/blob/main/README.md Initiate the pairing process for a new mobile device. ```bash pinkcollab pair ``` -------------------------------- ### Run update-logo.py with --promotional-only flag Source: https://github.com/3xian/pinkcollab/blob/main/scripts/README.md Rebuilds only the promotional images without modifying Android or logo assets. ```sh python3 scripts/update-logo.py --promotional-only ``` -------------------------------- ### Initial Host Snapshot Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md The initial JSON frame received upon connecting to the WS /events endpoint without a resumable host cursor. ```json {"type":"host_snapshot","protocolVersion":4,"host":{},"sessions":[{"session":{},"runtime":null}],"workspaces":[]} ``` -------------------------------- ### Run discovery regression tests Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Run the discovery/adoption regression tests with all features and locked dependencies. On Windows with a debug Gateway executable, add --target-dir target-discovery instead of stopping the service. ```bash cargo test --all-features --locked --test discovery ``` -------------------------------- ### Check the host status Source: https://github.com/3xian/pinkcollab/blob/main/README.md Run this command to verify the status of the host. ```bash pinkcollab ``` -------------------------------- ### Run release checks from repository root Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Execute the release verification script, run npm tests, preview the package, and check the website. Run from the repository root. ```sh node npm/scripts/check-release.mjs npm test --prefix npm/pinkcollab npm pack ./npm/pinkcollab --dry-run node .github/actions/check-website/check-site.mjs ``` -------------------------------- ### Run update-logo.py Source: https://github.com/3xian/pinkcollab/blob/main/scripts/README.md Executes the logo generation script from the repository root to build all static PinkCollab logos. ```powershell python scripts/update-logo.py ``` -------------------------------- ### Verify SHA256SUMS Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md Run this command in the download directory to verify the six payloads against the SHA256SUMS file. ```bash sha256sum -c SHA256SUMS ``` -------------------------------- ### CLI Usage Syntax Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md The basic syntax for invoking the pinkcollab CLI. The default data directory is ~/.pinkcollab. ```text pinkcollab [--data-dir ] [] ``` -------------------------------- ### Android signing key file locations Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md The local release build expects these files in the build account's home directory. ```text ~/.pinkcollab-signing/pinkcollab-release.p12 ~/.pinkcollab-signing/pinkcollab-release.properties ``` -------------------------------- ### Run Gateway validation checks Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md From the gateway/ directory, runs formatting check, clippy with all targets and features, and tests with all features and locked dependencies. ```sh cargo fmt --check cargo clippy --all-targets --all-features --locked -- -D warnings cargo test --all-features --locked ``` -------------------------------- ### Execute release workflow commands Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md Commands to update version manifests, commit changes, tag the release, and push to the repository. Ensure the release notes file is written and reviewed before committing. ```sh node npm/scripts/set-version.mjs X.Y.Z # Write and review docs/releases/vX.Y.Z.md before committing. git add gateway/Cargo.toml gateway/Cargo.lock android/app/build.gradle.kts npm/pinkcollab/package.json npm/platforms/*/package.json docs/releases/vX.Y.Z.md git commit -m "chore(release): X.Y.Z" git tag -a --cleanup=verbatim -F docs/releases/vX.Y.Z.md vX.Y.Z node npm/scripts/check-tag-notes.mjs vX.Y.Z git push origin main git push origin vX.Y.Z ``` -------------------------------- ### POST /pair Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Pairs a client with the host using a token and name. Returns client credentials and protocol version. The token is single-use and expires after five minutes. ```APIDOC ## POST /pair ### Description Pairs a client with the host using a token and name. Returns client credentials and protocol version. The token is single-use and expires after five minutes. ### Method POST ### Endpoint /pair ### Parameters #### Request Body - **token** (string) - Required - Pairing token - **name** (string) - Required - Client name ### Request Example { "token": "string", "name": "string" } ### Response #### Success Response (200) - **clientId** (string) - Client identifier - **credential** (string) - Bearer credential for authentication - **host** (string) - Host identifier - **protocolVersion** (integer) - Protocol version (4) #### Response Example { "clientId": "string", "credential": "string", "host": "string", "protocolVersion": 4 } ``` -------------------------------- ### Run Android build, unit tests, and lint Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md From the android/ directory, builds the debug APK, runs unit tests, and runs lint. On Windows use gradlew.bat. Android unit tests run offline; connectedDebugAndroidTest needs an attached test device or emulator. ```sh sh ./gradlew :app:assembleDebug :app:testDebugUnitTest :app:lintDebug ``` -------------------------------- ### Invoke PinkCollab via Node.js on macOS/Linux Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Use this method to bypass path conflicts by invoking the specific npm-installed binary directly via Node.js. ```sh launcher="$(npm root -g)/pinkcollab/bin/pinkcollab.js" node "$launcher" --version node "$launcher" update node "$launcher" doctor ``` -------------------------------- ### Troubleshoot Gateway and network status Source: https://github.com/3xian/pinkcollab/blob/main/docs/faq-macos-lid-close.md Run these diagnostic commands to check the health of the Gateway service and Tailscale connection. ```sh pinkcollab status pinkcollab doctor pinkcollab service status tailscale status ``` -------------------------------- ### POST /sessions Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Creates a new session. It checks the workspace and creates no process. Creation is idempotent within (clientId, commandId). ```APIDOC ## POST /sessions ### Description Creates a new session. It checks the workspace and creates no process. Creation is idempotent within (clientId, commandId). ### Method POST ### Endpoint /sessions ### Parameters #### Request Body - **commandId** (string) - Required - The command identifier. - **hostId** (string) - Required - The host identifier. - **cwd** (string) - Required - The current working directory. - **title** (string) - Optional - The session title. ### Response #### Success Response (200) - **Session** (object) - The created session object. ``` -------------------------------- ### Run Gateway API and SessionController regression test Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Executes the specific regression test for startup event bursts to ensure state and catalog consistency across reattachments. ```bash cargo test --all-features --locked --test model_settings startup_event_burst_preserves_state_and_catalog_across_reattach ``` -------------------------------- ### Upgrade Gateway via NPM Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.1.1.md Command to upgrade the PinkCollab Gateway package globally. ```bash npm install -g pinkcollab@2.1.1 ``` -------------------------------- ### Upgrade Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.1.0.md Command to upgrade the PinkCollab Gateway to version 2.1.0 globally. ```bash npm install -g pinkcollab@2.1.0 ``` -------------------------------- ### Run RPC v2 large catalog fixture test Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Run the fixture regression test that opts into --rpc-v2 --large-models, retains the first two models, and transfers more than 600 full upstream models in a logical response larger than 1 MiB. ```bash cargo test --all-features --locked --test model_settings rpc_v2_large_catalog_preserves_model_selection_and_thinking_state ``` -------------------------------- ### Invoke PinkCollab via Node.js on Windows PowerShell Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Use this method to bypass path conflicts by invoking the specific npm-installed binary directly via Node.js. ```powershell $launcher = Join-Path (npm root -g) "pinkcollab/bin/pinkcollab.js" node $launcher --version node $launcher update node $launcher doctor ``` -------------------------------- ### Upgrade Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.0.2.md Command to upgrade the PinkCollab Gateway package to version 2.0.2. ```bash npm install -g pinkcollab@2.0.2 ``` -------------------------------- ### Run assets-only release workflow Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md Use this command to trigger an assets-only rebuild from an existing tag when no npm versions or GitHub releases exist. This command skips npm publication. ```sh gh workflow run release.yml --ref main -f tag=vX.Y.Z ``` -------------------------------- ### Update npm launcher and platform packages Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.5.md Command to update the npm launcher and all five platform packages to version 3.0.5. ```bash npm install -g pinkcollab@3.0.5 ``` -------------------------------- ### Run focused Gateway history and receipt regression tests Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Runs focused regression tests for history and receipt handling. The core test covers ordering, session filtering, the 100-record cap, optional/JSON/timestamp fields, and corrupt selected records. The HTTP regression preserves distinct paging, synchronization, and tool-detail error responses. ```sh cargo test --all-features --locked --lib history::tests cargo test --all-features --locked --test core cargo test --all-features --locked --test discovery history_routes_preserve_distinct_http_errors ``` -------------------------------- ### Upgrade Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.0.3.md Use the npm package manager to update the PinkCollab Gateway to version 2.0.3. ```bash npm install -g pinkcollab@2.0.3 ``` -------------------------------- ### Run optimized Android rendering regression test Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Run the connected release test for ReleaseMarkdownDeviceTest on an attached device or emulator. Uses releaseTest build type with R8/resource shrinking and debug signing. ```sh sh ./gradlew :app:connectedReleaseTestAndroidTest -PtestBuildType=releaseTest -Pandroid.testInstrumentationRunnerArguments.class=dev.pinkcollab.ui.ReleaseMarkdownDeviceTest ``` -------------------------------- ### Upgrade PinkCollab CLI Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.0.0.md Use npm to upgrade the global PinkCollab package to version 2.0.0. ```bash npm install -g pinkcollab@2.0.0 ``` -------------------------------- ### WS /events Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Connect to the WebSocket endpoint to receive host snapshots, session snapshots, and real-time events. Supports subscription commands and optional gzip compression. ```APIDOC ## WS /events ### Description Connect to the WebSocket endpoint to receive host snapshots, session snapshots, and real-time events. Supports subscription commands and optional gzip compression. ### Method WS ### Endpoint /events ### Connection Connect to WS /events. A fresh connection without a resumable host cursor starts with a host_snapshot frame. ### Initial Snapshot {"type":"host_snapshot","protocolVersion":4,"host":{},"sessions":[{"session":{},"runtime":null}],"workspaces":[]} ### Commands - subscribe: Send {"type":"subscribe","sessionId":"..."} to receive timeline and operations for a session. - unsubscribe: Send {"type":"unsubscribe","sessionId":"..."} to stop receiving timeline and operations. ### Subscribe Parameters - sessionId (string) - Required - The session to subscribe to. - historyLimit (integer, 1-100) - Optional - Limits the history page size. If omitted, clients load the first page through REST. - epoch (string) - Optional - Gateway process identity for resuming. - sequence (integer) - Optional - Ordered event position for resuming. - hasCachedHistory (boolean) - Optional - Indicates the client has cached history. ### Subscribe Response {"type":"session_snapshot","sessionId":"...","session":{},"runtime":null,"timeline":[],"operations":[],"hasHistory":false} ### Events - session_upsert: Fields: sessionId, session, runtime. Insert/replace a host-list entry. - session_state: Fields: sessionId, session, runtime, hasHistory. Replace metadata and runtime in host list and any open detail. - runtime_state: Fields: sessionId, runtime, hasHistory. Update runtime using cached session metadata. - message_patch: Fields: sessionId, id, baseHash, hash, append, optional metadata. Append verified text; update metadata. - timeline: Fields: sessionId, upsert, remove, optional reset. If reset, clear live items; remove IDs; then insert/replace items by ID. - operation: Fields: sessionId, operation. Replace receipt by its ID. ### Compression Clients may offer the optional pinkcollab.v4.gzip WebSocket subprotocol. When accepted, Gateway sends JSON frames of at least 1 KiB as gzip-compressed binary messages; smaller frames remain text. Clients decode a binary message only after negotiation and bound decoded messages to 8 MiB. Without negotiation, all frames remain text. Client commands remain text in both cases. ### Ordering and Replay Every frame carries epoch (Gateway process identity) and sequence (ordered event position). Track the latest applied host sequence separately from each session sequence. Ignore frames already applied in their scope. Snapshot fences discard queued events superseded by that snapshot. Host and session snapshots are separate reads, not a global transaction. Reconnect supplies ?epoch=...&sequence=...&catalog=... for the host and {type:"subscribe",sessionId,epoch,sequence,hasCachedHistory:true} for each retained session. Optional URL focus keeps the visible session in a fresh host bootstrap. If a scope can resume, Gateway replays only its missing events; host_sync confirms host synchronization, while session_resume activates the cached detail before replay and session_sync confirms its final metadata/runtime/hasHistory. Session sync contains empty timeline/operations; retained messages and receipts stay visible. Events are retained for at most two minutes, 1,024 entries and 8 MiB, with eviction tracked by scope. Epoch changes, expired/evicted scope events or an invalid cursor fall back to a fresh snapshot for that scope. This replay is ephemeral, not durable storage. Broadcast lag follows the same scoped recovery within the connection. A fresh host snapshot on an already synchronized connection does not invalidate healthy session subscriptions. Transport failures, oversized events and delivery timeouts can still close the socket. In-flight REST reads must match their local subscription token and history request epoch before being applied. ``` -------------------------------- ### Update PinkCollab via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.7.md Use this command to update the npm launcher and platform packages to version 3.0.7. ```bash npm install -g pinkcollab@3.0.7 ``` -------------------------------- ### Upgrade Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.2.0.md Command to upgrade the Gateway package to version 2.2.0. ```bash npm install -g pinkcollab@2.2.0 ``` -------------------------------- ### POST /sessions/:id/commands Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Sends a command to an existing session. Returns HTTP 202 for a new command and 200 for an identical replay. The response includes operation and receiptStored fields. ```APIDOC ## POST /sessions/:id/commands ### Description Sends a command to an existing session. Returns HTTP 202 for a new command and 200 for an identical replay. The response includes operation and receiptStored fields. ### Method POST ### Endpoint /sessions/:id/commands ### Parameters #### Path Parameters - **id** (string) - Required - The session identifier. #### Request Body - **commandId** (string) - Required - The command identifier. - **type** (string) - Required - The command type. Possible values: start_runtime, prompt, interrupt, stop_runtime, respond, select_model, set_thinking_level, set_fast_mode. - **generation** (string) - Optional - The generation identifier. Required for most types except start_runtime and prompt without generation. - **message** (string) - Optional - For prompt type: the message to send. - **fileIds** (array of string) - Optional - For prompt type: file identifiers. - **inputRequestId** (string) - Optional - For respond type: the input request identifier. - **value** (string) - Optional - For respond type: the value to respond with. - **confirmed** (boolean) - Optional - For respond type: confirmation flag. - **cancelled** (boolean) - Optional - For respond type: cancellation flag. - **provider** (string) - Optional - For select_model type: the provider. - **modelId** (string) - Optional - For select_model type: the model identifier. - **level** (string) - Optional - For set_thinking_level type: the thinking level. - **enabled** (boolean) - Optional - For set_fast_mode type: whether fast mode is enabled. ### Request Example {"commandId":"intent-1","type":"prompt","generation":"run-1","message":"Check the build","fileIds":[]} ### Response #### Success Response (200) - **operation** (string) - The operation result. - **receiptStored** (boolean) - Whether the receipt was stored. #### Response Example {"operation":"...","receiptStored":true} ``` -------------------------------- ### Upgrade PinkCollab via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.0.1.md Command to upgrade the global PinkCollab package to version 2.0.1. ```bash npm install -g pinkcollab@2.0.1 ``` -------------------------------- ### Clear Lease Command Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md Clears a specific runtime lease. Only execute this after verifying that the old OMP process and its descendants have exited while the Gateway is stopped. ```text clear-lease --session --generation --verified-exited ``` -------------------------------- ### Caddy reverse proxy configuration Source: https://github.com/3xian/pinkcollab/blob/main/docs/deployment.md A minimal Caddy configuration to forward traffic to the Gateway's loopback listener. Ensure the hostname and upstream port are updated to match your environment. ```caddyfile collab.example.com { reverse_proxy 127.0.0.1:8787 } ``` -------------------------------- ### Update PinkCollab via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.8.md Command to update the npm launcher and platform packages to version 3.0.8. ```bash npm install -g pinkcollab@3.0.8 ``` -------------------------------- ### Update Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.1.md Command to update the global PinkCollab package to version 3.0.1. ```bash npm install -g pinkcollab@3.0.1 ``` -------------------------------- ### PUT /sessions/:id/files/:fileId?name=... Source: https://github.com/3xian/pinkcollab/blob/main/docs/protocol.md Uploads raw application/octet-stream bytes to a session. The file ID must be 'file_' followed by 32 hex digits, and the file size must be between 1 byte and 10 MiB. Up to five files per prompt are allowed, and identical retries are idempotent. ```APIDOC ## PUT /sessions/:id/files/:fileId?name=... ### Description Uploads raw application/octet-stream bytes to a session. The file ID must be 'file_' followed by 32 hex digits, and the file size must be between 1 byte and 10 MiB. Up to five files per prompt are allowed, and identical retries are idempotent. ### Method PUT ### Endpoint /sessions/:id/files/:fileId?name=... ### Parameters #### Path Parameters - **id** (string) - Required - Session identifier - **fileId** (string) - Required - File identifier, must be 'file_' plus 32 hex digits #### Query Parameters - **name** (string) - Required - File name #### Request Body - **body** (application/octet-stream) - Required - Raw file bytes, size between 1 byte and 10 MiB ### Request Example (No explicit example provided) ### Response #### Success Response (200) (No explicit response schema provided) #### Response Example (No explicit example provided) ``` -------------------------------- ### Android signing properties file format Source: https://github.com/3xian/pinkcollab/blob/main/docs/npm-release.md The properties file contains the keystore and key passwords along with the key alias, with one value per line. ```properties ANDROID_KEYSTORE_PASSWORD= ANDROID_KEY_ALIAS=pinkcollab ANDROID_KEY_PASSWORD= ``` -------------------------------- ### Update Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.2.md Command to update the global PinkCollab Gateway package to version 3.0.2. ```bash npm install -g pinkcollab@3.0.2 ``` -------------------------------- ### Update Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.3.1.md Commands to update the PinkCollab Gateway to version 3.3.1. Ensure active work is finished before running these commands. ```bash npm install -g pinkcollab@3.3.1 ``` ```bash pinkcollab update ``` -------------------------------- ### Update Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v2.4.3.md Use this command to update the PinkCollab Gateway to version 2.4.3. ```bash npm install -g pinkcollab@2.4.3 ``` -------------------------------- ### Run real-OMP smoke test Source: https://github.com/3xian/pinkcollab/blob/main/docs/development.md Runs the smoke test that requires OMP or OMP_EXECUTABLE. The test is ignored by default and must be run with -- --ignored. ```sh cargo test --test omp_smoke -- --ignored ``` -------------------------------- ### Update PinkCollab via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.0.4.md Command to update the PinkCollab launcher and platform packages to version 3.0.4. ```bash npm install -g pinkcollab@3.0.4 ``` -------------------------------- ### Update Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.2.2.md Commands to update the PinkCollab Gateway to version 3.2.2. Ensure active work is finished before running these commands. ```bash npm install -g pinkcollab@3.2.2 ``` ```bash pinkcollab update ``` -------------------------------- ### Upgrade PinkCollab via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.1.1.md Command to update the global PinkCollab package to version 3.1.1. ```bash npm install -g pinkcollab@3.1.1 ``` -------------------------------- ### Update Gateway via npm Source: https://github.com/3xian/pinkcollab/blob/main/docs/releases/v3.3.0.md Commands to update the PinkCollab Gateway to version 3.3.0. Ensure active work is finished before running these commands. ```bash npm install -g pinkcollab@3.3.0 ``` ```bash pinkcollab update ```