@arcteninc/core 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1236 -1214
- package/dist/utils/extract-tool-metadata.d.ts +15 -0
- package/dist/utils/extract-tool-metadata.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
* Tool metadata extraction using build-time generated metadata
|
|
3
3
|
* Requires running arcten-extract-types CLI before build
|
|
4
4
|
*/
|
|
5
|
+
export declare const ARCTEN_ORIGINAL_NAME: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* Helper function to preserve original function name for metadata matching
|
|
8
|
+
* Use this to wrap your tool functions so they work correctly after minification
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { preserveToolName } from '@arcteninc/core';
|
|
13
|
+
*
|
|
14
|
+
* function getOrders() { ... }
|
|
15
|
+
* export const getOrdersTool = preserveToolName(getOrders, 'getOrders');
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function preserveToolName<T extends Function>(fn: T, originalName: string): T;
|
|
5
19
|
export interface ToolMetadata {
|
|
6
20
|
name: string;
|
|
7
21
|
description: string;
|
|
@@ -16,6 +30,7 @@ interface BuildTimeFunctionMetadata {
|
|
|
16
30
|
}
|
|
17
31
|
/**
|
|
18
32
|
* Extract tool metadata from functions using build-time generated metadata
|
|
33
|
+
* Automatically preserves original function names to survive minification
|
|
19
34
|
*
|
|
20
35
|
* @param functions - Array of tool functions to extract metadata from
|
|
21
36
|
* @param buildTimeMeta - Build-time metadata from .arcten/tool-metadata.ts (REQUIRED)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-tool-metadata.d.ts","sourceRoot":"","sources":["../../src/utils/extract-tool-metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"extract-tool-metadata.d.ts","sourceRoot":"","sources":["../../src/utils/extract-tool-metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,oBAAoB,eAA6C,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EAAE,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC,CAGnF;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;CACjB;AAGD,UAAU,yBAAyB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA+CD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,EAAE,EACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAAG,IAAI,GAC/D,YAAY,EAAE,CAiGhB"}
|