@happyvertical/smrt-cli 0.57.13 → 0.57.14

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 (33) hide show
  1. package/AGENTS.md +2 -3
  2. package/dist/{ApiKey-CVmlf3V6-BAeHuH48.js → ApiKey-CVmlf3V6-CpkKlftW.js} +2 -2
  3. package/dist/{ApiKeyCollection-CiiDNFdD-CMGF3_ul.js → ApiKeyCollection-CiiDNFdD-DGZkMNy8.js} +3 -3
  4. package/dist/{AuditLogCollection-WDHL-_AF-C8L1gl7q.js → AuditLogCollection-WDHL-_AF-CfRYWGys.js} +3 -3
  5. package/dist/{NostrIdentity-AC8fAdxe-DKxKyu_a.js → NostrIdentity-AC8fAdxe-Crl0np5c.js} +4 -4
  6. package/dist/{NostrIdentityCollection-CctlECpX-fkAPnK02.js → NostrIdentityCollection-CctlECpX-COd5JbK9.js} +2 -2
  7. package/dist/{OidcIdentity-BUblgQLs-C75_f06o.js → OidcIdentity-BUblgQLs-CRp_hqHx.js} +2 -2
  8. package/dist/{OidcIdentityCollection-ClOyaHeF-CiymEMsR.js → OidcIdentityCollection-ClOyaHeF-DRzTBrqP.js} +2 -2
  9. package/dist/PasswordCredentialService-CyB9FmYp-DrsmayFd.js +6263 -0
  10. package/dist/{ProfileAssetCollection-CRMcjLJ--_OAFKSvo.js → ProfileAssetCollection-CRMcjLJ--DI5GHTCT.js} +5 -5
  11. package/dist/{ProfileCollection-C4INKh7Y-CU227vYB.js → ProfileCollection-C4INKh7Y-8JNduJAI.js} +28 -28
  12. package/dist/{ProfileLinkCollection-DFfZRsgv-De18fH8M.js → ProfileLinkCollection-DFfZRsgv-Btq4mGnI.js} +4 -4
  13. package/dist/{ProfileMetadataCollection-BIYKy4Y3-B4hKF9kz.js → ProfileMetadataCollection-BIYKy4Y3-D89TA8sp.js} +3 -3
  14. package/dist/{ProfileMetafieldCollection-Buz7gzag-CXMtAfAB.js → ProfileMetafieldCollection-Buz7gzag-BBILArHK.js} +3 -3
  15. package/dist/{ProfileRelationshipCollection-C4g_QLI4-CLezW4sK.js → ProfileRelationshipCollection-C4g_QLI4-CBO-ZFG5.js} +6 -6
  16. package/dist/{ProfileRelationshipTermCollection-C9J7mC7P-ChIFqjCg.js → ProfileRelationshipTermCollection-C9J7mC7P-B1qRgesq.js} +2 -2
  17. package/dist/{ProfileRelationshipType-U7IwF6Wf-DNavf24e.js → ProfileRelationshipType-U7IwF6Wf--nNtaEKl.js} +1 -1
  18. package/dist/{ProfileRelationshipTypeCollection-_n22WqTb-DiZUWvev.js → ProfileRelationshipTypeCollection-_n22WqTb-CvN_J6A_.js} +3 -3
  19. package/dist/{ProfileTypeCollection-B7kwi1mU-D0bZODrI.js → ProfileTypeCollection-B7kwi1mU-D0H5HsjK.js} +3 -3
  20. package/dist/commands/users-provision-owner.d.ts +10 -0
  21. package/dist/commands/users-provision-owner.d.ts.map +1 -0
  22. package/dist/commands/utilities.d.ts.map +1 -1
  23. package/dist/{commands-BgDKO9Gk.js → commands-DEfGxqVh.js} +114 -4
  24. package/dist/{dist-BjVKGAtb.js → dist-CztDzx06.js} +213 -3591
  25. package/dist/{dist-CJsW8uvQ.js → dist-DICoECF7.js} +2 -2
  26. package/dist/{dist-UirXccvN.js → dist-DOpRHzSU.js} +5 -5
  27. package/dist/{dist-B0V2uy4g.js → dist-NpXtLFZF.js} +3 -3
  28. package/dist/index.js +11 -11
  29. package/dist/{oidcProvisioningPrimitives-DNP9EZlU-PfUi61zh.js → oidcProvisioningPrimitives-DNP9EZlU-DZjXyAYi.js} +5 -5
  30. package/dist/operator-BD6K8-ID.js +111 -0
  31. package/dist/{resolveIdentity-CkyqvctR-CxRDO4Kf.js → resolveIdentity-CkyqvctR-C7H56d7-.js} +17 -17
  32. package/package.json +10 -10
  33. package/dist/dist-DKSFNs8e.js +0 -21
