@happyvertical/smrt-cli 0.51.32 → 0.51.34

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 (138) hide show
  1. package/dist/{ApiKey-BZmbOTnL-DrxlAZO2.js → ApiKey-BZmbOTnL-JfLnIQ6j.js} +2 -2
  2. package/dist/ApiKeyCollection-Bfb_nw81-_5gxJejo.js +2 -0
  3. package/dist/AuditLogCollection-B1YonCAP-BFcVltyZ.js +2 -0
  4. package/dist/{NostrIdentity-n70E0vck-5rGYvFIY.js → NostrIdentity-n70E0vck-BzRIy0qp.js} +3 -3
  5. package/dist/NostrIdentityCollection-Ca74dkaL-DPePp9q6.js +2 -0
  6. package/dist/{OidcIdentity-K8V4u0CR-dzykFMgp.js → OidcIdentity-K8V4u0CR-o7KNIeg4.js} +2 -2
  7. package/dist/OidcIdentityCollection-gnrLoF08-DIw8_KSV.js +2 -0
  8. package/dist/ProfileAssetCollection-CmbeSgDi-C7RLxrYM.js +2 -0
  9. package/dist/{ProfileCollection-DTT4KNpQ-C3tIYhbK.js → ProfileCollection-DTT4KNpQ-Dwt508DW.js} +25 -25
  10. package/dist/{ProfileMetadataCollection-DxX_BJKV-B3TOG70O.js → ProfileMetadataCollection-DxX_BJKV-DKnpI2Ar.js} +1 -1
  11. package/dist/{ProfileMetafieldCollection-CMKhVi2I-C6uF97rV.js → ProfileMetafieldCollection-CMKhVi2I-Boh07hX4.js} +1 -1
  12. package/dist/{ProfileRelationshipCollection-DUVgaIqf-DhrHpup7.js → ProfileRelationshipCollection-DUVgaIqf-lOgRKFt1.js} +1 -1
  13. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-aafuXvJi.js → ProfileRelationshipTermCollection-DtA9OM23-mMN1QGom.js} +1 -1
  14. package/dist/{ProfileRelationshipType-BRiRka6t-CiAcDP3Y.js → ProfileRelationshipType-BRiRka6t-CSD43mZV.js} +1 -1
  15. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-Y4bfpu34.js → ProfileRelationshipTypeCollection-BdXwd7Kf-Cwl7qAYl.js} +1 -1
  16. package/dist/cli-generator.d.ts +243 -0
  17. package/dist/cli-generator.d.ts.map +1 -0
  18. package/dist/commands/config-export.d.ts +9 -0
  19. package/dist/commands/config-export.d.ts.map +1 -0
  20. package/dist/commands/db-command-utils.d.ts +24 -0
  21. package/dist/commands/db-command-utils.d.ts.map +1 -0
  22. package/dist/commands/db-diff.d.ts +8 -0
  23. package/dist/commands/db-diff.d.ts.map +1 -0
  24. package/dist/commands/db-drop-framework-base-tables.d.ts +28 -0
  25. package/dist/commands/db-drop-framework-base-tables.d.ts.map +1 -0
  26. package/dist/commands/db-generate.d.ts +9 -0
  27. package/dist/commands/db-generate.d.ts.map +1 -0
  28. package/dist/commands/db-history.d.ts +8 -0
  29. package/dist/commands/db-history.d.ts.map +1 -0
  30. package/dist/commands/db-materialize-tenant-hierarchy.d.ts +12 -0
  31. package/dist/commands/db-materialize-tenant-hierarchy.d.ts.map +1 -0
  32. package/dist/commands/db-migrate-actions.d.ts +338 -0
  33. package/dist/commands/db-migrate-actions.d.ts.map +1 -0
  34. package/dist/commands/db-migrate-agent-schedule-slugs.d.ts +3 -0
  35. package/dist/commands/db-migrate-agent-schedule-slugs.d.ts.map +1 -0
  36. package/dist/commands/db-migrate-int8.d.ts +11 -0
  37. package/dist/commands/db-migrate-int8.d.ts.map +1 -0
  38. package/dist/commands/db-migrate-ledger-accounts.d.ts +8 -0
  39. package/dist/commands/db-migrate-ledger-accounts.d.ts.map +1 -0
  40. package/dist/commands/db-migrate-null-equal-indexes.d.ts +3 -0
  41. package/dist/commands/db-migrate-null-equal-indexes.d.ts.map +1 -0
  42. package/dist/commands/db-migrate-uuid.d.ts +171 -0
  43. package/dist/commands/db-migrate-uuid.d.ts.map +1 -0
  44. package/dist/commands/db-orphans.d.ts +39 -0
  45. package/dist/commands/db-orphans.d.ts.map +1 -0
  46. package/dist/commands/db-parity.d.ts +70 -0
  47. package/dist/commands/db-parity.d.ts.map +1 -0
  48. package/dist/commands/db-permissions.d.ts +19 -0
  49. package/dist/commands/db-permissions.d.ts.map +1 -0
  50. package/dist/commands/db-prune.d.ts +70 -0
  51. package/dist/commands/db-prune.d.ts.map +1 -0
  52. package/dist/commands/db-rollback.d.ts +44 -0
  53. package/dist/commands/db-rollback.d.ts.map +1 -0
  54. package/dist/commands/db-status.d.ts +91 -0
  55. package/dist/commands/db-status.d.ts.map +1 -0
  56. package/dist/commands/dev-knowledge.d.ts +10 -0
  57. package/dist/commands/dev-knowledge.d.ts.map +1 -0
  58. package/dist/commands/dev-runtime.d.ts +14 -0
  59. package/dist/commands/dev-runtime.d.ts.map +1 -0
  60. package/dist/commands/dispatch.d.ts +11 -0
  61. package/dist/commands/dispatch.d.ts.map +1 -0
  62. package/dist/commands/docs-claude.d.ts +44 -0
  63. package/dist/commands/docs-claude.d.ts.map +1 -0
  64. package/dist/commands/export.d.ts +31 -0
  65. package/dist/commands/export.d.ts.map +1 -0
  66. package/dist/commands/generate.d.ts +12 -0
  67. package/dist/commands/generate.d.ts.map +1 -0
  68. package/dist/commands/git.d.ts +41 -0
  69. package/dist/commands/git.d.ts.map +1 -0
  70. package/dist/commands/gnode.d.ts +11 -0
  71. package/dist/commands/gnode.d.ts.map +1 -0
  72. package/dist/commands/index.d.ts +23 -0
  73. package/dist/commands/index.d.ts.map +1 -0
  74. package/dist/commands/init.d.ts +11 -0
  75. package/dist/commands/init.d.ts.map +1 -0
  76. package/dist/commands/json-validator.d.ts +155 -0
  77. package/dist/commands/json-validator.d.ts.map +1 -0
  78. package/dist/commands/migration-failure-analysis.d.ts +12 -0
  79. package/dist/commands/migration-failure-analysis.d.ts.map +1 -0
  80. package/dist/commands/playground.d.ts +8 -0
  81. package/dist/commands/playground.d.ts.map +1 -0
  82. package/dist/commands/postgres-timestamp-migration.d.ts +11 -0
  83. package/dist/commands/postgres-timestamp-migration.d.ts.map +1 -0
  84. package/dist/commands/runtime-check-command.d.ts +5 -0
  85. package/dist/commands/runtime-check-command.d.ts.map +1 -0
  86. package/dist/commands/schema-contract.d.ts +83 -0
  87. package/dist/commands/schema-contract.d.ts.map +1 -0
  88. package/dist/commands/sti-upgrade.d.ts +51 -0
  89. package/dist/commands/sti-upgrade.d.ts.map +1 -0
  90. package/dist/commands/utilities.d.ts +134 -0
  91. package/dist/commands/utilities.d.ts.map +1 -0
  92. package/dist/commands/validation-types.d.ts +119 -0
  93. package/dist/commands/validation-types.d.ts.map +1 -0
  94. package/dist/commands/workbench.d.ts +8 -0
  95. package/dist/commands/workbench.d.ts.map +1 -0
  96. package/dist/{commands-Aw8Wv-GM.js → commands-C7WDl_If.js} +2 -2
  97. package/dist/config.d.ts +70 -0
  98. package/dist/config.d.ts.map +1 -0
  99. package/dist/discovery/index.d.ts +6 -0
  100. package/dist/discovery/index.d.ts.map +1 -0
  101. package/dist/discovery/manifest-discovery.d.ts +67 -0
  102. package/dist/discovery/manifest-discovery.d.ts.map +1 -0
  103. package/dist/discovery/manifest-identity.d.ts +10 -0
  104. package/dist/discovery/manifest-identity.d.ts.map +1 -0
  105. package/dist/{dist-CcLtprDR.js → dist-CNOG5p8Z.js} +25 -25
  106. package/dist/{dist-DC1d_zi0.js → dist-DYD23nTD.js} +4 -4
  107. package/dist/{dist-D4TtU64x.js → dist-DmGJ_5JC.js} +2 -2
  108. package/dist/{dist-DXDf5-e6.js → dist-ZbQpS6Dq.js} +3 -3
  109. package/dist/index.d.ts +9 -1
  110. package/dist/index.d.ts.map +1 -0
  111. package/dist/index.js +9 -9
  112. package/dist/loaders/class-loader.d.ts +53 -0
  113. package/dist/loaders/class-loader.d.ts.map +1 -0
  114. package/dist/loaders/git-loader.d.ts +36 -0
  115. package/dist/loaders/git-loader.d.ts.map +1 -0
  116. package/dist/loaders/index.d.ts +9 -0
  117. package/dist/loaders/index.d.ts.map +1 -0
  118. package/dist/loaders/local-loader.d.ts +23 -0
  119. package/dist/loaders/local-loader.d.ts.map +1 -0
  120. package/dist/loaders/npm-loader.d.ts +40 -0
  121. package/dist/loaders/npm-loader.d.ts.map +1 -0
  122. package/dist/loaders/template-loader.d.ts +62 -0
  123. package/dist/loaders/template-loader.d.ts.map +1 -0
  124. package/dist/{oidcProvisioningPrimitives-0-3n3D6f-D9PpE0-s.js → oidcProvisioningPrimitives-0-3n3D6f-B1oMY_f8.js} +4 -4
  125. package/dist/resolveIdentity-BrJDCjYi-NNHX6Mvn.js +2 -0
  126. package/dist/runtime-check.d.ts +19 -0
  127. package/dist/runtime-check.d.ts.map +1 -0
  128. package/dist/utils/generator.d.ts +48 -0
  129. package/dist/utils/generator.d.ts.map +1 -0
  130. package/dist/utils/index.d.ts +5 -0
  131. package/dist/utils/index.d.ts.map +1 -0
  132. package/package.json +10 -12
  133. package/dist/ApiKeyCollection-Bfb_nw81-DP5f5QpC.js +0 -2
  134. package/dist/AuditLogCollection-B1YonCAP-CZBxKq4A.js +0 -2
  135. package/dist/NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js +0 -2
  136. package/dist/OidcIdentityCollection-gnrLoF08-CtNhKu9y.js +0 -2
  137. package/dist/ProfileAssetCollection-CmbeSgDi-C7T6rlyL.js +0 -2
  138. package/dist/resolveIdentity-BrJDCjYi-BafhqSQm.js +0 -2
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-5rGYvFIY.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-BzRIy0qp.js";
3
3
  import { SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
4
4
  import { createHash, randomBytes } from "node:crypto";
5
5
  //#region ../profiles/dist/chunks/ApiKey-BZmbOTnL.js
@@ -127,7 +127,7 @@ var ApiKey = class extends SmrtObject {
127
127
  */
128
128
  static async verify(key, options = {}) {
129
129
  const keyHash = ApiKey.hashKey(key);
130
- const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-DP5f5QpC.js").then((n) => n.n);
130
+ const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-_5gxJejo.js").then((n) => n.n);
131
131
  const apiKey = await (await ApiKeyCollection.create(options)).findOne({ where: { keyHash } });
132
132
  if (!apiKey) return null;
133
133
  if (!apiKey.isValid()) return null;
@@ -0,0 +1,2 @@
1
+ import { j as ApiKeyCollection_exports } from "./dist-CNOG5p8Z.js";
2
+ export { ApiKeyCollection_exports as n };
@@ -0,0 +1,2 @@
1
+ import { k as AuditLogCollection_exports } from "./dist-CNOG5p8Z.js";
2
+ export { AuditLogCollection_exports as n };
@@ -4097,21 +4097,21 @@ var NostrIdentity = class extends SmrtObject {
4097
4097
  * Find identity by public key
4098
4098
  */
4099
4099
  static async findByPubkey(pubkey, options = {}) {
4100
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js").then((n) => n.n);
4100
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-DPePp9q6.js").then((n) => n.n);
4101
4101
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { pubkey } });
4102
4102
  }
4103
4103
  /**
4104
4104
  * Find identity by email
4105
4105
  */
4106
4106
  static async findByEmail(email, options = {}) {
4107
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js").then((n) => n.n);
4107
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-DPePp9q6.js").then((n) => n.n);
4108
4108
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { email: email.toLowerCase() } });
4109
4109
  }
