@happyvertical/smrt-core 0.54.3 → 0.55.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 (105) hide show
  1. package/AGENTS.md +4 -0
  2. package/dist/__typechecks__/collection-read-plan.d.ts +2 -2
  3. package/dist/__typechecks__/collection-read-plan.d.ts.map +1 -1
  4. package/dist/browser.d.ts +18 -18
  5. package/dist/browser.d.ts.map +1 -1
  6. package/dist/child-accessors.d.ts +1 -1
  7. package/dist/child-accessors.d.ts.map +1 -1
  8. package/dist/collection-read-plan.d.ts +3 -3
  9. package/dist/collection-read-plan.d.ts.map +1 -1
  10. package/dist/collection.d.ts +4 -4
  11. package/dist/collection.d.ts.map +1 -1
  12. package/dist/data-query.d.ts +1 -1
  13. package/dist/data-query.d.ts.map +1 -1
  14. package/dist/embeddings/index.d.ts +5 -5
  15. package/dist/embeddings/index.d.ts.map +1 -1
  16. package/dist/embeddings/provider.d.ts +1 -1
  17. package/dist/embeddings/provider.d.ts.map +1 -1
  18. package/dist/embeddings/storage.d.ts +1 -1
  19. package/dist/embeddings/storage.d.ts.map +1 -1
  20. package/dist/errors.d.ts.map +1 -1
  21. package/dist/errors.js +3 -1
  22. package/dist/errors.js.map +1 -1
  23. package/dist/generated-collection-access.d.ts +3 -3
  24. package/dist/generated-collection-access.d.ts.map +1 -1
  25. package/dist/generators/index.d.ts +12 -12
  26. package/dist/generators/index.d.ts.map +1 -1
  27. package/dist/generators/rest.d.ts +4 -4
  28. package/dist/generators/rest.d.ts.map +1 -1
  29. package/dist/hierarchical.d.ts +2 -2
  30. package/dist/hierarchical.d.ts.map +1 -1
  31. package/dist/index.d.ts +67 -66
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2 -1
  34. package/dist/junction.d.ts +2 -2
  35. package/dist/junction.d.ts.map +1 -1
  36. package/dist/manifest/index.d.ts +7 -7
  37. package/dist/manifest/index.d.ts.map +1 -1
  38. package/dist/manifest/static-manifest.js +1 -1
  39. package/dist/manifest/static-manifest.js.map +1 -1
  40. package/dist/manifest/store.js +1 -1
  41. package/dist/manifest.json +1 -1
  42. package/dist/object.d.ts +7 -7
  43. package/dist/object.d.ts.map +1 -1
  44. package/dist/polymorphic-association.d.ts +1 -1
  45. package/dist/polymorphic-association.d.ts.map +1 -1
  46. package/dist/prebuild/index.d.ts +1 -1
  47. package/dist/prebuild/index.d.ts.map +1 -1
  48. package/dist/query-bounds.d.ts +1 -1
  49. package/dist/query-bounds.d.ts.map +1 -1
  50. package/dist/registry/cache-config.d.ts +1 -1
  51. package/dist/registry/cache-config.d.ts.map +1 -1
  52. package/dist/registry/class-registration.d.ts +1 -1
  53. package/dist/registry/class-registration.d.ts.map +1 -1
  54. package/dist/registry/collection-resolution.d.ts +1 -1
  55. package/dist/registry/collection-resolution.d.ts.map +1 -1
  56. package/dist/registry/embedding-manager.d.ts +1 -1
  57. package/dist/registry/embedding-manager.d.ts.map +1 -1
  58. package/dist/registry/index.d.ts +6 -6
  59. package/dist/registry/index.d.ts.map +1 -1
  60. package/dist/registry/inheritance-resolver.d.ts +2 -2
  61. package/dist/registry/inheritance-resolver.d.ts.map +1 -1
  62. package/dist/registry/manifest-field-merge.d.ts +1 -1
  63. package/dist/registry/manifest-field-merge.d.ts.map +1 -1
  64. package/dist/registry/name-resolver.d.ts +1 -1
  65. package/dist/registry/name-resolver.d.ts.map +1 -1
  66. package/dist/registry/qualified-name-aliases.d.ts +1 -1
  67. package/dist/registry/qualified-name-aliases.d.ts.map +1 -1
  68. package/dist/registry/relationship-graph.d.ts +1 -1
  69. package/dist/registry/relationship-graph.d.ts.map +1 -1
  70. package/dist/registry/runtime-overrides.d.ts +1 -1
  71. package/dist/registry/runtime-overrides.d.ts.map +1 -1
  72. package/dist/registry/shared-state.d.ts +3 -3
  73. package/dist/registry/shared-state.d.ts.map +1 -1
  74. package/dist/registry/types.d.ts +4 -4
  75. package/dist/registry/types.d.ts.map +1 -1
  76. package/dist/registry/validator.d.ts +1 -1
  77. package/dist/registry/validator.d.ts.map +1 -1
  78. package/dist/registry.d.ts +12 -12
  79. package/dist/registry.d.ts.map +1 -1
  80. package/dist/relationship-loader.d.ts +1 -1
  81. package/dist/relationship-loader.d.ts.map +1 -1
  82. package/dist/runtime/client.d.ts +1 -1
  83. package/dist/runtime/client.d.ts.map +1 -1
  84. package/dist/runtime/index.d.ts +5 -5
  85. package/dist/runtime/index.d.ts.map +1 -1
  86. package/dist/runtime/server.d.ts +1 -1
  87. package/dist/runtime/server.d.ts.map +1 -1
  88. package/dist/schema/ddl/types.d.ts +1 -1
  89. package/dist/schema/ddl/types.d.ts.map +1 -1
  90. package/dist/smrt-knowledge.json +6 -5
  91. package/dist/utils/database-url.d.ts +54 -0
  92. package/dist/utils/database-url.d.ts.map +1 -0
  93. package/dist/utils/database-url.js +121 -0
  94. package/dist/utils/database-url.js.map +1 -0
  95. package/dist/utils.d.ts +1 -1
  96. package/dist/utils.d.ts.map +1 -1
  97. package/dist/vite-plugin/changes-route.d.ts +1 -1
  98. package/dist/vite-plugin/changes-route.d.ts.map +1 -1
  99. package/dist/vite-plugin/events-route.d.ts +1 -1
  100. package/dist/vite-plugin/events-route.d.ts.map +1 -1
  101. package/dist/vite-plugin/sveltekit-generator.d.ts +1 -1
  102. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
  103. package/dist/vite-plugin/sync-apply-route.d.ts +1 -1
  104. package/dist/vite-plugin/sync-apply-route.d.ts.map +1 -1
  105. package/package.json +9 -4
