@happyvertical/smrt-cli 0.57.39 → 0.57.41

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 (21) hide show
  1. package/dist/{AuditLogCollection-BBbvr8Qc-C0y3dejr.js → AuditLogCollection-BBbvr8Qc-CuvEowIa.js} +1 -1
  2. package/dist/{OidcIdentity-COeMidoC-RnoC3a6R.js → OidcIdentity-COeMidoC-DpNvqvDo.js} +2 -2
  3. package/dist/{OidcIdentityCollection-D4DIZv0K-glNIGyfG.js → OidcIdentityCollection-D4DIZv0K-CMEKfXye.js} +1 -1
  4. package/dist/{PasswordCredentialService-bedKxkaa-5sB-LtBc.js → PasswordCredentialService-bedKxkaa-B4k-9WAI.js} +14 -14
  5. package/dist/{ProfileAssetCollection-D5-tG9Mm-BJq4XZnr.js → ProfileAssetCollection-D5-tG9Mm-CpuwZydv.js} +3 -3
  6. package/dist/{ProfileCollection-CmRaiE9U-Bz_8He8o.js → ProfileCollection-CmRaiE9U-C5WUI78v.js} +17 -17
  7. package/dist/{ProfileLinkCollection-pvPTsysg-LvwctzB0.js → ProfileLinkCollection-pvPTsysg-BgEQvIMy.js} +2 -2
  8. package/dist/{ProfileMetadataCollection-CAgJyjze-CbztbUOv.js → ProfileMetadataCollection-CAgJyjze-BRDRgWj7.js} +1 -1
  9. package/dist/{ProfileMetafieldCollection-19ae6Lpf-C9ITFrCB.js → ProfileMetafieldCollection-19ae6Lpf-C7B4KtkU.js} +1 -1
  10. package/dist/{ProfileRelationshipCollection-BFSlTQ7J-Cn6YYLsS.js → ProfileRelationshipCollection-BFSlTQ7J-BJmMDOOI.js} +1 -1
  11. package/dist/{ProfileTypeCollection-BRLK8cHS-DYTDj03n.js → ProfileTypeCollection-BRLK8cHS-DDUR99wj.js} +2 -2
  12. package/dist/{commands-CX6k0tWj.js → commands-DC2leh-J.js} +3 -3
  13. package/dist/{dist-BUqQudaA.js → dist-B8iChmye.js} +2 -2
  14. package/dist/{dist-BlKhaiPX.js → dist-BeDFPuCM.js} +3 -3
  15. package/dist/{dist-D4feFBqw.js → dist-C8aQWIrN.js} +5 -5
  16. package/dist/{dist-DZViwHbI.js → dist-Dwn3CpMv.js} +4 -4
  17. package/dist/index.js +11 -11
  18. package/dist/{oidcProvisioningPrimitives-KpIiLmG4-4hAwGsZT.js → oidcProvisioningPrimitives-KpIiLmG4-DRvoHd-i.js} +3 -3
  19. package/dist/{operator-BhTvp0Ap.js → operator-B4P03aQt.js} +2 -2
  20. package/dist/{resolveIdentity-j2WFuKDT-CUKGgK2U.js → resolveIdentity-j2WFuKDT-C0D4Gkdp.js} +14 -14
  21. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as tenantId, r as TenantScoped } from "./dist-BUqQudaA.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
