@madebyentropy/tnl 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/NOTICE +5 -0
- package/THIRD_PARTY_LICENSES.txt +3297 -0
- package/dist/adapters/ioredis.d.ts +7 -0
- package/dist/adapters/ioredis.js +87 -0
- package/dist/adapters/node-postgres.d.ts +8 -0
- package/dist/adapters/node-postgres.js +41 -0
- package/dist/adapters/postgres-js.d.ts +7 -0
- package/dist/adapters/postgres-js.js +55 -0
- package/dist/bin/tnl.d.ts +2 -0
- package/dist/bin/tnl.js +16 -0
- package/dist/browser.d.ts +18 -0
- package/dist/browser.js +43 -0
- package/dist/bun.d.ts +9 -0
- package/dist/bun.js +6 -0
- package/dist/cloudflare.d.ts +9 -0
- package/dist/cloudflare.js +16 -0
- package/dist/config.d.ts +107 -0
- package/dist/config.gen.d.ts +1185 -0
- package/dist/config.gen.js +2 -0
- package/dist/config.js +3 -0
- package/dist/control.d.ts +5 -0
- package/dist/control.js +9 -0
- package/dist/durable-object.d.ts +51 -0
- package/dist/durable-object.js +374 -0
- package/dist/durable-object.worker.d.ts +5 -0
- package/dist/durable-object.worker.js +11 -0
- package/dist/errors.d.ts +17 -0
- package/dist/errors.js +230 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2 -0
- package/dist/internal/connector/cancellation.d.ts +7 -0
- package/dist/internal/connector/cancellation.js +30 -0
- package/dist/internal/connector/client.d.ts +62 -0
- package/dist/internal/connector/client.js +504 -0
- package/dist/internal/connector/client_factory.d.ts +6 -0
- package/dist/internal/connector/client_factory.js +123 -0
- package/dist/internal/connector/connection.d.ts +39 -0
- package/dist/internal/connector/connection.js +739 -0
- package/dist/internal/connector/connection_ipc.d.ts +12 -0
- package/dist/internal/connector/connection_ipc.js +198 -0
- package/dist/internal/connector/context.d.ts +28 -0
- package/dist/internal/connector/context.js +19 -0
- package/dist/internal/connector/contract.d.ts +392 -0
- package/dist/internal/connector/contract.js +56 -0
- package/dist/internal/connector/deployment_types.d.ts +27 -0
- package/dist/internal/connector/deployment_types.js +1 -0
- package/dist/internal/connector/driver_socket.d.ts +21 -0
- package/dist/internal/connector/driver_socket.js +129 -0
- package/dist/internal/connector/management.d.ts +29 -0
- package/dist/internal/connector/management.js +118 -0
- package/dist/internal/connector/native_operations.d.ts +16 -0
- package/dist/internal/connector/native_operations.js +30 -0
- package/dist/internal/connector/native_stream.d.ts +7 -0
- package/dist/internal/connector/native_stream.js +219 -0
- package/dist/internal/connector/operation_handles.d.ts +9 -0
- package/dist/internal/connector/operation_handles.js +18 -0
- package/dist/internal/connector/portable_operations.d.ts +13 -0
- package/dist/internal/connector/portable_operations.js +25 -0
- package/dist/internal/connector/snapshot.d.ts +183 -0
- package/dist/internal/connector/snapshot.js +47 -0
- package/dist/internal/connector/wasm_abi.d.ts +76 -0
- package/dist/internal/connector/wasm_abi.js +5 -0
- package/dist/internal/connector/wasm_client.d.ts +58 -0
- package/dist/internal/connector/wasm_client.js +545 -0
- package/dist/internal/connector/wasm_loader.d.ts +15 -0
- package/dist/internal/connector/wasm_loader.js +99 -0
- package/dist/internal/connector/wasm_stream.d.ts +4 -0
- package/dist/internal/connector/wasm_stream.js +177 -0
- package/dist/internal/connector/workload/contract.d.ts +54 -0
- package/dist/internal/connector/workload/contract.js +14 -0
- package/dist/internal/connector/workload/provider.d.ts +24 -0
- package/dist/internal/connector/workload/provider.js +130 -0
- package/dist/internal/enrollment_source.d.ts +4 -0
- package/dist/internal/enrollment_source.js +34 -0
- package/dist/internal/management/client/client.gen.d.ts +2 -0
- package/dist/internal/management/client/client.gen.js +216 -0
- package/dist/internal/management/client/index.d.ts +10 -0
- package/dist/internal/management/client/index.js +6 -0
- package/dist/internal/management/client/types.gen.d.ts +120 -0
- package/dist/internal/management/client/types.gen.js +2 -0
- package/dist/internal/management/client/utils.gen.d.ts +37 -0
- package/dist/internal/management/client/utils.gen.js +228 -0
- package/dist/internal/management/client.gen.d.ts +12 -0
- package/dist/internal/management/client.gen.js +3 -0
- package/dist/internal/management/core/auth.gen.d.ts +25 -0
- package/dist/internal/management/core/auth.gen.js +14 -0
- package/dist/internal/management/core/bodySerializer.gen.d.ts +25 -0
- package/dist/internal/management/core/bodySerializer.gen.js +57 -0
- package/dist/internal/management/core/params.gen.d.ts +43 -0
- package/dist/internal/management/core/params.gen.js +109 -0
- package/dist/internal/management/core/pathSerializer.gen.d.ts +33 -0
- package/dist/internal/management/core/pathSerializer.gen.js +106 -0
- package/dist/internal/management/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/internal/management/core/queryKeySerializer.gen.js +92 -0
- package/dist/internal/management/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/internal/management/core/serverSentEvents.gen.js +132 -0
- package/dist/internal/management/core/types.gen.d.ts +83 -0
- package/dist/internal/management/core/types.gen.js +2 -0
- package/dist/internal/management/core/utils.gen.d.ts +19 -0
- package/dist/internal/management/core/utils.gen.js +87 -0
- package/dist/internal/management/index.d.ts +2 -0
- package/dist/internal/management/index.js +2 -0
- package/dist/internal/management/sdk.gen.d.ts +73 -0
- package/dist/internal/management/sdk.gen.js +191 -0
- package/dist/internal/management/types.gen.d.ts +464 -0
- package/dist/internal/management/types.gen.js +2 -0
- package/dist/internal/management/zod.gen.d.ts +850 -0
- package/dist/internal/management/zod.gen.js +252 -0
- package/dist/internal/native/launcher.d.ts +8 -0
- package/dist/internal/native/launcher.js +75 -0
- package/dist/internal/native/native-targets.d.ts +9 -0
- package/dist/internal/native/native-targets.js +8 -0
- package/dist/internal/portable/cloudflare-publisher-client.d.ts +54 -0
- package/dist/internal/portable/cloudflare-publisher-client.js +91 -0
- package/dist/internal/portable/cloudflare-publisher.d.ts +19 -0
- package/dist/internal/portable/cloudflare-publisher.js +210 -0
- package/dist/internal/portable/durable-deployment.d.ts +10 -0
- package/dist/internal/portable/durable-deployment.js +22 -0
- package/dist/internal/portable/enrollment.d.ts +26 -0
- package/dist/internal/portable/enrollment.js +196 -0
- package/dist/internal/portable/publication.d.ts +54 -0
- package/dist/internal/portable/publication.js +304 -0
- package/dist/internal/portable/request.d.ts +1 -0
- package/dist/internal/portable/request.js +20 -0
- package/dist/internal/portable/storage-browser.d.ts +9 -0
- package/dist/internal/portable/storage-browser.js +115 -0
- package/dist/internal/portable/storage-durable-object.d.ts +11 -0
- package/dist/internal/portable/storage-durable-object.js +110 -0
- package/dist/internal/portable/storage-host.d.ts +8 -0
- package/dist/internal/portable/storage-host.js +142 -0
- package/dist/internal/portable/storage.d.ts +15 -0
- package/dist/internal/portable/storage.js +29 -0
- package/dist/internal/project/native_runtime.d.ts +24 -0
- package/dist/internal/project/native_runtime.js +23 -0
- package/dist/internal/project/runtime.d.ts +467 -0
- package/dist/internal/project/runtime.js +183 -0
- package/dist/internal/project/service_metadata.d.ts +3 -0
- package/dist/internal/project/service_metadata.js +12 -0
- package/dist/internal/publication_certificate.d.ts +28 -0
- package/dist/internal/publication_certificate.js +32 -0
- package/dist/internal/publication_run.d.ts +8 -0
- package/dist/internal/publication_run.js +19 -0
- package/dist/internal/publisher/app.d.ts +33 -0
- package/dist/internal/publisher/app.js +317 -0
- package/dist/internal/publisher/fetch.d.ts +6 -0
- package/dist/internal/publisher/fetch.js +135 -0
- package/dist/internal/publisher/fetch_types.d.ts +1 -0
- package/dist/internal/publisher/fetch_types.js +1 -0
- package/dist/internal/publisher/framework.d.ts +27 -0
- package/dist/internal/publisher/framework.js +82 -0
- package/dist/internal/publisher/local.d.ts +39 -0
- package/dist/internal/publisher/local.js +312 -0
- package/dist/internal/publisher/native_publisher.d.ts +25 -0
- package/dist/internal/publisher/native_publisher.js +228 -0
- package/dist/internal/publisher/port.d.ts +2 -0
- package/dist/internal/publisher/port.js +15 -0
- package/dist/internal/publisher/publication.d.ts +88 -0
- package/dist/internal/publisher/publication.js +627 -0
- package/dist/internal/publisher/register.d.ts +31 -0
- package/dist/internal/publisher/register.js +136 -0
- package/dist/internal/publisher/registration.d.ts +385 -0
- package/dist/internal/publisher/registration.js +223 -0
- package/dist/internal/publisher/status.d.ts +47 -0
- package/dist/internal/publisher/status.js +137 -0
- package/dist/internal/publisher/target.d.ts +6 -0
- package/dist/internal/publisher/target.js +44 -0
- package/dist/internal/runtime_resources.d.ts +38 -0
- package/dist/internal/runtime_resources.js +52 -0
- package/dist/internal/tracing.d.ts +10 -0
- package/dist/internal/tracing.js +78 -0
- package/dist/internal/validation.d.ts +3 -0
- package/dist/internal/validation.js +9 -0
- package/dist/internal/values.d.ts +27 -0
- package/dist/internal/values.js +54 -0
- package/dist/next.d.ts +12 -0
- package/dist/next.js +82 -0
- package/dist/node.d.ts +9 -0
- package/dist/node.js +6 -0
- package/dist/project.d.ts +173 -0
- package/dist/project.js +1 -0
- package/dist/response.d.ts +1 -0
- package/dist/response.js +34 -0
- package/dist/third-party-licenses.txt +1537 -0
- package/dist/vite.d.ts +5 -0
- package/dist/vite.js +200 -0
- package/dist/wasm/build.json +16 -0
- package/dist/wasm/connector.wasm +0 -0
- package/dist/wasm/go-license.txt +27 -0
- package/dist/wasm/publisher.wasm +0 -0
- package/dist/wasm/third-party-licenses.txt +3297 -0
- package/dist/wasm/wasm_exec.d.ts +1 -0
- package/dist/wasm/wasm_exec.js +575 -0
- package/dist/workload.d.ts +11 -0
- package/dist/workload.js +4 -0
- package/package.json +159 -4
- package/readme.md +13 -0
- package/README.md +0 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TnlError } from "../../errors.js";
|
|
2
|
+
import type { SelectionOptions, WorkloadRequest } from "./workload/contract.js";
|
|
3
|
+
export interface OwnerIPC {
|
|
4
|
+
readonly expiresAt: number;
|
|
5
|
+
prepare(service: string, assertion?: string, selection?: SelectionOptions, expected?: ProjectDeploymentSelection): Promise<unknown>;
|
|
6
|
+
workload(service: string, request: WorkloadRequest): Promise<unknown>;
|
|
7
|
+
close(reason?: TnlError): void;
|
|
8
|
+
}
|
|
9
|
+
type ProjectDeploymentSelection = Pick<NonNullable<SelectionOptions["deployment"]>, "project" | "name">;
|
|
10
|
+
/** private capability loading mirrors connector ownership/symlink/size checks. */
|
|
11
|
+
export declare function ownerIPC(filename: string): Promise<OwnerIPC>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { constants } from "node:fs";
|
|
2
|
+
import { lstat, open } from "node:fs/promises";
|
|
3
|
+
import { Agent, request } from "node:http";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
import { isDeepStrictEqual } from "node:util";
|
|
6
|
+
import { TnlError } from "../../errors.js";
|
|
7
|
+
import { connectionHandleSchema } from "./contract.js";
|
|
8
|
+
import { operation, traceHeaders } from "../tracing.js";
|
|
9
|
+
/** initial reads and renewal reads enforce the same private-file boundary. */
|
|
10
|
+
async function readHandle(filename) {
|
|
11
|
+
if (!path.isAbsolute(filename) ||
|
|
12
|
+
filename.includes("\0") ||
|
|
13
|
+
filename.length > 4096 ||
|
|
14
|
+
process.getuid === undefined)
|
|
15
|
+
throw new Error("invalid handle path");
|
|
16
|
+
const parent = path.dirname(filename);
|
|
17
|
+
for (let directory = parent;; directory = path.dirname(directory)) {
|
|
18
|
+
const info = await lstat(directory);
|
|
19
|
+
if (!info.isDirectory() ||
|
|
20
|
+
info.isSymbolicLink() ||
|
|
21
|
+
((info.mode & 0o022) !== 0 && (info.mode & 0o1000) === 0))
|
|
22
|
+
throw new Error("unsafe handle ancestor");
|
|
23
|
+
if (directory === parent && ((info.mode & 0o777) !== 0o700 || info.uid !== process.getuid()))
|
|
24
|
+
throw new Error("unowned handle directory");
|
|
25
|
+
if (directory === path.dirname(directory))
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
const file = await open(filename, constants.O_RDONLY | constants.O_NONBLOCK | constants.O_NOFOLLOW);
|
|
29
|
+
let data;
|
|
30
|
+
try {
|
|
31
|
+
const info = await file.stat();
|
|
32
|
+
if (!info.isFile() ||
|
|
33
|
+
(info.mode & 0o777) !== 0o600 ||
|
|
34
|
+
info.uid !== process.getuid() ||
|
|
35
|
+
info.size > 128 * 1024)
|
|
36
|
+
throw new Error("unowned handle");
|
|
37
|
+
const buffer = Buffer.alloc(128 * 1024 + 1);
|
|
38
|
+
let total = 0;
|
|
39
|
+
while (total < buffer.length) {
|
|
40
|
+
const { bytesRead } = await file.read(buffer, total, buffer.length - total, null);
|
|
41
|
+
if (bytesRead === 0)
|
|
42
|
+
break;
|
|
43
|
+
total += bytesRead;
|
|
44
|
+
}
|
|
45
|
+
if (total > 128 * 1024)
|
|
46
|
+
throw new Error("oversized handle");
|
|
47
|
+
data = buffer.subarray(0, total);
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
await file.close();
|
|
51
|
+
}
|
|
52
|
+
return connectionHandleSchema.parse(JSON.parse(data.toString("utf8")));
|
|
53
|
+
}
|
|
54
|
+
/** private capability loading mirrors connector ownership/symlink/size checks. */
|
|
55
|
+
export async function ownerIPC(filename) {
|
|
56
|
+
try {
|
|
57
|
+
const handle = await readHandle(filename);
|
|
58
|
+
const { expires_at: initialExpiry, ...identity } = handle;
|
|
59
|
+
const endpoint = new URL(handle.url);
|
|
60
|
+
const key = handle.key;
|
|
61
|
+
const scope = { schema: 1, directory: handle.directory, config_digest: handle.config_digest };
|
|
62
|
+
let expires = initialExpiry;
|
|
63
|
+
const agent = new Agent({ keepAlive: true, maxSockets: 4, maxFreeSockets: 4 });
|
|
64
|
+
let pending = 0;
|
|
65
|
+
let closed = false;
|
|
66
|
+
let closeReason = new TnlError("sdk.connection_unavailable");
|
|
67
|
+
let expiry;
|
|
68
|
+
let refreshing;
|
|
69
|
+
const close = (reason) => {
|
|
70
|
+
if (reason !== undefined)
|
|
71
|
+
closeReason = reason;
|
|
72
|
+
closed = true;
|
|
73
|
+
clearTimeout(expiry);
|
|
74
|
+
agent.destroy();
|
|
75
|
+
};
|
|
76
|
+
const scheduleExpiry = () => {
|
|
77
|
+
clearTimeout(expiry);
|
|
78
|
+
expiry = setTimeout(() => {
|
|
79
|
+
if (Date.now() < expires)
|
|
80
|
+
scheduleExpiry();
|
|
81
|
+
else
|
|
82
|
+
void current().catch(() => { });
|
|
83
|
+
}, Math.max(1, Math.min(expires - Date.now(), 2 ** 31 - 1)));
|
|
84
|
+
expiry.unref();
|
|
85
|
+
};
|
|
86
|
+
// renewal can advance only this exact capability. it never retargets an
|
|
87
|
+
// adapter or replays a request already sent to the native owner.
|
|
88
|
+
const current = async () => {
|
|
89
|
+
if (closed)
|
|
90
|
+
throw closeReason;
|
|
91
|
+
if (Date.now() < expires)
|
|
92
|
+
return;
|
|
93
|
+
refreshing ??= (async () => {
|
|
94
|
+
try {
|
|
95
|
+
const { expires_at: next, ...nextIdentity } = await readHandle(filename);
|
|
96
|
+
if (!isDeepStrictEqual(identity, nextIdentity) || next <= Date.now())
|
|
97
|
+
throw new TnlError("sdk.connection_unavailable");
|
|
98
|
+
if (!closed) {
|
|
99
|
+
expires = next;
|
|
100
|
+
scheduleExpiry();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
close();
|
|
105
|
+
throw new TnlError("sdk.connection_unavailable");
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
refreshing = undefined;
|
|
109
|
+
}
|
|
110
|
+
})();
|
|
111
|
+
await refreshing;
|
|
112
|
+
if (closed)
|
|
113
|
+
throw closeReason;
|
|
114
|
+
if (Date.now() >= expires)
|
|
115
|
+
throw new TnlError("sdk.connection_unavailable");
|
|
116
|
+
};
|
|
117
|
+
scheduleExpiry();
|
|
118
|
+
const send = (operationName, service, assertion, selection, expected) => {
|
|
119
|
+
return operation("sdk.native.request", async () => {
|
|
120
|
+
if (closed)
|
|
121
|
+
throw closeReason;
|
|
122
|
+
if (pending >= 64)
|
|
123
|
+
throw new TnlError("sdk.connection_unavailable");
|
|
124
|
+
pending++;
|
|
125
|
+
try {
|
|
126
|
+
await current();
|
|
127
|
+
return await new Promise((resolve, reject) => {
|
|
128
|
+
const body = JSON.stringify({
|
|
129
|
+
...scope,
|
|
130
|
+
service,
|
|
131
|
+
...(assertion === undefined ? {} : { assertion }),
|
|
132
|
+
...selection,
|
|
133
|
+
...(expected === undefined ? {} : { selection: expected }),
|
|
134
|
+
});
|
|
135
|
+
const req = request(new URL(`/v1/connections/${operationName}`, endpoint), {
|
|
136
|
+
method: "POST",
|
|
137
|
+
agent,
|
|
138
|
+
headers: {
|
|
139
|
+
...traceHeaders(),
|
|
140
|
+
authorization: `Bearer ${key}`,
|
|
141
|
+
"content-type": "application/json",
|
|
142
|
+
"content-length": Buffer.byteLength(body),
|
|
143
|
+
},
|
|
144
|
+
}, (response) => {
|
|
145
|
+
const chunks = [];
|
|
146
|
+
let size = 0;
|
|
147
|
+
response.on("data", (chunk) => {
|
|
148
|
+
size += chunk.length;
|
|
149
|
+
if (size > 128 * 1024) {
|
|
150
|
+
response.destroy();
|
|
151
|
+
reject(new TnlError("sdk.response_invalid"));
|
|
152
|
+
}
|
|
153
|
+
else
|
|
154
|
+
chunks.push(chunk);
|
|
155
|
+
});
|
|
156
|
+
response.on("error", () => reject(closed ? closeReason : new TnlError("sdk.connection_unavailable")));
|
|
157
|
+
response.on("end", () => {
|
|
158
|
+
if ((response.statusCode !== 200 && operationName === "prepare") ||
|
|
159
|
+
response.headers["content-type"]?.split(";")[0] !== "application/json") {
|
|
160
|
+
reject(new TnlError("sdk.connection_unavailable"));
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
const value = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
165
|
+
resolve(value);
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
reject(new TnlError("sdk.response_invalid"));
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
const timer = setTimeout(() => req.destroy(new Error("owner IPC deadline")), 35_000);
|
|
173
|
+
req.once("close", () => clearTimeout(timer));
|
|
174
|
+
req.once("error", () => reject(closed ? closeReason : new TnlError("sdk.connection_unavailable")));
|
|
175
|
+
req.end(body);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
catch (cause) {
|
|
179
|
+
throw cause instanceof TnlError ? cause : new TnlError("sdk.connection_unavailable");
|
|
180
|
+
}
|
|
181
|
+
finally {
|
|
182
|
+
pending--;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
return Object.freeze({
|
|
187
|
+
get expiresAt() {
|
|
188
|
+
return expires;
|
|
189
|
+
},
|
|
190
|
+
prepare: (service, assertion, selection, expected) => send(selection === undefined ? "prepare" : "sdk-prepare", service, assertion, selection, expected),
|
|
191
|
+
workload: (service, request) => send("sdk-workload", service, undefined, { sdk_workload: request }),
|
|
192
|
+
close,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
throw new TnlError("sdk.connection_unavailable");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WorkloadConfiguration } from "./workload/provider.js";
|
|
2
|
+
import { TnlError } from "../../errors.js";
|
|
3
|
+
import type { OwnerIPC } from "./connection_ipc.js";
|
|
4
|
+
import type { SelectionOptions, WorkloadRequest } from "./workload/contract.js";
|
|
5
|
+
export interface NativeScope {
|
|
6
|
+
readonly directory: string;
|
|
7
|
+
readonly registry: string;
|
|
8
|
+
readonly binary: string;
|
|
9
|
+
readonly signal?: AbortSignal;
|
|
10
|
+
readonly environment: Pick<NodeJS.ProcessEnv, "TNL_STATE_DIR" | "TNL_SERVER" | "TNL_CONNECTION_HANDLE">;
|
|
11
|
+
open(file: string): Promise<OwnerIPC>;
|
|
12
|
+
select(args: string[], input: unknown, name: string, assertion: string | undefined, options: SelectionOptions): Promise<unknown>;
|
|
13
|
+
workload(name: string, request: WorkloadRequest): Promise<unknown>;
|
|
14
|
+
close?(until?: number, reason?: TnlError): Promise<void>;
|
|
15
|
+
entry?: {
|
|
16
|
+
readonly file: string;
|
|
17
|
+
readonly ipc: Promise<OwnerIPC>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface ConnectorContext {
|
|
21
|
+
readonly workloads: Map<string, WorkloadConfiguration>;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
var __tnlConnectorContextV2: ConnectorContext | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare const context: ConnectorContext;
|
|
27
|
+
export declare function contextKey(): string;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
2
|
+
import { TnlError } from "../../errors.js";
|
|
3
|
+
// copies share only workload setup. each deployment owns its IPC and cleanup.
|
|
4
|
+
export const context = (globalThis.__tnlConnectorContextV2 ??= {
|
|
5
|
+
workloads: new Map(),
|
|
6
|
+
});
|
|
7
|
+
export function contextKey() {
|
|
8
|
+
try {
|
|
9
|
+
return JSON.stringify([
|
|
10
|
+
realpathSync(process.cwd()),
|
|
11
|
+
process.env.TNL_STATE_DIR,
|
|
12
|
+
process.env.TNL_SERVER,
|
|
13
|
+
process.env.TNL_CONNECTION_HANDLE,
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
throw new TnlError("sdk.configuration_invalid");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const preparedConnectionSchema: z.ZodObject<{
|
|
3
|
+
schema: z.ZodLiteral<1>;
|
|
4
|
+
project_runtime: z.ZodReadonly<z.ZodObject<{
|
|
5
|
+
namespace: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
|
|
6
|
+
services: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
namespace: z.ZodString;
|
|
8
|
+
hostname: z.ZodString;
|
|
9
|
+
port: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodInt]>;
|
|
10
|
+
public: z.ZodBoolean;
|
|
11
|
+
protocol: z.ZodLiteral<"http">;
|
|
12
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
13
|
+
paths: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodTemplateLiteral<`/${string}`>, z.ZodReadonly<z.ZodObject<{
|
|
14
|
+
service: z.ZodString;
|
|
15
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
16
|
+
stripPrefix: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strict>>>, z.ZodTransform<Readonly<Record<string, Readonly<{
|
|
18
|
+
service: string;
|
|
19
|
+
url: `https://${string}`;
|
|
20
|
+
stripPrefix: boolean;
|
|
21
|
+
}> | undefined>>, Record<`/${string}`, Readonly<{
|
|
22
|
+
service: string;
|
|
23
|
+
url: `https://${string}`;
|
|
24
|
+
stripPrefix: boolean;
|
|
25
|
+
}>>>>>;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
namespace: z.ZodString;
|
|
28
|
+
hostname: z.ZodString;
|
|
29
|
+
port: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodInt]>;
|
|
30
|
+
public: z.ZodBoolean;
|
|
31
|
+
protocol: z.ZodLiteral<"kubernetes">;
|
|
32
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
namespace: z.ZodString;
|
|
35
|
+
hostname: z.ZodString;
|
|
36
|
+
port: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodInt]>;
|
|
37
|
+
public: z.ZodBoolean;
|
|
38
|
+
protocol: z.ZodLiteral<"postgres">;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
namespace: z.ZodString;
|
|
41
|
+
hostname: z.ZodString;
|
|
42
|
+
port: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodInt]>;
|
|
43
|
+
public: z.ZodBoolean;
|
|
44
|
+
protocol: z.ZodLiteral<"mysql">;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
namespace: z.ZodString;
|
|
47
|
+
hostname: z.ZodString;
|
|
48
|
+
port: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodInt]>;
|
|
49
|
+
public: z.ZodBoolean;
|
|
50
|
+
protocol: z.ZodLiteral<"tcp">;
|
|
51
|
+
}, z.core.$strict>], "protocol">>>, z.ZodTransform<Readonly<Record<string, Readonly<{
|
|
52
|
+
namespace: string;
|
|
53
|
+
hostname: string;
|
|
54
|
+
port: number;
|
|
55
|
+
public: boolean;
|
|
56
|
+
protocol: "http";
|
|
57
|
+
url: `https://${string}`;
|
|
58
|
+
paths?: Readonly<Record<string, Readonly<{
|
|
59
|
+
service: string;
|
|
60
|
+
url: `https://${string}`;
|
|
61
|
+
stripPrefix: boolean;
|
|
62
|
+
}> | undefined>> | undefined;
|
|
63
|
+
}> | Readonly<{
|
|
64
|
+
namespace: string;
|
|
65
|
+
hostname: string;
|
|
66
|
+
port: number;
|
|
67
|
+
public: boolean;
|
|
68
|
+
protocol: "kubernetes";
|
|
69
|
+
url: `https://${string}`;
|
|
70
|
+
}> | Readonly<{
|
|
71
|
+
namespace: string;
|
|
72
|
+
hostname: string;
|
|
73
|
+
port: number;
|
|
74
|
+
public: boolean;
|
|
75
|
+
protocol: "postgres";
|
|
76
|
+
}> | Readonly<{
|
|
77
|
+
namespace: string;
|
|
78
|
+
hostname: string;
|
|
79
|
+
port: number;
|
|
80
|
+
public: boolean;
|
|
81
|
+
protocol: "mysql";
|
|
82
|
+
}> | Readonly<{
|
|
83
|
+
namespace: string;
|
|
84
|
+
hostname: string;
|
|
85
|
+
port: number;
|
|
86
|
+
public: boolean;
|
|
87
|
+
protocol: "tcp";
|
|
88
|
+
}> | undefined>>, Record<string, Readonly<{
|
|
89
|
+
namespace: string;
|
|
90
|
+
hostname: string;
|
|
91
|
+
port: number;
|
|
92
|
+
public: boolean;
|
|
93
|
+
protocol: "http";
|
|
94
|
+
url: `https://${string}`;
|
|
95
|
+
paths?: Readonly<Record<string, Readonly<{
|
|
96
|
+
service: string;
|
|
97
|
+
url: `https://${string}`;
|
|
98
|
+
stripPrefix: boolean;
|
|
99
|
+
}> | undefined>> | undefined;
|
|
100
|
+
}> | Readonly<{
|
|
101
|
+
namespace: string;
|
|
102
|
+
hostname: string;
|
|
103
|
+
port: number;
|
|
104
|
+
public: boolean;
|
|
105
|
+
protocol: "kubernetes";
|
|
106
|
+
url: `https://${string}`;
|
|
107
|
+
}> | Readonly<{
|
|
108
|
+
namespace: string;
|
|
109
|
+
hostname: string;
|
|
110
|
+
port: number;
|
|
111
|
+
public: boolean;
|
|
112
|
+
protocol: "postgres";
|
|
113
|
+
}> | Readonly<{
|
|
114
|
+
namespace: string;
|
|
115
|
+
hostname: string;
|
|
116
|
+
port: number;
|
|
117
|
+
public: boolean;
|
|
118
|
+
protocol: "mysql";
|
|
119
|
+
}> | Readonly<{
|
|
120
|
+
namespace: string;
|
|
121
|
+
hostname: string;
|
|
122
|
+
port: number;
|
|
123
|
+
public: boolean;
|
|
124
|
+
protocol: "tcp";
|
|
125
|
+
}>>>>;
|
|
126
|
+
worktree: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
127
|
+
label: z.ZodReadonly<z.ZodObject<{
|
|
128
|
+
project: z.ZodString;
|
|
129
|
+
checkout: z.ZodExactOptional<z.ZodString>;
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
fullLabel: z.ZodString;
|
|
132
|
+
}, z.core.$strict>>;
|
|
133
|
+
}, z.core.$strict>>>;
|
|
134
|
+
oauth: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
135
|
+
hostname: z.ZodString;
|
|
136
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
137
|
+
}, z.core.$strict>>>;
|
|
138
|
+
webhooks: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodReadonly<z.ZodObject<{
|
|
139
|
+
hostname: z.ZodString;
|
|
140
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
141
|
+
service: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
|
|
142
|
+
path: z.ZodTemplateLiteral<`/${string}`>;
|
|
143
|
+
methods: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
144
|
+
DELETE: "DELETE";
|
|
145
|
+
GET: "GET";
|
|
146
|
+
HEAD: "HEAD";
|
|
147
|
+
OPTIONS: "OPTIONS";
|
|
148
|
+
PATCH: "PATCH";
|
|
149
|
+
POST: "POST";
|
|
150
|
+
PUT: "PUT";
|
|
151
|
+
}>>>;
|
|
152
|
+
}, z.core.$strict>>>, z.ZodTransform<Readonly<Record<string, Readonly<{
|
|
153
|
+
hostname: string;
|
|
154
|
+
url: `https://${string}`;
|
|
155
|
+
service: string;
|
|
156
|
+
path: `/${string}`;
|
|
157
|
+
methods: readonly ("DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT")[];
|
|
158
|
+
}> | undefined>>, Record<string, Readonly<{
|
|
159
|
+
hostname: string;
|
|
160
|
+
url: `https://${string}`;
|
|
161
|
+
service: string;
|
|
162
|
+
path: `/${string}`;
|
|
163
|
+
methods: readonly ("DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT")[];
|
|
164
|
+
}>>>>>;
|
|
165
|
+
aliases: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodReadonly<z.ZodObject<{
|
|
166
|
+
hostname: z.ZodString;
|
|
167
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
168
|
+
service: z.ZodString;
|
|
169
|
+
}, z.core.$strict>>>, z.ZodTransform<Readonly<Record<string, Readonly<{
|
|
170
|
+
hostname: string;
|
|
171
|
+
url: `https://${string}`;
|
|
172
|
+
service: string;
|
|
173
|
+
}> | undefined>>, Record<string, Readonly<{
|
|
174
|
+
hostname: string;
|
|
175
|
+
url: `https://${string}`;
|
|
176
|
+
service: string;
|
|
177
|
+
}>>>>>;
|
|
178
|
+
dev: z.ZodBoolean;
|
|
179
|
+
}, z.core.$strict>>;
|
|
180
|
+
connection: z.ZodReadonly<z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
|
+
schema: z.ZodLiteral<1>;
|
|
182
|
+
host: z.ZodLiteral<"127.0.0.1">;
|
|
183
|
+
port: z.ZodInt;
|
|
184
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
185
|
+
transport_id: z.core.$ZodBranded<z.ZodTemplateLiteral<`ctg_${string}`>, "TransportID", "out">;
|
|
186
|
+
protocol: z.ZodLiteral<"tcp">;
|
|
187
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
188
|
+
schema: z.ZodLiteral<1>;
|
|
189
|
+
host: z.ZodLiteral<"127.0.0.1">;
|
|
190
|
+
port: z.ZodInt;
|
|
191
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
192
|
+
transport_id: z.core.$ZodBranded<z.ZodTemplateLiteral<`ctg_${string}`>, "TransportID", "out">;
|
|
193
|
+
protocol: z.ZodLiteral<"postgres">;
|
|
194
|
+
ssl: z.ZodReadonly<z.ZodObject<{
|
|
195
|
+
servername: z.ZodString;
|
|
196
|
+
rejectUnauthorized: z.ZodLiteral<true>;
|
|
197
|
+
ca: z.ZodExactOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$strict>>;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
schema: z.ZodLiteral<1>;
|
|
201
|
+
host: z.ZodLiteral<"127.0.0.1">;
|
|
202
|
+
port: z.ZodInt;
|
|
203
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
204
|
+
transport_id: z.core.$ZodBranded<z.ZodTemplateLiteral<`ctg_${string}`>, "TransportID", "out">;
|
|
205
|
+
protocol: z.ZodLiteral<"mysql">;
|
|
206
|
+
ssl: z.ZodReadonly<z.ZodObject<{
|
|
207
|
+
servername: z.ZodString;
|
|
208
|
+
rejectUnauthorized: z.ZodLiteral<true>;
|
|
209
|
+
ca: z.ZodExactOptional<z.ZodString>;
|
|
210
|
+
}, z.core.$strict>>;
|
|
211
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
212
|
+
schema: z.ZodLiteral<1>;
|
|
213
|
+
host: z.ZodLiteral<"127.0.0.1">;
|
|
214
|
+
port: z.ZodInt;
|
|
215
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
216
|
+
transport_id: z.core.$ZodBranded<z.ZodTemplateLiteral<`ctg_${string}`>, "TransportID", "out">;
|
|
217
|
+
ssl: z.ZodReadonly<z.ZodObject<{
|
|
218
|
+
servername: z.ZodString;
|
|
219
|
+
rejectUnauthorized: z.ZodLiteral<true>;
|
|
220
|
+
ca: z.ZodExactOptional<z.ZodString>;
|
|
221
|
+
}, z.core.$strict>>;
|
|
222
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
223
|
+
protocol: z.ZodLiteral<"http">;
|
|
224
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
225
|
+
schema: z.ZodLiteral<1>;
|
|
226
|
+
host: z.ZodLiteral<"127.0.0.1">;
|
|
227
|
+
port: z.ZodInt;
|
|
228
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
229
|
+
transport_id: z.core.$ZodBranded<z.ZodTemplateLiteral<`ctg_${string}`>, "TransportID", "out">;
|
|
230
|
+
ssl: z.ZodReadonly<z.ZodObject<{
|
|
231
|
+
servername: z.ZodString;
|
|
232
|
+
rejectUnauthorized: z.ZodLiteral<true>;
|
|
233
|
+
ca: z.ZodExactOptional<z.ZodString>;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
url: z.ZodTemplateLiteral<`https://${string}`>;
|
|
236
|
+
protocol: z.ZodLiteral<"kubernetes">;
|
|
237
|
+
kubeconfig: z.ZodString;
|
|
238
|
+
context: z.ZodTemplateLiteral<`tnl:${string}`>;
|
|
239
|
+
}, z.core.$strict>], "protocol">, z.ZodTransform<{
|
|
240
|
+
host: "127.0.0.1";
|
|
241
|
+
port: number;
|
|
242
|
+
protocol: "tcp";
|
|
243
|
+
expires: number;
|
|
244
|
+
transportID: `ctg_${string}` & z.$brand<"TransportID">;
|
|
245
|
+
} | {
|
|
246
|
+
host: "127.0.0.1";
|
|
247
|
+
port: number;
|
|
248
|
+
protocol: "postgres";
|
|
249
|
+
ssl: Readonly<{
|
|
250
|
+
servername: string;
|
|
251
|
+
rejectUnauthorized: true;
|
|
252
|
+
ca?: string;
|
|
253
|
+
}>;
|
|
254
|
+
expires: number;
|
|
255
|
+
transportID: `ctg_${string}` & z.$brand<"TransportID">;
|
|
256
|
+
} | {
|
|
257
|
+
host: "127.0.0.1";
|
|
258
|
+
port: number;
|
|
259
|
+
protocol: "mysql";
|
|
260
|
+
ssl: Readonly<{
|
|
261
|
+
servername: string;
|
|
262
|
+
rejectUnauthorized: true;
|
|
263
|
+
ca?: string;
|
|
264
|
+
}>;
|
|
265
|
+
expires: number;
|
|
266
|
+
transportID: `ctg_${string}` & z.$brand<"TransportID">;
|
|
267
|
+
} | {
|
|
268
|
+
host: "127.0.0.1";
|
|
269
|
+
port: number;
|
|
270
|
+
ssl: Readonly<{
|
|
271
|
+
servername: string;
|
|
272
|
+
rejectUnauthorized: true;
|
|
273
|
+
ca?: string;
|
|
274
|
+
}>;
|
|
275
|
+
url: `https://${string}`;
|
|
276
|
+
protocol: "http";
|
|
277
|
+
expires: number;
|
|
278
|
+
transportID: `ctg_${string}` & z.$brand<"TransportID">;
|
|
279
|
+
} | {
|
|
280
|
+
host: "127.0.0.1";
|
|
281
|
+
port: number;
|
|
282
|
+
ssl: Readonly<{
|
|
283
|
+
servername: string;
|
|
284
|
+
rejectUnauthorized: true;
|
|
285
|
+
ca?: string;
|
|
286
|
+
}>;
|
|
287
|
+
url: `https://${string}`;
|
|
288
|
+
protocol: "kubernetes";
|
|
289
|
+
kubeconfig: string;
|
|
290
|
+
context: `tnl:${string}`;
|
|
291
|
+
expires: number;
|
|
292
|
+
transportID: `ctg_${string}` & z.$brand<"TransportID">;
|
|
293
|
+
}, {
|
|
294
|
+
schema: 1;
|
|
295
|
+
host: "127.0.0.1";
|
|
296
|
+
port: number;
|
|
297
|
+
expires_at: number;
|
|
298
|
+
transport_id: `ctg_${string}` & z.$brand<"TransportID">;
|
|
299
|
+
protocol: "tcp";
|
|
300
|
+
} | {
|
|
301
|
+
schema: 1;
|
|
302
|
+
host: "127.0.0.1";
|
|
303
|
+
port: number;
|
|
304
|
+
expires_at: number;
|
|
305
|
+
transport_id: `ctg_${string}` & z.$brand<"TransportID">;
|
|
306
|
+
protocol: "postgres";
|
|
307
|
+
ssl: Readonly<{
|
|
308
|
+
servername: string;
|
|
309
|
+
rejectUnauthorized: true;
|
|
310
|
+
ca?: string;
|
|
311
|
+
}>;
|
|
312
|
+
} | {
|
|
313
|
+
schema: 1;
|
|
314
|
+
host: "127.0.0.1";
|
|
315
|
+
port: number;
|
|
316
|
+
expires_at: number;
|
|
317
|
+
transport_id: `ctg_${string}` & z.$brand<"TransportID">;
|
|
318
|
+
protocol: "mysql";
|
|
319
|
+
ssl: Readonly<{
|
|
320
|
+
servername: string;
|
|
321
|
+
rejectUnauthorized: true;
|
|
322
|
+
ca?: string;
|
|
323
|
+
}>;
|
|
324
|
+
} | {
|
|
325
|
+
schema: 1;
|
|
326
|
+
host: "127.0.0.1";
|
|
327
|
+
port: number;
|
|
328
|
+
expires_at: number;
|
|
329
|
+
transport_id: `ctg_${string}` & z.$brand<"TransportID">;
|
|
330
|
+
ssl: Readonly<{
|
|
331
|
+
servername: string;
|
|
332
|
+
rejectUnauthorized: true;
|
|
333
|
+
ca?: string;
|
|
334
|
+
}>;
|
|
335
|
+
url: `https://${string}`;
|
|
336
|
+
protocol: "http";
|
|
337
|
+
} | {
|
|
338
|
+
schema: 1;
|
|
339
|
+
host: "127.0.0.1";
|
|
340
|
+
port: number;
|
|
341
|
+
expires_at: number;
|
|
342
|
+
transport_id: `ctg_${string}` & z.$brand<"TransportID">;
|
|
343
|
+
ssl: Readonly<{
|
|
344
|
+
servername: string;
|
|
345
|
+
rejectUnauthorized: true;
|
|
346
|
+
ca?: string;
|
|
347
|
+
}>;
|
|
348
|
+
url: `https://${string}`;
|
|
349
|
+
protocol: "kubernetes";
|
|
350
|
+
kubeconfig: string;
|
|
351
|
+
context: `tnl:${string}`;
|
|
352
|
+
}>>>;
|
|
353
|
+
verification: z.ZodExactOptional<z.ZodReadonly<z.ZodPipe<z.ZodObject<{
|
|
354
|
+
digest: z.ZodString;
|
|
355
|
+
binding: z.ZodString;
|
|
356
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
357
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
358
|
+
digest: string;
|
|
359
|
+
binding: string;
|
|
360
|
+
expires: number;
|
|
361
|
+
}, {
|
|
362
|
+
digest: string;
|
|
363
|
+
binding: string;
|
|
364
|
+
expires_at: number;
|
|
365
|
+
}>>>>;
|
|
366
|
+
}, z.core.$strict>;
|
|
367
|
+
export declare const sdkPreparationSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
368
|
+
schema: z.ZodLiteral<1>;
|
|
369
|
+
owner: z.ZodObject<{
|
|
370
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
371
|
+
connection_handle: z.ZodString;
|
|
372
|
+
executable: z.ZodString;
|
|
373
|
+
}, z.core.$strict>;
|
|
374
|
+
prepared: z.ZodNonOptional<z.ZodUnknown>;
|
|
375
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
376
|
+
schema: z.ZodLiteral<1>;
|
|
377
|
+
reason: z.ZodString;
|
|
378
|
+
sdk_retained_start_failure: z.ZodExactOptional<z.ZodBoolean>;
|
|
379
|
+
sdk_failure_handle: z.ZodExactOptional<z.ZodString>;
|
|
380
|
+
sdk_owner_handle: z.ZodExactOptional<z.ZodString>;
|
|
381
|
+
}, z.core.$strict>]>;
|
|
382
|
+
export declare const connectionHandleSchema: z.ZodObject<{
|
|
383
|
+
schema: z.ZodLiteral<1>;
|
|
384
|
+
url: z.ZodTemplateLiteral<`http://127.0.0.1:${string}`>;
|
|
385
|
+
key: z.ZodString;
|
|
386
|
+
directory: z.ZodString;
|
|
387
|
+
config_digest: z.ZodString;
|
|
388
|
+
expires_at: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
389
|
+
executable: z.ZodNonOptional<z.ZodUnknown>;
|
|
390
|
+
workload: z.ZodOptional<z.ZodUnknown>;
|
|
391
|
+
team_id: z.ZodOptional<z.ZodUnknown>;
|
|
392
|
+
}, z.core.$strict>;
|