Skip to content

feat: stage Grokbots Discord rooms through Relay - #2732

Open
jasonqlwilliams-alt wants to merge 2 commits into
kunchenguid:mainfrom
jasonqlwilliams-alt:fm/grokbots-discord-d1
Open

feat: stage Grokbots Discord rooms through Relay#2732
jasonqlwilliams-alt wants to merge 2 commits into
kunchenguid:mainfrom
jasonqlwilliams-alt:fm/grokbots-discord-d1

Conversation

@jasonqlwilliams-alt

Copy link
Copy Markdown

Summary

  • add deterministic Relay message addressing for fleet, continuum-guest, eight seat mailboxes, and one thread per job
  • validate complete eight-seat Discord-to-Relay-to-seat latency receipts without network access or credentials
  • document the single owner activation sitting, exact Discord click path, and least-privilege bot permissions
  • teach Relay mention handling to use the active Grokbot runtime's existing message-to-seat action and fail truthfully when it is unavailable
  • keep Continuum authoritative, Flux as its guest door, mailboxes out of job ownership, and Rakazo paused

Evidence boundary

Proved by hermetic tests:

  • only the eight existing seats resolve
  • explicit non-Discord platform metadata wins over legacy identifiers
  • fleet routes to Eleusis and Continuum guest routes to Flux
  • latency receipts require all eight seats exactly once with monotonic timestamps
  • fixture evidence cannot become live evidence
  • the existing Relay polling, Discord context, reply binding, and follow-up suite remains green

Still explicitly owner-gated and unknown:

  • live server name, room ids, and official installation permissions
  • pairing-token activation
  • the live message-to-Grokbot surface in this Firstmate runtime
  • one live canary post and reply
  • measured wake latency for each of the eight seats

No Discord sign-in, server mutation, bot installation, OAuth approval, pairing-token access, live post, Rakazo start, or account action was performed.

Validation

  • tests/fm-discord-rooms.test.sh: pass
  • tests/fm-x-mode.test.sh: pass
  • tests/fm-documentation-audiences.test.sh: pass
  • bin/fm-doc-audience-check.sh: pass
  • bin/fm-test-run.sh --check-coverage: pass, 152 tests covered
  • bash -n bin/fm-discord-rooms.sh tests/fm-discord-rooms.test.sh: pass

The complete local lint command could not run because this worktree lacks pinned ShellCheck 0.11.0 and actionlint 1.7.12.
The test-runner self-test additionally lacks Ruby for parsing the workflow YAML.
Those are environment dependency gaps, not hidden green results.

@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: f5cfe30afd

ℹ️ 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-discord-rooms.sh
|| die 'route input must be one JSON object'

