feat: add langsmith apps commands#180
Draft
Sam Crowder (samecrowder) wants to merge 53 commits into
Draft
Conversation
Adds init/dev/push/list/get/delete for the LangSmith Custom Apps platform (smith-go's /v1/platform/custom-apps). Mirrors the existing hub push/init conventions: push uploads a directory as-is (optional --build for a shell build step), init scaffolds a real npm+esbuild starter that bundles down to the single dependency-free file the sandbox's CommonJS loader expects, and a local .langsmith/app.json link file lets repeated pushes update the same app instead of creating a new one each time (custom apps have no owner/repo- style unique name to upsert against server-side). dev constructs/opens a LangSmith preview URL pointed at a local dev server (localhost/127.0.0.1 only) — the frontend side of rendering from a live URL instead of uploaded files doesn't exist yet, so this is the CLI half of that feature landing ahead of it.
If an app is deleted through the UI, .langsmith/app.json still has its old app_id, so the next push's PATCH 404s. Instead of failing, detect the 404 (via a new typed client.HTTPError) and fall back to creating a new app under the same name/context_type, relinking app.json to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.