@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.
- package/dist/index.js +7 -3
- 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.
|
|
335
|
-
|
|
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.
|
|
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 }),
|