Skip to content

fix(provider): classify API builtin status from descriptor path#292

Merged
xiami762 merged 1 commit into
devfrom
fix/api-service-builtin-by-descriptor-path
May 19, 2026
Merged

fix(provider): classify API builtin status from descriptor path#292
xiami762 merged 1 commit into
devfrom
fix/api-service-builtin-by-descriptor-path

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

@xiami762 xiami762 commented May 19, 2026

Summary

  • Determine whether an API service is built-in (and therefore protected from deletion) by resolving the _provider.yaml descriptor location first, instead of relying solely on in-memory native flags in the tool registry.
  • Treat descriptors under <cwd>/.flocks/plugins/tools/api as project-level (non-deletable); descriptors under ~/.flocks/plugins/tools/api as user-installed (deletable).
  • Fall back to the previous behavior—built-in only when every registered tool has native=True—when no descriptor is available (legacy/core registrations).
  • Add a regression test ensuring project-level API plugins remain protected even when registry native flags are stale.

Motivation

After a registry refresh, user-installed tools can still carry stale native=True values. That caused _is_api_service_builtin to incorrectly block deletion of user-level API services.

Use _provider.yaml location to distinguish project vs user plugins for
delete protection, avoiding false positives from stale native flags.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xiami762 xiami762 merged commit b83216e into dev May 19, 2026
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