@oh-my-pi/pi-coding-agent 14.9.1 → 14.9.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 +60 -0
- package/package.json +7 -7
- package/scripts/format-prompts.ts +3 -3
- package/src/config/prompt-templates.ts +0 -5
- package/src/config/settings-schema.ts +38 -0
- package/src/eval/eval.lark +10 -31
- package/src/eval/index.ts +1 -0
- package/src/eval/parse.ts +156 -255
- package/src/eval/sniff.ts +28 -0
- package/src/export/html/template.css +38 -0
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +209 -15
- package/src/extensibility/extensions/runner.ts +173 -177
- package/src/hashline/apply.ts +8 -24
- package/src/hashline/constants.ts +20 -0
- package/src/hashline/execute.ts +0 -1
- package/src/hashline/grammar.lark +16 -27
- package/src/hashline/hash.ts +4 -34
- package/src/hashline/input.ts +16 -2
- package/src/hashline/parser.ts +12 -40
- package/src/hashline/types.ts +1 -2
- package/src/internal-urls/agent-protocol.ts +1 -0
- package/src/internal-urls/artifact-protocol.ts +1 -0
- package/src/internal-urls/docs-index.generated.ts +2 -1
- package/src/internal-urls/jobs-protocol.ts +1 -0
- package/src/internal-urls/local-protocol.ts +1 -0
- package/src/internal-urls/mcp-protocol.ts +1 -0
- package/src/internal-urls/memory-protocol.ts +1 -0
- package/src/internal-urls/pi-protocol.ts +1 -0
- package/src/internal-urls/router.ts +2 -1
- package/src/internal-urls/rule-protocol.ts +1 -0
- package/src/internal-urls/skill-protocol.ts +1 -0
- package/src/internal-urls/types.ts +18 -2
- package/src/mcp/transports/http.ts +49 -47
- package/src/prompts/system/custom-system-prompt.md +0 -2
- package/src/prompts/system/now-prompt.md +7 -0
- package/src/prompts/system/project-prompt.md +2 -0
- package/src/prompts/system/subagent-system-prompt.md +18 -9
- package/src/prompts/system/subagent-user-prompt.md +1 -10
- package/src/prompts/system/system-prompt.md +154 -233
- package/src/prompts/tools/bash.md +0 -24
- package/src/prompts/tools/eval.md +26 -13
- package/src/prompts/tools/hashline.md +1 -4
- package/src/sdk.ts +12 -22
- package/src/session/agent-session.ts +49 -17
- package/src/system-prompt.ts +38 -104
- package/src/task/executor.ts +15 -9
- package/src/task/index.ts +38 -33
- package/src/task/render.ts +4 -2
- package/src/tools/bash.ts +15 -41
- package/src/tools/eval.ts +13 -36
- package/src/tools/index.ts +0 -3
- package/src/tools/path-utils.ts +21 -1
- package/src/tools/read.ts +71 -49
- package/src/tools/search.ts +13 -1
- package/src/utils/file-display-mode.ts +11 -5
- package/src/workspace-tree.ts +210 -410
- package/src/task/template.ts +0 -47
- package/src/tools/bash-normalize.ts +0 -107
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [14.9.3] - 2026-05-10
|
|
6
|
+
### Breaking Changes
|
|
7
|
+
|
|
8
|
+
- Changed the `eval` tool input format to canonical `*** Begin <LANG>` ... `*** End <LANG>` cells with `*** Title`, `*** Timeout`, and `*** Reset` directives, so legacy `===== ... =====` eval inputs are no longer accepted for execution
|
|
9
|
+
- Removed the `sectionSeparator` re-export from `config/prompt-templates`, so existing imports from `@oh-my-pi/pi-coding-agent/config/prompt-templates` now need to resolve `sectionSeparator` from its utility package
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added support for the `*** Abort` recovery marker in eval and hashline parsing to terminate processing safely when stream corruption is detected
|
|
14
|
+
- Added support for wrapping hashline edits in `*** Begin Patch` and `*** End Patch` markers so patch input with these envelopes is parsed and applied
|
|
15
|
+
- Added support in the HTML export renderer for the new `*** Begin`/`*** End` eval cell format
|
|
16
|
+
- Added a dedicated `[now]` prompt block to `buildSystemPrompt` output containing current date, current working directory, and required end-of-turn continuation/verification guidance
|
|
17
|
+
- Added a new `[project]` prompt block wrapper around workstation and workspace context and ensured it is emitted as a separate system prompt segment
|
|
18
|
+
- Added dedicated HTML rendering for `eval` tool calls, including cell-by-cell parsing of `===== ... =====` blocks with inferred Python/JS/TypeScript highlighting
|
|
19
|
+
- Added dedicated rendering support for `search`, `recipe`, and `irc` tool calls in transcript exports
|
|
20
|
+
- Added a collapsible `Available Tools` section with a tool count and chip-style compact tool names
|
|
21
|
+
- Added macOS power assertion settings `power.preventIdleSleep`, `power.preventSystemSleep`, `power.declareUserActive`, and `power.preventDisplaySleep` so users can control what types of sleep are blocked during sessions
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Kept legacy `===== ... =====` eval transcripts renderable in HTML while adding parsing for the new `*** Begin` format for newer transcripts
|
|
26
|
+
- Changed the system prompt’s Bash usage guidance to explicitly forbid specific anti-patterns (`sed`/`awk` line-range reads, stderr redirects, and `| head|tail` pagination) and require using dedicated tools for those operations
|
|
27
|
+
- Changed delegated subagent prompts so shared task context is now rendered only in the system-level `[context]` block, while the user-facing task message now contains only the assignment prompt text
|
|
28
|
+
- Changed system prompt rendering to use block markers such as `[env]`, `[contract]`, `[role]`, `[coop]`, and `[closure]` for more explicit structural instructions
|
|
29
|
+
- Changed the working-directory value in rendered prompts to use `shortenPath` before interpolation
|
|
30
|
+
- Updated subagent prompt assembly to compose prompt blocks and place the `[now]` block after the subagent-specific instructions
|
|
31
|
+
- Changed GitHub (`gh`) tool cards to include operation, PR, branch, and truncated query/title/body details
|
|
32
|
+
- Changed tool-call output to display internal `_i` intent separately and hide it from rendered argument JSON
|
|
33
|
+
- Changed `ast_edit` and `find`/`search` rendering to show resolved path values and option flags such as `limit`, `no-hidden`, and `no-reply`
|
|
34
|
+
- Changed power assertion behavior to take effect only while a prompt is in flight, replacing session-level persistent assertions
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
|
|
38
|
+
- Removed the unused `head` and `tail` parameters from the `bash` tool schema, along with the dead `normalizeBashCommand` / `applyHeadTail` post-processing module — output truncation is already handled by the harness's streaming tail buffer and artifact spillover, so the agent should rely on `read` (or the artifact link) instead of inline truncation pipes.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Fixed eval tool outputs to append a truncation warning and ask users to re-issue remaining work when parsing is aborted by `*** Abort`
|
|
43
|
+
- Fixed hashline parsing and input splitting to stop at `*** Abort` and ignore trailing edits after the marker
|
|
44
|
+
- Fixed subagent task prompt construction so a trailing `[now]` block in the base prompts is preserved and not swallowed when rendering `subagent-system-prompt`
|
|
45
|
+
- Fixed edit rendering so provided `input` text is shown in the export even without a file path
|
|
46
|
+
- Fixed `args.paths` handling in `ast_edit` and `find` so multiple paths are shown as a comma-separated list
|
|
47
|
+
- Fixed power assertion state handling so subsequent prompts are no longer blocked after an aborted or canceled prompt
|
|
48
|
+
- Fixed IRC background exchange poll loop leaking after session disposal: `#scheduleBackgroundExchangeFlush` now stops immediately when `dispose()` is called, preventing stale `setTimeout` callbacks from firing against a torn-down agent
|
|
49
|
+
|
|
50
|
+
## [14.9.2] - 2026-05-10
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- Added `agentsMdFiles` to `WorkspaceTree` so AGENTS.md discovery results are returned with the workspace scan output
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- Changed startup workspace discovery to use one native `listWorkspace` walk for both the rendered tree and AGENTS.md directory-context candidates, removing the layered `git ls-files` orchestration and secondary AGENTS.md glob.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- Fixed AGENTS.md context discovery to include AGENTS.md files that are explicitly gitignored while still excluding AGENTS.md files under ignored directories
|
|
62
|
+
- Fixed task tool renderer spamming `Tool renderer failed: undefined is not an object (evaluating 'args.tasks.length')` warnings while a `task` call was streaming in (the `tasks` array is undefined until the partial JSON parser closes it); the renderer now tolerates an absent `tasks` field and shows `0 agents` until the array arrives ([#985](https://github.com/can1357/oh-my-pi/issues/985)).
|
|
63
|
+
- Fixed MCP HTTP streamable transport spamming `HTTP SSE stream error: ReadableStream already has a controller` after every JSON-RPC request whose response was returned as `text/event-stream`. The transport used to break out of the SSE iterator once the matching response was captured and then re-open `response.body` for a background drain, but the body had already been piped through a `TransformStream` and could not be re-read. The drain now runs from a single iterator that resolves the response promise inline and continues to dispatch piggybacked notifications on the same stream.
|
|
64
|
+
|
|
5
65
|
## [14.9.0] - 2026-05-10
|
|
6
66
|
### Breaking Changes
|
|
7
67
|
|
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": "14.9.
|
|
4
|
+
"version": "14.9.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",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@agentclientprotocol/sdk": "0.21.0",
|
|
48
48
|
"@babel/parser": "^7.29.3",
|
|
49
49
|
"@mozilla/readability": "^0.6.0",
|
|
50
|
-
"@oh-my-pi/omp-stats": "14.9.
|
|
51
|
-
"@oh-my-pi/pi-agent-core": "14.9.
|
|
52
|
-
"@oh-my-pi/pi-ai": "14.9.
|
|
53
|
-
"@oh-my-pi/pi-natives": "14.9.
|
|
54
|
-
"@oh-my-pi/pi-tui": "14.9.
|
|
55
|
-
"@oh-my-pi/pi-utils": "14.9.
|
|
50
|
+
"@oh-my-pi/omp-stats": "14.9.3",
|
|
51
|
+
"@oh-my-pi/pi-agent-core": "14.9.3",
|
|
52
|
+
"@oh-my-pi/pi-ai": "14.9.3",
|
|
53
|
+
"@oh-my-pi/pi-natives": "14.9.3",
|
|
54
|
+
"@oh-my-pi/pi-tui": "14.9.3",
|
|
55
|
+
"@oh-my-pi/pi-utils": "14.9.3",
|
|
56
56
|
"@puppeteer/browsers": "^2.13.0",
|
|
57
57
|
"@sinclair/typebox": "^0.34.49",
|
|
58
58
|
"@types/turndown": "5.0.6",
|
|
@@ -16,9 +16,9 @@ import { prompt } from "@oh-my-pi/pi-utils";
|
|
|
16
16
|
*/
|
|
17
17
|
import { Glob } from "bun";
|
|
18
18
|
|
|
19
|
-
const PROMPTS_DIR =
|
|
20
|
-
const COMMIT_PROMPTS_DIR =
|
|
21
|
-
const AGENTIC_PROMPTS_DIR =
|
|
19
|
+
const PROMPTS_DIR = `${import.meta.dir}/../src/prompts/`;
|
|
20
|
+
const COMMIT_PROMPTS_DIR = `${import.meta.dir}/../src/commit/prompts/`;
|
|
21
|
+
const AGENTIC_PROMPTS_DIR = `${import.meta.dir}/../src/commit/agentic/prompts/`;
|
|
22
22
|
|
|
23
23
|
const PROMPT_DIRS = [PROMPTS_DIR, COMMIT_PROMPTS_DIR, AGENTIC_PROMPTS_DIR];
|
|
24
24
|
|
|
@@ -30,11 +30,6 @@ prompt.registerHelper("jtdToTypeScript", (schema: unknown): string => {
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
// `sectionSeparator` + SECTION_SEPARATOR helper live in pi-utils/prompt so every
|
|
34
|
-
// template consumer gets them registered without a coupling back to this module.
|
|
35
|
-
// Re-exported here for call sites that already reference the coding-agent path.
|
|
36
|
-
export { sectionSeparator } from "@oh-my-pi/pi-utils/prompt";
|
|
37
|
-
|
|
38
33
|
function formatHashlineRef(lineNum: unknown, content: unknown): { num: number; text: string; ref: string } {
|
|
39
34
|
const num = typeof lineNum === "number" ? lineNum : Number.parseInt(String(lineNum), 10);
|
|
40
35
|
const raw = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -243,6 +243,44 @@ export const SETTINGS_SCHEMA = {
|
|
|
243
243
|
description: "Automatically resume the most recent session in the current directory",
|
|
244
244
|
},
|
|
245
245
|
},
|
|
246
|
+
|
|
247
|
+
// macOS power assertions (caffeinate flags). No-op on other platforms.
|
|
248
|
+
"power.preventIdleSleep": {
|
|
249
|
+
type: "boolean",
|
|
250
|
+
default: true,
|
|
251
|
+
ui: {
|
|
252
|
+
tab: "interaction",
|
|
253
|
+
label: "Prevent Idle Sleep (macOS)",
|
|
254
|
+
description: "caffeinate -i: keep the system awake while a session is open",
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
"power.preventSystemSleep": {
|
|
258
|
+
type: "boolean",
|
|
259
|
+
default: false,
|
|
260
|
+
ui: {
|
|
261
|
+
tab: "interaction",
|
|
262
|
+
label: "Prevent System Sleep on AC (macOS)",
|
|
263
|
+
description: "caffeinate -s: block all system sleep while on AC power",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
"power.declareUserActive": {
|
|
267
|
+
type: "boolean",
|
|
268
|
+
default: false,
|
|
269
|
+
ui: {
|
|
270
|
+
tab: "interaction",
|
|
271
|
+
label: "Declare User Active (macOS)",
|
|
272
|
+
description: "caffeinate -u: keep the display lit and treat the user as active",
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
"power.preventDisplaySleep": {
|
|
276
|
+
type: "boolean",
|
|
277
|
+
default: false,
|
|
278
|
+
ui: {
|
|
279
|
+
tab: "interaction",
|
|
280
|
+
label: "Prevent Display Sleep (macOS)",
|
|
281
|
+
description: "caffeinate -d: keep the display from idle-sleeping while a session is open",
|
|
282
|
+
},
|
|
283
|
+
},
|
|
246
284
|
shellPath: { type: "string", default: undefined },
|
|
247
285
|
|
|
248
286
|
extensions: { type: "array", default: EMPTY_STRING_ARRAY },
|
package/src/eval/eval.lark
CHANGED
|
@@ -1,37 +1,16 @@
|
|
|
1
|
-
%import common.LF
|
|
2
|
-
%import common.WS_INLINE
|
|
3
|
-
|
|
4
|
-
// Canonical Eval input. Each cell is introduced by a header line:
|
|
5
|
-
//
|
|
6
|
-
// ===== <info> =====
|
|
7
|
-
//
|
|
8
|
-
// where each side is at least 5 equal signs. The info between the bars is
|
|
9
|
-
// a list of space-separated tokens, all optional, in any order:
|
|
10
|
-
//
|
|
11
|
-
// py | js | ts language for this cell
|
|
12
|
-
// py:"..." | js:"..." | ts:"..." language plus title shorthand
|
|
13
|
-
// id:"..." cell title (when language unchanged)
|
|
14
|
-
// t:<digits>(ms|s|m)? per-cell timeout (default 30s)
|
|
15
|
-
// rst reset this language's kernel before running
|
|
16
|
-
//
|
|
17
|
-
// Everything between one header line and the next (or end of input) is
|
|
18
|
-
// the cell's code, verbatim. The runtime additionally accepts content
|
|
19
|
-
// before the first header as an implicit default-language cell, but that
|
|
20
|
-
// is lenient fallback only and MUST NOT be relied on.
|
|
21
|
-
|
|
22
1
|
start: cell+
|
|
23
|
-
cell: header LF code_line*
|
|
24
2
|
|
|
25
|
-
|
|
26
|
-
|
|
3
|
+
cell: begin_cell attr* code_line* end_cell
|
|
4
|
+
begin_cell: "*** Begin " LANG LF
|
|
5
|
+
end_cell: "*** End Cell" LF?
|
|
27
6
|
|
|
28
|
-
attr:
|
|
7
|
+
attr: title | timeout | reset
|
|
8
|
+
title: "*** Title: " /(.+)/ LF
|
|
9
|
+
timeout: "*** Timeout: " /\d+(ms|s|m)?/ LF
|
|
10
|
+
reset: "*** Reset" LF
|
|
29
11
|
|
|
30
12
|
code_line: /[^\r\n]*/ LF
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
ID_ATTR: "id:\"" /[^"\r\n]*/ "\""
|
|
36
|
-
T_ATTR: "t:" /\d+(ms|s|m)?/
|
|
37
|
-
RST_FLAG: "rst"
|
|
14
|
+
LANG: "JS" | "TS" | "PY"
|
|
15
|
+
|
|
16
|
+
%import common.LF
|