Skip to content

docs: surface mountWorkspace SDK helper in README; fix guide code-fence langs#123

Merged
khaliqgant merged 2 commits into
mainfrom
codex/post-auth-mount-followups
May 9, 2026
Merged

docs: surface mountWorkspace SDK helper in README; fix guide code-fence langs#123
khaliqgant merged 2 commits into
mainfrom
codex/post-auth-mount-followups

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Summary

Two small follow-ups after #122 merged:

  1. README — Add a "Mount a workspace from a sandbox (TypeScript SDK)" subsection under Hosted Agent Relay. The CLI path (relayfile setup) was already documented; this surfaces the new programmatic equivalent from feat(sdk): add post-auth mount workspace helper #122 (RelayfileSetup.mountWorkspace / ensureMountedWorkspace) right next to it so integrators see both entry points. Links the new guide from the Docs section.
  2. Guide nits — Address two CodeRabbit findings on docs/guides/post-auth-mount-session.md by adding language specifiers to fenced code blocks: text for the ASCII flow diagram (line 18), http for the endpoint reference (line 45).

Verification

  • README rendered review (markdown only).
  • All fenced blocks in the guide now have a language specifier (verified by awk '/^\``/{print}'`).

…ce langs

Adds a "Mount a workspace from a sandbox (TypeScript SDK)" subsection
under Hosted Agent Relay so the new SDK helper from #122 is discoverable
from the project README and reads as the programmatic sibling of the
existing `relayfile setup` CLI flow. Links the new guide from the Docs
section.

Also addresses CodeRabbit nits on docs/guides/post-auth-mount-session.md
by adding language specifiers to two unspecified fenced code blocks
(text for the ASCII flow diagram, http for the endpoint reference).
@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c6bc86a-7026-44c3-bf63-5a214ec55c54

📥 Commits

Reviewing files that changed from the base of the PR and between 8479b73 and d6ef655.

📒 Files selected for processing (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

This PR adds README documentation for a TypeScript SDK workflow to programmatically mount Agent Relay Cloud workspaces from sandboxes, including mountWorkspace/ensureMountedWorkspace usage, provider-readiness gating and errors, the returned mount handle API, a docs navigation link, and explicit language labels for two code fences in the mount-session guide.

Changes

Mount Workspace SDK Documentation

Layer / File(s) Summary
SDK Mount Workflow Guide
README.md
New section documents TypeScript SDK usage for mounting workspaces, including mountWorkspace and ensureMountedWorkspace examples, provider-readiness gating options, ProviderNotConnectedError/ProviderNotReadyError, providerReadyTimeoutMs, verifyProvider switch, and returned handle methods/properties (ready, expiresAt, suggestedRefreshAt, env(), status(), stop()).
Documentation Navigation
README.md
"Post-auth mount session (SDK)" link added to the Docs navigation list.
Code Fence Formatting
docs/guides/post-auth-mount-session.md
Code fences updated with explicit language identifiers: text for Product Flow diagram and http for Cloud Endpoint Reference request example.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A mount in lines, tidy and bright,
TypeScript paths hum through the night,
Ready flags wave, errors in sight,
Docs set right, code fences light,
Hop—workspace mounted—pure delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes both main changes: documenting the mountWorkspace SDK helper in the README and fixing code-fence language specifiers in the guide.
Description check ✅ Passed The description is well-organized and directly related to the changeset, covering both the README update to surface the SDK helper and the guide code-fence language fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/post-auth-mount-followups

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 263-264: The code sample calls handle.status() without awaiting
the async method, so change the sample to await the Promise returned by status()
before accessing .expiresAt; specifically, update the lines using
handle.status() (the async status(): Promise<MountedWorkspaceStatus> method) so
you await it (e.g., const status = await handle.status(); then use
status.expiresAt) and keep the subsequent await handle.stop() as-is.
- Around line 270-272: The README example incorrectly passes a plain object as
the workspace argument to setup.ensureMountedWorkspace; replace the object with
either a WorkspaceHandle instance (obtainable via setup.joinWorkspace()) or pass
the workspaceId string directly. Update the sample to call
setup.joinWorkspace(...) and pass its returned WorkspaceHandle into
setup.ensureMountedWorkspace, or change the argument to workspaceId: "rw_…" so
the usage matches the SDK's WorkspaceHandle contract and the
ensureMountedWorkspace signature.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ace5a0a2-2540-4937-a6ca-d2028fc05a09

📥 Commits

Reviewing files that changed from the base of the PR and between 051d2f8 and 8479b73.

📒 Files selected for processing (2)
  • README.md
  • docs/guides/post-auth-mount-session.md

Comment thread README.md Outdated
Comment thread README.md

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment thread README.md Outdated
})

// /workspace is now a live mount of the workspace
console.log(handle.status().expiresAt)

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.

🟡 README example accesses .expiresAt on an unresolved Promise from status()

The README SDK example at line 263 does handle.status().expiresAt, but according to the MountedWorkspaceHandle interface documented in docs/guides/post-auth-mount-session.md:230, status() returns Promise<MountedWorkspaceStatus>. Accessing .expiresAt on a Promise yields undefined. The guide's own example at docs/guides/post-auth-mount-session.md:141 correctly uses handle.expiresAt (a direct readonly property on the handle). The README example should either use the synchronous property handle.expiresAt or await the call: (await handle.status()).expiresAt.

Suggested change
console.log(handle.status().expiresAt)
console.log(handle.expiresAt)
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

CodeRabbit / Devin Review on #123:
- `handle.status()` returns a Promise; `handle.status().expiresAt` was
  reading off the unresolved Promise. The handle exposes `expiresAt` as
  a readonly synchronous property — use that.
- `setup.ensureMountedWorkspace({ workspace: { id: ... } })` doesn't match
  `MountWorkspaceInput.workspace?: WorkspaceHandle`. Switch to the
  `workspaceId: string` overload, which the SDK accepts as a primitive.
@khaliqgant khaliqgant merged commit 000738e into main May 9, 2026
7 checks passed
@khaliqgant khaliqgant deleted the codex/post-auth-mount-followups branch May 9, 2026 14:08
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