From 1d48ddee0c213b3bb6f590dfd9150ced682c1c0d Mon Sep 17 00:00:00 2001 From: Luke Garceau Date: Fri, 1 May 2026 22:43:24 -0400 Subject: [PATCH 1/3] docs: update install instructions to reflect flexcamp-ai OpenWork Setup wizard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LOCAL_AWS_SETUP.md: replace bare flexcamp-ai link with step-by-step end-user flow (Slack /get-openwork → download OpenWork Setup app → guided wizard) and API key renewal instructions - install-flex: remove write_shell_alias() step; opencode-work() launcher is no longer needed since flexcamp-ai configures OpenCode with an API key via the OpenWork Setup wizard. Update completion 'Next steps' to point users to Slack /get-openwork and OpenWork Setup. --- LOCAL_AWS_SETUP.md | 20 ++++++++++----- install-flex | 61 ++++------------------------------------------ 2 files changed, 19 insertions(+), 62 deletions(-) diff --git a/LOCAL_AWS_SETUP.md b/LOCAL_AWS_SETUP.md index 52f71e071873..47c5100d97e3 100644 --- a/LOCAL_AWS_SETUP.md +++ b/LOCAL_AWS_SETUP.md @@ -2,15 +2,23 @@ Instructions for building and running the Flexion fork of opencode. -## AWS Credentials Setup +## AWS Credentials & End-User Install -AWS credentials and opencode configuration are managed by **flexcamp-ai**: +End-user installation and AWS credentials are managed by **[flexcamp-ai](https://github.com/flexion/flexcamp-ai)** — a macOS menubar app that walks you through a guided setup wizard. -``` -https://github.com/flexion/flexcamp-ai -``` +**Getting started:** + +1. In Slack, type `/get-openwork` in any channel — the bot will DM you a Bedrock API key, expiration date, and region. +2. Download **OpenWork Setup** from the link in the DM (or the [latest release](https://github.com/flexion/flexcamp-ai/releases/latest)). +3. Open the app and run the setup wizard (~2 min). It installs and configures everything: Homebrew/Node.js if needed, OpenCode, the OpenWork desktop app, AWS Bedrock credentials, workspace folder, and pre-built skills. +4. After setup, click **"Open OpenWork"** or use the menu bar icon. + +**Renewing your API key (expires every 7 days):** +Type `/bedrock-key` in Slack → click the menu bar icon → **"Replace API Key..."** → paste the Slack message. + +--- -Follow the setup instructions there before building or running this fork. flexcamp-ai handles AWS authentication, the `opencode-work` shell function, and `~/.config/opencode/opencode.json`. +_Developers building from source: continue to the sections below._ --- diff --git a/install-flex b/install-flex index 7f69bd8522e1..06a2fa345d73 100755 --- a/install-flex +++ b/install-flex @@ -9,11 +9,11 @@ # 2. Prompts: clone directory # 3. Clones git@github.com:flexion/opencode.git (flex branch) — skipped if already present # 4. Installs dependencies and builds the native binary -# 5. Appends opencode-work() launcher function to ~/.zshrc or ~/.bashrc # # AWS credentials and opencode configuration are managed by flexcamp-ai: # https://github.com/flexion/flexcamp-ai -# Run flexcamp-ai setup before or after this installer. +# Use /get-openwork in Slack to get your API key, then run the OpenWork Setup +# app to complete configuration. # # Existing files are never overwritten; each step is skipped with a warning # if the output already exists. @@ -111,70 +111,19 @@ clone_and_build() { success "Binary built" } -# ── step 4: shell launcher function ────────────────────────────────────────── -write_shell_alias() { - local rc_file - case "$(basename "${SHELL:-bash}")" in - zsh) rc_file="$HOME/.zshrc" ;; - *) rc_file="$HOME/.bashrc" ;; - esac - - # Sentinel comment is the idempotency guard — more reliable than matching the - # function signature, which a user might remove while leaving a stale comment. - if grep -qF "── Flexion opencode launcher ──" "$rc_file" 2>/dev/null; then - warn "opencode-work() already defined in $rc_file — skipping" - return - fi - - info "Appending opencode-work() to $rc_file..." - - # Use printf %q to shell-quote the clone path at install time. - # This eliminates the previous Perl s|...|..| substitution which was vulnerable - # to injection if CLONE_DIR contained a | character. - local clone_dir_q - clone_dir_q=$(printf '%q' "$CLONE_DIR") - - # Double-quoted heredoc: $clone_dir_q expands now (install time); - # all other $ references are \-escaped so they expand at shell run time. - cat >>"$rc_file" < Date: Fri, 1 May 2026 22:56:49 -0400 Subject: [PATCH 2/3] fix: update test expectations for reasoning-stripping on non-reasoning models The reasoning-stripping guard (transform.ts:54-60) strips reasoning parts from models with capabilities.reasoning: false. Two tests still expected reasoning parts to survive for non-reasoning models (OpenAI GPT-4, Anthropic Claude 3.5 Sonnet). Updated expectations to match the intentional behavior. Co-Authored-By: Claude Opus 4.6 --- packages/opencode/test/provider/transform.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/opencode/test/provider/transform.test.ts b/packages/opencode/test/provider/transform.test.ts index 9b66eaa77c5d..5c3adfdd6b5b 100644 --- a/packages/opencode/test/provider/transform.test.ts +++ b/packages/opencode/test/provider/transform.test.ts @@ -1116,7 +1116,6 @@ describe("ProviderTransform.message - DeepSeek reasoning content", () => { ) expect(result[0].content).toEqual([ - { type: "reasoning", text: "Should not be processed" }, { type: "text", text: "Answer" }, ]) expect(result[0].providerOptions?.openaiCompatible?.reasoning_content).toBeUndefined() @@ -1369,9 +1368,8 @@ describe("ProviderTransform.message - anthropic empty content filtering", () => const result = ProviderTransform.message(msgs, anthropicModel, {}) expect(result).toHaveLength(1) - expect(result[0].content).toHaveLength(2) - expect(result[0].content[0]).toEqual({ type: "reasoning", text: "Thinking..." }) - expect(result[0].content[1]).toEqual({ type: "text", text: "Result" }) + expect(result[0].content).toHaveLength(1) + expect(result[0].content[0]).toEqual({ type: "text", text: "Result" }) }) test("filters empty content for bedrock provider", () => { From e725861ae3d77e9bff013a61fe861ec521c11188 Mon Sep 17 00:00:00 2001 From: Luke Garceau Date: Tue, 5 May 2026 09:13:32 -0400 Subject: [PATCH 3/3] finalize instructions --- bun.lock | 3 +++ bunfig.toml | 1 + packages/opencode/package.json | 1 + 3 files changed, 5 insertions(+) diff --git a/bun.lock b/bun.lock index fcd8e94431a8..26dcf3cfa5d4 100644 --- a/bun.lock +++ b/bun.lock @@ -439,6 +439,7 @@ "minimatch": "10.0.3", "npm-package-arg": "13.0.2", "open": "10.1.2", + "opencode-darwin-arm64": "1.14.35", "opencode-gitlab-auth": "2.0.1", "opencode-poe-auth": "0.0.1", "opentui-spinner": "catalog:", @@ -4154,6 +4155,8 @@ "opencode": ["opencode@workspace:packages/opencode"], + "opencode-darwin-arm64": ["opencode-darwin-arm64@1.14.35", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7o5Ci/zHo6sRgLqzC6tEzwPcyx2XJAYa3DOewhfRhh7kkt3BWbjEnR0seNQgnU3vPca5t1N16vjEX9v8RYWd4Q=="], + "opencode-gitlab-auth": ["opencode-gitlab-auth@2.0.1", "", { "dependencies": { "@fastify/rate-limit": "^10.2.0", "@opencode-ai/plugin": "*", "fastify": "^5.2.0", "open": "^10.0.0" } }, "sha512-1EMZHdbADLMVaTVLQ6C/V8uVMDr6MP++osj2lmOecowtn46AafP/w6ADkV4AN/ddjA1rob5cWpMuf/iME6DI6A=="], "opencode-poe-auth": ["opencode-poe-auth@0.0.1", "", { "dependencies": { "open": "^10.0.0", "poe-oauth": "*" }, "peerDependencies": { "@opencode-ai/plugin": "*" } }, "sha512-cXqTlS6AXHzo1oBdosnxbT47ZJEZ9WXn050X8Re6wZ1vaNnTpB/l2fMQt90evT7RBK0fB8UjXQUDMKyd7bbiqg=="], diff --git a/bunfig.toml b/bunfig.toml index 36a21d9332a3..febcc4355cfa 100644 --- a/bunfig.toml +++ b/bunfig.toml @@ -1,5 +1,6 @@ [install] exact = true +registry = "https://registry.npmjs.org" [test] root = "./do-not-run-tests-from-root" diff --git a/packages/opencode/package.json b/packages/opencode/package.json index ea91bef74bee..150d161fbc43 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -153,6 +153,7 @@ "minimatch": "10.0.3", "npm-package-arg": "13.0.2", "open": "10.1.2", + "opencode-darwin-arm64": "1.14.35", "opencode-gitlab-auth": "2.0.1", "opencode-poe-auth": "0.0.1", "opentui-spinner": "catalog:",