@farmslot/review-dispatch 0.2.4 → 0.3.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/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@
4
4
 
5
5
  - Active-development baseline; add user-facing changes here before release or package publication.
6
6
 
7
+ ## 0.3.0 - 2026-10-19
8
+
9
+ - The needs-decision view model that Command Center and Companion share (ADR-065 Amendment 7): `resultDecisionView`, `pendingResultDecision`, `isResultDecision`, `evidenceOnlyDecisionIds` and `resultDecisionActionReady`. Refused prerequisites are titled by count. `runResultsSummary` says a held run waits for a decision and an accepted one was accepted, with its reason.
10
+ - `acceptancePanelPresentation` returns `defaultOpen` in place of `hasOpenCriteria`. While no criterion is assessed, the panel shows only its counts line and the criteria list opens on demand.
11
+ - Align with `@farmslot/protocol` 0.56.0 and `@farmslot/adapter-sdk` 0.20.0.
12
+
13
+ ## 0.2.5 - 2026-10-18
14
+
15
+ - Align with `@farmslot/adapter-sdk` 0.18.5.
16
+
7
17
  ## 0.2.4 - 2026-10-18
8
18
 
9
19
  - Align with `@farmslot/adapter-sdk` 0.18.4.
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './checklist-progress.js';
5
5
  export * from './execution.js';
6
6
  export * from './provenance.js';
7
7
  export * from './publication-gate.js';
8
+ export * from './result-decision.js';
8
9
  export * from './run-results.js';
9
10
  export * from './types.js';
10
11
  export * from './validation.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ export * from './checklist-progress.js';
5
5
  export * from './execution.js';
6
6
  export * from './provenance.js';
7
7
  export * from './publication-gate.js';
8
+ export * from './result-decision.js';
8
9
  export * from './run-results.js';
9
10
  export * from './types.js';
10
11
  export * from './validation.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * The result decision view model that Command Center and Companion share (ADR-065
