@parall/parall 1.29.2 → 1.30.0

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/fork.d.ts CHANGED
@@ -3,6 +3,7 @@ export type ForkSessionResult = {
3
3
  sessionId: string;
4
4
  sessionFile: string;
5
5
  };
6
+ export declare function clearSessionState(sessionsDir: string, sessionKey: string): void;
6
7
  export declare function resolveTranscriptFile(sessionsDir: string, sessionKey: string): string | null;
7
8
  export declare function resolveSessionId(sessionsDir: string, sessionKey: string): string | null;
8
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../src/fork.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA+CF,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqB5F;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvF;AAMD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,iBAAiB,GAAG,IAAI,CA+D3B;AAMD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CASP"}
1
+ {"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../src/fork.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA+CF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAE/E;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqB5F;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvF;AAMD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,iBAAiB,GAAG,IAAI,CA+D3B;AAMD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CASP"}
package/dist/fork.js CHANGED
@@ -50,6 +50,9 @@ function deleteStoreEntry(sessionsDir, sessionKey) {
50
50
  // Best-effort cleanup.
51
51
  }
52
52
  }
53
+ export function clearSessionState(sessionsDir, sessionKey) {
54
+ deleteStoreEntry(sessionsDir, sessionKey);
55
+ }
53
56
  export function resolveTranscriptFile(sessionsDir, sessionKey) {
54
57
  const entry = readStoreEntry(sessionsDir, sessionKey);
55
58
  if (!entry?.sessionId)
@@ -1 +1 @@
1
- {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,uGAAuG;AACvG,KAAK,qBAAqB,CAAC,CAAC,GAAG,OAAO,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAuBnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAkQxD,eAAO,MAAM,aAAa,EAAE,qBAAqB,CAAC,qBAAqB,CAiItE,CAAC"}
1
+ {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,uGAAuG;AACvG,KAAK,qBAAqB,CAAC,CAAC,GAAG,OAAO,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAuBnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAkQxD,eAAO,MAAM,aAAa,EAAE,qBAAqB,CAAC,qBAAqB,CAkItE,CAAC"}
package/dist/gateway.js CHANGED
@@ -9,7 +9,7 @@ import { buildOrchestratorSessionKey } from "./session.js";
9
9
  import { fetchAndApplyPlatformConfig } from "./config-manager.js";
10
10
  import { startWikiHelper } from "./wiki-helper.js";
11
11
  import { SessionManager } from "./oc-session.js";
12
- import { cleanupForkSession, forkOrchestratorSession, resolveSessionId, resolveTranscriptFile } from "./fork.js";
12
+ import { cleanupForkSession, clearSessionState, forkOrchestratorSession, resolveSessionId, resolveTranscriptFile } from "./fork.js";
13
13
  function resolveWsUrl(account) {
14
14
  if (account.config.ws_url)
15
15
  return account.config.ws_url;
@@ -357,6 +357,7 @@ export const parallGateway = {
357
357
  stopWikiHelper?.();
358
358
  removeParallAccountState(ctx.accountId);
359
359
  },
360
+ onNewSession: () => { clearSessionState(sessionsDir, orchestratorKey); },
360
361
  });
361
362
  try {
362
363
  await gateway.run(ctx.abortSignal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/parall",
3
- "version": "1.29.2",
3
+ "version": "1.30.0",
4
4
  "description": "OpenClaw channel plugin for Parall IM",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  "openclaw.plugin.json"
17
17
  ],
18
18
  "dependencies": {
19
- "@parall/sdk": "1.29.2",
20
- "@parall/agent-core": "1.29.2"
19
+ "@parall/agent-core": "1.30.0",
20
+ "@parall/sdk": "1.30.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^22.0.0",
package/src/fork.ts CHANGED
@@ -63,6 +63,10 @@ function deleteStoreEntry(sessionsDir: string, sessionKey: string): void {
63
63
  }
64
64
  }
65
65
 
66
+ export function clearSessionState(sessionsDir: string, sessionKey: string): void {
67
+ deleteStoreEntry(sessionsDir, sessionKey);
68
+ }
69
+
66
70
  export function resolveTranscriptFile(sessionsDir: string, sessionKey: string): string | null {
67
71
  const entry = readStoreEntry(sessionsDir, sessionKey);
68
72
  if (!entry?.sessionId) return null;
package/src/gateway.ts CHANGED
@@ -29,7 +29,7 @@ import type { ResolvedParallAccount } from "./types.js";
29
29
  import { fetchAndApplyPlatformConfig } from "./config-manager.js";
30
30
  import { startWikiHelper } from "./wiki-helper.js";
31
31
  import { SessionManager } from "./oc-session.js";
32
- import { cleanupForkSession, forkOrchestratorSession, resolveSessionId, resolveTranscriptFile } from "./fork.js";
32
+ import { cleanupForkSession, clearSessionState, forkOrchestratorSession, resolveSessionId, resolveTranscriptFile } from "./fork.js";
33
33
 
34
34
  function resolveWsUrl(account: ResolvedParallAccount): string {
35
35
  if (account.config.ws_url) return account.config.ws_url;
@@ -401,6 +401,7 @@ export const parallGateway: ChannelGatewayAdapter<ResolvedParallAccount> = {
401
401
  stopWikiHelper?.();
402
402
  removeParallAccountState(ctx.accountId);
403
403
  },
404
+ onNewSession: () => { clearSessionState(sessionsDir, orchestratorKey); },
404
405
  });
405
406
 
406
407
  try {