@kitman-sh/loops 0.7.4 → 0.7.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/loops",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
@@ -15,7 +15,7 @@
15
15
  "types"
16
16
  ],
17
17
  "dependencies": {
18
- "@kitman-sh/sdk": "0.7.4",
18
+ "@kitman-sh/sdk": "0.7.5",
19
19
  "effect": "^4.0.4"
20
20
  }
21
21
  }
@@ -1497,6 +1497,24 @@ export declare const StepSessionUpdate: Schema.Struct<{
1497
1497
  readonly content: Schema.String;
1498
1498
  }>;
1499
1499
  export type StepSessionUpdate = (typeof StepSessionUpdate)['Type'];
1500
+ /** A SessionUpdate an agent Step recorded on one of its StepAttempts. */
1501
+ export declare const StepAttemptSessionUpdate: Schema.Struct<{
1502
+ readonly id: Schema.String;
1503
+ readonly kind: Schema.String;
1504
+ readonly content: Schema.String;
1505
+ readonly createdAt: Schema.String;
1506
+ }>;
1507
+ export type StepAttemptSessionUpdate = (typeof StepAttemptSessionUpdate)['Type'];
1508
+ export declare const StepAttemptSessionUpdateList: Schema.Struct<{
1509
+ readonly items: Schema.$Array<Schema.Struct<{
1510
+ readonly id: Schema.String;
1511
+ readonly kind: Schema.String;
1512
+ readonly content: Schema.String;
1513
+ readonly createdAt: Schema.String;
1514
+ }>>;
1515
+ readonly next: Schema.optionalKey<Schema.String>;
1516
+ }>;
1517
+ export type StepAttemptSessionUpdateList = (typeof StepAttemptSessionUpdateList)['Type'];
1500
1518
  export declare const StepOutputSubmissionResult: Schema.Union<readonly [Schema.Struct<{
1501
1519
  readonly status: Schema.Literal<"accepted">;
1502
1520
  }>, Schema.Struct<{
@@ -2088,6 +2106,9 @@ export declare const RunStepSummary: Schema.Struct<{
2088
2106
  readonly attempt: Schema.Int;
2089
2107
  readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "blocked", "completed", "failed", "canceled"]>;
2090
2108
  readonly failureSummary: Schema.optionalKey<Schema.String>;
2109
+ /** What the attempt's agent submitted: its claims. */
2110
+ readonly output: Schema.optionalKey<Schema.Unknown>;
2111
+ readonly revision: Schema.optionalKey<Schema.String>;
2091
2112
  }>>;
2092
2113
  }>;
2093
2114
  export declare const RunSteerDeliveries: readonly ['queued', 'delivered', 'failed'];