3
+ * Amendment 7): a run held `needs-decision` shows why it stopped, its findings or
4
+ * refused prerequisite, what it delivered, and three actions. Each client only
5
+ * renders this; neither recomputes a label, an order or an availability.
6
+ */
7
+ import { type ResultDecisionActionId, type ResultDecisionPayload, type RunDecision, type RunDecisionPayload } from '@farmslot/protocol';
8
+ export { pendingResultDecision, type ResultDecision } from '@farmslot/protocol';
9
+ /**
10
+ * A result decision is answered where its reason field and unavailable actions show:
11
+ * Command Center's run detail and Companion's decision workspace. Lists link there
12
+ * instead of offering its actions.
13
+ */
14
+ export declare function isResultDecision(decision: {
15
+ payload?: RunDecisionPayload;
16
+ }): boolean;
17
+ /**
18
+ * The output reviews that pending result decisions hold as their evidence panel.
19
+ * Lists skip them: the gateway refuses their Close run and Mark reviewed until the
20
+ * result decision settles.
21
+ */
22
+ export declare function evidenceOnlyDecisionIds(decisions: readonly {
23
+ payload?: RunDecisionPayload;
24
+ resolvedAt?: string;
25
+ }[]): Set<string>;
26
+ export interface ResultDecisionItem {
27
+ /** File and line for a finding, or the prerequisite's reference. */
28
+ location?: string;
29
+ description: string;
30
+ }
31
+ export interface ResultDecisionActionView {
32
+ id: ResultDecisionActionId;
33
+ label: string;
34
+ style: 'primary' | 'secondary' | 'danger';
35
+ available: boolean;
36
+ unavailableReason?: string;
37
+ requiresReason: boolean;
38
+ /** One line under an available action that would otherwise surprise. */
39
+ note?: string;
40
+ }
41
+ export interface ResultDecisionView {
42
+ decisionId: string;
43
+ /** One sentence: why the run stopped. */
44
+ reason: string;
45
+ /** The findings at the delivered head, or the refused prerequisite's reasons. */
46
+ detail: {
47
+ title: string;
48
+ items: ResultDecisionItem[];
49
+ } | null;
50
+ delivered: {
51
+ label: string;
52
+ value: string;
53
+ };
54
+ outputReviewDecisionId?: string;
55
+ actions: ResultDecisionActionView[];
56
+ }
57
+ export declare function resultDecisionView(decision: Pick<RunDecision, 'id'> & {
58
+ payload: ResultDecisionPayload;
59
+ }): ResultDecisionView;
60
+ /** Whether an action can be sent: available, and with the written reason it requires. */
61
+ export declare function resultDecisionActionReady(action: Pick<ResultDecisionActionView, 'available' | 'requiresReason'>, reason: string): boolean;
62
+ //# sourceMappingURL=result-decision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-decision.d.ts","sourceRoot":"","sources":["../src/result-decision.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAE3B,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE;IAAE,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAAE,GAAG,OAAO,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS;IAAE,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAC1E,GAAG,CAAC,MAAM,CAAC,CAUb;AAED,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,sBAAsB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,kBAAkB,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9D,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,OAAO,EAAE,wBAAwB,EAAE,CAAC;CACrC;AA+BD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG;IAAE,OAAO,EAAE,qBAAqB,CAAA;CAAE,GACrE,kBAAkB,CAyCpB;AAED,yFAAyF;AACzF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,gBAAgB,CAAC,EACtE,MAAM,EAAE,MAAM,GACb,OAAO,CAET"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * The result decision view model that Command Center and Companion share (ADR-065
3
+ * Amendment 7): a run held `needs-decision` shows why it stopped, its findings or
4
+ * refused prerequisite, what it delivered, and three actions. Each client only
5
+ * renders this; neither recomputes a label, an order or an availability.
6
+ */
7
+ import { RESULT_DECISION_ACTION_LABELS, } from '@farmslot/protocol';
8
+ export { pendingResultDecision } from '@farmslot/protocol';
9
+ /**
10
+ * A result decision is answered where its reason field and unavailable actions show:
11
+ * Command Center's run detail and Companion's decision workspace. Lists link there
12
+ * instead of offering its actions.
13
+ */
14
+ export function isResultDecision(decision) {
15
+ return decision.payload?.kind === 'result-decision';
16
+ }
17
+ /**
18
+ * The output reviews that pending result decisions hold as their evidence panel.
19
+ * Lists skip them: the gateway refuses their Close run and Mark reviewed until the
20
+ * result decision settles.
21
+ */
22
+ export function evidenceOnlyDecisionIds(decisions) {
23
+ return new Set(decisions.flatMap((decision) => !decision.resolvedAt &&
24
+ decision.payload?.kind === 'result-decision' &&
25
+ decision.payload.outputReviewDecisionId
26
+ ? [decision.payload.outputReviewDecisionId]
27
+ : []));
28
+ }
29
+ const ACTIONS = {
30
+ 'send-back': { label: RESULT_DECISION_ACTION_LABELS['send-back'], style: 'primary' },
31
+ 'accept-result': {
32
+ label: RESULT_DECISION_ACTION_LABELS['accept-result'],
33
+ style: 'secondary',
34
+ note: 'Settles the run as done. Publishes nothing.',
35
+ },
36
+ 'close-result': { label: RESULT_DECISION_ACTION_LABELS['close-result'], style: 'danger' },
37
+ };
38
+ const ORDER = Object.keys(ACTIONS);
39
+ function actionView(state) {
40
+ const { note, ...presentation } = ACTIONS[state.id];
41
+ return {
42
+ id: state.id,
43
+ ...presentation,
44
+ available: state.available,
45
+ ...(state.available
46
+ ? note
47
+ ? { note }
48
+ : {}
49
+ : { unavailableReason: state.unavailableReason ?? 'Not available for this run.' }),
50
+ requiresReason: state.requiresReason,
51
+ };
52
+ }
53
+ export function resultDecisionView(decision) {
54
+ const { payload } = decision;
55
+ const findings = payload.findings ?? [];
56
+ const detail = findings.length
57
+ ? {
58
+ title: `Findings (${findings.length})`,
59
+ items: findings.map((finding) => ({
60
+ location: finding.line ? `${finding.file}:${finding.line}` : finding.file,
61
+ description: finding.description,
62
+ })),
63
+ }
64
+ : payload.refusal?.reasons.length
65
+ ? {
66
+ title: `Refused prerequisites (${payload.refusal.reasons.length})`,
67
+ items: payload.refusal.reasons.map((reason) => ({
68
+ ...(reason.reference ? { location: reason.reference } : {}),
69
+ description: reason.message,
70
+ })),
71
+ }
72
+ : payload.refusal && payload.refusal.message !== payload.reason
73
+ ? { title: 'Refused prerequisite', items: [{ description: payload.refusal.message }] }
74
+ : null;
75
+ const delivered = 'headSha' in payload.delivered
76
+ ? {
77
+ label: 'Delivered head',
78
+ value: `${payload.delivered.headSha.slice(0, 12)}${payload.delivered.branch ? ` · ${payload.delivered.branch}` : ''}`,
79
+ }
80
+ : { label: 'Delivered report', value: payload.delivered.reportPath };
81
+ return {
82
+ decisionId: decision.id,
83
+ reason: payload.reason,
84
+ detail,
85
+ delivered,
86
+ ...(payload.outputReviewDecisionId
87
+ ? { outputReviewDecisionId: payload.outputReviewDecisionId }
88
+ : {}),
89
+ actions: [...payload.actions]
90
+ .sort((a, b) => ORDER.indexOf(a.id) - ORDER.indexOf(b.id))
91
+ .map(actionView),
92
+ };
93
+ }
94
+ /** Whether an action can be sent: available, and with the written reason it requires. */
95
+ export function resultDecisionActionReady(action, reason) {
96
+ return action.available && (!action.requiresReason || reason.trim().length > 0);
97
+ }
98
+ //# sourceMappingURL=result-decision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-decision.js","sourceRoot":"","sources":["../src/result-decision.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,6BAA6B,GAM9B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAuB,MAAM,oBAAoB,CAAC;AAEhF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAA0C;IACzE,OAAO,QAAQ,CAAC,OAAO,EAAE,IAAI,KAAK,iBAAiB,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,SAA2E;IAE3E,OAAO,IAAI,GAAG,CACZ,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC7B,CAAC,QAAQ,CAAC,UAAU;QACpB,QAAQ,CAAC,OAAO,EAAE,IAAI,KAAK,iBAAiB;QAC5C,QAAQ,CAAC,OAAO,CAAC,sBAAsB;QACrC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC;QAC3C,CAAC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AO,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;SACtH;QACH,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;IACzE,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,EAAE;QACvB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM;QACN,SAAS;QACT,GAAG,CAAC,OAAO,CAAC,sBAAsB;YAChC,CAAC,CAAC,EAAE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,EAAE;YAC5D,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;aAC1B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;aACzD,GAAG,CAAC,UAAU,CAAC;KACnB,CAAC;AACJ,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,yBAAyB,CACvC,MAAsE,EACtE,MAAc;IAEd,OAAO,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAClF,CAAC"}
@@ -16,8 +16,9 @@ export interface AcceptancePanelPresentation {
16
16
  counts: string;
17
17
  /** Long-form tally for the header tooltip or accessibility label, including the zero buckets. */
18
18
  countsTooltip: string;
19
- /** True while any criterion is unproven — the panel opens in that case. */
20
- hasOpenCriteria: boolean;
19
+ /** The panel opens by default once a criterion is assessed and not all are proven.
20
+ * While nothing is assessed, the counts line is the whole view and the list opens on demand. */
21
+ defaultOpen: boolean;
21
22
  }
