@oh-my-pi/pi-coding-agent 14.4.3 → 14.5.0

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/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.4.3",
4
+ "version": "14.5.0",
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",
@@ -46,12 +46,13 @@
46
46
  "dependencies": {
47
47
  "@agentclientprotocol/sdk": "0.20.0",
48
48
  "@mozilla/readability": "^0.6.0",
49
- "@oh-my-pi/omp-stats": "14.4.3",
50
- "@oh-my-pi/pi-agent-core": "14.4.3",
51
- "@oh-my-pi/pi-ai": "14.4.3",
52
- "@oh-my-pi/pi-natives": "14.4.3",
53
- "@oh-my-pi/pi-tui": "14.4.3",
54
- "@oh-my-pi/pi-utils": "14.4.3",
49
+ "@oh-my-pi/omp-stats": "14.5.0",
50
+ "@oh-my-pi/pi-agent-core": "14.5.0",
51
+ "@oh-my-pi/pi-ai": "14.5.0",
52
+ "@oh-my-pi/pi-natives": "14.5.0",
53
+ "@oh-my-pi/pi-tui": "14.5.0",
54
+ "@oh-my-pi/pi-utils": "14.5.0",
55
+ "@puppeteer/browsers": "^2.13.0",
55
56
  "@sinclair/typebox": "^0.34.49",
56
57
  "@xterm/headless": "^6.0.0",
57
58
  "ajv": "^8.20.0",
@@ -62,7 +63,7 @@
62
63
  "linkedom": "^0.18.12",
63
64
  "lru-cache": "11.3.5",
64
65
  "markit-ai": "0.5.3",
65
- "puppeteer": "^24.42.0",
66
+ "puppeteer-core": "^24.42.0",
66
67
  "turndown": "7.2.4",
67
68
  "turndown-plugin-gfm": "1.0.2",
68
69
  "zod": "4.3.6"
@@ -1681,6 +1681,7 @@ export const SETTINGS_SCHEMA = {
1681
1681
  "kagi",
1682
1682
  "synthetic",
1683
1683
  "parallel",
1684
+ "searxng",
1684
1685
  ] as const,
1685
1686
  default: "auto",
1686
1687
  ui: {
@@ -1761,6 +1762,47 @@ export const SETTINGS_SCHEMA = {
1761
1762
  ui: { tab: "providers", label: "Exa Websets", description: "Webset management and enrichment tools" },
1762
1763
  },
1763
1764
 
1765
+ // SearXNG
1766
+ "searxng.endpoint": {
1767
+ type: "string",
1768
+ default: undefined,
1769
+ ui: {
1770
+ tab: "providers",
1771
+ label: "SearXNG Endpoint",
1772
+ description: "Base URL of the SearXNG instance (e.g. https://searx.example.org)",
1773
+ },
1774
+ },
1775
+
1776
+ "searxng.token": {
1777
+ type: "string",
1778
+ default: undefined,
1779
+ ui: {
1780
+ tab: "providers",
1781
+ label: "SearXNG Token",
1782
+ description: "Optional bearer token for SearXNG authentication",
1783
+ },
1784
+ },
1785
+
1786
+ "searxng.categories": {
1787
+ type: "string",
1788
+ default: undefined,
1789
+ ui: {
1790
+ tab: "providers",
1791
+ label: "SearXNG Categories",
1792
+ description: "Comma-separated categories filter (e.g. general,news,science)",
1793
+ },
1794
+ },
1795
+
1796
+ "searxng.language": {
1797
+ type: "string",
1798
+ default: undefined,
1799
+ ui: {
1800
+ tab: "providers",
1801
+ label: "SearXNG Language",
1802
+ description: "Language code for search results (e.g. en, zh-CN)",
1803
+ },
1804
+ },
1805
+
1764
1806
  "commit.mapReduceEnabled": { type: "boolean", default: true },
1765
1807
 
1766
1808
  "commit.mapReduceMinFiles": { type: "number", default: 4 },
@@ -355,6 +355,19 @@ function applySedToLine(
355
355
  }
356
356
  if (re?.test(currentLine)) {
357
357
  re.lastIndex = 0;
358
+ const probe = re.exec(currentLine);
359
+ re.lastIndex = 0;
360
+ if (probe && probe[0].length === 0) {
361
+ // Zero-length matches (e.g. `()`, `(?=…)`, `^`, `$`) cause `String.replace`
362
+ // to insert the replacement at the match position rather than substitute,
363
+ // which is almost never what models intend. Reject with a pointer to the
364
+ // dedicated insertion verbs.
365
+ return {
366
+ result: currentLine,
367
+ matched: false,
368
+ error: `pattern ${JSON.stringify(spec.pattern)} matches an empty string; use \`pre\`/\`post\`/\`splice\` to insert or replace whole lines, or use a non-empty pattern`,
369
+ };
370
+ }
358
371
  return { result: currentLine.replace(re, spec.replacement), matched: true };
359
372
  }
360
373
  // Fall back to literal substring match. Models frequently send sed patterns
@@ -674,7 +687,7 @@ export function applyAtomEdits(
674
687
  case "sed": {
675
688
  const { result, matched, error, literalFallback } = applySedToLine(currentLine, edit.spec);
676
689
  if (error) {
677
- throw new Error(`Edit sed expression ${JSON.stringify(edit.expression)} failed to compile: ${error}`);
690
+ throw new Error(`Edit sed expression ${JSON.stringify(edit.expression)} rejected: ${error}`);
678
691
  }
679
692
  if (!matched) {
680
693
  throw new Error(
@@ -786,9 +799,7 @@ export function applyAtomEdits(
786
799
  }
787
800
  if (!anyMatched) {
788
801
  if (lastCompileError !== undefined) {
789
- throw new Error(
790
- `Edit sed expression ${JSON.stringify(edit.expression)} failed to compile: ${lastCompileError}`,
791
- );
802
+ throw new Error(`Edit sed expression ${JSON.stringify(edit.expression)} rejected: ${lastCompileError}`);
792
803
  }
793
804
  throw new Error(`Edit sed expression ${JSON.stringify(edit.expression)} did not match any line in the file.`);
794
805
  }