@sublang/playbook 4.0.0 → 5.0.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.
@@ -665,6 +665,23 @@ const runtimeSpec = {
665
665
  extractRequiredFields,
666
666
  verbatimPayloadFields: VERBATIM_PAYLOAD_FIELDS,
667
667
  resumableStateIds: registeredResumableStateIds,
668
+ // PBRT-52: CODE's own ControlView context projection. Exactly the four
669
+ // closed-vocabulary classification members the FSM assigns itself, which
670
+ // are what a controller needs to see to describe or steer a CODE
671
+ // engagement. Everything else in `CodingContext` is deliberately absent:
672
+ // `coderPlayer` / `reviewerPlayer` / `committerPlayer` are the resolved
673
+ // host player roster, `intent` is an option value, and `irNumber`,
674
+ // `taskDescription`, `reviews`, `challenges`, and `lastResult` all carry
675
+ // player-authored text — all of which a session-Captain prompt must
676
+ // exclude, or may carry only as fenced quotes
677
+ // (CAPTAIN-9). A member added to `CodingContext`
678
+ // later stays private until it is named here.
679
+ controlContextFields: [
680
+ 'workflow',
681
+ 'changeOrigin',
682
+ 'reviewSubject',
683
+ 'afterReview',
684
+ ],
668
685
  classifyBossText: (text, ports, signal, snapshotOrState, boundary) => classifyBossText(text, ports, signal, snapshotOrState, boundary),
669
686
  classificationStatus: (event) => formatClassification(event.type),
670
687
  statusesForState,
@@ -936,6 +936,23 @@ const runtimeSpec: XStatePlaybookRuntimeSpec<CodePlaybookOptions> = {
936
936
  extractRequiredFields,
937
937
  verbatimPayloadFields: VERBATIM_PAYLOAD_FIELDS,
938
938
  resumableStateIds: registeredResumableStateIds,
939
+ // PBRT-52: CODE's own ControlView context projection. Exactly the four
940
+ // closed-vocabulary classification members the FSM assigns itself, which
941
+ // are what a controller needs to see to describe or steer a CODE
942
+ // engagement. Everything else in `CodingContext` is deliberately absent:
943
+ // `coderPlayer` / `reviewerPlayer` / `committerPlayer` are the resolved
944
+ // host player roster, `intent` is an option value, and `irNumber`,
945
+ // `taskDescription`, `reviews`, `challenges`, and `lastResult` all carry
946
+ // player-authored text — all of which a session-Captain prompt must
947
+ // exclude, or may carry only as fenced quotes
948
+ // (CAPTAIN-9). A member added to `CodingContext`
949
+ // later stays private until it is named here.
950
+ controlContextFields: [
951
+ 'workflow',
952
+ 'changeOrigin',
953
+ 'reviewSubject',
954
+ 'afterReview',
955
+ ],
939
956
  classifyBossText: (text, ports, signal, snapshotOrState, boundary) =>
940
957
  classifyBossText(text, ports, signal, snapshotOrState, boundary),
941
958
  classificationStatus: (event) => formatClassification(event.type),
@@ -1,5 +1,6 @@
1
1
  import type { Captain } from '@sublang/cligent/tmux-play';
2
2
  import type { PlaybookRuntime } from '@sublang/playbook/runtime';
3
+ import { type CaptainControllerPort } from '../captain.playbook/captain.playbook.js';
3
4
  import type { PlaybookSummaryPolicy, RegistryPlayer } from './code.registry.js';
4
5
  export interface CreatePlaybookRuntimeOptions {
5
6
  captainOptions: unknown;
@@ -14,6 +15,7 @@ export interface PlaybookCaptainDeps {
14
15
  readonly command: string;
15
16
  readonly intent: string;
16
17
  }[];
18
+ readonly controller: CaptainControllerPort;
17
19
  }) => PlaybookRuntime;
18
20
  }
19
21
  export interface PlaybookCaptainRegistryEntry {