cyt-indexer-sdk 0.3.3 → 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/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/native.d.ts +4 -0
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +4 -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/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/native.cjs +56 -52
- package/native.d.ts +89 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/native.d.ts
CHANGED
|
@@ -40,6 +40,10 @@ export declare const isDecomposedToolRootChunkNative: typeof import("../native.d
|
|
|
40
40
|
export declare const isDecomposedOptionalPropertyChunkNative: typeof import("../native.d.ts").isDecomposedOptionalPropertyChunk;
|
|
41
41
|
export declare const filterRecomposeJsonEntriesNative: typeof import("../native.d.ts").filterRecomposeJsonEntries;
|
|
42
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;
|
|
43
47
|
export declare const dropRecomposedToolsWithEmptyPropertiesNative: typeof import("../native.d.ts").dropRecomposedToolsWithEmptyProperties;
|
|
44
48
|
export declare const rootToolIdFromChunkNative: typeof import("../native.d.ts").rootToolIdFromChunk;
|
|
45
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,CAAC;AACxD,eAAO,MAAM,sBAAsB,kDAA0B,CAAC;AAC9D,eAAO,MAAM,mBAAmB,+CAAuB,CAAC;AACxD,eAAO,MAAM,uBAAuB,mDAA2B,CAAC;AAGhE,eAAO,MAAM,4BAA4B,wDAAgC,CAAC;AAC1E,eAAO,MAAM,eAAe,uCAAe,CAAC;AAC5C,eAAO,MAAM,iBAAiB,yCAAiB,CAAC;AAChD,eAAO,MAAM,0BAA0B,kDAA0B,CAAC;AAClE,eAAO,MAAM,qBAAqB,iDAAyB,CAAC;AAC5D,eAAO,MAAM,6BAA6B,yDAAiC,CAAC;AAC5E,eAAO,MAA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M,sBAAsB,kDAA0B,CAAC;AAE9D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/native.js
CHANGED
|
@@ -48,6 +48,10 @@ export const isDecomposedToolRootChunkNative = native.isDecomposedToolRootChunk;
|
|
|
48
48
|
export const isDecomposedOptionalPropertyChunkNative = native.isDecomposedOptionalPropertyChunk;
|
|
49
49
|
export const filterRecomposeJsonEntriesNative = native.filterRecomposeJsonEntries;
|
|
50
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;
|
|
51
55
|
export const dropRecomposedToolsWithEmptyPropertiesNative = native.dropRecomposedToolsWithEmptyProperties;
|
|
52
56
|
export const rootToolIdFromChunkNative = native.rootToolIdFromChunk;
|
|
53
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,M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
|
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,UAAU,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,WAAW,GACX,6BAA6B,GAC7B,wBAAwB,CAAC;AAE7B,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,CAAC;AAEhD,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,CAEzE;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,aAAa,GACjB,UAAU,CAEZ;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAE3E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE5D;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EAAE,EACnB,GAAG,EAA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AElE;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,EACrC,2BAA2B,EAC3B,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,0BAA0B,EAC1B,gCAAgC,EAChC,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,yBAAyB,EACzB,mBAAmB,EACnB,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;AAwBrB,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,CAAC;AAEhD,MAAM,UAAU,YAAY;IAC1B,OAAO,kBAAkB,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,u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ACpB,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,GAAkB;IAC1D,OAAO,+BAA+B,CAAC,GAAG,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,mBAAmB,CAAC,MAAM,CAAe,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,KAAmB,EACnB,MAAc;IAEd,OAAO,qCAAqC,CAAC,KAAK,EAAE,MAAM,CAAiB,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAAgB;IACvD,OAAO,8BAA8B,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,YAAwB,EACxB,MAAc;IAEd,OAAO,kCAAkC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,YAAwB,EACxB,MAAc;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"}
|
|
@@ -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,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAA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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
|
|
@@ -626,6 +627,7 @@ module.exports.fullPassThrough = nativeBinding.fullPassThrough
|
|
|
626
627
|
module.exports.getRootToolKey = nativeBinding.getRootToolKey
|
|
627
628
|
module.exports.isDecomposedOptionalPropertyChunk = nativeBinding.isDecomposedOptionalPropertyChunk
|
|
628
629
|
module.exports.isDecomposedToolRootChunk = nativeBinding.isDecomposedToolRootChunk
|
|
630
|
+
module.exports.isDescriptionPolicy = nativeBinding.isDescriptionPolicy
|
|
629
631
|
module.exports.isDirectRootOptionalPropertyChunk = nativeBinding.isDirectRootOptionalPropertyChunk
|
|
630
632
|
module.exports.isMcpOptionalChunk = nativeBinding.isMcpOptionalChunk
|
|
631
633
|
module.exports.isMcpRootChunk = nativeBinding.isMcpRootChunk
|
|
@@ -643,6 +645,7 @@ module.exports.mdExt = nativeBinding.mdExt
|
|
|
643
645
|
module.exports.mergeCatalog = nativeBinding.mergeCatalog
|
|
644
646
|
module.exports.mergeToolsPreservingOrder = nativeBinding.mergeToolsPreservingOrder
|
|
645
647
|
module.exports.mitigateEmptyOptionalProperties = nativeBinding.mitigateEmptyOptionalProperties
|
|
648
|
+
module.exports.needsDescriptionReinstate = nativeBinding.needsDescriptionReinstate
|
|
646
649
|
module.exports.needsPartition = nativeBinding.needsPartition
|
|
647
650
|
module.exports.needsPrunedRecompose = nativeBinding.needsPrunedRecompose
|
|
648
651
|
module.exports.optionalLeafSurvivedRerank = nativeBinding.optionalLeafSurvivedRerank
|
|
@@ -662,6 +665,7 @@ module.exports.retrieveCore = nativeBinding.retrieveCore
|
|
|
662
665
|
module.exports.retrieveTools = nativeBinding.retrieveTools
|
|
663
666
|
module.exports.rootChunkPropertiesEmpty = nativeBinding.rootChunkPropertiesEmpty
|
|
664
667
|
module.exports.rootToolIdFromChunk = nativeBinding.rootToolIdFromChunk
|
|
668
|
+
module.exports.scoringPolicy = nativeBinding.scoringPolicy
|
|
665
669
|
module.exports.splitAnthropicTools = nativeBinding.splitAnthropicTools
|
|
666
670
|
module.exports.stashMcpTools = nativeBinding.stashMcpTools
|
|
667
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,6 +90,10 @@ 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
|
|
|
69
99
|
export declare function chunkSurvivorKey(item: any, section: string): string | null
|
|
@@ -72,8 +102,16 @@ export declare function chunkToolId(item: any): string
|
|
|
72
102
|
|
|
73
103
|
export declare function collectEnums(schema: any): Array<any>
|
|
74
104
|
|
|
75
|
-
|
|
105
|
+
/**
|
|
106
|
+
* # Errors
|
|
107
|
+
* Does not fail; updates in-process path configuration.
|
|
108
|
+
*/
|
|
109
|
+
export declare function configurePathConstants(config: PathConfigNapi): void
|
|
76
110
|
|
|
111
|
+
/**
|
|
112
|
+
* # Errors
|
|
113
|
+
* Does not fail; updates in-process runtime configuration.
|
|
114
|
+
*/
|
|
77
115
|
export declare function configureRuntimeDefaults(decomposedScore: number, enumScore: number, rerankScore: number, emptyOptionalFallbackK: number, defaultSystemPolicy: string, defaultMcpPolicy: string): void
|
|
78
116
|
|
|
79
117
|
export declare function decomposedPrefix(): string
|
|
@@ -112,6 +150,8 @@ export declare function isDecomposedOptionalPropertyChunk(item: any): boolean
|
|
|
112
150
|
|
|
113
151
|
export declare function isDecomposedToolRootChunk(item: any): boolean
|
|
114
152
|
|
|
153
|
+
export declare function isDescriptionPolicy(policy: string): boolean
|
|
154
|
+
|
|
115
155
|
export declare function isDirectRootOptionalPropertyChunk(item: any): boolean
|
|
116
156
|
|
|
117
157
|
export declare function isMcpOptionalChunk(item: any): boolean
|
|
@@ -132,6 +172,10 @@ export declare function isSystemToolId(toolId: string): boolean
|
|
|
132
172
|
|
|
133
173
|
export declare function jsonExt(): string
|
|
134
174
|
|
|
175
|
+
/**
|
|
176
|
+
* # Errors
|
|
177
|
+
* Returns an error when the catalog directory cannot be read or parsed.
|
|
178
|
+
*/
|
|
135
179
|
export declare function loadCatalog(dirPath: string): any
|
|
136
180
|
|
|
137
181
|
export declare function mcpRequiredEnumValues(data: any): Array<string>
|
|
@@ -146,16 +190,33 @@ export declare function mergeToolsPreservingOrder(original: Array<any>, prunedBy
|
|
|
146
190
|
|
|
147
191
|
export declare function mitigateEmptyOptionalProperties(entries: Array<any>, catalogIndex: any, ctx: PolicyContext, postRerankScored: any | undefined | null, pipeline: Array<string>): Array<any>
|
|
148
192
|
|
|
193
|
+
export declare function needsDescriptionReinstate(ctx: PolicyContext): boolean
|
|
194
|
+
|
|
149
195
|
export declare function needsPartition(ctx: PolicyContext): boolean
|
|
150
196
|
|
|
151
197
|
export declare function needsPrunedRecompose(ctx: PolicyContext): boolean
|
|
152
198
|
|
|
153
199
|
export declare function optionalLeafSurvivedRerank(item: any, ctx: PolicyContext, rerankScore?: number | undefined | null, llmSelectedPaths?: Array<string> | undefined | null): boolean
|
|
154
200
|
|
|
201
|
+
/**
|
|
202
|
+
* # Errors
|
|
203
|
+
* Does not fail; returns empty partitions for invalid catalog shapes.
|
|
204
|
+
*/
|
|
155
205
|
export declare function partitionCatalog(data: any, ctx: PolicyContext): [any, any]
|
|
156
206
|
|
|
157
207
|
export declare function pathBuilderMemoryOnly(): boolean
|
|
158
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
|
+
|
|
159
220
|
export declare function pathDefaultCatalogDir(): string
|
|
160
221
|
|
|
161
222
|
export declare function pathWriteCatalogPrune(): boolean
|
|
@@ -176,8 +237,16 @@ export interface PolicyOptions {
|
|
|
176
237
|
requiredEnumValuesByTool?: Record<string, Array<string>>
|
|
177
238
|
}
|
|
178
239
|
|
|
240
|
+
/**
|
|
241
|
+
* # Errors
|
|
242
|
+
* Does not fail; invalid schema fragments are omitted from the entry.
|
|
243
|
+
*/
|
|
179
244
|
export declare function prepareToolEntry(serverName: string, name: string, description: string, inputSchema: any): any
|
|
180
245
|
|
|
246
|
+
/**
|
|
247
|
+
* # Errors
|
|
248
|
+
* Does not fail; missing catalog sections are treated as empty.
|
|
249
|
+
*/
|
|
181
250
|
export declare function removedChunks(fullCatalog: any, surviving: any, applyDecomposedScoreFilter?: boolean | undefined | null): any
|
|
182
251
|
|
|
183
252
|
export declare function requestPassThrough(ctx: PolicyContext, tools: Array<any>): boolean
|
|
@@ -190,14 +259,28 @@ export declare function restoreMcpTools(stash: Array<any>): Array<any>
|
|
|
190
259
|
|
|
191
260
|
export declare function restoreSystemTools(stash: Array<any>): Array<any>
|
|
192
261
|
|
|
262
|
+
/**
|
|
263
|
+
* # Errors
|
|
264
|
+
* Does not fail; malformed survivor or store entries are skipped.
|
|
265
|
+
*/
|
|
193
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>
|
|
194
267
|
|
|
195
|
-
|
|
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>
|
|
196
273
|
|
|
197
274
|
export declare function rootChunkPropertiesEmpty(item: any): boolean
|
|
198
275
|
|
|
199
276
|
export declare function rootToolIdFromChunk(item: any): string
|
|
200
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
|
+
|
|
201
284
|
export declare function splitAnthropicTools(tools: Array<any>): SplitAnthropicToolsResult
|
|
202
285
|
|
|
203
286
|
export interface SplitAnthropicToolsResult {
|
|
@@ -229,4 +312,8 @@ export declare function toolsForCatalog(ctx: PolicyContext, tools: Array<any>):
|
|
|
229
312
|
|
|
230
313
|
export declare function truncateDescription(description: string, maxTokens?: number | undefined | null): string
|
|
231
314
|
|
|
315
|
+
/**
|
|
316
|
+
* # Errors
|
|
317
|
+
* Returns an error when the output directory cannot be created or catalog files cannot be written.
|
|
318
|
+
*/
|
|
232
319
|
export declare function writeCatalogIndex(index: any, outputDir?: string | undefined | null, prune?: boolean | undefined | null): void
|