package/AGENTS.md CHANGED
@@ -11,6 +11,7 @@ smrt doctor --db # Add the live-schema parity section (see below)
11
11
  smrt db:status # Pending schema changes + failed migration classification (+ tenant natural-key findings: a missing tenant-led unique exits 1, a surviving legacy global unique warns until `db:migrate --drop-legacy-natural-key`: src/commands/tenant-natural-keys.ts)
12
12
  smrt db:status --parity # Same, plus live-schema parity (see below)
13
13
  smrt db:orphans # agents/db-orphans.md
14
+ smrt users:provision-owner # Trusted PostgreSQL owner provisioning; password from private file/stdin, never argv/env (users README)
14
15
  smrt db:migrate # agents/type-drift.md, agents/db-migrate-concurrency.md
15
16
  smrt db:migrate --postgres-safe # PostgreSQL concurrent-index mode (see below)
16
17
  smrt db:migrate --force-migration <exact-id> [--force-migration <exact-id>...] # Force exact generated migrations in one atomic batch
@@ -108,9 +109,7 @@ it in the same migration also run outside the transaction, in order.
108
109
  `smrt doctor` reports the application's complete agent-addressable surface —
109
110
  generated model tools, declared view intents, registered playbooks — **from
110
111
  build artifacts alone**. No route is mounted, no server starts, and no
111
- application module is imported. That is the whole point: before this, the only
112
- way to answer "what can an agent do in this app" was to mount every route and
113
- enumerate, which is not an answer a build, a review, or a CI gate can use.
112
+ application module is imported.
114
113
 
115
114
  `readAgentSurfaceReport(cwd)` reads the first of `.smrt/smrt-knowledge.json`
