@koed-labs/server 0.10.3 → 0.11.1
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/README.md +3 -3
- package/package.json +1 -1
- package/vendor/{chunk-A6WMU2GG.js → chunk-2XKSVKQA.js} +5 -4
- package/vendor/{chunk-VPC5NLZG.js → chunk-4OO6VAU3.js} +1 -1
- package/vendor/{chunk-HK2H3MVE.js → chunk-53ZFCDHP.js} +4 -0
- package/vendor/chunk-6KS67EQE.js +75 -0
- package/vendor/chunk-7EGSY3E4.js +8 -0
- package/vendor/{chunk-JKOG52PE.js → chunk-7FSHVVTZ.js} +1 -1
- package/vendor/chunk-ALJUSOF7.js +175 -0
- package/vendor/{chunk-KUIWH33N.js → chunk-AVQCUFYQ.js} +1 -1
- package/vendor/chunk-BGENSONI.js +18 -0
- package/vendor/{chunk-ZXX4ZNJY.js → chunk-BUIM2M4R.js} +3 -2
- package/vendor/{chunk-YK4F4VY2.js → chunk-C4V72GXC.js} +51 -30
- package/vendor/{chunk-JJNLH5GA.js → chunk-C5SNDPAP.js} +21 -19
- package/vendor/{chunk-J2L726BC.js → chunk-CHMH4LH5.js} +3 -3
- package/vendor/{chunk-2S3OGPUC.js → chunk-EA4QDDQA.js} +2 -2
- package/vendor/{chunk-HZJK5RWC.js → chunk-EDPNYIX5.js} +575 -215
- package/vendor/{chunk-NM5NXCVM.js → chunk-FN3HUUO2.js} +558 -988
- package/vendor/{chunk-473OA62O.js → chunk-FSNLU46W.js} +218 -12497
- package/vendor/{chunk-GELDEJJ2.js → chunk-FYYRFX4U.js} +133 -47
- package/vendor/{chunk-YOFI4PCH.js → chunk-GFASBPV2.js} +7 -1
- package/vendor/chunk-HC76426R.js +48 -0
- package/vendor/{chunk-QIIKMG3M.js → chunk-IY2HRXOZ.js} +1 -5
- package/vendor/{chunk-ZUGNCQZE.js → chunk-JYK6UL6D.js} +22 -8
- package/vendor/{chunk-2BWTLF7A.js → chunk-LRP66XEY.js} +45 -21
- package/vendor/{chunk-DXTAWHY3.js → chunk-NOU7RHYZ.js} +8 -7
- package/vendor/{chunk-C3N4N5HR.js → chunk-NVTMIAAF.js} +26 -21
- package/vendor/chunk-O7DW2VAV.js +14 -0
- package/vendor/{chunk-YJ6XUZT6.js → chunk-OCILJ737.js} +23 -16
- package/vendor/{chunk-TSRPHKAC.js → chunk-PL3LWC5C.js} +16 -42
- package/vendor/chunk-QRKHHWJJ.js +104 -0
- package/vendor/{chunk-YJWREXN6.js → chunk-RCR4XPE3.js} +1 -1
- package/vendor/{chunk-AFLKCQHF.js → chunk-SHLRINKO.js} +2 -2
- package/vendor/{chunk-NEWIOOM6.js → chunk-SNKWETM5.js} +3 -2
- package/vendor/{chunk-XNFVSVBS.js → chunk-SRKIBFOE.js} +1 -1
- package/vendor/{chunk-G4IIVVJO.js → chunk-T6UB5PNX.js} +70 -2
- package/vendor/{chunk-RVYJKKWA.js → chunk-TG26CZGQ.js} +5 -4
- package/vendor/{chunk-HFM6ROJL.js → chunk-TISYUUEJ.js} +1 -1
- package/vendor/{chunk-K2EIFEQF.js → chunk-TSAYTRX3.js} +1 -1
- package/vendor/chunk-TVYEB2GN.js +343 -0
- package/vendor/{chunk-PT3AUPGE.js → chunk-UB6JCVQ3.js} +3 -1
- package/vendor/chunk-VGIYSDNU.js +522 -0
- package/vendor/{chunk-X6M525ZJ.js → chunk-W2OJZZ6X.js} +5 -5
- package/vendor/{chunk-YCDEMYY6.js → chunk-WDFERJG3.js} +231 -99
- package/vendor/{chunk-SKVYP7NY.js → chunk-WPIEF4LY.js} +8 -8
- package/vendor/{chunk-UI5RLBKQ.js → chunk-YZLQZU5E.js} +17 -1
- package/vendor/{chunk-PY5LYLV7.js → chunk-Z5WCAUA6.js} +26 -21
- package/vendor/chunk-ZIOKV2X6.js +1589 -0
- package/vendor/chunk-ZOHNXUDY.js +12501 -0
- package/vendor/chunk-ZUDSZGVO.js +11 -0
- package/vendor/component-manifest-catalog.js +2 -1
- package/vendor/control-plane.js +11 -6
- package/vendor/chunk-2DA7EFZV.js +0 -924
- /package/vendor/{chunk-A4NKL2PK.js → chunk-V67IQB7H.js} +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
noteAiClientConnectionRevision
|
|
4
|
+
} from "./chunk-6KS67EQE.js";
|
|
2
5
|
import {
|
|
3
6
|
configureCodexIntegrationForRemoteBackend,
|
|
7
|
+
grantAiClientConnection,
|
|
4
8
|
inspectClaudeCode,
|
|
5
9
|
inspectCodex,
|
|
6
10
|
inspectPi,
|
|
@@ -10,33 +14,41 @@ import {
|
|
|
10
14
|
resolveClaudeExecutablePath,
|
|
11
15
|
resolveCodexExecutablePath,
|
|
12
16
|
resolvePiSetupExecutable,
|
|
17
|
+
revokeAiClientConnection,
|
|
13
18
|
setupClaude,
|
|
14
19
|
setupPi
|
|
15
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EDPNYIX5.js";
|
|
16
21
|
import "./chunk-QT24SAW6.js";
|
|
17
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-TISYUUEJ.js";
|
|
18
23
|
import {
|
|
19
24
|
resolveKoedServerConfig
|
|
20
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ALJUSOF7.js";
|
|
26
|
+
import "./chunk-SRKIBFOE.js";
|
|
21
27
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
28
|
+
resolveKoedServerPaths
|
|
29
|
+
} from "./chunk-TSAYTRX3.js";
|
|
30
|
+
import "./chunk-YZLQZU5E.js";
|
|
31
|
+
import "./chunk-W2HNI6AA.js";
|
|
24
32
|
import {
|
|
25
33
|
resolveKoedAppRuntime
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import "./chunk-XNFVSVBS.js";
|
|
34
|
+
} from "./chunk-V67IQB7H.js";
|
|
35
|
+
import "./chunk-FN3HUUO2.js";
|
|
36
|
+
import {
|
|
37
|
+
isProcessRunning
|
|
38
|
+
} from "./chunk-T6UB5PNX.js";
|
|
32
39
|
import {
|
|
33
40
|
require_proper_lockfile
|
|
34
41
|
} from "./chunk-7NXKPDF3.js";
|
|
42
|
+
import "./chunk-ZUDSZGVO.js";
|
|
43
|
+
import "./chunk-ZIOKV2X6.js";
|
|
44
|
+
import "./chunk-QRKHHWJJ.js";
|
|
45
|
+
import "./chunk-7EGSY3E4.js";
|
|
46
|
+
import "./chunk-IY2HRXOZ.js";
|
|
47
|
+
import "./chunk-4OO6VAU3.js";
|
|
48
|
+
import "./chunk-RCR4XPE3.js";
|
|
35
49
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-UI5RLBKQ.js";
|
|
39
|
-
import "./chunk-W2HNI6AA.js";
|
|
50
|
+
isTeamMemoryAnswerTaskCapability
|
|
51
|
+
} from "./chunk-ZOHNXUDY.js";
|
|
40
52
|
import {
|
|
41
53
|
NEVER,
|
|
42
54
|
ZodIssueCode,
|
|
@@ -50,7 +62,6 @@ import {
|
|
|
50
62
|
email,
|
|
51
63
|
external_exports,
|
|
52
64
|
intersection,
|
|
53
|
-
isTeamMemoryAnswerTaskCapability,
|
|
54
65
|
iso_exports,
|
|
55
66
|
lazy,
|
|
56
67
|
literal,
|
|
@@ -66,7 +77,7 @@ import {
|
|
|
66
77
|
union,
|
|
67
78
|
unknown,
|
|
68
79
|
url
|
|
69
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-FSNLU46W.js";
|
|
70
81
|
import {
|
|
71
82
|
__toESM
|
|
72
83
|
} from "./chunk-BTS4ZTF3.js";
|
|
@@ -13160,7 +13171,9 @@ var inspectHarness = async (harness, environment) => {
|
|
|
13160
13171
|
resolveCodexExecutable: resolveCodexExecutablePath,
|
|
13161
13172
|
checkPid: isProcessRunning,
|
|
13162
13173
|
delay: (milliseconds) => new Promise((resolve4) => setTimeout(resolve4, milliseconds)),
|
|
13163
|
-
now: () => /* @__PURE__ */ new Date()
|
|
13174
|
+
now: () => /* @__PURE__ */ new Date(),
|
|
13175
|
+
// Checking a harness never changes whether it is connected.
|
|
13176
|
+
revokeAiClientConnection: () => false
|
|
13164
13177
|
};
|
|
13165
13178
|
const profile = await (harness === "codex" ? inspectCodex(environment, paths, dependencies, resolveKoedServerConfig(paths, environment).codexGlobalMemoryGuidanceEnabled) : harness === "claude" ? inspectClaudeCode(environment, paths, dependencies) : inspectPi(environment, paths, dependencies));
|
|
13166
13179
|
return profile.configured === true && profile.state === "healthy";
|
|
@@ -13189,6 +13202,8 @@ var setupHeadlessRemoteIntegration = async (options) => {
|
|
|
13189
13202
|
}
|
|
13190
13203
|
if (options.signal?.aborted)
|
|
13191
13204
|
return result(options.harness, "cancelled");
|
|
13205
|
+
const koedHome = resolveKoedServerPaths(environment).koedHome;
|
|
13206
|
+
const revision = noteAiClientConnectionRevision(koedHome, options.harness);
|
|
13192
13207
|
const childEnvironment = harnessEnvironment(environment, descriptor);
|
|
13193
13208
|
const configured = await (options.setupHarness ? options.setupHarness(options.harness, childEnvironment) : options.harness === "codex" ? configureCodexIntegrationForRemoteBackend({
|
|
13194
13209
|
...options.codexOptions,
|
|
@@ -13200,6 +13215,8 @@ var setupHeadlessRemoteIntegration = async (options) => {
|
|
|
13200
13215
|
return result(options.harness, "needs_attention", "AI Client integration setup failed; review the existing harness setup checks.");
|
|
13201
13216
|
}
|
|
13202
13217
|
writeHeadlessRemoteIntegration(environment, descriptor);
|
|
13218
|
+
if (!grantAiClientConnection(koedHome, options.harness, revision))
|
|
13219
|
+
return result(options.harness, "needs_attention", "The AI Client changed while setup ran; capture stays off. Set it up again to connect it.");
|
|
13203
13220
|
return result(options.harness, "configured");
|
|
13204
13221
|
} catch {
|
|
13205
13222
|
return result(options.harness, "needs_attention", "Remote integration configuration could not be safely updated.");
|
|
@@ -13230,10 +13247,17 @@ var removeHeadlessRemoteIntegration = (options) => {
|
|
|
13230
13247
|
if (denied)
|
|
13231
13248
|
return denied;
|
|
13232
13249
|
const environment = options.environment ?? process.env;
|
|
13250
|
+
let disconnected = true;
|
|
13251
|
+
try {
|
|
13252
|
+
revokeAiClientConnection(resolveKoedServerPaths(environment).koedHome, options.harness);
|
|
13253
|
+
} catch {
|
|
13254
|
+
disconnected = false;
|
|
13255
|
+
}
|
|
13256
|
+
const removedResult = () => disconnected ? result(options.harness, "removed") : result(options.harness, "needs_attention", "The AI Client could not be disconnected; Koed may still read its conversations.");
|
|
13233
13257
|
try {
|
|
13234
13258
|
const descriptor = readHeadlessRemoteIntegration(environment);
|
|
13235
13259
|
if (!descriptor?.harnesses.includes(options.harness))
|
|
13236
|
-
return
|
|
13260
|
+
return removedResult();
|
|
13237
13261
|
const childEnvironment = harnessEnvironment(environment, descriptor);
|
|
13238
13262
|
const removed = options.removeHarness ? options.removeHarness(options.harness, childEnvironment) : options.harness === "codex" ? removeCodexIntegration({
|
|
13239
13263
|
...options.codexOptions,
|
|
@@ -13250,7 +13274,7 @@ var removeHeadlessRemoteIntegration = (options) => {
|
|
|
13250
13274
|
} else {
|
|
13251
13275
|
unlinkSync(headlessRemoteIntegrationPath(environment));
|
|
13252
13276
|
}
|
|
13253
|
-
return
|
|
13277
|
+
return removedResult();
|
|
13254
13278
|
} catch {
|
|
13255
13279
|
return result(options.harness, "needs_attention", "Remote integration configuration could not be safely removed.");
|
|
13256
13280
|
}
|
|
@@ -13866,7 +13890,7 @@ var runRemoteMcpOperation = async (command, input, options) => {
|
|
|
13866
13890
|
}
|
|
13867
13891
|
};
|
|
13868
13892
|
var runRemoteMcpCommand = async (args, options) => {
|
|
13869
|
-
const { runKoedServerCli } = await import("./chunk-
|
|
13893
|
+
const { runKoedServerCli } = await import("./chunk-W2OJZZ6X.js");
|
|
13870
13894
|
return runKoedServerCli(["remote", ...args], {
|
|
13871
13895
|
stdout: options.stdout,
|
|
13872
13896
|
stderr: options.stderr,
|
|
@@ -6,14 +6,15 @@ import {
|
|
|
6
6
|
personalSyncProviderEnvironment,
|
|
7
7
|
redeemPairingLink,
|
|
8
8
|
runPersonalSyncCommand
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-UI5RLBKQ.js";
|
|
9
|
+
} from "./chunk-CHMH4LH5.js";
|
|
10
|
+
import "./chunk-EA4QDDQA.js";
|
|
11
|
+
import "./chunk-SRKIBFOE.js";
|
|
12
|
+
import "./chunk-TSAYTRX3.js";
|
|
13
|
+
import "./chunk-YZLQZU5E.js";
|
|
15
14
|
import "./chunk-W2HNI6AA.js";
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7NXKPDF3.js";
|
|
16
|
+
import "./chunk-ZOHNXUDY.js";
|
|
17
|
+
import "./chunk-FSNLU46W.js";
|
|
17
18
|
import "./chunk-BTS4ZTF3.js";
|
|
18
19
|
export {
|
|
19
20
|
decryptRecoveryKit,
|
|
@@ -4,29 +4,34 @@ import {
|
|
|
4
4
|
createCliServiceContext,
|
|
5
5
|
deviceRequestCommand,
|
|
6
6
|
printJson
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-WDFERJG3.js";
|
|
8
|
+
import "./chunk-SHLRINKO.js";
|
|
9
|
+
import "./chunk-CHMH4LH5.js";
|
|
10
|
+
import "./chunk-EA4QDDQA.js";
|
|
11
|
+
import "./chunk-JYK6UL6D.js";
|
|
12
|
+
import "./chunk-WPIEF4LY.js";
|
|
13
|
+
import "./chunk-EDPNYIX5.js";
|
|
9
14
|
import "./chunk-QT24SAW6.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-A4NKL2PK.js";
|
|
17
|
-
import "./chunk-QIIKMG3M.js";
|
|
18
|
-
import "./chunk-2DA7EFZV.js";
|
|
19
|
-
import "./chunk-VPC5NLZG.js";
|
|
20
|
-
import "./chunk-YJWREXN6.js";
|
|
21
|
-
import "./chunk-J2L726BC.js";
|
|
22
|
-
import "./chunk-2S3OGPUC.js";
|
|
23
|
-
import "./chunk-XNFVSVBS.js";
|
|
24
|
-
import "./chunk-7NXKPDF3.js";
|
|
25
|
-
import "./chunk-K2EIFEQF.js";
|
|
26
|
-
import "./chunk-UI5RLBKQ.js";
|
|
15
|
+
import "./chunk-TISYUUEJ.js";
|
|
16
|
+
import "./chunk-ALJUSOF7.js";
|
|
17
|
+
import "./chunk-SRKIBFOE.js";
|
|
18
|
+
import "./chunk-7FSHVVTZ.js";
|
|
19
|
+
import "./chunk-TSAYTRX3.js";
|
|
20
|
+
import "./chunk-YZLQZU5E.js";
|
|
27
21
|
import "./chunk-W2HNI6AA.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-V67IQB7H.js";
|
|
23
|
+
import "./chunk-FN3HUUO2.js";
|
|
24
|
+
import "./chunk-T6UB5PNX.js";
|
|
25
|
+
import "./chunk-7NXKPDF3.js";
|
|
26
|
+
import "./chunk-ZUDSZGVO.js";
|
|
27
|
+
import "./chunk-ZIOKV2X6.js";
|
|
28
|
+
import "./chunk-QRKHHWJJ.js";
|
|
29
|
+
import "./chunk-7EGSY3E4.js";
|
|
30
|
+
import "./chunk-IY2HRXOZ.js";
|
|
31
|
+
import "./chunk-4OO6VAU3.js";
|
|
32
|
+
import "./chunk-RCR4XPE3.js";
|
|
33
|
+
import "./chunk-ZOHNXUDY.js";
|
|
34
|
+
import "./chunk-FSNLU46W.js";
|
|
30
35
|
import "./chunk-BTS4ZTF3.js";
|
|
31
36
|
|
|
32
37
|
// packages/koed-server/dist/cli-pair-operations.js
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
checkCudaHost,
|
|
4
|
+
validateStagedCuda
|
|
5
|
+
} from "./chunk-TVYEB2GN.js";
|
|
6
|
+
import "./chunk-JYK6UL6D.js";
|
|
7
|
+
import "./chunk-QRKHHWJJ.js";
|
|
8
|
+
import "./chunk-7EGSY3E4.js";
|
|
9
|
+
import "./chunk-FSNLU46W.js";
|
|
10
|
+
import "./chunk-BTS4ZTF3.js";
|
|
11
|
+
export {
|
|
12
|
+
checkCudaHost,
|
|
13
|
+
validateStagedCuda
|
|
14
|
+
};
|
|
@@ -2,7 +2,18 @@ import { createRequire as createKoedRequire } from "node:module"; const require
|
|
|
2
2
|
import {
|
|
3
3
|
calculateRuntimeRequirements,
|
|
4
4
|
resolveEffectiveRuntimeConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SHLRINKO.js";
|
|
6
|
+
import "./chunk-ALJUSOF7.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveKoedServerPaths
|
|
9
|
+
} from "./chunk-TSAYTRX3.js";
|
|
10
|
+
import "./chunk-YZLQZU5E.js";
|
|
11
|
+
import "./chunk-W2HNI6AA.js";
|
|
12
|
+
import {
|
|
13
|
+
resolveKoedAppRuntimeExecution,
|
|
14
|
+
resolveKoedControlPlaneVersion,
|
|
15
|
+
resolveKoedRuntimeOwner
|
|
16
|
+
} from "./chunk-V67IQB7H.js";
|
|
6
17
|
import {
|
|
7
18
|
activateGeneration,
|
|
8
19
|
cleanupGenerations,
|
|
@@ -17,24 +28,20 @@ import {
|
|
|
17
28
|
resolveComponentManifestPinTarget,
|
|
18
29
|
stageComponent,
|
|
19
30
|
stageGeneration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-FN3HUUO2.js";
|
|
32
|
+
import "./chunk-T6UB5PNX.js";
|
|
33
|
+
import "./chunk-7NXKPDF3.js";
|
|
22
34
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
productionComponentManifestCatalog
|
|
36
|
+
} from "./chunk-ZUDSZGVO.js";
|
|
37
|
+
import "./chunk-ZIOKV2X6.js";
|
|
38
|
+
import "./chunk-QRKHHWJJ.js";
|
|
39
|
+
import "./chunk-7EGSY3E4.js";
|
|
27
40
|
import {
|
|
28
|
-
productionComponentManifestCatalog,
|
|
29
41
|
validateManifestCatalog
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import
|
|
33
|
-
resolveKoedServerPaths
|
|
34
|
-
} from "./chunk-K2EIFEQF.js";
|
|
35
|
-
import "./chunk-UI5RLBKQ.js";
|
|
36
|
-
import "./chunk-W2HNI6AA.js";
|
|
37
|
-
import "./chunk-473OA62O.js";
|
|
42
|
+
} from "./chunk-IY2HRXOZ.js";
|
|
43
|
+
import "./chunk-ZOHNXUDY.js";
|
|
44
|
+
import "./chunk-FSNLU46W.js";
|
|
38
45
|
import "./chunk-BTS4ZTF3.js";
|
|
39
46
|
|
|
40
47
|
// packages/koed-server/dist/cli-component-operations.js
|
|
@@ -4,20 +4,18 @@ import {
|
|
|
4
4
|
} from "./chunk-QT24SAW6.js";
|
|
5
5
|
import {
|
|
6
6
|
applyPersistedLocalPorts
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
readActiveRuntimeState
|
|
10
|
-
} from "./chunk-G4IIVVJO.js";
|
|
11
|
-
import {
|
|
12
|
-
require_proper_lockfile
|
|
13
|
-
} from "./chunk-7NXKPDF3.js";
|
|
7
|
+
} from "./chunk-TISYUUEJ.js";
|
|
14
8
|
import {
|
|
15
9
|
loadRepoEnv,
|
|
16
10
|
resolveApiUrl
|
|
17
11
|
} from "./chunk-W2HNI6AA.js";
|
|
12
|
+
import {
|
|
13
|
+
readActiveRuntimeState,
|
|
14
|
+
withFileLock
|
|
15
|
+
} from "./chunk-T6UB5PNX.js";
|
|
16
|
+
import "./chunk-7NXKPDF3.js";
|
|
18
17
|
import {
|
|
19
18
|
deriveLocalProjectId,
|
|
20
|
-
external_exports,
|
|
21
19
|
fetchBoundedJsonObject,
|
|
22
20
|
hmacProjectValue,
|
|
23
21
|
isLoopbackHostname,
|
|
@@ -28,16 +26,17 @@ import {
|
|
|
28
26
|
repositoryChangeInputSchema,
|
|
29
27
|
repositoryIdentityMatches,
|
|
30
28
|
repositoryIdentitySchema
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZOHNXUDY.js";
|
|
32
30
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
31
|
+
external_exports
|
|
32
|
+
} from "./chunk-FSNLU46W.js";
|
|
33
|
+
import "./chunk-BTS4ZTF3.js";
|
|
35
34
|
|
|
36
35
|
// packages/koed-server/dist/project-metadata.js
|
|
37
36
|
import { execFile as nodeExecFile } from "node:child_process";
|
|
38
37
|
import { randomUUID } from "node:crypto";
|
|
39
|
-
import { existsSync, mkdirSync
|
|
40
|
-
import path, { dirname as
|
|
38
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync, statSync as statSync2, rmSync } from "node:fs";
|
|
39
|
+
import path, { dirname as dirname2, relative, resolve as resolve2 } from "node:path";
|
|
41
40
|
|
|
42
41
|
// packages/koed-server/dist/git-project-probe.js
|
|
43
42
|
import { execFile } from "node:child_process";
|
|
@@ -305,38 +304,13 @@ var lookupAcceptedProjectSelection = async (paths, checkout, deps = {}) => {
|
|
|
305
304
|
} : void 0;
|
|
306
305
|
};
|
|
307
306
|
|
|
308
|
-
// packages/koed-server/dist/project-metadata-lock.js
|
|
309
|
-
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
310
|
-
import { mkdirSync } from "node:fs";
|
|
311
|
-
import { dirname as dirname2 } from "node:path";
|
|
312
|
-
var withProjectMetadataLock = (file, operation) => {
|
|
313
|
-
mkdirSync(dirname2(file), { recursive: true, mode: 448 });
|
|
314
|
-
const deadline = Date.now() + 5e3;
|
|
315
|
-
let release;
|
|
316
|
-
while (true) {
|
|
317
|
-
try {
|
|
318
|
-
release = import_proper_lockfile.default.lockSync(file, { realpath: false, stale: 3e4 });
|
|
319
|
-
break;
|
|
320
|
-
} catch (error) {
|
|
321
|
-
if (error.code !== "ELOCKED" || Date.now() >= deadline)
|
|
322
|
-
throw error;
|
|
323
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 10);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
try {
|
|
327
|
-
return operation();
|
|
328
|
-
} finally {
|
|
329
|
-
release();
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
|
|
333
307
|
// packages/koed-server/dist/project-metadata.js
|
|
334
308
|
var depsWithDefaults = (deps = {}) => ({
|
|
335
309
|
existsSync: deps.existsSync ?? existsSync,
|
|
336
310
|
readFileSync: deps.readFileSync ?? readFileSync,
|
|
337
311
|
writeFileSync: deps.writeFileSync ?? writeFileSync,
|
|
338
312
|
renameSync: deps.renameSync ?? renameSync,
|
|
339
|
-
mkdirSync: deps.mkdirSync ??
|
|
313
|
+
mkdirSync: deps.mkdirSync ?? mkdirSync,
|
|
340
314
|
statSync: deps.statSync ?? statSync2,
|
|
341
315
|
lookupAssociatedSelection: deps.lookupAssociatedSelection ?? lookupAcceptedProjectSelection,
|
|
342
316
|
execFile: deps.execFile ?? nodeExecFile,
|
|
@@ -407,20 +381,20 @@ var readStoreUnlocked = (paths, deps) => {
|
|
|
407
381
|
throw new Error("Project metadata config is malformed.", { cause: error });
|
|
408
382
|
}
|
|
409
383
|
};
|
|
410
|
-
var updateStore = (paths, deps, mutate) =>
|
|
384
|
+
var updateStore = (paths, deps, mutate) => withFileLock(paths.projectMetadataPath, () => {
|
|
411
385
|
const store = readStoreUnlocked(paths, deps);
|
|
412
386
|
const result = mutate(store);
|
|
413
387
|
writeStore(paths, store, deps);
|
|
414
388
|
return result;
|
|
415
389
|
});
|
|
416
|
-
var readStore = (paths, deps) =>
|
|
390
|
+
var readStore = (paths, deps) => withFileLock(paths.projectMetadataPath, () => {
|
|
417
391
|
const store = readStoreUnlocked(paths, deps);
|
|
418
392
|
if (!deps.existsSync(paths.projectMetadataPath))
|
|
419
393
|
writeStore(paths, store, deps);
|
|
420
394
|
return store;
|
|
421
395
|
});
|
|
422
396
|
var writeStore = (paths, store, deps) => {
|
|
423
|
-
deps.mkdirSync(
|
|
397
|
+
deps.mkdirSync(dirname2(paths.projectMetadataPath), {
|
|
424
398
|
recursive: true,
|
|
425
399
|
mode: 448
|
|
426
400
|
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
productionNativeRuntimeCatalog
|
|
4
|
+
} from "./chunk-7EGSY3E4.js";
|
|
5
|
+
import {
|
|
6
|
+
external_exports
|
|
7
|
+
} from "./chunk-FSNLU46W.js";
|
|
8
|
+
|
|
9
|
+
// packages/koed-server/dist/native-runtime-catalog.js
|
|
10
|
+
var digest = external_exports.string().regex(/^[a-f0-9]{64}$/);
|
|
11
|
+
var version = external_exports.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/).refine((value) => value.split(".").every((part) => Number.isSafeInteger(Number(part))));
|
|
12
|
+
var target = external_exports.object({
|
|
13
|
+
platform: external_exports.literal("linux"),
|
|
14
|
+
architecture: external_exports.literal("x64"),
|
|
15
|
+
libc: external_exports.object({ family: external_exports.literal("glibc"), minimumVersion: external_exports.literal("2.35") }).strict()
|
|
16
|
+
}).strict();
|
|
17
|
+
var llamaCpp = external_exports.object({
|
|
18
|
+
version: external_exports.string().regex(/^b\d+$/),
|
|
19
|
+
revision: external_exports.string().regex(/^[a-f0-9]{40}$/)
|
|
20
|
+
}).strict();
|
|
21
|
+
var contracts = external_exports.object({ layout: external_exports.literal(1), embedding: external_exports.literal(1) }).strict();
|
|
22
|
+
var shared = {
|
|
23
|
+
recipeId: digest,
|
|
24
|
+
runtimeVersion: version,
|
|
25
|
+
url: external_exports.string(),
|
|
26
|
+
sha256: digest,
|
|
27
|
+
manifestSha256: digest,
|
|
28
|
+
target
|
|
29
|
+
};
|
|
30
|
+
var size = (maximum) => external_exports.number().int().positive().max(maximum);
|
|
31
|
+
var retainedUrl = (kind, pin) => {
|
|
32
|
+
const prefix = "https://github.com/koed-labs/koed/releases/download/";
|
|
33
|
+
const [tag, archive, ...extra] = pin.url.slice(prefix.length).split("/");
|
|
34
|
+
return pin.url.startsWith(prefix) && extra.length === 0 && archive === `koed-native-${kind}-${pin.recipeId}-linux-x64.tar.gz` && (tag === `native-${kind}-${pin.recipeId}` || /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(tag ?? ""));
|
|
35
|
+
};
|
|
36
|
+
var corePin = external_exports.object({
|
|
37
|
+
...shared,
|
|
38
|
+
archiveBytes: size(5e7),
|
|
39
|
+
expandedBytes: size(1e8),
|
|
40
|
+
contracts: contracts.extend({ postgres: external_exports.literal(1) }),
|
|
41
|
+
components: external_exports.object({
|
|
42
|
+
postgres: external_exports.object({
|
|
43
|
+
major: external_exports.literal(17),
|
|
44
|
+
version: external_exports.string().regex(/^17\.\d+$/)
|
|
45
|
+
}).strict(),
|
|
46
|
+
pgvector: external_exports.object({ version: external_exports.literal("0.8.3") }).strict(),
|
|
47
|
+
llamaCpp
|
|
48
|
+
}).strict()
|
|
49
|
+
}).strict().refine((pin) => retainedUrl("core", pin), "Native core URL does not identify the retained recipe release.");
|
|
50
|
+
var cudaPin = external_exports.object({
|
|
51
|
+
...shared,
|
|
52
|
+
archiveBytes: size(75e7),
|
|
53
|
+
expandedBytes: size(16e8),
|
|
54
|
+
contracts,
|
|
55
|
+
llamaCpp,
|
|
56
|
+
cuda: external_exports.object({
|
|
57
|
+
toolkitVersion: external_exports.literal("12.4"),
|
|
58
|
+
minimumDriverLinux: external_exports.literal("550.54.14"),
|
|
59
|
+
architectures: external_exports.array(external_exports.union([
|
|
60
|
+
external_exports.literal(75),
|
|
61
|
+
external_exports.literal(80),
|
|
62
|
+
external_exports.literal(86),
|
|
63
|
+
external_exports.literal(89),
|
|
64
|
+
external_exports.literal(90)
|
|
65
|
+
])).min(1).max(5).refine((values) => new Set(values).size === values.length)
|
|
66
|
+
}).strict()
|
|
67
|
+
}).strict().refine((pin) => retainedUrl("cuda", pin), "Native CUDA URL does not identify the retained recipe release.");
|
|
68
|
+
var nativeKind = (pin) => "components" in pin ? "core" : "cuda";
|
|
69
|
+
var compatibleCuda = (core, cuda) => core.components.llamaCpp.revision === cuda.llamaCpp.revision && core.components.llamaCpp.version === cuda.llamaCpp.version && core.contracts.layout === cuda.contracts.layout && core.contracts.embedding === cuda.contracts.embedding;
|
|
70
|
+
var compareNativeVersions = (left, right) => {
|
|
71
|
+
const a = version.parse(left).split(".").map(Number);
|
|
72
|
+
const b = version.parse(right).split(".").map(Number);
|
|
73
|
+
for (let index = 0; index < 3; index++) {
|
|
74
|
+
const difference = (a[index] ?? 0) - (b[index] ?? 0);
|
|
75
|
+
if (difference !== 0)
|
|
76
|
+
return Math.sign(difference);
|
|
77
|
+
}
|
|
78
|
+
return 0;
|
|
79
|
+
};
|
|
80
|
+
var catalog = external_exports.object({
|
|
81
|
+
schemaVersion: external_exports.literal(1),
|
|
82
|
+
minimumCoreVersion: version,
|
|
83
|
+
core: corePin,
|
|
84
|
+
cuda: cudaPin.nullable()
|
|
85
|
+
}).strict().refine((value) => !value.cuda || compatibleCuda(value.core, value.cuda), "Pinned CUDA add-on does not match the core revision and contracts.").refine((value) => compareNativeVersions(value.core.runtimeVersion, value.minimumCoreVersion) >= 0, "Pinned native core is below the compiled minimum runtime version.");
|
|
86
|
+
var validateNativeRuntimeCatalog = (value) => {
|
|
87
|
+
const parsed = catalog.safeParse(value);
|
|
88
|
+
if (!parsed.success)
|
|
89
|
+
throw new Error(`Invalid compiled native runtime catalog: ${parsed.error.message}`);
|
|
90
|
+
return parsed.data;
|
|
91
|
+
};
|
|
92
|
+
var getNativeRuntimeCatalog = () => {
|
|
93
|
+
if (productionNativeRuntimeCatalog === null)
|
|
94
|
+
throw new Error("This Control Plane has no reviewed native runtime pin. Use a trusted release with native runtime support.");
|
|
95
|
+
return validateNativeRuntimeCatalog(productionNativeRuntimeCatalog);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
nativeKind,
|
|
100
|
+
compatibleCuda,
|
|
101
|
+
compareNativeVersions,
|
|
102
|
+
validateNativeRuntimeCatalog,
|
|
103
|
+
getNativeRuntimeCatalog
|
|
104
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveKoedServerConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ALJUSOF7.js";
|
|
5
5
|
import {
|
|
6
6
|
parseEnvFile
|
|
7
7
|
} from "./chunk-W2HNI6AA.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveTeamCollaborationEnabled
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZOHNXUDY.js";
|
|
11
11
|
|
|
12
12
|
// packages/koed-server/dist/effective-runtime-config.js
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -12,10 +12,11 @@ import {
|
|
|
12
12
|
updateUpstreamBackendRoutePolicy,
|
|
13
13
|
upstreamBackendAdvertisesCapability,
|
|
14
14
|
upstreamBackendSupportsTeamMemoryAnswerTasks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RCR4XPE3.js";
|
|
16
16
|
import {
|
|
17
17
|
isTeamMemoryAnswerTaskCapability
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZOHNXUDY.js";
|
|
19
|
+
import "./chunk-FSNLU46W.js";
|
|
19
20
|
import "./chunk-BTS4ZTF3.js";
|
|
20
21
|
export {
|
|
21
22
|
clearUpstreamBackendCapabilities,
|