4110
4110
  /**
4111
4111
  * Find identity by NIP-05 username
4112
4112
  */
4113
4113
  static async findByNip05(username, options = {}) {
4114
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js").then((n) => n.n);
4114
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-DPePp9q6.js").then((n) => n.n);
4115
4115
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { nip05Username: username.toLowerCase() } });
4116
4116
  }
4117
4117
  /**
@@ -0,0 +1,2 @@
1
+ import { E as NostrIdentityCollection_exports } from "./dist-CNOG5p8Z.js";
2
+ export { NostrIdentityCollection_exports as n };
@@ -35,7 +35,7 @@ var OidcIdentity = class extends SmrtObject {
35
35
  * Find identity by issuer and subject
36
36
  */
37
37
  static async findBySubject(issuer, subject, options = {}) {
38
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-CtNhKu9y.js").then((n) => n.r);
38
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-DIw8_KSV.js").then((n) => n.r);
39
39
  return await (await OidcIdentityCollection.create(options)).findBySubject(issuer, subject);
40
40
  }
41
41
  /** Build the collision-free natural key for one OIDC issuer subject. */
@@ -58,7 +58,7 @@ var OidcIdentity = class extends SmrtObject {
58
58
  static async findOrCreate(profile, oidcData, options = {}) {
59
59
  const profileId = profile.id;
60
60
  if (typeof profileId !== "string" || !profileId) throw new Error("OidcIdentity.findOrCreate() requires a saved Profile.");
61
- const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-BrJDCjYi-BafhqSQm.js").then((n) => n.i);
61
+ const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-BrJDCjYi-NNHX6Mvn.js").then((n) => n.i);
62
62
  const profileOptions = profile.options ?? {};
63
63
  return (await reuseExistingOidcIdentityForProfile(profileId, {
64
64
  email: oidcData.email,
@@ -0,0 +1,2 @@
1
+ import { w as OidcIdentityCollection_exports } from "./dist-CNOG5p8Z.js";
2
+ export { OidcIdentityCollection_exports as r };
@@ -0,0 +1,2 @@
1
+ import { x as ProfileAssetCollection_exports } from "./dist-CNOG5p8Z.js";
2
+ export { ProfileAssetCollection_exports as n };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { a as queryGlobal, c as withSystemContext, i as tenantId, n as resolvePrompt, o as queryWithGlobals, r as TenantScoped, t as definePrompt } from "./dist-D4TtU64x.js";
3
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-5rGYvFIY.js";
4
- import { a as removeOwnedAssetFromCollection, i as getOwnedAssetsFromCollection, n as assertValidOwnedAssetRelationship, o as resolveOwnedAssetsById, r as assertValidOwnedAssetSortOrder, t as addOwnedAssetFromCollection } from "./dist-DXDf5-e6.js";
2
+ import { a as queryGlobal, c as withSystemContext, i as tenantId, n as resolvePrompt, o as queryWithGlobals, r as TenantScoped, t as definePrompt } from "./dist-DmGJ_5JC.js";
3
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-BzRIy0qp.js";
4
+ import { a as removeOwnedAssetFromCollection, i as getOwnedAssetsFromCollection, n as assertValidOwnedAssetRelationship, o as resolveOwnedAssetsById, r as assertValidOwnedAssetSortOrder, t as addOwnedAssetFromCollection } from "./dist-ZbQpS6Dq.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-DTT4KNpQ.js
@@ -428,8 +428,8 @@ var Profile = class extends SmrtObject {
428
428
  * @param value - The value to set
429
429
  */
430
430
  async addMetadata(metafieldSlug, value) {
431
- const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-CMKhVi2I-C6uF97rV.js").then((n) => n.n);
432
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-DxX_BJKV-B3TOG70O.js").then((n) => n.n);
431
+ const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-CMKhVi2I-Boh07hX4.js").then((n) => n.n);
432
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-DxX_BJKV-DKnpI2Ar.js").then((n) => n.n);
433
433
  const metafield = await (await ProfileMetafieldCollection.create(this.options)).getBySlug(metafieldSlug);
434
434
  if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
435
435
  await metafield.validateValue(value);
@@ -460,7 +460,7 @@ var Profile = class extends SmrtObject {
460
460
  * @returns Object with metafield slugs as keys
461
461
  */
462
462
  async getMetadata() {
463
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-DxX_BJKV-B3TOG70O.js").then((n) => n.n);
463
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-DxX_BJKV-DKnpI2Ar.js").then((n) => n.n);
464
464
  return await (await ProfileMetadataCollection.create(this.options)).getMetadataObject(this.id);
465
465
  }
466
466
  /**
@@ -477,8 +477,8 @@ var Profile = class extends SmrtObject {
477
477
  * @param metafieldSlug - The slug of the metafield to remove
478
478
  */
479
479
  async removeMetadata(metafieldSlug) {
480
- const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-CMKhVi2I-C6uF97rV.js").then((n) => n.n);
481
- const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-DxX_BJKV-B3TOG70O.js").then((n) => n.n);
480
+ const { ProfileMetafieldCollection } = await import("./ProfileMetafieldCollection-CMKhVi2I-Boh07hX4.js").then((n) => n.n);
481
+ const { ProfileMetadataCollection } = await import("./ProfileMetadataCollection-DxX_BJKV-DKnpI2Ar.js").then((n) => n.n);
482
482
  const metafield = await (await ProfileMetafieldCollection.create(this.options)).getBySlug(metafieldSlug);
483
483
  if (!metafield) throw new Error(`Metafield '${metafieldSlug}' not found`);
484
484
  const existing = await (await ProfileMetadataCollection.create(this.options)).list({
@@ -491,7 +491,7 @@ var Profile = class extends SmrtObject {
491
491
  if (existing.length > 0) await existing[0].delete();
492
492
  }
493
493
  async getProfileAssetCollection() {
494
- const { ProfileAssetCollection } = await import("./ProfileAssetCollection-CmbeSgDi-C7T6rlyL.js").then((n) => n.n);
494
+ const { ProfileAssetCollection } = await import("./ProfileAssetCollection-CmbeSgDi-C7RLxrYM.js").then((n) => n.n);
495
495
  return ProfileAssetCollection.create({ db: this.db });
496
496
  }
497
497
  async getAssets(relationship) {
@@ -521,9 +521,9 @@ var Profile = class extends SmrtObject {
521
521
  * @param contextProfile - Optional context profile for tertiary relationships
522
522
  */
523
523
  async addRelationship(toProfile, relationshipSlug, contextProfile) {
524
- const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BdXwd7Kf-Y4bfpu34.js").then((n) => n.n);
525
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-DUVgaIqf-DhrHpup7.js").then((n) => n.n);
526
- const { ProfileRelationshipType } = await import("./ProfileRelationshipType-BRiRka6t-CiAcDP3Y.js").then((n) => n.n).then((n) => n.n);
524
+ const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BdXwd7Kf-Cwl7qAYl.js").then((n) => n.n);
525
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-DUVgaIqf-lOgRKFt1.js").then((n) => n.n);
526
+ const { ProfileRelationshipType } = await import("./ProfileRelationshipType-BRiRka6t-CSD43mZV.js").then((n) => n.n).then((n) => n.n);
527
527
  const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
528
528
  if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
529
529
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
@@ -547,8 +547,8 @@ var Profile = class extends SmrtObject {
547
547
  * @returns Array of ProfileRelationship instances
548
548
  */
549
549
  async getRelationships(options) {
550
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-DUVgaIqf-DhrHpup7.js").then((n) => n.n);
551
- const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BdXwd7Kf-Y4bfpu34.js").then((n) => n.n);
550
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-DUVgaIqf-lOgRKFt1.js").then((n) => n.n);
551
+ const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BdXwd7Kf-Cwl7qAYl.js").then((n) => n.n);
552
552
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
553
553
  const direction = options?.direction || "all";
554
554
  let typeId;
@@ -591,8 +591,8 @@ var Profile = class extends SmrtObject {
591
591
  * @param relationshipSlug - The type of relationship to remove
592
592
  */
593
593
  async removeRelationship(toProfile, relationshipSlug) {
594
- const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BdXwd7Kf-Y4bfpu34.js").then((n) => n.n);
595
- const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-DUVgaIqf-DhrHpup7.js").then((n) => n.n);
594
+ const { ProfileRelationshipTypeCollection } = await import("./ProfileRelationshipTypeCollection-BdXwd7Kf-Cwl7qAYl.js").then((n) => n.n);
595
+ const { ProfileRelationshipCollection } = await import("./ProfileRelationshipCollection-DUVgaIqf-lOgRKFt1.js").then((n) => n.n);
596
596
  const relationshipType = await (await ProfileRelationshipTypeCollection.create(this.options)).getBySlug(relationshipSlug);
597
597
  if (!relationshipType) throw new Error(`Relationship type '${relationshipSlug}' not found`);
598
598
  const relationshipCollection = await ProfileRelationshipCollection.create(this.options);
@@ -685,7 +685,7 @@ var Profile = class extends SmrtObject {
685
685
  * @returns Array of API keys
686
686
  */
687
687
  async getApiKeys() {
688
- const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-DP5f5QpC.js").then((n) => n.n);
688
+ const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-_5gxJejo.js").then((n) => n.n);
689
689
  return await (await ApiKeyCollection.create(this.options)).findByProfile(this.id);
690
690
  }
691
691
  /**
@@ -694,7 +694,7 @@ var Profile = class extends SmrtObject {
694
694
  * @returns Array of active API keys
695
695
  */
696
696
  async getActiveApiKeys() {
697
- const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-DP5f5QpC.js").then((n) => n.n);
697
+ const { ApiKeyCollection } = await import("./ApiKeyCollection-Bfb_nw81-_5gxJejo.js").then((n) => n.n);
698
698
  return await (await ApiKeyCollection.create(this.options)).findActiveByProfile(this.id);
699
699
  }
700
700
  /**
@@ -704,7 +704,7 @@ var Profile = class extends SmrtObject {
704
704
  * @returns The generated key (plaintext) and ApiKey record
705
705
  */
706
706
  async generateApiKey(options) {
707
- const { ApiKey } = await import("./ApiKey-BZmbOTnL-DrxlAZO2.js").then((n) => n.n).then((n) => n.n);
707
+ const { ApiKey } = await import("./ApiKey-BZmbOTnL-JfLnIQ6j.js").then((n) => n.n).then((n) => n.n);
708
708
  return await ApiKey.generate(this, {
709
709
  ...options,
710
710
  db: this.options?.db
@@ -716,7 +716,7 @@ var Profile = class extends SmrtObject {
716
716
  * @returns Array of OIDC identity records
717
717
  */
718
718
  async getOidcIdentities() {
719
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-CtNhKu9y.js").then((n) => n.r);
719
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-DIw8_KSV.js").then((n) => n.r);
720
720
  return await (await OidcIdentityCollection.create(this.options)).findByProfile(this.id);
721
721
  }
722
722
  /**
@@ -729,7 +729,7 @@ var Profile = class extends SmrtObject {
729
729
  * type, but refuses to create or rebind authority.
730
730
  */
731
731
  async linkOidcIdentity(oidcData) {
732
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-CtNhKu9y.js").then((n) => n.r);
732
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-gnrLoF08-DIw8_KSV.js").then((n) => n.r);
733
733
  return await (await OidcIdentityCollection.create(this.options)).linkToProfile(this, oidcData);
734
734
  }
735
735
  /**
@@ -738,7 +738,7 @@ var Profile = class extends SmrtObject {
738
738
  * @returns Array of Nostr identity records
739
739
  */
740
740
  async getNostrIdentities() {
741
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js").then((n) => n.n);
741
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-DPePp9q6.js").then((n) => n.n);
742
742
  return await (await NostrIdentityCollection.create(this.options)).findByProfile(this.id);
743
743
  }
744
744
  /**
@@ -748,7 +748,7 @@ var Profile = class extends SmrtObject {
748
748
  * @returns The linked Nostr identity record
749
749
  */
750
750
  async linkNostrIdentity(nostrData) {
751
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js").then((n) => n.n);
751
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-Ca74dkaL-DPePp9q6.js").then((n) => n.n);
752
752
  return await (await NostrIdentityCollection.create(this.options)).linkToProfile(this, nostrData);
753
753
  }
754
754
  /**
@@ -758,7 +758,7 @@ var Profile = class extends SmrtObject {
758
758
  * @returns Array of audit log entries
759
759
  */
760
760
  async getAuditLogs(limit = 50) {
761
- const { AuditLogCollection } = await import("./AuditLogCollection-B1YonCAP-CZBxKq4A.js").then((n) => n.n);
761
+ const { AuditLogCollection } = await import("./AuditLogCollection-B1YonCAP-BFcVltyZ.js").then((n) => n.n);
762
762
  return await (await AuditLogCollection.create(this.options)).getRecentActivity(this.id, limit);
763
763
  }
764
764
  /**
@@ -768,7 +768,7 @@ var Profile = class extends SmrtObject {
768
768
  * @returns The created audit log entry
769
769
  */
770
770
  async recordAction(options) {
771
- const { AuditLogCollection } = await import("./AuditLogCollection-B1YonCAP-CZBxKq4A.js").then((n) => n.n);
771
+ const { AuditLogCollection } = await import("./AuditLogCollection-B1YonCAP-BFcVltyZ.js").then((n) => n.n);
772
772
  return await (await AuditLogCollection.create(this.options)).record({
773
773
  profile: this,
774
774
  ...options
@@ -1,2 +1,2 @@
1
- import { v as ProfileMetadataCollection_exports } from "./dist-CcLtprDR.js";
1
+ import { v as ProfileMetadataCollection_exports } from "./dist-CNOG5p8Z.js";
2
2
  export { ProfileMetadataCollection_exports as n };
@@ -1,2 +1,2 @@
1
- import { h as ProfileMetafieldCollection_exports } from "./dist-CcLtprDR.js";
1
+ import { h as ProfileMetafieldCollection_exports } from "./dist-CNOG5p8Z.js";
2
2
  export { ProfileMetafieldCollection_exports as n };
@@ -1,2 +1,2 @@
1
- import { f as ProfileRelationshipCollection_exports } from "./dist-CcLtprDR.js";
1
+ import { f as ProfileRelationshipCollection_exports } from "./dist-CNOG5p8Z.js";
2
2
  export { ProfileRelationshipCollection_exports as n };
@@ -1,2 +1,2 @@
1
- import { l as ProfileRelationshipTermCollection_exports } from "./dist-CcLtprDR.js";
1
+ import { l as ProfileRelationshipTermCollection_exports } from "./dist-CNOG5p8Z.js";
2
2
  export { ProfileRelationshipTermCollection_exports as n };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-5rGYvFIY.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-BzRIy0qp.js";
3
3
  import { SmrtObject, field, smrt } from "@happyvertical/smrt-core";
4
4
  //#region ../profiles/dist/chunks/ProfileRelationshipType-BRiRka6t.js
5
5
  var ProfileRelationshipType_BRiRka6t_exports = /* @__PURE__ */ __exportAll({
@@ -1,2 +1,2 @@
1
- import { o as ProfileRelationshipTypeCollection_exports } from "./dist-CcLtprDR.js";
1
+ import { o as ProfileRelationshipTypeCollection_exports } from "./dist-CNOG5p8Z.js";
2
2
  export { ProfileRelationshipTypeCollection_exports as n };
@@ -0,0 +1,243 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * CLI command generator for smrt objects
4
+ *
5
+ * Generates admin and development tools from object definitions
6
+ */
7
+ import type { DatabaseInterface } from '@happyvertical/sql';
8
+ import { type Command, type OptionConfig, type ParsedArgs } from '@happyvertical/utils';
9
+ export interface CLIConfig {
10
+ name?: string;
11
+ version?: string;
12
+ description?: string;
13
+ prompt?: boolean;
14
+ colors?: boolean;
15
+ }
16
+ export interface CLIContext {
17
+ db?: DatabaseInterface;
18
+ /**
19
+ * Opaque AI client passed through to collection/instance configs. The
20
+ * concrete client type is owned by the consumer's runtime config, so it is
21
+ * only ever truthiness-checked and forwarded here.
22
+ */
23
+ ai?: unknown;
24
+ user?: {
25
+ id: string;
26
+ roles?: string[];
27
+ };
28
+ /** Timing data for --timing flag */
29
+ timing?: Record<string, number>;
30
+ }
31
+ export interface CLIOptionConfig extends OptionConfig {
32
+ /** Collect every occurrence of this string option in argv order. */
33
+ multiple?: boolean;
34
+ }
35
+ export interface CLICommand extends Omit<Command, 'options'> {
36
+ options?: Record<string, CLIOptionConfig>;
37
+ }
38
+ /**
39
+ * Parse one command while preserving every occurrence of options marked
40
+ * `multiple`, and while letting a subcommand's own options win over the
41
+ * global flags the shared parser intercepts. Everything else retains the
42
+ * shared SDK parser behavior.
43
+ */
44
+ export declare function parseCliCommandArgs(argv: string[], commands: CLICommand[], builtInCommands?: Record<string, CLICommand>): ParsedArgs;
45
+ export type { ParsedArgs } from '@happyvertical/utils';
46
+ /**
47
+ * Generate CLI commands for smrt objects
48
+ */
49
+ export declare class CLIGenerator {
50
+ private config;
51
+ private context;
52
+ private collections;
53
+ private commandCache;
54
+ /** Lazy-loaded cache for object commands (key: objectName lowercase) */
55
+ private objectCommandsCache;
56
+ /** Set of registered object names (lowercase) for quick lookup */
57
+ private registeredObjectNames;
58
+ /** Whether manifest/classes have been loaded */
59
+ private manifestLoaded;
60
+ constructor(config?: CLIConfig, context?: CLIContext);
61
+ /**
62
+ * Check if running in test environment
63
+ */
64
+ private isTestMode;
65
+ /**
66
+ * Check if a type string represents an inline object type parameter
67
+ * e.g., "{ meetingId?: string; limit?: number }"
68
+ *
69
+ * Note: Only supports single-level nested braces. Deeply nested types
70
+ * like "{ config: { nested: { deep: string } } }" are not fully supported.
71
+ */
72
+ private isObjectTypeParameter;
73
+ /**
74
+ * Try to load user's compiled classes for runtime execution
75
+ *
76
+ * Loads both local classes (from project entry point) and external classes
77
+ * (from packages in .smrt/manifest.json) to enable full CLI functionality.
78
+ */
79
+ private tryLoadUserClasses;
80
+ /**
81
+ * Load classes from local project entry point
82
+ *
83
+ * Entry point discovery order:
84
+ * 1. smrt.config.js: packages.cli.entryPoint (explicit override)
85
+ * 2. package.json: exports['.'] or main field
86
+ * 3. Fallback: ./dist/index.js
87
+ */
88
+ private loadLocalClasses;
89
+ /**
90
+ * Load classes from external packages
91
+ *
92
+ * Imports the auto-generated .smrt/register.js file which contains
93
+ * static imports and registrations for all external SMRT objects.
94
+ *
95
+ * This file is generated by the consumer plugin during build.
96
+ */
97
+ private loadExternalClasses;
98
+ /**
99
+ * Handle exits safely in test mode
100
+ */
101
+ private exitWithError;
102
+ /**
103
+ * Generate CLI handler function
104
+ */
105
+ generateHandler(): (argv: string[]) => Promise<void>;
106
+ /**
107
+ * Preprocess argv to support space-separated object commands
108
+ *
109
+ * Converts: ['council', 'list'] → ['council:list']
110
+ * Converts: ['council', 'get', 'abc-123'] → ['council:get', 'abc-123']
111
+ *
112
+ * This enables users to type:
113
+ * smrt council list
114
+ * smrt council get abc-123
115
+ * smrt council analyze abc-123 --depth 3
116
+ *
117
+ * Instead of:
118
+ * smrt council:list
119
+ * smrt council:get abc-123
120
+ */
121
+ private preprocessObjectCommands;
122
+ /**
123
+ * Ensure manifest and user classes are loaded.
124
+ * This is the minimum required work before any command can be executed.
125
+ * Separated from command generation to enable lazy command loading.
126
+ */
127
+ private ensureManifestLoaded;
128
+ /**
129
+ * Get commands for a specific object (lazy generation with caching)
130
+ */
131
+ private getObjectCommandsLazy;
132
+ /**
133
+ * Find an object command by name (lazy lookup)
134
+ */
135
+ private findObjectCommand;
136
+ /**
137
+ * Generate all CLI commands
138
+ *
139
+ * NOTE: Object commands are now loaded LAZILY for better startup performance.
140
+ * This method only generates utility commands upfront. Object commands are
141
+ * generated on-demand when executeCommand() looks for them.
142
+ *
143
+ * For full command list (e.g., help display), use generateAllCommands().
144
+ */
145
+ private generateCommands;
146
+ /**
147
+ * Generate ALL commands including lazy-loaded object commands.
148
+ * Used for help display where we need the complete list.
149
+ */
150
+ private generateAllCommands;
151
+ /**
152
+ * Generate CRUD commands for a specific object
153
+ */
154
+ private generateObjectCommands;
155
+ /**
156
+ * Execute a parsed command
157
+ */
158
+ executeCommand(parsed: ParsedArgs, commands: CLICommand[], processedArgv?: string[]): Promise<void>;
159
+ /**
160
+ * Show help for a specific object and its available commands
161
+ */
162
+ private showObjectHelp;
163
+ /**
164
+ * Generate utility commands
165
+ */
166
+ generateUtilityCommands(): CLICommand[];
167
+ /**
168
+ * Create schema command handler
169
+ */
170
+ private createSchemaHandler;
171
+ /**
172
+ * Show help information
173
+ */
174
+ showHelp(commands: CLICommand[]): Promise<void>;
175
+ /**
176
+ * Show help for a single command
177
+ */
178
+ private showCommandHelp;
179
+ /**
180
+ * Create a simple spinner
181
+ */
182
+ private createSpinner;
183
+ /**
184
+ * Prompt for input
185
+ */
186
+ private prompt;
187
+ /**
188
+ * Confirm prompt
189
+ */
190
+ private confirm;
191
+ /**
192
+ * Handle LIST command
193
+ */
194
+ private handleList;
195
+ /**
196
+ * Handle GET command
197
+ */
198
+ private handleGet;
199
+ /**
200
+ * Handle CREATE command
201
+ */
202
+ private handleCreate;
203
+ /**
204
+ * Handle UPDATE command
205
+ */
206
+ private handleUpdate;
207
+ /**
208
+ * Handle DELETE command
209
+ */
210
+ private handleDelete;
211
+ /**
212
+ * Handle custom method execution
213
+ */
214
+ private handleCustomMethod;
215
+ /**
216
+ * Handle singleton method (no parameters, no database lookup)
217
+ * Creates a new instance with proper config and calls the method
218
+ */
219
+ private handleSingletonMethod;
220
+ /**
221
+ * Get or create collection for an object
222
+ * Uses database configuration from smrt.config.js or defaults to :memory:
223
+ */
224
+ private getCollection;
225
+ /**
226
+ * Interactive field prompts
227
+ */
228
+ private promptForFields;
229
+ /**
230
+ * Parse field value from string
231
+ */
232
+ private parseFieldValue;
233
+ /**
234
+ * Display results as table
235
+ */
236
+ private displayTable;
237
+ /**
238
+ * Convert object to YAML-like string
239
+ */
240
+ private toYamlString;
241
+ }
242
+ export declare function main(): Promise<void>;
243
+ //# sourceMappingURL=cli-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-generator.d.ts","sourceRoot":"","sources":["../src/cli-generator.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * config:export Command
3
+ *
4
+ * Exports agent configuration from the database for static site generation.
5
+ * Useful for SSG sites that need to bundle configuration at build time.
6
+ */
7
+ import type { CLICommand } from '../cli-generator.js';
8
+ export declare const configExportCommand: CLICommand;
9
+ //# sourceMappingURL=config-export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-export.d.ts","sourceRoot":"","sources":["../../src/commands/config-export.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAmBtD,eAAO,MAAM,mBAAmB,EAAE,UA8MjC,CAAC"}
@@ -0,0 +1,24 @@
1
+ export declare function redactConnectionString(value: string): string;
2
+ /**
3
+ * Redact connection-string credentials embedded anywhere inside arbitrary
4
+ * text, rather than a standalone URL value.
5
+ *
6
+ * Command failure paths surface driver/error text (`error.message`,
7
+ * `error.stack`, wrapped `originalError`/`sql` context) that can itself
8
+ * contain the connection string a command was given — for example a
9
+ * malformed-URL parse error, or a client library that echoes the DSN it
10
+ * tried. `redactConnectionString` expects its whole input to parse as a URL;
11
+ * this scrubs matches wherever they occur in a larger, unknown-shaped string
12
+ * and never throws.
13
+ */
14
+ export declare function redactConnectionStringsInText(text: string): string;
15
+ /**
16
+ * Quote a SQL identifier (table name, column name, etc.).
17
+ *
18
+ * Uses double quotes, the ANSI SQL standard understood by SQLite, PostgreSQL,
19
+ * and DuckDB, and escapes embedded double quotes by doubling them.
20
+ */
21
+ export declare function quoteIdentifier(name: string): string;
22
+ export declare function formatDatabaseDisplayUrl(dbType: string, dbUrl: string): string;
23
+ export declare function closeDatabaseConnection(db: unknown): Promise<void>;
24
+ //# sourceMappingURL=db-command-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-command-utils.d.ts","sourceRoot":"","sources":["../../src/commands/db-command-utils.ts"],"names":[],"mappings":"AAyCA,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAsB5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAMR;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBxE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * db:diff Command
3
+ *
4
+ * Compares manifest schemas to database.
5
+ */
6
+ import type { CLICommand } from '../cli-generator.js';
7
+ export declare const dbDiffCommand: CLICommand;
8
+ //# sourceMappingURL=db-diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-diff.d.ts","sourceRoot":"","sources":["../../src/commands/db-diff.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAkCtD,eAAO,MAAM,aAAa,EAAE,UAwb3B,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * db:drop-framework-base-tables Command
3
+ *
4
+ * One-time remediation for the five orphaned framework-base tables
5
+ * (`smrt_objects`, `smrt_classes`, `smrt_collections`, `smrt_hierarchicals`,
6
+ * `smrt_polymorphic_associations`) that a pre-#2644 `db:migrate` planned for
7
+ * SMRT's abstract framework-base classes. #2644 stopped planning them; this
8
+ * command drops the ones a deployment already created.
9
+ *
10
+ * Deliberately separate from `db:migrate` and from `db:diff`'s orphan-table
11
+ * reporting: `SchemaDiff.includeDroppedTables` stays `false` so an ordinary
12
+ * migration never drops a table just because it is absent from the manifest.
13
+ * This command drops **only** the five hardcoded names above, and only after
14
+ * verifying each one is empty, has no foreign keys pointing at it, and has
15
+ * exactly that table's own expected columns — the universal `id`/`slug`/
16
+ * `context`/`created_at`/`updated_at` base for `smrt_objects`/`smrt_classes`/
17
+ * `smrt_collections`, extended with `parent_id` for `smrt_hierarchicals` and
18
+ * `meta_type`/`meta_id`/`role`/`sort_order` for
19
+ * `smrt_polymorphic_associations` (their own real fields, not the plain
20
+ * baseline — see `@happyvertical/smrt-core/migrations`'
21
+ * `planFrameworkBaseTableDrop()` for the full per-table safety model).
22
+ *
23
+ * Skipping this command is safe: a table left behind here is inert and
24
+ * permanently orphaned, never written to or read from again.
25
+ */
26
+ import type { CLICommand } from '../cli-generator.js';
27
+ export declare const dbDropFrameworkBaseTablesCommand: CLICommand;
28
+ //# sourceMappingURL=db-drop-framework-base-tables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-drop-framework-base-tables.d.ts","sourceRoot":"","sources":["../../src/commands/db-drop-framework-base-tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAkDtD,eAAO,MAAM,gCAAgC,EAAE,UAwH9C,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * db:generate Command
3
+ *
4
+ * File-backed migrations are intentionally unsupported. SMRT schema
5
+ * migrations are manifest-driven.
6
+ */
7
+ import type { CLICommand } from '../cli-generator.js';
8
+ export declare const dbGenerateCommand: CLICommand;
9
+ //# sourceMappingURL=db-generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-generate.d.ts","sourceRoot":"","sources":["../../src/commands/db-generate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKtD,eAAO,MAAM,iBAAiB,EAAE,UA2C/B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * db:history Command
3
+ *
4
+ * Shows detailed migration history with filtering options.
5
+ */
6
+ import type { CLICommand } from '../cli-generator.js';
7
+ export declare const dbHistoryCommand: CLICommand;
8
+ //# sourceMappingURL=db-history.d.ts.map