agent-office-cli 0.0.1 → 0.1.0
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/package.json +1 -1
- package/src/runtime/pty-manager.js +15 -4
- package/src/server.js +1 -5
- package/src/web/index.js +0 -7
- package/src/web/public/app.js +0 -713
- package/src/web/public/dashboard.html +0 -245
- package/src/web/public/index.html +0 -84
- package/src/web/public/login.css +0 -833
- package/src/web/public/login.html +0 -28
- package/src/web/public/office.html +0 -22
- package/src/web/public/register.html +0 -316
- package/src/web/public/styles.css +0 -988
package/package.json
CHANGED
|
@@ -349,11 +349,22 @@ function createPtyManager({ store }) {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
const
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
const provider = getProvider(session.provider);
|
|
353
|
+
const reconcileResult = provider.reconcileSession(session, { sessions: currentSessions });
|
|
354
|
+
// Only run screen-based classifyOutput when the session has no transcript-driven state.
|
|
355
|
+
// For providers like Codex that use a transcript (codexSessionPath set), classifyOutput
|
|
356
|
+
// on the raw terminal text is unreliable and fights the transcript state machine, causing
|
|
357
|
+
// the session to flicker between "attention" and "idle" every polling tick.
|
|
358
|
+
const hasTranscriptState = Boolean(session.meta && session.meta.codexSessionPath);
|
|
359
|
+
if (!hasTranscriptState && (!reconcileResult || !reconcileResult.state)) {
|
|
360
|
+
const screen = await capturePane(runtime.tmuxSession);
|
|
361
|
+
const nextState = runtime.provider.classifyOutput(screen, store.getSession(session.sessionId));
|
|
362
|
+
if (nextState && nextState !== session.displayState) {
|
|
363
|
+
store.setSessionState(session.sessionId, nextState, { status: "running" });
|
|
364
|
+
}
|
|
356
365
|
}
|
|
366
|
+
applyProviderReconcile(session, reconcileResult);
|
|
367
|
+
continue;
|
|
357
368
|
}
|
|
358
369
|
|
|
359
370
|
const provider = getProvider(session.provider);
|
package/src/server.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
const http = require("node:http");
|
|
2
|
-
const path = require("node:path");
|
|
3
2
|
const express = require("express");
|
|
4
3
|
const { WebSocketServer } = require("ws");
|
|
5
|
-
const { STATIC_DIR } = require("./web");
|
|
6
4
|
const auth = require("./auth");
|
|
7
5
|
|
|
8
6
|
function createAppServer({ host, port, store, ptyManager }) {
|
|
@@ -37,7 +35,7 @@ function createAppServer({ host, port, store, ptyManager }) {
|
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
function sendOfficeShell(res) {
|
|
40
|
-
res.
|
|
38
|
+
res.status(404).json({ error: "no_web_ui" });
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
app.use((req, res, next) => {
|
|
@@ -110,8 +108,6 @@ function createAppServer({ host, port, store, ptyManager }) {
|
|
|
110
108
|
sendOfficeShell(res);
|
|
111
109
|
});
|
|
112
110
|
|
|
113
|
-
app.use(express.static(STATIC_DIR, { index: false }));
|
|
114
|
-
|
|
115
111
|
app.get("/api/health", (_req, res) => {
|
|
116
112
|
res.json({ ok: true });
|
|
117
113
|
});
|