@kitman-sh/sdk 0.9.0 → 0.10.53

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 (63) hide show
  1. package/dist/build/index.js +531 -116
  2. package/dist/{chunk-36jhc745.js → chunk-tcbgb4wm.js} +1841 -1574
  3. package/dist/{chunk-e1tqypyy.js → chunk-zvzw3zs4.js} +824 -419
  4. package/dist/loop/index.js +117 -3
  5. package/dist/program/index.js +8 -4
  6. package/package.json +6 -6
  7. package/types/packages/core/src/agent-capabilities.d.ts +6 -0
  8. package/types/packages/core/src/agent-environment.d.ts +32 -216
  9. package/types/packages/core/src/agent-sandbox-policy.d.ts +17 -3
  10. package/types/packages/core/src/change-request-review.d.ts +20 -5
  11. package/types/packages/core/src/change-request.d.ts +33 -208
  12. package/types/packages/core/src/crypto.d.ts +2 -0
  13. package/types/packages/core/src/index.d.ts +8 -4
  14. package/types/packages/core/src/{package-declarations.d.ts → kit-declarations.d.ts} +84 -180
  15. package/types/packages/core/src/kit-install.d.ts +130 -0
  16. package/types/packages/core/src/kit-setup.d.ts +316 -0
  17. package/types/packages/core/src/kit.d.ts +302 -1444
  18. package/types/packages/core/src/loop-layers.d.ts +33 -4
  19. package/types/packages/core/src/loop.d.ts +325 -55
  20. package/types/packages/core/src/marketplace.d.ts +51 -10
  21. package/types/packages/core/src/my-teams.d.ts +135 -20
  22. package/types/packages/core/src/network-host.d.ts +41 -0
  23. package/types/packages/core/src/notification.d.ts +8 -0
  24. package/types/packages/core/src/npm-registry.d.ts +65 -0
  25. package/types/packages/core/src/proposal.d.ts +0 -76
  26. package/types/packages/core/src/push.d.ts +68 -0
  27. package/types/packages/core/src/question-recommendation.d.ts +28 -0
  28. package/types/packages/core/src/redaction.d.ts +15 -3
  29. package/types/packages/core/src/resource-claim.d.ts +79 -0
  30. package/types/packages/core/src/run-display.d.ts +7 -1
  31. package/types/packages/core/src/run-graph.d.ts +1 -1
  32. package/types/packages/core/src/run-launch.d.ts +15 -2
  33. package/types/packages/core/src/run-queue.d.ts +28 -0
  34. package/types/packages/core/src/runner-eligibility.d.ts +21 -2
  35. package/types/packages/core/src/runner.d.ts +46 -15
  36. package/types/packages/core/src/secret.d.ts +18 -1
  37. package/types/packages/core/src/step-brief.d.ts +21 -7
  38. package/types/packages/core/src/sync-kit.d.ts +8 -0
  39. package/types/packages/core/src/task-detail.d.ts +15 -2
  40. package/types/packages/core/src/task.d.ts +9 -0
  41. package/types/packages/core/src/transcript.d.ts +24 -4
  42. package/types/packages/core/src/trust-panel.d.ts +1 -1
  43. package/types/packages/core/src/waiting-on.d.ts +14 -0
  44. package/types/packages/core/src/work-unit.d.ts +339 -8
  45. package/types/packages/live/src/rpc/runner-client.d.ts +505 -10
  46. package/types/packages/live/src/rpc/runner-group.d.ts +958 -28
  47. package/types/packages/sdk/src/build/index.d.ts +45 -9
  48. package/types/packages/sdk/src/loop/activities.d.ts +382 -2
  49. package/types/packages/sdk/src/loop/claims.d.ts +57 -0
  50. package/types/packages/sdk/src/loop/config.d.ts +38 -31
  51. package/types/packages/sdk/src/loop/continuing.d.ts +22 -0
  52. package/types/packages/sdk/src/loop/define.d.ts +30 -5
  53. package/types/packages/sdk/src/loop/evidence.d.ts +18 -3
  54. package/types/packages/sdk/src/loop/index.d.ts +4 -0
  55. package/types/packages/sdk/src/loop/measure.d.ts +132 -0
  56. package/types/packages/sdk/src/loop/plan.d.ts +2 -2
  57. package/types/packages/sdk/src/loop/steps.d.ts +127 -17
  58. package/types/packages/sdk/src/loop/sync.d.ts +53 -0
  59. package/types/packages/sdk/src/loop/test-loop.d.ts +25 -5
  60. package/types/packages/sdk/src/program/engine.d.ts +95 -3
  61. package/types/packages/sdk/src/program/host.d.ts +198 -36
  62. package/types/packages/core/src/engineering-resources.d.ts +0 -24
  63. package/types/packages/core/src/package.d.ts +0 -369
