@cat-factory/orchestration 0.240.0 → 0.242.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 (112) hide show
  1. package/dist/container/dependencies.d.ts +24 -1
  2. package/dist/container/dependencies.d.ts.map +1 -1
  3. package/dist/container/module-shapes.d.ts +8 -0
  4. package/dist/container/module-shapes.d.ts.map +1 -1
  5. package/dist/container/modules.d.ts.map +1 -1
  6. package/dist/container/modules.js +9 -2
  7. package/dist/container/modules.js.map +1 -1
  8. package/dist/container/runtime.d.ts +1 -0
  9. package/dist/container/runtime.d.ts.map +1 -1
  10. package/dist/container/runtime.js +7 -1
  11. package/dist/container/runtime.js.map +1 -1
  12. package/dist/container.d.ts +9 -1
  13. package/dist/container.d.ts.map +1 -1
  14. package/dist/container.js +2 -1
  15. package/dist/container.js.map +1 -1
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +4 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/modules/artifacts/artifactRetention.d.ts +11 -4
  21. package/dist/modules/artifacts/artifactRetention.d.ts.map +1 -1
  22. package/dist/modules/artifacts/artifactRetention.js +11 -4
  23. package/dist/modules/artifacts/artifactRetention.js.map +1 -1
  24. package/dist/modules/board/BoardService.d.ts +43 -23
  25. package/dist/modules/board/BoardService.d.ts.map +1 -1
  26. package/dist/modules/board/BoardService.js +109 -126
  27. package/dist/modules/board/BoardService.js.map +1 -1
  28. package/dist/modules/board/newServiceFrameDefaults.d.ts +18 -1
  29. package/dist/modules/board/newServiceFrameDefaults.d.ts.map +1 -1
  30. package/dist/modules/board/newServiceFrameDefaults.js +17 -0
  31. package/dist/modules/board/newServiceFrameDefaults.js.map +1 -1
  32. package/dist/modules/board/publicBoardReads.d.ts +56 -2
  33. package/dist/modules/board/publicBoardReads.d.ts.map +1 -1
  34. package/dist/modules/board/publicBoardReads.js +53 -0
  35. package/dist/modules/board/publicBoardReads.js.map +1 -1
  36. package/dist/modules/board/serviceRepoLinkage.d.ts +51 -0
  37. package/dist/modules/board/serviceRepoLinkage.d.ts.map +1 -0
  38. package/dist/modules/board/serviceRepoLinkage.js +54 -0
  39. package/dist/modules/board/serviceRepoLinkage.js.map +1 -0
  40. package/dist/modules/board/sharedServiceMount.d.ts +30 -0
  41. package/dist/modules/board/sharedServiceMount.d.ts.map +1 -0
  42. package/dist/modules/board/sharedServiceMount.js +91 -0
  43. package/dist/modules/board/sharedServiceMount.js.map +1 -0
  44. package/dist/modules/execution/AgentDispatchController.d.ts.map +1 -1
  45. package/dist/modules/execution/AgentDispatchController.js +11 -17
  46. package/dist/modules/execution/AgentDispatchController.js.map +1 -1
  47. package/dist/modules/execution/CompanionController.d.ts.map +1 -1
  48. package/dist/modules/execution/CompanionController.js +5 -22
  49. package/dist/modules/execution/CompanionController.js.map +1 -1
  50. package/dist/modules/execution/DeployerStepController.d.ts.map +1 -1
  51. package/dist/modules/execution/DeployerStepController.js +2 -4
  52. package/dist/modules/execution/DeployerStepController.js.map +1 -1
  53. package/dist/modules/execution/FollowUpGateController.js +3 -3
  54. package/dist/modules/execution/FollowUpGateController.js.map +1 -1
  55. package/dist/modules/execution/ForkDecisionController.d.ts.map +1 -1
  56. package/dist/modules/execution/ForkDecisionController.js +1 -2
  57. package/dist/modules/execution/ForkDecisionController.js.map +1 -1
  58. package/dist/modules/execution/GateHelperDispatcher.d.ts.map +1 -1
  59. package/dist/modules/execution/GateHelperDispatcher.js +1 -2
  60. package/dist/modules/execution/GateHelperDispatcher.js.map +1 -1
  61. package/dist/modules/execution/GateStepController.d.ts.map +1 -1
  62. package/dist/modules/execution/GateStepController.js +1 -2
  63. package/dist/modules/execution/GateStepController.js.map +1 -1
  64. package/dist/modules/execution/HumanTestController.d.ts.map +1 -1
  65. package/dist/modules/execution/HumanTestController.js +7 -32
  66. package/dist/modules/execution/HumanTestController.js.map +1 -1
  67. package/dist/modules/execution/InterviewGateController.d.ts.map +1 -1
  68. package/dist/modules/execution/InterviewGateController.js +2 -21
  69. package/dist/modules/execution/InterviewGateController.js.map +1 -1
  70. package/dist/modules/execution/JudgeStepController.d.ts.map +1 -1
  71. package/dist/modules/execution/JudgeStepController.js +1 -2
  72. package/dist/modules/execution/JudgeStepController.js.map +1 -1
  73. package/dist/modules/execution/OneShotStepController.d.ts.map +1 -1
  74. package/dist/modules/execution/OneShotStepController.js +1 -2
  75. package/dist/modules/execution/OneShotStepController.js.map +1 -1
  76. package/dist/modules/execution/PollRunningController.d.ts.map +1 -1
  77. package/dist/modules/execution/PollRunningController.js +2 -4
  78. package/dist/modules/execution/PollRunningController.js.map +1 -1
  79. package/dist/modules/execution/RalphController.d.ts.map +1 -1
  80. package/dist/modules/execution/RalphController.js +5 -9
  81. package/dist/modules/execution/RalphController.js.map +1 -1
  82. package/dist/modules/execution/ReviewGateController.d.ts.map +1 -1
  83. package/dist/modules/execution/ReviewGateController.js +2 -20
  84. package/dist/modules/execution/ReviewGateController.js.map +1 -1
  85. package/dist/modules/execution/RunDispatcher.d.ts.map +1 -1
  86. package/dist/modules/execution/RunDispatcher.js +20 -58
  87. package/dist/modules/execution/RunDispatcher.js.map +1 -1
  88. package/dist/modules/execution/RunStateMachine.d.ts +49 -0
  89. package/dist/modules/execution/RunStateMachine.d.ts.map +1 -1
  90. package/dist/modules/execution/RunStateMachine.js +84 -0
  91. package/dist/modules/execution/RunStateMachine.js.map +1 -1
  92. package/dist/modules/execution/TesterController.d.ts.map +1 -1
  93. package/dist/modules/execution/TesterController.js +9 -21
  94. package/dist/modules/execution/TesterController.js.map +1 -1
  95. package/dist/modules/execution/VisualConfirmationController.d.ts.map +1 -1
  96. package/dist/modules/execution/VisualConfirmationController.js +6 -30
  97. package/dist/modules/execution/VisualConfirmationController.js.map +1 -1
  98. package/dist/modules/execution/step-fold.logic.d.ts +24 -0
  99. package/dist/modules/execution/step-fold.logic.d.ts.map +1 -1
  100. package/dist/modules/execution/step-fold.logic.js +29 -0
  101. package/dist/modules/execution/step-fold.logic.js.map +1 -1
  102. package/dist/modules/execution/stepPreamble.d.ts.map +1 -1
  103. package/dist/modules/execution/stepPreamble.js +2 -4
  104. package/dist/modules/execution/stepPreamble.js.map +1 -1
  105. package/dist/modules/notifications/NotificationService.d.ts.map +1 -1
  106. package/dist/modules/notifications/NotificationService.js +15 -9
  107. package/dist/modules/notifications/NotificationService.js.map +1 -1
  108. package/dist/modules/notifications/NotificationSettingsService.d.ts +28 -0
  109. package/dist/modules/notifications/NotificationSettingsService.d.ts.map +1 -0
  110. package/dist/modules/notifications/NotificationSettingsService.js +50 -0
  111. package/dist/modules/notifications/NotificationSettingsService.js.map +1 -0
  112. package/package.json +11 -11
