tool-server-template 0.80.0

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.
Files changed (89) hide show
  1. package/.env.example +14 -0
  2. package/LICENSE +13 -0
  3. package/README.md +611 -0
  4. package/TESTING.md +480 -0
  5. package/api/index.js +31 -0
  6. package/lib/build-site.d.ts +2 -0
  7. package/lib/build-site.d.ts.map +1 -0
  8. package/lib/build-site.js +42 -0
  9. package/lib/build-site.js.map +1 -0
  10. package/lib/copy-assets.d.ts +8 -0
  11. package/lib/copy-assets.d.ts.map +1 -0
  12. package/lib/copy-assets.js +62 -0
  13. package/lib/copy-assets.js.map +1 -0
  14. package/lib/interactions/index.d.ts +2 -0
  15. package/lib/interactions/index.d.ts.map +1 -0
  16. package/lib/interactions/index.js +10 -0
  17. package/lib/interactions/index.js.map +1 -0
  18. package/lib/interactions/summarize/icon.svg.d.ts +3 -0
  19. package/lib/interactions/summarize/icon.svg.d.ts.map +1 -0
  20. package/lib/interactions/summarize/icon.svg.js +10 -0
  21. package/lib/interactions/summarize/icon.svg.js.map +1 -0
  22. package/lib/interactions/summarize/index.d.ts +3 -0
  23. package/lib/interactions/summarize/index.d.ts.map +1 -0
  24. package/lib/interactions/summarize/index.js +14 -0
  25. package/lib/interactions/summarize/index.js.map +1 -0
  26. package/lib/interactions/summarize/text_summarizer/index.d.ts +53 -0
  27. package/lib/interactions/summarize/text_summarizer/index.d.ts.map +1 -0
  28. package/lib/interactions/summarize/text_summarizer/index.js +56 -0
  29. package/lib/interactions/summarize/text_summarizer/index.js.map +1 -0
  30. package/lib/interactions/summarize/text_summarizer/prompt.jst +31 -0
  31. package/lib/interactions/summarize/text_summarizer/prompt.jst.js +4 -0
  32. package/lib/interactions/summarize/text_summarizer/prompt.jst.js.map +1 -0
  33. package/lib/server-node.d.ts +2 -0
  34. package/lib/server-node.d.ts.map +1 -0
  35. package/lib/server-node.js +14 -0
  36. package/lib/server-node.js.map +1 -0
  37. package/lib/server.d.ts +3 -0
  38. package/lib/server.d.ts.map +1 -0
  39. package/lib/server.js +17 -0
  40. package/lib/server.js.map +1 -0
  41. package/lib/skills/code-review/SKILL.md +59 -0
  42. package/lib/skills/index.d.ts +4 -0
  43. package/lib/skills/index.d.ts.map +1 -0
  44. package/lib/skills/index.js +14 -0
  45. package/lib/skills/index.js.map +1 -0
  46. package/lib/tools/calculator/calculator.d.ts +23 -0
  47. package/lib/tools/calculator/calculator.d.ts.map +1 -0
  48. package/lib/tools/calculator/calculator.js +42 -0
  49. package/lib/tools/calculator/calculator.js.map +1 -0
  50. package/lib/tools/calculator/icon.svg.d.ts +3 -0
  51. package/lib/tools/calculator/icon.svg.d.ts.map +1 -0
  52. package/lib/tools/calculator/icon.svg.js +10 -0
  53. package/lib/tools/calculator/icon.svg.js.map +1 -0
  54. package/lib/tools/calculator/index.d.ts +3 -0
  55. package/lib/tools/calculator/index.d.ts.map +1 -0
  56. package/lib/tools/calculator/index.js +14 -0
  57. package/lib/tools/calculator/index.js.map +1 -0
  58. package/lib/tools/calculator/manifest.d.ts +16 -0
  59. package/lib/tools/calculator/manifest.d.ts.map +1 -0
  60. package/lib/tools/calculator/manifest.js +17 -0
  61. package/lib/tools/calculator/manifest.js.map +1 -0
  62. package/lib/tools/index.d.ts +2 -0
  63. package/lib/tools/index.d.ts.map +1 -0
  64. package/lib/tools/index.js +8 -0
  65. package/lib/tools/index.js.map +1 -0
  66. package/package.json +51 -0
  67. package/public/.gitkeep +1 -0
  68. package/rollup.config.bundle.js +60 -0
  69. package/rollup.config.js +99 -0
  70. package/src/build-site.ts +77 -0
  71. package/src/copy-assets.ts +104 -0
  72. package/src/interactions/index.ts +7 -0
  73. package/src/interactions/summarize/icon.svg.ts +7 -0
  74. package/src/interactions/summarize/index.ts +11 -0
  75. package/src/interactions/summarize/text_summarizer/index.ts +53 -0
  76. package/src/interactions/summarize/text_summarizer/prompt.jst +31 -0
  77. package/src/raw-imports.d.ts +4 -0
  78. package/src/server-node.ts +24 -0
  79. package/src/server.ts +22 -0
  80. package/src/skills/code-review/SKILL.md +59 -0
  81. package/src/skills/index.ts +12 -0
  82. package/src/tools/calculator/calculator.ts +60 -0
  83. package/src/tools/calculator/icon.svg.ts +7 -0
  84. package/src/tools/calculator/index.ts +11 -0
  85. package/src/tools/calculator/manifest.ts +16 -0
  86. package/src/tools/index.ts +5 -0
  87. package/template.config.json +27 -0
  88. package/tsconfig.json +25 -0
  89. package/vercel.json +29 -0
