@jarkkojs/readseek-api 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.
- package/dist/index.js +18 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -410,6 +410,11 @@ function getToolContract(name) {
|
|
|
410
410
|
}
|
|
411
411
|
// src/policy.ts
|
|
412
412
|
var REPLACEABLE_TOOLS = [
|
|
413
|
+
{
|
|
414
|
+
tool: "digest",
|
|
415
|
+
builtIn: "read",
|
|
416
|
+
benefit: "it returns LINE:HASH anchors for safe edits."
|
|
417
|
+
},
|
|
413
418
|
{
|
|
414
419
|
tool: "edit",
|
|
415
420
|
builtIn: "edit",
|
|
@@ -447,6 +452,7 @@ var TOOL_COMPACT_GUIDELINES = {
|
|
|
447
452
|
]
|
|
448
453
|
};
|
|
449
454
|
var BUILTIN_FALLBACKS = {
|
|
455
|
+
read: "digest",
|
|
450
456
|
edit: "edit",
|
|
451
457
|
write: "write",
|
|
452
458
|
grep: "grep",
|
|
@@ -464,6 +470,7 @@ var PREFERENCE_LEADS = {
|
|
|
464
470
|
view: "Preferred for digesting document structure or selected content."
|
|
465
471
|
};
|
|
466
472
|
var FALLBACK_TEMPLATES = {
|
|
473
|
+
read: "Prefer `digest` with fresh LINE:HASH anchors.",
|
|
467
474
|
edit: "Prefer `edit` with fresh LINE:HASH anchors.",
|
|
468
475
|
write: "Prefer `write` so the result returns LINE:HASH anchors.",
|
|
469
476
|
grep: "Prefer `grep` for text/regex search with edit-ready anchors.",
|
|
@@ -754,10 +761,17 @@ function resolveReadSeekBinaryFromPackages(resolver = resolveFromPackage, option
|
|
|
754
761
|
const metaPackage = options.metaPackage ?? "@jarkkojs/readseek";
|
|
755
762
|
const metaPackageJson = resolve(`${metaPackage}/package.json`);
|
|
756
763
|
const metaPackageDir = path.dirname(metaPackageJson);
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
764
|
+
let packageJsonPath;
|
|
765
|
+
try {
|
|
766
|
+
packageJsonPath = resolve(`${platformPackage}/package.json`);
|
|
767
|
+
} catch {
|
|
768
|
+
packageJsonPath = resolve(`${platformPackage}/package.json`, {
|
|
769
|
+
paths: [metaPackageDir]
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
const binaryPath = path.join(path.dirname(packageJsonPath), "bin", readSeekBinaryName(platform));
|
|
773
|
+
accessSync(binaryPath, fsConstants.X_OK);
|
|
774
|
+
return binaryPath;
|
|
761
775
|
}
|
|
762
776
|
function resolveReadSeekBinaryFromPath(pathEnv = process.env.PATH) {
|
|
763
777
|
const name = readSeekBinaryName();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarkkojs/readseek-api",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.12",
|
|
4
4
|
"description": "Shared ReadSeek CLI contract, validation, argv builders, and bounded process runners",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"hashline"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@jarkkojs/readseek": "^0.9.
|
|
48
|
+
"@jarkkojs/readseek": "^0.9.12"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22.0.0",
|