Skip to content

feat: upstream agent_module, function_module, namespace_module + AuthzMemberOwner/DataMemberOwner#72

Merged
pyramation merged 5 commits into
mainfrom
feat/agent-module-upstream
May 25, 2026
Merged

feat: upstream agent_module, function_module, namespace_module + AuthzMemberOwner/DataMemberOwner#72
pyramation merged 5 commits into
mainfrom
feat/agent-module-upstream

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Syncs entity-scoped module table DDL and node_type_registry updates from constructive-db (PRs #1327, #1332) to the canonical pgpm-modules repo.

metaschema-modules changes:

  • agent_module table — entity-aware AI agent config (thread/message/task/prompt/knowledge table names, has_knowledge flag, api_name)
  • function_module table — entity-aware function definitions with namespace FK
  • namespace_module table — entity-aware namespace provisioning with rename proxy
  • entity_type_provision — added agents jsonb column for agent_module config in entity provisioning
  • Updated pgpm.plan with new table entries

metaschema-schema changes:

  • node_type_registry_seed.sql — added 6 new node types:
    • AuthzMemberOwner (compound ownership + entity membership RLS)
    • DataMemberOwner (creates owner_id + entity_id + applies AuthzMemberOwner)
    • DataChunks (child table with vector embeddings for RAG)
    • SearchSpatialAggregate (spatial aggregate queries)
    • CheckFileUpload (file upload validation)
    • LimitTrackUsage removed (moved to billing module)

Review & Testing Checklist for Human

  • Verify the agent_module table DDL matches what constructive-db is actually using
  • Verify entity_type_provision.agents column is nullable and defaults to NULL (backwards-compatible)
  • Check that the node_type_registry_seed entries have correct parameter_schema JSON
  • Run pgpm verify against a fresh database to ensure the plan deploys cleanly

Notes

  • All these changes are tested and passing in constructive-db (28/28 CI checks on PR #1332)
  • The function_module and namespace_module tables were added in earlier PRs (#1314, #1315) but never synced upstream
  • The generated sql/ files include the compiled output from all deploy/ sources

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

…zMemberOwner/DataMemberOwner

From constructive-db PRs #1327 and #1332:

metaschema-modules:
- Add agent_module table DDL (thread/message/task/prompt/knowledge config)
- Add function_module table DDL (entity-aware function definitions)
- Add namespace_module table DDL (entity-aware namespace provisioning)
- Update entity_type_provision with 'agents' column for agent_module config
- Update pgpm.plan with new table entries

metaschema-schema:
- Add AuthzMemberOwner to node_type_registry seed (compound ownership+membership policy)
- Add DataMemberOwner to node_type_registry seed (compound data node)
@devin-ai-integration
Copy link
Copy Markdown

🤖 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

…erify from constructive-db

Complete sync of both packages from the constructive-db source of truth:

metaschema-modules:
- Add all missing module tables (compute_log, db_usage, merkle_store, storage_log, transfer_log, graph_module, etc.)
- Add all missing core tables (connected_accounts, crypto_addresses, emails, invites, limits, memberships, permissions, profiles, rls, sessions, user_state, etc.)
- Updated entity_type_provision with agents column
- Full deploy/revert/verify + pgpm.plan + compiled SQL

metaschema-schema:
- Full node_type_registry_seed.sql with all 79 node types
- All deploy/verify files synced

Source: constructive-db main branch (all 28 CI checks green)
…e stale snapshot

- Fix compute_log_module verify: add scope column, remove include_database_id
- Fix db_usage_module verify: match actual table_stats/query_stats columns
- Fix storage_log_module verify: add scope column
- Fix transfer_log_module verify: add scope column
- Fix namespace_module verify: add public_schema_name, private_schema_name, api_name, private_api_name
- Add missing verify/revert for: agent_module, graph_module, merkle_store_module, entity_type_provision
- Delete stale snapshot (will regenerate on test run)
- Restore deploy/verify files that were accidentally overwritten from constructive-db
@pyramation pyramation merged commit a7c7571 into main May 25, 2026
24 checks passed
@pyramation pyramation deleted the feat/agent-module-upstream branch May 25, 2026 23:27
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