@@ -2103,6 +2124,8 @@ export declare const RunSteer: Schema.Struct<{
2103
2124
  export type RunSteer = (typeof RunSteer)['Type'];
2104
2125
  export declare const RunSteerInput: Schema.Struct<{
2105
2126
  readonly text: Schema.String;
2127
+ /** The Run's StepAttempt to steer; without one, the newest live agent Session. */
2128
+ readonly stepAttemptId: Schema.optionalKey<Schema.String>;
2106
2129
  readonly idempotencyKey: Schema.String;
2107
2130
  }>;
2108
2131
  export type RunSteerInput = (typeof RunSteerInput)['Type'];
@@ -2119,6 +2142,128 @@ export declare const RunSteerSent: Schema.Struct<{
2119
2142
  readonly target: Schema.Literals<readonly ["session", "next_step"]>;
2120
2143
  }>;
2121
2144
  export type RunSteerSent = (typeof RunSteerSent)['Type'];
2145
+ export declare const RunDisplayStates: readonly ['queued', 'running', 'needs_you', 'blocked', 'failed', 'stopped', 'succeeded', 'partial'];
2146
+ export type RunDisplayState = (typeof RunDisplayStates)[number];
2147
+ /** How every surface shows a Run (ADR-0072). */
2148
+ export declare const RunDisplay: Schema.Struct<{
2149
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2150
+ /** A Step needed more than one attempt. */
2151
+ readonly retried: Schema.Boolean;
2152
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
2153
+ readonly summary: Schema.optionalKey<Schema.String>;
2154
+ }>;
2155
+ export type RunDisplay = (typeof RunDisplay)['Type'];
2156
+ export declare const RunGraphNodeKinds: readonly ['agent', 'check', 'question', 'child', 'wait', 'activity'];
2157
+ /** A Step the Run reached, of any kind (ADR-0072). */
2158
+ export declare const RunGraphNode: Schema.Struct<{
2159
+ /** The Step's name in the journal, such as `agent_work/fix:1`. */
2160
+ readonly id: Schema.String;
2161
+ readonly name: Schema.String;
2162
+ readonly kind: Schema.Literals<readonly ["agent", "check", "question", "child", "wait", "activity"]>;
2163
+ readonly status: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2164
+ readonly startedAt: Schema.String;
2165
+ readonly endedAt: Schema.optionalKey<Schema.String>;
2166
+ readonly attempts: Schema.$Array<Schema.Struct<{
2167
+ readonly id: Schema.String;
2168
+ readonly attempt: Schema.Int;
2169
+ readonly status: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2170
+ readonly failureSummary: Schema.optionalKey<Schema.String>;
2171
+ }>>;
2172
+ readonly agent: Schema.optionalKey<Schema.Struct<{
2173
+ readonly id: Schema.String;
2174
+ readonly harness: Schema.optionalKey<Schema.String>;
2175
+ readonly model: Schema.optionalKey<Schema.String>;
2176
+ readonly runner: Schema.optionalKey<Schema.Struct<{
2177
+ readonly id: Schema.String;
2178
+ readonly name: Schema.String;
2179
+ }>>;
2180
+ }>>;
2181
+ readonly child: Schema.optionalKey<Schema.Struct<{
2182
+ readonly runId: Schema.String;
2183
+ readonly loopTitle: Schema.String;
2184
+ readonly display: Schema.Struct<{
2185
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2186
+ /** A Step needed more than one attempt. */
2187
+ readonly retried: Schema.Boolean;
2188
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
2189
+ readonly summary: Schema.optionalKey<Schema.String>;
2190
+ }>;
2191
+ readonly task: Schema.optionalKey<Schema.Struct<{
2192
+ readonly id: Schema.String;
2193
+ readonly key: Schema.String;
2194
+ readonly title: Schema.String;
2195
+ }>>;
2196
+ }>>;
2197
+ }>;
2198
+ export type RunGraphNode = (typeof RunGraphNode)['Type'];
2199
+ export declare const RunGraph: Schema.Struct<{
2200
+ /** The Steps the Run reached together, left to right. */
2201
+ readonly columns: Schema.$Array<Schema.$Array<Schema.Struct<{
2202
+ /** The Step's name in the journal, such as `agent_work/fix:1`. */
2203
+ readonly id: Schema.String;
2204
+ readonly name: Schema.String;
2205
+ readonly kind: Schema.Literals<readonly ["agent", "check", "question", "child", "wait", "activity"]>;
2206
+ readonly status: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2207
+ readonly startedAt: Schema.String;
2208
+ readonly endedAt: Schema.optionalKey<Schema.String>;
2209
+ readonly attempts: Schema.$Array<Schema.Struct<{
2210
+ readonly id: Schema.String;
2211
+ readonly attempt: Schema.Int;
2212
+ readonly status: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2213
+ readonly failureSummary: Schema.optionalKey<Schema.String>;
2214
+ }>>;
2215
+ readonly agent: Schema.optionalKey<Schema.Struct<{
2216
+ readonly id: Schema.String;
2217
+ readonly harness: Schema.optionalKey<Schema.String>;
2218
+ readonly model: Schema.optionalKey<Schema.String>;
2219
+ readonly runner: Schema.optionalKey<Schema.Struct<{
2220
+ readonly id: Schema.String;
2221
+ readonly name: Schema.String;
2222
+ }>>;
2223
+ }>>;
2224
+ readonly child: Schema.optionalKey<Schema.Struct<{
2225
+ readonly runId: Schema.String;
2226
+ readonly loopTitle: Schema.String;
2227
+ readonly display: Schema.Struct<{
2228
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2229
+ /** A Step needed more than one attempt. */
2230
+ readonly retried: Schema.Boolean;
2231
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
2232
+ readonly summary: Schema.optionalKey<Schema.String>;
2233
+ }>;
2234
+ readonly task: Schema.optionalKey<Schema.Struct<{
2235
+ readonly id: Schema.String;
2236
+ readonly key: Schema.String;
2237
+ readonly title: Schema.String;
2238
+ }>>;
2239
+ }>>;
2240
+ }>>>;
2241
+ /** From a Child Run node to one it needs: a `blocks` Task Relation joins their Tasks. */
2242
+ readonly needs: Schema.$Array<Schema.Struct<{
2243
+ readonly from: Schema.String;
2244
+ readonly to: Schema.String;
2245
+ }>>;
2246
+ }>;
2247
+ export type RunGraph = (typeof RunGraph)['Type'];
2248
+ /** What the Run page leads with. */
2249
+ export declare const RunHeader: Schema.Struct<{
2250
+ readonly loopTitle: Schema.String;
2251
+ readonly branch: Schema.optionalKey<Schema.String>;
2252
+ /** The newest ChangeRequest from the Run's branch. */
2253
+ readonly changeRequest: Schema.optionalKey<Schema.Struct<{
2254
+ readonly id: Schema.String;
2255
+ readonly title: Schema.String;
2256
+ readonly url: Schema.String;
2257
+ }>>;
2258
+ readonly startedBy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2259
+ readonly kind: Schema.Literal<"person">;
2260
+ readonly name: Schema.String;
2261
+ }>, Schema.Struct<{
2262
+ readonly kind: Schema.Literal<"event">;
2263
+ readonly event: Schema.String;
2264
+ }>]>>;
2265
+ }>;
2266
+ export type RunHeader = (typeof RunHeader)['Type'];
2122
2267
  export declare const RunShow: Schema.Struct<{
2123
2268
  readonly run: Schema.Struct<{
2124
2269
  readonly id: Schema.String;
@@ -2259,6 +2404,78 @@ export declare const RunShow: Schema.Struct<{
2259
2404
  readonly createdAt: Schema.String;
2260
2405
  readonly updatedAt: Schema.String;
2261
2406
  }>;
2407
+ readonly header: Schema.Struct<{
2408
+ readonly loopTitle: Schema.String;
2409
+ readonly branch: Schema.optionalKey<Schema.String>;
2410
+ /** The newest ChangeRequest from the Run's branch. */
2411
+ readonly changeRequest: Schema.optionalKey<Schema.Struct<{
2412
+ readonly id: Schema.String;
2413
+ readonly title: Schema.String;
2414
+ readonly url: Schema.String;
2415
+ }>>;
2416
+ readonly startedBy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2417
+ readonly kind: Schema.Literal<"person">;
2418
+ readonly name: Schema.String;
2419
+ }>, Schema.Struct<{
2420
+ readonly kind: Schema.Literal<"event">;
2421
+ readonly event: Schema.String;
2422
+ }>]>>;
2423
+ }>;
2424
+ readonly display: Schema.Struct<{
2425
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2426
+ /** A Step needed more than one attempt. */
2427
+ readonly retried: Schema.Boolean;
2428
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
2429
+ readonly summary: Schema.optionalKey<Schema.String>;
2430
+ }>;
2431
+ readonly graph: Schema.Struct<{
2432
+ /** The Steps the Run reached together, left to right. */
2433
+ readonly columns: Schema.$Array<Schema.$Array<Schema.Struct<{
2434
+ /** The Step's name in the journal, such as `agent_work/fix:1`. */
2435
+ readonly id: Schema.String;
2436
+ readonly name: Schema.String;
2437
+ readonly kind: Schema.Literals<readonly ["agent", "check", "question", "child", "wait", "activity"]>;
2438
+ readonly status: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2439
+ readonly startedAt: Schema.String;
2440
+ readonly endedAt: Schema.optionalKey<Schema.String>;
2441
+ readonly attempts: Schema.$Array<Schema.Struct<{
2442
+ readonly id: Schema.String;
2443
+ readonly attempt: Schema.Int;
2444
+ readonly status: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2445
+ readonly failureSummary: Schema.optionalKey<Schema.String>;
2446
+ }>>;
2447
+ readonly agent: Schema.optionalKey<Schema.Struct<{
2448
+ readonly id: Schema.String;
2449
+ readonly harness: Schema.optionalKey<Schema.String>;
2450
+ readonly model: Schema.optionalKey<Schema.String>;
2451
+ readonly runner: Schema.optionalKey<Schema.Struct<{
2452
+ readonly id: Schema.String;
2453
+ readonly name: Schema.String;
2454
+ }>>;
2455
+ }>>;
2456
+ readonly child: Schema.optionalKey<Schema.Struct<{
2457
+ readonly runId: Schema.String;
2458
+ readonly loopTitle: Schema.String;
2459
+ readonly display: Schema.Struct<{
2460
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2461
+ /** A Step needed more than one attempt. */
2462
+ readonly retried: Schema.Boolean;
2463
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
2464
+ readonly summary: Schema.optionalKey<Schema.String>;
2465
+ }>;
2466
+ readonly task: Schema.optionalKey<Schema.Struct<{
2467
+ readonly id: Schema.String;
2468
+ readonly key: Schema.String;
2469
+ readonly title: Schema.String;
2470
+ }>>;
2471
+ }>>;
2472
+ }>>>;
2473
+ /** From a Child Run node to one it needs: a `blocks` Task Relation joins their Tasks. */
2474
+ readonly needs: Schema.$Array<Schema.Struct<{
2475
+ readonly from: Schema.String;
2476
+ readonly to: Schema.String;
2477
+ }>>;
2478
+ }>;
2262
2479
  readonly steps: Schema.$Array<Schema.Struct<{
2263
2480
  readonly name: Schema.String;
2264
2481
  readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "blocked", "completed", "failed", "canceled"]>;
