@wildo-ai/dev-companion 1.1.15 → 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 +165 -5
- 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 +239 -8
- 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 +2 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +2 -1
- 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/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 +20 -0
- 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 +27 -12
- 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 +155 -3
- 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 +791 -151
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- 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/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/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/system_enums/workbench-build.en.d.ts +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.js +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.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 +12 -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 +99 -1
- 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 +67 -20
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +344 -76
- 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.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +9 -0
- 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 +38 -2
- 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 +176 -22
- 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/creation-run-report.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +9 -1
- 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 +64 -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 +139 -14
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell-placement-content.behavior.js","sourceRoot":"","sources":["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,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 * 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,wBAAwB,GAEzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,yBAAyB,GAG1B,MAAM,uCAAuC,CAAC;AAgC/C;;;;;GAKG;AACH,SAAS,aAAa,CAAC,SAAkB;IACvC,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE,CAAC;QACpC,MAAM,GAAG,GAAI,SAAgC,CAAC,IAAI,CAAC;QACnD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;QAC1D,MAAM,OAAO,GAAI,SAAuC,CAAC,WAAW,CAAC;QACrE,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACjF,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3C,MAAM,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjF,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC1C,OAAO,OAAO,SAAS,CAAC,WAAW,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,SA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ent":["/**\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"]}
|
|
@@ -133,6 +133,19 @@ export declare class ExpertPersonaCompanionService {
|
|
|
133
133
|
* bound", which marks rather than refuses.
|
|
134
134
|
*/
|
|
135
135
|
contentSafety?: ContentSafetyBackendService | undefined);
|
|
136
|
+
/**
|
|
137
|
+
* Whether the build is unfinished, as the eligibility board reads it (`isBuildUnfinished`, #4022), for a drift
|
|
138
|
+
* assessment whose caller does not hold the board's state: a deliberation refusing stale seats. Registered by the
|
|
139
|
+
* playbook-run service, which reads the build plan through the build dispatch; injecting that here would cycle (the
|
|
140
|
+
* build dispatch reaches this service through the logo panel). Unregistered: every input counts, as before #4022.
|
|
141
|
+
*
|
|
142
|
+
* One case where the two readings differ, by construction: the board computes the plan's progress only while the
|
|
143
|
+
* `build-plan` family is readable (not deactivated, not held by a failing module), and the probe always asks the build
|
|
144
|
+
* dispatch. There the board counts the build's writes and a deliberation does not, which costs a staffing run the
|
|
145
|
+
* board offers and never holds a step: the refusal is the side that admits the seat.
|
|
146
|
+
*/
|
|
147
|
+
private buildUnfinishedProbe;
|
|
148
|
+
registerBuildUnfinishedProbe(probe: () => Promise<boolean>): void;
|
|
136
149
|
derive(options: ExpertPersonaDeriveOptions, traceContext?: AgentTraceContext): Promise<ExpertPersonaDeriveResult>;
|
|
137
150
|
/**
|
|
138
151
|
* The committed charters whose shaping inputs changed after them (#2819), judged by `assessExpertCharterInputDrift`
|
|
@@ -156,8 +169,15 @@ export declare class ExpertPersonaCompanionService {
|
|
|
156
169
|
*
|
|
157
170
|
* Never throws: with no git, or an unreadable repository, it dates nothing and returns `[]`, so a board read or a
|
|
158
171
|
* deliberation never fails over an annotation.
|
|
172
|
+
*
|
|
173
|
+
* While the build is unfinished, a change to an input the build writes (the design system, the accepted mark) is not
|
|
174
|
+
* counted (#4022, `assessExpertCharterInputDrift`). `buildUnfinished` is the board's own reading of its state; a caller
|
|
175
|
+
* that does not hold one (a deliberation) omits it and the registered probe answers, so the board and the refusal read
|
|
176
|
+
* the same predicate. A probe that throws counts every input, as an unregistered one does.
|
|
159
177
|
*/
|
|
160
|
-
assessCharterDrift(charters: unknown
|
|
178
|
+
assessCharterDrift(charters: unknown, options?: {
|
|
179
|
+
readonly buildUnfinished?: boolean;
|
|
180
|
+
}): Promise<readonly ExpertCharterInputDrift[]>;
|
|
161
181
|
/** The application-relative directory every charter and the aggregator live in (#3237 review A). */
|
|
162
182
|
describePersonasDirectory(): string;
|
|
163
183
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expert-persona.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/expert-personas/services/expert-persona.companion.service.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,aAAa,EAEb,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAIL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAOL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AAMvC,OAAO,
|
|
1
|
+
{"version":3,"file":"expert-persona.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/expert-personas/services/expert-persona.companion.service.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,aAAa,EAEb,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAIL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAOL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAQL,KAAK,uBAAuB,EAG7B,MAAM,wCAAwC,CAAC;AAKhD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAC/G,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,6EAA6E,CAA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,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE;IASrE;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAStF,OAAO,CAAC,WAAW,CAAoC;YAEzC,gBAAgB;IAwM9B,OAAO,CAAC,eAAe;IAmBvB;;;;;;;OAOG;YACW,oBAAoB;IAoElC;;;;;;;OAOG;YACW,wBAAwB;IAsBtC;;;;;;;OAOG;YACW,qBAAqB;IAoCnC;;;;;OAKG;YACW,gBAAgB;IAoC9B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAqB3B,8EAA8E;IAC9E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAMkB;IAE7D,6EAA6E;IAC7E,OAAO,CAAC,gBAAgB;IAkBxB,6EAA6E;IAC7E,OAAO,CAAC,mBAAmB;IAwB3B,+EAA+E;IAC/E,OAAO,CAAC,mBAAmB;YA4Bb,kBAAkB;IAuBhC;;;;OAIG;YACW,oBAAoB;IA8BlC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IASxB,uGAAuG;IACvG,OAAO,CAAC,qBAAqB;IAe7B,6EAA6E;IAC7E,OAAO,CAAC,0BAA0B;CAcnC"}
|
|
@@ -18,7 +18,7 @@ import { ErrorBuilderBackendService, LoggerService, SAAS_SERVICE_TYPES, describe
|
|
|
18
18
|
import { AppFrontendType, ErrorCustomMessageReference, ErrorType, } from '@wildo-ai/saas-models';
|
|
19
19
|
import { ExpertPersonaCharterSchema, ExpertPersonaIssueKind, ExpertPersonaIssueSeverity, ExpertShapingInputKind, getExpertRoleTemplate, validateExpertPersonaCharters, } from '@wildo-ai/saas-specifications';
|
|
20
20
|
import { ApplicationSpecificationFamily, BRAND_RESOLVED_ASSETS_MODULE_FILE, EXPERT_SHAPING_INPUT_FAMILY_BINDINGS, } from '@wildo-ai/saas-specifications/application-creation';
|
|
21
|
-
import { applyCompanionExportWiring, COMPANION_EXPORT_WIRING_FILES, PlaybookInputChangeSource, assessExpertCharterInputDrift, getFamilyPackageRelativePath, writeSpecificationFileAtomically, assertSpecificationWritePermitted, } from '@wildo-ai/application-creation-runtime';
|
|
21
|
+
import { applyCompanionExportWiring, COMPANION_EXPORT_WIRING_FILES, PlaybookInputChangeSource, assessExpertCharterInputDrift, EXPERT_SHAPING_INPUT_WRITTEN_BY_THE_BUILD, getFamilyPackageRelativePath, writeSpecificationFileAtomically, assertSpecificationWritePermitted, } from '@wildo-ai/application-creation-runtime';
|
|
22
22
|
import { readSpecificationFamiliesWholeValueBasis } from '../../core/context/specification-family-data.companion.js';
|
|
23
23
|
import { assertPersonaSourceMayBeReplaced } from './persona-source-ownership.js';
|
|
24
24
|
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
|
|
@@ -94,6 +94,21 @@ let ExpertPersonaCompanionService = class ExpertPersonaCompanionService {
|
|
|
94
94
|
this.logDebug = this.logger.debugByType('ExpertPersonaCompanionService');
|
|
95
95
|
this.logger.setDebugTypeLogging('ExpertPersonaCompanionService', true);
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Whether the build is unfinished, as the eligibility board reads it (`isBuildUnfinished`, #4022), for a drift
|
|
99
|
+
* assessment whose caller does not hold the board's state: a deliberation refusing stale seats. Registered by the
|
|
100
|
+
* playbook-run service, which reads the build plan through the build dispatch; injecting that here would cycle (the
|
|
101
|
+
* build dispatch reaches this service through the logo panel). Unregistered: every input counts, as before #4022.
|
|
102
|
+
*
|
|
103
|
+
* One case where the two readings differ, by construction: the board computes the plan's progress only while the
|
|
104
|
+
* `build-plan` family is readable (not deactivated, not held by a failing module), and the probe always asks the build
|
|
105
|
+
* dispatch. There the board counts the build's writes and a deliberation does not, which costs a staffing run the
|
|
106
|
+
* board offers and never holds a step: the refusal is the side that admits the seat.
|
|
107
|
+
*/
|
|
108
|
+
buildUnfinishedProbe;
|
|
109
|
+
registerBuildUnfinishedProbe(probe) {
|
|
110
|
+
this.buildUnfinishedProbe = probe;
|
|
111
|
+
}
|
|
97
112
|
// ──────────────────────────────────────────────────────────────
|
|
98
113
|
// DERIVE (propose)
|
|
99
114
|
// ──────────────────────────────────────────────────────────────
|
|
@@ -200,8 +215,13 @@ let ExpertPersonaCompanionService = class ExpertPersonaCompanionService {
|
|
|
200
215
|
*
|
|
201
216
|
* Never throws: with no git, or an unreadable repository, it dates nothing and returns `[]`, so a board read or a
|
|
202
217
|
* deliberation never fails over an annotation.
|
|
218
|
+
*
|
|
219
|
+
* While the build is unfinished, a change to an input the build writes (the design system, the accepted mark) is not
|
|
220
|
+
* counted (#4022, `assessExpertCharterInputDrift`). `buildUnfinished` is the board's own reading of its state; a caller
|
|
221
|
+
* that does not hold one (a deliberation) omits it and the registered probe answers, so the board and the refusal read
|
|
222
|
+
* the same predicate. A probe that throws counts every input, as an unregistered one does.
|
|
203
223
|
*/
|
|
204
|
-
async assessCharterDrift(charters) {
|
|
224
|
+
async assessCharterDrift(charters, options) {
|
|
205
225
|
if (this.git === undefined || !Array.isArray(charters) || charters.length === 0)
|
|
206
226
|
return [];
|
|
207
227
|
try {
|
|
@@ -255,13 +275,25 @@ let ExpertPersonaCompanionService = class ExpertPersonaCompanionService {
|
|
|
255
275
|
const commit = committedAt.get(file);
|
|
256
276
|
return commit === undefined ? undefined : { at: commit, source: PlaybookInputChangeSource.COMMITTED_LATER };
|
|
257
277
|
};
|
|
258
|
-
|
|
278
|
+
const assess = (buildUnfinished) => assessExpertCharterInputDrift({
|
|
259
279
|
charters,
|
|
280
|
+
buildUnfinished,
|
|
260
281
|
charterChangedAt: (roleRef) => changedAt(charterPath(roleRef), false)?.at,
|
|
261
282
|
inputChangedAt: (kind) => (inputPaths.get(kind) ?? [])
|
|
262
283
|
.flatMap((file) => changedAt(file) ?? [])
|
|
263
284
|
.reduce((latest, date) => (latest === undefined || date.at > latest.at ? date : latest), undefined),
|
|
264
285
|
});
|
|
286
|
+
if (options?.buildUnfinished !== undefined)
|
|
287
|
+
return assess(options.buildUnfinished);
|
|
288
|
+
/*
|
|
289
|
+
* The probe reads the build plan's landing (a gated derivation), so it is asked only when its answer can change
|
|
290
|
+
* the drift: when an input the build writes changed after a charter (#4022 review F7).
|
|
291
|
+
*/
|
|
292
|
+
const counted = assess(false);
|
|
293
|
+
const buildWrittenChange = counted.some((entry) => entry.changedInputs.some(({ kind }) => EXPERT_SHAPING_INPUT_WRITTEN_BY_THE_BUILD[kind]));
|
|
294
|
+
if (!buildWrittenChange)
|
|
295
|
+
return counted;
|
|
296
|
+
return await this.buildUnfinishedProbe?.().catch(() => false) === true ? assess(true) : counted;
|
|
265
297
|
}
|
|
266
298
|
catch (error) {
|
|
267
299
|
this.logDebug('expert charter drift could not be dated (nothing reported)', { error: describeCaughtError(error) });
|