@travetto/llm-support 8.0.0-alpha.20

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.
Files changed (84) hide show
  1. package/README.md +101 -0
  2. package/__index__.ts +11 -0
  3. package/llm/consumer/INSTRUCTIONS.md +44 -0
  4. package/llm/maintainer/INSTRUCTIONS.md +37 -0
  5. package/package.json +56 -0
  6. package/resources/snippets/autograph-cli-orchestration.md +21 -0
  7. package/resources/snippets/code/aws-lambda-package-and-deploy.yml.tpl +36 -0
  8. package/resources/snippets/code/cache-enhancements.config.ts.tpl +6 -0
  9. package/resources/snippets/code/cache-enhancements.service.ts.tpl +16 -0
  10. package/resources/snippets/code/create-web-interceptor.ts.tpl +15 -0
  11. package/resources/snippets/code/create-web-route.controller.ts.tpl +15 -0
  12. package/resources/snippets/code/create-web-route.service.ts.tpl +8 -0
  13. package/resources/snippets/code/email-config.ts.tpl +6 -0
  14. package/resources/snippets/code/email-context-schema.ts.tpl +7 -0
  15. package/resources/snippets/code/email-create-template.mustache.tpl +2 -0
  16. package/resources/snippets/code/email-fixture.json.tpl +6 -0
  17. package/resources/snippets/code/email-preview-test.ts.tpl +14 -0
  18. package/resources/snippets/code/email-render-pipeline.ts.tpl +12 -0
  19. package/resources/snippets/code/email-send-controller.ts.tpl +18 -0
  20. package/resources/snippets/code/email-transport-provider.ts.tpl +8 -0
  21. package/resources/snippets/code/enable-auth-session.config.ts.tpl +34 -0
  22. package/resources/snippets/code/enable-auth-session.controller.ts.tpl +30 -0
  23. package/resources/snippets/code/enable-file-upload.config.ts.tpl +6 -0
  24. package/resources/snippets/code/enable-file-upload.controller.ts.tpl +16 -0
  25. package/resources/snippets/code/enable-linting.package.json.tpl +13 -0
  26. package/resources/snippets/code/generate-config.app-config.ts.tpl +7 -0
  27. package/resources/snippets/code/generate-config.application.yml.tpl +3 -0
  28. package/resources/snippets/code/generate-config.local.yml.tpl +2 -0
  29. package/resources/snippets/code/generate-test-suite.fixture.json.tpl +4 -0
  30. package/resources/snippets/code/generate-test-suite.unit.ts.tpl +11 -0
  31. package/resources/snippets/code/model-indexed.indexes.ts.tpl +14 -0
  32. package/resources/snippets/code/model-indexed.model.ts.tpl +8 -0
  33. package/resources/snippets/code/model-indexed.service.ts.tpl +15 -0
  34. package/resources/snippets/code/model-query.service.ts.tpl +18 -0
  35. package/resources/snippets/code/openapi-client-generation.readme.tpl +13 -0
  36. package/resources/snippets/code/openapi-client-generation.yml.tpl +20 -0
  37. package/resources/snippets/code/openapi-spec-pipeline.yml.tpl +21 -0
  38. package/resources/snippets/code/pack-docker-release.yml.tpl +21 -0
  39. package/resources/snippets/code/project-bootstrap.application.yml.tpl +2 -0
  40. package/resources/snippets/code/project-bootstrap.home-controller.ts.tpl +15 -0
  41. package/resources/snippets/code/project-bootstrap.home-service.ts.tpl +8 -0
  42. package/resources/snippets/code/project-bootstrap.monorepo.package.json.tpl +12 -0
  43. package/resources/snippets/code/project-bootstrap.package.json.tpl +18 -0
  44. package/resources/snippets/code/repo-version-release.yml.tpl +25 -0
  45. package/resources/snippets/code/rest-rpc-client.client.ts.tpl +8 -0
  46. package/resources/snippets/code/rest-rpc-client.index.ts.tpl +1 -0
  47. package/resources/snippets/code/workflow-cloudfront-deploy.yml.tpl +18 -0
  48. package/resources/snippets/code/workflow-gcp-deploy.yml.tpl +18 -0
  49. package/resources/snippets/core-aws-lambda-package-and-deploy.md +21 -0
  50. package/resources/snippets/core-email-compiler-pattern.md +21 -0
  51. package/resources/snippets/core-email-module-contract.md +21 -0
  52. package/resources/snippets/core-email-nodemailer-provider.md +21 -0
  53. package/resources/snippets/core-eslint-ruleset.md +21 -0
  54. package/resources/snippets/core-openapi-client-generation.md +21 -0
  55. package/resources/snippets/core-openapi-spec-pipeline.md +21 -0
  56. package/resources/snippets/core-pack-docker-release.md +21 -0
  57. package/resources/snippets/core-repo-version-release.md +21 -0
  58. package/resources/snippets/core-upload-pattern.md +21 -0
  59. package/resources/snippets/core-web-controller-pattern.md +23 -0
  60. package/resources/snippets/core-work-pool-pattern.md +23 -0
  61. package/resources/snippets/embracinglife-cloudfront-deploy.md +21 -0
  62. package/resources/snippets/embracinglife-gcp-deploy.md +21 -0
  63. package/resources/snippets/recipe-auth-google-oauth.md +21 -0
  64. package/resources/snippets/recipe-indexed-model-pattern.md +21 -0
  65. package/resources/snippets/recipe-upload-presigned.md +21 -0
  66. package/resources/snippets/todo-app-test-pattern.md +21 -0
  67. package/src/consumer-docs.ts +23 -0
  68. package/src/execute.ts +624 -0
  69. package/src/install-guidance.ts +187 -0
  70. package/src/mcp.ts +170 -0
  71. package/src/plan.ts +110 -0
  72. package/src/recommendation.ts +306 -0
  73. package/src/snippet-catalog.ts +80 -0
  74. package/src/snippet-shapes.ts +14 -0
  75. package/src/template-shapes.ts +13 -0
  76. package/src/tooling.ts +197 -0
  77. package/src/types.ts +215 -0
  78. package/src/workflow-guidance.ts +220 -0
  79. package/support/base-command.ts +57 -0
  80. package/support/cli.llm_support_execute.ts +80 -0
  81. package/support/cli.llm_support_mcp.ts +62 -0
  82. package/support/cli.llm_support_plan.ts +30 -0
  83. package/support/cli.llm_support_recommend.ts +34 -0
  84. package/support/cli.llm_support_status.ts +30 -0
