@moxt-ai/mobius 0.0.361 → 0.0.362

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.
@@ -3,7 +3,7 @@ import {
3
3
  __export,
4
4
  __using,
5
5
  package_default
6
- } from "./chunk-HXDMU5LX.js";
6
+ } from "./chunk-SLYCSIGQ.js";
7
7
 
8
8
  // src/engine/runtime/relay/runtime-revocation.ts
9
9
  var runtimeRevocationCloseCode = 1008;
@@ -63222,6 +63222,10 @@ var ClaudeAcpAgent = class {
63222
63222
  return result;
63223
63223
  }
63224
63224
  async listSessions(params, signal) {
63225
+ const offset = params.cursor == null ? 0 : Number(params.cursor);
63226
+ if (!Number.isSafeInteger(offset) || offset < 0) {
63227
+ throw RequestError5.invalidParams("Invalid native session cursor");
63228
+ }
63225
63229
  const sdk_sessions = await listEnvironmentSessions(this.environment, params.cwd ?? void 0, signal);
63226
63230
  const sessions = [];
63227
63231
  for (const session of sdk_sessions) {
@@ -63235,8 +63239,12 @@ var ClaudeAcpAgent = class {
63235
63239
  updatedAt: new Date(session.lastModified).toISOString()
63236
63240
  });
63237
63241
  }
63242
+ sessions.sort((left, right) => right.updatedAt.localeCompare(left.updatedAt) || left.sessionId.localeCompare(right.sessionId));
63243
+ const pageSize = 500;
63244
+ const end = offset + pageSize;
63238
63245
  return {
63239
- sessions
63246
+ sessions: sessions.slice(offset, end),
63247
+ ...end < sessions.length ? { nextCursor: String(end) } : {}
63240
63248
  };
63241
63249
  }
63242
63250
  async authenticate(_params) {
@@ -93132,4 +93140,4 @@ export {
93132
93140
  * MIT Licensed
93133
93141
  *)
93134
93142
  */
93135
- //# sourceMappingURL=chunk-WQKXKY2U.js.map
93143
+ //# sourceMappingURL=chunk-A4WEXBMJ.js.map