@cat-factory/orchestration 0.185.2 → 0.186.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/container/dependencies.d.ts +25 -1
  2. package/dist/container/dependencies.d.ts.map +1 -1
  3. package/dist/container/execution-service.d.ts.map +1 -1
  4. package/dist/container/execution-service.js +4 -0
  5. package/dist/container/execution-service.js.map +1 -1
  6. package/dist/container/runtime.d.ts +2 -0
  7. package/dist/container/runtime.d.ts.map +1 -1
  8. package/dist/container/runtime.js +10 -1
  9. package/dist/container/runtime.js.map +1 -1
  10. package/dist/container.d.ts +17 -2
  11. package/dist/container.d.ts.map +1 -1
  12. package/dist/container.js +6 -1
  13. package/dist/container.js.map +1 -1
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/modules/execution/AgentContextBuilder.d.ts +16 -1
  19. package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -1
  20. package/dist/modules/execution/AgentContextBuilder.js +15 -0
  21. package/dist/modules/execution/AgentContextBuilder.js.map +1 -1
  22. package/dist/modules/execution/ExecutionServiceDependencies.d.ts +10 -1
  23. package/dist/modules/execution/ExecutionServiceDependencies.d.ts.map +1 -1
  24. package/dist/modules/execution/RunAdmission.d.ts +27 -1
  25. package/dist/modules/execution/RunAdmission.d.ts.map +1 -1
  26. package/dist/modules/execution/RunAdmission.js +53 -11
  27. package/dist/modules/execution/RunAdmission.js.map +1 -1
  28. package/dist/modules/execution/run-binary-output.d.ts +24 -1
  29. package/dist/modules/execution/run-binary-output.d.ts.map +1 -1
  30. package/dist/modules/execution/run-binary-output.js +30 -4
  31. package/dist/modules/execution/run-binary-output.js.map +1 -1
  32. package/dist/modules/execution/run-catalog-context.d.ts +14 -1
  33. package/dist/modules/execution/run-catalog-context.d.ts.map +1 -1
  34. package/dist/modules/execution/run-catalog-context.js +9 -1
  35. package/dist/modules/execution/run-catalog-context.js.map +1 -1
  36. package/dist/modules/execution/run-context-admission.d.ts +1 -1
  37. package/dist/modules/execution/run-context-admission.d.ts.map +1 -1
  38. package/dist/modules/execution/run-context-admission.js +2 -0
  39. package/dist/modules/execution/run-context-admission.js.map +1 -1
  40. package/dist/modules/execution/run-foundational-services.d.ts +8 -2
  41. package/dist/modules/execution/run-foundational-services.d.ts.map +1 -1
  42. package/dist/modules/execution/run-foundational-services.js.map +1 -1
  43. package/dist/modules/observability/operationalMetricsFlush.d.ts +32 -0
  44. package/dist/modules/observability/operationalMetricsFlush.d.ts.map +1 -0
  45. package/dist/modules/observability/operationalMetricsFlush.js +40 -0
  46. package/dist/modules/observability/operationalMetricsFlush.js.map +1 -0
  47. package/dist/modules/observability/platform-health.logic.d.ts +37 -1
  48. package/dist/modules/observability/platform-health.logic.d.ts.map +1 -1
  49. package/dist/modules/observability/platform-health.logic.js +100 -1
  50. package/dist/modules/observability/platform-health.logic.js.map +1 -1
  51. package/dist/modules/observability/retentionPass.d.ts +26 -0
  52. package/dist/modules/observability/retentionPass.d.ts.map +1 -0
  53. package/dist/modules/observability/retentionPass.js +31 -0
  54. package/dist/modules/observability/retentionPass.js.map +1 -0
  55. package/dist/validation/validateRegistrations.d.ts +9 -1
  56. package/dist/validation/validateRegistrations.d.ts.map +1 -1
  57. package/dist/validation/validateRegistrations.js +72 -1
  58. package/dist/validation/validateRegistrations.js.map +1 -1
  59. package/package.json +11 -11
@@ -1,10 +1,17 @@
1
1
  import type { AgentKindRegistry } from '@cat-factory/agents';
2
2
  import type { PipelineStep } from '@cat-factory/contracts';
3
- import type { ExecutionInstance, InjectedContextFile, Logger } from '@cat-factory/kernel';
3
+ import type { BinaryGeneratorRegistry, ExecutionInstance, InjectedContextFile, Logger, ResolvedBinaryGenerator } from '@cat-factory/kernel';
4
4
  import { type FoundationalServiceResolver } from './run-foundational-services.js';
5
5
  export interface CatalogRunContextDeps {
6
6
  agentKindRegistry: AgentKindRegistry;
7
7
  foundationalServiceResolver?: FoundationalServiceResolver;
8
+ /**
9
+ * The deployment's generative binary integrations. It rides HERE, beside the catalog resolver,
10
+ * because the binary-output brief describes both halves of one selection and the declaration
11
+ * read-back resolves ids against both — keeping them apart would be two places for a dispatch
12
+ * and its settlement to disagree about which integrations existed.
13
+ */
14
+ binaryGeneratorRegistry?: BinaryGeneratorRegistry;
8
15
  logger?: Logger;
9
16
  }
