@proagentstore/cli 0.2.1 → 0.2.2
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.
|
@@ -83,7 +83,7 @@ export class HeadlessSession {
|
|
|
83
83
|
input(text) {
|
|
84
84
|
if (!this.alive)
|
|
85
85
|
this.start();
|
|
86
|
-
this.push(`\n❯ ${text}`); // ❯ — your turn,
|
|
86
|
+
this.push(`\n❯ [${stamp()}] ${text}`); // ❯ — your turn, timestamped
|
|
87
87
|
this.run = "thinking";
|
|
88
88
|
const msg = JSON.stringify({ type: "user", message: { role: "user", content: [{ type: "text", text }] } });
|
|
89
89
|
try {
|
|
@@ -148,7 +148,7 @@ export class HeadlessSession {
|
|
|
148
148
|
case "assistant":
|
|
149
149
|
for (const block of ev.message?.content ?? []) {
|
|
150
150
|
if (block.type === "text" && typeof block.text === "string" && block.text.trim()) {
|
|
151
|
-
this.push(block.text.trim());
|
|
151
|
+
this.push(`[${stamp()}] ${block.text.trim()}`); // timestamped agent reply
|
|
152
152
|
}
|
|
153
153
|
else if (block.type === "tool_use") {
|
|
154
154
|
this.push(`⚙ ${String(block.name ?? "tool")} ${shortInput(block.input)}`); // ⚙
|
|
@@ -177,6 +177,10 @@ export class HeadlessSession {
|
|
|
177
177
|
this.transcript.push(line);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
+
/** Local wall-clock "HH:MM:SS" for transcript timestamps (runner is a Node process). */
|
|
181
|
+
function stamp() {
|
|
182
|
+
return new Date().toTimeString().slice(0, 8);
|
|
183
|
+
}
|
|
180
184
|
/** Compact a tool_use input object to a single readable line. */
|
|
181
185
|
function shortInput(input) {
|
|
182
186
|
if (input == null)
|