@wildo-ai/dev-companion 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +21 -0
- 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 +37 -4
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +9 -2
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +66 -0
- 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 +191 -13
- 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 +6 -2
- 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 +16 -39
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +31 -2
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +2 -0
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +8 -0
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +13 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +39 -13
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts +17 -0
- package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts.map +1 -0
- package/dist/esm/companion-api/controllers/long-held-request.companion.js +33 -0
- package/dist/esm/companion-api/controllers/long-held-request.companion.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +9 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +19 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.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 +7 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts +5 -1
- package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/launch-blockers.companion.js +37 -4
- package/dist/esm/core/introspection/resources/launch-blockers.companion.js.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +14 -0
- 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 +48 -0
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.d.ts +128 -0
- package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.js +180 -0
- package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +8 -20
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +37 -142
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts +64 -0
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.js +304 -0
- package/dist/esm/core/introspection/services/introspection-source-walk.worker.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-worker-pool.companion.d.ts +9 -0
- package/dist/esm/core/introspection/services/introspection-worker-pool.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-worker-pool.companion.js +25 -3
- package/dist/esm/core/introspection/services/introspection-worker-pool.companion.js.map +1 -1
- package/dist/esm/core/runtime/companion-language-model-route.d.ts +16 -1
- package/dist/esm/core/runtime/companion-language-model-route.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-language-model-route.js +23 -1
- package/dist/esm/core/runtime/companion-language-model-route.js.map +1 -1
- package/dist/esm/core/runtime/restart-drain.companion.d.ts +107 -0
- package/dist/esm/core/runtime/restart-drain.companion.d.ts.map +1 -0
- package/dist/esm/core/runtime/restart-drain.companion.js +237 -0
- package/dist/esm/core/runtime/restart-drain.companion.js.map +1 -0
- 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 +3 -2
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/utils/git-read-broker.companion.d.ts +62 -0
- package/dist/esm/core/utils/git-read-broker.companion.d.ts.map +1 -0
- package/dist/esm/core/utils/git-read-broker.companion.js +282 -0
- package/dist/esm/core/utils/git-read-broker.companion.js.map +1 -0
- package/dist/esm/core/utils/local-write-recording.companion.d.ts +8 -1
- package/dist/esm/core/utils/local-write-recording.companion.d.ts.map +1 -1
- package/dist/esm/core/utils/local-write-recording.companion.js +7 -23
- package/dist/esm/core/utils/local-write-recording.companion.js.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -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 +34 -8
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js +29 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js +5 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js +41 -0
- package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +2 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js +2 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +2 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +3 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts +2 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js +3 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.d.ts +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +2 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +3 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts +3 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js +4 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +17 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +18 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts +17 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js +18 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts +206 -195
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js +206 -195
- package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts +10 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js +12 -2
- package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts +70 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js +70 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts +12 -2
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js +12 -2
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts +10 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js +10 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts +25 -20
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js +25 -20
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.d.ts +32 -32
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js +32 -32
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.d.ts +65 -65
- package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js +65 -65
- package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts +20 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js +20 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts +12 -0
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js +13 -1
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +40 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +13 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +40 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +40 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts +5 -0
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.en.js +6 -0
- package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +175 -170
- package/dist/esm/i18n/system_enums/application-creation.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.fr.js +175 -170
- package/dist/esm/i18n/system_enums/application-creation.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/flows-actors.fr.d.ts +22 -22
- package/dist/esm/i18n/system_enums/flows-actors.fr.js +22 -22
- package/dist/esm/i18n/system_enums/flows-actors.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/run-records.fr.d.ts +21 -21
- package/dist/esm/i18n/system_enums/run-records.fr.js +21 -21
- package/dist/esm/i18n/system_enums/run-records.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +3 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts +37 -33
- package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.fr.js +37 -33
- package/dist/esm/i18n/system_enums/workbench-build.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +1 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +1 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts +18 -17
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js +18 -17
- package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts +7 -5
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.js +8 -6
- package/dist/esm/i18n/system_enums/workbench-dossier.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-secrets.fr.d.ts +12 -12
- package/dist/esm/i18n/system_enums/workbench-secrets.fr.js +12 -12
- package/dist/esm/i18n/system_enums/workbench-secrets.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts +1 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js +2 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js.map +1 -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 +3 -4
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +11 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +21 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +5 -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 +5 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +12 -0
- package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js +9 -0
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +200 -20
- 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 +1107 -230
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +158 -16
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +381 -46
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +58 -0
- 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 +116 -2
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts +3 -3
- package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js +3 -3
- package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts +9 -0
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js +19 -0
- package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +12 -0
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +31 -7
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +4 -5
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts +2 -2
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +10 -8
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +6 -3
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js +3 -5
- package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +68 -3
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +281 -69
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/package.json +18 -18
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* - so do the brand, the brand-name screening, the market snapshot and the dossier the brand name's standing is
|
|
13
13
|
* derived from (#2338), and the compliance programme whose HARD obligations are read (#55);
|
|
14
14
|
* - the providers' compliance profiles come through the application's own discovery, and the residency answer from the
|
|
15
|
-
* dossier, at the moment of the read (#2294)
|
|
15
|
+
* dossier, at the moment of the read (#2294);
|
|
16
|
+
* - each environment's `wildo.infra.<env>.config.ts` is re-loaded fresh, for what it declares about its agents'
|
|
17
|
+
* guardrails (#2292).
|
|
16
18
|
*
|
|
17
19
|
* ## Read failures are carried, never swallowed into "nothing open"
|
|
18
20
|
*
|
|
@@ -45,6 +47,8 @@ export interface LaunchBlockerPorts {
|
|
|
45
47
|
readonly readAssuranceProgram: () => Promise<NonNullable<LaunchBlockerInputs['assuranceProgram']>>;
|
|
46
48
|
/** The data-serving providers, their compliance profiles and the residency answer, for the configuration just read (#2294). */
|
|
47
49
|
readonly readProviderDataResidency: (applicationConfig: WildoSaasConfig) => Promise<NonNullable<LaunchBlockerInputs['providerDataResidency']>>;
|
|
50
|
+
/** What each authored environment declares about its agents' guardrails, its infra config loaded fresh (#2292). */
|
|
51
|
+
readonly readEnvironmentAgentGuardrails: () => Promise<NonNullable<LaunchBlockerInputs['environmentAgentGuardrails']>>;
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
54
|
* The ports bound to this companion: the configuration re-loaded fresh (NOT `companionContext.saasConfig`, resolved
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch-blockers.companion.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/resources/launch-blockers.companion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"launch-blockers.companion.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/resources/launch-blockers.companion.ts"],"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O,CAAC,WAAW,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;CACxH;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,gBAAgB,EAAE,gBAAgB,EAClC,uBAAuB,EAAE,kBAAkB,CAAC,yBAAyB,CAAC,GACrE,kBAAkB,CAmDpB;AAwBD,kCAAkC;AAClC,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,GAAE,IAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAmFtH"}
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* - so do the brand, the brand-name screening, the market snapshot and the dossier the brand name's standing is
|
|
13
13
|
* derived from (#2338), and the compliance programme whose HARD obligations are read (#55);
|
|
14
14
|
* - the providers' compliance profiles come through the application's own discovery, and the residency answer from the
|
|
15
|
-
* dossier, at the moment of the read (#2294)
|
|
15
|
+
* dossier, at the moment of the read (#2294);
|
|
16
|
+
* - each environment's `wildo.infra.<env>.config.ts` is re-loaded fresh, for what it declares about its agents'
|
|
17
|
+
* guardrails (#2292).
|
|
16
18
|
*
|
|
17
19
|
* ## Read failures are carried, never swallowed into "nothing open"
|
|
18
20
|
*
|
|
@@ -24,9 +26,9 @@
|
|
|
24
26
|
* set as "nothing drafted" (logged at debug). In that case the queue holds no governance question and this list reports
|
|
25
27
|
* none, without an unevaluated source — the queue itself cannot tell the two apart. Closing it belongs to the queue.
|
|
26
28
|
*/
|
|
27
|
-
import { existsSync } from 'node:fs';
|
|
28
|
-
import { join } from 'node:path';
|
|
29
|
-
import { dataServingProviderRefs, loadSaasConfig, resolveProviderComplianceProfiles } from '@wildo-ai/platform-config-lib';
|
|
29
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
30
|
+
import { join, relative } from 'node:path';
|
|
31
|
+
import { dataServingProviderRefs, loadInfraEnvConfig, loadSaasConfig, resolveAppLayout, resolveProviderComplianceProfiles, WildoLocationType, } from '@wildo-ai/platform-config-lib';
|
|
30
32
|
import { JurisdictionSlugListReadingKind, LEGAL_NOTICE_GENERATED_RELATIVE_PATH, parseJurisdictionSlugList, describeCaughtError } from '@wildo-ai/saas-models';
|
|
31
33
|
import { DATA_RESIDENCY_TERRITORIES_PLAYBOOK_REF, DATA_RESIDENCY_TERRITORIES_QUESTION_REF, createCompanionExportsFamilyReader } from '@wildo-ai/application-creation-runtime';
|
|
32
34
|
import { ApplicationCreatorInputsSchema, ApplicationSpecificationFamily, deriveLaunchBlockers, readCreatorInputAnswersForPlaybook, LaunchBlockerSource, SUBJECT_DATA_RECIPIENTS_GENERATED_RELATIVE_PATH, } from '@wildo-ai/saas-specifications/application-creation';
|
|
@@ -41,6 +43,7 @@ export function companionLaunchBlockerPorts(companionContext, readGovernanceQues
|
|
|
41
43
|
return {
|
|
42
44
|
saasRoot: companionContext.saasRoot,
|
|
43
45
|
readApplicationConfig: () => loadSaasConfig(join(companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true }),
|
|
46
|
+
readEnvironmentAgentGuardrails: () => readEnvironmentAgentGuardrails(companionContext.saasRoot),
|
|
44
47
|
readGovernanceQuestions,
|
|
45
48
|
readDocumentReleases: async () => {
|
|
46
49
|
// No specifications package records no release — which IS the open sign-up decision, not an unread source.
|
|
@@ -88,6 +91,28 @@ export function companionLaunchBlockerPorts(companionContext, readGovernanceQues
|
|
|
88
91
|
},
|
|
89
92
|
};
|
|
90
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Each authored environment's `agentContentGuardrails` (#2292): every directory under the application's infrastructure
|
|
96
|
+
* home whose infra config loads, as the CLI enumerates environments. A directory without a config is not an environment.
|
|
97
|
+
* One that fails to load THROWS, so the source is reported unevaluated rather than read as "nothing declared".
|
|
98
|
+
*/
|
|
99
|
+
async function readEnvironmentAgentGuardrails(saasRoot) {
|
|
100
|
+
const home = resolveAppLayout(saasRoot).authoredInfrastructureHome;
|
|
101
|
+
const names = existsSync(home) ? readdirSync(home, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort() : [];
|
|
102
|
+
const entries = [];
|
|
103
|
+
for (const environment of names) {
|
|
104
|
+
const loaded = await loadInfraEnvConfig(saasRoot, environment, { freshModuleCache: true });
|
|
105
|
+
if (loaded === null)
|
|
106
|
+
continue;
|
|
107
|
+
entries.push({
|
|
108
|
+
environment,
|
|
109
|
+
local: loaded.config.locationType === WildoLocationType.LOCAL,
|
|
110
|
+
...(loaded.config.agentContentGuardrails ? { declaration: loaded.config.agentContentGuardrails } : {}),
|
|
111
|
+
declaredIn: relative(saasRoot, loaded.path),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return entries;
|
|
115
|
+
}
|
|
91
116
|
/** The launch list, as of now. */
|
|
92
117
|
export async function readLaunchBlockers(ports, now = new Date()) {
|
|
93
118
|
const unreadableReasons = {};
|
|
@@ -134,6 +159,13 @@ export async function readLaunchBlockers(ports, now = new Date()) {
|
|
|
134
159
|
catch (error) {
|
|
135
160
|
unreadableReasons[LaunchBlockerSource.ASSURANCE_PROGRAM] = describeCaughtError(error);
|
|
136
161
|
}
|
|
162
|
+
let environmentAgentGuardrails;
|
|
163
|
+
try {
|
|
164
|
+
environmentAgentGuardrails = await ports.readEnvironmentAgentGuardrails();
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
unreadableReasons[LaunchBlockerSource.ENVIRONMENT_CONFIGS] = describeCaughtError(error);
|
|
168
|
+
}
|
|
137
169
|
let providerDataResidency;
|
|
138
170
|
if (applicationConfig !== undefined) {
|
|
139
171
|
try {
|
|
@@ -163,6 +195,7 @@ export async function readLaunchBlockers(ports, now = new Date()) {
|
|
|
163
195
|
...(brandNaming ? { brandNaming } : {}),
|
|
164
196
|
...(assuranceProgram ? { assuranceProgram } : {}),
|
|
165
197
|
...(providerDataResidency ? { providerDataResidency } : {}),
|
|
198
|
+
...(environmentAgentGuardrails ? { environmentAgentGuardrails } : {}),
|
|
166
199
|
unreadableReasons,
|
|
167
200
|
});
|
|
168
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch-blockers.companion.js","sourceRoot":"","sources":["../../../../../src/core/introspection/resources/launch-blockers.companion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,iCAAiC,EAAwB,MAAM,+BAA+B,CAAC;AAEjJ,OAAO,EAAE,+BAA+B,EAAE,oCAAoC,EAAE,yBAAyB,EAAgC,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5L,OAAO,EAAE,uCAAuC,EAAE,uCAAuC,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAC9K,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,oBAAoB,EACpB,kCAAkC,EAClC,mBAAmB,EACnB,+CAA+C,GAIhD,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,kDAAkD,EAAE,MAAM,yCAAyC,CAAC;AAG7G,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAoBhG;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CACzC,gBAAkC,EAClC,uBAAsE;IAEtE,OAAO;QACL,QAAQ,EAAE,gBAAgB,CAAC,QAAQ;QACnC,qBAAqB,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,sBAAsB,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;QAChI,uBAAuB;QACvB,oBAAoB,EAAE,KAAK,IAAI,EAAE;YAC/B,2GAA2G;YAC3G,IAAI,gBAAgB,CAAC,sBAAsB,EAAE,WAAW,KAAK,SAAS;gBAAE,OAAO,EAAE,CAAC;YAClF,MAAM,OAAO,GA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EAAE,mBAAmB,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAChH,GAAG,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,yBAAyB,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACnI;aACF;YACD,CAAC,CAAC,EAAE,CAAC;QACP,kCAAkC,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,+CAA+C,CAAC,CAAC;QACrH,wBAAwB,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,oCAAoC,CAAC,CAAC;QAChG,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,6BAA6B,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,kDAAkD,CAAC,CAAC;QACnH,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,iBAAiB;KAClB,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * The companion's half of the \"before you can launch\" list (#2238): it READS each input fresh and hands them\n * to `deriveLaunchBlockers`, the one derivation the list has. It decides nothing itself.\n *\n * ## Fresh on every read, because settling an item must remove it\n *\n * - the configuration is re-loaded with `freshModuleCache`, not taken from `companionContext.saasConfig`,\n * which is resolved once at boot and would keep a declared legal entity on the list until a restart;\n * - the generated modules are probed on disk at the moment of the read;\n * - the question queue is the creation plane's projection, which an answer invalidates;\n * - the releases come from the specifications exports, whose cache is keyed by the package's tree signature;\n * - so do the brand, the brand-name screening, the market snapshot and the dossier the brand name's standing is\n * derived from (#2338), and the compliance programme whose HARD obligations are read (#55);\n * - the providers' compliance profiles come through the application's own discovery, and the residency answer from the\n * dossier, at the moment of the read (#2294).\n *\n * ## Read failures are carried, never swallowed into \"nothing open\"\n *\n * Each read is caught on its own and reported as an unevaluated source with its reason. An unreadable\n * configuration must not hide the governance questions, and it must not read as a clean list either.\n *\n * RESIDUAL, stated rather than hidden: the question queue decides whether a governance fact is asked from the set of\n * DRAFTED documents, and `DossierCompanionService.listDraftedGovernedDocumentDefinitionRefs` reads an unreadable draft\n * set as \"nothing drafted\" (logged at debug). In that case the queue holds no governance question and this list reports\n * none, without an unevaluated source — the queue itself cannot tell the two apart. Closing it belongs to the queue.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport { dataServingProviderRefs, loadSaasConfig, resolveProviderComplianceProfiles, type WildoSaasConfig } from '@wildo-ai/platform-config-lib';\nimport type { CreationConsole_Question } from '@wildo-ai/platform-core-shared';\nimport { JurisdictionSlugListReadingKind, LEGAL_NOTICE_GENERATED_RELATIVE_PATH, parseJurisdictionSlugList, type GovernedDocumentRelease, describeCaughtError } from '@wildo-ai/saas-models';\nimport { DATA_RESIDENCY_TERRITORIES_PLAYBOOK_REF, DATA_RESIDENCY_TERRITORIES_QUESTION_REF, createCompanionExportsFamilyReader } from '@wildo-ai/application-creation-runtime';\nimport {\n ApplicationCreatorInputsSchema,\n ApplicationSpecificationFamily,\n deriveLaunchBlockers,\n readCreatorInputAnswersForPlaybook,\n LaunchBlockerSource,\n SUBJECT_DATA_RECIPIENTS_GENERATED_RELATIVE_PATH,\n type LaunchBlockerGovernanceQuestion,\n type LaunchBlockerInputs,\n type LaunchBlockerList,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport { GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH } from '@wildo-ai/saas-specifications/assurance';\n\nimport type { CompanionContext } from '../../context/companion-context';\nimport { loadSpecificationFamilyData } from '../../context/specification-family-data.companion';\n\n/** What the list reads, bound by the controller to the companion's own services. */\nexport interface LaunchBlockerPorts {\n /** The application root: where `wildo.saas.config.ts` and `backend-api/` live. */\n readonly saasRoot: string;\n /** `wildo.saas.config.ts`, loaded fresh. `null` when it could not be loaded. */\n readonly readApplicationConfig: () => Promise<WildoSaasConfig | null>;\n /** The question queue's `GOVERNANCE_FACT` items — the same read `wildo creation questions` serves. */\n readonly readGovernanceQuestions: () => Promise<readonly CreationConsole_Question[]>;\n /** The recorded releases (`documentReleaseSet`); empty when the application has no specifications package. */\n readonly readDocumentReleases: () => Promise<readonly GovernedDocumentRelease[]>;\n /** The landed families the brand name's standing is derived from, raw; each absent one reads `undefined`. */\n readonly readBrandNaming: () => Promise<NonNullable<LaunchBlockerInputs['brandNaming']>>;\n /** The landed compliance programme, raw; `program` reads `undefined` when none has landed. */\n readonly readAssuranceProgram: () => Promise<NonNullable<LaunchBlockerInputs['assuranceProgram']>>;\n /** The data-serving providers, their compliance profiles and the residency answer, for the configuration just read (#2294). */\n readonly readProviderDataResidency: (applicationConfig: WildoSaasConfig) => Promise<NonNullable<LaunchBlockerInputs['providerDataResidency']>>;\n}\n\n/**\n * The ports bound to this companion: the configuration re-loaded fresh (NOT `companionContext.saasConfig`, resolved\n * once at boot, which would keep a declared field on the list until a restart) and the releases from the\n * specifications exports. The question queue is the controller's, because it owns the creation plane's ports.\n */\nexport function companionLaunchBlockerPorts(\n companionContext: CompanionContext,\n readGovernanceQuestions: LaunchBlockerPorts['readGovernanceQuestions'],\n): LaunchBlockerPorts {\n return {\n saasRoot: companionContext.saasRoot,\n readApplicationConfig: () => loadSaasConfig(join(companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true }),\n readGovernanceQuestions,\n readDocumentReleases: async () => {\n // No specifications package records no release — which IS the open sign-up decision, not an unread source.\n if (companionContext.resolvedSpecifications?.packageRoot === undefined) return [];\n const exports = (await loadSpecificationFamilyData(companionContext)) as {\n documentReleaseSet?: { releases?: readonly GovernedDocumentRelease[] };\n } | undefined;\n return exports?.documentReleaseSet?.releases ?? [];\n },\n readBrandNaming: async () => {\n // No specifications package lands no brand: nothing to stand against a screening, not an unread source.\n const exports = companionContext.resolvedSpecifications?.packageRoot === undefined\n ? undefined\n : (await loadSpecificationFamilyData(companionContext)) as unknown as Readonly<Record<string, unknown>> | undefined;\n const families = createCompanionExportsFamilyReader(exports);\n return {\n brand: families.readFamily(ApplicationSpecificationFamily.BRAND_BRIEF),\n screening: families.readFamily(ApplicationSpecificationFamily.BRAND_NAME_SCREENING),\n market: families.readFamily(ApplicationSpecificationFamily.MARKET_SNAPSHOT),\n creatorInputs: families.readFamily(ApplicationSpecificationFamily.CREATOR_INPUTS),\n };\n },\n readAssuranceProgram: async () => {\n // No specifications package lands no programme: nothing is obligated yet, not an unread source.\n if (companionContext.resolvedSpecifications?.packageRoot === undefined) return { program: undefined };\n const exports = (await loadSpecificationFamilyData(companionContext)) as unknown as Readonly<Record<string, unknown>> | undefined;\n return { program: createCompanionExportsFamilyReader(exports).readFamily(ApplicationSpecificationFamily.COMPLIANCE_PROGRAM) };\n },\n readProviderDataResidency: async (applicationConfig) => {\n const { profilesByProviderRef } = await resolveProviderComplianceProfiles({ saasRoot: companionContext.saasRoot, saasConfig: applicationConfig });\n const exports = companionContext.resolvedSpecifications?.packageRoot === undefined\n ? undefined\n : (await loadSpecificationFamilyData(companionContext)) as unknown as Readonly<Record<string, unknown>> | undefined;\n const rawCreatorInputs = createCompanionExportsFamilyReader(exports).readFamily(ApplicationSpecificationFamily.CREATOR_INPUTS);\n // A dossier that landed and does not parse is an unread source, never \"no residency answered\".\n const creatorInputs = rawCreatorInputs === undefined ? undefined : ApplicationCreatorInputsSchema.parse(rawCreatorInputs);\n const answer = readCreatorInputAnswersForPlaybook(creatorInputs, DATA_RESIDENCY_TERRITORIES_PLAYBOOK_REF)\n .find((candidate) => candidate.questionRef === DATA_RESIDENCY_TERRITORIES_QUESTION_REF)?.answer;\n const reading = answer === undefined ? undefined : parseJurisdictionSlugList(answer);\n return {\n ...(reading?.kind === JurisdictionSlugListReadingKind.SLUGS ? { answeredTerritories: reading.slugs } : {}),\n providerRefs: dataServingProviderRefs(applicationConfig.providers.scopes),\n profilesByProviderRef,\n };\n },\n };\n}\n\n/** The launch list, as of now. */\nexport async function readLaunchBlockers(ports: LaunchBlockerPorts, now: Date = new Date()): Promise<LaunchBlockerList> {\n const unreadableReasons: Partial<Record<LaunchBlockerSource, string>> = {};\n\n let applicationConfig: WildoSaasConfig | undefined;\n try {\n const loaded = await ports.readApplicationConfig();\n if (loaded === null) unreadableReasons[LaunchBlockerSource.APPLICATION_CONFIG] = `${join(ports.saasRoot, 'wildo.saas.config.ts')} could not be loaded`;\n else applicationConfig = loaded;\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.APPLICATION_CONFIG] = describeCaughtError(error);\n }\n\n let governanceQuestions: LaunchBlockerGovernanceQuestion[] | undefined;\n try {\n governanceQuestions = (await ports.readGovernanceQuestions()).map((question) => ({\n questionId: question.questionId,\n definitionRef: question.definitionRef,\n prompt: question.fields.map((field) => field.question).join(' / '),\n }));\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.QUESTION_QUEUE] = describeCaughtError(error);\n }\n\n let documentReleases: readonly GovernedDocumentRelease[] | undefined;\n try {\n documentReleases = await ports.readDocumentReleases();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.DOCUMENT_RELEASES] = describeCaughtError(error);\n }\n\n let brandNaming: LaunchBlockerInputs['brandNaming'];\n try {\n brandNaming = await ports.readBrandNaming();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.BRAND_NAMING] = describeCaughtError(error);\n }\n\n let assuranceProgram: LaunchBlockerInputs['assuranceProgram'];\n try {\n assuranceProgram = await ports.readAssuranceProgram();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.ASSURANCE_PROGRAM] = describeCaughtError(error);\n }\n\n let providerDataResidency: LaunchBlockerInputs['providerDataResidency'];\n if (applicationConfig !== undefined) {\n try {\n providerDataResidency = await ports.readProviderDataResidency(applicationConfig);\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.PROVIDER_DATA_RESIDENCY] = describeCaughtError(error);\n }\n }\n\n return deriveLaunchBlockers({\n computedAt: now.toISOString(),\n ...(applicationConfig\n ? {\n applicationConfig: {\n ...(applicationConfig.operatorComplianceIdentity ? { operatorComplianceIdentity: applicationConfig.operatorComplianceIdentity } : {}),\n ...(applicationConfig.dataRetention ? { dataRetention: applicationConfig.dataRetention } : {}),\n ...(applicationConfig.brandNameClearances ? { brandNameClearances: applicationConfig.brandNameClearances } : {}),\n ...(applicationConfig.providerComplianceChoices ? { providerComplianceChoices: applicationConfig.providerComplianceChoices } : {}),\n },\n }\n : {}),\n subjectDataRecipientsModulePresent: existsSync(join(ports.saasRoot, SUBJECT_DATA_RECIPIENTS_GENERATED_RELATIVE_PATH)),\n legalNoticeModulePresent: existsSync(join(ports.saasRoot, LEGAL_NOTICE_GENERATED_RELATIVE_PATH)),\n ...(governanceQuestions ? { governanceQuestions } : {}),\n ...(documentReleases ? { documentReleases } : {}),\n documentReleasesModulePresent: existsSync(join(ports.saasRoot, GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH)),\n ...(brandNaming ? { brandNaming } : {}),\n ...(assuranceProgram ? { assuranceProgram } : {}),\n ...(providerDataResidency ? { providerDataResidency } : {}),\n unreadableReasons,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"launch-blockers.companion.js","sourceRoot":"","sources":["../../../../../src/core/introspection/resources/launch-blockers.companion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,M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AAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAChH,GAAG,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,yBAAyB,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACnI;aACF;YACD,CAAC,CAAC,EAAE,CAAC;QACP,kCAAkC,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,+CAA+C,CAAC,CAAC;QACrH,wBAAwB,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,oCAAoC,CAAC,CAAC;QAChG,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,6BAA6B,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,kDAAkD,CAAC,CAAC;QACnH,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,iBAAiB;KAClB,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * The companion's half of the \"before you can launch\" list (#2238): it READS each input fresh and hands them\n * to `deriveLaunchBlockers`, the one derivation the list has. It decides nothing itself.\n *\n * ## Fresh on every read, because settling an item must remove it\n *\n * - the configuration is re-loaded with `freshModuleCache`, not taken from `companionContext.saasConfig`,\n * which is resolved once at boot and would keep a declared legal entity on the list until a restart;\n * - the generated modules are probed on disk at the moment of the read;\n * - the question queue is the creation plane's projection, which an answer invalidates;\n * - the releases come from the specifications exports, whose cache is keyed by the package's tree signature;\n * - so do the brand, the brand-name screening, the market snapshot and the dossier the brand name's standing is\n * derived from (#2338), and the compliance programme whose HARD obligations are read (#55);\n * - the providers' compliance profiles come through the application's own discovery, and the residency answer from the\n * dossier, at the moment of the read (#2294);\n * - each environment's `wildo.infra.<env>.config.ts` is re-loaded fresh, for what it declares about its agents'\n * guardrails (#2292).\n *\n * ## Read failures are carried, never swallowed into \"nothing open\"\n *\n * Each read is caught on its own and reported as an unevaluated source with its reason. An unreadable\n * configuration must not hide the governance questions, and it must not read as a clean list either.\n *\n * RESIDUAL, stated rather than hidden: the question queue decides whether a governance fact is asked from the set of\n * DRAFTED documents, and `DossierCompanionService.listDraftedGovernedDocumentDefinitionRefs` reads an unreadable draft\n * set as \"nothing drafted\" (logged at debug). In that case the queue holds no governance question and this list reports\n * none, without an unevaluated source — the queue itself cannot tell the two apart. Closing it belongs to the queue.\n */\n\nimport { existsSync, readdirSync } from 'node:fs';\nimport { join, relative } from 'node:path';\n\nimport {\n dataServingProviderRefs,\n loadInfraEnvConfig,\n loadSaasConfig,\n resolveAppLayout,\n resolveProviderComplianceProfiles,\n WildoLocationType,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { CreationConsole_Question } from '@wildo-ai/platform-core-shared';\nimport { JurisdictionSlugListReadingKind, LEGAL_NOTICE_GENERATED_RELATIVE_PATH, parseJurisdictionSlugList, type GovernedDocumentRelease, describeCaughtError } from '@wildo-ai/saas-models';\nimport { DATA_RESIDENCY_TERRITORIES_PLAYBOOK_REF, DATA_RESIDENCY_TERRITORIES_QUESTION_REF, createCompanionExportsFamilyReader } from '@wildo-ai/application-creation-runtime';\nimport {\n ApplicationCreatorInputsSchema,\n ApplicationSpecificationFamily,\n deriveLaunchBlockers,\n readCreatorInputAnswersForPlaybook,\n LaunchBlockerSource,\n SUBJECT_DATA_RECIPIENTS_GENERATED_RELATIVE_PATH,\n type LaunchBlockerGovernanceQuestion,\n type LaunchBlockerInputs,\n type LaunchBlockerList,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport { GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH } from '@wildo-ai/saas-specifications/assurance';\n\nimport type { CompanionContext } from '../../context/companion-context';\nimport { loadSpecificationFamilyData } from '../../context/specification-family-data.companion';\n\n/** What the list reads, bound by the controller to the companion's own services. */\nexport interface LaunchBlockerPorts {\n /** The application root: where `wildo.saas.config.ts` and `backend-api/` live. */\n readonly saasRoot: string;\n /** `wildo.saas.config.ts`, loaded fresh. `null` when it could not be loaded. */\n readonly readApplicationConfig: () => Promise<WildoSaasConfig | null>;\n /** The question queue's `GOVERNANCE_FACT` items — the same read `wildo creation questions` serves. */\n readonly readGovernanceQuestions: () => Promise<readonly CreationConsole_Question[]>;\n /** The recorded releases (`documentReleaseSet`); empty when the application has no specifications package. */\n readonly readDocumentReleases: () => Promise<readonly GovernedDocumentRelease[]>;\n /** The landed families the brand name's standing is derived from, raw; each absent one reads `undefined`. */\n readonly readBrandNaming: () => Promise<NonNullable<LaunchBlockerInputs['brandNaming']>>;\n /** The landed compliance programme, raw; `program` reads `undefined` when none has landed. */\n readonly readAssuranceProgram: () => Promise<NonNullable<LaunchBlockerInputs['assuranceProgram']>>;\n /** The data-serving providers, their compliance profiles and the residency answer, for the configuration just read (#2294). */\n readonly readProviderDataResidency: (applicationConfig: WildoSaasConfig) => Promise<NonNullable<LaunchBlockerInputs['providerDataResidency']>>;\n /** What each authored environment declares about its agents' guardrails, its infra config loaded fresh (#2292). */\n readonly readEnvironmentAgentGuardrails: () => Promise<NonNullable<LaunchBlockerInputs['environmentAgentGuardrails']>>;\n}\n\n/**\n * The ports bound to this companion: the configuration re-loaded fresh (NOT `companionContext.saasConfig`, resolved\n * once at boot, which would keep a declared field on the list until a restart) and the releases from the\n * specifications exports. The question queue is the controller's, because it owns the creation plane's ports.\n */\nexport function companionLaunchBlockerPorts(\n companionContext: CompanionContext,\n readGovernanceQuestions: LaunchBlockerPorts['readGovernanceQuestions'],\n): LaunchBlockerPorts {\n return {\n saasRoot: companionContext.saasRoot,\n readApplicationConfig: () => loadSaasConfig(join(companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true }),\n readEnvironmentAgentGuardrails: () => readEnvironmentAgentGuardrails(companionContext.saasRoot),\n readGovernanceQuestions,\n readDocumentReleases: async () => {\n // No specifications package records no release — which IS the open sign-up decision, not an unread source.\n if (companionContext.resolvedSpecifications?.packageRoot === undefined) return [];\n const exports = (await loadSpecificationFamilyData(companionContext)) as {\n documentReleaseSet?: { releases?: readonly GovernedDocumentRelease[] };\n } | undefined;\n return exports?.documentReleaseSet?.releases ?? [];\n },\n readBrandNaming: async () => {\n // No specifications package lands no brand: nothing to stand against a screening, not an unread source.\n const exports = companionContext.resolvedSpecifications?.packageRoot === undefined\n ? undefined\n : (await loadSpecificationFamilyData(companionContext)) as unknown as Readonly<Record<string, unknown>> | undefined;\n const families = createCompanionExportsFamilyReader(exports);\n return {\n brand: families.readFamily(ApplicationSpecificationFamily.BRAND_BRIEF),\n screening: families.readFamily(ApplicationSpecificationFamily.BRAND_NAME_SCREENING),\n market: families.readFamily(ApplicationSpecificationFamily.MARKET_SNAPSHOT),\n creatorInputs: families.readFamily(ApplicationSpecificationFamily.CREATOR_INPUTS),\n };\n },\n readAssuranceProgram: async () => {\n // No specifications package lands no programme: nothing is obligated yet, not an unread source.\n if (companionContext.resolvedSpecifications?.packageRoot === undefined) return { program: undefined };\n const exports = (await loadSpecificationFamilyData(companionContext)) as unknown as Readonly<Record<string, unknown>> | undefined;\n return { program: createCompanionExportsFamilyReader(exports).readFamily(ApplicationSpecificationFamily.COMPLIANCE_PROGRAM) };\n },\n readProviderDataResidency: async (applicationConfig) => {\n const { profilesByProviderRef } = await resolveProviderComplianceProfiles({ saasRoot: companionContext.saasRoot, saasConfig: applicationConfig });\n const exports = companionContext.resolvedSpecifications?.packageRoot === undefined\n ? undefined\n : (await loadSpecificationFamilyData(companionContext)) as unknown as Readonly<Record<string, unknown>> | undefined;\n const rawCreatorInputs = createCompanionExportsFamilyReader(exports).readFamily(ApplicationSpecificationFamily.CREATOR_INPUTS);\n // A dossier that landed and does not parse is an unread source, never \"no residency answered\".\n const creatorInputs = rawCreatorInputs === undefined ? undefined : ApplicationCreatorInputsSchema.parse(rawCreatorInputs);\n const answer = readCreatorInputAnswersForPlaybook(creatorInputs, DATA_RESIDENCY_TERRITORIES_PLAYBOOK_REF)\n .find((candidate) => candidate.questionRef === DATA_RESIDENCY_TERRITORIES_QUESTION_REF)?.answer;\n const reading = answer === undefined ? undefined : parseJurisdictionSlugList(answer);\n return {\n ...(reading?.kind === JurisdictionSlugListReadingKind.SLUGS ? { answeredTerritories: reading.slugs } : {}),\n providerRefs: dataServingProviderRefs(applicationConfig.providers.scopes),\n profilesByProviderRef,\n };\n },\n };\n}\n\n/**\n * Each authored environment's `agentContentGuardrails` (#2292): every directory under the application's infrastructure\n * home whose infra config loads, as the CLI enumerates environments. A directory without a config is not an environment.\n * One that fails to load THROWS, so the source is reported unevaluated rather than read as \"nothing declared\".\n */\nasync function readEnvironmentAgentGuardrails(saasRoot: string): Promise<NonNullable<LaunchBlockerInputs['environmentAgentGuardrails']>> {\n const home = resolveAppLayout(saasRoot).authoredInfrastructureHome;\n const names = existsSync(home) ? readdirSync(home, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort() : [];\n const entries: NonNullable<LaunchBlockerInputs['environmentAgentGuardrails']>[number][] = [];\n for (const environment of names) {\n const loaded = await loadInfraEnvConfig(saasRoot, environment, { freshModuleCache: true });\n if (loaded === null) continue;\n entries.push({\n environment,\n local: loaded.config.locationType === WildoLocationType.LOCAL,\n ...(loaded.config.agentContentGuardrails ? { declaration: loaded.config.agentContentGuardrails } : {}),\n declaredIn: relative(saasRoot, loaded.path),\n });\n }\n return entries;\n}\n\n/** The launch list, as of now. */\nexport async function readLaunchBlockers(ports: LaunchBlockerPorts, now: Date = new Date()): Promise<LaunchBlockerList> {\n const unreadableReasons: Partial<Record<LaunchBlockerSource, string>> = {};\n\n let applicationConfig: WildoSaasConfig | undefined;\n try {\n const loaded = await ports.readApplicationConfig();\n if (loaded === null) unreadableReasons[LaunchBlockerSource.APPLICATION_CONFIG] = `${join(ports.saasRoot, 'wildo.saas.config.ts')} could not be loaded`;\n else applicationConfig = loaded;\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.APPLICATION_CONFIG] = describeCaughtError(error);\n }\n\n let governanceQuestions: LaunchBlockerGovernanceQuestion[] | undefined;\n try {\n governanceQuestions = (await ports.readGovernanceQuestions()).map((question) => ({\n questionId: question.questionId,\n definitionRef: question.definitionRef,\n prompt: question.fields.map((field) => field.question).join(' / '),\n }));\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.QUESTION_QUEUE] = describeCaughtError(error);\n }\n\n let documentReleases: readonly GovernedDocumentRelease[] | undefined;\n try {\n documentReleases = await ports.readDocumentReleases();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.DOCUMENT_RELEASES] = describeCaughtError(error);\n }\n\n let brandNaming: LaunchBlockerInputs['brandNaming'];\n try {\n brandNaming = await ports.readBrandNaming();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.BRAND_NAMING] = describeCaughtError(error);\n }\n\n let assuranceProgram: LaunchBlockerInputs['assuranceProgram'];\n try {\n assuranceProgram = await ports.readAssuranceProgram();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.ASSURANCE_PROGRAM] = describeCaughtError(error);\n }\n\n let environmentAgentGuardrails: LaunchBlockerInputs['environmentAgentGuardrails'];\n try {\n environmentAgentGuardrails = await ports.readEnvironmentAgentGuardrails();\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.ENVIRONMENT_CONFIGS] = describeCaughtError(error);\n }\n\n let providerDataResidency: LaunchBlockerInputs['providerDataResidency'];\n if (applicationConfig !== undefined) {\n try {\n providerDataResidency = await ports.readProviderDataResidency(applicationConfig);\n } catch (error) {\n unreadableReasons[LaunchBlockerSource.PROVIDER_DATA_RESIDENCY] = describeCaughtError(error);\n }\n }\n\n return deriveLaunchBlockers({\n computedAt: now.toISOString(),\n ...(applicationConfig\n ? {\n applicationConfig: {\n ...(applicationConfig.operatorComplianceIdentity ? { operatorComplianceIdentity: applicationConfig.operatorComplianceIdentity } : {}),\n ...(applicationConfig.dataRetention ? { dataRetention: applicationConfig.dataRetention } : {}),\n ...(applicationConfig.brandNameClearances ? { brandNameClearances: applicationConfig.brandNameClearances } : {}),\n ...(applicationConfig.providerComplianceChoices ? { providerComplianceChoices: applicationConfig.providerComplianceChoices } : {}),\n },\n }\n : {}),\n subjectDataRecipientsModulePresent: existsSync(join(ports.saasRoot, SUBJECT_DATA_RECIPIENTS_GENERATED_RELATIVE_PATH)),\n legalNoticeModulePresent: existsSync(join(ports.saasRoot, LEGAL_NOTICE_GENERATED_RELATIVE_PATH)),\n ...(governanceQuestions ? { governanceQuestions } : {}),\n ...(documentReleases ? { documentReleases } : {}),\n documentReleasesModulePresent: existsSync(join(ports.saasRoot, GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH)),\n ...(brandNaming ? { brandNaming } : {}),\n ...(assuranceProgram ? { assuranceProgram } : {}),\n ...(providerDataResidency ? { providerDataResidency } : {}),\n ...(environmentAgentGuardrails ? { environmentAgentGuardrails } : {}),\n unreadableReasons,\n });\n}\n"]}
|
|
@@ -109,6 +109,8 @@ export declare class CompanionIntrospectionService {
|
|
|
109
109
|
private readonly compileQueue;
|
|
110
110
|
/** Test seam only; production always retains Node's real child-process spawn. */
|
|
111
111
|
private spawnSubprocess;
|
|
112
|
+
/** Waits out a dependency install under the live companion (#3703). Replaced only by tests. */
|
|
113
|
+
private dependencyTreeGate;
|
|
112
114
|
/**
|
|
113
115
|
* Whether compiled state may be retained at all.
|
|
114
116
|
*
|
|
@@ -237,7 +239,19 @@ export declare class CompanionIntrospectionService {
|
|
|
237
239
|
shutdownWorkers(): void;
|
|
238
240
|
/** Live pooled workers. A diagnostic for tests and profiling runs. */
|
|
239
241
|
get liveWorkerCount(): number;
|
|
242
|
+
/**
|
|
243
|
+
* Derive, surviving a dependency install under the live companion (#3703).
|
|
244
|
+
*
|
|
245
|
+
* Every derivation's child resolves its packages from the application's `node_modules` when it starts, so a child
|
|
246
|
+
* started while an install re-creates that tree dies on its first bare import (`Cannot find package 'zod'`). Two
|
|
247
|
+
* decisions, both the gate's (see `introspection-dependency-tree.companion.ts`): nothing starts while a RECORDED
|
|
248
|
+
* install is in flight, and a derivation that failed on a declared package the resolver could not find is derived
|
|
249
|
+
* again once that package resolves, after every pooled worker started before the tree settled is retired, so the
|
|
250
|
+
* retry runs in a process that read the settled tree. Any other failure is returned as it was. The waits happen
|
|
251
|
+
* outside the concurrency queue, so a held derivation keeps no slot.
|
|
252
|
+
*/
|
|
240
253
|
private deriveThroughQueue;
|
|
254
|
+
private deriveOnceThroughQueue;
|
|
241
255
|
/**
|
|
242
256
|
* Derive through a worker bound to the observed source state (#3208), see {@link IntrospectionWorkerPool}.
|
|
243
257
|
*
|
package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-introspection.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/services/companion-introspection.companion.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,6CAA6C,EAAE,MAAM,+DAA+D,CAAC;AAC9H,OAAO,EACL,4CAA4C,EAE5C,KAAK,kCAAkC,EACxC,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"companion-introspection.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/services/companion-introspection.companion.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,6CAA6C,EAAE,MAAM,+DAA+D,CAAC;AAC9H,OAAO,EACL,4CAA4C,EAE5C,KAAK,kCAAkC,EACxC,MAAM,oDAAoD,CAAC;AAM5D,OAAO,KAAK,EAKV,6BAA6B,EAE7B,oCAAoC,EACpC,4BAA4B,EAE5B,iCAAiC,EAClC,MAAM,0CAA0C,CAAC;AA6ElD,qFAAqF;AACrF,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,uCAAuC,CAAC,KAAK,EAAE;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC,GAAG,OAAO,CAEV;AAmBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC,GAAG,OAAO,CAGV;AAYD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB,yMAO3B,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAwBxE;AAoCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;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,CAAC,yBAAyB;IAkBjC,OAAO,CAAC,kBAAkB;CAiB3B;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,IAAI,CAAC,oCAAoC,EAAE,aAAa,GAAG,aAAa,GAAG,iBAAiB,CAAC,GAAG,SAAS,MAAM,EAAE,CAM5K;AAWD;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAC9C,aAAa,EAAE;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,EAC1H,qBAAqB,EAAE,OAAO,GAC7B,MAAM,EAAE,CAWV"}
|
|
@@ -21,6 +21,7 @@ import { CompanionIntrospectionResultSchema } from '../../../companion-api/compa
|
|
|
21
21
|
import { CompanionIntrospectionBehaviorRegistryService } from './companion-introspection-behavior-registry.companion.service.js';
|
|
22
22
|
import { IntrospectionDerivationStateCompanionService, } from './introspection-derivation-state.companion.service.js';
|
|
23
23
|
import { IntrospectionWorkerPool } from './introspection-worker-pool.companion.js';
|
|
24
|
+
import { DependencyTreeSettleVerdict, IntrospectionDependencyTreeGate } from './introspection-dependency-tree.companion.js';
|
|
24
25
|
import { IntrospectionCompileQueue } from './introspection-compile-queue.companion.js';
|
|
25
26
|
import { attachIntrospectionReadSet, IntrospectionReadSetChecker } from './introspection-derivation-read-set.companion.js';
|
|
26
27
|
import { READ_TRACKING_ROOT_ENV } from '../subprocess/derivation-read-tracking.js';
|
|
@@ -77,6 +78,14 @@ const DEFAULT_TIMEOUT_MS = 120_000;
|
|
|
77
78
|
* a build wave it moves every few minutes.
|
|
78
79
|
*/
|
|
79
80
|
const POOLED_WORKER_IDLE_MS = 60_000;
|
|
81
|
+
/**
|
|
82
|
+
* How many times one derivation is derived again after the dependency tree moved under it (#3703).
|
|
83
|
+
*
|
|
84
|
+
* Each retry waits for the tree to settle first, so it costs nothing while the tree is moving. More than one is allowed
|
|
85
|
+
* because an install relinks packages one after another: the retry after `zod` came back can meet the next package
|
|
86
|
+
* still missing. A small bound, so a tree that keeps moving cannot hold a derivation for ever.
|
|
87
|
+
*/
|
|
88
|
+
const MAXIMUM_DEPENDENCY_TREE_RETRIES = 3;
|
|
80
89
|
/** A derivation that waited and ran for at least this long is logged with its timing (#3452). */
|
|
81
90
|
const INTROSPECTION_TIMING_LOG_THRESHOLD_MS = 1_000;
|
|
82
91
|
/**
|
|
@@ -295,6 +304,8 @@ let CompanionIntrospectionService = class CompanionIntrospectionService {
|
|
|
295
304
|
compileQueue;
|
|
296
305
|
/** Test seam only; production always retains Node's real child-process spawn. */
|
|
297
306
|
spawnSubprocess = spawn;
|
|
307
|
+
/** Waits out a dependency install under the live companion (#3703). Replaced only by tests. */
|
|
308
|
+
dependencyTreeGate;
|
|
298
309
|
/**
|
|
299
310
|
* Whether compiled state may be retained at all.
|
|
300
311
|
*
|
|
@@ -320,6 +331,10 @@ let CompanionIntrospectionService = class CompanionIntrospectionService {
|
|
|
320
331
|
|| DEFAULT_TIMEOUT_MS);
|
|
321
332
|
this.derivationCacheEnabled = (process.env.COMPANION_INTROSPECTION_CACHE ?? '').trim().toLowerCase()
|
|
322
333
|
!== DISABLE_DERIVATION_CACHE_VALUE;
|
|
334
|
+
this.dependencyTreeGate = new IntrospectionDependencyTreeGate({
|
|
335
|
+
appRoot: this.companionContext.saasRoot,
|
|
336
|
+
log: (message, context) => this.logger.warn(message, context),
|
|
337
|
+
});
|
|
323
338
|
}
|
|
324
339
|
/**
|
|
325
340
|
* Answer an introspection request, re-deriving only when the application's source has moved.
|
|
@@ -453,7 +468,40 @@ let CompanionIntrospectionService = class CompanionIntrospectionService {
|
|
|
453
468
|
count += pool.liveWorkerCount;
|
|
454
469
|
return count;
|
|
455
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Derive, surviving a dependency install under the live companion (#3703).
|
|
473
|
+
*
|
|
474
|
+
* Every derivation's child resolves its packages from the application's `node_modules` when it starts, so a child
|
|
475
|
+
* started while an install re-creates that tree dies on its first bare import (`Cannot find package 'zod'`). Two
|
|
476
|
+
* decisions, both the gate's (see `introspection-dependency-tree.companion.ts`): nothing starts while a RECORDED
|
|
477
|
+
* install is in flight, and a derivation that failed on a declared package the resolver could not find is derived
|
|
478
|
+
* again once that package resolves, after every pooled worker started before the tree settled is retired, so the
|
|
479
|
+
* retry runs in a process that read the settled tree. Any other failure is returned as it was. The waits happen
|
|
480
|
+
* outside the concurrency queue, so a held derivation keeps no slot.
|
|
481
|
+
*/
|
|
456
482
|
async deriveThroughQueue(resolvedTarget, affinity) {
|
|
483
|
+
await this.dependencyTreeGate.holdWhileInstallInFlight();
|
|
484
|
+
let result = await this.deriveOnceThroughQueue(resolvedTarget, affinity);
|
|
485
|
+
for (let retry = 1; !result.success && retry <= MAXIMUM_DEPENDENCY_TREE_RETRIES; retry++) {
|
|
486
|
+
const failureText = [result.error.message, result.stderr ?? ''].join('\n');
|
|
487
|
+
const settle = await this.dependencyTreeGate.settleAfterFailure(failureText);
|
|
488
|
+
if (settle.verdict !== DependencyTreeSettleVerdict.SETTLED)
|
|
489
|
+
break;
|
|
490
|
+
for (const pool of this.workerPools.values())
|
|
491
|
+
pool.retireWorkersStartedBefore(settle.settledAtMs ?? Date.now(), 'started before the dependency tree moved');
|
|
492
|
+
this.logger.warn('Introspection derivation failed on a dependency tree in motion; deriving again now it has settled', {
|
|
493
|
+
behavior: resolvedTarget.behavior,
|
|
494
|
+
serviceKey: resolvedTarget.serviceKey,
|
|
495
|
+
packageName: settle.unresolved?.packageName,
|
|
496
|
+
importerPath: settle.unresolved?.importerPath,
|
|
497
|
+
waitedMs: settle.waitedMs,
|
|
498
|
+
retry,
|
|
499
|
+
});
|
|
500
|
+
result = await this.deriveOnceThroughQueue(resolvedTarget, affinity);
|
|
501
|
+
}
|
|
502
|
+
return result;
|
|
503
|
+
}
|
|
504
|
+
async deriveOnceThroughQueue(resolvedTarget, affinity) {
|
|
457
505
|
const queuedAt = Date.now();
|
|
458
506
|
let background = affinity?.background === true;
|
|
459
507
|
return this.compileQueue.run(async () => {
|