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