@moltbankhq/openclaw 0.1.8 → 0.1.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/index.ts +15 -5
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -498,6 +498,7 @@ const SKILL_FILES = [
|
|
|
498
498
|
'SKILL.md',
|
|
499
499
|
'skill.json',
|
|
500
500
|
'install.sh',
|
|
501
|
+
'package.json',
|
|
501
502
|
'assets/mcporter.json',
|
|
502
503
|
'references/heartbeat.md',
|
|
503
504
|
'references/onboarding.md',
|
|
@@ -799,24 +800,30 @@ function runProcess(
|
|
|
799
800
|
}
|
|
800
801
|
}
|
|
801
802
|
|
|
802
|
-
function runMoltbankWrapper(
|
|
803
|
+
function runMoltbankWrapper(
|
|
804
|
+
skillDir: string,
|
|
805
|
+
args: string[],
|
|
806
|
+
env: Record<string, string | undefined> = {}
|
|
807
|
+
) {
|
|
803
808
|
if (IS_WIN) {
|
|
804
809
|
const ps1Path = join(skillDir, 'scripts', 'moltbank.ps1');
|
|
805
810
|
return runProcess('powershell', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', ps1Path, ...args], {
|
|
806
811
|
cwd: skillDir,
|
|
807
|
-
silent: true
|
|
812
|
+
silent: true,
|
|
813
|
+
env
|
|
808
814
|
});
|
|
809
815
|
}
|
|
810
816
|
|
|
811
817
|
return runProcess(join(skillDir, 'scripts', 'moltbank.sh'), args, {
|
|
812
818
|
cwd: skillDir,
|
|
813
|
-
silent: true
|
|
819
|
+
silent: true,
|
|
820
|
+
env
|
|
814
821
|
});
|
|
815
822
|
}
|
|
816
823
|
|
|
817
824
|
function verifyMoltbankOperationalReadiness(skillDir: string, api: LoggerApi): boolean {
|
|
818
825
|
const existing = parseActiveTokenFromCredentials();
|
|
819
|
-
if (!existing.ok || !existing.activeOrg) {
|
|
826
|
+
if (!existing.ok || !existing.activeOrg || !existing.token) {
|
|
820
827
|
api.logger.warn('[moltbank] ✗ setup incomplete: authenticated org could not be resolved for balance verification');
|
|
821
828
|
return false;
|
|
822
829
|
}
|
|
@@ -826,7 +833,10 @@ function verifyMoltbankOperationalReadiness(skillDir: string, api: LoggerApi): b
|
|
|
826
833
|
'MoltBank.get_balance',
|
|
827
834
|
`organizationName=${existing.activeOrg}`,
|
|
828
835
|
'date=today'
|
|
829
|
-
]
|
|
836
|
+
], {
|
|
837
|
+
MOLTBANK: existing.token,
|
|
838
|
+
ACTIVE_ORG_OVERRIDE: existing.activeOrg
|
|
839
|
+
});
|
|
830
840
|
|
|
831
841
|
if (verification.ok) {
|
|
832
842
|
api.logger.info(`[moltbank] ✓ balance verification passed (org: ${existing.activeOrg})`);
|