Skip to content

Proxy TrueFoundry skill catalog and return 424 on skill writes - #631

Open
bhaveshpatel640 wants to merge 21 commits into
mainfrom
AGE-2127
Open

Proxy TrueFoundry skill catalog and return 424 on skill writes#631
bhaveshpatel640 wants to merge 21 commits into
mainfrom
AGE-2127

Conversation

@bhaveshpatel640

@bhaveshpatel640 bhaveshpatel640 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

TrueFoundry mode proxies the SFY skill catalog with the caller token. Settings skill writes return 424.

Closes AGE-2127

Changes

  • GET /api/v1/skills and GET /api/v1/skills/{skill_id}/versions read SFY (caller JWT)
  • Settings skill create/upsert → 424 in TrueFoundry mode
  • Catalog wire: id, fqn (latest), ml_repo_name, name, description; versions: version (number) + fqn

How was this tested?

Unit tests: mapSfyAgentSkills, TrueFoundrySkillStore, skills API.

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Medium Risk
Changes skill validation, turn-time resolution, and external SFY calls with caller/agent tokens; misconfiguration could break agent saves or skill mounting in TrueFoundry mode.

Overview
Adds TrueFoundry-managed skills: in TrueFoundry mode, GET /api/v1/skills and GET /api/v1/skills/versions are served from ServiceFoundry via a per-request TrueFoundrySkillStore (same token/vend pattern as models and MCP). Settings create/upsert skill calls return 424 when the catalog is externally managed.

Schema/API: SkillManifest is a discriminated git | truefoundry union; chat AvailableSkill can include metadata (display_name, repository_name, version). AgentSpec skills accept opaque FQN-style names, optional preload, and are capped at 50; git-backed stores reject preload.

Runtime: Skill storage is wired through resolveSkillStore (SQLite/Postgres git skills vs SFY). Agent save/turn paths use validateAgentSkills (git name lookup or SFY resolve). OpenAPI and trueforge-sdk add listVersions and 424 handling on settings skills.

UI: The builder maps catalog id (attach key) to wire name, surfaces display labels, and round-trips preload on session/agent admission.

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

@changeset-bot

changeset-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6142574

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@truefoundry/trueforge Patch
@truefoundry/trueforge-core Patch
@truefoundry/trueforge-ui Patch
@truefoundry/trueforge-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/runtime/sessionResources.ts
Comment thread packages/trueforge/src/truefoundry/mapSfyAgentSkills.ts
Comment thread packages/trueforge/src/schemas/skill.ts Outdated

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

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/schemas/skill.ts Outdated
Comment thread .github/fern/openapi/openapi.json Outdated
Comment thread .github/fern/openapi/openapi.json Outdated
Comment thread .github/fern/openapi/openapi.json Outdated
Comment thread .github/fern/openapi/openapi.json Outdated
Comment thread .github/fern/openapi/openapi.json Outdated
Comment thread packages/trueforge/src/routes/skillRoutes.ts Outdated
Comment thread packages/trueforge/src/routes/skillRoutes.ts Outdated
Comment thread packages/trueforge/src/schemas/skill.ts Outdated
Comment thread packages/trueforge/src/truefoundry/TrueFoundrySkillStore.ts Outdated
cursor[bot]

This comment was marked as outdated.

@bhaveshpatel640
bhaveshpatel640 force-pushed the AGE-2127 branch 2 times, most recently from 2348787 to 818bc2d Compare September 8, 2026 19:03
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4ca386a. Configure here.

@bhaveshpatel640
bhaveshpatel640 marked this pull request as draft September 9, 2026 20:28
@bhaveshpatel640
bhaveshpatel640 force-pushed the AGE-2127 branch 3 times, most recently from 97848a5 to 2cbe5ad Compare September 9, 2026 20:59
@bhaveshpatel640
bhaveshpatel640 marked this pull request as ready for review September 9, 2026 21:15
@bhaveshpatel640
bhaveshpatel640 added this pull request to stack #662 September 9, 2026 21:36
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.

2 participants