@@ -0,0 +1,34 @@
1
+ import { CliCommand, CliFlag } from '@travetto/cli';
2
+ import { Required } from '@travetto/schema';
3
+
4
+ import { recommend } from '../src/recommendation.ts';
5
+ import { LlmSupportScopedSnippetCommandBase } from './base-command.ts';
6
+
7
+ /**
8
+ * Recommend llm-support bundles, workflows, and operations.
9
+ */
10
+ @CliCommand()
11
+ export class LlmSupportRecommendCommand extends LlmSupportScopedSnippetCommandBase {
12
+
13
+ @CliFlag({ short: 'b', full: 'bundles' })
14
+ @Required(false)
15
+ bundles?: string[];
16
+
17
+ @CliFlag({ short: 'w', full: 'workflows' })
18
+ @Required(false)
19
+ workflows?: string[];
20
+
21
+ async main(): Promise<void> {
22
+ const categories = this.getScopedCategories();
23
+
24
+ const payload = await recommend({
25
+ bundles: this.bundles ?? [],
26
+ workflows: this.workflows ?? [],
27
+ categories,
28
+ snippetTags: this.snippetTags ?? [],
29
+ includeExcluded: this.includeExcluded
30
+ });
31
+
32
+ await this.writeOutput(payload, this.includeExcluded);
33
+ }
34
+ }
@@ -0,0 +1,30 @@
1
+ import { CliCommand, CliFlag } from '@travetto/cli';
2
+
3
+ import { getUnimplementedOperations } from '../src/execute.ts';
4
+ import { recommendOperations } from '../src/recommendation.ts';
5
+ import { LlmSupportScopedCommandBase } from './base-command.ts';
6
+
7
+ /**
8
+ * Show llm-support execution coverage status.
9
+ */
10
+ @CliCommand()
11
+ export class LlmSupportStatusCommand extends LlmSupportScopedCommandBase {
12
+
13
+ @CliFlag({ short: 'o', full: 'operations' })
14
+ operations?: string[];
15
+
16
+ async main(): Promise<void> {
17
+ const categories = this.getScopedCategories();
18
+
19
+ const operations = this.operations ?? [];
20
+ const selected = operations.length > 0 ?
21
+ operations :
22
+ recommendOperations({ categories, includeExcluded: this.includeExcluded }).map(item => item.id);
23
+
24
+ const unimplemented = getUnimplementedOperations(selected);
25
+ const unimplementedSet = new Set(unimplemented);
26
+ const implemented = selected.filter(item => !unimplementedSet.has(item));
27
+
28
+ await this.writeOutput({ implemented, unimplemented }, this.includeExcluded);
29
+ }
30
+ }