@claudexor/cli 3.1.2 → 3.2.0

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