@devness/useai 0.3.2 → 0.3.4
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/index.js +33 -21
- package/package.json +12 -11
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ function writeJsonFile(path, data) {
|
|
|
41
41
|
function isConfiguredStandard(configPath) {
|
|
42
42
|
const config = readJsonFile(configPath);
|
|
43
43
|
const servers = config["mcpServers"];
|
|
44
|
-
return !!servers?.["UseAI"];
|
|
44
|
+
return !!servers?.["UseAI"] || !!servers?.["useai"];
|
|
45
45
|
}
|
|
46
46
|
function installStandard(configPath) {
|
|
47
47
|
const config = readJsonFile(configPath);
|
|
@@ -66,7 +66,7 @@ function removeStandard(configPath) {
|
|
|
66
66
|
function isConfiguredVscode(configPath) {
|
|
67
67
|
const config = readJsonFile(configPath);
|
|
68
68
|
const servers = config["servers"];
|
|
69
|
-
return !!servers?.["UseAI"];
|
|
69
|
+
return !!servers?.["UseAI"] || !!servers?.["useai"];
|
|
70
70
|
}
|
|
71
71
|
function installVscode(configPath) {
|
|
72
72
|
const config = readJsonFile(configPath);
|
|
@@ -91,7 +91,7 @@ function removeVscode(configPath) {
|
|
|
91
91
|
function isConfiguredZed(configPath) {
|
|
92
92
|
const config = readJsonFile(configPath);
|
|
93
93
|
const servers = config["context_servers"];
|
|
94
|
-
return !!servers?.["UseAI"];
|
|
94
|
+
return !!servers?.["UseAI"] || !!servers?.["useai"];
|
|
95
95
|
}
|
|
96
96
|
function installZed(configPath) {
|
|
97
97
|
const config = readJsonFile(configPath);
|
|
@@ -133,7 +133,7 @@ function writeTomlFile(path, data) {
|
|
|
133
133
|
function isConfiguredToml(configPath) {
|
|
134
134
|
const config = readTomlFile(configPath);
|
|
135
135
|
const servers = config["mcp_servers"];
|
|
136
|
-
return !!servers?.["UseAI"];
|
|
136
|
+
return !!servers?.["UseAI"] || !!servers?.["useai"];
|
|
137
137
|
}
|
|
138
138
|
function installToml(configPath) {
|
|
139
139
|
const config = readTomlFile(configPath);
|
|
@@ -172,7 +172,7 @@ function writeYamlFile(path, data) {
|
|
|
172
172
|
function isConfiguredYaml(configPath) {
|
|
173
173
|
const config = readYamlFile(configPath);
|
|
174
174
|
const extensions = config["extensions"];
|
|
175
|
-
return !!extensions?.["UseAI"];
|
|
175
|
+
return !!extensions?.["UseAI"] || !!extensions?.["useai"];
|
|
176
176
|
}
|
|
177
177
|
function installYaml(configPath) {
|
|
178
178
|
const config = readYamlFile(configPath);
|
|
@@ -481,14 +481,20 @@ async function installFlow(tools, autoYes, explicit) {
|
|
|
481
481
|
if (autoYes) {
|
|
482
482
|
toInstall = unconfigured;
|
|
483
483
|
} else {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
484
|
+
let selected;
|
|
485
|
+
try {
|
|
486
|
+
selected = await checkbox({
|
|
487
|
+
message: "Select tools to configure:",
|
|
488
|
+
choices: unconfigured.map((t) => ({
|
|
489
|
+
name: t.name,
|
|
490
|
+
value: t.id,
|
|
491
|
+
checked: true
|
|
492
|
+
}))
|
|
493
|
+
});
|
|
494
|
+
} catch {
|
|
495
|
+
console.log("\n");
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
492
498
|
toInstall = unconfigured.filter((t) => selected.includes(t.id));
|
|
493
499
|
}
|
|
494
500
|
if (toInstall.length === 0) {
|
|
@@ -560,14 +566,20 @@ async function removeFlow(tools, autoYes, explicit) {
|
|
|
560
566
|
if (autoYes) {
|
|
561
567
|
toRemove = configured;
|
|
562
568
|
} else {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
let selected;
|
|
570
|
+
try {
|
|
571
|
+
selected = await checkbox({
|
|
572
|
+
message: "Select tools to remove UseAI from:",
|
|
573
|
+
choices: configured.map((t) => ({
|
|
574
|
+
name: t.name,
|
|
575
|
+
value: t.id,
|
|
576
|
+
checked: true
|
|
577
|
+
}))
|
|
578
|
+
});
|
|
579
|
+
} catch {
|
|
580
|
+
console.log("\n");
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
571
583
|
toRemove = configured.filter((t) => selected.includes(t.id));
|
|
572
584
|
}
|
|
573
585
|
if (toRemove.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devness/useai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -28,6 +28,14 @@
|
|
|
28
28
|
"README.md",
|
|
29
29
|
"LICENSE"
|
|
30
30
|
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc -p tsconfig.build.json",
|
|
33
|
+
"dev": "tsc --watch",
|
|
34
|
+
"bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
|
|
35
|
+
"prepublishOnly": "pnpm run bundle",
|
|
36
|
+
"typecheck": "tsc --noEmit",
|
|
37
|
+
"clean": "rm -rf dist"
|
|
38
|
+
},
|
|
31
39
|
"dependencies": {
|
|
32
40
|
"@inquirer/prompts": "^8.2.1",
|
|
33
41
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
@@ -38,9 +46,9 @@
|
|
|
38
46
|
},
|
|
39
47
|
"devDependencies": {
|
|
40
48
|
"@types/node": "^22.13.4",
|
|
49
|
+
"@useai/shared": "workspace:*",
|
|
41
50
|
"tsup": "^8.0.0",
|
|
42
|
-
"typescript": "^5.7.3"
|
|
43
|
-
"@useai/shared": "0.2.0"
|
|
51
|
+
"typescript": "^5.7.3"
|
|
44
52
|
},
|
|
45
53
|
"repository": {
|
|
46
54
|
"type": "git",
|
|
@@ -49,12 +57,5 @@
|
|
|
49
57
|
"homepage": "https://useai.dev",
|
|
50
58
|
"engines": {
|
|
51
59
|
"node": ">=18"
|
|
52
|
-
},
|
|
53
|
-
"scripts": {
|
|
54
|
-
"build": "tsc -p tsconfig.build.json",
|
|
55
|
-
"dev": "tsc --watch",
|
|
56
|
-
"bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
|
|
57
|
-
"typecheck": "tsc --noEmit",
|
|
58
|
-
"clean": "rm -rf dist"
|
|
59
60
|
}
|
|
60
|
-
}
|
|
61
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 useai.dev
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|