Skip to content

feat: add scope field to BlueprintStorageConfig — 'app' or 'org' only#1195

Merged
pyramation merged 1 commit into
mainfrom
feat/multi-storage-module-types
May 19, 2026
Merged

feat: add scope field to BlueprintStorageConfig — 'app' or 'org' only#1195
pyramation merged 1 commit into
mainfrom
feat/multi-storage-module-types

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Adds the scope field to BlueprintStorageConfig in 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, no owner_id
  • scope: 'org' — per-org/user storage with owner_id, buckets seeded per-entity

Updates the BlueprintDefinition.storage JSDoc to document the scope behavior and auto-injection of the functions bucket 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.

  • Verify scope?: 'app' | 'org' appears in the generated BlueprintStorageConfig interface
  • Verify JSDoc on BlueprintDefinition.storage documents both scopes and auto-injection

Notes

The generated file has pre-existing type errors when regenerated locally (missing LimitEnforceCounterParams etc. from the static fallback). The committed generated file was manually updated to add only the scope field — CI should pass since it builds from the committed file.

Link to Devin session: https://app.devin.ai/sessions/c0494871633d4beb91f1e16e53c776d1
Requested by: @pyramation

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.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit 7a15cbd into main May 19, 2026
37 checks passed
@pyramation pyramation deleted the feat/multi-storage-module-types branch May 19, 2026 21:03
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