@xingular/harness 0.1.1 → 0.1.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.
package/dist/terminal-pi.js
CHANGED
|
@@ -202,7 +202,7 @@ async function piExtension_default(pi) {
|
|
|
202
202
|
if (command?.type === "interrupt") context?.abort();
|
|
203
203
|
else if (command?.type === "send") {
|
|
204
204
|
if (context?.ui.getEditorText().trim()) throw new Error("The terminal contains a user draft.");
|
|
205
|
-
pi.sendUserMessage(command.text);
|
|
205
|
+
pi.sendUserMessage(command.text, context?.isIdle() === false ? { deliverAs: "followUp" } : void 0);
|
|
206
206
|
}
|
|
207
207
|
}).catch(() => {
|
|
208
208
|
context?.abort();
|
|
@@ -218,7 +218,7 @@ async function piExtension_default(pi) {
|
|
|
218
218
|
usage = emptyUsage();
|
|
219
219
|
reasoningTokens = void 0;
|
|
220
220
|
costReported = false;
|
|
221
|
-
await terminalCall("begin", { text: event.prompt });
|
|
221
|
+
await terminalCall("begin", { text: event.messageType === "user" ? event.prompt : "" });
|
|
222
222
|
});
|
|
223
223
|
pi.on("message_end", async (event) => {
|
|
224
224
|
if (event.message.role !== "assistant") return;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingular/harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Xingular Harness
|
|
5
|
+
"description": "Xingular Harness — a Pi agent harness with multi-account sign-in, a compiled system prompt, a memory lifecycle (Wiki), tools, MCP, and skills",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts",
|
|
8
8
|
"./*": "./src/*"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"prove": "npm run build && node scripts/prove-standalone.mjs"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
21
|
+
"@earendil-works/pi-coding-agent": "1.2.0",
|
|
22
22
|
"@modelcontextprotocol/client": "^2.2.0",
|
|
23
23
|
"@modelcontextprotocol/server": "^2.2.0",
|
|
24
24
|
"typebox": "^1.3.7",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"vitest": "^3.2.4"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": ">=22.
|
|
35
|
+
"node": ">=22.19"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"src",
|
|
@@ -86,7 +86,8 @@ export default async function (pi: ExtensionAPI) {
|
|
|
86
86
|
if (command?.type === 'interrupt') context?.abort()
|
|
87
87
|
else if (command?.type === 'send') {
|
|
88
88
|
if (context?.ui.getEditorText().trim()) throw new Error('The terminal contains a user draft.')
|
|
89
|
-
|
|
89
|
+
// Pi 1.2 needs deliverAs while a run is busy; a message sent then waits for that run to finish.
|
|
90
|
+
pi.sendUserMessage(command.text!, context?.isIdle() === false ? { deliverAs: 'followUp' } : undefined)
|
|
90
91
|
}
|
|
91
92
|
})
|
|
92
93
|
.catch(() => {
|
|
@@ -104,7 +105,8 @@ export default async function (pi: ExtensionAPI) {
|
|
|
104
105
|
usage = emptyUsage()
|
|
105
106
|
reasoningTokens = undefined
|
|
106
107
|
costReported = false
|
|
107
|
-
|
|
108
|
+
// A run a plugin starts with a custom message has no user prompt to record; it still begins a turn.
|
|
109
|
+
await terminalCall('begin', { text: event.messageType === 'user' ? event.prompt : '' })
|
|
108
110
|
})
|
|
109
111
|
pi.on('message_end', async (event) => {
|
|
110
112
|
if (event.message.role !== 'assistant') return
|