@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.
Files changed (96) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +165 -5
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +239 -8
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +2 -1
  7. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  8. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +2 -1
  9. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  10. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts +68 -0
  11. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts.map +1 -0
  12. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js +198 -0
  13. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js.map +1 -0
  14. package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts +138 -0
  15. package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts.map +1 -0
  16. package/dist/esm/claude-cli/models/workspace-path-claims.models.js +204 -0
  17. package/dist/esm/claude-cli/models/workspace-path-claims.models.js.map +1 -0
  18. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +20 -0
  19. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  20. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +27 -12
  21. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  22. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +155 -3
  23. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  24. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +791 -151
  25. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  26. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  27. package/dist/esm/companion-api/controllers/companion.controller.js +7 -1
  28. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  29. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +1 -1
  30. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  31. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +13 -0
  32. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -1
  33. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +98 -16
  34. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -1
  35. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +21 -1
  36. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  37. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +35 -3
  38. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  39. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts +62 -0
  40. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts.map +1 -0
  41. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js +62 -0
  42. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js.map +1 -0
  43. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts +62 -0
  44. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts.map +1 -0
  45. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js +62 -0
  46. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js.map +1 -0
  47. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +1 -1
  48. package/dist/esm/i18n/system_enums/workbench-build.en.js +1 -1
  49. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  50. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +23 -0
  51. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -1
  52. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +14 -0
  53. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -1
  54. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +12 -1
  55. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
  56. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +99 -1
  57. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
  58. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +5 -0
  59. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -1
  60. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +22 -1
  61. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -1
  62. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +67 -20
  63. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  64. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +344 -76
  65. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  66. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  67. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +9 -0
  68. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  69. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +47 -1
  70. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  71. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +98 -9
  72. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  73. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +38 -2
  74. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  75. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +176 -22
  76. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  77. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +45 -0
  78. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
  79. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +74 -0
  80. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
  81. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  82. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +9 -1
  83. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  84. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +64 -5
  85. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  86. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +139 -14
  87. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  88. package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts +19 -1
  89. package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts.map +1 -1
  90. package/dist/esm/meta-workflows/services/website-demo-facts.models.js +7 -5
  91. package/dist/esm/meta-workflows/services/website-demo-facts.models.js.map +1 -1
  92. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -0
  93. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  94. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +3 -1
  95. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  96. package/package.json +17 -17
@@ -10,6 +10,7 @@ import { type MetaWorkflow_ApplicationCodingTaskContract } from '@wildo-ai/saas-
10
10
  import { FlowsActors_Status } from '@wildo-ai/saas-models';
11
11
  import { CodingRunFailureAttribution } from '@wildo-ai/platform-core-shared';
12
12
  import type { BuildTaskLandedOverride } from '../../meta-workflows/models/build-task-rearm.models';
13
+ import { CarriedVerificationReason } from '../../meta-workflows/models/carried-verification-failure.models';
13
14
  /**
14
15
  * Run limits (P-18): defaults 30 min / 10 MiB, request-overridable up to
15
16
  * hard caps 60 min / 32 MiB. The byte cap REJECTS (SIGTERMs the run), it
@@ -303,6 +304,157 @@ export declare function failedOnlyForUnansweredVerification(run: {
303
304
  * check that cannot name them is carried whole. `baseline` maps each check red at baseline to the findings it named.
304
305
  */
305
306
  export declare function verificationFailureIsCarried(baseline: ReadonlyMap<string, readonly string[] | undefined>, checkRef: string, failureFindings: readonly string[] | undefined): boolean;
