@bevel-software/platform-core-backend 0.25.2 → 0.26.0

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 (248) hide show
  1. package/agent-guide/access-control.md +234 -0
  2. package/agent-guide/conventions.md +27 -0
  3. package/agent-guide/directory-structure.md +145 -0
  4. package/agent-guide/finding-things.md +7 -0
  5. package/agent-guide/introduction.md +27 -0
  6. package/agent-guide/skills.md +47 -0
  7. package/agent-guide/tool-manuals.md +217 -0
  8. package/agent-guide/where-a-new-file-goes.md +36 -0
  9. package/dist/assets.d.ts +7 -0
  10. package/dist/assets.d.ts.map +1 -1
  11. package/dist/assets.js +9 -0
  12. package/dist/assets.js.map +1 -1
  13. package/dist/core/core-ports.d.ts +11 -0
  14. package/dist/core/core-ports.d.ts.map +1 -1
  15. package/dist/core/core-ports.js.map +1 -1
  16. package/dist/core/create-core-server.d.ts.map +1 -1
  17. package/dist/core/create-core-server.js +13 -2
  18. package/dist/core/create-core-server.js.map +1 -1
  19. package/dist/core/create-core-services.d.ts +9 -0
  20. package/dist/core/create-core-services.d.ts.map +1 -1
  21. package/dist/core/create-core-services.js +14 -4
  22. package/dist/core/create-core-services.js.map +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/modules/access/access-control.interface.d.ts +9 -0
  28. package/dist/modules/access/access-control.interface.d.ts.map +1 -1
  29. package/dist/modules/access/access-control.service.d.ts +1 -0
  30. package/dist/modules/access/access-control.service.d.ts.map +1 -1
  31. package/dist/modules/access/access-control.service.js +16 -0
  32. package/dist/modules/access/access-control.service.js.map +1 -1
  33. package/dist/modules/agent-guide/agent-guide.d.ts +139 -0
  34. package/dist/modules/agent-guide/agent-guide.d.ts.map +1 -0
  35. package/dist/modules/agent-guide/agent-guide.js +191 -0
  36. package/dist/modules/agent-guide/agent-guide.js.map +1 -0
  37. package/dist/modules/agent-guide/agent-guide.tools.d.ts +24 -0
  38. package/dist/modules/agent-guide/agent-guide.tools.d.ts.map +1 -0
  39. package/dist/modules/agent-guide/agent-guide.tools.js +100 -0
  40. package/dist/modules/agent-guide/agent-guide.tools.js.map +1 -0
  41. package/dist/modules/agent-guide/index.d.ts +4 -0
  42. package/dist/modules/agent-guide/index.d.ts.map +1 -0
  43. package/dist/modules/agent-guide/index.js +4 -0
  44. package/dist/modules/agent-guide/index.js.map +1 -0
  45. package/dist/modules/agent-instructions/agent-instructions.routes.d.ts +3 -2
  46. package/dist/modules/agent-instructions/agent-instructions.routes.d.ts.map +1 -1
  47. package/dist/modules/agent-instructions/agent-instructions.routes.js +3 -2
  48. package/dist/modules/agent-instructions/agent-instructions.routes.js.map +1 -1
  49. package/dist/modules/agent-instructions/compose.d.ts +9 -6
  50. package/dist/modules/agent-instructions/compose.d.ts.map +1 -1
  51. package/dist/modules/agent-instructions/compose.js +9 -6
  52. package/dist/modules/agent-instructions/compose.js.map +1 -1
  53. package/dist/modules/agent-instructions/index.d.ts +1 -1
  54. package/dist/modules/agent-instructions/index.d.ts.map +1 -1
  55. package/dist/modules/agent-instructions/index.js +1 -1
  56. package/dist/modules/agent-instructions/index.js.map +1 -1
  57. package/dist/modules/agent-instructions/shared-file-rules.d.ts +10 -50
  58. package/dist/modules/agent-instructions/shared-file-rules.d.ts.map +1 -1
  59. package/dist/modules/agent-instructions/shared-file-rules.js +32 -85
  60. package/dist/modules/agent-instructions/shared-file-rules.js.map +1 -1
  61. package/dist/modules/mcp/mcp.service.d.ts +29 -2
  62. package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
  63. package/dist/modules/mcp/mcp.service.js +113 -16
  64. package/dist/modules/mcp/mcp.service.js.map +1 -1
  65. package/dist/modules/mcp/tool-schema-guard.d.ts +105 -0
  66. package/dist/modules/mcp/tool-schema-guard.d.ts.map +1 -0
  67. package/dist/modules/mcp/tool-schema-guard.js +171 -0
  68. package/dist/modules/mcp/tool-schema-guard.js.map +1 -0
  69. package/dist/modules/plugins/plugins.tools.d.ts +36 -2
  70. package/dist/modules/plugins/plugins.tools.d.ts.map +1 -1
  71. package/dist/modules/plugins/plugins.tools.js +71 -14
  72. package/dist/modules/plugins/plugins.tools.js.map +1 -1
  73. package/dist/modules/settings/deployment-settings.service.d.ts +0 -7
  74. package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
  75. package/dist/modules/settings/deployment-settings.service.js +14 -53
  76. package/dist/modules/settings/deployment-settings.service.js.map +1 -1
  77. package/dist/modules/settings/setup.routes.d.ts.map +1 -1
  78. package/dist/modules/settings/setup.routes.js +3 -6
  79. package/dist/modules/settings/setup.routes.js.map +1 -1
  80. package/dist/modules/skills/skills.tools.d.ts.map +1 -1
  81. package/dist/modules/skills/skills.tools.js +58 -16
  82. package/dist/modules/skills/skills.tools.js.map +1 -1
  83. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +23 -4
  84. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
  85. package/dist/modules/tool-manuals/tool-manuals.contract.js.map +1 -1
  86. package/dist/modules/tool-manuals/tool-manuals.service.d.ts +4 -0
  87. package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
  88. package/dist/modules/tool-manuals/tool-manuals.service.js +14 -0
  89. package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
  90. package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +7 -0
  91. package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
  92. package/dist/modules/tool-manuals/tool-manuals.tools.js +66 -36
  93. package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
  94. package/dist/modules/tool-registry/description-length.d.ts +14 -14
  95. package/dist/modules/tool-registry/description-length.d.ts.map +1 -1
  96. package/dist/modules/tool-registry/description-length.js +24 -26
  97. package/dist/modules/tool-registry/description-length.js.map +1 -1
  98. package/dist/modules/tool-registry/guide-first.d.ts +23 -0
  99. package/dist/modules/tool-registry/guide-first.d.ts.map +1 -0
  100. package/dist/modules/tool-registry/guide-first.js +32 -0
  101. package/dist/modules/tool-registry/guide-first.js.map +1 -0
  102. package/dist/modules/tool-registry/tool-registry.d.ts +6 -0
  103. package/dist/modules/tool-registry/tool-registry.d.ts.map +1 -1
  104. package/dist/modules/tool-registry/tool-registry.js +9 -2
  105. package/dist/modules/tool-registry/tool-registry.js.map +1 -1
  106. package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts +449 -0
  107. package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts.map +1 -0
  108. package/dist/modules/workflow/agent-tools/change-request-read-shape.js +481 -0
  109. package/dist/modules/workflow/agent-tools/change-request-read-shape.js.map +1 -0
  110. package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts +73 -0
  111. package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts.map +1 -0
  112. package/dist/modules/workflow/agent-tools/change-request-read.tools.js +582 -0
  113. package/dist/modules/workflow/agent-tools/change-request-read.tools.js.map +1 -0
  114. package/dist/modules/workflow/agent-tools/change-request-summary.d.ts +12 -1
  115. package/dist/modules/workflow/agent-tools/change-request-summary.d.ts.map +1 -1
  116. package/dist/modules/workflow/agent-tools/change-request-summary.js +5 -1
  117. package/dist/modules/workflow/agent-tools/change-request-summary.js.map +1 -1
  118. package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
  119. package/dist/modules/workflow/agent-tools/workflow.tools.js +9 -0
  120. package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
  121. package/dist/modules/workflow/git/git.service.d.ts +210 -13
  122. package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
  123. package/dist/modules/workflow/git/git.service.js +456 -91
  124. package/dist/modules/workflow/git/git.service.js.map +1 -1
  125. package/dist/modules/workflow/git/merge-commit.d.ts +73 -0
  126. package/dist/modules/workflow/git/merge-commit.d.ts.map +1 -0
  127. package/dist/modules/workflow/git/merge-commit.js +89 -0
  128. package/dist/modules/workflow/git/merge-commit.js.map +1 -0
  129. package/dist/modules/workflow/git/pull-request.service.d.ts +94 -1
  130. package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
  131. package/dist/modules/workflow/git/pull-request.service.js +332 -37
  132. package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
  133. package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts +35 -0
  134. package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -1
  135. package/dist/modules/workflow/review-workflow/review-workflow.service.js +178 -12
  136. package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -1
  137. package/dist/modules/workflow/workflow.routes.d.ts +6 -2
  138. package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
  139. package/dist/modules/workflow/workflow.routes.js +7 -2
  140. package/dist/modules/workflow/workflow.routes.js.map +1 -1
  141. package/dist/modules/workflow/workflow.service.d.ts +4 -0
  142. package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
  143. package/dist/modules/workflow/workflow.service.js +3 -0
  144. package/dist/modules/workflow/workflow.service.js.map +1 -1
  145. package/dist/modules/workspace/startup/steps/seed-tree.d.ts.map +1 -1
  146. package/dist/modules/workspace/startup/steps/seed-tree.js +22 -27
  147. package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -1
  148. package/dist/modules/workspace/startup/steps/template-files.step.d.ts +58 -52
  149. package/dist/modules/workspace/startup/steps/template-files.step.d.ts.map +1 -1
  150. package/dist/modules/workspace/startup/steps/template-files.step.js +209 -223
  151. package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -1
  152. package/dist/modules/workspace/startup/steps/template-source.d.ts +5 -3
  153. package/dist/modules/workspace/startup/steps/template-source.d.ts.map +1 -1
  154. package/dist/modules/workspace/startup/steps/template-source.js +5 -3
  155. package/dist/modules/workspace/startup/steps/template-source.js.map +1 -1
  156. package/dist/modules/workspace/workspace.tools.d.ts +10 -1
  157. package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
  158. package/dist/modules/workspace/workspace.tools.js +211 -18
  159. package/dist/modules/workspace/workspace.tools.js.map +1 -1
  160. package/dist/shared/domain-errors.d.ts +11 -0
  161. package/dist/shared/domain-errors.d.ts.map +1 -1
  162. package/dist/shared/domain-errors.js +14 -0
  163. package/dist/shared/domain-errors.js.map +1 -1
  164. package/dist/shared/hidden-tools.d.ts +44 -0
  165. package/dist/shared/hidden-tools.d.ts.map +1 -0
  166. package/dist/shared/hidden-tools.js +13 -0
  167. package/dist/shared/hidden-tools.js.map +1 -0
  168. package/kb-template/.bevelignore +0 -5
  169. package/package.json +4 -3
  170. package/src/__tests__/kb-layout-config.test.ts +10 -100
  171. package/src/__tests__/packaged-assets-ship.test.ts +54 -0
  172. package/src/assets.ts +10 -0
  173. package/src/core/core-ports.ts +11 -0
  174. package/src/core/create-core-server.ts +13 -2
  175. package/src/core/create-core-services.ts +28 -4
  176. package/src/index.ts +2 -2
  177. package/src/modules/access/__tests__/access-control.atref-batch.test.ts +58 -0
  178. package/src/modules/access/__tests__/access-control.platform-restore.test.ts +8 -7
  179. package/src/modules/access/__tests__/access-personal-plugin.test.ts +1 -18
  180. package/src/modules/access/access-control.interface.ts +15 -0
  181. package/src/modules/access/access-control.service.ts +21 -0
  182. package/src/modules/agent-guide/__tests__/agent-guide.test.ts +328 -0
  183. package/src/modules/agent-guide/__tests__/agent-guide.tools.test.ts +189 -0
  184. package/src/modules/agent-guide/agent-guide.tools.ts +122 -0
  185. package/src/modules/agent-guide/agent-guide.ts +291 -0
  186. package/src/modules/agent-guide/index.ts +21 -0
  187. package/src/modules/agent-instructions/__tests__/shared-file-rules.test.ts +28 -121
  188. package/src/modules/agent-instructions/agent-instructions.routes.ts +3 -2
  189. package/src/modules/agent-instructions/compose.ts +9 -6
  190. package/src/modules/agent-instructions/index.ts +0 -3
  191. package/src/modules/agent-instructions/shared-file-rules.ts +31 -93
  192. package/src/modules/mcp/__tests__/fake-downstream-mcp-server.ts +14 -3
  193. package/src/modules/mcp/__tests__/mcp.e2e.test.ts +250 -0
  194. package/src/modules/mcp/__tests__/mcp.service.test.ts +31 -23
  195. package/src/modules/mcp/__tests__/tool-schema-guard.test.ts +266 -0
  196. package/src/modules/mcp/mcp.service.ts +137 -19
  197. package/src/modules/mcp/tool-schema-guard.ts +196 -0
  198. package/src/modules/plugins/__tests__/plugins.tools.test.ts +154 -4
  199. package/src/modules/plugins/plugins.tools.ts +75 -15
  200. package/src/modules/settings/__tests__/deployment-settings.service.test.ts +26 -55
  201. package/src/modules/settings/deployment-settings.service.ts +13 -54
  202. package/src/modules/settings/setup.routes.ts +3 -6
  203. package/src/modules/skills/__tests__/skills.tools.description.test.ts +91 -0
  204. package/src/modules/skills/skills.tools.ts +62 -16
  205. package/src/modules/tool-manuals/__tests__/tool-manuals.detail.route.test.ts +57 -0
  206. package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +73 -4
  207. package/src/modules/tool-manuals/tool-manuals.contract.ts +24 -4
  208. package/src/modules/tool-manuals/tool-manuals.service.ts +17 -0
  209. package/src/modules/tool-manuals/tool-manuals.tools.ts +74 -36
  210. package/src/modules/tool-registry/__tests__/own-tool-schemas.test.ts +160 -0
  211. package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +61 -59
  212. package/src/modules/tool-registry/description-length.ts +24 -26
  213. package/src/modules/tool-registry/guide-first.ts +34 -0
  214. package/src/modules/tool-registry/tool-registry.ts +9 -2
  215. package/src/modules/workflow/__tests__/apply-failure.test.ts +6 -1
  216. package/src/modules/workflow/agent-tools/__tests__/change-request-read-shape.test.ts +705 -0
  217. package/src/modules/workflow/agent-tools/__tests__/change-request-read.tools.test.ts +1518 -0
  218. package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +23 -2
  219. package/src/modules/workflow/agent-tools/change-request-read-shape.ts +712 -0
  220. package/src/modules/workflow/agent-tools/change-request-read.tools.ts +724 -0
  221. package/src/modules/workflow/agent-tools/change-request-summary.ts +5 -1
  222. package/src/modules/workflow/agent-tools/workflow.tools.ts +8 -0
  223. package/src/modules/workflow/git/__tests__/git.service.appliedChange.test.ts +285 -0
  224. package/src/modules/workflow/git/__tests__/git.service.changedFilesForPr.test.ts +124 -0
  225. package/src/modules/workflow/git/__tests__/git.service.mergeChangeRequest.test.ts +334 -0
  226. package/src/modules/workflow/git/__tests__/pull-request.service.list-fetch.test.ts +72 -2
  227. package/src/modules/workflow/git/__tests__/pull-request.service.placeholder.test.ts +24 -2
  228. package/src/modules/workflow/git/__tests__/pull-request.service.test.ts +620 -1
  229. package/src/modules/workflow/git/git.service.ts +537 -94
  230. package/src/modules/workflow/git/merge-commit.ts +88 -0
  231. package/src/modules/workflow/git/pull-request.service.ts +380 -54
  232. package/src/modules/workflow/review-workflow/__tests__/approval-states.test.ts +7 -1
  233. package/src/modules/workflow/review-workflow/__tests__/merge-records-own-commit.test.ts +407 -0
  234. package/src/modules/workflow/review-workflow/review-workflow.service.ts +189 -11
  235. package/src/modules/workflow/workflow.routes.ts +7 -2
  236. package/src/modules/workflow/workflow.service.ts +7 -0
  237. package/src/modules/workspace/__tests__/escape-sequences.routes.test.ts +4 -3
  238. package/src/modules/workspace/__tests__/workspace.routes.move-platform-files.test.ts +21 -10
  239. package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +33 -55
  240. package/src/modules/workspace/__tests__/workspace.tools.test.ts +255 -22
  241. package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +191 -489
  242. package/src/modules/workspace/startup/steps/seed-tree.ts +21 -27
  243. package/src/modules/workspace/startup/steps/template-files.step.ts +217 -249
  244. package/src/modules/workspace/startup/steps/template-source.ts +5 -3
  245. package/src/modules/workspace/workspace.tools.ts +226 -16
  246. package/src/shared/domain-errors.ts +15 -0
  247. package/src/shared/hidden-tools.ts +45 -0
  248. package/kb-template/AGENTS.md +0 -730
@@ -5,13 +5,14 @@
5
5
  * where the text specific to the tool sits, after whatever shared preamble it
6
6
  * carried. Agents reported `file_stat`, `read_file`, `write_file` and
7
7
  * `write_files` arriving ending in "[truncated]". The rules those descriptions
8
- * shared now live in one place (see `agent-instructions/shared-file-rules.ts`)
9
- * and each description ends with one sentence pointing there, which is what
10
- * makes the cap below reachable rather than aspirational.
8
+ * shared now live in one place (see `agent-instructions/shared-file-rules.ts`,
9
+ * served in the guide `get_agent_guide` returns) and each description OPENS
10
+ * with the one sentence sending the agent there (`guide-first.ts`), which is
11
+ * what makes the cap below reachable rather than aspirational.
11
12
  */
12
13
  import { TOOL_PREFIX_CAP } from '@bevel-software/platform-shared';
13
14
  import { PREFIXED_TOOLS } from '../agent-instructions/compose.js';
14
- import { SHARED_RULES_POINTER_MAX, sharedRulesPointer } from '../agent-instructions/shared-file-rules.js';
15
+ import { GUIDE_FIRST_SENTENCE } from './guide-first.js';
15
16
  /**
16
17
  * The ceiling on what a client is handed for one tool, enforced by
17
18
  * `__tests__/tool-description-length.test.ts`.
@@ -22,8 +23,10 @@ import { SHARED_RULES_POINTER_MAX, sharedRulesPointer } from '../agent-instructi
22
23
  * could answer: no useful description of `move_file` fits in 500. What answers
23
24
  * that one is the ORDER of the text, which is why the deployment's purpose line
24
25
  * is prepended rather than appended (see `prefixToolDescription`) and why every
25
- * description now leads with what the tool does and ends with the pointer: a
26
- * cut at 500 then takes the pointer and leaves the tool. The other cut is the
26
+ * description now opens with the guide-first sentence and then what the tool
27
+ * does, with the tool's own detail last: a cut at 500 keeps the sentence and
28
+ * the tool's first sentence (see `firstSentenceEnd`) and takes the detail,
29
+ * which the guide states in full anyway. The other cut is the
27
30
  * four-figure one agents reported on `file_stat`, `read_file`, `write_file` and
28
31
  * `write_files`, and 1,200 sits below it with room to spare.
29
32
  *
@@ -55,9 +58,10 @@ export const TOOL_DESCRIPTION_CAP = 1_200;
55
58
  export const CLIENT_SHORT_CUT = 500;
56
59
  /**
57
60
  * Where the tool's OWN opening sentence ends in the text a client is handed:
58
- * the purpose prefix counted at its cap, as in {@link clientVisibleLength}, and
59
- * the pointer not counted at all, since it is the part a short cut is meant to
60
- * take.
61
+ * the purpose prefix counted at its cap, as in {@link clientVisibleLength},
62
+ * and the guide-first sentence every listed tool opens with counted as the
63
+ * text it is — a client that cuts at 500 must still reach the sentence saying
64
+ * what the tool does, past that one.
61
65
  *
62
66
  * A description with no sentence-ending punctuation counts whole — the honest
63
67
  * answer for text that never finishes a sentence.
@@ -67,10 +71,15 @@ export function firstSentenceEnd(tool) {
67
71
  const description = tool.description ?? '';
68
72
  if (description === '')
69
73
  return prefix;
70
- const pointer = sharedRulesPointer();
71
- const own = description.endsWith(pointer) ? description.slice(0, -pointer.length) : description;
74
+ // The opener and whatever whitespace follows it: `guideFirstDescription`
75
+ // joins with one space, and leaves a description that already opens with
76
+ // the sentence as it came — a newline after it is still the opener's.
77
+ const opener = description.startsWith(GUIDE_FIRST_SENTENCE)
78
+ ? GUIDE_FIRST_SENTENCE.length + (description.slice(GUIDE_FIRST_SENTENCE.length).match(/^\s*/)?.[0].length ?? 0)
79
+ : 0;
80
+ const own = description.slice(opener);
72
81
  const firstSentence = own.match(/^[\s\S]*?[.!?](?=\s|$)/)?.[0] ?? own;
