@moxt-ai/mobius 0.0.296 → 0.0.298
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/harness/codex/items.d.ts +1 -1
- package/dist/acp/harness/codex/items.js +2 -2
- package/dist/acp/harness/codex/owned-agent.d.ts.map +1 -1
- package/dist/acp/harness/codex/owned-agent.js +15 -6
- package/dist/acp/harness/codex/owned-agent.js.map +1 -1
- package/dist/acp/native-history/codex/codex-history.d.ts.map +1 -1
- package/dist/acp/native-history/codex/codex-history.js +1 -23
- package/dist/acp/native-history/codex/codex-history.js.map +1 -1
- package/dist/cli.js +18 -31
- package/dist/cli.js.map +2 -2
- package/dist/runtime.js +18 -31
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -22582,7 +22582,7 @@ import { fetch as fetch3 } from "undici";
|
|
|
22582
22582
|
// package.json
|
|
22583
22583
|
var package_default = {
|
|
22584
22584
|
name: "@moxt-ai/mobius",
|
|
22585
|
-
version: "0.0.
|
|
22585
|
+
version: "0.0.298",
|
|
22586
22586
|
description: "Mobius CLI for pairing and running local AI agent services.",
|
|
22587
22587
|
type: "module",
|
|
22588
22588
|
bin: {
|
|
@@ -67456,7 +67456,7 @@ function reasoningText(item) {
|
|
|
67456
67456
|
if (item.type !== "reasoning") {
|
|
67457
67457
|
return null;
|
|
67458
67458
|
}
|
|
67459
|
-
return boundedParagraphs(item.
|
|
67459
|
+
return boundedParagraphs(item.content.length > 0 ? item.content : item.summary, TOOL_OUTPUT_CHARACTER_LIMIT);
|
|
67460
67460
|
}
|
|
67461
67461
|
|
|
67462
67462
|
// src/acp/harness/codex/borrowed-agent.ts
|
|
@@ -67836,7 +67836,7 @@ var CodexOwnedAcpAgent = class {
|
|
|
67836
67836
|
#context;
|
|
67837
67837
|
#appServer;
|
|
67838
67838
|
#settings;
|
|
67839
|
-
#
|
|
67839
|
+
#streamedReasoningSources = /* @__PURE__ */ new Map();
|
|
67840
67840
|
#agentMessages = /* @__PURE__ */ new Map();
|
|
67841
67841
|
#turn = null;
|
|
67842
67842
|
#nativeTurnId = null;
|
|
@@ -68044,7 +68044,12 @@ var CodexOwnedAcpAgent = class {
|
|
|
68044
68044
|
if (method === "item/reasoning/summaryTextDelta" || method === "item/reasoning/textDelta") {
|
|
68045
68045
|
const decoded = reasoningTextDeltaParamsSchema.safeParse(params);
|
|
68046
68046
|
if (decoded.success && decoded.data.threadId === this.#context.threadId() && this.#turn !== null && decoded.data.turnId === this.#turn.turn.id && decoded.data.delta.length > 0) {
|
|
68047
|
-
|
|
68047
|
+
const source = method === "item/reasoning/textDelta" ? "content" : "summary";
|
|
68048
|
+
const previous = this.#streamedReasoningSources.get(decoded.data.itemId);
|
|
68049
|
+
this.#streamedReasoningSources.set(
|
|
68050
|
+
decoded.data.itemId,
|
|
68051
|
+
previous === "content" || source === "content" ? "content" : "summary"
|
|
68052
|
+
);
|
|
68048
68053
|
await this.#enqueue(async () => {
|
|
68049
68054
|
await this.#context.emit({
|
|
68050
68055
|
content: { text: decoded.data.delta, type: "text" },
|
|
@@ -68112,8 +68117,12 @@ var CodexOwnedAcpAgent = class {
|
|
|
68112
68117
|
}
|
|
68113
68118
|
const reasoning = reasoningText(item);
|
|
68114
68119
|
if (reasoning !== null) {
|
|
68115
|
-
const
|
|
68116
|
-
if (method === "item/completed"
|
|
68120
|
+
const streamedSource = method === "item/completed" ? this.#streamedReasoningSources.get(item.id) : void 0;
|
|
68121
|
+
if (method === "item/completed") {
|
|
68122
|
+
this.#streamedReasoningSources.delete(item.id);
|
|
68123
|
+
}
|
|
68124
|
+
const needsCompletedContent = method === "item/completed" && reasoning.length > 0 && (streamedSource === void 0 || streamedSource === "summary" && item.type === "reasoning" && item.content.length > 0);
|
|
68125
|
+
if (needsCompletedContent) {
|
|
68117
68126
|
await this.#enqueue(async () => {
|
|
68118
68127
|
await this.#context.emit({
|
|
68119
68128
|
content: { text: reasoning, type: "text" },
|
|
@@ -68265,7 +68274,7 @@ var CodexOwnedAcpAgent = class {
|
|
|
68265
68274
|
signal.addEventListener("abort", aborted2, { once: true });
|
|
68266
68275
|
const turn = { completion, turn: { id: "" } };
|
|
68267
68276
|
this.#agentMessages.clear();
|
|
68268
|
-
this.#
|
|
68277
|
+
this.#streamedReasoningSources.clear();
|
|
68269
68278
|
this.#turn = turn;
|
|
68270
68279
|
this.#nativeTurnId = null;
|
|
68271
68280
|
try {
|
|
@@ -68290,7 +68299,7 @@ var CodexOwnedAcpAgent = class {
|
|
|
68290
68299
|
if (this.#turn === turn) {
|
|
68291
68300
|
this.#turn = null;
|
|
68292
68301
|
this.#agentMessages.clear();
|
|
68293
|
-
this.#
|
|
68302
|
+
this.#streamedReasoningSources.clear();
|
|
68294
68303
|
}
|
|
68295
68304
|
}
|
|
68296
68305
|
};
|
|
@@ -75447,31 +75456,9 @@ function decodeHistory(thread, value, options) {
|
|
|
75447
75456
|
text: text2
|
|
75448
75457
|
});
|
|
75449
75458
|
} else if (historyItem.type === "agentMessage") {
|
|
75450
|
-
if (historyItem.phase === "commentary") {
|
|
75451
|
-
if (historyItem.text.length > 0) {
|
|
75452
|
-
append({
|
|
75453
|
-
activities: [
|
|
75454
|
-
activity(historyItem.id ?? `reasoning-${sequence.toString()}`, "reasoning", sequence, {
|
|
75455
|
-
input: "",
|
|
75456
|
-
locations: [],
|
|
75457
|
-
name: "",
|
|
75458
|
-
output: historyItem.text,
|
|
75459
|
-
status: "completed",
|
|
75460
|
-
title: "Reasoning",
|
|
75461
|
-
toolKind: "think"
|
|
75462
|
-
})
|
|
75463
|
-
],
|
|
75464
|
-
content: [],
|
|
75465
|
-
role: "assistant",
|
|
75466
|
-
text: ""
|
|
75467
|
-
});
|
|
75468
|
-
sequence += 1;
|
|
75469
|
-
}
|
|
75470
|
-
continue;
|
|
75471
|
-
}
|
|
75472
75459
|
append({ activities: [], content: [], role: "assistant", text: historyItem.text });
|
|
75473
75460
|
} else if (historyItem.type === "reasoning") {
|
|
75474
|
-
const output2 = (historyItem.
|
|
75461
|
+
const output2 = (historyItem.content.length > 0 ? historyItem.content : historyItem.summary).join(
|
|
75475
75462
|
"\n\n"
|
|
75476
75463
|
);
|
|
75477
75464
|
if (output2.length > 0) {
|