@moxt-ai/mobius 0.0.121 → 0.0.122

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/cli.js CHANGED
@@ -3381,7 +3381,7 @@ var program = new Command();
3381
3381
  // package.json
3382
3382
  var package_default = {
3383
3383
  name: "@moxt-ai/mobius",
3384
- version: "0.0.121",
3384
+ version: "0.0.122",
3385
3385
  description: "Mobius CLI for pairing and running local AI agent services.",
3386
3386
  type: "module",
3387
3387
  bin: {
@@ -41932,11 +41932,23 @@ var DaemonTurnRegistry = class {
41932
41932
  turn.recordEvent(event);
41933
41933
  }
41934
41934
  };
41935
- queued = (matches) => [...this.#turns.values()].filter((turn) => matches(turn.command) && turn.isQueued()).map(({ command }) => ({ commandId: command.commandId, prompt: command.prompt, images: command.images }));
41936
- executionSnapshot = (matches) => ({
41937
- turn: this.snapshot(matches),
41938
- queued: this.queued(matches)
41939
- });
41935
+ executionSnapshot = async (matches) => {
41936
+ const matching = [];
41937
+ for (const turn of this.#turns.values()) {
41938
+ if (await matches(turn.command)) {
41939
+ matching.push(turn);
41940
+ }
41941
+ }
41942
+ const current = matching.filter((turn) => this.#turns.get(turn.command.commandId) === turn);
41943
+ return {
41944
+ turn: current.map((turn) => turn.snapshot()).find((snapshot) => snapshot !== null) ?? null,
41945
+ queued: current.filter((turn) => turn.isQueued()).map(({ command }) => ({
41946
+ commandId: command.commandId,
41947
+ prompt: command.prompt,
41948
+ images: command.images
41949
+ }))
41950
+ };
41951
+ };
41940
41952
  snapshot = (matches) => {
41941
41953
  for (const turn of this.#turns.values()) {
41942
41954
  if (!matches(turn.command)) {
@@ -42540,7 +42552,7 @@ var NativeSessionService = class {
42540
42552
  requestId: command.requestId,
42541
42553
  sessionId: command.sessionId,
42542
42554
  targetSessionId: command.targetSessionId,
42543
- ...this.#activeTurn(command)
42555
+ ...await this.#activeTurn(command, options)
42544
42556
  };
42545
42557
  }
42546
42558
  if (command.action === "create") {
@@ -45948,12 +45960,19 @@ async function runDaemon(config2, audit, signal, timer = systemDaemonTimer, opti
45948
45960
  config2.relayUrl,
45949
45961
  new DaemonDiagnosticLog(stateDirectory)
45950
45962
  );
45951
- const nativeSessions = new NativeSessionService(config2, directories, sessions, audit, (request) => {
45952
- return activeTurns.executionSnapshot(
45953
- (command) => command.sessionId === request.targetSessionId && command.agentId === request.agentId && command.directoryId === request.directoryId && command.additionalDirectoryIds.length === request.additionalDirectoryIds.length && command.additionalDirectoryIds.every(
45954
- (directoryId2, index) => directoryId2 === request.additionalDirectoryIds[index]
45955
- )
45956
- );
45963
+ const nativeSessions = new NativeSessionService(config2, directories, sessions, audit, async (request, options2) => {
45964
+ return await activeTurns.executionSnapshot(async (command) => {
45965
+ if (command.sessionId !== request.targetSessionId || command.agentId !== request.agentId) {
45966
+ return false;
45967
+ }
45968
+ const cwd = await directories.resolve(command.bindingId, command.directoryId, options2.signal);
45969
+ const additionalDirectories = await directories.resolveMany(
45970
+ command.bindingId,
45971
+ command.additionalDirectoryIds,
45972
+ options2.signal
45973
+ );
45974
+ return cwd === options2.cwd && additionalDirectories.length === options2.additionalDirectories.length && additionalDirectories.every((directory, index) => directory === options2.additionalDirectories[index]);
45975
+ });
45957
45976
  });
45958
45977
  const installations = new AgentInstallationManager(
45959
45978
  specifications,