@happyvertical/smrt-cli 0.55.24 → 0.56.1

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 +1 -0
  2. package/agents/commerce-money-migration.md +48 -0
  3. package/cookbooks/bakery.cookbook.json +0 -6
  4. package/dist/{AuditLogCollection-WDHL-_AF-DouK1Eae.js → AuditLogCollection-WDHL-_AF-x25-BNOH.js} +1 -1
  5. package/dist/{OidcIdentity-BUblgQLs-CNNli2DQ.js → OidcIdentity-BUblgQLs-HnNEVZJE.js} +2 -2
  6. package/dist/{OidcIdentityCollection-ClOyaHeF-DJLanr7E.js → OidcIdentityCollection-ClOyaHeF-B6ywCED-.js} +1 -1
  7. package/dist/{ProfileAssetCollection-CRMcjLJ--CFqI5q46.js → ProfileAssetCollection-CRMcjLJ--Dtcl0Z7Y.js} +3 -3
  8. package/dist/{ProfileCollection-C4INKh7Y-D6e5tqo8.js → ProfileCollection-C4INKh7Y-CnRSIu8K.js} +17 -17
  9. package/dist/{ProfileLinkCollection-DFfZRsgv-DsyTUUGb.js → ProfileLinkCollection-DFfZRsgv-DoNRyhzW.js} +2 -2
  10. package/dist/{ProfileMetadataCollection-BIYKy4Y3-BSnmu5sJ.js → ProfileMetadataCollection-BIYKy4Y3-CIcxshqJ.js} +1 -1
  11. package/dist/{ProfileMetafieldCollection-Buz7gzag-J95p2ceE.js → ProfileMetafieldCollection-Buz7gzag-Qp89uhvS.js} +1 -1
  12. package/dist/{ProfileRelationshipCollection-C4g_QLI4-DMB7kVSi.js → ProfileRelationshipCollection-C4g_QLI4-CpdzgFU_.js} +1 -1
  13. package/dist/{ProfileTypeCollection-B7kwi1mU-CoSsSdjG.js → ProfileTypeCollection-B7kwi1mU-B_Qzmn0A.js} +2 -2
  14. package/dist/cli-generator.d.ts.map +1 -1
  15. package/dist/commands/db-commerce-money.d.ts +5 -0
  16. package/dist/commands/db-commerce-money.d.ts.map +1 -0
  17. package/dist/commands/utilities.d.ts.map +1 -1
  18. package/dist/{commands-DvzqouRS.js → commands-C33Y1BAd.js} +227 -4
  19. package/dist/dist-BDluiNWl.js +21 -0
  20. package/dist/{dist-Cqg20PEG.js → dist-BulInGkA.js} +9 -9
  21. package/dist/{dist-DmJdWWb4.js → dist-CinSOkIj.js} +51 -4
  22. package/dist/dist-DEgeX-y-.js +1807 -0
  23. package/dist/dist-Dog5zD4-.js +4620 -0
  24. package/dist/index.js +15 -12
  25. package/dist/loaders/consumer-package.d.ts +5 -0
  26. package/dist/loaders/consumer-package.d.ts.map +1 -0
  27. package/dist/{oidcProvisioningPrimitives-DNP9EZlU-65O_WC7R.js → oidcProvisioningPrimitives-DNP9EZlU-DRKMXFiq.js} +3 -3
  28. package/dist/{resolveIdentity-CkyqvctR-CYvO_LB1.js → resolveIdentity-CkyqvctR-lxunfjyo.js} +14 -14
  29. package/dist/{server-C69K3w-t.js → server-D2wRPnk0.js} +1 -1
  30. package/package.json +15 -15
  31. package/dist/dist-BWdwP2Tj.js +0 -1807
  32. package/dist/dist-CrEv84QX.js +0 -4555
  33. package/dist/dist-gc8-LLPO.js +0 -21
package/dist/index.js CHANGED
@@ -51,77 +51,77 @@ var _cookbookCommands = null;
51
51
  var _kitchenCommands = null;
52
52
  async function getGnodeCommands() {
53
53
  if (!_gnodeCommands) {
54
- const { gnodeCommands } = await import("./commands-DvzqouRS.js");
54
+ const { gnodeCommands } = await import("./commands-C33Y1BAd.js");
55
55
  _gnodeCommands = gnodeCommands;
56
56
  }
57
57
  return _gnodeCommands;
58
58
  }
