@decaf-ts/mcp-server 0.4.9 → 0.4.16
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/assets/code/patterns/builder.json +10 -0
- package/dist/assets/prompts/documentation/class.json +10 -0
- package/dist/assets/prompts/documentation/constant.json +10 -0
- package/dist/assets/prompts/documentation/decorator.json +10 -0
- package/dist/assets/prompts/documentation/file.json +10 -0
- package/dist/assets/prompts/documentation/function.json +10 -0
- package/dist/assets/prompts/documentation/interface.json +10 -0
- package/dist/assets/prompts/documentation/iterate.json +10 -0
- package/dist/assets/prompts/documentation/module.json +10 -0
- package/dist/assets/prompts/documentation/prefix.json +10 -0
- package/dist/assets/prompts/documentation/repo.json +10 -0
- package/dist/assets/prompts/documentation/suffix.json +10 -0
- package/dist/assets/prompts/repository/readme.json +10 -0
- package/dist/assets/prompts/repository/release_notes.json +10 -0
- package/dist/assets/prompts/repository/setup.json +10 -0
- package/dist/assets/prompts/tests/coverage.json +10 -0
- package/dist/mcp-server.cjs +1 -1
- package/dist/mcp-server.cjs.map +1 -1
- package/dist/mcp-server.js +1 -1
- package/dist/mcp-server.js.map +1 -1
- package/lib/assets/code/patterns/builder.json +10 -0
- package/lib/assets/prompts/documentation/class.json +10 -0
- package/lib/assets/prompts/documentation/constant.json +10 -0
- package/lib/assets/prompts/documentation/decorator.json +10 -0
- package/lib/assets/prompts/documentation/file.json +10 -0
- package/lib/assets/prompts/documentation/function.json +10 -0
- package/lib/assets/prompts/documentation/interface.json +10 -0
- package/lib/assets/prompts/documentation/iterate.json +10 -0
- package/lib/assets/prompts/documentation/module.json +10 -0
- package/lib/assets/prompts/documentation/prefix.json +10 -0
- package/lib/assets/prompts/documentation/repo.json +10 -0
- package/lib/assets/prompts/documentation/suffix.json +10 -0
- package/lib/assets/prompts/repository/readme.json +10 -0
- package/lib/assets/prompts/repository/release_notes.json +10 -0
- package/lib/assets/prompts/repository/setup.json +10 -0
- package/lib/assets/prompts/tests/coverage.json +10 -0
- package/lib/builders/builder.cjs +19 -4
- package/lib/builders/builder.d.ts +14 -4
- package/lib/builders/builder.js.map +1 -1
- package/lib/builders/index.cjs +3 -2
- package/lib/builders/index.d.ts +1 -2
- package/lib/builders/index.js.map +1 -1
- package/lib/builders/prompt-builder.cjs +172 -12
- package/lib/builders/prompt-builder.d.ts +29 -5
- package/lib/builders/prompt-builder.js.map +1 -1
- package/lib/builders/resource-builder.cjs +4 -4
- package/lib/builders/resource-builder.d.ts +2 -2
- package/lib/builders/resource-builder.js.map +1 -1
- package/lib/builders/tool-builder.cjs +27 -9
- package/lib/builders/tool-builder.d.ts +7 -6
- package/lib/builders/tool-builder.js.map +1 -1
- package/lib/builders/types.cjs +3 -0
- package/lib/builders/types.d.ts +17 -0
- package/lib/builders/types.js.map +1 -0
- package/lib/esm/builders/builder.d.ts +14 -4
- package/lib/esm/builders/builder.js +19 -4
- package/lib/esm/builders/builder.js.map +1 -1
- package/lib/esm/builders/index.d.ts +1 -2
- package/lib/esm/builders/index.js +3 -2
- package/lib/esm/builders/index.js.map +1 -1
- package/lib/esm/builders/prompt-builder.d.ts +29 -5
- package/lib/esm/builders/prompt-builder.js +172 -13
- package/lib/esm/builders/prompt-builder.js.map +1 -1
- package/lib/esm/builders/resource-builder.d.ts +2 -2
- package/lib/esm/builders/resource-builder.js +3 -3
- package/lib/esm/builders/resource-builder.js.map +1 -1
- package/lib/esm/builders/tool-builder.d.ts +7 -6
- package/lib/esm/builders/tool-builder.js +28 -10
- package/lib/esm/builders/tool-builder.js.map +1 -1
- package/lib/esm/builders/types.d.ts +17 -0
- package/lib/esm/builders/types.js +2 -0
- package/lib/esm/builders/types.js.map +1 -0
- package/lib/esm/index.d.ts +0 -2
- package/lib/esm/index.js +3 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/jira/errors.d.ts +0 -0
- package/lib/esm/jira/errors.js +42 -0
- package/lib/esm/jira/errors.js.map +1 -0
- package/lib/esm/jira/jira-client-factory.d.ts +0 -0
- package/lib/esm/jira/jira-client-factory.js +74 -0
- package/lib/esm/jira/jira-client-factory.js.map +1 -0
- package/lib/esm/jira/schema-utils.d.ts +5 -0
- package/lib/esm/jira/schema-utils.js +52 -0
- package/lib/esm/jira/schema-utils.js.map +1 -0
- package/lib/esm/jira/tool-utils.d.ts +0 -0
- package/lib/esm/jira/tool-utils.js +65 -0
- package/lib/esm/jira/tool-utils.js.map +1 -0
- package/lib/esm/mcp-server.d.ts +2 -2
- package/lib/esm/mcp-server.js +132 -170
- package/lib/esm/mcp-server.js.map +1 -1
- package/lib/esm/modules/jira/auth-providers.d.ts +0 -0
- package/lib/esm/modules/jira/auth-providers.js +33 -0
- package/lib/esm/modules/jira/auth-providers.js.map +1 -0
- package/lib/esm/modules/jira/error-normalizer.d.ts +0 -0
- package/lib/esm/modules/jira/error-normalizer.js +13 -0
- package/lib/esm/modules/jira/error-normalizer.js.map +1 -0
- package/lib/esm/modules/jira/index.d.ts +1 -0
- package/lib/esm/modules/jira/index.js +17 -0
- package/lib/esm/modules/jira/index.js.map +1 -0
- package/lib/esm/modules/jira/makeJiraClient.d.ts +10 -0
- package/lib/esm/modules/jira/makeJiraClient.js +44 -0
- package/lib/esm/modules/jira/makeJiraClient.js.map +1 -0
- package/lib/esm/modules/jira/prompts/create-issue-prompt.d.ts +0 -0
- package/lib/esm/modules/jira/prompts/create-issue-prompt.js +33 -0
- package/lib/esm/modules/jira/prompts/create-issue-prompt.js.map +1 -0
- package/lib/esm/modules/jira/register.d.ts +0 -0
- package/lib/esm/modules/jira/register.js +244 -0
- package/lib/esm/modules/jira/register.js.map +1 -0
- package/lib/esm/modules/jira/schemas/create-issue-input.d.ts +0 -0
- package/lib/esm/modules/jira/schemas/create-issue-input.js +13 -0
- package/lib/esm/modules/jira/schemas/create-issue-input.js.map +1 -0
- package/lib/esm/modules/jira/schemas/issue-schema.d.ts +0 -0
- package/lib/esm/modules/jira/schemas/issue-schema.js +13 -0
- package/lib/esm/modules/jira/schemas/issue-schema.js.map +1 -0
- package/lib/esm/modules/jira/tools/agile-board-list.d.ts +0 -0
- package/lib/esm/modules/jira/tools/agile-board-list.js +27 -0
- package/lib/esm/modules/jira/tools/agile-board-list.js.map +1 -0
- package/lib/esm/modules/jira/tools/issue-create.d.ts +0 -0
- package/lib/esm/modules/jira/tools/issue-create.js +69 -0
- package/lib/esm/modules/jira/tools/issue-create.js.map +1 -0
- package/lib/esm/modules/jira/tools/issue-transition.d.ts +0 -0
- package/lib/esm/modules/jira/tools/issue-transition.js +27 -0
- package/lib/esm/modules/jira/tools/issue-transition.js.map +1 -0
- package/lib/esm/modules/jira/tools/project-list.d.ts +0 -0
- package/lib/esm/modules/jira/tools/project-list.js +27 -0
- package/lib/esm/modules/jira/tools/project-list.js.map +1 -0
- package/lib/esm/modules/jira/tools/search-jql.d.ts +0 -0
- package/lib/esm/modules/jira/tools/search-jql.js +27 -0
- package/lib/esm/modules/jira/tools/search-jql.js.map +1 -0
- package/lib/esm/modules/jira/types.d.ts +13 -0
- package/lib/esm/modules/jira/types.js +2 -0
- package/lib/esm/modules/jira/types.js.map +1 -0
- package/lib/esm/prompts/code/design-patterns/builder.js +1 -3
- package/lib/esm/prompts/code/design-patterns/builder.js.map +1 -1
- package/lib/esm/prompts/contants.d.ts +4 -0
- package/lib/esm/prompts/contants.js +6 -0
- package/lib/esm/prompts/contants.js.map +1 -0
- package/lib/esm/prompts/index.js +16 -22
- package/lib/esm/prompts/index.js.map +1 -1
- package/lib/esm/prompts/issue/create-prompt.d.ts +3 -0
- package/lib/esm/prompts/issue/create-prompt.js +31 -0
- package/lib/esm/prompts/issue/create-prompt.js.map +1 -0
- package/lib/esm/prompts/jsdocs-prompts.d.ts +2 -0
- package/lib/esm/prompts/jsdocs-prompts.js +27 -0
- package/lib/esm/prompts/jsdocs-prompts.js.map +1 -0
- package/lib/esm/prompts/sprint/plan-sprint-prompt.d.ts +2 -0
- package/lib/esm/prompts/sprint/plan-sprint-prompt.js +26 -0
- package/lib/esm/prompts/sprint/plan-sprint-prompt.js.map +1 -0
- package/lib/esm/resources/decoration-schematics/index.d.ts +0 -0
- package/lib/esm/resources/decoration-schematics/index.js +72 -0
- package/lib/esm/resources/decoration-schematics/index.js.map +1 -0
- package/lib/esm/resources/example-resource/index.d.ts +0 -2
- package/lib/esm/resources/example-resource/index.js +27 -18
- package/lib/esm/resources/example-resource/index.js.map +1 -1
- package/lib/esm/resources/fields-resource.d.ts +0 -0
- package/lib/esm/resources/fields-resource.js +50 -0
- package/lib/esm/resources/fields-resource.js.map +1 -0
- package/lib/esm/resources/golden-overrides/index.d.ts +0 -0
- package/lib/esm/resources/golden-overrides/index.js +57 -0
- package/lib/esm/resources/golden-overrides/index.js.map +1 -0
- package/lib/esm/resources/index.d.ts +0 -2
- package/lib/esm/resources/index.js +8 -3
- package/lib/esm/resources/index.js.map +1 -1
- package/lib/esm/resources/projects-resource.d.ts +0 -0
- package/lib/esm/resources/projects-resource.js +59 -0
- package/lib/esm/resources/projects-resource.js.map +1 -0
- package/lib/esm/resources/repo-metadata/index.d.ts +0 -2
- package/lib/esm/resources/repo-metadata/index.js +33 -24
- package/lib/esm/resources/repo-metadata/index.js.map +1 -1
- package/lib/esm/tools/agile/board-list-tool.d.ts +0 -0
- package/lib/esm/tools/agile/board-list-tool.js +49 -0
- package/lib/esm/tools/agile/board-list-tool.js.map +1 -0
- package/lib/esm/tools/ast/ts-ast-tool.d.ts +0 -2
- package/lib/esm/tools/ast/ts-ast-tool.js +79 -66
- package/lib/esm/tools/ast/ts-ast-tool.js.map +1 -1
- package/lib/esm/tools/ast/types.d.ts +0 -105
- package/lib/esm/tools/ast/types.js +69 -32
- package/lib/esm/tools/ast/types.js.map +1 -1
- package/lib/esm/tools/ast/utils.d.ts +0 -5
- package/lib/esm/tools/ast/utils.js +69 -57
- package/lib/esm/tools/ast/utils.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/apply.d.ts +0 -6
- package/lib/esm/tools/ast-jsdoc-tools/apply.js +32 -28
- package/lib/esm/tools/ast-jsdoc-tools/apply.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/cli.d.ts +0 -2
- package/lib/esm/tools/ast-jsdoc-tools/cli.js +17 -32
- package/lib/esm/tools/ast-jsdoc-tools/cli.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/contracts/validator.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/contracts/validator.js +8 -0
- package/lib/esm/tools/ast-jsdoc-tools/contracts/validator.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/enumerator.d.ts +0 -1
- package/lib/esm/tools/ast-jsdoc-tools/enumerator.js +25 -24
- package/lib/esm/tools/ast-jsdoc-tools/enumerator.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/fileRunner.d.ts +0 -11
- package/lib/esm/tools/ast-jsdoc-tools/fileRunner.js +38 -28
- package/lib/esm/tools/ast-jsdoc-tools/fileRunner.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/formatter.d.ts +0 -6
- package/lib/esm/tools/ast-jsdoc-tools/formatter.js +21 -17
- package/lib/esm/tools/ast-jsdoc-tools/formatter.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/generator.d.ts +0 -12
- package/lib/esm/tools/ast-jsdoc-tools/generator.js +68 -54
- package/lib/esm/tools/ast-jsdoc-tools/generator.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/index.d.ts +0 -7
- package/lib/esm/tools/ast-jsdoc-tools/index.js +43 -28
- package/lib/esm/tools/ast-jsdoc-tools/index.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/interactive.d.ts +0 -1
- package/lib/esm/tools/ast-jsdoc-tools/interactive.js +8 -6
- package/lib/esm/tools/ast-jsdoc-tools/interactive.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/parser.d.ts +0 -13
- package/lib/esm/tools/ast-jsdoc-tools/parser.js +88 -70
- package/lib/esm/tools/ast-jsdoc-tools/parser.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/patch.d.ts +0 -2
- package/lib/esm/tools/ast-jsdoc-tools/patch.js +25 -22
- package/lib/esm/tools/ast-jsdoc-tools/patch.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/promptRunner.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/promptRunner.js +40 -0
- package/lib/esm/tools/ast-jsdoc-tools/promptRunner.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/prompts/loader.d.ts +0 -10
- package/lib/esm/tools/ast-jsdoc-tools/prompts/loader.js +33 -25
- package/lib/esm/tools/ast-jsdoc-tools/prompts/loader.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/repoRunner.d.ts +0 -16
- package/lib/esm/tools/ast-jsdoc-tools/repoRunner.js +123 -60
- package/lib/esm/tools/ast-jsdoc-tools/repoRunner.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/tool0/generator-tool.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool0/generator-tool.js +34 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool0/generator-tool.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool1/extractor.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool1/extractor.js +196 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool1/extractor.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool2/suggester.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool2/suggester.js +67 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool2/suggester.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool3/fileProcessor.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool3/fileProcessor.js +35 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool3/fileProcessor.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool4/repoRunner.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool4/repoRunner.js +116 -0
- package/lib/esm/tools/ast-jsdoc-tools/tool4/repoRunner.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/tools/jsdoc-generator.d.ts +0 -5
- package/lib/esm/tools/ast-jsdoc-tools/tools/jsdoc-generator.js +79 -77
- package/lib/esm/tools/ast-jsdoc-tools/tools/jsdoc-generator.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/utils/backups.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/utils/backups.js +14 -0
- package/lib/esm/tools/ast-jsdoc-tools/utils/backups.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/utils/conflict-detector.d.ts +0 -5
- package/lib/esm/tools/ast-jsdoc-tools/utils/conflict-detector.js +29 -29
- package/lib/esm/tools/ast-jsdoc-tools/utils/conflict-detector.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/utils/context-schema.d.ts +0 -7
- package/lib/esm/tools/ast-jsdoc-tools/utils/context-schema.js +29 -28
- package/lib/esm/tools/ast-jsdoc-tools/utils/context-schema.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/utils/heuristics.d.ts +0 -2
- package/lib/esm/tools/ast-jsdoc-tools/utils/heuristics.js +27 -30
- package/lib/esm/tools/ast-jsdoc-tools/utils/heuristics.js.map +1 -1
- package/lib/esm/tools/ast-jsdoc-tools/utils/logging.d.ts +0 -0
- package/lib/esm/tools/ast-jsdoc-tools/utils/logging.js +18 -0
- package/lib/esm/tools/ast-jsdoc-tools/utils/logging.js.map +1 -0
- package/lib/esm/tools/ast-jsdoc-tools/utils/ts-project.d.ts +0 -12
- package/lib/esm/tools/ast-jsdoc-tools/utils/ts-project.js +22 -20
- package/lib/esm/tools/ast-jsdoc-tools/utils/ts-project.js.map +1 -1
- package/lib/esm/tools/decoration/builder.d.ts +0 -0
- package/lib/esm/tools/decoration/builder.js +81 -0
- package/lib/esm/tools/decoration/builder.js.map +1 -0
- package/lib/esm/tools/decoration/decorators.d.ts +0 -0
- package/lib/esm/tools/decoration/decorators.js +37 -0
- package/lib/esm/tools/decoration/decorators.js.map +1 -0
- package/lib/esm/tools/decoration/index.d.ts +0 -0
- package/lib/esm/tools/decoration/index.js +49 -0
- package/lib/esm/tools/decoration/index.js.map +1 -0
- package/lib/esm/tools/file-summarizer/index.d.ts +0 -2
- package/lib/esm/tools/file-summarizer/index.js +41 -28
- package/lib/esm/tools/file-summarizer/index.js.map +1 -1
- package/lib/esm/tools/index.d.ts +0 -2
- package/lib/esm/tools/index.js +30 -5
- package/lib/esm/tools/index.js.map +1 -1
- package/lib/esm/tools/issue/create-tool.d.ts +0 -0
- package/lib/esm/tools/issue/create-tool.js +132 -0
- package/lib/esm/tools/issue/create-tool.js.map +1 -0
- package/lib/esm/tools/issue/transition-tool.d.ts +0 -0
- package/lib/esm/tools/issue/transition-tool.js +41 -0
- package/lib/esm/tools/issue/transition-tool.js.map +1 -0
- package/lib/esm/tools/jsdoc/ts-jsdoc-element-tool.d.ts +0 -2
- package/lib/esm/tools/jsdoc/ts-jsdoc-element-tool.js +110 -83
- package/lib/esm/tools/jsdoc/ts-jsdoc-element-tool.js.map +1 -1
- package/lib/esm/tools/jsdoc/utils.d.ts +0 -5
- package/lib/esm/tools/jsdoc/utils.js +59 -52
- package/lib/esm/tools/jsdoc/utils.js.map +1 -1
- package/lib/esm/tools/project/list-tool.d.ts +0 -0
- package/lib/esm/tools/project/list-tool.js +47 -0
- package/lib/esm/tools/project/list-tool.js.map +1 -0
- package/lib/esm/tools/search/jql-tool.d.ts +0 -0
- package/lib/esm/tools/search/jql-tool.js +49 -0
- package/lib/esm/tools/search/jql-tool.js.map +1 -0
- package/lib/esm/tools/testing/ts-jest-list-tests.d.ts +0 -2
- package/lib/esm/tools/testing/ts-jest-list-tests.js +70 -52
- package/lib/esm/tools/testing/ts-jest-list-tests.js.map +1 -1
- package/lib/esm/types.d.ts +7 -11
- package/lib/esm/utils/assets.d.ts +13 -0
- package/lib/esm/utils/assets.js +78 -0
- package/lib/esm/utils/assets.js.map +1 -0
- package/lib/esm/utils/banner.js +3 -3
- package/lib/esm/utils/banner.js.map +1 -1
- package/lib/esm/utils/constants.d.ts +8 -0
- package/lib/esm/utils/constants.js +11 -0
- package/lib/esm/utils/constants.js.map +1 -0
- package/lib/esm/utils/conversions.d.ts +2 -0
- package/lib/esm/utils/conversions.js +23 -0
- package/lib/esm/utils/conversions.js.map +1 -0
- package/lib/esm/utils/environment.d.ts +32 -0
- package/lib/esm/utils/environment.js +43 -0
- package/lib/esm/utils/environment.js.map +1 -0
- package/lib/esm/utils/icons.d.ts +0 -0
- package/lib/esm/utils/icons.js +2 -0
- package/lib/esm/utils/icons.js.map +1 -0
- package/lib/esm/utils/initialization.d.ts +1 -0
- package/lib/esm/utils/initialization.js +20 -0
- package/lib/esm/utils/initialization.js.map +1 -0
- package/lib/esm/utils/normalization.d.ts +0 -0
- package/lib/esm/utils/normalization.js +2 -0
- package/lib/esm/utils/normalization.js.map +1 -0
- package/lib/esm/utils/utils.d.ts +1 -0
- package/lib/esm/utils/utils.js +8 -0
- package/lib/esm/utils/utils.js.map +1 -0
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/index.cjs +3 -2
- package/lib/index.d.ts +0 -2
- package/lib/index.js.map +1 -1
- package/lib/jira/errors.cjs +42 -0
- package/lib/jira/errors.d.ts +0 -0
- package/lib/jira/errors.js.map +1 -0
- package/lib/jira/jira-client-factory.cjs +74 -0
- package/lib/jira/jira-client-factory.d.ts +0 -0
- package/lib/jira/jira-client-factory.js.map +1 -0
- package/lib/jira/schema-utils.cjs +58 -0
- package/lib/jira/schema-utils.d.ts +5 -0
- package/lib/jira/schema-utils.js.map +1 -0
- package/lib/jira/tool-utils.cjs +65 -0
- package/lib/jira/tool-utils.d.ts +0 -0
- package/lib/jira/tool-utils.js.map +1 -0
- package/lib/mcp-server.cjs +133 -204
- package/lib/mcp-server.d.ts +2 -2
- package/lib/mcp-server.js.map +1 -1
- package/lib/modules/jira/auth-providers.cjs +33 -0
- package/lib/modules/jira/auth-providers.d.ts +0 -0
- package/lib/modules/jira/auth-providers.js.map +1 -0
- package/lib/modules/jira/error-normalizer.cjs +13 -0
- package/lib/modules/jira/error-normalizer.d.ts +0 -0
- package/lib/modules/jira/error-normalizer.js.map +1 -0
- package/lib/modules/jira/index.cjs +33 -0
- package/lib/modules/jira/index.d.ts +1 -0
- package/lib/modules/jira/index.js.map +1 -0
- package/lib/modules/jira/makeJiraClient.cjs +47 -0
- package/lib/modules/jira/makeJiraClient.d.ts +10 -0
- package/lib/modules/jira/makeJiraClient.js.map +1 -0
- package/lib/modules/jira/prompts/create-issue-prompt.cjs +33 -0
- package/lib/modules/jira/prompts/create-issue-prompt.d.ts +0 -0
- package/lib/modules/jira/prompts/create-issue-prompt.js.map +1 -0
- package/lib/modules/jira/register.cjs +244 -0
- package/lib/modules/jira/register.d.ts +0 -0
- package/lib/modules/jira/register.js.map +1 -0
- package/lib/modules/jira/schemas/create-issue-input.cjs +13 -0
- package/lib/modules/jira/schemas/create-issue-input.d.ts +0 -0
- package/lib/modules/jira/schemas/create-issue-input.js.map +1 -0
- package/lib/modules/jira/schemas/issue-schema.cjs +13 -0
- package/lib/modules/jira/schemas/issue-schema.d.ts +0 -0
- package/lib/modules/jira/schemas/issue-schema.js.map +1 -0
- package/lib/modules/jira/tools/agile-board-list.cjs +27 -0
- package/lib/modules/jira/tools/agile-board-list.d.ts +0 -0
- package/lib/modules/jira/tools/agile-board-list.js.map +1 -0
- package/lib/modules/jira/tools/issue-create.cjs +69 -0
- package/lib/modules/jira/tools/issue-create.d.ts +0 -0
- package/lib/modules/jira/tools/issue-create.js.map +1 -0
- package/lib/modules/jira/tools/issue-transition.cjs +27 -0
- package/lib/modules/jira/tools/issue-transition.d.ts +0 -0
- package/lib/modules/jira/tools/issue-transition.js.map +1 -0
- package/lib/modules/jira/tools/project-list.cjs +27 -0
- package/lib/modules/jira/tools/project-list.d.ts +0 -0
- package/lib/modules/jira/tools/project-list.js.map +1 -0
- package/lib/modules/jira/tools/search-jql.cjs +27 -0
- package/lib/modules/jira/tools/search-jql.d.ts +0 -0
- package/lib/modules/jira/tools/search-jql.js.map +1 -0
- package/lib/modules/jira/types.cjs +3 -0
- package/lib/modules/jira/types.d.ts +13 -0
- package/lib/modules/jira/types.js.map +1 -0
- package/lib/prompts/code/design-patterns/builder.cjs +1 -3
- package/lib/prompts/code/design-patterns/builder.js.map +1 -1
- package/lib/prompts/contants.cjs +9 -0
- package/lib/prompts/contants.d.ts +4 -0
- package/lib/prompts/contants.js.map +1 -0
- package/lib/prompts/index.cjs +16 -22
- package/lib/prompts/index.js.map +1 -1
- package/lib/prompts/issue/create-prompt.cjs +34 -0
- package/lib/prompts/issue/create-prompt.d.ts +3 -0
- package/lib/prompts/issue/create-prompt.js.map +1 -0
- package/lib/prompts/jsdocs-prompts.cjs +30 -0
- package/lib/prompts/jsdocs-prompts.d.ts +2 -0
- package/lib/prompts/jsdocs-prompts.js.map +1 -0
- package/lib/prompts/sprint/plan-sprint-prompt.cjs +29 -0
- package/lib/prompts/sprint/plan-sprint-prompt.d.ts +2 -0
- package/lib/prompts/sprint/plan-sprint-prompt.js.map +1 -0
- package/lib/resources/decoration-schematics/index.cjs +72 -0
- package/lib/resources/decoration-schematics/index.d.ts +0 -0
- package/lib/resources/decoration-schematics/index.js.map +1 -0
- package/lib/resources/example-resource/index.cjs +26 -20
- package/lib/resources/example-resource/index.d.ts +0 -2
- package/lib/resources/example-resource/index.js.map +1 -1
- package/lib/resources/fields-resource.cjs +50 -0
- package/lib/resources/fields-resource.d.ts +0 -0
- package/lib/resources/fields-resource.js.map +1 -0
- package/lib/resources/golden-overrides/index.cjs +57 -0
- package/lib/resources/golden-overrides/index.d.ts +0 -0
- package/lib/resources/golden-overrides/index.js.map +1 -0
- package/lib/resources/index.cjs +7 -5
- package/lib/resources/index.d.ts +0 -2
- package/lib/resources/index.js.map +1 -1
- package/lib/resources/projects-resource.cjs +59 -0
- package/lib/resources/projects-resource.d.ts +0 -0
- package/lib/resources/projects-resource.js.map +1 -0
- package/lib/resources/repo-metadata/index.cjs +32 -26
- package/lib/resources/repo-metadata/index.d.ts +0 -2
- package/lib/resources/repo-metadata/index.js.map +1 -1
- package/lib/tools/agile/board-list-tool.cjs +49 -0
- package/lib/tools/agile/board-list-tool.d.ts +0 -0
- package/lib/tools/agile/board-list-tool.js.map +1 -0
- package/lib/tools/ast/ts-ast-tool.cjs +78 -68
- package/lib/tools/ast/ts-ast-tool.d.ts +0 -2
- package/lib/tools/ast/ts-ast-tool.js.map +1 -1
- package/lib/tools/ast/types.cjs +68 -34
- package/lib/tools/ast/types.d.ts +0 -105
- package/lib/tools/ast/types.js.map +1 -1
- package/lib/tools/ast/utils.cjs +68 -63
- package/lib/tools/ast/utils.d.ts +0 -5
- package/lib/tools/ast/utils.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/apply.cjs +31 -34
- package/lib/tools/ast-jsdoc-tools/apply.d.ts +0 -6
- package/lib/tools/ast-jsdoc-tools/apply.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/cli.cjs +16 -36
- package/lib/tools/ast-jsdoc-tools/cli.d.ts +0 -2
- package/lib/tools/ast-jsdoc-tools/cli.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/contracts/validator.cjs +8 -0
- package/lib/tools/ast-jsdoc-tools/contracts/validator.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/contracts/validator.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/enumerator.cjs +24 -29
- package/lib/tools/ast-jsdoc-tools/enumerator.d.ts +0 -1
- package/lib/tools/ast-jsdoc-tools/enumerator.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/fileRunner.cjs +37 -33
- package/lib/tools/ast-jsdoc-tools/fileRunner.d.ts +0 -11
- package/lib/tools/ast-jsdoc-tools/fileRunner.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/formatter.cjs +20 -19
- package/lib/tools/ast-jsdoc-tools/formatter.d.ts +0 -6
- package/lib/tools/ast-jsdoc-tools/formatter.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/generator.cjs +67 -56
- package/lib/tools/ast-jsdoc-tools/generator.d.ts +0 -12
- package/lib/tools/ast-jsdoc-tools/generator.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/index.cjs +42 -31
- package/lib/tools/ast-jsdoc-tools/index.d.ts +0 -7
- package/lib/tools/ast-jsdoc-tools/index.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/interactive.cjs +7 -8
- package/lib/tools/ast-jsdoc-tools/interactive.d.ts +0 -1
- package/lib/tools/ast-jsdoc-tools/interactive.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/parser.cjs +87 -75
- package/lib/tools/ast-jsdoc-tools/parser.d.ts +0 -13
- package/lib/tools/ast-jsdoc-tools/parser.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/patch.cjs +24 -27
- package/lib/tools/ast-jsdoc-tools/patch.d.ts +0 -2
- package/lib/tools/ast-jsdoc-tools/patch.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/promptRunner.cjs +40 -0
- package/lib/tools/ast-jsdoc-tools/promptRunner.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/promptRunner.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/prompts/loader.cjs +32 -30
- package/lib/tools/ast-jsdoc-tools/prompts/loader.d.ts +0 -10
- package/lib/tools/ast-jsdoc-tools/prompts/loader.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/repoRunner.cjs +122 -65
- package/lib/tools/ast-jsdoc-tools/repoRunner.d.ts +0 -16
- package/lib/tools/ast-jsdoc-tools/repoRunner.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/tool0/generator-tool.cjs +34 -0
- package/lib/tools/ast-jsdoc-tools/tool0/generator-tool.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/tool0/generator-tool.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/tool1/extractor.cjs +196 -0
- package/lib/tools/ast-jsdoc-tools/tool1/extractor.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/tool1/extractor.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/tool2/suggester.cjs +67 -0
- package/lib/tools/ast-jsdoc-tools/tool2/suggester.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/tool2/suggester.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/tool3/fileProcessor.cjs +35 -0
- package/lib/tools/ast-jsdoc-tools/tool3/fileProcessor.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/tool3/fileProcessor.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/tool4/repoRunner.cjs +116 -0
- package/lib/tools/ast-jsdoc-tools/tool4/repoRunner.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/tool4/repoRunner.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/tools/jsdoc-generator.cjs +78 -79
- package/lib/tools/ast-jsdoc-tools/tools/jsdoc-generator.d.ts +0 -5
- package/lib/tools/ast-jsdoc-tools/tools/jsdoc-generator.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/utils/backups.cjs +14 -0
- package/lib/tools/ast-jsdoc-tools/utils/backups.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/utils/backups.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/utils/conflict-detector.cjs +28 -31
- package/lib/tools/ast-jsdoc-tools/utils/conflict-detector.d.ts +0 -5
- package/lib/tools/ast-jsdoc-tools/utils/conflict-detector.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/utils/context-schema.cjs +28 -30
- package/lib/tools/ast-jsdoc-tools/utils/context-schema.d.ts +0 -7
- package/lib/tools/ast-jsdoc-tools/utils/context-schema.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/utils/heuristics.cjs +26 -32
- package/lib/tools/ast-jsdoc-tools/utils/heuristics.d.ts +0 -2
- package/lib/tools/ast-jsdoc-tools/utils/heuristics.js.map +1 -1
- package/lib/tools/ast-jsdoc-tools/utils/logging.cjs +18 -0
- package/lib/tools/ast-jsdoc-tools/utils/logging.d.ts +0 -0
- package/lib/tools/ast-jsdoc-tools/utils/logging.js.map +1 -0
- package/lib/tools/ast-jsdoc-tools/utils/ts-project.cjs +21 -55
- package/lib/tools/ast-jsdoc-tools/utils/ts-project.d.ts +0 -12
- package/lib/tools/ast-jsdoc-tools/utils/ts-project.js.map +1 -1
- package/lib/tools/decoration/builder.cjs +81 -0
- package/lib/tools/decoration/builder.d.ts +0 -0
- package/lib/tools/decoration/builder.js.map +1 -0
- package/lib/tools/decoration/decorators.cjs +37 -0
- package/lib/tools/decoration/decorators.d.ts +0 -0
- package/lib/tools/decoration/decorators.js.map +1 -0
- package/lib/tools/decoration/index.cjs +49 -0
- package/lib/tools/decoration/index.d.ts +0 -0
- package/lib/tools/decoration/index.js.map +1 -0
- package/lib/tools/file-summarizer/index.cjs +40 -30
- package/lib/tools/file-summarizer/index.d.ts +0 -2
- package/lib/tools/file-summarizer/index.js.map +1 -1
- package/lib/tools/index.cjs +29 -7
- package/lib/tools/index.d.ts +0 -2
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/issue/create-tool.cjs +132 -0
- package/lib/tools/issue/create-tool.d.ts +0 -0
- package/lib/tools/issue/create-tool.js.map +1 -0
- package/lib/tools/issue/transition-tool.cjs +41 -0
- package/lib/tools/issue/transition-tool.d.ts +0 -0
- package/lib/tools/issue/transition-tool.js.map +1 -0
- package/lib/tools/jsdoc/ts-jsdoc-element-tool.cjs +109 -85
- package/lib/tools/jsdoc/ts-jsdoc-element-tool.d.ts +0 -2
- package/lib/tools/jsdoc/ts-jsdoc-element-tool.js.map +1 -1
- package/lib/tools/jsdoc/utils.cjs +58 -58
- package/lib/tools/jsdoc/utils.d.ts +0 -5
- package/lib/tools/jsdoc/utils.js.map +1 -1
- package/lib/tools/project/list-tool.cjs +47 -0
- package/lib/tools/project/list-tool.d.ts +0 -0
- package/lib/tools/project/list-tool.js.map +1 -0
- package/lib/tools/search/jql-tool.cjs +49 -0
- package/lib/tools/search/jql-tool.d.ts +0 -0
- package/lib/tools/search/jql-tool.js.map +1 -0
- package/lib/tools/testing/ts-jest-list-tests.cjs +69 -54
- package/lib/tools/testing/ts-jest-list-tests.d.ts +0 -2
- package/lib/tools/testing/ts-jest-list-tests.js.map +1 -1
- package/lib/types.d.ts +7 -11
- package/lib/utils/assets.cjs +114 -0
- package/lib/utils/assets.d.ts +13 -0
- package/lib/utils/assets.js.map +1 -0
- package/lib/utils/banner.cjs +48 -18
- package/lib/utils/banner.js.map +1 -1
- package/lib/utils/constants.cjs +14 -0
- package/lib/utils/constants.d.ts +8 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/conversions.cjs +26 -0
- package/lib/utils/conversions.d.ts +2 -0
- package/lib/utils/conversions.js.map +1 -0
- package/lib/utils/environment.cjs +49 -0
- package/lib/utils/environment.d.ts +32 -0
- package/lib/utils/environment.js.map +1 -0
- package/lib/utils/icons.cjs +2 -0
- package/lib/utils/icons.d.ts +0 -0
- package/lib/utils/icons.js.map +1 -0
- package/lib/utils/initialization.cjs +23 -0
- package/lib/utils/initialization.d.ts +1 -0
- package/lib/utils/initialization.js.map +1 -0
- package/lib/utils/normalization.cjs +2 -0
- package/lib/utils/normalization.d.ts +0 -0
- package/lib/utils/normalization.js.map +1 -0
- package/lib/utils/utils.cjs +11 -0
- package/lib/utils/utils.d.ts +1 -0
- package/lib/utils/utils.js.map +1 -0
- package/lib/version.cjs +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +27 -23
- package/workdocs/assets/slogans.json +198 -0
- package/lib/environment.cjs +0 -32
- package/lib/environment.d.ts +0 -71
- package/lib/environment.js.map +0 -1
- package/lib/esm/environment.d.ts +0 -71
- package/lib/esm/environment.js +0 -29
- package/lib/esm/environment.js.map +0 -1
- package/lib/esm/prompts/example-prompt/index.d.ts +0 -2
- package/lib/esm/prompts/example-prompt/index.js +0 -18
- package/lib/esm/prompts/example-prompt/index.js.map +0 -1
- package/lib/esm/prompts/interactive-jsdoc/index.d.ts +0 -2
- package/lib/esm/prompts/interactive-jsdoc/index.js +0 -18
- package/lib/esm/prompts/interactive-jsdoc/index.js.map +0 -1
- package/lib/esm/prompts/jsdocs/class-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/class-prompt.js +0 -52
- package/lib/esm/prompts/jsdocs/class-prompt.js.map +0 -1
- package/lib/esm/prompts/jsdocs/const-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/const-prompt.js +0 -24
- package/lib/esm/prompts/jsdocs/const-prompt.js.map +0 -1
- package/lib/esm/prompts/jsdocs/constants.d.ts +0 -4
- package/lib/esm/prompts/jsdocs/constants.js +0 -46
- package/lib/esm/prompts/jsdocs/constants.js.map +0 -1
- package/lib/esm/prompts/jsdocs/decorator-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/decorator-prompt.js +0 -42
- package/lib/esm/prompts/jsdocs/decorator-prompt.js.map +0 -1
- package/lib/esm/prompts/jsdocs/enum-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/enum-prompt.js +0 -24
- package/lib/esm/prompts/jsdocs/enum-prompt.js.map +0 -1
- package/lib/esm/prompts/jsdocs/function-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/function-prompt.js +0 -43
- package/lib/esm/prompts/jsdocs/function-prompt.js.map +0 -1
- package/lib/esm/prompts/jsdocs/interface-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/interface-prompt.js +0 -24
- package/lib/esm/prompts/jsdocs/interface-prompt.js.map +0 -1
- package/lib/esm/prompts/jsdocs/types-prompt.d.ts +0 -2
- package/lib/esm/prompts/jsdocs/types-prompt.js +0 -24
- package/lib/esm/prompts/jsdocs/types-prompt.js.map +0 -1
- package/lib/esm/tools/example-tool/index.d.ts +0 -2
- package/lib/esm/tools/example-tool/index.js +0 -29
- package/lib/esm/tools/example-tool/index.js.map +0 -1
- package/lib/prompts/example-prompt/index.cjs +0 -21
- package/lib/prompts/example-prompt/index.d.ts +0 -2
- package/lib/prompts/example-prompt/index.js.map +0 -1
- package/lib/prompts/interactive-jsdoc/index.cjs +0 -21
- package/lib/prompts/interactive-jsdoc/index.d.ts +0 -2
- package/lib/prompts/interactive-jsdoc/index.js.map +0 -1
- package/lib/prompts/jsdocs/class-prompt.cjs +0 -55
- package/lib/prompts/jsdocs/class-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/class-prompt.js.map +0 -1
- package/lib/prompts/jsdocs/const-prompt.cjs +0 -27
- package/lib/prompts/jsdocs/const-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/const-prompt.js.map +0 -1
- package/lib/prompts/jsdocs/constants.cjs +0 -49
- package/lib/prompts/jsdocs/constants.d.ts +0 -4
- package/lib/prompts/jsdocs/constants.js.map +0 -1
- package/lib/prompts/jsdocs/decorator-prompt.cjs +0 -45
- package/lib/prompts/jsdocs/decorator-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/decorator-prompt.js.map +0 -1
- package/lib/prompts/jsdocs/enum-prompt.cjs +0 -27
- package/lib/prompts/jsdocs/enum-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/enum-prompt.js.map +0 -1
- package/lib/prompts/jsdocs/function-prompt.cjs +0 -46
- package/lib/prompts/jsdocs/function-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/function-prompt.js.map +0 -1
- package/lib/prompts/jsdocs/interface-prompt.cjs +0 -27
- package/lib/prompts/jsdocs/interface-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/interface-prompt.js.map +0 -1
- package/lib/prompts/jsdocs/types-prompt.cjs +0 -27
- package/lib/prompts/jsdocs/types-prompt.d.ts +0 -2
- package/lib/prompts/jsdocs/types-prompt.js.map +0 -1
- package/lib/tools/example-tool/index.cjs +0 -32
- package/lib/tools/example-tool/index.d.ts +0 -2
- package/lib/tools/example-tool/index.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, Footer } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
import { ReasoningLevel } from "./../../constants.js";
|
|
5
|
-
const promptName = "ts.jsdoc.class";
|
|
6
|
-
const argsSchema = z.object({});
|
|
7
|
-
export const TsDocClassPrompt = PromptBuilder.builder
|
|
8
|
-
.setName(promptName)
|
|
9
|
-
.setTitle("Class JSDocs Prompt")
|
|
10
|
-
.setDescription("Generate JSDoc comments for a TypeScript class according to a curated template and prompt.")
|
|
11
|
-
.setArgsSchema(argsSchema)
|
|
12
|
-
.setReasoning(ReasoningLevel.BASIC)
|
|
13
|
-
.setCb((
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
args,
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
|
-
extra) => {
|
|
18
|
-
const prompt = `${BaseJSDocPrompt}
|
|
19
|
-
document the entire class and each of its functions including always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
20
|
-
Include @class tags when applicable.
|
|
21
|
-
include @param tags in the class documentation and its type definitions
|
|
22
|
-
Include detailed @description for all properties.
|
|
23
|
-
Include @template tags when necessary.
|
|
24
|
-
Do NOT document the constructor, but include the constructor arguments as @param in the class documentation
|
|
25
|
-
For methods and functions:
|
|
26
|
-
- include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.
|
|
27
|
-
- create a usage example under the @example tag on the class documentation
|
|
28
|
-
- create mermaid sequence diagrams under the @mermaid tag;
|
|
29
|
-
|
|
30
|
-
The order of tags (when applicable) should be as follows:
|
|
31
|
-
1 - @description;
|
|
32
|
-
2 - @summary;
|
|
33
|
-
3 - @template;
|
|
34
|
-
4 - @param;
|
|
35
|
-
5 - @return;
|
|
36
|
-
6 - @class
|
|
37
|
-
7 - @example
|
|
38
|
-
8 - @mermaid;
|
|
39
|
-
|
|
40
|
-
ignore @mermaid for methods with less that 15 lines and constructors.
|
|
41
|
-
Respond only with the full JSDoc comment block for the class and its methods.
|
|
42
|
-
NEVER user @memberOf in the class or any of it's methods
|
|
43
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information
|
|
44
|
-
never omit or change any code, including the constructor
|
|
45
|
-
${Footer}`;
|
|
46
|
-
const result = {
|
|
47
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
48
|
-
_meta: {},
|
|
49
|
-
};
|
|
50
|
-
return result;
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=class-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"class-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/class-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAoB;AAOtD,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAC9D,OAAO,EAAE,cAAc,EAAE,6BAAwB;AAEjD,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEpC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,gBAAgB,GAAkB,aAAa,CAAC,OAAO;KACjE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,qBAAqB,CAAC;KAC/B,cAAc,CACb,4FAA4F,CAC7F;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC;KAClC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BrC,MAAM,EAAE,CAAC;IACL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;QACrE,KAAK,EAAE,EAAE;KACV,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, ConstantsPrompt, Footer } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
const promptName = "ts.jsdoc.const";
|
|
5
|
-
const argsSchema = z.object({});
|
|
6
|
-
export const TsDocConstPrompt = PromptBuilder.builder
|
|
7
|
-
.setName(promptName)
|
|
8
|
-
.setTitle("Const JSDocs Prompt")
|
|
9
|
-
.setDescription("Generate JSDoc comments for a TypeScript constant according to a curated template and prompt.")
|
|
10
|
-
.setArgsSchema(argsSchema)
|
|
11
|
-
.setCb((
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
args,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
extra) => {
|
|
16
|
-
const prompt = `${BaseJSDocPrompt}
|
|
17
|
-
${ConstantsPrompt}
|
|
18
|
-
${Footer}`;
|
|
19
|
-
const result = {
|
|
20
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
21
|
-
};
|
|
22
|
-
return result;
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=const-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/const-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAoB;AAOvE,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAE9D,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEpC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,gBAAgB,GAAkB,aAAa,CAAC,OAAO;KACjE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,qBAAqB,CAAC;KAC/B,cAAc,CACb,+FAA+F,CAChG;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;EACrC,eAAe;EACf,MAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const BaseJSDocPrompt = "You're a senior TypeScript developer writing JSDoc documentation for a class to be used with better-docs. Given the module code:\nGenerate a JSDoc comment block for a TypeScript module file using better-docs formatting:";
|
|
2
|
-
export declare const TypesPrompt = "document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.\n Include @interface and @typeDef an @template tags when appropriate.\n Include detailed @description for all properties.\n For methods, include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.\n\n The order of tags (when applicable) should be as follows:\n1 - @description;\n2 - @summary;\n3 - @template;\n4 - @param;\n5 - @return;\n6 - @interface or @typeDef followed by the interface or type name;\n8 - @memberOf referencing the appropriate module using the appropriate syntax\n\nOutput only the completed JSDoc comment block for the type or interface.\nrefer to the module it belongs with @memberOf this the `@memberOf module:<module_name>` syntax\nnever omit or change any code\nif the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information";
|
|
3
|
-
export declare const ConstantsPrompt = "document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.\nInclude @const and @typeDef tags when appropriate.\nInclude detailed @description for all properties.\n- For enums, include @enum and @readonly, and add inline documentation for each member\n- For object-like constants:\n - Create a @typedef with @property for each key\n - Reference it in the constant using @type\n - Alternatively, document each key inline if small\n\nThe order of tags (when applicable) should be as follows:\n1 - @description;\n2 - @summary;\n3 - @template;\n4 - @property;\n6 - @const followed by the const or enum name;\n8 - @memberOf referencing the appropriate module using the appropriate syntax\n\nRespond with the JSDoc comment block(s) for both the typedef and the constant or enum.\nrefer to the module it belongs with @memberOf this the `@memberOf module:<module_name>` syntax\nnever omit or change any code\nif the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information";
|
|
4
|
-
export declare const Footer = "NOTES:\n - when document a function/method parameters, and there is a template type involved, ALWAYS reference it using the @template tag;\n - when documenting a function type as a parameter, ALWAYS use the function(type1,type2):return_type syntax;\n ";
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export const BaseJSDocPrompt = `You're a senior TypeScript developer writing JSDoc documentation for a class to be used with better-docs. Given the module code:
|
|
2
|
-
Generate a JSDoc comment block for a TypeScript module file using better-docs formatting:`;
|
|
3
|
-
export const TypesPrompt = `document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
4
|
-
Include @interface and @typeDef an @template tags when appropriate.
|
|
5
|
-
Include detailed @description for all properties.
|
|
6
|
-
For methods, include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.
|
|
7
|
-
|
|
8
|
-
The order of tags (when applicable) should be as follows:
|
|
9
|
-
1 - @description;
|
|
10
|
-
2 - @summary;
|
|
11
|
-
3 - @template;
|
|
12
|
-
4 - @param;
|
|
13
|
-
5 - @return;
|
|
14
|
-
6 - @interface or @typeDef followed by the interface or type name;
|
|
15
|
-
8 - @memberOf referencing the appropriate module using the appropriate syntax
|
|
16
|
-
|
|
17
|
-
Output only the completed JSDoc comment block for the type or interface.
|
|
18
|
-
refer to the module it belongs with @memberOf this the \`@memberOf module:<module_name>\` syntax
|
|
19
|
-
never omit or change any code
|
|
20
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information`;
|
|
21
|
-
export const ConstantsPrompt = `document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
22
|
-
Include @const and @typeDef tags when appropriate.
|
|
23
|
-
Include detailed @description for all properties.
|
|
24
|
-
- For enums, include @enum and @readonly, and add inline documentation for each member
|
|
25
|
-
- For object-like constants:
|
|
26
|
-
- Create a @typedef with @property for each key
|
|
27
|
-
- Reference it in the constant using @type
|
|
28
|
-
- Alternatively, document each key inline if small
|
|
29
|
-
|
|
30
|
-
The order of tags (when applicable) should be as follows:
|
|
31
|
-
1 - @description;
|
|
32
|
-
2 - @summary;
|
|
33
|
-
3 - @template;
|
|
34
|
-
4 - @property;
|
|
35
|
-
6 - @const followed by the const or enum name;
|
|
36
|
-
8 - @memberOf referencing the appropriate module using the appropriate syntax
|
|
37
|
-
|
|
38
|
-
Respond with the JSDoc comment block(s) for both the typedef and the constant or enum.
|
|
39
|
-
refer to the module it belongs with @memberOf this the \`@memberOf module:<module_name>\` syntax
|
|
40
|
-
never omit or change any code
|
|
41
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information`;
|
|
42
|
-
export const Footer = `NOTES:
|
|
43
|
-
- when document a function/method parameters, and there is a template type involved, ALWAYS reference it using the @template tag;
|
|
44
|
-
- when documenting a function type as a parameter, ALWAYS use the function(type1,type2):return_type syntax;
|
|
45
|
-
`;
|
|
46
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;0FAC2D,CAAC;AAE3F,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;gIAiBqG,CAAC;AAEjI,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;gIAoBiG,CAAC;AAEjI,MAAM,CAAC,MAAM,MAAM,GAAG;;;EAGpB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, Footer } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
const promptName = "ts.jsdoc.decorator";
|
|
5
|
-
const argsSchema = z.object({});
|
|
6
|
-
export const TsDocDecoratorPrompt = PromptBuilder.builder
|
|
7
|
-
.setName(promptName)
|
|
8
|
-
.setTitle("Decorator JSDocs Prompt")
|
|
9
|
-
.setDescription("Generate JSDoc comments for a TypeScript Decorator according to a curated template and prompt.")
|
|
10
|
-
.setArgsSchema(argsSchema)
|
|
11
|
-
.setCb((
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
args,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
extra) => {
|
|
16
|
-
const prompt = `${BaseJSDocPrompt}
|
|
17
|
-
document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
18
|
-
Include @function an @template tags when appropriate.
|
|
19
|
-
Include detailed @description for all properties.
|
|
20
|
-
For methods, include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.
|
|
21
|
-
create mermaid sequence diagrams under the @mermaid tag;
|
|
22
|
-
|
|
23
|
-
The order of tags (when applicable) should be as follows:
|
|
24
|
-
1 - @description;
|
|
25
|
-
2 - @summary;
|
|
26
|
-
3 - @template;
|
|
27
|
-
4 - @param including type definitions;
|
|
28
|
-
5 - @return;
|
|
29
|
-
6 - @function followed by the interface or type name;
|
|
30
|
-
7 - @mermaid with the sequence diagram for the function if it has over 10 lines
|
|
31
|
-
8 - @category one of: "Decorators", "Class Decorators", "Method Decorators", "Property Decorators", "Parameter Decorators"
|
|
32
|
-
Output only the full JSDoc comment block for the function.
|
|
33
|
-
DO NOT refer to the module it belongs with @memberOf
|
|
34
|
-
never omit or change any code
|
|
35
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information
|
|
36
|
-
${Footer}`;
|
|
37
|
-
const result = {
|
|
38
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
39
|
-
};
|
|
40
|
-
return result;
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=decorator-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decorator-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/decorator-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAoB;AAOtD,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAE9D,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,oBAAoB,GAAkB,aAAa,CAAC,OAAO;KACrE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,yBAAyB,CAAC;KACnC,cAAc,CACb,gGAAgG,CACjG;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;;;;;;;;;;;;;;;;;;;;EAoBrC,MAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, ConstantsPrompt, Footer } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
const promptName = "ts.jsdoc.enum";
|
|
5
|
-
const argsSchema = z.object({});
|
|
6
|
-
export const TsDocEnumPrompt = PromptBuilder.builder
|
|
7
|
-
.setName(promptName)
|
|
8
|
-
.setTitle("Enum JSDocs Prompt")
|
|
9
|
-
.setDescription("Generate JSDoc comments for a TypeScript enum according to a curated template and prompt.")
|
|
10
|
-
.setArgsSchema(argsSchema)
|
|
11
|
-
.setCb((
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
args,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
extra) => {
|
|
16
|
-
const prompt = `${BaseJSDocPrompt}
|
|
17
|
-
${ConstantsPrompt}
|
|
18
|
-
${Footer}`;
|
|
19
|
-
const result = {
|
|
20
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
21
|
-
};
|
|
22
|
-
return result;
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=enum-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enum-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/enum-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAoB;AAOvE,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAE9D,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,eAAe,GAAkB,aAAa,CAAC,OAAO;KAChE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,oBAAoB,CAAC;KAC9B,cAAc,CACb,2FAA2F,CAC5F;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;EACrC,eAAe;EACf,MAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, Footer } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
const promptName = "ts.jsdoc.function";
|
|
5
|
-
const argsSchema = z.object({});
|
|
6
|
-
export const TsDocFunctionPrompt = PromptBuilder.builder
|
|
7
|
-
.setName(promptName)
|
|
8
|
-
.setTitle("Function JSDocs Prompt")
|
|
9
|
-
.setDescription("Generate JSDoc comments for a TypeScript function according to a curated template and prompt.")
|
|
10
|
-
.setArgsSchema(argsSchema)
|
|
11
|
-
.setCb((
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
args,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
extra) => {
|
|
16
|
-
const prompt = `${BaseJSDocPrompt}
|
|
17
|
-
document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
18
|
-
Include @function an @template tags when appropriate.
|
|
19
|
-
Include detailed @description for all properties.
|
|
20
|
-
For methods, include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.
|
|
21
|
-
create mermaid sequence diagrams under the @mermaid tag;
|
|
22
|
-
|
|
23
|
-
The order of tags (when applicable) should be as follows:
|
|
24
|
-
1 - @description;
|
|
25
|
-
2 - @summary;
|
|
26
|
-
3 - @template;
|
|
27
|
-
4 - @param including type definitions;
|
|
28
|
-
5 - @return;
|
|
29
|
-
6 - @function followed by the interface or type name;
|
|
30
|
-
7 - @mermaid with the sequence diagram for the function if ithas over 10 lines
|
|
31
|
-
8 - @memberOf referencing the appropriate module using the appropriate syntax
|
|
32
|
-
|
|
33
|
-
Output only the full JSDoc comment block for the function.
|
|
34
|
-
refer to the module it belongs with @memberOf this the \`@memberOf module:<module_name>\` syntax
|
|
35
|
-
never omit or change any code
|
|
36
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information
|
|
37
|
-
${Footer}`;
|
|
38
|
-
const result = {
|
|
39
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
40
|
-
};
|
|
41
|
-
return result;
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=function-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/function-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAoB;AAOtD,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAE9D,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAEvC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,mBAAmB,GAAkB,aAAa,CAAC,OAAO;KACpE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,wBAAwB,CAAC;KAClC,cAAc,CACb,+FAA+F,CAChG;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;;;;;;;;;;;;;;;;;;;;;EAqBrC,MAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, Footer, TypesPrompt } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
const promptName = "ts.jsdoc.interface";
|
|
5
|
-
const argsSchema = z.object({});
|
|
6
|
-
export const TsDocInterfacePrompt = PromptBuilder.builder
|
|
7
|
-
.setName(promptName)
|
|
8
|
-
.setTitle("Interface JSDocs Prompt")
|
|
9
|
-
.setDescription("Generate JSDoc comments for a TypeScript interface according to a curated template and prompt.")
|
|
10
|
-
.setArgsSchema(argsSchema)
|
|
11
|
-
.setCb((
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
args,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
extra) => {
|
|
16
|
-
const prompt = `${BaseJSDocPrompt}
|
|
17
|
-
${TypesPrompt}
|
|
18
|
-
${Footer}`;
|
|
19
|
-
const result = {
|
|
20
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
21
|
-
};
|
|
22
|
-
return result;
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=interface-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/interface-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,uBAAoB;AAOnE,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAE9D,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,oBAAoB,GAAkB,aAAa,CAAC,OAAO;KACrE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,yBAAyB,CAAC;KACnC,cAAc,CACb,gGAAgG,CACjG;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;EACrC,WAAW;EACX,MAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { BaseJSDocPrompt, Footer, TypesPrompt } from "./constants.js";
|
|
3
|
-
import { PromptBuilder } from "./../../builders/prompt-builder.js";
|
|
4
|
-
const promptName = "ts.jsdoc.type";
|
|
5
|
-
const argsSchema = z.object({});
|
|
6
|
-
export const TsDocTypeePrompt = PromptBuilder.builder
|
|
7
|
-
.setName(promptName)
|
|
8
|
-
.setTitle("Type JSDocs Prompt")
|
|
9
|
-
.setDescription("Generate JSDoc comments for a TypeScript type according to a curated template and prompt.")
|
|
10
|
-
.setArgsSchema(argsSchema)
|
|
11
|
-
.setCb((
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
args,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
extra) => {
|
|
16
|
-
const prompt = `${BaseJSDocPrompt}
|
|
17
|
-
${TypesPrompt}
|
|
18
|
-
${Footer}`;
|
|
19
|
-
const result = {
|
|
20
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
21
|
-
};
|
|
22
|
-
return result;
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=types-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-prompt.js","sourceRoot":"","sources":["../../../../src/prompts/jsdocs/types-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,uBAAoB;AAOnE,OAAO,EAAE,aAAa,EAAE,2CAAsC;AAE9D,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,MAAM,CAAC,MAAM,gBAAgB,GAAkB,aAAa,CAAC,OAAO;KACjE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,oBAAoB,CAAC;KAC9B,cAAc,CACb,2FAA2F,CAC5F;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,eAAe;EACrC,WAAW;EACX,MAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ToolBuilder } from "./../../builders/tool-builder.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { ReasoningLevel, EffortLevel, Cost } from "./../../constants.js";
|
|
4
|
-
// A tiny example tool that reverses an input string. Useful as a smoke/example tool.
|
|
5
|
-
export const ExampleTool = ToolBuilder.builder
|
|
6
|
-
.setName("example-tool")
|
|
7
|
-
.setTitle("Example: Reverse String Tool")
|
|
8
|
-
.setDescription("Reverses the provided `text` input and returns the result.")
|
|
9
|
-
.setInputSchema(z.object({ text: z.string() }))
|
|
10
|
-
.setCb(async (args, _extra) => {
|
|
11
|
-
const text = args?.text ?? "";
|
|
12
|
-
const reversed = String(text).split("").reverse().join("");
|
|
13
|
-
return {
|
|
14
|
-
// Human-readable content for models and UIs
|
|
15
|
-
content: [
|
|
16
|
-
{
|
|
17
|
-
type: "text",
|
|
18
|
-
text: reversed,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
// Structured content matching the declared outputSchema: { result: string }
|
|
22
|
-
structuredContent: { result: reversed },
|
|
23
|
-
};
|
|
24
|
-
})
|
|
25
|
-
.setReasoning(ReasoningLevel.NONE)
|
|
26
|
-
.setEffort(EffortLevel.NONE)
|
|
27
|
-
.setCost(Cost.FREE);
|
|
28
|
-
// Named export already provided above; avoid default exports per repository policy.
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/example-tool/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,yCAAoC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,6BAAwB;AAOpE,qFAAqF;AACrF,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO;KAC3C,OAAO,CAAC,cAAc,CAAC;KACvB,QAAQ,CAAC,8BAA8B,CAAC;KACxC,cAAc,CAAC,4DAA4D,CAAC;KAC5E,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KAC9C,KAAK,CAAC,KAAK,EAAE,IAAS,EAAE,MAA8D,EAAE,EAAE;IACzF,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,OAAO;QACL,4CAA4C;QAC5C,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;aACf;SACF;QACD,4EAA4E;QAC5E,iBAAiB,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;KACjC,CAAC;AACX,CAAC,CAAC;KACD,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC;KACjC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;KAC3B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEtB,oFAAoF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExamplePrompt = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const prompt_builder_1 = require("./../../builders/prompt-builder.cjs");
|
|
6
|
-
const constants_1 = require("./../../constants.cjs");
|
|
7
|
-
const promptName = "example.prompt.echo";
|
|
8
|
-
const argsSchema = zod_1.z.object({ text: zod_1.z.string().optional() });
|
|
9
|
-
exports.ExamplePrompt = prompt_builder_1.PromptBuilder.builder
|
|
10
|
-
.setName(promptName)
|
|
11
|
-
.setTitle("Example: Echo Prompt")
|
|
12
|
-
.setDescription("Returns a short prompt containing the provided `text` as a user message.")
|
|
13
|
-
.setArgsSchema(argsSchema)
|
|
14
|
-
.setReasoning(constants_1.ReasoningLevel.BASIC)
|
|
15
|
-
.setCb((args, _extra) => {
|
|
16
|
-
const text = args?.text ?? "(no text provided)";
|
|
17
|
-
const messages = [{ role: "user", content: { type: "text", text } }];
|
|
18
|
-
return { messages, _meta: {} };
|
|
19
|
-
});
|
|
20
|
-
// Named export already provided above; avoid default exports per repository policy.
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/example-prompt/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wEAA8D;AAO9D,qDAAoE;AAEpE,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAGhD,QAAA,aAAa,GAAG,8BAAa,CAAC,OAAO;KAC/C,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,sBAAsB,CAAC;KAChC,cAAc,CAAC,0EAA0E,CAAC;KAC1F,aAAa,CAAC,UAAiB,CAAC;KAChC,YAAY,CAAC,0BAAc,CAAC,KAAK,CAAC;KAClC,KAAK,CACJ,CACE,IAAU,EACV,MAA8D,EAC7C,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,oBAAoB,CAAC;IAChD,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAS,CAAC;AACxC,CAAC,CACF,CAAC;AAEJ,oFAAoF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InteractiveJsDocPrompt = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const prompt_builder_1 = require("./../../builders/prompt-builder.cjs");
|
|
6
|
-
const constants_1 = require("./../../constants.cjs");
|
|
7
|
-
const promptName = "interactive.jsdoc.assistant";
|
|
8
|
-
const argsSchema = zod_1.z.object({ code: zod_1.z.string().optional(), astObject: zod_1.z.any().optional() });
|
|
9
|
-
exports.InteractiveJsDocPrompt = prompt_builder_1.PromptBuilder.builder
|
|
10
|
-
.setName(promptName)
|
|
11
|
-
.setTitle("Interactive JSDoc Assistant")
|
|
12
|
-
.setDescription("Produce a ready-to-insert JSDoc block for a provided code snippet or AST object.")
|
|
13
|
-
.setArgsSchema(argsSchema)
|
|
14
|
-
.setReasoning(constants_1.ReasoningLevel.BASIC)
|
|
15
|
-
.setCb((args, _extra) => {
|
|
16
|
-
const code = args?.code ?? "";
|
|
17
|
-
const prompt = `Generate a complete JSDoc comment block for the following code. Respond only with the full JSDoc block.\n\n${code}`;
|
|
18
|
-
const result = { messages: [{ role: "user", content: { type: "text", text: prompt } }], _meta: {} };
|
|
19
|
-
return result;
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/interactive-jsdoc/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wEAA8D;AAO9D,qDAAiD;AAEjD,MAAM,UAAU,GAAG,6BAA6B,CAAC;AAEjD,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAG/E,QAAA,sBAAsB,GAAG,8BAAa,CAAC,OAAO;KACxD,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,6BAA6B,CAAC;KACvC,cAAc,CAAC,kFAAkF,CAAC;KAClG,aAAa,CAAC,UAAiB,CAAC;KAChC,YAAY,CAAC,0BAAc,CAAC,KAAK,CAAC;KAClC,KAAK,CAAC,CAAC,IAAU,EAAE,MAA8D,EAAmB,EAAE;IACrG,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,8GAA8G,IAAI,EAAE,CAAC;IACpI,MAAM,MAAM,GAAoB,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAS,CAAC;IAC5H,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TsDocClassPrompt = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("./constants.cjs");
|
|
6
|
-
const prompt_builder_1 = require("./../../builders/prompt-builder.cjs");
|
|
7
|
-
const constants_2 = require("./../../constants.cjs");
|
|
8
|
-
const promptName = "ts.jsdoc.class";
|
|
9
|
-
const argsSchema = zod_1.z.object({});
|
|
10
|
-
exports.TsDocClassPrompt = prompt_builder_1.PromptBuilder.builder
|
|
11
|
-
.setName(promptName)
|
|
12
|
-
.setTitle("Class JSDocs Prompt")
|
|
13
|
-
.setDescription("Generate JSDoc comments for a TypeScript class according to a curated template and prompt.")
|
|
14
|
-
.setArgsSchema(argsSchema)
|
|
15
|
-
.setReasoning(constants_2.ReasoningLevel.BASIC)
|
|
16
|
-
.setCb((
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
-
args,
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
-
extra) => {
|
|
21
|
-
const prompt = `${constants_1.BaseJSDocPrompt}
|
|
22
|
-
document the entire class and each of its functions including always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
23
|
-
Include @class tags when applicable.
|
|
24
|
-
include @param tags in the class documentation and its type definitions
|
|
25
|
-
Include detailed @description for all properties.
|
|
26
|
-
Include @template tags when necessary.
|
|
27
|
-
Do NOT document the constructor, but include the constructor arguments as @param in the class documentation
|
|
28
|
-
For methods and functions:
|
|
29
|
-
- include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.
|
|
30
|
-
- create a usage example under the @example tag on the class documentation
|
|
31
|
-
- create mermaid sequence diagrams under the @mermaid tag;
|
|
32
|
-
|
|
33
|
-
The order of tags (when applicable) should be as follows:
|
|
34
|
-
1 - @description;
|
|
35
|
-
2 - @summary;
|
|
36
|
-
3 - @template;
|
|
37
|
-
4 - @param;
|
|
38
|
-
5 - @return;
|
|
39
|
-
6 - @class
|
|
40
|
-
7 - @example
|
|
41
|
-
8 - @mermaid;
|
|
42
|
-
|
|
43
|
-
ignore @mermaid for methods with less that 15 lines and constructors.
|
|
44
|
-
Respond only with the full JSDoc comment block for the class and its methods.
|
|
45
|
-
NEVER user @memberOf in the class or any of it's methods
|
|
46
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information
|
|
47
|
-
never omit or change any code, including the constructor
|
|
48
|
-
${constants_1.Footer}`;
|
|
49
|
-
const result = {
|
|
50
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
51
|
-
_meta: {},
|
|
52
|
-
};
|
|
53
|
-
return result;
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=class-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"class-prompt.js","sourceRoot":"","sources":["../../../src/prompts/jsdocs/class-prompt.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAAsD;AAOtD,wEAA8D;AAC9D,qDAAiD;AAEjD,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEpC,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGnB,QAAA,gBAAgB,GAAkB,8BAAa,CAAC,OAAO;KACjE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,qBAAqB,CAAC;KAC/B,cAAc,CACb,4FAA4F,CAC7F;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,YAAY,CAAC,0BAAc,CAAC,KAAK,CAAC;KAClC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,2BAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BrC,kBAAM,EAAE,CAAC;IACL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;QACrE,KAAK,EAAE,EAAE;KACV,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TsDocConstPrompt = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("./constants.cjs");
|
|
6
|
-
const prompt_builder_1 = require("./../../builders/prompt-builder.cjs");
|
|
7
|
-
const promptName = "ts.jsdoc.const";
|
|
8
|
-
const argsSchema = zod_1.z.object({});
|
|
9
|
-
exports.TsDocConstPrompt = prompt_builder_1.PromptBuilder.builder
|
|
10
|
-
.setName(promptName)
|
|
11
|
-
.setTitle("Const JSDocs Prompt")
|
|
12
|
-
.setDescription("Generate JSDoc comments for a TypeScript constant according to a curated template and prompt.")
|
|
13
|
-
.setArgsSchema(argsSchema)
|
|
14
|
-
.setCb((
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
-
args,
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
-
extra) => {
|
|
19
|
-
const prompt = `${constants_1.BaseJSDocPrompt}
|
|
20
|
-
${constants_1.ConstantsPrompt}
|
|
21
|
-
${constants_1.Footer}`;
|
|
22
|
-
const result = {
|
|
23
|
-
messages: [{ role: "user", content: { type: "text", text: prompt } }],
|
|
24
|
-
};
|
|
25
|
-
return result;
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=const-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const-prompt.js","sourceRoot":"","sources":["../../../src/prompts/jsdocs/const-prompt.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAAuE;AAOvE,wEAA8D;AAE9D,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEpC,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGnB,QAAA,gBAAgB,GAAkB,8BAAa,CAAC,OAAO;KACjE,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,qBAAqB,CAAC;KAC/B,cAAc,CACb,+FAA+F,CAChG;KACA,aAAa,CAAC,UAAiB,CAAC;KAChC,KAAK,CACJ;AACE,6DAA6D;AAC7D,IAAU;AACV,6DAA6D;AAC7D,KAA6D,EAC7D,EAAE;IACF,MAAM,MAAM,GAAG,GAAG,2BAAe;EACrC,2BAAe;EACf,kBAAM,EAAE,CAAC;IAEL,MAAM,MAAM,GAAoB;QAC9B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CACF,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Footer = exports.ConstantsPrompt = exports.TypesPrompt = exports.BaseJSDocPrompt = void 0;
|
|
4
|
-
exports.BaseJSDocPrompt = `You're a senior TypeScript developer writing JSDoc documentation for a class to be used with better-docs. Given the module code:
|
|
5
|
-
Generate a JSDoc comment block for a TypeScript module file using better-docs formatting:`;
|
|
6
|
-
exports.TypesPrompt = `document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
7
|
-
Include @interface and @typeDef an @template tags when appropriate.
|
|
8
|
-
Include detailed @description for all properties.
|
|
9
|
-
For methods, include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.
|
|
10
|
-
|
|
11
|
-
The order of tags (when applicable) should be as follows:
|
|
12
|
-
1 - @description;
|
|
13
|
-
2 - @summary;
|
|
14
|
-
3 - @template;
|
|
15
|
-
4 - @param;
|
|
16
|
-
5 - @return;
|
|
17
|
-
6 - @interface or @typeDef followed by the interface or type name;
|
|
18
|
-
8 - @memberOf referencing the appropriate module using the appropriate syntax
|
|
19
|
-
|
|
20
|
-
Output only the completed JSDoc comment block for the type or interface.
|
|
21
|
-
refer to the module it belongs with @memberOf this the \`@memberOf module:<module_name>\` syntax
|
|
22
|
-
never omit or change any code
|
|
23
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information`;
|
|
24
|
-
exports.ConstantsPrompt = `document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.
|
|
25
|
-
Include @const and @typeDef tags when appropriate.
|
|
26
|
-
Include detailed @description for all properties.
|
|
27
|
-
- For enums, include @enum and @readonly, and add inline documentation for each member
|
|
28
|
-
- For object-like constants:
|
|
29
|
-
- Create a @typedef with @property for each key
|
|
30
|
-
- Reference it in the constant using @type
|
|
31
|
-
- Alternatively, document each key inline if small
|
|
32
|
-
|
|
33
|
-
The order of tags (when applicable) should be as follows:
|
|
34
|
-
1 - @description;
|
|
35
|
-
2 - @summary;
|
|
36
|
-
3 - @template;
|
|
37
|
-
4 - @property;
|
|
38
|
-
6 - @const followed by the const or enum name;
|
|
39
|
-
8 - @memberOf referencing the appropriate module using the appropriate syntax
|
|
40
|
-
|
|
41
|
-
Respond with the JSDoc comment block(s) for both the typedef and the constant or enum.
|
|
42
|
-
refer to the module it belongs with @memberOf this the \`@memberOf module:<module_name>\` syntax
|
|
43
|
-
never omit or change any code
|
|
44
|
-
if the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information`;
|
|
45
|
-
exports.Footer = `NOTES:
|
|
46
|
-
- when document a function/method parameters, and there is a template type involved, ALWAYS reference it using the @template tag;
|
|
47
|
-
- when documenting a function type as a parameter, ALWAYS use the function(type1,type2):return_type syntax;
|
|
48
|
-
`;
|
|
49
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const BaseJSDocPrompt = "You're a senior TypeScript developer writing JSDoc documentation for a class to be used with better-docs. Given the module code:\nGenerate a JSDoc comment block for a TypeScript module file using better-docs formatting:";
|
|
2
|
-
export declare const TypesPrompt = "document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.\n Include @interface and @typeDef an @template tags when appropriate.\n Include detailed @description for all properties.\n For methods, include @description and @summary tags as defined for the target. also document every argument, including its type definition, and return type, referencing @template tags when necessary.\n\n The order of tags (when applicable) should be as follows:\n1 - @description;\n2 - @summary;\n3 - @template;\n4 - @param;\n5 - @return;\n6 - @interface or @typeDef followed by the interface or type name;\n8 - @memberOf referencing the appropriate module using the appropriate syntax\n\nOutput only the completed JSDoc comment block for the type or interface.\nrefer to the module it belongs with @memberOf this the `@memberOf module:<module_name>` syntax\nnever omit or change any code\nif the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information";
|
|
3
|
-
export declare const ConstantsPrompt = "document the target code, always including the @description tag with a short description of the target, and a@summary tag with a more detailed one.\nInclude @const and @typeDef tags when appropriate.\nInclude detailed @description for all properties.\n- For enums, include @enum and @readonly, and add inline documentation for each member\n- For object-like constants:\n - Create a @typedef with @property for each key\n - Reference it in the constant using @type\n - Alternatively, document each key inline if small\n\nThe order of tags (when applicable) should be as follows:\n1 - @description;\n2 - @summary;\n3 - @template;\n4 - @property;\n6 - @const followed by the const or enum name;\n8 - @memberOf referencing the appropriate module using the appropriate syntax\n\nRespond with the JSDoc comment block(s) for both the typedef and the constant or enum.\nrefer to the module it belongs with @memberOf this the `@memberOf module:<module_name>` syntax\nnever omit or change any code\nif the element is already documented, only restructure, correct, or add to the documentation. NEVER remove existing information";
|
|
4
|
-
export declare const Footer = "NOTES:\n - when document a function/method parameters, and there is a template type involved, ALWAYS reference it using the @template tag;\n - when documenting a function type as a parameter, ALWAYS use the function(type1,type2):return_type syntax;\n ";
|