@archboard/codex-realtime-voice 0.0.0-stage → 0.2.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.
@@ -0,0 +1,150 @@
1
+ import { z } from "zod";
2
+ declare const BrowserRealtimeIdentitySchemas: {
3
+ session: z.core.$ZodBranded<z.ZodString, "BrowserRealtimeSessionId", "out">;
4
+ correlation: z.core.$ZodBranded<z.ZodString, "BrowserRealtimeCorrelationId", "out">;
5
+ item: z.core.$ZodBranded<z.ZodString, "BrowserRealtimeItemId", "out">;
6
+ };
7
+ type RealtimeSessionId = z.infer<typeof BrowserRealtimeIdentitySchemas.session>;
8
+ type RealtimeCorrelationId = z.infer<typeof BrowserRealtimeIdentitySchemas.correlation>;
9
+ type RealtimeItemId = z.infer<typeof BrowserRealtimeIdentitySchemas.item>;
10
+ /**
11
+ * Narrows an untrusted value to a realtime session id.
12
+ * @param value - The raw value from the wire.
13
+ * @returns The validated session id.
14
+ * @throws {ZodError} when the value is not a well-formed session id.
15
+ */
16
+ declare function parseRealtimeSessionId(value: unknown): RealtimeSessionId;
17
+ /**
18
+ * Narrows an untrusted value to a realtime correlation id.
19
+ * @param value - The raw value from the wire.
20
+ * @returns The validated correlation id.
21
+ * @throws {ZodError} when the value is not a well-formed correlation id.
22
+ */
23
+ declare function parseRealtimeCorrelationId(value: unknown): RealtimeCorrelationId;
24
+ /**
25
+ * Narrows an untrusted value to a realtime item id.
26
+ * @param value - The raw value from the wire.
27
+ * @returns The validated item id.
28
+ * @throws {ZodError} when the value is not a well-formed item id.
29
+ */
30
+ declare function parseRealtimeItemId(value: unknown): RealtimeItemId;
31
+ interface RealtimeCorrelation {
32
+ readonly sessionId: RealtimeSessionId;
33
+ readonly correlationId: RealtimeCorrelationId;
34
+ }
35
+ interface CreateOfferSdp extends RealtimeCorrelation {
36
+ readonly sdp: string;
37
+ }
38
+ interface AnswerSdp extends RealtimeCorrelation {
39
+ readonly sdp: string;
40
+ }
41
+ interface RemoteMediaAttachment extends RealtimeCorrelation {
42
+ readonly attachTo: (element: HTMLMediaElement) => void;
43
+ }
44
+ type RealtimeUnsubscribe = () => void;
45
+ type RealtimePhase = "idle" | "requesting_permission" | "negotiating" | "listening" | "muted" | "processing" | "speaking" | "stopping" | "recoverable_error" | "terminal_error" | "closed";
46
+ type RealtimeRecoverableErrorReason = "permission_denied" | "device_unavailable" | "device_lost" | "sdp_failed" | "ice_disconnected" | "data_channel_closed" | "remote_media_failed" | "autoplay_suspended" | "realtime_unavailable" | "app_server_unavailable" | "coordinator_unavailable" | "append_failed" | "recovery_failed" | "stop_failed";
47
+ type RealtimeTerminalErrorReason = "unsupported_browser" | "invalid_session" | "protocol_error" | "fatal_error";
48
+ type RealtimeState = {
49
+ readonly phase: "idle";
50
+ readonly reason: "created" | "recovered";
51
+ } | {
52
+ readonly phase: "requesting_permission";
53
+ readonly reason: "start_requested" | "recovery_requested";
54
+ } | {
55
+ readonly phase: "negotiating";
56
+ readonly reason: "permission_granted" | "offer_created" | "answer_received" | "recovery_requested";
57
+ } | {
58
+ readonly phase: "listening";
59
+ readonly reason: "negotiation_succeeded" | "unmute_requested" | "processing_complete" | "assistant_finished";
60
+ } | {
61
+ readonly phase: "muted";
62
+ readonly reason: "mute_requested";
63
+ } | {
64
+ readonly phase: "processing";
65
+ readonly reason: "input_completed" | "user_interrupted";
66
+ } | {
67
+ readonly phase: "speaking";
68
+ readonly reason: "assistant_started";
69
+ } | {
70
+ readonly phase: "stopping";
71
+ readonly reason: "stop_requested" | "dispose_requested";
72
+ } | {
73
+ readonly phase: "recoverable_error";
74
+ readonly reason: RealtimeRecoverableErrorReason;
75
+ readonly message: string;
76
+ } | {
77
+ readonly phase: "terminal_error";
78
+ readonly reason: RealtimeTerminalErrorReason;
79
+ readonly message: string;
80
+ } | {
81
+ readonly phase: "closed";
82
+ readonly reason: "stopped" | "disposed";
83
+ };
84
+ type RealtimeTranscriptRole = "user" | "assistant";
85
+ type RealtimeTranscriptStatus = "provisional" | "final" | "interrupted";
86
+ interface RealtimeTranscriptRecord extends RealtimeCorrelation {
87
+ readonly itemId: RealtimeItemId;
88
+ readonly sequence: number;
89
+ readonly role: RealtimeTranscriptRole;
90
+ readonly status: RealtimeTranscriptStatus;
91
+ readonly text: string;
92
+ }
93
+ type RealtimeDiagnosticCode = "permission" | "device" | "sdp" | "ice" | "remote_media" | "data_channel" | "realtime" | "app_server" | "coordinator" | "protocol";
94
+ type RealtimeSemanticEvent = {
95
+ readonly kind: "state";
96
+ readonly sessionId: RealtimeSessionId;
97
+ readonly correlationId: RealtimeCorrelationId;
98
+ readonly state: RealtimeState;
99
+ } | {
100
+ readonly kind: "transcript";
101
+ readonly record: RealtimeTranscriptRecord;
102
+ } | {
103
+ readonly kind: "diagnostic";
104
+ readonly sessionId: RealtimeSessionId;
105
+ readonly correlationId: RealtimeCorrelationId;
106
+ readonly code: RealtimeDiagnosticCode;
107
+ readonly message: string;
108
+ };
109
+ type RealtimeSemanticEventListener = (event: RealtimeSemanticEvent) => void;
110
+ interface AppendTextRequest extends RealtimeCorrelation {
111
+ readonly text: string;
112
+ }
113
+ interface AppendSpeechRequest extends RealtimeCorrelation {
114
+ readonly text: string;
115
+ }
116
+ interface RealtimeCommandRequest extends RealtimeCorrelation {}
117
+ type StopRequest = RealtimeCommandRequest;
118
+ type RecoveryRequest = RealtimeCommandRequest;
119
+ type AppendNotDeliveredReason = "rejected" | "not_ready" | "stale_session" | "cancelled";
120
+ type AppendOutcomeUnknownReason = "transport_failure" | "response_lost";
121
+ type CommandNotDeliveredReason = "rejected" | "not_ready" | "stale_session" | "cancelled";
122
+ type CommandOutcomeUnknownReason = "transport_failure" | "response_lost";
123
+ type AppendOutcome = (RealtimeCorrelation & {
124
+ readonly outcome: "delivered";
125
+ }) | (RealtimeCorrelation & {
126
+ readonly outcome: "not_delivered";
127
+ readonly reason: AppendNotDeliveredReason;
128
+ }) | (RealtimeCorrelation & {
129
+ readonly outcome: "outcome_unknown";
130
+ readonly reason: AppendOutcomeUnknownReason;
131
+ });
132
+ type CommandOutcome = (RealtimeCorrelation & {
133
+ readonly outcome: "delivered";
134
+ }) | (RealtimeCorrelation & {
135
+ readonly outcome: "not_delivered";
136
+ readonly reason: CommandNotDeliveredReason;
137
+ }) | (RealtimeCorrelation & {
138
+ readonly outcome: "outcome_unknown";
139
+ readonly reason: CommandOutcomeUnknownReason;
140
+ });
141
+ interface RealtimeServer {
142
+ readonly createOffer: (offer: CreateOfferSdp) => Promise<AnswerSdp>;
143
+ readonly attachRemoteMedia: (attachment: RemoteMediaAttachment) => void;
144
+ readonly onSemanticEvent: (listener: RealtimeSemanticEventListener) => RealtimeUnsubscribe;
145
+ readonly appendText: (request: AppendTextRequest) => Promise<AppendOutcome>;
146
+ readonly appendSpeech: (request: AppendSpeechRequest) => Promise<AppendOutcome>;
147
+ readonly stop: (request: StopRequest) => Promise<CommandOutcome>;
148
+ readonly recover: (request: RecoveryRequest) => Promise<CommandOutcome>;
149
+ }
150
+ export { RealtimeCorrelationId as a, RealtimeSemanticEvent as c, RealtimeState as d, RealtimeTranscriptRecord as f, parseRealtimeSessionId as g, parseRealtimeItemId as h, RealtimeCorrelation as i, RealtimeServer as l, parseRealtimeCorrelationId as m, AppendOutcome as n, RealtimeItemId as o, RealtimeUnsubscribe as p, CreateOfferSdp as r, RealtimePhase as s, AnswerSdp as t, RealtimeSessionId as u };
@@ -0,0 +1,182 @@
1
+ // src/shared/rules/realtime-state.ts
2
+ const REALTIME_PHASES = Object.freeze([
3
+ "idle",
4
+ "requesting_permission",
5
+ "negotiating",
6
+ "listening",
7
+ "muted",
8
+ "processing",
9
+ "speaking",
10
+ "stopping",
11
+ "recoverable_error",
12
+ "terminal_error",
13
+ "closed"
14
+ ]);
15
+ const REALTIME_TRANSITIONS = Object.freeze({
16
+ idle: Object.freeze({
17
+ requesting_permission: Object.freeze(["start_requested", "recovery_requested"]),
18
+ stopping: Object.freeze(["dispose_requested"])
19
+ }),
20
+ requesting_permission: Object.freeze({
21
+ negotiating: Object.freeze(["permission_granted"]),
22
+ recoverable_error: Object.freeze(["permission_denied", "device_unavailable"]),
23
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
24
+ }),
25
+ negotiating: Object.freeze({
26
+ negotiating: Object.freeze(["offer_created", "answer_received"]),
27
+ listening: Object.freeze(["negotiation_succeeded"]),
28
+ recoverable_error: Object.freeze([
29
+ "device_lost",
30
+ "sdp_failed",
31
+ "ice_disconnected",
32
+ "data_channel_closed",
33
+ "remote_media_failed",
34
+ "autoplay_suspended",
35
+ "realtime_unavailable",
36
+ "app_server_unavailable",
37
+ "coordinator_unavailable"
38
+ ]),
39
+ terminal_error: Object.freeze([
40
+ "unsupported_browser",
41
+ "invalid_session",
42
+ "protocol_error",
43
+ "fatal_error"
44
+ ]),
45
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
46
+ }),
47
+ listening: Object.freeze({
48
+ muted: Object.freeze(["mute_requested"]),
49
+ processing: Object.freeze(["input_completed"]),
50
+ recoverable_error: Object.freeze([
51
+ "device_lost",
52
+ "ice_disconnected",
53
+ "data_channel_closed",
54
+ "remote_media_failed",
55
+ "autoplay_suspended",
56
+ "realtime_unavailable",
57
+ "app_server_unavailable",
58
+ "coordinator_unavailable"
59
+ ]),
60
+ terminal_error: Object.freeze([
61
+ "invalid_session",
62
+ "protocol_error",
63
+ "fatal_error"
64
+ ]),
65
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
66
+ }),
67
+ muted: Object.freeze({
68
+ listening: Object.freeze(["unmute_requested"]),
69
+ processing: Object.freeze(["input_completed"]),
70
+ recoverable_error: Object.freeze([
71
+ "device_lost",
72
+ "ice_disconnected",
73
+ "data_channel_closed",
74
+ "remote_media_failed",
75
+ "realtime_unavailable",
76
+ "app_server_unavailable",
77
+ "coordinator_unavailable"
78
+ ]),
79
+ terminal_error: Object.freeze([
80
+ "invalid_session",
81
+ "protocol_error",
82
+ "fatal_error"
83
+ ]),
84
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
85
+ }),
86
+ processing: Object.freeze({
87
+ speaking: Object.freeze(["assistant_started"]),
88
+ listening: Object.freeze(["processing_complete"]),
89
+ recoverable_error: Object.freeze([
90
+ "device_lost",
91
+ "ice_disconnected",
92
+ "data_channel_closed",
93
+ "realtime_unavailable",
94
+ "app_server_unavailable",
95
+ "coordinator_unavailable",
96
+ "append_failed"
97
+ ]),
98
+ terminal_error: Object.freeze([
99
+ "invalid_session",
100
+ "protocol_error",
101
+ "fatal_error"
102
+ ]),
103
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
104
+ }),
105
+ speaking: Object.freeze({
106
+ listening: Object.freeze(["assistant_finished"]),
107
+ processing: Object.freeze(["user_interrupted"]),
108
+ recoverable_error: Object.freeze([
109
+ "ice_disconnected",
110
+ "data_channel_closed",
111
+ "remote_media_failed",
112
+ "realtime_unavailable",
113
+ "app_server_unavailable",
114
+ "coordinator_unavailable"
115
+ ]),
116
+ terminal_error: Object.freeze([
117
+ "invalid_session",
118
+ "protocol_error",
119
+ "fatal_error"
120
+ ]),
121
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
122
+ }),
123
+ stopping: Object.freeze({
124
+ closed: Object.freeze(["stopped", "disposed"]),
125
+ recoverable_error: Object.freeze(["stop_failed"])
126
+ }),
127
+ recoverable_error: Object.freeze({
128
+ idle: Object.freeze(["recovered"]),
129
+ requesting_permission: Object.freeze(["recovery_requested"]),
130
+ negotiating: Object.freeze(["recovery_requested"]),
131
+ recoverable_error: Object.freeze(["recovery_failed"]),
132
+ stopping: Object.freeze(["stop_requested", "dispose_requested"])
133
+ }),
134
+ terminal_error: Object.freeze({ stopping: Object.freeze(["stop_requested", "dispose_requested"]) }),
135
+ closed: Object.freeze({})
136
+ });
137
+ const INITIAL_REALTIME_STATE = Object.freeze({
138
+ phase: "idle",
139
+ reason: "created"
140
+ });
141
+ /**
142
+ * Looks up the reasons a phase may move to another.
143
+ * @param from - The phase the session is in.
144
+ * @param to - The phase it would enter.
145
+ * @returns The allowed reasons, empty when the move is never allowed.
146
+ */
147
+ function reasons(from, to) {
148
+ return REALTIME_TRANSITIONS[from][to] ?? [];
149
+ }
150
+ /**
151
+ * Tells whether the transition table permits moving to `next` for its reason.
152
+ * @param current - The state the session is in.
153
+ * @param next - The state and reason proposed.
154
+ * @returns True when the table lists that reason for that move.
155
+ */
156
+ function canTransitionRealtimeState(current, next) {
157
+ return reasons(current.phase, next.phase).includes(next.reason);
158
+ }
159
+ /**
160
+ * Refuses an illegal transition with a message naming what would have been
161
+ * allowed, so a caller learns the table rather than guessing.
162
+ * @param current - The state the session is in.
163
+ * @param next - The state and reason proposed.
164
+ * @throws {TypeError} when the table does not permit the move.
165
+ */
166
+ function assertRealtimeTransition(current, next) {
167
+ if (canTransitionRealtimeState(current, next)) return;
168
+ const allowed = reasons(current.phase, next.phase);
169
+ const suffix = allowed.length > 0 ? ` Allowed reasons: ${allowed.join(", ")}.` : " No such transition is allowed.";
170
+ throw new TypeError(`Illegal realtime transition from ${current.phase} to ${next.phase} for reason ${next.reason}.${suffix}`);
171
+ }
172
+ /**
173
+ * Moves the session to `next` after checking the transition is legal.
174
+ * @param current - The state the session is in.
175
+ * @param next - The state and reason to move to.
176
+ * @returns A frozen copy of `next`.
177
+ */
178
+ function transitionRealtimeState(current, next) {
179
+ assertRealtimeTransition(current, next);
180
+ return Object.freeze({ ...next });
181
+ }
182
+ export { transitionRealtimeState as a, canTransitionRealtimeState as i, REALTIME_PHASES as n, REALTIME_TRANSITIONS as r, INITIAL_REALTIME_STATE as t };
@@ -0,0 +1,16 @@
1
+ import { d as RealtimeState, s as RealtimePhase } from "./realtime-contract-wHmSyUIe.mjs";
2
+ declare const REALTIME_PHASES: readonly ["idle", "requesting_permission", "negotiating", "listening", "muted", "processing", "speaking", "stopping", "recoverable_error", "terminal_error", "closed"];
3
+ type StateFor<Phase extends RealtimePhase> = Extract<RealtimeState, {
4
+ readonly phase: Phase;
5
+ }>;
6
+ type TransitionTable = Readonly<Record<RealtimePhase, Readonly<Partial<{ [destination in RealtimePhase]: readonly StateFor<destination>["reason"][]; }>>>>;
7
+ declare const REALTIME_TRANSITIONS: TransitionTable;
8
+ declare const INITIAL_REALTIME_STATE: RealtimeState;
9
+ /**
10
+ * Moves the session to `next` after checking the transition is legal.
11
+ * @param current - The state the session is in.
12
+ * @param next - The state and reason to move to.
13
+ * @returns A frozen copy of `next`.
14
+ */
15
+ declare function transitionRealtimeState(current: RealtimeState, next: RealtimeState): RealtimeState;
16
+ export { transitionRealtimeState as i, REALTIME_PHASES as n, REALTIME_TRANSITIONS as r, INITIAL_REALTIME_STATE as t };
@@ -0,0 +1,3 @@
1
+ import { c as RealtimeSemanticEvent, d as RealtimeState, g as parseRealtimeSessionId, h as parseRealtimeItemId, i as RealtimeCorrelation, m as parseRealtimeCorrelationId, s as RealtimePhase } from "./realtime-contract-wHmSyUIe.mjs";
2
+ import { i as transitionRealtimeState, n as REALTIME_PHASES, r as REALTIME_TRANSITIONS, t as INITIAL_REALTIME_STATE } from "./realtime-state-DT4uvrIV.mjs";
3
+ export { INITIAL_REALTIME_STATE, REALTIME_PHASES, REALTIME_TRANSITIONS, type RealtimeCorrelation, type RealtimePhase, type RealtimeSemanticEvent, type RealtimeState, parseRealtimeCorrelationId, parseRealtimeItemId, parseRealtimeSessionId, transitionRealtimeState };
@@ -0,0 +1,3 @@
1
+ import { n as parseRealtimeItemId, r as parseRealtimeSessionId, t as parseRealtimeCorrelationId } from "./realtime-contract-DwkCluo2.mjs";
2
+ import { a as transitionRealtimeState, n as REALTIME_PHASES, r as REALTIME_TRANSITIONS, t as INITIAL_REALTIME_STATE } from "./realtime-state-CTBmCjt1.mjs";
3
+ export { INITIAL_REALTIME_STATE, REALTIME_PHASES, REALTIME_TRANSITIONS, parseRealtimeCorrelationId, parseRealtimeItemId, parseRealtimeSessionId, transitionRealtimeState };
@@ -0,0 +1,93 @@
1
+ import { D as CodexRealtimeBinding, E as CodexRealtimeAdapterOptions, F as ADDITIONAL_CONTEXT_POLICY, I as OperationOutcome, J as SessionUserInput, N as DeepReadonly, T as CodexRealtimeAdapter, _ as EpochManifest, b as WorkbenchRoleInstructions, n as SpokenApprovalSnapshot } from "./contract-CZDUvuVt.mjs";
2
+ import { B as ChildId, J as ThreadId, V as DynamicToolCallId, Y as TurnId } from "./snapshot-BCrCORmt.mjs";
3
+ import "./realtime-contract-wHmSyUIe.mjs";
4
+ /**
5
+ * Bound a user prompt by UTF-8 bytes and construct its Codex text item.
6
+ * @param text The user prompt.
7
+ * @returns The immutable Codex text item.
8
+ */
9
+ declare function createTextUserInput(text: string): Extract<SessionUserInput, {
10
+ type: "text";
11
+ }>;
12
+ /**
13
+ * The server half of one browser realtime session: it owns at most one active session, turns
14
+ * Codex notifications into state and transcript events, and answers the browser's requests with
15
+ * outcomes that say whether Codex actually received them.
16
+ * @param options - The session, identity authority, brief source and binding source.
17
+ * @returns The adapter.
18
+ */
19
+ export declare function createCodexRealtimeAdapter(options: CodexRealtimeAdapterOptions): CodexRealtimeAdapter;
20
+ /**
21
+ * The manifest a store starts from before any epoch exists.
22
+ * @returns An empty manifest at revision zero.
23
+ */
24
+ declare function emptyManifest(): EpochManifest;
25
+ declare const EMPTY_SPOKEN_APPROVAL_SNAPSHOT: SpokenApprovalSnapshot;
26
+ interface WaitOwner {
27
+ readonly child: ChildId;
28
+ readonly caller: ThreadId;
29
+ readonly turn: TurnId;
30
+ readonly call: DynamicToolCallId;
31
+ }
32
+ interface WaitEdgeSetInput {
33
+ readonly owner: WaitOwner;
34
+ readonly targets: readonly ThreadId[];
35
+ }
36
+ interface WaitEdge {
37
+ readonly owner: WaitOwner;
38
+ readonly target: ThreadId;
39
+ }
40
+ type OwnedWaitCleanupCause = "settle" | "decline" | "cancellation" | "interruption" | "disconnect";
41
+ type WaitCleanup = {
42
+ readonly cause: OwnedWaitCleanupCause;
43
+ readonly owner: WaitOwner;
44
+ } | {
45
+ readonly cause: "child-exit";
46
+ readonly child: ChildId;
47
+ };
48
+ type WaitEdgeSetResult = {
49
+ readonly ok: true;
50
+ readonly edges: readonly WaitEdge[];
51
+ } | {
52
+ readonly ok: false;
53
+ readonly reason: "cycle";
54
+ /** A closed path: the first thread is repeated at the end. */
55
+ readonly child: ChildId;
56
+ readonly cycle: readonly ThreadId[];
57
+ };
58
+ interface CodexWaitGraph {
59
+ /** Add or atomically replace one dynamic operation's outgoing edges. */
60
+ readonly addEdgeSet: (input: WaitEdgeSetInput) => WaitEdgeSetResult;
61
+ /** Remove the exact owner, or every owner belonging to one exited child. */
62
+ readonly release: (cleanup: WaitCleanup) => readonly WaitEdge[];
63
+ /** Return all active edges in deterministic order. */
64
+ readonly inspect: () => readonly WaitEdge[];
65
+ }
66
+ /**
67
+ * Create the wait graph that refuses a dynamic wait which would deadlock: an edge set is accepted
68
+ * only when the graph with it stays acyclic.
69
+ * @returns A fresh, empty graph.
70
+ */
71
+ declare function createCodexWaitGraph(): CodexWaitGraph;
72
+ /**
73
+ * Accept one tracked instruction document only under its reviewed digest.
74
+ * @param text The document, as its module import embeds it.
75
+ * @param label The document name for diagnostics.
76
+ * @param expected The reviewed SHA-256 digest.
77
+ * @returns The verified document text.
78
+ */
79
+ declare function readWorkbenchInstructionDocument(text: string, label: string, expected: string): string;
80
+ declare const CORE_ROLE_INSTRUCTIONS: Readonly<{
81
+ coordinator: `${string}
82
+ ${string}
83
+ `;
84
+ workhorse: string;
85
+ }>;
86
+ /**
87
+ * Join core and host instruction bytes without normalization and hash the exact result.
88
+ * @param role The built-in role whose instructions are composed.
89
+ * @param domain The exact host instruction text.
90
+ * @returns The exact composed text and its SHA-256 digest.
91
+ */
92
+ declare function composeWorkbenchRoleInstructions(role: keyof typeof CORE_ROLE_INSTRUCTIONS, domain: string): WorkbenchRoleInstructions;
93
+ export { ADDITIONAL_CONTEXT_POLICY, type CodexRealtimeAdapter, type CodexRealtimeAdapterOptions, type CodexRealtimeBinding, type DeepReadonly, EMPTY_SPOKEN_APPROVAL_SNAPSHOT, type OperationOutcome, composeWorkbenchRoleInstructions, createCodexWaitGraph, createTextUserInput, emptyManifest, readWorkbenchInstructionDocument };