73
- return prefix + firstSentence.length;
82
+ return prefix + opener + firstSentence.length;
74
83
  }
75
84
  /**
76
85
  * The length of the description as a CLIENT receives it — which for the four
@@ -80,12 +89,8 @@ export function firstSentenceEnd(tool) {
80
89
  * the cap is what an admin may grow their text to without being told, so a
81
90
  * description that only fits beside a short prefix does not really fit.
82
91
  *
83
- * The pointer sentence is measured the same way, for the same reason. It ends
84
- * every file tool's description and its length moves with a DEPLOYMENT SETTING
85
- * — the guide's file name — so a description measured beside the nine
86
- * characters of `AGENTS.md` would pass here and arrive cut on a deployment
87
- * that renamed its guide. Whatever pointer a description actually carries is
88
- * discounted and charged at {@link SHARED_RULES_POINTER_MAX} instead.
92
+ * The guide-first sentence every listed tool opens with is already in the
93
+ * description the registry lists, so it is measured as the text it is.
89
94
  */
90
95
  export function clientVisibleLength(tool) {
91
96
  const own = tool.description?.length ?? 0;
@@ -95,14 +100,7 @@ export function clientVisibleLength(tool) {
95
100
  // text the client got.
96
101
  if (own === 0)
97
102
  return PREFIXED_TOOLS.has(tool.name) ? TOOL_PREFIX_CAP : 0;
98
- // The pointer at its worst case rather than at this layout's: swap the one
99
- // it carries for the longest it could be. A description that does not end
100
- // with it (`start_session`, the proxied tools) is charged nothing.
101
- const pointer = sharedRulesPointer();
102
- const atWorstPointer = tool.description.endsWith(pointer)
103
- ? own - pointer.length + SHARED_RULES_POINTER_MAX
104
- : own;
105
103
  // `+ 2` for the blank line `prefixToolDescription` puts between the two.
106
- return PREFIXED_TOOLS.has(tool.name) ? atWorstPointer + TOOL_PREFIX_CAP + 2 : atWorstPointer;
104
+ return PREFIXED_TOOLS.has(tool.name) ? own + TOOL_PREFIX_CAP + 2 : own;
107
105
  }
108
106
  //# sourceMappingURL=description-length.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"description-length.js","sourceRoot":"","sources":["../../../src/modules/tool-registry/description-length.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAG1G;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA4C;IAC3E,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvE,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;IAC3C,IAAI,WAAW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,aAAa,CAAC,MAAM,CAAC;AAChD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAA4C;IAC9E,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,CAAC;IAC1C,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,uBAAuB;IACvB,IAAI,GAAG,KAAK,CAAC;QAAE,OAAO,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,yEAAyE;IACzE,OAAO,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACzE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { UtcpTool } from './tool.contract.js';
2
+ /** The one tool that returns the platform's guide (see `modules/agent-guide`). */
3
+ export declare const GET_AGENT_GUIDE_TOOL = "get_agent_guide";
4
+ /**
5
+ * The sentence every tool of the platform's own OPENS with: what to do before
6
+ * anything else here. At the front, not the end, because clients cut a long
7
+ * description from the end and the one instruction that must survive is this
8
+ * one. The guide's own tool is the one that does not carry it — it IS what
9
+ * the sentence points at.
10
+ */
11
+ export declare const GUIDE_FIRST_SENTENCE = "Call `get_agent_guide` first and read the platform's guide before anything else here.";
12
+ /**
13
+ * `description` as a client is handed it: the sentence ahead of it, once. A
14
+ * description that already opens with the sentence is returned as it is, and
15
+ * an absent or empty one becomes the sentence alone. The ONE place the
16
+ * sentence is put in front of a description — the registry for the tools it
17
+ * lists, the MCP service for the meta-tools it builds itself — so the two
18
+ * cannot drift apart on what "once" means.
19
+ */
20
+ export declare function guideFirstDescription(description: string | undefined): string;
21
+ /** `tool` as the catalog lists it: the sentence ahead of its own description, except on the guide's own tool. */
22
+ export declare function withGuideFirst(tool: UtcpTool): UtcpTool;
23
+ //# sourceMappingURL=guide-first.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide-first.d.ts","sourceRoot":"","sources":["../../../src/modules/tool-registry/guide-first.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,0FAAoG,CAAC;AAEtI;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAI7E;AAED,iHAAiH;AACjH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAIvD"}
@@ -0,0 +1,32 @@
1
+ /** The one tool that returns the platform's guide (see `modules/agent-guide`). */
2
+ export const GET_AGENT_GUIDE_TOOL = 'get_agent_guide';
3
+ /**
4
+ * The sentence every tool of the platform's own OPENS with: what to do before
5
+ * anything else here. At the front, not the end, because clients cut a long
6
+ * description from the end and the one instruction that must survive is this
7
+ * one. The guide's own tool is the one that does not carry it — it IS what
8
+ * the sentence points at.
9
+ */
10
+ export const GUIDE_FIRST_SENTENCE = `Call \`${GET_AGENT_GUIDE_TOOL}\` first and read the platform's guide before anything else here.`;
11
+ /**
12
+ * `description` as a client is handed it: the sentence ahead of it, once. A
13
+ * description that already opens with the sentence is returned as it is, and
14
+ * an absent or empty one becomes the sentence alone. The ONE place the
15
+ * sentence is put in front of a description — the registry for the tools it
16
+ * lists, the MCP service for the meta-tools it builds itself — so the two
17
+ * cannot drift apart on what "once" means.
18
+ */
19
+ export function guideFirstDescription(description) {
20
+ const own = description ?? '';
21
+ if (own.startsWith(GUIDE_FIRST_SENTENCE))
22
+ return own;
23
+ return own ? `${GUIDE_FIRST_SENTENCE} ${own}` : GUIDE_FIRST_SENTENCE;
24
+ }
25
+ /** `tool` as the catalog lists it: the sentence ahead of its own description, except on the guide's own tool. */
26
+ export function withGuideFirst(tool) {
27
+ if (tool.name === GET_AGENT_GUIDE_TOOL)
28
+ return tool;
29
+ const description = guideFirstDescription(tool.description);
30
+ return description === tool.description ? tool : { ...tool, description };
31
+ }
32
+ //# sourceMappingURL=guide-first.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide-first.js","sourceRoot":"","sources":["../../../src/modules/tool-registry/guide-first.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,oBAAoB,mEAAmE,CAAC;AAEtI;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,WAA+B;IACnE,MAAM,GAAG,GAAG,WAAW,IAAI,EAAE,CAAC;IAC9B,IAAI,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAAE,OAAO,GAAG,CAAC;IACrD,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,oBAAoB,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC;AACvE,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,cAAc,CAAC,IAAc;IAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,oBAAoB;QAAE,OAAO,IAAI,CAAC;IACpD,MAAM,WAAW,GAAG,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5D,OAAO,WAAW,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,EAAE,CAAC;AAC5E,CAAC"}
@@ -6,6 +6,12 @@ import type { IToolRegistry, ToolListProvider, ToolManualContext, ToolProvider,
6
6
  * catalog only aggregates and lists them — the two manual endpoints serialize
7
7
  * each list per request. Insertion order is preserved (static tools first, then
8
8
  * provider-built ones); a duplicate static name within a surface throws.
9
+ *
10
+ * Every listed tool but the guide's own (`get_agent_guide`, which is what the
11
+ * sentence points at) opens with the one sentence saying what to do before
12
+ * any of them (`guide-first.ts`): applied here, at the one place both
13
+ * surfaces list from, so no module that registers a tool has to remember it
14
+ * and no surface can serve a tool without it.
9
15
  */
10
16
  export declare class ToolRegistry implements IToolRegistry {
11
17
  private readonly external;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../../src/modules/tool-registry/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,qBAAa,YAAa,YAAW,aAAa;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA0B;IAEhE,oBAAoB,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI;IAKzD,oBAAoB,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI;IAKzD,qBAAqB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIjD,YAAY,CAAC,GAAG,GAAE,iBAAsB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAK9D,YAAY,CAAC,GAAG,GAAE,iBAAsB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAMpE,OAAO,CAAC,GAAG;CAMZ"}
1
+ {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../../src/modules/tool-registry/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAa,YAAW,aAAa;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA0B;IAEhE,oBAAoB,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI;IAKzD,oBAAoB,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI;IAKzD,qBAAqB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIjD,YAAY,CAAC,GAAG,GAAE,iBAAsB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAK9D,YAAY,CAAC,GAAG,GAAE,iBAAsB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAMpE,OAAO,CAAC,GAAG;CAMZ"}
@@ -1,3 +1,4 @@
1
+ import { withGuideFirst } from './guide-first.js';
1
2
  /**
2
3
  * The tool catalog. Modules call `registerExternalTool` / `registerInternalTool`
3
4
  * (both, for a `both` tool) with a self-describing UTCP `Tool` def, or a
@@ -5,6 +6,12 @@
5
6
  * catalog only aggregates and lists them — the two manual endpoints serialize
6
7
  * each list per request. Insertion order is preserved (static tools first, then
7
8
  * provider-built ones); a duplicate static name within a surface throws.
9
+ *
10
+ * Every listed tool but the guide's own (`get_agent_guide`, which is what the
11
+ * sentence points at) opens with the one sentence saying what to do before
12
+ * any of them (`guide-first.ts`): applied here, at the one place both
13
+ * surfaces list from, so no module that registers a tool has to remember it
14
+ * and no surface can serve a tool without it.
8
15
  */
9
16
  export class ToolRegistry {
10
17
  external = new Map();
@@ -29,12 +36,12 @@ export class ToolRegistry {
29
36
  }
30
37
  async listExternal(ctx = {}) {
31
38
  const dynamic = await Promise.all(this.externalProviders.map((p) => p(ctx)));
32
- return [...this.external.values(), ...dynamic];
39
+ return [...this.external.values(), ...dynamic].map(withGuideFirst);
33
40
  }
34
41
  async listInternal(ctx = {}) {
35
42
  const dynamic = await Promise.all(this.internalProviders.map((p) => p(ctx)));
36
43
  const lists = await Promise.all(this.internalListProviders.map((p) => p(ctx)));
37
- return [...this.internal.values(), ...dynamic, ...lists.flat()];
44
+ return [...this.internal.values(), ...dynamic, ...lists.flat()].map(withGuideFirst);
38
45
  }
39
46
  add(into, tool, surface) {
40
47
  if (into.has(tool.name)) {
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../../src/modules/tool-registry/tool-registry.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IACN,QAAQ,GAAG,IAAI,GAAG,EAAoB,CAAC;IACvC,QAAQ,GAAG,IAAI,GAAG,EAAoB,CAAC;IACvC,iBAAiB,GAAmB,EAAE,CAAC;IACvC,iBAAiB,GAAmB,EAAE,CAAC;IACvC,qBAAqB,GAAuB,EAAE,CAAC;IAEhE,oBAAoB,CAAC,IAA6B;QAChD,IAAI,OAAO,IAAI,KAAK,UAAU;YAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;YAC7D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC;IAED,oBAAoB,CAAC,IAA6B;QAChD,IAAI,OAAO,IAAI,KAAK,UAAU;YAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;YAC7D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC;IAED,qBAAqB,CAAC,QAA0B;QAC9C,IAAI,CAAC,q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