@wildo-ai/dev-companion 1.1.13 → 1.1.15
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 +89 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +114 -9
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +46 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +39 -2
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
- package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts +6 -0
- package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.js.map +1 -1
- package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts +19 -5
- package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/verification-tool-availability.models.js +17 -5
- package/dist/esm/claude-cli/models/verification-tool-availability.models.js.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +16 -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 +53 -6
- 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 +145 -6
- 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 +474 -47
- 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/claude-cli/services/research-evidence-store.companion.d.ts +14 -0
- 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 +35 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts +36 -0
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js +134 -0
- package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js.map +1 -0
- 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 +7 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +26 -12
- 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 +12 -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/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/translation-placement.companion.service.d.ts +3 -2
- package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/translation-placement.companion.service.js.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 +24 -14
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +42 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/workspace-element-index.companion.js +42 -0
- package/dist/esm/core/introspection/workspace-element-index.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/dev-compile-quiet.companion.d.ts +53 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js +119 -2
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
- 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 +16 -3
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +2 -2
- 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 +6 -6
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.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/email/services/email-template.companion.service.d.ts +5 -0
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +44 -11
- package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts +26 -2
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.js +41 -2
- package/dist/esm/email/utils/email-template-fs-discovery.utils.js.map +1 -1
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts +19 -0
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts.map +1 -0
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js +171 -0
- package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js.map +1 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.d.ts +75 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.d.ts.map +1 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.js +162 -0
- package/dist/esm/email/utils/module-email-root.companion.utils.js.map +1 -0
- 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_AGENT_CONFIG.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js.map +1 -1
- 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/workbenchAspects.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.js +4 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.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 +35 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +12 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +536 -531
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +536 -531
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +170 -170
- package/dist/esm/i18n/system_enums/application-creation.fr.js +170 -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 -2
- 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 -2
- 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/email-template-labelling-units.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +7 -3
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.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/creation-journey-timeline.models.d.ts +9 -0
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +18 -2
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +153 -22
- 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 +970 -208
- 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 +115 -13
- 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 +295 -56
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.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 +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/application-build-task-coding-policy.companion.service.js +48 -26
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts +12 -0
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js +30 -1
- package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.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.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +12 -1
- 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 +8 -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 +119 -25
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts +55 -1
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js +157 -10
- package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js.map +1 -1
- package/dist/esm/module-layout/module-layout-convention.companion.d.ts +158 -0
- package/dist/esm/module-layout/module-layout-convention.companion.d.ts.map +1 -0
- package/dist/esm/module-layout/module-layout-convention.companion.js +272 -0
- package/dist/esm/module-layout/module-layout-convention.companion.js.map +1 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.d.ts +42 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.d.ts.map +1 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.js +290 -0
- package/dist/esm/module-layout/module-layout-inspection.companion.js.map +1 -0
- package/dist/esm/module-layout/module-source-files.companion.d.ts +3 -0
- package/dist/esm/module-layout/module-source-files.companion.d.ts.map +1 -0
- package/dist/esm/module-layout/module-source-files.companion.js +45 -0
- package/dist/esm/module-layout/module-source-files.companion.js.map +1 -0
- package/package.json +18 -18
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ModuleSearchHit, type RegistryConfig } from '@wildo-ai/platform-config-lib';
|
|
2
2
|
import { RegistryServerClient } from '@wildo-ai/wildo-module-client';
|
|
3
|
+
import type { ProviderSpecificationConfig } from '@wildo-ai/saas-specifications';
|
|
4
|
+
import { type IntegrationPlanKnownProviders } from '@wildo-ai/saas-specifications/application-creation';
|
|
3
5
|
/** Where the offered providers were read from. */
|
|
4
6
|
export declare enum ProviderRegistryListingSource {
|
|
5
7
|
/** The framework checkout's `providers-registry/`, in framework development. */
|
|
@@ -34,6 +36,58 @@ export declare function listRegistryProviderModules(input: {
|
|
|
34
36
|
* the tree rather than from a list. Keyed by the provider's REF, not the module id, which nothing requires to match it.
|
|
35
37
|
*/
|
|
36
38
|
export declare function isRegistryProviderInstalled(applicationRoot: string, providerRef: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* One provider the ENGINE ships (#3992): bound by declaring it, never installed. Listed beside the registry's offers so a
|
|
41
|
+
* planner sees everything the framework already has before it concludes a need is unprovided.
|
|
42
|
+
*/
|
|
43
|
+
export interface EngineProviderOffer {
|
|
44
|
+
readonly ref: string;
|
|
45
|
+
/**
|
|
46
|
+
* The facets it ships a module for (`backend`, `frontend-app`, `frontend-website`, `frontend-techdoc`): which binding
|
|
47
|
+
* scopes it can serve. Shown so a planner does not bind a browser-only provider (the Dropbox Chooser) on the backend.
|
|
48
|
+
*/
|
|
49
|
+
readonly facets: readonly string[];
|
|
50
|
+
readonly engineCapabilities: readonly string[];
|
|
51
|
+
/** The secrets an operator supplies before it serves; empty for a credential-free provider. */
|
|
52
|
+
readonly requiredSecretEnvVars: readonly string[];
|
|
53
|
+
readonly purpose: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The engine's own providers, from the registered provider specifications whose origin is the engine.
|
|
57
|
+
*
|
|
58
|
+
* The population is every MAIN backend module and every browser module, which the CLI's reconciliation test (#328,
|
|
59
|
+
* facet-aware since #3995) holds to one specification each; the frontend-only `dropbox` picker is in it since #3995 item 5.
|
|
60
|
+
* One engine-shipped ref is deliberately not: `immudb`, a non-MAIN audit sink the platform chooses and no planner binds
|
|
61
|
+
* (it is moving to the registry).
|
|
62
|
+
*/
|
|
63
|
+
export declare function engineProviderOffers(specifications: readonly ProviderSpecificationConfig[]): EngineProviderOffer[];
|
|
37
64
|
/** The section, as brief lines. `isInstalled` answers for a provider REF. */
|
|
38
|
-
export declare function renderProviderRegistryBrief(listing: ProviderRegistryListing, isInstalled: (providerRef: string) => boolean): string;
|
|
65
|
+
export declare function renderProviderRegistryBrief(listing: ProviderRegistryListing, isInstalled: (providerRef: string) => boolean, engineProviders?: readonly EngineProviderOffer[]): string;
|
|
66
|
+
/**
|
|
67
|
+
* The providers an application's integration plan may reference (#3995), split as the check needs it:
|
|
68
|
+
*
|
|
69
|
+
* - `existing`, what the FRAMEWORK has: every registered provider specification (every MAIN engine module, backend or
|
|
70
|
+
* browser, #3995 item 5), every registry module, and every discovered contribution the engine ships (it loads from
|
|
71
|
+
* `@wildo-ai/external-connectors-*`). The last brings the engine provider that has no specification, the immudb sink;
|
|
72
|
+
* - `bindable`, also what the APPLICATION has: every discovered contribution (an installed or authored package), every
|
|
73
|
+
* `providers/<ref>/` on disk, and every ref its five typed scopes declare (`providers.scopes.backend`, `.companion`,
|
|
74
|
+
* `.frontendServices.<k>`, `.minions.<k>`, `.workers.<k>`).
|
|
75
|
+
*
|
|
76
|
+
* `facetsByProvider` carries the facets of every engine provider whose specification is its ref's only source, for the
|
|
77
|
+
* binding-scope check.
|
|
78
|
+
*
|
|
79
|
+
* `undefined` when any source could not be read (the registry, discovery) or no specification is registered: an unknown
|
|
80
|
+
* provider is then not a wrong one, and a false refusal would cost every attempt and the build behind the plan.
|
|
81
|
+
*/
|
|
82
|
+
export declare function collectKnownProviderRefs(input: {
|
|
83
|
+
readonly listing: ProviderRegistryListing;
|
|
84
|
+
readonly applicationRoot: string;
|
|
85
|
+
readonly specifications: readonly ProviderSpecificationConfig[];
|
|
86
|
+
/** Discovery's contributions, or `undefined` when it could not be read. */
|
|
87
|
+
readonly discoveredContributions: ReadonlyArray<{
|
|
88
|
+
readonly ref: string;
|
|
89
|
+
readonly runtimeImportPath: string;
|
|
90
|
+
}> | undefined;
|
|
91
|
+
readonly saasConfig: unknown;
|
|
92
|
+
}): IntegrationPlanKnownProviders | undefined;
|
|
39
93
|
//# sourceMappingURL=provider-registry-brief.companion.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-registry-brief.companion.utils.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/provider-registry-brief.companion.utils.ts"],"names":[],"mappings":"AAqBA,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"provider-registry-brief.companion.utils.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/provider-registry-brief.companion.utils.ts"],"names":[],"mappings":"AAqBA,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAgC,KAAK,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAKtI,kDAAkD;AAClD,oBAAY,6BAA6B;IACvC,gFAAgF;IAChF,kBAAkB,uBAAuB;IACzC,oDAAoD;IACpD,eAAe,oBAAoB;CACpC;AAED,sEAAsE;AACtE,MAAM,MAAM,uBAAuB,GAC/B;IAAE,QAAQ,CAAC,MAAM,EAAE,6BAA6B,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;I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,GAAE,SAAS,mBAAmB,EAAO,GACnD,MAAM,CAgDR;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAChE,2EAA2E;IAC3E,QAAQ,CAAC,uBAAuB,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC1H,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B,GAAG,6BAA6B,GAAG,SAAS,CAiC5C"}
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
* because a plan that binds no provider is still a plan (`application-creation-directive.md`), and a refusal here would
|
|
18
18
|
* stop application creation over an unreachable server.
|
|
19
19
|
*/
|
|
20
|
-
import { existsSync } from 'node:fs';
|
|
20
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
21
21
|
import { join } from 'node:path';
|
|
22
22
|
import { listLocalCheckoutModules, ModuleKind, moduleSearchHitFacts, resolveRegistryUrl, WILDO_REGISTRY_DOMAIN, } from '@wildo-ai/platform-config-lib';
|
|
23
23
|
import { RegistryServerClient } from '@wildo-ai/wildo-module-client';
|
|
24
|
-
import { describeCaughtError } from '@wildo-ai/saas-models';
|
|
24
|
+
import { ProviderOriginKind, describeCaughtError } from '@wildo-ai/saas-models';
|
|
25
|
+
import { PROVIDER_BINDING_SCOPE_FACET } from '@wildo-ai/saas-specifications/application-creation';
|
|
25
26
|
/** How long the brief waits for a registry server before saying it could not be read. */
|
|
26
27
|
const REGISTRY_SEARCH_TIMEOUT_MS = 10_000;
|
|
27
28
|
/** Where the offered providers were read from. */
|
|
@@ -74,20 +75,82 @@ export async function listRegistryProviderModules(input) {
|
|
|
74
75
|
export function isRegistryProviderInstalled(applicationRoot, providerRef) {
|
|
75
76
|
return existsSync(join(applicationRoot, 'providers', providerRef));
|
|
76
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* The engine's own providers, from the registered provider specifications whose origin is the engine.
|
|
80
|
+
*
|
|
81
|
+
* The population is every MAIN backend module and every browser module, which the CLI's reconciliation test (#328,
|
|
82
|
+
* facet-aware since #3995) holds to one specification each; the frontend-only `dropbox` picker is in it since #3995 item 5.
|
|
83
|
+
* One engine-shipped ref is deliberately not: `immudb`, a non-MAIN audit sink the platform chooses and no planner binds
|
|
84
|
+
* (it is moving to the registry).
|
|
85
|
+
*/
|
|
86
|
+
export function engineProviderOffers(specifications) {
|
|
87
|
+
return specifications
|
|
88
|
+
.filter((specification) => specification.origin.kind === ProviderOriginKind.ENGINE)
|
|
89
|
+
.map((specification) => ({
|
|
90
|
+
ref: specification.ref,
|
|
91
|
+
facets: [...specification.facets],
|
|
92
|
+
engineCapabilities: [...specification.engineCapabilities],
|
|
93
|
+
requiredSecretEnvVars: specification.secretsContract.filter((secret) => secret.required).map((secret) => secret.envVarName),
|
|
94
|
+
purpose: specification.purpose,
|
|
95
|
+
}))
|
|
96
|
+
.sort((left, right) => left.ref.localeCompare(right.ref));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Which facet each binding scope loads, in the brief's words, from the one map the integration plan's scope check reads
|
|
100
|
+
* (`PROVIDER_BINDING_SCOPE_FACET`): "`backend` on BACKEND or COMPANION, `frontend-app` on FRONTEND_APP, …".
|
|
101
|
+
*/
|
|
102
|
+
function describeScopeFacets() {
|
|
103
|
+
const scopesByFacet = new Map();
|
|
104
|
+
for (const [scope, facet] of Object.entries(PROVIDER_BINDING_SCOPE_FACET))
|
|
105
|
+
scopesByFacet.set(facet, [...(scopesByFacet.get(facet) ?? []), scope]);
|
|
106
|
+
return [...scopesByFacet.entries()].map(([facet, scopes]) => `\`${facet}\` on ${scopes.join(' or ')}`).join(', ');
|
|
107
|
+
}
|
|
108
|
+
/** The engine half of the section: what the framework ships, bound by declaration alone. */
|
|
109
|
+
function renderEngineProviderOffers(engineProviders) {
|
|
110
|
+
return [
|
|
111
|
+
'## Engine providers (shipped with the framework: declare one, nothing to install)',
|
|
112
|
+
`Each binds only on a scope its facets serve: ${describeScopeFacets()}.`,
|
|
113
|
+
...(engineProviders.length > 0
|
|
114
|
+
? engineProviders.map((offer) => {
|
|
115
|
+
const facets = ` · ${offer.facets.map((facet) => `\`${facet}\``).join(', ')}`;
|
|
116
|
+
const fills = offer.engineCapabilities.length > 0 ? ` · fills ${offer.engineCapabilities.map((capability) => `\`${capability}\``).join(', ')}` : '';
|
|
117
|
+
const secrets = offer.requiredSecretEnvVars.length > 0 ? ` · needs ${offer.requiredSecretEnvVars.map((name) => `\`${name}\``).join(', ')}` : ' · no credential';
|
|
118
|
+
return `- \`${offer.ref}\`${facets}${fills}${secrets}\n ${offer.purpose}`;
|
|
119
|
+
})
|
|
120
|
+
: ['(no engine provider specification is registered)']),
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The rule a planner applies before anything new is authored (#3992, Paul 2026-11-16): app creation USES the providers the
|
|
125
|
+
* framework already has; a new provider is authored only for a need neither list fills, and the reason is recorded.
|
|
126
|
+
*/
|
|
127
|
+
const AUTHOR_ONLY_WHAT_NOTHING_FILLS = [
|
|
128
|
+
'## A need neither list fills',
|
|
129
|
+
'Authoring a NEW provider is the last resort, not a third option beside these. Do it only when no engine provider and no',
|
|
130
|
+
'registry module fills the need: a vendor or behaviour none of them offers, or a business obligation that names a',
|
|
131
|
+
'vendor. Then record it in the plan\'s `unprovidedNeeds` (the ref the new provider will have, the need, the requirements it',
|
|
132
|
+
'serves, and why nothing above fills it), never only in prose, AND bind that ref on the scope that needs it, or, when one of',
|
|
133
|
+
'the plan\'s workers or minions alone uses it, name that surface in the entry\'s `wiredByRef`: only a recorded need that a',
|
|
134
|
+
'binding or a named worker or minion wires becomes a task that writes the new provider.',
|
|
135
|
+
];
|
|
77
136
|
/** The section, as brief lines. `isInstalled` answers for a provider REF. */
|
|
78
|
-
export function renderProviderRegistryBrief(listing, isInstalled) {
|
|
79
|
-
const heading = '#
|
|
137
|
+
export function renderProviderRegistryBrief(listing, isInstalled, engineProviders = []) {
|
|
138
|
+
const heading = '# Providers the framework already has';
|
|
80
139
|
const where = listing.source === ProviderRegistryListingSource.FRAMEWORK_CHECKOUT
|
|
81
|
-
? `
|
|
82
|
-
: `
|
|
140
|
+
? `Registry modules read from the framework checkout (${listing.location}), which is what \`wildo registry add wildo/…\` installs from here.`
|
|
141
|
+
: `Registry modules read from the module registry at ${listing.location}, domain \`${WILDO_REGISTRY_DOMAIN}\`.`;
|
|
83
142
|
if ('unreadableReason' in listing) {
|
|
84
143
|
return [
|
|
85
144
|
heading,
|
|
145
|
+
...renderEngineProviderOffers(engineProviders),
|
|
146
|
+
'',
|
|
147
|
+
'## Provider modules the registry offers',
|
|
86
148
|
where,
|
|
87
149
|
`UNREADABLE: ${listing.unreadableReason}`,
|
|
88
150
|
'So this brief does not know which providers could be installed. Do not bind a third-party provider this application has not',
|
|
89
151
|
'installed on the strength of recollection: bind what the workspace already carries, and say in the plan\'s rationale that the',
|
|
90
|
-
'registry could not be read, so the missing provider is decided later.',
|
|
152
|
+
'registry could not be read, so the missing provider is decided later. Do not record such a need as unprovided either: the',
|
|
153
|
+
'registry may well fill it.',
|
|
91
154
|
].join('\n');
|
|
92
155
|
}
|
|
93
156
|
const offers = listing.hits.filter((hit) => hit.provider !== undefined);
|
|
@@ -102,17 +165,101 @@ export function renderProviderRegistryBrief(listing, isInstalled) {
|
|
|
102
165
|
});
|
|
103
166
|
return [
|
|
104
167
|
heading,
|
|
168
|
+
...renderEngineProviderOffers(engineProviders),
|
|
169
|
+
'',
|
|
170
|
+
'## Provider modules the registry offers',
|
|
105
171
|
where,
|
|
106
|
-
'A third-party provider reaches this application ONLY by being installed from the registry.
|
|
107
|
-
'the framework\'s own engine providers (billing, email, storage, identity and the like) are not listed here.',
|
|
172
|
+
'A third-party provider the engine does not ship reaches this application ONLY by being installed from the registry.',
|
|
108
173
|
'- To bind one, write a provider binding whose `providerRef` is its "bind as" ref (and `augments` where shown), and whose',
|
|
109
174
|
' `rationale` names the need it serves and, when it is not installed, the install command shown. The binding\'s build',
|
|
110
175
|
' task installs it first. An augmentation is also opted in, under `providers.augmentations.<augments>`, and that opt-in',
|
|
111
176
|
' is what shows its task landed.',
|
|
112
177
|
'- Maturity: `adopted` has not yet met the real vendor; `proven` has, with the proof on record. Prefer `proven` when two fit.',
|
|
113
|
-
'- Never bind a third-party vendor that neither
|
|
178
|
+
'- Never bind a third-party vendor that neither list nor the workspace carries, unless an `unprovidedNeeds` entry names it',
|
|
179
|
+
' (below): otherwise no module would provide it.',
|
|
114
180
|
'',
|
|
115
181
|
...(rows.length > 0 ? rows : ['(the registry offers no provider module)']),
|
|
182
|
+
'',
|
|
183
|
+
...AUTHOR_ONLY_WHAT_NOTHING_FILLS,
|
|
116
184
|
].join('\n');
|
|
117
185
|
}
|
|
186
|
+
/** The runtime import path every engine-shipped provider loads from: what tells it from an installed or authored one. */
|
|
187
|
+
const ENGINE_PROVIDER_IMPORT_PREFIX = '@wildo-ai/external-connectors-';
|
|
188
|
+
/**
|
|
189
|
+
* The providers an application's integration plan may reference (#3995), split as the check needs it:
|
|
190
|
+
*
|
|
191
|
+
* - `existing`, what the FRAMEWORK has: every registered provider specification (every MAIN engine module, backend or
|
|
192
|
+
* browser, #3995 item 5), every registry module, and every discovered contribution the engine ships (it loads from
|
|
193
|
+
* `@wildo-ai/external-connectors-*`). The last brings the engine provider that has no specification, the immudb sink;
|
|
194
|
+
* - `bindable`, also what the APPLICATION has: every discovered contribution (an installed or authored package), every
|
|
195
|
+
* `providers/<ref>/` on disk, and every ref its five typed scopes declare (`providers.scopes.backend`, `.companion`,
|
|
196
|
+
* `.frontendServices.<k>`, `.minions.<k>`, `.workers.<k>`).
|
|
197
|
+
*
|
|
198
|
+
* `facetsByProvider` carries the facets of every engine provider whose specification is its ref's only source, for the
|
|
199
|
+
* binding-scope check.
|
|
200
|
+
*
|
|
201
|
+
* `undefined` when any source could not be read (the registry, discovery) or no specification is registered: an unknown
|
|
202
|
+
* provider is then not a wrong one, and a false refusal would cost every attempt and the build behind the plan.
|
|
203
|
+
*/
|
|
204
|
+
export function collectKnownProviderRefs(input) {
|
|
205
|
+
if ('unreadableReason' in input.listing || input.discoveredContributions === undefined || input.specifications.length === 0)
|
|
206
|
+
return undefined;
|
|
207
|
+
const existing = new Set(input.specifications.map((specification) => specification.ref));
|
|
208
|
+
for (const hit of input.listing.hits)
|
|
209
|
+
if (hit.provider !== undefined)
|
|
210
|
+
existing.add(hit.provider.ref);
|
|
211
|
+
for (const contribution of input.discoveredContributions) {
|
|
212
|
+
if (contribution.runtimeImportPath.startsWith(ENGINE_PROVIDER_IMPORT_PREFIX))
|
|
213
|
+
existing.add(contribution.ref);
|
|
214
|
+
}
|
|
215
|
+
const bindable = new Set(existing);
|
|
216
|
+
for (const contribution of input.discoveredContributions)
|
|
217
|
+
bindable.add(contribution.ref);
|
|
218
|
+
const installedRoot = join(input.applicationRoot, 'providers');
|
|
219
|
+
if (existsSync(installedRoot)) {
|
|
220
|
+
for (const entry of readdirSync(installedRoot, { withFileTypes: true }))
|
|
221
|
+
if (entry.isDirectory())
|
|
222
|
+
bindable.add(entry.name);
|
|
223
|
+
}
|
|
224
|
+
for (const ref of declaredScopeProviderRefs(input.saasConfig))
|
|
225
|
+
bindable.add(ref);
|
|
226
|
+
/*
|
|
227
|
+
* The facets each provider ships (#3995), from the SAME specifications the brief shows them from, and only where the
|
|
228
|
+
* specification is the ref's whole story. A registry module, a package under `providers/<ref>/`, or a contribution not
|
|
229
|
+
* shipped by the engine may carry the same ref with facets of its own (a backend Dropbox module beside the engine's
|
|
230
|
+
* browser-only Chooser), and those facets are not known here, so such a ref is left out and its scope is not checked.
|
|
231
|
+
*/
|
|
232
|
+
const otherSources = new Set();
|
|
233
|
+
for (const hit of input.listing.hits)
|
|
234
|
+
if (hit.provider !== undefined)
|
|
235
|
+
otherSources.add(hit.provider.ref);
|
|
236
|
+
for (const contribution of input.discoveredContributions) {
|
|
237
|
+
if (!contribution.runtimeImportPath.startsWith(ENGINE_PROVIDER_IMPORT_PREFIX))
|
|
238
|
+
otherSources.add(contribution.ref);
|
|
239
|
+
}
|
|
240
|
+
if (existsSync(installedRoot)) {
|
|
241
|
+
for (const entry of readdirSync(installedRoot, { withFileTypes: true }))
|
|
242
|
+
if (entry.isDirectory())
|
|
243
|
+
otherSources.add(entry.name);
|
|
244
|
+
}
|
|
245
|
+
const facetsByProvider = new Map();
|
|
246
|
+
for (const specification of input.specifications) {
|
|
247
|
+
if (!otherSources.has(specification.ref))
|
|
248
|
+
facetsByProvider.set(specification.ref, new Set(specification.facets));
|
|
249
|
+
}
|
|
250
|
+
return { existing, bindable, facetsByProvider };
|
|
251
|
+
}
|
|
252
|
+
/** Every provider ref the configuration's five typed scopes declare. */
|
|
253
|
+
function declaredScopeProviderRefs(saasConfig) {
|
|
254
|
+
const record = (value) => (value !== null && typeof value === 'object' && !Array.isArray(value) ? value : {});
|
|
255
|
+
const scopes = record(record(record(saasConfig).providers).scopes);
|
|
256
|
+
const scopeObjects = [
|
|
257
|
+
record(scopes.backend),
|
|
258
|
+
record(scopes.companion),
|
|
259
|
+
...Object.values(record(scopes.frontendServices)).map(record),
|
|
260
|
+
...Object.values(record(scopes.minions)).map(record),
|
|
261
|
+
...Object.values(record(scopes.workers)).map(record),
|
|
262
|
+
];
|
|
263
|
+
return scopeObjects.flatMap((scope) => Object.keys(record(scope.providers)));
|
|
264
|
+
}
|
|
118
265
|
//# sourceMappingURL=provider-registry-brief.companion.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-registry-brief.companion.utils.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/provider-registry-brief.compan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,CAAC,QAAQ,0CAA0C;YACjK,CAAC,CAAC,aAAa,QAAQ,CAAC,GAAG,IAAI,CAAC;QAClC,MAAM,KAAK,GAAG,QAAQ,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1J,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,wCAAwC,qBAAqB,IAAI,GAAG,CAAC,QAAQ,IAAI,CAAC;QAC1I,OAAO,OAAO,qBAAqB,IAAI,GAAG,CAAC,QAAQ,MAAM,GAAG,CAAC,aAAa,MAAM,IAAI,MAAM,QAAQ,CAAC,QAAQ,GAAG,KAAK,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACrL,CAAC,CAAC,CAAC;IACH,OAAO;QACL,OAAO;QACP,KAAK;QACL,yHAAyH;QACzH,6GAA6G;QAC7G,0HAA0H;QAC1H,uHAAuH;QACvH,yHAAyH;QACzH,kCAAkC;QAClC,8HAA8H;QAC9H,iHAAiH;QACjH,EAAE;QACF,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC;KAC3E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["/**\n * The `provider_registry` brief section (#2025, epic #2012): the provider modules the registry offers, for a playbook that\n * decides which providers an application binds.\n *\n * Since the generated catalogue was archived (#2019), a third-party vendor reaches an application only by being\n * installed from the module registry. A planner that reads only the workspace therefore sees the providers already\n * installed and none it could add. This section is the registry's answer, read from the SAME source `wildo registry\n * search` reads, through the same shared functions, so the brief and the command cannot disagree:\n *\n * - inside a framework checkout, the checkout's own `providers-registry/` (`listLocalCheckoutModules`, #2015);\n * - anywhere else, the application's registry (`resolveRegistryUrl` over `moduleRegistries`, then a search).\n *\n * Only the `wildo` domain is read: it is where Wildo publishes its providers. An organization's private domain holds\n * what that organization authored, which a planner cannot know to ask for.\n *\n * BEST-EFFORT, never a gate: a registry that cannot be read renders a section that says so and why. The run goes on,\n * because a plan that binds no provider is still a plan (`application-creation-directive.md`), and a refusal here would\n * stop application creation over an unreachable server.\n */\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport {\n listLocalCheckoutModules,\n ModuleKind,\n moduleSearchHitFacts,\n resolveRegistryUrl,\n WILDO_REGISTRY_DOMAIN,\n type ModuleSearchHit,\n type RegistryConfig,\n} from '@wildo-ai/platform-config-lib';\nimport { RegistryServerClient } from '@wildo-ai/wildo-module-client';\nimport { describeCaughtError } from '@wildo-ai/saas-models';\n\n/** How long the brief waits for a registry server before saying it could not be read. */\nconst REGISTRY_SEARCH_TIMEOUT_MS = 10_000;\n\n/** Where the offered providers were read from. */\nexport enum ProviderRegistryListingSource {\n /** The framework checkout's `providers-registry/`, in framework development. */\n FRAMEWORK_CHECKOUT = 'framework-checkout',\n /** The application's module registry, over HTTP. */\n REGISTRY_SERVER = 'registry-server',\n}\n\n/** The registry's provider modules, or why they could not be read. */\nexport type ProviderRegistryListing =\n | { readonly source: ProviderRegistryListingSource; readonly location: string; readonly hits: readonly ModuleSearchHit[] }\n | { readonly source: ProviderRegistryListingSource; readonly location: string; readonly unreadableReason: string };\n\n/*\n * The registry lane searches anonymously: it reads the PUBLIC modules of the `wildo` domain, which is where Wildo\n * publishes its providers. A registry that requires authentication for that domain renders as unreadable here even\n * where an operator's own `wildo registry search` (which sends a stored key) succeeds (#2025 review F7).\n */\n\n/** The registry search, injectable so a test drives the server lane without a server. */\nexport type ProviderRegistrySearch = typeof RegistryServerClient.search;\n\n/**\n * Every provider module the registry offers. The checkout lane when the companion runs inside a framework checkout\n * (the same rule `wildo registry search` applies for the `wildo` domain), the registry lane otherwise.\n */\nexport async function listRegistryProviderModules(input: {\n readonly frameworkRoot: string | null;\n readonly moduleRegistries?: RegistryConfig;\n readonly search?: ProviderRegistrySearch;\n}): Promise<ProviderRegistryListing> {\n if (input.frameworkRoot !== null) {\n const location = join(input.frameworkRoot, 'providers-registry');\n try {\n const listings = await listLocalCheckoutModules(input.frameworkRoot, '');\n const hits = listings\n .filter((listing) => (listing.manifest.kind ?? ModuleKind.FEATURE) === ModuleKind.PROVIDER)\n .map((listing) => ({ moduleId: listing.moduleId, latestVersion: listing.version, description: listing.manifest.description, ...moduleSearchHitFacts(listing.manifest) }));\n return { source: ProviderRegistryListingSource.FRAMEWORK_CHECKOUT, location, hits };\n } catch (error) {\n return { source: ProviderRegistryListingSource.FRAMEWORK_CHECKOUT, location, unreadableReason: describeCaughtError(error) };\n }\n }\n let url: string;\n try {\n url = resolveRegistryUrl({ moduleRegistries: input.moduleRegistries }).url;\n } catch (error) {\n return { source: ProviderRegistryListingSource.REGISTRY_SERVER, location: '(unresolved)', unreadableReason: describeCaughtError(error) };\n }\n try {\n const search = input.search ?? RegistryServerClient.search.bind(RegistryServerClient);\n const hits = await search(\n { baseUrl: url, timeoutMs: REGISTRY_SEARCH_TIMEOUT_MS },\n { domain: WILDO_REGISTRY_DOMAIN, query: '', filter: { kind: ModuleKind.PROVIDER } },\n );\n return { source: ProviderRegistryListingSource.REGISTRY_SERVER, location: url, hits };\n } catch (error) {\n return { source: ProviderRegistryListingSource.REGISTRY_SERVER, location: url, unreadableReason: describeCaughtError(error) };\n }\n}\n\n/**\n * Whether the application has installed the provider module whose ref is `providerRef`: an install writes\n * `providers/<provider ref>/` (the manifest refuses a boundary anywhere else), so the directory is the answer, read from\n * the tree rather than from a list. Keyed by the provider's REF, not the module id, which nothing requires to match it.\n */\nexport function isRegistryProviderInstalled(applicationRoot: string, providerRef: string): boolean {\n return existsSync(join(applicationRoot, 'providers', providerRef));\n}\n\n/** The section, as brief lines. `isInstalled` answers for a provider REF. */\nexport function renderProviderRegistryBrief(listing: ProviderRegistryListing, isInstalled: (providerRef: string) => boolean): string {\n const heading = '# Provider modules the registry offers';\n const where = listing.source === ProviderRegistryListingSource.FRAMEWORK_CHECKOUT\n ? `Read from the framework checkout (${listing.location}), which is what \\`wildo registry add wildo/…\\` installs from here.`\n : `Read from the module registry at ${listing.location}, domain \\`${WILDO_REGISTRY_DOMAIN}\\`.`;\n if ('unreadableReason' in listing) {\n return [\n heading,\n where,\n `UNREADABLE: ${listing.unreadableReason}`,\n 'So this brief does not know which providers could be installed. Do not bind a third-party provider this application has not',\n 'installed on the strength of recollection: bind what the workspace already carries, and say in the plan\\'s rationale that the',\n 'registry could not be read, so the missing provider is decided later.',\n ].join('\\n');\n }\n const offers = listing.hits.filter((hit) => hit.provider !== undefined);\n const rows = offers.map((hit) => {\n const provider = hit.provider!;\n const bind = provider.augments !== undefined\n ? `bind as \\`${provider.ref}\\` with \\`augments: ${provider.augments}\\` (it adds operations to the \\`${provider.augments}\\` provider, which a scope must declare)`\n : `bind as \\`${provider.ref}\\``;\n const fills = provider.engineCapabilities.length > 0 ? ` · fills ${provider.engineCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}` : '';\n const state = isInstalled(provider.ref) ? 'INSTALLED' : `not installed — \\`wildo registry add ${WILDO_REGISTRY_DOMAIN}/${hit.moduleId}\\``;\n return `- \\`${WILDO_REGISTRY_DOMAIN}/${hit.moduleId}\\` ${hit.latestVersion} · ${bind} · ${provider.maturity}${fills} · ${state}${hit.description ? `\\n ${hit.description}` : ''}`;\n });\n return [\n heading,\n where,\n 'A third-party provider reaches this application ONLY by being installed from the registry. These are the ones on offer;',\n 'the framework\\'s own engine providers (billing, email, storage, identity and the like) are not listed here.',\n '- To bind one, write a provider binding whose `providerRef` is its \"bind as\" ref (and `augments` where shown), and whose',\n ' `rationale` names the need it serves and, when it is not installed, the install command shown. The binding\\'s build',\n ' task installs it first. An augmentation is also opted in, under `providers.augmentations.<augments>`, and that opt-in',\n ' is what shows its task landed.',\n '- Maturity: `adopted` has not yet met the real vendor; `proven` has, with the proof on record. Prefer `proven` when two fit.',\n '- Never bind a third-party vendor that neither this list nor the workspace carries: no module would provide it.',\n '',\n ...(rows.length > 0 ? rows : ['(the registry offers no provider module)']),\n ].join('\\n');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"provider-registry-brief.companion.utils.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/provider-registry-brief.companion.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GAGtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EAAE,4BAA4B,EAAsC,MAAM,oDAAoD,CAAC;AAEtI,yFAAyF;AACzF,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAE1C,kDAAkD;AAClD,MAAM,CAAN,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACvC,gFAAgF;IAChF,0EAAyC,CAAA;IACzC,oDAAoD;IACpD,oEAAmC,CAAA;AACrC,CAAC,EALW,6BAA6B,KAA7B,6BAA6B,QAKxC;AAgBD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,KAIjD;IACC,IAAI,KAAK,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;QACjC,MAAM,QAAQ,G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,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;QAC7D,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;QACpD,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;KACrD,CAAC;IACF,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["/**\n * The `provider_registry` brief section (#2025, epic #2012): the provider modules the registry offers, for a playbook that\n * decides which providers an application binds.\n *\n * Since the generated catalogue was archived (#2019), a third-party vendor reaches an application only by being\n * installed from the module registry. A planner that reads only the workspace therefore sees the providers already\n * installed and none it could add. This section is the registry's answer, read from the SAME source `wildo registry\n * search` reads, through the same shared functions, so the brief and the command cannot disagree:\n *\n * - inside a framework checkout, the checkout's own `providers-registry/` (`listLocalCheckoutModules`, #2015);\n * - anywhere else, the application's registry (`resolveRegistryUrl` over `moduleRegistries`, then a search).\n *\n * Only the `wildo` domain is read: it is where Wildo publishes its providers. An organization's private domain holds\n * what that organization authored, which a planner cannot know to ask for.\n *\n * BEST-EFFORT, never a gate: a registry that cannot be read renders a section that says so and why. The run goes on,\n * because a plan that binds no provider is still a plan (`application-creation-directive.md`), and a refusal here would\n * stop application creation over an unreachable server.\n */\nimport { existsSync, readdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport {\n listLocalCheckoutModules,\n ModuleKind,\n moduleSearchHitFacts,\n resolveRegistryUrl,\n WILDO_REGISTRY_DOMAIN,\n type ModuleSearchHit,\n type RegistryConfig,\n} from '@wildo-ai/platform-config-lib';\nimport { RegistryServerClient } from '@wildo-ai/wildo-module-client';\nimport { ProviderOriginKind, describeCaughtError } from '@wildo-ai/saas-models';\nimport type { ProviderSpecificationConfig } from '@wildo-ai/saas-specifications';\nimport { PROVIDER_BINDING_SCOPE_FACET, type IntegrationPlanKnownProviders } from '@wildo-ai/saas-specifications/application-creation';\n\n/** How long the brief waits for a registry server before saying it could not be read. */\nconst REGISTRY_SEARCH_TIMEOUT_MS = 10_000;\n\n/** Where the offered providers were read from. */\nexport enum ProviderRegistryListingSource {\n /** The framework checkout's `providers-registry/`, in framework development. */\n FRAMEWORK_CHECKOUT = 'framework-checkout',\n /** The application's module registry, over HTTP. */\n REGISTRY_SERVER = 'registry-server',\n}\n\n/** The registry's provider modules, or why they could not be read. */\nexport type ProviderRegistryListing =\n | { readonly source: ProviderRegistryListingSource; readonly location: string; readonly hits: readonly ModuleSearchHit[] }\n | { readonly source: ProviderRegistryListingSource; readonly location: string; readonly unreadableReason: string };\n\n/*\n * The registry lane searches anonymously: it reads the PUBLIC modules of the `wildo` domain, which is where Wildo\n * publishes its providers. A registry that requires authentication for that domain renders as unreadable here even\n * where an operator's own `wildo registry search` (which sends a stored key) succeeds (#2025 review F7).\n */\n\n/** The registry search, injectable so a test drives the server lane without a server. */\nexport type ProviderRegistrySearch = typeof RegistryServerClient.search;\n\n/**\n * Every provider module the registry offers. The checkout lane when the companion runs inside a framework checkout\n * (the same rule `wildo registry search` applies for the `wildo` domain), the registry lane otherwise.\n */\nexport async function listRegistryProviderModules(input: {\n readonly frameworkRoot: string | null;\n readonly moduleRegistries?: RegistryConfig;\n readonly search?: ProviderRegistrySearch;\n}): Promise<ProviderRegistryListing> {\n if (input.frameworkRoot !== null) {\n const location = join(input.frameworkRoot, 'providers-registry');\n try {\n const listings = await listLocalCheckoutModules(input.frameworkRoot, '');\n const hits = listings\n .filter((listing) => (listing.manifest.kind ?? ModuleKind.FEATURE) === ModuleKind.PROVIDER)\n .map((listing) => ({ moduleId: listing.moduleId, latestVersion: listing.version, description: listing.manifest.description, ...moduleSearchHitFacts(listing.manifest) }));\n return { source: ProviderRegistryListingSource.FRAMEWORK_CHECKOUT, location, hits };\n } catch (error) {\n return { source: ProviderRegistryListingSource.FRAMEWORK_CHECKOUT, location, unreadableReason: describeCaughtError(error) };\n }\n }\n let url: string;\n try {\n url = resolveRegistryUrl({ moduleRegistries: input.moduleRegistries }).url;\n } catch (error) {\n return { source: ProviderRegistryListingSource.REGISTRY_SERVER, location: '(unresolved)', unreadableReason: describeCaughtError(error) };\n }\n try {\n const search = input.search ?? RegistryServerClient.search.bind(RegistryServerClient);\n const hits = await search(\n { baseUrl: url, timeoutMs: REGISTRY_SEARCH_TIMEOUT_MS },\n { domain: WILDO_REGISTRY_DOMAIN, query: '', filter: { kind: ModuleKind.PROVIDER } },\n );\n return { source: ProviderRegistryListingSource.REGISTRY_SERVER, location: url, hits };\n } catch (error) {\n return { source: ProviderRegistryListingSource.REGISTRY_SERVER, location: url, unreadableReason: describeCaughtError(error) };\n }\n}\n\n/**\n * Whether the application has installed the provider module whose ref is `providerRef`: an install writes\n * `providers/<provider ref>/` (the manifest refuses a boundary anywhere else), so the directory is the answer, read from\n * the tree rather than from a list. Keyed by the provider's REF, not the module id, which nothing requires to match it.\n */\nexport function isRegistryProviderInstalled(applicationRoot: string, providerRef: string): boolean {\n return existsSync(join(applicationRoot, 'providers', providerRef));\n}\n\n/**\n * One provider the ENGINE ships (#3992): bound by declaring it, never installed. Listed beside the registry's offers so a\n * planner sees everything the framework already has before it concludes a need is unprovided.\n */\nexport interface EngineProviderOffer {\n readonly ref: string;\n /**\n * The facets it ships a module for (`backend`, `frontend-app`, `frontend-website`, `frontend-techdoc`): which binding\n * scopes it can serve. Shown so a planner does not bind a browser-only provider (the Dropbox Chooser) on the backend.\n */\n readonly facets: readonly string[];\n readonly engineCapabilities: readonly string[];\n /** The secrets an operator supplies before it serves; empty for a credential-free provider. */\n readonly requiredSecretEnvVars: readonly string[];\n readonly purpose: string;\n}\n\n/**\n * The engine's own providers, from the registered provider specifications whose origin is the engine.\n *\n * The population is every MAIN backend module and every browser module, which the CLI's reconciliation test (#328,\n * facet-aware since #3995) holds to one specification each; the frontend-only `dropbox` picker is in it since #3995 item 5.\n * One engine-shipped ref is deliberately not: `immudb`, a non-MAIN audit sink the platform chooses and no planner binds\n * (it is moving to the registry).\n */\nexport function engineProviderOffers(specifications: readonly ProviderSpecificationConfig[]): EngineProviderOffer[] {\n return specifications\n .filter((specification) => specification.origin.kind === ProviderOriginKind.ENGINE)\n .map((specification) => ({\n ref: specification.ref,\n facets: [...specification.facets],\n engineCapabilities: [...specification.engineCapabilities],\n requiredSecretEnvVars: specification.secretsContract.filter((secret) => secret.required).map((secret) => secret.envVarName),\n purpose: specification.purpose,\n }))\n .sort((left, right) => left.ref.localeCompare(right.ref));\n}\n\n/**\n * Which facet each binding scope loads, in the brief's words, from the one map the integration plan's scope check reads\n * (`PROVIDER_BINDING_SCOPE_FACET`): \"`backend` on BACKEND or COMPANION, `frontend-app` on FRONTEND_APP, …\".\n */\nfunction describeScopeFacets(): string {\n const scopesByFacet = new Map<string, string[]>();\n for (const [scope, facet] of Object.entries(PROVIDER_BINDING_SCOPE_FACET)) scopesByFacet.set(facet, [...(scopesByFacet.get(facet) ?? []), scope]);\n return [...scopesByFacet.entries()].map(([facet, scopes]) => `\\`${facet}\\` on ${scopes.join(' or ')}`).join(', ');\n}\n\n/** The engine half of the section: what the framework ships, bound by declaration alone. */\nfunction renderEngineProviderOffers(engineProviders: readonly EngineProviderOffer[]): string[] {\n return [\n '## Engine providers (shipped with the framework: declare one, nothing to install)',\n `Each binds only on a scope its facets serve: ${describeScopeFacets()}.`,\n ...(engineProviders.length > 0\n ? engineProviders.map((offer) => {\n const facets = ` · ${offer.facets.map((facet) => `\\`${facet}\\``).join(', ')}`;\n const fills = offer.engineCapabilities.length > 0 ? ` · fills ${offer.engineCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}` : '';\n const secrets = offer.requiredSecretEnvVars.length > 0 ? ` · needs ${offer.requiredSecretEnvVars.map((name) => `\\`${name}\\``).join(', ')}` : ' · no credential';\n return `- \\`${offer.ref}\\`${facets}${fills}${secrets}\\n ${offer.purpose}`;\n })\n : ['(no engine provider specification is registered)']),\n ];\n}\n\n/**\n * The rule a planner applies before anything new is authored (#3992, Paul 2026-11-16): app creation USES the providers the\n * framework already has; a new provider is authored only for a need neither list fills, and the reason is recorded.\n */\nconst AUTHOR_ONLY_WHAT_NOTHING_FILLS = [\n '## A need neither list fills',\n 'Authoring a NEW provider is the last resort, not a third option beside these. Do it only when no engine provider and no',\n 'registry module fills the need: a vendor or behaviour none of them offers, or a business obligation that names a',\n 'vendor. Then record it in the plan\\'s `unprovidedNeeds` (the ref the new provider will have, the need, the requirements it',\n 'serves, and why nothing above fills it), never only in prose, AND bind that ref on the scope that needs it, or, when one of',\n 'the plan\\'s workers or minions alone uses it, name that surface in the entry\\'s `wiredByRef`: only a recorded need that a',\n 'binding or a named worker or minion wires becomes a task that writes the new provider.',\n];\n\n/** The section, as brief lines. `isInstalled` answers for a provider REF. */\nexport function renderProviderRegistryBrief(\n listing: ProviderRegistryListing,\n isInstalled: (providerRef: string) => boolean,\n engineProviders: readonly EngineProviderOffer[] = [],\n): string {\n const heading = '# Providers the framework already has';\n const where = listing.source === ProviderRegistryListingSource.FRAMEWORK_CHECKOUT\n ? `Registry modules read from the framework checkout (${listing.location}), which is what \\`wildo registry add wildo/…\\` installs from here.`\n : `Registry modules read from the module registry at ${listing.location}, domain \\`${WILDO_REGISTRY_DOMAIN}\\`.`;\n if ('unreadableReason' in listing) {\n return [\n heading,\n ...renderEngineProviderOffers(engineProviders),\n '',\n '## Provider modules the registry offers',\n where,\n `UNREADABLE: ${listing.unreadableReason}`,\n 'So this brief does not know which providers could be installed. Do not bind a third-party provider this application has not',\n 'installed on the strength of recollection: bind what the workspace already carries, and say in the plan\\'s rationale that the',\n 'registry could not be read, so the missing provider is decided later. Do not record such a need as unprovided either: the',\n 'registry may well fill it.',\n ].join('\\n');\n }\n const offers = listing.hits.filter((hit) => hit.provider !== undefined);\n const rows = offers.map((hit) => {\n const provider = hit.provider!;\n const bind = provider.augments !== undefined\n ? `bind as \\`${provider.ref}\\` with \\`augments: ${provider.augments}\\` (it adds operations to the \\`${provider.augments}\\` provider, which a scope must declare)`\n : `bind as \\`${provider.ref}\\``;\n const fills = provider.engineCapabilities.length > 0 ? ` · fills ${provider.engineCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}` : '';\n const state = isInstalled(provider.ref) ? 'INSTALLED' : `not installed — \\`wildo registry add ${WILDO_REGISTRY_DOMAIN}/${hit.moduleId}\\``;\n return `- \\`${WILDO_REGISTRY_DOMAIN}/${hit.moduleId}\\` ${hit.latestVersion} · ${bind} · ${provider.maturity}${fills} · ${state}${hit.description ? `\\n ${hit.description}` : ''}`;\n });\n return [\n heading,\n ...renderEngineProviderOffers(engineProviders),\n '',\n '## Provider modules the registry offers',\n where,\n 'A third-party provider the engine does not ship reaches this application ONLY by being installed from the registry.',\n '- To bind one, write a provider binding whose `providerRef` is its \"bind as\" ref (and `augments` where shown), and whose',\n ' `rationale` names the need it serves and, when it is not installed, the install command shown. The binding\\'s build',\n ' task installs it first. An augmentation is also opted in, under `providers.augmentations.<augments>`, and that opt-in',\n ' is what shows its task landed.',\n '- Maturity: `adopted` has not yet met the real vendor; `proven` has, with the proof on record. Prefer `proven` when two fit.',\n '- Never bind a third-party vendor that neither list nor the workspace carries, unless an `unprovidedNeeds` entry names it',\n ' (below): otherwise no module would provide it.',\n '',\n ...(rows.length > 0 ? rows : ['(the registry offers no provider module)']),\n '',\n ...AUTHOR_ONLY_WHAT_NOTHING_FILLS,\n ].join('\\n');\n}\n\n/** The runtime import path every engine-shipped provider loads from: what tells it from an installed or authored one. */\nconst ENGINE_PROVIDER_IMPORT_PREFIX = '@wildo-ai/external-connectors-';\n\n/**\n * The providers an application's integration plan may reference (#3995), split as the check needs it:\n *\n * - `existing`, what the FRAMEWORK has: every registered provider specification (every MAIN engine module, backend or\n * browser, #3995 item 5), every registry module, and every discovered contribution the engine ships (it loads from\n * `@wildo-ai/external-connectors-*`). The last brings the engine provider that has no specification, the immudb sink;\n * - `bindable`, also what the APPLICATION has: every discovered contribution (an installed or authored package), every\n * `providers/<ref>/` on disk, and every ref its five typed scopes declare (`providers.scopes.backend`, `.companion`,\n * `.frontendServices.<k>`, `.minions.<k>`, `.workers.<k>`).\n *\n * `facetsByProvider` carries the facets of every engine provider whose specification is its ref's only source, for the\n * binding-scope check.\n *\n * `undefined` when any source could not be read (the registry, discovery) or no specification is registered: an unknown\n * provider is then not a wrong one, and a false refusal would cost every attempt and the build behind the plan.\n */\nexport function collectKnownProviderRefs(input: {\n readonly listing: ProviderRegistryListing;\n readonly applicationRoot: string;\n readonly specifications: readonly ProviderSpecificationConfig[];\n /** Discovery's contributions, or `undefined` when it could not be read. */\n readonly discoveredContributions: ReadonlyArray<{ readonly ref: string; readonly runtimeImportPath: string }> | undefined;\n readonly saasConfig: unknown;\n}): IntegrationPlanKnownProviders | undefined {\n if ('unreadableReason' in input.listing || input.discoveredContributions === undefined || input.specifications.length === 0) return undefined;\n const existing = new Set<string>(input.specifications.map((specification) => specification.ref));\n for (const hit of input.listing.hits) if (hit.provider !== undefined) existing.add(hit.provider.ref);\n for (const contribution of input.discoveredContributions) {\n if (contribution.runtimeImportPath.startsWith(ENGINE_PROVIDER_IMPORT_PREFIX)) existing.add(contribution.ref);\n }\n const bindable = new Set<string>(existing);\n for (const contribution of input.discoveredContributions) bindable.add(contribution.ref);\n const installedRoot = join(input.applicationRoot, 'providers');\n if (existsSync(installedRoot)) {\n for (const entry of readdirSync(installedRoot, { withFileTypes: true })) if (entry.isDirectory()) bindable.add(entry.name);\n }\n for (const ref of declaredScopeProviderRefs(input.saasConfig)) bindable.add(ref);\n /*\n * The facets each provider ships (#3995), from the SAME specifications the brief shows them from, and only where the\n * specification is the ref's whole story. A registry module, a package under `providers/<ref>/`, or a contribution not\n * shipped by the engine may carry the same ref with facets of its own (a backend Dropbox module beside the engine's\n * browser-only Chooser), and those facets are not known here, so such a ref is left out and its scope is not checked.\n */\n const otherSources = new Set<string>();\n for (const hit of input.listing.hits) if (hit.provider !== undefined) otherSources.add(hit.provider.ref);\n for (const contribution of input.discoveredContributions) {\n if (!contribution.runtimeImportPath.startsWith(ENGINE_PROVIDER_IMPORT_PREFIX)) otherSources.add(contribution.ref);\n }\n if (existsSync(installedRoot)) {\n for (const entry of readdirSync(installedRoot, { withFileTypes: true })) if (entry.isDirectory()) otherSources.add(entry.name);\n }\n const facetsByProvider = new Map<string, ReadonlySet<string>>();\n for (const specification of input.specifications) {\n if (!otherSources.has(specification.ref)) facetsByProvider.set(specification.ref, new Set(specification.facets));\n }\n return { existing, bindable, facetsByProvider };\n}\n\n/** Every provider ref the configuration's five typed scopes declare. */\nfunction declaredScopeProviderRefs(saasConfig: unknown): string[] {\n const record = (value: unknown): Record<string, unknown> => (value !== null && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, unknown> : {});\n const scopes = record(record(record(saasConfig).providers).scopes);\n const scopeObjects = [\n record(scopes.backend),\n record(scopes.companion),\n ...Object.values(record(scopes.frontendServices)).map(record),\n ...Object.values(record(scopes.minions)).map(record),\n ...Object.values(record(scopes.workers)).map(record),\n ];\n return scopeObjects.flatMap((scope) => Object.keys(record(scope.providers)));\n}\n"]}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a business module's conventional files live, per application package: the ONE source the companion reads
|
|
3
|
+
* (#3904).
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists
|
|
6
|
+
*
|
|
7
|
+
* On reference run 43691253927 a coding agent registered the `enquiries` module's email templates from
|
|
8
|
+
* `email/email-template-definitions.ts`. The companion writes and previews a module's templates under `emails/`, so its
|
|
9
|
+
* generated template landed where nothing registered it. Tolerating the improvised folder (72b942f36 taught the companion
|
|
10
|
+
* to FIND it) is the read path; Paul's decision of 2026-11-17 is that the build PREVENTS it: a module file placed outside
|
|
11
|
+
* its conventional folder fails the coding run that placed it (`check:module-layout`), with the move that corrects it.
|
|
12
|
+
*
|
|
13
|
+
* ## What it covers, and why only this
|
|
14
|
+
*
|
|
15
|
+
* Only conventions the framework DEFINES (the `add-module` / `add-resource` / `add-custom-operation` scaffold writes the
|
|
16
|
+
* file there, or the shipped skill states the place) AND RELIES ON (something reads the file only at that place), for a
|
|
17
|
+
* file a check can RECOGNIZE wherever it is put (by a suffix only that kind uses, or by what it calls). Each entry names
|
|
18
|
+
* what relies on it in `reliedOnBy`.
|
|
19
|
+
*
|
|
20
|
+
* Read at a fixed place by the build lane's landed probes too, and left out, each for its own reason (#3904 review F3):
|
|
21
|
+
* - a seed (`seeds/<seed>.ts`) and an agent or gate (`addons/flows-actors/…`): their file names are the author's or
|
|
22
|
+
* derived from a key with no kind suffix, so a misplaced one cannot be recognized; both reach startup through an
|
|
23
|
+
* import the probe also asks for;
|
|
24
|
+
* - the PDF bindings: the probe accepts two places (`pdf/pdf-template-bindings.ts`, `module-pdf-template-bindings.ts`);
|
|
25
|
+
* - `milestones.ts`, `app-level-views/view-refs.frontend.ts` and the guidance definitions files: the probe also accepts
|
|
26
|
+
* the module's (or the folder's) index, and the scaffold creates the view-refs file, so an agent edits it in place.
|
|
27
|
+
* They are recognizable by exact name and are the candidates for a next entry if a misplacement is ever measured.
|
|
28
|
+
* Their probe paths are still written in the coding policy, not here.
|
|
29
|
+
*
|
|
30
|
+
* Measured 2026-11-17 against the five dogfood applications: every file each entry recognizes sits where the entry says
|
|
31
|
+
* (Wonder Todos, Wonder CRM, Wonder Ledger, Wonder Procurement, scratch-blueprint-proof), except the per-RESOURCE
|
|
32
|
+
* relationships file, which is why the module relationships entry recognizes only `<module>.relationships.ts`.
|
|
33
|
+
*
|
|
34
|
+
* ## One source for its readers
|
|
35
|
+
*
|
|
36
|
+
* - the build lane's landed probes build their paths with {@link conventionalModuleFilePath}
|
|
37
|
+
* (`application-build-task-coding-policy.companion.service.ts`);
|
|
38
|
+
* - the companion's module email root reads {@link MODULE_EMAIL_DIRECTORY} (`module-email-root.companion.utils.ts`);
|
|
39
|
+
* - `check:module-layout` classifies files with {@link classifyModuleFile} (`module-layout-inspection.companion.ts`);
|
|
40
|
+
* - the scaffold cannot import TypeScript (`templates/saas/scenarios/*`), so a test walks every scenario's module files
|
|
41
|
+
* through {@link classifyModuleFile} and fails when the scaffold and this source disagree, in either direction
|
|
42
|
+
* (`__tests__/module-layout-convention.companion.test.ts`). The package population is pinned the same way.
|
|
43
|
+
*/
|
|
44
|
+
/** An application package that holds business modules under `src/modules/<module>/`, as the `add-module` scenario writes them. */
|
|
45
|
+
export declare enum ModulePackage {
|
|
46
|
+
SHARED_LIB = "shared-lib",
|
|
47
|
+
SPECIFICATIONS = "specifications",
|
|
48
|
+
BACKEND_API = "backend-api",
|
|
49
|
+
FRONTEND = "frontend"
|
|
50
|
+
}
|
|
51
|
+
/** Every package with module folders, in the order `add-module` lists them. The scaffold test pins it to the scenario's file tree. */
|
|
52
|
+
export declare const MODULE_PACKAGES: readonly ModulePackage[];
|
|
53
|
+
/** Where a package keeps its modules, relative to the package directory. */
|
|
54
|
+
export declare const MODULES_SOURCE_DIRECTORY = "src/modules";
|
|
55
|
+
/** The kind of a module file whose place the framework relies on. */
|
|
56
|
+
export declare enum ModuleConventionalFileKind {
|
|
57
|
+
/** The file that registers a module's email templates: calls `scanEmailTemplateDirectory`, or is named like one. */
|
|
58
|
+
EMAIL_TEMPLATE_DEFINITIONS = "email-template-definitions",
|
|
59
|
+
/** A resource custom operation implementation, `<resource>.<operation>.<variant>.operation.ts`. */
|
|
60
|
+
CUSTOM_OPERATION = "custom-operation",
|
|
61
|
+
/** A resource's schemas, `<resource>.schemas.ts`. */
|
|
62
|
+
RESOURCE_SCHEMA = "resource-schema",
|
|
63
|
+
/** A resource's configuration, `<resource>.resources-config.ts`. */
|
|
64
|
+
RESOURCE_CONFIGURATION = "resource-configuration",
|
|
65
|
+
/** The module's relationship edges, `<module>.relationships.ts`. */
|
|
66
|
+
MODULE_RELATIONSHIPS = "module-relationships",
|
|
67
|
+
/** A resource's frontend behaviour, `<resource>.ui-behavior.tsx`. */
|
|
68
|
+
RESOURCE_UI_BEHAVIOR = "resource-ui-behavior",
|
|
69
|
+
/** A resource's specification, `<resource>.resource.specification.ts`. */
|
|
70
|
+
RESOURCE_SPECIFICATION = "resource-specification"
|
|
71
|
+
}
|
|
72
|
+
/** How a file of a kind relates to its conventional directory. */
|
|
73
|
+
export declare enum ModuleConventionalPlacement {
|
|
74
|
+
/** Directly in the directory: `emails/<file>`. */
|
|
75
|
+
IN_DIRECTORY = "in-directory",
|
|
76
|
+
/** Anywhere below the directory, at any depth: `resources/…/<file>`. */
|
|
77
|
+
UNDER_DIRECTORY = "under-directory",
|
|
78
|
+
/** In the directory's sub-folder named after the file's stem: `resources/<stem>/<file>`. */
|
|
79
|
+
IN_STEM_DIRECTORY = "in-stem-directory"
|
|
80
|
+
}
|
|
81
|
+
/** How a file is recognized as being of a kind. */
|
|
82
|
+
export declare enum ModuleConventionalFileRecognition {
|
|
83
|
+
/** Its name ends with `fileNameSuffix`; the stem is the name without it. */
|
|
84
|
+
NAME_SUFFIX = "name-suffix",
|
|
85
|
+
/** Its name is exactly `<module>` + `fileNameSuffix`. */
|
|
86
|
+
MODULE_NAMED = "module-named",
|
|
87
|
+
/** Its content calls `scanEmailTemplateDirectory`, or its name matches `EMAIL_DEFINITIONS_FILE_NAME` (a module email definitions file). */
|
|
88
|
+
EMAIL_SCANNER = "email-scanner"
|
|
89
|
+
}
|
|
90
|
+
/** One conventional place. */
|
|
91
|
+
export interface ModuleLayoutConvention {
|
|
92
|
+
readonly kind: ModuleConventionalFileKind;
|
|
93
|
+
readonly package: ModulePackage;
|
|
94
|
+
/** Relative to the module's folder (`<package>/src/modules/<module>/`), POSIX. */
|
|
95
|
+
readonly directory: string;
|
|
96
|
+
readonly placement: ModuleConventionalPlacement;
|
|
97
|
+
readonly recognition: ModuleConventionalFileRecognition;
|
|
98
|
+
/** For {@link ModuleConventionalFileRecognition.NAME_SUFFIX} and `MODULE_NAMED`. */
|
|
99
|
+
readonly fileNameSuffix?: string;
|
|
100
|
+
/** What reads the file ONLY at this place, so a file elsewhere is silently not read. Shown in a finding. */
|
|
101
|
+
readonly reliedOnBy: string;
|
|
102
|
+
/**
|
|
103
|
+
* The suffix is also used by files that are NOT this kind (`common.schemas.ts`, a schema fragment), so outside its
|
|
104
|
+
* directory a file is recognized only when its stem names a resource the module has (`ModuleFileFacts.knownResourceStems`).
|
|
105
|
+
*/
|
|
106
|
+
readonly suffixSharedWithHelpers?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/** A module's email root, under its backend module folder. */
|
|
109
|
+
export declare const MODULE_EMAIL_DIRECTORY = "emails";
|
|
110
|
+
/** The definitions file a new module's email root holds (the name the shipped skills teach; nothing reads the name itself). */
|
|
111
|
+
export declare const MODULE_EMAIL_DEFINITIONS_FILE = "module-email-template-definitions.ts";
|
|
112
|
+
/** A module's resources folder, in every package. */
|
|
113
|
+
export declare const MODULE_RESOURCES_DIRECTORY = "resources";
|
|
114
|
+
/**
|
|
115
|
+
* The conventions, one per kind. Measured, not invented: see the module JSDoc. A new entry needs a scaffold file or a
|
|
116
|
+
* shipped skill stating the place, and a reader that relies on it; the scaffold test then holds it to the scaffold.
|
|
117
|
+
*/
|
|
118
|
+
export declare const MODULE_LAYOUT_CONVENTIONS: readonly ModuleLayoutConvention[];
|
|
119
|
+
/** The convention of `kind`. Total over the enum: a kind with no entry is a programming error, caught by the scaffold test. */
|
|
120
|
+
export declare function moduleLayoutConvention(kind: ModuleConventionalFileKind): ModuleLayoutConvention;
|
|
121
|
+
/** A module's folder, application-relative: `<package>/src/modules/<module>`. */
|
|
122
|
+
export declare function moduleFolderPath(modulePackage: ModulePackage, moduleRef: string): string;
|
|
123
|
+
/**
|
|
124
|
+
* The application-relative path of the conventional file of `kind` for `stem` (a resource ref; ignored for the module
|
|
125
|
+
* relationships file, whose stem is the module): what the build lane's landed probes read. Not defined for the email
|
|
126
|
+
* definitions and custom operations, whose names are the author's.
|
|
127
|
+
*/
|
|
128
|
+
export declare function conventionalModuleFilePath(kind: ModuleConventionalFileKind, moduleRef: string, stem: string): string;
|
|
129
|
+
/** A module file recognized as one of the kinds, and whether it sits where its kind lives. */
|
|
130
|
+
export interface ModuleFileClassification {
|
|
131
|
+
readonly convention: ModuleLayoutConvention;
|
|
132
|
+
/** Whether the file is where the convention puts it. */
|
|
133
|
+
readonly conventional: boolean;
|
|
134
|
+
/** Where it belongs, relative to the module folder (POSIX): the move's destination. */
|
|
135
|
+
readonly conventionalPath: string;
|
|
136
|
+
}
|
|
137
|
+
/** Facts about a file the classification needs and cannot read from its path. */
|
|
138
|
+
export interface ModuleFileFacts {
|
|
139
|
+
/** Whether the file calls the email scanner (read by the caller from its syntax tree). */
|
|
140
|
+
readonly callsEmailScanner: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* The resources the module has, by folder or file stem in any package (`resources/<resource>/`,
|
|
143
|
+
* `<resource>.resource.specification.ts`, `<resource>.resources-config.ts`). Read only for a kind whose suffix helpers
|
|
144
|
+
* share. Absent: none known.
|
|
145
|
+
*/
|
|
146
|
+
readonly knownResourceStems?: ReadonlySet<string>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The convention `fileInModule` (relative to its module folder, POSIX) falls under, if any, and whether it is in place.
|
|
150
|
+
* Pure: the caller supplies the one fact a path cannot carry (whether the file calls the email scanner).
|
|
151
|
+
*/
|
|
152
|
+
export declare function classifyModuleFile(input: {
|
|
153
|
+
readonly modulePackage: ModulePackage;
|
|
154
|
+
readonly moduleRef: string;
|
|
155
|
+
readonly fileInModule: string;
|
|
156
|
+
readonly facts: ModuleFileFacts;
|
|
157
|
+
}): ModuleFileClassification | undefined;
|
|
158
|
+
//# sourceMappingURL=module-layout-convention.companion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-layout-convention.companion.d.ts","sourceR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