@kici-dev/agent 0.8.0 → 0.9.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/dist/container-ts-loader-hook.js +23 -18
- package/dist/eval-runner.js +19 -22
- package/dist/execution/artifacts/artifact-engine.d.ts +1 -1
- package/dist/execution/sandbox/ipc-protocol.d.ts +0 -5
- package/dist/execution/source-restore.d.ts +4 -9
- package/dist/execution/workflow-loader.d.ts +4 -6
- package/dist/provenance/statement-builder.d.ts +2 -2
- package/dist/server.js +45 -34
- package/dist/workflow-runner-bundle.js +6552 -16795
- package/dist/workflow-runner.js +27 -37
- package/dist/ws/orchestrator-client.d.ts +12 -0
- package/package.json +11 -11
- package/sbom.spdx.json +806 -1023
|
@@ -29,23 +29,23 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
32
|
-
/*! *****************************************************************************
|
|
33
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
34
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
35
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
36
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
37
|
-
|
|
38
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
39
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
40
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
41
|
-
MERCHANTABILITY OR NON-INFRINGEMENT.
|
|
42
|
-
|
|
43
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
44
|
-
and limitations under the License.
|
|
45
|
-
***************************************************************************** */
|
|
46
32
|
//#endregion
|
|
47
|
-
//#region
|
|
48
|
-
var
|
|
33
|
+
//#region ../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/typescript.js
|
|
34
|
+
var require_typescript$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
35
|
+
/*! *****************************************************************************
|
|
36
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
37
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
38
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
39
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
|
|
41
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
42
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
43
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
44
|
+
MERCHANTABILITY OR NON-INFRINGEMENT.
|
|
45
|
+
|
|
46
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
47
|
+
and limitations under the License.
|
|
48
|
+
***************************************************************************** */
|
|
49
49
|
var ts = {};
|
|
50
50
|
((module$1) => {
|
|
51
51
|
"use strict";
|
|
@@ -8059,8 +8059,8 @@ ${lanes.join("\n")}
|
|
|
8059
8059
|
function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) {
|
|
8060
8060
|
const fromComponents = reducePathComponents(getPathComponents(from));
|
|
8061
8061
|
const toComponents = reducePathComponents(getPathComponents(to));
|
|
8062
|
-
let start;
|
|
8063
|
-
for (
|
|
8062
|
+
let start = 0;
|
|
8063
|
+
for (; start < fromComponents.length && start < toComponents.length; start++) {
|
|
8064
8064
|
const fromComponent = getCanonicalFileName(fromComponents[start]);
|
|
8065
8065
|
const toComponent = getCanonicalFileName(toComponents[start]);
|
|
8066
8066
|
if (!(start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer)(fromComponent, toComponent)) break;
|
|
@@ -147892,6 +147892,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
147892
147892
|
if (typeof module !== "undefined" && module.exports) module.exports = v;
|
|
147893
147893
|
}
|
|
147894
147894
|
});
|
|
147895
|
+
}));
|
|
147896
|
+
//#endregion
|
|
147897
|
+
//#region src/execution/sandbox/container-ts-loader-hook.ts
|
|
147898
|
+
var import_typescript = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
147899
|
+
module.exports = require_typescript$1();
|
|
147895
147900
|
})))(), 1);
|
|
147896
147901
|
function resolve(specifier, context, nextResolve) {
|
|
147897
147902
|
if (specifier.endsWith(".js") && (specifier.startsWith("./") || specifier.startsWith("../"))) try {
|
package/dist/eval-runner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire, register } from "node:module";
|
|
2
2
|
import { normalizeLineEndings, sha256, toErrorMessage } from "@kici-dev/shared";
|
|
3
|
-
import { buildKiciApi, buildNeedsContext, createFilterContext
|
|
3
|
+
import { buildKiciApi, buildNeedsContext, createFilterContext } from "@kici-dev/sdk/internal";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { format } from "node:util";
|
|
6
6
|
import path, { join } from "node:path";
|
|
@@ -165,28 +165,25 @@ var workflow_loader_exports = /* @__PURE__ */ __exportAll({
|
|
|
165
165
|
* ESM modules by resolved URL, so importing that path yields the workflow's live
|
|
166
166
|
* singleton, not a fresh copy.
|
|
167
167
|
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
* Falls back to the agent's bundled setters when neither resolves (mirrors
|
|
173
|
-
* `resolveSdkSetters` in the compiler's test runner).
|
|
168
|
+
* The setters live only on `@kici-dev/sdk/internal`. A tree whose SDK does not
|
|
169
|
+
* publish that subpath cannot be wired to this agent, and the agent's own
|
|
170
|
+
* bundled setters would mutate a map the workflow's proxies never read — so the
|
|
171
|
+
* mismatch is refused here rather than surfacing later as an empty `.result`.
|
|
174
172
|
*/
|
|
175
173
|
async function resolveWorkflowSdkSetters(workflowFilePath) {
|
|
176
174
|
const req = createRequire(workflowFilePath);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
} catch {}
|
|
175
|
+
let sdk;
|
|
176
|
+
try {
|
|
177
|
+
const sdkEntry = req.resolve("@kici-dev/sdk/internal");
|
|
178
|
+
sdk = await import(pathToFileURL(sdkEntry).href);
|
|
179
|
+
} catch (err) {
|
|
180
|
+
throw new Error(`Could not resolve @kici-dev/sdk/internal from ${workflowFilePath}: the workflow tree must depend on @kici-dev/sdk@>=0.8.0 to run on this agent (agent baked @kici-dev/sdk@${AGENT_SDK_VERSION}). Upgrade the repository's @kici-dev/sdk and recompile: ${toErrorMessage(err)}`);
|
|
181
|
+
}
|
|
182
|
+
if (typeof sdk.setStepOutputsMap !== "function" || typeof sdk.setStepRefMap !== "function" || typeof sdk.setJobOutputsMap !== "function") throw new Error(`@kici-dev/sdk/internal resolved from ${workflowFilePath} carries no output-map setters; the workflow tree must depend on @kici-dev/sdk@>=0.8.0 to run on this agent (agent baked @kici-dev/sdk@${AGENT_SDK_VERSION}).`);
|
|
186
183
|
return {
|
|
187
|
-
setStepOutputsMap,
|
|
188
|
-
setStepRefMap,
|
|
189
|
-
setJobOutputsMap
|
|
184
|
+
setStepOutputsMap: sdk.setStepOutputsMap,
|
|
185
|
+
setStepRefMap: sdk.setStepRefMap,
|
|
186
|
+
setJobOutputsMap: sdk.setJobOutputsMap
|
|
190
187
|
};
|
|
191
188
|
}
|
|
192
189
|
function ensureLoaderHookRegistered() {
|
|
@@ -361,7 +358,7 @@ async function extractStepsFromDynamicJob(workflow, dynamicIndex, jobName, event
|
|
|
361
358
|
const dynamicFn = extractDynamicJobFn(workflow, dynamicIndex);
|
|
362
359
|
const { $ } = await import("zx");
|
|
363
360
|
const { createLogger } = await import("@kici-dev/shared");
|
|
364
|
-
const { buildKiciApi, buildNeedsContext } = await import("@kici-dev/sdk");
|
|
361
|
+
const { buildKiciApi, buildNeedsContext } = await import("@kici-dev/sdk/internal");
|
|
365
362
|
const log = createLogger({ prefix: `dynamic-job-fn:${workflow.name}` });
|
|
366
363
|
const kici = buildKiciApi(apiTransport ?? (() => Promise.reject(/* @__PURE__ */ new Error("Agent API not available during re-evaluation"))));
|
|
367
364
|
const needs = upstreamSnapshot ? buildNeedsContext(upstreamSnapshot, declaredNeeds ?? []) : void 0;
|
|
@@ -398,8 +395,8 @@ async function extractStepsFromDynamicJob(workflow, dynamicIndex, jobName, event
|
|
|
398
395
|
var AGENT_SDK_VERSION, AGENT_SDK_BUNDLE_HASH, hookRegistered;
|
|
399
396
|
var init_workflow_loader = __esmMin((() => {
|
|
400
397
|
init_generator_context();
|
|
401
|
-
AGENT_SDK_VERSION = "0.
|
|
402
|
-
AGENT_SDK_BUNDLE_HASH = "
|
|
398
|
+
AGENT_SDK_VERSION = "0.9.0";
|
|
399
|
+
AGENT_SDK_BUNDLE_HASH = "b012bd8bace3df9e574252bf290c652bc39766da617acf51729a08586756266d";
|
|
403
400
|
hookRegistered = false;
|
|
404
401
|
}));
|
|
405
402
|
//#endregion
|
|
@@ -42,7 +42,7 @@ export interface ArtifactTransport {
|
|
|
42
42
|
/** Request a presigned PUT for `name` at `declaredSizeBytes`; enforced before minting. */
|
|
43
43
|
beginUpload(name: string, declaredSizeBytes: number): Promise<ArtifactBeginUploadResult>;
|
|
44
44
|
/** Confirm the upload finished — records the DB row. */
|
|
45
|
-
completeUpload(name: string,
|
|
45
|
+
completeUpload(name: string, sha256: string): Promise<void>;
|
|
46
46
|
/** Resolve a named artifact of this run to a presigned GET + its size/sha256. */
|
|
47
47
|
download(name: string): Promise<ArtifactDownloadLookup>;
|
|
48
48
|
}
|
|
@@ -313,12 +313,8 @@ export interface ArtifactRequestIpc {
|
|
|
313
313
|
name: string;
|
|
314
314
|
/** Packed tarball size in bytes — drives the enforcement gates. `beginUpload` only. */
|
|
315
315
|
declaredSizeBytes?: number;
|
|
316
|
-
/** Confirmed tarball size in bytes. `completeUpload` only. */
|
|
317
|
-
sizeBytes?: number;
|
|
318
316
|
/** SHA-256 of the tarball bytes. `completeUpload` only. */
|
|
319
317
|
sha256?: string;
|
|
320
|
-
/** Storage key echoed from the grant response. `completeUpload` only. */
|
|
321
|
-
storageKey?: string;
|
|
322
318
|
}
|
|
323
319
|
export type RunnerToAgentMessage = ReadyMessage | StepStartMessage | StepCompleteMessage | LogLineMessage | StepSecretMountMessage | JobCompleteMessage | HooksDeclaredMessage | CompletionHooksDoneMessage | EventEmitRequest | ConcurrencyReportMessage | AgentApiRequestIpc | CacheRequestIpc | ProvenanceRequestIpc | ArtifactRequestIpc | GitGrantRequestIpc | StepApprovalRequestIpc;
|
|
324
320
|
/** Instruct the workflow runner to execute a job. */
|
|
@@ -554,7 +550,6 @@ export interface JobExecutionRequest {
|
|
|
554
550
|
*/
|
|
555
551
|
credentialHelperPath?: string;
|
|
556
552
|
/** SHA-256 hash of the source tarball bytes for integrity verification. */
|
|
557
|
-
sourceTarHash?: string;
|
|
558
553
|
sourceTarDigest?: string;
|
|
559
554
|
/** URL to pre-built dependency tarball (skip install if present). */
|
|
560
555
|
depsUrl?: string;
|
|
@@ -7,18 +7,13 @@
|
|
|
7
7
|
* optimization — source tarballs are tiny (kilobytes, not the hundreds of
|
|
8
8
|
* megabytes a `node_modules/` tarball carries).
|
|
9
9
|
*
|
|
10
|
-
* Two properties this path is responsible for
|
|
11
|
-
* lacked:
|
|
10
|
+
* Two properties this path is responsible for:
|
|
12
11
|
*
|
|
13
12
|
* **Verification.** `dispatch.sourceTarDigest` is the SHA-256 of the tarball's
|
|
14
13
|
* own bytes, so the download is checked before anything is extracted — the same
|
|
15
|
-
* contract `restoreDeps` has
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* is deliberately not used as a verification input here. When no digest is
|
|
19
|
-
* dispatched (an older orchestrator, or a source that did not come from the
|
|
20
|
-
* content-addressed cache) the restore proceeds unverified rather than failing,
|
|
21
|
-
* so a mixed-version rollout still runs.
|
|
14
|
+
* contract `restoreDeps` has via `depsHash`. When no digest is dispatched (a
|
|
15
|
+
* source that did not come from the content-addressed cache) the restore
|
|
16
|
+
* proceeds unverified rather than failing.
|
|
22
17
|
*
|
|
23
18
|
* **Replacement, not overlay.** Extraction lands in a scratch directory and the
|
|
24
19
|
* result REPLACES `workDir/.kici` wholesale, save for `node_modules/` — the one
|
|
@@ -34,12 +34,10 @@ export interface SdkOutputSetters {
|
|
|
34
34
|
* ESM modules by resolved URL, so importing that path yields the workflow's live
|
|
35
35
|
* singleton, not a fresh copy.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* Falls back to the agent's bundled setters when neither resolves (mirrors
|
|
42
|
-
* `resolveSdkSetters` in the compiler's test runner).
|
|
37
|
+
* The setters live only on `@kici-dev/sdk/internal`. A tree whose SDK does not
|
|
38
|
+
* publish that subpath cannot be wired to this agent, and the agent's own
|
|
39
|
+
* bundled setters would mutate a map the workflow's proxies never read — so the
|
|
40
|
+
* mismatch is refused here rather than surfacing later as an empty `.result`.
|
|
43
41
|
*/
|
|
44
42
|
export declare function resolveWorkflowSdkSetters(workflowFilePath: string): Promise<SdkOutputSetters>;
|
|
45
43
|
/**
|
|
@@ -43,8 +43,8 @@ export interface BuildStatementInput {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Agent-local job context used to freeze a provenance statement for a deferred
|
|
46
|
-
* attestation. When the
|
|
47
|
-
*
|
|
46
|
+
* attestation. When the orchestrator's mint defers there is no identity token
|
|
47
|
+
* to read claims from, so the statement is built from facts the agent
|
|
48
48
|
* already holds about the job it just ran. Only the identity token is deferred;
|
|
49
49
|
* these attested facts are sealed (DSSE-signed) at build time.
|
|
50
50
|
*/
|
package/dist/server.js
CHANGED
|
@@ -815,6 +815,23 @@ var OrchestratorClient = class OrchestratorClient {
|
|
|
815
815
|
* GitHub Actions run hangs until the job timeout.
|
|
816
816
|
*/
|
|
817
817
|
onClaimFailedPermanently = null;
|
|
818
|
+
/**
|
|
819
|
+
* Fired once when authentication fails permanently — an `auth.failure` frame,
|
|
820
|
+
* or the orchestrator closing with WS_CLOSE_AGENT_AUTH_FAILED (a revoked token,
|
|
821
|
+
* or a protocol version below the orchestrator's floor). The client never
|
|
822
|
+
* reconnects after this, so server.ts wires it to a non-zero graceful
|
|
823
|
+
* shutdown; without it the health HTTP server keeps a process alive that can
|
|
824
|
+
* never register again, and a one-shot GitHub Actions agent holds its runner
|
|
825
|
+
* until the job timeout.
|
|
826
|
+
*/
|
|
827
|
+
onAuthFailedPermanently = null;
|
|
828
|
+
/** Marks the auth failure permanent and fires onAuthFailedPermanently exactly once. */
|
|
829
|
+
failAuthPermanently(reason) {
|
|
830
|
+
const first = !this.authFailed;
|
|
831
|
+
this.authFailed = true;
|
|
832
|
+
this.intentionalDisconnect = true;
|
|
833
|
+
if (first) this.onAuthFailedPermanently?.(reason);
|
|
834
|
+
}
|
|
818
835
|
constructor(options) {
|
|
819
836
|
this.url = options.url;
|
|
820
837
|
this.agentId = options.agentId;
|
|
@@ -1225,9 +1242,7 @@ var OrchestratorClient = class OrchestratorClient {
|
|
|
1225
1242
|
messageId: completeId,
|
|
1226
1243
|
jobId,
|
|
1227
1244
|
name: request.name,
|
|
1228
|
-
|
|
1229
|
-
sha256: request.sha256,
|
|
1230
|
-
storageKey: request.storageKey
|
|
1245
|
+
sha256: request.sha256
|
|
1231
1246
|
};
|
|
1232
1247
|
if (!hasOrchAgentCapability(this.orchCapabilities, "artifactCompleteAck")) {
|
|
1233
1248
|
this.sendDirect(complete);
|
|
@@ -1480,8 +1495,7 @@ var OrchestratorClient = class OrchestratorClient {
|
|
|
1480
1495
|
code,
|
|
1481
1496
|
reason: reason.toString()
|
|
1482
1497
|
});
|
|
1483
|
-
this.
|
|
1484
|
-
this.intentionalDisconnect = true;
|
|
1498
|
+
this.failAuthPermanently(reason.toString() || "orchestrator closed with auth-failed code");
|
|
1485
1499
|
}
|
|
1486
1500
|
this._state = "disconnected";
|
|
1487
1501
|
this.stopHeartbeat();
|
|
@@ -1851,8 +1865,7 @@ var OrchestratorClient = class OrchestratorClient {
|
|
|
1851
1865
|
break;
|
|
1852
1866
|
case "auth.failure":
|
|
1853
1867
|
logger$16.error("Authentication FAILED -- token is invalid or expired. NOT retrying.", { reason: msg.reason });
|
|
1854
|
-
this.
|
|
1855
|
-
this.intentionalDisconnect = true;
|
|
1868
|
+
this.failAuthPermanently(msg.reason);
|
|
1856
1869
|
if (this.ws) {
|
|
1857
1870
|
this.ws.close(1e3, "Auth failed");
|
|
1858
1871
|
this.ws = null;
|
|
@@ -2161,14 +2174,14 @@ function installConsoleCapture() {
|
|
|
2161
2174
|
//#region src/routes/health.ts
|
|
2162
2175
|
function safe(name, fallback = "unknown") {
|
|
2163
2176
|
switch (name) {
|
|
2164
|
-
case "version": return "0.
|
|
2165
|
-
case "buildCommit": return "
|
|
2166
|
-
case "sdkVersion": return "0.
|
|
2167
|
-
case "sdkBundleHash": return "
|
|
2168
|
-
case "sharedVersion": return "0.
|
|
2177
|
+
case "version": return "0.9.0";
|
|
2178
|
+
case "buildCommit": return "69765a7ee";
|
|
2179
|
+
case "sdkVersion": return "0.9.0";
|
|
2180
|
+
case "sdkBundleHash": return "b012bd8bace3df9e574252bf290c652bc39766da617acf51729a08586756266d";
|
|
2181
|
+
case "sharedVersion": return "0.9.0";
|
|
2169
2182
|
case "sharedBundleHash": return "c1c70e41a1ec14fd7cf3a6047251e9aa11258a21e3694ea89a50e8bf14b99f9d";
|
|
2170
|
-
case "engineVersion": return "0.
|
|
2171
|
-
case "engineBundleHash": return "
|
|
2183
|
+
case "engineVersion": return "0.9.0";
|
|
2184
|
+
case "engineBundleHash": return "c5e0e34d8d7f56f747bba71076a5fbccac4c932be855ef71c596b4211ca8698c";
|
|
2172
2185
|
default: return fallback;
|
|
2173
2186
|
}
|
|
2174
2187
|
}
|
|
@@ -3691,18 +3704,13 @@ var init_download = __esmMin((() => {
|
|
|
3691
3704
|
* optimization — source tarballs are tiny (kilobytes, not the hundreds of
|
|
3692
3705
|
* megabytes a `node_modules/` tarball carries).
|
|
3693
3706
|
*
|
|
3694
|
-
* Two properties this path is responsible for
|
|
3695
|
-
* lacked:
|
|
3707
|
+
* Two properties this path is responsible for:
|
|
3696
3708
|
*
|
|
3697
3709
|
* **Verification.** `dispatch.sourceTarDigest` is the SHA-256 of the tarball's
|
|
3698
3710
|
* own bytes, so the download is checked before anything is extracted — the same
|
|
3699
|
-
* contract `restoreDeps` has
|
|
3700
|
-
*
|
|
3701
|
-
*
|
|
3702
|
-
* is deliberately not used as a verification input here. When no digest is
|
|
3703
|
-
* dispatched (an older orchestrator, or a source that did not come from the
|
|
3704
|
-
* content-addressed cache) the restore proceeds unverified rather than failing,
|
|
3705
|
-
* so a mixed-version rollout still runs.
|
|
3711
|
+
* contract `restoreDeps` has via `depsHash`. When no digest is dispatched (a
|
|
3712
|
+
* source that did not come from the content-addressed cache) the restore
|
|
3713
|
+
* proceeds unverified rather than failing.
|
|
3706
3714
|
*
|
|
3707
3715
|
* **Replacement, not overlay.** Extraction lands in a scratch directory and the
|
|
3708
3716
|
* result REPLACES `workDir/.kici` wholesale, save for `node_modules/` — the one
|
|
@@ -6865,7 +6873,6 @@ function buildRequest(dispatch, workDir, extra) {
|
|
|
6865
6873
|
...extra?.credentialHelperPath ? { credentialHelperPath: extra.credentialHelperPath } : {},
|
|
6866
6874
|
...extra?.allowInstallScripts ? { allowInstallScripts: true } : {},
|
|
6867
6875
|
sourceTarUrl: dispatch.sourceTarUrl,
|
|
6868
|
-
sourceTarHash: dispatch.sourceTarHash,
|
|
6869
6876
|
sourceTarDigest: dispatch.sourceTarDigest,
|
|
6870
6877
|
depsUrl: dispatch.depsUrl,
|
|
6871
6878
|
depsHash: dispatch.depsHash,
|
|
@@ -9863,10 +9870,10 @@ var init_job_runner = __esmMin((() => {
|
|
|
9863
9870
|
signal
|
|
9864
9871
|
});
|
|
9865
9872
|
buildLog("Packing .kici/ source tarball...");
|
|
9866
|
-
const { tarball, hash:
|
|
9873
|
+
const { tarball, hash: sourceTarDigest } = await packKiciSource(workDir);
|
|
9867
9874
|
const sourceKey = {
|
|
9868
9875
|
contentHash: buildConfig.contentHash,
|
|
9869
|
-
sourceTarDigest
|
|
9876
|
+
sourceTarDigest,
|
|
9870
9877
|
platform: os.platform(),
|
|
9871
9878
|
arch: os.arch()
|
|
9872
9879
|
};
|
|
@@ -9883,7 +9890,7 @@ var init_job_runner = __esmMin((() => {
|
|
|
9883
9890
|
this.sendJobStatus(dispatch, ExecutionJobStatus.enum.running, {
|
|
9884
9891
|
buildEvent: "source_packed",
|
|
9885
9892
|
contentHash: buildConfig.contentHash,
|
|
9886
|
-
|
|
9893
|
+
sourceTarDigest
|
|
9887
9894
|
});
|
|
9888
9895
|
}
|
|
9889
9896
|
/**
|
|
@@ -10659,14 +10666,14 @@ var init_between_jobs_controller = __esmMin((() => {
|
|
|
10659
10666
|
* - SIGUSR1: Drain mode (stop accepting, finish current, exit)
|
|
10660
10667
|
*/
|
|
10661
10668
|
init_npm_resolver();
|
|
10662
|
-
const AGENT_VERSION = "0.
|
|
10663
|
-
const BUILD_COMMIT = "
|
|
10664
|
-
const SDK_VERSION = "0.
|
|
10665
|
-
const SDK_BUNDLE_HASH = "
|
|
10666
|
-
const SHARED_VERSION = "0.
|
|
10669
|
+
const AGENT_VERSION = "0.9.0";
|
|
10670
|
+
const BUILD_COMMIT = "69765a7ee";
|
|
10671
|
+
const SDK_VERSION = "0.9.0";
|
|
10672
|
+
const SDK_BUNDLE_HASH = "b012bd8bace3df9e574252bf290c652bc39766da617acf51729a08586756266d";
|
|
10673
|
+
const SHARED_VERSION = "0.9.0";
|
|
10667
10674
|
const SHARED_BUNDLE_HASH = "c1c70e41a1ec14fd7cf3a6047251e9aa11258a21e3694ea89a50e8bf14b99f9d";
|
|
10668
|
-
const ENGINE_VERSION = "0.
|
|
10669
|
-
const ENGINE_BUNDLE_HASH = "
|
|
10675
|
+
const ENGINE_VERSION = "0.9.0";
|
|
10676
|
+
const ENGINE_BUNDLE_HASH = "c5e0e34d8d7f56f747bba71076a5fbccac4c932be855ef71c596b4211ca8698c";
|
|
10670
10677
|
initTelemetry({
|
|
10671
10678
|
serviceName: "kici-agent",
|
|
10672
10679
|
otlpEndpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT
|
|
@@ -11055,6 +11062,10 @@ await guardStartup(logger$1, async () => {
|
|
|
11055
11062
|
logger$1.error("Self-bootstrap claim failed permanently, shutting down", { reason });
|
|
11056
11063
|
gracefulShutdown("scaler-claim-failed", 1);
|
|
11057
11064
|
};
|
|
11065
|
+
client.onAuthFailedPermanently = (reason) => {
|
|
11066
|
+
logger$1.error("Authentication failed permanently, shutting down", { reason });
|
|
11067
|
+
gracefulShutdown("auth-failed", 1);
|
|
11068
|
+
};
|
|
11058
11069
|
process.on("SIGUSR1", () => {
|
|
11059
11070
|
logger$1.info("Received SIGUSR1, entering drain mode");
|
|
11060
11071
|
isDraining = true;
|