dsh-plugin-sessiongraph-native 0.1.17 → 0.1.19
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/lib/index.d.ts +7 -0
- package/lib/index.js +29 -0
- package/package.json +8 -2
package/lib/index.d.ts
CHANGED
|
@@ -96,4 +96,11 @@ export interface NativeKernel {
|
|
|
96
96
|
* @returns the kernel, or `undefined` when no usable binary is present.
|
|
97
97
|
*/
|
|
98
98
|
export declare function loadNative(): NativeKernel | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* The optional platform package that carries this platform's kernel, if the project publishes one.
|
|
101
|
+
* @param platform - `process.platform`.
|
|
102
|
+
* @param arch - `process.arch`.
|
|
103
|
+
* @returns the package name, or `undefined` for a platform with no published build.
|
|
104
|
+
*/
|
|
105
|
+
export declare function indexerPackageName(platform: string, arch: string): string | undefined;
|
|
99
106
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -54,13 +54,42 @@ export function loadNative() {
|
|
|
54
54
|
*/
|
|
55
55
|
function candidateSpecifiers() {
|
|
56
56
|
const platform = `${process.platform}-${process.arch}`;
|
|
57
|
+
const fromPackage = indexerPackageName(process.platform, process.arch);
|
|
57
58
|
return [
|
|
59
|
+
// A binary beside this module: what `build-native.sh` produces locally, and what earlier
|
|
60
|
+
// releases shipped inside this package itself.
|
|
58
61
|
`../sessiongraph-core.${platform}.node`,
|
|
59
62
|
`../dsh-plugin-sessiongraph-native.${platform}.node`,
|
|
60
63
|
`dsh-plugin-sessiongraph-native-${platform}`,
|
|
64
|
+
// The published one-per-platform package (an optional dependency of this one). Asked for by name
|
|
65
|
+
// rather than by path: only module resolution knows where a dependency actually landed.
|
|
66
|
+
...fromPackage === undefined ? [] : [fromPackage],
|
|
61
67
|
'../sessiongraph-core.node',
|
|
62
68
|
];
|
|
63
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* The optional platform package that carries this platform's kernel, if the project publishes one.
|
|
72
|
+
* @param platform - `process.platform`.
|
|
73
|
+
* @param arch - `process.arch`.
|
|
74
|
+
* @returns the package name, or `undefined` for a platform with no published build.
|
|
75
|
+
*/
|
|
76
|
+
export function indexerPackageName(platform, arch) {
|
|
77
|
+
const suffix = INDEXER_PACKAGES[`${platform}-${arch}`];
|
|
78
|
+
return suffix === undefined ? undefined : `dsh-plugin-sessiongraph-indexer-${suffix}`;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Suffix each published platform package carries, keyed by `platform-arch`.
|
|
82
|
+
*
|
|
83
|
+
* Not mechanical: the Linux builds are `-gnu` because a musl build would be a separate artifact, and
|
|
84
|
+
* Windows spells its ABI out. An explicit table keeps this from computing a name nobody publishes.
|
|
85
|
+
*/
|
|
86
|
+
const INDEXER_PACKAGES = {
|
|
87
|
+
'darwin-arm64': 'darwin-arm64',
|
|
88
|
+
'darwin-x64': 'darwin-x64',
|
|
89
|
+
'linux-x64': 'linux-x64-gnu',
|
|
90
|
+
'linux-arm64': 'linux-arm64-gnu',
|
|
91
|
+
'win32-x64': 'win32-x64-msvc',
|
|
92
|
+
};
|
|
64
93
|
/**
|
|
65
94
|
* Narrow a loaded module to the kernel surface.
|
|
66
95
|
* @param value - whatever `require` returned.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-sessiongraph-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Native Rust index kernel for DeepSeek Harness sessiongraph — scan, multi-frame zstd decode, JSONL parse and SQLite write, exposed to Node through napi-rs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
|
-
"*.node",
|
|
41
40
|
"lib/**/*.js",
|
|
42
41
|
"lib/**/*.d.ts"
|
|
43
42
|
],
|
|
@@ -48,6 +47,13 @@
|
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@types/node": "^22.10.0"
|
|
50
49
|
},
|
|
50
|
+
"optionalDependencies": {
|
|
51
|
+
"dsh-plugin-sessiongraph-indexer-darwin-arm64": "0.1.19",
|
|
52
|
+
"dsh-plugin-sessiongraph-indexer-darwin-x64": "0.1.19",
|
|
53
|
+
"dsh-plugin-sessiongraph-indexer-linux-x64-gnu": "0.1.19",
|
|
54
|
+
"dsh-plugin-sessiongraph-indexer-linux-arm64-gnu": "0.1.19",
|
|
55
|
+
"dsh-plugin-sessiongraph-indexer-win32-x64-msvc": "0.1.19"
|
|
56
|
+
},
|
|
51
57
|
"scripts": {
|
|
52
58
|
"build": "tsc -b",
|
|
53
59
|
"build:native": "./build-native.sh"
|