@wildo-ai/saas-technical-doc 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/build/csp-emit.d.ts +9 -0
  4. package/dist/esm/build/csp-emit.d.ts.map +1 -0
  5. package/dist/esm/build/csp-emit.js +8 -0
  6. package/dist/esm/build/csp-emit.js.map +1 -0
  7. package/dist/esm/build/load-materialized-frontend-providers.d.ts +9 -0
  8. package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -0
  9. package/dist/esm/build/load-materialized-frontend-providers.js +9 -0
  10. package/dist/esm/build/load-materialized-frontend-providers.js.map +1 -0
  11. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts +66 -0
  12. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -0
  13. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js +195 -0
  14. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js.map +1 -0
  15. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts +36 -0
  16. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -0
  17. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js +71 -0
  18. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js.map +1 -0
  19. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +37 -0
  20. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -0
  21. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +1865 -0
  22. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -0
  23. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts +22 -0
  24. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -0
  25. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.js +31 -0
  26. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.js.map +1 -0
  27. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +31 -0
  28. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -0
  29. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +33 -0
  30. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -0
  31. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts +13 -0
  32. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -0
  33. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +93 -0
  34. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -0
  35. package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts +52 -0
  36. package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -0
  37. package/dist/esm/companion/content/application-consumer-documentation-content-loader.js +191 -0
  38. package/dist/esm/companion/content/application-consumer-documentation-content-loader.js.map +1 -0
  39. package/dist/esm/companion/index.d.ts +39 -0
  40. package/dist/esm/companion/index.d.ts.map +1 -0
  41. package/dist/esm/companion/index.js +39 -0
  42. package/dist/esm/companion/index.js.map +1 -0
  43. package/dist/esm/companion/openapi-generator.d.ts +94 -0
  44. package/dist/esm/companion/openapi-generator.d.ts.map +1 -0
  45. package/dist/esm/companion/openapi-generator.js +1562 -0
  46. package/dist/esm/companion/openapi-generator.js.map +1 -0
  47. package/dist/esm/companion/operation-projection.schemas.d.ts +797 -0
  48. package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -0
  49. package/dist/esm/companion/operation-projection.schemas.js +610 -0
  50. package/dist/esm/companion/operation-projection.schemas.js.map +1 -0
  51. package/dist/esm/companion/publish-result.types.d.ts +124 -0
  52. package/dist/esm/companion/publish-result.types.d.ts.map +1 -0
  53. package/dist/esm/companion/publish-result.types.js +28 -0
  54. package/dist/esm/companion/publish-result.types.js.map +1 -0
  55. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts +26 -0
  56. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -0
  57. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.js +63 -0
  58. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.js.map +1 -0
  59. package/dist/esm/companion/rendering/technical-documentation-build-measurement.d.ts +23 -0
  60. package/dist/esm/companion/rendering/technical-documentation-build-measurement.d.ts.map +1 -0
  61. package/dist/esm/companion/rendering/technical-documentation-build-measurement.js +104 -0
  62. package/dist/esm/companion/rendering/technical-documentation-build-measurement.js.map +1 -0
  63. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts +9 -0
  64. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -0
  65. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +421 -0
  66. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -0
  67. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts +72 -0
  68. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -0
  69. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js +204 -0
  70. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -0
  71. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts +9 -0
  72. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts.map +1 -0
  73. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js +106 -0
  74. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js.map +1 -0
  75. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.d.ts +43 -0
  76. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.d.ts.map +1 -0
  77. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.js +88 -0
  78. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.js.map +1 -0
  79. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts +7 -0
  80. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -0
  81. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js +51 -0
  82. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js.map +1 -0
  83. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts +45 -0
  84. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -0
  85. package/dist/esm/companion/rendering/technical-documentation-render-model.js +178 -0
  86. package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -0
  87. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts +3 -0
  88. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -0
  89. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js +49 -0
  90. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.map +1 -0
  91. package/dist/esm/companion/spec-to-operation-doc.d.ts +176 -0
  92. package/dist/esm/companion/spec-to-operation-doc.d.ts.map +1 -0
  93. package/dist/esm/companion/spec-to-operation-doc.js +326 -0
  94. package/dist/esm/companion/spec-to-operation-doc.js.map +1 -0
  95. package/dist/esm/companion/technical-documentation-asset-path.d.ts +16 -0
  96. package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -0
  97. package/dist/esm/companion/technical-documentation-asset-path.js +19 -0
  98. package/dist/esm/companion/technical-documentation-asset-path.js.map +1 -0
  99. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts +14 -0
  100. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -0
  101. package/dist/esm/companion/technical-documentation-capture-execution-port.js +1 -0
  102. package/dist/esm/companion/technical-documentation-capture-execution-port.js.map +1 -0
  103. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts +25 -0
  104. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -0
  105. package/dist/esm/companion/technical-documentation-diagram-materializer.js +86 -0
  106. package/dist/esm/companion/technical-documentation-diagram-materializer.js.map +1 -0
  107. package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts +17 -0
  108. package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -0
  109. package/dist/esm/companion/technical-documentation-placeholder-materializer.js +63 -0
  110. package/dist/esm/companion/technical-documentation-placeholder-materializer.js.map +1 -0
  111. package/dist/esm/companion/zod-to-openapi.d.ts +67 -0
  112. package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -0
  113. package/dist/esm/companion/zod-to-openapi.js +211 -0
  114. package/dist/esm/companion/zod-to-openapi.js.map +1 -0
  115. package/dist/esm/companion-exports.d.ts +32 -0
  116. package/dist/esm/companion-exports.d.ts.map +1 -0
  117. package/dist/esm/companion-exports.js +32 -0
  118. package/dist/esm/companion-exports.js.map +1 -0
  119. package/dist/esm/config/define-tech-doc-config.d.ts +38 -0
  120. package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -0
  121. package/dist/esm/config/define-tech-doc-config.js +40 -0
  122. package/dist/esm/config/define-tech-doc-config.js.map +1 -0
  123. package/dist/esm/config/index.d.ts +22 -0
  124. package/dist/esm/config/index.d.ts.map +1 -0
  125. package/dist/esm/config/index.js +22 -0
  126. package/dist/esm/config/index.js.map +1 -0
  127. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts +204 -0
  128. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -0
  129. package/dist/esm/config/wildo-tech-doc-config.schemas.js +192 -0
  130. package/dist/esm/config/wildo-tech-doc-config.schemas.js.map +1 -0
  131. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts +82 -0
  132. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -0
  133. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.js +114 -0
  134. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.js.map +1 -0
  135. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +420 -0
  136. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -0
  137. package/dist/esm/content/application-consumer-documentation-content.techdoc.js +9619 -0
  138. package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -0
  139. package/dist/esm/content.exports.d.ts +9 -0
  140. package/dist/esm/content.exports.d.ts.map +1 -0
  141. package/dist/esm/content.exports.js +9 -0
  142. package/dist/esm/content.exports.js.map +1 -0
  143. package/dist/esm/index.d.ts +26 -0
  144. package/dist/esm/index.d.ts.map +1 -0
  145. package/dist/esm/index.js +26 -0
  146. package/dist/esm/index.js.map +1 -0
  147. package/dist/esm/openapi/api-reference-link-index.d.ts +98 -0
  148. package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -0
  149. package/dist/esm/openapi/api-reference-link-index.js +301 -0
  150. package/dist/esm/openapi/api-reference-link-index.js.map +1 -0
  151. package/dist/esm/openapi/api-reference-targets.d.ts +71 -0
  152. package/dist/esm/openapi/api-reference-targets.d.ts.map +1 -0
  153. package/dist/esm/openapi/api-reference-targets.js +114 -0
  154. package/dist/esm/openapi/api-reference-targets.js.map +1 -0
  155. package/dist/esm/openapi/index.d.ts +20 -0
  156. package/dist/esm/openapi/index.d.ts.map +1 -0
  157. package/dist/esm/openapi/index.js +20 -0
  158. package/dist/esm/openapi/index.js.map +1 -0
  159. package/dist/esm/openapi/openapi-generation-output.schemas.d.ts +80 -0
  160. package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -0
  161. package/dist/esm/openapi/openapi-generation-output.schemas.js +76 -0
  162. package/dist/esm/openapi/openapi-generation-output.schemas.js.map +1 -0
  163. package/dist/esm/openapi-reference-model.exports.d.ts +10 -0
  164. package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -0
  165. package/dist/esm/openapi-reference-model.exports.js +10 -0
  166. package/dist/esm/openapi-reference-model.exports.js.map +1 -0
  167. package/dist/esm/runtime/AuthExchangePage.d.ts +84 -0
  168. package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -0
  169. package/dist/esm/runtime/AuthExchangePage.js +188 -0
  170. package/dist/esm/runtime/AuthExchangePage.js.map +1 -0
  171. package/dist/esm/runtime/DocsAuthContext.d.ts +119 -0
  172. package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -0
  173. package/dist/esm/runtime/DocsAuthContext.js +171 -0
  174. package/dist/esm/runtime/DocsAuthContext.js.map +1 -0
  175. package/dist/esm/runtime/decode-jwt-claims.d.ts +39 -0
  176. package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -0
  177. package/dist/esm/runtime/decode-jwt-claims.js +86 -0
  178. package/dist/esm/runtime/decode-jwt-claims.js.map +1 -0
  179. package/dist/esm/runtime/docs-auth-client.d.ts +193 -0
  180. package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -0
  181. package/dist/esm/runtime/docs-auth-client.js +211 -0
  182. package/dist/esm/runtime/docs-auth-client.js.map +1 -0
  183. package/dist/esm/runtime/docs-auth-session.schemas.d.ts +77 -0
  184. package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -0
  185. package/dist/esm/runtime/docs-auth-session.schemas.js +50 -0
  186. package/dist/esm/runtime/docs-auth-session.schemas.js.map +1 -0
  187. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +17 -0
  188. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -0
  189. package/dist/esm/runtime/frontend-provider-registry.techdoc.js +23 -0
  190. package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -0
  191. package/dist/esm/runtime/index.d.ts +57 -0
  192. package/dist/esm/runtime/index.d.ts.map +1 -0
  193. package/dist/esm/runtime/index.js +76 -0
  194. package/dist/esm/runtime/index.js.map +1 -0
  195. package/dist/esm/runtime/openapi-reference-conservation.d.ts +20 -0
  196. package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -0
  197. package/dist/esm/runtime/openapi-reference-conservation.js +102 -0
  198. package/dist/esm/runtime/openapi-reference-conservation.js.map +1 -0
  199. package/dist/esm/runtime/openapi-reference-model.d.ts +224 -0
  200. package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -0
  201. package/dist/esm/runtime/openapi-reference-model.js +579 -0
  202. package/dist/esm/runtime/openapi-reference-model.js.map +1 -0
  203. package/dist/esm/runtime/openapi-reference-view.d.ts +13 -0
  204. package/dist/esm/runtime/openapi-reference-view.d.ts.map +1 -0
  205. package/dist/esm/runtime/openapi-reference-view.js +284 -0
  206. package/dist/esm/runtime/openapi-reference-view.js.map +1 -0
  207. package/dist/esm/runtime/use-docs-auth-session.d.ts +26 -0
  208. package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -0
  209. package/dist/esm/runtime/use-docs-auth-session.js +34 -0
  210. package/dist/esm/runtime/use-docs-auth-session.js.map +1 -0
  211. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts +3 -0
  212. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -0
  213. package/dist/esm/runtime/use-docs-frontend-provider-registry.js +5 -0
  214. package/dist/esm/runtime/use-docs-frontend-provider-registry.js.map +1 -0
  215. package/dist/tsconfig.build.tsbuildinfo +1 -0
  216. package/package.json +117 -0
