@oh-my-pi/pi-coding-agent 11.14.2 → 11.14.4
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 +16 -0
- package/examples/extensions/with-deps/package.json +14 -14
- package/package.json +14 -11
- package/src/index.ts +4 -0
- package/src/mcp/oauth-discovery.ts +1 -1
- package/src/tools/browser.ts +14 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [11.14.4] - 2026-02-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Exported `renderPromptTemplate` function for programmatic prompt template rendering
|
|
10
|
+
- Exported `computeLineHash` function from patch utilities
|
|
11
|
+
- Added `./cli` export path for direct CLI module access
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Replaced jsdom with linkedom for improved HTML parsing performance and reduced memory footprint
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
|
|
19
|
+
- Removed @types/jsdom dependency
|
|
20
|
+
|
|
5
21
|
## [11.14.1] - 2026-02-12
|
|
6
22
|
### Changed
|
|
7
23
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "pi-extension-with-deps",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"omp": {
|
|
6
|
+
"extensions": [
|
|
7
|
+
"./index.ts"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"ms": "^2.1.3"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/ms": "^2.1.0"
|
|
15
|
+
}
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.4",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"ompConfig": {
|
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"types": "./src/patch/*.ts",
|
|
63
63
|
"import": "./src/patch/*.ts"
|
|
64
64
|
},
|
|
65
|
+
"./cli": {
|
|
66
|
+
"types": "./src/cli.ts",
|
|
67
|
+
"import": "./src/cli.ts"
|
|
68
|
+
},
|
|
65
69
|
"./*": {
|
|
66
70
|
"types": "./src/*.ts",
|
|
67
71
|
"import": "./src/*.ts"
|
|
@@ -84,12 +88,12 @@
|
|
|
84
88
|
},
|
|
85
89
|
"dependencies": {
|
|
86
90
|
"@mozilla/readability": "0.6.0",
|
|
87
|
-
"@oh-my-pi/omp-stats": "11.14.
|
|
88
|
-
"@oh-my-pi/pi-agent-core": "11.14.
|
|
89
|
-
"@oh-my-pi/pi-ai": "11.14.
|
|
90
|
-
"@oh-my-pi/pi-natives": "11.14.
|
|
91
|
-
"@oh-my-pi/pi-tui": "11.14.
|
|
92
|
-
"@oh-my-pi/pi-utils": "11.14.
|
|
91
|
+
"@oh-my-pi/omp-stats": "11.14.4",
|
|
92
|
+
"@oh-my-pi/pi-agent-core": "11.14.4",
|
|
93
|
+
"@oh-my-pi/pi-ai": "11.14.4",
|
|
94
|
+
"@oh-my-pi/pi-natives": "11.14.4",
|
|
95
|
+
"@oh-my-pi/pi-tui": "11.14.4",
|
|
96
|
+
"@oh-my-pi/pi-utils": "11.14.4",
|
|
93
97
|
"@sinclair/typebox": "^0.34.48",
|
|
94
98
|
"@xterm/headless": "^6.0.0",
|
|
95
99
|
"ajv": "^8.17.1",
|
|
@@ -99,7 +103,7 @@
|
|
|
99
103
|
"glob": "^13.0.1",
|
|
100
104
|
"handlebars": "^4.7.8",
|
|
101
105
|
"ignore": "^7.0.5",
|
|
102
|
-
"
|
|
106
|
+
"linkedom": "^0.18.12",
|
|
103
107
|
"marked": "^17.0.1",
|
|
104
108
|
"node-html-parser": "^7.0.2",
|
|
105
109
|
"puppeteer": "^24.37.1",
|
|
@@ -107,10 +111,9 @@
|
|
|
107
111
|
"zod": "^4.3.6"
|
|
108
112
|
},
|
|
109
113
|
"devDependencies": {
|
|
110
|
-
"@types/ms": "^2.1.0",
|
|
111
114
|
"@types/bun": "^1.3.9",
|
|
112
|
-
"ms": "^2.1.
|
|
113
|
-
"
|
|
115
|
+
"@types/ms": "^2.1.0",
|
|
116
|
+
"ms": "^2.1.3"
|
|
114
117
|
},
|
|
115
118
|
"keywords": [
|
|
116
119
|
"coding-agent",
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { formatKeyHint, formatKeyHints } from "./config/keybindings";
|
|
|
12
12
|
export { ModelRegistry } from "./config/model-registry";
|
|
13
13
|
// Prompt templates
|
|
14
14
|
export type { PromptTemplate } from "./config/prompt-templates";
|
|
15
|
+
export { renderPromptTemplate } from "./config/prompt-templates";
|
|
15
16
|
export type { CompactionSettings, RetrySettings, SkillsSettings } from "./config/settings";
|
|
16
17
|
export { Settings, settings } from "./config/settings";
|
|
17
18
|
// Custom commands
|
|
@@ -149,6 +150,7 @@ export {
|
|
|
149
150
|
Theme,
|
|
150
151
|
type ThemeColor,
|
|
151
152
|
} from "./modes/theme/theme";
|
|
153
|
+
export { computeLineHash } from "./patch/hashline";
|
|
152
154
|
// SDK for programmatic usage
|
|
153
155
|
export {
|
|
154
156
|
// Factory
|
|
@@ -236,6 +238,8 @@ export {
|
|
|
236
238
|
type SessionMessageEntry,
|
|
237
239
|
type ThinkingLevelChangeEntry,
|
|
238
240
|
} from "./session/session-manager";
|
|
241
|
+
export { runSubprocess } from "./task/executor";
|
|
242
|
+
export type { AgentDefinition, AgentProgress, AgentSource, SingleResult, TaskParams } from "./task/types";
|
|
239
243
|
// Tools (detail types and utilities)
|
|
240
244
|
export {
|
|
241
245
|
type BashToolDetails,
|
|
@@ -235,7 +235,7 @@ export async function discoverOAuthEndpoints(serverUrl: string): Promise<OAuthEn
|
|
|
235
235
|
});
|
|
236
236
|
|
|
237
237
|
if (response.ok) {
|
|
238
|
-
const metadata = await response.json()
|
|
238
|
+
const metadata = (await response.json()) as Record<string, any>;
|
|
239
239
|
|
|
240
240
|
// Check for standard OAuth discovery format
|
|
241
241
|
if (metadata.authorization_endpoint && metadata.token_endpoint) {
|
package/src/tools/browser.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallb
|
|
|
5
5
|
import { StringEnum } from "@oh-my-pi/pi-ai";
|
|
6
6
|
import { logger, Snowflake, untilAborted } from "@oh-my-pi/pi-utils";
|
|
7
7
|
import { type Static, Type } from "@sinclair/typebox";
|
|
8
|
-
import {
|
|
8
|
+
import { type HTMLElement, parseHTML } from "linkedom";
|
|
9
9
|
import type { Browser, CDPSession, ElementHandle, KeyInput, Page, SerializedAXNode } from "puppeteer";
|
|
10
10
|
import puppeteer from "puppeteer";
|
|
11
11
|
import { renderPromptTemplate } from "../config/prompt-templates";
|
|
@@ -61,6 +61,17 @@ const INTERACTIVE_AX_ROLES = new Set([
|
|
|
61
61
|
"treeitem",
|
|
62
62
|
]);
|
|
63
63
|
|
|
64
|
+
declare global {
|
|
65
|
+
interface Element extends HTMLElement {}
|
|
66
|
+
|
|
67
|
+
function getComputedStyle(element: Element): Record<string, unknown>;
|
|
68
|
+
var innerWidth: number;
|
|
69
|
+
var innerHeight: number;
|
|
70
|
+
var document: {
|
|
71
|
+
elementFromPoint(x: number, y: number): Element | null;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
64
75
|
const LEGACY_SELECTOR_PREFIXES = ["p-aria/", "p-text/", "p-xpath/", "p-pierce/"] as const;
|
|
65
76
|
|
|
66
77
|
function normalizeSelector(selector: string): string {
|
|
@@ -1247,17 +1258,9 @@ export class BrowserTool implements AgentTool<typeof browserSchema, BrowserToolD
|
|
|
1247
1258
|
const format = params.format ?? "markdown";
|
|
1248
1259
|
const html = (await untilAborted(signal, () => page.content())) as string;
|
|
1249
1260
|
const url = page.url();
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
if (err?.message?.includes("Could not parse CSS stylesheet")) return;
|
|
1253
|
-
logger.debug("JSDOM error during readable extraction", {
|
|
1254
|
-
error: err instanceof Error ? err.message : String(err),
|
|
1255
|
-
});
|
|
1256
|
-
});
|
|
1257
|
-
const dom = new JSDOM(html, { url, virtualConsole });
|
|
1258
|
-
const reader = new Readability(dom.window.document);
|
|
1261
|
+
const { document } = parseHTML(html);
|
|
1262
|
+
const reader = new Readability(document);
|
|
1259
1263
|
const article = reader.parse();
|
|
1260
|
-
dom.window.close();
|
|
1261
1264
|
if (!article) {
|
|
1262
1265
|
throw new ToolError("Readable content not found");
|
|
1263
1266
|
}
|