Skip to content

feat: add opencode server backend - #44

Closed
ImZoomBoy wants to merge 2 commits into
kunchenguid:mainfrom
ImZoomBoy:codex/opencode-server-backend
Closed

ImZoomBoy wants to merge 2 commits into
kunchenguid:mainfrom
ImZoomBoy:codex/opencode-server-backend

Conversation

@ImZoomBoy

Copy link
Copy Markdown

Summary

  • add an opencode-server backend that drives task-local OpenCode serve sessions through the HTTP API
  • wire capture, send, interrupt/status, spawn metadata, teardown, bootstrap checks, docs, and watcher busy detection
  • add regression coverage for opencode-server metadata/state behavior without requiring a live server

Testing

  • node --check bin/fm-codex-app bin/fm-opencode-server
  • shell syntax checks via LF-normalized temp copies
  • full test/*.test.sh suite via LF-normalized temp copy
  • live FM_BACKEND=opencode-server fm-spawn smoke against a disposable git repo, with prompt capture and cleanup

Stephen S. Brouhard and others added 2 commits June 21, 2026 20:17
* Add Orca crew backend

* Add Codex App backend

* Ignore local backend selectors

* no-mistakes(document): Sync backend docs

* no-mistakes(document): Sync backend docs

* feat: require visible Codex App threads

* no-mistakes(document): Sync Codex App backend docs
@ImZoomBoy ImZoomBoy closed this Jun 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 111d5a1636

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/fm-opencode-server
@@ -0,0 +1,430 @@
#!/usr/bin/env node

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the OpenCode backend helper executable

This new helper is checked in with mode 100644, but the backend invokes it directly as an executable from paths such as fm-spawn when FM_BACKEND=opencode-server. In that configuration the spawn path fails immediately with Permission denied before it can start the server; mark this file executable like the other bin/ helpers.

Useful? React with 👍 / 👎.

@@ -0,0 +1,80 @@
#!/usr/bin/env bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the OpenCode server test executable

Captain, this test is also checked in with mode 100644, while the new CI tests job runs each test/*.test.sh directly with "$t". On the Ubuntu runner this file stops the job with Permission denied, so the backend contract tests cannot pass until the executable bit is set or the workflow invokes tests through bash.

Useful? React with 👍 / 👎.

This was referenced Aug 7, 2026
NewAiCoder added a commit to NewAiCoder/firstmate that referenced this pull request Sep 26, 2026
…un (kunchenguid#44)

A worker parked on `paused: no-mistakes run in progress` with the pipeline
genuinely still running was wedge-escalated every ~STALE_ESCALATE_SECS: the
repeat-poll path treated a fresh "still working" reconfirmation the same as a
generic busy pane overriding an unrelated declared wait, resuming the wedge
ladder with a since-timestamp that was never refreshed. pause_state_class now
recognizes a pause line that specifically claims a no-mistakes run, confirmed
alive, as the declared wait itself holding rather than something overriding
it, so it takes the bounded pause cadence instead of the wedge ladder.

Fixes kunchenguid#35.

Co-authored-by: NewAiCoder <claude@theinbtw.com>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…d#44)

* fix(gitignore): ignore config/ as a directory, not by exact filename (kunchenguid#1261)

A name-by-name list of config/ entries silently stops ignoring any new or
home-local file placed there, which makes the working tree read as dirty and
blocks guarded sync paths that refuse to touch a dirty home. AGENTS.md
already documents config/ as captain-private and gitignored as a category;
this makes .gitignore match that contract.

* fix(tests): replace source-content .gitignore assertion with behavioral coverage (kunchenguid#1304)

The second assertion in fm-gitignore-config.test.sh (added by kunchenguid#1261) greps
.gitignore for a specific spelling of the config/ ignore pattern. It fails
on a semantically equivalent pattern like config/** and does not prove Git
actually ignores anything, per the completed source-content-test audit.

Replace it with a real git check-ignore control test on a generated
unrelated path, and strengthen the existing directory-coverage test with
generated unpredictable direct and nested config/ paths.

* Ignore config/ as a directory and correct two stale hints.

Ports two upstream commits and lands two fork-local corrections.

Ported from upstream:
- e595611 fix(gitignore): ignore config/ as a directory, not by exact filename (kunchenguid#1261)
- a53ffc1 fix(tests): replace source-content .gitignore assertion with behavioral coverage (kunchenguid#1304)

The .gitignore conflict is resolved to upstream's end state: every
individual config/... entry, including this fork's config/primary-handoff,
is replaced by a single config/ rule. The per-file list was the defect -
on a public repo it leaves every future captain-private knob committable.
Nothing under config/ is tracked today, and this keeps it that way.

Fork-local corrections:
- docs/configuration.md said Kimi Code 0.27.0 was verified only as a
  primary and that fm-spawn rejects Kimi workers. bin/fm-spawn.sh accepts
  --harness kimi, and AGENTS.md section 4 plus docs/kimi-harness.md carry
  the 2026-07-23 worker evidence. The doc sentence now matches the code.
- bin/fm-spawn.sh printed the Pi install hint for @mariozechner/pi-coding-agent.
  The installed and tested lineage is @earendil-works/pi-coding-agent, which
  the Pi tests already reference. It was the only wrong-lineage reference.

---------

Co-authored-by: Christopher McKay <101884182+karotkriss@users.noreply.github.com>
Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
…ing titles into options (kunchenguid#44)

* fix(bin): let the Factory pane scroll, wrap its cards and never split a title into options

On a small pane (a large-font Herdr client) nothing below the visible height
could be reached, long titles and options were cut at the edge, and a held
decision whose title listed several calls showed that title split into
numbered options.

- The view scrolls: the count line stays on top and the keys at the bottom,
  the highlight keeps itself in sight, pgup, pgdn and the mouse wheel scroll,
  the arrows scroll past the first and last row, and a row under the count
  line and above the keys says how many lines are hidden.
- An opened card wraps its whole title, why and each option to the pane's
  width; a folded row ends on a whole word with an ellipsis, and the four
  steps use shorter links when the pane is narrow.
- Each row is cleared before it is drawn, not after: with autowrap off,
  clearing from the last column erased the character in it, so a shortened
  row lost its ellipsis.
- A held decision's options come only from its reason or recorded marks,
  never from its title, on the Factory pane, the tap page and the decision
  board alike.
- --plain --height prints what a pane that tall shows when it opens.

* no-mistakes(review): Keep options from plain two-way decision titles only

* no-mistakes(review): Reject slash and vs titles as two-way options

* no-mistakes(review): Reject only spaced slashes in two-way decision titles

* no-mistakes(review): Count only a spaced vs as a title separator

* no-mistakes(test): Break overlong unspaced words when wrapping opened Factory cards

* no-mistakes(test): Wrap talk box label so typed text stays visible

* fix(bin): bring an item into sight when the bridge strip moves a scrolled Factory pane to it

A pane the owner had scrolled by hand kept its place when the bridge strip's
most urgent call moved the highlight to an item, so the item could stay out of
sight. Going to an item now brings it into sight.

* no-mistakes(document): Note Factory pane mouse reports disable Herdr text selection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant