feat(hosting): service profiles, write-locking, preseed API, and admin exports#139
Open
jack-arturo wants to merge 1 commit intomainfrom
Open
feat(hosting): service profiles, write-locking, preseed API, and admin exports#139jack-arturo wants to merge 1 commit intomainfrom
jack-arturo wants to merge 1 commit intomainfrom
Conversation
…admin exports Introduce a RuntimeProfile system that maps SERVICE_TIER (trial, pro, ultimate, archived) and SERVICE_MODE (active, read_only, archived) to capability flags (writes_enabled, admin_mutations_enabled, etc.). Mutating endpoints now return HTTP 423 when the service is locked, with trial-expired pods including an upgrade_url. Read paths (recall, health, service/profile) remain available in all modes. New endpoints: - POST /api/v1/preseed — bulk-create onboarding memories with associations - GET /api/v1/stats — lightweight dashboard counters - GET /service/profile — tier, mode, and capability introspection - POST /admin/exports + GET status + GET download — gzipped graph+vector export bundles for archived pod data portability MCP SSE server now surfaces 423 lock states with clear user messages. Includes unit tests for all new endpoints, service profile resolution, write-locking enforcement, and export flow.
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 hosted trial-server infrastructure for InstaPods:
AUTOMEM_SERVICE_TIER(trial/pro/ultimate/archived) andAUTOMEM_SERVICE_MODE(active/read_only/archived) resolve to capability flags that govern write access, admin mutations, export eligibility, and moreupgrade_urlfor upgrade prompts; read paths (recall, health, service/profile) stay available in all modesPOST /api/v1/preseed— Bulk-create onboarding memories with associations (auto-taggedonboarding)GET /api/v1/stats— Lightweight dashboard counters (memory count, associations, types, top tags, graph density)GET /service/profile— Tier, mode, capability, and infrastructure introspectionPOST /admin/exports+GET /admin/exports/<id>+GET /admin/exports/<id>/download— Gzipped graph+vector export bundles for archived pod data portabilityTest plan
make test— all unit tests passresolve_runtime_profile()defaults for each tier/memoryPOST whenservice_mode=read_onlyandarchived/recallstill works in locked modes/admin/exportscreate → status → download flow/api/v1/preseedcreates memories withonboardingtag and associations/api/v1/statsreturns correct shapeformatToolErrorexplains 423 states