@wildo-ai/dev-companion 1.1.14 → 1.1.16
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 +233 -6
- 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 +316 -13
- 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 +48 -2
- 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 +41 -3
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts +68 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js +198 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js.map +1 -0
- 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/models/workspace-path-claims.models.d.ts +138 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.js +204 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.js.map +1 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +36 -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 +71 -16
- 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 +234 -9
- 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 +1073 -182
- package/dist/esm/claude-cli/services/coding-agent-dispatch.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/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +7 -1
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
- 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/app-shell-placement-content.behavior.d.ts +13 -0
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +98 -16
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.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/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 +13 -1
- 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/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/expert-personas/services/expert-persona.companion.service.d.ts +21 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js +35 -3
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.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/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/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/workbench-build.en.d.ts +3 -3
- package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -3
- package/dist/esm/i18n/system_enums/workbench-build.en.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/meta-workflows/models/carried-verification-failure.models.d.ts +23 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +14 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +21 -1
- 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 +117 -3
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +5 -0
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +22 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +98 -24
- 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 +439 -93
- 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 +21 -8
- 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 +74 -12
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +47 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +98 -9
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +39 -3
- 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 +224 -48
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +45 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +74 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.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-run-report.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +21 -2
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +71 -5
- 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 +219 -17
- 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/meta-workflows/services/website-demo-facts.models.d.ts +19 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.js +7 -5
- package/dist/esm/meta-workflows/services/website-demo-facts.models.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/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -0
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +3 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
- package/package.json +17 -17
package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BuildPlanResourceStage, BuildPlanTaskProductKind, BuildPlanWorkerRuntime, ApplicationGuidanceKind, FrontendConfigSurface, PlacementSurface, ProviderBindingScope, BuildPlanTaskTargetKind, isScaffoldedResourceOperationRef, isScaffoldedWebsiteStarterPage, isScaffoldedWebsiteStarterSection, PlacementSubjectKind, placementViewIdentity, INTEGRATION_INBOUND_CHANNEL_SKILL_REF, BILLING_CATALOG_SKILL_REF, APPLICATION_ROLES_SKILL_REF, BuildPlanDataSeedContent, DATA_SEED_SKILL_REF, PDF_TEMPLATE_SKILL_REF, ORGANIZATION_RELATIONSHIPS_SKILL_REF, RESOURCE_RETENTION_SKILL_REF, AGENT_APPROVAL_GATE_SKILL_REF, AI_USE_DECLARATION_SKILL_REF, BUILD_PLAN_AGENT_SHAPE_SKILL_REF, BuildPlanAgentShape, WORK_UNIT_SKILL_REF, ORGANIZATION_TYPE_SKILL_REF, ORGANIZATION_UNIT_CONFINEMENT_SKILL_REF, SYSTEM_OF_RECORD_BINDING_SKILL_REFS, } from '@wildo-ai/saas-specifications/application-creation';
|
|
1
|
+
import { BuildPlanResourceStage, BuildPlanTaskProductKind, BuildPlanWorkerRuntime, ApplicationGuidanceKind, FrontendConfigSurface, PlacementSurface, ProviderBindingScope, BuildPlanTaskTargetKind, isScaffoldedResourceOperationRef, isScaffoldedWebsiteStarterPage, isScaffoldedWebsiteStarterSection, PlacementSubjectKind, placementViewIdentity, INTEGRATION_INBOUND_CHANNEL_SKILL_REF, BILLING_CATALOG_SKILL_REF, APPLICATION_ROLES_SKILL_REF, BuildPlanDataSeedContent, DATA_SEED_SKILL_REF, PDF_TEMPLATE_SKILL_REF, ORGANIZATION_RELATIONSHIPS_SKILL_REF, RESOURCE_RETENTION_SKILL_REF, AGENT_APPROVAL_GATE_SKILL_REF, AI_USE_DECLARATION_SKILL_REF, BUILD_PLAN_AGENT_SHAPE_SKILL_REF, BuildPlanAgentShape, WORK_UNIT_SKILL_REF, ORGANIZATION_TYPE_SKILL_REF, ORGANIZATION_UNIT_CONFINEMENT_SKILL_REF, SYSTEM_OF_RECORD_BINDING_SKILL_REFS, integrationMinionDirectoryName, integrationWorkerDirectoryName, } from '@wildo-ai/saas-specifications/application-creation';
|
|
2
2
|
import { posix } from 'node:path';
|
|
3
|
+
import { ORGANIZATION_ROLE_DOCUMENTATION_REQUIRED_GUIDANCE } from '@wildo-ai/saas-technical-doc/companion';
|
|
3
4
|
import { AgentWorkShortfallKind, isOrganizationRoleOfferedByType, SystemOfRecordAccess } from '@wildo-ai/saas-models';
|
|
4
5
|
import { LauncherItemTargetKind } from '@wildo-ai/saas-frontend-lib/companion';
|
|
5
6
|
import { AvailableLanguage, languagePathSegment } from '@wildo-ai/presets-components-models';
|
|
@@ -8,6 +9,7 @@ import { flattenNestedStringLabels, parseNestedLabelsTsSource } from '../../i18n
|
|
|
8
9
|
import { createInitialAssuranceDocumentAuthorityCatalog, selectAssuranceDocumentBlueprintForDocumentRef, } from '@wildo-ai/saas-specifications/assurance';
|
|
9
10
|
import { BUILD_TASK_DECISIONS_DEFAULT_APPLICATION_PATH } from '../models/build-task-decisions-path.models.js';
|
|
10
11
|
import { blankSourceComments } from '@wildo-ai/saas-models/public-runtime';
|
|
12
|
+
import { conventionalModuleFilePath, MODULE_PACKAGES, MODULES_SOURCE_DIRECTORY, ModuleConventionalFileKind } from '../../module-layout/module-layout-convention.companion.js';
|
|
11
13
|
/** A build task no coding agent may run: the companion owns it (labels, seeds, emails…). */
|
|
12
14
|
export class ApplicationBuildTaskNotACodingTaskError extends Error {
|
|
13
15
|
taskRef;
|
|
@@ -172,6 +174,29 @@ const BILLING_CATALOG_FILE = 'shared-lib/src/engine/product.ts';
|
|
|
172
174
|
* record — every scaffolded application has it — keyed by each role's name.
|
|
173
175
|
*/
|
|
174
176
|
const APPLICATION_ROLES_FILE = 'shared-lib/src/engine/roles.ts';
|
|
177
|
+
/**
|
|
178
|
+
* Where an application role's specification lives: one file per role, `<role>.role.specification.ts` with the role
|
|
179
|
+
* name in kebab case, exporting `<role>RoleSpecification` in camel case (the `application-roles-authoring` skill, Step 5).
|
|
180
|
+
* Wonder Ledger's `qualified-accountant.role.specification.ts` exporting `qualifiedAccountantRoleSpecification` is the
|
|
181
|
+
* shape; Wonder Todos names its files the same way.
|
|
182
|
+
*/
|
|
183
|
+
const APPLICATION_ROLE_SPECIFICATIONS_DIRECTORY = 'specifications/src/engine/roles/';
|
|
184
|
+
/**
|
|
185
|
+
* Where a role specification is wired into `roleSpecifications`: the specifications package's companion exports, which
|
|
186
|
+
* the scaffold writes spreading the engine's roles only. The ONE place, so the probe cannot land on a file nothing
|
|
187
|
+
* imports: Wonder Todos keeps an aggregator in the roles directory, which a text probe of that file alone could not tell
|
|
188
|
+
* from one the exports never reach (#3933 review F2). It predates build plans; no plan builds that shape.
|
|
189
|
+
*/
|
|
190
|
+
const APPLICATION_ROLE_SPECIFICATION_WIRING_FILE = 'specifications/src/companion-exports.ts';
|
|
191
|
+
/** The role's own specification file (`OFFICE_MANAGER` → `specifications/src/engine/roles/office-manager.role.specification.ts`). */
|
|
192
|
+
export function applicationRoleSpecificationPath(roleRef) {
|
|
193
|
+
return `${APPLICATION_ROLE_SPECIFICATIONS_DIRECTORY}${roleRef.toLowerCase().split('_').join('-')}.role.specification.ts`;
|
|
194
|
+
}
|
|
195
|
+
/** The binding that file exports (`OFFICE_MANAGER` → `officeManagerRoleSpecification`). */
|
|
196
|
+
export function applicationRoleSpecificationExportName(roleRef) {
|
|
197
|
+
const [first = '', ...rest] = roleRef.toLowerCase().split('_');
|
|
198
|
+
return `${first}${rest.map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`).join('')}RoleSpecification`;
|
|
199
|
+
}
|
|
175
200
|
/** The application's configuration: where its organization types and relationship kinds are declared (#2305 S6). */
|
|
176
201
|
const APPLICATION_SAAS_CONFIG_FILE = 'wildo.saas.config.ts';
|
|
177
202
|
/**
|
|
@@ -194,7 +219,9 @@ export const APPLICATION_WIDE_AGENT_WORK_MODULE_REF = '';
|
|
|
194
219
|
* The backend and companion scopes are blocks of the SaaS config, which the `add-provider` scenario
|
|
195
220
|
* writes; a frontend binding is a companion contribution in the service's own
|
|
196
221
|
* `provider-contributions.ts`, which `add-file-picker-provider` writes. The probe reads the file the
|
|
197
|
-
* scope names and asks whether the provider ref appears in it.
|
|
222
|
+
* scope names and asks whether the provider ref appears in it. A browser scope owes two probes since #4019 (see
|
|
223
|
+
* {@link PROVIDER_BROWSER_SCOPE_SURFACE}): the scope entry in the configuration, and the contribution, in this file
|
|
224
|
+
* or in the installed module's own facet barrel.
|
|
198
225
|
*/
|
|
199
226
|
const PROVIDER_BINDING_DECLARATION_FILE = {
|
|
200
227
|
[ProviderBindingScope.BACKEND]: 'wildo.saas.config.ts',
|
|
@@ -202,10 +229,28 @@ const PROVIDER_BINDING_DECLARATION_FILE = {
|
|
|
202
229
|
[ProviderBindingScope.FRONTEND_APP]: 'frontend/src/provider-contributions.ts',
|
|
203
230
|
[ProviderBindingScope.WEBSITE]: 'website/src/provider-contributions.ts',
|
|
204
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* The browser scopes, and the frontend type each contribution must serve (#4019): the member NAME a contribution spells
|
|
234
|
+
* (`AppFrontendType.SAAS_APP`), so a website binding is not landed by a facet that serves only the application.
|
|
235
|
+
*/
|
|
236
|
+
const PROVIDER_BROWSER_SCOPE_SURFACE = {
|
|
237
|
+
[ProviderBindingScope.FRONTEND_APP]: 'SAAS_APP',
|
|
238
|
+
[ProviderBindingScope.WEBSITE]: 'STATIC_WEBSITE',
|
|
239
|
+
};
|
|
240
|
+
/** The `./companion` barrel of an installed provider module's browser facet, where it contributes itself (`wildo registry add`). */
|
|
241
|
+
const installedProviderFrontendFacetBarrel = (providerRef) => `providers/${providerRef}/frontend/src/companion-exports.ts`;
|
|
242
|
+
/**
|
|
243
|
+
* A worker's package directory, from the integration plan's `worker-<slug>` ref, by the rule the foundation step composes
|
|
244
|
+
* the package with. Every worker path below goes through it: run 44031607175 probed `workers/worker-spreadsheet-import/`
|
|
245
|
+
* for a package composed in `workers/spreadsheet-import/`, and the task never landed.
|
|
246
|
+
*/
|
|
247
|
+
const workerPackageDirectory = (workerRef) => `workers/${integrationWorkerDirectoryName(workerRef)}`;
|
|
248
|
+
/** A minion's package directory, by the same rule as {@link workerPackageDirectory}. */
|
|
249
|
+
const minionPackageDirectory = (minionRef) => `minions/${integrationMinionDirectoryName(minionRef)}`;
|
|
205
250
|
/** A worker's entry file, by runtime — where its jobs are declared and where a landing probe reads. */
|
|
206
251
|
const WORKER_ENTRY_FILE = {
|
|
207
|
-
[BuildPlanWorkerRuntime.NODE]: (workerRef) =>
|
|
208
|
-
[BuildPlanWorkerRuntime.RUST]: (workerRef) =>
|
|
252
|
+
[BuildPlanWorkerRuntime.NODE]: (workerRef) => `${workerPackageDirectory(workerRef)}/src/index.ts`,
|
|
253
|
+
[BuildPlanWorkerRuntime.RUST]: (workerRef) => `${workerPackageDirectory(workerRef)}/src/main.rs`,
|
|
209
254
|
};
|
|
210
255
|
/**
|
|
211
256
|
* A documentation chapter's own file, named by its `chapterRef` (#3204). One file per chapter, which nothing imports:
|
|
@@ -280,6 +325,16 @@ export function resolveBuildPlanTaskCodingPolicy(task, applicationWorkspaceEntri
|
|
|
280
325
|
])],
|
|
281
326
|
};
|
|
282
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* Where a run of this task is EXPECTED to write (#3998): its target's scope and the paths its own products land at, the
|
|
330
|
+
* policy before the whole-workspace widening of #1268. A prediction, never a bound: the widening lets the run write
|
|
331
|
+
* anywhere, by decision. Read only where a wrong prediction costs nothing it cannot recover: a failed run's isolated
|
|
332
|
+
* re-check may start beside a live run predicted not to write what it reads, and its verdict is discarded when anything
|
|
333
|
+
* it reads changed meanwhile. Throws for a task no coding agent runs (a generation step).
|
|
334
|
+
*/
|
|
335
|
+
export function resolveBuildPlanTaskExpectedWriteScope(task) {
|
|
336
|
+
return admitLandedProbePaths(task, resolveBuildPlanTaskTargetCodingPolicy(task)).allowedPathPrefixes;
|
|
337
|
+
}
|
|
283
338
|
/**
|
|
284
339
|
* Widen a target-derived scope to admit the paths this task's own landing probes say it may WRITE.
|
|
285
340
|
*
|
|
@@ -548,6 +603,12 @@ const CHECK_COVERAGE = {
|
|
|
548
603
|
* ones and the module registry in `backend-api/`; a write to either can make the factory refuse at the next start.
|
|
549
604
|
*/
|
|
550
605
|
'check:resources-registry-init': ['shared-lib/', 'backend-api/'],
|
|
606
|
+
/*
|
|
607
|
+
* Every module's conventional files in their conventional folders (#3904): a write under any package's
|
|
608
|
+
* `src/modules/` can place a module file where the framework never reads it (an email definitions file in `email/`,
|
|
609
|
+
* the reference run 43691253927 defect). Read from source by path and syntax tree, so it speaks about what it covers.
|
|
610
|
+
*/
|
|
611
|
+
'check:module-layout': MODULE_PACKAGES.map((modulePackage) => `${modulePackage}/${MODULES_SOURCE_DIRECTORY}/`),
|
|
551
612
|
'check:website-typecheck': ['website/'],
|
|
552
613
|
/*
|
|
553
614
|
* The website's drawn demos, held to the resources they draw (#2784). After the typecheck: a site that does not
|
|
@@ -610,6 +671,9 @@ export function deriveApplicationAssemblyCheckRefs(packageDirectories, nonTypeSc
|
|
|
610
671
|
// factory refuses, and a later task can make an earlier one untrue (a removed enum member it names).
|
|
611
672
|
'check:specification-exports',
|
|
612
673
|
'check:resources-registry-init',
|
|
674
|
+
// Every module's files where the framework reads them (#3904): a misplacement a task's check carried, or one that
|
|
675
|
+
// predates the build lane, is asked once more at the end, where a repair run moves it.
|
|
676
|
+
'check:module-layout',
|
|
613
677
|
'check:website-demo-facts',
|
|
614
678
|
...APPLICATION_ASSEMBLY_ONLY_CHECK_REFS,
|
|
615
679
|
'check:schema-plan-in-sync',
|
|
@@ -652,8 +716,8 @@ export function resolveAssemblyRepairCodingPolicy(checkRef, applicationWorkspace
|
|
|
652
716
|
requiredCheckRefs: [...required, checkRef],
|
|
653
717
|
};
|
|
654
718
|
}
|
|
655
|
-
/** A workers/ or minions/ package directory, as the parametric package typecheck names it. */
|
|
656
|
-
const PARAMETRIC_PACKAGE_DIRECTORY = /^((?:workers|minions)\/[a-z0-9]+(?:-[a-z0-9]+)
|
|
719
|
+
/** A workers/ or minions/ package directory, or an installed provider's facet (#4018), as the parametric package typecheck names it. */
|
|
720
|
+
const PARAMETRIC_PACKAGE_DIRECTORY = /^((?:workers|minions)\/[a-z0-9]+(?:-[a-z0-9]+)*|providers\/[a-z0-9]+(?:-[a-z0-9]+)*\/(?:backend|frontend))(?:\/|$)/u;
|
|
657
721
|
/** Two path prefixes overlap when either contains the other: a write there can reach what the check reads. */
|
|
658
722
|
function pathsOverlap(written, covered) {
|
|
659
723
|
return written.startsWith(covered) || covered.startsWith(written);
|
|
@@ -667,7 +731,8 @@ function orderCheckRefs(checkRefs) {
|
|
|
667
731
|
}
|
|
668
732
|
/**
|
|
669
733
|
* The checks a task that writes `writtenPathPrefixes` must pass (#1540): every check whose coverage one
|
|
670
|
-
* of those paths can reach, plus the package typecheck of every workers/minions package
|
|
734
|
+
* of those paths can reach, plus the package typecheck of every workers/minions package and every provider facet
|
|
735
|
+
* package (#4018) it writes.
|
|
671
736
|
*
|
|
672
737
|
* `nonTypeScriptPackages` names package directories with no TypeScript to check (a Rust worker) — the
|
|
673
738
|
* honest answer there is no typecheck, stated by the target, rather than a command that cannot run.
|
|
@@ -763,15 +828,21 @@ function resolveBuildPlanTaskTargetCodingPolicy(task) {
|
|
|
763
828
|
* one run must reach both. A RUST worker has no TypeScript to check — the honest answer is no
|
|
764
829
|
* check, stated here, rather than a command the catalog cannot run.
|
|
765
830
|
*/
|
|
766
|
-
return policy([
|
|
767
|
-
nonTypeScriptPackages: target.runtime === BuildPlanWorkerRuntime.NODE ? [] : [
|
|
831
|
+
return policy([`${workerPackageDirectory(target.workerRef)}/`, 'wildo.saas.config.ts'], {
|
|
832
|
+
nonTypeScriptPackages: target.runtime === BuildPlanWorkerRuntime.NODE ? [] : [workerPackageDirectory(target.workerRef)],
|
|
768
833
|
});
|
|
769
834
|
case BuildPlanTaskTargetKind.MINION:
|
|
770
|
-
return policy([
|
|
835
|
+
return policy([`${minionPackageDirectory(target.minionRef)}/`, 'wildo.saas.config.ts']);
|
|
771
836
|
case BuildPlanTaskTargetKind.PROVIDER_BINDING:
|
|
772
837
|
/*
|
|
773
838
|
* Every file a binding can touch, for every scope, because one task may bind one provider on
|
|
774
839
|
* several scopes (`add-provider` writes the backend AND the companion block in one run).
|
|
840
|
+
*
|
|
841
|
+
* And the provider's own facet packages, where `wildo registry add` installs a registry module and where an
|
|
842
|
+
* application authors its own (#4018): naming them is what makes each facet's own typecheck a check of this task,
|
|
843
|
+
* so a provider whose package does not compile in the application fails its task with the compiler's output
|
|
844
|
+
* instead of landing and pausing the backend on it. A provider with no such package (an engine provider) answers
|
|
845
|
+
* "nothing to typecheck" in the executor.
|
|
775
846
|
*/
|
|
776
847
|
return policy([
|
|
777
848
|
'wildo.saas.config.ts',
|
|
@@ -779,6 +850,8 @@ function resolveBuildPlanTaskTargetCodingPolicy(task) {
|
|
|
779
850
|
'frontend/src/engine/providers/',
|
|
780
851
|
'frontend/src/provider-contributions.ts',
|
|
781
852
|
'website/src/provider-contributions.ts',
|
|
853
|
+
`providers/${target.providerRef}/backend/`,
|
|
854
|
+
`providers/${target.providerRef}/frontend/`,
|
|
782
855
|
]);
|
|
783
856
|
case BuildPlanTaskTargetKind.SHELL_PLACEMENT:
|
|
784
857
|
return policy([SHELL_PLACEMENT_CONFIG_FILE[target.surface]]);
|
|
@@ -798,7 +871,13 @@ function resolveBuildPlanTaskTargetCodingPolicy(task) {
|
|
|
798
871
|
* modules is what makes the shared-lib checks follow those edits; writing is already permitted
|
|
799
872
|
* by the workspace widening.
|
|
800
873
|
*/
|
|
801
|
-
return policy([
|
|
874
|
+
return policy([
|
|
875
|
+
APPLICATION_ROLES_FILE,
|
|
876
|
+
'wildo.saas.config.ts',
|
|
877
|
+
APPLICATION_ROLE_SPECIFICATIONS_DIRECTORY,
|
|
878
|
+
APPLICATION_ROLE_SPECIFICATION_WIRING_FILE,
|
|
879
|
+
'shared-lib/src/modules/',
|
|
880
|
+
]);
|
|
802
881
|
case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:
|
|
803
882
|
/*
|
|
804
883
|
* The application's configuration (organization types, relationship kinds), the backend's startup configuration
|
|
@@ -1433,9 +1512,9 @@ export function productDerivedSkillRefs(task) {
|
|
|
1433
1512
|
...(kinds.has(BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) ? SYSTEM_OF_RECORD_BINDING_SKILL_REFS : []),
|
|
1434
1513
|
].filter((skillRef, index, all) => all.indexOf(skillRef) === index);
|
|
1435
1514
|
}
|
|
1436
|
-
/** Where a resource's schema lives in the standard layout — the file a resource SCHEMA task writes. */
|
|
1515
|
+
/** Where a resource's schema lives in the standard layout — the file a resource SCHEMA task writes (the module layout convention, #3904). */
|
|
1437
1516
|
export function resourceSchemaFilePath(moduleRef, resourceRef) {
|
|
1438
|
-
return
|
|
1517
|
+
return conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_SCHEMA, moduleRef, resourceRef);
|
|
1439
1518
|
}
|
|
1440
1519
|
/**
|
|
1441
1520
|
* The field declarations that make a resource hold PERSONAL DATA — the same markers the engine's
|
|
@@ -1494,7 +1573,7 @@ export function resolveBuildTaskLandedProbes(task) {
|
|
|
1494
1573
|
const moduleRefOf = () => (resolvedModuleRef ??= productModuleRef(task));
|
|
1495
1574
|
return task.produces.flatMap((product) => {
|
|
1496
1575
|
const drafts = landedProbeDraft(task, product, moduleRefOf);
|
|
1497
|
-
return (Array.isArray(drafts) ? drafts : [drafts]).map((draft) => withDeclarationSite(product, draft));
|
|
1576
|
+
return (Array.isArray(drafts) ? drafts : [drafts]).map((draft, index) => withDeclarationSite(product, draft, index));
|
|
1498
1577
|
}).filter((probe) => probe !== undefined);
|
|
1499
1578
|
}
|
|
1500
1579
|
/**
|
|
@@ -1527,13 +1606,13 @@ function moduleRegistryMembershipProbes(moduleRef) {
|
|
|
1527
1606
|
* once, rather than in each case, so no case can state a site that disagrees with
|
|
1528
1607
|
* {@link productDeclarationSite} — the table is the only answer.
|
|
1529
1608
|
*/
|
|
1530
|
-
function withDeclarationSite(product, draft) {
|
|
1609
|
+
function withDeclarationSite(product, draft, probeIndex = 0) {
|
|
1531
1610
|
if (draft === undefined)
|
|
1532
1611
|
return undefined;
|
|
1533
1612
|
switch (draft.kind) {
|
|
1534
1613
|
case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:
|
|
1535
1614
|
case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:
|
|
1536
|
-
return { ...draft, site: productDeclarationSite(product) };
|
|
1615
|
+
return { ...draft, site: productDeclarationSite(product, probeIndex) };
|
|
1537
1616
|
default:
|
|
1538
1617
|
return draft;
|
|
1539
1618
|
}
|
|
@@ -1561,7 +1640,7 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1561
1640
|
case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:
|
|
1562
1641
|
return {
|
|
1563
1642
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1564
|
-
path:
|
|
1643
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),
|
|
1565
1644
|
// The COMPONENT the binding names, not the plan's ref — which the tree never spells.
|
|
1566
1645
|
declarations: [resourceCustomViewIdentity(product.viewRef)],
|
|
1567
1646
|
};
|
|
@@ -1574,13 +1653,13 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1574
1653
|
*/
|
|
1575
1654
|
return {
|
|
1576
1655
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1577
|
-
path:
|
|
1656
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),
|
|
1578
1657
|
declarations: [product.viewRef],
|
|
1579
1658
|
};
|
|
1580
1659
|
case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:
|
|
1581
1660
|
return {
|
|
1582
1661
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1583
|
-
path:
|
|
1662
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),
|
|
1584
1663
|
declarations: [product.chartRef],
|
|
1585
1664
|
};
|
|
1586
1665
|
case BuildPlanTaskProductKind.CUSTOM_COMPONENT: {
|
|
@@ -1657,9 +1736,12 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1657
1736
|
* second reason: the WORKER policy beside this one states that the config is in the task's
|
|
1658
1737
|
* scope *"because the worker's declaration lives there … a task that composes the package
|
|
1659
1738
|
* and declares it in one run must reach both"*. Composing WITHOUT declaring leaves a package
|
|
1660
|
-
* nothing runs, so the declaration — not the directory — is what landing means here.
|
|
1661
|
-
*
|
|
1662
|
-
* matches either.
|
|
1739
|
+
* nothing runs, so the declaration — not the directory — is what landing means here. What
|
|
1740
|
+
* the config spells is the package's DIRECTORY name, twice: as the camel key and inside the
|
|
1741
|
+
* kebab `path`, and {@link refSpellings} matches either. The plan's `minion-<slug>` ref is
|
|
1742
|
+
* spelled nowhere in it, so the probe asks for the directory name; asking for the ref made
|
|
1743
|
+
* run 44031607175's agents add the ref to the config as comments and an invented ref map,
|
|
1744
|
+
* for the probe to find.
|
|
1663
1745
|
*
|
|
1664
1746
|
* ## What this gives up, and why that is the lesser loss
|
|
1665
1747
|
*
|
|
@@ -1669,17 +1751,43 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1669
1751
|
* Until then the choice is between a probe that is coarse and one that can never match, and
|
|
1670
1752
|
* a probe that can never match reports finished work as undone forever.
|
|
1671
1753
|
*
|
|
1672
|
-
* NOT applied to `APPLICATION_WORKER` above,
|
|
1673
|
-
* worker
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1754
|
+
* NOT applied to `APPLICATION_WORKER` above, and now measured rather than suspected: the
|
|
1755
|
+
* first journey-built worker (client creation run 44031607175) registers each job as a
|
|
1756
|
+
* route named after its job ref (`router.post('/parse-and-preview', …)` in
|
|
1757
|
+
* `workers/spreadsheet-import/src/index.ts`), so the job refs ARE spelled in its entry. That
|
|
1758
|
+
* task failed to land only because its entry was looked for under the wrong directory.
|
|
1676
1759
|
*/
|
|
1677
1760
|
return {
|
|
1678
1761
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1679
1762
|
path: 'wildo.saas.config.ts',
|
|
1680
|
-
declarations: [product.minionRef],
|
|
1763
|
+
declarations: [integrationMinionDirectoryName(product.minionRef)],
|
|
1681
1764
|
};
|
|
1682
1765
|
case BuildPlanTaskProductKind.PROVIDER_BINDING:
|
|
1766
|
+
/*
|
|
1767
|
+
* A browser binding is contributed either by the service's own `provider-contributions.ts` (a provider the
|
|
1768
|
+
* application authors) or by an installed module's browser facet, whose own `./companion` barrel contributes it
|
|
1769
|
+
* (#4019). Asking only the first pushed an agent binding an installed module to re-project the facet there: on
|
|
1770
|
+
* reference run 44052185141 the PostHog task did, and every env sync refused the second contribution. Only the
|
|
1771
|
+
* application's file is WRITABLE: the facet's barrel is the module's, written by `wildo registry add`.
|
|
1772
|
+
*/
|
|
1773
|
+
if (product.augments === undefined && PROVIDER_BROWSER_SCOPE_SURFACE[product.scope] !== undefined) {
|
|
1774
|
+
const ownFile = PROVIDER_BINDING_DECLARATION_FILE[product.scope];
|
|
1775
|
+
/*
|
|
1776
|
+
* TWO probes, both owed (#4019 review N1). The BINDING: the ref as a key of the service's scope in the application
|
|
1777
|
+
* configuration, which is what discovery and the bootstrap read (#2805) and what an installed module never writes
|
|
1778
|
+
* itself. The CONTRIBUTION for the scope's surface: the application's file, or the installed facet's barrel. The
|
|
1779
|
+
* contribution alone would land on `wildo registry add`, since a facet's barrel always spells its own ref.
|
|
1780
|
+
*/
|
|
1781
|
+
return [
|
|
1782
|
+
{ kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: APPLICATION_SAAS_CONFIG_FILE, declarations: [product.providerRef] },
|
|
1783
|
+
{
|
|
1784
|
+
kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,
|
|
1785
|
+
paths: [ownFile, installedProviderFrontendFacetBarrel(product.providerRef)],
|
|
1786
|
+
writablePaths: [ownFile],
|
|
1787
|
+
declarations: [product.providerRef, PROVIDER_BROWSER_SCOPE_SURFACE[product.scope]],
|
|
1788
|
+
},
|
|
1789
|
+
];
|
|
1790
|
+
}
|
|
1683
1791
|
// An augmentation (#2025) lands on its opt-in, in the application config whatever its scope; see
|
|
1684
1792
|
// `productDeclarationSite` for where in that file.
|
|
1685
1793
|
return {
|
|
@@ -1700,13 +1808,40 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1700
1808
|
declarations: [product.productKey],
|
|
1701
1809
|
};
|
|
1702
1810
|
case BuildPlanTaskProductKind.APPLICATION_ROLE:
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1811
|
+
/*
|
|
1812
|
+
* THREE probes, all owed. The role's `role: 'FIELD_TECHNICIAN'` property in the role table (see
|
|
1813
|
+
* `productDeclarationSite`): the scaffolded table is empty, so the file existing proves nothing. Then its
|
|
1814
|
+
* SPECIFICATION, with the guidance the customer documentation renders for it, and that specification wired into
|
|
1815
|
+
* `roleSpecifications`: the documentation publication refuses an organization role with neither.
|
|
1816
|
+
*
|
|
1817
|
+
* Measured on client creation run 44257782469: the role task asked for the table alone, landed with four roles
|
|
1818
|
+
* and no specification, and the publication step then failed 116 times in two and a half hours on
|
|
1819
|
+
* `organization role 'OFFICE' has no companion-exported role specification`, the last task of 486.
|
|
1820
|
+
*
|
|
1821
|
+
* The guidance is asked as a SET of property names, comments blanked: lexical, so a property set to `null` reads
|
|
1822
|
+
* as present. What it catches is the specification never written or written without the documented fields,
|
|
1823
|
+
* which is what happened; the publication's own refusal stays the exact check. The file and binding names tie
|
|
1824
|
+
* the specification to its role, so the role's own name is not asked again inside it (Wonder Todos writes it
|
|
1825
|
+
* through an enum member whose name differs from the value). An APPLICATION-scoped role owes the guidance too:
|
|
1826
|
+
* the product carries no scope, and the skill asks a specification of every custom role.
|
|
1827
|
+
*/
|
|
1828
|
+
return [
|
|
1829
|
+
{
|
|
1830
|
+
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1831
|
+
path: APPLICATION_ROLES_FILE,
|
|
1832
|
+
declarations: [product.roleRef],
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1836
|
+
path: applicationRoleSpecificationPath(product.roleRef),
|
|
1837
|
+
declarations: [applicationRoleSpecificationExportName(product.roleRef), ...ORGANIZATION_ROLE_DOCUMENTATION_REQUIRED_GUIDANCE],
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1841
|
+
path: APPLICATION_ROLE_SPECIFICATION_WIRING_FILE,
|
|
1842
|
+
declarations: [applicationRoleSpecificationExportName(product.roleRef)],
|
|
1843
|
+
},
|
|
1844
|
+
];
|
|
1710
1845
|
case BuildPlanTaskProductKind.WEBSITE_PAGE: {
|
|
1711
1846
|
// The ROOT CONFIG registers a page by importing its manifest; a page file nothing registers is not a page.
|
|
1712
1847
|
// `websitePageIdentity`, never the raw ref: the plan speaks `page-pricing`, the tree spells it `pricing`.
|
|
@@ -1777,7 +1912,7 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1777
1912
|
return undefined;
|
|
1778
1913
|
return {
|
|
1779
1914
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1780
|
-
path:
|
|
1915
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef),
|
|
1781
1916
|
declarations: gained,
|
|
1782
1917
|
};
|
|
1783
1918
|
}
|
|
@@ -1797,12 +1932,12 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1797
1932
|
*/
|
|
1798
1933
|
return {
|
|
1799
1934
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE,
|
|
1800
|
-
path:
|
|
1935
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),
|
|
1801
1936
|
};
|
|
1802
1937
|
case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:
|
|
1803
1938
|
return {
|
|
1804
1939
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1805
|
-
path:
|
|
1940
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_SPECIFICATION, moduleRefOf(), product.resourceRef),
|
|
1806
1941
|
declarations: product.fieldRefs,
|
|
1807
1942
|
};
|
|
1808
1943
|
case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:
|
|
@@ -1818,13 +1953,13 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1818
1953
|
*/
|
|
1819
1954
|
return {
|
|
1820
1955
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1821
|
-
path:
|
|
1956
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.MODULE_RELATIONSHIPS, moduleRefOf(), moduleRefOf()),
|
|
1822
1957
|
declarations: [product.sourceResourceRef, product.targetResourceRef],
|
|
1823
1958
|
};
|
|
1824
1959
|
case BuildPlanTaskProductKind.RESOURCE_OPERATION:
|
|
1825
1960
|
return {
|
|
1826
1961
|
kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,
|
|
1827
|
-
path:
|
|
1962
|
+
path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef),
|
|
1828
1963
|
declarations: [product.operationRef],
|
|
1829
1964
|
};
|
|
1830
1965
|
case BuildPlanTaskProductKind.APPLICATION_VIEW:
|
|
@@ -1953,7 +2088,7 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1953
2088
|
case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE:
|
|
1954
2089
|
case BuildPlanTaskProductKind.METERED_USAGE_RECORDING:
|
|
1955
2090
|
case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING: {
|
|
1956
|
-
const resourceConfiguration =
|
|
2091
|
+
const resourceConfiguration = conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef);
|
|
1957
2092
|
return {
|
|
1958
2093
|
kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,
|
|
1959
2094
|
product,
|
|
@@ -1997,7 +2132,7 @@ function landedProbeDraft(task, product, moduleRefOf) {
|
|
|
1997
2132
|
* names is declared in the application's configuration. Both are written by the task and both must be committed.
|
|
1998
2133
|
*/
|
|
1999
2134
|
case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING: {
|
|
2000
|
-
const resourceConfiguration =
|
|
2135
|
+
const resourceConfiguration = conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef);
|
|
2001
2136
|
return {
|
|
2002
2137
|
kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,
|
|
2003
2138
|
product,
|
|
@@ -2071,8 +2206,13 @@ const SET_SITE = { relation: ProductDeclarationRelation.SET };
|
|
|
2071
2206
|
const PROVIDER_BINDING_SCOPE_OBJECT_PATH = {
|
|
2072
2207
|
[ProviderBindingScope.BACKEND]: ['scopes', 'backend', 'providers'],
|
|
2073
2208
|
[ProviderBindingScope.COMPANION]: ['scopes', 'companion', 'providers'],
|
|
2074
|
-
|
|
2075
|
-
|
|
2209
|
+
/*
|
|
2210
|
+
* A browser scope's entry is keyed by its SERVICE (#4019): `app` (the skeleton's SAAS_APP service) and `website` (the one
|
|
2211
|
+
* `add-website` declares), under `frontendServices`, which the skeleton writes as the exported
|
|
2212
|
+
* `frontendRelationshipScopes` anchor. Its first segment matches at any depth, so either spelling is read.
|
|
2213
|
+
*/
|
|
2214
|
+
[ProviderBindingScope.FRONTEND_APP]: ['app', 'providers'],
|
|
2215
|
+
[ProviderBindingScope.WEBSITE]: ['website', 'providers'],
|
|
2076
2216
|
};
|
|
2077
2217
|
/**
|
|
2078
2218
|
* The declaration site of every product kind (#1539). TOTAL over the vocabulary: the `never` arm makes
|
|
@@ -2088,7 +2228,7 @@ const PROVIDER_BINDING_SCOPE_OBJECT_PATH = {
|
|
|
2088
2228
|
* `RESOURCE_SPECIFICATION` and `APPLICATION_WORKER` declare several names that are genuinely
|
|
2089
2229
|
* independent — a schema is a set of fields — so the set reading is the true one.
|
|
2090
2230
|
*/
|
|
2091
|
-
export function productDeclarationSite(product) {
|
|
2231
|
+
export function productDeclarationSite(product, probeIndex = 0) {
|
|
2092
2232
|
switch (product.kind) {
|
|
2093
2233
|
case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:
|
|
2094
2234
|
// An edge is ONE `createResourcesRelationship(source, target, …)` call; see `declarationsAppearInOneCall`.
|
|
@@ -2102,15 +2242,18 @@ export function productDeclarationSite(product) {
|
|
|
2102
2242
|
if (product.augments !== undefined) {
|
|
2103
2243
|
return { relation: ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH, objectPath: ['augmentations', product.augments] };
|
|
2104
2244
|
}
|
|
2105
|
-
|
|
2106
|
-
|
|
2245
|
+
// A browser binding's second probe is its contribution, a set over the contribution's file (#4019).
|
|
2246
|
+
if (probeIndex > 0)
|
|
2247
|
+
return SET_SITE;
|
|
2248
|
+
return { relation: ProductDeclarationRelation.KEY_AT_OBJECT_PATH, objectPath: PROVIDER_BINDING_SCOPE_OBJECT_PATH[product.scope] };
|
|
2107
2249
|
}
|
|
2108
2250
|
// A catalogue entry is declared by its `key` property — never by the word appearing anywhere (#1835).
|
|
2109
2251
|
case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:
|
|
2110
2252
|
return { relation: ProductDeclarationRelation.PROPERTY_VALUE, propertyName: 'key' };
|
|
2111
2253
|
// A role is declared by its `role` property in the role table — never by its name appearing in a comment (#2490).
|
|
2112
2254
|
case BuildPlanTaskProductKind.APPLICATION_ROLE:
|
|
2113
|
-
|
|
2255
|
+
// Its specification and the wiring of it (probes 1 and 2) are sets over their own files.
|
|
2256
|
+
return probeIndex > 0 ? SET_SITE : { relation: ProductDeclarationRelation.PROPERTY_VALUE, propertyName: 'role' };
|
|
2114
2257
|
// A section is `defineWebsiteSection({ sectionRef: 'home-hero', … })` appended to its page's list (#2216).
|
|
2115
2258
|
case BuildPlanTaskProductKind.WEBSITE_SECTION:
|
|
2116
2259
|
return { relation: ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST, propertyName: 'sectionRef', listName: websitePageSectionsListName(product.pageRef) };
|
|
@@ -2600,6 +2743,10 @@ export function websitePageSectionsListName(pageRef) {
|
|
|
2600
2743
|
* **This is a normalization, not the right long-term answer.** A custom view is identified by
|
|
2601
2744
|
* `resource × operation`, and the product models it as a single opaque ref — see #1530 and #1539.
|
|
2602
2745
|
* When the product carries the operation, the probe should assert the BINDING rather than the name.
|
|
2746
|
+
*
|
|
2747
|
+
* The match is a PREFIX: `view-follow-ups` is also found in `FollowUpsDueCustomView`, so this task's probe can read a
|
|
2748
|
+
* view landed on a longer sibling's component (pre-existing). The shell witness guards its own use of the rule by taking
|
|
2749
|
+
* the most specific planned view a component realises (#4012).
|
|
2603
2750
|
*/
|
|
2604
2751
|
export function resourceCustomViewIdentity(viewRef) {
|
|
2605
2752
|
return viewRef.replace(/^view-/u, '').replace(/-view$/u, '');
|
|
@@ -2761,12 +2908,33 @@ export function placementSubjectShellIdentity(subject) {
|
|
|
2761
2908
|
}
|
|
2762
2909
|
}
|
|
2763
2910
|
}
|
|
2911
|
+
/**
|
|
2912
|
+
* Does the component a resource operation renders as its `customView` realise this PLANNED view (#4012)?
|
|
2913
|
+
*
|
|
2914
|
+
* The experience plan declares a `RESOURCE_CUSTOM_VIEW` with its resource and no operation, the placement plan names it
|
|
2915
|
+
* as an `APP_VIEW` (`view-enquiry-capture`), and the build realises it as one operation's `customView` (the enquiry's
|
|
2916
|
+
* CREATE renders `EnquiryCaptureCustomView`). No plan says which operation hosts it; the binding does, and the shell
|
|
2917
|
+
* oracle reports it on that operation's launcher. This decides whether the bound component is the planned view.
|
|
2918
|
+
*
|
|
2919
|
+
* By the SAME rule the custom view's own build task lands by ({@link resourceCustomViewIdentity} read with
|
|
2920
|
+
* {@link declarationsAppear}): the ref's words in any spelling, starting the name, followed by nothing or by a capital.
|
|
2921
|
+
* `EnquiryCaptureCustomView`, `EnquiryCaptureView` and `EnquiryCaptureForm` realise `view-enquiry-capture`;
|
|
2922
|
+
* `NewEnquiryCaptureCustomView` and `EnquiryCapturedCustomView` do not. One rule, so a custom view whose task landed is
|
|
2923
|
+
* never a view its placement cannot find.
|
|
2924
|
+
*/
|
|
2925
|
+
export function customViewComponentRealisesPlannedView(componentName, viewRef) {
|
|
2926
|
+
return declarationsAppear(componentName, [resourceCustomViewIdentity(viewRef)]);
|
|
2927
|
+
}
|
|
2764
2928
|
/**
|
|
2765
2929
|
* Every identity a launcher answers to (#3204): {@link launcherShellIdentity}, and for a resource operation also the one
|
|
2766
2930
|
* spelled with the singular of its resource type. A placement plan names a resource as the domain plan does, in the
|
|
2767
2931
|
* singular (`pipeline-stage-setting`), while the shell carries the registered type (`pipelineStageSettings`): on reference
|
|
2768
2932
|
* run 42782969940 the settings hub carried all four planned lists and its probe reported them missing. The singular of a
|
|
2769
2933
|
* word that is not a regular plural is the word itself, so an exact match is unchanged.
|
|
2934
|
+
*
|
|
2935
|
+
* A planned view an operation renders as its custom view is not one of these identities: whether the launcher carries
|
|
2936
|
+
* it depends on the PLANNED view's ref, so the shell witness asks {@link customViewComponentRealisesPlannedView} for the
|
|
2937
|
+
* views the plan placed (#4012).
|
|
2770
2938
|
*/
|
|
2771
2939
|
export function launcherShellIdentities(entry) {
|
|
2772
2940
|
const identity = launcherShellIdentity(entry);
|
|
@@ -2781,8 +2949,16 @@ export function launcherShellIdentity(entry) {
|
|
|
2781
2949
|
if (entry.kind === LauncherItemTargetKind.RESOURCE_OPERATION && entry.resourceType && entry.operation) {
|
|
2782
2950
|
return `resource-operation:${identityPart(entry.resourceType)}:${identityPart(entry.operation)}`;
|
|
2783
2951
|
}
|
|
2784
|
-
|
|
2952
|
+
/*
|
|
2953
|
+
* A RESOURCE-scoped view is a view too (reference run 44052185141). The placement plan names every view as an APP_VIEW
|
|
2954
|
+
* (`view-follow-ups-due`), with no say in whether the build realises it at the application or on a resource, and a coding
|
|
2955
|
+
* agent correctly wires a resource-owned view as a `RESOURCE_VIEW` launcher (`viewRef: 'follow-ups-due'` on the follow-up
|
|
2956
|
+
* resource). With no identity for that kind, the sidebar and command-menu placements, and every follow-up routed to them,
|
|
2957
|
+
* could never land however often they ran: nine tasks, every one carrying the views the plan asked for.
|
|
2958
|
+
*/
|
|
2959
|
+
if ((entry.kind === LauncherItemTargetKind.VIEW || entry.kind === LauncherItemTargetKind.RESOURCE_VIEW) && entry.viewRef) {
|
|
2785
2960
|
return `view:${placementViewIdentity(entry.viewRef)}`;
|
|
2961
|
+
}
|
|
2786
2962
|
if (entry.kind === LauncherItemTargetKind.SETTINGS_SECTION && entry.sectionRef) {
|
|
2787
2963
|
return `settings-destination:${identityPart(entry.sectionRef)}`;
|
|
2788
2964
|
}
|