59
59
  async function getGitCommands() {
60
60
  if (!_gitCommands) {
61
- const { gitCommands } = await import("./commands-DvzqouRS.js");
61
+ const { gitCommands } = await import("./commands-C33Y1BAd.js");
62
62
  _gitCommands = gitCommands;
63
63
  }
64
64
  return _gitCommands;
65
65
  }
66
66
  async function getGenerateCommands() {
67
67
  if (!_generateCommands) {
68
- const { generateCommands } = await import("./commands-DvzqouRS.js");
68
+ const { generateCommands } = await import("./commands-C33Y1BAd.js");
69
69
  _generateCommands = generateCommands;
70
70
  }
71
71
  return _generateCommands;
72
72
  }
73
73
  async function getInitCommands() {
74
74
  if (!_initCommands) {
75
- const { initCommands } = await import("./commands-DvzqouRS.js");
75
+ const { initCommands } = await import("./commands-C33Y1BAd.js");
76
76
  _initCommands = initCommands;
77
77
  }
78
78
  return _initCommands;
79
79
  }
80
80
  async function getUtilityCommands() {
81
81
  if (!_utilityCommands) {
82
- const { utilityCommands } = await import("./commands-DvzqouRS.js");
82
+ const { utilityCommands } = await import("./commands-C33Y1BAd.js");
83
83
  _utilityCommands = utilityCommands;
84
84
  }
85
85
  return _utilityCommands;
86
86
  }
87
87
  async function getDispatchCommands() {
88
88
  if (!_dispatchCommands) {
89
- const { dispatchCommands } = await import("./commands-DvzqouRS.js");
89
+ const { dispatchCommands } = await import("./commands-C33Y1BAd.js");
90
90
  _dispatchCommands = dispatchCommands;
91
91
  }
92
92
  return _dispatchCommands;
93
93
  }
94
94
  async function getDocsCommands() {
95
95
  if (!_docsCommands) {
96
- const { docsCommands } = await import("./commands-DvzqouRS.js");
96
+ const { docsCommands } = await import("./commands-C33Y1BAd.js");
97
97
  _docsCommands = docsCommands;
98
98
  }
99
99
  return _docsCommands;
100
100
  }
101
101
  async function getPlaygroundCommands() {
102
102
  if (!_playgroundCommands) {
103
- const { playgroundCommands } = await import("./commands-DvzqouRS.js");
103
+ const { playgroundCommands } = await import("./commands-C33Y1BAd.js");
104
104
  _playgroundCommands = playgroundCommands;
105
105
  }
106
106
  return _playgroundCommands;
107
107
  }
108
108
  async function getCookbookCommands() {
109
109
  if (!_cookbookCommands) {
110
- const { cookbookCommands } = await import("./commands-DvzqouRS.js");
110
+ const { cookbookCommands } = await import("./commands-C33Y1BAd.js");
111
111
  _cookbookCommands = cookbookCommands;
112
112
  }
113
113
  return _cookbookCommands;
114
114
  }
115
115
  async function getKitchenCommands() {
116
116
  if (!_kitchenCommands) {
117
- const { kitchenCommands } = await import("./commands-DvzqouRS.js");
117
+ const { kitchenCommands } = await import("./commands-C33Y1BAd.js");
118
118
  _kitchenCommands = kitchenCommands;
119
119
  }
120
120
  return _kitchenCommands;
121
121
  }
