@happyvertical/smrt-cli 0.51.39 → 0.53.0

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 (56) hide show
  1. package/AGENTS.md +7 -2
  2. package/README.md +22 -0
  3. package/agents/type-drift.md +16 -0
  4. package/dist/{ApiKey-BZmbOTnL-DEwZtcGA.js → ApiKey-BZmbOTnL-d61__hH4.js} +2 -2
  5. package/dist/ApiKeyCollection-Bfb_nw81-BVJ-i1Aw.js +2 -0
  6. package/dist/AuditLogCollection-B1YonCAP-bpq7rM2b.js +2 -0
  7. package/dist/{NostrIdentity-n70E0vck-DiBJPv76.js → NostrIdentity-n70E0vck-CmFPKTaE.js} +3 -3
  8. package/dist/NostrIdentityCollection-Ca74dkaL-C0rNgSy-.js +2 -0
  9. package/dist/{OidcIdentity-K8V4u0CR-B_ek3cPN.js → OidcIdentity-Cb1bxreM-L5LCgsel.js} +3 -3
  10. package/dist/OidcIdentityCollection-TV8VdK69-CUmZ-j4r.js +2 -0
  11. package/dist/ProfileAssetCollection-B9hacUJa-C53RAi1e.js +2 -0
  12. package/dist/{ProfileCollection-DTT4KNpQ-D1RNYfjm.js → ProfileCollection-DuJT7Mum-zuWR2h3v.js} +69 -31
  13. package/dist/ProfileLinkCollection-4uNURz32-Fmbnrmyr.js +2 -0
  14. package/dist/ProfileMetadataCollection-DQhbfEfa-D30yWyzB.js +2 -0
  15. package/dist/{ProfileMetafieldCollection-CMKhVi2I-mh3UgeZA.js → ProfileMetafieldCollection-CoBuM_5G-TNxSMsBJ.js} +1 -1
  16. package/dist/{ProfileRelationshipCollection-DUVgaIqf-CXHrAni4.js → ProfileRelationshipCollection-DUVgaIqf-CKcxS2xW.js} +1 -1
  17. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-Cj4bLTpU.js → ProfileRelationshipTermCollection-DtA9OM23-h-4GhOFl.js} +1 -1
  18. package/dist/{ProfileRelationshipType-BRiRka6t-ICv2cawn.js → ProfileRelationshipType-BRiRka6t-BFgCVe6p.js} +1 -1
  19. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-CaYLxJmh.js → ProfileRelationshipTypeCollection-BdXwd7Kf-Djb3_k5Z.js} +1 -1
  20. package/dist/cli-generator.d.ts.map +1 -1
  21. package/dist/commands/db-diff.d.ts.map +1 -1
  22. package/dist/commands/db-history.d.ts.map +1 -1
  23. package/dist/commands/db-migrate-actions.d.ts +7 -0
  24. package/dist/commands/db-migrate-actions.d.ts.map +1 -1
  25. package/dist/commands/db-parity.d.ts +7 -0
  26. package/dist/commands/db-parity.d.ts.map +1 -1
  27. package/dist/commands/db-qualified-names.d.ts +39 -0
  28. package/dist/commands/db-qualified-names.d.ts.map +1 -0
  29. package/dist/commands/db-status.d.ts.map +1 -1
  30. package/dist/commands/gnode.d.ts.map +1 -1
  31. package/dist/commands/index.d.ts +1 -0
  32. package/dist/commands/index.d.ts.map +1 -1
  33. package/dist/commands/mcp-apps-packaging.d.ts +24 -0
  34. package/dist/commands/mcp-apps-packaging.d.ts.map +1 -0
  35. package/dist/commands/tenant-natural-keys.d.ts +58 -0
  36. package/dist/commands/tenant-natural-keys.d.ts.map +1 -0
  37. package/dist/commands/utilities.d.ts.map +1 -1
  38. package/dist/{commands-C2PjCUio.js → commands-e1tsvozP.js} +650 -22
  39. package/dist/{dist-B3npUhW6.js → dist-8C4XjDhz.js} +151 -6
  40. package/dist/{dist-C8sNOzr2.js → dist-CLA60jwS.js} +4 -4
  41. package/dist/dist-CksLvqnZ.js +1705 -0
  42. package/dist/dist-DtTkpUee.js +3937 -0
  43. package/dist/index.js +17 -11
  44. package/dist/{json-validator-oEN7eUI3.js → json-validator-BiAdsE1O.js} +4 -4
  45. package/dist/{oidcProvisioningPrimitives-0-3n3D6f-yUBRl2DC.js → oidcProvisioningPrimitives-D9OYu5-F-CJ6bTipi.js} +7 -7
  46. package/dist/resolveIdentity-B-PK6RwU-DxJFF8ad.js +2 -0
  47. package/package.json +16 -15
  48. package/dist/ApiKeyCollection-Bfb_nw81-D4pLjDGS.js +0 -2
  49. package/dist/AuditLogCollection-B1YonCAP-w1iOHW4A.js +0 -2
  50. package/dist/NostrIdentityCollection-Ca74dkaL-Ce-O_zQz.js +0 -2
  51. package/dist/OidcIdentityCollection-gnrLoF08-DJI-69Ow.js +0 -2
  52. package/dist/ProfileAssetCollection-CmbeSgDi-BpJ7XXsP.js +0 -2
  53. package/dist/ProfileMetadataCollection-DxX_BJKV-orYFlYii.js +0 -2
  54. package/dist/dist-DsMohSo_.js +0 -1487
  55. package/dist/dist-iMaSv6C_.js +0 -3712
  56. package/dist/resolveIdentity-BrJDCjYi-kdAssLr0.js +0 -2
