dtSpark 1.0.9__py3-none-any.whl → 1.0.11__py3-none-any.whl
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.
- dtSpark/_version.txt +1 -1
- dtSpark/core/application.py +208 -3
- dtSpark/mcp_integration/tool_selector.py +5 -0
- dtSpark/resources/config.yaml.template +42 -0
- dtSpark/tools/builtin.py +1438 -0
- dtSpark/web/endpoints/main_menu.py +75 -0
- dtSpark/web/templates/main_menu.html +71 -29
- {dtspark-1.0.9.dist-info → dtspark-1.0.11.dist-info}/METADATA +7 -1
- {dtspark-1.0.9.dist-info → dtspark-1.0.11.dist-info}/RECORD +13 -13
- {dtspark-1.0.9.dist-info → dtspark-1.0.11.dist-info}/WHEEL +0 -0
- {dtspark-1.0.9.dist-info → dtspark-1.0.11.dist-info}/entry_points.txt +0 -0
- {dtspark-1.0.9.dist-info → dtspark-1.0.11.dist-info}/licenses/LICENSE +0 -0
- {dtspark-1.0.9.dist-info → dtspark-1.0.11.dist-info}/top_level.txt +0 -0
|
@@ -494,6 +494,81 @@ async def get_mcp_tools(
|
|
|
494
494
|
raise HTTPException(status_code=500, detail=str(e))
|
|
495
495
|
|
|
496
496
|
|
|
497
|
+
class EmbeddedToolInfo(BaseModel):
|
|
498
|
+
"""Embedded tool information."""
|
|
499
|
+
name: str
|
|
500
|
+
description: str
|
|
501
|
+
category: str # Core, Filesystem, Documents, Archives
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
@router.get("/embedded-tools")
|
|
505
|
+
async def get_embedded_tools(
|
|
506
|
+
request: Request,
|
|
507
|
+
session_id: str = Depends(get_current_session),
|
|
508
|
+
) -> list[EmbeddedToolInfo]:
|
|
509
|
+
"""
|
|
510
|
+
Get all embedded tools with their categories.
|
|
511
|
+
|
|
512
|
+
Returns:
|
|
513
|
+
List of EmbeddedToolInfo with tool details and categories
|
|
514
|
+
"""
|
|
515
|
+
try:
|
|
516
|
+
app_instance = request.app.state.app_instance
|
|
517
|
+
tools = []
|
|
518
|
+
|
|
519
|
+
# Get embedded tools from conversation manager
|
|
520
|
+
if hasattr(app_instance, 'conversation_manager') and app_instance.conversation_manager:
|
|
521
|
+
try:
|
|
522
|
+
embedded = app_instance.conversation_manager.get_embedded_tools()
|
|
523
|
+
for tool in embedded:
|
|
524
|
+
# Handle both Bedrock format (toolSpec) and Claude format (direct)
|
|
525
|
+
if 'toolSpec' in tool:
|
|
526
|
+
tool_spec = tool.get('toolSpec', {})
|
|
527
|
+
name = tool_spec.get('name', 'unknown')
|
|
528
|
+
description = tool_spec.get('description', '')
|
|
529
|
+
else:
|
|
530
|
+
name = tool.get('name', 'unknown')
|
|
531
|
+
description = tool.get('description', '')
|
|
532
|
+
|
|
533
|
+
# Determine category based on tool name
|
|
534
|
+
category = _categorise_embedded_tool(name)
|
|
535
|
+
|
|
536
|
+
tools.append(EmbeddedToolInfo(
|
|
537
|
+
name=name,
|
|
538
|
+
description=description,
|
|
539
|
+
category=category,
|
|
540
|
+
))
|
|
541
|
+
except Exception as e:
|
|
542
|
+
logger.warning(f"Error getting embedded tools: {e}")
|
|
543
|
+
|
|
544
|
+
return tools
|
|
545
|
+
|
|
546
|
+
except Exception as e:
|
|
547
|
+
logger.error(f"Error getting embedded tools: {e}")
|
|
548
|
+
raise HTTPException(status_code=500, detail=str(e))
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
def _categorise_embedded_tool(tool_name: str) -> str:
|
|
552
|
+
"""Categorise an embedded tool based on its name."""
|
|
553
|
+
name_lower = tool_name.lower()
|
|
554
|
+
|
|
555
|
+
# Document tools
|
|
556
|
+
if any(kw in name_lower for kw in ['word', 'excel', 'powerpoint', 'pdf', 'document']):
|
|
557
|
+
return 'Documents'
|
|
558
|
+
|
|
559
|
+
# Archive tools
|
|
560
|
+
if any(kw in name_lower for kw in ['archive', 'zip', 'tar', 'extract']):
|
|
561
|
+
return 'Archives'
|
|
562
|
+
|
|
563
|
+
# Filesystem tools
|
|
564
|
+
if any(kw in name_lower for kw in ['file', 'directory', 'list_files', 'read_file',
|
|
565
|
+
'write_file', 'create_directory', 'search_files']):
|
|
566
|
+
return 'Filesystem'
|
|
567
|
+
|
|
568
|
+
# Default to Core
|
|
569
|
+
return 'Core'
|
|
570
|
+
|
|
571
|
+
|
|
497
572
|
@router.get("/daemon/status")
|
|
498
573
|
async def get_daemon_status(request: Request):
|
|
499
574
|
"""
|
|
@@ -795,39 +795,81 @@ async function selectToolSource(source, event) {
|
|
|
795
795
|
const contentEl = document.getElementById('tool-details-content');
|
|
796
796
|
|
|
797
797
|
if (source === 'embedded') {
|
|
798
|
-
// Show embedded tools
|
|
798
|
+
// Show embedded tools - fetch dynamically from API
|
|
799
799
|
headerEl.innerHTML = '<i class="bi bi-box-fill"></i> Embedded Tools';
|
|
800
800
|
contentEl.innerHTML = `
|
|
801
|
-
<div class="
|
|
802
|
-
<div class="
|
|
803
|
-
|
|
804
|
-
<div>
|
|
805
|
-
<strong>execute_mcp_tool</strong>
|
|
806
|
-
<p class="text-muted small mb-0 mt-1">Execute a tool provided by an MCP server</p>
|
|
807
|
-
</div>
|
|
808
|
-
<span class="badge bg-info">Core</span>
|
|
809
|
-
</div>
|
|
810
|
-
</div>
|
|
811
|
-
<div class="list-group-item bg-transparent border-secondary">
|
|
812
|
-
<div class="d-flex justify-content-between align-items-start">
|
|
813
|
-
<div>
|
|
814
|
-
<strong>conversation_search</strong>
|
|
815
|
-
<p class="text-muted small mb-0 mt-1">Search through conversation history</p>
|
|
816
|
-
</div>
|
|
817
|
-
<span class="badge bg-info">Core</span>
|
|
818
|
-
</div>
|
|
819
|
-
</div>
|
|
820
|
-
<div class="list-group-item bg-transparent border-secondary">
|
|
821
|
-
<div class="d-flex justify-content-between align-items-start">
|
|
822
|
-
<div>
|
|
823
|
-
<strong>file_attachment</strong>
|
|
824
|
-
<p class="text-muted small mb-0 mt-1">Attach files to the conversation context</p>
|
|
825
|
-
</div>
|
|
826
|
-
<span class="badge bg-info">Core</span>
|
|
827
|
-
</div>
|
|
828
|
-
</div>
|
|
801
|
+
<div class="text-center py-4">
|
|
802
|
+
<div class="spinner-border spinner-border-sm text-primary" role="status"></div>
|
|
803
|
+
<span class="ms-2">Loading embedded tools...</span>
|
|
829
804
|
</div>
|
|
830
805
|
`;
|
|
806
|
+
|
|
807
|
+
try {
|
|
808
|
+
const response = await fetch('/api/embedded-tools');
|
|
809
|
+
const tools = await response.json();
|
|
810
|
+
|
|
811
|
+
if (tools.length === 0) {
|
|
812
|
+
contentEl.innerHTML = `
|
|
813
|
+
<div class="text-center py-4 text-muted">
|
|
814
|
+
<i class="bi bi-inbox fs-2 d-block mb-2"></i>
|
|
815
|
+
<p class="mb-0">No embedded tools enabled</p>
|
|
816
|
+
</div>
|
|
817
|
+
`;
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// Group tools by category
|
|
822
|
+
const categories = {};
|
|
823
|
+
tools.forEach(tool => {
|
|
824
|
+
const cat = tool.category || 'Core';
|
|
825
|
+
if (!categories[cat]) categories[cat] = [];
|
|
826
|
+
categories[cat].push(tool);
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
// Define category badge colours
|
|
830
|
+
const categoryBadges = {
|
|
831
|
+
'Core': 'bg-info',
|
|
832
|
+
'Filesystem': 'bg-success',
|
|
833
|
+
'Documents': 'bg-primary',
|
|
834
|
+
'Archives': 'bg-warning text-dark'
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
// Render tools grouped by category
|
|
838
|
+
let html = '<div class="list-group list-group-flush">';
|
|
839
|
+
|
|
840
|
+
// Order categories: Core, Filesystem, Documents, Archives
|
|
841
|
+
const categoryOrder = ['Core', 'Filesystem', 'Documents', 'Archives'];
|
|
842
|
+
categoryOrder.forEach(category => {
|
|
843
|
+
if (categories[category]) {
|
|
844
|
+
categories[category].forEach(tool => {
|
|
845
|
+
const badgeClass = categoryBadges[category] || 'bg-secondary';
|
|
846
|
+
html += `
|
|
847
|
+
<div class="list-group-item bg-transparent border-secondary">
|
|
848
|
+
<div class="d-flex justify-content-between align-items-start">
|
|
849
|
+
<div>
|
|
850
|
+
<strong>${tool.name}</strong>
|
|
851
|
+
<p class="text-muted small mb-0 mt-1">${tool.description}</p>
|
|
852
|
+
</div>
|
|
853
|
+
<span class="badge ${badgeClass}">${category}</span>
|
|
854
|
+
</div>
|
|
855
|
+
</div>
|
|
856
|
+
`;
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
|
|
861
|
+
html += '</div>';
|
|
862
|
+
contentEl.innerHTML = html;
|
|
863
|
+
|
|
864
|
+
} catch (error) {
|
|
865
|
+
console.error('Error loading embedded tools:', error);
|
|
866
|
+
contentEl.innerHTML = `
|
|
867
|
+
<div class="alert alert-danger">
|
|
868
|
+
<i class="bi bi-exclamation-triangle-fill"></i>
|
|
869
|
+
Failed to load embedded tools: ${error.message}
|
|
870
|
+
</div>
|
|
871
|
+
`;
|
|
872
|
+
}
|
|
831
873
|
} else if (source.startsWith('mcp:')) {
|
|
832
874
|
// Show MCP server tools
|
|
833
875
|
const serverName = source.substring(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dtSpark
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Secure Personal AI Research Kit - Multi-provider LLM CLI/Web interface with MCP tool integration
|
|
5
5
|
Home-page: https://github.com/digital-thought/dtSpark
|
|
6
6
|
Author: Matthew Westwood-Hill
|
|
@@ -49,6 +49,12 @@ Requires-Dist: cryptography>=41.0.0
|
|
|
49
49
|
Requires-Dist: anthropic>=0.18.0
|
|
50
50
|
Requires-Dist: APScheduler>=3.10.0
|
|
51
51
|
Requires-Dist: markdown>=3.4.0
|
|
52
|
+
Requires-Dist: python-docx>=0.8.11
|
|
53
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
54
|
+
Requires-Dist: python-pptx>=0.6.21
|
|
55
|
+
Requires-Dist: pdfplumber>=0.10.0
|
|
56
|
+
Requires-Dist: python-magic-bin>=0.4.14; sys_platform == "win32"
|
|
57
|
+
Requires-Dist: python-magic>=0.4.27; sys_platform != "win32"
|
|
52
58
|
Provides-Extra: dev
|
|
53
59
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
54
60
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
@@ -4,7 +4,7 @@ dtSpark/_full_name.txt,sha256=wsMYXtT12WMrY9gT1JHiKdE4k7H59psECS6cSD07giQ,31
|
|
|
4
4
|
dtSpark/_licence.txt,sha256=Mvt5wkOkst8VGlk48vwN3CgHwMHLfmplKSPOUEbTfOw,1071
|
|
5
5
|
dtSpark/_metadata.yaml,sha256=h3PQd2QsY5yUBzS2b6EueTwkmd57svsbAKcwDVVEfIo,188
|
|
6
6
|
dtSpark/_name.txt,sha256=kDZC5_a3iMKIPOUvtLXl0C9N5DiOfgUCsecwTUnkJhs,7
|
|
7
|
-
dtSpark/_version.txt,sha256=
|
|
7
|
+
dtSpark/_version.txt,sha256=OxBuL_h-WO1Fs2nUH18IShggUgRLibuf9Yral-IGYn8,7
|
|
8
8
|
dtSpark/cli_interface.py,sha256=aB-rFAh6o8GOwwecx-rSHEj3W4bmQHp51OPEBtC2CEw,96911
|
|
9
9
|
dtSpark/conversation_manager.py,sha256=e1aTJpUjxV96G9xrssJl1ujPJMZZwtfufQ8ZDb1WyAI,132270
|
|
10
10
|
dtSpark/launch.py,sha256=j8XYpmDswWUIzhpMc32E0Fhbhk_qhOQUAwJSpqh37f0,892
|
|
@@ -14,7 +14,7 @@ dtSpark/aws/bedrock.py,sha256=j1OknN76LehIMRmoqzx8G3DUSqk2IsO3Fiy5AxQp7Fw,24250
|
|
|
14
14
|
dtSpark/aws/costs.py,sha256=eyjigH_Yef7g5cKqhR2QUx_7y4E6-NsLd9-WL52I2vM,11931
|
|
15
15
|
dtSpark/aws/pricing.py,sha256=pk85e--C5Iz0Y-6iWv_VfENAnrcWQ_9XK0fJQSlk5Xk,23388
|
|
16
16
|
dtSpark/core/__init__.py,sha256=kORX-9C7L91WxMTMUHXr3Yc09rb6oJNzEH5_KDRdgqM,477
|
|
17
|
-
dtSpark/core/application.py,sha256=
|
|
17
|
+
dtSpark/core/application.py,sha256=QMOqbJ-PUKrhKUBYKWM-LBUpG7uW6Cebs35000OLqGw,169755
|
|
18
18
|
dtSpark/core/context_compaction.py,sha256=FWN352EW8n-eWv0MzbOiWIiKcooRxeIAb7611eN-kdY,31898
|
|
19
19
|
dtSpark/daemon/__init__.py,sha256=xdKEyMsNXgIv6nNerpDcwf94c80n-BFoJFaucWxVF64,3300
|
|
20
20
|
dtSpark/daemon/__main__.py,sha256=sRNG4RJ-Ejvd-f7OAU5slPOtxVpCoC2OfazdTJro69Q,170
|
|
@@ -48,8 +48,8 @@ dtSpark/llm/manager.py,sha256=Qg9glX5ZhepWaRnb8ILZiPoiwqzC8Y318JgwuJf9m58,5837
|
|
|
48
48
|
dtSpark/llm/ollama.py,sha256=r7ePWK1sfSveN6--Ln-Brtrxkli61uJWSrPU0Qy0MZg,20633
|
|
49
49
|
dtSpark/mcp_integration/__init__.py,sha256=pFw-yTSSJ1yx_ksTe94eq8pBrwDD-5Z-UqSM3VO4deQ,157
|
|
50
50
|
dtSpark/mcp_integration/manager.py,sha256=b-FfmAas344Ordj6AIdwxCgl0dqPx0WiLIu4Vt4URBA,25149
|
|
51
|
-
dtSpark/mcp_integration/tool_selector.py,sha256=
|
|
52
|
-
dtSpark/resources/config.yaml.template,sha256=
|
|
51
|
+
dtSpark/mcp_integration/tool_selector.py,sha256=QIsScwWiUG09h8VxC-zdj4RVl7v3PBY8T1KgaYR4yNo,10451
|
|
52
|
+
dtSpark/resources/config.yaml.template,sha256=LzfQ3X8GIvBpMo5n9eS58locUO4lnKWJtlTNQjxoHJk,26704
|
|
53
53
|
dtSpark/safety/__init__.py,sha256=fdcZ4qNbYhH7Un9iKLwNe2GDr_doUmpSgtv-oNS8qPE,460
|
|
54
54
|
dtSpark/safety/llm_service.py,sha256=N2J9_Od-fGGvk9BkddD6CFd81PrJ03sMjSz6egBDYr4,3820
|
|
55
55
|
dtSpark/safety/patterns.py,sha256=W9xe-HoeQOl4UfGz7xxFm9VldKeoUg79FVd7ZUXQswE,8040
|
|
@@ -61,7 +61,7 @@ dtSpark/scheduler/execution_queue.py,sha256=7_yXnGxO-arZTl0qPbyE-kDhZDVXQKT2z9zI
|
|
|
61
61
|
dtSpark/scheduler/executor.py,sha256=n42MGNyZOoQohpYh1QFenZzFsv560S0h-o_-7FajkJc,43709
|
|
62
62
|
dtSpark/scheduler/manager.py,sha256=vwtmQadqf3cv1QzdZJzFqC0l3bBzIplGZ79BUjfsh4o,12846
|
|
63
63
|
dtSpark/tools/__init__.py,sha256=TPK-c8CmXheEkoiFzL9PMP8ve0hTpw9iIV2xlGLTsMc,147
|
|
64
|
-
dtSpark/tools/builtin.py,sha256=
|
|
64
|
+
dtSpark/tools/builtin.py,sha256=4Jw6F9i1RbJ772J3PX-SirSsbAKcTuvrgqYueHS3MIo,87762
|
|
65
65
|
dtSpark/web/__init__.py,sha256=5OrzA2yIR9NBf9mlTPnrQ0afMJTBuEgnzxq4QmIYe54,428
|
|
66
66
|
dtSpark/web/auth.py,sha256=uSIHwJOiklkjZSpLcznwOL1pVQktKeWifZygt068M9Y,4384
|
|
67
67
|
dtSpark/web/dependencies.py,sha256=ku54-Vb8wYvGVQ8Kluzxj8zm2Re3wDgU5LzFJ0NVIsI,874
|
|
@@ -73,7 +73,7 @@ dtSpark/web/endpoints/__init__.py,sha256=uOTiOKx6IDZ2kc0-2GS2hqZD2qX6KtwAhMMZQbS
|
|
|
73
73
|
dtSpark/web/endpoints/autonomous_actions.py,sha256=tHJtFvJJtpr34LujQu-udZvT4vY5TpJB3Sn0WPJ8giM,36588
|
|
74
74
|
dtSpark/web/endpoints/chat.py,sha256=w4Vi3X2e7orID0Ny5xF7vyTHe9mk8gaH7o67GB50psc,20641
|
|
75
75
|
dtSpark/web/endpoints/conversations.py,sha256=uFNpd_9DF1jqTEKFd9qRWK-uffXyTwz4Px9JIur_128,11728
|
|
76
|
-
dtSpark/web/endpoints/main_menu.py,sha256=
|
|
76
|
+
dtSpark/web/endpoints/main_menu.py,sha256=54KYz86-jj9KXeBLbqEq-OOuxg2Cs4Hbnd_Z48MdB9M,20363
|
|
77
77
|
dtSpark/web/endpoints/streaming.py,sha256=vhpLefhc1PUDlmZ3Lx4IXizZfHy45zPgv5POhb-TdFU,14581
|
|
78
78
|
dtSpark/web/static/css/dark-theme.css,sha256=K2q2C1s5kjqi_O1xAF86HTVFsI6sEfwPAPhVEfmT02M,8117
|
|
79
79
|
dtSpark/web/static/js/actions.js,sha256=NC9nLFfKEwffE88yBoaaGosmi4q9RoSVOPnziTD08GQ,37421
|
|
@@ -86,11 +86,11 @@ dtSpark/web/templates/chat.html,sha256=OQiqmOV-Q71MxXt7M7yLcCGH0Jyhen4p3hLqU6829
|
|
|
86
86
|
dtSpark/web/templates/conversations.html,sha256=URJX3W5-MjUjuUAXixziY1yFG-T6Ho5_u9Up7FcH70E,13004
|
|
87
87
|
dtSpark/web/templates/goodbye.html,sha256=4VnUgq6gHCMeJuty51qq8SZuTtpEMMUOsgTBut37Mc8,2825
|
|
88
88
|
dtSpark/web/templates/login.html,sha256=OkLf_uzMYhl_o9ER1RQZc8ch6-bCaiOokEhKbeEl8E8,3274
|
|
89
|
-
dtSpark/web/templates/main_menu.html,sha256=
|
|
89
|
+
dtSpark/web/templates/main_menu.html,sha256=_tK5QBLzSmJY_j2qHFHk0c1fz9YyRr3i4ZLIhTzNEUU,39246
|
|
90
90
|
dtSpark/web/templates/new_conversation.html,sha256=hoiQ4Ew3lpFWHTsYza0JiBqqWJs7St7jTusKDnxRR8w,6844
|
|
91
|
-
dtspark-1.0.
|
|
92
|
-
dtspark-1.0.
|
|
93
|
-
dtspark-1.0.
|
|
94
|
-
dtspark-1.0.
|
|
95
|
-
dtspark-1.0.
|
|
96
|
-
dtspark-1.0.
|
|
91
|
+
dtspark-1.0.11.dist-info/licenses/LICENSE,sha256=jIuWlmbirwQabTwxfzE7SXT1LpCG-y_GRQ3VnoRTKgo,1101
|
|
92
|
+
dtspark-1.0.11.dist-info/METADATA,sha256=rzA9ESvbYVuSdEgfIHcaVH2CZ3cDK6wuysXvUsQWzH4,6261
|
|
93
|
+
dtspark-1.0.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
94
|
+
dtspark-1.0.11.dist-info/entry_points.txt,sha256=IpIwa_a6XY8Z2w7DtgYAhpFHHEbha-zhLkyttWd3zpw,76
|
|
95
|
+
dtspark-1.0.11.dist-info/top_level.txt,sha256=x-6lMA6vNuxyDNJGNOKI4dyy7L0kOb9V98I5z46bJVY,8
|
|
96
|
+
dtspark-1.0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|