@happyvertical/smrt-cli 0.55.17 → 0.55.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/AGENTS.md +4 -0
  2. package/dist/{AuditLogCollection-WDHL-_AF-02D9mDot.js → AuditLogCollection-WDHL-_AF-CnfYFIBN.js} +1 -1
  3. package/dist/{OidcIdentity-BUblgQLs-hzB0lrxA.js → OidcIdentity-BUblgQLs-7b_UC2ND.js} +2 -2
  4. package/dist/{OidcIdentityCollection-ClOyaHeF-D7aAvcYW.js → OidcIdentityCollection-ClOyaHeF-1rB63uyR.js} +1 -1
  5. package/dist/{ProfileAssetCollection-CRMcjLJ--CRQsOHTZ.js → ProfileAssetCollection-CRMcjLJ--DCdP8aB2.js} +3 -3
  6. package/dist/{ProfileCollection-C4INKh7Y-DUcvwlG4.js → ProfileCollection-C4INKh7Y-j9kXNQ27.js} +17 -17
  7. package/dist/{ProfileLinkCollection-DFfZRsgv-4ulMzaJO.js → ProfileLinkCollection-DFfZRsgv-BsJWD-cT.js} +2 -2
  8. package/dist/{ProfileMetadataCollection-BIYKy4Y3-BGVdmb-k.js → ProfileMetadataCollection-BIYKy4Y3-StzZmRNZ.js} +1 -1
  9. package/dist/{ProfileMetafieldCollection-Buz7gzag-Cuuzb-Yt.js → ProfileMetafieldCollection-Buz7gzag-ByG3A0cx.js} +1 -1
  10. package/dist/{ProfileRelationshipCollection-C4g_QLI4-DHnLSOex.js → ProfileRelationshipCollection-C4g_QLI4-JgyUD2Y3.js} +1 -1
  11. package/dist/{ProfileTypeCollection-B7kwi1mU-tffgStmE.js → ProfileTypeCollection-B7kwi1mU-C-XBj2lo.js} +2 -2
  12. package/dist/app/portability.d.ts +23 -1
  13. package/dist/app/portability.d.ts.map +1 -1
  14. package/dist/app.js +2 -2
  15. package/dist/{cli-FDpY0gCt.js → cli-Cgj-996T.js} +1 -1
  16. package/dist/commands/utilities.d.ts.map +1 -1
  17. package/dist/{commands-Cve0qfxc.js → commands-DECEmNZO.js} +321 -3
  18. package/dist/dist-CBcZA5mL.js +21 -0
  19. package/dist/{dist-BtlfVNPV.js → dist-CEfXh68v.js} +4 -4
  20. package/dist/{dist-BQ5ZrH9U.js → dist-CGo6iLhL.js} +444 -57
  21. package/dist/{dist-BQjejZ0-.js → dist-CO2CxT1e.js} +3 -3
  22. package/dist/{dist-C_pNF2sM.js → dist-C_8Edimn.js} +2 -2
  23. package/dist/index.js +12 -12
  24. package/dist/{oidcProvisioningPrimitives-DNP9EZlU-B5DmitVf.js → oidcProvisioningPrimitives-DNP9EZlU-ZOiVGqhG.js} +3 -3
  25. package/dist/{portability-BbltyqQ-.js → portability-ClYZy8ut.js} +28 -5
  26. package/dist/{resolveIdentity-CkyqvctR-BDafA2yA.js → resolveIdentity-CkyqvctR-CQD6ChY1.js} +14 -14
  27. package/package.json +16 -16
  28. package/dist/dist-DHRli5Sc.js +0 -21