package/dist/index.js CHANGED
@@ -49,63 +49,63 @@ var _playgroundCommands = null;
49
49
  var _workbenchCommands = null;
50
50
  async function getGnodeCommands() {
51
51
  if (!_gnodeCommands) {
52
- const { gnodeCommands } = await import("./commands-C2PjCUio.js");
52
+ const { gnodeCommands } = await import("./commands-e1tsvozP.js");
53
53
  _gnodeCommands = gnodeCommands;
54
54
  }
55
55
  return _gnodeCommands;
56
56
  }
57
57
  async function getGitCommands() {
58
58
  if (!_gitCommands) {
59
- const { gitCommands } = await import("./commands-C2PjCUio.js");
59
+ const { gitCommands } = await import("./commands-e1tsvozP.js");
60
60
  _gitCommands = gitCommands;
61
61
  }
62
62
  return _gitCommands;
63
63
  }
64
64
  async function getGenerateCommands() {
65
65
  if (!_generateCommands) {
66
- const { generateCommands } = await import("./commands-C2PjCUio.js");
66
+ const { generateCommands } = await import("./commands-e1tsvozP.js");
67
67
  _generateCommands = generateCommands;
68
68
  }
69
69
  return _generateCommands;
70
70
  }
71
71
  async function getInitCommands() {
72
72
  if (!_initCommands) {
73
- const { initCommands } = await import("./commands-C2PjCUio.js");
73
+ const { initCommands } = await import("./commands-e1tsvozP.js");
74
74
  _initCommands = initCommands;
75
75
  }
76
76
  return _initCommands;
77
77
  }
78
78
  async function getUtilityCommands() {
79
79
  if (!_utilityCommands) {
80
- const { utilityCommands } = await import("./commands-C2PjCUio.js");
80
+ const { utilityCommands } = await import("./commands-e1tsvozP.js");
81
81
  _utilityCommands = utilityCommands;
82
82
  }
83
83
  return _utilityCommands;
84
84
  }
85
85
  async function getDispatchCommands() {
86
86
  if (!_dispatchCommands) {
87
- const { dispatchCommands } = await import("./commands-C2PjCUio.js");
87
+ const { dispatchCommands } = await import("./commands-e1tsvozP.js");
88
88
  _dispatchCommands = dispatchCommands;
89
89
  }
90
90
  return _dispatchCommands;
91
91
  }
92
92
  async function getDocsCommands() {
93
93
  if (!_docsCommands) {
94
- const { docsCommands } = await import("./commands-C2PjCUio.js");
94
+ const { docsCommands } = await import("./commands-e1tsvozP.js");
95
95
  _docsCommands = docsCommands;
96
96
  }
97
97
  return _docsCommands;
98
98
  }
99
99
  async function getPlaygroundCommands() {
100
100
  if (!_playgroundCommands) {
101
- const { playgroundCommands } = await import("./commands-C2PjCUio.js");
101
+ const { playgroundCommands } = await import("./commands-e1tsvozP.js");
102
102
  _playgroundCommands = playgroundCommands;
103
103
  }
104
104
  return _playgroundCommands;
105
105
  }
