@carlonicora/nestjs-neo4jsonapi 4.4.0 → 4.5.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 (215) hide show
  1. package/dist/agents/responder/factories/responder.context.factory.d.ts +2 -1
  2. package/dist/agents/responder/factories/responder.context.factory.d.ts.map +1 -1
  3. package/dist/agents/responder/factories/responder.context.factory.js.map +1 -1
  4. package/dist/agents/responder/services/responder.service.d.ts +16 -1
  5. package/dist/agents/responder/services/responder.service.d.ts.map +1 -1
  6. package/dist/agents/responder/services/responder.service.js +14 -2
  7. package/dist/agents/responder/services/responder.service.js.map +1 -1
  8. package/dist/bootstrap/app.module.factory.d.ts.map +1 -1
  9. package/dist/bootstrap/app.module.factory.js +2 -0
  10. package/dist/bootstrap/app.module.factory.js.map +1 -1
  11. package/dist/bootstrap/bootstrap.options.d.ts +35 -0
  12. package/dist/bootstrap/bootstrap.options.d.ts.map +1 -1
  13. package/dist/common/index.d.ts +1 -0
  14. package/dist/common/index.d.ts.map +1 -1
  15. package/dist/common/index.js +4 -0
  16. package/dist/common/index.js.map +1 -1
  17. package/dist/common/repositories/handbook.ai-source-query.provider.d.ts +34 -0
  18. package/dist/common/repositories/handbook.ai-source-query.provider.d.ts.map +1 -0
  19. package/dist/common/repositories/handbook.ai-source-query.provider.js +58 -0
  20. package/dist/common/repositories/handbook.ai-source-query.provider.js.map +1 -0
  21. package/dist/common/repositories/index.d.ts +1 -0
  22. package/dist/common/repositories/index.d.ts.map +1 -1
  23. package/dist/common/repositories/index.js +1 -0
  24. package/dist/common/repositories/index.js.map +1 -1
  25. package/dist/common/types/data.limits.d.ts +4 -0
  26. package/dist/common/types/data.limits.d.ts.map +1 -1
  27. package/dist/common/utils/chunk-content.util.d.ts +28 -0
  28. package/dist/common/utils/chunk-content.util.d.ts.map +1 -0
  29. package/dist/common/utils/chunk-content.util.js +32 -0
  30. package/dist/common/utils/chunk-content.util.js.map +1 -0
  31. package/dist/config/base.config.d.ts.map +1 -1
  32. package/dist/config/base.config.js +1 -0
  33. package/dist/config/base.config.js.map +1 -1
  34. package/dist/config/enums/queue.id.d.ts +1 -0
  35. package/dist/config/enums/queue.id.d.ts.map +1 -1
  36. package/dist/config/enums/queue.id.js +1 -0
  37. package/dist/config/enums/queue.id.js.map +1 -1
  38. package/dist/config/interfaces/config.two.factor.interface.d.ts +10 -3
  39. package/dist/config/interfaces/config.two.factor.interface.d.ts.map +1 -1
  40. package/dist/core/core.module.d.ts.map +1 -1
  41. package/dist/core/core.module.js +8 -1
  42. package/dist/core/core.module.js.map +1 -1
  43. package/dist/core/llm/services/model.service.d.ts +13 -0
  44. package/dist/core/llm/services/model.service.d.ts.map +1 -1
  45. package/dist/core/llm/services/model.service.js +22 -0
  46. package/dist/core/llm/services/model.service.js.map +1 -1
  47. package/dist/core/neo4j/abstracts/abstract.service.d.ts.map +1 -1
  48. package/dist/core/neo4j/abstracts/abstract.service.js +8 -1
  49. package/dist/core/neo4j/abstracts/abstract.service.js.map +1 -1
  50. package/dist/foundations/assistant/controllers/assistant.controller.d.ts.map +1 -1
  51. package/dist/foundations/assistant/controllers/assistant.controller.js +6 -2
  52. package/dist/foundations/assistant/controllers/assistant.controller.js.map +1 -1
  53. package/dist/foundations/assistant/dtos/assistant-append.dto.d.ts +2 -0
  54. package/dist/foundations/assistant/dtos/assistant-append.dto.d.ts.map +1 -1
  55. package/dist/foundations/assistant/dtos/assistant-append.dto.js +10 -0
  56. package/dist/foundations/assistant/dtos/assistant-append.dto.js.map +1 -1
  57. package/dist/foundations/assistant/dtos/assistant-post.dto.d.ts +2 -0
  58. package/dist/foundations/assistant/dtos/assistant-post.dto.d.ts.map +1 -1
  59. package/dist/foundations/assistant/dtos/assistant-post.dto.js +10 -0
  60. package/dist/foundations/assistant/dtos/assistant-post.dto.js.map +1 -1
  61. package/dist/foundations/assistant/services/assistant.service.d.ts +8 -1
  62. package/dist/foundations/assistant/services/assistant.service.d.ts.map +1 -1
  63. package/dist/foundations/assistant/services/assistant.service.js +14 -1
  64. package/dist/foundations/assistant/services/assistant.service.js.map +1 -1
  65. package/dist/foundations/foundations.modules.d.ts +6 -0
  66. package/dist/foundations/foundations.modules.d.ts.map +1 -1
  67. package/dist/foundations/foundations.modules.js +10 -2
  68. package/dist/foundations/foundations.modules.js.map +1 -1
  69. package/dist/foundations/handbook/controllers/handbook-thread.controller.d.ts +61 -0
  70. package/dist/foundations/handbook/controllers/handbook-thread.controller.d.ts.map +1 -0
  71. package/dist/foundations/handbook/controllers/handbook-thread.controller.js +170 -0
  72. package/dist/foundations/handbook/controllers/handbook-thread.controller.js.map +1 -0
  73. package/dist/foundations/handbook/controllers/handbook.controller.d.ts +29 -0
  74. package/dist/foundations/handbook/controllers/handbook.controller.d.ts.map +1 -0
  75. package/dist/foundations/handbook/controllers/handbook.controller.js +123 -0
  76. package/dist/foundations/handbook/controllers/handbook.controller.js.map +1 -0
  77. package/dist/foundations/handbook/dtos/handbook-page.dto.d.ts +11 -0
  78. package/dist/foundations/handbook/dtos/handbook-page.dto.d.ts.map +1 -0
  79. package/dist/foundations/handbook/dtos/handbook-page.dto.js +45 -0
  80. package/dist/foundations/handbook/dtos/handbook-page.dto.js.map +1 -0
  81. package/dist/foundations/handbook/dtos/handbook-thread-message-post.dto.d.ts +24 -0
  82. package/dist/foundations/handbook/dtos/handbook-thread-message-post.dto.d.ts.map +1 -0
  83. package/dist/foundations/handbook/dtos/handbook-thread-message-post.dto.js +60 -0
  84. package/dist/foundations/handbook/dtos/handbook-thread-message-post.dto.js.map +1 -0
  85. package/dist/foundations/handbook/dtos/handbook-thread-patch.dto.d.ts +19 -0
  86. package/dist/foundations/handbook/dtos/handbook-thread-patch.dto.d.ts.map +1 -0
  87. package/dist/foundations/handbook/dtos/handbook-thread-patch.dto.js +59 -0
  88. package/dist/foundations/handbook/dtos/handbook-thread-patch.dto.js.map +1 -0
  89. package/dist/foundations/handbook/dtos/handbook-thread-post.dto.d.ts +24 -0
  90. package/dist/foundations/handbook/dtos/handbook-thread-post.dto.d.ts.map +1 -0
  91. package/dist/foundations/handbook/dtos/handbook-thread-post.dto.js +60 -0
  92. package/dist/foundations/handbook/dtos/handbook-thread-post.dto.js.map +1 -0
  93. package/dist/foundations/handbook/entities/handbook-page.d.ts +25 -0
  94. package/dist/foundations/handbook/entities/handbook-page.d.ts.map +1 -0
  95. package/dist/foundations/handbook/entities/handbook-page.js +45 -0
  96. package/dist/foundations/handbook/entities/handbook-page.js.map +1 -0
  97. package/dist/foundations/handbook/entities/handbook-page.meta.d.ts +3 -0
  98. package/dist/foundations/handbook/entities/handbook-page.meta.d.ts.map +1 -0
  99. package/dist/foundations/handbook/entities/handbook-page.meta.js +10 -0
  100. package/dist/foundations/handbook/entities/handbook-page.meta.js.map +1 -0
  101. package/dist/foundations/handbook/entities/handbook-section.d.ts +22 -0
  102. package/dist/foundations/handbook/entities/handbook-section.d.ts.map +1 -0
  103. package/dist/foundations/handbook/entities/handbook-section.js +24 -0
  104. package/dist/foundations/handbook/entities/handbook-section.js.map +1 -0
  105. package/dist/foundations/handbook/entities/handbook-section.meta.d.ts +3 -0
  106. package/dist/foundations/handbook/entities/handbook-section.meta.d.ts.map +1 -0
  107. package/dist/foundations/handbook/entities/handbook-section.meta.js +10 -0
  108. package/dist/foundations/handbook/entities/handbook-section.meta.js.map +1 -0
  109. package/dist/foundations/handbook/entities/handbook-thread-message.d.ts +36 -0
  110. package/dist/foundations/handbook/entities/handbook-thread-message.d.ts.map +1 -0
  111. package/dist/foundations/handbook/entities/handbook-thread-message.js +28 -0
  112. package/dist/foundations/handbook/entities/handbook-thread-message.js.map +1 -0
  113. package/dist/foundations/handbook/entities/handbook-thread-message.meta.d.ts +3 -0
  114. package/dist/foundations/handbook/entities/handbook-thread-message.meta.d.ts.map +1 -0
  115. package/dist/foundations/handbook/entities/handbook-thread-message.meta.js +10 -0
  116. package/dist/foundations/handbook/entities/handbook-thread-message.meta.js.map +1 -0
  117. package/dist/foundations/handbook/entities/handbook-thread.d.ts +47 -0
  118. package/dist/foundations/handbook/entities/handbook-thread.d.ts.map +1 -0
  119. package/dist/foundations/handbook/entities/handbook-thread.js +35 -0
  120. package/dist/foundations/handbook/entities/handbook-thread.js.map +1 -0
  121. package/dist/foundations/handbook/entities/handbook-thread.meta.d.ts +3 -0
  122. package/dist/foundations/handbook/entities/handbook-thread.meta.d.ts.map +1 -0
  123. package/dist/foundations/handbook/entities/handbook-thread.meta.js +10 -0
  124. package/dist/foundations/handbook/entities/handbook-thread.meta.js.map +1 -0
  125. package/dist/foundations/handbook/handbook.module.d.ts +21 -0
  126. package/dist/foundations/handbook/handbook.module.d.ts.map +1 -0
  127. package/dist/foundations/handbook/handbook.module.js +135 -0
  128. package/dist/foundations/handbook/handbook.module.js.map +1 -0
  129. package/dist/foundations/handbook/index.d.ts +23 -0
  130. package/dist/foundations/handbook/index.d.ts.map +1 -0
  131. package/dist/foundations/handbook/index.js +39 -0
  132. package/dist/foundations/handbook/index.js.map +1 -0
  133. package/dist/foundations/handbook/interfaces/handbook.config.interface.d.ts +26 -0
  134. package/dist/foundations/handbook/interfaces/handbook.config.interface.d.ts.map +1 -0
  135. package/dist/foundations/handbook/interfaces/handbook.config.interface.js +10 -0
  136. package/dist/foundations/handbook/interfaces/handbook.config.interface.js.map +1 -0
  137. package/dist/foundations/handbook/processors/handbook.processor.d.ts +22 -0
  138. package/dist/foundations/handbook/processors/handbook.processor.d.ts.map +1 -0
  139. package/dist/foundations/handbook/processors/handbook.processor.js +108 -0
  140. package/dist/foundations/handbook/processors/handbook.processor.js.map +1 -0
  141. package/dist/foundations/handbook/repositories/handbook-page.repository.d.ts +135 -0
  142. package/dist/foundations/handbook/repositories/handbook-page.repository.d.ts.map +1 -0
  143. package/dist/foundations/handbook/repositories/handbook-page.repository.js +245 -0
  144. package/dist/foundations/handbook/repositories/handbook-page.repository.js.map +1 -0
  145. package/dist/foundations/handbook/repositories/handbook-section.repository.d.ts +36 -0
  146. package/dist/foundations/handbook/repositories/handbook-section.repository.d.ts.map +1 -0
  147. package/dist/foundations/handbook/repositories/handbook-section.repository.js +91 -0
  148. package/dist/foundations/handbook/repositories/handbook-section.repository.js.map +1 -0
  149. package/dist/foundations/handbook/repositories/handbook-thread-message.repository.d.ts +36 -0
  150. package/dist/foundations/handbook/repositories/handbook-thread-message.repository.d.ts.map +1 -0
  151. package/dist/foundations/handbook/repositories/handbook-thread-message.repository.js +63 -0
  152. package/dist/foundations/handbook/repositories/handbook-thread-message.repository.js.map +1 -0
  153. package/dist/foundations/handbook/repositories/handbook-thread.repository.d.ts +63 -0
  154. package/dist/foundations/handbook/repositories/handbook-thread.repository.d.ts.map +1 -0
  155. package/dist/foundations/handbook/repositories/handbook-thread.repository.js +86 -0
  156. package/dist/foundations/handbook/repositories/handbook-thread.repository.js.map +1 -0
  157. package/dist/foundations/handbook/services/handbook-ingest.service.d.ts +101 -0
  158. package/dist/foundations/handbook/services/handbook-ingest.service.d.ts.map +1 -0
  159. package/dist/foundations/handbook/services/handbook-ingest.service.js +408 -0
  160. package/dist/foundations/handbook/services/handbook-ingest.service.js.map +1 -0
  161. package/dist/foundations/handbook/services/handbook-page.service.d.ts +57 -0
  162. package/dist/foundations/handbook/services/handbook-page.service.d.ts.map +1 -0
  163. package/dist/foundations/handbook/services/handbook-page.service.js +116 -0
  164. package/dist/foundations/handbook/services/handbook-page.service.js.map +1 -0
  165. package/dist/foundations/handbook/services/handbook-section.service.d.ts +15 -0
  166. package/dist/foundations/handbook/services/handbook-section.service.d.ts.map +1 -0
  167. package/dist/foundations/handbook/services/handbook-section.service.js +37 -0
  168. package/dist/foundations/handbook/services/handbook-section.service.js.map +1 -0
  169. package/dist/foundations/handbook/services/handbook-thread-message.service.d.ts +27 -0
  170. package/dist/foundations/handbook/services/handbook-thread-message.service.d.ts.map +1 -0
  171. package/dist/foundations/handbook/services/handbook-thread-message.service.js +39 -0
  172. package/dist/foundations/handbook/services/handbook-thread-message.service.js.map +1 -0
  173. package/dist/foundations/handbook/services/handbook-thread.service.d.ts +164 -0
  174. package/dist/foundations/handbook/services/handbook-thread.service.d.ts.map +1 -0
  175. package/dist/foundations/handbook/services/handbook-thread.service.js +297 -0
  176. package/dist/foundations/handbook/services/handbook-thread.service.js.map +1 -0
  177. package/dist/foundations/how-to/controllers/how-to.controller.d.ts +7 -1
  178. package/dist/foundations/how-to/controllers/how-to.controller.d.ts.map +1 -1
  179. package/dist/foundations/how-to/controllers/how-to.controller.js +18 -12
  180. package/dist/foundations/how-to/controllers/how-to.controller.js.map +1 -1
  181. package/dist/foundations/how-to/controllers/how-to.public.controller.d.ts +7 -0
  182. package/dist/foundations/how-to/controllers/how-to.public.controller.d.ts.map +1 -1
  183. package/dist/foundations/how-to/controllers/how-to.public.controller.js +7 -0
  184. package/dist/foundations/how-to/controllers/how-to.public.controller.js.map +1 -1
  185. package/dist/foundations/how-to/entities/how-to.d.ts.map +1 -1
  186. package/dist/foundations/how-to/entities/how-to.js +60 -13
  187. package/dist/foundations/how-to/entities/how-to.js.map +1 -1
  188. package/dist/foundations/how-to/how-to.module.d.ts +36 -1
  189. package/dist/foundations/how-to/how-to.module.d.ts.map +1 -1
  190. package/dist/foundations/how-to/how-to.module.js +80 -4
  191. package/dist/foundations/how-to/how-to.module.js.map +1 -1
  192. package/dist/foundations/how-to/index.d.ts +1 -0
  193. package/dist/foundations/how-to/index.d.ts.map +1 -1
  194. package/dist/foundations/how-to/index.js +1 -0
  195. package/dist/foundations/how-to/index.js.map +1 -1
  196. package/dist/foundations/how-to/interfaces/how-to.config.interface.d.ts +30 -0
  197. package/dist/foundations/how-to/interfaces/how-to.config.interface.d.ts.map +1 -0
  198. package/dist/foundations/how-to/interfaces/how-to.config.interface.js +10 -0
  199. package/dist/foundations/how-to/interfaces/how-to.config.interface.js.map +1 -0
  200. package/dist/foundations/how-to/processors/how-to.processor.d.ts +3 -1
  201. package/dist/foundations/how-to/processors/how-to.processor.d.ts.map +1 -1
  202. package/dist/foundations/how-to/processors/how-to.processor.js +8 -1
  203. package/dist/foundations/how-to/processors/how-to.processor.js.map +1 -1
  204. package/dist/foundations/how-to/services/how-to.service.d.ts +4 -0
  205. package/dist/foundations/how-to/services/how-to.service.d.ts.map +1 -1
  206. package/dist/foundations/how-to/services/how-to.service.js +47 -24
  207. package/dist/foundations/how-to/services/how-to.service.js.map +1 -1
  208. package/dist/foundations/index.d.ts +1 -0
  209. package/dist/foundations/index.d.ts.map +1 -1
  210. package/dist/foundations/index.js +1 -0
  211. package/dist/foundations/index.js.map +1 -1
  212. package/dist/foundations/two-factor/services/totp.service.d.ts.map +1 -1
  213. package/dist/foundations/two-factor/services/totp.service.js +2 -1
  214. package/dist/foundations/two-factor/services/totp.service.js.map +1 -1
  215. package/package.json +1 -1
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HandbookThreadPostDTO = exports.HandbookThreadPostDataDTO = exports.HandbookThreadPostAttributesDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const handbook_thread_meta_1 = require("../entities/handbook-thread.meta");
16
+ /**
17
+ * Body of `POST /handbookthreads`.
18
+ *
19
+ * The thread is created FROM the first question, so the payload carries
20
+ * `question` and not `title`: the title is derived server-side from the
21
+ * answer the responder produces. No `id` — the server mints it.
22
+ */
23
+ class HandbookThreadPostAttributesDTO {
24
+ }
25
+ exports.HandbookThreadPostAttributesDTO = HandbookThreadPostAttributesDTO;
26
+ __decorate([
27
+ (0, class_validator_1.IsDefined)(),
28
+ (0, class_validator_1.IsNotEmpty)(),
29
+ (0, class_validator_1.IsString)(),
30
+ (0, class_validator_1.MaxLength)(10_000),
31
+ __metadata("design:type", String)
32
+ ], HandbookThreadPostAttributesDTO.prototype, "question", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsUUID)(),
36
+ __metadata("design:type", String)
37
+ ], HandbookThreadPostAttributesDTO.prototype, "handbookPageId", void 0);
38
+ class HandbookThreadPostDataDTO {
39
+ }
40
+ exports.HandbookThreadPostDataDTO = HandbookThreadPostDataDTO;
41
+ __decorate([
42
+ (0, class_validator_1.Equals)(handbook_thread_meta_1.handbookThreadMeta.endpoint),
43
+ __metadata("design:type", String)
44
+ ], HandbookThreadPostDataDTO.prototype, "type", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.ValidateNested)(),
47
+ (0, class_validator_1.IsNotEmpty)(),
48
+ (0, class_transformer_1.Type)(() => HandbookThreadPostAttributesDTO),
49
+ __metadata("design:type", HandbookThreadPostAttributesDTO)
50
+ ], HandbookThreadPostDataDTO.prototype, "attributes", void 0);
51
+ class HandbookThreadPostDTO {
52
+ }
53
+ exports.HandbookThreadPostDTO = HandbookThreadPostDTO;
54
+ __decorate([
55
+ (0, class_validator_1.ValidateNested)(),
56
+ (0, class_validator_1.IsNotEmpty)(),
57
+ (0, class_transformer_1.Type)(() => HandbookThreadPostDataDTO),
58
+ __metadata("design:type", HandbookThreadPostDataDTO)
59
+ ], HandbookThreadPostDTO.prototype, "data", void 0);
60
+ //# sourceMappingURL=handbook-thread-post.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread-post.dto.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/dtos/handbook-thread-post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDASyB;AACzB,2EAAsE;AAEtE;;;;;;GAMG;AACH,MAAa,+BAA+B;CAe3C;AAfD,0EAeC;AAVC;IAJC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,MAAM,CAAC;;iEACD;AASjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uEACe;AAG1B,MAAa,yBAAyB;CAQrC;AARD,8DAQC;AANC;IADC,IAAA,wBAAM,EAAC,yCAAkB,CAAC,QAAQ,CAAC;;uDACvB;AAKb;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BAChC,+BAA+B;6DAAC;AAG9C,MAAa,qBAAqB;CAKjC;AALD,sDAKC;AADC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;8BAChC,yBAAyB;mDAAC"}
@@ -0,0 +1,25 @@
1
+ import { Entity } from "../../../common";
2
+ /**
3
+ * One markdown file of an application's own developer documentation.
4
+ *
5
+ * Global content: like HowTo, a HandbookPage has NO `BELONGS_TO Company` edge.
6
+ * Unlike HowTo it is developer-facing — every route is administrator-only and
7
+ * retrieval reaches it only in handbook mode.
8
+ */
9
+ export type HandbookPage = Entity & {
10
+ path: string;
11
+ title: string;
12
+ content: string;
13
+ contentHash: string;
14
+ wordCount?: number;
15
+ aiStatus?: string;
16
+ section?: string;
17
+ order?: string;
18
+ summary?: string;
19
+ displayTitle?: string;
20
+ displaySummary?: string;
21
+ displayContent?: string;
22
+ };
23
+ export declare const HandbookPageDescriptor: import("../../../common").EntityDescriptor<HandbookPage, {}>;
24
+ export type HandbookPageDescriptorType = typeof HandbookPageDescriptor;
25
+ //# sourceMappingURL=handbook-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-page.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGvD;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,sBAAsB,8DA6CjC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HandbookPageDescriptor = void 0;
4
+ const common_1 = require("../../../common");
5
+ const handbook_page_meta_1 = require("./handbook-page.meta");
6
+ exports.HandbookPageDescriptor = (0, common_1.defineEntity)()({
7
+ ...handbook_page_meta_1.handbookPageMeta,
8
+ isCompanyScoped: false,
9
+ fields: {
10
+ path: { type: "string", required: true },
11
+ title: { type: "string", required: true },
12
+ content: { type: "string", required: true },
13
+ contentHash: { type: "string", required: true },
14
+ wordCount: { type: "number" },
15
+ aiStatus: { type: "string" },
16
+ /** The front matter `section`, falling back to the file's first path segment. */
17
+ section: { type: "string" },
18
+ /**
19
+ * The repo-relative path of the file, lowercased.
20
+ *
21
+ * Sorting on it inside a section reproduces the order of the tree on disk,
22
+ * because the directories — and the rulebook files inside them — carry
23
+ * numeric prefixes (`00-start-here`, `03-backend`, …). A string, not a
24
+ * number: nothing here does arithmetic, and a renamed file needs no
25
+ * renumbering of its neighbours.
26
+ */
27
+ order: { type: "string" },
28
+ /** The one-line description the tree's README index gives this path, when it has one. */
29
+ summary: { type: "string" },
30
+ /**
31
+ * The display translation of this page, when the tree ships one.
32
+ *
33
+ * Written by the ingest's display pass from `<path>/<displayPath>/<same
34
+ * relative path>`, and READ ONLY by the reading surface. Nothing here is
35
+ * chunked, embedded or retrievable: `content` stays the indexed English
36
+ * body, and `contentHash` is computed over the English file alone, so a
37
+ * translation that changes re-embeds nothing.
38
+ */
39
+ displayTitle: { type: "string" },
40
+ displaySummary: { type: "string" },
41
+ displayContent: { type: "string" },
42
+ },
43
+ relationships: {},
44
+ });
45
+ //# sourceMappingURL=handbook-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-page.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-page.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AACvD,6DAAwD;AAwB3C,QAAA,sBAAsB,GAAG,IAAA,qBAAY,GAAgB,CAAC;IACjE,GAAG,qCAAgB;IAEnB,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAE5B,iFAAiF;QACjF,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAE3B;;;;;;;;WAQG;QACH,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAEzB,yFAAyF;QACzF,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAE3B;;;;;;;;WAQG;QACH,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAChC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACnC;IAED,aAAa,EAAE,EAAE;CAClB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DataMeta } from "../../../common/interfaces/datamodel.interface";
2
+ export declare const handbookPageMeta: DataMeta;
3
+ //# sourceMappingURL=handbook-page.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-page.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-page.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,gBAAgB,EAAE,QAK9B,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handbookPageMeta = void 0;
4
+ exports.handbookPageMeta = {
5
+ type: "handbookpages",
6
+ endpoint: "handbookpages",
7
+ nodeName: "handbookPage",
8
+ labelName: "HandbookPage",
9
+ };
10
+ //# sourceMappingURL=handbook-page.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-page.meta.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-page.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAa;IACxC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,cAAc;CAC1B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { Entity } from "../../../common";
2
+ /**
3
+ * One top-level directory of the configured documentation tree.
4
+ *
5
+ * Global content: like HandbookPage, a HandbookSection has NO `BELONGS_TO
6
+ * Company` edge — the tree belongs to the application, not to a tenant.
7
+ *
8
+ * A page names its section by the `section` key, not by an edge, so there is
9
+ * nothing to join and nothing to write per page. The ingest replaces EVERY
10
+ * section on each sync: there are ten of them and diffing buys nothing.
11
+ */
12
+ export type HandbookSection = Entity & {
13
+ key: string;
14
+ title: string;
15
+ summary?: string;
16
+ order: string;
17
+ displayTitle?: string;
18
+ displaySummary?: string;
19
+ };
20
+ export declare const HandbookSectionDescriptor: import("../../../common").EntityDescriptor<HandbookSection, {}>;
21
+ export type HandbookSectionDescriptorType = typeof HandbookSectionDescriptor;
22
+ //# sourceMappingURL=handbook-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-section.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGvD;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,iEAqBpC,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,OAAO,yBAAyB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HandbookSectionDescriptor = void 0;
4
+ const common_1 = require("../../../common");
5
+ const handbook_section_meta_1 = require("./handbook-section.meta");
6
+ exports.HandbookSectionDescriptor = (0, common_1.defineEntity)()({
7
+ ...handbook_section_meta_1.handbookSectionMeta,
8
+ isCompanyScoped: false,
9
+ fields: {
10
+ key: { type: "string", required: true },
11
+ title: { type: "string", required: true },
12
+ summary: { type: "string" },
13
+ order: { type: "string", required: true },
14
+ /**
15
+ * The display translation of the heading and its blurb, taken from the
16
+ * display tree's own README. Absent when no `displayPath` is configured,
17
+ * or when that README describes no such section.
18
+ */
19
+ displayTitle: { type: "string" },
20
+ displaySummary: { type: "string" },
21
+ },
22
+ relationships: {},
23
+ });
24
+ //# sourceMappingURL=handbook-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-section.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-section.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AACvD,mEAA8D;AAqBjD,QAAA,yBAAyB,GAAG,IAAA,qBAAY,GAAmB,CAAC;IACvE,GAAG,2CAAmB;IAEtB,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE;QACN,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACvC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAEzC;;;;WAIG;QACH,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAChC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACnC;IAED,aAAa,EAAE,EAAE;CAClB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DataMeta } from "../../../common/interfaces/datamodel.interface";
2
+ export declare const handbookSectionMeta: DataMeta;
3
+ //# sourceMappingURL=handbook-section.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-section.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-section.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,mBAAmB,EAAE,QAKjC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handbookSectionMeta = void 0;
4
+ exports.handbookSectionMeta = {
5
+ type: "handbooksections",
6
+ endpoint: "handbooksections",
7
+ nodeName: "handbookSection",
8
+ labelName: "HandbookSection",
9
+ };
10
+ //# sourceMappingURL=handbook-section.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-section.meta.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-section.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAa;IAC3C,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,iBAAiB;CAC7B,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { Entity } from "../../../common";
2
+ import type { HandbookThread } from "./handbook-thread";
3
+ export type HandbookThreadMessageRole = "user" | "assistant";
4
+ /**
5
+ * One turn of a handbook conversation.
6
+ *
7
+ * `sources` holds repo-relative HandbookPage paths rather than `CITES` edges to
8
+ * `Chunk` nodes (the shape `AssistantMessage` uses). The handbook answer is
9
+ * attributed to the PAGE a reader can open, chunk boundaries are an ingest
10
+ * detail, and the paths are resolved once at write time — so a re-ingest that
11
+ * replaces the chunks leaves the rendered provenance intact.
12
+ *
13
+ * `isCompanyScoped: false` for the same reason as the thread; access is
14
+ * inherited from the parent thread's owner edge, enforced in
15
+ * `HandbookThreadMessageRepository.buildUserHasAccess()`.
16
+ */
17
+ export type HandbookThreadMessage = Entity & {
18
+ role: HandbookThreadMessageRole;
19
+ content: string;
20
+ position: number;
21
+ sources?: string[];
22
+ thread?: HandbookThread;
23
+ };
24
+ export declare const HandbookThreadMessageDescriptor: import("../../../common").EntityDescriptor<HandbookThreadMessage, {
25
+ thread: {
26
+ model: import("../../../common").DataMeta;
27
+ direction: "in";
28
+ relationship: string;
29
+ cardinality: "one";
30
+ required: true;
31
+ dtoKey: string;
32
+ immutable: true;
33
+ };
34
+ }>;
35
+ export type HandbookThreadMessageDescriptorType = typeof HandbookThreadMessageDescriptor;
36
+ //# sourceMappingURL=handbook-thread-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread-message.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,WAAW,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAC3C,IAAI,EAAE,yBAAyB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;EAuB1C,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAAG,OAAO,+BAA+B,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HandbookThreadMessageDescriptor = void 0;
4
+ const common_1 = require("../../../common");
5
+ const handbook_thread_meta_1 = require("./handbook-thread.meta");
6
+ const handbook_thread_message_meta_1 = require("./handbook-thread-message.meta");
7
+ exports.HandbookThreadMessageDescriptor = (0, common_1.defineEntity)()({
8
+ ...handbook_thread_message_meta_1.handbookThreadMessageMeta,
9
+ isCompanyScoped: false,
10
+ fields: {
11
+ role: { type: "string", required: true },
12
+ content: { type: "string", required: true },
13
+ position: { type: "number", required: true },
14
+ sources: { type: "string[]" },
15
+ },
16
+ relationships: {
17
+ thread: {
18
+ model: handbook_thread_meta_1.handbookThreadMeta,
19
+ direction: "in",
20
+ relationship: "HAS_MESSAGE",
21
+ cardinality: "one",
22
+ required: true,
23
+ dtoKey: "thread",
24
+ immutable: true,
25
+ },
26
+ },
27
+ });
28
+ //# sourceMappingURL=handbook-thread-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread-message.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread-message.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AAEvD,iEAA4D;AAC5D,iFAA2E;AAyB9D,QAAA,+BAA+B,GAAG,IAAA,qBAAY,GAAyB,CAAC;IACnF,GAAG,wDAAyB;IAE5B,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;KAC9B;IAED,aAAa,EAAE;QACb,MAAM,EAAE;YACN,KAAK,EAAE,yCAAkB;YACzB,SAAS,EAAE,IAAI;YACf,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,IAAI;SAChB;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DataMeta } from "../../../common/interfaces/datamodel.interface";
2
+ export declare const handbookThreadMessageMeta: DataMeta;
3
+ //# sourceMappingURL=handbook-thread-message.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread-message.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread-message.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,yBAAyB,EAAE,QAKvC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handbookThreadMessageMeta = void 0;
4
+ exports.handbookThreadMessageMeta = {
5
+ type: "handbookthreadmessages",
6
+ endpoint: "handbookthreadmessages",
7
+ nodeName: "handbookThreadMessage",
8
+ labelName: "HandbookThreadMessage",
9
+ };
10
+ //# sourceMappingURL=handbook-thread-message.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread-message.meta.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread-message.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAa;IACjD,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,wBAAwB;IAClC,QAAQ,EAAE,uBAAuB;IACjC,SAAS,EAAE,uBAAuB;CACnC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { Entity } from "../../../common";
2
+ import type { User } from "../../user/entities/user";
3
+ import type { HandbookThreadMessage } from "./handbook-thread-message";
4
+ /**
5
+ * One persisted handbook conversation: a title and an ordered list of messages.
6
+ *
7
+ * This is deliberately NOT the package `Assistant`. `Assistant` is
8
+ * `isCompanyScoped: true`, and the handbook chat exists for platform
9
+ * administrators — who have a Membership with `HAS_ROLE` and no `IN_COMPANY`,
10
+ * i.e. no Company at all. A company-scoped thread would 404 for exactly the
11
+ * user the feature is for, and relaxing `Assistant`'s scoping to accommodate
12
+ * that would weaken tenancy for every application built on the package.
13
+ *
14
+ * `isCompanyScoped: false` therefore removes the company filter, and the
15
+ * `CREATED_BY` owner edge becomes the WHOLE security boundary:
16
+ * `HandbookThreadRepository.buildUserHasAccess()` requires it on every read and
17
+ * every write. `contextKey: "userId"` attaches that edge from CLS on create, so
18
+ * a client can never nominate a different owner, and `immutable: true` keeps a
19
+ * later PUT from re-pointing it.
20
+ */
21
+ export type HandbookThread = Entity & {
22
+ title: string;
23
+ owner?: User;
24
+ messages?: HandbookThreadMessage[];
25
+ };
26
+ export declare const HandbookThreadDescriptor: import("../../../common").EntityDescriptor<HandbookThread, {
27
+ owner: {
28
+ model: import("../../../common").DataMeta;
29
+ direction: "out";
30
+ relationship: string;
31
+ cardinality: "one";
32
+ required: false;
33
+ dtoKey: string;
34
+ contextKey: string;
35
+ immutable: true;
36
+ };
37
+ messages: {
38
+ model: import("../../../common").DataMeta;
39
+ direction: "out";
40
+ relationship: string;
41
+ cardinality: "many";
42
+ required: false;
43
+ dtoKey: string;
44
+ };
45
+ }>;
46
+ export type HandbookThreadDescriptorType = typeof HandbookThreadDescriptor;
47
+ //# sourceMappingURL=handbook-thread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIvE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;EA6BnC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,OAAO,wBAAwB,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HandbookThreadDescriptor = void 0;
4
+ const common_1 = require("../../../common");
5
+ const user_meta_1 = require("../../user/entities/user.meta");
6
+ const handbook_thread_message_meta_1 = require("./handbook-thread-message.meta");
7
+ const handbook_thread_meta_1 = require("./handbook-thread.meta");
8
+ exports.HandbookThreadDescriptor = (0, common_1.defineEntity)()({
9
+ ...handbook_thread_meta_1.handbookThreadMeta,
10
+ isCompanyScoped: false,
11
+ fields: {
12
+ title: { type: "string", required: true },
13
+ },
14
+ relationships: {
15
+ owner: {
16
+ model: user_meta_1.ownerMeta,
17
+ direction: "out",
18
+ relationship: "CREATED_BY",
19
+ cardinality: "one",
20
+ required: false,
21
+ dtoKey: "created-by",
22
+ contextKey: "userId",
23
+ immutable: true,
24
+ },
25
+ messages: {
26
+ model: handbook_thread_message_meta_1.handbookThreadMessageMeta,
27
+ direction: "out",
28
+ relationship: "HAS_MESSAGE",
29
+ cardinality: "many",
30
+ required: false,
31
+ dtoKey: "messages",
32
+ },
33
+ },
34
+ });
35
+ //# sourceMappingURL=handbook-thread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AAEvD,6DAA0D;AAE1D,iFAA2E;AAC3E,iEAA4D;AAyB/C,QAAA,wBAAwB,GAAG,IAAA,qBAAY,GAAkB,CAAC;IACrE,GAAG,yCAAkB;IAErB,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC1C;IAED,aAAa,EAAE;QACb,KAAK,EAAE;YACL,KAAK,EAAE,qBAAS;YAChB,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,IAAI;SAChB;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,wDAAyB;YAChC,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,UAAU;SACnB;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DataMeta } from "../../../common/interfaces/datamodel.interface";
2
+ export declare const handbookThreadMeta: DataMeta;
3
+ //# sourceMappingURL=handbook-thread.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,kBAAkB,EAAE,QAKhC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handbookThreadMeta = void 0;
4
+ exports.handbookThreadMeta = {
5
+ type: "handbookthreads",
6
+ endpoint: "handbookthreads",
7
+ nodeName: "handbookThread",
8
+ labelName: "HandbookThread",
9
+ };
10
+ //# sourceMappingURL=handbook-thread.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook-thread.meta.js","sourceRoot":"","sources":["../../../../src/foundations/handbook/entities/handbook-thread.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAa;IAC1C,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,gBAAgB;CAC5B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { DynamicModule, OnModuleInit } from "@nestjs/common";
2
+ import { ModelService } from "../../core/llm/services/model.service";
3
+ import { AppLoggingService } from "../../core/logging/services/logging.service";
4
+ import { HandbookModuleConfig } from "./interfaces/handbook.config.interface";
5
+ /**
6
+ * HandbookModule — administrator-only RAG over an application's own markdown
7
+ * documentation, with persisted conversations.
8
+ *
9
+ * The queue is registered HERE rather than left to the consumer: the finalise
10
+ * job ChunkService enqueues per chunk is routed by label, so a foundation that
11
+ * does not register its own queue only works in applications that happen to
12
+ * register it for us.
13
+ */
14
+ export declare class HandbookModule implements OnModuleInit {
15
+ private readonly modelService;
16
+ private readonly logger;
17
+ static forRoot(config?: HandbookModuleConfig): DynamicModule;
18
+ constructor(modelService: ModelService, logger: AppLoggingService);
19
+ onModuleInit(): void;
20
+ }
21
+ //# sourceMappingURL=handbook.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handbook.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/handbook/handbook.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAU,YAAY,EAAY,MAAM,gBAAgB,CAAC;AAK/E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAUhF,OAAO,EAA4C,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAYxH;;;;;;;;GAQG;AACH,qBACa,cAAe,YAAW,YAAY;IAiE/C,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAjEzB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,aAAa;gBAgEzC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,iBAAiB;IAG5C,YAAY;CAab"}
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var HandbookModule_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.HandbookModule = void 0;
14
+ const bullmq_1 = require("@nestjs/bullmq");
15
+ const common_1 = require("@nestjs/common");
16
+ const responder_module_1 = require("../../agents/responder/responder.module");
17
+ const conditional_service_decorator_1 = require("../../common/decorators/conditional-service.decorator");
18
+ const registry_1 = require("../../common/registries/registry");
19
+ const queue_id_1 = require("../../config/enums/queue.id");
20
+ const model_service_1 = require("../../core/llm/services/model.service");
21
+ const logging_service_1 = require("../../core/logging/services/logging.service");
22
+ const audit_module_1 = require("../audit/audit.module");
23
+ const chunk_module_1 = require("../chunk/chunk.module");
24
+ const chunker_module_1 = require("../chunker/chunker.module");
25
+ const handbook_controller_1 = require("./controllers/handbook.controller");
26
+ const handbook_thread_controller_1 = require("./controllers/handbook-thread.controller");
27
+ const handbook_page_1 = require("./entities/handbook-page");
28
+ const handbook_section_1 = require("./entities/handbook-section");
29
+ const handbook_thread_1 = require("./entities/handbook-thread");
30
+ const handbook_thread_message_1 = require("./entities/handbook-thread-message");
31
+ const handbook_config_interface_1 = require("./interfaces/handbook.config.interface");
32
+ const handbook_processor_1 = require("./processors/handbook.processor");
33
+ const handbook_page_repository_1 = require("./repositories/handbook-page.repository");
34
+ const handbook_section_repository_1 = require("./repositories/handbook-section.repository");
35
+ const handbook_thread_repository_1 = require("./repositories/handbook-thread.repository");
36
+ const handbook_thread_message_repository_1 = require("./repositories/handbook-thread-message.repository");
37
+ const handbook_ingest_service_1 = require("./services/handbook-ingest.service");
38
+ const handbook_page_service_1 = require("./services/handbook-page.service");
39
+ const handbook_section_service_1 = require("./services/handbook-section.service");
40
+ const handbook_thread_service_1 = require("./services/handbook-thread.service");
41
+ const handbook_thread_message_service_1 = require("./services/handbook-thread-message.service");
42
+ /**
43
+ * HandbookModule — administrator-only RAG over an application's own markdown
44
+ * documentation, with persisted conversations.
45
+ *
46
+ * The queue is registered HERE rather than left to the consumer: the finalise
47
+ * job ChunkService enqueues per chunk is routed by label, so a foundation that
48
+ * does not register its own queue only works in applications that happen to
49
+ * register it for us.
50
+ */
51
+ let HandbookModule = HandbookModule_1 = class HandbookModule {
52
+ static forRoot(config) {
53
+ const mergedConfig = { ...handbook_config_interface_1.DEFAULT_HANDBOOK_CONFIG, ...config };
54
+ const providers = [
55
+ { provide: handbook_config_interface_1.HANDBOOK_CONFIG, useValue: mergedConfig },
56
+ handbook_page_1.HandbookPageDescriptor.model.serialiser,
57
+ handbook_section_1.HandbookSectionDescriptor.model.serialiser,
58
+ handbook_thread_1.HandbookThreadDescriptor.model.serialiser,
59
+ handbook_thread_message_1.HandbookThreadMessageDescriptor.model.serialiser,
60
+ handbook_page_repository_1.HandbookPageRepository,
61
+ handbook_section_repository_1.HandbookSectionRepository,
62
+ handbook_thread_repository_1.HandbookThreadRepository,
63
+ handbook_thread_message_repository_1.HandbookThreadMessageRepository,
64
+ handbook_page_service_1.HandbookPageService,
65
+ handbook_section_service_1.HandbookSectionService,
66
+ handbook_ingest_service_1.HandbookIngestService,
67
+ handbook_thread_message_service_1.HandbookThreadMessageService,
68
+ handbook_thread_service_1.HandbookThreadService,
69
+ (0, conditional_service_decorator_1.createWorkerProvider)(handbook_processor_1.HandbookProcessor),
70
+ ];
71
+ return {
72
+ module: HandbookModule_1,
73
+ controllers: [handbook_controller_1.HandbookController, handbook_thread_controller_1.HandbookThreadController],
74
+ providers,
75
+ exports: [
76
+ handbook_page_repository_1.HandbookPageRepository,
77
+ handbook_section_repository_1.HandbookSectionRepository,
78
+ handbook_page_service_1.HandbookPageService,
79
+ handbook_section_service_1.HandbookSectionService,
80
+ handbook_ingest_service_1.HandbookIngestService,
81
+ handbook_thread_service_1.HandbookThreadService,
82
+ handbook_thread_message_service_1.HandbookThreadMessageService,
83
+ ],
84
+ imports: [
85
+ bullmq_1.BullModule.registerQueue({
86
+ name: queue_id_1.QueueId.HANDBOOK_PAGE,
87
+ defaultJobOptions: {
88
+ attempts: 3,
89
+ backoff: { type: "exponential", delay: 10_000 },
90
+ removeOnComplete: true,
91
+ removeOnFail: { age: 3600, count: 1000 },
92
+ },
93
+ }),
94
+ bullmq_1.BullModule.registerQueue({
95
+ name: queue_id_1.QueueId.CHUNK,
96
+ defaultJobOptions: {
97
+ attempts: 3,
98
+ backoff: { type: "exponential", delay: 10_000 },
99
+ },
100
+ }),
101
+ audit_module_1.AuditModule,
102
+ chunk_module_1.ChunkModule,
103
+ chunker_module_1.ChunkerModule,
104
+ // The handbook thread drives ResponderService directly rather than
105
+ // going through the package Assistant: Assistant is company-scoped and
106
+ // a platform administrator has no Company. ResponderModule declares no
107
+ // controllers of its own, so importing it mounts no routes.
108
+ responder_module_1.ResponderModule,
109
+ ],
110
+ };
111
+ }
112
+ constructor(modelService, logger) {
113
+ this.modelService = modelService;
114
+ this.logger = logger;
115
+ }
116
+ onModuleInit() {
117
+ registry_1.modelRegistry.register(handbook_page_1.HandbookPageDescriptor.model);
118
+ registry_1.modelRegistry.register(handbook_section_1.HandbookSectionDescriptor.model);
119
+ registry_1.modelRegistry.register(handbook_thread_1.HandbookThreadDescriptor.model);
120
+ registry_1.modelRegistry.register(handbook_thread_message_1.HandbookThreadMessageDescriptor.model);
121
+ // Say it once at boot rather than only when someone presses Sync: an
122
+ // installation with no AI configuration can browse pages it ingested
123
+ // earlier, but can never ingest again, and that is worth knowing before
124
+ // the button is pressed.
125
+ if (!this.modelService.isAiConfigured())
126
+ this.logger.warn("Handbook ingest is unavailable: no usable AI configuration.");
127
+ }
128
+ };
129
+ exports.HandbookModule = HandbookModule;
130
+ exports.HandbookModule = HandbookModule = HandbookModule_1 = __decorate([
131
+ (0, common_1.Module)({}),
132
+ __metadata("design:paramtypes", [model_service_1.ModelService,
133
+ logging_service_1.AppLoggingService])
134
+ ], HandbookModule);
135
+ //# sourceMappingURL=handbook.module.js.map