Skip to content

feat(cli): expose canonical resource URLs - #6948

Merged
TheodoreSpeaks merged 2 commits into
feat/v2-headless-coveragefrom
improvement/cli-resource-links
Aug 24, 2026
Merged

feat(cli): expose canonical resource URLs#6948
TheodoreSpeaks merged 2 commits into
feat/v2-headless-coveragefrom
improvement/cli-resource-links

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • return canonical web URLs for tables, files, workflows, and knowledge bases
  • expose resource URLs through CLI detail and structured output
  • add bun run sim for local CLI execution and bump the CLI to 2.1.1

Type of Change

  • Feature

Testing

  • bun run lint
  • bun run check:audits
  • affected API tests: 404 passed
  • CLI tests: 458 passed, 1 skipped
  • bun run type-check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@TheodoreSpeaks
TheodoreSpeaks requested a review from a team as a code owner August 21, 2026 20:38
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 24, 2026 6:03pm

Request Review

@cursor

cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Adds a required API field on multiple v2 surfaces, so API clients must accept webUrl; URL correctness depends on getBaseUrl() in each deployment environment.

Overview
V2 list and detail responses for files, workflows, tables, and knowledge bases now include a required webUrl — an absolute link to open the resource in the Sim web app. Serialization uses a new shared helper (workspaceResourcePath / workspaceResourceWebUrl in lib/resources) with getBaseUrl(), and Zod/OpenAPI contracts document the field via v2ResourceWebUrlSchema.

Mention deep links in the markdown editor now route through the same canonical paths (notably files use /files/{id} instead of /files/{id}/view).

The sim CLI (2.1.1) surfaces webUrl in resource directory listings and files describe, with regenerated API types and a root bun run sim script for local CLI runs.

Reviewed by Cursor Bugbot for commit 93b5d0f. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds canonical Sim web URLs to v2 table, file, workflow, and knowledge-base responses and exposes them through CLI detail and structured output.

  • Centralizes canonical resource URL construction.
  • Extends API contracts, generated CLI types, OpenAPI artifacts, and tests.
  • Adds local CLI execution support and updates the CLI package to 2.1.1.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/resources/urls.ts Introduces centralized builders for canonical workspace resource URLs.
apps/sim/app/api/v2/files/utils.ts Adds canonical file URLs to serialized v2 file responses; the previously discussed fail-fast configuration behavior was explicitly accepted.
apps/sim/app/api/v2/knowledge/utils.ts Adds canonical knowledge-base URLs to v2 response projections.
apps/sim/app/api/v2/tables/utils.ts Adds canonical table URLs to v2 response projections.
apps/sim/app/api/v2/workflows/route.ts Adds canonical workflow URLs to v2 workflow list responses.
packages/sim-cli/src/commands/protocol/resource-directory.ts Exposes API-provided resource URLs through CLI resource details.
packages/sim-cli/src/generated/v2-api.ts Updates generated v2 API types with required canonical resource URLs.

Reviews (2): Last reviewed commit: "feat(cli): expose canonical resource URL..." | Re-trigger Greptile

Comment thread apps/sim/app/api/v2/files/utils.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6e44246. Configure here.

@TheodoreSpeaks
TheodoreSpeaks changed the base branch from staging to feat/v2-headless-coverage August 24, 2026 17:50
@TheodoreSpeaks
TheodoreSpeaks merged commit 7ae3888 into feat/v2-headless-coverage Aug 24, 2026
4 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the improvement/cli-resource-links branch August 24, 2026 18:12
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