@@ -0,0 +1,204 @@
1
+ /**
2
+ * @wildo_source:part:start engine.saas-technical-doc.config facet:layer:engine facet:family:technical-doc
3
+ *
4
+ * Per-service technical-documentation configuration authored as
5
+ * `wildo.tech-doc.config.ts`. The strict schema owns only settings with live
6
+ * consumers: publication budgets and public sentinels, API-reference inputs,
7
+ * presentation metadata, and the docs service CSP. Framework narrative content
8
+ * comes from the engine topic catalogue, not from application-local recipes.
9
+ */
10
+ import { CoreResourceType } from '@wildo-ai/saas-models';
11
+ import { z } from 'zod';
12
+ /**
13
+ * Sentinel for `apiDocResources` meaning "document every core resource that has
14
+ * API-bearing operations" — the full framework resource catalog. Distinct from
15
+ * an explicit curated array so an app can opt into everything without listing
16
+ * (and re-listing, as the engine grows) every `CoreResourceType` by hand.
17
+ */
18
+ export declare const API_DOC_RESOURCES_ALL: "all";
19
+ /**
20
+ * One complete category declaration for the resources published by this API
21
+ * reference. `resourceNames` uses the generated OpenAPI tag name, which is
22
+ * the resolved resource identifier, rather than a display label or a
23
+ * filesystem location. The companion rejects a duplicate, stale or missing
24
+ * assignment whenever this feature is configured.
25
+ */
26
+ export declare const ApiReferenceResourceCategoryAssignmentSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ label: z.ZodString;
29
+ description: z.ZodOptional<z.ZodString>;
30
+ resourceNames: z.ZodArray<z.ZodString>;
31
+ }, z.core.$strict>;
32
+ export type ApiReferenceResourceCategoryAssignment = z.infer<typeof ApiReferenceResourceCategoryAssignmentSchema>;
33
+ /**
34
+ * Per-service technical-documentation configuration block.
35
+ *
36
+ * Authored as `export default defineTechnicalDocConfig({...})` in
37
+ * `<tech-doc-service-root>/wildo.tech-doc.config.ts`. The companion
38
+ * loads this file once at bootstrap via jiti and projects fields
39
+ * into the OpenAPI generator and Docusaurus/CSP build surfaces.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { defineTechnicalDocConfig } from '@wildo-ai/saas-technical-doc';
44
+ *
45
+ * export default defineTechnicalDocConfig({
46
+ * supportedApiVersion: '1.0.0',
47
+ * publicMarketingTitle: 'Northstar Tasks — Technical Documentation',
48
+ * apiDocResources: 'all', // also document every core engine resource
49
+ * });
50
+ * ```
51
+ */
52
+ export declare const WildoTechnicalDocConfigSchema: z.ZodObject<{
53
+ /**
54
+ * Exact public API contract release supported by this documentation
55
+ * publication. It is required because OpenAPI mandates a version and a
56
+ * placeholder would make the generated reference look authoritative while
57
+ * carrying no usable compatibility claim.
58
+ */
59
+ supportedApiVersion: z.ZodString;
60
+ /**
61
+ * Ceilings on the published documentation tree, applied per field over the engine
62
+ * defaults (`TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS`).
63
+ *
64
+ * Omitting this is the normal case and is SAFE: absence yields the engine ceilings, not
65
+ * an unbounded build. Declare only the field an application genuinely outgrows — a
66
+ * partial declaration keeps the others tracking the engine, so raising a page count does
67
+ * not silently freeze a copy of every other limit at today's value.
68
+ */
69
+ outputBudgets: z.ZodOptional<z.ZodObject<{
70
+ maximumPageCount: z.ZodOptional<z.ZodNumber>;
71
+ maximumTotalBytes: z.ZodOptional<z.ZodNumber>;
72
+ maximumSearchIndexBytes: z.ZodOptional<z.ZodNumber>;
73
+ }, z.core.$strict>>;
74
+ /**
75
+ * Additional byte sequences that must never appear in the PUBLIC documentation tree.
76
+ * Publication fails naming the offending file.
77
+ *
78
+ * **Unioned with the engine's mandatory sentinels, never replacing them** — an
79
+ * application can arm more canaries, and cannot disarm the engine's.
80
+ *
81
+ * Choose sequences that cannot legitimately appear in published prose. Generic markers
82
+ * (`secret`, `token`, `Bearer`) fire on the authentication and webhook guides
83
+ * themselves, and a canary that cries on correct content is one people learn to remove.
84
+ */
85
+ forbiddenPublicSentinels: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
+ /**
87
+ * Public-facing title for the docs site (browser tab title +
88
+ * landing page header). Optional — falls back to
89
+ * `WildoSaasConfig.displayName` when omitted.
90
+ */
91
+ publicMarketingTitle: z.ZodOptional<z.ZodString>;
92
+ /**
93
+ * Opt-in: include framework (engine) core resources in this app's generated
94
+ * OpenAPI, in addition to the app's own resources. This setting does not
95
+ * mutate runtime registration: backend startup already merges the engine core
96
+ * resource maps, then applies resolved billing/lifecycle exclusions. The dev
97
+ * companion projects the selected core resources with those same exclusions
98
+ * and their authored Tier-1/2/3 spec semantics.
99
+ *
100
+ * - `'all'` ({@link API_DOC_RESOURCES_ALL}) — document every core resource that
101
+ * has API-bearing operations after resolved feature exclusions. Convenient,
102
+ * but broad; it is configuration-derived eligibility, not live-route proof.
103
+ * - `CoreResourceType[]` — a curated subset (e.g. `[CoreResourceType.ORGANIZATIONS,
104
+ * CoreResourceType.ORGANIZATION_MEMBERS, CoreResourceType.FILES]`).
105
+ *
106
+ * Omitted (default): only the app's own resources are documented. Org-scoped
107
+ * core resources land in the (auth-gated) Organization API section; any
108
+ * anonymous ones in the Application API section — the existing section split
109
+ * by operation access level is unchanged.
110
+ */
111
+ apiDocResources: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<typeof CoreResourceType>>, z.ZodLiteral<"all">]>>;
112
+ /**
113
+ * Explicit source-owned grouping for the generated API reference.
114
+ *
115
+ * Omit this only when an application deliberately has no API taxonomy yet.
116
+ * When present, it must classify every published resource exactly once:
117
+ * categories cannot silently drift as framework or application resources are
118
+ * added or removed. The category facts become `tags[].x-wildo.category` in
119
+ * the canonical OpenAPI document and are consumed by the generic renderer.
120
+ */
121
+ apiReferenceResourceCategories: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
+ id: z.ZodString;
123
+ label: z.ZodString;
124
+ description: z.ZodOptional<z.ZodString>;
125
+ resourceNames: z.ZodArray<z.ZodString>;
126
+ }, z.core.$strict>>>;
127
+ /**
128
+ * App-enriched OpenAPI `servers[]` — the base URLs the API is reachable at,
129
+ * surfaced in the generated docs (and used by the "Try it" console + SDK
130
+ * generators). **This is the one piece of auth/transport metadata the
131
+ * framework cannot derive**: the security SCHEMES are framework-universal and
132
+ * emitted automatically (every Wildo API uses a JWT bearer + a scoped API key
133
+ * in the standard `Authorization` header),
134
+ * but deployment URLs are application/environment knowledge — only the app
135
+ * knows its staging/production domains.
136
+ *
137
+ * Each entry is `{ url, description? }` where `url` is the bare ORIGIN
138
+ * (host[:port]) — do NOT append `/api/v1`: operation paths already carry that
139
+ * mount, and the effective URL is `server.url` + path, so appending it would
140
+ * double the prefix. Order is preserved (the first entry is the docs default).
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * apiServers: [
145
+ * { url: 'https://api.example.com', description: 'Production' },
146
+ * { url: 'http://localhost:4241', description: 'Local development' },
147
+ * ],
148
+ * ```
149
+ *
150
+ * Omitted (default): no `servers` block is emitted (the docs still render; the
151
+ * "Try it" console just has no preset target).
152
+ */
153
+ apiServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ url: z.ZodString;
155
+ description: z.ZodOptional<z.ZodString>;
156
+ }, z.core.$strict>>>;
157
+ /**
158
+ * App-authored markdown intro for the generated API reference landing page
159
+ * (the OpenAPI `info.description`). Use it to frame the API in the app's own
160
+ * voice — what it's for, key concepts, links to guides.
161
+ *
162
+ * This is PREPENDED to a framework-universal "API conventions" section the
163
+ * generator always emits (Authentication, Base URL, Pagination, Idempotency,
164
+ * Errors — derived from how every Wildo API behaves), so an app gets a
165
+ * complete, accurate landing page even with no overview, and a branded one
166
+ * when it supplies this.
167
+ *
168
+ * @example
169
+ * ```ts
170
+ * apiOverview: 'The Northstar Tasks API lets you manage projects, work items, and assignments.',
171
+ * ```
172
+ */
173
+ apiOverview: z.ZodOptional<z.ZodString>;
174
+ /**
175
+ * Optional Content-Security-Policy override for the per-app nginx
176
+ * sidecar serving the docs site (and the `<meta http-equiv>` tag
177
+ * injected into `index.html` as a defense-in-depth fallback when
178
+ * the bundle is served from a static host that bypasses nginx).
179
+ *
180
+ * Typed against `WildoCspConfigSchema` from
181
+ * `@wildo-ai/platform-config-lib` (auth-hardening.md Slice B B-Step 1).
182
+ * The parsed value is consumed by the build-time generator at
183
+ * `platform-config-lib/src/project-config/shared/csp-emit.ts` (Slice B B-Step 3)
184
+ * which produces the per-app nginx `add_header` line and the
185
+ * `<meta http-equiv>` tag for the Docusaurus build to inject.
186
+ *
187
+ * Default behavior when omitted: NO policy emitted on either channel
188
+ * (the resolver short-circuits to `null` — same as `enabled: false`).
189
+ * Opt-in is deliberate per the schema design: frontends that have
190
+ * not audited their third-party JS / fetch surface should not ship
191
+ * a half-baked CSP that breaks features without protecting anything.
192
+ */
193
+ csp: z.ZodOptional<z.ZodObject<{
194
+ enabled: z.ZodDefault<z.ZodBoolean>;
195
+ reportOnly: z.ZodDefault<z.ZodBoolean>;
196
+ mergeStrategy: z.ZodDefault<z.ZodEnum<typeof import("@wildo-ai/platform-config-lib").CspMergeStrategy>>;
197
+ directives: z.ZodDefault<z.ZodObject<Record<"default-src" | "script-src" | "style-src" | "img-src" | "connect-src" | "font-src" | "frame-src" | "frame-ancestors" | "object-src" | "form-action" | "base-uri" | "manifest-src" | "media-src" | "worker-src", z.ZodOptional<z.ZodArray<z.ZodString>>>, z.core.$strict>>;
198
+ reportUri: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strict>>;
200
+ }, z.core.$strict>;
201
+ export type WildoTechnicalDocConfig = z.infer<typeof WildoTechnicalDocConfigSchema>;
202
+ export type WildoTechnicalDocConfigInput = z.input<typeof WildoTechnicalDocConfigSchema>;
203
+ /** @wildo_source:part:end engine.saas-technical-doc.config */
204
+ //# sourceMappingURL=wildo-tech-doc-config.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wildo-tech-doc-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/config/wildo-tech-doc-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAG,KAAc,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,4CAA4C;;;;;kBAEvD,CAAC;AACH,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,6BAA6B;IACxC;;;;;OAKG;;IAGH;;;;;;;;OAQG;;;;;;IASH;;;;;;;;;;OAUG;;IAGH;;;;OAIG;;IAGH;;;;;;;;;;;;;;;;;;OAkBG;;IAMH;;;;;;;;OAQG;;;;;;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;;;;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;kBAEH,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACzF,8DAA8D"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * @wildo_source:part:start engine.saas-technical-doc.config facet:layer:engine facet:family:technical-doc
3
+ *
4
+ * Per-service technical-documentation configuration authored as
5
+ * `wildo.tech-doc.config.ts`. The strict schema owns only settings with live
6
+ * consumers: publication budgets and public sentinels, API-reference inputs,
7
+ * presentation metadata, and the docs service CSP. Framework narrative content
8
+ * comes from the engine topic catalogue, not from application-local recipes.
9
+ */
10
+ import { WildoCspConfigSchema } from '@wildo-ai/platform-config-lib';
11
+ import { CoreResourceType } from '@wildo-ai/saas-models';
12
+ import { TechnicalDocumentationSupportedApiVersionSchema } from '@wildo-ai/saas-specifications/technical-documentation';
13
+ import { z } from 'zod';
14
+ import { ApiReferenceResourceCategorySchema, OpenApiServerSchema } from '../companion/operation-projection.schemas.js';
15
+ /**
16
+ * Sentinel for `apiDocResources` meaning "document every core resource that has
17
+ * API-bearing operations" — the full framework resource catalog. Distinct from
18
+ * an explicit curated array so an app can opt into everything without listing
19
+ * (and re-listing, as the engine grows) every `CoreResourceType` by hand.
20
+ */
21
+ export const API_DOC_RESOURCES_ALL = 'all';
22
+ /**
23
+ * One complete category declaration for the resources published by this API
24
+ * reference. `resourceNames` uses the generated OpenAPI tag name, which is
25
+ * the resolved resource identifier, rather than a display label or a
26
+ * filesystem location. The companion rejects a duplicate, stale or missing
27
+ * assignment whenever this feature is configured.
28
+ */
29
+ export const ApiReferenceResourceCategoryAssignmentSchema = ApiReferenceResourceCategorySchema.extend({
30
+ resourceNames: z.array(z.string().min(1)).min(1),
31
+ });
32
+ /**
33
+ * Per-service technical-documentation configuration block.
34
+ *
35
+ * Authored as `export default defineTechnicalDocConfig({...})` in
36
+ * `<tech-doc-service-root>/wildo.tech-doc.config.ts`. The companion
37
+ * loads this file once at bootstrap via jiti and projects fields
38
+ * into the OpenAPI generator and Docusaurus/CSP build surfaces.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import { defineTechnicalDocConfig } from '@wildo-ai/saas-technical-doc';
43
+ *
44
+ * export default defineTechnicalDocConfig({
45
+ * supportedApiVersion: '1.0.0',
46
+ * publicMarketingTitle: 'Northstar Tasks — Technical Documentation',
47
+ * apiDocResources: 'all', // also document every core engine resource
48
+ * });
49
+ * ```
50
+ */
51
+ export const WildoTechnicalDocConfigSchema = z.strictObject({
52
+ /**
53
+ * Exact public API contract release supported by this documentation
54
+ * publication. It is required because OpenAPI mandates a version and a
55
+ * placeholder would make the generated reference look authoritative while
56
+ * carrying no usable compatibility claim.
57
+ */
58
+ supportedApiVersion: TechnicalDocumentationSupportedApiVersionSchema,
59
+ /**
60
+ * Ceilings on the published documentation tree, applied per field over the engine
61
+ * defaults (`TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS`).
62
+ *
63
+ * Omitting this is the normal case and is SAFE: absence yields the engine ceilings, not
64
+ * an unbounded build. Declare only the field an application genuinely outgrows — a
65
+ * partial declaration keeps the others tracking the engine, so raising a page count does
66
+ * not silently freeze a copy of every other limit at today's value.
67
+ */
68
+ outputBudgets: z
69
+ .strictObject({
70
+ maximumPageCount: z.number().int().positive().optional(),
71
+ maximumTotalBytes: z.number().int().positive().optional(),
72
+ maximumSearchIndexBytes: z.number().int().positive().optional(),
73
+ })
74
+ .optional(),
75
+ /**
76
+ * Additional byte sequences that must never appear in the PUBLIC documentation tree.
77
+ * Publication fails naming the offending file.
78
+ *
79
+ * **Unioned with the engine's mandatory sentinels, never replacing them** — an
80
+ * application can arm more canaries, and cannot disarm the engine's.
81
+ *
82
+ * Choose sequences that cannot legitimately appear in published prose. Generic markers
83
+ * (`secret`, `token`, `Bearer`) fire on the authentication and webhook guides
84
+ * themselves, and a canary that cries on correct content is one people learn to remove.
85
+ */
86
+ forbiddenPublicSentinels: z.array(z.string().min(1)).optional(),
87
+ /**
88
+ * Public-facing title for the docs site (browser tab title +
89
+ * landing page header). Optional — falls back to
90
+ * `WildoSaasConfig.displayName` when omitted.
91
+ */
92
+ publicMarketingTitle: z.string().min(1).max(200).optional(),
93
+ /**
94
+ * Opt-in: include framework (engine) core resources in this app's generated
95
+ * OpenAPI, in addition to the app's own resources. This setting does not
96
+ * mutate runtime registration: backend startup already merges the engine core
97
+ * resource maps, then applies resolved billing/lifecycle exclusions. The dev
98
+ * companion projects the selected core resources with those same exclusions
99
+ * and their authored Tier-1/2/3 spec semantics.
100
+ *
101
+ * - `'all'` ({@link API_DOC_RESOURCES_ALL}) — document every core resource that
102
+ * has API-bearing operations after resolved feature exclusions. Convenient,
103
+ * but broad; it is configuration-derived eligibility, not live-route proof.
104
+ * - `CoreResourceType[]` — a curated subset (e.g. `[CoreResourceType.ORGANIZATIONS,
105
+ * CoreResourceType.ORGANIZATION_MEMBERS, CoreResourceType.FILES]`).
106
+ *
107
+ * Omitted (default): only the app's own resources are documented. Org-scoped
108
+ * core resources land in the (auth-gated) Organization API section; any
109
+ * anonymous ones in the Application API section — the existing section split
110
+ * by operation access level is unchanged.
111
+ */
112
+ apiDocResources: z.union([
113
+ z.array(z.enum(CoreResourceType)),
114
+ z.literal(API_DOC_RESOURCES_ALL),
115
+ ]).optional(),
116
+ /**
117
+ * Explicit source-owned grouping for the generated API reference.
118
+ *
119
+ * Omit this only when an application deliberately has no API taxonomy yet.
120
+ * When present, it must classify every published resource exactly once:
121
+ * categories cannot silently drift as framework or application resources are
122
+ * added or removed. The category facts become `tags[].x-wildo.category` in
123
+ * the canonical OpenAPI document and are consumed by the generic renderer.
124
+ */
125
+ apiReferenceResourceCategories: z.array(ApiReferenceResourceCategoryAssignmentSchema).min(1).optional(),
126
+ /**
127
+ * App-enriched OpenAPI `servers[]` — the base URLs the API is reachable at,
128
+ * surfaced in the generated docs (and used by the "Try it" console + SDK
129
+ * generators). **This is the one piece of auth/transport metadata the
130
+ * framework cannot derive**: the security SCHEMES are framework-universal and
131
+ * emitted automatically (every Wildo API uses a JWT bearer + a scoped API key
132
+ * in the standard `Authorization` header),
133
+ * but deployment URLs are application/environment knowledge — only the app
134
+ * knows its staging/production domains.
135
+ *
136
+ * Each entry is `{ url, description? }` where `url` is the bare ORIGIN
137
+ * (host[:port]) — do NOT append `/api/v1`: operation paths already carry that
138
+ * mount, and the effective URL is `server.url` + path, so appending it would
139
+ * double the prefix. Order is preserved (the first entry is the docs default).
140
+ *
141
+ * @example
142
+ * ```ts
143
+ * apiServers: [
144
+ * { url: 'https://api.example.com', description: 'Production' },
145
+ * { url: 'http://localhost:4241', description: 'Local development' },
146
+ * ],
147
+ * ```
148
+ *
149
+ * Omitted (default): no `servers` block is emitted (the docs still render; the
150
+ * "Try it" console just has no preset target).
151
+ */
152
+ apiServers: z.array(OpenApiServerSchema).optional(),
153
+ /**
154
+ * App-authored markdown intro for the generated API reference landing page
155
+ * (the OpenAPI `info.description`). Use it to frame the API in the app's own
156
+ * voice — what it's for, key concepts, links to guides.
157
+ *
158
+ * This is PREPENDED to a framework-universal "API conventions" section the
159
+ * generator always emits (Authentication, Base URL, Pagination, Idempotency,
160
+ * Errors — derived from how every Wildo API behaves), so an app gets a
161
+ * complete, accurate landing page even with no overview, and a branded one
162
+ * when it supplies this.
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * apiOverview: 'The Northstar Tasks API lets you manage projects, work items, and assignments.',
167
+ * ```
168
+ */
169
+ apiOverview: z.string().min(1).max(8000).optional(),
170
+ /**
171
+ * Optional Content-Security-Policy override for the per-app nginx
172
+ * sidecar serving the docs site (and the `<meta http-equiv>` tag
173
+ * injected into `index.html` as a defense-in-depth fallback when
174
+ * the bundle is served from a static host that bypasses nginx).
175
+ *
176
+ * Typed against `WildoCspConfigSchema` from
177
+ * `@wildo-ai/platform-config-lib` (auth-hardening.md Slice B B-Step 1).
178
+ * The parsed value is consumed by the build-time generator at
179
+ * `platform-config-lib/src/project-config/shared/csp-emit.ts` (Slice B B-Step 3)
180
+ * which produces the per-app nginx `add_header` line and the
181
+ * `<meta http-equiv>` tag for the Docusaurus build to inject.
182
+ *
183
+ * Default behavior when omitted: NO policy emitted on either channel
184
+ * (the resolver short-circuits to `null` — same as `enabled: false`).
185
+ * Opt-in is deliberate per the schema design: frontends that have
186
+ * not audited their third-party JS / fetch surface should not ship
187
+ * a half-baked CSP that breaks features without protecting anything.
188
+ */
189
+ csp: WildoCspConfigSchema.optional(),
190
+ });
191
+ /** @wildo_source:part:end engine.saas-technical-doc.config */
192
+ //# sourceMappingURL=wildo-tech-doc-config.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wildo-tech-doc-config.schemas.js","sourceRoot":"","sources":["../../../../src/config/wildo-tech-doc-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,+CAA+C,EAAE,MAAM,uDAAuD,CAAC;AACxH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kCAAkC,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEpH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAc,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAG,kCAAkC,CAAC,MAAM,CAAC;IACpG,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACjD,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D;;;;;OAKG;IACH,mBAAmB,EAAE,+CAA+C;IAEpE;;;;;;;;OAQG;IACH,aAAa,EAAE,CAAC;SACb,YAAY,CAAC;QACZ,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;QACxD,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;QACzD,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;KAChE,CAAC;SACD,QAAQ,EAAE;IAEb;;;;;;;;;;OAUG;IACH,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE/D;;;;OAIG;IACH,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAE3D;;;;;;;;;;;;;;;;;;OAkBG;IACH,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC;QACvB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACjC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;KACjC,CAAC,CAAC,QAAQ,EAAE;IAEb;;;;;;;;OAQG;IACH,8BAA8B,EAAE,CAAC,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEvG;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IAEnD;;;;;;;;;;;;;;;OAeG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAEnD;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,EAAE,oBAAoB,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAGH,8DAA8D","sourcesContent":["/**\n * @wildo_source:part:start engine.saas-technical-doc.config facet:layer:engine facet:family:technical-doc\n *\n * Per-service technical-documentation configuration authored as\n * `wildo.tech-doc.config.ts`. The strict schema owns only settings with live\n * consumers: publication budgets and public sentinels, API-reference inputs,\n * presentation metadata, and the docs service CSP. Framework narrative content\n * comes from the engine topic catalogue, not from application-local recipes.\n */\n\nimport { WildoCspConfigSchema } from '@wildo-ai/platform-config-lib';\nimport { CoreResourceType } from '@wildo-ai/saas-models';\nimport { TechnicalDocumentationSupportedApiVersionSchema } from '@wildo-ai/saas-specifications/technical-documentation';\nimport { z } from 'zod';\nimport { ApiReferenceResourceCategorySchema, OpenApiServerSchema } from '../companion/operation-projection.schemas';\n\n/**\n * Sentinel for `apiDocResources` meaning \"document every core resource that has\n * API-bearing operations\" — the full framework resource catalog. Distinct from\n * an explicit curated array so an app can opt into everything without listing\n * (and re-listing, as the engine grows) every `CoreResourceType` by hand.\n */\nexport const API_DOC_RESOURCES_ALL = 'all' as const;\n\n/**\n * One complete category declaration for the resources published by this API\n * reference. `resourceNames` uses the generated OpenAPI tag name, which is\n * the resolved resource identifier, rather than a display label or a\n * filesystem location. The companion rejects a duplicate, stale or missing\n * assignment whenever this feature is configured.\n */\nexport const ApiReferenceResourceCategoryAssignmentSchema = ApiReferenceResourceCategorySchema.extend({\n resourceNames: z.array(z.string().min(1)).min(1),\n});\nexport type ApiReferenceResourceCategoryAssignment = z.infer<typeof ApiReferenceResourceCategoryAssignmentSchema>;\n\n/**\n * Per-service technical-documentation configuration block.\n *\n * Authored as `export default defineTechnicalDocConfig({...})` in\n * `<tech-doc-service-root>/wildo.tech-doc.config.ts`. The companion\n * loads this file once at bootstrap via jiti and projects fields\n * into the OpenAPI generator and Docusaurus/CSP build surfaces.\n *\n * @example\n * ```ts\n * import { defineTechnicalDocConfig } from '@wildo-ai/saas-technical-doc';\n *\n * export default defineTechnicalDocConfig({\n * supportedApiVersion: '1.0.0',\n * publicMarketingTitle: 'Northstar Tasks — Technical Documentation',\n * apiDocResources: 'all', // also document every core engine resource\n * });\n * ```\n */\nexport const WildoTechnicalDocConfigSchema = z.strictObject({\n /**\n * Exact public API contract release supported by this documentation\n * publication. It is required because OpenAPI mandates a version and a\n * placeholder would make the generated reference look authoritative while\n * carrying no usable compatibility claim.\n */\n supportedApiVersion: TechnicalDocumentationSupportedApiVersionSchema,\n\n /**\n * Ceilings on the published documentation tree, applied per field over the engine\n * defaults (`TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS`).\n *\n * Omitting this is the normal case and is SAFE: absence yields the engine ceilings, not\n * an unbounded build. Declare only the field an application genuinely outgrows — a\n * partial declaration keeps the others tracking the engine, so raising a page count does\n * not silently freeze a copy of every other limit at today's value.\n */\n outputBudgets: z\n .strictObject({\n maximumPageCount: z.number().int().positive().optional(),\n maximumTotalBytes: z.number().int().positive().optional(),\n maximumSearchIndexBytes: z.number().int().positive().optional(),\n })\n .optional(),\n\n /**\n * Additional byte sequences that must never appear in the PUBLIC documentation tree.\n * Publication fails naming the offending file.\n *\n * **Unioned with the engine's mandatory sentinels, never replacing them** — an\n * application can arm more canaries, and cannot disarm the engine's.\n *\n * Choose sequences that cannot legitimately appear in published prose. Generic markers\n * (`secret`, `token`, `Bearer`) fire on the authentication and webhook guides\n * themselves, and a canary that cries on correct content is one people learn to remove.\n */\n forbiddenPublicSentinels: z.array(z.string().min(1)).optional(),\n\n /**\n * Public-facing title for the docs site (browser tab title +\n * landing page header). Optional — falls back to\n * `WildoSaasConfig.displayName` when omitted.\n */\n publicMarketingTitle: z.string().min(1).max(200).optional(),\n\n /**\n * Opt-in: include framework (engine) core resources in this app's generated\n * OpenAPI, in addition to the app's own resources. This setting does not\n * mutate runtime registration: backend startup already merges the engine core\n * resource maps, then applies resolved billing/lifecycle exclusions. The dev\n * companion projects the selected core resources with those same exclusions\n * and their authored Tier-1/2/3 spec semantics.\n *\n * - `'all'` ({@link API_DOC_RESOURCES_ALL}) — document every core resource that\n * has API-bearing operations after resolved feature exclusions. Convenient,\n * but broad; it is configuration-derived eligibility, not live-route proof.\n * - `CoreResourceType[]` — a curated subset (e.g. `[CoreResourceType.ORGANIZATIONS,\n * CoreResourceType.ORGANIZATION_MEMBERS, CoreResourceType.FILES]`).\n *\n * Omitted (default): only the app's own resources are documented. Org-scoped\n * core resources land in the (auth-gated) Organization API section; any\n * anonymous ones in the Application API section — the existing section split\n * by operation access level is unchanged.\n */\n apiDocResources: z.union([\n z.array(z.enum(CoreResourceType)),\n z.literal(API_DOC_RESOURCES_ALL),\n ]).optional(),\n\n /**\n * Explicit source-owned grouping for the generated API reference.\n *\n * Omit this only when an application deliberately has no API taxonomy yet.\n * When present, it must classify every published resource exactly once:\n * categories cannot silently drift as framework or application resources are\n * added or removed. The category facts become `tags[].x-wildo.category` in\n * the canonical OpenAPI document and are consumed by the generic renderer.\n */\n apiReferenceResourceCategories: z.array(ApiReferenceResourceCategoryAssignmentSchema).min(1).optional(),\n\n /**\n * App-enriched OpenAPI `servers[]` — the base URLs the API is reachable at,\n * surfaced in the generated docs (and used by the \"Try it\" console + SDK\n * generators). **This is the one piece of auth/transport metadata the\n * framework cannot derive**: the security SCHEMES are framework-universal and\n * emitted automatically (every Wildo API uses a JWT bearer + a scoped API key\n * in the standard `Authorization` header),\n * but deployment URLs are application/environment knowledge — only the app\n * knows its staging/production domains.\n *\n * Each entry is `{ url, description? }` where `url` is the bare ORIGIN\n * (host[:port]) — do NOT append `/api/v1`: operation paths already carry that\n * mount, and the effective URL is `server.url` + path, so appending it would\n * double the prefix. Order is preserved (the first entry is the docs default).\n *\n * @example\n * ```ts\n * apiServers: [\n * { url: 'https://api.example.com', description: 'Production' },\n * { url: 'http://localhost:4241', description: 'Local development' },\n * ],\n * ```\n *\n * Omitted (default): no `servers` block is emitted (the docs still render; the\n * \"Try it\" console just has no preset target).\n */\n apiServers: z.array(OpenApiServerSchema).optional(),\n\n /**\n * App-authored markdown intro for the generated API reference landing page\n * (the OpenAPI `info.description`). Use it to frame the API in the app's own\n * voice — what it's for, key concepts, links to guides.\n *\n * This is PREPENDED to a framework-universal \"API conventions\" section the\n * generator always emits (Authentication, Base URL, Pagination, Idempotency,\n * Errors — derived from how every Wildo API behaves), so an app gets a\n * complete, accurate landing page even with no overview, and a branded one\n * when it supplies this.\n *\n * @example\n * ```ts\n * apiOverview: 'The Northstar Tasks API lets you manage projects, work items, and assignments.',\n * ```\n */\n apiOverview: z.string().min(1).max(8000).optional(),\n\n /**\n * Optional Content-Security-Policy override for the per-app nginx\n * sidecar serving the docs site (and the `<meta http-equiv>` tag\n * injected into `index.html` as a defense-in-depth fallback when\n * the bundle is served from a static host that bypasses nginx).\n *\n * Typed against `WildoCspConfigSchema` from\n * `@wildo-ai/platform-config-lib` (auth-hardening.md Slice B B-Step 1).\n * The parsed value is consumed by the build-time generator at\n * `platform-config-lib/src/project-config/shared/csp-emit.ts` (Slice B B-Step 3)\n * which produces the per-app nginx `add_header` line and the\n * `<meta http-equiv>` tag for the Docusaurus build to inject.\n *\n * Default behavior when omitted: NO policy emitted on either channel\n * (the resolver short-circuits to `null` — same as `enabled: false`).\n * Opt-in is deliberate per the schema design: frontends that have\n * not audited their third-party JS / fetch surface should not ship\n * a half-baked CSP that breaks features without protecting anything.\n */\n csp: WildoCspConfigSchema.optional(),\n});\nexport type WildoTechnicalDocConfig = z.infer<typeof WildoTechnicalDocConfigSchema>;\nexport type WildoTechnicalDocConfigInput = z.input<typeof WildoTechnicalDocConfigSchema>;\n/** @wildo_source:part:end engine.saas-technical-doc.config */\n"]}
@@ -0,0 +1,82 @@
1
+ /** Portable identities for the reusable engine-owned application-consumer content bundle. No filesystem or companion runtime belongs in this module. */
2
+ import { z } from 'zod';
3
+ /** Exact media types accepted by the engine-owned application-consumer content bundle. */
4
+ export declare enum ApplicationConsumerDocumentationContentMediaType {
5
+ MARKDOWN_UTF8 = "text/markdown; charset=utf-8"
6
+ }
7
+ /** The engine-owned content bundle's stable name. With `contentBundleVersion` it is the bundle's identity. */
8
+ export declare const APPLICATION_CONSUMER_DOCUMENTATION_CONTENT_BUNDLE_REF: "technical-documentation:content-bundle/engine-application-consumer";
9
+ export declare const APPLICATION_CONSUMER_DOCUMENTATION_ENGINE_CONTENT_SOURCE_PREFIX: "saas-technical-doc:engine-content/";
10
+ /**
11
+ * References to safe, explicitly curated facts projected from framework source.
12
+ *
13
+ * Authored Markdown may cite these facts but can never cite an arbitrary model,
14
+ * resource specification, or source file. The companion projector joins each
15
+ * reference to the exact catalog entry and fails closed when it is absent.
16
+ */
17
+ export declare const APPLICATION_CONSUMER_DOCUMENTATION_CONSUMER_FACT_SOURCE_PREFIX: "source:consumer-fact:";
18
+ /**
19
+ * A narrow, public projection made by the application companion. The current
20
+ * use is the application's organization-role inventory; it is deliberately
21
+ * not a general escape hatch for arbitrary application source.
22
+ */
23
+ export declare const APPLICATION_CONSUMER_DOCUMENTATION_COMPANION_PROJECTION_SOURCE_PREFIX: "source:companion-projection:";
24
+ export declare const ApplicationConsumerDocumentationContentFileIdentityV1Schema: z.ZodObject<{
25
+ managedPath: z.core.$ZodBranded<z.ZodString, "TechnicalDocumentationNormalizedRelativePath", "out">;
26
+ mediaType: z.ZodLiteral<ApplicationConsumerDocumentationContentMediaType>;
27
+ byteLength: z.ZodNumber;
28
+ /**
29
+ * sha256 of the file's exact UTF-8 bytes. Kept through the 2026-08-27 digest demolition because
30
+ * it names opaque emitted content and detects its corruption; the `semanticDigest` and
31
+ * `contentBundleRootDigest` that sat beside it recorded agreement between two parts of this
32
+ * repository, which is what went.
33
+ */
34
+ fileDigest: z.ZodString;
35
+ unitRef: z.ZodString;
36
+ }, z.core.$strict>;
37
+ export type ApplicationConsumerDocumentationContentFileIdentityV1 = z.infer<typeof ApplicationConsumerDocumentationContentFileIdentityV1Schema>;
38
+ export declare const ApplicationConsumerDocumentationContentUnitIdentityV1Schema: z.ZodObject<{
39
+ unitRef: z.ZodString;
40
+ sourceRefs: z.ZodArray<z.ZodString>;
41
+ managedPaths: z.ZodArray<z.core.$ZodBranded<z.ZodString, "TechnicalDocumentationNormalizedRelativePath", "out">>;
42
+ }, z.core.$strict>;
43
+ export type ApplicationConsumerDocumentationContentUnitIdentityV1 = z.infer<typeof ApplicationConsumerDocumentationContentUnitIdentityV1Schema>;
44
+ /**
45
+ * Exact identity of the managed engine content bundle.
46
+ *
47
+ * generatedAt is operational provenance only, and is excluded from every comparison so regenerating
48
+ * identical source bytes stays identity-stable.
49
+ */
50
+ export declare const ApplicationConsumerDocumentationContentManifestV1Schema: z.ZodObject<{
51
+ schemaVersion: z.ZodLiteral<1>;
52
+ contentBundleVersion: z.ZodNumber;
53
+ generatedAt: z.ZodISODateTime;
54
+ fileCount: z.ZodNumber;
55
+ unitCount: z.ZodNumber;
56
+ files: z.ZodArray<z.ZodObject<{
57
+ managedPath: z.core.$ZodBranded<z.ZodString, "TechnicalDocumentationNormalizedRelativePath", "out">;
58
+ mediaType: z.ZodLiteral<ApplicationConsumerDocumentationContentMediaType>;
59
+ byteLength: z.ZodNumber;
60
+ /**
61
+ * sha256 of the file's exact UTF-8 bytes. Kept through the 2026-08-27 digest demolition because
62
+ * it names opaque emitted content and detects its corruption; the `semanticDigest` and
63
+ * `contentBundleRootDigest` that sat beside it recorded agreement between two parts of this
64
+ * repository, which is what went.
65
+ */
66
+ fileDigest: z.ZodString;
67
+ unitRef: z.ZodString;
68
+ }, z.core.$strict>>;
69
+ units: z.ZodArray<z.ZodObject<{
70
+ unitRef: z.ZodString;
71
+ sourceRefs: z.ZodArray<z.ZodString>;
72
+ managedPaths: z.ZodArray<z.core.$ZodBranded<z.ZodString, "TechnicalDocumentationNormalizedRelativePath", "out">>;
73
+ }, z.core.$strict>>;
74
+ }, z.core.$strict>;
75
+ export type ApplicationConsumerDocumentationContentManifestV1 = z.infer<typeof ApplicationConsumerDocumentationContentManifestV1Schema>;
76
+ export interface ApplicationConsumerDocumentationAuthoredContentV1 {
77
+ readonly managedPath: string;
78
+ readonly unitRef: string;
79
+ readonly sourceRefs: readonly string[];
80
+ readonly markdown: string;
81
+ }
82
+ //# sourceMappingURL=application-consumer-documentation-content-manifest.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-consumer-documentation-content-manifest.schemas.d.ts","sourceRoot":"","sources":["../../../../src/content/application-consumer-documentation-content-manifest.schemas.ts"],"names":[],"mappings":"AAAA,wJAAwJ;AACxJ,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,0FAA0F;AAC1F,oBAAY,gDAAgD;IAC1D,aAAa,iCAAiC;CAC/C;AAED,8GAA8G;AAC9G,eAAO,MAAM,qDAAqD,EAAG,oEAA6E,CAAC;AAEnJ,eAAO,MAAM,+DAA+D,EAAG,oCAA6C,CAAC;AAC7H;;;;;;GAMG;AACH,eAAO,MAAM,8DAA8D,EAAG,uBAAgC,CAAC;AAC/G;;;;GAIG;AACH,eAAO,MAAM,qEAAqE,EAAG,8BAAuC,CAAC;AAE7H,eAAO,MAAM,2DAA2D;;;;IAItE;;;;;OAKG;;;kBAGH,CAAC;AACH,MAAM,MAAM,qDAAqD,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2DAA2D,CAAC,CAAC;AAEhJ,eAAO,MAAM,2DAA2D;;;;kBAoBpE,CAAC;AACL,MAAM,MAAM,qDAAqD,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2DAA2D,CAAC,CAAC;AAEhJ;;;;;GAKG;AACH,eAAO,MAAM,uDAAuD;;;;;;;;;;QAxClE;;;;;WAKG;;;;;;;;;kBAqFD,CAAC;AACL,MAAM,MAAM,iDAAiD,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uDAAuD,CAAC,CAAC;AAExI,MAAM,WAAW,iDAAiD;IAChE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,114 @@
1
+ /** Portable identities for the reusable engine-owned application-consumer content bundle. No filesystem or companion runtime belongs in this module. */
2
+ import { z } from 'zod';
3
+ import { TechnicalDocumentationNormalizedRelativePathSchema, TechnicalDocumentationRefSchema, technicalDocumentationValuesAreUniqueAndSorted, } from '@wildo-ai/saas-specifications/technical-documentation';
4
+ /** Exact media types accepted by the engine-owned application-consumer content bundle. */
5
+ export var ApplicationConsumerDocumentationContentMediaType;
6
+ (function (ApplicationConsumerDocumentationContentMediaType) {
7
+ ApplicationConsumerDocumentationContentMediaType["MARKDOWN_UTF8"] = "text/markdown; charset=utf-8";
8
+ })(ApplicationConsumerDocumentationContentMediaType || (ApplicationConsumerDocumentationContentMediaType = {}));
9
+ /** The engine-owned content bundle's stable name. With `contentBundleVersion` it is the bundle's identity. */
10
+ export const APPLICATION_CONSUMER_DOCUMENTATION_CONTENT_BUNDLE_REF = 'technical-documentation:content-bundle/engine-application-consumer';
11
+ export const APPLICATION_CONSUMER_DOCUMENTATION_ENGINE_CONTENT_SOURCE_PREFIX = 'saas-technical-doc:engine-content/';
12
+ /**
13
+ * References to safe, explicitly curated facts projected from framework source.
14
+ *
15
+ * Authored Markdown may cite these facts but can never cite an arbitrary model,
16
+ * resource specification, or source file. The companion projector joins each
17
+ * reference to the exact catalog entry and fails closed when it is absent.
18
+ */
19
+ export const APPLICATION_CONSUMER_DOCUMENTATION_CONSUMER_FACT_SOURCE_PREFIX = 'source:consumer-fact:';
20
+ /**
21
+ * A narrow, public projection made by the application companion. The current
22
+ * use is the application's organization-role inventory; it is deliberately
23
+ * not a general escape hatch for arbitrary application source.
24
+ */
25
+ export const APPLICATION_CONSUMER_DOCUMENTATION_COMPANION_PROJECTION_SOURCE_PREFIX = 'source:companion-projection:';
26
+ export const ApplicationConsumerDocumentationContentFileIdentityV1Schema = z.strictObject({
27
+ managedPath: TechnicalDocumentationNormalizedRelativePathSchema,
28
+ mediaType: z.literal(ApplicationConsumerDocumentationContentMediaType.MARKDOWN_UTF8),
29
+ byteLength: z.number().int().nonnegative(),
30
+ /**
31
+ * sha256 of the file's exact UTF-8 bytes. Kept through the 2026-08-27 digest demolition because
32
+ * it names opaque emitted content and detects its corruption; the `semanticDigest` and
33
+ * `contentBundleRootDigest` that sat beside it recorded agreement between two parts of this
34
+ * repository, which is what went.
35
+ */
36
+ fileDigest: z.string().regex(/^sha256:[0-9a-f]{64}$/),
37
+ unitRef: TechnicalDocumentationRefSchema,
38
+ });
39
+ export const ApplicationConsumerDocumentationContentUnitIdentityV1Schema = z
40
+ .strictObject({
41
+ unitRef: TechnicalDocumentationRefSchema,
42
+ sourceRefs: z.array(TechnicalDocumentationRefSchema).min(1),
43
+ managedPaths: z.array(TechnicalDocumentationNormalizedRelativePathSchema).min(1),
44
+ })
45
+ .superRefine((unit, context) => {
46
+ if (!technicalDocumentationValuesAreUniqueAndSorted(unit.sourceRefs)) {
47
+ context.addIssue({ code: 'custom', message: 'content sourceRefs must be unique and sorted', path: ['sourceRefs'] });
48
+ }
49
+ if (!technicalDocumentationValuesAreUniqueAndSorted(unit.managedPaths)) {
50
+ context.addIssue({ code: 'custom', message: 'content managedPaths must be unique and sorted', path: ['managedPaths'] });
51
+ }
52
+ for (const [index, sourceRef] of unit.sourceRefs.entries()) {
53
+ if (!sourceRef.startsWith(APPLICATION_CONSUMER_DOCUMENTATION_ENGINE_CONTENT_SOURCE_PREFIX)
54
+ && !sourceRef.startsWith(APPLICATION_CONSUMER_DOCUMENTATION_CONSUMER_FACT_SOURCE_PREFIX)
55
+ && !sourceRef.startsWith(APPLICATION_CONSUMER_DOCUMENTATION_COMPANION_PROJECTION_SOURCE_PREFIX)) {
56
+ context.addIssue({ code: 'custom', message: 'engine content units can cite only engine-content, curated consumer-fact, or declared companion-projection source refs', path: ['sourceRefs', index] });
57
+ }
58
+ }
59
+ });
60
+ /**
61
+ * Exact identity of the managed engine content bundle.
62
+ *
63
+ * generatedAt is operational provenance only, and is excluded from every comparison so regenerating
64
+ * identical source bytes stays identity-stable.
65
+ */
66
+ export const ApplicationConsumerDocumentationContentManifestV1Schema = z
67
+ .strictObject({
68
+ schemaVersion: z.literal(1),
69
+ contentBundleVersion: z.number().int().positive(),
70
+ generatedAt: z.iso.datetime(),
71
+ fileCount: z.number().int().positive(),
72
+ unitCount: z.number().int().positive(),
73
+ files: z.array(ApplicationConsumerDocumentationContentFileIdentityV1Schema).min(1),
74
+ units: z.array(ApplicationConsumerDocumentationContentUnitIdentityV1Schema).min(1),
75
+ })
76
+ .superRefine((manifest, context) => {
77
+ if (manifest.fileCount !== manifest.files.length) {
78
+ context.addIssue({ code: 'custom', message: 'fileCount must equal the exact managed file inventory', path: ['fileCount'] });
79
+ }
80
+ if (manifest.unitCount !== manifest.units.length) {
81
+ context.addIssue({ code: 'custom', message: 'unitCount must equal the exact unit inventory', path: ['unitCount'] });
82
+ }
83
+ const paths = manifest.files.map((file) => file.managedPath);
84
+ if (!technicalDocumentationValuesAreUniqueAndSorted(paths)) {
85
+ context.addIssue({ code: 'custom', message: 'managed files must be unique and sorted by path', path: ['files'] });
86
+ }
87
+ const caseFoldedPaths = paths.map((path) => path.toLocaleLowerCase('en-US'));
88
+ if (new Set(caseFoldedPaths).size !== caseFoldedPaths.length) {
89
+ context.addIssue({ code: 'custom', message: 'managed file paths cannot collide after case folding', path: ['files'] });
90
+ }
91
+ const unitRefs = manifest.units.map((unit) => unit.unitRef);
92
+ if (!technicalDocumentationValuesAreUniqueAndSorted(unitRefs)) {
93
+ context.addIssue({ code: 'custom', message: 'content units must be unique and sorted by unitRef', path: ['units'] });
94
+ }
95
+ const filesByUnitRef = new Map();
96
+ for (const file of manifest.files) {
97
+ const managedPaths = filesByUnitRef.get(file.unitRef) ?? [];
98
+ managedPaths.push(file.managedPath);
99
+ filesByUnitRef.set(file.unitRef, managedPaths);
100
+ }
101
+ for (const [index, unit] of manifest.units.entries()) {
102
+ const exactPaths = filesByUnitRef.get(unit.unitRef)?.sort() ?? [];
103
+ if (exactPaths.join('\0') !== unit.managedPaths.join('\0')) {
104
+ context.addIssue({ code: 'custom', message: 'unit managedPaths must exactly cover files assigned to that unitRef', path: ['units', index, 'managedPaths'] });
105
+ }
106
+ }
107
+ const declaredUnitRefs = new Set(unitRefs);
108
+ for (const [index, file] of manifest.files.entries()) {
109
+ if (!declaredUnitRefs.has(file.unitRef)) {
110
+ context.addIssue({ code: 'custom', message: 'every managed file must belong to a declared unit', path: ['files', index, 'unitRef'] });
111
+ }
112
+ }
113
+ });
114
+ //# sourceMappingURL=application-consumer-documentation-content-manifest.schemas.js.map