@episoda/cli 0.2.198 → 0.2.199
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.
|
@@ -3046,7 +3046,7 @@ var require_package = __commonJS({
|
|
|
3046
3046
|
"package.json"(exports2, module2) {
|
|
3047
3047
|
module2.exports = {
|
|
3048
3048
|
name: "@episoda/cli",
|
|
3049
|
-
version: "0.2.
|
|
3049
|
+
version: "0.2.199",
|
|
3050
3050
|
description: "CLI tool for Episoda local development workflow orchestration",
|
|
3051
3051
|
main: "dist/index.js",
|
|
3052
3052
|
types: "dist/index.d.ts",
|
|
@@ -13011,6 +13011,22 @@ function handlePtyKill(payload) {
|
|
|
13011
13011
|
console.warn(`[PTY] Kill failed for ${agent_run_id}; performed fallback cleanup`);
|
|
13012
13012
|
}
|
|
13013
13013
|
}
|
|
13014
|
+
function handlePtyStdin(payload) {
|
|
13015
|
+
const { agent_run_id, module_uid, text } = payload;
|
|
13016
|
+
const target = sessions.get(agent_run_id);
|
|
13017
|
+
if (!target) {
|
|
13018
|
+
return { success: false, error: `No active PTY session found for agent_run_id ${agent_run_id}` };
|
|
13019
|
+
}
|
|
13020
|
+
if (module_uid && target.moduleUid !== module_uid) {
|
|
13021
|
+
return { success: false, error: `PTY session ${agent_run_id} belongs to ${target.moduleUid}, not ${module_uid}` };
|
|
13022
|
+
}
|
|
13023
|
+
try {
|
|
13024
|
+
target.pty.write(`${text.replace(/\n/g, "\r")}\r`);
|
|
13025
|
+
return { success: true };
|
|
13026
|
+
} catch (error) {
|
|
13027
|
+
return { success: false, error: error?.message || "Failed to write PTY stdin" };
|
|
13028
|
+
}
|
|
13029
|
+
}
|
|
13014
13030
|
function createCredentialBootstrap(payload, agentRunId) {
|
|
13015
13031
|
const bootstrap = payload.credential_bootstrap;
|
|
13016
13032
|
if (!bootstrap?.oauth?.access_token) {
|
|
@@ -15207,6 +15223,17 @@ var ProjectMessageRouter = class {
|
|
|
15207
15223
|
handlePtyKill(payload);
|
|
15208
15224
|
}
|
|
15209
15225
|
});
|
|
15226
|
+
client.on("pty_stdin", async (message) => {
|
|
15227
|
+
if (message.type === "pty_stdin") {
|
|
15228
|
+
const payload = message.payload;
|
|
15229
|
+
console.log(`[Daemon] EP1476: Received pty_stdin for run ${payload.agent_run_id}${payload.module_uid ? ` (module ${payload.module_uid})` : ""}`);
|
|
15230
|
+
client.updateActivity();
|
|
15231
|
+
const result = handlePtyStdin(payload);
|
|
15232
|
+
if (!result.success) {
|
|
15233
|
+
console.warn(`[Daemon] EP1476: pty_stdin failed for run ${payload.agent_run_id}: ${result.error}`);
|
|
15234
|
+
}
|
|
15235
|
+
}
|
|
15236
|
+
});
|
|
15210
15237
|
}
|
|
15211
15238
|
};
|
|
15212
15239
|
|