mlclaw 0.4.8 → 0.4.9
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/Dockerfile +1 -1
- package/dist/mlclaw.mjs +34 -3
- package/package.json +1 -1
package/Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ ARG OPENCLAW_VERSION=2026.7.1
|
|
|
2
2
|
ARG OPENCLAW_BASE_IMAGE=ghcr.io/openclaw/openclaw:${OPENCLAW_VERSION}
|
|
3
3
|
ARG BROKERKIT_PLUGIN_VERSION=0.3.4
|
|
4
4
|
ARG BROKERKIT_VERSION=hf-broker/v0.4.2
|
|
5
|
-
ARG MLCLAW_RUNTIME_IMAGE=ghcr.io/huggingface/mlclaw:0.4.
|
|
5
|
+
ARG MLCLAW_RUNTIME_IMAGE=ghcr.io/huggingface/mlclaw:0.4.9-openclaw-2026.7.1
|
|
6
6
|
|
|
7
7
|
FROM golang:1.26.5-bookworm AS hf-broker-build
|
|
8
8
|
ARG BROKERKIT_VERSION
|
package/dist/mlclaw.mjs
CHANGED
|
@@ -15383,7 +15383,7 @@ function nextLink(header) {
|
|
|
15383
15383
|
|
|
15384
15384
|
// src/mlclaw/release-config.generated.ts
|
|
15385
15385
|
var RELEASE_CONFIG = {
|
|
15386
|
-
"packageVersion": "0.4.
|
|
15386
|
+
"packageVersion": "0.4.9",
|
|
15387
15387
|
"openclawVersion": "2026.7.1",
|
|
15388
15388
|
"brokerkitVersion": "hf-broker/v0.4.2",
|
|
15389
15389
|
"brokerkitPluginVersion": "0.3.4",
|
|
@@ -23346,8 +23346,9 @@ async function update(repoId, opts, hub, hfToken, runtime) {
|
|
|
23346
23346
|
}
|
|
23347
23347
|
const runtimeImage = resolveSpaceRuntimeImage(opts, runtime.env);
|
|
23348
23348
|
const agentName = variables.get("OPENCLAW_AGENT_NAME")?.value?.trim() || repoId.split("/")[1] || "openclaw";
|
|
23349
|
+
let localManifest;
|
|
23349
23350
|
if (!canonicalTemplate) {
|
|
23350
|
-
await ensureUpdateCredentials({
|
|
23351
|
+
localManifest = await ensureUpdateCredentials({
|
|
23351
23352
|
repoId,
|
|
23352
23353
|
agentName,
|
|
23353
23354
|
model: variables.get("OPENCLAW_MODEL")?.value ?? DEFAULT_MODEL2,
|
|
@@ -23362,8 +23363,9 @@ async function update(repoId, opts, hub, hfToken, runtime) {
|
|
|
23362
23363
|
token: hfToken,
|
|
23363
23364
|
...runtimeImage ? { runtimeImage } : {}
|
|
23364
23365
|
});
|
|
23366
|
+
const effectiveRuntimeImage = runtimeImage ?? bundledSpaceRuntimeRef(templateRev);
|
|
23365
23367
|
await hub.addSpaceVariable(repoId, "MLCLAW_TEMPLATE_REV", templateRev);
|
|
23366
|
-
await hub.addSpaceVariable(repoId, "MLCLAW_RUNTIME_IMAGE",
|
|
23368
|
+
await hub.addSpaceVariable(repoId, "MLCLAW_RUNTIME_IMAGE", effectiveRuntimeImage);
|
|
23367
23369
|
if (canonicalTemplate) {
|
|
23368
23370
|
await hub.addSpaceVariable(repoId, "MLCLAW_CANONICAL_SPACE_ID", canonicalTemplateSpaceId(runtime.env));
|
|
23369
23371
|
await doctor(repoId, { fix: true }, hub, runtime);
|
|
@@ -23382,8 +23384,36 @@ async function update(repoId, opts, hub, hfToken, runtime) {
|
|
|
23382
23384
|
await ensureSpaceStateVolume(hub, repoId, bucket);
|
|
23383
23385
|
}
|
|
23384
23386
|
await doctor(repoId, { fix: true }, hub, runtime);
|
|
23387
|
+
if (!localManifest) {
|
|
23388
|
+
throw new Error(`local deployment metadata is unavailable for ${repoId}`);
|
|
23389
|
+
}
|
|
23390
|
+
await reconcileUpdatedDeployment(localManifest, effectiveRuntimeImage, hub, runtime);
|
|
23385
23391
|
runtime.stdout.log(`Space deployment triggered: ${repoId}`);
|
|
23386
23392
|
}
|
|
23393
|
+
async function reconcileUpdatedDeployment(localManifest, runtimeImage, hub, runtime) {
|
|
23394
|
+
const secrets = await readSecretEnv(runtime.configRoot, localManifest.agent);
|
|
23395
|
+
await reconcileManifest({
|
|
23396
|
+
manifest: {
|
|
23397
|
+
...localManifest,
|
|
23398
|
+
gatewayLocation: "space",
|
|
23399
|
+
runtimeImage,
|
|
23400
|
+
updatedAt: runtime.now().toISOString()
|
|
23401
|
+
},
|
|
23402
|
+
bucketPrefix: persistedBucketPrefix(secrets),
|
|
23403
|
+
hub,
|
|
23404
|
+
runtime,
|
|
23405
|
+
apply: async ({ manifest, assertLease }) => {
|
|
23406
|
+
await assertLease();
|
|
23407
|
+
const currentSecrets = await readSecretEnv(runtime.configRoot, manifest.agent);
|
|
23408
|
+
await writeLocalDeployment(runtime.configRoot, manifest, {
|
|
23409
|
+
...currentSecrets,
|
|
23410
|
+
MLCLAW_GATEWAY_LOCATION: "space",
|
|
23411
|
+
MLCLAW_RUNTIME_IMAGE: runtimeImage,
|
|
23412
|
+
MLCLAW_RUNTIME_ID: spaceRuntimeId(manifest.agent)
|
|
23413
|
+
});
|
|
23414
|
+
}
|
|
23415
|
+
});
|
|
23416
|
+
}
|
|
23387
23417
|
async function ensureUpdateCredentials(params) {
|
|
23388
23418
|
const hasExplicitOverride = params.opts.routerToken !== void 0 || params.opts.routerTokenFile !== void 0;
|
|
23389
23419
|
const hasManifest = await manifestExists(params.runtime.configRoot, params.agentName);
|
|
@@ -23417,6 +23447,7 @@ async function ensureUpdateCredentials(params) {
|
|
|
23417
23447
|
MLCLAW_BROKER_HF_TOKEN: brokerCredential.token,
|
|
23418
23448
|
...routerToken ? { MLCLAW_ROUTER_TOKEN: routerToken } : {}
|
|
23419
23449
|
});
|
|
23450
|
+
return localManifest;
|
|
23420
23451
|
}
|
|
23421
23452
|
async function doctor(repoId, opts, hub, runtime) {
|
|
23422
23453
|
if (!repoId.includes("/") && await manifestExists(runtime.configRoot, repoId)) {
|