@distilled.cloud/namespacelabs 0.0.0 → 1.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +130 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +73 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +59 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +44 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/pagination.d.ts +2 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +12 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/buildkite_jobs.d.ts +129 -0
- package/lib/services/buildkite_jobs.d.ts.map +1 -0
- package/lib/services/buildkite_jobs.js +2 -0
- package/lib/services/buildkite_jobs.js.map +1 -0
- package/lib/services/buildkite_queue.d.ts +186 -0
- package/lib/services/buildkite_queue.d.ts.map +1 -0
- package/lib/services/buildkite_queue.js +2 -0
- package/lib/services/buildkite_queue.js.map +1 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +2 -0
- package/lib/services.lazy/buildkite_jobs.js +1 -0
- package/lib/services.lazy/buildkite_queue.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/traits.d.ts +3 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/lib/unstable-services/artifacts.d.ts +268 -0
- package/lib/unstable-services/artifacts.d.ts.map +1 -0
- package/lib/unstable-services/artifacts.js +2 -0
- package/lib/unstable-services/artifacts.js.map +1 -0
- package/lib/unstable-services/audit.d.ts +157 -0
- package/lib/unstable-services/audit.d.ts.map +1 -0
- package/lib/unstable-services/audit.js +2 -0
- package/lib/unstable-services/audit.js.map +1 -0
- package/lib/unstable-services/bazel.d.ts +181 -0
- package/lib/unstable-services/bazel.d.ts.map +1 -0
- package/lib/unstable-services/bazel.js +2 -0
- package/lib/unstable-services/bazel.js.map +1 -0
- package/lib/unstable-services/bazel_cache.d.ts +126 -0
- package/lib/unstable-services/bazel_cache.d.ts.map +1 -0
- package/lib/unstable-services/bazel_cache.js +2 -0
- package/lib/unstable-services/bazel_cache.js.map +1 -0
- package/lib/unstable-services/builder.d.ts +242 -0
- package/lib/unstable-services/builder.d.ts.map +1 -0
- package/lib/unstable-services/builder.js +2 -0
- package/lib/unstable-services/builder.js.map +1 -0
- package/lib/unstable-services/compute.d.ts +1124 -0
- package/lib/unstable-services/compute.d.ts.map +1 -0
- package/lib/unstable-services/compute.js +47 -0
- package/lib/unstable-services/compute.js.map +1 -0
- package/lib/unstable-services/compute_command.d.ts +120 -0
- package/lib/unstable-services/compute_command.d.ts.map +1 -0
- package/lib/unstable-services/compute_command.js +2 -0
- package/lib/unstable-services/compute_command.js.map +1 -0
- package/lib/unstable-services/compute_observability.d.ts +165 -0
- package/lib/unstable-services/compute_observability.d.ts.map +1 -0
- package/lib/unstable-services/compute_observability.js +2 -0
- package/lib/unstable-services/compute_observability.js.map +1 -0
- package/lib/unstable-services/compute_storage.d.ts +379 -0
- package/lib/unstable-services/compute_storage.d.ts.map +1 -0
- package/lib/unstable-services/compute_storage.js +33 -0
- package/lib/unstable-services/compute_storage.js.map +1 -0
- package/lib/unstable-services/compute_usage.d.ts +283 -0
- package/lib/unstable-services/compute_usage.d.ts.map +1 -0
- package/lib/unstable-services/compute_usage.js +2 -0
- package/lib/unstable-services/compute_usage.js.map +1 -0
- package/lib/unstable-services/egress.d.ts +191 -0
- package/lib/unstable-services/egress.d.ts.map +1 -0
- package/lib/unstable-services/egress.js +2 -0
- package/lib/unstable-services/egress.js.map +1 -0
- package/lib/unstable-services/experimental_compute_reservation.d.ts +672 -0
- package/lib/unstable-services/experimental_compute_reservation.d.ts.map +1 -0
- package/lib/unstable-services/experimental_compute_reservation.js +23 -0
- package/lib/unstable-services/experimental_compute_reservation.js.map +1 -0
- package/lib/unstable-services/experimental_remote_results.d.ts +496 -0
- package/lib/unstable-services/experimental_remote_results.d.ts.map +1 -0
- package/lib/unstable-services/experimental_remote_results.js +2 -0
- package/lib/unstable-services/experimental_remote_results.js.map +1 -0
- package/lib/unstable-services/github_image.d.ts +162 -0
- package/lib/unstable-services/github_image.d.ts.map +1 -0
- package/lib/unstable-services/github_image.js +2 -0
- package/lib/unstable-services/github_image.js.map +1 -0
- package/lib/unstable-services/github_jobs.d.ts +183 -0
- package/lib/unstable-services/github_jobs.d.ts.map +1 -0
- package/lib/unstable-services/github_jobs.js +2 -0
- package/lib/unstable-services/github_jobs.js.map +1 -0
- package/lib/unstable-services/github_profile.d.ts +296 -0
- package/lib/unstable-services/github_profile.d.ts.map +1 -0
- package/lib/unstable-services/github_profile.js +2 -0
- package/lib/unstable-services/github_profile.js.map +1 -0
- package/lib/unstable-services/gradle_cache.d.ts +125 -0
- package/lib/unstable-services/gradle_cache.d.ts.map +1 -0
- package/lib/unstable-services/gradle_cache.js +2 -0
- package/lib/unstable-services/gradle_cache.js.map +1 -0
- package/lib/unstable-services/httpcache.d.ts +125 -0
- package/lib/unstable-services/httpcache.d.ts.map +1 -0
- package/lib/unstable-services/httpcache.js +2 -0
- package/lib/unstable-services/httpcache.js.map +1 -0
- package/lib/unstable-services/iam_tenant.d.ts +457 -0
- package/lib/unstable-services/iam_tenant.d.ts.map +1 -0
- package/lib/unstable-services/iam_tenant.js +45 -0
- package/lib/unstable-services/iam_tenant.js.map +1 -0
- package/lib/unstable-services/iam_tenant_membership.d.ts +114 -0
- package/lib/unstable-services/iam_tenant_membership.d.ts.map +1 -0
- package/lib/unstable-services/iam_tenant_membership.js +2 -0
- package/lib/unstable-services/iam_tenant_membership.js.map +1 -0
- package/lib/unstable-services/iam_token.d.ts +257 -0
- package/lib/unstable-services/iam_token.d.ts.map +1 -0
- package/lib/unstable-services/iam_token.js +2 -0
- package/lib/unstable-services/iam_token.js.map +1 -0
- package/lib/unstable-services/image.d.ts +222 -0
- package/lib/unstable-services/image.d.ts.map +1 -0
- package/lib/unstable-services/image.js +2 -0
- package/lib/unstable-services/image.js.map +1 -0
- package/lib/unstable-services/index.d.ts +28 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +27 -0
- package/lib/unstable-services/private_devbox.d.ts +1180 -0
- package/lib/unstable-services/private_devbox.d.ts.map +1 -0
- package/lib/unstable-services/private_devbox.js +81 -0
- package/lib/unstable-services/private_devbox.js.map +1 -0
- package/lib/unstable-services/private_user_sessions.d.ts +145 -0
- package/lib/unstable-services/private_user_sessions.d.ts.map +1 -0
- package/lib/unstable-services/private_user_sessions.js +2 -0
- package/lib/unstable-services/private_user_sessions.js.map +1 -0
- package/lib/unstable-services/registry.d.ts +373 -0
- package/lib/unstable-services/registry.d.ts.map +1 -0
- package/lib/unstable-services/registry.js +34 -0
- package/lib/unstable-services/registry.js.map +1 -0
- package/lib/unstable-services/testing.d.ts +160 -0
- package/lib/unstable-services/testing.d.ts.map +1 -0
- package/lib/unstable-services/testing.js +2 -0
- package/lib/unstable-services/testing.js.map +1 -0
- package/lib/unstable-services/vault.d.ts +203 -0
- package/lib/unstable-services/vault.d.ts.map +1 -0
- package/lib/unstable-services/vault.js +2 -0
- package/lib/unstable-services/vault.js.map +1 -0
- package/lib/unstable-services.lazy/artifacts.js +1 -0
- package/lib/unstable-services.lazy/audit.js +1 -0
- package/lib/unstable-services.lazy/bazel.js +1 -0
- package/lib/unstable-services.lazy/bazel_cache.js +1 -0
- package/lib/unstable-services.lazy/builder.js +1 -0
- package/lib/unstable-services.lazy/compute.js +4 -0
- package/lib/unstable-services.lazy/compute_command.js +1 -0
- package/lib/unstable-services.lazy/compute_observability.js +1 -0
- package/lib/unstable-services.lazy/compute_storage.js +4 -0
- package/lib/unstable-services.lazy/compute_usage.js +1 -0
- package/lib/unstable-services.lazy/egress.js +1 -0
- package/lib/unstable-services.lazy/experimental_compute_reservation.js +4 -0
- package/lib/unstable-services.lazy/experimental_remote_results.js +1 -0
- package/lib/unstable-services.lazy/github_image.js +1 -0
- package/lib/unstable-services.lazy/github_jobs.js +1 -0
- package/lib/unstable-services.lazy/github_profile.js +1 -0
- package/lib/unstable-services.lazy/gradle_cache.js +1 -0
- package/lib/unstable-services.lazy/httpcache.js +1 -0
- package/lib/unstable-services.lazy/iam_tenant.js +4 -0
- package/lib/unstable-services.lazy/iam_tenant_membership.js +1 -0
- package/lib/unstable-services.lazy/iam_token.js +1 -0
- package/lib/unstable-services.lazy/image.js +1 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/private_devbox.js +4 -0
- package/lib/unstable-services.lazy/private_user_sessions.js +1 -0
- package/lib/unstable-services.lazy/registry.js +4 -0
- package/lib/unstable-services.lazy/testing.js +1 -0
- package/lib/unstable-services.lazy/vault.js +1 -0
- package/package.json +89 -2
- package/src/credentials.ts +208 -0
- package/src/errors.ts +71 -0
- package/src/index.ts +50 -0
- package/src/pagination.ts +1 -0
- package/src/protocol.ts +83 -0
- package/src/retry.ts +28 -0
- package/src/services/buildkite_jobs.ts +230 -0
- package/src/services/buildkite_queue.ts +453 -0
- package/src/services/index.ts +3 -0
- package/src/traits.ts +36 -0
- package/src/unstable-services/artifacts.ts +769 -0
- package/src/unstable-services/audit.ts +323 -0
- package/src/unstable-services/bazel.ts +423 -0
- package/src/unstable-services/bazel_cache.ts +219 -0
- package/src/unstable-services/builder.ts +576 -0
- package/src/unstable-services/compute.ts +2991 -0
- package/src/unstable-services/compute_command.ts +220 -0
- package/src/unstable-services/compute_observability.ts +436 -0
- package/src/unstable-services/compute_storage.ts +1167 -0
- package/src/unstable-services/compute_usage.ts +738 -0
- package/src/unstable-services/egress.ts +516 -0
- package/src/unstable-services/experimental_compute_reservation.ts +1499 -0
- package/src/unstable-services/experimental_remote_results.ts +1165 -0
- package/src/unstable-services/github_image.ts +301 -0
- package/src/unstable-services/github_jobs.ts +389 -0
- package/src/unstable-services/github_profile.ts +729 -0
- package/src/unstable-services/gradle_cache.ts +271 -0
- package/src/unstable-services/httpcache.ts +271 -0
- package/src/unstable-services/iam_tenant.ts +1720 -0
- package/src/unstable-services/iam_tenant_membership.ts +253 -0
- package/src/unstable-services/iam_token.ts +788 -0
- package/src/unstable-services/image.ts +602 -0
- package/src/unstable-services/index.ts +28 -0
- package/src/unstable-services/private_devbox.ts +4256 -0
- package/src/unstable-services/private_user_sessions.ts +410 -0
- package/src/unstable-services/registry.ts +1242 -0
- package/src/unstable-services/testing.ts +394 -0
- package/src/unstable-services/vault.ts +522 -0
|
@@ -0,0 +1,1165 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (buf.build/namespace/cloud -> smithy). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import type * as Redacted from "effect/Redacted";
|
|
7
|
+
import { NamespaceLabsServiceErrors } from "../errors.ts";
|
|
8
|
+
import { paginateCursor } from "../pagination.ts";
|
|
9
|
+
import {
|
|
10
|
+
NamespaceLabsProtocol,
|
|
11
|
+
type NamespaceLabsOpError,
|
|
12
|
+
type NamespaceLabsOpContext,
|
|
13
|
+
} from "../protocol.ts";
|
|
14
|
+
import * as Retry from "../retry.ts";
|
|
15
|
+
import * as T from "../traits.ts";
|
|
16
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
17
|
+
const __s: any[] = [];
|
|
18
|
+
|
|
19
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
20
|
+
|
|
21
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
22
|
+
const TELEMETRY = {
|
|
23
|
+
system: "namespacelabs-api",
|
|
24
|
+
responseHeaders: [
|
|
25
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
26
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
27
|
+
],
|
|
28
|
+
prefix: "Namespacelabs",
|
|
29
|
+
service: "ResultsService",
|
|
30
|
+
propagate: "w3c",
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export class AlreadyExists
|
|
34
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
36
|
+
message: S.String,
|
|
37
|
+
body: S.Unknown,
|
|
38
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
39
|
+
}).pipe(C.withConflictError),
|
|
40
|
+
[{ status: 409, body: { "/code": "already_exists" } }],
|
|
41
|
+
) {}
|
|
42
|
+
|
|
43
|
+
export class FailedPrecondition
|
|
44
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
45
|
+
/*@__PURE__*/ S.TaggedError<FailedPrecondition>()("FailedPrecondition", {
|
|
46
|
+
message: S.String,
|
|
47
|
+
body: S.Unknown,
|
|
48
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
49
|
+
}).pipe(C.withBadRequestError),
|
|
50
|
+
[{ status: 400, body: { "/code": "failed_precondition" } }],
|
|
51
|
+
) {}
|
|
52
|
+
|
|
53
|
+
export class InvalidArgument
|
|
54
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
55
|
+
/*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
|
|
56
|
+
message: S.String,
|
|
57
|
+
body: S.Unknown,
|
|
58
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
59
|
+
}).pipe(C.withBadRequestError),
|
|
60
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
61
|
+
) {}
|
|
62
|
+
|
|
63
|
+
export class NotFound
|
|
64
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
65
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
66
|
+
message: S.String,
|
|
67
|
+
body: S.Unknown,
|
|
68
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
69
|
+
}).pipe(C.withBadRequestError),
|
|
70
|
+
[{ status: 404 }],
|
|
71
|
+
) {}
|
|
72
|
+
|
|
73
|
+
export class PermissionDenied
|
|
74
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
75
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
76
|
+
message: S.String,
|
|
77
|
+
body: S.Unknown,
|
|
78
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
79
|
+
}).pipe(C.withAuthError),
|
|
80
|
+
[{ status: 403 }],
|
|
81
|
+
) {}
|
|
82
|
+
|
|
83
|
+
export class ResourceExhausted
|
|
84
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
85
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
86
|
+
message: S.String,
|
|
87
|
+
body: S.Unknown,
|
|
88
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
89
|
+
retryAfter: /*@__PURE__*/ S.optional(S.Duration),
|
|
90
|
+
}).pipe(C.withThrottlingError),
|
|
91
|
+
[{ status: 429 }],
|
|
92
|
+
) {}
|
|
93
|
+
|
|
94
|
+
export class Unauthenticated
|
|
95
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
96
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
97
|
+
message: S.String,
|
|
98
|
+
body: S.Unknown,
|
|
99
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
100
|
+
}).pipe(C.withAuthError),
|
|
101
|
+
[{ status: 401 }],
|
|
102
|
+
) {}
|
|
103
|
+
|
|
104
|
+
export interface DownloadPrepareRequest {
|
|
105
|
+
/** The opaque output_id obtained from Output. */
|
|
106
|
+
outputId?: string | undefined;
|
|
107
|
+
}
|
|
108
|
+
/** A URL-based download location. */
|
|
109
|
+
export interface RemoteURL {
|
|
110
|
+
/** The signed URL for downloading. */
|
|
111
|
+
url: string;
|
|
112
|
+
/** When this URL expires. */
|
|
113
|
+
expiresAt?: string | undefined;
|
|
114
|
+
}
|
|
115
|
+
/** A local file location (for future use with local caching). */
|
|
116
|
+
export interface LocalFile {
|
|
117
|
+
/** The local file path. */
|
|
118
|
+
path: string;
|
|
119
|
+
}
|
|
120
|
+
export interface DownloadPrepareResponse {
|
|
121
|
+
/** A URL that can be used to download the content. The URL is time-limited (typically valid for 30 minutes). */
|
|
122
|
+
remoteUrl?: RemoteURL | undefined;
|
|
123
|
+
/** Reserved for future use: a local file path. */
|
|
124
|
+
localFile?: LocalFile | undefined;
|
|
125
|
+
}
|
|
126
|
+
export interface ExpireResultRequest {
|
|
127
|
+
/** The unique identifier for the result to expire. */
|
|
128
|
+
resultId?: string | undefined;
|
|
129
|
+
}
|
|
130
|
+
export interface ExpireResultResponse {
|
|
131
|
+
/** The updated expiration time (set to now or in the past). */
|
|
132
|
+
expiresAt?: string | undefined;
|
|
133
|
+
}
|
|
134
|
+
/** A git repository at a specific revision. */
|
|
135
|
+
export interface GitRepository {
|
|
136
|
+
/** The repository URL (e.g., "https://github.com/owner/repo"). */
|
|
137
|
+
url?: string | undefined;
|
|
138
|
+
/** The commit digest, prefixed by the algorithm. E.g., "sha1:a3f5b7c9d1e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0". */
|
|
139
|
+
digest?: string | undefined;
|
|
140
|
+
}
|
|
141
|
+
/** A container image reference. */
|
|
142
|
+
export interface ContainerImage {
|
|
143
|
+
/** The image repository (e.g., "docker.io/library/alpine"). */
|
|
144
|
+
repository?: string | undefined;
|
|
145
|
+
/** The image digest, prefixed by the algorithm. E.g., "sha256:a3f5b7c9d1e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b1c2d3e4f5a6b7c8d9e0f1a2". */
|
|
146
|
+
digest?: string | undefined;
|
|
147
|
+
}
|
|
148
|
+
/** A reference to content by its digest. */
|
|
149
|
+
export interface ContentReference {
|
|
150
|
+
/** The path identifying this content. */
|
|
151
|
+
path?: string | undefined;
|
|
152
|
+
/** The content type (e.g., "application/json"). */
|
|
153
|
+
contentType?: string | undefined;
|
|
154
|
+
/** The content digest, prefixed by the algorithm. E.g., "sha256:a3f5b7c9d1e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b1c2d3e4f5a6b7c8d9e0f1a2". */
|
|
155
|
+
contentDigest?: string | undefined;
|
|
156
|
+
}
|
|
157
|
+
/** A string value that can be either an explicit value or a digest of a value. Use digest for secret values that should not be stored in plain text. */
|
|
158
|
+
export interface StringOrDigest {
|
|
159
|
+
/** The explicit string value. */
|
|
160
|
+
inline?: string | undefined;
|
|
161
|
+
/** The digest of the value, prefixed by the algorithm. E.g., "sha256:a3f5b7c9d1e2...". Use this for secret values. */
|
|
162
|
+
digest?: string | undefined;
|
|
163
|
+
}
|
|
164
|
+
export type StringOrDigestList = Array<StringOrDigest>;
|
|
165
|
+
/** An environment variable with a key and a value or digest. */
|
|
166
|
+
export interface EnvVar {
|
|
167
|
+
/** The environment variable name. */
|
|
168
|
+
key?: string | undefined;
|
|
169
|
+
/** The value of the environment variable. */
|
|
170
|
+
value?: StringOrDigest | undefined;
|
|
171
|
+
}
|
|
172
|
+
export type EnvVarList = Array<EnvVar>;
|
|
173
|
+
/** Describes where an input was mounted for a command invocation. */
|
|
174
|
+
export interface CommandMount {
|
|
175
|
+
/** The mount point where this input was available to the command. E.g., "/" for a container image, "/workspace" for a git repository. */
|
|
176
|
+
mountPoint?: string | undefined;
|
|
177
|
+
/** The key of the input (references Input.key in the same computation). */
|
|
178
|
+
inputKey?: string | undefined;
|
|
179
|
+
}
|
|
180
|
+
export type CommandMountList = Array<CommandMount>;
|
|
181
|
+
/** A command invocation with its arguments and environment. */
|
|
182
|
+
export interface CommandInvocation {
|
|
183
|
+
/** The command to execute. */
|
|
184
|
+
command?: string | undefined;
|
|
185
|
+
/** The arguments to pass to the command. */
|
|
186
|
+
args?: StringOrDigestList | undefined;
|
|
187
|
+
/** Environment variables set for the command. */
|
|
188
|
+
env?: EnvVarList | undefined;
|
|
189
|
+
/** The platform on which the command runs (e.g., "linux/amd64", "darwin/arm64"). */
|
|
190
|
+
platform?: string | undefined;
|
|
191
|
+
/** An ordered list of inputs and their mount points. Describes where each input was made available to the command. For example, in a container invocation (run-docker), the container image is mounted at "/", while a git repository might be mounted at "/workspace". */
|
|
192
|
+
mounts?: CommandMountList | undefined;
|
|
193
|
+
}
|
|
194
|
+
/** A canonical identifier for a computation. When used, only a single GitRepository or ContainerImage input is allowed alongside it. Mutually exclusive with CommandInvocation inputs. */
|
|
195
|
+
export interface Canonical {
|
|
196
|
+
/** A free-form string identifying the version of the computation. */
|
|
197
|
+
version?: string | undefined;
|
|
198
|
+
}
|
|
199
|
+
/** A reference to a snapshot from a previous result. */
|
|
200
|
+
export interface SnapshotInput {
|
|
201
|
+
/** The result ID containing the snapshot. */
|
|
202
|
+
resultId?: string | undefined;
|
|
203
|
+
/** The snapshot key within the result. Optional if the result has only one snapshot. */
|
|
204
|
+
snapshotKey?: string | undefined;
|
|
205
|
+
}
|
|
206
|
+
/** Input represents a typed input to a computation. Exactly one of the input type fields must be set. Either a Canonical or CommandInvocation input must be present when computing a result; they are mutually exclusive. When a Canonical input is set, only a single GitRepository or ContainerImage input may be defined. */
|
|
207
|
+
export interface Input {
|
|
208
|
+
/** A unique key identifying this input within the computation. */
|
|
209
|
+
key?: string | undefined;
|
|
210
|
+
/** A git repository at a specific revision. */
|
|
211
|
+
gitRepository?: GitRepository | undefined;
|
|
212
|
+
/** A container image reference. */
|
|
213
|
+
containerImage?: ContainerImage | undefined;
|
|
214
|
+
/** A reference to content by its digest. */
|
|
215
|
+
contentReference?: ContentReference | undefined;
|
|
216
|
+
/** A command invocation. */
|
|
217
|
+
commandInvocation?: CommandInvocation | undefined;
|
|
218
|
+
/** A canonical identifier for the computation. */
|
|
219
|
+
canonical?: Canonical | undefined;
|
|
220
|
+
/** A reference to a snapshot from a previous result. */
|
|
221
|
+
snapshotInput?: SnapshotInput | undefined;
|
|
222
|
+
}
|
|
223
|
+
export type InputList = Array<Input>;
|
|
224
|
+
export interface FetchResultRequest {
|
|
225
|
+
/** The set of inputs that define the computation. All inputs must be fully described. Either inputs or result_id must be provided, but not both. */
|
|
226
|
+
inputs?: InputList | undefined;
|
|
227
|
+
/** Alternatively, fetch a result by its unique identifier. If set, inputs must be empty. */
|
|
228
|
+
resultId?: string | undefined;
|
|
229
|
+
/** If true, the response will include the original inputs that produced the result. Only applicable when fetching by result_id. */
|
|
230
|
+
includeInputs?: boolean | undefined;
|
|
231
|
+
}
|
|
232
|
+
/** Command output metadata for download. */
|
|
233
|
+
export interface CommandOutput {
|
|
234
|
+
/** An opaque identifier used to retrieve the actual content. Pass this to PrepareDownload to get a downloadable URL. */
|
|
235
|
+
outputId: string;
|
|
236
|
+
/** The size of the output stream in bytes. */
|
|
237
|
+
size: string;
|
|
238
|
+
}
|
|
239
|
+
/** A cryptographic digest of content. */
|
|
240
|
+
export interface Digest {
|
|
241
|
+
/** The hash algorithm used (e.g., "blake3", "sha256"). */
|
|
242
|
+
algorithm?: string | undefined;
|
|
243
|
+
/** The hex-encoded hash value. */
|
|
244
|
+
value?: string | undefined;
|
|
245
|
+
}
|
|
246
|
+
/** Package kind used for snapshots. */
|
|
247
|
+
export type PackageKind =
|
|
248
|
+
| "PACKAGE_KIND_UNSPECIFIED"
|
|
249
|
+
| "PACKAGE_KIND_ZIP_ZSTD"
|
|
250
|
+
| "PACKAGE_KIND_ZIP_UNCOMPRESSED";
|
|
251
|
+
/** Base contents of a snapshot, always rooted at "/". */
|
|
252
|
+
export interface BaseContents {
|
|
253
|
+
/** The package kind used for the base contents. */
|
|
254
|
+
kind: PackageKind;
|
|
255
|
+
/** An opaque identifier used to retrieve the actual content. Pass this to PrepareDownload to get a downloadable URL. */
|
|
256
|
+
outputId: string;
|
|
257
|
+
/** The size of the package in bytes. */
|
|
258
|
+
size: string;
|
|
259
|
+
/** The content digest of the base contents package. */
|
|
260
|
+
digest?: Digest | undefined;
|
|
261
|
+
}
|
|
262
|
+
/** A large file within a snapshot. Large files cannot be directories or symlinks; those are always represented in the base contents. */
|
|
263
|
+
export interface LargeFile {
|
|
264
|
+
/** The file path relative to the snapshot root. */
|
|
265
|
+
path: string;
|
|
266
|
+
/** An opaque identifier used to retrieve the actual content. Pass this to PrepareDownload to get a downloadable URL. */
|
|
267
|
+
outputId: string;
|
|
268
|
+
/** The size of the file in bytes. */
|
|
269
|
+
size: string;
|
|
270
|
+
/** The file mode (permissions) as a POSIX mode_t. */
|
|
271
|
+
mode: number;
|
|
272
|
+
/** The status change time of the file (ctime). */
|
|
273
|
+
ctime?: string | undefined;
|
|
274
|
+
/** The content digest of the file. */
|
|
275
|
+
digest?: Digest | undefined;
|
|
276
|
+
/** The modification time of the file (mtime). */
|
|
277
|
+
mtime?: string | undefined;
|
|
278
|
+
}
|
|
279
|
+
export type LargeFileList = Array<LargeFile>;
|
|
280
|
+
/** A packed snapshot stored as a single packed object. */
|
|
281
|
+
export interface PackedSnapshot {
|
|
282
|
+
/** Total size of the packed snapshot in bytes. */
|
|
283
|
+
totalSize: string;
|
|
284
|
+
/** Digest of the complete packed snapshot. */
|
|
285
|
+
digest?: Digest | undefined;
|
|
286
|
+
/** Opaque identifier used to retrieve the packed snapshot as a single object. Pass this to PrepareDownload to get a downloadable URL. */
|
|
287
|
+
outputId: string;
|
|
288
|
+
}
|
|
289
|
+
/** A snapshot represents a complete filesystem state composed of base contents and large files applied on top. Snapshots have a well-defined ID based on their contents. */
|
|
290
|
+
export interface Snapshot {
|
|
291
|
+
/** A unique key identifying this snapshot within the result. Required when multiple snapshots exist, optional for a single snapshot. */
|
|
292
|
+
key: string;
|
|
293
|
+
/** The content-derived digest of this snapshot. Computed as: hash(base_contents.digest, [large_file.digest, ...]) where large files are sorted lexically by path. */
|
|
294
|
+
digest?: Digest | undefined;
|
|
295
|
+
/** The base contents package. The base_dir is always "/" (root of snapshot). Large files appear as empty files in the base contents. */
|
|
296
|
+
baseContents?: BaseContents | undefined;
|
|
297
|
+
/** Large files that are applied on top of the base contents. These replace the empty placeholder files in the base contents. */
|
|
298
|
+
largeFiles: LargeFileList;
|
|
299
|
+
/** A packed snapshot stored as a single packed object. Mutually exclusive with base_contents/large_files. */
|
|
300
|
+
packed?: PackedSnapshot | undefined;
|
|
301
|
+
}
|
|
302
|
+
export type SnapshotList = Array<Snapshot>;
|
|
303
|
+
/** Annotations about a command execution that do not affect the result identity. These are stored for informational purposes only and do not contribute to the input digest. */
|
|
304
|
+
export interface CommandAnnotations {
|
|
305
|
+
/** The wall-clock duration of the command execution. */
|
|
306
|
+
commandDuration?: string | undefined;
|
|
307
|
+
}
|
|
308
|
+
/** Information about where a result was created. */
|
|
309
|
+
export interface Origin {
|
|
310
|
+
/** The instance ID of the ephemeral machine that produced the result. */
|
|
311
|
+
instanceId: string;
|
|
312
|
+
}
|
|
313
|
+
export interface FetchResultResponse {
|
|
314
|
+
/** True if no result exists for the given inputs. */
|
|
315
|
+
notFound: boolean;
|
|
316
|
+
/** An opaque reference that can be used with PrepareUploadResult to upload a new result for the same inputs. Always set. */
|
|
317
|
+
resultReference: string;
|
|
318
|
+
/** The unique identifier for this result. Only set if not_found is false. */
|
|
319
|
+
resultId: string;
|
|
320
|
+
/** The inputs that produced this result. Only set if not_found is false. */
|
|
321
|
+
inputs: InputList;
|
|
322
|
+
/** When this result was computed. Only set if not_found is false. */
|
|
323
|
+
computedAt?: string | undefined;
|
|
324
|
+
/** When this result expires and may be garbage collected. Only set if not_found is false. */
|
|
325
|
+
expiresAt?: string | undefined;
|
|
326
|
+
/** The command output, if captured. Only set if not_found is false. */
|
|
327
|
+
commandOutput?: CommandOutput | undefined;
|
|
328
|
+
/** Snapshots, if any. Only set if not_found is false. */
|
|
329
|
+
snapshots: SnapshotList;
|
|
330
|
+
/** Annotations about the command execution. Only set if not_found is false. */
|
|
331
|
+
annotations?: CommandAnnotations | undefined;
|
|
332
|
+
/** Where this result was created. Only set if not_found is false. */
|
|
333
|
+
origin?: Origin | undefined;
|
|
334
|
+
}
|
|
335
|
+
export interface FinalizeUploadResultRequest {
|
|
336
|
+
/** The opaque token from PrepareUploadResultResponse containing all state needed to finalize the upload. */
|
|
337
|
+
finalizeToken?: string | Redacted.Redacted<string> | undefined;
|
|
338
|
+
}
|
|
339
|
+
export interface FinalizeUploadResultResponse {
|
|
340
|
+
/** The unique identifier for the newly created result. */
|
|
341
|
+
resultId: string;
|
|
342
|
+
}
|
|
343
|
+
export interface ListResultsRequest {
|
|
344
|
+
/** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
|
|
345
|
+
paginationCursor?: string | undefined;
|
|
346
|
+
/** The maximum number of entries to return as part of this ListResults request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
|
|
347
|
+
maxEntries?: string | undefined;
|
|
348
|
+
/** Don't return results that were computed before the specified timestamp (in UTC). */
|
|
349
|
+
notOlderThan?: string | undefined;
|
|
350
|
+
}
|
|
351
|
+
/** Metadata about a computed result. */
|
|
352
|
+
export interface ResultMetadata {
|
|
353
|
+
/** The unique identifier for this result. */
|
|
354
|
+
resultId: string;
|
|
355
|
+
/** The inputs that produced this result. */
|
|
356
|
+
inputs: InputList;
|
|
357
|
+
/** When this result was computed. */
|
|
358
|
+
computedAt?: string | undefined;
|
|
359
|
+
/** When this result expires and may be garbage collected. */
|
|
360
|
+
expiresAt?: string | undefined;
|
|
361
|
+
/** The command output, if captured. */
|
|
362
|
+
commandOutput?: CommandOutput | undefined;
|
|
363
|
+
/** Snapshots, if any. */
|
|
364
|
+
snapshots: SnapshotList;
|
|
365
|
+
/** Where this result was created, if known. */
|
|
366
|
+
origin?: Origin | undefined;
|
|
367
|
+
}
|
|
368
|
+
export type ResultMetadataList = Array<ResultMetadata>;
|
|
369
|
+
export interface ListResultsResponse {
|
|
370
|
+
/** The list of results that match the filter. */
|
|
371
|
+
results: ResultMetadataList;
|
|
372
|
+
/** If set, there are additional results. Pass the same cursor to a subsequent ListResults call to continue fetching results. */
|
|
373
|
+
paginationCursor: string;
|
|
374
|
+
}
|
|
375
|
+
/** Describes a command's output stream to be uploaded. The stream contains interleaved stdout and stderr chunks in a reproducible format. */
|
|
376
|
+
export interface CommandOutputToUpload {
|
|
377
|
+
/** The size of the output stream in bytes. */
|
|
378
|
+
size?: string | undefined;
|
|
379
|
+
}
|
|
380
|
+
/** Base contents of a snapshot to be uploaded. */
|
|
381
|
+
export interface BaseContentsToUpload {
|
|
382
|
+
/** The package kind used for the base contents. */
|
|
383
|
+
kind?: PackageKind | (string & {}) | undefined;
|
|
384
|
+
/** The size of the package in bytes. */
|
|
385
|
+
size?: string | undefined;
|
|
386
|
+
/** Optional content digest. If provided and content with this digest already exists, no upload is required. */
|
|
387
|
+
digest?: Digest | undefined;
|
|
388
|
+
}
|
|
389
|
+
/** A large file within a snapshot to be uploaded. */
|
|
390
|
+
export interface LargeFileToUpload {
|
|
391
|
+
/** The file path relative to the snapshot root. */
|
|
392
|
+
path?: string | undefined;
|
|
393
|
+
/** The size of the file in bytes. */
|
|
394
|
+
size?: string | undefined;
|
|
395
|
+
/** The file mode (permissions) as a POSIX mode_t. */
|
|
396
|
+
mode?: number | undefined;
|
|
397
|
+
/** The status change time of the file (ctime). */
|
|
398
|
+
ctime?: string | undefined;
|
|
399
|
+
/** Optional content digest. If provided and content with this digest already exists, no upload is required. */
|
|
400
|
+
digest?: Digest | undefined;
|
|
401
|
+
/** The modification time of the file (mtime). */
|
|
402
|
+
mtime?: string | undefined;
|
|
403
|
+
}
|
|
404
|
+
export type LargeFileToUploadList = Array<LargeFileToUpload>;
|
|
405
|
+
/** Describes a packed snapshot to be uploaded. */
|
|
406
|
+
export interface PackedSnapshotToUpload {
|
|
407
|
+
/** Total size of the packed snapshot in bytes. */
|
|
408
|
+
totalSize?: string | undefined;
|
|
409
|
+
/** Digest of the complete packed snapshot. */
|
|
410
|
+
digest?: Digest | undefined;
|
|
411
|
+
}
|
|
412
|
+
/** Describes a snapshot to be uploaded. */
|
|
413
|
+
export interface SnapshotToUpload {
|
|
414
|
+
/** A unique key identifying this snapshot within the result. Required when multiple snapshots exist, optional for a single snapshot. */
|
|
415
|
+
key?: string | undefined;
|
|
416
|
+
/** The base contents package to upload. */
|
|
417
|
+
baseContents?: BaseContentsToUpload | undefined;
|
|
418
|
+
/** Large files to upload. These are applied on top of base contents. */
|
|
419
|
+
largeFiles?: LargeFileToUploadList | undefined;
|
|
420
|
+
/** A packed snapshot to upload. Mutually exclusive with base_contents/large_files. */
|
|
421
|
+
packed?: PackedSnapshotToUpload | undefined;
|
|
422
|
+
}
|
|
423
|
+
export type SnapshotToUploadList = Array<SnapshotToUpload>;
|
|
424
|
+
export interface PrepareUploadResultRequest {
|
|
425
|
+
/** The opaque reference obtained from FetchResultResponse. */
|
|
426
|
+
resultReference?: string | undefined;
|
|
427
|
+
/** Optional command output to upload (combined stdout/stderr stream). */
|
|
428
|
+
commandOutput?: CommandOutputToUpload | undefined;
|
|
429
|
+
/** Optional snapshots to upload. */
|
|
430
|
+
snapshots?: SnapshotToUploadList | undefined;
|
|
431
|
+
/** Optional annotations about the command execution. These do not contribute to the input digest and are stored for informational purposes only. */
|
|
432
|
+
annotations?: CommandAnnotations | undefined;
|
|
433
|
+
}
|
|
434
|
+
/** Upload information for command output. */
|
|
435
|
+
export interface CommandOutputUpload {
|
|
436
|
+
/** The signed URL to upload the command output to. */
|
|
437
|
+
uploadUrl: string;
|
|
438
|
+
/** When this upload URL expires. */
|
|
439
|
+
expiresAt?: string | undefined;
|
|
440
|
+
}
|
|
441
|
+
/** Upload information for base contents of a snapshot. */
|
|
442
|
+
export interface BaseContentsUpload {
|
|
443
|
+
/** The signed URL to upload the base contents package to. Not set if the content already exists (check uploaded_at instead). */
|
|
444
|
+
uploadUrl: string;
|
|
445
|
+
/** When this upload URL expires. Only set if upload_url is set. */
|
|
446
|
+
expiresAt?: string | undefined;
|
|
447
|
+
/** When the content was previously uploaded. Set instead of upload_url if content with the provided digest already exists. */
|
|
448
|
+
uploadedAt?: string | undefined;
|
|
449
|
+
}
|
|
450
|
+
/** Upload information for a large file within a snapshot. */
|
|
451
|
+
export interface LargeFileUpload {
|
|
452
|
+
/** The file path relative to the snapshot root. */
|
|
453
|
+
path: string;
|
|
454
|
+
/** The signed URL to upload the file content to. Not set if the content already exists (check uploaded_at instead). */
|
|
455
|
+
uploadUrl: string;
|
|
456
|
+
/** When this upload URL expires. Only set if upload_url is set. */
|
|
457
|
+
expiresAt?: string | undefined;
|
|
458
|
+
/** When the content was previously uploaded. Set instead of upload_url if content with the provided digest already exists. */
|
|
459
|
+
uploadedAt?: string | undefined;
|
|
460
|
+
}
|
|
461
|
+
export type LargeFileUploadList = Array<LargeFileUpload>;
|
|
462
|
+
/** Upload target for a range within a packed snapshot object. */
|
|
463
|
+
export interface PackedSnapshotUploadSlot {
|
|
464
|
+
/** Byte offset within the packed snapshot object. */
|
|
465
|
+
offset: string;
|
|
466
|
+
/** Number of bytes to upload for this slot. */
|
|
467
|
+
length: string;
|
|
468
|
+
/** The signed URL to upload this slot's content to. */
|
|
469
|
+
uploadUrl: string;
|
|
470
|
+
}
|
|
471
|
+
export type PackedSnapshotUploadSlotList = Array<PackedSnapshotUploadSlot>;
|
|
472
|
+
/** Upload information for a packed snapshot. */
|
|
473
|
+
export interface PackedSnapshotUpload {
|
|
474
|
+
/** Upload slots assigned by the server. Each slot describes the byte range to upload and the signed URL to use. */
|
|
475
|
+
slots: PackedSnapshotUploadSlotList;
|
|
476
|
+
/** When these upload URLs expire. Only set if slots is non-empty. */
|
|
477
|
+
expiresAt?: string | undefined;
|
|
478
|
+
/** When the packed snapshot was previously uploaded. Set instead of slots if content with the provided digest already exists. */
|
|
479
|
+
uploadedAt?: string | undefined;
|
|
480
|
+
}
|
|
481
|
+
/** Upload information for a snapshot. */
|
|
482
|
+
export interface SnapshotUpload {
|
|
483
|
+
/** The key identifying this snapshot (matches SnapshotToUpload.key). */
|
|
484
|
+
key: string;
|
|
485
|
+
/** Upload target for the base contents package. */
|
|
486
|
+
baseContents?: BaseContentsUpload | undefined;
|
|
487
|
+
/** Upload targets for each large file, in the same order as the request. */
|
|
488
|
+
largeFiles: LargeFileUploadList;
|
|
489
|
+
/** Upload target for a packed snapshot. Set when the snapshot is packed. */
|
|
490
|
+
packed?: PackedSnapshotUpload | undefined;
|
|
491
|
+
}
|
|
492
|
+
export type SnapshotUploadList = Array<SnapshotUpload>;
|
|
493
|
+
export interface PrepareUploadResultResponse {
|
|
494
|
+
/** An opaque token containing all state needed to finalize the upload. Pass this to FinalizeUploadResult after uploading all files. */
|
|
495
|
+
finalizeToken: string | Redacted.Redacted<string>;
|
|
496
|
+
/** Upload target for the command output, if requested. */
|
|
497
|
+
commandOutput?: CommandOutputUpload | undefined;
|
|
498
|
+
/** Upload targets for each snapshot, in the same order as the request. */
|
|
499
|
+
snapshots: SnapshotUploadList;
|
|
500
|
+
}
|
|
501
|
+
export type DownloadPrepareError =
|
|
502
|
+
| InvalidArgument
|
|
503
|
+
| FailedPrecondition
|
|
504
|
+
| Unauthenticated
|
|
505
|
+
| PermissionDenied
|
|
506
|
+
| NotFound
|
|
507
|
+
| AlreadyExists
|
|
508
|
+
| ResourceExhausted
|
|
509
|
+
| NamespaceLabsOpError;
|
|
510
|
+
/** Prepares an output for download by generating an accessible URL. The returned URL is time-limited and should be used promptly. ### Errors - If the output_id is invalid or expired, a `NotFound` status is returned. */
|
|
511
|
+
export const downloadPrepare: API.OperationMethod<
|
|
512
|
+
DownloadPrepareRequest,
|
|
513
|
+
DownloadPrepareResponse,
|
|
514
|
+
DownloadPrepareError,
|
|
515
|
+
NamespaceLabsOpContext
|
|
516
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
517
|
+
input: __S(96, __c3, 0) as any as S.Schema<DownloadPrepareRequest>,
|
|
518
|
+
output: __S(99, __c3, 3) as any as S.Schema<DownloadPrepareResponse>,
|
|
519
|
+
errors: [
|
|
520
|
+
InvalidArgument,
|
|
521
|
+
FailedPrecondition,
|
|
522
|
+
Unauthenticated,
|
|
523
|
+
PermissionDenied,
|
|
524
|
+
NotFound,
|
|
525
|
+
AlreadyExists,
|
|
526
|
+
ResourceExhausted,
|
|
527
|
+
],
|
|
528
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
529
|
+
protocol: NamespaceLabsProtocol,
|
|
530
|
+
retry: Retry.Retry,
|
|
531
|
+
telemetry: TELEMETRY,
|
|
532
|
+
span: "DownloadPrepare",
|
|
533
|
+
}));
|
|
534
|
+
|
|
535
|
+
export type ExpireResultError =
|
|
536
|
+
| InvalidArgument
|
|
537
|
+
| FailedPrecondition
|
|
538
|
+
| Unauthenticated
|
|
539
|
+
| PermissionDenied
|
|
540
|
+
| NotFound
|
|
541
|
+
| AlreadyExists
|
|
542
|
+
| ResourceExhausted
|
|
543
|
+
| NamespaceLabsOpError;
|
|
544
|
+
/** Expires a result, marking it for garbage collection. ### Errors - If the result does not exist, a `NotFound` status is returned. */
|
|
545
|
+
export const expireResult: API.OperationMethod<
|
|
546
|
+
ExpireResultRequest,
|
|
547
|
+
ExpireResultResponse,
|
|
548
|
+
ExpireResultError,
|
|
549
|
+
NamespaceLabsOpContext
|
|
550
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
551
|
+
input: __S(128, __c4, 0) as any as S.Schema<ExpireResultRequest>,
|
|
552
|
+
output: __S(129, __c4, 1) as any as S.Schema<ExpireResultResponse>,
|
|
553
|
+
errors: [
|
|
554
|
+
InvalidArgument,
|
|
555
|
+
FailedPrecondition,
|
|
556
|
+
Unauthenticated,
|
|
557
|
+
PermissionDenied,
|
|
558
|
+
NotFound,
|
|
559
|
+
AlreadyExists,
|
|
560
|
+
ResourceExhausted,
|
|
561
|
+
],
|
|
562
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
563
|
+
protocol: NamespaceLabsProtocol,
|
|
564
|
+
retry: Retry.Retry,
|
|
565
|
+
telemetry: TELEMETRY,
|
|
566
|
+
span: "ExpireResult",
|
|
567
|
+
}));
|
|
568
|
+
|
|
569
|
+
export type FetchResultError =
|
|
570
|
+
| InvalidArgument
|
|
571
|
+
| FailedPrecondition
|
|
572
|
+
| Unauthenticated
|
|
573
|
+
| PermissionDenied
|
|
574
|
+
| NotFound
|
|
575
|
+
| AlreadyExists
|
|
576
|
+
| ResourceExhausted
|
|
577
|
+
| NamespaceLabsOpError;
|
|
578
|
+
/** Fetches the result for a given set of inputs, if one exists. Returns outputs which can be used with PrepareDownload to obtain actual download URLs. Always returns a result_reference that can be used to upload a new result for the same inputs. If the result does not exist, not_found is set to true. */
|
|
579
|
+
export const fetchResult: API.OperationMethod<
|
|
580
|
+
FetchResultRequest,
|
|
581
|
+
FetchResultResponse,
|
|
582
|
+
FetchResultError,
|
|
583
|
+
NamespaceLabsOpContext
|
|
584
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
585
|
+
input: __S(160, __c5, 0) as any as S.Schema<FetchResultRequest>,
|
|
586
|
+
output: __S(161, __c5, 1) as any as S.Schema<FetchResultResponse>,
|
|
587
|
+
errors: [
|
|
588
|
+
InvalidArgument,
|
|
589
|
+
FailedPrecondition,
|
|
590
|
+
Unauthenticated,
|
|
591
|
+
PermissionDenied,
|
|
592
|
+
NotFound,
|
|
593
|
+
AlreadyExists,
|
|
594
|
+
ResourceExhausted,
|
|
595
|
+
],
|
|
596
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
597
|
+
protocol: NamespaceLabsProtocol,
|
|
598
|
+
retry: Retry.Retry,
|
|
599
|
+
telemetry: TELEMETRY,
|
|
600
|
+
span: "FetchResult",
|
|
601
|
+
}));
|
|
602
|
+
|
|
603
|
+
export type FinalizeUploadResultError =
|
|
604
|
+
| InvalidArgument
|
|
605
|
+
| FailedPrecondition
|
|
606
|
+
| Unauthenticated
|
|
607
|
+
| PermissionDenied
|
|
608
|
+
| NotFound
|
|
609
|
+
| AlreadyExists
|
|
610
|
+
| ResourceExhausted
|
|
611
|
+
| NamespaceLabsOpError;
|
|
612
|
+
/** Finalizes a result upload after all output files have been uploaded. ### Errors - If the finalize_token is invalid or expired, a `NotFound` status is returned. */
|
|
613
|
+
export const finalizeUploadResult: API.OperationMethod<
|
|
614
|
+
FinalizeUploadResultRequest,
|
|
615
|
+
FinalizeUploadResultResponse,
|
|
616
|
+
FinalizeUploadResultError,
|
|
617
|
+
NamespaceLabsOpContext
|
|
618
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
619
|
+
input: __S(0, __c0, 0) as any as S.Schema<FinalizeUploadResultRequest>,
|
|
620
|
+
output: __S(1, __c0, 1) as any as S.Schema<FinalizeUploadResultResponse>,
|
|
621
|
+
errors: [
|
|
622
|
+
InvalidArgument,
|
|
623
|
+
FailedPrecondition,
|
|
624
|
+
Unauthenticated,
|
|
625
|
+
PermissionDenied,
|
|
626
|
+
NotFound,
|
|
627
|
+
AlreadyExists,
|
|
628
|
+
ResourceExhausted,
|
|
629
|
+
],
|
|
630
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
631
|
+
protocol: NamespaceLabsProtocol,
|
|
632
|
+
retry: Retry.Retry,
|
|
633
|
+
telemetry: TELEMETRY,
|
|
634
|
+
span: "FinalizeUploadResult",
|
|
635
|
+
}));
|
|
636
|
+
|
|
637
|
+
export type ListResultsError =
|
|
638
|
+
| InvalidArgument
|
|
639
|
+
| FailedPrecondition
|
|
640
|
+
| Unauthenticated
|
|
641
|
+
| PermissionDenied
|
|
642
|
+
| NotFound
|
|
643
|
+
| AlreadyExists
|
|
644
|
+
| ResourceExhausted
|
|
645
|
+
| NamespaceLabsOpError;
|
|
646
|
+
/** Returns a list of all results that match the specified filter. */
|
|
647
|
+
export const listResults: API.PaginatedOperationMethod<
|
|
648
|
+
ListResultsRequest,
|
|
649
|
+
ListResultsResponse,
|
|
650
|
+
ListResultsError,
|
|
651
|
+
NamespaceLabsOpContext,
|
|
652
|
+
ResultMetadata
|
|
653
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
654
|
+
() => ({
|
|
655
|
+
input: __S(32, __c1, 0) as any as S.Schema<ListResultsRequest>,
|
|
656
|
+
output: __S(35, __c1, 3) as any as S.Schema<ListResultsResponse>,
|
|
657
|
+
errors: [
|
|
658
|
+
InvalidArgument,
|
|
659
|
+
FailedPrecondition,
|
|
660
|
+
Unauthenticated,
|
|
661
|
+
PermissionDenied,
|
|
662
|
+
NotFound,
|
|
663
|
+
AlreadyExists,
|
|
664
|
+
ResourceExhausted,
|
|
665
|
+
],
|
|
666
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
667
|
+
protocol: NamespaceLabsProtocol,
|
|
668
|
+
retry: Retry.Retry,
|
|
669
|
+
telemetry: TELEMETRY,
|
|
670
|
+
span: "ListResults",
|
|
671
|
+
pagination: {
|
|
672
|
+
mode: "cursor",
|
|
673
|
+
inputToken: "paginationCursor",
|
|
674
|
+
outputToken: "paginationCursor",
|
|
675
|
+
items: "results",
|
|
676
|
+
} as const,
|
|
677
|
+
}),
|
|
678
|
+
paginateCursor,
|
|
679
|
+
) as any;
|
|
680
|
+
|
|
681
|
+
export type PrepareUploadResultError =
|
|
682
|
+
| InvalidArgument
|
|
683
|
+
| FailedPrecondition
|
|
684
|
+
| Unauthenticated
|
|
685
|
+
| PermissionDenied
|
|
686
|
+
| NotFound
|
|
687
|
+
| AlreadyExists
|
|
688
|
+
| ResourceExhausted
|
|
689
|
+
| NamespaceLabsOpError;
|
|
690
|
+
/** Prepares to upload a new result. Returns upload URLs for each output file. After uploading all files, call FinalizeUploadResult to commit the result. ### Errors - If the result_reference is invalid, an `InvalidArgument` status is returned. */
|
|
691
|
+
export const prepareUploadResult: API.OperationMethod<
|
|
692
|
+
PrepareUploadResultRequest,
|
|
693
|
+
PrepareUploadResultResponse,
|
|
694
|
+
PrepareUploadResultError,
|
|
695
|
+
NamespaceLabsOpContext
|
|
696
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
697
|
+
input: __S(71, __c2, 7) as any as S.Schema<PrepareUploadResultRequest>,
|
|
698
|
+
output: __S(81, __c2, 17) as any as S.Schema<PrepareUploadResultResponse>,
|
|
699
|
+
errors: [
|
|
700
|
+
InvalidArgument,
|
|
701
|
+
FailedPrecondition,
|
|
702
|
+
Unauthenticated,
|
|
703
|
+
PermissionDenied,
|
|
704
|
+
NotFound,
|
|
705
|
+
AlreadyExists,
|
|
706
|
+
ResourceExhausted,
|
|
707
|
+
],
|
|
708
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
709
|
+
protocol: NamespaceLabsProtocol,
|
|
710
|
+
retry: Retry.Retry,
|
|
711
|
+
telemetry: TELEMETRY,
|
|
712
|
+
span: "PrepareUploadResult",
|
|
713
|
+
}));
|
|
714
|
+
|
|
715
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
716
|
+
function __c0(j: number): any {
|
|
717
|
+
switch (j) {
|
|
718
|
+
case 0:
|
|
719
|
+
return S.suspend(() =>
|
|
720
|
+
S.Struct({
|
|
721
|
+
finalizeToken: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
722
|
+
}).pipe(
|
|
723
|
+
T.Http({
|
|
724
|
+
method: "POST",
|
|
725
|
+
uri: "/namespace.experimental.remote.ResultsService/FinalizeUploadResult",
|
|
726
|
+
code: 200,
|
|
727
|
+
}),
|
|
728
|
+
),
|
|
729
|
+
).annotate({ identifier: "FinalizeUploadResultRequest" });
|
|
730
|
+
case 1:
|
|
731
|
+
return S.suspend(() =>
|
|
732
|
+
S.Struct({
|
|
733
|
+
resultId: S.String,
|
|
734
|
+
}),
|
|
735
|
+
).annotate({ identifier: "FinalizeUploadResultResponse" });
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
function __c1(j: number): any {
|
|
739
|
+
switch (j) {
|
|
740
|
+
case 0:
|
|
741
|
+
return S.suspend(() =>
|
|
742
|
+
S.Struct({
|
|
743
|
+
paginationCursor: S.optional(S.String),
|
|
744
|
+
maxEntries: S.optional(S.String),
|
|
745
|
+
notOlderThan: S.optional(S.String),
|
|
746
|
+
}).pipe(
|
|
747
|
+
T.Http({
|
|
748
|
+
method: "POST",
|
|
749
|
+
uri: "/namespace.experimental.remote.ResultsService/ListResults",
|
|
750
|
+
code: 200,
|
|
751
|
+
}),
|
|
752
|
+
),
|
|
753
|
+
).annotate({ identifier: "ListResultsRequest" });
|
|
754
|
+
case 1:
|
|
755
|
+
return S.suspend(() =>
|
|
756
|
+
S.Struct({
|
|
757
|
+
resultId: S.String,
|
|
758
|
+
inputs: __S(205, __c6, 13),
|
|
759
|
+
computedAt: S.optional(S.String),
|
|
760
|
+
expiresAt: S.optional(S.String),
|
|
761
|
+
commandOutput: S.optional(__S(206, __c6, 14)),
|
|
762
|
+
snapshots: __S(212, __c6, 20),
|
|
763
|
+
origin: S.optional(__S(213, __c6, 21)),
|
|
764
|
+
}),
|
|
765
|
+
).annotate({ identifier: "ResultMetadata" });
|
|
766
|
+
case 2:
|
|
767
|
+
return S.Array(__S(33, __c1, 1));
|
|
768
|
+
case 3:
|
|
769
|
+
return S.suspend(() =>
|
|
770
|
+
S.Struct({
|
|
771
|
+
results: __S(34, __c1, 2),
|
|
772
|
+
paginationCursor: S.String,
|
|
773
|
+
}),
|
|
774
|
+
).annotate({ identifier: "ListResultsResponse" });
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
function __c2(j: number): any {
|
|
778
|
+
switch (j) {
|
|
779
|
+
case 0:
|
|
780
|
+
return S.suspend(() =>
|
|
781
|
+
S.Struct({
|
|
782
|
+
size: S.optional(S.String),
|
|
783
|
+
}),
|
|
784
|
+
).annotate({ identifier: "CommandOutputToUpload" });
|
|
785
|
+
case 1:
|
|
786
|
+
return S.suspend(() =>
|
|
787
|
+
S.Struct({
|
|
788
|
+
kind: S.optional(S.String),
|
|
789
|
+
size: S.optional(S.String),
|
|
790
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
791
|
+
}),
|
|
792
|
+
).annotate({ identifier: "BaseContentsToUpload" });
|
|
793
|
+
case 2:
|
|
794
|
+
return S.suspend(() =>
|
|
795
|
+
S.Struct({
|
|
796
|
+
path: S.optional(S.String),
|
|
797
|
+
size: S.optional(S.String),
|
|
798
|
+
mode: S.optional(S.Number),
|
|
799
|
+
ctime: S.optional(S.String),
|
|
800
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
801
|
+
mtime: S.optional(S.String),
|
|
802
|
+
}),
|
|
803
|
+
).annotate({ identifier: "LargeFileToUpload" });
|
|
804
|
+
case 3:
|
|
805
|
+
return S.Array(__S(66, __c2, 2));
|
|
806
|
+
case 4:
|
|
807
|
+
return S.suspend(() =>
|
|
808
|
+
S.Struct({
|
|
809
|
+
totalSize: S.optional(S.String),
|
|
810
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
811
|
+
}),
|
|
812
|
+
).annotate({ identifier: "PackedSnapshotToUpload" });
|
|
813
|
+
case 5:
|
|
814
|
+
return S.suspend(() =>
|
|
815
|
+
S.Struct({
|
|
816
|
+
key: S.optional(S.String),
|
|
817
|
+
baseContents: S.optional(__S(65, __c2, 1)),
|
|
818
|
+
largeFiles: S.optional(__S(67, __c2, 3)),
|
|
819
|
+
packed: S.optional(__S(68, __c2, 4)),
|
|
820
|
+
}),
|
|
821
|
+
).annotate({ identifier: "SnapshotToUpload" });
|
|
822
|
+
case 6:
|
|
823
|
+
return S.Array(__S(69, __c2, 5));
|
|
824
|
+
case 7:
|
|
825
|
+
return S.suspend(() =>
|
|
826
|
+
S.Struct({
|
|
827
|
+
resultReference: S.optional(S.String),
|
|
828
|
+
commandOutput: S.optional(__S(64, __c2, 0)),
|
|
829
|
+
snapshots: S.optional(__S(70, __c2, 6)),
|
|
830
|
+
annotations: S.optional(__S(256, __c8, 0)),
|
|
831
|
+
}).pipe(
|
|
832
|
+
T.Http({
|
|
833
|
+
method: "POST",
|
|
834
|
+
uri: "/namespace.experimental.remote.ResultsService/PrepareUploadResult",
|
|
835
|
+
code: 200,
|
|
836
|
+
}),
|
|
837
|
+
),
|
|
838
|
+
).annotate({ identifier: "PrepareUploadResultRequest" });
|
|
839
|
+
case 8:
|
|
840
|
+
return S.suspend(() =>
|
|
841
|
+
S.Struct({
|
|
842
|
+
uploadUrl: S.String,
|
|
843
|
+
expiresAt: S.optional(S.String),
|
|
844
|
+
}),
|
|
845
|
+
).annotate({ identifier: "CommandOutputUpload" });
|
|
846
|
+
case 9:
|
|
847
|
+
return S.suspend(() =>
|
|
848
|
+
S.Struct({
|
|
849
|
+
uploadUrl: S.String,
|
|
850
|
+
expiresAt: S.optional(S.String),
|
|
851
|
+
uploadedAt: S.optional(S.String),
|
|
852
|
+
}),
|
|
853
|
+
).annotate({ identifier: "BaseContentsUpload" });
|
|
854
|
+
case 10:
|
|
855
|
+
return S.suspend(() =>
|
|
856
|
+
S.Struct({
|
|
857
|
+
path: S.String,
|
|
858
|
+
uploadUrl: S.String,
|
|
859
|
+
expiresAt: S.optional(S.String),
|
|
860
|
+
uploadedAt: S.optional(S.String),
|
|
861
|
+
}),
|
|
862
|
+
).annotate({ identifier: "LargeFileUpload" });
|
|
863
|
+
case 11:
|
|
864
|
+
return S.Array(__S(74, __c2, 10));
|
|
865
|
+
case 12:
|
|
866
|
+
return S.suspend(() =>
|
|
867
|
+
S.Struct({
|
|
868
|
+
offset: S.String,
|
|
869
|
+
length: S.String,
|
|
870
|
+
uploadUrl: S.String,
|
|
871
|
+
}),
|
|
872
|
+
).annotate({ identifier: "PackedSnapshotUploadSlot" });
|
|
873
|
+
case 13:
|
|
874
|
+
return S.Array(__S(76, __c2, 12));
|
|
875
|
+
case 14:
|
|
876
|
+
return S.suspend(() =>
|
|
877
|
+
S.Struct({
|
|
878
|
+
slots: __S(77, __c2, 13),
|
|
879
|
+
expiresAt: S.optional(S.String),
|
|
880
|
+
uploadedAt: S.optional(S.String),
|
|
881
|
+
}),
|
|
882
|
+
).annotate({ identifier: "PackedSnapshotUpload" });
|
|
883
|
+
case 15:
|
|
884
|
+
return S.suspend(() =>
|
|
885
|
+
S.Struct({
|
|
886
|
+
key: S.String,
|
|
887
|
+
baseContents: S.optional(__S(73, __c2, 9)),
|
|
888
|
+
largeFiles: __S(75, __c2, 11),
|
|
889
|
+
packed: S.optional(__S(78, __c2, 14)),
|
|
890
|
+
}),
|
|
891
|
+
).annotate({ identifier: "SnapshotUpload" });
|
|
892
|
+
case 16:
|
|
893
|
+
return S.Array(__S(79, __c2, 15));
|
|
894
|
+
case 17:
|
|
895
|
+
return S.suspend(() =>
|
|
896
|
+
S.Struct({
|
|
897
|
+
finalizeToken: S.String.pipe(T.SensitiveValue({})),
|
|
898
|
+
commandOutput: S.optional(__S(72, __c2, 8)),
|
|
899
|
+
snapshots: __S(80, __c2, 16),
|
|
900
|
+
}),
|
|
901
|
+
).annotate({ identifier: "PrepareUploadResultResponse" });
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
function __c3(j: number): any {
|
|
905
|
+
switch (j) {
|
|
906
|
+
case 0:
|
|
907
|
+
return S.suspend(() =>
|
|
908
|
+
S.Struct({
|
|
909
|
+
outputId: S.optional(S.String),
|
|
910
|
+
}).pipe(
|
|
911
|
+
T.Http({
|
|
912
|
+
method: "POST",
|
|
913
|
+
uri: "/namespace.experimental.remote.ResultsService/PrepareDownload",
|
|
914
|
+
code: 200,
|
|
915
|
+
}),
|
|
916
|
+
),
|
|
917
|
+
).annotate({ identifier: "DownloadPrepareRequest" });
|
|
918
|
+
case 1:
|
|
919
|
+
return S.suspend(() =>
|
|
920
|
+
S.Struct({
|
|
921
|
+
url: S.String,
|
|
922
|
+
expiresAt: S.optional(S.String),
|
|
923
|
+
}),
|
|
924
|
+
).annotate({ identifier: "RemoteURL" });
|
|
925
|
+
case 2:
|
|
926
|
+
return S.suspend(() =>
|
|
927
|
+
S.Struct({
|
|
928
|
+
path: S.String,
|
|
929
|
+
}),
|
|
930
|
+
).annotate({ identifier: "LocalFile" });
|
|
931
|
+
case 3:
|
|
932
|
+
return S.suspend(() =>
|
|
933
|
+
S.Struct({
|
|
934
|
+
remoteUrl: S.optional(__S(97, __c3, 1)),
|
|
935
|
+
localFile: S.optional(__S(98, __c3, 2)),
|
|
936
|
+
}),
|
|
937
|
+
).annotate({ identifier: "DownloadPrepareResponse" });
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
function __c4(j: number): any {
|
|
941
|
+
switch (j) {
|
|
942
|
+
case 0:
|
|
943
|
+
return S.suspend(() =>
|
|
944
|
+
S.Struct({
|
|
945
|
+
resultId: S.optional(S.String),
|
|
946
|
+
}).pipe(
|
|
947
|
+
T.Http({
|
|
948
|
+
method: "POST",
|
|
949
|
+
uri: "/namespace.experimental.remote.ResultsService/ExpireResult",
|
|
950
|
+
code: 200,
|
|
951
|
+
}),
|
|
952
|
+
),
|
|
953
|
+
).annotate({ identifier: "ExpireResultRequest" });
|
|
954
|
+
case 1:
|
|
955
|
+
return S.suspend(() =>
|
|
956
|
+
S.Struct({
|
|
957
|
+
expiresAt: S.optional(S.String),
|
|
958
|
+
}),
|
|
959
|
+
).annotate({ identifier: "ExpireResultResponse" });
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
function __c5(j: number): any {
|
|
963
|
+
switch (j) {
|
|
964
|
+
case 0:
|
|
965
|
+
return S.suspend(() =>
|
|
966
|
+
S.Struct({
|
|
967
|
+
inputs: S.optional(__S(205, __c6, 13)),
|
|
968
|
+
resultId: S.optional(S.String),
|
|
969
|
+
includeInputs: S.optional(S.Boolean),
|
|
970
|
+
}).pipe(
|
|
971
|
+
T.Http({
|
|
972
|
+
method: "POST",
|
|
973
|
+
uri: "/namespace.experimental.remote.ResultsService/FetchResult",
|
|
974
|
+
code: 200,
|
|
975
|
+
}),
|
|
976
|
+
),
|
|
977
|
+
).annotate({ identifier: "FetchResultRequest" });
|
|
978
|
+
case 1:
|
|
979
|
+
return S.suspend(() =>
|
|
980
|
+
S.Struct({
|
|
981
|
+
notFound: S.Boolean,
|
|
982
|
+
resultReference: S.String,
|
|
983
|
+
resultId: S.String,
|
|
984
|
+
inputs: __S(205, __c6, 13),
|
|
985
|
+
computedAt: S.optional(S.String),
|
|
986
|
+
expiresAt: S.optional(S.String),
|
|
987
|
+
commandOutput: S.optional(__S(206, __c6, 14)),
|
|
988
|
+
snapshots: __S(212, __c6, 20),
|
|
989
|
+
annotations: S.optional(__S(256, __c8, 0)),
|
|
990
|
+
origin: S.optional(__S(213, __c6, 21)),
|
|
991
|
+
}),
|
|
992
|
+
).annotate({ identifier: "FetchResultResponse" });
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
function __c6(j: number): any {
|
|
996
|
+
switch (j) {
|
|
997
|
+
case 0:
|
|
998
|
+
return S.suspend(() =>
|
|
999
|
+
S.Struct({
|
|
1000
|
+
url: S.optional(S.String),
|
|
1001
|
+
digest: S.optional(S.String),
|
|
1002
|
+
}),
|
|
1003
|
+
).annotate({ identifier: "GitRepository" });
|
|
1004
|
+
case 1:
|
|
1005
|
+
return S.suspend(() =>
|
|
1006
|
+
S.Struct({
|
|
1007
|
+
repository: S.optional(S.String),
|
|
1008
|
+
digest: S.optional(S.String),
|
|
1009
|
+
}),
|
|
1010
|
+
).annotate({ identifier: "ContainerImage" });
|
|
1011
|
+
case 2:
|
|
1012
|
+
return S.suspend(() =>
|
|
1013
|
+
S.Struct({
|
|
1014
|
+
path: S.optional(S.String),
|
|
1015
|
+
contentType: S.optional(S.String),
|
|
1016
|
+
contentDigest: S.optional(S.String),
|
|
1017
|
+
}),
|
|
1018
|
+
).annotate({ identifier: "ContentReference" });
|
|
1019
|
+
case 3:
|
|
1020
|
+
return S.suspend(() =>
|
|
1021
|
+
S.Struct({
|
|
1022
|
+
inline: S.optional(S.String),
|
|
1023
|
+
digest: S.optional(S.String),
|
|
1024
|
+
}),
|
|
1025
|
+
).annotate({ identifier: "StringOrDigest" });
|
|
1026
|
+
case 4:
|
|
1027
|
+
return S.Array(__S(195, __c6, 3));
|
|
1028
|
+
case 5:
|
|
1029
|
+
return S.suspend(() =>
|
|
1030
|
+
S.Struct({
|
|
1031
|
+
key: S.optional(S.String),
|
|
1032
|
+
value: S.optional(__S(195, __c6, 3)),
|
|
1033
|
+
}),
|
|
1034
|
+
).annotate({ identifier: "EnvVar" });
|
|
1035
|
+
case 6:
|
|
1036
|
+
return S.Array(__S(197, __c6, 5));
|
|
1037
|
+
case 7:
|
|
1038
|
+
return S.suspend(() =>
|
|
1039
|
+
S.Struct({
|
|
1040
|
+
mountPoint: S.optional(S.String),
|
|
1041
|
+
inputKey: S.optional(S.String),
|
|
1042
|
+
}),
|
|
1043
|
+
).annotate({ identifier: "CommandMount" });
|
|
1044
|
+
case 8:
|
|
1045
|
+
return S.Array(__S(199, __c6, 7));
|
|
1046
|
+
case 9:
|
|
1047
|
+
return S.suspend(() =>
|
|
1048
|
+
S.Struct({
|
|
1049
|
+
command: S.optional(S.String),
|
|
1050
|
+
args: S.optional(__S(196, __c6, 4)),
|
|
1051
|
+
env: S.optional(__S(198, __c6, 6)),
|
|
1052
|
+
platform: S.optional(S.String),
|
|
1053
|
+
mounts: S.optional(__S(200, __c6, 8)),
|
|
1054
|
+
}),
|
|
1055
|
+
).annotate({ identifier: "CommandInvocation" });
|
|
1056
|
+
case 10:
|
|
1057
|
+
return S.suspend(() =>
|
|
1058
|
+
S.Struct({
|
|
1059
|
+
version: S.optional(S.String),
|
|
1060
|
+
}),
|
|
1061
|
+
).annotate({ identifier: "Canonical" });
|
|
1062
|
+
case 11:
|
|
1063
|
+
return S.suspend(() =>
|
|
1064
|
+
S.Struct({
|
|
1065
|
+
resultId: S.optional(S.String),
|
|
1066
|
+
snapshotKey: S.optional(S.String),
|
|
1067
|
+
}),
|
|
1068
|
+
).annotate({ identifier: "SnapshotInput" });
|
|
1069
|
+
case 12:
|
|
1070
|
+
return S.suspend(() =>
|
|
1071
|
+
S.Struct({
|
|
1072
|
+
key: S.optional(S.String),
|
|
1073
|
+
gitRepository: S.optional(__S(192, __c6, 0)),
|
|
1074
|
+
containerImage: S.optional(__S(193, __c6, 1)),
|
|
1075
|
+
contentReference: S.optional(__S(194, __c6, 2)),
|
|
1076
|
+
commandInvocation: S.optional(__S(201, __c6, 9)),
|
|
1077
|
+
canonical: S.optional(__S(202, __c6, 10)),
|
|
1078
|
+
snapshotInput: S.optional(__S(203, __c6, 11)),
|
|
1079
|
+
}),
|
|
1080
|
+
).annotate({ identifier: "Input" });
|
|
1081
|
+
case 13:
|
|
1082
|
+
return S.Array(__S(204, __c6, 12));
|
|
1083
|
+
case 14:
|
|
1084
|
+
return S.suspend(() =>
|
|
1085
|
+
S.Struct({
|
|
1086
|
+
outputId: S.String,
|
|
1087
|
+
size: S.String,
|
|
1088
|
+
}),
|
|
1089
|
+
).annotate({ identifier: "CommandOutput" });
|
|
1090
|
+
case 15:
|
|
1091
|
+
return S.suspend(() =>
|
|
1092
|
+
S.Struct({
|
|
1093
|
+
kind: S.String,
|
|
1094
|
+
outputId: S.String,
|
|
1095
|
+
size: S.String,
|
|
1096
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
1097
|
+
}),
|
|
1098
|
+
).annotate({ identifier: "BaseContents" });
|
|
1099
|
+
case 16:
|
|
1100
|
+
return S.suspend(() =>
|
|
1101
|
+
S.Struct({
|
|
1102
|
+
path: S.String,
|
|
1103
|
+
outputId: S.String,
|
|
1104
|
+
size: S.String,
|
|
1105
|
+
mode: S.Number,
|
|
1106
|
+
ctime: S.optional(S.String),
|
|
1107
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
1108
|
+
mtime: S.optional(S.String),
|
|
1109
|
+
}),
|
|
1110
|
+
).annotate({ identifier: "LargeFile" });
|
|
1111
|
+
case 17:
|
|
1112
|
+
return S.Array(__S(208, __c6, 16));
|
|
1113
|
+
case 18:
|
|
1114
|
+
return S.suspend(() =>
|
|
1115
|
+
S.Struct({
|
|
1116
|
+
totalSize: S.String,
|
|
1117
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
1118
|
+
outputId: S.String,
|
|
1119
|
+
}),
|
|
1120
|
+
).annotate({ identifier: "PackedSnapshot" });
|
|
1121
|
+
case 19:
|
|
1122
|
+
return S.suspend(() =>
|
|
1123
|
+
S.Struct({
|
|
1124
|
+
key: S.String,
|
|
1125
|
+
digest: S.optional(__S(224, __c7, 0)),
|
|
1126
|
+
baseContents: S.optional(__S(207, __c6, 15)),
|
|
1127
|
+
largeFiles: __S(209, __c6, 17),
|
|
1128
|
+
packed: S.optional(__S(210, __c6, 18)),
|
|
1129
|
+
}),
|
|
1130
|
+
).annotate({ identifier: "Snapshot" });
|
|
1131
|
+
case 20:
|
|
1132
|
+
return S.Array(__S(211, __c6, 19));
|
|
1133
|
+
case 21:
|
|
1134
|
+
return S.suspend(() =>
|
|
1135
|
+
S.Struct({
|
|
1136
|
+
instanceId: S.String,
|
|
1137
|
+
}),
|
|
1138
|
+
).annotate({ identifier: "Origin" });
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
function __c7(j: number): any {
|
|
1142
|
+
switch (j) {
|
|
1143
|
+
case 0:
|
|
1144
|
+
return S.suspend(() =>
|
|
1145
|
+
S.Struct({
|
|
1146
|
+
algorithm: S.optional(S.String),
|
|
1147
|
+
value: S.optional(S.String),
|
|
1148
|
+
}),
|
|
1149
|
+
).annotate({ identifier: "Digest" });
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
function __c8(j: number): any {
|
|
1153
|
+
switch (j) {
|
|
1154
|
+
case 0:
|
|
1155
|
+
return S.suspend(() =>
|
|
1156
|
+
S.Struct({
|
|
1157
|
+
commandDuration: S.optional(S.String),
|
|
1158
|
+
}),
|
|
1159
|
+
).annotate({ identifier: "CommandAnnotations" });
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
1163
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
1164
|
+
return (__s[i] ??= __L.at(f, j));
|
|
1165
|
+
}
|