307
+ /**
308
+ * Whether a check's findings can be tied to the elements they are about, so a finding about an element the run did not
309
+ * touch can be reported to the application instead of charged to the run (#3881). Total over the catalog
310
+ * ({@link APPLICATION_CODING_TASK_FINDING_ATTRIBUTION}), so a check added tomorrow says which it is or fails its test.
311
+ */
312
+ export declare enum VerificationFindingAttribution {
313
+ /**
314
+ * Each finding names its identity (`failureFindings`) and the files or business modules it is about
315
+ * (`findingElements`): a finding new since the run's baseline is the application's when another writer wrote those
316
+ * elements during the run and the run did not ({@link attributeVerificationFailure}).
317
+ */
318
+ PER_FINDING_ELEMENTS = "per_finding_elements",
319
+ /**
320
+ * The check's verdict cannot be tied to elements (a compiler's whole program, a CLI's single answer, findings that are
321
+ * all about one file): red at baseline it is carried as before, and a new red is the run's. Unknown attribution is
322
+ * never forgiven.
323
+ */
324
+ WHOLE_CHECK = "whole_check"
325
+ }
326
+ /**
327
+ * Each catalog check's {@link VerificationFindingAttribution}, and why (#3881). Keyed like
328
+ * {@link APPLICATION_CODING_TASK_VERIFICATION_CATALOG}, and pinned to it by a test. The parametric package typecheck
329
+ * (`check:package-typecheck:<dir>`) is {@link VerificationFindingAttribution.WHOLE_CHECK}, like every typecheck.
330
+ *
331
+ * Measured on reference run 43691253927: `check:website-demo-facts` failed 13 coding runs and `check:specification-exports`
332
+ * 4 on findings about the application rather than the task. Both are application-wide (they read every section, every
333
+ * specification module) and both can name the file each finding is about, so they attribute per finding. So does
334
+ * `check:module-layout`, whose finding is one misplaced file.
335
+ */
336
+ export declare const APPLICATION_CODING_TASK_FINDING_ATTRIBUTION: Readonly<Record<string, {
337
+ readonly attribution: VerificationFindingAttribution;
338
+ readonly why: string;
339
+ }>>;
340
+ /** What a finding is about: application-relative files (or folders, ending `/`) and business module refs. */
341
+ export interface VerificationFindingElements {
342
+ readonly paths: readonly string[];
343
+ readonly moduleRefs: readonly string[];
344
+ }
345
+ /**
346
+ * What one writer touched during a coding run, as elements a finding is compared with: the application-relative files it
347
+ * wrote, and the business modules it wrote in or was built for.
348
+ */
349
+ export interface CodingRunWrittenElements {
350
+ readonly paths: readonly string[];
351
+ readonly moduleRefs: readonly string[];
352
+ /**
353
+ * The writer changed code a module package shares with every module (`shared-lib/src/common/…`, `backend-api/src/…`
354
+ * outside `src/modules/`), so it may have changed what ANY module's findings say (#3881 review F2). Set for the run
355
+ * being judged only, never for another writer: on another writer it would forgive, which needs evidence.
356
+ */
357
+ readonly touchesEveryModule?: boolean;
358
+ }
359
+ /**
360
+ * The business module an application-relative path belongs to (`<package>/src/modules/<module>/…`, the folders `add-module`
361
+ * writes in every `MODULE_PACKAGES` package), or `undefined` for a path in no module.
362
+ */
363
+ export declare function businessModuleOfPath(path: string): string | undefined;
364
+ /**
365
+ * The elements of the files a writer wrote, plus the modules it was built for; the modules of the files are added.
366
+ * `sharedCodeTouchesEveryModule` marks a writer that changed a module package's shared source as touching every module
367
+ * ({@link CodingRunWrittenElements.touchesEveryModule}); pass it for the run being judged only.
368
+ */
369
+ export declare function deriveCodingRunWrittenElements(input: {
370
+ readonly paths: readonly string[];
371
+ readonly moduleRefs?: readonly string[];
372
+ readonly sharedCodeTouchesEveryModule?: boolean;
373
+ }): CodingRunWrittenElements;
374
+ /**
375
+ * Whether a writer touched what a finding is about: a file it names (or a file under a folder it names), or the business
376
+ * module of either. Module-level on purpose: a module task owns its module's files in every package, so a finding in its
377
+ * module's specification is its own even when it changed only the module's schema.
378
+ */
379
+ export declare function verificationFindingTouchedBy(elements: VerificationFindingElements, written: CodingRunWrittenElements): boolean;
380
+ /** Another writer in a coding run's window, and what it wrote. `taskRef` is absent for a writer that is no coding run. */
381
+ export interface ConcurrentWriterElements {
382
+ readonly taskRef?: string;
383
+ readonly written: CodingRunWrittenElements;
384
+ }
385
+ /** One finding about the APPLICATION that a coding run met and did not cause (#3881), as the run's row records it. */
386
+ export interface ApplicationVerificationFinding {
387
+ readonly checkRef: string;
388
+ /** The finding's identity, as the check names it (`failureFindings`): readable, and what a later pass compares. */
389
+ readonly finding: string;
390
+ /**
391
+ * The build tasks whose coding runs wrote what the finding is about in this run's window. Each one's own verification
392
+ * charges the finding to it when it asks the check; when none is named, or none asks it, the end-of-build assembly
393
+ * check asks it again and its repair owns it.
394
+ */
395
+ readonly writtenByTaskRefs: readonly string[];
396
+ }
397
+ /** How a FAILED check of a coding run is attributed (#3881). */
398
+ export interface VerificationFailureAttributionResult {
399
+ /** Whether the check fails the run: at least one of its findings is the run's. */
400
+ readonly chargedToRun: boolean;
401
+ /** Why it does not, when it does not. */
402
+ readonly carriedBecause?: CarriedVerificationReason;
403
+ /** The check's findings that are the application's, whether or not the check is charged for another finding. */
404
+ readonly applicationFindings: readonly ApplicationVerificationFinding[];
405
+ }
406
+ /**
407
+ * Whose failure a FAILED check is (#3881): the run's, or the application's. Generalizes {@link verificationFailureIsCarried},
408
+ * which stays the first rule.
409
+ *
410
+ * 1. Red at baseline with no finding the baseline did not name: carried, as before
411
+ * ({@link CarriedVerificationReason.RED_AT_BASELINE}).
412
+ * 2. Each finding new since the baseline is judged alone. It is the RUN's when it names nothing (no `findingElements`
413
+ * entry: unknown attribution is never forgiven), when the run touched what it names ({@link verificationFindingTouchedBy}),
414
+ * or when no other writer of the run's window did. It is the APPLICATION's only when another writer touched what it
415
+ * names and the run did not: evidence that somebody else caused it. A run alone in the tree is the only possible cause
416
+ * of a new finding, so it is charged with every one, which is the #3258 rule the first rule states.
417
+ * 3. The check fails the run when one finding is the run's. When none is, it is carried
418
+ * ({@link CarriedVerificationReason.FINDINGS_ANOTHER_WRITER_CAUSED}), and its application findings are recorded.
419
+ */
420
+ export declare function attributeVerificationFailure(input: {
421
+ readonly baseline: ReadonlyMap<string, readonly string[] | undefined>;
422
+ readonly checkRef: string;
423
+ readonly failureFindings: readonly string[] | undefined;
424
+ readonly findingElements: Readonly<Record<string, VerificationFindingElements>> | undefined;
425
+ /** What this run touched: its own files, and the module it was built for. */
426
+ readonly run: CodingRunWrittenElements;
427
+ /** The other writers of the run's window: sibling coding runs (by their claims), a concurrent host lane. */
428
+ readonly otherWriters: readonly ConcurrentWriterElements[];
429
+ }): VerificationFailureAttributionResult;
430
+ /**
431
+ * The `sourceRef` of the build task's self-description in a coding contract (`buildTaskSelfDescriptionContextSource`):
432
+ * its content carries the task's `target`. Pinned to that producer by a test.
433
+ */
434
+ export declare const BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF = "application-creation:context/build-task";
435
+ /**
436
+ * The business module a coding task was BUILT for (#3881): its build task's target `moduleRef`, read from the contract's
437
+ * self-description. Empty for a task whose target names no module (a website, an application-wide config) and for a
438
+ * contract that is no build task's. A finding in that module is the run's even when the run wrote nothing there yet.
439
+ */
440
+ export declare function readCodingTaskTargetModuleRefs(task: Pick<MetaWorkflow_ApplicationCodingTaskContract, 'contextSelection'>): string[];
441
+ /**
442
+ * The checks of the packages a coding task is the AUTHOR of, whose red at the baseline is never carried (#4018): the
443
+ * package typecheck of each facet of a `PROVIDER_BINDING` task's own provider (`providers/<ref>/backend|frontend`), read
444
+ * from the contract's self-description like {@link readCodingTaskTargetModuleRefs}. Empty for any other task.
445
+ *
446
+ * The baseline rule forgives a red the run found in the tree (#1273), and for a provider's own package that red is the
447
+ * TASK's: an earlier attempt installed or wrote the package and left it uncompilable, and the attempt's files stay in the
448
+ * tree. Forgiven, the retry lands a provider the application cannot compile, and the backend waits on it for the rest of
449
+ * the run, as Mailgun's did on reference run 44052185141. Not forgiven, the retry fails until the package compiles, and
450
+ * each retry receives the compiler's output as its previous attempt.
451
+ */
452
+ export declare function codingTaskOwnPackageCheckRefs(task: Pick<MetaWorkflow_ApplicationCodingTaskContract, 'contextSelection'>): string[];
453
+ /**
454
+ * The application-relative file a stack location names (`/abs/app/specifications/src/x.ts:12:3`), or `undefined` when it
455
+ * is outside the application. `roots` are the application root's spellings (`applicationRootSpellings`).
456
+ */
457
+ export declare function applicationRelativeFileOfLocation(location: string, roots: readonly string[]): string | undefined;
306
458
  /**
307
459
  * The context key that marks an admission refusal of the task's OWN contract (#1581, review A8).
308
460
  *
@@ -468,13 +620,21 @@ export interface ApplicationCodingTaskRunAdmission {
468
620
  export declare const APPLICATION_CODING_TASK_VERIFICATION_CATALOG: Readonly<Record<string, ApplicationCodingTaskVerificationPlan>>;
469
621
  /**
470
622
  * The one PARAMETRIC check ref, for the package families whose directory is chosen at composition
471
- * time: `check:package-typecheck:workers/<ref>` and `check:package-typecheck:minions/<ref>` (#1490).
623
+ * time: `check:package-typecheck:workers/<ref>` and `check:package-typecheck:minions/<ref>` (#1490),
624
+ * and an installed provider module's facet packages, `check:package-typecheck:providers/<ref>/backend`
625
+ * and `…/frontend` (#4018).
472
626
  *
473
627
  * A worker or a minion is a workspace package under a directory the `add-worker-*` / `add-minion`
474
- * scenario named, so no fixed catalog row can name it. The ref stays HOST-DERIVED — the coding
475
- * policy composes it from a typed `WORKER` / `MINION` target, never from model text — and the
476
- * resolver below admits only those two families, so the catalog is still closed over what a run may
477
- * execute: a typecheck, in a directory of one of two shapes.
628
+ * scenario named, and a provider facet one `wildo registry add` installed, so no fixed catalog row can
629
+ * name it. The ref stays HOST-DERIVED — the coding policy composes it from a typed `WORKER` / `MINION` /
630
+ * `PROVIDER_BINDING` target, never from model text — and the resolver below admits only those
631
+ * families, so the catalog is still closed over what a run may execute: a typecheck, in a directory of
632
+ * one of three shapes.
633
+ *
634
+ * A provider facet is checked because nothing else compiles it before its task lands: the backend
635
+ * typecheck reaches the facet only through its built `dist`, and the dev loop compiles it only once
636
+ * it is running. On reference run 44052185141 the Mailgun task landed, its facet did not compile in
637
+ * the application (#4009), and the backend sat paused on it for the rest of the run.
478
638
  */