- import { a as getOwnedAssetsFromCollection, o as removeOwnedAssetFromCollection, t as addOwnedAssetFromCollection } from "./dist-BlKhaiPX.js";
4
+ import { a as getOwnedAssetsFromCollection, o as removeOwnedAssetFromCollection, t as addOwnedAssetFromCollection } from "./dist-BeDFPuCM.js";
5
5
  import { SmrtJunction, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
6
6
  //#region ../profiles/dist/chunks/ProfileAssetCollection-D5-tG9Mm.js
7
7
  var ProfileAssetCollection_D5_tG9Mm_exports = /* @__PURE__ */ __exportAll({
@@ -84,7 +84,7 @@ var ProfileAssetCollection = class extends SmrtJunction {
84
84
  profileCollectionPromise = null;
85
85
  async getProfileCollection() {
86
86
  if (!this.profileCollectionPromise) {
87
- const { ProfileCollection } = await import("./ProfileCollection-CmRaiE9U-Bz_8He8o.js").then((n) => n.r).then((n) => n.r);
87
+ const { ProfileCollection } = await import("./ProfileCollection-CmRaiE9U-C5WUI78v.js").then((n) => n.r).then((n) => n.r);
88
88
  this.profileCollectionPromise = ProfileCollection.create({ db: this.db });
89
89
  }
90
90
  return this.profileCollectionPromise;
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { d as getTenantId, i as tenantId, m as withSystemContext, n as resolvePrompt, o as queryGlobal, r as TenantScoped, s as queryWithGlobals, t as definePrompt } from "./dist-BUqQudaA.js";
2
+ import { d as getTenantId, i as tenantId, m as withSystemContext, n as resolvePrompt, o as queryGlobal, r as TenantScoped, s as queryWithGlobals, t as definePrompt } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
- import { a as getOwnedAssetsFromCollection, i as assertValidOwnedAssetSortOrder, n as assertAssetLinkable, o as removeOwnedAssetFromCollection, r as assertValidOwnedAssetRelationship, s as resolveOwnedAssetsById, t as addOwnedAssetFromCollection } from "./dist-BlKhaiPX.js";
4
+ import { a as getOwnedAssetsFromCollection, i as assertValidOwnedAssetSortOrder, n as assertAssetLinkable, o as removeOwnedAssetFromCollection, r as assertValidOwnedAssetRelationship, s as resolveOwnedAssetsById, t as addOwnedAssetFromCollection } from "./dist-BeDFPuCM.js";
5
5
  import { RuntimeError, SmrtCollection, SmrtObject, ValidationError, field, foreignKey, isAbortedTransactionError, oneToMany, smrt } from "@happyvertical/smrt-core";
6
6
  import { BackfillTableUnavailableError, BackfillTracker } from "@happyvertical/smrt-core/migrations";
7
7
  //#region ../profiles/dist/chunks/ProfileCollection-CmRaiE9U.js
@@ -435,7 +435,7 @@ var Profile = class extends SmrtObject {
435
435
  async getTypeSlug() {
436
436
  const tenantId2 = this.tenantId || getTenantId();
437
437
  if (this.typeId && tenantId2) {
438
- const { ProfileTypeCollection } = await import("./ProfileTypeCollection-BRLK8cHS-DYTDj03n.js").then((n) => n.n).then((n) => n.n);
438
+ const { ProfileTypeCollection } = await import("./ProfileTypeCollection-BRLK8cHS-DDUR99wj.js").then((n) => n.n).then((n) => n.n);
439
439
  return (await (await ProfileTypeCollection.create(this.options)).getAvailableById(this.typeId, tenantId2))?.slug ?? "";
440
440
  }
441
441
  return (await this.loadRelated("typeId"))?.slug || "";
@@ -458,8 +458,8 @@ var Profile = class extends SmrtObject {
458
458
  * @param value - The value to set
459
459
  */
460
460
  async addMetadata(metafieldSlug, value) {
461
- const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-C9ITFrCB.js").then((n) => n.t).then((n) => n.n);
462
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-CbztbUOv.js").then((n) => n.t).then((n) => n.n);
461
+ const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-C7B4KtkU.js").then((n) => n.t).then((n) => n.n);
462
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-BRDRgWj7.js").then((n) => n.t).then((n) => n.n);
463
463
  const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
464
464
  if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
465
465
  await metafield.validateValue(value);
@@ -492,7 +492,7 @@ var Profile = class extends SmrtObject {
492
492
  * @returns Object with metafield slugs as keys
493
493
  */
494
494
  async getMetadata() {
495
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-CbztbUOv.js").then((n) => n.t).then((n) => n.n);
495
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-BRDRgWj7.js").then((n) => n.t).then((n) => n.n);
496
496
  return await (await ProfileMetadataCollection.create(this.options)).getMetadataObject(this.id);
497
497
  }
498
498
  /**
@@ -509,8 +509,8 @@ var Profile = class extends SmrtObject {
509
509
  * @param metafieldSlug - The slug of the metafield to remove
510
510
  */
511
511
  async removeMetadata(metafieldSlug) {
512
- const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-C9ITFrCB.js").then((n) => n.t).then((n) => n.n);
513
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-CbztbUOv.js").then((n) => n.t).then((n) => n.n);
512
+ const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-19ae6Lpf-C7B4KtkU.js").then((n) => n.t).then((n) => n.n);
513
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-CAgJyjze-BRDRgWj7.js").then((n) => n.t).then((n) => n.n);
514
514
  const metafield = await this.resolveMetafield(await ProfileMetafieldCollection.create(this.options), metafieldSlug);
515
515
  if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
516
516
  const existing = await (await ProfileMetadataCollection.create(this.options)).list({
@@ -535,7 +535,7 @@ var Profile = class extends SmrtObject {
535
535
  return candidates.find((candidate) => ownerTenantId && candidate.tenantId === ownerTenantId) ?? candidates.find((candidate) => !candidate.tenantId) ?? null;
536
536
  }
537
537
  async getProfileLinkCollection() {
538
- const { ProfileLinkCollection } = await import("./ProfileLinkCollection-pvPTsysg-LvwctzB0.js").then((n) => n.t).then((n) => n.r);
538
+ const { ProfileLinkCollection } = await import("./ProfileLinkCollection-pvPTsysg-BgEQvIMy.js").then((n) => n.t).then((n) => n.r);
539
539
  return ProfileLinkCollection.create({ db: this.db });
540
540
  }
541
541
  /** This profile's web links in display order. */
@@ -552,7 +552,7 @@ var Profile = class extends SmrtObject {
552
552
  return (await this.getProfileLinkCollection()).replaceForProfile(this.id, links);
553
553
  }
554
554
  async getProfileAssetCollection() {
555
- const { ProfileAssetCollection } = await import("./ProfileAssetCollection-D5-tG9Mm-BJq4XZnr.js").then((n) => n.t).then((n) => n.n);
555
+ const { ProfileAssetCollection } = await import("./ProfileAssetCollection-D5-tG9Mm-CpuwZydv.js").then((n) => n.t).then((n) => n.n);
556
556
  return ProfileAssetCollection.create({ db: this.db });
557
557
  }
558
558
  async getAssets(relationship) {
@@ -584,7 +584,7 @@ var Profile = class extends SmrtObject {
584
584
  */
585
585
  async addRelationship(toProfile, relationshipSlug, contextProfile) {
586
586
  const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BRBpX00F-D78l9V1y.js").then((n) => n.t).then((n) => n.n);
587
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-Cn6YYLsS.js").then((n) => n.t).then((n) => n.n);
587
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-BJmMDOOI.js").then((n) => n.t).then((n) => n.n);
588
588
  const { ProfileRelationshipType } = await import("./ProfileRelationshipType-Cevy-vaF-G82Gg40q.js").then((n) => n.n).then((n) => n.n);
589
589
  const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
590
590
  if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
@@ -609,7 +609,7 @@ var Profile = class extends SmrtObject {
609
609
  * @returns Array of ProfileRelationship instances
610
610
  */
611
611
  async getRelationships(options) {
612
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-Cn6YYLsS.js").then((n) => n.t).then((n) => n.n);
612
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-BJmMDOOI.js").then((n) => n.t).then((n) => n.n);
613
613
  const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BRBpX00F-D78l9V1y.js").then((n) => n.t).then((n) => n.n);
614
614
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
615
615
  const direction = options?.direction || "all";
@@ -654,7 +654,7 @@ var Profile = class extends SmrtObject {
654
654
  */
655
655
  async removeRelationship(toProfile, relationshipSlug) {
656
656
  const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BRBpX00F-D78l9V1y.js").then((n) => n.t).then((n) => n.n);
657
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-Cn6YYLsS.js").then((n) => n.t).then((n) => n.n);
657
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-BFSlTQ7J-BJmMDOOI.js").then((n) => n.t).then((n) => n.n);
658
658
  const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
659
659
  if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
660
660
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
@@ -778,7 +778,7 @@ var Profile = class extends SmrtObject {
778
778
  * @returns Array of OIDC identity records
779
779
  */
780
780
  async getOidcIdentities() {
781
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-D4DIZv0K-glNIGyfG.js").then((n) => n.r).then((n) => n.r);
781
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-D4DIZv0K-CMEKfXye.js").then((n) => n.r).then((n) => n.r);
782
782
  return await (await OidcIdentityCollection.create(this.options)).findByProfile(this.id);
783
783
  }
784
784
  /**
@@ -791,7 +791,7 @@ var Profile = class extends SmrtObject {
791
791
  * type, but refuses to create or rebind authority.
792
792
  */
793
793
  async linkOidcIdentity(oidcData) {
794
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-D4DIZv0K-glNIGyfG.js").then((n) => n.r).then((n) => n.r);
794
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-D4DIZv0K-CMEKfXye.js").then((n) => n.r).then((n) => n.r);
795
795
  return await (await OidcIdentityCollection.create(this.options)).linkToProfile(this, oidcData);
796
796
  }
797
797
  /**
@@ -820,7 +820,7 @@ var Profile = class extends SmrtObject {
820
820
  * @returns Array of audit log entries
821
821
  */
822
822
  async getAuditLogs(limit = 50) {
823
- const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-C0y3dejr.js").then((n) => n.t).then((n) => n.n);
823
+ const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-CuvEowIa.js").then((n) => n.t).then((n) => n.n);
824
824
  return await (await AuditLogCollection.create(this.options)).getRecentActivity(this.id, limit);
825
825
  }
826
826
  /**
@@ -830,7 +830,7 @@ var Profile = class extends SmrtObject {
830
830
  * @returns The created audit log entry
831
831
  */
832
832
  async recordAction(options) {
833
- const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-C0y3dejr.js").then((n) => n.t).then((n) => n.n);
833
+ const { AuditLogCollection } = await import("./AuditLogCollection-BBbvr8Qc-CuvEowIa.js").then((n) => n.t).then((n) => n.n);
834
834
  return await (await AuditLogCollection.create(this.options)).record({
835
835
  profile: this,
836
836
  ...options
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as tenantId, r as TenantScoped } from "./dist-BUqQudaA.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, field, foreignKey, isEmbeddedDatabase, smrt, withEmbeddedWriteTransaction } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileLinkCollection-pvPTsysg.js
@@ -203,7 +203,7 @@ var ProfileLinkCollection = class ProfileLinkCollection extends SmrtCollection {
203
203
  /** The profile's tenant; throws when the profile is not visible here. */
204
204
  async requireProfileTenant(profileId) {
205
205
  if (!profileId) throw new Error("A profile link needs a profile");
206
- const { ProfileCollection } = await import("./ProfileCollection-CmRaiE9U-Bz_8He8o.js").then((n) => n.r).then((n) => n.r);
206
+ const { ProfileCollection } = await import("./ProfileCollection-CmRaiE9U-C5WUI78v.js").then((n) => n.r).then((n) => n.r);
207
207
  const profile = await (await ProfileCollection.create({ db: this.db })).get({ id: profileId });
208
208
  if (!profile) throw new Error(`Profile '${profileId}' not found`);
209
209
  return profile.tenantId ?? null;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as tenantId, r as TenantScoped } from "./dist-BUqQudaA.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileMetadataCollection-CAgJyjze.js
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as tenantId, r as TenantScoped } from "./dist-BUqQudaA.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileMetafieldCollection-19ae6Lpf.js
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as tenantId, r as TenantScoped } from "./dist-BUqQudaA.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
4
  import { SmrtCollection, SmrtObject, foreignKey, oneToMany, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ProfileRelationshipCollection-BFSlTQ7J.js
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { l as withTenantGlobalRead, p as isSystemContext } from "./dist-BUqQudaA.js";
2
+ import { l as withTenantGlobalRead, p as isSystemContext } from "./dist-B8iChmye.js";
3
3
  import { n as __exportAll$1 } from "./NostrIdentity-RJaATTCt-BbRHWyee.js";
4
- import { i as ProfileType } from "./ProfileCollection-CmRaiE9U-Bz_8He8o.js";
4
+ import { i as ProfileType } from "./ProfileCollection-CmRaiE9U-C5WUI78v.js";
5
5
  import { SmrtCollection } from "@happyvertical/smrt-core";
6
6
  //#region ../profiles/dist/chunks/ProfileTypeCollection-BRLK8cHS.js
7
7
  var ProfileTypeCollection_BRLK8cHS_exports = /* @__PURE__ */ __exportAll({
@@ -8424,7 +8424,7 @@ var dbMaterializeTenantHierarchyCommand = {
8424
8424
  if (!config.database?.url || config.database.url === ":memory:") throw new Error("Database configuration required for db:materialize-tenant-hierarchy. Configure database.url in smrt.config.ts (or DATABASE_URL).");
8425
8425
  const dbType = config.database.type || "sqlite";
8426
8426
  const { getDatabase } = await import("@happyvertical/sql");
8427
- const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-DZViwHbI.js");
8427
+ const { materializeTenantHierarchy, TenantHierarchyMaterializationError } = await import("./dist-Dwn3CpMv.js");
8428
8428
  db = await getDatabase({
8429
8429
  type: dbType,
8430
8430
  url: config.database.url
@@ -8633,7 +8633,7 @@ var dbMigrateLedgerAccountsCommand = {
8633
8633
  if (dbType !== "postgres") throw new Error("db:migrate-ledger-accounts currently supports PostgreSQL only; no changes were made. See the smrt-ledgers README for SQLite.");
8634
8634
  await autoDiscoverAndLoad();
8635
8635
  const { getDatabase } = await import("@happyvertical/sql");
8636
- const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-D4feFBqw.js");
8636
+ const { migrateLedgerAccountsTable, planLedgerAccountsTableMove } = await import("./dist-C8aQWIrN.js");
8637
8637
  db = await getDatabase({
8638
8638
  type: dbType,
8639
8639
  url: config.database.url
@@ -10808,7 +10808,7 @@ var usersProvisionOwnerCommand = {
10808
10808
  const config = getPackageConfig("cli", DEFAULT_CLI_CONFIG);
10809
10809
  if (config.database?.type !== "postgres" || !config.database.url) throw new Error(FAILURE);
10810
10810
  const { getDatabase } = await import("@happyvertical/sql");
10811
- const { provisionPasswordOwner } = await import("./operator-BhTvp0Ap.js");
10811
+ const { provisionPasswordOwner } = await import("./operator-B4P03aQt.js");
10812
10812
  db = await getDatabase({
10813
10813
  type: "postgres",
10814
10814
  url: config.database.url
@@ -283,7 +283,7 @@ async function runTenantHierarchyReadScope(scope, callback) {
283
283
  createLogger({ level: "info" });
284
284
  //#endregion
285
285
  //#region ../tenancy/dist/index.js
286
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.57.39","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}`));
286
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-tenancy","packageVersion":"0.57.41","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}`));
287
287
  var __defProp$2 = Object.defineProperty;
288
288
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
289
289
  var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
@@ -398,7 +398,7 @@ var __exportAll = (all, no_symbols) => {
398
398
  if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" });
399
399
  return target;
400
400
  };
401
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.57.39","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":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"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}`));
401
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-prompts","packageVersion":"0.57.41","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":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"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}`));
402
402
  var PROMPT_CACHE_TTL_MS = 3e4;
403
403
  var promptCache = /* @__PURE__ */ new Map();
404
404
  var cacheGenerations = /* @__PURE__ */ new Map();