@farmslot/protocol 0.38.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/agents/reviewer-context.d.ts +4 -4
  3. package/dist/agents/reviewer-context.d.ts.map +1 -1
  4. package/dist/agents/reviewer-context.js +10 -10
  5. package/dist/agents/reviewer-context.js.map +1 -1
  6. package/dist/agents/roles.d.ts +2 -2
  7. package/dist/agents/roles.d.ts.map +1 -1
  8. package/dist/agents/roles.js +5 -9
  9. package/dist/agents/roles.js.map +1 -1
  10. package/dist/checklist-target.d.ts +6 -6
  11. package/dist/checklist-target.d.ts.map +1 -1
  12. package/dist/checklist-target.js +11 -11
  13. package/dist/checklist-target.js.map +1 -1
  14. package/dist/contracts/acceptance.d.ts +19 -34
  15. package/dist/contracts/acceptance.d.ts.map +1 -1
  16. package/dist/contracts/acceptance.js +11 -156
  17. package/dist/contracts/acceptance.js.map +1 -1
  18. package/dist/contracts/agents.d.ts +4 -2
  19. package/dist/contracts/agents.d.ts.map +1 -1
  20. package/dist/contracts/agents.js +1 -2
  21. package/dist/contracts/agents.js.map +1 -1
  22. package/dist/contracts/analytics.d.ts +2 -2
  23. package/dist/contracts/analytics.d.ts.map +1 -1
  24. package/dist/contracts/backlog.d.ts +16 -7
  25. package/dist/contracts/backlog.d.ts.map +1 -1
  26. package/dist/contracts/backlog.js.map +1 -1
  27. package/dist/contracts/config.d.ts +12 -3
  28. package/dist/contracts/config.d.ts.map +1 -1
  29. package/dist/contracts/config.js +32 -0
  30. package/dist/contracts/config.js.map +1 -1
  31. package/dist/contracts/dispatch.d.ts +7 -4
  32. package/dist/contracts/dispatch.d.ts.map +1 -1
  33. package/dist/contracts/family.d.ts +2 -2
  34. package/dist/contracts/family.d.ts.map +1 -1
  35. package/dist/contracts/index.d.ts +1 -0
  36. package/dist/contracts/index.d.ts.map +1 -1
  37. package/dist/contracts/index.js +1 -0
  38. package/dist/contracts/index.js.map +1 -1
  39. package/dist/contracts/pr-monitoring.d.ts +8 -8
  40. package/dist/contracts/pr-monitoring.d.ts.map +1 -1
  41. package/dist/contracts/pr-rules.d.ts +5 -7
  42. package/dist/contracts/pr-rules.d.ts.map +1 -1
  43. package/dist/contracts/pr-rules.js +4 -6
  44. package/dist/contracts/pr-rules.js.map +1 -1
  45. package/dist/contracts/qa.d.ts +2 -2
  46. package/dist/contracts/qa.d.ts.map +1 -1
  47. package/dist/contracts/qa.js +5 -9
  48. package/dist/contracts/qa.js.map +1 -1
  49. package/dist/contracts/recipe-conformance.d.ts +51 -0
  50. package/dist/contracts/recipe-conformance.d.ts.map +1 -1
  51. package/dist/contracts/recipe-conformance.js +134 -1
  52. package/dist/contracts/recipe-conformance.js.map +1 -1
  53. package/dist/contracts/resources.d.ts +1 -1
  54. package/dist/contracts/resources.d.ts.map +1 -1
  55. package/dist/contracts/resources.js.map +1 -1
  56. package/dist/contracts/reviews.d.ts +19 -3
  57. package/dist/contracts/reviews.d.ts.map +1 -1
  58. package/dist/contracts/reviews.js +2 -2
  59. package/dist/contracts/reviews.js.map +1 -1
  60. package/dist/contracts/runner-mobile-keys.d.ts +217 -0
  61. package/dist/contracts/runner-mobile-keys.d.ts.map +1 -0
  62. package/dist/contracts/runner-mobile-keys.js +189 -0
  63. package/dist/contracts/runner-mobile-keys.js.map +1 -0
  64. package/dist/contracts/runs.d.ts +105 -91
  65. package/dist/contracts/runs.d.ts.map +1 -1
  66. package/dist/contracts/runs.js +10 -14
  67. package/dist/contracts/runs.js.map +1 -1
  68. package/dist/contracts/runtime-capabilities.d.ts +2 -0
  69. package/dist/contracts/runtime-capabilities.d.ts.map +1 -1
  70. package/dist/contracts/runtime-capabilities.js.map +1 -1
  71. package/dist/contracts/template-placeholders.d.ts +0 -6
  72. package/dist/contracts/template-placeholders.d.ts.map +1 -1
  73. package/dist/contracts/template-placeholders.js +22 -4
  74. package/dist/contracts/template-placeholders.js.map +1 -1
  75. package/dist/contracts/worker-terminal.d.ts +19 -0
  76. package/dist/contracts/worker-terminal.d.ts.map +1 -1
  77. package/dist/contracts/worker-terminal.js.map +1 -1
  78. package/dist/index.d.ts +3 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +3 -0
  81. package/dist/index.js.map +1 -1
  82. package/dist/integrations/pr-monitoring.d.ts.map +1 -1
  83. package/dist/integrations/pr-monitoring.js +9 -3
  84. package/dist/integrations/pr-monitoring.js.map +1 -1
  85. package/dist/integrations/pr-rule-config.d.ts.map +1 -1
  86. package/dist/integrations/pr-rule-config.js +21 -25
  87. package/dist/integrations/pr-rule-config.js.map +1 -1
  88. package/dist/integrations/pr-workflow-defaults.d.ts.map +1 -1
  89. package/dist/integrations/pr-workflow-defaults.js +2 -5
  90. package/dist/integrations/pr-workflow-defaults.js.map +1 -1
  91. package/dist/recipe/artifact.d.ts.map +1 -1
  92. package/dist/recipe/artifact.js +20 -4
  93. package/dist/recipe/artifact.js.map +1 -1
  94. package/dist/recipe/document.d.ts +2 -0
  95. package/dist/recipe/document.d.ts.map +1 -1
  96. package/dist/recipe/document.js +38 -35
  97. package/dist/recipe/document.js.map +1 -1
  98. package/dist/recipe/evidence.d.ts +128 -0
  99. package/dist/recipe/evidence.d.ts.map +1 -0
  100. package/dist/recipe/evidence.js +141 -0
  101. package/dist/recipe/evidence.js.map +1 -0
  102. package/dist/recipe/hud-intent.d.ts +56 -0
  103. package/dist/recipe/hud-intent.d.ts.map +1 -0
  104. package/dist/recipe/hud-intent.js +46 -0
  105. package/dist/recipe/hud-intent.js.map +1 -0
  106. package/dist/recipe/index.d.ts +4 -2
  107. package/dist/recipe/index.d.ts.map +1 -1
  108. package/dist/recipe/index.js +4 -2
  109. package/dist/recipe/index.js.map +1 -1
  110. package/dist/recipe/recording.d.ts +7 -0
  111. package/dist/recipe/recording.d.ts.map +1 -1
  112. package/dist/recipe/recording.js +48 -0
  113. package/dist/recipe/recording.js.map +1 -1
  114. package/dist/recipe/workflow.d.ts.map +1 -1
  115. package/dist/recipe/workflow.js +23 -1
  116. package/dist/recipe/workflow.js.map +1 -1
  117. package/dist/recipes/step-io.d.ts +8 -4
  118. package/dist/recipes/step-io.d.ts.map +1 -1
  119. package/dist/recipes/step-io.js.map +1 -1
  120. package/dist/rpc/copilot-runtime.d.ts +1 -1
  121. package/dist/rpc/copilot-runtime.d.ts.map +1 -1
  122. package/dist/rpc/dispatch.d.ts +10 -6
  123. package/dist/rpc/dispatch.d.ts.map +1 -1
  124. package/dist/rpc/native-session.d.ts +1 -0
  125. package/dist/rpc/native-session.d.ts.map +1 -1
  126. package/dist/rpc/native-session.js.map +1 -1
  127. package/dist/rpc/roadmap.d.ts +2 -0
  128. package/dist/rpc/roadmap.d.ts.map +1 -1
  129. package/dist/rpc/run.d.ts +5 -3
  130. package/dist/rpc/run.d.ts.map +1 -1
  131. package/dist/rpc/run.js.map +1 -1
  132. package/dist/rpc/slot.d.ts +1 -0
  133. package/dist/rpc/slot.d.ts.map +1 -1
  134. package/dist/rpc/tmux.d.ts +10 -0
  135. package/dist/rpc/tmux.d.ts.map +1 -1
  136. package/dist/runs/ci-decision-context.d.ts +40 -0
  137. package/dist/runs/ci-decision-context.d.ts.map +1 -0
  138. package/dist/runs/ci-decision-context.js +129 -0
  139. package/dist/runs/ci-decision-context.js.map +1 -0
  140. package/dist/runs/decision-resolution.d.ts +37 -1
  141. package/dist/runs/decision-resolution.d.ts.map +1 -1
  142. package/dist/runs/decision-resolution.js +36 -0
  143. package/dist/runs/decision-resolution.js.map +1 -1
  144. package/dist/runs/family-iteration-ledger.js +1 -1
  145. package/dist/runs/family-iteration-ledger.js.map +1 -1
  146. package/dist/runs/publish-approval.d.ts +20 -0
  147. package/dist/runs/publish-approval.d.ts.map +1 -0
  148. package/dist/runs/publish-approval.js +29 -0
  149. package/dist/runs/publish-approval.js.map +1 -0
  150. package/dist/runs/review-chain.d.ts +2 -2
  151. package/dist/runs/review-chain.d.ts.map +1 -1
  152. package/dist/runs/review-chain.js +4 -4
  153. package/dist/runs/review-chain.js.map +1 -1
  154. package/dist/runs/review-policy.d.ts +9 -0
  155. package/dist/runs/review-policy.d.ts.map +1 -0
  156. package/dist/runs/review-policy.js +34 -0
  157. package/dist/runs/review-policy.js.map +1 -0
  158. package/dist/runs/review-retries.d.ts +10 -10
  159. package/dist/runs/review-retries.d.ts.map +1 -1
  160. package/dist/runs/review-retries.js +17 -22
  161. package/dist/runs/review-retries.js.map +1 -1
  162. package/dist/runs/slot-resolution.js +1 -1
  163. package/dist/runs/slot-resolution.js.map +1 -1
  164. package/dist/transport/signal.d.ts +3 -3
  165. package/dist/transport/signal.d.ts.map +1 -1
  166. package/dist/version.d.ts +1 -1
  167. package/dist/version.js +1 -1
  168. package/package.json +9 -2
  169. package/schemas/recipe-v1.schema.json +113 -22
  170. package/scripts/acceptance.d.mts +16 -0
  171. package/scripts/acceptance.mjs +233 -0