122
122
  async function getWorkbenchCommands() {
123
123
  if (!_workbenchCommands) {
124
- const { workbenchCommands } = await import("./commands-DvzqouRS.js");
124
+ const { workbenchCommands } = await import("./commands-C33Y1BAd.js");
125
125
  _workbenchCommands = workbenchCommands;
126
126
  }
127
127
  return _workbenchCommands;
@@ -592,11 +592,13 @@ var CLIGenerator = class {
592
592
  const commands = [];
593
593
  const lowerName = objectName.toLowerCase();
594
594
  if (isFrameworkBaseClass(objectName, _classInfo?.packageName)) return commands;
595
- const cliConfig = ObjectRegistry.getConfig(objectName).cli;
595
+ const config = ObjectRegistry.getConfig(objectName);
596
+ const cliConfig = config.cli;
596
597
  if (cliConfig === false) return commands;
597
598
  const excluded = (typeof cliConfig === "object" ? cliConfig.exclude : []) || [];
598
599
  const included = typeof cliConfig === "object" ? cliConfig.include : null;
599
600
  const shouldInclude = (command) => {
601
+ if (config.abstract && command !== "list" && command !== "get") return false;
600
602
  if (included && !included.includes(command)) return false;
601
603
  if (excluded.includes(command)) return false;
602
604
  return true;
@@ -722,6 +724,7 @@ var CLIGenerator = class {
722
724
  await this.handleDelete(objectName, args[0], options);
723
725
  }
724
726
  });
727
+ if (config.abstract) return commands;
725
728
  const methods = await ObjectRegistry.getAllMethods(objectName);
726
729
  const hasCustomMethodsInInclude = included?.some((item) => !isCrudOperation(item));
727
730
  const reservedCommandNames = new Set(commands.flatMap((command) => [command.name, ...command.aliases ?? []]));
@@ -0,0 +1,5 @@
1
+ /** Resolve a package entry from the invoking consumer project, not the CLI's install. */
2
+ export declare function resolveConsumerPackageEntry(packageName: string, projectRoot?: string): Promise<string>;
3
+ /** Import an optional command provider through the consumer's package graph. */
4
+ export declare function importConsumerPackage<T>(packageName: string, projectRoot?: string): Promise<T>;
5
+ //# sourceMappingURL=consumer-package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consumer-package.d.ts","sourceRoot":"","sources":["../../src/loaders/consumer-package.ts"],"names":[],"mappings":"AAqBA,yFAAyF;AACzF,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,MAAM,CAAC,CA4CjB;AAED,gFAAgF;AAChF,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,WAAW,EAAE,MAAM,EACnB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,CAAC,CAAC,CAGZ"}
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { n as __exportAll$1 } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
3
- import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-CNNli2DQ.js";
4
- import { a as ProfileCollection, f as saveOidcRaceArbiter, i as Profile } from "./ProfileCollection-C4INKh7Y-D6e5tqo8.js";
5
- import { t as ProfileTypeCollection } from "./ProfileTypeCollection-B7kwi1mU-CoSsSdjG.js";
3
+ import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-HnNEVZJE.js";
4
+ import { a as ProfileCollection, f as saveOidcRaceArbiter, i as Profile } from "./ProfileCollection-C4INKh7Y-CnRSIu8K.js";
5
+ import { t as ProfileTypeCollection } from "./ProfileTypeCollection-B7kwi1mU-B_Qzmn0A.js";
6
6
  import { smrt } from "@happyvertical/smrt-core";
7
7
  //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-DNP9EZlU.js
8
8
  var oidcProvisioningPrimitives_DNP9EZlU_exports = /* @__PURE__ */ __exportAll({
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { u as withSystemContext } from "./dist-Cqg20PEG.js";
2
+ import { u as withSystemContext } from "./dist-BulInGkA.js";
3
3
  import { n as __exportAll$1, t as NostrIdentity, u as verifyAuthEvent } from "./NostrIdentity-AC8fAdxe-DKxKyu_a.js";
4
4
  import { t as ApiKey } from "./ApiKey-CVmlf3V6-BAeHuH48.js";
5
- import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-CNNli2DQ.js";
6
- import { c as coordinateOidcProvisioning, l as isOidcProvisioningRaceConflict, u as normalizeIdentityEmail } from "./ProfileCollection-C4INKh7Y-D6e5tqo8.js";
7
- import { a as insertOidcProvisioningIdentity, i as createOidcProvisioningPerson } from "./oidcProvisioningPrimitives-DNP9EZlU-65O_WC7R.js";
5
+ import { t as OidcIdentity } from "./OidcIdentity-BUblgQLs-HnNEVZJE.js";
6
+ import { c as coordinateOidcProvisioning, l as isOidcProvisioningRaceConflict, u as normalizeIdentityEmail } from "./ProfileCollection-C4INKh7Y-CnRSIu8K.js";
7
+ import { a as insertOidcProvisioningIdentity, i as createOidcProvisioningPerson } from "./oidcProvisioningPrimitives-DNP9EZlU-DRKMXFiq.js";
8
8
  import { resolveDatabase } from "@happyvertical/smrt-core";
9
9
  //#region ../profiles/dist/chunks/resolveIdentity-CkyqvctR.js
10
10
  var resolveIdentity_CkyqvctR_exports = /* @__PURE__ */ __exportAll({
@@ -72,13 +72,13 @@ async function resolveIdentity(context) {
72
72
  };
73
73
  }
74
74
  async function findProfileByExternalId(provider, externalId, options) {
75
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DJLanr7E.js").then((n) => n.r).then((n) => n.r);
75
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-B6ywCED-.js").then((n) => n.r).then((n) => n.r);
76
76
  const identities = await (await OidcIdentityCollection.create(options)).findByProvider(provider);
77
77
  for (const identity of identities) if (identity.subject === externalId || identity.email?.includes(externalId)) {
78
78
  const profile = await identity.getProfile();
79
79
  if (profile) return profile;
80
80
  }
81
- const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-D6e5tqo8.js").then((n) => n.o).then((n) => n.r);
81
+ const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-CnRSIu8K.js").then((n) => n.o).then((n) => n.r);
82
82
  const profiles = await (await ProfileCollection.create(options)).list({
83
83
  where: { email: `${externalId}@users.noreply.github.com` },
84
84
  limit: 1
@@ -99,7 +99,7 @@ async function reuseExistingOidcIdentityForProfile(profileId, claims, provider,
99
99
  createConcurrencyError: (cause) => new Error("Concurrent exact OIDC identity reuse did not converge.", cause === void 0 ? void 0 : { cause }),
100
100
  rebindRootResult: rebindOidcProfileResult,
101
101
  provision: (tx) => withSystemContext(async () => {
102
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DJLanr7E.js").then((n) => n.r).then((n) => n.r);
102
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-B6ywCED-.js").then((n) => n.r).then((n) => n.r);
103
103
  const identity = await (await OidcIdentityCollection.create({ db: tx })).findBySubject(normalizedClaims.iss, normalizedClaims.sub);
104
104
  if (!identity) throw new Error("OidcIdentity.findOrCreate() no longer creates authentication links; use UserCollection.getOrCreateFromOidc() or createProfileFromOidc().");
105
105
  if (identity.profileId !== profileId) throw new Error(`OIDC identity ${normalizedClaims.iss} subject ${normalizedClaims.sub} belongs to a different Profile.`);
@@ -133,7 +133,7 @@ async function coordinateProfileOidcProvisioning(claims, provider, options) {
133
133
  });
134
134
  }
135
135
  async function provisionOidcProfile(claims, provider, options) {
136
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DJLanr7E.js").then((n) => n.r).then((n) => n.r);
136
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-B6ywCED-.js").then((n) => n.r).then((n) => n.r);
137
137
  const existingIdentity = await (await OidcIdentityCollection.create(options)).findBySubject(claims.iss, claims.sub);
138
138
  if (existingIdentity) {
139
139
  const profile2 = await existingIdentity.getProfile();
@@ -148,7 +148,7 @@ async function provisionOidcProfile(claims, provider, options) {
148
148
  created: false
149
149
  };
150
150
  }
151
- const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-D6e5tqo8.js").then((n) => n.o).then((n) => n.r);
151
+ const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-CnRSIu8K.js").then((n) => n.o).then((n) => n.r);
152
152
  const profileCollection = await ProfileCollection.create(options);
153
153
  if (claims.email) {
154
154
  if (await profileCollection.findUniqueGlobalPersonByEmail(claims.email)) {
@@ -175,8 +175,8 @@ async function provisionOidcProfile(claims, provider, options) {
175
175
  };
176
176
  }
177
177
  async function rebindOidcProfileResult(result, rootDb) {
178
- const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-DJLanr7E.js").then((n) => n.r).then((n) => n.r);
179
- const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-D6e5tqo8.js").then((n) => n.o).then((n) => n.r);
178
+ const { OidcIdentityCollection } = await import("./OidcIdentityCollection-ClOyaHeF-B6ywCED-.js").then((n) => n.r).then((n) => n.r);
179
+ const { ProfileCollection } = await import("./ProfileCollection-C4INKh7Y-CnRSIu8K.js").then((n) => n.o).then((n) => n.r);
180
180
  const profileId = requireOidcProfileId(result.profile.id);
181
181
  const identityId = requireOidcProfileId(result.oidcIdentity.id);
182
182
  const [profile, oidcIdentity] = await withSystemContext(async () => {
@@ -225,11 +225,11 @@ async function createProfileFromNostr(email, nostrData, options) {
225
225
  created: false
226
226
  };
227
227
  }
228
- const { Person } = await import("./oidcProvisioningPrimitives-DNP9EZlU-65O_WC7R.js").then((n) => n.o).then((n) => n.o);
229
- const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7kwi1mU-CoSsSdjG.js").then((n) => n.n).then((n) => n.n);
228
+ const { Person } = await import("./oidcProvisioningPrimitives-DNP9EZlU-DRKMXFiq.js").then((n) => n.o).then((n) => n.o);
229
+ const { ProfileTypeCollection } = await import("./ProfileTypeCollection-B7kwi1mU-B_Qzmn0A.js").then((n) => n.n).then((n) => n.n);
230
230
  let personType = await (await ProfileTypeCollection.create(options)).getBySlug("person");
231
231
  if (!personType) {
232
- const { ProfileType } = await import("./ProfileCollection-C4INKh7Y-D6e5tqo8.js").then((n) => n.o).then((n) => n.h);
232
+ const { ProfileType } = await import("./ProfileCollection-C4INKh7Y-CnRSIu8K.js").then((n) => n.o).then((n) => n.h);
233
233
  personType = new ProfileType({
234
234
  ...options,
235
235
  slug: "person",
@@ -628,7 +628,7 @@ function describeSnapshot(snapshot) {
628
628
  `recipes: ${recipes}`,
629
629
  ...snapshot.features.length ? [`features: ${snapshot.features.join(", ")}`] : [],
630
630
  ...snapshot.unavailable.length ? [`unavailable: ${snapshot.unavailable.join(", ")}`] : [],
631
- `settings: ${snapshot.settings.currency}, tax ${snapshot.settings.taxRate}%, ${snapshot.settings.paymentTerms}`,
631
+ `settings: ${snapshot.settings.currency}, tax ${snapshot.settings.taxRate}% ${snapshot.settings.pricesIncludeTax ? "included" : "excluded"}, ${snapshot.settings.taxRounding} rounding, ${snapshot.settings.paymentTerms}`,
632
632
  `theme: ${snapshot.theme.text}`,
633
633
  `menu: ${menu || "empty"}`
634
634
  ].join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-cli",
3
- "version": "0.55.24",
3
+ "version": "0.56.1",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,20 +30,20 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@happyvertical/ai": "^0.103.6",
34
- "@happyvertical/files": "^0.103.6",
35
- "@happyvertical/logger": "^0.103.6",
36
- "@happyvertical/smrt-agents": "0.55.24",
37
- "@happyvertical/smrt-app-runtime": "0.55.24",
38
- "@happyvertical/smrt-config": "0.55.24",
39
- "@happyvertical/smrt-core": "0.55.24",
40
- "@happyvertical/smrt-dev-mcp": "0.55.24",
41
- "@happyvertical/smrt-ledgers": "0.55.24",
42
- "@happyvertical/smrt-playground": "0.55.24",
43
- "@happyvertical/smrt-types": "0.55.24",
44
- "@happyvertical/smrt-users": "0.55.24",
45
- "@happyvertical/sql": "^0.103.6",
46
- "@happyvertical/utils": "^0.103.6",
33
+ "@happyvertical/ai": "^0.103.7",
34
+ "@happyvertical/files": "^0.103.7",
35
+ "@happyvertical/logger": "^0.103.7",
36
+ "@happyvertical/smrt-agents": "0.56.1",
37
+ "@happyvertical/smrt-app-runtime": "0.56.1",
38
+ "@happyvertical/smrt-config": "0.56.1",
39
+ "@happyvertical/smrt-core": "0.56.1",
40
+ "@happyvertical/smrt-dev-mcp": "0.56.1",
41
+ "@happyvertical/smrt-ledgers": "0.56.1",
42
+ "@happyvertical/smrt-playground": "0.56.1",
43
+ "@happyvertical/smrt-types": "0.56.1",
44
+ "@happyvertical/smrt-users": "0.56.1",
45
+ "@happyvertical/sql": "^0.103.7",
46
+ "@happyvertical/utils": "^0.103.7",
47
47
  "@modelcontextprotocol/server": "2.0.0",
48
48
  "acorn": "^8.18.0",
49
49
  "fast-glob": "3.3.3",