open-research 1.1.0 → 1.1.1

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/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  <h3 align="center">The research-native CLI agent.</h3>
6
6
 
7
7
  <p align="center">
8
+ <a href="https://open-research.info">open-research.info</a> &nbsp;·&nbsp;
8
9
  <a href="https://www.npmjs.com/package/open-research"><img src="https://img.shields.io/npm/v/open-research.svg" alt="npm" /></a>
9
10
  <a href="https://github.com/gangj277/open-research/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/open-research.svg" alt="license" /></a>
10
11
  </p>
@@ -227,10 +227,14 @@ async function executeFetchUrl(args, signal) {
227
227
 
228
228
  // src/lib/fs/pdf.ts
229
229
  import fs from "fs/promises";
230
+ import path from "path";
231
+ import { createRequire } from "module";
232
+ var require2 = createRequire(import.meta.url);
233
+ var standardFontDataUrl = path.join(path.dirname(require2.resolve("pdfjs-dist/package.json")), "standard_fonts") + "/";
230
234
  async function extractPdfText(filePath, options) {
231
235
  const pdfjs = await import("pdfjs-dist/legacy/build/pdf.mjs");
232
236
  const buffer = await fs.readFile(filePath);
233
- const document = await pdfjs.getDocument({ data: new Uint8Array(buffer) }).promise;
237
+ const document = await pdfjs.getDocument({ data: new Uint8Array(buffer), standardFontDataUrl }).promise;
234
238
  const totalPages = document.numPages;
235
239
  const start = Math.max(1, options?.startPage ?? 1);
236
240
  const end = Math.min(totalPages, options?.endPage ?? totalPages);
@@ -245,7 +249,7 @@ async function extractPdfText(filePath, options) {
245
249
  }
246
250
  async function extractPdfTextFromBuffer(buffer, options) {
247
251
  const pdfjs = await import("pdfjs-dist/legacy/build/pdf.mjs");
248
- const document = await pdfjs.getDocument({ data: buffer }).promise;
252
+ const document = await pdfjs.getDocument({ data: buffer, standardFontDataUrl }).promise;
249
253
  const totalPages = document.numPages;
250
254
  const end = Math.min(totalPages, options?.maxPages ?? 20);
251
255
  const pages = [];
package/dist/cli.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  loadOpenResearchConfig,
27
27
  saveOpenResearchConfig,
28
28
  themeValues
29
- } from "./chunk-3KZN54JZ.js";
29
+ } from "./chunk-TJA4CAZE.js";
30
30
  import {
31
31
  readJsonFile,
32
32
  writeJsonFile
@@ -828,7 +828,7 @@ function formatDateTime(value) {
828
828
  }
829
829
 
830
830
  // src/lib/cli/version.ts
831
- var PACKAGE_VERSION = "1.1.0";
831
+ var PACKAGE_VERSION = "1.1.1";
832
832
  function getPackageVersion() {
833
833
  return PACKAGE_VERSION;
834
834
  }
@@ -6453,7 +6453,7 @@ async function executeTool(name, args, ctx, activeSkills, homeDir, signal, provi
6453
6453
  return { result: out.result, searchResults: out.sources };
6454
6454
  }
6455
6455
  case "web_search": {
6456
- const { executeWebSearch } = await import("./web-search-TKBFSU3M.js");
6456
+ const { executeWebSearch } = await import("./web-search-IBZ6UAXL.js");
6457
6457
  const out = await executeWebSearch(
6458
6458
  args,
6459
6459
  provider
@@ -10380,6 +10380,8 @@ function App({
10380
10380
  const [statusLine, setStatusLine] = useState7("");
10381
10381
  const [activeToolActivities, setActiveToolActivities] = useState7({});
10382
10382
  const [turnToolCount, setTurnToolCount] = useState7(0);
10383
+ const [latchedToolActivity, setLatchedToolActivity] = useState7("");
10384
+ const [latchedToolCount, setLatchedToolCount] = useState7(0);
10383
10385
  const [subAgentProgress, setSubAgentProgress] = useState7({});
10384
10386
  const [toolActivityExpanded, setToolActivityExpanded] = useState7(false);
10385
10387
  const [taskPanelVisible, setTaskPanelVisible] = useState7(true);
@@ -10441,6 +10443,18 @@ function App({
10441
10443
  }
10442
10444
  return `Running ${activeToolDescriptions.length} tools in parallel`;
10443
10445
  }, [activeToolDescriptions, turnToolCount]);
10446
+ useEffect4(() => {
10447
+ if (!busy) {
10448
+ setLatchedToolActivity("");
10449
+ setLatchedToolCount(0);
10450
+ return;
10451
+ }
10452
+ if (!currentToolActivity) {
10453
+ return;
10454
+ }
10455
+ setLatchedToolActivity(currentToolActivity);
10456
+ setLatchedToolCount(turnToolCount);
10457
+ }, [busy, currentToolActivity, turnToolCount]);
10444
10458
  const visibleSubAgents = useMemo4(
10445
10459
  () => Object.values(subAgentProgress),
10446
10460
  [subAgentProgress]
@@ -10747,7 +10761,6 @@ function App({
10747
10761
  clearCtrlCPending();
10748
10762
  if (abortRef.current) {
10749
10763
  abortRef.current.abort();
10750
- addSystemMessage("Interrupting agent...");
10751
10764
  }
10752
10765
  return;
10753
10766
  }
@@ -10793,7 +10806,6 @@ function App({
10793
10806
  if (inputKey.escape) {
10794
10807
  if (busy && abortRef.current) {
10795
10808
  abortRef.current.abort();
10796
- addSystemMessage("Interrupting agent...");
10797
10809
  } else if (planningState.status === "charter-review") {
10798
10810
  rejectCharter();
10799
10811
  } else {
@@ -10871,11 +10883,14 @@ function App({
10871
10883
  if (!workspacePath) return;
10872
10884
  turnToolLogRef.current = [];
10873
10885
  setTurnToolCount(0);
10886
+ setLatchedToolActivity("");
10887
+ setLatchedToolCount(0);
10874
10888
  setActiveToolActivities({});
10875
10889
  setSubAgentProgress({});
10876
10890
  const controller = new AbortController();
10877
10891
  let streamBuffer = null;
10878
10892
  let focusPendingReviewOnComplete = false;
10893
+ const postTurnNotices = [];
10879
10894
  abortRef.current = controller;
10880
10895
  setBusy(true);
10881
10896
  startTransition2(() => {
@@ -10911,6 +10926,8 @@ function App({
10911
10926
  onTextDelta: (chunk) => {
10912
10927
  assistantText += chunk;
10913
10928
  streamBuffer?.push(chunk);
10929
+ setLatchedToolActivity("");
10930
+ setLatchedToolCount(0);
10914
10931
  },
10915
10932
  onToolActivity: (activity) => {
10916
10933
  streamBuffer?.flush();
@@ -10969,7 +10986,9 @@ function App({
10969
10986
  streamBuffer.flush();
10970
10987
  if (turnToolLogRef.current.length > 0) {
10971
10988
  const summary = buildToolSummary(turnToolLogRef.current);
10972
- addSystemMessage(`__tool_summary__${JSON.stringify({ summary, tools: turnToolLogRef.current })}`);
10989
+ postTurnNotices.push(
10990
+ `__tool_summary__${JSON.stringify({ summary, tools: turnToolLogRef.current })}`
10991
+ );
10973
10992
  turnToolLogRef.current = [];
10974
10993
  }
10975
10994
  startTransition2(() => {
@@ -11032,7 +11051,13 @@ ${error.stack}` : String(error)}` }
11032
11051
  setBusy(false);
11033
11052
  setComposerFocused(!focusPendingReviewOnComplete);
11034
11053
  if (controller.signal.aborted) {
11035
- addSystemMessage("Agent interrupted.");
11054
+ postTurnNotices.push("Interrupting agent...\nAgent interrupted.");
11055
+ }
11056
+ for (const notice of postTurnNotices) {
11057
+ addSystemMessage(notice);
11058
+ }
11059
+ if (controller.signal.aborted) {
11060
+ return;
11036
11061
  }
11037
11062
  }
11038
11063
  }
@@ -11351,8 +11376,8 @@ ${error.stack}` : String(error)}` }
11351
11376
  width: contentWidth,
11352
11377
  busy,
11353
11378
  frame: activityFrame,
11354
- toolActivity: currentToolActivity,
11355
- toolCount: turnToolCount,
11379
+ toolActivity: currentToolActivity || latchedToolActivity,
11380
+ toolCount: currentToolActivity ? turnToolCount : latchedToolCount,
11356
11381
  statusParts,
11357
11382
  statusColor,
11358
11383
  tokenDisplay,
@@ -4,7 +4,7 @@ import {
4
4
  fetchAndParseContent,
5
5
  formatExtractionResults,
6
6
  loadOpenResearchConfig
7
- } from "./chunk-3KZN54JZ.js";
7
+ } from "./chunk-TJA4CAZE.js";
8
8
  import "./chunk-77Q5B5H7.js";
9
9
  import "./chunk-4HCPHCC2.js";
10
10
  import "./chunk-GVEVKDGV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-research",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Local-first research CLI agent — discover papers, synthesize notes, run analysis, and draft artifacts from your terminal.",
5
5
  "type": "module",
6
6
  "license": "MIT",