@moxt-ai/mobius 0.0.287 → 0.0.289
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/agent/in-process-endpoint.d.ts +5 -3
- package/dist/acp/agent/in-process-endpoint.d.ts.map +1 -1
- package/dist/acp/connection/agent-connection.d.ts.map +1 -1
- package/dist/acp/connection/agent-connection.js +1 -1
- package/dist/acp/connection/agent-connection.js.map +1 -1
- package/dist/acp/harness/claude/endpoint.d.ts.map +1 -1
- package/dist/acp/harness/claude/endpoint.js +1 -0
- package/dist/acp/harness/claude/endpoint.js.map +1 -1
- package/dist/acp/harness/codex/agent.d.ts.map +1 -1
- package/dist/acp/harness/codex/agent.js +3 -1
- package/dist/acp/harness/codex/agent.js.map +1 -1
- package/dist/acp/harness/pi/endpoint.js +1 -1
- package/dist/acp/harness/pi/endpoint.js.map +1 -1
- package/dist/agent/discovery/acp-readiness-probe.d.ts.map +1 -1
- package/dist/agent/discovery/acp-readiness-probe.js +3 -1
- package/dist/agent/discovery/acp-readiness-probe.js.map +1 -1
- package/dist/cli.js +24603 -24587
- package/dist/cli.js.map +4 -4
- package/dist/runtime.js +29 -15
- package/dist/runtime.js.map +3 -3
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -22568,7 +22568,7 @@ import { fetch as fetch3 } from "undici";
|
|
|
22568
22568
|
// package.json
|
|
22569
22569
|
var package_default = {
|
|
22570
22570
|
name: "@moxt-ai/mobius",
|
|
22571
|
-
version: "0.0.
|
|
22571
|
+
version: "0.0.289",
|
|
22572
22572
|
description: "Mobius CLI for pairing and running local AI agent services.",
|
|
22573
22573
|
type: "module",
|
|
22574
22574
|
bin: {
|
|
@@ -60054,6 +60054,10 @@ function permissionOptionOrder(option) {
|
|
|
60054
60054
|
|
|
60055
60055
|
// src/acp/harness/claude/upstream/dist/tools.js
|
|
60056
60056
|
import path3 from "node:path";
|
|
60057
|
+
var fileWritePreviewInputSchema = external_exports.object({
|
|
60058
|
+
file_path: external_exports.string().optional(),
|
|
60059
|
+
content: external_exports.string().optional()
|
|
60060
|
+
});
|
|
60057
60061
|
function toDisplayPath(filePath, cwd) {
|
|
60058
60062
|
if (!cwd) {
|
|
60059
60063
|
return filePath;
|
|
@@ -60117,9 +60121,10 @@ function toolInfoFromToolUse(toolUse, supportsTerminalOutput = false, cwd) {
|
|
|
60117
60121
|
};
|
|
60118
60122
|
}
|
|
60119
60123
|
case "Write": {
|
|
60120
|
-
const
|
|
60124
|
+
const parsed = fileWritePreviewInputSchema.safeParse(toolUse.input);
|
|
60125
|
+
const input2 = parsed.success ? parsed.data : void 0;
|
|
60121
60126
|
let content = [];
|
|
60122
|
-
if (input2?.file_path) {
|
|
60127
|
+
if (input2?.file_path && typeof input2.content === "string") {
|
|
60123
60128
|
content = [
|
|
60124
60129
|
{
|
|
60125
60130
|
type: "diff",
|
|
@@ -60128,7 +60133,7 @@ function toolInfoFromToolUse(toolUse, supportsTerminalOutput = false, cwd) {
|
|
|
60128
60133
|
newText: input2.content
|
|
60129
60134
|
}
|
|
60130
60135
|
];
|
|
60131
|
-
} else if (input2?.content) {
|
|
60136
|
+
} else if (typeof input2?.content === "string") {
|
|
60132
60137
|
content = [
|
|
60133
60138
|
{
|
|
60134
60139
|
type: "content",
|
|
@@ -62058,10 +62063,15 @@ function isSyntheticLoginMessage(apiMessage) {
|
|
|
62058
62063
|
}
|
|
62059
62064
|
var ClientConnection = class {
|
|
62060
62065
|
ctx;
|
|
62061
|
-
|
|
62066
|
+
onSessionUpdate;
|
|
62067
|
+
constructor(ctx, onSessionUpdate) {
|
|
62062
62068
|
this.ctx = ctx;
|
|
62069
|
+
this.onSessionUpdate = onSessionUpdate;
|
|
62063
62070
|
}
|
|
62064
62071
|
sessionUpdate(params) {
|
|
62072
|
+
if (this.onSessionUpdate !== void 0) {
|
|
62073
|
+
return this.onSessionUpdate(params);
|
|
62074
|
+
}
|
|
62065
62075
|
return this.ctx.notify(methods.client.session.update, params);
|
|
62066
62076
|
}
|
|
62067
62077
|
requestPermission(params, signal) {
|
|
@@ -66237,7 +66247,7 @@ async function runPromptWithCancellation(agent, params, signal) {
|
|
|
66237
66247
|
function createClaudeAcpApp(options = {}) {
|
|
66238
66248
|
let agent = null;
|
|
66239
66249
|
const app = acpAgent({ name: "claude-code-acp" }).onConnect((connection) => {
|
|
66240
|
-
agent = new ClaudeAcpAgent(new ClientConnection(connection.client), options.logger, options.environment);
|
|
66250
|
+
agent = new ClaudeAcpAgent(new ClientConnection(connection.client, options.onSessionUpdate), options.logger, options.environment);
|
|
66241
66251
|
options.onConnect?.(connection);
|
|
66242
66252
|
}).onRequest(methods.agent.initialize, (ctx) => requiredAgent(agent).initialize(ctx.params)).onRequest(methods.agent.session.new, (ctx) => requiredAgent(agent).newSession(ctx.params)).onRequest(methods.agent.session.load, (ctx) => requiredAgent(agent).loadSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.fork, (ctx) => requiredAgent(agent).unstable_forkSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.list, (ctx) => requiredAgent(agent).listSessions(ctx.params, ctx.signal)).onRequest(methods.agent.session.delete, (ctx) => requiredAgent(agent).deleteSession(ctx.params)).onRequest(methods.agent.session.resume, (ctx) => requiredAgent(agent).resumeSession(ctx.params)).onRequest(methods.agent.session.close, (ctx) => requiredAgent(agent).closeSession(ctx.params)).onRequest(methods.agent.session.setMode, (ctx) => requiredAgent(agent).setSessionMode(ctx.params)).onRequest(methods.agent.session.setConfigOption, (ctx) => requiredAgent(agent).setSessionConfigOption(ctx.params)).onRequest(methods.agent.authenticate, (ctx) => requiredAgent(agent).authenticate(ctx.params)).onRequest(methods.agent.providers.list, (ctx) => requiredAgent(agent).unstable_listProviders(ctx.params)).onRequest(methods.agent.providers.set, (ctx) => requiredAgent(agent).unstable_setProvider(ctx.params)).onRequest(methods.agent.providers.disable, (ctx) => requiredAgent(agent).unstable_disableProvider(ctx.params)).onRequest(methods.agent.logout, (ctx) => requiredAgent(agent).logout(ctx.params)).onRequest(methods.agent.session.prompt, (ctx) => runPromptWithCancellation(requiredAgent(agent), ctx.params, ctx.signal)).onNotification(methods.agent.session.cancel, (ctx) => requiredAgent(agent).cancel(ctx.params)).onRequest(STEER_METHOD, { parse: parseSteerRequest }, (ctx) => requiredAgent(agent).steer(ctx.params)).onRequest(RENAME_METHOD, { parse: parseRenameRequest }, (ctx) => requiredAgent(agent).renameSession(ctx.params)).onRequest(GOAL_CONTROL_METHOD, { parse: parseGoalRequest }, (ctx) => requiredAgent(agent).goal(ctx.params));
|
|
66243
66253
|
return { agent: () => agent, app };
|
|
@@ -66367,6 +66377,7 @@ var ClaudeAcpEndpoint = class {
|
|
|
66367
66377
|
...options.environment,
|
|
66368
66378
|
CLAUDE_CODE_EXECUTABLE: options.command
|
|
66369
66379
|
}),
|
|
66380
|
+
onSessionUpdate: options.onSessionUpdate,
|
|
66370
66381
|
onConnect: (connection) => {
|
|
66371
66382
|
this.#connection = connection;
|
|
66372
66383
|
}
|
|
@@ -68644,9 +68655,11 @@ var CodexAcpAgent = class {
|
|
|
68644
68655
|
#closePromise = null;
|
|
68645
68656
|
#connection = null;
|
|
68646
68657
|
#settings;
|
|
68658
|
+
#onSessionUpdate;
|
|
68647
68659
|
#nativeSessionId = "";
|
|
68648
68660
|
#sessionAgent;
|
|
68649
68661
|
constructor(options) {
|
|
68662
|
+
this.#onSessionUpdate = options.onSessionUpdate;
|
|
68650
68663
|
this.#appServer = new CodexAppServerClient({
|
|
68651
68664
|
command: options.command,
|
|
68652
68665
|
cwd: options.cwd,
|
|
@@ -68951,7 +68964,7 @@ var CodexAcpAgent = class {
|
|
|
68951
68964
|
if (connection === null || this.#nativeSessionId.length === 0) {
|
|
68952
68965
|
return;
|
|
68953
68966
|
}
|
|
68954
|
-
await
|
|
68967
|
+
await this.#onSessionUpdate({
|
|
68955
68968
|
sessionId: this.#nativeSessionId,
|
|
68956
68969
|
update
|
|
68957
68970
|
});
|
|
@@ -72506,12 +72519,10 @@ function buildStartupInfo(opts) {
|
|
|
72506
72519
|
|
|
72507
72520
|
// src/acp/harness/pi/upstream/dist/acp/client.js
|
|
72508
72521
|
import { methods as methods4 } from "@agentclientprotocol/sdk";
|
|
72509
|
-
function createPiAcpClient(connection) {
|
|
72522
|
+
function createPiAcpClient(connection, onSessionUpdate) {
|
|
72510
72523
|
return {
|
|
72511
72524
|
requestPermission: async (request) => await connection.client.request(methods4.client.session.requestPermission, request),
|
|
72512
|
-
sessionUpdate:
|
|
72513
|
-
await connection.client.notify(methods4.client.session.update, notification);
|
|
72514
|
-
}
|
|
72525
|
+
sessionUpdate: onSessionUpdate
|
|
72515
72526
|
};
|
|
72516
72527
|
}
|
|
72517
72528
|
|
|
@@ -72535,7 +72546,7 @@ var PiAcpEndpoint = class {
|
|
|
72535
72546
|
let piAgent = null;
|
|
72536
72547
|
this.#app = createAgentApp2({ name: "mobius-pi" }).onConnect((connection) => {
|
|
72537
72548
|
this.#connection = connection;
|
|
72538
|
-
piAgent = new PiAcpAgent(createPiAcpClient(connection), { environment });
|
|
72549
|
+
piAgent = new PiAcpAgent(createPiAcpClient(connection, options.onSessionUpdate), { environment });
|
|
72539
72550
|
this.#agent = piAgent;
|
|
72540
72551
|
}).onRequest(
|
|
72541
72552
|
methods5.agent.initialize,
|
|
@@ -72925,13 +72936,15 @@ function writableAcpStream(output2) {
|
|
|
72925
72936
|
});
|
|
72926
72937
|
}
|
|
72927
72938
|
async function probeInProcessReadiness(specification, agent, environment, defaultWorkspace, controller) {
|
|
72939
|
+
const handler = new DiscoveryAcpHandler();
|
|
72928
72940
|
const inProcess = agent.createEndpoint({
|
|
72929
72941
|
command: agent.command,
|
|
72930
72942
|
cwd: defaultWorkspace,
|
|
72931
|
-
environment: { ...filterEnvironment(environment), ...agent.environment }
|
|
72943
|
+
environment: { ...filterEnvironment(environment), ...agent.environment },
|
|
72944
|
+
onSessionUpdate: handler.onUpdate
|
|
72932
72945
|
});
|
|
72933
72946
|
try {
|
|
72934
|
-
const connection = createAcpClient(
|
|
72947
|
+
const connection = createAcpClient(handler).connect(inProcess.app());
|
|
72935
72948
|
try {
|
|
72936
72949
|
return await Promise.race([
|
|
72937
72950
|
(async () => {
|
|
@@ -82037,7 +82050,8 @@ var AgentConnection = class {
|
|
|
82037
82050
|
const inProcess = agent.createEndpoint({
|
|
82038
82051
|
command: agent.command,
|
|
82039
82052
|
cwd,
|
|
82040
|
-
environment: agent.environment
|
|
82053
|
+
environment: agent.environment,
|
|
82054
|
+
onSessionUpdate: client2.onUpdate
|
|
82041
82055
|
});
|
|
82042
82056
|
this.#process = { kind: "in-process", endpoint: inProcess };
|
|
82043
82057
|
this.termination = inProcess.terminated;
|