opencode-readseek 0.9.10 → 0.9.12

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/index.js +15 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -398,6 +398,7 @@ var TOOL_CONTRACTS = [
398
398
  ];
399
399
  // ../readseek-api/src/policy.ts
400
400
  var BUILTIN_FALLBACKS = {
401
+ read: "digest",
401
402
  edit: "edit",
402
403
  write: "write",
403
404
  grep: "grep",
@@ -415,6 +416,7 @@ var PREFERENCE_LEADS = {
415
416
  view: "Preferred for digesting document structure or selected content."
416
417
  };
417
418
  var FALLBACK_TEMPLATES = {
419
+ read: "Prefer `digest` with fresh LINE:HASH anchors.",
418
420
  edit: "Prefer `edit` with fresh LINE:HASH anchors.",
419
421
  write: "Prefer `write` so the result returns LINE:HASH anchors.",
420
422
  grep: "Prefer `grep` for text/regex search with edit-ready anchors.",
@@ -652,6 +654,7 @@ function buildRenameArgs(input) {
652
654
  return appendGitSelectionArgs(args, input);
653
655
  }
654
656
  // ../readseek-api/src/platform.ts
657
+ import { accessSync, constants as fsConstants } from "node:fs";
655
658
  import { createRequire } from "node:module";
656
659
  import path from "node:path";
657
660
  var READSEEK_PLATFORM_PACKAGES = {
@@ -680,10 +683,17 @@ function resolveReadSeekBinaryFromPackages(resolver = resolveFromPackage, option
680
683
  const metaPackage = options.metaPackage ?? "@jarkkojs/readseek";
681
684
  const metaPackageJson = resolve(`${metaPackage}/package.json`);
682
685
  const metaPackageDir = path.dirname(metaPackageJson);
683
- const packageJsonPath = resolve(`${platformPackage}/package.json`, {
684
- paths: [metaPackageDir]
685
- });
686
- return path.join(path.dirname(packageJsonPath), "bin", readSeekBinaryName(platform));
686
+ let packageJsonPath;
687
+ try {
688
+ packageJsonPath = resolve(`${platformPackage}/package.json`);
689
+ } catch {
690
+ packageJsonPath = resolve(`${platformPackage}/package.json`, {
691
+ paths: [metaPackageDir]
692
+ });
693
+ }
694
+ const binaryPath = path.join(path.dirname(packageJsonPath), "bin", readSeekBinaryName(platform));
695
+ accessSync(binaryPath, fsConstants.X_OK);
696
+ return binaryPath;
687
697
  }
688
698
  // ../readseek-api/src/json.ts
689
699
  var READSEEK_USAGE_HINT = /\n\s*Run readseek(?: [\w-]+)* --help for more information\.?\s*$/;
@@ -1044,7 +1054,7 @@ var TOOL_POLICY = renderToolRoutingPolicy({
1044
1054
  demoteBuiltIns: ["read", "edit", "write", "grep", "apply_patch"]
1045
1055
  });
1046
1056
  var PREFERRED_TOOL_DESCRIPTIONS = preferredToolDescriptionMap(OPENCODE_TOOL_ALIASES);
1047
- var FALLBACK_TOOL_DESCRIPTIONS = fallbackToolDescriptionMap(["edit", "write", "grep", "apply_patch"], OPENCODE_TOOL_ALIASES);
1057
+ var FALLBACK_TOOL_DESCRIPTIONS = fallbackToolDescriptionMap(["read", "edit", "write", "grep", "apply_patch"], OPENCODE_TOOL_ALIASES);
1048
1058
  function openCodeToolDescription(name) {
1049
1059
  return renderToolDescription(name, OPENCODE_TOOL_ALIASES);
1050
1060
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-readseek",
3
- "version": "0.9.10",
3
+ "version": "0.9.12",
4
4
  "description": "OpenCode plugin for anchored file operations and structural code navigation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "node": ">=20.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@jarkkojs/readseek": "^0.9.10",
36
+ "@jarkkojs/readseek": "^0.9.12",
37
37
  "@opencode-ai/plugin": "^1.17.20"
38
38
  },
39
39
  "devDependencies": {