cyt-indexer-sdk 0.3.2 → 0.3.4
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 +6 -0
- package/cyt-indexer-sdk.darwin-x64.node +0 -0
- package/cyt-indexer-sdk.linux-arm64-gnu.node +0 -0
- package/cyt-indexer-sdk.linux-x64-gnu.node +0 -0
- package/cyt-indexer-sdk.win32-arm64-msvc.node +0 -0
- package/cyt-indexer-sdk.win32-x64-msvc.node +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/native.d.ts +6 -0
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +6 -0
- package/dist/native.js.map +1 -1
- package/dist/paths.js +10 -1
- package/dist/paths.js.map +1 -1
- package/dist/policies.d.ts +7 -3
- package/dist/policies.d.ts.map +1 -1
- package/dist/policies.js +13 -1
- package/dist/policies.js.map +1 -1
- package/dist/retrieve.d.ts +15 -0
- package/dist/retrieve.d.ts.map +1 -1
- package/dist/retrieve.js +12 -1
- package/dist/retrieve.js.map +1 -1
- package/dist/test/policies.test.d.ts +2 -0
- package/dist/test/policies.test.d.ts.map +1 -0
- package/dist/test/policies.test.js +35 -0
- package/dist/test/policies.test.js.map +1 -0
- package/dist/test/smoke.test.js +33 -1
- package/dist/test/smoke.test.js.map +1 -1
- package/native.cjs +58 -52
- package/native.d.ts +93 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,12 @@ import {
|
|
|
31
31
|
anthropicToolsToCatalogEntries,
|
|
32
32
|
buildCatalogFromTools,
|
|
33
33
|
buildCatalogIndex,
|
|
34
|
+
loadCatalog,
|
|
35
|
+
removedChunks,
|
|
34
36
|
retrieveTools,
|
|
35
37
|
} from "cyt-indexer-sdk";
|
|
38
|
+
|
|
39
|
+
const full = loadCatalog(".catalog");
|
|
40
|
+
const surviving = /* survivors.json */;
|
|
41
|
+
const removed = removedChunks(full, surviving);
|
|
36
42
|
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** TypeScript SDK for cyt-indexer (Rust-backed catalog indexing). */
|
|
2
2
|
export { CatalogIndex, anthropicToolToCatalogEntry, anthropicToolsToCatalogEntries, buildCatalogFromTools, buildCatalogIndex, catalogToolCount, collectEnums, prepareToolEntry, truncateDescription, } from "./build.js";
|
|
3
|
-
export { DecomposedCatalog, loadCatalog, retrieveTools, type JsonRecord, type PolicyContextJs, type PolicyOptions, type RetrieveToolsOptions, } from "./retrieve.js";
|
|
3
|
+
export { DecomposedCatalog, chunkSurvivorKey, loadCatalog, removedChunks, retrieveTools, type DecomposedCatalogDict, type JsonRecord, type PolicyContextJs, type PolicyOptions, type RemovedChunksOptions, type RetrieveToolsOptions, } from "./retrieve.js";
|
|
4
4
|
export { configureRuntimeDefaults, decomposedScore, emptyOptionalFallbackK, enumScore, rerankScore, type RuntimeDefaultsConfig, } from "./runtime-defaults.js";
|
|
5
5
|
export { configurePathConstants, decomposedPrefix, getRootToolKey, jsonExt, mdExt, toDecomposedKey, toolIdFromDecomposedRel, } from "./paths.js";
|
|
6
6
|
export { CatalogBuilder, writeCatalogIndex } from "./catalog-io.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EACL,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,EAC9B,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,WAAW,EACX,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,KAAK,EACL,eAAe,EACf,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EACL,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,EAC9B,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,WAAW,EACX,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,KAAK,EACL,eAAe,EACf,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** TypeScript SDK for cyt-indexer (Rust-backed catalog indexing). */
|
|
2
2
|
export { CatalogIndex, anthropicToolToCatalogEntry, anthropicToolsToCatalogEntries, buildCatalogFromTools, buildCatalogIndex, catalogToolCount, collectEnums, prepareToolEntry, truncateDescription, } from "./build.js";
|
|
3
|
-
export { DecomposedCatalog, loadCatalog, retrieveTools, } from "./retrieve.js";
|
|
3
|
+
export { DecomposedCatalog, chunkSurvivorKey, loadCatalog, removedChunks, retrieveTools, } from "./retrieve.js";
|
|
4
4
|
export { configureRuntimeDefaults, decomposedScore, emptyOptionalFallbackK, enumScore, rerankScore, } from "./runtime-defaults.js";
|
|
5
5
|
export { configurePathConstants, decomposedPrefix, getRootToolKey, jsonExt, mdExt, toDecomposedKey, toolIdFromDecomposedRel, } from "./paths.js";
|
|
6
6
|
export { CatalogBuilder, writeCatalogIndex } from "./catalog-io.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EACL,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,EAC9B,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EACL,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,EAC9B,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,GAOd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,WAAW,GAEZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,KAAK,EACL,eAAe,EACf,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,sDAAsD;AACtD,cAAc,eAAe,CAAC"}
|
package/dist/native.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare const catalogIndexToCatalogDictNative: typeof import("../native.d
|
|
|
9
9
|
export declare const loadCatalogNative: typeof import("../native.d.ts").loadCatalog;
|
|
10
10
|
export declare const retrieveCoreNative: typeof import("../native.d.ts").retrieveCore;
|
|
11
11
|
export declare const retrieveToolsNative: typeof import("../native.d.ts").retrieveTools;
|
|
12
|
+
export declare const chunkSurvivorKeyNative: typeof import("../native.d.ts").chunkSurvivorKey;
|
|
13
|
+
export declare const removedChunksNative: typeof import("../native.d.ts").removedChunks;
|
|
12
14
|
export declare const DecomposedCatalogNative: typeof import("../native.d.ts").DecomposedCatalog;
|
|
13
15
|
export declare const configurePathConstantsNative: typeof import("../native.d.ts").configurePathConstants;
|
|
14
16
|
export declare const pathMdExtNative: typeof import("../native.d.ts").mdExt;
|
|
@@ -38,6 +40,10 @@ export declare const isDecomposedToolRootChunkNative: typeof import("../native.d
|
|
|
38
40
|
export declare const isDecomposedOptionalPropertyChunkNative: typeof import("../native.d.ts").isDecomposedOptionalPropertyChunk;
|
|
39
41
|
export declare const filterRecomposeJsonEntriesNative: typeof import("../native.d.ts").filterRecomposeJsonEntries;
|
|
40
42
|
export declare const mitigateEmptyOptionalPropertiesNative: typeof import("../native.d.ts").mitigateEmptyOptionalProperties;
|
|
43
|
+
export declare const appendDescriptionReinstateEntriesNative: typeof import("../native.d.ts").appendDescriptionReinstateEntries;
|
|
44
|
+
export declare const needsDescriptionReinstateNative: typeof import("../native.d.ts").needsDescriptionReinstate;
|
|
45
|
+
export declare const isDescriptionPolicyNative: typeof import("../native.d.ts").isDescriptionPolicy;
|
|
46
|
+
export declare const scoringPolicyNative: typeof import("../native.d.ts").scoringPolicy;
|
|
41
47
|
export declare const dropRecomposedToolsWithEmptyPropertiesNative: typeof import("../native.d.ts").dropRecomposedToolsWithEmptyProperties;
|
|
42
48
|
export declare const rootToolIdFromChunkNative: typeof import("../native.d.ts").rootToolIdFromChunk;
|
|
43
49
|
export declare const isNonSystemToolIdNative: typeof import("../native.d.ts").isNonSystemToolId;
|
package/dist/native.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB,mDAA2B,CAAC;AAChE,eAAO,MAAM,2BAA2B,uDAA+B,CAAC;AACxE,eAAO,MAAM,sBAAsB,kDAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,6DACV,CAAC;AACrC,eAAO,MAAM,oCAAoC,gEACV,CAAC;AACxC,eAAO,MAAM,yBAAyB,qDAA6B,CAAC;AACpE,eAAO,MAAM,sBAAsB,kDAA0B,CAAC;AAC9D,eAAO,MAAM,+BAA+B,2DAAmC,CAAC;AAGhF,eAAO,MAAM,iBAAiB,6CAAqB,CAAC;AACpD,eAAO,MAAM,kBAAkB,8CAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,+CAAuB,C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ACV,CAAC;AACtC,eAAO,MAAM,0CAA0C,sEACV,CAAC;AAC9C,eAAO,MAAM,uCAAuC,mEACV,CAAC;AAG3C,eAAO,MAAM,uBAAuB,mDAA2B,CAAC;AAChE,eAAO,MAAM,oBAAoB,gDAAwB,CAAC;AAG1D,eAAO,MAAM,gCAAgC,4DACV,CAAC;AACpC,eAAO,MAAM,8BAA8B,0DAAkC,CAAC;AAC9E,eAAO,MAAM,yBAAyB,qDAA6B,CAAC;AACpE,eAAO,MAAM,sBAAsB,kDAA0B,CAAC;AAE9D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/native.js
CHANGED
|
@@ -14,6 +14,8 @@ export const catalogIndexToCatalogDictNative = native.catalogIndexToCatalogDict;
|
|
|
14
14
|
export const loadCatalogNative = native.loadCatalog;
|
|
15
15
|
export const retrieveCoreNative = native.retrieveCore;
|
|
16
16
|
export const retrieveToolsNative = native.retrieveTools;
|
|
17
|
+
export const chunkSurvivorKeyNative = native.chunkSurvivorKey;
|
|
18
|
+
export const removedChunksNative = native.removedChunks;
|
|
17
19
|
export const DecomposedCatalogNative = native.DecomposedCatalog;
|
|
18
20
|
// Paths
|
|
19
21
|
export const configurePathConstantsNative = native.configurePathConstants;
|
|
@@ -46,6 +48,10 @@ export const isDecomposedToolRootChunkNative = native.isDecomposedToolRootChunk;
|
|
|
46
48
|
export const isDecomposedOptionalPropertyChunkNative = native.isDecomposedOptionalPropertyChunk;
|
|
47
49
|
export const filterRecomposeJsonEntriesNative = native.filterRecomposeJsonEntries;
|
|
48
50
|
export const mitigateEmptyOptionalPropertiesNative = native.mitigateEmptyOptionalProperties;
|
|
51
|
+
export const appendDescriptionReinstateEntriesNative = native.appendDescriptionReinstateEntries;
|
|
52
|
+
export const needsDescriptionReinstateNative = native.needsDescriptionReinstate;
|
|
53
|
+
export const isDescriptionPolicyNative = native.isDescriptionPolicy;
|
|
54
|
+
export const scoringPolicyNative = native.scoringPolicy;
|
|
49
55
|
export const dropRecomposedToolsWithEmptyPropertiesNative = native.dropRecomposedToolsWithEmptyProperties;
|
|
50
56
|
export const rootToolIdFromChunkNative = native.rootToolIdFromChunk;
|
|
51
57
|
export const isNonSystemToolIdNative = native.isNonSystemToolId;
|
package/dist/native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAoC,CAAC;AAE3E,kBAAkB;AAClB,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAChE,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACxE,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAC5C,MAAM,CAAC,2BAA2B,CAAC;AACrC,MAAM,CAAC,MAAM,oCAAoC,GAC/C,MAAM,CAAC,8BAA8B,CAAC;AACxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9D,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAEhF,WAAW;AACX,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAAC;AACpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,YAAY,CAAC;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,CAAC;AACxD,MAAM,CAAC,MAAM,uBAAuB,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C;AACtC,MAAM,CAAC,MAAM,0CAA0C,GACrD,MAAM,CAAC,oCAAoC,CAAC;AAC9C,MAAM,CAAC,MAAM,uCAAuC,GAClD,MAAM,CAAC,iCAAiC,CAAC;AAE3C,cAAc;AACd,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC;AAE1D,YAAY;AACZ,MAAM,CAAC,MAAM,gCAAgC,GAC3C,MAAM,CAAC,0BAA0B,CAAC;AACpC,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,gBAAgB,CAAC"}
|
package/dist/paths.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { collectEnumsNative, configurePathConstantsNative, getRootToolKeyNative, pathDecomposedPrefixNative, pathJsonExtNative, pathMdExtNative, toDecomposedKeyNative, toolIdFromDecomposedRelNative, } from "./native.js";
|
|
2
2
|
/** Push host app overrides into native PathConfig (Rust defaults when not called). */
|
|
3
3
|
export function configurePathConstants(opts) {
|
|
4
|
-
configurePathConstantsNative(
|
|
4
|
+
configurePathConstantsNative({
|
|
5
|
+
mdExt: opts.mdExt,
|
|
6
|
+
jsonExt: opts.jsonExt,
|
|
7
|
+
decomposedPrefix: opts.decomposedPrefix,
|
|
8
|
+
decomposedRoot: opts.decomposedRoot,
|
|
9
|
+
catalogPrefix: opts.catalogPrefix,
|
|
10
|
+
builderMemoryOnly: opts.builderMemoryOnly,
|
|
11
|
+
defaultCatalogDir: opts.defaultCatalogDir,
|
|
12
|
+
writeCatalogPrune: opts.writeCatalogPrune,
|
|
13
|
+
});
|
|
5
14
|
}
|
|
6
15
|
export function mdExt() {
|
|
7
16
|
return pathMdExtNative();
|
package/dist/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAGrB,sFAAsF;AACtF,MAAM,UAAU,sBAAsB,CAAC,IAStC;IACC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAGrB,sFAAsF;AACtF,MAAM,UAAU,sBAAsB,CAAC,IAStC;IACC,4BAA4B,CAAC;QAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;KAC1C,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,OAAO,eAAe,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,OAAO,iBAAiB,EAAE,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,0BAA0B,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,OAAO,6BAA6B,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,OAAO,kBAAkB,CAAC,MAAoB,CAAC,CAAC;AAClD,CAAC"}
|
package/dist/policies.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { PolicyContextNative } from "./native.js";
|
|
3
3
|
import type { JsonRecord } from "./types.js";
|
|
4
4
|
type PolicyContext = InstanceType<typeof PolicyContextNative>;
|
|
5
|
-
export type SystemToolPolicy = "always_include" | "prune_optional" | "prune_all";
|
|
6
|
-
export type MCPToolPolicy = "always_include" | "prune_optional" | "prune_all";
|
|
7
|
-
export type ToolPolicy = "always_include" | "prune_optional" | "prune_all";
|
|
5
|
+
export type SystemToolPolicy = "always_include" | "prune_optional" | "prune_all" | "prune_optional_descriptions" | "prune_all_descriptions";
|
|
6
|
+
export type MCPToolPolicy = "always_include" | "prune_optional" | "prune_all" | "prune_optional_descriptions" | "prune_all_descriptions";
|
|
7
|
+
export type ToolPolicy = "always_include" | "prune_optional" | "prune_all" | "prune_optional_descriptions" | "prune_all_descriptions";
|
|
8
8
|
export { PolicyContextNative as PolicyContext };
|
|
9
9
|
export declare function toolPolicies(): string[];
|
|
10
10
|
export declare function policyContextFromValues(config: JsonRecord): PolicyContext;
|
|
@@ -48,6 +48,10 @@ export declare function requiredEnumValuesByTool(data: JsonRecord): Record<strin
|
|
|
48
48
|
export declare function optionalLeafSurvivedRerank(item: JsonRecord, ctx: PolicyContext, rerankScore?: number | null, llmSelectedPaths?: Iterable<string> | null): boolean;
|
|
49
49
|
export declare function filterRecomposeJsonEntries(jsonList: JsonRecord[], ctx: PolicyContext, rerankScore?: number | null, llmSelectedPaths?: Iterable<string> | null): JsonRecord[];
|
|
50
50
|
export declare function mitigateEmptyOptionalProperties(entries: JsonRecord[], catalogIndex: JsonRecord, ctx: PolicyContext, postRerankScored: JsonRecord | null | undefined, pipeline: string[]): JsonRecord[];
|
|
51
|
+
export declare function appendDescriptionReinstateEntries(entries: JsonRecord[], buildCatalog: JsonRecord, catalogIndex: JsonRecord, ctx: PolicyContext): JsonRecord[];
|
|
52
|
+
export declare function needsDescriptionReinstate(ctx: PolicyContext): boolean;
|
|
53
|
+
export declare function isDescriptionPolicy(policy: string): boolean;
|
|
54
|
+
export declare function scoringPolicy(policy: string): ToolPolicy;
|
|
51
55
|
export declare function directRootOptionalChunksForTool(items: JsonRecord[], toolId: string): JsonRecord[];
|
|
52
56
|
export declare function rootChunkPropertiesEmpty(item: JsonRecord): boolean;
|
|
53
57
|
export declare function toolIdHasEmptyDecomposedRoot(catalogIndex: JsonRecord, toolId: string): boolean;
|
package/dist/policies.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EAqDL,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,KAAK,aAAa,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,gBAAgB,GAChB,WAAW,GACX,6BAA6B,GAC7B,wBAAwB,CAAC;AAC7B,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAChB,gBAAgB,GAChB,WAAW,GACX,6BAA6B,GAC7B,wBAAwB,CAAC;AAC7B,MAAM,MAAM,U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C,QAAQ,EAAE,MAAM,EAAE,GACjB,UAAU,EAAE,CAQd;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,UAAU,EAAE,EACrB,YAAY,EAAE,UAAU,EACxB,YAAY,EAAE,UAAU,EACxB,GAAG,EAAE,aAAa,GACjB,UAAU,EAAE,CAOd;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAErE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAExD;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,UAAU,EAAE,EACnB,MAAM,EAAE,MAAM,GACb,UAAU,EAAE,CAEd;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAElE;AAED,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,UAAU,EACxB,MAAM,EAAE,MAAM,GACb,OAAO,CAET;AAED,wBAAgB,oCAAoC,CAClD,YAAY,EAAE,UAAU,EACxB,MAAM,EAAE,MAAM,GACb,OAAO,CAET;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAE3E;AAED,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,UAAU,EAAE,EACnB,YAAY,EAAE,UAAU,EACxB,GAAG,EAAE,aAAa,GACjB,UAAU,EAAE,CAMd"}
|
package/dist/policies.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Tool policy helpers (Rust-backed). */
|
|
2
|
-
import { anthropicToolIsMcpNative, anthropicToolIsSystemNative, catalogNeedsPartitionNative, catalogNeedsPrunedRecomposeNative, chunkToolIdNative, directRootOptionalChunksForToolNative, dropRecomposedToolsWithEmptyPropertiesNative, effectivePolicyNative, entriesForPolicyNative, filterRecomposeJsonEntriesNative, fullPassThroughNative, isDecomposedOptionalPropertyChunkNative, isDecomposedToolRootChunkNative, isDirectRootOptionalPropertyChunkNative, isMcpOptionalChunkNative, isMcpRootChunkNative, isNonSystemChunkNative, isNonSystemToolIdNative, isSystemChunkNative, isSystemOptionalChunkNative, isSystemRootChunkNative, isSystemToolIdNative, mergeCatalogNative, mergeToolsPreservingOrderNative, mitigateEmptyOptionalPropertiesNative, mcpRequiredEnumValuesNative, mcpToolsPassThroughNative, needsPartitionNative, needsPrunedRecomposeNative, optionalLeafSurvivedRerankNative, partitionCatalogNative, policyContextFromValuesNative, requestPassThroughNative, requiredEnumValuesByToolNative, restoreMcpToolsNative, restoreSystemToolsNative, rootChunkPropertiesEmptyNative, rootToolIdFromChunkNative, splitAnthropicToolsNative, stashMcpToolsNative, stashSystemToolsNative, systemRequiredEnumValuesNative, systemToolsPassThroughNative, toolIdHadEmptyOriginalRootPropertiesNative, toolIdHasEmptyDecomposedRootNative, toolPassThroughNative, toolPoliciesNative, toolsForCatalogNative, PolicyContextNative, } from "./native.js";
|
|
2
|
+
import { anthropicToolIsMcpNative, anthropicToolIsSystemNative, appendDescriptionReinstateEntriesNative, catalogNeedsPartitionNative, catalogNeedsPrunedRecomposeNative, chunkToolIdNative, directRootOptionalChunksForToolNative, dropRecomposedToolsWithEmptyPropertiesNative, effectivePolicyNative, entriesForPolicyNative, filterRecomposeJsonEntriesNative, fullPassThroughNative, isDecomposedOptionalPropertyChunkNative, isDecomposedToolRootChunkNative, isDescriptionPolicyNative, isDirectRootOptionalPropertyChunkNative, isMcpOptionalChunkNative, isMcpRootChunkNative, isNonSystemChunkNative, isNonSystemToolIdNative, isSystemChunkNative, isSystemOptionalChunkNative, isSystemRootChunkNative, isSystemToolIdNative, mergeCatalogNative, mergeToolsPreservingOrderNative, mitigateEmptyOptionalPropertiesNative, mcpRequiredEnumValuesNative, mcpToolsPassThroughNative, needsDescriptionReinstateNative, needsPartitionNative, needsPrunedRecomposeNative, optionalLeafSurvivedRerankNative, partitionCatalogNative, policyContextFromValuesNative, requestPassThroughNative, requiredEnumValuesByToolNative, restoreMcpToolsNative, restoreSystemToolsNative, rootChunkPropertiesEmptyNative, rootToolIdFromChunkNative, scoringPolicyNative, splitAnthropicToolsNative, stashMcpToolsNative, stashSystemToolsNative, systemRequiredEnumValuesNative, systemToolsPassThroughNative, toolIdHadEmptyOriginalRootPropertiesNative, toolIdHasEmptyDecomposedRootNative, toolPassThroughNative, toolPoliciesNative, toolsForCatalogNative, PolicyContextNative, } from "./native.js";
|
|
3
3
|
export { PolicyContextNative as PolicyContext };
|
|
4
4
|
export function toolPolicies() {
|
|
5
5
|
return toolPoliciesNative();
|
|
@@ -132,6 +132,18 @@ export function filterRecomposeJsonEntries(jsonList, ctx, rerankScore, llmSelect
|
|
|
132
132
|
export function mitigateEmptyOptionalProperties(entries, catalogIndex, ctx, postRerankScored, pipeline) {
|
|
133
133
|
return mitigateEmptyOptionalPropertiesNative(entries, catalogIndex, ctx, postRerankScored ?? undefined, pipeline);
|
|
134
134
|
}
|
|
135
|
+
export function appendDescriptionReinstateEntries(entries, buildCatalog, catalogIndex, ctx) {
|
|
136
|
+
return appendDescriptionReinstateEntriesNative(entries, buildCatalog, catalogIndex, ctx);
|
|
137
|
+
}
|
|
138
|
+
export function needsDescriptionReinstate(ctx) {
|
|
139
|
+
return needsDescriptionReinstateNative(ctx);
|
|
140
|
+
}
|
|
141
|
+
export function isDescriptionPolicy(policy) {
|
|
142
|
+
return isDescriptionPolicyNative(policy);
|
|
143
|
+
}
|
|
144
|
+
export function scoringPolicy(policy) {
|
|
145
|
+
return scoringPolicyNative(policy);
|
|
146
|
+
}
|
|
135
147
|
export function directRootOptionalChunksForTool(items, toolId) {
|
|
136
148
|
return directRootOptionalChunksForToolNative(items, toolId);
|
|
137
149
|
}
|
package/dist/policies.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,iCAAiC,EACjC,iBAAiB,EACjB,qCAAqC,EACrC,4CAA4C,EAC5C,qBAAqB,EACrB,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,EACrB,uCAAuC,EACvC,+BAA+B,EAC/B,uCAAuC,EACvC,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,+BAA+B,EAC/B,qCAAqC,EACrC,2BAA2B,EAC3B,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,gCAAgC,EAChC,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,EAC5B,0CAA0C,EAC1C,kCAAkC,EAClC,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,uCAAuC,EACvC,2BAA2B,EAC3B,iCAAiC,EACjC,iBAAiB,EACjB,qCAAqC,EACrC,4CAA4C,EAC5C,qBAAqB,EACrB,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,EACrB,uCAAuC,EACvC,+BAA+B,EAC/B,yBAAyB,EACzB,uCAAuC,EACvC,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,+BAA+B,EAC/B,qCAAqC,EACr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Ac;IAEd,OAAO,0CAA0C,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,IAAgB;IAChE,OAAO,uCAAuC,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,KAAmB,EACnB,YAAwB,EACxB,GAAkB;IAElB,OAAO,4CAA4C,CACjD,KAAK,EACL,YAAY,EACZ,GAAG,CACY,CAAC;AACpB,CAAC"}
|
package/dist/retrieve.d.ts
CHANGED
|
@@ -11,6 +11,21 @@ export declare function loadCatalog(dirPath: string): {
|
|
|
11
11
|
json: JsonRecord[];
|
|
12
12
|
tools: JsonRecord[];
|
|
13
13
|
};
|
|
14
|
+
/** Catalog dict shape produced by {@link loadCatalog} and rerank survivors output. */
|
|
15
|
+
export interface DecomposedCatalogDict {
|
|
16
|
+
json: JsonRecord[];
|
|
17
|
+
md: JsonRecord[];
|
|
18
|
+
}
|
|
19
|
+
export interface RemovedChunksOptions {
|
|
20
|
+
/** When true, json entries in `surviving` with score <= decomposed threshold count as removed. */
|
|
21
|
+
applyDecomposedScoreFilter?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Normalized identity for a catalog chunk (`json` or `md` array item). */
|
|
24
|
+
export declare function chunkSurvivorKey(item: JsonRecord, section: "json" | "md"): string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Decomposed chunks in `fullCatalog` that are not in `surviving` (same shape as survivors.json).
|
|
27
|
+
*/
|
|
28
|
+
export declare function removedChunks(fullCatalog: DecomposedCatalogDict, surviving: DecomposedCatalogDict, options?: RemovedChunksOptions): DecomposedCatalogDict;
|
|
14
29
|
export interface RetrieveToolsOptions {
|
|
15
30
|
catalog: DecomposedCatalog | CatalogIndex;
|
|
16
31
|
applyDecomposedScoreFilter?: boolean;
|
package/dist/retrieve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve.d.ts","sourceRoot":"","sources":["../src/retrieve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"retrieve.d.ts","sourceRoot":"","sources":["../src/retrieve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE3D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG;IAC5C,EAAE,EAAE,UAAU,EAAE,CAAC;IACjB,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB,CAMA;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,EAAE,EAAE,UAAU,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,kGAAkG;IAClG,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,GAAG,IAAI,GACrB,MAAM,GAAG,IAAI,CAEf;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,qBAAqB,EAClC,SAAS,EAAE,qBAAqB,EAChC,OAAO,GAAE,oBAAyB,GACjC,qBAAqB,CAOvB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC;IAC1C,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACzC,GAAG,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;IAClE,wEAAwE;IACxE,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AA4DD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,oBAAoB,GAC5B,UAAU,EAAE,CAyBd"}
|
package/dist/retrieve.js
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { CatalogIndex } from "./build.js";
|
|
2
2
|
import { DecomposedCatalog } from "./decomposed-catalog.js";
|
|
3
|
-
import { loadCatalogNative, retrieveCoreNative, retrieveToolsNative, } from "./native.js";
|
|
3
|
+
import { chunkSurvivorKeyNative, loadCatalogNative, removedChunksNative, retrieveCoreNative, retrieveToolsNative, } from "./native.js";
|
|
4
4
|
import { isJsonRecord } from "./types.js";
|
|
5
5
|
export { DecomposedCatalog };
|
|
6
6
|
export function loadCatalog(dirPath) {
|
|
7
7
|
return loadCatalogNative(dirPath);
|
|
8
8
|
}
|
|
9
|
+
/** Normalized identity for a catalog chunk (`json` or `md` array item). */
|
|
10
|
+
export function chunkSurvivorKey(item, section) {
|
|
11
|
+
return chunkSurvivorKeyNative(item, section);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Decomposed chunks in `fullCatalog` that are not in `surviving` (same shape as survivors.json).
|
|
15
|
+
*/
|
|
16
|
+
export function removedChunks(fullCatalog, surviving, options = {}) {
|
|
17
|
+
const { applyDecomposedScoreFilter = false } = options;
|
|
18
|
+
return removedChunksNative(fullCatalog, surviving, applyDecomposedScoreFilter);
|
|
19
|
+
}
|
|
9
20
|
function catalogToNative(catalog) {
|
|
10
21
|
if (catalog instanceof CatalogIndex) {
|
|
11
22
|
return { tools: catalog.tools, files: catalog.files };
|
package/dist/retrieve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve.js","sourceRoot":"","sources":["../src/retrieve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GAGpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAmB,MAAM,YAAY,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,MAAM,UAAU,WAAW,CAAC,OAAe;IAKzC,OAAO,iBAAiB,CAAC,OAAO,CAI/B,CAAC;AACJ,CAAC;AAWD,SAAS,eAAe,CACtB,OAAyC;IAEzC,IAAI,OAAO,YAAY,YAAY,EAAE,CAAC;QACpC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACxD,CAAC;IACD,IAAI,OAAO,YAAY,iBAAiB,EAAE,CAAC;QACzC,OAAO,OAAO,CAAC,WAAW,EAAgB,CAAC;IAC7C,CAAC;IACD,OAAO,OAAqB,CAAC;AAC/B,CAAC;AAED,SAAS,yBAAyB,CAChC,OAAyC;IAEzC,IAAI,OAAO,YAAY,YAAY,EAAE,CAAC;QACpC,OAAO,OAAO,CAAC,KAAK,CAAC;IACvB,CAAC;IACD,IAAI,OAAO,YAAY,iBAAiB,EAAE,CAAC;QACzC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;IAC/B,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,6BAA6B,CACpC,WAAuB,EACvB,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,EACX,OAAO,EACP,0BAA0B,EAC1B,cAAc,EACd,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.test.d.ts","sourceRoot":"","sources":["../../src/test/policies.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
import { PolicyContext, isDescriptionPolicy, needsDescriptionReinstate, scoringPolicy, toolPolicies, } from "../policies.js";
|
|
4
|
+
test("toolPolicies includes description variants", () => {
|
|
5
|
+
const policies = toolPolicies();
|
|
6
|
+
assert.ok(policies.includes("prune_optional_descriptions"));
|
|
7
|
+
assert.ok(policies.includes("prune_all_descriptions"));
|
|
8
|
+
assert.equal(policies.length, 5);
|
|
9
|
+
});
|
|
10
|
+
test("isDescriptionPolicy recognizes description variants only", () => {
|
|
11
|
+
assert.equal(isDescriptionPolicy("prune_optional_descriptions"), true);
|
|
12
|
+
assert.equal(isDescriptionPolicy("prune_all_descriptions"), true);
|
|
13
|
+
assert.equal(isDescriptionPolicy("prune_optional"), false);
|
|
14
|
+
assert.equal(isDescriptionPolicy("prune_all"), false);
|
|
15
|
+
assert.equal(isDescriptionPolicy("always_include"), false);
|
|
16
|
+
assert.equal(isDescriptionPolicy("not-a-policy"), false);
|
|
17
|
+
});
|
|
18
|
+
test("scoringPolicy maps description variants to base policies", () => {
|
|
19
|
+
assert.equal(scoringPolicy("prune_optional_descriptions"), "prune_optional");
|
|
20
|
+
assert.equal(scoringPolicy("prune_all_descriptions"), "prune_all");
|
|
21
|
+
assert.equal(scoringPolicy("prune_optional"), "prune_optional");
|
|
22
|
+
assert.equal(scoringPolicy("always_include"), "always_include");
|
|
23
|
+
});
|
|
24
|
+
test("needsDescriptionReinstate reflects context policies", () => {
|
|
25
|
+
const base = new PolicyContext("prune_optional", "prune_all");
|
|
26
|
+
assert.equal(needsDescriptionReinstate(base), false);
|
|
27
|
+
const systemDesc = new PolicyContext("prune_optional_descriptions", "prune_all");
|
|
28
|
+
assert.equal(needsDescriptionReinstate(systemDesc), true);
|
|
29
|
+
const mcpDesc = new PolicyContext("prune_optional", "prune_all_descriptions");
|
|
30
|
+
assert.equal(needsDescriptionReinstate(mcpDesc), true);
|
|
31
|
+
const perTool = new PolicyContext("prune_optional", "prune_all");
|
|
32
|
+
perTool.perTool = { Agent: "prune_optional_descriptions" };
|
|
33
|
+
assert.equal(needsDescriptionReinstate(perTool), true);
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=policies.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.test.js","sourceRoot":"","sources":["../../src/test/policies.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,EACb,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACtD,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,0DAA0D,EAAE,GAAG,EAAE;IACpE,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,EAAE,IAAI,CAAC,CAAC;IACvE,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,EAAE,IAAI,CAAC,CAAC;IAClE,MAAM,CAA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EAAE,IAAI,CAAC,CAAC;IAEvD,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IACjE,OAAO,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC;IAC3D,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC"}
|
package/dist/test/smoke.test.js
CHANGED
|
@@ -3,7 +3,7 @@ import test from "node:test";
|
|
|
3
3
|
import { CatalogIndex } from "../build.js";
|
|
4
4
|
import { DecomposedCatalog } from "../decomposed-catalog.js";
|
|
5
5
|
import { configureRuntimeDefaults, decomposedScore, enumScore, } from "../runtime-defaults.js";
|
|
6
|
-
import { retrieveTools } from "../retrieve.js";
|
|
6
|
+
import { chunkSurvivorKey, removedChunks, retrieveTools } from "../retrieve.js";
|
|
7
7
|
import { decomposedPrefix } from "../paths.js";
|
|
8
8
|
test("score constants match Python SDK defaults", () => {
|
|
9
9
|
configureRuntimeDefaults({
|
|
@@ -88,6 +88,38 @@ test("retrieveTools accepts DecomposedCatalog and CatalogIndex", () => {
|
|
|
88
88
|
});
|
|
89
89
|
assert.ok(Array.isArray(fromIndex));
|
|
90
90
|
});
|
|
91
|
+
test("removedChunks excludes survivors by decomposed key", () => {
|
|
92
|
+
const prefix = decomposedPrefix();
|
|
93
|
+
const full = {
|
|
94
|
+
json: [
|
|
95
|
+
{
|
|
96
|
+
file_path: `${prefix}Agent.json`,
|
|
97
|
+
content: { name: "Agent" },
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
file_path: `${prefix}Agent/extra.json`,
|
|
101
|
+
content: {},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
md: [
|
|
105
|
+
{ file_path: `${prefix}haiku.md`, content: "haiku" },
|
|
106
|
+
{ file_path: `${prefix}sonnet.md`, content: "sonnet" },
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
const surviving = {
|
|
110
|
+
json: [{ file_path: `src/catalog/${prefix}Agent.json` }],
|
|
111
|
+
md: [{ file_path: `src/catalog/${prefix}haiku.md` }],
|
|
112
|
+
};
|
|
113
|
+
const removed = removedChunks(full, surviving);
|
|
114
|
+
assert.equal(removed.json.length, 1);
|
|
115
|
+
assert.equal(removed.json[0]?.file_path, `${prefix}Agent/extra.json`);
|
|
116
|
+
assert.equal(removed.md.length, 1);
|
|
117
|
+
assert.equal(removed.md[0]?.file_path, `${prefix}sonnet.md`);
|
|
118
|
+
});
|
|
119
|
+
test("chunkSurvivorKey normalizes file paths", () => {
|
|
120
|
+
const prefix = decomposedPrefix();
|
|
121
|
+
assert.equal(chunkSurvivorKey({ file_path: `src/catalog/${prefix}Agent.json` }, "json"), `${prefix}Agent.json`);
|
|
122
|
+
});
|
|
91
123
|
test("retrieveTools treats non-object data as empty catalog dict", () => {
|
|
92
124
|
const toolJson = `${decomposedPrefix()}search.json`;
|
|
93
125
|
const catalog = new DecomposedCatalog({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smoke.test.js","sourceRoot":"","sources":["../../src/test/smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,SAAS,GACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"smoke.test.js","sourceRoot":"","sources":["../../src/test/smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,E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C,CAAC,CAAC;AAEH,IAAI,CAAC,wCAAwC,EAAE,GAAG,EAAE;IAClD,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAClC,MAAM,CAAC,KAAK,CACV,gBAAgB,CAAC,EAAE,SAAS,EAAE,eAAe,MAAM,YAAY,EAAE,EAAE,MAAM,CAAC,EAC1E,GAAG,MAAM,YAAY,CACtB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,4DAA4D,EAAE,GAAG,EAAE;IACtE,MAAM,QAAQ,GAAG,GAAG,gBAAgB,EAAE,aAAa,CAAC;IACpD,MAAM,OAAO,GAAG,IAAI,iBAAiB,CAAC;QACpC,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;KAC/C,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC"}
|
package/native.cjs
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('cyt-indexer-sdk-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('cyt-indexer-sdk-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.3.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
80
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('cyt-indexer-sdk-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('cyt-indexer-sdk-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.3.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
96
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('cyt-indexer-sdk-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('cyt-indexer-sdk-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.3.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
117
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('cyt-indexer-sdk-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('cyt-indexer-sdk-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.3.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
133
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('cyt-indexer-sdk-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('cyt-indexer-sdk-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.3.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
150
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('cyt-indexer-sdk-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('cyt-indexer-sdk-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.3.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
166
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('cyt-indexer-sdk-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('cyt-indexer-sdk-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.3.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
185
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('cyt-indexer-sdk-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('cyt-indexer-sdk-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.3.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
201
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('cyt-indexer-sdk-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('cyt-indexer-sdk-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.3.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
217
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('cyt-indexer-sdk-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('cyt-indexer-sdk-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.3.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
237
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('cyt-indexer-sdk-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('cyt-indexer-sdk-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.3.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
253
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('cyt-indexer-sdk-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.3.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
274
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('cyt-indexer-sdk-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.3.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
290
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('cyt-indexer-sdk-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.3.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
308
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('cyt-indexer-sdk-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.3.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
324
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('cyt-indexer-sdk-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.3.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
342
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('cyt-indexer-sdk-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.3.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
358
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('cyt-indexer-sdk-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.3.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
376
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('cyt-indexer-sdk-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.3.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
392
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('cyt-indexer-sdk-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.3.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
410
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('cyt-indexer-sdk-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.3.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
426
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('cyt-indexer-sdk-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.3.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
443
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('cyt-indexer-sdk-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('cyt-indexer-sdk-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.3.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
459
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('cyt-indexer-sdk-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('cyt-indexer-sdk-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.3.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
479
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('cyt-indexer-sdk-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('cyt-indexer-sdk-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.3.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
495
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('cyt-indexer-sdk-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('cyt-indexer-sdk-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.3.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
511
|
+
if (bindingPackageVersion !== '0.3.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -596,6 +596,7 @@ module.exports.anthropicToolIsMcp = nativeBinding.anthropicToolIsMcp
|
|
|
596
596
|
module.exports.anthropicToolIsSystem = nativeBinding.anthropicToolIsSystem
|
|
597
597
|
module.exports.anthropicToolsToCatalogEntries = nativeBinding.anthropicToolsToCatalogEntries
|
|
598
598
|
module.exports.anthropicToolToCatalogEntry = nativeBinding.anthropicToolToCatalogEntry
|
|
599
|
+
module.exports.appendDescriptionReinstateEntries = nativeBinding.appendDescriptionReinstateEntries
|
|
599
600
|
module.exports.buildCatalogFromTools = nativeBinding.buildCatalogFromTools
|
|
600
601
|
module.exports.buildCatalogIndex = nativeBinding.buildCatalogIndex
|
|
601
602
|
module.exports.catalogIndexToCatalogDict = nativeBinding.catalogIndexToCatalogDict
|
|
@@ -603,6 +604,7 @@ module.exports.catalogNeedsPartition = nativeBinding.catalogNeedsPartition
|
|
|
603
604
|
module.exports.catalogNeedsPrunedRecompose = nativeBinding.catalogNeedsPrunedRecompose
|
|
604
605
|
module.exports.catalogPrefix = nativeBinding.catalogPrefix
|
|
605
606
|
module.exports.catalogToolCount = nativeBinding.catalogToolCount
|
|
607
|
+
module.exports.chunkSurvivorKey = nativeBinding.chunkSurvivorKey
|
|
606
608
|
module.exports.chunkToolId = nativeBinding.chunkToolId
|
|
607
609
|
module.exports.collectEnums = nativeBinding.collectEnums
|
|
608
610
|
module.exports.configurePathConstants = nativeBinding.configurePathConstants
|
|
@@ -625,6 +627,7 @@ module.exports.fullPassThrough = nativeBinding.fullPassThrough
|
|
|
625
627
|
module.exports.getRootToolKey = nativeBinding.getRootToolKey
|
|
626
628
|
module.exports.isDecomposedOptionalPropertyChunk = nativeBinding.isDecomposedOptionalPropertyChunk
|
|
627
629
|
module.exports.isDecomposedToolRootChunk = nativeBinding.isDecomposedToolRootChunk
|
|
630
|
+
module.exports.isDescriptionPolicy = nativeBinding.isDescriptionPolicy
|
|
628
631
|
module.exports.isDirectRootOptionalPropertyChunk = nativeBinding.isDirectRootOptionalPropertyChunk
|
|
629
632
|
module.exports.isMcpOptionalChunk = nativeBinding.isMcpOptionalChunk
|
|
630
633
|
module.exports.isMcpRootChunk = nativeBinding.isMcpRootChunk
|
|
@@ -642,6 +645,7 @@ module.exports.mdExt = nativeBinding.mdExt
|
|
|
642
645
|
module.exports.mergeCatalog = nativeBinding.mergeCatalog
|
|
643
646
|
module.exports.mergeToolsPreservingOrder = nativeBinding.mergeToolsPreservingOrder
|
|
644
647
|
module.exports.mitigateEmptyOptionalProperties = nativeBinding.mitigateEmptyOptionalProperties
|
|
648
|
+
module.exports.needsDescriptionReinstate = nativeBinding.needsDescriptionReinstate
|
|
645
649
|
module.exports.needsPartition = nativeBinding.needsPartition
|
|
646
650
|
module.exports.needsPrunedRecompose = nativeBinding.needsPrunedRecompose
|
|
647
651
|
module.exports.optionalLeafSurvivedRerank = nativeBinding.optionalLeafSurvivedRerank
|
|
@@ -651,6 +655,7 @@ module.exports.pathDefaultCatalogDir = nativeBinding.pathDefaultCatalogDir
|
|
|
651
655
|
module.exports.pathWriteCatalogPrune = nativeBinding.pathWriteCatalogPrune
|
|
652
656
|
module.exports.policyContextFromValues = nativeBinding.policyContextFromValues
|
|
653
657
|
module.exports.prepareToolEntry = nativeBinding.prepareToolEntry
|
|
658
|
+
module.exports.removedChunks = nativeBinding.removedChunks
|
|
654
659
|
module.exports.requestPassThrough = nativeBinding.requestPassThrough
|
|
655
660
|
module.exports.requiredEnumValuesByTool = nativeBinding.requiredEnumValuesByTool
|
|
656
661
|
module.exports.rerankScore = nativeBinding.rerankScore
|
|
@@ -660,6 +665,7 @@ module.exports.retrieveCore = nativeBinding.retrieveCore
|
|
|
660
665
|
module.exports.retrieveTools = nativeBinding.retrieveTools
|
|
661
666
|
module.exports.rootChunkPropertiesEmpty = nativeBinding.rootChunkPropertiesEmpty
|
|
662
667
|
module.exports.rootToolIdFromChunk = nativeBinding.rootToolIdFromChunk
|
|
668
|
+
module.exports.scoringPolicy = nativeBinding.scoringPolicy
|
|
663
669
|
module.exports.splitAnthropicTools = nativeBinding.splitAnthropicTools
|
|
664
670
|
module.exports.stashMcpTools = nativeBinding.stashMcpTools
|
|
665
671
|
module.exports.stashSystemTools = nativeBinding.stashSystemTools
|
package/native.d.ts
CHANGED
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export declare class CatalogBuilder {
|
|
4
4
|
constructor(memoryOnly?: boolean | undefined | null, outputDir?: string | undefined | null)
|
|
5
|
+
/**
|
|
6
|
+
* # Errors
|
|
7
|
+
* Does not fail; invalid tool entries are skipped.
|
|
8
|
+
*/
|
|
5
9
|
addTool(entry: any): void
|
|
6
10
|
getToolInfo(serverName: string, toolName: string): any | null
|
|
7
11
|
buildIndex(): CatalogIndexResult
|
|
12
|
+
/**
|
|
13
|
+
* # Errors
|
|
14
|
+
* Returns an error when the catalog directory cannot be created or files cannot be written.
|
|
15
|
+
*/
|
|
8
16
|
writeCatalog(): CatalogIndexResult
|
|
9
17
|
toCatalogDict(catalogPrefix?: string | undefined | null): any
|
|
10
18
|
}
|
|
@@ -13,6 +21,10 @@ export type CatalogBuilderNapi = CatalogBuilder
|
|
|
13
21
|
/** In-memory decomposed catalog JSON (backed by Rust [`DecomposedCatalog`]). */
|
|
14
22
|
export declare class DecomposedCatalog {
|
|
15
23
|
constructor(jsonFiles?: Record<string, any> | undefined | null)
|
|
24
|
+
/**
|
|
25
|
+
* # Errors
|
|
26
|
+
* Does not fail; invalid index shapes yield an empty decomposed catalog.
|
|
27
|
+
*/
|
|
16
28
|
static fromCatalogIndex(index: any): DecomposedCatalog
|
|
17
29
|
static fromCatalogDict(data: any): DecomposedCatalog
|
|
18
30
|
hasJson(key: string): boolean
|
|
@@ -47,8 +59,18 @@ export declare function anthropicToolsToCatalogEntries(tools: Array<any>): Anthr
|
|
|
47
59
|
|
|
48
60
|
export declare function anthropicToolToCatalogEntry(tool: any): any | null
|
|
49
61
|
|
|
62
|
+
export declare function appendDescriptionReinstateEntries(entries: Array<any>, buildCatalog: any, catalogIndex: any, ctx: PolicyContext): Array<any>
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* # Errors
|
|
66
|
+
* Does not fail; malformed tool entries are skipped during indexing.
|
|
67
|
+
*/
|
|
50
68
|
export declare function buildCatalogFromTools(tools: Array<any>): CatalogIndexResult
|
|
51
69
|
|
|
70
|
+
/**
|
|
71
|
+
* # Errors
|
|
72
|
+
* Does not fail; malformed tool entries are skipped during indexing.
|
|
73
|
+
*/
|
|
52
74
|
export declare function buildCatalogIndex(tools: Array<any>, allEnums: Array<any>): CatalogIndexResult
|
|
53
75
|
|
|
54
76
|
export interface CatalogIndexResult {
|
|
@@ -56,6 +78,10 @@ export interface CatalogIndexResult {
|
|
|
56
78
|
files: Record<string, string>
|
|
57
79
|
}
|
|
58
80
|
|
|
81
|
+
/**
|
|
82
|
+
* # Errors
|
|
83
|
+
* Does not fail; invalid index shapes yield an empty catalog dict.
|
|
84
|
+
*/
|
|
59
85
|
export declare function catalogIndexToCatalogDict(index: any, catalogPrefix?: string | undefined | null): any
|
|
60
86
|
|
|
61
87
|
export declare function catalogNeedsPartition(data: any, ctx: PolicyContext): boolean
|
|
@@ -64,14 +90,28 @@ export declare function catalogNeedsPrunedRecompose(data: any, ctx: PolicyContex
|
|
|
64
90
|
|
|
65
91
|
export declare function catalogPrefix(): string
|
|
66
92
|
|
|
93
|
+
/**
|
|
94
|
+
* # Errors
|
|
95
|
+
* Returns an error when the tool count exceeds `u32::MAX`.
|
|
96
|
+
*/
|
|
67
97
|
export declare function catalogToolCount(data: any): number
|
|
68
98
|
|
|
99
|
+
export declare function chunkSurvivorKey(item: any, section: string): string | null
|
|
100
|
+
|
|
69
101
|
export declare function chunkToolId(item: any): string
|
|
70
102
|
|
|
71
103
|
export declare function collectEnums(schema: any): Array<any>
|
|
72
104
|
|
|
73
|
-
|
|
105
|
+
/**
|
|
106
|
+
* # Errors
|
|
107
|
+
* Does not fail; updates in-process path configuration.
|
|
108
|
+
*/
|
|
109
|
+
export declare function configurePathConstants(config: PathConfigNapi): void
|
|
74
110
|
|
|
111
|
+
/**
|
|
112
|
+
* # Errors
|
|
113
|
+
* Does not fail; updates in-process runtime configuration.
|
|
114
|
+
*/
|
|
75
115
|
export declare function configureRuntimeDefaults(decomposedScore: number, enumScore: number, rerankScore: number, emptyOptionalFallbackK: number, defaultSystemPolicy: string, defaultMcpPolicy: string): void
|
|
76
116
|
|
|
77
117
|
export declare function decomposedPrefix(): string
|
|
@@ -110,6 +150,8 @@ export declare function isDecomposedOptionalPropertyChunk(item: any): boolean
|
|
|
110
150
|
|
|
111
151
|
export declare function isDecomposedToolRootChunk(item: any): boolean
|
|
112
152
|
|
|
153
|
+
export declare function isDescriptionPolicy(policy: string): boolean
|
|
154
|
+
|
|
113
155
|
export declare function isDirectRootOptionalPropertyChunk(item: any): boolean
|
|
114
156
|
|
|
115
157
|
export declare function isMcpOptionalChunk(item: any): boolean
|
|
@@ -130,6 +172,10 @@ export declare function isSystemToolId(toolId: string): boolean
|
|
|
130
172
|
|
|
131
173
|
export declare function jsonExt(): string
|
|
132
174
|
|
|
175
|
+
/**
|
|
176
|
+
* # Errors
|
|
177
|
+
* Returns an error when the catalog directory cannot be read or parsed.
|
|
178
|
+
*/
|
|
133
179
|
export declare function loadCatalog(dirPath: string): any
|
|
134
180
|
|
|
135
181
|
export declare function mcpRequiredEnumValues(data: any): Array<string>
|
|
@@ -144,16 +190,33 @@ export declare function mergeToolsPreservingOrder(original: Array<any>, prunedBy
|
|
|
144
190
|
|
|
145
191
|
export declare function mitigateEmptyOptionalProperties(entries: Array<any>, catalogIndex: any, ctx: PolicyContext, postRerankScored: any | undefined | null, pipeline: Array<string>): Array<any>
|
|
146
192
|
|
|
193
|
+
export declare function needsDescriptionReinstate(ctx: PolicyContext): boolean
|
|
194
|
+
|
|
147
195
|
export declare function needsPartition(ctx: PolicyContext): boolean
|
|
148
196
|
|
|
149
197
|
export declare function needsPrunedRecompose(ctx: PolicyContext): boolean
|
|
150
198
|
|
|
151
199
|
export declare function optionalLeafSurvivedRerank(item: any, ctx: PolicyContext, rerankScore?: number | undefined | null, llmSelectedPaths?: Array<string> | undefined | null): boolean
|
|
152
200
|
|
|
201
|
+
/**
|
|
202
|
+
* # Errors
|
|
203
|
+
* Does not fail; returns empty partitions for invalid catalog shapes.
|
|
204
|
+
*/
|
|
153
205
|
export declare function partitionCatalog(data: any, ctx: PolicyContext): [any, any]
|
|
154
206
|
|
|
155
207
|
export declare function pathBuilderMemoryOnly(): boolean
|
|
156
208
|
|
|
209
|
+
export interface PathConfigNapi {
|
|
210
|
+
mdExt: string
|
|
211
|
+
jsonExt: string
|
|
212
|
+
decomposedPrefix: string
|
|
213
|
+
decomposedRoot: string
|
|
214
|
+
catalogPrefix: string
|
|
215
|
+
builderMemoryOnly: boolean
|
|
216
|
+
defaultCatalogDir: string
|
|
217
|
+
writeCatalogPrune: boolean
|
|
218
|
+
}
|
|
219
|
+
|
|
157
220
|
export declare function pathDefaultCatalogDir(): string
|
|
158
221
|
|
|
159
222
|
export declare function pathWriteCatalogPrune(): boolean
|
|
@@ -174,8 +237,18 @@ export interface PolicyOptions {
|
|
|
174
237
|
requiredEnumValuesByTool?: Record<string, Array<string>>
|
|
175
238
|
}
|
|
176
239
|
|
|
240
|
+
/**
|
|
241
|
+
* # Errors
|
|
242
|
+
* Does not fail; invalid schema fragments are omitted from the entry.
|
|
243
|
+
*/
|
|
177
244
|
export declare function prepareToolEntry(serverName: string, name: string, description: string, inputSchema: any): any
|
|
178
245
|
|
|
246
|
+
/**
|
|
247
|
+
* # Errors
|
|
248
|
+
* Does not fail; missing catalog sections are treated as empty.
|
|
249
|
+
*/
|
|
250
|
+
export declare function removedChunks(fullCatalog: any, surviving: any, applyDecomposedScoreFilter?: boolean | undefined | null): any
|
|
251
|
+
|
|
179
252
|
export declare function requestPassThrough(ctx: PolicyContext, tools: Array<any>): boolean
|
|
180
253
|
|
|
181
254
|
export declare function requiredEnumValuesByTool(data: any): Record<string, Array<string>>
|
|
@@ -186,14 +259,28 @@ export declare function restoreMcpTools(stash: Array<any>): Array<any>
|
|
|
186
259
|
|
|
187
260
|
export declare function restoreSystemTools(stash: Array<any>): Array<any>
|
|
188
261
|
|
|
262
|
+
/**
|
|
263
|
+
* # Errors
|
|
264
|
+
* Does not fail; malformed survivor or store entries are skipped.
|
|
265
|
+
*/
|
|
189
266
|
export declare function retrieveCore(data: any, storeJsonFiles: Record<string, any>, survivorJsonFiles: Record<string, any>, applyDecomposedScoreFilter?: boolean | undefined | null, policyOptions?: PolicyOptions | undefined | null): Array<any>
|
|
190
267
|
|
|
191
|
-
|
|
268
|
+
/**
|
|
269
|
+
* # Errors
|
|
270
|
+
* Does not fail; missing catalog data is treated as empty.
|
|
271
|
+
*/
|
|
272
|
+
export declare function retrieveTools(data: any, catalog: any, applyDecomposedScoreFilter?: boolean | undefined | null, preserveValues?: Array<string> | undefined | null, policyCtx?: PolicyContextNapi | PolicyContextJs | undefined | null): Array<any>
|
|
192
273
|
|
|
193
274
|
export declare function rootChunkPropertiesEmpty(item: any): boolean
|
|
194
275
|
|
|
195
276
|
export declare function rootToolIdFromChunk(item: any): string
|
|
196
277
|
|
|
278
|
+
/**
|
|
279
|
+
* # Errors
|
|
280
|
+
* Returns an error when `policy` is not a recognized tool policy name.
|
|
281
|
+
*/
|
|
282
|
+
export declare function scoringPolicy(policy: string): string
|
|
283
|
+
|
|
197
284
|
export declare function splitAnthropicTools(tools: Array<any>): SplitAnthropicToolsResult
|
|
198
285
|
|
|
199
286
|
export interface SplitAnthropicToolsResult {
|
|
@@ -225,4 +312,8 @@ export declare function toolsForCatalog(ctx: PolicyContext, tools: Array<any>):
|
|
|
225
312
|
|
|
226
313
|
export declare function truncateDescription(description: string, maxTokens?: number | undefined | null): string
|
|
227
314
|
|
|
315
|
+
/**
|
|
316
|
+
* # Errors
|
|
317
|
+
* Returns an error when the output directory cannot be created or catalog files cannot be written.
|
|
318
|
+
*/
|
|
228
319
|
export declare function writeCatalogIndex(index: any, outputDir?: string | undefined | null, prune?: boolean | undefined | null): void
|