@cat-factory/contracts 0.6.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/LICENSE +21 -0
- package/dist/accounts.d.ts +103 -0
- package/dist/accounts.d.ts.map +1 -0
- package/dist/accounts.js +102 -0
- package/dist/accounts.js.map +1 -0
- package/dist/agent-config.d.ts +77 -0
- package/dist/agent-config.d.ts.map +1 -0
- package/dist/agent-config.js +78 -0
- package/dist/agent-config.js.map +1 -0
- package/dist/api-keys.d.ts +44 -0
- package/dist/api-keys.d.ts.map +1 -0
- package/dist/api-keys.js +49 -0
- package/dist/api-keys.js.map +1 -0
- package/dist/auth.d.ts +24 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +15 -0
- package/dist/auth.js.map +1 -0
- package/dist/board-scan.d.ts +89 -0
- package/dist/board-scan.d.ts.map +1 -0
- package/dist/board-scan.js +122 -0
- package/dist/board-scan.js.map +1 -0
- package/dist/bootstrap.d.ts +168 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +148 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/clarity.d.ts +75 -0
- package/dist/clarity.d.ts.map +1 -0
- package/dist/clarity.js +66 -0
- package/dist/clarity.js.map +1 -0
- package/dist/companion.d.ts +32 -0
- package/dist/companion.d.ts.map +1 -0
- package/dist/companion.js +43 -0
- package/dist/companion.js.map +1 -0
- package/dist/consensus.d.ts +195 -0
- package/dist/consensus.d.ts.map +1 -0
- package/dist/consensus.js +164 -0
- package/dist/consensus.js.map +1 -0
- package/dist/documents.d.ts +197 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +161 -0
- package/dist/documents.js.map +1 -0
- package/dist/entities.d.ts +1691 -0
- package/dist/entities.d.ts.map +1 -0
- package/dist/entities.js +853 -0
- package/dist/entities.js.map +1 -0
- package/dist/environments.d.ts +426 -0
- package/dist/environments.d.ts.map +1 -0
- package/dist/environments.js +190 -0
- package/dist/environments.js.map +1 -0
- package/dist/events.d.ts +98 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +2 -0
- package/dist/events.js.map +1 -0
- package/dist/fragment-library.d.ts +123 -0
- package/dist/fragment-library.d.ts.map +1 -0
- package/dist/fragment-library.js +88 -0
- package/dist/fragment-library.js.map +1 -0
- package/dist/github.d.ts +215 -0
- package/dist/github.d.ts.map +1 -0
- package/dist/github.js +204 -0
- package/dist/github.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/iteration-cap.d.ts +17 -0
- package/dist/iteration-cap.d.ts.map +1 -0
- package/dist/iteration-cap.js +25 -0
- package/dist/iteration-cap.js.map +1 -0
- package/dist/localModels.d.ts +54 -0
- package/dist/localModels.d.ts.map +1 -0
- package/dist/localModels.js +79 -0
- package/dist/localModels.js.map +1 -0
- package/dist/merge.d.ts +106 -0
- package/dist/merge.d.ts.map +1 -0
- package/dist/merge.js +129 -0
- package/dist/merge.js.map +1 -0
- package/dist/model-defaults.d.ts +23 -0
- package/dist/model-defaults.d.ts.map +1 -0
- package/dist/model-defaults.js +34 -0
- package/dist/model-defaults.js.map +1 -0
- package/dist/notifications.d.ts +136 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +125 -0
- package/dist/notifications.js.map +1 -0
- package/dist/observability.d.ts +271 -0
- package/dist/observability.d.ts.map +1 -0
- package/dist/observability.js +152 -0
- package/dist/observability.js.map +1 -0
- package/dist/personal-subscriptions.d.ts +66 -0
- package/dist/personal-subscriptions.d.ts.map +1 -0
- package/dist/personal-subscriptions.js +70 -0
- package/dist/personal-subscriptions.js.map +1 -0
- package/dist/primitives.d.ts +57 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +66 -0
- package/dist/primitives.js.map +1 -0
- package/dist/provisioning.d.ts +46 -0
- package/dist/provisioning.d.ts.map +1 -0
- package/dist/provisioning.js +107 -0
- package/dist/provisioning.js.map +1 -0
- package/dist/recurring.d.ts +117 -0
- package/dist/recurring.d.ts.map +1 -0
- package/dist/recurring.js +99 -0
- package/dist/recurring.js.map +1 -0
- package/dist/release.d.ts +60 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +75 -0
- package/dist/release.js.map +1 -0
- package/dist/requests.d.ts +451 -0
- package/dist/requests.d.ts.map +1 -0
- package/dist/requests.js +231 -0
- package/dist/requests.js.map +1 -0
- package/dist/requirements.d.ts +127 -0
- package/dist/requirements.d.ts.map +1 -0
- package/dist/requirements.js +137 -0
- package/dist/requirements.js.map +1 -0
- package/dist/runners.d.ts +387 -0
- package/dist/runners.d.ts.map +1 -0
- package/dist/runners.js +117 -0
- package/dist/runners.js.map +1 -0
- package/dist/sandbox.d.ts +300 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +243 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/service-fragment-defaults.d.ts +16 -0
- package/dist/service-fragment-defaults.d.ts.map +1 -0
- package/dist/service-fragment-defaults.js +23 -0
- package/dist/service-fragment-defaults.js.map +1 -0
- package/dist/services.d.ts +81 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +77 -0
- package/dist/services.js.map +1 -0
- package/dist/slack.d.ts +104 -0
- package/dist/slack.d.ts.map +1 -0
- package/dist/slack.js +98 -0
- package/dist/slack.js.map +1 -0
- package/dist/snapshot.d.ts +522 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +104 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/spec.d.ts +174 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +173 -0
- package/dist/spec.js.map +1 -0
- package/dist/tasks.d.ts +150 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +146 -0
- package/dist/tasks.js.map +1 -0
- package/dist/testing.d.ts +67 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +64 -0
- package/dist/testing.js.map +1 -0
- package/dist/tracker.d.ts +18 -0
- package/dist/tracker.d.ts.map +1 -0
- package/dist/tracker.js +24 -0
- package/dist/tracker.js.map +1 -0
- package/dist/vendor-credentials.d.ts +37 -0
- package/dist/vendor-credentials.d.ts.map +1 -0
- package/dist/vendor-credentials.js +40 -0
- package/dist/vendor-credentials.js.map +1 -0
- package/dist/workspace-settings.d.ts +36 -0
- package/dist/workspace-settings.d.ts.map +1 -0
- package/dist/workspace-settings.js +41 -0
- package/dist/workspace-settings.js.map +1 -0
- package/package.json +31 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/** A single triage finding the clarity reviewer raised — same shape as a requirements item. */
|
|
3
|
+
export declare const clarityReviewItemSchema: v.ObjectSchema<{
|
|
4
|
+
readonly id: v.StringSchema<undefined>;
|
|
5
|
+
readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
|
|
6
|
+
readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
|
|
7
|
+
readonly title: v.StringSchema<undefined>;
|
|
8
|
+
readonly detail: v.StringSchema<undefined>;
|
|
9
|
+
readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed"], undefined>;
|
|
10
|
+
readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
11
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
12
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
export type ClarityReviewItem = v.InferOutput<typeof clarityReviewItemSchema>;
|
|
15
|
+
/** Lifecycle of a clarity review as a whole — identical to the requirements review lifecycle. */
|
|
16
|
+
export declare const clarityReviewStatusSchema: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
|
|
17
|
+
export type ClarityReviewStatus = v.InferOutput<typeof clarityReviewStatusSchema>;
|
|
18
|
+
/** A clarity (bug-report triage) review for one board block. */
|
|
19
|
+
export declare const clarityReviewSchema: v.ObjectSchema<{
|
|
20
|
+
readonly id: v.StringSchema<undefined>;
|
|
21
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
22
|
+
readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
|
|
23
|
+
readonly items: v.ArraySchema<v.ObjectSchema<{
|
|
24
|
+
readonly id: v.StringSchema<undefined>;
|
|
25
|
+
readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
|
|
26
|
+
readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
|
|
27
|
+
readonly title: v.StringSchema<undefined>;
|
|
28
|
+
readonly detail: v.StringSchema<undefined>;
|
|
29
|
+
readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed"], undefined>;
|
|
30
|
+
readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
31
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
32
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
33
|
+
}, undefined>, undefined>;
|
|
34
|
+
/** `provider:model` that produced the review, for transparency; null in tests. */
|
|
35
|
+
readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* The clarified bug report the incorporation companion last folded the answers into.
|
|
38
|
+
* Set once a doc has been produced (status `merged`/`incorporated`); null while still
|
|
39
|
+
* awaiting answers on the first pass. Consumed by every downstream agent step + the
|
|
40
|
+
* spec-writer once the phase is settled.
|
|
41
|
+
*/
|
|
42
|
+
readonly clarifiedReport: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
43
|
+
/** How many reviewer passes have run so far (the initial review is iteration 1). */
|
|
44
|
+
readonly iteration: v.OptionalSchema<v.NumberSchema<undefined>, 1>;
|
|
45
|
+
/** The reviewer-pass budget, snapshotted from the task's merge preset when the review started. */
|
|
46
|
+
readonly maxIterations: v.OptionalSchema<v.NumberSchema<undefined>, 1>;
|
|
47
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
48
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
49
|
+
}, undefined>;
|
|
50
|
+
export type ClarityReview = v.InferOutput<typeof clarityReviewSchema>;
|
|
51
|
+
/** Record a human's answer to a single clarity review item. */
|
|
52
|
+
export declare const replyClarityItemSchema: v.ObjectSchema<{
|
|
53
|
+
readonly reply: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
|
|
54
|
+
}, undefined>;
|
|
55
|
+
export type ReplyClarityItemInput = v.InferOutput<typeof replyClarityItemSchema>;
|
|
56
|
+
/** Set a clarity review item's status (resolve / dismiss / reopen). */
|
|
57
|
+
export declare const updateClarityItemStatusSchema: v.ObjectSchema<{
|
|
58
|
+
readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed"], undefined>;
|
|
59
|
+
}, undefined>;
|
|
60
|
+
export type UpdateClarityItemStatusInput = v.InferOutput<typeof updateClarityItemStatusSchema>;
|
|
61
|
+
/**
|
|
62
|
+
* Incorporate the settled answers into a standardized, clear bug report. An optional
|
|
63
|
+
* `feedback` comment is the human's "do it differently" lever when redoing a merge.
|
|
64
|
+
*/
|
|
65
|
+
export declare const incorporateClaritySchema: v.ObjectSchema<{
|
|
66
|
+
readonly feedback: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
67
|
+
}, undefined>;
|
|
68
|
+
export type IncorporateClarityInput = v.InferOutput<typeof incorporateClaritySchema>;
|
|
69
|
+
/** How a human resolves a clarity review that hit its iteration cap with findings open. */
|
|
70
|
+
export declare const resolveClarityExceededSchema: v.ObjectSchema<{
|
|
71
|
+
readonly choice: v.PicklistSchema<["extra-round", "proceed", "stop-reset"], undefined>;
|
|
72
|
+
}, undefined>;
|
|
73
|
+
export type ResolveClarityExceededInput = v.InferOutput<typeof resolveClarityExceededSchema>;
|
|
74
|
+
export type ResolveClarityExceededChoice = ResolveClarityExceededInput['choice'];
|
|
75
|
+
//# sourceMappingURL=clarity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clarity.d.ts","sourceRoot":"","sources":["../src/clarity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAqB5B,+FAA+F;AAC/F,eAAO,MAAM,uBAAuB;;;;;;;;;;aAA8B,CAAA;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,4GAAgC,CAAA;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,gEAAgE;AAChE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;IAK9B,kFAAkF;;IAElF;;;;;OAKG;;IAEH,oFAAoF;;IAEpF,kGAAkG;;;;aAIlG,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAIrE,+DAA+D;AAC/D,eAAO,MAAM,sBAAsB;;aAEjC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAEhF,uEAAuE;AACvE,eAAO,MAAM,6BAA6B;;aAExC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAE9F;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;aAEnC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEpF,2FAA2F;AAC3F,eAAO,MAAM,4BAA4B;;aAEvC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAC5F,MAAM,MAAM,4BAA4B,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAA"}
|
package/dist/clarity.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { iterationCapChoiceSchema } from './iteration-cap.js';
|
|
3
|
+
import { requirementReviewItemSchema, requirementReviewStatusSchema } from './requirements.js';
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Clarity-review wire contracts. A clarity reviewer triages a board block's BUG
|
|
6
|
+
// REPORT — its description plus any context an upstream `bug-investigator` step
|
|
7
|
+
// enriched it with — for *fixability*: are the repro steps, expected-vs-actual
|
|
8
|
+
// behaviour, environment, affected area and scope clear enough to act on? It
|
|
9
|
+
// raises review items (the same shape as the requirements reviewer's) each with a
|
|
10
|
+
// severity. A human answers or dismisses each; an incorporation companion folds the
|
|
11
|
+
// answers into ONE standardized, clear bug report, then the reviewer re-reviews it.
|
|
12
|
+
// The cycle repeats until the reviewer is clean (or every remaining finding is
|
|
13
|
+
// dismissed / tolerated by the task's severity threshold), or the task's iteration
|
|
14
|
+
// cap is hit and a human picks how to proceed.
|
|
15
|
+
//
|
|
16
|
+
// This is the requirements-review flow applied to a different subject, so it REUSES
|
|
17
|
+
// the requirements review item + status shapes (one source of truth) and differs
|
|
18
|
+
// only in subject and in the persisted document field name (`clarifiedReport`).
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/** A single triage finding the clarity reviewer raised — same shape as a requirements item. */
|
|
21
|
+
export const clarityReviewItemSchema = requirementReviewItemSchema;
|
|
22
|
+
/** Lifecycle of a clarity review as a whole — identical to the requirements review lifecycle. */
|
|
23
|
+
export const clarityReviewStatusSchema = requirementReviewStatusSchema;
|
|
24
|
+
/** A clarity (bug-report triage) review for one board block. */
|
|
25
|
+
export const clarityReviewSchema = v.object({
|
|
26
|
+
id: v.string(),
|
|
27
|
+
blockId: v.string(),
|
|
28
|
+
status: clarityReviewStatusSchema,
|
|
29
|
+
items: v.array(clarityReviewItemSchema),
|
|
30
|
+
/** `provider:model` that produced the review, for transparency; null in tests. */
|
|
31
|
+
model: v.nullable(v.string()),
|
|
32
|
+
/**
|
|
33
|
+
* The clarified bug report the incorporation companion last folded the answers into.
|
|
34
|
+
* Set once a doc has been produced (status `merged`/`incorporated`); null while still
|
|
35
|
+
* awaiting answers on the first pass. Consumed by every downstream agent step + the
|
|
36
|
+
* spec-writer once the phase is settled.
|
|
37
|
+
*/
|
|
38
|
+
clarifiedReport: v.nullable(v.string()),
|
|
39
|
+
/** How many reviewer passes have run so far (the initial review is iteration 1). */
|
|
40
|
+
iteration: v.optional(v.number(), 1),
|
|
41
|
+
/** The reviewer-pass budget, snapshotted from the task's merge preset when the review started. */
|
|
42
|
+
maxIterations: v.optional(v.number(), 1),
|
|
43
|
+
createdAt: v.number(),
|
|
44
|
+
updatedAt: v.number(),
|
|
45
|
+
});
|
|
46
|
+
// ---- Request bodies -------------------------------------------------------
|
|
47
|
+
/** Record a human's answer to a single clarity review item. */
|
|
48
|
+
export const replyClarityItemSchema = v.object({
|
|
49
|
+
reply: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(4000)),
|
|
50
|
+
});
|
|
51
|
+
/** Set a clarity review item's status (resolve / dismiss / reopen). */
|
|
52
|
+
export const updateClarityItemStatusSchema = v.object({
|
|
53
|
+
status: v.picklist(['open', 'answered', 'resolved', 'dismissed']),
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* Incorporate the settled answers into a standardized, clear bug report. An optional
|
|
57
|
+
* `feedback` comment is the human's "do it differently" lever when redoing a merge.
|
|
58
|
+
*/
|
|
59
|
+
export const incorporateClaritySchema = v.object({
|
|
60
|
+
feedback: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(4000))),
|
|
61
|
+
});
|
|
62
|
+
/** How a human resolves a clarity review that hit its iteration cap with findings open. */
|
|
63
|
+
export const resolveClarityExceededSchema = v.object({
|
|
64
|
+
choice: iterationCapChoiceSchema,
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=clarity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clarity.js","sourceRoot":"","sources":["../src/clarity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAA;AAE9F,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,kFAAkF;AAClF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,mFAAmF;AACnF,+CAA+C;AAC/C,EAAE;AACF,oFAAoF;AACpF,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAE9E,+FAA+F;AAC/F,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAA;AAGlE,iGAAiG;AACjG,MAAM,CAAC,MAAM,yBAAyB,GAAG,6BAA6B,CAAA;AAGtE,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACvC,kFAAkF;IAClF,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,oFAAoF;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ot';
|
|
2
|
+
/** The default quality bar a companion's rating must reach for the run to proceed. */
|
|
3
|
+
export declare const DEFAULT_COMPANION_THRESHOLD = 0.8;
|
|
4
|
+
/** The default number of automatic rework attempts before a companion parks for a human. */
|
|
5
|
+
export declare const DEFAULT_COMPANION_MAX_ATTEMPTS = 3;
|
|
6
|
+
/**
|
|
7
|
+
* A companion agent's structured assessment of the producer step's output. `rating`
|
|
8
|
+
* is the single overall quality score (0..1, higher = better); `summary` is the
|
|
9
|
+
* prose justification surfaced to the human and folded into a rework; `comments`
|
|
10
|
+
* optionally anchor specific challenges to individual items (by `anchorId`) or prose
|
|
11
|
+
* ranges, reusing the shared step-review comment shape.
|
|
12
|
+
*/
|
|
13
|
+
export declare const companionAssessmentSchema: v.ObjectSchema<{
|
|
14
|
+
/** Overall quality of the reviewed outcome (0..1, higher = better). */
|
|
15
|
+
readonly rating: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
16
|
+
/** Plain-prose justification of the rating + the changes the producer should make. */
|
|
17
|
+
readonly summary: v.StringSchema<undefined>;
|
|
18
|
+
/** Optional per-item / per-block challenges (shared shape with human reviews). */
|
|
19
|
+
readonly comments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
20
|
+
readonly quotedSource: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
21
|
+
readonly srcStart: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
22
|
+
readonly srcEnd: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
23
|
+
readonly anchorId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
24
|
+
readonly body: v.StringSchema<undefined>;
|
|
25
|
+
}, undefined>, undefined>, undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
export type CompanionAssessment = v.InferOutput<typeof companionAssessmentSchema>;
|
|
28
|
+
/** Parse-or-throw a companion assessment payload the model returned (the engine validates it). */
|
|
29
|
+
export declare function parseCompanionAssessment(value: unknown): CompanionAssessment;
|
|
30
|
+
/** Non-throwing variant: returns the parsed assessment or `undefined` when invalid. */
|
|
31
|
+
export declare function safeParseCompanionAssessment(value: unknown): CompanionAssessment | undefined;
|
|
32
|
+
//# sourceMappingURL=companion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companion.d.ts","sourceRoot":"","sources":["../src/companion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgB5B,sFAAsF;AACtF,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAE9C,4FAA4F;AAC5F,eAAO,MAAM,8BAA8B,IAAI,CAAA;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;IACpC,uEAAuE;;IAEvE,sFAAsF;;IAEtF,kFAAkF;;;;;;;;aAElF,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,kGAAkG;AAClG,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAE5E;AAED,uFAAuF;AACvF,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAG5F"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { stepReviewCommentSchema } from './entities.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Companion-agent wire contracts. A companion agent reviews the outcome of an
|
|
5
|
+
// immediately-preceding producer step (e.g. an architect design, a spec's
|
|
6
|
+
// acceptance scenarios, or a coder's change), challenges its quality and
|
|
7
|
+
// completeness, and returns a single overall quality rating in 0..1 plus
|
|
8
|
+
// actionable feedback. The execution engine compares the rating against the
|
|
9
|
+
// step's configured threshold (default 0.8): at or above it the run proceeds to
|
|
10
|
+
// the human gate / next step; below it the producer step is re-run with the
|
|
11
|
+
// companion's feedback folded in, and once the rework budget is exhausted the step
|
|
12
|
+
// parks on a human iteration-cap gate (one more round / proceed anyway / stop & reset)
|
|
13
|
+
// instead of failing.
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
/** The default quality bar a companion's rating must reach for the run to proceed. */
|
|
16
|
+
export const DEFAULT_COMPANION_THRESHOLD = 0.8;
|
|
17
|
+
/** The default number of automatic rework attempts before a companion parks for a human. */
|
|
18
|
+
export const DEFAULT_COMPANION_MAX_ATTEMPTS = 3;
|
|
19
|
+
/**
|
|
20
|
+
* A companion agent's structured assessment of the producer step's output. `rating`
|
|
21
|
+
* is the single overall quality score (0..1, higher = better); `summary` is the
|
|
22
|
+
* prose justification surfaced to the human and folded into a rework; `comments`
|
|
23
|
+
* optionally anchor specific challenges to individual items (by `anchorId`) or prose
|
|
24
|
+
* ranges, reusing the shared step-review comment shape.
|
|
25
|
+
*/
|
|
26
|
+
export const companionAssessmentSchema = v.object({
|
|
27
|
+
/** Overall quality of the reviewed outcome (0..1, higher = better). */
|
|
28
|
+
rating: v.pipe(v.number(), v.minValue(0), v.maxValue(1)),
|
|
29
|
+
/** Plain-prose justification of the rating + the changes the producer should make. */
|
|
30
|
+
summary: v.string(),
|
|
31
|
+
/** Optional per-item / per-block challenges (shared shape with human reviews). */
|
|
32
|
+
comments: v.optional(v.array(stepReviewCommentSchema)),
|
|
33
|
+
});
|
|
34
|
+
/** Parse-or-throw a companion assessment payload the model returned (the engine validates it). */
|
|
35
|
+
export function parseCompanionAssessment(value) {
|
|
36
|
+
return v.parse(companionAssessmentSchema, value);
|
|
37
|
+
}
|
|
38
|
+
/** Non-throwing variant: returns the parsed assessment or `undefined` when invalid. */
|
|
39
|
+
export function safeParseCompanionAssessment(value) {
|
|
40
|
+
const result = v.safeParse(companionAssessmentSchema, value);
|
|
41
|
+
return result.success ? result.output : undefined;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=companion.js.map
|
|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C,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/** The consensus strategy a step uses. Mirrors the consensus capability traits. */
|
|
3
|
+
export declare const consensusStrategySchema: v.PicklistSchema<["specialist-panel", "debate", "ranked-voting"], undefined>;
|
|
4
|
+
export type ConsensusStrategy = v.InferOutput<typeof consensusStrategySchema>;
|
|
5
|
+
/**
|
|
6
|
+
* A single participant in a consensus session: a named role, an optional extra
|
|
7
|
+
* system framing that biases its perspective (e.g. "argue for the simplest
|
|
8
|
+
* viable design"), and the model it runs on. `modelId` absent ⇒ the step/block
|
|
9
|
+
* default model. Diversity of role + model is what makes consensus useful, so a
|
|
10
|
+
* session should carry ≥2 participants with distinct framings/models.
|
|
11
|
+
*/
|
|
12
|
+
export declare const consensusParticipantSchema: v.ObjectSchema<{
|
|
13
|
+
readonly id: v.StringSchema<undefined>;
|
|
14
|
+
/** Human-facing role label, e.g. "Pragmatist", "Security reviewer". */
|
|
15
|
+
readonly role: v.StringSchema<undefined>;
|
|
16
|
+
/** Extra perspective framing folded into this participant's system prompt. */
|
|
17
|
+
readonly systemFraming: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
18
|
+
/** Model catalog id this participant runs on; absent ⇒ step/block default. */
|
|
19
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
export type ConsensusParticipant = v.InferOutput<typeof consensusParticipantSchema>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional gating of the (expensive) consensus process on the task's estimate.
|
|
24
|
+
* When `enabled`, consensus runs only if ANY supplied axis is met or exceeded
|
|
25
|
+
* (risk ≥ minRisk OR impact ≥ minImpact OR complexity ≥ minComplexity);
|
|
26
|
+
* otherwise the standard single-actor agent runs. `onMissingEstimate` decides
|
|
27
|
+
* what to do when no estimate is available (default `consensus`, i.e. fail-safe
|
|
28
|
+
* to thoroughness).
|
|
29
|
+
*/
|
|
30
|
+
export declare const consensusGatingSchema: v.ObjectSchema<{
|
|
31
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
32
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
33
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
34
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
35
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["consensus", "standard"], undefined>, "consensus">;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
export type ConsensusGating = v.InferOutput<typeof consensusGatingSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* Optional gating of whether a pipeline STEP runs at all, on the task's estimate
|
|
40
|
+
* (the same three axes as {@link consensusGatingSchema}, produced by the core
|
|
41
|
+
* `task-estimator` agent). When `enabled`, the step runs only if ANY supplied axis
|
|
42
|
+
* is met or exceeded (risk ≥ minRisk OR impact ≥ minImpact OR complexity ≥
|
|
43
|
+
* minComplexity); otherwise it is transparently SKIPPED at runtime. `onMissingEstimate`
|
|
44
|
+
* decides what to do when no estimate is available (default `run`, i.e. fail-safe to
|
|
45
|
+
* thoroughness). A step carrying enabled gating requires a `task-estimator` earlier in
|
|
46
|
+
* the pipeline — the builder/engine reject a pipeline that gates without one. Used today
|
|
47
|
+
* to make a companion (reviewer / architect-companion / spec-companion) conditional on
|
|
48
|
+
* how heavy the task is.
|
|
49
|
+
*/
|
|
50
|
+
export declare const stepGatingSchema: v.ObjectSchema<{
|
|
51
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
52
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
53
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
54
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
55
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["run", "skip"], undefined>, "run">;
|
|
56
|
+
}, undefined>;
|
|
57
|
+
export type StepGating = v.InferOutput<typeof stepGatingSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* The consensus configuration stored on a pipeline step (set in the builder for
|
|
60
|
+
* a step whose agent kind carries a consensus trait). When `enabled` is false
|
|
61
|
+
* the step runs as the standard agent.
|
|
62
|
+
*/
|
|
63
|
+
export declare const consensusStepConfigSchema: v.ObjectSchema<{
|
|
64
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
65
|
+
readonly strategy: v.PicklistSchema<["specialist-panel", "debate", "ranked-voting"], undefined>;
|
|
66
|
+
readonly participants: v.ArraySchema<v.ObjectSchema<{
|
|
67
|
+
readonly id: v.StringSchema<undefined>;
|
|
68
|
+
/** Human-facing role label, e.g. "Pragmatist", "Security reviewer". */
|
|
69
|
+
readonly role: v.StringSchema<undefined>;
|
|
70
|
+
/** Extra perspective framing folded into this participant's system prompt. */
|
|
71
|
+
readonly systemFraming: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
72
|
+
/** Model catalog id this participant runs on; absent ⇒ step/block default. */
|
|
73
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
74
|
+
}, undefined>, undefined>;
|
|
75
|
+
/** Model that runs the neutral synthesis / judging pass; absent ⇒ step default. */
|
|
76
|
+
readonly synthesizerModelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
77
|
+
/** Debate rounds (1..5); ignored by non-debate strategies. Default applied by the engine. */
|
|
78
|
+
readonly rounds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5, undefined>]>, undefined>;
|
|
79
|
+
/** Optional gating of the process on the task estimate; absent ⇒ always run when enabled. */
|
|
80
|
+
readonly gating: v.OptionalSchema<v.ObjectSchema<{
|
|
81
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
82
|
+
readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
83
|
+
readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
84
|
+
readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
|
|
85
|
+
readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["consensus", "standard"], undefined>, "consensus">;
|
|
86
|
+
}, undefined>, undefined>;
|
|
87
|
+
}, undefined>;
|
|
88
|
+
export type ConsensusStepConfig = v.InferOutput<typeof consensusStepConfigSchema>;
|
|
89
|
+
/**
|
|
90
|
+
* A `task-estimator` agent's structured triage of a task along three axes
|
|
91
|
+
* (each 0..1; higher = more complex / riskier / higher blast-radius). Produced
|
|
92
|
+
* after requirements are clarified and the spec is structured, persisted on the
|
|
93
|
+
* block, surfaced in the UI, and used to gate consensus steps. This is CORE —
|
|
94
|
+
* it ships independent of the consensus package.
|
|
95
|
+
*/
|
|
96
|
+
export declare const taskEstimateSchema: v.ObjectSchema<{
|
|
97
|
+
readonly complexity: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
98
|
+
readonly risk: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
99
|
+
readonly impact: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
100
|
+
/** The estimator's plain-prose justification for the scores. */
|
|
101
|
+
readonly rationale: v.StringSchema<undefined>;
|
|
102
|
+
/** Identifier of the model that produced the estimate, for transparency. */
|
|
103
|
+
readonly model: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
104
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
105
|
+
}, undefined>;
|
|
106
|
+
export type TaskEstimate = v.InferOutput<typeof taskEstimateSchema>;
|
|
107
|
+
/** One scored dimension a ranked-voting participant assigned (0..1). */
|
|
108
|
+
export declare const consensusScoreSchema: v.ObjectSchema<{
|
|
109
|
+
readonly dimension: v.StringSchema<undefined>;
|
|
110
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
111
|
+
readonly rationale: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
112
|
+
}, undefined>;
|
|
113
|
+
export type ConsensusScore = v.InferOutput<typeof consensusScoreSchema>;
|
|
114
|
+
/** One participant's contribution within a round (an argument, critique, or scoring). */
|
|
115
|
+
export declare const consensusContributionSchema: v.ObjectSchema<{
|
|
116
|
+
readonly participantId: v.StringSchema<undefined>;
|
|
117
|
+
readonly text: v.StringSchema<undefined>;
|
|
118
|
+
readonly scores: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
119
|
+
readonly dimension: v.StringSchema<undefined>;
|
|
120
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
121
|
+
readonly rationale: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
122
|
+
}, undefined>, undefined>, undefined>;
|
|
123
|
+
}, undefined>;
|
|
124
|
+
export type ConsensusContribution = v.InferOutput<typeof consensusContributionSchema>;
|
|
125
|
+
/** A single round of the process. `kind` distinguishes the dialectic phases. */
|
|
126
|
+
export declare const consensusRoundSchema: v.ObjectSchema<{
|
|
127
|
+
readonly index: v.NumberSchema<undefined>;
|
|
128
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["draft", "critique", "score"], undefined>, undefined>;
|
|
129
|
+
readonly contributions: v.ArraySchema<v.ObjectSchema<{
|
|
130
|
+
readonly participantId: v.StringSchema<undefined>;
|
|
131
|
+
readonly text: v.StringSchema<undefined>;
|
|
132
|
+
readonly scores: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
133
|
+
readonly dimension: v.StringSchema<undefined>;
|
|
134
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
135
|
+
readonly rationale: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
136
|
+
}, undefined>, undefined>, undefined>;
|
|
137
|
+
}, undefined>, undefined>;
|
|
138
|
+
}, undefined>;
|
|
139
|
+
export type ConsensusRound = v.InferOutput<typeof consensusRoundSchema>;
|
|
140
|
+
export declare const consensusSessionStatusSchema: v.PicklistSchema<["running", "synthesizing", "done", "failed"], undefined>;
|
|
141
|
+
export type ConsensusSessionStatus = v.InferOutput<typeof consensusSessionStatusSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* The full transcript of a consensus session: who participated, the round-by-round
|
|
144
|
+
* contributions, the synthesized result, and confidence/dissent. Persisted
|
|
145
|
+
* (`consensus_sessions`) and streamed live so the dedicated window can visualize
|
|
146
|
+
* the process. One per (executionId, stepIndex).
|
|
147
|
+
*/
|
|
148
|
+
export declare const consensusSessionSchema: v.ObjectSchema<{
|
|
149
|
+
readonly id: v.StringSchema<undefined>;
|
|
150
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
151
|
+
readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
152
|
+
readonly stepIndex: v.NumberSchema<undefined>;
|
|
153
|
+
/** The underlying agent kind this session ran for (e.g. `architect`). */
|
|
154
|
+
readonly agentKind: v.StringSchema<undefined>;
|
|
155
|
+
readonly strategy: v.PicklistSchema<["specialist-panel", "debate", "ranked-voting"], undefined>;
|
|
156
|
+
readonly status: v.PicklistSchema<["running", "synthesizing", "done", "failed"], undefined>;
|
|
157
|
+
readonly participants: v.ArraySchema<v.ObjectSchema<{
|
|
158
|
+
readonly id: v.StringSchema<undefined>;
|
|
159
|
+
/** Human-facing role label, e.g. "Pragmatist", "Security reviewer". */
|
|
160
|
+
readonly role: v.StringSchema<undefined>;
|
|
161
|
+
/** Extra perspective framing folded into this participant's system prompt. */
|
|
162
|
+
readonly systemFraming: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
163
|
+
/** Model catalog id this participant runs on; absent ⇒ step/block default. */
|
|
164
|
+
readonly modelId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
165
|
+
}, undefined>, undefined>;
|
|
166
|
+
readonly rounds: v.ArraySchema<v.ObjectSchema<{
|
|
167
|
+
readonly index: v.NumberSchema<undefined>;
|
|
168
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["draft", "critique", "score"], undefined>, undefined>;
|
|
169
|
+
readonly contributions: v.ArraySchema<v.ObjectSchema<{
|
|
170
|
+
readonly participantId: v.StringSchema<undefined>;
|
|
171
|
+
readonly text: v.StringSchema<undefined>;
|
|
172
|
+
readonly scores: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
173
|
+
readonly dimension: v.StringSchema<undefined>;
|
|
174
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
175
|
+
readonly rationale: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
176
|
+
}, undefined>, undefined>, undefined>;
|
|
177
|
+
}, undefined>, undefined>;
|
|
178
|
+
}, undefined>, undefined>;
|
|
179
|
+
/** The neutral synthesis / winning result; null until the synthesis pass completes. */
|
|
180
|
+
readonly synthesis: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
181
|
+
/** Aggregate confidence in the result (0..1), when the strategy yields one. */
|
|
182
|
+
readonly confidence: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
183
|
+
/** Notable unresolved disagreements surfaced by the synthesizer. */
|
|
184
|
+
readonly dissent: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
185
|
+
/** Failure detail when `status` is `failed`. */
|
|
186
|
+
readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
187
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
188
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
189
|
+
}, undefined>;
|
|
190
|
+
export type ConsensusSession = v.InferOutput<typeof consensusSessionSchema>;
|
|
191
|
+
/** Parse-or-throw a task estimate payload an agent returned (the engine validates it). */
|
|
192
|
+
export declare function parseTaskEstimate(value: unknown): TaskEstimate;
|
|
193
|
+
/** Parse-or-throw a consensus step config (used when persisting builder edits). */
|
|
194
|
+
export declare function parseConsensusStepConfig(value: unknown): ConsensusStepConfig;
|
|
195
|
+
//# sourceMappingURL=consensus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consensus.d.ts","sour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,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,yFAAyF;AACzF,eAAO,MAAM,2BAA2B;;;;;;;;aAItC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF,gFAAgF;AAChF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;aAI/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,4BAA4B,4EAKvC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;IAKjC,yEAAyE;;;;;;QAjIzE,uEAAuE;;QAEvE,8EAA8E;;QAE9E,8EAA8E;;;;;;;;;;;;;;;;IAmI9E,uFAAuF;;IAEvF,+EAA+E;;IAE/E,oEAAoE;;IAEpE,gDAAgD;;;;aAIhD,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAE9D;AAED,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAE5E"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Consensus-orchestration wire contracts.
|
|
4
|
+
//
|
|
5
|
+
// Consensus is a general MECHANISM (not one specific step): an eligible agent
|
|
6
|
+
// step can be run through a multi-model process — a specialist panel, a debate,
|
|
7
|
+
// or ranked voting/scoring — to produce a higher-quality result of the SAME
|
|
8
|
+
// shape that single-actor agent would have produced (a polished document, an
|
|
9
|
+
// aggregate of observations, occasionally structured scores). It is opt-in per
|
|
10
|
+
// step in the pipeline builder and lives behind a separate optional package
|
|
11
|
+
// (`@cat-factory/consensus`); these are the shared wire shapes.
|
|
12
|
+
//
|
|
13
|
+
// Because the process is expensive it can be GATED on a task's estimate (see
|
|
14
|
+
// {@link taskEstimateSchema}, produced by the core `task-estimator` agent): a
|
|
15
|
+
// sub-threshold task transparently runs the standard single-actor agent instead.
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
const scoreSchema = v.pipe(v.number(), v.minValue(0), v.maxValue(1));
|
|
18
|
+
/** The consensus strategy a step uses. Mirrors the consensus capability traits. */
|
|
19
|
+
export const consensusStrategySchema = v.picklist(['specialist-panel', 'debate', 'ranked-voting']);
|
|
20
|
+
/**
|
|
21
|
+
* A single participant in a consensus session: a named role, an optional extra
|
|
22
|
+
* system framing that biases its perspective (e.g. "argue for the simplest
|
|
23
|
+
* viable design"), and the model it runs on. `modelId` absent ⇒ the step/block
|
|
24
|
+
* default model. Diversity of role + model is what makes consensus useful, so a
|
|
25
|
+
* session should carry ≥2 participants with distinct framings/models.
|
|
26
|
+
*/
|
|
27
|
+
export const consensusParticipantSchema = v.object({
|
|
28
|
+
id: v.string(),
|
|
29
|
+
/** Human-facing role label, e.g. "Pragmatist", "Security reviewer". */
|
|
30
|
+
role: v.string(),
|
|
31
|
+
/** Extra perspective framing folded into this participant's system prompt. */
|
|
32
|
+
systemFraming: v.optional(v.string()),
|
|
33
|
+
/** Model catalog id this participant runs on; absent ⇒ step/block default. */
|
|
34
|
+
modelId: v.optional(v.string()),
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Optional gating of the (expensive) consensus process on the task's estimate.
|
|
38
|
+
* When `enabled`, consensus runs only if ANY supplied axis is met or exceeded
|
|
39
|
+
* (risk ≥ minRisk OR impact ≥ minImpact OR complexity ≥ minComplexity);
|
|
40
|
+
* otherwise the standard single-actor agent runs. `onMissingEstimate` decides
|
|
41
|
+
* what to do when no estimate is available (default `consensus`, i.e. fail-safe
|
|
42
|
+
* to thoroughness).
|
|
43
|
+
*/
|
|
44
|
+
export const consensusGatingSchema = v.object({
|
|
45
|
+
enabled: v.boolean(),
|
|
46
|
+
minComplexity: v.optional(scoreSchema),
|
|
47
|
+
minRisk: v.optional(scoreSchema),
|
|
48
|
+
minImpact: v.optional(scoreSchema),
|
|
49
|
+
onMissingEstimate: v.optional(v.picklist(['consensus', 'standard']), 'consensus'),
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Optional gating of whether a pipeline STEP runs at all, on the task's estimate
|
|
53
|
+
* (the same three axes as {@link consensusGatingSchema}, produced by the core
|
|
54
|
+
* `task-estimator` agent). When `enabled`, the step runs only if ANY supplied axis
|
|
55
|
+
* is met or exceeded (risk ≥ minRisk OR impact ≥ minImpact OR complexity ≥
|
|
56
|
+
* minComplexity); otherwise it is transparently SKIPPED at runtime. `onMissingEstimate`
|
|
57
|
+
* decides what to do when no estimate is available (default `run`, i.e. fail-safe to
|
|
58
|
+
* thoroughness). A step carrying enabled gating requires a `task-estimator` earlier in
|
|
59
|
+
* the pipeline — the builder/engine reject a pipeline that gates without one. Used today
|
|
60
|
+
* to make a companion (reviewer / architect-companion / spec-companion) conditional on
|
|
61
|
+
* how heavy the task is.
|
|
62
|
+
*/
|
|
63
|
+
export const stepGatingSchema = v.object({
|
|
64
|
+
enabled: v.boolean(),
|
|
65
|
+
minComplexity: v.optional(scoreSchema),
|
|
66
|
+
minRisk: v.optional(scoreSchema),
|
|
67
|
+
minImpact: v.optional(scoreSchema),
|
|
68
|
+
onMissingEstimate: v.optional(v.picklist(['run', 'skip']), 'run'),
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* The consensus configuration stored on a pipeline step (set in the builder for
|
|
72
|
+
* a step whose agent kind carries a consensus trait). When `enabled` is false
|
|
73
|
+
* the step runs as the standard agent.
|
|
74
|
+
*/
|
|
75
|
+
export const consensusStepConfigSchema = v.object({
|
|
76
|
+
enabled: v.boolean(),
|
|
77
|
+
strategy: consensusStrategySchema,
|
|
78
|
+
participants: v.array(consensusParticipantSchema),
|
|
79
|
+
/** Model that runs the neutral synthesis / judging pass; absent ⇒ step default. */
|
|
80
|
+
synthesizerModelId: v.optional(v.string()),
|
|
81
|
+
/** Debate rounds (1..5); ignored by non-debate strategies. Default applied by the engine. */
|
|
82
|
+
rounds: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(5))),
|
|
83
|
+
/** Optional gating of the process on the task estimate; absent ⇒ always run when enabled. */
|
|
84
|
+
gating: v.optional(consensusGatingSchema),
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* A `task-estimator` agent's structured triage of a task along three axes
|
|
88
|
+
* (each 0..1; higher = more complex / riskier / higher blast-radius). Produced
|
|
89
|
+
* after requirements are clarified and the spec is structured, persisted on the
|
|
90
|
+
* block, surfaced in the UI, and used to gate consensus steps. This is CORE —
|
|
91
|
+
* it ships independent of the consensus package.
|
|
92
|
+
*/
|
|
93
|
+
export const taskEstimateSchema = v.object({
|
|
94
|
+
complexity: scoreSchema,
|
|
95
|
+
risk: scoreSchema,
|
|
96
|
+
impact: scoreSchema,
|
|
97
|
+
/** The estimator's plain-prose justification for the scores. */
|
|
98
|
+
rationale: v.string(),
|
|
99
|
+
/** Identifier of the model that produced the estimate, for transparency. */
|
|
100
|
+
model: v.optional(v.nullable(v.string())),
|
|
101
|
+
createdAt: v.number(),
|
|
102
|
+
});
|
|
103
|
+
// ---- Session transcript (the persisted + streamed observability surface) ----
|
|
104
|
+
/** One scored dimension a ranked-voting participant assigned (0..1). */
|
|
105
|
+
export const consensusScoreSchema = v.object({
|
|
106
|
+
dimension: v.string(),
|
|
107
|
+
value: scoreSchema,
|
|
108
|
+
rationale: v.optional(v.string()),
|
|
109
|
+
});
|
|
110
|
+
/** One participant's contribution within a round (an argument, critique, or scoring). */
|
|
111
|
+
export const consensusContributionSchema = v.object({
|
|
112
|
+
participantId: v.string(),
|
|
113
|
+
text: v.string(),
|
|
114
|
+
scores: v.optional(v.array(consensusScoreSchema)),
|
|
115
|
+
});
|
|
116
|
+
/** A single round of the process. `kind` distinguishes the dialectic phases. */
|
|
117
|
+
export const consensusRoundSchema = v.object({
|
|
118
|
+
index: v.number(),
|
|
119
|
+
kind: v.optional(v.picklist(['draft', 'critique', 'score'])),
|
|
120
|
+
contributions: v.array(consensusContributionSchema),
|
|
121
|
+
});
|
|
122
|
+
export const consensusSessionStatusSchema = v.picklist([
|
|
123
|
+
'running',
|
|
124
|
+
'synthesizing',
|
|
125
|
+
'done',
|
|
126
|
+
'failed',
|
|
127
|
+
]);
|
|
128
|
+
/**
|
|
129
|
+
* The full transcript of a consensus session: who participated, the round-by-round
|
|
130
|
+
* contributions, the synthesized result, and confidence/dissent. Persisted
|
|
131
|
+
* (`consensus_sessions`) and streamed live so the dedicated window can visualize
|
|
132
|
+
* the process. One per (executionId, stepIndex).
|
|
133
|
+
*/
|
|
134
|
+
export const consensusSessionSchema = v.object({
|
|
135
|
+
id: v.string(),
|
|
136
|
+
blockId: v.string(),
|
|
137
|
+
executionId: v.nullable(v.string()),
|
|
138
|
+
stepIndex: v.number(),
|
|
139
|
+
/** The underlying agent kind this session ran for (e.g. `architect`). */
|
|
140
|
+
agentKind: v.string(),
|
|
141
|
+
strategy: consensusStrategySchema,
|
|
142
|
+
status: consensusSessionStatusSchema,
|
|
143
|
+
participants: v.array(consensusParticipantSchema),
|
|
144
|
+
rounds: v.array(consensusRoundSchema),
|
|
145
|
+
/** The neutral synthesis / winning result; null until the synthesis pass completes. */
|
|
146
|
+
synthesis: v.nullable(v.string()),
|
|
147
|
+
/** Aggregate confidence in the result (0..1), when the strategy yields one. */
|
|
148
|
+
confidence: v.optional(v.nullable(v.number())),
|
|
149
|
+
/** Notable unresolved disagreements surfaced by the synthesizer. */
|
|
150
|
+
dissent: v.optional(v.array(v.string())),
|
|
151
|
+
/** Failure detail when `status` is `failed`. */
|
|
152
|
+
error: v.optional(v.nullable(v.string())),
|
|
153
|
+
createdAt: v.number(),
|
|
154
|
+
updatedAt: v.number(),
|
|
155
|
+
});
|
|
156
|
+
/** Parse-or-throw a task estimate payload an agent returned (the engine validates it). */
|
|
157
|
+
export function parseTaskEstimate(value) {
|
|
158
|
+
return v.parse(taskEstimateSchema, value);
|
|
159
|
+
}
|
|
160
|
+
/** Parse-or-throw a consensus step config (used when persisting builder edits). */
|
|
161
|
+
export function parseConsensusStepConfig(value) {
|
|
162
|
+
return v.parse(consensusStepConfigSchema, value);
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=consensus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consensus.js","sourceRoot":"","sources":["../src/consensus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,0CAA0C;AAC1C,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,4EAA4E;AAC5E,6EAA6E;AAC7E,+EAA+E;AAC/E,4EAA4E;AAC5E,gEAAgE;AAChE,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,iFAAiF;AACjF,8EAA8E;AAE9E,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AAEpE,mFAAmF;AACnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,kBAAkB,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;AAGlG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,uEAAuE;IACvE,IAAI,EAAE,CAAC,CAAC,MAAM,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