@@ -0,0 +1,5 @@
1
+ import { CalculatorTools } from "./calculator/index.js";
2
+
3
+ export const tools = [
4
+ CalculatorTools
5
+ ];
@@ -0,0 +1,27 @@
1
+ {
2
+ "version": "1.0",
3
+ "description": "A template for building custom tool servers with tools, skills, and interactions",
4
+ "prompts": [
5
+ {
6
+ "type": "text",
7
+ "name": "PROJECT_NAME",
8
+ "message": "Project name",
9
+ "initial": "my-tool-server"
10
+ },
11
+ {
12
+ "type": "text",
13
+ "name": "PROJECT_DESCRIPTION",
14
+ "message": "Project description",
15
+ "initial": "A custom tool server with tools, skills, and interactions"
16
+ }
17
+ ],
18
+ "derived": {
19
+ "SERVER_TITLE": {
20
+ "from": "PROJECT_NAME",
21
+ "transform": "titleCase"
22
+ }
23
+ },
24
+ "removeAfterInstall": [
25
+ "template.config.json"
26
+ ]
27
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ES2022",
5
+ "lib": ["ES2022"],
6
+ "moduleResolution": "bundler",
7
+ "resolveJsonModule": true,
8
+ "allowJs": true,
9
+ "checkJs": false,
10
+ "outDir": "./lib",
11
+ "rootDir": "./src",
12
+ "removeComments": true,
13
+ "sourceMap": true,
14
+ "declaration": true,
15
+ "declarationMap": true,
16
+ "esModuleInterop": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "strict": true,
19
+ "skipLibCheck": true,
20
+ "allowSyntheticDefaultImports": true,
21
+ "types": ["node"]
22
+ },
23
+ "include": ["src/**/*"],
24
+ "exclude": ["node_modules", "lib", "dist"]
25
+ }
package/vercel.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "buildCommand": "npm run build",
3
+ "outputDirectory": "dist",
4
+ "rewrites": [
5
+ {
6
+ "source": "/api/(.*)",
7
+ "destination": "/api"
8
+ }
9
+ ],
10
+ "headers": [
11
+ {
12
+ "source": "/api/(.*)",
13
+ "headers": [
14
+ {
15
+ "key": "Access-Control-Allow-Origin",
16
+ "value": "*"
17
+ },
18
+ {
19
+ "key": "Access-Control-Allow-Methods",
20
+ "value": "GET, POST, PUT, DELETE, OPTIONS"
21
+ },
22
+ {
23
+ "key": "Access-Control-Allow-Headers",
24
+ "value": "Content-Type, Authorization"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }