@moltbankhq/openclaw 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/index.ts +8 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -141,6 +141,11 @@ function getAppBaseUrl(cfg: MoltbankPluginConfig): string {
141
141
  return (cfg?.appBaseUrl || process.env.APP_BASE_URL || 'https://app.moltbank.bot').trim();
142
142
  }
143
143
 
144
+ function getSkillBundleBaseUrl(cfg: MoltbankPluginConfig): string {
145
+ const base = getAppBaseUrl(cfg).replace(/\/$/, '');
146
+ return base.endsWith('/skill') ? base : `${base}/skill`;
147
+ }
148
+
144
149
  function isSandboxEnabled(): boolean {
145
150
  try {
146
151
  const configPath = join(homedir(), '.openclaw', 'openclaw.json');
@@ -1145,6 +1150,7 @@ function recreateSandboxAndRestart(api: LoggerApi) {
1145
1150
  async function runSetup(cfg: MoltbankPluginConfig, api: LoggerApi, options: { authWaitMode?: AuthWaitMode } = {}) {
1146
1151
  let hostReady = false;
1147
1152
  const appBaseUrl = getAppBaseUrl(cfg);
1153
+ const skillBundleBaseUrl = getSkillBundleBaseUrl(cfg);
1148
1154
  const skillName = getSkillName(cfg);
1149
1155
  const sandbox = isSandboxEnabled();
1150
1156
  const skillDir = getSkillDir(cfg);
@@ -1166,7 +1172,7 @@ async function runSetup(cfg: MoltbankPluginConfig, api: LoggerApi, options: { au
1166
1172
  ensureMcporter(api);
1167
1173
 
1168
1174
  api.logger.info('[moltbank] [sandbox 1/10] installing skill files...');
1169
- const skillInstalled = ensureSkillInstalled(skillDir, appBaseUrl, skillName, api, 'sandbox');
1175
+ const skillInstalled = ensureSkillInstalled(skillDir, skillBundleBaseUrl, skillName, api, 'sandbox');
1170
1176
  if (!skillInstalled) {
1171
1177
  api.logger.warn('[moltbank] skill install failed — aborting sandbox setup');
1172
1178
  return;
@@ -1223,7 +1229,7 @@ async function runSetup(cfg: MoltbankPluginConfig, api: LoggerApi, options: { au
1223
1229
  ensureMcporter(api);
1224
1230
 
1225
1231
  api.logger.info('[moltbank] [host 2/8] installing skill files...');
1226
- const installed = ensureSkillInstalled(skillDir, appBaseUrl, skillName, api, 'host');
1232
+ const installed = ensureSkillInstalled(skillDir, skillBundleBaseUrl, skillName, api, 'host');
1227
1233
  if (!installed) {
1228
1234
  api.logger.warn('[moltbank] host setup aborted: skill install failed. Verify install.sh/base URL and retry.');
1229
1235
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moltbankhq/openclaw",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MoltBank stablecoin treasury OpenClaw plugin",
5
5
  "main": "index.ts",
6
6
  "openclaw": {