@wildo-ai/dev-companion 1.1.1 → 1.1.2
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/.tsbuildinfo +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +12 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +11 -0
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +153 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +419 -41
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +25 -10
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +65 -24
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +86 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +127 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -0
- package/dist/esm/companion-api/companion-api.schemas.d.ts +59 -2
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +60 -0
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +63 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +322 -21
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/inject/models/container.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.js +11 -0
- package/dist/esm/core/inject/models/container.js.map +1 -1
- package/dist/esm/core/inject/models/service-types.d.ts +5 -0
- package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/core/inject/models/service-types.js +5 -0
- package/dist/esm/core/inject/models/service-types.js.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +81 -0
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +11 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.js +39 -0
- package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +8 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +317 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +45 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +250 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +123 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +298 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts +78 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +155 -6
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +131 -2
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +259 -9
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts +243 -0
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +417 -0
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +186 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +368 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts +101 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js +278 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +365 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js +167 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +332 -3
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +19 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +164 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +3 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +36 -23
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts +51 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +391 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -0
- package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js +5 -0
- package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +103 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js +124 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -0
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +39 -2
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js +122 -11
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts +6 -0
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.js.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts +23 -0
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.js +26 -4
- package/dist/esm/core/specifications/specification-context-factory.shared.js.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts +82 -3
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +126 -12
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +12 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +12 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +13 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.js +91 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +1 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts +38 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.js +41 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.js.map +1 -0
- package/dist/esm/i18n/index.d.ts +3 -3
- package/dist/esm/i18n/index.js +3 -3
- package/dist/esm/i18n/index.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +24 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +20 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts +31 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js +27 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts +24 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js +20 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +28 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +24 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts +138 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.js +100 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +29 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +25 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +27 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +23 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +806 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +326 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts +26 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.js +22 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/market.en.d.ts +202 -0
- package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/market.en.js +209 -0
- package/dist/esm/i18n/system_enums/market.en.js.map +1 -0
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +112 -2
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +201 -34
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +31 -3
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +48 -12
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +36 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +75 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +105 -7
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +298 -24
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +46 -3
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +95 -2
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts +9 -0
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js +13 -0
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +12 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +23 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +120 -3
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +636 -81
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts +40 -0
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js +63 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +21 -0
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js +86 -2
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +12 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +47 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
- package/package.json +17 -17
- package/dist/esm/.builder.pid +0 -9
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.d.ts +0 -36
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.d.ts.map +0 -1
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.js +0 -32
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.js.map +0 -1
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.d.ts +0 -29
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.d.ts.map +0 -1
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.js +0 -25
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-doc.companion.service.js","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-doc.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OA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AC1F,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IACE,KAAK,CAAC,oBAAoB,KAAK,SAAS;WACrC,CACD,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC;eACvC,CAAC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CACpJ,EACD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IACE,KAAK,CAAC,uBAAuB,KAAK,SAAS;WACxC,CACD,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC;eAC1C,CAAC,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAChD,aAAa,CAAC,KAAK,CAAC;mBACjB,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;mBACtC,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;mBACtC,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;mBAClC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CACrC,EACD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6DAA6D","sourcesContent":["/**\n * Companion-side orchestrator for the on-demand OpenAPI generation\n * flow declared in `saas-technical-doc.md` Step 3.\n *\n * Responsibility split (matching `MarketGenerationCompanionService`):\n *\n * - Subprocess (`'openapi-generation-input'`) — owns\n * `loadSharedModules()`, registry materialization, URL building,\n * and `z.toJSONSchema()` conversion. Returns a flat JSON-safe projection of\n * operations, organization-role semantics, explicitly unit-aware resources,\n * resource tags, error schema and diagnostics (see\n * `openapi-generation-input.behavior.ts`). Lives in the\n * subprocess because that is the only process that can load\n * the user app's `@wildo-ai/saas-models`-decorated schemas.\n *\n * - Parent (this service) — merges the subprocess projection\n * with `WildoSaasConfig` metadata it already has via the\n * companion context (`appSlug`, `appDisplayName`) and the per-service\n * `wildo.tech-doc.config.ts` (`supportedApiVersion`, `publicMarketingTitle`,\n * discovered via the unique `frontendType: TECH_DOC` service —\n * Step 7.5 refactor). It then pipes the assembled\n * `OpenApiGenerationInput` into the pure\n * `generateOpenApiDocuments(...)` from\n * `@wildo-ai/saas-technical-doc/companion`. The generator\n * handles filtering, audience splitting, and YAML emission.\n *\n * The generate route returns the in-memory `{ filename, yaml }` documents. The\n * publish route writes the same bytes into the app's managed OpenAPI directory,\n * removing canonical skipped-section files so stale API pages cannot survive.\n *\n * @wildo_source:part:start companion.technical-doc.service facet:layer:companion facet:family:technical-doc\n */\n\nimport { existsSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { inject, injectable } from 'inversify';\nimport {\n AppConfigurationService,\n ErrorBuilderBackendService,\n LoggerService,\n SAAS_SERVICE_TYPES,\n resolveFeatureGatedCoreResourceExclusions,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport { CoreResourceType, ErrorCustomMessageReference, ErrorType } from '@wildo-ai/saas-models';\nimport { AppFrontendType, loadConfig } from '@wildo-ai/platform-config-lib';\nimport {\n generateOpenApiDocuments,\n resolveTechnicalDocumentationForbiddenPublicSentinels,\n resolveTechnicalDocumentationOutputBudgets,\n OpenApiGenerationInputSchema,\n resolveApplicationOrganizationRoleDocumentation,\n type ApplicationOrganizationRoleDocumentationSource,\n type ApplicationOrganizationUnitResourceDocumentation,\n type OpenApiGenerationInput,\n type OpenApiGenerationProjectorStats,\n type OperationProjection,\n type ResourceTag,\n type TechnicalDocGenerateOpenApiResult,\n} from '@wildo-ai/saas-technical-doc/companion';\nimport {\n createApiReferenceLinkIndex,\n resolveTechnicalDocumentationApiReferenceLink,\n type WildoTechnicalDocConfig,\n} from '@wildo-ai/saas-technical-doc';\nimport { createConservedApiReferenceModel } from '@wildo-ai/saas-technical-doc/openapi-reference-model';\n\nimport { TechnicalDocumentationPilotCompanionService } from './technical-documentation-pilot.companion.service';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n type TechnicalDocumentationApplicationDerivationCompanionService,\n type TechnicalDocumentationApplicationDerivationResult,\n} from './technical-documentation-application-derivation.companion.service';\nimport type {\n TechnicalDocumentationEnvironmentIdentityInput,\n} from './technical-documentation-environment-identity.companion.service';\nimport { getCompanionConfiguredPrimaryLanguage } from '../../core/config/primary-language.companion.utils';\nimport { readPerUnitLabels, resolvePerUnitFilePath } from '../../i18n-labelling/utils/per-unit-file.utils';\nimport { ROLE_LABELLING_UNIT_FILE_PATH_HINT } from '../../i18n-labelling/utils/role-lifecycle-keys.utils';\n\n/**\n * The diagnostics result is owned by the engine contract. The local companion\n * re-exports it only for its in-memory inspection route; managed publication\n * has its own pointer/fact result and never writes this diagnostic shape.\n */\nexport type {\n TechnicalDocGenerateOpenApiResult,\n};\n\n/**\n * Conventional file name for the per-service technical-documentation\n * configuration (Step 7.5 refactor — `saas-technical-doc.md`). Authored\n * at the docs service root next to `package.json` / `docusaurus.config.ts`.\n *\n * Discovery is \"by convention, not by configuration\":\n *\n * - The companion locates this file by walking the `services` entry\n * whose `frontendType === TECH_DOC` and joining `<saasRoot>/<service.path>/`.\n * The saas-config schema's `superRefine` already enforces \"at most\n * one TECH_DOC service per app\", so the lookup is deterministic.\n *\n * - File presence is the enable signal — there is NO `enabled` field\n * on `WildoTechnicalDocConfigSchema`. A TECH_DOC service without\n * this file is treated as a misconfiguration and the loader fails\n * closed (rather than silently shipping a docs site with no\n * OpenAPI metadata).\n */\nconst PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME = 'wildo.tech-doc.config.ts';\n\n/**\n * Subprocess wire shape — kept as a structural type rather than an imported\n * symbol because the source declaration lives inside the introspection-\n * subprocess module which intentionally is NOT exported from `src/index.ts`\n * (subprocess code must not load in the parent process).\n *\n * The `stats` field reuses {@link OpenApiGenerationProjectorStats} from the\n * engine package so the projector subprocess and the companion-side result\n * cannot drift on the diagnostic counts they exchange (H-C fix-up).\n */\ninterface OpenApiGenerationInputSubprocessOutput {\n operations: OperationProjection[];\n /** Source-derived application activation facts; independent from the API-reference selection. */\n readonly hasConfiguredMcpToolOperations: boolean;\n readonly hasConfiguredA2aSkills: boolean;\n /**\n * Source-derived role semantics cross the subprocess boundary unchanged.\n * The parent then joins the application's primary-locale labels before a\n * consumer-documentation fact is derived; labels are intentionally not\n * fabricated by the registry projector.\n */\n readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentationSource[];\n /** Exact resources selected by the application's unit-narrowing startup declaration. */\n readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];\n /** Canonical framework HTTP error envelope, JSON-safe across the subprocess boundary. */\n errorResponseSchema: unknown;\n /**\n * Per-resource OpenAPI tag descriptors (the resource's business purpose),\n * merged into {@link OpenApiGenerationInput.resourceTags}. Mirrors the\n * projector's wire shape; see `openapi-generation-input.behavior.ts`.\n */\n resourceTags: ResourceTag[];\n stats: OpenApiGenerationProjectorStats;\n}\n\n@injectable()\nexport class TechnicalDocCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService)\n private readonly appConfigService: AppConfigurationService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService)\n private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocumentationApplicationDerivationService)\n private readonly applicationDerivationService: TechnicalDocumentationApplicationDerivationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('TechnicalDocCompanionService');\n this.logger.setDebugTypeLogging('TechnicalDocCompanionService', true);\n }\n\n\n /**\n * Produces one framework private derivation, including the resolved\n * organization-role inventory, and its public pre-render bundle.\n * The caller selects the environment backend service; the companion resolves\n * the environment identity and source-derived operation-exposure evidence.\n * It does not read accepted application-family state or select application\n * documentation. The role inventory is a narrow configuration projection,\n * not an application-authored use-case selection.\n */\n public async deriveApplicationDocumentationBundles(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<TechnicalDocumentationApplicationDerivationResult> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n return this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: subprocessOutput.operations,\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n });\n }\n\n /**\n * Publishes the complete managed documentation tree at stable generated paths.\n * This operation synchronizes the framework-owned consumer documentation into\n * `src/generated/consumer-documentation/**`. The directory is generator-owned;\n * Git provides history and rollback.\n *\n * **No capture.** Screenshots resolve to `PLACEHOLDER` (framework-materialized bytes), so\n * publication needs no browser, no provisioned tenant and no live stack. That was the\n * decision that collapsed this from a multi-precondition chain to one call: pictures are\n * a pre-production refinement, and `refuseProvisionalAssets` is how a production\n * environment declares it will not ship without them.\n *\n * Docusaurus runtime/build measurement happens against the generated publication after it\n * exists. Measuring the previous site before publication and applying that observation to\n * a different candidate made first cutover circular and, in practice, let the retired\n * 981-page OpenAPI site block publication of the much smaller generated tree.\n */\n public async publishManagedDocumentation(\n input: TechnicalDocumentationEnvironmentIdentityInput & { readonly refuseProvisionalAssets?: boolean },\n ) {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const generated = await this.generateVerifiedApplicationOpenApiDocuments(input);\n for (const section of generated.documents.sections) {\n createConservedApiReferenceModel(section);\n }\n const apiReferenceLinkIndex = createApiReferenceLinkIndex(generated.documents.sections);\n const publisher = new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot);\n await publisher.publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${this.companionContext.saasConfig.slug}`],\n });\n\n return publisher.generateValidateAndPublish({\n derivation: generated.derivation,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n forbiddenPublicSentinels: resolveTechnicalDocumentationForbiddenPublicSentinels(\n technicalDocConfig.forbiddenPublicSentinels,\n ),\n budgets: resolveTechnicalDocumentationOutputBudgets(technicalDocConfig.outputBudgets),\n resolveApiReferenceTarget: (target) => resolveTechnicalDocumentationApiReferenceLink(apiReferenceLinkIndex, target),\n ...(input.refuseProvisionalAssets === undefined\n ? {}\n : { refuseProvisionalAssets: input.refuseProvisionalAssets }),\n });\n }\n\n /**\n * Generates the complete API reference from the resolved application and\n * enabled framework resource catalog.\n *\n * Narrative documentation intentionally selects a small set of source-backed\n * customer journeys. It must not become an allow-list for API operations:\n * doing so hid every framework resource and every application resource other\n * than the one chosen for the current use-case page. The OpenAPI generator\n * already applies the API-call and API-key exposure filters to this complete\n * resolved catalog; the derivation remains part of publication for consumer\n * content and evidence, but does not truncate the API contract.\n */\n public async generateVerifiedApplicationOpenApiDocuments(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<{\n readonly derivation: TechnicalDocumentationApplicationDerivationResult;\n readonly documents: ReturnType<typeof generateOpenApiDocuments>;\n readonly sourceStats: OpenApiGenerationProjectorStats;\n readonly authorizedOperationCount: number;\n }> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n const derivation = await this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: subprocessOutput.operations,\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n });\n const generationInput = this.assembleGenerationInput(subprocessOutput, technicalDocConfig);\n\n return Object.freeze({\n derivation,\n documents: generateOpenApiDocuments(generationInput),\n sourceStats: subprocessOutput.stats,\n authorizedOperationCount: subprocessOutput.operations.length,\n });\n }\n\n /**\n * Generate the Application + Organization OpenAPI YAML\n * documents for the currently-loaded SaaS app. Returns the\n * pure-function generator output unchanged so the controller\n * can pass it straight through as JSON.\n *\n * The method does NOT short-circuit on a \"disabled docs site\" —\n * after the Step 7.5 refactor there is no `enabled` flag anywhere\n * (file presence under a TECH_DOC service IS the enable signal).\n * If the docs service or its `wildo.tech-doc.config.ts` is missing,\n * {@link loadTechnicalDocConfig} fails closed with a CONFIGURATION\n * error before generation runs.\n */\n public async generateOpenApiDocuments(): Promise<TechnicalDocGenerateOpenApiResult> {\n this.logDebug('technical-doc generate-openapi — start', {\n appSlug: this.companionContext.saasConfig.slug,\n });\n\n // Load the per-service config BEFORE the subprocess call: its\n // `apiDocResources` opt-in is threaded into the projector so the subprocess\n // also documents the named core (engine) resources.\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const generationInput = this.assembleGenerationInput(subprocessOutput, technicalDocConfig);\n const documents = generateOpenApiDocuments(generationInput);\n\n this.logDebug('technical-doc generate-openapi — success', {\n appSlug: generationInput.appSlug,\n sectionCount: documents.sections.length,\n resourceCount: subprocessOutput.stats.resourceCount,\n consideredOperationCount: subprocessOutput.stats.consideredOperationCount,\n projectedRowCount: subprocessOutput.stats.projectedRowCount,\n });\n\n return {\n documents,\n stats: subprocessOutput.stats,\n metadata: {\n appSlug: generationInput.appSlug,\n appDisplayName: generationInput.appDisplayName,\n ...(generationInput.publicMarketingTitle !== undefined\n ? { publicMarketingTitle: generationInput.publicMarketingTitle }\n : {}),\n supportedApiVersion: generationInput.supportedApiVersion,\n },\n };\n }\n\n /**\n * Materializes the two generated OpenAPI serializations at stable paths for\n * the docs application. This is companion-owned generation; Docusaurus reads\n * the resulting files and never regenerates or edits them.\n */\n public async publishOpenApiReference(): Promise<{ readonly rootPath: string; readonly outputPaths: readonly string[] }> {\n const generated = await this.generateOpenApiDocuments();\n return new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot).publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${generated.metadata.appSlug}`],\n });\n }\n\n /**\n * Call the `'openapi-generation-input'` introspection behavior\n * on any backend service (the projector behavior routes to\n * `library` which every backend service declares — same picker\n * pattern as `MarketGenerationCompanionService.pickMarketCarrierServiceKey`\n * and `getResourcesRegistry`'s carrier picker).\n *\n * Validates the subprocess wire format defensively: a structural\n * mismatch here would otherwise surface as a confusing Zod parse\n * failure deeper in the generator.\n */\n private async callSubprocessProjector(\n apiDocResources?: WildoTechnicalDocConfig['apiDocResources'],\n excludedCoreResourceTypes?: readonly string[],\n ): Promise<OpenApiGenerationInputSubprocessOutput> {\n const input = {\n ...(apiDocResources !== undefined ? { apiDocResources } : {}),\n ...(excludedCoreResourceTypes !== undefined ? { excludedCoreResourceTypes } : {}),\n };\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickProjectorCarrierServiceKey(),\n behavior: 'openapi-generation-input',\n // Thread both the authored core-resource selection and the canonical\n // runtime feature exclusions across the JSON-safe subprocess boundary.\n ...(Object.keys(input).length > 0 ? { input } : {}),\n });\n\n if (introspection.success === false) {\n const failure = introspection;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: failure.error.message,\n serviceKey: failure.serviceKey,\n behavior: failure.behavior,\n targetId: failure.targetId,\n },\n });\n }\n\n const data: unknown = introspection.data;\n if (\n !isPlainObject(data)\n || !Array.isArray(data.operations)\n || typeof data.hasConfiguredMcpToolOperations !== 'boolean'\n || typeof data.hasConfiguredA2aSkills !== 'boolean'\n || !isPlainObject(data.errorResponseSchema)\n || !Array.isArray(data.resourceTags)\n || !Array.isArray(data.organizationRoles)\n || !Array.isArray(data.organizationUnitAwareResources)\n || !isOpenApiGenerationProjectorStats(data.stats)\n ) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'openapi-generation-input subprocess returned a malformed payload — expected '\n + '`{ operations: OperationProjection[], hasConfiguredMcpToolOperations: boolean, hasConfiguredA2aSkills: boolean, organizationRoles: OrganizationRole[], organizationUnitAwareResources: OrganizationUnitAwareResource[], errorResponseSchema: object, resourceTags: ResourceTag[], stats: { ... } }`.',\n },\n });\n }\n const output = data as unknown as OpenApiGenerationInputSubprocessOutput;\n assertResolvedHttpOperationProjectionConservation(output);\n return output;\n }\n\n /**\n * Compose the subprocess projection with the\n * `WildoSaasConfig`-derived metadata the parent process owns +\n * the per-service `wildo.tech-doc.config.ts` block (Step 7.5\n * refactor — `saas-technical-doc.md`).\n *\n * The `publicMarketingTitle` projected into `openapi.info.title`\n * comes from the per-service config (NOT from\n * `WildoSaasConfig.technicalDoc?.publicMarketingTitle` — that root-\n * level field was removed in Step 7.5 in favor of co-locating the\n * tech-doc-specific config with the engine package that owns it).\n *\n * Re-parses the result through `OpenApiGenerationInputSchema`\n * so the generator only ever sees a fully-validated payload —\n * if a future field is added to the schema, this assembly step\n * must be updated in the same commit and the Zod parse will\n * fail fast otherwise.\n */\n private assembleGenerationInput(\n subprocessOutput: OpenApiGenerationInputSubprocessOutput,\n technicalDocConfig: WildoTechnicalDocConfig,\n ): OpenApiGenerationInput {\n const saasConfig = this.companionContext.saasConfig;\n const candidateInput: OpenApiGenerationInput = {\n appSlug: saasConfig.slug,\n appDisplayName: saasConfig.displayName,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n ...(technicalDocConfig.publicMarketingTitle\n ? { publicMarketingTitle: technicalDocConfig.publicMarketingTitle }\n : {}),\n operations: subprocessOutput.operations,\n errorResponseSchema: subprocessOutput.errorResponseSchema,\n ...(subprocessOutput.resourceTags && subprocessOutput.resourceTags.length > 0\n ? { resourceTags: applyApiReferenceResourceCategories(subprocessOutput.resourceTags, technicalDocConfig.apiReferenceResourceCategories) }\n : {}),\n // App-enriched OpenAPI `servers` (deployment base URLs). The framework\n // emits the security SCHEMES automatically (they are universal), but the\n // server URLs are app/environment knowledge → authored on the tech-doc\n // config and threaded straight through.\n ...(technicalDocConfig.apiServers && technicalDocConfig.apiServers.length > 0\n ? { servers: technicalDocConfig.apiServers }\n : {}),\n // App-authored landing-page intro; the generator prepends it to the\n // framework-universal API-conventions block to form `info.description`.\n ...(technicalDocConfig.apiOverview\n ? { apiOverview: technicalDocConfig.apiOverview }\n : {}),\n };\n\n const parsed = OpenApiGenerationInputSchema.safeParse(candidateInput);\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'Failed to assemble OpenApiGenerationInput — schema validation rejected the '\n + 'merged subprocess + saas-config payload. This usually means the subprocess produced '\n + 'an OperationProjection that fails the strict OperationProjectionSchema (e.g. an '\n + 'API_CALL_WITH_CALLBACK row missing `callbackPath`).',\n issues: parsed.error.issues,\n },\n });\n }\n return parsed.data;\n }\n\n /**\n * Load the per-service `wildo.tech-doc.config.ts` for the\n * (unique) `frontendType: TECH_DOC` service declared in\n * `wildo.saas.config.ts`.\n *\n * Discovery contract (Step 7.5 refactor — `saas-technical-doc.md`):\n *\n * - The TECH_DOC service is identified by `frontendType === TECH_DOC`,\n * NOT by service key. This decouples the companion from any\n * convention like `services.docs` — apps may name the service\n * anything (e.g. `'apiDocs'`, `'developerPortal'`).\n *\n * - The saas-config schema's `superRefine` enforces \"at most one\n * TECH_DOC service per app\", so the lookup either finds exactly\n * one match or zero. Two matches cannot reach this code.\n *\n * - File presence IS the enable signal. A TECH_DOC service without\n * `wildo.tech-doc.config.ts` is a misconfiguration we surface\n * immediately (CONFIGURATION error) rather than letting the OpenAPI\n * generator silently emit a docs-site-incompatible payload.\n *\n * - The Zod validation that rejects unknown keys / malformed values\n * runs inside `defineTechnicalDocConfig` (which the per-service\n * config file invokes via `export default defineTechnicalDocConfig({...})`).\n * `loadConfig` evaluates the file via jiti, so by the time it\n * returns we have an already-parsed `WildoTechnicalDocConfig`.\n *\n * - The config is evaluated for every derivation or publication request.\n * It is an application-owned input outside the companion package's\n * TypeScript watch graph, so a process-lifetime cache would make a valid\n * taxonomy, server or overview edit invisible until an unrelated restart.\n * Publication is infrequent and config loading is tiny beside the source\n * projection, making freshness the correct trade-off.\n *\n * - The `csp?` `@unimplemented` warning fires in the same evaluation\n * pass (also inside `defineTechnicalDocConfig`) — this loader does\n * not need to re-check authored fields.\n *\n * @throws CONFIGURATION error if no TECH_DOC service is declared OR if\n * the per-service config file is missing.\n */\n private async loadTechnicalDocConfig(): Promise<WildoTechnicalDocConfig> {\n const techDocServiceEntry = Object.entries(this.companionContext.saasConfig.services)\n .find(([, service]) => service.frontendType === AppFrontendType.TECH_DOC);\n\n if (!techDocServiceEntry) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'No frontend service with `frontendType: TECH_DOC` is declared in '\n + 'wildo.saas.config.ts. The technical-documentation companion routes '\n + '(diagnostic OpenAPI generation / managed publication) require an authored TECH_DOC service '\n + 'because that service folder owns the per-service '\n + '`wildo.tech-doc.config.ts` (publicMarketingTitle, API projection metadata, csp). '\n + 'Add a TECH_DOC service in wildo.saas.config.ts and ship the per-service '\n + 'config file under it.',\n },\n });\n }\n\n const [techDocServiceKey, techDocService] = techDocServiceEntry;\n const techDocConfigPath = path.resolve(\n this.companionContext.saasRoot,\n techDocService.path,\n PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME,\n );\n\n if (!existsSync(techDocConfigPath)) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `TECH_DOC service '${techDocServiceKey}' is declared in wildo.saas.config.ts `\n + `but the required per-service config file '${PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME}' `\n + `is missing under '${techDocService.path}/'. File presence IS the enable signal `\n + '(the retired `technicalDoc.enabled` setting was replaced by file '\n + 'presence). Create the file with '\n + '`export default defineTechnicalDocConfig({ ... })` from '\n + '`@wildo-ai/saas-technical-doc`.',\n expectedPath: techDocConfigPath,\n },\n });\n }\n\n let loaded: WildoTechnicalDocConfig;\n try {\n loaded = await loadConfig<WildoTechnicalDocConfig>(techDocConfigPath);\n } catch (e) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Failed to load per-service technical-documentation config at ${techDocConfigPath}. `\n + 'The file MUST do `export default defineTechnicalDocConfig({...})` and pass '\n + 'WildoTechnicalDocConfigSchema (`z.strictObject` — unknown keys reject).',\n cause: describeCaughtError(e),\n },\n });\n }\n\n return loaded;\n }\n\n /**\n * Join source-derived role semantics to the exact primary-language labels\n * used by this application. The labels are not decoration: administrators\n * must see the same role names and descriptions in documentation and in the\n * member-management interface, so an incomplete label unit blocks\n * publication instead of falling back to a prettified role token.\n */\n private async resolveApplicationOrganizationRoles(\n backendServiceKey: string,\n roles: readonly ApplicationOrganizationRoleDocumentationSource[],\n ) {\n const backendService = this.companionContext.servicesByKey[backendServiceKey];\n if (backendService === undefined || backendService.frontendType !== undefined) {\n throw new Error(`technical-documentation role labels require a declared backend service key: ${backendServiceKey}`);\n }\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const i18nRoot = path.resolve(this.companionContext.saasRoot, backendService.path, 'src/engine/i18n');\n const roleLabelsPath = resolvePerUnitFilePath({\n i18nRoot,\n unit: { filePathHint: ROLE_LABELLING_UNIT_FILE_PATH_HINT },\n localeCode: primaryLocale,\n });\n const primaryLocaleLabels = await readPerUnitLabels(roleLabelsPath);\n return resolveApplicationOrganizationRoleDocumentation(roles, primaryLocaleLabels);\n }\n\n /**\n * Pick the first declared backend service key. Same picker\n * pattern as the existing companion services that route to\n * subprocess behaviors on the `library` target — every backend\n * declares the shared library, so any backend service is a\n * valid carrier.\n */\n private pickProjectorCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the openapi-generation-input '\n + 'introspection behavior. The behavior routes to the `library` target which every '\n + 'backend service declares — but the companion context has none.',\n },\n });\n }\n return backendServiceKey;\n }\n\n private pickFrontendApplicationServiceKey(): string {\n const frontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!frontendServiceKey) throw new Error('technical-documentation frontend runtime evidence requires one SAAS_APP service');\n return frontendServiceKey;\n }\n}\n\n/**\n * Attaches the documentation config's explicit API taxonomy to the resolved\n * resource tags before OpenAPI generation.\n *\n * The operation subprocess owns the resolved resource inventory and\n * specification facts; the TECH_DOC config owns an application's editorial\n * navigation taxonomy. Joining them here keeps both truths in their proper\n * owners, then makes the OpenAPI document the sole transport to the browser.\n * Once an application elects to declare categories, an exact inventory join is\n * required: an uncategorised new resource or a stale config name must stop\n * publication instead of quietly producing a misleading partial navigation.\n */\nexport function applyApiReferenceResourceCategories(\n resourceTags: readonly ResourceTag[],\n categories: WildoTechnicalDocConfig['apiReferenceResourceCategories'],\n): ResourceTag[] {\n if (categories === undefined) return [...resourceTags];\n const tagsByName = new Map(resourceTags.map((tag) => [tag.name, tag]));\n if (tagsByName.size !== resourceTags.length) throw new Error('OpenAPI resource tags must be unique before category assignment');\n\n const categoryByResourceName = new Map<string, WildoTechnicalDocConfig['apiReferenceResourceCategories'][number]>();\n const categoryIds = new Set<string>();\n const unavailableResourceNames: string[] = [];\n for (const category of categories) {\n if (categoryIds.has(category.id)) throw new Error(`API-reference category '${category.id}' is declared more than once`);\n categoryIds.add(category.id);\n for (const resourceName of category.resourceNames) {\n if (!tagsByName.has(resourceName)) {\n unavailableResourceNames.push(`${category.id}:${resourceName}`);\n continue;\n }\n const prior = categoryByResourceName.get(resourceName);\n if (prior !== undefined) throw new Error(`API-reference resource '${resourceName}' is assigned to both '${prior.id}' and '${category.id}'`);\n categoryByResourceName.set(resourceName, category);\n }\n }\n if (unavailableResourceNames.length > 0) {\n throw new Error(`API-reference categories name unavailable resources: ${unavailableResourceNames.sort().join(', ')}`);\n }\n const unassignedResourceNames = [...tagsByName.keys()].filter((resourceName) => !categoryByResourceName.has(resourceName)).sort();\n if (unassignedResourceNames.length > 0) {\n throw new Error(`API-reference resources have no configured category: ${unassignedResourceNames.join(', ')}`);\n }\n return resourceTags.map((tag) => {\n const category = categoryByResourceName.get(tag.name)!;\n return {\n ...tag,\n category: {\n id: category.id,\n label: category.label,\n ...(category.description === undefined ? {} : { description: category.description }),\n },\n };\n });\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonNegativeInteger(value: unknown): value is number {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0;\n}\n\n/**\n * Verifies the cross-process conservation boundary before the generator sees\n * the payload. The subprocess records the resolved HTTP inventory before\n * flattening it; this parent-side join prevents a future projector filter,\n * collapse or mapper change from merely adjusting a count while dropping the\n * operation that the count represented.\n */\nfunction assertResolvedHttpOperationProjectionConservation(output: OpenApiGenerationInputSubprocessOutput): void {\n const key = (entry: {\n readonly identity: {\n readonly contractVersion: number;\n readonly resourceRef: string;\n readonly operationFamilyRef: string;\n readonly operationVariantRef: string;\n readonly variantType: string;\n readonly httpVerb: string;\n readonly path: string;\n };\n readonly section: string;\n readonly roles: readonly string[];\n }): string => JSON.stringify([\n entry.identity.contractVersion,\n entry.identity.resourceRef,\n entry.identity.operationFamilyRef,\n entry.identity.operationVariantRef,\n entry.identity.variantType,\n entry.identity.httpVerb,\n entry.identity.path,\n entry.section,\n entry.roles,\n ]);\n const source = new Set(output.stats.resolvedExternalHttpOperations.map(key));\n const projections = new Set(output.operations.map((operation) => key({\n identity: operation.identity,\n section: operation.consumerApiSection,\n roles: operation.roles,\n })));\n if (\n source.size !== output.stats.resolvedExternalHttpOperations.length\n || projections.size !== output.operations.length\n || source.size !== projections.size\n || [...source].some((entry) => !projections.has(entry))\n ) {\n throw new Error('openapi-generation-input subprocess violated resolved HTTP operation → projection conservation');\n }\n}\n\n/** Validate the complete diagnostics object received from the subprocess. */\nfunction isOpenApiGenerationProjectorStats(value: unknown): value is OpenApiGenerationProjectorStats {\n if (!isPlainObject(value)) return false;\n if (\n !isNonNegativeInteger(value.resourceCount)\n || !isNonNegativeInteger(value.consideredOperationCount)\n || !isNonNegativeInteger(value.projectedRowCount)\n || !Array.isArray(value.resolvedExternalHttpOperations)\n || !isNonNegativeInteger(value.skippedOperationWithoutInitiatorInfosCount)\n || !Array.isArray(value.skippedOperationsWithoutInitiatorInfos)\n ) {\n return false;\n }\n\n if (\n value.resolvedExternalHttpOperations.length !== value.projectedRowCount\n || !value.resolvedExternalHttpOperations.every((entry) =>\n isPlainObject(entry)\n && isPlainObject(entry.identity)\n && typeof entry.section === 'string'\n && Array.isArray(entry.roles)\n && entry.roles.every((role) => typeof role === 'string'))\n ) {\n return false;\n }\n\n if (\n value.excludedCoreResources !== undefined\n && (\n !Array.isArray(value.excludedCoreResources)\n || !value.excludedCoreResources.every((entry) =>\n typeof entry === 'string' && Object.values(CoreResourceType).includes(entry as CoreResourceType))\n )\n ) {\n return false;\n }\n if (!value.skippedOperationsWithoutInitiatorInfos.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceIdentifier === 'string'\n && typeof entry.operationIdentifier === 'string'\n && typeof entry.variantType === 'string'\n && (entry.variantKey === undefined || typeof entry.variantKey === 'string')\n && (entry.isOperationDefault === undefined || typeof entry.isOperationDefault === 'boolean')\n && (entry.isBulkOperation === undefined || typeof entry.isBulkOperation === 'boolean'))) {\n return false;\n }\n if (\n value.skippedCoreResources !== undefined\n && (\n !Array.isArray(value.skippedCoreResources)\n || !value.skippedCoreResources.every((entry) => isPlainObject(entry) && typeof entry.resourceType === 'string' && typeof entry.reason === 'string')\n )\n ) {\n return false;\n }\n if (\n value.collapsedCoreOperations !== undefined\n && (\n !Array.isArray(value.collapsedCoreOperations)\n || !value.collapsedCoreOperations.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceType === 'string'\n && typeof entry.operationKey === 'string'\n && typeof entry.httpVerb === 'string'\n && typeof entry.path === 'string')\n )\n ) {\n return false;\n }\n\n return true;\n}\n\n/** @wildo_source:part:end companion.technical-doc.service */\n"]}
|
|
1
|
+
{"version":3,"file":"technical-doc.companion.service.js","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-doc.companion.service.ts"],"names":[],"mappings":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,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CACpJ,EACD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IACE,KAAK,CAAC,uBAAuB,KAAK,SAAS;WACxC,CACD,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC;eAC1C,CAAC,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAChD,aAAa,CAAC,KAAK,CAAC;mBACjB,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;mBACtC,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;mBACtC,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;mBAClC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CACrC,EACD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6DAA6D","sourcesContent":["/**\n * Companion-side orchestrator for the on-demand OpenAPI generation\n * flow declared in `saas-technical-doc.md` Step 3.\n *\n * Responsibility split (matching `MarketGenerationCompanionService`):\n *\n * - Subprocess (`'openapi-generation-input'`) — owns\n * `loadSharedModules()`, registry materialization, URL building,\n * and `z.toJSONSchema()` conversion. Returns a flat JSON-safe projection of\n * operations, organization-role semantics, explicitly unit-aware resources,\n * resource tags, error schema and diagnostics (see\n * `openapi-generation-input.behavior.ts`). Lives in the\n * subprocess because that is the only process that can load\n * the user app's `@wildo-ai/saas-models`-decorated schemas.\n *\n * - Parent (this service) — merges the subprocess projection\n * with `WildoSaasConfig` metadata it already has via the\n * companion context (`appSlug`, `appDisplayName`) and the per-service\n * `wildo.tech-doc.config.ts` (`supportedApiVersion`, `publicMarketingTitle`,\n * discovered via the unique `frontendType: TECH_DOC` service —\n * Step 7.5 refactor). It then pipes the assembled\n * `OpenApiGenerationInput` into the pure\n * `generateOpenApiDocuments(...)` from\n * `@wildo-ai/saas-technical-doc/companion`. The generator\n * handles filtering, audience splitting, and YAML emission.\n *\n * The generate route returns the in-memory `{ filename, yaml }` documents. The\n * publish route writes the same bytes into the app's managed OpenAPI directory,\n * removing canonical skipped-section files so stale API pages cannot survive.\n *\n * @wildo_source:part:start companion.technical-doc.service facet:layer:companion facet:family:technical-doc\n */\n\nimport { existsSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { inject, injectable } from 'inversify';\nimport {\n AppConfigurationService,\n ErrorBuilderBackendService,\n LoggerService,\n SAAS_SERVICE_TYPES,\n resolveFeatureGatedCoreResourceExclusions,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport { AuthMethod, CoreResourceType, ErrorCustomMessageReference, ErrorType, getEnabledMethods } from '@wildo-ai/saas-models';\nimport { AppFrontendType, loadConfig } from '@wildo-ai/platform-config-lib';\nimport {\n generateOpenApiDocuments,\n resolveTechnicalDocumentationForbiddenPublicSentinels,\n resolveTechnicalDocumentationOutputBudgets,\n OpenApiGenerationInputSchema,\n resolveApplicationOrganizationRoleDocumentation,\n type ApplicationOrganizationRoleDocumentationSource,\n type ApplicationOrganizationUnitResourceDocumentation,\n type OpenApiGenerationInput,\n type OpenApiGenerationProjectorStats,\n type OperationProjection,\n type ResourceTag,\n type TechnicalDocGenerateOpenApiResult,\n type ApplicationConnectionServer,\n type ApplicationAuthenticationDocumentationSource,\n type ApplicationMcpToolSource,\n type ApplicationWebhookEventSource,\n} from '@wildo-ai/saas-technical-doc/companion';\nimport {\n createApiReferenceLinkIndex,\n resolveTechnicalDocumentationApiReferenceLink,\n type WildoTechnicalDocConfig,\n} from '@wildo-ai/saas-technical-doc';\nimport { createConservedApiReferenceModel } from '@wildo-ai/saas-technical-doc/openapi-reference-model';\n\nimport { TechnicalDocumentationPilotCompanionService } from './technical-documentation-pilot.companion.service';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n type TechnicalDocumentationApplicationDerivationCompanionService,\n type TechnicalDocumentationApplicationDerivationResult,\n} from './technical-documentation-application-derivation.companion.service';\nimport type {\n TechnicalDocumentationEnvironmentIdentityInput,\n} from './technical-documentation-environment-identity.companion.service';\nimport { getCompanionConfiguredPrimaryLanguage } from '../../core/config/primary-language.companion.utils';\nimport { readPerUnitLabels, resolvePerUnitFilePath } from '../../i18n-labelling/utils/per-unit-file.utils';\nimport { ROLE_LABELLING_UNIT_FILE_PATH_HINT } from '../../i18n-labelling/utils/role-lifecycle-keys.utils';\n\n/**\n * The diagnostics result is owned by the engine contract. The local companion\n * re-exports it only for its in-memory inspection route; managed publication\n * has its own pointer/fact result and never writes this diagnostic shape.\n */\nexport type {\n TechnicalDocGenerateOpenApiResult,\n};\n\n/**\n * Conventional file name for the per-service technical-documentation\n * configuration (Step 7.5 refactor — `saas-technical-doc.md`). Authored\n * at the docs service root next to `package.json` / `docusaurus.config.ts`.\n *\n * Discovery is \"by convention, not by configuration\":\n *\n * - The companion locates this file by walking the `services` entry\n * whose `frontendType === TECH_DOC` and joining `<saasRoot>/<service.path>/`.\n * The saas-config schema's `superRefine` already enforces \"at most\n * one TECH_DOC service per app\", so the lookup is deterministic.\n *\n * - File presence is the enable signal — there is NO `enabled` field\n * on `WildoTechnicalDocConfigSchema`. A TECH_DOC service without\n * this file is treated as a misconfiguration and the loader fails\n * closed (rather than silently shipping a docs site with no\n * OpenAPI metadata).\n */\nconst PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME = 'wildo.tech-doc.config.ts';\n\n/**\n * Subprocess wire shape — kept as a structural type rather than an imported\n * symbol because the source declaration lives inside the introspection-\n * subprocess module which intentionally is NOT exported from `src/index.ts`\n * (subprocess code must not load in the parent process).\n *\n * The `stats` field reuses {@link OpenApiGenerationProjectorStats} from the\n * engine package so the projector subprocess and the companion-side result\n * cannot drift on the diagnostic counts they exchange (H-C fix-up).\n */\ninterface OpenApiGenerationInputSubprocessOutput {\n operations: OperationProjection[];\n /** Source-derived application activation facts; independent from the API-reference selection. */\n readonly hasConfiguredMcpToolOperations: boolean;\n readonly hasConfiguredA2aSkills: boolean;\n /**\n * The two integration inventories the same walk collects. Row types come from the ENGINE, not\n * from the subprocess module, so this mirror cannot drift on their shape while the parent still\n * never loads subprocess code.\n */\n readonly mcpTools: readonly ApplicationMcpToolSource[];\n readonly webhookEvents: readonly ApplicationWebhookEventSource[];\n /**\n * Source-derived role semantics cross the subprocess boundary unchanged.\n * The parent then joins the application's primary-locale labels before a\n * consumer-documentation fact is derived; labels are intentionally not\n * fabricated by the registry projector.\n */\n readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentationSource[];\n /** Exact resources selected by the application's unit-narrowing startup declaration. */\n readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];\n /** Canonical framework HTTP error envelope, JSON-safe across the subprocess boundary. */\n errorResponseSchema: unknown;\n /**\n * Per-resource OpenAPI tag descriptors (the resource's business purpose),\n * merged into {@link OpenApiGenerationInput.resourceTags}. Mirrors the\n * projector's wire shape; see `openapi-generation-input.behavior.ts`.\n */\n resourceTags: ResourceTag[];\n stats: OpenApiGenerationProjectorStats;\n}\n\n@injectable()\nexport class TechnicalDocCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService)\n private readonly appConfigService: AppConfigurationService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService)\n private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocumentationApplicationDerivationService)\n private readonly applicationDerivationService: TechnicalDocumentationApplicationDerivationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('TechnicalDocCompanionService');\n this.logger.setDebugTypeLogging('TechnicalDocCompanionService', true);\n }\n\n\n /**\n * Produces one framework private derivation, including the resolved\n * organization-role inventory, and its public pre-render bundle.\n * The caller selects the environment backend service; the companion resolves\n * the environment identity and source-derived operation-exposure evidence.\n * It does not read accepted application-family state or select application\n * documentation. The role inventory is a narrow configuration projection,\n * not an application-authored use-case selection.\n */\n public async deriveApplicationDocumentationBundles(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<TechnicalDocumentationApplicationDerivationResult> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n return this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: subprocessOutput.operations,\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n ...this.resolveApplicationConnectionInputs(technicalDocConfig),\n authentication: this.resolveApplicationAuthenticationInputs(),\n integration: { mcpTools: subprocessOutput.mcpTools, webhookEvents: subprocessOutput.webhookEvents },\n });\n }\n\n /**\n * The application facts the documentation names instead of hedging: the product's own name and\n * the base URLs it publishes.\n *\n * The name is what a customer calls the product — `displayName` from `wildo.saas.config.ts`,\n * falling back to the application's `name`. Deliberately NOT `publicMarketingTitle`: that is the documentation SITE's\n * title (\"Wonder Todos — Technical Documentation\") and reads wrong inside a sentence.\n *\n * The base URLs are the ones the application already authors for its API reference, so the\n * guides and the reference name the same origins by construction.\n */\n private resolveApplicationConnectionInputs(technicalDocConfig: WildoTechnicalDocConfig): {\n applicationName: string;\n apiServers: readonly ApplicationConnectionServer[];\n } {\n const saasConfig = this.companionContext.saasConfig;\n const applicationName = saasConfig.displayName?.trim() || saasConfig.name.trim();\n if (applicationName.length === 0) {\n throw new Error('technical-documentation requires the application to declare a name (displayName or name in wildo.saas.config.ts)');\n }\n return {\n applicationName,\n apiServers: (technicalDocConfig.apiServers ?? []).map((server) => ({\n url: server.url,\n ...(server.description === undefined ? {} : { description: server.description }),\n })),\n };\n }\n\n /**\n * The sign-in policy this application actually applies, per user type.\n *\n * Read from `userTypes[<key>].auth`, which is where all authentication policy lives — there are\n * no global defaults. Enabled methods go through `getEnabledMethods`, the same helper the runtime\n * uses, rather than re-reading the boolean-or-object shorthand here; and they are ordered by the\n * engine's own enum so two applications list the same methods in the same order.\n */\n private resolveApplicationAuthenticationInputs(): ApplicationAuthenticationDocumentationSource {\n const userTypes = Object.entries(this.appConfigService.config.userTypes ?? {}).map(([userTypeKey, definition]) => {\n const auth = definition.auth;\n const enabled = getEnabledMethods(auth.authMethodsEnabled);\n return {\n userTypeKey,\n enabledMethods: Object.values(AuthMethod).filter((method) => enabled.has(method)),\n multifactor: {\n required: auth.mfaPolicy.requireMFA,\n strongRequired: auth.mfaPolicy.requireStrongMFA,\n enrollmentGracePeriodDays: auth.mfaPolicy.enrollmentGracePeriodDays,\n passkeyExemptFromMultifactor: auth.mfaPolicy.passkeyExemptFromMFA,\n ...(auth.mfaPolicy.acceptableMFAMethods === undefined ? {} : { acceptableMethods: auth.mfaPolicy.acceptableMFAMethods }),\n },\n password: {\n minLength: auth.passwordPolicy.minLength,\n maxLength: auth.passwordPolicy.maxLength,\n requireUppercase: auth.passwordPolicy.requireUppercase,\n requireLowercase: auth.passwordPolicy.requireLowercase,\n requireNumbers: auth.passwordPolicy.requireNumbers,\n requireSpecialChars: auth.passwordPolicy.requireSpecialChars,\n expiryDays: auth.passwordPolicy.expiryDays,\n },\n session: {\n durationMinutes: auth.sessionDurationMinutes,\n ...(auth.maxConcurrentSessions === undefined ? {} : { maxConcurrentSessions: auth.maxConcurrentSessions }),\n },\n lockout: {\n maxLoginAttempts: auth.lockoutPolicy.maxLoginAttempts,\n lockoutDurationMinutes: auth.lockoutPolicy.lockoutDurationMinutes,\n progressive: auth.lockoutPolicy.progressiveLockout,\n maxProgressiveLockoutHours: auth.lockoutPolicy.maxProgressiveLockoutHours,\n },\n };\n });\n if (userTypes.length === 0) {\n throw new Error('technical-documentation requires the application to declare at least one user type');\n }\n return { userTypes };\n }\n\n /**\n * Publishes the complete managed documentation tree at stable generated paths.\n * This operation synchronizes the framework-owned consumer documentation into\n * `src/generated/consumer-documentation/**`. The directory is generator-owned;\n * Git provides history and rollback.\n *\n * **No capture.** Screenshots resolve to `PLACEHOLDER` (framework-materialized bytes), so\n * publication needs no browser, no provisioned tenant and no live stack. That was the\n * decision that collapsed this from a multi-precondition chain to one call: pictures are\n * a pre-production refinement, and `refuseProvisionalAssets` is how a production\n * environment declares it will not ship without them.\n *\n * Docusaurus runtime/build measurement happens against the generated publication after it\n * exists. Measuring the previous site before publication and applying that observation to\n * a different candidate made first cutover circular and, in practice, let the retired\n * 981-page OpenAPI site block publication of the much smaller generated tree.\n */\n public async publishManagedDocumentation(\n input: TechnicalDocumentationEnvironmentIdentityInput & { readonly refuseProvisionalAssets?: boolean },\n ) {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const generated = await this.generateVerifiedApplicationOpenApiDocuments(input);\n for (const section of generated.documents.sections) {\n createConservedApiReferenceModel(section);\n }\n const apiReferenceLinkIndex = createApiReferenceLinkIndex(generated.documents.sections);\n const publisher = new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot);\n await publisher.publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${this.companionContext.saasConfig.slug}`],\n });\n\n return publisher.generateValidateAndPublish({\n derivation: generated.derivation,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n forbiddenPublicSentinels: resolveTechnicalDocumentationForbiddenPublicSentinels(\n technicalDocConfig.forbiddenPublicSentinels,\n ),\n budgets: resolveTechnicalDocumentationOutputBudgets(technicalDocConfig.outputBudgets),\n resolveApiReferenceTarget: (target) => resolveTechnicalDocumentationApiReferenceLink(apiReferenceLinkIndex, target),\n ...(input.refuseProvisionalAssets === undefined\n ? {}\n : { refuseProvisionalAssets: input.refuseProvisionalAssets }),\n });\n }\n\n /**\n * Generates the complete API reference from the resolved application and\n * enabled framework resource catalog.\n *\n * Narrative documentation intentionally selects a small set of source-backed\n * customer journeys. It must not become an allow-list for API operations:\n * doing so hid every framework resource and every application resource other\n * than the one chosen for the current use-case page. The OpenAPI generator\n * already applies the API-call and API-key exposure filters to this complete\n * resolved catalog; the derivation remains part of publication for consumer\n * content and evidence, but does not truncate the API contract.\n */\n public async generateVerifiedApplicationOpenApiDocuments(\n input: TechnicalDocumentationEnvironmentIdentityInput,\n ): Promise<{\n readonly derivation: TechnicalDocumentationApplicationDerivationResult;\n readonly documents: ReturnType<typeof generateOpenApiDocuments>;\n readonly sourceStats: OpenApiGenerationProjectorStats;\n readonly authorizedOperationCount: number;\n }> {\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const organizationRoles = await this.resolveApplicationOrganizationRoles(input.backendServiceKey, subprocessOutput.organizationRoles);\n const derivation = await this.applicationDerivationService.deriveAuthorizedBundles({\n ...input,\n operations: subprocessOutput.operations,\n hasConfiguredMcpToolOperations: subprocessOutput.hasConfiguredMcpToolOperations,\n hasConfiguredA2aSkills: subprocessOutput.hasConfiguredA2aSkills,\n organizationRoles,\n organizationUnitAwareResources: subprocessOutput.organizationUnitAwareResources,\n ...this.resolveApplicationConnectionInputs(technicalDocConfig),\n authentication: this.resolveApplicationAuthenticationInputs(),\n integration: { mcpTools: subprocessOutput.mcpTools, webhookEvents: subprocessOutput.webhookEvents },\n });\n const generationInput = this.assembleGenerationInput(subprocessOutput, technicalDocConfig);\n\n return Object.freeze({\n derivation,\n documents: generateOpenApiDocuments(generationInput),\n sourceStats: subprocessOutput.stats,\n authorizedOperationCount: subprocessOutput.operations.length,\n });\n }\n\n /**\n * Generate the Application + Organization OpenAPI YAML\n * documents for the currently-loaded SaaS app. Returns the\n * pure-function generator output unchanged so the controller\n * can pass it straight through as JSON.\n *\n * The method does NOT short-circuit on a \"disabled docs site\" —\n * after the Step 7.5 refactor there is no `enabled` flag anywhere\n * (file presence under a TECH_DOC service IS the enable signal).\n * If the docs service or its `wildo.tech-doc.config.ts` is missing,\n * {@link loadTechnicalDocConfig} fails closed with a CONFIGURATION\n * error before generation runs.\n */\n public async generateOpenApiDocuments(): Promise<TechnicalDocGenerateOpenApiResult> {\n this.logDebug('technical-doc generate-openapi — start', {\n appSlug: this.companionContext.saasConfig.slug,\n });\n\n // Load the per-service config BEFORE the subprocess call: its\n // `apiDocResources` opt-in is threaded into the projector so the subprocess\n // also documents the named core (engine) resources.\n const technicalDocConfig = await this.loadTechnicalDocConfig();\n const excludedCoreResourceTypes = resolveFeatureGatedCoreResourceExclusions(this.appConfigService.config);\n const subprocessOutput = await this.callSubprocessProjector(\n technicalDocConfig.apiDocResources,\n excludedCoreResourceTypes ? [...excludedCoreResourceTypes].sort() : undefined,\n );\n const generationInput = this.assembleGenerationInput(subprocessOutput, technicalDocConfig);\n const documents = generateOpenApiDocuments(generationInput);\n\n this.logDebug('technical-doc generate-openapi — success', {\n appSlug: generationInput.appSlug,\n sectionCount: documents.sections.length,\n resourceCount: subprocessOutput.stats.resourceCount,\n consideredOperationCount: subprocessOutput.stats.consideredOperationCount,\n projectedRowCount: subprocessOutput.stats.projectedRowCount,\n });\n\n return {\n documents,\n stats: subprocessOutput.stats,\n metadata: {\n appSlug: generationInput.appSlug,\n appDisplayName: generationInput.appDisplayName,\n ...(generationInput.publicMarketingTitle !== undefined\n ? { publicMarketingTitle: generationInput.publicMarketingTitle }\n : {}),\n supportedApiVersion: generationInput.supportedApiVersion,\n },\n };\n }\n\n /**\n * Materializes the two generated OpenAPI serializations at stable paths for\n * the docs application. This is companion-owned generation; Docusaurus reads\n * the resulting files and never regenerates or edits them.\n */\n public async publishOpenApiReference(): Promise<{ readonly rootPath: string; readonly outputPaths: readonly string[] }> {\n const generated = await this.generateOpenApiDocuments();\n return new TechnicalDocumentationPilotCompanionService(this.companionContext.saasRoot).publishOpenApiDocuments({\n documents: generated.documents,\n sourceUnitRefs: [`technical-documentation:source/openapi/${generated.metadata.appSlug}`],\n });\n }\n\n /**\n * Call the `'openapi-generation-input'` introspection behavior\n * on any backend service (the projector behavior routes to\n * `library` which every backend service declares — same picker\n * pattern as `MarketGenerationCompanionService.pickMarketCarrierServiceKey`\n * and `getResourcesRegistry`'s carrier picker).\n *\n * Validates the subprocess wire format defensively: a structural\n * mismatch here would otherwise surface as a confusing Zod parse\n * failure deeper in the generator.\n */\n private async callSubprocessProjector(\n apiDocResources?: WildoTechnicalDocConfig['apiDocResources'],\n excludedCoreResourceTypes?: readonly string[],\n ): Promise<OpenApiGenerationInputSubprocessOutput> {\n const input = {\n ...(apiDocResources !== undefined ? { apiDocResources } : {}),\n ...(excludedCoreResourceTypes !== undefined ? { excludedCoreResourceTypes } : {}),\n };\n const introspection = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickProjectorCarrierServiceKey(),\n behavior: 'openapi-generation-input',\n // Thread both the authored core-resource selection and the canonical\n // runtime feature exclusions across the JSON-safe subprocess boundary.\n ...(Object.keys(input).length > 0 ? { input } : {}),\n });\n\n if (introspection.success === false) {\n const failure = introspection;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: failure.error.message,\n serviceKey: failure.serviceKey,\n behavior: failure.behavior,\n targetId: failure.targetId,\n },\n });\n }\n\n const data: unknown = introspection.data;\n if (\n !isPlainObject(data)\n || !Array.isArray(data.operations)\n || typeof data.hasConfiguredMcpToolOperations !== 'boolean'\n || typeof data.hasConfiguredA2aSkills !== 'boolean'\n || !isPlainObject(data.errorResponseSchema)\n || !Array.isArray(data.resourceTags)\n || !Array.isArray(data.organizationRoles)\n || !Array.isArray(data.organizationUnitAwareResources)\n || !isOpenApiGenerationProjectorStats(data.stats)\n ) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'openapi-generation-input subprocess returned a malformed payload — expected '\n + '`{ operations: OperationProjection[], hasConfiguredMcpToolOperations: boolean, hasConfiguredA2aSkills: boolean, organizationRoles: OrganizationRole[], organizationUnitAwareResources: OrganizationUnitAwareResource[], errorResponseSchema: object, resourceTags: ResourceTag[], stats: { ... } }`.',\n },\n });\n }\n const output = data as unknown as OpenApiGenerationInputSubprocessOutput;\n assertResolvedHttpOperationProjectionConservation(output);\n return output;\n }\n\n /**\n * Compose the subprocess projection with the\n * `WildoSaasConfig`-derived metadata the parent process owns +\n * the per-service `wildo.tech-doc.config.ts` block (Step 7.5\n * refactor — `saas-technical-doc.md`).\n *\n * The `publicMarketingTitle` projected into `openapi.info.title`\n * comes from the per-service config (NOT from\n * `WildoSaasConfig.technicalDoc?.publicMarketingTitle` — that root-\n * level field was removed in Step 7.5 in favor of co-locating the\n * tech-doc-specific config with the engine package that owns it).\n *\n * Re-parses the result through `OpenApiGenerationInputSchema`\n * so the generator only ever sees a fully-validated payload —\n * if a future field is added to the schema, this assembly step\n * must be updated in the same commit and the Zod parse will\n * fail fast otherwise.\n */\n private assembleGenerationInput(\n subprocessOutput: OpenApiGenerationInputSubprocessOutput,\n technicalDocConfig: WildoTechnicalDocConfig,\n ): OpenApiGenerationInput {\n const saasConfig = this.companionContext.saasConfig;\n const candidateInput: OpenApiGenerationInput = {\n appSlug: saasConfig.slug,\n appDisplayName: saasConfig.displayName,\n supportedApiVersion: technicalDocConfig.supportedApiVersion,\n ...(technicalDocConfig.publicMarketingTitle\n ? { publicMarketingTitle: technicalDocConfig.publicMarketingTitle }\n : {}),\n operations: subprocessOutput.operations,\n errorResponseSchema: subprocessOutput.errorResponseSchema,\n ...(subprocessOutput.resourceTags && subprocessOutput.resourceTags.length > 0\n ? { resourceTags: applyApiReferenceResourceCategories(subprocessOutput.resourceTags, technicalDocConfig.apiReferenceResourceCategories) }\n : {}),\n // App-enriched OpenAPI `servers` (deployment base URLs). The framework\n // emits the security SCHEMES automatically (they are universal), but the\n // server URLs are app/environment knowledge → authored on the tech-doc\n // config and threaded straight through.\n ...(technicalDocConfig.apiServers && technicalDocConfig.apiServers.length > 0\n ? { servers: technicalDocConfig.apiServers }\n : {}),\n // App-authored landing-page intro; the generator prepends it to the\n // framework-universal API-conventions block to form `info.description`.\n ...(technicalDocConfig.apiOverview\n ? { apiOverview: technicalDocConfig.apiOverview }\n : {}),\n };\n\n const parsed = OpenApiGenerationInputSchema.safeParse(candidateInput);\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: 'Failed to assemble OpenApiGenerationInput — schema validation rejected the '\n + 'merged subprocess + saas-config payload. This usually means the subprocess produced '\n + 'an OperationProjection that fails the strict OperationProjectionSchema (e.g. an '\n + 'API_CALL_WITH_CALLBACK row missing `callbackPath`).',\n issues: parsed.error.issues,\n },\n });\n }\n return parsed.data;\n }\n\n /**\n * Load the per-service `wildo.tech-doc.config.ts` for the\n * (unique) `frontendType: TECH_DOC` service declared in\n * `wildo.saas.config.ts`.\n *\n * Discovery contract (Step 7.5 refactor — `saas-technical-doc.md`):\n *\n * - The TECH_DOC service is identified by `frontendType === TECH_DOC`,\n * NOT by service key. This decouples the companion from any\n * convention like `services.docs` — apps may name the service\n * anything (e.g. `'apiDocs'`, `'developerPortal'`).\n *\n * - The saas-config schema's `superRefine` enforces \"at most one\n * TECH_DOC service per app\", so the lookup either finds exactly\n * one match or zero. Two matches cannot reach this code.\n *\n * - File presence IS the enable signal. A TECH_DOC service without\n * `wildo.tech-doc.config.ts` is a misconfiguration we surface\n * immediately (CONFIGURATION error) rather than letting the OpenAPI\n * generator silently emit a docs-site-incompatible payload.\n *\n * - The Zod validation that rejects unknown keys / malformed values\n * runs inside `defineTechnicalDocConfig` (which the per-service\n * config file invokes via `export default defineTechnicalDocConfig({...})`).\n * `loadConfig` evaluates the file via jiti, so by the time it\n * returns we have an already-parsed `WildoTechnicalDocConfig`.\n *\n * - The config is evaluated for every derivation or publication request.\n * It is an application-owned input outside the companion package's\n * TypeScript watch graph, so a process-lifetime cache would make a valid\n * taxonomy, server or overview edit invisible until an unrelated restart.\n * Publication is infrequent and config loading is tiny beside the source\n * projection, making freshness the correct trade-off.\n *\n * - The `csp?` `@unimplemented` warning fires in the same evaluation\n * pass (also inside `defineTechnicalDocConfig`) — this loader does\n * not need to re-check authored fields.\n *\n * @throws CONFIGURATION error if no TECH_DOC service is declared OR if\n * the per-service config file is missing.\n */\n private async loadTechnicalDocConfig(): Promise<WildoTechnicalDocConfig> {\n const techDocServiceEntry = Object.entries(this.companionContext.saasConfig.services)\n .find(([, service]) => service.frontendType === AppFrontendType.TECH_DOC);\n\n if (!techDocServiceEntry) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'No frontend service with `frontendType: TECH_DOC` is declared in '\n + 'wildo.saas.config.ts. The technical-documentation companion routes '\n + '(diagnostic OpenAPI generation / managed publication) require an authored TECH_DOC service '\n + 'because that service folder owns the per-service '\n + '`wildo.tech-doc.config.ts` (publicMarketingTitle, API projection metadata, csp). '\n + 'Add a TECH_DOC service in wildo.saas.config.ts and ship the per-service '\n + 'config file under it.',\n },\n });\n }\n\n const [techDocServiceKey, techDocService] = techDocServiceEntry;\n const techDocConfigPath = path.resolve(\n this.companionContext.saasRoot,\n techDocService.path,\n PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME,\n );\n\n if (!existsSync(techDocConfigPath)) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `TECH_DOC service '${techDocServiceKey}' is declared in wildo.saas.config.ts `\n + `but the required per-service config file '${PER_SERVICE_TECH_DOC_CONFIG_FILE_NAME}' `\n + `is missing under '${techDocService.path}/'. File presence IS the enable signal `\n + '(the retired `technicalDoc.enabled` setting was replaced by file '\n + 'presence). Create the file with '\n + '`export default defineTechnicalDocConfig({ ... })` from '\n + '`@wildo-ai/saas-technical-doc`.',\n expectedPath: techDocConfigPath,\n },\n });\n }\n\n let loaded: WildoTechnicalDocConfig;\n try {\n // `freshModuleCache` is what makes the docblock's \"evaluated for every request\" true. Calling\n // `loadConfig` again is NOT enough on its own: jiti's module cache is process-global, so\n // without this the second evaluation returns the first one's result and a valid taxonomy,\n // server or overview edit stays invisible until an unrelated restart — precisely the outcome\n // the contract above rejects. Same defect as issue #170, different read site.\n loaded = await loadConfig<WildoTechnicalDocConfig>(techDocConfigPath, { freshModuleCache: true });\n } catch (e) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Failed to load per-service technical-documentation config at ${techDocConfigPath}. `\n + 'The file MUST do `export default defineTechnicalDocConfig({...})` and pass '\n + 'WildoTechnicalDocConfigSchema (`z.strictObject` — unknown keys reject).',\n cause: describeCaughtError(e),\n },\n });\n }\n\n return loaded;\n }\n\n /**\n * Join source-derived role semantics to the exact primary-language labels\n * used by this application. The labels are not decoration: administrators\n * must see the same role names and descriptions in documentation and in the\n * member-management interface, so an incomplete label unit blocks\n * publication instead of falling back to a prettified role token.\n */\n private async resolveApplicationOrganizationRoles(\n backendServiceKey: string,\n roles: readonly ApplicationOrganizationRoleDocumentationSource[],\n ) {\n const backendService = this.companionContext.servicesByKey[backendServiceKey];\n if (backendService === undefined || backendService.frontendType !== undefined) {\n throw new Error(`technical-documentation role labels require a declared backend service key: ${backendServiceKey}`);\n }\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const i18nRoot = path.resolve(this.companionContext.saasRoot, backendService.path, 'src/engine/i18n');\n const roleLabelsPath = resolvePerUnitFilePath({\n i18nRoot,\n unit: { filePathHint: ROLE_LABELLING_UNIT_FILE_PATH_HINT },\n localeCode: primaryLocale,\n });\n const primaryLocaleLabels = await readPerUnitLabels(roleLabelsPath);\n return resolveApplicationOrganizationRoleDocumentation(roles, primaryLocaleLabels);\n }\n\n /**\n * Pick the first declared backend service key. Same picker\n * pattern as the existing companion services that route to\n * subprocess behaviors on the `library` target — every backend\n * declares the shared library, so any backend service is a\n * valid carrier.\n */\n private pickProjectorCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the openapi-generation-input '\n + 'introspection behavior. The behavior routes to the `library` target which every '\n + 'backend service declares — but the companion context has none.',\n },\n });\n }\n return backendServiceKey;\n }\n\n private pickFrontendApplicationServiceKey(): string {\n const frontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!frontendServiceKey) throw new Error('technical-documentation frontend runtime evidence requires one SAAS_APP service');\n return frontendServiceKey;\n }\n}\n\n/**\n * Attaches the documentation config's explicit API taxonomy to the resolved\n * resource tags before OpenAPI generation.\n *\n * The operation subprocess owns the resolved resource inventory and\n * specification facts; the TECH_DOC config owns an application's editorial\n * navigation taxonomy. Joining them here keeps both truths in their proper\n * owners, then makes the OpenAPI document the sole transport to the browser.\n * Once an application elects to declare categories, an exact inventory join is\n * required: an uncategorised new resource or a stale config name must stop\n * publication instead of quietly producing a misleading partial navigation.\n */\nexport function applyApiReferenceResourceCategories(\n resourceTags: readonly ResourceTag[],\n categories: WildoTechnicalDocConfig['apiReferenceResourceCategories'],\n): ResourceTag[] {\n if (categories === undefined) return [...resourceTags];\n const tagsByName = new Map(resourceTags.map((tag) => [tag.name, tag]));\n if (tagsByName.size !== resourceTags.length) throw new Error('OpenAPI resource tags must be unique before category assignment');\n\n const categoryByResourceName = new Map<string, WildoTechnicalDocConfig['apiReferenceResourceCategories'][number]>();\n const categoryIds = new Set<string>();\n const unavailableResourceNames: string[] = [];\n for (const category of categories) {\n if (categoryIds.has(category.id)) throw new Error(`API-reference category '${category.id}' is declared more than once`);\n categoryIds.add(category.id);\n for (const resourceName of category.resourceNames) {\n if (!tagsByName.has(resourceName)) {\n unavailableResourceNames.push(`${category.id}:${resourceName}`);\n continue;\n }\n const prior = categoryByResourceName.get(resourceName);\n if (prior !== undefined) throw new Error(`API-reference resource '${resourceName}' is assigned to both '${prior.id}' and '${category.id}'`);\n categoryByResourceName.set(resourceName, category);\n }\n }\n if (unavailableResourceNames.length > 0) {\n throw new Error(`API-reference categories name unavailable resources: ${unavailableResourceNames.sort().join(', ')}`);\n }\n const unassignedResourceNames = [...tagsByName.keys()].filter((resourceName) => !categoryByResourceName.has(resourceName)).sort();\n if (unassignedResourceNames.length > 0) {\n throw new Error(`API-reference resources have no configured category: ${unassignedResourceNames.join(', ')}`);\n }\n return resourceTags.map((tag) => {\n const category = categoryByResourceName.get(tag.name)!;\n return {\n ...tag,\n category: {\n id: category.id,\n label: category.label,\n ...(category.description === undefined ? {} : { description: category.description }),\n },\n };\n });\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonNegativeInteger(value: unknown): value is number {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0;\n}\n\n/**\n * Verifies the cross-process conservation boundary before the generator sees\n * the payload. The subprocess records the resolved HTTP inventory before\n * flattening it; this parent-side join prevents a future projector filter,\n * collapse or mapper change from merely adjusting a count while dropping the\n * operation that the count represented.\n */\nfunction assertResolvedHttpOperationProjectionConservation(output: OpenApiGenerationInputSubprocessOutput): void {\n const key = (entry: {\n readonly identity: {\n readonly contractVersion: number;\n readonly resourceRef: string;\n readonly operationFamilyRef: string;\n readonly operationVariantRef: string;\n readonly variantType: string;\n readonly httpVerb: string;\n readonly path: string;\n };\n readonly section: string;\n readonly roles: readonly string[];\n }): string => JSON.stringify([\n entry.identity.contractVersion,\n entry.identity.resourceRef,\n entry.identity.operationFamilyRef,\n entry.identity.operationVariantRef,\n entry.identity.variantType,\n entry.identity.httpVerb,\n entry.identity.path,\n entry.section,\n entry.roles,\n ]);\n const source = new Set(output.stats.resolvedExternalHttpOperations.map(key));\n const projections = new Set(output.operations.map((operation) => key({\n identity: operation.identity,\n section: operation.consumerApiSection,\n roles: operation.roles,\n })));\n if (\n source.size !== output.stats.resolvedExternalHttpOperations.length\n || projections.size !== output.operations.length\n || source.size !== projections.size\n || [...source].some((entry) => !projections.has(entry))\n ) {\n throw new Error('openapi-generation-input subprocess violated resolved HTTP operation → projection conservation');\n }\n}\n\n/** Validate the complete diagnostics object received from the subprocess. */\nfunction isOpenApiGenerationProjectorStats(value: unknown): value is OpenApiGenerationProjectorStats {\n if (!isPlainObject(value)) return false;\n if (\n !isNonNegativeInteger(value.resourceCount)\n || !isNonNegativeInteger(value.consideredOperationCount)\n || !isNonNegativeInteger(value.projectedRowCount)\n || !Array.isArray(value.resolvedExternalHttpOperations)\n || !isNonNegativeInteger(value.skippedOperationWithoutInitiatorInfosCount)\n || !Array.isArray(value.skippedOperationsWithoutInitiatorInfos)\n ) {\n return false;\n }\n\n if (\n value.resolvedExternalHttpOperations.length !== value.projectedRowCount\n || !value.resolvedExternalHttpOperations.every((entry) =>\n isPlainObject(entry)\n && isPlainObject(entry.identity)\n && typeof entry.section === 'string'\n && Array.isArray(entry.roles)\n && entry.roles.every((role) => typeof role === 'string'))\n ) {\n return false;\n }\n\n if (\n value.excludedCoreResources !== undefined\n && (\n !Array.isArray(value.excludedCoreResources)\n || !value.excludedCoreResources.every((entry) =>\n typeof entry === 'string' && Object.values(CoreResourceType).includes(entry as CoreResourceType))\n )\n ) {\n return false;\n }\n if (!value.skippedOperationsWithoutInitiatorInfos.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceIdentifier === 'string'\n && typeof entry.operationIdentifier === 'string'\n && typeof entry.variantType === 'string'\n && (entry.variantKey === undefined || typeof entry.variantKey === 'string')\n && (entry.isOperationDefault === undefined || typeof entry.isOperationDefault === 'boolean')\n && (entry.isBulkOperation === undefined || typeof entry.isBulkOperation === 'boolean'))) {\n return false;\n }\n if (\n value.skippedCoreResources !== undefined\n && (\n !Array.isArray(value.skippedCoreResources)\n || !value.skippedCoreResources.every((entry) => isPlainObject(entry) && typeof entry.resourceType === 'string' && typeof entry.reason === 'string')\n )\n ) {\n return false;\n }\n if (\n value.collapsedCoreOperations !== undefined\n && (\n !Array.isArray(value.collapsedCoreOperations)\n || !value.collapsedCoreOperations.every((entry) =>\n isPlainObject(entry)\n && typeof entry.resourceType === 'string'\n && typeof entry.operationKey === 'string'\n && typeof entry.httpVerb === 'string'\n && typeof entry.path === 'string')\n )\n ) {\n return false;\n }\n\n return true;\n}\n\n/** @wildo_source:part:end companion.technical-doc.service */\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EngineDocumentationSpecificationCatalogV1 } from '@wildo-ai/saas-specifications/companion';
|
|
2
2
|
import { type TechnicalDocumentationAuthorizedBundleManifestV1, type TechnicalDocumentationEvidenceObservationV1, type TechnicalDocumentationPrivateDerivationManifestV1 } from '@wildo-ai/saas-specifications/technical-documentation';
|
|
3
|
-
import { type ApplicationOrganizationRoleDocumentation, type ApplicationOrganizationUnitResourceDocumentation, type OperationProjection } from '@wildo-ai/saas-technical-doc/companion';
|
|
3
|
+
import { type ApplicationOrganizationRoleDocumentation, type ApplicationOrganizationUnitResourceDocumentation, type OperationProjection, type ApplicationConnectionServer, type ApplicationAuthenticationDocumentationSource, type ApplicationIntegrationDocumentationSource } from '@wildo-ai/saas-technical-doc/companion';
|
|
4
4
|
import type { TechnicalDocumentationEnvironmentIdentityCompanionService, TechnicalDocumentationEnvironmentIdentityInput } from './technical-documentation-environment-identity.companion.service';
|
|
5
5
|
export interface TechnicalDocumentationApplicationDerivationInput extends TechnicalDocumentationEnvironmentIdentityInput {
|
|
6
6
|
readonly operations: readonly OperationProjection[];
|
|
@@ -8,6 +8,17 @@ export interface TechnicalDocumentationApplicationDerivationInput extends Techni
|
|
|
8
8
|
readonly hasConfiguredA2aSkills: boolean;
|
|
9
9
|
readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentation[];
|
|
10
10
|
readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];
|
|
11
|
+
/**
|
|
12
|
+
* The application's own name and published base URLs. The agent surfaces are NOT passed
|
|
13
|
+
* separately: they are read from the same two flags that gate the MCP and A2A pages, so an
|
|
14
|
+
* address can never be printed for a surface whose pages this application does not publish.
|
|
15
|
+
*/
|
|
16
|
+
readonly applicationName: string;
|
|
17
|
+
readonly apiServers: readonly ApplicationConnectionServer[];
|
|
18
|
+
/** Per-user-type sign-in policy, read from the application's own configuration. */
|
|
19
|
+
readonly authentication: ApplicationAuthenticationDocumentationSource;
|
|
20
|
+
/** The tools and events this application publishes, from the same walk that gates those pages. */
|
|
21
|
+
readonly integration: ApplicationIntegrationDocumentationSource;
|
|
11
22
|
}
|
|
12
23
|
export interface TechnicalDocumentationApplicationDerivationResult {
|
|
13
24
|
readonly privateDerivation: TechnicalDocumentationPrivateDerivationManifestV1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-application-derivation.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-documentation-application-derivation.companion.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,yCAAyC,EAC/C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EASL,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EAChD,KAAK,iDAAiD,EACvD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAML,KAAK,wCAAwC,EAC7C,KAAK,gDAAgD,EACrD,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"technical-documentation-application-derivation.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-documentation-application-derivation.companion.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,yCAAyC,EAC/C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EASL,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EAChD,KAAK,iDAAiD,EACvD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAML,KAAK,wCAAwC,EAC7C,KAAK,gDAAgD,EACrD,KAAK,mBAAmB,EAKxB,KAAK,2BAA2B,EAChC,KAAK,4CAA4C,EAGjD,KAAK,yCAAyC,EAC/C,MAAM,wCAAwC,CAAC;AAKhD,OAAO,KAAK,EACV,yDAAyD,EACzD,8CAA8C,EAC/C,MAAM,kEAAkE,CAAC;AA+E1E,MAAM,WAAW,gDAAiD,SAAQ,8CAA8C;IACtH,QAAQ,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACpD,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC;IACjD,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,wCAAwC,EAAE,CAAC;IAChF,QAAQ,CAAC,8BAA8B,EAAE,SAAS,gDAAgD,EAAE,CAAC;IACrG;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAC5D,mFAAmF;IACnF,QAAQ,CAAC,cAAc,EAAE,4CAA4C,CAAC;IACtE,kGAAkG;IAClG,QAAQ,CAAC,WAAW,EAAE,yCAAyC,CAAC;CACjE;AAED,MAAM,WAAW,iDAAiD;IAChE,QAAQ,CAAC,iBAAiB,EAAE,iDAAiD,CAAC;IAC9E,QAAQ,CAAC,YAAY,EAAE,gDAAgD,CAAC;CACzE;AAED;;;;;;;GAOG;AACH,qBACa,2DAA2D;IAGpE,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,yDAAyD;IAGpF,uBAAuB,CAClC,KAAK,EAAE,gDAAgD,GACtD,OAAO,CAAC,iDAAiD,CAAC;CA+E9D;AAwGD,mFAAmF;AACnF,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,yCAAyC,EAClD,UAAU,EAAE,MAAM,GACjB,2CAA2C,CAuB7C"}
|
|
@@ -14,7 +14,7 @@ import { createHash } from 'node:crypto';
|
|
|
14
14
|
import { CoreResourceType } from '@wildo-ai/saas-models';
|
|
15
15
|
import { ENGINE_DOCUMENTATION_OUTBOUND_WEBHOOK_SIGNATURE_SOURCE_REF, createEngineDocumentationSpecificationCatalogV1, } from '@wildo-ai/saas-specifications/companion';
|
|
16
16
|
import { TechnicalDocumentationApplicabilityEvidenceAxis, TechnicalDocumentationApplicabilityEvidenceReason, TechnicalDocumentationApplicabilityEvidenceStatus, TechnicalDocumentationChannel, TechnicalDocumentationEvidenceAuthorityKind, TechnicalDocumentationEvidenceSubjectRef, createTechnicalDocumentationEnvironmentEvidenceSnapshotV1, } from '@wildo-ai/saas-specifications/technical-documentation';
|
|
17
|
-
import { createTechnicalDocumentationPrivateDerivation, loadApplicationConsumerDocumentationContentBundleV1, projectTechnicalDocumentationAuthorizedBundle, createApplicationOrganizationRolesDocumentationFact, createApplicationOrganizationUnitResourcesDocumentationFact, } from '@wildo-ai/saas-technical-doc/companion';
|
|
17
|
+
import { createTechnicalDocumentationPrivateDerivation, loadApplicationConsumerDocumentationContentBundleV1, projectTechnicalDocumentationAuthorizedBundle, createApplicationOrganizationRolesDocumentationFact, createApplicationOrganizationUnitResourcesDocumentationFact, projectApplicationConnectionDocumentation, projectApplicationAuthenticationDocumentation, projectApplicationAdministrationDocumentation, projectApplicationIntegrationDocumentation, } from '@wildo-ai/saas-technical-doc/companion';
|
|
18
18
|
import { inject, injectable } from 'inversify';
|
|
19
19
|
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
|
|
20
20
|
const APPLICATION_DOCUMENTATION_POLICY_REF = 'technical-documentation:policy/application-consumer-public-v1';
|
|
@@ -54,6 +54,41 @@ const ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS = Object.freeze([
|
|
|
54
54
|
CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,
|
|
55
55
|
CoreResourceType.ORGANIZATION_SUBSCRIPTIONS,
|
|
56
56
|
]);
|
|
57
|
+
/**
|
|
58
|
+
* The administrative matrix, joined from two things the derivation already has: the operations this
|
|
59
|
+
* application admits, and its own role labels.
|
|
60
|
+
*
|
|
61
|
+
* Only ADMITTED operations are considered — the same inventory that gates every other page — so an
|
|
62
|
+
* action this application does not publish never appears. Role identifiers are resolved to the
|
|
63
|
+
* application's labels; an identifier with no label falls back to the identifier itself rather than
|
|
64
|
+
* being dropped, because a reader is better served by an unfamiliar name than by a silently short
|
|
65
|
+
* list. Repository-only and internal variants are excluded: they are not doors anyone can open.
|
|
66
|
+
*/
|
|
67
|
+
function administrationSourceFromOperations(operations, organizationRoles) {
|
|
68
|
+
const labelByRole = new Map(organizationRoles.map((role) => [role.role, role.label]));
|
|
69
|
+
const collect = (resourceIdentifiers) => {
|
|
70
|
+
const seen = new Set();
|
|
71
|
+
const actions = [];
|
|
72
|
+
for (const operation of operations) {
|
|
73
|
+
if (!resourceIdentifiers.includes(operation.resourceIdentifier))
|
|
74
|
+
continue;
|
|
75
|
+
const action = operation.summary?.trim();
|
|
76
|
+
if (action === undefined || action.length === 0 || seen.has(action))
|
|
77
|
+
continue;
|
|
78
|
+
seen.add(action);
|
|
79
|
+
actions.push({
|
|
80
|
+
action,
|
|
81
|
+
roleLabels: operation.roles.map((role) => labelByRole.get(role) ?? role),
|
|
82
|
+
openToEveryMember: operation.roles.length === 0,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return actions;
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
memberActions: collect([CoreResourceType.ORGANIZATION_MEMBERS]),
|
|
89
|
+
organizationUnitActions: collect([CoreResourceType.ORGANIZATION_UNITS, CoreResourceType.ORGANIZATION_UNIT_MEMBERS]),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
57
92
|
/**
|
|
58
93
|
* Creates the public documentation bundle from engine-owned content and
|
|
59
94
|
* framework introspection plus the resolved organization-role configuration.
|
|
@@ -92,6 +127,17 @@ let TechnicalDocumentationApplicationDerivationCompanionService = class Technica
|
|
|
92
127
|
engineSpecificationCatalogIdentity: engineCatalog.identity,
|
|
93
128
|
applicationOrganizationRolesFact: createApplicationOrganizationRolesDocumentationFact(input.organizationRoles),
|
|
94
129
|
applicationOrganizationUnitResourcesFact: createApplicationOrganizationUnitResourcesDocumentationFact(input.organizationUnitAwareResources),
|
|
130
|
+
applicationAuthenticationFact: projectApplicationAuthenticationDocumentation(input.authentication),
|
|
131
|
+
applicationIntegrationFact: projectApplicationIntegrationDocumentation(input.integration),
|
|
132
|
+
applicationAdministrationFact: projectApplicationAdministrationDocumentation(administrationSourceFromOperations(input.operations, input.organizationRoles)),
|
|
133
|
+
applicationConnectionFact: projectApplicationConnectionDocumentation({
|
|
134
|
+
applicationName: input.applicationName,
|
|
135
|
+
apiServers: input.apiServers,
|
|
136
|
+
surfaces: {
|
|
137
|
+
mcpToolServer: input.hasConfiguredMcpToolOperations,
|
|
138
|
+
a2aAgent: input.hasConfiguredA2aSkills,
|
|
139
|
+
},
|
|
140
|
+
}),
|
|
95
141
|
derivationRef: FRAMEWORK_DOCUMENTATION_DERIVATION_REF,
|
|
96
142
|
derivationVersion: FRAMEWORK_DOCUMENTATION_DERIVATION_VERSION,
|
|
97
143
|
derivedAt,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"technical-documentation-application-derivation.companion.service.js","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-documentation-application-derivation.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,0DAA0D,EAC1D,+CAA+C,GAEhD,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,+CAA+C,EAC/C,iDAAiD,EACjD,iDAAiD,EACjD,6BAA6B,EAC7B,2CAA2C,EAC3C,wCAAwC,EAExC,yDAAyD,GAI1D,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,6CAA6C,EAC7C,mDAAmD,EACnD,6CAA6C,EAC7C,mDAAmD,EACnD,2DAA2D,GAI5D,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAOjF,MAAM,oCAAoC,GAAG,+DAA+D,CAAC;AAC7G,MAAM,wCAAwC,GAAG,CAAC,CAAC;AACnD,MAAM,kCAAkC,GAAG,gEAAgE,CAAC;AAC5G,MAAM,+CAA+C,GAAG,2EAA2E,CAAC;AACpI,MAAM,oCAAoC,GAAG,8EAA8E,CAAC;AAE5H;;;;;;;;;GASG;AACH,MAAM,sCAAsC,GAAG,yDAAyD,CAAC;AACzG,MAAM,0CAA0C,GAAG,CAAC,CAAC;AACrD,MAAM,oCAAoC,GAAG,4DAA4D,CAAC;AAE1G;;;;GAIG;AACH,MAAM,6CAA6C,GAAsB,MAAM,CAAC,MAAM,CAAC;I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ACzD,OAAkD,EAClD,UAAkB;IAElB,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CACzC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,KAAK,0DAA0D,CAClG,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,+CAA+C,CAAC,cAAc;QACpE,UAAU,EAAE,wCAAwC,CAAC,sBAAsB;QAC3E,MAAM,EAAE,KAAK,KAAK,SAAS;YACzB,CAAC,CAAC,iDAAiD,CAAC,SAAS;YAC7D,CAAC,CAAC,iDAAiD,CAAC,MAAM;QAC5D,MAAM,EAAE,KAAK,KAAK,SAAS;YACzB,CAAC,CAAC,iDAAiD,CAAC,+BAA+B;YACnF,CAAC,CAAC,iDAAiD,CAAC,+BAA+B;QACrF,aAAa,EAAE,2CAA2C,CAAC,uBAAuB;QAClF,YAAY,EAAE,oCAAoC;QAClD,gBAAgB,EAAE,CAAC;QACnB,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,IAAI;QACjB,UAAU;QACV,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,aAAqB;IACnC,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAC9E,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { CoreResourceType } from '@wildo-ai/saas-models';\nimport {\n ENGINE_DOCUMENTATION_OUTBOUND_WEBHOOK_SIGNATURE_SOURCE_REF,\n createEngineDocumentationSpecificationCatalogV1,\n type EngineDocumentationSpecificationCatalogV1,\n} from '@wildo-ai/saas-specifications/companion';\nimport {\n TechnicalDocumentationApplicabilityEvidenceAxis,\n TechnicalDocumentationApplicabilityEvidenceReason,\n TechnicalDocumentationApplicabilityEvidenceStatus,\n TechnicalDocumentationChannel,\n TechnicalDocumentationEvidenceAuthorityKind,\n TechnicalDocumentationEvidenceSubjectRef,\n canonicalizeTechnicalDocumentationJson,\n createTechnicalDocumentationEnvironmentEvidenceSnapshotV1,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationEvidenceObservationV1,\n type TechnicalDocumentationPrivateDerivationManifestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\nimport {\n createTechnicalDocumentationPrivateDerivation,\n loadApplicationConsumerDocumentationContentBundleV1,\n projectTechnicalDocumentationAuthorizedBundle,\n createApplicationOrganizationRolesDocumentationFact,\n createApplicationOrganizationUnitResourcesDocumentationFact,\n type ApplicationOrganizationRoleDocumentation,\n type ApplicationOrganizationUnitResourceDocumentation,\n type OperationProjection,\n} from '@wildo-ai/saas-technical-doc/companion';\nimport { inject, injectable } from 'inversify';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\n\nimport type {\n TechnicalDocumentationEnvironmentIdentityCompanionService,\n TechnicalDocumentationEnvironmentIdentityInput,\n} from './technical-documentation-environment-identity.companion.service';\n\nconst APPLICATION_DOCUMENTATION_POLICY_REF = 'technical-documentation:policy/application-consumer-public-v1';\nconst APPLICATION_DOCUMENTATION_POLICY_VERSION = 1;\nconst OPERATION_PROJECTION_AUTHORITY_REF = 'technical-documentation:authority/derived-operation-projection';\nconst APPLICATION_STARTUP_CONFIGURATION_AUTHORITY_REF = 'technical-documentation:authority/final-application-startup-configuration';\nconst ENGINE_CONTENT_CATALOG_AUTHORITY_REF = 'technical-documentation:authority/engine-documentation-specification-catalog';\n\n/**\n * Identifies the deliberately small framework-content derivation implemented by this service. It\n * includes only narrow, source-owned application projections: resolved organization roles and\n * resources explicitly narrowed by units. Use cases and editorial overlays remain for the\n * unfinished app-creator flow.\n *\n * This was a sha256 over a hand-listed inventory of the projectors involved until 2026-08-27 —\n * a pin nothing compared, whose only reader-visible property was that it changed when someone\n * edited the list. `ref@version` says the same thing and can be looked up.\n */\nconst FRAMEWORK_DOCUMENTATION_DERIVATION_REF = 'technical-documentation:derivation/framework-content-v1';\nconst FRAMEWORK_DOCUMENTATION_DERIVATION_VERSION = 1;\nconst APPLICATION_DOCUMENTATION_BUNDLE_REF = 'technical-documentation:bundle/application-consumer-public';\n\n/**\n * These resource registrations prove that the application exposes an outbound\n * webhook configuration surface. This is framework capability introspection,\n * not application-authored documentation.\n */\nconst OUTBOUND_WEBHOOK_SURFACE_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.APPLICATION_WEBHOOK_CONFIG,\n CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG,\n]);\nconst ORGANIZATION_SIEM_EXPORT_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG,\n]);\nconst ORGANIZATION_SIEM_RECOVERY_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ,\n]);\nconst ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n CoreResourceType.ORGANIZATION_SUBSCRIPTIONS,\n]);\n\nexport interface TechnicalDocumentationApplicationDerivationInput extends TechnicalDocumentationEnvironmentIdentityInput {\n readonly operations: readonly OperationProjection[];\n readonly hasConfiguredMcpToolOperations: boolean;\n readonly hasConfiguredA2aSkills: boolean;\n readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentation[];\n readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];\n}\n\nexport interface TechnicalDocumentationApplicationDerivationResult {\n readonly privateDerivation: TechnicalDocumentationPrivateDerivationManifestV1;\n readonly publicBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n}\n\n/**\n * Creates the public documentation bundle from engine-owned content and\n * framework introspection plus the resolved organization-role configuration.\n *\n * The resolved operation catalog contributes capability evidence, but accepted\n * application projections and family registries are not inputs. In particular,\n * this path does not select a resource, workflow, persona, recipe, or use case.\n */\n@injectable()\nexport class TechnicalDocumentationApplicationDerivationCompanionService {\n public constructor(\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocumentationEnvironmentIdentityService)\n private readonly environmentIdentity: TechnicalDocumentationEnvironmentIdentityCompanionService,\n ) {}\n\n public async deriveAuthorizedBundles(\n input: TechnicalDocumentationApplicationDerivationInput,\n ): Promise<TechnicalDocumentationApplicationDerivationResult> {\n const derivationEnvironment = this.environmentIdentity.resolveDerivationEnvironment(input);\n const derivedAt = derivationEnvironment.derivedAt;\n\n const engineCatalog = createEngineDocumentationSpecificationCatalogV1();\n const environmentEvidenceSnapshot = createTechnicalDocumentationEnvironmentEvidenceSnapshotV1({\n schemaVersion: 1,\n environmentRef: derivationEnvironment.environmentRef,\n freshnessEvaluatedAt: derivedAt,\n observations: [\n configuredAgentSurfaceObservation(\n input.hasConfiguredMcpToolOperations,\n TechnicalDocumentationEvidenceSubjectRef.APPLICATION_MCP_TOOL_SURFACE,\n derivedAt,\n ),\n configuredAgentSurfaceObservation(\n input.hasConfiguredA2aSkills,\n TechnicalDocumentationEvidenceSubjectRef.APPLICATION_A2A_AGENT_SURFACE,\n derivedAt,\n ),\n outboundWebhookSurfaceObservation(input.operations, derivedAt),\n outboundWebhookSignatureContractObservation(engineCatalog, derivedAt),\n admittedResourceSurfaceObservation(\n input.operations,\n derivedAt,\n TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_SIEM_EXPORT,\n ORGANIZATION_SIEM_EXPORT_RESOURCE_IDENTIFIERS,\n ),\n admittedResourceSurfaceObservation(\n input.operations,\n derivedAt,\n TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_SIEM_DELIVERY_RECOVERY,\n ORGANIZATION_SIEM_RECOVERY_RESOURCE_IDENTIFIERS,\n ),\n admittedResourceSurfaceObservation(\n input.operations,\n derivedAt,\n TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_BILLING_ADMINISTRATION,\n ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS,\n ),\n ],\n });\n const privateDerivation = createTechnicalDocumentationPrivateDerivation({\n engineContentBundle: loadApplicationConsumerDocumentationContentBundleV1(),\n environmentEvidenceSnapshot,\n engineSpecificationCatalog: engineCatalog,\n engineSpecificationCatalogIdentity: engineCatalog.identity,\n applicationOrganizationRolesFact: createApplicationOrganizationRolesDocumentationFact(input.organizationRoles),\n applicationOrganizationUnitResourcesFact: createApplicationOrganizationUnitResourcesDocumentationFact(\n input.organizationUnitAwareResources,\n ),\n derivationRef: FRAMEWORK_DOCUMENTATION_DERIVATION_REF,\n derivationVersion: FRAMEWORK_DOCUMENTATION_DERIVATION_VERSION,\n derivedAt,\n });\n const publicBundle = projectTechnicalDocumentationAuthorizedBundle({\n privateDerivation,\n channel: TechnicalDocumentationChannel.PUBLIC_PORTAL,\n policyRef: APPLICATION_DOCUMENTATION_POLICY_REF,\n policyVersion: APPLICATION_DOCUMENTATION_POLICY_VERSION,\n bundleRef: APPLICATION_DOCUMENTATION_BUNDLE_REF,\n bundleVersion: APPLICATION_DOCUMENTATION_POLICY_VERSION,\n });\n\n return Object.freeze({ privateDerivation, publicBundle });\n }\n}\n\n/**\n * Records whether the application's final executable declaration contains a\n * usable integration surface. This is configuration evidence, not a health\n * claim: publication never pretends that a live MCP or A2A request was made.\n */\nfunction configuredAgentSurfaceObservation(\n configured: boolean,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef.APPLICATION_MCP_TOOL_SURFACE\n | TechnicalDocumentationEvidenceSubjectRef.APPLICATION_A2A_AGENT_SURFACE,\n observedAt: string,\n): TechnicalDocumentationEvidenceObservationV1 {\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.CONFIGURED_ACTIVATION,\n subjectRef,\n status: configured\n ? TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN\n : TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN,\n reason: configured\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.CONFIGURATION,\n authorityRef: APPLICATION_STARTUP_CONFIGURATION_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\n/**\n * Proves a customer-facing documentation journey only when every resource that\n * makes that journey executable is present in the application's admitted API\n * projection. Framework registration alone is intentionally insufficient.\n */\nfunction admittedResourceSurfaceObservation(\n operations: readonly OperationProjection[],\n observedAt: string,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef,\n requiredResourceIdentifiers: readonly string[],\n): TechnicalDocumentationEvidenceObservationV1 {\n const exposedResourceIdentifiers = [...new Set(operations.map((operation) => operation.resourceIdentifier))]\n .filter((resourceIdentifier) => requiredResourceIdentifiers.includes(resourceIdentifier))\n .sort();\n const required = [...requiredResourceIdentifiers].sort();\n const exposed = required.every((resourceIdentifier) => exposedResourceIdentifiers.includes(resourceIdentifier));\n\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.EXPOSED_API_SURFACE,\n subjectRef,\n status: exposed ? TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN : TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN,\n reason: exposed\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.MATERIALIZED_ARTIFACT,\n authorityRef: OPERATION_PROJECTION_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\n/**\n * Introspection evidence that the generated application exposes an outbound\n * webhook configuration surface. The operation list is a materialized\n * companion-export artifact, not an accepted application specification.\n */\nfunction outboundWebhookSurfaceObservation(\n operations: readonly OperationProjection[],\n observedAt: string,\n): TechnicalDocumentationEvidenceObservationV1 {\n const exposedResourceIdentifiers = [...new Set(\n operations\n .map((operation) => operation.resourceIdentifier)\n .filter((resourceIdentifier) => OUTBOUND_WEBHOOK_SURFACE_RESOURCE_IDENTIFIERS.includes(resourceIdentifier)),\n )].sort();\n const exposed = exposedResourceIdentifiers.length > 0;\n\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.EXPOSED_API_SURFACE,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef.OUTBOUND_M2M_DELIVERY,\n status: exposed\n ? TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN\n : TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN,\n reason: exposed\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.MATERIALIZED_ARTIFACT,\n authorityRef: OPERATION_PROJECTION_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\n/** Engine-catalog evidence that the documented signature contract still exists. */\nexport function outboundWebhookSignatureContractObservation(\n catalog: EngineDocumentationSpecificationCatalogV1,\n observedAt: string,\n): TechnicalDocumentationEvidenceObservationV1 {\n const entry = catalog.identity.entries.find(\n (candidate) => candidate.sourceRef === ENGINE_DOCUMENTATION_OUTBOUND_WEBHOOK_SIGNATURE_SOURCE_REF,\n );\n\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.ENGINE_SUPPORT,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef.OUTBOUND_M2M_SIGNATURE,\n status: entry === undefined\n ? TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN\n : TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN,\n reason: entry === undefined\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.ENGINE_CONTENT_REGISTRY,\n authorityRef: ENGINE_CONTENT_CATALOG_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\nfunction digest(canonicalJson: string): string {\n return `sha256:${createHash('sha256').update(canonicalJson).digest('hex')}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"technical-documentation-application-derivation.companion.service.js","sourceRoot":"","sources":["../../../../../src/technical-doc/services/technical-documentation-application-derivation.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,0DAA0D,EAC1D,+CAA+C,GAEhD,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,+CAA+C,EAC/C,iDAAiD,EACjD,iDAAiD,EACjD,6BAA6B,EAC7B,2CAA2C,EAC3C,wCAAwC,EAExC,yDAAyD,GAI1D,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,6CAA6C,EAC7C,mDAAmD,EACnD,6CAA6C,EAC7C,mDAAmD,EACnD,2DAA2D,EAI3D,yCAAyC,EACzC,6CAA6C,EAC7C,6CAA6C,EAC7C,0CAA0C,GAM3C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAOjF,MAAM,oCAAoC,GAAG,+DAA+D,CAAC;AAC7G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AC,MAAM;QAC5D,MAAM,EAAE,KAAK,KAAK,SAAS;YACzB,CAAC,CAAC,iDAAiD,CAAC,+BAA+B;YACnF,CAAC,CAAC,iDAAiD,CAAC,+BAA+B;QACrF,aAAa,EAAE,2CAA2C,CAAC,uBAAuB;QAClF,YAAY,EAAE,oCAAoC;QAClD,gBAAgB,EAAE,CAAC;QACnB,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,IAAI;QACjB,UAAU;QACV,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,aAAqB;IACnC,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAC9E,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\n\nimport { CoreResourceType } from '@wildo-ai/saas-models';\nimport {\n ENGINE_DOCUMENTATION_OUTBOUND_WEBHOOK_SIGNATURE_SOURCE_REF,\n createEngineDocumentationSpecificationCatalogV1,\n type EngineDocumentationSpecificationCatalogV1,\n} from '@wildo-ai/saas-specifications/companion';\nimport {\n TechnicalDocumentationApplicabilityEvidenceAxis,\n TechnicalDocumentationApplicabilityEvidenceReason,\n TechnicalDocumentationApplicabilityEvidenceStatus,\n TechnicalDocumentationChannel,\n TechnicalDocumentationEvidenceAuthorityKind,\n TechnicalDocumentationEvidenceSubjectRef,\n canonicalizeTechnicalDocumentationJson,\n createTechnicalDocumentationEnvironmentEvidenceSnapshotV1,\n type TechnicalDocumentationAuthorizedBundleManifestV1,\n type TechnicalDocumentationEvidenceObservationV1,\n type TechnicalDocumentationPrivateDerivationManifestV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\nimport {\n createTechnicalDocumentationPrivateDerivation,\n loadApplicationConsumerDocumentationContentBundleV1,\n projectTechnicalDocumentationAuthorizedBundle,\n createApplicationOrganizationRolesDocumentationFact,\n createApplicationOrganizationUnitResourcesDocumentationFact,\n type ApplicationOrganizationRoleDocumentation,\n type ApplicationOrganizationUnitResourceDocumentation,\n type OperationProjection,\n projectApplicationConnectionDocumentation,\n projectApplicationAuthenticationDocumentation,\n projectApplicationAdministrationDocumentation,\n projectApplicationIntegrationDocumentation,\n type ApplicationConnectionServer,\n type ApplicationAuthenticationDocumentationSource,\n type ApplicationAdministrationActionSource,\n type ApplicationAdministrationDocumentationSource,\n type ApplicationIntegrationDocumentationSource,\n} from '@wildo-ai/saas-technical-doc/companion';\nimport { inject, injectable } from 'inversify';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\n\nimport type {\n TechnicalDocumentationEnvironmentIdentityCompanionService,\n TechnicalDocumentationEnvironmentIdentityInput,\n} from './technical-documentation-environment-identity.companion.service';\n\nconst APPLICATION_DOCUMENTATION_POLICY_REF = 'technical-documentation:policy/application-consumer-public-v1';\nconst APPLICATION_DOCUMENTATION_POLICY_VERSION = 1;\nconst OPERATION_PROJECTION_AUTHORITY_REF = 'technical-documentation:authority/derived-operation-projection';\nconst APPLICATION_STARTUP_CONFIGURATION_AUTHORITY_REF = 'technical-documentation:authority/final-application-startup-configuration';\nconst ENGINE_CONTENT_CATALOG_AUTHORITY_REF = 'technical-documentation:authority/engine-documentation-specification-catalog';\n\n/**\n * Identifies the deliberately small framework-content derivation implemented by this service. It\n * includes only narrow, source-owned application projections: resolved organization roles and\n * resources explicitly narrowed by units. Use cases and editorial overlays remain for the\n * unfinished app-creator flow.\n *\n * This was a sha256 over a hand-listed inventory of the projectors involved until 2026-08-27 —\n * a pin nothing compared, whose only reader-visible property was that it changed when someone\n * edited the list. `ref@version` says the same thing and can be looked up.\n */\nconst FRAMEWORK_DOCUMENTATION_DERIVATION_REF = 'technical-documentation:derivation/framework-content-v1';\nconst FRAMEWORK_DOCUMENTATION_DERIVATION_VERSION = 1;\nconst APPLICATION_DOCUMENTATION_BUNDLE_REF = 'technical-documentation:bundle/application-consumer-public';\n\n/**\n * These resource registrations prove that the application exposes an outbound\n * webhook configuration surface. This is framework capability introspection,\n * not application-authored documentation.\n */\nconst OUTBOUND_WEBHOOK_SURFACE_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.APPLICATION_WEBHOOK_CONFIG,\n CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG,\n]);\nconst ORGANIZATION_SIEM_EXPORT_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG,\n]);\nconst ORGANIZATION_SIEM_RECOVERY_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ,\n]);\nconst ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS: readonly string[] = Object.freeze([\n CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n CoreResourceType.ORGANIZATION_SUBSCRIPTIONS,\n]);\n\n/**\n * The administrative matrix, joined from two things the derivation already has: the operations this\n * application admits, and its own role labels.\n *\n * Only ADMITTED operations are considered — the same inventory that gates every other page — so an\n * action this application does not publish never appears. Role identifiers are resolved to the\n * application's labels; an identifier with no label falls back to the identifier itself rather than\n * being dropped, because a reader is better served by an unfamiliar name than by a silently short\n * list. Repository-only and internal variants are excluded: they are not doors anyone can open.\n */\nfunction administrationSourceFromOperations(\n operations: readonly OperationProjection[],\n organizationRoles: readonly ApplicationOrganizationRoleDocumentation[],\n): ApplicationAdministrationDocumentationSource {\n const labelByRole = new Map(organizationRoles.map((role) => [role.role, role.label]));\n const collect = (resourceIdentifiers: readonly string[]): ApplicationAdministrationActionSource[] => {\n const seen = new Set<string>();\n const actions: ApplicationAdministrationActionSource[] = [];\n for (const operation of operations) {\n if (!resourceIdentifiers.includes(operation.resourceIdentifier)) continue;\n const action = operation.summary?.trim();\n if (action === undefined || action.length === 0 || seen.has(action)) continue;\n seen.add(action);\n actions.push({\n action,\n roleLabels: operation.roles.map((role) => labelByRole.get(role) ?? role),\n openToEveryMember: operation.roles.length === 0,\n });\n }\n return actions;\n };\n return {\n memberActions: collect([CoreResourceType.ORGANIZATION_MEMBERS]),\n organizationUnitActions: collect([CoreResourceType.ORGANIZATION_UNITS, CoreResourceType.ORGANIZATION_UNIT_MEMBERS]),\n };\n}\n\nexport interface TechnicalDocumentationApplicationDerivationInput extends TechnicalDocumentationEnvironmentIdentityInput {\n readonly operations: readonly OperationProjection[];\n readonly hasConfiguredMcpToolOperations: boolean;\n readonly hasConfiguredA2aSkills: boolean;\n readonly organizationRoles: readonly ApplicationOrganizationRoleDocumentation[];\n readonly organizationUnitAwareResources: readonly ApplicationOrganizationUnitResourceDocumentation[];\n /**\n * The application's own name and published base URLs. The agent surfaces are NOT passed\n * separately: they are read from the same two flags that gate the MCP and A2A pages, so an\n * address can never be printed for a surface whose pages this application does not publish.\n */\n readonly applicationName: string;\n readonly apiServers: readonly ApplicationConnectionServer[];\n /** Per-user-type sign-in policy, read from the application's own configuration. */\n readonly authentication: ApplicationAuthenticationDocumentationSource;\n /** The tools and events this application publishes, from the same walk that gates those pages. */\n readonly integration: ApplicationIntegrationDocumentationSource;\n}\n\nexport interface TechnicalDocumentationApplicationDerivationResult {\n readonly privateDerivation: TechnicalDocumentationPrivateDerivationManifestV1;\n readonly publicBundle: TechnicalDocumentationAuthorizedBundleManifestV1;\n}\n\n/**\n * Creates the public documentation bundle from engine-owned content and\n * framework introspection plus the resolved organization-role configuration.\n *\n * The resolved operation catalog contributes capability evidence, but accepted\n * application projections and family registries are not inputs. In particular,\n * this path does not select a resource, workflow, persona, recipe, or use case.\n */\n@injectable()\nexport class TechnicalDocumentationApplicationDerivationCompanionService {\n public constructor(\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocumentationEnvironmentIdentityService)\n private readonly environmentIdentity: TechnicalDocumentationEnvironmentIdentityCompanionService,\n ) {}\n\n public async deriveAuthorizedBundles(\n input: TechnicalDocumentationApplicationDerivationInput,\n ): Promise<TechnicalDocumentationApplicationDerivationResult> {\n const derivationEnvironment = this.environmentIdentity.resolveDerivationEnvironment(input);\n const derivedAt = derivationEnvironment.derivedAt;\n\n const engineCatalog = createEngineDocumentationSpecificationCatalogV1();\n const environmentEvidenceSnapshot = createTechnicalDocumentationEnvironmentEvidenceSnapshotV1({\n schemaVersion: 1,\n environmentRef: derivationEnvironment.environmentRef,\n freshnessEvaluatedAt: derivedAt,\n observations: [\n configuredAgentSurfaceObservation(\n input.hasConfiguredMcpToolOperations,\n TechnicalDocumentationEvidenceSubjectRef.APPLICATION_MCP_TOOL_SURFACE,\n derivedAt,\n ),\n configuredAgentSurfaceObservation(\n input.hasConfiguredA2aSkills,\n TechnicalDocumentationEvidenceSubjectRef.APPLICATION_A2A_AGENT_SURFACE,\n derivedAt,\n ),\n outboundWebhookSurfaceObservation(input.operations, derivedAt),\n outboundWebhookSignatureContractObservation(engineCatalog, derivedAt),\n admittedResourceSurfaceObservation(\n input.operations,\n derivedAt,\n TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_SIEM_EXPORT,\n ORGANIZATION_SIEM_EXPORT_RESOURCE_IDENTIFIERS,\n ),\n admittedResourceSurfaceObservation(\n input.operations,\n derivedAt,\n TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_SIEM_DELIVERY_RECOVERY,\n ORGANIZATION_SIEM_RECOVERY_RESOURCE_IDENTIFIERS,\n ),\n admittedResourceSurfaceObservation(\n input.operations,\n derivedAt,\n TechnicalDocumentationEvidenceSubjectRef.ORGANIZATION_BILLING_ADMINISTRATION,\n ORGANIZATION_BILLING_RESOURCE_IDENTIFIERS,\n ),\n ],\n });\n const privateDerivation = createTechnicalDocumentationPrivateDerivation({\n engineContentBundle: loadApplicationConsumerDocumentationContentBundleV1(),\n environmentEvidenceSnapshot,\n engineSpecificationCatalog: engineCatalog,\n engineSpecificationCatalogIdentity: engineCatalog.identity,\n applicationOrganizationRolesFact: createApplicationOrganizationRolesDocumentationFact(input.organizationRoles),\n applicationOrganizationUnitResourcesFact: createApplicationOrganizationUnitResourcesDocumentationFact(\n input.organizationUnitAwareResources,\n ),\n applicationAuthenticationFact: projectApplicationAuthenticationDocumentation(input.authentication),\n applicationIntegrationFact: projectApplicationIntegrationDocumentation(input.integration),\n applicationAdministrationFact: projectApplicationAdministrationDocumentation(\n administrationSourceFromOperations(input.operations, input.organizationRoles),\n ),\n applicationConnectionFact: projectApplicationConnectionDocumentation({\n applicationName: input.applicationName,\n apiServers: input.apiServers,\n surfaces: {\n mcpToolServer: input.hasConfiguredMcpToolOperations,\n a2aAgent: input.hasConfiguredA2aSkills,\n },\n }),\n derivationRef: FRAMEWORK_DOCUMENTATION_DERIVATION_REF,\n derivationVersion: FRAMEWORK_DOCUMENTATION_DERIVATION_VERSION,\n derivedAt,\n });\n const publicBundle = projectTechnicalDocumentationAuthorizedBundle({\n privateDerivation,\n channel: TechnicalDocumentationChannel.PUBLIC_PORTAL,\n policyRef: APPLICATION_DOCUMENTATION_POLICY_REF,\n policyVersion: APPLICATION_DOCUMENTATION_POLICY_VERSION,\n bundleRef: APPLICATION_DOCUMENTATION_BUNDLE_REF,\n bundleVersion: APPLICATION_DOCUMENTATION_POLICY_VERSION,\n });\n\n return Object.freeze({ privateDerivation, publicBundle });\n }\n}\n\n/**\n * Records whether the application's final executable declaration contains a\n * usable integration surface. This is configuration evidence, not a health\n * claim: publication never pretends that a live MCP or A2A request was made.\n */\nfunction configuredAgentSurfaceObservation(\n configured: boolean,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef.APPLICATION_MCP_TOOL_SURFACE\n | TechnicalDocumentationEvidenceSubjectRef.APPLICATION_A2A_AGENT_SURFACE,\n observedAt: string,\n): TechnicalDocumentationEvidenceObservationV1 {\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.CONFIGURED_ACTIVATION,\n subjectRef,\n status: configured\n ? TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN\n : TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN,\n reason: configured\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.CONFIGURATION,\n authorityRef: APPLICATION_STARTUP_CONFIGURATION_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\n/**\n * Proves a customer-facing documentation journey only when every resource that\n * makes that journey executable is present in the application's admitted API\n * projection. Framework registration alone is intentionally insufficient.\n */\nfunction admittedResourceSurfaceObservation(\n operations: readonly OperationProjection[],\n observedAt: string,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef,\n requiredResourceIdentifiers: readonly string[],\n): TechnicalDocumentationEvidenceObservationV1 {\n const exposedResourceIdentifiers = [...new Set(operations.map((operation) => operation.resourceIdentifier))]\n .filter((resourceIdentifier) => requiredResourceIdentifiers.includes(resourceIdentifier))\n .sort();\n const required = [...requiredResourceIdentifiers].sort();\n const exposed = required.every((resourceIdentifier) => exposedResourceIdentifiers.includes(resourceIdentifier));\n\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.EXPOSED_API_SURFACE,\n subjectRef,\n status: exposed ? TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN : TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN,\n reason: exposed\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.MATERIALIZED_ARTIFACT,\n authorityRef: OPERATION_PROJECTION_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\n/**\n * Introspection evidence that the generated application exposes an outbound\n * webhook configuration surface. The operation list is a materialized\n * companion-export artifact, not an accepted application specification.\n */\nfunction outboundWebhookSurfaceObservation(\n operations: readonly OperationProjection[],\n observedAt: string,\n): TechnicalDocumentationEvidenceObservationV1 {\n const exposedResourceIdentifiers = [...new Set(\n operations\n .map((operation) => operation.resourceIdentifier)\n .filter((resourceIdentifier) => OUTBOUND_WEBHOOK_SURFACE_RESOURCE_IDENTIFIERS.includes(resourceIdentifier)),\n )].sort();\n const exposed = exposedResourceIdentifiers.length > 0;\n\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.EXPOSED_API_SURFACE,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef.OUTBOUND_M2M_DELIVERY,\n status: exposed\n ? TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN\n : TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN,\n reason: exposed\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.MATERIALIZED_ARTIFACT,\n authorityRef: OPERATION_PROJECTION_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\n/** Engine-catalog evidence that the documented signature contract still exists. */\nexport function outboundWebhookSignatureContractObservation(\n catalog: EngineDocumentationSpecificationCatalogV1,\n observedAt: string,\n): TechnicalDocumentationEvidenceObservationV1 {\n const entry = catalog.identity.entries.find(\n (candidate) => candidate.sourceRef === ENGINE_DOCUMENTATION_OUTBOUND_WEBHOOK_SIGNATURE_SOURCE_REF,\n );\n\n return {\n axis: TechnicalDocumentationApplicabilityEvidenceAxis.ENGINE_SUPPORT,\n subjectRef: TechnicalDocumentationEvidenceSubjectRef.OUTBOUND_M2M_SIGNATURE,\n status: entry === undefined\n ? TechnicalDocumentationApplicabilityEvidenceStatus.DISPROVEN\n : TechnicalDocumentationApplicabilityEvidenceStatus.PROVEN,\n reason: entry === undefined\n ? TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_NEGATIVE_EVIDENCE\n : TechnicalDocumentationApplicabilityEvidenceReason.AUTHORITATIVE_POSITIVE_EVIDENCE,\n authorityKind: TechnicalDocumentationEvidenceAuthorityKind.ENGINE_CONTENT_REGISTRY,\n authorityRef: ENGINE_CONTENT_CATALOG_AUTHORITY_REF,\n authorityVersion: 1,\n runtimeScopeRef: null,\n hostRef: null,\n hasEvidence: true,\n observedAt,\n validUntil: null,\n };\n}\n\nfunction digest(canonicalJson: string): string {\n return `sha256:${createHash('sha256').update(canonicalJson).digest('hex')}`;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildo-ai/dev-companion",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Wildo.ai Dev Companion — local development management and introspection service. Canonical source home; applications receive only the built dist below their .wildo-saas/wildo-dev-companion drop.",
|
|
5
5
|
"author": "Wildo AI",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -32,22 +32,22 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@react-email/components": "^1.0.8",
|
|
34
34
|
"@react-email/render": "^2.0.4",
|
|
35
|
-
"@wildo-ai/application-creation-runtime": "1.1.
|
|
36
|
-
"@wildo-ai/external-connectors-models": "1.1.
|
|
37
|
-
"@wildo-ai/framework-knowledge": "1.1.
|
|
38
|
-
"@wildo-ai/platform-config-lib": "1.1.
|
|
39
|
-
"@wildo-ai/platform-core-backend": "1.1.
|
|
40
|
-
"@wildo-ai/platform-core-shared": "1.1.
|
|
41
|
-
"@wildo-ai/platform-shared-lib": "1.1.
|
|
42
|
-
"@wildo-ai/presets-components-models": "1.1.
|
|
43
|
-
"@wildo-ai/saas-backend-lib": "1.1.
|
|
44
|
-
"@wildo-ai/saas-frontend-lib": "1.1.
|
|
45
|
-
"@wildo-ai/saas-models": "1.1.
|
|
46
|
-
"@wildo-ai/saas-specifications": "1.1.
|
|
47
|
-
"@wildo-ai/saas-technical-doc": "1.1.
|
|
48
|
-
"@wildo-ai/saas-website": "1.1.
|
|
49
|
-
"@wildo-ai/wildo-module-client": "1.1.
|
|
50
|
-
"@wildo-ai/zod-decorators": "1.1.
|
|
35
|
+
"@wildo-ai/application-creation-runtime": "1.1.2",
|
|
36
|
+
"@wildo-ai/external-connectors-models": "1.1.2",
|
|
37
|
+
"@wildo-ai/framework-knowledge": "1.1.2",
|
|
38
|
+
"@wildo-ai/platform-config-lib": "1.1.2",
|
|
39
|
+
"@wildo-ai/platform-core-backend": "1.1.2",
|
|
40
|
+
"@wildo-ai/platform-core-shared": "1.1.2",
|
|
41
|
+
"@wildo-ai/platform-shared-lib": "1.1.2",
|
|
42
|
+
"@wildo-ai/presets-components-models": "1.1.2",
|
|
43
|
+
"@wildo-ai/saas-backend-lib": "1.1.2",
|
|
44
|
+
"@wildo-ai/saas-frontend-lib": "1.1.2",
|
|
45
|
+
"@wildo-ai/saas-models": "1.1.2",
|
|
46
|
+
"@wildo-ai/saas-specifications": "1.1.2",
|
|
47
|
+
"@wildo-ai/saas-technical-doc": "1.1.2",
|
|
48
|
+
"@wildo-ai/saas-website": "1.1.2",
|
|
49
|
+
"@wildo-ai/wildo-module-client": "1.1.2",
|
|
50
|
+
"@wildo-ai/zod-decorators": "1.1.2",
|
|
51
51
|
"big.js": "^6.2.2",
|
|
52
52
|
"cors": "^2.8.5",
|
|
53
53
|
"date-fns": "^4.1.0",
|
package/dist/esm/.builder.pid
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"writerPid": 95323,
|
|
4
|
-
"orchestratorPid": 94847,
|
|
5
|
-
"orchestratorSessionId": null,
|
|
6
|
-
"orchestratorStartedAt": "Mon Aug 31 09:18:19 2026",
|
|
7
|
-
"distDirectory": "/Users/paulcayon/Projects/Wildo.ai/dev/wildo-ai/platform/factory/wildo-dev-companion/dist/esm",
|
|
8
|
-
"acquiredAt": "2026-08-31T07:18:20.843Z"
|
|
9
|
-
}
|