Skip to content

Add ability to inspect staging and production AI rooms with the inspect-ai-room skill - #5922

Open
jurgenwerk wants to merge 3 commits into
mainfrom
inspect-ai-room-staging-profile
Open

Add ability to inspect staging and production AI rooms with the inspect-ai-room skill#5922
jurgenwerk wants to merge 3 commits into
mainfrom
inspect-ai-room-staging-profile

Conversation

@jurgenwerk

@jurgenwerk jurgenwerk commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Add ability to inspect AI assistant rooms on staging and production with the inspect-ai-room skill. Until now the skill could only reach the local synapse, because it logs in as aibot with the dev password. Against deployed environments the aibot password is not available to the read-only AWS role, so the script now accepts --profile <id|matrixUrl-substring> and reuses the Matrix access token that boxel-cli already stores in ~/.boxel-cli/profiles.json. A raw MATRIX_TOKEN env var works as a fallback. The aibot login path is unchanged for local use.

The profile's user must be a member of the room, which is the normal case when the person who ran the session is also the boxel-cli user. All subcommands (rooms, timeline, usage, state, raw) work this way; verified against a staging room.

SKILL.md documents the staging path and adds a short procedure for triaging a session that produced many errors: state, usage, timeline, then the raw payload of each failed tool result or code patch, classified as model, skill-text, or platform error, with realm-server logs for the platform ones.

🤖 Generated with Claude Code

…file token

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jurgenwerk jurgenwerk changed the title inspect-ai-room skill: inspect staging and production rooms Add ability to inspect staging and production AI rooms with the inspect-ai-room skill Aug 28, 2026
@jurgenwerk
jurgenwerk requested a lite review from Copilot August 28, 2026 09:38
@jurgenwerk
jurgenwerk marked this pull request as ready for review August 28, 2026 09:38
@jurgenwerk
jurgenwerk requested a review from a team August 28, 2026 09:38

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

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

let profiles = JSON.parse(fs.readFileSync(file, 'utf8')).profiles ?? {};
let p =
profiles[idOrHint] ??
Object.values(profiles).find((x) => x.matrixUrl?.includes(idOrHint));

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 Reject ambiguous profile URL hints

When profiles.json contains multiple accounts for the same environment, the documented --profile staging or --profile boxel.ai shorthand silently selects the first matching profile. If the requested room belongs to another matching account, every command fails with a Matrix authorization error even though a suitable profile exists; detect multiple matches and require an exact profile ID rather than depending on object insertion order.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Claude Code 🤖] (Written by Claude on Matic's behalf.) Fixed: a hint that matches more than one profile now throws and lists the matching ids, so the caller must pass the exact profile id.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the inspect-ai-room skill so it can inspect AI assistant Matrix rooms in staging/production by reusing a Matrix access token from an existing boxel-cli profile (with MATRIX_TOKEN as a fallback), while keeping the existing local aibot login flow intact.

Changes:

  • Document staging/production usage (via --profile) and add an “error-heavy session” triage procedure to the skill docs.
  • Add --profile support to inspect-room.mjs and prefer profile/env token auth before falling back to local aibot login.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.claude/skills/inspect-ai-room/SKILL.md Updates skill documentation for staging/production authentication and adds a debugging/triage workflow.
.claude/skills/inspect-ai-room/scripts/inspect-room.mjs Adds --profile flag support and token-based auth selection for non-local Matrix environments.
Suppressed comments (1)

.claude/skills/inspect-ai-room/scripts/inspect-room.mjs:39

  • loadProfile() uses find() for matrixUrl substring matching, so if multiple profiles share the same Matrix URL (common when you have multiple accounts on staging/prod), the chosen profile is non-deterministic. Also, if a profile record is missing matrixUrl, the script can silently fall back to MATRIX_URL/localhost and send the token to the wrong server.
function loadProfile(idOrHint) {
  let file = path.join(os.homedir(), '.boxel-cli', 'profiles.json');
  let profiles = JSON.parse(fs.readFileSync(file, 'utf8')).profiles ?? {};
  let p =
    profiles[idOrHint] ??

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .claude/skills/inspect-ai-room/scripts/inspect-room.mjs
Comment thread .claude/skills/inspect-ai-room/SKILL.md Outdated
jurgenwerk and others added 2 commits August 28, 2026 11:44
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

3 participants