@wildo-ai/dev-companion 1.1.4 → 1.1.5
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/__tests__/asset-noop.d.ts.map +1 -1
- package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +1 -1
- package/dist/esm/__tests__/internal-test-view.d.ts.map +1 -1
- package/dist/esm/__time-gov.probe.d.mts +0 -0
- package/dist/esm/__time-gov.probe.d.mts.map +0 -0
- package/dist/esm/__time-gov.probe.mjs.map +0 -0
- package/dist/esm/brand/models/logo-creative-brief.schemas.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
- package/dist/esm/brand/models/logo-judge.schemas.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.js +24 -5
- package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
- package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts +7 -0
- package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/logo-deliberation.companion.service.js +7 -0
- package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
- package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
- package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
- package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
- package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
- package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts +143 -0
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js +84 -0
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js.map +1 -0
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +129 -16
- 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 +173 -11
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/models/coding-session-frame-retention.d.ts +85 -0
- package/dist/esm/claude-cli/models/coding-session-frame-retention.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/coding-session-frame-retention.js +122 -0
- package/dist/esm/claude-cli/models/coding-session-frame-retention.js.map +1 -0
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +98 -0
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +135 -0
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -0
- package/dist/esm/claude-cli/models/parked-question-answer.models.d.ts +94 -0
- package/dist/esm/claude-cli/models/parked-question-answer.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/parked-question-answer.models.js +137 -0
- package/dist/esm/claude-cli/models/parked-question-answer.models.js.map +1 -0
- package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.d.ts +16 -0
- package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +46 -0
- package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -0
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +46 -0
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +135 -0
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +131 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +371 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -0
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +679 -78
- 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 +1909 -420
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +109 -0
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +186 -0
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -0
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +215 -7
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js +532 -60
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +27 -6
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +97 -6
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/code-compliance-check/check-label-placeholder-contract.companion.d.ts.map +1 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.d.ts.map +1 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +8 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +219 -142
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +52 -6
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion-i18n-api-contract.utils.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +14 -3
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +170 -13
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +520 -87
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +39 -4
- package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.js +39 -4
- package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
- package/dist/esm/core/catalogs/catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/catalog-context.factory.models.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/aggregate-offer-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/aggregate-rating-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/article-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/blog-posting-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/breadcrumb-list-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/faq-page-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/offer-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/organization-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/product-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/review-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
- package/dist/esm/core/catalogs/schema-org/software-application-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/website-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
- package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.d.ts +54 -0
- package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.d.ts.map +1 -0
- package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.js +78 -0
- package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.js.map +1 -0
- package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
- package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.js +12 -0
- package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
- package/dist/esm/core/context/companion-context.d.ts.map +1 -1
- package/dist/esm/core/context/companion-context.js +4 -0
- package/dist/esm/core/context/companion-context.js.map +1 -1
- package/dist/esm/core/context/companion-package-loaders.companion.d.ts +57 -0
- package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
- package/dist/esm/core/context/companion-package-loaders.companion.js +181 -7
- package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
- package/dist/esm/core/context/draft-family-values.companion.d.ts +23 -0
- package/dist/esm/core/context/draft-family-values.companion.d.ts.map +1 -0
- package/dist/esm/core/context/draft-family-values.companion.js +49 -0
- package/dist/esm/core/context/draft-family-values.companion.js.map +1 -0
- package/dist/esm/core/inject/models/container.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.js +28 -4
- package/dist/esm/core/inject/models/container.js.map +1 -1
- package/dist/esm/core/inject/models/service-types.d.ts +12 -2
- package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/core/inject/models/service-types.js +14 -2
- package/dist/esm/core/inject/models/service-types.js.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +74 -2
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +37 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.js +55 -0
- package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +93 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +290 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +630 -16
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +592 -17
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +1417 -93
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +61 -4
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +136 -10
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +11 -0
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection-behavior-registry.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +21 -0
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +21 -3
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +11 -3
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +15 -5
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +28 -15
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts +24 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js +29 -5
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +116 -0
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +223 -0
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +9 -6
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts +2 -1
- package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/assertions.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-register.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/brand-prompt-renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/chart-registration-refs.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +82 -49
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-child.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-module-exports.utils.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/definition-specifications.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.d.ts +33 -0
- package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.js +59 -0
- package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +33 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +46 -140
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +15 -0
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +140 -46
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/market-context-block.builder.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/market-prompt-renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +24 -0
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +116 -10
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/risk-signals.behavior.d.ts +79 -0
- package/dist/esm/core/introspection/subprocess/risk-signals.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/risk-signals.behavior.js +49 -0
- package/dist/esm/core/introspection/subprocess/risk-signals.behavior.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +314 -212
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-elements.behavior.d.ts +72 -0
- package/dist/esm/core/introspection/subprocess/specification-elements.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/specification-elements.behavior.js +123 -0
- package/dist/esm/core/introspection/subprocess/specification-elements.behavior.js.map +1 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +184 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.js +311 -0
- package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -0
- package/dist/esm/core/introspection/workspace-elements.companion.d.ts +54 -0
- package/dist/esm/core/introspection/workspace-elements.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/workspace-elements.companion.js +43 -0
- package/dist/esm/core/introspection/workspace-elements.companion.js.map +1 -0
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.models.d.ts +7 -0
- package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.models.js.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +7 -4
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.schemas.js +1 -0
- package/dist/esm/core/lock/wildo-saas-lock.schemas.js.map +1 -1
- package/dist/esm/core/runtime/application-runtime-liveness.companion.d.ts +31 -0
- package/dist/esm/core/runtime/application-runtime-liveness.companion.d.ts.map +1 -0
- package/dist/esm/core/runtime/application-runtime-liveness.companion.js +53 -0
- package/dist/esm/core/runtime/application-runtime-liveness.companion.js.map +1 -0
- package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js +30 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/models/companion-runtime.models.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/file-storage-initialization.companion.d.ts +54 -0
- package/dist/esm/core/runtime/services/file-storage-initialization.companion.d.ts.map +1 -0
- package/dist/esm/core/runtime/services/file-storage-initialization.companion.js +54 -0
- package/dist/esm/core/runtime/services/file-storage-initialization.companion.js.map +1 -0
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +11 -2
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js +182 -31
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-local-signing-key.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +3 -3
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +27 -9
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-workbench-topology.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/platform-core-domain-modules.companion.d.ts.map +1 -1
- package/dist/esm/core/specifications/chart-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/composite-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts +0 -4
- package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/cross-registry-rendering.shared.js +0 -4
- package/dist/esm/core/specifications/cross-registry-rendering.shared.js.map +1 -1
- package/dist/esm/core/specifications/execution-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/feature-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/flows-actors-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/frontend-component-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/full-custom-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/guidance-flow-specification-context.factory.js.map +1 -1
- package/dist/esm/core/specifications/milestone-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-element-rendering.shared.js +6 -34
- package/dist/esm/core/specifications/onboarding-element-rendering.shared.js.map +1 -1
- package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-view-specification-context.factory.js.map +1 -1
- package/dist/esm/core/specifications/product-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.js +2 -0
- package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
- package/dist/esm/core/specifications/role-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.models.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/system-email-template-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/validate-resource-field-completeness.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts +4 -2
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +12 -2
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.service.d.ts +21 -1
- package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.service.js +25 -1
- package/dist/esm/core/traceability/companion-traceability.service.js.map +1 -1
- package/dist/esm/core/utils/atomic-write.utils.d.ts.map +1 -1
- package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts +45 -0
- package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts.map +1 -0
- package/dist/esm/core/utils/derived-input-signature.companion.utils.js +96 -0
- package/dist/esm/core/utils/derived-input-signature.companion.utils.js.map +1 -0
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts +35 -0
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -0
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +118 -0
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -0
- package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +34 -0
- package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -0
- package/dist/esm/creation-conversation/creation-conversation.function-tools.js +280 -0
- package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -0
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.d.ts +19 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.js +61 -5
- package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts +3 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +7 -2
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
- package/dist/esm/deliberations/utils/load-committed-expert-agents.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts +30 -0
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +92 -41
- package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
- package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +34 -0
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -0
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +130 -0
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -0
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts +36 -3
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +136 -5
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.schemas.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +5 -0
- 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 +58 -8
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/expert-personas/services/persona-source-ownership.d.ts +8 -0
- package/dist/esm/expert-personas/services/persona-source-ownership.d.ts.map +1 -0
- package/dist/esm/expert-personas/services/persona-source-ownership.js +83 -0
- package/dist/esm/expert-personas/services/persona-source-ownership.js.map +1 -0
- package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.js +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts +4 -4
- package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.js +4 -4
- package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts +2 -2
- package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.js +2 -2
- package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_MENUBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NAVIGATION_BACK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +4 -2
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +5 -3
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts +2 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.js +2 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.js +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts +6 -5
- package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.js +7 -6
- package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts +3 -3
- package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.js +3 -3
- package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_TOOLBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -2
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +2 -2
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts +2 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.js +2 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +43 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +43 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.d.ts +26 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.js +26 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.d.ts +18 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.js +18 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts +3 -3
- package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.js +3 -3
- package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.js +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +2 -2
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +2 -2
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +4 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts +10 -10
- package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.js +10 -10
- package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +25 -13
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +26 -14
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.js +2 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.d.ts +17 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.js +17 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.js.map +1 -0
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts +5 -5
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.js +5 -5
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.js.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.js +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.js.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.js +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.js.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts +16 -2
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.js +16 -2
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.js.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts +3 -3
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.js +3 -3
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_ACTION_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts +8 -8
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.js +8 -8
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +14 -14
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +14 -14
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +22 -6
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +23 -7
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.js +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CHAIN_OF_THOUGHT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CODE_BLOCK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.js +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.d.ts +21 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.js +21 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_EXECUTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_NODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_INLINE_CITATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.js +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_OPEN_IN_CHAT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_PLAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_PROMPT_INPUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +4 -5
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +4 -5
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts +4 -4
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.js +4 -4
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.js +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +25 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +25 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +3 -2
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +4 -3
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts +3 -2
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.js +4 -3
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +3 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +4 -2
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BREADCRUMB.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BUTTON.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CAROUSEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CELEBRATION_OVERLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.js +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.d.ts +15 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.js +15 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DIALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.d.ts +12 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.js +12 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BOOLEAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_DURATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +4 -3
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +4 -3
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts +3 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.js +4 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_GALLERY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_VIDEO.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_MONEY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.d.ts +22 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.js +22 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.js +2 -2
- package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_LOCK_BADGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts +6 -6
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.js +6 -6
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.js +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +15 -8
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +16 -9
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +20 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +20 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_BOOLEAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +39 -20
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +39 -20
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_PHONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts +5 -5
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.js +5 -5
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_IMAGE_CROP.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_LOADING_OVERLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_LOADING_SPINNER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OVERLAY_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_PAGINATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.d.ts +13 -0
- package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.js +13 -0
- package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.d.ts +13 -0
- package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.js +13 -0
- package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_SELECT_MULTIPLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SHEET.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.js +3 -3
- package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.d.ts +15 -0
- package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.js +15 -0
- package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.js.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts +5 -3
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.js +6 -4
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts +10 -9
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.js +11 -10
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts +5 -5
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.js +5 -5
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +6 -6
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +6 -6
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts +7 -7
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.js +7 -7
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.js +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.js +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts +4 -4
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.js +4 -4
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.d.ts +24 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.js +24 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.js.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +6 -4
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +6 -4
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +14 -10
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +14 -10
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts +6 -6
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.js +6 -6
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts +11 -8
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.js +12 -9
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts +9 -8
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.js +9 -8
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.js.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts +25 -9
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.js +25 -9
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts +1 -1
- package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.js +1 -1
- package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.js +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts +1 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.js +2 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts +25 -24
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.js +26 -25
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.js +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +3 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +4 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.js +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +11 -11
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +11 -11
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +12 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +13 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_PAGINATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts +6 -6
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.js +6 -6
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.js +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.js +2 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.js.map +1 -1
- package/dist/esm/i18n/components/guidance_announcement.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_banner.en.d.ts +1 -1
- package/dist/esm/i18n/components/guidance_banner.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_banner.en.js +1 -1
- package/dist/esm/i18n/components/guidance_banner.en.js.map +1 -1
- package/dist/esm/i18n/components/guidance_card.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist.en.d.ts +2 -2
- package/dist/esm/i18n/components/guidance_checklist.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist.en.js +2 -2
- package/dist/esm/i18n/components/guidance_checklist.en.js.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts +1 -0
- package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist_item.en.js +2 -1
- package/dist/esm/i18n/components/guidance_checklist_item.en.js.map +1 -1
- package/dist/esm/i18n/components/guidance_modal.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts +1 -1
- package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_onboarding_view.en.js +1 -1
- package/dist/esm/i18n/components/guidance_onboarding_view.en.js.map +1 -1
- package/dist/esm/i18n/components/guidance_survey.en.d.ts +1 -0
- package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_survey.en.js +2 -1
- package/dist/esm/i18n/components/guidance_survey.en.js.map +1 -1
- package/dist/esm/i18n/components/guidance_tooltip.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_tour.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts +1 -1
- package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_achievement_badge.en.js +1 -1
- package/dist/esm/i18n/components/progression_achievement_badge.en.js.map +1 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +5 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.js +6 -2
- package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -13
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -1
- package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +17 -0
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -0
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +252 -0
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts +15 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +58 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -1
- package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +96 -0
- package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -0
- package/dist/esm/i18n/errors_messages/errors-messages.en.js +54 -0
- package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -0
- package/dist/esm/i18n/index.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +2014 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +516 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts +878 -8
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js +247 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts +504 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js +153 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.d.ts +78 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.js +255 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts +149 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js +79 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +89 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +74 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +70 -5
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +67 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +80 -0
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +50 -0
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.d.ts +95 -0
- package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.js +54 -0
- package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.d.ts +95 -0
- package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.js +51 -0
- package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts +1 -1
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDomainResources.en.js +2 -2
- package/dist/esm/i18n/resources/workbenchDomainResources.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +108 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +61 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +99 -0
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +87 -0
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.d.ts +121 -0
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.js +84 -0
- package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +83 -0
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +71 -0
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +159 -0
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +103 -0
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +142 -6
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +103 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +94 -4
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +79 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +5074 -257
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +1201 -44
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts +86 -3
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.js +90 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +97 -0
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +77 -0
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts +272 -0
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/application-creation.en.js +319 -0
- package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/compliance-programme.en.d.ts +154 -0
- package/dist/esm/i18n/system_enums/compliance-programme.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/compliance-programme.en.js +154 -0
- package/dist/esm/i18n/system_enums/compliance-programme.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/flows-actors.en.d.ts +54 -0
- package/dist/esm/i18n/system_enums/flows-actors.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/flows-actors.en.js +54 -0
- package/dist/esm/i18n/system_enums/flows-actors.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/market.en.d.ts +12 -2
- package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/market.en.js +12 -2
- package/dist/esm/i18n/system_enums/market.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/processor-register.en.d.ts +43 -0
- package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/processor-register.en.js +43 -0
- package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/risk-register.en.d.ts +56 -0
- package/dist/esm/i18n/system_enums/risk-register.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/risk-register.en.js +56 -0
- package/dist/esm/i18n/system_enums/risk-register.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +50 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.js +55 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +47 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +48 -0
- package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +18 -0
- package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-dossier.en.js +18 -0
- package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-playbook-run.en.d.ts +29 -0
- package/dist/esm/i18n/system_enums/workbench-playbook-run.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-playbook-run.en.js +29 -0
- package/dist/esm/i18n/system_enums/workbench-playbook-run.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +24 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +24 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -0
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +51 -3
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js +36 -2
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
- package/dist/esm/i18n-labelling/services/component-labels-bootstrap.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +26 -16
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +167 -40
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +8 -8
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +45 -39
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +104 -0
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +456 -16
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +30 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.d.ts +91 -0
- package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.js +149 -0
- package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +27 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +44 -0
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +27 -0
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js +27 -0
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts +12 -0
- package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/guidance-keys.utils.js +58 -1
- package/dist/esm/i18n-labelling/utils/guidance-keys.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-file-source.utils.js +19 -0
- package/dist/esm/i18n-labelling/utils/label-file-source.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js +10 -0
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/role-lifecycle-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +27 -24
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +176 -136
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts +11 -0
- package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.js +27 -3
- package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/translate-locale-contract.utils.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/market/services/market-generation.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts +29 -0
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +59 -0
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -0
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +35 -0
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +69 -3
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +6 -4
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +1 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +21 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts +46 -0
- package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/build-task-rearm.models.js +43 -0
- package/dist/esm/meta-workflows/models/build-task-rearm.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +34 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +59 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +65 -0
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +83 -0
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +69 -7
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +70 -7
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +27 -5
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +208 -0
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +273 -0
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +356 -0
- package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js +417 -0
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.d.ts +14 -0
- package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.js +21 -0
- package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.js.map +1 -0
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js +3 -1
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js.map +1 -1
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +65 -0
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +148 -0
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +929 -51
- 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 +2047 -146
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +115 -36
- 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 +270 -47
- 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 +402 -16
- 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 +1398 -70
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts +47 -0
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js +103 -0
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +29 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +88 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +47 -0
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +102 -0
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
- package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
- package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
- package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +81 -0
- package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/dossier.companion.service.js +231 -0
- package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.d.ts +36 -0
- package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.js +72 -0
- package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.js.map +1 -0
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts +82 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js +200 -31
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.d.ts +16 -0
- package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.js +29 -0
- package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.js.map +1 -0
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +196 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +380 -10
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/landed-module-import.companion.d.ts +2 -0
- package/dist/esm/meta-workflows/services/landed-module-import.companion.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/landed-module-import.companion.js +36 -0
- package/dist/esm/meta-workflows/services/landed-module-import.companion.js.map +1 -0
- package/dist/esm/meta-workflows/services/playbook-execution-trace.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +57 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +83 -3
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +949 -177
- 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 +3151 -454
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts +100 -0
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js +156 -0
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.d.ts +49 -0
- package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.js +93 -0
- package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.js.map +1 -0
- package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.d.ts +45 -0
- package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.d.ts.map +1 -0
- package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.js +145 -0
- package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.js.map +1 -0
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +33 -9
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js +70 -29
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +20 -5
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +38 -16
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-environment-identity.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot-assets.companion.service.d.ts.map +1 -1
- 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.map +1 -1
- package/package.json +18 -18
- package/dist/esm/i18n/composite_views/app.creation-board.en.js +0 -91
- package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts +0 -92
- package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +0 -1
- package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.js +0 -178
- package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.js.map +0 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts +0 -107
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +0 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js +0 -188
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js.map +0 -1
|
@@ -11,43 +11,90 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
var PlaybookRunCompanionService_1;
|
|
14
|
+
import { composeExternalAuthenticationBrief } from './external-authentication-brief.companion.utils.js';
|
|
14
15
|
import { z } from 'zod';
|
|
15
16
|
import { ResearchAgentDispatchCompanionService } from '../../claude-cli/services/research-agent-dispatch.companion.service.js';
|
|
16
17
|
import * as ApplicationCreationSpecs from '@wildo-ai/saas-specifications/application-creation';
|
|
18
|
+
import { PLAYBOOK_STEP_SCHEMA_NAMESPACES } from '../models/playbook-step-schema-namespaces.models.js';
|
|
17
19
|
import { inject, injectable } from 'inversify';
|
|
18
|
-
import { AI_ENGINE_CAPABILITIES, ENGINE_CLIENT_STORAGE_ENTRIES, DataRetentionClass, ErasureRetentionMode, undeclaredAiUseCapabilities, undeclaredRetentionClasses, uninventoriedClientStorageSurfaces, BillingConfigurationSchema, outstandingOperatorComplianceIdentityParts,
|
|
19
|
-
import { ApplicationAuthoredDocumentFactSpecificationSchema, ApplicationDocumentFactSpecificationSchema, ApplicationProcessorRegisterSchema,
|
|
20
|
-
import {
|
|
20
|
+
import { AI_ENGINE_CAPABILITIES, AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE, ENGINE_CLIENT_STORAGE_ENTRIES, DataRetentionClass, ErasureRetentionMode, undeclaredAiUseCapabilities, undeclaredRetentionClasses, vendorHostedProviderRefs, uninventoriedClientStorageSurfaces, BillingConfigurationSchema, OperatorComplianceIdentityPart, outstandingOperatorComplianceIdentityParts, ApplicationOperatorComplianceIdentitySchema, ApplicationProviderComplianceChoicesSchema, ApplicationRetentionScheduleSchema, ApplicationOperatingJurisdictionsSchema, appAssertedProcessingRegions, ProviderDeploymentModel, engineCapabilityIsAuthoringOnly, EngineCapability, deriveNextReviewOn, ReviewCadence, } from '@wildo-ai/saas-models';
|
|
21
|
+
import { ApplicationAuthoredDocumentFactSpecificationSchema, ApplicationDocumentFactSpecificationSchema, ApplicationProcessorRegisterSchema, classifyConfiguredProviderRecipients, computeApplicationDocumentFacts, overlayComputedDocumentFacts, ProcessorRegisterEntryKind, processorProcessingRegions, registerEstablishesNoProcessorRecipients, MetaWorkflow_ContextSource, collectComplianceDocumentFactAvailability, deriveComplianceRegimes, } from '@wildo-ai/saas-specifications/application-creation';
|
|
22
|
+
import { AssuranceEvidenceJudgementVerdict, AssuranceEvidenceRunKind, AssuranceEvidenceRunSchema, deriveCapabilitySignal, deriveMcpExposureSignal, derivePersonalDataSignals, deriveProviderHostingSignal, deriveRetentionSignal, } from '@wildo-ai/saas-specifications/assurance';
|
|
23
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
24
|
+
import { importLandedTypeScriptModule } from './landed-module-import.companion.js';
|
|
21
25
|
import * as path from 'node:path';
|
|
22
26
|
import { join } from 'node:path';
|
|
23
|
-
import {
|
|
24
|
-
import { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries } from '@wildo-ai/framework-knowledge';
|
|
25
|
-
import { MetaWorkflow_EvaluationTreatmentDefinitionSchema } from '@wildo-ai/saas-models/meta-workflows';
|
|
26
|
-
import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, composeElicitationSection, BUILD_DECOMPOSE_INPUT_FAMILIES, STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY, evaluatePlaybookCatalogEligibility, buildApplicationCoherenceReport, composeAssuranceDocumentBlueprintBrief, composeAssuranceDocumentFactObligationsBrief, composeAssuranceProgramAuthorityBrief, deriveOneFamilyFreshness, resolveStepOutputSchema, runPlaybookChoreography, buildPlaybookReviewGuide, evaluatePlaybookEligibility, getFamilyPackageRelativePath, getLandableArtifactFamilies, isPlaybookGenerationSuspension, renderApplicationCoherenceReport,
|
|
27
|
+
import { loadDraftFamilyValues } from '../../core/context/draft-family-values.companion.js';
|
|
28
|
+
import { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries, readFrameworkKnowledgeSkillBody } from '@wildo-ai/framework-knowledge';
|
|
29
|
+
import { MetaWorkflow_EvaluationTreatmentDefinitionSchema, MetaWorkflow_Executor, } from '@wildo-ai/saas-models/meta-workflows';
|
|
30
|
+
import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, composeElicitationSection, dispatchOutcomeStepRef, BUILD_DECOMPOSE_INPUT_FAMILIES, STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY, evaluatePlaybookCatalogEligibility, buildApplicationCoherenceReport, composeAssuranceDocumentBlueprintBrief, composeAssuranceDocumentFactObligationsBrief, renderAssuranceDocumentClaimGuardsForJudge, composeAssuranceEvidenceBrief, composeAuthoredDocumentFactsBrief, composeAssuranceProgramAuthorityBrief, composeApplicationRoleGraphBrief, deriveOneFamilyFreshness, resolveStepOutputSchema, runPlaybookChoreography, countCheckpointedRounds, describeStaleOutput, PlaybookLaneBoundaryDecision, collectPlaybookLaneBoundaries, isJudgeVerdictStepRef, buildPlaybookReviewGuide, evaluatePlaybookEligibility, getFamilyPackageRelativePath, resolvePlaybookOutputLandingTarget, getLandableArtifactFamilies, isPlaybookGenerationSuspension, renderApplicationCoherenceReport, renderDeclaredInputFamily, composeDeclaredInputWithheldAspects, composeMarketFitScoresSection, composeRiskSignalsSection, widenDeclaredInputAspects, collectConvenedExpertRoles, committedCharterRoleRefs, renderPlaybookReviewGuide, runPlaybookGeneration, DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS, PlaybookClarificationAction, accumulateClarificationRequests, validateClarificationAnswers, composeClarificationAnswersSection, runPlaybookJudge, runPlaybookLoop, composeBillingCommercialModelBrief, composeOperatingJurisdictionCoverageBrief, projectPlaybookElicitationAsDecision, resolveElicitationAnswers, } from '@wildo-ai/application-creation-runtime';
|
|
27
31
|
// The provider REGISTRY, not the engine map: importing the package root runs its bootstrap, which
|
|
28
32
|
// registers the engine specifications, and an application's own registered provider specifications
|
|
29
33
|
// join the same registry — so one accessor covers both authorities.
|
|
30
|
-
import { listRegisteredProviderSpecifications } from '@wildo-ai/saas-specifications';
|
|
34
|
+
import { listRegisteredProviderSpecifications, getExpertRoleTemplate, ExpertShapingInputKind, } from '@wildo-ai/saas-specifications';
|
|
35
|
+
import { isActorExecutionSubjectBusyError, describeCaughtError } from '@wildo-ai/saas-backend-lib';
|
|
31
36
|
import { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';
|
|
32
|
-
import { JourneyArtifactValidationState, MetaWorkflowPlaybookSchema } from '@wildo-ai/saas-specifications/application-creation';
|
|
33
|
-
import { readCodingModelDestinations, } from '@wildo-ai/external-connectors-models';
|
|
37
|
+
import { ApplicationSpecificationFamily, JourneyArtifactValidationState, MetaWorkflowPlaybookSchema, } from '@wildo-ai/saas-specifications/application-creation';
|
|
38
|
+
import { describeStructuredValidationIssue, readCodingModelDestinations, readStructuredGenerationFailure, } from '@wildo-ai/external-connectors-models';
|
|
39
|
+
import { readBuildParallelism } from '@wildo-ai/platform-config-lib';
|
|
34
40
|
import { StructuredDeliberationCompanionService } from '../../deliberations/services/structured-deliberation.companion.service.js';
|
|
35
|
-
import { PlacementPlanSchema, collectRevertedPlacementRevisions } from '@wildo-ai/saas-specifications/application-creation';
|
|
41
|
+
import { PlacementPlanSchema, collectRevertedPlacementRevisions, } from '@wildo-ai/saas-specifications/application-creation';
|
|
42
|
+
import { ApplicationSchemaPlanObligation, assessApplicationSchemaPlanObligation, } from '../../core/config/application-schema-plan-obligation.companion.utils.js';
|
|
43
|
+
import { composeEngineSettingsDestinationLines } from './engine-settings-destination-catalog.companion.js';
|
|
36
44
|
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
|
|
37
45
|
import { PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service.js';
|
|
38
|
-
import { ApplicationBuildDispatchCompanionService } from './application-build-dispatch.companion.service.js';
|
|
46
|
+
import { ApplicationBuildDispatchCompanionService, } from './application-build-dispatch.companion.service.js';
|
|
39
47
|
import { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service.js';
|
|
40
48
|
import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service.js';
|
|
41
49
|
import { FoundationExecutorCompanionService } from './foundation-executor.companion.service.js';
|
|
50
|
+
import { CAPABILITY_COMPOSITION_PLAYBOOK_REF, CapabilityCompositionExecutorCompanionService, } from './capability-composition-executor.companion.service.js';
|
|
51
|
+
import { APPLICATION_MATURITY_PLAYBOOK_REF, ApplicationMaturityExecutorCompanionService, } from './application-maturity-executor.companion.service.js';
|
|
52
|
+
import { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service.js';
|
|
53
|
+
import { LOGO_PANEL_ROLE_REFS } from '../../brand/services/logo-deliberation.companion.service.js';
|
|
42
54
|
import { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service.js';
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
55
|
+
import { PlaybookChoreographyCheckpointContextSchema, PlaybookRunCheckpointKind, PlaybookRunSuspensionCheckpointSchema, SuspendedPlaybookRunNotFoundError, projectPlaybookClarificationAsDecision, APPLICATION_CREATION_AUTONOMY_POSTURE, LaneBoundaryTreatment, laneBoundaryTreatmentFor, projectLaneBoundaryAsDecision, } from '../models/playbook-run-checkpoint.models.js';
|
|
56
|
+
import { CompositeRoundRelaunchDecision, decideCompositeRoundRelaunch } from '../models/composite-round-relaunch.models.js';
|
|
57
|
+
import { projectLastPlaybookLoop, projectPlaybookRunRecords, readPlaybookRunMeasurement, summarizePlaybookLoopResult, summarizePlaybookRunResult } from '../models/playbook-run-record.models.js';
|
|
58
|
+
import { PLAYBOOK_SPEND_NOT_OBSERVED, mergePlaybookSpend } from '@wildo-ai/application-creation-runtime';
|
|
59
|
+
import { PlaybookSpendMeterCompanionService } from './playbook-spend-meter.companion.service.js';
|
|
60
|
+
import { CompanionExecutionsListQuerySchema } from '../../companion-api/companion-api.schemas.js';
|
|
45
61
|
import { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service.js';
|
|
46
62
|
import { createPlaybookExecutionTrace } from './playbook-execution-trace.companion.service.js';
|
|
47
63
|
import { loadBackendCompanionExports, loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion.js';
|
|
48
64
|
import { choreographyEndedByEnvironment, isInfrastructureShapedAgentFailure, waitForDevCompileQuiet, } from '../../core/runtime/dev-compile-quiet.companion.js';
|
|
49
|
-
import { META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF, META_WORKFLOW_TRACE_STEP_KIND } from '../models/meta-workflows-lane.models.js';
|
|
65
|
+
import { META_WORKFLOWS_CORRELATION_DOMAIN, MetaWorkflowsExclusiveSubject, META_WORKFLOWS_PLAYBOOK_LOOP_ACTOR_REF, META_WORKFLOWS_PLAYBOOK_RUN_ACTOR_REF, META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF, META_WORKFLOWS_SYSTEM_REF, META_WORKFLOW_TRACE_STEP_KIND } from '../models/meta-workflows-lane.models.js';
|
|
66
|
+
import { Actor_Task_Topics, FlowsActors_Status } from '@wildo-ai/saas-models';
|
|
67
|
+
import { WorkbenchTaskCorrelationRef } from '@wildo-ai/platform-core-shared';
|
|
68
|
+
import { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service.js';
|
|
50
69
|
import { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdict, BriefAdequacyVerdictOutputSchema } from '../models/brief-adequacy.actors-system.definitions.js';
|
|
70
|
+
/**
|
|
71
|
+
* The runtime's checkpoint ↔ the row's context, RECURSIVELY (#1497).
|
|
72
|
+
*
|
|
73
|
+
* A lane in flight checkpoints through its parent, so a parent's snapshot carries the lane's under
|
|
74
|
+
* `nested`. Two converters rather than two inline spreads, because the shape is the same at every
|
|
75
|
+
* level and a mapping written once per level drops the level it forgot — the outer run resumes, the
|
|
76
|
+
* lane inside it starts over, and nothing says so.
|
|
77
|
+
*/
|
|
78
|
+
function choreographyProgressToContext(snapshot) {
|
|
79
|
+
return {
|
|
80
|
+
playbookRef: snapshot.playbookRef,
|
|
81
|
+
goal: snapshot.goal,
|
|
82
|
+
completedIterations: snapshot.completedIterations,
|
|
83
|
+
stepResults: snapshot.stepResults.map(([ref, value]) => ({ ref, value })),
|
|
84
|
+
delivered: [...snapshot.delivered],
|
|
85
|
+
...(snapshot.nested && snapshot.nested.length > 0 ? { nested: snapshot.nested.map(choreographyProgressToContext) } : {}),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function choreographyProgressFromContext(context) {
|
|
89
|
+
return {
|
|
90
|
+
playbookRef: context.playbookRef,
|
|
91
|
+
goal: context.goal,
|
|
92
|
+
completedIterations: context.completedIterations,
|
|
93
|
+
stepResults: context.stepResults.map((entry) => [entry.ref, entry.value]),
|
|
94
|
+
delivered: context.delivered,
|
|
95
|
+
...(context.nested && context.nested.length > 0 ? { nested: context.nested.map(choreographyProgressFromContext) } : {}),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
51
98
|
/**
|
|
52
99
|
* Run one compiled playbook: brief the model against the family's own schema, then land the answer as
|
|
53
100
|
* specification FILES in the application's specifications package.
|
|
@@ -65,8 +112,9 @@ import { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdict, BriefAdequacyVerd
|
|
|
65
112
|
*
|
|
66
113
|
* ## Nothing here accepts anything
|
|
67
114
|
*
|
|
68
|
-
* Files appear in the working tree
|
|
69
|
-
* (`.claude/rules/one-source-of-truth.md`, rules 2 and 3)
|
|
115
|
+
* Files appear in the working tree, and the run itself accepts none of them. Acceptance is a commit
|
|
116
|
+
* (`.claude/rules/one-source-of-truth.md`, rules 2 and 3): made by a person, or under the autonomy posture
|
|
117
|
+
* by the companion before the next build baseline, authored as itself (#1534). There is no receipt, no manifest entry and no
|
|
70
118
|
* acceptance ceremony, and a run that is thrown away costs a re-run and no fact about the application.
|
|
71
119
|
*/
|
|
72
120
|
/**
|
|
@@ -79,6 +127,36 @@ import { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdict, BriefAdequacyVerd
|
|
|
79
127
|
* property of whatever happens to be on disk.
|
|
80
128
|
*/
|
|
81
129
|
const FILE_ONLY_ARTIFACT_FAMILIES = Object.freeze(['domain-plan', 'build-plan']);
|
|
130
|
+
/**
|
|
131
|
+
* What the CODING_AGENT tier hands its judge as the judged subject.
|
|
132
|
+
*
|
|
133
|
+
* NOT an artifact family: a coding dispatch lands nothing into the specifications package, so there is no
|
|
134
|
+
* family to name. `runPlaybookJudge` types its subjects' `family` as a free string and renders it as the
|
|
135
|
+
* evidence heading, and this is that heading — declared once, so the one place it is written is the one
|
|
136
|
+
* place its meaning can be explained.
|
|
137
|
+
*/
|
|
138
|
+
const SETTLED_CODING_RUN_JUDGE_SUBJECT = 'settled-coding-run';
|
|
139
|
+
/**
|
|
140
|
+
* Where this process says "a detached playbook run is still working", app-root-relative.
|
|
141
|
+
*
|
|
142
|
+
* The dev supervisor holds a restart while a coding run holds the workspace-mutation lock. That lock
|
|
143
|
+
* belongs to the AGENT and is released the moment its turn ends — while the run itself keeps going:
|
|
144
|
+
* it awaits the settlement, asks the evaluation treatment's judge for a verdict (a model call), and
|
|
145
|
+
* writes the outcome. Measured twice on 2026-09-16, the supervisor logged
|
|
146
|
+
* `Releasing held restart after 21s (NO_LOCK)` at exactly that moment and killed the companion inside
|
|
147
|
+
* the tail, leaving the agent's files on disk with no recorded outcome and no verdict — the work kept,
|
|
148
|
+
* the evidence lost.
|
|
149
|
+
*
|
|
150
|
+
* So the tail carries its own liveness signal, refreshed while any detached run is in flight and
|
|
151
|
+
* removed when none is. A COPY of `PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH` in
|
|
152
|
+
* `scripts/dev-orchestrator/runtime-supervisor-lifecycle.mjs`, which cannot import this source.
|
|
153
|
+
*/
|
|
154
|
+
const PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH = '.wildo-saas/state/playbook-run.heartbeat';
|
|
155
|
+
/**
|
|
156
|
+
* How often that file's mtime is refreshed. The supervisor judges it stale at twice this, so a
|
|
157
|
+
* companion that dies stops holding anything within one window rather than forever.
|
|
158
|
+
*/
|
|
159
|
+
const PLAYBOOK_RUN_HEARTBEAT_INTERVAL_MS = 5_000;
|
|
82
160
|
/**
|
|
83
161
|
* Does this playbook DECLARE the given derived context section?
|
|
84
162
|
*
|
|
@@ -135,17 +213,53 @@ const DETERMINISTIC_CLI_VERIFICATION_CHECKS = {
|
|
|
135
213
|
};
|
|
136
214
|
/** The zero-output playbook the composite foundation executor owns (J-2 item 2). */
|
|
137
215
|
const FOUNDATION_PLAYBOOK_REF = 'bottom_up.foundation';
|
|
216
|
+
/**
|
|
217
|
+
* The zero-output playbook that STAFFS the expert panels (#572). Runner-owned like foundation: the run
|
|
218
|
+
* short-circuits into the companion's expert-persona derive → accept flow before any brief is composed.
|
|
219
|
+
*/
|
|
220
|
+
const EXPERT_PERSONAS_PLAYBOOK_REF = 'top_down.expert-personas';
|
|
221
|
+
/**
|
|
222
|
+
* Which landed FAMILY each expert shaping input reads, so a role whose inputs have not landed is reported
|
|
223
|
+
* as waiting instead of failing the whole run at derivation. Mirrors `resolveExpertPersonaDerivationInputs`
|
|
224
|
+
* in the introspection handler: ACCEPTED_DECISIONS and DESIGN_SYSTEM are always resolvable there (an
|
|
225
|
+
* empty asset list, a composed frontend config), so they map to no family. `Record` so a kind added to the
|
|
226
|
+
* vocabulary must be classified here rather than defaulting.
|
|
227
|
+
*/
|
|
228
|
+
const EXPERT_SHAPING_INPUT_FAMILY = {
|
|
229
|
+
[ExpertShapingInputKind.VISION]: 'vision-brief',
|
|
230
|
+
[ExpertShapingInputKind.MARKET]: 'market-snapshot',
|
|
231
|
+
[ExpertShapingInputKind.BRAND]: 'brand-brief',
|
|
232
|
+
[ExpertShapingInputKind.REQUIREMENTS]: 'requirements',
|
|
233
|
+
[ExpertShapingInputKind.BUSINESS_MODEL]: 'business-model',
|
|
234
|
+
[ExpertShapingInputKind.ACCEPTED_DECISIONS]: null,
|
|
235
|
+
[ExpertShapingInputKind.DESIGN_SYSTEM]: null,
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* The prefix every landed constant is named with — `applicationVisionSnapshot`, and the rest.
|
|
239
|
+
*
|
|
240
|
+
* Named once because two sites must agree: the generation run that WRITES a landed module, and the
|
|
241
|
+
* reader that imports one back to find out what the application already holds. They resolve the same
|
|
242
|
+
* landing target, so a divergence would look for a constant nothing writes.
|
|
243
|
+
*
|
|
244
|
+
* It is deliberately NOT derived from the application's name (`wonder-todos` → `wonderTodos`), which
|
|
245
|
+
* would bake app identity into exported identifiers — app identity lives in VALUES, never in the
|
|
246
|
+
* names of landed exports.
|
|
247
|
+
*/
|
|
248
|
+
const LANDED_CONSTANT_PREFIX = 'application';
|
|
138
249
|
/** Marker for "the file is there, its value is not readable from here". Never confused with real content. */
|
|
139
250
|
/**
|
|
140
|
-
* The governed documents the
|
|
251
|
+
* The governed documents the FACT producer is briefed on — the only document set this runtime still
|
|
252
|
+
* names, and a different question from which documents a lane may draft.
|
|
253
|
+
*
|
|
254
|
+
* Drafting moved to `method.draftableDocumentDefinitionRefs` on the playbook (#1453): a lane is
|
|
255
|
+
* defined by its documents, so the declaration belongs with the methodology and not here, and a
|
|
256
|
+
* second drafting lane could not exist while this constant was the only answer.
|
|
141
257
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* prompt would be ~42KB of obligations for documents nobody asked for — and a prompt section that
|
|
146
|
-
* gets skimmed is indistinguishable from one that is absent.
|
|
258
|
+
* This one stays, because it answers something else. Declaring a fact and drafting a document are
|
|
259
|
+
* different acts with different costs: the FACT brief ships names and authority kinds, a few lines
|
|
260
|
+
* each, so it can afford a wider set than any single drafting lane carries.
|
|
147
261
|
*/
|
|
148
|
-
const
|
|
262
|
+
const FACT_OBLIGATION_PUBLIC_DOCUMENT_DEFINITION_REFS = Object.freeze([
|
|
149
263
|
'document-definition:public.privacy-notice',
|
|
150
264
|
'document-definition:public.service-terms',
|
|
151
265
|
]);
|
|
@@ -168,10 +282,39 @@ const DRAFTABLE_DOCUMENT_DEFINITION_REFS = Object.freeze([
|
|
|
168
282
|
* this list: the brief now distinguishes the two halves rather than asking for everything (#217).
|
|
169
283
|
*/
|
|
170
284
|
const FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS = Object.freeze([
|
|
171
|
-
...
|
|
285
|
+
...FACT_OBLIGATION_PUBLIC_DOCUMENT_DEFINITION_REFS,
|
|
172
286
|
'document-definition:governance.scope-system-description',
|
|
173
287
|
'document-definition:governance.program-handbook',
|
|
174
288
|
]);
|
|
289
|
+
/**
|
|
290
|
+
* The governed documents a run DRAFTED, from the values it produced.
|
|
291
|
+
*
|
|
292
|
+
* Pure and module-level so the judge's claim guards can be derived from the run itself rather than from
|
|
293
|
+
* whatever the application happens to hold on disk (#1452, corrected on the first live governance run).
|
|
294
|
+
* Reads only `compliance-document-candidate` entries, tolerates a value of any shape, and de-duplicates:
|
|
295
|
+
* a run that drafted one document must not ship that document's guards twice.
|
|
296
|
+
*/
|
|
297
|
+
function draftedCandidateDocumentRefs(values) {
|
|
298
|
+
if (!values)
|
|
299
|
+
return [];
|
|
300
|
+
const refs = values
|
|
301
|
+
.filter((entry) => entry.family === 'compliance-document-candidate')
|
|
302
|
+
.map((entry) => entry.value?.documentRef)
|
|
303
|
+
.filter((ref) => typeof ref === 'string' && ref !== '');
|
|
304
|
+
return [...new Set(refs)];
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Where this application's own assurance repository lives, and where its judged runs sit inside it.
|
|
308
|
+
*
|
|
309
|
+
* Named here because the companion is the FIRST reader outside `scripts/assurance/`, which owns the
|
|
310
|
+
* writer's copy of the same two strings. They are duplicated across a package boundary deliberately:
|
|
311
|
+
* the scripts are a standalone offline toolchain with no dependency on the companion, and importing
|
|
312
|
+
* either way round would couple a dev-loop service to an auditor's tool. What keeps them honest is that
|
|
313
|
+
* a wrong path here degrades to a legible "no assurance repository" section rather than a silent empty
|
|
314
|
+
* one — the reason every absence in this section says which absence it is.
|
|
315
|
+
*/
|
|
316
|
+
const ASSURANCE_REPOSITORY_RELATIVE_PATH = '.wildo-saas/state/assurance';
|
|
317
|
+
const ASSURANCE_JUDGED_RUNS_DIRECTORY = 'judged-runs';
|
|
175
318
|
const FILE_PRESENT_WITHOUT_VALUE = Object.freeze({ __artifactPresentWithoutValue: true });
|
|
176
319
|
/**
|
|
177
320
|
* The map the coherence report reads: accepted families PLUS landed drafts.
|
|
@@ -186,6 +329,21 @@ function coherenceInputFor(state) {
|
|
|
186
329
|
composed.set(family, value);
|
|
187
330
|
return composed;
|
|
188
331
|
}
|
|
332
|
+
/**
|
|
333
|
+
* The computed document facts, as a judge must read them (#964): not produced by the run, absent from its
|
|
334
|
+
* file on purpose, and still binding — a landed fact that contradicts one is unsupported.
|
|
335
|
+
*/
|
|
336
|
+
function renderComputedDocumentFactsForJudge(answers) {
|
|
337
|
+
if (answers === undefined || answers.length === 0)
|
|
338
|
+
return '';
|
|
339
|
+
return [
|
|
340
|
+
'# Facts the runtime COMPUTED from the application\'s declarations',
|
|
341
|
+
'Not produced by this run and not under judgment. They are absent from the landed file on purpose: never ask for',
|
|
342
|
+
'them to be declared. A landed fact that contradicts one of them is unsupported.',
|
|
343
|
+
'',
|
|
344
|
+
...answers.map((answer) => `- \`${answer.fact}\`: ${JSON.stringify(answer.value)}`),
|
|
345
|
+
].join('\n');
|
|
346
|
+
}
|
|
189
347
|
/** The requested playbook ref is not in the compiled catalog. Named so the transport can answer 404 rather than 500. */
|
|
190
348
|
export class UnknownPlaybookError extends Error {
|
|
191
349
|
}
|
|
@@ -215,9 +373,12 @@ export class PlaybookLoopAlreadyRunningError extends PlaybookRunAlreadyInFlightE
|
|
|
215
373
|
* same file every iteration, and whichever concludes first `consume()`s it — deleting the other's only
|
|
216
374
|
* resume point while it is still paying for iterations. Two DIFFERENT composites do not collide on the
|
|
217
375
|
* file, and are refused for the loop's own recorded reason: two portfolios' writes interleaved over one
|
|
218
|
-
* working tree with nothing relating them
|
|
219
|
-
*
|
|
220
|
-
*
|
|
376
|
+
* working tree with nothing relating them.
|
|
377
|
+
*
|
|
378
|
+
* Refused by the ENGINE since #1361: a composite's execution is opened with the `composite`
|
|
379
|
+
* single-flight subject, the driver refuses a second one from the running ROWS, and this error is
|
|
380
|
+
* that refusal re-worded with the holder named. It was an in-memory marker before — invisible to a
|
|
381
|
+
* second process, forgotten by a restart, and clearable by a nested run's `finally`.
|
|
221
382
|
*/
|
|
222
383
|
export class PlaybookChoreographyAlreadyRunningError extends PlaybookRunAlreadyInFlightError {
|
|
223
384
|
}
|
|
@@ -235,6 +396,47 @@ export class PlaybookChoreographyAlreadyRunningError extends PlaybookRunAlreadyI
|
|
|
235
396
|
* other and neither agreed with production. The array form is tolerated because the same key is spelt
|
|
236
397
|
* that way on provider records; there, membership IS the activation.
|
|
237
398
|
*/
|
|
399
|
+
/**
|
|
400
|
+
* The provider-scope key whose providers are reached by the tool that BUILDS the application rather
|
|
401
|
+
* than by the application serving its users.
|
|
402
|
+
*
|
|
403
|
+
* Named here rather than inlined because it decides whether a provider enters a customer-facing
|
|
404
|
+
* document as a data recipient. It mirrors the `providers.scopes.companion` key of
|
|
405
|
+
* `wildo.saas.config.ts`; the scope names are config object keys and have no enum today, so this is
|
|
406
|
+
* the single place the companion's own name is written down for this decision. If a provider-scope
|
|
407
|
+
* vocabulary is ever declared, this constant is what should derive from it.
|
|
408
|
+
*/
|
|
409
|
+
const AUTHORING_PROVIDER_SCOPE = 'companion';
|
|
410
|
+
/**
|
|
411
|
+
* The providers bound to a RUNTIME scope — every scope but the build-time companion's.
|
|
412
|
+
*
|
|
413
|
+
* One reading for both places that need it: the compliance section's recipient rendering and the
|
|
414
|
+
* computed `recipients-and-processors` fact (#964). A provider under `companion` is reached by the tool
|
|
415
|
+
* that builds the application and is never in the path of a user's data.
|
|
416
|
+
*/
|
|
417
|
+
function runtimeScopedProviderRefsOf(providers) {
|
|
418
|
+
return [...new Set(Object.entries(providers?.scopes ?? {})
|
|
419
|
+
.filter(([scope]) => scope !== AUTHORING_PROVIDER_SCOPE)
|
|
420
|
+
.flatMap(([, value]) => Object.keys(value?.providers ?? {})))].sort();
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* The next-review date an application's DECLARED `assuranceReviewCadence` schedules from this run's
|
|
424
|
+
* observed instant, or `undefined` when it schedules none (#647 decision C).
|
|
425
|
+
*
|
|
426
|
+
* The companion is where the cadence is read because it holds the application's configuration; the
|
|
427
|
+
* normalizer is pure and holds none. `undefined` is an ANSWER, not an error: no declaration and
|
|
428
|
+
* `AS_NEEDED` both reach the normalizer as an absent date, and the programme is then produced with a
|
|
429
|
+
* stamped limitation rather than refused.
|
|
430
|
+
*
|
|
431
|
+
* Takes the raw config value as `unknown` and checks it against the vocabulary rather than trusting a
|
|
432
|
+
* cast. The config schema validates the enum at load, so an unrecognised value here means an
|
|
433
|
+
* unvalidated config — and deriving a date from it would manufacture a commitment nobody made.
|
|
434
|
+
*/
|
|
435
|
+
export function resolveDeclaredAssuranceNextReviewOn(declaredCadence, recordedAt) {
|
|
436
|
+
if (!Object.values(ReviewCadence).includes(declaredCadence))
|
|
437
|
+
return undefined;
|
|
438
|
+
return deriveNextReviewOn(recordedAt, declaredCadence);
|
|
439
|
+
}
|
|
238
440
|
function enabledEngineCapabilityNames(engineCapabilities) {
|
|
239
441
|
if (Array.isArray(engineCapabilities))
|
|
240
442
|
return new Set(engineCapabilities.map(String));
|
|
@@ -293,26 +495,13 @@ function renderRetentionSchedule(schedule) {
|
|
|
293
495
|
function renderProcessorRegister(configuredProviderRefs, register, choices) {
|
|
294
496
|
/*
|
|
295
497
|
* A provider the operator declared SELF_HOSTED is not a recipient, so it cannot be an outstanding
|
|
296
|
-
* DISCLOSURE either
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
* `
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
* log and calls no API — the notice reported an outstanding disclosure about a provider that
|
|
304
|
-
* discloses nothing (wildo-ai/wildo-ai#208).
|
|
305
|
-
*
|
|
306
|
-
* A provider with NO choice STAYS in scope, deliberately. Absence means nobody has answered, which is
|
|
307
|
-
* exactly the gap this section exists to report; assuming self-hosted would silence it, and assuming
|
|
308
|
-
* vendor-hosted would publish a third party nobody declared. Only an explicit SELF_HOSTED excludes.
|
|
309
|
-
*/
|
|
310
|
-
const operatorRunRefs = new Set(Object.entries(choices ?? {})
|
|
311
|
-
.filter(([, choice]) => choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED)
|
|
312
|
-
.map(([providerRef]) => providerRef));
|
|
313
|
-
const recipientCandidateRefs = configuredProviderRefs.filter((providerRef) => !operatorRunRefs.has(providerRef));
|
|
314
|
-
const undeclared = undeclaredProcessorRefs(recipientCandidateRefs, register);
|
|
315
|
-
const stale = processorRefsNotConfigured(recipientCandidateRefs, register);
|
|
498
|
+
* DISCLOSURE either (wildo-ai/wildo-ai#208: `email-preview` renders mail to a log and calls no API). A
|
|
499
|
+
* provider with NO choice stays in scope, because absence means nobody has answered.
|
|
500
|
+
*
|
|
501
|
+
* The rule lives in `classifyConfiguredProviderRecipients` since #964, because the computed
|
|
502
|
+
* `recipients-and-processors` fact states the same classification and two copies could disagree.
|
|
503
|
+
*/
|
|
504
|
+
const { undeclaredProviderRefs: undeclared, staleProviderRefs: stale } = classifyConfiguredProviderRecipients(configuredProviderRefs, register, choices);
|
|
316
505
|
const declared = register?.processors ?? [];
|
|
317
506
|
return [
|
|
318
507
|
'## Who else processes personal data',
|
|
@@ -396,16 +585,42 @@ function renderProcessorRegister(configuredProviderRefs, register, choices) {
|
|
|
396
585
|
* elsewhere: a notice describing AI use without addressing consequence does not read as "unknown", it
|
|
397
586
|
* reads as "nothing significant happens here" — which is the exemption, claimed for free.
|
|
398
587
|
*/
|
|
399
|
-
function renderAiUsePosture(
|
|
400
|
-
|
|
588
|
+
function renderAiUsePosture(contractedServiceCapabilities, outsideContractedServiceCapabilities, posture) {
|
|
589
|
+
/*
|
|
590
|
+
* Scoped to the CONTRACTED SERVICE, because this section feeds a document about that service.
|
|
591
|
+
*
|
|
592
|
+
* `AI_ENGINE_CAPABILITIES` is the whole AI vocabulary and includes `AI_CODING_AGENT`, a build-time
|
|
593
|
+
* tool that writes the application's source. Asking whether it "DECIDES something about a person"
|
|
594
|
+
* is a question the running product does not raise, and answering it puts a development tool into
|
|
595
|
+
* an Article 22 statement.
|
|
596
|
+
*/
|
|
597
|
+
const enabledAi = AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE.filter((capability) => contractedServiceCapabilities.has(capability));
|
|
598
|
+
const enabledAuthoringOnlyAi = AI_ENGINE_CAPABILITIES.filter((capability) => outsideContractedServiceCapabilities.has(capability));
|
|
599
|
+
/*
|
|
600
|
+
* The build-time half is NAMED rather than dropped. Silence would leave a drafter that can see the
|
|
601
|
+
* capability elsewhere in this brief unable to tell whether the omission is a decision or a gap —
|
|
602
|
+
* and the honest sentence, which is what Wonder CRM's own fact should have said, distinguishes the
|
|
603
|
+
* SERVICE from the capability set rather than denying the capability exists.
|
|
604
|
+
*/
|
|
605
|
+
const authoringOnlyAiNote = enabledAuthoringOnlyAi.length > 0
|
|
606
|
+
? [
|
|
607
|
+
'',
|
|
608
|
+
`Enabled but OUTSIDE the contracted service (${enabledAuthoringOnlyAi.length}): `
|
|
609
|
+
+ `${enabledAuthoringOnlyAi.map((capability) => `\`${capability}\``).join(', ')} — development tooling that`,
|
|
610
|
+
'operates on this application\'s own source while it is built. It processes no user data and makes no',
|
|
611
|
+
'decision about any person, so it does NOT belong in this document. Do not deny it exists either:',
|
|
612
|
+
'the accurate statement is about the SERVICE, not about the capability set.',
|
|
613
|
+
]
|
|
614
|
+
: [];
|
|
401
615
|
if (enabledAi.length === 0) {
|
|
402
616
|
return [
|
|
403
617
|
'## Automated decisions and AI',
|
|
404
|
-
'
|
|
405
|
-
'AI processing of personal data, automated or otherwise.',
|
|
618
|
+
'No AI capability reaches this application\'s CONTRACTED SERVICE. That is a positive, checkable',
|
|
619
|
+
'statement: the service performs no AI processing of personal data, automated or otherwise.',
|
|
620
|
+
...authoringOnlyAiNote,
|
|
406
621
|
];
|
|
407
622
|
}
|
|
408
|
-
const undeclared = undeclaredAiUseCapabilities([...
|
|
623
|
+
const undeclared = undeclaredAiUseCapabilities([...contractedServiceCapabilities], posture);
|
|
409
624
|
return [
|
|
410
625
|
'## Automated decisions and AI',
|
|
411
626
|
'Per enabled AI capability: what it is used for, whether it DECIDES something about a person, and how',
|
|
@@ -624,10 +839,13 @@ function renderCodingModelDestinations(providerConfigurations) {
|
|
|
624
839
|
* - ABSENT — nobody has been asked. Names the surface, and says plainly that this is NOT "no consent
|
|
625
840
|
* is required", because rendering silence as an answer is the conflation the schema stays optional
|
|
626
841
|
* to prevent.
|
|
627
|
-
* -
|
|
628
|
-
* correct one, and the brief says why, because a drafter that reads
|
|
629
|
-
* throw away a declaration the operator deliberately made.
|
|
630
|
-
* -
|
|
842
|
+
* - an EMPTY required set — a POSITIVE answer: the operator declared that nothing is gated on consent.
|
|
843
|
+
* Usually the correct one, and the brief says why, because a drafter that reads it as "no
|
|
844
|
+
* information" would throw away a declaration the operator deliberately made.
|
|
845
|
+
* - required purposes — a gate, rendered with each purpose and what it gates, since the schema refuses
|
|
846
|
+
* one without. Purposes are listed as a SET (#453): requiring marketing says nothing about analytics.
|
|
847
|
+
* Since #453 this gate is also ENFORCED at runtime, so the brief says so: a notice may state it as a
|
|
848
|
+
* fact about the running product, not merely a declaration.
|
|
631
849
|
*
|
|
632
850
|
* The last line is the one that matters most and is easiest to omit: a consent GATE is not a lawful
|
|
633
851
|
* BASIS. For most B2B SaaS the basis for core processing is CONTRACT, and a notice that reads a gate
|
|
@@ -646,13 +864,15 @@ function renderServiceConsentRequirement(requirement) {
|
|
|
646
864
|
}
|
|
647
865
|
return [
|
|
648
866
|
'',
|
|
649
|
-
...(requirement.
|
|
867
|
+
...(requirement.requiredPurposes.length === 0
|
|
650
868
|
? [
|
|
651
869
|
'Service-wide consent requirement: NONE — the operator DECLARED that using the service is not',
|
|
652
870
|
'gated on consent. This is a positive answer, not an absence: state it as settled.',
|
|
653
871
|
]
|
|
654
872
|
: [
|
|
655
|
-
`Service-wide consent requirement: ${requirement.
|
|
873
|
+
`Service-wide consent requirement: consent to ${requirement.requiredPurposes.join(' and ')}, gating: ${requirement.gatedProcessing}`,
|
|
874
|
+
'This gate is ENFORCED: a signed-in person cannot use the application until they grant every purpose',
|
|
875
|
+
'listed. Each purpose is granted independently — requiring one implies nothing about another.',
|
|
656
876
|
]),
|
|
657
877
|
'A consent GATE is not a lawful BASIS. What a person must agree to in order to proceed, and the',
|
|
658
878
|
'Art. 6(1) basis the processing rests on, are different questions — the basis is declared per',
|
|
@@ -722,11 +942,16 @@ function renderOperatorComplianceIdentity(identity) {
|
|
|
722
942
|
...identity.lawfulBases.map((entry) => ` - ${entry.basis} for ${entry.purpose}`
|
|
723
943
|
+ (entry.assessmentNote === undefined ? '' : ` — assessment: ${entry.assessmentNote}`)),
|
|
724
944
|
]),
|
|
945
|
+
'',
|
|
946
|
+
identity.subjectRequestIdentityVerification === undefined
|
|
947
|
+
? 'Identity verification for rights requests: OUTSTANDING — `operatorComplianceIdentity.subjectRequestIdentityVerification`. '
|
|
948
|
+
+ 'Do NOT describe a verification step nobody has decided; a stated procedure is one a requester will rely on.'
|
|
949
|
+
: `Identity verification for rights requests: ${identity.subjectRequestIdentityVerification}`,
|
|
725
950
|
...(outstanding.length === 0
|
|
726
951
|
? []
|
|
727
952
|
: [
|
|
728
953
|
'',
|
|
729
|
-
`${outstanding.length} of
|
|
954
|
+
`${outstanding.length} of ${Object.values(OperatorComplianceIdentityPart).length} identity part(s) outstanding: ${outstanding.join(', ')}. The identity is PARTIALLY`,
|
|
730
955
|
'declared — state each outstanding part as an open gap in the document rather than omitting it. A document',
|
|
731
956
|
'that silently leaves them out reads as though the operator answered.',
|
|
732
957
|
]),
|
|
@@ -759,6 +984,43 @@ function renderClientStorage(frontendSurfaceKeys, inventory) {
|
|
|
759
984
|
: []),
|
|
760
985
|
];
|
|
761
986
|
}
|
|
987
|
+
/**
|
|
988
|
+
* How the engine reads what a playbook run RETURNED — exported so the lane's tests wire the
|
|
989
|
+
* production reading rather than a copy of it.
|
|
990
|
+
*
|
|
991
|
+
* - a SUSPENSION: a run that stopped to ask registered its request against the result object it is
|
|
992
|
+
* about to return, and nothing else is one;
|
|
993
|
+
* - a composite that ended by ENVIRONMENT returned, and is still one somebody should re-run: the
|
|
994
|
+
* engine settles it COMPLETED and KEEPS its progress checkpoint instead of consuming it.
|
|
995
|
+
*/
|
|
996
|
+
export function createPlaybookRunOptions(suspensionRequests,
|
|
997
|
+
/**
|
|
998
|
+
* What each returned result COST (#1507), registered against the result object by the executor that
|
|
999
|
+
* measured it — keyed like the suspension requests and for the same reason: the result is the
|
|
1000
|
+
* identity both readings share, and copying it to add a field would lose the suspension.
|
|
1001
|
+
*/
|
|
1002
|
+
runMeasurements) {
|
|
1003
|
+
const measurementOf = (result) => (typeof result === 'object' && result !== null ? runMeasurements?.get(result) : undefined);
|
|
1004
|
+
return {
|
|
1005
|
+
suspendOn: (result) => {
|
|
1006
|
+
const request = typeof result === 'object' && result !== null ? suspensionRequests.get(result) ?? null : null;
|
|
1007
|
+
// The waiting task says what it is waiting FOR (#1362), so a reader that was not there — the
|
|
1008
|
+
// board after a restart — can tell a run that stopped to ask from one that finished.
|
|
1009
|
+
return request ? { ...request, taskOutput: summarizePlaybookRunResult(result, measurementOf(result)) } : null;
|
|
1010
|
+
},
|
|
1011
|
+
// What the run DID, on its own row (#1362): accepted or not, and the judge's verdict. Until this
|
|
1012
|
+
// existed the row said only that the run ended, and the rest died with the process. And what it
|
|
1013
|
+
// took — its wall-clock and its spend (#1507).
|
|
1014
|
+
concludeAs: (result) => ({ status: FlowsActors_Status.COMPLETED, taskOutput: summarizePlaybookRunResult(result, measurementOf(result)) }),
|
|
1015
|
+
retainCheckpointOn: (result) => typeof result === 'object' && result !== null
|
|
1016
|
+
&& result.resumableFromCheckpoint === true,
|
|
1017
|
+
// A run that spent and then THREW keeps its duration and spend beside the engine's failure (#1507).
|
|
1018
|
+
recordBesideFailure: (error) => {
|
|
1019
|
+
const measurement = typeof error === 'object' && error !== null ? runMeasurements?.get(error) : undefined;
|
|
1020
|
+
return measurement ? { measurement } : null;
|
|
1021
|
+
},
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
762
1024
|
let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
763
1025
|
static { PlaybookRunCompanionService_1 = this; }
|
|
764
1026
|
logger;
|
|
@@ -772,11 +1034,15 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
772
1034
|
git;
|
|
773
1035
|
introspection;
|
|
774
1036
|
foundationExecutor;
|
|
775
|
-
|
|
776
|
-
|
|
1037
|
+
capabilityCompositionExecutor;
|
|
1038
|
+
applicationMaturityExecutor;
|
|
1039
|
+
expertPersonas;
|
|
777
1040
|
structuredDeliberation;
|
|
1041
|
+
executions;
|
|
1042
|
+
actorsSystem;
|
|
1043
|
+
spendMeter;
|
|
778
1044
|
logDebug;
|
|
779
|
-
constructor(logger, companionContext, researchDispatch, agents, traceability, writeRegister, buildDispatch, codingAgentDispatch, git, introspection, foundationExecutor,
|
|
1045
|
+
constructor(logger, companionContext, researchDispatch, agents, traceability, writeRegister, buildDispatch, codingAgentDispatch, git, introspection, foundationExecutor, capabilityCompositionExecutor, applicationMaturityExecutor, expertPersonas, structuredDeliberation, executions, actorsSystem, spendMeter) {
|
|
780
1046
|
this.logger = logger;
|
|
781
1047
|
this.companionContext = companionContext;
|
|
782
1048
|
this.researchDispatch = researchDispatch;
|
|
@@ -788,9 +1054,13 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
788
1054
|
this.git = git;
|
|
789
1055
|
this.introspection = introspection;
|
|
790
1056
|
this.foundationExecutor = foundationExecutor;
|
|
791
|
-
this.
|
|
792
|
-
this.
|
|
1057
|
+
this.capabilityCompositionExecutor = capabilityCompositionExecutor;
|
|
1058
|
+
this.applicationMaturityExecutor = applicationMaturityExecutor;
|
|
1059
|
+
this.expertPersonas = expertPersonas;
|
|
793
1060
|
this.structuredDeliberation = structuredDeliberation;
|
|
1061
|
+
this.executions = executions;
|
|
1062
|
+
this.actorsSystem = actorsSystem;
|
|
1063
|
+
this.spendMeter = spendMeter;
|
|
794
1064
|
this.logDebug = this.logger.debugByType('PlaybookRunCompanionService');
|
|
795
1065
|
}
|
|
796
1066
|
/**
|
|
@@ -801,6 +1071,24 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
801
1071
|
* before the model is consulted at all
|
|
802
1072
|
* (`.claude/context/application-creation-rebuild-principles.md` XII.2).
|
|
803
1073
|
*/
|
|
1074
|
+
/**
|
|
1075
|
+
* The interview a playbook DECLARES, as a decision a person can be shown — or `null` if it asks nothing.
|
|
1076
|
+
*
|
|
1077
|
+
* A separate route from the eligibility board on purpose. The board is a LIST and is polled; these
|
|
1078
|
+
* questions are bulky (one playbook alone declares fifteen) and are wanted only at the moment
|
|
1079
|
+
* somebody chooses to run that playbook, so putting them on every row would pay for all of them on
|
|
1080
|
+
* every poll to show none of them.
|
|
1081
|
+
*
|
|
1082
|
+
* Until this existed the questions were unreachable: the board carried
|
|
1083
|
+
* `PlaybookEligibility.requiresElicitation`, a boolean, and nothing anywhere served the text.
|
|
1084
|
+
*/
|
|
1085
|
+
async readPlaybookElicitationDecision(playbookRef) {
|
|
1086
|
+
const playbooks = await this.readParsedCatalog();
|
|
1087
|
+
const playbook = playbooks.find((candidate) => candidate.ref === playbookRef);
|
|
1088
|
+
if (!playbook)
|
|
1089
|
+
throw new UnknownPlaybookError(`No compiled playbook is registered under "${playbookRef}".`);
|
|
1090
|
+
return projectPlaybookElicitationAsDecision({ playbook, requestedAt: new Date().toISOString() });
|
|
1091
|
+
}
|
|
804
1092
|
async listPlaybookEligibility() {
|
|
805
1093
|
// A catalog entry that does not satisfy its own contract is omitted rather than fatal — one malformed
|
|
806
1094
|
// playbook must not hide the fifteen that are fine.
|
|
@@ -831,44 +1119,39 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
831
1119
|
*/
|
|
832
1120
|
async runChoreography(input) {
|
|
833
1121
|
/*
|
|
834
|
-
* SINGLE-FLIGHT
|
|
835
|
-
*
|
|
1122
|
+
* SINGLE-FLIGHT is the engine's, since #1361: this run's execution was opened with the
|
|
1123
|
+
* `COMPOSITE` subject (see `buildActorExecutionRequest`), and the driver refuses a second one
|
|
1124
|
+
* while it runs — from the ROWS, so a restart and a second companion process see it too. Until
|
|
1125
|
+
* then it was an in-memory marker set here and cleared in a `finally`; before THAT (2026-09-04)
|
|
1126
|
+
* it was nothing at all, and two composites shared a working tree and one checkpoint.
|
|
836
1127
|
*
|
|
837
|
-
*
|
|
838
|
-
* and
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1128
|
+
* A NESTED composite opens with no subject, which is the difference between a single-flight
|
|
1129
|
+
* guard and a self-deadlock: `runChoreographyChild` reaches `runPlaybook`, which routes a child
|
|
1130
|
+
* declaring `method.choreography` straight back here, and a blanket refusal would abort the
|
|
1131
|
+
* parent on its own child. Nesting is threaded EXPLICITLY (`nestedWithinChoreographyRef`) rather
|
|
1132
|
+
* than inferred — only the call path knows a child from a fresh operator request arriving
|
|
1133
|
+
* mid-run — and neither HTTP entry point spreads a request body into that input.
|
|
1134
|
+
*/
|
|
1135
|
+
const playbooks = await this.readParsedCatalog();
|
|
1136
|
+
/*
|
|
1137
|
+
* THE MARKED GATE, refused BEFORE the run rather than after it (#111).
|
|
846
1138
|
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
*
|
|
1139
|
+
* Under GUIDED a lane boundary that owes an approve_result decision should HOLD the run, and
|
|
1140
|
+
* suspending at a boundary is not built. Which boundaries owe one is only knowable once the run
|
|
1141
|
+
* ends — so a refusal at that point would throw away a lane that had already landed its files
|
|
1142
|
+
* and spent its turns, and the engine retains a thrown run's checkpoint, so a resume could
|
|
1143
|
+
* re-land them. A posture the run cannot honour is a reason not to START it.
|
|
851
1144
|
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
*
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
* path knows the difference. The flag travels on `runPlaybook`'s input beside `stepResults` and
|
|
862
|
-
* `parentElicitationSection`, the two fields already documented as driver-only; neither HTTP
|
|
863
|
-
* entry point spreads a request body into that input, so no caller can forge it.
|
|
864
|
-
*/
|
|
865
|
-
if (input.nestedWithinChoreographyRef === undefined && this.activeChoreography) {
|
|
866
|
-
throw new PlaybookChoreographyAlreadyRunningError(`A composite is already running (playbook "${this.activeChoreography.playbookRef}", started ${this.activeChoreography.startedAt}). `
|
|
867
|
-
+ 'One composite per companion: two of them share this working tree, and two runs of the same composite share one '
|
|
868
|
-
+ 'checkpoint file, so the second would resume the first mid-flight and then delete its resume point. '
|
|
869
|
-
+ 'Wait for it, watch it with GET /api/companion/playbooks/runs, or restart the companion to clear an orphaned flag.');
|
|
1145
|
+
* Inert under the decided posture (YOLO, `one-source-of-truth.md` D5) and deliberately a refusal
|
|
1146
|
+
* rather than a silent downgrade: a GUIDED run that quietly behaved like a YOLO one would be a
|
|
1147
|
+
* safety claim standing on an unbuilt mechanism, which is the exact shape the approval policy's
|
|
1148
|
+
* own JSDoc had to be corrected for once already.
|
|
1149
|
+
*/
|
|
1150
|
+
if (laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) === LaneBoundaryTreatment.SUSPEND) {
|
|
1151
|
+
throw new Error(`The ${APPLICATION_CREATION_AUTONOMY_POSTURE} autonomy posture asks a run to HOLD at a lane boundary that owes an approve_result `
|
|
1152
|
+
+ 'decision, and suspending at a lane boundary is not built (#111; arming the marked gates is part of Gate 3). '
|
|
1153
|
+
+ 'Run under a posture that notifies and proceeds, or build the hold.');
|
|
870
1154
|
}
|
|
871
|
-
const playbooks = await this.readParsedCatalog();
|
|
872
1155
|
/*
|
|
873
1156
|
* Resume what a previous process paid for.
|
|
874
1157
|
*
|
|
@@ -877,7 +1160,15 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
877
1160
|
* progress", and the person restarting is usually the one who just watched a companion restart
|
|
878
1161
|
* eat their run.
|
|
879
1162
|
*/
|
|
880
|
-
const resumeFrom = await this.
|
|
1163
|
+
const resumeFrom = await this.adoptChoreographyCheckpoint(input.playbook.ref, input.runId, input.session);
|
|
1164
|
+
/*
|
|
1165
|
+
* Every round this run INHERITED rather than ran — the root's and, recursively, each nested lane's in
|
|
1166
|
+
* flight (#1507). The meter only sees this process, so each is an unobserved part of the run's spend;
|
|
1167
|
+
* counted over the whole tree because the journey's real resume is mid-lane (root 0, lane N).
|
|
1168
|
+
*/
|
|
1169
|
+
const inheritedRounds = resumeFrom ? countCheckpointedRounds(resumeFrom) : 0;
|
|
1170
|
+
if (inheritedRounds > 0)
|
|
1171
|
+
this.adoptedCheckpointIterations.set(input.runId, inheritedRounds);
|
|
881
1172
|
if (resumeFrom) {
|
|
882
1173
|
this.logDebug('Resuming a choreography from its checkpoint', {
|
|
883
1174
|
playbookRef: input.playbook.ref,
|
|
@@ -886,119 +1177,184 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
886
1177
|
checkpointedAt: resumeFrom.checkpointedAt,
|
|
887
1178
|
});
|
|
888
1179
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
readArtifactState: () => this.readArtifactState(),
|
|
915
|
-
/*
|
|
916
|
-
* An explicit run of the COMPOSITE admits its children past SEQUENCING too. Asking for a
|
|
917
|
-
* playbook by name is the acknowledgement, and it cannot stop at the parent: the first live run
|
|
918
|
-
* gathered evidence, judged it adequate, and landed nothing because the producing child was
|
|
919
|
-
* withheld on a phase gate its parent had already been admitted past.
|
|
920
|
-
*/
|
|
921
|
-
proceedPastSequencing: true,
|
|
922
|
-
runChild: (playbookRef, objective, stepResults) => this.runChoreographyChild({
|
|
1180
|
+
const result = await runPlaybookChoreography({
|
|
1181
|
+
composite: input.playbook,
|
|
1182
|
+
checkpoint: (snapshot) => this.saveChoreographyCheckpoint(input.runId, snapshot, input.session),
|
|
1183
|
+
...(resumeFrom ? { resumeFrom } : {}),
|
|
1184
|
+
goal: input.playbook.intent,
|
|
1185
|
+
playbooks,
|
|
1186
|
+
landableFamilies: this.resolveLandableFamilies(),
|
|
1187
|
+
readArtifactState: () => this.readArtifactState(),
|
|
1188
|
+
// Every selection and child dispatch is measured, so the row records spend per iteration and per child (#1507).
|
|
1189
|
+
meter: this.spendMeter,
|
|
1190
|
+
/*
|
|
1191
|
+
* An explicit run of the COMPOSITE admits its children past SEQUENCING too. Asking for a
|
|
1192
|
+
* playbook by name is the acknowledgement, and it cannot stop at the parent: the first live run
|
|
1193
|
+
* gathered evidence, judged it adequate, and landed nothing because the producing child was
|
|
1194
|
+
* withheld on a phase gate its parent had already been admitted past.
|
|
1195
|
+
*/
|
|
1196
|
+
proceedPastSequencing: true,
|
|
1197
|
+
runChild: async (playbookRef, objective, stepResults, dispatchingCompositeRef) => {
|
|
1198
|
+
const parentElicitationSection = await this.composeDispatchingElicitationSection({
|
|
1199
|
+
dispatchingCompositeRef,
|
|
1200
|
+
ownRef: input.playbook.ref,
|
|
1201
|
+
inherited: input.parentElicitationSection,
|
|
1202
|
+
playbooks,
|
|
1203
|
+
});
|
|
1204
|
+
return this.runChoreographyChild({
|
|
923
1205
|
playbookRef,
|
|
924
1206
|
objective,
|
|
925
1207
|
stepResults,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
//
|
|
1208
|
+
// The composite that DISPATCHED this child, which at depth 0 is this run's own and deeper is a
|
|
1209
|
+
// lane's. Only its non-undefined-ness matters to the single-flight bypass, so a lane's ref is
|
|
1210
|
+
// as good as the root's there — what it buys is the two lines below being the lane's (#1513).
|
|
1211
|
+
parentChoreographyRef: dispatchingCompositeRef,
|
|
1212
|
+
...(parentElicitationSection ? { parentElicitationSection } : {}),
|
|
1213
|
+
// The COMPOSITE names the investigation: every research child of every run of that
|
|
929
1214
|
// composite consolidates into one evidence-store directory, which is what makes a
|
|
930
|
-
// relaunch start from what earlier runs already established.
|
|
931
|
-
|
|
1215
|
+
// relaunch start from what earlier runs already established. The DISPATCHING one, so a
|
|
1216
|
+
// nested lane's evidence is found again by the next run of that lane whichever root invoked it.
|
|
1217
|
+
evidenceScope: dispatchingCompositeRef,
|
|
1218
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
932
1219
|
...(input.session ? { session: input.session } : {}),
|
|
933
|
-
})
|
|
934
|
-
|
|
935
|
-
|
|
1220
|
+
});
|
|
1221
|
+
},
|
|
1222
|
+
select: {
|
|
1223
|
+
/*
|
|
1224
|
+
* The DISPATCHING composite's round, not the root's (#1577): its declared inputs and its interview.
|
|
1225
|
+
* A lane is resolved from the same catalog the runtime resolved it from, so it is always there; a
|
|
1226
|
+
* ref that is not would be a runtime/host disagreement, and it is refused rather than quietly
|
|
1227
|
+
* answered with the root's facts — which is the defect this removes.
|
|
1228
|
+
*
|
|
1229
|
+
* The interview helper answers the same unknown ref by INHERITING, and the two differ on purpose:
|
|
1230
|
+
* an ancestor's interview answers are still true of the product and a lane that asks nothing
|
|
1231
|
+
* inherits them by design (#1513), while the root's declared INPUTS and INTENT are exactly the
|
|
1232
|
+
* wrong facts for a lane's selector. There is no honest fallback for those, so this refuses.
|
|
1233
|
+
*/
|
|
1234
|
+
select: async (request) => {
|
|
1235
|
+
const dispatching = request.dispatchingCompositeRef === input.playbook.ref
|
|
1236
|
+
? input.playbook
|
|
1237
|
+
: playbooks.find((candidate) => candidate.ref === request.dispatchingCompositeRef);
|
|
1238
|
+
if (!dispatching) {
|
|
1239
|
+
throw new UnknownPlaybookError(`The composite "${request.dispatchingCompositeRef}" selecting a round is not in the compiled catalog.`);
|
|
1240
|
+
}
|
|
1241
|
+
const parentElicitationSection = await this.composeDispatchingElicitationSection({
|
|
1242
|
+
dispatchingCompositeRef: request.dispatchingCompositeRef,
|
|
1243
|
+
ownRef: input.playbook.ref,
|
|
1244
|
+
inherited: input.parentElicitationSection,
|
|
1245
|
+
playbooks,
|
|
1246
|
+
});
|
|
1247
|
+
return this.selectChoreographyChildren({
|
|
936
1248
|
...request,
|
|
937
|
-
composite:
|
|
938
|
-
...(
|
|
939
|
-
})
|
|
1249
|
+
composite: dispatching,
|
|
1250
|
+
...(parentElicitationSection ? { parentElicitationSection } : {}),
|
|
1251
|
+
});
|
|
940
1252
|
},
|
|
941
|
-
|
|
1253
|
+
},
|
|
1254
|
+
...(input.session ? { trace: this.buildTrace(input.session, 'playbook-choreography') } : {}),
|
|
1255
|
+
});
|
|
1256
|
+
/*
|
|
1257
|
+
* The run reached its OWN conclusion, however it concluded — so the checkpoint has done its job
|
|
1258
|
+
* and must go. Keeping it would make the next run of this composite resume a finished one, which
|
|
1259
|
+
* is the failure mode a resume cache has instead of the one it replaced.
|
|
1260
|
+
*
|
|
1261
|
+
* ONE exception, and it is measured rather than hypothetical: a conclusion the ENVIRONMENT
|
|
1262
|
+
* forced. When ALL_CHILDREN_FAILED and every fatal child was taken by infrastructure or quota
|
|
1263
|
+
* (a companion pause, a 529 storm outliving the retry, "You've hit your session limit"), the
|
|
1264
|
+
* children never met the work — that is the process-taken-away case the checkpoint exists for,
|
|
1265
|
+
* arriving as child failures instead of a SIGTERM. On 2026-09-03 the unconditional consume here
|
|
1266
|
+
* discarded a 56-minute compliance run's 10 iterations of accumulated evidence because its 11th
|
|
1267
|
+
* iteration hit the provider's 5-hour session limit. The checkpoint survives that shape now, and
|
|
1268
|
+
* re-running the composite resumes it — the same gesture as after a companion restart.
|
|
1269
|
+
*
|
|
1270
|
+
* Still unconditional for every SEMANTIC conclusion: an iteration ceiling, a chosen stop, or a
|
|
1271
|
+
* fatal iteration containing even one real (non-environmental) failure, because there the next
|
|
1272
|
+
* selection would see genuine information and must not inherit a finished run's state.
|
|
1273
|
+
*/
|
|
1274
|
+
const endedByEnvironment = choreographyEndedByEnvironment(result);
|
|
1275
|
+
if (endedByEnvironment) {
|
|
1276
|
+
this.logDebug('Choreography ended by environment; preserving its checkpoint for relaunch', {
|
|
1277
|
+
playbookRef: input.playbook.ref,
|
|
1278
|
+
completedIterations: result.iterations.length,
|
|
1279
|
+
fatalFailures: result.iterations[result.iterations.length - 1]?.children.map((child) => child.failure?.slice(0, 160)),
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
/*
|
|
1283
|
+
* THE LANE BOUNDARY (#111) — one `approve_result` decision on the HITL plane, the first reader of
|
|
1284
|
+
* the composite's `approval` and `onFailure`. The runtime derived the facts; this projects them
|
|
1285
|
+
* as the same `HumanDecision_Request` every other question on this plane uses, and the POSTURE
|
|
1286
|
+
* decides what the decision does. Under YOLO (the decided posture, `one-source-of-truth.md` D5)
|
|
1287
|
+
* the gate is MARKED: the decision is written on the run's row and in this response, the run
|
|
1288
|
+
* concludes, and a person acts on it through the run and revert doors. Under GUIDED the same
|
|
1289
|
+
* decision would hold the run — that arm is the gate armed, and it is not built: arming it is
|
|
1290
|
+
* part of Gate 3's membership test, so it refuses by name rather than proceeding silently.
|
|
1291
|
+
*/
|
|
1292
|
+
const requestedAt = new Date().toISOString();
|
|
1293
|
+
/*
|
|
1294
|
+
* EVERY boundary the run produced, not just the root's: a lane's `approval` is where the question
|
|
1295
|
+
* genuinely arises, and `collectPlaybookLaneBoundaries` is the runtime's one derivation of which
|
|
1296
|
+
* boundaries exist (walking the iteration tree here would be a second).
|
|
1297
|
+
*/
|
|
1298
|
+
const boundaries = collectPlaybookLaneBoundaries({ playbookRef: input.playbook.ref, boundary: result.boundary, iterations: result.iterations });
|
|
1299
|
+
const boundaryDecisions = boundaries
|
|
1300
|
+
.filter((entry) => entry.boundary.decision !== PlaybookLaneBoundaryDecision.NONE)
|
|
1301
|
+
.map((entry) => projectLaneBoundaryAsDecision({ runId: input.runId, playbookRef: entry.playbookRef, requestedAt, boundary: entry.boundary }));
|
|
1302
|
+
if (boundaryDecisions.length > 0) {
|
|
1303
|
+
this.logDebug('Lane boundary decisions recorded (notify-and-proceed)', {
|
|
1304
|
+
playbookRef: input.playbook.ref,
|
|
1305
|
+
decisions: boundaries.filter((entry) => entry.boundary.decision !== PlaybookLaneBoundaryDecision.NONE)
|
|
1306
|
+
.map((entry) => ({ lane: entry.playbookRef, decision: entry.boundary.decision, kept: entry.boundary.keptPaths.length })),
|
|
942
1307
|
});
|
|
1308
|
+
}
|
|
1309
|
+
// A SEMANTIC conclusion needs no consume call: the engine clears a run's checkpoint when it
|
|
1310
|
+
// settles it COMPLETED, and keeps it only when `retainCheckpointOn` reads this result as ended by
|
|
1311
|
+
// environment (`resumableFromCheckpoint` below) — or when the run throws.
|
|
1312
|
+
return {
|
|
1313
|
+
playbookRef: input.playbook.ref,
|
|
1314
|
+
choreographed: true,
|
|
1315
|
+
stoppedBecause: result.stoppedBecause,
|
|
1316
|
+
iterations: result.iterations,
|
|
1317
|
+
stepRefs: [...result.stepResults.keys()],
|
|
1318
|
+
landed: result.landed,
|
|
1319
|
+
provenance: result.provenance,
|
|
1320
|
+
boundary: result.boundary,
|
|
1321
|
+
boundaryDecisions,
|
|
1322
|
+
durationMs: result.durationMs,
|
|
1323
|
+
spend: result.spend,
|
|
1324
|
+
inheritedRounds: result.inheritedRounds,
|
|
943
1325
|
/*
|
|
944
|
-
*
|
|
945
|
-
* and
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
*
|
|
950
|
-
* (
|
|
951
|
-
*
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
* iteration hit the provider's 5-hour session limit. The checkpoint survives that shape now, and
|
|
955
|
-
* re-running the composite resumes it — the same gesture as after a companion restart.
|
|
1326
|
+
* WHY the lane had nothing to run, when that is why it ended (#1506). Empty on every other stop,
|
|
1327
|
+
* and omitted then, so its presence is itself the signal that the run is waiting on something.
|
|
1328
|
+
*/
|
|
1329
|
+
...(result.unoffered.length > 0 ? { unoffered: result.unoffered } : {}),
|
|
1330
|
+
/*
|
|
1331
|
+
* REPORTED, like every other run shape reports it — and for a lane it is the report that matters
|
|
1332
|
+
* most (#1506). `summarizePlaybookRunResult` reads `dryRun` off this envelope to build the durable
|
|
1333
|
+
* run record, so a composite that omitted it was recorded as `dryRun: false`: a dry lane run,
|
|
1334
|
+
* which writes nothing, filed as a real one, which lands a dozen families. Measured on the first
|
|
1335
|
+
* live dry run of `top_down.definition`, whose record claimed it was real.
|
|
956
1336
|
*
|
|
957
|
-
*
|
|
958
|
-
*
|
|
959
|
-
* selection would see genuine information and must not inherit a finished run's state.
|
|
1337
|
+
* A caller cannot tell them apart by looking at the tree either — a real run may legitimately
|
|
1338
|
+
* land nothing — which is the same reasoning the dispatch path already states for its own flag.
|
|
960
1339
|
*/
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
provenance: result.provenance,
|
|
980
|
-
/*
|
|
981
|
-
* Reported, never silent. A run that quietly inherited another process's evidence would be a
|
|
982
|
-
* run whose provenance nobody could explain — and provenance is the whole reason this lane
|
|
983
|
-
* counts its source URLs.
|
|
984
|
-
*/
|
|
985
|
-
...(resumeFrom
|
|
986
|
-
? { resumedFrom: { completedIterations: resumeFrom.completedIterations, checkpointedAt: resumeFrom.checkpointedAt } }
|
|
987
|
-
: {}),
|
|
988
|
-
/*
|
|
989
|
-
* Reported so the caller can SAY "re-run this ref to resume" instead of reading a failed run
|
|
990
|
-
* as a dead end — the whole point of preserving the checkpoint is that somebody relaunches.
|
|
991
|
-
*/
|
|
992
|
-
...(endedByEnvironment ? { resumableFromCheckpoint: true } : {}),
|
|
993
|
-
// No acceptance, exactly as an ordinary run reports none: files landed as working edits and a
|
|
994
|
-
// human commit is the only acceptance there has ever been.
|
|
995
|
-
accepted: false,
|
|
996
|
-
};
|
|
997
|
-
}
|
|
998
|
-
finally {
|
|
999
|
-
if (ownsActiveMarker)
|
|
1000
|
-
this.activeChoreography = null;
|
|
1001
|
-
}
|
|
1340
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
1341
|
+
/*
|
|
1342
|
+
* Reported, never silent. A run that quietly inherited another process's evidence would be a
|
|
1343
|
+
* run whose provenance nobody could explain — and provenance is the whole reason this lane
|
|
1344
|
+
* counts its source URLs.
|
|
1345
|
+
*/
|
|
1346
|
+
...(resumeFrom
|
|
1347
|
+
? { resumedFrom: { completedIterations: resumeFrom.completedIterations, checkpointedAt: resumeFrom.checkpointedAt } }
|
|
1348
|
+
: {}),
|
|
1349
|
+
/*
|
|
1350
|
+
* Reported so the caller can SAY "re-run this ref to resume" instead of reading a failed run
|
|
1351
|
+
* as a dead end — the whole point of preserving the checkpoint is that somebody relaunches.
|
|
1352
|
+
*/
|
|
1353
|
+
...(endedByEnvironment ? { resumableFromCheckpoint: true } : {}),
|
|
1354
|
+
// No acceptance, exactly as an ordinary run reports none: files landed as working edits, and
|
|
1355
|
+
// acceptance is a later commit — a person's, or the companion's under the posture (#1534).
|
|
1356
|
+
accepted: false,
|
|
1357
|
+
};
|
|
1002
1358
|
}
|
|
1003
1359
|
/**
|
|
1004
1360
|
* Run one child of a choreography, and route by what the child DECLARES.
|
|
@@ -1022,6 +1378,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1022
1378
|
if (!stepOutput) {
|
|
1023
1379
|
throw new Error(`Research child "${child.ref}" declares no stepOutput; its evidence would have nowhere to go.`);
|
|
1024
1380
|
}
|
|
1381
|
+
const researchInputTruth = await this.composeChoreographyChildInputTruth(child);
|
|
1025
1382
|
const researchObjective = [
|
|
1026
1383
|
child.method?.guidance ?? '',
|
|
1027
1384
|
'',
|
|
@@ -1030,6 +1387,10 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1030
1387
|
// The creator's facts, verbatim: research that knows the real jurisdictions, data classes
|
|
1031
1388
|
// and commitments verifies triggers against THIS product instead of surveying the field.
|
|
1032
1389
|
...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),
|
|
1390
|
+
// And what the application has ACCEPTED (#1431), after the creator's answers and before the
|
|
1391
|
+
// return contract — the same order the generation brief uses, for the same reason: the
|
|
1392
|
+
// creator's words frame the run, the accepted truth is what it must not contradict.
|
|
1393
|
+
...(researchInputTruth ? ['', researchInputTruth] : []),
|
|
1033
1394
|
'',
|
|
1034
1395
|
'# What to return',
|
|
1035
1396
|
stepOutput.condensation,
|
|
@@ -1053,7 +1414,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1053
1414
|
return { stepResults: new Map([[stepOutput.ref, research.evidence]]) };
|
|
1054
1415
|
}
|
|
1055
1416
|
catch (error) {
|
|
1056
|
-
const message =
|
|
1417
|
+
const message = describeCaughtError(error);
|
|
1057
1418
|
if (!isInfrastructureShapedAgentFailure(message))
|
|
1058
1419
|
throw error;
|
|
1059
1420
|
this.logger.warn('Research turn lost to infrastructure; retrying once', { playbookRef: child.ref, failure: message.slice(0, 200) });
|
|
@@ -1089,12 +1450,14 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1089
1450
|
}
|
|
1090
1451
|
if ((child.stepOutputs?.length ?? 0) > 0) {
|
|
1091
1452
|
const stepOutput = child.stepOutputs[0];
|
|
1453
|
+
const inputTruthSection = await this.composeChoreographyChildInputTruth(child);
|
|
1092
1454
|
const value = await this.generateChoreographyStepValue({
|
|
1093
1455
|
child,
|
|
1094
1456
|
stepOutput,
|
|
1095
1457
|
objective: input.objective,
|
|
1096
1458
|
stepResults: input.stepResults,
|
|
1097
1459
|
...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),
|
|
1460
|
+
...(inputTruthSection ? { inputTruthSection } : {}),
|
|
1098
1461
|
});
|
|
1099
1462
|
return { stepResults: new Map([[stepOutput.ref, value]]) };
|
|
1100
1463
|
}
|
|
@@ -1108,6 +1471,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1108
1471
|
// places, one of which cannot see the compiled catalog the other routes on.
|
|
1109
1472
|
nestedWithinChoreographyRef: input.parentChoreographyRef,
|
|
1110
1473
|
...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),
|
|
1474
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
1111
1475
|
...(input.session ? { session: input.session } : {}),
|
|
1112
1476
|
});
|
|
1113
1477
|
/*
|
|
@@ -1126,10 +1490,147 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1126
1490
|
* since.
|
|
1127
1491
|
*/
|
|
1128
1492
|
landedValues: run.landedValues.map((entry) => entry.value),
|
|
1493
|
+
// The leaf's advisory verdict, forwarded so a lane author can ROUTE on it (#1498). Advisory
|
|
1494
|
+
// stays advisory here: the runtime stores it as a step value, and only a sibling's declared
|
|
1495
|
+
// precondition turns it into a route.
|
|
1496
|
+
...(run.judge !== undefined ? { judge: run.judge } : {}),
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1499
|
+
// A STAFFING leaf (`top_down.expert-personas`, #572) lands charter modules through the persona accept step;
|
|
1500
|
+
// it reports their paths itself, so a lane's landed set and its write records see them.
|
|
1501
|
+
if ('staffed' in run)
|
|
1502
|
+
return { landed: [...run.landed] };
|
|
1503
|
+
// An ASSESSING leaf (`top_down.phase-gate` shape) lands nothing; its verdict is its whole return.
|
|
1504
|
+
if ('assessed' in run && run.judge !== undefined)
|
|
1505
|
+
return { judge: run.judge };
|
|
1506
|
+
/*
|
|
1507
|
+
* A DISPATCHING leaf returns what it did, as a step value its lane's selector can read (#1501).
|
|
1508
|
+
*
|
|
1509
|
+
* It lands no FAMILY — its product is a working edit in the application workspace that a human
|
|
1510
|
+
* commit accepts — so before this it returned `{}` and the round history carried the objective and
|
|
1511
|
+
* nothing else. Measured on the build lane's first live run: over twenty rounds the model narrated
|
|
1512
|
+
* task names it could not have seen and finally instructed the child to "inspect the recorded D4
|
|
1513
|
+
* outcome for the immediately preceding dispatch", which is the composite being asked to look up
|
|
1514
|
+
* what it should have been told.
|
|
1515
|
+
*
|
|
1516
|
+
* A CONDENSATION, not the run: the task, what it was, whether its coding run settled, and how much
|
|
1517
|
+
* of the plan is left. That is what the next objective needs — "after X landed, take the next ready
|
|
1518
|
+
* task" — and nothing more would survive the selector's context anyway.
|
|
1519
|
+
*
|
|
1520
|
+
* The ref is DERIVED from the playbook ref, like the judge's and for the same reason: the leaf
|
|
1521
|
+
* declares no `stepOutputs` for it, because dispatching is a property of the run rather than an
|
|
1522
|
+
* output the playbook authors. Declaring one would be worse than redundant — `runChoreographyChild`
|
|
1523
|
+
* routes a child WITH `stepOutputs` into the structured-generation branch, so the declaration would
|
|
1524
|
+
* silently stop it dispatching at all.
|
|
1525
|
+
*/
|
|
1526
|
+
if ('dispatched' in run && 'wave' in run) {
|
|
1527
|
+
// A parallel wave (#1528), condensed the same way: what ran, and how it came out.
|
|
1528
|
+
return {
|
|
1529
|
+
stepResults: new Map([[dispatchOutcomeStepRef(input.playbookRef), {
|
|
1530
|
+
wave: true,
|
|
1531
|
+
degree: run.wave.degree,
|
|
1532
|
+
taskRefs: run.taskRefs,
|
|
1533
|
+
outcomes: run.wave.outcomes.map((outcome) => (outcome ? { taskRef: outcome.taskRef, status: outcome.status } : 'unreadable')),
|
|
1534
|
+
stoppedFillingBecause: run.wave.stoppedFillingBecause,
|
|
1535
|
+
}]]),
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
if ('dispatched' in run) {
|
|
1539
|
+
return {
|
|
1540
|
+
stepResults: new Map([[dispatchOutcomeStepRef(input.playbookRef), {
|
|
1541
|
+
taskRef: run.taskRef,
|
|
1542
|
+
targetKind: run.targetKind,
|
|
1543
|
+
// What the agent's run came to, when it was readable. `undefined` is its own answer and is
|
|
1544
|
+
// not smoothed into a failure: an unreadable row must never tell the selector to re-dispatch
|
|
1545
|
+
// work that may well have landed.
|
|
1546
|
+
outcome: run.codingRun?.status ?? (run.codingRunOutcomeUnreadable === true ? 'unreadable' : undefined),
|
|
1547
|
+
remainingReadyTaskCount: run.remainingReadyTaskRefs.length,
|
|
1548
|
+
landedTaskCount: run.landedTaskRefs.length,
|
|
1549
|
+
...(run.dryRun === true ? { dryRun: true } : {}),
|
|
1550
|
+
}]]),
|
|
1551
|
+
...(run.judge !== undefined ? { judge: run.judge } : {}),
|
|
1129
1552
|
};
|
|
1130
1553
|
}
|
|
1131
1554
|
return {};
|
|
1132
1555
|
}
|
|
1556
|
+
/**
|
|
1557
|
+
* The rendered interview a child — and, since #1577, a round's SELECTOR — receives: the DISPATCHING
|
|
1558
|
+
* composite's, not the root's (#1513).
|
|
1559
|
+
*
|
|
1560
|
+
* One `runChild` is bound for a whole composite tree and `runNestedLane` hands it down unchanged, so
|
|
1561
|
+
* until the runtime named the dispatching composite every child at every depth received the section
|
|
1562
|
+
* composed for the OUTERMOST one. For a nested umbrella that asks the creator anything that is the
|
|
1563
|
+
* difference between deriving from stated facts and deriving from none:
|
|
1564
|
+
* `top_down.compliance-analysis` carries ten product-fact questions its three children need and
|
|
1565
|
+
* declare none of, so it could not be nested at all and `cross_cutting.compliance` had to copy them.
|
|
1566
|
+
*
|
|
1567
|
+
* Three answers, in order:
|
|
1568
|
+
* - the composite RUNNING this tree is dispatching → the section this run already composed, which may
|
|
1569
|
+
* carry a caller's per-question overrides and must not be recomposed without them;
|
|
1570
|
+
* - a LANE that declares an interview is dispatching → that lane's own, from the dossier;
|
|
1571
|
+
* - a lane that declares NONE → the INHERITED section, so an ancestor's answers keep reaching a lane
|
|
1572
|
+
* that asks nothing of its own. That is every composite in the catalog but one, and it is why this
|
|
1573
|
+
* is additive rather than a change of behaviour.
|
|
1574
|
+
*
|
|
1575
|
+
* Not memoized, deliberately: the read is one file and only a lane that DECLARES an interview reaches
|
|
1576
|
+
* it, of which the catalog has one. A cache here would be state to invalidate for a cost nothing has
|
|
1577
|
+
* measured.
|
|
1578
|
+
*
|
|
1579
|
+
* `composeElicitationSection` REFUSES a missing answer, and that refusal is unreachable from here
|
|
1580
|
+
* rather than tolerated: the eligibility filter withholds any child — composites included — whose
|
|
1581
|
+
* `unansweredQuestionRefs` is non-empty, so a lane with an unanswered interview is never dispatched.
|
|
1582
|
+
*/
|
|
1583
|
+
async composeDispatchingElicitationSection(input) {
|
|
1584
|
+
if (input.dispatchingCompositeRef === input.ownRef)
|
|
1585
|
+
return input.inherited;
|
|
1586
|
+
const lane = input.playbooks.find((candidate) => candidate.ref === input.dispatchingCompositeRef);
|
|
1587
|
+
if (!lane?.method?.elicitation)
|
|
1588
|
+
return input.inherited;
|
|
1589
|
+
const state = await this.readArtifactState();
|
|
1590
|
+
const section = composeElicitationSection({
|
|
1591
|
+
playbookRef: lane.ref,
|
|
1592
|
+
elicitation: lane.method.elicitation,
|
|
1593
|
+
answers: resolveElicitationAnswers({
|
|
1594
|
+
playbookRef: lane.ref,
|
|
1595
|
+
creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS),
|
|
1596
|
+
overrides: undefined,
|
|
1597
|
+
}),
|
|
1598
|
+
});
|
|
1599
|
+
return section === '' ? input.inherited : section;
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* The declared inputs of a CHOREOGRAPHY CHILD, rendered (#1431).
|
|
1603
|
+
*
|
|
1604
|
+
* Two of the three child branches composed no input truth at all: a research child and a step-value
|
|
1605
|
+
* gate were given the method, the selector's objective, the parent elicitation and nothing the
|
|
1606
|
+
* application has accepted — while the third branch, an ordinary `runPlaybook`, composed the full
|
|
1607
|
+
* brief. So `inputs: [{ family: 'vision-brief' }]` was honoured for one shape of child and silently
|
|
1608
|
+
* dropped for the other two, and all four affected playbooks declare it.
|
|
1609
|
+
*
|
|
1610
|
+
* It matters most where the method is most specific: `compliance-evidence-adequacy` must treat a
|
|
1611
|
+
* jurisdiction the vision puts in scope with no evidence behind it as a gap, and it could not see
|
|
1612
|
+
* the vision. The jurisdiction reached it only if the selector happened to paraphrase it into a
|
|
1613
|
+
* free-text objective — which is a different thing from the application's accepted truth, and is
|
|
1614
|
+
* not one a gate may rest a gap verdict on.
|
|
1615
|
+
*
|
|
1616
|
+
* Rendered through the SAME `composeInputTruthSection` the producing branch uses, so a declaration
|
|
1617
|
+
* means one thing across all three branches — including its aspect narrowing (#1420), which is why
|
|
1618
|
+
* this is not "hand the child the families".
|
|
1619
|
+
*
|
|
1620
|
+
* BEST-EFFORT: an unreadable working tree costs the section, never the child. A gate with no input
|
|
1621
|
+
* truth answers from what it has, which is exactly what it did before this existed.
|
|
1622
|
+
*/
|
|
1623
|
+
async composeChoreographyChildInputTruth(child) {
|
|
1624
|
+
if ((child.inputs ?? []).length === 0)
|
|
1625
|
+
return '';
|
|
1626
|
+
try {
|
|
1627
|
+
return this.composeInputTruthSection(child, await this.readArtifactState());
|
|
1628
|
+
}
|
|
1629
|
+
catch (error) {
|
|
1630
|
+
this.logDebug('Choreography child: declared inputs unreadable (section omitted)', { playbookRef: child.ref, error: String(error) });
|
|
1631
|
+
return '';
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1133
1634
|
/**
|
|
1134
1635
|
* Generate one step VALUE — a child's return to its parent, validated against its declared schema.
|
|
1135
1636
|
*
|
|
@@ -1147,6 +1648,9 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1147
1648
|
// The creator's facts, for the judge that needs them: adequacy against evidence WITHOUT the
|
|
1148
1649
|
// product facts converges on honest-INSUFFICIENT forever (#284's deadlock, measured run 4).
|
|
1149
1650
|
...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),
|
|
1651
|
+
// BEFORE the evidence it weighs (#1431): a gate asked whether the evidence covers what the
|
|
1652
|
+
// vision puts in scope has to meet the scope first, or it grades the evidence against itself.
|
|
1653
|
+
...(input.inputTruthSection ? ['', input.inputTruthSection] : []),
|
|
1150
1654
|
'',
|
|
1151
1655
|
'# What you are judging',
|
|
1152
1656
|
/*
|
|
@@ -1159,7 +1663,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1159
1663
|
'# What to return',
|
|
1160
1664
|
input.stepOutput.condensation,
|
|
1161
1665
|
].join('\n');
|
|
1162
|
-
const schema = resolveStepOutputSchema(input.stepOutput.schemaRef,
|
|
1666
|
+
const schema = resolveStepOutputSchema(input.stepOutput.schemaRef, PLAYBOOK_STEP_SCHEMA_NAMESPACES);
|
|
1163
1667
|
const generated = await this.buildGenerationPort().generate({
|
|
1164
1668
|
prompt,
|
|
1165
1669
|
schema: schema ?? z.object({ value: z.string().min(1) }),
|
|
@@ -1195,10 +1699,34 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1195
1699
|
...request.eligible.slice(1).map((entry) => entry.playbookRef),
|
|
1196
1700
|
STOP,
|
|
1197
1701
|
];
|
|
1702
|
+
/*
|
|
1703
|
+
* `reads` — which of the run's accumulated returns THIS child is handed (#1423).
|
|
1704
|
+
*
|
|
1705
|
+
* A CLOSED enum of refs the run has already produced, exactly like `choice` above: the selector
|
|
1706
|
+
* picks within a set computed in code and can never widen it. Offered only when there is
|
|
1707
|
+
* something to choose from; with an empty scope the field would be a schema with no valid value.
|
|
1708
|
+
*
|
|
1709
|
+
* It cannot starve a child either — `resolveChoreographyChildReads` pushes the floor its own
|
|
1710
|
+
* `STEP_AVAILABLE` declaration requires regardless of what is named here. So the model narrows
|
|
1711
|
+
* evidence, it does not decide readiness.
|
|
1712
|
+
*/
|
|
1713
|
+
/*
|
|
1714
|
+
* A DERIVED judge verdict is not on the menu (#1498). It is a routing value — enum verdicts with
|
|
1715
|
+
* the rationales stripped — so a child handed it gains nothing it can cite, and the section that
|
|
1716
|
+
* would render it calls its contents "what earlier steps actually found". Only a declared
|
|
1717
|
+
* precondition reads a verdict, which is what this mechanism's own contract says; the floor in
|
|
1718
|
+
* `resolveChoreographyChildReads` still pushes it for a child that gates on it, so readiness is
|
|
1719
|
+
* untouched.
|
|
1720
|
+
*/
|
|
1721
|
+
const availableStepRefs = [...request.stepResults.keys()].filter((ref) => !isJudgeVerdictStepRef(ref));
|
|
1722
|
+
const readsField = availableStepRefs.length > 0
|
|
1723
|
+
? { reads: z.array(z.enum(availableStepRefs)) }
|
|
1724
|
+
: {};
|
|
1198
1725
|
const schema = z.object({
|
|
1199
1726
|
children: z.array(z.object({
|
|
1200
1727
|
choice: z.enum(choices),
|
|
1201
1728
|
objective: z.string().min(1),
|
|
1729
|
+
...readsField,
|
|
1202
1730
|
})).min(1).max(request.maximumLanes),
|
|
1203
1731
|
});
|
|
1204
1732
|
/*
|
|
@@ -1213,9 +1741,36 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1213
1741
|
* the one consumer not reading them.
|
|
1214
1742
|
*/
|
|
1215
1743
|
const inputTruth = this.composeInputTruthSection(request.composite, await this.readArtifactState());
|
|
1744
|
+
/*
|
|
1745
|
+
* What the SELECTOR is shown, and what it is not (#1498).
|
|
1746
|
+
*
|
|
1747
|
+
* Derived judge verdicts are withheld. The mechanism's own contract is that only a lane AUTHOR's
|
|
1748
|
+
* precondition turns a verdict into a route, and a verdict rendered here would let the model
|
|
1749
|
+
* prefer a child on one — the same effect through a door nobody declared. Nothing is lost: the
|
|
1750
|
+
* verdict's effect is ALREADY in what this prompt offers, because eligibility is computed in code
|
|
1751
|
+
* and a child gated on the verdict is in "what you may choose from" precisely when it holds.
|
|
1752
|
+
*/
|
|
1753
|
+
const returnedForSelection = [...request.stepResults.entries()].filter(([ref]) => !isJudgeVerdictStepRef(ref));
|
|
1754
|
+
/*
|
|
1755
|
+
* The composite's OWN intent, beside the goal it was dispatched with (#1577).
|
|
1756
|
+
*
|
|
1757
|
+
* At the root the goal IS the composite's intent, verbatim (`runChoreography` passes it), and that is
|
|
1758
|
+
* where lane authors put their stop rules (`app-creation-composite-choreography.md` §14 fact 3). A
|
|
1759
|
+
* NESTED lane runs with the goal its PARENT composed for it, so its own intent — "STOP after the
|
|
1760
|
+
* phase gate", the build lane's "take the next ready task" — never reached its selector. Rendered
|
|
1761
|
+
* whenever it differs from the goal, so the root's prompt is unchanged.
|
|
1762
|
+
*/
|
|
1763
|
+
const ownIntent = request.composite.intent !== request.goal ? request.composite.intent : undefined;
|
|
1216
1764
|
const prompt = [
|
|
1217
1765
|
'# Decide what this composite does next',
|
|
1218
1766
|
`Goal: ${request.goal}`,
|
|
1767
|
+
...(ownIntent ? [
|
|
1768
|
+
'',
|
|
1769
|
+
`# What ${request.composite.ref} is for — its own intent, and its stop rules`,
|
|
1770
|
+
'The goal above is what the composite that dispatched this one asked of it. This is what this composite',
|
|
1771
|
+
'is FOR, as its author declared it: pursue the goal within it, and stop when it says to stop.',
|
|
1772
|
+
ownIntent,
|
|
1773
|
+
] : []),
|
|
1219
1774
|
...(inputTruth ? ['', inputTruth] : []),
|
|
1220
1775
|
// The creator's answers rank WITH the declared inputs: round-1 research aimed at the real
|
|
1221
1776
|
// jurisdictions and telemetry beats a general survey the facts then invalidate (run 4's whole
|
|
@@ -1224,7 +1779,21 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1224
1779
|
'',
|
|
1225
1780
|
'# What you may choose from',
|
|
1226
1781
|
'These are the ONLY options, computed from what has already happened rather than proposed by you.',
|
|
1227
|
-
|
|
1782
|
+
/*
|
|
1783
|
+
* What re-running each one means (#1523). Without it the selector refreshed blind: it could not tell
|
|
1784
|
+
* a settled family from one whose inputs had moved, nor which stale family was premature, and it
|
|
1785
|
+
* refreshed `risk-register` 98 seconds before `business-model` made it stale again.
|
|
1786
|
+
*/
|
|
1787
|
+
'A family marked STALE was derived before one of its inputs last changed, so re-running would produce',
|
|
1788
|
+
'something different — a reason to re-derive, not an instruction to. A STALE family that WAITS on other',
|
|
1789
|
+
'stale families is not next: refresh those first, or it is stale again the moment they are re-derived.',
|
|
1790
|
+
...request.eligible.map((entry) => {
|
|
1791
|
+
const notes = [
|
|
1792
|
+
...((entry.wouldReplace ?? []).length > 0 ? [`REPLACES existing ${entry.wouldReplace.join(', ')}`] : []),
|
|
1793
|
+
...(entry.staleOutputs ?? []).map((stale) => describeStaleOutput(stale)),
|
|
1794
|
+
];
|
|
1795
|
+
return `- ${entry.playbookRef}: ${entry.intent}${notes.length > 0 ? ` [${notes.join('; ')}]` : ''}`;
|
|
1796
|
+
}),
|
|
1228
1797
|
`- ${STOP}: nothing here advances the goal. Must be your only entry.`,
|
|
1229
1798
|
'',
|
|
1230
1799
|
'# The objective is YOURS to compose',
|
|
@@ -1233,15 +1802,24 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1233
1802
|
'earlier objective returns the earlier answer, so make each one different and specific.',
|
|
1234
1803
|
`You may select up to ${request.maximumLanes} children to run in parallel — do so when they can`,
|
|
1235
1804
|
'be asked genuinely different questions, not to pad the set.',
|
|
1236
|
-
...(
|
|
1805
|
+
...(returnedForSelection.length === 0 ? [] : [
|
|
1237
1806
|
'',
|
|
1238
1807
|
'# What has been returned so far',
|
|
1239
|
-
...
|
|
1808
|
+
...returnedForSelection.map(([ref, value]) => `## ${ref}\n${typeof value === 'string' ? value : JSON.stringify(value)}`),
|
|
1809
|
+
'',
|
|
1810
|
+
'# What each child READS of the above',
|
|
1811
|
+
'For each child, list in `reads` the returns it needs for ITS objective. A child asked a narrow',
|
|
1812
|
+
'question does not need every sibling\'s full text, and handing it everything is how an assessor',
|
|
1813
|
+
'runs out of context instead of judging. List every ref when the child genuinely needs them all;',
|
|
1814
|
+
'omit the field only if you cannot tell. Whatever you list, a child still receives anything its',
|
|
1815
|
+
'own declaration requires — you are narrowing evidence, never deciding what it is allowed to run on.',
|
|
1240
1816
|
]),
|
|
1241
1817
|
...(request.history.length === 0 ? [] : [
|
|
1242
1818
|
'',
|
|
1243
1819
|
'# Rounds already run',
|
|
1244
|
-
...request.history.flatMap((iteration) => iteration.children.map((child) => `- ${child.playbookRef} — asked: "${child.objective}"
|
|
1820
|
+
...request.history.flatMap((iteration) => iteration.children.map((child) => `- ${child.playbookRef} — asked: "${child.objective}"`
|
|
1821
|
+
+ (child.reads ? ` — read: ${child.reads.length === 0 ? 'nothing' : child.reads.join(', ')}` : '')
|
|
1822
|
+
+ (child.failure ? ` — FAILED: ${child.failure}` : ''))),
|
|
1245
1823
|
]),
|
|
1246
1824
|
].join('\n');
|
|
1247
1825
|
const generated = await this.buildGenerationPort().generate({ prompt, schema, label: 'choreography:select' });
|
|
@@ -1254,7 +1832,18 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1254
1832
|
const stopped = parsed.data.children.find((child) => child.choice === STOP);
|
|
1255
1833
|
if (stopped)
|
|
1256
1834
|
return { children: [], stopRationale: stopped.objective };
|
|
1257
|
-
return {
|
|
1835
|
+
return {
|
|
1836
|
+
children: parsed.data.children.map((child) => {
|
|
1837
|
+
// `reads` exists on the parsed shape only when the round had something to read; narrowed
|
|
1838
|
+
// structurally rather than by re-testing `stepResults.size`, so the two cannot disagree.
|
|
1839
|
+
const selected = child.reads;
|
|
1840
|
+
return {
|
|
1841
|
+
playbookRef: child.choice,
|
|
1842
|
+
objective: child.objective,
|
|
1843
|
+
...(selected !== undefined ? { reads: selected } : {}),
|
|
1844
|
+
};
|
|
1845
|
+
}),
|
|
1846
|
+
};
|
|
1258
1847
|
}
|
|
1259
1848
|
/**
|
|
1260
1849
|
* The cross-family coherence report for the CURRENT working tree.
|
|
@@ -1265,7 +1854,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1265
1854
|
*/
|
|
1266
1855
|
async buildCoherenceReport() {
|
|
1267
1856
|
const state = await this.readArtifactState();
|
|
1268
|
-
const report = buildApplicationCoherenceReport(coherenceInputFor(state));
|
|
1857
|
+
const report = buildApplicationCoherenceReport(this.withComputedDocumentFacts(coherenceInputFor(state), state));
|
|
1269
1858
|
return { report, markdown: renderApplicationCoherenceReport(report) };
|
|
1270
1859
|
}
|
|
1271
1860
|
/**
|
|
@@ -1277,12 +1866,18 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1277
1866
|
* reason that is about the workspace, not the artifact.
|
|
1278
1867
|
*/
|
|
1279
1868
|
async runAssessmentPlaybook(input) {
|
|
1869
|
+
/*
|
|
1870
|
+
* Each subject is RENDERED through the same function the generation brief uses (#1420). The judge
|
|
1871
|
+
* used to receive raw `JSON.stringify` of every family and ignore the declaration entirely, so a
|
|
1872
|
+
* playbook narrowed to two aspects was generated from two and judged against all of them.
|
|
1873
|
+
*/
|
|
1280
1874
|
const subjects = [];
|
|
1875
|
+
const valuesByFamily = this.decidedFamilyValues(input.artifactState);
|
|
1281
1876
|
for (const declared of input.playbook.inputs ?? []) {
|
|
1282
|
-
const value =
|
|
1283
|
-
if (value === undefined || value === null
|
|
1877
|
+
const value = valuesByFamily[declared.family];
|
|
1878
|
+
if (value === undefined || value === null)
|
|
1284
1879
|
continue;
|
|
1285
|
-
subjects.push({ family: declared.family, value });
|
|
1880
|
+
subjects.push({ family: declared.family, value, rendered: renderDeclaredInputFamily(declared, value, valuesByFamily) });
|
|
1286
1881
|
}
|
|
1287
1882
|
let judge;
|
|
1288
1883
|
const treatment = input.hydrated.evaluationTreatment
|
|
@@ -1332,11 +1927,119 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1332
1927
|
* Composed only for the declared refs, and best-effort: a report that cannot be built must not
|
|
1333
1928
|
* cost the gate its run — the model can still assess, just without the arithmetic done for it.
|
|
1334
1929
|
*/
|
|
1930
|
+
/**
|
|
1931
|
+
* The DETERMINISTIC per-ICP FIT matrix, for a method that consumes a fit signal (#1435).
|
|
1932
|
+
*
|
|
1933
|
+
* Three methods told their model to "feed the snapshot to the scorer and read back the scores",
|
|
1934
|
+
* and a structured generation has no tools — so the instruction named an act the model cannot
|
|
1935
|
+
* perform, and what it did instead was estimate. The arithmetic is done here and the judgement is
|
|
1936
|
+
* left where it belongs, which is exactly `COHERENCE_REPORT`'s trade one method above.
|
|
1937
|
+
*
|
|
1938
|
+
* Reads the market snapshot this run ALREADY loaded. Every playbook declaring this source also
|
|
1939
|
+
* declares `market-snapshot` as an input, so the section adds a computation over knowledge that
|
|
1940
|
+
* was already in the brief rather than new knowledge.
|
|
1941
|
+
*/
|
|
1942
|
+
/**
|
|
1943
|
+
* The DERIVED risk signals, for a playbook that weighs risk (#1435).
|
|
1944
|
+
*
|
|
1945
|
+
* `top_down.risk-register`'s method has always said "if signals were not supplied to this run…"
|
|
1946
|
+
* and nothing had ever supplied them: the six derivations lived in an assurance script and were
|
|
1947
|
+
* reachable only there, so the register's derived half was permanently absent.
|
|
1948
|
+
*
|
|
1949
|
+
* FOUR of the six come from `wildo.saas.config.ts`, which this process already holds — putting
|
|
1950
|
+
* them behind a subprocess would spend a process to read a value in memory. The other two need
|
|
1951
|
+
* every resource materialized, which only the application's own module graph can do, so they come
|
|
1952
|
+
* through the `risk-signals` behavior.
|
|
1953
|
+
*
|
|
1954
|
+
* BEST-EFFORT on the subprocess half, and the asymmetry with `compliance-primary-facts` is
|
|
1955
|
+
* deliberate. That one FAILS CLOSED because a compliance document whose mechanism facts silently
|
|
1956
|
+
* came from prose is indistinguishable from a good one. This is the opposite case: the method
|
|
1957
|
+
* ALREADY has a marked branch for absent signals, and `application-creation-directive.md` is
|
|
1958
|
+
* explicit that a measurement may never become a precondition. Refusing here would make the
|
|
1959
|
+
* register unproducible whenever the subprocess is unavailable — a creation step gated on
|
|
1960
|
+
* evidence, which is the defect that rule exists to prevent. So the config half is delivered
|
|
1961
|
+
* regardless and the resource half is named as missing when it cannot be had.
|
|
1962
|
+
*/
|
|
1963
|
+
async composeRiskSignalsSection(playbook) {
|
|
1964
|
+
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.RISK_SIGNALS))
|
|
1965
|
+
return '';
|
|
1966
|
+
try {
|
|
1967
|
+
const config = (this.companionContext?.saasConfig ?? {});
|
|
1968
|
+
const allCapabilityRefs = Object.values(EngineCapability).filter((value) => typeof value === 'string').sort();
|
|
1969
|
+
const enabledRefs = new Set(Object.entries(config.engineCapabilities ?? {}).filter(([, value]) => value?.enabled === true).map(([key]) => key));
|
|
1970
|
+
/*
|
|
1971
|
+
* The engine's own predicate, TOTAL over `DataRetentionClass` by construction and already
|
|
1972
|
+
* correct for an absent schedule — re-deriving it here is how a signal comes to describe the
|
|
1973
|
+
* script rather than the application.
|
|
1974
|
+
*/
|
|
1975
|
+
const allRetentionClasses = Object.values(DataRetentionClass).filter((value) => typeof value === 'string');
|
|
1976
|
+
const undeclaredRetention = undeclaredRetentionClasses(config.dataRetention);
|
|
1977
|
+
const declaredRetention = allRetentionClasses.filter((value) => !undeclaredRetention.includes(value));
|
|
1978
|
+
/*
|
|
1979
|
+
* The hosting choice is read from `providerComplianceChoices`, NOT from
|
|
1980
|
+
* `providerConfigurations` — the contract says so at its own site, because that second field is
|
|
1981
|
+
* an opaque bag for a provider's runtime profile and a compliance answer must not live
|
|
1982
|
+
* somewhere nothing can read it without knowing the provider. The CONFIGURED providers are
|
|
1983
|
+
* still the denominator: one configured with no choice is the UNDECLARED case, which is not the
|
|
1984
|
+
* same as self-hosted and must never be reported as a computed absence.
|
|
1985
|
+
*/
|
|
1986
|
+
const choices = config.providerComplianceChoices ?? {};
|
|
1987
|
+
const vendorHosted = [...vendorHostedProviderRefs(choices)];
|
|
1988
|
+
const selfHosted = Object.entries(choices)
|
|
1989
|
+
.filter(([, choice]) => choice?.deploymentModel === ProviderDeploymentModel.SELF_HOSTED)
|
|
1990
|
+
.map(([ref]) => ref).sort();
|
|
1991
|
+
const undeclaredHosting = Object.keys(config.providerConfigurations ?? {}).filter((ref) => !(ref in choices)).sort();
|
|
1992
|
+
const signals = [
|
|
1993
|
+
deriveCapabilitySignal({ enabledRefs, allRefs: allCapabilityRefs }),
|
|
1994
|
+
deriveRetentionSignal({ declaredClasses: declaredRetention, undeclared: undeclaredRetention }),
|
|
1995
|
+
deriveProviderHostingSignal({ vendorHosted, selfHosted, undeclared: undeclaredHosting }),
|
|
1996
|
+
...await this.deriveResourceBackedRiskSignals(playbook),
|
|
1997
|
+
];
|
|
1998
|
+
return composeRiskSignalsSection(signals);
|
|
1999
|
+
}
|
|
2000
|
+
catch (error) {
|
|
2001
|
+
this.logDebug('Risk-signal section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });
|
|
2002
|
+
return '';
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
/**
|
|
2006
|
+
* The two signals that need materialized resources, or NOTHING when the subprocess cannot answer.
|
|
2007
|
+
*
|
|
2008
|
+
* Returning an empty list rather than throwing is the marked branch: the register's method already
|
|
2009
|
+
* handles an absent derived half, and a run that refused here would have made a measurement into a
|
|
2010
|
+
* precondition.
|
|
2011
|
+
*/
|
|
2012
|
+
async deriveResourceBackedRiskSignals(playbook) {
|
|
2013
|
+
const backendServiceKey = Object.entries(this.companionContext.servicesByKey)
|
|
2014
|
+
.find(([, service]) => !service.frontendType)?.[0];
|
|
2015
|
+
if (!backendServiceKey)
|
|
2016
|
+
return [];
|
|
2017
|
+
const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'risk-signals' });
|
|
2018
|
+
if (!result.success) {
|
|
2019
|
+
this.logDebug('Risk signals: resource-backed half unavailable (the config half is still delivered)', {
|
|
2020
|
+
playbookRef: playbook?.ref,
|
|
2021
|
+
});
|
|
2022
|
+
return [];
|
|
2023
|
+
}
|
|
2024
|
+
const inputs = result.data;
|
|
2025
|
+
return [...derivePersonalDataSignals(inputs), deriveMcpExposureSignal(inputs)];
|
|
2026
|
+
}
|
|
2027
|
+
composeMarketFitScoresSection(playbook, state) {
|
|
2028
|
+
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.MARKET_FIT_SCORES))
|
|
2029
|
+
return '';
|
|
2030
|
+
try {
|
|
2031
|
+
return composeMarketFitScoresSection(this.decidedFamilyValues(state)['market-snapshot']);
|
|
2032
|
+
}
|
|
2033
|
+
catch (error) {
|
|
2034
|
+
this.logDebug('FIT-score section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });
|
|
2035
|
+
return '';
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
1335
2038
|
composeCoherenceSection(playbook, state) {
|
|
1336
2039
|
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COHERENCE_REPORT))
|
|
1337
2040
|
return '';
|
|
1338
2041
|
try {
|
|
1339
|
-
const report = buildApplicationCoherenceReport(coherenceInputFor(state));
|
|
2042
|
+
const report = buildApplicationCoherenceReport(this.withComputedDocumentFacts(coherenceInputFor(state), state));
|
|
1340
2043
|
return [
|
|
1341
2044
|
'# Cross-family coherence (COMPUTED, not your judgement)',
|
|
1342
2045
|
'The coverage and dangling-reference arithmetic below was computed exactly from the landed',
|
|
@@ -1400,7 +2103,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1400
2103
|
* |---|---|
|
|
1401
2104
|
* | `holdsPersonalData` | any resource declaring `RETAIN_AND_IMPERSONALIZE` — the factory-enforced "holds personal data of its own" |
|
|
1402
2105
|
* | `declaresCommercialModel` | a billing capability in the application's own composition |
|
|
1403
|
-
* | `runsGovernanceProgramme` | the `
|
|
2106
|
+
* | `runsGovernanceProgramme` | the `compliance-program` family has landed content |
|
|
1404
2107
|
*
|
|
1405
2108
|
* The last is a DECISION with no other home, and reading it off the landed family is the honest
|
|
1406
2109
|
* proxy: an operator who has authored an assurance programme runs one, and one who has not has not.
|
|
@@ -1436,10 +2139,38 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1436
2139
|
return {};
|
|
1437
2140
|
}
|
|
1438
2141
|
const enabledCapabilities = enabledEngineCapabilityNames(this.companionContext.saasConfig.engineCapabilities);
|
|
1439
|
-
|
|
2142
|
+
/*
|
|
2143
|
+
* `compliance-program` is the family that lands an `AssuranceProgramSpecification`. This read named
|
|
2144
|
+
* `assurance-program` — a family no binding defines — so `runsGovernanceProgramme` was false for every
|
|
2145
|
+
* application, including Wonder Todos, which has landed one; its governance documents were refused as
|
|
2146
|
+
* "belonging to a programme this operator does not run". The test agreed, keying its fixture the same way.
|
|
2147
|
+
*/
|
|
2148
|
+
const assuranceProgram = artifactState.artifactsByFamily.get('compliance-program');
|
|
2149
|
+
/*
|
|
2150
|
+
* DERIVED from `operatingJurisdictions`, the application's own typed declaration of where it
|
|
2151
|
+
* operates (#229), never from prose and never asked of anybody (#1161).
|
|
2152
|
+
*
|
|
2153
|
+
* This was hard-coded `[]` with a comment explaining that the regimes the schema wants are free
|
|
2154
|
+
* prose on the vision, and that scanning a sentence for "GDPR" would manufacture a structured
|
|
2155
|
+
* posture. That refusal was right and the consequence was not: with nothing else filling the
|
|
2156
|
+
* field, EVERY application derived its privacy notice as merely admissible — including one whose
|
|
2157
|
+
* configuration says in typed form that it operates in the EU.
|
|
2158
|
+
*
|
|
2159
|
+
* A jurisdiction the vocabulary has no regime for (`gb`, whose UK GDPR this small enum does not
|
|
2160
|
+
* name) is reported by the derivation and logged here rather than dropped: the application really
|
|
2161
|
+
* does operate somewhere Wildo cannot yet speak for, and that is worth saying out loud.
|
|
2162
|
+
*/
|
|
2163
|
+
const declaredJurisdictions = this.companionContext.saasConfig.operatingJurisdictions?.jurisdictions ?? [];
|
|
2164
|
+
const { regimes, jurisdictionsWithNoKnownRegime } = deriveComplianceRegimes(declaredJurisdictions
|
|
2165
|
+
.map((entry) => entry.jurisdictionSlug)
|
|
2166
|
+
.filter((slug) => typeof slug === 'string'));
|
|
2167
|
+
if (jurisdictionsWithNoKnownRegime.length > 0) {
|
|
2168
|
+
this.logDebug('Declared jurisdictions no known privacy regime covers', { jurisdictionsWithNoKnownRegime });
|
|
2169
|
+
}
|
|
1440
2170
|
return {
|
|
1441
2171
|
requiredDocumentSetInput: {
|
|
1442
|
-
|
|
2172
|
+
// Copied because the input schema's field is a mutable array; the derivation answers readonly.
|
|
2173
|
+
regimes: [...regimes],
|
|
1443
2174
|
holdsPersonalData,
|
|
1444
2175
|
declaresCommercialModel: [...enabledCapabilities].some((capability) => capability.startsWith('BILLING')),
|
|
1445
2176
|
runsGovernanceProgramme: assuranceProgram !== undefined && assuranceProgram !== FILE_PRESENT_WITHOUT_VALUE,
|
|
@@ -1507,7 +2238,11 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1507
2238
|
const parsed = schema.safeParse(value);
|
|
1508
2239
|
return parsed.success ? parsed.data : undefined;
|
|
1509
2240
|
};
|
|
1510
|
-
const
|
|
2241
|
+
const overlaidDerived = this.documentFactsWithComputedOverlay(artifactState);
|
|
2242
|
+
const derivedParse = overlaidDerived === undefined || overlaidDerived === null || overlaidDerived === FILE_PRESENT_WITHOUT_VALUE
|
|
2243
|
+
? undefined
|
|
2244
|
+
: ApplicationDocumentFactSpecificationSchema.safeParse(overlaidDerived);
|
|
2245
|
+
const derived = derivedParse?.success ? derivedParse.data : undefined;
|
|
1511
2246
|
const authored = readFamily('document-facts-authored', ApplicationAuthoredDocumentFactSpecificationSchema);
|
|
1512
2247
|
if (derived === undefined && authored === undefined)
|
|
1513
2248
|
return {};
|
|
@@ -1527,7 +2262,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1527
2262
|
const after = coherenceInputFor(priorState);
|
|
1528
2263
|
for (const landed of landedValues)
|
|
1529
2264
|
after.set(landed.family, landed.value);
|
|
1530
|
-
const rendered = renderApplicationCoherenceReport(buildApplicationCoherenceReport(after));
|
|
2265
|
+
const rendered = renderApplicationCoherenceReport(buildApplicationCoherenceReport(this.withComputedDocumentFacts(after, priorState)));
|
|
1531
2266
|
const packageRelativePath = 'src/COHERENCE.md';
|
|
1532
2267
|
const absolutePath = path.join(specificationsPackageRoot, packageRelativePath);
|
|
1533
2268
|
const existedBefore = existsSync(absolutePath);
|
|
@@ -1540,18 +2275,152 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1540
2275
|
return undefined;
|
|
1541
2276
|
}
|
|
1542
2277
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
2278
|
+
/**
|
|
2279
|
+
* The governed-document facts computed from the application's declarations (#964) — read, never stored.
|
|
2280
|
+
*
|
|
2281
|
+
* Takes the specifications exports `readArtifactState` already loaded, so the register is read once.
|
|
2282
|
+
* Every input is read tolerantly: an unreadable register, identity or choice map is ABSENT, and an absent
|
|
2283
|
+
* input computes no answer. The fact then stays absent and its clauses are marked owed, which is the
|
|
2284
|
+
* outcome this lane already gives a declaration nobody has made.
|
|
2285
|
+
*/
|
|
2286
|
+
async computeDocumentFactAnswers(exports) {
|
|
2287
|
+
const saasConfig = (this.companionContext?.saasConfig ?? {});
|
|
2288
|
+
const register = ApplicationProcessorRegisterSchema.safeParse(exports?.processorRegister);
|
|
2289
|
+
const identity = ApplicationOperatorComplianceIdentitySchema.safeParse(saasConfig.operatorComplianceIdentity);
|
|
2290
|
+
const choices = ApplicationProviderComplianceChoicesSchema.safeParse(saasConfig.providerComplianceChoices);
|
|
2291
|
+
const schedule = saasConfig.dataRetention === undefined ? undefined : ApplicationRetentionScheduleSchema.safeParse(saasConfig.dataRetention);
|
|
2292
|
+
const jurisdictions = ApplicationOperatingJurisdictionsSchema.safeParse(saasConfig.operatingJurisdictions);
|
|
2293
|
+
return computeApplicationDocumentFacts({
|
|
2294
|
+
operatorComplianceIdentity: identity.success ? identity.data : undefined,
|
|
2295
|
+
processorRegister: register.success ? register.data : undefined,
|
|
2296
|
+
runtimeScopedProviderRefs: runtimeScopedProviderRefsOf(saasConfig.providers),
|
|
2297
|
+
providerComplianceChoices: choices.success ? choices.data : undefined,
|
|
2298
|
+
retentionSchedule: schedule?.success ? schedule.data : undefined,
|
|
2299
|
+
// Only asked when a schedule exists: without one the retention fact answers nothing, so reading every
|
|
2300
|
+
// resource's declarations would be a subprocess import spent on no answer.
|
|
2301
|
+
resourceErasureTreatments: schedule?.success ? await this.readResourceErasureTreatments() : undefined,
|
|
2302
|
+
operatingJurisdictionSlugs: jurisdictions.success ? jurisdictions.data.jurisdictions.map((entry) => entry.jurisdictionSlug) : undefined,
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* Each resource's declared erasure treatment, engine and application alike — the TREATMENT half of the
|
|
2307
|
+
* `retention-rules` fact (#454).
|
|
2308
|
+
*
|
|
2309
|
+
* `undefined` when the resources cannot be read: no backend service, or a failed introspection. That is
|
|
2310
|
+
* not "no resource declares a treatment", and the fact then answers nothing rather than a period alone.
|
|
2311
|
+
* The introspection is cached against the source tree, so the repeated reads this path makes are hits.
|
|
2312
|
+
*/
|
|
2313
|
+
async readResourceErasureTreatments() {
|
|
2314
|
+
const backendServiceKey = Object.entries(this.companionContext.servicesByKey)
|
|
2315
|
+
.find(([, service]) => !service.frontendType)?.[0];
|
|
2316
|
+
if (!backendServiceKey)
|
|
2317
|
+
return undefined;
|
|
2318
|
+
try {
|
|
2319
|
+
const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });
|
|
2320
|
+
if (!result.success)
|
|
2321
|
+
return undefined;
|
|
2322
|
+
const resources = result.data.resources;
|
|
2323
|
+
if (resources === undefined)
|
|
2324
|
+
return undefined;
|
|
2325
|
+
const modes = new Set(Object.values(ErasureRetentionMode));
|
|
2326
|
+
return resources.map((resource) => ({
|
|
2327
|
+
resourceType: resource.resourceType,
|
|
2328
|
+
// Crossed a JSON boundary, so it is a string; admitted only when it is a member of the vocabulary.
|
|
2329
|
+
...(resource.erasureRetentionMode !== undefined && modes.has(resource.erasureRetentionMode)
|
|
2330
|
+
? { erasureRetentionMode: resource.erasureRetentionMode }
|
|
2331
|
+
: {}),
|
|
2332
|
+
}));
|
|
2333
|
+
}
|
|
2334
|
+
catch (error) {
|
|
2335
|
+
this.logDebug('Resource erasure treatments could not be read (retention-rules stays unanswered)', { error: String(error) });
|
|
2336
|
+
return undefined;
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
/**
|
|
2340
|
+
* The `document-facts` a reader sees: the landed family with the computed facts laid over it (#964).
|
|
2341
|
+
*
|
|
2342
|
+
* Every reader of the application's facts goes through this — the drafter's input section, the fact
|
|
2343
|
+
* availability the landing checks, and an assessing playbook's subjects — so none of them can see a
|
|
2344
|
+
* stored copy where the others see the computed answer.
|
|
2345
|
+
*
|
|
2346
|
+
* An ABSENT or UNREADABLE family is returned as it is, never replaced by the computed facts alone. Absent
|
|
2347
|
+
* means the lane has not produced facts yet, which a binding check reads as "skip"; unreadable is a defect
|
|
2348
|
+
* the family's own validator reports. Either way, a reader shown two facts would take them for everything
|
|
2349
|
+
* the application declares and refuse every other citation.
|
|
2350
|
+
*/
|
|
2351
|
+
documentFactsWithComputedOverlay(state) {
|
|
2352
|
+
const value = state.artifactsByFamily.get('document-facts');
|
|
2353
|
+
const answers = state.computedDocumentFactAnswers ?? [];
|
|
2354
|
+
if (answers.length === 0 || value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE)
|
|
2355
|
+
return value;
|
|
2356
|
+
const parsed = ApplicationDocumentFactSpecificationSchema.safeParse(value);
|
|
2357
|
+
return parsed.success ? overlayComputedDocumentFacts(parsed.data, answers) : value;
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* The coherence report's input with the computed facts laid over `document-facts` (#964).
|
|
2361
|
+
*
|
|
2362
|
+
* Applied at the moment the report is BUILT, after any freshly landed family has been set: a run that
|
|
2363
|
+
* just regenerated `document-facts` must not have its report compare documents against a file that no
|
|
2364
|
+
* longer carries the computed facts, and read every citation of them as dangling.
|
|
2365
|
+
*/
|
|
2366
|
+
withComputedDocumentFacts(input, state) {
|
|
2367
|
+
const answers = state.computedDocumentFactAnswers ?? [];
|
|
2368
|
+
if (answers.length === 0)
|
|
2369
|
+
return input;
|
|
2370
|
+
const overlaid = this.documentFactsWithComputedOverlay({ artifactsByFamily: input, computedDocumentFactAnswers: answers });
|
|
2371
|
+
if (overlaid !== undefined)
|
|
2372
|
+
input.set('document-facts', overlaid);
|
|
2373
|
+
return input;
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* The governed-document drafts this application already holds, read from the FILE landing writes.
|
|
2377
|
+
*
|
|
2378
|
+
* It cannot come from `readArtifactState`, and that is not an oversight: a draft is not accepted
|
|
2379
|
+
* application truth, so its family has no companion-exports member, and that read records only a
|
|
2380
|
+
* file-presence marker for it. The value has to be imported from the landed module, exactly as
|
|
2381
|
+
* `wildo config document-releases` does when it composes a release from the same file.
|
|
2382
|
+
*
|
|
2383
|
+
* ABSENT IS NOT EMPTY. An empty array says this application holds no drafts, and the landing merges
|
|
2384
|
+
* normally; `undefined` says nobody looked, and the landing REFUSES rather than overwrite drafts it
|
|
2385
|
+
* cannot see (#895). So a read FAILURE throws rather than answering `[]` — reporting "no drafts" for
|
|
2386
|
+
* a file that exists but could not be parsed is precisely how the second draft would silently
|
|
2387
|
+
* discard the first.
|
|
2388
|
+
*
|
|
2389
|
+
* Before this was wired, every run was in the `undefined` case: Wonder Todos drafted its privacy
|
|
2390
|
+
* notice, and the service-terms run that followed died at the landing with that refusal (2026-09-16).
|
|
2391
|
+
*/
|
|
2392
|
+
async readLandedComplianceDocumentCandidates() {
|
|
2393
|
+
const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
|
|
2394
|
+
if (specificationsPackageRoot === undefined)
|
|
2395
|
+
return undefined;
|
|
2396
|
+
const target = resolvePlaybookOutputLandingTarget({
|
|
2397
|
+
family: 'compliance-document-candidate-set',
|
|
2398
|
+
schemaRef: ApplicationCreationSpecs.ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE_SET,
|
|
2399
|
+
constantPrefix: LANDED_CONSTANT_PREFIX,
|
|
2400
|
+
});
|
|
2401
|
+
const modulePath = join(specificationsPackageRoot, target.packageRelativePath);
|
|
2402
|
+
if (!existsSync(modulePath))
|
|
2403
|
+
return [];
|
|
2404
|
+
const loaded = await importLandedTypeScriptModule(modulePath, import.meta.url);
|
|
2405
|
+
const set = loaded[target.exportedConstantName];
|
|
2406
|
+
if (set === undefined) {
|
|
2407
|
+
throw new Error(`The landed draft set at ${modulePath} does not export ${target.exportedConstantName} — the constant landing writes — `
|
|
2408
|
+
+ 'so which governed documents this application already drafted is unknown, and landing another would discard them.');
|
|
2409
|
+
}
|
|
2410
|
+
return set.candidates;
|
|
2411
|
+
}
|
|
2412
|
+
async readArtifactState() {
|
|
2413
|
+
const artifactsByFamily = new Map();
|
|
2414
|
+
const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
|
|
2415
|
+
const exports = await loadSpecificationsCompanionExports(this.companionContext);
|
|
2416
|
+
for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {
|
|
2417
|
+
// A family with no companion-exports member is not accepted truth (a draft). It has no value to
|
|
2418
|
+
// read here and falls through to the file-presence pass below, which is the honest answer for it.
|
|
2419
|
+
if (binding.companionExportsField === undefined)
|
|
2420
|
+
continue;
|
|
2421
|
+
const value = exports[binding.companionExportsField];
|
|
2422
|
+
if (value !== undefined && value !== null)
|
|
2423
|
+
artifactsByFamily.set(binding.family, value);
|
|
1555
2424
|
}
|
|
1556
2425
|
if (specificationsPackageRoot) {
|
|
1557
2426
|
for (const family of FILE_ONLY_ARTIFACT_FAMILIES) {
|
|
@@ -1578,10 +2447,28 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1578
2447
|
const buildPlanExecution = artifactsByFamily.has('build-plan')
|
|
1579
2448
|
? await this.resolveBuildPlanExecutionState(familyGitFreshness)
|
|
1580
2449
|
: undefined;
|
|
2450
|
+
const computedDocumentFactAnswers = await this.computeDocumentFactAnswers(exports);
|
|
2451
|
+
/*
|
|
2452
|
+
* The creator's answers as an IMPLICIT INPUT of the playbooks they were given to (#1454, Step 8):
|
|
2453
|
+
* per playbook, the latest `answeredAt` the landed dossier holds. Per answer rather than per file —
|
|
2454
|
+
* the dossier is one family for every interview, so its commit time would make a vision answer
|
|
2455
|
+
* stale-flag the market snapshot. An unreadable instant is skipped: it cannot be shown to postdate
|
|
2456
|
+
* anything, and a wrong "stale" is the direction that costs a run.
|
|
2457
|
+
*/
|
|
2458
|
+
const creatorInputAnsweredAtByPlaybook = new Map();
|
|
2459
|
+
const creatorInputs = artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS);
|
|
2460
|
+
for (const answer of Array.isArray(creatorInputs?.answers) ? creatorInputs.answers : []) {
|
|
2461
|
+
const answeredAt = Math.floor(Date.parse(answer.answeredAt) / 1000);
|
|
2462
|
+
if (Number.isNaN(answeredAt))
|
|
2463
|
+
continue;
|
|
2464
|
+
creatorInputAnsweredAtByPlaybook.set(answer.playbookRef, Math.max(creatorInputAnsweredAtByPlaybook.get(answer.playbookRef) ?? 0, answeredAt));
|
|
2465
|
+
}
|
|
1581
2466
|
return {
|
|
1582
2467
|
artifactsByFamily,
|
|
1583
2468
|
familyGitFreshness,
|
|
2469
|
+
...(creatorInputAnsweredAtByPlaybook.size > 0 ? { creatorInputAnsweredAtByPlaybook } : {}),
|
|
1584
2470
|
...(draftArtifactsByFamily.size > 0 ? { draftArtifactsByFamily } : {}),
|
|
2471
|
+
...(computedDocumentFactAnswers.length > 0 ? { computedDocumentFactAnswers } : {}),
|
|
1585
2472
|
...(buildPlanExecution ? { buildPlanExecution } : {}),
|
|
1586
2473
|
};
|
|
1587
2474
|
}
|
|
@@ -1594,7 +2481,8 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1594
2481
|
*
|
|
1595
2482
|
* The population is DERIVED — every binding with no companion-exports slot whose landing file exists
|
|
1596
2483
|
* — rather than a second hand-maintained list beside the landing catalog. Today that resolves to
|
|
1597
|
-
* exactly one family, `compliance-document-candidate
|
|
2484
|
+
* exactly one family, `compliance-document-candidate-set` (the singular producer lands INTO it and is
|
|
2485
|
+
* skipped), so nothing else changes; when a second draft
|
|
1598
2486
|
* family lands it is covered without an edit here, which is the failure `COHERENCE_FAMILIES` already
|
|
1599
2487
|
* warns about in its own docblock.
|
|
1600
2488
|
*
|
|
@@ -1602,47 +2490,13 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1602
2490
|
* report then simply says less about that family, which is what it said before this existed.
|
|
1603
2491
|
*/
|
|
1604
2492
|
async readLandedDraftArtifacts(specificationsPackageRoot) {
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
if (!packageRelativePath || !existsSync(join(specificationsPackageRoot, packageRelativePath)))
|
|
1613
|
-
continue;
|
|
1614
|
-
// `./<directory>` is the subpath form the package loader resolves to `src/<directory>/index.ts`
|
|
1615
|
-
// — measured, because the bare and `/index` forms both fail to resolve.
|
|
1616
|
-
const subpath = `./${path.basename(path.dirname(packageRelativePath))}`;
|
|
1617
|
-
try {
|
|
1618
|
-
/*
|
|
1619
|
-
* `freshModuleCache` is REQUIRED here, and its absence was issue #170.
|
|
1620
|
-
*
|
|
1621
|
-
* jiti's module cache is process-global, so in the long-lived companion a draft family
|
|
1622
|
-
* imported once stays frozen at that evaluation for the process lifetime. The accepted
|
|
1623
|
-
* families beside it are read through `loadSpecificationsCompanionExports`, which does pass
|
|
1624
|
-
* it — so a run that lands a draft produced a report comparing a STALE draft against FRESH
|
|
1625
|
-
* declarations. Measured on wonder-crm: 17 phantom
|
|
1626
|
-
* `compliance-document-cites-undeclared-fact` findings against a document that was actually
|
|
1627
|
-
* coherent, on an endpoint whose own heading claims to describe "the CURRENT working tree".
|
|
1628
|
-
*
|
|
1629
|
-
* Worst exactly when it matters most — immediately after a run lands files, which is when
|
|
1630
|
-
* someone asks for a coherence report.
|
|
1631
|
-
*/
|
|
1632
|
-
const moduleExports = await loadPackageCompanionExport(specificationsPackageRoot, subpath, {
|
|
1633
|
-
freshModuleCache: true,
|
|
1634
|
-
});
|
|
1635
|
-
// A landed family module exports exactly one constant, named by the landing profile's
|
|
1636
|
-
// `constantSuffix`. Taking the sole export keeps this from restating that naming rule.
|
|
1637
|
-
const values = Object.values(moduleExports ?? {}).filter((value) => value !== undefined && value !== null);
|
|
1638
|
-
if (values.length === 1)
|
|
1639
|
-
drafts.set(binding.family, values[0]);
|
|
1640
|
-
}
|
|
1641
|
-
catch {
|
|
1642
|
-
// Deliberately silent: see the best-effort note above.
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
return drafts;
|
|
2493
|
+
/*
|
|
2494
|
+
* One loader, shared with the decided-element doors (#1426): the draft population is derived by
|
|
2495
|
+
* `readableDraftFamilyLandings`, which also skips a family that lands INTO another — the
|
|
2496
|
+
* produced/landed pair shares one file, and handing the producer's schema the set made the coherence
|
|
2497
|
+
* report claim, permanently and falsely, that a valid compliance file failed its own schema (#1245).
|
|
2498
|
+
*/
|
|
2499
|
+
return loadDraftFamilyValues(specificationsPackageRoot);
|
|
1646
2500
|
}
|
|
1647
2501
|
/**
|
|
1648
2502
|
* What git says about each family's path: does it carry working edits, and when was it last
|
|
@@ -1663,18 +2517,42 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1663
2517
|
if (!specificationsPackageRoot)
|
|
1664
2518
|
return freshness;
|
|
1665
2519
|
const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);
|
|
1666
|
-
|
|
2520
|
+
const present = families.flatMap((family) => {
|
|
1667
2521
|
const packageRelativePath = getFamilyPackageRelativePath(family);
|
|
1668
2522
|
if (!packageRelativePath)
|
|
1669
|
-
|
|
2523
|
+
return [];
|
|
1670
2524
|
const familyPath = path.posix.join(specificationsRelativeRoot, packageRelativePath);
|
|
1671
2525
|
if (!existsSync(join(this.companionContext.saasRoot, familyPath)))
|
|
1672
|
-
|
|
2526
|
+
return [];
|
|
2527
|
+
return [{ family, familyPath }];
|
|
2528
|
+
});
|
|
2529
|
+
if (present.length === 0)
|
|
2530
|
+
return freshness;
|
|
2531
|
+
/*
|
|
2532
|
+
* ONE batched answer for "is it committed" across every present family, rather than the
|
|
2533
|
+
* `ls-files` + `status` PAIR of subprocesses each family used to cost on its own.
|
|
2534
|
+
*
|
|
2535
|
+
* This call is on the eligibility board's hot path — the board makes it every time it is asked —
|
|
2536
|
+
* so its cost is paid per poll, and a spawn storm starves the event loop the readiness endpoint
|
|
2537
|
+
* shares. Measured 2026-09-22 with an in-process counter at the spawn site: this method was the
|
|
2538
|
+
* single largest remaining source of git subprocesses in the companion.
|
|
2539
|
+
*
|
|
2540
|
+
* The commit TIMES go through `lastCommitUnixTimes`, which memoises them against the HEAD object
|
|
2541
|
+
* id. An earlier revision of this comment said they had "no equivalent batched form that is
|
|
2542
|
+
* cheaper in the general case", which is true of batching the WALK and beside the point: the
|
|
2543
|
+
* answer depends only on the commit graph, so it cannot change while HEAD is unmoved, and the
|
|
2544
|
+
* right saving is not to ask again rather than to ask more cleverly. Once the other two readers
|
|
2545
|
+
* were batched this was the largest per-path caller left.
|
|
2546
|
+
*/
|
|
2547
|
+
const familyPaths = present.map((entry) => entry.familyPath);
|
|
2548
|
+
const [committedFamilyPaths, lastCommitTimes] = await Promise.all([
|
|
2549
|
+
this.git.selectCommittedPaths(familyPaths),
|
|
2550
|
+
this.git.lastCommitUnixTimes(familyPaths),
|
|
2551
|
+
]);
|
|
2552
|
+
for (const { family, familyPath } of present) {
|
|
1673
2553
|
try {
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1676
|
-
this.git.lastCommitUnixTime(familyPath),
|
|
1677
|
-
]);
|
|
2554
|
+
const committed = committedFamilyPaths.has(familyPath);
|
|
2555
|
+
const lastCommitUnixTime = lastCommitTimes.get(familyPath);
|
|
1678
2556
|
freshness.set(family, { committed, ...(lastCommitUnixTime !== undefined ? { lastCommitUnixTime } : {}) });
|
|
1679
2557
|
}
|
|
1680
2558
|
catch (error) {
|
|
@@ -1732,77 +2610,144 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1732
2610
|
* that iteration's eligible set, so it cannot widen its own options. A run that fails stops the loop,
|
|
1733
2611
|
* because choosing again from unchanged state would spend without progressing.
|
|
1734
2612
|
*/
|
|
1735
|
-
/**
|
|
1736
|
-
* ONE loop per companion (OC-1 design D4). A second concurrent loop over the same working tree would
|
|
1737
|
-
* interleave two portfolios' writes with nothing relating them; refusing names the loop already
|
|
1738
|
-
* running. In-memory on purpose — a runtime cache, cleared by restart, never a stored state
|
|
1739
|
-
* (`one-source-of-truth.md`). Manual single-playbook runs are deliberately NOT blocked: the human is
|
|
1740
|
-
* the authority, and git + the write register show exactly what happened.
|
|
1741
|
-
*/
|
|
1742
|
-
activeLoop = null;
|
|
1743
2613
|
async runPlaybookLoop(input) {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
}
|
|
1748
|
-
this.activeLoop = { goal: input.goal, startedAt: new Date().toISOString() };
|
|
2614
|
+
let loopFailureMeasurement;
|
|
2615
|
+
/** Rounds the loop's lanes inherited from checkpoints, fulfilled or failed — for the loop's own failure record (#1507). */
|
|
2616
|
+
const lanesInherited = { rounds: 0 };
|
|
1749
2617
|
try {
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
// composed application. (The loop cannot select it today — it requires the tenancy
|
|
1775
|
-
// elicitation answer, which only an explicit run carries — but the type union reaches
|
|
1776
|
-
// here, and an empty landed set is its truthful projection.)
|
|
1777
|
-
// Neither the composite executor nor a suspension lands a family file. A suspension cannot
|
|
1778
|
-
// occur here today (the loop supplies no clarification answers, and an unanswerable question
|
|
1779
|
-
// would stall it), but the union reaches this point and an empty set is its truthful
|
|
1780
|
-
// projection — the loop's own eligibility gate decides what to do next either way.
|
|
1781
|
-
// An ASSESSMENT lands nothing either — its deliverable is the verdict, and the loop's
|
|
1782
|
-
// eligibility gate reads artifacts rather than verdicts, so an empty set is truthful.
|
|
1783
|
-
// A DISPATCH run lands application CODE in the workspace, never a family file — and unlike
|
|
1784
|
-
// the three cases above, the loop CAN reach it: `bottom_up.build-dispatch` becomes eligible
|
|
1785
|
-
// the moment a build-plan exists. An empty landed set is truthful here for a different
|
|
1786
|
-
// reason than theirs: not "nothing happened", but "what happened is not a family landing",
|
|
1787
|
-
// and the loop's eligibility gate reads families. Its progress is visible through
|
|
1788
|
-
// `resolveBuildExecutionProgress`, which counts landed TASKS.
|
|
1789
|
-
// `verified` joins them for the same reason: a DETERMINISTIC_CLI run answers a question about
|
|
1790
|
-
// the built application and lands no family, so an empty landed set is truthful.
|
|
1791
|
-
if ('scenarios' in result || 'status' in result || 'assessed' in result || 'dispatched' in result
|
|
1792
|
-
|| 'verified' in result)
|
|
1793
|
-
return { landed: [] };
|
|
1794
|
-
return { landed: result.landed.map((entry) => entry.packageRelativePath) };
|
|
2618
|
+
/*
|
|
2619
|
+
* THE LOOP IS AN EXECUTION (#1361). Its runs always were; the loop driving them was the one
|
|
2620
|
+
* long-running unit of this lane with no row at all, so a companion restart mid-loop left
|
|
2621
|
+
* nothing saying one had been going. Opened and settled by the engine's driver — COMPLETED with
|
|
2622
|
+
* why it stopped and how many steps it took, FAILED with the message when it throws — and swept
|
|
2623
|
+
* at startup with the rest of `meta-workflows.system`'s orphans.
|
|
2624
|
+
*
|
|
2625
|
+
* ONE loop per application, by the engine's lease on the `LOOP` subject: the in-memory flag
|
|
2626
|
+
* this replaced could not see a loop running in another process, and forgot one on restart.
|
|
2627
|
+
* Manual single-playbook runs are deliberately NOT blocked — the human is the authority, and
|
|
2628
|
+
* git + the write register show exactly what happened.
|
|
2629
|
+
*/
|
|
2630
|
+
return await this.actorsSystem.runActorExecution({
|
|
2631
|
+
systemRef: META_WORKFLOWS_SYSTEM_REF,
|
|
2632
|
+
actorRef: META_WORKFLOWS_PLAYBOOK_LOOP_ACTOR_REF,
|
|
2633
|
+
exclusiveSubject: MetaWorkflowsExclusiveSubject.LOOP,
|
|
2634
|
+
task: {
|
|
2635
|
+
title: 'Playbook loop',
|
|
2636
|
+
description: 'An unattended chain of playbook runs: gate, choose, run, re-read the tree, repeat.',
|
|
2637
|
+
topic: Actor_Task_Topics.PLANNING,
|
|
2638
|
+
input: { goal: input.goal, maximumIterations: input.maximumIterations, maximumLanesPerIteration: input.maximumLanesPerIteration ?? null },
|
|
2639
|
+
...(input.session
|
|
2640
|
+
? { correlation: { domain: META_WORKFLOWS_CORRELATION_DOMAIN, refs: { traceSessionId: input.session.sessionId } } }
|
|
2641
|
+
: {}),
|
|
1795
2642
|
},
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
2643
|
+
...(input.session ? { scope: input.session } : {}),
|
|
2644
|
+
}, async () => {
|
|
2645
|
+
/*
|
|
2646
|
+
* Measured around the whole loop as well (#1507): its steps carry their own figures when it
|
|
2647
|
+
* returns, and a loop that THROWS (a selection or a tree read failing) still records what it
|
|
2648
|
+
* spent up to then, beside the engine's failure.
|
|
2649
|
+
*/
|
|
2650
|
+
const startedAtMs = Date.now();
|
|
2651
|
+
const measured = await this.spendMeter.measure(() => this.executePlaybookLoop(input, lanesInherited));
|
|
2652
|
+
if (measured.settled.status === 'rejected') {
|
|
2653
|
+
loopFailureMeasurement = {
|
|
2654
|
+
durationMs: Date.now() - startedAtMs,
|
|
2655
|
+
// The meter saw this process's calls; rounds its lanes inherited were paid by an earlier one.
|
|
2656
|
+
spend: mergePlaybookSpend([measured.spend, ...Array.from({ length: lanesInherited.rounds }, () => PLAYBOOK_SPEND_NOT_OBSERVED)]),
|
|
2657
|
+
};
|
|
2658
|
+
throw measured.settled.reason;
|
|
2659
|
+
}
|
|
2660
|
+
return measured.settled.value;
|
|
2661
|
+
}, {
|
|
2662
|
+
recordBesideFailure: () => (loopFailureMeasurement ? { measurement: loopFailureMeasurement } : null),
|
|
2663
|
+
concludeAs: (result) => ({
|
|
2664
|
+
status: FlowsActors_Status.COMPLETED,
|
|
2665
|
+
/*
|
|
2666
|
+
* What the loop took and spent, per step and per lane, and which steps began over an
|
|
2667
|
+
* unchanged tree (#1507). Each lane's own run is also measured on ITS row; this is the
|
|
2668
|
+
* loop's view, which adds the selection calls no run row carries.
|
|
2669
|
+
*/
|
|
2670
|
+
taskOutput: summarizePlaybookLoopResult(result),
|
|
2671
|
+
}),
|
|
1800
2672
|
});
|
|
1801
2673
|
}
|
|
1802
|
-
|
|
1803
|
-
this.
|
|
2674
|
+
catch (error) {
|
|
2675
|
+
throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.LOOP, input.session);
|
|
1804
2676
|
}
|
|
1805
2677
|
}
|
|
2678
|
+
async executePlaybookLoop(input, lanesInherited = { rounds: 0 }) {
|
|
2679
|
+
const playbooks = await this.readParsedCatalog();
|
|
2680
|
+
this.logDebug('Starting playbook loop', {
|
|
2681
|
+
goal: input.goal,
|
|
2682
|
+
maximumIterations: input.maximumIterations,
|
|
2683
|
+
maximumLanesPerIteration: input.maximumLanesPerIteration,
|
|
2684
|
+
catalogSize: playbooks.length,
|
|
2685
|
+
});
|
|
2686
|
+
return await runPlaybookLoop({
|
|
2687
|
+
goal: input.goal,
|
|
2688
|
+
playbooks,
|
|
2689
|
+
landableFamilies: this.resolveLandableFamilies(),
|
|
2690
|
+
readArtifactState: () => this.readArtifactState(),
|
|
2691
|
+
// Lanes of one iteration call this CONCURRENTLY. Safe because admitted lanes are output-disjoint
|
|
2692
|
+
// by construction and the write register records per run — where "output" is a lane's TRANSITIVE
|
|
2693
|
+
// write scope (`resolvePlaybookWriteScope`), so a composite lane is judged by what its children
|
|
2694
|
+
// land rather than by its own empty `outputs[]`. This comment said "each lands different family
|
|
2695
|
+
// files" while a composite lands none of its own, which read as a proof and was the claim that
|
|
2696
|
+
// made the hole invisible.
|
|
2697
|
+
// A failed lane's inherited rounds, read from what it threw (#1507), and counted for the loop's own record.
|
|
2698
|
+
inheritedRoundsOfFailure: (reason) => {
|
|
2699
|
+
const rounds = typeof reason === 'object' && reason !== null ? this.inheritedRoundsByFailure.get(reason) : undefined;
|
|
2700
|
+
if (rounds !== undefined)
|
|
2701
|
+
lanesInherited.rounds += rounds;
|
|
2702
|
+
return rounds;
|
|
2703
|
+
},
|
|
2704
|
+
runPlaybook: async (lane) => {
|
|
2705
|
+
const result = await this.runPlaybook({
|
|
2706
|
+
playbookRef: lane.playbookRef,
|
|
2707
|
+
// #1423 — the selector's reason for THIS lane reaches the run it explains. It was written
|
|
2708
|
+
// per lane and read only by the returned step until now.
|
|
2709
|
+
selectionRationale: lane.rationale,
|
|
2710
|
+
...(input.session ? { session: input.session } : {}),
|
|
2711
|
+
});
|
|
2712
|
+
// The composite foundation executor lands no family files; its deliverable is the
|
|
2713
|
+
// composed application. (The loop cannot select it today — it requires the tenancy
|
|
2714
|
+
// elicitation answer, which only an explicit run carries — but the type union reaches
|
|
2715
|
+
// here, and an empty landed set is its truthful projection.)
|
|
2716
|
+
// Neither the composite executor nor a suspension lands a family file. A suspension cannot
|
|
2717
|
+
// occur here today (the loop supplies no clarification answers, and an unanswerable question
|
|
2718
|
+
// would stall it), but the union reaches this point and an empty set is its truthful
|
|
2719
|
+
// projection — the loop's own eligibility gate decides what to do next either way.
|
|
2720
|
+
// An ASSESSMENT lands nothing either — its deliverable is the verdict, and the loop's
|
|
2721
|
+
// eligibility gate reads artifacts rather than verdicts, so an empty set is truthful.
|
|
2722
|
+
// A DISPATCH run lands application CODE in the workspace, never a family file — and unlike
|
|
2723
|
+
// the three cases above, the loop CAN reach it: `bottom_up.build-dispatch` becomes eligible
|
|
2724
|
+
// the moment a build-plan exists. An empty landed set is truthful here for a different
|
|
2725
|
+
// reason than theirs: not "nothing happened", but "what happened is not a family landing",
|
|
2726
|
+
// and the loop's eligibility gate reads families. Its progress is visible through
|
|
2727
|
+
// `resolveBuildExecutionProgress`, which counts landed TASKS.
|
|
2728
|
+
// `verified` joins them for the same reason: a DETERMINISTIC_CLI run answers a question about
|
|
2729
|
+
// the built application and lands no family, so an empty landed set is truthful.
|
|
2730
|
+
// A composite lane that resumed carries the rounds it inherited, so the loop step reads as a floor (#1507).
|
|
2731
|
+
if ('choreographed' in result) {
|
|
2732
|
+
lanesInherited.rounds += result.inheritedRounds;
|
|
2733
|
+
return { landed: [...result.landed], ...(result.inheritedRounds > 0 ? { inheritedRounds: result.inheritedRounds } : {}) };
|
|
2734
|
+
}
|
|
2735
|
+
if ('scenarios' in result || 'status' in result || 'assessed' in result || 'dispatched' in result
|
|
2736
|
+
|| 'verified' in result)
|
|
2737
|
+
return { landed: [] };
|
|
2738
|
+
// A STAFFING run lands charter modules through the persona accept step; it reports their paths itself.
|
|
2739
|
+
if ('staffed' in result)
|
|
2740
|
+
return { landed: [...result.landed] };
|
|
2741
|
+
return { landed: result.landed.map((entry) => entry.packageRelativePath) };
|
|
2742
|
+
},
|
|
2743
|
+
model: this.buildGenerationPort(),
|
|
2744
|
+
// The selection and every lane measured, so the loop's row records its spend per step (#1507).
|
|
2745
|
+
meter: this.spendMeter,
|
|
2746
|
+
maximumIterations: input.maximumIterations,
|
|
2747
|
+
...(input.maximumLanesPerIteration !== undefined ? { maximumLanesPerIteration: input.maximumLanesPerIteration } : {}),
|
|
2748
|
+
...(input.session ? { trace: this.buildTrace(input.session, 'playbook-loop') } : {}),
|
|
2749
|
+
});
|
|
2750
|
+
}
|
|
1806
2751
|
/**
|
|
1807
2752
|
* Judge SUPPLIED artifact values against a playbook's compiled evaluation treatment — the judge
|
|
1808
2753
|
* value-eval door (OC-16, Gate-4-shaped). Nothing is generated and nothing lands: the caller hands
|
|
@@ -1835,10 +2780,31 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1835
2780
|
validatorFindings: verdict.errorDetails.slice(0, 10),
|
|
1836
2781
|
};
|
|
1837
2782
|
});
|
|
2783
|
+
/*
|
|
2784
|
+
* The same evidence a run's judge reads (#964 step 2), from the application as it stands now. A bench
|
|
2785
|
+
* that judged without it would measure a blinder judge than the one that runs after landing, and a
|
|
2786
|
+
* grounding criterion would answer from the supplied artifact alone. Best-effort: a playbook or state
|
|
2787
|
+
* that cannot be read leaves the evidence out, and the verdict says what it could not decide.
|
|
2788
|
+
*/
|
|
2789
|
+
let judgeEvidence;
|
|
2790
|
+
const parsedPlaybook = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);
|
|
2791
|
+
if (parsedPlaybook.success) {
|
|
2792
|
+
try {
|
|
2793
|
+
judgeEvidence = await this.composeGenerationJudgeEvidence(parsedPlaybook.data, await this.readArtifactState(), input.artifacts.map((artifact) => artifact.family),
|
|
2794
|
+
// The bench judges SUPPLIED artifacts, so the supplied ones decide which documents' guards it
|
|
2795
|
+
// sees. Reading disk here judged whatever the application happened to hold instead.
|
|
2796
|
+
input.artifacts);
|
|
2797
|
+
}
|
|
2798
|
+
catch (error) {
|
|
2799
|
+
this.logDebug('Judge bench: application evidence unavailable (judged without it)', { error: String(error) });
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
1838
2802
|
const judge = await runPlaybookJudge({
|
|
1839
2803
|
playbookRef: input.playbookRef,
|
|
1840
2804
|
treatment: treatment.data,
|
|
1841
2805
|
landed: input.artifacts,
|
|
2806
|
+
...(judgeEvidence && judgeEvidence.acceptedInputs.length > 0 ? { acceptedInputs: judgeEvidence.acceptedInputs } : {}),
|
|
2807
|
+
...(judgeEvidence && judgeEvidence.derivedContext.length > 0 ? { derivedContext: judgeEvidence.derivedContext } : {}),
|
|
1842
2808
|
...(input.creatorBrief || input.elicitationAnswers?.length
|
|
1843
2809
|
? {
|
|
1844
2810
|
creatorInput: {
|
|
@@ -1852,6 +2818,88 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1852
2818
|
});
|
|
1853
2819
|
return { ...judge, validation };
|
|
1854
2820
|
}
|
|
2821
|
+
/**
|
|
2822
|
+
* Derive and accept a charter for every convened role the application has not committed yet.
|
|
2823
|
+
*
|
|
2824
|
+
* The roster is DERIVED: every `method.deliberation` in the compiled catalog, plus the logo step's own
|
|
2825
|
+
* panel (a generation step is not a playbook declaration, so the companion supplies it). A role's
|
|
2826
|
+
* derivability is decided from the families its template's shaping inputs read, through
|
|
2827
|
+
* `EXPERT_SHAPING_INPUT_FAMILY`, so the run never asks the derivation agent for a brief it cannot compose.
|
|
2828
|
+
* Roles run SEQUENTIALLY: each derivation is an agentic three-pass protocol (~200 s measured), and the
|
|
2829
|
+
* accept step serializes itself on the aggregator anyway.
|
|
2830
|
+
*/
|
|
2831
|
+
async staffExpertPanels(input) {
|
|
2832
|
+
const catalog = await this.readParsedCatalog();
|
|
2833
|
+
const roster = collectConvenedExpertRoles({
|
|
2834
|
+
playbooks: catalog,
|
|
2835
|
+
additionalConveners: [{ label: 'generation-step:logo', roleRefs: LOGO_PANEL_ROLE_REFS }],
|
|
2836
|
+
});
|
|
2837
|
+
const committed = new Set(committedCharterRoleRefs(input.artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS)));
|
|
2838
|
+
const alreadyCommitted = [];
|
|
2839
|
+
const waiting = [];
|
|
2840
|
+
const derivable = [];
|
|
2841
|
+
for (const { roleRef } of roster) {
|
|
2842
|
+
if (committed.has(roleRef)) {
|
|
2843
|
+
alreadyCommitted.push(roleRef);
|
|
2844
|
+
continue;
|
|
2845
|
+
}
|
|
2846
|
+
const template = getExpertRoleTemplate(roleRef);
|
|
2847
|
+
const missingFamilies = (template?.shapingInputKinds ?? [])
|
|
2848
|
+
.map((kind) => EXPERT_SHAPING_INPUT_FAMILY[kind])
|
|
2849
|
+
.filter((family) => {
|
|
2850
|
+
if (family === null)
|
|
2851
|
+
return false;
|
|
2852
|
+
// Present-but-unreadable (`FILE_PRESENT_WITHOUT_VALUE`) counts as MISSING: the derivation reads the
|
|
2853
|
+
// family's VALUE through introspection and would throw on a file-only presence — the same three-way
|
|
2854
|
+
// test the foundation branch makes on the domain plan.
|
|
2855
|
+
const value = input.artifactState.artifactsByFamily.get(family);
|
|
2856
|
+
return value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE;
|
|
2857
|
+
});
|
|
2858
|
+
if (template === undefined || missingFamilies.length > 0) {
|
|
2859
|
+
waiting.push({ roleRef, missingFamilies: template === undefined ? ['<unknown role: not in EXPERT_ROLE_TEMPLATES>'] : [...new Set(missingFamilies)] });
|
|
2860
|
+
continue;
|
|
2861
|
+
}
|
|
2862
|
+
derivable.push(roleRef);
|
|
2863
|
+
}
|
|
2864
|
+
const derived = [];
|
|
2865
|
+
const refused = [];
|
|
2866
|
+
const landed = new Set();
|
|
2867
|
+
if (input.dryRun !== true) {
|
|
2868
|
+
for (const roleRef of derivable) {
|
|
2869
|
+
try {
|
|
2870
|
+
const proposal = await this.expertPersonas.derive({ roleRef });
|
|
2871
|
+
const accepted = await this.expertPersonas.accept({ roleRef });
|
|
2872
|
+
derived.push({
|
|
2873
|
+
roleRef,
|
|
2874
|
+
charterModulePath: accepted.charterModulePath,
|
|
2875
|
+
passes: proposal.qualityReport.passes,
|
|
2876
|
+
critiqueVerdict: String(proposal.qualityReport.critique.verdict),
|
|
2877
|
+
});
|
|
2878
|
+
landed.add(accepted.charterModulePath);
|
|
2879
|
+
landed.add(accepted.aggregatorModulePath);
|
|
2880
|
+
for (const path of accepted.wiredPaths ?? [])
|
|
2881
|
+
landed.add(path);
|
|
2882
|
+
}
|
|
2883
|
+
catch (error) {
|
|
2884
|
+
// One role's refusal must not cost the others their charter: record it, keep going.
|
|
2885
|
+
refused.push({ roleRef, reason: describeCaughtError(error) });
|
|
2886
|
+
this.logDebug('expert-persona staffing: role refused', { roleRef, reason: String(error) });
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
return {
|
|
2891
|
+
playbookRef: EXPERT_PERSONAS_PLAYBOOK_REF,
|
|
2892
|
+
staffed: true,
|
|
2893
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
2894
|
+
roster,
|
|
2895
|
+
alreadyCommitted,
|
|
2896
|
+
derived,
|
|
2897
|
+
waiting,
|
|
2898
|
+
refused,
|
|
2899
|
+
landed: [...landed],
|
|
2900
|
+
accepted: false,
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
1855
2903
|
/** Every catalog entry that satisfies its own contract. A malformed one is skipped, never fatal. */
|
|
1856
2904
|
async readParsedCatalog() {
|
|
1857
2905
|
const playbooks = [];
|
|
@@ -1893,33 +2941,412 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1893
2941
|
* and collapsing them would make "I do not want to answer" indistinguishable from "stop".
|
|
1894
2942
|
*/
|
|
1895
2943
|
async resumePlaybookRun(input) {
|
|
1896
|
-
|
|
2944
|
+
/*
|
|
2945
|
+
* READ before anything moves (#1360): the wait is on the run's own execution row, and an answer
|
|
2946
|
+
* that does not satisfy the questions must leave it exactly as it was — still waiting, still
|
|
2947
|
+
* answerable. So the checkpoint is read and the answers validated first, and only then does the
|
|
2948
|
+
* engine move the rows and continue the run UNDER THE SAME ID.
|
|
2949
|
+
*/
|
|
2950
|
+
const checkpoint = await this.readSuspensionCheckpoint(input.runId, input.session);
|
|
1897
2951
|
if (input.action === PlaybookClarificationAction.CANCEL) {
|
|
1898
|
-
await this.
|
|
2952
|
+
await this.actorsSystem.cancelSuspendedActorExecution(input.runId, input.session);
|
|
1899
2953
|
return { status: 'cancelled', runId: input.runId, playbookRef: checkpoint.playbookRef };
|
|
1900
2954
|
}
|
|
1901
2955
|
const answers = input.action === PlaybookClarificationAction.ACCEPT
|
|
1902
|
-
?
|
|
2956
|
+
? validateClarificationAnswers({ requests: checkpoint.requests, priorAnswers: checkpoint.priorAnswers, answers: input.answers ?? [] })
|
|
1903
2957
|
: checkpoint.priorAnswers;
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2958
|
+
/*
|
|
2959
|
+
* The leg that ran BEFORE the question (#1507). The engine replaces the task output when the
|
|
2960
|
+
* continuation settles, so the run's record would otherwise report only the continuation's spend.
|
|
2961
|
+
* Read from the waiting row; a row without one (written before #1507, or unreadable) is an
|
|
2962
|
+
* unobserved leg, never a free one.
|
|
2963
|
+
*/
|
|
2964
|
+
const waitingRow = await Promise.resolve()
|
|
2965
|
+
.then(() => this.executions.getActorExecution(input.runId, input.session))
|
|
2966
|
+
.catch(() => undefined);
|
|
2967
|
+
const waitingOutput = waitingRow?.standaloneTasks?.[0]?.output;
|
|
2968
|
+
const recordedLeg = readPlaybookRunMeasurement(waitingOutput);
|
|
2969
|
+
/*
|
|
2970
|
+
* Continuations of this question that DIED WITH THEIR PROCESS (the engine counts them on the
|
|
2971
|
+
* checkpoint when its startup sweep puts the run back to waiting): whatever they spent is gone, so
|
|
2972
|
+
* each is an unobserved part of this run's spend, and the total reads as a floor.
|
|
2973
|
+
*/
|
|
2974
|
+
const interrupted = typeof waitingRow?.checkpoint?.interruptedContinuations === 'number' ? waitingRow.checkpoint.interruptedContinuations : 0;
|
|
2975
|
+
const priorLeg = interrupted > 0
|
|
2976
|
+
? {
|
|
2977
|
+
durationMs: recordedLeg?.durationMs ?? 0,
|
|
2978
|
+
spend: mergePlaybookSpend([recordedLeg?.spend ?? PLAYBOOK_SPEND_NOT_OBSERVED, ...Array.from({ length: interrupted }, () => PLAYBOOK_SPEND_NOT_OBSERVED)]),
|
|
2979
|
+
}
|
|
2980
|
+
: recordedLeg;
|
|
2981
|
+
try {
|
|
2982
|
+
return await this.actorsSystem.resumeActorExecution(input.runId, (opened) => this.executePlaybookRun({
|
|
2983
|
+
playbookRef: checkpoint.playbookRef,
|
|
2984
|
+
clarification: {
|
|
2985
|
+
requests: checkpoint.requests,
|
|
2986
|
+
answers,
|
|
2987
|
+
action: input.action,
|
|
2988
|
+
round: checkpoint.round,
|
|
2989
|
+
},
|
|
2990
|
+
...(checkpoint.creatorBrief ? { creatorBrief: checkpoint.creatorBrief } : {}),
|
|
2991
|
+
...(checkpoint.selectionRationale ? { selectionRationale: checkpoint.selectionRationale } : {}),
|
|
2992
|
+
...(checkpoint.elicitationAnswers.length > 0 ? { elicitationAnswers: checkpoint.elicitationAnswers } : {}),
|
|
2993
|
+
...(input.session ? { session: input.session } : {}),
|
|
2994
|
+
dryRun: checkpoint.dryRun || input.dryRun === true,
|
|
2995
|
+
runId: opened.executionId,
|
|
2996
|
+
}, priorLeg ?? null), input.session,
|
|
2997
|
+
// A continuation that THROWS leaves the question standing, so the creator can answer again —
|
|
2998
|
+
// what consuming the checkpoint file only after a successful return used to guarantee. The row
|
|
2999
|
+
// that goes back to waiting carries what both legs spent (#1507), over the waiting record.
|
|
3000
|
+
{
|
|
3001
|
+
...this.playbookRunOptions,
|
|
3002
|
+
restoreSuspensionOnFailure: true,
|
|
3003
|
+
outputOnRestoredSuspension: (error) => {
|
|
3004
|
+
const measurement = this.measurementOfFailure(error, input.runId);
|
|
3005
|
+
if (!measurement)
|
|
3006
|
+
return null;
|
|
3007
|
+
// The waiting record, carried forward — rebuilt from the checkpoint when the row could not be
|
|
3008
|
+
// read, so the run still reads as waiting on its question AND carries what it spent. When the
|
|
3009
|
+
// row could not be read, its `interruptedContinuations` count was unknown here and is lost as
|
|
3010
|
+
// the engine clears it; the spend still reads PARTIAL for the leg that was not read.
|
|
3011
|
+
const waiting = typeof waitingOutput === 'object' && waitingOutput !== null
|
|
3012
|
+
? waitingOutput
|
|
3013
|
+
: summarizePlaybookRunResult({ status: 'awaiting_creator_input', accepted: false, dryRun: checkpoint.dryRun, family: checkpoint.family, round: checkpoint.round });
|
|
3014
|
+
return { ...waiting, measurement };
|
|
3015
|
+
},
|
|
3016
|
+
});
|
|
3017
|
+
}
|
|
3018
|
+
finally {
|
|
3019
|
+
this.failedRunMeasurements.delete(input.runId);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
/**
|
|
3023
|
+
* The waiting run's resume inputs, parsed. "Not waiting" — no such row, a row that is not
|
|
3024
|
+
* suspended, or a checkpoint this version cannot read — is one answer to a resume, and it is 404.
|
|
3025
|
+
*/
|
|
3026
|
+
async readSuspensionCheckpoint(runId, session) {
|
|
3027
|
+
let context;
|
|
3028
|
+
try {
|
|
3029
|
+
context = (await this.actorsSystem.readSuspendedActorExecution(runId, session)).row.checkpoint?.context;
|
|
3030
|
+
}
|
|
3031
|
+
catch {
|
|
3032
|
+
throw new SuspendedPlaybookRunNotFoundError(runId);
|
|
3033
|
+
}
|
|
3034
|
+
const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(context);
|
|
3035
|
+
if (!parsed.success)
|
|
3036
|
+
throw new SuspendedPlaybookRunNotFoundError(runId);
|
|
3037
|
+
return parsed.data;
|
|
3038
|
+
}
|
|
3039
|
+
/**
|
|
3040
|
+
* How the engine reads what a playbook run RETURNED: a run that stopped to ask registered its
|
|
3041
|
+
* suspension request against the result object it is about to return, and nothing else is a
|
|
3042
|
+
* suspension. A `WeakMap` keyed by that object rather than a field on it, because the request
|
|
3043
|
+
* carries the whole resume input set and the result is what the HTTP response serialises.
|
|
3044
|
+
*/
|
|
3045
|
+
suspensionRequests = new WeakMap();
|
|
3046
|
+
/** Each measured result's wall-clock and spend (#1507) — see `createPlaybookRunOptions`. */
|
|
3047
|
+
runMeasurements = new WeakMap();
|
|
3048
|
+
/** A FAILED run's measurement by run id (#1507) — for a thrown value no WeakMap can key. Cleared when the run settles. */
|
|
3049
|
+
failedRunMeasurements = new Map();
|
|
3050
|
+
/** Iterations a composite adopted from a checkpoint, by run id (#1507) — read by `executePlaybookRun` whatever the outcome. */
|
|
3051
|
+
adoptedCheckpointIterations = new Map();
|
|
3052
|
+
/**
|
|
3053
|
+
* The rounds a run that THREW had inherited from a checkpoint, keyed by what it threw (#1507) — so a
|
|
3054
|
+
* caller that sees only the rejection (the unattended loop) can still mark its figures as a floor.
|
|
3055
|
+
*/
|
|
3056
|
+
inheritedRoundsByFailure = new WeakMap();
|
|
3057
|
+
/** What a failed run spent: keyed by its thrown value when that is an object, else by its run id. */
|
|
3058
|
+
measurementOfFailure(error, runId) {
|
|
3059
|
+
const byValue = typeof error === 'object' && error !== null ? this.runMeasurements.get(error) : undefined;
|
|
3060
|
+
return byValue ?? (runId !== undefined ? this.failedRunMeasurements.get(runId) : undefined);
|
|
3061
|
+
}
|
|
3062
|
+
/** The run options for ONE run: the shared readings, plus a failure record that can find this run's spend by id. */
|
|
3063
|
+
playbookRunOptionsFor(runIdOf) {
|
|
3064
|
+
return {
|
|
3065
|
+
...this.playbookRunOptions,
|
|
3066
|
+
recordBesideFailure: (error) => {
|
|
3067
|
+
const measurement = this.measurementOfFailure(error, runIdOf());
|
|
3068
|
+
return measurement ? { measurement } : null;
|
|
1911
3069
|
},
|
|
1912
|
-
|
|
1913
|
-
...(checkpoint.elicitationAnswers.length > 0 ? { elicitationAnswers: checkpoint.elicitationAnswers } : {}),
|
|
1914
|
-
...(input.session ? { session: input.session } : {}),
|
|
1915
|
-
...(input.dryRun ? { dryRun: true } : {}),
|
|
1916
|
-
});
|
|
1917
|
-
// Consumed only once the continuation RETURNED — a run that suspends again has already written
|
|
1918
|
-
// its own successor checkpoint, and a run that threw leaves this one so the resume can be retried.
|
|
1919
|
-
await this.suspendedRuns.consume(input.runId);
|
|
1920
|
-
return result;
|
|
3070
|
+
};
|
|
1921
3071
|
}
|
|
3072
|
+
playbookRunOptions = createPlaybookRunOptions(this.suspensionRequests, this.runMeasurements);
|
|
3073
|
+
/**
|
|
3074
|
+
* Every choreography that ENDED without concluding and left its progress on its execution row —
|
|
3075
|
+
* an orphan settled `ABORTED` at startup, a run that threw, or one that stopped for its environment.
|
|
3076
|
+
* Newest first. The rows of the same system also carry CLARIFICATION checkpoints, which is what the
|
|
3077
|
+
* `kind` discriminator is for.
|
|
3078
|
+
*/
|
|
3079
|
+
async readResumableChoreographies(session) {
|
|
3080
|
+
const rows = await this.actorsSystem.listResumableActorExecutions(META_WORKFLOWS_SYSTEM_REF, session);
|
|
3081
|
+
const resumable = [];
|
|
3082
|
+
for (const row of rows) {
|
|
3083
|
+
const parsed = PlaybookChoreographyCheckpointContextSchema.safeParse(row.checkpoint?.context);
|
|
3084
|
+
if (parsed.success && row.checkpoint)
|
|
3085
|
+
resumable.push({ executionId: row._id, checkpointedAt: row.checkpoint.checkpointedAt, context: parsed.data });
|
|
3086
|
+
}
|
|
3087
|
+
return resumable.sort((left, right) => right.checkpointedAt.localeCompare(left.checkpointedAt));
|
|
3088
|
+
}
|
|
3089
|
+
async listInterruptedChoreographies() {
|
|
3090
|
+
try {
|
|
3091
|
+
// One per composite: re-running a ref adopts its NEWEST checkpoint, so that is the one to name.
|
|
3092
|
+
const newestByRef = new Map();
|
|
3093
|
+
for (const entry of await this.readResumableChoreographies()) {
|
|
3094
|
+
if (newestByRef.has(entry.context.playbookRef))
|
|
3095
|
+
continue;
|
|
3096
|
+
newestByRef.set(entry.context.playbookRef, {
|
|
3097
|
+
playbookRef: entry.context.playbookRef,
|
|
3098
|
+
completedIterations: entry.context.completedIterations,
|
|
3099
|
+
stepRefs: entry.context.stepResults.map((step) => step.ref),
|
|
3100
|
+
checkpointedAt: entry.checkpointedAt,
|
|
3101
|
+
});
|
|
3102
|
+
}
|
|
3103
|
+
return [...newestByRef.values()];
|
|
3104
|
+
}
|
|
3105
|
+
catch (error) {
|
|
3106
|
+
// A status READ must not fail because the actor plane is unreachable; it answers "none known".
|
|
3107
|
+
this.logDebug('Interrupted choreographies could not be listed', { error: String(error) });
|
|
3108
|
+
return [];
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
/**
|
|
3112
|
+
* Re-running a composite IS the resume gesture: adopt the newest progress an earlier run of the
|
|
3113
|
+
* same composite left, in the shape the runtime consumes, or `null` when there is none.
|
|
3114
|
+
*
|
|
3115
|
+
* ADOPTED, not merely read: the progress is written onto THIS run's row first and only then cleared
|
|
3116
|
+
* from the row it came from, so at every instant exactly one row carries it — a host that dies
|
|
3117
|
+
* between the two leaves it on both, which a later adoption resolves by taking the newest.
|
|
3118
|
+
*/
|
|
3119
|
+
async adoptChoreographyCheckpoint(playbookRef, runId, session) {
|
|
3120
|
+
let source;
|
|
3121
|
+
try {
|
|
3122
|
+
source = (await this.readResumableChoreographies(session)).find((entry) => entry.context.playbookRef === playbookRef && entry.executionId !== runId);
|
|
3123
|
+
if (!source)
|
|
3124
|
+
return null;
|
|
3125
|
+
await this.actorsSystem.saveActorExecutionCheckpoint(runId, source.context, session);
|
|
3126
|
+
await this.actorsSystem.consumeActorExecutionCheckpoint(source.executionId, session);
|
|
3127
|
+
}
|
|
3128
|
+
catch (error) {
|
|
3129
|
+
// Resuming is a convenience a run must not die for: start fresh rather than refuse to start.
|
|
3130
|
+
this.logDebug('A choreography checkpoint could not be adopted (run starts fresh)', { playbookRef, error: String(error) });
|
|
3131
|
+
return null;
|
|
3132
|
+
}
|
|
3133
|
+
return { ...choreographyProgressFromContext(source.context), checkpointedAt: source.checkpointedAt };
|
|
3134
|
+
}
|
|
3135
|
+
/**
|
|
3136
|
+
* Record an iteration's worth of progress on the composite's own execution row.
|
|
3137
|
+
*
|
|
3138
|
+
* Never throws to the runtime: checkpointing is best-effort by construction, and a run that died
|
|
3139
|
+
* because its progress note could not be written would be strictly worse than one that merely
|
|
3140
|
+
* cannot resume.
|
|
3141
|
+
*/
|
|
3142
|
+
async saveChoreographyCheckpoint(runId, snapshot, session) {
|
|
3143
|
+
try {
|
|
3144
|
+
const context = PlaybookChoreographyCheckpointContextSchema.parse({
|
|
3145
|
+
kind: PlaybookRunCheckpointKind.CHOREOGRAPHY,
|
|
3146
|
+
...choreographyProgressToContext(snapshot),
|
|
3147
|
+
});
|
|
3148
|
+
await this.actorsSystem.saveActorExecutionCheckpoint(runId, context, session);
|
|
3149
|
+
}
|
|
3150
|
+
catch (error) {
|
|
3151
|
+
this.logDebug('Choreography checkpoint could not be written (run continues)', { runId, error: String(error) });
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
/**
|
|
3155
|
+
* Run a playbook AS an actor-system execution (#1358).
|
|
3156
|
+
*
|
|
3157
|
+
* The engine's `ActorsSystemBackendService.runActorExecution` owns the lifecycle: it opens the
|
|
3158
|
+
* execution and its task on the actor plane, hands the opened identities to the executor below, and
|
|
3159
|
+
* settles both rows on the outcome — task first, then execution, `COMPLETED` for every shape that
|
|
3160
|
+
* returns and `FAILED` with the error on the task for a throw. Until 2026-09-20 this method did all
|
|
3161
|
+
* of that itself, best-effort, under a per-playbook system ref the engine never registered (#1343);
|
|
3162
|
+
* the wrapper it was is now the engine's, and this is its first consumer.
|
|
3163
|
+
*
|
|
3164
|
+
* ## The run's ONE identity
|
|
3165
|
+
*
|
|
3166
|
+
* `runId` IS the execution's `_id`. The composed `<session>-<ref>-<ts>-<rand>` string this lane
|
|
3167
|
+
* minted until #1358 was a second identity for the same run — used in file names, routes and the
|
|
3168
|
+
* correlation envelope while the durable row carried another — and it is gone. Everything the run is
|
|
3169
|
+
* named by downstream (the write register, the trace, the resume route) uses the execution id.
|
|
3170
|
+
*
|
|
3171
|
+
* ## REQUIRED, not best-effort
|
|
3172
|
+
*
|
|
3173
|
+
* The previous wrapper caught every actor-plane failure and ran anyway, on the reasoning that the
|
|
3174
|
+
* companion "routinely runs without a reachable platform". The consequence was a run nobody could
|
|
3175
|
+
* find afterwards — including the loop guard that reads these rows to decide whether a task already
|
|
3176
|
+
* ran. The engine refuses to open an execution it cannot record, before any work, and names why
|
|
3177
|
+
* (`ACTOR_EXECUTION_PERSISTENCE_UNBOUND`, or the store's own error). A dev loop with no platform
|
|
3178
|
+
* learns that at the first run rather than at the first missing row.
|
|
3179
|
+
*
|
|
3180
|
+
* A SUSPENSION returns, and is NOT a completion (#1360): the run registers what it is waiting on
|
|
3181
|
+
* (`suspensionRequests`), the engine moves both rows to `AWAITING_APPROVAL` with the pending
|
|
3182
|
+
* decision and the resume inputs on the execution, and `resumePlaybookRun` continues it under the
|
|
3183
|
+
* SAME id. There is no checkpoint file and no second handle.
|
|
3184
|
+
*/
|
|
1922
3185
|
async runPlaybook(input) {
|
|
3186
|
+
let runId;
|
|
3187
|
+
try {
|
|
3188
|
+
return await this.actorsSystem.runActorExecution(this.buildActorExecutionRequest(input), (opened) => {
|
|
3189
|
+
runId = opened.executionId;
|
|
3190
|
+
return this.executePlaybookRun({ ...input, runId: opened.executionId });
|
|
3191
|
+
}, this.playbookRunOptionsFor(() => runId));
|
|
3192
|
+
}
|
|
3193
|
+
catch (error) {
|
|
3194
|
+
// Only a run that ASKED for the composite subject can have been refused it; anything else that
|
|
3195
|
+
// surfaces here came from inside the run and keeps its own name.
|
|
3196
|
+
if (this.resolveExclusiveSubject(input) === undefined)
|
|
3197
|
+
throw error;
|
|
3198
|
+
throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, input.session);
|
|
3199
|
+
}
|
|
3200
|
+
finally {
|
|
3201
|
+
if (runId !== undefined)
|
|
3202
|
+
this.failedRunMeasurements.delete(runId);
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
/**
|
|
3206
|
+
* Does this run hold the COMPOSITE single-flight subject? Exactly when the playbook DECLARES a
|
|
3207
|
+
* choreography and the run is not nested inside another composite — see
|
|
3208
|
+
* `MetaWorkflowsExclusiveSubject.COMPOSITE`. Read off the compiled catalog without parsing it: an
|
|
3209
|
+
* unknown or malformed playbook holds nothing here and is refused by name inside the run.
|
|
3210
|
+
*/
|
|
3211
|
+
resolveExclusiveSubject(input) {
|
|
3212
|
+
if (input.nestedWithinChoreographyRef !== undefined)
|
|
3213
|
+
return undefined;
|
|
3214
|
+
const compiled = getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook;
|
|
3215
|
+
return compiled?.method?.choreography ? MetaWorkflowsExclusiveSubject.COMPOSITE : undefined;
|
|
3216
|
+
}
|
|
3217
|
+
/**
|
|
3218
|
+
* Turn the engine's single-flight refusal into THIS lane's typed one, naming the run that holds the
|
|
3219
|
+
* subject — the engine says only that the subject is busy, and an operator needs to know by what.
|
|
3220
|
+
* Any other error is answered unchanged, so this is safe around a whole run.
|
|
3221
|
+
*
|
|
3222
|
+
* The transport maps both typed errors to 409. The holder is read from the rows, so the message is
|
|
3223
|
+
* as true after a restart or from a second process as it is inside the one that started the run.
|
|
3224
|
+
*/
|
|
3225
|
+
async nameTheRunHoldingTheSubject(error, subject, session) {
|
|
3226
|
+
if (!isActorExecutionSubjectBusyError(error))
|
|
3227
|
+
return error;
|
|
3228
|
+
let held = 'a run this process could not read';
|
|
3229
|
+
try {
|
|
3230
|
+
const holder = await this.actorsSystem.readExclusiveSubjectHolder(META_WORKFLOWS_SYSTEM_REF, subject, session);
|
|
3231
|
+
if (holder) {
|
|
3232
|
+
const row = await this.executions.getActorExecution(holder._id, session);
|
|
3233
|
+
const task = row.standaloneTasks[0];
|
|
3234
|
+
const playbookRef = task?.context?.correlation?.refs?.['playbookRef'];
|
|
3235
|
+
const goal = task?.input?.goal;
|
|
3236
|
+
held = subject === MetaWorkflowsExclusiveSubject.LOOP
|
|
3237
|
+
? `goal "${typeof goal === 'string' ? goal : 'unknown'}", execution ${holder._id}, started ${row.createdAt}`
|
|
3238
|
+
: `playbook "${typeof playbookRef === 'string' ? playbookRef : 'unknown'}", execution ${holder._id}, started ${row.createdAt}`;
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
catch {
|
|
3242
|
+
// Naming the holder is a courtesy; the refusal stands without it.
|
|
3243
|
+
}
|
|
3244
|
+
return subject === MetaWorkflowsExclusiveSubject.LOOP
|
|
3245
|
+
? new PlaybookLoopAlreadyRunningError(`A playbook loop is already running (${held}). One loop per application: wait for it. A loop whose companion died is `
|
|
3246
|
+
+ 'released when the companion next starts, which settles it ABORTED.')
|
|
3247
|
+
: new PlaybookChoreographyAlreadyRunningError(`A composite is already running (${held}). One composite per application: two of them share this working tree, and a `
|
|
3248
|
+
+ 'second run of the same composite would adopt the first one\'s progress checkpoint mid-flight and continue a run that is '
|
|
3249
|
+
+ 'still going. Wait for it, or watch it with GET /api/companion/playbooks/runs. A composite whose companion died is '
|
|
3250
|
+
+ 'released when the companion next starts, which settles it ABORTED and keeps its checkpoint.');
|
|
3251
|
+
}
|
|
3252
|
+
/**
|
|
3253
|
+
* What the actor plane records about a playbook run: one task for the PROGRAMMATIC playbook-run
|
|
3254
|
+
* actor on one execution of the registered meta-workflows system, correlated back to the playbook
|
|
3255
|
+
* — and to the trace session, so a reader can join the run to its evidence without inferring one
|
|
3256
|
+
* identity from another.
|
|
3257
|
+
*/
|
|
3258
|
+
buildActorExecutionRequest(input) {
|
|
3259
|
+
const exclusiveSubject = this.resolveExclusiveSubject(input);
|
|
3260
|
+
return {
|
|
3261
|
+
systemRef: META_WORKFLOWS_SYSTEM_REF,
|
|
3262
|
+
actorRef: META_WORKFLOWS_PLAYBOOK_RUN_ACTOR_REF,
|
|
3263
|
+
...(exclusiveSubject ? { exclusiveSubject } : {}),
|
|
3264
|
+
task: {
|
|
3265
|
+
title: `Playbook run ${input.playbookRef}`,
|
|
3266
|
+
description: `Meta-workflow playbook run of ${input.playbookRef}.`,
|
|
3267
|
+
topic: Actor_Task_Topics.METHOD_STEP,
|
|
3268
|
+
input: { playbookRef: input.playbookRef, dryRun: input.dryRun === true },
|
|
3269
|
+
correlation: {
|
|
3270
|
+
domain: META_WORKFLOWS_CORRELATION_DOMAIN,
|
|
3271
|
+
refs: {
|
|
3272
|
+
playbookRef: input.playbookRef,
|
|
3273
|
+
...(input.session ? { traceSessionId: input.session.sessionId } : {}),
|
|
3274
|
+
...(input.conversationId ? { [WorkbenchTaskCorrelationRef.CONVERSATION]: input.conversationId } : {}),
|
|
3275
|
+
},
|
|
3276
|
+
},
|
|
3277
|
+
},
|
|
3278
|
+
...(input.session ? { scope: input.session } : {}),
|
|
3279
|
+
};
|
|
3280
|
+
}
|
|
3281
|
+
/** The measurement registered against what a detached run settled with, shaped for its in-process record (#1507). */
|
|
3282
|
+
detachedRecordMeasurement(settledWith, shape) {
|
|
3283
|
+
// Guarded like every read of a report: shaping a measurement must never be why a run's record is lost.
|
|
3284
|
+
try {
|
|
3285
|
+
const measurement = typeof settledWith === 'object' && settledWith !== null ? this.runMeasurements.get(settledWith) : undefined;
|
|
3286
|
+
const shaped = measurement ? shape(measurement) : undefined;
|
|
3287
|
+
return shaped ? { measurement: shaped } : {};
|
|
3288
|
+
}
|
|
3289
|
+
catch {
|
|
3290
|
+
return {};
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
/**
|
|
3294
|
+
* Run a playbook MEASURED (#1507): its wall-clock, and what every model call made inside it reported —
|
|
3295
|
+
* the generation, the judge, the selector, a child's coding or research agent. Every executor the
|
|
3296
|
+
* engine drives for this lane — a fresh run, a resumed one, a detached one — comes through here, so no
|
|
3297
|
+
* run reaches its row unmeasured.
|
|
3298
|
+
*
|
|
3299
|
+
* The measurement is registered against what the run SETTLED with — the result, which `concludeAs` /
|
|
3300
|
+
* `suspendOn` read back when they write the task summary, or the thrown error, which the engine's
|
|
3301
|
+
* `recordBesideFailure` reads so a failed run's row carries its spend beside `{ failure }`. A thrown
|
|
3302
|
+
* value that is not an object cannot be keyed and records the failure alone.
|
|
3303
|
+
*/
|
|
3304
|
+
async executePlaybookRun(input,
|
|
3305
|
+
/**
|
|
3306
|
+
* A RESUMED run's earlier leg: its recorded measurement, or `null` when the waiting row carried
|
|
3307
|
+
* none — then that leg is an unobserved segment, so the total reads as a floor. Absent on a fresh run.
|
|
3308
|
+
*/
|
|
3309
|
+
priorLeg) {
|
|
3310
|
+
const startedAtMs = Date.now();
|
|
3311
|
+
const measured = await this.spendMeter.measure(() => this.executePlaybookRunUnmeasured(input));
|
|
3312
|
+
/*
|
|
3313
|
+
* A composite RESUMED from a checkpoint ran only its later iterations here; the earlier ones were paid
|
|
3314
|
+
* for by a process that died before recording them. One unobserved segment each, so the run's total
|
|
3315
|
+
* reads as a floor — the same marking the runtime gives the composite's own spend.
|
|
3316
|
+
*/
|
|
3317
|
+
// Read from the ADOPTED checkpoint (root and nested lanes), not the result: a resumed composite that
|
|
3318
|
+
// throws has no result, and its failure row must read as a floor too.
|
|
3319
|
+
const resumedIterations = this.adoptedCheckpointIterations.get(input.runId) ?? 0;
|
|
3320
|
+
this.adoptedCheckpointIterations.delete(input.runId);
|
|
3321
|
+
const measurement = {
|
|
3322
|
+
durationMs: Date.now() - startedAtMs + (priorLeg?.durationMs ?? 0),
|
|
3323
|
+
spend: mergePlaybookSpend([
|
|
3324
|
+
...(priorLeg === undefined ? [] : [priorLeg?.spend ?? PLAYBOOK_SPEND_NOT_OBSERVED]),
|
|
3325
|
+
measured.spend,
|
|
3326
|
+
...Array.from({ length: resumedIterations }, () => PLAYBOOK_SPEND_NOT_OBSERVED),
|
|
3327
|
+
]),
|
|
3328
|
+
};
|
|
3329
|
+
const settledWith = measured.settled.status === 'rejected' ? measured.settled.reason : measured.settled.value;
|
|
3330
|
+
if (typeof settledWith === 'object' && settledWith !== null)
|
|
3331
|
+
this.runMeasurements.set(settledWith, measurement);
|
|
3332
|
+
// By run id as well for a failure: a thrown value that is not an object cannot key the WeakMap, so the
|
|
3333
|
+
// run id is what carries its spend to the row (the call site clears the entry once the run has settled).
|
|
3334
|
+
if (measured.settled.status === 'rejected') {
|
|
3335
|
+
this.failedRunMeasurements.set(input.runId, measurement);
|
|
3336
|
+
const reason = measured.settled.reason;
|
|
3337
|
+
if (resumedIterations > 0 && typeof reason === 'object' && reason !== null)
|
|
3338
|
+
this.inheritedRoundsByFailure.set(reason, resumedIterations);
|
|
3339
|
+
throw reason;
|
|
3340
|
+
}
|
|
3341
|
+
return measured.settled.value;
|
|
3342
|
+
}
|
|
3343
|
+
async executePlaybookRunUnmeasured(input) {
|
|
3344
|
+
/*
|
|
3345
|
+
* THE RUN's identity — the actor execution's own id, opened by the engine before this method is
|
|
3346
|
+
* entered (#1358), so everything below, including the throws, happens inside a run that can be
|
|
3347
|
+
* named and found.
|
|
3348
|
+
*/
|
|
3349
|
+
const runId = input.runId;
|
|
1923
3350
|
const hydrated = getFrameworkKnowledgePlaybook(input.playbookRef);
|
|
1924
3351
|
if (!hydrated) {
|
|
1925
3352
|
throw new UnknownPlaybookError(`No compiled playbook is registered under "${input.playbookRef}".`);
|
|
@@ -1959,11 +3386,22 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1959
3386
|
if (!eligibility.eligible) {
|
|
1960
3387
|
this.logDebug('Running a playbook out of sequence', { playbookRef: input.playbookRef, unmet: eligibility.unmet });
|
|
1961
3388
|
}
|
|
3389
|
+
/*
|
|
3390
|
+
* The interview's answers come from the DOSSIER by default (#1454, Step 5): the committed
|
|
3391
|
+
* `creator-inputs` family, which `readArtifactState` already carries. The request's answers
|
|
3392
|
+
* override per question, so re-answering one keeps the rest. What is still missing is refused
|
|
3393
|
+
* by name just below — a missing answer is a gap in the interview, never an implicit "no".
|
|
3394
|
+
*/
|
|
3395
|
+
const elicitationAnswers = resolveElicitationAnswers({
|
|
3396
|
+
playbookRef: input.playbookRef,
|
|
3397
|
+
creatorInputs: artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS),
|
|
3398
|
+
overrides: input.elicitationAnswers,
|
|
3399
|
+
});
|
|
1962
3400
|
// Refuses a missing, unknown, duplicated or out-of-vocabulary answer — see its own header.
|
|
1963
3401
|
const elicitationSection = composeElicitationSection({
|
|
1964
3402
|
playbookRef: input.playbookRef,
|
|
1965
3403
|
elicitation: playbook.method?.elicitation,
|
|
1966
|
-
answers:
|
|
3404
|
+
answers: elicitationAnswers,
|
|
1967
3405
|
});
|
|
1968
3406
|
/*
|
|
1969
3407
|
* The CHOREOGRAPHY branch — a composite runs its children instead of producing anything itself.
|
|
@@ -1986,6 +3424,8 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
1986
3424
|
...(elicitationSection ? { parentElicitationSection: elicitationSection } : {}),
|
|
1987
3425
|
...(input.nestedWithinChoreographyRef ? { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef } : {}),
|
|
1988
3426
|
...(input.session ? { session: input.session } : {}),
|
|
3427
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
3428
|
+
runId,
|
|
1989
3429
|
});
|
|
1990
3430
|
}
|
|
1991
3431
|
/*
|
|
@@ -2018,21 +3458,110 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2018
3458
|
* is the pure read the dispatch service exposes for exactly this: it locks nothing, creates
|
|
2019
3459
|
* nothing and starts nothing, while answering the same question about the same next task.
|
|
2020
3460
|
*/
|
|
3461
|
+
/*
|
|
3462
|
+
* A PARALLEL BUILD (#1528): with a build parallelism above one, this tier runs a rolling wave of
|
|
3463
|
+
* coding runs in the shared worktree instead of one dispatch, and returns once it has drained.
|
|
3464
|
+
* The per-run advisory judge is not composed here — each run's own row carries its outcome,
|
|
3465
|
+
* `concurrency` and `interferenceSuspected`, and the wave's end-of-run repair is on the result.
|
|
3466
|
+
* A dry run never takes this branch: it dispatches nothing, whatever the degree.
|
|
3467
|
+
*/
|
|
3468
|
+
// No application root means nothing to parallelize: one dispatch, as a degree of 1 would.
|
|
3469
|
+
const saasRoot = this.companionContext?.saasRoot;
|
|
3470
|
+
if (input.dryRun !== true && saasRoot !== undefined && readBuildParallelism(saasRoot) > 1) {
|
|
3471
|
+
const wave = await this.buildDispatch.dispatchBuildWave(input.session);
|
|
3472
|
+
return {
|
|
3473
|
+
playbookRef: input.playbookRef,
|
|
3474
|
+
dispatched: true,
|
|
3475
|
+
wave,
|
|
3476
|
+
taskRefs: wave.dispatched.map((entry) => entry.plan.taskRef),
|
|
3477
|
+
accepted: false,
|
|
3478
|
+
};
|
|
3479
|
+
}
|
|
2021
3480
|
const dispatch = input.dryRun === true
|
|
2022
3481
|
? { plan: await this.buildDispatch.describeNextBuildTask() }
|
|
2023
3482
|
: await this.buildDispatch.dispatchNextBuildTask(input.session);
|
|
3483
|
+
/*
|
|
3484
|
+
* WAIT for the work, then report what it did.
|
|
3485
|
+
*
|
|
3486
|
+
* A coding dispatch resolves at ADMISSION — lock held, durable row written, agent about to
|
|
3487
|
+
* start. Returning there made this run's `finishedAt` equal the coding run's `startedAt` to
|
|
3488
|
+
* the millisecond on its first live use, so `GET /playbooks/runs` showed a completed green run
|
|
3489
|
+
* for a task that was still executing, and any treatment composed over the result would have
|
|
3490
|
+
* been handed an outcome that did not exist yet.
|
|
3491
|
+
*
|
|
3492
|
+
* A GENERATION STEP has no admission and needs no wait: its dispatch already resolved because
|
|
3493
|
+
* the work was done. A DRY RUN dispatches nothing, so there is nothing to wait for — and
|
|
3494
|
+
* waiting on the PREVIOUS run's task would be the same lie in the other direction.
|
|
3495
|
+
*
|
|
3496
|
+
* The consequence for the caller is deliberate and stated in the async route's own note: a
|
|
3497
|
+
* coding run can outlive the 30-minute request ceiling, so the SYNCHRONOUS route may lose its
|
|
3498
|
+
* socket to a run that keeps going. That was already true of a choreography, and the answer is
|
|
3499
|
+
* the same — submit with `async: true` and poll. A short-lived truthful answer is worth more
|
|
3500
|
+
* than a durable false one.
|
|
3501
|
+
*/
|
|
3502
|
+
const codingRun = dispatch.admission
|
|
3503
|
+
? await this.buildDispatch.awaitCodingRunOutcome(dispatch.admission.taskId, input.session)
|
|
3504
|
+
: null;
|
|
3505
|
+
/*
|
|
3506
|
+
* The ADVISORY judge over the settled run — the first time `bottom_up.build-dispatch`'s own
|
|
3507
|
+
* compiled treatment has ever been read by anything.
|
|
3508
|
+
*
|
|
3509
|
+
* `dispatch-outcome-sound` was authored for exactly this evidence: the host's disposition, the
|
|
3510
|
+
* verification gate, the sealed change-set and the recorded out-of-scope paths. It could not run
|
|
3511
|
+
* while this branch returned at admission, because at that instant there was no outcome to judge —
|
|
3512
|
+
* so a treatment with two criteria and four verdict guides sat compiled and unreachable.
|
|
3513
|
+
*
|
|
3514
|
+
* Advisory, like every other judge in this lane: the verdict goes to the response and the trace,
|
|
3515
|
+
* and nothing refuses on it (`.claude/rules/application-creation-directive.md`).
|
|
3516
|
+
*
|
|
3517
|
+
* ONE condition, and the dry-run guard that read naturally beside it is deliberately absent: a dry
|
|
3518
|
+
* run dispatches nothing, so it has no admission, so it has no outcome — `codingRun` is already
|
|
3519
|
+
* null there, and a `dryRun` clause would have been unreachable. It was written, measured against
|
|
3520
|
+
* the pins (neutering it reddened nothing) and removed: an unreachable guard is not defence in
|
|
3521
|
+
* depth, it is an untested claim that reads like coverage. The same single condition also covers
|
|
3522
|
+
* the unreadable row, which must not be judged because the one thing these criteria may never do
|
|
3523
|
+
* is infer a result from an absent change-set.
|
|
3524
|
+
*/
|
|
3525
|
+
const judge = codingRun
|
|
3526
|
+
? await this.judgeSettledCodingRun({
|
|
3527
|
+
playbookRef: input.playbookRef,
|
|
3528
|
+
hydrated,
|
|
3529
|
+
plan: dispatch.plan,
|
|
3530
|
+
outcome: codingRun,
|
|
3531
|
+
...(input.session ? { session: input.session } : {}),
|
|
3532
|
+
})
|
|
3533
|
+
: undefined;
|
|
2024
3534
|
return {
|
|
2025
3535
|
playbookRef: input.playbookRef,
|
|
2026
3536
|
dispatched: true,
|
|
2027
3537
|
taskRef: dispatch.plan.taskRef,
|
|
2028
3538
|
targetKind: dispatch.plan.targetKind,
|
|
3539
|
+
// The run's own outcome, beside the plan's. `dispatched` says an agent was STARTED; only
|
|
3540
|
+
// this says whether it finished, failed, or parked on a question — and a failed coding run
|
|
3541
|
+
// is a normal, reportable result of a successful dispatch, never an error to throw.
|
|
3542
|
+
...(dispatch.admission ? { codingTaskId: dispatch.admission.taskId } : {}),
|
|
3543
|
+
...(codingRun ? { codingRun } : {}),
|
|
3544
|
+
// Unreadable is its own answer. Reporting an unreadable row as a failed run would tell an
|
|
3545
|
+
// operator to re-dispatch work that may well have landed.
|
|
3546
|
+
...(dispatch.admission && !codingRun ? { codingRunOutcomeUnreadable: true } : {}),
|
|
3547
|
+
...(judge ? { judge } : {}),
|
|
3548
|
+
// Composed from the TREATMENT, so "what does done mean" is present even when the judge stayed
|
|
3549
|
+
// silent — withholding the criteria exactly when the automated check did not arrive is the
|
|
3550
|
+
// opposite of useful. Same reasoning as the generation path's own review guide.
|
|
3551
|
+
reviewGuide: renderPlaybookReviewGuide(buildPlaybookReviewGuide({
|
|
3552
|
+
treatment: hydrated.evaluationTreatment?.value,
|
|
3553
|
+
...(judge !== undefined ? { judge } : {}),
|
|
3554
|
+
})),
|
|
3555
|
+
// The board AS OF DISPATCH, and re-reading it after the wait would report the same thing:
|
|
3556
|
+
// landing probes COMMITTED bytes, and a coding run's product is a working edit until a human
|
|
3557
|
+
// commits it. So a task cannot land by running — only by being accepted.
|
|
2029
3558
|
remainingReadyTaskRefs: dispatch.plan.readyTaskRefs.filter((taskRef) => taskRef !== dispatch.plan.taskRef),
|
|
2030
3559
|
landedTaskRefs: dispatch.plan.landedTaskRefs,
|
|
2031
3560
|
// Reported, never inferred from the absence of a change: a caller cannot tell a dry run from
|
|
2032
3561
|
// a real one by looking at the workspace, because a real run may legitimately write nothing.
|
|
2033
3562
|
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
2034
|
-
// No acceptance, as everywhere in this lane: the run leaves working edits and
|
|
2035
|
-
//
|
|
3563
|
+
// No acceptance, as everywhere in this lane: the run leaves working edits, and acceptance is a
|
|
3564
|
+
// later commit — a person's, or the companion's under the posture (#1534).
|
|
2036
3565
|
accepted: false,
|
|
2037
3566
|
};
|
|
2038
3567
|
}
|
|
@@ -2111,7 +3640,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2111
3640
|
})),
|
|
2112
3641
|
passed: verification.every(({ outcome }) => outcome.success),
|
|
2113
3642
|
...(infrastructureError ? { infrastructureError: String(infrastructureError) } : {}),
|
|
2114
|
-
// No acceptance
|
|
3643
|
+
// No acceptance in the run itself: acceptance is a later commit, a person's or the posture's (#1534).
|
|
2115
3644
|
accepted: false,
|
|
2116
3645
|
};
|
|
2117
3646
|
}
|
|
@@ -2129,6 +3658,74 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2129
3658
|
* domain plan. READINESS was checked above like every run; the executor owns everything else
|
|
2130
3659
|
* (the tenancy elicitation answer, the derivation, the compose engine, the capability flip).
|
|
2131
3660
|
*/
|
|
3661
|
+
/*
|
|
3662
|
+
* The EXPERT-PERSONAS branch (#572): staff every panel the catalog convenes.
|
|
3663
|
+
*
|
|
3664
|
+
* Before this, the panel's staffing was not a journey step at all — `bottom_up.placement-plan` and the
|
|
3665
|
+
* logo step failed closed at bind time on any application whose charters nobody had curled in, and the
|
|
3666
|
+
* eligibility board had said the playbook was eligible. The board now names the missing roles
|
|
3667
|
+
* (`PANEL_UNSTAFFED`) and this is the step that removes them. Runner-owned like foundation, because the
|
|
3668
|
+
* derive → accept flow already exists as companion services and composes no brief of its own.
|
|
3669
|
+
*
|
|
3670
|
+
* Idempotent by construction: a committed role is left alone; a role whose shaping inputs have not
|
|
3671
|
+
* landed is reported as WAITING (mark, never gate — `application-creation-directive.md`); a refusal on
|
|
3672
|
+
* one role (a human-edited charter, an invalid resulting set) is recorded and the others proceed.
|
|
3673
|
+
*/
|
|
3674
|
+
if (input.playbookRef === EXPERT_PERSONAS_PLAYBOOK_REF) {
|
|
3675
|
+
return this.staffExpertPanels({ artifactState, ...(input.dryRun === true ? { dryRun: true } : {}) });
|
|
3676
|
+
}
|
|
3677
|
+
/*
|
|
3678
|
+
* The CAPABILITY-COMPOSITION executor branch (#1491): which optional packages (website, documentation
|
|
3679
|
+
* portal, workers, minions, locales) this application needs, DERIVED from the definition families and
|
|
3680
|
+
* landed as its own family — never generated. Keyed on the ref like the foundation branch, for the same
|
|
3681
|
+
* reason: a bespoke executor, not a tier. READINESS was checked above like every run.
|
|
3682
|
+
*/
|
|
3683
|
+
if (input.playbookRef === CAPABILITY_COMPOSITION_PLAYBOOK_REF) {
|
|
3684
|
+
const valueOf = (family) => {
|
|
3685
|
+
const value = artifactState.artifactsByFamily.get(family);
|
|
3686
|
+
return value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE ? undefined : value;
|
|
3687
|
+
};
|
|
3688
|
+
return this.capabilityCompositionExecutor.execute({
|
|
3689
|
+
inputs: {
|
|
3690
|
+
marketSnapshot: valueOf('market-snapshot'),
|
|
3691
|
+
brandBrief: valueOf('brand-brief'),
|
|
3692
|
+
businessModel: valueOf('business-model'),
|
|
3693
|
+
requirements: valueOf('requirements'),
|
|
3694
|
+
},
|
|
3695
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
3696
|
+
});
|
|
3697
|
+
}
|
|
3698
|
+
/*
|
|
3699
|
+
* The MATURITY-READING executor branch (#1496): where this application stands against its own
|
|
3700
|
+
* requirements, DERIVED from the requirements family, the decided-element graph and the build
|
|
3701
|
+
* plan's landing probe, and landed as its own family — never generated, for the composition's
|
|
3702
|
+
* reason and one stronger: a model asked where an application stands would answer, and nothing
|
|
3703
|
+
* could check the answer.
|
|
3704
|
+
*
|
|
3705
|
+
* It is a READING. Nothing downstream may gate on the stage it lands, because there is no "done"
|
|
3706
|
+
* for an application — the measurement moves, and the next requirement lowers it again.
|
|
3707
|
+
*/
|
|
3708
|
+
if (input.playbookRef === APPLICATION_MATURITY_PLAYBOOK_REF) {
|
|
3709
|
+
const decidedFamilyValues = {};
|
|
3710
|
+
for (const [family, value] of artifactState.artifactsByFamily) {
|
|
3711
|
+
if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE)
|
|
3712
|
+
continue;
|
|
3713
|
+
decidedFamilyValues[family] = value;
|
|
3714
|
+
}
|
|
3715
|
+
/*
|
|
3716
|
+
* The landing probe's own sets, read from the build dispatch rather than recomputed here: what
|
|
3717
|
+
* LANDED is a question about committed bytes, and a second implementation of that question is
|
|
3718
|
+
* how two surfaces come to disagree about whether a task is done.
|
|
3719
|
+
*/
|
|
3720
|
+
const evidence = await this.buildDispatch.resolveLandedTaskEvidence();
|
|
3721
|
+
return this.applicationMaturityExecutor.execute({
|
|
3722
|
+
inputs: {
|
|
3723
|
+
decidedFamilyValues,
|
|
3724
|
+
...(evidence === undefined ? {} : { landedTaskRefs: evidence.landedTaskRefs, provenTaskRefs: evidence.provenTaskRefs }),
|
|
3725
|
+
},
|
|
3726
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
3727
|
+
});
|
|
3728
|
+
}
|
|
2132
3729
|
if (input.playbookRef === FOUNDATION_PLAYBOOK_REF) {
|
|
2133
3730
|
const domainPlan = artifactState.artifactsByFamily.get('domain-plan');
|
|
2134
3731
|
if (domainPlan === undefined || domainPlan === null || domainPlan === FILE_PRESENT_WITHOUT_VALUE) {
|
|
@@ -2138,7 +3735,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2138
3735
|
}
|
|
2139
3736
|
return this.foundationExecutor.execute({
|
|
2140
3737
|
domainPlan,
|
|
2141
|
-
elicitationAnswers
|
|
3738
|
+
elicitationAnswers,
|
|
2142
3739
|
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
2143
3740
|
});
|
|
2144
3741
|
}
|
|
@@ -2149,12 +3746,29 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2149
3746
|
* declaration is the entire mechanism — no composer changes, and monotonicity is structural:
|
|
2150
3747
|
* a union can only ADD sections, never remove or soften one (#254, design 2).
|
|
2151
3748
|
*/
|
|
3749
|
+
/*
|
|
3750
|
+
* Resolved ONCE, before the brief: the authority section lists the documentation requirements this input derives
|
|
3751
|
+
* (#707 stage 3), and the run hands the same input to the normalizers that key the programme and the release
|
|
3752
|
+
* policy to them. Resolving it twice could let the brief and the refusal disagree.
|
|
3753
|
+
*/
|
|
3754
|
+
const requiredDocumentSet = await this.resolveRequiredDocumentSetInput(artifactState);
|
|
3755
|
+
/*
|
|
3756
|
+
* Also resolved ONCE, and for the same reason: the drafting brief tells the chooser which documents
|
|
3757
|
+
* the application already holds, and the landing merges the new draft into exactly that set. Two
|
|
3758
|
+
* reads could disagree — a brief saying "not yet drafted" about a document the landing then merges
|
|
3759
|
+
* over is the state this is here to prevent.
|
|
3760
|
+
*/
|
|
3761
|
+
const existingComplianceDocumentCandidates = await this.readLandedComplianceDocumentCandidates();
|
|
2152
3762
|
const composeGenerationOutputs = async (effective) => {
|
|
2153
3763
|
const workspaceTruthSection = await this.composeWorkspaceTruthSection(effective);
|
|
2154
3764
|
const compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(effective);
|
|
2155
|
-
const documentBlueprintSection = this.composeDocumentBlueprintSection(effective);
|
|
3765
|
+
const documentBlueprintSection = this.composeDocumentBlueprintSection(effective, existingComplianceDocumentCandidates);
|
|
2156
3766
|
const documentFactObligationsSection = this.composeDocumentFactObligationsSection(effective);
|
|
2157
|
-
const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(effective);
|
|
3767
|
+
const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(effective, requiredDocumentSet.requiredDocumentSetInput);
|
|
3768
|
+
const applicationRoleGraphSection = await this.composeApplicationRoleGraphSection(effective);
|
|
3769
|
+
const assuranceEvidenceSection = await this.composeAssuranceEvidenceSection(effective);
|
|
3770
|
+
const riskSignalsSection = await this.composeRiskSignalsSection(effective);
|
|
3771
|
+
const authoredDocumentFactsSection = this.composeAuthoredDocumentFactsSection(effective, artifactState);
|
|
2158
3772
|
return (playbook.outputs ?? []).map((output) => ({
|
|
2159
3773
|
family: output.family,
|
|
2160
3774
|
// A playbook output without a `schemaRef` has no family contract, so nothing could validate what the
|
|
@@ -2165,6 +3779,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2165
3779
|
guidance: playbook.method?.guidance ?? '',
|
|
2166
3780
|
family: output.family,
|
|
2167
3781
|
creatorBrief: input.creatorBrief,
|
|
3782
|
+
selectionRationale: input.selectionRationale,
|
|
2168
3783
|
elicitationSection,
|
|
2169
3784
|
inputTruthSection: this.composeInputTruthSection(effective, artifactState),
|
|
2170
3785
|
workspaceTruthSection,
|
|
@@ -2172,8 +3787,14 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2172
3787
|
documentBlueprintSection,
|
|
2173
3788
|
documentFactObligationsSection,
|
|
2174
3789
|
assuranceProgramAuthoritySection,
|
|
3790
|
+
applicationRoleGraphSection,
|
|
3791
|
+
assuranceEvidenceSection,
|
|
3792
|
+
authoredDocumentFactsSection,
|
|
2175
3793
|
skillCatalogSection: this.composeSkillCatalogSection(effective),
|
|
3794
|
+
skillBodiesSection: this.composeSkillBodiesSection(effective),
|
|
2176
3795
|
coherenceSection: this.composeCoherenceSection(effective, artifactState),
|
|
3796
|
+
marketFitScoresSection: this.composeMarketFitScoresSection(effective, artifactState),
|
|
3797
|
+
riskSignalsSection,
|
|
2177
3798
|
stepEvidenceSection: this.composeStepEvidenceSection(input.stepResults),
|
|
2178
3799
|
parentElicitationSection: input.parentElicitationSection ?? '',
|
|
2179
3800
|
clarificationAnswersSection: input.clarification
|
|
@@ -2185,22 +3806,25 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2185
3806
|
let outputs = await composeGenerationOutputs(playbook);
|
|
2186
3807
|
let briefAdequacy;
|
|
2187
3808
|
if (playbook.method?.briefAdequacyGate === true && outputs.length > 0) {
|
|
2188
|
-
const
|
|
3809
|
+
const withheld = composeDeclaredInputWithheldAspects(playbook.inputs ?? [], this.decidedFamilyValues(artifactState));
|
|
3810
|
+
const judged = await this.judgeBriefAdequacy(playbook, outputs[0].brief, withheld);
|
|
2189
3811
|
if (judged) {
|
|
2190
3812
|
const declared = new Set(playbook.method?.contextSources ?? []);
|
|
2191
3813
|
const excludedSources = new Set(playbook.method?.briefAdequacyExcludedSources ?? []);
|
|
2192
3814
|
const addedSources = judged.missingSources.filter((source) => !declared.has(source) && !excludedSources.has(source));
|
|
2193
|
-
|
|
3815
|
+
const addedAspects = judged.missingAspects;
|
|
3816
|
+
if (judged.verdict === BriefAdequacyVerdict.INSUFFICIENT && (addedSources.length > 0 || addedAspects.length > 0)) {
|
|
2194
3817
|
const widened = {
|
|
2195
3818
|
...playbook,
|
|
3819
|
+
...(addedAspects.length > 0 ? { inputs: widenDeclaredInputAspects(playbook.inputs ?? [], withheld, addedAspects) } : {}),
|
|
2196
3820
|
method: { ...playbook.method, contextSources: [...declared, ...addedSources] },
|
|
2197
3821
|
};
|
|
2198
3822
|
outputs = await composeGenerationOutputs(widened);
|
|
2199
|
-
briefAdequacy = { verdict: BriefAdequacyVerdict.INSUFFICIENT, addedSources };
|
|
2200
|
-
this.logDebug('Brief-adequacy gate repaired the brief', { playbookRef: input.playbookRef, addedSources });
|
|
3823
|
+
briefAdequacy = { verdict: BriefAdequacyVerdict.INSUFFICIENT, addedSources, addedAspects };
|
|
3824
|
+
this.logDebug('Brief-adequacy gate repaired the brief', { playbookRef: input.playbookRef, addedSources, addedAspects });
|
|
2201
3825
|
}
|
|
2202
3826
|
else {
|
|
2203
|
-
briefAdequacy = { verdict: judged.verdict, addedSources: [] };
|
|
3827
|
+
briefAdequacy = { verdict: judged.verdict, addedSources: [], addedAspects: [] };
|
|
2204
3828
|
}
|
|
2205
3829
|
}
|
|
2206
3830
|
/*
|
|
@@ -2213,6 +3837,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2213
3837
|
playbookRef: input.playbookRef,
|
|
2214
3838
|
verdict: briefAdequacy?.verdict ?? 'unavailable',
|
|
2215
3839
|
addedSources: briefAdequacy?.addedSources ?? [],
|
|
3840
|
+
addedAspects: briefAdequacy?.addedAspects ?? [],
|
|
2216
3841
|
});
|
|
2217
3842
|
}
|
|
2218
3843
|
/*
|
|
@@ -2233,17 +3858,41 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2233
3858
|
return await this.runAssessmentPlaybook({ playbookRef: input.playbookRef, playbook, hydrated, artifactState, ...(input.session ? { session: input.session } : {}) });
|
|
2234
3859
|
}
|
|
2235
3860
|
this.logDebug('Running playbook', { playbookRef: input.playbookRef, outputCount: outputs.length });
|
|
3861
|
+
/*
|
|
3862
|
+
* ONE observed instant, used for both: the draft's `reviewedAt` and the date its cadence schedules
|
|
3863
|
+
* from. Two clock reads a millisecond apart could land either side of midnight and date the next
|
|
3864
|
+
* review from a different day than the review that scheduled it.
|
|
3865
|
+
*/
|
|
3866
|
+
const recordedAt = new Date().toISOString();
|
|
3867
|
+
const nextReviewOn = resolveDeclaredAssuranceNextReviewOn(this.companionContext.saasConfig?.assuranceReviewCadence, recordedAt);
|
|
3868
|
+
/*
|
|
3869
|
+
* What the compliance-programme normalizer refuses a NOT_APPLICABLE binding against — read by the
|
|
3870
|
+
* SAME method the authority brief reads, so what the producer was told cannot apply here is exactly
|
|
3871
|
+
* what is refused, and nothing else.
|
|
3872
|
+
*/
|
|
3873
|
+
const enabledEngineCapabilities = this.readEnabledEngineCapabilities();
|
|
2236
3874
|
const result = await runPlaybookGeneration({
|
|
2237
3875
|
playbookRef: input.playbookRef,
|
|
2238
3876
|
outputs,
|
|
2239
3877
|
specificationsPackageRoot,
|
|
3878
|
+
/*
|
|
3879
|
+
* The instant THIS HOST observed the run (#647). Supplied explicitly rather than letting the
|
|
3880
|
+
* runtime default it: the companion is the process a person is actually driving, so its clock is
|
|
3881
|
+
* the honest observer, and a caller that cares should say so rather than inherit one.
|
|
3882
|
+
*
|
|
3883
|
+
* It is not a review. The REVIEW is the commit — a landed programme is a working edit until a
|
|
3884
|
+
* human commits it — and this records when the draft was produced.
|
|
3885
|
+
*/
|
|
3886
|
+
recordedAt,
|
|
3887
|
+
...(nextReviewOn === undefined ? {} : { nextReviewOn }),
|
|
3888
|
+
...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),
|
|
2240
3889
|
// NEUTRAL BY CONTRACT (issue #65): every landed specification constant carries the fixed
|
|
2241
3890
|
// `application` prefix (`applicationVisionSnapshot`, `applicationBuildPlan`, …), never an
|
|
2242
3891
|
// app-slug-derived one. The prefix used to be camelCased from the application's declared
|
|
2243
3892
|
// name (`wonder-todos` → `wonderTodos`), which baked app identity into exported identifiers
|
|
2244
3893
|
// — exactly what templates and companion introspection cannot rely on. App identity lives
|
|
2245
3894
|
// in VALUES (`saasConfig.name`/`slug`), never in the names of landed exports.
|
|
2246
|
-
constantPrefix:
|
|
3895
|
+
constantPrefix: LANDED_CONSTANT_PREFIX,
|
|
2247
3896
|
model: this.buildArtifactGenerationPort(playbook),
|
|
2248
3897
|
// The application's DECLARED document facts, so a compliance-document draft citing a fact
|
|
2249
3898
|
// nobody declared is rejected into the retry rather than landed.
|
|
@@ -2253,6 +3902,9 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2253
3902
|
// citation". Collapsing them would refuse every draft in every application that has not yet
|
|
2254
3903
|
// run `refinement.document-facts`.
|
|
2255
3904
|
...this.resolveDeclaredDocumentFacts(artifactState),
|
|
3905
|
+
// The judged runs a citation may resolve against (#297), read from the SAME place the brief
|
|
3906
|
+
// renders its evidence section from. Absent stays absent for the reason above.
|
|
3907
|
+
...this.resolveCommittedAssuranceRuns(),
|
|
2256
3908
|
/*
|
|
2257
3909
|
* The landed values, so the generation loop and the landing can refuse a citation of something
|
|
2258
3910
|
* that does not exist — the coherence report's dangling class, moved from post-hoc page into
|
|
@@ -2260,10 +3912,15 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2260
3912
|
* read; file-only sentinels ride along and are reported unreadable by the report, never thrown on.
|
|
2261
3913
|
*/
|
|
2262
3914
|
landedFamilyValues: artifactState.artifactsByFamily,
|
|
3915
|
+
/*
|
|
3916
|
+
* The drafts already held. `undefined` only when this companion has no resolved specifications
|
|
3917
|
+
* package, where nothing could have been read and the landing's refusal is the honest outcome.
|
|
3918
|
+
*/
|
|
3919
|
+
...(existingComplianceDocumentCandidates === undefined ? {} : { existingComplianceDocumentCandidates }),
|
|
2263
3920
|
// WHICH documents this application needs, so a draft naming one it does not need is refused at
|
|
2264
3921
|
// the landing and retried in the generation loop. Same absent-vs-empty contract as the facts
|
|
2265
3922
|
// above: an omitted key skips the check rather than refusing everything.
|
|
2266
|
-
...
|
|
3923
|
+
...requiredDocumentSet,
|
|
2267
3924
|
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
2268
3925
|
...(input.session ? { trace: this.buildTrace(input.session, `playbook-run-${input.playbookRef}`) } : {}),
|
|
2269
3926
|
/*
|
|
@@ -2291,16 +3948,16 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2291
3948
|
* answers through the resume route and the run continues from here.
|
|
2292
3949
|
*/
|
|
2293
3950
|
if (isPlaybookGenerationSuspension(result)) {
|
|
2294
|
-
const suspendedRunId = `${input.session?.sessionId ?? 'run'}-${input.playbookRef.replace(/[^a-zA-Z0-9._-]+/g, '-')}-${Date.now()}`;
|
|
2295
3951
|
const round = (input.clarification?.round ?? 0) + 1;
|
|
2296
|
-
const
|
|
2297
|
-
|
|
3952
|
+
const checkpoint = {
|
|
3953
|
+
kind: PlaybookRunCheckpointKind.CLARIFICATION,
|
|
2298
3954
|
playbookRef: input.playbookRef,
|
|
2299
3955
|
family: result.family,
|
|
2300
|
-
suspendedAt: new Date().toISOString(),
|
|
2301
3956
|
round,
|
|
3957
|
+
dryRun: input.dryRun === true,
|
|
2302
3958
|
...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),
|
|
2303
|
-
|
|
3959
|
+
...(input.selectionRationale ? { selectionRationale: input.selectionRationale } : {}),
|
|
3960
|
+
elicitationAnswers: elicitationAnswers.map((answer) => ({ ...answer })),
|
|
2304
3961
|
// Cumulative: this round's answers join every earlier round's, so the next check never
|
|
2305
3962
|
// re-asks anything the creator has already settled.
|
|
2306
3963
|
priorAnswers: [...(input.clarification?.answers ?? [])],
|
|
@@ -2316,7 +3973,6 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2316
3973
|
* A decision record that keeps the answers and loses the questions is worse than none: it
|
|
2317
3974
|
* reads as a complete account of what was decided.
|
|
2318
3975
|
*
|
|
2319
|
-
* The checkpoint is a MUTABLE record on its way to JSON; a request is a readonly view.
|
|
2320
3976
|
* Written field by field rather than spread, so a widened request cannot silently ride into
|
|
2321
3977
|
* a persisted checkpoint without someone deciding it belongs there.
|
|
2322
3978
|
*/
|
|
@@ -2328,15 +3984,24 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2328
3984
|
...(request.options ? { options: [...request.options] } : {}),
|
|
2329
3985
|
})),
|
|
2330
3986
|
};
|
|
2331
|
-
|
|
2332
|
-
|
|
3987
|
+
/*
|
|
3988
|
+
* The wait lives on the run's OWN execution row (#1360): the run id IS the handle the resume
|
|
3989
|
+
* route takes. The engine reads this registration when the run returns, moves both rows to
|
|
3990
|
+
* `AWAITING_APPROVAL`, and writes the decision and the checkpoint on the execution.
|
|
3991
|
+
*/
|
|
3992
|
+
const suspended = {
|
|
2333
3993
|
status: 'awaiting_creator_input',
|
|
2334
|
-
runId
|
|
3994
|
+
runId,
|
|
2335
3995
|
playbookRef: input.playbookRef,
|
|
2336
3996
|
family: result.family,
|
|
2337
3997
|
round,
|
|
2338
3998
|
requests: result.requests,
|
|
2339
3999
|
};
|
|
4000
|
+
this.suspensionRequests.set(suspended, {
|
|
4001
|
+
decision: projectPlaybookClarificationAsDecision({ runId, requestedAt: new Date().toISOString(), checkpoint }),
|
|
4002
|
+
checkpointContext: checkpoint,
|
|
4003
|
+
});
|
|
4004
|
+
return suspended;
|
|
2340
4005
|
}
|
|
2341
4006
|
this.logDebug('Playbook run landed', {
|
|
2342
4007
|
playbookRef: input.playbookRef,
|
|
@@ -2390,14 +4055,22 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2390
4055
|
.join(' | ')
|
|
2391
4056
|
+ ' — re-apply the decision and set origin REVISED, or accept the panel\'s.');
|
|
2392
4057
|
}
|
|
2393
|
-
|
|
4058
|
+
/*
|
|
4059
|
+
* The REVERT handle, which is not the same statement as the run's identity even though it is the
|
|
4060
|
+
* same value. `runId` in the RESULT means "this run is revertable through
|
|
4061
|
+
* `POST /runs/writes/:runId/revert`", so it stays absent on a dry run and is cleared when the
|
|
4062
|
+
* register write fails — offering a handle to a record that does not exist would be worse than
|
|
4063
|
+
* offering none. The run still HAS an identity in both cases; it simply is not revertable.
|
|
4064
|
+
*/
|
|
4065
|
+
let revertHandle;
|
|
2394
4066
|
if (input.dryRun !== true) {
|
|
2395
|
-
|
|
4067
|
+
revertHandle = runId;
|
|
2396
4068
|
const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);
|
|
2397
4069
|
await this.writeRegister
|
|
2398
4070
|
.record({
|
|
2399
4071
|
runId,
|
|
2400
4072
|
playbookRef: input.playbookRef,
|
|
4073
|
+
...(input.session ? { traceSessionId: input.session.sessionId } : {}),
|
|
2401
4074
|
at: new Date().toISOString(),
|
|
2402
4075
|
files: [
|
|
2403
4076
|
...result.landed.map((entry) => ({
|
|
@@ -2442,7 +4115,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2442
4115
|
})
|
|
2443
4116
|
.catch((error) => {
|
|
2444
4117
|
this.logDebug('Run write-register record failed (non-fatal)', { runId, error: String(error) });
|
|
2445
|
-
|
|
4118
|
+
revertHandle = undefined;
|
|
2446
4119
|
});
|
|
2447
4120
|
}
|
|
2448
4121
|
/*
|
|
@@ -2455,18 +4128,32 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2455
4128
|
let judge;
|
|
2456
4129
|
if (hydrated.evaluationTreatment) {
|
|
2457
4130
|
const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(hydrated.evaluationTreatment.value);
|
|
4131
|
+
const judgeEvidence = treatment.success
|
|
4132
|
+
? await this.composeGenerationJudgeEvidence(playbook, artifactState, result.landedValues.map((entry) => entry.family), result.landedValues)
|
|
4133
|
+
: undefined;
|
|
4134
|
+
// The SAME composer the generation brief used, over the same step results — so the judge reads
|
|
4135
|
+
// the evidence in the shape the generator was given it, rather than a second rendering of it.
|
|
4136
|
+
const stepEvidenceForJudge = this.composeStepEvidenceSection(input.stepResults);
|
|
2458
4137
|
judge = treatment.success
|
|
2459
4138
|
? await runPlaybookJudge({
|
|
2460
4139
|
playbookRef: input.playbookRef,
|
|
2461
4140
|
treatment: treatment.data,
|
|
2462
4141
|
landed: result.landedValues,
|
|
4142
|
+
...(judgeEvidence && judgeEvidence.acceptedInputs.length > 0 ? { acceptedInputs: judgeEvidence.acceptedInputs } : {}),
|
|
4143
|
+
...(judgeEvidence && judgeEvidence.derivedContext.length > 0 ? { derivedContext: judgeEvidence.derivedContext } : {}),
|
|
4144
|
+
/*
|
|
4145
|
+
* The evidence THIS RUN gathered (#1432). `top_down.market-snapshot-produce` judges whether
|
|
4146
|
+
* its snapshot is grounded in the sealed research evidence, and the judge was handed every
|
|
4147
|
+
* source except that one — the generator got it, the grader did not.
|
|
4148
|
+
*/
|
|
4149
|
+
...(stepEvidenceForJudge ? { stepEvidence: stepEvidenceForJudge } : {}),
|
|
2463
4150
|
// The creator's own input is the ground truth several criteria judge groundedness against —
|
|
2464
4151
|
// without it the vision criterion could only answer INDETERMINATE (the first live finding).
|
|
2465
|
-
...(input.creatorBrief ||
|
|
4152
|
+
...(input.creatorBrief || elicitationAnswers.length
|
|
2466
4153
|
? {
|
|
2467
4154
|
creatorInput: {
|
|
2468
4155
|
...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),
|
|
2469
|
-
...(
|
|
4156
|
+
...(elicitationAnswers.length ? { elicitationAnswers } : {}),
|
|
2470
4157
|
},
|
|
2471
4158
|
}
|
|
2472
4159
|
: {}),
|
|
@@ -2493,15 +4180,142 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2493
4180
|
treatment: hydrated.evaluationTreatment?.value,
|
|
2494
4181
|
...(judge !== undefined ? { judge } : {}),
|
|
2495
4182
|
}));
|
|
4183
|
+
/*
|
|
4184
|
+
* Does the application still LOAD, having been written to?
|
|
4185
|
+
*
|
|
4186
|
+
* A run verifies that it WROTE a file. It has never verified that the application survived — and on
|
|
4187
|
+
* 2026-09-16 two consecutive runs on Wonder Todos showed both halves of what that costs. One answered
|
|
4188
|
+
* 200 with the advisory judge passing and left the specifications package with 249 type errors; the
|
|
4189
|
+
* next answered 500 in a second, because a landed family no longer satisfied a hand-authored module
|
|
4190
|
+
* that throws at import, and `companion-exports` — which the config loader imports — could not be
|
|
4191
|
+
* evaluated at all. Every companion request failed for the rest of the session, INCLUDING the runs
|
|
4192
|
+
* that would have landed the correction. The remedy needed the mechanism the landing had taken down.
|
|
4193
|
+
*
|
|
4194
|
+
* `readArtifactState` is that load, and it genuinely re-reads what this run just wrote:
|
|
4195
|
+
* `loadSpecificationsCompanionExports` passes `freshModuleCache: true` precisely so a long-lived
|
|
4196
|
+
* companion cannot answer from an evaluation frozen before the landing (#170). Without that flag this
|
|
4197
|
+
* check would pass on a broken landing and be worse than nothing.
|
|
4198
|
+
*
|
|
4199
|
+
* It REPORTS rather than throws, and the asymmetry is the point. The files are already on disk and the
|
|
4200
|
+
* run genuinely produced them; converting that into a failed run would hide the artifacts an operator
|
|
4201
|
+
* now has to look at. What the operator needs is to be told, at the moment it happened, by the run that
|
|
4202
|
+
* caused it — with the revert door beside it, which the response note already names.
|
|
4203
|
+
*
|
|
4204
|
+
* NOT a typecheck. `bottom_up.assemble-verify` owns that question for the whole application and stays
|
|
4205
|
+
* where it is: a type error is visible, local, and leaves the companion running to fix it. A load
|
|
4206
|
+
* failure is the one that takes down the lane that would land the fix.
|
|
4207
|
+
*/
|
|
4208
|
+
const landingLoadFailure = input.dryRun === true ? undefined : await this.describeLandingLoadFailure();
|
|
4209
|
+
return {
|
|
4210
|
+
...slim,
|
|
4211
|
+
reviewGuide,
|
|
4212
|
+
// Present only when the landing broke the load — an absent field is the ordinary, healthy run.
|
|
4213
|
+
...(landingLoadFailure === undefined ? {} : { landingLoadFailure }),
|
|
4214
|
+
// Reported even when empty is WRONG here — an empty array on every run of every playbook is
|
|
4215
|
+
// noise. Present means "this run overwrote human decisions"; absent means it did not.
|
|
4216
|
+
...(revertedPlacementRevisions.length > 0 ? { revertedPlacementRevisions } : {}),
|
|
4217
|
+
...(judge !== undefined ? { judge } : {}),
|
|
4218
|
+
...(revertHandle !== undefined ? { runId: revertHandle } : {}),
|
|
4219
|
+
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
4220
|
+
};
|
|
4221
|
+
}
|
|
4222
|
+
/**
|
|
4223
|
+
* The application's config load, re-run against what this run just wrote, as a sentence or `undefined`.
|
|
4224
|
+
*
|
|
4225
|
+
* `undefined` means it loaded. Anything else is the message an operator must act on, and it names the
|
|
4226
|
+
* revert door because a landing that breaks the load is the case where that door exists.
|
|
4227
|
+
*/
|
|
4228
|
+
async describeLandingLoadFailure() {
|
|
4229
|
+
try {
|
|
4230
|
+
await this.readArtifactState();
|
|
4231
|
+
return undefined;
|
|
4232
|
+
}
|
|
4233
|
+
catch (error) {
|
|
4234
|
+
const reason = describeCaughtError(error);
|
|
4235
|
+
this.logDebug('Landing broke the application config load', { reason });
|
|
4236
|
+
return `This run's files are on disk, and the application can no longer be loaded with them: ${reason}`
|
|
4237
|
+
+ ' Nothing downstream will work until this is resolved — revert this run via POST /runs/writes/{runId}/revert,'
|
|
4238
|
+
+ ' or correct the family it names.';
|
|
4239
|
+
}
|
|
4240
|
+
}
|
|
4241
|
+
/**
|
|
4242
|
+
* The evidence a GENERATION-path judge reads the landed values against: what the run was given (#964 step 2).
|
|
4243
|
+
*
|
|
4244
|
+
* Until this existed the generation-path judge received the landed values and the creator's input, and
|
|
4245
|
+
* nothing else — so a criterion asking whether an artifact claims more than the application accepted
|
|
4246
|
+
* could only read the artifact. The run's brief carried the evidence; the judge never saw it.
|
|
4247
|
+
*
|
|
4248
|
+
* - `acceptedInputs`: the playbook's declared input families, the same section the generator read.
|
|
4249
|
+
* - `derivedContext`: the objectives a compliance programme may bind — each one's intent and its
|
|
4250
|
+
* applicability COMPUTED for this application — when the playbook declares that source; the
|
|
4251
|
+
* application's compliance-relevant declarations when it declares that one; and — when the run landed
|
|
4252
|
+
* `document-facts` — the facts the runtime computed, which the file omits on purpose and a judge must
|
|
4253
|
+
* neither ask for nor let a landed fact contradict.
|
|
4254
|
+
*
|
|
4255
|
+
* Best-effort, like the judge itself: a declarations read that fails leaves that section out rather
|
|
4256
|
+
* than failing a run whose files have already landed. The criterion then answers INDETERMINATE.
|
|
4257
|
+
*/
|
|
4258
|
+
async composeGenerationJudgeEvidence(playbook, state, landedFamilies,
|
|
4259
|
+
/**
|
|
4260
|
+
* The values this run PRODUCED, when the caller holds them.
|
|
4261
|
+
*
|
|
4262
|
+
* Only the compliance-document-candidate entries are read, and only to learn which documents the run
|
|
4263
|
+
* drafted. Omitted means "the caller does not know", not "the run produced none" — disk then answers,
|
|
4264
|
+
* which is the behaviour every caller had before.
|
|
4265
|
+
*/
|
|
4266
|
+
draftedValues) {
|
|
4267
|
+
const inputTruthSection = this.composeInputTruthSection(playbook, state);
|
|
4268
|
+
let compliancePrimaryFactsSection = '';
|
|
4269
|
+
try {
|
|
4270
|
+
compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(playbook);
|
|
4271
|
+
}
|
|
4272
|
+
catch (error) {
|
|
4273
|
+
this.logDebug('Judge evidence: compliance declarations unavailable (section omitted)', { error: String(error) });
|
|
4274
|
+
}
|
|
4275
|
+
/*
|
|
4276
|
+
* Without this a judge asked whether a bound objective's intent is TRUE of this product sees the
|
|
4277
|
+
* objective's REF and nothing it demands — and cannot tell an APPLICABLE claim from one the
|
|
4278
|
+
* application's capabilities leave UNDETERMINED. Pure and synchronous, so it cannot fail the run.
|
|
4279
|
+
*/
|
|
4280
|
+
const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(playbook);
|
|
4281
|
+
const computedFactsSection = landedFamilies.includes('document-facts')
|
|
4282
|
+
? renderComputedDocumentFactsForJudge(state.computedDocumentFactAnswers)
|
|
4283
|
+
: '';
|
|
4284
|
+
/*
|
|
4285
|
+
* The catalog's claim guards for the drafted documents (#1452) — the prohibitions the drafting brief keeps
|
|
4286
|
+
* out of the drafter's prompt on purpose, which therefore reached no reader at all until the judge got them.
|
|
4287
|
+
* Best-effort like every section here: an unreadable candidate set leaves it out, and a criterion that needs
|
|
4288
|
+
* it answers INDETERMINATE rather than passing on silence.
|
|
4289
|
+
*/
|
|
4290
|
+
let claimGuardsSection = '';
|
|
4291
|
+
if (landedFamilies.includes('compliance-document-candidate')) {
|
|
4292
|
+
try {
|
|
4293
|
+
/*
|
|
4294
|
+
* The documents THIS RUN produced come first, and reading them off disk is the fallback.
|
|
4295
|
+
*
|
|
4296
|
+
* Disk alone was the whole answer until 2026-09-22, and it is right only when landing has already
|
|
4297
|
+
* happened — which is true of an ordinary run and false of the two paths that matter most for
|
|
4298
|
+
* catching a bad claim. Measured on the first live governance run: a DRY run drafted
|
|
4299
|
+
* `governance.scope-system-description`, wrote nothing by design, and the judge was handed the
|
|
4300
|
+
* guards of the two PUBLIC documents already on disk. It answered INDETERMINATE — correctly, and
|
|
4301
|
+
* about a document nobody had asked it to judge. The judge bench has the same shape for the same
|
|
4302
|
+
* reason, and a bench caller supplying a document the application has not landed is its normal use.
|
|
4303
|
+
*
|
|
4304
|
+
* So the run's own drafts decide, and disk answers only when the run produced none.
|
|
4305
|
+
*/
|
|
4306
|
+
const draftedDocumentRefs = draftedCandidateDocumentRefs(draftedValues);
|
|
4307
|
+
const documentRefs = draftedDocumentRefs.length > 0
|
|
4308
|
+
? draftedDocumentRefs
|
|
4309
|
+
: ((await this.readLandedComplianceDocumentCandidates()) ?? []).map((candidate) => String(candidate.documentRef));
|
|
4310
|
+
claimGuardsSection = renderAssuranceDocumentClaimGuardsForJudge(documentRefs);
|
|
4311
|
+
}
|
|
4312
|
+
catch (error) {
|
|
4313
|
+
this.logDebug('Judge evidence: drafted candidates unreadable, claim guards omitted', { error: String(error) });
|
|
4314
|
+
}
|
|
4315
|
+
}
|
|
2496
4316
|
return {
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
// Reported even when empty is WRONG here — an empty array on every run of every playbook is
|
|
2500
|
-
// noise. Present means "this run overwrote human decisions"; absent means it did not.
|
|
2501
|
-
...(revertedPlacementRevisions.length > 0 ? { revertedPlacementRevisions } : {}),
|
|
2502
|
-
...(judge !== undefined ? { judge } : {}),
|
|
2503
|
-
...(runId !== undefined ? { runId } : {}),
|
|
2504
|
-
...(input.dryRun === true ? { dryRun: true } : {}),
|
|
4317
|
+
acceptedInputs: inputTruthSection === '' ? [] : [inputTruthSection],
|
|
4318
|
+
derivedContext: [assuranceProgramAuthoritySection, compliancePrimaryFactsSection, computedFactsSection, claimGuardsSection].filter((section) => section !== ''),
|
|
2505
4319
|
};
|
|
2506
4320
|
}
|
|
2507
4321
|
/** One trace step per run, so a session with several runs keeps their artifacts apart. */
|
|
@@ -2536,7 +4350,18 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2536
4350
|
* contract, and condensing twice is how a source URL becomes "several sources indicate".
|
|
2537
4351
|
*/
|
|
2538
4352
|
composeStepEvidenceSection(stepResults) {
|
|
2539
|
-
|
|
4353
|
+
/*
|
|
4354
|
+
* DERIVED judge verdicts are excluded (#1498). This section tells its reader that what follows is
|
|
4355
|
+
* "what earlier steps of this run actually found" and asks it to record that provenance on what
|
|
4356
|
+
* it authors — true of research text and of an adequacy verdict a child produced, false of a
|
|
4357
|
+
* verdict the runtime derived ABOUT a child. Rendering one here would hand a generator a grade to
|
|
4358
|
+
* cite as a source, and hand the next JUDGE an earlier judge's answer framed as evidence, which
|
|
4359
|
+
* is the conformity failure `app-creation-judge-growth.md` warns a panel against.
|
|
4360
|
+
*/
|
|
4361
|
+
// `new Map()` rather than `[]`: an empty ARRAY widens the entry key to `string | number` and the ref
|
|
4362
|
+
// no longer satisfies a `string` parameter. Same emptiness, and it keeps the map's own entry type.
|
|
4363
|
+
const evidence = [...(stepResults ?? new Map()).entries()].filter(([ref]) => !isJudgeVerdictStepRef(ref));
|
|
4364
|
+
if (evidence.length === 0)
|
|
2540
4365
|
return '';
|
|
2541
4366
|
return [
|
|
2542
4367
|
'# Evidence gathered for this run (from sibling steps)',
|
|
@@ -2545,7 +4370,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2545
4370
|
'— an unsourced claim and a sourced one must not be indistinguishable in what you land.',
|
|
2546
4371
|
'Where the evidence does not cover something, say so on the entity rather than inventing it.',
|
|
2547
4372
|
'',
|
|
2548
|
-
...
|
|
4373
|
+
...evidence.map(([ref, value]) => `## ${ref}\n${typeof value === 'string' ? value : JSON.stringify(value, null, 1)}`),
|
|
2549
4374
|
].join('\n');
|
|
2550
4375
|
}
|
|
2551
4376
|
/**
|
|
@@ -2554,18 +4379,28 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2554
4379
|
* classifier's contract, for the same reason). The judge sees the closed list of UNDECLARED
|
|
2555
4380
|
* sources only, so the repair arm can never be talked into removing anything.
|
|
2556
4381
|
*/
|
|
2557
|
-
async judgeBriefAdequacy(playbook, brief) {
|
|
4382
|
+
async judgeBriefAdequacy(playbook, brief, withheld) {
|
|
2558
4383
|
try {
|
|
2559
4384
|
const declared = new Set(playbook.method?.contextSources ?? []);
|
|
2560
4385
|
const excluded = new Set(playbook.method?.briefAdequacyExcludedSources ?? []);
|
|
2561
4386
|
const undeclared = Object.values(MetaWorkflow_ContextSource).filter((source) => !declared.has(source) && !excluded.has(source));
|
|
2562
|
-
|
|
4387
|
+
/*
|
|
4388
|
+
* Two repair vocabularies, and the gate runs when EITHER is non-empty (#1422). Before, a
|
|
4389
|
+
* playbook that declared every context source returned here — even with a narrowed input
|
|
4390
|
+
* family withholding most of what it reads, which is the case the aspect repair exists for.
|
|
4391
|
+
*/
|
|
4392
|
+
if (undeclared.length === 0 && withheld.proposableAspectKeys.length === 0)
|
|
2563
4393
|
return null;
|
|
2564
4394
|
const prompt = [
|
|
2565
4395
|
'Judge whether the generation brief below is SUFFICIENT to produce its declared artifact.',
|
|
2566
|
-
|
|
2567
|
-
|
|
4396
|
+
...(undeclared.length > 0
|
|
4397
|
+
? [
|
|
4398
|
+
'If it is not, name which of these UNDECLARED context sources would repair it (these are the only',
|
|
4399
|
+
`admissible source proposals): ${undeclared.join(', ')}`,
|
|
4400
|
+
]
|
|
4401
|
+
: ['Every context source this runtime composes is already in the brief; propose none.']),
|
|
2568
4402
|
'',
|
|
4403
|
+
...(withheld.rendered === '' ? [] : [withheld.rendered, '']),
|
|
2569
4404
|
'# The brief',
|
|
2570
4405
|
brief,
|
|
2571
4406
|
].join('\n');
|
|
@@ -2582,7 +4417,18 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2582
4417
|
const parsed = BriefAdequacyVerdictOutputSchema.safeParse(response.output?.object);
|
|
2583
4418
|
if (!parsed.success)
|
|
2584
4419
|
return null;
|
|
2585
|
-
|
|
4420
|
+
/*
|
|
4421
|
+
* The aspect bound is enforced HERE rather than in the schema, because aspect keys are
|
|
4422
|
+
* per-family and open where `MetaWorkflow_ContextSource` is closed. The admissible set is
|
|
4423
|
+
* exactly the map the judge was shown, so an invented key — or an aspect of a family this
|
|
4424
|
+
* playbook does not declare — is dropped rather than widening the playbook's family set.
|
|
4425
|
+
*/
|
|
4426
|
+
const proposable = new Set(withheld.proposableAspectKeys);
|
|
4427
|
+
return {
|
|
4428
|
+
verdict: parsed.data.verdict,
|
|
4429
|
+
missingSources: parsed.data.missingSources,
|
|
4430
|
+
missingAspects: parsed.data.missingAspects.filter((aspectKey) => proposable.has(aspectKey)),
|
|
4431
|
+
};
|
|
2586
4432
|
}
|
|
2587
4433
|
catch (error) {
|
|
2588
4434
|
this.logger.warn('Brief-adequacy gate failed; generating from the static brief (fail-open)', {
|
|
@@ -2643,6 +4489,15 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2643
4489
|
'# Method',
|
|
2644
4490
|
input.guidance,
|
|
2645
4491
|
...(input.creatorBrief ? ['', '# What this application is', input.creatorBrief] : []),
|
|
4492
|
+
/*
|
|
4493
|
+
* AFTER what the application IS and BEFORE the declared inputs: the loop's reason is about THIS
|
|
4494
|
+
* round, so it frames how to read the artifacts that follow rather than competing with them.
|
|
4495
|
+
* Labelled as the selector's words, never the creator's — a run must not mistake a machine's
|
|
4496
|
+
* reasoning for a product decision somebody made.
|
|
4497
|
+
*/
|
|
4498
|
+
...(input.selectionRationale
|
|
4499
|
+
? ['', '# Why this playbook was chosen for this round', 'Composed by the journey selector against what has already landed, not by the creator.', input.selectionRationale]
|
|
4500
|
+
: []),
|
|
2646
4501
|
...(input.inputTruthSection ? ['', input.inputTruthSection] : []),
|
|
2647
4502
|
/*
|
|
2648
4503
|
* AFTER the declared inputs and BEFORE the derived sections, because that is what it is: the
|
|
@@ -2657,9 +4512,34 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2657
4512
|
...(input.documentBlueprintSection ? ['', input.documentBlueprintSection] : []),
|
|
2658
4513
|
...(input.documentFactObligationsSection ? ['', input.documentFactObligationsSection] : []),
|
|
2659
4514
|
...(input.assuranceProgramAuthoritySection ? ['', input.assuranceProgramAuthoritySection] : []),
|
|
4515
|
+
...(input.applicationRoleGraphSection ? ['', input.applicationRoleGraphSection] : []),
|
|
4516
|
+
/*
|
|
4517
|
+
* AFTER the obligations and the role graph, BEFORE the application's declarations: a drafter meets
|
|
4518
|
+
* what the document owes, then what its controls were MEASURED to do, then what it declares. The
|
|
4519
|
+
* order is the argument — evidence read before the obligation invites a document written around
|
|
4520
|
+
* whatever happened to be measured.
|
|
4521
|
+
*/
|
|
4522
|
+
...(input.assuranceEvidenceSection ? ['', input.assuranceEvidenceSection] : []),
|
|
4523
|
+
/*
|
|
4524
|
+
* IMMEDIATELY after the derived facts' obligations and before the application's declarations: a
|
|
4525
|
+
* person's decision outranks a derivation, and a drafter that meets it last has already written
|
|
4526
|
+
* the clause.
|
|
4527
|
+
*/
|
|
4528
|
+
...(input.authoredDocumentFactsSection ? ['', input.authoredDocumentFactsSection] : []),
|
|
2660
4529
|
...(input.compliancePrimaryFactsSection ? ['', input.compliancePrimaryFactsSection] : []),
|
|
2661
4530
|
...(input.skillCatalogSection ? ['', input.skillCatalogSection] : []),
|
|
4531
|
+
// AFTER the catalog, because the catalog says which skills exist and this says what the ones
|
|
4532
|
+
// the method chose actually require — the order a reader needs them in.
|
|
4533
|
+
...(input.skillBodiesSection ? ['', input.skillBodiesSection] : []),
|
|
2662
4534
|
...(input.coherenceSection ? ['', input.coherenceSection] : []),
|
|
4535
|
+
// Beside the coherence report, because they are the same KIND of section: arithmetic the
|
|
4536
|
+
// framework did so the model does not estimate it. Both sit after the authored truth they are
|
|
4537
|
+
// computed FROM, so a reader meets the inputs before the derivation over them.
|
|
4538
|
+
...(input.marketFitScoresSection ? ['', input.marketFitScoresSection] : []),
|
|
4539
|
+
// Beside the FIT matrix, because they are the same KIND of section: measured facts the
|
|
4540
|
+
// framework computed so the model does not estimate them, placed after the authored truth
|
|
4541
|
+
// they are derived FROM.
|
|
4542
|
+
...(input.riskSignalsSection ? ['', input.riskSignalsSection] : []),
|
|
2663
4543
|
// LAST, after every other truth: an answer the creator gave DURING this run settles whatever
|
|
2664
4544
|
// the sections above left ambiguous, and the closing word should be theirs.
|
|
2665
4545
|
...(input.clarificationAnswersSection ? ['', input.clarificationAnswersSection] : []),
|
|
@@ -2732,11 +4612,160 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2732
4612
|
* The refs come from the playbook's own declaration rather than from a parameter, because a drafting
|
|
2733
4613
|
* playbook does not carry the document it is producing — the lane picks. Declaring the documents a
|
|
2734
4614
|
* playbook may draft is the same act as declaring which families it reads.
|
|
4615
|
+
*
|
|
4616
|
+
* That sentence stood here from the beginning and described a frozen constant in this file until
|
|
4617
|
+
* 2026-09-22, which is why there could only ever be ONE drafting lane (#1453). It is now true:
|
|
4618
|
+
* `method.draftableDocumentDefinitionRefs`. A playbook declaring the context source and no refs
|
|
4619
|
+
* renders nothing — caught at authoring time by `playbook-catalog-document-declarations.test.ts`,
|
|
4620
|
+
* not here, because a run is the wrong place to discover that a lane declared no subject.
|
|
4621
|
+
*/
|
|
4622
|
+
composeDocumentBlueprintSection(playbook,
|
|
4623
|
+
/**
|
|
4624
|
+
* The drafts the application already holds, so the brief says which of the draftable documents
|
|
4625
|
+
* remain. `undefined` renders nothing about them — "not read" rather than "holds none".
|
|
2735
4626
|
*/
|
|
2736
|
-
|
|
4627
|
+
existingCandidates) {
|
|
2737
4628
|
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_BLUEPRINT))
|
|
2738
4629
|
return '';
|
|
2739
|
-
return composeAssuranceDocumentBlueprintBrief(
|
|
4630
|
+
return composeAssuranceDocumentBlueprintBrief(playbook?.method.draftableDocumentDefinitionRefs ?? [], existingCandidates?.map((candidate) => candidate.documentRef));
|
|
4631
|
+
}
|
|
4632
|
+
/**
|
|
4633
|
+
* The document facts a PERSON established, for a playbook that DRAFTS a governed document.
|
|
4634
|
+
*
|
|
4635
|
+
* The derived facts reach a drafter as a declared input; these could not reach it at all, and the cost
|
|
4636
|
+
* was measured on the first live governance draft — a clause CITING an authored fact and paraphrasing
|
|
4637
|
+
* around a value it had never read. See `composeAuthoredDocumentFactsBrief` for the quotation.
|
|
4638
|
+
*
|
|
4639
|
+
* Read from the artifact state the run already loaded rather than from disk: the authored family is one
|
|
4640
|
+
* of the families `readArtifactState` collects, so a second read could disagree with the availability
|
|
4641
|
+
* map the landing will check the draft against.
|
|
4642
|
+
*
|
|
4643
|
+
* Three states, kept apart like every sibling section: a family that parsed, a family that is absent
|
|
4644
|
+
* (the application has authored none), and a family present but unreadable.
|
|
4645
|
+
*/
|
|
4646
|
+
composeAuthoredDocumentFactsSection(playbook, state) {
|
|
4647
|
+
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.AUTHORED_DOCUMENT_FACTS))
|
|
4648
|
+
return '';
|
|
4649
|
+
const value = state.artifactsByFamily.get('document-facts-authored');
|
|
4650
|
+
if (value === undefined)
|
|
4651
|
+
return composeAuthoredDocumentFactsBrief(undefined);
|
|
4652
|
+
if (value === FILE_PRESENT_WITHOUT_VALUE) {
|
|
4653
|
+
return composeAuthoredDocumentFactsBrief(undefined, 'the family file is present but its value could not be read from here');
|
|
4654
|
+
}
|
|
4655
|
+
const parsed = ApplicationAuthoredDocumentFactSpecificationSchema.safeParse(value);
|
|
4656
|
+
return parsed.success
|
|
4657
|
+
? composeAuthoredDocumentFactsBrief(parsed.data)
|
|
4658
|
+
: composeAuthoredDocumentFactsBrief(undefined, `the landed family does not satisfy its schema (${parsed.error.issues[0]?.message ?? 'unknown issue'})`);
|
|
4659
|
+
}
|
|
4660
|
+
/**
|
|
4661
|
+
* The application's OWN committed judged runs, for a playbook drafting an INTERNAL governance document.
|
|
4662
|
+
*
|
|
4663
|
+
* ## Every absence is a different sentence, and none of them fails the run
|
|
4664
|
+
*
|
|
4665
|
+
* Three states a caller must not merge, which is why this returns a SECTION rather than a list and why
|
|
4666
|
+
* the reasons are distinct: no repository at all, a repository holding no judged run, and a repository
|
|
4667
|
+
* that could not be read. The composer says which. Silence would collapse all three into "there is
|
|
4668
|
+
* nothing to cite", indistinguishable from "nobody looked"
|
|
4669
|
+
* (`negative-results-require-a-positive-probe.md`), and a drafter that reads the third as the first
|
|
4670
|
+
* writes a document whose marks are wrong.
|
|
4671
|
+
*
|
|
4672
|
+
* Nothing here can fail a run. An unreadable repository, an unparsable run file, a missing directory:
|
|
4673
|
+
* each degrades to a section that says so, because a compliance workflow may never stand in front of
|
|
4674
|
+
* the mechanism (`application-creation-directive.md`).
|
|
4675
|
+
*
|
|
4676
|
+
* ## It reads, and never writes
|
|
4677
|
+
*
|
|
4678
|
+
* The assurance plane's one-way street is what keeps this safe (#297, and the note on
|
|
4679
|
+
* `MetaWorkflow_ContextSource.ASSURANCE_EVIDENCE`): the collectors read the product and write only
|
|
4680
|
+
* into the assurance repository, and this carries committed runs OUT of it into a brief. No creation
|
|
4681
|
+
* step gates on a verdict, and nothing here can write a verdict back.
|
|
4682
|
+
*
|
|
4683
|
+
* A run file that does not satisfy `AssuranceEvidenceRunSchema` is DROPPED rather than refused: the
|
|
4684
|
+
* repository is written by a different tool on its own cadence, and one malformed file must not
|
|
4685
|
+
* withhold the rest. How many were dropped is logged, so a systematically unreadable repository is
|
|
4686
|
+
* visible rather than silently empty.
|
|
4687
|
+
*/
|
|
4688
|
+
async composeAssuranceEvidenceSection(playbook) {
|
|
4689
|
+
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_EVIDENCE))
|
|
4690
|
+
return '';
|
|
4691
|
+
const read = this.readCommittedAssuranceRuns();
|
|
4692
|
+
return read.runs === undefined ? composeAssuranceEvidenceBrief(undefined, read.unreadableReason) : composeAssuranceEvidenceBrief(read.runs);
|
|
4693
|
+
}
|
|
4694
|
+
/**
|
|
4695
|
+
* Read this application's committed judged runs ONCE, for the two consumers that need them.
|
|
4696
|
+
*
|
|
4697
|
+
* The brief needs them RENDERED, so a drafter can choose one; the landing needs their REFS, so a
|
|
4698
|
+
* citation can be resolved. Two reads of the same directory could disagree — a run present in the
|
|
4699
|
+
* brief and absent from the refs is a citation the drafter was invited to make and the landing then
|
|
4700
|
+
* refuses — which is the shape `.claude/rules/invariant-call-site-enumeration.md` is about.
|
|
4701
|
+
*
|
|
4702
|
+
* `runs: undefined` carries the reason, and every caller must preserve the distinction: it means
|
|
4703
|
+
* nobody could look, never that the repository is empty.
|
|
4704
|
+
*/
|
|
4705
|
+
readCommittedAssuranceRuns() {
|
|
4706
|
+
const judgedRunsRoot = join(this.companionContext.saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH, ASSURANCE_JUDGED_RUNS_DIRECTORY);
|
|
4707
|
+
if (!existsSync(judgedRunsRoot)) {
|
|
4708
|
+
return {
|
|
4709
|
+
unreadableReason: `this application has no assurance repository at ${ASSURANCE_REPOSITORY_RELATIVE_PATH}/${ASSURANCE_JUDGED_RUNS_DIRECTORY}, so no cycle has recorded a judged run here`,
|
|
4710
|
+
};
|
|
4711
|
+
}
|
|
4712
|
+
try {
|
|
4713
|
+
const runs = [];
|
|
4714
|
+
let dropped = 0;
|
|
4715
|
+
// One level of objective directories, each holding one file per demand — the layout the recorder
|
|
4716
|
+
// writes. Walked rather than globbed so a stray file at either level is skipped, not parsed.
|
|
4717
|
+
for (const objectiveEntry of readdirSync(judgedRunsRoot, { withFileTypes: true })) {
|
|
4718
|
+
if (!objectiveEntry.isDirectory())
|
|
4719
|
+
continue;
|
|
4720
|
+
const objectiveDirectory = join(judgedRunsRoot, objectiveEntry.name);
|
|
4721
|
+
for (const runEntry of readdirSync(objectiveDirectory, { withFileTypes: true })) {
|
|
4722
|
+
if (!runEntry.isFile() || !runEntry.name.endsWith('.json'))
|
|
4723
|
+
continue;
|
|
4724
|
+
const parsed = AssuranceEvidenceRunSchema.safeParse(JSON.parse(readFileSync(join(objectiveDirectory, runEntry.name), 'utf8')));
|
|
4725
|
+
if (parsed.success)
|
|
4726
|
+
runs.push(parsed.data);
|
|
4727
|
+
else
|
|
4728
|
+
dropped += 1;
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4731
|
+
if (dropped > 0)
|
|
4732
|
+
this.logDebug('Assurance evidence: run file(s) did not satisfy the run schema and were dropped', { dropped, judgedRunsRoot });
|
|
4733
|
+
return { runs };
|
|
4734
|
+
}
|
|
4735
|
+
catch (error) {
|
|
4736
|
+
return { unreadableReason: `the assurance repository could not be read (${String(error)})` };
|
|
4737
|
+
}
|
|
4738
|
+
}
|
|
4739
|
+
/**
|
|
4740
|
+
* The runs a landing may resolve a citation against — the SAME read the brief renders from — each
|
|
4741
|
+
* carrying whether its judgement SETTLED the question it was run for.
|
|
4742
|
+
*
|
|
4743
|
+
* The second fact is what lets the landing refuse a citation of a run that exists and supports
|
|
4744
|
+
* nothing. It is decided HERE rather than in the validator because the verdict vocabulary lives in
|
|
4745
|
+
* this layer, and `_core` should not learn it to answer one boolean.
|
|
4746
|
+
*
|
|
4747
|
+
* CONFORMANT and OBSERVATION are the two verdicts that assert the evidence was sufficient to
|
|
4748
|
+
* conclude. INSUFFICIENT_EVIDENCE says the question was not settled, NONCONFORMITY that the control
|
|
4749
|
+
* fell short, and a DERIVED run's NOT_APPLICABLE_AS_CONFIGURED that nothing was measured at all —
|
|
4750
|
+
* none of the three can support a statement that a control operates, and all three RESOLVE, so the
|
|
4751
|
+
* landing must refuse them by verdict rather than by absence.
|
|
4752
|
+
*
|
|
4753
|
+
* Absent when the repository could not be read, which is what the landing needs to skip the
|
|
4754
|
+
* resolution rules rather than refuse every citation over a missing tool.
|
|
4755
|
+
*/
|
|
4756
|
+
resolveCommittedAssuranceRuns() {
|
|
4757
|
+
const read = this.readCommittedAssuranceRuns();
|
|
4758
|
+
if (read.runs === undefined)
|
|
4759
|
+
return {};
|
|
4760
|
+
return {
|
|
4761
|
+
committedAssuranceRuns: new Map(read.runs.map((run) => [
|
|
4762
|
+
String(run.runRef),
|
|
4763
|
+
{
|
|
4764
|
+
maySupportOperatingClaim: run.kind === AssuranceEvidenceRunKind.JUDGED
|
|
4765
|
+
&& (run.verdict === AssuranceEvidenceJudgementVerdict.CONFORMANT || run.verdict === AssuranceEvidenceJudgementVerdict.OBSERVATION),
|
|
4766
|
+
},
|
|
4767
|
+
])),
|
|
4768
|
+
};
|
|
2740
4769
|
}
|
|
2741
4770
|
/**
|
|
2742
4771
|
* The catalog's required fact NAMES, for the playbook that declares facts.
|
|
@@ -2745,11 +4774,91 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2745
4774
|
* shape of the same one: a fact producer authors no sections and needs the closed name set, and
|
|
2746
4775
|
* burying eight lines under section obligations is how a prompt section gets skimmed.
|
|
2747
4776
|
*/
|
|
2748
|
-
/**
|
|
2749
|
-
|
|
4777
|
+
/**
|
|
4778
|
+
* The closed objective/source sets a compliance programme may draw on, NARROWED to this application.
|
|
4779
|
+
*
|
|
4780
|
+
* See {@link composeAssuranceProgramAuthorityBrief}. The capability set is what makes the brief say
|
|
4781
|
+
* whether each objective can apply HERE rather than only what the basis covers in general, before
|
|
4782
|
+
* anyone is asked anything. Today only `BILLING` decides any objective; until 2026-09-14 the audit
|
|
4783
|
+
* capability was wrongly gated on `COMPLIANCE_AUDIT_TRAIL`, and Wonder CRM read 16 `NOT_APPLICABLE`
|
|
4784
|
+
* and 9 `UNDETERMINED` from it (#302).
|
|
4785
|
+
*
|
|
4786
|
+
* `enabledEngineCapabilityNames` is reused rather than re-derived: it already knows that a
|
|
4787
|
+
* capability declared `{ enabled: false }` is NOT enabled (Wonder CRM declares `MULTI_LANGUAGE`
|
|
4788
|
+
* exactly that way), and a second reader that treated presence as enablement would over-report
|
|
4789
|
+
* applicability — the dangerous direction, since it invites binding an objective the normalizer then
|
|
4790
|
+
* refuses.
|
|
4791
|
+
*/
|
|
4792
|
+
composeAssuranceProgramAuthoritySection(playbook, requiredDocumentSetInput) {
|
|
2750
4793
|
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_PROGRAM_AUTHORITY))
|
|
2751
4794
|
return '';
|
|
2752
|
-
|
|
4795
|
+
const enabledEngineCapabilities = this.readEnabledEngineCapabilities();
|
|
4796
|
+
/*
|
|
4797
|
+
* Whether a review is SCHEDULED decides whether a gap can be recorded at all: a gap carries the date its review
|
|
4798
|
+
* falls due, and an application declaring no cadence gives the run no date to stamp. Resolved through the SAME
|
|
4799
|
+
* function that supplies the normalizer's `nextReviewOn`, so the brief cannot promise what the run then refuses.
|
|
4800
|
+
*/
|
|
4801
|
+
const schedulesAssuranceReview = resolveDeclaredAssuranceNextReviewOn(this.companionContext.saasConfig?.assuranceReviewCadence, new Date().toISOString()) !== undefined;
|
|
4802
|
+
return composeAssuranceProgramAuthorityBrief({
|
|
4803
|
+
...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),
|
|
4804
|
+
...(requiredDocumentSetInput === undefined ? {} : { requiredDocumentSetInput }),
|
|
4805
|
+
schedulesAssuranceReview,
|
|
4806
|
+
});
|
|
4807
|
+
}
|
|
4808
|
+
/**
|
|
4809
|
+
* The application's enabled engine capabilities, or `undefined` when its configuration cannot be read.
|
|
4810
|
+
*
|
|
4811
|
+
* ONE reader for the two places that must agree: the authority brief that tells a producer which
|
|
4812
|
+
* objectives cannot apply here, and the compliance-programme normalizer that refuses a programme
|
|
4813
|
+
* binding one. Two readers would let the brief say APPLICABLE while the normalizer refuses.
|
|
4814
|
+
*
|
|
4815
|
+
* An UNREADABLE config yields `undefined`, never an empty set. "We could not read the application" and
|
|
4816
|
+
* "the application enables nothing" are different facts, and the second would render 16 confident
|
|
4817
|
+
* NOT_APPLICABLE verdicts — and refuse on them — from no evidence at all. A configuration that declares
|
|
4818
|
+
* no `engineCapabilities` key at all is read the same way: the blind brief and no refusal, which errs
|
|
4819
|
+
* toward refusing less rather than refusing on a capability set nobody declared.
|
|
4820
|
+
*/
|
|
4821
|
+
readEnabledEngineCapabilities() {
|
|
4822
|
+
const declared = this.companionContext.saasConfig?.engineCapabilities;
|
|
4823
|
+
if (declared === undefined)
|
|
4824
|
+
return undefined;
|
|
4825
|
+
return [...enabledEngineCapabilityNames(declared)];
|
|
4826
|
+
}
|
|
4827
|
+
/**
|
|
4828
|
+
* The application's OWN role graph — the closed set an accountable role is SELECTED from (#636).
|
|
4829
|
+
*
|
|
4830
|
+
* Replaces two free-text elicitation questions on `top_down.compliance-conception` that asked a
|
|
4831
|
+
* person to type *"the application's own role key (e.g. `APP_ADMIN_SUPER_ADMIN`)"*. The vocabulary
|
|
4832
|
+
* is a closed enum and the grants are declared in the application's own backend config, so the ask
|
|
4833
|
+
* invited a retyped — and mistypeable — value in the one artifact whose purpose is to say who is
|
|
4834
|
+
* accountable.
|
|
4835
|
+
*
|
|
4836
|
+
* BEST-EFFORT, unlike `composeCompliancePrimaryFactsSection` which fails closed, and the asymmetry
|
|
4837
|
+
* is deliberate. Primary facts are the EVIDENCE a programme reasons from: without them a producer
|
|
4838
|
+
* invents, so refusing the run is cheaper than a confident wrong artifact. The role graph is a
|
|
4839
|
+
* SELECTION AID; a run that cannot read it should say the declaration was unreadable and record an
|
|
4840
|
+
* explicit gap, which the brief instructs. Failing the run here would make a config-read hiccup
|
|
4841
|
+
* more costly than the thing it protects.
|
|
4842
|
+
*
|
|
4843
|
+
* `undefined` is passed through rather than flattened to `{}` — the brief renders "could not be
|
|
4844
|
+
* read" and "declares none" differently, because the first must never let a producer conclude an
|
|
4845
|
+
* application has no roles.
|
|
4846
|
+
*/
|
|
4847
|
+
async composeApplicationRoleGraphSection(playbook) {
|
|
4848
|
+
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.APPLICATION_ROLE_GRAPH))
|
|
4849
|
+
return '';
|
|
4850
|
+
try {
|
|
4851
|
+
const { backendConfig } = await loadBackendCompanionExports(this.companionContext);
|
|
4852
|
+
const authored = backendConfig;
|
|
4853
|
+
return composeApplicationRoleGraphBrief({
|
|
4854
|
+
...(authored.userTypes === undefined ? {} : { userTypes: authored.userTypes }),
|
|
4855
|
+
...(authored.organizationTypes === undefined ? {} : { organizationTypes: authored.organizationTypes }),
|
|
4856
|
+
});
|
|
4857
|
+
}
|
|
4858
|
+
catch {
|
|
4859
|
+
// Both absent => the brief says the configuration could not be read, which is the truthful shape.
|
|
4860
|
+
return composeApplicationRoleGraphBrief({});
|
|
4861
|
+
}
|
|
2753
4862
|
}
|
|
2754
4863
|
composeDocumentFactObligationsSection(playbook) {
|
|
2755
4864
|
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_FACT_OBLIGATIONS))
|
|
@@ -2795,6 +4904,15 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2795
4904
|
return { kind: 'UNREADABLE', reason: 'the backend configuration could not be loaded' };
|
|
2796
4905
|
}
|
|
2797
4906
|
}
|
|
4907
|
+
async composeExternalAuthenticationSection() {
|
|
4908
|
+
try {
|
|
4909
|
+
const { backendConfig } = await loadBackendCompanionExports(this.companionContext);
|
|
4910
|
+
return composeExternalAuthenticationBrief(backendConfig, listRegisteredProviderSpecifications());
|
|
4911
|
+
}
|
|
4912
|
+
catch {
|
|
4913
|
+
return composeExternalAuthenticationBrief(undefined, []);
|
|
4914
|
+
}
|
|
4915
|
+
}
|
|
2798
4916
|
async composeCompliancePrimaryFactsSection(playbook) {
|
|
2799
4917
|
if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COMPLIANCE_PRIMARY_FACTS))
|
|
2800
4918
|
return '';
|
|
@@ -2868,10 +4986,63 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2868
4986
|
* must not render identically.
|
|
2869
4987
|
*/
|
|
2870
4988
|
const saasConfig = this.companionContext.saasConfig;
|
|
2871
|
-
|
|
4989
|
+
/*
|
|
4990
|
+
* DECLARED capabilities, SPLIT BY THE SURFACE THAT REACHES THEM — and the split is the whole
|
|
4991
|
+
* difference between a true and a false sentence in a customer-facing document.
|
|
4992
|
+
*
|
|
4993
|
+
* `engineCapabilities` answers two questions at once: what the DEPLOYED application offers its
|
|
4994
|
+
* users, and what the DEVELOPMENT COMPANION reaches while building it. A privacy notice, a record
|
|
4995
|
+
* of processing and a set of service terms are about the first only — the engine's own question
|
|
4996
|
+
* for the AI fact says so in English, "resolve the fact as not applicable when no AI feature
|
|
4997
|
+
* reaches THE CONTRACTED SERVICE" — so handing a drafter one undifferentiated list invites it to
|
|
4998
|
+
* describe a build-time tool as a product feature.
|
|
4999
|
+
*
|
|
5000
|
+
* That is not hypothetical. Wonder CRM enables `AI_CODING_AGENT` and nothing else AI-shaped, and
|
|
5001
|
+
* declares `document-fact:ai-features-and-content-use` NOT_APPLICABLE because "No AI capability is
|
|
5002
|
+
* enabled in the application" — a sentence that is false as written precisely because the flat
|
|
5003
|
+
* list cannot distinguish the agent that WROTE the application from a feature the application
|
|
5004
|
+
* OFFERS.
|
|
5005
|
+
*
|
|
5006
|
+
* `ENGINE_CAPABILITY_SURFACES` is the declared authority (total over the enum, so a new capability
|
|
5007
|
+
* is a compile error until classified). Authoring-only membership is not a licence to omit: the
|
|
5008
|
+
* section reports both, LABELLED, because secure-development and supply-chain obligations are
|
|
5009
|
+
* about exactly the half a runtime document must exclude.
|
|
5010
|
+
*/
|
|
5011
|
+
const allDeclaredCapabilities = [...enabledEngineCapabilityNames(saasConfig.engineCapabilities)];
|
|
5012
|
+
const isAuthoringOnlyCapability = (capability) => Object.values(EngineCapability).includes(capability)
|
|
5013
|
+
&& engineCapabilityIsAuthoringOnly(capability);
|
|
2872
5014
|
const configuredProviderScopes = Object.entries(saasConfig.providers?.scopes ?? {})
|
|
2873
5015
|
.map(([scope, value]) => ({ scope, providerRefs: Object.keys(value?.providers ?? {}) }))
|
|
2874
5016
|
.filter((entry) => entry.providerRefs.length > 0);
|
|
5017
|
+
/*
|
|
5018
|
+
* THE CAPABILITY SAYS WHAT IT *CAN* SERVE; THE SCOPE SAYS WHAT THIS APPLICATION *DOES* WITH IT.
|
|
5019
|
+
*
|
|
5020
|
+
* The surface axis alone is not enough, and `AI_LLM` is why. It is genuinely BOTH — an application
|
|
5021
|
+
* may offer LLM features to its users, and the companion reaches an LLM to build the application —
|
|
5022
|
+
* so the capability's declaration cannot decide which is true HERE. Only the scope can: a provider
|
|
5023
|
+
* offering it under `companion` serves the build; one under any runtime scope serves users.
|
|
5024
|
+
*
|
|
5025
|
+
* So a capability is treated as reaching the contracted service unless it is EITHER authoring-only
|
|
5026
|
+
* by declaration, OR both-capable and offered by no runtime-scoped provider. A capability with no
|
|
5027
|
+
* provider at all (`ORGANIZATIONS`, `MULTI_LANGUAGE`) is unaffected: nothing scopes it, and it is
|
|
5028
|
+
* an application feature by nature.
|
|
5029
|
+
*/
|
|
5030
|
+
const capabilitiesOfferedByScope = (predicate) => new Set(Object.entries(saasConfig.providers?.scopes ?? {})
|
|
5031
|
+
.filter(([scope]) => predicate(scope))
|
|
5032
|
+
.flatMap(([, value]) => Object.values(value?.providers ?? {}))
|
|
5033
|
+
.flatMap((provider) => (provider?.engineCapabilities ?? [])));
|
|
5034
|
+
const runtimeScopedCapabilities = capabilitiesOfferedByScope((scope) => scope !== AUTHORING_PROVIDER_SCOPE);
|
|
5035
|
+
const authoringScopedCapabilities = capabilitiesOfferedByScope((scope) => scope === AUTHORING_PROVIDER_SCOPE);
|
|
5036
|
+
const reachesContractedService = (capability) => {
|
|
5037
|
+
if (isAuthoringOnlyCapability(capability))
|
|
5038
|
+
return false;
|
|
5039
|
+
// Offered ONLY by the build-time companion ⇒ this application does not serve it to anyone.
|
|
5040
|
+
if (authoringScopedCapabilities.has(capability) && !runtimeScopedCapabilities.has(capability))
|
|
5041
|
+
return false;
|
|
5042
|
+
return true;
|
|
5043
|
+
};
|
|
5044
|
+
const declaredCapabilities = allDeclaredCapabilities.filter(reachesContractedService);
|
|
5045
|
+
const authoringOnlyCapabilities = allDeclaredCapabilities.filter((capability) => !reachesContractedService(capability));
|
|
2875
5046
|
/*
|
|
2876
5047
|
* RUNTIME-SCOPED and PROFILE-ONLY are different answers, and merging them over-reports a recipient.
|
|
2877
5048
|
*
|
|
@@ -2889,9 +5060,26 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2889
5060
|
* this was the opposite. A notice that invents a recipient is as wrong as one that hides one, and it
|
|
2890
5061
|
* is harder to notice because it reads as caution.
|
|
2891
5062
|
*/
|
|
2892
|
-
|
|
5063
|
+
/*
|
|
5064
|
+
* THE COMPANION SCOPE IS NOT A RUNTIME, and this line is where that stopped being true.
|
|
5065
|
+
*
|
|
5066
|
+
* The paragraph above already reasons that Wonder CRM's `anthropic` is "a BUILD-TIME developer
|
|
5067
|
+
* tool operating on the workspace" and that reporting it as a configured external provider put a
|
|
5068
|
+
* recipient into a notice which receives nothing. That fix keyed on `providerConfigurations`
|
|
5069
|
+
* versus scopes, and it held only while CRM scoped anthropic to no scope at all. CRM now declares
|
|
5070
|
+
* it under `companion`, so the identical false sentence came back through the other door — the
|
|
5071
|
+
* union below listed it among providers that "can process this application's data".
|
|
5072
|
+
*
|
|
5073
|
+
* A provider in the `companion` scope is reached by the tool that BUILDS the application. It sees
|
|
5074
|
+
* source, specifications and generated artifacts; it is never in the path of a request from a
|
|
5075
|
+
* user. So it is reported, separately and by name, as an authoring-surface provider — never
|
|
5076
|
+
* omitted (a secure-development statement needs it) and never merged (a privacy statement must
|
|
5077
|
+
* not have it).
|
|
5078
|
+
*/
|
|
5079
|
+
const authoringScopedProviderRefs = [...new Set(configuredProviderScopes.filter((entry) => entry.scope === AUTHORING_PROVIDER_SCOPE).flatMap((entry) => entry.providerRefs))].sort();
|
|
5080
|
+
const runtimeScopedProviderRefs = runtimeScopedProviderRefsOf(saasConfig.providers);
|
|
2893
5081
|
const profileOnlyProviderRefs = Object.keys(saasConfig.providerConfigurations ?? {})
|
|
2894
|
-
.filter((providerRef) => !runtimeScopedProviderRefs.includes(providerRef))
|
|
5082
|
+
.filter((providerRef) => !runtimeScopedProviderRefs.includes(providerRef) && !authoringScopedProviderRefs.includes(providerRef))
|
|
2895
5083
|
.sort();
|
|
2896
5084
|
return [
|
|
2897
5085
|
"# The application's compliance-relevant resource declarations (read from its CODE)",
|
|
@@ -2940,18 +5128,60 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2940
5128
|
]
|
|
2941
5129
|
: ['No field is personal-by-another-declaration and uncategorized. Nothing is outstanding on this axis.']),
|
|
2942
5130
|
'',
|
|
2943
|
-
'## What this application is COMPOSED of',
|
|
5131
|
+
'## What this application IS, and what it is COMPOSED of',
|
|
5132
|
+
'',
|
|
5133
|
+
'The declared boundary first — this is the programme\'s scope, read from the application\'s own',
|
|
5134
|
+
'configuration rather than described by anyone. Name the product by its display name; name the',
|
|
5135
|
+
'services individually. A service NOT listed here is not part of this application.',
|
|
5136
|
+
'',
|
|
5137
|
+
`- Product: \`${saasConfig.name ?? 'UNDECLARED'}\`${saasConfig.displayName ? ` — "${saasConfig.displayName}"` : ''}`
|
|
5138
|
+
+ `${saasConfig.type ? `, declared type \`${saasConfig.type}\`` : ''}.`,
|
|
5139
|
+
...(saasConfig.services === undefined
|
|
5140
|
+
? ['- Services: _the configuration declares none, which for a running application means this could not be read rather than that none exist._']
|
|
5141
|
+
: [
|
|
5142
|
+
`- Services (${Object.keys(saasConfig.services).length}): `
|
|
5143
|
+
+ Object.entries(saasConfig.services)
|
|
5144
|
+
.map(([key, service]) => `\`${key}\`${service?.serviceName ? ` (${service.serviceName}` : ''}${service?.frontendType ? `, ${service.frontendType}` : ''}${service?.serviceName ? ')' : ''}`)
|
|
5145
|
+
.join(', '),
|
|
5146
|
+
]),
|
|
5147
|
+
...(saasConfig.modules === undefined || Object.keys(saasConfig.modules).length === 0
|
|
5148
|
+
? []
|
|
5149
|
+
: [
|
|
5150
|
+
`- Domain modules (${Object.keys(saasConfig.modules).length}): `
|
|
5151
|
+
+ Object.keys(saasConfig.modules).map((moduleRef) => `\`${moduleRef}\``).join(', '),
|
|
5152
|
+
]),
|
|
5153
|
+
'',
|
|
2944
5154
|
'Its declared engine capabilities and configured external providers, read from its own composition.',
|
|
2945
5155
|
'An entry that is ABSENT here is absent from the application: nothing enables it, nothing is',
|
|
2946
5156
|
'configured for it. That is a positive, checkable statement — not a gap, and not something to mark',
|
|
2947
5157
|
'as awaiting configuration. Say it plainly: "no external analytics provider is configured".',
|
|
2948
5158
|
'',
|
|
2949
5159
|
declaredCapabilities.length > 0
|
|
2950
|
-
? `Declared engine capabilities (${declaredCapabilities.length}): ${declaredCapabilities.map((capability) => `\`${capability}\``).join(', ')}`
|
|
2951
|
-
: 'Declared engine capabilities: NONE.',
|
|
5160
|
+
? `Declared engine capabilities REACHED BY THE RUNNING APPLICATION (${declaredCapabilities.length}): ${declaredCapabilities.map((capability) => `\`${capability}\``).join(', ')}`
|
|
5161
|
+
: 'Declared engine capabilities reached by the running application: NONE.',
|
|
5162
|
+
...(authoringOnlyCapabilities.length > 0
|
|
5163
|
+
? [
|
|
5164
|
+
`Declared engine capabilities reached ONLY WHILE THE APPLICATION IS BUILT (${authoringOnlyCapabilities.length}): `
|
|
5165
|
+
+ `${authoringOnlyCapabilities.map((capability) => `\`${capability}\``).join(', ')}.`,
|
|
5166
|
+
'These are development tooling. They operate on this application\'s own source and specifications,',
|
|
5167
|
+
'never on a user\'s data, and they are NOT features of the contracted service — so a privacy notice,',
|
|
5168
|
+
'a record of processing or a set of service terms must not describe them, and must not be marked',
|
|
5169
|
+
'incomplete for failing to. State plainly that the service itself does not do this.',
|
|
5170
|
+
'They ARE in scope for a statement about how the software is developed (secure development,',
|
|
5171
|
+
'change management, supply chain); say so there rather than here.',
|
|
5172
|
+
]
|
|
5173
|
+
: []),
|
|
2952
5174
|
runtimeScopedProviderRefs.length > 0
|
|
2953
5175
|
? `External providers BOUND TO A RUNTIME (${runtimeScopedProviderRefs.length}): ${runtimeScopedProviderRefs.map((providerRef) => `\`${providerRef}\``).join(', ')} — these can process this application's data.`
|
|
2954
5176
|
: 'External providers bound to a runtime: NONE — no third party receives application data through a configured provider.',
|
|
5177
|
+
...(authoringScopedProviderRefs.length > 0
|
|
5178
|
+
? [
|
|
5179
|
+
`External providers bound ONLY TO THE BUILD-TIME COMPANION (${authoringScopedProviderRefs.length}): `
|
|
5180
|
+
+ `${authoringScopedProviderRefs.map((providerRef) => `\`${providerRef}\``).join(', ')}.`,
|
|
5181
|
+
'The companion is the tool that builds this application. These providers receive its source and',
|
|
5182
|
+
'specifications; they receive NO user data and are not recipients for a privacy notice.',
|
|
5183
|
+
]
|
|
5184
|
+
: []),
|
|
2955
5185
|
...(configuredProviderScopes.length > 0
|
|
2956
5186
|
? configuredProviderScopes.map((entry) => `- scope \`${entry.scope}\`: ${entry.providerRefs.map((ref) => `\`${ref}\``).join(', ')}`)
|
|
2957
5187
|
: []),
|
|
@@ -2974,8 +5204,16 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
2974
5204
|
// Joined to the RUNTIME-SCOPED set: a profile with no runtime binding is not a recipient.
|
|
2975
5205
|
...renderProcessorRegister(runtimeScopedProviderRefs, await this.resolveProcessorRegister(), saasConfig.providerComplianceChoices),
|
|
2976
5206
|
'',
|
|
2977
|
-
|
|
5207
|
+
/*
|
|
5208
|
+
* The FULL declared set, not the runtime-filtered one. `renderAiUsePosture` performs its own
|
|
5209
|
+
* surface split — it must report the runtime AI capabilities as the service's, AND name the
|
|
5210
|
+
* build-time ones as deliberately outside it. Handing it the already-filtered list makes the
|
|
5211
|
+
* second half unreachable, so the section would silently DENY a capability the application
|
|
5212
|
+
* enables instead of placing it. Caught by the pin for exactly that sentence.
|
|
5213
|
+
*/
|
|
5214
|
+
...renderAiUsePosture(new Set(declaredCapabilities), new Set(authoringOnlyCapabilities), saasConfig.aiUsePosture),
|
|
2978
5215
|
'',
|
|
5216
|
+
...await this.composeExternalAuthenticationSection(),
|
|
2979
5217
|
...composeBillingCommercialModelBrief(await this.resolveBillingDeclaration()),
|
|
2980
5218
|
...composeOperatingJurisdictionCoverageBrief(saasConfig.operatingJurisdictions),
|
|
2981
5219
|
...renderOperatorComplianceIdentity(saasConfig.operatorComplianceIdentity),
|
|
@@ -3034,8 +5272,78 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3034
5272
|
'- A resource in the domain plan that is NOT listed below does not exist yet; its tasks are creation tasks.',
|
|
3035
5273
|
'',
|
|
3036
5274
|
...(moduleLines.length > 0 ? moduleLines : ['(no application-authored modules exist yet — every module and resource task is a creation task)']),
|
|
5275
|
+
'',
|
|
5276
|
+
...(await this.composeApplicationStoreLines()),
|
|
5277
|
+
'',
|
|
5278
|
+
...composeEngineSettingsDestinationLines(),
|
|
3037
5279
|
].join('\n');
|
|
3038
5280
|
}
|
|
5281
|
+
/**
|
|
5282
|
+
* WHICH STORE this application persists to, computed rather than looked up by the model (#1435).
|
|
5283
|
+
*
|
|
5284
|
+
* `bottom_up.build-decompose` needs it: on PostgreSQL a resource's table is built by a MIGRATION and
|
|
5285
|
+
* by nothing else, so a schema-stage task that stops at the Zod file produces a resource the
|
|
5286
|
+
* application cannot store. Its method therefore told the model to `rg -n "applicationDatabase"` —
|
|
5287
|
+
* in a STRUCTURED GENERATION, which has no shell. The instruction could never be followed, and what
|
|
5288
|
+
* happened instead is invisible: the model answered from the surrounding prose or from nothing.
|
|
5289
|
+
*
|
|
5290
|
+
* The companion already computes this exactly, for the generation-step lane
|
|
5291
|
+
* (`assessApplicationSchemaPlanObligation`, #1144), from the lockfile plus the authored
|
|
5292
|
+
* `applicationDatabase.engine`. So this is the epic's own thesis applied to one value: it was
|
|
5293
|
+
* derivable, it was already derived, and an agent was being asked to go and find it.
|
|
5294
|
+
*
|
|
5295
|
+
* UNDETERMINED is REPORTED, never resolved to a default. Guessing MongoDB leaves a PostgreSQL
|
|
5296
|
+
* application with unstorable resources; guessing PostgreSQL teaches a coding agent to carry an
|
|
5297
|
+
* obligation that does not apply. Neither is a reading of the evidence, and a plan that says it
|
|
5298
|
+
* could not tell is a plan someone can correct.
|
|
5299
|
+
*/
|
|
5300
|
+
async composeApplicationStoreLines() {
|
|
5301
|
+
const heading = '## Where this application STORES its data';
|
|
5302
|
+
/*
|
|
5303
|
+
* BEST-EFFORT, and the reason is what it sits inside: this is one section of a BRIEF, and a
|
|
5304
|
+
* throw here takes the whole composition down — the module and resource truth the planner cannot
|
|
5305
|
+
* work without goes with it. The assessment already HAS an honest answer for "could not read"
|
|
5306
|
+
* (`UNDETERMINED`), so a failure takes the same branch rather than inventing a different outcome.
|
|
5307
|
+
*/
|
|
5308
|
+
let assessment;
|
|
5309
|
+
try {
|
|
5310
|
+
assessment = await assessApplicationSchemaPlanObligation(this.companionContext.saasRoot);
|
|
5311
|
+
}
|
|
5312
|
+
catch (error) {
|
|
5313
|
+
assessment = {
|
|
5314
|
+
obligation: ApplicationSchemaPlanObligation.UNDETERMINED,
|
|
5315
|
+
reason: `the application store could not be assessed: ${describeCaughtError(error)}`,
|
|
5316
|
+
};
|
|
5317
|
+
}
|
|
5318
|
+
switch (assessment.obligation) {
|
|
5319
|
+
case ApplicationSchemaPlanObligation.ACCEPTED_PLAN:
|
|
5320
|
+
case ApplicationSchemaPlanObligation.BASELINE_OWED:
|
|
5321
|
+
return [
|
|
5322
|
+
heading,
|
|
5323
|
+
'PostgreSQL. A resource\'s table is created by a MIGRATION and by nothing else — there is no',
|
|
5324
|
+
'implicit creation — so a schema stage that stops at the Zod file has produced a resource this',
|
|
5325
|
+
'application cannot store. Bind `application-database-migrations` to EVERY schema-stage task,',
|
|
5326
|
+
'and say in the objective that the stage is finished when `wildo db diff --check` is clean.',
|
|
5327
|
+
...(assessment.obligation === ApplicationSchemaPlanObligation.BASELINE_OWED
|
|
5328
|
+
? ['No schema plan has been accepted yet, so the FIRST migration is the baseline: it renders the whole model.']
|
|
5329
|
+
: []),
|
|
5330
|
+
];
|
|
5331
|
+
case ApplicationSchemaPlanObligation.NOT_OWED:
|
|
5332
|
+
return [
|
|
5333
|
+
heading,
|
|
5334
|
+
'MongoDB. A collection appears on first write, so do NOT bind `application-database-migrations`',
|
|
5335
|
+
'and do not mention migrations in any objective — a task carrying an obligation that does not',
|
|
5336
|
+
'apply teaches the coding agent to ignore obligations.',
|
|
5337
|
+
];
|
|
5338
|
+
default:
|
|
5339
|
+
return [
|
|
5340
|
+
heading,
|
|
5341
|
+
`UNKNOWN — ${assessment.reason}.`,
|
|
5342
|
+
'Do not guess. Say in the plan that the store could not be read, and leave the migration',
|
|
5343
|
+
'obligation unbound: a wrong guess either way costs more than a stated gap.',
|
|
5344
|
+
];
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
3039
5347
|
/**
|
|
3040
5348
|
* The application-knowledge skill catalog, as the brief's own section.
|
|
3041
5349
|
*
|
|
@@ -3058,6 +5366,64 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3058
5366
|
* reader cannot use — and the compiled `INDEX.md` router itself (76KB) is larger than the entire
|
|
3059
5367
|
* rest of a decompose brief, which is why it is deliberately NOT what gets injected.
|
|
3060
5368
|
*/
|
|
5369
|
+
/**
|
|
5370
|
+
* The FULL BODY of the skills this method declares it must follow (#1435).
|
|
5371
|
+
*
|
|
5372
|
+
* `composeSkillCatalogSection` below answers "which skills exist and what does each do" — the
|
|
5373
|
+
* question a model CHOOSING between them asks. This answers the other one: a method that has
|
|
5374
|
+
* already chosen, and says "follow the `brand-logo-authoring` skill for the exact field
|
|
5375
|
+
* contracts", needs the contract. Measured 2026-09-22, three methods said exactly that and only
|
|
5376
|
+
* the purpose line ever arrived, so the model followed a document it had never been shown.
|
|
5377
|
+
*
|
|
5378
|
+
* Bounded by DECLARATION, not by total. `top_down.market-snapshot-produce` names sixteen skills
|
|
5379
|
+
* and one of them is 133KB, so "render every named skill's body" is not a mechanism — it is a
|
|
5380
|
+
* brief nobody can afford. `skillBodyRefs` is the method naming the one or two it must follow.
|
|
5381
|
+
*
|
|
5382
|
+
* A declared ref that resolves to no skill folder is NAMED in the section rather than skipped: a
|
|
5383
|
+
* method instructing the model to follow a skill that is not there is a defect the model should
|
|
5384
|
+
* report, and a silent omission would leave it following its recollection instead.
|
|
5385
|
+
*/
|
|
5386
|
+
composeSkillBodiesSection(playbook) {
|
|
5387
|
+
const refs = playbook.method?.skillBodyRefs ?? [];
|
|
5388
|
+
if (refs.length === 0)
|
|
5389
|
+
return '';
|
|
5390
|
+
const bodies = [];
|
|
5391
|
+
const unresolved = [];
|
|
5392
|
+
for (const ref of refs) {
|
|
5393
|
+
let body = null;
|
|
5394
|
+
try {
|
|
5395
|
+
body = readFrameworkKnowledgeSkillBody(ref);
|
|
5396
|
+
}
|
|
5397
|
+
catch (error) {
|
|
5398
|
+
this.logDebug('Skill body unavailable for the brief (continuing without it)', { playbookRef: playbook.ref, ref, error: String(error) });
|
|
5399
|
+
}
|
|
5400
|
+
if (body === null) {
|
|
5401
|
+
unresolved.push(ref);
|
|
5402
|
+
continue;
|
|
5403
|
+
}
|
|
5404
|
+
bodies.push([`## Skill: \`${ref}\``, body].join('\n'));
|
|
5405
|
+
}
|
|
5406
|
+
if (bodies.length === 0 && unresolved.length === 0)
|
|
5407
|
+
return '';
|
|
5408
|
+
return [
|
|
5409
|
+
'# The skills this method tells you to FOLLOW',
|
|
5410
|
+
'Your guidance names these by ref and instructs you to follow them. Their contracts are',
|
|
5411
|
+
'authoritative for the fields they describe — follow them exactly rather than recalling a',
|
|
5412
|
+
'similar shape. A skill body may point at `references/`, `examples/` or `scripts/` beside it;',
|
|
5413
|
+
'you cannot open those, so where one is the only source for a detail, say so on what you author',
|
|
5414
|
+
'rather than inventing the detail.',
|
|
5415
|
+
'',
|
|
5416
|
+
...bodies,
|
|
5417
|
+
...(unresolved.length === 0
|
|
5418
|
+
? []
|
|
5419
|
+
: [
|
|
5420
|
+
'',
|
|
5421
|
+
`_Declared and NOT FOUND: ${unresolved.map((ref) => `\`${ref}\``).join(', ')}. The method told you to_`,
|
|
5422
|
+
'_follow these and the framework could not supply them — do not substitute a remembered contract;_',
|
|
5423
|
+
'_say on what you author that the contract was unavailable._',
|
|
5424
|
+
]),
|
|
5425
|
+
].join('\n');
|
|
5426
|
+
}
|
|
3061
5427
|
composeSkillCatalogSection(playbook) {
|
|
3062
5428
|
const declaredSkillRefs = playbook.method?.skillRefs ?? [];
|
|
3063
5429
|
const routesThroughCatalog = playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.SKILL_CATALOG);
|
|
@@ -3116,13 +5482,14 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3116
5482
|
*/
|
|
3117
5483
|
composeInputTruthSection(playbook, state) {
|
|
3118
5484
|
const sections = [];
|
|
5485
|
+
const valuesByFamily = this.decidedFamilyValues(state);
|
|
3119
5486
|
for (const declaredInput of playbook.inputs ?? []) {
|
|
3120
|
-
const value =
|
|
3121
|
-
if (value === undefined || value === null
|
|
5487
|
+
const value = valuesByFamily[declaredInput.family];
|
|
5488
|
+
if (value === undefined || value === null)
|
|
3122
5489
|
continue;
|
|
3123
|
-
// The playbook's
|
|
3124
|
-
// which is what every playbook did before
|
|
3125
|
-
sections.push(`## Input family: ${declaredInput.family}\n${
|
|
5490
|
+
// The playbook's DECLARATION decides how much of the family it reads — its aspects, or its intent.
|
|
5491
|
+
// Absent = everything, which is what every playbook did before either existed.
|
|
5492
|
+
sections.push(`## Input family: ${declaredInput.family}\n${renderDeclaredInputFamily(declaredInput, value, valuesByFamily)}`);
|
|
3126
5493
|
}
|
|
3127
5494
|
if (sections.length === 0)
|
|
3128
5495
|
return '';
|
|
@@ -3134,6 +5501,27 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3134
5501
|
sections.join('\n\n'),
|
|
3135
5502
|
].join('\n');
|
|
3136
5503
|
}
|
|
5504
|
+
/**
|
|
5505
|
+
* Every family value this run loaded, as the decided-aspect index reads it (#1420).
|
|
5506
|
+
*
|
|
5507
|
+
* One construction for the generation brief and the assessment judge, so the two resolve an input —
|
|
5508
|
+
* including `document-facts`, which carries the computed overlay — to the same value, and a RELATED
|
|
5509
|
+
* walk can reach any family the run read rather than only the declared ones. A file-only marker has
|
|
5510
|
+
* no value to index and is left out.
|
|
5511
|
+
*/
|
|
5512
|
+
decidedFamilyValues(state) {
|
|
5513
|
+
const values = {};
|
|
5514
|
+
for (const [family, value] of state.artifactsByFamily) {
|
|
5515
|
+
if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE)
|
|
5516
|
+
continue;
|
|
5517
|
+
values[family] = value;
|
|
5518
|
+
}
|
|
5519
|
+
const documentFacts = this.documentFactsWithComputedOverlay(state);
|
|
5520
|
+
if (documentFacts !== undefined && documentFacts !== null && documentFacts !== FILE_PRESENT_WITHOUT_VALUE) {
|
|
5521
|
+
values['document-facts'] = documentFacts;
|
|
5522
|
+
}
|
|
5523
|
+
return values;
|
|
5524
|
+
}
|
|
3137
5525
|
/**
|
|
3138
5526
|
* The provider boundary.
|
|
3139
5527
|
*
|
|
@@ -3164,24 +5552,46 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3164
5552
|
* `WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER` env override, and a companion restart (the counter is a
|
|
3165
5553
|
* runtime cache — losing it costs nothing but the count).
|
|
3166
5554
|
*/
|
|
3167
|
-
/**
|
|
3168
|
-
* The composite executing in THIS process, if any.
|
|
3169
|
-
*
|
|
3170
|
-
* In memory on purpose, and it is the half a checkpoint cannot supply: a checkpoint appears only
|
|
3171
|
-
* after the first iteration COMPLETES, so a run that is three minutes into its first agent turn —
|
|
3172
|
-
* the most expensive moment to interrupt — is on disk nowhere. This is what lets a reader see it.
|
|
3173
|
-
*
|
|
3174
|
-
* Its counterpart is the checkpoint listing, which reports runs whose process is GONE. Together
|
|
3175
|
-
* they answer the two different questions a developer has before saving a file: is something
|
|
3176
|
-
* running right now, and did something die that I could resume.
|
|
3177
|
-
*/
|
|
3178
|
-
activeChoreography = null;
|
|
3179
5555
|
/** What is running in this process, and what died leaving a resumable checkpoint. */
|
|
3180
5556
|
async readRunsInFlight() {
|
|
5557
|
+
/*
|
|
5558
|
+
* READ FROM THE ROWS (#1362). Every run is an execution of `meta-workflows.system`, so the runs
|
|
5559
|
+
* that are in flight and the last outcome per playbook are a projection of that table — and
|
|
5560
|
+
* survive the companion restart that emptied the two maps this used to answer from. The maps
|
|
5561
|
+
* remain as what they always honestly were: the full result envelope of a run THIS process ran,
|
|
5562
|
+
* handed back to a poller as an enrichment of its row.
|
|
5563
|
+
*/
|
|
5564
|
+
const liveResults = new Map([...this.lastCompletedDetachedRuns.values()].map((record) => [record.runId, record.result]));
|
|
5565
|
+
let fromRows;
|
|
5566
|
+
let lastLoop = null;
|
|
5567
|
+
try {
|
|
5568
|
+
const executions = await this.executions.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: 200 }));
|
|
5569
|
+
fromRows = projectPlaybookRunRecords(executions, (runId) => liveResults.get(runId));
|
|
5570
|
+
lastLoop = projectLastPlaybookLoop(executions);
|
|
5571
|
+
}
|
|
5572
|
+
catch (error) {
|
|
5573
|
+
/*
|
|
5574
|
+
* A STATUS READ does not fail because the actor plane is unreachable — the posture
|
|
5575
|
+
* `listInterruptedChoreographies` already takes. It answers what THIS process knows, which is
|
|
5576
|
+
* exactly what the read answered before #1362, and says so in the log: a poller watching its
|
|
5577
|
+
* own submission still sees it, and nothing here claims to know about runs it cannot read.
|
|
5578
|
+
*/
|
|
5579
|
+
this.logDebug('The actor plane could not be read; answering the runs this process knows', { error: describeCaughtError(error) });
|
|
5580
|
+
fromRows = { running: [...this.runningDetachedRuns.values()], settled: [...this.lastCompletedDetachedRuns.values()] };
|
|
5581
|
+
}
|
|
5582
|
+
/*
|
|
5583
|
+
* `running` is the COMPOSITE holding the single-flight subject — read from its row since #1361,
|
|
5584
|
+
* where it used to be an in-memory marker only the process driving the composite could see. It
|
|
5585
|
+
* answers a different question from `runningDetached` ("what did I submit that has not answered
|
|
5586
|
+
* yet"), so the composite is reported under it alone.
|
|
5587
|
+
*/
|
|
5588
|
+
const composite = fromRows.running.find((run) => run.exclusiveSubject === MetaWorkflowsExclusiveSubject.COMPOSITE) ?? null;
|
|
3181
5589
|
return {
|
|
3182
|
-
running:
|
|
3183
|
-
|
|
3184
|
-
|
|
5590
|
+
running: composite ? { playbookRef: composite.playbookRef, startedAt: composite.startedAt } : null,
|
|
5591
|
+
runningDetached: fromRows.running.filter((run) => run !== composite).map(({ exclusiveSubject: _subject, ...run }) => run),
|
|
5592
|
+
interrupted: await this.listInterruptedChoreographies(),
|
|
5593
|
+
lastCompleted: fromRows.settled,
|
|
5594
|
+
lastLoop,
|
|
3185
5595
|
};
|
|
3186
5596
|
}
|
|
3187
5597
|
/**
|
|
@@ -3193,6 +5603,129 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3193
5603
|
* history — the traces are the history.
|
|
3194
5604
|
*/
|
|
3195
5605
|
lastCompletedDetachedRuns = new Map();
|
|
5606
|
+
/**
|
|
5607
|
+
* The detached runs THIS PROCESS is executing right now, keyed by playbook ref.
|
|
5608
|
+
*
|
|
5609
|
+
* `running` beside it is the CHOREOGRAPHY single-flight marker and answers a different question — it
|
|
5610
|
+
* is set by a composite while it drives its children, and an ordinary detached run never touches it.
|
|
5611
|
+
* So for every non-composite playbook the submission note's promise ("`running` while in flight") was
|
|
5612
|
+
* false: a caller polling a `bottom_up.build-dispatch` run saw `running: null` and an empty
|
|
5613
|
+
* `lastCompleted`, which is exactly what a run that was never submitted looks like.
|
|
5614
|
+
*
|
|
5615
|
+
* That was nearly invisible while a build dispatch returned at ADMISSION and the whole run lasted 25
|
|
5616
|
+
* seconds. Now that the run waits for the coding agent, the window IS the run — minutes — and a
|
|
5617
|
+
* companion restart in that window leaves the operator polling two empty fields forever.
|
|
5618
|
+
*
|
|
5619
|
+
* In memory, deliberately, like its completed counterpart: this is a per-run cache, and a restart
|
|
5620
|
+
* costs the summary and no fact. What the restart must not cost is the ABILITY TO TELL, which is why
|
|
5621
|
+
* absence from both fields now has a stated meaning in the note rather than being ambiguous.
|
|
5622
|
+
*/
|
|
5623
|
+
runningDetachedRuns = new Map();
|
|
5624
|
+
/** The interval refreshing {@link PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH}; null when nothing is in flight. */
|
|
5625
|
+
playbookRunHeartbeatTimer = null;
|
|
5626
|
+
/**
|
|
5627
|
+
* Start or stop the run-tail heartbeat to match what is in flight.
|
|
5628
|
+
*
|
|
5629
|
+
* Called on every change to `runningDetachedRuns`, so the file exists exactly while a detached run
|
|
5630
|
+
* does. Best-effort throughout: a companion that cannot write this file must still run playbooks —
|
|
5631
|
+
* the consequence is the supervisor restarting during a tail, which is what happened before the
|
|
5632
|
+
* signal existed, never a refusal to work.
|
|
5633
|
+
*/
|
|
5634
|
+
syncPlaybookRunHeartbeat() {
|
|
5635
|
+
const heartbeatPath = join(this.companionContext.saasRoot, PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH);
|
|
5636
|
+
const shouldBeat = this.runningDetachedRuns.size > 0;
|
|
5637
|
+
/*
|
|
5638
|
+
* TRUTHINESS, not `=== null`: a service built through `Object.create(prototype)` — which the tests
|
|
5639
|
+
* and several harnesses do — never runs the field initializer, so the timer reads `undefined` and a
|
|
5640
|
+
* null-check would silently never beat. The predicate must not depend on an initializer having run.
|
|
5641
|
+
*/
|
|
5642
|
+
if (shouldBeat && !this.playbookRunHeartbeatTimer) {
|
|
5643
|
+
const touch = () => {
|
|
5644
|
+
try {
|
|
5645
|
+
mkdirSync(path.dirname(heartbeatPath), { recursive: true });
|
|
5646
|
+
writeFileSync(heartbeatPath, new Date().toISOString(), 'utf8');
|
|
5647
|
+
}
|
|
5648
|
+
catch (error) {
|
|
5649
|
+
this.logDebug('Playbook-run heartbeat write failed (non-fatal)', { error: String(error) });
|
|
5650
|
+
}
|
|
5651
|
+
};
|
|
5652
|
+
touch();
|
|
5653
|
+
this.playbookRunHeartbeatTimer = setInterval(touch, PLAYBOOK_RUN_HEARTBEAT_INTERVAL_MS);
|
|
5654
|
+
// Never keep the process alive for a heartbeat: it describes work, it is not work.
|
|
5655
|
+
this.playbookRunHeartbeatTimer.unref?.();
|
|
5656
|
+
return;
|
|
5657
|
+
}
|
|
5658
|
+
if (!shouldBeat && this.playbookRunHeartbeatTimer) {
|
|
5659
|
+
clearInterval(this.playbookRunHeartbeatTimer);
|
|
5660
|
+
this.playbookRunHeartbeatTimer = null;
|
|
5661
|
+
// REMOVED rather than left to go stale: the supervisor would hold a restart for one more window
|
|
5662
|
+
// over a run that has finished, and the file is the only thing saying otherwise.
|
|
5663
|
+
try {
|
|
5664
|
+
rmSync(heartbeatPath, { force: true });
|
|
5665
|
+
}
|
|
5666
|
+
catch (error) {
|
|
5667
|
+
this.logDebug('Playbook-run heartbeat removal failed (non-fatal)', { error: String(error) });
|
|
5668
|
+
}
|
|
5669
|
+
}
|
|
5670
|
+
}
|
|
5671
|
+
/**
|
|
5672
|
+
* Judge one SETTLED coding run against the dispatching playbook's own compiled treatment.
|
|
5673
|
+
*
|
|
5674
|
+
* The subject is not an artifact family — nothing was landed into the specifications package — it is
|
|
5675
|
+
* the run's sealed evidence, which is what every criterion of `dispatch-outcome-sound` actually names:
|
|
5676
|
+
* the host's disposition, the verification gate, the change-set summary and the recorded out-of-scope
|
|
5677
|
+
* paths. `runPlaybookJudge` takes its subjects as `{ family, value }` pairs and renders the family as a
|
|
5678
|
+
* heading, so the constant below is the SUBJECT'S NAME rather than a specification family, and it is
|
|
5679
|
+
* named once here instead of written as a literal at the call.
|
|
5680
|
+
*
|
|
5681
|
+
* The task's declared scope travels beside the outcome deliberately: the second criterion asks whether
|
|
5682
|
+
* the change stayed inside the task's module/resource/stage, and a judge shown only the outcome would
|
|
5683
|
+
* have to take the scope from the same evidence it is meant to check.
|
|
5684
|
+
*
|
|
5685
|
+
* Every refusal is a SKIP carrying its reason, never a throw: a playbook with no treatment, a treatment
|
|
5686
|
+
* that does not satisfy its contract, and a judge that cannot answer are all things an operator should
|
|
5687
|
+
* read in the response — and none of them is a reason to fail a dispatch that already did its work.
|
|
5688
|
+
*/
|
|
5689
|
+
async judgeSettledCodingRun(input) {
|
|
5690
|
+
if (!input.hydrated.evaluationTreatment) {
|
|
5691
|
+
return { judged: false, skipped: 'This playbook carries no compiled evaluation treatment.' };
|
|
5692
|
+
}
|
|
5693
|
+
const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(input.hydrated.evaluationTreatment.value);
|
|
5694
|
+
if (!treatment.success) {
|
|
5695
|
+
return {
|
|
5696
|
+
judged: false,
|
|
5697
|
+
skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}`,
|
|
5698
|
+
};
|
|
5699
|
+
}
|
|
5700
|
+
return runPlaybookJudge({
|
|
5701
|
+
playbookRef: input.playbookRef,
|
|
5702
|
+
treatment: treatment.data,
|
|
5703
|
+
landed: [{
|
|
5704
|
+
family: SETTLED_CODING_RUN_JUDGE_SUBJECT,
|
|
5705
|
+
value: {
|
|
5706
|
+
...input.outcome,
|
|
5707
|
+
/*
|
|
5708
|
+
* The ref the PLAN dispatched, kept beside the ref the durable ROW records. They should be the
|
|
5709
|
+
* same string; the treatment's INDETERMINATE guidance is for the case where the evidence "does
|
|
5710
|
+
* not bind the dispatched task", and a judge given only one of them could never see that.
|
|
5711
|
+
*/
|
|
5712
|
+
dispatchedTaskRef: input.plan.taskRef,
|
|
5713
|
+
dispatchedTargetKind: input.plan.targetKind,
|
|
5714
|
+
/*
|
|
5715
|
+
* WHAT THE TASK ASKED FOR (#1432). The treatment asks whether the run implemented the
|
|
5716
|
+
* dispatched task's target and stage, and the subject carried the outcome, the ref, the
|
|
5717
|
+
* target kind and the mutation scope — everything about the dispatch except the work. A
|
|
5718
|
+
* judge given a ref and a settled status can only grade whether the agent exited cleanly.
|
|
5719
|
+
*/
|
|
5720
|
+
dispatchedObjective: input.plan.objective,
|
|
5721
|
+
dispatchedProducts: input.plan.produces ?? [],
|
|
5722
|
+
declaredMutationScope: input.plan.allowedPathPrefixes ?? [],
|
|
5723
|
+
},
|
|
5724
|
+
}],
|
|
5725
|
+
model: this.buildGenerationPort(),
|
|
5726
|
+
...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-${input.playbookRef}`) } : {}),
|
|
5727
|
+
});
|
|
5728
|
+
}
|
|
3196
5729
|
/**
|
|
3197
5730
|
* Submit a run and return IMMEDIATELY — the async half of #265's envelope fix.
|
|
3198
5731
|
*
|
|
@@ -3203,35 +5736,147 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3203
5736
|
* `readRunsInFlight`, whose `lastCompleted` carries the outcome (including a failure — an async
|
|
3204
5737
|
* submission must never turn an error into silence).
|
|
3205
5738
|
*/
|
|
3206
|
-
submitPlaybookRunDetached(input) {
|
|
5739
|
+
async submitPlaybookRunDetached(input) {
|
|
5740
|
+
return this.submitPlaybookRoundDetached(input, 1);
|
|
5741
|
+
}
|
|
5742
|
+
/**
|
|
5743
|
+
* One ROUND of a detached run. A composite that ends on its breaker is followed by the next round
|
|
5744
|
+
* when {@link decideCompositeRoundRelaunch} says so (#1542), which is why the round number travels.
|
|
5745
|
+
*/
|
|
5746
|
+
async submitPlaybookRoundDetached(input, round) {
|
|
3207
5747
|
const startedAt = new Date().toISOString();
|
|
3208
|
-
|
|
3209
|
-
|
|
5748
|
+
const isComposite = Boolean(getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook?.method?.choreography);
|
|
5749
|
+
let tasksLandedBefore;
|
|
5750
|
+
/*
|
|
5751
|
+
* OPENED before it is answered: the caller must name the run before awaiting it, and the run's
|
|
5752
|
+
* only name is the execution id the actor plane assigns (#1358). So the execution is opened here
|
|
5753
|
+
* — which is also where an unreachable store refuses, as a 4xx/5xx on THIS request rather than a
|
|
5754
|
+
* run that silently never happened — and the work is completed detached against the opened ids.
|
|
5755
|
+
* Until 2026-09-20 this minted its own id and handed it in; a submission and its row now share one.
|
|
5756
|
+
*/
|
|
5757
|
+
const opened = await this.actorsSystem.openActorExecution(this.buildActorExecutionRequest(input))
|
|
5758
|
+
.catch(async (error) => { throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, input.session); });
|
|
5759
|
+
const runId = opened.executionId;
|
|
5760
|
+
// Registered BEFORE the run is started, so a caller that polls immediately cannot see a gap in
|
|
5761
|
+
// which its own submission is reported nowhere.
|
|
5762
|
+
this.runningDetachedRuns.set(input.playbookRef, {
|
|
5763
|
+
runId,
|
|
5764
|
+
playbookRef: input.playbookRef,
|
|
5765
|
+
startedAt,
|
|
5766
|
+
...(input.session ? { traceSessionId: input.session.sessionId } : {}),
|
|
5767
|
+
...(input.conversationId ? { conversationId: input.conversationId } : {}),
|
|
5768
|
+
});
|
|
5769
|
+
this.syncPlaybookRunHeartbeat();
|
|
5770
|
+
void this.actorsSystem
|
|
5771
|
+
.completeActorExecution(opened, async () => {
|
|
5772
|
+
// Where the build stood BEFORE the round, so its end can tell a round that moved from one that did not.
|
|
5773
|
+
if (isComposite)
|
|
5774
|
+
tasksLandedBefore = (await this.buildDispatch.resolveBuildExecutionProgress().catch(() => undefined))?.landedTasks;
|
|
5775
|
+
return this.executePlaybookRun({ ...input, runId });
|
|
5776
|
+
}, input.session, this.playbookRunOptionsFor(() => runId))
|
|
5777
|
+
.then(async (result) => {
|
|
5778
|
+
this.runningDetachedRuns.delete(input.playbookRef);
|
|
5779
|
+
this.syncPlaybookRunHeartbeat();
|
|
5780
|
+
/*
|
|
5781
|
+
* A SUSPENSION is not a completion. The run stopped to ask and is waiting for a person; the
|
|
5782
|
+
* resume route carries its own handle, which is not this submission's `runId`.
|
|
5783
|
+
*/
|
|
5784
|
+
const suspended = typeof result === 'object' && result !== null
|
|
5785
|
+
&& result.status === 'awaiting_creator_input'
|
|
5786
|
+
? result
|
|
5787
|
+
: undefined;
|
|
3210
5788
|
this.lastCompletedDetachedRuns.set(input.playbookRef, {
|
|
5789
|
+
runId,
|
|
3211
5790
|
playbookRef: input.playbookRef,
|
|
3212
5791
|
startedAt,
|
|
3213
5792
|
finishedAt: new Date().toISOString(),
|
|
3214
5793
|
ok: true,
|
|
3215
5794
|
result,
|
|
5795
|
+
// The same measurement the row carries (#1507), so a read that falls back to this record when
|
|
5796
|
+
// the actor plane is unreachable does not report a measured run as unmeasured.
|
|
5797
|
+
...this.detachedRecordMeasurement(result, (measurement) => readPlaybookRunMeasurement(summarizePlaybookRunResult(result, measurement))),
|
|
5798
|
+
...(input.session ? { traceSessionId: input.session.sessionId } : {}),
|
|
5799
|
+
...(input.conversationId ? { conversationId: input.conversationId } : {}),
|
|
5800
|
+
...(suspended === undefined ? {} : {
|
|
5801
|
+
awaitingCreatorInput: {
|
|
5802
|
+
runId: String(suspended['runId']),
|
|
5803
|
+
family: String(suspended['family']),
|
|
5804
|
+
round: Number(suspended['round']),
|
|
5805
|
+
},
|
|
5806
|
+
}),
|
|
3216
5807
|
});
|
|
5808
|
+
await this.continueCompositeChain(input, round, runId, tasksLandedBefore, result);
|
|
3217
5809
|
})
|
|
3218
5810
|
.catch((error) => {
|
|
5811
|
+
this.runningDetachedRuns.delete(input.playbookRef);
|
|
5812
|
+
this.syncPlaybookRunHeartbeat();
|
|
3219
5813
|
this.lastCompletedDetachedRuns.set(input.playbookRef, {
|
|
5814
|
+
runId,
|
|
3220
5815
|
playbookRef: input.playbookRef,
|
|
3221
5816
|
startedAt,
|
|
3222
5817
|
finishedAt: new Date().toISOString(),
|
|
3223
5818
|
ok: false,
|
|
3224
5819
|
error: error instanceof Error ? error.message : JSON.stringify(error)?.slice(0, 500) ?? 'unknown',
|
|
5820
|
+
...(() => {
|
|
5821
|
+
const measurement = this.measurementOfFailure(error, runId);
|
|
5822
|
+
this.failedRunMeasurements.delete(runId);
|
|
5823
|
+
return measurement ? { measurement } : {};
|
|
5824
|
+
})(),
|
|
5825
|
+
...(input.session ? { traceSessionId: input.session.sessionId } : {}),
|
|
5826
|
+
...(input.conversationId ? { conversationId: input.conversationId } : {}),
|
|
3225
5827
|
});
|
|
3226
5828
|
});
|
|
3227
5829
|
return {
|
|
3228
5830
|
accepted: false,
|
|
3229
5831
|
async: true,
|
|
5832
|
+
runId,
|
|
3230
5833
|
playbookRef: input.playbookRef,
|
|
3231
|
-
note:
|
|
3232
|
-
+ '
|
|
5834
|
+
note: `Submitted as runId ${runId} — the id of its execution on the actor plane. Poll GET /playbooks/runs `
|
|
5835
|
+
+ 'and MATCH THAT ID: it is in `runningDetached` while the run executes, then in `lastCompleted` with the '
|
|
5836
|
+
+ 'outcome. `lastCompleted` answers ONE record per playbook ref, the most recent, so an entry carrying a '
|
|
5837
|
+
+ "DIFFERENT runId is a previous run's outcome and says nothing about yours. Validation failures (an "
|
|
5838
|
+
+ 'unanswered elicitation, an ineligible playbook) surface there too, not as an HTTP error. Both fields are '
|
|
5839
|
+
+ 'read from the actor plane, so they survive a companion restart: a run the restart interrupted is in '
|
|
5840
|
+
+ '`lastCompleted` with `ok: false` and says the host stopped. After a restart `result` carries the '
|
|
5841
|
+
+ "run's summary (accepted, judge verdict) rather than the full envelope, which only the process that ran it holds. "
|
|
5842
|
+
+ '(`running` is the choreography single-flight marker and stays null for an ordinary run.)',
|
|
3233
5843
|
};
|
|
3234
5844
|
}
|
|
5845
|
+
/**
|
|
5846
|
+
* After a detached COMPOSITE settles: start its next round, or record why the chain ends (#1542).
|
|
5847
|
+
*
|
|
5848
|
+
* Recorded either way on the run's settled record as `chain`, so "why did the build stop here" has an
|
|
5849
|
+
* answer on the same read that says it stopped. A relaunch is a new submission like any other — it
|
|
5850
|
+
* opens its own execution, appears in `runningDetached`, and is refused by the composite single-flight
|
|
5851
|
+
* guard like a person's would be. Best-effort: nothing here may turn a settled run into a failed one.
|
|
5852
|
+
*/
|
|
5853
|
+
async continueCompositeChain(input, round, runId, tasksLandedBefore, result) {
|
|
5854
|
+
const composite = result;
|
|
5855
|
+
if (composite?.choreographed !== true || composite.stoppedBecause === undefined)
|
|
5856
|
+
return;
|
|
5857
|
+
try {
|
|
5858
|
+
const buildProgressAfter = await this.buildDispatch.resolveBuildExecutionProgress().catch(() => undefined);
|
|
5859
|
+
const decision = decideCompositeRoundRelaunch({
|
|
5860
|
+
posture: APPLICATION_CREATION_AUTONOMY_POSTURE,
|
|
5861
|
+
dryRun: input.dryRun === true,
|
|
5862
|
+
stoppedBecause: composite.stoppedBecause,
|
|
5863
|
+
round,
|
|
5864
|
+
familiesLanded: composite.landed?.length ?? 0,
|
|
5865
|
+
...(tasksLandedBefore === undefined ? {} : { tasksLandedBefore }),
|
|
5866
|
+
...(buildProgressAfter === undefined ? {} : { buildProgressAfter }),
|
|
5867
|
+
});
|
|
5868
|
+
const record = this.lastCompletedDetachedRuns.get(input.playbookRef);
|
|
5869
|
+
if (record?.runId === runId)
|
|
5870
|
+
this.lastCompletedDetachedRuns.set(input.playbookRef, { ...record, chain: { round, decision } });
|
|
5871
|
+
this.logDebug('Composite round settled', { playbookRef: input.playbookRef, round, decision });
|
|
5872
|
+
if (decision !== CompositeRoundRelaunchDecision.RELAUNCH)
|
|
5873
|
+
return;
|
|
5874
|
+
await this.submitPlaybookRoundDetached(input, round + 1);
|
|
5875
|
+
}
|
|
5876
|
+
catch (error) {
|
|
5877
|
+
this.logDebug('Composite round relaunch failed (non-fatal)', { playbookRef: input.playbookRef, round, error: error instanceof Error ? error.message : JSON.stringify(error)?.slice(0, 500) });
|
|
5878
|
+
}
|
|
5879
|
+
}
|
|
3235
5880
|
/**
|
|
3236
5881
|
* Every run waiting for its creator to answer — a THIRD state, and neither of the two above.
|
|
3237
5882
|
*
|
|
@@ -3245,8 +5890,35 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3245
5890
|
* three would say a suspended run is a kind of in-flight one, and the difference is exactly what a
|
|
3246
5891
|
* reader needs — one of the three is waiting for THEM.
|
|
3247
5892
|
*/
|
|
3248
|
-
async readSuspendedRuns() {
|
|
3249
|
-
|
|
5893
|
+
async readSuspendedRuns(session) {
|
|
5894
|
+
// The executions of the meta-workflows system that are WAITING (#1360) — durable rows, so a
|
|
5895
|
+
// companion restart loses none of them, which the checkpoint directory also gave and the run
|
|
5896
|
+
// records beside it never did.
|
|
5897
|
+
const waiting = await this.actorsSystem.listSuspendedActorExecutions(META_WORKFLOWS_SYSTEM_REF, session);
|
|
5898
|
+
const suspended = [];
|
|
5899
|
+
const unreadable = [];
|
|
5900
|
+
for (const row of waiting) {
|
|
5901
|
+
const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(row.checkpoint?.context);
|
|
5902
|
+
if (!parsed.success || !row.suspension) {
|
|
5903
|
+
// REPORTED, not skipped: a waiting run nothing can resume is a fact a reader must be able to see.
|
|
5904
|
+
unreadable.push(row._id);
|
|
5905
|
+
continue;
|
|
5906
|
+
}
|
|
5907
|
+
const answered = new Set(parsed.data.priorAnswers.map((answer) => answer.ref));
|
|
5908
|
+
suspended.push({
|
|
5909
|
+
runId: row._id,
|
|
5910
|
+
playbookRef: parsed.data.playbookRef,
|
|
5911
|
+
family: parsed.data.family,
|
|
5912
|
+
suspendedAt: row.suspension.suspendedAt,
|
|
5913
|
+
round: parsed.data.round,
|
|
5914
|
+
dryRun: parsed.data.dryRun,
|
|
5915
|
+
// The checkpoint stays cumulative; an answer form needs only questions still outstanding.
|
|
5916
|
+
requests: parsed.data.requests.filter((request) => !answered.has(request.ref)),
|
|
5917
|
+
});
|
|
5918
|
+
}
|
|
5919
|
+
suspended.sort((left, right) => right.suspendedAt.localeCompare(left.suspendedAt));
|
|
5920
|
+
unreadable.sort();
|
|
5921
|
+
return { suspended, unreadable };
|
|
3250
5922
|
}
|
|
3251
5923
|
modelCallBreaker = { hour: '', calls: 0, providerBudgetNoted: false };
|
|
3252
5924
|
assertPlaybookModelCallBreaker() {
|
|
@@ -3355,6 +6027,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3355
6027
|
briefContext: prompt,
|
|
3356
6028
|
label,
|
|
3357
6029
|
producer: {
|
|
6030
|
+
agentRef: META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF,
|
|
3358
6031
|
produceInitial: async () => candidates[cursor++],
|
|
3359
6032
|
produceRevision: async (parent, revisionPrompt) => {
|
|
3360
6033
|
const revised = await base.generate({
|
|
@@ -3380,7 +6053,9 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3380
6053
|
agentRef: META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF,
|
|
3381
6054
|
initiator: {},
|
|
3382
6055
|
invocationContext: [],
|
|
3383
|
-
|
|
6056
|
+
// `includeRejectedAnswer`: a rejected answer comes back as text, so the retry can correct it in place
|
|
6057
|
+
// instead of redrafting blind (#1143). It is a payload like any answer, never telemetry or a log line.
|
|
6058
|
+
input: { prompt, schema, includeRejectedAnswer: true },
|
|
3384
6059
|
output: { object: undefined },
|
|
3385
6060
|
executionContext: {},
|
|
3386
6061
|
artifactBindings: [],
|
|
@@ -3405,11 +6080,27 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
|
|
|
3405
6080
|
* comment describing the defect it did not close, and was found on 2026-08-29 by a
|
|
3406
6081
|
* `document-facts` run whose retry prompt still said "<root>: expected object, received
|
|
3407
6082
|
* undefined" while the companion log printed the four exact paths the model had got wrong.
|
|
6083
|
+
*
|
|
6084
|
+
* READ AND RENDERED BY THE ENGINE'S OWN FUNCTIONS, never by a shape written out here. This site
|
|
6085
|
+
* held a hand-written cast and a hand-written hint list, and each field the engine added to an
|
|
6086
|
+
* issue afterwards reached the engine's renderer and not this copy — the paths in 2026-08-29,
|
|
6087
|
+
* `expected` in 2026-09-13, a `custom` refinement's message in 2026-09-16, every one of them
|
|
6088
|
+
* costing live runs while the two formatters sat forty lines apart in different packages.
|
|
6089
|
+
* `readStructuredGenerationFailure` parses against the schema and
|
|
6090
|
+
* `describeStructuredValidationIssue` is THE issue renderer, so a fourth field arrives here for
|
|
6091
|
+
* free.
|
|
6092
|
+
*/
|
|
6093
|
+
const failure = readStructuredGenerationFailure(response.executionContext);
|
|
6094
|
+
/*
|
|
6095
|
+
* The suffix is this caller's framing rather than the issue's: these findings are fed BACK TO THE
|
|
6096
|
+
* MODEL as the retry's corrections, and a model that is told only "sharedResponsibility: custom
|
|
6097
|
+
* (…)" cannot tell our runtime validator's refusal from the provider's.
|
|
3408
6098
|
*/
|
|
3409
|
-
const
|
|
3410
|
-
const
|
|
6099
|
+
const generationFindings = (failure?.validationIssues ?? []).map((issue) => `${describeStructuredValidationIssue(issue)} — rejected by the provider's schema validation`);
|
|
6100
|
+
const rejectedAnswer = response.output?.rejectedAnswer;
|
|
3411
6101
|
return {
|
|
3412
6102
|
output: response.output?.object,
|
|
6103
|
+
...(typeof rejectedAnswer === 'string' ? { rejectedAnswer } : {}),
|
|
3413
6104
|
...(generationFindings.length > 0
|
|
3414
6105
|
? { generationFindings }
|
|
3415
6106
|
: failure?.message
|
|
@@ -3433,9 +6124,13 @@ PlaybookRunCompanionService = PlaybookRunCompanionService_1 = __decorate([
|
|
|
3433
6124
|
__param(8, inject(COMPANION_SERVICE_TYPES.GitChangeSetService)),
|
|
3434
6125
|
__param(9, inject(COMPANION_SERVICE_TYPES.IntrospectionService)),
|
|
3435
6126
|
__param(10, inject(COMPANION_SERVICE_TYPES.FoundationExecutorService)),
|
|
3436
|
-
__param(11, inject(COMPANION_SERVICE_TYPES.
|
|
3437
|
-
__param(12, inject(COMPANION_SERVICE_TYPES.
|
|
3438
|
-
__param(13, inject(COMPANION_SERVICE_TYPES.
|
|
6127
|
+
__param(11, inject(COMPANION_SERVICE_TYPES.CapabilityCompositionExecutorService)),
|
|
6128
|
+
__param(12, inject(COMPANION_SERVICE_TYPES.ApplicationMaturityExecutorService)),
|
|
6129
|
+
__param(13, inject(COMPANION_SERVICE_TYPES.ExpertPersonaService)),
|
|
6130
|
+
__param(14, inject(COMPANION_SERVICE_TYPES.StructuredDeliberationService)),
|
|
6131
|
+
__param(15, inject(COMPANION_SERVICE_TYPES.ExecutionsService)),
|
|
6132
|
+
__param(16, inject(SAAS_SERVICE_TYPES.ActorsSystemBackendService)),
|
|
6133
|
+
__param(17, inject(COMPANION_SERVICE_TYPES.PlaybookSpendMeter)),
|
|
3439
6134
|
__metadata("design:paramtypes", [Function, Object, ResearchAgentDispatchCompanionService, Function, CompanionTraceabilityService,
|
|
3440
6135
|
PlaybookRunWriteRegisterCompanionService,
|
|
3441
6136
|
ApplicationBuildDispatchCompanionService,
|
|
@@ -3443,9 +6138,11 @@ PlaybookRunCompanionService = PlaybookRunCompanionService_1 = __decorate([
|
|
|
3443
6138
|
GitChangeSetCompanionService,
|
|
3444
6139
|
CompanionIntrospectionService,
|
|
3445
6140
|
FoundationExecutorCompanionService,
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
6141
|
+
CapabilityCompositionExecutorCompanionService,
|
|
6142
|
+
ApplicationMaturityExecutorCompanionService,
|
|
6143
|
+
ExpertPersonaCompanionService,
|
|
6144
|
+
StructuredDeliberationCompanionService,
|
|
6145
|
+
CompanionExecutionsCompanionService, Function, PlaybookSpendMeterCompanionService])
|
|
3449
6146
|
], PlaybookRunCompanionService);
|
|
3450
6147
|
export { PlaybookRunCompanionService };
|
|
3451
6148
|
//# sourceMappingURL=playbook-run.companion.service.js.map
|