platform=$(printf '%s' "$payload" | jq -r '
def explicit: (.platform // .reply_platform // .target_platform // .source_platform // .provider // "") | ascii_downcase;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reuse the canonical Relay platform precedence

Captain, when a compatibility payload carries both reply_platform and platform, fmx_extract_reply_context prioritizes reply_platform, but this expression prioritizes platform; for example, {reply_platform:"discord",platform:"x"} is canonically a Discord request yet this command rejects it, preventing an otherwise valid room message from reaching its seat. Reuse the canonical extractor or mirror its first-nonempty field ordering.

AGENTS.md reference: AGENTS.md:L543-L547

Useful? React with 👍 / 👎.

@kunchenguid kunchenguid left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Speaking as Kun's firstmate:

VISION verdict: resist. firstmate is the command layer, not a Discord or Relay product, and not a chat workshop. This change hardcodes one crew's Grokbots roster (Jason, Eleusis, Flux, Continuum, Rakazo, a named Discord click path, server name Grokbots Rooms) into the shared captain-agnostic surface, and it hooks that roster into the existing fmx-respond mention path rather than leaving it as a captain-local adapter.

Class: default-behavior. Discord Relay mention handling is already the live respond path. The Grokbots grammar and eight-seat map are not an opt-in slash skill and not a per-home flag. Anyone with Discord Relay who writes fleet: is routed to Eleusis.

The helper itself is hermetic: no network, no credentials, symlink inputs refused, request_id constrained. That is not enough. The distro must stay generic. A captain-specific Discord room plan belongs in that home, not in README, docs, bin, and fmx-respond of the shared template.

Not merge-eligible. CI is empty pending first-time fork approval; not a captain-flag.

@jasonqlwilliams-alt

Copy link
Copy Markdown
Author

2026-08-21 go-live capability audit

Proved live

  • The active Composio discord OAuth2 connection is live.
  • It resolves captain-supplied guild 1539100295932551189 to owner-held Continuum server.
  • No new Discord server should be created.
  • The active user OAuth can list guilds but cannot act on this guild's rooms.
  • The discord toolkit has no create-guild, create/list-channel, create-thread, create-invite, or create-message action.
  • The separate discordbot toolkit has those actions but has no connected account.
  • An authenticated read-only proxy request to the guild channel endpoint returned Discord 401 Unauthorized.
  • No invite URL is available because neither active path can create or inspect invites.
  • None of the requested rooms is proved live yet.
  • None of Eleusis, Flux, Spur, Chronicle, Thor, QA Engineer, Ledger, or Argon is proved reachable from Discord yet.
  • No canary was posted because the Relay is still inert without installation and a pairing token.

Wake latency

No designed or fixture value is being reported as live latency.

Seat Live observed latency
Eleusis Unavailable - no Discord event reached the Relay or seat
Flux Unavailable - no Discord event reached the Relay or seat
Spur Unavailable - no Discord event reached the Relay or seat
Chronicle Unavailable - no Discord event reached the Relay or seat
Thor Unavailable - no Discord event reached the Relay or seat
QA Engineer Unavailable - no Discord event reached the Relay or seat
Ledger Unavailable - no Discord event reached the Relay or seat
Argon Unavailable - no Discord event reached the Relay or seat

The event path to measure after activation is Discord mention event -> Relay x-mention wake -> existing Firstmate message-to-seat action -> named seat receipt.

Test post

Prepared but not posted live:

@myfirstmate mailbox/eleusis: DISCORD-GROKBOTS-CANARY-1; reply with this marker only

One remaining Jason sitting

  1. In Discord, open the already-owned Continuum server.
  2. From the server menu choose Create Category, name it GROKBOTS, enable Private Category, and leave only Jason with access initially.
  3. Inside it create #fleet, #projects, #continuum-guest, #mailbox-eleusis, #mailbox-flux, #mailbox-spur, #mailbox-chronicle, #mailbox-thor, #mailbox-qa-engineer, #mailbox-ledger, and #mailbox-argon.
  4. Use one ordinary #projects message thread per current job and name it with the existing job id.
  5. Open https://myfirstmate.io, choose Discord sign-in, and confirm the same Discord owner account.
  6. In the dashboard use the Discord install link and choose Continuum server.
  7. Approve only View Channels, Send Messages, Read Message History, and Send Messages in Threads for the bot.
  8. Refuse Administrator, Manage Server, Manage Roles, Manage Channels, member management, moderation, voice administration, and any unexplained permission.
  9. Back in the GROKBOTS category permissions, add the installed myfirstmate bot role with only the four allowed room permissions.
  10. Copy the dashboard pairing token directly into /home/jason/kun-agent-workspace/.env with a local editor as FMX_PAIRING_TOKEN=<token>.
  11. Do not place that token in chat, shell arguments, logs, screenshots, Git, or any task artifact.
  12. Start a new Firstmate session and hand back for the live canary plus eight independent latency receipts.

Proved by tests only

  • Explicit fleet, Continuum guest, mailbox, and job addresses resolve only to the eight existing seats.
  • Fixture receipts require all eight seats exactly once, monotonic event timestamps, and preserve fixture proof.
  • The full existing Relay hermetic suite passed.
  • Documentation ownership and local-link validation passed.
  • Repository lint could not run because this worktree does not have the required ShellCheck 0.11.0 binary.

No merge is requested.

@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: d1022b196f

ℹ️ 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".

6. Use the authenticated dashboard's Discord install control, choose `Continuum server`, and inspect the authorization screen before approving it.
7. Approve only the scopes and permissions in the least-privilege list below.
8. Return to Discord, open the `GROKBOTS` category permissions, add the installed myfirstmate bot role, and allow the listed room permissions only.
9. Return to the myfirstmate dashboard and copy the pairing token directly into `/home/jason/kun-agent-workspace/.env` with a local editor as `FMX_PAIRING_TOKEN=<token>`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Write the pairing token to the active home

Captain, when FM_HOME points anywhere other than /home/jason/kun-agent-workspace, following this activation step writes the pairing token into the wrong instance. Bootstrap reads the active firstmate home's .env, as documented in docs/configuration.md, so the subsequent session remains inert despite the operator completing the prescribed setup; direct the operator to $FM_HOME/.env (or otherwise identify the active home) instead.

AGENTS.md reference: AGENTS.md:L49-L50

Useful? React with 👍 / 👎.

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.

2 participants