@trops/dash-core 0.1.348 → 0.1.350
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/electron/index.js +30 -2
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +103 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +103 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -61429,8 +61429,30 @@ const DEFAULT_MAX_TOOL_ROUNDS = 10;
|
|
|
61429
61429
|
* Convert MCP tool format to Anthropic tool format.
|
|
61430
61430
|
* MCP: { name, description, inputSchema }
|
|
61431
61431
|
* Anthropic: { name, description, input_schema }
|
|
61432
|
-
|
|
61432
|
+
*
|
|
61433
|
+
* Server-side tools (web_search, code_execution, computer_use, bash, etc.)
|
|
61434
|
+
* carry a `type` field and are handled by Anthropic's servers — pass them
|
|
61435
|
+
* through unchanged. They do NOT need input_schema or local execution.
|
|
61436
|
+
*/
|
|
61437
|
+
const ANTHROPIC_SERVER_TOOL_TYPE_PREFIXES = [
|
|
61438
|
+
"web_search",
|
|
61439
|
+
"code_execution",
|
|
61440
|
+
"computer_",
|
|
61441
|
+
"bash_",
|
|
61442
|
+
"text_editor_",
|
|
61443
|
+
];
|
|
61444
|
+
|
|
61445
|
+
function isAnthropicServerTool(tool) {
|
|
61446
|
+
if (!tool?.type) return false;
|
|
61447
|
+
return ANTHROPIC_SERVER_TOOL_TYPE_PREFIXES.some((p) =>
|
|
61448
|
+
tool.type.startsWith(p),
|
|
61449
|
+
);
|
|
61450
|
+
}
|
|
61451
|
+
|
|
61433
61452
|
function mcpToolToAnthropic(tool) {
|
|
61453
|
+
if (isAnthropicServerTool(tool)) {
|
|
61454
|
+
return tool;
|
|
61455
|
+
}
|
|
61434
61456
|
return {
|
|
61435
61457
|
name: tool.name,
|
|
61436
61458
|
description: tool.description || "",
|
|
@@ -62689,6 +62711,7 @@ const { toDisplayColor: toDisplayColor$1 } = require$$8;
|
|
|
62689
62711
|
* @param {string} options.category - Registry category (default: "general")
|
|
62690
62712
|
* @param {string} options.repository - Repository URL (optional)
|
|
62691
62713
|
* @param {string} options.appOrigin - Originating app package name (optional)
|
|
62714
|
+
* @param {"public"|"private"} options.visibility - Initial visibility (default: "public")
|
|
62692
62715
|
* @returns {Object} Registry manifest object
|
|
62693
62716
|
*/
|
|
62694
62717
|
function generateRegistryManifest(dashboardConfig, options = {}) {
|
|
@@ -62699,6 +62722,7 @@ function generateRegistryManifest(dashboardConfig, options = {}) {
|
|
|
62699
62722
|
|
|
62700
62723
|
const githubUser = options.githubUser || "";
|
|
62701
62724
|
const version = "1.0.0";
|
|
62725
|
+
const visibility = options.visibility === "private" ? "private" : "public";
|
|
62702
62726
|
|
|
62703
62727
|
const manifest = {
|
|
62704
62728
|
githubUser,
|
|
@@ -62707,6 +62731,7 @@ function generateRegistryManifest(dashboardConfig, options = {}) {
|
|
|
62707
62731
|
author: dashboardConfig.author?.name || "",
|
|
62708
62732
|
description: dashboardConfig.description || "",
|
|
62709
62733
|
version,
|
|
62734
|
+
visibility,
|
|
62710
62735
|
type: "dashboard",
|
|
62711
62736
|
category: options.category || "general",
|
|
62712
62737
|
tags: dashboardConfig.tags || [],
|
|
@@ -63095,13 +63120,14 @@ function sanitizeName(name) {
|
|
|
63095
63120
|
*
|
|
63096
63121
|
* @param {Object} themeData - The raw theme object
|
|
63097
63122
|
* @param {string} themeKey - The theme key/name
|
|
63098
|
-
* @param {Object} options - Publish options { authorName, description, tags, scope }
|
|
63123
|
+
* @param {Object} options - Publish options { authorName, description, tags, scope, visibility }
|
|
63099
63124
|
* @returns {Object} Registry manifest
|
|
63100
63125
|
*/
|
|
63101
63126
|
function generateThemeRegistryManifest(themeData, themeKey, options = {}) {
|
|
63102
63127
|
const humanName = themeData.name || themeKey;
|
|
63103
63128
|
const sanitizedName = sanitizeName(humanName);
|
|
63104
63129
|
const colors = extractColors(themeData);
|
|
63130
|
+
const visibility = options.visibility === "private" ? "private" : "public";
|
|
63105
63131
|
|
|
63106
63132
|
return {
|
|
63107
63133
|
scope: options.scope || "",
|
|
@@ -63110,6 +63136,7 @@ function generateThemeRegistryManifest(themeData, themeKey, options = {}) {
|
|
|
63110
63136
|
author: options.authorName || "",
|
|
63111
63137
|
description: options.description || "",
|
|
63112
63138
|
version: "1.0.0",
|
|
63139
|
+
visibility,
|
|
63113
63140
|
type: "theme",
|
|
63114
63141
|
category: "general",
|
|
63115
63142
|
tags: options.tags || [],
|
|
@@ -64866,6 +64893,7 @@ async function prepareDashboardForPublish$1(
|
|
|
64866
64893
|
category: options.category || "general",
|
|
64867
64894
|
repository: options.repository || "",
|
|
64868
64895
|
appOrigin: appId,
|
|
64896
|
+
visibility: options.visibility || "public",
|
|
64869
64897
|
});
|
|
64870
64898
|
|
|
64871
64899
|
// 9. Show save dialog for the publish package
|