feat(workspace): add workspace view command and surface ID in auth status#4
feat(workspace): add workspace view command and surface ID in auth status#4obs-gh-virjramakrishnan wants to merge 3 commits into
Conversation
…atus Adds `observe workspace view` which returns the current workspace's id, label, timezone, locale, and createdDate as JSON. The workspace ID (the numeric suffix in the UI URL) was previously invisible in the CLI. Also adds `Workspace ID` to `auth status` output so it's visible without needing a separate command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rged Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
82e04ad to
8637f3c
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| content: contentRoutes, | ||
| "ingest-token": ingestTokenRoutes, | ||
| datastream: datastreamRoutes, | ||
| workspace: workspaceRoutes, |
There was a problem hiding this comment.
workspace is a concept thats being removed -- are we sure we need to add it to the cli?
There was a problem hiding this comment.
We need it for creating links to the customer's observe account, since the URL contains the workspaceID, e.g. https://146206672945.observe-eng.com/workspace/42587555/service-explorer. If we do https://146206672945.observe-eng.com/service-explorer the link does not work. I like having the agent provide this link, as the customer can directly see the data in observe that they set up via agent. I would remove this once we remove workspaces from the URLs. If we cannot have this API, I can also just not have the agent provide links at the end.
There was a problem hiding this comment.
I think having it in auth status is fine, perhaps marked (deprecated), but I wouldn't add observe workspace view.
Summary
observe workspace view— returns the current workspace'sid,label,timezone,locale, andcreatedDateas JSONWorkspace IDtoobserve auth statusoutput (human-readable and JSON)The workspace ID (the numeric suffix in the Observe UI URL, e.g.
/workspace/42587555) was previously invisible from the CLI. You could see the workspace name inauth statusbut had no way to get the ID without opening a browser.Test plan
bun run typecheck,bun run lint,bun run format,bun test(255 pass, +3 new workspace view tests)observe workspace viewandobserve auth statusagainst a real tenant — both show the numeric workspace ID🤖 Generated with Claude Code