@@ -5,15 +5,15 @@ import type { ControlCommandList } from './run';
5
5
  export { RunnerExecutionRouting } from './runner-routing';
6
6
  export type { RunnerExecutionRouting as RunnerExecutionRoutingValue } from './runner-routing';
7
7
  export declare const DefaultRunnerHeartbeatStaleAfterSeconds = 120;
8
- export declare const RunnerProblemCodes: readonly ['credential_missing', 'credential_refused', 'runner_removed', 'sandbox_missing', 'update_failed'];
8
+ export declare const RunnerProblemCodes: readonly ['credential_missing', 'credential_refused', 'clock_skew', 'runner_removed', 'sandbox_missing', 'herdr_core_missing', 'update_failed'];
9
9
  /** A Runner Problem as the Runner reports it: what only a person can fix, and the one command or action that fixes it. */
10
10
  export declare const RunnerProblemReport: Schema.Struct<{
11
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
11
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
12
12
  readonly message: Schema.String;
13
13
  readonly fix: Schema.String;
14
14
  }>;
15
15
  export declare const RunnerProblem: Schema.Struct<{
16
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
16
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
17
17
  readonly message: Schema.String;
18
18
  readonly fix: Schema.String;
19
19
  readonly startedAt: Schema.String;
@@ -27,7 +27,7 @@ export declare const RunnerState: Schema.Union<readonly [Schema.Struct<{
27
27
  }>, Schema.Struct<{
28
28
  readonly kind: Schema.Literal<"needs_attention">;
29
29
  readonly problems: Schema.$Array<Schema.Struct<{
30
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
30
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
31
31
  readonly message: Schema.String;
32
32
  readonly fix: Schema.String;
33
33
  readonly startedAt: Schema.String;
@@ -148,6 +148,8 @@ export declare const RunnerCapabilities: Schema.Struct<{
148
148
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
149
149
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
150
150
  }>>;
151
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
152
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
151
153
  }>;
152
154
  export declare const Runner: Schema.Struct<{
153
155
  readonly id: Schema.String;
@@ -177,7 +179,7 @@ export declare const Runner: Schema.Struct<{
177
179
  }>, Schema.Struct<{
178
180
  readonly kind: Schema.Literal<"needs_attention">;
179
181
  readonly problems: Schema.$Array<Schema.Struct<{
180
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
182
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
181
183
  readonly message: Schema.String;
182
184
  readonly fix: Schema.String;
183
185
  readonly startedAt: Schema.String;
@@ -257,6 +259,8 @@ export declare const Runner: Schema.Struct<{
257
259
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
258
260
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
259
261
  }>>;
262
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
263
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
260
264
  }>;
261
265
  /** The owner's choice of default Harness; `capabilities.defaultHarness` is the one in effect. */
262
266
  readonly preferredHarness: Schema.optionalKey<Schema.Literals<readonly ["pi", "claude", "codex"]>>;
@@ -578,6 +582,8 @@ export declare const RunnerCreate: Schema.Struct<{
578
582
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
579
583
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
580
584
  }>>;
585
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
586
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
581
587
  }>>;
582
588
  readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
583
589
  }>;
@@ -613,7 +619,7 @@ export declare const RunnerRegistrationResult: Schema.Struct<{
613
619
  }>, Schema.Struct<{
614
620
  readonly kind: Schema.Literal<"needs_attention">;
615
621
  readonly problems: Schema.$Array<Schema.Struct<{
616
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
622
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
617
623
  readonly message: Schema.String;
618
624
  readonly fix: Schema.String;
619
625
  readonly startedAt: Schema.String;
@@ -693,6 +699,8 @@ export declare const RunnerRegistrationResult: Schema.Struct<{
693
699
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
694
700
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
695
701
  }>>;
702
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
703
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
696
704
  }>;
697
705
  /** The owner's choice of default Harness; `capabilities.defaultHarness` is the one in effect. */
698
706
  readonly preferredHarness: Schema.optionalKey<Schema.Literals<readonly ["pi", "claude", "codex"]>>;
@@ -727,7 +735,7 @@ export declare const RunnerHeartbeatInput: Schema.Struct<{
727
735
  readonly container: Schema.optionalKey<Schema.Boolean>;
728
736
  /** The Runner's open Problems, replacing those it reported before; empty clears them. */
729
737
  readonly problems: Schema.optionalKey<Schema.$Array<Schema.Struct<{
730
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
738
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
731
739
  readonly message: Schema.String;
732
740
  readonly fix: Schema.String;
733
741
  }>>>;
@@ -804,6 +812,8 @@ export declare const RunnerHeartbeatInput: Schema.Struct<{
804
812
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
805
813
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
806
814
  }>>;
815
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
816
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
807
817
  }>>;
808
818
  readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
809
819
  }>;
@@ -881,6 +891,8 @@ export declare const RunnerCapabilitiesUpdate: Schema.Struct<{
881
891
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
882
892
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
883
893
  }>>;
894
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
895
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
884
896
  }>;
885
897
  readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
886
898
  }>;
@@ -1038,11 +1050,14 @@ export declare const RunnerStepAttempt: Schema.Struct<{
1038
1050
  readonly contentMarkdown: Schema.String;
1039
1051
  }>>;
1040
1052
  readonly outputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
1041
- readonly skills: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1053
+ readonly kits: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1042
1054
  readonly name: Schema.String;
1043
- readonly files: Schema.$Record<Schema.String, Schema.String>;
1055
+ readonly version: Schema.String;
1056
+ readonly setupDigest: Schema.String;
1044
1057
  }>>>;