@@ -2270,6 +2487,9 @@ export declare const RunShow: Schema.Struct<{
2270
2487
  readonly attempt: Schema.Int;
2271
2488
  readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "blocked", "completed", "failed", "canceled"]>;
2272
2489
  readonly failureSummary: Schema.optionalKey<Schema.String>;
2490
+ /** What the attempt's agent submitted: its claims. */
2491
+ readonly output: Schema.optionalKey<Schema.Unknown>;
2492
+ readonly revision: Schema.optionalKey<Schema.String>;
2273
2493
  }>>;
2274
2494
  }>>;
2275
2495
  readonly questions: Schema.$Array<Schema.Struct<{
@@ -2327,6 +2547,19 @@ export declare const RunShow: Schema.Struct<{
2327
2547
  readonly data: Schema.optionalKey<Schema.Unknown>;
2328
2548
  readonly createdAt: Schema.String;
2329
2549
  }>>;
2550
+ /** The `review-findings` artifacts of every Run in this Run's lineage. */
2551
+ readonly findings: Schema.$Array<Schema.Struct<{
2552
+ readonly id: Schema.String;
2553
+ readonly runId: Schema.String;
2554
+ readonly projectId: Schema.optionalKey<Schema.String>;
2555
+ readonly taskId: Schema.optionalKey<Schema.String>;
2556
+ readonly step: Schema.String;
2557
+ readonly kind: Schema.String;
2558
+ readonly title: Schema.String;
2559
+ readonly text: Schema.String;
2560
+ readonly data: Schema.optionalKey<Schema.Unknown>;
2561
+ readonly createdAt: Schema.String;
2562
+ }>>;
2330
2563
  readonly events: Schema.$Array<Schema.Struct<{
2331
2564
  readonly id: Schema.String;
2332
2565
  readonly type: Schema.String;
@@ -2427,26 +2660,6 @@ export declare const ProgramLoop: Schema.Struct<{
2427
2660
  readonly package: Schema.String;
2428
2661
  }>;
2429
2662
  export type ProgramLoop = (typeof ProgramLoop)['Type'];
2430
- /** A Loop as it resolves where it was asked about. */
2431
- export declare const LoopDetail: Schema.Struct<{
2432
- readonly id: Schema.String;
2433
- readonly resolved: Schema.optionalKey<Schema.Struct<{
2434
- readonly id: Schema.String;
2435
- readonly title: Schema.String;
2436
- readonly layer: Schema.Literals<readonly ["project", "workspace", "shipped"]>;
2437
- readonly digest: Schema.String;
2438
- readonly outcome: Schema.optionalKey<Schema.String>;
2439
- readonly offers: Schema.$Array<Schema.Struct<{
2440
- readonly id: Schema.String;
2441
- readonly title: Schema.String;
2442
- readonly loop: Schema.String;
2443
- }>>;
2444
- readonly publishedAt: Schema.String;
2445
- /** The Package that declares it. */
2446
- readonly package: Schema.String;
2447
- }>>;
2448
- }>;
2449
- export type LoopDetail = (typeof LoopDetail)['Type'];
2450
2663
  /** What an Event did to one program Loop: the Run it started, or why it started none. */
2451
2664
  export declare const AutomaticStart: Schema.Struct<{
2452
2665
  readonly eventId: Schema.String;
@@ -2547,8 +2760,9 @@ export declare const ProgramLoopList: Schema.Struct<{
2547
2760
  }>>;
2548
2761
  }>;
2549
2762
  export type ProgramLoopList = (typeof ProgramLoopList)['Type'];
2550
- export declare const RunList: Schema.Struct<{
2551
- readonly items: Schema.$Array<Schema.Struct<{
2763
+ /** A top-level Run as a list row shows it (ADR-0072). */
2764
+ export declare const RunListItem: Schema.Struct<{
2765
+ readonly run: Schema.Struct<{
2552
2766
  readonly id: Schema.String;
2553
2767
  readonly workspaceId: Schema.String;
2554
2768
  readonly projectId: Schema.optionalKey<Schema.String>;
@@ -2686,7 +2900,189 @@ export declare const RunList: Schema.Struct<{
2686
2900
  readonly completedAt: Schema.optionalKey<Schema.String>;
2687
2901
  readonly createdAt: Schema.String;
2688
2902
  readonly updatedAt: Schema.String;
2903
+ }>;
2904
+ readonly loop: Schema.Struct<{
2905
+ readonly id: Schema.String;
2906
+ readonly title: Schema.String;
2907
+ }>;
2908
+ readonly task: Schema.optionalKey<Schema.Struct<{
2909
+ readonly id: Schema.String;
2910
+ readonly key: Schema.String;
2911
+ readonly title: Schema.String;
2912
+ }>>;
2913
+ readonly display: Schema.Struct<{
2914
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
2915
+ /** A Step needed more than one attempt. */
2916
+ readonly retried: Schema.Boolean;
2917
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
2918
+ readonly summary: Schema.optionalKey<Schema.String>;
2919
+ }>;
2920
+ /** The worst node status of each Run graph column. */
2921
+ readonly miniGraph: Schema.$Array<Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>>;
2922
+ }>;
2923
+ export type RunListItem = (typeof RunListItem)['Type'];
2924
+ export declare const RunList: Schema.Struct<{
2925
+ readonly items: Schema.$Array<Schema.Struct<{
2926
+ readonly run: Schema.Struct<{
2927
+ readonly id: Schema.String;
2928
+ readonly workspaceId: Schema.String;
2929
+ readonly projectId: Schema.optionalKey<Schema.String>;
2930
+ readonly taskId: Schema.optionalKey<Schema.String>;
2931
+ readonly sessionId: Schema.optionalKey<Schema.String>;
2932
+ /** The Loop's id in the Package that declared it. */
2933
+ readonly loopId: Schema.String;
2934
+ /** The Package version the Run was admitted with. */
2935
+ readonly packageVersionId: Schema.optionalKey<Schema.String>;
2936
+ readonly resourceVersion: Schema.Int;
2937
+ readonly status: Schema.Literals<readonly ["pending", "running", "blocked", "completed", "failed", "canceled", "expired"]>;
2938
+ readonly trigger: Schema.Struct<{
2939
+ readonly event: Schema.String;
2940
+ readonly eventId: Schema.String;
2941
+ readonly subject: Schema.optionalKey<Schema.Struct<{
2942
+ readonly kind: Schema.String;
2943
+ readonly id: Schema.String;
2944
+ }>>;
2945
+ readonly occurredAt: Schema.String;
2946
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<LoopStepOutputDataValue, LoopStepOutputDataValue, never, never>>;
2947
+ }>;
2948
+ readonly state: Schema.Struct<{
2949
+ readonly stepStates: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2950
+ readonly stepKey: Schema.String;
2951
+ readonly sequence: Schema.Int;
2952
+ readonly attempts: Schema.Int;
2953
+ readonly stepAttemptId: Schema.optionalKey<Schema.String>;
2954
+ readonly startedAt: Schema.optionalKey<Schema.String>;
2955
+ readonly endedAt: Schema.optionalKey<Schema.String>;
2956
+ readonly output: Schema.optionalKey<Schema.Struct<{
2957
+ readonly stepKey: Schema.String;
2958
+ readonly outputSchemaRef: Schema.Struct<{
2959
+ readonly kind: Schema.Literal<"typebox_ref">;
2960
+ readonly name: Schema.String;
2961
+ readonly version: Schema.optionalKey<Schema.String>;
2962
+ readonly sha256: Schema.optionalKey<Schema.String>;
2963
+ }>;
2964
+ readonly summary: Schema.String;
2965
+ readonly data: Schema.$Record<Schema.String, Schema.Codec<LoopStepOutputDataValue, LoopStepOutputDataValue, never, never>>;
2966
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<LoopStepOutputDataValue, LoopStepOutputDataValue, never, never>>>;
2967
+ readonly refs: Schema.$Array<Schema.Struct<{
2968
+ readonly kind: Schema.Literals<readonly ["task", "kit", "memory", "decision", "knowledge_record", "context_pack", "step_attempt", "change_request", "change_request_review", "provider_action", "thread_entry", "run", "artifact"]>;
2969
+ readonly id: Schema.optionalKey<Schema.String>;
2970
+ readonly externalId: Schema.optionalKey<Schema.String>;
2971
+ readonly provider: Schema.optionalKey<Schema.String>;
2972
+ readonly title: Schema.optionalKey<Schema.String>;
2973
+ }>>;
2974
+ }>>;
2975
+ readonly failureSummary: Schema.optionalKey<Schema.String>;
2976
+ readonly updatedAt: Schema.String;
2977
+ readonly required: Schema.Literal<true>;
2978
+ readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "blocked", "completed", "failed", "canceled"]>;
2979
+ }>, Schema.Struct<{
2980
+ readonly stepKey: Schema.String;
2981
+ readonly sequence: Schema.Int;
2982
+ readonly attempts: Schema.Int;
2983
+ readonly stepAttemptId: Schema.optionalKey<Schema.String>;
2984
+ readonly startedAt: Schema.optionalKey<Schema.String>;
2985
+ readonly endedAt: Schema.optionalKey<Schema.String>;
2986
+ readonly output: Schema.optionalKey<Schema.Struct<{
2987
+ readonly stepKey: Schema.String;
2988
+ readonly outputSchemaRef: Schema.Struct<{
2989
+ readonly kind: Schema.Literal<"typebox_ref">;
2990
+ readonly name: Schema.String;
2991
+ readonly version: Schema.optionalKey<Schema.String>;
2992
+ readonly sha256: Schema.optionalKey<Schema.String>;
2993
+ }>;
2994
+ readonly summary: Schema.String;
2995
+ readonly data: Schema.$Record<Schema.String, Schema.Codec<LoopStepOutputDataValue, LoopStepOutputDataValue, never, never>>;
2996
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<LoopStepOutputDataValue, LoopStepOutputDataValue, never, never>>>;
2997
+ readonly refs: Schema.$Array<Schema.Struct<{
2998
+ readonly kind: Schema.Literals<readonly ["task", "kit", "memory", "decision", "knowledge_record", "context_pack", "step_attempt", "change_request", "change_request_review", "provider_action", "thread_entry", "run", "artifact"]>;
2999
+ readonly id: Schema.optionalKey<Schema.String>;
3000
+ readonly externalId: Schema.optionalKey<Schema.String>;
3001
+ readonly provider: Schema.optionalKey<Schema.String>;
3002
+ readonly title: Schema.optionalKey<Schema.String>;
3003
+ }>>;
3004
+ }>>;
3005
+ readonly failureSummary: Schema.optionalKey<Schema.String>;
3006
+ readonly updatedAt: Schema.String;
3007
+ readonly required: Schema.Literal<false>;
3008
+ readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "blocked", "completed", "failed", "skipped", "canceled"]>;
3009
+ }>]>>;
3010
+ readonly summary: Schema.optionalKey<Schema.String>;
3011
+ readonly resultMetadata: Schema.$Record<Schema.String, Schema.Codec<LoopStepOutputDataValue, LoopStepOutputDataValue, never, never>>;
3012
+ }>;
3013
+ /** A program Run's bundle digest, fixed at admission. */
3014
+ readonly loopDigest: Schema.optionalKey<Schema.String>;
3015
+ /** The layer a program Run's Loop resolved from. */
3016
+ readonly loopLayer: Schema.optionalKey<Schema.Literals<readonly ["project", "workspace", "shipped"]>>;
3017
+ /** A Child Run's parent. */
3018
+ readonly parentRunId: Schema.optionalKey<Schema.String>;
3019
+ readonly waiting: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3020
+ readonly kind: Schema.Literal<"question">;
3021
+ readonly name: Schema.String;
3022
+ readonly questionId: Schema.String;
3023
+ }>, Schema.Struct<{
3024
+ readonly kind: Schema.Literal<"clock">;
3025
+ readonly name: Schema.String;
3026
+ readonly firesAt: Schema.String;
3027
+ }>, Schema.Struct<{
3028
+ readonly kind: Schema.Literal<"event">;
3029
+ readonly name: Schema.String;
3030
+ readonly event: Schema.String;
3031
+ readonly timesOutAt: Schema.String;
3032
+ }>, Schema.Struct<{
3033
+ readonly kind: Schema.Literal<"step">;
3034
+ readonly name: Schema.String;
3035
+ readonly stepAttemptId: Schema.String;
3036
+ }>, Schema.Struct<{
3037
+ readonly kind: Schema.Literal<"child">;
3038
+ readonly name: Schema.String;
3039
+ readonly runId: Schema.String;
3040
+ }>, Schema.Struct<{
3041
+ readonly kind: Schema.Literal<"verification">;
3042
+ readonly name: Schema.String;
3043
+ readonly verificationId: Schema.String;
3044
+ }>]>>>;
3045
+ readonly output: Schema.optionalKey<Schema.Unknown>;
3046
+ readonly failureSummary: Schema.optionalKey<Schema.String>;
3047
+ /** The latest Closure of a top-level Run. */
3048
+ readonly closure: Schema.optionalKey<Schema.Struct<{
3049
+ readonly kind: Schema.Literals<readonly ["complete", "abandoned"]>;
3050
+ readonly reason: Schema.optionalKey<Schema.String>;
3051
+ readonly closedByUserId: Schema.String;
3052
+ readonly closedAt: Schema.String;
3053
+ }>>;
3054
+ readonly alignment: Schema.optionalKey<Schema.Struct<{
3055
+ readonly verdict: Schema.Literals<readonly ["aligned", "not_aligned", "unverified"]>;
3056
+ readonly reasons: Schema.$Array<Schema.String>;
3057
+ readonly intentVersion: Schema.Int;
3058
+ readonly judgedAt: Schema.String;
3059
+ }>>;
3060
+ readonly startedAt: Schema.optionalKey<Schema.String>;
3061
+ readonly completedAt: Schema.optionalKey<Schema.String>;
3062
+ readonly createdAt: Schema.String;
3063
+ readonly updatedAt: Schema.String;
3064
+ }>;
3065
+ readonly loop: Schema.Struct<{
3066
+ readonly id: Schema.String;
3067
+ readonly title: Schema.String;
3068
+ }>;
3069
+ readonly task: Schema.optionalKey<Schema.Struct<{
3070
+ readonly id: Schema.String;
3071
+ readonly key: Schema.String;
3072
+ readonly title: Schema.String;
3073
+ }>>;
3074
+ readonly display: Schema.Struct<{
3075
+ readonly state: Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>;
3076
+ /** A Step needed more than one attempt. */
3077
+ readonly retried: Schema.Boolean;
3078
+ /** What now: the open Question, the failure, what went missing, or the Steps it is in. */
3079
+ readonly summary: Schema.optionalKey<Schema.String>;
3080
+ }>;
3081
+ /** The worst node status of each Run graph column. */
3082
+ readonly miniGraph: Schema.$Array<Schema.Literals<readonly ["queued", "running", "needs_you", "blocked", "failed", "stopped", "succeeded", "partial"]>>;
2689
3083
  }>>;
