@moxt-ai/mobius 0.0.50 → 0.0.51
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/acp/session-manager.d.ts +1 -0
- package/dist/acp/session-manager.d.ts.map +1 -1
- package/dist/acp/session-manager.js +3 -4
- package/dist/acp/session-manager.js.map +1 -1
- package/dist/cli.js +20 -10
- package/dist/cli.js.map +2 -2
- package/dist/index.js +19 -9
- package/dist/index.js.map +2 -2
- package/dist/run-daemon.d.ts.map +1 -1
- package/dist/run-daemon.js +15 -4
- package/dist/run-daemon.js.map +1 -1
- package/dist/runtime.js +19 -9
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ import { mkdir as mkdir5 } from "node:fs/promises";
|
|
|
11
11
|
// package.json
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@moxt-ai/mobius",
|
|
14
|
-
version: "0.0.
|
|
14
|
+
version: "0.0.51",
|
|
15
15
|
description: "Mobius CLI for pairing and running local AI agent services.",
|
|
16
16
|
type: "module",
|
|
17
17
|
bin: {
|
|
@@ -34606,6 +34606,7 @@ var AcpProcessSession = class _AcpProcessSession {
|
|
|
34606
34606
|
belongsTo = (agentId, cwd, additionalDirectories) => this.#agentId === agentId && this.#cwd === cwd && arraysEqual(this.#additionalDirectories, additionalDirectories);
|
|
34607
34607
|
usesEnvironment = (environment) => recordsEqual(this.#environment, environment);
|
|
34608
34608
|
canRebind = () => !this.#prompted && !this.#turn.running;
|
|
34609
|
+
hasRunningTurn = () => this.#turn.running;
|
|
34609
34610
|
prepared = () => new AcpPreparedSession(
|
|
34610
34611
|
this.#agentName,
|
|
34611
34612
|
this.#agentVersion,
|
|
@@ -36089,7 +36090,6 @@ var AcpSessionManager = class {
|
|
|
36089
36090
|
const operation = (async () => {
|
|
36090
36091
|
try {
|
|
36091
36092
|
await this.#retireSessionProcess(options.sessionId, existing, async () => await existing.close());
|
|
36092
|
-
this.#store.remove(options.sessionId);
|
|
36093
36093
|
const runtime = await this.#startRetainedSessionProcess(
|
|
36094
36094
|
options,
|
|
36095
36095
|
async () => await AcpProcessSession.start(options, () => this.#observer, this.#store)
|
|
@@ -36129,7 +36129,6 @@ var AcpSessionManager = class {
|
|
|
36129
36129
|
}
|
|
36130
36130
|
} catch (error62) {
|
|
36131
36131
|
await this.#retireSessionProcess(options.sessionId, runtime, async () => await runtime.close());
|
|
36132
|
-
this.#store.remove(options.sessionId);
|
|
36133
36132
|
throw error62;
|
|
36134
36133
|
}
|
|
36135
36134
|
return runtime;
|
|
@@ -36249,11 +36248,11 @@ var AcpSessionManager = class {
|
|
|
36249
36248
|
this.#touchExpectedSession(options.sessionId, existing);
|
|
36250
36249
|
return existing.prepared();
|
|
36251
36250
|
}
|
|
36252
|
-
if (
|
|
36251
|
+
if (existing.hasRunningTurn()) {
|
|
36253
36252
|
throw new AcpExecutionError(
|
|
36254
|
-
"The execution environment cannot change
|
|
36253
|
+
"The execution environment cannot change while a conversation turn is running",
|
|
36255
36254
|
{},
|
|
36256
|
-
"
|
|
36255
|
+
"session_busy"
|
|
36257
36256
|
);
|
|
36258
36257
|
}
|
|
36259
36258
|
return (await this.#replaceExecutionPreparation(existing, options)).prepared();
|
|
@@ -40522,10 +40521,11 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
40522
40521
|
"prompt_queue_target_unavailable"
|
|
40523
40522
|
);
|
|
40524
40523
|
}
|
|
40524
|
+
const executionAgent = command.sessionConfigurations === void 0 ? agent : agentForSessionConfiguration(agent, command.sessionConfigurations);
|
|
40525
40525
|
if (command.sessionConfigurations !== void 0) {
|
|
40526
40526
|
const prepared = await sessions.prepareExecutionSession({
|
|
40527
40527
|
additionalDirectories: resolved.additionalDirectories,
|
|
40528
|
-
agent,
|
|
40528
|
+
agent: executionAgent,
|
|
40529
40529
|
cwd: resolved.cwd,
|
|
40530
40530
|
sessionId: command.sessionId,
|
|
40531
40531
|
signal
|
|
@@ -40538,7 +40538,7 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
40538
40538
|
audit,
|
|
40539
40539
|
prepared.configOptions,
|
|
40540
40540
|
command.sessionConfigurations,
|
|
40541
|
-
|
|
40541
|
+
executionAgent,
|
|
40542
40542
|
resolved.cwd,
|
|
40543
40543
|
resolved.additionalDirectories,
|
|
40544
40544
|
command.commandId,
|
|
@@ -40569,7 +40569,7 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
40569
40569
|
if (command.disposition === SessionPromptDisposition.Steer) {
|
|
40570
40570
|
await sessions.steerPrompt({
|
|
40571
40571
|
additionalDirectories: resolved.additionalDirectories,
|
|
40572
|
-
agent,
|
|
40572
|
+
agent: executionAgent,
|
|
40573
40573
|
commandId: command.commandId,
|
|
40574
40574
|
cwd: resolved.cwd,
|
|
40575
40575
|
images: attachments.images,
|
|
@@ -40583,7 +40583,7 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
40583
40583
|
} else {
|
|
40584
40584
|
const result = await sessions.runPrompt({
|
|
40585
40585
|
additionalDirectories: resolved.additionalDirectories,
|
|
40586
|
-
agent,
|
|
40586
|
+
agent: executionAgent,
|
|
40587
40587
|
commandId: command.commandId,
|
|
40588
40588
|
cwd: resolved.cwd,
|
|
40589
40589
|
disposition: command.disposition,
|
|
@@ -40650,6 +40650,16 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
40650
40650
|
function invalidSessionConfiguration(message) {
|
|
40651
40651
|
return new AcpExecutionError(message, {}, "invalid_session_configuration");
|
|
40652
40652
|
}
|
|
40653
|
+
function agentForSessionConfiguration(agent, selections) {
|
|
40654
|
+
const permission = selections.find((selection) => selection.configId === AGENT_PERMISSION_MODE_CONFIG_ID);
|
|
40655
|
+
if (permission === void 0) {
|
|
40656
|
+
throw invalidSessionConfiguration(
|
|
40657
|
+
`The Turn configuration does not match Agent setting ${AGENT_PERMISSION_MODE_CONFIG_ID}`
|
|
40658
|
+
);
|
|
40659
|
+
}
|
|
40660
|
+
validateSessionConfigurationSelection(agent.permissionProfile.option(agent.environment), permission);
|
|
40661
|
+
return agent.withPermissionMode(permission.value);
|
|
40662
|
+
}
|
|
40653
40663
|
function validateSessionConfigurationSelection(option, selection) {
|
|
40654
40664
|
if (option.type !== selection.valueType) {
|
|
40655
40665
|
throw invalidSessionConfiguration(`The Agent setting ${selection.configId} changed type`);
|