1045
1058
  readonly toolless: Schema.optionalKey<Schema.Literal<true>>;
1059
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["web", "subagents", "artifacts", "browser"]>>>;
1060
+ readonly listedSkills: Schema.optionalKey<Schema.$Array<Schema.String>>;
1046
1061
  }>>;
1047
1062
  readonly failureSummary: Schema.optionalKey<Schema.String>;
1048
1063
  readonly reviewEvidence: Schema.$Array<Schema.Struct<{
@@ -1052,6 +1067,13 @@ export declare const RunnerStepAttempt: Schema.Struct<{
1052
1067
  readonly provider: Schema.optionalKey<Schema.String>;
1053
1068
  readonly title: Schema.optionalKey<Schema.String>;
1054
1069
  }>>;
1070
+ readonly skippedChoices: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1071
+ readonly harness: Schema.optionalKey<Schema.String>;
1072
+ readonly model: Schema.optionalKey<Schema.String>;
1073
+ readonly effort: Schema.optionalKey<Schema.Literals<readonly ["low", "medium", "high", "xhigh"]>>;
1074
+ readonly reason: Schema.Literals<readonly ["not_on_runner", "out_of_quota", "failed_to_start"]>;
1075
+ readonly until: Schema.optionalKey<Schema.String>;
1076
+ }>>>;
1055
1077
  readonly lease: Schema.optionalKey<Schema.Struct<{
1056
1078
  readonly ownerId: Schema.String;
1057
1079
  readonly runnerReplicaId: Schema.optionalKey<Schema.String>;
@@ -1481,7 +1503,7 @@ export declare const RunnerOperationsOverview: Schema.Struct<{
1481
1503
  }>, Schema.Struct<{
1482
1504
  readonly kind: Schema.Literal<"needs_attention">;
1483
1505
  readonly problems: Schema.$Array<Schema.Struct<{
1484
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
1506
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
1485
1507
  readonly message: Schema.String;
1486
1508
  readonly fix: Schema.String;
1487
1509
  readonly startedAt: Schema.String;
@@ -1561,6 +1583,8 @@ export declare const RunnerOperationsOverview: Schema.Struct<{
1561
1583
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
1562
1584
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
1563
1585
  }>>;
1586
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
1587
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
1564
1588
  }>;
1565
1589
  /** The owner's choice of default Harness; `capabilities.defaultHarness` is the one in effect. */
1566
1590
  readonly preferredHarness: Schema.optionalKey<Schema.Literals<readonly ["pi", "claude", "codex"]>>;
@@ -1709,7 +1733,7 @@ export declare const RunnerOperationsLiveSnapshot: Schema.Struct<{
1709
1733
  }>, Schema.Struct<{
1710
1734
  readonly kind: Schema.Literal<"needs_attention">;
1711
1735
  readonly problems: Schema.$Array<Schema.Struct<{
1712
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
1736
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
1713
1737
  readonly message: Schema.String;
1714
1738
  readonly fix: Schema.String;
1715
1739
  readonly startedAt: Schema.String;
@@ -1789,6 +1813,8 @@ export declare const RunnerOperationsLiveSnapshot: Schema.Struct<{
1789
1813
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
1790
1814
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
1791
1815
  }>>;
1816
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
1817
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
1792
1818
  }>;
1793
1819
  /** The owner's choice of default Harness; `capabilities.defaultHarness` is the one in effect. */
1794
1820
  readonly preferredHarness: Schema.optionalKey<Schema.Literals<readonly ["pi", "claude", "codex"]>>;
@@ -2091,7 +2117,7 @@ export declare const RunnerFlightDeck: Schema.Struct<{
2091
2117
  }>, Schema.Struct<{
2092
2118
  readonly kind: Schema.Literal<"needs_attention">;
2093
2119
  readonly problems: Schema.$Array<Schema.Struct<{
2094
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
2120
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
2095
2121
  readonly message: Schema.String;
2096
2122
  readonly fix: Schema.String;
2097
2123
  readonly startedAt: Schema.String;
@@ -2267,7 +2293,7 @@ export declare const RunnerFlightDeckLiveSnapshot: Schema.Struct<{
2267
2293
  }>, Schema.Struct<{
2268
2294
  readonly kind: Schema.Literal<"needs_attention">;
2269
2295
  readonly problems: Schema.$Array<Schema.Struct<{
2270
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
2296
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
2271
2297
  readonly message: Schema.String;
2272
2298
  readonly fix: Schema.String;
2273
2299
  readonly startedAt: Schema.String;
@@ -2508,7 +2534,7 @@ export declare const RunnerList: Schema.Struct<{
2508
2534
  }>, Schema.Struct<{
2509
2535
  readonly kind: Schema.Literal<"needs_attention">;
2510
2536
  readonly problems: Schema.$Array<Schema.Struct<{
2511
- readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "runner_removed", "sandbox_missing", "update_failed"]>;
2537
+ readonly code: Schema.Literals<readonly ["credential_missing", "credential_refused", "clock_skew", "runner_removed", "sandbox_missing", "herdr_core_missing", "update_failed"]>;
2512
2538
  readonly message: Schema.String;
2513
2539
  readonly fix: Schema.String;
2514
2540
  readonly startedAt: Schema.String;
@@ -2588,6 +2614,8 @@ export declare const RunnerList: Schema.Struct<{
2588
2614
  readonly maxMemoryMb: Schema.optionalKey<Schema.Finite>;
2589
2615
  readonly maxRunSeconds: Schema.optionalKey<Schema.Finite>;
2590
2616
  }>>;
2617
+ /** It benchmarks a verification's measure; a Runner without it is offered none, as one from before measures was. */
2618
+ readonly measure: Schema.optionalKey<Schema.Boolean>;
2591
2619
  }>;
2592
2620
  /** The owner's choice of default Harness; `capabilities.defaultHarness` is the one in effect. */
2593
2621
  readonly preferredHarness: Schema.optionalKey<Schema.Literals<readonly ["pi", "claude", "codex"]>>;
@@ -2674,6 +2702,10 @@ export declare const RunnerEnvironmentMatchInput: Schema.Struct<{
2674
2702
  readonly kind: Schema.Literal<"local_path">;
2675
2703
  readonly path: Schema.String;
2676
2704
  }>]>;
2705
+ readonly appliesTo: Schema.optionalKey<Schema.Struct<{
2706
+ readonly dependencies: Schema.optionalKey<Schema.$Array<Schema.String>>;
2707
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
2708
+ }>>;
2677
2709
  }>;
2678
2710
  readonly source: Schema.Union<readonly [Schema.Struct<{
2679
2711
  readonly kind: Schema.Literal<"built_in">;
@@ -3949,7 +3981,6 @@ export declare function findForbiddenRunnerCapabilitiesPath<ValueType>(value: Va
3949
3981
  export declare function matchRunnerReplicaForWork(input: {
3950
3982
  readonly runner: Runner;
3951
3983
  readonly replica: RunnerReplica;
3952
- readonly activeWorkUnits?: number;
3953
3984
  readonly now: Date;
3954
3985
  readonly staleAfterSeconds?: number;
3955
3986
  }): {
@@ -3,11 +3,25 @@ import * as Schema from 'effect/Schema';
3
3
  export declare const SecretName: Schema.String;
4
4
  export declare const SecretScope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
5
5
  export type SecretScope = (typeof SecretScope)['Type'];
6
+ /** Where a Secret's reference may be swapped for its value: `host`, `host:port`, or `*.domain` for its subdomains. */
7
+ export declare const SecretHost: Schema.String;
8
+ export declare const SecretHosts: Schema.$Array<Schema.String>;
9
+ /**
10
+ * What a Step holds in place of a Secret's value. A proxy outside its sandbox swaps the value in where the Step sends
11
+ * the reference, and only to the Secret's hosts.
12
+ */
13
+ export declare const secretReference: (owner: string, name: string) => string;
14
+ /** `text` with each reference in it replaced by `swap`'s answer for it. */
15
+ export declare const replaceSecretReferences: (text: string, swap: (reference: string) => string) => string;
16
+ /** The references in `text`, each once. */
17
+ export declare const secretReferencesIn: (text: string) => string[];
6
18
  /** A Secret as anyone may see it: never its value. */
7
19
  export declare const SecretSummary: Schema.Struct<{
8
20
  readonly name: Schema.String;
9
21
  readonly scope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
10
22
  readonly teamId: Schema.optionalKey<Schema.String>;
23
+ /** Where a Step's reference to it may be swapped for its value; with none, no Step may take it. */
24
+ readonly hosts: Schema.$Array<Schema.String>;
11
25
  readonly setByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
12
26
  readonly setByActorId: Schema.String;
13
27
  readonly setAt: Schema.String;
@@ -18,17 +32,20 @@ export declare const SecretList: Schema.Struct<{
18
32
  readonly name: Schema.String;
19
33
  readonly scope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
20
34
  readonly teamId: Schema.optionalKey<Schema.String>;
35
+ /** Where a Step's reference to it may be swapped for its value; with none, no Step may take it. */
36
+ readonly hosts: Schema.$Array<Schema.String>;
21
37
  readonly setByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
22
38
  readonly setByActorId: Schema.String;
23
39
  readonly setAt: Schema.String;
24
40
  }>>;
25
41
  }>;
26
42
  export type SecretList = (typeof SecretList)['Type'];
27
- export declare const secretSetRefused = "A Secret takes a value of 1 to 65536 characters and an optional teamId";
43
+ export declare const secretSetRefused = "A Secret takes a value of 1 to 65536 characters, an optional teamId, and up to 32 hosts such as api.github.com, *.example.com or example.com:8443";
28
44
  /** Sets a Secret for the Workspace, or for one of its Teams; a refusal never quotes the value. */
29
45
  export declare const SecretSet: Schema.Struct<{
30
46
  readonly value: Schema.String;
31
47
  readonly teamId: Schema.optionalKey<Schema.String>;
48
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
32
49
  }>;
33
50
  export type SecretSet = (typeof SecretSet)['Type'];
34
51
  export declare const SecretScopeQuery: Schema.Struct<{
@@ -13,7 +13,8 @@ export declare function validateAgentOutput(schema: JsonObject, output: JsonObje
13
13
  readonly ok: false;
14
14
  readonly message: string;
15
15
  };
16
- /** The first message an agent receives. */
16
+ export declare const maxOutputTextLength: number;
17
+ /** The Step brief: the Harness's system prompt where it takes one there, otherwise the first message. */
17
18
  export declare function renderStepBriefPrompt(input: {
18
19
  readonly instruction: string;
19
20
  readonly contextPackMarkdown?: string;
@@ -24,15 +25,18 @@ type ContextArtifact = {
24
25
  readonly kind: string;
25
26
  readonly text: string;
26
27
  };
28
+ /** How much of one artifact's text a brief carries, about 1.5k tokens; the rest stays on the Run. */
29
+ export declare const BriefArtifactCap = 6000;
27
30
  /**
28
- * A program agent Step's ContextPack: its Task's context, this Run's artifacts, related artifacts from earlier Runs,
29
- * and what earlier attempts of the Step recorded; then the Run's Intent and steering. Undefined when there is nothing to say.
31
+ * A program agent Step's ContextPack: its Task's context, the newest artifact of each kind in this Run and in the
32
+ * Task's earlier Runs, each capped, and what earlier attempts of the Step recorded; then the Run's Intent and
33
+ * steering. Undefined when there is nothing to say.
30
34
  */
31
35
  export declare function programStepContext(input: {
32
36
  readonly taskContext?: string;
33
- /** The Team's Kits, for a Run with no Task whose ContextPack would carry them. */
34
- readonly kits?: string;
37
+ /** Oldest first. */
35
38
  readonly runArtifacts: readonly ContextArtifact[];
39
+ /** Newest first. */
36
40
  readonly earlierArtifacts: readonly ContextArtifact[];
37
41
  readonly handoff: readonly {
38
42
  readonly attempt: number;
@@ -43,8 +47,18 @@ export declare function programStepContext(input: {
43
47
  readonly intent?: string;
44
48
  readonly steering?: readonly string[];
45
49
  }): string | undefined;
46
- /** The program's prompt, and how the agent leaves a trail a retry on another Runner can follow. */
47
- export declare const programStepInstruction: (prompt: string) => string;
50
+ /**
51
+ * The skill the Step runs, then the program's prompt, then the Kitman tools every Step has: its trail for a retry,
52
+ * asking, files and skills.
53
+ */
54
+ export declare const programStepInstruction: (prompt: string, options?: {
55
+ readonly missingSkills?: readonly string[];
56
+ /** The skill the Step runs, with its SKILL.md, which is undefined when no Kit of the Run provides it. */
57
+ readonly runSkill?: {
58
+ readonly name: string;
59
+ readonly skill: string | undefined;
60
+ };
61
+ }) => string;
48
62
  type StepCredentialLease = {
49
63
  readonly stepAttemptId: string;
50
64
  readonly leaseId: string;
@@ -78,6 +78,10 @@ export declare const SyncKitActiveKit: Schema.Struct<{
78
78
  readonly kind: Schema.Literal<"local_path">;
79
79
  readonly path: Schema.String;
80
80
  }>]>;
81
+ readonly appliesTo: Schema.optionalKey<Schema.Struct<{
82
+ readonly dependencies: Schema.optionalKey<Schema.$Array<Schema.String>>;
83
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
84
+ }>>;
81
85
  }>>>;
82
86
  readonly mcpServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
83
87
  readonly name: Schema.String;
@@ -148,6 +152,10 @@ export declare const SyncKitActiveKit: Schema.Struct<{
148
152
  readonly kind: Schema.Literal<"local_path">;
149
153
  readonly path: Schema.String;
150
154
  }>]>;
155
+ readonly appliesTo: Schema.optionalKey<Schema.Struct<{
156
+ readonly dependencies: Schema.optionalKey<Schema.$Array<Schema.String>>;
157
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
158
+ }>>;
151
159
  }>>>;
152
160
  readonly plugins: Schema.optionalKey<Schema.$Array<Schema.Struct<{
153
161
  readonly name: Schema.String;
@@ -90,6 +90,9 @@ export declare const TaskDetailAggregate: Schema.Struct<{
90
90
  }>, Schema.Struct<{
91
91
  readonly kind: Schema.Literal<"event">;
92
92
  readonly eventId: Schema.String;
93
+ }>, Schema.Struct<{
94
+ readonly kind: Schema.Literal<"alert">;
95
+ readonly fingerprint: Schema.String;
93
96
  }>, Schema.Struct<{
94
97
  readonly kind: Schema.Literal<"migrated">;
95
98
  readonly previousKeys: Schema.$Array<Schema.String>;
@@ -320,11 +323,14 @@ export declare const TaskDetailAggregate: Schema.Struct<{
320
323
  readonly contentMarkdown: Schema.String;
321
324
  }>>;
322
325
  readonly outputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
323
- readonly skills: Schema.optionalKey<Schema.$Array<Schema.Struct<{
326
+ readonly kits: Schema.optionalKey<Schema.$Array<Schema.Struct<{
324
327
  readonly name: Schema.String;
325
- readonly files: Schema.$Record<Schema.String, Schema.String>;
328
+ readonly version: Schema.String;
329
+ readonly setupDigest: Schema.String;
326
330
  }>>>;
327
331
  readonly toolless: Schema.optionalKey<Schema.Literal<true>>;
332
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["web", "subagents", "artifacts", "browser"]>>>;
333
+ readonly listedSkills: Schema.optionalKey<Schema.$Array<Schema.String>>;
328
334
  }>>;
329
335
  readonly failureSummary: Schema.optionalKey<Schema.String>;
330
336
  readonly reviewEvidence: Schema.$Array<Schema.Struct<{
@@ -334,6 +340,13 @@ export declare const TaskDetailAggregate: Schema.Struct<{
334
340
  readonly provider: Schema.optionalKey<Schema.String>;
335
341
  readonly title: Schema.optionalKey<Schema.String>;
336
342
  }>>;
343
+ readonly skippedChoices: Schema.optionalKey<Schema.$Array<Schema.Struct<{
344
+ readonly harness: Schema.optionalKey<Schema.String>;
345
+ readonly model: Schema.optionalKey<Schema.String>;
346
+ readonly effort: Schema.optionalKey<Schema.Literals<readonly ["low", "medium", "high", "xhigh"]>>;
347
+ readonly reason: Schema.Literals<readonly ["not_on_runner", "out_of_quota", "failed_to_start"]>;
348
+ readonly until: Schema.optionalKey<Schema.String>;
349
+ }>>>;
337
350
  readonly lease: Schema.optionalKey<Schema.Struct<{
338
351
  readonly ownerId: Schema.String;
339
352
  readonly runnerReplicaId: Schema.optionalKey<Schema.String>;
@@ -13,6 +13,9 @@ export declare const TaskOrigin: Schema.Union<readonly [Schema.Struct<{
13
13
  }>, Schema.Struct<{
14
14
  readonly kind: Schema.Literal<"event">;
15
15
  readonly eventId: Schema.String;
16
+ }>, Schema.Struct<{
17
+ readonly kind: Schema.Literal<"alert">;
18
+ readonly fingerprint: Schema.String;
16
19
  }>, Schema.Struct<{
17
20
  readonly kind: Schema.Literal<"migrated">;
18
21
  readonly previousKeys: Schema.$Array<Schema.String>;
@@ -58,6 +61,9 @@ export declare const Task: Schema.Struct<{
58
61
  }>, Schema.Struct<{
59
62
  readonly kind: Schema.Literal<"event">;
60
63
  readonly eventId: Schema.String;
64
+ }>, Schema.Struct<{
65
+ readonly kind: Schema.Literal<"alert">;
66
+ readonly fingerprint: Schema.String;
61
67
  }>, Schema.Struct<{
62
68
  readonly kind: Schema.Literal<"migrated">;
63
69
  readonly previousKeys: Schema.$Array<Schema.String>;
@@ -107,6 +113,9 @@ export declare const TaskList: Schema.Struct<{
107
113
  }>, Schema.Struct<{
108
114
  readonly kind: Schema.Literal<"event">;
109
115
  readonly eventId: Schema.String;
116
+ }>, Schema.Struct<{
117
+ readonly kind: Schema.Literal<"alert">;
118
+ readonly fingerprint: Schema.String;
110
119
  }>, Schema.Struct<{
111
120
  readonly kind: Schema.Literal<"migrated">;
112
121
  readonly previousKeys: Schema.$Array<Schema.String>;
@@ -31,9 +31,14 @@ export declare const AgentEvent: Schema.Union<readonly [Schema.Struct<{
31
31
  readonly kind: Schema.Literal<"steer">;
32
32
  readonly messageId: Schema.String;
33
33
  readonly text: Schema.String;
34
+ }>, Schema.Struct<{
35
+ readonly kind: Schema.Literal<"secret_refused">;
36
+ readonly reference: Schema.optionalKey<Schema.String>;
37
+ readonly host: Schema.String;
38
+ readonly reason: Schema.String;
34
39
  }>, Schema.Struct<{
35
40
  readonly kind: Schema.Literal<"lifecycle">;
36
- readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
41
+ readonly state: Schema.Literals<readonly ["started", "resumed", "parked", "finished", "failed", "canceled"]>;
37
42
  }>]>;
38
43
  export type AgentEvent = (typeof AgentEvent)['Type'];
39
44
  /** What replaces the words of an erased person's steers and answers. */
@@ -71,9 +76,14 @@ export declare const TranscriptAppendEntry: Schema.Struct<{
71
76
  readonly kind: Schema.Literal<"steer">;
72
77
  readonly messageId: Schema.String;
73
78
  readonly text: Schema.String;
79
+ }>, Schema.Struct<{
80
+ readonly kind: Schema.Literal<"secret_refused">;
81
+ readonly reference: Schema.optionalKey<Schema.String>;
82
+ readonly host: Schema.String;
83
+ readonly reason: Schema.String;
74
84
  }>, Schema.Struct<{
75
85
  readonly kind: Schema.Literal<"lifecycle">;
76
- readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
86
+ readonly state: Schema.Literals<readonly ["started", "resumed", "parked", "finished", "failed", "canceled"]>;
77
87
  }>]>;
78
88
  }>;
79
89
  export type TranscriptAppendEntry = (typeof TranscriptAppendEntry)['Type'];
@@ -110,9 +120,14 @@ export declare const TranscriptEntry: Schema.Struct<{
110
120
  readonly kind: Schema.Literal<"steer">;
111
121
  readonly messageId: Schema.String;
112
122
  readonly text: Schema.String;
123
+ }>, Schema.Struct<{
124
+ readonly kind: Schema.Literal<"secret_refused">;
125
+ readonly reference: Schema.optionalKey<Schema.String>;
126
+ readonly host: Schema.String;
127
+ readonly reason: Schema.String;
113
128
  }>, Schema.Struct<{
114
129
  readonly kind: Schema.Literal<"lifecycle">;
115
- readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
130
+ readonly state: Schema.Literals<readonly ["started", "resumed", "parked", "finished", "failed", "canceled"]>;
116
131
  }>]>;
117
132
  readonly createdAt: Schema.String;
118
133
  }>;
@@ -157,9 +172,14 @@ export declare const TranscriptPage: Schema.Struct<{
157
172
  readonly kind: Schema.Literal<"steer">;
158
173
  readonly messageId: Schema.String;
159
174
  readonly text: Schema.String;
175
+ }>, Schema.Struct<{
176
+ readonly kind: Schema.Literal<"secret_refused">;
177
+ readonly reference: Schema.optionalKey<Schema.String>;
178
+ readonly host: Schema.String;
179
+ readonly reason: Schema.String;
160
180
  }>, Schema.Struct<{
161
181
  readonly kind: Schema.Literal<"lifecycle">;
162
- readonly state: Schema.Literals<readonly ["started", "resumed", "finished", "failed", "canceled"]>;
182
+ readonly state: Schema.Literals<readonly ["started", "resumed", "parked", "finished", "failed", "canceled"]>;
163
183
  }>]>;
164
184
  readonly createdAt: Schema.String;
165
185
  }>>;
@@ -1,4 +1,4 @@
1
- import type { ChangeRequest } from './change-request';
1
+ import { type ChangeRequest } from './change-request';
2
2
  import type { RunShow } from './loop';
3
3
  export type TrustStatus = 'failed' | 'partial' | 'unproved' | 'verified' | 'claims';
4
4
  /** One kind of evidence a person reads before merging, with where it came from. */
@@ -0,0 +1,14 @@
1
+ import * as Schema from 'effect/Schema';
2
+ /** The open blockers a Task waits on; `hidden` counts those in Teams the reader cannot see. */
3
+ export declare const WaitingOn: Schema.Struct<{
4
+ readonly keys: Schema.$Array<Schema.String>;
5
+ readonly hidden: Schema.Int;
6
+ }>;
7
+ export type WaitingOn = typeof WaitingOn.Type;
8
+ /** What a reader may see of a Task's open blockers. */
9
+ export declare const waitingOnFrom: (blockers: readonly {
10
+ readonly key: string;
11
+ readonly readable: boolean;
12
+ }[]) => WaitingOn;
13
+ /** The blockers in words: `KIT-158, KIT-159 and 1 Task you cannot see`. */
14
+ export declare const waitingOnWords: ({ keys, hidden }: WaitingOn) => string;