@kitman-sh/sdk 0.7.5 → 0.8.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/dist/build/index.js +10 -11
- package/dist/{chunk-72z6zbfz.js → chunk-160ww64c.js} +668 -185
- package/dist/{chunk-8byx9rx2.js → chunk-36jhc745.js} +195 -76
- package/dist/loop/index.js +43 -1
- package/dist/program/index.js +7 -3
- package/package.json +3 -1
- package/types/packages/core/src/agent-capabilities.d.ts +68 -74
- package/types/packages/core/src/agent-environment.d.ts +26 -26
- package/types/packages/core/src/agent-launch-snapshot.d.ts +1 -1
- package/types/packages/core/src/agent-sandbox-policy.d.ts +15 -0
- package/types/packages/core/src/approval-queue.d.ts +4 -4
- package/types/packages/core/src/audit.d.ts +1 -1
- package/types/packages/core/src/change-delivery.d.ts +1 -1
- package/types/packages/core/src/change-request-review.d.ts +199 -7
- package/types/packages/core/src/change-request.d.ts +43 -12
- package/types/packages/core/src/connection.d.ts +1 -1
- package/types/packages/core/src/context-feedback.d.ts +8 -8
- package/types/packages/core/src/context-pack.d.ts +8 -8
- package/types/packages/core/src/crypto.d.ts +5 -0
- package/types/packages/core/src/data-lifecycle.d.ts +12 -12
- package/types/packages/core/src/decision.d.ts +2 -2
- package/types/packages/core/src/delivery-policy.d.ts +3 -3
- package/types/packages/core/src/enterprise-forge.d.ts +19 -0
- package/types/packages/core/src/epic-delivery.d.ts +1 -1
- package/types/packages/core/src/external-effect.d.ts +2 -2
- package/types/packages/core/src/global-search.d.ts +1 -1
- package/types/packages/core/src/index.d.ts +8 -2
- package/types/packages/core/src/integration.d.ts +58 -57
- package/types/packages/core/src/kit.d.ts +47 -47
- package/types/packages/core/src/live.d.ts +684 -781
- package/types/packages/core/src/loop-layers.d.ts +1 -1
- package/types/packages/core/src/loop-version.d.ts +1 -1
- package/types/packages/core/src/loop.d.ts +73 -67
- package/types/packages/core/src/marketplace.d.ts +127 -0
- package/types/packages/core/src/memory.d.ts +17 -12
- package/types/packages/core/src/my-teams.d.ts +65 -32
- package/types/packages/core/src/notification.d.ts +73 -12
- package/types/packages/core/src/owner.d.ts +15 -0
- package/types/packages/core/src/package-declarations.d.ts +73 -32
- package/types/packages/core/src/package.d.ts +22 -22
- package/types/packages/core/src/personal-development-profile.d.ts +2 -2
- package/types/packages/core/src/proposal.d.ts +25 -25
- package/types/packages/core/src/redaction.d.ts +2 -1
- package/types/packages/core/src/repo-binding.d.ts +19 -10
- package/types/packages/core/src/run-display.d.ts +1 -1
- package/types/packages/core/src/run-file.d.ts +190 -0
- package/types/packages/core/src/run-launch.d.ts +7 -5
- package/types/packages/core/src/run.d.ts +9 -9
- package/types/packages/core/src/runner-eligibility.d.ts +4 -4
- package/types/packages/core/src/runner.d.ts +339 -111
- package/types/packages/core/src/schedule.d.ts +2 -2
- package/types/packages/core/src/scope-directory.d.ts +5 -5
- package/types/packages/core/src/secret.d.ts +9 -9
- package/types/packages/core/src/session.d.ts +2 -2
- package/types/packages/core/src/step-brief.d.ts +10 -3
- package/types/packages/core/src/storage.d.ts +49 -0
- package/types/packages/core/src/sync-kit.d.ts +25 -25
- package/types/packages/core/src/task-detail.d.ts +20 -13
- package/types/packages/core/src/task-execution-record.d.ts +6 -6
- package/types/packages/core/src/task.d.ts +52 -16
- package/types/packages/core/src/team-context.d.ts +33 -0
- package/types/packages/core/src/transcript.d.ts +230 -0
- package/types/packages/core/src/trigger-dispatch.d.ts +2 -2
- package/types/packages/core/src/trust-panel.d.ts +27 -0
- package/types/packages/core/src/work-unit.d.ts +44 -18
- package/types/packages/core/src/workspace.d.ts +77 -6
- package/types/packages/live/src/rpc/runner-client.d.ts +586 -15
- package/types/packages/live/src/rpc/runner-group.d.ts +623 -267
- package/types/packages/sdk/src/loop/activities.d.ts +208 -1
- package/types/packages/sdk/src/loop/config.d.ts +1 -1
- package/types/packages/sdk/src/loop/define.d.ts +8 -2
- package/types/packages/sdk/src/loop/plan.d.ts +2 -2
- package/types/packages/sdk/src/loop/steps.d.ts +2 -2
- package/types/packages/sdk/src/loop/test-loop.d.ts +6 -1
- package/types/packages/sdk/src/program/engine.d.ts +71 -3
- package/types/packages/sdk/src/program/host.d.ts +13 -1
- package/types/packages/core/src/enterprise-code-host.d.ts +0 -18
- package/types/packages/core/src/project.d.ts +0 -66
|
@@ -31,7 +31,7 @@ export declare const Task: Schema.Struct<{
|
|
|
31
31
|
readonly workspaceId: Schema.String;
|
|
32
32
|
readonly teamId: Schema.String;
|
|
33
33
|
readonly number: Schema.Int;
|
|
34
|
-
readonly
|
|
34
|
+
readonly repoBindingId: Schema.optionalKey<Schema.String>;
|
|
35
35
|
readonly title: Schema.String;
|
|
36
36
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
37
37
|
readonly acceptanceCriteria: Schema.$Array<Schema.String>;
|
|
@@ -80,7 +80,7 @@ export declare const TaskList: Schema.Struct<{
|
|
|
80
80
|
readonly workspaceId: Schema.String;
|
|
81
81
|
readonly teamId: Schema.String;
|
|
82
82
|
readonly number: Schema.Int;
|
|
83
|
-
readonly
|
|
83
|
+
readonly repoBindingId: Schema.optionalKey<Schema.String>;
|
|
84
84
|
readonly title: Schema.String;
|
|
85
85
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
86
86
|
readonly acceptanceCriteria: Schema.$Array<Schema.String>;
|
|
@@ -170,9 +170,9 @@ export declare const TaskMemberDeleteResponse: Schema.Struct<{
|
|
|
170
170
|
export declare const TaskDependency: Schema.Struct<{
|
|
171
171
|
readonly id: Schema.String;
|
|
172
172
|
readonly workspaceId: Schema.String;
|
|
173
|
-
readonly
|
|
173
|
+
readonly teamId: Schema.String;
|
|
174
174
|
readonly taskId: Schema.String;
|
|
175
|
-
readonly
|
|
175
|
+
readonly blockingTeamId: Schema.String;
|
|
176
176
|
readonly blockingTaskId: Schema.String;
|
|
177
177
|
readonly reason: Schema.optionalKey<Schema.String>;
|
|
178
178
|
readonly createdByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
|
|
@@ -183,7 +183,7 @@ export declare const TaskDependency: Schema.Struct<{
|
|
|
183
183
|
export declare const TaskDependencyTaskSummary: Schema.Struct<{
|
|
184
184
|
readonly redacted: Schema.Literal<false>;
|
|
185
185
|
readonly taskId: Schema.String;
|
|
186
|
-
readonly
|
|
186
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
187
187
|
readonly taskKey: Schema.String;
|
|
188
188
|
readonly title: Schema.String;
|
|
189
189
|
readonly state: Schema.Struct<{
|
|
@@ -195,12 +195,12 @@ export declare const TaskDependencyTaskSummary: Schema.Struct<{
|
|
|
195
195
|
export declare const TaskDependencyRedactedTask: Schema.Struct<{
|
|
196
196
|
readonly redacted: Schema.Literal<true>;
|
|
197
197
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
198
|
-
readonly
|
|
198
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
199
199
|
}>;
|
|
200
200
|
export declare const TaskDependencyTaskReference: Schema.Union<readonly [Schema.Struct<{
|
|
201
201
|
readonly redacted: Schema.Literal<false>;
|
|
202
202
|
readonly taskId: Schema.String;
|
|
203
|
-
readonly
|
|
203
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
204
204
|
readonly taskKey: Schema.String;
|
|
205
205
|
readonly title: Schema.String;
|
|
206
206
|
readonly state: Schema.Struct<{
|
|
@@ -211,7 +211,7 @@ export declare const TaskDependencyTaskReference: Schema.Union<readonly [Schema.
|
|
|
211
211
|
}>, Schema.Struct<{
|
|
212
212
|
readonly redacted: Schema.Literal<true>;
|
|
213
213
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
214
|
-
readonly
|
|
214
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
215
215
|
}>]>;
|
|
216
216
|
export declare const TaskDependencyView: Schema.Struct<{
|
|
217
217
|
readonly id: Schema.String;
|
|
@@ -219,7 +219,7 @@ export declare const TaskDependencyView: Schema.Struct<{
|
|
|
219
219
|
readonly dependentTask: Schema.Union<readonly [Schema.Struct<{
|
|
220
220
|
readonly redacted: Schema.Literal<false>;
|
|
221
221
|
readonly taskId: Schema.String;
|
|
222
|
-
readonly
|
|
222
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
223
223
|
readonly taskKey: Schema.String;
|
|
224
224
|
readonly title: Schema.String;
|
|
225
225
|
readonly state: Schema.Struct<{
|
|
@@ -230,12 +230,12 @@ export declare const TaskDependencyView: Schema.Struct<{
|
|
|
230
230
|
}>, Schema.Struct<{
|
|
231
231
|
readonly redacted: Schema.Literal<true>;
|
|
232
232
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
233
|
-
readonly
|
|
233
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
234
234
|
}>]>;
|
|
235
235
|
readonly blockingTask: Schema.Union<readonly [Schema.Struct<{
|
|
236
236
|
readonly redacted: Schema.Literal<false>;
|
|
237
237
|
readonly taskId: Schema.String;
|
|
238
|
-
readonly
|
|
238
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
239
239
|
readonly taskKey: Schema.String;
|
|
240
240
|
readonly title: Schema.String;
|
|
241
241
|
readonly state: Schema.Struct<{
|
|
@@ -246,7 +246,7 @@ export declare const TaskDependencyView: Schema.Struct<{
|
|
|
246
246
|
}>, Schema.Struct<{
|
|
247
247
|
readonly redacted: Schema.Literal<true>;
|
|
248
248
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
249
|
-
readonly
|
|
249
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
250
250
|
}>]>;
|
|
251
251
|
readonly reason: Schema.optionalKey<Schema.String>;
|
|
252
252
|
readonly createdAt: Schema.String;
|
|
@@ -259,7 +259,7 @@ export declare const TaskDependencyList: Schema.Struct<{
|
|
|
259
259
|
readonly dependentTask: Schema.Union<readonly [Schema.Struct<{
|
|
260
260
|
readonly redacted: Schema.Literal<false>;
|
|
261
261
|
readonly taskId: Schema.String;
|
|
262
|
-
readonly
|
|
262
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
263
263
|
readonly taskKey: Schema.String;
|
|
264
264
|
readonly title: Schema.String;
|
|
265
265
|
readonly state: Schema.Struct<{
|
|
@@ -270,12 +270,12 @@ export declare const TaskDependencyList: Schema.Struct<{
|
|
|
270
270
|
}>, Schema.Struct<{
|
|
271
271
|
readonly redacted: Schema.Literal<true>;
|
|
272
272
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
273
|
-
readonly
|
|
273
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
274
274
|
}>]>;
|
|
275
275
|
readonly blockingTask: Schema.Union<readonly [Schema.Struct<{
|
|
276
276
|
readonly redacted: Schema.Literal<false>;
|
|
277
277
|
readonly taskId: Schema.String;
|
|
278
|
-
readonly
|
|
278
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
279
279
|
readonly taskKey: Schema.String;
|
|
280
280
|
readonly title: Schema.String;
|
|
281
281
|
readonly state: Schema.Struct<{
|
|
@@ -286,7 +286,7 @@ export declare const TaskDependencyList: Schema.Struct<{
|
|
|
286
286
|
}>, Schema.Struct<{
|
|
287
287
|
readonly redacted: Schema.Literal<true>;
|
|
288
288
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
289
|
-
readonly
|
|
289
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
290
290
|
}>]>;
|
|
291
291
|
readonly reason: Schema.optionalKey<Schema.String>;
|
|
292
292
|
readonly createdAt: Schema.String;
|
|
@@ -305,6 +305,21 @@ export declare const TaskThreadEntrySessionSummary: Schema.Struct<{
|
|
|
305
305
|
readonly modelId: Schema.optionalKey<Schema.String>;
|
|
306
306
|
readonly startedAt: Schema.String;
|
|
307
307
|
}>;
|
|
308
|
+
export declare const TaskThreadReactions: readonly ['thumbs_up', 'thumbs_down', 'heart', 'laugh', 'hooray', 'confused', 'eyes', 'rocket'];
|
|
309
|
+
export declare const TaskThreadReaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "heart", "laugh", "hooray", "confused", "eyes", "rocket"]>;
|
|
310
|
+
export declare const TaskThreadEntryReaction: Schema.Struct<{
|
|
311
|
+
readonly reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "heart", "laugh", "hooray", "confused", "eyes", "rocket"]>;
|
|
312
|
+
/** Who reacted, earliest first; one each. */
|
|
313
|
+
readonly actors: Schema.$Array<Schema.Struct<{
|
|
314
|
+
readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
|
|
315
|
+
readonly actorId: Schema.String;
|
|
316
|
+
}>>;
|
|
317
|
+
}>;
|
|
318
|
+
/** Adds or removes the actor's own reaction. */
|
|
319
|
+
export declare const TaskThreadReactionSet: Schema.Struct<{
|
|
320
|
+
readonly reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "heart", "laugh", "hooray", "confused", "eyes", "rocket"]>;
|
|
321
|
+
readonly reacted: Schema.Boolean;
|
|
322
|
+
}>;
|
|
308
323
|
export declare const TaskThreadEntry: Schema.Struct<{
|
|
309
324
|
readonly id: Schema.String;
|
|
310
325
|
readonly workspaceId: Schema.String;
|
|
@@ -329,6 +344,15 @@ export declare const TaskThreadEntry: Schema.Struct<{
|
|
|
329
344
|
readonly actorId: Schema.String;
|
|
330
345
|
readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
|
|
331
346
|
readonly createdAt: Schema.String;
|
|
347
|
+
/** Left out while nobody has reacted. */
|
|
348
|
+
readonly reactions: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
349
|
+
readonly reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "heart", "laugh", "hooray", "confused", "eyes", "rocket"]>;
|
|
350
|
+
/** Who reacted, earliest first; one each. */
|
|
351
|
+
readonly actors: Schema.$Array<Schema.Struct<{
|
|
352
|
+
readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
|
|
353
|
+
readonly actorId: Schema.String;
|
|
354
|
+
}>>;
|
|
355
|
+
}>>>;
|
|
332
356
|
}>;
|
|
333
357
|
export declare const TaskThreadEntryCreate: Schema.Struct<{
|
|
334
358
|
readonly kind: Schema.Union<readonly [Schema.Literal<"note">, Schema.Literal<"question">, Schema.Literal<"answer">, Schema.Literal<"decision">, Schema.Literal<"blocker">, Schema.Literal<"finding">, Schema.Literal<"handoff">, Schema.Literal<"test_result">, Schema.Literal<"file_reference">, Schema.Literal<"status_change">, Schema.Literal<"assignment_change">, Schema.Literal<"link">, Schema.Literal<"change_request_review">]>;
|
|
@@ -362,6 +386,15 @@ export declare const TaskThreadEntryList: Schema.Struct<{
|
|
|
362
386
|
readonly actorId: Schema.String;
|
|
363
387
|
readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
|
|
364
388
|
readonly createdAt: Schema.String;
|
|
389
|
+
/** Left out while nobody has reacted. */
|
|
390
|
+
readonly reactions: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
391
|
+
readonly reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "heart", "laugh", "hooray", "confused", "eyes", "rocket"]>;
|
|
392
|
+
/** Who reacted, earliest first; one each. */
|
|
393
|
+
readonly actors: Schema.$Array<Schema.Struct<{
|
|
394
|
+
readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
|
|
395
|
+
readonly actorId: Schema.String;
|
|
396
|
+
}>>;
|
|
397
|
+
}>>>;
|
|
365
398
|
}>>;
|
|
366
399
|
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
367
400
|
}>;
|
|
@@ -526,6 +559,9 @@ export type TaskThreadEntryKind = (typeof TaskThreadEntryKind)['Type'];
|
|
|
526
559
|
export type TaskThreadEntrySessionSummary = (typeof TaskThreadEntrySessionSummary)['Type'];
|
|
527
560
|
export type TaskThreadEntry = (typeof TaskThreadEntry)['Type'];
|
|
528
561
|
export type TaskThreadEntryCreate = (typeof TaskThreadEntryCreate)['Type'];
|
|
562
|
+
export type TaskThreadReaction = (typeof TaskThreadReaction)['Type'];
|
|
563
|
+
export type TaskThreadEntryReaction = (typeof TaskThreadEntryReaction)['Type'];
|
|
564
|
+
export type TaskThreadReactionSet = (typeof TaskThreadReactionSet)['Type'];
|
|
529
565
|
export type TaskThreadEntryList = (typeof TaskThreadEntryList)['Type'];
|
|
530
566
|
export type TaskLink = (typeof TaskLink)['Type'];
|
|
531
567
|
export type TaskLinkCreate = (typeof TaskLinkCreate)['Type'];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
export declare const TeamDeliverySettings: Schema.Struct<{
|
|
3
|
+
readonly defaultRepoBindingId: Schema.optionalKey<Schema.String>;
|
|
4
|
+
readonly standardBranchTemplate: Schema.String;
|
|
5
|
+
readonly epicBranchTemplate: Schema.String;
|
|
6
|
+
readonly isolatedChildBranchTemplate: Schema.String;
|
|
7
|
+
readonly revision: Schema.Int;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const TeamDeliverySettingsUpdate: Schema.Struct<{
|
|
10
|
+
readonly defaultRepoBindingId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
11
|
+
readonly standardBranchTemplate: Schema.optionalKey<Schema.String>;
|
|
12
|
+
readonly epicBranchTemplate: Schema.optionalKey<Schema.String>;
|
|
13
|
+
readonly isolatedChildBranchTemplate: Schema.optionalKey<Schema.String>;
|
|
14
|
+
readonly expectedRevision: Schema.Int;
|
|
15
|
+
}>;
|
|
16
|
+
/** A Team as agents and repository choices name it. */
|
|
17
|
+
export declare const TeamReference: Schema.Struct<{
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
readonly workspaceId: Schema.String;
|
|
20
|
+
readonly key: Schema.String;
|
|
21
|
+
readonly name: Schema.String;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const TeamReferenceList: Schema.Struct<{
|
|
24
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
25
|
+
readonly id: Schema.String;
|
|
26
|
+
readonly workspaceId: Schema.String;
|
|
27
|
+
readonly key: Schema.String;
|
|
28
|
+
readonly name: Schema.String;
|
|
29
|
+
}>>;
|
|
30
|
+
}>;
|
|
31
|
+
export type TeamReference = (typeof TeamReference)['Type'];
|
|
32
|
+
export type TeamDeliverySettings = (typeof TeamDeliverySettings)['Type'];
|
|
33
|
+
export type TeamDeliverySettingsUpdate = (typeof TeamDeliverySettingsUpdate)['Type'];
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import type { JsonValue } from './runtime-type';
|
|
3
|
+
/** One normalized moment of an agent session (ADR-0007): never terminal bytes or a Harness's own files. */
|
|
4
|
+
export declare const AgentEvent: Schema.Union<readonly [Schema.Struct<{
|
|
5
|
+
readonly kind: Schema.Literal<"message">;
|
|
6
|
+
readonly role: Schema.Literals<readonly ["assistant", "user"]>;
|
|
7
|
+
readonly text: Schema.String;
|
|
8
|
+
}>, Schema.Struct<{
|
|
9
|
+
readonly kind: Schema.Literal<"tool_call">;
|
|
10
|
+
readonly callId: Schema.String;
|
|
11
|
+
readonly name: Schema.String;
|
|
12
|
+
readonly arguments: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
13
|
+
}>, Schema.Struct<{
|
|
14
|
+
readonly kind: Schema.Literal<"tool_result">;
|
|
15
|
+
readonly callId: Schema.String;
|
|
16
|
+
readonly output: Schema.String;
|
|
17
|
+
readonly isError: Schema.optionalKey<Schema.Boolean>;
|
|
18
|
+
}>, Schema.Struct<{
|
|
19
|
+
readonly kind: Schema.Literal<"file">;
|
|
20
|
+
readonly path: Schema.String;
|
|
21
|
+
readonly change: Schema.Literals<readonly ["read", "changed"]>;
|
|
22
|
+
}>, Schema.Struct<{
|
|
23
|
+
readonly kind: Schema.Literal<"question">;
|
|
24
|
+
readonly text: Schema.String;
|
|
25
|
+
}>, Schema.Struct<{
|
|
26
|
+
readonly kind: Schema.Literal<"answer">;
|
|
27
|
+
readonly callId: Schema.optionalKey<Schema.String>;
|
|
28
|
+
readonly questionId: Schema.optionalKey<Schema.String>;
|
|
29
|
+
readonly text: Schema.String;
|
|
30
|
+
}>, Schema.Struct<{
|
|
31
|
+
readonly kind: Schema.Literal<"steer">;
|
|
32
|
+
readonly messageId: Schema.String;
|
|
33
|
+
readonly text: Schema.String;
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
readonly kind: Schema.Literal<"lifecycle">;
|
|
36
|
+
readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
|
|
37
|
+
}>]>;
|
|
38
|
+
export type AgentEvent = (typeof AgentEvent)['Type'];
|
|
39
|
+
/** What replaces the words of an erased person's steers and answers. */
|
|
40
|
+
export declare const removedText = "removed";
|
|
41
|
+
/** An AgentEvent as the Runner numbers it, from 1, for its StepAttempt. */
|
|
42
|
+
export declare const TranscriptAppendEntry: Schema.Struct<{
|
|
43
|
+
readonly sequence: Schema.Int;
|
|
44
|
+
readonly event: Schema.Union<readonly [Schema.Struct<{
|
|
45
|
+
readonly kind: Schema.Literal<"message">;
|
|
46
|
+
readonly role: Schema.Literals<readonly ["assistant", "user"]>;
|
|
47
|
+
readonly text: Schema.String;
|
|
48
|
+
}>, Schema.Struct<{
|
|
49
|
+
readonly kind: Schema.Literal<"tool_call">;
|
|
50
|
+
readonly callId: Schema.String;
|
|
51
|
+
readonly name: Schema.String;
|
|
52
|
+
readonly arguments: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
53
|
+
}>, Schema.Struct<{
|
|
54
|
+
readonly kind: Schema.Literal<"tool_result">;
|
|
55
|
+
readonly callId: Schema.String;
|
|
56
|
+
readonly output: Schema.String;
|
|
57
|
+
readonly isError: Schema.optionalKey<Schema.Boolean>;
|
|
58
|
+
}>, Schema.Struct<{
|
|
59
|
+
readonly kind: Schema.Literal<"file">;
|
|
60
|
+
readonly path: Schema.String;
|
|
61
|
+
readonly change: Schema.Literals<readonly ["read", "changed"]>;
|
|
62
|
+
}>, Schema.Struct<{
|
|
63
|
+
readonly kind: Schema.Literal<"question">;
|
|
64
|
+
readonly text: Schema.String;
|
|
65
|
+
}>, Schema.Struct<{
|
|
66
|
+
readonly kind: Schema.Literal<"answer">;
|
|
67
|
+
readonly callId: Schema.optionalKey<Schema.String>;
|
|
68
|
+
readonly questionId: Schema.optionalKey<Schema.String>;
|
|
69
|
+
readonly text: Schema.String;
|
|
70
|
+
}>, Schema.Struct<{
|
|
71
|
+
readonly kind: Schema.Literal<"steer">;
|
|
72
|
+
readonly messageId: Schema.String;
|
|
73
|
+
readonly text: Schema.String;
|
|
74
|
+
}>, Schema.Struct<{
|
|
75
|
+
readonly kind: Schema.Literal<"lifecycle">;
|
|
76
|
+
readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
|
|
77
|
+
}>]>;
|
|
78
|
+
}>;
|
|
79
|
+
export type TranscriptAppendEntry = (typeof TranscriptAppendEntry)['Type'];
|
|
80
|
+
export declare const TranscriptEntry: Schema.Struct<{
|
|
81
|
+
readonly stepAttemptId: Schema.String;
|
|
82
|
+
readonly sequence: Schema.Int;
|
|
83
|
+
readonly event: Schema.Union<readonly [Schema.Struct<{
|
|
84
|
+
readonly kind: Schema.Literal<"message">;
|
|
85
|
+
readonly role: Schema.Literals<readonly ["assistant", "user"]>;
|
|
86
|
+
readonly text: Schema.String;
|
|
87
|
+
}>, Schema.Struct<{
|
|
88
|
+
readonly kind: Schema.Literal<"tool_call">;
|
|
89
|
+
readonly callId: Schema.String;
|
|
90
|
+
readonly name: Schema.String;
|
|
91
|
+
readonly arguments: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
92
|
+
}>, Schema.Struct<{
|
|
93
|
+
readonly kind: Schema.Literal<"tool_result">;
|
|
94
|
+
readonly callId: Schema.String;
|
|
95
|
+
readonly output: Schema.String;
|
|
96
|
+
readonly isError: Schema.optionalKey<Schema.Boolean>;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly kind: Schema.Literal<"file">;
|
|
99
|
+
readonly path: Schema.String;
|
|
100
|
+
readonly change: Schema.Literals<readonly ["read", "changed"]>;
|
|
101
|
+
}>, Schema.Struct<{
|
|
102
|
+
readonly kind: Schema.Literal<"question">;
|
|
103
|
+
readonly text: Schema.String;
|
|
104
|
+
}>, Schema.Struct<{
|
|
105
|
+
readonly kind: Schema.Literal<"answer">;
|
|
106
|
+
readonly callId: Schema.optionalKey<Schema.String>;
|
|
107
|
+
readonly questionId: Schema.optionalKey<Schema.String>;
|
|
108
|
+
readonly text: Schema.String;
|
|
109
|
+
}>, Schema.Struct<{
|
|
110
|
+
readonly kind: Schema.Literal<"steer">;
|
|
111
|
+
readonly messageId: Schema.String;
|
|
112
|
+
readonly text: Schema.String;
|
|
113
|
+
}>, Schema.Struct<{
|
|
114
|
+
readonly kind: Schema.Literal<"lifecycle">;
|
|
115
|
+
readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
|
|
116
|
+
}>]>;
|
|
117
|
+
readonly createdAt: Schema.String;
|
|
118
|
+
}>;
|
|
119
|
+
export type TranscriptEntry = (typeof TranscriptEntry)['Type'];
|
|
120
|
+
/** A `before` past every sequence number, which reads the newest page. */
|
|
121
|
+
export declare const transcriptEnd = 2147483647;
|
|
122
|
+
/**
|
|
123
|
+
* A page of one StepAttempt's Transcript, oldest first; `next` is the `after` that reads the following page, and
|
|
124
|
+
* `previous` the `before` that reads the page before it.
|
|
125
|
+
*/
|
|
126
|
+
export declare const TranscriptPage: Schema.Struct<{
|
|
127
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
128
|
+
readonly stepAttemptId: Schema.String;
|
|
129
|
+
readonly sequence: Schema.Int;
|
|
130
|
+
readonly event: Schema.Union<readonly [Schema.Struct<{
|
|
131
|
+
readonly kind: Schema.Literal<"message">;
|
|
132
|
+
readonly role: Schema.Literals<readonly ["assistant", "user"]>;
|
|
133
|
+
readonly text: Schema.String;
|
|
134
|
+
}>, Schema.Struct<{
|
|
135
|
+
readonly kind: Schema.Literal<"tool_call">;
|
|
136
|
+
readonly callId: Schema.String;
|
|
137
|
+
readonly name: Schema.String;
|
|
138
|
+
readonly arguments: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
139
|
+
}>, Schema.Struct<{
|
|
140
|
+
readonly kind: Schema.Literal<"tool_result">;
|
|
141
|
+
readonly callId: Schema.String;
|
|
142
|
+
readonly output: Schema.String;
|
|
143
|
+
readonly isError: Schema.optionalKey<Schema.Boolean>;
|
|
144
|
+
}>, Schema.Struct<{
|
|
145
|
+
readonly kind: Schema.Literal<"file">;
|
|
146
|
+
readonly path: Schema.String;
|
|
147
|
+
readonly change: Schema.Literals<readonly ["read", "changed"]>;
|
|
148
|
+
}>, Schema.Struct<{
|
|
149
|
+
readonly kind: Schema.Literal<"question">;
|
|
150
|
+
readonly text: Schema.String;
|
|
151
|
+
}>, Schema.Struct<{
|
|
152
|
+
readonly kind: Schema.Literal<"answer">;
|
|
153
|
+
readonly callId: Schema.optionalKey<Schema.String>;
|
|
154
|
+
readonly questionId: Schema.optionalKey<Schema.String>;
|
|
155
|
+
readonly text: Schema.String;
|
|
156
|
+
}>, Schema.Struct<{
|
|
157
|
+
readonly kind: Schema.Literal<"steer">;
|
|
158
|
+
readonly messageId: Schema.String;
|
|
159
|
+
readonly text: Schema.String;
|
|
160
|
+
}>, Schema.Struct<{
|
|
161
|
+
readonly kind: Schema.Literal<"lifecycle">;
|
|
162
|
+
readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
|
|
163
|
+
}>]>;
|
|
164
|
+
readonly createdAt: Schema.String;
|
|
165
|
+
}>>;
|
|
166
|
+
readonly next: Schema.optionalKey<Schema.Int>;
|
|
167
|
+
readonly previous: Schema.optionalKey<Schema.Int>;
|
|
168
|
+
}>;
|
|
169
|
+
export type TranscriptPage = (typeof TranscriptPage)['Type'];
|
|
170
|
+
/** How many days a Workspace keeps Transcripts; `null` keeps each as long as its Run. */
|
|
171
|
+
export declare const TranscriptRetention: Schema.Struct<{
|
|
172
|
+
readonly days: Schema.NullOr<Schema.Int>;
|
|
173
|
+
}>;
|
|
174
|
+
export type TranscriptRetention = (typeof TranscriptRetention)['Type'];
|
|
175
|
+
export declare const MaxTranscriptSearchLimit = 50;
|
|
176
|
+
export declare const TranscriptSearchQuery: Schema.Struct<{
|
|
177
|
+
readonly q: Schema.String;
|
|
178
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>;
|
|
179
|
+
}>;
|
|
180
|
+
/** A Transcript that matches, opened at its first matching entry. */
|
|
181
|
+
export declare const TranscriptSearchHit: Schema.Struct<{
|
|
182
|
+
readonly runId: Schema.String;
|
|
183
|
+
readonly loop: Schema.String;
|
|
184
|
+
readonly task: Schema.optionalKey<Schema.Struct<{
|
|
185
|
+
readonly id: Schema.String;
|
|
186
|
+
readonly key: Schema.String;
|
|
187
|
+
readonly title: Schema.String;
|
|
188
|
+
}>>;
|
|
189
|
+
readonly stepAttemptId: Schema.String;
|
|
190
|
+
/** The Run graph node the Run page opens the Step by. */
|
|
191
|
+
readonly node: Schema.optionalKey<Schema.String>;
|
|
192
|
+
readonly step: Schema.String;
|
|
193
|
+
readonly attempt: Schema.Int;
|
|
194
|
+
readonly agent: Schema.optionalKey<Schema.String>;
|
|
195
|
+
readonly ranAt: Schema.String;
|
|
196
|
+
readonly sequence: Schema.Int;
|
|
197
|
+
readonly matches: Schema.Int;
|
|
198
|
+
readonly excerpt: Schema.String;
|
|
199
|
+
}>;
|
|
200
|
+
export type TranscriptSearchHit = (typeof TranscriptSearchHit)['Type'];
|
|
201
|
+
/** Newest Transcripts first; `total` counts every matching Transcript the person may read. */
|
|
202
|
+
export declare const TranscriptSearchResult: Schema.Struct<{
|
|
203
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
204
|
+
readonly runId: Schema.String;
|
|
205
|
+
readonly loop: Schema.String;
|
|
206
|
+
readonly task: Schema.optionalKey<Schema.Struct<{
|
|
207
|
+
readonly id: Schema.String;
|
|
208
|
+
readonly key: Schema.String;
|
|
209
|
+
readonly title: Schema.String;
|
|
210
|
+
}>>;
|
|
211
|
+
readonly stepAttemptId: Schema.String;
|
|
212
|
+
/** The Run graph node the Run page opens the Step by. */
|
|
213
|
+
readonly node: Schema.optionalKey<Schema.String>;
|
|
214
|
+
readonly step: Schema.String;
|
|
215
|
+
readonly attempt: Schema.Int;
|
|
216
|
+
readonly agent: Schema.optionalKey<Schema.String>;
|
|
217
|
+
readonly ranAt: Schema.String;
|
|
218
|
+
readonly sequence: Schema.Int;
|
|
219
|
+
readonly matches: Schema.Int;
|
|
220
|
+
readonly excerpt: Schema.String;
|
|
221
|
+
}>>;
|
|
222
|
+
readonly total: Schema.Int;
|
|
223
|
+
}>;
|
|
224
|
+
export type TranscriptSearchResult = (typeof TranscriptSearchResult)['Type'];
|
|
225
|
+
/** Up to `width` characters of `text` around the first case-insensitive match of `query`, on one line. */
|
|
226
|
+
export declare const transcriptExcerpt: (text: string, query: string, width?: number) => string;
|
|
227
|
+
/** A redaction keeps the JSON's shape. */
|
|
228
|
+
export type Redact = <T extends JsonValue>(json: T) => T;
|
|
229
|
+
/** Replaces every exact occurrence of `values` in the strings of JSON, longest first so none is left in part. */
|
|
230
|
+
export declare const redactSecretValues: (values: readonly (readonly [name: string, value: string])[]) => Redact;
|
|
@@ -93,7 +93,7 @@ export declare const Event: Schema.Struct<{
|
|
|
93
93
|
readonly contractVersion: Schema.Literal<"run.v1">;
|
|
94
94
|
readonly id: Schema.String;
|
|
95
95
|
readonly workspaceId: Schema.String;
|
|
96
|
-
readonly
|
|
96
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
97
97
|
readonly sourceKind: Schema.Literals<readonly ["manual", "domain", "webhook", "schedule", "message", "result", "parent", "child"]>;
|
|
98
98
|
readonly eventType: Schema.String;
|
|
99
99
|
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -256,7 +256,7 @@ export declare const TriggerIngress: Schema.Struct<{
|
|
|
256
256
|
readonly contractVersion: Schema.Literal<"run.v1">;
|
|
257
257
|
readonly id: Schema.String;
|
|
258
258
|
readonly workspaceId: Schema.String;
|
|
259
|
-
readonly
|
|
259
|
+
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
260
260
|
readonly sourceKind: Schema.Literals<readonly ["manual", "domain", "webhook", "schedule", "message", "result", "parent", "child"]>;
|
|
261
261
|
readonly eventType: Schema.String;
|
|
262
262
|
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ChangeRequest } from './change-request';
|
|
2
|
+
import type { RunShow } from './loop';
|
|
3
|
+
export type TrustStatus = 'failed' | 'partial' | 'unproved' | 'verified' | 'claims';
|
|
4
|
+
/** One kind of evidence a person reads before merging, with where it came from. */
|
|
5
|
+
export type TrustRow = {
|
|
6
|
+
readonly kind: 'checks' | 'criteria' | 'review' | 'forge' | 'claims';
|
|
7
|
+
readonly status: TrustStatus;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly word: string;
|
|
10
|
+
readonly detail: string;
|
|
11
|
+
readonly source: string;
|
|
12
|
+
};
|
|
13
|
+
export type TrustPanel = {
|
|
14
|
+
/** Failed when any evidence fails, partial while any is open or unproved; claims never count. */
|
|
15
|
+
readonly state: 'verified' | 'partial' | 'failed';
|
|
16
|
+
/** What the Run's Output left unsettled, unmet acceptance criteria first. */
|
|
17
|
+
readonly gaps: readonly string[];
|
|
18
|
+
/** Failing, then open, then unproved evidence, before the verified and the claims. */
|
|
19
|
+
readonly rows: readonly TrustRow[];
|
|
20
|
+
};
|
|
21
|
+
export type TrustPanelInput = {
|
|
22
|
+
readonly shown: Pick<RunShow, 'run' | 'steps' | 'evidence' | 'findings'>;
|
|
23
|
+
readonly acceptanceCriteria: readonly string[];
|
|
24
|
+
readonly changeRequest?: Pick<ChangeRequest, 'provider' | 'providerMetadata'> | undefined;
|
|
25
|
+
};
|
|
26
|
+
/** The rows of "Why you can trust this": each kind of evidence the Run has, set apart from what its agents claim. */
|
|
27
|
+
export declare const trustPanel: (input: TrustPanelInput) => TrustPanel;
|