@@ -0,0 +1,50 @@
1
+ import { decodeNotificationRoutingMatrix, isNotificationRouted, } from '@cat-factory/contracts';
2
+ export class NotificationSettingsService {
3
+ deps;
4
+ constructor(deps) {
5
+ this.deps = deps;
6
+ }
7
+ /** A workspace's settings; the empty matrix (everything on its default) when unconfigured. */
8
+ async get(workspaceId) {
9
+ const record = await this.deps.notificationSettingsRepository.getByWorkspace(workspaceId);
10
+ if (!record)
11
+ return { matrix: {}, updatedAt: 0 };
12
+ return { matrix: this.parseMatrix(record.matrixJson), updatedAt: record.updatedAt };
13
+ }
14
+ /** Replace a workspace's routing overrides (a full replace, like the Slack routing write). */
15
+ async update(workspaceId, matrix) {
16
+ const updatedAt = this.deps.clock.now();
17
+ await this.deps.notificationSettingsRepository.upsert({
18
+ workspaceId,
19
+ matrixJson: JSON.stringify(matrix),
20
+ updatedAt,
21
+ });
22
+ return { matrix, updatedAt };
23
+ }
24
+ /**
25
+ * The routing decision, for one delivery. One point read per notification per routed
26
+ * channel: notifications are raised at human scale (a run parks, a gate gives up), so
27
+ * this is not on any hot path, and a cached copy would answer with a mute the operator
28
+ * had already lifted.
29
+ */
30
+ async isRouted(workspaceId, type, channel) {
31
+ const { matrix } = await this.get(workspaceId);
32
+ return isNotificationRouted(matrix, type, channel);
33
+ }
34
+ /**
35
+ * Decode a stored matrix. The cell-by-cell tolerance (a retired type costs its own override
36
+ * and nothing else) lives in `@cat-factory/contracts` beside the resolution it feeds, so the
37
+ * settings UI decoding the same row reaches the same answer.
38
+ */
39
+ parseMatrix(matrixJson) {
40
+ try {
41
+ return decodeNotificationRoutingMatrix(JSON.parse(matrixJson));
42
+ }
43
+ catch {
44
+ // A corrupt row is, for routing, the same state as an unconfigured one: every cell falls
45
+ // back to its shipped default. Throwing here would run on the delivery path.
46
+ return {};
47
+ }
48
+ }
49
+ }
50
+ //# sourceMappingURL=NotificationSettingsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationSettingsService.js","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationSettingsService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,GAErB,MAAM,wBAAwB,CAAA;AAwB/B,MAAM,OAAO,2BAA2B;IACT,IAAI;IAAjC,YAA6B,IAA6C;oBAA7C,IAAI;IAA4C,CAAC;IAE9E,8FAA8F;IAC9F,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;QACzF,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;QAChD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAA;IACrF,CAAC;IAED,8FAA8F;IAC9F,KAAK,CAAC,MAAM,CACV,WAAmB,EACnB,MAAiC;QAEjC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;QACvC,MAAM,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC;YACpD,WAAW;YACX,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAClC,SAAS;SACV,CAAC,CAAA;QACF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;IAC9B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,WAAmB,EACnB,IAAsB,EACtB,OAAoC;QAEpC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAC9C,OAAO,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACpD,CAAC;IAED;;;;OAIG;IACK,WAAW,CAAC,UAAkB;QACpC,IAAI,CAAC;YACH,OAAO,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAA;QAChE,CAAC;QAAC,MAAM,CAAC;YACP,yFAAyF;YACzF,6EAA6E;YAC7E,OAAO,EAAE,CAAA;QACX,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.240.0",
3
+ "version": "0.242.0",
4
4
  "description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,20 +25,20 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "ai": "^7.0.51",
