@claudexor/cli 3.1.2 → 3.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.
Files changed (235) hide show
  1. package/dist/about-command.d.ts.map +1 -1
  2. package/dist/accounts-projection.d.ts +8 -1
  3. package/dist/accounts-projection.d.ts.map +1 -1
  4. package/dist/accounts-projection.js +33 -20
  5. package/dist/accounts-projection.js.map +1 -1
  6. package/dist/accounts-services.d.ts +206 -0
  7. package/dist/accounts-services.d.ts.map +1 -0
  8. package/dist/accounts-services.js +71 -0
  9. package/dist/accounts-services.js.map +1 -0
  10. package/dist/acp-surface-runner.d.ts +39 -0
  11. package/dist/acp-surface-runner.d.ts.map +1 -1
  12. package/dist/acp-surface-runner.js +104 -30
  13. package/dist/acp-surface-runner.js.map +1 -1
  14. package/dist/attachment-upload.d.ts +5 -0
  15. package/dist/attachment-upload.d.ts.map +1 -0
  16. package/dist/attachment-upload.js +64 -0
  17. package/dist/attachment-upload.js.map +1 -0
  18. package/dist/capabilities.d.ts.map +1 -1
  19. package/dist/capabilities.js +6 -1
  20. package/dist/capabilities.js.map +1 -1
  21. package/dist/choice-input.d.ts +7 -0
  22. package/dist/choice-input.d.ts.map +1 -0
  23. package/dist/choice-input.js +17 -0
  24. package/dist/choice-input.js.map +1 -0
  25. package/dist/claude-oauth-usage.js.map +1 -1
  26. package/dist/claudexord-entry.js.map +1 -1
  27. package/dist/claudexord.d.ts +1 -13
  28. package/dist/claudexord.d.ts.map +1 -1
  29. package/dist/claudexord.js +45 -69
  30. package/dist/claudexord.js.map +1 -1
  31. package/dist/cli-error.d.ts.map +1 -1
  32. package/dist/cli-error.js +21 -11
  33. package/dist/cli-error.js.map +1 -1
  34. package/dist/cli.js +143 -163
  35. package/dist/cli.js.map +1 -1
  36. package/dist/codex-device-login.js.map +1 -1
  37. package/dist/codex-quota-source.js.map +1 -1
  38. package/dist/command-flags.d.ts +16 -1
  39. package/dist/command-flags.d.ts.map +1 -1
  40. package/dist/command-flags.js +41 -19
  41. package/dist/command-flags.js.map +1 -1
  42. package/dist/command-registry.d.ts +21 -8
  43. package/dist/command-registry.d.ts.map +1 -1
  44. package/dist/command-registry.js +59 -116
  45. package/dist/command-registry.js.map +1 -1
  46. package/dist/command-scope.d.ts +13 -0
  47. package/dist/command-scope.d.ts.map +1 -0
  48. package/dist/command-scope.js +61 -0
  49. package/dist/command-scope.js.map +1 -0
  50. package/dist/control-services.d.ts +1631 -1003
  51. package/dist/control-services.d.ts.map +1 -1
  52. package/dist/control-services.js +38 -65
  53. package/dist/control-services.js.map +1 -1
  54. package/dist/credential-commands.d.ts.map +1 -1
  55. package/dist/credential-commands.js +13 -3
  56. package/dist/credential-commands.js.map +1 -1
  57. package/dist/daemon-lifecycle.d.ts.map +1 -1
  58. package/dist/daemon-outcome.d.ts +3 -5
  59. package/dist/daemon-outcome.d.ts.map +1 -1
  60. package/dist/daemon-outcome.js +7 -19
  61. package/dist/daemon-outcome.js.map +1 -1
  62. package/dist/daemon-run.d.ts +21 -12
  63. package/dist/daemon-run.d.ts.map +1 -1
  64. package/dist/daemon-run.js +59 -40
  65. package/dist/daemon-run.js.map +1 -1
  66. package/dist/daemon-runtime-shutdown.d.ts +7 -0
  67. package/dist/daemon-runtime-shutdown.d.ts.map +1 -1
  68. package/dist/daemon-runtime-shutdown.js +29 -0
  69. package/dist/daemon-runtime-shutdown.js.map +1 -1
  70. package/dist/delegation-belt-descriptor.js.map +1 -1
  71. package/dist/delegation-output.d.ts +2 -0
  72. package/dist/delegation-output.d.ts.map +1 -1
  73. package/dist/delegation-output.js +3 -1
  74. package/dist/delegation-output.js.map +1 -1
  75. package/dist/harness-command.d.ts +13 -0
  76. package/dist/harness-command.d.ts.map +1 -0
  77. package/dist/harness-command.js +35 -0
  78. package/dist/harness-command.js.map +1 -0
  79. package/dist/harness-installer.d.ts +79 -0
  80. package/dist/harness-installer.d.ts.map +1 -0
  81. package/dist/harness-installer.js +256 -0
  82. package/dist/harness-installer.js.map +1 -0
  83. package/dist/interaction-prompt.d.ts +19 -0
  84. package/dist/interaction-prompt.d.ts.map +1 -0
  85. package/dist/interaction-prompt.js +114 -0
  86. package/dist/interaction-prompt.js.map +1 -0
  87. package/dist/live.d.ts +2 -6
  88. package/dist/live.d.ts.map +1 -1
  89. package/dist/live.js +88 -75
  90. package/dist/live.js.map +1 -1
  91. package/dist/mcp-daemon-unavailable.d.ts +6 -0
  92. package/dist/mcp-daemon-unavailable.d.ts.map +1 -0
  93. package/dist/mcp-daemon-unavailable.js +16 -0
  94. package/dist/mcp-daemon-unavailable.js.map +1 -0
  95. package/dist/mcp-run-projections.d.ts +29 -0
  96. package/dist/mcp-run-projections.d.ts.map +1 -1
  97. package/dist/mcp-run-projections.js +17 -17
  98. package/dist/mcp-run-projections.js.map +1 -1
  99. package/dist/mcp-runner.d.ts.map +1 -1
  100. package/dist/mcp-runner.js +81 -39
  101. package/dist/mcp-runner.js.map +1 -1
  102. package/dist/native-login.js.map +1 -1
  103. package/dist/ops-command-specs.d.ts +64 -0
  104. package/dist/ops-command-specs.d.ts.map +1 -0
  105. package/dist/ops-command-specs.js +146 -0
  106. package/dist/ops-command-specs.js.map +1 -0
  107. package/dist/ops-commands.d.ts.map +1 -1
  108. package/dist/ops-commands.js +23 -5
  109. package/dist/ops-commands.js.map +1 -1
  110. package/dist/orphan-reaper.js.map +1 -1
  111. package/dist/output-mode.d.ts +11 -0
  112. package/dist/output-mode.d.ts.map +1 -0
  113. package/dist/output-mode.js +28 -0
  114. package/dist/output-mode.js.map +1 -0
  115. package/dist/plan-question-loop.d.ts.map +1 -1
  116. package/dist/plan-question-loop.js +16 -13
  117. package/dist/plan-question-loop.js.map +1 -1
  118. package/dist/plugins.js +1 -1
  119. package/dist/plugins.js.map +1 -1
  120. package/dist/primary-output.d.ts +9 -4
  121. package/dist/primary-output.d.ts.map +1 -1
  122. package/dist/primary-output.js +50 -2
  123. package/dist/primary-output.js.map +1 -1
  124. package/dist/quota-subject-universe.d.ts +6 -0
  125. package/dist/quota-subject-universe.d.ts.map +1 -0
  126. package/dist/quota-subject-universe.js +31 -0
  127. package/dist/quota-subject-universe.js.map +1 -0
  128. package/dist/registry.js.map +1 -1
  129. package/dist/release-command.d.ts +1 -1
  130. package/dist/release-command.js +2 -2
  131. package/dist/remote-command-specs.d.ts +45 -0
  132. package/dist/remote-command-specs.d.ts.map +1 -0
  133. package/dist/remote-command-specs.js +29 -0
  134. package/dist/remote-command-specs.js.map +1 -0
  135. package/dist/remote-command.d.ts +11 -0
  136. package/dist/remote-command.d.ts.map +1 -0
  137. package/dist/remote-command.js +262 -0
  138. package/dist/remote-command.js.map +1 -0
  139. package/dist/remote-filesystem.d.ts +33 -0
  140. package/dist/remote-filesystem.d.ts.map +1 -0
  141. package/dist/remote-filesystem.js +280 -0
  142. package/dist/remote-filesystem.js.map +1 -0
  143. package/dist/repo-asset-authority.js.map +1 -1
  144. package/dist/request-preflight.d.ts +11 -2
  145. package/dist/request-preflight.d.ts.map +1 -1
  146. package/dist/request-preflight.js +36 -13
  147. package/dist/request-preflight.js.map +1 -1
  148. package/dist/retry-command-specs.d.ts.map +1 -1
  149. package/dist/retry-command-specs.js +2 -0
  150. package/dist/retry-command-specs.js.map +1 -1
  151. package/dist/run-applicability.d.ts +74 -0
  152. package/dist/run-applicability.d.ts.map +1 -0
  153. package/dist/run-applicability.js +72 -0
  154. package/dist/run-applicability.js.map +1 -0
  155. package/dist/run-detail-projections.d.ts +23 -0
  156. package/dist/run-detail-projections.d.ts.map +1 -1
  157. package/dist/run-detail-projections.js +32 -1
  158. package/dist/run-detail-projections.js.map +1 -1
  159. package/dist/run-detail-response.d.ts +7 -0
  160. package/dist/run-detail-response.d.ts.map +1 -0
  161. package/dist/run-detail-response.js +23 -0
  162. package/dist/run-detail-response.js.map +1 -0
  163. package/dist/run-facts-projection.d.ts +22 -0
  164. package/dist/run-facts-projection.d.ts.map +1 -0
  165. package/dist/run-facts-projection.js +86 -0
  166. package/dist/run-facts-projection.js.map +1 -0
  167. package/dist/runtime-replacement-stop.d.ts +25 -0
  168. package/dist/runtime-replacement-stop.d.ts.map +1 -0
  169. package/dist/runtime-replacement-stop.js +145 -0
  170. package/dist/runtime-replacement-stop.js.map +1 -0
  171. package/dist/settings-command.d.ts +1 -0
  172. package/dist/settings-command.d.ts.map +1 -1
  173. package/dist/settings-command.js +27 -21
  174. package/dist/settings-command.js.map +1 -1
  175. package/dist/settings-service.d.ts +7 -7
  176. package/dist/settings-service.d.ts.map +1 -1
  177. package/dist/settings-service.js +3 -3
  178. package/dist/settings-service.js.map +1 -1
  179. package/dist/setup-client-pty.d.ts +14 -0
  180. package/dist/setup-client-pty.d.ts.map +1 -0
  181. package/dist/setup-client-pty.js +61 -0
  182. package/dist/setup-client-pty.js.map +1 -0
  183. package/dist/setup-device-code-disclosure.d.ts +15 -0
  184. package/dist/setup-device-code-disclosure.d.ts.map +1 -0
  185. package/dist/setup-device-code-disclosure.js +52 -0
  186. package/dist/setup-device-code-disclosure.js.map +1 -0
  187. package/dist/setup-job-reducer.d.ts.map +1 -1
  188. package/dist/setup-job-reducer.js +1 -0
  189. package/dist/setup-job-reducer.js.map +1 -1
  190. package/dist/setup-job-store.d.ts +275 -75
  191. package/dist/setup-job-store.d.ts.map +1 -1
  192. package/dist/setup-job-store.js.map +1 -1
  193. package/dist/setup-job-support.js.map +1 -1
  194. package/dist/setup-jobs.d.ts +517 -137
  195. package/dist/setup-jobs.d.ts.map +1 -1
  196. package/dist/setup-jobs.js +68 -118
  197. package/dist/setup-jobs.js.map +1 -1
  198. package/dist/setup-lifecycle-binding.d.ts +7 -0
  199. package/dist/setup-lifecycle-binding.d.ts.map +1 -1
  200. package/dist/setup-lifecycle-binding.js +6 -0
  201. package/dist/setup-lifecycle-binding.js.map +1 -1
  202. package/dist/setup-login-child-lifecycle.d.ts +13 -0
  203. package/dist/setup-login-child-lifecycle.d.ts.map +1 -0
  204. package/dist/setup-login-child-lifecycle.js +45 -0
  205. package/dist/setup-login-child-lifecycle.js.map +1 -0
  206. package/dist/setup-login-inline.d.ts +11 -12
  207. package/dist/setup-login-inline.d.ts.map +1 -1
  208. package/dist/setup-login-inline.js +26 -15
  209. package/dist/setup-login-inline.js.map +1 -1
  210. package/dist/setup-login-permit.d.ts +10 -0
  211. package/dist/setup-login-permit.d.ts.map +1 -0
  212. package/dist/setup-login-permit.js +52 -0
  213. package/dist/setup-login-permit.js.map +1 -0
  214. package/dist/setup-login-protocol.d.ts.map +1 -1
  215. package/dist/setup-login-protocol.js +9 -2
  216. package/dist/setup-login-protocol.js.map +1 -1
  217. package/dist/setup-login-runner.d.ts +1 -0
  218. package/dist/setup-login-runner.d.ts.map +1 -1
  219. package/dist/setup-login-runner.js +20 -31
  220. package/dist/setup-login-runner.js.map +1 -1
  221. package/dist/setup-supervisor.d.ts.map +1 -1
  222. package/dist/setup-supervisor.js.map +1 -1
  223. package/dist/terminal-run-output.d.ts +12 -0
  224. package/dist/terminal-run-output.d.ts.map +1 -0
  225. package/dist/terminal-run-output.js +33 -0
  226. package/dist/terminal-run-output.js.map +1 -0
  227. package/dist/thread-execution-workspace.d.ts +15 -0
  228. package/dist/thread-execution-workspace.d.ts.map +1 -1
  229. package/dist/thread-execution-workspace.js +39 -5
  230. package/dist/thread-execution-workspace.js.map +1 -1
  231. package/dist/thread-turn-services.d.ts +104 -0
  232. package/dist/thread-turn-services.d.ts.map +1 -0
  233. package/dist/thread-turn-services.js +27 -0
  234. package/dist/thread-turn-services.js.map +1 -0
  235. package/package.json +23 -23
