@cat-factory/consensus 0.10.77 → 0.11.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/traits.d.ts +7 -5
- package/dist/traits.d.ts.map +1 -1
- package/dist/traits.js +10 -8
- package/dist/traits.js.map +1 -1
- package/package.json +4 -4
package/dist/traits.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const STRATEGY_TRAIT: Record<ConsensusStrategy, string>;
|
|
|
9
9
|
export declare const CONSENSUS_TRAITS: readonly ["specialist-panel-capable", "debate-capable", "ranked-voting-capable"];
|
|
10
10
|
/**
|
|
11
11
|
* The default-eligible kinds, each carrying all three consensus traits. A deployment
|
|
12
|
-
* can extend this
|
|
12
|
+
* can extend this by assigning them to more kinds. NOTE: `architect` and `analysis` run
|
|
13
13
|
* in a container against a real checkout in their standard mode; in CONSENSUS mode they
|
|
14
14
|
* reason inline over the provided context (spec + requirements + prior outputs) rather
|
|
15
15
|
* than exploring the checkout — a deliberate trade made worthwhile by the gating, which
|
|
@@ -22,13 +22,15 @@ export declare const CONSENSUS_TRAITS: readonly ["specialist-panel-capable", "de
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const DEFAULT_CONSENSUS_ELIGIBLE_KINDS: AgentKind[];
|
|
24
24
|
/**
|
|
25
|
-
* Register the consensus capability traits and assign them to the default-eligible
|
|
26
|
-
*
|
|
27
|
-
* mirroring the custom-agent /
|
|
25
|
+
* Register the consensus capability traits and assign them to the default-eligible kinds on the
|
|
26
|
+
* app-owned {@link AgentKindRegistry} instance the facade threads through its container. A
|
|
27
|
+
* startup wiring step each facade calls when consensus is enabled, mirroring the custom-agent /
|
|
28
|
+
* model-provider registry seams. Idempotent.
|
|
28
29
|
*
|
|
30
|
+
* @param registry the app-owned agent-kind registry to register the traits/assignments on.
|
|
29
31
|
* @param kinds override the default-eligible set (e.g. a deployment's own kinds).
|
|
30
32
|
*/
|
|
31
|
-
export declare function registerConsensusTraits(kinds?: AgentKind[]): void;
|
|
33
|
+
export declare function registerConsensusTraits(registry: AgentKindRegistry, kinds?: AgentKind[]): void;
|
|
32
34
|
/** The consensus strategies a kind is eligible for, derived from its traits. */
|
|
33
35
|
export declare function consensusStrategiesFor(kind: AgentKind, registry: AgentKindRegistry): ConsensusStrategy[];
|
|
34
36
|
/** Whether a kind is eligible for at least one consensus strategy. */
|
package/dist/traits.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["../src/traits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAU5D,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,cAAc,mBAAmB,CAAA;AAC9C,eAAO,MAAM,qBAAqB,0BAA0B,CAAA;AAE5D,8DAA8D;AAC9D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAI5D,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,kFAInB,CAAA;AAEV;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,EAKvD,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["../src/traits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAU5D,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,cAAc,mBAAmB,CAAA;AAC9C,eAAO,MAAM,qBAAqB,0BAA0B,CAAA;AAE5D,8DAA8D;AAC9D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAI5D,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,kFAInB,CAAA;AAEV;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,EAKvD,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,GAAE,SAAS,EAAqC,GACpD,IAAI,CAGN;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,iBAAiB,GAC1B,iBAAiB,EAAE,CAKrB;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAEzF"}
|
package/dist/traits.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { traitsFor } from '@cat-factory/agents';
|
|
2
2
|
import { TASK_ESTIMATOR_AGENT_KIND } from '@cat-factory/agents';
|
|
3
3
|
// The group of consensus CAPABILITY traits an agent kind can carry. Each marks the
|
|
4
4
|
// kind eligible for one consensus strategy: when a step's kind carries the trait, the
|
|
@@ -22,7 +22,7 @@ export const CONSENSUS_TRAITS = [
|
|
|
22
22
|
];
|
|
23
23
|
/**
|
|
24
24
|
* The default-eligible kinds, each carrying all three consensus traits. A deployment
|
|
25
|
-
* can extend this
|
|
25
|
+
* can extend this by assigning them to more kinds. NOTE: `architect` and `analysis` run
|
|
26
26
|
* in a container against a real checkout in their standard mode; in CONSENSUS mode they
|
|
27
27
|
* reason inline over the provided context (spec + requirements + prior outputs) rather
|
|
28
28
|
* than exploring the checkout — a deliberate trade made worthwhile by the gating, which
|
|
@@ -40,17 +40,19 @@ export const DEFAULT_CONSENSUS_ELIGIBLE_KINDS = [
|
|
|
40
40
|
TASK_ESTIMATOR_AGENT_KIND,
|
|
41
41
|
];
|
|
42
42
|
/**
|
|
43
|
-
* Register the consensus capability traits and assign them to the default-eligible
|
|
44
|
-
*
|
|
45
|
-
* mirroring the custom-agent /
|
|
43
|
+
* Register the consensus capability traits and assign them to the default-eligible kinds on the
|
|
44
|
+
* app-owned {@link AgentKindRegistry} instance the facade threads through its container. A
|
|
45
|
+
* startup wiring step each facade calls when consensus is enabled, mirroring the custom-agent /
|
|
46
|
+
* model-provider registry seams. Idempotent.
|
|
46
47
|
*
|
|
48
|
+
* @param registry the app-owned agent-kind registry to register the traits/assignments on.
|
|
47
49
|
* @param kinds override the default-eligible set (e.g. a deployment's own kinds).
|
|
48
50
|
*/
|
|
49
|
-
export function registerConsensusTraits(kinds = DEFAULT_CONSENSUS_ELIGIBLE_KINDS) {
|
|
51
|
+
export function registerConsensusTraits(registry, kinds = DEFAULT_CONSENSUS_ELIGIBLE_KINDS) {
|
|
50
52
|
for (const trait of CONSENSUS_TRAITS)
|
|
51
|
-
|
|
53
|
+
registry.registerTrait({ id: trait });
|
|
52
54
|
for (const kind of kinds)
|
|
53
|
-
|
|
55
|
+
registry.assignTraits(kind, CONSENSUS_TRAITS);
|
|
54
56
|
}
|
|
55
57
|
/** The consensus strategies a kind is eligible for, derived from its traits. */
|
|
56
58
|
export function consensusStrategiesFor(kind, registry) {
|
package/dist/traits.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traits.js","sourceRoot":"","sources":["../src/traits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"traits.js","sourceRoot":"","sources":["../src/traits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAE/D,mFAAmF;AACnF,sFAAsF;AACtF,uFAAuF;AACvF,kFAAkF;AAClF,qFAAqF;AAErF,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAA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1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/consensus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Optional consensus-orchestration mechanism (specialist panel / debate / ranked voting) for cat-factory agent steps, with task-estimate gating.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^6.0.230",
|
|
28
|
-
"@cat-factory/agents": "0.
|
|
29
|
-
"@cat-factory/contracts": "0.
|
|
30
|
-
"@cat-factory/kernel": "0.
|
|
28
|
+
"@cat-factory/agents": "0.65.0",
|
|
29
|
+
"@cat-factory/contracts": "0.149.0",
|
|
30
|
+
"@cat-factory/kernel": "0.143.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "7.0.2",
|