@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
|
@@ -66,7 +66,7 @@ const STUCK_REASON_ASK = {
|
|
|
66
66
|
[Workbench_BuildTaskStuckReason.IN_FLIGHT]: StuckTaskAsk.NEVER,
|
|
67
67
|
/* #3204: it starts when the run writing its file settles; nobody can do anything about it. */
|
|
68
68
|
[Workbench_BuildTaskStuckReason.CONTENDED]: StuckTaskAsk.NEVER,
|
|
69
|
-
/* #3204:
|
|
69
|
+
/* #3204, #3998: it is re-checked alone by itself (once nothing live writes what it reads, or at the wave's end); nobody can do anything about it. */
|
|
70
70
|
[Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK]: StuckTaskAsk.NEVER,
|
|
71
71
|
[Workbench_BuildTaskStuckReason.RAN_THIS_WAVE]: StuckTaskAsk.NEVER,
|
|
72
72
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creation-home-projection.companion.js","sourceRoot":"","sources":["../../../../../src/core/introspection/resources/creation-home-projection.companion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAEL,8BAA8B,EAC9B,wDAAwD,EACxD,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,mCAAmC,EACnC,oCAAoC,EACpC,sCAAsC,GAWvC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,mCAAmC,EAA8B,MAAM,4DAA4D,CAAC;AAyB7I,4EAA4E;AAC5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD,0EAA0E;AAC1E,SAAS,kBAAkB,CAAC,IAAiB,EAAE,KAAkB;IAC/D,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5B,IAAI,KAAK,KAAK,IAAI;QAAE,OA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AI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,8BAA8B,CAAC,IAAI,CAAC,CAAC;YACrF,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACpK,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9J,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,oCAAoC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type { BuildPlanSpecificationFault, PlaybookDatedByWaitingInterview } from '@wildo-ai/application-creation-runtime';\nimport { ApplicationSpecificationFamily } from '@wildo-ai/saas-specifications/application-creation';\nimport { FlowsActors_Status, describeModelProviderAccountRefusal } from '@wildo-ai/saas-models';\nimport {\n type BuildTaskClosureKind,\n Workbench_BuildTaskStuckReason,\n WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN,\n Workbench_PlaybookRunState,\n WorkbenchBuildPlanTaskStatus,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n WorkbenchCreationOutcome,\n WorkbenchCreationOutcomeStatus,\n WorkbenchShared_ResourceType,\n WorkbenchSpecificationArtifactState,\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER,\n sanitizeWorkbenchCreationPlaneIdentity,\n type Workbench_BuildDispatch,\n type Workbench_BuildDispatchPlan,\n type Workbench_BuildPlanTask,\n type Workbench_CreationHomeLine,\n type Workbench_CreationOutcome,\n type Workbench_GovernanceDocument,\n type Workbench_ParkedCodingQuestion,\n type Workbench_Playbook,\n type Workbench_PlaybookRun,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\nimport { describeCodingAgentUsageLimitResume, type CodingAgentUsageLimit } from '../../../claude-cli/models/coding-agent-usage-limit.models';\n\n/**\n * HOME, derived (#1454): the lines the conversation page opens on, and where the application\n * stands — pure functions of the creation-plane rows the projection service already computes.\n *\n * ## Why here and not in the page\n *\n * Until 2026-09-22 the workbench read seven resources on their own cadences and derived every one\n * of these facts itself, on every poll, in three modules nothing but the page could reach. A line\n * is a FACT about the application (\"this run was refused\", \"this task's writes wait to be\n * committed\", \"this step can run and its output is missing\"); facts are derived where the rows are,\n * once, and served as rows (`derive-before-you-ask.md`). The page renders; the assistant's tools read\n * the same rows; and a test of the derivation is a test of what every reader sees.\n *\n * Both builders take the ROWS — the projected shapes the resources serve — rather than the companion\n * services' own records, so a fact is decided from exactly what a reader could see, never from a\n * field the projection dropped.\n */\n\n/** The row shape the home-lines projection emits, before the identity is stamped. */\nexport type CreationHomeLineRow = Omit<Workbench_CreationHomeLine, 'workbenchCreationHomeLineId'>;\n/** The row shape the outcomes projection emits, before the identity is stamped. */\nexport type CreationOutcomeRow = Omit<Workbench_CreationOutcome, 'workbenchCreationOutcomeId'>;\n\n/** How many playbook suggestions Home shows beside the plan's next step. */\nexport const HOME_PLAYBOOK_SUGGESTION_COUNT = 3;\n\n/** Newest first; a row with no instant sorts after every row with one. */\nfunction compareNewestFirst(left: Date | null, right: Date | null): number {\n if (left === null && right === null) return 0;\n if (left === null) return 1;\n if (right === null) return -1;\n return right.getTime() - left.getTime();\n}\n\n/**\n * The RANKING of what is asked of the creator: what stops a run that is otherwise executing comes\n * first (a clarification, a parked question); a document waiting on a fact does not block a run and\n * comes after. Within a rank, newest first.\n */\nconst ASKED_RANK: Readonly<Partial<Record<WorkbenchCreationHomeLineKind, number>>> = {\n [WorkbenchCreationHomeLineKind.CLARIFICATION]: 0,\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION]: 0,\n [WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT]: 1,\n /*\n * Below a question (which holds a live agent session) and above a document: the plan is frozen\n * until it is unblocked, and the remedy is a fixed declaration, a re-arm or an approval.\n */\n [WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN]: 1,\n /* A question like a clarification: answering it is what lets the work it holds run (#3361). */\n [WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK]: 0,\n /* Ahead of the steps it holds: fixing the module is what moves them (#3258). */\n [WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN]: 0,\n /* Beside a frozen plan: nothing runs on it, and it stays uncommitted until the creator commits or discards it (#3267). */\n [WorkbenchCreationHomeLineKind.RUN_LEFTOVER_UNCOMMITTED]: 1,\n [WorkbenchCreationHomeLineKind.GAP_AWAITS_DECISION]: 1,\n};\n\n/** Whether a stuck task, on a plan that can dispatch nothing, is a thing waiting on the CREATOR (#2412). */\nenum StuckTaskAsk {\n /** It needs the creator: fix a declaration or the work, re-arm a task whose attempts are spent, or a missing blueprint. */\n ASKS = 'asks',\n /** It needs the creator only once no run of the plan is live; while one is, the wave that wrote it has yet to commit. */\n ASKS_ONCE_NOTHING_RUNS = 'asks-once-nothing-runs',\n /** Nobody's move, or already asked on a line of its own. */\n NEVER = 'never',\n}\n\n/**\n * How each stuck reason reads in ASKED. Total over the reasons, so a reason added tomorrow has to be classified here\n * rather than landing in ASKED by default.\n *\n * `app-creation-test-005` printed \"the build plan is stuck at …: in_flight\" three times, and three more lines for a\n * product awaiting its commit (a reason retired with #3514, since landing reads the working tree), in ONE running wave,\n * and the hook counted all six as questions. Neither was the creator's move:\n *\n * - `IN_FLIGHT` — a run of it is live and it clears when that run settles. NEVER.\n * - `PARKED_AWAITING_ANSWER` — its question is already a `PARKED_QUESTION` line, one per question. NEVER, or it is\n * asked twice.\n */\nconst STUCK_REASON_ASK: Readonly<Record<Workbench_BuildTaskStuckReason, StuckTaskAsk>> = {\n [Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED]: StuckTaskAsk.ASKS,\n [Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER]: StuckTaskAsk.NEVER,\n [Workbench_BuildTaskStuckReason.NO_DOCUMENT_BLUEPRINT]: StuckTaskAsk.ASKS,\n [Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED]: StuckTaskAsk.ASKS,\n [Workbench_BuildTaskStuckReason.IN_FLIGHT]: StuckTaskAsk.NEVER,\n /* #3204: it starts when the run writing its file settles; nobody can do anything about it. */\n [Workbench_BuildTaskStuckReason.CONTENDED]: StuckTaskAsk.NEVER,\n /* #3204: the wave's end re-checks it alone, by itself; nobody can do anything about it. */\n [Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK]: StuckTaskAsk.NEVER,\n [Workbench_BuildTaskStuckReason.RAN_THIS_WAVE]: StuckTaskAsk.NEVER,\n /*\n * #3223: a generation step whose landing check could not be answered. Usually it heals by itself (an introspection or a\n * CLI still warming), and Home asks only when nothing else can run — then the check is persistently unanswerable, and the\n * dispatch refusal names the check and the command that shows what the creator has to repair.\n */\n [Workbench_BuildTaskStuckReason.LANDING_UNKNOWN]: StuckTaskAsk.ASKS,\n /* #3227: under GUIDED a derived follow-up waits for the creator's review, which only they can give. */\n [Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW]: StuckTaskAsk.ASKS,\n /*\n * Stale expert charters are repaired by the build-dispatch step, which runs the staffing step on its own. Asked only once\n * nothing runs: then the repair did not take, or a person edited a charter, whose remedy is theirs.\n */\n [Workbench_BuildTaskStuckReason.STALE_EXPERT_CHARTERS]: StuckTaskAsk.ASKS_ONCE_NOTHING_RUNS,\n /*\n * #3709: a generation step failing the same way on unchanged inputs. Its cause needs a fix, often outside the\n * application (an engine's examples, an engine label key), and only a person makes it: asked, like an exhausted budget.\n */\n [Workbench_BuildTaskStuckReason.REPEATED_IDENTICAL_FAILURE]: StuckTaskAsk.ASKS,\n /* #3709: a step failing on a cause the framework owns. Only a framework fix and a person's re-run clear it: asked. */\n [Workbench_BuildTaskStuckReason.FAILURE_OUTSIDE_APPLICATION]: StuckTaskAsk.ASKS,\n};\n\nexport interface CreationHomeLineInputs {\n readonly runs: readonly Workbench_PlaybookRun[];\n readonly dispatches: readonly Workbench_BuildDispatch[];\n readonly waiting: readonly Workbench_WaitingPlaybookRun[];\n readonly parked: readonly Workbench_ParkedCodingQuestion[];\n readonly documents: readonly Workbench_GovernanceDocument[];\n readonly dispatchPlan: readonly Workbench_BuildDispatchPlan[];\n readonly playbooks: readonly Workbench_Playbook[];\n /** Every family the artifact projection reports, with its state. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n /**\n * The coding agent's usage limit holding the build NOW (#2388) — the dispatch service's live hold, which is the\n * pause itself, so the line exists exactly while the build is paused. Absent when nothing holds it.\n */\n readonly codingAgentUsageLimit?: CodingAgentUsageLimit & { readonly taskRef: string };\n /**\n * The network loss holding coding admissions NOW (#3236, #3262) — the dispatch service's live connectivity hold, so the\n * line exists exactly while no coding turn is admitted. `route` is the probe's route in words, absent when none is known.\n */\n readonly codingAgentConnectivityHold?: { readonly observedAt: string; readonly taskRef: string; readonly route?: string };\n /**\n * The host cause holding coding admissions NOW (#3423, #3432): the dispatch service's live hold, so the line exists\n * exactly while no coding turn is admitted for it. `cause` is the cause and its remedy in one sentence\n * (`describeVerificationHostCause`): an absent command, a command lacking the verb, or a check that cannot be asked the\n * same way on two tasks.\n */\n readonly verificationToolUnavailableHold?: { readonly observedAt: string; readonly taskRef: string; readonly cause: string };\n /** The instant the resume time is worded against (its date shows when it is not today); the read's own when omitted. */\n readonly now?: Date;\n /**\n * The build tasks a person CLOSED (`wildo build close`, #3224, #3227) whose closure counts now: one SINCE line each, so\n * the feed and Home say that a person, not a probe, settled them. The line carries the person's own words only; how the\n * closure accounts for the task (its kind, what satisfied it) is on the task's record, worded from the vocabulary.\n */\n readonly closures?: readonly { readonly taskRef: string; readonly kind: BuildTaskClosureKind; readonly satisfiedBy?: string; readonly reason: string; readonly closedAt: string }[];\n /**\n * The derived follow-ups that landed while their latest completed run still reports a requirement unmet (#2583): one\n * ADVISORY suggestion each. A projection of the follow-up's landing and that run's report, never a stored state.\n */\n readonly followUpsLandedWithGaps?: readonly { readonly taskRef: string; readonly unmetRequirements: readonly { readonly requirementRef: string; readonly missing: string }[] }[];\n /**\n * Files a task's coding runs left uncommitted that no automatic door will commit (#3267; a stuck task's declared product aside, #3204), from the commit door's own\n * reading of the write register and the tree (`listUncommittedRunLeftovers`): one ASKED line per task.\n */\n readonly uncommittedLeftovers?: readonly { readonly taskRef: string; readonly path: string; readonly runTaskIds: readonly string[] }[];\n /**\n * The reported gaps only a person's decision can close (#3886: a report's `needsDecision`), from the follow-up derivation:\n * one ASKED line per reporting task, naming each requirement and its decision. Derived from the latest runs, never stored.\n */\n readonly gapsAwaitingDecision?: readonly { readonly taskRef: string; readonly requirementRef: string; readonly decision: string }[];\n /**\n * The LANDED tasks carrying a landing advisory (#3285, `readLandedTasksWithAdvisories`): one ADVISORY suggestion each,\n * naming each setting still to set and its file. Derived from the committed tree, never stored.\n */\n readonly landedTasksWithAdvisories?: readonly { readonly taskRef: string; readonly advisories: readonly { readonly setting: string; readonly settingPath: string }[] }[];\n /**\n * The steps an unattended round withholds because an interview still waiting on the person would date them (#3361), from\n * the eligibility board (`findReadersDatedByWaitingInterviews`): one ASKED line per waiting interview.\n */\n readonly datedByWaitingInterviews?: readonly PlaybookDatedByWaitingInterview[];\n}\n\n/** One leftover in a Home line's subject: the file, and the runs whose record holds it as it is now (#3267). */\nfunction describeLeftoverForHome(leftover: { readonly path: string; readonly runTaskIds: readonly string[] }): string {\n return `${leftover.path} (recorded by ${leftover.runTaskIds.length === 1 ? 'run' : 'runs'} ${leftover.runTaskIds.join(', ')})`;\n}\n\n\n/**\n * When a build dispatch ENDED, and whether it failed — or `null` while it has not (#2523).\n *\n * Read from the dispatch's RUN — the execution it is — for both executors. Home used to read the phase, which\n * is a generation step's outcome but only a coding run's hand-off (it stops at ADMITTED by design), so no\n * coding run ever appeared as settled. A dispatch refused before its run started ends its execution too\n * (ABORTED or FAILED), so it is read the same way.\n */\nexport function dispatchEnding(dispatch: Workbench_BuildDispatch): { readonly at: Date | null; readonly failed: boolean } | null {\n if (!RUN_HAS_ENDED[dispatch.runStatus]) return null;\n return { at: dispatch.runFinishedAt ?? dispatch.settledAt ?? null, failed: dispatch.runStatus !== FlowsActors_Status.COMPLETED };\n}\n\n/**\n * Which execution statuses END a run. Total over the vocabulary, so a status added to it is a compile error\n * here rather than a run Home silently never lists. A run waiting on an answer has not ended: it parks and\n * resumes under the same execution.\n */\nconst RUN_HAS_ENDED: Record<FlowsActors_Status, boolean> = {\n [FlowsActors_Status.READY]: false,\n [FlowsActors_Status.PENDING]: false,\n [FlowsActors_Status.PROCESSING]: false,\n [FlowsActors_Status.AWAITING_APPROVAL]: false,\n [FlowsActors_Status.COMPLETED]: true,\n [FlowsActors_Status.FAILED]: true,\n [FlowsActors_Status.CANCELLED]: true,\n [FlowsActors_Status.ABORTED]: true,\n};\n\n/**\n * The re-runs inside a run's lanes that did not land while their family's earlier landing stands (#3213), latest failure\n * per playbook, in the order they first appear. A landing STANDS — the runtime's own rule (`landingStands` in the\n * choreography) — when the child re-ran over a landing the record held (`reranOverLanding`: a REFRESH, or a CURRENT\n * landing re-opened), or when an earlier round of this run landed it. A FIRST run that failed left nothing to stand and\n * is never one: `ranBecause` cannot tell them apart, since it is written for a first run too.\n */\nfunction failedRepairsOf(run: Workbench_PlaybookRun): ReadonlyArray<{ readonly playbookRef: string; readonly failure: string }> {\n const latest = new Map<string, string>();\n const landedInThisRun = new Set<string>();\n for (const round of run.choreographyRounds ?? []) {\n for (const child of round.children) {\n if (child.failure === null) {\n // A run of the playbook that landed: it delivered (so a later failure stands on it), and it repaired any earlier one.\n if (child.landed.length > 0) landedInThisRun.add(child.playbookRef);\n latest.delete(child.playbookRef);\n } else if (child.reranOverLanding === true || landedInThisRun.has(child.playbookRef)) {\n latest.set(child.playbookRef, child.failure);\n }\n }\n }\n return [...latest].map(([playbookRef, failure]) => ({ playbookRef, failure }));\n}\n\n/**\n * Every line of Home, all three sections. SINCE lines are NOT windowed here: \"since the creator was\n * last here\" is a per-viewer fact the page keeps in its own browser, so the page cuts the list; the\n * projection serves every settled run and dispatch it knows, newest first, and every interrupted\n * run whatever its date.\n */\nexport function buildCreationHomeLines(input: CreationHomeLineInputs): readonly CreationHomeLineRow[] {\n const line = (\n section: WorkbenchCreationHomeSection,\n kind: WorkbenchCreationHomeLineKind,\n target: { resourceType: WorkbenchShared_ResourceType; resourceId: string },\n facts: Partial<Pick<CreationHomeLineRow, 'at' | 'playbookRef' | 'taskRef' | 'subject' | 'failed' | 'acceptable' | 'needsAnswers' | 'stuckReason'>> = {},\n ): CreationHomeLineRow => ({\n section,\n kind,\n at: null,\n playbookRef: null,\n taskRef: null,\n subject: null,\n failed: false,\n acceptable: false,\n needsAnswers: false,\n stuckReason: null,\n targetResourceType: target.resourceType,\n targetResourceId: target.resourceId,\n ...facts,\n });\n\n /* SINCE — what happened. */\n const since: CreationHomeLineRow[] = [];\n for (const run of input.runs) {\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOK_RUNS, resourceId: run.workbenchPlaybookRunId };\n if (run.state === Workbench_PlaybookRunState.COMPLETED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_COMPLETED, target, {\n at: run.finishedAt ?? null, playbookRef: run.playbookRef, failed: run.ok === false,\n }));\n /*\n * A RE-RUN inside the run's lanes that did not land, over a landing that stands (#3213): a NON-FATAL repair failure.\n * A failed repair of `build-decompose` used to read only as the lane's REFUSED line, so a person read the whole\n * build as failed while the plan on disk still dispatched. Said once per run, naming every such re-run: a child that\n * re-ran over a recorded landing (`reranOverLanding`, read from the rerun verdict's KIND) or over one this run landed,\n * and failed, kept that landing.\n */\n const failedRepairs = failedRepairsOf(run);\n if (failedRepairs.length > 0) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.REPAIR_FAILED_LANDING_STANDS, target, {\n at: run.finishedAt ?? null,\n playbookRef: failedRepairs[0]!.playbookRef,\n subject: failedRepairs.map((repair) => `${repair.playbookRef}: ${repair.failure}`).join('; '),\n failed: false,\n }));\n }\n } else if (run.state === Workbench_PlaybookRunState.INTERRUPTED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_INTERRUPTED, target, {\n at: run.checkpointedAt ?? run.startedAt ?? null, playbookRef: run.playbookRef,\n }));\n }\n }\n for (const dispatch of input.dispatches) {\n const ending = dispatchEnding(dispatch);\n if (ending === null) continue;\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.DISPATCH_SETTLED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCHES, resourceId: dispatch.workbenchBuildDispatchId }, {\n at: ending.at,\n taskRef: dispatch.taskRef,\n failed: ending.failed,\n /*\n * The one state ACCEPT addresses: a coding run that completed, recorded writes and has none committed.\n * The row's `accepted === false` means exactly that, so it is read as is (#2523).\n */\n acceptable: dispatch.accepted === false,\n }));\n }\n /*\n * The coding agent's account usage limit, while it holds (#2388): one line saying the build is paused and when\n * it resumes. Read from the LIVE hold the dispatch service keeps, never re-derived from a dispatch row: a\n * coding run that started is projected ADMITTED however it ends and carries no error there, so a row-based\n * reading never fired in production (#2388 review F1). It opens the build-plan task whose run met the limit,\n * a row that exists for as long as the plan holds the task. `failed` stays false: the build is paused, not\n * failing, and the kind's own tone says so.\n */\n const limit = input.codingAgentUsageLimit;\n if (limit) {\n // A refused provider ACCOUNT (#3204) is its own kind: a person lifts it, nothing resets, so it never reads as a limit\n // that \"resumes on its own\". Its subject is the refusal's sentence: who refused, and where to fix it.\n since.push(line(WorkbenchCreationHomeSection.SINCE, limit.accountRefusal\n ? WorkbenchCreationHomeLineKind.CODING_AGENT_ACCOUNT_REFUSED\n : WorkbenchCreationHomeLineKind.CODING_AGENT_USAGE_LIMITED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(limit.taskRef) }, {\n at: new Date(limit.observedAt),\n taskRef: limit.taskRef,\n subject: limit.accountRefusal\n ? describeModelProviderAccountRefusal(limit.accountRefusal)\n : describeCodingAgentUsageLimitResume(limit, input.now ?? new Date()),\n }));\n }\n /*\n * The coding agent lost the network (#3236, #3262): one line while the connectivity hold lasts, read from the LIVE\n * hold for the same reason as the usage limit's. Before it, a wave waiting up to twenty minutes on a probe looked\n * stalled, and the hold was a WARN in the companion's log. `failed` stays false: the build is waiting, not failing.\n */\n const connectivity = input.codingAgentConnectivityHold;\n if (connectivity) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.CODING_AGENT_CONNECTIVITY_LOST,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(connectivity.taskRef) }, {\n at: Number.isNaN(Date.parse(connectivity.observedAt)) ? null : new Date(connectivity.observedAt),\n taskRef: connectivity.taskRef,\n subject: connectivity.route ?? null,\n }));\n }\n /*\n * A verification check cannot be asked for a host cause (#3423, #3432): one line while the hold lasts, read from the LIVE\n * hold like the two above, its subject the cause and remedy. `failed` stays false: nothing the creation built is lost.\n */\n const toolHold = input.verificationToolUnavailableHold;\n if (toolHold) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.VERIFICATION_TOOL_UNAVAILABLE,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(toolHold.taskRef) }, {\n at: Number.isNaN(Date.parse(toolHold.observedAt)) ? null : new Date(toolHold.observedAt),\n taskRef: toolHold.taskRef,\n subject: toolHold.cause,\n }));\n }\n /* A person closed a build task (#3224, #3227): `subject` is their reason, in their words; the kind is on the task's record. */\n for (const closure of input.closures ?? []) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.BUILD_TASK_CLOSED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(closure.taskRef) }, {\n at: Number.isNaN(Date.parse(closure.closedAt)) ? null : new Date(closure.closedAt),\n taskRef: closure.taskRef,\n subject: closure.reason,\n }));\n }\n since.sort((left, right) => compareNewestFirst(left.at, right.at));\n\n /* ASKED — what blocks something NOW and waits on the creator. */\n const asked: CreationHomeLineRow[] = [];\n for (const waiting of input.waiting) {\n /* An unreadable checkpoint is a condition to show on its own row, not a question anyone can answer. */\n if (!waiting.readable) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.CLARIFICATION,\n { resourceType: WorkbenchShared_ResourceType.WAITING_PLAYBOOK_RUNS, resourceId: waiting.workbenchWaitingPlaybookRunId },\n { at: waiting.suspendedAt ?? null, playbookRef: waiting.playbookRef ?? null }));\n }\n /*\n * An interview waiting on the creator whose answer would date work the next unattended round could run (#3361). The\n * round withholds that work, so the line is what moves it: answering lets it run once, on the answer. One line per\n * interview, naming the steps it holds; it opens the interview's playbook, whose way in is the interview.\n */\n const heldByInterview = new Map<string, string[]>();\n for (const dated of input.datedByWaitingInterviews ?? []) {\n for (const waiting of dated.waitingOn) heldByInterview.set(waiting.interviewRef, [...(heldByInterview.get(waiting.interviewRef) ?? []), dated.readerRef]);\n }\n for (const [interviewRef, readerRefs] of heldByInterview) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK,\n { resourceType: WorkbenchShared_ResourceType.PLAYBOOKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(interviewRef) },\n { playbookRef: interviewRef, subject: [...new Set(readerRefs)].sort().join(', '), needsAnswers: true }));\n }\n for (const parked of input.parked) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.PARKED_QUESTION,\n { resourceType: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS, resourceId: parked.workbenchParkedCodingQuestionId },\n { at: parked.parkedAt ?? null, taskRef: parked.taskRef }));\n }\n /*\n * Files a build task's runs left uncommitted that nothing will commit on its own (#3267): one line per task, naming\n * each file and its runs. It never stays silently uncommitted; the CLI prints the two doors.\n */\n const leftoversByTask = new Map<string, Array<{ readonly path: string; readonly runTaskIds: readonly string[] }>>();\n for (const leftover of input.uncommittedLeftovers ?? []) leftoversByTask.set(leftover.taskRef, [...(leftoversByTask.get(leftover.taskRef) ?? []), leftover]);\n for (const [taskRef, leftovers] of leftoversByTask) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.RUN_LEFTOVER_UNCOMMITTED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(taskRef) },\n { taskRef, subject: leftovers.map(describeLeftoverForHome).join('; ') }));\n }\n /*\n * A gap only the person can close (#3886): the report said a decision is needed first, so no coding task was derived.\n * One line per reporting task, naming each requirement and its decision.\n */\n const decisionsByTask = new Map<string, string[]>();\n for (const gap of input.gapsAwaitingDecision ?? []) decisionsByTask.set(gap.taskRef, [...(decisionsByTask.get(gap.taskRef) ?? []), `${gap.requirementRef}: ${gap.decision}`]);\n for (const [taskRef, decisions] of decisionsByTask) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.GAP_AWAITS_DECISION,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(taskRef) },\n { taskRef, subject: decisions.join('; ') }));\n }\n for (const document of input.documents) {\n /*\n * Only a document the creator ASKED FOR (a draft exists) and that still needs a fact (#1454,\n * Step 6). A permanent count of every open fact of every undrafted document would train the eye\n * to skip the number.\n */\n if (!document.drafted || document.openCount === 0) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT,\n { resourceType: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS, resourceId: document.workbenchGovernanceDocumentId },\n { subject: document.definitionRef }));\n }\n /*\n * The plan itself, when it can run NOTHING (#1451). The dispatch-plan row carries one entry per\n * ready task dispatch passed over, and a row with no `taskRef` that is not `exhausted` means every\n * one of them is stuck — so this is the state where the plan needs the creator rather than a\n * dispatch. One line per stuck task: each carries its own remedy.\n *\n * Beside a next task the row still lists what the selection skipped, and those are NOT shown here:\n * the plan is moving, and a line asking for something that is not blocking anything is how an\n * ASKED list stops being read.\n */\n for (const row of input.dispatchPlan) {\n // A repair owed is a run still to make, so nothing is asked of a person yet (#3258).\n if (row.taskRef !== null || row.exhausted || row.specificationRepairOwed === true) continue;\n const failingModules = row.failingSpecificationModules ?? [];\n if (failingModules.length > 0) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: row.workbenchBuildDispatchPlanId },\n { subject: failingModules.join(', ') }));\n }\n const stuckTasks = row.stuckTasks ?? [];\n // A task waiting on a live run, its own or one writing its file, proves a run is live (#3204).\n const aRunIsLive = stuckTasks.some((stuck) => WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN.has(stuck.reason));\n for (const stuck of stuckTasks) {\n const ask = STUCK_REASON_ASK[stuck.reason];\n if (ask === StuckTaskAsk.NEVER || (ask === StuckTaskAsk.ASKS_ONCE_NOTHING_RUNS && aRunIsLive)) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: row.workbenchBuildDispatchPlanId },\n { taskRef: stuck.taskRef, stuckReason: stuck.reason }));\n }\n }\n asked.sort((left, right) => {\n const rank = (ASKED_RANK[left.kind] ?? 9) - (ASKED_RANK[right.kind] ?? 9);\n return rank !== 0 ? rank : compareNewestFirst(left.at, right.at);\n });\n\n /*\n * SUGGESTION — what the creator could do next, outcome-first: the plan's next READY task, then\n * eligible playbooks producing a MISSING family before those refreshing a STALE one (a gap is\n * worth more than a refresh), capped.\n */\n const suggestions: CreationHomeLineRow[] = [];\n const next = input.dispatchPlan.find((row) => row.taskRef !== null && row.objective !== null);\n if (next && next.taskRef && next.objective) {\n suggestions.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.CONTINUE_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: next.workbenchBuildDispatchPlanId },\n { taskRef: next.taskRef, subject: next.objective }));\n }\n const missingFamilies = new Set(\n input.artifacts.filter((artifact) => artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED).map((artifact) => artifact.family),\n );\n const producing: CreationHomeLineRow[] = [];\n const refreshing: CreationHomeLineRow[] = [];\n for (const playbook of input.playbooks) {\n if (!playbook.eligible) continue;\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOKS, resourceId: playbook.workbenchPlaybookId };\n const facts = { playbookRef: playbook.playbookRef, needsAnswers: playbook.unansweredQuestionRefs.length > 0 };\n if (playbook.outputOwners.some((owner) => missingFamilies.has(owner.family))) {\n producing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.PRODUCE_MISSING, target, facts));\n } else if (playbook.staleOutputs.length > 0) {\n refreshing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.REFRESH_STALE, target, facts));\n }\n }\n const playbookSuggestions = [...producing, ...refreshing].slice(0, HOME_PLAYBOOK_SUGGESTION_COUNT);\n\n /*\n * A follow-up that LANDED while its latest completed run still reports a requirement unmet (#2583). It landed\n * RAN-not-PROVEN, because holding it unlanded put the whole plan behind a person's decision, the defect\n * `application-creation-directive.md` names. So this is ADVISORY, a SUGGESTION: it never makes anything ineligible and\n * never stops the loop. It names each requirement and what the run said is missing; the door is running it again on\n * purpose, which every renderer prints beside it (`wildo build run <ref> --despite-landed --reason operator-judgement\n * --note \"<why>\"`). Without it the gap was visible only to someone who asked (`wildo context journey`).\n */\n const followUpGaps = (input.followUpsLandedWithGaps ?? []).filter((followUp) => followUp.unmetRequirements.length > 0).map((followUp) => line(\n WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.FOLLOW_UP_LANDED_WITH_GAP,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(followUp.taskRef) },\n { taskRef: followUp.taskRef, subject: followUp.unmetRequirements.map((gap) => `${gap.requirementRef}: ${gap.missing}`).join('; ') },\n ));\n\n /*\n * A task that LANDED with something its landing does not cover left unfinished (#3285): a billing catalogue committed\n * while the backend does not enable billing. ADVISORY, like a follow-up's gap: the task stays landed and nothing stops,\n * because the remedy (a provider secret) is the person's and the switch alone fails backend startup. Without it the\n * mark was visible only on `wildo build tasks` and `wildo creation why`.\n */\n const landingAdvisories = (input.landedTasksWithAdvisories ?? []).filter((task) => task.advisories.length > 0).map((task) => line(\n WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.LANDED_WITH_ADVISORY,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(task.taskRef) },\n { taskRef: task.taskRef, subject: task.advisories.map((advisory) => `${advisory.setting} (${advisory.settingPath})`).join('; ') },\n ));\n\n return [...since, ...asked, ...suggestions, ...followUpGaps, ...landingAdvisories, ...playbookSuggestions];\n}\n\n/**\n * Every specification family belongs to exactly ONE outcome, and the map is TOTAL by construction:\n * `Record<ApplicationSpecificationFamily, …>` makes a family added to the semantic authority a\n * compile error here until it is placed. That is the property the page's mock promised — \"derived\n * from what exists\" — and the reason this is a typed record rather than a lookup with a default.\n *\n * `RISK_REGISTER` is under the rules rather than under what-we-build: it says what the exposure\n * MEANS, which is an obligation, and its playbook is in the compliance analysis.\n *\n * `null` is a placement too, and the map stays total: `CREATOR_INPUTS` — the dossier — is INPUT the\n * creator gives, never a deliverable a step produces, so counting it toward an outcome would make\n * \"know what we build\" one answer closer to done for having been asked a question. A family placed\n * `null` is measured by nothing; the compiler still refuses a family placed nowhere.\n */\nexport const OUTCOME_BY_FAMILY: Readonly<Record<ApplicationSpecificationFamily, WorkbenchCreationOutcome | null>> = {\n [ApplicationSpecificationFamily.VISION_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.MARKET_SNAPSHOT]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.REQUIREMENTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.FEATURE_DRAFTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BUSINESS_MODEL]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.ROADMAP]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BRAND_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_WHAT_WE_BUILD with the brand it names: the name is part of what the product IS. */\n [ApplicationSpecificationFamily.BRAND_NAME_SCREENING]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_WHAT_WE_BUILD: the firm's method is what the product is FOR, decided before the plans built from it. */\n [ApplicationSpecificationFamily.SERVICE_METHOD]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_THE_RULES: which regimes apply is the first thing the rules are (#3362). */\n [ApplicationSpecificationFamily.COMPLIANCE_POSTURE]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_POLICY]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS_AUTHORED]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.PROCESSOR_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.RISK_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOMAIN_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.PLACEMENT_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.BUILD_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n // Which optional packages the application is composed with — part of the application working, like its placement (#1491).\n [ApplicationSpecificationFamily.CAPABILITY_COMPOSITION]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * READY_FOR_A_REAL_USER, not APPLICATION_WORKS: an application works without a marketing site, and\n * what the site says is what a stranger meets first (#1492). The same reading the governed\n * documents carry — the outcome is about facing the public, not about the product functioning.\n */\n [ApplicationSpecificationFamily.WEBSITE_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* Same reading as the website: documentation is what a stranger meets, not what makes the product work. */\n [ApplicationSpecificationFamily.DOCUMENTATION_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* APPLICATION_WORKS: without a composed shell there is no route to the generated screens (#1493). */\n [ApplicationSpecificationFamily.EXPERIENCE_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * APPLICATION_WORKS: a worker the backend delegates to, and a minion that keeps the data true,\n * are part of the product functioning — not of it facing a stranger (#1495). An application whose\n * nightly sweep was never planned works wrongly in a way no screen shows.\n */\n [ApplicationSpecificationFamily.INTEGRATION_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * `null`, and this one is the most important null in the map (#1496): the maturity reading is a\n * MEASUREMENT OF the outcomes, so counting it toward one would let an application advance for\n * having measured itself. It is also never \"done\" by construction — the next requirement lowers\n * it — so an outcome that waited for it could never complete.\n */\n [ApplicationSpecificationFamily.APPLICATION_MATURITY]: null,\n [ApplicationSpecificationFamily.DOCUMENT_PUBLICATION]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_SET]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.CREATOR_INPUTS]: null,\n /*\n * `null` for the same reason as the dossier: the expert-persona charters STAFF the panels that decide\n * placement and the logo; they say nothing about the product itself, so counting them toward an outcome\n * would move \"application works\" for having hired reviewers (#572).\n */\n [ApplicationSpecificationFamily.EXPERT_PERSONAS]: null,\n};\n\nexport interface CreationOutcomeInputs {\n /** The artifact projection's rows, one per family it knows. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n /** Every family some playbook reports as stale — the union of `staleOutputs[].family` over the playbook rows. */\n readonly staleFamilies: ReadonlySet<string>;\n /** The build-plan task rows. */\n readonly tasks: readonly CreationOutcomeTaskRow[];\n /**\n * The build's progress fault (#3258). The rows say `landed` for a step that only ran, so the count is corrected from here,\n * and while it is present no outcome that waits on the build is done.\n */\n readonly specificationFault?: BuildPlanSpecificationFault;\n /**\n * The application's runtimes a live supervisor has paused or is crash-looping (`readUnavailableApplicationRuntimes`,\n * #3365), or undefined when none could answer (#1537).\n */\n readonly unavailableRuntimes?: readonly string[];\n}\n\n/**\n * Where the application stands, outcome by outcome — always four rows, in reading order. \"Done\" is\n * strict: every family of the outcome landed, valid and not stale; for the application working,\n * every build task landed too; for readiness, every OTHER outcome done as well — an application is\n * not ready for a real user because its documents are published while its build plan is\n * half-landed.\n *\n * A family the projection does not report is not counted against an outcome: the population is the\n * reported rows, filtered through the total map, never the map alone.\n */\nexport function buildCreationOutcomes(input: CreationOutcomeInputs): readonly CreationOutcomeRow[] {\n const isFamily = (value: string): value is ApplicationSpecificationFamily => Object.prototype.hasOwnProperty.call(OUTCOME_BY_FAMILY, value);\n\n const counts = new Map<WorkbenchCreationOutcome, { total: number; landed: number; invalid: number; missing: number; stale: number }>();\n for (const outcome of WORKBENCH_CREATION_OUTCOMES_IN_ORDER) counts.set(outcome, { total: 0, landed: 0, invalid: 0, missing: 0, stale: 0 });\n for (const artifact of input.artifacts) {\n if (!isFamily(artifact.family)) continue;\n const outcome = OUTCOME_BY_FAMILY[artifact.family];\n if (outcome === null) continue;\n const count = counts.get(outcome)!;\n count.total += 1;\n if (artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED) count.missing += 1;\n else if (artifact.state === WorkbenchSpecificationArtifactState.LANDED_INVALID || artifact.state === WorkbenchSpecificationArtifactState.UNAVAILABLE) count.invalid += 1;\n else if (input.staleFamilies.has(artifact.family)) count.stale += 1;\n else count.landed += 1;\n }\n\n const tasksTotal = input.tasks.length;\n // A step that only ran is not landed for this count (#3258), and under a live fault nothing here is done (below).\n const ranNotProven = new Set(input.specificationFault?.ranNotProvenTaskRefs ?? []);\n const tasksLanded = input.tasks.filter((task) => task.status === WorkbenchBuildPlanTaskStatus.LANDED && !ranNotProven.has(task.taskRef)).length;\n\n const statusOf = (count: { total: number; landed: number; invalid: number; stale: number }, extraDone: boolean, extraStarted: boolean): WorkbenchCreationOutcomeStatus => {\n const familiesDone = count.total > 0 && count.landed === count.total;\n if (familiesDone && extraDone) return WorkbenchCreationOutcomeStatus.DONE;\n const started = count.landed + count.invalid + count.stale > 0 || extraStarted;\n return started ? WorkbenchCreationOutcomeStatus.IN_PROGRESS : WorkbenchCreationOutcomeStatus.NOT_STARTED;\n };\n\n const rows = new Map<WorkbenchCreationOutcome, CreationOutcomeRow>();\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER.forEach((outcome, position) => {\n const count = counts.get(outcome)!;\n const families = {\n familiesTotal: count.total, familiesLanded: count.landed, familiesInvalid: count.invalid, familiesMissing: count.missing, familiesStale: count.stale,\n };\n if (outcome === WorkbenchCreationOutcome.APPLICATION_WORKS) {\n /*\n * An application that cannot start does not work, whatever has landed (#1537). Measured on the\n * first end-to-end run: the backend was paused by its supervisor for hours while this row read\n * as progress. Never DONE while a runtime is down; still IN_PROGRESS, because the work landed so\n * far is real — the row says what it is, and `unavailableRuntimes` says what stops it.\n */\n const unavailableRuntimes = input.unavailableRuntimes === undefined ? null : [...input.unavailableRuntimes];\n const runtimeDown = unavailableRuntimes !== null && unavailableRuntimes.length > 0;\n rows.set(outcome, {\n outcome, position, ...families, tasksTotal, tasksLanded, unavailableRuntimes,\n status: statusOf(count, tasksTotal > 0 && tasksLanded === tasksTotal && !runtimeDown && input.specificationFault === undefined, tasksLanded > 0 || runtimeDown),\n });\n } else if (outcome === WorkbenchCreationOutcome.READY_FOR_A_REAL_USER) {\n const othersDone = WORKBENCH_CREATION_OUTCOMES_IN_ORDER\n .filter((other) => other !== outcome)\n .every((other) => rows.get(other)?.status === WorkbenchCreationOutcomeStatus.DONE);\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, othersDone, false) });\n } else {\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, true, false) });\n }\n });\n return WORKBENCH_CREATION_OUTCOMES_IN_ORDER.map((outcome) => rows.get(outcome)!);\n}\n\n/** What the outcomes read of a build-plan task row: its status, and its ref to tell a step that only ran (#3258). */\nexport type CreationOutcomeTaskRow = Pick<Workbench_BuildPlanTask, 'status' | 'taskRef'>;\n"]}
|
|
1
|
+
{"version":3,"file":"creation-home-projection.companion.js","sourceRoot":"","sources":["../../../../../src/core/introspection/resources/creation-home-projection.companion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAEL,8BAA8B,EAC9B,wDAAwD,EACxD,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,mCAAmC,EACnC,oCAAoC,EACpC,sCAAsC,GAWvC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,mCAAmC,EAA8B,MAAM,4DAA4D,CAAC;AAyB7I,4EAA4E;AAC5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD,0EAA0E;AAC1E,SAAS,kBAAkB,CAAC,IAAiB,EAAE,KAAkB;IAC/D,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC,CAAC;IAC9B,OAAO,KAAK,CA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AM,KAAK,8BAA8B,CAAC,IAAI,CAAC,CAAC;YACrF,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACpK,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9J,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,oCAAoC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type { BuildPlanSpecificationFault, PlaybookDatedByWaitingInterview } from '@wildo-ai/application-creation-runtime';\nimport { ApplicationSpecificationFamily } from '@wildo-ai/saas-specifications/application-creation';\nimport { FlowsActors_Status, describeModelProviderAccountRefusal } from '@wildo-ai/saas-models';\nimport {\n type BuildTaskClosureKind,\n Workbench_BuildTaskStuckReason,\n WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN,\n Workbench_PlaybookRunState,\n WorkbenchBuildPlanTaskStatus,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n WorkbenchCreationOutcome,\n WorkbenchCreationOutcomeStatus,\n WorkbenchShared_ResourceType,\n WorkbenchSpecificationArtifactState,\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER,\n sanitizeWorkbenchCreationPlaneIdentity,\n type Workbench_BuildDispatch,\n type Workbench_BuildDispatchPlan,\n type Workbench_BuildPlanTask,\n type Workbench_CreationHomeLine,\n type Workbench_CreationOutcome,\n type Workbench_GovernanceDocument,\n type Workbench_ParkedCodingQuestion,\n type Workbench_Playbook,\n type Workbench_PlaybookRun,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\nimport { describeCodingAgentUsageLimitResume, type CodingAgentUsageLimit } from '../../../claude-cli/models/coding-agent-usage-limit.models';\n\n/**\n * HOME, derived (#1454): the lines the conversation page opens on, and where the application\n * stands — pure functions of the creation-plane rows the projection service already computes.\n *\n * ## Why here and not in the page\n *\n * Until 2026-09-22 the workbench read seven resources on their own cadences and derived every one\n * of these facts itself, on every poll, in three modules nothing but the page could reach. A line\n * is a FACT about the application (\"this run was refused\", \"this task's writes wait to be\n * committed\", \"this step can run and its output is missing\"); facts are derived where the rows are,\n * once, and served as rows (`derive-before-you-ask.md`). The page renders; the assistant's tools read\n * the same rows; and a test of the derivation is a test of what every reader sees.\n *\n * Both builders take the ROWS — the projected shapes the resources serve — rather than the companion\n * services' own records, so a fact is decided from exactly what a reader could see, never from a\n * field the projection dropped.\n */\n\n/** The row shape the home-lines projection emits, before the identity is stamped. */\nexport type CreationHomeLineRow = Omit<Workbench_CreationHomeLine, 'workbenchCreationHomeLineId'>;\n/** The row shape the outcomes projection emits, before the identity is stamped. */\nexport type CreationOutcomeRow = Omit<Workbench_CreationOutcome, 'workbenchCreationOutcomeId'>;\n\n/** How many playbook suggestions Home shows beside the plan's next step. */\nexport const HOME_PLAYBOOK_SUGGESTION_COUNT = 3;\n\n/** Newest first; a row with no instant sorts after every row with one. */\nfunction compareNewestFirst(left: Date | null, right: Date | null): number {\n if (left === null && right === null) return 0;\n if (left === null) return 1;\n if (right === null) return -1;\n return right.getTime() - left.getTime();\n}\n\n/**\n * The RANKING of what is asked of the creator: what stops a run that is otherwise executing comes\n * first (a clarification, a parked question); a document waiting on a fact does not block a run and\n * comes after. Within a rank, newest first.\n */\nconst ASKED_RANK: Readonly<Partial<Record<WorkbenchCreationHomeLineKind, number>>> = {\n [WorkbenchCreationHomeLineKind.CLARIFICATION]: 0,\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION]: 0,\n [WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT]: 1,\n /*\n * Below a question (which holds a live agent session) and above a document: the plan is frozen\n * until it is unblocked, and the remedy is a fixed declaration, a re-arm or an approval.\n */\n [WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN]: 1,\n /* A question like a clarification: answering it is what lets the work it holds run (#3361). */\n [WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK]: 0,\n /* Ahead of the steps it holds: fixing the module is what moves them (#3258). */\n [WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN]: 0,\n /* Beside a frozen plan: nothing runs on it, and it stays uncommitted until the creator commits or discards it (#3267). */\n [WorkbenchCreationHomeLineKind.RUN_LEFTOVER_UNCOMMITTED]: 1,\n [WorkbenchCreationHomeLineKind.GAP_AWAITS_DECISION]: 1,\n};\n\n/** Whether a stuck task, on a plan that can dispatch nothing, is a thing waiting on the CREATOR (#2412). */\nenum StuckTaskAsk {\n /** It needs the creator: fix a declaration or the work, re-arm a task whose attempts are spent, or a missing blueprint. */\n ASKS = 'asks',\n /** It needs the creator only once no run of the plan is live; while one is, the wave that wrote it has yet to commit. */\n ASKS_ONCE_NOTHING_RUNS = 'asks-once-nothing-runs',\n /** Nobody's move, or already asked on a line of its own. */\n NEVER = 'never',\n}\n\n/**\n * How each stuck reason reads in ASKED. Total over the reasons, so a reason added tomorrow has to be classified here\n * rather than landing in ASKED by default.\n *\n * `app-creation-test-005` printed \"the build plan is stuck at …: in_flight\" three times, and three more lines for a\n * product awaiting its commit (a reason retired with #3514, since landing reads the working tree), in ONE running wave,\n * and the hook counted all six as questions. Neither was the creator's move:\n *\n * - `IN_FLIGHT` — a run of it is live and it clears when that run settles. NEVER.\n * - `PARKED_AWAITING_ANSWER` — its question is already a `PARKED_QUESTION` line, one per question. NEVER, or it is\n * asked twice.\n */\nconst STUCK_REASON_ASK: Readonly<Record<Workbench_BuildTaskStuckReason, StuckTaskAsk>> = {\n [Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED]: StuckTaskAsk.ASKS,\n [Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER]: StuckTaskAsk.NEVER,\n [Workbench_BuildTaskStuckReason.NO_DOCUMENT_BLUEPRINT]: StuckTaskAsk.ASKS,\n [Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED]: StuckTaskAsk.ASKS,\n [Workbench_BuildTaskStuckReason.IN_FLIGHT]: StuckTaskAsk.NEVER,\n /* #3204: it starts when the run writing its file settles; nobody can do anything about it. */\n [Workbench_BuildTaskStuckReason.CONTENDED]: StuckTaskAsk.NEVER,\n /* #3204, #3998: it is re-checked alone by itself (once nothing live writes what it reads, or at the wave's end); nobody can do anything about it. */\n [Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK]: StuckTaskAsk.NEVER,\n [Workbench_BuildTaskStuckReason.RAN_THIS_WAVE]: StuckTaskAsk.NEVER,\n /*\n * #3223: a generation step whose landing check could not be answered. Usually it heals by itself (an introspection or a\n * CLI still warming), and Home asks only when nothing else can run — then the check is persistently unanswerable, and the\n * dispatch refusal names the check and the command that shows what the creator has to repair.\n */\n [Workbench_BuildTaskStuckReason.LANDING_UNKNOWN]: StuckTaskAsk.ASKS,\n /* #3227: under GUIDED a derived follow-up waits for the creator's review, which only they can give. */\n [Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW]: StuckTaskAsk.ASKS,\n /*\n * Stale expert charters are repaired by the build-dispatch step, which runs the staffing step on its own. Asked only once\n * nothing runs: then the repair did not take, or a person edited a charter, whose remedy is theirs.\n */\n [Workbench_BuildTaskStuckReason.STALE_EXPERT_CHARTERS]: StuckTaskAsk.ASKS_ONCE_NOTHING_RUNS,\n /*\n * #3709: a generation step failing the same way on unchanged inputs. Its cause needs a fix, often outside the\n * application (an engine's examples, an engine label key), and only a person makes it: asked, like an exhausted budget.\n */\n [Workbench_BuildTaskStuckReason.REPEATED_IDENTICAL_FAILURE]: StuckTaskAsk.ASKS,\n /* #3709: a step failing on a cause the framework owns. Only a framework fix and a person's re-run clear it: asked. */\n [Workbench_BuildTaskStuckReason.FAILURE_OUTSIDE_APPLICATION]: StuckTaskAsk.ASKS,\n};\n\nexport interface CreationHomeLineInputs {\n readonly runs: readonly Workbench_PlaybookRun[];\n readonly dispatches: readonly Workbench_BuildDispatch[];\n readonly waiting: readonly Workbench_WaitingPlaybookRun[];\n readonly parked: readonly Workbench_ParkedCodingQuestion[];\n readonly documents: readonly Workbench_GovernanceDocument[];\n readonly dispatchPlan: readonly Workbench_BuildDispatchPlan[];\n readonly playbooks: readonly Workbench_Playbook[];\n /** Every family the artifact projection reports, with its state. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n /**\n * The coding agent's usage limit holding the build NOW (#2388) — the dispatch service's live hold, which is the\n * pause itself, so the line exists exactly while the build is paused. Absent when nothing holds it.\n */\n readonly codingAgentUsageLimit?: CodingAgentUsageLimit & { readonly taskRef: string };\n /**\n * The network loss holding coding admissions NOW (#3236, #3262) — the dispatch service's live connectivity hold, so the\n * line exists exactly while no coding turn is admitted. `route` is the probe's route in words, absent when none is known.\n */\n readonly codingAgentConnectivityHold?: { readonly observedAt: string; readonly taskRef: string; readonly route?: string };\n /**\n * The host cause holding coding admissions NOW (#3423, #3432): the dispatch service's live hold, so the line exists\n * exactly while no coding turn is admitted for it. `cause` is the cause and its remedy in one sentence\n * (`describeVerificationHostCause`): an absent command, a command lacking the verb, or a check that cannot be asked the\n * same way on two tasks.\n */\n readonly verificationToolUnavailableHold?: { readonly observedAt: string; readonly taskRef: string; readonly cause: string };\n /** The instant the resume time is worded against (its date shows when it is not today); the read's own when omitted. */\n readonly now?: Date;\n /**\n * The build tasks a person CLOSED (`wildo build close`, #3224, #3227) whose closure counts now: one SINCE line each, so\n * the feed and Home say that a person, not a probe, settled them. The line carries the person's own words only; how the\n * closure accounts for the task (its kind, what satisfied it) is on the task's record, worded from the vocabulary.\n */\n readonly closures?: readonly { readonly taskRef: string; readonly kind: BuildTaskClosureKind; readonly satisfiedBy?: string; readonly reason: string; readonly closedAt: string }[];\n /**\n * The derived follow-ups that landed while their latest completed run still reports a requirement unmet (#2583): one\n * ADVISORY suggestion each. A projection of the follow-up's landing and that run's report, never a stored state.\n */\n readonly followUpsLandedWithGaps?: readonly { readonly taskRef: string; readonly unmetRequirements: readonly { readonly requirementRef: string; readonly missing: string }[] }[];\n /**\n * Files a task's coding runs left uncommitted that no automatic door will commit (#3267; a stuck task's declared product aside, #3204), from the commit door's own\n * reading of the write register and the tree (`listUncommittedRunLeftovers`): one ASKED line per task.\n */\n readonly uncommittedLeftovers?: readonly { readonly taskRef: string; readonly path: string; readonly runTaskIds: readonly string[] }[];\n /**\n * The reported gaps only a person's decision can close (#3886: a report's `needsDecision`), from the follow-up derivation:\n * one ASKED line per reporting task, naming each requirement and its decision. Derived from the latest runs, never stored.\n */\n readonly gapsAwaitingDecision?: readonly { readonly taskRef: string; readonly requirementRef: string; readonly decision: string }[];\n /**\n * The LANDED tasks carrying a landing advisory (#3285, `readLandedTasksWithAdvisories`): one ADVISORY suggestion each,\n * naming each setting still to set and its file. Derived from the committed tree, never stored.\n */\n readonly landedTasksWithAdvisories?: readonly { readonly taskRef: string; readonly advisories: readonly { readonly setting: string; readonly settingPath: string }[] }[];\n /**\n * The steps an unattended round withholds because an interview still waiting on the person would date them (#3361), from\n * the eligibility board (`findReadersDatedByWaitingInterviews`): one ASKED line per waiting interview.\n */\n readonly datedByWaitingInterviews?: readonly PlaybookDatedByWaitingInterview[];\n}\n\n/** One leftover in a Home line's subject: the file, and the runs whose record holds it as it is now (#3267). */\nfunction describeLeftoverForHome(leftover: { readonly path: string; readonly runTaskIds: readonly string[] }): string {\n return `${leftover.path} (recorded by ${leftover.runTaskIds.length === 1 ? 'run' : 'runs'} ${leftover.runTaskIds.join(', ')})`;\n}\n\n\n/**\n * When a build dispatch ENDED, and whether it failed — or `null` while it has not (#2523).\n *\n * Read from the dispatch's RUN — the execution it is — for both executors. Home used to read the phase, which\n * is a generation step's outcome but only a coding run's hand-off (it stops at ADMITTED by design), so no\n * coding run ever appeared as settled. A dispatch refused before its run started ends its execution too\n * (ABORTED or FAILED), so it is read the same way.\n */\nexport function dispatchEnding(dispatch: Workbench_BuildDispatch): { readonly at: Date | null; readonly failed: boolean } | null {\n if (!RUN_HAS_ENDED[dispatch.runStatus]) return null;\n return { at: dispatch.runFinishedAt ?? dispatch.settledAt ?? null, failed: dispatch.runStatus !== FlowsActors_Status.COMPLETED };\n}\n\n/**\n * Which execution statuses END a run. Total over the vocabulary, so a status added to it is a compile error\n * here rather than a run Home silently never lists. A run waiting on an answer has not ended: it parks and\n * resumes under the same execution.\n */\nconst RUN_HAS_ENDED: Record<FlowsActors_Status, boolean> = {\n [FlowsActors_Status.READY]: false,\n [FlowsActors_Status.PENDING]: false,\n [FlowsActors_Status.PROCESSING]: false,\n [FlowsActors_Status.AWAITING_APPROVAL]: false,\n [FlowsActors_Status.COMPLETED]: true,\n [FlowsActors_Status.FAILED]: true,\n [FlowsActors_Status.CANCELLED]: true,\n [FlowsActors_Status.ABORTED]: true,\n};\n\n/**\n * The re-runs inside a run's lanes that did not land while their family's earlier landing stands (#3213), latest failure\n * per playbook, in the order they first appear. A landing STANDS — the runtime's own rule (`landingStands` in the\n * choreography) — when the child re-ran over a landing the record held (`reranOverLanding`: a REFRESH, or a CURRENT\n * landing re-opened), or when an earlier round of this run landed it. A FIRST run that failed left nothing to stand and\n * is never one: `ranBecause` cannot tell them apart, since it is written for a first run too.\n */\nfunction failedRepairsOf(run: Workbench_PlaybookRun): ReadonlyArray<{ readonly playbookRef: string; readonly failure: string }> {\n const latest = new Map<string, string>();\n const landedInThisRun = new Set<string>();\n for (const round of run.choreographyRounds ?? []) {\n for (const child of round.children) {\n if (child.failure === null) {\n // A run of the playbook that landed: it delivered (so a later failure stands on it), and it repaired any earlier one.\n if (child.landed.length > 0) landedInThisRun.add(child.playbookRef);\n latest.delete(child.playbookRef);\n } else if (child.reranOverLanding === true || landedInThisRun.has(child.playbookRef)) {\n latest.set(child.playbookRef, child.failure);\n }\n }\n }\n return [...latest].map(([playbookRef, failure]) => ({ playbookRef, failure }));\n}\n\n/**\n * Every line of Home, all three sections. SINCE lines are NOT windowed here: \"since the creator was\n * last here\" is a per-viewer fact the page keeps in its own browser, so the page cuts the list; the\n * projection serves every settled run and dispatch it knows, newest first, and every interrupted\n * run whatever its date.\n */\nexport function buildCreationHomeLines(input: CreationHomeLineInputs): readonly CreationHomeLineRow[] {\n const line = (\n section: WorkbenchCreationHomeSection,\n kind: WorkbenchCreationHomeLineKind,\n target: { resourceType: WorkbenchShared_ResourceType; resourceId: string },\n facts: Partial<Pick<CreationHomeLineRow, 'at' | 'playbookRef' | 'taskRef' | 'subject' | 'failed' | 'acceptable' | 'needsAnswers' | 'stuckReason'>> = {},\n ): CreationHomeLineRow => ({\n section,\n kind,\n at: null,\n playbookRef: null,\n taskRef: null,\n subject: null,\n failed: false,\n acceptable: false,\n needsAnswers: false,\n stuckReason: null,\n targetResourceType: target.resourceType,\n targetResourceId: target.resourceId,\n ...facts,\n });\n\n /* SINCE — what happened. */\n const since: CreationHomeLineRow[] = [];\n for (const run of input.runs) {\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOK_RUNS, resourceId: run.workbenchPlaybookRunId };\n if (run.state === Workbench_PlaybookRunState.COMPLETED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_COMPLETED, target, {\n at: run.finishedAt ?? null, playbookRef: run.playbookRef, failed: run.ok === false,\n }));\n /*\n * A RE-RUN inside the run's lanes that did not land, over a landing that stands (#3213): a NON-FATAL repair failure.\n * A failed repair of `build-decompose` used to read only as the lane's REFUSED line, so a person read the whole\n * build as failed while the plan on disk still dispatched. Said once per run, naming every such re-run: a child that\n * re-ran over a recorded landing (`reranOverLanding`, read from the rerun verdict's KIND) or over one this run landed,\n * and failed, kept that landing.\n */\n const failedRepairs = failedRepairsOf(run);\n if (failedRepairs.length > 0) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.REPAIR_FAILED_LANDING_STANDS, target, {\n at: run.finishedAt ?? null,\n playbookRef: failedRepairs[0]!.playbookRef,\n subject: failedRepairs.map((repair) => `${repair.playbookRef}: ${repair.failure}`).join('; '),\n failed: false,\n }));\n }\n } else if (run.state === Workbench_PlaybookRunState.INTERRUPTED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_INTERRUPTED, target, {\n at: run.checkpointedAt ?? run.startedAt ?? null, playbookRef: run.playbookRef,\n }));\n }\n }\n for (const dispatch of input.dispatches) {\n const ending = dispatchEnding(dispatch);\n if (ending === null) continue;\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.DISPATCH_SETTLED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCHES, resourceId: dispatch.workbenchBuildDispatchId }, {\n at: ending.at,\n taskRef: dispatch.taskRef,\n failed: ending.failed,\n /*\n * The one state ACCEPT addresses: a coding run that completed, recorded writes and has none committed.\n * The row's `accepted === false` means exactly that, so it is read as is (#2523).\n */\n acceptable: dispatch.accepted === false,\n }));\n }\n /*\n * The coding agent's account usage limit, while it holds (#2388): one line saying the build is paused and when\n * it resumes. Read from the LIVE hold the dispatch service keeps, never re-derived from a dispatch row: a\n * coding run that started is projected ADMITTED however it ends and carries no error there, so a row-based\n * reading never fired in production (#2388 review F1). It opens the build-plan task whose run met the limit,\n * a row that exists for as long as the plan holds the task. `failed` stays false: the build is paused, not\n * failing, and the kind's own tone says so.\n */\n const limit = input.codingAgentUsageLimit;\n if (limit) {\n // A refused provider ACCOUNT (#3204) is its own kind: a person lifts it, nothing resets, so it never reads as a limit\n // that \"resumes on its own\". Its subject is the refusal's sentence: who refused, and where to fix it.\n since.push(line(WorkbenchCreationHomeSection.SINCE, limit.accountRefusal\n ? WorkbenchCreationHomeLineKind.CODING_AGENT_ACCOUNT_REFUSED\n : WorkbenchCreationHomeLineKind.CODING_AGENT_USAGE_LIMITED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(limit.taskRef) }, {\n at: new Date(limit.observedAt),\n taskRef: limit.taskRef,\n subject: limit.accountRefusal\n ? describeModelProviderAccountRefusal(limit.accountRefusal)\n : describeCodingAgentUsageLimitResume(limit, input.now ?? new Date()),\n }));\n }\n /*\n * The coding agent lost the network (#3236, #3262): one line while the connectivity hold lasts, read from the LIVE\n * hold for the same reason as the usage limit's. Before it, a wave waiting up to twenty minutes on a probe looked\n * stalled, and the hold was a WARN in the companion's log. `failed` stays false: the build is waiting, not failing.\n */\n const connectivity = input.codingAgentConnectivityHold;\n if (connectivity) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.CODING_AGENT_CONNECTIVITY_LOST,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(connectivity.taskRef) }, {\n at: Number.isNaN(Date.parse(connectivity.observedAt)) ? null : new Date(connectivity.observedAt),\n taskRef: connectivity.taskRef,\n subject: connectivity.route ?? null,\n }));\n }\n /*\n * A verification check cannot be asked for a host cause (#3423, #3432): one line while the hold lasts, read from the LIVE\n * hold like the two above, its subject the cause and remedy. `failed` stays false: nothing the creation built is lost.\n */\n const toolHold = input.verificationToolUnavailableHold;\n if (toolHold) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.VERIFICATION_TOOL_UNAVAILABLE,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(toolHold.taskRef) }, {\n at: Number.isNaN(Date.parse(toolHold.observedAt)) ? null : new Date(toolHold.observedAt),\n taskRef: toolHold.taskRef,\n subject: toolHold.cause,\n }));\n }\n /* A person closed a build task (#3224, #3227): `subject` is their reason, in their words; the kind is on the task's record. */\n for (const closure of input.closures ?? []) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.BUILD_TASK_CLOSED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(closure.taskRef) }, {\n at: Number.isNaN(Date.parse(closure.closedAt)) ? null : new Date(closure.closedAt),\n taskRef: closure.taskRef,\n subject: closure.reason,\n }));\n }\n since.sort((left, right) => compareNewestFirst(left.at, right.at));\n\n /* ASKED — what blocks something NOW and waits on the creator. */\n const asked: CreationHomeLineRow[] = [];\n for (const waiting of input.waiting) {\n /* An unreadable checkpoint is a condition to show on its own row, not a question anyone can answer. */\n if (!waiting.readable) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.CLARIFICATION,\n { resourceType: WorkbenchShared_ResourceType.WAITING_PLAYBOOK_RUNS, resourceId: waiting.workbenchWaitingPlaybookRunId },\n { at: waiting.suspendedAt ?? null, playbookRef: waiting.playbookRef ?? null }));\n }\n /*\n * An interview waiting on the creator whose answer would date work the next unattended round could run (#3361). The\n * round withholds that work, so the line is what moves it: answering lets it run once, on the answer. One line per\n * interview, naming the steps it holds; it opens the interview's playbook, whose way in is the interview.\n */\n const heldByInterview = new Map<string, string[]>();\n for (const dated of input.datedByWaitingInterviews ?? []) {\n for (const waiting of dated.waitingOn) heldByInterview.set(waiting.interviewRef, [...(heldByInterview.get(waiting.interviewRef) ?? []), dated.readerRef]);\n }\n for (const [interviewRef, readerRefs] of heldByInterview) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK,\n { resourceType: WorkbenchShared_ResourceType.PLAYBOOKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(interviewRef) },\n { playbookRef: interviewRef, subject: [...new Set(readerRefs)].sort().join(', '), needsAnswers: true }));\n }\n for (const parked of input.parked) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.PARKED_QUESTION,\n { resourceType: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS, resourceId: parked.workbenchParkedCodingQuestionId },\n { at: parked.parkedAt ?? null, taskRef: parked.taskRef }));\n }\n /*\n * Files a build task's runs left uncommitted that nothing will commit on its own (#3267): one line per task, naming\n * each file and its runs. It never stays silently uncommitted; the CLI prints the two doors.\n */\n const leftoversByTask = new Map<string, Array<{ readonly path: string; readonly runTaskIds: readonly string[] }>>();\n for (const leftover of input.uncommittedLeftovers ?? []) leftoversByTask.set(leftover.taskRef, [...(leftoversByTask.get(leftover.taskRef) ?? []), leftover]);\n for (const [taskRef, leftovers] of leftoversByTask) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.RUN_LEFTOVER_UNCOMMITTED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(taskRef) },\n { taskRef, subject: leftovers.map(describeLeftoverForHome).join('; ') }));\n }\n /*\n * A gap only the person can close (#3886): the report said a decision is needed first, so no coding task was derived.\n * One line per reporting task, naming each requirement and its decision.\n */\n const decisionsByTask = new Map<string, string[]>();\n for (const gap of input.gapsAwaitingDecision ?? []) decisionsByTask.set(gap.taskRef, [...(decisionsByTask.get(gap.taskRef) ?? []), `${gap.requirementRef}: ${gap.decision}`]);\n for (const [taskRef, decisions] of decisionsByTask) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.GAP_AWAITS_DECISION,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(taskRef) },\n { taskRef, subject: decisions.join('; ') }));\n }\n for (const document of input.documents) {\n /*\n * Only a document the creator ASKED FOR (a draft exists) and that still needs a fact (#1454,\n * Step 6). A permanent count of every open fact of every undrafted document would train the eye\n * to skip the number.\n */\n if (!document.drafted || document.openCount === 0) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT,\n { resourceType: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS, resourceId: document.workbenchGovernanceDocumentId },\n { subject: document.definitionRef }));\n }\n /*\n * The plan itself, when it can run NOTHING (#1451). The dispatch-plan row carries one entry per\n * ready task dispatch passed over, and a row with no `taskRef` that is not `exhausted` means every\n * one of them is stuck — so this is the state where the plan needs the creator rather than a\n * dispatch. One line per stuck task: each carries its own remedy.\n *\n * Beside a next task the row still lists what the selection skipped, and those are NOT shown here:\n * the plan is moving, and a line asking for something that is not blocking anything is how an\n * ASKED list stops being read.\n */\n for (const row of input.dispatchPlan) {\n // A repair owed is a run still to make, so nothing is asked of a person yet (#3258).\n if (row.taskRef !== null || row.exhausted || row.specificationRepairOwed === true) continue;\n const failingModules = row.failingSpecificationModules ?? [];\n if (failingModules.length > 0) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: row.workbenchBuildDispatchPlanId },\n { subject: failingModules.join(', ') }));\n }\n const stuckTasks = row.stuckTasks ?? [];\n // A task waiting on a live run, its own or one writing its file, proves a run is live (#3204).\n const aRunIsLive = stuckTasks.some((stuck) => WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN.has(stuck.reason));\n for (const stuck of stuckTasks) {\n const ask = STUCK_REASON_ASK[stuck.reason];\n if (ask === StuckTaskAsk.NEVER || (ask === StuckTaskAsk.ASKS_ONCE_NOTHING_RUNS && aRunIsLive)) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: row.workbenchBuildDispatchPlanId },\n { taskRef: stuck.taskRef, stuckReason: stuck.reason }));\n }\n }\n asked.sort((left, right) => {\n const rank = (ASKED_RANK[left.kind] ?? 9) - (ASKED_RANK[right.kind] ?? 9);\n return rank !== 0 ? rank : compareNewestFirst(left.at, right.at);\n });\n\n /*\n * SUGGESTION — what the creator could do next, outcome-first: the plan's next READY task, then\n * eligible playbooks producing a MISSING family before those refreshing a STALE one (a gap is\n * worth more than a refresh), capped.\n */\n const suggestions: CreationHomeLineRow[] = [];\n const next = input.dispatchPlan.find((row) => row.taskRef !== null && row.objective !== null);\n if (next && next.taskRef && next.objective) {\n suggestions.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.CONTINUE_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: next.workbenchBuildDispatchPlanId },\n { taskRef: next.taskRef, subject: next.objective }));\n }\n const missingFamilies = new Set(\n input.artifacts.filter((artifact) => artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED).map((artifact) => artifact.family),\n );\n const producing: CreationHomeLineRow[] = [];\n const refreshing: CreationHomeLineRow[] = [];\n for (const playbook of input.playbooks) {\n if (!playbook.eligible) continue;\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOKS, resourceId: playbook.workbenchPlaybookId };\n const facts = { playbookRef: playbook.playbookRef, needsAnswers: playbook.unansweredQuestionRefs.length > 0 };\n if (playbook.outputOwners.some((owner) => missingFamilies.has(owner.family))) {\n producing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.PRODUCE_MISSING, target, facts));\n } else if (playbook.staleOutputs.length > 0) {\n refreshing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.REFRESH_STALE, target, facts));\n }\n }\n const playbookSuggestions = [...producing, ...refreshing].slice(0, HOME_PLAYBOOK_SUGGESTION_COUNT);\n\n /*\n * A follow-up that LANDED while its latest completed run still reports a requirement unmet (#2583). It landed\n * RAN-not-PROVEN, because holding it unlanded put the whole plan behind a person's decision, the defect\n * `application-creation-directive.md` names. So this is ADVISORY, a SUGGESTION: it never makes anything ineligible and\n * never stops the loop. It names each requirement and what the run said is missing; the door is running it again on\n * purpose, which every renderer prints beside it (`wildo build run <ref> --despite-landed --reason operator-judgement\n * --note \"<why>\"`). Without it the gap was visible only to someone who asked (`wildo context journey`).\n */\n const followUpGaps = (input.followUpsLandedWithGaps ?? []).filter((followUp) => followUp.unmetRequirements.length > 0).map((followUp) => line(\n WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.FOLLOW_UP_LANDED_WITH_GAP,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(followUp.taskRef) },\n { taskRef: followUp.taskRef, subject: followUp.unmetRequirements.map((gap) => `${gap.requirementRef}: ${gap.missing}`).join('; ') },\n ));\n\n /*\n * A task that LANDED with something its landing does not cover left unfinished (#3285): a billing catalogue committed\n * while the backend does not enable billing. ADVISORY, like a follow-up's gap: the task stays landed and nothing stops,\n * because the remedy (a provider secret) is the person's and the switch alone fails backend startup. Without it the\n * mark was visible only on `wildo build tasks` and `wildo creation why`.\n */\n const landingAdvisories = (input.landedTasksWithAdvisories ?? []).filter((task) => task.advisories.length > 0).map((task) => line(\n WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.LANDED_WITH_ADVISORY,\n { resourceType: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS, resourceId: sanitizeWorkbenchCreationPlaneIdentity(task.taskRef) },\n { taskRef: task.taskRef, subject: task.advisories.map((advisory) => `${advisory.setting} (${advisory.settingPath})`).join('; ') },\n ));\n\n return [...since, ...asked, ...suggestions, ...followUpGaps, ...landingAdvisories, ...playbookSuggestions];\n}\n\n/**\n * Every specification family belongs to exactly ONE outcome, and the map is TOTAL by construction:\n * `Record<ApplicationSpecificationFamily, …>` makes a family added to the semantic authority a\n * compile error here until it is placed. That is the property the page's mock promised — \"derived\n * from what exists\" — and the reason this is a typed record rather than a lookup with a default.\n *\n * `RISK_REGISTER` is under the rules rather than under what-we-build: it says what the exposure\n * MEANS, which is an obligation, and its playbook is in the compliance analysis.\n *\n * `null` is a placement too, and the map stays total: `CREATOR_INPUTS` — the dossier — is INPUT the\n * creator gives, never a deliverable a step produces, so counting it toward an outcome would make\n * \"know what we build\" one answer closer to done for having been asked a question. A family placed\n * `null` is measured by nothing; the compiler still refuses a family placed nowhere.\n */\nexport const OUTCOME_BY_FAMILY: Readonly<Record<ApplicationSpecificationFamily, WorkbenchCreationOutcome | null>> = {\n [ApplicationSpecificationFamily.VISION_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.MARKET_SNAPSHOT]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.REQUIREMENTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.FEATURE_DRAFTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BUSINESS_MODEL]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.ROADMAP]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BRAND_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_WHAT_WE_BUILD with the brand it names: the name is part of what the product IS. */\n [ApplicationSpecificationFamily.BRAND_NAME_SCREENING]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_WHAT_WE_BUILD: the firm's method is what the product is FOR, decided before the plans built from it. */\n [ApplicationSpecificationFamily.SERVICE_METHOD]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_THE_RULES: which regimes apply is the first thing the rules are (#3362). */\n [ApplicationSpecificationFamily.COMPLIANCE_POSTURE]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_POLICY]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS_AUTHORED]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.PROCESSOR_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.RISK_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOMAIN_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.PLACEMENT_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.BUILD_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n // Which optional packages the application is composed with — part of the application working, like its placement (#1491).\n [ApplicationSpecificationFamily.CAPABILITY_COMPOSITION]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * READY_FOR_A_REAL_USER, not APPLICATION_WORKS: an application works without a marketing site, and\n * what the site says is what a stranger meets first (#1492). The same reading the governed\n * documents carry — the outcome is about facing the public, not about the product functioning.\n */\n [ApplicationSpecificationFamily.WEBSITE_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* Same reading as the website: documentation is what a stranger meets, not what makes the product work. */\n [ApplicationSpecificationFamily.DOCUMENTATION_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* APPLICATION_WORKS: without a composed shell there is no route to the generated screens (#1493). */\n [ApplicationSpecificationFamily.EXPERIENCE_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * APPLICATION_WORKS: a worker the backend delegates to, and a minion that keeps the data true,\n * are part of the product functioning — not of it facing a stranger (#1495). An application whose\n * nightly sweep was never planned works wrongly in a way no screen shows.\n */\n [ApplicationSpecificationFamily.INTEGRATION_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * `null`, and this one is the most important null in the map (#1496): the maturity reading is a\n * MEASUREMENT OF the outcomes, so counting it toward one would let an application advance for\n * having measured itself. It is also never \"done\" by construction — the next requirement lowers\n * it — so an outcome that waited for it could never complete.\n */\n [ApplicationSpecificationFamily.APPLICATION_MATURITY]: null,\n [ApplicationSpecificationFamily.DOCUMENT_PUBLICATION]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_SET]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.CREATOR_INPUTS]: null,\n /*\n * `null` for the same reason as the dossier: the expert-persona charters STAFF the panels that decide\n * placement and the logo; they say nothing about the product itself, so counting them toward an outcome\n * would move \"application works\" for having hired reviewers (#572).\n */\n [ApplicationSpecificationFamily.EXPERT_PERSONAS]: null,\n};\n\nexport interface CreationOutcomeInputs {\n /** The artifact projection's rows, one per family it knows. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n /** Every family some playbook reports as stale — the union of `staleOutputs[].family` over the playbook rows. */\n readonly staleFamilies: ReadonlySet<string>;\n /** The build-plan task rows. */\n readonly tasks: readonly CreationOutcomeTaskRow[];\n /**\n * The build's progress fault (#3258). The rows say `landed` for a step that only ran, so the count is corrected from here,\n * and while it is present no outcome that waits on the build is done.\n */\n readonly specificationFault?: BuildPlanSpecificationFault;\n /**\n * The application's runtimes a live supervisor has paused or is crash-looping (`readUnavailableApplicationRuntimes`,\n * #3365), or undefined when none could answer (#1537).\n */\n readonly unavailableRuntimes?: readonly string[];\n}\n\n/**\n * Where the application stands, outcome by outcome — always four rows, in reading order. \"Done\" is\n * strict: every family of the outcome landed, valid and not stale; for the application working,\n * every build task landed too; for readiness, every OTHER outcome done as well — an application is\n * not ready for a real user because its documents are published while its build plan is\n * half-landed.\n *\n * A family the projection does not report is not counted against an outcome: the population is the\n * reported rows, filtered through the total map, never the map alone.\n */\nexport function buildCreationOutcomes(input: CreationOutcomeInputs): readonly CreationOutcomeRow[] {\n const isFamily = (value: string): value is ApplicationSpecificationFamily => Object.prototype.hasOwnProperty.call(OUTCOME_BY_FAMILY, value);\n\n const counts = new Map<WorkbenchCreationOutcome, { total: number; landed: number; invalid: number; missing: number; stale: number }>();\n for (const outcome of WORKBENCH_CREATION_OUTCOMES_IN_ORDER) counts.set(outcome, { total: 0, landed: 0, invalid: 0, missing: 0, stale: 0 });\n for (const artifact of input.artifacts) {\n if (!isFamily(artifact.family)) continue;\n const outcome = OUTCOME_BY_FAMILY[artifact.family];\n if (outcome === null) continue;\n const count = counts.get(outcome)!;\n count.total += 1;\n if (artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED) count.missing += 1;\n else if (artifact.state === WorkbenchSpecificationArtifactState.LANDED_INVALID || artifact.state === WorkbenchSpecificationArtifactState.UNAVAILABLE) count.invalid += 1;\n else if (input.staleFamilies.has(artifact.family)) count.stale += 1;\n else count.landed += 1;\n }\n\n const tasksTotal = input.tasks.length;\n // A step that only ran is not landed for this count (#3258), and under a live fault nothing here is done (below).\n const ranNotProven = new Set(input.specificationFault?.ranNotProvenTaskRefs ?? []);\n const tasksLanded = input.tasks.filter((task) => task.status === WorkbenchBuildPlanTaskStatus.LANDED && !ranNotProven.has(task.taskRef)).length;\n\n const statusOf = (count: { total: number; landed: number; invalid: number; stale: number }, extraDone: boolean, extraStarted: boolean): WorkbenchCreationOutcomeStatus => {\n const familiesDone = count.total > 0 && count.landed === count.total;\n if (familiesDone && extraDone) return WorkbenchCreationOutcomeStatus.DONE;\n const started = count.landed + count.invalid + count.stale > 0 || extraStarted;\n return started ? WorkbenchCreationOutcomeStatus.IN_PROGRESS : WorkbenchCreationOutcomeStatus.NOT_STARTED;\n };\n\n const rows = new Map<WorkbenchCreationOutcome, CreationOutcomeRow>();\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER.forEach((outcome, position) => {\n const count = counts.get(outcome)!;\n const families = {\n familiesTotal: count.total, familiesLanded: count.landed, familiesInvalid: count.invalid, familiesMissing: count.missing, familiesStale: count.stale,\n };\n if (outcome === WorkbenchCreationOutcome.APPLICATION_WORKS) {\n /*\n * An application that cannot start does not work, whatever has landed (#1537). Measured on the\n * first end-to-end run: the backend was paused by its supervisor for hours while this row read\n * as progress. Never DONE while a runtime is down; still IN_PROGRESS, because the work landed so\n * far is real — the row says what it is, and `unavailableRuntimes` says what stops it.\n */\n const unavailableRuntimes = input.unavailableRuntimes === undefined ? null : [...input.unavailableRuntimes];\n const runtimeDown = unavailableRuntimes !== null && unavailableRuntimes.length > 0;\n rows.set(outcome, {\n outcome, position, ...families, tasksTotal, tasksLanded, unavailableRuntimes,\n status: statusOf(count, tasksTotal > 0 && tasksLanded === tasksTotal && !runtimeDown && input.specificationFault === undefined, tasksLanded > 0 || runtimeDown),\n });\n } else if (outcome === WorkbenchCreationOutcome.READY_FOR_A_REAL_USER) {\n const othersDone = WORKBENCH_CREATION_OUTCOMES_IN_ORDER\n .filter((other) => other !== outcome)\n .every((other) => rows.get(other)?.status === WorkbenchCreationOutcomeStatus.DONE);\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, othersDone, false) });\n } else {\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, true, false) });\n }\n });\n return WORKBENCH_CREATION_OUTCOMES_IN_ORDER.map((outcome) => rows.get(outcome)!);\n}\n\n/** What the outcomes read of a build-plan task row: its status, and its ref to tell a step that only ran (#3258). */\nexport type CreationOutcomeTaskRow = Pick<Workbench_BuildPlanTask, 'status' | 'taskRef'>;\n"]}
|
|
@@ -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.
|
|
@@ -88,6 +92,15 @@ export interface AppShellLauncherEntry {
|
|
|
88
92
|
readonly requiredRoles?: readonly string[];
|
|
89
93
|
/** The `requiredRoles` of the sidebar SECTION the entry sits in; absent elsewhere and when the section names none. */
|
|
90
94
|
readonly sectionRequiredRoles?: readonly string[];
|
|
95
|
+
/**
|
|
96
|
+
* For a RESOURCE_OPERATION entry: the name of the React component the operation it opens renders as its `customView`,
|
|
97
|
+
* read from the BINDING in the merged resource ui-behavior registry (#4012). Absent when that operation binds none.
|
|
98
|
+
*
|
|
99
|
+
* A planned resource custom view (the experience plan's `RESOURCE_CUSTOM_VIEW`) is realised as an operation's
|
|
100
|
+
* `customView`, and the shell can reach it only through that operation's launcher. Neither plan says which operation
|
|
101
|
+
* hosts it; the binding does, so it is read here rather than guessed upstream. See `hostedCustomViewResolver`.
|
|
102
|
+
*/
|
|
103
|
+
readonly hostedCustomView?: string;
|
|
91
104
|
}
|
|
92
105
|
export interface AppShellSurfaceComposition {
|
|
93
106
|
surface: PlacementSurface;
|
package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell-placement-content.behavior.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/subprocess/app-shell-placement-content.behavior.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"app-shell-placement-content.behavior.d.ts","sourceRoot":"","sources":["../../../../../src/core/introspection/subprocess/app-shell-placement-content.behavior.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAOtF,OAAO,EAIL,KAAK,wBAAwB,EAE9B,MAAM,uCAAuC,CAAC;AAE/C,sGAAsG;AACtG,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,sHAAsH;IACtH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClD;;;;;;;OAOG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAqED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,4GAA4G;IAC5G,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,QAAQ,EAAE,OAAO,CAAC;IAClB,kGAAkG;IAClG,aAAa,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD;;;OAGG;IACH,SAAS,EAAE,qBAAqB,EAAE,CAAC;IACnC,2FAA2F;IAC3F,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IACvC,gGAAgG;IAChG,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;CACtC;AA+GD,wBAAsB,2BAA2B,CAC/C,wBAAwB,EAAE,wBAAwB,GACjD,OAAO,CAAC,8BAA8B,CAAC,CA6FzC"}
|
|
@@ -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
|
},
|