@xenosystem/agent-interface-contract 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,67 @@
1
+ XENO Agent — Proprietary Software License
2
+ Copyright © 2026 XENO Corporation. All rights reserved.
3
+
4
+ This software, including its source code, compiled binaries, published packages,
5
+ assets, and accompanying documentation (collectively, the "Software"), is the
6
+ proprietary and confidential property of XENO Corporation ("XENO"). The Software
7
+ is licensed for use, not sold, and no title to or ownership of the Software is
8
+ transferred to any user.
9
+
10
+ 1. GRANT OF USE
11
+ Subject to a separate written agreement and/or the terms of service published
12
+ at https://xenostudio.ai, XENO grants the end user a limited, non-exclusive,
13
+ non-transferable, revocable license to install and use the Software for its
14
+ intended purpose. The standalone desktop application ("the Agent") may be used
15
+ locally at no charge; connected platform features — hosted agent runs, model
16
+ inference, credits, and account services — are governed by the applicable
17
+ subscription and the XENO terms of service.
18
+
19
+ 2. PACKAGE DISTRIBUTION
20
+ The `@xeno-corporation/xeno-agent-interface-*` and
21
+ `@xeno-corporation/xeno-agents-client` packages are published to a PRIVATE
22
+ registry and are licensed for use solely by XENO products and by parties
23
+ holding a separate written agreement with XENO. Access credentials to that
24
+ registry do not grant redistribution rights. Publication of any package in
25
+ this repository to a public registry is prohibited without written
26
+ authorization from XENO.
27
+
28
+ 3. RESTRICTIONS
29
+ Except to the extent expressly permitted by applicable law or by a separate
30
+ written agreement with XENO, you may NOT: (a) copy, redistribute, sell, rent,
31
+ lease, sublicense, or otherwise transfer the Software; (b) modify, adapt,
32
+ translate, or create derivative works of the Software; (c) reverse-engineer,
33
+ decompile, or disassemble the Software, or attempt to derive its source code;
34
+ (d) remove, obscure, or alter any proprietary notices; or (e) use the Software
35
+ to build a competing product.
36
+
37
+ 4. RESERVATION OF RIGHTS
38
+ All rights not expressly granted are reserved by XENO Corporation. The Software
39
+ is protected by copyright and other intellectual-property laws and treaties.
40
+
41
+ 5. DISCLAIMER OF WARRANTY
42
+ THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF ANY
43
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE
45
+ SOFTWARE EXECUTES AGENT-DIRECTED OPERATIONS AGAINST A USER-SELECTED WORKSPACE,
46
+ INCLUDING FILE AND PROCESS ACTIONS; THE USER IS RESPONSIBLE FOR THE WORKSPACES
47
+ AND PERMISSIONS THEY GRANT IT.
48
+
49
+ 6. LIMITATION OF LIABILITY
50
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL XENO CORPORATION BE
51
+ LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE
52
+ DAMAGES, OR ANY LOSS OF PROFITS OR DATA, ARISING FROM OR RELATED TO THE USE OF
53
+ OR INABILITY TO USE THE SOFTWARE.
54
+
55
+ 7. THIRD-PARTY COMPONENTS
56
+ The Software includes third-party open-source components, each licensed under
57
+ its own terms; those terms govern those components and are not superseded by
58
+ this license. It also composes third-party agent providers over the Agent
59
+ Client Protocol and hosted APIs; use of those providers is governed by their
60
+ own terms.
61
+
62
+ For licensing inquiries, contact: legal@xenostudio.ai
63
+
64
+ NOTE TO OPERATOR: confirm the exact legal entity name and notice/contact details
65
+ with counsel before public distribution and code-signing (the code-signing
66
+ publisher name must match the registered entity). No public distribution of this
67
+ product is authorized by this file — see docs/PRODUCT_STATUS.md.
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Type-only projection of the hosted XENO Agents API run contract used by
3
+ * presentation bridges. Execution and network authority remain in the host.
4
+ *
5
+ * These declarations are copied from XENO Hub's canonical portable
6
+ * `shared/xeno-agents-client.ts` contract; the renderer receives only the
7
+ * public records, never the authenticated client implementation.
8
+ */
9
+ export declare const XENO_AGENTS_SCHEMA_VERSION: 1;
10
+ export type AgentCloudRunStatus = 'queued' | 'starting' | 'running' | 'blocked' | 'waiting_for_user' | 'waiting_for_tool' | 'waiting_for_hook' | 'waiting_for_permission' | 'paused' | 'completed' | 'failed' | 'skipped' | 'cancelled' | 'interrupted' | 'detached';
11
+ export type AgentCloudPermissionMode = 'default' | 'plan' | 'acceptEdits' | 'auto' | 'dontAsk' | 'bypassPermissions';
12
+ export type AgentCloudEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
13
+ export interface AgentCloudRunUsage {
14
+ input: number;
15
+ output: number;
16
+ total: number;
17
+ estimatedCostUsd?: number;
18
+ }
19
+ export interface AgentCloudRunGit {
20
+ branch?: string;
21
+ baseRef?: string;
22
+ commit?: string;
23
+ }
24
+ export interface AgentCloudAgentRef {
25
+ name?: string;
26
+ scope?: string;
27
+ path?: string;
28
+ description?: string;
29
+ model?: string;
30
+ }
31
+ export interface AgentRunRecord {
32
+ schemaVersion: typeof XENO_AGENTS_SCHEMA_VERSION;
33
+ runId: string;
34
+ sessionId: string;
35
+ rootRunId: string;
36
+ parentRunId?: string;
37
+ workspaceId: string;
38
+ prompt: string;
39
+ title?: string;
40
+ status: AgentCloudRunStatus;
41
+ statusReason?: string;
42
+ blockedReason?: string;
43
+ model: string;
44
+ effort?: AgentCloudEffort;
45
+ agent?: AgentCloudAgentRef;
46
+ permissionMode: AgentCloudPermissionMode;
47
+ createdAt: string;
48
+ updatedAt: string;
49
+ startedAt?: string;
50
+ endedAt?: string;
51
+ lastActivityAt?: string;
52
+ exitCode?: number;
53
+ git?: AgentCloudRunGit;
54
+ usage: AgentCloudRunUsage;
55
+ children: string[];
56
+ tags: string[];
57
+ creditsHeld?: number;
58
+ creditsSettled?: number;
59
+ url: string;
60
+ }
61
+ export interface RunListItem {
62
+ runId: string;
63
+ status: AgentCloudRunStatus;
64
+ url: string;
65
+ createdAt: string;
66
+ model: string;
67
+ promptPreview: string;
68
+ }
69
+ //# sourceMappingURL=cloudRuns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudRuns.d.ts","sourceRoot":"","sources":["../src/cloudRuns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,0BAA0B,EAAG,CAAU,CAAA;AAEpD,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,UAAU,GACV,SAAS,GACT,SAAS,GACT,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,wBAAwB,GACxB,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,SAAS,GACT,WAAW,GACX,aAAa,GACb,UAAU,CAAA;AAEd,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,MAAM,GACN,aAAa,GACb,MAAM,GACN,SAAS,GACT,mBAAmB,CAAA;AAEvB,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;AAE1E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,0BAA0B,CAAA;IAChD,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,mBAAmB,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,gBAAgB,CAAA;IACzB,KAAK,CAAC,EAAE,kBAAkB,CAAA;IAC1B,cAAc,EAAE,wBAAwB,CAAA;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,KAAK,EAAE,kBAAkB,CAAA;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,mBAAmB,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;CACtB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Type-only projection of the hosted XENO Agents API run contract used by
3
+ * presentation bridges. Execution and network authority remain in the host.
4
+ *
5
+ * These declarations are copied from XENO Hub's canonical portable
6
+ * `shared/xeno-agents-client.ts` contract; the renderer receives only the
7
+ * public records, never the authenticated client implementation.
8
+ */
9
+ export const XENO_AGENTS_SCHEMA_VERSION = 1;
10
+ //# sourceMappingURL=cloudRuns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudRuns.js","sourceRoot":"","sources":["../src/cloudRuns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAU,CAAA"}
@@ -0,0 +1,513 @@
1
+ export interface EngineeringRequestBase {
2
+ rootDirectory: string;
3
+ allowedDirectories?: string[] | undefined;
4
+ }
5
+ export interface GitFileStatus {
6
+ path: string;
7
+ relativePath: string;
8
+ status: string;
9
+ indexStatus: string;
10
+ workTreeStatus: string;
11
+ renamedFrom?: string | undefined;
12
+ additions?: number | undefined;
13
+ deletions?: number | undefined;
14
+ }
15
+ export interface GitStatusResponse {
16
+ success: boolean;
17
+ isGitRepo: boolean;
18
+ rootDirectory: string;
19
+ branch?: string | undefined;
20
+ upstream?: string | undefined;
21
+ ahead?: number | undefined;
22
+ behind?: number | undefined;
23
+ clean: boolean;
24
+ files: GitFileStatus[];
25
+ raw?: string | undefined;
26
+ error?: string | undefined;
27
+ }
28
+ export interface GitDiffRequest extends EngineeringRequestBase {
29
+ paths?: string[] | undefined;
30
+ staged?: boolean | undefined;
31
+ maxBytes?: number | undefined;
32
+ }
33
+ export interface GitDiffResponse {
34
+ success: boolean;
35
+ isGitRepo: boolean;
36
+ rootDirectory: string;
37
+ diff: string;
38
+ truncated: boolean;
39
+ error?: string | undefined;
40
+ }
41
+ export interface GitStageRequest extends EngineeringRequestBase {
42
+ paths: string[];
43
+ }
44
+ export interface GitCommitRequest extends EngineeringRequestBase {
45
+ message: string;
46
+ }
47
+ /**
48
+ * Create or switch to a branch — §5.7's git surface.
49
+ *
50
+ * Local and reversible, unlike everything else added alongside it, which is why
51
+ * it needs no confirmation of its own.
52
+ */
53
+ export interface GitBranchRequest extends EngineeringRequestBase {
54
+ name: string;
55
+ /** Create it if absent. False switches to an existing branch and fails if it
56
+ * does not exist, rather than quietly creating one with a mistyped name. */
57
+ create?: boolean | undefined;
58
+ /** What to branch FROM. Absent means the current HEAD. */
59
+ startPoint?: string | undefined;
60
+ }
61
+ /**
62
+ * Push a branch to a remote.
63
+ *
64
+ * 🔴 **Outward-facing.** This is the first verb in the engineering surface whose
65
+ * effect leaves the machine, so it carries `confirmed`. That flag is not a UI
66
+ * concern smuggled into the protocol: the host cannot otherwise distinguish an
67
+ * agent deciding to publish from a human asking it to, and those are different
68
+ * acts. Absent or false, the host refuses and says so.
69
+ *
70
+ * There is deliberately no `force`. A force-push destroys history that other
71
+ * people may already have, it is unrecoverable, and every XENO repo rule already
72
+ * forbids it — so the safest implementation is one that cannot express it.
73
+ */
74
+ export interface GitPushRequest extends EngineeringRequestBase {
75
+ remote?: string | undefined;
76
+ /** Absent means the current branch. */
77
+ branch?: string | undefined;
78
+ /** Set the upstream while pushing, for a branch that has none yet. */
79
+ setUpstream?: boolean | undefined;
80
+ confirmed?: boolean | undefined;
81
+ }
82
+ export interface GitPushResponse extends GitStatusResponse {
83
+ pushed: boolean;
84
+ remote?: string | undefined;
85
+ pushedBranch?: string | undefined;
86
+ }
87
+ /**
88
+ * Open a pull request.
89
+ *
90
+ * Outward-facing for the same reason as a push, and confirmed the same way.
91
+ * `draft` defaults to TRUE: a review request notifies people, and the default
92
+ * for an action taken on a human's behalf should be the quieter one.
93
+ */
94
+ export interface GitPullRequestCreateRequest extends EngineeringRequestBase {
95
+ title: string;
96
+ body?: string | undefined;
97
+ /** Absent means the repository's default branch, resolved by the host. */
98
+ base?: string | undefined;
99
+ head?: string | undefined;
100
+ draft?: boolean | undefined;
101
+ confirmed?: boolean | undefined;
102
+ }
103
+ export interface GitPullRequestCreateResponse {
104
+ success: boolean;
105
+ created: boolean;
106
+ url?: string | undefined;
107
+ number?: number | undefined;
108
+ error?: string | undefined;
109
+ }
110
+ /** Where a run stands on its way to trunk. Mirrors `core`'s `LandingState`. */
111
+ export type LandingEntryState = 'queued' | 'landing' | 'landed' | 'refused' | 'failed';
112
+ export interface LandingQueueEntry {
113
+ runId: string;
114
+ revision: string;
115
+ state: LandingEntryState;
116
+ position?: number | undefined;
117
+ reason?: string | undefined;
118
+ enqueuedAt: number;
119
+ updatedAt: number;
120
+ }
121
+ export interface LandingQueueResponse {
122
+ success: boolean;
123
+ entries: LandingQueueEntry[];
124
+ /** The run currently landing. At most one — see `core`'s `LandingQueue`. */
125
+ landing?: string | undefined;
126
+ /** Identity of the set that would land next, content-sensitive. */
127
+ fingerprint: string;
128
+ error?: string | undefined;
129
+ }
130
+ export interface LandingEnqueueRequest extends EngineeringRequestBase {
131
+ runId: string;
132
+ /**
133
+ * A token that changes when the run's content changes.
134
+ *
135
+ * Not optional and not defaulted. A caller that cannot say what revision it is
136
+ * landing cannot be given a stale-detection guarantee, and inventing one here
137
+ * would hand out that guarantee without the fact behind it.
138
+ */
139
+ revision: string;
140
+ }
141
+ export interface LandingRemoveRequest extends EngineeringRequestBase {
142
+ runId: string;
143
+ }
144
+ /**
145
+ * Attempt the next landing.
146
+ *
147
+ * 🔴 **There is deliberately no `engineering.git.merge`.** A free-standing merge
148
+ * verb would sit beside the gate rather than behind it, and a gate that can be
149
+ * walked around is documentation. Merging happens here, after the queue has
150
+ * admitted a run — which it does only when overlaps are clear and the exact
151
+ * combination has been verified.
152
+ *
153
+ * Outward-facing, so confirmed like a push.
154
+ */
155
+ export interface LandingLandRequest extends EngineeringRequestBase {
156
+ /** Branch to merge INTO. Absent means the repository's default branch. */
157
+ base?: string | undefined;
158
+ confirmed?: boolean | undefined;
159
+ }
160
+ /**
161
+ * Run the checks against the COMBINED result — §5.7's combination verification.
162
+ *
163
+ * The result is stamped with the fingerprint of the set that was in flight when
164
+ * it ran, which is what lets a later landing tell a green that describes it from
165
+ * a green that describes something else. That stamp is applied here rather than
166
+ * accepted from the caller: a caller that could name its own fingerprint could
167
+ * name the one that would make its result look current.
168
+ */
169
+ export interface LandingVerifyRequest extends EngineeringRequestBase {
170
+ /** Which discovered check to run. Absent runs the workspace's default. */
171
+ checkId?: string | undefined;
172
+ }
173
+ export interface LandingVerifyResponse extends LandingQueueResponse {
174
+ /** True only when the check passed AND the set is unchanged since it started. */
175
+ verified: boolean;
176
+ checks: string[];
177
+ /** Present when the check ran and failed, or could not run at all. */
178
+ problem?: string | undefined;
179
+ }
180
+ export interface LandingLandResponse extends LandingQueueResponse {
181
+ /** The run this call acted on, when the queue admitted one. */
182
+ runId?: string | undefined;
183
+ landed: boolean;
184
+ /** Why it was refused or how it failed, in terms a human can act on. */
185
+ verdict?: string | undefined;
186
+ }
187
+ export type EngineeringCheckKind = 'test' | 'typecheck' | 'build' | 'lint' | 'script';
188
+ export interface EngineeringCheck {
189
+ id: string;
190
+ kind: EngineeringCheckKind;
191
+ name: string;
192
+ command: string;
193
+ args: string[];
194
+ packageScript?: string | undefined;
195
+ }
196
+ export interface EngineeringCheckDiscoveryResponse {
197
+ success: boolean;
198
+ rootDirectory: string;
199
+ checks: EngineeringCheck[];
200
+ packageManager?: 'npm' | undefined;
201
+ error?: string | undefined;
202
+ }
203
+ export interface EngineeringRunRequest extends EngineeringRequestBase {
204
+ checkId: string;
205
+ timeoutMs?: number | undefined;
206
+ maxOutputBytes?: number | undefined;
207
+ }
208
+ export interface EngineeringRunResult {
209
+ id: string;
210
+ rootDirectory: string;
211
+ check: EngineeringCheck;
212
+ startedAt: number;
213
+ endedAt: number;
214
+ durationMs: number;
215
+ success: boolean;
216
+ exitCode: number | null;
217
+ stdout: string;
218
+ stderr: string;
219
+ truncated: boolean;
220
+ error?: string | undefined;
221
+ }
222
+ export interface EngineeringRunResponse {
223
+ success: boolean;
224
+ run?: EngineeringRunResult | undefined;
225
+ error?: string | undefined;
226
+ }
227
+ export interface EngineeringRunListResponse {
228
+ success: boolean;
229
+ rootDirectory: string;
230
+ runs: EngineeringRunResult[];
231
+ error?: string | undefined;
232
+ }
233
+ export type EngineeringBackgroundRunStatus = 'running' | 'completed' | 'failed' | 'stopped';
234
+ export interface EngineeringBackgroundRun {
235
+ id: string;
236
+ rootDirectory: string;
237
+ check: EngineeringCheck;
238
+ status: EngineeringBackgroundRunStatus;
239
+ startedAt: number;
240
+ updatedAt: number;
241
+ endedAt?: number | undefined;
242
+ durationMs?: number | undefined;
243
+ exitCode?: number | null | undefined;
244
+ stdout: string;
245
+ stderr: string;
246
+ truncated: boolean;
247
+ error?: string | undefined;
248
+ }
249
+ export interface EngineeringBackgroundRunRequest extends EngineeringRunRequest {
250
+ }
251
+ export interface EngineeringBackgroundRunLookupRequest extends EngineeringRequestBase {
252
+ runId: string;
253
+ }
254
+ export interface EngineeringBackgroundRunResponse {
255
+ success: boolean;
256
+ rootDirectory?: string | undefined;
257
+ run?: EngineeringBackgroundRun | undefined;
258
+ error?: string | undefined;
259
+ }
260
+ export interface EngineeringBackgroundRunListResponse {
261
+ success: boolean;
262
+ rootDirectory: string;
263
+ runs: EngineeringBackgroundRun[];
264
+ error?: string | undefined;
265
+ }
266
+ export interface EngineeringDiagnosticIssue {
267
+ id: string;
268
+ rootDirectory: string;
269
+ filePath?: string | undefined;
270
+ relativePath?: string | undefined;
271
+ line?: number | undefined;
272
+ column?: number | undefined;
273
+ severity: 'error' | 'warning' | 'info';
274
+ source: string;
275
+ code?: string | undefined;
276
+ message: string;
277
+ runId?: string | undefined;
278
+ }
279
+ export interface EngineeringDiagnosticsResponse {
280
+ success: boolean;
281
+ rootDirectory: string;
282
+ summary: string;
283
+ git?: GitStatusResponse | undefined;
284
+ checks: EngineeringCheck[];
285
+ recentRuns: EngineeringRunResult[];
286
+ backgroundRuns?: EngineeringBackgroundRun[] | undefined;
287
+ issues: EngineeringDiagnosticIssue[];
288
+ error?: string | undefined;
289
+ }
290
+ export type PatchReviewStatus = 'open' | 'approved' | 'changes-requested' | 'applied' | 'dismissed';
291
+ export interface EngineeringPatchFileSnapshot {
292
+ path: string;
293
+ relativePath: string;
294
+ originalContent: string;
295
+ modifiedContent: string;
296
+ originalExists?: boolean | undefined;
297
+ modifiedExists?: boolean | undefined;
298
+ originalSha256?: string | undefined;
299
+ modifiedSha256?: string | undefined;
300
+ originalBlobId?: string | undefined;
301
+ modifiedBlobId?: string | undefined;
302
+ language?: string | undefined;
303
+ addedLines?: number | undefined;
304
+ removedLines?: number | undefined;
305
+ }
306
+ export interface EngineeringPatchHunk {
307
+ id: string;
308
+ relativePath: string;
309
+ originalStart: number;
310
+ originalLines: number;
311
+ modifiedStart: number;
312
+ modifiedLines: number;
313
+ originalText: string;
314
+ modifiedText: string;
315
+ }
316
+ export type PatchReviewDecisionAction = 'accept' | 'reject' | 'comment';
317
+ export type PatchReviewDecisionState = 'pending' | 'applied' | 'failed' | 'conflict';
318
+ export interface PatchReviewDecision {
319
+ id: string;
320
+ relativePath: string;
321
+ hunkId?: string | undefined;
322
+ action: PatchReviewDecisionAction;
323
+ comment?: string | undefined;
324
+ state: PatchReviewDecisionState;
325
+ expectedBeforeExists?: boolean | undefined;
326
+ expectedBeforeSha256?: string | undefined;
327
+ resultingExists?: boolean | undefined;
328
+ resultingSha256?: string | undefined;
329
+ transactionId?: string | undefined;
330
+ error?: string | undefined;
331
+ createdAt: number;
332
+ updatedAt: number;
333
+ }
334
+ export interface PatchReviewItem {
335
+ id: string;
336
+ rootDirectory: string;
337
+ title: string;
338
+ description?: string | undefined;
339
+ diff: string;
340
+ files: string[];
341
+ filesChanged: string[];
342
+ summary: string;
343
+ timestamp: number;
344
+ conversationId?: string | undefined;
345
+ requestId?: string | undefined;
346
+ checkpointId?: string | undefined;
347
+ testsRun?: string[] | undefined;
348
+ finalSummary?: string | undefined;
349
+ fileSnapshots?: EngineeringPatchFileSnapshot[] | undefined;
350
+ hunks?: EngineeringPatchHunk[] | undefined;
351
+ decisions?: PatchReviewDecision[] | undefined;
352
+ status: PatchReviewStatus;
353
+ notes?: string | undefined;
354
+ source?: 'manual' | 'agent' | 'git-diff' | undefined;
355
+ createdAt: number;
356
+ updatedAt: number;
357
+ }
358
+ export interface PatchReviewListResponse {
359
+ success: boolean;
360
+ rootDirectory: string;
361
+ items: PatchReviewItem[];
362
+ error?: string | undefined;
363
+ }
364
+ export interface PatchReviewUpsertRequest extends EngineeringRequestBase {
365
+ id?: string | undefined;
366
+ title?: string | undefined;
367
+ description?: string | undefined;
368
+ diff?: string | undefined;
369
+ files?: string[] | undefined;
370
+ filesChanged?: string[] | undefined;
371
+ source?: PatchReviewItem['source'] | undefined;
372
+ conversationId?: string | undefined;
373
+ requestId?: string | undefined;
374
+ checkpointId?: string | undefined;
375
+ summary?: string | undefined;
376
+ timestamp?: number | undefined;
377
+ testsRun?: string[] | undefined;
378
+ finalSummary?: string | undefined;
379
+ fileSnapshots?: EngineeringPatchFileSnapshot[] | undefined;
380
+ }
381
+ export interface PatchReviewUpdateRequest extends EngineeringRequestBase {
382
+ id: string;
383
+ status?: PatchReviewStatus | undefined;
384
+ notes?: string | undefined;
385
+ }
386
+ export interface PatchReviewMutationResponse {
387
+ success: boolean;
388
+ rootDirectory: string;
389
+ item?: PatchReviewItem | undefined;
390
+ items?: PatchReviewItem[] | undefined;
391
+ error?: string | undefined;
392
+ }
393
+ export interface PatchReviewSelectionRequest extends EngineeringRequestBase {
394
+ id: string;
395
+ relativePath: string;
396
+ hunkId?: string | undefined;
397
+ action: PatchReviewDecisionAction;
398
+ comment?: string | undefined;
399
+ confirmed?: boolean | undefined;
400
+ previewToken?: string | undefined;
401
+ }
402
+ export interface PatchReviewSelectionConflict {
403
+ relativePath: string;
404
+ reason: 'legacy_snapshot_ambiguous' | 'selection_not_found' | 'already_decided' | 'current_state_changed' | 'unsafe_path' | 'unsupported_file_type';
405
+ expectedExists?: boolean | undefined;
406
+ actualExists?: boolean | undefined;
407
+ expectedSha256?: string | undefined;
408
+ actualSha256?: string | undefined;
409
+ detail?: string | undefined;
410
+ }
411
+ export interface PatchReviewSelectionResponse {
412
+ success: boolean;
413
+ rootDirectory: string;
414
+ item?: PatchReviewItem | undefined;
415
+ selectedHunkIds: string[];
416
+ wouldChangeFiles: string[];
417
+ previewToken?: string | undefined;
418
+ conflicts?: PatchReviewSelectionConflict[] | undefined;
419
+ applied?: boolean | undefined;
420
+ transactionId?: string | undefined;
421
+ error?: string | undefined;
422
+ }
423
+ export interface EngineeringCheckpointSummary {
424
+ id: string;
425
+ checkpointId: string;
426
+ rootDirectory: string;
427
+ createdAt: number;
428
+ conversationId?: string | undefined;
429
+ requestId?: string | undefined;
430
+ summary: string;
431
+ filesChanged: string[];
432
+ patchIds: string[];
433
+ patchCount: number;
434
+ }
435
+ export interface EngineeringCheckpointListResponse {
436
+ success: boolean;
437
+ rootDirectory: string;
438
+ checkpoints: EngineeringCheckpointSummary[];
439
+ error?: string | undefined;
440
+ }
441
+ export interface EngineeringCheckpointCompareRequest extends EngineeringRequestBase {
442
+ fromCheckpointId: string;
443
+ toCheckpointId: string;
444
+ }
445
+ export interface EngineeringCheckpointCompareResponse {
446
+ success: boolean;
447
+ rootDirectory: string;
448
+ from?: EngineeringCheckpointSummary | undefined;
449
+ to?: EngineeringCheckpointSummary | undefined;
450
+ filesChanged: string[];
451
+ diff: string;
452
+ patches: PatchReviewItem[];
453
+ error?: string | undefined;
454
+ }
455
+ export interface EngineeringCheckpointRestoreRequest extends EngineeringRequestBase {
456
+ checkpointId: string;
457
+ conversationId?: string | undefined;
458
+ requestId?: string | undefined;
459
+ confirmed?: boolean | undefined;
460
+ previewToken?: string | undefined;
461
+ conflictStrategy?: 'abort' | 'overwrite' | undefined;
462
+ }
463
+ export interface EngineeringCheckpointConflict {
464
+ relativePath: string;
465
+ reason: 'legacy_snapshot_ambiguous' | 'missing_snapshot_data' | 'snapshot_chain_broken' | 'current_state_changed' | 'unsafe_path' | 'unsupported_file_type';
466
+ expectedExists?: boolean | undefined;
467
+ actualExists?: boolean | undefined;
468
+ expectedSha256?: string | undefined;
469
+ actualSha256?: string | undefined;
470
+ detail?: string | undefined;
471
+ }
472
+ export interface EngineeringCheckpointRestoreResponse {
473
+ success: boolean;
474
+ rootDirectory: string;
475
+ checkpoint?: EngineeringCheckpointSummary | undefined;
476
+ previewDiff: string;
477
+ wouldRestoreFiles: string[];
478
+ previewToken?: string | undefined;
479
+ conflicts?: EngineeringCheckpointConflict[] | undefined;
480
+ restored?: boolean | undefined;
481
+ restoredFiles?: string[] | undefined;
482
+ transactionId?: string | undefined;
483
+ runtimeEvent?: Record<string, unknown> | undefined;
484
+ error?: string | undefined;
485
+ }
486
+ export interface EngineeringSession {
487
+ id: string;
488
+ rootDirectory: string;
489
+ conversationId: string;
490
+ startedAt: number;
491
+ endedAt: number;
492
+ patches: PatchReviewItem[];
493
+ checkpoints: EngineeringCheckpointSummary[];
494
+ testsRun: EngineeringRunResult[];
495
+ finalSummary: string;
496
+ }
497
+ export interface EngineeringSessionListResponse {
498
+ success: boolean;
499
+ rootDirectory: string;
500
+ sessions: EngineeringSession[];
501
+ error?: string | undefined;
502
+ }
503
+ export interface EngineeringRuntimeTimelineRequest extends EngineeringRequestBase {
504
+ conversationId: string;
505
+ }
506
+ export interface EngineeringRuntimeTimelineResponse {
507
+ success: boolean;
508
+ rootDirectory: string;
509
+ conversationId?: string | undefined;
510
+ timeline?: unknown | undefined;
511
+ error?: string | undefined;
512
+ }
513
+ //# sourceMappingURL=engineering.d.ts.map