@happyvertical/smrt-cli 0.51.32 → 0.51.33

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 (139) hide show
  1. package/dist/{ApiKey-BZmbOTnL-DrxlAZO2.js → ApiKey-BZmbOTnL-B5lc6Wx3.js} +2 -2
  2. package/dist/ApiKeyCollection-Bfb_nw81-DC5iJ1mb.js +2 -0
  3. package/dist/AuditLogCollection-B1YonCAP-Bk3462Oa.js +2 -0
  4. package/dist/{NostrIdentity-n70E0vck-5rGYvFIY.js → NostrIdentity-n70E0vck-usXX4s_K.js} +3 -3
  5. package/dist/NostrIdentityCollection-Ca74dkaL-EMjWAg-m.js +2 -0
  6. package/dist/{OidcIdentity-K8V4u0CR-dzykFMgp.js → OidcIdentity-K8V4u0CR-BVLWjf-i.js} +2 -2
  7. package/dist/OidcIdentityCollection-gnrLoF08-BBZE53OW.js +2 -0
  8. package/dist/ProfileAssetCollection-CmbeSgDi-HoBqJG3G.js +2 -0
  9. package/dist/{ProfileCollection-DTT4KNpQ-C3tIYhbK.js → ProfileCollection-DTT4KNpQ-CBSNj-47.js} +25 -25
  10. package/dist/ProfileMetadataCollection-DxX_BJKV-CmmrJM8N.js +2 -0
  11. package/dist/{ProfileMetafieldCollection-CMKhVi2I-C6uF97rV.js → ProfileMetafieldCollection-CMKhVi2I-fJIfcATW.js} +1 -1
  12. package/dist/{ProfileRelationshipCollection-DUVgaIqf-DhrHpup7.js → ProfileRelationshipCollection-DUVgaIqf-CuZEerRb.js} +1 -1
  13. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-aafuXvJi.js → ProfileRelationshipTermCollection-DtA9OM23-BUs2ORAN.js} +1 -1
  14. package/dist/{ProfileRelationshipType-BRiRka6t-CiAcDP3Y.js → ProfileRelationshipType-BRiRka6t-DFa-_Qqp.js} +1 -1
  15. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-Y4bfpu34.js → ProfileRelationshipTypeCollection-BdXwd7Kf-CcvbhUWo.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-DjkVEXmb.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-DC1d_zi0.js → dist-CYBGFt2p.js} +4 -4
  106. package/dist/{dist-CcLtprDR.js → dist-DD9wiC0-.js} +25 -25
  107. package/dist/{dist-D4TtU64x.js → dist-DJ_WTzB9.js} +2 -2
  108. package/dist/{dist-DXDf5-e6.js → dist-iN1z9gzn.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-CJHDoAXn.js} +4 -4
  125. package/dist/resolveIdentity-BrJDCjYi-1VmNML6W.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/ProfileMetadataCollection-DxX_BJKV-B3TOG70O.js +0 -2
  139. package/dist/resolveIdentity-BrJDCjYi-BafhqSQm.js +0 -2
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Live-schema parity reporting for the CLI (#2368)
3
+ *
4
+ * Shared by `smrt doctor --db` and `smrt db:status --parity`. Both surfaces
5
+ * introspect the configured database and compare it to the shape the model
6
+ * layer assumes — including the hand-DDL `_smrt_*` system tables and an index
7
+ * policy that does not consult the manifest, since the manifest is the artifact
8
+ * that dropped the index in the first place (#2356).
9
+ *
10
+ * Everything here fails closed: a database that cannot be reached, or an
11
+ * adapter that cannot describe its tables, is reported as a failure rather
12
+ * than as "in sync".
13
+ */
14
+ import { type ConflictTargetInput, type LiveParityFinding, type LiveParitySeverity, type LiveSchemaParityReport } from '@happyvertical/smrt-core';
15
+ /** Options accepted by {@link runLiveSchemaParity}. */
16
+ export interface RunLiveSchemaParityOptions {
17
+ /** Include `_smrt_*` system tables (default true). */
18
+ includeSystemTables?: boolean;
19
+ /**
20
+ * Load manifests before reading the registry (default true). Callers that
21
+ * already ran discovery pass false to avoid a second pass.
22
+ */
23
+ discover?: boolean;
24
+ }
25
+ /** Result of one CLI-level parity run. */
26
+ export interface LiveSchemaParityOutcome {
27
+ report: LiveSchemaParityReport | null;
28
+ /** Human-readable failure reason; non-null exactly when `report` is null. */
29
+ error: string | null;
30
+ database: {
31
+ type: string;
32
+ url: string;
33
+ } | null;
34
+ }
35
+ /**
36
+ * Collect every declared upsert conflict target, keyed by table name.
37
+ *
38
+ * The conflict target is a registry property of a persisted object, not a
39
+ * manifest one: an object may declare `conflictColumns` explicitly, inherit
40
+ * the CTI `(slug, context)` default, or get the STI
41
+ * `(slug, context, _meta_type)` triple. Collections share their item table,
42
+ * but never persist through their own conflict target, so they must not add a
43
+ * synthetic default target to the parity check. Every collected target needs a
44
+ * matching UNIQUE index or its object upsert either errors (PostgreSQL) or
45
+ * duplicates rows.
46
+ */
47
+ export declare function collectRegistryConflictTargets(): Record<string, ConflictTargetInput[]>;
48
+ /**
49
+ * Run the parity check against the configured database.
50
+ *
51
+ * Never throws for an operational problem: connection and introspection
52
+ * failures come back as `{ report: null, error }` so both callers can render
53
+ * them in their own idiom while still failing closed.
54
+ */
55
+ export declare function runLiveSchemaParity(options?: RunLiveSchemaParityOptions): Promise<LiveSchemaParityOutcome>;
56
+ /** Findings of one severity, ordered by table then target. */
57
+ export declare function selectFindings(report: LiveSchemaParityReport, severity: LiveParitySeverity): LiveParityFinding[];
58
+ /**
59
+ * Render a parity report as console lines.
60
+ *
61
+ * Errors and warnings always print. Informational findings (undeclared tables,
62
+ * columns and indexes) print only with `verbose`, because on a shared database
63
+ * they are numerous and expected.
64
+ */
65
+ export declare function formatParityReport(report: LiveSchemaParityReport, options?: {
66
+ verbose?: boolean;
67
+ }): string[];
68
+ /** One-line summary used by callers that render their own detail. */
69
+ export declare function summarizeParityReport(report: LiveSchemaParityReport): string;
70
+ //# sourceMappingURL=db-parity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-parity.d.ts","sourceRoot":"","sources":["../../src/commands/db-parity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,KAAK,mBAAmB,EAGxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAE5B,MAAM,0BAA0B,CAAC;AASlC,uDAAuD;AACvD,MAAM,WAAW,0BAA0B;IACzC,sDAAsD;IACtD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACtC,6EAA6E;IAC7E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAChD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,CACtD,MAAM,EACN,mBAAmB,EAAE,CACtB,CAkBA;AAsBD;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,uBAAuB,CAAC,CAoDlC;AAQD,8DAA8D;AAC9D,wBAAgB,cAAc,CAC5B,MAAM,EAAE,sBAAsB,EAC9B,QAAQ,EAAE,kBAAkB,GAC3B,iBAAiB,EAAE,CAQrB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,sBAAsB,EAC9B,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,MAAM,EAAE,CAuEV;AAED,qEAAqE;AACrE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAE5E"}
@@ -0,0 +1,19 @@
1
+ import type { PostgresPermissionPlan } from '@happyvertical/smrt-core';
2
+ import type { CLICommand } from '../cli-generator.js';
3
+ export interface DbPermissionsOptions {
4
+ json?: boolean;
5
+ 'dry-run'?: boolean;
6
+ apply?: boolean;
7
+ 'expected-fingerprint'?: string;
8
+ }
9
+ export interface PermissionsOutcome {
10
+ skipped: boolean;
11
+ plan: PostgresPermissionPlan | null;
12
+ error: string | null;
13
+ }
14
+ /** The only mutating caller is the explicit permissions command. */
15
+ export declare function runPostgresPermissions(options?: DbPermissionsOptions, optional?: boolean): Promise<PermissionsOutcome>;
16
+ export declare function formatPermissionsOutcome(outcome: PermissionsOutcome): string[];
17
+ export declare function outputPermissionsOutcome(outcome: PermissionsOutcome, json?: boolean): void;
18
+ export declare const dbPermissionsCommand: CLICommand;
19
+ //# sourceMappingURL=db-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-permissions.d.ts","sourceRoot":"","sources":["../../src/commands/db-permissions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKtD,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,oEAAoE;AACpE,wBAAsB,sBAAsB,CAC1C,OAAO,GAAE,oBAAyB,EAClC,QAAQ,UAAQ,GACf,OAAO,CAAC,kBAAkB,CAAC,CA6E7B;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,kBAAkB,GAC1B,MAAM,EAAE,CAmBV;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,IAAI,UAAQ,GACX,IAAI,CAIN;AAED,eAAO,MAAM,oBAAoB,EAAE,UA8BlC,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * db:prune Command — bounded growth for framework-owned tables (#2375).
3
+ *
4
+ * The cron entry point for `runRetentionSweep()`: prunes `_smrt_changes`,
5
+ * `_smrt_ai_usage`, `_smrt_contexts` and `_smrt_dispatch`, plus every task
6
+ * other packages contribute (job/job-event cleanup from
7
+ * `@happyvertical/smrt-jobs`, session and token expiry from
8
+ * `@happyvertical/smrt-users`). Deployments that run a jobs worker already get
9
+ * the same sweep on an interval; this command is for those that do not, and
10
+ * for one-off operator runs.
11
+ *
12
+ * Defaults come from the framework's documented retention policy and can be
13
+ * overridden per table on the command line or, persistently, through
14
+ * `retention` in `smrt.config`. `--dry-run` reports exactly what a real run
15
+ * would delete, using the same predicates.
16
+ */
17
+ import type { RetentionPolicy, RetentionSweepResult } from '@happyvertical/smrt-core';
18
+ import type { CLICommand } from '../cli-generator.js';
19
+ /** Parsed CLI options for the `db:prune` command. */
20
+ interface DbPruneOptions {
21
+ json?: boolean;
22
+ 'dry-run'?: boolean;
23
+ 'changes-days'?: number;
24
+ 'usage-days'?: number;
25
+ 'dispatch-days'?: number;
26
+ skip?: string;
27
+ }
28
+ /**
29
+ * Load every installed package that contributes retention tasks.
30
+ *
31
+ * A rejected import is always treated as "not installed" — this function
32
+ * cannot reliably tell a genuine module-resolution miss apart from a package
33
+ * that resolved but threw during its own top-level evaluation (error shapes
34
+ * differ across bundlers and runtimes, and `importPackage` is caller-supplied
35
+ * for exactly that flexibility). It still logs the message on `stderr`
36
+ * rather than swallowing it outright, so an operator can tell "this project
37
+ * doesn't depend on jobs/users" apart from "smrt-jobs is installed but broke
38
+ * on import" without the sweep itself needing to fail over an optional
39
+ * dependency.
40
+ *
41
+ * @returns The specifiers that loaded, in declaration order.
42
+ */
43
+ export declare function loadRetentionTaskPackages(importPackage: (specifier: string) => Promise<unknown>): Promise<string[]>;
44
+ /**
45
+ * Merge command-line overrides onto the configured retention policy.
46
+ *
47
+ * `--skip` names tasks, not tables, so it covers both the built-in tables and
48
+ * anything a package registered — the same names `db:prune --json` reports.
49
+ */
50
+ export declare function buildPrunePolicy(configured: RetentionPolicy | undefined, options: DbPruneOptions): RetentionPolicy;
51
+ /**
52
+ * Scrub connection-string credentials from per-task failures. The sweep
53
+ * never throws for a task failure; it stores the driver's error text in
54
+ * `tasks[].error`, which can echo the DSN, so both output forms render this
55
+ * redacted copy.
56
+ */
57
+ export declare function redactSweepResult(result: RetentionSweepResult): RetentionSweepResult;
58
+ /** Render a completed sweep as an operator-readable table. */
59
+ export declare function formatSweepResult(result: RetentionSweepResult): string;
60
+ /**
61
+ * Names passed to `--skip` that no task in the completed sweep answered to.
62
+ *
63
+ * A typo and a package that was never installed look identical on the command
64
+ * line, so the command says which names it did not recognize rather than
65
+ * silently doing less than the operator asked for.
66
+ */
67
+ export declare function unmatchedSkipNames(skip: string | undefined, result: RetentionSweepResult): string[];
68
+ export declare const dbPruneCommand: CLICommand;
69
+ export default dbPruneCommand;
70
+ //# sourceMappingURL=db-prune.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-prune.d.ts","sourceRoot":"","sources":["../../src/commands/db-prune.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAOtD,qDAAqD;AACrD,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAeD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,yBAAyB,CAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GACrD,OAAO,CAAC,MAAM,EAAE,CAAC,CAenB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,eAAe,GAAG,SAAS,EACvC,OAAO,EAAE,cAAc,GACtB,eAAe,CAkDjB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,oBAAoB,GAC3B,oBAAoB,CAStB;AAED,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAwBtE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,MAAM,EAAE,oBAAoB,GAC3B,MAAM,EAAE,CAMV;AAED,eAAO,MAAM,cAAc,EAAE,UA0H5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * db:rollback Command
3
+ *
4
+ * Reverts applied migrations by executing the DOWN script that produced them —
5
+ * or refuses, loudly and with a non-zero exit, when no DOWN script exists.
6
+ *
7
+ * SMRT schema migrations are diff-driven: `db:migrate` derives them from the
8
+ * manifest at run time and stores no SQL in `_smrt_schema_migrations`, so the
9
+ * only DOWN this command can honour is the deterministic one `db:migrate`
10
+ * records for `create_table_<table>` migrations. Everything else is refused
11
+ * rather than flipped to `rolled_back` with the schema untouched (#2378).
12
+ * `--mark-only` is the explicit, honestly-labelled opt-in for the record-only
13
+ * flip that an operator who reverted the schema by hand actually wants.
14
+ */
15
+ import type { CLICommand } from '../cli-generator.js';
16
+ /** Outcome of trying to reconstruct a migration's DOWN script. */
17
+ export type DownRecovery = {
18
+ recoverable: true;
19
+ statements: string[];
20
+ } | {
21
+ recoverable: false;
22
+ reason: string;
23
+ };
24
+ /** The fields of a `_smrt_schema_migrations` row this command reasons about. */
25
+ interface RollbackCandidate {
26
+ name: string;
27
+ is_reversible: boolean;
28
+ }
29
+ /**
30
+ * Reconstruct the DOWN script for an applied migration, or explain why it
31
+ * cannot be reconstructed.
32
+ *
33
+ * Recoverable only for `create_table_<table>` rows recorded as reversible: the
34
+ * DOWN `db:migrate` attached to them is the deterministic
35
+ * `DROP TABLE IF EXISTS "<table>"`. A row recorded reversible under any other
36
+ * name came from a caller-supplied `MigrationDefinition` whose SQL was never
37
+ * persisted, so it is refused rather than guessed at.
38
+ *
39
+ * Exported for unit testing.
40
+ */
41
+ export declare function recoverDownStatements(migration: RollbackCandidate): DownRecovery;
42
+ export declare const dbRollbackCommand: CLICommand;
43
+ export {};
44
+ //# sourceMappingURL=db-rollback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-rollback.d.ts","sourceRoot":"","sources":["../../src/commands/db-rollback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAkEtD,kEAAkE;AAClE,MAAM,MAAM,YAAY,GACpB;IAAE,WAAW,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3C,gFAAgF;AAChF,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,iBAAiB,GAC3B,YAAY,CA6Bd;AAQD,eAAO,MAAM,iBAAiB,EAAE,UA+b/B,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * db:status Command
3
+ *
4
+ * Shows the current status of database migrations:
5
+ * - Applied migrations
6
+ * - Pending migrations
7
+ * - Drift detection warnings
8
+ */
9
+ import type { DatabaseInterface } from '@happyvertical/sql';
10
+ import type { CLICommand } from '../cli-generator.js';
11
+ type StatusDrift = {
12
+ name: string;
13
+ type: string;
14
+ recommendation: string;
15
+ };
16
+ type StatusPrecondition = {
17
+ name: string;
18
+ status: 'warning' | 'error';
19
+ message: string;
20
+ recommendation: string;
21
+ details?: Record<string, unknown>;
22
+ };
23
+ /** Minimal column shape this command reads (manifest or live db column). */
24
+ type SchemaColumnLike = {
25
+ name?: string;
26
+ type?: unknown;
27
+ };
28
+ /**
29
+ * Minimal schema shape this command reads. Covers both manifest definitions
30
+ * (`getAllSchemasAsDefinitions()`) and live `getTableSchema()` results, whose
31
+ * `columns` are keyed records; an array form is tolerated defensively.
32
+ */
33
+ type SchemaLike = {
34
+ tableName?: string;
35
+ columns?: Record<string, SchemaColumnLike> | SchemaColumnLike[];
36
+ };
37
+ export declare function checkTenantIdUuidPreconditions(input: {
38
+ db: DatabaseInterface;
39
+ dbType: string;
40
+ dbUrl: string;
41
+ manifestSchemas: Record<string, SchemaLike>;
42
+ }): Promise<StatusPrecondition[]>;
43
+ export declare function summarizeSchemaDiff(diff: {
44
+ added_tables: Array<{
45
+ tableName: string;
46
+ }>;
47
+ changes: Array<{
48
+ type: string;
49
+ table: string;
50
+ name?: string;
51
+ mismatch?: {
52
+ expected: string;
53
+ actual: string;
54
+ };
55
+ alteration?: string;
56
+ foreignKey?: {
57
+ column: string;
58
+ referencesTable: string;
59
+ referencesColumn: string;
60
+ };
61
+ advisory?: {
62
+ severity: 'warning' | 'info';
63
+ message: string;
64
+ };
65
+ sql?: string;
66
+ sqlStatements?: string[];
67
+ }>;
68
+ }): StatusDrift[];
69
+ /**
70
+ * Info-level live-schema notes (#2369): harmless orphan columns, live
71
+ * defaults the manifest no longer declares, and tables no loaded manifest
72
+ * declares. Reported separately from `drift` so a JSON consumer counting
73
+ * drift entries is not tripped by findings that need no action.
74
+ */
75
+ export declare function summarizeSchemaNotes(diff: {
76
+ orphan_tables?: string[];
77
+ changes: Array<{
78
+ type: string;
79
+ table: string;
80
+ name?: string;
81
+ advisory?: {
82
+ severity: 'warning' | 'info';
83
+ message: string;
84
+ };
85
+ sql?: string;
86
+ sqlStatements?: string[];
87
+ }>;
88
+ }): StatusDrift[];
89
+ export declare const dbStatusCommand: CLICommand;
90
+ export {};
91
+ //# sourceMappingURL=db-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-status.d.ts","sourceRoot":"","sources":["../../src/commands/db-status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAwBtD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAkCF,4EAA4E;AAC5E,KAAK,gBAAgB,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1D;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,gBAAgB,EAAE,CAAC;CACjE,CAAC;AA2DF,wBAAsB,8BAA8B,CAAC,KAAK,EAAE;IAC1D,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC7C,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CA4DhC;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,YAAY,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3C,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE;YACT,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE;YACX,MAAM,EAAE,MAAM,CAAC;YACf,eAAe,EAAE,MAAM,CAAC;YACxB,gBAAgB,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,QAAQ,CAAC,EAAE;YAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC,CAAC;CACJ,GAAG,WAAW,EAAE,CA0KhB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE;YAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC,CAAC;CACJ,GAAG,WAAW,EAAE,CAyBhB;AAED,eAAO,MAAM,eAAe,EAAE,UAge7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * dev:knowledge-* commands
3
+ *
4
+ * Deterministic SMRT agentic-development knowledge tooling. These commands do
5
+ * not call model providers; they produce local facts and portable prompt
6
+ * bundles for Codex, Claude, or another downstream model.
7
+ */
8
+ import type { CLICommand } from '../cli-generator.js';
9
+ export declare const devKnowledgeCommands: Record<string, CLICommand>;
10
+ //# sourceMappingURL=dev-knowledge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-knowledge.d.ts","sourceRoot":"","sources":["../../src/commands/dev-knowledge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAqCtD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAiN3D,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { CLICommand } from '../cli-generator.js';
2
+ /** Parse repeatable `--arg key=value` flags; numbers/booleans are coerced. */
3
+ export declare function parseToolArgs(raw: string[] | string | undefined): Record<string, unknown>;
4
+ /** Call the in-app plane when a URL is configured; otherwise run locally. */
5
+ export declare function runRuntimeTool(tool: string, args: Record<string, unknown>, options?: {
6
+ url?: string;
7
+ token?: string;
8
+ fetchImpl?: typeof fetch;
9
+ }): Promise<{
10
+ source: 'dev-plane' | 'local';
11
+ result: unknown;
12
+ }>;
13
+ export declare const devRuntimeCommands: Record<string, CLICommand>;
14
+ //# sourceMappingURL=dev-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-runtime.d.ts","sourceRoot":"","sources":["../../src/commands/dev-runtime.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAStD,8EAA8E;AAC9E,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,GACjC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB;AAED,6EAA6E;AAC7E,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;CAAO,GACvE,OAAO,CAAC;IAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CA+B7D;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAwCzD,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Dispatch Commands - CLI tools for inter-agent communication
3
+ *
4
+ * Commands for managing the dispatch queue and subscriptions.
5
+ */
6
+ import type { CLICommand } from '../cli-generator.js';
7
+ /**
8
+ * Dispatch commands for inter-agent communication
9
+ */
10
+ export declare const dispatchCommands: Record<string, CLICommand>;
11
+ //# sourceMappingURL=dispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/commands/dispatch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAiFtD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAkdvD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * docs:agents / docs:claude commands
3
+ *
4
+ * Generates downstream SMRT framework context from installed @happyvertical
5
+ * packages. AGENTS.md is canonical; docs:claude remains a compatibility alias
6
+ * that writes to the historical .claude/smrt-framework.md path.
7
+ */
8
+ import type { DomainKnowledgeModuleDoc } from '@happyvertical/smrt-types';
9
+ import type { CLICommand } from '../cli-generator.js';
10
+ export interface PackageInfo {
11
+ name: string;
12
+ version: string;
13
+ readme: string | null;
14
+ agentMd?: string | null;
15
+ /** Backward-compatible alias for older tests/importers. */
16
+ claudeMd?: string | null;
17
+ docSource?: 'AGENTS.md' | 'CLAUDE.md' | null;
18
+ /** Linked module bodies, loaded only for complete snapshots. */
19
+ moduleDocs?: DomainKnowledgeModuleDoc[];
20
+ /** Package directory for resolving authored documentation from the snapshot. */
21
+ directory?: string;
22
+ /** Module paths without loading their bodies in the default snapshot. */
23
+ moduleDocPaths?: string[];
24
+ /**
25
+ * Installed specifier (`node_modules/<scope>/<entry>`), which differs from
26
+ * `name` under an `npm:` alias install. Module-doc links use it so they
27
+ * resolve from the consumer's `node_modules`.
28
+ */
29
+ specifier?: string;
30
+ }
31
+ export interface RootDocInfo {
32
+ filename: string;
33
+ heading: string;
34
+ content: string;
35
+ }
36
+ export declare const docsAgentsCommand: CLICommand;
37
+ export declare const docsClaudeCommand: CLICommand;
38
+ export declare function detectMonorepoRoot(): string | null;
39
+ export declare function extractReadmeSections(readme: string, sectionNames: string[]): Record<string, string>;
40
+ export declare function generateMarkdown(packages: PackageInfo[], rootDocs?: RootDocInfo[], sdkPackages?: PackageInfo[], generatedBy?: string, options?: {
41
+ complete?: boolean;
42
+ }): string;
43
+ export declare const docsCommands: Record<string, CLICommand>;
44
+ //# sourceMappingURL=docs-claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-claude.d.ts","sourceRoot":"","sources":["../../src/commands/docs-claude.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAAC;IAC7C,gEAAgE;IAChE,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACxC,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAuLD,eAAO,MAAM,iBAAiB,EAAE,UAM9B,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,UAO9B,CAAC;AAyHH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAyBlD;AA6BD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EAAE,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8CxB;AAiDD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,WAAW,EAAE,EACvB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,WAAW,CAAC,EAAE,WAAW,EAAE,EAC3B,WAAW,SAAqB,EAChC,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,MAAM,CAmGR;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAGnD,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * export Command
3
+ *
4
+ * Unified export command for static site generation.
5
+ * Exports data from database to JSON files based on smrt.config.js export configuration.
6
+ *
7
+ * This replaces per-agent export commands (praeco export, caelus export, etc.)
8
+ * with a single, schema-driven export that respects field-level export annotations.
9
+ */
10
+ import type { ExportFileConfig } from '@happyvertical/smrt-config';
11
+ import type { DatabaseInterface } from '@happyvertical/sql';
12
+ import type { CLICommand } from '../cli-generator.js';
13
+ /** A single exportable database row keyed by column/field name. */
14
+ type ExportRow = Record<string, unknown>;
15
+ /** WHERE-clause filter map: field name → comparison value. */
16
+ type ExportFilters = Record<string, unknown>;
17
+ /**
18
+ * Query records with field projection
19
+ */
20
+ export declare function queryWithProjection(db: DatabaseInterface, tableName: string, types: string[], fields: string[], filters: ExportFilters, orderBy?: string, limit?: number): Promise<ExportRow[]>;
21
+ export declare function formatProjectedRecords(records: ExportRow[], fieldColumns: Array<{
22
+ field: string;
23
+ column: string;
24
+ }>): Record<string, unknown>[];
25
+ /**
26
+ * Get common fields across all types for an export file
27
+ */
28
+ export declare function getCommonFields(types: string[], fileConfig: ExportFileConfig, fieldExportDefault: boolean): Promise<string[]>;
29
+ export declare const exportCommand: CLICommand;
30
+ export {};
31
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAmBtD,mEAAmE;AACnE,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzC,8DAA8D;AAC9D,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA8M7C;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,iBAAiB,EACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,EAAE,CAAC,CA2GtB;AAiBD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,EAAE,EACpB,YAAY,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,6BAavD;AAoCD;;GAEG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,gBAAgB,EAC5B,kBAAkB,EAAE,OAAO,GAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBnB;AAED,eAAO,MAAM,aAAa,EAAE,UA8R3B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Code Generation CLI Commands
3
+ *
4
+ * Commands for generating code, types, and other artifacts.
5
+ * Includes generate-types, generate-mcp, generate-routes, and generate-register commands.
6
+ */
7
+ import type { CLICommand } from '../cli-generator.js';
8
+ /**
9
+ * Code generation commands for CLI
10
+ */
11
+ export declare const generateCommands: Record<string, CLICommand>;
12
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAwDtD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAqkBvD,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Git Commands
3
+ *
4
+ * JSON-aware git merge driver for SMRT data files
5
+ */
6
+ import type { CLICommand } from '../cli-generator.js';
7
+ /**
8
+ * Structural JSON value types for the merge driver.
9
+ *
10
+ * The driver operates on arbitrary parsed JSON (`JSON.parse` output), so values
11
+ * are modeled as the recursive JSON shape rather than concrete SMRT objects.
12
+ */
13
+ type JsonPrimitive = string | number | boolean | null;
14
+ type JsonValue = JsonPrimitive | JsonValue[] | {
15
+ [key: string]: JsonValue;
16
+ };
17
+ /**
18
+ * Merge two arrays of objects by ID
19
+ *
20
+ * Logic:
21
+ * - Union of all objects from both arrays
22
+ * - When same ID exists in both, newer `updated_at` wins
23
+ * - Deduplicate by `id` field
24
+ * - Preserve `_meta_type` for STI support
25
+ * - Sort by `created_at` (ascending) or `id` for consistent ordering
26
+ */
27
+ export declare function mergeArraysByKey(base: unknown[], ours: unknown[], theirs: unknown[], keyField?: string): Record<string, unknown>[];
28
+ /**
29
+ * Merge two JSON objects (non-array case)
30
+ *
31
+ * For nested objects, recursively merge.
32
+ * For arrays of objects with IDs, use array merge logic.
33
+ * For other values, prefer ours over theirs.
34
+ */
35
+ export declare function mergeObjects(base: unknown, ours: unknown, theirs: unknown): JsonValue;
36
+ /**
37
+ * Git commands for SMRT
38
+ */
39
+ export declare const gitCommands: Record<string, CLICommand>;
40
+ export {};
41
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/commands/git.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,KAAK,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AACtD,KAAK,SAAS,GAAG,aAAa,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AA4B5E;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EAAE,EACf,IAAI,EAAE,OAAO,EAAE,EACf,MAAM,EAAE,OAAO,EAAE,EACjB,QAAQ,GAAE,MAAa,GACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAgH3B;AAmCD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,OAAO,GACd,SAAS,CAqFX;AA2BD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA0SlD,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Gnode CLI Commands
3
+ *
4
+ * Commands for creating and managing gnodes (federated local knowledge bases)
5
+ */
6
+ import type { CLICommand } from '../cli-generator.js';
7
+ /**
8
+ * Gnode commands for CLI
9
+ */
10
+ export declare const gnodeCommands: Record<string, CLICommand>;
11
+ //# sourceMappingURL=gnode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gnode.d.ts","sourceRoot":"","sources":["../../src/commands/gnode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAsBtD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAwHpD,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * CLI Commands - Export all command modules
3
+ */
4
+ export { configExportCommand } from './config-export.js';
5
+ export { dbDiffCommand } from './db-diff.js';
6
+ export { dbGenerateCommand } from './db-generate.js';
7
+ export { dbHistoryCommand } from './db-history.js';
8
+ export { dbOrphansCommand } from './db-orphans.js';
9
+ export { dbPermissionsCommand } from './db-permissions.js';
10
+ export { dbPruneCommand } from './db-prune.js';
11
+ export { dbRollbackCommand } from './db-rollback.js';
12
+ export { dbStatusCommand } from './db-status.js';
13
+ export { dispatchCommands } from './dispatch.js';
14
+ export { docsCommands } from './docs-claude.js';
15
+ export { exportCommand } from './export.js';
16
+ export { generateCommands } from './generate.js';
17
+ export { gitCommands } from './git.js';
18
+ export { gnodeCommands } from './gnode.js';
19
+ export { initCommands } from './init.js';
20
+ export { playgroundCommands } from './playground.js';
21
+ export { utilityCommands } from './utilities.js';
22
+ export { workbenchCommands } from './workbench.js';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * SMRT Init Command
3
+ *
4
+ * Initialize SMRT in an existing SvelteKit project
5
+ */
6
+ import type { CLICommand } from '../cli-generator.js';
7
+ /**
8
+ * Init commands
9
+ */
10
+ export declare const initCommands: Record<string, CLICommand>;
11
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA+TtD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAkNnD,CAAC"}