@vertesia/tools-sdk 1.0.0-dev.20260203.130115Z → 1.0.0-dev.20260225.024852Z

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 (153) hide show
  1. package/lib/cjs/ContentTypesCollection.js +43 -0
  2. package/lib/cjs/ContentTypesCollection.js.map +1 -0
  3. package/lib/cjs/InteractionCollection.js +43 -0
  4. package/lib/cjs/InteractionCollection.js.map +1 -0
  5. package/lib/cjs/SkillCollection.js +384 -0
  6. package/lib/cjs/SkillCollection.js.map +1 -0
  7. package/lib/cjs/ToolCollection.js +221 -0
  8. package/lib/cjs/ToolCollection.js.map +1 -0
  9. package/lib/cjs/ToolRegistry.js +95 -0
  10. package/lib/cjs/ToolRegistry.js.map +1 -0
  11. package/lib/cjs/auth.js +104 -0
  12. package/lib/cjs/auth.js.map +1 -0
  13. package/lib/cjs/build/validate.js +7 -0
  14. package/lib/cjs/build/validate.js.map +1 -0
  15. package/lib/cjs/copy-assets.js +84 -0
  16. package/lib/cjs/copy-assets.js.map +1 -0
  17. package/lib/cjs/index.js +32 -0
  18. package/lib/cjs/index.js.map +1 -0
  19. package/lib/cjs/package.json +3 -0
  20. package/lib/cjs/server/app-package.js +130 -0
  21. package/lib/cjs/server/app-package.js.map +1 -0
  22. package/lib/cjs/server/content-types.js +73 -0
  23. package/lib/cjs/server/content-types.js.map +1 -0
  24. package/lib/cjs/server/interactions.js +89 -0
  25. package/lib/cjs/server/interactions.js.map +1 -0
  26. package/lib/cjs/server/mcp.js +45 -0
  27. package/lib/cjs/server/mcp.js.map +1 -0
  28. package/lib/cjs/server/site.js +36 -0
  29. package/lib/cjs/server/site.js.map +1 -0
  30. package/lib/cjs/server/skills.js +114 -0
  31. package/lib/cjs/server/skills.js.map +1 -0
  32. package/lib/cjs/server/tools.js +87 -0
  33. package/lib/cjs/server/tools.js.map +1 -0
  34. package/lib/cjs/server/types.js +3 -0
  35. package/lib/cjs/server/types.js.map +1 -0
  36. package/lib/cjs/server/widgets.js +27 -0
  37. package/lib/cjs/server/widgets.js.map +1 -0
  38. package/lib/cjs/server.js +136 -0
  39. package/lib/cjs/server.js.map +1 -0
  40. package/lib/cjs/site/styles.js +692 -0
  41. package/lib/cjs/site/styles.js.map +1 -0
  42. package/lib/cjs/site/templates.js +1014 -0
  43. package/lib/cjs/site/templates.js.map +1 -0
  44. package/lib/cjs/types.js +3 -0
  45. package/lib/cjs/types.js.map +1 -0
  46. package/lib/cjs/utils.js +44 -0
  47. package/lib/cjs/utils.js.map +1 -0
  48. package/lib/esm/ContentTypesCollection.js +39 -0
  49. package/lib/esm/ContentTypesCollection.js.map +1 -0
  50. package/lib/esm/InteractionCollection.js +39 -0
  51. package/lib/esm/InteractionCollection.js.map +1 -0
  52. package/lib/esm/SkillCollection.js +377 -0
  53. package/lib/esm/SkillCollection.js.map +1 -0
  54. package/lib/esm/ToolCollection.js +183 -0
  55. package/lib/esm/ToolCollection.js.map +1 -0
  56. package/lib/esm/ToolRegistry.js +90 -0
  57. package/lib/esm/ToolRegistry.js.map +1 -0
  58. package/lib/esm/auth.js +97 -0
  59. package/lib/esm/auth.js.map +1 -0
  60. package/lib/esm/build/validate.js +4 -0
  61. package/lib/esm/build/validate.js.map +1 -0
  62. package/lib/esm/copy-assets.js +81 -0
  63. package/lib/esm/copy-assets.js.map +1 -0
  64. package/lib/esm/index.js +12 -0
  65. package/lib/esm/index.js.map +1 -0
  66. package/lib/esm/server/app-package.js +127 -0
  67. package/lib/esm/server/app-package.js.map +1 -0
  68. package/lib/esm/server/content-types.js +70 -0
  69. package/lib/esm/server/content-types.js.map +1 -0
  70. package/lib/esm/server/interactions.js +86 -0
  71. package/lib/esm/server/interactions.js.map +1 -0
  72. package/lib/esm/server/mcp.js +42 -0
  73. package/lib/esm/server/mcp.js.map +1 -0
  74. package/lib/esm/server/site.js +33 -0
  75. package/lib/esm/server/site.js.map +1 -0
  76. package/lib/esm/server/skills.js +111 -0
  77. package/lib/esm/server/skills.js.map +1 -0
  78. package/lib/esm/server/tools.js +84 -0
  79. package/lib/esm/server/tools.js.map +1 -0
  80. package/lib/esm/server/types.js +2 -0
  81. package/lib/esm/server/types.js.map +1 -0
  82. package/lib/esm/server/widgets.js +24 -0
  83. package/lib/esm/server/widgets.js.map +1 -0
  84. package/lib/esm/server.js +132 -0
  85. package/lib/esm/server.js.map +1 -0
  86. package/lib/esm/site/styles.js +689 -0
  87. package/lib/esm/site/styles.js.map +1 -0
  88. package/lib/esm/site/templates.js +1001 -0
  89. package/lib/esm/site/templates.js.map +1 -0
  90. package/lib/esm/types.js +2 -0
  91. package/lib/esm/types.js.map +1 -0
  92. package/lib/esm/utils.js +38 -0
  93. package/lib/esm/utils.js.map +1 -0
  94. package/lib/types/ContentTypesCollection.d.ts +18 -0
  95. package/lib/types/ContentTypesCollection.d.ts.map +1 -0
  96. package/lib/types/InteractionCollection.d.ts +18 -0
  97. package/lib/types/InteractionCollection.d.ts.map +1 -0
  98. package/lib/types/SkillCollection.d.ts +119 -0
  99. package/lib/types/SkillCollection.d.ts.map +1 -0
  100. package/lib/types/ToolCollection.d.ts +67 -0
  101. package/lib/types/ToolCollection.d.ts.map +1 -0
  102. package/lib/types/ToolRegistry.d.ts +22 -0
  103. package/lib/types/ToolRegistry.d.ts.map +1 -0
  104. package/lib/types/auth.d.ts +32 -0
  105. package/lib/types/auth.d.ts.map +1 -0
  106. package/lib/types/build/validate.d.ts +2 -0
  107. package/lib/types/build/validate.d.ts.map +1 -0
  108. package/lib/types/copy-assets.d.ts +14 -0
  109. package/lib/types/copy-assets.d.ts.map +1 -0
  110. package/lib/types/index.d.ts +12 -0
  111. package/lib/types/index.d.ts.map +1 -0
  112. package/lib/types/server/app-package.d.ts +4 -0
  113. package/lib/types/server/app-package.d.ts.map +1 -0
  114. package/lib/types/server/content-types.d.ts +4 -0
  115. package/lib/types/server/content-types.d.ts.map +1 -0
  116. package/lib/types/server/interactions.d.ts +4 -0
  117. package/lib/types/server/interactions.d.ts.map +1 -0
  118. package/lib/types/server/mcp.d.ts +4 -0
  119. package/lib/types/server/mcp.d.ts.map +1 -0
  120. package/lib/types/server/site.d.ts +4 -0
  121. package/lib/types/server/site.d.ts.map +1 -0
  122. package/lib/types/server/skills.d.ts +4 -0
  123. package/lib/types/server/skills.d.ts.map +1 -0
  124. package/lib/types/server/tools.d.ts +4 -0
  125. package/lib/types/server/tools.d.ts.map +1 -0
  126. package/lib/types/server/types.d.ts +88 -0
  127. package/lib/types/server/types.d.ts.map +1 -0
  128. package/lib/types/server/widgets.d.ts +4 -0
  129. package/lib/types/server/widgets.d.ts.map +1 -0
  130. package/lib/types/server.d.ts +27 -0
  131. package/lib/types/server.d.ts.map +1 -0
  132. package/lib/types/site/styles.d.ts +5 -0
  133. package/lib/types/site/styles.d.ts.map +1 -0
  134. package/lib/types/site/templates.d.ts +60 -0
  135. package/lib/types/site/templates.d.ts.map +1 -0
  136. package/lib/types/types.d.ts +293 -0
  137. package/lib/types/types.d.ts.map +1 -0
  138. package/lib/types/utils.d.ts +10 -0
  139. package/lib/types/utils.d.ts.map +1 -0
  140. package/package.json +4 -4
  141. package/src/ContentTypesCollection.ts +8 -8
  142. package/src/SkillCollection.ts +11 -2
  143. package/src/ToolCollection.ts +9 -18
  144. package/src/ToolRegistry.ts +17 -56
  145. package/src/server/app-package.ts +88 -43
  146. package/src/server/{conyent-types.ts → content-types.ts} +29 -11
  147. package/src/server/interactions.ts +11 -6
  148. package/src/server/tools.ts +3 -22
  149. package/src/server/types.ts +9 -1
  150. package/src/server/widgets.ts +2 -6
  151. package/src/server.ts +1 -1
  152. package/src/types.ts +34 -1
  153. package/src/utils.ts +15 -1
@@ -0,0 +1,27 @@
1
+ import { Context, Hono } from "hono";
2
+ import { ToolServerConfig } from "./server/types.js";
3
+ /**
4
+ * Create a Hono server for tools, interactions, and skills.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { createToolServer, ToolCollection, SkillCollection } from "@vertesia/tools-sdk";
9
+ *
10
+ * const server = createToolServer({
11
+ * tools: [myToolCollection],
12
+ * skills: [mySkillCollection],
13
+ * });
14
+ *
15
+ * export default server;
16
+ * ```
17
+ */
18
+ export declare function createToolServer(config: ToolServerConfig): Hono;
19
+ /**
20
+ * Simple development server with static fimesale handling
21
+ *
22
+ * @deprecated Use tools server template
23
+ */
24
+ export declare function createDevServer(config: ToolServerConfig & {
25
+ staticHandler?: (c: Context, next: () => Promise<void>) => Promise<Response | void>;
26
+ }): Hono;
27
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AASrC,OAAO,EAAe,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAkBlE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAoG/D;AAMD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG;IACvD,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CACvF,GAAG,IAAI,CAQP"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Shared CSS styles for the tools server HTML pages
3
+ */
4
+ export declare const baseStyles = "\n:root {\n color-scheme: light dark;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n margin: 0;\n padding: 2.5rem 1.75rem;\n background:\n radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.10), transparent 55%),\n radial-gradient(circle at 100% 0, rgba(129, 140, 248, 0.12), transparent 55%),\n #f9fafb;\n color: #0f172a;\n line-height: 1.5;\n}\n\n.page {\n max-width: 1120px;\n margin: 0 auto;\n}\n\n.hero {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 2.25rem;\n padding: 1.75rem 2rem;\n margin-bottom: 2.5rem;\n border-radius: 1.25rem;\n background: linear-gradient(135deg, #ffffff, #f3f4ff);\n border: 1px solid #e5e7eb;\n box-shadow:\n 0 18px 40px rgba(15, 23, 42, 0.08),\n 0 0 0 1px rgba(248, 250, 252, 0.8);\n}\n\n.hero-main {\n display: flex;\n gap: 1.5rem;\n align-items: center;\n}\n\n.hero-logo {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 999px;\n background: radial-gradient(circle at 30% 0, #38bdf8, #6366f1);\n box-shadow:\n 0 0 0 1px rgba(15, 23, 42, 0.85),\n 0 12px 30px rgba(37, 99, 235, 0.6);\n}\n\n.hero-logo-initial {\n font-size: 1.1rem;\n font-weight: 650;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: #eff6ff;\n}\n\n.hero-logo img {\n display: block;\n max-width: 80%;\n max-height: 60%;\n}\n\n.logo-dark {\n display: none;\n}\n\n.hero-meta {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.hero-eyebrow {\n font-size: 0.75rem;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: #6b7280;\n}\n\n.hero-title {\n font-size: 1.9rem;\n font-weight: 650;\n letter-spacing: -0.03em;\n color: #0f172a;\n margin: 0;\n}\n\n.hero-tagline {\n font-size: 0.95rem;\n color: #4b5563;\n margin: 0.1rem 0 0 0;\n}\n\n.hero-summary {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n margin-top: 0.75rem;\n font-size: 0.8rem;\n color: #6b7280;\n}\n\n.hero-summary span {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.15rem 0.55rem;\n border-radius: 999px;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n}\n\n.hero-summary dot {\n width: 6px;\n height: 6px;\n border-radius: 999px;\n display: inline-block;\n background: #22c55e;\n}\n\n.search-bar {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n margin: 0 0 1.75rem 0;\n}\n\n.search-input {\n max-width: 360px;\n padding: 0.55rem 0.75rem;\n border-radius: 999px;\n border: 1px solid #e5e7eb;\n background: #ffffff;\n color: #111827;\n font-size: 0.9rem;\n font-family: inherit;\n box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);\n}\n\n.search-input::placeholder {\n color: #9ca3af;\n}\n\n.search-input:focus {\n outline: none;\n border-color: #60a5fa;\n box-shadow:\n 0 0 0 1px rgba(59, 130, 246, 0.4),\n 0 6px 18px rgba(37, 99, 235, 0.18);\n}\n\n.search-hint {\n font-size: 0.75rem;\n color: #9ca3af;\n}\n\n.search-empty {\n margin-top: 1rem;\n font-size: 0.85rem;\n color: #9ca3af;\n}\n\n.hero-panel {\n min-width: 220px;\n max-width: 260px;\n padding: 1.25rem 1.4rem;\n border-radius: 1rem;\n background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.10), transparent 70%),\n #eff6ff;\n border: 1px solid #bfdbfe;\n box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);\n font-size: 0.8rem;\n}\n\n.hero-panel-label {\n font-size: 0.7rem;\n letter-spacing: 0.13em;\n text-transform: uppercase;\n color: #1d4ed8;\n margin-bottom: 0.5rem;\n}\n\n.hero-panel-endpoint {\n display: inline-flex;\n align-items: center;\n padding: 0.3rem 0.6rem;\n border-radius: 0.5rem;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n font-size: 0.82rem;\n color: #111827;\n}\n\n.hero-panel-hint {\n margin-top: 0.6rem;\n color: #6b7280;\n line-height: 1.4;\n}\n\n.hero-panel-hint strong {\n color: #111827;\n}\n\nh1, h2 {\n margin: 0 0 1rem 0;\n color: #0f172a;\n}\n\nh1 { font-size: 1.875rem; }\nh2 {\n font-size: 1.4rem;\n margin-top: 2rem;\n letter-spacing: 0.03em;\n text-transform: uppercase;\n color: #6b7280;\n}\n\na {\n color: #2563eb;\n text-decoration: none;\n}\na:hover {\n text-decoration: underline;\n}\n\nhr {\n border: none;\n border-top: 1px solid #e5e7eb;\n margin: 2rem 0;\n}\n\n.card-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: 1.5rem;\n}\n\n.card {\n background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), transparent 75%),\n #ffffff;\n padding: 1.25rem 1.35rem;\n border-radius: 14px;\n box-shadow:\n 0 14px 30px rgba(15, 23, 42, 0.06),\n 0 0 0 1px rgba(248, 250, 252, 0.9);\n border: 1px solid #e5e7eb;\n transition: transform 0.15s, box-shadow 0.15s;\n text-decoration: none;\n color: inherit;\n display: block;\n}\n\n.card:hover {\n transform: translateY(-3px);\n box-shadow:\n 0 18px 40px rgba(15, 23, 42, 0.10),\n 0 0 0 1px rgba(59, 130, 246, 0.6);\n}\n\n.card-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 0.75rem;\n}\n\n.card-icon svg {\n width: 100%;\n height: 100%;\n}\n\n.card-title {\n font-weight: 600;\n font-size: 1.1rem;\n margin-bottom: 0.25rem;\n color: #0f172a;\n}\n\n.card-desc {\n font-size: 0.925rem;\n color: #6b7280;\n}\n\n.card-meta {\n margin-top: 0.45rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: #9ca3af;\n}\n\n.item-list {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.item-card {\n background: #ffffff;\n padding: 1rem 1.25rem;\n border-radius: 10px;\n border-left: 4px solid #6366f1;\n box-shadow:\n 0 10px 24px rgba(15, 23, 42, 0.06),\n 0 0 0 1px rgba(248, 250, 252, 0.9);\n}\n\n.item-card.skill {\n border-left-color: #10b981;\n}\n\n.item-card.interaction {\n border-left-color: #f59e0b;\n}\n\n.item-name {\n font-weight: 600;\n font-size: 1.05rem;\n}\n\n.item-desc {\n font-size: 0.9rem;\n color: #6b7280;\n margin-top: 0.25rem;\n}\n\n.item-meta {\n font-size: 0.8rem;\n color: #9ca3af;\n margin-top: 0.5rem;\n}\n\n.item-schema {\n margin-top: 0.75rem;\n font-size: 0.8rem;\n font-family: ui-monospace, monospace;\n background: #f3f4f6;\n padding: 0.75rem;\n border-radius: 6px;\n overflow-x: auto;\n white-space: pre-wrap;\n color: #374151;\n}\n\n.header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 1.5rem;\n}\n\n.header-icon {\n width: 64px;\n height: 64px;\n}\n\n.header-icon svg {\n width: 100%;\n height: 100%;\n}\n\n.section-header {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 1rem;\n margin-bottom: 0.75rem;\n}\n\n.section-subtitle {\n font-size: 0.8rem;\n color: #6b7280;\n}\n\n.endpoint-url {\n font-size: 0.85rem;\n color: #6b7280;\n margin-top: 0.25rem;\n}\n\n.endpoint-url code {\n background: #f3f4f6;\n padding: 0.125rem 0.375rem;\n border-radius: 4px;\n font-family: ui-monospace, monospace;\n}\n\n.endpoint-box {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n background: #f3f4f6;\n padding: 0.75rem 1rem;\n border-radius: 8px;\n margin-top: 0.5rem;\n}\n\n.endpoint-box code {\n flex: 1;\n font-family: ui-monospace, monospace;\n font-size: 0.875rem;\n color: #1f2937;\n}\n\n.copy-btn {\n background: #e5e7eb;\n border: none;\n padding: 0.5rem;\n border-radius: 6px;\n cursor: pointer;\n color: #6b7280;\n transition: all 0.15s;\n}\n\n.copy-btn:hover {\n background: #d1d5db;\n color: #374151;\n}\n\n.copy-btn svg {\n width: 16px;\n height: 16px;\n}\n\n.badge {\n display: inline-block;\n font-size: 0.75rem;\n padding: 0.125rem 0.5rem;\n border-radius: 9999px;\n background: #f9fafb;\n color: #374151;\n border: 1px solid #e5e7eb;\n margin-right: 0.25rem;\n}\n\n.badge.python { background: #fef3c7; color: #92400e; border-color: #facc15; }\n.badge.typescript { background: #dbeafe; color: #1e40af; border-color: #60a5fa; }\n.badge.javascript { background: #fef9c3; color: #854d0e; border-color: #facc15; }\n\n@media (max-width: 768px) {\n body {\n padding: 1.75rem 1.25rem;\n }\n\n .hero {\n flex-direction: column;\n padding: 1.5rem 1.35rem;\n }\n\n .hero-panel {\n max-width: 100%;\n width: 100%;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n body {\n background:\n radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), transparent 55%),\n radial-gradient(circle at 100% 0, rgba(129, 140, 248, 0.25), transparent 55%),\n #020617;\n color: #e5e7eb;\n }\n\n .hero {\n background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));\n border: 1px solid rgba(148, 163, 184, 0.45);\n box-shadow:\n 0 24px 60px rgba(15, 23, 42, 0.85),\n 0 0 0 1px rgba(15, 23, 42, 0.75);\n }\n\n .hero-eyebrow {\n color: #9ca3af;\n }\n\n .hero-title {\n color: #f9fafb;\n }\n\n .hero-tagline {\n color: #cbd5f5;\n }\n\n .hero-summary {\n color: #9ca3af;\n }\n\n .hero-summary span {\n background: rgba(15, 23, 42, 0.95);\n border-color: rgba(148, 163, 184, 0.45);\n }\n\n .hero-panel {\n background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.16), transparent 70%),\n rgba(15, 23, 42, 0.96);\n border: 1px solid rgba(59, 130, 246, 0.6);\n box-shadow: 0 20px 40px rgba(15, 23, 42, 0.85);\n }\n\n .hero-panel-label {\n color: #93c5fd;\n }\n\n .hero-panel-endpoint {\n background: rgba(15, 23, 42, 0.98);\n border-color: rgba(148, 163, 184, 0.6);\n color: #e5e7eb;\n }\n\n .hero-panel-hint {\n color: #9ca3af;\n }\n\n .hero-panel-hint strong {\n color: #e5e7eb;\n }\n\n .search-input {\n background: rgba(15, 23, 42, 0.96);\n border-color: rgba(55, 65, 81, 0.9);\n color: #e5e7eb;\n box-shadow:\n 0 6px 16px rgba(15, 23, 42, 0.9),\n 0 0 0 1px rgba(15, 23, 42, 0.9);\n }\n\n .search-input::placeholder {\n color: #6b7280;\n }\n\n .search-input:focus {\n border-color: #60a5fa;\n box-shadow:\n 0 0 0 1px rgba(59, 130, 246, 0.7),\n 0 10px 26px rgba(30, 64, 175, 0.7);\n }\n\n .search-hint,\n .search-empty {\n color: #9ca3af;\n }\n\n h1, h2 {\n color: #e5e7eb;\n }\n\n h2 {\n color: #9ca3af;\n }\n\n a {\n color: #60a5fa;\n }\n\n hr {\n border-top-color: rgba(148, 163, 184, 0.4);\n }\n\n .card {\n background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), transparent 75%),\n rgba(15, 23, 42, 0.9);\n box-shadow:\n 0 14px 30px rgba(15, 23, 42, 0.8),\n 0 0 0 1px rgba(15, 23, 42, 0.85);\n border-color: rgba(148, 163, 184, 0.5);\n }\n\n .card:hover {\n box-shadow:\n 0 18px 40px rgba(15, 23, 42, 0.9),\n 0 0 0 1px rgba(59, 130, 246, 0.8);\n }\n\n .card-title {\n color: #e5e7eb;\n }\n\n .card-desc {\n color: #9ca3af;\n }\n\n .card-meta {\n color: #6b7280;\n }\n\n .item-card {\n background: rgba(15, 23, 42, 0.9);\n box-shadow:\n 0 10px 24px rgba(15, 23, 42, 0.9),\n 0 0 0 1px rgba(15, 23, 42, 0.9);\n }\n\n .item-desc,\n .item-meta {\n color: #9ca3af;\n }\n\n .item-schema {\n background: rgba(15, 23, 42, 0.95);\n color: #e5e7eb;\n }\n\n .endpoint-url {\n color: #9ca3af;\n }\n\n .endpoint-url code {\n background: rgba(15, 23, 42, 0.95);\n }\n\n .endpoint-box {\n background: rgba(31, 41, 55, 0.95);\n }\n\n .endpoint-box code {\n color: #e5e7eb;\n }\n\n .copy-btn {\n background: rgba(55, 65, 81, 0.95);\n color: #e5e7eb;\n }\n\n .copy-btn:hover {\n background: rgba(75, 85, 99, 0.98);\n color: #f9fafb;\n }\n\n .badge {\n background: rgba(15, 23, 42, 0.96);\n color: #e5e7eb;\n border-color: rgba(148, 163, 184, 0.6);\n }\n\n .badge.python {\n background: rgba(252, 211, 77, 0.12);\n color: #facc15;\n border-color: rgba(250, 204, 21, 0.5);\n }\n\n .badge.typescript {\n background: rgba(59, 130, 246, 0.12);\n color: #93c5fd;\n border-color: rgba(59, 130, 246, 0.7);\n }\n\n .badge.javascript {\n background: rgba(251, 191, 36, 0.12);\n color: #fbbf24;\n border-color: rgba(251, 191, 36, 0.55);\n }\n\n .logo-light {\n display: none;\n }\n .logo-dark {\n display: block;\n }\n\n .plugin-link-primary:hover {\n background: #2563eb !important;\n }\n\n .plugin-link-secondary:hover {\n background: #059669 !important;\n }\n}\n\n.plugin-link-primary:hover {\n background: #2563eb;\n}\n\n.plugin-link-secondary:hover {\n background: #059669;\n}\n";
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/site/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,m9aA4qBtB,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type { InteractionCollection } from "../InteractionCollection.js";
2
+ import { ToolServerConfig } from "../server/types.js";
3
+ import type { SkillCollection } from "../SkillCollection.js";
4
+ import type { ToolCollection } from "../ToolCollection.js";
5
+ import type { ContentTypesCollection } from "../ContentTypesCollection.js";
6
+ import type { ICollection, SkillDefinition, Tool } from "../types.js";
7
+ type MCPProviderMeta = {
8
+ name: string;
9
+ description?: string;
10
+ };
11
+ /**
12
+ * Render a collection card for the index page
13
+ */
14
+ export declare function collectionCard(collection: ICollection, pathPrefix: string, meta?: string): string;
15
+ /**
16
+ * Render a tool card (simple version for lists)
17
+ */
18
+ export declare function toolCard(tool: Tool<Record<string, unknown>>): string;
19
+ /**
20
+ * Render an MCP provider card
21
+ */
22
+ export declare function mcpProviderCard(provider: MCPProviderMeta): string;
23
+ /**
24
+ * Render a detailed tool card
25
+ */
26
+ export declare function toolDetailCard(tool: Tool<Record<string, unknown>>, collectionName: string): string;
27
+ /**
28
+ * Render a skill card (simple version for lists)
29
+ */
30
+ export declare function skillCard(skill: SkillDefinition): string;
31
+ /**
32
+ * Render a detailed skill card
33
+ */
34
+ export declare function skillDetailCard(skill: SkillDefinition, collection: SkillCollection): string;
35
+ /**
36
+ * Render the main index page
37
+ *
38
+ * Note: The fourth argument is backward compatible:
39
+ * - If a string is passed, it is treated as the title.
40
+ * - If an array is passed, it is treated as MCP providers and the fifth argument (if any) is the title.
41
+ */
42
+ export declare function indexPage(config: ToolServerConfig): string;
43
+ /**
44
+ * Render a tool collection detail page
45
+ */
46
+ export declare function toolCollectionPage(collection: ToolCollection): string;
47
+ /**
48
+ * Render a skill collection detail page
49
+ */
50
+ export declare function skillCollectionPage(collection: SkillCollection): string;
51
+ /**
52
+ * Render an interaction collection detail page
53
+ */
54
+ export declare function interactionCollectionPage(collection: InteractionCollection): string;
55
+ /**
56
+ * Render a content type collection detail page
57
+ */
58
+ export declare function contentTypeCollectionPage(collection: ContentTypesCollection): string;
59
+ export {};
60
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/site/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAItE,KAAK,eAAe,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AA0VF;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAQjG;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CASpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAMjE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CA0DlG;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAWxD;AAsBD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAsF3F;AAoED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACrB,MAAM,EAAE,gBAAgB,GACzB,MAAM,CAmNR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,MAAM,CAsCrE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,CAsCvE;AA4CD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAoBnF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,sBAAsB,GAAG,MAAM,CAqBpF"}
@@ -0,0 +1,293 @@
1
+ import type { ToolDefinition, ToolUse } from "@llumiverse/common";
2
+ import { VertesiaClient } from "@vertesia/client";
3
+ import { AgentToolDefinition, AuthTokenPayload, ProjectConfiguration, ToolExecutionMetadata, ToolResult, ToolResultContent } from "@vertesia/common";
4
+ export type { ToolExecutionMetadata };
5
+ export type ICollection<T = any> = CollectionProperties & Iterable<T>;
6
+ export interface CollectionProperties {
7
+ /**
8
+ * A kebab case collection name. Must only contains alphanumeric and dash characters,
9
+ * The name can be used to generate the path where the collection is exposed.
10
+ * Example: my-collection
11
+ */
12
+ name: string;
13
+ /**
14
+ * Optional title for UI display.
15
+ * If not provided the pascal case version of the name will be used
16
+ */
17
+ title?: string;
18
+ /**
19
+ * Optional icon for UI display
20
+ */
21
+ icon?: string;
22
+ /**
23
+ * A short description
24
+ */
25
+ description?: string;
26
+ }
27
+ export interface ToolExecutionContext {
28
+ /**
29
+ * The raw JWT token to the tool execution request
30
+ */
31
+ token: string;
32
+ /**
33
+ * The decoded JWT token
34
+ */
35
+ payload: AuthTokenPayload;
36
+ /**
37
+ * Vertesia client factory using the current auth token.
38
+ * @returns a vertesia client instance
39
+ */
40
+ getClient: () => Promise<VertesiaClient>;
41
+ }
42
+ export interface ToolExecutionResult extends ToolResultContent {
43
+ /**
44
+ * Medata can be used to return more info on the tool execution like stats or user messages.
45
+ */
46
+ meta?: Record<string, any>;
47
+ }
48
+ export interface ToolExecutionResponse extends ToolExecutionResult, ToolResult {
49
+ /**
50
+ * The tool use id of the tool use request. For traceability.
51
+ */
52
+ tool_use_id: string;
53
+ }
54
+ export interface ToolExecutionResponseError {
55
+ /**
56
+ * The tool use id of the tool use request. For traceability.
57
+ */
58
+ tool_use_id: string;
59
+ /**
60
+ * The http status code
61
+ */
62
+ status: number;
63
+ /**
64
+ * the error message
65
+ */
66
+ error: string;
67
+ /**
68
+ * Additional context information
69
+ */
70
+ data?: Record<string, any>;
71
+ }
72
+ export interface ToolExecutionPayload<ParamsT extends Record<string, any>> {
73
+ tool_use: ToolUse<ParamsT>;
74
+ /**
75
+ * Optional metadata related to the current execution request
76
+ */
77
+ metadata?: ToolExecutionMetadata;
78
+ }
79
+ export type ToolFn<ParamsT extends Record<string, any>> = (payload: ToolExecutionPayload<ParamsT>, context: ToolExecutionContext) => Promise<ToolExecutionResult>;
80
+ export interface ToolUseContext {
81
+ project_id?: string;
82
+ account_id?: string;
83
+ project_name?: string;
84
+ project_ns?: string;
85
+ configuration?: ProjectConfiguration;
86
+ vars?: Record<string, any>;
87
+ }
88
+ export interface Tool<ParamsT extends Record<string, any>> extends ToolDefinition {
89
+ run: ToolFn<ParamsT>;
90
+ /**
91
+ * Whether this tool is available by default.
92
+ * - true/undefined: Tool is always available to agents
93
+ * - false: Tool is only available when activated by a skill's related_tools
94
+ */
95
+ default?: boolean;
96
+ /**
97
+ * Optional filter to check if the tool is enabled for the given project configuration.
98
+ * This can be used to dynamically enable/disable tools based on project settings, environment variables, or any other logic.
99
+ * If no filter is provided, the tool will be enabled by default.
100
+ * @param payload
101
+ * @returns
102
+ */
103
+ isEnabled?: (payload: ToolUseContext) => boolean;
104
+ }
105
+ /**
106
+ * The interface that should be returned when requesting a collection endpoint using a GET
107
+ */
108
+ export interface ToolCollectionDefinition {
109
+ title: string;
110
+ description: string;
111
+ src: string;
112
+ tools: AgentToolDefinition[];
113
+ }
114
+ export type { ToolDefinition };
115
+ /**
116
+ * The details of a connection to a MCP server - including the server URL and an authentication token
117
+ */
118
+ export interface MCPConnectionDetails {
119
+ /**
120
+ * The mcp server name. It will be used to prefix tool names.
121
+ */
122
+ name: string;
123
+ /**
124
+ * The target mcp server URL
125
+ */
126
+ url: string;
127
+ /**
128
+ * The bearer authentication token to use when connecting to the mcp server.
129
+ * If an empty string no authentication will be done
130
+ */
131
+ token: string;
132
+ /**
133
+ * Optional additional HTTP headers to include with requests to the MCP server.
134
+ * Merged with the Authorization header derived from the token.
135
+ */
136
+ headers?: Record<string, string>;
137
+ }
138
+ /**
139
+ * Content type for skill instructions
140
+ */
141
+ export type SkillContentType = 'md' | 'jst';
142
+ /**
143
+ * Context triggers for auto-injection of skills
144
+ */
145
+ export interface SkillContextTriggers {
146
+ /**
147
+ * Keywords in user input that should trigger this skill
148
+ */
149
+ keywords?: string[];
150
+ /**
151
+ * If these tools are being used, suggest this skill
152
+ */
153
+ tool_names?: string[];
154
+ /**
155
+ * Regex patterns to match against input data
156
+ */
157
+ data_patterns?: string[];
158
+ }
159
+ /**
160
+ * Execution configuration for skills that need code execution
161
+ */
162
+ export interface SkillExecution {
163
+ /**
164
+ * The programming language for execution
165
+ */
166
+ language: string;
167
+ /**
168
+ * Required packages to install
169
+ */
170
+ packages?: string[];
171
+ /**
172
+ * System-level packages to install (e.g., apt-get packages)
173
+ */
174
+ system_packages?: string[];
175
+ /**
176
+ * Code template to execute
177
+ */
178
+ template?: string;
179
+ }
180
+ /**
181
+ * Skill definition - parsed from SKILL.md or SKILL.jst
182
+ */
183
+ export interface SkillDefinition {
184
+ /**
185
+ * Unique skill name (kebab-case)
186
+ */
187
+ name: string;
188
+ /**
189
+ * Display title
190
+ */
191
+ title?: string;
192
+ /**
193
+ * Short description for discovery
194
+ */
195
+ description: string;
196
+ /**
197
+ * The skill instructions (markdown or JST template)
198
+ */
199
+ instructions: string;
200
+ /**
201
+ * Content type: 'md' for static markdown, 'jst' for dynamic templates
202
+ */
203
+ content_type: SkillContentType;
204
+ /**
205
+ * JSON Schema for skill input parameters.
206
+ * Used when skill is exposed as a tool.
207
+ */
208
+ input_schema?: {
209
+ type: 'object';
210
+ properties?: Record<string, any>;
211
+ required?: string[];
212
+ };
213
+ /**
214
+ * Context triggers for auto-injection
215
+ */
216
+ context_triggers?: SkillContextTriggers;
217
+ /**
218
+ * Execution configuration for code-based skills
219
+ */
220
+ execution?: SkillExecution;
221
+ /**
222
+ * Related tools that work well with this skill
223
+ */
224
+ related_tools?: string[];
225
+ /**
226
+ * Scripts bundled with this skill (synced to sandbox when skill is used)
227
+ */
228
+ scripts?: string[];
229
+ /**
230
+ * The name of the widgets provided by this skill (if any)
231
+ * The name will be used to load the widget dynamically from the agent chat
232
+ * and must match the code block language returned by the LLM (e.g., ```my-widget)
233
+ * which will be rendered using the widget.
234
+ * The widget file must be located in the skill directory under the name {{widget-name}}.tsx.
235
+ */
236
+ widgets?: string[];
237
+ /**
238
+ * Optional filter to check if the tool is enabled for the given project configuration.
239
+ * This can be used to dynamically enable/disable tools based on project settings, environment variables, or any other logic.
240
+ * If no filter is provided, the tool will be enabled by default.
241
+ * @param payload
242
+ * @returns
243
+ */
244
+ isEnabled?: (payload: ToolUseContext) => boolean;
245
+ }
246
+ /**
247
+ * Skill execution payload
248
+ */
249
+ export interface SkillExecutionPayload {
250
+ /**
251
+ * The skill name to execute
252
+ */
253
+ skill_name: string;
254
+ /**
255
+ * Data context for JST template rendering
256
+ */
257
+ data?: Record<string, any>;
258
+ /**
259
+ * Whether to execute the code template (if present)
260
+ */
261
+ execute?: boolean;
262
+ }
263
+ /**
264
+ * Skill execution result
265
+ */
266
+ export interface SkillExecutionResult {
267
+ /**
268
+ * The skill name
269
+ */
270
+ name: string;
271
+ /**
272
+ * Rendered instructions
273
+ */
274
+ instructions: string;
275
+ /**
276
+ * Execution output (if execute=true and skill has code template)
277
+ */
278
+ execution_result?: {
279
+ output: string;
280
+ files?: string[];
281
+ is_error: boolean;
282
+ };
283
+ }
284
+ /**
285
+ * Skill collection definition - returned by GET endpoint
286
+ */
287
+ export interface SkillCollectionDefinition {
288
+ name: string;
289
+ title: string;
290
+ description: string;
291
+ skills: SkillDefinition[];
292
+ }
293
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErJ,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,MA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;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,QAAQ,EAAE,OAAO,CAAC;KACrB,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC7B"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Convert a name to a URL-safe path segment.
3
+ * If the name contains spaces or underscores, convert to PascalCase.
4
+ * Otherwise return as-is. Any characters not in [a-zA-Z0-9$_\-@] are replaced with '-'.
5
+ */
6
+ export declare function toPathName(name: string): string;
7
+ export declare function kebabCaseToTitle(name: string): string;
8
+ export declare function makeScriptUrl(origin: string, script: string): string;
9
+ export declare function join(left: string, right: string): string;
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAE5C;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAE3D;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAc/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/tools-sdk",
3
- "version": "1.0.0-dev.20260203.130115Z",
3
+ "version": "1.0.0-dev.20260225.024852Z",
4
4
  "description": "Tools SDK - utilities for building remote tools",
5
5
  "type": "module",
6
6
  "types": "./lib/types/index.d.ts",
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "jose": "^6.0.11",
34
34
  "zod": "^4.3.5",
35
- "@llumiverse/common": "1.0.0-dev.20260202.145450Z",
36
- "@vertesia/common": "1.0.0-dev.20260203.130115Z",
37
- "@vertesia/client": "1.0.0-dev.20260203.130115Z"
35
+ "@vertesia/client": "1.0.0-dev.20260225.024852Z",
36
+ "@llumiverse/common": "1.0.0-dev.20260224.234313Z",
37
+ "@vertesia/common": "1.0.0-dev.20260225.024852Z"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",
@@ -1,12 +1,12 @@
1
- import { InCodeTypeDefinition } from "@vertesia/common";
1
+ import { InCodeTypeSpec } from "@vertesia/common";
2
2
  import { CollectionProperties, ICollection } from "./types.js";
3
3
  import { kebabCaseToTitle } from "./utils.js";
4
4
 
5
5
  export interface ContentTypesCollectionProps extends CollectionProperties {
6
- types: InCodeTypeDefinition[];
6
+ types: InCodeTypeSpec[];
7
7
  }
8
- export class ContentTypesCollection implements ICollection<InCodeTypeDefinition> {
9
- types: InCodeTypeDefinition[];
8
+ export class ContentTypesCollection implements ICollection<InCodeTypeSpec> {
9
+ types: InCodeTypeSpec[];
10
10
  name: string;
11
11
  title?: string;
12
12
  icon?: string;
@@ -25,12 +25,12 @@ export class ContentTypesCollection implements ICollection<InCodeTypeDefinition>
25
25
  return this.types;
26
26
  }
27
27
 
28
- [Symbol.iterator](): Iterator<InCodeTypeDefinition> {
28
+ [Symbol.iterator](): Iterator<InCodeTypeSpec> {
29
29
  let index = 0;
30
30
  const types = this.types;
31
31
 
32
32
  return {
33
- next(): IteratorResult<InCodeTypeDefinition> {
33
+ next(): IteratorResult<InCodeTypeSpec> {
34
34
  if (index < types.length) {
35
35
  return { value: types[index++], done: false };
36
36
  } else {
@@ -40,11 +40,11 @@ export class ContentTypesCollection implements ICollection<InCodeTypeDefinition>
40
40
  };
41
41
  }
42
42
 
43
- map<U>(callback: (type: InCodeTypeDefinition, index: number) => U): U[] {
43
+ map<U>(callback: (type: InCodeTypeSpec, index: number) => U): U[] {
44
44
  return this.types.map(callback);
45
45
  }
46
46
 
47
- getTypeByName(name: string): InCodeTypeDefinition | undefined {
47
+ getTypeByName(name: string): InCodeTypeSpec | undefined {
48
48
  return this.types.find(type => type.name === name);
49
49
  }
50
50
 
@@ -13,6 +13,7 @@ import type {
13
13
  ToolCollectionDefinition,
14
14
  ToolExecutionPayload,
15
15
  ToolExecutionResult,
16
+ ToolUseContext,
16
17
  } from "./types.js";
17
18
  import { kebabCaseToTitle } from "./utils.js";
18
19
  import { AgentToolDefinition } from "@vertesia/common";
@@ -87,7 +88,7 @@ export class SkillCollection implements ICollection<SkillDefinition> {
87
88
  * When called, they return rendered instructions.
88
89
  * Includes related_tools for dynamic tool discovery.
89
90
  */
90
- getToolDefinitions(): AgentToolDefinition[] {
91
+ getToolDefinitions(filterContext?: ToolUseContext): AgentToolDefinition[] {
91
92
  const defaultSchema: ToolDefinition['input_schema'] = {
92
93
  type: 'object',
93
94
  properties: {
@@ -98,7 +99,14 @@ export class SkillCollection implements ICollection<SkillDefinition> {
98
99
  }
99
100
  };
100
101
 
101
- return Array.from(this.skills.values()).map(skill => {
102
+ let skills = Array.from(this.skills.values());
103
+ if (filterContext) {
104
+ skills = skills.filter(skill => {
105
+ return skill.isEnabled ? skill.isEnabled(filterContext) : true;
106
+ });
107
+ }
108
+
109
+ return skills.map(skill => {
102
110
  // Build description with related tools info if available
103
111
  let description = `[Skill] ${skill.description}. Returns contextual instructions for this task.`;
104
112
  if (skill.related_tools && skill.related_tools.length > 0) {
@@ -106,6 +114,7 @@ export class SkillCollection implements ICollection<SkillDefinition> {
106
114
  }
107
115
 
108
116
  return {
117
+ url: `skills/${this.name}`,
109
118
  name: `learn_${skill.name}`,
110
119
  description,
111
120
  input_schema: skill.input_schema || defaultSchema,
@@ -1,14 +1,14 @@
1
- import { readdirSync, statSync, existsSync } from "fs";
2
- import { join } from "path";
3
- import { pathToFileURL } from "url";
1
+ import { AgentToolDefinition } from "@vertesia/common";
2
+ import { existsSync, readdirSync, statSync } from "fs";
4
3
  import { Context } from "hono";
5
4
  import { HTTPException } from "hono/http-exception";
5
+ import { join } from "path";
6
+ import { pathToFileURL } from "url";
6
7
  import { authorize } from "./auth.js";
7
- import { ToolFilterOptions, ToolRegistry } from "./ToolRegistry.js";
8
8
  import { ToolContext } from "./server/types.js";
9
- import type { CollectionProperties, ICollection, Tool, ToolExecutionPayload, ToolExecutionResponse, ToolExecutionResponseError } from "./types.js";
9
+ import { ToolRegistry } from "./ToolRegistry.js";
10
+ import type { CollectionProperties, ICollection, Tool, ToolExecutionPayload, ToolExecutionResponse, ToolExecutionResponseError, ToolUseContext } from "./types.js";
10
11
  import { kebabCaseToTitle } from "./utils.js";
11
- import { AgentToolDefinition } from "@vertesia/common";
12
12
 
13
13
  export interface ToolCollectionProperties extends CollectionProperties {
14
14
  /**
@@ -125,20 +125,11 @@ export class ToolCollection implements ICollection<Tool<any>> {
125
125
 
126
126
  /**
127
127
  * Get tool definitions with optional filtering.
128
- * @param options - Filtering options for default/unlocked tools
128
+ * @param options - context for filtering
129
129
  * @returns Filtered tool definitions
130
130
  */
131
- getToolDefinitions(options?: ToolFilterOptions): AgentToolDefinition[] {
132
- return this.tools.getDefinitions(options);
133
- }
134
-
135
- /**
136
- * Get tools that are in reserve (default: false and not unlocked).
137
- * @param unlockedTools - List of tool names that are unlocked
138
- * @returns Tool definitions for reserve tools
139
- */
140
- getReserveTools(unlockedTools: string[] = []): AgentToolDefinition[] {
141
- return this.tools.getReserveTools(unlockedTools);
131
+ getToolDefinitions(context?: ToolUseContext): AgentToolDefinition[] {
132
+ return this.tools.getDefinitions(context);
142
133
  }
143
134
 
144
135
  }