@sublang/playbook 0.8.0 → 1.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.
Files changed (55) hide show
  1. package/README.md +243 -193
  2. package/package.json +52 -17
  3. package/reference/sdlc/captain.md +102 -0
  4. package/reference/sdlc/captain.playbook/captain.fsm.d.ts +227 -0
  5. package/reference/sdlc/captain.playbook/captain.fsm.js +628 -0
  6. package/reference/sdlc/captain.playbook/captain.fsm.ts +851 -0
  7. package/reference/sdlc/captain.playbook/captain.gears.md +60 -0
  8. package/reference/sdlc/captain.playbook/captain.playbook.d.ts +23 -0
  9. package/reference/sdlc/captain.playbook/captain.playbook.js +1053 -0
  10. package/reference/sdlc/captain.playbook/captain.playbook.ts +1144 -0
  11. package/reference/sdlc/code.playbook/bin/playbook.js +580 -0
  12. package/reference/sdlc/code.playbook/bin/run.js +893 -0
  13. package/reference/sdlc/code.playbook/code.fsm.d.ts +11 -4
  14. package/reference/sdlc/code.playbook/code.fsm.introspect.d.ts +2 -2
  15. package/reference/sdlc/code.playbook/code.fsm.introspect.js +1 -1
  16. package/reference/sdlc/code.playbook/code.fsm.introspect.ts +6 -6
  17. package/reference/sdlc/code.playbook/code.fsm.js +334 -102
  18. package/reference/sdlc/code.playbook/code.fsm.ts +470 -182
  19. package/reference/sdlc/code.playbook/code.gears.md +11 -10
  20. package/reference/sdlc/code.playbook/code.playbook.d.ts +18 -9
  21. package/reference/sdlc/code.playbook/code.playbook.js +1098 -202
  22. package/reference/sdlc/code.playbook/code.playbook.ts +1440 -258
  23. package/reference/sdlc/code.playbook/code.registry.d.ts +17 -5
  24. package/reference/sdlc/code.playbook/code.registry.js +49 -34
  25. package/reference/sdlc/code.playbook/code.registry.ts +75 -41
  26. package/reference/sdlc/code.playbook/playbook-captain.d.ts +16 -8
  27. package/reference/sdlc/code.playbook/playbook-captain.js +1005 -240
  28. package/reference/sdlc/code.playbook/playbook-captain.ts +1310 -301
  29. package/reference/sdlc/code.playbook/playbook.config.template.yaml +68 -0
  30. package/reference/sdlc/discuss.playbook/discuss.fsm.d.ts +396 -0
  31. package/reference/sdlc/discuss.playbook/discuss.fsm.js +2066 -0
  32. package/reference/sdlc/discuss.playbook/discuss.fsm.ts +2464 -0
  33. package/reference/sdlc/discuss.playbook/discuss.gears.md +251 -0
  34. package/reference/sdlc/discuss.playbook/discuss.playbook.d.ts +113 -0
  35. package/reference/sdlc/discuss.playbook/discuss.playbook.js +1514 -0
  36. package/reference/sdlc/discuss.playbook/discuss.playbook.ts +1926 -0
  37. package/reference/sdlc/discuss.playbook/discuss.registry.d.ts +58 -0
  38. package/reference/sdlc/discuss.playbook/discuss.registry.js +97 -0
  39. package/reference/sdlc/discuss.playbook/discuss.registry.ts +153 -0
  40. package/slc/gears2fsm.md +557 -57
  41. package/slc/link.md +1097 -80
  42. package/slc/optimize.md +88 -0
  43. package/slc/text2gears.md +247 -5
  44. package/src/runtime.d.ts +145 -3
  45. package/src/runtime.ts +200 -2
  46. package/src/xstate-runtime.d.ts +94 -0
  47. package/src/xstate-runtime.js +1247 -0
  48. package/src/xstate-runtime.ts +1802 -0
  49. package/reference/sdlc/code.playbook/bin/playbook-code.js +0 -487
  50. package/reference/sdlc/code.playbook/code.tmux-play.d.ts +0 -4
  51. package/reference/sdlc/code.playbook/code.tmux-play.js +0 -11
  52. package/reference/sdlc/code.playbook/code.tmux-play.ts +0 -29
  53. package/reference/sdlc/code.playbook/playbook-code.config.template.yaml +0 -72
  54. package/reference/sdlc/code.playbook/tmux-play.config.yaml +0 -55
  55. package/reference/sdlc/code.playbook/tmux-play.production.config.yaml +0 -38
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@sublang/playbook",
3
- "version": "0.8.0",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
- "description": "Reference CODE playbook — XState v5 FSM, host-agnostic runtime, and Playbook Captain shell for a coder/reviewer/committer loop driven by GEARS spec items.",
5
+ "description": "Composable XState v5 playbook runtime with compiled Captain, CODE, and DISCUSS workflows driven by GEARS specs.",
6
6
  "license": "Apache-2.0",