28
- "@cat-factory/agents": "0.117.12",
29
- "@cat-factory/caching": "0.18.13",
30
- "@cat-factory/contracts": "0.274.0",
31
- "@cat-factory/integrations": "0.150.0",
32
- "@cat-factory/kernel": "0.272.0",
33
- "@cat-factory/prompt-fragments": "1.0.22",
34
- "@cat-factory/sandbox": "0.11.99",
35
- "@cat-factory/spend": "0.15.40",
36
- "@cat-factory/workspaces": "0.26.12"
28
+ "@cat-factory/agents": "0.118.1",
29
+ "@cat-factory/caching": "0.18.15",
30
+ "@cat-factory/contracts": "0.276.0",
31
+ "@cat-factory/integrations": "0.152.0",
32
+ "@cat-factory/kernel": "0.274.0",
33
+ "@cat-factory/prompt-fragments": "1.0.24",
34
+ "@cat-factory/sandbox": "0.11.101",
35
+ "@cat-factory/spend": "0.15.42",
36
+ "@cat-factory/workspaces": "0.26.14"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "7.0.2",
40
40
  "vitest": "^4.1.10",
41
- "@cat-factory/sandbox-fixtures": "0.7.309"
41
+ "@cat-factory/sandbox-fixtures": "0.7.311"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsc -b tsconfig.build.json",