@claudexor/cli 3.1.1 → 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 (261) 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/belt-bridge.d.ts +2 -0
  19. package/dist/belt-bridge.d.ts.map +1 -0
  20. package/dist/belt-bridge.js +31 -0
  21. package/dist/belt-bridge.js.map +1 -0
  22. package/dist/bridge-serve.d.ts +1 -9
  23. package/dist/bridge-serve.d.ts.map +1 -1
  24. package/dist/bridge-serve.js +5 -22
  25. package/dist/bridge-serve.js.map +1 -1
  26. package/dist/capabilities.d.ts.map +1 -1
  27. package/dist/capabilities.js +8 -1
  28. package/dist/capabilities.js.map +1 -1
  29. package/dist/choice-input.d.ts +7 -0
  30. package/dist/choice-input.d.ts.map +1 -0
  31. package/dist/choice-input.js +17 -0
  32. package/dist/choice-input.js.map +1 -0
  33. package/dist/claude-oauth-usage.js.map +1 -1
  34. package/dist/claudexord-entry.d.ts +11 -0
  35. package/dist/claudexord-entry.d.ts.map +1 -0
  36. package/dist/claudexord-entry.js +42 -0
  37. package/dist/claudexord-entry.js.map +1 -0
  38. package/dist/claudexord.d.ts +2 -17
  39. package/dist/claudexord.d.ts.map +1 -1
  40. package/dist/claudexord.js +60 -93
  41. package/dist/claudexord.js.map +1 -1
  42. package/dist/cli-error.d.ts.map +1 -1
  43. package/dist/cli-error.js +21 -11
  44. package/dist/cli-error.js.map +1 -1
  45. package/dist/cli.js +149 -170
  46. package/dist/cli.js.map +1 -1
  47. package/dist/codex-device-login.js.map +1 -1
  48. package/dist/codex-quota-source.js.map +1 -1
  49. package/dist/command-flags.d.ts +16 -1
  50. package/dist/command-flags.d.ts.map +1 -1
  51. package/dist/command-flags.js +41 -19
  52. package/dist/command-flags.js.map +1 -1
  53. package/dist/command-registry.d.ts +21 -8
  54. package/dist/command-registry.d.ts.map +1 -1
  55. package/dist/command-registry.js +59 -116
  56. package/dist/command-registry.js.map +1 -1
  57. package/dist/command-scope.d.ts +13 -0
  58. package/dist/command-scope.d.ts.map +1 -0
  59. package/dist/command-scope.js +61 -0
  60. package/dist/command-scope.js.map +1 -0
  61. package/dist/control-services.d.ts +1622 -982
  62. package/dist/control-services.d.ts.map +1 -1
  63. package/dist/control-services.js +39 -68
  64. package/dist/control-services.js.map +1 -1
  65. package/dist/credential-commands.d.ts.map +1 -1
  66. package/dist/credential-commands.js +13 -3
  67. package/dist/credential-commands.js.map +1 -1
  68. package/dist/daemon-lifecycle.d.ts.map +1 -1
  69. package/dist/daemon-outcome.d.ts +3 -5
  70. package/dist/daemon-outcome.d.ts.map +1 -1
  71. package/dist/daemon-outcome.js +7 -19
  72. package/dist/daemon-outcome.js.map +1 -1
  73. package/dist/daemon-run.d.ts +26 -29
  74. package/dist/daemon-run.d.ts.map +1 -1
  75. package/dist/daemon-run.js +89 -97
  76. package/dist/daemon-run.js.map +1 -1
  77. package/dist/daemon-runtime-shutdown.d.ts +7 -0
  78. package/dist/daemon-runtime-shutdown.d.ts.map +1 -1
  79. package/dist/daemon-runtime-shutdown.js +29 -0
  80. package/dist/daemon-runtime-shutdown.js.map +1 -1
  81. package/dist/delegation-belt-descriptor.d.ts +20 -36
  82. package/dist/delegation-belt-descriptor.d.ts.map +1 -1
  83. package/dist/delegation-belt-descriptor.js +48 -51
  84. package/dist/delegation-belt-descriptor.js.map +1 -1
  85. package/dist/delegation-capability.d.ts +4 -0
  86. package/dist/delegation-capability.d.ts.map +1 -0
  87. package/dist/delegation-capability.js +29 -0
  88. package/dist/delegation-capability.js.map +1 -0
  89. package/dist/delegation-daemon-binding.d.ts +8 -0
  90. package/dist/delegation-daemon-binding.d.ts.map +1 -0
  91. package/dist/delegation-daemon-binding.js +18 -0
  92. package/dist/delegation-daemon-binding.js.map +1 -0
  93. package/dist/delegation-output.d.ts +18 -0
  94. package/dist/delegation-output.d.ts.map +1 -0
  95. package/dist/delegation-output.js +47 -0
  96. package/dist/delegation-output.js.map +1 -0
  97. package/dist/harness-command.d.ts +13 -0
  98. package/dist/harness-command.d.ts.map +1 -0
  99. package/dist/harness-command.js +35 -0
  100. package/dist/harness-command.js.map +1 -0
  101. package/dist/harness-installer.d.ts +79 -0
  102. package/dist/harness-installer.d.ts.map +1 -0
  103. package/dist/harness-installer.js +256 -0
  104. package/dist/harness-installer.js.map +1 -0
  105. package/dist/interaction-prompt.d.ts +19 -0
  106. package/dist/interaction-prompt.d.ts.map +1 -0
  107. package/dist/interaction-prompt.js +114 -0
  108. package/dist/interaction-prompt.js.map +1 -0
  109. package/dist/live.d.ts +2 -6
  110. package/dist/live.d.ts.map +1 -1
  111. package/dist/live.js +92 -75
  112. package/dist/live.js.map +1 -1
  113. package/dist/mcp-daemon-unavailable.d.ts +6 -0
  114. package/dist/mcp-daemon-unavailable.d.ts.map +1 -0
  115. package/dist/mcp-daemon-unavailable.js +16 -0
  116. package/dist/mcp-daemon-unavailable.js.map +1 -0
  117. package/dist/mcp-run-projections.d.ts +42 -0
  118. package/dist/mcp-run-projections.d.ts.map +1 -0
  119. package/dist/mcp-run-projections.js +74 -0
  120. package/dist/mcp-run-projections.js.map +1 -0
  121. package/dist/mcp-runner.d.ts +19 -1
  122. package/dist/mcp-runner.d.ts.map +1 -1
  123. package/dist/mcp-runner.js +121 -115
  124. package/dist/mcp-runner.js.map +1 -1
  125. package/dist/native-login.js.map +1 -1
  126. package/dist/ops-command-specs.d.ts +64 -0
  127. package/dist/ops-command-specs.d.ts.map +1 -0
  128. package/dist/ops-command-specs.js +146 -0
  129. package/dist/ops-command-specs.js.map +1 -0
  130. package/dist/ops-commands.d.ts.map +1 -1
  131. package/dist/ops-commands.js +23 -5
  132. package/dist/ops-commands.js.map +1 -1
  133. package/dist/orphan-reaper.js.map +1 -1
  134. package/dist/output-mode.d.ts +11 -0
  135. package/dist/output-mode.d.ts.map +1 -0
  136. package/dist/output-mode.js +28 -0
  137. package/dist/output-mode.js.map +1 -0
  138. package/dist/plan-question-loop.d.ts.map +1 -1
  139. package/dist/plan-question-loop.js +16 -13
  140. package/dist/plan-question-loop.js.map +1 -1
  141. package/dist/plugins.js +1 -1
  142. package/dist/plugins.js.map +1 -1
  143. package/dist/primary-output.d.ts +9 -4
  144. package/dist/primary-output.d.ts.map +1 -1
  145. package/dist/primary-output.js +50 -2
  146. package/dist/primary-output.js.map +1 -1
  147. package/dist/quota-subject-universe.d.ts +6 -0
  148. package/dist/quota-subject-universe.d.ts.map +1 -0
  149. package/dist/quota-subject-universe.js +31 -0
  150. package/dist/quota-subject-universe.js.map +1 -0
  151. package/dist/registry.js.map +1 -1
  152. package/dist/release-command.d.ts +1 -1
  153. package/dist/release-command.js +2 -2
  154. package/dist/remote-command-specs.d.ts +45 -0
  155. package/dist/remote-command-specs.d.ts.map +1 -0
  156. package/dist/remote-command-specs.js +29 -0
  157. package/dist/remote-command-specs.js.map +1 -0
  158. package/dist/remote-command.d.ts +11 -0
  159. package/dist/remote-command.d.ts.map +1 -0
  160. package/dist/remote-command.js +262 -0
  161. package/dist/remote-command.js.map +1 -0
  162. package/dist/remote-filesystem.d.ts +33 -0
  163. package/dist/remote-filesystem.d.ts.map +1 -0
  164. package/dist/remote-filesystem.js +280 -0
  165. package/dist/remote-filesystem.js.map +1 -0
  166. package/dist/repo-asset-authority.js.map +1 -1
  167. package/dist/request-preflight.d.ts +11 -2
  168. package/dist/request-preflight.d.ts.map +1 -1
  169. package/dist/request-preflight.js +36 -13
  170. package/dist/request-preflight.js.map +1 -1
  171. package/dist/retry-command-specs.d.ts.map +1 -1
  172. package/dist/retry-command-specs.js +2 -0
  173. package/dist/retry-command-specs.js.map +1 -1
  174. package/dist/run-applicability.d.ts +74 -0
  175. package/dist/run-applicability.d.ts.map +1 -0
  176. package/dist/run-applicability.js +72 -0
  177. package/dist/run-applicability.js.map +1 -0
  178. package/dist/run-detail-projections.d.ts +39 -0
  179. package/dist/run-detail-projections.d.ts.map +1 -0
  180. package/dist/run-detail-projections.js +64 -0
  181. package/dist/run-detail-projections.js.map +1 -0
  182. package/dist/run-detail-response.d.ts +7 -0
  183. package/dist/run-detail-response.d.ts.map +1 -0
  184. package/dist/run-detail-response.js +23 -0
  185. package/dist/run-detail-response.js.map +1 -0
  186. package/dist/run-facts-projection.d.ts +22 -0
  187. package/dist/run-facts-projection.d.ts.map +1 -0
  188. package/dist/run-facts-projection.js +86 -0
  189. package/dist/run-facts-projection.js.map +1 -0
  190. package/dist/runtime-replacement-stop.d.ts +25 -0
  191. package/dist/runtime-replacement-stop.d.ts.map +1 -0
  192. package/dist/runtime-replacement-stop.js +145 -0
  193. package/dist/runtime-replacement-stop.js.map +1 -0
  194. package/dist/settings-command.d.ts +1 -0
  195. package/dist/settings-command.d.ts.map +1 -1
  196. package/dist/settings-command.js +27 -21
  197. package/dist/settings-command.js.map +1 -1
  198. package/dist/settings-service.d.ts +7 -7
  199. package/dist/settings-service.d.ts.map +1 -1
  200. package/dist/settings-service.js +3 -3
  201. package/dist/settings-service.js.map +1 -1
  202. package/dist/setup-client-pty.d.ts +14 -0
  203. package/dist/setup-client-pty.d.ts.map +1 -0
  204. package/dist/setup-client-pty.js +61 -0
  205. package/dist/setup-client-pty.js.map +1 -0
  206. package/dist/setup-device-code-disclosure.d.ts +15 -0
  207. package/dist/setup-device-code-disclosure.d.ts.map +1 -0
  208. package/dist/setup-device-code-disclosure.js +52 -0
  209. package/dist/setup-device-code-disclosure.js.map +1 -0
  210. package/dist/setup-job-reducer.d.ts.map +1 -1
  211. package/dist/setup-job-reducer.js +1 -0
  212. package/dist/setup-job-reducer.js.map +1 -1
  213. package/dist/setup-job-store.d.ts +275 -75
  214. package/dist/setup-job-store.d.ts.map +1 -1
  215. package/dist/setup-job-store.js.map +1 -1
  216. package/dist/setup-job-support.js.map +1 -1
  217. package/dist/setup-jobs.d.ts +517 -137
  218. package/dist/setup-jobs.d.ts.map +1 -1
  219. package/dist/setup-jobs.js +68 -118
  220. package/dist/setup-jobs.js.map +1 -1
  221. package/dist/setup-lifecycle-binding.d.ts +7 -0
  222. package/dist/setup-lifecycle-binding.d.ts.map +1 -1
  223. package/dist/setup-lifecycle-binding.js +6 -0
  224. package/dist/setup-lifecycle-binding.js.map +1 -1
  225. package/dist/setup-login-child-lifecycle.d.ts +13 -0
  226. package/dist/setup-login-child-lifecycle.d.ts.map +1 -0
  227. package/dist/setup-login-child-lifecycle.js +45 -0
  228. package/dist/setup-login-child-lifecycle.js.map +1 -0
  229. package/dist/setup-login-inline.d.ts +11 -12
  230. package/dist/setup-login-inline.d.ts.map +1 -1
  231. package/dist/setup-login-inline.js +26 -15
  232. package/dist/setup-login-inline.js.map +1 -1
  233. package/dist/setup-login-permit.d.ts +10 -0
  234. package/dist/setup-login-permit.d.ts.map +1 -0
  235. package/dist/setup-login-permit.js +52 -0
  236. package/dist/setup-login-permit.js.map +1 -0
  237. package/dist/setup-login-protocol.d.ts.map +1 -1
  238. package/dist/setup-login-protocol.js +9 -2
  239. package/dist/setup-login-protocol.js.map +1 -1
  240. package/dist/setup-login-runner.d.ts +1 -0
  241. package/dist/setup-login-runner.d.ts.map +1 -1
  242. package/dist/setup-login-runner.js +20 -31
  243. package/dist/setup-login-runner.js.map +1 -1
  244. package/dist/setup-supervisor.d.ts.map +1 -1
  245. package/dist/setup-supervisor.js.map +1 -1
  246. package/dist/terminal-run-output.d.ts +12 -0
  247. package/dist/terminal-run-output.d.ts.map +1 -0
  248. package/dist/terminal-run-output.js +33 -0
  249. package/dist/terminal-run-output.js.map +1 -0
  250. package/dist/thread-delivery.d.ts.map +1 -1
  251. package/dist/thread-delivery.js +4 -3
  252. package/dist/thread-delivery.js.map +1 -1
  253. package/dist/thread-execution-workspace.d.ts +15 -0
  254. package/dist/thread-execution-workspace.d.ts.map +1 -1
  255. package/dist/thread-execution-workspace.js +39 -5
  256. package/dist/thread-execution-workspace.js.map +1 -1
  257. package/dist/thread-turn-services.d.ts +104 -0
  258. package/dist/thread-turn-services.d.ts.map +1 -0
  259. package/dist/thread-turn-services.js +27 -0
  260. package/dist/thread-turn-services.js.map +1 -0
  261. package/package.json +23 -23
@@ -1,54 +1,151 @@
1
1
  import { type OperatorDecisionRecord, JournalManager, InteractionRegistry, ProjectPartitions, ProjectStore, ResourceStore, QuotaRegistry } from "@claudexor/daemon";
2
2
  import { listTrustService, updateTrustService } from "./trust-services.js";
3
- import { type ResourceAttachmentRef } from "@claudexor/schema";
3
+ import { type ResourceAttachmentRef, type ControlRunStartRequest } from "@claudexor/schema";
4
4
  import { AuthReadinessService } from "@claudexor/gateway";
5
+ import { type HarnessListInput } from "./accounts-services.js";
5
6
  import { createSetupJobManager } from "./setup-jobs.js";
6
7
  import { SetupJobStore } from "./setup-job-store.js";
7
8
  import { SetupLifecycleBinding } from "./setup-lifecycle-binding.js";
8
9
  import { type ThreadApplyOptions } from "./thread-delivery.js";
9
10
  type SetupJobManager = ReturnType<typeof createSetupJobManager>;
10
11
  type SetupBinding = SetupLifecycleBinding<SetupJobStore, SetupJobManager>;