3084
+ /** The cursor for the next page, while more Runs remain. */
3085
+ readonly next: Schema.optionalKey<Schema.String>;
2690
3086
  }>;
2691
3087
  export type RunList = (typeof RunList)['Type'];
2692
3088
  export declare const RunWaitUntils: readonly ['attention', 'finished'];
@@ -32,6 +32,31 @@ export declare const LoopManifest: Schema.Struct<{
32
32
  }>, Schema.Literal<"open">]>>;
33
33
  }>;
34
34
  export type LoopManifest = typeof LoopManifest.Type;
35
+ /** A Loop as it resolves where it was asked about, with the Agent each role uses and what starts it. */
36
+ export declare const LoopDetail: Schema.Struct<{
37
+ readonly id: Schema.String;
38
+ readonly resolved: Schema.optionalKey<Schema.Struct<{
39
+ readonly id: Schema.String;
40
+ readonly title: Schema.String;
41
+ readonly layer: Schema.Literals<readonly ["project", "workspace", "shipped"]>;
42
+ readonly digest: Schema.String;
43
+ readonly outcome: Schema.optionalKey<Schema.String>;
44
+ readonly offers: Schema.$Array<Schema.Struct<{
45
+ readonly id: Schema.String;
46
+ readonly title: Schema.String;
47
+ readonly loop: Schema.String;
48
+ }>>;
49
+ readonly publishedAt: Schema.String;
50
+ readonly package: Schema.String;
51
+ readonly agents: Schema.$Record<Schema.String, Schema.String>;
52
+ readonly when: Schema.$Array<Schema.Struct<{
53
+ readonly event: Schema.String;
54
+ readonly filter: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
55
+ readonly input: Schema.$Record<Schema.String, Schema.String>;
56
+ }>>;
57
+ }>>;
58
+ }>;
59
+ export type LoopDetail = (typeof LoopDetail)['Type'];
35
60
  /** An Agent as a Package declares it, with its instructions already read from the repository. */
36
61
  export declare const AgentDeclaration: Schema.Struct<{
37
62
  readonly extends: Schema.optionalKey<Schema.String>;