@cat-factory/orchestration 0.264.1 → 0.265.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.
- package/dist/container/dependencies.d.ts +15 -2
- package/dist/container/dependencies.d.ts.map +1 -1
- package/dist/container/execution-service.d.ts.map +1 -1
- package/dist/container/execution-service.js +8 -0
- package/dist/container/execution-service.js.map +1 -1
- package/dist/container/module-shapes.d.ts +12 -1
- package/dist/container/module-shapes.d.ts.map +1 -1
- package/dist/container/modules.d.ts +8 -1
- package/dist/container/modules.d.ts.map +1 -1
- package/dist/container/modules.js +29 -4
- package/dist/container/modules.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/board/BoardService.d.ts +9 -2
- package/dist/modules/board/BoardService.d.ts.map +1 -1
- package/dist/modules/board/BoardService.js +13 -5
- package/dist/modules/board/BoardService.js.map +1 -1
- package/dist/modules/board/boardPolicyGuards.d.ts +34 -0
- package/dist/modules/board/boardPolicyGuards.d.ts.map +1 -0
- package/dist/modules/board/boardPolicyGuards.js +31 -0
- package/dist/modules/board/boardPolicyGuards.js.map +1 -0
- package/dist/modules/board/presetPinGuard.d.ts +17 -1
- package/dist/modules/board/presetPinGuard.d.ts.map +1 -1
- package/dist/modules/board/presetPinGuard.js +9 -3
- package/dist/modules/board/presetPinGuard.js.map +1 -1
- package/dist/modules/board/riskPolicySelectionGuard.d.ts +7 -2
- package/dist/modules/board/riskPolicySelectionGuard.d.ts.map +1 -1
- package/dist/modules/board/riskPolicySelectionGuard.js +2 -2
- package/dist/modules/board/riskPolicySelectionGuard.js.map +1 -1
- package/dist/modules/execution/ExecutionService.js +2 -2
- package/dist/modules/execution/ExecutionService.js.map +1 -1
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts +6 -2
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts.map +1 -1
- package/dist/modules/execution/RunMergePolicy.d.ts +6 -2
- package/dist/modules/execution/RunMergePolicy.d.ts.map +1 -1
- package/dist/modules/execution/RunMergePolicy.js +1 -1
- package/dist/modules/execution/RunMergePolicy.js.map +1 -1
- package/dist/modules/merge/AccountRiskPolicyService.d.ts +57 -0
- package/dist/modules/merge/AccountRiskPolicyService.d.ts.map +1 -0
- package/dist/modules/merge/AccountRiskPolicyService.js +148 -0
- package/dist/modules/merge/AccountRiskPolicyService.js.map +1 -0
- package/dist/modules/merge/RiskPolicyService.d.ts +116 -10
- package/dist/modules/merge/RiskPolicyService.d.ts.map +1 -1
- package/dist/modules/merge/RiskPolicyService.js +208 -15
- package/dist/modules/merge/RiskPolicyService.js.map +1 -1
- package/dist/modules/merge/WorkspaceRiskPolicyLibrary.d.ts +100 -0
- package/dist/modules/merge/WorkspaceRiskPolicyLibrary.d.ts.map +1 -0
- package/dist/modules/merge/WorkspaceRiskPolicyLibrary.js +156 -0
- package/dist/modules/merge/WorkspaceRiskPolicyLibrary.js.map +1 -0
- package/dist/modules/merge/riskPolicyResolution.d.ts +8 -4
- package/dist/modules/merge/riskPolicyResolution.d.ts.map +1 -1
- package/dist/modules/merge/riskPolicyResolution.js +6 -2
- package/dist/modules/merge/riskPolicyResolution.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { describeRiskPolicySuppressions, mergeRiskPolicyTiers, resolveRiskPolicyTier, } from '@cat-factory/kernel';
|
|
2
|
+
/**
|
|
3
|
+
* A board's risk-policy library: its OWN policies merged with the account policies it inherits
|
|
4
|
+
* (ADR 0055), behind the same three reads every consumer already made of the workspace tier.
|
|
5
|
+
*
|
|
6
|
+
* It is the {@link WorkspaceRiskPolicyReader} the engine's `resolveRiskPolicy`, the board's two
|
|
7
|
+
* selection guards, the settings editor and the snapshot all hold, and that is the point: a
|
|
8
|
+
* resolution that admitted an id the editor calls hidden — or refused one a picker offered — would
|
|
9
|
+
* decide how much oversight a task's merge takes by a rule nobody can see. The PRECEDENCE itself
|
|
10
|
+
* lives in kernel (`mergeRiskPolicyTiers` / `resolveRiskPolicyTier`), so this class is only the I/O
|
|
11
|
+
* around it and the two cannot drift.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Build the library from a container's dependency bag, or `undefined` when no board tier is wired.
|
|
15
|
+
*
|
|
16
|
+
* Every consumer composes it through THIS factory rather than reaching for the repositories itself:
|
|
17
|
+
* the board guards, the engine's wiring and the risk-policy module each need the same three-store
|
|
18
|
+
* composition, and the one that assembled it by hand would be the one that forgot the suppression
|
|
19
|
+
* store and quietly resolved a policy the editor calls hidden. Instances hold no state, so building
|
|
20
|
+
* one per consumer costs nothing.
|
|
21
|
+
*/
|
|
22
|
+
export function createWorkspaceRiskPolicyLibrary(deps) {
|
|
23
|
+
if (!deps.riskPolicyRepository)
|
|
24
|
+
return undefined;
|
|
25
|
+
return new WorkspaceRiskPolicyLibrary({
|
|
26
|
+
riskPolicyRepository: deps.riskPolicyRepository,
|
|
27
|
+
accountRiskPolicyRepository: deps.accountRiskPolicyRepository,
|
|
28
|
+
riskPolicySuppressionRepository: deps.riskPolicySuppressionRepository,
|
|
29
|
+
workspaceRepository: deps.workspaceRepository,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export class WorkspaceRiskPolicyLibrary {
|
|
33
|
+
deps;
|
|
34
|
+
constructor(deps) {
|
|
35
|
+
this.deps = deps;
|
|
36
|
+
}
|
|
37
|
+
/** The merged library, account tier first, each entry tagged with the tier that owns it. */
|
|
38
|
+
async list(workspaceId) {
|
|
39
|
+
const [workspacePolicies, inherited] = await Promise.all([
|
|
40
|
+
this.deps.riskPolicyRepository.list(workspaceId),
|
|
41
|
+
this.inheritedTier(workspaceId),
|
|
42
|
+
]);
|
|
43
|
+
return mergeRiskPolicyTiers({ ...inherited, workspacePolicies });
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* One policy by id, under the same precedence {@link list} applies.
|
|
47
|
+
*
|
|
48
|
+
* The board's own tier is read FIRST and answers alone when it hits, which is both the correct
|
|
49
|
+
* precedence and the common case: a task usually pins a policy its own board holds, and paying
|
|
50
|
+
* for the account reads only on a miss keeps the engine's per-gate resolution at one query where
|
|
51
|
+
* it already was.
|
|
52
|
+
*/
|
|
53
|
+
async get(workspaceId, id) {
|
|
54
|
+
const own = await this.deps.riskPolicyRepository.get(workspaceId, id);
|
|
55
|
+
if (own)
|
|
56
|
+
return resolveRiskPolicyTier({ workspacePolicy: own, accountPolicy: null, suppressed: false });
|
|
57
|
+
const accountId = await this.accountOf(workspaceId);
|
|
58
|
+
if (!accountId)
|
|
59
|
+
return null;
|
|
60
|
+
const [accountPolicy, suppressedIds] = await Promise.all([
|
|
61
|
+
this.deps.accountRiskPolicyRepository?.get(accountId, id) ?? Promise.resolve(null),
|
|
62
|
+
this.suppressedIds(workspaceId),
|
|
63
|
+
]);
|
|
64
|
+
return resolveRiskPolicyTier({
|
|
65
|
+
workspacePolicy: null,
|
|
66
|
+
accountPolicy,
|
|
67
|
+
suppressed: suppressedIds.includes(id),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The board's default for one scope — the WORKSPACE tier's own answer, unchanged by inheritance.
|
|
72
|
+
*
|
|
73
|
+
* A delegate rather than a merge, and deliberately so: an account row carries no default claim
|
|
74
|
+
* (see `AccountRiskPolicy`), because which policy governs a task that pinned nothing is a
|
|
75
|
+
* per-board question that no single account row could answer correctly for every board under it.
|
|
76
|
+
* A board that wants an inherited posture as its default clones it and promotes the copy.
|
|
77
|
+
*/
|
|
78
|
+
getDefault(workspaceId, scope) {
|
|
79
|
+
return this.deps.riskPolicyRepository.getDefault(workspaceId, scope);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* What this board hides, joined against the account tier for identity — including the entries
|
|
83
|
+
* that now hide nothing because the account withdrew the policy (see
|
|
84
|
+
* `describeRiskPolicySuppressions`).
|
|
85
|
+
*/
|
|
86
|
+
async listSuppressions(workspaceId) {
|
|
87
|
+
const suppressedIds = await this.suppressedIds(workspaceId);
|
|
88
|
+
if (suppressedIds.length === 0)
|
|
89
|
+
return [];
|
|
90
|
+
const accountId = await this.accountOf(workspaceId);
|
|
91
|
+
// Only the suppressed ids, in ONE batched read: a board hides a handful of policies out of a
|
|
92
|
+
// tier that an account is free to grow, so listing the whole tier to name a few rows would
|
|
93
|
+
// read more the larger the account got.
|
|
94
|
+
const named = accountId && this.deps.accountRiskPolicyRepository
|
|
95
|
+
? await this.deps.accountRiskPolicyRepository.listByIds(accountId, suppressedIds)
|
|
96
|
+
: [];
|
|
97
|
+
return describeRiskPolicySuppressions(suppressedIds, named);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The account policy this board actually INHERITS under `id`, or null.
|
|
101
|
+
*
|
|
102
|
+
* Suppression-aware, under exactly the precedence {@link list} and {@link get} apply, because that
|
|
103
|
+
* is what makes this the merged reader rather than a second opinion: a hidden id is absent from the
|
|
104
|
+
* library, so a guard answering off the raw account row would let a board CLONE a posture it had
|
|
105
|
+
* just opted out of, and would tell an operator editing that id that the account governs their
|
|
106
|
+
* board when the board has withdrawn it.
|
|
107
|
+
*/
|
|
108
|
+
async inheritedPolicy(workspaceId, id) {
|
|
109
|
+
const [policy, suppressedIds] = await Promise.all([
|
|
110
|
+
this.accountPolicy(workspaceId, id),
|
|
111
|
+
this.suppressedIds(workspaceId),
|
|
112
|
+
]);
|
|
113
|
+
return policy && !suppressedIds.includes(id) ? policy : null;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* What the ACCOUNT defines under `id`, whether or not this board hides it.
|
|
117
|
+
*
|
|
118
|
+
* Deliberately suppression-BLIND, and its own method rather than a flag on the one above, for the
|
|
119
|
+
* single caller that needs it: hiding is idempotent, so hiding an already-hidden policy has to
|
|
120
|
+
* settle as the state it already is. Asked through {@link inheritedPolicy} that request would 404
|
|
121
|
+
* on the second click, which is a refusal reporting a failure for a board that is in exactly the
|
|
122
|
+
* state the request asked for.
|
|
123
|
+
*/
|
|
124
|
+
async accountPolicy(workspaceId, id) {
|
|
125
|
+
const accountId = await this.accountOf(workspaceId);
|
|
126
|
+
if (!accountId || !this.deps.accountRiskPolicyRepository)
|
|
127
|
+
return null;
|
|
128
|
+
return this.deps.accountRiskPolicyRepository.get(accountId, id);
|
|
129
|
+
}
|
|
130
|
+
/** The account tier as the merge wants it: its policies plus this board's suppressions. */
|
|
131
|
+
async inheritedTier(workspaceId) {
|
|
132
|
+
const accountId = await this.accountOf(workspaceId);
|
|
133
|
+
// A board with no account inherits nothing, so neither read is worth making.
|
|
134
|
+
if (!accountId)
|
|
135
|
+
return { accountPolicies: [], suppressedIds: [] };
|
|
136
|
+
const [accountPolicies, suppressedIds] = await Promise.all([
|
|
137
|
+
this.deps.accountRiskPolicyRepository?.list(accountId) ?? Promise.resolve([]),
|
|
138
|
+
this.suppressedIds(workspaceId),
|
|
139
|
+
]);
|
|
140
|
+
return { accountPolicies, suppressedIds };
|
|
141
|
+
}
|
|
142
|
+
suppressedIds(workspaceId) {
|
|
143
|
+
return this.deps.riskPolicySuppressionRepository?.list(workspaceId) ?? Promise.resolve([]);
|
|
144
|
+
}
|
|
145
|
+
async accountOf(workspaceId) {
|
|
146
|
+
// No account tier wired ⇒ nothing to address, so the lookup itself is skipped rather than
|
|
147
|
+
// made and discarded. This is the pass-through: every read answers the workspace tier alone.
|
|
148
|
+
if (!this.deps.accountRiskPolicyRepository)
|
|
149
|
+
return null;
|
|
150
|
+
// The port answers `undefined` for a board it cannot place and `null` for one with no account;
|
|
151
|
+
// both mean "inherits nothing here", and normalising once keeps every caller above from having
|
|
152
|
+
// to know there are two spellings of it.
|
|
153
|
+
return (await this.deps.workspaceRepository.accountOf(workspaceId)) ?? null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=WorkspaceRiskPolicyLibrary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Workspace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AAE,CAAC;YAC7E,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;SAChC,CAAC,CAAA;QACF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,CAAA;IAC3C,CAAC;IAEO,aAAa,CAAC,WAAmB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC5F,CAAC;IAEO,KAAK,CAAC,SAAS,CAAC,WAAmB;QACzC,0FAA0F;QAC1F,6FAA6F;QAC7F,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B;YAAE,OAAO,IAAI,CAAA;QACvD,+FAA+F;QAC/F,+FAA+F;QAC/F,yCAAyC;QACzC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,IAAI,CAAA;IAC7E,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GroupCacheHandle, RiskPolicy, RiskPolicyCacheValue, RunDefaultScope } from '@cat-factory/kernel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WorkspaceRiskPolicyReader } from '@cat-factory/kernel';
|
|
3
3
|
import type { ResolvedRunRiskPolicy } from '../execution/policy-types.js';
|
|
4
4
|
/**
|
|
5
5
|
* WHICH row a resolution wants: the id the task pinned, or the workspace's default.
|
|
@@ -44,16 +44,20 @@ export declare function preloadedRiskPolicyRead(library: readonly RiskPolicy[]):
|
|
|
44
44
|
/**
|
|
45
45
|
* Resolve the preset governing `riskPolicyId` in a workspace.
|
|
46
46
|
*
|
|
47
|
-
* An ABSENT
|
|
47
|
+
* An ABSENT reader is not a hole to guard: with no preset library there is nothing for a task
|
|
48
48
|
* to point at, so every task in the deployment is governed by {@link FALLBACK_RISK_POLICY}, whose
|
|
49
49
|
* role layer is empty and therefore holds nobody to anything, and which auto-merges nothing, so
|
|
50
50
|
* the deployment that configured no policy lands no PR without a human.
|
|
51
51
|
*
|
|
52
|
-
* A wired
|
|
52
|
+
* A wired reader answers from a library the board was seeded with at CREATION, so reaching
|
|
53
53
|
* the fallback is a deployment-level fact rather than a question of who had read what first.
|
|
54
|
+
*
|
|
55
|
+
* It is a `WorkspaceRiskPolicyReader` and not the workspace-tier repository, because a board's
|
|
56
|
+
* library includes the account policies it INHERITS (ADR 0055): a task may pin one, and the same
|
|
57
|
+
* merged view the picker offered has to be the one that governs the run.
|
|
54
58
|
*/
|
|
55
59
|
export declare function resolveRiskPolicy(input: {
|
|
56
|
-
repository:
|
|
60
|
+
repository: WorkspaceRiskPolicyReader | undefined;
|
|
57
61
|
workspaceId: string;
|
|
58
62
|
riskPolicyId: string | null | undefined;
|
|
59
63
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"riskPolicyResolution.d.ts","sourceRoot":"","sources":["../../../src/modules/merge/riskPolicyResolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"riskPolicyResolution.d.ts","sourceRoot":"","sources":["../../../src/modules/merge/riskPolicyResolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAEpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAkBzE;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAAA;AAE/C,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG,CAC3B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,KACnC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;AAE/B,kGAAkG;AAClG,eAAO,MAAM,oBAAoB,EAAE,cAA0C,CAAA;AAa7E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,GAAG,SAAS,EACzD,WAAW,EAAE,MAAM,GAClB,cAAc,CAKhB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,cAAc,CAUtF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE;IAC7C,UAAU,EAAE,yBAAyB,GAAG,SAAS,CAAA;IACjD,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACvC;;;;OAIG;IACH,KAAK,EAAE,eAAe,CAAA;IACtB,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAcjC"}
|
|
@@ -47,13 +47,17 @@ export function preloadedRiskPolicyRead(library) {
|
|
|
47
47
|
/**
|
|
48
48
|
* Resolve the preset governing `riskPolicyId` in a workspace.
|
|
49
49
|
*
|
|
50
|
-
* An ABSENT
|
|
50
|
+
* An ABSENT reader is not a hole to guard: with no preset library there is nothing for a task
|
|
51
51
|
* to point at, so every task in the deployment is governed by {@link FALLBACK_RISK_POLICY}, whose
|
|
52
52
|
* role layer is empty and therefore holds nobody to anything, and which auto-merges nothing, so
|
|
53
53
|
* the deployment that configured no policy lands no PR without a human.
|
|
54
54
|
*
|
|
55
|
-
* A wired
|
|
55
|
+
* A wired reader answers from a library the board was seeded with at CREATION, so reaching
|
|
56
56
|
* the fallback is a deployment-level fact rather than a question of who had read what first.
|
|
57
|
+
*
|
|
58
|
+
* It is a `WorkspaceRiskPolicyReader` and not the workspace-tier repository, because a board's
|
|
59
|
+
* library includes the account policies it INHERITS (ADR 0055): a task may pin one, and the same
|
|
60
|
+
* merged view the picker offered has to be the one that governs the run.
|
|
57
61
|
*/
|
|
58
62
|
export async function resolveRiskPolicy(input) {
|
|
59
63
|
const { repository, workspaceId, riskPolicyId, scope } = input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"riskPolicyResolution.js","sourceRoot":"","sources":["../../../src/modules/merge/riskPolicyResolution.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAqC1D,kGAAkG;AAClG,MAAM,CAAC,MAAM,oBAAoB,GAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;AAE7E;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,MAAwB;IAC1C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,KAAK,EAAE,CAAA;AACrF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAyD,EACzD,WAAmB;IAEnB,IAAI,CAAC,KAAK;QAAE,OAAO,oBAAoB,CAAA;IACvC,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAC5B,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;SACvF,MAAM,CAAA;AACb,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,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AK,CAAA;IAC9D,IAAI,CAAC,UAAU;QAAE,OAAO,oBAAoB,CAAA;IAC5C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,oBAAoB,CAAA;IAC/C,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,CACnE,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAC1C,CAAA;QACD,IAAI,MAAM;YAAE,OAAO,MAAM,CAAA;IAC3B,CAAC;IACD,OAAO,CACL,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;QACzF,oBAAoB,CACrB,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/orchestration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.265.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.58",
|
|
28
|
-
"@cat-factory/agents": "0.127.
|
|
29
|
-
"@cat-factory/caching": "0.20.
|
|
30
|
-
"@cat-factory/contracts": "0.
|
|
31
|
-
"@cat-factory/
|
|
32
|
-
"@cat-factory/
|
|
33
|
-
"@cat-factory/
|
|
34
|
-
"@cat-factory/sandbox": "0.11.
|
|
35
|
-
"@cat-factory/
|
|
36
|
-
"@cat-factory/
|
|
28
|
+
"@cat-factory/agents": "0.127.1",
|
|
29
|
+
"@cat-factory/caching": "0.20.10",
|
|
30
|
+
"@cat-factory/contracts": "0.303.0",
|
|
31
|
+
"@cat-factory/kernel": "0.294.0",
|
|
32
|
+
"@cat-factory/integrations": "0.160.8",
|
|
33
|
+
"@cat-factory/spend": "0.15.83",
|
|
34
|
+
"@cat-factory/sandbox": "0.11.142",
|
|
35
|
+
"@cat-factory/workspaces": "0.27.27",
|
|
36
|
+
"@cat-factory/prompt-fragments": "1.0.65"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "7.0.2",
|
|
40
40
|
"vitest": "^4.1.10",
|
|
41
|
-
"@cat-factory/sandbox-fixtures": "0.7.
|
|
41
|
+
"@cat-factory/sandbox-fixtures": "0.7.344"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsc -b tsconfig.build.json",
|