@ontrails/mcp 1.0.0-beta.5 → 1.0.0-beta.50

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 (50) hide show
  1. package/CHANGELOG.md +416 -12
  2. package/README.md +69 -17
  3. package/package.json +16 -3
  4. package/src/annotations.ts +24 -1
  5. package/src/build.ts +1335 -136
  6. package/src/index.ts +32 -4
  7. package/src/progress.ts +22 -0
  8. package/src/resources.ts +336 -0
  9. package/src/stdio.ts +9 -1
  10. package/src/surface.ts +295 -0
  11. package/src/tool-name.ts +6 -7
  12. package/.turbo/turbo-build.log +0 -1
  13. package/.turbo/turbo-lint.log +0 -3
  14. package/.turbo/turbo-typecheck.log +0 -1
  15. package/dist/annotations.d.ts +0 -19
  16. package/dist/annotations.d.ts.map +0 -1
  17. package/dist/annotations.js +0 -31
  18. package/dist/annotations.js.map +0 -1
  19. package/dist/blaze.d.ts +0 -36
  20. package/dist/blaze.d.ts.map +0 -1
  21. package/dist/blaze.js +0 -96
  22. package/dist/blaze.js.map +0 -1
  23. package/dist/build.d.ts +0 -40
  24. package/dist/build.d.ts.map +0 -1
  25. package/dist/build.js +0 -227
  26. package/dist/build.js.map +0 -1
  27. package/dist/index.d.ts +0 -7
  28. package/dist/index.d.ts.map +0 -1
  29. package/dist/index.js +0 -13
  30. package/dist/index.js.map +0 -1
  31. package/dist/progress.d.ts +0 -13
  32. package/dist/progress.d.ts.map +0 -1
  33. package/dist/progress.js +0 -51
  34. package/dist/progress.js.map +0 -1
  35. package/dist/stdio.d.ts +0 -12
  36. package/dist/stdio.d.ts.map +0 -1
  37. package/dist/stdio.js +0 -15
  38. package/dist/stdio.js.map +0 -1
  39. package/dist/tool-name.d.ts +0 -15
  40. package/dist/tool-name.d.ts.map +0 -1
  41. package/dist/tool-name.js +0 -19
  42. package/dist/tool-name.js.map +0 -1
  43. package/src/__tests__/annotations.test.ts +0 -63
  44. package/src/__tests__/blaze.test.ts +0 -105
  45. package/src/__tests__/build.test.ts +0 -453
  46. package/src/__tests__/progress.test.ts +0 -136
  47. package/src/__tests__/tool-name.test.ts +0 -46
  48. package/src/blaze.ts +0 -146
  49. package/tsconfig.json +0 -9
  50. package/tsconfig.tsbuildinfo +0 -1
@@ -25,9 +25,32 @@ export interface McpAnnotations {
25
25
  *
26
26
  * Only sets hints that are explicitly declared on the trail.
27
27
  * Omitted hints let the MCP SDK use its defaults.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * import { deriveAnnotations } from '@ontrails/mcp';
32
+ *
33
+ * const annotations = deriveAnnotations({
34
+ * intent: 'read',
35
+ * idempotent: true,
36
+ * description: 'Show account',
37
+ * });
38
+ *
39
+ * // read intent -> readOnlyHint, idempotent -> idempotentHint, description -> title.
40
+ * annotations.readOnlyHint === true;
41
+ * annotations.idempotentHint === true;
42
+ * annotations.title === 'Show account';
43
+ *
44
+ * // destroy intent -> destructiveHint.
45
+ * const destroyAnnotations = deriveAnnotations({ intent: 'destroy' });
46
+ * destroyAnnotations.destructiveHint === true;
47
+ * ```
28
48
  */
29
49
  export const deriveAnnotations = (
30
- trail: Pick<Trail<unknown, unknown>, 'intent' | 'idempotent' | 'description'>
50
+ trail: Pick<
51
+ Trail<unknown, unknown, unknown>,
52
+ 'intent' | 'idempotent' | 'description'
53
+ >
31
54
  ): McpAnnotations => {
32
55
  const annotations: Record<string, unknown> = {};
33
56