@rxap/plugin-llm 20.0.4-dev.3 → 20.1.0-dev.2
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/CHANGELOG.md +16 -0
- package/README.md +13 -13
- package/package.json +4 -4
- package/src/generators/documentation/schema.json +10 -7
- package/src/generators/package-description/generator.js +1 -1
- package/src/generators/package-description/generator.js.map +1 -1
- package/src/generators/package-description/schema.json +12 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [20.1.0-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/plugin-llm@20.1.0-dev.1...@rxap/plugin-llm@20.1.0-dev.2) (2026-01-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/plugin-llm
|
|
9
|
+
|
|
10
|
+
# [20.1.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/plugin-llm@20.1.0-dev.0...@rxap/plugin-llm@20.1.0-dev.1) (2026-01-12)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- update package groups ([ba8753f](https://gitlab.com/rxap/packages/commit/ba8753f5f34680adc282d84c557fc43385bfa987))
|
|
15
|
+
|
|
16
|
+
# [20.1.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-llm@20.0.4-dev.3...@rxap/plugin-llm@20.1.0-dev.0) (2026-01-12)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **schema:** enhance generator schema documentation with descriptions and examples ([0ae4939](https://gitlab.com/rxap/packages/commit/0ae4939d77e3e313ace4a77d8f5dd86c3c918d29))
|
|
21
|
+
|
|
6
22
|
## [20.0.4-dev.3](https://gitlab.com/rxap/packages/compare/@rxap/plugin-llm@20.0.4-dev.2...@rxap/plugin-llm@20.0.4-dev.3) (2025-09-18)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @rxap/plugin-llm
|
package/README.md
CHANGED
|
@@ -41,12 +41,12 @@ nx g @rxap/plugin-llm:documentation
|
|
|
41
41
|
|
|
42
42
|
Option | Type | Default | Description
|
|
43
43
|
--- | --- | --- | ---
|
|
44
|
-
path | string | |
|
|
45
|
-
apiKey | string | | The
|
|
46
|
-
orgId | string | | The
|
|
47
|
-
projectId | string | | The
|
|
48
|
-
baseUrl | string | | The
|
|
49
|
-
model | string | anthropic/claude-3-5-sonnet |
|
|
44
|
+
path | string | | The file or directory path to process for documentation generation.
|
|
45
|
+
apiKey | string | | The API key for accessing LLM services.
|
|
46
|
+
orgId | string | | The organization ID for LLM API requests.
|
|
47
|
+
projectId | string | | The project ID for LLM API requests.
|
|
48
|
+
baseUrl | string | | The base URL for LLM API requests.
|
|
49
|
+
model | string | anthropic/claude-3-5-sonnet | The LLM model to use for documentation generation.
|
|
50
50
|
|
|
51
51
|
## package-description
|
|
52
52
|
> Generates a package description based on the source code
|
|
@@ -57,10 +57,10 @@ nx g @rxap/plugin-llm:package-description
|
|
|
57
57
|
|
|
58
58
|
Option | Type | Default | Description
|
|
59
59
|
--- | --- | --- | ---
|
|
60
|
-
project | string | |
|
|
61
|
-
apiKey | string | | The
|
|
62
|
-
orgId | string | | The
|
|
63
|
-
projectId | string | | The
|
|
64
|
-
baseUrl | string | | The
|
|
65
|
-
model | string | gemini/2.0-flash |
|
|
66
|
-
overwrite | boolean |
|
|
60
|
+
project | string | | The name of the project to generate a package description for.
|
|
61
|
+
apiKey | string | | The API key for accessing LLM services.
|
|
62
|
+
orgId | string | | The organization ID for LLM API requests.
|
|
63
|
+
projectId | string | | The project ID for LLM API requests.
|
|
64
|
+
baseUrl | string | | The base URL for LLM API requests.
|
|
65
|
+
model | string | gemini/2.0-flash | The LLM model to use for package description generation.
|
|
66
|
+
overwrite | boolean | false | Whether to overwrite existing package description files.
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "20.0
|
|
2
|
+
"version": "20.1.0-dev.2",
|
|
3
3
|
"name": "@rxap/plugin-llm",
|
|
4
4
|
"description": "This npm package provides tools for generating documentation and package descriptions using large language models (LLMs). It includes functionality for cleaning JSDoc comments, counting tokens, composing context for LLM prompts, and integrating with services like OpenAI. The package also offers generators for automatically adding documentation to TypeScript code and creating package descriptions based on project source code.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nx/devkit": "20.5.0",
|
|
8
|
-
"@rxap/workspace-ts-morph": "^19.1.13-dev.
|
|
9
|
-
"@rxap/workspace-utilities": "^19.8.1-dev.
|
|
8
|
+
"@rxap/workspace-ts-morph": "^19.1.13-dev.4",
|
|
9
|
+
"@rxap/workspace-utilities": "^19.8.1-dev.3",
|
|
10
10
|
"colors": "1.4.0",
|
|
11
11
|
"openai": "^4.82.0",
|
|
12
12
|
"tiktoken": "^1.0.20",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"schematics": "./generators.json",
|
|
46
46
|
"type": "commonjs",
|
|
47
47
|
"types": "./src/index.d.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "69d6ee61a20632f52b77de621089334a34f45e03"
|
|
49
49
|
}
|
|
@@ -6,28 +6,31 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"path": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"format": "path"
|
|
9
|
+
"format": "path",
|
|
10
|
+
"description": "The file or directory path to process for documentation generation.",
|
|
11
|
+
"examples": ["libs/my-lib", "libs/my-lib/src/index.ts"]
|
|
10
12
|
},
|
|
11
13
|
"apiKey": {
|
|
12
14
|
"type": "string",
|
|
13
|
-
"description": "The
|
|
15
|
+
"description": "The API key for accessing LLM services."
|
|
14
16
|
},
|
|
15
17
|
"orgId": {
|
|
16
18
|
"type": "string",
|
|
17
|
-
"description": "The
|
|
19
|
+
"description": "The organization ID for LLM API requests."
|
|
18
20
|
},
|
|
19
21
|
"projectId": {
|
|
20
22
|
"type": "string",
|
|
21
|
-
"description": "The
|
|
23
|
+
"description": "The project ID for LLM API requests."
|
|
22
24
|
},
|
|
23
25
|
"baseUrl": {
|
|
24
26
|
"type": "string",
|
|
25
|
-
"description": "The
|
|
27
|
+
"description": "The base URL for LLM API requests."
|
|
26
28
|
},
|
|
27
29
|
"model": {
|
|
28
30
|
"type": "string",
|
|
29
|
-
"description": "
|
|
30
|
-
"default": "anthropic/claude-3-5-sonnet"
|
|
31
|
+
"description": "The LLM model to use for documentation generation.",
|
|
32
|
+
"default": "anthropic/claude-3-5-sonnet",
|
|
33
|
+
"examples": ["anthropic/claude-3-5-sonnet", "gemini/2.0-flash"]
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
36
|
"required": []
|
|
@@ -39,7 +39,7 @@ function packageDescriptionGenerator(tree, options) {
|
|
|
39
39
|
}
|
|
40
40
|
const systemPrompt = (0, node_fs_1.readFileSync)((0, path_1.join)(__dirname, 'system-prompts', 'generic.txt'), 'utf-8');
|
|
41
41
|
let context = '';
|
|
42
|
-
(0, workspace_ts_morph_1.TsMorphTransform)(tree, (0, workspace_utilities_1.GetProjectSourceRoot)(tree, projectName), (project) => {
|
|
42
|
+
yield (0, workspace_ts_morph_1.TsMorphTransform)(tree, (0, workspace_utilities_1.GetProjectSourceRoot)(tree, projectName), (project) => {
|
|
43
43
|
context = projectToContext(project, (0, workspace_utilities_1.GetProjectPackageJson)(tree, projectName).name);
|
|
44
44
|
});
|
|
45
45
|
const description = yield (0, completion_1.completion)(systemPrompt, context, { apiKey, projectId, orgId, baseUrl, model: model });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/llm/src/generators/package-description/generator.ts"],"names":[],"mappings":";;AAqCA,kEA0CC;;AA9ED,iEAGkC;AAClC,mEAOmC;AACnC,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,EAAE,oBAAoB,CAAC,EAAE,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,gBAAgB,WAAW,oCAAoC,CAAC,MAAM,CAAC,CAAC;YACpF,OAAO;QACT,CAAC;QAED,IAAI,IAAA,2CAAqB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;YAC/E,OAAO,CAAC,GAAG,CAAC,gBAAgB,WAAW,mFAAmF,CAAC,MAAM,CAAC,CAAC;YACnI,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,IAAA,sBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;QAC7F,IAAI,OAAO,GAAG,EAAE,CAAC;QAEjB,IAAA,qCAAgB,EAAC,IAAI,EAAE,IAAA,0CAAoB,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,OAAgB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/llm/src/generators/package-description/generator.ts"],"names":[],"mappings":";;AAqCA,kEA0CC;;AA9ED,iEAGkC;AAClC,mEAOmC;AACnC,qCAAuC;AACvC,+BAA4B;AAE5B,mCAAiC;AACjC,qDAAkD;AAClD,+DAGmC;AACnC,2CAGyB;AAGzB,SAAS,gBAAgB,CAAC,OAAgB,EAAE,WAAmB;IAC7D,MAAM,OAAO,GAAG,IAAI,gBAAO,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,EAAE,UAAU,EAAE,EAAyB,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC;IACvF,KAAK,MAAM,UAAU,IAAI,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;QAClD,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAA,+CAA6B,EAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;I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AAC,CAAC;QAC7F,IAAI,OAAO,GAAG,EAAE,CAAC;QAEjB,MAAM,IAAA,qCAAgB,EAAC,IAAI,EAAE,IAAA,0CAAoB,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,OAAgB,EAAE,EAAE;YACzF,OAAO,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAA,2CAAqB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,MAAM,IAAA,uBAAU,EAAC,YAAY,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAc,EAAE,CAAC,CAAC;QAE1H,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,GAAG,GAAG,GAAG,WAAW,CAAC,CAAC;QAErD,IAAA,8CAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;YAC3C,WAAW,CAAC,WAAW,GAAG,WAAW,CAAC;QACxC,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAEtB,CAAC;CAAA;AAED,kBAAe,2BAA2B,CAAC"}
|
|
@@ -5,32 +5,36 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"project": {
|
|
8
|
-
"type": "string"
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the project to generate a package description for.",
|
|
10
|
+
"examples": ["my-lib"]
|
|
9
11
|
},
|
|
10
12
|
"apiKey": {
|
|
11
13
|
"type": "string",
|
|
12
|
-
"description": "The
|
|
14
|
+
"description": "The API key for accessing LLM services."
|
|
13
15
|
},
|
|
14
16
|
"orgId": {
|
|
15
17
|
"type": "string",
|
|
16
|
-
"description": "The
|
|
18
|
+
"description": "The organization ID for LLM API requests."
|
|
17
19
|
},
|
|
18
20
|
"projectId": {
|
|
19
21
|
"type": "string",
|
|
20
|
-
"description": "The
|
|
22
|
+
"description": "The project ID for LLM API requests."
|
|
21
23
|
},
|
|
22
24
|
"baseUrl": {
|
|
23
25
|
"type": "string",
|
|
24
|
-
"description": "The
|
|
26
|
+
"description": "The base URL for LLM API requests."
|
|
25
27
|
},
|
|
26
28
|
"model": {
|
|
27
29
|
"type": "string",
|
|
28
|
-
"description": "
|
|
29
|
-
"default": "gemini/2.0-flash"
|
|
30
|
+
"description": "The LLM model to use for package description generation.",
|
|
31
|
+
"default": "gemini/2.0-flash",
|
|
32
|
+
"examples": ["gemini/2.0-flash", "anthropic/claude-3-5-sonnet"]
|
|
30
33
|
},
|
|
31
34
|
"overwrite": {
|
|
32
35
|
"type": "boolean",
|
|
33
|
-
"description": "
|
|
36
|
+
"description": "Whether to overwrite existing package description files.",
|
|
37
|
+
"default": false
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
"required": ["project"]
|