11
- type HarnessListInput = {
12
- fresh?: boolean;
13
- includeFakes?: boolean;
14
- harnessIds?: string[];
15
- };
16
12
  export declare function controlServices(interactions: InteractionRegistry, projects: () => ProjectStore, threads: ProjectPartitions, setupBinding: SetupBinding, journalManager: JournalManager, authReadiness: AuthReadinessService, resources: ResourceStore, quotaRegistry: () => QuotaRegistry, daemonJobs: () => Promise<Array<{
17
13
  runId?: string;
18
14
  state: string;
19
15
  finishedAt?: string;
20
16
  params?: unknown;
21
17
  }>>): {
22
- preflightRunRequirements: (request: import("@claudexor/schema").ControlRunStartRequest) => Promise<void>;
18
+ listDirectory?: (path?: string) => Promise<import("@claudexor/schema").ControlDirectoryListing>;
19
+ fetchProjectFile?: (projectId: string, path: string) => Promise<import("./remote-filesystem.js").ScopedProjectFile>;
20
+ threadDetail: (id: string) => Promise<{
21
+ thread: unknown;
22
+ sessions: unknown[];
23
+ turns: unknown[];
24
+ }>;
25
+ createThreadTurn: (id: string, prompt: string, options: {
26
+ kind?: unknown;
27
+ parentRunId?: string | null;
28
+ planRunId?: string | null;
29
+ planHash?: string | null;
30
+ planOverridden?: boolean;
31
+ attachments?: ResourceAttachmentRef[];
32
+ idempotency?: {
33
+ key: string;
34
+ client: string;
35
+ request: unknown;
36
+ };
37
+ }) => Promise<{
38
+ id: string;
39
+ thread_id: string;
40
+ run_id: string | null;
41
+ parent_run_id: string | null;
42
+ plan_run_id: string | null;
43
+ plan_hash: string | null;
44
+ plan_readiness_overridden: boolean;
45
+ kind: "decision" | "followup" | "initial";
46
+ prompt: string;
47
+ attachments: {
48
+ resource_id: string;
49
+ kind: "file" | "image";
50
+ mime: string;
51
+ name: string;
52
+ sha256: string;
53
+ size_bytes: number;
54
+ path: string;
55
+ }[];
56
+ enqueue_error: {
57
+ message: string;
58
+ code: string | null;
59
+ retryable: boolean;
60
+ required_actions: string[];
61
+ context: Record<string, unknown>;
62
+ failed_at: string;
63
+ } | null;
64
+ continuity: {
65
+ kind: "fresh" | "native_resume" | "packet";
66
+ packet_turns: number;
67
+ summarized: boolean;
68
+ lane_switched_from: {
69
+ harness_id: string;
70
+ profile_id: string | null;
71
+ } | null;
72
+ } | null;
73
+ created_at: string;
74
+ }>;
75
+ findThreadTurnByIdempotency: (id: string, idempotency: {
76
+ key: string;
77
+ client: string;
78
+ request: unknown;
79
+ }) => Promise<{
80
+ id: string;
81
+ thread_id: string;
82
+ run_id: string | null;
83
+ parent_run_id: string | null;
84
+ plan_run_id: string | null;
85
+ plan_hash: string | null;
86
+ plan_readiness_overridden: boolean;
87
+ kind: "decision" | "followup" | "initial";
88
+ prompt: string;
89
+ attachments: {
90
+ resource_id: string;
91
+ kind: "file" | "image";
92
+ mime: string;
93
+ name: string;
94
+ sha256: string;
95
+ size_bytes: number;
96
+ path: string;
97
+ }[];
98
+ enqueue_error: {
99
+ message: string;
100
+ code: string | null;
101
+ retryable: boolean;
102
+ required_actions: string[];
103
+ context: Record<string, unknown>;
104
+ failed_at: string;
105
+ } | null;
106
+ continuity: {
107
+ kind: "fresh" | "native_resume" | "packet";
108
+ packet_turns: number;
109
+ summarized: boolean;
110
+ lane_switched_from: {
111
+ harness_id: string;
112
+ profile_id: string | null;
113
+ } | null;
114
+ } | null;
115
+ created_at: string;
116
+ } | null>;
117
+ setTurnEnqueueError: (turnId: string, problem: import("@claudexor/schema").TurnEnqueueProblem) => void;
118
+ preflightRunRequirements: (request: ControlRunStartRequest) => Promise<void>;
119
+ preflightThreadRunRequirements: (request: ControlRunStartRequest) => Promise<void>;
23
120
  createUpload: (input: unknown, idempotencyKey: string) => Promise<{
24
- state: "cancelled" | "open" | "uploading" | "uploaded";
25
121
  uploadId: string;
122
+ state: "cancelled" | "open" | "uploaded" | "uploading";
26
123
  receivedBytes: number;
27
124
  expectedBytes: number;
28
125
  }>;
29
126
  writeUpload: (uploadId: string, chunks: AsyncIterable<Uint8Array>) => Promise<{
30
- state: "cancelled" | "open" | "uploading" | "uploaded";
31
127
  uploadId: string;
128
+ state: "cancelled" | "open" | "uploaded" | "uploading";
32
129
  receivedBytes: number;
33
130
  expectedBytes: number;
34
131
  }>;
35
132
  uploadStatus: (uploadId: string) => Promise<{
36
- state: "cancelled" | "open" | "uploading" | "uploaded";
37
133
  uploadId: string;
134
+ state: "cancelled" | "open" | "uploaded" | "uploading";
38
135
  receivedBytes: number;
39
136
  expectedBytes: number;
40
137
  }>;
41
138
  cancelUpload: (uploadId: string) => Promise<{
42
- state: "cancelled" | "open" | "uploading" | "uploaded";
43
139
  uploadId: string;
140
+ state: "cancelled" | "open" | "uploaded" | "uploading";
44
141
  receivedBytes: number;
45
142
  expectedBytes: number;
46
143
  }>;
47
144
  finalizeUpload: (uploadId: string, expectedSha256: string | undefined, idempotencyKey: string) => Promise<{
48
- kind: "file" | "image";
49
- name: string;
50
145
  resourceId: string;
146
+ kind: "file" | "image";
51
147
  mime: string;
148
+ name: string;
52
149
  sha256: string;
53
150
  sizeBytes: number;
54
151
  createdAt: string;
@@ -60,32 +157,32 @@ export declare function controlServices(interactions: InteractionRegistry, proje
60
157
  projects: unknown[];
61
158
  }>;
62
159
  registerProject: (input: Parameters<ProjectStore["register"]>[0]) => Promise<{
160
+ schema_version: 2;
161
+ id: string;
162
+ root: string;
163
+ created_at: string;
164
+ updated_at: string;
63
165
  nesting: {
64
166
  relation: "inside" | "contains";
65
167
  root: string;
66
168
  projectId: string;
67
169
  }[];
68
- created_at: string;
170
+ }>;
171
+ relinkProject: (id: string, root: string) => Promise<{
69
172
  schema_version: 2;
70
173
  id: string;
71
- updated_at: string;
72
174
  root: string;
73
- }>;
74
- relinkProject: (id: string, root: string) => Promise<{
175
+ created_at: string;
176
+ updated_at: string;
75
177
  nesting: {
76
178
  relation: "inside" | "contains";
77
179
  root: string;
78
180
  projectId: string;
79
181
  }[];
80
- created_at: string;
81
- schema_version: 2;
82
- id: string;
83
- updated_at: string;
84
- root: string;
85
182
  }>;
86
183
  removeProject: (id: string) => Promise<{
87
- root: string;
88
184
  projectId: string;
185
+ root: string;
89
186
  registryRemoved: true;
90
187
  journalPartitionArchived: boolean;
91
188
  archivedPartitionPath: string | null;
@@ -93,30 +190,30 @@ export declare function controlServices(interactions: InteractionRegistry, proje
93
190
  activeRunCheck: "snapshot";
94
191
  }>;
95
192
  createThread: (input: unknown) => Promise<{
96
- state: "active" | "closed" | "trashed" | "purged";
97
- created_at: string;
98
- workspace: {
99
- mode: "in_place" | "isolated";
100
- worktree_path: string | null;
101
- base_sha: string | null;
102
- delivered_through_run_id: string | null;
103
- };
104
- mode: "ask" | "plan" | "agent";
105
193
  schema_version: 2;
106
194
  id: string;
107
- access: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | null;
108
- auth_preference: "auto" | "subscription" | "api_key";
109
- credential_profile_id: string | null;
110
- title: string | null;
195
+ created_at: string;
111
196
  updated_at: string;
112
197
  repo: {
113
198
  root: string;
114
199
  base_ref: string;
115
200
  } | null;
201
+ title: string | null;
202
+ mode: "agent" | "ask" | "plan";
203
+ auth_preference: "api_key" | "auto" | "subscription";
204
+ access: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | null;
205
+ credential_profile_id: string | null;
116
206
  primary_harness: string | null;
117
207
  eligible_harnesses: string[];
208
+ workspace: {
209
+ mode: "in_place" | "isolated";
210
+ worktree_path: string | null;
211
+ base_sha: string | null;
212
+ delivered_through_run_id: string | null;
213
+ };
118
214
  run_ids: string[];
119
215
  head_run_id: string | null;
216
+ state: "active" | "closed" | "purged" | "trashed";
120
217
  trashed_at: string | null;
121
218
  purge_after: string | null;
122
219
  pre_trash_state: "active" | "closed" | null;
@@ -125,59 +222,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
125
222
  threads: unknown[];
126
223
  problems: unknown[];
127
224
  }>;
128
- threadDetail: (id: string) => Promise<{
129
- thread: unknown;
130
- sessions: unknown[];
131
- turns: unknown[];
132
- }>;
133
- createThreadTurn: (id: string, prompt: string, opts: {
134
- kind?: unknown;
135
- parentRunId?: string | null;
136
- planRunId?: string | null;
137
- planHash?: string | null;
138
- planOverridden?: boolean;
139
- attachments?: ResourceAttachmentRef[];
140
- idempotency?: {
141
- key: string;
142
- client: string;
143
- request: unknown;
144
- };
145
- }) => Promise<{
146
- created_at: string;
147
- kind: "initial" | "followup" | "decision";
148
- id: string;
149
- prompt: string;
150
- attachments: {
151
- path: string;
152
- kind: "file" | "image";
153
- name: string;
154
- resource_id: string;
155
- mime: string;
156
- sha256: string;
157
- size_bytes: number;
158
- }[];
159
- thread_id: string;
160
- run_id: string | null;
161
- parent_run_id: string | null;
162
- plan_run_id: string | null;
163
- plan_hash: string | null;
164
- plan_readiness_overridden: boolean;
165
- enqueue_error: {
166
- code: string | null;
167
- message: string;
168
- retryable: boolean;
169
- failed_at: string;
170
- } | null;
171
- continuity: {
172
- kind: "fresh" | "native_resume" | "packet";
173
- packet_turns: number;
174
- summarized: boolean;
175
- lane_switched_from: {
176
- profile_id: string | null;
177
- harness_id: string;
178
- } | null;
179
- } | null;
180
- }>;
181
225
  updateThread: (id: string, patch: {
182
226
  title?: string;
183
227
  state?: string;
@@ -186,117 +230,117 @@ export declare function controlServices(interactions: InteractionRegistry, proje
186
230
  eligibleHarnesses?: string[];
187
231
  access?: string | null;
188
232
  }) => Promise<{
189
- state: "active" | "closed" | "trashed" | "purged";
190
- created_at: string;
191
- workspace: {
192
- mode: "in_place" | "isolated";
193
- worktree_path: string | null;
194
- base_sha: string | null;
195
- delivered_through_run_id: string | null;
196
- };
197
- mode: "ask" | "plan" | "agent";
198
233
  schema_version: 2;
199
234
  id: string;
200
- access: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | null;
201
- auth_preference: "auto" | "subscription" | "api_key";
202
- credential_profile_id: string | null;
203
- title: string | null;
235
+ created_at: string;
204
236
  updated_at: string;
205
237
  repo: {
206
238
  root: string;
207
239
  base_ref: string;
208
240
  } | null;
241
+ title: string | null;
242
+ mode: "agent" | "ask" | "plan";
243
+ auth_preference: "api_key" | "auto" | "subscription";
244
+ access: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | null;
245
+ credential_profile_id: string | null;
209
246
  primary_harness: string | null;
210
247
  eligible_harnesses: string[];
248
+ workspace: {
249
+ mode: "in_place" | "isolated";
250
+ worktree_path: string | null;
251
+ base_sha: string | null;
252
+ delivered_through_run_id: string | null;
253
+ };
211
254
  run_ids: string[];
212
255
  head_run_id: string | null;
256
+ state: "active" | "closed" | "purged" | "trashed";
213
257
  trashed_at: string | null;
214
258
  purge_after: string | null;
215
259
  pre_trash_state: "active" | "closed" | null;
216
260
  }>;
217
261
  trashThread: (id: string) => Promise<{
218
- state: "active" | "closed" | "trashed" | "purged";
219
- created_at: string;
220
- workspace: {
221
- mode: "in_place" | "isolated";
222
- worktree_path: string | null;
223
- base_sha: string | null;
224
- delivered_through_run_id: string | null;
225
- };
226
- mode: "ask" | "plan" | "agent";
227
262
  schema_version: 2;
228
263
  id: string;
229
- access: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | null;
230
- auth_preference: "auto" | "subscription" | "api_key";
231
- credential_profile_id: string | null;
232
- title: string | null;
264
+ created_at: string;
233
265
  updated_at: string;
234
266
  repo: {
235
267
  root: string;
236
268
  base_ref: string;
237
269
  } | null;
270
+ title: string | null;
271
+ mode: "agent" | "ask" | "plan";
272
+ auth_preference: "api_key" | "auto" | "subscription";
273
+ access: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | null;
274
+ credential_profile_id: string | null;
238
275
  primary_harness: string | null;
239
276
  eligible_harnesses: string[];
277
+ workspace: {
278
+ mode: "in_place" | "isolated";
279
+ worktree_path: string | null;
280
+ base_sha: string | null;
281
+ delivered_through_run_id: string | null;
282
+ };
240
283
  run_ids: string[];
241
284
  head_run_id: string | null;
285
+ state: "active" | "closed" | "purged" | "trashed";
242
286
  trashed_at: string | null;
243
287
  purge_after: string | null;
244
288
  pre_trash_state: "active" | "closed" | null;
245
289
  }>;
246
290
  restoreThread: (id: string) => Promise<{
247
- state: "active" | "closed" | "trashed" | "purged";
248
- created_at: string;
249
- workspace: {
250
- mode: "in_place" | "isolated";
251
- worktree_path: string | null;
252
- base_sha: string | null;
253
- delivered_through_run_id: string | null;
254
- };
255
- mode: "ask" | "plan" | "agent";
256
291
  schema_version: 2;
257
292
  id: string;
258
- access: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | null;
259
- auth_preference: "auto" | "subscription" | "api_key";
260
- credential_profile_id: string | null;
261
- title: string | null;
293
+ created_at: string;
262
294
  updated_at: string;
263
295
  repo: {
264
296
  root: string;
265
297
  base_ref: string;
266
298
  } | null;
299
+ title: string | null;
300
+ mode: "agent" | "ask" | "plan";
301
+ auth_preference: "api_key" | "auto" | "subscription";
302
+ access: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | null;
303
+ credential_profile_id: string | null;
267
304
  primary_harness: string | null;
268
305
  eligible_harnesses: string[];
306
+ workspace: {
307
+ mode: "in_place" | "isolated";
308
+ worktree_path: string | null;
309
+ base_sha: string | null;
310
+ delivered_through_run_id: string | null;
311
+ };
269
312
  run_ids: string[];
270
313
  head_run_id: string | null;
314
+ state: "active" | "closed" | "purged" | "trashed";
271
315
  trashed_at: string | null;
272
316
  purge_after: string | null;
273
317
  pre_trash_state: "active" | "closed" | null;
274
318
  }>;
275
319
  purgeThread: (id: string) => Promise<{
276
- state: "active" | "closed" | "trashed" | "purged";
277
- created_at: string;
278
- workspace: {
279
- mode: "in_place" | "isolated";
280
- worktree_path: string | null;
281
- base_sha: string | null;
282
- delivered_through_run_id: string | null;
283
- };
284
- mode: "ask" | "plan" | "agent";
285
320
  schema_version: 2;
286
321
  id: string;
287
- access: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | null;
288
- auth_preference: "auto" | "subscription" | "api_key";
289
- credential_profile_id: string | null;
290
- title: string | null;
322
+ created_at: string;
291
323
  updated_at: string;
292
324
  repo: {
293
325
  root: string;
294
326
  base_ref: string;
295
327
  } | null;
328
+ title: string | null;
329
+ mode: "agent" | "ask" | "plan";
330
+ auth_preference: "api_key" | "auto" | "subscription";
331
+ access: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | null;
332
+ credential_profile_id: string | null;
296
333
  primary_harness: string | null;
297
334
  eligible_harnesses: string[];
335
+ workspace: {
336
+ mode: "in_place" | "isolated";
337
+ worktree_path: string | null;
338
+ base_sha: string | null;
339
+ delivered_through_run_id: string | null;
340
+ };
298
341
  run_ids: string[];
299
342
  head_run_id: string | null;
343
+ state: "active" | "closed" | "purged" | "trashed";
300
344
  trashed_at: string | null;
301
345
  purge_after: string | null;
302
346
  pre_trash_state: "active" | "closed" | null;
@@ -308,25 +352,24 @@ export declare function controlServices(interactions: InteractionRegistry, proje
308
352
  detail: string | null;
309
353
  delivery: import("@claudexor/schema").ControlDeliveryResponse | null;
310
354
  }>;
311
- setTurnEnqueueError: (turnId: string, message: string, code: string | null, retryable?: boolean) => void;
312
355
  listTrust: typeof listTrustService;
313
356
  updateTrust: typeof updateTrustService;
314
357
  pendingInteractions: (runId: string) => {
315
- harnessId: string | null;
358
+ interactionId: string;
359
+ runId: string;
316
360
  attemptId: string | null;
361
+ harnessId: string | null;
362
+ sourceTool: string | null;
317
363
  questions: {
364
+ id: string;
365
+ question: string;
366
+ header: string | null;
318
367
  options: {
319
368
  label: string;
320
369
  description: string | null;
321
370
  }[];
322
- id: string;
323
- question: string;
324
- header: string | null;
325
371
  multi_select: boolean;
326
372
  }[];
327
- runId: string;
328
- interactionId: string;
329
- sourceTool: string | null;
330
373
  requestedAt: string;
331
374
  timeoutAt: string | null;
332
375
  }[];
@@ -335,49 +378,50 @@ export declare function controlServices(interactions: InteractionRegistry, proje
335
378
  message?: string;
336
379
  };
337
380
  operatorDecision: (runId: string, params: unknown) => OperatorDecisionRecord | null;
381
+ findOperatorDecisionByIdempotency: (runId: string, params: unknown, idempotency: {
382
+ key: string;
383
+ client: string;
384
+ request: unknown;
385
+ }) => OperatorDecisionRecord | null;
338
386
  recordOperatorDecision: (runId: string, params: unknown, decision: Omit<OperatorDecisionRecord, "runId">, idempotency?: {
339
387
  key: string;
340
388
  client: string;
341
389
  request: unknown;
342
- }) => OperatorDecisionRecord;
390
+ }) => import("@claudexor/daemon").RecordedOperatorDecision;
343
391
  beginDelivery: (params: unknown, input: {
344
392
  key: string;
345
393
  client: string;
346
394
  operation: string;
347
395
  request: unknown;
348
396
  }) => Promise<{
349
- reused: boolean;
350
397
  id: string;
351
- state: import("@claudexor/daemon").JobState;
398
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
352
399
  params: unknown;
353
400
  result?: unknown;
354
401
  error?: string;
355
402
  errorCode?: string;
356
403
  errorStatus?: number;
357
404
  errorRetryable?: boolean;
405
+ errorRequiredActions?: string[];
406
+ errorContext?: Record<string, unknown>;
358
407
  createdAt: string;
359
408
  runId?: string;
360
409
  taskId?: string;
361
410
  runDir?: string;
362
411
  startedAt?: string;
363
412
  finishedAt?: string;
413
+ reused: boolean;
364
414
  }>;
365
415
  completeDelivery: (id: string, result: unknown) => Promise<void>;
366
416
  failDelivery: (id: string, error: unknown) => Promise<void>;
367
417
  harnesses: (input?: HarnessListInput) => Promise<{
418
+ git: {
419
+ status: "available" | "developer_tools_stub" | "failed" | "missing";
420
+ version: string | null;
421
+ detail: string | null;
422
+ remediation: string | null;
423
+ };
368
424
  harnesses: {
369
- configuredModel: string | null;
370
- configuredModelCheck: {
371
- status: "ok" | "rejected";
372
- message?: string | null;
373
- } | null;
374
- readiness: {
375
- status: "pass" | "fail" | "skip";
376
- detail: string | null;
377
- kind: "binary" | "auth" | "model" | "smoke" | "probe";
378
- id: string;
379
- title: string;
380
- }[];
381
425
  id: string;
382
426
  available: boolean;
383
427
  status: "ok" | "degraded" | "unavailable";
@@ -388,136 +432,207 @@ export declare function controlServices(interactions: InteractionRegistry, proje
388
432
  checks: import("@claudexor/schema").ConformanceCheck[];
389
433
  reasons: string[];
390
434
  authSources: import("@claudexor/schema").AuthSourceReadiness[];
435
+ configuredModel: string | null;
436
+ configuredModelCheck: {
437
+ status: "ok" | "rejected";
438
+ message?: string | null;
439
+ } | null;
440
+ delegation: {
441
+ available: boolean;
442
+ reason: "manifest_unsupported" | "ready" | "runtime_unavailable";
443
+ remediation: string | null;
444
+ requiresFullAccess: boolean;
445
+ };
446
+ readiness: {
447
+ id: string;
448
+ kind: "auth" | "binary" | "model" | "probe" | "smoke";
449
+ title: string;
450
+ status: "fail" | "pass" | "skip";
451
+ detail: string | null;
452
+ }[];
391
453
  }[];
392
454
  }>;
393
455
  harnessModels: (input: {
394
456
  harnessId: string;
395
457
  route?: "local_session" | "api_key";
396
458
  }) => Promise<{
397
- source: "none" | "api" | "manifest";
398
459
  harnessId: string;
399
- verifiedAgainst: string | null;
400
460
  models: {
401
461
  id: string;
402
462
  label: string | null;
403
- routes: ("api_key" | "local_session")[] | null;
404
463
  context_window: number | null;
464
+ routes: ("api_key" | "local_session")[] | null;
405
465
  }[];
466
+ source: "api" | "manifest" | "none";
467
+ verifiedAgainst: string | null;
406
468
  }>;
407
469
  authReadiness: (input: {
408
470
  harnessId: string;
409
471
  request: unknown;
410
472
  }) => Promise<{
411
- authRequest: "auto" | "subscription" | "api_key";
412
473
  harnessId: string;
413
- requestedSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
474
+ authRequest: "api_key" | "auto" | "subscription";
475
+ requestedSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
414
476
  observedAt: string;
415
477
  readiness: {
416
- source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
417
- availability: "unknown" | "available" | "unavailable";
418
- verification: "passed" | "failed" | "not_run";
478
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
479
+ availability: "available" | "unavailable" | "unknown";
480
+ verification: "failed" | "not_run" | "passed";
419
481
  detail?: string | undefined;
420
482
  };
421
483
  }>;
422
484
  agentCapabilities: () => Promise<{
423
- generatedAt: string;
424
485
  ok: true;
425
486
  version: string;
426
- mutability: {
427
- readOnlyModes: ("ask" | "plan" | "agent")[];
428
- writeModes: ("ask" | "plan" | "agent")[];
429
- isolationKinds: ("live" | "envelope")[];
430
- workspaceModes: ("in_place" | "isolated")[];
431
- accessProfiles: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
432
- applyModes: ("apply" | "commit" | "branch" | "pr")[];
487
+ generatedAt: string;
488
+ git: {
489
+ status: "available" | "developer_tools_stub" | "failed" | "missing";
490
+ version: string | null;
491
+ detail: string | null;
492
+ remediation: string | null;
433
493
  };
434
494
  harnesses: {
435
- status: "unavailable" | "ok" | "degraded";
495
+ id: string;
436
496
  enabled: boolean;
437
497
  displayName: string;
438
- id: string;
439
- reasons: string[];
440
- providerFamily: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
498
+ status: "degraded" | "ok" | "unavailable";
499
+ providerFamily: "anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai";
441
500
  enabledIntents: string[];
442
501
  disabledIntents: string[];
502
+ reasons: string[];
443
503
  configuredModel: string | null;
444
504
  configuredModelValid: boolean | null;
445
505
  models: {
446
- source: "none" | "api" | "manifest";
506
+ source: "api" | "manifest" | "none";
447
507
  count: number;
448
508
  verifiedAgainst: string | null;
449
509
  };
450
- webPolicy: "none" | "native" | "tools" | "uncontrolled";
510
+ webPolicy: "native" | "none" | "tools" | "uncontrolled";
451
511
  attachmentInputs: {
452
512
  kind: "file" | "image";
453
513
  mime_types: string[];
454
514
  max_bytes: number;
455
515
  max_count: number;
456
- transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
516
+ transport: "base64_inline" | "base64_stream" | "file_path" | "text_inline";
457
517
  }[];
458
518
  effortLevels: string[];
459
- accessProfilesSupported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
460
- readonlyMechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
519
+ accessProfilesSupported: ("external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write")[];
520
+ readonlyMechanism: "fs_sandbox" | "none" | "permission_deny" | "tool_allowlist";
521
+ delegation: {
522
+ available: boolean;
523
+ reason: "manifest_unsupported" | "ready" | "runtime_unavailable";
524
+ remediation: string | null;
525
+ requiresFullAccess: boolean;
526
+ };
461
527
  }[];
462
528
  availableHarnesses: string[];
463
- modes: ("ask" | "plan" | "agent")[];
529
+ modes: ("agent" | "ask" | "plan")[];
464
530
  runControlKeys: string[];
465
531
  outputSchemaDialects: {
466
532
  dialect: "draft-07" | "draft-2020-12";
467
533
  uri: string;
468
534
  defaultWhenOmitted: boolean;
469
535
  }[];
536
+ mutability: {
537
+ readOnlyModes: ("agent" | "ask" | "plan")[];
538
+ writeModes: ("agent" | "ask" | "plan")[];
539
+ isolationKinds: ("envelope" | "live")[];
540
+ workspaceModes: ("in_place" | "isolated")[];
541
+ accessProfiles: ("external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write")[];
542
+ applyModes: ("apply" | "branch" | "commit" | "pr")[];
543
+ };
470
544
  cliCommands: {
471
545
  id: string;
472
- mutability: "read" | "write" | "delivery" | "ops";
473
- stability: "stable" | "experimental";
546
+ mutability: "delivery" | "ops" | "read" | "write";
547
+ stability: "experimental" | "stable";
474
548
  recovery: boolean;
475
549
  }[];
476
550
  mcpTools: string[];
477
551
  runApplyStates: string[];
478
552
  }>;
553
+ runApplicability: (input: {
554
+ repoRoot: string;
555
+ }) => Promise<{
556
+ repoRoot: string;
557
+ git: {
558
+ status: "available" | "developer_tools_stub" | "failed" | "missing";
559
+ version: string | null;
560
+ detail: string | null;
561
+ remediation: string | null;
562
+ };
563
+ matrix: {
564
+ in_place: {
565
+ read_only: {
566
+ applicable: boolean;
567
+ requiresGit: boolean;
568
+ code: "git_developer_tools_stub" | "git_failed" | "git_missing" | null;
569
+ reason: string | null;
570
+ remediation: string | null;
571
+ };
572
+ agent_convergence: {
573
+ applicable: boolean;
574
+ requiresGit: boolean;
575
+ code: "git_developer_tools_stub" | "git_failed" | "git_missing" | null;
576
+ reason: string | null;
577
+ remediation: string | null;
578
+ };
579
+ agent_other: {
580
+ applicable: boolean;
581
+ requiresGit: boolean;
582
+ code: "git_developer_tools_stub" | "git_failed" | "git_missing" | null;
583
+ reason: string | null;
584
+ remediation: string | null;
585
+ };
586
+ };
587
+ isolated: {
588
+ read_only: {
589
+ applicable: boolean;
590
+ requiresGit: boolean;
591
+ code: "git_developer_tools_stub" | "git_failed" | "git_missing" | null;
592
+ reason: string | null;
593
+ remediation: string | null;
594
+ };
595
+ agent_convergence: {
596
+ applicable: boolean;
597
+ requiresGit: boolean;
598
+ code: "git_developer_tools_stub" | "git_failed" | "git_missing" | null;
599
+ reason: string | null;
600
+ remediation: string | null;
601
+ };
602
+ agent_other: {
603
+ applicable: boolean;
604
+ requiresGit: boolean;
605
+ code: "git_developer_tools_stub" | "git_failed" | "git_missing" | null;
606
+ reason: string | null;
607
+ remediation: string | null;
608
+ };
609
+ };
610
+ };
611
+ }>;
479
612
  createSetupJob: (input: {
480
613
  request: unknown;
481
614
  idempotencyKey: string;
482
615
  clientId: string;
483
616
  }) => Promise<{
484
- message: string;
485
- harness: "cursor" | "codex" | "claude";
486
- startedAt: string | null;
487
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
488
- profileId: string | null;
489
- command: string | null;
490
- createdAt: string;
491
617
  jobId: string;
492
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
493
- finishedAt: string | null;
618
+ harness: "claude" | "codex" | "cursor";
494
619
  action: "login";
495
- guideUrl: string | null;
496
- execution?: {
497
- observedAt: string;
498
- commandDigest: string;
499
- executionId: string;
500
- manifestDigest: string;
501
- processGroup: {
502
- schemaVersion: 1;
503
- pgid: number;
504
- leader: {
505
- status: "known";
506
- source: "procfs_stat" | "proc_pidinfo";
507
- pid: number;
508
- platform: "linux" | "darwin";
509
- startToken: string;
510
- processGroupId: number;
511
- };
512
- };
513
- permitIssuedAt?: string | undefined;
514
- } | undefined;
620
+ transport: "client_pty" | "daemon";
621
+ profileId: string | null;
622
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
623
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
624
+ deadlineAt?: string | undefined;
515
625
  outcome?: {
516
- 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";
517
- signal?: string | null | undefined;
626
+ 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";
518
627
  exitCode?: number | null | undefined;
628
+ signal?: string | null | undefined;
519
629
  } | undefined;
520
- deadlineAt?: string | undefined;
630
+ command: string | null;
631
+ guideUrl: string | null;
632
+ message: string;
633
+ createdAt: string;
634
+ startedAt: string | null;
635
+ finishedAt: string | null;
521
636
  authCapability?: {
522
637
  attemptId: string;
523
638
  challengeDigest: string;
@@ -526,69 +641,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
526
641
  schemaVersion: 1;
527
642
  protocolVersion: 1;
528
643
  harness: string;
529
- requested: "auto" | "subscription" | "api_key";
530
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
531
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
644
+ requested: "api_key" | "auto" | "subscription";
645
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
646
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
532
647
  networkScope: "selected_harness_only";
533
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
534
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
648
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
649
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
535
650
  mayConsumeQuota: boolean;
536
651
  generatedAt: string;
537
652
  };
538
653
  state: "disclosed";
539
654
  } | {
540
655
  attemptId: string;
541
- startedAt: string;
542
656
  challengeDigest: string;
543
657
  requestDigest: string;
544
658
  disclosure: {
545
659
  schemaVersion: 1;
546
660
  protocolVersion: 1;
547
661
  harness: string;
548
- requested: "auto" | "subscription" | "api_key";
549
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
550
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
662
+ requested: "api_key" | "auto" | "subscription";
663
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
664
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
551
665
  networkScope: "selected_harness_only";
552
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
553
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
666
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
667
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
554
668
  mayConsumeQuota: boolean;
555
669
  generatedAt: string;
556
670
  };
557
671
  state: "running";
672
+ startedAt: string;
558
673
  } | {
559
674
  attemptId: string;
560
- startedAt: string;
561
- completedAt: string;
562
675
  challengeDigest: string;
563
676
  requestDigest: string;
564
677
  disclosure: {
565
678
  schemaVersion: 1;
566
679
  protocolVersion: 1;
567
680
  harness: string;
568
- requested: "auto" | "subscription" | "api_key";
569
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
570
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
681
+ requested: "api_key" | "auto" | "subscription";
682
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
683
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
571
684
  networkScope: "selected_harness_only";
572
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
573
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
685
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
686
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
574
687
  mayConsumeQuota: boolean;
575
688
  generatedAt: string;
576
689
  };
577
690
  state: "completed";
691
+ startedAt: string;
692
+ completedAt: string;
578
693
  receipt: {
579
- availability: "unknown" | "available" | "unavailable";
580
- verification: "passed" | "failed" | "not_run";
581
- harness: string;
582
- requested: "auto" | "subscription" | "api_key";
583
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
584
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
585
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
586
694
  receiptId: string;
587
695
  attemptId: string;
588
- effective: "local" | "vendor_native" | "managed_api_key" | null;
589
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
590
- 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";
591
- costKnowledge: "exact" | "unknown" | "estimated";
696
+ harness: string;
697
+ requested: "api_key" | "auto" | "subscription";
698
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
699
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
700
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
701
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
702
+ 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";
703
+ availability: "available" | "unavailable" | "unknown";
704
+ verification: "failed" | "not_run" | "passed";
705
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
706
+ costKnowledge: "estimated" | "exact" | "unknown";
707
+ costUsd?: number | undefined;
592
708
  startedAt: string;
593
709
  completedAt: string;
594
710
  challengeDigest: string;
@@ -598,7 +714,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
598
714
  scratchBeforeDigest: string;
599
715
  scratchAfterDigest: string;
600
716
  stream: {
601
- aborted: boolean;
602
717
  startedEvents: number;
603
718
  completedEvents: number;
604
719
  errorEvents: number;
@@ -606,55 +721,74 @@ export declare function controlServices(interactions: InteractionRegistry, proje
606
721
  interactionEvents: number;
607
722
  sessionMismatchEvents: number;
608
723
  eventsAfterCompleted: number;
724
+ aborted: boolean;
609
725
  };
610
726
  evidenceRefs: string[];
611
- costUsd?: number | undefined;
612
727
  };
613
728
  } | {
614
729
  attemptId: string;
615
- startedAt: string;
616
730
  challengeDigest: string;
617
731
  requestDigest: string;
618
732
  disclosure: {
619
733
  schemaVersion: 1;
620
734
  protocolVersion: 1;
621
735
  harness: string;
622
- requested: "auto" | "subscription" | "api_key";
623
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
624
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
736
+ requested: "api_key" | "auto" | "subscription";
737
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
738
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
625
739
  networkScope: "selected_harness_only";
626
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
627
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
740
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
741
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
628
742
  mayConsumeQuota: boolean;
629
743
  generatedAt: string;
630
744
  };
631
745
  state: "interrupted_unknown";
746
+ startedAt: string;
632
747
  interruptedAt: string;
633
748
  } | undefined;
634
- authorization?: {
635
- args: string[];
636
- commandDigest: string;
749
+ execution?: {
637
750
  executionId: string;
751
+ commandDigest: string;
638
752
  manifestDigest: string;
753
+ processGroup: {
754
+ schemaVersion: 1;
755
+ pgid: number;
756
+ leader: {
757
+ status: "known";
758
+ pid: number;
759
+ platform: "darwin" | "linux";
760
+ source: "proc_pidinfo" | "procfs_stat";
761
+ startToken: string;
762
+ processGroupId: number;
763
+ };
764
+ };
765
+ observedAt: string;
766
+ permitIssuedAt?: string | undefined;
767
+ } | undefined;
768
+ authorization?: {
769
+ executionId: string;
639
770
  executable: {
640
- sha256: string;
641
- mode: number;
642
771
  realpath: string;
772
+ sha256: string;
643
773
  size: number;
774
+ mode: number;
644
775
  device: string;
645
776
  inode: string;
646
777
  };
778
+ args: string[];
779
+ commandDigest: string;
780
+ manifestDigest: string;
647
781
  } | undefined;
648
782
  nativeCommand?: {
649
- commandDigest: string;
650
- finishedAt: string;
651
- signal: string | null;
652
783
  executionId: string;
784
+ commandDigest: string;
653
785
  manifestDigest: string;
654
786
  permitIssuedAt: string | null;
655
787
  commandStarted: boolean;
656
788
  exitCode: number | null;
657
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
789
+ signal: string | null;
790
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
791
+ finishedAt: string;
658
792
  } | undefined;
659
793
  terminationReconciliation?: {
660
794
  status: "empty";
@@ -663,43 +797,577 @@ export declare function controlServices(interactions: InteractionRegistry, proje
663
797
  }>;
664
798
  listSetupJobs: (input?: unknown) => Promise<{
665
799
  jobs: {
666
- message: string;
667
- harness: "cursor" | "codex" | "claude";
668
- startedAt: string | null;
669
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
800
+ jobId: string;
801
+ harness: "claude" | "codex" | "cursor";
802
+ action: "login";
803
+ transport: "client_pty" | "daemon";
670
804
  profileId: string | null;
805
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
806
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
807
+ deadlineAt?: string | undefined;
808
+ outcome?: {
809
+ 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";
810
+ exitCode?: number | null | undefined;
811
+ signal?: string | null | undefined;
812
+ } | undefined;
671
813
  command: string | null;
814
+ guideUrl: string | null;
815
+ message: string;
672
816
  createdAt: string;
673
- jobId: string;
674
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
817
+ startedAt: string | null;
675
818
  finishedAt: string | null;
676
- action: "login";
677
- guideUrl: string | null;
819
+ authCapability?: {
820
+ attemptId: string;
821
+ challengeDigest: string;
822
+ requestDigest: string;
823
+ disclosure: {
824
+ schemaVersion: 1;
825
+ protocolVersion: 1;
826
+ harness: string;
827
+ requested: "api_key" | "auto" | "subscription";
828
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
829
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
830
+ networkScope: "selected_harness_only";
831
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
832
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
833
+ mayConsumeQuota: boolean;
834
+ generatedAt: string;
835
+ };
836
+ state: "disclosed";
837
+ } | {
838
+ attemptId: string;
839
+ challengeDigest: string;
840
+ requestDigest: string;
841
+ disclosure: {
842
+ schemaVersion: 1;
843
+ protocolVersion: 1;
844
+ harness: string;
845
+ requested: "api_key" | "auto" | "subscription";
846
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
847
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
848
+ networkScope: "selected_harness_only";
849
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
850
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
851
+ mayConsumeQuota: boolean;
852
+ generatedAt: string;
853
+ };
854
+ state: "running";
855
+ startedAt: string;
856
+ } | {
857
+ attemptId: string;
858
+ challengeDigest: string;
859
+ requestDigest: string;
860
+ disclosure: {
861
+ schemaVersion: 1;
862
+ protocolVersion: 1;
863
+ harness: string;
864
+ requested: "api_key" | "auto" | "subscription";
865
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
866
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
867
+ networkScope: "selected_harness_only";
868
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
869
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
870
+ mayConsumeQuota: boolean;
871
+ generatedAt: string;
872
+ };
873
+ state: "completed";
874
+ startedAt: string;
875
+ completedAt: string;
876
+ receipt: {
877
+ receiptId: string;
878
+ attemptId: string;
879
+ harness: string;
880
+ requested: "api_key" | "auto" | "subscription";
881
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
882
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
883
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
884
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
885
+ 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";
886
+ availability: "available" | "unavailable" | "unknown";
887
+ verification: "failed" | "not_run" | "passed";
888
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
889
+ costKnowledge: "estimated" | "exact" | "unknown";
890
+ costUsd?: number | undefined;
891
+ startedAt: string;
892
+ completedAt: string;
893
+ challengeDigest: string;
894
+ requestDigest: string;
895
+ responseDigest: string;
896
+ streamDigest: string;
897
+ scratchBeforeDigest: string;
898
+ scratchAfterDigest: string;
899
+ stream: {
900
+ startedEvents: number;
901
+ completedEvents: number;
902
+ errorEvents: number;
903
+ unexpectedToolEvents: number;
904
+ interactionEvents: number;
905
+ sessionMismatchEvents: number;
906
+ eventsAfterCompleted: number;
907
+ aborted: boolean;
908
+ };
909
+ evidenceRefs: string[];
910
+ };
911
+ } | {
912
+ attemptId: string;
913
+ challengeDigest: string;
914
+ requestDigest: string;
915
+ disclosure: {
916
+ schemaVersion: 1;
917
+ protocolVersion: 1;
918
+ harness: string;
919
+ requested: "api_key" | "auto" | "subscription";
920
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
921
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
922
+ networkScope: "selected_harness_only";
923
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
924
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
925
+ mayConsumeQuota: boolean;
926
+ generatedAt: string;
927
+ };
928
+ state: "interrupted_unknown";
929
+ startedAt: string;
930
+ interruptedAt: string;
931
+ } | undefined;
678
932
  execution?: {
679
- observedAt: string;
680
- commandDigest: string;
681
933
  executionId: string;
934
+ commandDigest: string;
682
935
  manifestDigest: string;
683
936
  processGroup: {
684
937
  schemaVersion: 1;
685
938
  pgid: number;
686
939
  leader: {
687
940
  status: "known";
688
- source: "procfs_stat" | "proc_pidinfo";
689
941
  pid: number;
690
- platform: "linux" | "darwin";
942
+ platform: "darwin" | "linux";
943
+ source: "proc_pidinfo" | "procfs_stat";
691
944
  startToken: string;
692
945
  processGroupId: number;
693
946
  };
694
947
  };
948
+ observedAt: string;
695
949
  permitIssuedAt?: string | undefined;
696
950
  } | undefined;
697
- outcome?: {
698
- 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";
951
+ authorization?: {
952
+ executionId: string;
953
+ executable: {
954
+ realpath: string;
955
+ sha256: string;
956
+ size: number;
957
+ mode: number;
958
+ device: string;
959
+ inode: string;
960
+ };
961
+ args: string[];
962
+ commandDigest: string;
963
+ manifestDigest: string;
964
+ } | undefined;
965
+ nativeCommand?: {
966
+ executionId: string;
967
+ commandDigest: string;
968
+ manifestDigest: string;
969
+ permitIssuedAt: string | null;
970
+ commandStarted: boolean;
971
+ exitCode: number | null;
972
+ signal: string | null;
973
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
974
+ finishedAt: string;
975
+ } | undefined;
976
+ terminationReconciliation?: {
977
+ status: "empty";
978
+ observedAt: string;
979
+ } | undefined;
980
+ }[];
981
+ }>;
982
+ setupJobStatus: (input: unknown) => Promise<{
983
+ jobId: string;
984
+ harness: "claude" | "codex" | "cursor";
985
+ action: "login";
986
+ transport: "client_pty" | "daemon";
987
+ profileId: string | null;
988
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
989
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
990
+ deadlineAt?: string | undefined;
991
+ outcome?: {
992
+ 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";
993
+ exitCode?: number | null | undefined;
994
+ signal?: string | null | undefined;
995
+ } | undefined;
996
+ command: string | null;
997
+ guideUrl: string | null;
998
+ message: string;
999
+ createdAt: string;
1000
+ startedAt: string | null;
1001
+ finishedAt: string | null;
1002
+ authCapability?: {
1003
+ attemptId: string;
1004
+ challengeDigest: string;
1005
+ requestDigest: string;
1006
+ disclosure: {
1007
+ schemaVersion: 1;
1008
+ protocolVersion: 1;
1009
+ harness: string;
1010
+ requested: "api_key" | "auto" | "subscription";
1011
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1012
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1013
+ networkScope: "selected_harness_only";
1014
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1015
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1016
+ mayConsumeQuota: boolean;
1017
+ generatedAt: string;
1018
+ };
1019
+ state: "disclosed";
1020
+ } | {
1021
+ attemptId: string;
1022
+ challengeDigest: string;
1023
+ requestDigest: string;
1024
+ disclosure: {
1025
+ schemaVersion: 1;
1026
+ protocolVersion: 1;
1027
+ harness: string;
1028
+ requested: "api_key" | "auto" | "subscription";
1029
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1030
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1031
+ networkScope: "selected_harness_only";
1032
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1033
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1034
+ mayConsumeQuota: boolean;
1035
+ generatedAt: string;
1036
+ };
1037
+ state: "running";
1038
+ startedAt: string;
1039
+ } | {
1040
+ attemptId: string;
1041
+ challengeDigest: string;
1042
+ requestDigest: string;
1043
+ disclosure: {
1044
+ schemaVersion: 1;
1045
+ protocolVersion: 1;
1046
+ harness: string;
1047
+ requested: "api_key" | "auto" | "subscription";
1048
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1049
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1050
+ networkScope: "selected_harness_only";
1051
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1052
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1053
+ mayConsumeQuota: boolean;
1054
+ generatedAt: string;
1055
+ };
1056
+ state: "completed";
1057
+ startedAt: string;
1058
+ completedAt: string;
1059
+ receipt: {
1060
+ receiptId: string;
1061
+ attemptId: string;
1062
+ harness: string;
1063
+ requested: "api_key" | "auto" | "subscription";
1064
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1065
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1066
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
1067
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
1068
+ 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";
1069
+ availability: "available" | "unavailable" | "unknown";
1070
+ verification: "failed" | "not_run" | "passed";
1071
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1072
+ costKnowledge: "estimated" | "exact" | "unknown";
1073
+ costUsd?: number | undefined;
1074
+ startedAt: string;
1075
+ completedAt: string;
1076
+ challengeDigest: string;
1077
+ requestDigest: string;
1078
+ responseDigest: string;
1079
+ streamDigest: string;
1080
+ scratchBeforeDigest: string;
1081
+ scratchAfterDigest: string;
1082
+ stream: {
1083
+ startedEvents: number;
1084
+ completedEvents: number;
1085
+ errorEvents: number;
1086
+ unexpectedToolEvents: number;
1087
+ interactionEvents: number;
1088
+ sessionMismatchEvents: number;
1089
+ eventsAfterCompleted: number;
1090
+ aborted: boolean;
1091
+ };
1092
+ evidenceRefs: string[];
1093
+ };
1094
+ } | {
1095
+ attemptId: string;
1096
+ challengeDigest: string;
1097
+ requestDigest: string;
1098
+ disclosure: {
1099
+ schemaVersion: 1;
1100
+ protocolVersion: 1;
1101
+ harness: string;
1102
+ requested: "api_key" | "auto" | "subscription";
1103
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1104
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1105
+ networkScope: "selected_harness_only";
1106
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1107
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1108
+ mayConsumeQuota: boolean;
1109
+ generatedAt: string;
1110
+ };
1111
+ state: "interrupted_unknown";
1112
+ startedAt: string;
1113
+ interruptedAt: string;
1114
+ } | undefined;
1115
+ execution?: {
1116
+ executionId: string;
1117
+ commandDigest: string;
1118
+ manifestDigest: string;
1119
+ processGroup: {
1120
+ schemaVersion: 1;
1121
+ pgid: number;
1122
+ leader: {
1123
+ status: "known";
1124
+ pid: number;
1125
+ platform: "darwin" | "linux";
1126
+ source: "proc_pidinfo" | "procfs_stat";
1127
+ startToken: string;
1128
+ processGroupId: number;
1129
+ };
1130
+ };
1131
+ observedAt: string;
1132
+ permitIssuedAt?: string | undefined;
1133
+ } | undefined;
1134
+ authorization?: {
1135
+ executionId: string;
1136
+ executable: {
1137
+ realpath: string;
1138
+ sha256: string;
1139
+ size: number;
1140
+ mode: number;
1141
+ device: string;
1142
+ inode: string;
1143
+ };
1144
+ args: string[];
1145
+ commandDigest: string;
1146
+ manifestDigest: string;
1147
+ } | undefined;
1148
+ nativeCommand?: {
1149
+ executionId: string;
1150
+ commandDigest: string;
1151
+ manifestDigest: string;
1152
+ permitIssuedAt: string | null;
1153
+ commandStarted: boolean;
1154
+ exitCode: number | null;
1155
+ signal: string | null;
1156
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
1157
+ finishedAt: string;
1158
+ } | undefined;
1159
+ terminationReconciliation?: {
1160
+ status: "empty";
1161
+ observedAt: string;
1162
+ } | undefined;
1163
+ }>;
1164
+ setupJobSnapshot: (input: unknown) => Promise<{
1165
+ deviceCode?: undefined;
1166
+ job: {
1167
+ jobId: string;
1168
+ harness: "claude" | "codex" | "cursor";
1169
+ action: "login";
1170
+ transport: "client_pty" | "daemon";
1171
+ profileId: string | null;
1172
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1173
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
1174
+ deadlineAt?: string | undefined;
1175
+ outcome?: {
1176
+ 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";
1177
+ exitCode?: number | null | undefined;
699
1178
  signal?: string | null | undefined;
1179
+ } | undefined;
1180
+ command: string | null;
1181
+ guideUrl: string | null;
1182
+ message: string;
1183
+ createdAt: string;
1184
+ startedAt: string | null;
1185
+ finishedAt: string | null;
1186
+ authCapability?: {
1187
+ attemptId: string;
1188
+ challengeDigest: string;
1189
+ requestDigest: string;
1190
+ disclosure: {
1191
+ schemaVersion: 1;
1192
+ protocolVersion: 1;
1193
+ harness: string;
1194
+ requested: "api_key" | "auto" | "subscription";
1195
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1196
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1197
+ networkScope: "selected_harness_only";
1198
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1199
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1200
+ mayConsumeQuota: boolean;
1201
+ generatedAt: string;
1202
+ };
1203
+ state: "disclosed";
1204
+ } | {
1205
+ attemptId: string;
1206
+ challengeDigest: string;
1207
+ requestDigest: string;
1208
+ disclosure: {
1209
+ schemaVersion: 1;
1210
+ protocolVersion: 1;
1211
+ harness: string;
1212
+ requested: "api_key" | "auto" | "subscription";
1213
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1214
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1215
+ networkScope: "selected_harness_only";
1216
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1217
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1218
+ mayConsumeQuota: boolean;
1219
+ generatedAt: string;
1220
+ };
1221
+ state: "running";
1222
+ startedAt: string;
1223
+ } | {
1224
+ attemptId: string;
1225
+ challengeDigest: string;
1226
+ requestDigest: string;
1227
+ disclosure: {
1228
+ schemaVersion: 1;
1229
+ protocolVersion: 1;
1230
+ harness: string;
1231
+ requested: "api_key" | "auto" | "subscription";
1232
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1233
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1234
+ networkScope: "selected_harness_only";
1235
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1236
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1237
+ mayConsumeQuota: boolean;
1238
+ generatedAt: string;
1239
+ };
1240
+ state: "completed";
1241
+ startedAt: string;
1242
+ completedAt: string;
1243
+ receipt: {
1244
+ receiptId: string;
1245
+ attemptId: string;
1246
+ harness: string;
1247
+ requested: "api_key" | "auto" | "subscription";
1248
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1249
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1250
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
1251
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
1252
+ 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";
1253
+ availability: "available" | "unavailable" | "unknown";
1254
+ verification: "failed" | "not_run" | "passed";
1255
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1256
+ costKnowledge: "estimated" | "exact" | "unknown";
1257
+ costUsd?: number | undefined;
1258
+ startedAt: string;
1259
+ completedAt: string;
1260
+ challengeDigest: string;
1261
+ requestDigest: string;
1262
+ responseDigest: string;
1263
+ streamDigest: string;
1264
+ scratchBeforeDigest: string;
1265
+ scratchAfterDigest: string;
1266
+ stream: {
1267
+ startedEvents: number;
1268
+ completedEvents: number;
1269
+ errorEvents: number;
1270
+ unexpectedToolEvents: number;
1271
+ interactionEvents: number;
1272
+ sessionMismatchEvents: number;
1273
+ eventsAfterCompleted: number;
1274
+ aborted: boolean;
1275
+ };
1276
+ evidenceRefs: string[];
1277
+ };
1278
+ } | {
1279
+ attemptId: string;
1280
+ challengeDigest: string;
1281
+ requestDigest: string;
1282
+ disclosure: {
1283
+ schemaVersion: 1;
1284
+ protocolVersion: 1;
1285
+ harness: string;
1286
+ requested: "api_key" | "auto" | "subscription";
1287
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1288
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1289
+ networkScope: "selected_harness_only";
1290
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1291
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1292
+ mayConsumeQuota: boolean;
1293
+ generatedAt: string;
1294
+ };
1295
+ state: "interrupted_unknown";
1296
+ startedAt: string;
1297
+ interruptedAt: string;
1298
+ } | undefined;
1299
+ execution?: {
1300
+ executionId: string;
1301
+ commandDigest: string;
1302
+ manifestDigest: string;
1303
+ processGroup: {
1304
+ schemaVersion: 1;
1305
+ pgid: number;
1306
+ leader: {
1307
+ status: "known";
1308
+ pid: number;
1309
+ platform: "darwin" | "linux";
1310
+ source: "proc_pidinfo" | "procfs_stat";
1311
+ startToken: string;
1312
+ processGroupId: number;
1313
+ };
1314
+ };
1315
+ observedAt: string;
1316
+ permitIssuedAt?: string | undefined;
1317
+ } | undefined;
1318
+ authorization?: {
1319
+ executionId: string;
1320
+ executable: {
1321
+ realpath: string;
1322
+ sha256: string;
1323
+ size: number;
1324
+ mode: number;
1325
+ device: string;
1326
+ inode: string;
1327
+ };
1328
+ args: string[];
1329
+ commandDigest: string;
1330
+ manifestDigest: string;
1331
+ } | undefined;
1332
+ nativeCommand?: {
1333
+ executionId: string;
1334
+ commandDigest: string;
1335
+ manifestDigest: string;
1336
+ permitIssuedAt: string | null;
1337
+ commandStarted: boolean;
1338
+ exitCode: number | null;
1339
+ signal: string | null;
1340
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
1341
+ finishedAt: string;
1342
+ } | undefined;
1343
+ terminationReconciliation?: {
1344
+ status: "empty";
1345
+ observedAt: string;
1346
+ } | undefined;
1347
+ };
1348
+ cursor: string;
1349
+ sequence: number;
1350
+ } | {
1351
+ job: {
1352
+ jobId: string;
1353
+ harness: "claude" | "codex" | "cursor";
1354
+ action: "login";
1355
+ transport: "client_pty" | "daemon";
1356
+ profileId: string | null;
1357
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1358
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
1359
+ deadlineAt?: string | undefined;
1360
+ outcome?: {
1361
+ 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";
700
1362
  exitCode?: number | null | undefined;
1363
+ signal?: string | null | undefined;
701
1364
  } | undefined;
702
- deadlineAt?: string | undefined;
1365
+ command: string | null;
1366
+ guideUrl: string | null;
1367
+ message: string;
1368
+ createdAt: string;
1369
+ startedAt: string | null;
1370
+ finishedAt: string | null;
703
1371
  authCapability?: {
704
1372
  attemptId: string;
705
1373
  challengeDigest: string;
@@ -708,69 +1376,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
708
1376
  schemaVersion: 1;
709
1377
  protocolVersion: 1;
710
1378
  harness: string;
711
- requested: "auto" | "subscription" | "api_key";
712
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
713
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1379
+ requested: "api_key" | "auto" | "subscription";
1380
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1381
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
714
1382
  networkScope: "selected_harness_only";
715
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
716
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1383
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1384
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
717
1385
  mayConsumeQuota: boolean;
718
1386
  generatedAt: string;
719
1387
  };
720
1388
  state: "disclosed";
721
1389
  } | {
722
1390
  attemptId: string;
723
- startedAt: string;
724
1391
  challengeDigest: string;
725
1392
  requestDigest: string;
726
1393
  disclosure: {
727
1394
  schemaVersion: 1;
728
1395
  protocolVersion: 1;
729
1396
  harness: string;
730
- requested: "auto" | "subscription" | "api_key";
731
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
732
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1397
+ requested: "api_key" | "auto" | "subscription";
1398
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1399
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
733
1400
  networkScope: "selected_harness_only";
734
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
735
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1401
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1402
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
736
1403
  mayConsumeQuota: boolean;
737
1404
  generatedAt: string;
738
1405
  };
739
1406
  state: "running";
1407
+ startedAt: string;
740
1408
  } | {
741
1409
  attemptId: string;
742
- startedAt: string;
743
- completedAt: string;
744
1410
  challengeDigest: string;
745
1411
  requestDigest: string;
746
1412
  disclosure: {
747
1413
  schemaVersion: 1;
748
1414
  protocolVersion: 1;
749
1415
  harness: string;
750
- requested: "auto" | "subscription" | "api_key";
751
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
752
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1416
+ requested: "api_key" | "auto" | "subscription";
1417
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1418
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
753
1419
  networkScope: "selected_harness_only";
754
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
755
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1420
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1421
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
756
1422
  mayConsumeQuota: boolean;
757
1423
  generatedAt: string;
758
1424
  };
759
1425
  state: "completed";
1426
+ startedAt: string;
1427
+ completedAt: string;
760
1428
  receipt: {
761
- availability: "unknown" | "available" | "unavailable";
762
- verification: "passed" | "failed" | "not_run";
763
- harness: string;
764
- requested: "auto" | "subscription" | "api_key";
765
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
766
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
767
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
768
1429
  receiptId: string;
769
1430
  attemptId: string;
770
- effective: "local" | "vendor_native" | "managed_api_key" | null;
771
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
772
- 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";
773
- costKnowledge: "exact" | "unknown" | "estimated";
1431
+ harness: string;
1432
+ requested: "api_key" | "auto" | "subscription";
1433
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1434
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1435
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
1436
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
1437
+ 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";
1438
+ availability: "available" | "unavailable" | "unknown";
1439
+ verification: "failed" | "not_run" | "passed";
1440
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1441
+ costKnowledge: "estimated" | "exact" | "unknown";
1442
+ costUsd?: number | undefined;
774
1443
  startedAt: string;
775
1444
  completedAt: string;
776
1445
  challengeDigest: string;
@@ -780,7 +1449,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
780
1449
  scratchBeforeDigest: string;
781
1450
  scratchAfterDigest: string;
782
1451
  stream: {
783
- aborted: boolean;
784
1452
  startedEvents: number;
785
1453
  completedEvents: number;
786
1454
  errorEvents: number;
@@ -788,284 +1456,118 @@ export declare function controlServices(interactions: InteractionRegistry, proje
788
1456
  interactionEvents: number;
789
1457
  sessionMismatchEvents: number;
790
1458
  eventsAfterCompleted: number;
1459
+ aborted: boolean;
791
1460
  };
792
1461
  evidenceRefs: string[];
793
- costUsd?: number | undefined;
794
1462
  };
795
1463
  } | {
796
1464
  attemptId: string;
797
- startedAt: string;
798
1465
  challengeDigest: string;
799
1466
  requestDigest: string;
800
1467
  disclosure: {
801
1468
  schemaVersion: 1;
802
1469
  protocolVersion: 1;
803
1470
  harness: string;
804
- requested: "auto" | "subscription" | "api_key";
805
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
806
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1471
+ requested: "api_key" | "auto" | "subscription";
1472
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1473
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
807
1474
  networkScope: "selected_harness_only";
808
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
809
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1475
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1476
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
810
1477
  mayConsumeQuota: boolean;
811
1478
  generatedAt: string;
812
1479
  };
813
1480
  state: "interrupted_unknown";
1481
+ startedAt: string;
814
1482
  interruptedAt: string;
815
1483
  } | undefined;
816
- authorization?: {
817
- args: string[];
818
- commandDigest: string;
1484
+ execution?: {
819
1485
  executionId: string;
1486
+ commandDigest: string;
820
1487
  manifestDigest: string;
1488
+ processGroup: {
1489
+ schemaVersion: 1;
1490
+ pgid: number;
1491
+ leader: {
1492
+ status: "known";
1493
+ pid: number;
1494
+ platform: "darwin" | "linux";
1495
+ source: "proc_pidinfo" | "procfs_stat";
1496
+ startToken: string;
1497
+ processGroupId: number;
1498
+ };
1499
+ };
1500
+ observedAt: string;
1501
+ permitIssuedAt?: string | undefined;
1502
+ } | undefined;
1503
+ authorization?: {
1504
+ executionId: string;
821
1505
  executable: {
822
- sha256: string;
823
- mode: number;
824
1506
  realpath: string;
1507
+ sha256: string;
825
1508
  size: number;
1509
+ mode: number;
826
1510
  device: string;
827
1511
  inode: string;
828
1512
  };
1513
+ args: string[];
1514
+ commandDigest: string;
1515
+ manifestDigest: string;
829
1516
  } | undefined;
830
1517
  nativeCommand?: {
831
- commandDigest: string;
832
- finishedAt: string;
833
- signal: string | null;
834
1518
  executionId: string;
1519
+ commandDigest: string;
835
1520
  manifestDigest: string;
836
1521
  permitIssuedAt: string | null;
837
1522
  commandStarted: boolean;
838
1523
  exitCode: number | null;
839
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
1524
+ signal: string | null;
1525
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
1526
+ finishedAt: string;
840
1527
  } | undefined;
841
1528
  terminationReconciliation?: {
842
1529
  status: "empty";
843
1530
  observedAt: string;
844
1531
  } | undefined;
845
- }[];
1532
+ };
1533
+ cursor: string;
1534
+ sequence: number;
1535
+ deviceCode: {
1536
+ flow: "chatgpt" | "chatgptDeviceCode";
1537
+ verificationUrl: string;
1538
+ userCode: string;
1539
+ };
846
1540
  }>;
847
- setupJobStatus: (input: unknown) => Promise<{
848
- message: string;
849
- harness: "cursor" | "codex" | "claude";
850
- startedAt: string | null;
851
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
852
- profileId: string | null;
853
- command: string | null;
854
- createdAt: string;
1541
+ setupJobEvents: (input: unknown) => Promise<({
1542
+ deviceCode?: undefined;
855
1543
  jobId: string;
856
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
857
- finishedAt: string | null;
858
- action: "login";
859
- guideUrl: string | null;
860
- execution?: {
861
- observedAt: string;
862
- commandDigest: string;
863
- executionId: string;
864
- manifestDigest: string;
865
- processGroup: {
866
- schemaVersion: 1;
867
- pgid: number;
868
- leader: {
869
- status: "known";
870
- source: "procfs_stat" | "proc_pidinfo";
871
- pid: number;
872
- platform: "linux" | "darwin";
873
- startToken: string;
874
- processGroupId: number;
875
- };
876
- };
877
- permitIssuedAt?: string | undefined;
878
- } | undefined;
879
- outcome?: {
880
- 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";
881
- signal?: string | null | undefined;
882
- exitCode?: number | null | undefined;
883
- } | undefined;
884
- deadlineAt?: string | undefined;
885
- authCapability?: {
886
- attemptId: string;
887
- challengeDigest: string;
888
- requestDigest: string;
889
- disclosure: {
890
- schemaVersion: 1;
891
- protocolVersion: 1;
892
- harness: string;
893
- requested: "auto" | "subscription" | "api_key";
894
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
895
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
896
- networkScope: "selected_harness_only";
897
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
898
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
899
- mayConsumeQuota: boolean;
900
- generatedAt: string;
901
- };
902
- state: "disclosed";
903
- } | {
904
- attemptId: string;
905
- startedAt: string;
906
- challengeDigest: string;
907
- requestDigest: string;
908
- disclosure: {
909
- schemaVersion: 1;
910
- protocolVersion: 1;
911
- harness: string;
912
- requested: "auto" | "subscription" | "api_key";
913
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
914
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
915
- networkScope: "selected_harness_only";
916
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
917
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
918
- mayConsumeQuota: boolean;
919
- generatedAt: string;
920
- };
921
- state: "running";
922
- } | {
923
- attemptId: string;
924
- startedAt: string;
925
- completedAt: string;
926
- challengeDigest: string;
927
- requestDigest: string;
928
- disclosure: {
929
- schemaVersion: 1;
930
- protocolVersion: 1;
931
- harness: string;
932
- requested: "auto" | "subscription" | "api_key";
933
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
934
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
935
- networkScope: "selected_harness_only";
936
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
937
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
938
- mayConsumeQuota: boolean;
939
- generatedAt: string;
940
- };
941
- state: "completed";
942
- receipt: {
943
- availability: "unknown" | "available" | "unavailable";
944
- verification: "passed" | "failed" | "not_run";
945
- harness: string;
946
- requested: "auto" | "subscription" | "api_key";
947
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
948
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
949
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
950
- receiptId: string;
951
- attemptId: string;
952
- effective: "local" | "vendor_native" | "managed_api_key" | null;
953
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
954
- 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";
955
- costKnowledge: "exact" | "unknown" | "estimated";
956
- startedAt: string;
957
- completedAt: string;
958
- challengeDigest: string;
959
- requestDigest: string;
960
- responseDigest: string;
961
- streamDigest: string;
962
- scratchBeforeDigest: string;
963
- scratchAfterDigest: string;
964
- stream: {
965
- aborted: boolean;
966
- startedEvents: number;
967
- completedEvents: number;
968
- errorEvents: number;
969
- unexpectedToolEvents: number;
970
- interactionEvents: number;
971
- sessionMismatchEvents: number;
972
- eventsAfterCompleted: number;
973
- };
974
- evidenceRefs: string[];
975
- costUsd?: number | undefined;
976
- };
977
- } | {
978
- attemptId: string;
979
- startedAt: string;
980
- challengeDigest: string;
981
- requestDigest: string;
982
- disclosure: {
983
- schemaVersion: 1;
984
- protocolVersion: 1;
985
- harness: string;
986
- requested: "auto" | "subscription" | "api_key";
987
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
988
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
989
- networkScope: "selected_harness_only";
990
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
991
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
992
- mayConsumeQuota: boolean;
993
- generatedAt: string;
994
- };
995
- state: "interrupted_unknown";
996
- interruptedAt: string;
997
- } | undefined;
998
- authorization?: {
999
- args: string[];
1000
- commandDigest: string;
1001
- executionId: string;
1002
- manifestDigest: string;
1003
- executable: {
1004
- sha256: string;
1005
- mode: number;
1006
- realpath: string;
1007
- size: number;
1008
- device: string;
1009
- inode: string;
1010
- };
1011
- } | undefined;
1012
- nativeCommand?: {
1013
- commandDigest: string;
1014
- finishedAt: string;
1015
- signal: string | null;
1016
- executionId: string;
1017
- manifestDigest: string;
1018
- permitIssuedAt: string | null;
1019
- commandStarted: boolean;
1020
- exitCode: number | null;
1021
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
1022
- } | undefined;
1023
- terminationReconciliation?: {
1024
- status: "empty";
1025
- observedAt: string;
1026
- } | undefined;
1027
- }>;
1028
- setupJobSnapshot: (input: unknown) => Promise<{
1029
1544
  cursor: string;
1545
+ previousCursor: string | null;
1030
1546
  sequence: number;
1547
+ time: string;
1548
+ kind: "status";
1549
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1550
+ message: string;
1031
1551
  job: {
1032
- message: string;
1033
- harness: "cursor" | "codex" | "claude";
1034
- startedAt: string | null;
1035
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
1036
- profileId: string | null;
1037
- command: string | null;
1038
- createdAt: string;
1039
1552
  jobId: string;
1040
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
1041
- finishedAt: string | null;
1553
+ harness: "claude" | "codex" | "cursor";
1042
1554
  action: "login";
1043
- guideUrl: string | null;
1044
- execution?: {
1045
- observedAt: string;
1046
- commandDigest: string;
1047
- executionId: string;
1048
- manifestDigest: string;
1049
- processGroup: {
1050
- schemaVersion: 1;
1051
- pgid: number;
1052
- leader: {
1053
- status: "known";
1054
- source: "procfs_stat" | "proc_pidinfo";
1055
- pid: number;
1056
- platform: "linux" | "darwin";
1057
- startToken: string;
1058
- processGroupId: number;
1059
- };
1060
- };
1061
- permitIssuedAt?: string | undefined;
1062
- } | undefined;
1555
+ transport: "client_pty" | "daemon";
1556
+ profileId: string | null;
1557
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1558
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
1559
+ deadlineAt?: string | undefined;
1063
1560
  outcome?: {
1064
- 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";
1065
- signal?: string | null | undefined;
1561
+ 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";
1066
1562
  exitCode?: number | null | undefined;
1563
+ signal?: string | null | undefined;
1067
1564
  } | undefined;
1068
- deadlineAt?: string | undefined;
1565
+ command: string | null;
1566
+ guideUrl: string | null;
1567
+ message: string;
1568
+ createdAt: string;
1569
+ startedAt: string | null;
1570
+ finishedAt: string | null;
1069
1571
  authCapability?: {
1070
1572
  attemptId: string;
1071
1573
  challengeDigest: string;
@@ -1074,69 +1576,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1074
1576
  schemaVersion: 1;
1075
1577
  protocolVersion: 1;
1076
1578
  harness: string;
1077
- requested: "auto" | "subscription" | "api_key";
1078
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1079
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1579
+ requested: "api_key" | "auto" | "subscription";
1580
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1581
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1080
1582
  networkScope: "selected_harness_only";
1081
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1082
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1583
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1584
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1083
1585
  mayConsumeQuota: boolean;
1084
1586
  generatedAt: string;
1085
1587
  };
1086
1588
  state: "disclosed";
1087
1589
  } | {
1088
1590
  attemptId: string;
1089
- startedAt: string;
1090
1591
  challengeDigest: string;
1091
1592
  requestDigest: string;
1092
1593
  disclosure: {
1093
1594
  schemaVersion: 1;
1094
1595
  protocolVersion: 1;
1095
1596
  harness: string;
1096
- requested: "auto" | "subscription" | "api_key";
1097
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1098
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1597
+ requested: "api_key" | "auto" | "subscription";
1598
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1599
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1099
1600
  networkScope: "selected_harness_only";
1100
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1101
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1601
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1602
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1102
1603
  mayConsumeQuota: boolean;
1103
1604
  generatedAt: string;
1104
1605
  };
1105
1606
  state: "running";
1607
+ startedAt: string;
1106
1608
  } | {
1107
1609
  attemptId: string;
1108
- startedAt: string;
1109
- completedAt: string;
1110
1610
  challengeDigest: string;
1111
1611
  requestDigest: string;
1112
1612
  disclosure: {
1113
1613
  schemaVersion: 1;
1114
1614
  protocolVersion: 1;
1115
1615
  harness: string;
1116
- requested: "auto" | "subscription" | "api_key";
1117
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1118
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1616
+ requested: "api_key" | "auto" | "subscription";
1617
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1618
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1119
1619
  networkScope: "selected_harness_only";
1120
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1121
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1620
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1621
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1122
1622
  mayConsumeQuota: boolean;
1123
1623
  generatedAt: string;
1124
1624
  };
1125
1625
  state: "completed";
1626
+ startedAt: string;
1627
+ completedAt: string;
1126
1628
  receipt: {
1127
- availability: "unknown" | "available" | "unavailable";
1128
- verification: "passed" | "failed" | "not_run";
1129
- harness: string;
1130
- requested: "auto" | "subscription" | "api_key";
1131
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1132
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1133
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1134
1629
  receiptId: string;
1135
1630
  attemptId: string;
1136
- effective: "local" | "vendor_native" | "managed_api_key" | null;
1137
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
1138
- 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";
1139
- costKnowledge: "exact" | "unknown" | "estimated";
1631
+ harness: string;
1632
+ requested: "api_key" | "auto" | "subscription";
1633
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1634
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1635
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
1636
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
1637
+ 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";
1638
+ availability: "available" | "unavailable" | "unknown";
1639
+ verification: "failed" | "not_run" | "passed";
1640
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1641
+ costKnowledge: "estimated" | "exact" | "unknown";
1642
+ costUsd?: number | undefined;
1140
1643
  startedAt: string;
1141
1644
  completedAt: string;
1142
1645
  challengeDigest: string;
@@ -1146,7 +1649,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1146
1649
  scratchBeforeDigest: string;
1147
1650
  scratchAfterDigest: string;
1148
1651
  stream: {
1149
- aborted: boolean;
1150
1652
  startedEvents: number;
1151
1653
  completedEvents: number;
1152
1654
  errorEvents: number;
@@ -1154,114 +1656,109 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1154
1656
  interactionEvents: number;
1155
1657
  sessionMismatchEvents: number;
1156
1658
  eventsAfterCompleted: number;
1659
+ aborted: boolean;
1157
1660
  };
1158
1661
  evidenceRefs: string[];
1159
- costUsd?: number | undefined;
1160
1662
  };
1161
1663
  } | {
1162
1664
  attemptId: string;
1163
- startedAt: string;
1164
1665
  challengeDigest: string;
1165
1666
  requestDigest: string;
1166
1667
  disclosure: {
1167
1668
  schemaVersion: 1;
1168
1669
  protocolVersion: 1;
1169
1670
  harness: string;
1170
- requested: "auto" | "subscription" | "api_key";
1171
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1172
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1671
+ requested: "api_key" | "auto" | "subscription";
1672
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1673
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1173
1674
  networkScope: "selected_harness_only";
1174
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1175
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1675
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1676
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1176
1677
  mayConsumeQuota: boolean;
1177
1678
  generatedAt: string;
1178
1679
  };
1179
1680
  state: "interrupted_unknown";
1681
+ startedAt: string;
1180
1682
  interruptedAt: string;
1181
1683
  } | undefined;
1182
- authorization?: {
1183
- args: string[];
1184
- commandDigest: string;
1684
+ execution?: {
1185
1685
  executionId: string;
1686
+ commandDigest: string;
1186
1687
  manifestDigest: string;
1688
+ processGroup: {
1689
+ schemaVersion: 1;
1690
+ pgid: number;
1691
+ leader: {
1692
+ status: "known";
1693
+ pid: number;
1694
+ platform: "darwin" | "linux";
1695
+ source: "proc_pidinfo" | "procfs_stat";
1696
+ startToken: string;
1697
+ processGroupId: number;
1698
+ };
1699
+ };
1700
+ observedAt: string;
1701
+ permitIssuedAt?: string | undefined;
1702
+ } | undefined;
1703
+ authorization?: {
1704
+ executionId: string;
1187
1705
  executable: {
1188
- sha256: string;
1189
- mode: number;
1190
1706
  realpath: string;
1707
+ sha256: string;
1191
1708
  size: number;
1709
+ mode: number;
1192
1710
  device: string;
1193
1711
  inode: string;
1194
1712
  };
1713
+ args: string[];
1714
+ commandDigest: string;
1715
+ manifestDigest: string;
1195
1716
  } | undefined;
1196
1717
  nativeCommand?: {
1197
- commandDigest: string;
1198
- finishedAt: string;
1199
- signal: string | null;
1200
1718
  executionId: string;
1719
+ commandDigest: string;
1201
1720
  manifestDigest: string;
1202
1721
  permitIssuedAt: string | null;
1203
1722
  commandStarted: boolean;
1204
1723
  exitCode: number | null;
1205
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
1724
+ signal: string | null;
1725
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
1726
+ finishedAt: string;
1206
1727
  } | undefined;
1207
1728
  terminationReconciliation?: {
1208
1729
  status: "empty";
1209
1730
  observedAt: string;
1210
1731
  } | undefined;
1211
1732
  };
1212
- deviceCode?: {
1213
- flow: "chatgptDeviceCode" | "chatgpt";
1214
- verificationUrl: string;
1215
- userCode: string;
1216
- } | undefined;
1217
- }>;
1218
- setupJobEvents: (input: unknown) => Promise<{
1219
- message: string;
1220
- cursor: string;
1221
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
1222
- kind: "status";
1223
- time: string;
1733
+ } | {
1224
1734
  jobId: string;
1735
+ cursor: string;
1225
1736
  previousCursor: string | null;
1226
1737
  sequence: number;
1738
+ time: string;
1739
+ kind: "status";
1740
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1741
+ message: string;
1227
1742
  job: {
1228
- message: string;
1229
- harness: "cursor" | "codex" | "claude";
1230
- startedAt: string | null;
1231
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
1232
- profileId: string | null;
1233
- command: string | null;
1234
- createdAt: string;
1235
1743
  jobId: string;
1236
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
1237
- finishedAt: string | null;
1744
+ harness: "claude" | "codex" | "cursor";
1238
1745
  action: "login";
1239
- guideUrl: string | null;
1240
- execution?: {
1241
- observedAt: string;
1242
- commandDigest: string;
1243
- executionId: string;
1244
- manifestDigest: string;
1245
- processGroup: {
1246
- schemaVersion: 1;
1247
- pgid: number;
1248
- leader: {
1249
- status: "known";
1250
- source: "procfs_stat" | "proc_pidinfo";
1251
- pid: number;
1252
- platform: "linux" | "darwin";
1253
- startToken: string;
1254
- processGroupId: number;
1255
- };
1256
- };
1257
- permitIssuedAt?: string | undefined;
1258
- } | undefined;
1746
+ transport: "client_pty" | "daemon";
1747
+ profileId: string | null;
1748
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1749
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
1750
+ deadlineAt?: string | undefined;
1259
1751
  outcome?: {
1260
- 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";
1261
- signal?: string | null | undefined;
1752
+ 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";
1262
1753
  exitCode?: number | null | undefined;
1754
+ signal?: string | null | undefined;
1263
1755
  } | undefined;
1264
- deadlineAt?: string | undefined;
1756
+ command: string | null;
1757
+ guideUrl: string | null;
1758
+ message: string;
1759
+ createdAt: string;
1760
+ startedAt: string | null;
1761
+ finishedAt: string | null;
1265
1762
  authCapability?: {
1266
1763
  attemptId: string;
1267
1764
  challengeDigest: string;
@@ -1270,69 +1767,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1270
1767
  schemaVersion: 1;
1271
1768
  protocolVersion: 1;
1272
1769
  harness: string;
1273
- requested: "auto" | "subscription" | "api_key";
1274
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1275
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1770
+ requested: "api_key" | "auto" | "subscription";
1771
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1772
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1276
1773
  networkScope: "selected_harness_only";
1277
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1278
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1774
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1775
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1279
1776
  mayConsumeQuota: boolean;
1280
1777
  generatedAt: string;
1281
1778
  };
1282
1779
  state: "disclosed";
1283
1780
  } | {
1284
1781
  attemptId: string;
1285
- startedAt: string;
1286
1782
  challengeDigest: string;
1287
1783
  requestDigest: string;
1288
1784
  disclosure: {
1289
1785
  schemaVersion: 1;
1290
1786
  protocolVersion: 1;
1291
1787
  harness: string;
1292
- requested: "auto" | "subscription" | "api_key";
1293
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1294
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1788
+ requested: "api_key" | "auto" | "subscription";
1789
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1790
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1295
1791
  networkScope: "selected_harness_only";
1296
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1297
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1792
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1793
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1298
1794
  mayConsumeQuota: boolean;
1299
1795
  generatedAt: string;
1300
1796
  };
1301
1797
  state: "running";
1798
+ startedAt: string;
1302
1799
  } | {
1303
1800
  attemptId: string;
1304
- startedAt: string;
1305
- completedAt: string;
1306
1801
  challengeDigest: string;
1307
1802
  requestDigest: string;
1308
1803
  disclosure: {
1309
1804
  schemaVersion: 1;
1310
1805
  protocolVersion: 1;
1311
1806
  harness: string;
1312
- requested: "auto" | "subscription" | "api_key";
1313
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1314
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1807
+ requested: "api_key" | "auto" | "subscription";
1808
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1809
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1315
1810
  networkScope: "selected_harness_only";
1316
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1317
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1811
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1812
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1318
1813
  mayConsumeQuota: boolean;
1319
1814
  generatedAt: string;
1320
1815
  };
1321
1816
  state: "completed";
1817
+ startedAt: string;
1818
+ completedAt: string;
1322
1819
  receipt: {
1323
- availability: "unknown" | "available" | "unavailable";
1324
- verification: "passed" | "failed" | "not_run";
1325
- harness: string;
1326
- requested: "auto" | "subscription" | "api_key";
1327
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1328
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1329
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1330
1820
  receiptId: string;
1331
1821
  attemptId: string;
1332
- effective: "local" | "vendor_native" | "managed_api_key" | null;
1333
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
1334
- 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";
1335
- costKnowledge: "exact" | "unknown" | "estimated";
1822
+ harness: string;
1823
+ requested: "api_key" | "auto" | "subscription";
1824
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1825
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1826
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
1827
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
1828
+ 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";
1829
+ availability: "available" | "unavailable" | "unknown";
1830
+ verification: "failed" | "not_run" | "passed";
1831
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1832
+ costKnowledge: "estimated" | "exact" | "unknown";
1833
+ costUsd?: number | undefined;
1336
1834
  startedAt: string;
1337
1835
  completedAt: string;
1338
1836
  challengeDigest: string;
@@ -1342,7 +1840,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1342
1840
  scratchBeforeDigest: string;
1343
1841
  scratchAfterDigest: string;
1344
1842
  stream: {
1345
- aborted: boolean;
1346
1843
  startedEvents: number;
1347
1844
  completedEvents: number;
1348
1845
  errorEvents: number;
@@ -1350,105 +1847,106 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1350
1847
  interactionEvents: number;
1351
1848
  sessionMismatchEvents: number;
1352
1849
  eventsAfterCompleted: number;
1850
+ aborted: boolean;
1353
1851
  };
1354
1852
  evidenceRefs: string[];
1355
- costUsd?: number | undefined;
1356
1853
  };
1357
1854
  } | {
1358
1855
  attemptId: string;
1359
- startedAt: string;
1360
1856
  challengeDigest: string;
1361
1857
  requestDigest: string;
1362
1858
  disclosure: {
1363
1859
  schemaVersion: 1;
1364
1860
  protocolVersion: 1;
1365
1861
  harness: string;
1366
- requested: "auto" | "subscription" | "api_key";
1367
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1368
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1862
+ requested: "api_key" | "auto" | "subscription";
1863
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1864
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1369
1865
  networkScope: "selected_harness_only";
1370
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1371
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1866
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1867
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1372
1868
  mayConsumeQuota: boolean;
1373
1869
  generatedAt: string;
1374
1870
  };
1375
1871
  state: "interrupted_unknown";
1872
+ startedAt: string;
1376
1873
  interruptedAt: string;
1377
1874
  } | undefined;
1378
- authorization?: {
1379
- args: string[];
1380
- commandDigest: string;
1875
+ execution?: {
1381
1876
  executionId: string;
1877
+ commandDigest: string;
1382
1878
  manifestDigest: string;
1879
+ processGroup: {
1880
+ schemaVersion: 1;
1881
+ pgid: number;
1882
+ leader: {
1883
+ status: "known";
1884
+ pid: number;
1885
+ platform: "darwin" | "linux";
1886
+ source: "proc_pidinfo" | "procfs_stat";
1887
+ startToken: string;
1888
+ processGroupId: number;
1889
+ };
1890
+ };
1891
+ observedAt: string;
1892
+ permitIssuedAt?: string | undefined;
1893
+ } | undefined;
1894
+ authorization?: {
1895
+ executionId: string;
1383
1896
  executable: {
1384
- sha256: string;
1385
- mode: number;
1386
1897
  realpath: string;
1898
+ sha256: string;
1387
1899
  size: number;
1900
+ mode: number;
1388
1901
  device: string;
1389
1902
  inode: string;
1390
1903
  };
1904
+ args: string[];
1905
+ commandDigest: string;
1906
+ manifestDigest: string;
1391
1907
  } | undefined;
1392
1908
  nativeCommand?: {
1393
- commandDigest: string;
1394
- finishedAt: string;
1395
- signal: string | null;
1396
1909
  executionId: string;
1910
+ commandDigest: string;
1397
1911
  manifestDigest: string;
1398
1912
  permitIssuedAt: string | null;
1399
1913
  commandStarted: boolean;
1400
1914
  exitCode: number | null;
1401
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
1915
+ signal: string | null;
1916
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
1917
+ finishedAt: string;
1402
1918
  } | undefined;
1403
1919
  terminationReconciliation?: {
1404
1920
  status: "empty";
1405
1921
  observedAt: string;
1406
1922
  } | undefined;
1407
1923
  };
1408
- deviceCode?: {
1409
- flow: "chatgptDeviceCode" | "chatgpt";
1924
+ deviceCode: {
1925
+ flow: "chatgpt" | "chatgptDeviceCode";
1410
1926
  verificationUrl: string;
1411
1927
  userCode: string;
1412
- } | undefined;
1413
- }[]>;
1928
+ };
1929
+ })[]>;
1414
1930
  cancelSetupJob: (input: unknown) => Promise<{
1415
- message: string;
1416
- harness: "cursor" | "codex" | "claude";
1417
- startedAt: string | null;
1418
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
1419
- profileId: string | null;
1420
- command: string | null;
1421
- createdAt: string;
1422
1931
  jobId: string;
1423
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
1424
- finishedAt: string | null;
1932
+ harness: "claude" | "codex" | "cursor";
1425
1933
  action: "login";
1426
- guideUrl: string | null;
1427
- execution?: {
1428
- observedAt: string;
1429
- commandDigest: string;
1430
- executionId: string;
1431
- manifestDigest: string;
1432
- processGroup: {
1433
- schemaVersion: 1;
1434
- pgid: number;
1435
- leader: {
1436
- status: "known";
1437
- source: "procfs_stat" | "proc_pidinfo";
1438
- pid: number;
1439
- platform: "linux" | "darwin";
1440
- startToken: string;
1441
- processGroupId: number;
1442
- };
1443
- };
1444
- permitIssuedAt?: string | undefined;
1445
- } | undefined;
1934
+ transport: "client_pty" | "daemon";
1935
+ profileId: string | null;
1936
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
1937
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
1938
+ deadlineAt?: string | undefined;
1446
1939
  outcome?: {
1447
- 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";
1448
- signal?: string | null | undefined;
1940
+ 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";
1449
1941
  exitCode?: number | null | undefined;
1942
+ signal?: string | null | undefined;
1450
1943
  } | undefined;
1451
- deadlineAt?: string | undefined;
1944
+ command: string | null;
1945
+ guideUrl: string | null;
1946
+ message: string;
1947
+ createdAt: string;
1948
+ startedAt: string | null;
1949
+ finishedAt: string | null;
1452
1950
  authCapability?: {
1453
1951
  attemptId: string;
1454
1952
  challengeDigest: string;
@@ -1457,69 +1955,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1457
1955
  schemaVersion: 1;
1458
1956
  protocolVersion: 1;
1459
1957
  harness: string;
1460
- requested: "auto" | "subscription" | "api_key";
1461
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1462
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1958
+ requested: "api_key" | "auto" | "subscription";
1959
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1960
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1463
1961
  networkScope: "selected_harness_only";
1464
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1465
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1962
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1963
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1466
1964
  mayConsumeQuota: boolean;
1467
1965
  generatedAt: string;
1468
1966
  };
1469
1967
  state: "disclosed";
1470
1968
  } | {
1471
1969
  attemptId: string;
1472
- startedAt: string;
1473
1970
  challengeDigest: string;
1474
1971
  requestDigest: string;
1475
1972
  disclosure: {
1476
1973
  schemaVersion: 1;
1477
1974
  protocolVersion: 1;
1478
1975
  harness: string;
1479
- requested: "auto" | "subscription" | "api_key";
1480
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1481
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1976
+ requested: "api_key" | "auto" | "subscription";
1977
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1978
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1482
1979
  networkScope: "selected_harness_only";
1483
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1484
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1980
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1981
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1485
1982
  mayConsumeQuota: boolean;
1486
1983
  generatedAt: string;
1487
1984
  };
1488
1985
  state: "running";
1986
+ startedAt: string;
1489
1987
  } | {
1490
1988
  attemptId: string;
1491
- startedAt: string;
1492
- completedAt: string;
1493
1989
  challengeDigest: string;
1494
1990
  requestDigest: string;
1495
1991
  disclosure: {
1496
1992
  schemaVersion: 1;
1497
1993
  protocolVersion: 1;
1498
1994
  harness: string;
1499
- requested: "auto" | "subscription" | "api_key";
1500
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1501
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1995
+ requested: "api_key" | "auto" | "subscription";
1996
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
1997
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1502
1998
  networkScope: "selected_harness_only";
1503
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1504
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
1999
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2000
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1505
2001
  mayConsumeQuota: boolean;
1506
2002
  generatedAt: string;
1507
2003
  };
1508
2004
  state: "completed";
2005
+ startedAt: string;
2006
+ completedAt: string;
1509
2007
  receipt: {
1510
- availability: "unknown" | "available" | "unavailable";
1511
- verification: "passed" | "failed" | "not_run";
1512
- harness: string;
1513
- requested: "auto" | "subscription" | "api_key";
1514
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1515
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1516
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1517
2008
  receiptId: string;
1518
2009
  attemptId: string;
1519
- effective: "local" | "vendor_native" | "managed_api_key" | null;
1520
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
1521
- 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";
1522
- costKnowledge: "exact" | "unknown" | "estimated";
2010
+ harness: string;
2011
+ requested: "api_key" | "auto" | "subscription";
2012
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2013
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
2014
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
2015
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
2016
+ 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";
2017
+ availability: "available" | "unavailable" | "unknown";
2018
+ verification: "failed" | "not_run" | "passed";
2019
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2020
+ costKnowledge: "estimated" | "exact" | "unknown";
2021
+ costUsd?: number | undefined;
1523
2022
  startedAt: string;
1524
2023
  completedAt: string;
1525
2024
  challengeDigest: string;
@@ -1529,7 +2028,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1529
2028
  scratchBeforeDigest: string;
1530
2029
  scratchAfterDigest: string;
1531
2030
  stream: {
1532
- aborted: boolean;
1533
2031
  startedEvents: number;
1534
2032
  completedEvents: number;
1535
2033
  errorEvents: number;
@@ -1537,55 +2035,74 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1537
2035
  interactionEvents: number;
1538
2036
  sessionMismatchEvents: number;
1539
2037
  eventsAfterCompleted: number;
2038
+ aborted: boolean;
1540
2039
  };
1541
2040
  evidenceRefs: string[];
1542
- costUsd?: number | undefined;
1543
2041
  };
1544
2042
  } | {
1545
2043
  attemptId: string;
1546
- startedAt: string;
1547
2044
  challengeDigest: string;
1548
2045
  requestDigest: string;
1549
2046
  disclosure: {
1550
2047
  schemaVersion: 1;
1551
2048
  protocolVersion: 1;
1552
2049
  harness: string;
1553
- requested: "auto" | "subscription" | "api_key";
1554
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1555
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2050
+ requested: "api_key" | "auto" | "subscription";
2051
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2052
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1556
2053
  networkScope: "selected_harness_only";
1557
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1558
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2054
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2055
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1559
2056
  mayConsumeQuota: boolean;
1560
2057
  generatedAt: string;
1561
2058
  };
1562
2059
  state: "interrupted_unknown";
2060
+ startedAt: string;
1563
2061
  interruptedAt: string;
1564
2062
  } | undefined;
1565
- authorization?: {
1566
- args: string[];
1567
- commandDigest: string;
2063
+ execution?: {
1568
2064
  executionId: string;
2065
+ commandDigest: string;
1569
2066
  manifestDigest: string;
2067
+ processGroup: {
2068
+ schemaVersion: 1;
2069
+ pgid: number;
2070
+ leader: {
2071
+ status: "known";
2072
+ pid: number;
2073
+ platform: "darwin" | "linux";
2074
+ source: "proc_pidinfo" | "procfs_stat";
2075
+ startToken: string;
2076
+ processGroupId: number;
2077
+ };
2078
+ };
2079
+ observedAt: string;
2080
+ permitIssuedAt?: string | undefined;
2081
+ } | undefined;
2082
+ authorization?: {
2083
+ executionId: string;
1570
2084
  executable: {
1571
- sha256: string;
1572
- mode: number;
1573
2085
  realpath: string;
2086
+ sha256: string;
1574
2087
  size: number;
2088
+ mode: number;
1575
2089
  device: string;
1576
2090
  inode: string;
1577
2091
  };
2092
+ args: string[];
2093
+ commandDigest: string;
2094
+ manifestDigest: string;
1578
2095
  } | undefined;
1579
2096
  nativeCommand?: {
1580
- commandDigest: string;
1581
- finishedAt: string;
1582
- signal: string | null;
1583
2097
  executionId: string;
2098
+ commandDigest: string;
1584
2099
  manifestDigest: string;
1585
2100
  permitIssuedAt: string | null;
1586
2101
  commandStarted: boolean;
1587
2102
  exitCode: number | null;
1588
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
2103
+ signal: string | null;
2104
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
2105
+ finishedAt: string;
1589
2106
  } | undefined;
1590
2107
  terminationReconciliation?: {
1591
2108
  status: "empty";
@@ -1593,43 +2110,25 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1593
2110
  } | undefined;
1594
2111
  }>;
1595
2112
  reconcileSetupJob: (input: unknown) => Promise<{
1596
- message: string;
1597
- harness: "cursor" | "codex" | "claude";
1598
- startedAt: string | null;
1599
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
1600
- profileId: string | null;
1601
- command: string | null;
1602
- createdAt: string;
1603
2113
  jobId: string;
1604
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
1605
- finishedAt: string | null;
2114
+ harness: "claude" | "codex" | "cursor";
1606
2115
  action: "login";
1607
- guideUrl: string | null;
1608
- execution?: {
1609
- observedAt: string;
1610
- commandDigest: string;
1611
- executionId: string;
1612
- manifestDigest: string;
1613
- processGroup: {
1614
- schemaVersion: 1;
1615
- pgid: number;
1616
- leader: {
1617
- status: "known";
1618
- source: "procfs_stat" | "proc_pidinfo";
1619
- pid: number;
1620
- platform: "linux" | "darwin";
1621
- startToken: string;
1622
- processGroupId: number;
1623
- };
1624
- };
1625
- permitIssuedAt?: string | undefined;
1626
- } | undefined;
2116
+ transport: "client_pty" | "daemon";
2117
+ profileId: string | null;
2118
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
2119
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
2120
+ deadlineAt?: string | undefined;
1627
2121
  outcome?: {
1628
- 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";
1629
- signal?: string | null | undefined;
2122
+ 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";
1630
2123
  exitCode?: number | null | undefined;
2124
+ signal?: string | null | undefined;
1631
2125
  } | undefined;
1632
- deadlineAt?: string | undefined;
2126
+ command: string | null;
2127
+ guideUrl: string | null;
2128
+ message: string;
2129
+ createdAt: string;
2130
+ startedAt: string | null;
2131
+ finishedAt: string | null;
1633
2132
  authCapability?: {
1634
2133
  attemptId: string;
1635
2134
  challengeDigest: string;
@@ -1638,69 +2137,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1638
2137
  schemaVersion: 1;
1639
2138
  protocolVersion: 1;
1640
2139
  harness: string;
1641
- requested: "auto" | "subscription" | "api_key";
1642
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1643
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2140
+ requested: "api_key" | "auto" | "subscription";
2141
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2142
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1644
2143
  networkScope: "selected_harness_only";
1645
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1646
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2144
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2145
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1647
2146
  mayConsumeQuota: boolean;
1648
2147
  generatedAt: string;
1649
2148
  };
1650
2149
  state: "disclosed";
1651
2150
  } | {
1652
2151
  attemptId: string;
1653
- startedAt: string;
1654
2152
  challengeDigest: string;
1655
2153
  requestDigest: string;
1656
2154
  disclosure: {
1657
2155
  schemaVersion: 1;
1658
2156
  protocolVersion: 1;
1659
2157
  harness: string;
1660
- requested: "auto" | "subscription" | "api_key";
1661
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1662
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2158
+ requested: "api_key" | "auto" | "subscription";
2159
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2160
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1663
2161
  networkScope: "selected_harness_only";
1664
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1665
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2162
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2163
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1666
2164
  mayConsumeQuota: boolean;
1667
2165
  generatedAt: string;
1668
2166
  };
1669
2167
  state: "running";
2168
+ startedAt: string;
1670
2169
  } | {
1671
2170
  attemptId: string;
1672
- startedAt: string;
1673
- completedAt: string;
1674
2171
  challengeDigest: string;
1675
2172
  requestDigest: string;
1676
2173
  disclosure: {
1677
2174
  schemaVersion: 1;
1678
2175
  protocolVersion: 1;
1679
2176
  harness: string;
1680
- requested: "auto" | "subscription" | "api_key";
1681
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1682
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2177
+ requested: "api_key" | "auto" | "subscription";
2178
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2179
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1683
2180
  networkScope: "selected_harness_only";
1684
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1685
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2181
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2182
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1686
2183
  mayConsumeQuota: boolean;
1687
2184
  generatedAt: string;
1688
2185
  };
1689
2186
  state: "completed";
2187
+ startedAt: string;
2188
+ completedAt: string;
1690
2189
  receipt: {
1691
- availability: "unknown" | "available" | "unavailable";
1692
- verification: "passed" | "failed" | "not_run";
1693
- harness: string;
1694
- requested: "auto" | "subscription" | "api_key";
1695
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1696
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1697
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1698
2190
  receiptId: string;
1699
2191
  attemptId: string;
1700
- effective: "local" | "vendor_native" | "managed_api_key" | null;
1701
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
1702
- 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";
1703
- costKnowledge: "exact" | "unknown" | "estimated";
2192
+ harness: string;
2193
+ requested: "api_key" | "auto" | "subscription";
2194
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2195
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
2196
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
2197
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
2198
+ 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";
2199
+ availability: "available" | "unavailable" | "unknown";
2200
+ verification: "failed" | "not_run" | "passed";
2201
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2202
+ costKnowledge: "estimated" | "exact" | "unknown";
2203
+ costUsd?: number | undefined;
1704
2204
  startedAt: string;
1705
2205
  completedAt: string;
1706
2206
  challengeDigest: string;
@@ -1710,7 +2210,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1710
2210
  scratchBeforeDigest: string;
1711
2211
  scratchAfterDigest: string;
1712
2212
  stream: {
1713
- aborted: boolean;
1714
2213
  startedEvents: number;
1715
2214
  completedEvents: number;
1716
2215
  errorEvents: number;
@@ -1718,55 +2217,74 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1718
2217
  interactionEvents: number;
1719
2218
  sessionMismatchEvents: number;
1720
2219
  eventsAfterCompleted: number;
2220
+ aborted: boolean;
1721
2221
  };
1722
2222
  evidenceRefs: string[];
1723
- costUsd?: number | undefined;
1724
2223
  };
1725
2224
  } | {
1726
2225
  attemptId: string;
1727
- startedAt: string;
1728
2226
  challengeDigest: string;
1729
2227
  requestDigest: string;
1730
2228
  disclosure: {
1731
2229
  schemaVersion: 1;
1732
2230
  protocolVersion: 1;
1733
2231
  harness: string;
1734
- requested: "auto" | "subscription" | "api_key";
1735
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1736
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2232
+ requested: "api_key" | "auto" | "subscription";
2233
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2234
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1737
2235
  networkScope: "selected_harness_only";
1738
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1739
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2236
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2237
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1740
2238
  mayConsumeQuota: boolean;
1741
2239
  generatedAt: string;
1742
2240
  };
1743
2241
  state: "interrupted_unknown";
2242
+ startedAt: string;
1744
2243
  interruptedAt: string;
1745
2244
  } | undefined;
1746
- authorization?: {
1747
- args: string[];
1748
- commandDigest: string;
2245
+ execution?: {
1749
2246
  executionId: string;
2247
+ commandDigest: string;
1750
2248
  manifestDigest: string;
2249
+ processGroup: {
2250
+ schemaVersion: 1;
2251
+ pgid: number;
2252
+ leader: {
2253
+ status: "known";
2254
+ pid: number;
2255
+ platform: "darwin" | "linux";
2256
+ source: "proc_pidinfo" | "procfs_stat";
2257
+ startToken: string;
2258
+ processGroupId: number;
2259
+ };
2260
+ };
2261
+ observedAt: string;
2262
+ permitIssuedAt?: string | undefined;
2263
+ } | undefined;
2264
+ authorization?: {
2265
+ executionId: string;
1751
2266
  executable: {
1752
- sha256: string;
1753
- mode: number;
1754
2267
  realpath: string;
2268
+ sha256: string;
1755
2269
  size: number;
2270
+ mode: number;
1756
2271
  device: string;
1757
2272
  inode: string;
1758
2273
  };
2274
+ args: string[];
2275
+ commandDigest: string;
2276
+ manifestDigest: string;
1759
2277
  } | undefined;
1760
2278
  nativeCommand?: {
1761
- commandDigest: string;
1762
- finishedAt: string;
1763
- signal: string | null;
1764
2279
  executionId: string;
2280
+ commandDigest: string;
1765
2281
  manifestDigest: string;
1766
2282
  permitIssuedAt: string | null;
1767
2283
  commandStarted: boolean;
1768
2284
  exitCode: number | null;
1769
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
2285
+ signal: string | null;
2286
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
2287
+ finishedAt: string;
1770
2288
  } | undefined;
1771
2289
  terminationReconciliation?: {
1772
2290
  status: "empty";
@@ -1774,43 +2292,25 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1774
2292
  } | undefined;
1775
2293
  }>;
1776
2294
  extendSetupJob: (input: unknown) => Promise<{
1777
- message: string;
1778
- harness: "cursor" | "codex" | "claude";
1779
- startedAt: string | null;
1780
- state: "failed" | "cancelled" | "running" | "interrupted_unknown" | "succeeded" | "queued" | "timed_out" | "waiting_for_input" | "not_supported";
1781
- profileId: string | null;
1782
- command: string | null;
1783
- createdAt: string;
1784
2295
  jobId: string;
1785
- phase: "completed" | "preparing" | "launching" | "awaiting_user" | "verifying" | "cancelling";
1786
- finishedAt: string | null;
2296
+ harness: "claude" | "codex" | "cursor";
1787
2297
  action: "login";
1788
- guideUrl: string | null;
1789
- execution?: {
1790
- observedAt: string;
1791
- commandDigest: string;
1792
- executionId: string;
1793
- manifestDigest: string;
1794
- processGroup: {
1795
- schemaVersion: 1;
1796
- pgid: number;
1797
- leader: {
1798
- status: "known";
1799
- source: "procfs_stat" | "proc_pidinfo";
1800
- pid: number;
1801
- platform: "linux" | "darwin";
1802
- startToken: string;
1803
- processGroupId: number;
1804
- };
1805
- };
1806
- permitIssuedAt?: string | undefined;
1807
- } | undefined;
2298
+ transport: "client_pty" | "daemon";
2299
+ profileId: string | null;
2300
+ state: "cancelled" | "failed" | "interrupted_unknown" | "not_supported" | "queued" | "running" | "succeeded" | "timed_out" | "waiting_for_input";
2301
+ phase: "awaiting_user" | "cancelling" | "completed" | "launching" | "preparing" | "verifying";
2302
+ deadlineAt?: string | undefined;
1808
2303
  outcome?: {
1809
- 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";
1810
- signal?: string | null | undefined;
2304
+ 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";
1811
2305
  exitCode?: number | null | undefined;
2306
+ signal?: string | null | undefined;
1812
2307
  } | undefined;
1813
- deadlineAt?: string | undefined;
2308
+ command: string | null;
2309
+ guideUrl: string | null;
2310
+ message: string;
2311
+ createdAt: string;
2312
+ startedAt: string | null;
2313
+ finishedAt: string | null;
1814
2314
  authCapability?: {
1815
2315
  attemptId: string;
1816
2316
  challengeDigest: string;
@@ -1819,69 +2319,70 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1819
2319
  schemaVersion: 1;
1820
2320
  protocolVersion: 1;
1821
2321
  harness: string;
1822
- requested: "auto" | "subscription" | "api_key";
1823
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1824
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2322
+ requested: "api_key" | "auto" | "subscription";
2323
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2324
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1825
2325
  networkScope: "selected_harness_only";
1826
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1827
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2326
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2327
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1828
2328
  mayConsumeQuota: boolean;
1829
2329
  generatedAt: string;
1830
2330
  };
1831
2331
  state: "disclosed";
1832
2332
  } | {
1833
2333
  attemptId: string;
1834
- startedAt: string;
1835
2334
  challengeDigest: string;
1836
2335
  requestDigest: string;
1837
2336
  disclosure: {
1838
2337
  schemaVersion: 1;
1839
2338
  protocolVersion: 1;
1840
2339
  harness: string;
1841
- requested: "auto" | "subscription" | "api_key";
1842
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1843
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2340
+ requested: "api_key" | "auto" | "subscription";
2341
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2342
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1844
2343
  networkScope: "selected_harness_only";
1845
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1846
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2344
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2345
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1847
2346
  mayConsumeQuota: boolean;
1848
2347
  generatedAt: string;
1849
2348
  };
1850
2349
  state: "running";
2350
+ startedAt: string;
1851
2351
  } | {
1852
2352
  attemptId: string;
1853
- startedAt: string;
1854
- completedAt: string;
1855
2353
  challengeDigest: string;
1856
2354
  requestDigest: string;
1857
2355
  disclosure: {
1858
2356
  schemaVersion: 1;
1859
2357
  protocolVersion: 1;
1860
2358
  harness: string;
1861
- requested: "auto" | "subscription" | "api_key";
1862
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1863
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2359
+ requested: "api_key" | "auto" | "subscription";
2360
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2361
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1864
2362
  networkScope: "selected_harness_only";
1865
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1866
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2363
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2364
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1867
2365
  mayConsumeQuota: boolean;
1868
2366
  generatedAt: string;
1869
2367
  };
1870
2368
  state: "completed";
2369
+ startedAt: string;
2370
+ completedAt: string;
1871
2371
  receipt: {
1872
- availability: "unknown" | "available" | "unavailable";
1873
- verification: "passed" | "failed" | "not_run";
1874
- harness: string;
1875
- requested: "auto" | "subscription" | "api_key";
1876
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1877
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
1878
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1879
2372
  receiptId: string;
1880
2373
  attemptId: string;
1881
- effective: "local" | "vendor_native" | "managed_api_key" | null;
1882
- effectiveSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
1883
- 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";
1884
- costKnowledge: "exact" | "unknown" | "estimated";
2374
+ harness: string;
2375
+ requested: "api_key" | "auto" | "subscription";
2376
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2377
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
2378
+ effective: "local" | "managed_api_key" | "vendor_native" | null;
2379
+ effectiveSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
2380
+ 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";
2381
+ availability: "available" | "unavailable" | "unknown";
2382
+ verification: "failed" | "not_run" | "passed";
2383
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2384
+ costKnowledge: "estimated" | "exact" | "unknown";
2385
+ costUsd?: number | undefined;
1885
2386
  startedAt: string;
1886
2387
  completedAt: string;
1887
2388
  challengeDigest: string;
@@ -1891,7 +2392,6 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1891
2392
  scratchBeforeDigest: string;
1892
2393
  scratchAfterDigest: string;
1893
2394
  stream: {
1894
- aborted: boolean;
1895
2395
  startedEvents: number;
1896
2396
  completedEvents: number;
1897
2397
  errorEvents: number;
@@ -1899,55 +2399,74 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1899
2399
  interactionEvents: number;
1900
2400
  sessionMismatchEvents: number;
1901
2401
  eventsAfterCompleted: number;
2402
+ aborted: boolean;
1902
2403
  };
1903
2404
  evidenceRefs: string[];
1904
- costUsd?: number | undefined;
1905
2405
  };
1906
2406
  } | {
1907
2407
  attemptId: string;
1908
- startedAt: string;
1909
2408
  challengeDigest: string;
1910
2409
  requestDigest: string;
1911
2410
  disclosure: {
1912
2411
  schemaVersion: 1;
1913
2412
  protocolVersion: 1;
1914
2413
  harness: string;
1915
- requested: "auto" | "subscription" | "api_key";
1916
- requiredRoute: "local" | "vendor_native" | "managed_api_key";
1917
- requiredSource: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
2414
+ requested: "api_key" | "auto" | "subscription";
2415
+ requiredRoute: "local" | "managed_api_key" | "vendor_native";
2416
+ requiredSource: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
1918
2417
  networkScope: "selected_harness_only";
1919
- billingKnowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1920
- incrementalCostKnowledge: "exact" | "unknown" | "estimated";
2418
+ billingKnowledge: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2419
+ incrementalCostKnowledge: "estimated" | "exact" | "unknown";
1921
2420
  mayConsumeQuota: boolean;
1922
2421
  generatedAt: string;
1923
2422
  };
1924
2423
  state: "interrupted_unknown";
2424
+ startedAt: string;
1925
2425
  interruptedAt: string;
1926
2426
  } | undefined;
1927
- authorization?: {
1928
- args: string[];
1929
- commandDigest: string;
2427
+ execution?: {
1930
2428
  executionId: string;
2429
+ commandDigest: string;
1931
2430
  manifestDigest: string;
2431
+ processGroup: {
2432
+ schemaVersion: 1;
2433
+ pgid: number;
2434
+ leader: {
2435
+ status: "known";
2436
+ pid: number;
2437
+ platform: "darwin" | "linux";
2438
+ source: "proc_pidinfo" | "procfs_stat";
2439
+ startToken: string;
2440
+ processGroupId: number;
2441
+ };
2442
+ };
2443
+ observedAt: string;
2444
+ permitIssuedAt?: string | undefined;
2445
+ } | undefined;
2446
+ authorization?: {
2447
+ executionId: string;
1932
2448
  executable: {
1933
- sha256: string;
1934
- mode: number;
1935
2449
  realpath: string;
2450
+ sha256: string;
1936
2451
  size: number;
2452
+ mode: number;
1937
2453
  device: string;
1938
2454
  inode: string;
1939
2455
  };
2456
+ args: string[];
2457
+ commandDigest: string;
2458
+ manifestDigest: string;
1940
2459
  } | undefined;
1941
2460
  nativeCommand?: {
1942
- commandDigest: string;
1943
- finishedAt: string;
1944
- signal: string | null;
1945
2461
  executionId: string;
2462
+ commandDigest: string;
1946
2463
  manifestDigest: string;
1947
2464
  permitIssuedAt: string | null;
1948
2465
  commandStarted: boolean;
1949
2466
  exitCode: number | null;
1950
- errorCode?: "permit_timeout" | "spawn_failed" | "device_auth_unsupported" | undefined;
2467
+ signal: string | null;
2468
+ errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
2469
+ finishedAt: string;
1951
2470
  } | undefined;
1952
2471
  terminationReconciliation?: {
1953
2472
  status: "empty";
@@ -1955,98 +2474,98 @@ export declare function controlServices(interactions: InteractionRegistry, proje
1955
2474
  } | undefined;
1956
2475
  }>;
1957
2476
  journalEvents: (partition: string, afterCursor?: string) => Promise<{
1958
- type: string;
1959
- cursor: string;
1960
- observedAt: string;
1961
2477
  schemaVersion: 1;
2478
+ cursor: string;
1962
2479
  partition: string;
2480
+ type: string;
2481
+ observedAt: string;
1963
2482
  payload?: unknown;
1964
2483
  }[]>;
1965
2484
  recoveryInspectPartition: (partition: string) => Promise<{
1966
- status: "ready" | "recovery_required";
1967
- observedAt: string;
1968
2485
  schemaVersion: 1;
1969
- evidenceRefs: string[];
2486
+ partition: string;
2487
+ generation: number;
2488
+ status: "ready" | "recovery_required";
1970
2489
  recovery: {
1971
2490
  status: "ready";
1972
2491
  discardedTailBytes: number;
1973
2492
  } | {
1974
2493
  status: "recovery_required";
1975
- reason: string;
1976
2494
  location: {
1977
2495
  kind: "byte";
1978
2496
  byteOffset: number;
1979
2497
  } | {
1980
2498
  kind: "cursor";
1981
- seq: number;
1982
2499
  epoch: string;
2500
+ seq: number;
1983
2501
  };
2502
+ reason: string;
1984
2503
  discardedTailBytes: number;
1985
2504
  };
1986
- partition: string;
1987
- generation: number;
1988
2505
  fingerprint: string;
2506
+ observedAt: string;
2507
+ evidenceRefs: string[];
1989
2508
  }>;
1990
2509
  recoveryValidatePartition: (partition: string) => Promise<{
1991
- status: "ready" | "recovery_required";
1992
- observedAt: string;
1993
2510
  schemaVersion: 1;
1994
- evidenceRefs: string[];
2511
+ partition: string;
2512
+ generation: number;
2513
+ status: "ready" | "recovery_required";
1995
2514
  recovery: {
1996
2515
  status: "ready";
1997
2516
  discardedTailBytes: number;
1998
2517
  } | {
1999
2518
  status: "recovery_required";
2000
- reason: string;
2001
2519
  location: {
2002
2520
  kind: "byte";
2003
2521
  byteOffset: number;
2004
2522
  } | {
2005
2523
  kind: "cursor";
2006
- seq: number;
2007
2524
  epoch: string;
2525
+ seq: number;
2008
2526
  };
2527
+ reason: string;
2009
2528
  discardedTailBytes: number;
2010
2529
  };
2011
- partition: string;
2012
- generation: number;
2013
2530
  fingerprint: string;
2531
+ observedAt: string;
2532
+ evidenceRefs: string[];
2014
2533
  projectionStatus: {
2015
- status: "valid" | "invalid";
2016
- detail: string | null;
2017
2534
  name: string;
2535
+ status: "invalid" | "valid";
2536
+ detail: string | null;
2018
2537
  }[];
2019
2538
  }>;
2020
2539
  recoveryExportPartition: (partition: string) => Promise<{
2021
2540
  schemaVersion: 1;
2022
- createdAt: string;
2541
+ exportId: string;
2023
2542
  partition: string;
2024
2543
  fingerprint: string;
2025
- exportId: string;
2026
2544
  bundlePath: string;
2027
2545
  manifestSha256: string;
2546
+ createdAt: string;
2028
2547
  }>;
2029
2548
  recoveryQuarantinePartition: (partition: string, input: unknown) => Promise<{
2030
2549
  schemaVersion: 1;
2031
- completedAt: string;
2032
- partition: string;
2033
2550
  operationId: string;
2551
+ partition: string;
2034
2552
  previousFingerprint: string;
2035
2553
  quarantineArtifactId: string;
2036
2554
  quarantinePath: string;
2037
2555
  newEpoch: string;
2556
+ completedAt: string;
2038
2557
  } | null>;
2039
2558
  settings: () => Promise<{
2040
2559
  sources: string[];
2041
- interactionTimeoutMs: number;
2560
+ interactionTimeoutMs: number | null;
2042
2561
  routing: {
2043
2562
  primaryHarness: string | null;
2044
2563
  eligibleHarnesses: string[];
2045
- envInheritance: "mirror_native" | "clean";
2564
+ envInheritance: "clean" | "mirror_native";
2046
2565
  authPreference: "api_key" | "auto" | "subscription";
2047
- goal: "auto" | "quality" | "economy";
2048
- paidFallback: "never" | "when_unavailable" | "allowed_within_cap";
2049
- qualityTiers: Partial<Record<"plan" | "review" | "synthesize" | "spec" | "implement" | "create_from_scratch" | "repair" | "verify" | "explain" | "audit", {
2566
+ goal: "auto" | "economy" | "quality";
2567
+ paidFallback: "allowed_within_cap" | "never" | "when_unavailable";
2568
+ qualityTiers: Partial<Record<"audit" | "create_from_scratch" | "explain" | "implement" | "plan" | "repair" | "review" | "spec" | "synthesize" | "verify", {
2050
2569
  harness: string;
2051
2570
  model: string;
2052
2571
  effort: string;
@@ -2080,18 +2599,17 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2080
2599
  toolsAllow: string[];
2081
2600
  toolsDeny: string[];
2082
2601
  fallbackModel: string | null;
2083
- web: "auto" | "off" | "cached" | "live";
2602
+ web: "auto" | "cached" | "live" | "off";
2084
2603
  authPreference: "api_key" | "auto" | "subscription";
2085
- profileLimitAction: "fail" | "ask" | "rotate";
2604
+ profileLimitAction: "ask" | "fail" | "rotate";
2086
2605
  };
2087
2606
  };
2088
2607
  }>;
2089
2608
  quota: () => Promise<{
2090
2609
  snapshots: {
2091
- source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry" | "claude_oauth_usage";
2092
2610
  subject: {
2093
2611
  harness: string;
2094
- credential_route: "local" | "vendor_native" | "managed_api_key";
2612
+ credential_route: "local" | "managed_api_key" | "vendor_native";
2095
2613
  plan_label: string | null;
2096
2614
  subject_id: string | null;
2097
2615
  };
@@ -2103,28 +2621,28 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2103
2621
  resets_at: string | null;
2104
2622
  cooldown_until: string | null;
2105
2623
  }[];
2624
+ source: "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
2106
2625
  observed_at: string;
2107
- freshness: "unknown" | "fresh" | "stale";
2626
+ freshness: "fresh" | "stale" | "unknown";
2108
2627
  }[];
2109
2628
  absences: {
2110
- detail: string | null;
2111
- reason: "not_logged_in" | "transport_unavailable" | "platform_unsupported" | "refresh_failed" | "no_source";
2112
2629
  subject: {
2113
2630
  harness: string;
2114
- credential_route: "local" | "vendor_native" | "managed_api_key";
2631
+ credential_route: "local" | "managed_api_key" | "vendor_native";
2115
2632
  plan_label: string | null;
2116
2633
  subject_id: string | null;
2117
2634
  };
2635
+ reason: "no_source" | "not_logged_in" | "platform_unsupported" | "refresh_failed" | "transport_unavailable";
2636
+ detail: string | null;
2118
2637
  observed_at: string;
2119
2638
  }[];
2120
2639
  refreshed_at: string | null;
2121
2640
  }>;
2122
2641
  refreshQuota: () => Promise<{
2123
2642
  snapshots: {
2124
- source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry" | "claude_oauth_usage";
2125
2643
  subject: {
2126
2644
  harness: string;
2127
- credential_route: "local" | "vendor_native" | "managed_api_key";
2645
+ credential_route: "local" | "managed_api_key" | "vendor_native";
2128
2646
  plan_label: string | null;
2129
2647
  subject_id: string | null;
2130
2648
  };
@@ -2136,23 +2654,26 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2136
2654
  resets_at: string | null;
2137
2655
  cooldown_until: string | null;
2138
2656
  }[];
2657
+ source: "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
2139
2658
  observed_at: string;
2140
- freshness: "unknown" | "fresh" | "stale";
2659
+ freshness: "fresh" | "stale" | "unknown";
2141
2660
  }[];
2142
2661
  absences: {
2143
- detail: string | null;
2144
- reason: "not_logged_in" | "transport_unavailable" | "platform_unsupported" | "refresh_failed" | "no_source";
2145
2662
  subject: {
2146
2663
  harness: string;
2147
- credential_route: "local" | "vendor_native" | "managed_api_key";
2664
+ credential_route: "local" | "managed_api_key" | "vendor_native";
2148
2665
  plan_label: string | null;
2149
2666
  subject_id: string | null;
2150
2667
  };
2668
+ reason: "no_source" | "not_logged_in" | "platform_unsupported" | "refresh_failed" | "transport_unavailable";
2669
+ detail: string | null;
2151
2670
  observed_at: string;
2152
2671
  }[];
2153
2672
  refreshed_at: string | null;
2154
2673
  }>;
2155
- credentialProfiles: () => Promise<{
2674
+ credentialProfiles: (input?: {
2675
+ snapshot?: boolean;
2676
+ }) => Promise<{
2156
2677
  profiles: {
2157
2678
  profile: {
2158
2679
  profile_id: string;
@@ -2165,16 +2686,16 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2165
2686
  created_at: string | null;
2166
2687
  };
2167
2688
  status: {
2168
- availability: "unknown" | "available" | "unavailable";
2169
- verification: "passed" | "failed" | "not_run";
2170
2689
  profile_id: string;
2171
2690
  harness_id: string;
2172
- last_verified_at: string | null;
2691
+ availability: "available" | "unavailable" | "unknown";
2692
+ verification: "failed" | "not_run" | "passed";
2173
2693
  detail?: string | undefined;
2694
+ last_verified_at: string | null;
2174
2695
  };
2175
2696
  identity: {
2176
- plan?: string | undefined;
2177
2697
  email?: string | undefined;
2698
+ plan?: string | undefined;
2178
2699
  } | null;
2179
2700
  }[];
2180
2701
  harnessAccounts: {
@@ -2182,14 +2703,133 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2182
2703
  native_credentials_enabled: boolean;
2183
2704
  native_login_detected: boolean;
2184
2705
  identity: {
2706
+ email?: string | undefined;
2707
+ plan?: string | undefined;
2708
+ } | null;
2709
+ next_up: {
2710
+ kind: "profile";
2711
+ profileId: string;
2712
+ } | {
2713
+ kind: "native";
2714
+ route?: "api_key" | "local_session" | undefined;
2715
+ } | {
2716
+ kind: "none";
2717
+ reason: string;
2718
+ };
2719
+ }[];
2720
+ harnesses: {
2721
+ id: string;
2722
+ available: boolean;
2723
+ status: "ok" | "degraded" | "unavailable";
2724
+ manifest: import("@claudexor/schema").HarnessManifest | null;
2725
+ enabledIntents: import("@claudexor/schema").Intent[];
2726
+ routableIntents: import("@claudexor/schema").Intent[];
2727
+ disabledIntents: import("@claudexor/schema").Intent[];
2728
+ checks: import("@claudexor/schema").ConformanceCheck[];
2729
+ reasons: string[];
2730
+ authSources: import("@claudexor/schema").AuthSourceReadiness[];
2731
+ configuredModel: string | null;
2732
+ configuredModelCheck: {
2733
+ status: "ok" | "rejected";
2734
+ message?: string | null;
2735
+ } | null;
2736
+ delegation: {
2737
+ available: boolean;
2738
+ reason: "manifest_unsupported" | "ready" | "runtime_unavailable";
2739
+ remediation: string | null;
2740
+ requiresFullAccess: boolean;
2741
+ };
2742
+ readiness: {
2743
+ id: string;
2744
+ kind: "auth" | "binary" | "model" | "probe" | "smoke";
2745
+ title: string;
2746
+ status: "fail" | "pass" | "skip";
2747
+ detail: string | null;
2748
+ }[];
2749
+ }[];
2750
+ git: {
2751
+ status: "available" | "developer_tools_stub" | "failed" | "missing";
2752
+ version: string | null;
2753
+ detail: string | null;
2754
+ remediation: string | null;
2755
+ };
2756
+ quota: {
2757
+ snapshots: {
2758
+ subject: {
2759
+ harness: string;
2760
+ credential_route: "local" | "managed_api_key" | "vendor_native";
2761
+ plan_label: string | null;
2762
+ subject_id: string | null;
2763
+ };
2764
+ constraints: {
2765
+ id: string;
2766
+ label: string;
2767
+ used_ratio: number | null;
2768
+ window_seconds: number | null;
2769
+ resets_at: string | null;
2770
+ cooldown_until: string | null;
2771
+ }[];
2772
+ source: "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
2773
+ observed_at: string;
2774
+ freshness: "fresh" | "stale" | "unknown";
2775
+ }[];
2776
+ absences: {
2777
+ subject: {
2778
+ harness: string;
2779
+ credential_route: "local" | "managed_api_key" | "vendor_native";
2780
+ plan_label: string | null;
2781
+ subject_id: string | null;
2782
+ };
2783
+ reason: "no_source" | "not_logged_in" | "platform_unsupported" | "refresh_failed" | "transport_unavailable";
2784
+ detail: string | null;
2785
+ observed_at: string;
2786
+ }[];
2787
+ refreshed_at: string | null;
2788
+ };
2789
+ quotaEventCursor: string;
2790
+ } | {
2791
+ harnesses?: undefined;
2792
+ git?: undefined;
2793
+ quota?: undefined;
2794
+ quotaEventCursor?: undefined;
2795
+ profiles: {
2796
+ profile: {
2797
+ profile_id: string;
2798
+ harness_id: string;
2799
+ display_name: string;
2800
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
2801
+ isolation_locator: string | null;
2802
+ secret_ref: string | null;
2803
+ enabled: boolean;
2804
+ created_at: string | null;
2805
+ };
2806
+ status: {
2807
+ profile_id: string;
2808
+ harness_id: string;
2809
+ availability: "available" | "unavailable" | "unknown";
2810
+ verification: "failed" | "not_run" | "passed";
2811
+ detail?: string | undefined;
2812
+ last_verified_at: string | null;
2813
+ };
2814
+ identity: {
2815
+ email?: string | undefined;
2185
2816
  plan?: string | undefined;
2817
+ } | null;
2818
+ }[];
2819
+ harnessAccounts: {
2820
+ harness_id: string;
2821
+ native_credentials_enabled: boolean;
2822
+ native_login_detected: boolean;
2823
+ identity: {
2186
2824
  email?: string | undefined;
2825
+ plan?: string | undefined;
2187
2826
  } | null;
2188
2827
  next_up: {
2189
2828
  kind: "profile";
2190
2829
  profileId: string;
2191
2830
  } | {
2192
2831
  kind: "native";
2832
+ route?: "api_key" | "local_session" | undefined;
2193
2833
  } | {
2194
2834
  kind: "none";
2195
2835
  reason: string;
@@ -2208,16 +2848,15 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2208
2848
  created_at: string | null;
2209
2849
  };
2210
2850
  status: {
2211
- availability: "unknown" | "available" | "unavailable";
2212
- verification: "passed" | "failed" | "not_run";
2213
2851
  profile_id: string;
2214
2852
  harness_id: string;
2215
- last_verified_at: string | null;
2853
+ availability: "available" | "unavailable" | "unknown";
2854
+ verification: "failed" | "not_run" | "passed";
2216
2855
  detail?: string | undefined;
2856
+ last_verified_at: string | null;
2217
2857
  };
2218
2858
  }>;
2219
2859
  deleteCredentialProfile: (input: unknown) => Promise<{
2220
- cleanupWarning?: string | undefined;
2221
2860
  profile: {
2222
2861
  profile_id: string;
2223
2862
  harness_id: string;
@@ -2229,7 +2868,8 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2229
2868
  created_at: string | null;
2230
2869
  };
2231
2870
  removed: boolean;
2232
- credentialCleanup: "none" | "config_dir_removed" | "secret_deleted";
2871
+ credentialCleanup: "config_dir_removed" | "none" | "secret_deleted";
2872
+ cleanupWarning?: string | undefined;
2233
2873
  }>;
2234
2874
  createCredentialProfile: (input: unknown) => Promise<{
2235
2875
  profile: {
@@ -2243,25 +2883,25 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2243
2883
  created_at: string | null;
2244
2884
  };
2245
2885
  status: {
2246
- availability: "unknown" | "available" | "unavailable";
2247
- verification: "passed" | "failed" | "not_run";
2248
2886
  profile_id: string;
2249
2887
  harness_id: string;
2250
- last_verified_at: string | null;
2888
+ availability: "available" | "unavailable" | "unknown";
2889
+ verification: "failed" | "not_run" | "passed";
2251
2890
  detail?: string | undefined;
2891
+ last_verified_at: string | null;
2252
2892
  };
2253
2893
  }>;
2254
2894
  updateSettings: (patch: unknown) => Promise<{
2255
2895
  sources: string[];
2256
- interactionTimeoutMs: number;
2896
+ interactionTimeoutMs: number | null;
2257
2897
  routing: {
2258
2898
  primaryHarness: string | null;
2259
2899
  eligibleHarnesses: string[];
2260
- envInheritance: "mirror_native" | "clean";
2900
+ envInheritance: "clean" | "mirror_native";
2261
2901
  authPreference: "api_key" | "auto" | "subscription";
2262
- goal: "auto" | "quality" | "economy";
2263
- paidFallback: "never" | "when_unavailable" | "allowed_within_cap";
2264
- qualityTiers: Partial<Record<"plan" | "review" | "synthesize" | "spec" | "implement" | "create_from_scratch" | "repair" | "verify" | "explain" | "audit", {
2902
+ goal: "auto" | "economy" | "quality";
2903
+ paidFallback: "allowed_within_cap" | "never" | "when_unavailable";
2904
+ qualityTiers: Partial<Record<"audit" | "create_from_scratch" | "explain" | "implement" | "plan" | "repair" | "review" | "spec" | "synthesize" | "verify", {
2265
2905
  harness: string;
2266
2906
  model: string;
2267
2907
  effort: string;
@@ -2295,9 +2935,9 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2295
2935
  toolsAllow: string[];
2296
2936
  toolsDeny: string[];
2297
2937
  fallbackModel: string | null;
2298
- web: "auto" | "off" | "cached" | "live";
2938
+ web: "auto" | "cached" | "live" | "off";
2299
2939
  authPreference: "api_key" | "auto" | "subscription";
2300
- profileLimitAction: "fail" | "ask" | "rotate";
2940
+ profileLimitAction: "ask" | "fail" | "rotate";
2301
2941
  };
2302
2942
  };
2303
2943
  }>;
@@ -2310,10 +2950,10 @@ export declare function controlServices(interactions: InteractionRegistry, proje
2310
2950
  }[];
2311
2951
  }>;
2312
2952
  setSecret: (input: unknown) => Promise<{
2313
- warning?: string | undefined;
2314
2953
  name: string;
2315
2954
  backend: "file";
2316
2955
  stored: boolean;
2956
+ warning?: string | undefined;
2317
2957
  }>;
2318
2958
  deleteSecret: (name: string) => Promise<{
2319
2959
  name: string;