@@ -1 +1 @@
1
- {"version":3,"file":"relationship-loader.d.ts","sourceRoot":"","sources":["../src/relationship-loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvE,8EAA8E;AAC9E,wBAAsB,6BAA6B,CACjD,YAAY,EAAE,oBAAoB,GACjC,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,CACrC,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,oBAAoB,EAClC,mBAAmB,EAAE,MAAM,GAC1B,oBAAoB,CAuBtB"}
1
+ {"version":3,"file":"relationship-loader.d.ts","sourceRoot":"","sources":["../src/relationship-loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,eAAY,CAAC;AAEvE,8EAA8E;AAC9E,wBAAsB,6BAA6B,CACjD,YAAY,EAAE,oBAAoB,GACjC,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,CACrC,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,oBAAoB,EAClC,mBAAmB,EAAE,MAAM,GAC1B,oBAAoB,CAuBtB"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Runtime client implementation for SMRT auto-generated services
3
3
  */
4
- import type { SmrtClientOptions } from './types';
4
+ import type { SmrtClientOptions } from "./types.js";
5
5
  export declare class SmrtClient {
6
6
  private options;
7
7
  constructor(options?: SmrtClientOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/runtime/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAA8B;gBAEjC,OAAO,GAAE,iBAAsB;IAS3C;;OAEG;IACG,OAAO,CACX,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,OAAO,CAAC;IAyDnB;;OAEG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAe3E;;OAEG;IACG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAA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,OAAO,CAAC,OAAO,CAAC;IAI3D;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG7C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,UAAU,CAExE"}
@@ -2,9 +2,9 @@
2
2
  * Runtime utilities for SMRT auto-generated services
3
3
  * Provides helper functions and base classes for generated code
4
4
  */
5
- export { createSmrtClient } from './client';
6
- export type { MCPServerOptions } from './mcp';
7
- export { createMCPServer, SmrtMCPServer } from './mcp';
8
- export { createSmrtServer } from './server';
9
- export type { SmrtClientOptions, SmrtServerOptions } from './types';
5
+ export { createSmrtClient } from "./client.js";
6
+ export type { MCPServerOptions } from "./mcp.js";
7
+ export { createMCPServer, SmrtMCPServer } from "./mcp.js";
8
+ export { createSmrtServer } from "./server.js";
9
+ export type { SmrtClientOptions, SmrtServerOptions } from "./types.js";
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAU,CAAC;AAE5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAO,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAO,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAU,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAS,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Runtime server implementation for SMRT auto-generated services
3
3
  */
4
4
  import http from 'node:http';
5
- import type { SmrtRequest, SmrtServerOptions } from './types';
5
+ import type { SmrtRequest, SmrtServerOptions } from "./types.js";
6
6
  /**
7
7
  * Express-style response object handed to RouteApp-compatibility handlers
8
8
  * (registered via {@link SmrtServer.get}/`post`/`put`/`delete`). It mirrors the
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/runtime/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAI9D;;;;;;GAMG;AACH,UAAU,oBAAoB;IAC5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAAC;IAC3C,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAAC;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,KAAK,mBAAmB,GAAG,CACzB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,oBAAoB,KACtB,IAAI,CAAC;AAcV,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,MAAM,CACF;g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AO,EAAE,mBAAmB,GAAG,IAAI;IAIrD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAIxD;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA8F5B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAoB5D;;;;OAIG;IACG,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IAInD;;OAEG;YACW,cAAc;IAQ5B;;OAEG;YACW,uBAAuB;IAyBrC;;OAEG;YACW,yBAAyB;IAwBvC;;OAEG;YACW,aAAa;IA8C3B;;OAEG;YACW,YAAY;IA+D1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6BxB;;OAEG;IACH,OAAO,CAAC,UAAU;IA8BlB;;OAEG;YACW,YAAY;IA+B1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;IACH,OAAO,CAAC,cAAc;CAqBvB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,UAAU,CAExE"}
@@ -98,7 +98,7 @@ export interface DDLStrategy {
98
98
  * @param columnDef - The column definition
99
99
  * @returns Column definition SQL fragment (e.g. '"name" TEXT DEFAULT '')
100
100
  */
101
- generateColumnDefinition(columnName: string, columnDef: import('../types').ColumnDefinition): string;
101
+ generateColumnDefinition(columnName: string, columnDef: import("../types.js").ColumnDefinition): string;
102
102
  }
103
103
  /**
104
104
  * Column generation options
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/schema/ddl/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,M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;;;OAKG;IACH,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAAC;IAErD;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAEnC;;;;;;;OAOG;IACH,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAE9D;;;OAGG;IACH,gBAAgB,IAAI,OAAO,CAAC;IAE5B;;;;OAIG;IACH,oBAAoB,IAAI,OAAO,CAAC;IAEhC;;;;;OAKG;IACH,wBAAwB,CACtB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,aAAU,EAAE,gBAAgB,GAC7C,MAAM,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC"}
@@ -3,13 +3,13 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-core",
6
- "packageVersion": "0.54.3",
6
+ "packageVersion": "0.55.0",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "8d33ed0a57c2c6113527bbfcb968962459d1acb91ca758a31551a5010a53dd07",
11
- "packageJson": "8dbae54a66a1ea347b8191589e5f3013a1a31f2358a99bd30de4114682cbfe00",
12
- "agents": "7b666e6b3a6fddbd8c9f44bdb2ec34b4d55814fcfc7a63a9d3bbced5769a3dfa",
10
+ "manifest": "38ecb3aaf66f5eacf4fbccdd3398efc603c1eb7a2c8164f607ddf8655d9b5148",
11
+ "packageJson": "915ce056ef41ac7d92eee3a5a9a8b9d99b15ec49408de1a3a13459cb43136182",
12
+ "agents": "a8d1918713f35e101c7d937403eff481bd89e51657c77474afe0343270338d64",
13
13
  "moduleDoc:agents/object-runtime.md": "652352cdf1eddd0dcc91f6589b8241d9d99581f54bcc2318520a3ff97cd22cf5",
14
14
  "moduleDoc:agents/revision-guard.md": "aa6b1ddb5b6b49fa27ebbe575ec7fcd6d5ceb35ee25acc702f877a226eb9a99a",
15
15
  "moduleDoc:agents/collection-reads.md": "e5bb79b59c17e79a85a71580a019e6b0b641e498ac4d850073fd5ad634b57cb7",
@@ -53,6 +53,7 @@
53
53
  "./table-cache",
54
54
  "./testing",
55
55
  "./utils",
56
+ "./utils/database-url",
56
57
  "./utils/import-workspace-module",
57
58
  "./vite",
58
59
  "./vite-plugin"
@@ -1119,7 +1120,7 @@
1119
1120
  "polymorphicAssociations": 1,
1120
1121
  "uuidColumns": 3
1121
1122
  },
1122
- "agentDoc": "# @happyvertical/smrt-core\n\nFoundation ORM, registry, schema/code generation, AI integration, and DispatchBus.\nRead the module for the subsystem being edited; root AGENTS covers shared model\nand repository rules.\n\n## Modules\n\n| Source | Scope | Module doc |\n|---|---|---|\n| `src/object.ts`, `src/collection.ts`, `src/child-accessors.ts` | Lifecycle, hydration, operators, STI, child accessors, dispatch | [agents/object-runtime.md](agents/object-runtime.md) |\n| `src/revision-guard.ts` | Guarded writes and PostgreSQL revision precision | [agents/revision-guard.md](agents/revision-guard.md) |\n| `src/collection.ts` | Projections, latest-related, facets, counts, read plans | [agents/collection-reads.md](agents/collection-reads.md) |\n| `src/collection.ts` | Limits, sort whitelist, generated list order | [agents/query-bounds.md](agents/query-bounds.md) |\n| `src/data-query.ts` | Transport-neutral bounded query normalization | [agents/data-query.md](agents/data-query.md) |\n| `src/schema/`, `src/migrations/`, `src/cascade.ts`, `src/system/` | DDL parity, indexes, migrations, delete integrity, retention | [agents/schema-paths.md](agents/schema-paths.md) |\n| `src/postgres-permissions.ts` | Explicit PostgreSQL ACL plans and atomic reconciliation | [deployment permission contract](../../docs/content/postgres-permissions.md) |\n| `src/change-feed.ts` | Durable changes, cursors, table versions, retention | [agents/change-feed.md](agents/change-feed.md) |\n| `src/change-feed-authz.ts` | Consumer table/row change-feed authorization hooks (#3020) | [agents/change-feed.md](agents/change-feed.md) |\n| `src/change-signals.ts` | Signal bus, replica fan-out, SSE | [agents/change-signals.md](agents/change-signals.md) |\n| `src/generators/`, `src/vite-plugin/web-collections.ts` | REST/CLI/MCP generation, manifest hashes, ETags | [agents/generators.md](agents/generators.md) |\n| `src/vite-plugin/`, `src/consumer-plugin/`, `src/knowledge.ts` | Decorator UI hints, knowledge projection, generation snapshots | [agents/build-knowledge.md](agents/build-knowledge.md) |\n| `src/knowledge-graph.ts` | Cross-package knowledge graph merge and freshness check (#2863) — see [standards](../../docs/content/standards.md) | — |\n| `src/object.ts`, `src/collection.ts`, `src/learning/memory.ts` | Context memory and semantic search | [agents/memory.md](agents/memory.md) |\n| `src/system/diagnostics.ts` | SELECT-only `_smrt_*` diagnostics reader behind smrt-dev-mcp runtime tools (#1824) | [agents/system-diagnostics.md](agents/system-diagnostics.md) |\n| `src/system/registry-snapshot.ts` | Sanitized plain-JSON projection of the booted `ObjectRegistry` for the smrt-dev-mcp runtime dev-plane (#1831); never constructors, validators, values, or absolute paths | [agents/registry-snapshot.md](agents/registry-snapshot.md) |\n| `src/registry/qualified-name-aliases.ts`, `src/migrations/qualified-name-aliases.ts` | Model moves: `previousQualifiedNames` aliases, deprecation, doctor counts, opt-in backfill (#3338) | [agents/model-moves.md](agents/model-moves.md) |\n| `src/run-once.ts` | Shared idempotency seam: insert-only claim + caller work in one transaction, replay on retry, typed in-flight/unknown-outcome answers (#3080) | [agents/run-once.md](agents/run-once.md) |\n\n## Cross-module invariants\n\n- `ObjectRegistry` is a `globalThis` singleton so registration survives HMR.\n- Per-class registry work on the hydration path (manifest reconciliation in\n `ensureManifestLoaded()`, the simple-name index behind `findClass()`) is\n memoized per registry generation (`src/registry/generation.ts`, #3047). Any\n new writer of registered classes, their field/method metadata, or loaded\n manifests must go through the tracked maps or call\n `bumpRegistryGeneration()`; `issue-3047-hydration-registry-work.test.ts`\n guards that hydration does not repeat this work per row.\n\n- Production DDL uses manifest generators; `getTestDatabase()` uses registry\n generators. Keep columns, indexes, FK actions, and runtime conflict targets in\n parity (`src/schema/schema-path-parity.test.ts`). Every new query predicate\n needs its index or an explicit reason none is needed.\n- Tenant scoping covers every read and every unique/conflict key. Explicit\n conflict columns are not rewritten; their author must include tenant scope.\n A `tenantId` field makes rows tenant-OWNED without any tenancy declaration:\n the default key leads with `tenant_id`. A new object's natural-key save reads\n the row its upsert would hit and refuses a different owner\n (`TENANT_ISOLATION_VIOLATION`) or adopts a same-owner row's id, so\n `DO UPDATE` never rewrites a primary key or owner. Only an explicit natural\n key adopts: a slug `getSlug()` derived from `name`/`title`/`label` moves to\n a free `-2`, `-3`, … slug and INSERTs. See `agents/schema-paths.md`\n (\"Tenant OWNERSHIP\").\n- Persisted saves use `id` and loaded `updated_at`; new saves use natural keys.\n Preserve revision compare-and-swap ordering through public `save()`,\n `claimRevision()`, and transaction APIs. Embedded saves, deletes, and complete\n `withTransaction()` callbacks share a process-local write queue.\n- Collection model hydration is serial in result order: initialization may query\n the same transaction-bound PostgreSQL client. Use projections for plain rows.\n- Native DuckDB UUIDs must be cast coherently on read before identity reuse;\n custom embedded revision paths use `getCanonicalPersistedRow()`. Never replay\n a mutation to discover result types.\n- `withDatabase(db, callback)` restores only database bindings (including public\n `options.db`); `withTransaction(callback)` also restores identity/revision\n metadata after rollback. Do not use a bound instance concurrently.\n- `runOnce({ db, tenantId, actor, token, content }, work)` (`src/run-once.ts`,\n #3080) claims a key derived from all four inputs — never the token alone,\n which collapses distinct submissions — via `INSERT ... ON CONFLICT\n (claim_key) DO NOTHING RETURNING claim_key` into the hand-DDL\n `_smrt_run_once_claims` system table, and runs `work` in the SAME\n transaction; a completed claim replays its stored result instead of\n re-running, a failed `work` rolls the claim back with the transaction, and\n an unresolved claim raises typed `RunOnceClaimError`\n (`RUN_ONCE_IN_FLIGHT` / `RUN_ONCE_OUTCOME_UNKNOWN`) rather than guessing.\n The claim insert must never raise on conflict: PostgreSQL aborts the whole\n transaction on any raised error, which would take the recovery `SELECT`\n down with it too — this is why it is `DO NOTHING`, not a plain `INSERT`\n caught for `isUniqueViolationError`. Completed claims are bounded by\n `runRetentionSweep()`'s `run-once-claims` task (`system/retention.ts`,\n `DEFAULT_RETENTION_POLICY.runOnceClaims`, default 30 days on\n `completed_at`; `in_progress` rows are never matched) — the window is a\n replay deadline, not just disk hygiene: a token replayed after its claim\n is swept runs `work()` again. See `agents/run-once.md`.\n- `ensureSystemTables(db, typeHint?)` provisions framework tables idempotently;\n call it on a base PostgreSQL connection before caller-owned transactions.\n Bootstrap uses a transaction-scoped advisory lock, taken only when the\n PostgreSQL schema version is not yet stamped: inside a caller's transaction it\n is held until that transaction ends (#2868). Application tables still require migrations;\n runtime table verification checks existence only.\n- Manifest generation fails closed on scanner errors, including unresolved\n decorator spreads. Never emit partial, default-open registration.\n- Generated registration repairs bundled class identity using the exact imported\n constructor, explicit package, and isolated one-object manifest. Never infer\n ownership from paths, simple names, or table names; packages can share names.\n Consumer regression gate: `packages/bundle-gate/src/__tests__/registry-identity.spec.ts`.\n- Decorator registration trusts a class's stack-derived package only when that\n package declares the class (stub, own manifest entry, or explicit\n `packageName`); it then matches the qualified key and never adopts another\n package's same-named registration. Otherwise a loaded (or the cwd project's)\n manifest entry describing the declaring file supplies the identity — apps\n scan workspace-package sources under the app's name (#3110). A class of\n another known package coexists under its qualified key\n (`decorator-different-packages-qualified-coexist`); bundled output needs\n a resolved table that differs first (#3106). Stack\n attribution skips smrt-core (including source-mapped installed\n `smrt-core/src` frames, #3109), decorator-helper, and module-runner frames,\n and drops a frame's Vite `?v=` query (#3490). Library builds stamp each\n decorated class with `static __smrtPackage__` (own property, read at\n decoration as its explicit package) and publish `stampsConstructors`; an\n unstamped class never takes a stamping package's entry by name and table,\n in either order (#3490, `issue-3490-*.test.ts`, `package-stamp.test.ts`).\n Qualified names are `@scope/pkg:Class`; the scope is a deliberate\n discriminator, so manifest generation (`generateManifest`,\n `applyGenerationPasses`, hence `pnpm build`) throws\n `CONFIG_UNSCOPED_PACKAGE_NAME` for an unscoped `package.json` name (#3408).\n Instance and collection registry lookups pass the qualified name. The schema\n planner rejects a table claimed by two unrelated classes\n (`CONFIG_TABLE_NAME_COLLISION`): only one STI family shares a table (#3098);\n collections (including `SmrtReportCollection`) never claim one. Consumer\n gates: `registry/__tests__/issue-3110-*.test.ts`, `issue-3109-*.test.ts`,\n `packages/bundle-gate/src/__tests__/consumer-same-name.spec.ts`.\n- API custom-action eligibility has ONE resolver, `resolveApiMethodExposure()`\n in `generators/custom-action.ts`: both SvelteKit route emitters,\n `resolveApiActionSet`, and `knowledge.ts` read it, and a new consumer must too\n — a local mirror is how a method gets reported unavailable while its route\n file is still written. A public method routes by default only when every\n parameter is JSON-shaped; `@method({ expose })` overrides in both directions,\n `expose: true` bypasses the heuristic ALONE, and an explicit `api.include` or\n `api.routes` entry keeps its pre-#2686 route. Fail closed on scanner\n uncertainty: read `parameters[].typeUnresolved`, never the `'any'` it\n substitutes. Accepting `Date` as wire-able and hydrating it\n (`toCustomActionDate`) are one decision — changing either breaks the other.\n The runtime `APIGenerator` transport stays declaration-gated: `rest.ts`\n dispatch and `preflight-route.ts` prediction both read\n `declaresRuntimeRestRoute()`, which must accept every `ApiCustomRouteConfig`\n option so a sweep moving one onto its method cannot delete the endpoint. Its\n twin `declaresRuntimeRestRouteShape()` deliberately ignores `expose: false`:\n the dispatcher must still SEE a withheld declaration to answer 404, because\n `POST /<collection>/<segment>` resolves to `create` when nothing claims the\n segment. Split unions and type arguments with `splitTopLevel()` — a naive\n `split('|')` truncates `Record<string, Asset | null>` into fragments that\n match no rule and are then accepted, widening the gate. `extractTypeName`\n returns `null` for a generic with an unresolvable ARGUMENT or a union with an\n unresolvable BRANCH so those reach that fail-closed path instead of arriving\n as a bare `'Array'`. Runtime transports read\n `ObjectRegistry.resolveRuntimeMethod()`, which tries the item class's manifest\n entry, then the COLLECTION class's (where a collection-hosted action's\n parameters live), then the live `@method()` store — keyed by CONSTRUCTOR,\n never by simple name (`Account` exists in two packages), and recording\n `isStatic` because an unscanned runtime has no manifest to recover the\n receiver from. `isRestActionRoutable` ANDs \"declared\" with that receiver, so\n it never predicts `allow` for an action dispatch refuses. A declared action\n with no receiver is refused (501 collection-scoped, 404 item-scoped), never\n allowed to fall through into `create`. All eight consumers read the resolver,\n including `packages/smrt-workbench/src/discovery.ts`; it imports the\n `./generators/custom-action` LEAF subpath, not `./generators`, because that\n barrel value-re-exports `MCPGenerator` and so drags `@happyvertical/ai` and\n `@happyvertical/sql` into a build-time helper (2 modules vs 109). Keep\n `custom-action.ts` free of value imports outside `tools/tool-generator`.\n\n## Gotchas\n\n- Optional filesystem support stays lazy: use `createFilesystemAdapter()` in\n `src/filesystem-loader.ts`, not a static files-SDK import. Fully bundled apps\n import `@happyvertical/smrt-core/filesystem` at startup. Use\n `importOptionalDependency()` for similarly heavy optional dependencies.\n- Database retries are transient-only, four attempts total for `get`/`upsert`.\n Use `src/db-errors.ts` classifiers through the cause chain, never message\n matching (SDK driver text can live in `context.originalError`). Constraints,\n bad input, missing tables, and aborted PostgreSQL transactions fail immediately.\n Unique/PK violations become `VALIDATION_UNIQUE_CONSTRAINT`, NOT NULL becomes\n `VALIDATION_REQUIRED_FIELD`; other failures keep the driver error as `cause`.\n- Property initializers precede option values; options win. Arrays/objects are\n shallow-cloned. Collection creation caches fields; table verification caches\n by DB URL and table. Preserve these scopes when changing initialization.\n- The Vite plugin loads scanner/schema code from `dist/` when present. Rebuild\n core after editing those sources before testing consumer manifest generation.\n Vite 8 requires `oxc.decorator: { legacy: true, emitDecoratorMetadata: true }`.\n\n## Validation\n\n`typecheck` checks production source first, then the test project in\n`tsconfig.test.json`. Test coverage and the shared relaxed config\ncontract are documented in [agents/test-types.md](agents/test-types.md).\n\nRun focused tests first, then applicable package checks:\n\n```bash\npnpm --filter @happyvertical/smrt-core test\npnpm --filter @happyvertical/smrt-core typecheck\npnpm --filter @happyvertical/smrt-core build\npnpm --filter @happyvertical/smrt-core test:postgres\npnpm check:agents-chain\npnpm smrt dev:knowledge-check\n```\n\nThe PostgreSQL lane is required for numeric types, UUID casts, conflict targets,\ntimestamps, and migrations. Tests generate their manifest before Vitest; restart\nwatch mode after adding decorated classes. Documentation-only changes need\ninstruction-chain and knowledge freshness checks, not the runtime test suite.\n",
1123
+ "agentDoc": "# @happyvertical/smrt-core\n\nFoundation ORM, registry, schema/code generation, AI integration, and DispatchBus.\nRead the module for the subsystem being edited; root AGENTS covers shared model\nand repository rules.\n\n## Modules\n\n| Source | Scope | Module doc |\n|---|---|---|\n| `src/object.ts`, `src/collection.ts`, `src/child-accessors.ts` | Lifecycle, hydration, operators, STI, child accessors, dispatch | [agents/object-runtime.md](agents/object-runtime.md) |\n| `src/revision-guard.ts` | Guarded writes and PostgreSQL revision precision | [agents/revision-guard.md](agents/revision-guard.md) |\n| `src/collection.ts` | Projections, latest-related, facets, counts, read plans | [agents/collection-reads.md](agents/collection-reads.md) |\n| `src/collection.ts` | Limits, sort whitelist, generated list order | [agents/query-bounds.md](agents/query-bounds.md) |\n| `src/data-query.ts` | Transport-neutral bounded query normalization | [agents/data-query.md](agents/data-query.md) |\n| `src/schema/`, `src/migrations/`, `src/cascade.ts`, `src/system/` | DDL parity, indexes, migrations, delete integrity, retention | [agents/schema-paths.md](agents/schema-paths.md) |\n| `src/postgres-permissions.ts` | Explicit PostgreSQL ACL plans and atomic reconciliation | [deployment permission contract](../../docs/content/postgres-permissions.md) |\n| `src/change-feed.ts` | Durable changes, cursors, table versions, retention | [agents/change-feed.md](agents/change-feed.md) |\n| `src/change-feed-authz.ts` | Consumer table/row change-feed authorization hooks (#3020) | [agents/change-feed.md](agents/change-feed.md) |\n| `src/change-signals.ts` | Signal bus, replica fan-out, SSE | [agents/change-signals.md](agents/change-signals.md) |\n| `src/generators/`, `src/vite-plugin/web-collections.ts` | REST/CLI/MCP generation, manifest hashes, ETags | [agents/generators.md](agents/generators.md) |\n| `src/vite-plugin/`, `src/consumer-plugin/`, `src/knowledge.ts` | Decorator UI hints, knowledge projection, generation snapshots | [agents/build-knowledge.md](agents/build-knowledge.md) |\n| `src/knowledge-graph.ts` | Cross-package knowledge graph merge and freshness check (#2863) — see [standards](../../docs/content/standards.md) | — |\n| `src/object.ts`, `src/collection.ts`, `src/learning/memory.ts` | Context memory and semantic search | [agents/memory.md](agents/memory.md) |\n| `src/system/diagnostics.ts` | SELECT-only `_smrt_*` diagnostics reader behind smrt-dev-mcp runtime tools (#1824) | [agents/system-diagnostics.md](agents/system-diagnostics.md) |\n| `src/system/registry-snapshot.ts` | Sanitized plain-JSON projection of the booted `ObjectRegistry` for the smrt-dev-mcp runtime dev-plane (#1831); never constructors, validators, values, or absolute paths | [agents/registry-snapshot.md](agents/registry-snapshot.md) |\n| `src/registry/qualified-name-aliases.ts`, `src/migrations/qualified-name-aliases.ts` | Model moves: `previousQualifiedNames` aliases, deprecation, doctor counts, opt-in backfill (#3338) | [agents/model-moves.md](agents/model-moves.md) |\n| `src/run-once.ts` | Shared idempotency seam: insert-only claim + caller work in one transaction, replay on retry, typed in-flight/unknown-outcome answers (#3080) | [agents/run-once.md](agents/run-once.md) |\n\n## Cross-module invariants\n\n- `ObjectRegistry` is a `globalThis` singleton so registration survives HMR.\n- Any output that names a database URL (CLI banners, logs, errors) renders it\n with `redactDatabaseUrl` / `redactDatabaseUrlsInText`\n (`src/utils/database-url.ts`, #3527): never the password or query string,\n and never the raw string when it cannot be parsed.\n- Per-class registry work on the hydration path (manifest reconciliation in\n `ensureManifestLoaded()`, the simple-name index behind `findClass()`) is\n memoized per registry generation (`src/registry/generation.ts`, #3047). Any\n new writer of registered classes, their field/method metadata, or loaded\n manifests must go through the tracked maps or call\n `bumpRegistryGeneration()`; `issue-3047-hydration-registry-work.test.ts`\n guards that hydration does not repeat this work per row.\n\n- Production DDL uses manifest generators; `getTestDatabase()` uses registry\n generators. Keep columns, indexes, FK actions, and runtime conflict targets in\n parity (`src/schema/schema-path-parity.test.ts`). Every new query predicate\n needs its index or an explicit reason none is needed.\n- Tenant scoping covers every read and every unique/conflict key. Explicit\n conflict columns are not rewritten; their author must include tenant scope.\n A `tenantId` field makes rows tenant-OWNED without any tenancy declaration:\n the default key leads with `tenant_id`. A new object's natural-key save reads\n the row its upsert would hit and refuses a different owner\n (`TENANT_ISOLATION_VIOLATION`) or adopts a same-owner row's id, so\n `DO UPDATE` never rewrites a primary key or owner. Only an explicit natural\n key adopts: a slug `getSlug()` derived from `name`/`title`/`label` moves to\n a free `-2`, `-3`, … slug and INSERTs. See `agents/schema-paths.md`\n (\"Tenant OWNERSHIP\").\n- Persisted saves use `id` and loaded `updated_at`; new saves use natural keys.\n Preserve revision compare-and-swap ordering through public `save()`,\n `claimRevision()`, and transaction APIs. Embedded saves, deletes, and complete\n `withTransaction()` callbacks share a process-local write queue.\n- Collection model hydration is serial in result order: initialization may query\n the same transaction-bound PostgreSQL client. Use projections for plain rows.\n- Native DuckDB UUIDs must be cast coherently on read before identity reuse;\n custom embedded revision paths use `getCanonicalPersistedRow()`. Never replay\n a mutation to discover result types.\n- `withDatabase(db, callback)` restores only database bindings (including public\n `options.db`); `withTransaction(callback)` also restores identity/revision\n metadata after rollback. Do not use a bound instance concurrently.\n- `runOnce({ db, tenantId, actor, token, content }, work)` (`src/run-once.ts`,\n #3080) claims a key derived from all four inputs — never the token alone,\n which collapses distinct submissions — via `INSERT ... ON CONFLICT\n (claim_key) DO NOTHING RETURNING claim_key` into the hand-DDL\n `_smrt_run_once_claims` system table, and runs `work` in the SAME\n transaction; a completed claim replays its stored result instead of\n re-running, a failed `work` rolls the claim back with the transaction, and\n an unresolved claim raises typed `RunOnceClaimError`\n (`RUN_ONCE_IN_FLIGHT` / `RUN_ONCE_OUTCOME_UNKNOWN`) rather than guessing.\n The claim insert must never raise on conflict: PostgreSQL aborts the whole\n transaction on any raised error, which would take the recovery `SELECT`\n down with it too — this is why it is `DO NOTHING`, not a plain `INSERT`\n caught for `isUniqueViolationError`. Completed claims are bounded by\n `runRetentionSweep()`'s `run-once-claims` task (`system/retention.ts`,\n `DEFAULT_RETENTION_POLICY.runOnceClaims`, default 30 days on\n `completed_at`; `in_progress` rows are never matched) — the window is a\n replay deadline, not just disk hygiene: a token replayed after its claim\n is swept runs `work()` again. See `agents/run-once.md`.\n- `ensureSystemTables(db, typeHint?)` provisions framework tables idempotently;\n call it on a base PostgreSQL connection before caller-owned transactions.\n Bootstrap uses a transaction-scoped advisory lock, taken only when the\n PostgreSQL schema version is not yet stamped: inside a caller's transaction it\n is held until that transaction ends (#2868). Application tables still require migrations;\n runtime table verification checks existence only.\n- Manifest generation fails closed on scanner errors, including unresolved\n decorator spreads. Never emit partial, default-open registration.\n- Generated registration repairs bundled class identity using the exact imported\n constructor, explicit package, and isolated one-object manifest. Never infer\n ownership from paths, simple names, or table names; packages can share names.\n Consumer regression gate: `packages/bundle-gate/src/__tests__/registry-identity.spec.ts`.\n- Decorator registration trusts a class's stack-derived package only when that\n package declares the class (stub, own manifest entry, or explicit\n `packageName`); it then matches the qualified key and never adopts another\n package's same-named registration. Otherwise a loaded (or the cwd project's)\n manifest entry describing the declaring file supplies the identity — apps\n scan workspace-package sources under the app's name (#3110). A class of\n another known package coexists under its qualified key\n (`decorator-different-packages-qualified-coexist`); bundled output needs\n a resolved table that differs first (#3106). Stack\n attribution skips smrt-core (including source-mapped installed\n `smrt-core/src` frames, #3109), decorator-helper, and module-runner frames,\n and drops a frame's Vite `?v=` query (#3490). Library builds stamp each\n decorated class with `static __smrtPackage__` (own property, read at\n decoration as its explicit package) and publish `stampsConstructors`; an\n unstamped class never takes a stamping package's entry by name and table,\n in either order (#3490, `issue-3490-*.test.ts`, `package-stamp.test.ts`).\n Qualified names are `@scope/pkg:Class`; the scope is a deliberate\n discriminator, so manifest generation (`generateManifest`,\n `applyGenerationPasses`, hence `pnpm build`) throws\n `CONFIG_UNSCOPED_PACKAGE_NAME` for an unscoped `package.json` name (#3408).\n Instance and collection registry lookups pass the qualified name. The schema\n planner rejects a table claimed by two unrelated classes\n (`CONFIG_TABLE_NAME_COLLISION`): only one STI family shares a table (#3098);\n collections (including `SmrtReportCollection`) never claim one. Consumer\n gates: `registry/__tests__/issue-3110-*.test.ts`, `issue-3109-*.test.ts`,\n `packages/bundle-gate/src/__tests__/consumer-same-name.spec.ts`.\n- API custom-action eligibility has ONE resolver, `resolveApiMethodExposure()`\n in `generators/custom-action.ts`: both SvelteKit route emitters,\n `resolveApiActionSet`, and `knowledge.ts` read it, and a new consumer must too\n — a local mirror is how a method gets reported unavailable while its route\n file is still written. A public method routes by default only when every\n parameter is JSON-shaped; `@method({ expose })` overrides in both directions,\n `expose: true` bypasses the heuristic ALONE, and an explicit `api.include` or\n `api.routes` entry keeps its pre-#2686 route. Fail closed on scanner\n uncertainty: read `parameters[].typeUnresolved`, never the `'any'` it\n substitutes. Accepting `Date` as wire-able and hydrating it\n (`toCustomActionDate`) are one decision — changing either breaks the other.\n The runtime `APIGenerator` transport stays declaration-gated: `rest.ts`\n dispatch and `preflight-route.ts` prediction both read\n `declaresRuntimeRestRoute()`, which must accept every `ApiCustomRouteConfig`\n option so a sweep moving one onto its method cannot delete the endpoint. Its\n twin `declaresRuntimeRestRouteShape()` deliberately ignores `expose: false`:\n the dispatcher must still SEE a withheld declaration to answer 404, because\n `POST /<collection>/<segment>` resolves to `create` when nothing claims the\n segment. Split unions and type arguments with `splitTopLevel()` — a naive\n `split('|')` truncates `Record<string, Asset | null>` into fragments that\n match no rule and are then accepted, widening the gate. `extractTypeName`\n returns `null` for a generic with an unresolvable ARGUMENT or a union with an\n unresolvable BRANCH so those reach that fail-closed path instead of arriving\n as a bare `'Array'`. Runtime transports read\n `ObjectRegistry.resolveRuntimeMethod()`, which tries the item class's manifest\n entry, then the COLLECTION class's (where a collection-hosted action's\n parameters live), then the live `@method()` store — keyed by CONSTRUCTOR,\n never by simple name (`Account` exists in two packages), and recording\n `isStatic` because an unscanned runtime has no manifest to recover the\n receiver from. `isRestActionRoutable` ANDs \"declared\" with that receiver, so\n it never predicts `allow` for an action dispatch refuses. A declared action\n with no receiver is refused (501 collection-scoped, 404 item-scoped), never\n allowed to fall through into `create`. All eight consumers read the resolver,\n including `packages/smrt-workbench/src/discovery.ts`; it imports the\n `./generators/custom-action` LEAF subpath, not `./generators`, because that\n barrel value-re-exports `MCPGenerator` and so drags `@happyvertical/ai` and\n `@happyvertical/sql` into a build-time helper (2 modules vs 109). Keep\n `custom-action.ts` free of value imports outside `tools/tool-generator`.\n\n## Gotchas\n\n- Optional filesystem support stays lazy: use `createFilesystemAdapter()` in\n `src/filesystem-loader.ts`, not a static files-SDK import. Fully bundled apps\n import `@happyvertical/smrt-core/filesystem` at startup. Use\n `importOptionalDependency()` for similarly heavy optional dependencies.\n- Database retries are transient-only, four attempts total for `get`/`upsert`.\n Use `src/db-errors.ts` classifiers through the cause chain, never message\n matching (SDK driver text can live in `context.originalError`). Constraints,\n bad input, missing tables, and aborted PostgreSQL transactions fail immediately.\n Unique/PK violations become `VALIDATION_UNIQUE_CONSTRAINT`, NOT NULL becomes\n `VALIDATION_REQUIRED_FIELD`; other failures keep the driver error as `cause`.\n- Property initializers precede option values; options win. Arrays/objects are\n shallow-cloned. Collection creation caches fields; table verification caches\n by DB URL and table. Preserve these scopes when changing initialization.\n- The Vite plugin loads scanner/schema code from `dist/` when present. Rebuild\n core after editing those sources before testing consumer manifest generation.\n Vite 8 requires `oxc.decorator: { legacy: true, emitDecoratorMetadata: true }`.\n\n## Validation\n\n`typecheck` checks production source first, then the test project in\n`tsconfig.test.json`. Test coverage and the shared relaxed config\ncontract are documented in [agents/test-types.md](agents/test-types.md).\n\nRun focused tests first, then applicable package checks:\n\n```bash\npnpm --filter @happyvertical/smrt-core test\npnpm --filter @happyvertical/smrt-core typecheck\npnpm --filter @happyvertical/smrt-core build\npnpm --filter @happyvertical/smrt-core test:postgres\npnpm check:agents-chain\npnpm smrt dev:knowledge-check\n```\n\nThe PostgreSQL lane is required for numeric types, UUID casts, conflict targets,\ntimestamps, and migrations. Tests generate their manifest before Vitest; restart\nwatch mode after adding decorated classes. Documentation-only changes need\ninstruction-chain and knowledge freshness checks, not the runtime test suite.\n",
1123
1124
  "moduleDocs": [
1124
1125
  {
1125
1126
  "path": "agents/object-runtime.md",
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Database connection-string redaction (#3527).
3
+ *
4
+ * Every place SMRT prints a database URL — the CLI `✓ Connected to …` banner,
5
+ * `db:*` headers, verbose logs, connection errors — routes through these two
6
+ * helpers so a password or query-string secret never reaches a terminal, a
7
+ * Kubernetes log, or a log shipper.
8
+ *
9
+ * - {@link redactDatabaseUrl} renders ONE connection value for display: scheme,
10
+ * username, host, port and database path at most. The password becomes
11
+ * `***`; the query string and fragment are dropped. A value that cannot be
12
+ * parsed is never echoed back raw.
13
+ * - {@link redactDatabaseUrlsInText} scrubs connection strings and secret
14
+ * `key=value` pairs embedded anywhere inside free text (driver errors,
15
+ * stacks) and never throws.
16
+ */
17
+ /**
18
+ * Whether a parameter name (query string or libpq keyword) names a secret.
19
+ * Names are normalized (lowercase, `_`/`-` stripped) so `authToken`,
20
+ * `auth_token` and `auth-token` all match.
21
+ */
22
+ export declare function isSensitiveConnectionParam(name: string): boolean;
23
+ /**
24
+ * Render a database connection value for display without credentials.
25
+ *
26
+ * - `postgres://user:pw@host:5432/db?sslpassword=x` →
27
+ * `postgres://user:***@host:5432/db` (password masked, query and fragment
28
+ * dropped).
29
+ * - A URL that WHATWG `URL` cannot parse (an unencoded `#`, whitespace or `@`
30
+ * in the password) is first stripped of its userinfo password and parsed
31
+ * again; if it still does not parse, only its scheme is shown. The raw
32
+ * string is never returned.
33
+ * - A libpq keyword DSN (`host=h user=u password=p dbname=d`) keeps only
34
+ * `host`, `hostaddr`, `port`, `dbname` and `user`.
35
+ * - A bare file path or `:memory:` (SQLite/DuckDB) is returned unchanged.
36
+ *
37
+ * @param value - Connection string, URL, or local database path.
38
+ * @returns A display-safe rendering of `value`.
39
+ */
40
+ export declare function redactDatabaseUrl(value: string): string;
41
+ /**
42
+ * Redact connection-string credentials and secret `key=value` pairs embedded
43
+ * anywhere inside arbitrary text, such as a driver error message or stack.
44
+ *
45
+ * URL passwords become `***` (through the last `@` on the line, so a
46
+ * malformed password cannot leak a tail); any `password=`, `sslpassword=`,
47
+ * `token=`, `authToken=`, `sslkey=`, … value becomes `***`. Non-secret text
48
+ * is left intact. Never throws.
49
+ *
50
+ * @param text - Free text that may quote a connection string.
51
+ * @returns `text` with credentials masked.
52
+ */
53
+ export declare function redactDatabaseUrlsInText(text: string): string;
54
+ //# sourceMappingURL=database-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-url.d.ts","sourceRoot":"","sources":["../../src/utils/database-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYhE;AAwED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAkCvD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK7D"}
@@ -0,0 +1,121 @@
1
+ //#region src/utils/database-url.ts
2
+ /**
3
+ * Database connection-string redaction (#3527).
4
+ *
5
+ * Every place SMRT prints a database URL — the CLI `✓ Connected to …` banner,
6
+ * `db:*` headers, verbose logs, connection errors — routes through these two
7
+ * helpers so a password or query-string secret never reaches a terminal, a
8
+ * Kubernetes log, or a log shipper.
9
+ *
10
+ * - {@link redactDatabaseUrl} renders ONE connection value for display: scheme,
11
+ * username, host, port and database path at most. The password becomes
12
+ * `***`; the query string and fragment are dropped. A value that cannot be
13
+ * parsed is never echoed back raw.
14
+ * - {@link redactDatabaseUrlsInText} scrubs connection strings and secret
15
+ * `key=value` pairs embedded anywhere inside free text (driver errors,
16
+ * stacks) and never throws.
17
+ */
18
+ /** Marker that replaces a credential. */
19
+ var MASK = "***";
20
+ /** Shown instead of a connection value that cannot be parsed safely. */
21
+ var UNPARSEABLE = "[redacted: unparseable connection string]";
22
+ /**
23
+ * Whether a parameter name (query string or libpq keyword) names a secret.
24
+ * Names are normalized (lowercase, `_`/`-` stripped) so `authToken`,
25
+ * `auth_token` and `auth-token` all match.
26
+ */
27
+ function isSensitiveConnectionParam(name) {
28
+ const key = name.toLowerCase().replace(/[_-]/g, "");
29
+ return /password|passwd|passphrase|secret|token|credential|connectionstring/.test(key) || key.endsWith("key") || key === "pwd" || key === "pass" || key === "auth" || key === "dsn";
30
+ }
31
+ var USERINFO_PATTERN = /([a-z][a-z0-9+.-]*:\/\/[^:\s/@]*:)[^\n]*@/gi;
32
+ var KEY_VALUE_PATTERN = /((?:^|[?&;,(\s])([a-z][a-z0-9_-]{0,40})\s*=\s*)('(?:[^'\\\n]|\\.)*'?|"(?:[^"\\\n]|\\.)*"?|[^&;,\s)'"]+)/gi;
33
+ /** A libpq keyword/value DSN: starts with `key=` (`host=h port=5432 …`). */
34
+ var KEYWORD_DSN_PATTERN = /^\s*[a-z][a-z0-9_]*\s*=/i;
35
+ var SCHEME_PATTERN = /^([a-z][a-z0-9+.-]*):/i;
36
+ /** libpq keyword/value DSN keys that are safe to display. */
37
+ var SAFE_KEYWORD_DSN_KEYS = /* @__PURE__ */ new Set([
38
+ "host",
39
+ "hostaddr",
40
+ "port",
41
+ "dbname",
42
+ "user"
43
+ ]);
44
+ function maskKeyValuePairs(text) {
45
+ return text.replace(KEY_VALUE_PATTERN, (match, prefix, key) => isSensitiveConnectionParam(key) ? `${prefix}${MASK}` : match);
46
+ }
47
+ function renderParsedUrl(url) {
48
+ if (url.password) url.password = MASK;
49
+ url.search = "";
50
+ url.hash = "";
51
+ return url.href;
52
+ }
53
+ /** Whether an `@` survives outside the userinfo of a parsed URL. */
54
+ function hasStrayAt(url) {
55
+ return `${url.pathname}${url.search}${url.hash}`.includes("@");
56
+ }
57
+ function tryParseUrl(value) {
58
+ try {
59
+ return new URL(value);
60
+ } catch {
61
+ return null;
62
+ }
63
+ }
64
+ function redactKeywordDsn(value) {
65
+ const safe = [];
66
+ for (const match of value.matchAll(KEY_VALUE_PATTERN)) {
67
+ const key = match[2].toLowerCase();
68
+ if (SAFE_KEYWORD_DSN_KEYS.has(key)) safe.push(`${key}=${match[3]}`);
69
+ }
70
+ return safe.length > 0 ? safe.join(" ") : UNPARSEABLE;
71
+ }
72
+ /**
73
+ * Render a database connection value for display without credentials.
74
+ *
75
+ * - `postgres://user:pw@host:5432/db?sslpassword=x` →
76
+ * `postgres://user:***@host:5432/db` (password masked, query and fragment
77
+ * dropped).
78
+ * - A URL that WHATWG `URL` cannot parse (an unencoded `#`, whitespace or `@`
79
+ * in the password) is first stripped of its userinfo password and parsed
80
+ * again; if it still does not parse, only its scheme is shown. The raw
81
+ * string is never returned.
82
+ * - A libpq keyword DSN (`host=h user=u password=p dbname=d`) keeps only
83
+ * `host`, `hostaddr`, `port`, `dbname` and `user`.
84
+ * - A bare file path or `:memory:` (SQLite/DuckDB) is returned unchanged.
85
+ *
86
+ * @param value - Connection string, URL, or local database path.
87
+ * @returns A display-safe rendering of `value`.
88
+ */
89
+ function redactDatabaseUrl(value) {
90
+ if (typeof value !== "string" || value === "") return "";
91
+ const scheme = SCHEME_PATTERN.exec(value)?.[1];
92
+ if (!scheme || scheme.length === 1) {
93
+ if (KEYWORD_DSN_PATTERN.test(value)) return redactKeywordDsn(value);
94
+ return value;
95
+ }
96
+ const direct = tryParseUrl(value);
97
+ if (direct) return hasStrayAt(direct) ? `${scheme.toLowerCase()}://${UNPARSEABLE}` : renderParsedUrl(direct);
98
+ const stripped = tryParseUrl(value.replace(USERINFO_PATTERN, `$1${MASK}@`));
99
+ if (stripped && !hasStrayAt(stripped)) return renderParsedUrl(stripped);
100
+ return `${scheme.toLowerCase()}://${UNPARSEABLE}`;
101
+ }
102
+ /**
103
+ * Redact connection-string credentials and secret `key=value` pairs embedded
104
+ * anywhere inside arbitrary text, such as a driver error message or stack.
105
+ *
106
+ * URL passwords become `***` (through the last `@` on the line, so a
107
+ * malformed password cannot leak a tail); any `password=`, `sslpassword=`,
108
+ * `token=`, `authToken=`, `sslkey=`, … value becomes `***`. Non-secret text
109
+ * is left intact. Never throws.
110
+ *
111
+ * @param text - Free text that may quote a connection string.
112
+ * @returns `text` with credentials masked.
113
+ */
114
+ function redactDatabaseUrlsInText(text) {
115
+ if (typeof text !== "string" || text === "") return typeof text === "string" ? text : "";
116
+ return maskKeyValuePairs(text.replace(USERINFO_PATTERN, `$1${MASK}@`));
117
+ }
118
+ //#endregion
119
+ export { isSensitiveConnectionParam, redactDatabaseUrl, redactDatabaseUrlsInText };
120
+
121
+ //# sourceMappingURL=database-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-url.js","names":[],"sources":["../../src/utils/database-url.ts"],"sourcesContent":["/**\n * Database connection-string redaction (#3527).\n *\n * Every place SMRT prints a database URL — the CLI `✓ Connected to …` banner,\n * `db:*` headers, verbose logs, connection errors — routes through these two\n * helpers so a password or query-string secret never reaches a terminal, a\n * Kubernetes log, or a log shipper.\n *\n * - {@link redactDatabaseUrl} renders ONE connection value for display: scheme,\n * username, host, port and database path at most. The password becomes\n * `***`; the query string and fragment are dropped. A value that cannot be\n * parsed is never echoed back raw.\n * - {@link redactDatabaseUrlsInText} scrubs connection strings and secret\n * `key=value` pairs embedded anywhere inside free text (driver errors,\n * stacks) and never throws.\n */\n\n/** Marker that replaces a credential. */\nconst MASK = '***';\n\n/** Shown instead of a connection value that cannot be parsed safely. */\nconst UNPARSEABLE = '[redacted: unparseable connection string]';\n\n/**\n * Whether a parameter name (query string or libpq keyword) names a secret.\n * Names are normalized (lowercase, `_`/`-` stripped) so `authToken`,\n * `auth_token` and `auth-token` all match.\n */\nexport function isSensitiveConnectionParam(name: string): boolean {\n const key = name.toLowerCase().replace(/[_-]/g, '');\n return (\n /password|passwd|passphrase|secret|token|credential|connectionstring/.test(\n key,\n ) ||\n key.endsWith('key') ||\n key === 'pwd' ||\n key === 'pass' ||\n key === 'auth' ||\n key === 'dsn'\n );\n}\n\n// The userinfo segment of a connection-string-shaped substring\n// (`scheme://user:PASSWORD@`). The username is `*` so an empty username\n// (`postgres://:secret@host`) still matches. The password run is greedy\n// `[^\\n]*@`: it backtracks to the LAST `@` on the line, because a malformed\n// password (literal `@`, raw whitespace, scheme-like text) has no reliable end\n// short of that. The match never crosses a newline, so other stack frames\n// survive. Over-redaction is the accepted, safe failure.\nconst USERINFO_PATTERN = /([a-z][a-z0-9+.-]*:\\/\\/[^:\\s/@]*:)[^\\n]*@/gi;\n\n// A `key=value` pair in free text, a query string, or a libpq keyword DSN.\n// Boundary: start, `?`, `&`, `;`, `,`, `(`, or whitespace. The value may be\n// single- or double-quoted (libpq allows `password='a b'`).\nconst KEY_VALUE_PATTERN =\n /((?:^|[?&;,(\\s])([a-z][a-z0-9_-]{0,40})\\s*=\\s*)('(?:[^'\\\\\\n]|\\\\.)*'?|\"(?:[^\"\\\\\\n]|\\\\.)*\"?|[^&;,\\s)'\"]+)/gi;\n\n/** A libpq keyword/value DSN: starts with `key=` (`host=h port=5432 …`). */\nconst KEYWORD_DSN_PATTERN = /^\\s*[a-z][a-z0-9_]*\\s*=/i;\n\nconst SCHEME_PATTERN = /^([a-z][a-z0-9+.-]*):/i;\n\n/** libpq keyword/value DSN keys that are safe to display. */\nconst SAFE_KEYWORD_DSN_KEYS = new Set([\n 'host',\n 'hostaddr',\n 'port',\n 'dbname',\n 'user',\n]);\n\nfunction maskKeyValuePairs(text: string): string {\n return text.replace(\n KEY_VALUE_PATTERN,\n (match, prefix: string, key: string) =>\n isSensitiveConnectionParam(key) ? `${prefix}${MASK}` : match,\n );\n}\n\nfunction renderParsedUrl(url: URL): string {\n if (url.password) {\n url.password = MASK;\n }\n url.search = '';\n url.hash = '';\n return url.href;\n}\n\n/** Whether an `@` survives outside the userinfo of a parsed URL. */\nfunction hasStrayAt(url: URL): boolean {\n return `${url.pathname}${url.search}${url.hash}`.includes('@');\n}\n\nfunction tryParseUrl(value: string): URL | null {\n try {\n return new URL(value);\n } catch {\n return null;\n }\n}\n\nfunction redactKeywordDsn(value: string): string {\n const safe: string[] = [];\n for (const match of value.matchAll(KEY_VALUE_PATTERN)) {\n const key = match[2].toLowerCase();\n if (SAFE_KEYWORD_DSN_KEYS.has(key)) {\n safe.push(`${key}=${match[3]}`);\n }\n }\n return safe.length > 0 ? safe.join(' ') : UNPARSEABLE;\n}\n\n/**\n * Render a database connection value for display without credentials.\n *\n * - `postgres://user:pw@host:5432/db?sslpassword=x` →\n * `postgres://user:***@host:5432/db` (password masked, query and fragment\n * dropped).\n * - A URL that WHATWG `URL` cannot parse (an unencoded `#`, whitespace or `@`\n * in the password) is first stripped of its userinfo password and parsed\n * again; if it still does not parse, only its scheme is shown. The raw\n * string is never returned.\n * - A libpq keyword DSN (`host=h user=u password=p dbname=d`) keeps only\n * `host`, `hostaddr`, `port`, `dbname` and `user`.\n * - A bare file path or `:memory:` (SQLite/DuckDB) is returned unchanged.\n *\n * @param value - Connection string, URL, or local database path.\n * @returns A display-safe rendering of `value`.\n */\nexport function redactDatabaseUrl(value: string): string {\n if (typeof value !== 'string' || value === '') {\n return '';\n }\n\n const scheme = SCHEME_PATTERN.exec(value)?.[1];\n // A one-letter \"scheme\" is a Windows drive (`C:\\data\\dev.db`), not a URL.\n if (!scheme || scheme.length === 1) {\n if (KEYWORD_DSN_PATTERN.test(value)) {\n return redactKeywordDsn(value);\n }\n // A local database path (`./data/dev.db`, `:memory:`): nothing secret.\n return value;\n }\n\n // Any `@` the parser left outside the userinfo (in the path, query or\n // fragment) makes the string ambiguous: `owner:2024/Xy9@host` parses as\n // host `owner`, port `2024`; `owner:pa@rt#secret@host` as host `rt`; a\n // legitimate `u:pw@h/db?x=a@b` looks the same. No reading is provably\n // right, so show none of it rather than risk a password fragment.\n const direct = tryParseUrl(value);\n if (direct) {\n return hasStrayAt(direct)\n ? `${scheme.toLowerCase()}://${UNPARSEABLE}`\n : renderParsedUrl(direct);\n }\n // The parser rejected it (an unencoded `#`, whitespace or `@` in the\n // password): mask the userinfo through the last `@` on the line and parse\n // again. Everything before that `@` is masked, so nothing of it is shown.\n const stripped = tryParseUrl(value.replace(USERINFO_PATTERN, `$1${MASK}@`));\n if (stripped && !hasStrayAt(stripped)) {\n return renderParsedUrl(stripped);\n }\n return `${scheme.toLowerCase()}://${UNPARSEABLE}`;\n}\n\n/**\n * Redact connection-string credentials and secret `key=value` pairs embedded\n * anywhere inside arbitrary text, such as a driver error message or stack.\n *\n * URL passwords become `***` (through the last `@` on the line, so a\n * malformed password cannot leak a tail); any `password=`, `sslpassword=`,\n * `token=`, `authToken=`, `sslkey=`, … value becomes `***`. Non-secret text\n * is left intact. Never throws.\n *\n * @param text - Free text that may quote a connection string.\n * @returns `text` with credentials masked.\n */\nexport function redactDatabaseUrlsInText(text: string): string {\n if (typeof text !== 'string' || text === '') {\n return typeof text === 'string' ? text : '';\n }\n return maskKeyValuePairs(text.replace(USERINFO_PATTERN, `$1${MASK}@`));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAM,OAAO;;AAGb,IAAM,cAAc;;;;;;AAOpB,SAAgB,2BAA2B,MAAuB;CAChE,MAAM,MAAM,KAAK,YAAY,CAAC,CAAC,QAAQ,SAAS,EAAE;CAClD,OACE,sEAAsE,KACpE,GACF,KACA,IAAI,SAAS,KAAK,KAClB,QAAQ,SACR,QAAQ,UACR,QAAQ,UACR,QAAQ;AAEZ;AASA,IAAM,mBAAmB;AAKzB,IAAM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,gBAC7B,gBAAgB,MAAM;CAK5B,MAAM,WAAW,YAAY,MAAM,QAAQ,kBAAkB,KAAK,KAAK,EAAE,CAAC;CAC1E,IAAI,YAAY,CAAC,WAAW,QAAQ,GAClC,OAAO,gBAAgB,QAAQ;CAEjC,OAAO,GAAG,OAAO,YAAY,EAAE,KAAK;AACtC;;;;;;;;;;;;;AAcA,SAAgB,yBAAyB,MAAsB;CAC7D,IAAI,OAAO,SAAS,YAAY,SAAS,IACvC,OAAO,OAAO,SAAS,WAAW,OAAO;CAE3C,OAAO,kBAAkB,KAAK,QAAQ,kBAAkB,KAAK,KAAK,EAAE,CAAC;AACvE"}
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SmrtObject } from './object';
1
+ import type { SmrtObject } from "./object.js";
2
2
  import { classnameToTablename, pluralize, toSnakeCase } from './utils/naming.js';
3
3
  import { toSafeBooleanInteger, toSafeInteger } from './utils/safe-integer.js';
4
4
  export { classnameToTablename, pluralize, toSafeBooleanInteger, toSafeInteger, toSnakeCase, };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EACL,oBAAoB,EACpB,SAAS,EACT,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAQ9E,OAAO,EACL,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,WAAW,GACZ,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,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I,EAAE,KAAK,EAAE,KAAK,UAAU,EAC/C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,oCA6CjC;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMpE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAa5E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAEhC,SAAS,EAAE,QAAQ,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,UAAU,CAAC,UAiB7D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,CAAC,CAqIxD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,2BAc1D"}
@@ -30,7 +30,7 @@
30
30
  * - Cleanup rides the existing generated-route sweep: the emitted file
31
31
  * starts with {@link AUTO_GENERATED_ROUTE_HEADER}.
32
32
  */
33
- import type { SmartObjectManifest } from '../scanner/types';
33
+ import type { SmartObjectManifest } from "../scanner/types.js";
34
34
  import type { SvelteKitOptions } from './sveltekit-generator.js';
35
35
  /**
36
36
  * Pick the class the route resolves its database through: the first
@@ -1 +1 @@
1
- {"version":3,"file":"changes-route.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/changes-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAWjE;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,mBAAmB,GAC5B,MAAM,GAAG,IAAI,CASf;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CA6BT"}
1
+ {"version":3,"file":"changes-route.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/changes-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,qBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAWjE;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,mBAAmB,GAC5B,MAAM,GAAG,IAAI,CASf;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CA6BT"}
@@ -33,7 +33,7 @@
33
33
  * - Cleanup rides the generated-route sweep: the file starts with
34
34
  * {@link AUTO_GENERATED_ROUTE_HEADER}.
35
35
  */
36
- import type { SmartObjectManifest } from '../scanner/types';
36
+ import type { SmartObjectManifest } from "../scanner/types.js";
37
37
  import type { SvelteKitOptions } from './sveltekit-generator.js';
38
38
  /**
39
39
  * Generate the `_events/+server.ts` route. Returns true when a route was
@@ -1 +1 @@
1
- {"version":3,"file":"events-route.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/events-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,gBAAgB,EACzB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAiCT"}
1
+ {"version":3,"file":"events-route.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/events-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AAO5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,gBAAgB,EACzB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAiCT"}
@@ -5,7 +5,7 @@
5
5
  import type { DomainKnowledgeConfig } from '@happyvertical/smrt-types';
6
6
  import { type ApiMethodExposure, type WireabilityOptions } from '../generators/custom-action.js';
7
7
  import type { ApiHttpMethod } from '../registry/types.js';
8
- import type { MethodDefinition, SmartObjectDefinition, SmartObjectManifest } from '../scanner/types';
8
+ import type { MethodDefinition, SmartObjectDefinition, SmartObjectManifest } from "../scanner/types.js";
9
9
  export interface SvelteKitOptions {
10
10
  enabled: boolean;
11
11
  routesDir: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sveltekit-generator.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/sveltekit-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EACL,KAAK,iBAAiB,EAYtB,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AA8B1B,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kFAAkF;IAClF,yBAAyB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iFAAiF;IACjF,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACtC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF;;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AM,EACnB,SAAS,EAAE,MAAM,GAChB,IAAI,CAMN;AAeD,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAER;AA80BD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,qBAAqB,EAChC,QAAQ,EAAE,mBAAmB,GAAG,SAAS,EACzC,uBAAuB,EAAE,OAAO,EAChC,WAAW,GAAE,kBAAuB,GACnC;IACD,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC3C,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC9C,CA6BA;AA6DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,qBAAqB,EAChC,QAAQ,CAAC,EAAE,mBAAmB,EAC9B,WAAW,GAAE,kBAAuB,GACnC,GAAG,CAAC,MAAM,CAAC,CAqBb;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AA6DD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,mBAAmB,GAC5B,wBAAwB,EAAE,CAsG5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,mBAAmB,GAC5B,IAAI,CA6EN"}
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * Contract documentation: docs/content/architecture/sync-apply-contract.md
17
17
  */
18
- import type { SmartObjectManifest } from '../scanner/types';
18
+ import type { SmartObjectManifest } from "../scanner/types.js";
19
19
  import type { SvelteKitOptions } from './sveltekit-generator.js';
20
20
  declare const MUTATING_ACTIONS: readonly ["create", "update", "delete"];
21
21
  type MutatingAction = (typeof MUTATING_ACTIONS)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"sync-apply-route.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/sync-apply-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,QAAA,MAAM,gBAAgB,yCAA0C,CAAC;AAEjE,KAAK,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,wDAAwD;AACxD,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B,GAAG,EAAE,cAAc,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;CACvB;AA6ED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,mBAAmB,GAC5B,cAAc,EAAE,CAiClB;AAiBD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,cAAc,EAAE,EACzB,uBAAuB,EAAE,MAAM,GAC9B,MAAM,CA4JR;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAmCT"}
1
+ {"version":3,"file":"sync-apply-route.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/sync-apply-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,qBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,QAAA,MAAM,gBAAgB,yCAA0C,CAAC;AAEjE,KAAK,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,wDAAwD;AACxD,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B,GAAG,EAAE,cAAc,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;CACvB;AA6ED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,mBAAmB,GAC5B,cAAc,EAAE,CAiClB;AAiBD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,cAAc,EAAE,EACzB,uBAAuB,EAAE,MAAM,GAC9B,MAAM,CA4JR;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAmCT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-core",
3
- "version": "0.54.3",
3
+ "version": "0.55.0",
4
4
  "description": "Core AI agent framework with standardized collections, object-relational mapping, and code generators",
5
5
  "author": "HappyVertical",
6
6
  "type": "module",
@@ -138,6 +138,11 @@
138
138
  "import": "./dist/manifest/discover-base-classes.js",
139
139
  "default": "./dist/manifest/discover-base-classes.js"
140
140
  },
141
+ "./utils/database-url": {
142
+ "types": "./dist/utils/database-url.d.ts",
143
+ "import": "./dist/utils/database-url.js",
144
+ "default": "./dist/utils/database-url.js"
145
+ },
141
146
  "./utils/import-workspace-module": {
142
147
  "types": "./dist/utils/import-workspace-module.d.ts",
143
148
  "import": "./dist/utils/import-workspace-module.js",
@@ -159,9 +164,9 @@
159
164
  "@happyvertical/files": "^0.102.1",
160
165
  "@happyvertical/json": "^0.102.1",
161
166
  "@happyvertical/logger": "^0.102.1",
162
- "@happyvertical/smrt-config": "0.54.3",
163
- "@happyvertical/smrt-scanner": "0.54.3",
164
- "@happyvertical/smrt-types": "0.54.3",
167
+ "@happyvertical/smrt-config": "0.55.0",
168
+ "@happyvertical/smrt-scanner": "0.55.0",
169
+ "@happyvertical/smrt-types": "0.55.0",
165
170
  "@happyvertical/sql": "^0.102.1",
166
171
  "@happyvertical/utils": "^0.102.1",
167
172
  "@oxc-project/runtime": "^0.150.0",