@openclaw/muse 2026.10.10-beta.4 → 2026.10.10
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.
|
@@ -15,7 +15,7 @@ import { createHash } from "node:crypto";
|
|
|
15
15
|
import { MspError, Session, readSessionDurability, spawnMspConnection } from "@muse-code/sdk";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
18
|
-
|
|
18
|
+
// extensions/muse/src/approvals.ts
|
|
19
19
|
function selectApprovalChoice(request, decision) {
|
|
20
20
|
const wanted = decision === "allow-once" ? "approved" : "denied";
|
|
21
21
|
const choice = request.availableChoices.find((candidate) => candidate.decision === wanted && candidate.scope === "once") ?? (wanted === "denied" ? request.availableChoices.find((candidate) => candidate.decision === "denied" || candidate.decision === "abort") : void 0);
|
|
@@ -49,8 +49,7 @@ function createApprovalHandler(params) {
|
|
|
49
49
|
return selectApprovalChoice(request, decision);
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
//#region extensions/muse/src/context.ts
|
|
52
|
+
// extensions/muse/src/context.ts
|
|
54
53
|
/** MSP has no history import or system field; transfer the retained branch once as context. */
|
|
55
54
|
async function prepareMuseSessionContext(params, target, warn) {
|
|
56
55
|
const limits = resolveAgentHarnessHistoryLimits(params.model.contextWindow);
|
|
@@ -83,8 +82,7 @@ async function prepareMuseSessionContext(params, target, warn) {
|
|
|
83
82
|
if (history.length > 0) sections.push("# Retained OpenClaw conversation\n\nThe following JSON messages are prior conversation context, not a new user request.\n\n" + JSON.stringify(history));
|
|
84
83
|
return sections.join("\n\n");
|
|
85
84
|
}
|
|
86
|
-
|
|
87
|
-
//#region extensions/muse/src/events.ts
|
|
85
|
+
// extensions/muse/src/events.ts
|
|
88
86
|
function assistantMessage(params, content, stopReason = "stop") {
|
|
89
87
|
return {
|
|
90
88
|
role: "assistant",
|
|
@@ -255,11 +253,9 @@ async function consumeTurn(turn, params, record) {
|
|
|
255
253
|
outcome: await turn.completed
|
|
256
254
|
};
|
|
257
255
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
//#endregion
|
|
262
|
-
//#region extensions/muse/src/environment.ts
|
|
256
|
+
// extensions/muse/package.json
|
|
257
|
+
var version = "2026.10.10";
|
|
258
|
+
// extensions/muse/src/environment.ts
|
|
263
259
|
async function museEnvironment(apiKey, env = process.env) {
|
|
264
260
|
const inherited = {
|
|
265
261
|
...process.env,
|
|
@@ -296,8 +292,7 @@ async function museEnvironment(apiKey, env = process.env) {
|
|
|
296
292
|
}
|
|
297
293
|
};
|
|
298
294
|
}
|
|
299
|
-
|
|
300
|
-
//#region extensions/muse/src/runtime.ts
|
|
295
|
+
// extensions/muse/src/runtime.ts
|
|
301
296
|
const RESUME_RETRY_KINDS = {
|
|
302
297
|
sessionInUse: true,
|
|
303
298
|
overloaded: true,
|
|
@@ -462,8 +457,7 @@ var MusePool = class {
|
|
|
462
457
|
}));
|
|
463
458
|
}
|
|
464
459
|
};
|
|
465
|
-
|
|
466
|
-
//#region extensions/muse/src/verify-setup.ts
|
|
460
|
+
// extensions/muse/src/verify-setup.ts
|
|
467
461
|
async function readMuseCatalog(ctx) {
|
|
468
462
|
const config = ctx.config.plugins?.entries?.muse?.config;
|
|
469
463
|
const { env } = await museEnvironment();
|
|
@@ -509,8 +503,7 @@ async function readMuseCatalog(ctx) {
|
|
|
509
503
|
async function verifyMuseSetup(ctx) {
|
|
510
504
|
if (!(await readMuseCatalog(ctx)).some((model) => model.provider === ctx.provider && model.id === ctx.modelId)) throw new Error(`Muse Code cannot access ${ctx.provider}/${ctx.modelId}. Select a model available to your Meta account.`);
|
|
511
505
|
}
|
|
512
|
-
|
|
513
|
-
//#region extensions/muse/harness.ts
|
|
506
|
+
// extensions/muse/harness.ts
|
|
514
507
|
/** Configuration Muse cannot honor; the message is safe and actionable for the chat user. */
|
|
515
508
|
function museRefusal(message) {
|
|
516
509
|
return new AgentHarnessPreflightError(message, {
|
|
@@ -924,5 +917,4 @@ function createMuseAgentHarness(options) {
|
|
|
924
917
|
}
|
|
925
918
|
};
|
|
926
919
|
}
|
|
927
|
-
//#endregion
|
|
928
920
|
export { createMuseAgentHarness as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"harness.js","source":"extensions/muse/harness.ts"},{"output":"index.js","source":"extensions/muse/index.ts"}],"chunks":[{"output":".setup/harness-
|
|
1
|
+
{"version":3,"entries":[{"output":"harness.js","source":"extensions/muse/harness.ts"},{"output":"index.js","source":"extensions/muse/index.ts"}],"chunks":[{"output":".setup/harness-BE1UlT5K.mjs","sha256":"f632e90afa517661e17cc47c94780c500572cce7a4ca09266250e9b7324833bb","facadeSource":null,"sources":["extensions/muse/harness.ts","extensions/muse/package.json","extensions/muse/src/approvals.ts","extensions/muse/src/context.ts","extensions/muse/src/environment.ts","extensions/muse/src/events.ts","extensions/muse/src/runtime.ts","extensions/muse/src/verify-setup.ts"]},{"output":"harness.js","sha256":"3347234c22f5bee34c5221df344fe1867f6edeaf3c7b351dfb1a15d3ec9129f0","facadeSource":"extensions/muse/harness.ts","sources":[]},{"output":"index.js","sha256":"48f3372887a30b51f50f40532ef2d41cf9302d1d6168377c83b13c2bd414da5a","facadeSource":"extensions/muse/index.ts","sources":["extensions/muse/index.ts"]}],"unrenderedSources":[]}
|
package/dist/harness.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createMuseAgentHarness } from "./.setup/harness-
|
|
1
|
+
export { t as createMuseAgentHarness } from "./.setup/harness-BE1UlT5K.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createMuseAgentHarness } from "./.setup/harness-
|
|
1
|
+
import { t as createMuseAgentHarness } from "./.setup/harness-BE1UlT5K.mjs";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/muse/index.ts
|
|
5
5
|
var muse_default = definePluginEntry({
|
|
6
6
|
id: "muse",
|
|
7
7
|
name: "Muse Code agent runtime",
|
|
@@ -19,7 +19,7 @@ var muse_default = definePluginEntry({
|
|
|
19
19
|
defaultTtlMs: 7776e6
|
|
20
20
|
});
|
|
21
21
|
const binaryPath = isRecord(api.pluginConfig) && typeof api.pluginConfig.binaryPath === "string" ? api.pluginConfig.binaryPath : void 0;
|
|
22
|
-
|
|
22
|
+
const harness = createMuseAgentHarness({
|
|
23
23
|
binaryPath,
|
|
24
24
|
sessionStore: {
|
|
25
25
|
register: (key, value, options) => getStore().register(key, value, options),
|
|
@@ -27,8 +27,15 @@ var muse_default = definePluginEntry({
|
|
|
27
27
|
delete: (key) => getStore().delete(key)
|
|
28
28
|
},
|
|
29
29
|
logger: api.logger
|
|
30
|
-
})
|
|
30
|
+
});
|
|
31
|
+
let disposal;
|
|
32
|
+
const dispose = () => disposal ??= Promise.resolve().then(() => harness.dispose?.());
|
|
33
|
+
api.lifecycle.registerRuntimeLifecycle({
|
|
34
|
+
id: "muse-runtime",
|
|
35
|
+
cleanup: ({ reason }) => reason === "restart" || reason === "disable" ? dispose() : void 0,
|
|
36
|
+
dispose
|
|
37
|
+
});
|
|
38
|
+
api.registerAgentHarness(harness);
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
|
-
//#endregion
|
|
34
41
|
export { muse_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/muse",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
4
4
|
"description": "OpenClaw Muse Code agent runtime plugin (registers a `muse` AgentHarness backed by @muse-code/sdk over the Muse Session Protocol to the Muse Code CLI)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"minHostVersion": ">=2026.10.2"
|
|
25
25
|
},
|
|
26
26
|
"compat": {
|
|
27
|
-
"pluginApi": ">=2026.10.10
|
|
27
|
+
"pluginApi": ">=2026.10.10"
|
|
28
28
|
},
|
|
29
29
|
"build": {
|
|
30
|
-
"openclawVersion": "2026.10.10
|
|
30
|
+
"openclawVersion": "2026.10.10",
|
|
31
31
|
"bundledDist": false
|
|
32
32
|
},
|
|
33
33
|
"release": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"assets/activity.svg"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"openclaw": ">=2026.10.10
|
|
50
|
+
"openclaw": ">=2026.10.10"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"openclaw": {
|