22
23
  export declare function acceptancePanelPresentation(ledger: AcceptanceStatusLedger, criteria?: ReadonlyArray<AcceptanceCriterionRef>, model?: EvidenceReviewModel): AcceptancePanelPresentation;
23
24
  export interface RunResultsSummary {
@@ -1 +1 @@
1
- {"version":3,"file":"run-results.d.ts","sourceRoot":"","sources":["../src/run-results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,OAAO,EAEb,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAAE,OAAO,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAMlF,yGAAyG;AACzG,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,GAC7C,oBAAoB,GAAG,SAAS,CAElC;AAED,MAAM,WAAW,2BAA2B;IAC1C,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,iGAAiG;IACjG,aAAa,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,sBAAsB,EAC9B,QAAQ,GAAE,aAAa,CAAC,sBAAsB,CAAmB,EACjE,KAAK,CAAC,EAAE,mBAAmB,GAC1B,2BAA2B,CAU7B;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAA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b,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,GAAG,iBAAiB,CAsCpF"}
@@ -4,7 +4,7 @@
4
4
  * the acceptance tally above its per-AC and per-case rows. Each client only
5
5
  * renders these; neither recomputes a label, count or copy line.
6
6
  */
7
- import { summarizeAcceptanceStatus, } from '@farmslot/protocol';
7
+ import { isHeldForResultDecision, summarizeAcceptanceStatus, } from '@farmslot/protocol';
8
8
  function isPendingOutputReview(decision) {
9
9
  return !decision.resolvedAt && decision.payload?.kind === 'output-review';
10
10
  }
@@ -19,7 +19,7 @@ export function acceptancePanelPresentation(ledger, criteria = ledger.criteria,
19
19
  counts: `${assessed}/${summary.total} assessed${assessed ? ` · ${summary.proven} proven` : ''}`,
20
20
  countsTooltip: `proven ${summary.proven} · weak ${summary.weak} · missing ${summary.missing} · ` +
21
21
  `untestable ${summary.untestable} · not assessed ${summary.unrecorded}`,
22
- hasOpenCriteria: summary.proven + summary.untestable < summary.total,
22
+ defaultOpen: assessed > 0 && summary.proven + summary.untestable < summary.total,
23
23
  };
24
24
  }
25
25
  /** The results card for a run, given how many output artifacts the client collected. */
@@ -37,17 +37,21 @@ export function runResultsSummary(run, artifactCount) {
37
37
  badge: isReplay ? 'comparison · artifact-only' : (run.metrics.outcome ?? run.status),
38
38
  status: completeStep?.status ??
39
39
  (run.status === 'done' ? 'done' : run.status === 'failed' ? 'failed' : 'pending'),
40
- copy: run.output?.closedAt
41
- ? `Execution closed. The recorded result remains ${run.metrics.outcome ?? 'unknown'}; closing is not validation or release approval.`
42
- : run.output?.workerFinished
43
- ? 'The worker has finished. Read its findings and coverage gaps before reviewing the output. Reviewing does not change the verdict or publish anything.'
44
- : hasOutput
45
- ? 'Files retained from the worker. Execution is still in progress.'
46
- : run.startRef
47
- ? `This replay started from ${sourceRef ?? 'the selected ref'} and stopped at artifacts. Prior-run replay comparisons are represented by eval Reference and Candidate packages, not run parentage; no PR was published.`
48
- : isReplay
49
- ? 'This comparison run stops at artifacts instead of publishing a PR. Use these captured files as the run output evidence.'
50
- : 'Final artifacts captured by the worker.',
40
+ copy: run.resultDecisionReceipt?.action === 'accept-result'
41
+ ? `Accepted without publishing${run.resultDecisionReceipt.reason ? `: ${run.resultDecisionReceipt.reason}` : '.'}`
42
+ : run.output?.closedAt
43
+ ? `Execution closed. The recorded result remains ${run.metrics.outcome ?? 'unknown'}; closing is not validation or release approval.`
44
+ : isHeldForResultDecision(run)
45
+ ? 'The worker delivered this result. It waits for a decision.'
46
+ : run.output?.workerFinished
47
+ ? 'The worker has finished. Read its findings and coverage gaps before reviewing the output. Reviewing does not change the verdict or publish anything.'
48
+ : hasOutput
49
+ ? 'Files retained from the worker. Execution is still in progress.'
50
+ : run.startRef
51
+ ? `This replay started from ${sourceRef ?? 'the selected ref'} and stopped at artifacts. Prior-run replay comparisons are represented by eval Reference and Candidate packages, not run parentage; no PR was published.`
52
+ : isReplay
53
+ ? 'This comparison run stops at artifacts instead of publishing a PR. Use these captured files as the run output evidence.'
54
+ : 'Final artifacts captured by the worker.',
51
55
  showEvalPackageHint: Boolean(run.startRef),
52
56
  emptyMessage: run.output?.captureError
53
57
  ? `Could not retrieve worker files: ${run.output.captureError}`
@@ -1 +1 @@
1
- {"version":3,"file":"run-results.js","sourceRoot":"","sources":["../src/run-results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAOL,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAI5B,SAAS,qBAAqB,CAAC,QAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,OAAO,EAAE,IAAI,KAAK,eAAe,CAAC;AAC5E,CAAC;AAED,yGAAyG;AACzG,MAAM,UAAU,mBAAmB,CACjC,GAA8C;IAE9C,OAAO,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,qB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AAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE;YAClH,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ;gBACpB,CAAC,CAAC,iDAAiD,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,kDAAkD;gBACrI,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC;oBAC5B,CAAC,CAAC,4DAA4D;oBAC9D,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc;wBAC1B,CAAC,CAAC,sJAAsJ;wBACxJ,CAAC,CAAC,SAAS;4BACT,CAAC,CAAC,iEAAiE;4BACnE,CAAC,CAAC,GAAG,CAAC,QAAQ;gCACZ,CAAC,CAAC,4BAA4B,SAAS,IAAI,kBAAkB,2JAA2J;gCACxN,CAAC,CAAC,QAAQ;oCACR,CAAC,CAAC,yHAAyH;oCAC3H,CAAC,CAAC,yCAAyC;QAC3D,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1C,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY;YACpC,CAAC,CAAC,oCAAoC,GAAG,CAAC,MAAM,CAAC,YAAY,EAAE;YAC/D,CAAC,CAAC,0CAA0C;KAC/C,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farmslot/review-dispatch",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "Shared review and dispatch selection, validation, and view model",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -32,8 +32,8 @@
32
32
  "prepublishOnly": "node ../../scripts/quality/check-farmslot-package-readiness.mjs --publish --packages @farmslot/review-dispatch"
33
33
  },
34
34
  "dependencies": {
35
- "@farmslot/adapter-sdk": "0.18.4",
36
- "@farmslot/protocol": "0.55.0"
35
+ "@farmslot/adapter-sdk": "0.20.0",
36
+ "@farmslot/protocol": "0.56.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.0.0",