@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
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
* an engine destination's operation as well would make a subject the plan never considered look
|
|
67
67
|
* carried.
|
|
68
68
|
*
|
|
69
|
+
* A resource-operation entry also names the custom view the operation it opens renders, when it binds one (#4012):
|
|
70
|
+
* a planned resource custom view is reached only through that launcher, and which operation hosts it is said by the
|
|
71
|
+
* ui-behavior binding and by no plan.
|
|
72
|
+
*
|
|
69
73
|
* Composes the engine's own merge (`buildFrontendModuleRegistry`) rather than re-deriving it:
|
|
70
74
|
* the merge order, the `ref` collision rule and the launcher-identity dedupe are the runtime's,
|
|
71
75
|
* and a second copy here would drift from the thing it claims to describe.
|
|
@@ -73,6 +77,66 @@
|
|
|
73
77
|
import { PlacementSurface } from '@wildo-ai/saas-specifications/application-creation';
|
|
74
78
|
import { buildFrontendModuleRegistry, resolveSettingsDestinationCatalog, resolveSettingsHubConfig, } from '@wildo-ai/saas-frontend-lib';
|
|
75
79
|
import { ApplicationLevelComponentType, LauncherItemTargetKind, SettingsSectionTargetKind, } from '@wildo-ai/saas-frontend-lib/companion';
|
|
80
|
+
/**
|
|
81
|
+
* The name a React component is known by in the source: a function's own name (a `const X = () => …` is named `X`),
|
|
82
|
+
* else its `displayName`; a `memo` / `forwardRef` wrapper is named by what it wraps, or by its own `displayName`. A
|
|
83
|
+
* `lazy` component, and a `memo(() => …)` around an anonymous arrow with no `displayName`, have no readable name and
|
|
84
|
+
* answer `undefined`: the binding is then not reported, so the view reads missing rather than misattributed.
|
|
85
|
+
*/
|
|
86
|
+
function componentName(component) {
|
|
87
|
+
if (typeof component === 'function') {
|
|
88
|
+
const own = component.name;
|
|
89
|
+
if (typeof own === 'string' && own.length > 0)
|
|
90
|
+
return own;
|
|
91
|
+
const display = component.displayName;
|
|
92
|
+
return typeof display === 'string' && display.length > 0 ? display : undefined;
|
|
93
|
+
}
|
|
94
|
+
if (!isRecord(component))
|
|
95
|
+
return undefined;
|
|
96
|
+
const wrapped = componentName(component.type) ?? componentName(component.render);
|
|
97
|
+
if (wrapped !== undefined)
|
|
98
|
+
return wrapped;
|
|
99
|
+
return typeof component.displayName === 'string' && component.displayName.length > 0 ? component.displayName : undefined;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The resolver over the merged ui-behavior registry (#4012): which component the operation a launcher OPENS binds as its
|
|
103
|
+
* `customView`.
|
|
104
|
+
*
|
|
105
|
+
* Matched as the engine binds a ui-behavior `views` key to an operation (`findOperationByPresetKey`): a plain key
|
|
106
|
+
* (`'create'`) is the operation's DEFAULT variant, which is what a launcher naming no `operationVariant` opens; a tuple
|
|
107
|
+
* key (`['create', 'quick']`) is that variant, opened only by a launcher naming it. Three bindings the runtime does
|
|
108
|
+
* resolve are not matched, because telling them apart needs the backend's operation list, which this oracle does not
|
|
109
|
+
* read: a tuple keyed on the variant that happens to be the default, opened by a launcher naming none; a plain key,
|
|
110
|
+
* opened by a launcher that names the default variant explicitly; and a tuple on an operation whose only variant is
|
|
111
|
+
* not the default, opened by a launcher naming none. Each stays unreported (the view reads missing, never
|
|
112
|
+
* misattributed), and the plain key with an unnamed variant is what a coding agent writes.
|
|
113
|
+
*/
|
|
114
|
+
function hostedCustomViewResolver(resourceUIBehavior) {
|
|
115
|
+
return (entry) => {
|
|
116
|
+
if (entry.kind !== LauncherItemTargetKind.RESOURCE_OPERATION)
|
|
117
|
+
return undefined;
|
|
118
|
+
const { resourceType, operation } = entry;
|
|
119
|
+
if (typeof resourceType !== 'string' || typeof operation !== 'string')
|
|
120
|
+
return undefined;
|
|
121
|
+
const variant = typeof entry.operationVariant === 'string' ? entry.operationVariant : undefined;
|
|
122
|
+
const behavior = Object.prototype.hasOwnProperty.call(resourceUIBehavior, resourceType) ? resourceUIBehavior[resourceType] : undefined;
|
|
123
|
+
if (!isRecord(behavior))
|
|
124
|
+
return undefined;
|
|
125
|
+
// `resourceUIBehavior()` stores `views` as a Map; a hand-built preset may still carry the authored array of tuples.
|
|
126
|
+
const views = behavior.views instanceof Map ? [...behavior.views.entries()] : Array.isArray(behavior.views) ? behavior.views : [];
|
|
127
|
+
for (const view of views) {
|
|
128
|
+
if (!Array.isArray(view) || view.length < 2 || !isRecord(view[1]))
|
|
129
|
+
continue;
|
|
130
|
+
const key = view[0];
|
|
131
|
+
const opens = Array.isArray(key)
|
|
132
|
+
? variant !== undefined && key[0] === operation && key[1] === variant
|
|
133
|
+
: variant === undefined && key === operation;
|
|
134
|
+
if (opens)
|
|
135
|
+
return componentName(view[1].customView);
|
|
136
|
+
}
|
|
137
|
+
return undefined;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
76
140
|
/** The roles in `runtimeAvailability.requiredRoles` of a declaration, or `undefined` when it names none. */
|
|
77
141
|
function declaredAudience(entry) {
|
|
78
142
|
const availability = entry.runtimeAvailability;
|
|
@@ -101,11 +165,12 @@ function surfaceConfiguration(appShellConfig, key) {
|
|
|
101
165
|
* invisible to the probe. (A nested row is also hidden with its parent row; that layer is not reported, since a placement
|
|
102
166
|
* plan places no nested row.)
|
|
103
167
|
*/
|
|
104
|
-
function launcherEntries(value, sectionAudience, inSection = false) {
|
|
168
|
+
function launcherEntries(value, hostedCustomViewFor, sectionAudience, inSection = false) {
|
|
105
169
|
if (!Array.isArray(value))
|
|
106
170
|
return [];
|
|
107
171
|
return value.filter(isRecord).flatMap((entry) => {
|
|
108
172
|
const own = declaredAudience(entry);
|
|
173
|
+
const hostedCustomView = hostedCustomViewFor(entry);
|
|
109
174
|
const self = {
|
|
110
175
|
kind: String(entry.kind ?? ''),
|
|
111
176
|
...(typeof entry.resourceType === 'string' ? { resourceType: entry.resourceType } : {}),
|
|
@@ -114,8 +179,9 @@ function launcherEntries(value, sectionAudience, inSection = false) {
|
|
|
114
179
|
...(typeof entry.sectionRef === 'string' ? { sectionRef: entry.sectionRef } : {}),
|
|
115
180
|
...(own === undefined ? {} : { requiredRoles: own }),
|
|
116
181
|
...(sectionAudience === undefined ? {} : { sectionRequiredRoles: sectionAudience }),
|
|
182
|
+
...(hostedCustomView === undefined ? {} : { hostedCustomView }),
|
|
117
183
|
};
|
|
118
|
-
return inSection ? [self, ...launcherEntries(entry.children, sectionAudience, true)] : [self];
|
|
184
|
+
return inSection ? [self, ...launcherEntries(entry.children, hostedCustomViewFor, sectionAudience, true)] : [self];
|
|
119
185
|
});
|
|
120
186
|
}
|
|
121
187
|
/**
|
|
@@ -125,10 +191,10 @@ function launcherEntries(value, sectionAudience, inSection = false) {
|
|
|
125
191
|
* a comment naming the task that fills it. Counting sections would score that declaration as the
|
|
126
192
|
* placement it is waiting for.
|
|
127
193
|
*/
|
|
128
|
-
function sidebarChildren(sections) {
|
|
194
|
+
function sidebarChildren(sections, hostedCustomViewFor) {
|
|
129
195
|
if (!Array.isArray(sections))
|
|
130
196
|
return [];
|
|
131
|
-
return sections.flatMap((section) => (isRecord(section) ? launcherEntries(section.children, declaredAudience(section), true) : []));
|
|
197
|
+
return sections.flatMap((section) => (isRecord(section) ? launcherEntries(section.children, hostedCustomViewFor, declaredAudience(section), true) : []));
|
|
132
198
|
}
|
|
133
199
|
/**
|
|
134
200
|
* The quick-action button's actions, when the SIDEBAR hosts that button.
|
|
@@ -140,27 +206,38 @@ function sidebarChildren(sections) {
|
|
|
140
206
|
* shows it. Any breakpoint counts: hosting it is the placement, and responsive visibility is a separate
|
|
141
207
|
* decision the same config states.
|
|
142
208
|
*/
|
|
143
|
-
function sidebarHostedQuickActions(sidebarConfig, appShellConfig) {
|
|
209
|
+
function sidebarHostedQuickActions(sidebarConfig, appShellConfig, hostedCustomViewFor) {
|
|
144
210
|
const hosted = sidebarConfig?.hostedComponents;
|
|
145
211
|
if (!Array.isArray(hosted))
|
|
146
212
|
return [];
|
|
147
213
|
const hostsQuickActions = hosted.some((entry) => isRecord(entry) && entry.componentType === ApplicationLevelComponentType.QUICK_ACTION_BUTTON);
|
|
148
214
|
if (!hostsQuickActions)
|
|
149
215
|
return [];
|
|
150
|
-
return launcherEntries(surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.QUICK_ACTION_BUTTON).config?.actions);
|
|
216
|
+
return launcherEntries(surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.QUICK_ACTION_BUTTON).config?.actions, hostedCustomViewFor);
|
|
151
217
|
}
|
|
152
218
|
function stringArray(value) {
|
|
153
219
|
return Array.isArray(value) ? value.filter((entry) => typeof entry === 'string') : [];
|
|
154
220
|
}
|
|
155
221
|
/** The settings entries that are an application's resource-operation destination, as launchers. */
|
|
156
|
-
function applicationDestinationOperations(refs, catalog) {
|
|
222
|
+
function applicationDestinationOperations(refs, catalog, hostedCustomViewFor) {
|
|
157
223
|
return refs.flatMap((ref) => {
|
|
158
224
|
if (!catalog.applicationDestinationRefs.has(ref))
|
|
159
225
|
return [];
|
|
160
226
|
const target = catalog.byRef.get(ref)?.target;
|
|
161
227
|
if (target?.kind !== SettingsSectionTargetKind.RESOURCE_OPERATION)
|
|
162
228
|
return [];
|
|
163
|
-
|
|
229
|
+
const hostedCustomView = hostedCustomViewFor({
|
|
230
|
+
kind: LauncherItemTargetKind.RESOURCE_OPERATION,
|
|
231
|
+
resourceType: target.resourceType,
|
|
232
|
+
operation: target.operation,
|
|
233
|
+
...(target.operationVariant === undefined ? {} : { operationVariant: target.operationVariant }),
|
|
234
|
+
});
|
|
235
|
+
return [{
|
|
236
|
+
kind: LauncherItemTargetKind.RESOURCE_OPERATION,
|
|
237
|
+
resourceType: target.resourceType,
|
|
238
|
+
operation: target.operation,
|
|
239
|
+
...(hostedCustomView === undefined ? {} : { hostedCustomView }),
|
|
240
|
+
}];
|
|
164
241
|
});
|
|
165
242
|
}
|
|
166
243
|
export async function runAppShellPlacementContent(frontendCompanionExports) {
|
|
@@ -168,19 +245,24 @@ export async function runAppShellPlacementContent(frontendCompanionExports) {
|
|
|
168
245
|
const loadFrontendModules = frontendCompanionExports.loadFrontendModules;
|
|
169
246
|
const modules = loadFrontendModules ? await loadFrontendModules() : [];
|
|
170
247
|
const moduleRegistry = buildFrontendModuleRegistry(...modules);
|
|
248
|
+
// Which custom view each launched operation renders, from the merged bindings (#4012).
|
|
249
|
+
const hostedCustomViewFor = hostedCustomViewResolver(moduleRegistry.resourceUIBehavior);
|
|
171
250
|
const sidebar = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.SIDEBAR);
|
|
172
251
|
const commandMenu = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.COMMAND_MENU);
|
|
173
252
|
// `PlacementSurface.USER_MENU` is the placement plan's name for the user dropdown; the shell
|
|
174
253
|
// vocabulary calls the same surface `USER_DROPDOWN`. Mapped here, once, rather than at callers.
|
|
175
254
|
const userMenu = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.USER_DROPDOWN);
|
|
176
|
-
const sidebarFromApp = [
|
|
177
|
-
|
|
255
|
+
const sidebarFromApp = [
|
|
256
|
+
...sidebarChildren(sidebar.config?.contentSections, hostedCustomViewFor),
|
|
257
|
+
...sidebarHostedQuickActions(sidebar.config, appShellConfig, hostedCustomViewFor),
|
|
258
|
+
];
|
|
259
|
+
const sidebarFromModules = sidebarChildren(moduleRegistry.sidebarSections, hostedCustomViewFor);
|
|
178
260
|
// The palette's placed entries are its static commands — the application's own `commands` and
|
|
179
261
|
// every module's contribution. `searchResources` is the OMNIBOX's live record search, a different
|
|
180
262
|
// affordance on the same surface: counted in the summary, never an identity, because no placement
|
|
181
263
|
// decision addresses it.
|
|
182
|
-
const commandsFromApp = launcherEntries(commandMenu.config?.commands);
|
|
183
|
-
const commandsFromModules = launcherEntries(moduleRegistry.commandMenuItems);
|
|
264
|
+
const commandsFromApp = launcherEntries(commandMenu.config?.commands, hostedCustomViewFor);
|
|
265
|
+
const commandsFromModules = launcherEntries(moduleRegistry.commandMenuItems, hostedCustomViewFor);
|
|
184
266
|
const searchResourceCount = Array.isArray(commandMenu.config?.searchResources) ? commandMenu.config.searchResources.length : 0;
|
|
185
267
|
// The dropdown's placements are the settings-hub sections surfaced inline — `settingsEntries`.
|
|
186
268
|
// `sections` is the engine's vocabulary of built-in blocks (profile, organization, logout), present
|
|
@@ -204,7 +286,7 @@ export async function runAppShellPlacementContent(frontendCompanionExports) {
|
|
|
204
286
|
contributedBy: { app: sidebarFromApp.length, modules: sidebarFromModules.length },
|
|
205
287
|
launchers: [...sidebarFromApp, ...sidebarFromModules],
|
|
206
288
|
destinationRefs: [],
|
|
207
|
-
contributingModuleIds: modulesContributing((module) => module.sidebarSections, sidebarChildren),
|
|
289
|
+
contributingModuleIds: modulesContributing((module) => module.sidebarSections, (value) => sidebarChildren(value, hostedCustomViewFor)),
|
|
208
290
|
},
|
|
209
291
|
{
|
|
210
292
|
surface: PlacementSurface.USER_MENU,
|
|
@@ -212,7 +294,7 @@ export async function runAppShellPlacementContent(frontendCompanionExports) {
|
|
|
212
294
|
entryCount: userMenuEntries.length,
|
|
213
295
|
composed: userMenuEntries.length > 0,
|
|
214
296
|
contributedBy: { app: userMenuEntries.length, modules: 0 },
|
|
215
|
-
launchers: applicationDestinationOperations(userMenuEntries, destinationCatalog),
|
|
297
|
+
launchers: applicationDestinationOperations(userMenuEntries, destinationCatalog, hostedCustomViewFor),
|
|
216
298
|
destinationRefs: userMenuEntries,
|
|
217
299
|
contributingModuleIds: [],
|
|
218
300
|
},
|
|
@@ -224,7 +306,7 @@ export async function runAppShellPlacementContent(frontendCompanionExports) {
|
|
|
224
306
|
contributedBy: { app: commandsFromApp.length + searchResourceCount, modules: commandsFromModules.length },
|
|
225
307
|
launchers: [...commandsFromApp, ...commandsFromModules],
|
|
226
308
|
destinationRefs: [],
|
|
227
|
-
contributingModuleIds: modulesContributing((module) => module.commandMenuItems, launcherEntries),
|
|
309
|
+
contributingModuleIds: modulesContributing((module) => module.commandMenuItems, (value) => launcherEntries(value, hostedCustomViewFor)),
|
|
228
310
|
},
|
|
229
311
|
{
|
|
230
312
|
surface: PlacementSurface.SETTINGS_HUB,
|
|
@@ -232,7 +314,7 @@ export async function runAppShellPlacementContent(frontendCompanionExports) {
|
|
|
232
314
|
entryCount: railDestinationRefs.length,
|
|
233
315
|
composed: railDestinationRefs.length > 0,
|
|
234
316
|
contributedBy: { app: railDestinationRefs.length, modules: 0 },
|
|
235
|
-
launchers: applicationDestinationOperations(railDestinationRefs, destinationCatalog),
|
|
317
|
+
launchers: applicationDestinationOperations(railDestinationRefs, destinationCatalog, hostedCustomViewFor),
|
|
236
318
|
destinationRefs: railDestinationRefs,
|
|
237
319
|
contributingModuleIds: [],
|
|
238
320
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell-placement-content.behavior.js","sourceRoot":"","sources":["../../../../../src/core/introspection/subprocess/app-shell-placement-content.behavior.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuE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* Subprocess behavior: what the application's shell actually COMPOSES, per surface.\n *\n * ## Why this exists — no text probe can witness a shell placement\n *\n * A `SHELL_PLACEMENT` build task declares its product as `declarationRefs` drawn from the\n * PLACEMENT PLAN's vocabulary (`sidebar-capture-actions-placement`,\n * `command-menu-library-placement`, …). Those refs are addresses in the plan; nothing in the\n * authored tree is obliged to spell them, and nothing does — a sidebar section carries an\n * engine-conventional `ref: 'main'`, a command-menu entry carries a resource type and an\n * operation. So a probe looking for the plan's refs in the tree can only ever answer \"no\",\n * however completely the task did its work.\n *\n * The obvious repair — look for the SYMBOLS instead — fails for a second, independent reason:\n * `wildo init` scaffolds `app-shell.config.ts` with every `ApplicationLevelComponentType` key\n * already present, hosting the same components a built application hosts. A freshly initialised\n * application and a finished one differ in the CONTENT of those structures and never in which\n * symbols appear, so a symbol sweep answers the same for both.\n *\n * What this behavior answers is how much each surface carries, in the RESOLVED configuration — a\n * question only this subprocess can answer, which is why it is a behavior and not a check.\n *\n * ## What it CANNOT answer, measured against the real scaffold (2026-09-23)\n *\n * **A count does not separate scaffold defaults from application work.** The skeleton's engine module\n * contributes a billing command and its settings rail ships the full engine catalog — so a freshly\n * initialised application already reports COMMAND_MENU and SETTINGS_HUB as composed. (Until #2331,\n * 2026-10-03, the skeleton's sidebar also shipped a `settings` section holding the settings launcher,\n * so SIDEBAR read composed too; Settings is now reached from the user menu and the scaffold's sidebar\n * carries nothing.) The first version of this behavior claimed otherwise, from a pin whose\n * \"scaffold\" fixture was written by hand rather than read from `templates/saas/skeleton`, and that\n * claim was reported as a finding before it was caught. Treat `composed` as \"carries something\", never\n * as \"the application placed something\". Deciding the latter needs each entry's IDENTITY compared with\n * what the placement plan asked for (#1538).\n *\n * ## It reports; it does not judge\n *\n * An application composes AT LEAST ONE shell surface and deliberately not all of them — which\n * ones is a product decision rather than a requirement to satisfy. So this returns one row per\n * surface and no verdict. A caller asserting \"at least one composed\" and a caller asserting\n * \"this task's surface is composed\" both read the same rows; a behavior that returned a single\n * boolean would have had to pick one of those questions and would be wrong for the other.\n *\n * The same reasoning applies one level down. A module contributing NOTHING is an answer, not an\n * omission: in the application this was written against, two of three modules contribute no\n * sidebar section on purpose, because every one of their resources' placements was declined or\n * routed to the settings hub, and because module sections merge by `ref` with the last writer\n * winning — so a second `isPrimary` claim on `main` would have silently overwritten the module\n * that legitimately owns the primary workspace. A per-module reading would have scored both as\n * incomplete. The surface is the honest unit.\n *\n * ## All four placement surfaces, by IDENTITY\n *\n * Each row carries the surface's entries as the engine addresses them — launcher refs for the\n * sidebar and the command palette, settings destination refs for the user menu and the settings\n * rail — because a count cannot tell a scaffold default from an application's placement and an\n * identity can: the landing probe compares these with the subjects the placement plan decided\n * (#1538). The settings rail is read RESOLVED, so a destination the catalog does not ship (which\n * renders nothing) is not reported as carried. `settings-placement-content` still answers the\n * separate question of whether the authored rail is VALID.\n *\n * One settings entry has TWO identities: an APPLICATION destination whose target is a resource\n * operation is how a resource operation reaches the rail or the dropdown, and the placement plan\n * names it as that operation, not by the destination ref the application chose. So such an entry is\n * reported as a launcher too. Engine destinations are not: the plan names them by ref, and reporting\n * an engine destination's operation as well would make a subject the plan never considered look\n * carried.\n *\n * Composes the engine's own merge (`buildFrontendModuleRegistry`) rather than re-deriving it:\n * the merge order, the `ref` collision rule and the launcher-identity dedupe are the runtime's,\n * and a second copy here would drift from the thing it claims to describe.\n */\n\nimport { PlacementSurface } from '@wildo-ai/saas-specifications/application-creation';\nimport {\n buildFrontendModuleRegistry,\n resolveSettingsDestinationCatalog,\n resolveSettingsHubConfig,\n type SettingsHubConfig,\n} from '@wildo-ai/saas-frontend-lib';\nimport {\n ApplicationLevelComponentType,\n LauncherItemTargetKind,\n SettingsSectionTargetKind,\n type FrontendCompanionExports,\n type FrontendModule,\n} from '@wildo-ai/saas-frontend-lib/companion';\n\n/** A launcher entry exactly as the engine types it — kind plus the fields that address its target. */\nexport interface AppShellLauncherEntry {\n readonly kind: string;\n readonly resourceType?: string;\n readonly operation?: string;\n readonly viewRef?: string;\n readonly sectionRef?: string;\n /**\n * The entry's OWN `runtimeAvailability.requiredRoles`, absent when it names none. Reported per layer, never combined\n * with the section's: the browser expands core roles through their inheritance, so a plain intersection of the two\n * lists says nothing true about who sees the row (an `ORG_MEMBER` section with an `ORG_ADMIN` row intersects to\n * nothing, and admins see it).\n */\n readonly requiredRoles?: readonly string[];\n /** The `requiredRoles` of the sidebar SECTION the entry sits in; absent elsewhere and when the section names none. */\n readonly sectionRequiredRoles?: readonly string[];\n}\n\n/** The roles in `runtimeAvailability.requiredRoles` of a declaration, or `undefined` when it names none. */\nfunction declaredAudience(entry: Record<string, unknown>): readonly string[] | undefined {\n const availability = entry.runtimeAvailability;\n if (!isRecord(availability) || !Array.isArray(availability.requiredRoles)) return undefined;\n const roles = availability.requiredRoles.filter((role): role is string => typeof role === 'string' && role.length > 0);\n return roles.length > 0 ? roles : undefined;\n}\n\n\n\nexport interface AppShellSurfaceComposition {\n surface: PlacementSurface;\n /**\n * Is the surface switched on at all? `false` means the application declared it off, which is a\n * decision — a caller must not read it as \"not yet authored\". The settings rail has no switch.\n */\n enabled: boolean;\n /** How many entries the resolved surface carries — a SUMMARY; see the file JSDoc for what it cannot say. */\n entryCount: number;\n /** `entryCount > 0` — the surface carries something (scaffold defaults included). */\n composed: boolean;\n /** Where the entries came from, so a caller can tell an app-level authoring from a module one. */\n contributedBy: { app: number; modules: number };\n /**\n * The sidebar's and the palette's entries, by identity. On the user menu and the settings rail, the\n * entries that resolve to an application destination rendering a resource operation.\n */\n launchers: AppShellLauncherEntry[];\n /** The user menu's inline entries and the settings rail's sections, by destination ref. */\n destinationRefs: string[];\n /**\n * The modules whose OWN contribution adds entries here. A landing must see their files committed\n * as well as the application's config, or it would read a composition HEAD does not hold.\n */\n contributingModuleIds: string[];\n}\n\nexport interface AppShellPlacementContentResult {\n surfaces: AppShellSurfaceComposition[];\n /** The surfaces that carry something — the set Paul's \"at least one, not all\" rule is about. */\n composedSurfaces: PlacementSurface[];\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/** A surface key is `false` (off), `true` (on, engine defaults) or a configuration object. */\nfunction surfaceConfiguration(\n appShellConfig: unknown,\n key: ApplicationLevelComponentType,\n): { enabled: boolean; config: Record<string, unknown> | null } {\n if (!isRecord(appShellConfig)) return { enabled: false, config: null };\n const value = appShellConfig[key];\n if (value === undefined || value === false) return { enabled: false, config: null };\n if (isRecord(value)) return { enabled: true, config: value };\n return { enabled: true, config: null };\n}\n\n/**\n * The entries of a launcher list. With `sectionAudience`, the list is a sidebar section's rows: each carries the\n * section's audience beside its own, and NESTED rows are reported too, so a placement sitting one level down is not\n * invisible to the probe. (A nested row is also hidden with its parent row; that layer is not reported, since a placement\n * plan places no nested row.)\n */\nfunction launcherEntries(value: unknown, sectionAudience?: readonly string[], inSection = false): AppShellLauncherEntry[] {\n if (!Array.isArray(value)) return [];\n return value.filter(isRecord).flatMap((entry) => {\n const own = declaredAudience(entry);\n const self: AppShellLauncherEntry = {\n kind: String(entry.kind ?? ''),\n ...(typeof entry.resourceType === 'string' ? { resourceType: entry.resourceType } : {}),\n ...(typeof entry.operation === 'string' ? { operation: entry.operation } : {}),\n ...(typeof entry.viewRef === 'string' ? { viewRef: entry.viewRef } : {}),\n ...(typeof entry.sectionRef === 'string' ? { sectionRef: entry.sectionRef } : {}),\n ...(own === undefined ? {} : { requiredRoles: own }),\n ...(sectionAudience === undefined ? {} : { sectionRequiredRoles: sectionAudience }),\n };\n return inSection ? [self, ...launcherEntries(entry.children, sectionAudience, true)] : [self];\n });\n}\n\n/**\n * A sidebar's placed ROWS are the CHILDREN of its sections, never the sections themselves.\n * A module declares the section so a later placement task has somewhere to append to — the\n * application this was written against does exactly that, with an explicitly empty `children` and\n * a comment naming the task that fills it. Counting sections would score that declaration as the\n * placement it is waiting for.\n */\nfunction sidebarChildren(sections: unknown): AppShellLauncherEntry[] {\n if (!Array.isArray(sections)) return [];\n return sections.flatMap((section) => (isRecord(section) ? launcherEntries(section.children, declaredAudience(section), true) : []));\n}\n\n/**\n * The quick-action button's actions, when the SIDEBAR hosts that button.\n *\n * A sidebar carries entries two ways: as rows of its navigation sections, and as chrome hosted at its\n * top or bottom. A placement plan can ask for an action that is deliberately NOT a destination — a\n * persistent \"add\" in the rail — and the faithful realisation is the quick-action button hosted there,\n * not a row among the rows. Reading only the rows would report that placement as missing when the rail\n * shows it. Any breakpoint counts: hosting it is the placement, and responsive visibility is a separate\n * decision the same config states.\n */\nfunction sidebarHostedQuickActions(sidebarConfig: Record<string, unknown> | null, appShellConfig: unknown): AppShellLauncherEntry[] {\n const hosted = sidebarConfig?.hostedComponents;\n if (!Array.isArray(hosted)) return [];\n const hostsQuickActions = hosted.some((entry) => isRecord(entry) && entry.componentType === ApplicationLevelComponentType.QUICK_ACTION_BUTTON);\n if (!hostsQuickActions) return [];\n return launcherEntries(surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.QUICK_ACTION_BUTTON).config?.actions);\n}\n\nfunction stringArray(value: unknown): string[] {\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === 'string') : [];\n}\n\n/** The settings entries that are an application's resource-operation destination, as launchers. */\nfunction applicationDestinationOperations(\n refs: readonly string[],\n catalog: ReturnType<typeof resolveSettingsDestinationCatalog>,\n): AppShellLauncherEntry[] {\n return refs.flatMap((ref) => {\n if (!catalog.applicationDestinationRefs.has(ref)) return [];\n const target = catalog.byRef.get(ref)?.target;\n if (target?.kind !== SettingsSectionTargetKind.RESOURCE_OPERATION) return [];\n return [{ kind: LauncherItemTargetKind.RESOURCE_OPERATION, resourceType: target.resourceType, operation: target.operation }];\n });\n}\n\nexport async function runAppShellPlacementContent(\n frontendCompanionExports: FrontendCompanionExports,\n): Promise<AppShellPlacementContentResult> {\n const appShellConfig = frontendCompanionExports.appShellConfig as unknown;\n\n const loadFrontendModules = frontendCompanionExports.loadFrontendModules;\n const modules: FrontendModule[] = loadFrontendModules ? await loadFrontendModules() : [];\n const moduleRegistry = buildFrontendModuleRegistry(...modules);\n\n const sidebar = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.SIDEBAR);\n const commandMenu = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.COMMAND_MENU);\n // `PlacementSurface.USER_MENU` is the placement plan's name for the user dropdown; the shell\n // vocabulary calls the same surface `USER_DROPDOWN`. Mapped here, once, rather than at callers.\n const userMenu = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.USER_DROPDOWN);\n\n const sidebarFromApp = [...sidebarChildren(sidebar.config?.contentSections), ...sidebarHostedQuickActions(sidebar.config, appShellConfig)];\n const sidebarFromModules = sidebarChildren(moduleRegistry.sidebarSections);\n\n // The palette's placed entries are its static commands — the application's own `commands` and\n // every module's contribution. `searchResources` is the OMNIBOX's live record search, a different\n // affordance on the same surface: counted in the summary, never an identity, because no placement\n // decision addresses it.\n const commandsFromApp = launcherEntries(commandMenu.config?.commands);\n const commandsFromModules = launcherEntries(moduleRegistry.commandMenuItems);\n const searchResourceCount = Array.isArray(commandMenu.config?.searchResources) ? (commandMenu.config!.searchResources as unknown[]).length : 0;\n\n // The dropdown's placements are the settings-hub sections surfaced inline — `settingsEntries`.\n // `sections` is the engine's vocabulary of built-in blocks (profile, organization, logout), present\n // on every application; counting it would make this surface composed for a scaffold.\n // (The first version read a field named `settingsSectionRefs`, which does not exist, so this\n // surface always read 0 whatever the application placed.)\n const userMenuEntries = stringArray(userMenu.config?.settingsEntries);\n\n // The settings rail, RESOLVED: a destination the catalog does not ship renders nothing, so it is\n // not something the rail carries.\n const settingsHubConfig = frontendCompanionExports.settingsHubConfig as SettingsHubConfig | undefined;\n const railSections = resolveSettingsHubConfig(settingsHubConfig).sections;\n const railDestinationRefs = railSections.map((section) => section.ref);\n const destinationCatalog = resolveSettingsDestinationCatalog(settingsHubConfig);\n\n const modulesContributing = (pick: (module: FrontendModule) => unknown, read: (value: unknown) => unknown[]) =>\n modules.filter((module) => read(pick(module)).length > 0).map((module) => module.moduleId);\n\n const surfaces: AppShellSurfaceComposition[] = [\n {\n surface: PlacementSurface.SIDEBAR,\n enabled: sidebar.enabled,\n entryCount: sidebarFromApp.length + sidebarFromModules.length,\n composed: sidebarFromApp.length + sidebarFromModules.length > 0,\n contributedBy: { app: sidebarFromApp.length, modules: sidebarFromModules.length },\n launchers: [...sidebarFromApp, ...sidebarFromModules],\n destinationRefs: [],\n contributingModuleIds: modulesContributing((module) => module.sidebarSections, sidebarChildren),\n },\n {\n surface: PlacementSurface.USER_MENU,\n enabled: userMenu.enabled,\n entryCount: userMenuEntries.length,\n composed: userMenuEntries.length > 0,\n contributedBy: { app: userMenuEntries.length, modules: 0 },\n launchers: applicationDestinationOperations(userMenuEntries, destinationCatalog),\n destinationRefs: userMenuEntries,\n contributingModuleIds: [],\n },\n {\n surface: PlacementSurface.COMMAND_MENU,\n enabled: commandMenu.enabled,\n entryCount: commandsFromApp.length + commandsFromModules.length + searchResourceCount,\n composed: commandsFromApp.length + commandsFromModules.length + searchResourceCount > 0,\n contributedBy: { app: commandsFromApp.length + searchResourceCount, modules: commandsFromModules.length },\n launchers: [...commandsFromApp, ...commandsFromModules],\n destinationRefs: [],\n contributingModuleIds: modulesContributing((module) => module.commandMenuItems, launcherEntries),\n },\n {\n surface: PlacementSurface.SETTINGS_HUB,\n enabled: true,\n entryCount: railDestinationRefs.length,\n composed: railDestinationRefs.length > 0,\n contributedBy: { app: railDestinationRefs.length, modules: 0 },\n launchers: applicationDestinationOperations(railDestinationRefs, destinationCatalog),\n destinationRefs: railDestinationRefs,\n contributingModuleIds: [],\n },\n ];\n\n return {\n surfaces,\n composedSurfaces: surfaces.filter(({ composed }) => composed).map(({ surface }) => surface),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"app-shell-placement-content.behavior.js","sourceRoot":"","sources":["../../../../../src/core/introspection/subprocess/app-shell-placement-content.behavior.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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YACrF,QAAQ,EAAE,eAAe,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,GAAG,mBAAmB,GAAG,CAAC;YACvF,aAAa,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,MAAM,GAAG,mBAAmB,EAAE,OAAO,EAAE,mBAAmB,CAAC,MAAM,EAAE;YACzG,SAAS,EAAE,CAAC,GAAG,eAAe,EAAE,GAAG,mBAAmB,CAAC;YACvD,eAAe,EAAE,EAAE;YACnB,qBAAqB,EAAE,mBAAmB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;SACxI;QACD;YACE,OAAO,EAAE,gBAAgB,CAAC,YAAY;YACtC,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,mBAAmB,CAAC,MAAM;YACtC,QAAQ,EAAE,mBAAmB,CAAC,MAAM,GAAG,CAAC;YACxC,aAAa,EAAE,EAAE,GAAG,EAAE,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE;YAC9D,SAAS,EAAE,gCAAgC,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;YACzG,eAAe,EAAE,mBAAmB;YACpC,qBAAqB,EAAE,EAAE;SAC1B;KACF,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC;KAC5F,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Subprocess behavior: what the application's shell actually COMPOSES, per surface.\n *\n * ## Why this exists — no text probe can witness a shell placement\n *\n * A `SHELL_PLACEMENT` build task declares its product as `declarationRefs` drawn from the\n * PLACEMENT PLAN's vocabulary (`sidebar-capture-actions-placement`,\n * `command-menu-library-placement`, …). Those refs are addresses in the plan; nothing in the\n * authored tree is obliged to spell them, and nothing does — a sidebar section carries an\n * engine-conventional `ref: 'main'`, a command-menu entry carries a resource type and an\n * operation. So a probe looking for the plan's refs in the tree can only ever answer \"no\",\n * however completely the task did its work.\n *\n * The obvious repair — look for the SYMBOLS instead — fails for a second, independent reason:\n * `wildo init` scaffolds `app-shell.config.ts` with every `ApplicationLevelComponentType` key\n * already present, hosting the same components a built application hosts. A freshly initialised\n * application and a finished one differ in the CONTENT of those structures and never in which\n * symbols appear, so a symbol sweep answers the same for both.\n *\n * What this behavior answers is how much each surface carries, in the RESOLVED configuration — a\n * question only this subprocess can answer, which is why it is a behavior and not a check.\n *\n * ## What it CANNOT answer, measured against the real scaffold (2026-09-23)\n *\n * **A count does not separate scaffold defaults from application work.** The skeleton's engine module\n * contributes a billing command and its settings rail ships the full engine catalog — so a freshly\n * initialised application already reports COMMAND_MENU and SETTINGS_HUB as composed. (Until #2331,\n * 2026-10-03, the skeleton's sidebar also shipped a `settings` section holding the settings launcher,\n * so SIDEBAR read composed too; Settings is now reached from the user menu and the scaffold's sidebar\n * carries nothing.) The first version of this behavior claimed otherwise, from a pin whose\n * \"scaffold\" fixture was written by hand rather than read from `templates/saas/skeleton`, and that\n * claim was reported as a finding before it was caught. Treat `composed` as \"carries something\", never\n * as \"the application placed something\". Deciding the latter needs each entry's IDENTITY compared with\n * what the placement plan asked for (#1538).\n *\n * ## It reports; it does not judge\n *\n * An application composes AT LEAST ONE shell surface and deliberately not all of them — which\n * ones is a product decision rather than a requirement to satisfy. So this returns one row per\n * surface and no verdict. A caller asserting \"at least one composed\" and a caller asserting\n * \"this task's surface is composed\" both read the same rows; a behavior that returned a single\n * boolean would have had to pick one of those questions and would be wrong for the other.\n *\n * The same reasoning applies one level down. A module contributing NOTHING is an answer, not an\n * omission: in the application this was written against, two of three modules contribute no\n * sidebar section on purpose, because every one of their resources' placements was declined or\n * routed to the settings hub, and because module sections merge by `ref` with the last writer\n * winning — so a second `isPrimary` claim on `main` would have silently overwritten the module\n * that legitimately owns the primary workspace. A per-module reading would have scored both as\n * incomplete. The surface is the honest unit.\n *\n * ## All four placement surfaces, by IDENTITY\n *\n * Each row carries the surface's entries as the engine addresses them — launcher refs for the\n * sidebar and the command palette, settings destination refs for the user menu and the settings\n * rail — because a count cannot tell a scaffold default from an application's placement and an\n * identity can: the landing probe compares these with the subjects the placement plan decided\n * (#1538). The settings rail is read RESOLVED, so a destination the catalog does not ship (which\n * renders nothing) is not reported as carried. `settings-placement-content` still answers the\n * separate question of whether the authored rail is VALID.\n *\n * One settings entry has TWO identities: an APPLICATION destination whose target is a resource\n * operation is how a resource operation reaches the rail or the dropdown, and the placement plan\n * names it as that operation, not by the destination ref the application chose. So such an entry is\n * reported as a launcher too. Engine destinations are not: the plan names them by ref, and reporting\n * an engine destination's operation as well would make a subject the plan never considered look\n * carried.\n *\n * A resource-operation entry also names the custom view the operation it opens renders, when it binds one (#4012):\n * a planned resource custom view is reached only through that launcher, and which operation hosts it is said by the\n * ui-behavior binding and by no plan.\n *\n * Composes the engine's own merge (`buildFrontendModuleRegistry`) rather than re-deriving it:\n * the merge order, the `ref` collision rule and the launcher-identity dedupe are the runtime's,\n * and a second copy here would drift from the thing it claims to describe.\n */\n\nimport { PlacementSurface } from '@wildo-ai/saas-specifications/application-creation';\nimport {\n buildFrontendModuleRegistry,\n resolveSettingsDestinationCatalog,\n resolveSettingsHubConfig,\n type SettingsHubConfig,\n} from '@wildo-ai/saas-frontend-lib';\nimport {\n ApplicationLevelComponentType,\n LauncherItemTargetKind,\n SettingsSectionTargetKind,\n type FrontendCompanionExports,\n type FrontendModule,\n} from '@wildo-ai/saas-frontend-lib/companion';\n\n/** A launcher entry exactly as the engine types it — kind plus the fields that address its target. */\nexport interface AppShellLauncherEntry {\n readonly kind: string;\n readonly resourceType?: string;\n readonly operation?: string;\n readonly viewRef?: string;\n readonly sectionRef?: string;\n /**\n * The entry's OWN `runtimeAvailability.requiredRoles`, absent when it names none. Reported per layer, never combined\n * with the section's: the browser expands core roles through their inheritance, so a plain intersection of the two\n * lists says nothing true about who sees the row (an `ORG_MEMBER` section with an `ORG_ADMIN` row intersects to\n * nothing, and admins see it).\n */\n readonly requiredRoles?: readonly string[];\n /** The `requiredRoles` of the sidebar SECTION the entry sits in; absent elsewhere and when the section names none. */\n readonly sectionRequiredRoles?: readonly string[];\n /**\n * For a RESOURCE_OPERATION entry: the name of the React component the operation it opens renders as its `customView`,\n * read from the BINDING in the merged resource ui-behavior registry (#4012). Absent when that operation binds none.\n *\n * A planned resource custom view (the experience plan's `RESOURCE_CUSTOM_VIEW`) is realised as an operation's\n * `customView`, and the shell can reach it only through that operation's launcher. Neither plan says which operation\n * hosts it; the binding does, so it is read here rather than guessed upstream. See `hostedCustomViewResolver`.\n */\n readonly hostedCustomView?: string;\n}\n\n/** Answers, for one launcher declaration, the component its target operation binds as its custom view. */\ntype HostedCustomViewResolver = (entry: Record<string, unknown>) => string | undefined;\n\n/**\n * The name a React component is known by in the source: a function's own name (a `const X = () => …` is named `X`),\n * else its `displayName`; a `memo` / `forwardRef` wrapper is named by what it wraps, or by its own `displayName`. A\n * `lazy` component, and a `memo(() => …)` around an anonymous arrow with no `displayName`, have no readable name and\n * answer `undefined`: the binding is then not reported, so the view reads missing rather than misattributed.\n */\nfunction componentName(component: unknown): string | undefined {\n if (typeof component === 'function') {\n const own = (component as { name?: unknown }).name;\n if (typeof own === 'string' && own.length > 0) return own;\n const display = (component as { displayName?: unknown }).displayName;\n return typeof display === 'string' && display.length > 0 ? display : undefined;\n }\n if (!isRecord(component)) return undefined;\n const wrapped = componentName(component.type) ?? componentName(component.render);\n if (wrapped !== undefined) return wrapped;\n return typeof component.displayName === 'string' && component.displayName.length > 0 ? component.displayName : undefined;\n}\n\n/**\n * The resolver over the merged ui-behavior registry (#4012): which component the operation a launcher OPENS binds as its\n * `customView`.\n *\n * Matched as the engine binds a ui-behavior `views` key to an operation (`findOperationByPresetKey`): a plain key\n * (`'create'`) is the operation's DEFAULT variant, which is what a launcher naming no `operationVariant` opens; a tuple\n * key (`['create', 'quick']`) is that variant, opened only by a launcher naming it. Three bindings the runtime does\n * resolve are not matched, because telling them apart needs the backend's operation list, which this oracle does not\n * read: a tuple keyed on the variant that happens to be the default, opened by a launcher naming none; a plain key,\n * opened by a launcher that names the default variant explicitly; and a tuple on an operation whose only variant is\n * not the default, opened by a launcher naming none. Each stays unreported (the view reads missing, never\n * misattributed), and the plain key with an unnamed variant is what a coding agent writes.\n */\nfunction hostedCustomViewResolver(resourceUIBehavior: Record<string, unknown>): HostedCustomViewResolver {\n return (entry) => {\n if (entry.kind !== LauncherItemTargetKind.RESOURCE_OPERATION) return undefined;\n const { resourceType, operation } = entry;\n if (typeof resourceType !== 'string' || typeof operation !== 'string') return undefined;\n const variant = typeof entry.operationVariant === 'string' ? entry.operationVariant : undefined;\n const behavior = Object.prototype.hasOwnProperty.call(resourceUIBehavior, resourceType) ? resourceUIBehavior[resourceType] : undefined;\n if (!isRecord(behavior)) return undefined;\n // `resourceUIBehavior()` stores `views` as a Map; a hand-built preset may still carry the authored array of tuples.\n const views = behavior.views instanceof Map ? [...behavior.views.entries()] : Array.isArray(behavior.views) ? behavior.views : [];\n for (const view of views) {\n if (!Array.isArray(view) || view.length < 2 || !isRecord(view[1])) continue;\n const key: unknown = view[0];\n const opens = Array.isArray(key)\n ? variant !== undefined && key[0] === operation && key[1] === variant\n : variant === undefined && key === operation;\n if (opens) return componentName(view[1].customView);\n }\n return undefined;\n };\n}\n\n/** The roles in `runtimeAvailability.requiredRoles` of a declaration, or `undefined` when it names none. */\nfunction declaredAudience(entry: Record<string, unknown>): readonly string[] | undefined {\n const availability = entry.runtimeAvailability;\n if (!isRecord(availability) || !Array.isArray(availability.requiredRoles)) return undefined;\n const roles = availability.requiredRoles.filter((role): role is string => typeof role === 'string' && role.length > 0);\n return roles.length > 0 ? roles : undefined;\n}\n\n\n\nexport interface AppShellSurfaceComposition {\n surface: PlacementSurface;\n /**\n * Is the surface switched on at all? `false` means the application declared it off, which is a\n * decision — a caller must not read it as \"not yet authored\". The settings rail has no switch.\n */\n enabled: boolean;\n /** How many entries the resolved surface carries — a SUMMARY; see the file JSDoc for what it cannot say. */\n entryCount: number;\n /** `entryCount > 0` — the surface carries something (scaffold defaults included). */\n composed: boolean;\n /** Where the entries came from, so a caller can tell an app-level authoring from a module one. */\n contributedBy: { app: number; modules: number };\n /**\n * The sidebar's and the palette's entries, by identity. On the user menu and the settings rail, the\n * entries that resolve to an application destination rendering a resource operation.\n */\n launchers: AppShellLauncherEntry[];\n /** The user menu's inline entries and the settings rail's sections, by destination ref. */\n destinationRefs: string[];\n /**\n * The modules whose OWN contribution adds entries here. A landing must see their files committed\n * as well as the application's config, or it would read a composition HEAD does not hold.\n */\n contributingModuleIds: string[];\n}\n\nexport interface AppShellPlacementContentResult {\n surfaces: AppShellSurfaceComposition[];\n /** The surfaces that carry something — the set Paul's \"at least one, not all\" rule is about. */\n composedSurfaces: PlacementSurface[];\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/** A surface key is `false` (off), `true` (on, engine defaults) or a configuration object. */\nfunction surfaceConfiguration(\n appShellConfig: unknown,\n key: ApplicationLevelComponentType,\n): { enabled: boolean; config: Record<string, unknown> | null } {\n if (!isRecord(appShellConfig)) return { enabled: false, config: null };\n const value = appShellConfig[key];\n if (value === undefined || value === false) return { enabled: false, config: null };\n if (isRecord(value)) return { enabled: true, config: value };\n return { enabled: true, config: null };\n}\n\n/**\n * The entries of a launcher list. With `sectionAudience`, the list is a sidebar section's rows: each carries the\n * section's audience beside its own, and NESTED rows are reported too, so a placement sitting one level down is not\n * invisible to the probe. (A nested row is also hidden with its parent row; that layer is not reported, since a placement\n * plan places no nested row.)\n */\nfunction launcherEntries(\n value: unknown,\n hostedCustomViewFor: HostedCustomViewResolver,\n sectionAudience?: readonly string[],\n inSection = false,\n): AppShellLauncherEntry[] {\n if (!Array.isArray(value)) return [];\n return value.filter(isRecord).flatMap((entry) => {\n const own = declaredAudience(entry);\n const hostedCustomView = hostedCustomViewFor(entry);\n const self: AppShellLauncherEntry = {\n kind: String(entry.kind ?? ''),\n ...(typeof entry.resourceType === 'string' ? { resourceType: entry.resourceType } : {}),\n ...(typeof entry.operation === 'string' ? { operation: entry.operation } : {}),\n ...(typeof entry.viewRef === 'string' ? { viewRef: entry.viewRef } : {}),\n ...(typeof entry.sectionRef === 'string' ? { sectionRef: entry.sectionRef } : {}),\n ...(own === undefined ? {} : { requiredRoles: own }),\n ...(sectionAudience === undefined ? {} : { sectionRequiredRoles: sectionAudience }),\n ...(hostedCustomView === undefined ? {} : { hostedCustomView }),\n };\n return inSection ? [self, ...launcherEntries(entry.children, hostedCustomViewFor, sectionAudience, true)] : [self];\n });\n}\n\n/**\n * A sidebar's placed ROWS are the CHILDREN of its sections, never the sections themselves.\n * A module declares the section so a later placement task has somewhere to append to — the\n * application this was written against does exactly that, with an explicitly empty `children` and\n * a comment naming the task that fills it. Counting sections would score that declaration as the\n * placement it is waiting for.\n */\nfunction sidebarChildren(sections: unknown, hostedCustomViewFor: HostedCustomViewResolver): AppShellLauncherEntry[] {\n if (!Array.isArray(sections)) return [];\n return sections.flatMap((section) => (isRecord(section) ? launcherEntries(section.children, hostedCustomViewFor, declaredAudience(section), true) : []));\n}\n\n/**\n * The quick-action button's actions, when the SIDEBAR hosts that button.\n *\n * A sidebar carries entries two ways: as rows of its navigation sections, and as chrome hosted at its\n * top or bottom. A placement plan can ask for an action that is deliberately NOT a destination — a\n * persistent \"add\" in the rail — and the faithful realisation is the quick-action button hosted there,\n * not a row among the rows. Reading only the rows would report that placement as missing when the rail\n * shows it. Any breakpoint counts: hosting it is the placement, and responsive visibility is a separate\n * decision the same config states.\n */\nfunction sidebarHostedQuickActions(\n sidebarConfig: Record<string, unknown> | null,\n appShellConfig: unknown,\n hostedCustomViewFor: HostedCustomViewResolver,\n): AppShellLauncherEntry[] {\n const hosted = sidebarConfig?.hostedComponents;\n if (!Array.isArray(hosted)) return [];\n const hostsQuickActions = hosted.some((entry) => isRecord(entry) && entry.componentType === ApplicationLevelComponentType.QUICK_ACTION_BUTTON);\n if (!hostsQuickActions) return [];\n return launcherEntries(surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.QUICK_ACTION_BUTTON).config?.actions, hostedCustomViewFor);\n}\n\nfunction stringArray(value: unknown): string[] {\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === 'string') : [];\n}\n\n/** The settings entries that are an application's resource-operation destination, as launchers. */\nfunction applicationDestinationOperations(\n refs: readonly string[],\n catalog: ReturnType<typeof resolveSettingsDestinationCatalog>,\n hostedCustomViewFor: HostedCustomViewResolver,\n): AppShellLauncherEntry[] {\n return refs.flatMap((ref) => {\n if (!catalog.applicationDestinationRefs.has(ref)) return [];\n const target = catalog.byRef.get(ref)?.target;\n if (target?.kind !== SettingsSectionTargetKind.RESOURCE_OPERATION) return [];\n const hostedCustomView = hostedCustomViewFor({\n kind: LauncherItemTargetKind.RESOURCE_OPERATION,\n resourceType: target.resourceType,\n operation: target.operation,\n ...(target.operationVariant === undefined ? {} : { operationVariant: target.operationVariant }),\n });\n return [{\n kind: LauncherItemTargetKind.RESOURCE_OPERATION,\n resourceType: target.resourceType,\n operation: target.operation,\n ...(hostedCustomView === undefined ? {} : { hostedCustomView }),\n }];\n });\n}\n\nexport async function runAppShellPlacementContent(\n frontendCompanionExports: FrontendCompanionExports,\n): Promise<AppShellPlacementContentResult> {\n const appShellConfig = frontendCompanionExports.appShellConfig as unknown;\n\n const loadFrontendModules = frontendCompanionExports.loadFrontendModules;\n const modules: FrontendModule[] = loadFrontendModules ? await loadFrontendModules() : [];\n const moduleRegistry = buildFrontendModuleRegistry(...modules);\n // Which custom view each launched operation renders, from the merged bindings (#4012).\n const hostedCustomViewFor = hostedCustomViewResolver(moduleRegistry.resourceUIBehavior as Record<string, unknown>);\n\n const sidebar = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.SIDEBAR);\n const commandMenu = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.COMMAND_MENU);\n // `PlacementSurface.USER_MENU` is the placement plan's name for the user dropdown; the shell\n // vocabulary calls the same surface `USER_DROPDOWN`. Mapped here, once, rather than at callers.\n const userMenu = surfaceConfiguration(appShellConfig, ApplicationLevelComponentType.USER_DROPDOWN);\n\n const sidebarFromApp = [\n ...sidebarChildren(sidebar.config?.contentSections, hostedCustomViewFor),\n ...sidebarHostedQuickActions(sidebar.config, appShellConfig, hostedCustomViewFor),\n ];\n const sidebarFromModules = sidebarChildren(moduleRegistry.sidebarSections, hostedCustomViewFor);\n\n // The palette's placed entries are its static commands — the application's own `commands` and\n // every module's contribution. `searchResources` is the OMNIBOX's live record search, a different\n // affordance on the same surface: counted in the summary, never an identity, because no placement\n // decision addresses it.\n const commandsFromApp = launcherEntries(commandMenu.config?.commands, hostedCustomViewFor);\n const commandsFromModules = launcherEntries(moduleRegistry.commandMenuItems, hostedCustomViewFor);\n const searchResourceCount = Array.isArray(commandMenu.config?.searchResources) ? (commandMenu.config!.searchResources as unknown[]).length : 0;\n\n // The dropdown's placements are the settings-hub sections surfaced inline — `settingsEntries`.\n // `sections` is the engine's vocabulary of built-in blocks (profile, organization, logout), present\n // on every application; counting it would make this surface composed for a scaffold.\n // (The first version read a field named `settingsSectionRefs`, which does not exist, so this\n // surface always read 0 whatever the application placed.)\n const userMenuEntries = stringArray(userMenu.config?.settingsEntries);\n\n // The settings rail, RESOLVED: a destination the catalog does not ship renders nothing, so it is\n // not something the rail carries.\n const settingsHubConfig = frontendCompanionExports.settingsHubConfig as SettingsHubConfig | undefined;\n const railSections = resolveSettingsHubConfig(settingsHubConfig).sections;\n const railDestinationRefs = railSections.map((section) => section.ref);\n const destinationCatalog = resolveSettingsDestinationCatalog(settingsHubConfig);\n\n const modulesContributing = (pick: (module: FrontendModule) => unknown, read: (value: unknown) => unknown[]) =>\n modules.filter((module) => read(pick(module)).length > 0).map((module) => module.moduleId);\n\n const surfaces: AppShellSurfaceComposition[] = [\n {\n surface: PlacementSurface.SIDEBAR,\n enabled: sidebar.enabled,\n entryCount: sidebarFromApp.length + sidebarFromModules.length,\n composed: sidebarFromApp.length + sidebarFromModules.length > 0,\n contributedBy: { app: sidebarFromApp.length, modules: sidebarFromModules.length },\n launchers: [...sidebarFromApp, ...sidebarFromModules],\n destinationRefs: [],\n contributingModuleIds: modulesContributing((module) => module.sidebarSections, (value) => sidebarChildren(value, hostedCustomViewFor)),\n },\n {\n surface: PlacementSurface.USER_MENU,\n enabled: userMenu.enabled,\n entryCount: userMenuEntries.length,\n composed: userMenuEntries.length > 0,\n contributedBy: { app: userMenuEntries.length, modules: 0 },\n launchers: applicationDestinationOperations(userMenuEntries, destinationCatalog, hostedCustomViewFor),\n destinationRefs: userMenuEntries,\n contributingModuleIds: [],\n },\n {\n surface: PlacementSurface.COMMAND_MENU,\n enabled: commandMenu.enabled,\n entryCount: commandsFromApp.length + commandsFromModules.length + searchResourceCount,\n composed: commandsFromApp.length + commandsFromModules.length + searchResourceCount > 0,\n contributedBy: { app: commandsFromApp.length + searchResourceCount, modules: commandsFromModules.length },\n launchers: [...commandsFromApp, ...commandsFromModules],\n destinationRefs: [],\n contributingModuleIds: modulesContributing((module) => module.commandMenuItems, (value) => launcherEntries(value, hostedCustomViewFor)),\n },\n {\n surface: PlacementSurface.SETTINGS_HUB,\n enabled: true,\n entryCount: railDestinationRefs.length,\n composed: railDestinationRefs.length > 0,\n contributedBy: { app: railDestinationRefs.length, modules: 0 },\n launchers: applicationDestinationOperations(railDestinationRefs, destinationCatalog, hostedCustomViewFor),\n destinationRefs: railDestinationRefs,\n contributingModuleIds: [],\n },\n ];\n\n return {\n surfaces,\n composedSurfaces: surfaces.filter(({ composed }) => composed).map(({ surface }) => surface),\n };\n}\n"]}
|
package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-introspection-behavior-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/subprocess/companion-introspection-behavior-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"companion-introspection-behavior-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/subprocess/companion-introspection-behavior-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAcjG,OAAO,EAGL,gBAAgB,EAMjB,MAAM,uBAAuB,CAAC;AA+E/B,OAAO,EAEL,KAAK,gCAAgC,EACrC,KAAK,kCAAkC,EACvC,KAAK,gDAAgD,EACtD,MAAM,0CAA0C,CAAC;AAGlD,MAAM,WAAW,4CAA4C;IAC3D,OAAO,EAAE,kCAAkC,CAAC;IAC5C,QAAQ,EAAE,gDAAgD,CAAC;IAC3D,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,MAAM,qCAAqC,GAAG,CAClD,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,4CAA4C,KAClD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAmDhC,wBAAgB,6BAA6B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAMzE;AAED,eAAO,MAAM,iDAAiD,EAAE,OAAO,CACrE,MAAM,CAAC,gCAAgC,EAAE,qCAAqC,CAAC,CA6zChF,CAAC;AAwWF;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG;IAC3D,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,KAAK,CAAC;IAChD,yBAAyB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACzD,CAqCA"}
|
|
@@ -2,6 +2,7 @@ import { resolveCompanionContext } from '../../context/companion-context.js';
|
|
|
2
2
|
import { answerSpecificationsCompanionData, loadCompleteResourceSpecifications, loadSpecificationsCompanionEvaluation, projectBackendCompanionData, } from '../../context/companion-package-loaders.companion.js';
|
|
3
3
|
import { projectLabellingResourceSpecifications } from '../../../i18n-labelling/utils/labelling-resource-specification-facts.utils.js';
|
|
4
4
|
import { basename, relative } from 'node:path';
|
|
5
|
+
import { moduleEmailTemplatePlacement } from '../../../email/utils/module-email-root.companion.utils.js';
|
|
5
6
|
import { pathToFileURL } from 'node:url';
|
|
6
7
|
import { generateDesignTokensCssFromSourceConfig } from '@wildo-ai/presets-components-models';
|
|
7
8
|
import { buildSharedSaaSModulesRegistry, coreResourceShared_FieldIdentifierPriority, CoreResourceType, projectAgentAiUseDeclarations, Resources_SharedUtils, resourceInheritanceVariantSchemas, } from '@wildo-ai/saas-models';
|
|
@@ -683,20 +684,29 @@ export const COMPANION_INTROSPECTION_BUILTIN_BEHAVIOR_HANDLERS = {
|
|
|
683
684
|
emailTemplateOwnership: backendModules
|
|
684
685
|
.filter((ownedModule) => Object.keys(ownedModule.emailTemplateDefinitions ?? {}).length > 0
|
|
685
686
|
|| Object.keys(ownedModule.emailComponentLabels ?? {}).length > 0)
|
|
686
|
-
.map((ownedModule) =>
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
687
|
+
.map((ownedModule) => {
|
|
688
|
+
/*
|
|
689
|
+
* A business module's root is where ITS definitions file scans (#3904), `emails/` when nothing scans yet, and
|
|
690
|
+
* its layout says which folder registers which refs, or why that cannot be read: the generation step writes
|
|
691
|
+
* nothing for an undetermined module rather than writing where nothing registers (review F2, F5).
|
|
692
|
+
*/
|
|
693
|
+
const modulePlacement = ownedModule.kind === 'engine'
|
|
694
|
+
? undefined
|
|
695
|
+
: moduleEmailTemplatePlacement({ applicationRoot: context.request.homes.appDeclarationRoot, backendPackageRoot: context.request.packageRoot, moduleId: ownedModule.moduleId });
|
|
696
|
+
return {
|
|
697
|
+
ownerId: ownedModule.moduleId,
|
|
698
|
+
artifactClass: ownedModule.kind === 'engine'
|
|
699
|
+
? CompanionArtifactClass.ENGINE
|
|
700
|
+
: CompanionArtifactClass.DOMAIN_MODULE,
|
|
701
|
+
rootsByRole: {
|
|
702
|
+
backend: modulePlacement === undefined ? 'backend-api/src/engine/email' : modulePlacement.backend,
|
|
703
|
+
},
|
|
704
|
+
...(modulePlacement === undefined ? {} : { backendEmailLayout: modulePlacement.layout }),
|
|
705
|
+
templateRefs: Object.keys(ownedModule.emailTemplateDefinitions ?? {}),
|
|
706
|
+
// The shared components' words (#2884), planned by the translate lane as one unit per owner.
|
|
707
|
+
declaresComponentLabels: Object.keys(ownedModule.emailComponentLabels ?? {}).length > 0,
|
|
708
|
+
};
|
|
709
|
+
}),
|
|
700
710
|
};
|
|
701
711
|
},
|
|
702
712
|
'translation-needed-info': async (_input, context) => {
|