@oh-my-pi/pi-coding-agent 12.19.2 → 12.19.3
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 +13 -0
- package/package.json +7 -7
- package/src/config/settings-schema.ts +0 -11
- package/src/main.ts +0 -1
- package/src/modes/components/settings-defs.ts +0 -5
- package/src/tools/bash.ts +17 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [12.19.3] - 2026-02-22
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added `pty` parameter to bash tool to enable PTY mode for commands requiring a real terminal (e.g., sudo, ssh, top, less)
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Changed bash tool to use per-command PTY control instead of global virtual terminal setting
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
|
|
16
|
+
- Removed `bash.virtualTerminal` setting; use the `pty` parameter on individual bash commands instead
|
|
17
|
+
|
|
5
18
|
## [12.19.1] - 2026-02-22
|
|
6
19
|
### Removed
|
|
7
20
|
|
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": "12.19.
|
|
4
|
+
"version": "12.19.3",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/can1357/oh-my-pi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@mozilla/readability": "^0.6",
|
|
44
|
-
"@oh-my-pi/omp-stats": "12.19.
|
|
45
|
-
"@oh-my-pi/pi-agent-core": "12.19.
|
|
46
|
-
"@oh-my-pi/pi-ai": "12.19.
|
|
47
|
-
"@oh-my-pi/pi-natives": "12.19.
|
|
48
|
-
"@oh-my-pi/pi-tui": "12.19.
|
|
49
|
-
"@oh-my-pi/pi-utils": "12.19.
|
|
44
|
+
"@oh-my-pi/omp-stats": "12.19.3",
|
|
45
|
+
"@oh-my-pi/pi-agent-core": "12.19.3",
|
|
46
|
+
"@oh-my-pi/pi-ai": "12.19.3",
|
|
47
|
+
"@oh-my-pi/pi-natives": "12.19.3",
|
|
48
|
+
"@oh-my-pi/pi-tui": "12.19.3",
|
|
49
|
+
"@oh-my-pi/pi-utils": "12.19.3",
|
|
50
50
|
"@sinclair/typebox": "^0.34",
|
|
51
51
|
"@xterm/headless": "^6.0",
|
|
52
52
|
"ajv": "^8.18",
|
|
@@ -756,17 +756,6 @@ export const SETTINGS_SCHEMA = {
|
|
|
756
756
|
// ─────────────────────────────────────────────────────────────────────────
|
|
757
757
|
// Bash interceptor settings
|
|
758
758
|
// ─────────────────────────────────────────────────────────────────────────
|
|
759
|
-
"bash.virtualTerminal": {
|
|
760
|
-
type: "enum",
|
|
761
|
-
values: ["on", "off"] as const,
|
|
762
|
-
default: "off",
|
|
763
|
-
ui: {
|
|
764
|
-
tab: "bash",
|
|
765
|
-
label: "Virtual terminal",
|
|
766
|
-
description: "Use PTY-backed interactive execution for bash",
|
|
767
|
-
submenu: true,
|
|
768
|
-
},
|
|
769
|
-
},
|
|
770
759
|
"bashInterceptor.enabled": {
|
|
771
760
|
type: "boolean",
|
|
772
761
|
default: false,
|
package/src/main.ts
CHANGED
|
@@ -538,7 +538,6 @@ export async function runRootCommand(parsed: Args, rawArgs: string[]): Promise<v
|
|
|
538
538
|
const cwd = getProjectDir();
|
|
539
539
|
await logger.timeAsync("settings:init", () => Settings.init({ cwd }));
|
|
540
540
|
if (parsedArgs.noPty) {
|
|
541
|
-
settings.override("bash.virtualTerminal", "off");
|
|
542
541
|
Bun.env.PI_NO_PTY = "1";
|
|
543
542
|
}
|
|
544
543
|
const {
|
|
@@ -154,11 +154,6 @@ const OPTION_PROVIDERS: Partial<Record<SettingPath, OptionProvider>> = {
|
|
|
154
154
|
{ value: "tool-only", label: "tool-only", description: "Interrupt only on tool-call argument matches" },
|
|
155
155
|
{ value: "never", label: "never", description: "Never interrupt; inject warning after completion" },
|
|
156
156
|
],
|
|
157
|
-
// Virtual terminal
|
|
158
|
-
"bash.virtualTerminal": [
|
|
159
|
-
{ value: "on", label: "On", description: "PTY-backed interactive execution" },
|
|
160
|
-
{ value: "off", label: "Off", description: "Standard non-interactive execution" },
|
|
161
|
-
],
|
|
162
157
|
// Provider options
|
|
163
158
|
"providers.webSearch": [
|
|
164
159
|
{
|
package/src/tools/bash.ts
CHANGED
|
@@ -34,6 +34,11 @@ const bashSchemaBase = Type.Object({
|
|
|
34
34
|
cwd: Type.Optional(Type.String({ description: "Working directory (default: cwd)" })),
|
|
35
35
|
head: Type.Optional(Type.Number({ description: "Return only first N lines of output" })),
|
|
36
36
|
tail: Type.Optional(Type.Number({ description: "Return only last N lines of output" })),
|
|
37
|
+
pty: Type.Optional(
|
|
38
|
+
Type.Boolean({
|
|
39
|
+
description: "Run in PTY mode when command needs a real terminal (e.g. sudo/ssh/top/less); default: false",
|
|
40
|
+
}),
|
|
41
|
+
),
|
|
37
42
|
});
|
|
38
43
|
|
|
39
44
|
const bashSchemaWithAsync = Type.Object({
|
|
@@ -54,6 +59,7 @@ export interface BashToolInput {
|
|
|
54
59
|
head?: number;
|
|
55
60
|
tail?: number;
|
|
56
61
|
async?: boolean;
|
|
62
|
+
pty?: boolean;
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
export interface BashToolDetails {
|
|
@@ -123,7 +129,15 @@ export class BashTool implements AgentTool<BashToolSchema, BashToolDetails> {
|
|
|
123
129
|
|
|
124
130
|
async execute(
|
|
125
131
|
_toolCallId: string,
|
|
126
|
-
{
|
|
132
|
+
{
|
|
133
|
+
command: rawCommand,
|
|
134
|
+
timeout: rawTimeout = 300,
|
|
135
|
+
cwd,
|
|
136
|
+
head,
|
|
137
|
+
tail,
|
|
138
|
+
async: asyncRequested = false,
|
|
139
|
+
pty = false,
|
|
140
|
+
}: BashToolInput,
|
|
127
141
|
signal?: AbortSignal,
|
|
128
142
|
onUpdate?: AgentToolUpdateCallback<BashToolDetails>,
|
|
129
143
|
ctx?: AgentToolContext,
|
|
@@ -188,7 +202,7 @@ export class BashTool implements AgentTool<BashToolSchema, BashToolDetails> {
|
|
|
188
202
|
try {
|
|
189
203
|
const result = await executeBash(command, {
|
|
190
204
|
cwd: commandCwd,
|
|
191
|
-
sessionKey: this.session.getSessionId?.() ??
|
|
205
|
+
sessionKey: `${this.session.getSessionId?.() ?? ""}:async:${jobId}`,
|
|
192
206
|
timeout: timeoutMs,
|
|
193
207
|
signal: runSignal,
|
|
194
208
|
env: extraEnv,
|
|
@@ -229,11 +243,7 @@ export class BashTool implements AgentTool<BashToolSchema, BashToolDetails> {
|
|
|
229
243
|
const extraEnv = artifactsDir ? { ARTIFACTS: artifactsDir } : undefined;
|
|
230
244
|
const { path: artifactPath, id: artifactId } = (await this.session.allocateOutputArtifact?.("bash")) ?? {};
|
|
231
245
|
|
|
232
|
-
const usePty =
|
|
233
|
-
this.session.settings.get("bash.virtualTerminal") === "on" &&
|
|
234
|
-
$env.PI_NO_PTY !== "1" &&
|
|
235
|
-
ctx?.hasUI === true &&
|
|
236
|
-
ctx.ui !== undefined;
|
|
246
|
+
const usePty = pty && $env.PI_NO_PTY !== "1" && ctx?.hasUI === true && ctx.ui !== undefined;
|
|
237
247
|
const result: BashResult | BashInteractiveResult = usePty
|
|
238
248
|
? await runInteractiveBashPty(ctx.ui!, {
|
|
239
249
|
command,
|