@vfarcic/dot-ai 0.111.0 → 0.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/ai-provider-factory.d.ts +0 -10
- package/dist/core/ai-provider-factory.d.ts.map +1 -1
- package/dist/core/ai-provider-factory.js +14 -24
- package/dist/core/ai-provider.interface.d.ts +28 -1
- package/dist/core/ai-provider.interface.d.ts.map +1 -1
- package/dist/core/capabilities.d.ts +1 -1
- package/dist/core/capabilities.d.ts.map +1 -1
- package/dist/core/capabilities.js +7 -4
- package/dist/core/capability-scan-workflow.js +2 -2
- package/dist/core/embedding-service.d.ts +35 -2
- package/dist/core/embedding-service.d.ts.map +1 -1
- package/dist/core/embedding-service.js +228 -15
- package/dist/core/model-config.d.ts +23 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +28 -0
- package/dist/core/platform-operations.d.ts.map +1 -1
- package/dist/core/platform-operations.js +3 -5
- package/dist/core/platform-utils.d.ts +13 -2
- package/dist/core/platform-utils.d.ts.map +1 -1
- package/dist/core/platform-utils.js +91 -9
- package/dist/core/providers/anthropic-provider.d.ts +6 -1
- package/dist/core/providers/anthropic-provider.d.ts.map +1 -1
- package/dist/core/providers/anthropic-provider.js +99 -27
- package/dist/core/providers/provider-debug-utils.d.ts +53 -20
- package/dist/core/providers/provider-debug-utils.d.ts.map +1 -1
- package/dist/core/providers/provider-debug-utils.js +106 -51
- package/dist/core/providers/vercel-provider.d.ts +6 -1
- package/dist/core/providers/vercel-provider.d.ts.map +1 -1
- package/dist/core/providers/vercel-provider.js +212 -130
- package/dist/core/schema.d.ts +1 -101
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +20 -154
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +15 -7
- package/dist/evaluation/dataset-analyzer.d.ts +118 -0
- package/dist/evaluation/dataset-analyzer.d.ts.map +1 -0
- package/dist/evaluation/dataset-analyzer.js +234 -0
- package/dist/evaluation/datasets/loader.d.ts +42 -0
- package/dist/evaluation/datasets/loader.d.ts.map +1 -0
- package/dist/evaluation/datasets/loader.js +104 -0
- package/dist/evaluation/eval-runner.d.ts +9 -0
- package/dist/evaluation/eval-runner.d.ts.map +1 -0
- package/dist/evaluation/eval-runner.js +399 -0
- package/dist/evaluation/evaluators/base-comparative.d.ts +94 -0
- package/dist/evaluation/evaluators/base-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/base-comparative.js +187 -0
- package/dist/evaluation/evaluators/base.d.ts +47 -0
- package/dist/evaluation/evaluators/base.d.ts.map +1 -0
- package/dist/evaluation/evaluators/base.js +10 -0
- package/dist/evaluation/evaluators/capability-comparative.d.ts +32 -0
- package/dist/evaluation/evaluators/capability-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/capability-comparative.js +104 -0
- package/dist/evaluation/evaluators/pattern-comparative.d.ts +31 -0
- package/dist/evaluation/evaluators/pattern-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/pattern-comparative.js +97 -0
- package/dist/evaluation/evaluators/policy-comparative.d.ts +31 -0
- package/dist/evaluation/evaluators/policy-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/policy-comparative.js +97 -0
- package/dist/evaluation/evaluators/recommendation-comparative.d.ts +25 -0
- package/dist/evaluation/evaluators/recommendation-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/recommendation-comparative.js +55 -0
- package/dist/evaluation/evaluators/remediation-comparative.d.ts +25 -0
- package/dist/evaluation/evaluators/remediation-comparative.d.ts.map +1 -0
- package/dist/evaluation/evaluators/remediation-comparative.js +54 -0
- package/dist/evaluation/platform-synthesizer.d.ts +54 -0
- package/dist/evaluation/platform-synthesizer.d.ts.map +1 -0
- package/dist/evaluation/platform-synthesizer.js +368 -0
- package/dist/evaluation/run-platform-synthesis.d.ts +9 -0
- package/dist/evaluation/run-platform-synthesis.d.ts.map +1 -0
- package/dist/evaluation/run-platform-synthesis.js +45 -0
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +23 -29
- package/dist/interfaces/rest-api.d.ts.map +1 -1
- package/dist/tools/answer-question.d.ts +2 -0
- package/dist/tools/answer-question.d.ts.map +1 -1
- package/dist/tools/answer-question.js +18 -11
- package/dist/tools/generate-manifests.d.ts +2 -0
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +11 -12
- package/dist/tools/organizational-data.d.ts +1 -0
- package/dist/tools/organizational-data.d.ts.map +1 -1
- package/dist/tools/organizational-data.js +2 -1
- package/dist/tools/recommend.d.ts +1 -0
- package/dist/tools/recommend.d.ts.map +1 -1
- package/dist/tools/recommend.js +13 -21
- package/dist/tools/remediate.d.ts +3 -0
- package/dist/tools/remediate.d.ts.map +1 -1
- package/dist/tools/remediate.js +35 -14
- package/dist/tools/test-docs.d.ts +1 -0
- package/dist/tools/test-docs.d.ts.map +1 -1
- package/dist/tools/test-docs.js +4 -2
- package/dist/tools/version.d.ts +5 -1
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +23 -8
- package/package.json +19 -1
package/dist/tools/version.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.getVersionInfo = getVersionInfo;
|
|
|
45
45
|
exports.handleVersionTool = handleVersionTool;
|
|
46
46
|
const fs_1 = require("fs");
|
|
47
47
|
const path_1 = require("path");
|
|
48
|
+
const zod_1 = require("zod");
|
|
48
49
|
const k8s = __importStar(require("@kubernetes/client-node"));
|
|
49
50
|
const index_1 = require("../core/index");
|
|
50
51
|
const discovery_1 = require("../core/discovery");
|
|
@@ -52,7 +53,9 @@ const kubernetes_utils_1 = require("../core/kubernetes-utils");
|
|
|
52
53
|
const nushell_runtime_1 = require("../core/nushell-runtime");
|
|
53
54
|
exports.VERSION_TOOL_NAME = 'version';
|
|
54
55
|
exports.VERSION_TOOL_DESCRIPTION = 'Get comprehensive system status including version information, Vector DB connection status, embedding service capabilities, AI provider connectivity, Kubernetes cluster connectivity, Kyverno policy engine status, and pattern management health check';
|
|
55
|
-
exports.VERSION_TOOL_INPUT_SCHEMA = {
|
|
56
|
+
exports.VERSION_TOOL_INPUT_SCHEMA = {
|
|
57
|
+
interaction_id: zod_1.z.string().optional().describe('INTERNAL ONLY - Do not populate. Used for evaluation dataset generation.')
|
|
58
|
+
};
|
|
56
59
|
/**
|
|
57
60
|
* Test Vector DB connectivity and get status for all collections
|
|
58
61
|
*/
|
|
@@ -185,9 +188,11 @@ async function getCapabilityStatus() {
|
|
|
185
188
|
collectionAccessible = true;
|
|
186
189
|
// Test MCP-used operations: verify vector operations work
|
|
187
190
|
const embeddingService = new index_1.EmbeddingService();
|
|
191
|
+
const embeddingStatus = embeddingService.getStatus();
|
|
192
|
+
const expectedDimensions = embeddingStatus.dimensions || 1536; // Use provider's dimension or default
|
|
188
193
|
const testEmbedding = await embeddingService.generateEmbedding('diagnostic test query');
|
|
189
|
-
if (!testEmbedding || testEmbedding.length !==
|
|
190
|
-
throw new Error(`Embedding dimension mismatch: expected
|
|
194
|
+
if (!testEmbedding || testEmbedding.length !== expectedDimensions) {
|
|
195
|
+
throw new Error(`Embedding dimension mismatch: expected ${expectedDimensions}, got ${testEmbedding?.length || 'null'} dimensions`);
|
|
191
196
|
}
|
|
192
197
|
// Validate embedding values are numbers (not NaN, Infinity, etc.)
|
|
193
198
|
if (testEmbedding.some(val => !Number.isFinite(val))) {
|
|
@@ -423,7 +428,7 @@ async function getNushellStatus() {
|
|
|
423
428
|
/**
|
|
424
429
|
* Test AI provider connectivity
|
|
425
430
|
*/
|
|
426
|
-
async function getAIProviderStatus() {
|
|
431
|
+
async function getAIProviderStatus(interaction_id) {
|
|
427
432
|
try {
|
|
428
433
|
// Import AI provider factory and test connectivity
|
|
429
434
|
const { createAIProvider } = await Promise.resolve().then(() => __importStar(require('../core/ai-provider-factory')));
|
|
@@ -437,28 +442,36 @@ async function getAIProviderStatus() {
|
|
|
437
442
|
};
|
|
438
443
|
}
|
|
439
444
|
// Test with a minimal request to check connectivity
|
|
440
|
-
await aiProvider.sendMessage('test'
|
|
445
|
+
await aiProvider.sendMessage('test', 'version-connectivity-check', {
|
|
446
|
+
user_intent: 'Test AI provider connectivity and system version check',
|
|
447
|
+
interaction_id: interaction_id
|
|
448
|
+
});
|
|
441
449
|
return {
|
|
442
450
|
connected: true,
|
|
443
451
|
keyConfigured: true,
|
|
444
|
-
providerType: aiProvider.getProviderType()
|
|
452
|
+
providerType: aiProvider.getProviderType(),
|
|
453
|
+
modelName: aiProvider.getModelName()
|
|
445
454
|
};
|
|
446
455
|
}
|
|
447
456
|
catch (error) {
|
|
448
|
-
// Try to get provider type even on error
|
|
457
|
+
// Try to get provider type and model name even on error
|
|
449
458
|
let providerType;
|
|
459
|
+
let modelName;
|
|
450
460
|
try {
|
|
451
461
|
const { createAIProvider } = await Promise.resolve().then(() => __importStar(require('../core/ai-provider-factory')));
|
|
452
462
|
const aiProvider = createAIProvider();
|
|
453
463
|
providerType = aiProvider.getProviderType();
|
|
464
|
+
modelName = aiProvider.getModelName();
|
|
454
465
|
}
|
|
455
466
|
catch {
|
|
456
467
|
providerType = undefined;
|
|
468
|
+
modelName = undefined;
|
|
457
469
|
}
|
|
458
470
|
return {
|
|
459
471
|
connected: false,
|
|
460
472
|
keyConfigured: false,
|
|
461
473
|
providerType,
|
|
474
|
+
modelName,
|
|
462
475
|
error: error instanceof Error ? error.message : String(error)
|
|
463
476
|
};
|
|
464
477
|
}
|
|
@@ -492,6 +505,8 @@ function getVersionInfo() {
|
|
|
492
505
|
*/
|
|
493
506
|
async function handleVersionTool(args, logger, requestId) {
|
|
494
507
|
try {
|
|
508
|
+
// Extract interaction_id for evaluation dataset generation
|
|
509
|
+
const interaction_id = args.interaction_id ? exports.VERSION_TOOL_INPUT_SCHEMA.interaction_id.parse(args.interaction_id) : undefined;
|
|
495
510
|
logger.info('Processing version tool request with system diagnostics', { requestId });
|
|
496
511
|
// Get version info
|
|
497
512
|
const version = getVersionInfo();
|
|
@@ -500,7 +515,7 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
500
515
|
const [vectorDBStatus, embeddingStatus, aiProviderStatus, kubernetesStatus, capabilityStatus, kyvernoStatus, nushellStatus] = await Promise.all([
|
|
501
516
|
getVectorDBStatus(),
|
|
502
517
|
getEmbeddingStatus(),
|
|
503
|
-
getAIProviderStatus(),
|
|
518
|
+
getAIProviderStatus(interaction_id),
|
|
504
519
|
getKubernetesStatus(),
|
|
505
520
|
getCapabilityStatus(),
|
|
506
521
|
getKyvernoStatus(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vfarcic/dot-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.113.0",
|
|
4
4
|
"description": "AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance",
|
|
5
5
|
"mcpName": "io.github.vfarcic/dot-ai",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,6 +18,18 @@
|
|
|
18
18
|
"test:integration:server": "KUBECONFIG=./kubeconfig-test.yaml PORT=3456 DOT_AI_SESSION_DIR=./tmp/sessions TRANSPORT_TYPE=http QDRANT_URL=http://localhost:6335 QDRANT_CAPABILITIES_COLLECTION=capabilities-policies ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY OPENAI_API_KEY=$OPENAI_API_KEY node dist/mcp/server.js",
|
|
19
19
|
"test:integration": "./tests/integration/infrastructure/run-integration-tests.sh",
|
|
20
20
|
"test:integration:watch": "vitest --config=vitest.integration.config.ts --test-timeout=1200000",
|
|
21
|
+
"test:integration:sonnet": "AI_PROVIDER=anthropic AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
22
|
+
"test:integration:haiku": "AI_PROVIDER=anthropic_haiku AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
23
|
+
"test:integration:gpt": "AI_PROVIDER=openai AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
24
|
+
"test:integration:gpt-pro": "AI_PROVIDER=openai_pro AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
25
|
+
"test:integration:gemini": "AI_PROVIDER=google AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
26
|
+
"test:integration:gemini-flash": "AI_PROVIDER=google_fast AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
27
|
+
"test:integration:grok": "AI_PROVIDER=xai AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
28
|
+
"test:integration:grok-fast": "AI_PROVIDER=xai_fast AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
29
|
+
"test:integration:mistral": "AI_PROVIDER=mistral AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
30
|
+
"test:integration:deepseek": "AI_PROVIDER=deepseek AI_PROVIDER_SDK=vercel DEBUG_DOT_AI=true ./tests/integration/infrastructure/run-integration-tests.sh",
|
|
31
|
+
"eval:comparative": "DEBUG_DOT_AI=true npx tsx src/evaluation/eval-runner.ts",
|
|
32
|
+
"eval:platform-synthesis": "DEBUG_DOT_AI=true npx tsx src/evaluation/run-platform-synthesis.ts",
|
|
21
33
|
"clean": "rm -rf dist",
|
|
22
34
|
"prebuild": "npm run clean && npm run lint",
|
|
23
35
|
"build": "tsc --sourceMap false",
|
|
@@ -82,8 +94,11 @@
|
|
|
82
94
|
},
|
|
83
95
|
"dependencies": {
|
|
84
96
|
"@ai-sdk/anthropic": "^2.0.23",
|
|
97
|
+
"@ai-sdk/deepseek": "^1.0.23",
|
|
85
98
|
"@ai-sdk/google": "^2.0.17",
|
|
99
|
+
"@ai-sdk/mistral": "^2.0.19",
|
|
86
100
|
"@ai-sdk/openai": "^2.0.42",
|
|
101
|
+
"@ai-sdk/xai": "^2.0.26",
|
|
87
102
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
88
103
|
"@kubernetes/client-node": "^1.3.0",
|
|
89
104
|
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
@@ -93,5 +108,8 @@
|
|
|
93
108
|
"openai": "^5.11.0",
|
|
94
109
|
"yaml": "^2.8.0",
|
|
95
110
|
"zod-to-json-schema": "^3.24.6"
|
|
111
|
+
},
|
|
112
|
+
"optionalDependencies": {
|
|
113
|
+
"@rollup/rollup-linux-x64-gnu": "4.52.3"
|
|
96
114
|
}
|
|
97
115
|
}
|