@q-agent/agent 0.1.26 → 0.1.27
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/src/runner.js +8 -1
- package/dist/src/ui.js +5 -1
- package/package.json +1 -1
package/dist/src/runner.js
CHANGED
|
@@ -1100,10 +1100,17 @@ async function processAuthoringJob(cfg, job) {
|
|
|
1100
1100
|
// (#420), so abort the local Claude run immediately instead of burning the
|
|
1101
1101
|
// rest of the budget on work whose result will be rejected anyway.
|
|
1102
1102
|
let aborted = false;
|
|
1103
|
+
// AGENT LOG mirrors the web trail's Settings verbosity (#438): in "concise"
|
|
1104
|
+
// (default) skip the raw tool/Bash step lines (▷ …) so the local log shows
|
|
1105
|
+
// only Claude's readable narration. The server WS still gets every line — the
|
|
1106
|
+
// web filters its own stream — and abort-on-stop keys on those posts.
|
|
1107
|
+
const conciseLog = (job.logVerbosity ?? "concise") === "concise";
|
|
1103
1108
|
const emitStep = (line) => {
|
|
1104
1109
|
const trimmed = line.length > 300 ? line.slice(0, 300) + "…" : line;
|
|
1105
1110
|
console.log(`[authoring ${job.caseId}] ${trimmed}`);
|
|
1106
|
-
(
|
|
1111
|
+
if (!(conciseLog && trimmed.trimStart().startsWith("▷"))) {
|
|
1112
|
+
(0, bus_1.emit)("authoring-step", { caseId: job.caseId, line: trimmed });
|
|
1113
|
+
}
|
|
1107
1114
|
void api
|
|
1108
1115
|
.postAuthoringEventAlive(cfg, job.sessionId, "authoring.progress", {
|
|
1109
1116
|
case: job.caseId, phase: "step", message: trimmed,
|
package/dist/src/ui.js
CHANGED
|
@@ -497,6 +497,7 @@ function renderCells(){
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
function timeStr(ts){ return new Date(ts).toTimeString().slice(0,8); }
|
|
500
|
+
var LOG_EMPTY_HTML = '<div id="logEmptyPh" style="color:#5c5c6e;padding:2px 0;line-height:1.7">Ready \\u00b7 waiting for activity\\u2026<br><span style="color:#4c4c5a;font-size:10.5px">Runs, live-authoring and self-heal will stream here.</span></div>';
|
|
500
501
|
function logColor(t){
|
|
501
502
|
if (t === "error" || t === "auth-error") return "#ff9ea1";
|
|
502
503
|
if (t === "auth-waiting") return "#fbbf24";
|
|
@@ -524,6 +525,7 @@ function logMsg(ev){
|
|
|
524
525
|
function addLog(ev){
|
|
525
526
|
if (ev.type === "agent-status") return; // status events aren't log lines; pill is driven by view state
|
|
526
527
|
var msg = logMsg(ev); if (!msg) return;
|
|
528
|
+
var ph = document.getElementById("logEmptyPh"); if (ph) ph.remove(); // first real line clears the placeholder
|
|
527
529
|
var row = document.createElement("div");
|
|
528
530
|
row.style.cssText = "display:flex;gap:10px;animation:logIn .4s ease both";
|
|
529
531
|
var t = document.createElement("span"); t.style.cssText = "color:#5c5c6e;flex-shrink:0"; t.textContent = timeStr(ev.ts);
|
|
@@ -582,7 +584,9 @@ function showConnected(s){
|
|
|
582
584
|
el("sessionId").textContent = "device #" + (s.deviceId==null?"?":s.deviceId);
|
|
583
585
|
// The SSE stream replays the recent-events buffer on connect, so seed the log
|
|
584
586
|
// ONLY from the stream (seeding from /api/state too would double every line).
|
|
585
|
-
|
|
587
|
+
// Show a placeholder until the first line arrives so an idle/just-reconnected
|
|
588
|
+
// agent reads as "ready & waiting", not a broken empty panel (#agent-log-empty).
|
|
589
|
+
el("log").innerHTML = LOG_EMPTY_HTML; openStream();
|
|
586
590
|
}
|
|
587
591
|
function refresh(){
|
|
588
592
|
fetch("/api/state").then(function(r){ return r.json(); }).then(function(s){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@q-agent/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "Q-Agent Local Agent — claims execution jobs from the Q-Agent server and runs Playwright locally, so manual login/MFA happens on the user's own machine and session credentials never leave it.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"bin": {
|