116
115
  then `dist/smrt-knowledge.json`. Model tools come from the artifact's `mcp`
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-Crl0np5c.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-CVmlf3V6.js
@@ -134,7 +134,7 @@ var ApiKey = class extends SmrtObject {
134
134
  */
135
135
  static async verify(key, options = {}) {
136
136
  const keyHash = ApiKey.hashKey(key);
137
- const { ApiKeyCollection } = await import("./ApiKeyCollection-CiiDNFdD-CMGF3_ul.js").then((n) => n.n).then((n) => n.n);
137
+ const { ApiKeyCollection } = await import("./ApiKeyCollection-CiiDNFdD-DGZkMNy8.js").then((n) => n.t).then((n) => n.n);
138
138
  const apiKey = await (await ApiKeyCollection.create(options)).findOne({ where: { keyHash } });
139
139
  if (!apiKey) return null;
140
140
  if (!apiKey.isValid()) return null;
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
3
- import { t as ApiKey } from "./ApiKey-CVmlf3V6-BAeHuH48.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-Crl0np5c.js";
3
+ import { t as ApiKey } from "./ApiKey-CVmlf3V6-CpkKlftW.js";
4
4
  import { SmrtCollection } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/ApiKeyCollection-CiiDNFdD.js
6
6
  var ApiKeyCollection_CiiDNFdD_exports = /* @__PURE__ */ __exportAll({
@@ -84,4 +84,4 @@ var ApiKeyCollection = class extends SmrtCollection {
84
84
  }
85
85
  };
86
86
  //#endregion
87
- export { ApiKeyCollection_CiiDNFdD_exports as n, ApiKeyCollection as t };
87
+ export { ApiKeyCollection_CiiDNFdD_exports as t };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { i as tenantId, r as TenantScoped } from "./dist-CJsW8uvQ.js";
3
- import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
2
+ import { i as tenantId, r as TenantScoped } from "./dist-DICoECF7.js";
3
+ import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-Crl0np5c.js";
4
4
  import { SmrtCollection, SmrtObject, field, foreignKey, smrt } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/AuditLogCollection-WDHL-_AF.js
6
6
  var AuditLogCollection_WDHL__AF_exports = /* @__PURE__ */ __exportAll({
@@ -208,4 +208,4 @@ var AuditLogCollection = class extends SmrtCollection {
208
208
  }
209
209
  };
210
210
  //#endregion
211
- export { AuditLogCollection as n, AuditLogCollection_WDHL__AF_exports as r, AuditLog as t };
211
+ export { AuditLogCollection_WDHL__AF_exports as t };
@@ -4104,21 +4104,21 @@ var NostrIdentity = class extends SmrtObject {
4104
4104
  * Find identity by public key
4105
4105
  */
4106
4106
  static async findByPubkey(pubkey, options = {}) {
4107
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-fkAPnK02.js").then((n) => n.n).then((n) => n.n);
4107
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-COd5JbK9.js").then((n) => n.t).then((n) => n.n);
4108
4108
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { pubkey } });
4109
4109
  }
4110
4110
  /**
4111
4111
  * Find identity by email
4112
4112
  */
4113
4113
  static async findByEmail(email, options = {}) {
4114
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-fkAPnK02.js").then((n) => n.n).then((n) => n.n);
4114
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-COd5JbK9.js").then((n) => n.t).then((n) => n.n);
4115
4115
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { email: email.toLowerCase() } });
4116
4116
  }
4117
4117
  /**
4118
4118
  * Find identity by NIP-05 username
4119
4119
  */
4120
4120
  static async findByNip05(username, options = {}) {
4121
- const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-fkAPnK02.js").then((n) => n.n).then((n) => n.n);
4121
+ const { NostrIdentityCollection } = await import("./NostrIdentityCollection-CctlECpX-COd5JbK9.js").then((n) => n.t).then((n) => n.n);
4122
4122
  return await (await NostrIdentityCollection.create(options)).findOne({ where: { nip05Username: username.toLowerCase() } });
4123
4123
  }
4124
4124
  /**
@@ -4194,4 +4194,4 @@ NostrIdentity = __decorateClass([smrt({
4194
4194
  cli: { include: ["list", "get"] }
4195
4195
  })], NostrIdentity);
4196
4196
  //#endregion
4197
- export { deriveEncryptionKey as a, privkeyToNsec as c, verifyNostrSignature as d, decryptPrivkey as i, pubkeyToNpub as l, __exportAll as n, encryptPrivkey as o, computeEventId as r, generateNostrKeypair as s, NostrIdentity as t, verifyAuthEvent as u };
4197
+ export { verifyAuthEvent as a, generateNostrKeypair as i, __exportAll as n, encryptPrivkey as r, NostrIdentity as t };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1, o as encryptPrivkey, s as generateNostrKeypair, t as NostrIdentity } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
2
+ import { i as generateNostrKeypair, n as __exportAll$1, r as encryptPrivkey, t as NostrIdentity } from "./NostrIdentity-AC8fAdxe-Crl0np5c.js";
3
3
  import { SmrtCollection } from "@happyvertical/smrt-core";
4
4
  //#region ../profiles/dist/chunks/NostrIdentityCollection-CctlECpX.js
5
5
  var NostrIdentityCollection_CctlECpX_exports = /* @__PURE__ */ __exportAll({
@@ -124,4 +124,4 @@ var NostrIdentityCollection = class extends SmrtCollection {
124
124
  }
125
125
  };
126
126
  //#endregion
127
- export { NostrIdentityCollection_CctlECpX_exports as n, NostrIdentityCollection as t };
127
+ export { NostrIdentityCollection_CctlECpX_exports as t };
@@ -42,7 +42,7 @@ var OidcIdentity = class extends SmrtObject {
42
42
  * Find identity by issuer and subject
43
43
  */
44
44
  static async findBySubject(issuer, subject, options = {}) {
45
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-CiymEMsR.js").then((n) => n.r).then((n) => n.r);
45
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DRzTBrqP.js").then((n) => n.r).then((n) => n.r);
46
46
  return await (await OidcIdentityCollection.create(options)).findBySubject(issuer, subject);
47
47
  }
48
48
  /** Build the collision-free natural key for one OIDC issuer subject. */
@@ -65,7 +65,7 @@ var OidcIdentity = class extends SmrtObject {
65
65
  static async findOrCreate(profile, oidcData, options = {}) {
66
66
  const profileId = profile.id;
67
67
  if (typeof profileId !== "string" || !profileId) throw new Error("OidcIdentity.findOrCreate() requires a saved Profile.");
68
- const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-CkyqvctR-CxRDO4Kf.js").then((n) => n.i).then((n) => n.i);
68
+ const { reuseExistingOidcIdentityForProfile } = await import("./resolveIdentity-CkyqvctR-C7H56d7-.js").then((n) => n.t).then((n) => n.i);
69
69
  const profileOptions = profile.options ?? {};
70
70
  return (await reuseExistingOidcIdentityForProfile(profileId, {
71
71
  email: oidcData.email,
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
3
- import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-C75_f06o.js";
2
+ import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-Crl0np5c.js";
3
+ import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-CRp_hqHx.js";
4
4
  import { SmrtCollection } from "@happyvertical/smrt-core";
5
5
  //#region ../profiles/dist/chunks/OidcIdentityCollection-ClOyaHeF.js
6
6
  var OidcIdentityCollection_ClOyaHeF_exports = /* @__PURE__ */ __exportAll({