@moxt-ai/mobius 0.0.403 → 0.0.405

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-KMPTV5P7.js";
6
+ } from "./chunk-CVS27UI7.js";
7
7
 
8
8
  // src/engine/runtime/relay/runtime-revocation.ts
9
9
  var runtimeRevocationCloseCode = 1008;
@@ -88356,18 +88356,22 @@ var NativeSessionService = class {
88356
88356
  title: title2
88357
88357
  };
88358
88358
  };
88359
- listSessions = async (limit, signal) => await this.describeSessions(this.#sessions.listSessions(limit), signal);
88360
- querySessions = async (sessionIds, signal) => await this.describeSessions(this.#sessions.findSessions(sessionIds), signal);
88361
- describeSessions = async (sessions, signal) => {
88359
+ listSessions = async (limit, signal) => {
88360
+ signal.throwIfAborted();
88361
+ return this.describeSessions(this.#sessions.listSessions(limit));
88362
+ };
88363
+ querySessions = async (sessionIds, signal) => {
88364
+ signal.throwIfAborted();
88365
+ return this.describeSessions(this.#sessions.findSessions(sessionIds));
88366
+ };
88367
+ describeSessions = (sessions) => {
88362
88368
  const entries = [];
88363
88369
  for (const session of sessions) {
88364
- signal.throwIfAborted();
88365
- const directory = await this.#directories.identify(this.#bindingId, session.cwd, signal);
88366
- const additionalDirectories = [];
88367
- for (const path7 of session.additionalDirectories) {
88368
- const identified = await this.#directories.identify(this.#bindingId, path7, signal);
88369
- additionalDirectories.push({ directoryId: identified.directoryId, name: identified.name });
88370
- }
88370
+ const directory = this.#directories.identifyRecorded(this.#bindingId, session.cwd);
88371
+ const additionalDirectories = session.additionalDirectories.map((path7) => {
88372
+ const identified = this.#directories.identifyRecorded(this.#bindingId, path7);
88373
+ return { directoryId: identified.directoryId, name: identified.name };
88374
+ });
88371
88375
  entries.push({
88372
88376
  additionalDirectories,
88373
88377
  agentId: session.agentId,
@@ -89614,6 +89618,19 @@ var WorkspaceDirectoryService = class {
89614
89618
  label: this.label(path7)
89615
89619
  };
89616
89620
  };
89621
+ /**
89622
+ * Names a directory a Session recorded when it was resolved, without reading the filesystem. A Session
89623
+ * keeps its identity after its directory is moved, deleted or unmounted; using the Session resolves the
89624
+ * directory again and fails there.
89625
+ */
89626
+ identifyRecorded = (bindingId, recordedPath) => {
89627
+ this.authorizeMachine(bindingId);
89628
+ return {
89629
+ directoryId: encodePath(recordedPath),
89630
+ name: basename7(recordedPath) || recordedPath,
89631
+ label: this.label(recordedPath)
89632
+ };
89633
+ };
89617
89634
  resolve = async (bindingId, id, signal) => {
89618
89635
  this.authorizeMachine(bindingId);
89619
89636
  return await this.resolvePath(this.requestedPath(id), signal);
@@ -93928,4 +93945,4 @@ export {
93928
93945
  * MIT Licensed
93929
93946
  *)
93930
93947
  */
93931
- //# sourceMappingURL=chunk-5S4YJP7Y.js.map
93948
+ //# sourceMappingURL=chunk-2BOWMHCH.js.map