feat: add scope field to BlueprintStorageConfig — 'app' or 'org' only#1195
Merged
Conversation
Top-level storage[] entries now accept scope: 'app' (default) or 'org'. - 'app': app-level storage (no owner_id) - 'org': per-org/user storage (owner_id, AFTER INSERT bucket seeding) Child entity types get storage via entity_types[].storage (unchanged). When infra is installed, a private functions bucket is auto-injected into org-scoped entries.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Adds the
scopefield toBlueprintStorageConfigin both the codegen source (generate-types.ts) and the generated output (blueprint-types.generated.ts). The scope is a union type'app' | 'org':scope: 'app'(default) — app-level storage, noowner_idscope: 'org'— per-org/user storage withowner_id, buckets seeded per-entityUpdates the
BlueprintDefinition.storageJSDoc to document the scope behavior and auto-injection of thefunctionsbucket when infra is installed.Companion to constructive-db PR #1240 and constructive-skills docs PR.
Review & Testing Checklist for Human
Low risk — type-only change, no runtime behavior.
scope?: 'app' | 'org'appears in the generatedBlueprintStorageConfiginterfaceBlueprintDefinition.storagedocuments both scopes and auto-injectionNotes
The generated file has pre-existing type errors when regenerated locally (missing
LimitEnforceCounterParamsetc. from the static fallback). The committed generated file was manually updated to add only thescopefield — CI should pass since it builds from the committed file.Link to Devin session: https://app.devin.ai/sessions/c0494871633d4beb91f1e16e53c776d1
Requested by: @pyramation