7
7
  "homepage": "https://github.com/sublang-ai/playbook#readme",
8
8
  "repository": {
@@ -28,9 +28,21 @@
28
28
  "src/runtime.ts",
29
29
  "src/runtime.js",
30
30
  "src/runtime.d.ts",
31
+ "src/xstate-runtime.ts",
32
+ "src/xstate-runtime.js",
33
+ "src/xstate-runtime.d.ts",
31
34
  "slc/link.md",
32
35
  "slc/gears2fsm.md",
33
36
  "slc/text2gears.md",
37
+ "slc/optimize.md",
38
+ "reference/sdlc/captain.md",
39
+ "reference/sdlc/captain.playbook/captain.gears.md",
40
+ "reference/sdlc/captain.playbook/captain.fsm.ts",
41
+ "reference/sdlc/captain.playbook/captain.fsm.js",
42
+ "reference/sdlc/captain.playbook/captain.fsm.d.ts",
43
+ "reference/sdlc/captain.playbook/captain.playbook.ts",
44
+ "reference/sdlc/captain.playbook/captain.playbook.js",
45
+ "reference/sdlc/captain.playbook/captain.playbook.d.ts",
34
46
  "reference/sdlc/code.playbook/code.fsm.ts",
35
47
  "reference/sdlc/code.playbook/code.fsm.js",
36
48
  "reference/sdlc/code.playbook/code.fsm.d.ts",
@@ -46,50 +58,73 @@
46
58
  "reference/sdlc/code.playbook/playbook-captain.ts",
47
59
  "reference/sdlc/code.playbook/playbook-captain.js",
48
60
  "reference/sdlc/code.playbook/playbook-captain.d.ts",
49
- "reference/sdlc/code.playbook/code.tmux-play.ts",
50
- "reference/sdlc/code.playbook/code.tmux-play.js",
51
- "reference/sdlc/code.playbook/code.tmux-play.d.ts",
52
61
  "reference/sdlc/code.playbook/code.gears.md",
53
- "reference/sdlc/code.playbook/tmux-play.config.yaml",
54
- "reference/sdlc/code.playbook/tmux-play.production.config.yaml",
55
- "reference/sdlc/code.playbook/playbook-code.config.template.yaml",
56
- "reference/sdlc/code.playbook/bin/playbook-code.js"
62
+ "reference/sdlc/code.playbook/playbook.config.template.yaml",
63
+ "reference/sdlc/code.playbook/bin/playbook.js",
64
+ "reference/sdlc/code.playbook/bin/run.js",
65
+ "reference/sdlc/discuss.playbook/discuss.gears.md",
66
+ "reference/sdlc/discuss.playbook/discuss.fsm.ts",
67
+ "reference/sdlc/discuss.playbook/discuss.fsm.js",
68
+ "reference/sdlc/discuss.playbook/discuss.fsm.d.ts",
69
+ "reference/sdlc/discuss.playbook/discuss.playbook.ts",
70
+ "reference/sdlc/discuss.playbook/discuss.playbook.js",
71
+ "reference/sdlc/discuss.playbook/discuss.playbook.d.ts",
72
+ "reference/sdlc/discuss.playbook/discuss.registry.ts",
73
+ "reference/sdlc/discuss.playbook/discuss.registry.js",
74
+ "reference/sdlc/discuss.playbook/discuss.registry.d.ts"
57
75
  ],