@@ -22,11 +22,11 @@ export function currentReviewChainEntry(run) {
22
22
  prNumber: context.prNumber,
23
23
  ...(payload?.reviewSnapshot?.baseSha
24
24
  ? { baseSha: payload.reviewSnapshot.baseSha }
25
- : context.reviewScope === 'incremental' && context.priorReviewedHeadSha
25
+ : context.mode === 'warm' && context.priorReviewedHeadSha
26
26
  ? { baseSha: context.priorReviewedHeadSha }
27
27
  : {}),
28
28
  headSha: payload?.reviewSnapshot?.headSha ?? context.currentHeadSha,
29
- reviewScope: context.reviewScope,
29
+ mode: context.mode,
30
30
  validationDepth: context.validationDepth,
31
31
  verdict: payload?.recommendation?.trim() || 'pending',
32
32
  unresolvedCount: payload ? payload.lineComments.length : null,
@@ -45,8 +45,8 @@ export function reviewChainForRun(run) {
45
45
  return [];
46
46
  return [...(run.repeatReviewContext?.priorGenerations ?? []), current].sort((left, right) => left.generation - right.generation || left.runId.localeCompare(right.runId));
47
47
  }
48
- export function reviewSessionIntentForContext(context) {
49
- return context?.sessionIntent ?? 'reset';
48
+ export function reviewModeForContext(context) {
49
+ return context?.mode ?? 'cold';
50
50
  }
51
51
  /** Never turn missing launch evidence into an affirmative continuity claim. */
52
52
  export function observedReviewSessionContinuity(entry) {
@@ -1 +1 @@
1
- {"version":3,"file":"review-chain.js","sourceRoot":"","sources":["../../src/runs/review-chain.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,kBAAkB,CAChC,GAA4C;IAE5C,IAAI,GAAG,CAAC,YAAY;QAAE,OAAO,GAAG,CAAC,YAAY,CAAC;IAC9C,KAAK,IAAI,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAClE,MAAM,OAAO,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,OAAwC,CAAC;QAC/E,IAAI,OAAO,EAAE,IAAI,KAAK,QAAQ;YAAE,OAAO,OAAO,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,GAUC;IAED,MAAM,OAAO,GAAG,GAAG,CAAC,mBAAmB,CAAC;IACxC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,MAAM,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,KAAK,EAAE,GAAG,CAAC,EAAE;QACb,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO;YAClC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE;YAC7C,CAAC,CAAC,OAAO,CAAC,WAAW,KAAK,aAAa,IAAI,OAAO,CAAC,oBAAoB;g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AU,iBAAiB,CAC/B,GAAkD;IAElD,MAAM,OAAO,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,gBAAgB,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,OAA6D;IAE7D,OAAO,OAAO,EAAE,IAAI,IAAI,MAAM,CAAC;AACjC,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,+BAA+B,CAC7C,KAAwC;IAExC,OAAO,KAAK,CAAC,OAAO,EAAE,UAAU,IAAI,SAAS,CAAC;AAChD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ReviewPolicy, ReviewStatus } from '../contracts/runs.js';
2
+ export declare function defaultReviewPolicy(existing?: ReviewPolicy | null): ReviewPolicy;
3
+ export declare function effectiveRequiredReviewCount(policy: ReviewPolicy): number;
4
+ /** A separate reviewer session and a captured reviewed head are required evidence. */
5
+ export declare function isQualifyingReview(review: ReviewStatus): boolean;
6
+ /** Retrying a session replaces its verdict, including a later failure on the same head. */
7
+ export declare function qualifyingPassingReviews(reviews: ReviewStatus[]): ReviewStatus[];
8
+ export declare function reviewPolicySatisfied(policy: ReviewPolicy, reviews: ReviewStatus[]): boolean;
9
+ //# sourceMappingURL=review-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-policy.d.ts","sourceRoot":"","sources":["../../src/runs/review-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEvE,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,GAAG,YAAY,CAKhF;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAEzE;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAKhE;AAED,2FAA2F;AAC3F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAehF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAE5F"}
@@ -0,0 +1,34 @@
1
+ export function defaultReviewPolicy(existing) {
2
+ return {
3
+ minimumReviews: Math.max(0, existing?.minimumReviews ?? 1),
4
+ requestedBy: existing?.requestedBy ?? 'dispatch',
5
+ };
6
+ }
7
+ export function effectiveRequiredReviewCount(policy) {
8
+ return Math.max(0, policy.minimumReviews);
9
+ }
10
+ /** A separate reviewer session and a captured reviewed head are required evidence. */
11
+ export function isQualifyingReview(review) {
12
+ return (!!review.reviewerSessionId?.trim() &&
13
+ !!(review.reviewedHeadSha ?? review.reviewSnapshot?.headSha)?.trim());
14
+ }
15
+ /** Retrying a session replaces its verdict, including a later failure on the same head. */
16
+ export function qualifyingPassingReviews(reviews) {
17
+ const latest = new Map();
18
+ for (const review of reviews)
19
+ latest.set(review.id, review);
20
+ const sessions = new Set();
21
+ return [...latest.values()].filter((review) => {
22
+ if (!isQualifyingReview(review) ||
23
+ review.verdict !== 'pass' ||
24
+ review.unresolvedCount !== 0 ||
25
+ sessions.has(review.reviewerSessionId))
26
+ return false;
27
+ sessions.add(review.reviewerSessionId);
28
+ return true;
29
+ });
30
+ }
31
+ export function reviewPolicySatisfied(policy, reviews) {
32
+ return qualifyingPassingReviews(reviews).length >= effectiveRequiredReviewCount(policy);
33
+ }
34
+ //# sourceMappingURL=review-policy.js.map
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AO,KAAK,CAAC;QACf,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,iBAAkB,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAoB,EAAE,OAAuB;IACjF,OAAO,wBAAwB,CAAC,OAAO,CAAC,CAAC,MAAM,IAAI,4BAA4B,CAAC,MAAM,CAAC,CAAC;AAC1F,CAAC"}
@@ -1,21 +1,21 @@
1
- import type { IndependentReviewStatus } from '../contracts/runs.js';
1
+ import type { ReviewStatus } from '../contracts/runs.js';
2
2
  export declare const APPROVE_PUBLISH_UNRESOLVED_ACTION = "approve-publish-unresolved";
3
- type ReviewRetryFields = Partial<Pick<IndependentReviewStatus, 'source' | 'verdict' | 'unresolvedCount' | 'issues' | 'feedbackSent' | 'recoveryContinuationPending' | 'retryCount' | 'maxRetries' | 'maxRetriesExhausted' | 'attempts' | 'reviewedHeadSha' | 'reviewedReviewSubjectHash' | 'reviewSnapshot'>>;
4
- export declare function independentReviewRetryCount(review: ReviewRetryFields): number;
3
+ type ReviewRetryFields = Partial<Pick<ReviewStatus, 'source' | 'verdict' | 'unresolvedCount' | 'issues' | 'feedbackSent' | 'recoveryContinuationPending' | 'retryCount' | 'maxRetries' | 'maxRetriesExhausted' | 'attempts' | 'reviewedHeadSha' | 'reviewedReviewSubjectHash' | 'reviewSnapshot'>>;
4
+ export declare function reviewRetryCount(review: ReviewRetryFields): number;
5
5
  /**
6
- * True when an extra/independent review consumed its auto-fix budget with
6
+ * True when an review consumed its auto-fix budget with
7
7
  * findings still open. `max_retries: 0` is not a cap-hit: the operator still
8
8
  * uses Continue Fixing to authorize the first worker pass.
9
9
  *
10
10
  * Records without `maxRetries` are exhausted only when `maxRetriesExhausted`
11
11
  * was persisted. Missing cap fields are not inferred.
12
12
  */
13
- export declare function independentReviewFixRetriesExhausted(review: ReviewRetryFields): boolean;
13
+ export declare function reviewFixRetriesExhausted(review: ReviewRetryFields): boolean;
14
14
  /** Repair wiped `retryCount: 0` and stamp a missing cap from project config. */
15
- export declare function stampIndependentReviewRetryCap<T extends ReviewRetryFields>(review: T, configuredMaxRetries?: number): T;
16
- export declare function independentReviewRetryCapReason(review: ReviewRetryFields): string;
17
- export declare function latestIndependentReview(reviews: readonly ReviewRetryFields[] | undefined): ReviewRetryFields | undefined;
18
- /** Latest terminal extra-review that hit its auto-fix cap. Package HEAD drift does not hide this. */
19
- export declare function latestExhaustedIndependentReview(reviews: readonly ReviewRetryFields[] | undefined): ReviewRetryFields | undefined;
15
+ export declare function stampReviewRetryCap<T extends ReviewRetryFields>(review: T, configuredMaxRetries?: number): T;
16
+ export declare function reviewRetryCapReason(review: ReviewRetryFields): string;
17
+ export declare function latestReview(reviews: readonly ReviewRetryFields[] | undefined): ReviewRetryFields | undefined;
18
+ /** Latest terminal review that hit its auto-fix cap. Package HEAD drift does not hide this. */
19
+ export declare function latestExhaustedReview(reviews: readonly ReviewRetryFields[] | undefined): ReviewRetryFields | undefined;
20
20
  export {};
21
21
  //# sourceMappingURL=review-retries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-retries.d.ts","sourceRoot":"","sources":["../../src/runs/review-retries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,eAAO,MAAM,iCAAiC,+BAA+B,CAAC;AAE9E,KAAK,iBAAiB,GAAG,OAAO,CAC9B,IAAI,CACF,uBAAuB,EACrB,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,cAAc,GACd,6BAA6B,GAC7B,YAAY,GACZ,YAAY,GACZ,qBAAqB,GACrB,UAAU,GACV,iBAAiB,GACjB,2BAA2B,GAC3B,gBAAgB,CACnB,CACF,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAM7E;AAED;;;;;;;GAOG;AACH,wBAAgB,oCAAoC,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,iBAAiB,GAAG,MAAM,CAQtE;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,GAChD,iBAAiB,GAAG,SAAS,CAI/B;AAED,+FAA+F;AAC/F,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,GAChD,iBAAiB,GAAG,SAAS,CAI/B"}
@@ -1,5 +1,5 @@
1
1
  export const APPROVE_PUBLISH_UNRESOLVED_ACTION = 'approve-publish-unresolved';
2
- export function independentReviewRetryCount(review) {
2
+ export function reviewRetryCount(review) {
3
3
  const fromAttempts = Math.max(0, (review.attempts?.length ?? 1) - 1);
4
4
  if (typeof review.retryCount === 'number' && Number.isFinite(review.retryCount)) {
5
5
  return Math.max(0, Math.round(review.retryCount), fromAttempts);
@@ -7,22 +7,20 @@ export function independentReviewRetryCount(review) {
7
7
  return fromAttempts;
8
8
  }
9
9
  /**
10
- * True when an extra/independent review consumed its auto-fix budget with
10
+ * True when an review consumed its auto-fix budget with
11
11
  * findings still open. `max_retries: 0` is not a cap-hit: the operator still
12
12
  * uses Continue Fixing to authorize the first worker pass.
13
13
  *
14
14
  * Records without `maxRetries` are exhausted only when `maxRetriesExhausted`
15
15
  * was persisted. Missing cap fields are not inferred.
16
16
  */
17
- export function independentReviewFixRetriesExhausted(review) {
18
- if (review.source === 'self-review')
19
- return false;
17
+ export function reviewFixRetriesExhausted(review) {
20
18
  if (review.verdict !== 'issues')
21
19
  return false;
22
20
  const findings = Math.max(review.unresolvedCount ?? 0, review.issues?.length ?? 0);
23
21
  if (findings <= 0)
24
22
  return false;
25
- const retryCount = independentReviewRetryCount(review);
23
+ const retryCount = reviewRetryCount(review);
26
24
  if (typeof review.maxRetries === 'number' && Number.isFinite(review.maxRetries)) {
27
25
  if (review.maxRetries <= 0)
28
26
  return false;
@@ -33,10 +31,8 @@ export function independentReviewFixRetriesExhausted(review) {
33
31
  return review.maxRetriesExhausted === true;
34
32
  }
35
33
  /** Repair wiped `retryCount: 0` and stamp a missing cap from project config. */
36
- export function stampIndependentReviewRetryCap(review, configuredMaxRetries) {
37
- if (review.source === 'self-review')
38
- return review;
39
- const retryCount = independentReviewRetryCount(review);
34
+ export function stampReviewRetryCap(review, configuredMaxRetries) {
35
+ const retryCount = reviewRetryCount(review);
40
36
  const maxRetries = typeof review.maxRetries === 'number' && Number.isFinite(review.maxRetries)
41
37
  ? review.maxRetries
42
38
  : typeof configuredMaxRetries === 'number' && Number.isFinite(configuredMaxRetries)
@@ -47,29 +43,28 @@ export function stampIndependentReviewRetryCap(review, configuredMaxRetries) {
47
43
  retryCount,
48
44
  ...(typeof maxRetries === 'number' ? { maxRetries } : {}),
49
45
  };
50
- if (!independentReviewFixRetriesExhausted(next))
46
+ if (!reviewFixRetriesExhausted(next))
51
47
  return next;
52
48
  return { ...next, maxRetriesExhausted: true, recoveryContinuationPending: false };
53
49
  }
54
- export function independentReviewRetryCapReason(review) {
55
- const retryCount = independentReviewRetryCount(review);
50
+ export function reviewRetryCapReason(review) {
51
+ const retryCount = reviewRetryCount(review);
56
52
  const findings = Math.max(review.unresolvedCount ?? 0, review.issues?.length ?? 0);
57
53
  const findingLabel = `${findings} finding${findings === 1 ? '' : 's'}`;
58
54
  if (typeof review.maxRetries === 'number' && Number.isFinite(review.maxRetries)) {
59
- return `Independent review stopped after ${retryCount}/${review.maxRetries} fix attempts; ${findingLabel} remain. Request another review, or bypass publish (dangerous).`;
55
+ return `Review stopped after ${retryCount}/${review.maxRetries} fix attempts; ${findingLabel} remain. Request another review, or bypass publish (dangerous).`;
60
56
  }
61
- return `Independent review stopped after ${retryCount} fix attempt${retryCount === 1 ? '' : 's'}; ${findingLabel} remain. Request another review, or bypass publish (dangerous).`;
57
+ return `Review stopped after ${retryCount} fix attempt${retryCount === 1 ? '' : 's'}; ${findingLabel} remain. Request another review, or bypass publish (dangerous).`;
62
58
  }
63
- export function latestIndependentReview(reviews) {
59
+ export function latestReview(reviews) {
64
60
  return [...(reviews ?? [])]
65
61
  .reverse()
66
- .find((review) => review.source !== 'self-review' &&
67
- (review.verdict === 'pass' || review.verdict === 'issues'));
62
+ .find((review) => review.verdict === 'pass' || review.verdict === 'issues');
68
63
  }
69
- /** Latest terminal extra-review that hit its auto-fix cap. Package HEAD drift does not hide this. */
70
- export function latestExhaustedIndependentReview(reviews) {
71
- const latest = latestIndependentReview(reviews);
72
- if (!latest || !independentReviewFixRetriesExhausted(latest))
64
+ /** Latest terminal review that hit its auto-fix cap. Package HEAD drift does not hide this. */
65
+ export function latestExhaustedReview(reviews) {
66
+ const latest = latestReview(reviews);
67
+ if (!latest || !reviewFixRetriesExhausted(latest))
73
68
  return undefined;
74
69
  return latest;
75
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"review-retries.js","sourceRoot":"","sources":["../../src/runs/review-retries.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iCAAiC,GAAG,4BAA4B,CAAC;AAqB9E,MAAM,UAAU,2BAA2B,CAAC,MAAyB;IACnE,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAChF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oCAAoC,CAAC,MAAyB;IAC5E,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa;QAAE,OAAO,KAAK,CAAC;IAClD,IAAI,MAAM,CAAC,OAAO,KAAK,QAAQ;QAA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self-review', 'dev'];
7
+ const preferredRoles = ['review-fix', 'review', 'dev'];
8
8
  for (const role of preferredRoles) {
9
9
  const context = run.agentContexts
10
10
  ?.slice()
@@ -1 +1 @@
1
- {"version":3,"file":"slot-resolution.js","sourceRoot":"","sources":["../../src/runs/slot-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,EAAE,EAAY,MAAM,sBAAsB,CAAC;AAErE,2GAA2G;AAC3G,MAAM,UAAU,gBAAgB,CAC9B,GAAoD;IAEpD,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;IACpC,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,MAAM,cAAc,GAAG,CAAC,iBAAiB,EAAE,aAAa,EAAE,KAAK,CAAU,CAAC;IAC1E,KAAK,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,GAAG,CAAC,aAAa;YAC/B,EAAE,KAAK,EAAE;aACR,OAAO,EAAE;aACT,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,IAAI,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,IAAI,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YAAE,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5D,CAAC;IAED,MAAM,UAAU,GAAG,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACpF,IAAI,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,I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CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,YAAY,GAChB,QAAQ,EAAE,OACX,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACxB,OAAO,YAAY,IAAI,IAAI,CAAC;AAC9B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { AgentRole, WorkerTerminalDisposition, WorkerTerminalEvidence } from '../contracts/index.js';
2
2
  /**
3
3
  * Where a child checklist unit hangs off its parent (ADR-060). The checklist is
4
- * a task-dir basename (`CHECKLIST.md`, `SELF-REVIEW.md`), never a path, so the
4
+ * a task-dir basename (`CHECKLIST.md`, `REVIEW.md`), never a path, so the
5
5
  * link survives the task directory travelling to a slot.
6
6
  */
7
7
  export interface WorkerSignalParentLink {
@@ -24,8 +24,8 @@ export interface WorkerSignal {
24
24
  step?: string;
25
25
  reason?: string;
26
26
  prNumber?: number;
27
- /** The worker completed a trivial update-branch task that does not need self-review. */
28
- needsSelfReview?: boolean;
27
+ /** The worker completed a trivial update-branch task that does not need review. */
28
+ needsReview?: boolean;
29
29
  /** Set only on a child unit signal under `subtasks/`; names the owning step. */
30
30
  parent?: WorkerSignalParentLink;
31
31
  timestamp: string;
@@ -1 +1 @@
1
- {"version":3,"file":"signal.d.ts","sourceRoot":"","sources":["../../src/transport/signal.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,SAAS,EACT,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAA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AS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,CAAC,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,EAAE,0BAA0B,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,0BAA0B;IACzC,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;IACnB,0GAA0G;IAC1G,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iCAAiC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,EACtD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GACxB,iCAAiC,EAAE,CAYrC;AAED,sEAAsE;AACtE,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,SAAS,GACT,cAAc,GACd,SAAS,GACT,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,OAAO,GACP,mBAAmB,GACnB,kCAAkC,CAAC;AAEvC,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB"}
1
+ {"version":3,"file":"signal.d.ts","sourceRoot":"","sources":["../../src/transport/signal.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,SAAS,EACT,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,uBA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ChB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const PROTOCOL_VERSION = "0.38.0";
1
+ export declare const PROTOCOL_VERSION = "0.39.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // fleet can be upgraded deliberately; optional method/event fields remain
4
4
  // backward-compatible unless a caller requires a new node capability.
5
5
  // Format: semver-ish, increment when methods/events/frame format changes.
6
- export const PROTOCOL_VERSION = '0.38.0';
6
+ export const PROTOCOL_VERSION = '0.39.0';
7
7
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farmslot/protocol",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -373,6 +373,10 @@
373
373
  "types": "./dist/node/pack-portability.d.ts",
374
374
  "import": "./dist/node/pack-portability.js",
375
375
  "default": "./dist/node/pack-portability.js"
376
+ },
377
+ "./scripts/acceptance.mjs": {
378
+ "types": "./scripts/acceptance.d.mts",
379
+ "default": "./scripts/acceptance.mjs"
376
380
  }
377
381
  },
378
382
  "scripts": {
@@ -419,7 +423,10 @@
419
423
  "dist/**/*.js",
420
424
  "dist/**/*.d.ts",
421
425
  "dist/**/*.d.ts.map",
422
- "dist/**/*.js.map"
426
+ "dist/**/*.js.map",
427
+ "scripts/acceptance.mjs",
428
+ "scripts/acceptance.d.cts",
429
+ "scripts/acceptance.d.mts"
423
430
  ],
424
431
  "publishConfig": {
425
432
  "access": "public"
@@ -40,6 +40,19 @@
40
40
  "type": "string",
41
41
  "minLength": 1,
42
42
  "description": "Human-readable statement that successful linked nodes establish."
43
+ },
44
+ "kind": {
45
+ "enum": ["acceptance", "qa-case", "qa-check"],
46
+ "description": "Acceptance criterion, QA case or QA check proved by the recipe."
47
+ },
48
+ "parentId": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "description": "Registered parent claim whose outcome includes this required check."
52
+ },
53
+ "proofMode": {
54
+ "enum": ["state", "visual", "mixed"],
55
+ "description": "State assertions, visual review, or both are required to prove this claim."
43
56
  }
44
57
  },
45
58
  "additionalProperties": false
@@ -67,14 +80,21 @@
67
80
  "required": {
68
81
  "type": "array",
69
82
  "description": "Parameter names callers must provide when no default satisfies them.",
70
- "items": { "type": "string", "minLength": 1 },
83
+ "items": {
84
+ "type": "string",
85
+ "minLength": 1
86
+ },
71
87
  "uniqueItems": true
72
88
  },
73
89
  "properties": {
74
90
  "type": "object",
75
91
  "description": "Named parameter definitions available to callers and call nodes.",
76
- "propertyNames": { "pattern": "^[A-Za-z0-9_-]+$" },
77
- "additionalProperties": { "$ref": "#/$defs/paramSchema" }
92
+ "propertyNames": {
93
+ "pattern": "^[A-Za-z0-9_-]+$"
94
+ },
95
+ "additionalProperties": {
96
+ "$ref": "#/$defs/paramSchema"
97
+ }
78
98
  }
79
99
  },
80
100
  "additionalProperties": false
@@ -86,10 +106,14 @@
86
106
  "type": {
87
107
  "description": "Allowed JSON value type or types for this parameter.",
88
108
  "oneOf": [
89
- { "enum": ["string", "number", "integer", "boolean", "object", "array"] },
109
+ {
110
+ "enum": ["string", "number", "integer", "boolean", "object", "array"]
111
+ },
90
112
  {
91
113
  "type": "array",
92
- "items": { "enum": ["string", "number", "integer", "boolean", "object", "array"] },
114
+ "items": {
115
+ "enum": ["string", "number", "integer", "boolean", "object", "array"]
116
+ },
93
117
  "minItems": 1,
94
118
  "uniqueItems": true
95
119
  }
@@ -115,14 +139,21 @@
115
139
  "required": {
116
140
  "type": "array",
117
141
  "description": "Required keys within an object parameter.",
118
- "items": { "type": "string", "minLength": 1 },
142
+ "items": {
143
+ "type": "string",
144
+ "minLength": 1
145
+ },
119
146
  "uniqueItems": true
120
147
  },
121
148
  "properties": {
122
149
  "type": "object",
123
150
  "description": "Named child schemas for an object parameter.",
124
- "propertyNames": { "pattern": "^[A-Za-z0-9_-]+$" },
125
- "additionalProperties": { "$ref": "#/$defs/paramSchema" }
151
+ "propertyNames": {
152
+ "pattern": "^[A-Za-z0-9_-]+$"
153
+ },
154
+ "additionalProperties": {
155
+ "$ref": "#/$defs/paramSchema"
156
+ }
126
157
  },
127
158
  "items": {
128
159
  "$ref": "#/$defs/paramSchema",
@@ -152,7 +183,10 @@
152
183
  },
153
184
  "proofLinks": {
154
185
  "type": "array",
155
- "items": { "type": "string", "minLength": 1 },
186
+ "items": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
156
190
  "uniqueItems": true
157
191
  },
158
192
  "transition": {
@@ -166,7 +200,16 @@
166
200
  "description": "Node id to execute after this node succeeds."
167
201
  }
168
202
  },
169
- "not": { "anyOf": [{ "required": ["cases"] }, { "required": ["default"] }] }
203
+ "not": {
204
+ "anyOf": [
205
+ {
206
+ "required": ["cases"]
207
+ },
208
+ {
209
+ "required": ["default"]
210
+ }
211
+ ]
212
+ }
170
213
  },
171
214
  {
172
215
  "required": ["cases", "default"],
@@ -174,7 +217,10 @@
174
217
  "cases": {
175
218
  "type": "object",
176
219
  "minProperties": 1,
177
- "additionalProperties": { "type": "string", "minLength": 1 },
220
+ "additionalProperties": {
221
+ "type": "string",
222
+ "minLength": 1
223
+ },
178
224
  "description": "Maps an action result case to the next node id."
179
225
  },
180
226
  "default": {
@@ -183,7 +229,9 @@
183
229
  "description": "Node id used when no declared result case matches."
184
230
  }
185
231
  },
186
- "not": { "required": ["next"] }
232
+ "not": {
233
+ "required": ["next"]
234
+ }
187
235
  }
188
236
  ]
189
237
  },
@@ -194,7 +242,9 @@
194
242
  "action": {
195
243
  "type": "string",
196
244
  "minLength": 1,
197
- "not": { "enum": ["call", "end"] },
245
+ "not": {
246
+ "enum": ["call", "end"]
247
+ },
198
248
  "description": "Registered action name to execute; action-specific fields are declared by its manifest."
199
249
  },
200
250
  "intent": {
@@ -210,7 +260,10 @@
210
260
  "cases": {
211
261
  "type": "object",
212
262
  "minProperties": 1,
213
- "additionalProperties": { "type": "string", "minLength": 1 },
263
+ "additionalProperties": {
264
+ "type": "string",
265
+ "minLength": 1
266
+ },
214
267
  "description": "Maps an action result case to the next node id."
215
268
  },
216
269
  "default": {
@@ -225,9 +278,24 @@
225
278
  "visual_review": {
226
279
  "$ref": "#/$defs/visualReviewRelationship",
227
280
  "description": "Optional visual-review hierarchy and related-surface links for ui.capture_surface and ui.screenshot nodes."
281
+ },
282
+ "retryGroup": {
283
+ "type": "string",
284
+ "minLength": 1,
285
+ "description": "Declared retry identity; earlier failed attempts remain in the trace."
286
+ },
287
+ "retryAttempts": {
288
+ "type": "integer",
289
+ "minimum": 1,
290
+ "maximum": 3,
291
+ "description": "Maximum attempts for a declared retry, including the first execution."
228
292
  }
229
293
  },
230
- "allOf": [{ "$ref": "#/$defs/transition" }],
294
+ "allOf": [
295
+ {
296
+ "$ref": "#/$defs/transition"
297
+ }
298
+ ],
231
299
  "additionalProperties": true
232
300
  },
233
301
  "visualReviewRelationship": {
@@ -261,7 +329,10 @@
261
329
  },
262
330
  "related": {
263
331
  "type": "array",
264
- "items": { "type": "string", "minLength": 1 },
332
+ "items": {
333
+ "type": "string",
334
+ "minLength": 1
335
+ },
265
336
  "uniqueItems": true,
266
337
  "description": "Related visual capture node ids within this recipe."
267
338
  }
@@ -284,7 +355,9 @@
284
355
  "ref": {
285
356
  "type": "string",
286
357
  "minLength": 1,
287
- "not": { "pattern": "\\{\\{\\s*(?:params|outputs)\\." },
358
+ "not": {
359
+ "pattern": "\\{\\{\\s*(?:params|outputs)\\."
360
+ },
288
361
  "description": "Static recipe id resolved from configured recipe libraries."
289
362
  },
290
363
  "params": {
@@ -299,6 +372,14 @@
299
372
  "type": "string",
300
373
  "minLength": 1,
301
374
  "description": "Node id to execute after the called recipe succeeds."
375
+ },
376
+ "claimBindings": {
377
+ "type": "object",
378
+ "additionalProperties": {
379
+ "type": "string",
380
+ "minLength": 1
381
+ },
382
+ "description": "Map declared child claims to registered parent claims; unbound child ids are qualified by this call."
302
383
  }
303
384
  },
304
385
  "additionalProperties": false
@@ -320,9 +401,15 @@
320
401
  },
321
402
  "workflowNode": {
322
403
  "oneOf": [
323
- { "$ref": "#/$defs/actionNode" },
324
- { "$ref": "#/$defs/callNode" },
325
- { "$ref": "#/$defs/endNode" }
404
+ {
405
+ "$ref": "#/$defs/actionNode"
406
+ },
407
+ {
408
+ "$ref": "#/$defs/callNode"
409
+ },
410
+ {
411
+ "$ref": "#/$defs/endNode"
412
+ }
326
413
  ]
327
414
  },
328
415
  "workflow": {
@@ -342,8 +429,12 @@
342
429
  "nodes": {
343
430
  "type": "object",
344
431
  "minProperties": 1,
345
- "propertyNames": { "pattern": "^[A-Za-z0-9_-]+$" },
346
- "additionalProperties": { "$ref": "#/$defs/workflowNode" },
432
+ "propertyNames": {
433
+ "pattern": "^[A-Za-z0-9_-]+$"
434
+ },
435
+ "additionalProperties": {
436
+ "$ref": "#/$defs/workflowNode"
437
+ },
347
438
  "description": "Named action, recipe-call, and terminal nodes in the executable graph."
348
439
  }
349
440
  },
@@ -0,0 +1,16 @@
1
+ export const ACCEPTANCE_STATUS_ARTIFACT: 'artifacts/acceptance-status.json';
2
+ export const ACCEPTANCE_VERDICTS: readonly [
3
+ 'proven',
4
+ 'weak',
5
+ 'missing',
6
+ 'untestable',
7
+ 'failed',
8
+ 'awaiting-review',
9
+ ];
10
+ export const ACCEPTANCE_PROOF_MODES: readonly ['state', 'visual', 'mixed'];
11
+ export const ACCEPTANCE_CRITERION_ID_PATTERN: RegExp;
12
+ export function acceptanceCriterionId(index: number): string;
13
+ export function validateAcceptanceStatusLedger(value: unknown): string[];
14
+ export function acceptanceCriteriaView(criteria: readonly unknown[], ledger: unknown): unknown[];
15
+ export function summarizeAcceptanceStatus(ledger: unknown, criteria?: readonly unknown[]): unknown;
16
+ export function renderAcceptanceCoverage(ledger: unknown, criteria?: readonly unknown[]): string;