@rallycry/conveyor-agent 11.0.36 → 11.0.37
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/{chunk-PLDR42JP.js → chunk-DINRKS2I.js} +32 -3
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2265,6 +2265,23 @@ function createChatRecordMapper(rootDir) {
|
|
|
2265
2265
|
};
|
|
2266
2266
|
}
|
|
2267
2267
|
|
|
2268
|
+
// src/harness/pty/prompt-receipt.ts
|
|
2269
|
+
function isPromptReceipt(raw, text, sentAt) {
|
|
2270
|
+
if (!text || !raw || typeof raw !== "object") return false;
|
|
2271
|
+
const record = raw;
|
|
2272
|
+
if (record.type !== "user" || typeof record.timestamp !== "string") return false;
|
|
2273
|
+
if (!(Date.parse(record.timestamp) >= sentAt)) return false;
|
|
2274
|
+
if (!record.message || typeof record.message !== "object") return false;
|
|
2275
|
+
const message = record.message;
|
|
2276
|
+
const submitted = receiptText(message.content);
|
|
2277
|
+
const normalize2 = (value) => value.replace(/\r\n/g, "\n").trim();
|
|
2278
|
+
return message.role === "user" && typeof submitted === "string" && normalize2(text) !== "" && normalize2(submitted) === normalize2(text);
|
|
2279
|
+
}
|
|
2280
|
+
function receiptText(content) {
|
|
2281
|
+
const block = Array.isArray(content) && content.length === 1 ? content[0] : void 0;
|
|
2282
|
+
return typeof content === "string" ? content : block?.type === "text" && typeof block.text === "string" ? block.text : void 0;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2268
2285
|
// src/harness/pty/output-coalescer.ts
|
|
2269
2286
|
var DEFAULT_FLUSH_MS = 40;
|
|
2270
2287
|
var DEFAULT_MAX_BUFFER_CHARS = 48 * 1024;
|
|
@@ -3215,6 +3232,8 @@ var PtySession = class {
|
|
|
3215
3232
|
turn;
|
|
3216
3233
|
codexPromptInArgv = false;
|
|
3217
3234
|
codexInitialPrompt;
|
|
3235
|
+
awaitingPromptReceipt;
|
|
3236
|
+
promptReceiptSeen = false;
|
|
3218
3237
|
/** A fresh CLI intentionally started without input for checkout overlap. */
|
|
3219
3238
|
prewarmed = false;
|
|
3220
3239
|
codexSource = null;
|
|
@@ -3386,6 +3405,8 @@ var PtySession = class {
|
|
|
3386
3405
|
}
|
|
3387
3406
|
/** Reset per-turn state shared by beginTurn/beginPassiveTurn. */
|
|
3388
3407
|
resetForTurn() {
|
|
3408
|
+
this.promptReceiptSeen = false;
|
|
3409
|
+
this.awaitingPromptReceipt = void 0;
|
|
3389
3410
|
this.sawResult = false;
|
|
3390
3411
|
this.lastTurnCleanResult = false;
|
|
3391
3412
|
this.passiveSignaled = false;
|
|
@@ -3661,11 +3682,10 @@ var PtySession = class {
|
|
|
3661
3682
|
const transcriptPath = sessionTranscriptPath(this.options.cwd, sessionId);
|
|
3662
3683
|
await mkdir3(dirname(transcriptPath), { recursive: true });
|
|
3663
3684
|
const startOffset = this.resume ? await transcriptSize(transcriptPath) : 0;
|
|
3664
|
-
const wantsRawRecords = typeof this.bridge?.sendChatEvent === "function" || typeof this.bridge?.notifyBackgroundTaskDone === "function";
|
|
3665
3685
|
this.tailer = new JsonlTailer(
|
|
3666
3686
|
transcriptPath,
|
|
3667
3687
|
(event) => this.handleTranscriptEvent(event),
|
|
3668
|
-
|
|
3688
|
+
(raw) => this.handleRawRecord(raw)
|
|
3669
3689
|
);
|
|
3670
3690
|
this.tailer.start(startOffset);
|
|
3671
3691
|
return { settingsPath, socketPath };
|
|
@@ -3676,6 +3696,12 @@ var PtySession = class {
|
|
|
3676
3696
|
* backgrounded gate/subagent just finished) and the chat-proxy projection.
|
|
3677
3697
|
*/
|
|
3678
3698
|
handleRawRecord(raw) {
|
|
3699
|
+
const pending = this.awaitingPromptReceipt;
|
|
3700
|
+
if (pending && isPromptReceipt(raw, pending.text, pending.sentAt)) {
|
|
3701
|
+
this.promptReceiptSeen = true;
|
|
3702
|
+
this.awaitingPromptReceipt = void 0;
|
|
3703
|
+
this.disarmSubmitNudge();
|
|
3704
|
+
}
|
|
3679
3705
|
const completion = backgroundTaskCompletion(raw);
|
|
3680
3706
|
if (completion) this.bridge?.notifyBackgroundTaskDone?.(completion.taskId);
|
|
3681
3707
|
if (typeof this.bridge?.sendChatEvent === "function") this.relayChatRecord(raw);
|
|
@@ -4010,11 +4036,14 @@ var PtySession = class {
|
|
|
4010
4036
|
}
|
|
4011
4037
|
this.writeStdin(this.adapter.encodePromptBytes(text));
|
|
4012
4038
|
if (this.turn.promptDelivery === "prefill") return;
|
|
4039
|
+
this.promptReceiptSeen = false;
|
|
4040
|
+
this.awaitingPromptReceipt = { text, sentAt: Date.now() };
|
|
4013
4041
|
this.deliveredTexts.push(text);
|
|
4014
4042
|
await sleep(resolveSubmitSettleMs());
|
|
4015
4043
|
if (this._toreDown) return;
|
|
4016
4044
|
this.writeStdin("\r");
|
|
4017
|
-
if (this.adapter.capabilities.structuredEvents
|
|
4045
|
+
if (this.adapter.capabilities.structuredEvents && !this.promptReceiptSeen)
|
|
4046
|
+
this.armSubmitNudge();
|
|
4018
4047
|
}
|
|
4019
4048
|
async feedPrompt() {
|
|
4020
4049
|
if (typeof this.turnPrompt === "string") {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rallycry/conveyor-agent",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.37",
|
|
4
4
|
"description": "Conveyor Agent Runner v10 - PTY harness for the task chat (SDK harness for audit/project-chat). Agent-as-User architecture with BaseService patterns. Works locally too.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|