@wildo-ai/dev-companion 1.1.2 → 1.1.4
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/__tests__/asset-noop.d.ts.map +1 -1
- package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +1 -1
- package/dist/esm/__tests__/internal-test-view.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-creative-brief.schemas.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +9 -3
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
- package/dist/esm/brand/models/logo-judge.schemas.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts +3 -24
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.js +10 -48
- package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
- package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/logo-deliberation.companion.service.js +2 -8
- package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
- package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
- package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
- package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
- package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
- package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
- package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
- package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
- package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
- package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
- package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
- package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +52 -2
- 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 +45 -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 +45 -5
- 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 +180 -9
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +12 -22
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js +151 -82
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +30 -4
- 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 +30 -4
- 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 +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/code-compliance-check/check-label-placeholder-contract.companion.d.ts.map +1 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +57 -57
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-i18n-api-contract.utils.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +98 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +32 -5
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +126 -41
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +8 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.js +8 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
- package/dist/esm/core/catalogs/catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/catalog-context.factory.models.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/aggregate-offer-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/aggregate-rating-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/article-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/blog-posting-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/breadcrumb-list-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/faq-page-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/offer-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/organization-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/product-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/review-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
- package/dist/esm/core/catalogs/schema-org/software-application-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/website-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
- package/dist/esm/core/context/companion-context.d.ts.map +1 -1
- package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.js +0 -7
- package/dist/esm/core/inject/models/container.js.map +1 -1
- package/dist/esm/core/inject/models/service-types.d.ts +0 -1
- package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/core/inject/models/service-types.js +0 -1
- 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/models/companion-introspection.models.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +8 -4
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection-behavior-registry.companion.service.d.ts.map +1 -1
- 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 +42 -1
- 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.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-register.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/brand-prompt-renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/chart-registration-refs.behavior.d.ts.map +1 -1
- 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 +3 -2
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-child.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-module-exports.utils.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/definition-specifications.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/market-context-block.builder.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/market-prompt-renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +38 -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 +143 -19
- 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.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/models/companion-runtime.models.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +16 -13
- 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 +70 -45
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-local-signing-key.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +9 -2
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-workbench-topology.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/platform-core-domain-modules.companion.d.ts.map +1 -1
- package/dist/esm/core/specifications/chart-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/composite-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/execution-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/feature-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/flows-actors-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/frontend-component-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/full-custom-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/milestone-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/product-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/role-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.models.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/system-email-template-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/validate-resource-field-completeness.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +4 -4
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
- package/dist/esm/core/utils/atomic-write.utils.d.ts.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.js +0 -5
- package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +0 -2
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
- package/dist/esm/deliberations/utils/load-committed-expert-agents.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
- package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +23 -1
- package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
- package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +15 -2
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.schemas.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +9 -24
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js +11 -60
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_MENUBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NAVIGATION_BACK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_TOOLBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_ACTION_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CHAIN_OF_THOUGHT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CODE_BLOCK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_EXECUTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_NODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_INLINE_CITATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_OPEN_IN_CHAT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_PLAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_PROMPT_INPUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BREADCRUMB.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BUTTON.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CAROUSEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CELEBRATION_OVERLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DIALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BOOLEAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_DURATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_GALLERY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_VIDEO.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_MONEY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_LOCK_BADGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_BOOLEAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_PHONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_IMAGE_CROP.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_LOADING_OVERLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_LOADING_SPINNER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OVERLAY_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_PAGINATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SELECT_MULTIPLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SHEET.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_PAGINATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_announcement.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_banner.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_card.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_modal.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_tooltip.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_tour.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -1
- package/dist/esm/i18n/index.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +58 -0
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js +35 -0
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
- package/dist/esm/i18n-labelling/services/component-labels-bootstrap.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +55 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +178 -73
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +3 -3
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +16 -5
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +35 -2
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +68 -29
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +126 -35
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/role-lifecycle-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +104 -0
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +163 -18
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/translate-locale-contract.utils.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/market/services/market-generation.companion.service.d.ts.map +1 -1
- 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 +72 -0
- 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.map +1 -1
- 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 +17 -4
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +25 -5
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +9 -4
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +3 -9
- 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 +48 -28
- 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 +83 -2
- 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 +197 -4
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-execution-trace.companion.service.d.ts.map +1 -1
- 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.companion.service.d.ts +37 -1
- 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 +227 -15
- 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.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +117 -2
- 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 +258 -69
- 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 +5 -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 +142 -10
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-environment-identity.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot-assets.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +10 -2
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
- package/package.json +17 -17
- package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
- package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
- package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
- package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
- package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
- package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
- package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
- package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +0 -19
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +0 -19
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
|
@@ -173,6 +173,29 @@ let WildoSaasLockCompanionService = class WildoSaasLockCompanionService {
|
|
|
173
173
|
const file = await this.read();
|
|
174
174
|
return file.sections.i18n;
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Insert or replace one unit's i18n lock entry.
|
|
178
|
+
*
|
|
179
|
+
* **Additive only, and there is deliberately NO removal counterpart.** A unit
|
|
180
|
+
* row outlives the unit — rename a resource and the old `resource:todoLists`
|
|
181
|
+
* row stays forever, alongside its generated label files. That leak is known
|
|
182
|
+
* and is reported rather than repaired: see `OrphanLabelArtifactsReport` in
|
|
183
|
+
* `i18n-labelling/utils/orphan-label-artifacts.utils.ts` for the measurement
|
|
184
|
+
* and the reasoning.
|
|
185
|
+
*
|
|
186
|
+
* The short version, so nobody adds the obvious `removeI18nUnit` here as a
|
|
187
|
+
* tidy-up: the only available answer to "does this unit still exist?" is the
|
|
188
|
+
* planner's unit list, and that list degrades SILENTLY — a frontend
|
|
189
|
+
* introspection that could not run drops four whole label families from it
|
|
190
|
+
* while looking exactly like an application that has none. A removal API on
|
|
191
|
+
* this service would be called from there, so it would delete lock rows for
|
|
192
|
+
* live units on any run where the frontend dev server was down. Build the
|
|
193
|
+
* removal when the plan's totality is established rather than assumed, and
|
|
194
|
+
* make it an explicit operator verb rather than a side effect of generation.
|
|
195
|
+
*
|
|
196
|
+
* `trackedLocales` is likewise a UNION and never shrinks, which is why it
|
|
197
|
+
* cannot serve as the denominator for "this locale was dropped".
|
|
198
|
+
*/
|
|
176
199
|
async upsertI18nUnit(unitId, entry,
|
|
177
200
|
// Only labellize should set / change the section's primary locale.
|
|
178
201
|
// Translate passes `undefined` so locale updates do not rewrite the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wildo-saas-lock.companion.service.js","sourceRoot":"","sources":["../../../../../src/core/lock/wildo-saas-lock.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EACL,aAAa,GAId,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEI,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAIc;IACe;IAJpD,QAAQ,CAA+D;IAExF,YACsD,MAAqB,EACN,gBAAkC;QADjD,WAAM,GAAN,MAAM,CAAe;QACN,qBAAgB,GAAhB,gBAAgB,CAAkB;Q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AAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,MAAM,MAAM,GAA4B,EAAE,CAAC;YAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAA4B,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBACnE,MAAM,CAAC,GAAG,CAAC,GAAI,CAA6B,CAAC,GAAG,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { inject, injectable } from 'inversify';\nimport { ZodError } from 'zod';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport {\n RegistryLockfileRepairableError,\n WILDO_SAAS_LOCK_RELATIVE_PATH,\n getWildoSaasLockPath,\n withLockfileMutate,\n readWildoSaasLock,\n type SaasLockfileEnvelope,\n} from '@wildo-ai/platform-config-lib';\nimport { COMPANION_SERVICE_TYPES } from '../inject/models/service-types';\nimport type { CompanionContext } from '../context/companion-context';\nimport {\n emptyLockFile,\n type WildoSaasLockFile,\n type I18nLockSection,\n type I18nLockUnitEntry,\n} from './wildo-saas-lock.models';\nimport { I18nLockSectionSchema } from './wildo-saas-lock.schemas';\n\n/**\n * Read/write access to `<saasRoot>/.wildo-saas/wildo-saas.lock.json`.\n *\n * Phase 1 refactor (`module-registry-analysis.md`): the companion\n * delegates locking + atomic-write to\n * `@wildo-ai/platform-config-lib`'s `withLockfileMutate(...)`. The\n * shared primitive uses `proper-lockfile` (cross-process safe) +\n * `write-file-atomic` (fsync-safe), validated by the Phase 0.B\n * contention spike.\n *\n * Removed:\n * - `writeChain` — the OS-level lock subsumes the in-memory\n * write serialization.\n * - `cached` — every read goes under the lock so cross-process\n * readers and the CLI never observe a stale cache.\n *\n * Preserved (call-sites depend on it):\n * - `mutate(file => void)` — full-envelope callback API for\n * orchestrators that need cross-section visibility.\n * - `invalidateCache(): void` — kept as a documented no-op\n * (Review-pass-4 / MEDIUM-FF). The shared library does not\n * cache; calling `invalidateCache()` is a hint with no effect.\n * - `readI18nSection`, `upsertI18nUnit`, `hashString`,\n * `hashFingerprint` — public API surface consumed by\n * `LabellizeOrchestrator` and `TranslateOrchestrator`.\n *\n * Phase 1 review hardening:\n * - H-1.1: `read()` no longer swallows ZodError into an empty\n * envelope (which silently destroyed sibling sections on\n * overwrite). Malformed envelopes throw\n * `RegistryLockfileRepairableError`; only ENOENT falls back to\n * `emptyLockFile()`.\n * - M-1.1: every read + mutate threads\n * `sectionSchemas: { i18n: I18nLockSectionSchema }` so the\n * companion-owned section is validated on the boundary.\n * - M-1.3: dead `envelope.sections = view.sections` line removed\n * (the cast already shares the underlying reference).\n * - L-1.2: file path comes from the shared\n * `getWildoSaasLockPath(saasRoot)` helper, removing the\n * companion-local `WILDO_SAAS_LOCK_FILE_NAME` constant drift.\n */\n@injectable()\nexport class WildoSaasLockCompanionService {\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(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n ) {\n this.logDebug = this.logger.debugByType('WildoSaasLockService');\n }\n\n public getLockFilePath(): string {\n return getWildoSaasLockPath(this.companionContext.saasRoot);\n }\n\n /**\n * Read the current lockfile envelope. Unsynchronized — callers\n * needing read-after-write coherence must read INSIDE\n * `mutate(...)`.\n *\n * Returns an empty envelope when the file does not yet exist\n * (ENOENT). Throws `RegistryLockfileRepairableError` when the\n * file exists but fails Zod schema validation, so the\n * orchestrator surfaces a repairable diagnostic rather than\n * silently overwriting valid sibling sections.\n */\n public async read(): Promise<WildoSaasLockFile> {\n try {\n const envelope = await readWildoSaasLock({\n saasRoot: this.companionContext.saasRoot,\n sectionSchemas: { i18n: I18nLockSectionSchema },\n createIfMissing: true,\n });\n // The two envelope types are structurally compatible — both\n // are `{ schemaVersion: 2, generatedAt, sections }`. The\n // companion's `WildoSaasLockFile` types `sections` more\n // permissively than the shared schema, so a downcast is safe.\n return envelopeToWildoSaasLockFile(envelope);\n } catch (err: unknown) {\n if (err instanceof ZodError) {\n throw new RegistryLockfileRepairableError(\n `wildo-saas.lock.json failed schema validation. Run \\`wildo registry repair-lockfile\\` to inspect.`,\n [\n `at: ${this.getLockFilePath()}`,\n ...err.issues.slice(0, 5).map(\n (issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`,\n ),\n ],\n );\n }\n const errno = (err as NodeJS.ErrnoException)?.code;\n if (errno === 'ENOENT') {\n return emptyLockFile();\n }\n // Anything else (EACCES, EIO, JSON.parse SyntaxError, ...) is\n // a real bug; do not silently overwrite the file.\n throw err;\n }\n }\n\n /**\n * Atomically apply a mutation to the lock file under an OS-level\n * lock + atomic-write commit. The mutator receives a deep-cloned\n * envelope; in-place mutation is safe.\n *\n * Cross-section preservation guarantees (KD-4 / KD-15 / KD-18) are\n * inherited from `withLockfileMutate`: every `sections.*` key the\n * mutator did NOT touch round-trips verbatim. The companion-owned\n * `sections.i18n` schema is validated on read AND post-mutation,\n * so a buggy mutator can never persist an invalid i18n payload.\n */\n public async mutate(\n mutator: (file: WildoSaasLockFile) => void | Promise<void>,\n ): Promise<WildoSaasLockFile> {\n const result = await withLockfileMutate(\n {\n saasRoot: this.companionContext.saasRoot,\n sectionSchemas: { i18n: I18nLockSectionSchema },\n },\n async (envelope) => {\n const view = envelopeToWildoSaasLockFile(envelope);\n await mutator(view);\n // `view` IS `envelope` (the cast is structural), so the\n // mutator's in-place changes are already on `envelope` —\n // no explicit re-assignment needed (M-1.3).\n },\n );\n this.logDebug('Lock file written', {\n filePath: this.getLockFilePath(),\n sectionCount: Object.keys(result.sections).length,\n });\n return envelopeToWildoSaasLockFile(result);\n }\n\n /**\n * Documented no-op. The shared library does not cache reads —\n * every read goes under the OS-level lock. This method is kept\n * to preserve the public API for external callers (Review-pass-4\n * / MEDIUM-FF). Calls have no observable effect.\n *\n * @deprecated The shared lockfile library performs read-under-lock\n * on every call; cache invalidation is no longer meaningful.\n */\n public invalidateCache(): void {\n // intentionally empty\n }\n\n // ================================================================\n // SHA helpers\n // ================================================================\n\n /** sha256 of a UTF-8 string, hex-encoded. */\n public hashString(content: string): string {\n return createHash('sha256').update(content, 'utf-8').digest('hex');\n }\n\n /**\n * Stable hash for an input \"fingerprint\": sorts keys and serializes\n * with a deterministic JSON layout so two runs with the same logical\n * payload produce the same SHA.\n */\n public hashFingerprint(payload: unknown): string {\n return this.hashString(stableStringify(payload));\n }\n\n // ================================================================\n // i18n section helpers (typed convenience over generic mutate)\n // ================================================================\n\n public async readI18nSection(): Promise<I18nLockSection | undefined> {\n const file = await this.read();\n return file.sections.i18n;\n }\n\n public async upsertI18nUnit(\n unitId: string,\n entry: I18nLockUnitEntry,\n // Only labellize should set / change the section's primary locale.\n // Translate passes `undefined` so locale updates do not rewrite the\n // app-config source-of-truth identity.\n primaryLocale: string | undefined,\n trackedLocales: string[],\n ): Promise<void> {\n await this.mutate((file) => {\n if (!file.sections.i18n && !primaryLocale) {\n throw new Error(\n 'Cannot create i18n lock section without a configured primaryLocale',\n );\n }\n const section: I18nLockSection = file.sections.i18n ?? {\n sectionVersion: 1,\n primaryLocale: primaryLocale!,\n trackedLocales: [],\n units: {},\n };\n if (primaryLocale) {\n section.primaryLocale = primaryLocale;\n }\n const localeSet = new Set([...section.trackedLocales, ...trackedLocales]);\n section.trackedLocales = [...localeSet].sort();\n section.units[unitId] = entry;\n file.sections.i18n = section;\n });\n }\n}\n\n/**\n * Cast the shared envelope into the companion's `WildoSaasLockFile`\n * shape. The two types share a runtime layout (`{ schemaVersion: 2,\n * generatedAt, sections }`); the companion's view types `sections`\n * more permissively, so the cross-cast is safe.\n */\nfunction envelopeToWildoSaasLockFile(envelope: SaasLockfileEnvelope): WildoSaasLockFile {\n return envelope as unknown as WildoSaasLockFile;\n}\n\nfunction stableStringify(value: unknown): string {\n return JSON.stringify(value, (_, v) => {\n if (v && typeof v === 'object' && !Array.isArray(v)) {\n const sorted: Record<string, unknown> = {};\n for (const key of Object.keys(v as Record<string, unknown>).sort()) {\n sorted[key] = (v as Record<string, unknown>)[key];\n }\n return sorted;\n }\n return v;\n });\n}\n\nexport { WILDO_SAAS_LOCK_RELATIVE_PATH };\n"]}
|
|
1
|
+
{"version":3,"file":"wildo-saas-lock.companion.service.js","sourceRoot":"","sources":["../../../../src/core/lock/wildo-saas-lock.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EACL,aAAa,GAId,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEI,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAIc;IACe;IAJpD,QAAQ,CAA+D;IAExF,YACsD,MAAqB,EACN,gBAAkC;QADjD,WAAM,GAAN,MAAM,CAAe;QACN,qBAAgB,GAAhB,gBAA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AAC,KAAc;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,MAAM,MAAM,GAA4B,EAAE,CAAC;YAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAA4B,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBACnE,MAAM,CAAC,GAAG,CAAC,GAAI,CAA6B,CAAC,GAAG,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { inject, injectable } from 'inversify';\nimport { ZodError } from 'zod';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport {\n RegistryLockfileRepairableError,\n WILDO_SAAS_LOCK_RELATIVE_PATH,\n getWildoSaasLockPath,\n withLockfileMutate,\n readWildoSaasLock,\n type SaasLockfileEnvelope,\n} from '@wildo-ai/platform-config-lib';\nimport { COMPANION_SERVICE_TYPES } from '../inject/models/service-types';\nimport type { CompanionContext } from '../context/companion-context';\nimport {\n emptyLockFile,\n type WildoSaasLockFile,\n type I18nLockSection,\n type I18nLockUnitEntry,\n} from './wildo-saas-lock.models';\nimport { I18nLockSectionSchema } from './wildo-saas-lock.schemas';\n\n/**\n * Read/write access to `<saasRoot>/.wildo-saas/wildo-saas.lock.json`.\n *\n * Phase 1 refactor (`module-registry-analysis.md`): the companion\n * delegates locking + atomic-write to\n * `@wildo-ai/platform-config-lib`'s `withLockfileMutate(...)`. The\n * shared primitive uses `proper-lockfile` (cross-process safe) +\n * `write-file-atomic` (fsync-safe), validated by the Phase 0.B\n * contention spike.\n *\n * Removed:\n * - `writeChain` — the OS-level lock subsumes the in-memory\n * write serialization.\n * - `cached` — every read goes under the lock so cross-process\n * readers and the CLI never observe a stale cache.\n *\n * Preserved (call-sites depend on it):\n * - `mutate(file => void)` — full-envelope callback API for\n * orchestrators that need cross-section visibility.\n * - `invalidateCache(): void` — kept as a documented no-op\n * (Review-pass-4 / MEDIUM-FF). The shared library does not\n * cache; calling `invalidateCache()` is a hint with no effect.\n * - `readI18nSection`, `upsertI18nUnit`, `hashString`,\n * `hashFingerprint` — public API surface consumed by\n * `LabellizeOrchestrator` and `TranslateOrchestrator`.\n *\n * Phase 1 review hardening:\n * - H-1.1: `read()` no longer swallows ZodError into an empty\n * envelope (which silently destroyed sibling sections on\n * overwrite). Malformed envelopes throw\n * `RegistryLockfileRepairableError`; only ENOENT falls back to\n * `emptyLockFile()`.\n * - M-1.1: every read + mutate threads\n * `sectionSchemas: { i18n: I18nLockSectionSchema }` so the\n * companion-owned section is validated on the boundary.\n * - M-1.3: dead `envelope.sections = view.sections` line removed\n * (the cast already shares the underlying reference).\n * - L-1.2: file path comes from the shared\n * `getWildoSaasLockPath(saasRoot)` helper, removing the\n * companion-local `WILDO_SAAS_LOCK_FILE_NAME` constant drift.\n */\n@injectable()\nexport class WildoSaasLockCompanionService {\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(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n ) {\n this.logDebug = this.logger.debugByType('WildoSaasLockService');\n }\n\n public getLockFilePath(): string {\n return getWildoSaasLockPath(this.companionContext.saasRoot);\n }\n\n /**\n * Read the current lockfile envelope. Unsynchronized — callers\n * needing read-after-write coherence must read INSIDE\n * `mutate(...)`.\n *\n * Returns an empty envelope when the file does not yet exist\n * (ENOENT). Throws `RegistryLockfileRepairableError` when the\n * file exists but fails Zod schema validation, so the\n * orchestrator surfaces a repairable diagnostic rather than\n * silently overwriting valid sibling sections.\n */\n public async read(): Promise<WildoSaasLockFile> {\n try {\n const envelope = await readWildoSaasLock({\n saasRoot: this.companionContext.saasRoot,\n sectionSchemas: { i18n: I18nLockSectionSchema },\n createIfMissing: true,\n });\n // The two envelope types are structurally compatible — both\n // are `{ schemaVersion: 2, generatedAt, sections }`. The\n // companion's `WildoSaasLockFile` types `sections` more\n // permissively than the shared schema, so a downcast is safe.\n return envelopeToWildoSaasLockFile(envelope);\n } catch (err: unknown) {\n if (err instanceof ZodError) {\n throw new RegistryLockfileRepairableError(\n `wildo-saas.lock.json failed schema validation. Run \\`wildo registry repair-lockfile\\` to inspect.`,\n [\n `at: ${this.getLockFilePath()}`,\n ...err.issues.slice(0, 5).map(\n (issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`,\n ),\n ],\n );\n }\n const errno = (err as NodeJS.ErrnoException)?.code;\n if (errno === 'ENOENT') {\n return emptyLockFile();\n }\n // Anything else (EACCES, EIO, JSON.parse SyntaxError, ...) is\n // a real bug; do not silently overwrite the file.\n throw err;\n }\n }\n\n /**\n * Atomically apply a mutation to the lock file under an OS-level\n * lock + atomic-write commit. The mutator receives a deep-cloned\n * envelope; in-place mutation is safe.\n *\n * Cross-section preservation guarantees (KD-4 / KD-15 / KD-18) are\n * inherited from `withLockfileMutate`: every `sections.*` key the\n * mutator did NOT touch round-trips verbatim. The companion-owned\n * `sections.i18n` schema is validated on read AND post-mutation,\n * so a buggy mutator can never persist an invalid i18n payload.\n */\n public async mutate(\n mutator: (file: WildoSaasLockFile) => void | Promise<void>,\n ): Promise<WildoSaasLockFile> {\n const result = await withLockfileMutate(\n {\n saasRoot: this.companionContext.saasRoot,\n sectionSchemas: { i18n: I18nLockSectionSchema },\n },\n async (envelope) => {\n const view = envelopeToWildoSaasLockFile(envelope);\n await mutator(view);\n // `view` IS `envelope` (the cast is structural), so the\n // mutator's in-place changes are already on `envelope` —\n // no explicit re-assignment needed (M-1.3).\n },\n );\n this.logDebug('Lock file written', {\n filePath: this.getLockFilePath(),\n sectionCount: Object.keys(result.sections).length,\n });\n return envelopeToWildoSaasLockFile(result);\n }\n\n /**\n * Documented no-op. The shared library does not cache reads —\n * every read goes under the OS-level lock. This method is kept\n * to preserve the public API for external callers (Review-pass-4\n * / MEDIUM-FF). Calls have no observable effect.\n *\n * @deprecated The shared lockfile library performs read-under-lock\n * on every call; cache invalidation is no longer meaningful.\n */\n public invalidateCache(): void {\n // intentionally empty\n }\n\n // ================================================================\n // SHA helpers\n // ================================================================\n\n /** sha256 of a UTF-8 string, hex-encoded. */\n public hashString(content: string): string {\n return createHash('sha256').update(content, 'utf-8').digest('hex');\n }\n\n /**\n * Stable hash for an input \"fingerprint\": sorts keys and serializes\n * with a deterministic JSON layout so two runs with the same logical\n * payload produce the same SHA.\n */\n public hashFingerprint(payload: unknown): string {\n return this.hashString(stableStringify(payload));\n }\n\n // ================================================================\n // i18n section helpers (typed convenience over generic mutate)\n // ================================================================\n\n public async readI18nSection(): Promise<I18nLockSection | undefined> {\n const file = await this.read();\n return file.sections.i18n;\n }\n\n /**\n * Insert or replace one unit's i18n lock entry.\n *\n * **Additive only, and there is deliberately NO removal counterpart.** A unit\n * row outlives the unit — rename a resource and the old `resource:todoLists`\n * row stays forever, alongside its generated label files. That leak is known\n * and is reported rather than repaired: see `OrphanLabelArtifactsReport` in\n * `i18n-labelling/utils/orphan-label-artifacts.utils.ts` for the measurement\n * and the reasoning.\n *\n * The short version, so nobody adds the obvious `removeI18nUnit` here as a\n * tidy-up: the only available answer to \"does this unit still exist?\" is the\n * planner's unit list, and that list degrades SILENTLY — a frontend\n * introspection that could not run drops four whole label families from it\n * while looking exactly like an application that has none. A removal API on\n * this service would be called from there, so it would delete lock rows for\n * live units on any run where the frontend dev server was down. Build the\n * removal when the plan's totality is established rather than assumed, and\n * make it an explicit operator verb rather than a side effect of generation.\n *\n * `trackedLocales` is likewise a UNION and never shrinks, which is why it\n * cannot serve as the denominator for \"this locale was dropped\".\n */\n public async upsertI18nUnit(\n unitId: string,\n entry: I18nLockUnitEntry,\n // Only labellize should set / change the section's primary locale.\n // Translate passes `undefined` so locale updates do not rewrite the\n // app-config source-of-truth identity.\n primaryLocale: string | undefined,\n trackedLocales: string[],\n ): Promise<void> {\n await this.mutate((file) => {\n if (!file.sections.i18n && !primaryLocale) {\n throw new Error(\n 'Cannot create i18n lock section without a configured primaryLocale',\n );\n }\n const section: I18nLockSection = file.sections.i18n ?? {\n sectionVersion: 1,\n primaryLocale: primaryLocale!,\n trackedLocales: [],\n units: {},\n };\n if (primaryLocale) {\n section.primaryLocale = primaryLocale;\n }\n const localeSet = new Set([...section.trackedLocales, ...trackedLocales]);\n section.trackedLocales = [...localeSet].sort();\n section.units[unitId] = entry;\n file.sections.i18n = section;\n });\n }\n}\n\n/**\n * Cast the shared envelope into the companion's `WildoSaasLockFile`\n * shape. The two types share a runtime layout (`{ schemaVersion: 2,\n * generatedAt, sections }`); the companion's view types `sections`\n * more permissively, so the cross-cast is safe.\n */\nfunction envelopeToWildoSaasLockFile(envelope: SaasLockfileEnvelope): WildoSaasLockFile {\n return envelope as unknown as WildoSaasLockFile;\n}\n\nfunction stableStringify(value: unknown): string {\n return JSON.stringify(value, (_, v) => {\n if (v && typeof v === 'object' && !Array.isArray(v)) {\n const sorted: Record<string, unknown> = {};\n for (const key of Object.keys(v as Record<string, unknown>).sort()) {\n sorted[key] = (v as Record<string, unknown>)[key];\n }\n return sorted;\n }\n return v;\n });\n}\n\nexport { WILDO_SAAS_LOCK_RELATIVE_PATH };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wildo-saas-lock.models.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"wildo-saas-lock.models.d.ts","sourceRoot":"","sources":["../../../../src/core/lock/wildo-saas-lock.models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAE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AAED,wBAAgB,aAAa,IAAI,iBAAiB,CAMjD"}
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { z } from 'zod';
|
|
16
16
|
export declare const I18nLockLocaleStatusSchema: z.ZodEnum<{
|
|
17
|
-
fresh: "fresh";
|
|
18
17
|
failed: "failed";
|
|
18
|
+
fresh: "fresh";
|
|
19
19
|
stale: "stale";
|
|
20
20
|
never_run: "never_run";
|
|
21
21
|
}>;
|
|
22
22
|
export declare const I18nLockLocaleEntrySchema: z.ZodObject<{
|
|
23
23
|
status: z.ZodEnum<{
|
|
24
|
-
fresh: "fresh";
|
|
25
24
|
failed: "failed";
|
|
25
|
+
fresh: "fresh";
|
|
26
26
|
stale: "stale";
|
|
27
27
|
never_run: "never_run";
|
|
28
28
|
}>;
|
|
@@ -37,8 +37,8 @@ export declare const I18nLockUnitEntrySchema: z.ZodObject<{
|
|
|
37
37
|
primarySha: z.ZodOptional<z.ZodString>;
|
|
38
38
|
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
39
39
|
status: z.ZodEnum<{
|
|
40
|
-
fresh: "fresh";
|
|
41
40
|
failed: "failed";
|
|
41
|
+
fresh: "fresh";
|
|
42
42
|
stale: "stale";
|
|
43
43
|
never_run: "never_run";
|
|
44
44
|
}>;
|
|
@@ -59,8 +59,8 @@ export declare const I18nLockSectionSchema: z.ZodObject<{
|
|
|
59
59
|
primarySha: z.ZodOptional<z.ZodString>;
|
|
60
60
|
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
61
61
|
status: z.ZodEnum<{
|
|
62
|
-
fresh: "fresh";
|
|
63
62
|
failed: "failed";
|
|
63
|
+
fresh: "fresh";
|
|
64
64
|
stale: "stale";
|
|
65
65
|
never_run: "never_run";
|
|
66
66
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wildo-saas-lock.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"wildo-saas-lock.schemas.d.ts","sourceRoot":"","sources":["../../../../src/core/lock/wildo-saas-lock.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B;;;;;EAKrC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAKpC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;iBAOlC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAKhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-startup-assembly.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"companion-startup-assembly.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/companion-startup-assembly.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EAI1B,MAAM,4BAA4B,CAAC;AAyBpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;IACjE,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;CAChD;AA6DD;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,sBAAsB,GACpC,OAAO,CAAC,yBAAyB,CAAC,CA8GpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-startup-assembly.js","sourceRoot":"","sources":["../../../../../src/core/runtime/companion-startup-assembly.ts"],"names":[],"mappings":"AAAA,OAA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ACpC,8DAA8D;gBAC9D,GAAG,qBAAqB,CAAC,MAAM;aAChC;SACF;KACF,CAAC;IAEF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AACtC,CAAC","sourcesContent":["import {\n setupSaasBackendInjection,\n marketGenerationAgent,\n MARKET_GENERATION_AGENT_REF,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport type { FlowsActors_Agent } from '@wildo-ai/saas-models';\nimport { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport { PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS } from '@wildo-ai/platform-config-lib';\nimport type { SaasRuntimeProvidersArtifact } from '@wildo-ai/platform-config-lib';\n\nimport { emailAgents } from '../../email/models/email-template.actors-system.definitions';\nimport {\n CompanionController,\n setupCompanionInjection,\n} from '../inject/models/container';\nimport { COMPANION_SERVICE_TYPES } from '../inject/models/service-types';\nimport { buildLabellingActorSystemDefinitions } from '../../i18n-labelling/models/labelling.actors-system.definitions';\nimport { buildMetaWorkflowsActorSystemDefinitions } from '../../meta-workflows/models/meta-workflows.actors-system.definitions';\nimport { applicationCodingAgents } from '../../meta-workflows/models/application-coding-agent.actors-system.definitions';\nimport { applicationResearchAgents } from '../../meta-workflows/models/application-research-agent.actors-system.definitions';\nimport { briefAdequacyAgents } from '../../meta-workflows/models/brief-adequacy.actors-system.definitions';\nimport { buildLogoGenerationAgent } from '../../brand/models/logo-generation.actors-system.definitions';\nimport { buildLogoJudgeAgent } from '../../brand/models/logo-judge.actors-system.definitions';\nimport { buildExpertPersonaDerivationAgent } from '../../expert-personas/models/expert-persona-derivation.actors-system.definitions';\nimport { buildExpertPersonaCritiqueAgent } from '../../expert-personas/models/expert-persona-critique.actors-system.definitions';\nimport { buildDeliberationTextProducerAgent } from '../../deliberations/models/deliberation-agents.actors-system.definitions';\nimport { loadCommittedExpertAgents } from '../../deliberations/utils/load-committed-expert-agents';\nimport type { CompanionContext } from '../context/companion-context';\nimport { loadBackendCompanionExports } from '../context/companion-package-loaders.companion';\nimport type { CompanionRuntimeConfig } from './models/companion-runtime.models';\nimport type { CompanionStartupConfig } from './services/start-companion-application.service';\n\n/**\n * The complete ordinary companion composition: the DI container and the exact\n * startup config object `StartCompanionApplicationService.initialize` accepts.\n */\nexport interface AssembledCompanionStartup {\n readonly container: ReturnType<typeof setupSaasBackendInjection>;\n readonly startupConfig: CompanionStartupConfig;\n}\n\n/**\n * Loads the companion's provider-runtime topology from the APPLICATION's generated JSON artifact\n * (`.wildo-saas/generated/providers/companion.runtime-providers.generated.json`).\n *\n * This used to be a compiled-in `src/generated/wildo-provider-runtime.generated.ts` module, like\n * the backend/minion/worker hosts still use. That shape cannot survive the dist-only companion\n * distribution (issue #64): the generated module is APP-SPECIFIC data, the canonical companion\n * package at `platform/factory` is app-agnostic, and the delivered drop carries no source and no\n * compiler. The artifact content is pure environment-independent topology data, and `wildo config\n * sync` already materializes it as JSON at a path this process can reach through its application\n * root — so the JSON is the one authority and no per-companion module exists any more.\n */\nasync function loadProviderRuntime(saasRoot: string): Promise<SaasRuntimeProvidersArtifact> {\n const artifactPath = join(saasRoot, PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS.companion);\n try {\n const providerRuntime = JSON.parse(await readFile(artifactPath, 'utf8')) as SaasRuntimeProvidersArtifact;\n if (!providerRuntime?.scope || providerRuntime.artifactKind !== 'companion') {\n throw new Error('Companion provider runtime artifact does not carry a companion scope.');\n }\n return providerRuntime;\n } catch (error) {\n throw new Error(\n `Missing or invalid companion provider runtime artifact at ${artifactPath}. `\n + 'Run `wildo config sync` before starting this companion. '\n + describeCaughtError(error),\n );\n }\n}\n\n/**\n * Resolve the market generation agent the companion registers under\n * `MARKET_GENERATION_AGENT_REF`.\n *\n * Returns the application-authored override\n * (`BackendCompanionExports.marketGenerationAgentOverride`) when present,\n * otherwise the framework default (`marketGenerationAgent` from\n * `@wildo-ai/saas-backend-lib`). The override must reuse the canonical ref:\n * the market service invokes the agent by that fixed ref, so an override\n * under a different ref would be dead-registered and never reached. We fail\n * fast at startup with a precise message rather than silently rewrite the\n * ref (a silent rewrite would mask the authoring mistake).\n */\nfunction resolveMarketGenerationAgent(\n override: FlowsActors_Agent | undefined,\n): FlowsActors_Agent {\n if (!override) {\n return marketGenerationAgent;\n }\n if (override.ref !== MARKET_GENERATION_AGENT_REF) {\n throw new Error(\n `Application market generation agent override must use ref \"${MARKET_GENERATION_AGENT_REF}\" `\n + `(received \"${override.ref}\"). The companion invokes the market generation agent by this fixed `\n + `ref, so an override under a different ref would never be reached. Set the override's \\`ref\\` to `\n + `the canonical value (import MARKET_GENERATION_AGENT_REF from '@wildo-ai/saas-backend-lib').`,\n );\n }\n return override;\n}\n\n/**\n * Assemble the ONE ordinary companion startup composition without starting it.\n *\n * This is the single authority for what the companion mounts and registers:\n * `src/index.ts` starts exactly this composition, and the explicit\n * first-activation maintenance operation (Step 4) boots the same assembly so\n * the startup-composition observer captures the true ordinary controller/agent\n * graph rather than a hand-maintained copy that could drift from it. Assembly\n * performs loader I/O (backend companion exports, generated provider runtime,\n * committed expert charters) and DI wiring only — no HTTP, no Mongo, no\n * continuity recovery, no durable effect.\n */\nexport async function assembleCompanionStartup(\n companionContext: CompanionContext,\n runtimeConfig: CompanionRuntimeConfig,\n): Promise<AssembledCompanionStartup> {\n const { backendConfig, marketGenerationAgentOverride } = await loadBackendCompanionExports(companionContext);\n const providerRuntime = await loadProviderRuntime(companionContext.saasRoot);\n\n // The market generation agent ships a framework default; the application\n // may override provider/model/persona via its backend companion-exports.\n const effectiveMarketGenerationAgent = resolveMarketGenerationAgent(marketGenerationAgentOverride);\n\n // Charter-built expert agents (RF-6): one deliberation agent per\n // COMMITTED ExpertPersonaCharter. Fail-open here (an app without\n // charters boots normally); the deliberation composer fail-closes.\n const committedExpertAgents = await loadCommittedExpertAgents(companionContext.saasRoot);\n\n const labellingDefinitions = buildLabellingActorSystemDefinitions();\n const metaWorkflowsDefinitions = buildMetaWorkflowsActorSystemDefinitions();\n\n const container = setupCompanionInjection(\n setupSaasBackendInjection() as never,\n companionContext,\n runtimeConfig,\n ) as ReturnType<typeof setupSaasBackendInjection>;\n\n const companionController = container.get(\n COMPANION_SERVICE_TYPES.CompanionController as never,\n ) as CompanionController;\n\n\n \n // Public-v2 assessment surface: catalog status/next reads plus token-gated\n // episode-addressed status/next and the non-terminal working-admission\n // `run`. READY posture only — see `customControllers` below.\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n const startupConfig: CompanionStartupConfig = {\n /*\n * Mounted in BOTH postures. In the healthy one it is an ordinary operator route; in the degraded one it is\n * the only way out, since a registry the companion cannot accept is exactly what closed everything else.\n */\n /*\n * The journey, public-v2 episode, workbench and assurance HTTP surfaces were deleted with the\n * accepted-state ledger they served. `companionController` is the surviving general surface; the\n * playbook-execution routes return here as the rebuild reaches them\n * (`.claude/plans/rebuild-playbook-execution.md`, P3).\n */\n customControllers: [companionController],\n backendConfig,\n providerRuntime,\n flowsActorsRegistry: {\n flowActorSystemsFactoryMap: {\n ...labellingDefinitions.factoryMap,\n ...metaWorkflowsDefinitions.factoryMap,\n },\n agents: [\n ...emailAgents,\n ...labellingDefinitions.agents,\n effectiveMarketGenerationAgent,\n ...metaWorkflowsDefinitions.agents,\n // The application coding agent (Claude Code through the ordinary\n // Flows/Actors AGENT_CLIENT_PROTOCOL path, `claude-code-acp` profile\n // authored in wildo.saas.config.ts). Registered exactly once, here,\n // in the one startup Agent collection — F2's typed task wrapper\n // resolves it by ref; there is no second dispatcher or registry.\n ...applicationCodingAgents,\n // The read-only sibling: same ACP transport, opposite posture. Registered beside the coding\n // Agent so \"registered exactly once\" stays one list to read.\n ...applicationResearchAgents,\n // The brief-adequacy gate (#254's rescoped shape): judges one composed brief per opted-in\n // playbook run and proposes add-only context repairs. Registered beside its siblings so\n // \"registered exactly once\" stays one list to read.\n ...briefAdequacyAgents,\n // Companion-owned IMAGE agent (brand/logo generation step). Registered\n // here, like labelling/meta-workflows — not shipped as an engine default.\n buildLogoGenerationAgent(),\n // Companion-owned JUDGE agent (brand/logo ACCEPT review point) — scores\n // a staged candidate against the authored brief (GENERATE_STRUCTURED).\n buildLogoJudgeAgent(),\n // Companion-owned expert-persona DERIVATION agent (agentic\n // deliberation system) — compiles app-specific persona charters from\n // framework role templates + the app's spec artifacts.\n buildExpertPersonaDerivationAgent(),\n // Companion-owned expert-persona CRITIQUE agent — the self-review\n // pass of the multi-pass derivation protocol (draft → critique →\n // finalize); a dedicated critic, separate from the generator.\n buildExpertPersonaCritiqueAgent(),\n // Deliberation TEXT producer (revision step for TEXT subjects).\n buildDeliberationTextProducerAgent(),\n // One deliberation agent per COMMITTED expert charter (RF-6).\n ...committedExpertAgents.agents,\n ],\n },\n };\n\n return { container, startupConfig };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"companion-startup-assembly.js","sourceRoot":"","sources":["../../../../src/core/runtime/companion-startup-assembly.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AAGzF,OAAO,EAAE,WAAW,EAAE,MAAM,6DAA6D,CAAC;AAC1F,OAAO,EAEL,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iEAAiE,CAAC;AACvH,OAAO,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAChI,OAAO,EAAE,uBAAuB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kFAAkF,CAAC;AAC7H,OAAO,EAAE,mBAA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,GAAG,oBAAoB,CAAC,MAAM;gBAC9B,8BAA8B;gBAC9B,GAAG,wBAAwB,CAAC,MAAM;gBAClC,iEAAiE;gBACjE,qEAAqE;gBACrE,oEAAoE;gBACpE,gEAAgE;gBAChE,iEAAiE;gBACjE,GAAG,uBAAuB;gBAC1B,4FAA4F;gBAC5F,6DAA6D;gBAC7D,GAAG,yBAAyB;gBAC5B,0FAA0F;gBAC1F,wFAAwF;gBACxF,oDAAoD;gBACpD,GAAG,mBAAmB;gBACtB,uEAAuE;gBACvE,0EAA0E;gBAC1E,wBAAwB,EAAE;gBAC1B,wEAAwE;gBACxE,uEAAuE;gBACvE,mBAAmB,EAAE;gBACrB,2DAA2D;gBAC3D,qEAAqE;gBACrE,uDAAuD;gBACvD,iCAAiC,EAAE;gBACnC,kEAAkE;gBAClE,iEAAiE;gBACjE,8DAA8D;gBAC9D,+BAA+B,EAAE;gBACjC,gEAAgE;gBAChE,kCAAkC,EAAE;gBACpC,8DAA8D;gBAC9D,GAAG,qBAAqB,CAAC,MAAM;aAChC;SACF;KACF,CAAC;IAEF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AACtC,CAAC","sourcesContent":["import {\n setupSaasBackendInjection,\n marketGenerationAgent,\n MARKET_GENERATION_AGENT_REF,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport type { FlowsActors_Agent } from '@wildo-ai/saas-models';\nimport { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport { PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS } from '@wildo-ai/platform-config-lib';\nimport type { SaasRuntimeProvidersArtifact } from '@wildo-ai/platform-config-lib';\n\nimport { emailAgents } from '../../email/models/email-template.actors-system.definitions';\nimport {\n CompanionController,\n setupCompanionInjection,\n} from '../inject/models/container';\nimport { COMPANION_SERVICE_TYPES } from '../inject/models/service-types';\nimport { buildLabellingActorSystemDefinitions } from '../../i18n-labelling/models/labelling.actors-system.definitions';\nimport { buildMetaWorkflowsActorSystemDefinitions } from '../../meta-workflows/models/meta-workflows.actors-system.definitions';\nimport { applicationCodingAgents } from '../../meta-workflows/models/application-coding-agent.actors-system.definitions';\nimport { applicationResearchAgents } from '../../meta-workflows/models/application-research-agent.actors-system.definitions';\nimport { briefAdequacyAgents } from '../../meta-workflows/models/brief-adequacy.actors-system.definitions';\nimport { buildLogoGenerationAgent } from '../../brand/models/logo-generation.actors-system.definitions';\nimport { buildLogoJudgeAgent } from '../../brand/models/logo-judge.actors-system.definitions';\nimport { buildExpertPersonaDerivationAgent } from '../../expert-personas/models/expert-persona-derivation.actors-system.definitions';\nimport { buildExpertPersonaCritiqueAgent } from '../../expert-personas/models/expert-persona-critique.actors-system.definitions';\nimport { buildDeliberationTextProducerAgent } from '../../deliberations/models/deliberation-agents.actors-system.definitions';\nimport { loadCommittedExpertAgents } from '../../deliberations/utils/load-committed-expert-agents';\nimport type { CompanionContext } from '../context/companion-context';\nimport { loadBackendCompanionExports } from '../context/companion-package-loaders.companion';\nimport type { CompanionRuntimeConfig } from './models/companion-runtime.models';\nimport type { CompanionStartupConfig } from './services/start-companion-application.service';\n\n/**\n * The complete ordinary companion composition: the DI container and the exact\n * startup config object `StartCompanionApplicationService.initialize` accepts.\n */\nexport interface AssembledCompanionStartup {\n readonly container: ReturnType<typeof setupSaasBackendInjection>;\n readonly startupConfig: CompanionStartupConfig;\n}\n\n/**\n * Loads the companion's provider-runtime topology from the APPLICATION's generated JSON artifact\n * (`.wildo-saas/generated/providers/companion.runtime-providers.generated.json`).\n *\n * This used to be a compiled-in `src/generated/wildo-provider-runtime.generated.ts` module, like\n * the backend/minion/worker hosts still use. That shape cannot survive the dist-only companion\n * distribution (issue #64): the generated module is APP-SPECIFIC data, the canonical companion\n * package at `platform/factory` is app-agnostic, and the delivered drop carries no source and no\n * compiler. The artifact content is pure environment-independent topology data, and `wildo config\n * sync` already materializes it as JSON at a path this process can reach through its application\n * root — so the JSON is the one authority and no per-companion module exists any more.\n */\nasync function loadProviderRuntime(saasRoot: string): Promise<SaasRuntimeProvidersArtifact> {\n const artifactPath = join(saasRoot, PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS.companion);\n try {\n const providerRuntime = JSON.parse(await readFile(artifactPath, 'utf8')) as SaasRuntimeProvidersArtifact;\n if (!providerRuntime?.scope || providerRuntime.artifactKind !== 'companion') {\n throw new Error('Companion provider runtime artifact does not carry a companion scope.');\n }\n return providerRuntime;\n } catch (error) {\n throw new Error(\n `Missing or invalid companion provider runtime artifact at ${artifactPath}. `\n + 'Run `wildo config sync` before starting this companion. '\n + describeCaughtError(error),\n );\n }\n}\n\n/**\n * Resolve the market generation agent the companion registers under\n * `MARKET_GENERATION_AGENT_REF`.\n *\n * Returns the application-authored override\n * (`BackendCompanionExports.marketGenerationAgentOverride`) when present,\n * otherwise the framework default (`marketGenerationAgent` from\n * `@wildo-ai/saas-backend-lib`). The override must reuse the canonical ref:\n * the market service invokes the agent by that fixed ref, so an override\n * under a different ref would be dead-registered and never reached. We fail\n * fast at startup with a precise message rather than silently rewrite the\n * ref (a silent rewrite would mask the authoring mistake).\n */\nfunction resolveMarketGenerationAgent(\n override: FlowsActors_Agent | undefined,\n): FlowsActors_Agent {\n if (!override) {\n return marketGenerationAgent;\n }\n if (override.ref !== MARKET_GENERATION_AGENT_REF) {\n throw new Error(\n `Application market generation agent override must use ref \"${MARKET_GENERATION_AGENT_REF}\" `\n + `(received \"${override.ref}\"). The companion invokes the market generation agent by this fixed `\n + `ref, so an override under a different ref would never be reached. Set the override's \\`ref\\` to `\n + `the canonical value (import MARKET_GENERATION_AGENT_REF from '@wildo-ai/saas-backend-lib').`,\n );\n }\n return override;\n}\n\n/**\n * Assemble the ONE ordinary companion startup composition without starting it.\n *\n * This is the single authority for what the companion mounts and registers:\n * `src/index.ts` starts exactly this composition, and the explicit\n * first-activation maintenance operation (Step 4) boots the same assembly so\n * the startup-composition observer captures the true ordinary controller/agent\n * graph rather than a hand-maintained copy that could drift from it. Assembly\n * performs loader I/O (backend companion exports, generated provider runtime,\n * committed expert charters) and DI wiring only — no HTTP, no Mongo, no\n * continuity recovery, no durable effect.\n */\nexport async function assembleCompanionStartup(\n companionContext: CompanionContext,\n runtimeConfig: CompanionRuntimeConfig,\n): Promise<AssembledCompanionStartup> {\n const { backendConfig, marketGenerationAgentOverride } = await loadBackendCompanionExports(companionContext);\n const providerRuntime = await loadProviderRuntime(companionContext.saasRoot);\n\n // The market generation agent ships a framework default; the application\n // may override provider/model/persona via its backend companion-exports.\n const effectiveMarketGenerationAgent = resolveMarketGenerationAgent(marketGenerationAgentOverride);\n\n // Charter-built expert agents (RF-6): one deliberation agent per\n // COMMITTED ExpertPersonaCharter. Fail-open here (an app without\n // charters boots normally); the deliberation composer fail-closes.\n const committedExpertAgents = await loadCommittedExpertAgents(companionContext.saasRoot);\n\n const labellingDefinitions = buildLabellingActorSystemDefinitions();\n const metaWorkflowsDefinitions = buildMetaWorkflowsActorSystemDefinitions();\n\n const container = setupCompanionInjection(\n setupSaasBackendInjection() as never,\n companionContext,\n runtimeConfig,\n ) as ReturnType<typeof setupSaasBackendInjection>;\n\n const companionController = container.get(\n COMPANION_SERVICE_TYPES.CompanionController as never,\n ) as CompanionController;\n\n\n \n // Public-v2 assessment surface: catalog status/next reads plus token-gated\n // episode-addressed status/next and the non-terminal working-admission\n // `run`. READY posture only — see `customControllers` below.\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n const startupConfig: CompanionStartupConfig = {\n /*\n * Mounted in BOTH postures. In the healthy one it is an ordinary operator route; in the degraded one it is\n * the only way out, since a registry the companion cannot accept is exactly what closed everything else.\n */\n /*\n * The journey, public-v2 episode, workbench and assurance HTTP surfaces were deleted with the\n * accepted-state ledger they served. `companionController` is the surviving general surface; the\n * playbook-execution routes return here as the rebuild reaches them\n * (`.claude/plans/rebuild-playbook-execution.md`, P3).\n */\n customControllers: [companionController],\n backendConfig,\n providerRuntime,\n flowsActorsRegistry: {\n flowActorSystemsFactoryMap: {\n ...labellingDefinitions.factoryMap,\n ...metaWorkflowsDefinitions.factoryMap,\n },\n agents: [\n ...emailAgents,\n ...labellingDefinitions.agents,\n effectiveMarketGenerationAgent,\n ...metaWorkflowsDefinitions.agents,\n // The application coding agent (Claude Code through the ordinary\n // Flows/Actors AGENT_CLIENT_PROTOCOL path, `claude-code-acp` profile\n // authored in wildo.saas.config.ts). Registered exactly once, here,\n // in the one startup Agent collection — F2's typed task wrapper\n // resolves it by ref; there is no second dispatcher or registry.\n ...applicationCodingAgents,\n // The read-only sibling: same ACP transport, opposite posture. Registered beside the coding\n // Agent so \"registered exactly once\" stays one list to read.\n ...applicationResearchAgents,\n // The brief-adequacy gate (#254's rescoped shape): judges one composed brief per opted-in\n // playbook run and proposes add-only context repairs. Registered beside its siblings so\n // \"registered exactly once\" stays one list to read.\n ...briefAdequacyAgents,\n // Companion-owned IMAGE agent (brand/logo generation step). Registered\n // here, like labelling/meta-workflows — not shipped as an engine default.\n buildLogoGenerationAgent(),\n // Companion-owned JUDGE agent (brand/logo ACCEPT review point) — scores\n // a staged candidate against the authored brief (GENERATE_STRUCTURED).\n buildLogoJudgeAgent(),\n // Companion-owned expert-persona DERIVATION agent (agentic\n // deliberation system) — compiles app-specific persona charters from\n // framework role templates + the app's spec artifacts.\n buildExpertPersonaDerivationAgent(),\n // Companion-owned expert-persona CRITIQUE agent — the self-review\n // pass of the multi-pass derivation protocol (draft → critique →\n // finalize); a dedicated critic, separate from the generator.\n buildExpertPersonaCritiqueAgent(),\n // Deliberation TEXT producer (revision step for TEXT subjects).\n buildDeliberationTextProducerAgent(),\n // One deliberation agent per COMMITTED expert charter (RF-6).\n ...committedExpertAgents.agents,\n ],\n },\n };\n\n return { container, startupConfig };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-compile-quiet.companion.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"dev-compile-quiet.companion.d.ts","sourceRoot":"","sources":["../../../../src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,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACzG,GAAG,OAAO,CASV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-runtime.models.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"companion-runtime.models.d.ts","sourceRoot":"","sources":["../../../../../src/core/runtime/models/companion-runtime.models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAEnG,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,0BAA0B,CAAC;CAC/C"}
|
|
@@ -6,7 +6,6 @@ import { IntrospectionResourceNotifierCompanionService } from '../../introspecti
|
|
|
6
6
|
import { IntrospectionResourceSourceCompanionService } from '../../introspection/resources/introspection-resource-source.companion.service';
|
|
7
7
|
import { CompanionAuthFloorCompanionService } from '../../auth/companion-auth-floor.companion.service';
|
|
8
8
|
import type { CompanionContext } from '../../context/companion-context';
|
|
9
|
-
import { CompanionStartupCompositionFence } from '../companion-startup-composition-fence';
|
|
10
9
|
import { CodingAgentDispatchCompanionService } from '../../../claude-cli/services/coding-agent-dispatch.companion.service';
|
|
11
10
|
export interface CompanionStartupConfig {
|
|
12
11
|
customControllers: AbstractControllerBackendService[];
|
|
@@ -15,15 +14,6 @@ export interface CompanionStartupConfig {
|
|
|
15
14
|
providerRuntime?: SaasRuntimeProvidersArtifact;
|
|
16
15
|
flowsActorsRegistry?: ApplicationInitializationConfig['flowsActorsRegistry'];
|
|
17
16
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Start Companion Application Service
|
|
20
|
-
*
|
|
21
|
-
* Minimal startup orchestrator for the Dev Companion.
|
|
22
|
-
* The companion API lane now consumes a platform-style env contract, but it
|
|
23
|
-
* still needs local app semantics for label/email/tooling services. The startup
|
|
24
|
-
* path therefore hydrates `AppConfigurationService` itself before handing off to
|
|
25
|
-
* the standard backend runtime bootstrap.
|
|
26
|
-
*/
|
|
27
17
|
export declare class StartCompanionApplicationService {
|
|
28
18
|
private readonly logger;
|
|
29
19
|
private readonly httpServerService;
|
|
@@ -49,7 +39,6 @@ export declare class StartCompanionApplicationService {
|
|
|
49
39
|
private readonly appConfigInitializer;
|
|
50
40
|
private readonly companionContext;
|
|
51
41
|
private readonly authFloorService;
|
|
52
|
-
private readonly startupCompositionFence;
|
|
53
42
|
private readonly codingAgentDispatchService;
|
|
54
43
|
private readonly introspectionSourceWatcher;
|
|
55
44
|
private readonly introspectionResourceNotifier;
|
|
@@ -60,8 +49,8 @@ export declare class StartCompanionApplicationService {
|
|
|
60
49
|
private initialized;
|
|
61
50
|
private shutdownLifecycleRegistered;
|
|
62
51
|
constructor(logger: LoggerService, httpServerService: HttpServerBackendService, mongoDBService: MongoDBService, postgresqlDatabaseService: PostgreSQLDatabaseBackendService, redisService: RedisService, fileStorageRouter: FileStorageRouterBackendService, backendProviderRegistryService: {
|
|
63
|
-
initialize(registry?: unknown): void;
|
|
64
|
-
}, externalProvidersRegistryService: ExternalProvidersRegistryBackendService, observabilityBackendService: ObservabilityBackendService, workerShutdownManager: WorkerShutdownManagerBackendService, flowsActorsRegistryService: FlowsActorsRegistryService, resourcesRegistryService: ResourcesRegistryBackendService, controllersRegistryService: ControllersRegistryHandlerBackendService, i18nController: AbstractControllerBackendService, applicationConfigController: AbstractControllerBackendService, authenticationController: AbstractControllerBackendService, featuresController: AbstractControllerBackendService, i18nService: I18nBackendService, servicesRegistryService: ServicesRegistryHandlerBackendService, customImplRegistry: ResourceOperationCustomImplementationRegistryBackendService, repositoriesRegistryService: RepositoriesRegistryHandlerBackendService, appConfigInitializer: PlatformAppConfigInitializerService, companionContext: CompanionContext, authFloorService: CompanionAuthFloorCompanionService,
|
|
52
|
+
initialize(registry: unknown, providerRuntime?: unknown, unresolvedReasons?: ReadonlyMap<string, string>): void;
|
|
53
|
+
}, externalProvidersRegistryService: ExternalProvidersRegistryBackendService, observabilityBackendService: ObservabilityBackendService, workerShutdownManager: WorkerShutdownManagerBackendService, flowsActorsRegistryService: FlowsActorsRegistryService, resourcesRegistryService: ResourcesRegistryBackendService, controllersRegistryService: ControllersRegistryHandlerBackendService, i18nController: AbstractControllerBackendService, applicationConfigController: AbstractControllerBackendService, authenticationController: AbstractControllerBackendService, featuresController: AbstractControllerBackendService, i18nService: I18nBackendService, servicesRegistryService: ServicesRegistryHandlerBackendService, customImplRegistry: ResourceOperationCustomImplementationRegistryBackendService, repositoriesRegistryService: RepositoriesRegistryHandlerBackendService, appConfigInitializer: PlatformAppConfigInitializerService, companionContext: CompanionContext, authFloorService: CompanionAuthFloorCompanionService, codingAgentDispatchService: CodingAgentDispatchCompanionService, introspectionSourceWatcher: IntrospectionSourceWatcherCompanionService, introspectionResourceNotifier: IntrospectionResourceNotifierCompanionService, introspectionResourceSource: IntrospectionResourceSourceCompanionService);
|
|
65
54
|
/**
|
|
66
55
|
* Initialize the companion application using the typed config object.
|
|
67
56
|
*/
|
|
@@ -138,6 +127,20 @@ export declare class StartCompanionApplicationService {
|
|
|
138
127
|
* than the prior platform-core-only behavior.
|
|
139
128
|
*/
|
|
140
129
|
private resolveResourceRegistryInitInputs;
|
|
130
|
+
/**
|
|
131
|
+
* The companion is the FOURTH host of the on-demand provider loader (#330), and the only one that
|
|
132
|
+
* used to pass no topology at all.
|
|
133
|
+
*
|
|
134
|
+
* It already loaded its own `companion.runtime-providers.generated.json` — `loadProviderRuntime` in
|
|
135
|
+
* `companion-startup-assembly.ts` reads it and hands it over as `config.providerRuntime` — and then
|
|
136
|
+
* initialised the registry without it, which meant the companion process received the ENGINE'S
|
|
137
|
+
* WHOLE CATALOGUE: twenty-two provider modules, six pulling a model SDK, for a scope that names a
|
|
138
|
+
* handful. So closing this seam needed no new request shape and no new file, only the wiring of a
|
|
139
|
+
* value that was already in hand.
|
|
140
|
+
*
|
|
141
|
+
* The artifact reaches `initialize` too, so the companion gets the same fail-loud refusal every
|
|
142
|
+
* other host gets when its scope names a provider nothing can supply.
|
|
143
|
+
*/
|
|
141
144
|
private initializeCompanionProviderDependencies;
|
|
142
145
|
private initializeCompanionFlowsActors;
|
|
143
146
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-companion-application.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"start-companion-application.service.d.ts","sourceRoot":"","sources":["../../../../../src/core/runtime/services/start-companion-application.service.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,kBAAkB,EAElB,wBAAwB,EACxB,cAAc,EACd,gCAAgC,EAChC,YAAY,EACZ,+BAA+B,EAC/B,uCAAuC,EACvC,2BAA2B,EAC3B,mCAAmC,EACnC,0BAA0B,EAC1B,wCAAwC,EACxC,+BAA+B,EAC/B,qCAAqC,EACrC,yCAAyC,EACzC,2DAA2D,EAI3D,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,aAAa,EAEnB,MAAM,4BAA4B,CAAC;AAkBpC,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAGlF,OAAO,EAAE,0CAA0C,EAAE,MAAM,6EAA6E,CAAC;AACzI,OAAO,EAAE,6CAA6C,EAAE,MAAM,iFAAiF,CAAC;AAChJ,OAAO,EAAE,2CAA2C,EAAE,MAAM,+EAA+E,CAAC;AAE5I,OAAO,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AACvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAsCxE,OAAO,EAAE,mCAAmC,EAAE,MAAM,sEAAsE,CAAC;AAG3H,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,gCAAgC,EAAE,CAAC;IACtD,aAAa,CAAC,EAAE,gCAAgC,CAAC;IACjD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,C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IAAI,CAAC;YAoHxD,sCAAsC;IA2CpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;YACW,2CAA2C;IA0BzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;YACW,iCAAiC;IAmH/C;;;;;;;;;;;;;OAaG;YACW,uCAAuC;YAoBvC,8BAA8B;IAO5C;;;;;;OAMG;YACW,qCAAqC;YAmCrC,4BAA4B;IA0B1C;;;;;;;;;;;;;OAaG;YACW,gCAAgC;IA+B9C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uCAAuC,CAG7D;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,OAAO,CAAC,iCAAiC;IAsCzC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qCAAqC,CAmB3D;YAEY,sCAAsC;YA6EtC,yBAAyB;IAMvC,+EAA+E;IACxE,mBAAmB,IAAI,OAAO;IAIrC;;;;OAIG;IACI,4BAA4B,IAAI,OAAO;IAIvC,aAAa,IAAI,MAAM,GAAG,IAAI;IAIrC;;;;;;;;;OASG;IACH,OAAO,CAAC,gCAAgC;IAkDxC,OAAO,CAAC,8BAA8B;IAWtC;;;;;;OAMG;IACH,OAAO,CAAC,kCAAkC;IAsB1C,4FAA4F;YAC9E,sBAAsB;CAiBrC"}
|
|
@@ -14,7 +14,7 @@ var StartCompanionApplicationService_1;
|
|
|
14
14
|
import { chmodSync, mkdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
15
15
|
import { dirname, join } from 'node:path';
|
|
16
16
|
import { injectable, inject } from 'inversify';
|
|
17
|
-
import { I18nBackendService, SAAS_SERVICE_TYPES, HttpServerBackendService, MongoDBService, PostgreSQLDatabaseBackendService, RedisService, FileStorageRouterBackendService, ExternalProvidersRegistryBackendService, ObservabilityBackendService, WorkerShutdownManagerBackendService, FlowsActorsRegistryService, ControllersRegistryHandlerBackendService, ResourcesRegistryBackendService, ServicesRegistryHandlerBackendService, RepositoriesRegistryHandlerBackendService, ResourceOperationCustomImplementationRegistryBackendService, mergeBackendDomainModules, projectCaughtErrorLogFields, describeCaughtError, } from '@wildo-ai/saas-backend-lib';
|
|
17
|
+
import { I18nBackendService, SAAS_SERVICE_TYPES, HttpServerBackendService, MongoDBService, PostgreSQLDatabaseBackendService, RedisService, FileStorageRouterBackendService, ExternalProvidersRegistryBackendService, ObservabilityBackendService, WorkerShutdownManagerBackendService, FlowsActorsRegistryService, ControllersRegistryHandlerBackendService, ResourcesRegistryBackendService, ServicesRegistryHandlerBackendService, RepositoriesRegistryHandlerBackendService, ResourceOperationCustomImplementationRegistryBackendService, mergeBackendDomainModules, projectCaughtErrorLogFields, resolveBackendProviderRegistry, describeCaughtError, } from '@wildo-ai/saas-backend-lib';
|
|
18
18
|
import { CoreResourceType, buildSharedSaaSModulesRegistry, ENGINE_RUNTIME_REQUIRED_RESOURCE_TYPES, } from '@wildo-ai/saas-models';
|
|
19
19
|
import { registerFeatureSpecifications, registerRoleSpecifications, } from '@wildo-ai/saas-specifications';
|
|
20
20
|
import { PLATFORM_SHARED_SERVICE_TYPES, } from '@wildo-ai/platform-shared-lib';
|
|
@@ -28,7 +28,6 @@ import { buildCompanionResolvedAppConfig, parseCompanionPlatformEnv, planCompani
|
|
|
28
28
|
import { CustomShared_ResourceType, WorkbenchShared_ResourceType } from '@wildo-ai/platform-core-shared';
|
|
29
29
|
import { companionPlatformCoreBackendModule, companionPlatformCoreSharedModule, companionWorkbenchSharedModule, } from '../utils/platform-core-domain-modules.companion.js';
|
|
30
30
|
import { loadBackendCompanionExports, loadSharedLibraryCompanionExports, loadSpecificationsCompanionExports, } from '../../context/companion-package-loaders.companion.js';
|
|
31
|
-
import { CompanionStartupCompositionFence } from '../companion-startup-composition-fence.js';
|
|
32
31
|
/**
|
|
33
32
|
* Where the companion's resource-registry vocabulary came from at startup.
|
|
34
33
|
* Logged as `registrySource` — the load-bearing diagnostic for the recurring
|
|
@@ -62,6 +61,22 @@ const COMPANION_SHUTDOWN_STEP_TIMEOUT_MS = 5_000;
|
|
|
62
61
|
* path therefore hydrates `AppConfigurationService` itself before handing off to
|
|
63
62
|
* the standard backend runtime bootstrap.
|
|
64
63
|
*/
|
|
64
|
+
/**
|
|
65
|
+
* `CompanionStartupConfig.backendProviderRegistry` is typed `unknown` — deliberately, so the companion
|
|
66
|
+
* does not take a type dependency on the private connectors package — so it is CHECKED here rather
|
|
67
|
+
* than cast. A value that is not a fragment is dropped, and the companion then runs on exactly what
|
|
68
|
+
* its own artifact declares, which is the honest outcome: a malformed hand-off should not silently
|
|
69
|
+
* become an unfiltered catalogue.
|
|
70
|
+
*/
|
|
71
|
+
function asBackendProviderFragment(candidate) {
|
|
72
|
+
if (typeof candidate !== 'object' || candidate === null) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
const modules = candidate.modules;
|
|
76
|
+
return modules instanceof Map
|
|
77
|
+
? candidate
|
|
78
|
+
: undefined;
|
|
79
|
+
}
|
|
65
80
|
let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
66
81
|
static { StartCompanionApplicationService_1 = this; }
|
|
67
82
|
logger;
|
|
@@ -88,7 +103,6 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
88
103
|
appConfigInitializer;
|
|
89
104
|
companionContext;
|
|
90
105
|
authFloorService;
|
|
91
|
-
startupCompositionFence;
|
|
92
106
|
codingAgentDispatchService;
|
|
93
107
|
introspectionSourceWatcher;
|
|
94
108
|
introspectionResourceNotifier;
|
|
@@ -98,7 +112,7 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
98
112
|
readinessObservationHeartbeat = null;
|
|
99
113
|
initialized = false;
|
|
100
114
|
shutdownLifecycleRegistered = false;
|
|
101
|
-
constructor(logger, httpServerService, mongoDBService, postgresqlDatabaseService, redisService, fileStorageRouter, backendProviderRegistryService, externalProvidersRegistryService, observabilityBackendService, workerShutdownManager, flowsActorsRegistryService, resourcesRegistryService, controllersRegistryService, i18nController, applicationConfigController, authenticationController, featuresController, i18nService, servicesRegistryService, customImplRegistry, repositoriesRegistryService, appConfigInitializer, companionContext, authFloorService,
|
|
115
|
+
constructor(logger, httpServerService, mongoDBService, postgresqlDatabaseService, redisService, fileStorageRouter, backendProviderRegistryService, externalProvidersRegistryService, observabilityBackendService, workerShutdownManager, flowsActorsRegistryService, resourcesRegistryService, controllersRegistryService, i18nController, applicationConfigController, authenticationController, featuresController, i18nService, servicesRegistryService, customImplRegistry, repositoriesRegistryService, appConfigInitializer, companionContext, authFloorService, codingAgentDispatchService, introspectionSourceWatcher, introspectionResourceNotifier, introspectionResourceSource) {
|
|
102
116
|
this.logger = logger;
|
|
103
117
|
this.httpServerService = httpServerService;
|
|
104
118
|
this.mongoDBService = mongoDBService;
|
|
@@ -123,7 +137,6 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
123
137
|
this.appConfigInitializer = appConfigInitializer;
|
|
124
138
|
this.companionContext = companionContext;
|
|
125
139
|
this.authFloorService = authFloorService;
|
|
126
|
-
this.startupCompositionFence = startupCompositionFence;
|
|
127
140
|
this.codingAgentDispatchService = codingAgentDispatchService;
|
|
128
141
|
this.introspectionSourceWatcher = introspectionSourceWatcher;
|
|
129
142
|
this.introspectionResourceNotifier = introspectionResourceNotifier;
|
|
@@ -139,11 +152,6 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
139
152
|
this.logDebug('Companion runtime already initialized, skipping');
|
|
140
153
|
return;
|
|
141
154
|
}
|
|
142
|
-
// Capture the exact object accepted by ordinary startup before any
|
|
143
|
-
// externally visible or durable effect. The explicit maintenance operation
|
|
144
|
-
// observes this singleton later; startup itself performs no collection,
|
|
145
|
-
// authority, activation, deletion or repair.
|
|
146
|
-
this.startupCompositionFence.capture(config);
|
|
147
155
|
this.registerCompanionShutdownLifecycle();
|
|
148
156
|
// Start the best-effort heartbeat before the first external dependency can
|
|
149
157
|
// block. A hung Mongo/config/bootstrap phase is then distinguishable from
|
|
@@ -176,14 +184,12 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
176
184
|
this.logDebug('Connecting companion platform PostgreSQL from env');
|
|
177
185
|
this.postgresqlDatabaseService.connectWithUrl(storeConnections.postgresConnectUrl);
|
|
178
186
|
}
|
|
179
|
-
this.startupCompositionFence.assertUnchanged();
|
|
180
187
|
const resolvedAppConfig = await buildCompanionResolvedAppConfig({
|
|
181
188
|
companionContext: this.companionContext,
|
|
182
189
|
env: runtimeEnv,
|
|
183
190
|
backendConfig: config.backendConfig,
|
|
184
191
|
providerRuntime: config.providerRuntime,
|
|
185
192
|
});
|
|
186
|
-
this.startupCompositionFence.assertUnchanged();
|
|
187
193
|
this.appConfigInitializer.initializeWithFullConfig({
|
|
188
194
|
serviceName: runtimeEnv.SERVICE_NAME,
|
|
189
195
|
applicationId: runtimeEnv.APPLICATION_ID,
|
|
@@ -203,8 +209,7 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
203
209
|
* journal (`.claude/plans/rebuild-playbook-execution.md`, P3).
|
|
204
210
|
*/
|
|
205
211
|
await this.registerApplicationDefinitionSpecifications();
|
|
206
|
-
this.
|
|
207
|
-
await this.initializeCompanionProviderDependencies(config.backendProviderRegistry);
|
|
212
|
+
await this.initializeCompanionProviderDependencies(config.backendProviderRegistry, config.providerRuntime);
|
|
208
213
|
// Observability reconcile + graceful-flush wiring. The companion does NOT
|
|
209
214
|
// run `StartApplicationBackendService.initialize()` (custom startup), so
|
|
210
215
|
// without this explicit call the LLM-observability sink flush would never
|
|
@@ -214,7 +219,6 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
214
219
|
// initialized for the LLM_OBSERVABILITY / OBSERVABILITY_TELEMETRY selection
|
|
215
220
|
// lookups); never throws.
|
|
216
221
|
this.observabilityBackendService.initialize();
|
|
217
|
-
this.startupCompositionFence.assertUnchanged();
|
|
218
222
|
await this.initializeCompanionFlowsActors(config.flowsActorsRegistry);
|
|
219
223
|
await this.initializePlatformRuntimeDependencies();
|
|
220
224
|
/*
|
|
@@ -242,7 +246,6 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
242
246
|
error: describeCaughtError(error),
|
|
243
247
|
});
|
|
244
248
|
}
|
|
245
|
-
this.startupCompositionFence.assertUnchanged();
|
|
246
249
|
await this.initializePlatformHttpServer(config.customControllers);
|
|
247
250
|
this.initialized = true;
|
|
248
251
|
this.startLocalReadinessObservation();
|
|
@@ -251,12 +254,10 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
251
254
|
async initializePlatformExecutionPersistence() {
|
|
252
255
|
const registryInit = await this.resolveResourceRegistryInitInputs();
|
|
253
256
|
/*
|
|
254
|
-
* `
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* assembled above are real and correct; the crossing is explicit until the engine type is
|
|
259
|
-
* repaired. See issue #44.
|
|
257
|
+
* The two `as never` crossings that stood here are gone: `ResourceConfiguration_InitializationFactoryMap`
|
|
258
|
+
* used without a type argument resolved to `undefined`, so the engine signature literally accepted
|
|
259
|
+
* `undefined` and these real maps had to be forced through it. The bare form now resolves to the
|
|
260
|
+
* open map, so the maps assembled above are assignable on their own terms (#44).
|
|
260
261
|
*/
|
|
261
262
|
await this.resourcesRegistryService.initialize(registryInit.sharedConfigurations, registryInit.sharedFieldIdentifiers, registryInit.sharedRelationships, registryInit.backendConfigurations, registryInit.backendFieldIdentifiers, registryInit.backendRelationships);
|
|
262
263
|
const resourcesRegistry = this.resourcesRegistryService.getResourcesRegistry();
|
|
@@ -390,11 +391,12 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
390
391
|
// registrations to WIN over a same-keyed platform-core entry.
|
|
391
392
|
return {
|
|
392
393
|
source: ResourceRegistryInitSource.APP_COMPANION_EXPORTS,
|
|
393
|
-
// These
|
|
394
|
-
//
|
|
395
|
-
//
|
|
396
|
-
//
|
|
397
|
-
//
|
|
394
|
+
// These spreads carried a `Record<string, unknown>` cast each, plus an extra `unknown` hop on
|
|
395
|
+
// the app registry, and an outer assertion to put the factory type back. All of it existed
|
|
396
|
+
// because `ResourceConfiguration_InitializationFactoryMap` used without a type argument
|
|
397
|
+
// resolved to `undefined`, so every field carrying that alias was statically `undefined`
|
|
398
|
+
// while holding a real map. The alias now resolves to the open map, so the spreads type
|
|
399
|
+
// themselves (#44).
|
|
398
400
|
/*
|
|
399
401
|
* The workbench module is spread FIRST so the existing precedence is untouched: an app or
|
|
400
402
|
* engine registration of the same key still wins, exactly as it wins over platform-core.
|
|
@@ -458,9 +460,33 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
458
460
|
};
|
|
459
461
|
}
|
|
460
462
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
463
|
+
/**
|
|
464
|
+
* The companion is the FOURTH host of the on-demand provider loader (#330), and the only one that
|
|
465
|
+
* used to pass no topology at all.
|
|
466
|
+
*
|
|
467
|
+
* It already loaded its own `companion.runtime-providers.generated.json` — `loadProviderRuntime` in
|
|
468
|
+
* `companion-startup-assembly.ts` reads it and hands it over as `config.providerRuntime` — and then
|
|
469
|
+
* initialised the registry without it, which meant the companion process received the ENGINE'S
|
|
470
|
+
* WHOLE CATALOGUE: twenty-two provider modules, six pulling a model SDK, for a scope that names a
|
|
471
|
+
* handful. So closing this seam needed no new request shape and no new file, only the wiring of a
|
|
472
|
+
* value that was already in hand.
|
|
473
|
+
*
|
|
474
|
+
* The artifact reaches `initialize` too, so the companion gets the same fail-loud refusal every
|
|
475
|
+
* other host gets when its scope names a provider nothing can supply.
|
|
476
|
+
*/
|
|
477
|
+
async initializeCompanionProviderDependencies(backendProviderRegistry, providerRuntime) {
|
|
478
|
+
const resolved = await resolveBackendProviderRegistry({
|
|
479
|
+
// The companion artifact is single-scope (`artifactKind: 'companion'`, `scope` already projected
|
|
480
|
+
// by the CLI). It satisfies the loader's `DeclaredProviderTopology` structurally, which is why
|
|
481
|
+
// that contract is stated as a shape rather than as the backend's nominal artifact type.
|
|
482
|
+
providerRuntime,
|
|
483
|
+
applicationFragment: asBackendProviderFragment(backendProviderRegistry),
|
|
484
|
+
});
|
|
485
|
+
this.backendProviderRegistryService.initialize(resolved.registry, providerRuntime, resolved.unresolved);
|
|
486
|
+
this.logDebug('Companion backend provider registry initialized', {
|
|
487
|
+
providerRuntimeApplied: Boolean(providerRuntime),
|
|
488
|
+
providerCount: resolved.registry.modules.size,
|
|
489
|
+
});
|
|
464
490
|
await this.externalProvidersRegistryService.refreshFromConfig();
|
|
465
491
|
}
|
|
466
492
|
async initializeCompanionFlowsActors(flowsActorsRegistry) {
|
|
@@ -507,10 +533,6 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
507
533
|
// the token middleware on mutating routes. Runs after app-config
|
|
508
534
|
// hydration because host resolution reads `runtime.endPoints`.
|
|
509
535
|
await this.authFloorService.enforceStartupInvariants();
|
|
510
|
-
// Auth-floor initialization is an asynchronous/external boundary relative to
|
|
511
|
-
// the retained startup object. Revalidate at the last possible point before
|
|
512
|
-
// the controller objects are consumed.
|
|
513
|
-
this.startupCompositionFence.assertUnchanged();
|
|
514
536
|
await this.registerCustomControllers(customControllers);
|
|
515
537
|
await this.initializeWorkbenchResourceControllers();
|
|
516
538
|
/*
|
|
@@ -644,11 +666,16 @@ let StartCompanionApplicationService = class StartCompanionApplicationService {
|
|
|
644
666
|
* Authentication, because the workbench renders the engine's own application shell and that
|
|
645
667
|
* shell routes an unauthenticated visitor to `/login`.
|
|
646
668
|
*
|
|
647
|
-
* The operator signs in
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
669
|
+
* The operator signs in with `ADMIN_EMAIL` / `ADMIN_PASSWORD` (`PlatformAdminEnvKey`), which
|
|
670
|
+
* apps-manager provisions in INIT mode, so this mounts an authentication surface over an
|
|
671
|
+
* EXISTING user store rather than inventing a second identity for the workbench.
|
|
672
|
+
*
|
|
673
|
+
* That store is the PLATFORM's, NOT the application's. The two are different databases and
|
|
674
|
+
* both hold a row for that email with different roles, so the operator authenticated here is
|
|
675
|
+
* the platform identity, never the application administrator. `buildWorkbenchFrontendServiceEntry`
|
|
676
|
+
* in `companion-platform-config.companion.ts` records the consequence in detail: `usersManagement`
|
|
677
|
+
* is authored EMPTY because the platform identity carries no `userTypes`, and declaring the
|
|
678
|
+
* application's type fails every workbench login with `authentication_user_type_mismatch`.
|
|
652
679
|
*
|
|
653
680
|
* The surface this opens is real and deliberately bounded: the companion asserts a loopback
|
|
654
681
|
* bind at startup and fails closed otherwise, so these routes are reachable only from the
|
|
@@ -927,11 +954,10 @@ StartCompanionApplicationService = StartCompanionApplicationService_1 = __decora
|
|
|
927
954
|
__param(21, inject(PLATFORM_SHARED_SERVICE_TYPES.PlatformAppConfigInitializerService)),
|
|
928
955
|
__param(22, inject(COMPANION_SERVICE_TYPES.CompanionContext)),
|
|
929
956
|
__param(23, inject(COMPANION_SERVICE_TYPES.AuthFloorService)),
|
|
930
|
-
__param(24, inject(COMPANION_SERVICE_TYPES.
|
|
931
|
-
__param(25, inject(COMPANION_SERVICE_TYPES.
|
|
932
|
-
__param(26, inject(COMPANION_SERVICE_TYPES.
|
|
933
|
-
__param(27, inject(
|
|
934
|
-
__param(28, inject(SAAS_SERVICE_TYPES.IntrospectionResourceSource)),
|
|
957
|
+
__param(24, inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService)),
|
|
958
|
+
__param(25, inject(COMPANION_SERVICE_TYPES.IntrospectionSourceWatcherService)),
|
|
959
|
+
__param(26, inject(COMPANION_SERVICE_TYPES.IntrospectionResourceNotifierService)),
|
|
960
|
+
__param(27, inject(SAAS_SERVICE_TYPES.IntrospectionResourceSource)),
|
|
935
961
|
__metadata("design:paramtypes", [Function, HttpServerBackendService,
|
|
936
962
|
MongoDBService,
|
|
937
963
|
PostgreSQLDatabaseBackendService,
|
|
@@ -945,7 +971,6 @@ StartCompanionApplicationService = StartCompanionApplicationService_1 = __decora
|
|
|
945
971
|
ServicesRegistryHandlerBackendService,
|
|
946
972
|
ResourceOperationCustomImplementationRegistryBackendService,
|
|
947
973
|
RepositoriesRegistryHandlerBackendService, Function, Object, CompanionAuthFloorCompanionService,
|
|
948
|
-
CompanionStartupCompositionFence,
|
|
949
974
|
CodingAgentDispatchCompanionService,
|
|
950
975
|
IntrospectionSourceWatcherCompanionService,
|
|
951
976
|
IntrospectionResourceNotifierCompanionService,
|