@@ -59,46 +59,212 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
59
59
  list(filter?: ControlSetupJobListFilter): ControlSetupJob[];
60
60
  status(input: unknown): ControlSetupJob;
61
61
  snapshot(input: unknown): {
62
- cursor: string;
63
- sequence: number;
62
+ deviceCode?: undefined;
64
63
  job: {
65
- message: string;
66
- harness: "cursor" | "codex" | "claude";
67
- startedAt: string | null;
68
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
64
+ jobId: string;
65
+ harness: "claude" | "codex" | "cursor";
66
+ action: "login";
67
+ transport: "client_pty" | "daemon";
69
68
  profileId: string | null;
69
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
70
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
71
+ deadlineAt?: string | undefined;
72
+ outcome?: {
73
+ reason: "auth_not_ready" | "cancelled_by_user" | "cancelled_on_restart" | "capability_verification_failed" | "command_failed" | "completed" | "credential_route_mismatch" | "interrupted" | "interrupted_unknown" | "launch_failed" | "not_supported" | "termination_unconfirmed" | "timed_out";
74
+ exitCode?: number | null | undefined;
75
+ signal?: string | null | undefined;
76
+ } | undefined;
70
77
  command: string | null;
78
+ guideUrl: string | null;
79
+ message: string;
71
80
  createdAt: string;
72
- jobId: string;
73
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
81
+ startedAt: string | null;
74
82
  finishedAt: string | null;
75
- action: "login";
76
- guideUrl: string | null;
83
+ authCapability?: {
84
+ attemptId: string;
85
+ challengeDigest: string;
86
+ requestDigest: string;
87
+ disclosure: {
88
+ schemaVersion: 1;
89
+ protocolVersion: 1;
90
+ harness: string;
91
+ requested: "api_key" | "auto" | "subscription";
92
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
93
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
94
+ networkScope: "selected_harness_only";
95
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
96
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
97
+ mayConsumeQuota: boolean;
98
+ generatedAt: string;
99
+ };
100
+ state: "disclosed";
101
+ } | {
102
+ attemptId: string;
103
+ challengeDigest: string;
104
+ requestDigest: string;
105
+ disclosure: {
106
+ schemaVersion: 1;
107
+ protocolVersion: 1;
108
+ harness: string;
109
+ requested: "api_key" | "auto" | "subscription";
110
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
111
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
112
+ networkScope: "selected_harness_only";
113
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
114
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
115
+ mayConsumeQuota: boolean;
116
+ generatedAt: string;
117
+ };
118
+ state: "running";
119
+ startedAt: string;
120
+ } | {
121
+ attemptId: string;
122
+ challengeDigest: string;
123
+ requestDigest: string;
124
+ disclosure: {
125
+ schemaVersion: 1;
126
+ protocolVersion: 1;
127
+ harness: string;
128
+ requested: "api_key" | "auto" | "subscription";
129
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
130
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
131
+ networkScope: "selected_harness_only";
132
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
133
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
134
+ mayConsumeQuota: boolean;
135
+ generatedAt: string;
136
+ };
137
+ state: "completed";
138
+ startedAt: string;
139
+ completedAt: string;
140
+ receipt: {
141
+ receiptId: string;
142
+ attemptId: string;
143
+ harness: string;
144
+ requested: "api_key" | "auto" | "subscription";
145
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
146
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
147
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
148
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
149
+ selectionReason: "adapter_error" | "adapter_identity_mismatch" | "adapter_unavailable" | "cancelled" | "exact_requested_route" | "harness_error" | "missing_completion" | "protocol_violation" | "request_mismatch" | "response_mismatch" | "route_mismatch" | "route_missing" | "scratch_mutated" | "source_mismatch" | "source_missing";
150
+ availability: "available" | "unavailable" | "unknown";
151
+ verification: "failed" | "not_run" | "passed";
152
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
153
+ costKnowledge: "estimated" | "exact" | "unknown";
154
+ costUsd?: number | undefined;
155
+ startedAt: string;
156
+ completedAt: string;
157
+ challengeDigest: string;
158
+ requestDigest: string;
159
+ responseDigest: string;
160
+ streamDigest: string;
161
+ scratchBeforeDigest: string;
162
+ scratchAfterDigest: string;
163
+ stream: {
164
+ startedEvents: number;
165
+ completedEvents: number;
166
+ errorEvents: number;
167
+ unexpectedToolEvents: number;
168
+ interactionEvents: number;
169
+ sessionMismatchEvents: number;
170
+ eventsAfterCompleted: number;
171
+ aborted: boolean;
172
+ };
173
+ evidenceRefs: string[];
174
+ };
175
+ } | {
176
+ attemptId: string;
177
+ challengeDigest: string;
178
+ requestDigest: string;
179
+ disclosure: {
180
+ schemaVersion: 1;
181
+ protocolVersion: 1;
182
+ harness: string;
183
+ requested: "api_key" | "auto" | "subscription";
184
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
185
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
186
+ networkScope: "selected_harness_only";
187
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
188
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
189
+ mayConsumeQuota: boolean;
190
+ generatedAt: string;
191
+ };
192
+ state: "interrupted_unknown";
193
+ startedAt: string;
194
+ interruptedAt: string;
195
+ } | undefined;
77
196
  execution?: {
78
- observedAt: string;
79
- commandDigest: string;
80
197
  executionId: string;
198
+ commandDigest: string;
81
199
  manifestDigest: string;
82
200
  processGroup: {
83
201
  schemaVersion: 1;
84
202
  pgid: number;
85
203
  leader: {
86
204
  status: "known";
87
- source: "procfs_stat" | "proc_pidinfo";
88
205
  pid: number;
89
- platform: "linux" | "darwin";
206
+ platform: "darwin" | "linux";
207
+ source: "proc_pidinfo" | "procfs_stat";
90
208
  startToken: string;
91
209
  processGroupId: number;
92
210
  };
93
211
  };
212
+ observedAt: string;
94
213
  permitIssuedAt?: string | undefined;
95
214
  } | undefined;
215
+ authorization?: {
216
+ executionId: string;
217
+ executable: {
218
+ realpath: string;
219
+ sha256: string;
220
+ size: number;
221
+ mode: number;
222
+ device: string;
223
+ inode: string;
224
+ };
225
+ args: string[];
226
+ commandDigest: string;
227
+ manifestDigest: string;
228
+ } | undefined;
229
+ nativeCommand?: {
230
+ executionId: string;
231
+ commandDigest: string;
232
+ manifestDigest: string;
233
+ permitIssuedAt: string | null;
234
+ commandStarted: boolean;
235
+ exitCode: number | null;
236
+ signal: string | null;
237
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
238
+ finishedAt: string;
239
+ } | undefined;
240
+ terminationReconciliation?: {
241
+ status: "empty";
242
+ observedAt: string;
243
+ } | undefined;
244
+ };
245
+ cursor: string;
246
+ sequence: number;
247
+ } | {
248
+ job: {
249
+ jobId: string;
250
+ harness: "claude" | "codex" | "cursor";
251
+ action: "login";
252
+ transport: "client_pty" | "daemon";
253
+ profileId: string | null;
254
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
255
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
256
+ deadlineAt?: string | undefined;
96
257
  outcome?: {
97
- reason: "completed" | "interrupted_unknown" | "interrupted" | "timed_out" | "not_supported" | "launch_failed" | "command_failed" | "auth_not_ready" | "capability_verification_failed" | "credential_route_mismatch" | "cancelled_by_user" | "cancelled_on_restart" | "termination_unconfirmed";
98
- signal?: string | null | undefined;
258
+ reason: "auth_not_ready" | "cancelled_by_user" | "cancelled_on_restart" | "capability_verification_failed" | "command_failed" | "completed" | "credential_route_mismatch" | "interrupted" | "interrupted_unknown" | "launch_failed" | "not_supported" | "termination_unconfirmed" | "timed_out";
99
259
  exitCode?: number | null | undefined;
260
+ signal?: string | null | undefined;
100
261
  } | undefined;
101
- deadlineAt?: string | undefined;
262
+ command: string | null;
263
+ guideUrl: string | null;
264
+ message: string;
265
+ createdAt: string;
266
+ startedAt: string | null;
267
+ finishedAt: string | null;
102
268
  authCapability?: {
103
269
  attemptId: string;
104
270
  challengeDigest: string;
@@ -107,69 +273,70 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
107
273
  schemaVersion: 1;
108
274
  protocolVersion: 1;
109
275
  harness: string;
110
- requested: "auto" | "subscription" | "api_key";
111
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
112
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
276
+ requested: "api_key" | "auto" | "subscription";
277
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
278
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
113
279
  networkScope: "selected_harness_only";
114
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
115
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
280
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
281
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
116
282
  mayConsumeQuota: boolean;
117
283
  generatedAt: string;
118
284
  };
119
285
  state: "disclosed";
120
286
  } | {
121
287
  attemptId: string;
122
- startedAt: string;
123
288
  challengeDigest: string;
124
289
  requestDigest: string;
125
290
  disclosure: {
126
291
  schemaVersion: 1;
127
292
  protocolVersion: 1;
128
293
  harness: string;
129
- requested: "auto" | "subscription" | "api_key";
130
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
131
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
294
+ requested: "api_key" | "auto" | "subscription";
295
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
296
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
132
297
  networkScope: "selected_harness_only";
133
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
134
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
298
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
299
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
135
300
  mayConsumeQuota: boolean;
136
301
  generatedAt: string;
137
302
  };
138
303
  state: "running";
304
+ startedAt: string;
139
305
  } | {
140
306
  attemptId: string;
141
- startedAt: string;
142
- completedAt: string;
143
307
  challengeDigest: string;
144
308
  requestDigest: string;
145
309
  disclosure: {
146
310
  schemaVersion: 1;
147
311
  protocolVersion: 1;
148
312
  harness: string;
149
- requested: "auto" | "subscription" | "api_key";
150
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
151
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
313
+ requested: "api_key" | "auto" | "subscription";
314
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
315
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
152
316
  networkScope: "selected_harness_only";
153
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
154
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
317
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
318
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
155
319
  mayConsumeQuota: boolean;
156
320
  generatedAt: string;
157
321
  };
158
322
  state: "completed";
323
+ startedAt: string;
324
+ completedAt: string;
159
325
  receipt: {
160
- availability: "unknown" | "available" | "unavailable";
161
- verification: "passed" | "failed" | "not_run";
162
- harness: string;
163
- requested: "auto" | "subscription" | "api_key";
164
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
165
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
166
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
167
326
  receiptId: string;
168
327
  attemptId: string;
169
- effective: "local" | "vendor_native" | "managed_api_key" | null;
170
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
171
- selectionReason: "harness_error" | "exact_requested_route" | "adapter_unavailable" | "request_mismatch" | "route_missing" | "route_mismatch" | "source_missing" | "source_mismatch" | "adapter_error" | "missing_completion" | "response_mismatch" | "scratch_mutated" | "protocol_violation" | "adapter_identity_mismatch" | "cancelled";
172
- costKnowledge: "exact" | "unknown" | "estimated";
328
+ harness: string;
329
+ requested: "api_key" | "auto" | "subscription";
330
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
331
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
332
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
333
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
334
+ selectionReason: "adapter_error" | "adapter_identity_mismatch" | "adapter_unavailable" | "cancelled" | "exact_requested_route" | "harness_error" | "missing_completion" | "protocol_violation" | "request_mismatch" | "response_mismatch" | "route_mismatch" | "route_missing" | "scratch_mutated" | "source_mismatch" | "source_missing";
335
+ availability: "available" | "unavailable" | "unknown";
336
+ verification: "failed" | "not_run" | "passed";
337
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
338
+ costKnowledge: "estimated" | "exact" | "unknown";
339
+ costUsd?: number | undefined;
173
340
  startedAt: string;
174
341
  completedAt: string;
175
342
  challengeDigest: string;
@@ -179,7 +346,6 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
179
346
  scratchBeforeDigest: string;
180
347
  scratchAfterDigest: string;
181
348
  stream: {
182
- aborted: boolean;
183
349
  startedEvents: number;
184
350
  completedEvents: number;
185
351
  errorEvents: number;
@@ -187,114 +353,309 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
187
353
  interactionEvents: number;
188
354
  sessionMismatchEvents: number;
189
355
  eventsAfterCompleted: number;
356
+ aborted: boolean;
190
357
  };
191
358
  evidenceRefs: string[];
192
- costUsd?: number | undefined;
193
359
  };
194
360
  } | {
195
361
  attemptId: string;
196
- startedAt: string;
197
362
  challengeDigest: string;
198
363
  requestDigest: string;
199
364
  disclosure: {
200
365
  schemaVersion: 1;
201
366
  protocolVersion: 1;
202
367
  harness: string;
203
- requested: "auto" | "subscription" | "api_key";
204
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
205
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
368
+ requested: "api_key" | "auto" | "subscription";
369
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
370
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
206
371
  networkScope: "selected_harness_only";
207
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
208
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
372
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
373
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
209
374
  mayConsumeQuota: boolean;
210
375
  generatedAt: string;
211
376
  };
212
377
  state: "interrupted_unknown";
378
+ startedAt: string;
213
379
  interruptedAt: string;
214
380
  } | undefined;
215
- authorization?: {
216
- args: string[];
217
- commandDigest: string;
381
+ execution?: {
218
382
  executionId: string;
383
+ commandDigest: string;
219
384
  manifestDigest: string;
385
+ processGroup: {
386
+ schemaVersion: 1;
387
+ pgid: number;
388
+ leader: {
389
+ status: "known";
390
+ pid: number;
391
+ platform: "darwin" | "linux";
392
+ source: "proc_pidinfo" | "procfs_stat";
393
+ startToken: string;
394
+ processGroupId: number;
395
+ };
396
+ };
397
+ observedAt: string;
398
+ permitIssuedAt?: string | undefined;
399
+ } | undefined;
400
+ authorization?: {
401
+ executionId: string;
220
402
  executable: {
221
- sha256: string;
222
- mode: number;
223
403
  realpath: string;
404
+ sha256: string;
224
405
  size: number;
406
+ mode: number;
225
407
  device: string;
226
408
  inode: string;
227
409
  };
410
+ args: string[];
411
+ commandDigest: string;
412
+ manifestDigest: string;
228
413
  } | undefined;
229
414
  nativeCommand?: {
230
- commandDigest: string;
231
- finishedAt: string;
232
- signal: string | null;
233
415
  executionId: string;
416
+ commandDigest: string;
234
417
  manifestDigest: string;
235
418
  permitIssuedAt: string | null;
236
419
  commandStarted: boolean;
237
420
  exitCode: number | null;
238
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
421
+ signal: string | null;
422
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
423
+ finishedAt: string;
239
424
  } | undefined;
240
425
  terminationReconciliation?: {
241
426
  status: "empty";
242
427
  observedAt: string;
243
428
  } | undefined;
244
429
  };
245
- deviceCode?: {
246
- flow: "chatgptDeviceCode" | "chatgpt";
430
+ cursor: string;
431
+ sequence: number;
432
+ deviceCode: {
433
+ flow: "chatgpt" | "chatgptDeviceCode";
247
434
  verificationUrl: string;
248
435
  userCode: string;
249
- } | undefined;
436
+ };
250
437
  };
