@tpmjs/types 0.1.1

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.
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const RegistrySearchResultSchema: z.ZodObject<{
4
+ toolId: z.ZodString;
5
+ score: z.ZodNumber;
6
+ matchType: z.ZodEnum<["exact", "fuzzy", "semantic"]>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ toolId: string;
9
+ score: number;
10
+ matchType: "exact" | "fuzzy" | "semantic";
11
+ }, {
12
+ toolId: string;
13
+ score: number;
14
+ matchType: "exact" | "fuzzy" | "semantic";
15
+ }>;
16
+ declare const RegistrySearchOptionsSchema: z.ZodObject<{
17
+ query: z.ZodString;
18
+ category: z.ZodOptional<z.ZodString>;
19
+ limit: z.ZodDefault<z.ZodNumber>;
20
+ offset: z.ZodDefault<z.ZodNumber>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ query: string;
23
+ limit: number;
24
+ offset: number;
25
+ category?: string | undefined;
26
+ }, {
27
+ query: string;
28
+ category?: string | undefined;
29
+ limit?: number | undefined;
30
+ offset?: number | undefined;
31
+ }>;
32
+ type RegistrySearchResult = z.infer<typeof RegistrySearchResultSchema>;
33
+ type RegistrySearchOptions = z.infer<typeof RegistrySearchOptionsSchema>;
34
+
35
+ export { type RegistrySearchOptions, RegistrySearchOptionsSchema, type RegistrySearchResult, RegistrySearchResultSchema };
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+
3
+ // src/registry.ts
4
+ var RegistrySearchResultSchema = z.object({
5
+ toolId: z.string(),
6
+ score: z.number(),
7
+ matchType: z.enum(["exact", "fuzzy", "semantic"])
8
+ });
9
+ var RegistrySearchOptionsSchema = z.object({
10
+ query: z.string(),
11
+ category: z.string().optional(),
12
+ limit: z.number().default(10),
13
+ offset: z.number().default(0)
14
+ });
15
+
16
+ export { RegistrySearchOptionsSchema, RegistrySearchResultSchema };
package/dist/tool.d.ts ADDED
@@ -0,0 +1,72 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ToolParameterSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ description: z.ZodString;
6
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7
+ required: z.ZodDefault<z.ZodBoolean>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ name: string;
10
+ description: string;
11
+ schema: Record<string, unknown>;
12
+ required: boolean;
13
+ }, {
14
+ name: string;
15
+ description: string;
16
+ schema: Record<string, unknown>;
17
+ required?: boolean | undefined;
18
+ }>;
19
+ declare const ToolSchema: z.ZodObject<{
20
+ id: z.ZodString;
21
+ name: z.ZodString;
22
+ description: z.ZodString;
23
+ category: z.ZodString;
24
+ version: z.ZodString;
25
+ parameters: z.ZodArray<z.ZodObject<{
26
+ name: z.ZodString;
27
+ description: z.ZodString;
28
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
+ required: z.ZodDefault<z.ZodBoolean>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ name: string;
32
+ description: string;
33
+ schema: Record<string, unknown>;
34
+ required: boolean;
35
+ }, {
36
+ name: string;
37
+ description: string;
38
+ schema: Record<string, unknown>;
39
+ required?: boolean | undefined;
40
+ }>, "many">;
41
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ name: string;
44
+ description: string;
45
+ id: string;
46
+ category: string;
47
+ version: string;
48
+ parameters: {
49
+ name: string;
50
+ description: string;
51
+ schema: Record<string, unknown>;
52
+ required: boolean;
53
+ }[];
54
+ tags: string[];
55
+ }, {
56
+ name: string;
57
+ description: string;
58
+ id: string;
59
+ category: string;
60
+ version: string;
61
+ parameters: {
62
+ name: string;
63
+ description: string;
64
+ schema: Record<string, unknown>;
65
+ required?: boolean | undefined;
66
+ }[];
67
+ tags?: string[] | undefined;
68
+ }>;
69
+ type Tool = z.infer<typeof ToolSchema>;
70
+ type ToolParameter = z.infer<typeof ToolParameterSchema>;
71
+
72
+ export { type Tool, type ToolParameter, ToolParameterSchema, ToolSchema };
package/dist/tool.js ADDED
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+
3
+ // src/tool.ts
4
+ var ToolParameterSchema = z.object({
5
+ name: z.string(),
6
+ description: z.string(),
7
+ schema: z.record(z.unknown()),
8
+ required: z.boolean().default(false)
9
+ });
10
+ var ToolSchema = z.object({
11
+ id: z.string(),
12
+ name: z.string(),
13
+ description: z.string(),
14
+ category: z.string(),
15
+ version: z.string(),
16
+ parameters: z.array(ToolParameterSchema),
17
+ tags: z.array(z.string()).default([])
18
+ });
19
+
20
+ export { ToolParameterSchema, ToolSchema };
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@tpmjs/types",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "exports": {
6
+ "./tool": {
7
+ "types": "./dist/tool.d.ts",
8
+ "default": "./dist/tool.js"
9
+ },
10
+ "./registry": {
11
+ "types": "./dist/registry.d.ts",
12
+ "default": "./dist/registry.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "zod": "^3.24.1"
20
+ },
21
+ "devDependencies": {
22
+ "tsup": "^8.3.5",
23
+ "typescript": "^5.9.3",
24
+ "@tpmjs/tsconfig": "0.0.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "dev": "tsup --watch",
32
+ "type-check": "tsc --noEmit",
33
+ "clean": "rm -rf dist .turbo"
34
+ }
35
+ }