106
106
  async function getWorkbenchCommands() {
107
107
  if (!_workbenchCommands) {
108
- const { workbenchCommands } = await import("./commands-C2PjCUio.js");
108
+ const { workbenchCommands } = await import("./commands-e1tsvozP.js");
109
109
  _workbenchCommands = workbenchCommands;
110
110
  }
111
111
  return _workbenchCommands;
@@ -820,7 +820,8 @@ var CLIGenerator = class {
820
820
  ...playgroundCommands,
821
821
  ...workbenchCommands
822
822
  };
823
- const builtInCommand = builtInCommands[parsed.command] ?? Object.values(builtInCommands).find((cmd) => cmd.name === parsed.command || cmd.aliases?.includes(parsed.command ?? ""));
823
+ const builtInMatch = matchLeadingCommand(processedArgv, [], builtInCommands);
824
+ const builtInCommand = builtInMatch.command ?? builtInCommands[parsed.command] ?? Object.values(builtInCommands).find((cmd) => cmd.name === parsed.command || cmd.aliases?.includes(parsed.command ?? ""));
824
825
  if (builtInCommand) {
825
826
  const requiredArgCount = countRequiredArgs(builtInCommand.args);
826
827
  if (parsed.args.length < requiredArgCount) {
@@ -832,7 +833,12 @@ var CLIGenerator = class {
832
833
  this.exitWithError(`Command '${parsed.command}' has no handler defined`);
833
834
  return;
834
835
  }
835
- const reParsed = parseCliCommandArgs(processedArgv, [builtInCommand], {});
836
+ const start = firstArgumentIndex(processedArgv);
837
+ const reParsed = parseCliCommandArgs(builtInMatch.command && builtInMatch.wordCount > 1 ? [
838
+ ...processedArgv.slice(0, start),
839
+ builtInCommand.name,
840
+ ...processedArgv.slice(start + builtInMatch.wordCount)
841
+ ] : processedArgv, [builtInCommand], {});
836
842
  try {
837
843
  await builtInCommand.handler(reParsed.args, reParsed.options);
838
844
  return;
@@ -61,7 +61,7 @@ var ValidationCodes = {
61
61
  * toSnakeCase('id'); // 'id'
62
62
  * ```
63
63
  */
64
- function toSnakeCase(str) {
64
+ function toSnakeCase$1(str) {
65
65
  return str.replace(/([A-Z])/g, "_$1").toLowerCase().replace(/^_/, "");
66
66
  }
67
67
  /**
@@ -436,7 +436,7 @@ var JsonDatabaseValidator = class {
436
436
  */
437
437
  validateField(record, fieldName, fieldDef, filePath, objectId) {
438
438
  const issues = [];
439
- const value = record[toSnakeCase(fieldName)];
439
+ const value = record[toSnakeCase$1(fieldName)];
440
440
  const fieldType = fieldDef.type;
441
441
  if (fieldDef.required && (value === void 0 || value === null)) {
442
442
  issues.push({
@@ -650,7 +650,7 @@ var JsonDatabaseValidator = class {
650
650
  const rec = record;
651
651
  const recordId = rec.id || `[unknown]`;
652
652
  for (const [fieldName, fieldDef] of fkFields) {
653
- const fkValue = rec[toSnakeCase(fieldName)];
653
+ const fkValue = rec[toSnakeCase$1(fieldName)];
654
654
  if (!fkValue) continue;
655
655
  const targetClass = fieldDef.related;
656
656
  if (!targetClass) continue;
@@ -733,7 +733,7 @@ var JsonDatabaseValidator = class {
733
733
  if (record && issue.objectType) {
734
734
  const fieldDef = ObjectRegistry.getFields(issue.objectType).get(issue.field);
735
735
  if (fieldDef?.default !== void 0) {
736
- const snakeCaseField = toSnakeCase(issue.field);
736
+ const snakeCaseField = toSnakeCase$1(issue.field);
737
737
  record[snakeCaseField] = fieldDef.default;
738
738
  fixedCount++;
739
739
  }
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { s as isSystemContext } from "./dist-B3npUhW6.js";
3
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-DiBJPv76.js";
4
- import { t as OidcIdentity } from "./OidcIdentity-K8V4u0CR-B_ek3cPN.js";
5
- import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DTT4KNpQ-D1RNYfjm.js";
2
+ import { c as isSystemContext } from "./dist-8C4XjDhz.js";
3
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-CmFPKTaE.js";
4
+ import { t as OidcIdentity } from "./OidcIdentity-Cb1bxreM-L5LCgsel.js";
5
+ import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DuJT7Mum-zuWR2h3v.js";
6
6
  import { SmrtCollection, smrt } from "@happyvertical/smrt-core";
7
- //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-0-3n3D6f.js
8
- var oidcProvisioningPrimitives_0_3n3D6f_exports = /* @__PURE__ */ __exportAll({
7
+ //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-D9OYu5-F.js
8
+ var oidcProvisioningPrimitives_D9OYu5_F_exports = /* @__PURE__ */ __exportAll({
9
9
  a: () => Person,
10
10
  c: () => ProfileTypeCollection_exports,
11
11
  i: () => Organization,
@@ -158,4 +158,4 @@ function requireProvisioningId(value, label) {
158
158
  return value;
159
159
  }
160
160
  //#endregion
161
- export { insertOidcProvisioningIdentity as n, oidcProvisioningPrimitives_0_3n3D6f_exports as r, createOidcProvisioningPerson as t };
161
+ export { insertOidcProvisioningIdentity as n, oidcProvisioningPrimitives_D9OYu5_F_exports as r, createOidcProvisioningPerson as t };
@@ -0,0 +1,2 @@
1
+ import { i as resolveIdentity_exports } from "./dist-DtTkpUee.js";
2
+ export { resolveIdentity_exports as i };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-cli",
3
- "version": "0.51.39",
3
+ "version": "0.53.0",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,22 +25,23 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@happyvertical/ai": "^0.96.0",
29
- "@happyvertical/files": "^0.96.0",
30
- "@happyvertical/logger": "^0.96.0",
31
- "@happyvertical/smrt-agents": "0.51.39",
32
- "@happyvertical/smrt-config": "0.51.39",
33
- "@happyvertical/smrt-core": "0.51.39",
34
- "@happyvertical/smrt-dev-mcp": "0.51.39",
35
- "@happyvertical/smrt-ledgers": "0.51.39",
36
- "@happyvertical/smrt-playground": "0.51.39",
37
- "@happyvertical/smrt-types": "0.51.39",
38
- "@happyvertical/smrt-users": "0.51.39",
39
- "@happyvertical/sql": "^0.96.0",
40
- "@happyvertical/utils": "^0.96.0",
28
+ "@happyvertical/ai": "^0.98.0",
29
+ "@happyvertical/files": "^0.98.0",
30
+ "@happyvertical/logger": "^0.98.0",
31
+ "@happyvertical/smrt-agents": "0.53.0",
32
+ "@happyvertical/smrt-config": "0.53.0",
33
+ "@happyvertical/smrt-core": "0.53.0",
34
+ "@happyvertical/smrt-dev-mcp": "0.53.0",
35
+ "@happyvertical/smrt-ledgers": "0.53.0",
36
+ "@happyvertical/smrt-playground": "0.53.0",
37
+ "@happyvertical/smrt-types": "0.53.0",
38
+ "@happyvertical/smrt-users": "0.53.0",
39
+ "@happyvertical/sql": "^0.98.0",
40
+ "@happyvertical/utils": "^0.98.0",
41
41
  "acorn": "^8.18.0",
42
42
  "fast-glob": "3.3.3",
43
- "tar": "^7.5.22"
43
+ "tar": "^7.5.22",
44
+ "ajv": "8.20.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@types/node": "24.13.6",
@@ -1,2 +0,0 @@
1
- import { j as ApiKeyCollection_exports } from "./dist-iMaSv6C_.js";
2
- export { ApiKeyCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { k as AuditLogCollection_exports } from "./dist-iMaSv6C_.js";
2
- export { AuditLogCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { E as NostrIdentityCollection_exports } from "./dist-iMaSv6C_.js";
2
- export { NostrIdentityCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { w as OidcIdentityCollection_exports } from "./dist-iMaSv6C_.js";
2
- export { OidcIdentityCollection_exports as r };
@@ -1,2 +0,0 @@
1
- import { x as ProfileAssetCollection_exports } from "./dist-iMaSv6C_.js";
2
- export { ProfileAssetCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { v as ProfileMetadataCollection_exports } from "./dist-iMaSv6C_.js";
2
- export { ProfileMetadataCollection_exports as n };