@loggie-ai/openclaw-plugin 0.1.2 → 0.1.4
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { getSessionEntry, loadSessionStore, resolveAndPersistSessionFile, } from "openclaw/plugin-sdk/session-store-runtime";
|
|
2
3
|
import { fetchLoggieTranscriptDetail } from "../loggie-client.js";
|
|
3
4
|
import { buildLoggieRouteSessionKey, buildLoggieSessionId, meetingConversationId } from "../routing.js";
|
|
4
5
|
import { formatTranscriptReadyPrompt } from "./transcript-format.js";
|
|
@@ -97,7 +98,22 @@ export function createOpenClawTranscriptDispatcher(params) {
|
|
|
97
98
|
const agentRuntime = await getAgentRuntime();
|
|
98
99
|
const workspaceDir = agentRuntime.resolveAgentWorkspaceDir(params.cfg, params.account.agentId);
|
|
99
100
|
const agentDir = agentRuntime.resolveAgentDir(params.cfg, params.account.agentId);
|
|
100
|
-
const
|
|
101
|
+
const fallbackSessionFile = join(agentDir, "sessions", `${sessionId}.jsonl`);
|
|
102
|
+
const sessionStore = loadSessionStore(storePath);
|
|
103
|
+
const sessionEntry = getSessionEntry({
|
|
104
|
+
storePath,
|
|
105
|
+
sessionKey: routeSessionKey,
|
|
106
|
+
});
|
|
107
|
+
const { sessionFile } = await resolveAndPersistSessionFile({
|
|
108
|
+
sessionId,
|
|
109
|
+
sessionKey: routeSessionKey,
|
|
110
|
+
sessionStore,
|
|
111
|
+
storePath,
|
|
112
|
+
sessionEntry,
|
|
113
|
+
agentId: params.account.agentId,
|
|
114
|
+
sessionsDir: dirname(storePath),
|
|
115
|
+
fallbackSessionFile,
|
|
116
|
+
});
|
|
101
117
|
await agentRuntime.ensureAgentWorkspace?.({ dir: workspaceDir });
|
|
102
118
|
return agentRuntime.runEmbeddedAgent({
|
|
103
119
|
sessionId,
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
2
|
import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/channel-core";
|
|
3
|
+
import {
|
|
4
|
+
getSessionEntry,
|
|
5
|
+
loadSessionStore,
|
|
6
|
+
resolveAndPersistSessionFile,
|
|
7
|
+
} from "openclaw/plugin-sdk/session-store-runtime";
|
|
3
8
|
import type { ResolvedLoggieAccount } from "../account.js";
|
|
4
9
|
import type { LoggieTranscriptReadyEvent } from "../event-types.js";
|
|
5
10
|
import { fetchLoggieTranscriptDetail } from "../loggie-client.js";
|
|
@@ -139,7 +144,22 @@ export function createOpenClawTranscriptDispatcher(params: {
|
|
|
139
144
|
params.account.agentId,
|
|
140
145
|
);
|
|
141
146
|
const agentDir = agentRuntime.resolveAgentDir(params.cfg, params.account.agentId);
|
|
142
|
-
const
|
|
147
|
+
const fallbackSessionFile = join(agentDir, "sessions", `${sessionId}.jsonl`);
|
|
148
|
+
const sessionStore = loadSessionStore(storePath);
|
|
149
|
+
const sessionEntry = getSessionEntry({
|
|
150
|
+
storePath,
|
|
151
|
+
sessionKey: routeSessionKey,
|
|
152
|
+
});
|
|
153
|
+
const { sessionFile } = await resolveAndPersistSessionFile({
|
|
154
|
+
sessionId,
|
|
155
|
+
sessionKey: routeSessionKey,
|
|
156
|
+
sessionStore,
|
|
157
|
+
storePath,
|
|
158
|
+
sessionEntry,
|
|
159
|
+
agentId: params.account.agentId,
|
|
160
|
+
sessionsDir: dirname(storePath),
|
|
161
|
+
fallbackSessionFile,
|
|
162
|
+
});
|
|
143
163
|
await agentRuntime.ensureAgentWorkspace?.({ dir: workspaceDir });
|
|
144
164
|
return agentRuntime.runEmbeddedAgent({
|
|
145
165
|
sessionId,
|