58
76
  "bin": {
59
- "playbook-code": "reference/sdlc/code.playbook/bin/playbook-code.js"
77
+ "playbook": "reference/sdlc/code.playbook/bin/playbook.js"
60
78
  },
61
79
  "exports": {
62
80
  "./runtime": {
63
81
  "types": "./src/runtime.d.ts",
64
82
  "default": "./src/runtime.js"
65
83
  },
84
+ "./xstate-runtime": {
85
+ "types": "./src/xstate-runtime.d.ts",
86
+ "default": "./src/xstate-runtime.js"
87
+ },
88
+ "./captain/playbook": {
89
+ "types": "./reference/sdlc/captain.playbook/captain.playbook.d.ts",
90
+ "default": "./reference/sdlc/captain.playbook/captain.playbook.js"
91
+ },
66
92
  "./code/playbook": {
67
93
  "types": "./reference/sdlc/code.playbook/code.playbook.d.ts",
68
94
  "default": "./reference/sdlc/code.playbook/code.playbook.js"
69
95
  },
96
+ "./code/registry": {
97
+ "types": "./reference/sdlc/code.playbook/code.registry.d.ts",
98
+ "default": "./reference/sdlc/code.playbook/code.registry.js"
99
+ },
70
100
  "./playbook-captain": {
71
101
  "types": "./reference/sdlc/code.playbook/playbook-captain.d.ts",
72
102
  "default": "./reference/sdlc/code.playbook/playbook-captain.js"
73
103
  },
74
- "./code/tmux-play": {
75
- "types": "./reference/sdlc/code.playbook/code.tmux-play.d.ts",
76
- "default": "./reference/sdlc/code.playbook/code.tmux-play.js"
104
+ "./slc/*": "./slc/*",
105
+ "./discuss/playbook": {
106
+ "types": "./reference/sdlc/discuss.playbook/discuss.playbook.d.ts",
107
+ "default": "./reference/sdlc/discuss.playbook/discuss.playbook.js"
77
108
  },
78
- "./slc/*": "./slc/*"
109
+ "./discuss/registry": {
110
+ "types": "./reference/sdlc/discuss.playbook/discuss.registry.d.ts",
111
+ "default": "./reference/sdlc/discuss.playbook/discuss.registry.js"
112
+ }
79
113
  },
80
114
  "scripts": {
81
115
  "build": "tsc",
82
116
  "test": "vitest run",
83
- "playbook-code": "node reference/sdlc/code.playbook/bin/playbook-code.js"
117
+ "playbook": "node reference/sdlc/code.playbook/bin/playbook.js"
84
118
  },
85
119
  "publishConfig": {
86
120
  "access": "public",
87
121
  "provenance": true
88
122
  },
89
123
  "dependencies": {
90
- "@anthropic-ai/claude-agent-sdk": "^0.3.143",
124
+ "@anthropic-ai/claude-agent-sdk": "^0.3.154",
91
125
  "@openai/codex-sdk": "^0.139.0",
92
- "@sublang/cligent": "^0.13.0",
126
+ "@sublang/cligent": "^0.15.0",
127
+ "p-queue": "^9.3.1",
93
128
  "xstate": "^5.19.4",
94
129
  "yaml": "^2.9.0"
95
130
  },
@@ -0,0 +1,102 @@
1
+ <!-- SPDX-License-Identifier: Apache-2.0 -->
2
+ <!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
3
+
4
+ # Captain
5
+
6
+ This is the default generic Captain playbook.
7
+ It has no players beyond Boss and Captain.
8
+
9
+ At runtime Captain receives the exact original Boss intent and a catalog of enabled callable playbooks.
10
+ Each catalog entry contains only a stable playbook id, its command, and its intent.
11
+ The catalog is immutable host input for the session; Boss events and Captain decisions cannot replace it.
12
+ Captain shall call only ids in that catalog and shall never call this Captain playbook itself.
13
+ Captain is a router, not the specialist that performs the requested work.
14
+ Captain shall decide only from the supplied Boss text and catalog, without investigating the task, inspecting the workspace, using tools, or relying on ambient project evidence.
15
+ Captain shall keep a finite ordered plan and issue at most one child call at a time.
16
+ `remainingPlan` shall contain only calls after the selected next call; every continuation shall strictly reduce its length.
17
+ After Captain consumes an answer to its own routing or reassessment question,
18
+ that question and answer are no longer pending before Captain calls a child or
19
+ completes.
20
+
21
+ The host guarantees that this Captain receives Boss input only while it is the active leaf and resumes only from a matching child return.
22
+ That guarantee is an execution precondition, not a behavior for Captain to perform and not a source item to compile.
23
+ An ordinary non-empty Boss turn at the ready state enters as a new intent with the exact Boss text and does not require model classification.
24
+ When parked work can accept either an answer or a fresh directive, a classifier may select only the event kind and routing metadata; the runtime attaches the exact Boss text as the answer or fresh intent.
25
+ These input-provenance rules are linker preconditions, not behaviors for Captain to perform and not source items to compile.
26
+
27
+ When Boss gives a new intent while Captain is the active playbook, Captain shall ask Boss one material routing question or select the first call in a one- or multi-playbook plan, using the following prompt:
28
+ > Boss intent: <boss-intent>
29
+ > Enabled playbooks: <enabled-playbooks>
30
+ > You are routing this intent, not performing the requested work.
31
+ > Use only the Boss intent and enabled-playbooks catalog supplied here.
32
+ > Do not investigate the task, inspect files or project state, use tools, or attempt the specialized work yourself.
33
+ > Preserve Boss's intended outcome and constraints.
34
+ > If the supplied evidence identifies a useful route, select an enabled playbook; do not finish the intent yourself.
35
+ > Ask exactly one concise question only when its answer is necessary to choose a useful route or call order.
36
+ > For a complex intent, divide it into the smallest finite ordered plan of useful playbook calls.
37
+ > Name the selected first playbook and state its complete standalone request containing only the context it needs.
38
+ > List any later playbook calls in their intended order after the selected first call.
39
+ > Do not call a playbook merely to restate or classify the intent.
40
+ > Write only concise human-facing routing prose or the one routing question.
41
+ > Do not emit JSON, guard names, result property names, or control instructions.
42
+ > Do not expose internal state ids, session ids, call ids, stack data, hidden control data, or private reasoning.
43
+
44
+ Results:
45
+ - `question`: Captain asked the one material routing question. Output shall include `question: <verbatim final text from the visible Captain call>`.
46
+ - `delegation`: Captain selected the first useful call. Output shall include `remainingPlan: <finite JSON-safe array of only later calls>`, `nextPlaybookId: <selected stable enabled-playbook id>`, and `nextPlaybookInput: <complete standalone request>`.
47
+
48
+ A fresh directive that interrupts any parked Captain work shall restart this
49
+ routing behavior with that fresh intent. It shall not jump directly into
50
+ reassessment or retain the prior question, answer, plan, call history,
51
+ evidence, selection, response, or error.
52
+
53
+ A question decision shall carry one concise `question` and wait for Boss without losing the original intent.
54
+ Boss's answer resumes this same routing decision with continuation context; it is not a separate Captain behavior.
55
+ A delegation decision shall carry a finite `remainingPlan` plus non-empty `nextPlaybookId` and `nextPlaybookInput` for its first call.
56
+ The compiled routing result guards are exactly `question` and `delegation`, respectively; these names are part of this default playbook's stable machine contract.
57
+ The initial routing state has no direct or terminal outcome.
58
+
59
+ When Captain selects a next call with a non-empty `nextPlaybookId` from the enabled catalog, Captain shall call playbook selected by `nextPlaybookId`:
60
+ > <nextPlaybookInput>
61
+
62
+ When the called playbook returns successfully, aborts, or fails, Captain shall reassess the original intent, remaining plan, and completed call results using the following prompt:
63
+ > Boss intent: <boss-intent>
64
+ > Enabled playbooks: <enabled-playbooks>
65
+ > Remaining plan: <remaining-plan>
66
+ > Completed call results: <completed-call-results>
67
+ > Preserve Boss's intended outcome and constraints.
68
+ > Treat each returned result as evidence and revise the remaining plan when needed.
69
+ > A continuing decision must strictly reduce the remaining plan length.
70
+ > Do not repeat an equivalent failed or completed call without new information.
71
+ > If the intent is fulfilled, give Boss one concise final response that states the result or actionable conclusion.
72
+ > Do not finish with a bare acknowledgement, a promise to act, or an announcement that the round is complete.
73
+ > If information from Boss is now necessary, ask exactly one concise question.
74
+ > Otherwise name exactly one next enabled playbook and state its complete standalone request containing only the context it needs.
75
+ > List any still-later playbook calls in their intended order after the selected next call.
76
+ > Write only concise human-facing final, question, or routing prose.
77
+ > Do not emit JSON, guard names, result property names, or control instructions.
78
+ > Do not expose internal state ids, session ids, call ids, stack data, hidden control data, or private reasoning.
79
+
80
+ Results:
81
+ - `final`: Captain gave Boss the concrete result or actionable conclusion. Output shall include `response: <verbatim final text from the visible Captain call>`.
82
+ - `followUpQuestion`: Captain asked one necessary follow-up question. Output shall include `question: <verbatim final text from the visible Captain call>`.
83
+ - `continuing`: Captain selected another useful call. Output shall include `remainingPlan: <strictly shorter finite JSON-safe array of only later calls>`, `nextPlaybookId: <selected stable enabled-playbook id>`, and `nextPlaybookInput: <complete standalone request>`.
84
+
85
+ For the machine's deterministic safety floor, two calls are the same only when
86
+ both the stable target id and complete standalone input match exactly.
87
+ Captain shall record that exact pair before invoking the child, so an `ok`,
88
+ `aborted`, or `error` return all prevent the same later attempt. An input
89
+ revised with new information is different for this exact check; Captain still
90
+ owns the broader semantic no-repeat instruction above.
91
+
92
+ Each completed call result shall contain only the selected playbook id, its `ok`, `aborted`, or `error` status, and either the child's actual JSON-safe output or a compact error with only `name` and `message`.
93
+ It shall never retain or expose a child session id, call id, child state, stack trace, or an opaque runtime result object.
94
+
95
+ A final decision shall carry a concise JSON-safe `response` and complete.
96
+ A follow-up question shall carry one concise `question` and wait for Boss without losing the original intent, plan, or completed results.
97
+ Boss's answer resumes this same reassessment with continuation context; it is not a separate Captain behavior.
98
+ A continuing decision shall carry a strictly shorter finite `remainingPlan` plus non-empty `nextPlaybookId` and `nextPlaybookInput`.
99
+ The compiled reassessment result guards are exactly `final`,
100
+ `followUpQuestion`, and `continuing`, respectively; these names are part of
101
+ this default playbook's stable machine contract.
102
+ A child abort or failure is a completed call result for reassessment and shall not route this playbook directly to its generic failure state.
@@ -0,0 +1,227 @@
1
+ export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
2
+ readonly [key: string]: JsonValue;
3
+ };
4
+ export type EnabledPlaybook = {
5
+ readonly id: string;
6
+ readonly command: string;
7
+ readonly intent: string;
8
+ };
9
+ export type NormalizedError = {
10
+ readonly name: string;
11
+ readonly message: string;
12
+ readonly stack?: string;
13
+ };
14
+ export type PlaybookStateValue = string | {
15
+ readonly [key: string]: PlaybookStateValue;
16
+ };
17
+ export type PlaybookState = {
18
+ readonly value: PlaybookStateValue;
19
+ readonly activeStateIds: readonly string[];
20
+ readonly tags: readonly string[];
21
+ readonly status: 'active' | 'done' | 'error' | 'stopped';
22
+ readonly quiescent: boolean;
23
+ readonly stateId?: string;
24
+ };
25
+ export type CompletedCallResult = {
26
+ readonly playbookId: string;
27
+ readonly status: 'ok';
28
+ readonly output?: JsonValue;
29
+ } | {
30
+ readonly playbookId: string;
31
+ readonly status: 'aborted' | 'error';
32
+ readonly error: NormalizedError;
33
+ };
34
+ export type PendingBossQuestion = {
35
+ readonly questionId: ResumableStateId;
36
+ readonly resumeStateId: ResumableStateId;
37
+ readonly sourceItem: 'CAPTAIN-1' | 'CAPTAIN-3';
38
+ readonly player: 'Captain';
39
+ readonly question: string;
40
+ };
41
+ export type ResumableStateId = 'routing' | 'reassessing';
42
+ export type CaptainMachineInput = {
43
+ readonly enabledPlaybooks: readonly EnabledPlaybook[];
44
+ readonly selfPlaybookId: string;
45
+ readonly bossIntent?: string;
46
+ };
47
+ export type CaptainMachineOutput = {
48
+ readonly response: string;
49
+ };
50
+ export type CaptainInput = {
51
+ readonly stateId: ResumableStateId;
52
+ readonly sourceItem: 'CAPTAIN-1' | 'CAPTAIN-3';
53
+ readonly prompt: string;
54
+ readonly result: Record<string, string>;
55
+ readonly bossIntent: string;
56
+ readonly enabledPlaybooks: readonly EnabledPlaybook[];
57
+ readonly remainingPlan?: readonly JsonValue[];
58
+ readonly completedCallResults?: readonly CompletedCallResult[];
59
+ readonly pendingBossQuestion?: PendingBossQuestion;
60
+ readonly bossReply?: string;
61
+ };
62
+ export type CaptainOutput = {
63
+ readonly guard: 'question';
64
+ readonly question: string;
65
+ } | {
66
+ readonly guard: 'delegation';
67
+ readonly remainingPlan: readonly JsonValue[];
68
+ readonly nextPlaybookId: string;
69
+ readonly nextPlaybookInput: string;
70
+ } | {
71
+ readonly guard: 'final';
72
+ readonly response: string;
73
+ } | {
74
+ readonly guard: 'followUpQuestion';
75
+ readonly question: string;
76
+ } | {
77
+ readonly guard: 'continuing';
78
+ readonly remainingPlan: readonly JsonValue[];
79
+ readonly nextPlaybookId: string;
80
+ readonly nextPlaybookInput: string;
81
+ } | {
82
+ readonly guard: 'needsBossReply';
83
+ readonly question: string;
84
+ };
85
+ export type PlaybookInput = {
86
+ readonly stateId: 'callPlaybook';
87
+ readonly sourceItem?: 'CAPTAIN-2';
88
+ readonly playbookId: string;
89
+ readonly text: string;
90
+ readonly playbookIdContext: 'nextPlaybookId';
91
+ readonly textContext: 'nextPlaybookInput';
92
+ };
93
+ export type PlaybookOutput = JsonValue | undefined;
94
+ type Context = {
95
+ readonly bossIntent: string;
96
+ readonly enabledPlaybooks: readonly EnabledPlaybook[];
97
+ readonly selfPlaybookId: string;
98
+ readonly remainingPlan: readonly JsonValue[];
99
+ readonly completedCallResults: readonly CompletedCallResult[];
100
+ readonly nextPlaybookId: string;
101
+ readonly nextPlaybookInput: string;
102
+ readonly callHistory: readonly string[];
103
+ readonly response?: string;
104
+ readonly pendingBossQuestion?: PendingBossQuestion;
105
+ readonly bossReply?: string;
106
+ readonly lastError?: JsonValue;
107
+ };
108
+ type BossIntentEvent = {
109
+ readonly type: 'BOSS_INTENT';
110
+ readonly bossIntent: string;
111
+ };
112
+ type BossInterruptEvent = {
113
+ readonly type: 'BOSS_INTERRUPT';
114
+ readonly targetId: 'routing';
115
+ readonly bossIntent: string;
116
+ };
117
+ type BossReplyEvent = {
118
+ readonly type: 'BOSS_REPLY';
119
+ readonly answer: string;
120
+ readonly questionId?: string;
121
+ };
122
+ export declare const captainMachine: import("xstate").StateMachine<Context, BossIntentEvent | BossInterruptEvent | BossReplyEvent, {
123
+ [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<PlaybookOutput, PlaybookInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<CaptainOutput, CaptainInput, import("xstate").EventObject>> | undefined;
124
+ }, {
125
+ src: "playbook";
126
+ logic: import("xstate").PromiseActorLogic<PlaybookOutput, PlaybookInput, import("xstate").EventObject>;
127
+ id: string | undefined;
128
+ } | {
129
+ src: "captain";
130
+ logic: import("xstate").PromiseActorLogic<CaptainOutput, CaptainInput, import("xstate").EventObject>;
131
+ id: string | undefined;
132
+ }, {
133
+ type: "startRoutingFromBoss";
134
+ params: import("xstate").NonReducibleUnknown;
135
+ } | {
136
+ type: "storeBossReply";
137
+ params: import("xstate").NonReducibleUnknown;
138
+ } | {
139
+ type: "rememberInvalidBossReply";
140
+ params: import("xstate").NonReducibleUnknown;
141
+ } | {
142
+ type: "setRoutingQuestion";
143
+ params: import("xstate").NonReducibleUnknown;
144
+ } | {
145
+ type: "storeRoutingDelegation";
146
+ params: import("xstate").NonReducibleUnknown;
147
+ } | {
148
+ type: "appendSuccessfulChildResult";
149
+ params: import("xstate").NonReducibleUnknown;
150
+ } | {
151
+ type: "appendRejectedChildResult";
152
+ params: import("xstate").NonReducibleUnknown;
153
+ } | {
154
+ type: "storeFinalResponse";
155
+ params: import("xstate").NonReducibleUnknown;
156
+ } | {
157
+ type: "setReassessQuestion";
158
+ params: import("xstate").NonReducibleUnknown;
159
+ } | {
160
+ type: "storeContinuingCall";
161
+ params: import("xstate").NonReducibleUnknown;
162
+ } | {
163
+ type: "rememberInvalidActorOutput";
164
+ params: import("xstate").NonReducibleUnknown;
165
+ } | {
166
+ type: "rememberActorError";
167
+ params: import("xstate").NonReducibleUnknown;
168
+ }, {
169
+ type: "isRoutingInterrupt";
170
+ params: unknown;
171
+ } | {
172
+ type: "canResumeRouting";
173
+ params: unknown;
174
+ } | {
175
+ type: "canResumeReassessing";
176
+ params: unknown;
177
+ } | {
178
+ type: "hasBossIntent";
179
+ params: unknown;
180
+ } | {
181
+ type: "isRoutingQuestion";
182
+ params: unknown;
183
+ } | {
184
+ type: "isRoutingDelegation";
185
+ params: unknown;
186
+ } | {
187
+ type: "isReassessFinal";
188
+ params: unknown;
189
+ } | {
190
+ type: "isReassessQuestion";
191
+ params: unknown;
192
+ } | {
193
+ type: "isReassessContinuing";
194
+ params: unknown;
195
+ } | {
196
+ type: "isPlaybookSuccessOutput";
197
+ params: unknown;
198
+ } | {
199
+ type: "isAuthoredChildError";
200
+ params: unknown;
201
+ }, never, "done" | "failed" | "callPlaybook" | "routing" | "reassessing" | "ready" | "awaitBossReply", string, CaptainMachineInput, CaptainMachineOutput, import("xstate").EventObject, import("xstate").MetaObject, {
202
+ id: "captain";
203
+ states: {
204
+ readonly ready: {
205
+ id: "ready";
206
+ };
207
+ readonly routing: {
208
+ id: "routing";
209
+ };
210
+ readonly callPlaybook: {
211
+ id: "callPlaybook";
212
+ };
213
+ readonly reassessing: {
214
+ id: "reassessing";
215
+ };
216
+ readonly awaitBossReply: {
217
+ id: "awaitBossReply";
218
+ };
219
+ readonly failed: {
220
+ id: "failed";
221
+ };
222
+ readonly done: {
223
+ id: "done";
224
+ };
225
+ };
226
+ }>;
227
+ export {};