@oh-my-pi/pi-coding-agent 16.0.6 → 16.0.7
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/CHANGELOG.md +7 -0
- package/dist/cli.js +77 -69
- package/package.json +12 -12
- package/src/session/agent-session.ts +13 -0
- package/src/slash-commands/builtin-registry.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "16.0.
|
|
4
|
+
"version": "16.0.7",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
48
48
|
"@babel/parser": "^7.29.7",
|
|
49
49
|
"@mozilla/readability": "^0.6.0",
|
|
50
|
-
"@oh-my-pi/hashline": "16.0.
|
|
51
|
-
"@oh-my-pi/omp-stats": "16.0.
|
|
52
|
-
"@oh-my-pi/pi-agent-core": "16.0.
|
|
53
|
-
"@oh-my-pi/pi-ai": "16.0.
|
|
54
|
-
"@oh-my-pi/pi-catalog": "16.0.
|
|
55
|
-
"@oh-my-pi/pi-mnemopi": "16.0.
|
|
56
|
-
"@oh-my-pi/pi-natives": "16.0.
|
|
57
|
-
"@oh-my-pi/pi-tui": "16.0.
|
|
58
|
-
"@oh-my-pi/pi-utils": "16.0.
|
|
59
|
-
"@oh-my-pi/pi-wire": "16.0.
|
|
60
|
-
"@oh-my-pi/snapcompact": "16.0.
|
|
50
|
+
"@oh-my-pi/hashline": "16.0.7",
|
|
51
|
+
"@oh-my-pi/omp-stats": "16.0.7",
|
|
52
|
+
"@oh-my-pi/pi-agent-core": "16.0.7",
|
|
53
|
+
"@oh-my-pi/pi-ai": "16.0.7",
|
|
54
|
+
"@oh-my-pi/pi-catalog": "16.0.7",
|
|
55
|
+
"@oh-my-pi/pi-mnemopi": "16.0.7",
|
|
56
|
+
"@oh-my-pi/pi-natives": "16.0.7",
|
|
57
|
+
"@oh-my-pi/pi-tui": "16.0.7",
|
|
58
|
+
"@oh-my-pi/pi-utils": "16.0.7",
|
|
59
|
+
"@oh-my-pi/pi-wire": "16.0.7",
|
|
60
|
+
"@oh-my-pi/snapcompact": "16.0.7",
|
|
61
61
|
"@opentelemetry/api": "^1.9.1",
|
|
62
62
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
63
63
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
@@ -2499,6 +2499,13 @@ export class AgentSession {
|
|
|
2499
2499
|
});
|
|
2500
2500
|
this.#retryAttempt = 0;
|
|
2501
2501
|
}
|
|
2502
|
+
if (assistantMsg.provider === "opencode-go") {
|
|
2503
|
+
this.#modelRegistry.authStorage.recordUsageCost(assistantMsg.provider, assistantMsg.usage.cost.total, {
|
|
2504
|
+
sessionId: this.#activeProviderSessionId(),
|
|
2505
|
+
recordedAt: assistantMsg.timestamp,
|
|
2506
|
+
baseUrl: this.#modelRegistry.getProviderBaseUrl?.(assistantMsg.provider),
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2502
2509
|
}
|
|
2503
2510
|
if (event.message.role === "toolResult") {
|
|
2504
2511
|
const { toolName, details, isError, content } = event.message as {
|
|
@@ -9683,6 +9690,7 @@ export class AgentSession {
|
|
|
9683
9690
|
|
|
9684
9691
|
if (this.#isClassifierRefusal(message)) return true;
|
|
9685
9692
|
if (this.#isProviderErrorFinishReasonBeforeToolUse(message)) return true;
|
|
9693
|
+
if (this.#isMalformedFunctionCallError(message)) return true;
|
|
9686
9694
|
if (this.#streamInterruptedAfterObservableOutput(message)) return false;
|
|
9687
9695
|
if (this.#isStaleOpenAIResponsesReplayError(message)) return true;
|
|
9688
9696
|
|
|
@@ -9733,6 +9741,11 @@ export class AgentSession {
|
|
|
9733
9741
|
return /\bProvider (?:returned error finish_reason|finish_reason:\s*error)\b/i.test(message.errorMessage);
|
|
9734
9742
|
}
|
|
9735
9743
|
|
|
9744
|
+
#isMalformedFunctionCallError(message: AssistantMessage): boolean {
|
|
9745
|
+
if (!message.errorMessage) return false;
|
|
9746
|
+
return /\bmalformed.?function.?call\b/i.test(message.errorMessage);
|
|
9747
|
+
}
|
|
9748
|
+
|
|
9736
9749
|
#isTransientErrorMessage(errorMessage: string): boolean {
|
|
9737
9750
|
return (
|
|
9738
9751
|
this.#isTransientEnvelopeErrorMessage(errorMessage) || this.#isTransientTransportErrorMessage(errorMessage)
|
|
@@ -334,7 +334,7 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
|
|
|
334
334
|
return commandConsumed();
|
|
335
335
|
},
|
|
336
336
|
handleTui: (_command, runtime) => {
|
|
337
|
-
runtime.ctx.showModelSelector(
|
|
337
|
+
runtime.ctx.showModelSelector();
|
|
338
338
|
runtime.ctx.editor.setText("");
|
|
339
339
|
},
|
|
340
340
|
},
|