@wildo-ai/saas-technical-doc 1.1.4 → 1.1.5
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.
- package/dist/esm/build/csp-emit.d.ts.map +1 -1
- package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-administration-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-administration-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts +37 -0
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.js +46 -5
- package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts +101 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.js +205 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.js.map +1 -0
- package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-domain-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-integration-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js +3 -0
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts +34 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js +45 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js.map +1 -0
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +24 -10
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +25 -15
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +11 -3
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +9 -2
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +10 -4
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -1
- package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -1
- package/dist/esm/companion/index.d.ts +2 -0
- package/dist/esm/companion/index.d.ts.map +1 -1
- package/dist/esm/companion/index.js +2 -0
- package/dist/esm/companion/index.js.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.js.map +1 -1
- package/dist/esm/companion/openapi-generator.d.ts +8 -4
- package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
- package/dist/esm/companion/openapi-generator.js +39 -17
- package/dist/esm/companion/openapi-generator.js.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts +21 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.js +11 -0
- package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
- package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
- package/dist/esm/companion/publish-result.types.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +8 -0
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-render-model.js +26 -10
- package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.map +1 -1
- package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.js.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.js.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.js.map +1 -1
- package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -1
- package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -1
- package/dist/esm/config/wildo-tech-doc-config.schemas.js.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +18 -15
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js +169 -61
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
- package/dist/esm/content.exports.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -1
- package/dist/esm/openapi/index.d.ts.map +1 -1
- package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -1
- package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -1
- package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.d.ts +2 -2
- package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.js +8 -4
- package/dist/esm/runtime/DocsAuthContext.js.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.d.ts +16 -0
- package/dist/esm/runtime/DocsFrontendProviders.d.ts.map +1 -0
- package/dist/esm/runtime/DocsFrontendProviders.js +26 -0
- package/dist/esm/runtime/DocsFrontendProviders.js.map +1 -0
- package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +1 -2
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -1
- package/dist/esm/runtime/index.d.ts +2 -0
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js +2 -0
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.d.ts +5 -0
- package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.js +5 -0
- package/dist/esm/runtime/openapi-reference-model.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-view.js +1 -1
- package/dist/esm/runtime/openapi-reference-view.js.map +1 -1
- package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts +1 -0
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.js +10 -2
- package/dist/esm/runtime/use-docs-frontend-provider-registry.js.map +1 -1
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts +30 -0
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts.map +1 -0
- package/dist/esm/runtime/use-docs-provider-scripts.js +40 -0
- package/dist/esm/runtime/use-docs-provider-scripts.js.map +1 -0
- package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-sdks.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-managed-tree-validator.js","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-managed-tree-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,kDAAkD,GAInD,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,qCAAqC,EACrC,yCAAyC,GAC1C,MAAM,qCAAqC,CAAC;AAQ7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAwC,MAAM,CAAC,MAAM,CAAC;IAC/G,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,GA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,CAAC;IAC3D,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,SAAS,EAAE,CAAC,CAAC;IAC9H,IAAI,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,iBAAiB;QAAE,MAAM,IAAI,KAAK,CAAC,uDAAuD,UAAU,EAAE,CAAC,CAAC;IACvI,IAAI,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,uBAAuB;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,gBAAgB,EAAE,CAAC,CAAC;IAC3J,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AACD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC","sourcesContent":["import {\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationRendererKind,\n TechnicalDocumentationRenderOutputManifestV1Schema,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport {\n technicalDocumentationSha256Bytes,\n type TechnicalDocumentationRenderedFile,\n} from './technical-documentation-render-model';\nimport {\n ApplicationConsumerDocumentationRoute,\n applicationConsumerDocumentationRoutePath,\n} from '../../openapi/api-reference-targets';\n\nexport interface TechnicalDocumentationOutputBudgets {\n readonly maximumPageCount: number;\n readonly maximumTotalBytes: number;\n readonly maximumSearchIndexBytes: number;\n}\n\n/**\n * Ceilings applied when an application declares none.\n *\n * The point is that ABSENCE is bounded, not that these numbers are precisely right. An\n * application which never thought about output size still gets a documentation tree that\n * cannot silently grow until a build host runs out of memory; one that genuinely outgrows\n * a ceiling raises it explicitly, and that edit is visible in review.\n *\n * Generous on purpose. A default tight enough to be \"safe\" for a small application would\n * fire on ordinary growth, and a limit that routinely fires is a limit people learn to\n * raise without reading — which is worse than no limit at all.\n */\nexport const TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS: TechnicalDocumentationOutputBudgets = Object.freeze({\n maximumPageCount: 2_000,\n maximumTotalBytes: 512 * 1024 * 1024,\n maximumSearchIndexBytes: 64 * 1024 * 1024,\n});\n\n/**\n * Sentinels every application inherits, which an application can EXTEND but never remove.\n *\n * ## Why this set is so small\n *\n * A sentinel is matched with `String.includes` against every public file, so a generic\n * marker — `secret`, `token`, `password`, `Bearer` — would fire on the very guides that\n * teach authentication, error handling and webhook signature verification. Those documents\n * legitimately contain those words. A canary that cries on correct content gets removed,\n * and then it protects nothing.\n *\n * So the mandatory set is restricted to byte sequences that **cannot legitimately appear in\n * published product documentation** under any authoring style. A PEM private-key header\n * qualifies: documentation teaches readers to *use* a public key, never to read a private\n * one, so its presence in a public tree is a leak by construction rather than by judgement.\n *\n * Application-specific canaries — a restricted-content marker, a fixture value that must\n * stay internal — belong in the application's own declared list, which is UNIONED with this\n * one. The union direction is the safety property: an application must be able to add\n * canaries and must not be able to switch these off.\n */\nexport const TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS: readonly string[] = Object.freeze([\n '-----BEGIN OPENSSH PRIVATE KEY-----',\n '-----BEGIN PGP PRIVATE KEY BLOCK-----',\n '-----BEGIN PRIVATE KEY-----',\n '-----BEGIN RSA PRIVATE KEY-----',\n]);\n\n/**\n * Resolves the effective budgets from an application's partial declaration.\n *\n * Per-field rather than all-or-nothing: an application that only needs a larger page\n * count should not have to restate — and thereby freeze a copy of — every other ceiling.\n */\nexport function resolveTechnicalDocumentationOutputBudgets(\n declared?: Partial<TechnicalDocumentationOutputBudgets>,\n): TechnicalDocumentationOutputBudgets {\n return Object.freeze({ ...TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS, ...(declared ?? {}) });\n}\n\n/**\n * Unions the mandatory sentinels with an application's declared ones.\n *\n * A union, never a replacement — see\n * {@link TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS}. Deduplicated and sorted so\n * the resolved set is a stable value: it is compared and reported, and an order that\n * varied with authoring order would make two identical policies look different.\n */\nexport function resolveTechnicalDocumentationForbiddenPublicSentinels(\n declared?: readonly string[],\n): readonly string[] {\n const sentinels = new Set<string>(TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS);\n for (const sentinel of declared ?? []) {\n const trimmed = sentinel.trim();\n // An empty sentinel is skipped by the validator anyway; dropping it here keeps the\n // resolved set honest about how many canaries are actually armed.\n if (trimmed.length > 0) sentinels.add(trimmed);\n }\n return Object.freeze([...sentinels].sort());\n}\n\nexport interface TechnicalDocumentationManagedTreeValidationReport {\n readonly pageCount: number;\n readonly totalBytes: number;\n readonly searchIndexBytes: number;\n}\n\nconst GENERATED_MARKDOWN_LINK_PATTERN = /!?\\[[^\\]]*\\]\\(([^)\\s]+)(?:\\s+[\"'][^)]*)?\\)/g;\n\n/**\n * Routes published by the API-reference pipeline rather than the guide renderer.\n *\n * API-reference links enter a guide only through the semantic OpenAPI link index,\n * which proves the requested resource, operation, request, response or schema is\n * present before the renderer receives its public URL. The managed-tree validator\n * must therefore recognize the independently published route root while continuing\n * to require every ordinary guide and static-asset target to exist in this exact\n * render manifest.\n */\nconst INDEPENDENT_API_REFERENCE_ROUTES: ReadonlySet<string> = new Set([\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.API_REFERENCE),\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE),\n]);\n\nfunction validateGeneratedMarkdownLinkClosure(input: {\n readonly sourcePath: string;\n readonly text: string;\n readonly declaredByPath: ReadonlyMap<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>;\n readonly docusaurusRoutes: ReadonlySet<string>;\n}): void {\n for (const match of input.text.matchAll(GENERATED_MARKDOWN_LINK_PATTERN)) {\n const destination = match[1];\n if (destination === undefined || destination.startsWith('#') || /^(?:https?:|mailto:)/i.test(destination)) continue;\n const pathOnly = destination.split(/[?#]/, 1)[0];\n if (pathOnly === undefined || pathOnly.length === 0) continue;\n if (pathOnly.startsWith('/')) {\n const rootRelativePath = pathOnly.slice(1);\n const docusaurusStaticPath = `docusaurus/static/${rootRelativePath}`;\n if (input.docusaurusRoutes.has(pathOnly)\n || (input.sourcePath.startsWith('docusaurus/docs/') ? input.declaredByPath.has(docusaurusStaticPath) : input.declaredByPath.has(rootRelativePath))) continue;\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n const resolvedPath = posixPath.normalize(posixPath.join(posixPath.dirname(input.sourcePath), pathOnly));\n if (resolvedPath.startsWith('../') || posixPath.isAbsolute(resolvedPath) || !input.declaredByPath.has(resolvedPath)) {\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n }\n}\n\nexport function validateTechnicalDocumentationManagedTree(input: {\n readonly manifest: unknown;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly forbiddenPublicSentinels: readonly string[];\n readonly budgets: TechnicalDocumentationOutputBudgets;\n}): TechnicalDocumentationManagedTreeValidationReport {\n const manifest: TechnicalDocumentationRenderOutputManifestV1 = TechnicalDocumentationRenderOutputManifestV1Schema.parse(input.manifest);\n /*\n * Binding is an identity comparison between two independently produced manifests, which is a\n * check with two real sides. The `renderOutputDigest` recomputation that used to follow was not:\n * it hashed this manifest and compared the result against the copy stored inside it.\n */\n const boundBundle = manifest.authorizedBundleIdentity;\n if (boundBundle.ref !== input.authorizedBundle.bundleRef || boundBundle.version !== input.authorizedBundle.bundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the authorized bundle');\n }\n const boundAssets = manifest.resolvedAssetBundleIdentity;\n if (boundAssets.ref !== input.resolvedAssetBundle.assetBundleRef || boundAssets.version !== input.resolvedAssetBundle.assetBundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the resolved asset bundle');\n }\n\n const declaredByPath = new Map<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>(\n manifest.outputs.map((output) => [output.normalizedRelativePath, output]),\n );\n const docusaurusRoutes = new Set(manifest.outputs.flatMap((output) => {\n const path = output.normalizedRelativePath as string;\n return path.startsWith('docusaurus/docs/') && path.endsWith('.mdx')\n ? [`/${path.slice('docusaurus/docs/'.length, -'.mdx'.length)}`]\n : [];\n }));\n for (const apiReferenceRoute of INDEPENDENT_API_REFERENCE_ROUTES) docusaurusRoutes.add(apiReferenceRoute);\n const filesByPath = new Map<string, TechnicalDocumentationRenderedFile>();\n for (const file of input.files) {\n if (filesByPath.has(file.normalizedRelativePath)) throw new Error(`technical-documentation managed tree duplicates path: ${file.normalizedRelativePath}`);\n filesByPath.set(file.normalizedRelativePath, file);\n }\n if (filesByPath.size !== declaredByPath.size) throw new Error('technical-documentation managed tree inventory does not match its manifest');\n\n const authorizedUnitRefs = new Set(input.authorizedBundle.units.map((unit) => unit.unitRef));\n let totalBytes = 0;\n let pageCount = 0;\n let searchIndexBytes = 0;\n for (const [path, output] of declaredByPath) {\n const file = filesByPath.get(path);\n if (file === undefined) throw new Error(`technical-documentation managed output is missing: ${path}`);\n if (file.outputRef !== output.outputRef || file.rendererRef !== output.rendererRef || file.outputKind !== output.outputKind\n || file.mediaType !== output.mediaType || [...file.sourceUnitRefs].sort().join('\\0') !== output.sourceUnitRefs.join('\\0')) {\n throw new Error(`technical-documentation managed output metadata mismatch: ${path}`);\n }\n if (file.bytes.byteLength !== output.byteLength || technicalDocumentationSha256Bytes(file.bytes) !== output.byteDigest) {\n throw new Error(`technical-documentation managed output byte identity mismatch: ${path}`);\n }\n for (const sourceUnitRef of output.sourceUnitRefs) {\n if (!authorizedUnitRefs.has(sourceUnitRef)) throw new Error(`technical-documentation output cites an unauthorized unit: ${sourceUnitRef}`);\n }\n const text = Buffer.from(file.bytes).toString('utf8');\n for (const sentinel of input.forbiddenPublicSentinels) {\n if (sentinel.length > 0 && text.includes(sentinel)) throw new Error(`technical-documentation managed public tree contains forbidden sentinel in ${path}`);\n }\n if (output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) {\n validateGeneratedMarkdownLinkClosure({ sourcePath: path, text, declaredByPath, docusaurusRoutes });\n }\n totalBytes += file.bytes.byteLength;\n if (output.outputKind === TechnicalDocumentationOutputKind.HTML_PAGE || output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) pageCount += 1;\n if (path === 'indexes/search.json') searchIndexBytes = file.bytes.byteLength;\n }\n\n /**\n * Captures are source material, not unconditional public output. An API-only\n * publication deliberately has no page renderer that can reference a\n * screenshot, so it must not publish unused product imagery. Once the\n * Docusaurus content renderer participates, every resolved asset remains a\n * required managed output as before.\n */\n if (manifest.rendererExecutions.some((execution) => execution.rendererKind === TechnicalDocumentationRendererKind.DOCUSAURUS)) {\n const resolvedAssetPaths = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => asset.normalizedRelativePath === null ? [] : [asset.normalizedRelativePath]);\n for (const path of resolvedAssetPaths) {\n /*\n * `docusaurus/static/<path>` is where the asset SHIPS — the directory the site serves. This\n * looked for the bare `<path>`, and passed only because a second renderer family published\n * every asset there as well. That family was read by nothing and was removed (#274), which\n * left the check looking for a file no renderer writes any more: the rule is \"a resolved asset\n * reaches the reader\", and the reader reaches it through the site.\n */\n const output = declaredByPath.get(`docusaurus/static/${path}`);\n if (output?.outputKind !== TechnicalDocumentationOutputKind.ASSET) {\n throw new Error(`technical-documentation resolved asset is absent from the managed output tree: ${path}`);\n }\n }\n }\n const report = { pageCount, totalBytes, searchIndexBytes };\n if (pageCount > input.budgets.maximumPageCount) throw new Error(`technical-documentation page budget exceeded: ${pageCount}`);\n if (totalBytes > input.budgets.maximumTotalBytes) throw new Error(`technical-documentation total-byte budget exceeded: ${totalBytes}`);\n if (searchIndexBytes > input.budgets.maximumSearchIndexBytes) throw new Error(`technical-documentation search-index budget exceeded: ${searchIndexBytes}`);\n return Object.freeze(report);\n}\nimport { posix as posixPath } from 'node:path';\n"]}
|
|
1
|
+
{"version":3,"file":"technical-documentation-managed-tree-validator.js","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-managed-tree-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,kDAAkD,GAInD,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,qCAAqC,EACrC,yCAAyC,GAC1C,MAAM,qCAAqC,CAAC;AAQ7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAwC,MAAM,CAAC,MAAM,CAAC;IAC/G,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IACpC,uBAAuB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;CAC1C,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kDAAkD,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjG,qCAAqC;IACrC,uCAAuC;IACvC,6BAA6B;IAC7B,iCAAiC;CAClC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,0CAA0C,CACxD,QAAuD;IAEvD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,8CAA8C,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AACnG,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qDAAqD,CACnE,QAA4B;IAE5B,MAAM,SAAS,GAAG,IAAI,GAAG,CAAS,kDAAkD,CAAC,CAAC;IACtF,KAAK,MAAM,QAAQ,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,QAAQ,CAAC,I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MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,sBAAsB,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAC7K,KAAK,MAAM,IAAI,IAAI,kBAAkB,EAAE,CAAC;YACtC;;;;;;eAMG;YACH,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;YAC/D,IAAI,MAAM,EAAE,UAAU,KAAK,gCAAgC,CAAC,KAAK,EAAE,CAAC;gBAClE,MAAM,IAAI,KAAK,CAAC,kFAAkF,IAAI,EAAE,CAAC,CAAC;YAC5G,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC3D,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,SAAS,EAAE,CAAC,CAAC;IAC9H,IAAI,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,iBAAiB;QAAE,MAAM,IAAI,KAAK,CAAC,uDAAuD,UAAU,EAAE,CAAC,CAAC;IACvI,IAAI,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,uBAAuB;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,gBAAgB,EAAE,CAAC,CAAC;IAC3J,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AACD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC","sourcesContent":["import {\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationRendererKind,\n TechnicalDocumentationRenderOutputManifestV1Schema,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport {\n technicalDocumentationSha256Bytes,\n type TechnicalDocumentationRenderedFile,\n} from './technical-documentation-render-model';\nimport {\n ApplicationConsumerDocumentationRoute,\n applicationConsumerDocumentationRoutePath,\n} from '../../openapi/api-reference-targets';\n\nexport interface TechnicalDocumentationOutputBudgets {\n readonly maximumPageCount: number;\n readonly maximumTotalBytes: number;\n readonly maximumSearchIndexBytes: number;\n}\n\n/**\n * Ceilings applied when an application declares none.\n *\n * The point is that ABSENCE is bounded, not that these numbers are precisely right. An\n * application which never thought about output size still gets a documentation tree that\n * cannot silently grow until a build host runs out of memory; one that genuinely outgrows\n * a ceiling raises it explicitly, and that edit is visible in review.\n *\n * Generous on purpose. A default tight enough to be \"safe\" for a small application would\n * fire on ordinary growth, and a limit that routinely fires is a limit people learn to\n * raise without reading — which is worse than no limit at all.\n */\nexport const TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS: TechnicalDocumentationOutputBudgets = Object.freeze({\n maximumPageCount: 2_000,\n maximumTotalBytes: 512 * 1024 * 1024,\n maximumSearchIndexBytes: 64 * 1024 * 1024,\n});\n\n/**\n * Sentinels every application inherits, which an application can EXTEND but never remove.\n *\n * ## Why this set is so small\n *\n * A sentinel is matched with `String.includes` against every public file, so a generic\n * marker — `secret`, `token`, `password`, `Bearer` — would fire on the very guides that\n * teach authentication, error handling and webhook signature verification. Those documents\n * legitimately contain those words. A canary that cries on correct content gets removed,\n * and then it protects nothing.\n *\n * So the mandatory set is restricted to byte sequences that **cannot legitimately appear in\n * published product documentation** under any authoring style. A PEM private-key header\n * qualifies: documentation teaches readers to *use* a public key, never to read a private\n * one, so its presence in a public tree is a leak by construction rather than by judgement.\n *\n * Application-specific canaries — a restricted-content marker, a fixture value that must\n * stay internal — belong in the application's own declared list, which is UNIONED with this\n * one. The union direction is the safety property: an application must be able to add\n * canaries and must not be able to switch these off.\n */\nexport const TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS: readonly string[] = Object.freeze([\n '-----BEGIN OPENSSH PRIVATE KEY-----',\n '-----BEGIN PGP PRIVATE KEY BLOCK-----',\n '-----BEGIN PRIVATE KEY-----',\n '-----BEGIN RSA PRIVATE KEY-----',\n]);\n\n/**\n * Resolves the effective budgets from an application's partial declaration.\n *\n * Per-field rather than all-or-nothing: an application that only needs a larger page\n * count should not have to restate — and thereby freeze a copy of — every other ceiling.\n */\nexport function resolveTechnicalDocumentationOutputBudgets(\n declared?: Partial<TechnicalDocumentationOutputBudgets>,\n): TechnicalDocumentationOutputBudgets {\n return Object.freeze({ ...TECHNICAL_DOCUMENTATION_DEFAULT_OUTPUT_BUDGETS, ...(declared ?? {}) });\n}\n\n/**\n * Unions the mandatory sentinels with an application's declared ones.\n *\n * A union, never a replacement — see\n * {@link TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS}. Deduplicated and sorted so\n * the resolved set is a stable value: it is compared and reported, and an order that\n * varied with authoring order would make two identical policies look different.\n */\nexport function resolveTechnicalDocumentationForbiddenPublicSentinels(\n declared?: readonly string[],\n): readonly string[] {\n const sentinels = new Set<string>(TECHNICAL_DOCUMENTATION_MANDATORY_PUBLIC_SENTINELS);\n for (const sentinel of declared ?? []) {\n const trimmed = sentinel.trim();\n // An empty sentinel is skipped by the validator anyway; dropping it here keeps the\n // resolved set honest about how many canaries are actually armed.\n if (trimmed.length > 0) sentinels.add(trimmed);\n }\n return Object.freeze([...sentinels].sort());\n}\n\nexport interface TechnicalDocumentationManagedTreeValidationReport {\n readonly pageCount: number;\n readonly totalBytes: number;\n readonly searchIndexBytes: number;\n}\n\nconst GENERATED_MARKDOWN_LINK_PATTERN = /!?\\[[^\\]]*\\]\\(([^)\\s]+)(?:\\s+[\"'][^)]*)?\\)/g;\n\n/**\n * Routes published by the API-reference pipeline rather than the guide renderer.\n *\n * API-reference links enter a guide only through the semantic OpenAPI link index,\n * which proves the requested resource, operation, request, response or schema is\n * present before the renderer receives its public URL. The managed-tree validator\n * must therefore recognize the independently published route root while continuing\n * to require every ordinary guide and static-asset target to exist in this exact\n * render manifest.\n */\nconst INDEPENDENT_API_REFERENCE_ROUTES: ReadonlySet<string> = new Set([\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.API_REFERENCE),\n applicationConsumerDocumentationRoutePath(ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE),\n]);\n\nfunction validateGeneratedMarkdownLinkClosure(input: {\n readonly sourcePath: string;\n readonly text: string;\n readonly declaredByPath: ReadonlyMap<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>;\n readonly docusaurusRoutes: ReadonlySet<string>;\n}): void {\n for (const match of input.text.matchAll(GENERATED_MARKDOWN_LINK_PATTERN)) {\n const destination = match[1];\n if (destination === undefined || destination.startsWith('#') || /^(?:https?:|mailto:)/i.test(destination)) continue;\n const pathOnly = destination.split(/[?#]/, 1)[0];\n if (pathOnly === undefined || pathOnly.length === 0) continue;\n if (pathOnly.startsWith('/')) {\n const rootRelativePath = pathOnly.slice(1);\n const docusaurusStaticPath = `docusaurus/static/${rootRelativePath}`;\n if (input.docusaurusRoutes.has(pathOnly)\n || (input.sourcePath.startsWith('docusaurus/docs/') ? input.declaredByPath.has(docusaurusStaticPath) : input.declaredByPath.has(rootRelativePath))) continue;\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n const resolvedPath = posixPath.normalize(posixPath.join(posixPath.dirname(input.sourcePath), pathOnly));\n if (resolvedPath.startsWith('../') || posixPath.isAbsolute(resolvedPath) || !input.declaredByPath.has(resolvedPath)) {\n throw new Error(`technical-documentation generated link target is absent: ${input.sourcePath} -> ${destination}`);\n }\n }\n}\n\nexport function validateTechnicalDocumentationManagedTree(input: {\n readonly manifest: unknown;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly forbiddenPublicSentinels: readonly string[];\n readonly budgets: TechnicalDocumentationOutputBudgets;\n}): TechnicalDocumentationManagedTreeValidationReport {\n const manifest: TechnicalDocumentationRenderOutputManifestV1 = TechnicalDocumentationRenderOutputManifestV1Schema.parse(input.manifest);\n /*\n * Binding is an identity comparison between two independently produced manifests, which is a\n * check with two real sides. The `renderOutputDigest` recomputation that used to follow was not:\n * it hashed this manifest and compared the result against the copy stored inside it.\n */\n const boundBundle = manifest.authorizedBundleIdentity;\n if (boundBundle.ref !== input.authorizedBundle.bundleRef || boundBundle.version !== input.authorizedBundle.bundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the authorized bundle');\n }\n const boundAssets = manifest.resolvedAssetBundleIdentity;\n if (boundAssets.ref !== input.resolvedAssetBundle.assetBundleRef || boundAssets.version !== input.resolvedAssetBundle.assetBundleVersion) {\n throw new Error('technical-documentation render manifest does not bind the resolved asset bundle');\n }\n\n const declaredByPath = new Map<string, TechnicalDocumentationRenderOutputManifestV1['outputs'][number]>(\n manifest.outputs.map((output) => [output.normalizedRelativePath, output]),\n );\n const docusaurusRoutes = new Set(manifest.outputs.flatMap((output) => {\n const path = output.normalizedRelativePath as string;\n return path.startsWith('docusaurus/docs/') && path.endsWith('.mdx')\n ? [`/${path.slice('docusaurus/docs/'.length, -'.mdx'.length)}`]\n : [];\n }));\n for (const apiReferenceRoute of INDEPENDENT_API_REFERENCE_ROUTES) docusaurusRoutes.add(apiReferenceRoute);\n const filesByPath = new Map<string, TechnicalDocumentationRenderedFile>();\n for (const file of input.files) {\n if (filesByPath.has(file.normalizedRelativePath)) throw new Error(`technical-documentation managed tree duplicates path: ${file.normalizedRelativePath}`);\n filesByPath.set(file.normalizedRelativePath, file);\n }\n if (filesByPath.size !== declaredByPath.size) throw new Error('technical-documentation managed tree inventory does not match its manifest');\n\n const authorizedUnitRefs = new Set(input.authorizedBundle.units.map((unit) => unit.unitRef));\n let totalBytes = 0;\n let pageCount = 0;\n let searchIndexBytes = 0;\n for (const [path, output] of declaredByPath) {\n const file = filesByPath.get(path);\n if (file === undefined) throw new Error(`technical-documentation managed output is missing: ${path}`);\n if (file.outputRef !== output.outputRef || file.rendererRef !== output.rendererRef || file.outputKind !== output.outputKind\n || file.mediaType !== output.mediaType || [...file.sourceUnitRefs].sort().join('\\0') !== output.sourceUnitRefs.join('\\0')) {\n throw new Error(`technical-documentation managed output metadata mismatch: ${path}`);\n }\n if (file.bytes.byteLength !== output.byteLength || technicalDocumentationSha256Bytes(file.bytes) !== output.byteDigest) {\n throw new Error(`technical-documentation managed output byte identity mismatch: ${path}`);\n }\n for (const sourceUnitRef of output.sourceUnitRefs) {\n if (!authorizedUnitRefs.has(sourceUnitRef)) throw new Error(`technical-documentation output cites an unauthorized unit: ${sourceUnitRef}`);\n }\n const text = Buffer.from(file.bytes).toString('utf8');\n for (const sentinel of input.forbiddenPublicSentinels) {\n if (sentinel.length > 0 && text.includes(sentinel)) throw new Error(`technical-documentation managed public tree contains forbidden sentinel in ${path}`);\n }\n if (output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) {\n validateGeneratedMarkdownLinkClosure({ sourcePath: path, text, declaredByPath, docusaurusRoutes });\n }\n totalBytes += file.bytes.byteLength;\n if (output.outputKind === TechnicalDocumentationOutputKind.HTML_PAGE || output.outputKind === TechnicalDocumentationOutputKind.MARKDOWN_DOCUMENT) pageCount += 1;\n if (path === 'indexes/search.json') searchIndexBytes = file.bytes.byteLength;\n }\n\n /**\n * Captures are source material, not unconditional public output. An API-only\n * publication deliberately has no page renderer that can reference a\n * screenshot, so it must not publish unused product imagery. Once the\n * Docusaurus content renderer participates, every resolved asset remains a\n * required managed output as before.\n */\n if (manifest.rendererExecutions.some((execution) => execution.rendererKind === TechnicalDocumentationRendererKind.DOCUSAURUS)) {\n const resolvedAssetPaths = input.resolvedAssetBundle.resolvedAssetSet.assets.flatMap((asset) => asset.normalizedRelativePath === null ? [] : [asset.normalizedRelativePath]);\n for (const path of resolvedAssetPaths) {\n /*\n * `docusaurus/static/<path>` is where the asset SHIPS — the directory the site serves. This\n * looked for the bare `<path>`, and passed only because a second renderer family published\n * every asset there as well. That family was read by nothing and was removed (#274), which\n * left the check looking for a file no renderer writes any more: the rule is \"a resolved asset\n * reaches the reader\", and the reader reaches it through the site.\n */\n const output = declaredByPath.get(`docusaurus/static/${path}`);\n if (output?.outputKind !== TechnicalDocumentationOutputKind.ASSET) {\n throw new Error(`technical-documentation resolved asset is absent from the managed output tree: ${path}`);\n }\n }\n }\n const report = { pageCount, totalBytes, searchIndexBytes };\n if (pageCount > input.budgets.maximumPageCount) throw new Error(`technical-documentation page budget exceeded: ${pageCount}`);\n if (totalBytes > input.budgets.maximumTotalBytes) throw new Error(`technical-documentation total-byte budget exceeded: ${totalBytes}`);\n if (searchIndexBytes > input.budgets.maximumSearchIndexBytes) throw new Error(`technical-documentation search-index budget exceeded: ${searchIndexBytes}`);\n return Object.freeze(report);\n}\nimport { posix as posixPath } from 'node:path';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-openapi-renderer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-openapi-renderer.d.ts","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-openapi-renderer.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,KAAK,oCAAoC,EAC1C,MAAM,wCAAwC,CAAC;AAIhD,wBAAgB,2CAA2C,CAAC,KAAK,EAAE;IACjE,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C,GAAG,oCAAoC,CA2CvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-render-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-render-model.d.ts","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-render-model.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,gCAAgC,EAEhC,kCAAkC,EAClC,KAAK,gDAAgD,EACrD,KAAK,4CAA4C,EACjD,KAAK,yCAAyC,EAC9C,KAAK,yCAAyC,EAC9C,KAAK,mDAAmD,EACxD,KAAK,yCAAyC,EAC9C,KAAK,4BAA4B,EAClC,MAAM,uDAAuD,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE3E;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,wBAAwB,EAAE,yCAAyC,CAAC;IAC7E,QAAQ,CAAC,OAAO,EAAE,gDAAgD,CAAC,SAAS,CAAC,CAAC;IAC9E,QAAQ,CAAC,KAAK,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,gCAAgC,CAAC;IACtD,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,SAAS,EAAE,yCAAyC,CAAC;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,kCAAkC,EAAE,CAAC;CAC/D;AAED,wBAAgB,6CAA6C,CAAC,KAAK,EAAE;IACnE,QAAQ,CAAC,YAAY,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,kGAAkG;IAClG,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC,GAAG,yCAAyC,CAa5C;AA4FD,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAoD,CAAC;AA8DxG,wBAAgB,uCAAuC,CACrD,gBAAgB,EAAE,gDAAgD,GACjE,iCAAiC,CAenC;AAED,wBAAgB,mDAAmD,CAAC,KAAK,EAAE;IACzE,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,CAAC;IAC5E,QAAQ,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAClF,QAAQ,CAAC,mBAAmB,EAAE,yCAAyC,CAAC;IACxE,QAAQ,CAAC,eAAe,EAAE,SAAS,oCAAoC,EAAE,CAAC;IAC1E,kFAAkF;IAClF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,GAAG,4CAA4C,CAsB/C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX } from '../application-documentation/technical-documentation-engine-content-bundle.js';
|
|
3
|
+
import { APPLICATION_DOCUMENTATION_CHAPTER_ROUTE_DIRECTORY, APPLICATION_DOCUMENTATION_CHAPTER_UNIT_REF_PREFIX, } from '../application-documentation/application-documentation-chapters.js';
|
|
3
4
|
import { createTechnicalDocumentationRenderOutputManifestV1, TechnicalDocumentationNormalizedRelativePathSchema, } from '@wildo-ai/saas-specifications/technical-documentation';
|
|
4
5
|
/**
|
|
5
6
|
* Names opaque emitted bytes, and detects their corruption when a reader compares this against the
|
|
@@ -124,25 +125,28 @@ export const ENGINE_UNIT_ROUTES = new Set(Object.values(ENGINE_UNIT_PATH_BY_SLUG
|
|
|
124
125
|
* it—so readers can find access, organization, security and integration
|
|
125
126
|
* material without learning Wildo vocabulary.
|
|
126
127
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
128
|
+
* Two namespaces are DERIVED rather than listed, because their units cannot be enumerated when this
|
|
129
|
+
* file is written: `unit/manages/<resource>`, the page per application resource, and
|
|
130
|
+
* `unit/guides/<slug>`, the chapters an application authors (#874). Both are RESERVED engine
|
|
131
|
+
* namespaces the projectors emit; the application supplies a subject or a slug and never a URL
|
|
132
|
+
* scheme. Any other unit — including one whose ref an application chose freely — still fails closed
|
|
133
|
+
* instead of acquiring an implicit route; that refusal is what this table is for.
|
|
131
134
|
*/
|
|
132
135
|
function pathForUnit(unit) {
|
|
133
136
|
const slug = slugForUnit(unit);
|
|
134
137
|
/*
|
|
135
|
-
*
|
|
138
|
+
* The first of TWO derived branches, both deliberately narrow.
|
|
136
139
|
*
|
|
137
140
|
* Every other route in this table is a constant, because a renderer owns audience-facing URLs
|
|
138
141
|
* and an authored page's URL is a decision somebody made. A page per application resource cannot
|
|
139
142
|
* work that way — the resources are not known when this file is written — so its route is
|
|
140
|
-
* DERIVED from the reserved `unit/manages/` namespace the projector emits.
|
|
143
|
+
* DERIVED from the reserved `unit/manages/` namespace the projector emits. The second branch,
|
|
144
|
+
* below, does the same for the reserved `unit/guides/` namespace of authored chapters (#874).
|
|
141
145
|
*
|
|
142
|
-
* What has NOT changed is the refusal
|
|
143
|
-
*
|
|
144
|
-
* routed at all. Anything outside
|
|
145
|
-
* missing decision rather than an implicit URL.
|
|
146
|
+
* What has NOT changed is the refusal at the end. A unit whose ref an application chose freely
|
|
147
|
+
* still fails closed; both derived namespaces are reserved by an engine projector, which is why
|
|
148
|
+
* their units can be routed at all. Anything outside the fixed table and these two namespaces is
|
|
149
|
+
* still a missing decision rather than an implicit URL.
|
|
146
150
|
*/
|
|
147
151
|
if (unit.unitRef.startsWith(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX)) {
|
|
148
152
|
const resourceIdentifier = unit.unitRef.slice(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX.length);
|
|
@@ -151,6 +155,18 @@ function pathForUnit(unit) {
|
|
|
151
155
|
}
|
|
152
156
|
return `${ENGINE_UNIT_PATH_BY_SLUG['what-this-application-manages']}/${resourceIdentifier}`;
|
|
153
157
|
}
|
|
158
|
+
/*
|
|
159
|
+
* The second derived branch, for authored chapters (#874). Checked BEFORE the fixed table on
|
|
160
|
+
* purpose: a chapter slug may coincide with an engine slug (`webhooks`), and the reserved prefix —
|
|
161
|
+
* not the slug — is what says whose page this is.
|
|
162
|
+
*/
|
|
163
|
+
if (unit.unitRef.startsWith(APPLICATION_DOCUMENTATION_CHAPTER_UNIT_REF_PREFIX)) {
|
|
164
|
+
const chapterSlug = unit.unitRef.slice(APPLICATION_DOCUMENTATION_CHAPTER_UNIT_REF_PREFIX.length);
|
|
165
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(chapterSlug)) {
|
|
166
|
+
throw new Error(`technical-documentation chapter unit ${unit.unitRef} has no single-segment kebab-case slug`);
|
|
167
|
+
}
|
|
168
|
+
return `${APPLICATION_DOCUMENTATION_CHAPTER_ROUTE_DIRECTORY}/${chapterSlug}`;
|
|
169
|
+
}
|
|
154
170
|
if (unit.unitRef.startsWith('technical-documentation:unit/')) {
|
|
155
171
|
const path = ENGINE_UNIT_PATH_BY_SLUG[slug];
|
|
156
172
|
if (path !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-render-model.js","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-render-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gDAAgD,EAAE,MAAM,4EAA4E,CAAC;AAE9I,OAAO,EACL,kD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AkB,EAAE;QACrI,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,kBAAkB;QAClB,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX } from '../application-documentation/technical-documentation-engine-content-bundle';\n\nimport {\n createTechnicalDocumentationRenderOutputManifestV1,\n canonicalizeTechnicalDocumentationJson,\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationNormalizedRelativePathSchema,\n TechnicalDocumentationRendererKind,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationRendererExecutionV1,\n type TechnicalDocumentationVersionedIdentityV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n type TechnicalDocumentationSupportedApiVersion,\n type TechnicalDocumentationUnitV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\n/**\n * Names opaque emitted bytes, and detects their corruption when a reader compares this against the\n * bytes it actually loaded. That two-sided check is why it survived the 2026-08-27 digest\n * demolition; its string-hashing sibling did not, because every caller of that one was recording\n * agreement between two parts of the repository rather than naming content.\n */\nexport function technicalDocumentationSha256Bytes(bytes: Uint8Array): string {\n return `sha256:${createHash('sha256').update(bytes).digest('hex')}`;\n}\n\nexport interface TechnicalDocumentationRenderModel {\n readonly authorizedBundleIdentity: TechnicalDocumentationVersionedIdentityV1;\n readonly channel: TechnicalDocumentationAuthorizedBundleManifestV1['channel'];\n readonly units: readonly TechnicalDocumentationUnitV1[];\n readonly unitPathByRef: ReadonlyMap<string, string>;\n}\n\nexport interface TechnicalDocumentationRenderedFile {\n readonly outputRef: string;\n readonly rendererRef: string;\n readonly outputKind: TechnicalDocumentationOutputKind;\n readonly sourceUnitRefs: readonly string[];\n readonly normalizedRelativePath: string;\n readonly mediaType: string;\n readonly bytes: Uint8Array;\n}\n\nexport interface TechnicalDocumentationRendererResult {\n readonly execution: TechnicalDocumentationRendererExecutionV1;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n}\n\nexport function createTechnicalDocumentationRendererExecution(input: {\n readonly rendererKind: TechnicalDocumentationRendererKind;\n readonly rendererRef: string;\n readonly rendererVersion: number;\n /** Names the renderer's configuration. `rendererRef@rendererVersion` names the implementation. */\n readonly configurationRef: string;\n}): TechnicalDocumentationRendererExecutionV1 {\n /*\n * This built two sha256 fields until 2026-08-27: one over the renderer's own function bodies\n * (`Function.prototype.toString()`), one over its configuration object. Neither was ever compared\n * to anything — they rode into the manifest beside the `rendererRef` and `rendererVersion` that\n * already say which renderer ran, in a form a reader can act on.\n */\n return {\n rendererKind: input.rendererKind,\n rendererRef: input.rendererRef,\n rendererVersion: input.rendererVersion,\n configurationRef: input.configurationRef,\n };\n}\n\nfunction slugForUnit(unit: TechnicalDocumentationUnitV1): string {\n const source = unit.unitRef.split('/').at(-1) ?? unit.unitRef;\n const slug = source.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');\n if (slug.length === 0) throw new Error(`technical-documentation unit ${unit.unitRef} cannot produce a stable path`);\n return slug;\n}\n\n/**\n * Every route the engine content module owns, keyed by unit slug. Exported as a SET so the\n * renderers can tell a gated page this application does not publish (flatten the link) from a\n * misspelled route (leave it for the managed-tree validator).\n */\nconst ENGINE_UNIT_PATH_BY_SLUG: Readonly<Record<string, string>> = {\n 'application-orientation': 'get-started',\n 'what-this-application-manages': 'what-this-application-manages',\n authentication: 'access-and-identity/overview',\n 'sign-in-and-mfa': 'access-and-identity/sign-in-and-mfa',\n 'complete-sign-in': 'access-and-identity/complete-sign-in',\n 'mfa-enrollment-and-recovery': 'access-and-identity/mfa-enrollment-and-recovery',\n 'sign-in-troubleshoot': 'access-and-identity/sign-in-troubleshoot',\n 'single-sign-on': 'access-and-identity/single-sign-on',\n 'sso-configure': 'access-and-identity/sso-configure',\n 'sso-rollout-and-recovery': 'access-and-identity/sso-rollout-and-recovery',\n 'sso-troubleshoot': 'access-and-identity/sso-troubleshoot',\n 'api-keys': 'access-and-identity/api-keys',\n 'api-keys-create-and-store': 'access-and-identity/api-keys-create-and-store',\n 'api-keys-lifecycle': 'access-and-identity/api-keys-lifecycle',\n 'api-keys-troubleshoot': 'access-and-identity/api-keys-troubleshoot',\n 'oauth-provider': 'access-and-identity/oauth-provider',\n 'oauth-register-client': 'access-and-identity/oauth-register-client',\n 'oauth-authorize-delegated-access': 'access-and-identity/oauth-authorize-delegated-access',\n 'oauth-operate-and-revoke': 'access-and-identity/oauth-operate-and-revoke',\n 'user-administration': 'user-administration',\n 'manage-users-manually': 'user-administration/manage-users-manually',\n 'invite-and-onboard-user': 'user-administration/invite-and-onboard-user',\n 'organization-roles': 'user-administration/roles-and-permissions',\n 'change-user-access': 'user-administration/change-user-access',\n 'manage-organization-units': 'user-administration/manage-organization-units',\n 'design-organization-unit-hierarchy': 'user-administration/design-organization-unit-hierarchy',\n 'assign-organization-unit-access': 'user-administration/assign-organization-unit-access',\n 'operate-organization-units': 'user-administration/operate-organization-units',\n 'suspend-or-remove-user': 'user-administration/suspend-or-remove-user',\n 'review-users-and-access': 'user-administration/review-users-and-access',\n 'troubleshoot-user-access': 'user-administration/troubleshoot-user-access',\n scim: 'user-administration/scim-provisioning',\n 'scim-protocol-and-payloads': 'user-administration/scim-protocol-and-payloads',\n 'scim-configure': 'user-administration/scim-configure',\n 'scim-microsoft-entra': 'user-administration/scim-microsoft-entra',\n 'scim-okta': 'user-administration/scim-okta',\n 'scim-ldap-and-active-directory': 'user-administration/scim-ldap-and-active-directory',\n 'scim-map-profile-and-units': 'user-administration/scim-map-profile-and-units',\n 'scim-validate-and-roll-out': 'user-administration/scim-validate-and-roll-out',\n 'scim-operate-and-troubleshoot': 'user-administration/scim-operate-and-troubleshoot',\n 'audit-and-siem': 'security-and-audit',\n 'investigate-audit-event': 'security-and-audit/investigate-event',\n 'review-privileged-and-access-changes': 'security-and-audit/review-access-changes',\n 'export-audit-records': 'security-and-audit/export-audit-records',\n 'configure-siem-export': 'security-and-audit/configure-siem',\n 'siem-splunk': 'security-and-audit/siem-splunk',\n 'siem-microsoft-sentinel': 'security-and-audit/siem-microsoft-sentinel',\n 'siem-elastic': 'security-and-audit/siem-elastic',\n 'operate-and-troubleshoot-siem-delivery': 'security-and-audit/operate-siem',\n 'respond-to-leaked-credential': 'security-and-audit/respond-to-leaked-credential',\n 'protect-and-retain-audit-evidence': 'security-and-audit/protect-evidence',\n integrations: 'integrations',\n 'automation-platforms': 'integrations/automation-platforms',\n 'connect-n8n': 'integrations/automation/n8n',\n 'connect-zapier': 'integrations/automation/zapier',\n 'connect-make': 'integrations/automation/make',\n 'ai-coding-tools': 'integrations/ai-coding-tools',\n 'connect-cursor': 'integrations/ai-tools/cursor',\n 'connect-codex': 'integrations/ai-tools/codex',\n 'connect-claude-code': 'integrations/ai-tools/claude-code',\n 'agent-interoperability': 'integrations/agents',\n 'mcp-integrations': 'integrations/mcp',\n 'a2a-integrations': 'integrations/a2a',\n 'first-request': 'integrations/create-your-own-integration',\n 'common-rest-api': 'integrations/rest-api',\n 'rest-api-conventions': 'integrations/rest/conventions',\n 'send-api-request': 'integrations/rest/send-request',\n 'work-with-api-collections': 'integrations/rest/read-collections',\n 'write-and-reconcile-api-changes': 'integrations/rest/write-and-reconcile',\n 'troubleshoot-api-request': 'integrations/rest/troubleshoot',\n webhooks: 'integrations/webhooks',\n 'configure-and-test-webhook-endpoint': 'integrations/webhooks/configure-and-test',\n 'verify-webhook-delivery': 'integrations/webhooks/verify-delivery',\n 'operate-webhook-deliveries': 'integrations/webhooks/operate-deliveries',\n 'troubleshoot-webhook-deliveries': 'integrations/webhooks/troubleshoot',\n};\n\nexport const ENGINE_UNIT_ROUTES: ReadonlySet<string> = new Set(Object.values(ENGINE_UNIT_PATH_BY_SLUG));\n\n/**\n * Maps a published semantic unit to its consumer navigation home.\n *\n * This is deliberately renderer-owned rather than inferred from Markdown file\n * names: the semantic unit is the stable composition input, while a renderer\n * owns audience-facing URLs. The route table is deliberately organized by a\n * customer's product responsibility—not the internal framework that implements\n * it—so readers can find access, organization, security and integration\n * material without learning Wildo vocabulary.\n *\n * One namespace is DERIVED rather than listed — `unit/manages/<resource>`, the page per\n * application resource — because those units cannot be enumerated when this file is written. An\n * application-OWNED unit still fails closed instead of acquiring an implicit route; that refusal\n * is what this table is for, and it is untouched.\n */\nfunction pathForUnit(unit: TechnicalDocumentationUnitV1): string {\n const slug = slugForUnit(unit);\n /*\n * ONE derived branch, and it is deliberately narrow.\n *\n * Every other route in this table is a constant, because a renderer owns audience-facing URLs\n * and an authored page's URL is a decision somebody made. A page per application resource cannot\n * work that way — the resources are not known when this file is written — so its route is\n * DERIVED from the reserved `unit/manages/` namespace the projector emits.\n *\n * What has NOT changed is the refusal below. A unit an application named still fails closed; the\n * generated pages are engine units carrying an application subject, which is why they can be\n * routed at all. Anything outside both the fixed table and this one namespace is still a\n * missing decision rather than an implicit URL.\n */\n if (unit.unitRef.startsWith(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX)) {\n const resourceIdentifier = unit.unitRef.slice(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX.length);\n if (resourceIdentifier.length === 0 || resourceIdentifier.includes('/')) {\n throw new Error(`technical-documentation generated resource unit ${unit.unitRef} has no single-segment resource identifier`);\n }\n return `${ENGINE_UNIT_PATH_BY_SLUG['what-this-application-manages']}/${resourceIdentifier}`;\n }\n if (unit.unitRef.startsWith('technical-documentation:unit/')) {\n const path = ENGINE_UNIT_PATH_BY_SLUG[slug];\n if (path !== undefined) return path;\n throw new Error(`technical-documentation framework unit ${unit.unitRef} has no consumer navigation path`);\n }\n throw new Error(`technical-documentation unit ${unit.unitRef} has no consumer navigation category`);\n}\n\nexport function createTechnicalDocumentationRenderModel(\n authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1,\n): TechnicalDocumentationRenderModel {\n const unitPathByRef = new Map<string, string>();\n const occupiedPaths = new Set<string>();\n for (const unit of authorizedBundle.units) {\n const path = pathForUnit(unit);\n if (occupiedPaths.has(path)) throw new Error(`technical-documentation units collide on renderer path ${path}`);\n occupiedPaths.add(path);\n unitPathByRef.set(unit.unitRef, path);\n }\n return Object.freeze({\n authorizedBundleIdentity: Object.freeze({ ref: authorizedBundle.bundleRef, version: authorizedBundle.bundleVersion }),\n channel: authorizedBundle.channel,\n units: Object.freeze([...authorizedBundle.units]),\n unitPathByRef,\n });\n}\n\nexport function createTechnicalDocumentationAggregateRenderManifest(input: {\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly supportedApiVersion: TechnicalDocumentationSupportedApiVersion;\n readonly rendererResults: readonly TechnicalDocumentationRendererResult[];\n /** This render's own identity; the publication pointer selects a render by it. */\n readonly renderRef: string;\n readonly renderVersion: number;\n}): TechnicalDocumentationRenderOutputManifestV1 {\n const rendererExecutions = input.rendererResults.map((result) => result.execution);\n const outputs = input.rendererResults.flatMap((result) => result.files.map((file) => ({\n outputRef: file.outputRef,\n rendererRef: file.rendererRef,\n outputKind: file.outputKind,\n sourceUnitRefs: [...file.sourceUnitRefs],\n normalizedRelativePath: TechnicalDocumentationNormalizedRelativePathSchema.parse(file.normalizedRelativePath),\n mediaType: file.mediaType,\n byteLength: file.bytes.byteLength,\n byteDigest: technicalDocumentationSha256Bytes(file.bytes),\n })));\n return createTechnicalDocumentationRenderOutputManifestV1({\n schemaVersion: 1,\n renderRef: input.renderRef,\n renderVersion: input.renderVersion,\n authorizedBundleIdentity: { ref: input.authorizedBundle.bundleRef, version: input.authorizedBundle.bundleVersion },\n resolvedAssetBundleIdentity: { ref: input.resolvedAssetBundle.assetBundleRef, version: input.resolvedAssetBundle.assetBundleVersion },\n supportedApiVersion: input.supportedApiVersion,\n rendererExecutions,\n outputs,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"technical-documentation-render-model.js","sourceRoot":"","sources":["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AAG,IAAI,CAAC,cAAc,CAAC;QACxC,sBAAsB,EAAE,kDAAkD,CAAC,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC;QAC7G,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;QACjC,UAAU,EAAE,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC;KAC1D,CAAC,CAAC,CAAC,CAAC;IACL,OAAO,kDAAkD,CAAC;QACxD,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,wBAAwB,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,EAAE;QAClH,2BAA2B,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,kBAAkB,EAAE;QACrI,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,kBAAkB;QAClB,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX } from '../application-documentation/technical-documentation-engine-content-bundle';\nimport {\n APPLICATION_DOCUMENTATION_CHAPTER_ROUTE_DIRECTORY,\n APPLICATION_DOCUMENTATION_CHAPTER_UNIT_REF_PREFIX,\n} from '../application-documentation/application-documentation-chapters';\n\nimport {\n createTechnicalDocumentationRenderOutputManifestV1,\n canonicalizeTechnicalDocumentationJson,\n TechnicalDocumentationOutputKind,\n TechnicalDocumentationNormalizedRelativePathSchema,\n TechnicalDocumentationRendererKind,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationRenderOutputManifestV1,\n type TechnicalDocumentationRendererExecutionV1,\n type TechnicalDocumentationVersionedIdentityV1,\n type TechnicalDocumentationResolvedAssetBundleManifestV1,\n type TechnicalDocumentationSupportedApiVersion,\n type TechnicalDocumentationUnitV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\n/**\n * Names opaque emitted bytes, and detects their corruption when a reader compares this against the\n * bytes it actually loaded. That two-sided check is why it survived the 2026-08-27 digest\n * demolition; its string-hashing sibling did not, because every caller of that one was recording\n * agreement between two parts of the repository rather than naming content.\n */\nexport function technicalDocumentationSha256Bytes(bytes: Uint8Array): string {\n return `sha256:${createHash('sha256').update(bytes).digest('hex')}`;\n}\n\nexport interface TechnicalDocumentationRenderModel {\n readonly authorizedBundleIdentity: TechnicalDocumentationVersionedIdentityV1;\n readonly channel: TechnicalDocumentationAuthorizedBundleManifestV1['channel'];\n readonly units: readonly TechnicalDocumentationUnitV1[];\n readonly unitPathByRef: ReadonlyMap<string, string>;\n}\n\nexport interface TechnicalDocumentationRenderedFile {\n readonly outputRef: string;\n readonly rendererRef: string;\n readonly outputKind: TechnicalDocumentationOutputKind;\n readonly sourceUnitRefs: readonly string[];\n readonly normalizedRelativePath: string;\n readonly mediaType: string;\n readonly bytes: Uint8Array;\n}\n\nexport interface TechnicalDocumentationRendererResult {\n readonly execution: TechnicalDocumentationRendererExecutionV1;\n readonly files: readonly TechnicalDocumentationRenderedFile[];\n}\n\nexport function createTechnicalDocumentationRendererExecution(input: {\n readonly rendererKind: TechnicalDocumentationRendererKind;\n readonly rendererRef: string;\n readonly rendererVersion: number;\n /** Names the renderer's configuration. `rendererRef@rendererVersion` names the implementation. */\n readonly configurationRef: string;\n}): TechnicalDocumentationRendererExecutionV1 {\n /*\n * This built two sha256 fields until 2026-08-27: one over the renderer's own function bodies\n * (`Function.prototype.toString()`), one over its configuration object. Neither was ever compared\n * to anything — they rode into the manifest beside the `rendererRef` and `rendererVersion` that\n * already say which renderer ran, in a form a reader can act on.\n */\n return {\n rendererKind: input.rendererKind,\n rendererRef: input.rendererRef,\n rendererVersion: input.rendererVersion,\n configurationRef: input.configurationRef,\n };\n}\n\nfunction slugForUnit(unit: TechnicalDocumentationUnitV1): string {\n const source = unit.unitRef.split('/').at(-1) ?? unit.unitRef;\n const slug = source.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');\n if (slug.length === 0) throw new Error(`technical-documentation unit ${unit.unitRef} cannot produce a stable path`);\n return slug;\n}\n\n/**\n * Every route the engine content module owns, keyed by unit slug. Exported as a SET so the\n * renderers can tell a gated page this application does not publish (flatten the link) from a\n * misspelled route (leave it for the managed-tree validator).\n */\nconst ENGINE_UNIT_PATH_BY_SLUG: Readonly<Record<string, string>> = {\n 'application-orientation': 'get-started',\n 'what-this-application-manages': 'what-this-application-manages',\n authentication: 'access-and-identity/overview',\n 'sign-in-and-mfa': 'access-and-identity/sign-in-and-mfa',\n 'complete-sign-in': 'access-and-identity/complete-sign-in',\n 'mfa-enrollment-and-recovery': 'access-and-identity/mfa-enrollment-and-recovery',\n 'sign-in-troubleshoot': 'access-and-identity/sign-in-troubleshoot',\n 'single-sign-on': 'access-and-identity/single-sign-on',\n 'sso-configure': 'access-and-identity/sso-configure',\n 'sso-rollout-and-recovery': 'access-and-identity/sso-rollout-and-recovery',\n 'sso-troubleshoot': 'access-and-identity/sso-troubleshoot',\n 'api-keys': 'access-and-identity/api-keys',\n 'api-keys-create-and-store': 'access-and-identity/api-keys-create-and-store',\n 'api-keys-lifecycle': 'access-and-identity/api-keys-lifecycle',\n 'api-keys-troubleshoot': 'access-and-identity/api-keys-troubleshoot',\n 'oauth-provider': 'access-and-identity/oauth-provider',\n 'oauth-register-client': 'access-and-identity/oauth-register-client',\n 'oauth-authorize-delegated-access': 'access-and-identity/oauth-authorize-delegated-access',\n 'oauth-operate-and-revoke': 'access-and-identity/oauth-operate-and-revoke',\n 'user-administration': 'user-administration',\n 'manage-users-manually': 'user-administration/manage-users-manually',\n 'invite-and-onboard-user': 'user-administration/invite-and-onboard-user',\n 'organization-roles': 'user-administration/roles-and-permissions',\n 'change-user-access': 'user-administration/change-user-access',\n 'manage-organization-units': 'user-administration/manage-organization-units',\n 'design-organization-unit-hierarchy': 'user-administration/design-organization-unit-hierarchy',\n 'assign-organization-unit-access': 'user-administration/assign-organization-unit-access',\n 'operate-organization-units': 'user-administration/operate-organization-units',\n 'suspend-or-remove-user': 'user-administration/suspend-or-remove-user',\n 'review-users-and-access': 'user-administration/review-users-and-access',\n 'troubleshoot-user-access': 'user-administration/troubleshoot-user-access',\n scim: 'user-administration/scim-provisioning',\n 'scim-protocol-and-payloads': 'user-administration/scim-protocol-and-payloads',\n 'scim-configure': 'user-administration/scim-configure',\n 'scim-microsoft-entra': 'user-administration/scim-microsoft-entra',\n 'scim-okta': 'user-administration/scim-okta',\n 'scim-ldap-and-active-directory': 'user-administration/scim-ldap-and-active-directory',\n 'scim-map-profile-and-units': 'user-administration/scim-map-profile-and-units',\n 'scim-validate-and-roll-out': 'user-administration/scim-validate-and-roll-out',\n 'scim-operate-and-troubleshoot': 'user-administration/scim-operate-and-troubleshoot',\n 'audit-and-siem': 'security-and-audit',\n 'investigate-audit-event': 'security-and-audit/investigate-event',\n 'review-privileged-and-access-changes': 'security-and-audit/review-access-changes',\n 'export-audit-records': 'security-and-audit/export-audit-records',\n 'configure-siem-export': 'security-and-audit/configure-siem',\n 'siem-splunk': 'security-and-audit/siem-splunk',\n 'siem-microsoft-sentinel': 'security-and-audit/siem-microsoft-sentinel',\n 'siem-elastic': 'security-and-audit/siem-elastic',\n 'operate-and-troubleshoot-siem-delivery': 'security-and-audit/operate-siem',\n 'respond-to-leaked-credential': 'security-and-audit/respond-to-leaked-credential',\n 'protect-and-retain-audit-evidence': 'security-and-audit/protect-evidence',\n integrations: 'integrations',\n 'automation-platforms': 'integrations/automation-platforms',\n 'connect-n8n': 'integrations/automation/n8n',\n 'connect-zapier': 'integrations/automation/zapier',\n 'connect-make': 'integrations/automation/make',\n 'ai-coding-tools': 'integrations/ai-coding-tools',\n 'connect-cursor': 'integrations/ai-tools/cursor',\n 'connect-codex': 'integrations/ai-tools/codex',\n 'connect-claude-code': 'integrations/ai-tools/claude-code',\n 'agent-interoperability': 'integrations/agents',\n 'mcp-integrations': 'integrations/mcp',\n 'a2a-integrations': 'integrations/a2a',\n 'first-request': 'integrations/create-your-own-integration',\n 'common-rest-api': 'integrations/rest-api',\n 'rest-api-conventions': 'integrations/rest/conventions',\n 'send-api-request': 'integrations/rest/send-request',\n 'work-with-api-collections': 'integrations/rest/read-collections',\n 'write-and-reconcile-api-changes': 'integrations/rest/write-and-reconcile',\n 'troubleshoot-api-request': 'integrations/rest/troubleshoot',\n webhooks: 'integrations/webhooks',\n 'configure-and-test-webhook-endpoint': 'integrations/webhooks/configure-and-test',\n 'verify-webhook-delivery': 'integrations/webhooks/verify-delivery',\n 'operate-webhook-deliveries': 'integrations/webhooks/operate-deliveries',\n 'troubleshoot-webhook-deliveries': 'integrations/webhooks/troubleshoot',\n};\n\nexport const ENGINE_UNIT_ROUTES: ReadonlySet<string> = new Set(Object.values(ENGINE_UNIT_PATH_BY_SLUG));\n\n/**\n * Maps a published semantic unit to its consumer navigation home.\n *\n * This is deliberately renderer-owned rather than inferred from Markdown file\n * names: the semantic unit is the stable composition input, while a renderer\n * owns audience-facing URLs. The route table is deliberately organized by a\n * customer's product responsibility—not the internal framework that implements\n * it—so readers can find access, organization, security and integration\n * material without learning Wildo vocabulary.\n *\n * Two namespaces are DERIVED rather than listed, because their units cannot be enumerated when this\n * file is written: `unit/manages/<resource>`, the page per application resource, and\n * `unit/guides/<slug>`, the chapters an application authors (#874). Both are RESERVED engine\n * namespaces the projectors emit; the application supplies a subject or a slug and never a URL\n * scheme. Any other unit — including one whose ref an application chose freely — still fails closed\n * instead of acquiring an implicit route; that refusal is what this table is for.\n */\nfunction pathForUnit(unit: TechnicalDocumentationUnitV1): string {\n const slug = slugForUnit(unit);\n /*\n * The first of TWO derived branches, both deliberately narrow.\n *\n * Every other route in this table is a constant, because a renderer owns audience-facing URLs\n * and an authored page's URL is a decision somebody made. A page per application resource cannot\n * work that way — the resources are not known when this file is written — so its route is\n * DERIVED from the reserved `unit/manages/` namespace the projector emits. The second branch,\n * below, does the same for the reserved `unit/guides/` namespace of authored chapters (#874).\n *\n * What has NOT changed is the refusal at the end. A unit whose ref an application chose freely\n * still fails closed; both derived namespaces are reserved by an engine projector, which is why\n * their units can be routed at all. Anything outside the fixed table and these two namespaces is\n * still a missing decision rather than an implicit URL.\n */\n if (unit.unitRef.startsWith(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX)) {\n const resourceIdentifier = unit.unitRef.slice(APPLICATION_DOMAIN_RESOURCE_PAGE_UNIT_REF_PREFIX.length);\n if (resourceIdentifier.length === 0 || resourceIdentifier.includes('/')) {\n throw new Error(`technical-documentation generated resource unit ${unit.unitRef} has no single-segment resource identifier`);\n }\n return `${ENGINE_UNIT_PATH_BY_SLUG['what-this-application-manages']}/${resourceIdentifier}`;\n }\n /*\n * The second derived branch, for authored chapters (#874). Checked BEFORE the fixed table on\n * purpose: a chapter slug may coincide with an engine slug (`webhooks`), and the reserved prefix —\n * not the slug — is what says whose page this is.\n */\n if (unit.unitRef.startsWith(APPLICATION_DOCUMENTATION_CHAPTER_UNIT_REF_PREFIX)) {\n const chapterSlug = unit.unitRef.slice(APPLICATION_DOCUMENTATION_CHAPTER_UNIT_REF_PREFIX.length);\n if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(chapterSlug)) {\n throw new Error(`technical-documentation chapter unit ${unit.unitRef} has no single-segment kebab-case slug`);\n }\n return `${APPLICATION_DOCUMENTATION_CHAPTER_ROUTE_DIRECTORY}/${chapterSlug}`;\n }\n if (unit.unitRef.startsWith('technical-documentation:unit/')) {\n const path = ENGINE_UNIT_PATH_BY_SLUG[slug];\n if (path !== undefined) return path;\n throw new Error(`technical-documentation framework unit ${unit.unitRef} has no consumer navigation path`);\n }\n throw new Error(`technical-documentation unit ${unit.unitRef} has no consumer navigation category`);\n}\n\nexport function createTechnicalDocumentationRenderModel(\n authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1,\n): TechnicalDocumentationRenderModel {\n const unitPathByRef = new Map<string, string>();\n const occupiedPaths = new Set<string>();\n for (const unit of authorizedBundle.units) {\n const path = pathForUnit(unit);\n if (occupiedPaths.has(path)) throw new Error(`technical-documentation units collide on renderer path ${path}`);\n occupiedPaths.add(path);\n unitPathByRef.set(unit.unitRef, path);\n }\n return Object.freeze({\n authorizedBundleIdentity: Object.freeze({ ref: authorizedBundle.bundleRef, version: authorizedBundle.bundleVersion }),\n channel: authorizedBundle.channel,\n units: Object.freeze([...authorizedBundle.units]),\n unitPathByRef,\n });\n}\n\nexport function createTechnicalDocumentationAggregateRenderManifest(input: {\n readonly authorizedBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;\n readonly supportedApiVersion: TechnicalDocumentationSupportedApiVersion;\n readonly rendererResults: readonly TechnicalDocumentationRendererResult[];\n /** This render's own identity; the publication pointer selects a render by it. */\n readonly renderRef: string;\n readonly renderVersion: number;\n}): TechnicalDocumentationRenderOutputManifestV1 {\n const rendererExecutions = input.rendererResults.map((result) => result.execution);\n const outputs = input.rendererResults.flatMap((result) => result.files.map((file) => ({\n outputRef: file.outputRef,\n rendererRef: file.rendererRef,\n outputKind: file.outputKind,\n sourceUnitRefs: [...file.sourceUnitRefs],\n normalizedRelativePath: TechnicalDocumentationNormalizedRelativePathSchema.parse(file.normalizedRelativePath),\n mediaType: file.mediaType,\n byteLength: file.bytes.byteLength,\n byteDigest: technicalDocumentationSha256Bytes(file.bytes),\n })));\n return createTechnicalDocumentationRenderOutputManifestV1({\n schemaVersion: 1,\n renderRef: input.renderRef,\n renderVersion: input.renderVersion,\n authorizedBundleIdentity: { ref: input.authorizedBundle.bundleRef, version: input.authorizedBundle.bundleVersion },\n resolvedAssetBundleIdentity: { ref: input.resolvedAssetBundle.assetBundleRef, version: input.resolvedAssetBundle.assetBundleVersion },\n supportedApiVersion: input.supportedApiVersion,\n rendererExecutions,\n outputs,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-search-index-renderer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-search-index-renderer.d.ts","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-search-index-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,oCAAoC,EAC1C,MAAM,wCAAwC,CAAC;AAIhD;;;;;;;;;GASG;AACH,wBAAgB,yCAAyC,CAAC,KAAK,EAAE,iCAAiC,GAAG,oCAAoC,CA6BxI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-search-index-renderer.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-search-index-renderer.js","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-search-index-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAC;AAE7I,OAAO,EACL,6CAA6C,GAG9C,MAAM,wCAAwC,CAAC;AAEhD,MAAM,mBAAmB,GAAG,+CAA+C,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,UAAU,yCAAyC,CAAC,KAAwC;IAChG,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACzD,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,IAAI,EAAE,IAAI,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;KAClD,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,SAAS,EAAE,6CAA6C,CAAC;YACvD,YAAY,EAAE,kCAAkC,CAAC,QAAQ;YACzD,WAAW,EAAE,mBAAmB;YAChC,eAAe,EAAE,CAAC;YAClB,gBAAgB,EAAE,qEAAqE;SACxF,CAAC;QACF,KAAK,EAAE;YACL;gBACE,SAAS,EAAE,6CAA6C;gBACxD,WAAW,EAAE,mBAAmB;gBAChC,UAAU,EAAE,gCAAgC,CAAC,gBAAgB;gBAC7D,cAAc;gBACd,sBAAsB,EAAE,qBAAqB;gBAC7C,SAAS,EAAE,kBAAkB;gBAC7B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC;aAChG;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TechnicalDocumentationOutputKind, TechnicalDocumentationRendererKind } from '@wildo-ai/saas-specifications/technical-documentation';\n\nimport {\n createTechnicalDocumentationRendererExecution,\n type TechnicalDocumentationRenderModel,\n type TechnicalDocumentationRendererResult,\n} from './technical-documentation-render-model';\n\nconst SEARCH_RENDERER_REF = 'technical-documentation:renderer/search-index';\n\n/**\n * The ONE index the site reads: `indexes/search.json`, imported by the application's own\n * `src/pages/search.tsx`.\n *\n * A second `indexes/navigation.json` was emitted here and read by nothing — measured with a positive\n * control, so the empty result is a real absence rather than a bad probe. The site's navigation is\n * the Docusaurus sidebar, which the Docusaurus renderer emits; a second navigation index was a\n * record with no reader (#274, and `application-creation-directive.md`: if we write a record,\n * something reads it).\n */\nexport function renderTechnicalDocumentationSearchIndexes(model: TechnicalDocumentationRenderModel): TechnicalDocumentationRendererResult {\n const sourceUnitRefs = model.units.map((unit) => unit.unitRef);\n const search = model.units.map((unit) => ({\n unitRef: unit.unitRef,\n title: unit.title,\n summary: unit.summary,\n headings: unit.sections.map((section) => section.heading),\n readerAudiences: unit.readerAudiences,\n path: `/${model.unitPathByRef.get(unit.unitRef)}`,\n }));\n return {\n execution: createTechnicalDocumentationRendererExecution({\n rendererKind: TechnicalDocumentationRendererKind.MARKDOWN,\n rendererRef: SEARCH_RENDERER_REF,\n rendererVersion: 1,\n configurationRef: 'technical-documentation:renderer-configuration/search-index-json-v1',\n }),\n files: [\n {\n outputRef: 'technical-documentation:output/search-index',\n rendererRef: SEARCH_RENDERER_REF,\n outputKind: TechnicalDocumentationOutputKind.NAVIGATION_INDEX,\n sourceUnitRefs,\n normalizedRelativePath: 'indexes/search.json',\n mediaType: 'application/json',\n bytes: Buffer.from(`${JSON.stringify({ schemaVersion: 1, units: search }, null, 2)}\\n`, 'utf8'),\n },\n ],\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-asset-path.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-asset-path.d.ts","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-asset-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,+BAA+B,EAChC,MAAM,uDAAuD,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED,gGAAgG;AAChG,wBAAgB,gDAAgD,CAAC,KAAK,EAAE;IACtE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,+BAA+B,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,GAAG,MAAM,CAIT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-capture-execution-port.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-capture-execution-port.d.ts","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-capture-execution-port.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+CAA+C,EAC/C,sCAAsC,EACvC,MAAM,uDAAuD,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,4CAA4C;IAC3D,QAAQ,CAAC,OAAO,EAAE,sCAAsC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,0CAA0C;IACzD,OAAO,CAAC,OAAO,EAAE,+CAA+C,GAAG,OAAO,CAAC,4CAA4C,CAAC,CAAC;CAC1H"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-capture-execution-port.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-capture-execution-port.js","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-capture-execution-port.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n TechnicalDocumentationCaptureExecutionRequestV1,\n TechnicalDocumentationCaptureReceiptV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\n/**\n * Result returned before the application-owned publication transaction writes any byte. Keeping bytes in memory at this seam prevents the reusable capture\n * implementation from choosing an application output root or bypassing complete-tree staging.\n */\nexport interface TechnicalDocumentationCaptureExecutionResult {\n readonly receipt: TechnicalDocumentationCaptureReceiptV1;\n readonly outputBytes: Uint8Array;\n}\n\n/**\n * Production-neutral execution port implemented by the Node-only Playwright capture package.\n *\n * ## Nothing in this repository injects an implementation, and that is a DECISION\n *\n * `@wildo-ai/technical-documentation-capture` implements this port, is built, and is tested in CI —\n * and no package declares a dependency on it. Read as an orphan that is an oversight; it is not.\n *\n * - **It carries Playwright.** The companion is delivered as a dist artifact into every generated\n * application, so wiring the implementation there would put a browser download into every\n * application that never captures anything.\n * `technical-documentation-capture-dependency-closure.test.ts` pins the quarantine from the other\n * side: the package must stay absent from every engine and generated-application runtime manifest.\n * - **The port is the cheap half.** A capture needs six APPLICATION-owned bindings\n * (`TechnicalDocumentationPlaywrightCaptureBindings`): a base URL, a semantic-target path, an\n * authenticated storage state, a landmark, a font profile and an allowed-origin set. That is a\n * live stack, a provisioned tenant and a logged-in session — an environment, not an import.\n *\n * So an unavailable capture SKIPS rather than blocks: the pilot assets resolver ships a PLACEHOLDER\n * for a `PRODUCT_SCREENSHOT`/`PLAYWRIGHT_CAPTURE` request, the asset stays REQUIRED, and whether\n * provisional imagery may actually ship is decided at publication by the environment\n * (`--refuse-provisional-assets`), never here. Framework-owned figures do not depend on any of this\n * — a `DIAGRAM`/`DETERMINISTIC_RENDER` request materializes real SVG bytes with no browser at all.\n *\n * When an application does bind a capture, it constructs the implementation itself and hands it in.\n * That is the seam this interface exists for; do not \"fix\" the missing dependency by adding one.\n */\nexport interface TechnicalDocumentationCaptureExecutionPort {\n execute(request: TechnicalDocumentationCaptureExecutionRequestV1): Promise<TechnicalDocumentationCaptureExecutionResult>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-diagram-definitions.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-diagram-definitions.d.ts","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-diagram-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAML,KAAK,oCAAoC,EAC1C,MAAM,uDAAuD,CAAC;AAE/D,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,SAAS,iCAAiC,EAAE,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,iCAAiC,EAAE,CAAC;CAC9D;AAED,eAAO,MAAM,sDAAsD,EAAE,uCAYnE,CAAC;AAEH,wBAAgB,iEAAiE,IAAI,oCAAoC,CAwBxH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-diagram-definitions.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-diagram-definitions.js","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-diagram-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,sCAAsC,EACtC,+BAA+B,EAC/B,iCAAiC,EACjC,uCAAuC,EACvC,sCAAsC,GAEvC,MAAM,uDAAuD,CAAC;AAoB/D,MAAM,CAAC,MAAM,sDAAsD,GAA4C,MAAM,CAAC,MAAM,CAAC;IAC3H,UAAU,EAAE,yDAAyD;IACrE,KAAK,EAAE,gCAAgC;IACvC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE,OAAO,EAAE,6CAA6C,EAAE,KAAK,EAAE,mBAAmB,EAAE;QACtF,EAAE,OAAO,EAAE,sDAAsD,EAAE,KAAK,EAAE,iBAAiB,EAAE;QAC7F,EAAE,OAAO,EAAE,+CAA+C,EAAE,KAAK,EAAE,qBAAqB,EAAE;KAC3F,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE,WAAW,EAAE,6CAA6C,EAAE,SAAS,EAAE,sDAAsD,EAAE,KAAK,EAAE,uBAAuB,EAAE;QACjK,EAAE,WAAW,EAAE,sDAAsD,EAAE,SAAS,EAAE,+CAA+C,EAAE,KAAK,EAAE,sBAAsB,EAAE;KACnK,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,UAAU,iEAAiE;IAC/E,OAAO;QACL,QAAQ,EAAE,+DAA+D;QACzE,IAAI,EAAE,+BAA+B,CAAC,OAAO;QAC7C,MAAM,EAAE,iCAAiC,CAAC,oBAAoB;QAC9D,WAAW,EAAE,sCAAsC,CAAC,MAAM;QAC1D,YAAY,EAAE,uCAAuC,CAAC,QAAQ;QAC9D,MAAM,EAAE;YACN,KAAK,EAAE,sCAAsC,CAAC,eAAe;YAC7D,YAAY,EAAE,wDAAwD;SACvE;QACD,iBAAiB,EAAE,sCAAsC,CAAC,MAAM;QAChE,uBAAuB,EAAE,sCAAsC,CAAC,MAAM;QACtE,eAAe,EAAE,sCAAsC,CAAC,MAAM;QAC9D,yBAAyB,EAAE,uDAAuD;QAClF;;;;;WAKG;QACH,gBAAgB,EAAE,sDAAsD,CAAC,UAAU;QACnF,OAAO,EAAE,+FAA+F;KACzG,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Diagram DECLARATIONS — what a diagram IS, and the asset request that asks for one.\n *\n * Split out of `technical-documentation-diagram-materializer.ts` on 2026-09-08 to break a genuine\n * import cycle, and the split is the right shape independently of it. The materializer needs\n * `technicalDocumentationSha256Bytes` from the render model; the render model imports the engine\n * content bundle; and the content bundle now names a diagram in a unit definition it builds AT\n * MODULE LOAD (#474). That closes the loop, and the symptom was not a resolution error but\n * `createTechnicalDocumentationApplicationRequestDiagramAssetRequest is not a function` — the\n * factory evaluated as `undefined` several frames from the cause.\n *\n * So: DECLARING a diagram needs nothing but the specifications vocabulary, and MATERIALIZING one\n * needs a hash. Only the second belongs downstream of the render model.\n */\nimport {\n TechnicalDocumentationAssetAccessClass,\n TechnicalDocumentationAssetKind,\n TechnicalDocumentationAssetOrigin,\n TechnicalDocumentationAssetRequiredness,\n TechnicalDocumentationAssetRightsBasis,\n type TechnicalDocumentationAssetRequestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\n\nexport interface TechnicalDocumentationDiagramNode {\n readonly nodeRef: string;\n readonly label: string;\n}\n\nexport interface TechnicalDocumentationDiagramEdge {\n readonly fromNodeRef: string;\n readonly toNodeRef: string;\n readonly label: string;\n}\n\nexport interface TechnicalDocumentationDiagramDefinition {\n readonly diagramRef: string;\n readonly title: string;\n readonly nodes: readonly TechnicalDocumentationDiagramNode[];\n readonly edges: readonly TechnicalDocumentationDiagramEdge[];\n}\n\nexport const TECHNICAL_DOCUMENTATION_APPLICATION_REQUEST_DIAGRAM_V1: TechnicalDocumentationDiagramDefinition = Object.freeze({\n diagramRef: 'technical-documentation:diagram/application-api-request',\n title: 'From client to application API',\n nodes: Object.freeze([\n { nodeRef: 'technical-documentation:diagram-node/client', label: 'Client or service' },\n { nodeRef: 'technical-documentation:diagram-node/application-api', label: 'Application API' },\n { nodeRef: 'technical-documentation:diagram-node/resource', label: 'Documented resource' },\n ]),\n edges: Object.freeze([\n { fromNodeRef: 'technical-documentation:diagram-node/client', toNodeRef: 'technical-documentation:diagram-node/application-api', label: 'Authenticated request' },\n { fromNodeRef: 'technical-documentation:diagram-node/application-api', toNodeRef: 'technical-documentation:diagram-node/resource', label: 'Authorized operation' },\n ]),\n});\n\nexport function createTechnicalDocumentationApplicationRequestDiagramAssetRequest(): TechnicalDocumentationAssetRequestV1 {\n return {\n assetRef: 'technical-documentation:asset/application-api-request-diagram',\n kind: TechnicalDocumentationAssetKind.DIAGRAM,\n origin: TechnicalDocumentationAssetOrigin.DETERMINISTIC_RENDER,\n accessClass: TechnicalDocumentationAssetAccessClass.PUBLIC,\n requiredness: TechnicalDocumentationAssetRequiredness.REQUIRED,\n rights: {\n basis: TechnicalDocumentationAssetRightsBasis.ENGINE_AUTHORED,\n authorityRef: 'technical-documentation:rights/engine-authored-diagram',\n },\n sourceAccessClass: TechnicalDocumentationAssetAccessClass.PUBLIC,\n viewedTenantAccessClass: TechnicalDocumentationAssetAccessClass.PUBLIC,\n roleAccessClass: TechnicalDocumentationAssetAccessClass.PUBLIC,\n captureOrRenderProfileRef: 'technical-documentation:renderer/deterministic-svg-v1',\n /*\n * The definition this diagram depicts, NAMED. It was a sha256 of the definition until\n * 2026-08-27 — computed here by calling the materializer, then compared by the pilot against\n * the value the same materializer returned over the same frozen constant. A value compared\n * with itself.\n */\n semanticInputRef: TECHNICAL_DOCUMENTATION_APPLICATION_REQUEST_DIAGRAM_V1.diagramRef,\n altText: 'A client sends an authenticated request through the application API to a documented resource.',\n };\n}\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-diagram-materializer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-diagram-materializer.d.ts","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-diagram-materializer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+CAA+C,CAAC;AAE7G,cAAc,+CAA+C,CAAC;AAM9D,2HAA2H;AAC3H,wBAAgB,wCAAwC,CAAC,UAAU,EAAE,uCAAuC,GAAG;IAC7G,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;CACrC,CA+BA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-diagram-materializer.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-diagram-materializer.js","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-diagram-materializer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AAI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G,SAAS,CAAC;QACnE,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAW,CAAC;QACjD,MAAM,CAAC,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC;QAC3B,OAAO,iBAAiB,KAAK,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,0EAA0E,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,2FAA2F,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;IACpS,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACZ,MAAM,GAAG,GAAG,kDAAkD,KAAK,+BAA+B,KAAK,8DAA8D,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,6RAA6R,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,OAAO,GAAG,OAAO,UAAU,CAAC;IAC9hB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,KAAK;QACL,UAAU,EAAE,iCAAiC,CAAC,KAAK,CAAC;QACpD,SAAS,EAAE,eAAwB;KACpC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG","sourcesContent":["/**\n * Deterministic diagram MATERIALIZATION — declaration in, SVG bytes out.\n *\n * The declarations themselves live in `./technical-documentation-diagram-definitions`, which this\n * module re-exports so every existing consumer and the package barrel are unchanged. See that\n * file's header for why they were split: this one imports the render model for hashing, the render\n * model imports the engine content bundle, and the content bundle names a diagram at module load.\n */\n\nimport { technicalDocumentationSha256Bytes } from './rendering/technical-documentation-render-model';\n\nimport type { TechnicalDocumentationDiagramDefinition } from './technical-documentation-diagram-definitions';\n\nexport * from './technical-documentation-diagram-definitions';\n\nfunction escapeXml(value: string): string {\n return value.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('\"', '"').replaceAll(\"'\", ''');\n}\n\n/** A dependency-free deterministic SVG materializer; no layout engine or runtime font metrics participate in its bytes. */\nexport function materializeTechnicalDocumentationDiagram(definition: TechnicalDocumentationDiagramDefinition): {\n readonly bytes: Uint8Array;\n readonly byteDigest: string;\n readonly mediaType: 'image/svg+xml';\n} {\n if (definition.nodes.length < 2) throw new Error('technical-documentation diagram requires at least two nodes');\n const nodes = [...definition.nodes].sort((left, right) => left.nodeRef.localeCompare(right.nodeRef));\n const nodeRefs = nodes.map((node) => node.nodeRef);\n if (new Set(nodeRefs).size !== nodeRefs.length) throw new Error('technical-documentation diagram node refs must be unique');\n const nodeRefSet = new Set(nodeRefs);\n const edges = [...definition.edges].sort((left, right) => `${left.fromNodeRef}\\0${left.toNodeRef}\\0${left.label}`.localeCompare(`${right.fromNodeRef}\\0${right.toNodeRef}\\0${right.label}`));\n for (const edge of edges) {\n if (!nodeRefSet.has(edge.fromNodeRef) || !nodeRefSet.has(edge.toNodeRef)) throw new Error('technical-documentation diagram edge references an unknown node');\n }\n const width = 960;\n const nodeWidth = 180;\n const gap = (width - nodes.length * nodeWidth) / (nodes.length + 1);\n const xByRef = new Map(nodes.map((node, index) => [node.nodeRef, Math.round(gap + index * (nodeWidth + gap))]));\n const nodeSvg = nodes.map((node) => {\n const x = xByRef.get(node.nodeRef) as number;\n return `<g><rect x=\"${x}\" y=\"96\" width=\"${nodeWidth}\" height=\"72\" rx=\"12\" fill=\"#f7f8fb\" stroke=\"#263247\" stroke-width=\"2\"/><text x=\"${x + nodeWidth / 2}\" y=\"138\" text-anchor=\"middle\" font-family=\"system-ui,sans-serif\" font-size=\"16\" fill=\"#172033\">${escapeXml(node.label)}</text></g>`;\n }).join('');\n const edgeSvg = edges.map((edge, index) => {\n const fromX = (xByRef.get(edge.fromNodeRef) as number) + nodeWidth;\n const toX = xByRef.get(edge.toNodeRef) as number;\n const y = 112 + index * 14;\n return `<g><path d=\"M ${fromX} ${y} L ${toX} ${y}\" stroke=\"#54657e\" stroke-width=\"2\" marker-end=\"url(#arrow)\"/><text x=\"${Math.round((fromX + toX) / 2)}\" y=\"${y - 6}\" text-anchor=\"middle\" font-family=\"system-ui,sans-serif\" font-size=\"12\" fill=\"#34445d\">${escapeXml(edge.label)}</text></g>`;\n }).join('');\n const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${width}\" height=\"240\" viewBox=\"0 0 ${width} 240\" role=\"img\" aria-labelledby=\"title\"><title id=\"title\">${escapeXml(definition.title)}</title><defs><marker id=\"arrow\" markerWidth=\"8\" markerHeight=\"8\" refX=\"7\" refY=\"4\" orient=\"auto\"><path d=\"M0,0 L8,4 L0,8 z\" fill=\"#54657e\"/></marker></defs><text x=\"480\" y=\"42\" text-anchor=\"middle\" font-family=\"system-ui,sans-serif\" font-size=\"22\" font-weight=\"600\" fill=\"#172033\">${escapeXml(definition.title)}</text>${edgeSvg}${nodeSvg}</svg>\\n`;\n const bytes = Buffer.from(svg, 'utf8');\n return Object.freeze({\n bytes,\n byteDigest: technicalDocumentationSha256Bytes(bytes),\n mediaType: 'image/svg+xml' as const,\n });\n}\n\n/*\n * `technicalDocumentationDiagramProducerImplementationDigest()` lived here until 2026-08-27. It\n * hashed `escapeXml.toString()` and this materializer's own source text, and rode into every\n * resolved asset as `producerImplementationDigest`. Nothing compared it; the producer is named by\n * `producerRef` + `producerVersion`, which a reader can act on.\n */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-placeholder-materializer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"technical-documentation-placeholder-materializer.d.ts","sourceRoot":"","sources":["../../../../src/companion/technical-documentation-placeholder-materializer.ts"],"names":[],"mappings":"AA2BA;;;;;;;GAOG;AACH,wBAAgB,4CAA4C,CAAC,KAAK,EAAE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;CACjC,CAgCA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-to-openapi.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"zod-to-openapi.d.ts","sourceRoot":"","sources":["../../../../src/companion/zod-to-openapi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG,IAAI,CAAC;AA4GzD,eAAO,MAAM,+BAA+B,GAC1C,QAAQ,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,KACvC,2BAqDF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["../../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-tech-doc-config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"define-tech-doc-config.d.ts","sourceRoot":"","sources":["../../../../src/config/define-tech-doc-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EAClC,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,4BAA4B,GACnC,uBAAuB,CAEzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wildo-tech-doc-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
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;;;;;;;;;;;;;;;;;;;;;;OAsBG;;IAMH;;;;;;;;OAQG;;;;;;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;;;;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;kBAEH,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CA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as-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.\n *\n * There is no organizational section. `OpenApiSection` has exactly two members,\n * `API_REFERENCE` and `APPLICATION_ADMINISTRATION_API_REFERENCE`, neither of which is scoped to\n * an organization. The split is made per OPERATION, from the `consumerApiSection` the source\n * projector resolves, so a selected core resource's operations may land in either. Nothing the\n * docs site emits is auth-gated; see `docs-auth-session.schemas.ts` for why the decoded role axis\n * is not a control.\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"]}
|
|
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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AE/D;;;;OAIG;IACH,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAE3D;;;;;;;;;;;;;;;;;;;;;;OAsBG;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.\n *\n * There is no organizational section. `OpenApiSection` has exactly two members,\n * `API_REFERENCE` and `APPLICATION_ADMINISTRATION_API_REFERENCE`, neither of which is scoped to\n * an organization. The split is made per OPERATION, from the `consumerApiSection` the source\n * projector resolves, so a selected core resource's operations may land in either. Nothing the\n * docs site emits is auth-gated; see `docs-auth-session.schemas.ts` for why the decoded role axis\n * is not a control.\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"]}
|
package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-consumer-documentation-content-manifest.schemas.d.ts","sourceRoot":"","sources":["
|
|
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"}
|