@kitman-sh/sdk 0.9.0 → 0.10.52
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 +531 -116
- package/dist/{chunk-36jhc745.js → chunk-tcbgb4wm.js} +1841 -1574
- package/dist/{chunk-e1tqypyy.js → chunk-zvzw3zs4.js} +824 -419
- package/dist/loop/index.js +117 -3
- package/dist/program/index.js +8 -4
- package/package.json +6 -6
- package/types/packages/core/src/agent-capabilities.d.ts +6 -0
- package/types/packages/core/src/agent-environment.d.ts +32 -216
- package/types/packages/core/src/agent-sandbox-policy.d.ts +17 -3
- package/types/packages/core/src/change-request-review.d.ts +20 -5
- package/types/packages/core/src/change-request.d.ts +33 -208
- package/types/packages/core/src/crypto.d.ts +2 -0
- package/types/packages/core/src/index.d.ts +8 -4
- package/types/packages/core/src/{package-declarations.d.ts → kit-declarations.d.ts} +84 -180
- package/types/packages/core/src/kit-install.d.ts +130 -0
- package/types/packages/core/src/kit-setup.d.ts +316 -0
- package/types/packages/core/src/kit.d.ts +302 -1444
- package/types/packages/core/src/loop-layers.d.ts +33 -4
- package/types/packages/core/src/loop.d.ts +325 -55
- package/types/packages/core/src/marketplace.d.ts +51 -10
- package/types/packages/core/src/my-teams.d.ts +135 -20
- package/types/packages/core/src/network-host.d.ts +41 -0
- package/types/packages/core/src/notification.d.ts +8 -0
- package/types/packages/core/src/npm-registry.d.ts +65 -0
- package/types/packages/core/src/proposal.d.ts +0 -76
- package/types/packages/core/src/push.d.ts +68 -0
- package/types/packages/core/src/question-recommendation.d.ts +28 -0
- package/types/packages/core/src/redaction.d.ts +15 -3
- package/types/packages/core/src/resource-claim.d.ts +79 -0
- package/types/packages/core/src/run-display.d.ts +7 -1
- package/types/packages/core/src/run-graph.d.ts +1 -1
- package/types/packages/core/src/run-launch.d.ts +15 -2
- package/types/packages/core/src/run-queue.d.ts +28 -0
- package/types/packages/core/src/runner-eligibility.d.ts +21 -2
- package/types/packages/core/src/runner.d.ts +46 -15
- package/types/packages/core/src/secret.d.ts +18 -1
- package/types/packages/core/src/step-brief.d.ts +21 -7
- package/types/packages/core/src/sync-kit.d.ts +8 -0
- package/types/packages/core/src/task-detail.d.ts +15 -2
- package/types/packages/core/src/task.d.ts +9 -0
- package/types/packages/core/src/transcript.d.ts +24 -4
- package/types/packages/core/src/trust-panel.d.ts +1 -1
- package/types/packages/core/src/waiting-on.d.ts +14 -0
- package/types/packages/core/src/work-unit.d.ts +339 -8
- package/types/packages/live/src/rpc/runner-client.d.ts +505 -10
- package/types/packages/live/src/rpc/runner-group.d.ts +958 -28
- package/types/packages/sdk/src/build/index.d.ts +45 -9
- package/types/packages/sdk/src/loop/activities.d.ts +382 -2
- package/types/packages/sdk/src/loop/claims.d.ts +57 -0
- package/types/packages/sdk/src/loop/config.d.ts +38 -31
- package/types/packages/sdk/src/loop/continuing.d.ts +22 -0
- package/types/packages/sdk/src/loop/define.d.ts +30 -5
- package/types/packages/sdk/src/loop/evidence.d.ts +18 -3
- package/types/packages/sdk/src/loop/index.d.ts +4 -0
- package/types/packages/sdk/src/loop/measure.d.ts +132 -0
- package/types/packages/sdk/src/loop/plan.d.ts +2 -2
- package/types/packages/sdk/src/loop/steps.d.ts +127 -17
- package/types/packages/sdk/src/loop/sync.d.ts +53 -0
- package/types/packages/sdk/src/loop/test-loop.d.ts +25 -5
- package/types/packages/sdk/src/program/engine.d.ts +95 -3
- package/types/packages/sdk/src/program/host.d.ts +198 -36
- package/types/packages/core/src/engineering-resources.d.ts +0 -24
- package/types/packages/core/src/package.d.ts +0 -369
|
@@ -20,23 +20,37 @@ export type AgentSandboxNetwork = (typeof AgentSandboxNetwork)['Type'];
|
|
|
20
20
|
export type AgentSandboxPolicy = (typeof AgentSandboxPolicy)['Type'];
|
|
21
21
|
/** SSH keys and cloud credentials no sandboxed agent may read. */
|
|
22
22
|
export declare const AgentSandboxCredentialPaths: readonly ['~/.ssh', '~/.aws', '~/.azure', '~/.config/gcloud', '~/.kube', '~/.docker/config.json', '~/.netrc', '~/.git-credentials', '~/.config/gh', '~/.config/glab-cli', '~/.config/kitman/auth.json'];
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Toolchain installs in the home directory a sandboxed agent or check may read, and mise's config, without which its
|
|
25
|
+
* shims drop every tool from `PATH`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const AgentSandboxToolchainPaths: readonly ['~/.local/bin', '~/.local/share/mise', '~/.config/mise', '~/.bun', '~/.nvm', '~/.volta', '~/.rustup', '~/.cargo/bin', '~/.asdf/installs', '~/.asdf/shims', '~/.pyenv/versions', '~/.pyenv/shims', '~/.deno/bin', '~/go/bin'];
|
|
28
|
+
/**
|
|
29
|
+
* The Runner's part of a policy: the home directory is unreadable but for toolchains, and credentials stay denied within
|
|
30
|
+
* anything allowed back. The Agent Backend adds the workspace, the Harness's config and login.
|
|
31
|
+
*/
|
|
24
32
|
export declare const runnerAgentSandboxPolicy: () => AgentSandboxPolicy;
|
|
25
33
|
/** npm, PyPI, crates.io, the Go module proxy, RubyGems and Maven Central. */
|
|
26
34
|
export declare const PackageRegistryHosts: readonly ['registry.npmjs.org', 'pypi.org', 'files.pythonhosted.org', 'crates.io', 'static.crates.io', 'index.crates.io', 'proxy.golang.org', 'sum.golang.org', 'rubygems.org', 'index.rubygems.org', 'repo.maven.apache.org', 'repo1.maven.org'];
|
|
27
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Where an agent Step may connect: Kitman, its Harness's model providers, package registries, its git host, its Agent's
|
|
37
|
+
* own hosts and those its Team and RepoBinding allow. Only the Agent can open the network.
|
|
38
|
+
*/
|
|
28
39
|
export declare const agentNetworkAllowlist: (input: {
|
|
29
40
|
readonly apiUrl: string;
|
|
30
41
|
readonly storageOrigin?: string | undefined;
|
|
31
42
|
readonly providerHosts: readonly string[];
|
|
32
43
|
readonly repoBindingHost?: string;
|
|
33
44
|
readonly agent?: AgentSandboxNetwork;
|
|
45
|
+
/** The hosts the Step's Team and RepoBinding allow. */
|
|
46
|
+
readonly allowed?: readonly string[];
|
|
34
47
|
}) => AgentSandboxNetwork;
|
|
35
|
-
/** Where a check may connect: Kitman,
|
|
48
|
+
/** Where a check may connect: Kitman, registries, its git host and the hosts its Runner, Team and RepoBinding add. */
|
|
36
49
|
export declare const verificationNetworkAllowlist: (input: {
|
|
37
50
|
readonly apiUrl: string;
|
|
38
51
|
readonly storageOrigin?: string | undefined;
|
|
39
52
|
readonly repoBindingHost: string;
|
|
53
|
+
readonly hosts?: readonly string[];
|
|
40
54
|
}) => "open" | {
|
|
41
55
|
readonly hosts: readonly string[];
|
|
42
56
|
};
|
|
@@ -37,12 +37,13 @@ export declare const ChangeRequestReview: Schema.Struct<{
|
|
|
37
37
|
readonly workspaceId: Schema.String;
|
|
38
38
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
39
39
|
readonly changeRequestId: Schema.String;
|
|
40
|
-
readonly taskId: Schema.String;
|
|
41
40
|
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
42
41
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
43
42
|
readonly reviewerActorType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>>;
|
|
44
43
|
readonly reviewerActorId: Schema.optionalKey<Schema.String>;
|
|
45
44
|
readonly outcome: Schema.Literals<readonly ["approved", "changes_requested", "commented", "needs_human", "failed"]>;
|
|
45
|
+
/** The head revision reviewed; an approval approves only this commit. */
|
|
46
|
+
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
46
47
|
/** A person's words, or an agent's summary held to ChangeRequestReviewSafeSummary when it was written. */
|
|
47
48
|
readonly summary: Schema.String;
|
|
48
49
|
readonly providerActionRefs: Schema.$Array<Schema.Struct<{
|
|
@@ -72,12 +73,13 @@ export declare const ChangeRequestReviewList: Schema.Struct<{
|
|
|
72
73
|
readonly workspaceId: Schema.String;
|
|
73
74
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
74
75
|
readonly changeRequestId: Schema.String;
|
|
75
|
-
readonly taskId: Schema.String;
|
|
76
76
|
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
77
77
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
78
78
|
readonly reviewerActorType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>>;
|
|
79
79
|
readonly reviewerActorId: Schema.optionalKey<Schema.String>;
|
|
80
80
|
readonly outcome: Schema.Literals<readonly ["approved", "changes_requested", "commented", "needs_human", "failed"]>;
|
|
81
|
+
/** The head revision reviewed; an approval approves only this commit. */
|
|
82
|
+
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
81
83
|
/** A person's words, or an agent's summary held to ChangeRequestReviewSafeSummary when it was written. */
|
|
82
84
|
readonly summary: Schema.String;
|
|
83
85
|
readonly providerActionRefs: Schema.$Array<Schema.Struct<{
|
|
@@ -109,12 +111,13 @@ export declare const ChangeRequestReviewDetail: Schema.Struct<{
|
|
|
109
111
|
readonly workspaceId: Schema.String;
|
|
110
112
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
111
113
|
readonly changeRequestId: Schema.String;
|
|
112
|
-
readonly taskId: Schema.String;
|
|
113
114
|
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
114
115
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
115
116
|
readonly reviewerActorType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>>;
|
|
116
117
|
readonly reviewerActorId: Schema.optionalKey<Schema.String>;
|
|
117
118
|
readonly outcome: Schema.Literals<readonly ["approved", "changes_requested", "commented", "needs_human", "failed"]>;
|
|
119
|
+
/** The head revision reviewed; an approval approves only this commit. */
|
|
120
|
+
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
118
121
|
/** A person's words, or an agent's summary held to ChangeRequestReviewSafeSummary when it was written. */
|
|
119
122
|
readonly summary: Schema.String;
|
|
120
123
|
readonly providerActionRefs: Schema.$Array<Schema.Struct<{
|
|
@@ -142,6 +145,8 @@ export declare const ChangeRequestReviewDetail: Schema.Struct<{
|
|
|
142
145
|
/** A person's words on a settled Run's ChangeRequest. */
|
|
143
146
|
export declare const RunChangesRequest: Schema.Struct<{
|
|
144
147
|
readonly text: Schema.String;
|
|
148
|
+
/** As on `RunStart`, for the next Run. */
|
|
149
|
+
readonly overrideBlockers: Schema.optionalKey<Schema.Boolean>;
|
|
145
150
|
}>;
|
|
146
151
|
/** The review that recorded them, and the next Run of the Loop that makes them. */
|
|
147
152
|
export declare const RunChangesRequested: Schema.Struct<{
|
|
@@ -150,12 +155,13 @@ export declare const RunChangesRequested: Schema.Struct<{
|
|
|
150
155
|
readonly workspaceId: Schema.String;
|
|
151
156
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
152
157
|
readonly changeRequestId: Schema.String;
|
|
153
|
-
readonly taskId: Schema.String;
|
|
154
158
|
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
155
159
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
156
160
|
readonly reviewerActorType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>>;
|
|
157
161
|
readonly reviewerActorId: Schema.optionalKey<Schema.String>;
|
|
158
162
|
readonly outcome: Schema.Literals<readonly ["approved", "changes_requested", "commented", "needs_human", "failed"]>;
|
|
163
|
+
/** The head revision reviewed; an approval approves only this commit. */
|
|
164
|
+
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
159
165
|
/** A person's words, or an agent's summary held to ChangeRequestReviewSafeSummary when it was written. */
|
|
160
166
|
readonly summary: Schema.String;
|
|
161
167
|
readonly providerActionRefs: Schema.$Array<Schema.Struct<{
|
|
@@ -187,7 +193,7 @@ export declare const RunChangesRequested: Schema.Struct<{
|
|
|
187
193
|
readonly taskId: Schema.optionalKey<Schema.String>;
|
|
188
194
|
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
189
195
|
readonly loopId: Schema.String;
|
|
190
|
-
readonly
|
|
196
|
+
readonly kitVersionId: Schema.optionalKey<Schema.String>;
|
|
191
197
|
readonly resourceVersion: Schema.Int;
|
|
192
198
|
readonly status: Schema.Literals<readonly ["pending", "running", "blocked", "completed", "failed", "canceled", "expired"]>;
|
|
193
199
|
readonly trigger: Schema.Struct<{
|
|
@@ -267,7 +273,9 @@ export declare const RunChangesRequested: Schema.Struct<{
|
|
|
267
273
|
}>;
|
|
268
274
|
readonly loopDigest: Schema.optionalKey<Schema.String>;
|
|
269
275
|
readonly loopLayer: Schema.optionalKey<Schema.Literals<readonly ["team", "workspace", "shipped"]>>;
|
|
276
|
+
readonly loopVersion: Schema.optionalKey<Schema.String>;
|
|
270
277
|
readonly parentRunId: Schema.optionalKey<Schema.String>;
|
|
278
|
+
readonly continuesRunId: Schema.optionalKey<Schema.String>;
|
|
271
279
|
readonly waiting: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
272
280
|
readonly kind: Schema.Literal<"question">;
|
|
273
281
|
readonly name: Schema.String;
|
|
@@ -293,6 +301,13 @@ export declare const RunChangesRequested: Schema.Struct<{
|
|
|
293
301
|
readonly kind: Schema.Literal<"verification">;
|
|
294
302
|
readonly name: Schema.String;
|
|
295
303
|
readonly verificationId: Schema.String;
|
|
304
|
+
}>, Schema.Struct<{
|
|
305
|
+
readonly kind: Schema.Literal<"queue">;
|
|
306
|
+
readonly name: Schema.String;
|
|
307
|
+
readonly workUnitId: Schema.String;
|
|
308
|
+
readonly rank: Schema.Literals<readonly ["in_progress", "finishing", "new"]>;
|
|
309
|
+
readonly position: Schema.Int;
|
|
310
|
+
readonly reason: Schema.String;
|
|
296
311
|
}>]>>>;
|
|
297
312
|
readonly output: Schema.optionalKey<Schema.Unknown>;
|
|
298
313
|
readonly failureSummary: Schema.optionalKey<Schema.String>;
|
|
@@ -2,10 +2,6 @@ import * as Schema from 'effect/Schema';
|
|
|
2
2
|
import { ActorType } from './common';
|
|
3
3
|
export declare const ChangeRequestStatuses: readonly ['draft', 'open', 'closed', 'merged'];
|
|
4
4
|
export declare const ChangeRequestStatus: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
5
|
-
export declare const ChangeRequestAssociationStatuses: readonly ['active', 'unlinked', 'conflict'];
|
|
6
|
-
export declare const ChangeRequestAssociationStatus: Schema.Literals<readonly ["active", "unlinked", "conflict"]>;
|
|
7
|
-
export declare const ChangeRequestRoles: readonly ['primary', 'supporting', 'replacement'];
|
|
8
|
-
export declare const ChangeRequestRole: Schema.Literals<readonly ["primary", "supporting", "replacement"]>;
|
|
9
5
|
export declare const ChangeRequestProviderRef: Schema.Struct<{
|
|
10
6
|
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
11
7
|
readonly host: Schema.String;
|
|
@@ -35,8 +31,8 @@ export declare const ChangeRequest: Schema.Struct<{
|
|
|
35
31
|
readonly id: Schema.String;
|
|
36
32
|
readonly workspaceId: Schema.String;
|
|
37
33
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
38
|
-
|
|
39
|
-
readonly
|
|
34
|
+
/** The Tasks it delivers; none for a taskless Run's, such as a scheduled Sweep's batch. */
|
|
35
|
+
readonly taskIds: Schema.$Array<Schema.String>;
|
|
40
36
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
41
37
|
readonly repoBindingId: Schema.String;
|
|
42
38
|
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
@@ -51,8 +47,6 @@ export declare const ChangeRequest: Schema.Struct<{
|
|
|
51
47
|
readonly targetBranch: Schema.String;
|
|
52
48
|
readonly status: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
53
49
|
readonly draft: Schema.Boolean;
|
|
54
|
-
readonly associationStatus: Schema.Literals<readonly ["active", "unlinked", "conflict"]>;
|
|
55
|
-
readonly associationRevision: Schema.Int;
|
|
56
50
|
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
57
51
|
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
58
52
|
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
@@ -80,8 +74,8 @@ export declare const ChangeRequestList: Schema.Struct<{
|
|
|
80
74
|
readonly id: Schema.String;
|
|
81
75
|
readonly workspaceId: Schema.String;
|
|
82
76
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
83
|
-
|
|
84
|
-
readonly
|
|
77
|
+
/** The Tasks it delivers; none for a taskless Run's, such as a scheduled Sweep's batch. */
|
|
78
|
+
readonly taskIds: Schema.$Array<Schema.String>;
|
|
85
79
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
86
80
|
readonly repoBindingId: Schema.String;
|
|
87
81
|
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
@@ -96,8 +90,6 @@ export declare const ChangeRequestList: Schema.Struct<{
|
|
|
96
90
|
readonly targetBranch: Schema.String;
|
|
97
91
|
readonly status: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
98
92
|
readonly draft: Schema.Boolean;
|
|
99
|
-
readonly associationStatus: Schema.Literals<readonly ["active", "unlinked", "conflict"]>;
|
|
100
|
-
readonly associationRevision: Schema.Int;
|
|
101
93
|
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
102
94
|
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
103
95
|
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
@@ -127,8 +119,8 @@ export declare const ChangeRequestDetail: Schema.Struct<{
|
|
|
127
119
|
readonly id: Schema.String;
|
|
128
120
|
readonly workspaceId: Schema.String;
|
|
129
121
|
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
130
|
-
|
|
131
|
-
readonly
|
|
122
|
+
/** The Tasks it delivers; none for a taskless Run's, such as a scheduled Sweep's batch. */
|
|
123
|
+
readonly taskIds: Schema.$Array<Schema.String>;
|
|
132
124
|
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
133
125
|
readonly repoBindingId: Schema.String;
|
|
134
126
|
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
@@ -143,8 +135,6 @@ export declare const ChangeRequestDetail: Schema.Struct<{
|
|
|
143
135
|
readonly targetBranch: Schema.String;
|
|
144
136
|
readonly status: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
145
137
|
readonly draft: Schema.Boolean;
|
|
146
|
-
readonly associationStatus: Schema.Literals<readonly ["active", "unlinked", "conflict"]>;
|
|
147
|
-
readonly associationRevision: Schema.Int;
|
|
148
138
|
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
149
139
|
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
150
140
|
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
@@ -199,188 +189,9 @@ export declare const ChangeRequestFiles: Schema.Struct<{
|
|
|
199
189
|
}>;
|
|
200
190
|
export type ChangeRequestChangedFile = (typeof ChangeRequestChangedFile)['Type'];
|
|
201
191
|
export type ChangeRequestFiles = (typeof ChangeRequestFiles)['Type'];
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
readonly workspaceId: Schema.String;
|
|
206
|
-
readonly teamId: Schema.optionalKey<Schema.String>;
|
|
207
|
-
readonly taskId: Schema.String;
|
|
208
|
-
readonly role: Schema.Literals<readonly ["primary", "supporting", "replacement"]>;
|
|
209
|
-
readonly stepAttemptId: Schema.optionalKey<Schema.String>;
|
|
210
|
-
readonly repoBindingId: Schema.String;
|
|
211
|
-
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
212
|
-
readonly host: Schema.String;
|
|
213
|
-
readonly owner: Schema.String;
|
|
214
|
-
readonly repositoryName: Schema.String;
|
|
215
|
-
readonly providerRepositoryId: Schema.String;
|
|
216
|
-
readonly url: Schema.String;
|
|
217
|
-
readonly externalId: Schema.String;
|
|
218
|
-
readonly title: Schema.String;
|
|
219
|
-
readonly sourceBranch: Schema.String;
|
|
220
|
-
readonly targetBranch: Schema.String;
|
|
221
|
-
readonly status: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
222
|
-
readonly draft: Schema.Boolean;
|
|
223
|
-
readonly associationStatus: Schema.Literals<readonly ["active", "unlinked", "conflict"]>;
|
|
224
|
-
readonly associationRevision: Schema.Int;
|
|
225
|
-
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
226
|
-
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
227
|
-
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
228
|
-
readonly bodyDigest: Schema.optionalKey<Schema.String>;
|
|
229
|
-
readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
230
|
-
readonly mergeable: Schema.optionalKey<Schema.Boolean>;
|
|
231
|
-
readonly mergeState: Schema.optionalKey<Schema.String>;
|
|
232
|
-
readonly checkState: Schema.optionalKey<Schema.String>;
|
|
233
|
-
readonly reviewState: Schema.optionalKey<Schema.String>;
|
|
234
|
-
readonly reviewHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
235
|
-
readonly checkHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
236
|
-
readonly snapshotObservedAt: Schema.optionalKey<Schema.String>;
|
|
237
|
-
readonly reviewObservedAt: Schema.optionalKey<Schema.String>;
|
|
238
|
-
readonly checkObservedAt: Schema.optionalKey<Schema.String>;
|
|
239
|
-
readonly reconciliationState: Schema.optionalKey<Schema.Literals<readonly ["current", "required"]>>;
|
|
240
|
-
}>>;
|
|
241
|
-
readonly lastObservedAt: Schema.String;
|
|
242
|
-
readonly createdByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
|
|
243
|
-
readonly createdByActorId: Schema.String;
|
|
244
|
-
readonly createdAt: Schema.String;
|
|
245
|
-
readonly updatedAt: Schema.String;
|
|
246
|
-
}>;
|
|
247
|
-
readonly currentTaskId: Schema.String;
|
|
248
|
-
readonly proposedTaskId: Schema.optionalKey<Schema.String>;
|
|
249
|
-
readonly repositoryCompatible: Schema.Boolean;
|
|
250
|
-
readonly canApply: Schema.Boolean;
|
|
251
|
-
}>;
|
|
252
|
-
export declare const ChangeRequestAssociationMutation: Schema.Union<readonly [Schema.Struct<{
|
|
253
|
-
readonly action: Schema.Literal<"unlink">;
|
|
254
|
-
readonly expectedRevision: Schema.Int;
|
|
255
|
-
readonly reason: Schema.String;
|
|
256
|
-
}>, Schema.Struct<{
|
|
257
|
-
readonly action: Schema.Literal<"reassign">;
|
|
258
|
-
readonly targetTaskId: Schema.String;
|
|
259
|
-
readonly expectedRevision: Schema.Int;
|
|
260
|
-
readonly reason: Schema.String;
|
|
261
|
-
}>]>;
|
|
262
|
-
export declare const ChangeRequestAssociationConflict: Schema.Struct<{
|
|
263
|
-
readonly id: Schema.String;
|
|
264
|
-
readonly workspaceId: Schema.String;
|
|
265
|
-
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
266
|
-
readonly host: Schema.String;
|
|
267
|
-
readonly owner: Schema.String;
|
|
268
|
-
readonly repositoryName: Schema.String;
|
|
269
|
-
readonly providerRepositoryId: Schema.String;
|
|
270
|
-
readonly externalId: Schema.String;
|
|
271
|
-
readonly url: Schema.String;
|
|
272
|
-
readonly title: Schema.String;
|
|
273
|
-
readonly sourceBranch: Schema.String;
|
|
274
|
-
readonly targetBranch: Schema.String;
|
|
275
|
-
readonly changeRequestStatus: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
276
|
-
readonly draft: Schema.Boolean;
|
|
277
|
-
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
278
|
-
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
279
|
-
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
280
|
-
readonly bodyDigest: Schema.optionalKey<Schema.String>;
|
|
281
|
-
readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
282
|
-
readonly mergeable: Schema.optionalKey<Schema.Boolean>;
|
|
283
|
-
readonly mergeState: Schema.optionalKey<Schema.String>;
|
|
284
|
-
readonly checkState: Schema.optionalKey<Schema.String>;
|
|
285
|
-
readonly reviewState: Schema.optionalKey<Schema.String>;
|
|
286
|
-
readonly reviewHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
287
|
-
readonly checkHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
288
|
-
readonly snapshotObservedAt: Schema.optionalKey<Schema.String>;
|
|
289
|
-
readonly reviewObservedAt: Schema.optionalKey<Schema.String>;
|
|
290
|
-
readonly checkObservedAt: Schema.optionalKey<Schema.String>;
|
|
291
|
-
readonly reconciliationState: Schema.optionalKey<Schema.Literals<readonly ["current", "required"]>>;
|
|
292
|
-
}>>;
|
|
293
|
-
readonly candidateTaskIds: Schema.$Array<Schema.String>;
|
|
294
|
-
readonly status: Schema.Literals<readonly ["open", "resolved"]>;
|
|
295
|
-
readonly revision: Schema.Int;
|
|
296
|
-
readonly createdAt: Schema.String;
|
|
297
|
-
readonly resolvedAt: Schema.optionalKey<Schema.String>;
|
|
298
|
-
}>;
|
|
299
|
-
export declare const ChangeRequestAssociationConflictList: Schema.Struct<{
|
|
300
|
-
readonly items: Schema.$Array<Schema.Struct<{
|
|
301
|
-
readonly id: Schema.String;
|
|
302
|
-
readonly workspaceId: Schema.String;
|
|
303
|
-
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
304
|
-
readonly host: Schema.String;
|
|
305
|
-
readonly owner: Schema.String;
|
|
306
|
-
readonly repositoryName: Schema.String;
|
|
307
|
-
readonly providerRepositoryId: Schema.String;
|
|
308
|
-
readonly externalId: Schema.String;
|
|
309
|
-
readonly url: Schema.String;
|
|
310
|
-
readonly title: Schema.String;
|
|
311
|
-
readonly sourceBranch: Schema.String;
|
|
312
|
-
readonly targetBranch: Schema.String;
|
|
313
|
-
readonly changeRequestStatus: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
314
|
-
readonly draft: Schema.Boolean;
|
|
315
|
-
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
316
|
-
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
317
|
-
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
318
|
-
readonly bodyDigest: Schema.optionalKey<Schema.String>;
|
|
319
|
-
readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
320
|
-
readonly mergeable: Schema.optionalKey<Schema.Boolean>;
|
|
321
|
-
readonly mergeState: Schema.optionalKey<Schema.String>;
|
|
322
|
-
readonly checkState: Schema.optionalKey<Schema.String>;
|
|
323
|
-
readonly reviewState: Schema.optionalKey<Schema.String>;
|
|
324
|
-
readonly reviewHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
325
|
-
readonly checkHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
326
|
-
readonly snapshotObservedAt: Schema.optionalKey<Schema.String>;
|
|
327
|
-
readonly reviewObservedAt: Schema.optionalKey<Schema.String>;
|
|
328
|
-
readonly checkObservedAt: Schema.optionalKey<Schema.String>;
|
|
329
|
-
readonly reconciliationState: Schema.optionalKey<Schema.Literals<readonly ["current", "required"]>>;
|
|
330
|
-
}>>;
|
|
331
|
-
readonly candidateTaskIds: Schema.$Array<Schema.String>;
|
|
332
|
-
readonly status: Schema.Literals<readonly ["open", "resolved"]>;
|
|
333
|
-
readonly revision: Schema.Int;
|
|
334
|
-
readonly createdAt: Schema.String;
|
|
335
|
-
readonly resolvedAt: Schema.optionalKey<Schema.String>;
|
|
336
|
-
}>>;
|
|
337
|
-
}>;
|
|
338
|
-
export declare const ChangeRequestAssociationConflictPreview: Schema.Struct<{
|
|
339
|
-
readonly conflict: Schema.Struct<{
|
|
340
|
-
readonly id: Schema.String;
|
|
341
|
-
readonly workspaceId: Schema.String;
|
|
342
|
-
readonly provider: Schema.Literals<readonly ["github", "gitlab", "forgejo", "gitea", "gitee", "bitbucket", "azure-devops", "generic_git"]>;
|
|
343
|
-
readonly host: Schema.String;
|
|
344
|
-
readonly owner: Schema.String;
|
|
345
|
-
readonly repositoryName: Schema.String;
|
|
346
|
-
readonly providerRepositoryId: Schema.String;
|
|
347
|
-
readonly externalId: Schema.String;
|
|
348
|
-
readonly url: Schema.String;
|
|
349
|
-
readonly title: Schema.String;
|
|
350
|
-
readonly sourceBranch: Schema.String;
|
|
351
|
-
readonly targetBranch: Schema.String;
|
|
352
|
-
readonly changeRequestStatus: Schema.Literals<readonly ["draft", "open", "closed", "merged"]>;
|
|
353
|
-
readonly draft: Schema.Boolean;
|
|
354
|
-
readonly providerMetadata: Schema.optionalKey<Schema.Struct<{
|
|
355
|
-
readonly headCommitSha: Schema.optionalKey<Schema.String>;
|
|
356
|
-
readonly baseCommitSha: Schema.optionalKey<Schema.String>;
|
|
357
|
-
readonly bodyDigest: Schema.optionalKey<Schema.String>;
|
|
358
|
-
readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
359
|
-
readonly mergeable: Schema.optionalKey<Schema.Boolean>;
|
|
360
|
-
readonly mergeState: Schema.optionalKey<Schema.String>;
|
|
361
|
-
readonly checkState: Schema.optionalKey<Schema.String>;
|
|
362
|
-
readonly reviewState: Schema.optionalKey<Schema.String>;
|
|
363
|
-
readonly reviewHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
364
|
-
readonly checkHeadCommitSha: Schema.optionalKey<Schema.String>;
|
|
365
|
-
readonly snapshotObservedAt: Schema.optionalKey<Schema.String>;
|
|
366
|
-
readonly reviewObservedAt: Schema.optionalKey<Schema.String>;
|
|
367
|
-
readonly checkObservedAt: Schema.optionalKey<Schema.String>;
|
|
368
|
-
readonly reconciliationState: Schema.optionalKey<Schema.Literals<readonly ["current", "required"]>>;
|
|
369
|
-
}>>;
|
|
370
|
-
readonly candidateTaskIds: Schema.$Array<Schema.String>;
|
|
371
|
-
readonly status: Schema.Literals<readonly ["open", "resolved"]>;
|
|
372
|
-
readonly revision: Schema.Int;
|
|
373
|
-
readonly createdAt: Schema.String;
|
|
374
|
-
readonly resolvedAt: Schema.optionalKey<Schema.String>;
|
|
375
|
-
}>;
|
|
376
|
-
readonly proposedTaskId: Schema.String;
|
|
377
|
-
readonly repositoryCompatible: Schema.Boolean;
|
|
378
|
-
readonly canApply: Schema.Boolean;
|
|
379
|
-
}>;
|
|
380
|
-
export declare const ChangeRequestAssociationConflictResolution: Schema.Struct<{
|
|
381
|
-
readonly targetTaskId: Schema.String;
|
|
382
|
-
readonly expectedRevision: Schema.Int;
|
|
383
|
-
readonly reason: Schema.String;
|
|
192
|
+
/** A Task to link a ChangeRequest to, which also lifts that Task's suppression. */
|
|
193
|
+
export declare const ChangeRequestTaskLink: Schema.Struct<{
|
|
194
|
+
readonly taskId: Schema.String;
|
|
384
195
|
}>;
|
|
385
196
|
export declare const ChangeRequestReadiness: Schema.Struct<{
|
|
386
197
|
readonly state: Schema.Literals<readonly ["ready", "blocked", "stale"]>;
|
|
@@ -428,14 +239,24 @@ export declare const ChangeRequestReadiness: Schema.Struct<{
|
|
|
428
239
|
}>;
|
|
429
240
|
type ChangeRequestReadinessInput = {
|
|
430
241
|
readonly changeRequest: Pick<ChangeRequest, 'status' | 'draft' | 'url' | 'lastObservedAt' | 'createdByActorType' | 'createdByActorId' | 'providerMetadata'>;
|
|
431
|
-
|
|
242
|
+
/** Each delivered Task's acceptance criteria; none when it delivers no Task. */
|
|
243
|
+
readonly taskAcceptanceCriteria: readonly (readonly string[])[];
|
|
432
244
|
readonly verificationCommands: readonly string[];
|
|
433
|
-
readonly reviews: readonly Pick<ChangeRequestReviewReadinessEvidence, 'outcome' | 'reviewerActorType' | 'reviewerActorId'>[];
|
|
245
|
+
readonly reviews: readonly Pick<ChangeRequestReviewReadinessEvidence, 'outcome' | 'reviewerActorType' | 'reviewerActorId' | 'headCommitSha'>[];
|
|
434
246
|
readonly connection: {
|
|
435
247
|
readonly connected: boolean;
|
|
436
248
|
readonly credentialConfigured: boolean;
|
|
437
249
|
readonly capabilities: readonly string[];
|
|
438
250
|
};
|
|
251
|
+
/** The latest pipeline result reported to Kitman for the head, when the pipeline runs outside the forge. */
|
|
252
|
+
readonly reportedPipeline?: {
|
|
253
|
+
readonly head: string;
|
|
254
|
+
readonly status: 'success' | 'failed' | 'canceled';
|
|
255
|
+
readonly reportedBy?: {
|
|
256
|
+
readonly actorType: string;
|
|
257
|
+
readonly actorId: string;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
439
260
|
readonly now: Date;
|
|
440
261
|
readonly maxAgeSeconds?: number;
|
|
441
262
|
};
|
|
@@ -443,21 +264,25 @@ type ChangeRequestReviewReadinessEvidence = {
|
|
|
443
264
|
readonly outcome: string;
|
|
444
265
|
readonly reviewerActorType?: ActorType;
|
|
445
266
|
readonly reviewerActorId?: string;
|
|
267
|
+
readonly headCommitSha?: string;
|
|
446
268
|
};
|
|
269
|
+
/** The actor id Kitman records a Run's own writes under, such as the ChangeRequest it opens or a review it approves. */
|
|
270
|
+
export declare const runActorId: (runId: string) => string;
|
|
271
|
+
/**
|
|
272
|
+
* Whether a review approves `head` independently of whoever opened the ChangeRequest: a person's, or a Run's recorded
|
|
273
|
+
* under `runActorId` once Kitman has checked it did not write the change. Any other agent, including a delegated tool
|
|
274
|
+
* such as a Step's Code Mode, cannot be tied to the Run it works for, so it may be the author.
|
|
275
|
+
*/
|
|
276
|
+
export declare function isIndependentApproval(review: ChangeRequestReviewReadinessEvidence, changeRequest: Pick<ChangeRequest, 'createdByActorType' | 'createdByActorId'>, head: string | undefined): boolean;
|
|
277
|
+
/** The `checkState` a refresh records when the forge ran no checks for the head. */
|
|
278
|
+
export declare const noForgeChecks = "none";
|
|
447
279
|
export declare function evaluateChangeRequestReadiness(input: ChangeRequestReadinessInput): ChangeRequestReadiness;
|
|
448
280
|
export type ChangeRequestStatus = (typeof ChangeRequestStatus)['Type'];
|
|
449
|
-
export type ChangeRequestRole = (typeof ChangeRequestRole)['Type'];
|
|
450
|
-
export type ChangeRequestAssociationStatus = (typeof ChangeRequestAssociationStatus)['Type'];
|
|
451
281
|
export type ChangeRequestProviderRef = (typeof ChangeRequestProviderRef)['Type'];
|
|
452
282
|
export type ChangeRequestProviderMetadata = (typeof ChangeRequestProviderMetadata)['Type'];
|
|
453
283
|
export type ChangeRequest = (typeof ChangeRequest)['Type'];
|
|
454
284
|
export type ChangeRequestList = (typeof ChangeRequestList)['Type'];
|
|
455
285
|
export type ChangeRequestDetail = (typeof ChangeRequestDetail)['Type'];
|
|
456
|
-
export type
|
|
457
|
-
export type ChangeRequestAssociationMutation = (typeof ChangeRequestAssociationMutation)['Type'];
|
|
458
|
-
export type ChangeRequestAssociationConflict = (typeof ChangeRequestAssociationConflict)['Type'];
|
|
459
|
-
export type ChangeRequestAssociationConflictList = (typeof ChangeRequestAssociationConflictList)['Type'];
|
|
460
|
-
export type ChangeRequestAssociationConflictPreview = (typeof ChangeRequestAssociationConflictPreview)['Type'];
|
|
461
|
-
export type ChangeRequestAssociationConflictResolution = (typeof ChangeRequestAssociationConflictResolution)['Type'];
|
|
286
|
+
export type ChangeRequestTaskLink = (typeof ChangeRequestTaskLink)['Type'];
|
|
462
287
|
export type ChangeRequestReadiness = (typeof ChangeRequestReadiness)['Type'];
|
|
463
288
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
type Encoding = 'hex' | 'base64' | 'base64url';
|
|
2
2
|
type Data = string | Uint8Array;
|
|
3
3
|
export declare function digestSha256(data: Data | readonly Data[], encoding: Encoding): string;
|
|
4
|
+
export declare function digestSha512(data: Data, encoding: Encoding): string;
|
|
5
|
+
export declare function digestWith(algorithm: 'sha1' | 'sha256' | 'sha384' | 'sha512', data: Data, encoding: Encoding): string;
|
|
4
6
|
export declare function hmacSha256Bytes(secret: Data, data: Data | readonly Data[]): Uint8Array;
|
|
5
7
|
export declare function hmacSha256(secret: Data, data: Data | readonly Data[], encoding: Encoding): string;
|
|
6
8
|
/** Constant-time equality; values of different lengths are unequal. */
|
|
@@ -11,7 +11,6 @@ export * from './extension';
|
|
|
11
11
|
export * from './sync-kit';
|
|
12
12
|
export * from './agent-sandbox-policy';
|
|
13
13
|
export * from './agent-launch-snapshot';
|
|
14
|
-
export * from './kit';
|
|
15
14
|
export * from './marketplace';
|
|
16
15
|
export * from './memory';
|
|
17
16
|
export * from './proposal';
|
|
@@ -36,7 +35,6 @@ export * from './global-search';
|
|
|
36
35
|
export * from './change-delivery';
|
|
37
36
|
export * from './change-request';
|
|
38
37
|
export * from './change-request-review';
|
|
39
|
-
export * from './engineering-resources';
|
|
40
38
|
export * from './delivery-policy';
|
|
41
39
|
export * from './delivery-operation';
|
|
42
40
|
export * from './epic-delivery';
|
|
@@ -47,11 +45,14 @@ export * from './github-delivery-fixtures';
|
|
|
47
45
|
export * from './integration';
|
|
48
46
|
export * from './enterprise-forge';
|
|
49
47
|
export * from './loop';
|
|
48
|
+
export * from './question-recommendation';
|
|
50
49
|
export * from './run-file';
|
|
51
50
|
export * from './storage';
|
|
52
51
|
export * from './run-launch';
|
|
52
|
+
export * from './resource-claim';
|
|
53
53
|
export * from './my-teams';
|
|
54
54
|
export * from './notification';
|
|
55
|
+
export * from './push';
|
|
55
56
|
export * from './intent';
|
|
56
57
|
export * from './loop-version';
|
|
57
58
|
export * from './id';
|
|
@@ -72,10 +73,13 @@ export * from './following';
|
|
|
72
73
|
export * from './approval-queue';
|
|
73
74
|
export * from './data-lifecycle';
|
|
74
75
|
export * from './run-display';
|
|
76
|
+
export * from './run-queue';
|
|
75
77
|
export * from './run-graph';
|
|
76
78
|
export * from './trust-panel';
|
|
77
79
|
export * from './run-journal';
|
|
78
80
|
export * from './loop-layers';
|
|
79
|
-
export * from './
|
|
81
|
+
export * from './kit-declarations';
|
|
80
82
|
export * from './secret';
|
|
81
|
-
export * from './
|
|
83
|
+
export * from './network-host';
|
|
84
|
+
export * from './kit';
|
|
85
|
+
export * from './kit-install';
|