clawmoney 0.8.7 → 0.8.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.
@@ -25,13 +25,14 @@ function buildPrompt(call, config) {
25
25
  ].join("\n");
26
26
  }
27
27
  // ── CLI execution (openclaw agent / claude -p) ──
28
- function runCli(command, prompt, timeoutMs) {
28
+ function runCli(command, prompt, timeoutMs, orderId) {
29
29
  return new Promise((resolve) => {
30
30
  // Build args based on command
31
31
  let args;
32
32
  if (command === "openclaw") {
33
- // openclaw agent --message "..." --local
34
- args = ["agent", "--message", prompt, "--local"];
33
+ // openclaw agent --message "..." --session-id <order_id> --local --json
34
+ // session-id doesn't need to be pre-created, openclaw auto-creates it
35
+ args = ["agent", "--message", prompt, "--session-id", orderId || "hub-task", "--local", "--json"];
35
36
  }
36
37
  else {
37
38
  // claude -p "..." --output-format json
@@ -132,7 +133,7 @@ export class Executor {
132
133
  const timeoutS = Math.max(call.timeout - TIMEOUT_BUFFER_S, 30);
133
134
  const command = this.config.provider.cli_command;
134
135
  logger.info(`Executing: ${command} for skill="${call.skill}" order=${call.order_id} (timeout=${timeoutS}s)`);
135
- const { stdout, stderr, exitCode } = await runCli(command, prompt, timeoutS * 1000);
136
+ const { stdout, stderr, exitCode } = await runCli(command, prompt, timeoutS * 1000, call.order_id);
136
137
  if (exitCode !== 0) {
137
138
  const errMsg = stderr.trim() || `CLI exited with code ${exitCode}`;
138
139
  logger.error(`CLI failed (code=${exitCode}):`, errMsg);
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ const program = new Command();
10
10
  program
11
11
  .name('clawmoney')
12
12
  .description('ClawMoney CLI -- Earn rewards with your AI agent')
13
- .version('0.8.7');
13
+ .version('0.8.9');
14
14
  // setup
15
15
  program
16
16
  .command('setup')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {