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

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 (137) hide show
  1. package/package.json +5 -5
  2. package/src/ContentTypesCollection.ts +51 -0
  3. package/src/InteractionCollection.ts +1 -94
  4. package/src/SkillCollection.ts +3 -2
  5. package/src/ToolCollection.ts +6 -4
  6. package/src/ToolRegistry.ts +10 -4
  7. package/src/index.ts +1 -0
  8. package/src/server/app-package.ts +102 -0
  9. package/src/server/conyent-types.ts +71 -0
  10. package/src/server/interactions.ts +24 -3
  11. package/src/server/site.ts +9 -0
  12. package/src/server/types.ts +18 -0
  13. package/src/server.ts +5 -0
  14. package/src/site/styles.ts +55 -0
  15. package/src/site/templates.ts +107 -84
  16. package/src/types.ts +2 -18
  17. package/lib/cjs/InteractionCollection.js +0 -164
  18. package/lib/cjs/InteractionCollection.js.map +0 -1
  19. package/lib/cjs/SkillCollection.js +0 -376
  20. package/lib/cjs/SkillCollection.js.map +0 -1
  21. package/lib/cjs/ToolCollection.js +0 -228
  22. package/lib/cjs/ToolCollection.js.map +0 -1
  23. package/lib/cjs/ToolRegistry.js +0 -111
  24. package/lib/cjs/ToolRegistry.js.map +0 -1
  25. package/lib/cjs/auth.js +0 -104
  26. package/lib/cjs/auth.js.map +0 -1
  27. package/lib/cjs/build/validate.js +0 -7
  28. package/lib/cjs/build/validate.js.map +0 -1
  29. package/lib/cjs/copy-assets.js +0 -84
  30. package/lib/cjs/copy-assets.js.map +0 -1
  31. package/lib/cjs/index.js +0 -31
  32. package/lib/cjs/index.js.map +0 -1
  33. package/lib/cjs/package.json +0 -3
  34. package/lib/cjs/server/interactions.js +0 -66
  35. package/lib/cjs/server/interactions.js.map +0 -1
  36. package/lib/cjs/server/mcp.js +0 -45
  37. package/lib/cjs/server/mcp.js.map +0 -1
  38. package/lib/cjs/server/site.js +0 -30
  39. package/lib/cjs/server/site.js.map +0 -1
  40. package/lib/cjs/server/skills.js +0 -114
  41. package/lib/cjs/server/skills.js.map +0 -1
  42. package/lib/cjs/server/tools.js +0 -104
  43. package/lib/cjs/server/tools.js.map +0 -1
  44. package/lib/cjs/server/types.js +0 -3
  45. package/lib/cjs/server/types.js.map +0 -1
  46. package/lib/cjs/server/widgets.js +0 -27
  47. package/lib/cjs/server/widgets.js.map +0 -1
  48. package/lib/cjs/server.js +0 -132
  49. package/lib/cjs/server.js.map +0 -1
  50. package/lib/cjs/site/styles.js +0 -637
  51. package/lib/cjs/site/styles.js.map +0 -1
  52. package/lib/cjs/site/templates.js +0 -995
  53. package/lib/cjs/site/templates.js.map +0 -1
  54. package/lib/cjs/types.js +0 -3
  55. package/lib/cjs/types.js.map +0 -1
  56. package/lib/cjs/utils.js +0 -31
  57. package/lib/cjs/utils.js.map +0 -1
  58. package/lib/esm/InteractionCollection.js +0 -125
  59. package/lib/esm/InteractionCollection.js.map +0 -1
  60. package/lib/esm/SkillCollection.js +0 -369
  61. package/lib/esm/SkillCollection.js.map +0 -1
  62. package/lib/esm/ToolCollection.js +0 -190
  63. package/lib/esm/ToolCollection.js.map +0 -1
  64. package/lib/esm/ToolRegistry.js +0 -106
  65. package/lib/esm/ToolRegistry.js.map +0 -1
  66. package/lib/esm/auth.js +0 -97
  67. package/lib/esm/auth.js.map +0 -1
  68. package/lib/esm/build/validate.js +0 -4
  69. package/lib/esm/build/validate.js.map +0 -1
  70. package/lib/esm/copy-assets.js +0 -81
  71. package/lib/esm/copy-assets.js.map +0 -1
  72. package/lib/esm/index.js +0 -11
  73. package/lib/esm/index.js.map +0 -1
  74. package/lib/esm/server/interactions.js +0 -63
  75. package/lib/esm/server/interactions.js.map +0 -1
  76. package/lib/esm/server/mcp.js +0 -42
  77. package/lib/esm/server/mcp.js.map +0 -1
  78. package/lib/esm/server/site.js +0 -27
  79. package/lib/esm/server/site.js.map +0 -1
  80. package/lib/esm/server/skills.js +0 -111
  81. package/lib/esm/server/skills.js.map +0 -1
  82. package/lib/esm/server/tools.js +0 -101
  83. package/lib/esm/server/tools.js.map +0 -1
  84. package/lib/esm/server/types.js +0 -2
  85. package/lib/esm/server/types.js.map +0 -1
  86. package/lib/esm/server/widgets.js +0 -24
  87. package/lib/esm/server/widgets.js.map +0 -1
  88. package/lib/esm/server.js +0 -128
  89. package/lib/esm/server.js.map +0 -1
  90. package/lib/esm/site/styles.js +0 -634
  91. package/lib/esm/site/styles.js.map +0 -1
  92. package/lib/esm/site/templates.js +0 -983
  93. package/lib/esm/site/templates.js.map +0 -1
  94. package/lib/esm/types.js +0 -2
  95. package/lib/esm/types.js.map +0 -1
  96. package/lib/esm/utils.js +0 -26
  97. package/lib/esm/utils.js.map +0 -1
  98. package/lib/types/InteractionCollection.d.ts +0 -48
  99. package/lib/types/InteractionCollection.d.ts.map +0 -1
  100. package/lib/types/SkillCollection.d.ts +0 -118
  101. package/lib/types/SkillCollection.d.ts.map +0 -1
  102. package/lib/types/ToolCollection.d.ts +0 -72
  103. package/lib/types/ToolCollection.d.ts.map +0 -1
  104. package/lib/types/ToolRegistry.d.ts +0 -41
  105. package/lib/types/ToolRegistry.d.ts.map +0 -1
  106. package/lib/types/auth.d.ts +0 -32
  107. package/lib/types/auth.d.ts.map +0 -1
  108. package/lib/types/build/validate.d.ts +0 -2
  109. package/lib/types/build/validate.d.ts.map +0 -1
  110. package/lib/types/copy-assets.d.ts +0 -14
  111. package/lib/types/copy-assets.d.ts.map +0 -1
  112. package/lib/types/index.d.ts +0 -11
  113. package/lib/types/index.d.ts.map +0 -1
  114. package/lib/types/server/interactions.d.ts +0 -4
  115. package/lib/types/server/interactions.d.ts.map +0 -1
  116. package/lib/types/server/mcp.d.ts +0 -4
  117. package/lib/types/server/mcp.d.ts.map +0 -1
  118. package/lib/types/server/site.d.ts +0 -4
  119. package/lib/types/server/site.d.ts.map +0 -1
  120. package/lib/types/server/skills.d.ts +0 -4
  121. package/lib/types/server/skills.d.ts.map +0 -1
  122. package/lib/types/server/tools.d.ts +0 -4
  123. package/lib/types/server/tools.d.ts.map +0 -1
  124. package/lib/types/server/types.d.ts +0 -66
  125. package/lib/types/server/types.d.ts.map +0 -1
  126. package/lib/types/server/widgets.d.ts +0 -9
  127. package/lib/types/server/widgets.d.ts.map +0 -1
  128. package/lib/types/server.d.ts +0 -27
  129. package/lib/types/server.d.ts.map +0 -1
  130. package/lib/types/site/styles.d.ts +0 -5
  131. package/lib/types/site/styles.d.ts.map +0 -1
  132. package/lib/types/site/templates.d.ts +0 -55
  133. package/lib/types/site/templates.d.ts.map +0 -1
  134. package/lib/types/types.d.ts +0 -280
  135. package/lib/types/types.d.ts.map +0 -1
  136. package/lib/types/utils.d.ts +0 -4
  137. package/lib/types/utils.d.ts.map +0 -1
@@ -1,5 +0,0 @@
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.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 .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
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/site/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,6gZAqnBtB,CAAC"}
@@ -1,55 +0,0 @@
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 { ICollection, SkillDefinition, Tool } from "../types.js";
6
- type MCPProviderMeta = {
7
- name: string;
8
- description?: string;
9
- };
10
- /**
11
- * Render a collection card for the index page
12
- */
13
- export declare function collectionCard(collection: ICollection, pathPrefix: string, meta?: string): string;
14
- /**
15
- * Render a tool card (simple version for lists)
16
- */
17
- export declare function toolCard(tool: Tool<Record<string, unknown>>): string;
18
- /**
19
- * Render an MCP provider card
20
- */
21
- export declare function mcpProviderCard(provider: MCPProviderMeta): string;
22
- /**
23
- * Render a detailed tool card
24
- */
25
- export declare function toolDetailCard(tool: Tool<Record<string, unknown>>, collectionName: string): string;
26
- /**
27
- * Render a skill card (simple version for lists)
28
- */
29
- export declare function skillCard(skill: SkillDefinition): string;
30
- /**
31
- * Render a detailed skill card
32
- */
33
- export declare function skillDetailCard(skill: SkillDefinition, collection: SkillCollection): string;
34
- /**
35
- * Render the main index page
36
- *
37
- * Note: The fourth argument is backward compatible:
38
- * - If a string is passed, it is treated as the title.
39
- * - If an array is passed, it is treated as MCP providers and the fifth argument (if any) is the title.
40
- */
41
- export declare function indexPage(config: ToolServerConfig): string;
42
- /**
43
- * Render a tool collection detail page
44
- */
45
- export declare function toolCollectionPage(collection: ToolCollection): string;
46
- /**
47
- * Render a skill collection detail page
48
- */
49
- export declare function skillCollectionPage(collection: SkillCollection): string;
50
- /**
51
- * Render an interaction collection detail page
52
- */
53
- export declare function interactionCollectionPage(collection: InteractionCollection): string;
54
- export {};
55
- //# sourceMappingURL=templates.d.ts.map
@@ -1 +0,0 @@
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,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;AAiZF;;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,CA8KR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,MAAM,CAsCrE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,CAsCvE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAgDnF"}
@@ -1,280 +0,0 @@
1
- import type { ToolDefinition, ToolUse } from "@llumiverse/common";
2
- import { VertesiaClient } from "@vertesia/client";
3
- import { AuthTokenPayload, 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 Tool<ParamsT extends Record<string, any>> extends ToolDefinition {
81
- run: ToolFn<ParamsT>;
82
- /**
83
- * Whether this tool is available by default.
84
- * - true/undefined: Tool is always available to agents
85
- * - false: Tool is only available when activated by a skill's related_tools
86
- */
87
- default?: boolean;
88
- }
89
- /**
90
- * Tool definition with optional activation control for agent exposure.
91
- */
92
- export interface ToolDefinitionWithDefault extends ToolDefinition {
93
- /**
94
- * Whether this tool is available by default.
95
- * - true/undefined: Tool is always available to agents
96
- * - false: Tool is only available when activated by a skill's related_tools
97
- */
98
- default?: boolean;
99
- /**
100
- * For skill tools (learn_*): list of related tool names that become available
101
- * when this skill is called. Used for dynamic tool discovery.
102
- */
103
- related_tools?: string[];
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: ToolDefinitionWithDefault[];
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
- /**
134
- * Content type for skill instructions
135
- */
136
- export type SkillContentType = 'md' | 'jst';
137
- /**
138
- * Context triggers for auto-injection of skills
139
- */
140
- export interface SkillContextTriggers {
141
- /**
142
- * Keywords in user input that should trigger this skill
143
- */
144
- keywords?: string[];
145
- /**
146
- * If these tools are being used, suggest this skill
147
- */
148
- tool_names?: string[];
149
- /**
150
- * Regex patterns to match against input data
151
- */
152
- data_patterns?: string[];
153
- }
154
- /**
155
- * Execution configuration for skills that need code execution
156
- */
157
- export interface SkillExecution {
158
- /**
159
- * The programming language for execution
160
- */
161
- language: string;
162
- /**
163
- * Required packages to install
164
- */
165
- packages?: string[];
166
- /**
167
- * System-level packages to install (e.g., apt-get packages)
168
- */
169
- system_packages?: string[];
170
- /**
171
- * Code template to execute
172
- */
173
- template?: string;
174
- }
175
- /**
176
- * Skill definition - parsed from SKILL.md or SKILL.jst
177
- */
178
- export interface SkillDefinition {
179
- /**
180
- * Unique skill name (kebab-case)
181
- */
182
- name: string;
183
- /**
184
- * Display title
185
- */
186
- title?: string;
187
- /**
188
- * Short description for discovery
189
- */
190
- description: string;
191
- /**
192
- * The skill instructions (markdown or JST template)
193
- */
194
- instructions: string;
195
- /**
196
- * Content type: 'md' for static markdown, 'jst' for dynamic templates
197
- */
198
- content_type: SkillContentType;
199
- /**
200
- * JSON Schema for skill input parameters.
201
- * Used when skill is exposed as a tool.
202
- */
203
- input_schema?: {
204
- type: 'object';
205
- properties?: Record<string, any>;
206
- required?: string[];
207
- };
208
- /**
209
- * Context triggers for auto-injection
210
- */
211
- context_triggers?: SkillContextTriggers;
212
- /**
213
- * Execution configuration for code-based skills
214
- */
215
- execution?: SkillExecution;
216
- /**
217
- * Related tools that work well with this skill
218
- */
219
- related_tools?: string[];
220
- /**
221
- * Scripts bundled with this skill (synced to sandbox when skill is used)
222
- */
223
- scripts?: string[];
224
- /**
225
- * The name of the widgets provided by this skill (if any)
226
- * The name will be used to load the widget dynamically from the agent chat
227
- * and must match the code block language returned by the LLM (e.g., ```my-widget)
228
- * which will be rendered using the widget.
229
- * The widget file must be located in the skill directory under the name {{widget-name}}.tsx.
230
- */
231
- widgets?: string[];
232
- }
233
- /**
234
- * Skill execution payload
235
- */
236
- export interface SkillExecutionPayload {
237
- /**
238
- * The skill name to execute
239
- */
240
- skill_name: string;
241
- /**
242
- * Data context for JST template rendering
243
- */
244
- data?: Record<string, any>;
245
- /**
246
- * Whether to execute the code template (if present)
247
- */
248
- execute?: boolean;
249
- }
250
- /**
251
- * Skill execution result
252
- */
253
- export interface SkillExecutionResult {
254
- /**
255
- * The skill name
256
- */
257
- name: string;
258
- /**
259
- * Rendered instructions
260
- */
261
- instructions: string;
262
- /**
263
- * Execution output (if execute=true and skill has code template)
264
- */
265
- execution_result?: {
266
- output: string;
267
- files?: string[];
268
- is_error: boolean;
269
- };
270
- }
271
- /**
272
- * Skill collection definition - returned by GET endpoint
273
- */
274
- export interface SkillCollectionDefinition {
275
- name: string;
276
- title: string;
277
- description: string;
278
- skills: SkillDefinition[];
279
- }
280
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
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,gBAAgB,EAAE,qBAAqB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1G,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI,oBAAoB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;AAErE,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC1D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB,EAAE,UAAU;IAC1E;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IAC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EG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;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"}
@@ -1,4 +0,0 @@
1
- export declare function kebabCaseToTitle(name: string): string;
2
- export declare function makeScriptUrl(origin: string, script: string): string;
3
- export declare function join(left: string, right: string): string;
4
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,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"}