@twsxtd/hapi-openclaw 0.1.5 → 0.1.6

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/dist/index.js +7 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -331,14 +331,18 @@ class RealOpenClawAdapter {
331
331
  try {
332
332
  const config = this.runtime.config.loadConfig();
333
333
  const agentId = parseHapiSessionKey(action.conversationId)?.agentId ?? getDefaultAgentId();
334
- const workspaceDir = this.runtime.agent.resolveAgentWorkspaceDir(config, agentId);
335
- await this.runtime.agent.ensureAgentWorkspace({ dir: workspaceDir });
334
+ const workspaceDir = (await this.runtime.agent.ensureAgentWorkspace({
335
+ dir: this.runtime.agent.resolveAgentWorkspaceDir(config, agentId)
336
+ })).dir;
337
+ const agentDir = this.runtime.agent.resolveAgentDir(config, agentId);
336
338
  const { sessionId, sessionFile } = await ensureSessionBinding(this.runtime, action.conversationId, agentId);
337
- const result = await this.runtime.agent.runEmbeddedAgent({
339
+ const result = await this.runtime.agent.runEmbeddedPiAgent({
338
340
  sessionId,
339
341
  sessionKey: action.conversationId,
340
342
  sessionFile,
341
343
  workspaceDir,
344
+ agentDir,
345
+ config,
342
346
  agentId,
343
347
  prompt: action.text,
344
348
  timeoutMs: this.runtime.agent.resolveAgentTimeoutMs({ cfg: config }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twsxtd/hapi-openclaw",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Native OpenClaw plugin that bridges HAPI to the OpenClaw Gateway route surface.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",