@@ -266,7 +266,7 @@ async function queryWithGlobals(collection, tenantId, label) {
266
266
  createLogger({ level: "info" });
267
267
  //#endregion
268
268
  //#region ../tenancy/dist/index.js
269
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.55.17","objects":{"@happyvertical/smrt-tenancy:BillingRelationship":{"name":"billingrelationship","className":"BillingRelationship","qualifiedName":"@happyvertical/smrt-tenancy:BillingRelationship","collection":"billingrelationships","filePath":"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts","packageName":"@happyvertical/smrt-tenancy","fields":{"childTenantId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:Tenant","_meta":{"required":true}},"resellerTenantId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:Tenant","_meta":{"required":true}},"billingOwnerMode":{"type":"text","required":false,"default":"self","enum":["self","reseller"]}},"methods":{},"decoratorConfig":{"tableName":"_smrt_billing_relationships","conflictColumns":["child_tenant_id"],"api":false,"cli":false,"mcp":false},"extends":"SmrtObject","exportName":"BillingRelationship","collectionExportName":"BillingRelationshipCollection","validationRules":[{"field":"childTenantId","rule":"required","fieldType":"crossPackageRef"},{"field":"resellerTenantId","rule":"required","fieldType":"crossPackageRef"}],"schema":{"tableName":"_smrt_billing_relationships","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_billing_relationships\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"child_tenant_id\\" UUID NOT NULL,\\n \\"reseller_tenant_id\\" UUID NOT NULL,\\n \\"billing_owner_mode\\" TEXT DEFAULT 'self'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"child_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reseller_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"billing_owner_mode":{"type":"TEXT","notNull":false,"unique":false,"default":"self"}},"indexes":[{"name":"_smrt_billing_relationships_child_tenant_id_idx","columns":["child_tenant_id"],"unique":true},{"name":"_smrt_billing_relationships_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_billing_relationships_created_at_idx","columns":["created_at"]},{"name":"_smrt_billing_relationships_reseller_tenant_id_idx","columns":["reseller_tenant_id"]}],"version":"4d7f410a"},"importPath":"@happyvertical/smrt-tenancy"},"@happyvertical/smrt-tenancy:BillingRelationshipCollection":{"name":"billingrelationshipcollection","className":"BillingRelationshipCollection","qualifiedName":"@happyvertical/smrt-tenancy:BillingRelationshipCollection","collection":"billingrelationships","filePath":"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts","packageName":"@happyvertical/smrt-tenancy","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_billing_relationships","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"BillingRelationship","exportName":"BillingRelationshipCollection","collectionExportName":"BillingRelationshipCollectionCollection","schema":{"tableName":"_smrt_billing_relationships","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_billing_relationships\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"child_tenant_id\\" UUID NOT NULL,\\n \\"reseller_tenant_id\\" UUID NOT NULL,\\n \\"billing_owner_mode\\" TEXT DEFAULT 'self'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"child_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reseller_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"billing_owner_mode":{"type":"TEXT","notNull":false,"unique":false,"default":"self"}},"indexes":[{"name":"_smrt_billing_relationships_child_tenant_id_idx","columns":["child_tenant_id"],"unique":true},{"name":"_smrt_billing_relationships_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_billing_relationships_created_at_idx","columns":["created_at"]},{"name":"_smrt_billing_relationships_reseller_tenant_id_idx","columns":["reseller_tenant_id"]}],"version":"4d7f410a"},"importPath":"@happyvertical/smrt-tenancy"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core"],"browser":{"status":"server-only","issues":["#3624"],"reason":"node:async_hooks"},"stampsConstructors":true}`));
269
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.55.19","objects":{"@happyvertical/smrt-tenancy:BillingRelationship":{"name":"billingrelationship","className":"BillingRelationship","qualifiedName":"@happyvertical/smrt-tenancy:BillingRelationship","collection":"billingrelationships","filePath":"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts","packageName":"@happyvertical/smrt-tenancy","fields":{"childTenantId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:Tenant","_meta":{"required":true}},"resellerTenantId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:Tenant","_meta":{"required":true}},"billingOwnerMode":{"type":"text","required":false,"default":"self","enum":["self","reseller"]}},"methods":{},"decoratorConfig":{"tableName":"_smrt_billing_relationships","conflictColumns":["child_tenant_id"],"api":false,"cli":false,"mcp":false},"extends":"SmrtObject","exportName":"BillingRelationship","collectionExportName":"BillingRelationshipCollection","validationRules":[{"field":"childTenantId","rule":"required","fieldType":"crossPackageRef"},{"field":"resellerTenantId","rule":"required","fieldType":"crossPackageRef"}],"schema":{"tableName":"_smrt_billing_relationships","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_billing_relationships\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"child_tenant_id\\" UUID NOT NULL,\\n \\"reseller_tenant_id\\" UUID NOT NULL,\\n \\"billing_owner_mode\\" TEXT DEFAULT 'self'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"child_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reseller_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"billing_owner_mode":{"type":"TEXT","notNull":false,"unique":false,"default":"self"}},"indexes":[{"name":"_smrt_billing_relationships_child_tenant_id_idx","columns":["child_tenant_id"],"unique":true},{"name":"_smrt_billing_relationships_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_billing_relationships_created_at_idx","columns":["created_at"]},{"name":"_smrt_billing_relationships_reseller_tenant_id_idx","columns":["reseller_tenant_id"]}],"version":"4d7f410a"},"importPath":"@happyvertical/smrt-tenancy"},"@happyvertical/smrt-tenancy:BillingRelationshipCollection":{"name":"billingrelationshipcollection","className":"BillingRelationshipCollection","qualifiedName":"@happyvertical/smrt-tenancy:BillingRelationshipCollection","collection":"billingrelationships","filePath":"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts","packageName":"@happyvertical/smrt-tenancy","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_billing_relationships","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"BillingRelationship","exportName":"BillingRelationshipCollection","collectionExportName":"BillingRelationshipCollectionCollection","schema":{"tableName":"_smrt_billing_relationships","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_billing_relationships\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"child_tenant_id\\" UUID NOT NULL,\\n \\"reseller_tenant_id\\" UUID NOT NULL,\\n \\"billing_owner_mode\\" TEXT DEFAULT 'self'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"child_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reseller_tenant_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"billing_owner_mode":{"type":"TEXT","notNull":false,"unique":false,"default":"self"}},"indexes":[{"name":"_smrt_billing_relationships_child_tenant_id_idx","columns":["child_tenant_id"],"unique":true},{"name":"_smrt_billing_relationships_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_billing_relationships_created_at_idx","columns":["created_at"]},{"name":"_smrt_billing_relationships_reseller_tenant_id_idx","columns":["reseller_tenant_id"]}],"version":"4d7f410a"},"importPath":"@happyvertical/smrt-tenancy"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core"],"browser":{"status":"server-only","issues":["#3624"],"reason":"node:async_hooks"},"stampsConstructors":true}`));
270
270
  var __defProp$2 = Object.defineProperty;
271
271
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
272
272
  var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
@@ -381,7 +381,7 @@ var __exportAll = (all, no_symbols) => {
381
381
  if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" });
382
382
  return target;
383
383
  };
384
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.55.17","objects":{"@happyvertical/smrt-prompts:PromptOverrideCollection":{"name":"promptoverridecollection","className":"PromptOverrideCollection","qualifiedName":"@happyvertical/smrt-prompts:PromptOverrideCollection","collection":"promptoverrides","filePath":"/home/runner/work/smrt/smrt/packages/prompts/src/collections/PromptOverrideCollection.ts","packageName":"@happyvertical/smrt-prompts","fields":{},"methods":{"getAppOverride":{"name":"getAppOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"getTenantOverride":{"name":"getTenantOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"tenantId","type":"string","optional":false},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"getResolutionLayers":{"name":"getResolutionLayers","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"tenantId","type":"string | null","optional":true,"unionBranches":[{"type":"string"},{"type":"null"}]},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<object>","isStatic":false,"isPublic":true},"getOverrideMapForKeys":{"name":"getOverrideMapForKeys","async":true,"parameters":[{"name":"keys","type":"string[]","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<Map<string, PromptOverride>>","isStatic":false,"isPublic":true},"findByScope":{"name":"findByScope","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"setTemplateOverride":{"name":"setTemplateOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false},{"name":"template","type":"string | null","optional":false,"unionBranches":[{"type":"string"},{"type":"null"}]}],"returnType":"Promise<PromptOverride>","isStatic":false,"isPublic":true},"removeOverride":{"name":"removeOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<boolean>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_prompt_overrides","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"PromptOverride","exportName":"PromptOverrideCollection","collectionExportName":"PromptOverrideCollectionCollection","schema":{"tableName":"_smrt_prompt_overrides","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_prompt_overrides\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"key\\" TEXT NOT NULL DEFAULT '',\\n \\"tenant_id\\" UUID,\\n \\"template\\" TEXT,\\n \\"profile\\" TEXT,\\n \\"model\\" TEXT,\\n \\"params\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"tenant_id":{"type":"UUID","notNull":false,"unique":false},"template":{"type":"TEXT","notNull":false,"unique":false},"profile":{"type":"TEXT","notNull":false,"unique":false},"model":{"type":"TEXT","notNull":false,"unique":false},"params":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_prompt_overrides_key_context_idx","columns":["key","context"],"unique":true},{"name":"_smrt_prompt_overrides_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_prompt_overrides_created_at_idx","columns":["created_at"]}],"version":"38f505e7"},"importPath":"@happyvertical/smrt-prompts"},"@happyvertical/smrt-prompts:PromptOverride":{"name":"promptoverride","className":"PromptOverride","qualifiedName":"@happyvertical/smrt-prompts:PromptOverride","collection":"promptoverrides","filePath":"/home/runner/work/smrt/smrt/packages/prompts/src/models/PromptOverride.ts","packageName":"@happyvertical/smrt-prompts","fields":{"key":{"type":"text","required":true,"default":"","_meta":{"required":true}},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true}},"template":{"type":"text","required":false,"_meta":{"nullable":true}},"profile":{"type":"text","required":false,"_meta":{"nullable":true}},"model":{"type":"text","required":false,"_meta":{"nullable":true}},"params":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"getParams":{"name":"getParams","async":false,"parameters":[],"returnType":"PromptParams","isStatic":false,"isPublic":true},"setParams":{"name":"setParams","async":false,"parameters":[{"name":"params","type":"PromptParams | null","optional":false,"unionBranches":[{"type":"PromptParams"},{"type":"null"}]}],"returnType":"void","isStatic":false,"isPublic":true},"toPromptLayer":{"name":"toPromptLayer","async":false,"parameters":[],"returnType":"PromptLayer","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_prompt_overrides","conflictColumns":["key","context"],"api":false,"cli":false,"mcp":false},"extends":"SmrtObject","exportName":"PromptOverride","collectionExportName":"PromptOverrideCollection","validationRules":[{"field":"key","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_prompt_overrides","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_prompt_overrides\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"key\\" TEXT NOT NULL DEFAULT '',\\n \\"tenant_id\\" UUID,\\n \\"template\\" TEXT,\\n \\"profile\\" TEXT,\\n \\"model\\" TEXT,\\n \\"params\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"tenant_id":{"type":"UUID","notNull":false,"unique":false},"template":{"type":"TEXT","notNull":false,"unique":false},"profile":{"type":"TEXT","notNull":false,"unique":false},"model":{"type":"TEXT","notNull":false,"unique":false},"params":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_prompt_overrides_key_context_idx","columns":["key","context"],"unique":true},{"name":"_smrt_prompt_overrides_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_prompt_overrides_created_at_idx","columns":["created_at"]}],"version":"38f505e7"},"importPath":"@happyvertical/smrt-prompts"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3624"],"via":["@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
384
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.55.19","objects":{"@happyvertical/smrt-prompts:PromptOverrideCollection":{"name":"promptoverridecollection","className":"PromptOverrideCollection","qualifiedName":"@happyvertical/smrt-prompts:PromptOverrideCollection","collection":"promptoverrides","filePath":"/home/runner/work/smrt/smrt/packages/prompts/src/collections/PromptOverrideCollection.ts","packageName":"@happyvertical/smrt-prompts","fields":{},"methods":{"getAppOverride":{"name":"getAppOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"getTenantOverride":{"name":"getTenantOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"tenantId","type":"string","optional":false},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"getResolutionLayers":{"name":"getResolutionLayers","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"tenantId","type":"string | null","optional":true,"unionBranches":[{"type":"string"},{"type":"null"}]},{"name":"options","type":"object","optional":true,"memberTypes":["string"]}],"returnType":"Promise<object>","isStatic":false,"isPublic":true},"getOverrideMapForKeys":{"name":"getOverrideMapForKeys","async":true,"parameters":[{"name":"keys","type":"string[]","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<Map<string, PromptOverride>>","isStatic":false,"isPublic":true},"findByScope":{"name":"findByScope","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<PromptOverride | null>","isStatic":false,"isPublic":true},"setTemplateOverride":{"name":"setTemplateOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false},{"name":"template","type":"string | null","optional":false,"unionBranches":[{"type":"string"},{"type":"null"}]}],"returnType":"Promise<PromptOverride>","isStatic":false,"isPublic":true},"removeOverride":{"name":"removeOverride","async":true,"parameters":[{"name":"key","type":"string","optional":false},{"name":"scopeType","type":"PromptOverrideScopeType","optional":false},{"name":"scopeId","type":"string","optional":false}],"returnType":"Promise<boolean>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_prompt_overrides","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"PromptOverride","exportName":"PromptOverrideCollection","collectionExportName":"PromptOverrideCollectionCollection","schema":{"tableName":"_smrt_prompt_overrides","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_prompt_overrides\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"key\\" TEXT NOT NULL DEFAULT '',\\n \\"tenant_id\\" UUID,\\n \\"template\\" TEXT,\\n \\"profile\\" TEXT,\\n \\"model\\" TEXT,\\n \\"params\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"tenant_id":{"type":"UUID","notNull":false,"unique":false},"template":{"type":"TEXT","notNull":false,"unique":false},"profile":{"type":"TEXT","notNull":false,"unique":false},"model":{"type":"TEXT","notNull":false,"unique":false},"params":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_prompt_overrides_key_context_idx","columns":["key","context"],"unique":true},{"name":"_smrt_prompt_overrides_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_prompt_overrides_created_at_idx","columns":["created_at"]}],"version":"38f505e7"},"importPath":"@happyvertical/smrt-prompts"},"@happyvertical/smrt-prompts:PromptOverride":{"name":"promptoverride","className":"PromptOverride","qualifiedName":"@happyvertical/smrt-prompts:PromptOverride","collection":"promptoverrides","filePath":"/home/runner/work/smrt/smrt/packages/prompts/src/models/PromptOverride.ts","packageName":"@happyvertical/smrt-prompts","fields":{"key":{"type":"text","required":true,"default":"","_meta":{"required":true}},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true}},"template":{"type":"text","required":false,"_meta":{"nullable":true}},"profile":{"type":"text","required":false,"_meta":{"nullable":true}},"model":{"type":"text","required":false,"_meta":{"nullable":true}},"params":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"getParams":{"name":"getParams","async":false,"parameters":[],"returnType":"PromptParams","isStatic":false,"isPublic":true},"setParams":{"name":"setParams","async":false,"parameters":[{"name":"params","type":"PromptParams | null","optional":false,"unionBranches":[{"type":"PromptParams"},{"type":"null"}]}],"returnType":"void","isStatic":false,"isPublic":true},"toPromptLayer":{"name":"toPromptLayer","async":false,"parameters":[],"returnType":"PromptLayer","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_prompt_overrides","conflictColumns":["key","context"],"api":false,"cli":false,"mcp":false},"extends":"SmrtObject","exportName":"PromptOverride","collectionExportName":"PromptOverrideCollection","validationRules":[{"field":"key","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_prompt_overrides","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_prompt_overrides\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"key\\" TEXT NOT NULL DEFAULT '',\\n \\"tenant_id\\" UUID,\\n \\"template\\" TEXT,\\n \\"profile\\" TEXT,\\n \\"model\\" TEXT,\\n \\"params\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"tenant_id":{"type":"UUID","notNull":false,"unique":false},"template":{"type":"TEXT","notNull":false,"unique":false},"profile":{"type":"TEXT","notNull":false,"unique":false},"model":{"type":"TEXT","notNull":false,"unique":false},"params":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_prompt_overrides_key_context_idx","columns":["key","context"],"unique":true},{"name":"_smrt_prompt_overrides_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_prompt_overrides_created_at_idx","columns":["created_at"]}],"version":"38f505e7"},"importPath":"@happyvertical/smrt-prompts"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3624"],"via":["@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
385
385
  var PROMPT_CACHE_TTL_MS = 3e4;
386
386
  var promptCache = /* @__PURE__ */ new Map();
387
387
  var cacheGenerations = /* @__PURE__ */ new Map();
package/dist/index.js CHANGED
@@ -51,77 +51,77 @@ var _cookbookCommands = null;
51
51
  var _kitchenCommands = null;
52
52
  async function getGnodeCommands() {
53
53
  if (!_gnodeCommands) {
54
- const { gnodeCommands } = await import("./commands-Cve0qfxc.js");
54
+ const { gnodeCommands } = await import("./commands-DECEmNZO.js");
55
55
  _gnodeCommands = gnodeCommands;
56
56
  }
57
57
  return _gnodeCommands;
58
58
  }
59
59
  async function getGitCommands() {
60
60
  if (!_gitCommands) {
61
- const { gitCommands } = await import("./commands-Cve0qfxc.js");
61
+ const { gitCommands } = await import("./commands-DECEmNZO.js");
62
62
  _gitCommands = gitCommands;
63
63
  }
64
64
  return _gitCommands;
65
65
  }
66
66
  async function getGenerateCommands() {
67
67
  if (!_generateCommands) {
68
- const { generateCommands } = await import("./commands-Cve0qfxc.js");
68
+ const { generateCommands } = await import("./commands-DECEmNZO.js");
69
69
  _generateCommands = generateCommands;
70
70
  }
71
71
  return _generateCommands;
72
72
  }
73
73
  async function getInitCommands() {
74
74
  if (!_initCommands) {
75
- const { initCommands } = await import("./commands-Cve0qfxc.js");
75
+ const { initCommands } = await import("./commands-DECEmNZO.js");
76
76
  _initCommands = initCommands;
77
77
  }
78
78
  return _initCommands;
79
79
  }
80
80
  async function getUtilityCommands() {
81
81
  if (!_utilityCommands) {
82
- const { utilityCommands } = await import("./commands-Cve0qfxc.js");
82
+ const { utilityCommands } = await import("./commands-DECEmNZO.js");
83
83
  _utilityCommands = utilityCommands;
84
84
  }
85
85
  return _utilityCommands;
86
86
  }
87
87
  async function getDispatchCommands() {
88
88
  if (!_dispatchCommands) {
89
- const { dispatchCommands } = await import("./commands-Cve0qfxc.js");
89
+ const { dispatchCommands } = await import("./commands-DECEmNZO.js");
90
90
  _dispatchCommands = dispatchCommands;
91
91
  }
92
92
  return _dispatchCommands;
93
93
  }
94
94
  async function getDocsCommands() {
95
95
  if (!_docsCommands) {
96
- const { docsCommands } = await import("./commands-Cve0qfxc.js");
96
+ const { docsCommands } = await import("./commands-DECEmNZO.js");
97
97
  _docsCommands = docsCommands;
98
98
  }
99
99
  return _docsCommands;
100
100
  }
101
101
  async function getPlaygroundCommands() {
102
102
  if (!_playgroundCommands) {
103
- const { playgroundCommands } = await import("./commands-Cve0qfxc.js");
103
+ const { playgroundCommands } = await import("./commands-DECEmNZO.js");
104
104
  _playgroundCommands = playgroundCommands;
105
105
  }
106
106
  return _playgroundCommands;
107
107
  }
108
108
  async function getCookbookCommands() {
109
109
  if (!_cookbookCommands) {
110
- const { cookbookCommands } = await import("./commands-Cve0qfxc.js");
110
+ const { cookbookCommands } = await import("./commands-DECEmNZO.js");
111
111
  _cookbookCommands = cookbookCommands;
112
112
  }
113
113
  return _cookbookCommands;
114
114
  }
115
115
  async function getKitchenCommands() {
116
116
  if (!_kitchenCommands) {
117
- const { kitchenCommands } = await import("./commands-Cve0qfxc.js");
117
+ const { kitchenCommands } = await import("./commands-DECEmNZO.js");
118
118
  _kitchenCommands = kitchenCommands;
119
119
  }
120
120
  return _kitchenCommands;
121
121
  }
122
122
  async function getWorkbenchCommands() {
123
123
  if (!_workbenchCommands) {
124
- const { workbenchCommands } = await import("./commands-Cve0qfxc.js");
124
+ const { workbenchCommands } = await import("./commands-DECEmNZO.js");
125
125
  _workbenchCommands = workbenchCommands;
126
126
  }
127
127
  return _workbenchCommands;
@@ -1607,7 +1607,7 @@ var CLIGenerator = class {
1607
1607
  async function main() {
1608
1608
  const args = process.argv.slice(2);
1609
1609
  if (args[0] === "app") {
1610
- const { runAppCommand } = await import("./cli-FDpY0gCt.js").then((n) => n.r);
1610
+ const { runAppCommand } = await import("./cli-Cgj-996T.js").then((n) => n.r);
1611
1611
  process.exitCode = await runAppCommand(args.slice(1));
1612
1612
  return;
1613
1613
  }
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
3
- import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-hzB0lrxA.js";
4
- import { a as ProfileCollection, f as saveOidcRaceArbiter, i as Profile } from "./ProfileCollection-C4INKh7Y-DUcvwlG4.js";
5
- import { t as ProfileTypeCollection } from "./ProfileTypeCollection-B7kwi1mU-tffgStmE.js";
3
+ import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-7b_UC2ND.js";
4
+ import { a as ProfileCollection, f as saveOidcRaceArbiter, i as Profile } from "./ProfileCollection-C4INKh7Y-j9kXNQ27.js";
5
+ import { t as ProfileTypeCollection } from "./ProfileTypeCollection-B7kwi1mU-C-XBj2lo.js";
6
6
  import { smrt } from "@happyvertical/smrt-core";
7
7
  //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-DNP9EZlU.js
8
8
  var oidcProvisioningPrimitives_DNP9EZlU_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { A as assertExternalArtifactPath, L as errorCode } from "./cli-FDpY0gCt.js";
2
+ import { A as assertExternalArtifactPath, L as errorCode } from "./cli-Cgj-996T.js";
3
3
  import { closeSync, constants, existsSync, fstatSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, writeFileSync } from "node:fs";
4
4
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -536,6 +536,7 @@ var portability_exports = /* @__PURE__ */ __exportAll({
536
536
  executeImportPlan: () => executeImportPlan,
537
537
  exportApplication: () => exportApplication,
538
538
  importApplication: () => importApplication,
539
+ importParameter: () => importParameter,
539
540
  importedRowsMatchBundle: () => importedRowsMatchBundle,
540
541
  manifestTables: () => manifestTables,
541
542
  planImportTables: () => planImportTables,
@@ -700,8 +701,30 @@ async function exportApplication(context) {
700
701
  assetCount: exportedBundle.assets.entries.length
701
702
  };
702
703
  }
704
+ /**
705
+ * The bind parameter for one exported value.
706
+ *
707
+ * A JSON column is exported as the driver read it: node-postgres parses
708
+ * json/jsonb into JavaScript values, SQLite returns the stored JSON text. A
709
+ * raw parameterized query carries no column type, so binding a parsed value
710
+ * unchanged lets node-postgres send a JavaScript array as a PostgreSQL array
711
+ * literal (`["x"]` becomes `{"x"}`, rejected with 22P02; `[]` becomes `{}`,
712
+ * silently an object) and a JSON string scalar as bare text (22P02). The
713
+ * manifest knows the column type, so JSON columns bind as JSON text:
714
+ * re-encoded when the bundle holds parsed values, passed through when it
715
+ * already holds text. NULL and every other column bind unchanged, so a real
716
+ * PostgreSQL array column still binds as an array.
717
+ */
718
+ function importParameter(columnDefinition, value, options = {}) {
719
+ if (value === null || value === void 0) return value;
720
+ const type = columnDefinition?.type?.toUpperCase();
721
+ if (type !== "JSON" && type !== "JSONB") return value;
722
+ if (options.jsonText && typeof value === "string") return value;
723
+ return JSON.stringify(value);
724
+ }
703
725
  /** Execute a prevalidated parent-first import against one database transaction. */
704
- async function executeImportPlan(tx, plan, exportedByName) {
726
+ async function executeImportPlan(tx, plan, exportedByName, options = {}) {
727
+ const parameter = (table, column, value) => importParameter(table.columnDefinitions[column], value, options);
705
728
  const deferredUpdates = [];
706
729
  let rowCount = 0;
707
730
  for (const table of plan) {
@@ -710,7 +733,7 @@ async function executeImportPlan(tx, plan, exportedByName) {
710
733
  if (Number(count.rows[0]?.count || 0) !== 0) throw new Error(`Import target table ${table.name} is not empty.`);
711
734
  for (const row of exported.rows) {
712
735
  const columns = Object.keys(row);
713
- await tx.query(`INSERT INTO ${quoteIdentifier(table.name)} (${columns.map(quoteIdentifier).join(", ")}) VALUES (${columns.map(() => "?").join(", ")})`, ...columns.map((column) => table.deferredColumns.has(column) ? null : row[column]));
736
+ await tx.query(`INSERT INTO ${quoteIdentifier(table.name)} (${columns.map(quoteIdentifier).join(", ")}) VALUES (${columns.map(() => "?").join(", ")})`, ...columns.map((column) => table.deferredColumns.has(column) ? null : parameter(table, column, row[column])));
714
737
  for (const column of table.deferredColumns) if (row[column] != null) deferredUpdates.push({
715
738
  table,
716
739
  column,
@@ -721,7 +744,7 @@ async function executeImportPlan(tx, plan, exportedByName) {
721
744
  rowCount += 1;
722
745
  }
723
746
  }
724
- for (const update of deferredUpdates) await tx.query(`UPDATE ${quoteIdentifier(update.table.name)} SET ${quoteIdentifier(update.column)} = ? WHERE ${quoteIdentifier(update.primaryKey)} = ?`, update.value, update.primaryValue);
747
+ for (const update of deferredUpdates) await tx.query(`UPDATE ${quoteIdentifier(update.table.name)} SET ${quoteIdentifier(update.column)} = ? WHERE ${quoteIdentifier(update.primaryKey)} = ?`, parameter(update.table, update.column, update.value), update.primaryValue);
725
748
  return rowCount;
726
749
  }
727
750
  async function inspectImportTarget(db, plan, exportedByName) {
@@ -830,7 +853,7 @@ async function importApplication(context) {
830
853
  await db.transaction(async (tx) => {
831
854
  publishFilesystemAssets(staged);
832
855
  await context.onImportPhase?.("assets-published");
833
- rowCount = await executeImportPlan(tx, plan, exportedByName);
856
+ rowCount = await executeImportPlan(tx, plan, exportedByName, { jsonText: bundle.profile === "local" });
834
857
  await context.onImportPhase?.("database-staged");
835
858
  verifyPublishedFilesystemAssets(staged);
836
859
  });
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { u as withSystemContext } from "./dist-C_pNF2sM.js";
2
+ import { u as withSystemContext } from "./dist-C_8Edimn.js";
3
3
  import { n as __exportAll$1, t as NostrIdentity, u as verifyAuthEvent } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
4
4
  import { t as ApiKey } from "./ApiKey-CVmlf3V6-BAeHuH48.js";
5
- import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-hzB0lrxA.js";
6
- import { c as coordinateOidcProvisioning, l as isOidcProvisioningRaceConflict, u as normalizeIdentityEmail } from "./ProfileCollection-C4INKh7Y-DUcvwlG4.js";
7
- import { a as insertOidcProvisioningIdentity, i as createOidcProvisioningPerson } from "./oidcProvisioningPrimitives-DNP9EZlU-B5DmitVf.js";
5
+ import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-7b_UC2ND.js";
6
+ import { c as coordinateOidcProvisioning, l as isOidcProvisioningRaceConflict, u as normalizeIdentityEmail } from "./ProfileCollection-C4INKh7Y-j9kXNQ27.js";
7
+ import { a as insertOidcProvisioningIdentity, i as createOidcProvisioningPerson } from "./oidcProvisioningPrimitives-DNP9EZlU-ZOiVGqhG.js";
8
8
  import { resolveDatabase } from "@happyvertical/smrt-core";
9
9
  //#region ../profiles/dist/chunks/resolveIdentity-CkyqvctR.js
10
10
  var resolveIdentity_CkyqvctR_exports = /* @__PURE__ */ __exportAll({
@@ -72,13 +72,13 @@ async function resolveIdentity(context) {
72
72
  };
73
73
  }
74
74
  async function findProfileByExternalId(provider, externalId, options) {
75
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-D7aAvcYW.js").then((n) => n.r).then((n) => n.r);
75
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-1rB63uyR.js").then((n) => n.r).then((n) => n.r);
76
76
  const identities = await (await OidcIdentityCollection.create(options)).findByProvider(provider);
77
77
  for (const identity of identities) if (identity.subject === externalId || identity.email?.includes(externalId)) {
78
78
  const profile = await identity.getProfile();
79
79
  if (profile) return profile;
80
80
  }
81
- const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-DUcvwlG4.js").then((n) => n.o).then((n) => n.r);
81
+ const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-j9kXNQ27.js").then((n) => n.o).then((n) => n.r);
82
82
  const profiles = await (await ProfileCollection.create(options)).list({
83
83
  where: { email: `${externalId}@users.noreply.github.com` },
84
84
  limit: 1
@@ -99,7 +99,7 @@ async function reuseExistingOidcIdentityForProfile(profileId, claims, provider,
99
99
  createConcurrencyError: (cause) => new Error("Concurrent exact OIDC identity reuse did not converge.", cause === void 0 ? void 0 : { cause }),
100
100
  rebindRootResult: rebindOidcProfileResult,
101
101
  provision: (tx) => withSystemContext(async () => {
102
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-D7aAvcYW.js").then((n) => n.r).then((n) => n.r);
102
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-1rB63uyR.js").then((n) => n.r).then((n) => n.r);
103
103
  const identity = await (await OidcIdentityCollection.create({ db: tx })).findBySubject(normalizedClaims.iss, normalizedClaims.sub);
104
104
  if (!identity) throw new Error("OidcIdentity.findOrCreate() no longer creates authentication links; use UserCollection.getOrCreateFromOidc() or createProfileFromOidc().");
105
105
  if (identity.profileId !== profileId) throw new Error(`OIDC identity ${normalizedClaims.iss} subject ${normalizedClaims.sub} belongs to a different Profile.`);
@@ -133,7 +133,7 @@ async function coordinateProfileOidcProvisioning(claims, provider, options) {
133
133
  });
134
134
  }
135
135
  async function provisionOidcProfile(claims, provider, options) {
136
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-D7aAvcYW.js").then((n) => n.r).then((n) => n.r);
136
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-1rB63uyR.js").then((n) => n.r).then((n) => n.r);
137
137
  const existingIdentity = await (await OidcIdentityCollection.create(options)).findBySubject(claims.iss, claims.sub);
138
138
  if (existingIdentity) {
139
139
  const profile2 = await existingIdentity.getProfile();
@@ -148,7 +148,7 @@ async function provisionOidcProfile(claims, provider, options) {
148
148
  created: false
149
149
  };
150
150
  }
151
- const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-DUcvwlG4.js").then((n) => n.o).then((n) => n.r);
151
+ const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-j9kXNQ27.js").then((n) => n.o).then((n) => n.r);
152
152
  const profileCollection = await ProfileCollection.create(options);
153
153
  if (claims.email) {
154
154
  if (await profileCollection.findUniqueGlobalPersonByEmail(claims.email)) {
@@ -175,8 +175,8 @@ async function provisionOidcProfile(claims, provider, options) {
175
175
  };
176
176
  }
177
177
  async function rebindOidcProfileResult(result, rootDb) {
178
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-D7aAvcYW.js").then((n) => n.r).then((n) => n.r);
179
- const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-DUcvwlG4.js").then((n) => n.o).then((n) => n.r);
178
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-1rB63uyR.js").then((n) => n.r).then((n) => n.r);
179
+ const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-j9kXNQ27.js").then((n) => n.o).then((n) => n.r);
180
180
  const profileId = requireOidcProfileId(result.profile.id);
181
181
  const identityId = requireOidcProfileId(result.oidcIdentity.id);
182
182
  const [profile, oidcIdentity] = await withSystemContext(async () => {
@@ -225,11 +225,11 @@ async function createProfileFromNostr(email, nostrData, options) {
225
225
  created: false
226
226
  };
227
227
  }
228
- const { Person } = await import("./oidcProvisioningPrimitives-DNP9EZlU-B5DmitVf.js").then((n) => n.o).then((n) => n.o);
229
- const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7kwi1mU-tffgStmE.js").then((n) => n.n).then((n) => n.n);
228
+ const { Person } = await import("./oidcProvisioningPrimitives-DNP9EZlU-ZOiVGqhG.js").then((n) => n.o).then((n) => n.o);
229
+ const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7kwi1mU-C-XBj2lo.js").then((n) => n.n).then((n) => n.n);
230
230
  let personType = await (await ProfileTypeCollection.create(options)).getBySlug("person");
231
231
  if (!personType) {
232
- const { ProfileType } = await import("./ProfileCollection-C4INKh7Y-DUcvwlG4.js").then((n) => n.o).then((n) => n.h);
232
+ const { ProfileType } = await import("./ProfileCollection-C4INKh7Y-j9kXNQ27.js").then((n) => n.o).then((n) => n.h);
233
233
  personType = new ProfileType({
234
234
  ...options,
235
235
  slug: "person",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-cli",
3
- "version": "0.55.17",
3
+ "version": "0.55.19",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,20 +30,20 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@happyvertical/ai": "^0.103.4",
34
- "@happyvertical/files": "^0.103.4",
35
- "@happyvertical/logger": "^0.103.4",
36
- "@happyvertical/smrt-agents": "0.55.17",
37
- "@happyvertical/smrt-app-runtime": "0.55.17",
38
- "@happyvertical/smrt-config": "0.55.17",
39
- "@happyvertical/smrt-core": "0.55.17",
40
- "@happyvertical/smrt-dev-mcp": "0.55.17",
41
- "@happyvertical/smrt-ledgers": "0.55.17",
42
- "@happyvertical/smrt-playground": "0.55.17",
43
- "@happyvertical/smrt-types": "0.55.17",
44
- "@happyvertical/smrt-users": "0.55.17",
45
- "@happyvertical/sql": "^0.103.4",
46
- "@happyvertical/utils": "^0.103.4",
33
+ "@happyvertical/ai": "^0.103.5",
34
+ "@happyvertical/files": "^0.103.5",
35
+ "@happyvertical/logger": "^0.103.5",
36
+ "@happyvertical/smrt-agents": "0.55.19",
37
+ "@happyvertical/smrt-app-runtime": "0.55.19",
38
+ "@happyvertical/smrt-config": "0.55.19",
39
+ "@happyvertical/smrt-core": "0.55.19",
40
+ "@happyvertical/smrt-dev-mcp": "0.55.19",
41
+ "@happyvertical/smrt-ledgers": "0.55.19",
42
+ "@happyvertical/smrt-playground": "0.55.19",
43
+ "@happyvertical/smrt-types": "0.55.19",
44
+ "@happyvertical/smrt-users": "0.55.19",
45
+ "@happyvertical/sql": "^0.103.5",
46
+ "@happyvertical/utils": "^0.103.5",
47
47
  "@modelcontextprotocol/server": "2.0.0",
48
48
  "acorn": "^8.18.0",
49
49
  "fast-glob": "3.3.3",
@@ -83,7 +83,7 @@
83
83
  "clean": "rm -rf dist",
84
84
  "dev": "npm run build:watch",
85
85
  "test": "vitest run",
86
- "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run --no-file-parallelism src/commands/__tests__/db-migrate-uuid.test.ts src/commands/__tests__/db-migrate-force-postgres.test.ts src/commands/__tests__/sti-upgrade.test.ts src/commands/__tests__/db-migrate-partial-apply-postgres.test.ts src/commands/__tests__/db-migrate-concurrent-postgres.test.ts",
86
+ "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run --no-file-parallelism src/commands/__tests__/db-migrate-uuid.test.ts src/commands/__tests__/db-migrate-force-postgres.test.ts src/commands/__tests__/sti-upgrade.test.ts src/commands/__tests__/db-migrate-partial-apply-postgres.test.ts src/commands/__tests__/db-migrate-concurrent-postgres.test.ts src/app/__tests__/portability-json-postgres.test.ts",
87
87
  "test:watch": "vitest",
88
88
  "typecheck": "tsc -p tsconfig.typecheck.json && tsc -p tsconfig.test.json",
89
89
  "cli": "tsx src/index.ts"
@@ -1,21 +0,0 @@
1
- import "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
2
- import "./ApiKey-CVmlf3V6-BAeHuH48.js";
3
- import "./ApiKeyCollection-CiiDNFdD-CMGF3_ul.js";
4
- import "./AuditLogCollection-WDHL-_AF-02D9mDot.js";
5
- import "./NostrIdentityCollection-CctlECpX-fkAPnK02.js";
6
- import "./OidcIdentity-BUblgQLs-hzB0lrxA.js";
7
- import "./OidcIdentityCollection-ClOyaHeF-D7aAvcYW.js";
8
- import "./ProfileAssetCollection-CRMcjLJ--CRQsOHTZ.js";
9
- import { a as ProfileCollection } from "./ProfileCollection-C4INKh7Y-DUcvwlG4.js";
10
- import "./ProfileLinkCollection-DFfZRsgv-4ulMzaJO.js";
11
- import "./ProfileMetadataCollection-BIYKy4Y3-BGVdmb-k.js";
12
- import "./ProfileMetafieldCollection-Buz7gzag-Cuuzb-Yt.js";
13
- import "./ProfileRelationshipCollection-C4g_QLI4-DHnLSOex.js";
14
- import "./ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js";
15
- import "./ProfileRelationshipType-U7IwF6Wf-DNavf24e.js";
16
- import "./ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js";
17
- import "./ProfileTypeCollection-B7kwi1mU-tffgStmE.js";
18
- import "./oidcProvisioningPrimitives-DNP9EZlU-B5DmitVf.js";
19
- import "./resolveIdentity-CkyqvctR-BDafA2yA.js";
20
- import "./dist-BQ5ZrH9U.js";
21
- export { ProfileCollection };