251
- events(input: unknown): {
252
- message: string;
253
- cursor: string;
254
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
255
- kind: "status";
256
- time: string;
438
+ events(input: unknown): ({
439
+ deviceCode?: undefined;
257
440
  jobId: string;
441
+ cursor: string;
258
442
  previousCursor: string | null;
259
443
  sequence: number;
444
+ time: string;
445
+ kind: "status";
446
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
447
+ message: string;
260
448
  job: {
261
- message: string;
262
- harness: "cursor" | "codex" | "claude";
263
- startedAt: string | null;
264
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
449
+ jobId: string;
450
+ harness: "claude" | "codex" | "cursor";
451
+ action: "login";
452
+ transport: "client_pty" | "daemon";
265
453
  profileId: string | null;
454
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
455
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
456
+ deadlineAt?: string | undefined;
457
+ outcome?: {
458
+ reason: "auth_not_ready" | "cancelled_by_user" | "cancelled_on_restart" | "capability_verification_failed" | "command_failed" | "completed" | "credential_route_mismatch" | "interrupted" | "interrupted_unknown" | "launch_failed" | "not_supported" | "termination_unconfirmed" | "timed_out";
459
+ exitCode?: number | null | undefined;
460
+ signal?: string | null | undefined;
461
+ } | undefined;
266
462
  command: string | null;
463
+ guideUrl: string | null;
464
+ message: string;
267
465
  createdAt: string;
268
- jobId: string;
269
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
466
+ startedAt: string | null;
270
467
  finishedAt: string | null;
271
- action: "login";
272
- guideUrl: string | null;
468
+ authCapability?: {
469
+ attemptId: string;
470
+ challengeDigest: string;
471
+ requestDigest: string;
472
+ disclosure: {
473
+ schemaVersion: 1;
474
+ protocolVersion: 1;
475
+ harness: string;
476
+ requested: "api_key" | "auto" | "subscription";
477
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
478
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
479
+ networkScope: "selected_harness_only";
480
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
481
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
482
+ mayConsumeQuota: boolean;
483
+ generatedAt: string;
484
+ };
485
+ state: "disclosed";
486
+ } | {
487
+ attemptId: string;
488
+ challengeDigest: string;
489
+ requestDigest: string;
490
+ disclosure: {
491
+ schemaVersion: 1;
492
+ protocolVersion: 1;
493
+ harness: string;
494
+ requested: "api_key" | "auto" | "subscription";
495
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
496
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
497
+ networkScope: "selected_harness_only";
498
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
499
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
500
+ mayConsumeQuota: boolean;
501
+ generatedAt: string;
502
+ };
503
+ state: "running";
504
+ startedAt: string;
505
+ } | {
506
+ attemptId: string;
507
+ challengeDigest: string;
508
+ requestDigest: string;
509
+ disclosure: {
510
+ schemaVersion: 1;
511
+ protocolVersion: 1;
512
+ harness: string;
513
+ requested: "api_key" | "auto" | "subscription";
514
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
515
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
516
+ networkScope: "selected_harness_only";
517
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
518
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
519
+ mayConsumeQuota: boolean;
520
+ generatedAt: string;
521
+ };
522
+ state: "completed";
523
+ startedAt: string;
524
+ completedAt: string;
525
+ receipt: {
526
+ receiptId: string;
527
+ attemptId: string;
528
+ harness: string;
529
+ requested: "api_key" | "auto" | "subscription";
530
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
531
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
532
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
533
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
534
+ selectionReason: "adapter_error" | "adapter_identity_mismatch" | "adapter_unavailable" | "cancelled" | "exact_requested_route" | "harness_error" | "missing_completion" | "protocol_violation" | "request_mismatch" | "response_mismatch" | "route_mismatch" | "route_missing" | "scratch_mutated" | "source_mismatch" | "source_missing";
535
+ availability: "available" | "unavailable" | "unknown";
536
+ verification: "failed" | "not_run" | "passed";
537
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
538
+ costKnowledge: "estimated" | "exact" | "unknown";
539
+ costUsd?: number | undefined;
540
+ startedAt: string;
541
+ completedAt: string;
542
+ challengeDigest: string;
543
+ requestDigest: string;
544
+ responseDigest: string;
545
+ streamDigest: string;
546
+ scratchBeforeDigest: string;
547
+ scratchAfterDigest: string;
548
+ stream: {
549
+ startedEvents: number;
550
+ completedEvents: number;
551
+ errorEvents: number;
552
+ unexpectedToolEvents: number;
553
+ interactionEvents: number;
554
+ sessionMismatchEvents: number;
555
+ eventsAfterCompleted: number;
556
+ aborted: boolean;
557
+ };
558
+ evidenceRefs: string[];
559
+ };
560
+ } | {
561
+ attemptId: string;
562
+ challengeDigest: string;
563
+ requestDigest: string;
564
+ disclosure: {
565
+ schemaVersion: 1;
566
+ protocolVersion: 1;
567
+ harness: string;
568
+ requested: "api_key" | "auto" | "subscription";
569
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
570
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
571
+ networkScope: "selected_harness_only";
572
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
573
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
574
+ mayConsumeQuota: boolean;
575
+ generatedAt: string;
576
+ };
577
+ state: "interrupted_unknown";
578
+ startedAt: string;
579
+ interruptedAt: string;
580
+ } | undefined;
273
581
  execution?: {
274
- observedAt: string;
275
- commandDigest: string;
276
582
  executionId: string;
583
+ commandDigest: string;
277
584
  manifestDigest: string;
278
585
  processGroup: {
279
586
  schemaVersion: 1;
280
587
  pgid: number;
281
588
  leader: {
282
589
  status: "known";
283
- source: "procfs_stat" | "proc_pidinfo";
284
590
  pid: number;
285
- platform: "linux" | "darwin";
591
+ platform: "darwin" | "linux";
592
+ source: "proc_pidinfo" | "procfs_stat";
286
593
  startToken: string;
287
594
  processGroupId: number;
288
595
  };
289
596
  };
597
+ observedAt: string;
290
598
  permitIssuedAt?: string | undefined;
291
599
  } | undefined;
600
+ authorization?: {
601
+ executionId: string;
602
+ executable: {
603
+ realpath: string;
604
+ sha256: string;
605
+ size: number;
606
+ mode: number;
607
+ device: string;
608
+ inode: string;
609
+ };
610
+ args: string[];
611
+ commandDigest: string;
612
+ manifestDigest: string;
613
+ } | undefined;
614
+ nativeCommand?: {
615
+ executionId: string;
616
+ commandDigest: string;
617
+ manifestDigest: string;
618
+ permitIssuedAt: string | null;
619
+ commandStarted: boolean;
620
+ exitCode: number | null;
621
+ signal: string | null;
622
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
623
+ finishedAt: string;
624
+ } | undefined;
625
+ terminationReconciliation?: {
626
+ status: "empty";
627
+ observedAt: string;
628
+ } | undefined;
629
+ };
630
+ } | {
631
+ jobId: string;
632
+ cursor: string;
633
+ previousCursor: string | null;
634
+ sequence: number;
635
+ time: string;
636
+ kind: "status";
637
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
638
+ message: string;
639
+ job: {
640
+ jobId: string;
641
+ harness: "claude" | "codex" | "cursor";
642
+ action: "login";
643
+ transport: "client_pty" | "daemon";
644
+ profileId: string | null;
645
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
646
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
647
+ deadlineAt?: string | undefined;
292
648
  outcome?: {
293
- reason: "completed" | "interrupted_unknown" | "interrupted" | "timed_out" | "not_supported" | "launch_failed" | "command_failed" | "auth_not_ready" | "capability_verification_failed" | "credential_route_mismatch" | "cancelled_by_user" | "cancelled_on_restart" | "termination_unconfirmed";
294
- signal?: string | null | undefined;
649
+ reason: "auth_not_ready" | "cancelled_by_user" | "cancelled_on_restart" | "capability_verification_failed" | "command_failed" | "completed" | "credential_route_mismatch" | "interrupted" | "interrupted_unknown" | "launch_failed" | "not_supported" | "termination_unconfirmed" | "timed_out";
295
650
  exitCode?: number | null | undefined;
651
+ signal?: string | null | undefined;
296
652
  } | undefined;
297
- deadlineAt?: string | undefined;
653
+ command: string | null;
654
+ guideUrl: string | null;
655
+ message: string;
656
+ createdAt: string;
657
+ startedAt: string | null;
658
+ finishedAt: string | null;
298
659
  authCapability?: {
299
660
  attemptId: string;
300
661
  challengeDigest: string;
@@ -303,69 +664,70 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
303
664
  schemaVersion: 1;
304
665
  protocolVersion: 1;
305
666
  harness: string;
306
- requested: "auto" | "subscription" | "api_key";
307
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
308
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
667
+ requested: "api_key" | "auto" | "subscription";
668
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
669
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
309
670
  networkScope: "selected_harness_only";
310
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
311
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
671
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
672
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
312
673
  mayConsumeQuota: boolean;
313
674
  generatedAt: string;
314
675
  };
315
676
  state: "disclosed";
316
677
  } | {
317
678
  attemptId: string;
318
- startedAt: string;
319
679
  challengeDigest: string;
320
680
  requestDigest: string;
321
681
  disclosure: {
322
682
  schemaVersion: 1;
323
683
  protocolVersion: 1;
324
684
  harness: string;
325
- requested: "auto" | "subscription" | "api_key";
326
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
327
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
685
+ requested: "api_key" | "auto" | "subscription";
686
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
687
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
328
688
  networkScope: "selected_harness_only";
329
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
330
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
689
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
690
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
331
691
  mayConsumeQuota: boolean;
332
692
  generatedAt: string;
333
693
  };
334
694
  state: "running";
695
+ startedAt: string;
335
696
  } | {
336
697
  attemptId: string;
337
- startedAt: string;
338
- completedAt: string;
339
698
  challengeDigest: string;
340
699
  requestDigest: string;
341
700
  disclosure: {
342
701
  schemaVersion: 1;
343
702
  protocolVersion: 1;
344
703
  harness: string;
345
- requested: "auto" | "subscription" | "api_key";
346
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
347
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
704
+ requested: "api_key" | "auto" | "subscription";
705
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
706
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
348
707
  networkScope: "selected_harness_only";
349
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
350
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
708
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
709
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
351
710
  mayConsumeQuota: boolean;
352
711
  generatedAt: string;
353
712
  };
354
713
  state: "completed";
714
+ startedAt: string;
715
+ completedAt: string;
355
716
  receipt: {
356
- availability: "unknown" | "available" | "unavailable";
357
- verification: "passed" | "failed" | "not_run";
358
- harness: string;
359
- requested: "auto" | "subscription" | "api_key";
360
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
361
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
362
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
363
717
  receiptId: string;
364
718
  attemptId: string;
365
- effective: "local" | "vendor_native" | "managed_api_key" | null;
366
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
367
- selectionReason: "harness_error" | "exact_requested_route" | "adapter_unavailable" | "request_mismatch" | "route_missing" | "route_mismatch" | "source_missing" | "source_mismatch" | "adapter_error" | "missing_completion" | "response_mismatch" | "scratch_mutated" | "protocol_violation" | "adapter_identity_mismatch" | "cancelled";
368
- costKnowledge: "exact" | "unknown" | "estimated";
719
+ harness: string;
720
+ requested: "api_key" | "auto" | "subscription";
721
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
722
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
723
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
724
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
725
+ selectionReason: "adapter_error" | "adapter_identity_mismatch" | "adapter_unavailable" | "cancelled" | "exact_requested_route" | "harness_error" | "missing_completion" | "protocol_violation" | "request_mismatch" | "response_mismatch" | "route_mismatch" | "route_missing" | "scratch_mutated" | "source_mismatch" | "source_missing";
726
+ availability: "available" | "unavailable" | "unknown";
727
+ verification: "failed" | "not_run" | "passed";
728
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
729
+ costKnowledge: "estimated" | "exact" | "unknown";
730
+ costUsd?: number | undefined;
369
731
  startedAt: string;
370
732
  completedAt: string;
371
733
  challengeDigest: string;
@@ -375,7 +737,6 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
375
737
  scratchBeforeDigest: string;
376
738
  scratchAfterDigest: string;
377
739
  stream: {
378
- aborted: boolean;
379
740
  startedEvents: number;
380
741
  completedEvents: number;
381
742
  errorEvents: number;
@@ -383,67 +744,86 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
383
744
  interactionEvents: number;
384
745
  sessionMismatchEvents: number;
385
746
  eventsAfterCompleted: number;
747
+ aborted: boolean;
386
748
  };
387
749
  evidenceRefs: string[];
388
- costUsd?: number | undefined;
389
750
  };
390
751
  } | {
391
752
  attemptId: string;
392
- startedAt: string;
393
753
  challengeDigest: string;
394
754
  requestDigest: string;
395
755
  disclosure: {
396
756
  schemaVersion: 1;
397
757
  protocolVersion: 1;
398
758
  harness: string;
399
- requested: "auto" | "subscription" | "api_key";
400
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
401
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
759
+ requested: "api_key" | "auto" | "subscription";
760
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
761
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
402
762
  networkScope: "selected_harness_only";
403
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
404
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
763
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
764
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
405
765
  mayConsumeQuota: boolean;
406
766
  generatedAt: string;
407
767
  };
408
768
  state: "interrupted_unknown";
769
+ startedAt: string;
409
770
  interruptedAt: string;
410
771
  } | undefined;
411
- authorization?: {
412
- args: string[];
413
- commandDigest: string;
772
+ execution?: {
414
773
  executionId: string;
774
+ commandDigest: string;
415
775
  manifestDigest: string;
776
+ processGroup: {
777
+ schemaVersion: 1;
778
+ pgid: number;
779
+ leader: {
780
+ status: "known";
781
+ pid: number;
782
+ platform: "darwin" | "linux";
783
+ source: "proc_pidinfo" | "procfs_stat";
784
+ startToken: string;
785
+ processGroupId: number;
786
+ };
787
+ };
788
+ observedAt: string;
789
+ permitIssuedAt?: string | undefined;
790
+ } | undefined;
791
+ authorization?: {
792
+ executionId: string;
416
793
  executable: {
417
- sha256: string;
418
- mode: number;
419
794
  realpath: string;
795
+ sha256: string;
420
796
  size: number;
797
+ mode: number;
421
798
  device: string;
422
799
  inode: string;
423
800
  };
801
+ args: string[];
802
+ commandDigest: string;
803
+ manifestDigest: string;
424
804
  } | undefined;
425
805
  nativeCommand?: {
426
- commandDigest: string;
427
- finishedAt: string;
428
- signal: string | null;
429
806
  executionId: string;
807
+ commandDigest: string;
430
808
  manifestDigest: string;
431
809
  permitIssuedAt: string | null;
432
810
  commandStarted: boolean;
433
811
  exitCode: number | null;
434
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
812
+ signal: string | null;
813
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
814
+ finishedAt: string;
435
815
  } | undefined;
436
816
  terminationReconciliation?: {
437
817
  status: "empty";
438
818
  observedAt: string;
439
819
  } | undefined;
440
820
  };
441
- deviceCode?: {
442
- flow: "chatgptDeviceCode" | "chatgpt";
821
+ deviceCode: {
822
+ flow: "chatgpt" | "chatgptDeviceCode";
443
823
  verificationUrl: string;
444
824
  userCode: string;
445
- } | undefined;
446
- }[];
825
+ };
826
+ })[];
447
827
  cancel(input: unknown): Promise<ControlSetupJob>;
448
828
  reconcile(input: unknown): ControlSetupJob;
449
829
  extend(input: unknown): ControlSetupJob;