chatroom-cli 1.65.4 → 1.65.6
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/index.js +19 -5
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36598,6 +36598,7 @@ var init_opencode_sdk_agent_service = __esm(() => {
|
|
|
36598
36598
|
OpenCodeSdkAgentService = class OpenCodeSdkAgentService extends OpenCodeBinaryAgentService {
|
|
36599
36599
|
agentEndCallbacksByPid = new Map;
|
|
36600
36600
|
assistantTextCallbacksByPid = new Map;
|
|
36601
|
+
outputCallbacksByPid = new Map;
|
|
36601
36602
|
id = "opencode-sdk";
|
|
36602
36603
|
displayName = "OpenCode (SDK)";
|
|
36603
36604
|
listModelsHarnessId = "opencode-sdk";
|
|
@@ -36638,7 +36639,7 @@ var init_opencode_sdk_agent_service = __esm(() => {
|
|
|
36638
36639
|
await super.stop(pid);
|
|
36639
36640
|
}
|
|
36640
36641
|
spawnServeProcess(workingDir, resolvedConvexUrl) {
|
|
36641
|
-
const childProcess = this.deps.spawn(OPENCODE_COMMAND2, ["serve", "--print-logs"], {
|
|
36642
|
+
const childProcess = this.deps.spawn(OPENCODE_COMMAND2, ["serve", "--print-logs", "--log-level", "WARN"], {
|
|
36642
36643
|
cwd: workingDir,
|
|
36643
36644
|
stdio: ["pipe", "pipe", "pipe"],
|
|
36644
36645
|
shell: false,
|
|
@@ -36677,7 +36678,8 @@ var init_opencode_sdk_agent_service = __esm(() => {
|
|
|
36677
36678
|
}
|
|
36678
36679
|
if (childProcess.stderr) {
|
|
36679
36680
|
const stderrBuffer = new StderrLineBuffer((line) => {
|
|
36680
|
-
|
|
36681
|
+
if (!isInfoLine(line))
|
|
36682
|
+
emitLogLine(line);
|
|
36681
36683
|
});
|
|
36682
36684
|
childProcess.stderr.on("data", (chunk2) => {
|
|
36683
36685
|
entry.lastOutputAt = Date.now();
|
|
@@ -36734,6 +36736,9 @@ var init_opencode_sdk_agent_service = __esm(() => {
|
|
|
36734
36736
|
if (args2.assistantTextCallbacks) {
|
|
36735
36737
|
this.assistantTextCallbacksByPid.set(pid, args2.assistantTextCallbacks);
|
|
36736
36738
|
}
|
|
36739
|
+
if (args2.outputCallbacks) {
|
|
36740
|
+
this.outputCallbacksByPid.set(pid, args2.outputCallbacks);
|
|
36741
|
+
}
|
|
36737
36742
|
const outputCallbacks = args2.outputCallbacks ?? [];
|
|
36738
36743
|
this.wireChildOutput(childProcess, pid, entry, emitLogLine, outputCallbacks);
|
|
36739
36744
|
return {
|
|
@@ -36753,6 +36758,7 @@ var init_opencode_sdk_agent_service = __esm(() => {
|
|
|
36753
36758
|
this.sessionStore.remove(sessionId);
|
|
36754
36759
|
this.agentEndCallbacksByPid.delete(pid);
|
|
36755
36760
|
this.assistantTextCallbacksByPid.delete(pid);
|
|
36761
|
+
this.outputCallbacksByPid.delete(pid);
|
|
36756
36762
|
this.deleteProcess(pid);
|
|
36757
36763
|
cb({ code: code2, signal, context: context5 });
|
|
36758
36764
|
});
|
|
@@ -36842,13 +36848,20 @@ var init_opencode_sdk_agent_service = __esm(() => {
|
|
|
36842
36848
|
throw new Error("Failed to create session during resume fallback");
|
|
36843
36849
|
}
|
|
36844
36850
|
const newSessionId2 = sessionCreateResult.data.id;
|
|
36851
|
+
const { emitLogLine } = this.createLogLineEmitter();
|
|
36852
|
+
const pidOutputCallbacks = this.outputCallbacksByPid.get(args2.pid) ?? [];
|
|
36845
36853
|
const forwarder = startSessionEventForwarder(client4, {
|
|
36846
36854
|
sessionId: newSessionId2,
|
|
36847
36855
|
role: args2.context.role,
|
|
36856
|
+
onLogLine: emitLogLine,
|
|
36848
36857
|
onAssistantText: (text) => {
|
|
36849
36858
|
const callbacks2 = this.assistantTextCallbacksByPid.get(args2.pid) ?? [];
|
|
36850
36859
|
for (const cb of callbacks2)
|
|
36851
36860
|
cb(text);
|
|
36861
|
+
},
|
|
36862
|
+
onActivity: () => {
|
|
36863
|
+
for (const cb of pidOutputCallbacks)
|
|
36864
|
+
cb();
|
|
36852
36865
|
}
|
|
36853
36866
|
});
|
|
36854
36867
|
const callbacks = this.agentEndCallbacksByPid.get(args2.pid) ?? [];
|
|
@@ -87151,7 +87164,7 @@ class OpencodeSdkHarness {
|
|
|
87151
87164
|
}
|
|
87152
87165
|
}
|
|
87153
87166
|
var OPENCODE_COMMAND3 = "opencode", SERVE_STARTUP_TIMEOUT_MS2 = 1e4, startOpencodeSdkHarness = async (config3) => {
|
|
87154
|
-
const childProcess = spawn5(OPENCODE_COMMAND3, ["serve", "--print-logs"], {
|
|
87167
|
+
const childProcess = spawn5(OPENCODE_COMMAND3, ["serve", "--print-logs", "--log-level", "WARN"], {
|
|
87155
87168
|
cwd: config3.workingDir,
|
|
87156
87169
|
stdio: ["pipe", "pipe", "pipe"],
|
|
87157
87170
|
shell: false,
|
|
@@ -93092,7 +93105,8 @@ var init_participant = __esm(() => {
|
|
|
93092
93105
|
"task.acknowledged",
|
|
93093
93106
|
"task.inProgress",
|
|
93094
93107
|
"task.completed",
|
|
93095
|
-
"agent.requestStop"
|
|
93108
|
+
"agent.requestStop",
|
|
93109
|
+
"agent.awaitingHandoff"
|
|
93096
93110
|
]);
|
|
93097
93111
|
});
|
|
93098
93112
|
|
|
@@ -111457,4 +111471,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
111457
111471
|
});
|
|
111458
111472
|
program2.parse();
|
|
111459
111473
|
|
|
111460
|
-
//# debugId=
|
|
111474
|
+
//# debugId=8E7C236B7CEE28C564756E2164756E21
|