479
639
  export declare const PACKAGE_TYPECHECK_CHECK_REF_PREFIX = "check:package-typecheck:";
480
640
  export declare function packageTypecheckCheckRef(packageDirectory: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"coding-agent-dispatch.models.d.ts","sourceRoot":"","sources":["../../../../src/claude-cli/models/coding-agent-dispatch.models.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,0CAA0C,EAChD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAkC,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAEnG;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAAc,CAAC;AACvD,eAAO,MAAM,4BAA4B,QAAc,CAAC;AACxD,eAAO,MAAM,mCAAmC,QAAmB,CAAC;AACpE,eAAO,MAAM,gCAAgC,QAAmB,CAAC;AAEjE;;;;;;;;GAQG;AACH,oBAAY,gBAAgB;IAC1B;;;OAGG;IACH,SAAS,cAAc;IACvB;;;OAGG;IACH,WAAW,gBAAg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,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,uBAAuB,EAAE,MAAM,CAAC;QAChC,kBAAkB,EAAE,MAAM,CAAC;QAC3B;;;;;;WAMG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAC3B;;;;;WAKG;QACH,sBAAsB,EAAE,MAAM,CAAC;KAChC,CAAC;IACF;;;;OAIG;IACH,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,uGAAuG;IACvG,YAAY,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"coding-agent-dispatch.models.d.ts","sourceRoot":"","sources":["../../../../src/claude-cli/models/coding-agent-dispatch.models.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,0CAA0C,EAChD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAkC,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAEhH,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAI7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,iEAAiE,CAAC;AAG5G;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAAc,CAAC;AACvD,eAAO,MAAM,4BAA4B,QAAc,CAAC;AACxD,eAAO,MAAM,mCAAmC,QAAmB,CAAC;AACpE,eAAO,MAAM,gCAAgC,QAAmB,CAAC;AAEjE;;;;;;;;GAQG;AACH,oBAAY,gBAAgB;IAC1B;;;OAGG;I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AAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,yBAAyB,CAAC;IACvC,2EAA2E;IAC3E,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,uBAAuB,EAAE,MAAM,CAAC;QAChC,kBAAkB,EAAE,MAAM,CAAC;QAC3B;;;;;;WAMG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAC3B;;;;;WAKG;QACH,sBAAsB,EAAE,MAAM,CAAC;KAChC,CAAC;IACF;;;;OAIG;IACH,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,uGAAuG;IACvG,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -7,8 +7,12 @@
7
7
  * TS `enum`, UPPER_SNAKE members, snake_case string values.
8
8
  */
9
9
  import { describeCaughtError, ErrorType, FlowsActors_Status, isWildoBackendError } from '@wildo-ai/saas-models';
10
+ import { BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';
10
11
  import { CodingRunFailureAttribution } from '@wildo-ai/platform-core-shared';
12
+ import { ProviderModuleFacet } from '@wildo-ai/platform-config-lib';
11
13
  import { z } from 'zod';
14
+ import { CarriedVerificationReason } from '../../meta-workflows/models/carried-verification-failure.models.js';
15
+ import { MODULE_PACKAGES, MODULES_SOURCE_DIRECTORY } from '../../module-layout/module-layout-convention.companion.js';
12
16
  /**
13
17
  * Run limits (P-18): defaults 30 min / 10 MiB, request-overridable up to
14
18
  * hard caps 60 min / 32 MiB. The byte cap REJECTS (SIGTERMs the run), it
@@ -341,7 +345,226 @@ export function verificationFailureIsCarried(baseline, checkRef, failureFindings
341
345
  if (!baseline.has(checkRef))
342
346
  return false;
343
347
  const atBaseline = baseline.get(checkRef);
344
- return atBaseline === undefined || (failureFindings ?? []).every((finding) => atBaseline.includes(finding));
348
+ if (atBaseline === undefined)
349
+ return true;
350
+ /*
351
+ * A red that names NO finding while the baseline named some (#3881 review F4) is a different red: the check failed for a
352
+ * reason it could not name (a website whose sections no longer import), and an empty list must not read as "nothing new".
353
+ */
354
+ const findings = failureFindings ?? [];
355
+ if (findings.length === 0)
356
+ return atBaseline.length === 0;
357
+ return findings.every((finding) => atBaseline.includes(finding));
358
+ }
359
+ /**
360
+ * Whether a check's findings can be tied to the elements they are about, so a finding about an element the run did not
361
+ * touch can be reported to the application instead of charged to the run (#3881). Total over the catalog
362
+ * ({@link APPLICATION_CODING_TASK_FINDING_ATTRIBUTION}), so a check added tomorrow says which it is or fails its test.
363
+ */
364
+ export var VerificationFindingAttribution;
365
+ (function (VerificationFindingAttribution) {
366
+ /**
367
+ * Each finding names its identity (`failureFindings`) and the files or business modules it is about
368
+ * (`findingElements`): a finding new since the run's baseline is the application's when another writer wrote those
369
+ * elements during the run and the run did not ({@link attributeVerificationFailure}).
370
+ */
371
+ VerificationFindingAttribution["PER_FINDING_ELEMENTS"] = "per_finding_elements";
372
+ /**
373
+ * The check's verdict cannot be tied to elements (a compiler's whole program, a CLI's single answer, findings that are
374
+ * all about one file): red at baseline it is carried as before, and a new red is the run's. Unknown attribution is
375
+ * never forgiven.
376
+ */
377
+ VerificationFindingAttribution["WHOLE_CHECK"] = "whole_check";
378
+ })(VerificationFindingAttribution || (VerificationFindingAttribution = {}));
379
+ const TYPECHECK_ATTRIBUTION_WHY = 'a typecheck: an error in a file the run did not write is still the run\'s when its edit caused it, and the compiler does not say which edit did';
380
+ /**
381
+ * Each catalog check's {@link VerificationFindingAttribution}, and why (#3881). Keyed like
382
+ * {@link APPLICATION_CODING_TASK_VERIFICATION_CATALOG}, and pinned to it by a test. The parametric package typecheck
383
+ * (`check:package-typecheck:<dir>`) is {@link VerificationFindingAttribution.WHOLE_CHECK}, like every typecheck.
384
+ *
385
+ * Measured on reference run 43691253927: `check:website-demo-facts` failed 13 coding runs and `check:specification-exports`
386
+ * 4 on findings about the application rather than the task. Both are application-wide (they read every section, every
387
+ * specification module) and both can name the file each finding is about, so they attribute per finding. So does
388
+ * `check:module-layout`, whose finding is one misplaced file.
389
+ */
390
+ export const APPLICATION_CODING_TASK_FINDING_ATTRIBUTION = {
391
+ 'check:requirements-schema': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
392
+ 'check:shared-lib-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
393
+ 'check:backend-api-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
394
+ 'check:app-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
395
+ 'check:specifications-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
396
+ 'check:website-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
397
+ 'check:technical-doc-typecheck': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: TYPECHECK_ATTRIBUTION_WHY },
398
+ 'check:frontend-fk-resolution': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one verdict over the resources registry, with no identity per finding' },
399
+ 'check:settings-placement-content': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one verdict over the settings rail, the app shell and the frontend registry, with no identity per finding' },
400
+ 'check:schema-plan-in-sync': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one CLI answer over the whole resource model; it does not name who changed the model' },
401
+ 'check:resources-registry-init': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one CLI answer over the compiled registry, with no identity per finding' },
402
+ 'check:specification-exports': {
403
+ attribution: VerificationFindingAttribution.PER_FINDING_ELEMENTS,
404
+ why: 'a root-cause module fault names its module file, a refused specification its authored file; a package that does not load, a refusal with no authored frame and a chapter-file fault name nothing and stay the run\'s',
405
+ },
406
+ 'check:module-layout': { attribution: VerificationFindingAttribution.PER_FINDING_ELEMENTS, why: 'each finding is one misplaced file' },
407
+ 'check:website-demo-facts': {
408
+ attribution: VerificationFindingAttribution.PER_FINDING_ELEMENTS,
409
+ why: 'each untrue demo names the file it is defined in and the resource it draws, so that resource\'s module; a resource the application lacks, or an unknown definition site, names nothing and stays the run\'s',
410
+ },
411
+ 'check:website-build': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'an end-of-build site build: one verdict, asked of no build task' },
412
+ 'check:technical-doc-build': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'an end-of-build site build: one verdict, asked of no build task' },
413
+ 'check:config-validate': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'one CLI answer over the application configuration, asked of no build task' },
414
+ 'check:design-system-contrast': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'every finding is about the one design-system file' },
415
+ 'check:design-system-contract': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'every finding is about the one design-system file' },
416
+ 'check:design-system-brand': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'every finding is about the one design-system file (the website advice never fails the check)' },
417
+ 'check:backend-ready': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'the running backend: one verdict, asked of no build task' },
418
+ 'check:browser-smoke': { attribution: VerificationFindingAttribution.WHOLE_CHECK, why: 'the running frontend: one verdict, asked of no build task' },
419
+ };
420
+ const BUSINESS_MODULE_PATH_PATTERN = new RegExp(`^(?:${MODULE_PACKAGES.join('|')})/${MODULES_SOURCE_DIRECTORY}/([^/]+)/`, 'u');
421
+ const MODULE_PACKAGE_SOURCE_PATTERN = new RegExp(`^(?:${MODULE_PACKAGES.join('|')})/src/`, 'u');
422
+ /**
423
+ * The business module an application-relative path belongs to (`<package>/src/modules/<module>/…`, the folders `add-module`
424
+ * writes in every `MODULE_PACKAGES` package), or `undefined` for a path in no module.
425
+ */
426
+ export function businessModuleOfPath(path) {
427
+ return BUSINESS_MODULE_PATH_PATTERN.exec(path)?.[1];
428
+ }
429
+ /**
430
+ * The elements of the files a writer wrote, plus the modules it was built for; the modules of the files are added.
431
+ * `sharedCodeTouchesEveryModule` marks a writer that changed a module package's shared source as touching every module
432
+ * ({@link CodingRunWrittenElements.touchesEveryModule}); pass it for the run being judged only.
433
+ */
434
+ export function deriveCodingRunWrittenElements(input) {
435
+ const moduleRefs = new Set(input.moduleRefs ?? []);
436
+ let touchesEveryModule = false;
437
+ for (const path of input.paths) {
438
+ const moduleRef = businessModuleOfPath(path);
439
+ if (moduleRef !== undefined)
440
+ moduleRefs.add(moduleRef);
441
+ else if (input.sharedCodeTouchesEveryModule === true && MODULE_PACKAGE_SOURCE_PATTERN.test(path))
442
+ touchesEveryModule = true;
443
+ }
444
+ return { paths: [...new Set(input.paths)].sort(), moduleRefs: [...moduleRefs].sort(), ...(touchesEveryModule ? { touchesEveryModule: true } : {}) };
445
+ }
446
+ /**
447
+ * Whether a writer touched what a finding is about: a file it names (or a file under a folder it names), or the business
448
+ * module of either. Module-level on purpose: a module task owns its module's files in every package, so a finding in its
449
+ * module's specification is its own even when it changed only the module's schema.
450
+ */
451
+ export function verificationFindingTouchedBy(elements, written) {
452
+ const modules = new Set(written.moduleRefs);
453
+ if (elements.moduleRefs.some((moduleRef) => modules.has(moduleRef)))
454
+ return true;
455
+ if (written.touchesEveryModule === true && elements.moduleRefs.length > 0)
456
+ return true;
457
+ return elements.paths.some((path) => {
458
+ const moduleRef = businessModuleOfPath(path);
459
+ if (moduleRef !== undefined && (modules.has(moduleRef) || written.touchesEveryModule === true))
460
+ return true;
461
+ const folder = path.endsWith('/') ? path : `${path}/`;
462
+ return written.paths.some((writtenPath) => writtenPath === path || writtenPath.startsWith(folder));
463
+ });
464
+ }
465
+ /**
466
+ * Whose failure a FAILED check is (#3881): the run's, or the application's. Generalizes {@link verificationFailureIsCarried},
467
+ * which stays the first rule.
468
+ *
469
+ * 1. Red at baseline with no finding the baseline did not name: carried, as before
470
+ * ({@link CarriedVerificationReason.RED_AT_BASELINE}).
471
+ * 2. Each finding new since the baseline is judged alone. It is the RUN's when it names nothing (no `findingElements`
472
+ * entry: unknown attribution is never forgiven), when the run touched what it names ({@link verificationFindingTouchedBy}),
473
+ * or when no other writer of the run's window did. It is the APPLICATION's only when another writer touched what it
474
+ * names and the run did not: evidence that somebody else caused it. A run alone in the tree is the only possible cause
475
+ * of a new finding, so it is charged with every one, which is the #3258 rule the first rule states.
476
+ * 3. The check fails the run when one finding is the run's. When none is, it is carried
477
+ * ({@link CarriedVerificationReason.FINDINGS_ANOTHER_WRITER_CAUSED}), and its application findings are recorded.
478
+ */
479
+ export function attributeVerificationFailure(input) {
480
+ if (verificationFailureIsCarried(input.baseline, input.checkRef, input.failureFindings)) {
481
+ return { chargedToRun: false, carriedBecause: CarriedVerificationReason.RED_AT_BASELINE, applicationFindings: [] };
482
+ }
483
+ const findings = input.failureFindings ?? [];
484
+ if (findings.length === 0)
485
+ return { chargedToRun: true, applicationFindings: [] };
486
+ const atBaseline = input.baseline.get(input.checkRef) ?? [];
487
+ let runOwnsOne = false;
488
+ const applicationFindings = [];
489
+ for (const finding of findings) {
490
+ if (atBaseline.includes(finding))
491
+ continue;
492
+ const elements = input.findingElements?.[finding];
493
+ const named = elements !== undefined && (elements.paths.length > 0 || elements.moduleRefs.length > 0);
494
+ if (!named || verificationFindingTouchedBy(elements, input.run)) {
495
+ runOwnsOne = true;
496
+ continue;
497
+ }
498
+ const writers = input.otherWriters.filter((writer) => verificationFindingTouchedBy(elements, writer.written));
499
+ if (writers.length === 0) {
500
+ runOwnsOne = true;
501
+ continue;
502
+ }
503
+ applicationFindings.push({
504
+ checkRef: input.checkRef,
505
+ finding,
506
+ writtenByTaskRefs: [...new Set(writers.flatMap((writer) => (writer.taskRef === undefined ? [] : [writer.taskRef])))].sort(),
507
+ });
508
+ }
509
+ return runOwnsOne
510
+ ? { chargedToRun: true, applicationFindings }
511
+ : { chargedToRun: false, carriedBecause: CarriedVerificationReason.FINDINGS_ANOTHER_WRITER_CAUSED, applicationFindings };
512
+ }
513
+ /**
514
+ * The `sourceRef` of the build task's self-description in a coding contract (`buildTaskSelfDescriptionContextSource`):
515
+ * its content carries the task's `target`. Pinned to that producer by a test.
516
+ */
517
+ export const BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF = 'application-creation:context/build-task';
518
+ /**
519
+ * The business module a coding task was BUILT for (#3881): its build task's target `moduleRef`, read from the contract's
520
+ * self-description. Empty for a task whose target names no module (a website, an application-wide config) and for a
521
+ * contract that is no build task's. A finding in that module is the run's even when the run wrote nothing there yet.
522
+ */
523
+ export function readCodingTaskTargetModuleRefs(task) {
524
+ const source = task.contextSelection.selectedSources.find((candidate) => candidate.sourceRef === BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF);
525
+ const target = source?.content?.target;
526
+ return typeof target?.moduleRef === 'string' && target.moduleRef.length > 0 ? [target.moduleRef] : [];
527
+ }
528
+ /**
529
+ * The checks of the packages a coding task is the AUTHOR of, whose red at the baseline is never carried (#4018): the
530
+ * package typecheck of each facet of a `PROVIDER_BINDING` task's own provider (`providers/<ref>/backend|frontend`), read
531
+ * from the contract's self-description like {@link readCodingTaskTargetModuleRefs}. Empty for any other task.
532
+ *
533
+ * The baseline rule forgives a red the run found in the tree (#1273), and for a provider's own package that red is the
534
+ * TASK's: an earlier attempt installed or wrote the package and left it uncompilable, and the attempt's files stay in the
535
+ * tree. Forgiven, the retry lands a provider the application cannot compile, and the backend waits on it for the rest of
536
+ * the run, as Mailgun's did on reference run 44052185141. Not forgiven, the retry fails until the package compiles, and
537
+ * each retry receives the compiler's output as its previous attempt.
538
+ */
539
+ export function codingTaskOwnPackageCheckRefs(task) {
540
+ const source = task.contextSelection.selectedSources.find((candidate) => candidate.sourceRef === BUILD_TASK_SELF_DESCRIPTION_SOURCE_REF);
541
+ const target = source?.content?.target;
542
+ if (target?.kind !== BuildPlanTaskTargetKind.PROVIDER_BINDING || typeof target.providerRef !== 'string')
543
+ return [];
544
+ const providerRef = target.providerRef;
545
+ // Each facet a provider module installs is its own workspace package, `providers/<ref>/<facet>` (#2014).
546
+ return Object.values(ProviderModuleFacet).flatMap((facet) => {
547
+ try {
548
+ return [packageTypecheckCheckRef(`providers/${providerRef}/${facet}`)];
549
+ }
550
+ catch {
551
+ // A ref no package directory can carry names no package: nothing of it is the task's to check.
552
+ return [];
553
+ }
554
+ });
555
+ }
556
+ /**
557
+ * The application-relative file a stack location names (`/abs/app/specifications/src/x.ts:12:3`), or `undefined` when it
558
+ * is outside the application. `roots` are the application root's spellings (`applicationRootSpellings`).
559
+ */
560
+ export function applicationRelativeFileOfLocation(location, roots) {
561
+ const file = location.replace(/^file:\/\//u, '').replace(/(?::\d+){1,2}$/u, '');
562
+ for (const root of roots) {
563
+ const prefix = root.endsWith('/') ? root : `${root}/`;
564
+ if (file.startsWith(prefix))
565
+ return file.slice(prefix.length);
566
+ }
567
+ return undefined;
345
568
  }
346
569
  /**
347
570
  * The context key that marks an admission refusal of the task's OWN contract (#1581, review A8).
@@ -560,19 +783,27 @@ export const APPLICATION_CODING_TASK_VERIFICATION_CATALOG = {
560
783
  };
561
784
  /**
562
785
  * The one PARAMETRIC check ref, for the package families whose directory is chosen at composition
563
- * time: `check:package-typecheck:workers/<ref>` and `check:package-typecheck:minions/<ref>` (#1490).
786
+ * time: `check:package-typecheck:workers/<ref>` and `check:package-typecheck:minions/<ref>` (#1490),
787
+ * and an installed provider module's facet packages, `check:package-typecheck:providers/<ref>/backend`
788
+ * and `…/frontend` (#4018).
564
789
  *
565
790
  * A worker or a minion is a workspace package under a directory the `add-worker-*` / `add-minion`
566
- * scenario named, so no fixed catalog row can name it. The ref stays HOST-DERIVED — the coding
567
- * policy composes it from a typed `WORKER` / `MINION` target, never from model text — and the
568
- * resolver below admits only those two families, so the catalog is still closed over what a run may
569
- * execute: a typecheck, in a directory of one of two shapes.
791
+ * scenario named, and a provider facet one `wildo registry add` installed, so no fixed catalog row can
792
+ * name it. The ref stays HOST-DERIVED — the coding policy composes it from a typed `WORKER` / `MINION` /
793
+ * `PROVIDER_BINDING` target, never from model text — and the resolver below admits only those
794
+ * families, so the catalog is still closed over what a run may execute: a typecheck, in a directory of
795
+ * one of three shapes.
796
+ *
797
+ * A provider facet is checked because nothing else compiles it before its task lands: the backend
798
+ * typecheck reaches the facet only through its built `dist`, and the dev loop compiles it only once
799
+ * it is running. On reference run 44052185141 the Mailgun task landed, its facet did not compile in
800
+ * the application (#4009), and the backend sat paused on it for the rest of the run.
570
801
  */
571
802
  export const PACKAGE_TYPECHECK_CHECK_REF_PREFIX = 'check:package-typecheck:';
572
- const PACKAGE_TYPECHECK_DIRECTORY_PATTERN = /^(?:workers|minions)\/[a-z0-9]+(?:-[a-z0-9]+)*$/u;
803
+ const PACKAGE_TYPECHECK_DIRECTORY_PATTERN = /^(?:(?:workers|minions)\/[a-z0-9]+(?:-[a-z0-9]+)*|providers\/[a-z0-9]+(?:-[a-z0-9]+)*\/(?:backend|frontend))$/u;
573
804
  export function packageTypecheckCheckRef(packageDirectory) {
574
805
  if (!PACKAGE_TYPECHECK_DIRECTORY_PATTERN.test(packageDirectory)) {
575
- throw new Error(`A package typecheck names a workers/ or minions/ package directory; got '${packageDirectory}'.`);
806
+ throw new Error(`A package typecheck names a workers/ or minions/ package directory, or a providers/<ref>/backend|frontend facet; got '${packageDirectory}'.`);
576
807
  }
577
808
  return `${PACKAGE_TYPECHECK_CHECK_REF_PREFIX}${packageDirectory}`;
578
809
  }