10
17
  export declare class CatalogRunContext {
@@ -31,6 +38,12 @@ export declare class CatalogRunContext {
31
38
  * same resolver and failure policy.
32
39
  */
33
40
  binaryOutputContextFor(workspaceId: string, agentKind: string, step: PipelineStep): Promise<InjectedContextFile[]>;
41
+ /**
42
+ * The GENERATIVE INTEGRATIONS this dispatch carries on its run context — the non-secret half
43
+ * the container executor turns into resolved credentials on the job body. The counterpart of
44
+ * {@link binaryOutputContextFor}: same gate, same selection, the other channel.
45
+ */
46
+ binaryGeneratorsFor(agentKind: string, step: PipelineStep): ResolvedBinaryGenerator[];
34
47
  /**
35
48
  * Read back what a settled DESIGN step declared, and record it on the step — the counterpart
36
49
  * of {@link foundationalContextFor}, so the completion hub takes no dependency of its own for
@@ -1 +1 @@
1
- {"version":3,"file":"run-catalog-context.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/run-catalog-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EAEL,KAAK,2BAA2B,EAGjC,MAAM,gCAAgC,CAAA;AAiBvC,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,2BAA2B,CAAC,EAAE,2BAA2B,CAAA;IACzD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,iBAAiB;IAShB,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiC;IACpE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiC;IAEpE,YAA6B,IAAI,EAAE,qBAAqB,EAGvD;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAOhC;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAEhC;IAED;;;;OAIG;IACH,6BAA6B,CAC3B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;;OAGG;IACH,6BAA6B,CAC3B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,IAAI,CAAC,CAEf;CACF"}
1
+ {"version":3,"file":"run-catalog-context.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/run-catalog-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,2BAA2B,EAGjC,MAAM,gCAAgC,CAAA;AAkBvC,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,2BAA2B,CAAC,EAAE,2BAA2B,CAAA;IACzD;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,iBAAiB;IAShB,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiC;IACpE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiC;IAEpE,YAA6B,IAAI,EAAE,qBAAqB,EAGvD;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAOhC;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAEhC;IAED;;;;OAIG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,uBAAuB,EAAE,CAEpF;IAED;;;;OAIG;IACH,6BAA6B,CAC3B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;;OAGG;IACH,6BAA6B,CAC3B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,IAAI,CAAC,CAEf;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { createFoundationalDeclarationRecorder, resolveFoundationalContext, } from './run-foundational-services.js';
2
- import { createBinaryOutputDeclarationRecorder, resolveBinaryOutputContext, } from './run-binary-output.js';
2
+ import { createBinaryOutputDeclarationRecorder, dispatchBinaryGeneratorsFor, resolveBinaryOutputContext, } from './run-binary-output.js';
3
3
  export class CatalogRunContext {
4
4
  deps;
5
5
  /**
@@ -37,6 +37,14 @@ export class CatalogRunContext {
37
37
  binaryOutputContextFor(workspaceId, agentKind, step) {
38
38
  return resolveBinaryOutputContext({ ...this.deps, workspaceId, agentKind, step });
39
39
  }
40
+ /**
41
+ * The GENERATIVE INTEGRATIONS this dispatch carries on its run context — the non-secret half
42
+ * the container executor turns into resolved credentials on the job body. The counterpart of
43
+ * {@link binaryOutputContextFor}: same gate, same selection, the other channel.
44
+ */
45
+ binaryGeneratorsFor(agentKind, step) {
46
+ return dispatchBinaryGeneratorsFor({ ...this.deps, agentKind, step });
47
+ }
40
48
  /**
41
49
  * Read back what a settled DESIGN step declared, and record it on the step — the counterpart
42
50
  * of {@link foundationalContextFor}, so the completion hub takes no dependency of its own for
@@ -1 +1 @@
1
- {"version":3,"file":"run-catalog-context.js","sourceRoot":"","sources":["../../../src/modules/execution/run-catalog-context.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,qCAAqC,EACrC,0BAA0B,GAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,qCAAqC,EACrC,0BAA0B,GAC3B,MAAM,wBAAwB,CAAA;AAkB/B,MAAM,OAAO,iBAAiB;IASC,IAAI;IARjC;;;;OAIG;IACc,kBAAkB,CAAiC;IACnD,kBAAkB,CAAiC;IAEpE,YAA6B,IAA2B;oBAA3B,IAAI;QAC/B,IAAI,CAAC,kBAAkB,GAAG,qCAAqC,CAAC,IAAI,CAAC,CAAA;QACrE,IAAI,CAAC,kBAAkB,GAAG,qCAAqC,CAAC,IAAI,CAAC,CAAA;IACvE,CAAC;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAmB,EACnB,SAAiB,EACjB,QAA2B;QAE3B,OAAO,0BAA0B,CAAC;YAChC,GAAG,IAAI,CAAC,IAAI;YACZ,WAAW;YACX,SAAS;YACT,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAmB,EACnB,SAAiB,EACjB,IAAkB;QAElB,OAAO,0BAA0B,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACnF,CAAC;IAED;;;;OAIG;IACH,6BAA6B,CAC3B,WAAmB,EACnB,IAAkB,EAClB,MAA0B;QAE1B,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3D,CAAC;IAED;;;OAGG;IACH,6BAA6B,CAC3B,WAAmB,EACnB,IAAkB,EAClB,MAA0B;QAE1B,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3D,CAAC;CACF"}
1
+ {"version":3,"file":"run-catalog-context.js","sourceRoot":"","sources":["../../../src/modules/execution/run-catalog-context.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,qCAAqC,EACrC,0BAA0B,GAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,qCAAqC,EACrC,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,wBAAwB,CAAA;AAyB/B,MAAM,OAAO,iBAAiB;IASC,IAAI;IARjC;;;;OAIG;IACc,kBAAkB,CAAiC;IACnD,kBAAkB,CAAiC;IAEpE,YAA6B,IAA2B;oBAA3B,IAAI;QAC/B,IAAI,CAAC,kBAAkB,GAAG,qCAAqC,CAAC,IAAI,CAAC,CAAA;QACrE,IAAI,CAAC,kBAAkB,GAAG,qCAAqC,CAAC,IAAI,CAAC,CAAA;IACvE,CAAC;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAmB,EACnB,SAAiB,EACjB,QAA2B;QAE3B,OAAO,0BAA0B,CAAC;YAChC,GAAG,IAAI,CAAC,IAAI;YACZ,WAAW;YACX,SAAS;YACT,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,WAAmB,EACnB,SAAiB,EACjB,IAAkB;QAElB,OAAO,0BAA0B,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACnF,CAAC;IAED;;;;OAIG;IACH,mBAAmB,CAAC,SAAiB,EAAE,IAAkB;QACvD,OAAO,2BAA2B,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACvE,CAAC;IAED;;;;OAIG;IACH,6BAA6B,CAC3B,WAAmB,EACnB,IAAkB,EAClB,MAA0B;QAE1B,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3D,CAAC;IAED;;;OAGG;IACH,6BAA6B,CAC3B,WAAmB,EACnB,IAAkB,EAClB,MAA0B;QAE1B,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3D,CAAC;CACF"}
@@ -17,7 +17,7 @@ import type { ExecutionServiceDependencies } from './ExecutionService.js';
17
17
  * value the constructor passed inline, so the two collaborators are built from an identical
18
18
  * input to before.
19
19
  */
20
- export type RunContextAdmissionDeps = Pick<ExecutionServiceDependencies, 'workspaceRepository' | 'blockRepository' | 'executionRepository' | 'accountRepository' | 'agentKindRegistry' | 'initiativePresetRegistry' | 'agentPromptRepository' | 'consensusGroupRepository' | 'documentRepository' | 'documentUrlResolver' | 'taskRepository' | 'requirementReviewRepository' | 'docInterviewRepository' | 'clarityReviewRepository' | 'brainstormSessionRepository' | 'initiativeRepository' | 'environmentProvisioning' | 'resolveTestSecretRefs' | 'resolveValidationChecks' | 'fragmentResolver' | 'skillResolver' | 'spendService' | 'workspaceSettingsService' | 'resolveBinaryArtifactStore' | 'resolveProviderCapabilities' | 'inlineHarnessRef' | 'resolveWorkspaceModelDefault' | 'assertAgentBackendConfigured' | 'logger' | 'workspaceAgentSettingsRepository' | 'foundationalServiceResolver'>;
20
+ export type RunContextAdmissionDeps = Pick<ExecutionServiceDependencies, 'workspaceRepository' | 'blockRepository' | 'executionRepository' | 'accountRepository' | 'agentKindRegistry' | 'initiativePresetRegistry' | 'agentPromptRepository' | 'consensusGroupRepository' | 'documentRepository' | 'documentUrlResolver' | 'taskRepository' | 'requirementReviewRepository' | 'docInterviewRepository' | 'clarityReviewRepository' | 'brainstormSessionRepository' | 'initiativeRepository' | 'environmentProvisioning' | 'resolveTestSecretRefs' | 'resolveValidationChecks' | 'fragmentResolver' | 'skillResolver' | 'spendService' | 'workspaceSettingsService' | 'resolveBinaryArtifactStore' | 'resolveProviderCapabilities' | 'inlineHarnessRef' | 'resolveWorkspaceModelDefault' | 'assertAgentBackendConfigured' | 'logger' | 'workspaceAgentSettingsRepository' | 'foundationalServiceResolver' | 'binaryGeneratorRegistry'>;
21
21
  export declare function buildRunContextAndAdmission(deps: RunContextAdmissionDeps): {
22
22
  contextBuilder: AgentContextBuilder;
23
23
  admission: RunAdmission;
@@ -1 +1 @@
1
- {"version":3,"file":"run-context-admission.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/run-context-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAEzE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,4BAA4B,EAC1B,qBAAqB,GACrB,iBAAiB,GACjB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,0BAA0B,GAC1B,uBAAuB,GACvB,0BAA0B,GAC1B,oBAAoB,GACpB,qBAAqB,GACrB,gBAAgB,GAChB,6BAA6B,GAC7B,wBAAwB,GACxB,yBAAyB,GACzB,6BAA6B,GAC7B,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,yBAAyB,GACzB,kBAAkB,GAClB,eAAe,GACf,cAAc,GACd,0BAA0B,GAC1B,4BAA4B,GAC5B,6BAA6B,GAC7B,kBAAkB,GAClB,8BAA8B,GAC9B,8BAA8B,GAC9B,QAAQ,GACR,kCAAkC,GAClC,6BAA6B,CAChC,CAAA;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,uBAAuB,GAAG;IAC1E,cAAc,EAAE,mBAAmB,CAAA;IACnC,SAAS,EAAE,YAAY,CAAA;CACxB,CA6CA"}
1
+ {"version":3,"file":"run-context-admission.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/run-context-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAEzE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,4BAA4B,EAC1B,qBAAqB,GACrB,iBAAiB,GACjB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,0BAA0B,GAC1B,uBAAuB,GACvB,0BAA0B,GAC1B,oBAAoB,GACpB,qBAAqB,GACrB,gBAAgB,GAChB,6BAA6B,GAC7B,wBAAwB,GACxB,yBAAyB,GACzB,6BAA6B,GAC7B,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,yBAAyB,GACzB,kBAAkB,GAClB,eAAe,GACf,cAAc,GACd,0BAA0B,GAC1B,4BAA4B,GAC5B,6BAA6B,GAC7B,kBAAkB,GAClB,8BAA8B,GAC9B,8BAA8B,GAC9B,QAAQ,GACR,kCAAkC,GAClC,6BAA6B,GAC7B,yBAAyB,CAC5B,CAAA;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,uBAAuB,GAAG;IAC1E,cAAc,EAAE,mBAAmB,CAAA;IACnC,SAAS,EAAE,YAAY,CAAA;CACxB,CA+CA"}
@@ -35,6 +35,7 @@ export function buildRunContextAndAdmission(deps) {
35
35
  fragmentResolver: deps.fragmentResolver,
36
36
  skillResolver: deps.skillResolver,
37
37
  foundationalServiceResolver: deps.foundationalServiceResolver,
38
+ binaryGeneratorRegistry: deps.binaryGeneratorRegistry,
38
39
  logger: deps.logger,
39
40
  });
40
41
  // The run-admission preflights (the shared start/retry/restart `assert*` gate family).
@@ -50,6 +51,7 @@ export function buildRunContextAndAdmission(deps) {
50
51
  workspaceSettingsService: deps.workspaceSettingsService,
51
52
  resolveBinaryArtifactStore: deps.resolveBinaryArtifactStore,
52
53
  foundationalServiceResolver: deps.foundationalServiceResolver,
54
+ binaryGeneratorRegistry: deps.binaryGeneratorRegistry,
53
55
  resolveProviderCapabilities: deps.resolveProviderCapabilities,
54
56
  inlineHarnessRef: deps.inlineHarnessRef,
55
57
  resolveWorkspaceModelDefault: deps.resolveWorkspaceModelDefault,
@@ -1 +1 @@
1
- {"version":3,"file":"run-context-admission.js","sourceRoot":"","sources":["../../../src/modules/execution/run-context-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA2ChD,MAAM,UAAU,2BAA2B,CAAC,IAA6B;IAIvE,MAAM,cAAc,GAAG,IAAI,mBAAmB,CAAC;QAC7C,mBAAmB,EAAE,IAAI,CAAC,mBAA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,IAAI,CAAC,wBAAwB;QACvD,0BAA0B,EAAE,IAAI,CAAC,0BAA0B;QAC3D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,4BAA4B,EAAE,IAAI,CAAC,4BAA4B;QAC/D,4BAA4B,EAAE,IAAI,CAAC,4BAA4B;KAChE,CAAC,CAAA;IACF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAA;AACtC,CAAC"}
1
+ {"version":3,"file":"run-context-admission.js","sourceRoot":"","sources":["../../../src/modules/execution/run-context-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA4ChD,MAAM,UAAU,2BAA2B,CAAC,IAA6B;IAIvE,MAAM,cAAc,GAAG,IAAI,mBAAmB,CAAC;QAC7C,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;QACvD,YAAY,EAAE,IAAI,CAAC,qBAAqB;QACxC,aAAa,EAAE,IAAI,CAAC,gCAAgC;QACpD,eAAe,EAAE,IAAI,CAAC,wBAAwB;QAC9C,SAAS,EAAE,IAAI,CAAC,kBAAkB;QAClC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,KAAK,EAAE,IAAI,CAAC,cAAc;QAC1B,kBAAkB,EAAE,IAAI,CAAC,2BAA2B;QACpD,aAAa,EAAE,IAAI,CAAC,sBAAsB;QAC1C,cAAc,EAAE,IAAI,CAAC,uBAAuB;QAC5C,kBAAkB,EAAE,IAAI,CAAC,2BAA2B;QACpD,WAAW,EAAE,IAAI,CAAC,oBAAoB;QACtC,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;QACjD,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC,CAAA;IACF,uFAAuF;IACvF,gFAAgF;IAChF,MAAM,SAAS,GAAG,IAAI,YAAY,CAAC;QACjC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,cAAc;QACd,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,KAAK,EAAE,IAAI,CAAC,YAAY;QACxB,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;QACvD,0BAA0B,EAAE,IAAI,CAAC,0BAA0B;QAC3D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,4BAA4B,EAAE,IAAI,CAAC,4BAA4B;QAC/D,4BAA4B,EAAE,IAAI,CAAC,4BAA4B;KAChE,CAAC,CAAA;IACF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAA;AACtC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AgentKindRegistry } from '@cat-factory/agents';
2
2
  import type { BinaryOutputConfig, FoundationalServiceSelection, PipelineStep } from '@cat-factory/contracts';
3
- import type { AgentKind, FoundationalCatalogView, InjectedContextFile, Logger } from '@cat-factory/kernel';
3
+ import type { AgentKind, BinaryGeneratorRegistry, FoundationalCatalogView, InjectedContextFile, Logger } from '@cat-factory/kernel';
4
4
  /**
5
5
  * The engine-facing seam over the catalog, implemented by
6
6
  * `FoundationalServiceRunResolver` (`@cat-factory/agents`) and wired only when the catalog is
@@ -21,8 +21,14 @@ export interface FoundationalServiceResolver {
21
21
  * generating step's own selection (`stepOptions.binaryOutput`). On this interface rather
22
22
  * than its own seam because it is the same catalog behind the same tier merge and cache —
23
23
  * two resolvers would be two places for a workspace override to win differently.
24
+ *
25
+ * The GENERATIVE half of that selection resolves against the deployment's code registry, which
26
+ * is passed in rather than held by the resolver: it is engine-level composition data with no
27
+ * I/O and no tenancy, so binding it to a catalog service (which has both) would misplace it.
28
+ * Absent ⇒ no integration resolves, and the brief states that rather than implying the step
29
+ * has one.
24
30
  */
25
- binaryOutputContextFilesFor(workspaceId: string, config: BinaryOutputConfig | undefined): Promise<InjectedContextFile[]>;
31
+ binaryOutputContextFilesFor(workspaceId: string, config: BinaryOutputConfig | undefined, generatorRegistry?: BinaryGeneratorRegistry): Promise<InjectedContextFile[]>;
26
32
  }
27
33
  export interface ResolveFoundationalContextInput {
28
34
  workspaceId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"run-foundational-services.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/run-foundational-services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAM5D,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,YAAY,EACb,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,EACP,MAAM,qBAAqB,CAAA;AAwB5B;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,WAAW,EAAE,MAAM,GAA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ACzD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,+BAA+B,CAelC"}
1
+ {"version":3,"file":"run-foundational-services.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/run-foundational-services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAM5D,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,YAAY,EACb,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,EACP,MAAM,qBAAqB,CAAA;AAwB5B;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAA;IACnE;;;;;OAKG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACrD,eAAe,CACb,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,4BAA4B,GAAG,SAAS,GAClD,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAA;IACjC;;;;;;;;;;;OAWG;IACH,2BAA2B,CACzB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,GAAG,SAAS,EACtC,iBAAiB,CAAC,EAAE,uBAAuB,GAC1C,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,MAAM,CAAA;IACnB,6FAA6F;IAC7F,SAAS,EAAE,SAAS,CAAA;IACpB,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,oEAAoE;IACpE,UAAU,EAAE,YAAY,EAAE,CAAA;IAC1B,2BAA2B,CAAC,EAAE,2BAA2B,CAAA;IACzD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,+BAA+B,GACrC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAwDhC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,YAAY,EAAE,GACzB,4BAA4B,GAAG,SAAS,CAM1C;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAC5C,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,YAAY;AAClB;sEACsE;AACtE,MAAM,EAAE,MAAM,GAAG,SAAS,KACvB,OAAO,CAAC,IAAI,CAAC,CAAA;AAElB;;;;GAIG;AACH,wBAAgB,qCAAqC,CAAC,IAAI,EAAE;IAC1D,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,2BAA2B,CAAC,EAAE,2BAA2B,CAAA;IACzD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,+BAA+B,CAelC"}
@@ -1 +1 @@
1
- {"version":3,"file":"run-foundational-services.js","sourceRoot":"","sources":["../../../src/modules/execution/run-foundational-services.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,QAAQ,GACT,MAAM,qBAAqB,CAAA;AAY5B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAwD5B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,KAAsC;IAEtC,MAAM,QAAQ,GAAG,KAAK,CAAC,2BAA2B,CAAA;IAClD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAA;IACxB,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAA;IAC9C,IAAI,QAAQ,CAAC,SAAS,EAAE,0BAA0B,EAAE,iBAAiB,CAAC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AE,MAAM,EAAE,aAAa,EAAE,CAAC;aAC5D;SACF,CACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAC/B,UAA0B;IAE1B,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAChD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAA;QACrD,IAAI,SAAS;YAAE,OAAO,SAAS,CAAA;IACjC,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAsBD;;;;GAIG;AACH,MAAM,UAAU,qCAAqC,CAAC,IAIrD;IACC,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAA;IACjD,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,IAAI,EAAE,GAAE,CAAC,CAAA;IACpC,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,EAAE,IAAI,CAAC,iBAAiB,CAAC;YAAE,OAAM;QACzF,MAAM,aAAa,CACjB,IAAI,CAAC,MAAM,IAAI,UAAU,EACzB,wCAAwC,EACxC,KAAK,IAAI,EAAE;YACT,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAA;YACvD,IAAI,CAAC,oBAAoB,GAAG,4BAA4B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACzE,CAAC,EACD,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAC3C,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"run-foundational-services.js","sourceRoot":"","sources":["../../../src/modules/execution/run-foundational-services.ts"],"names":[],"mappings":"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AC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,EAAE,IAAI,CAAC,iBAAiB,CAAC;YAAE,OAAM;QACzF,MAAM,aAAa,CACjB,IAAI,CAAC,MAAM,IAAI,UAAU,EACzB,wCAAwC,EACxC,KAAK,IAAI,EAAE;YACT,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAA;YACvD,IAAI,CAAC,oBAAoB,GAAG,4BAA4B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACzE,CAAC,EACD,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAC3C,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { Logger, OperationalCounterSample, OperationalGaugeSample, OperationalMetricsCollector } from '@cat-factory/kernel';
2
+ /** Where a flush pushes its operational samples (the OTLP platform-metrics exporter). */
3
+ export interface OperationalMetricsSink {
4
+ exportOperational(counters: OperationalCounterSample[], gauges: OperationalGaugeSample[], at: number): Promise<void>;
5
+ }
6
+ export interface OperationalMetricsFlushDeps {
7
+ /** The process/isolate-local accumulator to drain. */
8
+ collector: OperationalMetricsCollector;
9
+ sink: OperationalMetricsSink;
10
+ /**
11
+ * Read the point-in-time gauges this runtime can answer (queue depth). OMITTED where the
12
+ * runtime genuinely cannot read them — Cloudflare Queues expose no backlog to the Worker
13
+ * that consumes them — in which case nothing is emitted for those series. That is
14
+ * deliberate: an absent data point says "nobody could look", where a zero would say "the
15
+ * queue is empty", and those are opposite facts about a wedged queue.
16
+ */
17
+ probeGauges?: () => Promise<OperationalGaugeSample[]>;
18
+ /** The flush clock (injected, so this module reads no wall clock of its own). */
19
+ now: number;
20
+ logger?: Logger;
21
+ }
22
+ /**
23
+ * Drain the collector, probe the gauges, and export both. Returns the number of samples sent
24
+ * (0 when there was nothing to say, in which case no request is made at all).
25
+ *
26
+ * A gauge probe that THROWS costs only its gauges: the drained counters are already out of
27
+ * the collector by then, and dropping them because an unrelated `COUNT(*)` failed would lose
28
+ * events nothing can recover. A failing SINK loses the whole flush — that is the accepted
29
+ * cost of an in-memory accumulator, and it is why the drop is logged rather than swallowed.
30
+ */
31
+ export declare function flushOperationalMetrics(deps: OperationalMetricsFlushDeps): Promise<number>;
32
+ //# sourceMappingURL=operationalMetricsFlush.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operationalMetricsFlush.d.ts","sourceRoot":"","sources":["../../../src/modules/observability/operationalMetricsFlush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAmB5B,yFAAyF;AACzF,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,CACf,QAAQ,EAAE,wBAAwB,EAAE,EACpC,MAAM,EAAE,sBAAsB,EAAE,EAChC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAAA;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,SAAS,EAAE,2BAA2B,CAAA;IACtC,IAAI,EAAE,sBAAsB,CAAA;IAC5B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAA;IACrD,iFAAiF;IACjF,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BhG"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Drain the collector, probe the gauges, and export both. Returns the number of samples sent
3
+ * (0 when there was nothing to say, in which case no request is made at all).
4
+ *
5
+ * A gauge probe that THROWS costs only its gauges: the drained counters are already out of
6
+ * the collector by then, and dropping them because an unrelated `COUNT(*)` failed would lose
7
+ * events nothing can recover. A failing SINK loses the whole flush — that is the accepted
8
+ * cost of an in-memory accumulator, and it is why the drop is logged rather than swallowed.
9
+ */
10
+ export async function flushOperationalMetrics(deps) {
11
+ const counters = deps.collector.drain();
12
+ let gauges = [];
13
+ if (deps.probeGauges) {
14
+ try {
15
+ gauges = await deps.probeGauges();
16
+ }
17
+ catch (err) {
18
+ deps.logger?.warn('operational-metrics: gauge probe failed; exporting counters only', {
19
+ scope: 'operational-metrics',
20
+ err: err instanceof Error ? err.message : String(err),
21
+ });
22
+ }
23
+ }
24
+ if (counters.length === 0 && gauges.length === 0)
25
+ return 0;
26
+ try {
27
+ await deps.sink.exportOperational(counters, gauges, deps.now);
28
+ }
29
+ catch (err) {
30
+ deps.logger?.warn('operational-metrics: export failed; the drained deltas are lost', {
31
+ scope: 'operational-metrics',
32
+ counters: counters.length,
33
+ gauges: gauges.length,
34
+ err: err instanceof Error ? err.message : String(err),
35
+ });
36
+ return 0;
37
+ }
38
+ return counters.length + gauges.length;
39
+ }
40
+ //# sourceMappingURL=operationalMetricsFlush.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operationalMetricsFlush.js","sourceRoot":"","sources":["../../../src/modules/observability/operationalMetricsFlush.ts"],"names":[],"mappings":"AAkDA;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAAiC;IAC7E,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;IACvC,IAAI,MAAM,GAA6B,EAAE,CAAA;IACzC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACnC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kEAAkE,EAAE;gBACpF,KAAK,EAAE,qBAAqB;gBAC5B,GAAG,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACtD,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAA;IAC1D,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,iEAAiE,EAAE;YACnF,KAAK,EAAE,qBAAqB;YAC5B,QAAQ,EAAE,QAAQ,CAAC,MAAM;YACzB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,GAAG,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACtD,CAAC,CAAA;QACF,OAAO,CAAC,CAAA;IACV,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;AACxC,CAAC"}
@@ -16,6 +16,32 @@ export interface PlatformAlertThresholds {
16
16
  maxP99DurationMs: number;
17
17
  /** Live running/blocked/paused/pending depth at or above which `backlog_high` fires. */
18
18
  maxBacklog: number;
19
+ /**
20
+ * How many TRAILING trend buckets must be completely empty before `throughput_stalled` can
21
+ * fire. Expressed in buckets rather than hours so the condition scales with the configured
22
+ * window: the projection buckets `1h` far more finely than `7d`, and a fixed hour count
23
+ * would be a hair trigger on one and useless on the other.
24
+ */
25
+ stalledBuckets: number;
26
+ /**
27
+ * Runs that must have been created in the EARLIER part of the same window before a stall
28
+ * counts as one. Without it, a deployment that is merely idle overnight — genuinely nothing
29
+ * to do — pages exactly like one that is wedged, and the alert gets muted, which costs the
30
+ * signal on the night it matters.
31
+ */
32
+ minStalledPriorRuns: number;
33
+ /**
34
+ * Share (0..1) of the window's failures that ONE kind must account for before
35
+ * `failure_kind_dominant` fires. Gated by {@link minRuns} like the failure rate, so a
36
+ * single early failure is never "100% evicted".
37
+ */
38
+ maxFailureKindShare: number;
39
+ /**
40
+ * Consecutive failed passes of ONE sweeper before `sweep_degraded` fires. Counted by the
41
+ * caller (the sweep observes its own history; this logic stays pure), so a transient
42
+ * hiccup on a single tick is not an alert.
43
+ */
44
+ maxSweepFailures: number;
19
45
  }
20
46
  /** Conservative defaults: quiet unless the deployment is genuinely unhealthy. */
21
47
  export declare const DEFAULT_PLATFORM_ALERT_THRESHOLDS: PlatformAlertThresholds;
@@ -26,7 +52,17 @@ export declare const DEFAULT_PLATFORM_ALERT_THRESHOLDS: PlatformAlertThresholds;
26
52
  * dedup on the reason SET only (see {@link platformAlertReasons}); the fluctuating values here
27
53
  * are intentionally not carried on the card (they'd re-toast the inbox every sweep).
28
54
  */
29
- export declare function evaluatePlatformHealth(snapshot: PlatformObservability, thresholds: PlatformAlertThresholds): PlatformAlert[];
55
+ export declare function evaluatePlatformHealth(snapshot: PlatformObservability, thresholds: PlatformAlertThresholds,
56
+ /**
57
+ * The worst consecutive-failure streak across the deployment's sweepers, and which sweeper
58
+ * it belongs to. Supplied by the CALLER because it is history rather than a property of the
59
+ * snapshot — this function stays pure. Omitted ⇒ `sweep_degraded` cannot fire, which is the
60
+ * right answer for a caller that does not track it rather than a claim that nothing failed.
61
+ */
62
+ sweepFailures?: {
63
+ sweep: string;
64
+ consecutive: number;
65
+ }): PlatformAlert[];
30
66
  /**
31
67
  * The SORTED set of reason codes from a list of fired alerts — the platform-health card's
32
68
  * stable dedup identity. Sorted so the card content is a pure function of WHICH conditions
@@ -1 +1 @@
1
- {"version":3,"file":"platform-health.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/observability/platform-health.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAA;AAc/B;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,cAAc,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,gBAAgB,EAAE,MAAM,CAAA;IACxB,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,EAAE,uBAK/C,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,qBAAqB,EAC/B,UAAU,EAAE,uBAAuB,GAClC,aAAa,EAAE,CAiCjB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,mBAAmB,EAAE,CAEnF;AAeD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,EAAE,EAC9B,MAAM,EAAE,2BAA2B,GAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAUjC"}
1
+ {"version":3,"file":"platform-health.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/observability/platform-health.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAA;AAc/B;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,cAAc,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,gBAAgB,EAAE,MAAM,CAAA;IACxB,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,EAAE,uBAa/C,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,qBAAqB,EAC/B,UAAU,EAAE,uBAAuB;AACnC;;;;;GAKG;AACH,aAAa,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACrD,aAAa,EAAE,CAyEjB;AA6CD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,mBAAmB,EAAE,CAEnF;AAkBD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,EAAE,EAC9B,MAAM,EAAE,2BAA2B,GAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAUjC"}
@@ -4,6 +4,14 @@ export const DEFAULT_PLATFORM_ALERT_THRESHOLDS = {
4
4
  maxFailureRate: 0.5,
5
5
  maxP99DurationMs: 60 * 60_000, // 60 minutes
6
6
  maxBacklog: 50,
7
+ // A quarter of a `1h` window's buckets (or of any other window's) with nothing at all,
8
+ // against a window that was otherwise busy.
9
+ stalledBuckets: 3,
10
+ minStalledPriorRuns: 5,
11
+ // Not 1.0: a deployment where 9 of 10 failures are evictions has the same incident as one
12
+ // where 10 of 10 are, and a single stray `agent` failure should not silence it.
13
+ maxFailureKindShare: 0.8,
14
+ maxSweepFailures: 3,
7
15
  };
8
16
  /**
9
17
  * Evaluate one account's windowed projection against the thresholds, returning every fired
@@ -12,7 +20,14 @@ export const DEFAULT_PLATFORM_ALERT_THRESHOLDS = {
12
20
  * dedup on the reason SET only (see {@link platformAlertReasons}); the fluctuating values here
13
21
  * are intentionally not carried on the card (they'd re-toast the inbox every sweep).
14
22
  */
15
- export function evaluatePlatformHealth(snapshot, thresholds) {
23
+ export function evaluatePlatformHealth(snapshot, thresholds,
24
+ /**
25
+ * The worst consecutive-failure streak across the deployment's sweepers, and which sweeper
26
+ * it belongs to. Supplied by the CALLER because it is history rather than a property of the
27
+ * snapshot — this function stays pure. Omitted ⇒ `sweep_degraded` cannot fire, which is the
28
+ * right answer for a caller that does not track it rather than a claim that nothing failed.
29
+ */
30
+ sweepFailures) {
16
31
  const alerts = [];
17
32
  const { outcomes, durations, live } = snapshot;
18
33
  // Failure rate over terminal runs — gated by a minimum sample so a tiny window stays quiet.
@@ -40,8 +55,89 @@ export function evaluatePlatformHealth(snapshot, thresholds) {
40
55
  if (backlog >= thresholds.maxBacklog) {
41
56
  alerts.push({ reason: 'backlog_high', value: backlog, threshold: thresholds.maxBacklog });
42
57
  }
58
+ // Throughput stalled: the deployment stopped taking work. Every condition above divides by
59
+ // runs, so all three go quiet at `total = 0` — a fully dead platform reads identically to a
60
+ // quiet healthy one. Read off the zero-filled trend rather than a second query: the tail
61
+ // buckets say "nothing now", the head buckets say "there was something to do".
62
+ const stalled = trailingStall(snapshot, thresholds);
63
+ if (stalled !== null) {
64
+ alerts.push({
65
+ reason: 'throughput_stalled',
66
+ value: stalled,
67
+ threshold: thresholds.stalledBuckets,
68
+ });
69
+ }
70
+ // One failure kind dominating. 100% `evicted` and 100% `agent` produce an identical
71
+ // `failure_rate_high` and need opposite fixes (the container substrate versus the model), so
72
+ // the concentration is its own condition rather than a detail on the dashboard.
73
+ const totalFailures = snapshot.failures.reduce((sum, slice) => sum + slice.count, 0);
74
+ if (terminal >= thresholds.minRuns && totalFailures > 0) {
75
+ const dominant = Math.max(...snapshot.failures.map((slice) => slice.count));
76
+ const share = dominant / totalFailures;
77
+ if (share >= thresholds.maxFailureKindShare) {
78
+ alerts.push({
79
+ reason: 'failure_kind_dominant',
80
+ value: share,
81
+ threshold: thresholds.maxFailureKindShare,
82
+ });
83
+ }
84
+ }
85
+ // The watcher itself. A sweeper that has failed every pass makes every signal above stale
86
+ // WITHOUT making any of them fire — the stale-run sweeper stops recovering lost runs, the
87
+ // retention sweep stops bounding the tables — so its own health is an alert condition.
88
+ if (sweepFailures && sweepFailures.consecutive >= thresholds.maxSweepFailures) {
89
+ alerts.push({
90
+ reason: 'sweep_degraded',
91
+ value: sweepFailures.consecutive,
92
+ threshold: thresholds.maxSweepFailures,
93
+ });
94
+ }
43
95
  return alerts;
44
96
  }
97
+ /**
98
+ * How many trailing trend buckets are completely empty, when that run of emptiness qualifies
99
+ * as a STALL — or null when it does not. Two things have to hold, and the second is what keeps
100
+ * this from paging every night:
101
+ *
102
+ * - the last `stalledBuckets` buckets created no runs at all, and
103
+ * - the buckets BEFORE them created at least `minStalledPriorRuns`.
104
+ *
105
+ * An idle deployment fails the second test (its whole window is empty) and stays quiet; a
106
+ * wedged one passes both, because the work it was doing is exactly what stopped. A window with
107
+ * too few buckets to hold both halves cannot answer the question and returns null rather than
108
+ * guessing — the honest answer for "not enough history".
109
+ *
110
+ * The number returned is the MEASURED run of empty buckets, not the threshold that qualified
111
+ * it. Every other condition reports what it observed next to what it allows, and returning the
112
+ * threshold here made a stall that had lasted all night indistinguishable on the card from one
113
+ * that had just crossed the line — the platform is supposed to COMPUTE the magnitude.
114
+ */
115
+ function trailingStall(snapshot, thresholds) {
116
+ const points = snapshot.trend.points;
117
+ const tail = thresholds.stalledBuckets;
118
+ // Both thresholds must be real numbers before this can answer anything. A partially-built
119
+ // threshold bag (a caller that predates these fields) would otherwise slip past a `<= 0`
120
+ // guard as `undefined` and fire the alert on an EMPTY trend — the one deployment shape where
121
+ // there is least evidence of a stall. "Cannot evaluate" is null, like every other branch here.
122
+ if (!Number.isFinite(tail) || !Number.isFinite(thresholds.minStalledPriorRuns))
123
+ return null;
124
+ if (tail <= 0 || points.length <= tail)
125
+ return null;
126
+ const runsIn = (point) => point.done + point.failed + point.other;
127
+ const tailPoints = points.slice(-tail);
128
+ if (tailPoints.some((point) => runsIn(point) > 0))
129
+ return null;
130
+ const prior = points.slice(0, -tail).reduce((sum, point) => sum + runsIn(point), 0);
131
+ if (prior < thresholds.minStalledPriorRuns)
132
+ return null;
133
+ // Qualified. Now measure how far back the silence ACTUALLY reaches, so the alert reports the
134
+ // observed magnitude rather than the bar it cleared. Walk on past the tail while buckets stay
135
+ // empty; `prior > 0` guarantees this terminates before consuming the whole series.
136
+ let empty = tail;
137
+ while (empty < points.length && runsIn(points[points.length - 1 - empty]) === 0)
138
+ empty++;
139
+ return empty;
140
+ }
45
141
  /**
46
142
  * The SORTED set of reason codes from a list of fired alerts — the platform-health card's
47
143
  * stable dedup identity. Sorted so the card content is a pure function of WHICH conditions
@@ -56,6 +152,9 @@ const REASON_PHRASE = {
56
152
  failure_rate_high: 'an elevated run failure rate',
57
153
  duration_p99_high: 'slow run durations (p99)',
58
154
  backlog_high: 'a growing backlog of unfinished runs',
155
+ throughput_stalled: 'no new runs at all, after a busy period',
156
+ failure_kind_dominant: 'nearly every failure sharing one cause',
157
+ sweep_degraded: 'a background maintenance sweep failing repeatedly',
59
158
  };
60
159
  const WINDOW_PHRASE = {
61
160
  '1h': 'the last hour',
@@ -1 +1 @@
1
- {"version":3,"file":"platform-health.logic.js","sourceRoot":"","sources":["../../../src/modules/observability/platform-health.logic.ts"],"names":[],"mappings":"AAsCA,iFAAiF;AACjF,MAAM,CAAC,MAAM,iCAAiC,GAA4B;IACxE,OAAO,EAAE,CAAC;IACV,cAAc,EAAE,GAAG;IACnB,gBAAgB,EAAE,EAAE,GAAG,MAAM,EAAE,aAAa;IAC5C,UAAU,EAAE,EAAE;CACf,CAAA;AAED;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAA+B,EAC/B,UAAmC;IAEnC,MAAM,MAAM,GAAoB,EAAE,CAAA;IAClC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAA;IAE9C,4FAA4F;IAC5F,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AC,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAED,yFAAyF;AACzF,MAAM,aAAa,GAAwC;IACzD,iBAAiB,EAAE,8BAA8B;IACjD,iBAAiB,EAAE,0BAA0B;IAC7C,YAAY,EAAE,sCAAsC;CACrD,CAAA;AAED,MAAM,aAAa,GAAgD;IACjE,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,iBAAiB;CACxB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAA8B,EAC9B,MAAmC;IAEnC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IACpD,MAAM,IAAI,GACR,OAAO,CAAC,MAAM,IAAI,CAAC;QACjB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,gCAAgC,CAAC;QAClD,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAA;IAC7E,OAAO;QACL,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,wBAAwB,IAAI,SAAS,aAAa,CAAC,MAAM,CAAC,2CAA2C;KAC5G,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"platform-health.logic.js","sourceRoot":"","sources":["../../../src/modules/observability/platform-health.logic.ts"],"names":[],"mappings":"AAgEA,iFAAiF;AACjF,MAAM,CAAC,MAAM,iCAAiC,GAA4B;IACxE,OAAO,EAAE,CAAC;IACV,cAAc,EAAE,GAAG;IACnB,gBAAgB,EAAE,EAAE,GAAG,MAAM,EAAE,aAAa;IAC5C,UAAU,EAAE,EAAE;IACd,uFAAuF;IACvF,4CAA4C;IAC5C,cAAc,EAAE,CAAC;IACj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,IAAI,gCAAgC,CAAC;QAClD,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAA;IAC7E,OAAO;QACL,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,wBAAwB,IAAI,SAAS,aAAa,CAAC,MAAM,CAAC,2CAA2C;KAC5G,CAAA;AACH,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type Logger } from '@cat-factory/kernel';
2
+ /** One pass's isolation state: the per-table runner plus the names it could not prune. */
3
+ export interface RetentionPass {
4
+ /**
5
+ * Prune `table` to `now - windowMs`, treating a non-positive window as disabled. A failure
6
+ * is logged against the table, recorded in {@link failed}, and reported as 0 reclaimed —
7
+ * the pass continues to the next table.
8
+ */
9
+ prune(table: string, windowMs: number, now: number, del: (cutoff: number) => Promise<number>): Promise<number>;
10
+ /**
11
+ * The same isolation for a table pruned by its own expiry rather than a window (reset
12
+ * tokens, subscription activations), where there is no window to disable.
13
+ */
14
+ expire(table: string, del: () => Promise<number>): Promise<number>;
15
+ /**
16
+ * The tables whose prune threw this pass, in the order they were attempted. EMPTY on a
17
+ * clean pass — a caller logs it only when non-empty, so a healthy deployment stays quiet.
18
+ */
19
+ readonly failed: string[];
20
+ }
21
+ /**
22
+ * Start one isolated retention pass. Create a new one per sweep (the {@link RetentionPass.failed}
23
+ * list is per-pass state), then read `failed` after the last table.
24
+ */
25
+ export declare function createRetentionPass(logger?: Logger): RetentionPass;
26
+ //# sourceMappingURL=retentionPass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retentionPass.d.ts","sourceRoot":"","sources":["../../../src/modules/observability/retentionPass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,qBAAqB,CAAA;AAiBhE,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,KAAK,CACH,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC,CAAA;IAClB;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAClE;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CAwBlE"}
@@ -0,0 +1,31 @@
1
+ import { describeError } from '@cat-factory/kernel';
2
+ /**
3
+ * Start one isolated retention pass. Create a new one per sweep (the {@link RetentionPass.failed}
4
+ * list is per-pass state), then read `failed` after the last table.
5
+ */
6
+ export function createRetentionPass(logger) {
7
+ const failed = [];
8
+ const isolate = async (table, del) => {
9
+ try {
10
+ return await del();
11
+ }
12
+ catch (error) {
13
+ failed.push(table);
14
+ // WARN, not error: the data is still there and the next pass will retry it, so this is a
15
+ // degradation rather than lost work. It names the table because the whole point of the
16
+ // isolation is that the operator can tell WHICH one is sick.
17
+ logger?.warn('retention: pruning one table failed; continuing the pass', {
18
+ scope: 'retention',
19
+ table,
20
+ ...describeError(error),
21
+ });
22
+ return 0;
23
+ }
24
+ };
25
+ return {
26
+ prune: (table, windowMs, now, del) => windowMs <= 0 ? Promise.resolve(0) : isolate(table, () => del(now - windowMs)),
27
+ expire: (table, del) => isolate(table, del),
28
+ failed,
29
+ };
30
+ }
31
+ //# sourceMappingURL=retentionPass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retentionPass.js","sourceRoot":"","sources":["../../../src/modules/observability/retentionPass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,qBAAqB,CAAA;AA0ChE;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,OAAO,GAAG,KAAK,EAAE,KAAa,EAAE,GAA0B,EAAmB,EAAE;QACnF,IAAI,CAAC;YACH,OAAO,MAAM,GAAG,EAAE,CAAA;QACpB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YAClB,yFAAyF;YACzF,uFAAuF;YACvF,6DAA6D;YAC7D,MAAM,EAAE,IAAI,CAAC,0DAA0D,EAAE;gBACvE,KAAK,EAAE,WAAW;gBAClB,KAAK;gBACL,GAAG,aAAa,CAAC,KAAK,CAAC;aACxB,CAAC,CAAA;YACF,OAAO,CAAC,CAAA;QACV,CAAC;IACH,CAAC,CAAA;IACD,OAAO;QACL,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CACnC,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC;QAChF,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;QAC3C,MAAM;KACP,CAAA;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { AgentKindRegistry } from '@cat-factory/agents';
2
- import type { FoundationalServiceRegistry, GateRegistry, PipelineRegistry, TaskTypeRegistry } from '@cat-factory/kernel';
2
+ import type { BinaryGeneratorRegistry, FoundationalServiceRegistry, GateRegistry, PipelineRegistry, TaskTypeRegistry } from '@cat-factory/kernel';
3
3
  /** A single problem found during validation. `error` aborts boot; `warn` is logged only. */
4
4
  export interface RegistrationProblem {
5
5
  severity: 'error' | 'warn';
@@ -42,6 +42,14 @@ export interface ValidateRegistrationsOptions {
42
42
  * fails at boot rather than reaching an Architect as an empty catalog entry.
43
43
  */
44
44
  foundationalServiceRegistry?: FoundationalServiceRegistry;
45
+ /**
46
+ * The app-owned generative-binary-integration registry to validate (the facade's injected
47
+ * instance — the SAME one it threads through `CoreDependencies.binaryGeneratorRegistry`).
48
+ * Optional: when omitted, no registered integration is checked. A facade that registers any
49
+ * passes it, so a malformed definition, an unusable credential name or a cleartext endpoint
50
+ * fails boot rather than surfacing as a refused run or an unexplained 401 mid-generation.
51
+ */
52
+ binaryGeneratorRegistry?: BinaryGeneratorRegistry;
45
53
  /** Override the canonical result-view id set (defaults to contracts' {@link RESULT_VIEW_ID_SET}). */
46
54
  knownResultViewIds?: ReadonlySet<string>;
47
55
  /** Built-in helper kinds a gate may escalate to (defaults to ci-fixer/conflict-resolver/on-call). */
@@ -1 +1 @@
1
- {"version":3,"file":"validateRegistrations.d.ts","sourceRoot":"","sources":["../../src/validation/validateRegistrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,KAAK,EAEV,2BAA2B,EAC3B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AA6C5B,4FAA4F;AAC5F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,uFAAuF;AACvF,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAA;IACpC;;;;OAIG;IACH,YAAY,EAAE,YAAY,CAAA;IAC1B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,2BAA2B,CAAA;IACzD,qGAAqG;IACrG,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACxC,qGAAqG;IACrG,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACxC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACrC;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAA;CAChD;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,4BAA4B,GACjC,mBAAmB,EAAE,CAgFvB;AAmZD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI,CAY9E;AAOD,yGAAyG;AACzG,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI,CASlF;AAED,uFAAuF;AACvF,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD"}
1
+ {"version":3,"file":"validateRegistrations.d.ts","sourceRoot":"","sources":["../../src/validation/validateRegistrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,KAAK,EAEV,uBAAuB,EACvB,2BAA2B,EAC3B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAgD5B,4FAA4F;AAC5F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,uFAAuF;AACvF,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAA;IACpC;;;;OAIG;I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