open-research 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/cli.js +31 -13
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -811,7 +811,7 @@ function formatDateTime(value) {
811
811
  }
812
812
 
813
813
  // src/lib/cli/version.ts
814
- var PACKAGE_VERSION = "0.1.7";
814
+ var PACKAGE_VERSION = "0.1.8";
815
815
  function getPackageVersion() {
816
816
  return PACKAGE_VERSION;
817
817
  }
@@ -1526,10 +1526,28 @@ var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
1526
1526
  ".yml",
1527
1527
  ".csv"
1528
1528
  ]);
1529
+ var IGNORED_DIRS = /* @__PURE__ */ new Set([
1530
+ ".open-research",
1531
+ "node_modules",
1532
+ ".git",
1533
+ "dist",
1534
+ "build",
1535
+ ".next",
1536
+ "__pycache__",
1537
+ ".venv",
1538
+ "venv",
1539
+ ".cache",
1540
+ "target",
1541
+ ".tox",
1542
+ "coverage",
1543
+ ".nyc_output",
1544
+ ".parcel-cache",
1545
+ ".turbo"
1546
+ ]);
1529
1547
  async function walkDir(rootDir, currentDir, out) {
1530
1548
  const entries = await fs8.readdir(currentDir, { withFileTypes: true });
1531
1549
  for (const entry of entries) {
1532
- if (entry.name === ".open-research") {
1550
+ if (IGNORED_DIRS.has(entry.name)) {
1533
1551
  continue;
1534
1552
  }
1535
1553
  const fullPath = path7.join(currentDir, entry.name);
@@ -2286,9 +2304,6 @@ function getToolsForMode(mode) {
2286
2304
 
2287
2305
  // src/lib/agent/prompts/planning.ts
2288
2306
  function buildPlanningSystemPrompt(ctx, activeSkills) {
2289
- const workspaceMap = ctx.availableKeys.map(
2290
- (key) => `- ${key}${ctx.fileLabels?.[key] ? ` \u2014 ${ctx.fileLabels[key]}` : ""}`
2291
- ).join("\n");
2292
2307
  const skillText = activeSkills.map((skill) => `## Active Skill: ${skill.name}
2293
2308
  ${skill.prompt}`).join("\n\n");
2294
2309
  return [
@@ -2354,8 +2369,9 @@ ${skill.prompt}`).join("\n\n");
2354
2369
  "- If the user's intent is already crystal clear, you can produce the charter after just 1 question or even immediately.",
2355
2370
  "- Ground your proposed steps in what you've learned from the workspace and external search results.",
2356
2371
  "",
2357
- workspaceMap ? `## Workspace Files
2358
- ${workspaceMap}` : "## Workspace Files\nnone",
2372
+ `## Workspace
2373
+ Root: ${process.cwd()}
2374
+ Use list_directory to explore. Use search_workspace or read_file to read content.`,
2359
2375
  skillText
2360
2376
  ].filter(Boolean).join("\n");
2361
2377
  }
@@ -4948,7 +4964,6 @@ function describeToolCall(name, args) {
4948
4964
  return fn ? fn(args) : `Running ${name}`;
4949
4965
  }
4950
4966
  function buildSystemPrompt(ctx, activeSkills) {
4951
- const workspaceMap = ctx.availableKeys.map((key) => `- ${key}${ctx.fileLabels?.[key] ? ` \u2014 ${ctx.fileLabels[key]}` : ""}`).join("\n");
4952
4967
  const skillText = activeSkills.map((skill) => `## Active Skill: ${skill.name}
4953
4968
  ${skill.prompt}`).join("\n\n");
4954
4969
  return [
@@ -4956,8 +4971,9 @@ ${skill.prompt}`).join("\n\n");
4956
4971
  "",
4957
4972
  "## Capabilities",
4958
4973
  "You have full access to the local filesystem and shell. You can:",
4959
- "- Read any file on disk with read_file (not limited to workspace files)",
4960
- "- List directories with list_directory to explore project structure",
4974
+ "- Read any file on disk with read_file",
4975
+ "- List directories with list_directory to explore the workspace and discover files",
4976
+ "- Search file contents with search_workspace",
4961
4977
  "- Run shell commands with run_command (python, R, node, LaTeX, curl, git, etc.)",
4962
4978
  "- Write new workspace files or edit existing ones",
4963
4979
  "- Search academic papers across OpenAlex, Semantic Scholar, and arXiv",
@@ -4966,15 +4982,17 @@ ${skill.prompt}`).join("\n\n");
4966
4982
  "- Activate research skills for specialized workflows",
4967
4983
  "",
4968
4984
  "## Principles",
4969
- "- Read before writing. Understand the workspace before making changes.",
4985
+ "- Start by exploring. Use list_directory and search_workspace to understand the workspace before acting.",
4986
+ "- Read before writing. Understand existing files before making changes.",
4970
4987
  "- Ground claims in sources. Cite papers and data, not assumptions.",
4971
4988
  "- Run code to verify. When you write a script, run it and check the output.",
4972
4989
  "- Be transparent. Show the user what you're doing and why.",
4973
4990
  "- When unsure, ask. Use ask_user rather than guessing.",
4974
4991
  "- For large outputs, redirect to a file and read selectively.",
4975
4992
  "",
4976
- workspaceMap ? `## Workspace Files
4977
- ${workspaceMap}` : "## Workspace Files\nnone",
4993
+ `## Workspace
4994
+ Root: ${process.cwd()}
4995
+ Use list_directory to explore. Use search_workspace or read_file to read content.`,
4978
4996
  skillText
4979
4997
  ].filter(Boolean).join("\n");
4980
4998
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-research",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
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",